Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1065449

    i want to show a bigger image on the widget area news-box.
    To enlarge it that was easy.
    is there a way to tell Enfold not to take the size definition “widget” as source for widget images but f.e. “square”.
    – yes i can overwrite the widget size definition e.g. by:

    add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
    function enfold_customization_modify_thumb_size( $size ) {
        $size['widget'] = array('width'=>180, 'height'=>180 );      
        return $size;   
    }

    but then i had to recalculate all thumbs.
    i thought the better way would be to replace the source for the images with “square” on that specific Widget only (in my case newsbox-2 widget.

    maybe this here in class-framework-widget.php on line 837:
    $image_size = isset($avia_config['widget_image_size']) ? $avia_config['widget_image_size'] : 'widget';

    is there a child-theme possiblity to set it to:
    $image_size = isset($avia_config['widget_image_size']) ? $avia_config['widget_image_size'] : 'square';

    #1065591

    Well i knew that i can have the whole function: if (!class_exists('avia_newsbox')) …
    in my child theme – but is there a shorter form to do this in child theme?

    #1066574

    Hi,

    I added a filter in core: avf_newsbox_image_size

    Meanwhile replace enfold\framework\php\class-framework-widgets.php with https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_5_3/class-framework-widgets.php

    How to use the filter check https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/Widgets/avf_newsbox_image_size.php

    Hope this helps.

    The filter is added in line 804.

    Best regards,
    Günter

    • This reply was modified 5 years, 9 months ago by Günter.
    #1066609

    Very Cool – thanks alot!!!
    – and on Enfold update the filter will be integrated then on class-framework-widgets.php ?

    For Portfolio it is active then too – because portfolio-box is an extension of news-box ?
    btw. it is line 884

    #1066873

    Hi,

    Sorry, not in the next update 4.5.4 (was too late).

    Will check for portfolio box also – thx.

    Best regards,
    Günter

    #1066930

    Hi,

    The filter is the same for portfolio-box.

    Best regards,
    Günter

    #1067011

    Danke

    #1067024

    und falls du noch Zeit hast fürs nächste update:

    #1067068

    Hi,

    “include” habe ich verschoben.

    “merging” hab ich bereits seit 6.Sept. in den Pull Requests – Kriesi bis jetzt noch nicht gemerged.

    “TinyMCE” Button hab ich eingebaut in core – ist auch in den Pull Requests.

    Best regards,
    Günter

    #1067205

    Ok Danke für die Info

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Image Size in widget (news-box)’ is closed to new replies.