예제 #1
0
 function axiom_taxonomy_fill_options_column($output = '', $column_name = '', $tax_id = 0)
 {
     if ($column_name != 'theme_options') {
         return;
     }
     if ($props = axiom_taxonomy_load_custom_options($tax_id)) {
         global $AXIOM_GLOBALS;
         $options = '';
         foreach ($props as $prop_name => $prop_value) {
             if (!axiom_is_inherit_option($prop_value) && (!isset($AXIOM_GLOBALS['options'][$prop_name]['type']) || $AXIOM_GLOBALS['options'][$prop_name]['type'] != 'hidden')) {
                 $prop_title = isset($AXIOM_GLOBALS['options'][$prop_name]) && !empty($AXIOM_GLOBALS['options'][$prop_name]['title']) ? $AXIOM_GLOBALS['options'][$prop_name]['title'] : $prop_name;
                 $options .= '<div class="axiom_options_prop_row"><span class="axiom_options_prop_name">' . esc_html($prop_title) . '</span>&nbsp;=&nbsp;<span class="axiom_options_prop_value">' . (is_array($prop_value) ? __('[Complex Data]', 'axiom') : '"' . esc_html(axiom_strshort($prop_value, 80)) . '"') . '</span></div>';
             }
         }
     }
     if (!empty($options)) {
         echo '<div class="axiom_options_list">' . trim(chop($options)) . '</div>';
     }
 }
예제 #2
0
파일: excerpt.php 프로젝트: pcuervo/odc
    function axiom_template_excerpt_output($post_options, $post_data)
    {
        $show_title = true;
        //!in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote'));
        $tag = axiom_sc_in_shortcode_blogger(true) ? 'div' : 'article';
        ?>
		<<?php 
        echo $tag;
        ?>
 <?php 
        post_class('post_item post_item_excerpt post_featured_' . esc_attr($post_options['post_class']) . ' post_format_' . esc_attr($post_data['post_format']) . ($post_options['number'] % 2 == 0 ? ' even' : ' odd') . ($post_options['number'] == 0 ? ' first' : '') . ($post_options['number'] == $post_options['posts_on_page'] ? ' last' : '') . ($post_options['add_view_more'] ? ' viewmore' : ''));
        ?>
>

			<?php 
        $post_icon = axiom_get_custom_option('show_post_icon') == 'yes' ? '<span class="post_icon ' . esc_attr($post_data['post_icon']) . '"></span>' : '';
        ?>

			<?php 
        if ($post_data['post_flags']['sticky']) {
            ?>
<span class="sticky_label"></span><?php 
        }
        if ($show_title && $post_options['location'] == 'center' && !empty($post_data['post_title'])) {
            ?>
<h3 class="post_title"><a href="<?php 
            echo esc_url($post_data['post_link']);
            ?>
"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</a></h3><?php 
        }
        if (!$post_data['post_protected'] && (!empty($post_options['dedicated']) || $post_data['post_thumb'] || $post_data['post_gallery'] || $post_data['post_video'] || $post_data['post_audio'])) {
            ?>
				<div class="post_featured">
				<?php 
            if (!empty($post_options['dedicated'])) {
                echo $post_options['dedicated'];
            } else {
                if ($post_data['post_thumb'] || $post_data['post_gallery'] || $post_data['post_video'] || $post_data['post_audio']) {
                    require axiom_get_file_dir('templates/parts/post-featured.php');
                }
            }
            ?>
				</div>
			<?php 
        }
        ?>
	
			<div class="post_content clearfix">
				<?php 
        if ($show_title && $post_options['location'] != 'center' && !empty($post_data['post_title'])) {
            ?>
<h3 class="post_title"><a href="<?php 
            echo esc_url($post_data['post_link']);
            ?>
"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</a></h3><?php 
        }
        if (!$post_data['post_protected'] && $post_options['info']) {
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        ?>
		
				<div class="post_descr">
				<?php 
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
        } else {
            if ($post_data['post_excerpt']) {
                echo in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status')) ? $post_data['post_excerpt'] : '<p>' . trim(axiom_strshort($post_data['post_excerpt'], isset($post_options['descr']) ? $post_options['descr'] : axiom_get_custom_option('post_excerpt_maxlength'))) . '</p>';
            }
        }
        if (empty($post_options['readmore'])) {
            $post_options['readmore'] = __('READ MORE', 'axiom');
        }
        if (!axiom_sc_param_is_off($post_options['readmore']) && !in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status'))) {
            echo do_shortcode('[trx_button link="' . esc_url($post_data['post_link']) . '"]' . $post_options['readmore'] . '[/trx_button]');
        }
        ?>
				</div>

			</div>	<!-- /.post_content -->

		</<?php 
        echo $tag;
        ?>
>	<!-- /.post_item -->

	<?php 
    }
예제 #3
0
파일: shortcodes.php 프로젝트: pcuervo/odc
function axiom_sc_slider($atts, $content = null)
{
    if (axiom_sc_in_shortcode_blogger()) {
        return '';
    }
    extract(axiom_sc_html_decode(shortcode_atts(array("engine" => axiom_get_custom_option('substitute_slider_engine'), "custom" => "no", "alias" => "", "post_type" => "post", "ids" => "", "cat" => "", "count" => "0", "offset" => "", "orderby" => "date", "order" => 'desc', "controls" => "no", "pagination" => "no", "titles" => "no", "descriptions" => axiom_get_custom_option('slider_info_descriptions'), "links" => "no", "align" => "", "interval" => "", "date_format" => "", "crop" => "yes", "autoheight" => "no", "id" => "", "class" => "", "animation" => "", "css" => "", "width" => "", "height" => "", "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts)));
    if (empty($width) && $pagination != 'full') {
        $width = "100%";
    }
    if (empty($height) && ($pagination == 'full' || $pagination == 'over')) {
        $height = 250;
    }
    if (!empty($height) && axiom_sc_param_is_on($autoheight)) {
        $autoheight = "off";
    }
    if (empty($interval)) {
        $interval = mt_rand(5000, 10000);
    }
    global $AXIOM_GLOBALS;
    $AXIOM_GLOBALS['sc_slider_engine'] = $engine;
    $AXIOM_GLOBALS['sc_slider_width'] = axiom_prepare_css_value($width);
    $AXIOM_GLOBALS['sc_slider_height'] = axiom_prepare_css_value($height);
    $AXIOM_GLOBALS['sc_slider_links'] = axiom_sc_param_is_on($links);
    $AXIOM_GLOBALS['sc_slider_bg_image'] = false;
    $AXIOM_GLOBALS['sc_slider_crop_image'] = $crop;
    if (empty($id)) {
        $id = "sc_slider_" . str_replace('.', '', mt_rand());
    }
    $ms = axiom_get_css_position_from_values($top, $right, $bottom, $left);
    $ws = axiom_get_css_position_from_values('', '', '', '', $width);
    $hs = axiom_get_css_position_from_values('', '', '', '', '', $height);
    $css .= (!in_array($pagination, array('full', 'over')) ? $ms : '') . $hs . $ws;
    if ($engine != 'swiper' && in_array($pagination, array('full', 'over'))) {
        $pagination = 'yes';
    }
    $output = (in_array($pagination, array('full', 'over')) ? '<div class="sc_slider_pagination_area sc_slider_pagination_' . esc_attr($pagination) . ($align != '' && $align != 'none' ? ' align' . esc_attr($align) : '') . '"' . (!axiom_sc_param_is_off($animation) ? ' data-animation="' . esc_attr(axiom_sc_get_animation_classes($animation)) . '"' : '') . ($ms . $hs ? ' style="' . esc_attr($ms . $hs) . '"' : '') . '>' : '') . '<div' . ($id ? ' id="' . esc_attr($id) . '"' : '') . ' class="sc_slider sc_slider_' . esc_attr($engine) . ($engine == 'swiper' ? ' swiper-slider-container' : '') . (!empty($class) ? ' ' . esc_attr($class) : '') . (axiom_sc_param_is_on($autoheight) ? ' sc_slider_height_auto' : '') . ($hs ? ' sc_slider_height_fixed' : '') . (axiom_sc_param_is_on($controls) ? ' sc_slider_controls' : ' sc_slider_nocontrols') . (axiom_sc_param_is_on($pagination) ? ' sc_slider_pagination' : ' sc_slider_nopagination') . (!in_array($pagination, array('full', 'over')) && $align != '' && $align != 'none' ? ' align' . esc_attr($align) : '') . '"' . (!in_array($pagination, array('full', 'over')) && !axiom_sc_param_is_off($animation) ? ' data-animation="' . esc_attr(axiom_sc_get_animation_classes($animation)) . '"' : '') . (!empty($width) && axiom_strpos($width, '%') === false ? ' data-old-width="' . esc_attr($width) . '"' : '') . (!empty($height) && axiom_strpos($height, '%') === false ? ' data-old-height="' . esc_attr($height) . '"' : '') . ((int) $interval > 0 ? ' data-interval="' . esc_attr($interval) . '"' : '') . ($css != '' ? ' style="' . esc_attr($css) . '"' : '') . '>';
    axiom_enqueue_slider($engine);
    if ($engine == 'revo') {
        if (axiom_exists_revslider() && !empty($alias)) {
            $output .= do_shortcode('[rev_slider ' . esc_attr($alias) . ']');
        } else {
            $output = '';
        }
    } else {
        if ($engine == 'swiper') {
            $caption = '';
            $output .= '<div class="slides' . ($engine == 'swiper' ? ' swiper-wrapper' : '') . '"' . ($engine == 'swiper' && $AXIOM_GLOBALS['sc_slider_bg_image'] ? ' style="' . esc_attr($hs) . '"' : '') . '>';
            $content = do_shortcode($content);
            if (axiom_sc_param_is_on($custom) && $content) {
                $output .= $content;
            } else {
                global $post;
                if (!empty($ids)) {
                    $posts = explode(',', $ids);
                    $count = count($posts);
                }
                $args = array('post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $count, 'ignore_sticky_posts' => 1, 'order' => $order == 'asc' ? 'asc' : 'desc');
                if ($offset > 0 && empty($ids)) {
                    $args['offset'] = $offset;
                }
                $args = axiom_query_add_sort_order($args, $orderby, $order);
                $args = axiom_query_add_filters($args, 'thumbs');
                $args = axiom_query_add_posts_and_cats($args, $ids, $post_type, $cat);
                $query = new WP_Query($args);
                $post_number = 0;
                $pagination_items = '';
                $show_image = 1;
                $show_types = 0;
                $show_date = 1;
                $show_author = 0;
                $show_links = 0;
                $show_counters = 'views';
                //comments | rating
                while ($query->have_posts()) {
                    $query->the_post();
                    $post_number++;
                    $post_id = get_the_ID();
                    $post_type = get_post_type();
                    $post_title = get_the_title();
                    $post_link = get_permalink();
                    $post_link2 = $post_link;
                    $post_date = get_the_date(!empty($date_format) ? $date_format : 'd.m.y');
                    $post_attachment = wp_get_attachment_url(get_post_thumbnail_id($post_id));
                    if (axiom_sc_param_is_on($crop)) {
                        $post_attachment = $AXIOM_GLOBALS['sc_slider_bg_image'] ? axiom_get_resized_image_url($post_attachment, !empty($width) && (double) $width . ' ' == $width . ' ' ? $width : null, !empty($height) && (double) $height . ' ' == $height . ' ' ? $height : null) : axiom_get_resized_image_tag($post_attachment, !empty($width) && (double) $width . ' ' == $width . ' ' ? $width : null, !empty($height) && (double) $height . ' ' == $height . ' ' ? $height : null);
                    } else {
                        if (!$AXIOM_GLOBALS['sc_slider_bg_image']) {
                            $post_attachment = '<img src="' . esc_url($post_attachment) . '" alt="">';
                        }
                    }
                    $post_accent_color = '';
                    $post_category = '';
                    $post_category_link = '';
                    if (in_array($pagination, array('full', 'over'))) {
                        $old_output = $output;
                        $output = '';
                        require axiom_get_file_dir('templates/parts/widgets-posts.php');
                        $pagination_items .= $output;
                        $output = $old_output;
                    }
                    $output .= '<div' . ' class="' . esc_attr($engine) . '-slide"' . ' data-style="' . esc_attr($ws . $hs) . '"' . ' style="' . ($AXIOM_GLOBALS['sc_slider_bg_image'] ? 'background-image:url(' . esc_url($post_attachment) . ');' : '') . $ws . $hs . '"' . '>' . (axiom_sc_param_is_on($links) ? '<a href="' . esc_url($post_link2) . '" title="' . esc_attr($post_title) . '">' : '') . (!$AXIOM_GLOBALS['sc_slider_bg_image'] ? $post_attachment : '');
                    $caption = $engine == 'swiper' ? '' : $caption;
                    if (!axiom_sc_param_is_off($titles)) {
                        $post_hover_bg = axiom_get_custom_option('link_color', null, $post_id);
                        $post_bg = '';
                        if ($post_hover_bg != '' && !axiom_is_inherit_option($post_hover_bg)) {
                            $rgb = axiom_hex2rgb($post_hover_bg);
                            $post_hover_ie = str_replace('#', '', $post_hover_bg);
                            $post_bg = "background-color: rgba({$rgb['r']},{$rgb['g']},{$rgb['b']},0.8);";
                        }
                        $caption .= '<div class="sc_slider_info' . ($titles == 'fixed' ? ' sc_slider_info_fixed' : '') . ($engine == 'swiper' ? ' content-slide' : '') . '"' . ($post_bg != '' ? ' style="' . esc_attr($post_bg) . '"' : '') . '>';
                        $post_descr = axiom_get_post_excerpt();
                        if (axiom_get_custom_option("slider_info_category") == 'yes') {
                            // || empty($cat)) {
                            // Get all post's categories
                            $post_tax = axiom_get_taxonomy_categories_by_post_type($post_type);
                            if (!empty($post_tax)) {
                                $post_terms = axiom_get_terms_by_post_id(array('post_id' => $post_id, 'taxonomy' => $post_tax));
                                if (!empty($post_terms[$post_tax])) {
                                    if (!empty($post_terms[$post_tax]->closest_parent)) {
                                        $post_category = $post_terms[$post_tax]->closest_parent->name;
                                        $post_category_link = $post_terms[$post_tax]->closest_parent->link;
                                        //$post_accent_color = axiom_taxonomy_get_inherited_property($post_tax, $post_terms[$post_tax]->closest_parent->term_id, 'link_color');
                                    }
                                    /*
                                    if ($post_accent_color == '' && !empty($post_terms[$post_tax]->terms)) {
                                    	for ($i = 0; $i < count($post_terms[$post_tax]->terms); $i++) {
                                    		$post_accent_color = axiom_taxonomy_get_inherited_property($post_tax, $post_terms[$post_tax]->terms[$i]->term_id, 'link_color');
                                    		if ($post_accent_color != '') break;
                                    	}
                                    }
                                    */
                                    if ($post_category != '') {
                                        $caption .= '<div class="sc_slider_category"' . (axiom_substr($post_accent_color, 0, 1) == '#' ? ' style="background-color: ' . esc_attr($post_accent_color) . '"' : '') . '><a href="' . esc_url($post_category_link) . '">' . $post_category . '</a></div>';
                                    }
                                }
                            }
                        }
                        $output_reviews = '';
                        if (axiom_get_custom_option('show_reviews') == 'yes' && axiom_get_custom_option('slider_info_reviews') == 'yes') {
                            $avg_author = axiom_reviews_marks_to_display(get_post_meta($post_id, 'reviews_avg' . (axiom_get_theme_option('reviews_first') == 'author' && $orderby != 'users_rating' || $orderby == 'author_rating' ? '' : '2'), true));
                            if ($avg_author > 0) {
                                $output_reviews .= '<div class="sc_slider_reviews post_rating reviews_summary blog_reviews' . (axiom_get_custom_option("slider_info_category") == 'yes' ? ' after_category' : '') . '">' . '<div class="criteria_summary criteria_row">' . trim(axiom_reviews_get_summary_stars($avg_author, false, false, 5)) . '</div>' . '</div>';
                            }
                        }
                        if (axiom_get_custom_option("slider_info_category") == 'yes') {
                            $caption .= $output_reviews;
                        }
                        $caption .= '<h3 class="sc_slider_subtitle"><a href="' . esc_url($post_link2) . '">' . $post_title . '</a></h3>';
                        if (axiom_get_custom_option("slider_info_category") != 'yes') {
                            $caption .= $output_reviews;
                        }
                        if ($descriptions > 0) {
                            $caption .= '<div class="sc_slider_descr">' . trim(axiom_strshort($post_descr, $descriptions)) . '</div>';
                        }
                        $caption .= '</div>';
                    }
                    $output .= ($engine == 'swiper' ? $caption : '') . (axiom_sc_param_is_on($links) ? '</a>' : '') . '</div>';
                }
                wp_reset_postdata();
            }
            $output .= '</div>';
            if ($engine == 'swiper') {
                if (axiom_sc_param_is_on($controls)) {
                    $output .= '<div class="sc_slider_controls_wrap"><a class="sc_slider_prev" href="#"></a><a class="sc_slider_next" href="#"></a></div>';
                }
                if (axiom_sc_param_is_on($pagination)) {
                    $output .= '<div class="sc_slider_pagination_wrap"></div>';
                }
            }
        } else {
            $output = '';
        }
    }
    if (!empty($output)) {
        $output .= '</div>';
        if (!isset($pagination_items)) {
            $pagination_items = '';
        }
        if ($pagination_items) {
            $output .= '
				<div class="sc_slider_pagination widget_area"' . ($hs ? ' style="' . esc_attr($hs) . '"' : '') . '>
					<div id="' . esc_attr($id) . '_scroll" class="sc_scroll sc_scroll_vertical swiper-slider-container scroll-container"' . ($hs ? ' style="' . esc_attr($hs) . '"' : '') . '>
						<div class="sc_scroll_wrapper swiper-wrapper">
							<div class="sc_scroll_slide swiper-slide">
								' . $pagination_items . '
							</div>
						</div>
						<div id="' . esc_attr($id) . '_scroll_bar" class="sc_scroll_bar sc_scroll_bar_vertical"></div>
					</div>
				</div>';
            $output .= '</div>';
        }
    }
    return apply_filters('axiom_shortcode_output', $output, 'trx_slider', $atts, $content);
}
예제 #4
0
파일: portfolio.php 프로젝트: pcuervo/odc
    function axiom_template_portfolio_output($post_options, $post_data)
    {
        $show_title = !in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote'));
        $parts = explode('_', $post_options['layout']);
        $style = $parts[0];
        $columns = max(1, min(4, empty($parts[1]) ? 1 : (int) $parts[1]));
        $tag = axiom_sc_in_shortcode_blogger(true) ? 'div' : 'article';
        if ($post_options['hover'] == 'square effect4') {
            $post_options['hover'] = 'square effect5';
        }
        $link_start = !isset($post_options['links']) || $post_options['links'] ? '<a href="' . esc_url($post_data['post_link']) . '">' : '';
        $link_end = !isset($post_options['links']) || $post_options['links'] ? '</a>' : '';
        ?>
			<div class="isotope_item isotope_item_<?php 
        echo esc_attr($style);
        ?>
 isotope_item_<?php 
        echo esc_attr($post_options['layout']);
        ?>
 isotope_column_<?php 
        echo esc_attr($columns);
        ?>
						<?php 
        if ($post_options['filters'] != '') {
            if ($post_options['filters'] == 'categories' && !empty($post_data['post_terms'][$post_data['post_taxonomy']]->terms_ids)) {
                echo ' flt_' . join(' flt_', $post_data['post_terms'][$post_data['post_taxonomy']]->terms_ids);
            } else {
                if ($post_options['filters'] == 'tags' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_ids)) {
                    echo ' flt_' . join(' flt_', $post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_ids);
                }
            }
        }
        ?>
">
				<<?php 
        echo $tag;
        ?>
 class="post_item post_item_<?php 
        echo esc_attr($style);
        ?>
 post_item_<?php 
        echo esc_attr($post_options['layout']);
        ?>
					<?php 
        echo 'post_format_' . esc_attr($post_data['post_format']) . ($post_options['number'] % 2 == 0 ? ' even' : ' odd') . ($post_options['number'] == 0 ? ' first' : '') . ($post_options['number'] == $post_options['posts_on_page'] ? ' last' : '');
        ?>
">
	
					<div class="post_content isotope_item_content ih-item colored<?php 
        echo ($post_options['hover'] ? ' ' . esc_attr($post_options['hover']) : '') . ($post_options['hover_dir'] ? ' ' . esc_attr($post_options['hover_dir']) : '');
        ?>
">
						<?php 
        if ($post_options['hover'] == 'circle effect1') {
            ?>
<div class="spinner"></div><?php 
        }
        if ($post_options['hover'] == 'square effect4') {
            ?>
<div class="mask1"></div><div class="mask2"></div><?php 
        }
        if ($post_options['hover'] == 'circle effect8') {
            ?>
<div class="img-container"><?php 
        }
        ?>
						<div class="post_featured img">
							<?php 
        /*
        if ($post_data['post_video'] || $post_data['post_audio'] || $post_data['post_thumb'] ||  $post_data['post_gallery']) {
        	require(axiom_get_file_dir('templates/parts/post-featured.php'));
        }
        */
        echo $link_start . $post_data['post_thumb'] . $link_end;
        ?>
						</div>
						<?php 
        if ($post_options['hover'] == 'circle effect8') {
            ?>
							</div>	<!-- .img-container -->
							<div class="info-container">
							<?php 
        }
        ?>
	
						<div class="post_info_wrap info"><div class="info-back">
	
							<?php 
        if ($show_title) {
            ?>
<h4 class="post_title"><?php 
            echo $link_start . $post_data['post_title'] . $link_end;
            ?>
</h4><?php 
        }
        /*
        if (!$post_data['post_protected'] && $post_options['info']) {
        	$info_parts = array('counters'=>false, 'terms'=>false);
        	require(axiom_get_file_dir('templates/parts/post-info.php'));
        }
        */
        ?>
	
							<div class="post_descr">
							<?php 
        if ($post_data['post_protected']) {
            echo $link_start . $post_data['post_excerpt'] . $link_end;
        } else {
            if ($post_data['post_excerpt']) {
                echo in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status')) ? $link_start . $post_data['post_excerpt'] . $link_end : '<p>' . $link_start . trim(axiom_strshort($post_data['post_excerpt'], isset($post_options['descr']) ? $post_options['descr'] : axiom_get_custom_option('post_excerpt_maxlength_masonry'))) . $link_end . '</p>';
            }
            echo $link_start;
            ?>
									<span class="hover_icon icon-plus-2"></span>
									<?php 
            echo $link_end;
        }
        ?>
							</div>
						</div></div>	<!-- /.info-back /.info -->
						<?php 
        if ($post_options['hover'] == 'circle effect8') {
            ?>
						</div>			<!-- /.info-container -->
						<?php 
        }
        ?>
					</div>				<!-- /.post_content -->
				</<?php 
        echo $tag;
        ?>
>	<!-- /.post_item -->
			</div>						<!-- /.isotope_item -->
			<?php 
    }
예제 #5
0
파일: news.php 프로젝트: pcuervo/odc
    function axiom_template_news_output($post_options, $post_data)
    {
        if (axiom_sc_param_is_on($post_options['scroll'])) {
            axiom_enqueue_slider();
        }
        require axiom_get_file_dir('templates/parts/reviews-summary.php');
        $title_tag = $post_options['columns_count'] > 0 ? 'h6' : 'h4';
        $title = '<' . esc_attr($title_tag) . ' class="post_title sc_title sc_blogger_title">' . (!isset($post_options['links']) || $post_options['links'] ? '<a href="' . esc_url($post_data['post_link']) . '">' : '') . $post_data['post_title'] . (!isset($post_options['links']) || $post_options['links'] ? '</a>' : '') . '</' . esc_attr($title_tag) . '>' . $reviews_summary;
        if (axiom_sc_param_is_on($post_options['scroll']) || $post_options['dir'] == 'horizontal' && $post_options['columns_count'] > 0) {
            ?>
			<div class="<?php 
            echo 'column-1_' . esc_attr($post_options['columns_count']) . ' column_item_' . esc_attr($post_options['number']);
            echo ($post_options['number'] % 2 == 1 ? ' odd' : ' even') . ($post_options['number'] == 1 ? ' first' : '') . ($post_options['number'] == $post_options['posts_on_page'] ? ' last' : '');
            //. (axiom_sc_param_is_on($post_options['scroll']) ? ' sc_scroll_slide swiper-slide' : '');
            ?>
">
			<?php 
        }
        ?>
		
		<div class="post_item post_item_news sc_blogger_item<?php 
        echo $post_options['number'] == $post_options['posts_on_page'] && !axiom_sc_param_is_on($post_options['loadmore']) ? ' sc_blogger_item_last' : '';
        //. (axiom_sc_param_is_on($post_options['scroll']) && $post_options['dir'] == 'vertical' ? ' sc_scroll_slide swiper-slide' : '');
        ?>
">
			<?php 
        if ($post_data['post_video'] || $post_data['post_audio'] || $post_data['post_thumb'] || $post_data['post_gallery']) {
            ?>
				<div class="post_featured">
					<?php 
            require axiom_get_file_dir('templates/parts/post-featured.php');
            ?>
				</div>
				<?php 
        }
        echo $title;
        ?>
			
			<div class="post_content sc_blogger_content">
				<?php 
        if (axiom_sc_param_is_on($post_options['info'])) {
            $info_parts = array('author' => false);
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        if ($post_options['descr'] > 0) {
            ?>
					<div class="post_descr">
					<?php 
            if ($post_data['post_protected']) {
                echo $post_data['post_excerpt'];
            } else {
                if ($post_data['post_excerpt']) {
                    echo in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status')) ? $post_data['post_excerpt'] : '<p>' . trim(axiom_strshort($post_data['post_excerpt'], isset($post_options['descr']) ? $post_options['descr'] : axiom_get_custom_option('post_excerpt_maxlength_masonry'))) . '</p>';
                }
                if (empty($post_options['readmore'])) {
                    $post_options['readmore'] = __('READ MORE', 'axiom');
                }
                if (!axiom_sc_param_is_off($post_options['readmore']) && !in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status'))) {
                    echo do_shortcode('[trx_button link="' . esc_url($post_data['post_link']) . '"]' . $post_options['readmore'] . '[/trx_button]');
                }
            }
            ?>
					</div>
					<?php 
        }
        if (empty($post_options['readmore'])) {
            $post_options['readmore'] = __('READ MORE', 'axiom');
        }
        if (!axiom_sc_param_is_off($post_options['readmore']) && !in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status'))) {
            echo do_shortcode('[trx_button link="' . esc_url($post_data['post_link']) . '"]' . $post_options['readmore'] . '[/trx_button]');
        }
        ?>

			</div>	<!-- /.post_content -->

		</div>		<!-- /.post_item -->
		<?php 
        if (axiom_sc_param_is_on($post_options['scroll']) || $post_options['dir'] == 'horizontal' && $post_options['columns_count'] > 0) {
            ?>
			</div>	<!-- /.column-1_x -->
			<?php 
        }
    }
예제 #6
0
파일: attachment.php 프로젝트: pcuervo/odc
    function axiom_template_attachment_output($post_options, $post_data)
    {
        $post_data['post_views']++;
        $title_tag = axiom_get_custom_option('show_page_top') == 'yes' && axiom_get_custom_option('show_page_title') == 'yes' ? 'h3' : 'h1';
        ?>
		<article <?php 
        post_class('post_item post_item_attachment template_attachment');
        ?>
>

		<?php 
        $post_icon = axiom_get_custom_option('show_post_icon') == 'yes' ? '<span class="post_icon ' . esc_attr($post_data['post_icon']) . '"></span>' : '';
        ?>

			<<?php 
        echo esc_html($title_tag);
        ?>
 class="post_title"><?php 
        echo balanceTags($post_icon);
        echo !empty($post_data['post_excerpt']) ? strip_tags($post_data['post_excerpt']) : $post_data['post_title'];
        ?>
</<?php 
        echo esc_html($title_tag);
        ?>
>

			<div class="post_featured">
				<div class="post_thumb post_nav" data-image="<?php 
        echo esc_url($post_data['post_attachment']);
        ?>
" data-title="<?php 
        echo esc_attr($post_data['post_title']);
        ?>
">
					<?php 
        echo $post_data['post_thumb'];
        $post = get_post();
        $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')));
        foreach ($attachments as $k => $attachment) {
            if ($attachment->ID == $post->ID) {
                break;
            }
        }
        if (isset($attachments[$k - 1])) {
            $link = get_permalink($attachments[$k - 1]->ID) . '#top_of_page';
            $desc = axiom_strshort(!empty($attachments[$k - 1]->post_excerpt) ? $attachments[$k - 1]->post_excerpt : $attachments[$k - 1]->post_title, 30);
            ?>
						<a class="post_nav_item post_nav_prev" href="<?php 
            echo esc_url($link);
            ?>
">
							<span class="post_nav_info">
								<span class="post_nav_info_title"><?php 
            _e('Previous item', 'axiom');
            ?>
</span>
								<span class="post_nav_info_description"><?php 
            echo $desc;
            ?>
</span>
							</span>
						</a>
						<?php 
        }
        if (isset($attachments[$k + 1])) {
            $link = get_permalink($attachments[$k + 1]->ID) . '#top_of_page';
            $desc = axiom_strshort(!empty($attachments[$k + 1]->post_excerpt) ? $attachments[$k + 1]->post_excerpt : $attachments[$k + 1]->post_title, 30);
            ?>
						<a class="post_nav_item post_nav_next" href="<?php 
            echo esc_url($link);
            ?>
">
							<span class="post_nav_info">
								<span class="post_nav_info_title"><?php 
            _e('Next item', 'axiom');
            ?>
</span>
								<span class="post_nav_info_description"><?php 
            echo $desc;
            ?>
</span>
							</span>
						</a>
						<?php 
        }
        ?>
				</div>
			</div>
		
			<?php 
        if (!$post_data['post_protected'] && axiom_get_custom_option('show_post_info') == 'yes') {
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        ?>
		
			<div class="post_content">
				<?php 
        // Post content
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
        } else {
            echo $post_data['post_content'] ? $post_data['post_content'] : __('No image description ...', 'axiom');
            wp_link_pages(array('before' => '<div class="nav_pages_parts"><span class="pages">' . __('Pages:', 'axiom') . '</span>', 'after' => '</div>', 'link_before' => '<span class="page_num">', 'link_after' => '</span>'));
            if (axiom_get_custom_option('show_post_tags') == 'yes' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links)) {
                ?>
						<div class="post_info post_info_bottom">
							<span class="post_info_item post_info_tags"><?php 
                _e('Tags:', 'axiom');
                ?>
 <?php 
                echo join(', ', $post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links);
                ?>
</span>
						</div>
						<?php 
            }
        }
        ?>
			
			</div>	<!-- /.post_content -->
		
		</article>

		<section class="related_wrap related_wrap_empty"></section>

		<?php 
        if (!$post_data['post_protected']) {
            require axiom_get_file_dir('templates/parts/comments.php');
        }
        require axiom_get_file_dir('templates/parts/views-counter.php');
    }
예제 #7
0
파일: core.wp.php 프로젝트: pcuervo/odc
 function axiom_get_post_excerpt($maxlength = 0, $add = '...')
 {
     $descr = get_the_excerpt();
     $descr = trim(str_replace(array('[...]', '[&hellip;]'), array($add, $add), $descr));
     if (!empty($descr) && axiom_strpos(',.:;-', axiom_substr($descr, -1)) !== false) {
         $descr = axiom_substr($descr, 0, -1);
     }
     if ($maxlength > 0) {
         $descr = axiom_strshort($descr, $maxlength, $add);
     }
     return $descr;
 }
예제 #8
0
파일: accordion.php 프로젝트: pcuervo/odc
    function axiom_template_accordion_output($post_options, $post_data)
    {
        ?>
		<div class="post_item sc_blogger_item sc_accordion_item<?php 
        echo $post_options['number'] == $post_options['posts_on_page'] && !axiom_sc_param_is_on($post_options['loadmore']) ? ' sc_blogger_item_last' : '';
        ?>
">
			
			<h5 class="post_title sc_title sc_blogger_title sc_accordion_title"><span class="sc_accordion_icon sc_accordion_icon_closed icon-plus-1"></span><span class="sc_accordion_icon sc_accordion_icon_opened icon-minus-1"></span><?php 
        echo $post_data['post_title'];
        ?>
</h5>
			
			<div class="post_content sc_accordion_content">
				<?php 
        if (axiom_sc_param_is_on($post_options['info'])) {
            ?>
					<div class="post_info">
						<span class="post_info_item post_info_posted_by"><?php 
            _e('Posted by', 'axiom');
            ?>
 <a href="<?php 
            echo esc_url($post_data['post_author_url']);
            ?>
" class="post_info_author"><?php 
            echo esc_html($post_data['post_author']);
            ?>
</a></span>
						<span class="post_info_item post_info_counters">
							<?php 
            echo $post_options['orderby'] == 'comments' || $post_options['counters'] == 'comments' ? __('Comments', 'axiom') : __('Views', 'axiom');
            ?>
							<span class="post_info_counters_number"><?php 
            echo $post_options['orderby'] == 'comments' || $post_options['counters'] == 'comments' ? $post_data['post_comments'] : $post_data['post_views'];
            ?>
</span>
						</span>
					</div>
					<?php 
        }
        if ($post_options['descr'] >= 0) {
            ?>
					<div class="post_descr">
					<?php 
            if (!in_array($post_data['post_format'], array('quote', 'link', 'chat')) && $post_options['descr'] > 0 && axiom_strlen($post_data['post_excerpt']) > $post_options['descr']) {
                $post_data['post_excerpt'] = axiom_strshort($post_data['post_excerpt'], $post_options['descr'], $post_options['readmore'] ? '' : '...');
            }
            echo $post_data['post_excerpt'];
            ?>
					</div>
					<?php 
        }
        if (empty($post_options['readmore'])) {
            $post_options['readmore'] = __('READ MORE', 'axiom');
        }
        if (!axiom_sc_param_is_off($post_options['readmore']) && !in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status'))) {
            echo do_shortcode('[trx_button link="' . esc_url($post_data['post_link']) . '"]' . $post_options['readmore'] . '[/trx_button]');
        }
        ?>
			
			</div>	<!-- /.post_content -->

		</div>		<!-- /.post_item -->

		<?php 
    }
예제 #9
0
파일: masonry.php 프로젝트: pcuervo/odc
    function axiom_template_masonry_output($post_options, $post_data)
    {
        $show_title = !in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote'));
        $parts = explode('_', $post_options['layout']);
        $style = $parts[0];
        $columns = max(1, min(4, empty($parts[1]) ? $post_options['columns_count'] : (int) $parts[1]));
        $tag = axiom_sc_in_shortcode_blogger(true) ? 'div' : 'article';
        ?>
		<div class="isotope_item isotope_item_<?php 
        echo esc_attr($style);
        ?>
 isotope_item_<?php 
        echo esc_attr($post_options['layout']);
        ?>
 isotope_column_<?php 
        echo esc_attr($columns);
        ?>
					<?php 
        if ($post_options['filters'] != '') {
            if ($post_options['filters'] == 'categories' && !empty($post_data['post_terms'][$post_data['post_taxonomy']]->terms_ids)) {
                echo ' flt_' . join(' flt_', $post_data['post_terms'][$post_data['post_taxonomy']]->terms_ids);
            } else {
                if ($post_options['filters'] == 'tags' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_ids)) {
                    echo ' flt_' . join(' flt_', $post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_ids);
                }
            }
        }
        ?>
">
			<<?php 
        echo $tag;
        ?>
 class="post_item post_item_<?php 
        echo esc_attr($style);
        ?>
 post_item_<?php 
        echo esc_attr($post_options['layout']);
        ?>
				 <?php 
        echo ' post_format_' . esc_attr($post_data['post_format']) . ($post_options['number'] % 2 == 0 ? ' even' : ' odd') . ($post_options['number'] == 0 ? ' first' : '') . ($post_options['number'] == $post_options['posts_on_page'] ? ' last' : '');
        ?>
">
				
				<?php 
        if ($post_data['post_video'] || $post_data['post_audio'] || $post_data['post_thumb'] || $post_data['post_gallery']) {
            ?>
					<div class="post_featured">
						<?php 
            require axiom_get_file_dir('templates/parts/post-featured.php');
            ?>
					</div>
				<?php 
        }
        ?>

				<div class="post_content isotope_item_content">
					
					<?php 
        if ($show_title) {
            if (!isset($post_options['links']) || $post_options['links']) {
                ?>
							<h4 class="post_title"><a href="<?php 
                echo esc_url($post_data['post_link']);
                ?>
"><?php 
                echo $post_data['post_title'];
                ?>
</a></h4>
							<?php 
            } else {
                ?>
							<h4 class="post_title"><?php 
                echo $post_data['post_title'];
                ?>
</h4>
							<?php 
            }
        }
        ?>

					<div class="post_descr">
						<?php 
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
        } else {
            if ($post_data['post_excerpt']) {
                echo in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status')) ? $post_data['post_excerpt'] : '<p>' . trim(axiom_strshort($post_data['post_excerpt'], isset($post_options['descr']) ? $post_options['descr'] : axiom_get_custom_option('post_excerpt_maxlength_masonry'))) . '</p>';
            }
        }
        ?>
					</div>
					<?php 
        if (!$post_data['post_protected'] && $post_options['info']) {
            $info_parts = array('counters' => false, 'terms' => false);
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        if (empty($post_options['readmore'])) {
            $post_options['readmore'] = __('MORE', 'axiom');
        }
        if (!axiom_sc_param_is_off($post_options['readmore']) && !in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status'))) {
            echo do_shortcode('[trx_button style="filled" bg_style="menu" link="' . esc_url($post_data['post_link']) . '"]' . $post_options['readmore'] . '[/trx_button] [trx_button link="' . esc_url($post_data['post_link']) . '"]' . esc_html($post_data['post_views']) . '[/trx_button]');
        }
        ?>

				</div>				<!-- /.post_content -->
			</<?php 
        echo $tag;
        ?>
>	<!-- /.post_item -->
		</div>						<!-- /.isotope_item -->
		<?php 
    }