load_scripts

The Google Custom Search load scripts function.

Description

load_scripts(); 

Usage

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

Defined (1)

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

/google-custom-search.php  
  1. function load_scripts() 
  2. global $gsc_plugin_dir_path, $gsc_hide_search_button; 
  3.  
  4. //Adding javascripts 
  5. wp_enqueue_script("jquery"); 
  6. wp_enqueue_script("jquery-ui-dialog"); 
  7. wp_enqueue_script("jquery-ui-resizable"); 
  8. wp_enqueue_script("jquery-ui-core"); 
  9. wp_enqueue_script("jquery-ui-draggable "); 
  10. wp_enqueue_script("jquery-ui-selectable "); 
  11. wp_enqueue_script('gsc_dialog', $gsc_plugin_dir_path . '/js/gsc.js'); 
  12. wp_enqueue_script('gsc_jsapi', 'http://www.google.com/jsapi'); 
  13.  
  14. //Adding CSS 
  15. wp_enqueue_style('gsc_style', $gsc_plugin_dir_path . '/css/smoothness/jquery-ui.theme.min.css'); 
  16. wp_enqueue_style('gsc_style_search_bar', 'http://www.google.com/cse/style/look/minimalist.css'); 
  17. wp_enqueue_style('gsc_style_search_bar_more', $gsc_plugin_dir_path . '/css/gsc.css'); 
  18. if (get_option($gsc_hide_search_button) == "yes") { 
  19. wp_enqueue_style('gsc_style_search_bar_even_more', $gsc_plugin_dir_path . '/css/gsc-no-search-button.css');