twentyeleven_admin_enqueue_scripts

Properly enqueue styles and scripts for our theme options page.

Description

twentyeleven_admin_enqueue_scripts( $hook_suffix ); 

This function is attached to the admin_enqueue_scripts action hook.

Parameters (1)

0. $hook_suffix
The hook suffix.

Usage

  1. if ( !function_exists( 'twentyeleven_admin_enqueue_scripts' ) ) { 
  2. require_once '/inc/theme-options.php'; 
  3.  
  4. // The hook suffix. 
  5. $hook_suffix = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = twentyeleven_admin_enqueue_scripts($hook_suffix); 
  9.  

Defined (1)

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

/inc/theme-options.php  
  1. function twentyeleven_admin_enqueue_scripts( $hook_suffix ) { 
  2. wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' ); 
  3. wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-06-10' ); 
  4. wp_enqueue_style( 'farbtastic' );