function themerex_wrapper_end()
    {
        if (is_product()) {
            showShareButtons(array('post_id' => get_the_ID(), 'post_link' => get_permalink(), 'post_title' => getPostTitle(), 'post_descr' => getPostDescription(), 'post_thumb' => wp_get_attachment_url(get_post_thumbnail_id(get_the_ID()))));
        }
        ?>
					</div>
				</article>
			</div><!-- #content -->
			<?php 
        get_sidebar();
        ?>
	<?php 
    }
예제 #2
0
 function getPostShare($arg, $post_data)
 {
     $side_bar = get_custom_option('show_sidebar_main');
     if (sc_param_is_on(get_custom_option('show_post_info', null, $post_data['post_id'])) && !is_single()) {
         $array_info = explode(',', $arg);
         $array_list = array();
         if ($side_bar != "wide") {
             $array_list['views'] = '<div class="postSpan postViews"><span class="icon icon-eye"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . $post_data['post_views'] . '</a></div>';
             $array_list['likes'] = '<div class="postSpan postLikes likeButton like" data-postid="' . $post_data['post_id'] . '" data-likes="' . $post_data['post_likes'] . '"><span class="icon icon-heart"></span><a href="" class="revInfo">' . $post_data['post_likes'] . '</a></div>';
             $array_list['more'] = $post_data['post_link'] ? '<div class="postSpan postMore"><span class="icon icon-link"></span><a href="' . $post_data['post_link'] . '"  class="revInfo">' . __('More ', 'themerex') . '</a></div>' : '';
             //review
             if ($post_data['post_reviews_author'] && sc_param_is_on(get_custom_option('show_reviews', null, $post_data['post_id']))) {
                 $avg_author = $post_data['post_reviews_' . (get_theme_option('reviews_first') == 'author' ? 'author' : 'users')];
                 $rating_max = get_custom_option('reviews_max_level');
                 $array_list['reviews'] = '<div class="postSpan postReview" title="' . sprintf(__('Rating - %s/%s', 'themerex'), $avg_author, $rating_max) . '"><span class="icon icon-star"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . getReviewsSummaryStarsSharing($avg_author, false, false) . '</a></div>';
             }
         }
         $array_list['comments'] = '<div class="postSpan postComment"><span class="icon icon-post"></span><a href="' . $post_data['post_comments_link'] . '" class="revInfo">' . $post_data['post_comments'] . ($side_bar == 'wide' ? ' comments' : '') . '</a></div>';
         $post_share = showShareButtons(array("post_id" => $post_data["post_id"], "post_link" => $post_data["post_link"], "post_title" => $post_data["post_title"], "post_descr" => strip_tags($post_data["post_excerpt"]), "post_thumb" => $post_data["post_attachment"], "style" => "drop", "echo" => false));
         if ($side_bar != "wide") {
             $array_list['share'] = '<div class="postSpan postShare share"><span class="icon icon-share"></span><a class="revInfo shareDrop" href="#">' . __('Share ', 'themerex') . '</a>' . $post_share . '</div>';
         } else {
             $array_list['share'] = '<div class="postSpan postShare share">' . $post_share . '</div>';
         }
         $post_info_html = '';
         foreach ($array_info as $array_infos) {
             foreach ($array_list as $k => $val) {
                 if ($k == $array_infos) {
                     $post_info_html .= $val;
                 }
             }
         }
         if ($post_info_html != '') {
             return '<div class="postSharing hoverUnderline">' . $post_info_html . '</div>';
         } else {
             return '';
         }
     }
 }
    _e('More', 'themerex');
    ?>
" href="<?php 
    echo $post_data['post_link'];
    ?>
"><?php 
    _e('More', 'themerex');
    ?>
</a></li>
<?php 
}
//global $wp_query;
//if ( is_single() || (is_page() && !is_home() && !is_front_page() && !$wp_query->is_posts_page)) {
if ($show_all || in_array('share', $postinfo_buttons)) {
    // Social sharing
    $rez = showShareButtons(array('post_id' => $post_data['post_id'], 'post_link' => $post_data['post_link'], 'post_title' => $post_data['post_title'], 'post_descr' => strip_tags($post_data['post_excerpt']), 'post_thumb' => $post_data['post_attachment'], 'style' => 'drop', 'echo' => false));
    if ($rez) {
        ?>
	<li class="squareButton light ico share"><a class="icon-share shareDrop" title="<?php 
        _e('Share', 'themerex');
        ?>
" href="#"><?php 
        _e('Share', 'themerex');
        ?>
</a><?php 
        echo $rez;
        ?>
</li>
<?php 
    }
}
예제 #4
0
							<div class="post_info post_info_bottom theme_info">
								<span class="post_tags">
									<span class="tags_label"><?php 
            _e('Tags:', 'themerex');
            ?>
</span>
									<?php 
            echo $post_tags_str;
            ?>
								</span>
							</div>
							<?php 
        }
        // Social sharing
        if (get_custom_option('show_post_share') == 'yes' && (is_single() || is_page() && !is_home() && !is_front_page() && !$wp_query->is_posts_page)) {
            showShareButtons(array('post_id' => $post_id, 'post_link' => $post_link, 'post_title' => $post_title, 'post_descr' => $post_descr, 'post_thumb' => $post_attachment));
        }
    }
    ?>
						</div>
					</div>
				</article>

                <?php 
    if (!$post_protected) {
        //===================================== Post author info =====================================
        if (get_custom_option("show_post_author") == 'yes') {
            $post_author_email = get_the_author_meta('user_email', $post_author_id);
            $post_author_avatar = get_avatar($post_author_email, 50 * min(2, max(1, get_theme_option("retina_ready"))));
            $post_author_descr = do_shortcode(nl2br(get_the_author_meta('description', $post_author_id)));
            ?>