Automattic\WooCommerce\Admin\Features\Navigation

CoreMenu::get_tool_items()public staticWC 1.0

Get items for tools category.

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

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

Возвращает

Массив.

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

$result = CoreMenu::get_tool_items();

Код CoreMenu::get_tool_items() WC 7.1.0

public static function get_tool_items() {
	$tabs = array(
		'status' => __( 'System status', 'woocommerce' ),
		'tools'  => __( 'Utilities', 'woocommerce' ),
		'logs'   => __( 'Logs', 'woocommerce' ),
	);
	$tabs = apply_filters( 'woocommerce_admin_status_tabs', $tabs );

	$order = 1;
	$items = array(
		array(
			'parent'     => 'woocommerce-tools',
			'title'      => __( 'Import / Export', 'woocommerce' ),
			'capability' => 'import',
			'id'         => 'tools-import-export',
			'url'        => 'import.php',
			'migrate'    => false,
			'order'      => 0,
		),
	);

	foreach ( $tabs as $key => $tab ) {
		$items[] = array(
			'parent'     => 'woocommerce-tools',
			'title'      => $tab,
			'capability' => 'manage_woocommerce',
			'id'         => 'tools-' . $key,
			'url'        => 'wc-status&tab=' . $key,
			'order'      => $order,
		);
		$order++;
	}

	return $items;
}