Support » Plugin: Network Latest Posts » [Plugin: Network Latest Posts] class for thumbnail

  • Resolved sergeyzimin

    (@sergeyzimin)


    if we gonna use an attribute ‘size’ then we need implement another attribute ‘image_class’.

    ____________________________________________________
    function network_latest_posts($how_many=10, $how_long=0, $titleOnly=true, $begin_wrap=”\n

  • “, $end_wrap=”
  • “, $blog_id=’null’, $thumbnail=false, $cpt=”post”, $ignore_blog=’null’, $cat=’null’, $tag=’null’, $paginate=false, $excerpt_length=’null’, $display_root=false, $auto_excerpt=false, $full_meta=false, $size = ‘thumbnail’ , $image_class=’post-thumbnail’ ) {
    _______________________________________________________________
    $attrs = array(‘class’=> $image_class);
    $thumbcode = str_replace( $current_blog->domain . $current_blog->path, $blogdetails->domain . $blogdetails->path, get_the_post_thumbnail( $post_id, $size, $attrs ) );
    ________________________________________________________________
    function network_latest_posts_shortcode($atts){
    // Constructor
    extract(shortcode_atts(array(
    ‘title’ => null,
    ‘number’ => ’10’,
    ‘days’ => ‘0’,
    ‘titleonly’ => true,
    ‘wrapo’ => null,
    ‘wrapc’ => null,
    ‘blogid’ => ‘null’,
    ‘thumbnail’ => false,
    ‘cpt’ => ‘post’,
    ‘ignore_blog’ => ‘null’,
    ‘cat’ => ‘null’,
    ‘tag’ => ‘null’,
    ‘paginate’ => false,
    ‘excerpt_length’ => ‘null’,
    ‘display_root’ => false,
    ‘auto_excerpt’ => false,
    ‘full_meta’ => false,
    ‘size’ => ‘thumbnail’,
    ‘image_class’ => ‘post-thumbnail’
    ), $atts));
    _____________________________________________________________________
    function the_post_thumbnail_by_blog($blog_id=NULL,$post_id=NULL,$size=’thumbnail’,$image_class,$attrs=NULL) {
    return get_the_post_thumbnail_by_blog($blog_id,$post_id,$size,$image_class,$attrs);
    }
    __________________________________________________________________
    function get_the_post_thumbnail_by_blog($blog_id=NULL,$post_id=NULL,$size=’thumbnail’,$image_class,$attrs=NULL) {
    _________________________________________________________
    echo ‘</span>‘.the_post_thumbnail_by_blog($blognlp,$thispost[$i]->ID,$size, $image_class).’<p class=”network-posts-excerpt”>’;
    _______________________________________________________________

    and now we can set our own class for thumbnail image. Try image_class=’ alignleft’

    http://wordpress.org/extend/plugins/network-latest-posts/

Viewing 1 replies (of 1 total)
  • Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Hello Sergey,

    Thanks for your feedback, this is a good idea. I’m entirely rewriting this plugin to make it easier to maintain, improve the features and remove some buggy behaviors included in the initial releases.

    The new version will be better in many ways, this will be included for sure. I will be releasing the version 3 soon.

    Cheers.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Network Latest Posts] class for thumbnail’ is closed to new replies.