+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
WPTavern: WordPress 5.2 Will Add 13 New Icons to the Dashicon Library

WPTavern: WordPress 5.2 Will Add 13 New Icons to the Dashicon Library Dashicons, the WordPress admin icon font, will be getting its first update in three years when WordPress 5.2 ships. The library will be updated to use WOFF2 (Web Open Font Format 2), replacing the previous WOFF 1.0 format for improved compression. WOFF 1.0 […]

Read more
WPTavern: WooCommerce 3.6 Released with New Product Blocks and Major Performance Improvements

WPTavern: WooCommerce 3.6 Released with New Product Blocks and Major Performance Improvements WooCommerce 3.6 was released this week after six months in development. Store owners with sites running on WordPress 5.0+ will now have access to eight new product blocks, including hand picked products, featured products, products by category/attribute, sale products, new products, top rated, […]

Read more
WPTavern: Gutenberg 5.5 Adds New Group Block for Nesting Child Blocks

WPTavern: Gutenberg 5.5 Adds New Group Block for Nesting Child Blocks Gutenberg 5.5 was released with the long-awaited Group block, previously known as the Section block. It was renamed to avoid confusion with the HTML5 section element and prevent potential overlap with future site/theme type sections, such as headers, sidebars, and footers. The first iteration […]

Read more