Title: pings_open
Published: April 25, 2014
Last modified: February 24, 2026

---

# pings_open( int|WP_Post $post = null ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#wp--skip-link--target)

Determines whether the current post is open for pings.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#description)󠁿

For more information on this and similar theme functions, check out the [ Conditional Tags](https://developer.wordpress.org/themes/basics/conditional-tags/)
article in the Theme Developer Handbook.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#parameters)󠁿

 `$post`int|[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)
optional

Post ID or [WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)
object. Default current post.

Default:`null`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#return)󠁿

 bool True if pings are accepted

## 󠀁[Source](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#source)󠁿

    ```php
    function pings_open( $post = null ) {
    	$_post = get_post( $post );

    	$post_id    = $_post ? $_post->ID : 0;
    	$pings_open = ( $_post && ( 'open' === $_post->ping_status ) );

    	/**
    	 * Filters whether the current post is open for pings.
    	 *
    	 * @since 2.5.0
    	 *
    	 * @param bool $pings_open Whether the current post is open for pings.
    	 * @param int  $post_id    The post ID.
    	 */
    	return apply_filters( 'pings_open', $pings_open, $post_id );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/comment-template.php#L1340)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/comment-template.php#L1340-L1355)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#hooks)󠁿

 [apply_filters( ‘pings_open’, bool $pings_open, int $post_id )](https://developer.wordpress.org/reference/hooks/pings_open/)

Filters whether the current post is open for pings.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#related)󠁿

| Uses | Description | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  | 
| [get_post()](https://developer.wordpress.org/reference/functions/get_post/)`wp-includes/post.php` |

Retrieves post data given a post ID or post object.

  |

| Used by | Description | 
| [register_and_do_post_meta_boxes()](https://developer.wordpress.org/reference/functions/register_and_do_post_meta_boxes/)`wp-admin/includes/meta-boxes.php` |

Registers the default post meta boxes, and runs the `do_meta_boxes` actions.

  | 
| [feed_links_extra()](https://developer.wordpress.org/reference/functions/feed_links_extra/)`wp-includes/general-template.php` |

Displays the links to the extra feeds such as category feeds.

  | 
| [WP::send_headers()](https://developer.wordpress.org/reference/classes/wp/send_headers/)`wp-includes/class-wp.php` |

Sends additional HTTP headers for caching, content type, etc.

  | 
| [wp_xmlrpc_server::pingback_ping()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/pingback_ping/)`wp-includes/class-wp-xmlrpc-server.php` |

Retrieves a pingback and registers it.

  | 
| [wp_xmlrpc_server::_prepare_page()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/_prepare_page/)`wp-includes/class-wp-xmlrpc-server.php` |

Prepares page data for return in an XML-RPC object.

  | 
| [comments_popup_link()](https://developer.wordpress.org/reference/functions/comments_popup_link/)`wp-includes/comment-template.php` |

Displays the link to the comments for the current post ID.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/pings_open/?output_format=md#changelog)󠁿

| Version | Description | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fpings_open%2F)
before being able to contribute a note or feedback.