当前位置: 首页>>代码示例>>PHP>>正文


PHP shopp_enqueue_script函数代码示例

本文整理汇总了PHP中shopp_enqueue_script函数的典型用法代码示例。如果您正苦于以下问题:PHP shopp_enqueue_script函数的具体用法?PHP shopp_enqueue_script怎么用?PHP shopp_enqueue_script使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了shopp_enqueue_script函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Setup constructor
  *
  * @return voidtax
  * @author Jonathan Davis
  **/
 public function __construct()
 {
     parent::__construct();
     switch ($this->pagename) {
         case 'pages':
             shopp_enqueue_script('jquery-tmpl');
             shopp_enqueue_script('pageset');
             $this->pages_ui();
             break;
         case 'images':
             shopp_enqueue_script('jquery-tmpl');
             shopp_enqueue_script('imageset');
             shopp_localize_script('imageset', '$is', array('confirm' => __('Are you sure you want to remove this image preset?', 'Shopp')));
             $this->images_ui();
             break;
         case 'management':
             shopp_enqueue_script('jquery-tmpl');
             shopp_enqueue_script('labelset');
             shopp_localize_script('labelset', '$sl', array('prompt' => __('Are you sure you want to remove this order status label?', 'Shopp')));
             break;
         case 'core':
         case 'setup':
             shopp_enqueue_script('setup');
             break;
     }
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:32,代码来源:Setup.php

示例2: assets

 public function assets()
 {
     shopp_enqueue_script('jquery-tmpl');
     shopp_enqueue_script('shiprates');
     shopp_localize_script('shiprates', '$ps', array('confirm' => __('Are you sure you want to remove this shipping rate?', 'Shopp')));
     $this->nonce($this->request('page'));
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:7,代码来源:ShippingRates.php

示例3: assets

 public function assets()
 {
     shopp_enqueue_script('setup');
     shopp_localize_script('setup', '$ss', array('loading' => Shopp::__('Loading…'), 'prompt' => Shopp::__('Select your %s…', '%s')));
     shopp_enqueue_script('selectize');
     $this->nonce($this->request('page'));
 }
开发者ID:crunnells,项目名称:shopp,代码行数:7,代码来源:Setup.php

示例4: assets

 public function assets()
 {
     shopp_enqueue_script('ocupload');
     shopp_enqueue_script('jquery-tmpl');
     shopp_enqueue_script('taxrates');
     shopp_enqueue_script('suggest');
     shopp_localize_script('taxrates', '$tr', array('confirm' => __('Are you sure you want to remove this tax rate?', 'Shopp')));
 }
开发者ID:msigley,项目名称:shopp,代码行数:8,代码来源:Taxes.php

示例5: __construct

 /**
  * Setup constructor
  *
  * @return voidtax
  * @author Jonathan Davis
  **/
 public function __construct()
 {
     parent::__construct();
     switch ($this->pagename) {
         case 'taxes':
             shopp_enqueue_script('ocupload');
             shopp_enqueue_script('jquery-tmpl');
             shopp_enqueue_script('taxrates');
             shopp_enqueue_script('suggest');
             shopp_localize_script('taxrates', '$tr', array('confirm' => __('Are you sure you want to remove this tax rate?', 'Shopp')));
             $this->subscreens = array('rates' => __('Rates', 'Shopp'), 'settings' => __('Settings', 'Shopp'));
             if (isset($_GET['sub'])) {
                 $this->url = add_query_arg(array('sub' => esc_attr($_GET['sub'])), $this->url);
             } else {
                 $_GET['sub'] = shopp_setting_enabled('taxes') ? 'rates' : 'settings';
             }
             if (shopp_setting_enabled('taxes')) {
                 $this->taxrate_ui();
             }
             break;
         case 'advanced':
             shopp_enqueue_script('colorbox');
             shopp_enqueue_script('system');
             shopp_localize_script('system', '$sys', array('indexing' => __('Product Indexing', 'Shopp'), 'indexurl' => wp_nonce_url(add_query_arg('action', 'shopp_rebuild_search_index', admin_url('admin-ajax.php')), 'wp_ajax_shopp_rebuild_search_index')));
             break;
         case 'storage':
             shopp_enqueue_script('jquery-tmpl');
             shopp_enqueue_script('storage');
             break;
         case 'shipping':
             shopp_enqueue_script('jquery-tmpl');
             shopp_enqueue_script('shiprates');
             shopp_localize_script('shiprates', '$ps', array('confirm' => __('Are you sure you want to remove this shipping rate?', 'Shopp')));
             $this->subscreens = array('rates' => __('Rates', 'Shopp'), 'settings' => __('Settings', 'Shopp'));
             if (isset($_GET['sub'])) {
                 $this->url = add_query_arg(array('sub' => esc_attr($_GET['sub'])), $this->url);
             } else {
                 $_GET['sub'] = shopp_setting_enabled('taxes') ? 'rates' : 'settings';
             }
             if (shopp_setting_enabled('shipping')) {
                 $this->shipping_ui();
             }
             break;
         case 'payments':
         default:
             shopp_enqueue_script('jquery-tmpl');
             shopp_enqueue_script('payments');
             shopp_localize_script('payments', '$ps', array('confirm' => __('Are you sure you want to remove this payment system?', 'Shopp')));
             add_action("load-{$this->screen}", array($this, 'payments_help'), 20);
             $this->payments_ui();
             break;
     }
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:59,代码来源:System.php

示例6: __construct

 /**
  * Store constructor
  *
  * @author Jonathan Davis
  * @since 1.1
  * @version 1.2
  *
  * @return void
  **/
 public function __construct()
 {
     parent::__construct();
     Shopping::restore('worklist', $this->worklist);
     if ('off' == shopp_setting('inventory')) {
         array_splice($this->views, 4, 1);
     }
     if (isset($_GET['view']) && in_array($_GET['view'], $this->views)) {
         $this->view = $_GET['view'];
     }
     if (get_current_screen()) {
         get_current_screen()->post_type = ShoppProduct::$posttype;
     }
     if (!empty($_GET['id'])) {
         wp_enqueue_script('jquery-ui-draggable');
         wp_enqueue_script('postbox');
         wp_enqueue_script('wp-lists');
         if (user_can_richedit()) {
             wp_enqueue_script('editor');
             wp_enqueue_script('quicktags');
             add_action('admin_print_footer_scripts', 'wp_tiny_mce', 20);
         }
         shopp_enqueue_script('colorbox');
         shopp_enqueue_script('editors');
         shopp_enqueue_script('scalecrop');
         shopp_enqueue_script('calendar');
         shopp_enqueue_script('product-editor');
         shopp_enqueue_script('priceline');
         shopp_enqueue_script('ocupload');
         shopp_enqueue_script('swfupload');
         shopp_enqueue_script('jquery-tmpl');
         shopp_enqueue_script('suggest');
         shopp_enqueue_script('search-select');
         do_action('shopp_product_editor_scripts');
         add_action('admin_head', array(&$this, 'layout'));
     } else {
         add_action('load-' . $this->screen, array($this, 'loader'));
         add_action('admin_print_scripts', array($this, 'columns'));
     }
     if ('inventory' == $this->view && shopp_setting_enabled('inventory')) {
         do_action('shopp_inventory_manager_scripts');
     }
     add_action('load-' . $this->screen, array($this, 'workflow'));
     do_action('shopp_product_admin_scripts');
     new ContentParser();
     add_action('shopp_product_saved', array($this, 'index'), 99, 1);
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:56,代码来源:Warehouse.php

示例7: __construct

 /**
  * Promote constructor
  *
  * @return void
  * @author Jonathan Davis
  **/
 public function __construct()
 {
     parent::__construct();
     $this->save();
     if (!empty($_GET['id'])) {
         wp_enqueue_script('postbox');
         shopp_enqueue_script('colorbox');
         shopp_enqueue_script('calendar');
         shopp_enqueue_script('suggest');
         do_action('shopp_promo_editor_scripts');
         add_action('admin_head', array($this, 'layout'));
     } else {
         add_action('admin_print_scripts', array($this, 'columns'));
     }
     do_action('shopp_promo_admin_scripts');
     // @deprecated
     do_action('shopp_admin_discount_scripts');
     $defaults = array('page' => false, 'action' => false, 'selected' => array());
     $args = array_merge($defaults, $_GET);
     extract($args, EXTR_SKIP);
     if (!is_array($selected)) {
         $selected = array($selected);
     }
     $url = add_query_arg(array_merge($_GET, array('page' => $this->page)), admin_url('admin.php'));
     $f = array('action', 'selected', 's');
     if ($this->page == $page && !empty($action)) {
         switch ($action) {
             case 'enable':
                 ShoppPromo::enableset($selected);
                 break;
             case 'disable':
                 ShoppPromo::disableset($selected);
                 break;
             case 'delete':
                 ShoppPromo::deleteset($selected);
                 break;
             case 'duplicate':
                 $P = new ShoppPromo($selected[0]);
                 $P->duplicate();
                 break;
         }
         $url = remove_query_arg($f, $url);
         wp_redirect($url);
         exit;
     }
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:52,代码来源:Discounter.php

示例8: __construct

 /**
  * Categorize constructor
  *
  * @return void
  * @author Jonathan Davis
  **/
 public function __construct()
 {
     parent::__construct();
     Shopping::restore('worklist', $this->worklist);
     if ('shopp-tags' == $_GET['page']) {
         wp_redirect(add_query_arg(array('taxonomy' => ProductTag::$taxon), admin_url('edit-tags.php')));
         return;
     }
     if (!empty($_GET['id']) && !isset($_GET['a'])) {
         wp_enqueue_script('postbox');
         wp_enqueue_script('swfupload-all');
         if (user_can_richedit()) {
             wp_enqueue_script('editor');
             wp_enqueue_script('quicktags');
             add_action('admin_print_footer_scripts', 'wp_tiny_mce', 20);
         }
         shopp_enqueue_script('colorbox');
         shopp_enqueue_script('editors');
         shopp_enqueue_script('category-editor');
         shopp_enqueue_script('priceline');
         shopp_enqueue_script('ocupload');
         shopp_enqueue_script('swfupload');
         shopp_enqueue_script('shopp-swfupload-queue');
         do_action('shopp_category_editor_scripts');
         add_action('admin_head', array($this, 'layout'));
     } elseif (!empty($_GET['a']) && $_GET['a'] == 'arrange') {
         shopp_enqueue_script('category-arrange');
         do_action('shopp_category_arrange_scripts');
         add_action('admin_print_scripts', array($this, 'arrange_cols'));
     } elseif (!empty($_GET['a']) && $_GET['a'] == 'products') {
         shopp_enqueue_script('products-arrange');
         do_action('shopp_category_products_arrange_scripts');
         add_action('admin_print_scripts', array($this, 'products_cols'));
     } else {
         add_action('admin_print_scripts', array($this, 'columns'));
     }
     do_action('shopp_category_admin_scripts');
     add_action('load-' . $this->screen, array($this, 'workflow'));
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:45,代码来源:Categorize.php

示例9: __construct

 /**
  * Constructor
  *
  * Includes the client-side libraries needed for rendering the chart
  *
  * @author Jonathan Davis
  * @since 1.3
  *
  * @return void
  **/
 public function __construct()
 {
     shopp_enqueue_script('flot');
     shopp_enqueue_script('flot-time');
     shopp_enqueue_script('flot-grow');
 }
开发者ID:msigley,项目名称:shopp,代码行数:16,代码来源:Reports.php

示例10: assets

 public function assets()
 {
     shopp_enqueue_script('colorbox');
     shopp_enqueue_script('system');
     shopp_localize_script('system', '$sys', array('indexing' => __('Product Indexing', 'Shopp'), 'indexurl' => wp_nonce_url(add_query_arg('action', 'shopp_rebuild_search_index', admin_url('admin-ajax.php')), 'wp_ajax_shopp_rebuild_search_index')));
 }
开发者ID:msigley,项目名称:shopp,代码行数:6,代码来源:Advanced.php

示例11: assets

 /**
  * Enqueue the scripts
  *
  * @since 1.4
  *
  * @return void
  **/
 public function assets()
 {
     wp_enqueue_script('postbox');
     shopp_enqueue_script('colorbox');
     shopp_enqueue_script('jquery-tmpl');
     shopp_enqueue_script('selectize');
     shopp_enqueue_script('orders');
     shopp_custom_script('orders', 'var address = [], carriers = ' . json_encode($this->shipcarriers()) . ';');
     shopp_localize_script('orders', '$om', array('co' => Shopp::__('Cancel Order'), 'mr' => Shopp::__('Mark Refunded'), 'pr' => Shopp::__('Process Refund'), 'dnc' => Shopp::__('Do Not Cancel'), 'ro' => Shopp::__('Refund Order'), 'cancel' => Shopp::__('Cancel'), 'rr' => Shopp::__('Reason for refund'), 'rc' => Shopp::__('Reason for cancellation'), 'mc' => Shopp::__('Mark Cancelled'), 'stg' => Shopp::__('Send to gateway')));
     shopp_enqueue_script('address');
     shopp_custom_script('address', 'var regions = ' . json_encode(ShoppLookup::country_zones()) . ';');
     do_action('shopp_order_management_scripts');
 }
开发者ID:msigley,项目名称:shopp,代码行数:20,代码来源:Orders.php

示例12: assets

 public function assets()
 {
     wp_enqueue_script('postbox');
     shopp_enqueue_script('colorbox');
     shopp_enqueue_script('calendar');
     shopp_enqueue_script('suggest');
     do_action('shopp_promo_editor_scripts');
 }
开发者ID:msigley,项目名称:shopp,代码行数:8,代码来源:Discounts.php

示例13: columns

 /**
  * Registers the column headers for the orders list interface
  *
  * Uses the WordPress 2.7 function register_column_headers to provide
  * customizable columns that can be toggled to show or hide
  *
  * @author Jonathan Davis
  * @return void
  **/
 public function columns()
 {
     shopp_enqueue_script('calendar');
     shopp_enqueue_script('daterange');
     register_column_headers($this->screen, array('cb' => '<input type="checkbox" />', 'order' => __('Order', 'Shopp'), 'name' => __('Name', 'Shopp'), 'destination' => __('Destination', 'Shopp'), 'txn' => __('Transaction', 'Shopp'), 'date' => __('Date', 'Shopp'), 'total' => __('Total', 'Shopp')));
 }
开发者ID:jonathandavis,项目名称:shopp,代码行数:15,代码来源:Service.php

示例14: columns

 /**
  * Registers the column headers for the customer list screen
  *
  * @author Jonathan Davis
  * @return void
  **/
 public function columns()
 {
     shopp_enqueue_script('calendar');
     shopp_enqueue_script('daterange');
     register_column_headers($this->screen, array('cb' => '<input type="checkbox" />', 'customer-name' => __('Name', 'Shopp'), 'customer-login' => __('Login', 'Shopp'), 'email' => __('Email', 'Shopp'), 'customer-location' => __('Location', 'Shopp'), 'customer-orders' => __('Orders', 'Shopp'), 'customer-joined' => __('Joined', 'Shopp')));
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:12,代码来源:Account.php

示例15: behaviors

 /**
  * Dynamically includes necessary JavaScript and stylesheets for the admin
  *
  * @author Jonathan Davis
  * @since 1.0
  *
  * @return void
  **/
 public function behaviors()
 {
     global $wp_version, $hook_suffix;
     if (!in_array($hook_suffix, $this->menus)) {
         return;
     }
     $this->styles();
     shopp_enqueue_script('shopp');
     $settings = array_filter(array_keys($this->pages), array($this, 'get_settings_pages'));
     if (in_array($this->Page->page, $settings)) {
         shopp_enqueue_script('settings');
     }
 }
开发者ID:borkweb,项目名称:shopp,代码行数:21,代码来源:Admin.php


注:本文中的shopp_enqueue_script函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。