Exemplo n.º 1
0
/**
 * Get the image URL for usage in a feed given a post
 * @deprecated
 */
function ikit_one_get_post_feed_image_url($post)
{
    if ($post->post_type == 'post') {
        $feed_image_url = ikit_post_get_image_url($post->ID, IKIT_IMAGE_SIZE_MEDIUM, ikit_one_get_post_image_default());
    } else {
        if ($post->post_type == IKIT_POST_TYPE_IKIT_EVENT) {
            $ikit_event_meta = ikit_event_get_meta($post->ID);
            $feed_image_url = ikit_event_get_image_url($post->ID, $ikit_event_meta, ikit_one_get_event_image_default());
        }
    }
}
Exemplo n.º 2
0
<?php

global $id;
$news_image = ikit_post_get_image_url($id, 'full', ikit_one_get_post_image_default());
$news_url = get_permalink($id);
$news_url_target = '_self';
$external = false;
if ($post->post_type == IKIT_POST_TYPE_IKIT_POST_EXTERNAL) {
    $external = true;
    $news_url = get_post_meta($id, IKIT_CUSTOM_FIELD_IKIT_POST_EXTERNAL_LINK_URL, true);
    $news_url_target = '_blank';
}
?>
    <div class="box-section post-<?php 
echo $post->post_name;
?>
">
        <div class="box-section-image"><a target="<?php 
echo $news_url_target;
?>
" href="<?php 
echo $news_url;
?>
"><img src="<?php 
if ($news_image) {
    echo $news_image;
}
?>
"></img></a></div>

        <?php 
Exemplo n.º 3
0
    ?>

    <div class="box-container index-featured-news">
    <div class="box">

    <?php 
    $ikit_section_news = ikit_get_post_by_slug(IKIT_SLUG_IKIT_SECTION_NEWS, IKIT_POST_TYPE_IKIT_SECTION);
    ikit_one_render_banner_header($ikit_section_news);
    while (have_posts()) {
        the_post();
        global $id;
        $news_image = null;
        if ($post_count == 0) {
            $news_image = ikit_post_get_image_url($id, 'full', ikit_one_get_post_image_default());
        } else {
            $news_image = ikit_post_get_image_url($id, IKIT_IMAGE_SIZE_MEDIUM_Z, ikit_one_get_post_image_default());
        }
        $news_url_target = '_self';
        $news_url = get_permalink($id);
        $external = false;
        if ($post->post_type == IKIT_POST_TYPE_IKIT_POST_EXTERNAL) {
            $external = true;
            $news_url = get_post_meta($id, IKIT_CUSTOM_FIELD_IKIT_POST_EXTERNAL_LINK_URL, true);
            $news_url_target = '_blank';
        }
        ?>
        <div class="box-section post-<?php 
        echo $post->post_name;
        ?>
 index-featured-news-item index-featured-news-item-<?php 
        if ($post_count == 0) {
Exemplo n.º 4
0
<?php 
$page_title = null;
global $page, $paged;
$page_title = ikit_get_blog_title();
$page_title .= wp_title('|', false);
// Add the blog description for the home/front page.
$site_description = get_bloginfo('description', 'display');
if ($site_description && (is_home() || is_front_page())) {
    $page_title .= " | {$site_description}";
}
// If post or event, add open graph tags for sharing
if (is_singular(array('post', IKIT_POST_TYPE_IKIT_EVENT))) {
    $feed_image_url = null;
    if ($post->post_type == 'post') {
        $feed_image_url = ikit_post_get_image_url($post->ID, IKIT_IMAGE_SIZE_MEDIUM, ikit_one_get_post_image_default());
    } else {
        if ($post->post_type == IKIT_POST_TYPE_IKIT_EVENT) {
            $ikit_event_meta = ikit_event_get_meta($post->ID);
            $feed_image_url = ikit_event_get_image_url($post->ID, $ikit_event_meta, ikit_one_get_event_image_default());
        }
    }
    $page_description = htmlspecialchars(strip_tags($post->post_content));
    if (strlen($page_description) > IKIT_ONE_PAGE_DESCRIPTION_MAX_LENGTH) {
        // Truncate description
        $page_description = substr($page_description, 0, IKIT_ONE_PAGE_DESCRIPTION_MAX_LENGTH - 3) . '...';
    }
    ?>

    <title><?php 
    echo $page_title;