pings_open
Filters whether the current post is open for pings.
Usage
add_filter( 'pings_open', 'wp_kama_pings_open_filter', 10, 2 ); /** * Function for `pings_open` filter-hook. * * @param bool $pings_open Whether the current post is open for pings. * @param int $post_id The post ID. * * @return bool */ function wp_kama_pings_open_filter( $pings_open, $post_id ){ // filter... return $pings_open; }
- $pings_open(true|false)
- Whether the current post is open for pings.
- $post_id(int)
- The post ID.
Changelog
Since 2.5.0 | Introduced. |
Where the hook is called
pings_open
wp-includes/comment-template.php 1358
return apply_filters( 'pings_open', $pings_open, $post_id );
Where the hook is used in WordPress
wp-includes/default-filters.php 311
add_filter( 'pings_open', '_close_comments_for_old_post', 10, 2 );