get_sample_permalink хук-фильтр . WP 4.4.0
Filters the sample permalink.
Использование
add_filter( 'get_sample_permalink', 'filter_function_name_7389', 10, 5 ); function filter_function_name_7389( $permalink, $post_id, $title, $name, $post ){ // filter... return $permalink; }
- $permalink(массив)
- Array containing the sample permalink with placeholder for the post name, and the post name.
- $post_id(число)
- Post ID.
- $title(строка)
- Post title.
- $name(строка)
- Post name (slug).
- $post(WP_Post)
- Post object.
Список изменений
С версии 4.4.0 | Введена. |
Где вызывается хук
get_sample_permalink
wp-admin/includes/post.php 1392
return apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post );