Example #1
0
function xt_smart_sidebar()
{
    global $post;
    $post_settings = xt_get_single_settings('post');
    extract($post_settings);
    $is_endless_template = xt_is_endless_template();
    $enabled = (bool) xt_option('single_post_smart_sidebar');
    if (!$enabled || $is_endless_template) {
        return false;
    }
    $position = xt_option('single_post_smart_sidebar_position');
    $items = xt_option('single_post_smart_sidebar_items');
    if (empty($items["enabled"])) {
        return false;
    }
    echo '<div class="smart-sidebar">';
    foreach ($items["enabled"] as $key => $item) {
        echo '<div class="smart-sidebar-item">';
        if (strpos($key, 'divider') !== false) {
            echo '<div class="smart-sidebar-divider"></div>';
        } else {
            if ($key == 'social-share') {
                echo xt_socialshare();
            } else {
                if ($key == 'post-date' && $show_post_date) {
                    xt_post_date();
                } else {
                    if ($key == 'post-author' && $show_post_author) {
                        xt_post_author();
                    } else {
                        if ($key == 'post-stats' && $show_post_stats) {
                            echo '<div class="meta">';
                            xt_post_stats(true, array('mini'));
                            echo '</div>';
                        } else {
                            if ($key == 'widget-zone' && $show_post_author) {
                                $widget_zone = xt_option('single_post_smart_sidebar_widget_zone');
                                $widget_zone_active = is_active_sidebar($widget_zone);
                                if ($widget_zone_active) {
                                    xt_show_dynamic_sidebar($widget_zone, 'single-post.php', "smart-sidebar", "smart-{$datemodified_enabled} position-" . $position);
                                }
                            }
                        }
                    }
                }
            }
        }
        echo '</div>';
    }
    echo '</div>';
}
Example #2
0
		
		<?php 
if (!empty($tab_post_author)) {
    ?>
			<?php 
    echo xt_post_author(false);
    ?>
		<?php 
}
?>
		
		<?php 
if (!empty($tab_post_date)) {
    ?>
			<?php 
    echo xt_post_date();
    ?>
		<?php 
}
?>
	
		
		<?php 
if (!empty($tab_post_stats)) {
    ?>
			<?php 
    echo xt_post_stats(false, array('mini'));
    ?>
		<?php 
}
?>
Example #3
0
 function renderDate()
 {
     if ($this->instance["show_date"]) {
         xt_post_date();
     }
 }
Example #4
0
    ?>
					</span>
				<?php 
}
?>
				
			
				<?php 
if ($show_post_date) {
    ?>
					<span class="<?php 
    echo xt_smart_sidebar_has('post-date') ? 'show-for-small' : '';
    ?>
">
						<?php 
    xt_post_date();
    ?>
					</span>	
				<?php 
}
?>
				</span>
				
			</div>
			<div class="xsmall-12 small-5 column">	
				
				<?php 
if ($show_post_stats) {
    ?>
					<span class="<?php 
    echo xt_smart_sidebar_has('post-stats') ? 'show-for-small' : '';