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


PHP presscore_get_config函数代码示例

本文整理汇总了PHP中presscore_get_config函数的典型用法代码示例。如果您正苦于以下问题:PHP presscore_get_config函数的具体用法?PHP presscore_get_config怎么用?PHP presscore_get_config使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: filter_config_for_archives

 public function filter_config_for_archives()
 {
     if (!(is_archive() || is_search())) {
         return;
     }
     $config = presscore_get_config();
     $config->set('show_titles', true);
     $config->set('show_excerpts', true);
     $config->set('show_links', true);
     $config->set('show_details', true);
     $config->set('show_zoom', true);
     $config->set('post.meta.fields.date', true);
     $config->set('post.meta.fields.categories', true);
     $config->set('post.meta.fields.comments', true);
     $config->set('post.meta.fields.author', true);
     $config->set('post.meta.fields.media_number', true);
     $config->set('post.preview.width.min', 320);
     $config->set('post.preview.mini_images.enabled', true);
     $config->set('post.preview.load.effect', 'fade_in');
     $config->set('post.preview.background.enabled', true);
     $config->set('post.preview.background.style', 'fullwidth');
     $config->set('post.preview.description.alignment', 'left');
     $config->set('post.preview.description.style', 'under_image');
     $config->set('post.preview.hover.animation', 'fade');
     $config->set('post.preview.hover.color', 'accent');
     $config->set('post.preview.hover.content.visibility', 'on_hoover');
     $config->set('post.fancy_date.enabled', false);
     $config->set('template.columns.number', 3);
     $config->set('load_style', 'default');
     $config->set('image_layout', 'original');
     $config->set('all_the_same_width', true);
     $config->set('item_padding', 10);
     $config->set('layout', 'masonry');
     $config->set('template.layout.type', 'masonry');
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:35,代码来源:class-mod-archives-templates.php

示例2: presscore_list_container_html_class

 /**
  * @since 1.0.0
  * 
  * @param  array  $class
  * @return string
  */
 function presscore_list_container_html_class($custom_class = array())
 {
     $config = presscore_get_config();
     $html_class = array();
     if ('dark' == $config->get('post.preview.hover.color')) {
         $html_class[] = 'hover-color-static';
     }
     $html_class[] = presscore_template_loading_effect_html_class($config->get('post.preview.load.effect'));
     // ajax class
     if (!in_array($config->get('load_style'), array('default', false))) {
         $html_class[] = 'with-ajax';
     }
     // lazy loading
     if ('lazy_loading' == $config->get('load_style')) {
         $html_class[] = 'lazy-loading-mode';
     }
     //////////////
     // Output //
     //////////////
     if ($custom_class && !is_array($custom_class)) {
         $custom_class = explode(' ', $custom_class);
     }
     $html_class = apply_filters('presscore_masonry_container_class', array_merge($custom_class, $html_class));
     return $html_class ? sprintf('class="%s"', presscore_esc_implode(' ', array_unique($html_class))) : '';
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:31,代码来源:list-template.php

示例3: presscore_microsite_setup

 function presscore_microsite_setup()
 {
     global $post;
     $config = presscore_get_config();
     $config->set('template.beautiful_loading', get_post_meta($post->ID, '_dt_microsite_page_loading', true));
     $config->set('template.layout', get_post_meta($post->ID, '_dt_microsite_page_layout', true));
     // hide template parts
     $hidden_parts = get_post_meta($post->ID, "_dt_microsite_hidden_parts", false);
     // hide header
     $hide_header = in_array('header', $hidden_parts);
     $hide_floating_menu = in_array('floating_menu', $hidden_parts);
     if ($hide_header) {
         if ($hide_floating_menu) {
             add_filter('presscore_show_header', '__return_false');
         } else {
             // see template-hooks.php
             add_filter('presscore_header_classes', 'presscore_microsite_header_classes');
         }
         $config->set('header.layout', 'left');
     }
     // hide bottom bar
     if (in_array('bottom_bar', $hidden_parts)) {
         add_filter('presscore_show_bottom_bar', '__return_false');
     }
     // hide content
     if (in_array('content', $hidden_parts)) {
         add_filter('presscore_is_content_visible', '__return_false');
     }
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:29,代码来源:microsite-template.php

示例4: dt_woocommerce_init_template_config

 /**
  * Init theme config for shop.
  *
  */
 function dt_woocommerce_init_template_config($name = '')
 {
     dt_woocommerce_add_config_actions();
     if ('shop' != $name) {
         return;
     }
     $config = presscore_get_config();
     $post_id = null;
     if (is_shop()) {
         $post_id = woocommerce_get_page_id('shop');
     } else {
         if (is_cart()) {
             $post_id = woocommerce_get_page_id('cart');
         } else {
             if (is_checkout()) {
                 $post_id = woocommerce_get_page_id('checkout');
             }
         }
     }
     presscore_config_base_init($post_id);
     if (is_product_category() || is_product_tag()) {
         $post_id = woocommerce_get_page_id('shop');
         if ($post_id) {
             $config->set('post_id', $post_id);
             presscore_config_populate_sidebar_and_footer_options();
             $config->set('post_id', null);
         }
     }
     if (!is_product()) {
         add_filter('presscore_get_page_title', 'dt_woocommerce_get_page_title', 20);
     }
     // replace theme breadcrumbs
     add_filter('presscore_get_breadcrumbs-html', 'dt_woocommerce_replace_theme_breadcrumbs', 20, 2);
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:38,代码来源:mod-wc-template-config.php

示例5: presscore_sidebar_html_class

 /**
  * Sidebar html classes
  * 
  * @param  array  $class Custom html class
  * @return string        Html class attribute
  */
 function presscore_sidebar_html_class($class = array())
 {
     $output = array('sidebar');
     $config = presscore_get_config();
     switch ($config->get('sidebar.style')) {
         case 'with_bg':
             $output[] = 'solid-bg';
             break;
         case 'with_widgets_bg':
             $output[] = 'bg-under-widget';
             break;
     }
     //////////////
     // Output //
     //////////////
     if ($class && !is_array($class)) {
         $class = explode(' ', $class);
     }
     $output = apply_filters('presscore_sidebar_html_class', array_merge($class, $output));
     return $output ? sprintf('class="%s"', presscore_esc_implode(' ', array_unique($output))) : '';
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:27,代码来源:widget-areas.php

示例6: __construct

 protected function __construct()
 {
     add_shortcode($this->shortcode_name, array($this, 'shortcode'));
     $this->config = presscore_get_config();
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:5,代码来源:button.php

示例7: get_template_query

 public static function get_template_query()
 {
     $config = presscore_get_config();
     $order = $config->get('order');
     $orderby = $config->get('orderby');
     $page_args = array('post_type' => self::$post_type, 'post_status' => 'publish', 'paged' => dt_get_paged_var(), 'order' => $order, 'orderby' => 'name' == $orderby ? 'title' : $orderby);
     $ppp = $config->get('posts_per_page');
     if ($ppp) {
         $page_args['posts_per_page'] = intval($ppp);
     }
     // get all dt_portfolio_category terms
     $all_terms = get_categories(array('type' => self::$post_type, 'hide_empty' => 1, 'hierarchical' => 0, 'taxonomy' => self::$taxonomy, 'pad_counts' => false));
     // populate $all_terms_array with terms names
     $all_terms_array = array();
     foreach ($all_terms as $term) {
         $all_terms_array[] = $term->term_id;
     }
     // construct base tax_query if not all terms slected
     $display = $config->get('display');
     if ('all' != $display['select'] && !empty($display['terms_ids']) && is_array($display['terms_ids'])) {
         // base only tax_query
         $page_args['tax_query'] = array(array('taxonomy' => self::$taxonomy, 'field' => 'id', 'terms' => array_values($display['terms_ids']), 'operator' => 'IN'));
         // except tax_query
         if ('except' == $display['select']) {
             $terms_arr = array_diff($all_terms_array, $display['terms_ids']);
             sort($terms_arr);
             if ($terms_arr) {
                 $page_args['tax_query']['relation'] = 'OR';
                 $page_args['tax_query'][1] = $page_args['tax_query'][0];
                 $page_args['tax_query'][0]['terms'] = $terms_arr;
                 $page_args['tax_query'][1]['operator'] = 'NOT IN';
             }
             add_filter('posts_clauses', 'dt_core_join_left_filter');
         }
     }
     /////////////////
     // posts filter //
     /////////////////
     // get filter request
     $request_display = $config->get('request_display');
     if ($request_display) {
         // except for empty term that appers when all filter category selcted, see it's url
         if (0 == current($request_display['terms_ids'])) {
             $request_display['terms_ids'] = $all_terms_array;
         }
         // override base tax_query
         $page_args['tax_query'] = array(array('taxonomy' => 'dt_portfolio_category', 'field' => 'id', 'terms' => array_values($request_display['terms_ids']), 'operator' => 'IN'));
         if ('except' == $request_display['select']) {
             $page_args['tax_query'][0]['operator'] = 'NOT IN';
         }
     }
     //////////////////////
     // posts query //
     //////////////////////
     $page_query = new WP_Query($page_args);
     remove_filter('posts_clauses', 'dt_core_join_left_filter');
     return $page_query;
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:58,代码来源:post-types.php

示例8: setup_config

 protected function setup_config(&$attributes)
 {
     $config = presscore_get_config();
     $config->set('template', 'albums');
     $config->set('layout', 'grid');
     $config->set('load_style', 'default');
     $config->set('justified_grid', true);
     $config->set('all_the_same_width', true);
     $config->set('template.layout.type', 'masonry');
     $config->set('post.preview.buttons.details.enabled', false);
     $config->set('post.preview.background.enabled', false);
     $config->set('post.preview.background.style', false);
     $config->set('hide_last_row', $attributes['hide_last_row']);
     $config->set('image_layout', $attributes['proportion'] ? 'resize' : 'original');
     $config->set('thumb_proportions', $attributes['proportion']);
     $config->set('show_titles', $attributes['show_title']);
     $config->set('show_excerpts', $attributes['show_excerpt']);
     $config->set('target_height', $attributes['target_height']);
     $config->set('item_padding', $attributes['padding']);
     $config->set('post.preview.description.style', $attributes['descriptions']);
     $config->set('post.preview.description.alignment', $attributes['content_aligment']);
     $config->set('post.preview.hover.animation', $attributes['hover_animation']);
     $config->set('post.preview.hover.color', $attributes['hover_bg_color']);
     $config->set('post.preview.hover.content.visibility', $attributes['hover_content_visibility']);
     $config->set('post.preview.load.effect', $attributes['loading_effect'], 'fade_in');
     $config->set('post.preview.mini_images.enabled', $attributes['show_miniatures']);
     $config->set('post.meta.fields.media_number', $attributes['show_media_count']);
     $config->set('post.meta.fields.date', $attributes['show_date']);
     $config->set('post.meta.fields.categories', $attributes['show_categories']);
     $config->set('post.meta.fields.comments', $attributes['show_comments']);
     $config->set('post.meta.fields.author', $attributes['show_author']);
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:32,代码来源:albums-jgrid.php

示例9: setup_config

 protected function setup_config($instance = array())
 {
     $config = presscore_get_config();
     $config->set('image_layout', 'original');
     $config->set('thumb_proportions', array('width' => 0, 'height' => 0));
     $config->set('show_excerpts', $instance['show_excerpt']);
     $config->set('post.preview.width.min', 370);
     $config->set('template.columns.number', 3);
     $config->set('post.preview.background.enabled', true);
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:10,代码来源:team.php

示例10: do_action

<?php

/**
 * Product Loop Start
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.0
 */
do_action('dt_wc_loop_start');
do_action('presscore_before_loop');
// fullwidth wrap open
if (presscore_get_config()->get('full_width')) {
    echo '<div class="full-width-wrap">';
}
// masonry container open
echo '<div ' . presscore_masonry_container_class(array('wf-container')) . presscore_masonry_container_data_atts() . '>';
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:17,代码来源:loop-start.php

示例11: setup

 protected function setup($atts = array(), $content = null)
 {
     $this->config = presscore_get_config();
     $this->vc_is_inline = presscore_vc_is_inline();
     $this->atts = $this->sanitize_attributes($atts);
 }
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:6,代码来源:class-shortcode-masonry-posts.php

示例12: shortcode

 public function shortcode($atts, $content = null)
 {
     $this->atts = $this->sanitize_attributes($atts);
     $this->config = presscore_get_config();
     return $this->blog_masonry();
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:6,代码来源:blog-posts.php

示例13: presscore_add_metro_slideshow_scripts

    function presscore_add_metro_slideshow_scripts()
    {
        $config = presscore_get_config();
        if ('slideshow' == $config->get('header_title') && 'metro' == $config->get('slideshow_mode')) {
            $slider_rows = $config->get('slideshow_slides_in_raw') ? absint($config->get('slideshow_slides_in_raw')) : 3;
            $clider_cols = $config->get('slideshow_slides_in_column') ? absint($config->get('slideshow_slides_in_column')) : 6;
            ?>
		<script type="text/javascript">
			var swiperColH = <?php 
            echo $slider_rows;
            ?>
,
				swiperCol = <?php 
            echo $clider_cols;
            ?>
;
		</script>
		<?php 
        }
        // metro slideshow
    }
开发者ID:julia-ihnatova,项目名称:puppy,代码行数:21,代码来源:template-hooks.php

示例14: setup_config

 protected function setup_config()
 {
     $config = presscore_get_config();
     $attributes =& $this->atts;
     $config->set('template', 'albums');
     $config->set('template.layout.type', 'masonry');
     $config->set('layout', 'grid');
     $config->set('justified_grid', false);
     $config->set('all_the_same_width', true);
     $config->set('post.preview.width.min', $attributes['width'], 300);
     $config->set('post.preview.buttons.details.enabled', false);
     $config->set('post.preview.load.effect', false);
     $config->set('show_titles', $attributes['show_title']);
     $config->set('show_excerpts', $attributes['show_excerpt']);
     if ('under_image' == $attributes['descriptions']) {
         $config->set('post.preview.background.enabled', !in_array($attributes['bg_under_albums'], array('disabled', '')));
         $config->set('post.preview.background.style', $attributes['bg_under_albums']);
     } else {
         $config->set('post.preview.background.enabled', false);
         $config->set('post.preview.background.style', false);
     }
     $config->set('post.preview.description.style', $attributes['descriptions']);
     $config->set('post.preview.description.alignment', $attributes['content_aligment']);
     $config->set('post.preview.hover.animation', $attributes['hover_animation']);
     $config->set('post.preview.hover.color', $attributes['hover_bg_color']);
     $config->set('post.preview.hover.content.visibility', $attributes['hover_content_visibility']);
     $config->set('post.preview.mini_images.enabled', $attributes['show_miniatures']);
     $config->set('post.meta.fields.media_number', $attributes['show_media_count']);
     $config->set('post.meta.fields.date', $attributes['show_date']);
     $config->set('post.meta.fields.categories', $attributes['show_categories']);
     $config->set('post.meta.fields.comments', $attributes['show_comments']);
     $config->set('post.meta.fields.author', $attributes['show_author']);
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:33,代码来源:albums-slider.php

示例15: dt_get_template_part

 * Blog simple post content
 *
 * @package vogue
 * @since 1.0.0
 */
// File Security Check
if (!defined('ABSPATH')) {
    exit;
}
?>
<div class="blog-content wf-td">

	<?php 
dt_get_template_part('blog/blog-post-content-part', get_post_format());
?>

	<?php 
if (presscore_get_config()->get('show_details')) {
    echo presscore_post_details_link();
}
?>

	<?php 
echo presscore_new_posted_on('post');
?>

	<?php 
echo presscore_post_edit_link();
?>

</div>
开发者ID:noman90rauf,项目名称:wp-content,代码行数:31,代码来源:blog-masonry-post-content.php


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