get_sample_permalink filter-hook . WP 4.4.0
Filters the sample permalink.
Usage
add_filter( 'get_sample_permalink', 'filter_function_name_381', 10, 5 ); function filter_function_name_381( $permalink, $post_id, $title, $name, $post ){ // filter... return $permalink; }
- $permalink(array)
Array containing the sample permalink with placeholder for the post name, and the post name.
-
0(string)
The permalink with placeholder for the post name. - 1(string)
The post name.
-
- $post_id(int)
- Post ID.
- $title(string)
- Post title.
- $name(string)
- Post name (slug).
- $post(WP_Post)
- Post object.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
get_sample_permalink
wp-admin/includes/post.php 1421
return apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post );