optionsframework_load_scripts

Loads the javascript.

Description

optionsframework_load_scripts( $hook ); 

Parameters (1)

0. $hook
The hook.

Usage

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

Defined (1)

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

/admin/options-framework/options-framework.php  
  1. function optionsframework_load_scripts($hook) { 
  2.  
  3. if ( 'appearance_page_options-framework' != $hook ) 
  4. return; 
  5.  
  6. // Enqueued scripts 
  7. wp_enqueue_script('jquery-ui-core'); 
  8. wp_enqueue_script('color-picker', OPTIONS_FRAMEWORK_DIRECTORY.'js/colorpicker.js', array('jquery')); 
  9. wp_enqueue_script('options-custom', OPTIONS_FRAMEWORK_DIRECTORY.'js/options-custom.js', array('jquery')); 
  10.  
  11. // Inline scripts from options-interface.php 
  12. add_action('admin_head', 'of_admin_head');