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


PHP ProductCategory::load_meta方法代码示例

本文整理汇总了PHP中ProductCategory::load_meta方法的典型用法代码示例。如果您正苦于以下问题:PHP ProductCategory::load_meta方法的具体用法?PHP ProductCategory::load_meta怎么用?PHP ProductCategory::load_meta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ProductCategory的用法示例。


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

示例1: load

 public function load()
 {
     if ($this->request('new')) {
         $Category = new ProductCategory();
     } else {
         $Category = new ProductCategory($this->request('id'));
     }
     $meta = array('specs', 'priceranges', 'options', 'prices');
     foreach ($meta as $prop) {
         if (!isset($Category->{$prop})) {
             $Category->{$prop} = array();
         }
     }
     // $Category = ShoppCollection();
     // if ( empty($Category) ) $Category = new ProductCategory();
     $Category->load_meta();
     $Category->load_images();
     return $Category;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:19,代码来源:Categories.php

示例2: load_options_template

 public function load_options_template()
 {
     check_admin_referer('wp_ajax_shopp_options_template');
     $Category = new ProductCategory((int) $_GET['category']);
     $Category->load_meta();
     $result = new stdClass();
     $result->options = $Category->options;
     $result->prices = $Category->prices;
     echo json_encode($result);
     exit;
 }
开发者ID:msigley,项目名称:shopp,代码行数:11,代码来源:Ajax.php

示例3: editor

 /**
  * Interface processor for the category editor
  *
  * @author Jonathan Davis
  * @since 1.0
  * @return void
  **/
 public function editor()
 {
     global $CategoryImages;
     $Shopp = Shopp::object();
     if (!current_user_can('shopp_categories')) {
         wp_die(__('You do not have sufficient permissions to access this page.'));
     }
     $Category = ShoppCollection();
     if (empty($Category)) {
         $Category = new ProductCategory();
     }
     $Category->load_meta();
     $Category->load_images();
     $Price = new ShoppPrice();
     $priceTypes = ShoppPrice::types();
     $billPeriods = ShoppPrice::periods();
     // Build permalink for slug editor
     $permalink = trailingslashit(Shopp::url()) . "category/";
     $Category->slug = apply_filters('editable_slug', $Category->slug);
     $pricerange_menu = array("disabled" => __('Price ranges disabled', 'Shopp'), "auto" => __('Build price ranges automatically', 'Shopp'), "custom" => __('Use custom price ranges', 'Shopp'));
     $uploader = shopp_setting('uploader_pref');
     if (!$uploader) {
         $uploader = 'flash';
     }
     $workflows = array("continue" => __('Continue Editing', 'Shopp'), "close" => __('Categories Manager', 'Shopp'), "new" => __('New Category', 'Shopp'), "next" => __('Edit Next', 'Shopp'), "previous" => __('Edit Previous', 'Shopp'));
     do_action('add_meta_boxes', ProductCategory::$taxon, $Category);
     do_action('add_meta_boxes_' . ProductCategory::$taxon, $Category);
     do_action('do_meta_boxes', ProductCategory::$taxon, 'normal', $Category);
     do_action('do_meta_boxes', ProductCategory::$taxon, 'advanced', $Category);
     do_action('do_meta_boxes', ProductCategory::$taxon, 'side', $Category);
     include $this->ui('category.php');
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:39,代码来源:Categorize.php


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