Changeset 1260248
- Timestamp:
- 10/06/2015 09:11:11 AM (10 years ago)
- Location:
- ginger
- Files:
-
- 2 edited
-
tags/3.0.3/admin/ginger.utils.php (modified) (1 diff)
-
trunk/admin/ginger.utils.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ginger/tags/3.0.3/admin/ginger.utils.php
r1260246 r1260248 35 35 function ginger_add_admin_js( $hook ) { 36 36 if( is_admin() ) { 37 $page = $_GET["page"]; 38 if(substr($page, 0, 6) == "ginger"){ 39 // Add the color picker css file 40 wp_enqueue_style( 'wp-color-picker' ); 41 // Include our custom jQuery file with WordPress Color Picker dependency 42 wp_enqueue_script( 'ginger-script-handle', plugins_url( 'js/ginger.js', __FILE__ ), array(), false, true ); 43 wp_enqueue_script( 'ginger-script-color', plugins_url( 'js/ginger.color.js', __FILE__ ), array("wp-color-picker"), false, true ); 44 } 37 if(isset($_GET["page"])) { 38 $page = $_GET["page"]; 39 if ( substr( $page, 0, 6 ) == "ginger" ) { 40 // Add the color picker css file 41 wp_enqueue_style( 'wp-color-picker' ); 42 // Include our custom jQuery file with WordPress Color Picker dependency 43 wp_enqueue_script( 'ginger-script-handle', plugins_url( 'js/ginger.js', __FILE__ ), array(), false, true ); 44 wp_enqueue_script( 'ginger-script-color', plugins_url( 'js/ginger.color.js', __FILE__ ), array( "wp-color-picker" ), false, true ); 45 } 46 } 45 47 } 46 48 } -
ginger/trunk/admin/ginger.utils.php
r1260245 r1260248 35 35 function ginger_add_admin_js( $hook ) { 36 36 if( is_admin() ) { 37 $page = $_GET["page"]; 38 if(substr($page, 0, 6) == "ginger"){ 39 // Add the color picker css file 40 wp_enqueue_style( 'wp-color-picker' ); 41 // Include our custom jQuery file with WordPress Color Picker dependency 42 wp_enqueue_script( 'ginger-script-handle', plugins_url( 'js/ginger.js', __FILE__ ), array(), false, true ); 43 wp_enqueue_script( 'ginger-script-color', plugins_url( 'js/ginger.color.js', __FILE__ ), array("wp-color-picker"), false, true ); 44 } 37 if(isset($_GET["page"])) { 38 $page = $_GET["page"]; 39 if ( substr( $page, 0, 6 ) == "ginger" ) { 40 // Add the color picker css file 41 wp_enqueue_style( 'wp-color-picker' ); 42 // Include our custom jQuery file with WordPress Color Picker dependency 43 wp_enqueue_script( 'ginger-script-handle', plugins_url( 'js/ginger.js', __FILE__ ), array(), false, true ); 44 wp_enqueue_script( 'ginger-script-color', plugins_url( 'js/ginger.color.js', __FILE__ ), array( "wp-color-picker" ), false, true ); 45 } 46 } 45 47 } 46 48 }
Note: See TracChangeset
for help on using the changeset viewer.