gl_init_settings

The Google Locker for WordPress gl init settings function.

Description

gl_init_settings(); 

Usage

  1. if ( !function_exists( 'gl_init_settings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-locker-for-wordpress/admin/init.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gl_init_settings(); 
  7.  

Defined (1)

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

/admin/init.php  
  1. function gl_init_settings( ) { 
  2. // Load jQuery First 
  3. wp_enqueue_script( 'jquery' ); 
  4.  
  5. // CSS 
  6. wp_deregister_style( 'gl_css' ); 
  7. wp_register_style( 'gl_css', G_LOCKER_PLUGIN_URL . '/assets/css/gl.css' ); 
  8. wp_enqueue_style( 'gl_css' ); 
  9.  
  10. // Show color picker for some color option. Example: Title Color, Shadow Color 
  11. if ( is_admin() ) { 
  12. // Jquery UI 
  13. wp_enqueue_script( 'jquery-ui', 'https://code.jquery.com/jquery-1.10.2.js'); 
  14. wp_enqueue_script( 'jquery-ui', 'https://code.jquery.com/ui/1.11.2/jquery-ui.js'); 
  15. wp_enqueue_style( 'jquery-ui', 'https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css' ); 
  16.  
  17. // Color Picker for color options 
  18. wp_enqueue_style( 'wp-color-picker' ); 
  19. wp_enqueue_script( 'gl-custom-script-handle', G_LOCKER_PLUGIN_URL . '/assets/js/gl-wp-color-picker.js', array( 
  20. 'wp-color-picker'  
  21. ), false, true );