woosample_add_scripts

Enqueue plugin style-file.

Description

woosample_add_scripts(); 

Usage

  1. if ( !function_exists( 'woosample_add_scripts' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-sample/woocommerce-sample.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = woosample_add_scripts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-sample.php  
  1. function woosample_add_scripts() { 
  2. // Respects SSL, style-admin.css is relative to the current file 
  3. wp_register_style( 'woosample-styles', plugins_url('css/style-admin.css', __FILE__) ); 
  4. wp_register_script( 'woosample-scripts', plugins_url('js/woocommerce-sample.js', __FILE__), array('jquery') ); 
  5. wp_enqueue_style( 'woosample-styles' ); 
  6. wp_enqueue_script( 'woosample-scripts' );