Automattic\WooCommerce\Admin\Features\Navigation

CoreMenu::get_setting_items()public staticWC 1.0

Add registered admin settings as menu items.

{} Это метод класса: CoreMenu{}

Хуки из метода

Возвращает

null. Ничего.

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

$result = CoreMenu::get_setting_items();

Код CoreMenu::get_setting_items() WC 7.1.0

public static function get_setting_items() {
	// Let the Settings feature add pages to the navigation if enabled.
	if ( Features::is_enabled( 'settings' ) ) {
		return array();
	}

	// Calling this method adds pages to the below tabs filter on non-settings pages.
	\WC_Admin_Settings::get_settings_pages();
	$tabs = apply_filters( 'woocommerce_settings_tabs_array', array() );

	$menu_items = array();
	$order      = 0;
	foreach ( $tabs as $key => $setting ) {
		$order       += 10;
		$menu_items[] = (
		array(
			'parent'     => 'woocommerce-settings',
			'title'      => $setting,
			'capability' => 'manage_woocommerce',
			'id'         => 'settings-' . $key,
			'url'        => 'admin.php?page=wc-settings&tab=' . $key,
			'order'      => $order,
		)
		);
	}

	return $menu_items;
}