+44 0330 223 3428
Call Us
+44 0330 223 3428

WPTavern: New Core Gallery Widget Targeted for WordPress 4.9

WPTavern: New Core Gallery Widget Targeted for WordPress 4.9

The Core Media Widgets feature plugin introduced a gallery widget in the 0.2.0 release this week. WordPress 4.8 added the new audio, image, and video widgets from this feature plugin. The gallery widget is targeted for merge into the upcoming WordPress 4.9 release.

In testing the new feature I found it to be a simple, straightforward implementation of a gallery widget that could easily replace many plugins that are currently filling this need for users. The option to edit or replace a gallery is immediately available and users can easily rearrange or randomize the images included.

On the frontend the gallery displays neatly in a thumbnail grid. I was able to change the number of columns while editing the gallery, but the preview in the admin did not match the the way the gallery looks on the frontend. The number of columns is correct on the frontend but not in the admin preview. This might cause some confusion for users if it isn’t fixed before landing in core. Contributors to the plugin are looking at this issue.

Overall, the implementation is user-friendly and similar to adding galleries in posts and pages. However, the widget could still use some testing, especially with different plugins installed. For example, with Jetpack enabled, users can choose between a thumbnail and a slideshow gallery, but the slideshow option doesn’t seem to work correctly in the widget. WordPress.org has several hundred plugins that implement some sort of gallery widget and these plugin authors will want to test the new core widget.

Theme authors will also need to test how the core gallery widget interacts with their themes. After testing the gallery widget with several popular WordPress.org themes, I found that many display the thumbnails with unsightly outlines and unpredictable spacing between images.

Weston Ruter, who authored the dev note post when the previous media widgets were introduced in 4.8, said that the paragraph regarding default theme updates is still applicable:

Themes that add custom styles to the MediaElement.js player (namely Twenty Thirteen and Twenty Fourteen) were updated from just styling it within syndicated content, to also include instances within widgets. Most themes don’t restrict styles for captioned images or media players to just post content, that is, limit CSS selectors to classes output by post_class(). If your theme does, make sure to either remove that constraint or include a .widget selector.

Ruter said another dev note will be coming with common theme changes that are required to add the right styling for galleries. Users and theme/plugin developers can test the gallery widget right now on 4.8.2 or 4.9-alpha using the Core Media Widgets plugin. Once the widget is added to WordPress, it will be deactivated in the feature plugin for future releases. Contributors plan to merge the new widget into core next week, provided testing goes well.



Source: WordPress

Related Post
Post Status: Why the makers of Ninja Forms are getting into eCommerce

Post Status: Why the makers of Ninja Forms are getting into eCommerce Welcome to the Post Status Draft podcast, which you can find on iTunes, Google Play, Stitcher, and via RSS for your favorite podcatcher. Post Status Draft is hosted by Brian Krogsgard and co-host Brian Richards. In this episode, I bring on James Laws […]

Read more
WPTavern: WordPress 4.9.8 Will Significantly Reduce Memory Leak

WPTavern: WordPress 4.9.8 Will Significantly Reduce Memory Leak WordPress 4.9.8 Beta two recently shipped and although much of the focus will be on the “Try Gutenberg” call-out, there’s a patch included that addresses a memory leak that was quite a problem for some users. When WordPress 4.9.7 shipped, the WordPress.org support forums saw an increase in […]

Read more
Donncha: WP Super Cache and Cookie Banners

Donncha: WP Super Cache and Cookie Banners More sites use cookie banners now that the GDPR is active but some are finding that their banners are misbehaving once they enable caching. This is a similar issue to the one that happened to some page counter plugins in the past. The page counter wouldn’t increment. When […]

Read more