apply_filters( 'wp_should_disable_pings_for_environment', bool $should_disable, string $environment_type )
- Since
- 7.1.0
Filters whether pings should be disabled for the current environment.
Description
Returning false re-enables pings in non-production environments.
Returning true disables pings even in production.
Compatibility
- WordPress
- since 7.1.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in 1 of the 5 tracked releases, added in 7.1.0.
Parameters
$should_disablebool- Whether pings should be disabled. Default true for non-production environments, false for production.
$environment_typestring- The current environment type as returned by wp_get_environment_type().
Where this hook fires · 1
wp-includes/comment.php:3453wp_should_disable_pings_for_environment()
Source code
* * @param bool $should_disable Whether pings should be disabled. Default true * for non-production environments, false for production. * @param string $environment_type The current environment type as returned by * wp_get_environment_type(). */ return apply_filters( 'wp_should_disable_pings_for_environment', $should_disable, $environment_type );} /** * Removes outgoing ping callbacks in non-production environments. * * Hooked to `do_all_pings` at priority 1 so it runs before the defaultChangelog
Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.