wphooks.info - post_link

post_link

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/link-template.php:
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
	 * Filters the permalink for a post.
	 *
	 * Only applies to posts with post_type of 'post'.
	 *
	 * @since 1.5.0
	 *
	 * @param string  $permalink The post's permalink.
	 * @param WP_Post $post      The post in question.
	 * @param bool    $leavename Whether to keep the post name.
	 */
	return apply_filters( 'post_link', $permalink, $post, $leavename );
}

/**
 * Retrieves the permalink for a post of a custom post type.
 *
 * @since 3.0.0
 *
 * @global WP_Rewrite $wp_rewrite
 *