woocommerce_navigation_connect_page_options
Filter the options when connecting or registering a page.
Use the js_page option to determine if registering.
Usage
add_filter( 'woocommerce_navigation_connect_page_options', 'wp_kama_woocommerce_navigation_connect_page_options_filter' ); /** * Function for `woocommerce_navigation_connect_page_options` filter-hook. * * @param array $options Array describing the page. * * @return array */ function wp_kama_woocommerce_navigation_connect_page_options_filter( $options ){ // filter... return $options; }
- $options(array)
Array describing the page.
-
id(string)
Id to reference the page. -
title(string|array)
Page title. Used in menus and breadcrumbs. -
parent(string|null)
Parent ID. Null for new top level page. -
screen_id(string)
The screen ID that represents the connected page. (Not required for registering). -
path(string)
Path for this page. E.g. admin.php?page=wc-settings&tab=checkout -
capability(string)
Capability needed to access the page. -
icon(string)
Icon. Dashicons helper class, base64-encoded SVG, or 'none'. -
position(int)
Menu item position. - js_page(true|false)
If this is a JS-powered page.
-
Where the hook is called
woocommerce_navigation_connect_page_options
woocommerce/src/Admin/PageController.php 109
$options = apply_filters( 'woocommerce_navigation_connect_page_options', $options );