get_sample_permalink_html

Filters the sample permalink HTML markup.

Description

apply_filters( 'get_sample_permalink_html', (string) $return, (int) $post_id, (string) $new_title, (string) $new_slug, (WP_Post) $post ); 

Parameters (5)

0. $return (string)
Sample permalink HTML markup.
1. $post_id (int)
The post id.
2. $new_title (string)
New sample permalink title.
3. $new_slug (string)
New sample permalink slug.
4. $post (WP_Post)
Post object.

Usage

To run the hook, copy the example below.
  1. $return = apply_filters( 'get_sample_permalink_html', $return, $post_id, $new_title, $new_slug, $post ); 
  2.  
  3. if ( !empty( $return ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the get_sample_permalink_html callback 
  2. function filter_get_sample_permalink_html( $return, $post_id, $new_title, $new_slug, $post ) { 
  3. // make filter magic happen here... 
  4. return $return
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'get_sample_permalink_html', 'filter_get_sample_permalink_html', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'get_sample_permalink_html', 'filter_get_sample_permalink_html', 10, 5 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/post.php  
  1. $return = apply_filters( 'get_sample_permalink_html', $return, $post->ID, $new_title, $new_slug, $post );