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


PHP presscore_masonry_container_class函数代码示例

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


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

示例1: shortcode_html

 protected function shortcode_html()
 {
     $dt_query = $this->get_albums_attachments(array('orderby' => $this->atts['orderby'], 'order' => $this->atts['order'], 'number' => $this->atts['number'], 'select' => $this->atts['select'], 'category' => $this->atts['category']));
     $output = '';
     if ($dt_query->have_posts()) {
         $this->backup_post_object();
         $this->backup_theme_config();
         $this->setup_config();
         ob_start();
         do_action('presscore_before_shortcode_loop', $this->shortcode_name, $this->atts);
         // 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, $this->atts);
         $output = ob_get_contents();
         ob_end_clean();
         $this->restore_theme_config();
         $this->restore_post_object();
     }
     return $output;
 }
开发者ID:armslee,项目名称:wp_requid,代码行数:26,代码来源:photos-jgrid.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: albums_jsgrid

 protected function albums_jsgrid(&$attributes)
 {
     $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-albums-shortcode')) . presscore_masonry_container_data_atts() . '>';
         while ($dt_query->have_posts()) {
             $dt_query->the_post();
             presscore_populate_album_post_config();
             dt_get_template_part('albums/masonry/albums-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,代码行数:35,代码来源:albums-jgrid.php

示例4: get_container_html_class

 protected function get_container_html_class($class = array())
 {
     switch ($this->args['arrows']) {
         case 'light':
             $class[] = 'arrows-light';
             break;
         case 'dark':
             $class[] = 'arrows-dark';
             break;
         case 'accent':
             $class[] = 'arrows-accent';
             break;
     }
     $class[] = $this->args['class'];
     $html_class = presscore_masonry_container_class($class);
     $html_class = str_replace(array(' iso-grid', 'iso-grid ', ' loading-effect-fade-in', 'loading-effect-fade-in '), '', $html_class);
     return $html_class;
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:18,代码来源:presscore-posts-slider-scroller.class.php

示例5: 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

示例6: the_loop

 protected function the_loop($args = array())
 {
     $default_args = array('masonry_container_class' => array('wf-container'), 'masonry_container_data' => array(), 'post_template_callback' => null, 'query' => null, 'post_type' => $this->post_type, 'taxonomy' => $this->taxonomy, 'select' => 'all', 'show_filter' => false, 'full_width' => false, 'posts_per_page' => '-1');
     $args = wp_parse_args($args, $default_args);
     if (!isset($args['query'], $args['post_template_callback']) || !is_callable($args['post_template_callback'])) {
         return '';
     }
     ob_start();
     do_action('presscore_before_shortcode_loop', $this->shortcode_name, $this->atts);
     // main wrap
     echo '<div class="dt-shortcode with-isotope">';
     // posts filter
     $this->display_posts_filter(array('post_type' => $this->post_type, 'taxonomy' => $this->taxonomy, 'query' => $args['query'], 'select' => $args['select'], 'show_category_filter' => $args['show_filter']));
     // fullwidth wrap open
     if ($args['full_width']) {
         echo '<div class="full-width-wrap">';
     }
     $container_data = array('data-posts-per-page="' . $args['posts_per_page'] . '"');
     $container_data = empty($args['masonry_container_data']) ? $container_data : array_merge($container_data, (array) $args['masonry_container_data']);
     // masonry container open
     echo '<div ' . presscore_masonry_container_class($args['masonry_container_class']) . presscore_masonry_container_data_atts($container_data) . '>';
     while ($args['query']->have_posts()) {
         $args['query']->the_post();
         call_user_func($args['post_template_callback']);
     }
     // masonry container close
     echo '</div>';
     // fullwidth wrap close
     if ($args['full_width']) {
         echo '</div>';
     }
     // pagination
     if ($args['posts_per_page'] > 0) {
         dt_paginator($args['query'], array('class' => 'paginator iso-paginator', 'max_num_pages' => intval(ceil(count($args['query']->posts) / $args['posts_per_page'])), 'posts_per_page' => $args['posts_per_page'], 'paged' => 1));
     }
     // main wrap
     echo '</div>';
     do_action('presscore_after_shortcode_loop', $this->shortcode_name, $this->atts);
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:42,代码来源:class-shortcode-masonry-posts.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-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

示例8: blog_masonry

 private function blog_masonry()
 {
     $output = '';
     $dt_query = $this->get_posts_by_terms(array('orderby' => $this->atts['orderby'], 'order' => $this->atts['order'], 'number' => $this->atts['number'], 'select' => $this->atts['select'], 'category' => $this->atts['category']));
     if ($dt_query->have_posts()) {
         $this->backup_post_object();
         $this->backup_theme_config();
         $this->setup_config();
         ob_start();
         do_action('presscore_before_shortcode_loop', $this->shortcode_name, $this->atts);
         // fullwidth wrap open
         if ($this->atts['full_width']) {
             echo '<div class="full-width-wrap">';
         }
         // masonry container open
         echo '<div ' . presscore_masonry_container_class(array('wf-container', 'dt-blog-shortcode')) . presscore_masonry_container_data_atts() . '>';
         while ($dt_query->have_posts()) {
             $dt_query->the_post();
             presscore_populate_post_config();
             $this->config->set('post.preview.gallery.style', 'hovered_gallery');
             dt_get_template_part('blog/masonry/blog-masonry-post');
         }
         // masonry container close
         echo '</div>';
         // fullwidth wrap close
         if ($this->atts['full_width']) {
             echo '</div>';
         }
         do_action('presscore_after_shortcode_loop', $this->shortcode_name, $this->atts);
         $output = ob_get_contents();
         ob_end_clean();
         // cleanup
         $this->restore_theme_config();
         $this->restore_post_object();
     }
     return $output;
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:37,代码来源:blog-posts.php

示例9: do_action

 do_action('presscore_before_loop');
 if (post_password_required()) {
     the_content();
 } else {
     // backup config
     $config_backup = $config->get();
     ///////////////////////
     // Posts Filer //
     ///////////////////////
     presscore_display_posts_filter(array('post_type' => 'post', 'taxonomy' => 'category'));
     // fullwidth wrap open
     if ($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() . '>';
     //////////////////////
     // Custom loop //
     //////////////////////
     $page_query = presscore_get_blog_query();
     if ($page_query->have_posts()) {
         while ($page_query->have_posts()) {
             $page_query->the_post();
             // populate config with current post settings
             presscore_populate_post_config();
             presscore_get_template_part('theme', 'blog/masonry/blog-masonry-post');
         }
         wp_reset_postdata();
     }
     // masonry container close
     echo '</div>';
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:31,代码来源:template-blog-masonry.php

示例10: while

 if (have_posts()) {
     while (have_posts()) {
         the_post();
         // main loop
         do_action('presscore_before_loop');
         if (post_password_required()) {
             the_content();
         } else {
             // backup config
             $config_backup = $config->get();
             // fullwidth wrap open
             if ($config->get('full_width')) {
                 echo '<div class="full-width-wrap">';
             }
             // masonry container open
             echo '<div ' . presscore_masonry_container_class(array('wf-container', 'dt-gallery-container')) . presscore_masonry_container_data_atts() . presscore_get_share_buttons_for_prettyphoto('photo') . '>';
             //////////////////////
             // Custom loop //
             //////////////////////
             if (function_exists('presscore_mod_albums_get_photos')) {
                 $page_query = presscore_mod_albums_get_photos();
                 if ($page_query->have_posts()) {
                     while ($page_query->have_posts()) {
                         $page_query->the_post();
                         presscore_get_template_part('mod_albums', 'photo-masonry/photo');
                     }
                     wp_reset_postdata();
                 }
             }
             // masonry container close
             echo '</div>';
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:31,代码来源:template-media-jgrid.php

示例11: portfolio_masonry

 /**
  * Portfolio masonry.
  *
  */
 public function portfolio_masonry()
 {
     global $post;
     $post_backup = $post;
     $dt_query = $this->get_posts_by_terms($this->atts);
     $output = '';
     if ($dt_query->have_posts()) {
         $config = Presscore_Config::get_instance();
         // backup and reset config
         $config_backup = $config->get();
         $this->setup_config();
         $details_already_hidden = false;
         if (!$config->get('show_details') && !has_filter('presscore_post_details_link', 'presscore_return_empty_string')) {
             add_filter('presscore_post_details_link', 'presscore_return_empty_string');
             $details_already_hidden = true;
         }
         $before_post_hook_added = false;
         $after_post_hook_added = false;
         // add masonry wrap
         if (!has_filter('presscore_before_post', 'presscore_before_post_masonry')) {
             add_action('presscore_before_post', 'presscore_before_post_masonry', 15);
             $before_post_hook_added = true;
         }
         if (!has_filter('presscore_after_post', 'presscore_after_post_masonry')) {
             add_action('presscore_after_post', 'presscore_after_post_masonry', 15);
             $after_post_hook_added = true;
         }
         // remove proportions filter
         remove_filter('dt_portfolio_thumbnail_args', 'presscore_add_thumbnail_class_for_masonry', 15);
         // add image height filter
         add_filter('dt_portfolio_thumbnail_args', array($this, 'portfolio_image_filter'), 15);
         // loop
         while ($dt_query->have_posts()) {
             $dt_query->the_post();
             // populate post config
             presscore_populate_portfolio_config();
             ob_start();
             dt_get_template_part('portfolio/masonry/portfolio-masonry-post');
             $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');
         }
         $output = '<div ' . presscore_masonry_container_class(array('wf-container', 'dt-portfolio-shortcode')) . presscore_masonry_container_data_atts() . '>' . $output . '</div>';
         if ($this->atts['full_width']) {
             $output = '<div class="full-width-wrap">' . $output . '</div>';
         }
         // restore original $post
         $post = $post_backup;
         setup_postdata($post);
         // restore config
         $config->reset($config_backup);
     }
     // if have posts
     return $output;
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:73,代码来源:portfolio.php


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