• I can use predefined size (e.g. thumb100) in widget.
    However, I can not be specify it in shortcode.

    I tried writing a small patch. I think this is inadequate, but I hope it will be helpful.

    thanks.

    
    # diff -u public/class-wordpress-popular-posts-public.php.old public/class-wordpress-popular-posts-public.php 
    --- public/class-wordpress-popular-posts-public.php.old	2017-10-29 08:07:38.400567528 +0900
    +++ public/class-wordpress-popular-posts-public.php	2017-11-04 06:46:50.383114490 +0900
    @@ -293,6 +293,7 @@
                 'excerpt_by_words' => 0,
                 'thumbnail_width' => 0,
                 'thumbnail_height' => 0,
    +            'thumbnail_build' => 'predefined',
                 'rating' => false,
                 'stats_comments' => false,
                 'stats_views' => true,
    @@ -344,6 +345,7 @@
                     'active' => ( !empty( $thumbnail_width ) && WPP_Helper::is_number( $thumbnail_width ) && $thumbnail_width > 0 ),
                     'width' => ( !empty( $thumbnail_width ) && WPP_Helper::is_number( $thumbnail_width ) && $thumbnail_width > 0 ) ? $thumbnail_width : 0,
                     'height' => ( !empty( $thumbnail_height ) && WPP_Helper::is_number( $thumbnail_height ) && $thumbnail_height > 0 ) ? $thumbnail_height : 0,
    +				'build' => empty( $thumbnail_build) ? 'predefined' : $thumbnail_build,
                 ),
                 'rating' => empty( $rating ) ? false : $rating,
                 'stats_tag' => array(
    
Viewing 1 replies (of 1 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hey there!

    I think there was a good reason why this feature was limited to the widget only. Can’t remember what it was though, it’s been a while.

    I’ll take a closer look and if there’s nothing wrong I’ll consider implementing your patch in a feature release 🙂 (probably 4.1.x, right now we’re at 4.0.11)

Viewing 1 replies (of 1 total)

The topic ‘widget can use predefined thumbnail, but shortcode can’t’ is closed to new replies.