woocommerce_navigation_current_screen_id хук-фильтрWC 3.9.0

Filter the current screen ID for REST API requests.

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

add_filter( 'woocommerce_navigation_current_screen_id', 'wp_kama_woocommerce_navigation_current_screen_id_filter', 10, 2 );

/**
 * Function for `woocommerce_navigation_current_screen_id` filter-hook.
 * 
 * @param string|boolean $screen_id      The screen id or false if not identified.
 * @param WP_Screen      $current_screen The current WP_Screen.
 *
 * @return string|boolean
 */
function wp_kama_woocommerce_navigation_current_screen_id_filter( $screen_id, $current_screen ){

	// filter...
	return $screen_id;
}
$screen_id(строка|true|false)
The screen id or false if not identified.
$current_screen(WP_Screen)
The current WP_Screen.

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

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

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

PageController::get_current_screen_id()
woocommerce_navigation_current_screen_id
woocommerce/src/Admin/PageController.php 273
return apply_filters( 'woocommerce_navigation_current_screen_id', false, null );
woocommerce/src/Admin/PageController.php 279
return apply_filters( 'woocommerce_navigation_current_screen_id', false, $current_screen );
woocommerce/src/Admin/PageController.php 375
return apply_filters( 'woocommerce_navigation_current_screen_id', implode( '-', $screen_pieces ), $current_screen );

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

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