get_sample_permalink_html
Filters the sample permalink HTML markup.
Usage
add_filter( 'get_sample_permalink_html', 'wp_kama_get_sample_permalink_html_filter', 10, 5 ); /** * Function for `get_sample_permalink_html` filter-hook. * * @param string $return Sample permalink HTML markup. * @param int $post_id Post ID. * @param string|null $new_title New sample permalink title. * @param string|null $new_slug New sample permalink slug. * @param WP_Post $post Post object. * * @return string */ function wp_kama_get_sample_permalink_html_filter( $return, $post_id, $new_title, $new_slug, $post ){ // filter... return $return; }
- $return(string)
- Sample permalink HTML markup.
- $post_id(int)
- Post ID.
- $new_title(string|null)
- New sample permalink title.
- $new_slug(string|null)
- New sample permalink slug.
- $post(WP_Post)
- Post object.
Changelog
Since 2.9.0 | Introduced. |
Since 4.4.0 | Added $post parameter. |
Where the hook is called
get_sample_permalink_html
wp-admin/includes/post.php 1613
$return = apply_filters( 'get_sample_permalink_html', $return, $post->ID, $new_title, $new_slug, $post );