-
AuthorPosts
-
February 11, 2019 at 3:18 pm #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';
February 11, 2019 at 6:36 pm #1065591Well 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?February 13, 2019 at 6:20 pm #1066574Hi,
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.
February 13, 2019 at 7:36 pm #1066609Very 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 884February 14, 2019 at 10:25 am #1066873Hi,
Sorry, not in the next update 4.5.4 (was too late).
Will check for portfolio box also – thx.
Best regards,
GünterFebruary 14, 2019 at 12:36 pm #1066930February 14, 2019 at 3:49 pm #1067011Danke
February 14, 2019 at 4:21 pm #1067024und falls du noch Zeit hast fürs nächste update:
February 14, 2019 at 5:24 pm #1067068Hi,
“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ünterFebruary 14, 2019 at 10:51 pm #1067205Ok Danke für die Info
-
AuthorPosts
- The topic ‘Image Size in widget (news-box)’ is closed to new replies.