wp_refresh_nonces хук-фильтрWP 4.3.0

Filters the nonces to send to the New/Edit Post screen.

Использование

add_filter( 'wp_refresh_nonces', 'wp_kama_refresh_nonces_filter', 10, 3 );

/**
 * Function for `wp_refresh_nonces` filter-hook.
 * 
 * @param array  $response  The Heartbeat response.
 * @param array  $data      The $_POST data sent.
 * @param string $screen_id The screen ID.
 *
 * @return array
 */
function wp_kama_refresh_nonces_filter( $response, $data, $screen_id ){

	// filter...
	return $response;
}
$response(массив)
The Heartbeat response.
$data(массив)
The $_POST data sent.
$screen_id(строка)
The screen ID.

Список изменений

С версии 4.3.0 Введена.

Где вызывается хук

wp_ajax_heartbeat()
wp_refresh_nonces
wp-admin/includes/ajax-actions.php 3480
$response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id );

Где используется хук в WordPress

wp-admin/includes/admin-filters.php 83
add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10, 3 );
wp-admin/includes/admin-filters.php 84
add_filter( 'wp_refresh_nonces', 'wp_refresh_metabox_loader_nonces', 10, 2 );
wp-admin/includes/admin-filters.php 85
add_filter( 'wp_refresh_nonces', 'wp_refresh_heartbeat_nonces' );