Plugin Directory

Changeset 1260248


Ignore:
Timestamp:
10/06/2015 09:11:11 AM (10 years ago)
Author:
manafactory
Message:

fixed yoast compatibility

Location:
ginger
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ginger/tags/3.0.3/admin/ginger.utils.php

    r1260246 r1260248  
    3535function ginger_add_admin_js( $hook ) {
    3636    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        }
    4547    }
    4648}
  • ginger/trunk/admin/ginger.utils.php

    r1260245 r1260248  
    3535function ginger_add_admin_js( $hook ) {
    3636    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        }
    4547    }
    4648}
Note: See TracChangeset for help on using the changeset viewer.