Example #1
0
<?php

/**
 *  @name              WYSIWYG Editor
 *  @description       Professional WYSIWYG editor. Usage: put the class beautyeditor in the textareas that you want to enhance.
 *  @author            Vinicius Tavares <*****@*****.**>
 *  @plugin_url        http://www.xenon-corporation.com/yogo/plugin/wysiywg
 *  @plugin_sysname    wysiywg
 *  @plugin_version    1.0.0
 *  @_textdomain       wysiywg
 *  @_domainpath       /languages/
 */
$urlpath = get_plugin_url(__FILE__);
yg_register_style('wysiwyg', $urlpath . 'lib/css/redactor.css');
yg_register_script('wysiwyg-core', $urlpath . 'lib/js/redactor.min.js', array(), true);
yg_register_script('wysiwyg-init', $urlpath . 'lib/js/redactor-init.js', array(), true);
yg_enqueue_style('wysiwyg');
yg_enqueue_script('wysiwyg-core');
yg_enqueue_script('wysiwyg-init');
Example #2
0
 function wpsc_gold_cart_scripts()
 {
     global $wpsc_gc_view_mode;
     $vars = array();
     if (!wp_script_is('jquery-query', 'registered')) {
         wp_register_script('jquery-query', get_plugin_url() . '/js/jquery.query.js', array('jquery'), '2.1.7');
     }
     if (get_option('show_gallery') && get_option('show_thumbnails_thickbox')) {
         if (wp_script_is('wpsc-thickbox', 'registered')) {
             $deps = 'wpsc-thickbox';
         } else {
             wp_enqueue_script('wpsc-thickbox', WPSC_CORE_JS_URL . '/thickbox.js', array('jquery'), 'Instinct_e-commerce');
         }
         $vars['thickboxFix'] = true;
     }
     $deps = array('jquery', 'jquery-query');
     if (get_option('show_search') == 1 && get_option('show_live_search') == 1) {
         if ((double) WPSC_VERSION < 3.8) {
             $siteurl = get_option('siteurl');
             if (is_ssl()) {
                 $siteurl = str_replace("http://", "https://", $siteurl);
             }
             $deps[] = 'wpsc-iautocompleter';
             wp_enqueue_script('wpsc-iautocompleter', "{$site_url}/wp-content/plugins/" . WPSC_DIR_NAME . '/js/iautocompleter.js', array('jquery'));
         }
     }
     wp_enqueue_script('wpsc-gold-cart', get_plugin_url() . '/js/gold_cart.js', $deps);
     $vars['displayMode'] = $wpsc_gc_view_mode;
     if ($wpsc_gc_view_mode == 'grid') {
         $vars['itemsPerRow'] = get_option('grid_number_per_row');
     }
     $product_list_classes = array('grid' => apply_filters('wpsc_gc_product_grid_class', 'product_grid_display'), 'list' => apply_filters('wpsc_gc_product_list_class', 'list_productdisplay'), 'default' => apply_filters('wpsc_gc_product_default_class', 'wpsc_default_product_list'));
     $vars['productListClass'] = $product_list_classes[$wpsc_gc_view_mode];
     wp_localize_script('wpsc-gold-cart', 'WPSC_GoldCart', $vars);
 }