WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Admin

Loader::register_scripts() public WC 1.0

Registers all the neccessary scripts and styles to show the admin experience.

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

Хуков нет.

Возвращает

Null. Ничего.

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

$result = Loader::register_scripts();

Код Loader::register_scripts() WC 4.7.0

<?php
public static function register_scripts() {
	if ( ! function_exists( 'wp_set_script_translations' ) ) {
		return;
	}

	$js_file_version  = self::get_file_version( 'js' );
	$css_file_version = self::get_file_version( 'css' );

	wp_register_script(
		'wc-csv',
		self::get_url( 'csv-export/index', 'js' ),
		array( 'moment' ),
		$js_file_version,
		true
	);

	wp_register_script(
		'wc-currency',
		self::get_url( 'currency/index', 'js' ),
		array( 'wc-number' ),
		$js_file_version,
		true
	);

	wp_set_script_translations( 'wc-currency', 'woocommerce' );

	wp_register_script(
		'wc-navigation',
		self::get_url( 'navigation/index', 'js' ),
		array(),
		$js_file_version,
		true
	);

	wp_register_script(
		'wc-number',
		self::get_url( 'number/index', 'js' ),
		array(),
		$js_file_version,
		true
	);

	wp_register_script(
		'wc-tracks',
		self::get_url( 'tracks/index', 'js' ),
		array(),
		$js_file_version,
		true
	);

	wp_register_script(
		'wc-date',
		self::get_url( 'date/index', 'js' ),
		array( 'moment', 'wp-date', 'wp-i18n' ),
		$js_file_version,
		true
	);

	wp_register_script(
		'wc-store-data',
		self::get_url( 'data/index', 'js' ),
		array(),
		$js_file_version,
		true
	);

	wp_set_script_translations( 'wc-date', 'woocommerce' );

	wp_register_script(
		'wc-components',
		self::get_url( 'components/index', 'js' ),
		array(
			'moment',
			'wp-api-fetch',
			'wp-data',
			'wp-data-controls',
			'wp-element',
			'wp-hooks',
			'wp-html-entities',
			'wp-i18n',
			'wp-keycodes',
			'wc-csv',
			'wc-currency',
			'wc-date',
			'wc-navigation',
			'wc-number',
			'wc-store-data',
		),
		$js_file_version,
		true
	);

	wp_set_script_translations( 'wc-components', 'woocommerce' );

	wp_register_style(
		'wc-components',
		self::get_url( 'components/style', 'css' ),
		array(),
		$css_file_version
	);
	wp_style_add_data( 'wc-components', 'rtl', 'replace' );

	wp_register_style(
		'wc-components-ie',
		self::get_url( 'components/ie', 'css' ),
		array(),
		$css_file_version
	);
	wp_style_add_data( 'wc-components-ie', 'rtl', 'replace' );

	wp_register_script(
		WC_ADMIN_APP,
		self::get_url( 'app/index', 'js' ),
		array(
			'wp-core-data',
			'wc-components',
			'wp-date',
			'wc-tracks',
		),
		$js_file_version,
		true
	);
	wp_localize_script(
		WC_ADMIN_APP,
		'wcAdminAssets',
		array(
			'path' => plugins_url( self::get_path( 'js' ), WC_ADMIN_PLUGIN_FILE ),
		)
	);

	wp_set_script_translations( WC_ADMIN_APP, 'woocommerce' );

	// The "app" RTL files are in a different format than the components.
	$rtl = is_rtl() ? '.rtl' : '';

	wp_register_style(
		WC_ADMIN_APP,
		self::get_url( "app/style{$rtl}", 'css' ),
		array( 'wc-components' ),
		$css_file_version
	);

	wp_register_style(
		'wc-admin-ie',
		self::get_url( "ie/style{$rtl}", 'css' ),
		array( WC_ADMIN_APP ),
		$css_file_version
	);

	wp_register_style(
		'wc-material-icons',
		'https://fonts.googleapis.com/icon?family=Material+Icons+Outlined',
		array(),
		$css_file_version
	);
}