pre_post_ping_status
Filters the value of a specific field before saving.
Only applied to post fields with a name which is prefixed with post_.
- pre_post_ID
- pre_post_comment_status
- pre_post_ping_status
- pre_post_to_ping
- pre_post_pinged
- pre_post_guid
- pre_post_menu_order
- pre_post_comment_count
This is one of the variants of the dynamic hook pre_post_(field)
Usage
add_filter( 'pre_post_ping_status', 'wp_kama_pre_post_ping_status_filter' );
/**
* Function for `pre_post_ping_status` filter-hook.
*
* @param mixed $value Value of the post field.
*
* @return mixed
*/
function wp_kama_pre_post_ping_status_filter( $value ){
// filter...
return $value;
}
- $value(mixed)
- Value of the post field.
Changelog
| Since 2.3.0 | Introduced. |
Where the hook is called
pre_post_ping_status
wp-includes/post.php 3124
$value = apply_filters( "pre_post_{$field}", $value );
Where the hook is used in WordPress
wp-includes/default-filters.php 107
add_filter( $filter, 'sanitize_key' );