當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。