本文整理汇总了PHP中wc_get_attribute_taxonomy_names函数的典型用法代码示例。如果您正苦于以下问题:PHP wc_get_attribute_taxonomy_names函数的具体用法?PHP wc_get_attribute_taxonomy_names怎么用?PHP wc_get_attribute_taxonomy_names使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wc_get_attribute_taxonomy_names函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: color_layered_nav_init
public function color_layered_nav_init()
{
if (!is_active_widget(false, false, 'woocommerce_layered_nav', true) && !is_admin()) {
global $_chosen_attributes;
$_chosen_attributes = array();
$attribute_taxonomies = wc_get_attribute_taxonomies();
if ($attribute_taxonomies) {
foreach ($attribute_taxonomies as $tax) {
if ($tax->attribute_name == "color") {
$attribute = wc_sanitize_taxonomy_name($tax->attribute_name);
$taxonomy = wc_attribute_taxonomy_name($attribute);
$name = 'filter_' . $attribute;
$query_type_name = 'query_type_' . $attribute;
$taxonomy_exists = in_array($taxonomy, wc_get_attribute_taxonomy_names());
if (!empty($_GET[$name]) && $taxonomy_exists) {
$_chosen_attributes[$taxonomy]['terms'] = explode(',', $_GET[$name]);
if (empty($_GET[$query_type_name]) || !in_array(strtolower($_GET[$query_type_name]), array('and', 'or'))) {
$_chosen_attributes[$taxonomy]['query_type'] = apply_filters('woocommerce_layered_nav_default_query_type', 'and');
} else {
$_chosen_attributes[$taxonomy]['query_type'] = strtolower($_GET[$query_type_name]);
}
}
}
}
}
$wc_query = new WC_Query();
add_filter('loop_shop_post_in', array($wc_query, 'layered_nav_query'));
}
}
开发者ID:mynein,项目名称:myne,代码行数:29,代码来源:wd_product_color.php
示例2: init_trigger
protected function init_trigger()
{
if ($this->woo_ready == false) {
return;
}
global $woocommerce, $_wd_msg;
$_color = 'color';
$attribute_name = isset($_color) ? woocommerce_sanitize_taxonomy_name(stripslashes((string) $_color)) : '';
$attribute_name = wc_attribute_taxonomy_name($attribute_name);
$attribute_name_array = wc_get_attribute_taxonomy_names();
//$taxonomy_exists = taxonomy_exists( wc_attribute_taxonomy_name( $attribute_name ) );
$taxonomy_exists = in_array($attribute_name, $attribute_name_array);
/**************** Check if attribute available ****************/
$this->tax_slug = '';
if (!$taxonomy_exists) {
$this->color_ready = false;
$_wd_msg = "<strong>Color attribute is not exist.</strong>.Go to Products => Attributes,create new attibute with slug <strong>color</strong>";
add_action('admin_notices', array($this, 'show_msg'));
} else {
$this->color_ready = true;
add_image_size('wd_pc_thumb', 30, 30, true);
$_tax_slug = wc_attribute_taxonomy_name($attribute_name);
$this->tax_slug = $_tax_slug;
$this->init_script();
$this->init_handle();
}
}
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:27,代码来源:wd_product_color.php
示例3: constant
function constant()
{
$this->attr_slug = '';
$attribute_name = wc_attribute_taxonomy_name($this->term_slug);
$attribute_name_array = wc_get_attribute_taxonomy_names();
$taxonomy_exists = in_array($attribute_name, $attribute_name_array);
if ($taxonomy_exists) {
$this->attr_slug = $attribute_name;
add_image_size('ts_prod_color_thumb', 30, 30, true);
$this->init_handle();
add_action('admin_enqueue_scripts', array($this, 'register_admin_scripts'));
}
}
开发者ID:ericsoncardosoweb,项目名称:dallia,代码行数:13,代码来源:woo_filter_by_color.php
示例4: __construct
public function __construct()
{
if (function_exists('wc_get_attribute_taxonomy_names')) {
$attributes = wc_get_attribute_taxonomy_names();
foreach ($attributes as $attribute) {
add_action($attribute . '_add_form_fields', array($this, 'add_image_uploader_to_add_form'), 10, 2);
add_action($attribute . '_edit_form_fields', array($this, 'add_image_uploader_to_edit_form'), 10, 1);
add_action('edited_' . $attribute, array($this, 'save_taxonomy_custom_meta'), 10, 2);
add_action('create_' . $attribute, array($this, 'save_taxonomy_custom_meta'), 10, 2);
add_action('delete_' . $attribute, array($this, 'delete_taxonomy_custom_meta'), 10, 2);
add_action('admin_footer-edit-tags.php', array($this, 'add_fpd_params_modal'));
}
}
}
开发者ID:baden03,项目名称:access48,代码行数:14,代码来源:class-admin-attributes.php
示例5: __construct
public function __construct()
{
$attributes = wc_get_attribute_taxonomy_names();
// print_r($attributes);
foreach ($attributes as $attribute) {
add_action($attribute . '_add_form_fields', array(&$this, 'add_attr_type_to_add_form'), 10, 2);
add_action($attribute . '_edit_form_fields', array(&$this, 'add_image_uploader_to_edit_form'), 10, 1);
add_action('edited_' . $attribute, array(&$this, 'save_taxonomy_custom_meta'), 10, 2);
add_action('create_' . $attribute, array(&$this, 'save_taxonomy_custom_meta'), 10, 2);
add_action('delete_' . $attribute, array(&$this, 'delete_taxonomy_custom_meta'), 10, 2);
add_filter('manage_edit-' . $attribute . '_columns', array(&$this, 'woocommerce_product_attribute_columns'));
add_filter('manage_' . $attribute . '_custom_column', array(&$this, 'woocommerce_product_attribute_column'), 10, 3);
}
}
开发者ID:shirso,项目名称:woo-booking-module,代码行数:14,代码来源:class-admin-attributes.php
示例6: __construct
public function __construct()
{
add_filter('product_attributes_type_selector', array(&$this, 'product_attributes_type_selector'), 20);
$attributes = function_exists('wc_get_attribute_taxonomy_names') ? wc_get_attribute_taxonomy_names() : array();
if (!empty($attributes)) {
foreach ($attributes as $attribute) {
add_action($attribute . '_add_form_fields', array(&$this, 'add_attr_type_to_add_form'), 10, 2);
add_action($attribute . '_edit_form_fields', array(&$this, 'add_image_uploader_to_edit_form'), 10, 1);
add_action('edited_' . $attribute, array(&$this, 'save_taxonomy_custom_meta'), 10, 2);
add_action('create_' . $attribute, array(&$this, 'save_taxonomy_custom_meta'), 10, 2);
add_action('delete_' . $attribute, array(&$this, 'delete_taxonomy_custom_meta'), 10, 2);
add_filter('manage_edit-' . $attribute . '_columns', array(&$this, 'woocommerce_product_attribute_columns'));
add_filter('manage_' . $attribute . '_custom_column', array(&$this, 'woocommerce_product_attribute_column'), 10, 3);
}
}
}
开发者ID:shirso,项目名称:product-configurator,代码行数:16,代码来源:class-admin-attributes.php
示例7: enqueue_styles_scripts
public function enqueue_styles_scripts($hook)
{
global $post;
$wc_settings_page = 'wc-settings';
//woocommerce settings
if ($hook == 'woocommerce_page_' . $wc_settings_page . '') {
wp_enqueue_style('mspc-admin', plugins_url('/css/admin.css', __FILE__));
wp_enqueue_script('mspc-admin', plugins_url('/js/admin.js', __FILE__), false, Multistep_Product_Configurator::VERSION);
}
//woocommerce post types
if ($hook == 'post-new.php' || $hook == 'post.php') {
//product
if ('product' === $post->post_type) {
wp_enqueue_style('mspc-admin', plugins_url('/css/admin.css', __FILE__));
wp_enqueue_script('mspc-meta-box', plugins_url('/js/meta-box.js', __FILE__), false, Multistep_Product_Configurator::VERSION);
}
}
//add attribute form
if (isset($_GET['page']) && $_GET['page'] == 'product_attributes') {
wp_enqueue_media();
wp_enqueue_style('mspc-admin', plugins_url('/css/admin.css', __FILE__));
wp_enqueue_script('mspc-admin', plugins_url('/js/admin.js', __FILE__), false, Multistep_Product_Configurator::VERSION);
wp_enqueue_style('fpd-admin-icon-font');
wp_enqueue_style('radykal-admin');
wp_enqueue_style('fpd-admin');
wp_enqueue_script('fpd-admin');
}
//edit attribute form
if ($hook == 'edit-tags.php') {
$attributes = wc_get_attribute_taxonomy_names();
if (!empty($attributes) && in_array($_GET['taxonomy'], $attributes)) {
wp_enqueue_media();
wp_enqueue_style('mspc-admin', plugins_url('/css/admin.css', __FILE__));
wp_enqueue_script('mspc-admin', plugins_url('/js/admin.js', __FILE__), false, Multistep_Product_Configurator::VERSION);
wp_enqueue_style('fpd-admin-icon-font');
wp_enqueue_style('radykal-admin');
wp_enqueue_style('fpd-admin');
wp_enqueue_script('fpd-admin');
}
}
}
开发者ID:baden03,项目名称:access48,代码行数:41,代码来源:class-admin-scripts-styles.php
示例8: query_args
/**
* Query args.
*
* @param array $args
* @param WP_REST_Request $request
* @return array
*/
public function query_args($args, $request)
{
// Set post_status.
$args['post_status'] = $request['status'];
// Taxonomy query to filter products by type, category,
// tag, shipping class, and attribute.
$tax_query = array();
// Map between taxonomy name and arg's key.
$taxonomies = array('product_type' => 'type', 'product_cat' => 'category', 'product_tag' => 'tag', 'product_shipping_class' => 'shipping_class');
// Set tax_query for each passed arg.
foreach ($taxonomies as $taxonomy => $key) {
if (!empty($request[$key])) {
$terms = explode(',', $request[$key]);
$tax_query[] = array('taxonomy' => $taxonomy, 'field' => 'term_id', 'terms' => $terms);
}
}
// Filter by attribute and term.
if (!empty($request['attribute']) && !empty($request['attribute_term'])) {
if (in_array($request['attribute'], wc_get_attribute_taxonomy_names())) {
$terms = explode(',', $request['attribute_term']);
$tax_query[] = array('taxonomy' => $request['attribute'], 'field' => 'term_id', 'terms' => $terms);
}
}
if (!empty($tax_query)) {
$args['tax_query'] = $tax_query;
}
// Filter by sku.
if (!empty($request['sku'])) {
if (!empty($args['meta_query'])) {
$args['meta_query'] = array();
}
$args['meta_query'][] = array('key' => '_sku', 'value' => $request['sku'], 'compare' => '=');
$args['post_type'] = array('product', 'product_variation');
}
return $args;
}
开发者ID:unfulvio,项目名称:woocommerce,代码行数:43,代码来源:class-wc-rest-products-controller.php
示例9: query_products
/**
* Helper method to get product post objects
*
* @since 2.1
* @param array $args request arguments for filtering query
* @return WP_Query
*/
private function query_products($args)
{
// Set base query arguments
$query_args = array('fields' => 'ids', 'post_type' => 'product', 'post_status' => 'publish', 'meta_query' => array());
// Taxonomy query to filter products by type, category, tag, shipping class, and
// attribute.
$tax_query = array();
// Map between taxonomy name and arg's key.
$taxonomies_arg_map = array('product_type' => 'type', 'product_cat' => 'category', 'product_tag' => 'tag', 'product_shipping_class' => 'shipping_class');
// Add attribute taxonomy names into the map.
foreach (wc_get_attribute_taxonomy_names() as $attribute_name) {
$taxonomies_arg_map[$attribute_name] = $attribute_name;
}
// Set tax_query for each passed arg.
foreach ($taxonomies_arg_map as $tax_name => $arg) {
if (!empty($args[$arg])) {
$terms = explode(',', $args[$arg]);
$tax_query[] = array('taxonomy' => $tax_name, 'field' => 'slug', 'terms' => $terms);
unset($args[$arg]);
}
}
if (!empty($tax_query)) {
$query_args['tax_query'] = $tax_query;
}
// Filter by specific sku
if (!empty($args['sku'])) {
if (!is_array($query_args['meta_query'])) {
$query_args['meta_query'] = array();
}
$query_args['meta_query'][] = array('key' => '_sku', 'value' => $args['sku'], 'compare' => '=');
$query_args['post_type'] = array('product', 'product_variation');
}
$query_args = $this->merge_query_args($query_args, $args);
return new WP_Query($query_args);
}
开发者ID:haltaction,项目名称:woocommerce,代码行数:42,代码来源:class-wc-api-products.php
示例10: getAttributeTaxonomies
static function getAttributeTaxonomies()
{
global $woocommerce;
if (function_exists('wc_get_attribute_taxonomy_names')) {
$attribute_taxonomies = wc_get_attribute_taxonomy_names();
// WC2.2+
} else {
$attribute_taxonomies = $woocommerce->get_attribute_taxonomy_names();
// legacy support for WC2.0
}
// print_r($attribute_taxonomies);
$attributes = array();
foreach ($attribute_taxonomies as $taxonomy_name) {
$attrib = new stdClass();
// US Shoe Size (Men's) => US Shoe Size (Men's)
// $attrib->name = html_entity_decode( self::getAttributeLabel( $taxonomy_name ), ENT_QUOTES, 'UTF-8' );
$attrib->name = $taxonomy_name;
$attrib->label = html_entity_decode(self::getAttributeLabel($taxonomy_name), ENT_QUOTES, 'UTF-8');
$attributes[] = $attrib;
}
// print_r($attributes);die();
// WPLA()->logger->info( 'getAttributeTaxonomies() result: '.print_r($attributes,1));
return $attributes;
}
开发者ID:imranshuvo,项目名称:wp-lister-for-amazon,代码行数:24,代码来源:Woo_ProductWrapper.php
示例11: get_attribute_taxonomy_names
/**
* @deprecated 2.1.0
* @return array
*/
public function get_attribute_taxonomy_names()
{
_deprecated_function('Woocommerce->get_attribute_taxonomy_names', '2.1', 'wc_get_attribute_taxonomy_names');
return wc_get_attribute_taxonomy_names();
}
开发者ID:donwea,项目名称:nhap.org,代码行数:9,代码来源:woocommerce.php
示例12: query_args
/**
* Query args.
*
* @param array $args Request args.
* @param WP_REST_Request $request Request data.
* @return array
*/
public function query_args($args, $request)
{
// Set post_status.
$args['post_status'] = $request['status'];
// Taxonomy query to filter products by type, category,
// tag, shipping class, and attribute.
$tax_query = array();
// Map between taxonomy name and arg's key.
$taxonomies = array('product_cat' => 'category', 'product_tag' => 'tag', 'product_shipping_class' => 'shipping_class');
// Set tax_query for each passed arg.
foreach ($taxonomies as $taxonomy => $key) {
if (!empty($request[$key])) {
$tax_query[] = array('taxonomy' => $taxonomy, 'field' => 'term_id', 'terms' => $request[$key]);
}
}
// Filter product type by slug.
if (!empty($request['type'])) {
$tax_query[] = array('taxonomy' => 'product_type', 'field' => 'slug', 'terms' => $request['type']);
}
// Filter by attribute and term.
if (!empty($request['attribute']) && !empty($request['attribute_term'])) {
if (in_array($request['attribute'], wc_get_attribute_taxonomy_names(), true)) {
$tax_query[] = array('taxonomy' => $request['attribute'], 'field' => 'term_id', 'terms' => $request['attribute_term']);
}
}
if (!empty($tax_query)) {
$args['tax_query'] = $tax_query;
}
// Filter featured.
if (is_bool($request['featured'])) {
$args['tax_query'][] = array('taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'featured');
}
// Filter by sku.
if (!empty($request['sku'])) {
$args['meta_query'] = $this->add_meta_query($args, array('key' => '_sku', 'value' => $request['sku']));
}
// Filter by tax class.
if (!empty($request['tax_class'])) {
$args['meta_query'] = $this->add_meta_query($args, array('key' => '_tax_class', 'value' => 'standard' !== $request['tax_class'] ? $request['tax_class'] : ''));
}
// Price filter.
if (!empty($request['min_price']) || !empty($request['max_price'])) {
$args['meta_query'] = $this->add_meta_query($args, wc_get_min_max_price_meta_query($request));
}
// Filter product in stock or out of stock.
if (is_bool($request['in_stock'])) {
$args['meta_query'] = $this->add_meta_query($args, array('key' => '_stock_status', 'value' => true === $request['in_stock'] ? 'instock' : 'outofstock'));
}
// Filter by on sale products.
if (is_bool($request['on_sale'])) {
$on_sale_key = $request['on_sale'] ? 'post__in' : 'post__not_in';
$args[$on_sale_key] += wc_get_product_ids_on_sale();
}
// Apply all WP_Query filters again.
if (is_array($request['filter'])) {
$args = array_merge($args, $request['filter']);
unset($args['filter']);
}
// Force the post_type argument, since it's not a user input variable.
if (!empty($request['sku'])) {
$args['post_type'] = array('product', 'product_variation');
} else {
$args['post_type'] = $this->post_type;
}
return $args;
}
开发者ID:shivapoudel,项目名称:woocommerce,代码行数:73,代码来源:class-wc-rest-products-controller.php
示例13: getNames
/**
* @{inheritdoc}
*/
public static function getNames()
{
return wc_get_attribute_taxonomy_names();
}
开发者ID:Frost-Bite,项目名称:woo-poly-integration,代码行数:7,代码来源:Attributes.php
示例14: query_args
/**
* Query args.
*
* @param array $args
* @param WP_REST_Request $request
* @return array
*/
public function query_args($args, $request)
{
// Set post_status.
$args['post_status'] = $request['status'];
// Taxonomy query to filter products by type, category,
// tag, shipping class, and attribute.
$tax_query = array();
// Map between taxonomy name and arg's key.
$taxonomies = array('product_cat' => 'category', 'product_tag' => 'tag', 'product_shipping_class' => 'shipping_class');
// Set tax_query for each passed arg.
foreach ($taxonomies as $taxonomy => $key) {
if (!empty($request[$key])) {
$terms = explode(',', $request[$key]);
$tax_query[] = array('taxonomy' => $taxonomy, 'field' => 'term_id', 'terms' => $terms);
}
}
// Filter product type by slug.
if (!empty($request['type'])) {
$terms = explode(',', $request['type']);
$tax_query[] = array('taxonomy' => 'product_type', 'field' => 'slug', 'terms' => $terms);
}
// Filter by attribute and term.
if (!empty($request['attribute']) && !empty($request['attribute_term'])) {
if (in_array($request['attribute'], wc_get_attribute_taxonomy_names())) {
$terms = explode(',', $request['attribute_term']);
$tax_query[] = array('taxonomy' => $request['attribute'], 'field' => 'term_id', 'terms' => $terms);
}
}
if (!empty($tax_query)) {
$args['tax_query'] = $tax_query;
}
// Filter by sku.
if (!empty($request['sku'])) {
if (!empty($args['meta_query'])) {
$args['meta_query'] = array();
}
$args['meta_query'][] = array('key' => '_sku', 'value' => $request['sku'], 'compare' => '=');
}
// Apply all WP_Query filters again.
if (is_array($request['filter'])) {
$args = array_merge($args, $request['filter']);
unset($args['filter']);
}
// Force the post_type argument, since it's not a user input variable.
if (!empty($request['sku'])) {
$args['post_type'] = $this->get_post_types();
} else {
$args['post_type'] = $this->post_type;
}
return $args;
}
开发者ID:AndyA,项目名称:River,代码行数:58,代码来源:class-wc-rest-products-controller.php
示例15: setSections
public function setSections()
{
$image_sizes = cruxstore_get_image_sizes();
$taxonomy_names = array();
if (cruxstore_is_wc()) {
$taxonomies = wc_get_attribute_taxonomy_names();
foreach ($taxonomies as $tax) {
$taxonomy_names[$tax] = $tax;
}
}
$this->sections[] = array('id' => 'general', 'title' => esc_html__('General', 'cruxstore'), 'icon' => 'fa fa-cogs');
$this->sections[] = array('id' => 'general_layout', 'title' => esc_html__('General', 'cruxstore'), 'subsection' => true, 'fields' => array(array('id' => 'use_page_loader', 'type' => 'switch', 'title' => esc_html__('Use Page Loader?', 'cruxstore'), 'desc' => esc_html__('', 'cruxstore'), 'default' => 0, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'archive_placeholder', 'type' => 'media', 'url' => true, 'compiler' => true, 'title' => esc_html__('Placeholder', 'cruxstore'), 'subtitle' => esc_html__("Placeholder for none image", 'cruxstore')), array('id' => 'notfound_page_type', 'type' => 'select', 'title' => esc_html__('404 Page', 'cruxstore'), 'desc' => '', 'options' => array('default' => esc_html__('Default', 'cruxstore'), 'home' => esc_html__('Redirect Home', 'cruxstore')), 'default' => 'default')));
/**
* Logos
**/
$this->sections[] = array('id' => 'logos_favicon', 'title' => esc_html__('Logos', 'cruxstore'), 'desc' => '', 'subsection' => true, 'fields' => array(array('id' => 'logos_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Logos settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'logo', 'type' => 'media', 'url' => true, 'compiler' => true, 'title' => esc_html__('Logo', 'cruxstore')), array('id' => 'logo_retina', 'type' => 'media', 'url' => true, 'compiler' => true, 'title' => esc_html__('Logo (Retina Version @2x)', 'cruxstore'), 'desc' => esc_html__('Select an image file for the retina version of the logo. It should be exactly 2x the size of main logo.', 'cruxstore')), array('id' => 'logo_light', 'type' => 'media', 'url' => true, 'compiler' => true, 'title' => esc_html__('Logo light', 'cruxstore')), array('id' => 'logo_light_retina', 'type' => 'media', 'url' => true, 'compiler' => true, 'title' => esc_html__('Logo light(Retina Version @2x)', 'cruxstore'), 'desc' => esc_html__('Select an image file for the retina version of the logo. It should be exactly 2x the size of main logo.', 'cruxstore')), array('id' => 'logo_footer', 'type' => 'media', 'url' => true, 'compiler' => true, 'title' => esc_html__('Logo Footer', 'cruxstore'))));
/**
* Header
**/
$this->sections[] = array('id' => 'Header', 'title' => esc_html__('Header', 'cruxstore'), 'desc' => '', 'subsection' => true, 'fields' => array(array('id' => 'header', 'type' => 'image_select', 'compiler' => true, 'title' => esc_html__('Header layout', 'cruxstore'), 'subtitle' => esc_html__('Please choose header layout', 'cruxstore'), 'options' => array(1 => array('alt' => esc_html__('Layout 1', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'header/header-v1.jpg'), 2 => array('alt' => esc_html__('Layout 2', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'header/header-v2.jpg'), 3 => array('alt' => esc_html__('Layout 3', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'header/header-v3.jpg'), 4 => array('alt' => esc_html__('Layout 4', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'header/header-v4.jpg'), 5 => array('alt' => esc_html__('Layout 5', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'header/header-v5.jpg'), 6 => array('alt' => esc_html__('Layout 6', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'header/header-v6.jpg'), 7 => array('alt' => esc_html__('Layout 7', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'header/header-v7.jpg'), 8 => array('alt' => esc_html__('Layout 8', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'header/header-v8.jpg')), 'default' => 1), array('id' => 'divide_id', 'type' => 'divide'), array('id' => 'header_shadow', 'type' => 'switch', 'title' => esc_html__('Header shadow', 'cruxstore'), "default" => 1, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'header_search', 'type' => 'switch', 'title' => esc_html__('Search Icon', 'cruxstore'), 'desc' => esc_html__('Enable the search Icon in the header.', 'cruxstore'), "default" => 1, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'header_search_type', 'type' => 'select', 'title' => esc_html__('Header search type', 'cruxstore'), 'options' => array('all' => esc_html__('All', 'cruxstore'), 'product' => esc_html__('Only Products', 'cruxstore')), 'default' => 'all'), array('id' => 'header_socials', 'type' => 'cruxstore_socials', 'title' => esc_html__('Select your socials', 'cruxstore'), 'default' => 'facebook,twitter,instagram,linkedin'), array('id' => 'header_phone', 'type' => 'text', 'title' => esc_html__('Phone', 'cruxstore'), 'subtitle' => esc_html__("Your phone number.", 'cruxstore'), 'default' => '')));
/**
* Footer
**/
$this->sections[] = array('id' => 'footer', 'title' => esc_html__('Footer', 'cruxstore'), 'desc' => '', 'subsection' => true, 'fields' => array(array('id' => 'backtotop', 'type' => 'switch', 'title' => esc_html__('Back to top', 'cruxstore'), 'default' => true, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'footer_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Footer settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'footer', 'type' => 'switch', 'title' => esc_html__('Footer enable', 'cruxstore'), 'default' => true, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'footer_fullwidth', 'type' => 'switch', 'title' => esc_html__('Footer background fullwidth', 'cruxstore'), 'default' => true, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'footer_top_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Footer top settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'footer_top', 'type' => 'switch', 'title' => esc_html__('Footer top enable', 'cruxstore'), 'default' => true, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'footer_instagram_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Footer Instagram settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'footer_instagram_layout', 'type' => 'select', 'title' => esc_html__('Footer Instagram layout', 'cruxstore'), 'options' => array('full' => esc_html__('Full', 'cruxstore'), 'space' => esc_html__('Space', 'cruxstore')), 'default' => 'full'), array('id' => 'footer_widgets_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Footer widgets settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'footer_widgets', 'type' => 'switch', 'title' => esc_html__('Footer widgets enable', 'cruxstore'), 'default' => true, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'footer_widgets_layout', 'type' => 'image_select', 'compiler' => true, 'title' => esc_html__('Footer widgets layout', 'cruxstore'), 'subtitle' => esc_html__('Select your footer widgets layout', 'cruxstore'), 'options' => array('featured' => array('alt' => esc_html__('Layout 1', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-0.jpg'), '3-3-3-3' => array('alt' => esc_html__('Layout 2', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-1.jpg'), '6-3-3' => array('alt' => esc_html__('Layout 3', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-2.jpg'), '3-3-6' => array('alt' => esc_html__('Layout 4', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-3.jpg'), '6-6' => array('alt' => esc_html__('Layout 5', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-4.jpg'), '4-4-4' => array('alt' => esc_html__('Layout 6', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-5.jpg'), '8-4' => array('alt' => esc_html__('Layout 7', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-6.jpg'), '4-8' => array('alt' => esc_html__('Layout 8', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-7.jpg'), '3-6-3' => array('alt' => esc_html__('Layout 9', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-8.jpg'), '12' => array('alt' => esc_html__('Layout 10', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-9.jpg')), 'default' => 'featured'), array('id' => 'footer_bottom_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Footer bottom settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'footer_bottom', 'type' => 'switch', 'title' => esc_html__('Footer bottom enable', 'cruxstore'), 'default' => false, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'footer_bottom_layout', 'type' => 'image_select', 'compiler' => true, 'title' => esc_html__('Footer bottom layout', 'cruxstore'), 'subtitle' => esc_html__('Select your footer bottom layout', 'cruxstore'), 'options' => array('1' => array('alt' => esc_html__('Layout 1', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-bottom-1.png'), '2' => array('alt' => esc_html__('Layout 2', 'cruxstore'), 'img' => CRUXSTORE_FW_IMG . 'footer/footer-bottom-2.png')), 'default' => '1'), array('id' => 'footer_copyright_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Footer copyright settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'footer_copyright', 'type' => 'switch', 'title' => esc_html__('Footer copyright enable', 'cruxstore'), 'default' => true, 'on' => esc_html__('Enabled', 'cruxstore'), 'off' => esc_html__('Disabled', 'cruxstore')), array('id' => 'footer_copyright_layout', 'type' => 'select', 'title' => esc_html__('Footer copyright layout', 'cruxstore'), 'subtitle' => esc_html__('Select your preferred footer layout.', 'cruxstore'), 'options' => array('centered' => esc_html__('Centered', 'cruxstore'), 'sides' => esc_html__('Sides', 'cruxstore'), 'columns' => esc_html__('3 columns', 'cruxstore')), 'default' => 'centered', 'clear' => false), array('id' => 'footer_copyright_left', 'type' => 'select', 'title' => esc_html__('Footer Copyright Left', 'cruxstore'), 'options' => array('' => esc_html__('Empty', 'cruxstore'), 'navigation' => esc_html__('Navigation', 'cruxstore'), 'socials' => esc_html__('Socials', 'cruxstore'), 'copyright' => esc_html__('Copyright', 'cruxstore'), 'subscribe' => esc_html__('Subscribe', 'cruxstore')), 'default' => ''), array('id' => 'footer_copyright_right', 'type' => 'select', 'title' => esc_html__('Footer Copyright Right', 'cruxstore'), 'options' => array('' => esc_html__('Empty', 'cruxstore'), 'navigation' => esc_html__('Navigation', 'cruxstore'), 'socials' => esc_html__('Socials', 'cruxstore'), 'copyright' => esc_html__('Copyright', 'cruxstore'), 'subscribe' => esc_html__('Subscribe', 'cruxstore')), 'default' => 'copyright'), array('id' => 'footer_copyright_center', 'type' => 'select', 'title' => esc_html__('Footer Copyright Center', 'cruxstore'), 'options' => array('' => esc_html__('Empty', 'cruxstore'), 'navigation' => esc_html__('Navigation', 'cruxstore'), 'socials' => esc_html__('Socials', 'cruxstore'), 'copyright' => esc_html__('Copyright', 'cruxstore'), 'subscribe' => esc_html__('Subscribe', 'cruxstore')), 'default' => 'copyright'), array('id' => 'footer_socials', 'type' => 'cruxstore_socials', 'title' => esc_html__('Select your socials', 'cruxstore'), 'default' => 'facebook,twitter,instagram,linkedin'), array('id' => 'footer_copyright_text', 'type' => 'editor', 'title' => esc_html__('Footer Copyright Text', 'cruxstore'), 'default' => 'BUILT WITH <i class="fa fa-heart color-accent"></i> WP THEME BY KITETHEMES-WP')));
/**
* Styling
**/
$this->sections[] = array('id' => 'styling', 'title' => esc_html__('Styling', 'cruxstore'), 'desc' => '', 'icon' => 'fa fa-pencil');
/**
* Styling General
**/
$this->sections[] = array('id' => 'styling_general', 'title' => esc_html__('General', 'cruxstore'), 'subsection' => true, 'fields' => array(array('id' => 'styling_accent', 'type' => 'color', 'title' => esc_html__('Main Color', 'cruxstore'), 'default' => '#ed8b5c', 'transparent' => false)));
/**
* Styling Logo
**/
$this->sections[] = array('id' => 'styling-logo', 'title' => esc_html__('Logo', 'cruxstore'), 'subsection' => true, 'fields' => array(array('id' => 'logo_width', 'type' => 'dimensions', 'units_extended' => 'true', 'title' => esc_html__('Logo width', 'cruxstore'), 'height' => false, 'default' => array('width' => 55, 'units' => 'px'), 'output' => array('.branding.branding-default img')), array('id' => 'logo_margin_spacing', 'type' => 'spacing', 'mode' => 'margin', 'output' => array('.branding.branding-default'), 'units' => array('px'), 'units_extended' => 'true', 'title' => esc_html__('Logo margin spacing Option', 'cruxstore'), 'default' => array('margin-top' => '18px', 'margin-right' => '0', 'margin-bottom' => '18px', 'margin-left' => '0')), array('id' => 'divide_id', 'type' => 'divide'), array('id' => 'logo_mobile_width', 'type' => 'dimensions', 'units_extended' => 'true', 'title' => esc_html__('Logo mobile width', 'cruxstore'), 'height' => false, 'default' => array('width' => 55, 'units' => 'px'), 'output' => array('.branding.branding-mobile img')), array('id' => 'logo_mobile_margin_spacing', 'type' => 'spacing', 'mode' => 'margin', 'units' => array('px'), 'units_extended' => 'true', 'title' => esc_html__('Logo mobile margin spacing Option', 'cruxstore'), 'default' => array('margin-top' => '10px', 'margin-right' => '0px', 'margin-bottom' => '10px', 'margin-left' => '0px'), 'output' => array('.branding.branding-mobile'))));
/**
* Styling Header
**/
$this->sections[] = array('id' => 'styling_header', 'title' => esc_html__('Header', 'cruxstore'), 'subsection' => true, 'fields' => array(array('id' => 'header_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Header settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'header_background', 'type' => 'background', 'title' => esc_html__('Header background', 'cruxstore'), 'subtitle' => esc_html__('Header background with image, color, etc.', 'cruxstore'), 'default' => '', 'output' => array('.header-content')), array('id' => 'header_default_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Header Default settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'header_border', 'type' => 'border', 'title' => esc_html__('Header Border', 'cruxstore'), 'output' => array('.header-content'), 'all' => false, 'left' => false, 'right' => false, 'top' => false, 'default' => array()), array('id' => 'header_light_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Header Light settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'header_light_border', 'type' => 'border', 'title' => esc_html__('Header Border', 'cruxstore'), 'output' => array('.header-light.header-transparent .header-content'), 'all' => false, 'left' => false, 'right' => false, 'top' => false, 'default' => array('border-bottom' => '1px', 'border-style' => 'solid', 'border-color' => 'rgba(246, 246, 246, 0.2)')), array('id' => 'header_light_spacing', 'type' => 'raw', 'content' => '<div style="height:150px"></div>', 'full_width' => true)));
/**
* Styling Header Toolbar
**/
$this->sections[] = array('id' => 'styling_header_toolbar', 'title' => esc_html__('Header Toolbar', 'cruxstore'), 'subsection' => true, 'fields' => array(array('id' => 'header_toolbar_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Header Toolbar settings', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'header_toolbar_background', 'type' => 'background', 'title' => esc_html__('Header Toolbar background', 'cruxstore'), 'subtitle' => esc_html__('Header Toolbar background with image, color, etc.', 'cruxstore'), 'default' => '', 'output' => array('.topbar')), array('id' => 'header_toolbar_default_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Header Toolbar Default', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'header_toolbar_default_color', 'type' => 'color', 'output' => array('.top-navigation > li > a'), 'title' => esc_html__('Default: Top Level Color', 'cruxstore'), 'default' => '#999999', 'transparent' => false), array('id' => 'header_toolbar_default_active_color', 'type' => 'color', 'output' => array('.top-navigation > li:hover > a', '.top-navigation > li > a:hover', '.top-navigation > li > a:focus'), 'title' => esc_html__('Default: Top Level Hover Color', 'cruxstore'), 'default' => '#000000', 'transparent' => false), array('id' => 'header_toolbar_border_color', 'type' => 'color', 'title' => esc_html__('Default: Border Color', 'cruxstore'), 'default' => '#ebebeb', 'transparent' => true), array('id' => 'header_toolbar_light_heading', 'type' => 'raw', 'content' => '<div class="section-heading">' . esc_html__('Header Toolbar Light', 'cruxstore') . '</div>', 'full_width' => true), array('id' => 'header_toolbar_light_color', 'type' => 'color', 'output' => array('.header-transparent.header-light .top-navigation > li > a'), 'title' => esc_html__('Light: Top Level Color', 'cruxstore'), 'default' => '#FFFFFF', 'transparent' => false), array('id' => 'header_toolbar_light_active_color', 'type' => 'color', 'output' => array('.header-transparent.header-light .top-navigation > li:hover > a', '.header-transparent.header-light .top-navigation > li > a:hover', '.header-transparent.header-light .top-navigation > li > a:focus'), 'title' => esc_html__('Light: Top Level Hover Color', 'cruxstore'), 'default' => '#FFFFFF', 'transparent' => false), array('id' => 'header_toolbar_light_border_color', 'type' => 'color_rgba', 'title' => esc_html__('Light: Border Color', 'cruxstore'), 'subtitle' => esc_html__('Gives you the RGBA color.', 'cruxstore'), 'default' => array('color' => '#f6f6f6', 'alpha' => '.2'), 'mode' => 'background'), array('id' => 'mega_menu_spacing', 'type' => 'raw', 'content' => '<div style="height:150px"></div>', 'full_width' => true)));
/**
* Styling Sticky
**/
$this->sections[] = array('id' => 'styling_sticky', 'title' => esc_html__('Sticky', 'cruxstore'), 'subsection' => true, 'fields' => array(array('id' => 'fixed_header', 'type' => 'button_set', 'title' => esc_html__('Sticky header', 'cruxstore'), 'options' => array('1' => esc_html__('Disabled', 'cruxstore'), '2' => esc_html__('Fixed Sticky', 'cruxstore'), '3' => esc_html__('Slide Down', 'cruxstore')), 'default' => '3', 'desc' => esc_html__('Choose your sticky effect.', 'cruxstore')), array('id' => 'logo_sticky_width', 'type' => 'dimensions', 'units' => 'px', 'title' => esc_html__('Logo width', 'cruxstore'), 'height' => false, 'default' => array('width' => 45, 'units' => 'px'), 'output' => array('.is-sticky .apply-sticky .branding-default img')), array('id' => 'logo_sticky_margin_spacing', 'type' => 'spacing', 'mode' => 'margin', 'units' => array('px'), 'units_extended' => 'true', 'title' => esc_html__('Logo sticky margin spacing Option', 'cruxstore'), 'default' => array('margin-top' => '0', 'margin-bottom' => '0', 'margin-left' => '0', 'margin-right' => '0'), 'output' => array('.is-sticky .apply-sticky .branding-default')), array('id' => 'navigation_height_fixed', 'type' => 'dimensions', 'units' => 'px', 'title' => esc_html__('Main Navigation Sticky Height', 'cruxstore'), 'desc' => esc_html__('Change height of main navigation sticky', 'cruxstore'), 'width' => false, 'default' => array('height' => '60', 'units' => 'px')), array('id' => 'header_sticky_opacity', 'type' => 'slider', 'title' => esc_html__('Sticky Background opacity', 'cruxstore'), 'default' => 0.8, 'min' => 0, 'step' => 0.1, 'max' => 1, 'resolution' => 0.1, 'display_value' => 'text'), array('id' => 'header_sticky_background', 'type' => 'background', 'title' => esc_html__('Header sticky background', 'cruxstore'), 'desc' => esc_html__('Header sticky with image, color, etc.', 'cruxstore'), 'background-repeat' => false, 'background-attachment' => false, 'background-position' => false, 'background-image' => false, 'background-size' => false, 'preview' => false, 'transparent' => false, 'default' => array('background-color' => '#ffffff'), 'output' => array('.header-sticky-background')), array('id' => 'header_sticky_light_background', 'type' => 'background', 'title' => esc_html__('Header transparent sticky background', 'cruxstore'), 'desc' => esc_html__('Header transparent sticky with image, color, etc.', 'cruxstore'), 'background-repeat' => false, 'background-attachment' => false, 'background-position' => false, 'background-image' => false, 'background-size' => false, 'preview' => false, 'transparent' => false, 'default' => array('background-color' => '#000000'), 'output' => array('.header-transparent.header-light .header-sticky-background')), array('id' => 'header_sticky_spacing', 'type' => 'raw', 'content' => '<div style="height:150px"></div>', 'full_width' => true)));
/**
* Styling Footer
**/
$this->sections[] = array('id' => 'styling_footer', 'title' => esc_html__('Footer', 'cruxstore'), 'subsection' => true, 'fields' => array(array('id' => 'footer_heading', 'type' => 'raw', 'content' =&g
|
请发表评论