本文整理汇总了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;
}
示例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;
}
示例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');
}