Esempio n. 1
0
function get_participantbox($object_id)
{
    ?>
			<div class="media">
				<div class="media-left">
					<a href="<?php 
    echo get_permalink($object_id);
    ?>
">
						<?php 
    echo get_the_post_thumbnail($object_id, array(150, 150));
    ?>
					</a>
				</div>
				<div class="media-body participant_title">
					<h4 class="media-heading"><a href="<?php 
    echo get_permalink($object_id);
    ?>
"><?php 
    echo get_the_title($object_id);
    ?>
</a></h4>
					<?php 
    echo the_excerpt_max_charlength($object_id, 130);
    ?>
				</div>
			</div>
		<?php 
}
Esempio n. 2
0
/**
 * Description of object_logic
 *
 * @author Augusto
 */
function get_object_box($object)
{
    $thepost = get_post($object);
    //var_dump($thepost);
    $url = wp_get_attachment_url(get_post_thumbnail_id($thepost->ID));
    ?>
<div class="ih-item square effect6 from_top_and_bottom"><a href="<?php 
    echo get_permalink($thepost->ID);
    ?>
">
        <div class="img"><img src="<?php 
    echo $url;
    ?>
" alt="img"></div>
        <div class="info">
          <h3><?php 
    echo $thepost->post_title;
    ?>
</h3>
          <p><?php 
    echo the_excerpt_max_charlength($thepost->ID, 50);
    ?>
</p>
        </div></a>
</div>        
        <?php 
}
Esempio n. 3
0
function blog_thumbnail_style($atts, $current)
{
    global $post, $mk_options;
    extract($atts);
    $image_height = $grid_image_height;
    if ($thumbnail_align == 'left') {
        $align_class = ' content-align-right';
    } else {
        $align_class = ' content-align-left';
    }
    if ($layout == 'full') {
        $image_width = $grid_width - 40;
    } else {
        $image_width = $content_width / 100 * $grid_width - 40;
    }
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    /*
     * Image Width : 600px
     * Image Height : 460px
     */
    $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    $image_output_src = bfi_thumb($image_src_array[0], array('width' => '600', 'height' => '460'));
    if ($post_type == '') {
        $post_type = 'image';
    }
    $output .= '<article id="' . get_the_ID() . '" class="mk-blog-thumbnail-item thumbnail-' . $item_id . ' mk-isotop-item ' . $post_type . '-post-type' . $align_class . '">' . "\n";
    if (has_post_thumbnail()) {
        $output .= '<div class="featured-image" ><a href="' . get_permalink() . '" title="' . get_the_title() . '">';
        $output .= '    <img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . $image_output_src . '" itemprop="image" />';
        $output .= '    <div class="image-hover-overlay"></div>';
        $output .= '    <div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
        $output .= '</a></div>';
    }
    $output .= '<div class="mk-thumbnail-content-container">';
    $output .= '    <div class="mk-blog-meta">';
    $output .= '        <div class="mk-blog-author">';
    ob_start();
    the_author_posts_link();
    $output .= ob_get_contents() . '</div>';
    ob_get_clean();
    $output .= '        <span class="mk-categories"> / ' . __('', 'mk_framework') . ' ' . get_the_category_list(', ') . ' </span> /
                        <time datetime="' . get_the_date() . '">
                            <a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>
                        </time>';
    $output .= '        <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    if ($excerpt_length != 0) {
        ob_start();
        the_excerpt_max_charlength($excerpt_length);
        $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
    }
    $output .= '        <div class="mk-teader-button">' . do_shortcode('[mk_button dimension="outline" corner_style="pointed" outline_skin="custom" outline_active_color="#000000" outline_hover_color="#fff" margin_bottom="0" size="medium" align="left" url="' . get_permalink() . '"]' . __('READ MORE', 'mk_framework') . '[/mk_button]') . '
                            </div>';
    $output .= '        </div>';
    $output .= '    </div>';
    $output .= '<div class="clearboth"></div>';
    $output .= '</article>' . "\n\n\n";
    return $output;
}
/**
 * FAQ loop.
 * We're replacing the Genesis loop with our own.
 */
function rbfaq_archive_loop()
{
    $count = 0;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            //* Set up the count
            $count++;
            //* Figure out what class to apply to the image
            //* If the image
            if ($count % 2 == 0) {
                $imageclass = 'member-image member-image-left';
            } else {
                $imageclass = 'member-image member-image-right';
            }
            printf('<div class="%s">', implode(' ', get_post_class('member-section')));
            /**
             * Output the image
             * We're only going to link the image if there's something to link to
             */
            if (get_the_content() && ($image = genesis_get_image('format=url&size=member-image'))) {
                printf('<div class="portfolio-image"><a href="%s" rel="bookmark"><img class="%s" src="%s" alt="%s" /></a></div>', get_permalink(), $imageclass, $image, the_title_attribute('echo=0'));
            } elseif ($image = genesis_get_image('format=url&size=member-image')) {
                printf('<div class="portfolio-image"><img class="%s" src="%s" alt="%s" /></div>', $imageclass, $image, the_title_attribute('echo=0'));
            }
            echo '<div class="member-content">';
            edit_post_link('Edit this member', '<small>', '</small>', '');
            //* Only link the title if there's some content to link to
            if (get_the_content()) {
                printf('<h2 class="entry-title"><a href="%s">%s</a></h2>', get_the_permalink(), get_the_title());
            } else {
                printf('<h2 class="entry-title">%s</h2>', get_the_title());
            }
            //* Add the member's title
            global $post;
            $title = get_post_meta(get_the_ID(), '_rbm_members_title', true);
            if ($title) {
                printf('<h4 class="member-subtitle">%s</h4>', $title);
            }
            echo '<p>';
            the_excerpt_max_charlength(250);
            echo '</p>';
            if (get_the_content()) {
                printf('<a class="button" href="%s">Read more</a>', get_the_permalink());
            }
            echo '</div>';
            // .member-content
            echo '</div>';
            // the post_class() div
        }
        // end while
    }
    // end if
}
Esempio n. 5
0
function get_objectdata($object_id)
{
    //$return = array();
    $post = get_post($object_id);
    //print_array($post);
    $post_title = $post->post_title;
    $abst_size = strlen($post_title) > 35 ? 65 : 130;
    $time = get_field("tiempo", $post->ID);
    $field = array();
    $autor = get_field("participant", $post->ID);
    if ($autor) {
        array_push($field, array("Autor", get_the_title($autor[0])));
    }
    $return = array($post->ID, $post_title, get_permalink($post->ID), the_excerpt_max_charlength($post->ID, $abst_size), "", $field);
    return $return;
}
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('CWS_Widget_Latest_Posts', $instance['title']);
     $head = '';
     if ($title && $title != '') {
         $head = '<h3 class="widget-title">' . $title . '</h3>';
     }
     global $post;
     $category = !empty($instance['category']) ? absint($instance['category']) : 0;
     $post_query = array('numberposts' => 3, 'cat' => $category);
     if ($instance['num_to_show']) {
         $post_query['numberposts'] = $instance['num_to_show'];
     }
     if ($instance['show_date']) {
         $post_query['show_date'] = $instance['show_date'];
     }
     $show_date = $instance['show_date'] ? $instance['show_date'] : false;
     $myposts = get_posts($post_query);
     echo $before_widget;
     echo '<div class="latest-posts-widget">' . $head . '<div class="widget-content"><ul>';
     //$myposts = get_posts( $post_query );
     foreach ($myposts as $post) {
         $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_id()), 'full', true);
         setup_postdata($post);
         echo '<li>';
         if (has_post_thumbnail()) {
             echo '<div class="kids_image_wrapper ">';
             echo '<a href="' . $thumbnail[0] . '" class="prettyPhoto kids_mini_picture"  data-rel="prettyPhoto[rpwt]">';
             echo '<img src="' . bfi_thumb($thumbnail[0], array('width' => 70, 'height' => 70, 'crop' => true)) . '" width="70" height="70" alt=""></a></div>';
         }
         echo '<div class="kids_post_content"><h4><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
         if ($show_date) {
             echo '<p>' . the_excerpt_max_charlength(25) . '</p>';
             echo '<p class="time-post">' . get_the_date() . '</p>';
         } else {
             echo '<p>' . the_excerpt_max_charlength(40) . '</p>';
         }
         echo '</div></li>';
     }
     wp_reset_postdata();
     echo '</ul></div></div>' . $args['after_widget'];
 }
Esempio n. 7
0
 function social_share_list($atts, $content = null)
 {
     global $qode_options_proya;
     if (isset($qode_options_proya['twitter_via']) && !empty($qode_options_proya['twitter_via'])) {
         $twitter_via = " via " . $qode_options_proya['twitter_via'] . " ";
     } else {
         $twitter_via = "";
     }
     $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
     $html = "";
     if (isset($qode_options_proya['enable_social_share']) && $qode_options_proya['enable_social_share'] == "yes") {
         $post_type = get_post_type();
         if (isset($qode_options_proya["post_types_names_{$post_type}"])) {
             if ($qode_options_proya["post_types_names_{$post_type}"] == $post_type) {
                 $html .= '<div class="social_share_list_holder">';
                 $html .= "<span>" . __('Share on: ', 'qode') . "</span>";
                 $html .= '<ul>';
                 if (isset($qode_options_proya['enable_facebook_share']) && $qode_options_proya['enable_facebook_share'] == "yes") {
                     $html .= '<li class="facebook_share">';
                     $html .= '<a title="' . __("Share on Facebook", "qode") . '" href="#" onclick="window.open(\'http://www.facebook.com/sharer.php?s=100&amp;p[title]=' . urlencode(qode_addslashes(get_the_title())) . '&amp;p[summary]=' . urlencode(qode_addslashes(strip_tags(get_the_excerpt()))) . '&amp;p[url]=' . urlencode(get_permalink()) . '&amp;&p[images][0]=';
                     if (function_exists('the_post_thumbnail')) {
                         $html .= wp_get_attachment_url(get_post_thumbnail_id());
                     }
                     $html .= '\', \'sharer\', \'toolbar=0,status=0,width=620,height=280\');">';
                     if (!empty($qode_options_proya['facebook_icon'])) {
                         $html .= '<img src="' . $qode_options_proya["facebook_icon"] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-facebook"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if ($qode_options_proya['enable_twitter_share'] == "yes") {
                     $html .= '<li class="twitter_share">';
                     $html .= '<a href="#" title="' . __("Share on Twitter", 'qode') . '" onclick="popUp=window.open(\'http://twitter.com/home?status=' . urlencode(the_excerpt_max_charlength(mb_strlen(get_permalink())) . $twitter_via) . get_permalink() . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false;">';
                     if (!empty($qode_options_proya['twitter_icon'])) {
                         $html .= '<img src="' . $qode_options_proya["twitter_icon"] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-twitter"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if ($qode_options_proya['enable_google_plus'] == "yes") {
                     $html .= '<li  class="google_share">';
                     $html .= '<a href="#" title="' . __("Share on Google+", "qode") . '" onclick="popUp=window.open(\'https://plus.google.com/share?url=' . urlencode(get_permalink()) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['google_plus_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['google_plus_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-google-plus"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if (isset($qode_options_proya['enable_linkedin']) && $qode_options_proya['enable_linkedin'] == "yes") {
                     $html .= '<li  class="linkedin_share">';
                     $html .= '<a href="#" class="' . __("Share on LinkedIn", "qode") . '" onclick="popUp=window.open(\'http://linkedin.com/shareArticle?mini=true&amp;url=' . urlencode(get_permalink()) . '&amp;title=' . urlencode(get_the_title()) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['linkedin_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['linkedin_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-linkedin"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if (isset($qode_options_proya['enable_tumblr']) && $qode_options_proya['enable_tumblr'] == "yes") {
                     $html .= '<li  class="tumblr_share">';
                     $html .= '<a href="#" title="' . __("Share on Tumblr", "qode") . '" onclick="popUp=window.open(\'http://www.tumblr.com/share/link?url=' . urlencode(get_permalink()) . '&amp;name=' . urlencode(get_the_title()) . '&amp;description=' . urlencode(get_the_excerpt()) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['tumblr_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['tumblr_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-tumblr"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if (isset($qode_options_proya['enable_pinterest']) && $qode_options_proya['enable_pinterest'] == "yes") {
                     $html .= '<li  class="pinterest_share">';
                     $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
                     $html .= '<a href="#" title="' . __("Share on Pinterest", "qode") . '" onclick="popUp=window.open(\'http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink()) . '&amp;description=' . qode_addslashes(get_the_title()) . '&amp;media=' . urlencode($image[0]) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['pinterest_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['pinterest_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-pinterest"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if (isset($qode_options_proya['enable_vk']) && $qode_options_proya['enable_vk'] == "yes") {
                     $html .= '<li  class="vk_share">';
                     $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
                     $html .= '<a href="#" title="' . __("Share on VK", "qode") . '" onclick="popUp=window.open(\'http://vkontakte.ru/share.php?url=' . urlencode(get_permalink()) . '&amp;title=' . urlencode(get_the_title()) . '&amp;description=' . urlencode(get_the_excerpt()) . '&amp;image=' . urlencode($image[0]) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['vk_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['vk_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-vk"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 $html .= '</ul>';
                 //close ul
                 $html .= '</div>';
                 //close div.social_share_list_holder
             }
         }
     }
     return $html;
 }
Esempio n. 8
0
<?php 
    while ($jobBits->have_posts()) {
        $jobBits->the_post();
        $block_link = get_post_meta($post->ID, 'block_link', true);
        ?>
		<li>
            <a href="<?php 
        echo the_permalink();
        ?>
"
                <header class="sticky"><?php 
        the_title();
        ?>
</header>
                <p class="role_desc"><?php 
        the_excerpt_max_charlength(94);
        ?>
</p>
            </a>
            <a href="<?php 
        echo the_permalink();
        ?>
" class="read_more_cta">Read more and apply</a>
		</li>
<?php 
    }
    ?>
            </ul>
          </div>          
<?php 
}
$r = new WP_Query($query);
$output .= '<div class="mk-shortcode mk-blog-showcase ' . $el_class . '">';
$output .= '<ul>';
$i = 0;
if ($r->have_posts()) {
    while ($r->have_posts()) {
        $r->the_post();
        $i++;
        $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
        $image_src = bfi_thumb($image_src_array[0], array('width' => 260, 'height' => 180));
        $first_el_class = $i == 1 ? 'mk-blog-first-el' : '';
        $output .= '<li class="' . $first_el_class . '">';
        $output .= '<div class="mk-blog-showcase-thumb"><div class="showcase-blog-overlay"></div><a href="' . get_permalink() . '"><i class="mk-jupiter-icon-plus-circle"></i></a><img src="' . $image_src . '" alt="' . get_the_title() . '" title="' . get_the_title() . '" /></div>';
        $output .= '<div class="blog-showcase-extra-info">';
        $output .= '<time datetime="' . get_the_date() . '">';
        $output .= '<a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>';
        $output .= '</time>';
        $output .= '<a class="blog-showcase-title" href="' . get_permalink() . '">' . get_the_title() . '</a><div class="clearboth"></div>';
        if ($excerpt_length != 0) {
            ob_start();
            the_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt">' . ob_get_clean() . '</div>';
        }
        $output .= '<a href="' . get_permalink() . '" class="blog-showcase-more">' . __('Read more', 'mk_framework') . '<i class="mk-icon-double-angle-right"></i></a>';
        $output .= '</div>';
        $output .= '</li>';
    }
    wp_reset_query();
}
$output .= '<div class="clearboth"></div></ul></div>';
echo $output;
Esempio n. 10
0
                                if (get_field('dien_tich')) {
                                    ?>
                                              <p class="dien-tich">
                                              <strong>Diện tích:</strong> <?php 
                                    echo get_field('dien_tich');
                                    ?>
                                            </p>
                                            <?php 
                                }
                                ?>
											<?php 
                                if ($category_cat && $category_cat[0]->slug != 'nguon-dia-oc') {
                                    ?>
											<p class="description">
												<?php 
                                    echo the_excerpt_max_charlength(12);
                                    ?>
											</p>
											<?php 
                                }
                                ?>
                                            <div class="fs-comment">
												<span>Bình chọn:</span>
												<?php 
                                //echo do_shortcode('[ratings id="'.  get_the_ID().'" results="true"]');
                                ?>
                                                <?php 
                                if (function_exists('the_ratings')) {
                                    the_ratings();
                                }
                                ?>
Esempio n. 11
0
            ?>
                    <a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            the_title_attribute();
            ?>
">
                    <?php 
            the_post_thumbnail();
            ?>
                    </a>
                  <?php 
        }
        ?>
                <p class="text-justify"><?php 
        the_excerpt_max_charlength(280);
        ?>
                <a href="<?php 
        the_permalink();
        ?>
">Read more</a></p>
            <?php 
    }
}
?>
        </div>

    </div> 
<?php 
get_footer();
Esempio n. 12
0
    function quicksand_filter()
    {
        wp_reset_query();
        if ($_POST['filter'] == 'all') {
            $num_post = count(query_posts('post_type=' . $_POST['post_type'] . '&posts_per_page=' . $_POST['num_posts_per_page'] . '&paged=' . $_POST['page']));
        } else {
            $num_post = count(query_posts('meta_key=' . THEME_SLUG . 'type_portfolio&meta_value=' . $_POST['filter'] . '&post_type=' . $_POST['post_type'] . '&posts_per_page=' . $_POST['num_posts_per_page'] . '&paged=' . $_POST['page']));
        }
        $column_count = $_POST['column_count'];
        $width_thumb = $_POST['width_thumb'];
        $height_thumb = $_POST['height_thumb'];
        $i = 0;
        ?>
		<ul class="list-post">
		<?php 
        while (have_posts()) {
            the_post();
            global $post;
            $thumbnail = get_thumbnail($width_thumb, $height_thumb, '', get_the_title(), get_the_title());
            $thumb = $thumbnail["fullpath"];
            ?>
			<li class="item<?php 
            if ($i % $column_count == 0) {
                echo ' start';
            }
            if (++$i % $column_count == 0 || $i == $num_post) {
                echo ' end';
            }
            ?>
" data-id="<?php 
            echo $post->ID;
            ?>
" title="<?php 
            echo $i;
            ?>
">
				<?php 
            if ($thumb || ($video_link = get_post_meta($post->ID, THEME_SLUG . 'video_portfolio', true))) {
                ?>
				<div class="image image-style">
					<a class="thumbnail" href="<?php 
                the_permalink();
                ?>
">
						<?php 
                if ($thumb) {
                    the_post_thumbnail(array($width_thumb, $height_thumb), array('class' => 'thumbnail-effect-1'));
                } else {
                    echo get_thumbnail_video($video_link, $width_thumb, $height_thumb);
                }
                ?>
					</a>
					<?php 
                if ($_POST['lightbox'] == 'true') {
                    if ($video_link) {
                        show_light_box($post, 'fancybox-group', '', $_POST['id_group'] . '-' . $post->ID);
                    } else {
                        show_light_box($post, 'fancybox-group', 'lightbox-' . $_POST['id_group'], $_POST['id_group'] . '-' . $post->ID);
                    }
                }
                ?>
				</div>
				<?php 
            }
            ?>
				<div class="detail<?php 
            if (!$thumb && !$video_link) {
                echo ' noimage';
            }
            ?>
">
					<h2 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            printf(esc_attr__('Permalink to %s', 'wpdance'), the_title_attribute('echo=0'));
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a></h2>
					<div class="entry-content">
						<?php 
            the_excerpt_max_charlength(250);
            ?>
					</div><!-- .entry-content -->
					<a href="<?php 
            the_permalink();
            ?>
" class="read-more-btn button"><span><span><?php 
            _e('Read more', 'wpdance');
            ?>
</span></span></a>
				</div>
			</li>
		<?php 
        }
        ?>
		</ul>

		<?php 
        wp_reset_query();
    }
Esempio n. 13
0
 function social_share_list($atts, $content = null)
 {
     global $qode_options_proya;
     if (isset($qode_options_proya['twitter_via']) && !empty($qode_options_proya['twitter_via'])) {
         $twitter_via = " via " . $qode_options_proya['twitter_via'] . " ";
     } else {
         $twitter_via = "";
     }
     $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
     $html = "";
     if (isset($qode_options_proya['enable_social_share']) && $qode_options_proya['enable_social_share'] == "yes") {
         $post_type = get_post_type();
         if (isset($qode_options_proya["post_types_names_{$post_type}"])) {
             if ($qode_options_proya["post_types_names_{$post_type}"] == $post_type) {
                 $html .= '<div class="social_share_list_holder">';
                 $html .= "<span>" . __('Share on: ', 'qode') . "</span>";
                 $html .= '<ul>';
                 $is_mobile = (bool) preg_match('#\\b(ip(hone|od|ad)|android|opera m(ob|in)i|windows (phone|ce)|blackberry|tablet' . '|s(ymbian|eries60|amsung)|p(laybook|alm|rofile/midp|laystation portable)|nokia|fennec|htc[\\-_]' . '|mobile|up\\.browser|[1-4][0-9]{2}x[1-4][0-9]{2})\\b#i', $_SERVER['HTTP_USER_AGENT']);
                 if (isset($qode_options_proya['enable_facebook_share']) && $qode_options_proya['enable_facebook_share'] == "yes") {
                     $html .= '<li class="facebook_share">';
                     // if mobile, use different link to sharer.php service
                     if ($is_mobile) {
                         $html .= '<a title="' . __("Share on Facebook", "qode") . '" href="#" onclick="window.open(\'http://m.facebook.com/sharer.php?u=' . urlencode(get_permalink());
                     } else {
                         $html .= '<a title="' . __("Share on Facebook", "qode") . '" href="#" onclick="window.open(\'http://www.facebook.com/sharer.php?s=100&amp;p[title]=' . urlencode(qode_addslashes(get_the_title())) . '&amp;p[summary]=' . urlencode(qode_addslashes(strip_tags(get_the_excerpt()))) . '&amp;p[url]=' . urlencode(get_permalink()) . '&amp;&p[images][0]=';
                         if (function_exists('the_post_thumbnail')) {
                             $html .= wp_get_attachment_url(get_post_thumbnail_id());
                         }
                     }
                     $html .= '\', \'sharer\', \'toolbar=0,status=0,width=620,height=280\');">';
                     if (!empty($qode_options_proya['facebook_icon'])) {
                         $html .= '<img src="' . $qode_options_proya["facebook_icon"] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-facebook"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if ($qode_options_proya['enable_twitter_share'] == "yes") {
                     $html .= '<li class="twitter_share">';
                     // if mobile use different link to update status service
                     if ($is_mobile) {
                         $html .= '<a href="#" title="' . __("Share on Twitter", 'qode') . '" onclick="popUp=window.open(\'http://twitter.com/intent/tweet?text=' . urlencode(the_excerpt_max_charlength(mb_strlen(get_permalink())) . $twitter_via) . get_permalink() . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false;">';
                     } else {
                         $html .= '<a href="#" title="' . __("Share on Twitter", 'qode') . '" onclick="popUp=window.open(\'http://twitter.com/home?status=' . urlencode(the_excerpt_max_charlength(mb_strlen(get_permalink())) . $twitter_via) . get_permalink() . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false;">';
                     }
                     if (!empty($qode_options_proya['twitter_icon'])) {
                         $html .= '<img src="' . $qode_options_proya["twitter_icon"] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-twitter"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if ($qode_options_proya['enable_google_plus'] == "yes") {
                     $html .= '<li  class="google_share">';
                     $html .= '<a href="#" title="' . __("Share on Google+", "qode") . '" onclick="popUp=window.open(\'https://plus.google.com/share?url=' . urlencode(get_permalink()) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['google_plus_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['google_plus_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-google-plus"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if (isset($qode_options_proya['enable_linkedin']) && $qode_options_proya['enable_linkedin'] == "yes") {
                     $html .= '<li  class="linkedin_share">';
                     $html .= '<a href="#" class="' . __("Share on LinkedIn", "qode") . '" onclick="popUp=window.open(\'http://linkedin.com/shareArticle?mini=true&amp;url=' . urlencode(get_permalink()) . '&amp;title=' . urlencode(get_the_title()) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['linkedin_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['linkedin_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-linkedin"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if (isset($qode_options_proya['enable_tumblr']) && $qode_options_proya['enable_tumblr'] == "yes") {
                     $html .= '<li  class="tumblr_share">';
                     $html .= '<a href="#" title="' . __("Share on Tumblr", "qode") . '" onclick="popUp=window.open(\'http://www.tumblr.com/share/link?url=' . urlencode(get_permalink()) . '&amp;name=' . urlencode(get_the_title()) . '&amp;description=' . urlencode(get_the_excerpt()) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['tumblr_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['tumblr_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-tumblr"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if (isset($qode_options_proya['enable_pinterest']) && $qode_options_proya['enable_pinterest'] == "yes") {
                     $html .= '<li  class="pinterest_share">';
                     $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
                     $html .= '<a href="#" title="' . __("Share on Pinterest", "qode") . '" onclick="popUp=window.open(\'http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink()) . '&amp;description=' . qode_addslashes(get_the_title()) . '&amp;media=' . urlencode($image[0]) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['pinterest_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['pinterest_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-pinterest"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if (isset($qode_options_proya['enable_vk']) && $qode_options_proya['enable_vk'] == "yes") {
                     $html .= '<li  class="vk_share">';
                     $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
                     $html .= '<a href="#" title="' . __("Share on VK", "qode") . '" onclick="popUp=window.open(\'http://vkontakte.ru/share.php?url=' . urlencode(get_permalink()) . '&amp;title=' . urlencode(get_the_title()) . '&amp;description=' . urlencode(get_the_excerpt()) . '&amp;image=' . urlencode($image[0]) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_proya['vk_icon'])) {
                         $html .= '<img src="' . $qode_options_proya['vk_icon'] . '" alt="" />';
                     } else {
                         $html .= '<i class="fa fa-vk"></i>';
                     }
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 $html .= '</ul>';
                 //close ul
                 $html .= '</div>';
                 //close div.social_share_list_holder
             }
         }
     }
     return $html;
 }
Esempio n. 14
0
            }
            // create json map
            $address = get_field('address');
            $dataLatLng = geocode($address);
            $news = '';
            if (get_field('new')) {
                $news = '<div class="news-icon"><span>New</span></div>';
            } else {
                if (get_field('page_hot')) {
                    $news = '<div class="news-icon hot"><span>Hot</span></div>';
                }
            }
            $url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
            $total_comment = getFacebookDetails($url);
            $ratings = the_ratings_results(get_the_ID());
            $jsonData[] = array('title' => get_the_title(), 'lng' => $dataLatLng[0], 'lat' => $dataLatLng[1], 'address' => '', 'description' => '<p class="description">' . the_excerpt_max_charlength(18) . '</p>', 'vote' => '<div class="fs-comment"><span>Bình chọn:</span>' . $ratings . '</div>', 'img' => $img, 'baseurl' => get_the_permalink(), 'hot' => $news);
            ?>

              <?php 
        }
        ?>
            </ul>
            <?php 
        $defaultLng = 10.7596132;
        $defaultLat = 106.6644058;
        if ($jsonData) {
            foreach ($jsonData as $val) {
                if (!empty($val['lng']) || !empty($val['lat'])) {
                    $defaultLng = $val['lng'];
                    $defaultLat = $val['lat'];
                    break;
Esempio n. 15
0
 function vc_latest_news_function($atts, $content = null)
 {
     $output = '';
     extract(shortcode_atts(array('lastest_news_title' => '', 'latest_news_icon' => '', 'select_categories' => '', 'lastest_news_button' => '', 'lastest_news_view_all' => '', 'count_word' => '', 'extra_class' => ''), $atts));
     $output .= '<div id="blog-section" class="blog-section ow-section ' . $extra_class . '">';
     $output .= '<div class="container">';
     $output .= '<div class="section-header">';
     $output .= '<h3><img src="' . wp_get_attachment_url($latest_news_icon) . '" alt="sep-icon" />' . $lastest_news_title . '</h3>';
     $output .= '</div>';
     $output .= '';
     if (is_numeric($select_categories) && $select_categories >= 0) {
         $list_post = get_posts(['category' => $select_categories, 'posts_per_page' => 2]);
         foreach ($list_post as $post) {
             setup_postdata($post);
             $content = get_the_content();
             $output .= '<article class="col-md-6 col-sm-12">';
             $output .= '<div class="blog-box">';
             $output .= '<div class="blog-box-inner">';
             $output .= '<header class="entry-header">';
             $output .= '<h3><a title="' . get_the_title($post->ID) . '" href="' . get_post_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></h3>';
             $output .= '</header>';
             $output .= '<footer class="entry-footer">';
             $output .= '<span class="byline">';
             $output .= '<span class="screen-reader-text">' . __('BY', KC_DOMAIN) . ' </span>';
             $output .= author_link();
             $output .= '</span> ';
             $output .= '<span class="byline">';
             $output .= '<span class="screen-reader-text">' . __('Likes', KC_DOMAIN) . ' </span>';
             $output .= '<a title="Likes" href="#">23</a> </span>';
             $output .= '</footer>';
             $output .= '<div class="entry-content">';
             $output .= '<p>' . the_excerpt_max_charlength($content, $count_word) . ' ...</p>';
             $output .= '</div>';
             $output .= '<a title="' . $lastest_news_button . '" href="' . get_post_permalink($post->ID) . '">' . $lastest_news_button . '</a>';
             $output .= '</div>';
             $output .= '<div class="entry-cover pull-right last-new-home">';
             $output .= '<a title="' . $post->post_title . '" href="' . get_post_permalink($post->ID) . '" >' . get_the_post_thumbnail($post->ID, "medium") . ' </a>';
             $output .= '<span class="posted-on">';
             $output .= '<span class="like">' . wp_count_comments($post->ID)->total_comments . '</span>';
             $output .= '<span class="date">' . get_the_date('d/m/Y', $post->ID) . '</span>';
             $output .= '</span>';
             $output .= '</div>';
             $output .= '</div> </article>';
         }
     }
     $output .= '<a href="' . get_category_link($select_categories) . '" class="btn">' . $lastest_news_view_all . '</a>';
     $output .= '</div> </div>';
     return $output;
 }
Esempio n. 16
0
  <a href="<?php 
the_permalink();
?>
" title="<?php 
printf(esc_attr__('Permalink to %s', 'bd'), the_title_attribute('echo=0'));
?>
" rel="bookmark">
  <?php 
the_title();
?>
  </a>
</h2>
<!--//END-->

<div class="entry-meta-header">
  <span>
  <?php 
the_time(get_option('date_format'));
?>
  </span>
</div>
<!--//END-->

<div class="entry-content">
  <?php 
the_excerpt_max_charlength('120');
?>
</div>
<!--//END-->

Esempio n. 17
0
function blog_grid_style($atts, $current)
{
    global $post;
    extract($atts);
    $image_height = $grid_image_height;
    switch ($column) {
        case 1:
            if ($layout == 'full') {
                $image_width = round($grid_width - 66);
            } else {
                $image_width = round($content_width / 100 * $grid_width - 66);
            }
            $mk_column_css = 'one-column';
            break;
        case 2:
            if ($layout == 'full') {
                $image_width = round($grid_width / 2 - 46);
            } else {
                $image_width = round($content_width / 100 * $grid_width / 2 - 46);
            }
            $mk_column_css = 'two-column';
            break;
        case 3:
            $image_width = $grid_width / 3 - 42;
            $mk_column_css = 'three-column';
            break;
        case 4:
            $image_width = $grid_width / 4 - 28;
            $mk_column_css = 'four-column';
            break;
        default:
            $image_width = $grid_width / 3 - 42;
            $mk_column_css = 'three-column';
            break;
    }
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    switch ($image_size) {
        case 'full':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'crop':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
        case 'large':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'medium':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium', true);
            $image_output_src = $image_src_array[0];
            break;
        default:
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
    }
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    if ($post_type == '') {
        $post_type = 'image';
    }
    $output .= '<article id="entry-' . get_the_ID() . '" class="mk-blog-grid-item mk-isotop-item grid-' . $item_id . ' ' . $mk_column_css . '"><div class="blog-grid-holder">';
    if ($post_type == 'image' || $post_type == '') {
        if (has_post_thumbnail()) {
            $image_src = bfi_thumb($image_src_array[0], array('width' => $image_width, 'height' => $image_height));
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-grid-lightbox" data-fancybox-group="blog-grid" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<i class="mk-li-image blog-grid-hover-icon"></i>';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '</a></div>';
        }
    }
    if ($post_type == 'portfolio') {
        $featured_image_id = get_post_thumbnail_id();
        $attachment_ids = get_post_meta($post->ID, '_gallery_images', true);
        if (!empty($attachment_ids)) {
            if (!empty($featured_image_id)) {
                $final_attachment_ids = $featured_image_id . ',' . $attachment_ids;
            } else {
                $final_attachment_ids = $attachment_ids;
            }
            $output .= '<div class="blog-gallery-type">';
            $output .= do_shortcode('[mk_swipe_slideshow images="' . $final_attachment_ids . '" image_width="' . $image_width . '" image_height="' . $image_height . '"]');
            $output .= '</div>';
        } else {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-modern-lightbox" data-fancybox-group="blog-modern" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<i class="mk-li-portfolio blog-grid-hover-icon"></i>';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '</a></div>';
        }
    }
    if ($post_type == 'video') {
        $video_id = get_post_meta($post->ID, '_single_video_id', true);
        $video_site = get_post_meta($post->ID, '_single_video_site', true);
        $output .= '<div class="featured-image">';
        if ($video_site == 'vimeo') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://player.vimeo.com/video/' . $video_id . '?title=0&amp;byline=0&amp;portrait=0&amp" width="' . $image_width . '" height="' . $image_height . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'youtube') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.youtube.com/embed/' . $video_id . '?showinfo=0&amp;theme=light&amp;color=white&amp;rel=0" frameborder="0" width="' . $image_width . '" height="' . $image_height . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'dailymotion') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/embed/video/' . $video_id . '?logo=0" frameborder="0" width="' . $image_width . '" height="' . $image_height . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        $output .= '</div>';
    }
    if ($post_type == 'audio') {
        $iframe = get_post_meta($post->ID, '_audio_iframe', true);
        if (empty($iframe)) {
            $mp3_file = get_post_meta($post->ID, '_mp3_file', true);
            $ogg_file = get_post_meta($post->ID, '_ogg_file', true);
            $audio_author = get_post_meta($post->ID, '_single_audio_author', true);
            $remove_thumb = $column == 4 ? "true" : 'false';
            $output .= do_shortcode('[mk_audio mp3_file="' . $mp3_file . '" large_player_class="" remove_thumb="' . $remove_thumb . '" ogg_file="' . $ogg_file . '" thumb="' . $image_src_array[0] . '" img_dimension="100"]');
        } else {
            $output .= '<div class="audio-iframe">' . $iframe . '</div>';
        }
    }
    $output .= '<div class="mk-blog-meta">';
    $output .= '<h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    if ($disable_meta != 'false') {
        $output .= '<div class="mk-blog-meta-wrapper">';
        $output .= '<time datetime="' . get_the_date() . '">';
        $output .= '<a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>';
        $output .= '</time>';
        $output .= '</div>';
        // end:[mk-blog-meta-wrapper]
    }
    if ($full_content == 'true') {
        $content = str_replace(']]>', ']]&gt;', apply_filters('the_content', get_the_content()));
        $output .= '<div class="the-excerpt"><p>' . $content . '</p></div>';
    } else {
        if ($excerpt_length != 0) {
            ob_start();
            the_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
        }
    }
    $output .= '</div>';
    $output .= '<div class="blog-grid-footer">';
    $output .= '<a class="mk-readmore" href="' . get_permalink() . '"><i class="mk-moon-arrow-right-2"></i>' . __('Read More', 'mk_framework') . '</a>';
    if (function_exists('mk_love_this')) {
        ob_start();
        mk_love_this();
        $output .= '<div class="mk-love-holder">' . ob_get_clean() . '</div>';
    }
    $output .= '</div>';
    $output .= '</div></article>';
    return $output;
}
Esempio n. 18
0
function blog_magazine_style($atts, $i)
{
    global $post, $mk_options;
    extract($atts);
    $output = '';
    $image_height = $grid_image_height;
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    if ($i == 1) {
        if ($layout == 'full') {
            $image_width = $grid_width - 40;
            $image_height = $image_width * 0.6;
        } else {
            $image_width = $content_width / 100 * $grid_width - 40;
            $image_height = $image_width * 0.6;
        }
        switch ($image_size) {
            case 'full':
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
                $image_output_src = $image_src_array[0];
                break;
            case 'crop':
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
                $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
                break;
            case 'large':
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large', true);
                $image_output_src = $image_src_array[0];
                break;
            case 'medium':
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium', true);
                $image_output_src = $image_src_array[0];
                break;
            default:
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
                $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
                break;
        }
        if ($post_type == '') {
            $post_type = 'image';
        }
        $output .= '<article id="' . get_the_ID() . '" class="mk-blog-magazine-item magazine-featured-post mk-isotop-item"><div class="blog-item-holder">';
        if (has_post_thumbnail()) {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-newspaper-lightbox" data-fancybox-group="blog-magazine" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '  <img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . $image_output_src . '" itemprop="image" />';
            $output .= '  <div class="image-gradient-overlay"></div>';
            $output .= '</a></div>';
        }
        $output .= '<div class="item-wrapper">';
        $output .= '  <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
        $output .= '    <div class="mk-blog-meta">';
        $output .= '        <time datetime="' . get_the_date() . '">
                                <a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>
                            </time>
                        <span class="mk-categories">&nbsp;' . __('', 'mk_framework') . ' ' . get_the_category_list(', ') . '</span>
                            ';
        $output .= '    <div class="clearboth"></div>';
        $output .= '    </div>';
        if ($excerpt_length != 0) {
            ob_start();
            the_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
        }
        if ($disable_comments_share != 'false') {
            $output .= '<div class="blog-magazine-social-section">';
            if ($mk_options['enable_blog_single_comments'] == 'true') {
                if (get_post_meta($post->ID, '_disable_comments', true) != 'false') {
                    ob_start();
                    comments_number('0', '1', '%');
                    $output .= '<a href="' . get_permalink() . '#comments" class="blog-magazine-comment"><i class="mk-moon-bubble-9"></i><span>' . ob_get_contents() . '</span></a>';
                    ob_get_clean();
                }
            }
            if (function_exists('mk_love_this')) {
                ob_start();
                mk_love_this();
                $output .= '<div class="mk-love-holder">' . ob_get_contents() . '</div>';
                ob_get_clean();
            }
            $output .= '</div>';
        }
        $output .= '</div>';
        $output .= '</article>' . "\n\n\n";
    } else {
        $image_width = 200;
        $image_height = 200;
        $output .= '<article id="' . get_the_ID() . '" class="mk-blog-magazine-item magazine-thumb-post"><div class="blog-item-holder">';
        $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
        $image_src = bfi_thumb($image_src_array[0], array('width' => $image_width, 'height' => $image_height, 'crop' => true));
        if (has_post_thumbnail()) {
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '" href="' . get_permalink() . '">';
            $output .= '<img alt="' . get_the_title() . '" width="' . $image_width . '" class="item-featured-image" height="' . $image_height . '" title="' . get_the_title() . '" src="' . $image_src . '" itemprop="image" />';
            $output .= '</a></div>';
        }
        $output .= '<div class="item-wrapper">';
        $output .= '  <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
        $output .= '<div class="mk-blog-meta">';
        $output .= '  <time datetime="' . get_the_date() . '" itemprop="datePublished" pubdate>';
        $output .= '    <a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '&nbsp;</a>';
        $output .= '  </time>';
        $output .= '<span class="mk-categories">' . get_the_category_list(', ') . '</span>';
        $output .= '</div>';
        $output .= '</div>';
        $output .= '<div class="clearboth"></div>';
        $output .= '</article>';
    }
    return $output;
}
Esempio n. 19
0
    function block($instance)
    {
        extract($instance);
        switch ($layout) {
            case '2col':
                $span = 'span6';
                $imagesize = 'tb-860';
                $counter = '2';
                $videoheight = '195';
                break;
            case '3col':
                $span = 'span4';
                $imagesize = 'tb-360';
                $counter = '3';
                $videoheight = '245';
                break;
            case '4col':
                $span = 'span3';
                $imagesize = 'tb-360';
                $counter = '4';
                $videoheight = '145';
                break;
            default:
                $span = 'span3';
                $imagesize = 'tb-360';
                $counter = '4';
                $videoheight = '145';
                break;
        }
        ?>

	<div id="blog-updates">

		<div class="row-fluid">

		<?php 
        $count = 1;
        query_posts('showposts=' . $entries . '&post_type=post');
        ?>

		<?php 
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>
	
			
			<div class="<?php 
                echo $span;
                ?>
 well well-small">

				<?php 
                $id = get_the_ID();
                $temp = get_post_meta($id, '_mpt_post_select_temp', true);
                if ($temp == 'image-carousel') {
                    mpt_load_image_carousel($id, $imagesize);
                } else {
                    if ($temp == 'video') {
                        mpt_load_video_post($id, $videoheight);
                    } else {
                        mpt_load_featured_image($id, $imagesize);
                    }
                }
                ?>
				
				<a href="<?php 
                the_permalink();
                ?>
"><h3 class="post-title"><?php 
                the_title();
                ?>
</h3></a>
				<p class="post-meta">Posted By <?php 
                the_author();
                ?>
 on <?php 
                the_date();
                ?>
</p>
				<?php 
                if (!empty($excerpt) || $excerpt == '0') {
                    ?>
					<p><?php 
                    the_excerpt_max_charlength(esc_attr($excerpt));
                    ?>
</p>
				<?php 
                }
                ?>
			</div>

			<?php 
                if ($count == $counter) {
                    ?>
				</div>
				<div class="row-fluid">
				<?php 
                    $count = 0;
                    ?>
			<?php 
                }
                ?>

			<?php 
                $count++;
                ?>
	

		<?php 
            }
        }
        ?>

		<?php 
        wp_reset_query();
        ?>

		</div>

	</div>

	<?php 
    }
Esempio n. 20
0
                        ?>
" title="<?php 
                        the_title();
                        ?>
">
                  <?php 
                        the_title();
                        ?>
                </a>
              </p>
              <?php 
                        if (get_the_excerpt()) {
                            ?>
    
              <p class="address"><?php 
                            echo the_excerpt_max_charlength(24);
                            ?>
</p>
              <?php 
                        }
                        ?>
              
              <?php 
                        if (get_field('gia') && get_field('dien_tich')) {
                            ?>
              <div class="sf-price">
                <p class="price">
                  <strong>Giá:</strong> <br><span><?php 
                            echo get_field('gia');
                            ?>
</span>
Esempio n. 21
0
                                            <img class="media-object" src="<?php 
        echo $url;
        ?>
" alt="Capitulo <?php 
        echo $e + 1;
        ?>
" width="30px">
                                        </a>
                                    </div>
                                    <div class="media-body">
                                        <h4 class="media-heading"> <?php 
        echo get_the_title($capitulo_id);
        ?>
 </h4>
                                        <?php 
        echo the_excerpt_max_charlength($capitulo_id, 50);
        ?>
                                    </div>
                                </div>
                        <hr>
                            <?php 
    }
    ?>
                    </div>
               <?php 
}
?>
                          
          </div>
        </div>
Esempio n. 22
0
                                            <p class="page_sale"> <?php 
                echo get_field('page_sale');
                ?>
</p>
                                          </div>
                                            <?php 
            }
            ?>
                                        
                                        <?php 
            if (get_the_excerpt()) {
                ?>
                                        <div class="description-single">
                                          <strong>Điểm nổi bật:</strong><br>
                                          <?php 
                echo the_excerpt_max_charlength(40);
                ?>
                                          </div>
                                          <?php 
            }
            ?>
                                        
										
                    <?php 
            //if($category[0]->slug == 'am-thuc-tiec'):
            $result = get_vote(get_the_ID());
            if ($result) {
                ?>
                    <div class="share-voted share-voted-comment">
                      <ul>
                        <li>
Esempio n. 23
0
                echo get_the_title($capitulo[$e]);
                ?>
 <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
                                                             </a>
                                                           </h4>
                                                         </div>
                                                         <div id="collapse<?php 
                echo $i . "_" . $capitulo[$e];
                ?>
" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading<?php 
                echo $i . "_" . $capitulo[$e];
                ?>
">
                                                           <div class="panel-body">
                                                               <?php 
                echo the_excerpt_max_charlength($capitulo[$e], "150");
                ?>
                                                             
                                                           </div>
                                                         </div>
                                                       </div>                                                                                                                 
                                                    <?php 
            }
            ?>
                                               
                                            </div>                                  
                                  <?php 
        }
        ?>
                                  
                              </div>
Esempio n. 24
0
 function social_share($atts, $content = null)
 {
     global $qode_options_satellite;
     if (isset($qode_options_satellite['twitter_via']) && !empty($qode_options_satellite['twitter_via'])) {
         $twitter_via = " via " . $qode_options_satellite['twitter_via'];
     } else {
         $twitter_via = "";
     }
     $html = "";
     if (isset($qode_options_satellite['enable_social_share']) && $qode_options_satellite['enable_social_share'] == "yes") {
         $post_type = get_post_type();
         if (isset($qode_options_satellite["post_types_names_{$post_type}"])) {
             if ($qode_options_satellite["post_types_names_{$post_type}"] == $post_type) {
                 if ($post_type == "portfolio_page") {
                     $html .= '<div class="portfolio_share">';
                 } elseif ($post_type == "post") {
                     $html .= '<div class="blog_share">';
                 } elseif ($post_type == "page") {
                     $html .= '<div class="page_share">';
                 }
                 $html .= '<span class="social_share_holder">';
                 $html .= '<span class="social_share_icon">' . __('Share', 'qode') . '</span>';
                 $html .= '<div class="social_share_dropdown"><ul><li><span class="share_title">' . __('Share on', 'qode') . '</span></li>';
                 if (isset($qode_options_satellite['enable_facebook_share']) && $qode_options_satellite['enable_facebook_share'] == "yes") {
                     $html .= '<li class="facebook_share">';
                     $html .= '<a href="#" onclick="window.open(\'http://www.facebook.com/sharer.php?s=100&amp;p[title]=' . get_the_title() . '&amp;p[summary]=' . get_the_excerpt() . '&amp;p[url]=' . urlencode(get_permalink()) . '&amp;&p[images][0]=';
                     if (function_exists('the_post_thumbnail')) {
                         $html .= wp_get_attachment_url(get_post_thumbnail_id());
                     }
                     $html .= '\', \'sharer\', \'toolbar=0,status=0,width=620,height=280\');" href="javascript: void(0)">';
                     if (!empty($qode_options_satellite['facebook_icon'])) {
                         $html .= '<img src="' . $qode_options_satellite["facebook_icon"] . '" />';
                     } else {
                         $html .= '<span class="social_image"><span class="social_image_inner"></span></span>';
                     }
                     $html .= "<span class='share_text'>" . __('Like', 'qode') . "</span>";
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if ($qode_options_satellite['enable_google_plus'] == "yes") {
                     $html .= '<li  class="google_share">';
                     $html .= '<a href="#" onclick="popUp=window.open(\'https://plus.google.com/share?url=' . urlencode(get_permalink()) . '\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false">';
                     if (!empty($qode_options_satellite['google_plus_icon'])) {
                         $html .= '<img src="' . $qode_options_satellite['google_plus_icon'] . '" />';
                     } else {
                         $html .= '<span class="social_image"><span class="social_image_inner"></span></span>';
                     }
                     $html .= "<span class='share_text'>" . __('Plus', 'qode') . "</span>";
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 if ($qode_options_satellite['enable_twitter_share'] == "yes") {
                     $html .= '<li class="twitter_share">';
                     $html .= '<a href="#" onclick="popUp=window.open(\'http://twitter.com/share?url=' . urlencode(get_permalink()) . '&text=' . urlencode(the_excerpt_max_charlength(mb_strlen(get_permalink())) . $twitter_via) . '&count=horiztonal\', \'popupwindow\', \'scrollbars=yes,width=800,height=400\');popUp.focus();return false;" target="_blank" rel="nofollow">';
                     if (!empty($qode_options_satellite['twitter_icon'])) {
                         $html .= '<img src="' . $qode_options_satellite["twitter_icon"] . '" />';
                     } else {
                         $html .= '<span class="social_image"><span class="social_image_inner"></span></span>';
                     }
                     $html .= "<span class='share_text'>" . __('Tweet', 'qode') . "</span>";
                     $html .= "</a>";
                     $html .= "</li>";
                 }
                 $html .= "</ul></div>";
                 $html .= "</span>";
                 if ($post_type == "portfolio_page" || $post_type == "post" || $post_type == "page") {
                     $html .= '</div>';
                 }
             }
         }
     }
     return $html;
 }
Esempio n. 25
0
        ?>
">
                <?php 
        the_title();
        ?>
              </a>
            </p>
            <?php 
        if (get_the_excerpt()) {
            ?>
            <p class="description <?php 
            echo $class;
            ?>
">
							<?php 
            echo the_excerpt_max_charlength($char);
            ?>
						</p>
                        <?php 
        }
        ?>
            <?php 
        if (get_field('gia') && get_field('dien_tich')) {
            ?>
            <div class="sf-price">
              <p class="fs-pr">Giá:<var><?php 
            echo get_field('gia');
            ?>
</var></p>
              <p class="fs-pr fs-dt">Diện tích: <?php 
            echo get_field('dien_tich');
Esempio n. 26
0
function blog_newspaper_style($atts, $current)
{
    global $post;
    extract($atts);
    global $mk_options;
    $image_height = $grid_image_height;
    switch ($column) {
        case 1:
            if ($layout == 'full') {
                $image_width = round($grid_width - 66);
            } else {
                $image_width = round($content_width / 100 * $grid_width - 66);
            }
            $mk_column_css = 'one-column';
            break;
        case 2:
            if ($layout == 'full') {
                $image_width = round($grid_width / 2 - 46);
            } else {
                $image_width = round($content_width / 100 * $grid_width / 2 - 46);
            }
            $mk_column_css = 'two-column';
            break;
        case 3:
            $image_width = $grid_width / 3 - 44;
            $mk_column_css = 'three-column';
            break;
        case 4:
            $image_width = $grid_width / 4 - 36;
            $mk_column_css = 'four-column';
            break;
        default:
            $image_width = $grid_width / 3 - 42;
            $mk_column_css = 'three-column';
            break;
    }
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    switch ($image_size) {
        case 'full':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'crop':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
        case 'large':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'medium':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium', true);
            $image_output_src = $image_src_array[0];
            break;
        default:
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
    }
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    if ($post_type == '') {
        $post_type = 'image';
    }
    $output .= '<article id="' . get_the_ID() . '" class="mk-blog-newspaper-item newspaper-' . $item_id . ' mk-isotop-item ' . $mk_column_css . '"><div class="blog-item-holder">';
    if ($post_type == 'image' || $post_type == '') {
        if (has_post_thumbnail()) {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-newspaper-lightbox" data-fancybox-group="blog-newspaper" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '<div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
            $output .= '</a></div>';
        }
    }
    if ($post_type == 'portfolio') {
        $featured_image_id = get_post_thumbnail_id();
        $attachment_ids = get_post_meta($post->ID, '_gallery_images', true);
        if (!empty($attachment_ids)) {
            if (!empty($featured_image_id)) {
                $final_attachment_ids = $featured_image_id . ',' . $attachment_ids;
            } else {
                $final_attachment_ids = $attachment_ids;
            }
            $output .= '<div class="blog-gallery-type">';
            $output .= do_shortcode('[mk_swipe_slideshow images="' . $final_attachment_ids . '" image_width="' . $image_width . '" image_height="' . $image_height . '"]');
            $output .= '</div>';
        } else {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-modern-lightbox" data-fancybox-group="blog-modern" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '<div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
            $output .= '</a></div>';
        }
    }
    if ($post_type == 'video') {
        $video_id = get_post_meta($post->ID, '_single_video_id', true);
        $video_site = get_post_meta($post->ID, '_single_video_site', true);
        $output .= '<div class="featured-image">';
        if ($video_site == 'vimeo') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://player.vimeo.com/video/' . $video_id . '?title=0&amp;byline=0&amp;portrait=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'youtube') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.youtube.com/embed/' . $video_id . '?showinfo=0&amp;theme=light&amp;color=white&amp;rel=0&amp;html5=1" frameborder="0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'dailymotion') {
            $output .= '<div style="width:' . $image_width . 'px;" class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/embed/video/' . $video_id . '?logo=0" frameborder="0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        $output .= '</div>';
    }
    if ($post_type == 'audio') {
        $iframe = get_post_meta($post->ID, '_audio_iframe', true);
        if (empty($iframe)) {
            $audio_id = mt_rand(99, 999);
            $mp3_file = get_post_meta($post->ID, '_mp3_file', true);
            $ogg_file = get_post_meta($post->ID, '_ogg_file', true);
            $audio_box_color = array('#00c8d7', '#e1ba05', '#da4c26', '#f56a5f', '#00b89a', '#95c76a', '#acacac', '#d19760');
            $random_colors = array_rand($audio_box_color, 1);
            $image_src = bfi_thumb($image_src_array[0], array('width' => 100, 'height' => 100));
            $output .= '<div class="mk-audio-section" style="background-color:' . $audio_box_color[$random_colors] . '">';
            if (has_post_thumbnail() && $column > 4) {
                $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, 100, 100) . '" />';
                $has_image = 'audio-has-img';
            }
            $output .= '<div data-mp3="' . $mp3_file . '" data-ogg="' . $ogg_file . '" id="jquery_jplayer_' . $audio_id . '" class="jp-jplayer mk-blog-audio"></div>
               <div id="jp_container_' . $audio_id . '" class="jp-audio ' . $has_image . '">
                    <div class="jp-type-single">
                         <div class="jp-gui jp-interface">
                              <div class="jp-time-holder">
                                   <div class="jp-current-time"></div>
                                   <div class="jp-duration"></div>
                              </div>

                              <div class="jp-progress">
                                   <div class="jp-seek-bar">
                                        <div class="jp-play-bar"></div>
                                   </div>
                              </div>
                              <div class="jp-volume-bar">
                                   <i class="mk-moon-volume-mute"></i><div class="inner-value-adjust"><div class="jp-volume-bar-value"></div></div>
                              </div>
                              <ul class="jp-controls">
                                   <li><a href="javascript:;" class="jp-play" tabindex="1"><i class="mk-icon-play"></i></a></li>
                                   <li><a href="javascript:;" class="jp-pause" tabindex="1"><i class="mk-icon-pause"></i></a></li>
                              </ul></div>
                         <div class="jp-no-solution">
                              <span>Update Required</span>
                              To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
                         </div>
                    </div>
          </div>';
            $output .= '<div class="clearboth"></div></div>';
        } else {
            $output .= '<div class="audio-iframe">' . $iframe . '</div>';
        }
    }
    $output .= '<div class="mk-blog-meta">';
    $output .= '<h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    $output .= '<time datetime="' . get_the_date() . '">';
    $output .= '<a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>';
    $output .= '</time>';
    if ($full_content == 'true') {
        $content = str_replace(']]>', ']]&gt;', apply_filters('the_content', get_the_content()));
        $output .= '<div class="the-excerpt"><p>' . $content . '</p></div>';
    } else {
        if ($excerpt_length != 0) {
            ob_start();
            the_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
        }
    }
    $output .= '</div>';
    if ($disable_comments_share != 'false') {
        $output .= '<div class="newspaper-item-footer"><div class="newspaper-item-footer-holder">';
        $output .= '<a class="mk-readmore" href="' . get_permalink() . '"><i class="mk-moon-arrow-right-2"></i>' . __('Read More', 'mk_framework') . '</a>';
        if (function_exists('mk_love_this')) {
            ob_start();
            mk_love_this();
            $output .= '<div class="mk-love-holder newspapre-footer-icons">' . ob_get_clean() . '</div>';
        }
        if ($mk_options['enable_blog_single_comments'] == 'true') {
            if (get_post_meta($post->ID, '_disable_comments', true) != 'false') {
                ob_start();
                comments_number(__('0', 'mk_framework'), __('1', 'mk_framework'), __('%', 'mk_framework'));
                $output .= '<span class="newspaper-item-comment newspapre-footer-icons"><i class="mk-moon-bubble-9"></i> ' . ob_get_clean() . '</span>';
            }
        }
        if ($mk_options['single_blog_social'] == 'true') {
            $output .= '<span class="newspaper-item-share newspapre-footer-icons"><i class="mk-moon-share-2"></i></span>';
        }
        $output .= '<div class="clearboth"></div></div>';
        if ($mk_options['enable_blog_single_comments'] == 'true') {
            if (get_post_meta($post->ID, '_disable_comments', true) != 'false') {
                $c_args = array('number' => '4', 'status' => 'approve', 'post_id' => $post->ID);
                $comments = get_comments($c_args);
                $output .= '<ul class="newspaper-comments-list">';
                foreach ($comments as $comment) {
                    $output .= '<li>';
                    $output .= get_avatar($comment->comment_author_email, 35);
                    if (!empty($comment->comment_author_url)) {
                        $output .= '<span class="comment-author"><a href="' . $comment->comment_author_url . '">' . $comment->comment_author . '</a></span>';
                    } else {
                        $output .= '<span class="comment-author">' . $comment->comment_author . '</span>';
                    }
                    $stripped_comment = strip_tags($comment->comment_content);
                    $output .= '<span class="comment-content">' . substr($stripped_comment, 0, 45) . '...</span>';
                    $output .= '<div class="clearboth"></div></li>';
                }
                $output .= '</ul>';
            }
        }
        if ($mk_options['single_blog_social'] == 'true') {
            $output .= '<ul class="newspaper-social-share">';
            $output .= '<li><a class="facebook-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-facebook"></i></a></li>';
            $output .= '<li><a class="twitter-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-moon-twitter"></i></a></li>';
            $output .= '<li><a class="googleplus-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-googleplus"></i></a></li>';
            $output .= '<li><a class="pinterest-share" data-image="' . $lightbox_full_size[0] . '" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-pinterest"></i></a></li>';
            $output .= '<li><a class="linkedin-share" data-desc="' . strip_tags(get_the_excerpt()) . '" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-linkedin"></i></a></li>';
            $output .= '</ul>';
        }
        $output .= '</div>';
    }
    $output .= '</div></article>' . "\n\n\n";
    return $output;
}
Esempio n. 27
0
						<article class="nota_col1" >
							<header><h2 class="tit_not tit_post"><a href="<?php 
        echo $link;
        ?>
"> <?php 
        echo $tit;
        ?>
 </a></h2></header>
							<p class="txt_not"> <span><?php 
        the_time('d/m/Y - h:i A');
        ?>
 | <?php 
        echo list_cat();
        ?>
 </a> | </span><?php 
        the_excerpt_max_charlength(500);
        ?>
</br> </br><?php 
        the_content('Read the rest of this entry &raquo;');
        ?>
</p>
						</article>
					<div id="Zona_J_aux_468x350">
						<?php 
        if ($val > 5) {
            include 'zon_ads/Zona_j_468x100.html';
        } else {
            include 'zon_ads/Zona_j_468x100.html';
        }
        ?>
					</div>
Esempio n. 28
0
						<?php 
    }
    ?>
						</div>
					</div>
					<div id="sil_der">
						<div id="txt_sil">
							<div id="tit_sil_cod">
								<div class="tit_sil"><a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
</a></div>
							</div>
							<div id="ext_sil_cod">
								<div class="ext_sil"><?php 
    the_excerpt_max_charlength(75);
    ?>
</div>
							</div>
						</div>
					</div>
					</article>
						<?php 
}
wp_reset_query();
?>
				</div>
Esempio n. 29
0
function fbrogmt()
{
    if (is_plugin_active('shopp/Shopp.php')) {
        if (shopp('catalog', 'is-product')) {
            $meta[] = __(trim(shopp('product', 'name', 'return=1'))) . ' - ' . shopp('product', 'price', 'return=1');
            $meta[] = shopp('product', 'link', 'return=1');
            $meta[] = get_option('blogname');
            //Site name
            //get summary, or use description if no summary is set.
            $description = trim(strip_tags(shopp('product', 'summary', 'return=1')));
            $long_description = trim(strip_tags(shopp('product', 'description', 'return=1')));
            if ('' == $description) {
                $description = $long_description;
            }
            //truncate description to 300
            if (strlen($description) > 300) {
                $description = substr($description, 0, 297) . '...';
            }
            $meta[] = $description;
            $meta[] = 'product';
            foreach (all_images_shopp() as $img_meta) {
                // The loop to dish out all the images meta tags explained lower
                echo $img_meta;
            }
        } else {
            if (is_single()) {
                // Post
                if (have_posts()) {
                    while (have_posts()) {
                        the_post();
                        $meta[] = get_the_title($post->post_title);
                        // Gets the title
                        $meta[] = get_permalink();
                        // gets the url of the post
                        $meta[] = get_option('blogname');
                        //Site name
                        $meta[] = the_excerpt_max_charlength(300) . '...';
                        //Description comes from the excerpt, because by using the_content, it will dish out the [caption id...]
                        $meta[] = 'article';
                        // $meta[]=get_the_image();//Gets the first image of a post/page if there is one  -- Remove this for now
                        foreach (all_images() as $img_meta) {
                            // The loop to dish out all the images meta tags explained lower
                            echo $img_meta;
                        }
                    }
                }
            } elseif (is_page()) {
                // Page
                if (have_posts()) {
                    while (have_posts()) {
                        the_post();
                        $meta[] = get_the_title($post->post_title);
                        // Gets the title
                        $meta[] = get_permalink();
                        // gets the url of the post
                        $meta[] = get_option('blogname');
                        //Site name
                        $meta[] = the_excerpt_max_charlength(300) . '...';
                        //Description comes from the excerpt, because by using the_content, it will dish out the [caption id...]
                        $meta[] = 'article';
                        // $meta[]=get_the_image();//Gets the first image of a post/page if there is one  -- Remove this for now
                        foreach (all_images() as $img_meta) {
                            // The loop to dish out all the images meta tags explained lower
                            echo $img_meta;
                        }
                    }
                }
            } elseif (is_category()) {
                global $post, $wp_query;
                $category_id = get_cat_ID(single_cat_title('', false));
                // Get the URL of this category
                $category_link = get_category_link($category_id);
                $term = $wp_query->get_queried_object();
                if (is_plugin_active('wordpress-seo/wp-seo.php')) {
                    //checks for yoast seo plugin for description of category
                    $metadesc = wpseo_get_term_meta($term, $term->taxonomy, 'desc');
                } else {
                    $metadesc = category_description($category_id);
                }
                $meta[] = wp_title('', false);
                //Title
                $meta[] = $category_link;
                //URL
                $meta[] = get_option('blogname');
                //Site name
                $meta[] = $metadesc;
                //Description
                $meta[] = 'website';
                foreach (all_images() as $img_meta) {
                    // The loop to dish out all the images meta tags explained lower
                    echo $img_meta;
                }
            } elseif (is_home() || is_front_page()) {
                $meta[] = get_option('blogname');
                //Title
                $meta[] = get_option('siteurl');
                //URL
                $meta[] = get_option('blogname');
                //Site name
                $meta[] = get_option('blogdescription');
                //Description
                $meta[] = 'website';
            } else {
                $meta[] = get_option('blogname');
                //Title
                $meta[] = get_option('siteurl');
                //URL
                $meta[] = get_option('blogname');
                //Site name
                $meta[] = get_option('blogdescription');
                //Description
                $meta[] = 'article';
            }
        }
    } else {
        if (is_single()) {
            // Post
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    $meta[] = get_the_title($post->post_title);
                    // Gets the title
                    $meta[] = get_permalink();
                    // gets the url of the post
                    $meta[] = get_option('blogname');
                    //Site name
                    $meta[] = the_excerpt_max_charlength(300) . '...';
                    //Description comes from the excerpt, because by using the_content, it will dish out the [caption id...]
                    $meta[] = 'article';
                    // $meta[]=get_the_image();//Gets the first image of a post/page if there is one  -- Remove this for now
                    foreach (all_images() as $img_meta) {
                        // The loop to dish out all the images meta tags explained lower
                        echo $img_meta;
                    }
                }
            }
        } elseif (is_page()) {
            // Page
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    $meta[] = get_the_title($post->post_title);
                    // Gets the title
                    $meta[] = get_permalink();
                    // gets the url of the post
                    $meta[] = get_option('blogname');
                    //Site name
                    $meta[] = the_excerpt_max_charlength(300) . '...';
                    //Description comes from the excerpt, because by using the_content, it will dish out the [caption id...]
                    $meta[] = 'article';
                    // $meta[]=get_the_image();//Gets the first image of a post/page if there is one  -- Remove this for now
                    foreach (all_images() as $img_meta) {
                        // The loop to dish out all the images meta tags explained lower
                        echo $img_meta;
                    }
                }
            }
        } elseif (is_category()) {
            global $post, $wp_query;
            $category_id = get_cat_ID(single_cat_title('', false));
            // Get the URL of this category
            $category_link = get_category_link($category_id);
            $term = $wp_query->get_queried_object();
            if (is_plugin_active('wordpress-seo/wp-seo.php')) {
                //checks for yoast seo plugin for description of category
                $metadesc = wpseo_get_term_meta($term, $term->taxonomy, 'desc');
            } else {
                $metadesc = category_description($category_id);
            }
            $meta[] = wp_title('', false);
            //Title
            $meta[] = $category_link;
            //URL
            $meta[] = get_option('blogname');
            //Site name
            $meta[] = $metadesc;
            //Description
            $meta[] = 'website';
            foreach (all_images() as $img_meta) {
                // The loop to dish out all the images meta tags explained lower
                echo $img_meta;
            }
        } elseif (is_home() || is_front_page()) {
            $meta[] = get_option('blogname');
            //Title
            $meta[] = get_option('siteurl');
            //URL
            $meta[] = get_option('blogname');
            //Site name
            $meta[] = get_option('blogdescription');
            //Description
            $meta[] = 'website';
        } else {
            $meta[] = get_option('blogname');
            //Title
            $meta[] = get_option('siteurl');
            //URL
            $meta[] = get_option('blogname');
            //Site name
            $meta[] = get_option('blogdescription');
            //Description
            $meta[] = 'article';
        }
    }
    echo tags($meta);
}
Esempio n. 30
0
     		</div><!--//Thumb-->
     		<div class="flexslider-caption">
				<h3>
					<a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        printf(esc_attr__('Permalink to %s', 'bd'), the_title_attribute('echo=0'));
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a>
				</h3>
				<p><?php 
        the_excerpt_max_charlength('200');
        ?>
</p>
     		</div><!--//flex caption-->
		</li><!--//End -->
        <?php 
    }
    ?>
      	<?php 
} else {
    ?>
      	<!--//else -->
      	<?php 
}
?>
      	<?php