gl_init_settings
The WordPress Core gl init settings function.
Description
gl_init_settings();
Usage
if ( !function_exists( 'gl_init_settings' ) ) { require_once '/admin/init.php'; } // NOTICE! Understand what this does before running. $result = gl_init_settings();
Defined (1)
The function is defined in the following location(s).
- /admin/init.php
- function gl_init_settings( ) {
- // Load jQuery First
- wp_enqueue_script( 'jquery' );
- // CSS
- wp_deregister_style( 'gl_css' );
- wp_register_style( 'gl_css', G_LOCKER_PLUGIN_URL . '/assets/css/gl.css' );
- wp_enqueue_style( 'gl_css' );
- // Show color picker for some color option. Example: Title Color, Shadow Color
- if ( is_admin() ) {
- // Jquery UI
- wp_enqueue_script( 'jquery-ui', 'https://code.jquery.com/jquery-1.10.2.js');
- wp_enqueue_script( 'jquery-ui', 'https://code.jquery.com/ui/1.11.2/jquery-ui.js');
- wp_enqueue_style( 'jquery-ui', 'https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css' );
- // Color Picker for color options
- wp_enqueue_style( 'wp-color-picker' );
- wp_enqueue_script( 'gl-custom-script-handle', G_LOCKER_PLUGIN_URL . '/assets/js/gl-wp-color-picker.js', array(
- 'wp-color-picker'
- ), false, true );
- }
- }