onetone_admin_scripts

The Onetone onetone admin scripts function.

Description

onetone_admin_scripts(); 

Usage

  1. if ( !function_exists( 'onetone_admin_scripts' ) ) { 
  2. require_once '/includes/theme-setup.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = onetone_admin_scripts(); 
  7.  

Defined (1)

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

/includes/theme-setup.php  
  1. function onetone_admin_scripts() { 
  2.  
  3. global $pagenow , $onetone_options_saved, $onetone_options, $onetone_default_options, $onetone_option_name; 
  4.  
  5. $theme_info = wp_get_theme(); 
  6.  
  7. wp_enqueue_style( 'onetone-admin', get_template_directory_uri().'/css/admin.css', false, $theme_info->get( 'Version' ), false); 
  8.  
  9.  
  10. if( $pagenow == "post.php" || $pagenow == "post-new.php" || (isset($_GET['page']) && $_GET['page'] == "onetone-options") ): 
  11. wp_enqueue_style('font-awesome', get_template_directory_uri() .'/plugins/font-awesome/css/font-awesome.min.css', false, '4.4.0', false); 
  12. wp_enqueue_style('onetone-options', get_template_directory_uri() .'/css/options.css', false, $theme_info->get( 'Version' ), false); 
  13. endif; 
  14.  
  15. wp_enqueue_script( 'onetone-admin', get_template_directory_uri().'/js/admin.js', array( 'jquery' ), $theme_info->get( 'Version' ), false ); 
  16.  
  17. wp_localize_script( 'onetone-admin', 'onetone_params', array( 
  18. 'ajaxurl' => admin_url('admin-ajax.php'),  
  19. 'themeurl' => get_template_directory_uri(),  
  20. 'options_saved' => $onetone_options_saved,  
  21. 'option_name' => $onetone_option_name,  
  22. ) ); 
  23.