WordPress.org

Plugin Directory


Ignore:
Timestamp:
11/10/15 09:38:32 (2 years ago)
Author:
seuser
Message:

Update ordered list formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wpec-targetpay-for-wp-e-commerce/trunk/classes/wpscTargetpay.class.php

    r1272898 r1283158  
    7474        //setup js 
    7575        wp_register_script( 'magnificPopupJs', plugins_url( '../assets/js/magnific-popup.min.js', __FILE__ ) ); 
     76         
     77        //enqueue wp core scripts for colour picker 
     78        add_action( 'admin_enqueue_scripts', array( $this, 'wpscTargetpayColorPicker' ) ); 
    7679 
    7780    } 
     
    591594                case 'true_false'; 
    592595                    $return .= '<input type="hidden" name="'.$key.'" value="0" />'; 
    593                     $return .= '<input type="checkbox" name="'.$key.'" value="1" '.( $options && $options[$key] ? 'checked="checked"' : '' ).' />'; 
     596                    $return .= '<input type="checkbox" name="'.$key.'" id="'.$key.'" value="1" '.( $options && $options[$key] ? 'checked="checked"' : '' ).' />'; 
    594597                    break; 
    595598                default: 
     
    629632    } 
    630633 
     634    /** 
     635     * Enqueue colour picker scripts. 
     636     */ 
     637    public function wpscTargetpayColorPicker() { 
     638 
     639        if ( is_admin() ) { 
     640            wp_enqueue_style( 'wp-color-picker' );  
     641            wp_enqueue_script( 'wp-e-commerce-targetpay-color-picker', plugins_url( '../assets/js/color-picker.js', __FILE__ ), array( 'wp-color-picker' ), false, true );  
     642        } 
     643         
     644    } 
     645 
    631646} 
Note: See TracChangeset for help on using the changeset viewer.