Example #1
0
    echo '<div id="title-after">' . do_shortcode($st_Settings['after_title_data']) . '</div><div class="clear"><!-- --></div>';
}
/*--- Excerpt -----------------------------*/
if (is_single() && !empty($st_Settings['excerpt']) && $st_Settings['excerpt'] == 'yes' && $post->post_excerpt) {
    echo '<div class="clear"><!-- --></div><div id="post-excerpt">' . wpautop($post->post_excerpt) . '</div>';
}
?>


	<div class="st-format-video-holder"><?php 
/*===============================================
		
			V I D E O
			Post Format
		
		===============================================*/
$st_['mp4'] = st_get_post_meta($post->ID, 'mp4_value', true, '') ? ' mp4="' . st_get_post_meta($post->ID, 'mp4_value', true, '') . '"' : '';
$st_['ogv'] = st_get_post_meta($post->ID, 'ogv_value', true, '') ? ' ogv="' . st_get_post_meta($post->ID, 'ogv_value', true, '') . '"' : '';
$st_['webm'] = st_get_post_meta($post->ID, 'webm_value', true, '') ? ' webm="' . st_get_post_meta($post->ID, 'webm_value', true, '') . '"' : '';
$st_['video'] = st_get_post_meta($post->ID, 'video_value', true, '');
/*--- Video -----------------------------*/
if ($st_['video']) {
    echo $st_['video'];
} elseif ($st_['mp4'] || $st_['ogv'] || $st_['webm']) {
    $st_['poster'] = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
    $st_['poster'] = $st_['poster'] ? ' poster=' . $st_['poster'][0] : '';
    echo do_shortcode('[video' . $st_['mp4'] . $st_['ogv'] . $st_['webm'] . ' preload=none ' . $st_['poster'] . ']');
}
?>
	
	</div>
Example #2
0
function st_custom_background_cb()
{
    global $st_;
    if (is_single()) {
        global $post;
        $st_['bg-image'] = wp_get_attachment_image_src(st_get_post_meta($post->ID, 'bg-image_value', true, 0), 'full');
        $st_['bg-color'] = st_get_post_meta($post->ID, 'bg-color_value', true, false);
    }
    $background = !empty($st_['bg-image'][0]) ? $st_['bg-image'][0] : set_url_scheme(get_background_image());
    $color = !empty($st_['bg-color']) && $st_['bg-image'][0] ? $st_['bg-color'] : get_theme_mod('background_color');
    if (!$background && !$color) {
        return;
    }
    $style = $color ? "background-color: #{$color};" : '';
    if ($background) {
        $image = " background-image: url('{$background}');";
        $repeat = get_theme_mod('background_repeat', 'no-repeat');
        if (!in_array($repeat, array('no-repeat', 'repeat-x', 'repeat-y', 'repeat'))) {
            $repeat = 'no-repeat';
        }
        $repeat = " background-repeat: {$repeat};";
        $position = get_theme_mod('background_position_x', 'center');
        if (!in_array($position, array('center', 'right', 'left'))) {
            $position = 'center';
        }
        $position = " background-position: top {$position};";
        $attachment = get_theme_mod('background_attachment', 'fixed');
        if (!in_array($attachment, array('fixed', 'scroll'))) {
            $attachment = 'fixed';
        }
        $attachment = " background-attachment: {$attachment};";
        $style .= $image . $repeat . $position . $attachment;
    }
    echo '<style type="text/css" id="custom-background-css">body.custom-background { ' . trim($style) . ' }</style>' . "\n";
}
Example #3
0
	Post format: Link
*/
/*--- After title data -----------------------------*/
if (is_single() && !empty($st_Settings['after_title']) && $st_Settings['after_title'] == 'yes') {
    echo '<div id="title-after">' . do_shortcode($st_Settings['after_title_data']) . '</div><div class="clear"><!-- --></div>';
}
/*--- Excerpt -----------------------------*/
if (is_single() && !empty($st_Settings['excerpt']) && $st_Settings['excerpt'] == 'yes' && $post->post_excerpt) {
    echo '<div class="clear"><!-- --></div><div id="post-excerpt">' . wpautop($post->post_excerpt) . '</div>';
}
?>


	<div class="st-format-link-holder"><?php 
/*===============================================
		
			L I N K
			Post Format
		
		===============================================*/
$st_['link'] = st_get_post_meta($post->ID, 'link_value', true, '');
if ($st_['link']) {
    if (st_get_post_meta($post->ID, 'link_redirect_value', true, '')) {
        $st_['link'] = st_get_redirect_page_url() . $st_['link'];
    }
    $st_['link_title'] = st_get_post_meta($post->ID, 'link_title_value', true, $st_['link']);
    echo '<a target="_blank" href="' . $st_['link'] . '">' . st_get_post_meta($post->ID, 'link_title_value', true, $st_['link']) . '</a>';
}
?>
	
	</div>
Example #4
0
if (!defined('ABSPATH')) {
    exit;
}
/*
	Post format: Quote
*/
/*--- After title data -----------------------------*/
if (is_single() && !empty($st_Settings['after_title']) && $st_Settings['after_title'] == 'yes') {
    echo '<div id="title-after">' . do_shortcode($st_Settings['after_title_data']) . '</div><div class="clear"><!-- --></div>';
}
/*--- Excerpt -----------------------------*/
if (is_single() && !empty($st_Settings['excerpt']) && $st_Settings['excerpt'] == 'yes' && $post->post_excerpt) {
    echo '<div class="clear"><!-- --></div><div id="post-excerpt">' . wpautop($post->post_excerpt) . '</div>';
}
?>


	<div class="st-format-quote-holder"><?php 
/*===============================================
		
			Q U O T E
			Post Format
		
		===============================================*/
$st_['quote'] = st_get_post_meta($post->ID, 'quote_value', true, '');
if ($st_['quote']) {
    echo '<blockquote><p>' . $st_['quote'] . '</p></blockquote>';
}
?>
	
	</div>
Example #5
0
// Get custom sidebar
$st_['sidebar'] = st_get_post_meta($post->ID, 'sidebar_value', true, 'Default Sidebar');
// bbPress sidebar sidebar
if ($st_Options['sidebars']['bbPress'] && function_exists('is_bbpress')) {
    if (is_bbpress()) {
        $st_['sidebar'] = 'bbPress Sidebar';
    }
}
// buddyPress sidebar sidebar
if ($st_Options['sidebars']['buddyPress'] && function_exists('is_buddypress')) {
    if (is_buddypress()) {
        $st_['sidebar'] = 'BuddyPress Sidebar';
    }
}
// Get sidebar position
$st_['sidebar_position'] = st_get_post_meta($post->ID, 'sidebar_position_value', true, 'right');
// Re-define global $content_width if sidebar not exists
if ($st_['sidebar_position'] == 'none') {
    $content_width = $st_Options['global']['images']['large']['width'];
} else {
    $content_width = $st_Options['global']['images']['archive-image']['width'];
}
/*===============================================

	P A G E
	Display a required page

===============================================*/
get_header();
?>
Example #6
0
 			on Post page:
 			- sidebar(+), modal window(+)
 			- sidebar(+), modal window(-)
 			- sidebar(-), modal window(+)
 			- sidebar(-), modal window(-)
 		-------------------------------------------*/
 if (is_single()) {
     if (!empty($st_Settings['post_feat_image']) == 'yes') {
         // if sidebar (+)
         if (!$st_['sidebar_position'] || $st_['sidebar_position'] && $st_['sidebar_position'] != 'none') {
             $st_['feat_img'] = get_the_post_thumbnail($post->ID, 'post-image', function_exists('st_get_2x') ? st_get_2x($post->ID, 'post-image', 'array', 'size-original featured-image') : '');
         } else {
             $st_['feat_img'] = get_the_post_thumbnail($post->ID, 'large', function_exists('st_get_2x') ? st_get_2x($post->ID, 'large', 'array', 'size-original featured-image') : '');
         }
         // if modal window (+)
         if (st_get_post_meta($post->ID, 'lightbox_value', true, '')) {
             $st_['large_image_url'] = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
             echo '<a href="' . $st_['large_image_url'][0] . '" title="' . the_title_attribute('echo=0') . '" >' . $st_['feat_img'] . '</a>';
         } else {
             echo $st_['feat_img'];
         }
     }
 } else {
     // if blog
     if (!empty($st_['is_blog'])) {
         // if sidebar (+)
         if (!$st_['sidebar_position'] || $st_['sidebar_position'] && $st_['sidebar_position'] != 'none') {
             echo '<a href="' . get_permalink($post->ID) . '">' . get_the_post_thumbnail($post->ID, 'archive-image', function_exists('st_get_2x') ? st_get_2x($post->ID, 'archive-image', 'array', 'size-original featured-image') : '') . '</a>';
         } else {
             echo '<a href="' . get_permalink($post->ID) . '">' . get_the_post_thumbnail($post->ID, 'large', function_exists('st_get_2x') ? st_get_2x($post->ID, 'large', 'array', 'size-original featured-image') : '') . '</a>';
         }
Example #7
0
*/
?>
<div id="post-<?php 
the_ID();
?>
" <?php 
post_class(has_post_thumbnail() ? 'post-template post-t4' : 'post-template post-t4 post-t4-no-thumb');
?>
>

	<?php 
global $st_Options, $st_Settings;
// Post format
$st_['format'] = get_post_format($post->ID) && $st_Options['global']['post-formats'][get_post_format($post->ID)]['status'] && function_exists('st_kit') ? get_post_format($post->ID) : 'standard';
// Is title disabled?
$st_['title_disabled'] = st_get_post_meta($post->ID, 'disable_title_value', true, 0);
if (has_post_thumbnail()) {
    $st_['id'] = get_post_thumbnail_id($post->ID);
    $st_['thumb'] = wp_get_attachment_image_src($st_['id'], 'project-thumb');
    $st_['thumb'] = $st_['thumb'][0];
    echo '<div class="thumb-wrapper">';
    echo '<a href="' . get_permalink() . '" class="post-thumb" ' . (function_exists('st_get_2x') ? st_get_2x($post->ID, 'project-thumb', 'attr') : '') . ' style="background-image: url(' . $st_['thumb'] . ')" data-format="' . $st_['format'] . '">&nbsp;</a>';
    echo '</div>' . "\n";
}
echo '<div>';
// Title and Excerpt
if (!empty($st_['title_disabled']) != 1) {
    echo '<h3 class="post-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
}
if (get_the_excerpt()) {
    echo wpautop(do_shortcode(get_the_excerpt()));
Example #8
0
	Post format: Status
*/
/*--- After title data -----------------------------*/
if (is_single() && !empty($st_Settings['after_title']) && $st_Settings['after_title'] == 'yes') {
    echo '<div id="title-after">' . do_shortcode($st_Settings['after_title_data']) . '</div><div class="clear"><!-- --></div>';
}
/*--- Excerpt -----------------------------*/
if (is_single() && !empty($st_Settings['excerpt']) && $st_Settings['excerpt'] == 'yes' && $post->post_excerpt) {
    echo '<div class="clear"><!-- --></div><div id="post-excerpt">' . wpautop($post->post_excerpt) . '</div>';
}
?>


	<div class="st-format-status-holder"><?php 
/*===============================================
		
			S T A T U S
			Post Format
		
		===============================================*/
$st_['user_id'] = get_the_author_meta('ID');
$st_['upic'] = get_avatar(get_the_author_meta('user_email'), '60');
$st_['name'] = get_the_author_meta('display_name');
/*--- Status -----------------------------*/
$st_['status'] = st_get_post_meta($post->ID, 'status_value', true, '');
if ($st_['status']) {
    echo "\n" . '<div class="status-header">' . $st_['upic'] . '<a href="' . get_author_posts_url($st_['user_id']) . '">' . $st_['name'] . '</a><div class="clear"><!-- --></div></div>' . '<div class="status-content">' . wpautop($st_['status']) . '<div class="clear"><!-- --></div></div>';
}
?>
	
	</div>
Example #9
0
*/
/*--- After title data -----------------------------*/
if (is_single() && !empty($st_Settings['after_title']) && $st_Settings['after_title'] == 'yes') {
    echo '<div id="title-after">' . do_shortcode($st_Settings['after_title_data']) . '</div><div class="clear"><!-- --></div>';
}
/*--- Excerpt -----------------------------*/
if (is_single() && !empty($st_Settings['excerpt']) && $st_Settings['excerpt'] == 'yes' && $post->post_excerpt) {
    echo '<div class="clear"><!-- --></div><div id="post-excerpt">' . wpautop($post->post_excerpt) . '</div>';
}
?>


	<div class="st-format-audio-holder"><?php 
/*===============================================
		
			A U D I O
			Post Format
		
		===============================================*/
$st_['mp3'] = st_get_post_meta($post->ID, 'mp3_value', true, '') ? ' mp3="' . st_get_post_meta($post->ID, 'mp3_value', true, '') . '"' : '';
$st_['ogg'] = st_get_post_meta($post->ID, 'ogg_value', true, '') ? ' ogg="' . st_get_post_meta($post->ID, 'ogg_value', true, '') . '"' : '';
$st_['audio'] = st_get_post_meta($post->ID, 'audio_value', true, '');
/*--- Audio -----------------------------*/
if ($st_['audio']) {
    echo $st_['audio'];
} elseif ($st_['mp3'] || $st_['ogg']) {
    echo do_shortcode('[audio' . $st_['mp3'] . $st_['ogg'] . ' preload=none]');
}
?>
	
	</div>
Example #10
0
}
/*
	Post format: Gallery
*/
/*--- After title data -----------------------------*/
if (is_single() && !empty($st_Settings['after_title']) && $st_Settings['after_title'] == 'yes') {
    echo '<div id="title-after">' . do_shortcode($st_Settings['after_title_data']) . '</div><div class="clear"><!-- --></div>';
}
/*--- Excerpt -----------------------------*/
if (is_single() && !empty($st_Settings['excerpt']) && $st_Settings['excerpt'] == 'yes' && $post->post_excerpt) {
    echo '<div class="clear"><!-- --></div><div id="post-excerpt">' . wpautop($post->post_excerpt) . '</div>';
}
?>


	<div class="st-format-gallery-holder"><?php 
/*===============================================
		
			G A L L E R Y
			With different sizes dipends of some reasons
		
		===============================================*/
if (empty($st_Settings['shortcodes']) || isset($st_Settings['shortcodes']) && $st_Settings['shortcodes'] != 'no') {
    $st_['ids'] = st_get_post_meta($post->ID, 'gallery_value', true, '');
    if ($st_['ids']) {
        echo do_shortcode('[st-gallery ids="' . $st_['ids'] . '"]');
    }
}
?>
	
	</div>