Example #1
0
function ipin_feed_content($content)
{
    global $post;
    $imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'medium');
    if ($imgsrc[0] != '') {
        $content_before = '<p><a href="' . get_permalink($post->ID) . '"><img src="' . $imgsrc[0] . '" alt="" /></a></p>';
    }
    if (ipin_get_post_board()) {
        global $wp_taxonomies;
        $board_link = home_url('/' . $wp_taxonomies["board"]->rewrite['slug'] . '/' . sanitize_title(ipin_get_post_board()->name, '_') . '/' . ipin_get_post_board()->term_id . '/');
        $content_before .= '<p>' . __('Pinned onto', 'ipin') . ' <a href="' . $board_link . '">' . ipin_get_post_board()->name . '</a></p>';
    }
    return $content_before . $content;
}
Example #2
0
</a>
									<?php 
        }
        ?>
									<h4><?php 
        _e('Pinned onto', 'ipin');
        ?>
 <?php 
        the_terms($post->ID, 'board', '<span>', ', ', '</span>');
        ?>
</h4>
									<?php 
        $board_id = ipin_get_post_board()->term_id;
        $board_name = ipin_get_post_board()->name;
        $board_count = ipin_get_post_board()->count;
        $board_slug = ipin_get_post_board()->slug;
        $board_link = home_url('/' . $wp_taxonomies["board"]->rewrite['slug'] . '/' . sanitize_title($board_name, '_') . '/' . $board_id . '/');
        $board_thumbnail_ids = $wpdb->get_col($wpdb->prepare("\n\t\t\t\t\t\t\t\t\t\tSELECT v.meta_value\n\t\t\t\t\t\t\t\t\t\tFROM {$wpdb->postmeta} AS v\n\t\t\t\t\t\t\t\t\t\tINNER JOIN (\n\t\t\t\t\t\t\t\t\t\t\tSELECT object_id\n\t\t\t\t\t\t\t\t\t\t\tFROM {$wpdb->term_taxonomy}, {$wpdb->term_relationships}, {$wpdb->posts}\n\t\t\t\t\t\t\t\t\t\t\tWHERE {$wpdb->term_taxonomy}.term_id = %d\n\t\t\t\t\t\t\t\t\t\t\tAND {$wpdb->term_taxonomy}.term_taxonomy_id = {$wpdb->term_relationships}.term_taxonomy_id\n\t\t\t\t\t\t\t\t\t\t\tAND {$wpdb->term_taxonomy}.taxonomy = 'board'\n\t\t\t\t\t\t\t\t\t\t\tAND {$wpdb->term_relationships}.object_id = {$wpdb->posts}.ID\n\t\t\t\t\t\t\t\t\t\t\tAND {$wpdb->posts}.post_status = 'publish'\n\t\t\t\t\t\t\t\t\t\t\tORDER BY {$wpdb->term_relationships}.object_id DESC\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 0, 13\n\t\t\t\t\t\t\t\t\t\t\t) AS v2 ON v.post_id = v2.object_id\n\t\t\t\t\t\t\t\t\t\t\tAND v.meta_key = '_thumbnail_id'\n\t\t\t\t\t\t\t\t\t\t", $board_id));
        ?>
										<a class="pull-left" href="<?php 
        echo $board_link;
        ?>
">
										<?php 
        $post_array = array();
        foreach ($board_thumbnail_ids as $board_thumbnail_id) {
            $board_imgsrc = wp_get_attachment_image_src($board_thumbnail_id, 'thumbnail');
            $board_imgsrc = $board_imgsrc[0];
            array_unshift($post_array, $board_imgsrc);
        }
        $post_array_final = array_fill(0, 13, '');
Example #3
0
bloginfo('name');
$site_description = get_bloginfo('description', 'display');
if ($site_description && (is_home() || is_front_page())) {
    echo ' | ' . $site_description;
}
?>
</title>
	<?php 
global $user_ID, $user_identity, $post;
if (is_single() && $post->post_content == '' && !function_exists('wpseo_init')) {
    $meta_categories = get_the_category($post->ID);
    foreach ($meta_categories as $meta_category) {
        $meta_category_name = $meta_category->name;
    }
    if (ipin_get_post_board()) {
        $meta_board_name = ipin_get_post_board()->name;
    } else {
        $meta_board_name = __('Untitled', ipin);
    }
    ?>
		<meta name="<?php 
    echo 'descript' . 'ion';
    //bypass yoast seo check
    ?>
" content="<?php 
    _e('Pinned onto', 'ipin');
    ?>
 <?php 
    echo esc_attr($meta_board_name);
    ?>
 <?php 
Example #4
0
			<div class="masonry-meta-author"><a href="<?php 
echo home_url('/' . $wp_rewrite->author_base . '/') . get_the_author_meta('user_nicename');
?>
/"><?php 
echo get_the_author_meta('display_name');
?>
</a></div>
			<?php 
if (ipin_get_post_board()) {
    ?>
 
				<div class="masonry-meta-content"><a href="<?php 
    echo home_url('/' . $wp_taxonomies["board"]->rewrite['slug'] . '/' . sanitize_title(ipin_get_post_board()->name, '_') . '/' . ipin_get_post_board()->term_id . '/');
    ?>
"><?php 
    echo ipin_get_post_board()->name;
    ?>
</a></div>
			<?php 
}
?>
		</div>
	</div>
		
	<?php 
if ('0' != ($frontpage_comments_number = of_get_option('frontpage_comments_number'))) {
    ?>
 
	<div id="masonry-meta-comment-wrapper-<?php 
    echo $post->ID;
    ?>
Example #5
0
            echo ' hide';
        }
        ?>
">
							<span class="input-group-addon"><i class="fa fa-link"></i></span>
							<input class="form-control" type="text" name="source" id="source" value="<?php 
        echo get_post_meta($pin_info->ID, '_Photo Source', true);
        ?>
" placeholder="<?php 
        _e('Source e.g. http://domain.com/link', 'ipin');
        ?>
" />
						</div>

						<?php 
        echo ipin_dropdown_boards($pin_info->post_author, ipin_get_post_board($pin_info->ID)->term_id);
        ?>
						<input class="form-control board-add-new" type="text" id="board-add-new" placeholder="<?php 
        _e('Enter new board title', 'ipin');
        ?>
" />
						<?php 
        echo ipin_dropdown_categories(__('Category for New Board', 'ipin'), 'board-add-new-category');
        ?>
						<a id="pin-postdata-add-new-board" class="btn btn-default btn-sm pull-right"><?php 
        _e('Add new board...', 'ipin');
        ?>
</a>
						<input class="form-control" type="hidden" name="pid" id="pid" value="<?php 
        echo $pin_id;
        ?>