wp_maybe_disable_trackback_for_environment()
Rejects incoming trackbacks in non-production environments.
Hooked to pre_trackback_post fires in wp-trackback.php before the trackback is processed. Calls trackback_response() sends an XML error response and terminates the request.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wp_maybe_disable_trackback_for_environment();
Список изменений
| С версии 7.1.0 | Введена. |
Код wp_maybe_disable_trackback_for_environment() wp maybe disable trackback for environment WP 7.1.2
function wp_maybe_disable_trackback_for_environment() {
if ( wp_should_disable_pings_for_environment() ) {
trackback_response( 1, __( 'Trackbacks are disabled in non-production environments.' ) );
}
}