WC_Brands_Admin::scripts()
Enqueue scripts.
Метод класса: WC_Brands_Admin{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Brands_Admin = new WC_Brands_Admin(); $WC_Brands_Admin->scripts();
Код WC_Brands_Admin::scripts() WC Brands Admin::scripts WC 9.4.2
public function scripts() { $screen = get_current_screen(); $version = Constants::get_constant( 'WC_VERSION' ); $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; if ( 'edit-product' === $screen->id ) { wp_register_script( 'wc-brands-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-brands-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo', 'wc-enhanced-select', 'wp-api' ), $version, true ); wp_localize_script( 'wc-brands-enhanced-select', 'wc_brands_enhanced_select_params', array( 'ajax_url' => get_rest_url() . 'brands/search' ) ); wp_enqueue_script( 'wc-brands-enhanced-select' ); } if ( in_array( $screen->id, array( 'edit-product_brand' ), true ) ) { wp_enqueue_media(); wp_enqueue_style( 'woocommerce_admin_styles' ); } }