pings_open
Filter HookDescription
Filters whether the current post is open for pings.Hook Information
File Location |
wp-includes/comment-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1358 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$pings_open
|
Whether the current post is open for pings. |
int
|
$post_id
|
The post ID. |
Usage Examples
Basic Usage
<?php
// Hook into pings_open
add_filter('pings_open', 'my_custom_filter', 10, 2);
function my_custom_filter($pings_open, $post_id) {
// Your custom filtering logic here
return $pings_open;
}
Source Code Context
wp-includes/comment-template.php:1358
- How this hook is used in WordPress core
<?php
1353 * @since 2.5.0
1354 *
1355 * @param bool $pings_open Whether the current post is open for pings.
1356 * @param int $post_id The post ID.
1357 */
1358 return apply_filters( 'pings_open', $pings_open, $post_id );
1359 }
1360
1361 /**
1362 * Displays form token for unfiltered comments.
1363 *
PHP Documentation
<?php
/**
* 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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/comment-template.php
Related Hooks
Related hooks will be displayed here in future updates.