本文整理汇总了PHP中get_multiple_settings函数的典型用法代码示例。如果您正苦于以下问题:PHP get_multiple_settings函数的具体用法?PHP get_multiple_settings怎么用?PHP get_multiple_settings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_multiple_settings函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: is_ic_sku_enabled
function is_ic_sku_enabled()
{
$archive_multiple_settings = get_multiple_settings();
if ($archive_multiple_settings['disable_sku'] != 1) {
return true;
}
return false;
}
开发者ID:satokora,项目名称:IT354Project,代码行数:8,代码来源:conditionals.php
示例2: create_product_categories
function create_product_categories()
{
$archive_multiple_settings = get_multiple_settings();
$category_enable = true;
if (get_integration_type() == 'simple') {
$category_enable = false;
}
$names = get_catalog_names();
$names['singular'] = ucfirst($names['singular']);
$labels = array('name' => sprintf(__('%s Categories', 'al-ecommerce-product-catalog'), $names['singular']), 'singular_name' => sprintf(__('%s Category', 'al-ecommerce-product-catalog'), $names['singular']), 'search_items' => sprintf(__('Search %s Categories', 'al-ecommerce-product-catalog'), $names['singular']), 'all_items' => sprintf(__('All %s Categories', 'al-ecommerce-product-catalog'), $names['singular']), 'parent_item' => sprintf(__('Parent %s Category', 'al-ecommerce-product-catalog'), $names['singular']), 'parent_item_colon' => sprintf(__('Parent %s Category:', 'al-ecommerce-product-catalog'), $names['singular']), 'edit_item' => sprintf(__('Edit %s Category', 'al-ecommerce-product-catalog'), $names['singular']), 'update_item' => sprintf(__('Update %s Category', 'al-ecommerce-product-catalog'), $names['singular']), 'add_new_item' => sprintf(__('Add New %s Category', 'al-ecommerce-product-catalog'), $names['singular']), 'new_item_name' => sprintf(__('New %s Category', 'al-ecommerce-product-catalog'), $names['singular']), 'menu_name' => sprintf(__('%s Categories', 'al-ecommerce-product-catalog'), $names['singular']));
$args = array('public' => $category_enable, 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array('slug' => apply_filters('product_category_slug_value_register', sanitize_title($archive_multiple_settings['category_archive_url'])), 'with_front' => false), 'capabilities' => array('manage_terms' => 'manage_product_categories', 'edit_terms' => 'edit_product_categories', 'delete_terms' => 'delete_product_categories', 'assign_terms' => 'assign_product_categories'));
register_taxonomy('al_product-cat', 'al_product', $args);
register_taxonomy_for_object_type('al_product-cat', 'al_product');
// flush_rewrite_rules(false);
// check_permalink_options_update();
}
开发者ID:satokora,项目名称:IT354Project,代码行数:16,代码来源:product-categories.php
示例3: enable_simple_mode
function enable_simple_mode()
{
$archive_multiple_settings = get_multiple_settings();
$archive_multiple_settings['integration_type'] = 'simple';
update_option('archive_multiple_settings', $archive_multiple_settings);
update_option('product_adder_theme_support_check', '');
}
开发者ID:ben-pritchard,项目名称:WordPress-Bride,代码行数:7,代码来源:templates.php
示例4: show_parent_product_categories
function show_parent_product_categories($echo = 1, $return = '')
{
$multiple_settings = get_multiple_settings();
$taxonomy_name = apply_filters('current_product_catalog_taxonomy', 'al_product-cat');
$archive_template = get_product_listing_template();
if ($multiple_settings['product_listing_cats'] == 'on') {
if ($multiple_settings['cat_template'] != 'template') {
$product_subcategories = wp_list_categories('show_option_none=No_cat&echo=0&title_li=&taxonomy=' . $taxonomy_name . '&parent=0');
if (!strpos($product_subcategories, 'No_cat')) {
$return = '<div class="product-subcategories">' . $product_subcategories . '</div>';
}
} else {
$show_categories = do_shortcode('[show_categories parent="0"]');
if (!empty($show_categories)) {
$return = '<div class="product-subcategories ' . $archive_template . '">' . $show_categories;
if ($archive_template != 'list') {
$return .= '<hr>';
}
$return .= '</div>';
}
}
}
return echo_ic_setting($return, $echo);
}
开发者ID:RA2WP,项目名称:RA2WP,代码行数:24,代码来源:templates-functions.php
示例5: get_integration_type
function get_integration_type()
{
$settings = get_multiple_settings();
return $settings['integration_type'];
}
开发者ID:jazzindizzin,项目名称:Quality-Timber-Doors,代码行数:5,代码来源:general.php
示例6: is_ic_default_theme_sided_sidebar_active
/**
* Checks if theme default sidebar catalog styled should be enabled on product pages
*
* @return boolean
*/
function is_ic_default_theme_sided_sidebar_active()
{
$settings = get_multiple_settings();
if (isset($settings['default_sidebar']) && ($settings['default_sidebar'] == 'left' || $settings['default_sidebar'] == 'right')) {
return true;
}
return false;
}
开发者ID:nanookYs,项目名称:orientreizen,代码行数:13,代码来源:conditionals.php
示例7: ic_product_listing_categories_shortcode
/**
* Shows categories on product listing for custom templates usage
*
* @return string
*/
function ic_product_listing_categories_shortcode()
{
ob_start();
$multiple_settings = get_multiple_settings();
$archive_template = get_product_listing_template();
ic_product_listing_categories($archive_template, $multiple_settings);
return ob_get_clean();
}
开发者ID:nanookYs,项目名称:orientreizen,代码行数:13,代码来源:shortcodes.php
示例8: show_product_order_dropdown
/**
* Shows sorting drop down
*
* @global string $product_sort
* @param string $archive_template
* @param array $multiple_settings
*/
function show_product_order_dropdown($archive_template = null, $multiple_settings = null, $instance = null)
{
$multiple_settings = empty($multiple_settings) ? get_multiple_settings() : $multiple_settings;
$sort_options = get_product_sort_options();
$selected = isset($_GET['product_order']) ? esc_attr($_GET['product_order']) : $multiple_settings['product_order'];
$action = get_filter_widget_action($instance);
echo '<form class="product_order" action="' . $action . '"><select class="product_order_selector" name="product_order">';
foreach ($sort_options as $name => $value) {
$option = '<option value="' . $name . '" ' . selected($name, $selected, 0) . '>' . $value . '</option>';
echo apply_filters('product_order_dropdown_options', $option, $name, $value, $multiple_settings, $selected);
}
echo '</select>';
foreach ($_GET as $key => $get_value) {
if ($key != 'product_order') {
echo '<input type="hidden" value="' . esc_attr($get_value) . '" name="' . esc_attr($key) . '" />';
}
}
echo '</form>';
}
开发者ID:ben-pritchard,项目名称:WordPress-Bride,代码行数:26,代码来源:functions.php
示例9: ecommerce_product_catalog_upgrade
function ecommerce_product_catalog_upgrade()
{
if (is_admin()) {
$plugin_data = get_plugin_data(AL_PLUGIN_MAIN_FILE);
$plugin_version = $plugin_data["Version"];
$database_plugin_version = get_option('ecommerce_product_catalog_ver', $plugin_version);
if ($database_plugin_version != $plugin_version) {
update_option('ecommerce_product_catalog_ver', $plugin_version);
$first_version = (string) get_option('first_activation_version', $plugin_version);
if (version_compare($first_version, '1.9.0') < 0 && version_compare($database_plugin_version, '2.2.4') < 0) {
$hide_info = 0;
enable_advanced_mode($hide_info);
}
if (version_compare($first_version, '2.0.0') < 0 && version_compare($database_plugin_version, '2.2.4') < 0) {
$archive_multiple_settings = get_multiple_settings();
$archive_multiple_settings['product_listing_cats'] = 'off';
$archive_multiple_settings['cat_template'] = 'link';
update_option('archive_multiple_settings', $archive_multiple_settings);
}
if (version_compare($first_version, '2.0.1') < 0 && version_compare($database_plugin_version, '2.2.4') < 0) {
add_product_caps();
}
if (version_compare($first_version, '2.0.4') < 0 && version_compare($database_plugin_version, '2.2.4') < 0) {
delete_transient('implecode_extensions_data');
}
if (version_compare($first_version, '2.2.5') < 0 && version_compare($database_plugin_version, '2.2.5') < 0) {
$archive_names = get_option('archive_names');
$archive_names['all_main_categories'] = '';
$archive_names['all_products'] = '';
$archive_names['all_subcategories'] = '';
update_option('archive_names', $archive_names);
}
if (version_compare($first_version, '2.3.6') < 0 && version_compare($database_plugin_version, '2.3.6') < 0) {
$archive_multiple_settings = get_multiple_settings();
$archive_multiple_settings['default_sidebar'] = 1;
update_option('archive_multiple_settings', $archive_multiple_settings);
}
if (version_compare($first_version, '2.4.0') < 0 && version_compare($database_plugin_version, '2.4.0') < 0) {
$archive_multiple_settings = get_multiple_settings();
$archive_multiple_settings['related'] = 'categories';
update_option('archive_multiple_settings', $archive_multiple_settings);
update_option('old_sort_bar', 1);
}
flush_rewrite_rules();
}
}
}
开发者ID:ben-pritchard,项目名称:WordPress-Bride,代码行数:47,代码来源:activation.php
示例10: default_archive_names
<?php
if (!defined('ABSPATH')) {
exit;
// Exit if accessed directly
}
/**
* The template for displaying products archive content.
*
* @version 1.1.3
* @package ecommerce-product-catalog/templates
* @author Norbert Dreszer
*/
global $post;
$default_archive_names = default_archive_names();
$multiple_settings = get_multiple_settings();
$archive_names = get_archive_names();
do_action('product_listing_begin', $multiple_settings);
$listing_class = apply_filters('product_listing_classes', 'al_product responsive type-page');
?>
<article id="product_listing" <?php
post_class($listing_class);
?>
>
<?php
do_action('before_product_listing_entry', $post, $archive_names);
?>
<div class="entry-content">
<?php
$archive_template = get_product_listing_template();
do_action('product_listing_entry_inside', $archive_template, $multiple_settings);
开发者ID:nanookYs,项目名称:orientreizen,代码行数:31,代码来源:content-al_product_archive.php
示例11: ic_product_listing_categories
/**
* Shows categories on product listing for custom templates usage
*
* @return string
*/
function ic_product_listing_categories()
{
ob_start();
$multiple_settings = get_multiple_settings();
$archive_template = get_product_listing_template();
$taxonomy_name = apply_filters('current_product_catalog_taxonomy', 'al_product-cat');
if (!is_tax() && !is_search()) {
$before_archive = content_product_adder_archive_before();
if ($before_archive != '<div class="entry-summary"></div>') {
echo $before_archive;
}
if ($multiple_settings['product_listing_cats'] == 'on' || $multiple_settings['product_listing_cats'] == 'cats_only') {
if ($multiple_settings['cat_template'] != 'template') {
$product_subcategories = wp_list_categories('show_option_none = No_cat&echo = 0&title_li = &taxonomy = ' . $taxonomy_name . '&parent = 0');
if (!strpos($product_subcategories, 'No_cat')) {
do_action('before_product_listing_category_list');
echo '<div class = "product-subcategories">' . $product_subcategories . '</div>';
}
} else {
$show_categories = do_shortcode('[show_categories parent = "0" shortcode_query = "no"]');
if (!empty($show_categories)) {
do_action('before_product_listing_category_list');
echo $show_categories;
if ($archive_template != 'list' && !is_ic_only_main_cats()) {
echo '<hr>';
}
}
}
}
} else {
if (is_tax()) {
$term = get_queried_object()->term_id;
if (is_ic_category_image_enabled()) {
$term_img = get_product_category_image_id($term);
echo wp_get_attachment_image($term_img, apply_filters('product_cat_image_size', 'large'), false, array('class' => 'product-category-image'));
}
$term_description = term_description();
if (!empty($term_description)) {
echo '<div class = "taxonomy-description">' . $term_description . '</div>';
}
if ($multiple_settings['category_top_cats'] == 'on' || $multiple_settings['category_top_cats'] == 'only_subcategories') {
if ($multiple_settings['cat_template'] != 'template') {
$product_subcategories = wp_list_categories('show_option_none = No_cat&echo = 0&title_li = &taxonomy = ' . $taxonomy_name . '&child_of = ' . $term);
if (!strpos($product_subcategories, 'No_cat')) {
?>
<div class="product-subcategories">
<?php
do_action('before_category_subcategories');
echo $product_subcategories;
?>
</div>
<?php
}
} else {
$show_categories = do_shortcode('[show_categories parent = ' . get_queried_object_id() . ' shortcode_query = no]');
if (!empty($show_categories)) {
do_action('before_category_subcategories');
echo $show_categories;
if ($archive_template != 'list' && !is_ic_only_main_cats()) {
echo '<hr>';
}
}
}
}
}
}
return ob_get_clean();
}
开发者ID:RA2WP,项目名称:RA2WP,代码行数:73,代码来源:shortcodes.php
示例12: show_product_order_dropdown
function show_product_order_dropdown($archive_template, $multiple_settings = null)
{
$multiple_settings = empty($multiple_settings) ? get_multiple_settings() : $multiple_settings;
global $product_sort;
if (isset($product_sort) && $product_sort == 1 || !isset($product_sort)) {
$sort_options = get_product_sort_options();
$selected = isset($_GET['product_order']) ? $_GET['product_order'] : $multiple_settings['product_order'];
echo '<form id="product_order"><select id="product_order_selector" name="product_order">';
foreach ($sort_options as $name => $value) {
$option = '<option value="' . $name . '" ' . selected($name, $selected, 0) . '>' . $value . '</option>';
echo apply_filters('product_order_dropdown_options', $option, $name, $value, $multiple_settings, $selected);
}
echo '</select>';
foreach ($_GET as $key => $get_value) {
if ($key != 'product_order') {
echo '<input type="hidden" value="' . $get_value . '" name="' . $key . '" />';
}
}
echo '</form>';
echo '<script>jQuery("#product_order_selector").change(function() { jQuery("#product_order").submit(); });</script>';
}
}
开发者ID:satokora,项目名称:IT354Project,代码行数:22,代码来源:functions.php
示例13: is_ic_category_image_enabled
/**
* Checks if category image is enabled on category page
* @return boolean
*/
function is_ic_category_image_enabled()
{
$multiple_settings = get_multiple_settings();
if ($multiple_settings['cat_image_disabled'] != 1) {
return true;
}
return false;
}
开发者ID:jazzindizzin,项目名称:Quality-Timber-Doors,代码行数:12,代码来源:conditionals.php
示例14: get_product_slug
function get_product_slug()
{
$page_id = get_product_listing_id();
$slug = urldecode(untrailingslashit(get_page_uri($page_id)));
if (empty($slug)) {
$settings = get_multiple_settings();
$slug = ic_lcfirst($settings['catalog_plural']);
}
return apply_filters('product_slug', $slug);
}
开发者ID:nanookYs,项目名称:orientreizen,代码行数:10,代码来源:general.php
注:本文中的get_multiple_settings函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论