Widget title WPML compatibility
-
I’m using version 4.8:
Please, make widget title translatable through WPML.
The title must be filtered by ‘widget_title’ filter.
In the ‘recent-posts-widget-with-thumbnails.php’ file, line 109, you have this code:$title = ( ! empty( $instance[ 'title' ] ) ) ? $instance[ 'title' ] : '';
it must be changed for this code (obtained from wpml.org: https://wpml.org/documentation/getting-started-guide/translating-widgets/)
$title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
This do the trick, and now the title is translatable by WPML.
This is very important for multilingual web sites!
THX!https://www.ads-software.com/plugins/recent-posts-widget-with-thumbnails/
- The topic ‘Widget title WPML compatibility’ is closed to new replies.