post_link_category WordPress Filter Hook

This hook is called when a link category is added. It allows you to take an action when a new link category is added.

apply_filters( 'post_link_category', WP_Term $cat, array $cats, WP_Post $post ) #

Filters the category that gets used in the %category% permalink token.


Parameters

$cat

(WP_Term)The category to use in the permalink.

$cats

(array)Array of all categories (WP_Term objects) associated with the post.

$post

(WP_Post)The post in question.


Top ↑

Source

File: wp-includes/link-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More