woocommerce_navigation_is_registered_page
Whether or not the current page was registered with this controller.
Used to determine if this is a JS-powered WooCommerce Admin page.
Использование
add_filter( 'woocommerce_navigation_is_registered_page', 'wp_kama_woocommerce_navigation_is_registered_page_filter', 10, 2 ); /** * Function for `woocommerce_navigation_is_registered_page` filter-hook. * * @param boolean $is_registered_page True if the current page was registered with this controller. * @param array|boolean $current_page The registered page data or false if not identified. * * @return boolean */ function wp_kama_woocommerce_navigation_is_registered_page_filter( $is_registered_page, $current_page ){ // filter... return $is_registered_page; }
- $is_registered_page(true|false)
- True if the current page was registered with this controller.
- $current_page(массив|true|false)
- The registered page data or false if not identified.
Где вызывается хук
woocommerce_navigation_is_registered_page
woocommerce/src/Admin/PageController.php 418
return apply_filters( 'woocommerce_navigation_is_registered_page', $is_registered_page, $current_page );