Add a 'get_sample_permalink' filter.
Props SergeyBiryukov, wenthemes, JustinSainton. Fixes #22338. git-svn-id: https://develop.svn.wordpress.org/trunk@34309 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
27eb1ac0da
commit
b0b36bc346
@ -1256,7 +1256,18 @@ function get_sample_permalink($id, $title = null, $name = null) {
|
|||||||
$post->post_name = $original_name;
|
$post->post_name = $original_name;
|
||||||
unset($post->filter);
|
unset($post->filter);
|
||||||
|
|
||||||
return $permalink;
|
/**
|
||||||
|
* Filter the sample permalink.
|
||||||
|
*
|
||||||
|
* @since 4.4.0
|
||||||
|
*
|
||||||
|
* @param string $permalink Sample permalink.
|
||||||
|
* @param int $post_id Post ID.
|
||||||
|
* @param string $title Post title.
|
||||||
|
* @param string $name Post name (slug).
|
||||||
|
* @param WP_Post $post Post object.
|
||||||
|
*/
|
||||||
|
return apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user