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


PHP presscore_get_terms_list_by_slug函数代码示例

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


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

示例1: shortcode

 public function shortcode($atts, $content = null)
 {
     $this->sanitize_attributes($atts);
     // vc inline dummy
     if (presscore_vc_is_inline()) {
         $terms_title = _x('Display categories', 'vc inline dummy', 'the7mk2');
         return $this->vc_inline_dummy(array('class' => 'dt_vc-benefits', 'title' => _x('Benefits', 'vc inline dummy', 'the7mk2'), 'fields' => array($terms_title => presscore_get_terms_list_by_slug(array('slugs' => $this->atts['category'], 'taxonomy' => $this->taxonomy)))));
     }
     if ('dt_benefits' == get_post_type()) {
         return '';
     }
     self::$shortcodes_count++;
     $output = '';
     $dt_query = $this->get_posts_by_terms($this->atts);
     if ($dt_query->have_posts()) {
         $this->backup_post_object();
         $benefits = '';
         while ($dt_query->have_posts()) {
             $dt_query->the_post();
             $benefit_attr = $this->get_benefit_data();
             $benefit_content = apply_filters('the_content', get_the_content(''));
             $benefits .= $this->render_benefit($benefit_attr, $benefit_content);
         }
         $this->restore_post_object();
         $output .= '<section id="' . $this->get_shortcode_id() . '" ' . $this->get_container_html_class('benefits-grid wf-container') . $this->get_conatiner_data_attributes() . '>';
         $output .= $this->get_inline_stylesheet();
         $output .= $benefits;
         $output .= '</section>';
     }
     return $output;
 }
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:31,代码来源:benefits-vc.php

示例2: shortcode

 public function shortcode($atts, $content = null)
 {
     $attributes = $this->sanitize_attributes($atts);
     // vc inline dummy
     if (presscore_vc_is_inline()) {
         $terms_title = _x('Display categories', 'vc inline dummy', LANGUAGE_ZONE);
         $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => $this->taxonomy));
         return $this->vc_inline_dummy(array('class' => 'dt_vc-photos_masonry', 'title' => _x('Photos masonry', 'vc inline dummy', LANGUAGE_ZONE), 'fields' => array($terms_title => $terms_list)));
     }
     $output = '';
     $dt_query = $this->get_albums_attachments(array('orderby' => $attributes['orderby'], 'order' => $attributes['order'], 'number' => $attributes['number'], 'select' => $attributes['select'], 'category' => $attributes['category']));
     if ($dt_query->have_posts()) {
         $this->backup_post_object();
         $this->backup_theme_config();
         $this->setup_config($attributes);
         ob_start();
         do_action('presscore_before_shortcode_loop', $this->shortcode_name, $attributes);
         // masonry container open
         echo '<div ' . presscore_masonry_container_class(array('wf-container', 'dt-gallery-container', 'dt-photos-shortcode')) . presscore_masonry_container_data_atts() . presscore_get_share_buttons_for_prettyphoto('photo') . '>';
         while ($dt_query->have_posts()) {
             $dt_query->the_post();
             dt_get_template_part('media/media-masonry-post');
         }
         // masonry container close
         echo '</div>';
         do_action('presscore_after_shortcode_loop', $this->shortcode_name, $attributes);
         $output = ob_get_contents();
         ob_end_clean();
         $this->restore_theme_config();
         $this->restore_post_object();
     }
     return $output;
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:33,代码来源:photos-masonry.php

示例3: testimonials_slider

        protected function testimonials_slider($attributes = array())
        {
            if (presscore_vc_is_inline()) {
                $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => $this->taxonomy));
                $dummy = '
					<div class="dt_vc-shortcode_dummy dt_vc-testimonials" style="height: 250px;">
						<h5>Testimonials slider</h5>
						<p class="text-small"><strong>Display categories:</strong> ' . $terms_list . '</p>
					</div>
				';
                return $dummy;
            }
            $output = '';
            $dt_query = $this->get_posts_by_terms($attributes);
            if ($dt_query->have_posts()) {
                $autoslide = $attributes['autoslide'];
                $output .= '<ul class="testimonials slider-content rsCont"' . ($autoslide ? ' data-autoslide="' . $autoslide . '"' : '') . '>' . "\n";
                $this->backup_post_object();
                while ($dt_query->have_posts()) {
                    $dt_query->the_post();
                    $output .= '<li>' . Presscore_Inc_Testimonials_Post_Type::render_testimonial() . '</li>';
                }
                $this->restore_post_object();
                $output .= '</ul>' . "\n";
                $output = '<section class="testimonial-item testimonial-item-slider">' . $output . '</section>';
            }
            return $output;
        }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:28,代码来源:testimonials.php

示例4: shortcode

        public function shortcode($atts, $content = null)
        {
            $attributes = $this->sanitize_attributes($atts);
            if (presscore_vc_is_inline()) {
                $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => $this->taxonomy));
                $dummy = '
					<div class="dt_vc-shortcode_dummy dt_vc-photos_scroller" style="height: ' . $slider_args['height'] . 'px;">
						<h5>Photos scroller</h5>
						<p class="text-small"><strong>Display categories:</strong> ' . $terms_list . '</p>
					</div>
				';
                return $dummy;
            }
            $attachments_ids = array();
            // get albums
            $dt_query = $this->get_posts_by_terms(array_merge($attributes, array('number' => -1)));
            if ($dt_query->have_posts()) {
                // take albums id
                foreach ($dt_query->posts as $dt_post) {
                    $album_attachments = get_post_meta($dt_post->ID, '_dt_album_media_items', true);
                    if ($album_attachments) {
                        $attachments_ids = array_merge($attachments_ids, $album_attachments);
                    }
                }
            }
            if ('rand' == $attributes['orderby']) {
                shuffle($attachments_ids);
            }
            // new query to take attachments
            $attachments_data = presscore_get_attachment_post_data($attachments_ids, 'post__in', 'DESC', $attributes['number']);
            $config = Presscore_Config::get_instance();
            $slider_class = array('shortcode-instagram');
            if ('disabled' == $config->get('sidebar_position')) {
                $slider_class[] = 'full';
            }
            $slider_style = array();
            if ($attributes['margin_bottom']) {
                $slider_style[] = 'margin-bottom: ' . $attributes['margin_bottom'];
            }
            if ($attributes['margin_top']) {
                $slider_style[] = 'margin-top: ' . $attributes['margin_top'];
            }
            $slider_fields = array();
            /*if ( $attributes['arrows'] ) {
            			$slider_fields[] = 'arrows';
            		}*/
            $sharebuttons = presscore_get_share_buttons_for_prettyphoto('photo');
            $slider_args = array('fields' => $slider_fields, 'class' => $slider_class, 'style' => implode(';', $slider_style), 'link' => $attributes['lightbox'] ? 'file' : 'none', 'popup' => $attributes['lightbox'] ? 'gallery' : 'none', 'container_attr' => $sharebuttons);
            /*if ( $attributes['slider_title'] ) {
            			$slider_args['title'] = $attributes['slider_title'];
            		}*/
            if ($attributes['height']) {
                $slider_args['height'] = $attributes['height'];
            }
            if ($attributes['width']) {
                $slider_args['img_width'] = $attributes['width'];
            }
            $output = presscore_get_fullwidth_slider_two($attachments_data, $slider_args);
            return $output;
        }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:60,代码来源:small-photos.php

示例5: shortcode

    public function shortcode($atts, $content = null)
    {
        extract(shortcode_atts(array('featured_images' => 'true', 'round_images' => '', 'images_width' => 60, 'images_height' => 60, 'category' => '', 'order' => '', 'orderby' => '', 'number' => 6, 'columns' => 1), $atts));
        // sanitize attributes
        $featured_images = apply_filters('dt_sanitize_flag', $featured_images);
        $round_images = apply_filters('dt_sanitize_flag', $round_images);
        $order = apply_filters('dt_sanitize_order', $order);
        $orderby = apply_filters('dt_sanitize_orderby', $orderby);
        $number = apply_filters('dt_sanitize_posts_per_page', $number);
        $columns = absint($columns);
        $images_width = absint($images_width);
        $images_height = absint($images_height);
        if ($category) {
            $category = explode(',', $category);
            $category = array_map('trim', $category);
        }
        $related_posts_args = array('exclude_current' => false, 'post_type' => 'post', 'taxonomy' => 'category', 'field' => 'slug', 'args' => array('posts_per_page' => $number, 'orderby' => $orderby, 'order' => $order));
        if (!empty($category)) {
            $related_posts_args['cats'] = $category;
            $related_posts_args['select'] = 'only';
        } else {
            $related_posts_args['select'] = 'all';
        }
        $attachments_data = presscore_get_related_posts($related_posts_args);
        $list_args = array('show_images' => $featured_images, 'image_dimensions' => array('w' => $images_width, 'h' => $images_height));
        $posts_list = presscore_get_posts_small_list($attachments_data, $list_args);
        switch ($columns) {
            case 2:
                $column_class = 'wf-1-2';
                break;
            case 3:
                $column_class = 'wf-1-3';
                break;
            case 1:
            default:
                $column_class = 'wf-1';
        }
        $output = '';
        if ($posts_list) {
            foreach ($posts_list as $p) {
                $output .= sprintf('<div class="wf-cell %s"><div class="borders">%s</div></div>', $column_class, $p);
            }
            $section_class = 'items-grid wf-container';
            if ($featured_images && $round_images) {
                $section_class .= ' round-images';
            }
            $output = '<section class="' . $section_class . '">' . $output . '</section>';
        }
        if (function_exists('vc_is_inline') && vc_is_inline()) {
            $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $category, 'taxonomy' => 'category'));
            $output = '
				<div class="dt_vc-shortcode_dummy dt_vc-mini_blog" style="height: 250px;">
					<h5>Mini blog</h4>
					<p class="text-small"><strong>Display categories:</strong> ' . $terms_list . '</p>
				</div>
			';
        }
        return $output;
    }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:59,代码来源:blog-posts-small.php

示例6: shortcode

 public function shortcode($atts, $content = null)
 {
     parent::setup($atts, $content);
     // vc inline dummy
     if ($this->vc_is_inline) {
         $terms_title = _x('Display categories', 'vc inline dummy', 'the7mk2');
         return $this->vc_inline_dummy(array('class' => 'dt_vc-photos_justified_grid', 'title' => _x('Photos Justified Grid', 'vc inline dummy', 'the7mk2'), 'fields' => array($terms_title => presscore_get_terms_list_by_slug(array('slugs' => $this->atts['category'], 'taxonomy' => $this->taxonomy)))));
     }
     return $this->shortcode_html();
 }
开发者ID:armslee,项目名称:wp_requid,代码行数:10,代码来源:photos-jgrid.php

示例7: shortcode

 public function shortcode($atts, $content = null)
 {
     $attributes = $this->sanitize_attributes($atts);
     // vc inline dummy
     if (presscore_vc_is_inline()) {
         $terms_title = _x('Display categories', 'vc inline dummy', LANGUAGE_ZONE);
         $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => $this->taxonomy));
         return $this->vc_inline_dummy(array('class' => 'dt_vc-albums_justified_grid', 'title' => _x('Albums justified grid', 'vc inline dummy', LANGUAGE_ZONE), 'fields' => array($terms_title => $terms_list)));
     }
     return $this->albums_jsgrid($attributes);
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:11,代码来源:albums-jgrid.php

示例8: shortcode

 public function shortcode($atts, $content = null)
 {
     $this->atts = $this->sanitize_attributes($atts);
     // vc inline dummy
     if (presscore_vc_is_inline()) {
         $terms_title = _x('Display categories', 'vc inline dummy', 'the7mk2');
         $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $this->atts['category'], 'taxonomy' => $this->taxonomy));
         return $this->vc_inline_dummy(array('class' => 'dt_vc-portfolio_scroller', 'title' => _x('Portfolio scroller', 'vc inline dummy', 'the7mk2'), 'fields' => array($terms_title => $terms_list)));
     }
     return $this->portfolio_slider();
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:11,代码来源:portfolio-slider.php

示例9: shortcode

 public function shortcode($atts, $content = null)
 {
     $attributes = $this->sanitize_attributes($atts);
     // vc inline dummy
     if (presscore_vc_is_inline()) {
         $terms_title = _x('Display categories', 'vc inline dummy', LANGUAGE_ZONE);
         $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => $this->taxonomy));
         return $this->vc_inline_dummy(array('class' => 'dt_vc-portfolio_jgrid', 'title' => _x('Portfolio justified grid', 'vc inline dummy', LANGUAGE_ZONE), 'fields' => array($terms_title => $terms_list)));
     }
     $output = '';
     $dt_query = $this->get_posts_by_terms(array('orderby' => $attributes['orderby'], 'order' => $attributes['order'], 'number' => $attributes['number'], 'select' => $attributes['select'], 'category' => $attributes['category']));
     if ($dt_query->have_posts()) {
         $this->backup_post_object();
         $this->backup_theme_config();
         $this->setup_config($attributes);
         ob_start();
         do_action('presscore_before_shortcode_loop', $this->shortcode_name, $attributes);
         // fullwidth wrap open
         if ($attributes['full_width']) {
             echo '<div class="full-width-wrap">';
         }
         // masonry container open
         echo '<div ' . presscore_masonry_container_class(array('wf-container', 'dt-portfolio-shortcode')) . presscore_masonry_container_data_atts() . '>';
         while ($dt_query->have_posts()) {
             $dt_query->the_post();
             presscore_populate_portfolio_config();
             dt_get_template_part('portfolio/masonry/portfolio-masonry-post');
         }
         // masonry container close
         echo '</div>';
         // fullwidth wrap close
         if ($attributes['full_width']) {
             echo '</div>';
         }
         do_action('presscore_after_shortcode_loop', $this->shortcode_name, $attributes);
         $output = ob_get_contents();
         ob_end_clean();
         $this->restore_theme_config();
         $this->restore_post_object();
     }
     return $output;
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:42,代码来源:portfolio-jgrid.php

示例10: shortcode

        public function shortcode($atts, $content = null)
        {
            $attributes = $this->sanitize_attributes($atts);
            if (presscore_vc_is_inline()) {
                $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => 'dt_team_category'));
                $dummy = '
					<div class="dt_vc-shortcode_dummy dt_vc-team" style="height: 250px;">
						<h5>Team</h5>
						<p class="text-small"><strong>Display categories:</strong> ' . $terms_list . '</p>
					</div>
				';
                return $dummy;
            }
            $output = '';
            $dt_query = $this->get_posts_by_terms($attributes);
            if ($dt_query->have_posts()) {
                $this->backup_post_object();
                $this->backup_theme_config();
                $this->setup_config($attributes);
                ob_start();
                do_action('presscore_before_shortcode_loop', $this->shortcode_name, $attributes);
                if ($attributes['full_width']) {
                    echo '<div class="full-width-wrap">';
                }
                echo '<div ' . presscore_masonry_container_class(array('wf-container')) . presscore_masonry_container_data_atts() . '>';
                while ($dt_query->have_posts()) {
                    $dt_query->the_post();
                    presscore_populate_team_config();
                    dt_get_template_part('team/team-post');
                }
                echo '</div>';
                if ($attributes['full_width']) {
                    echo '</div>';
                }
                do_action('presscore_after_shortcode_loop', $this->shortcode_name, $attributes);
                $output .= ob_get_contents();
                ob_end_clean();
                $this->restore_theme_config();
                $this->restore_post_object();
            }
            return $output;
        }
开发者ID:armslee,项目名称:wp_requid,代码行数:42,代码来源:team.php

示例11: shortcode

 public function shortcode($atts, $content = null)
 {
     $attributes = $this->atts = $this->sanitize_attributes($atts);
     // vc inline dummy
     if (presscore_vc_is_inline()) {
         $terms_title = _x('Display categories', 'vc inline dummy', 'the7mk2');
         $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => $this->taxonomy));
         return $this->vc_inline_dummy(array('class' => 'dt_vc-photos_scroller', 'title' => _x('Photos scroller', 'vc inline dummy', 'the7mk2'), 'fields' => array($terms_title => $terms_list)));
     }
     $output = '';
     $dt_query = $this->get_albums_attachments(array('orderby' => $attributes['orderby'], 'order' => 'DESC', 'number' => $attributes['number'], 'select' => $attributes['select'], 'category' => $attributes['category']));
     if ($dt_query->have_posts()) {
         $this->backup_post_object();
         $this->backup_theme_config();
         $this->setup_config();
         $this->add_hooks();
         ob_start();
         // loop
         while ($dt_query->have_posts()) {
             $dt_query->the_post();
             echo '<li class="fs-entry">';
             dt_get_template_part('media/media-masonry-post');
             echo '</li>';
         }
         $posts_html = ob_get_contents();
         ob_end_clean();
         // shape output
         $output = '<div ' . $this->get_container_html_class(array('dt-photos-shortcode', 'slider-wrapper', 'shortcode-instagram', 'dt-gallery-container')) . ' ' . $this->get_container_data_atts() . presscore_get_share_buttons_for_prettyphoto('photo') . '>';
         $output .= '<div class="frame fullwidth-slider"><ul class="clearfix">' . $posts_html . '</ul></div>';
         if ($attributes['arrows']) {
             $output .= '<div class="prev"><i></i></div><div class="next"><i></i></div>';
         }
         $output .= '</div>';
         // cleanup
         $this->remove_hooks();
         $this->restore_theme_config();
         $this->restore_post_object();
     }
     return $output;
 }
开发者ID:armslee,项目名称:wp_requid,代码行数:40,代码来源:photos-slider.php

示例12: portfolio_slider

    /**
     * Portfolio slider.
     *
     */
    public function portfolio_slider($attributes = array())
    {
        $config = Presscore_Config::get_instance();
        $slider_class = array();
        if ('disabled' == $config->get('sidebar_position')) {
            $slider_class[] = 'full';
        }
        $slider_fields = array();
        if ($attributes['show_title']) {
            $slider_fields[] = 'title';
        }
        if ($attributes['meta_info']) {
            $slider_fields[] = 'meta';
        }
        if ($attributes['show_excerpt']) {
            $slider_fields[] = 'description';
        }
        if ($attributes['show_link']) {
            $slider_fields[] = 'link';
        }
        if ($attributes['show_zoom']) {
            $slider_fields[] = 'zoom';
        }
        if ($attributes['show_details']) {
            $slider_fields[] = 'details';
        }
        $slider_style = array();
        if ($attributes['margin_bottom']) {
            $slider_style[] = 'margin-bottom: ' . $attributes['margin_bottom'];
        }
        if ($attributes['margin_top']) {
            $slider_style[] = 'margin-top: ' . $attributes['margin_top'];
        }
        $slider_args = array('mode' => $attributes['appearance'], 'fields' => $slider_fields, 'class' => $slider_class, 'style' => implode(';', $slider_style), 'under_image_buttons' => $attributes['under_image_buttons'], 'hover_animation' => $attributes['hover_animation'], 'hover_bg_color' => $attributes['hover_bg_color'], 'hover_content_visibility' => $attributes['hover_content_visibility']);
        if ($attributes['height']) {
            $slider_args['height'] = $attributes['height'];
        }
        if ($attributes['width']) {
            $slider_args['img_width'] = $attributes['width'];
        }
        if (function_exists('vc_is_inline') && vc_is_inline()) {
            $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => 'dt_portfolio_category'));
            $output = '
				<div class="dt_vc-shortcode_dummy dt_vc-portfolio_scroller" style="height: ' . $slider_args['height'] . 'px;">
					<h5>Portfolio scroller</h5>
					<p class="text-small"><strong>Display categories:</strong> ' . $terms_list . '</p>
				</div>
			';
        } else {
            $related_posts_args = array('exclude_current' => false, 'post_type' => 'dt_portfolio', 'taxonomy' => 'dt_portfolio_category', 'field' => 'slug', 'args' => array('posts_per_page' => $attributes['number'], 'orderby' => $attributes['orderby'], 'order' => $attributes['order']));
            $related_posts_args['cats'] = $attributes['category'];
            if (!empty($attributes['category'])) {
                $related_posts_args['select'] = 'only';
            } else {
                $related_posts_args['select'] = 'all';
            }
            $attachments_data = presscore_get_related_posts($related_posts_args);
            $output = presscore_get_fullwidth_slider_two_with_hovers($attachments_data, $slider_args);
        }
        return $output;
    }
开发者ID:scottnkerr,项目名称:eeco,代码行数:65,代码来源:functions.php

示例13: shortcode

    public function shortcode($atts, $content = null)
    {
        global $post;
        $attributes = shortcode_atts(array('type' => 'masonry', 'category' => '', 'order' => '', 'orderby' => '', 'number' => '6', 'padding' => '5', 'column_width' => '370', 'full_width' => ''), $atts);
        // sanitize attributes
        $attributes['type'] = in_array($attributes['type'], array('masonry', 'grid')) ? $attributes['type'] : 'masonry';
        $attributes['order'] = apply_filters('dt_sanitize_order', $attributes['order']);
        $attributes['orderby'] = apply_filters('dt_sanitize_orderby', $attributes['orderby']);
        $attributes['number'] = apply_filters('dt_sanitize_posts_per_page', $attributes['number']);
        $attributes['full_width'] = apply_filters('dt_sanitize_flag', $attributes['full_width']);
        $attributes['padding'] = intval($attributes['padding']);
        $attributes['column_width'] = intval($attributes['column_width']);
        if ($attributes['category']) {
            $attributes['category'] = explode(',', $attributes['category']);
            $attributes['category'] = array_map('trim', $attributes['category']);
            $attributes['select'] = 'only';
        } else {
            $attributes['select'] = 'all';
        }
        $post_backup = $post;
        $dt_query = $this->get_posts_by_terms($attributes);
        $output = '';
        if ($dt_query->have_posts()) {
            $config = Presscore_Config::get_instance();
            // backup and reset config
            $config_backup = $config->get();
            $config->set('layout', $attributes['type']);
            $config->set('template', 'team');
            $config->set('columns', -1);
            $config->set('target_width', $attributes['column_width']);
            // add masonry wrap
            $has_masonry_filters = has_filter('presscore_before_post', 'presscore_before_post_masonry');
            if (!$has_masonry_filters) {
                add_action('presscore_before_post', 'presscore_before_post_masonry', 15);
                add_action('presscore_after_post', 'presscore_after_post_masonry', 15);
            }
            while ($dt_query->have_posts()) {
                $dt_query->the_post();
                ob_start();
                get_template_part('content', 'team');
                $output .= ob_get_contents();
                ob_end_clean();
            }
            // remove masonry wrap
            if (!$has_masonry_filters) {
                remove_action('presscore_before_post', 'presscore_before_post_masonry', 15);
                remove_action('presscore_after_post', 'presscore_after_post_masonry', 15);
            }
            // restore original $post
            $post = $post_backup;
            setup_postdata($post);
            // restore config
            $config->reset($config_backup);
            // masonry layout classes
            $masonry_container_classes = array('wf-container');
            switch ($attributes['type']) {
                case 'grid':
                    $masonry_container_classes[] = 'grid-masonry';
                    break;
                case 'masonry':
                    $masonry_container_classes[] = 'iso-container';
            }
            $masonry_container_classes = implode(' ', $masonry_container_classes);
            $masonry_container_data_attr = array('data-padding="' . intval($attributes['padding']) . 'px"', 'data-width="' . intval($attributes['column_width']) . 'px"');
            // ninjaaaa!
            $masonry_container_data_attr = ' ' . implode(' ', $masonry_container_data_attr);
            // wrap output
            $output = sprintf('<div class="%s"%s>%s</div>', esc_attr($masonry_container_classes), $masonry_container_data_attr, $output);
            if ($attributes['full_width']) {
                $output = '<div class="full-width-wrap">' . $output . '</div>';
            }
        }
        // if have posts
        if (function_exists('vc_is_inline') && vc_is_inline()) {
            $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => 'dt_team_category'));
            $output = '
				<div class="dt_vc-shortcode_dummy dt_vc-team" style="height: 250px;">
					<h5>Team</h5>
					<p class="text-small"><strong>Display categories:</strong> ' . $terms_list . '</p>
				</div>
			';
        }
        return $output;
    }
开发者ID:scottnkerr,项目名称:eeco,代码行数:84,代码来源:functions.php

示例14: testimonials_slider

    /**
     * Testimonials slider.
     *
     */
    public function testimonials_slider($attributes = array())
    {
        global $post;
        $dt_query = $this->get_posts_by_terms($attributes);
        $autoslide = absint($attributes['autoslide']);
        $output = '';
        if ($dt_query->have_posts()) {
            $post_backup = $post;
            $output .= '<ul class="testimonials slider-content rsCont"' . ($autoslide ? ' data-autoslide="' . $autoslide . '"' : '') . '>' . "\n";
            while ($dt_query->have_posts()) {
                $dt_query->the_post();
                $output .= '<li>' . Presscore_Inc_Testimonials_Post_Type::render_testimonial() . '</li>';
            }
            $post = $post_backup;
            setup_postdata($post);
            $output .= '</ul>' . "\n";
            $output = '<section class="testimonial-item testimonial-item-slider">' . $output . '</section>';
        }
        // if have posts
        if (function_exists('vc_is_inline') && vc_is_inline()) {
            $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => 'dt_testimonials_category'));
            $output = '
				<div class="dt_vc-shortcode_dummy dt_vc-testimonials" style="height: 250px;">
					<h5>Testimonials slider</h5>
					<p class="text-small"><strong>Display categories:</strong> ' . $terms_list . '</p>
				</div>
			';
        }
        return $output;
    }
开发者ID:scottnkerr,项目名称:eeco,代码行数:34,代码来源:functions.php

示例15: portfolio_masonry


//.........这里部分代码省略.........
                ob_start();
                dt_get_template_part('portfolio-masonry-content');
                $output .= ob_get_contents();
                ob_end_clean();
            }
            // remove image height filter
            remove_filter('dt_portfolio_thumbnail_args', array($this, 'portfolio_image_filter'), 15);
            // add proportions filter
            add_filter('dt_portfolio_thumbnail_args', 'presscore_add_thumbnail_class_for_masonry', 15);
            // remove masonry wrap
            if ($before_post_hook_added) {
                remove_action('presscore_before_post', 'presscore_before_post_masonry', 15);
            }
            if ($after_post_hook_added) {
                remove_action('presscore_after_post', 'presscore_after_post_masonry', 15);
            }
            if ($details_already_hidden) {
                // remove details filter
                remove_filter('presscore_post_details_link', 'presscore_return_empty_string');
            }
            // restore original $post
            $post = $post_backup;
            setup_postdata($post);
            // restore config
            $config->reset($config_backup);
            $desc_on_hover = 'under_image' != $attributes['descriptions'];
            // masonry layout classes
            $masonry_container_classes = array('wf-container');
            switch ($attributes['type']) {
                case 'grid':
                    $masonry_container_classes[] = 'portfolio-grid';
                    if ($desc_on_hover) {
                        $masonry_container_classes[] = 'grid-text-hovers';
                        $masonry_container_classes[] = 'description-on-hover';
                    } else {
                        $masonry_container_classes[] = 'description-under-image';
                    }
                    break;
                case 'masonry':
                    $masonry_container_classes[] = 'iso-container';
                    $masonry_container_classes[] = 'layout-masonry';
                    if ($desc_on_hover) {
                        $masonry_container_classes[] = 'layout-masonry-grid';
                        $masonry_container_classes[] = 'description-on-hover';
                    } else {
                        $masonry_container_classes[] = 'description-under-image';
                    }
            }
            // hover classes
            switch ($attributes['descriptions']) {
                case 'on_hoover_centered':
                    $masonry_container_classes[] = 'hover-style-two';
                case 'on_hoover':
                    if ('dark' == $attributes['hover_bg_color']) {
                        $masonry_container_classes[] = 'hover-color-static';
                    }
                    if ('move_to' == $attributes['hover_animation']) {
                        $masonry_container_classes[] = 'cs-style-1';
                    } else {
                        if ('direction_aware' == $attributes['hover_animation']) {
                            $masonry_container_classes[] = 'hover-grid';
                        }
                    }
                    break;
                case 'on_dark_gradient':
                    $masonry_container_classes[] = 'hover-style-one';
                    if ('always' == $attributes['hover_content_visibility']) {
                        $masonry_container_classes[] = 'always-show-info';
                    }
                    break;
                case 'from_bottom':
                    $masonry_container_classes[] = 'hover-style-three';
                    $masonry_container_classes[] = 'cs-style-3';
                    if ('always' == $attributes['hover_content_visibility']) {
                        $masonry_container_classes[] = 'always-show-info';
                    }
                    break;
            }
            $masonry_container_classes = implode(' ', $masonry_container_classes);
            $masonry_container_data_attr = array('data-padding="' . intval($attributes['padding']) . 'px"', 'data-width="' . intval($attributes['column_width']) . 'px"');
            // ninjaaaa!
            $masonry_container_data_attr = ' ' . implode(' ', $masonry_container_data_attr);
            // wrap output
            $output = sprintf('<div class="%s"%s>%s</div>', esc_attr($masonry_container_classes), $masonry_container_data_attr, $output);
            if ($attributes['full_width']) {
                $output = '<div class="full-width-wrap">' . $output . '</div>';
            }
        }
        // if have posts
        if (function_exists('vc_is_inline') && vc_is_inline()) {
            $terms_list = presscore_get_terms_list_by_slug(array('slugs' => $attributes['category'], 'taxonomy' => 'dt_portfolio_category'));
            $output = '
				<div class="dt_vc-shortcode_dummy dt_vc-portfolio" style="height: 250px;">
					<h5>Portfolio</h5>
					<p class="text-small"><strong>Display categories:</strong> ' . $terms_list . '</p>
				</div>
			';
        }
        return $output;
    }
开发者ID:scottnkerr,项目名称:eeco,代码行数:101,代码来源:functions.php


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