woocommerce_navigation_connect_page_options хук-фильтрWC 1.0

Filter the options when connecting or registering a page.

Use the js_page option to determine if registering.

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

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 describing the page.

  • id(строка)
    Id to reference the page.

  • title(строка|массив)
    Page title. Used in menus and breadcrumbs.

  • parent(строка|null)
    Parent ID. Null for new top level page.

  • screen_id(строка)
    The screen ID that represents the connected page. (Not required for registering).

  • path(строка)
    Path for this page. E.g. admin.php?page=wc-settings&tab=checkout

  • capability(строка)
    Capability needed to access the page.

  • icon(строка)
    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.

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

PageController::connect_page()
woocommerce_navigation_connect_page_options
woocommerce/src/Admin/PageController.php 110
$options = apply_filters( 'woocommerce_navigation_connect_page_options', $options );

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

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