示例#1
0
 function scripts()
 {
     wp_enqueue_style('css3colorpicker', PL_JS . '/colorpicker/colorpicker.css');
     pl_enqueue_codemirror();
     // PageLines Specific JS @Code Stuff
     wp_enqueue_script('pl-less-parser', PL_JS . '/utils.less.js', array('jquery'), pl_get_cache_key(), true);
     wp_enqueue_script('pl-js-code', $this->url . '/js/pl.code.js', array('jquery', 'codemirror', 'pl-less-parser'), pl_get_cache_key(), true);
     // less.js
     $lessjs_config = array('env' => is_pl_debug() ? 'development' : 'production');
     wp_localize_script('pl-less-parser', 'less', $lessjs_config);
 }
示例#2
0
function pagelines_theme_settings_scripts()
{
    wp_enqueue_script('pl-library', PL_PARENT_URL . '/editor/js/pl.library.js', array('jquery'), pl_get_cache_key());
    wp_enqueue_script('pagelines-admin', PL_JS . '/admin.pagelines.js', array('jquery', 'pl-library'), pl_get_cache_key());
    pl_enqueue_codemirror();
}