Last Week(s) in WordPress Core

Hi Everyone! It’s time for another update. This edition covers through Sunday, June 15th, and has taken a while due to travel, but @swissspidy & @designsimply have joined the team, helping to gather the information to bring us up to date. Hopefully this will help these updates be a bit more sustainable over time. If you’re interested in pitching in with these updates as well, please let me know in the comments below!

Especially of note are the first pass of the grid view for the media library, several SSL and oEmbed updates, and a new ‘Beta Testing’ tab on the Plugins screen.

Admin

  • Plugins Screen: Add a new ‘Beta Testing’ tab on the plugin installation screen, for features as plugins such as Press This. [28749] #28513
  • Media Library: Grid view for the media library, first pass. This is alpha; expect imperfection to start. [28682] #24716

SSL

  • Forcing SSL logins now forces SSL for the entire admin. [28609] #10267
  • Force SSL on the frontend when the home URL uses HTTPS. [28610] #27954
  • Force SSL admin when siteurl is explicitly configured with HTTPS. [28674] #27954
  • Use a secure logged_in_cookie when the home URL is forced HTTPS. [28627] #15330
  • Deprecate url_is_accessable_via_ssl(). [28709] #19555

Embeds

Themes and Templates

  • Add a filter to human_time_diff() to allow more detailed depictions of time differences. [28670] #27271
  • Allow simple modification of sections of the title by adding a wp_title_parts filter to wp_title(). [28669] #17877
  • Add CSS rules to ensure that videos will be responsive, regardless of theme. [28650] #28414
  • Replace TEMPLATEPATH and STYLESHEETPATH with get_template_directory() and get_stylesheet_directory(). These constants are now deprecated [28563] #18298
  • Update Twenty Thirteen and Twenty Fourteen to Genericons 3.0.3. [28692] [28693]

Accessibility

  • Improve keyboard accessibility for the media modal. [28607] #23560
  • Add screen reader labels to the date inputs on the post editing screen. [28730] #25461

WP_Query

  • When parsing the main query, if s is set to empty: ?s= and $this->is_main_query() && array_key_exists( 's', $this->query ) – kill the query instead of loading the homepage. This will load the search page with no results. [28612] #11330
  • Kill queries that explicitly pass empty arrays to category__in, tag__in, tag_slug__in, and author__in to WP_Query. [28664] #28099
  • Fix SQL generation when meta_query has an 'relation' => 'OR' for its queries and wants to 'orderby' => 'meta_value'. [28659] #25538
  • Allow users to sort posts by type in WP_Query. [28605] #28214
  • Add access modifiers to WP_User_Query Add magic methods for BC: get(), set(), isset(), unset(), and call(). [28528] #27881, #22234

Internals

  • Wide-reaching changes to do away with many instances of variable-variables. See #27881 for full list of changes.
  • Eliminate use of extract() within WordPress. #22400
  • Fix curly quotes around numbers when applicable. [28721] #8775
  • Only include relevant post authors in WXR exports. [28731] #20206
  • Append the date to $wp_version in the build output, for nightly packages. [28611] #26751.
  • Update wp_insert_comment() and wp_new_comment() with a check for successful database insert. [28672] #28254
  • Use get_pages() instead of a raw SQL query in get_body_class(). [28696] #28159
  • Pre-populate the selected URL or mailto:<email-address> when “Insert/edit link” is clicked. [28705] #19992
  • Live update the menu item title when the user is editing the “Navigation Label” field. [28707] #23076
  • Deprecate get_all_category_ids(). Suggest get_terms() as a replacement. [28679] #21200
  • Deprecate like_escape() and replace with $wpdb->esc_like(). [28711] #10041
  • Redirect edit.php?post_type=attachment to upload.php to avoid an empty list table. [28729] #27951

Formatting

TinyMCE:

  • Update TinyMCE to 4.0.28. [28606] #28391, #27941
  • In iOS, fix placing the caret at the bottom of longer posts when the keyboard is open and disable resizing on switching editors and on show/hide of the kitchen sink row. [28626] #28242
  • Fix problems with undo/redo after resizing an image several times. [28614] #28389
  • Fix saving the editor content on switching from Visual to Text. [28576] #28353

Thanks to @aaroncampbell, @adamsilverstein, @alexander.rohmann, @aliso, @atimmer, @avryl, @azaozz, @boonebgorges, @bramd, @celloexpressions, @clifgriffin, @coffee2code, @danielhuesken, @DavidTheMachine, @DeBAAT, @donncha, @DrewAPicture, @eddiemoya, @edwin-at-studiojoyo.com, @ericlewis, @filosofo, @frank-klein, @Funkatronic, @garhdez, @gauravmittal1995, @gcorne, @georgestephanis, @ghost1227, @grahamarmfield, @harrym, @helen, @iamtakashi, @iljoja, @issuu, @ixkaito, @jackreichert, @JanHenkG, @Jayjdk, @jdgrimes, @jeffstieler, @jeremyfelt, @jesin, @jgadbois, @jjeaton, @jkudish, @joedolson, @johnbillion, @johnjamesjacoby, @johnzanussi, @jtsternberg, @kitchin, @knutsp, @kovshenin, @kpdesign, @kraftbj, @kurtpayne, @kwight, @lancewillett, @lessbloat, @markoheijnen, @mdbitz, @MikeHansenMe, @mikemanger, @miqrogroove, @mrmist, @MuViMoTV, @nabil_kadimi, @nacin, @nd987, @Nessworthy, @netweb, @niallkennedy, @ocean90, @obenland, @pdclark, @pento, @purzlbaum, @rclations, @redsweater, @ruudjoyo, @schoenwaldnils, @scribu, @senlin, @SergeyBiryukov, @sharonaustin, @shaunandrews, @simonwheatley, @sixhours, @slimndap, @solarissmoke, @tar.gz, @tillkruess, @topher1kenobe, @torresga, @UmeshSingla, @winterDev, @wonderboymusic, @wpsmith, @zamfeer, and @duck_ for their core contributions!

Thanks to @swissspidy & @designsimply for their help with compiling this post.
Revisions covered: [28528] to [28757]. For the complete list of commits to trunk, check out the log on Trac.

Interested in joining in? Write or test a patch for 4.0.

#4-0, #week-in-core

Summary of last week’s dev chat on 4…

Summary of last week’s dev chat on 4/30 (IRC log):

Announcements

Features as plugins

  • Met on 4/29 (IRC log)
  • Current potential considerations seem to be WP API and media grid.
  • Press This is getting some attention from an early stages working group, which could also be a part of the 4.0 release.
  • Admin Help is poised to shift into more of a continuous testing and advisory group, which is awesome.
  • Front-end editor is making good progress, but has UX issues that are getting worked on, needs iteration and experimentation and probably won’t be ready by 4.0, but should continuously be worked on, as is the goal of features as plugins in the first place. Developers needed.

Potential ideas and their suggesters:

Summary: we have good things in mind about more media improvements, more editing experience improvements, more visual media grid and better plugin installer experience (following in the footsteps of themes), and behind the scenes wins in taxonomy, multisite, and post type and comment APIs.

If you’re interested in any of the above or have other ideas, please sound off in the comments.

Getting involved

  • We are always looking for more people to be involved with Trac gardening, patch review, patch writing, or some combination thereof.
  • Component pages are running well, and most could still use the caretaking of a component owner or somebody who’d like to become well-versed in a particular area of core. To get started, just sign up for component notifications at https://make.wordpress.org/core/notifications/. No need to be an expert now – learning and persistence is more important.To help with a specific plugin, join their weekly chats and/or follow along wherever they post. See the Features as Plugins page for more information.
  • A reminder from @matt to always be dogfooding the product – use WordPress every day.

Bonus punnage, to the lead’s chagrin:

wonderboymusic will make a t-shirt for anyone who gets all 16 of those Cache tickets closed 🙂
> sams: “Cache Master”?
> wonderboymusic: Johnny Cache
> jorbin: If you fix the Cache, you’ll get the Credit. That Checks out.
> MarkJaquith: I’d put in a cache pun, but I don’t want to be sent to purgetory.
> johnbillion: You would have to be a cache machine to fix all 16

#4-0, #dev-chat

Feature Plugin Chat tomorrow

As mentioned at the dev chat last week, we’re having a feature plugin chat tomorrow, April 29, 2014 20:00 UTC in #wordpress-dev. That’s the same time, same place as the dev chat on a different day. (The dev chat will take place on Wednesday, like normal.)

Just like we did before, post your feature ideas here in one comment with the following information:

  • A brief (one paragraph) overview of your feature plugin proposal.
  • Current plugin status (idea stage, planning stage, under development, existing feature plugin, prior work, etc).
  • A list of those involved or already interested in your feature plugin (including you!)
  • What you’d like help with (scoping, planning, wireframing, development, design, etc).

Again, this post and the accompanying chat is for posting ideas that you’d be interested in working on. It is not for posting every feature idea you have for WordPress.

Current feature plugin leads: Please post an update for your plugin here, along with the information above.

We’ll go through current feature plugins at a brisk pace, then talk about the new ones that are forming.

See you tomorrow!

#chats, #core-plugins, #feature-plugins

Last Week in WordPress Core

Hi there! Welcome to Last Week in WordPress Core for the week of March 3–9. By now, you’ve heard that WordPress 3.9 Beta 1 is available! Thank you for your hard work this last week. Now we’re done adding new enhancements, and on to bugs. Your help is appreciated as we continue to test and squash bugs on the way to a stable RC.

There are a couple important things that landed on Monday that are not covered in this post, but shipped in beta. Namely, please test the Theme Install screen refresh and the ability to crop headers from within the Customizer.

Admin:

  • Widgets: Add widget management to the customizer. This brings in the Widget Customizer plugin. [27419] #27112
  • Admin Menu: Introduce a .dashicons-before CSS class and use it in the admin menu. Lets you use a Dashicon before an element without copying the entire .dashicons styling to your :before styling. [27418] [27425] [27444] [27482] #26630
  • Editor: Show “View Post” for any post the author can read. This expands it to private posts and matches the logic in the toolbar. [27483] #27059

Media:

  • First pass at bringing the Image Editor into the media modal. Please test me! [27445] #21811
  • First pass adding a loading indicator to the Media Library. [27438] #24859
  • Allow $crop in add_image_size() and set_post_thumbnail_size() to receive crop anchors (top, left, right, bottom, center). [27472] #19393.
  • Add subtitle support to Video editing in the Media Modal. [27481] #27016
  • Do not output default gallery styles if the theme has opted into HTML5 galleries. [27396] #27045; see #26697
  • Add a class attribute to the caption shortcode to allow additional classes to be specified. [27404] #25295
  • Add playlist_styles and wp_playlist_scripts filters to allow users to roll their own playlist themes. [27486] #26631 & [27488] #26631

TinyMCE:

  • Update TinyMCE to 4.0.18. [27387] #24067
  • Add TinyMCE placeholders for audio and video shortcodes and provide a UI to both edit shortcode attributes and replace the src media file in an audio or video shortcode. Also, a flurry of improvements and fixes to them, visible in the full changelog. [27411] #27016
  • Add a Ctrl+K shortcut to open the linking dialog, which is the “de-facto standard”. [27449] #27305
  • Add the <hr> plugin and button to the toolbar. [27428] #27159
  • With drag-and-drop uploading, support multiple editor instances, limit to IE10+, and other small fixes. [27378] [27372] [27464] #19845
  • When parsing a caption shortcode, recreate missing width attributes using the image tag’s width. [27426] #23103
  • Restore the “link” button state to disabled by default and enabled when text or image is selected. Remove the (recently added) default link plugin; not needed. [27447] #27309

Templates:

  • Add has-post-thumbnail as a post class. [27429] #18804
  • Rename the new page_templates filter to theme_page_templates, and pass it a post object for proper context. [27470] [27471] #13265
  • Introduce get_the_permalink() as an alias for get_permalink(). This better aligns it with other the_* and get_the_* function pairs. [27409] #24164
  • Let get_the_date() accept a post object. [27380] #13771
  • Add the ability to short-circuit wp_nav_menu() via the pre_wp_nav_menu hook. [27386] #23627
  • Better plural handling for labels in wp_generate_tag_cloud() / wp_tag_cloud(). [27376] #27262, see #7989, #14424

Multisite:

  • Incremental improvements and bug fixes with the multisite load process. Please test your networks! [27406] [27439] [27407] #27003
  • Fix bulk activation of network-only plugins. [27413] #26487

Query:

  • Add has_password and post_password query variables to WP_Query. has_password true means posts with passwords, false means posts without. post_password can query for posts with a particular password. [27395] #20308
  • Allow a posts_per_rss query variable to be set to override the posts_per_rss option. [27456] [27455] #25380
  • Allow get_page_by_path() and get_page_by_title() to accept an array of post types. [27423] #24763

Internals:

  • Allow for custom authentication handlers for all requests. Turn the logic used by wp_get_current_user() into a determine_current_user filter. [27484] #26706
  • Allow the role attribute in kses for all elements. [27388] #24098
  • Add a pre_set_theme_mod_$name filter to set_theme_mod(), modeled after pre_update_option_$option in update_option(). [27393] [27402] #14721.
  • Improve HHVM compatibility by eliminating some of our last remaining create_function() calls and making OBJECT a case sensitive constant. [27373] [27374] [27465] #14424 [27377] #27231
  • Pass $reassign parameter to delete_user and deleted_user actions. [27462] [27466] #23057
  • Bail early from shortcode functions if no delimiter is present. It’s the little things; performance results on-ticket. [27394] #23855
  • Update PHPMailer to 5.2.7 from 5.2.4. Includes two trivial modifications for WordPress (no impact to plugin developers); see the commit message. [27385] #25560
  • Use SSL when linking to WordPress.org. [27469] #27115

For the complete list of commits to trunk, check out the log on Trac. Interested in joining in? Write or test a patch for 3.9.

Thanks to @adamsilverstein, @akeda, @avryl, @bassgang, @bigdawggi, @bobbravo2, @bpetty, @bradt, @celloexpressions, @coffee2code, @danielbachhuber, @dd32, @DJPaul, @DrewAPicture, @empireoflight, @ericlewis, @ericmann, @frank-klein, @gcorne, @genkisan, @gradyetc, @hakre, @Hanni, @Jayjdk, @jenmylo, @johnregan3, @jorbin, @JoshuaAbenazer, @kadamwhite, @kasparsd, @Kopepasah, @kovshenin, @kpdesign, @lpointet, @markjaquith, @mcadwell, @melchoyce, @michael-arestad, @mikecorkum, @mordauk, @nacin, @obenland, @Otto42, @pavelevap, @Rarst, @rhyswynne, @ricardocorreia, @rmccue, @robmiller, @seanchayes, @SergeyBiryukov, @shaunandrews, @simonwheatley, @sirzooro, @tanner-m, @TobiasBg, @tomauger, @topher1kenobe, @topquarky, @toszcze, @westonruter, @wokamoto, @wonderboymusic, @zbtirrell, and @zodiac1978 for their efforts this week!

#3-9, #week-in-core

Feature Plugin Chat on March 4

As mentioned at this week’s and last week’s meeting, we’re going to be holding a feature plugin chat on March 4 2014 21:00 UTC. If you have an idea for a new feature, this will be a great opportunity to bring it up and find others interested in helping out. In fact, just like we’ve done before, post your feature ideas here.

Please leave one comment per feature idea with the following information:

  • A brief (one paragraph) overview of your feature plugin proposal.
  • Current plugin status (idea stage, planning stage, under development, existing feature plugin, prior work, etc).
  • A list of those involved or already interested in your feature plugin (including you!)
  • What you’d like help with (scoping, planning, wireframing, development, design, etc).

This post and the accompanying chat is for posting ideas that you’d be interested in working on. It is not for posting every feature idea you have for WordPress.

Current feature plugin leads: Please post an update for your plugin here, along with the information above.

See you all at the chat!

#core-plugins

Last week in WordPress core

Welcome back to Last Week In WordPress Core, for the week of January 27-February 2. Big list this time! First, a summary of the major changes; then a roundup from the various 3.9 teams:

Enhancements and hooks

Database changes

  • Initial patch to reconnect when the MySQL server “goes away” has landed, with a request for feedback on how to make the solution more fool-proof on #5932.
  • Improved Compatibility with MySQL 5.6, which has stricter default SQL modes.
    Disables NO_ZERO_DATE, ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, STRICT_ALL_TABLES, TRADITIONAL. Introduces filterable wpdb::set_sql_mode(), with incompatible_sql_modes filter for plugins. #26847
  • We now throw a notice when wpdb::prepare() is called without a placeholder. #25604
  • In wpdb::db_connect(), allow the loading of a translatable custom database error template. #25703

Miscellaneous, including library updates

  • Properly invalidate the cache for wp_count_posts() on insert, trash, or when transitioning post_status. #21879
  • $force argument removed from WP_Object_Cache::delete(), which was internal-only. #22478
  • TinyMCE updated to 4.0.16. #24067
  • Dashicons updated to latest. Adds line break, paragraph, code, and bbPress. #26936
  • MediaElement.js updated to 2.13.2. #26954
  • Update the versions of several devDependencies in package.json. Run npm install to receive updates for node_modules in the project root. #26073

3.9 status reports

Here are roughly where each of the 3.9 teams/tasks stood as of last week’s meeting:

Media/editor related:

  • Media Modal: “Initial version of the single image editor landed, which includes the ability to replace the image and update the main set of attributes (e.g. caption, alt, alignment, link).” (@gcorne) (#21811)
  • Image Editor: “have a proof-of-concept plugin ready awaiting input on how to modularize the Editor and make it extensible and flexible. Working on a patch that introduces a few well-placed hooks.” (@tomauger) (#21811)
  • Rendering in the editor: “Going to dig into rendering galleries in the visual editor using a wpview and building on some of the work that i did in https://github.com/gcorne/gallery-editor.” (@gcorne) (#26628, #26959)
  • TinyMCE: All looks good on this front, #24067. “We’ve also started looking at restyling TinyMCE modals to match the admin, #26952″(@azaozz, @melchoyce)
  • Audio/Video: There’s an update post by @wonderboymusic.

Other UI work:

  • Widget Customizer: “We’re running more users tests; Working on keyboard accessibility features; Trying to figure out support for wide widgets; Asked for some code review/notes; And digesting feedback from our recent p2 post.” (@shaunandrews)
  • Settings screens: “We had a meeting yesterday to divvy up the redux. I’m looking at reordering of information across screens, @melchoyce is experimenting with UI approaches, and @Ipstenu is looking at cleaning up the multisite ‘edit site/settings’ view. We hope to be posting sketches/wireframes [this] week.” Also, they’re again looking at lifting post by email from core. (@jenmylo)
  • Accessibility: we are testing 3.8.1 admin screens for keyboard accessibility. (@joedolson)
  • Autocomplete: After the new site email address autocomplete landed (#25348), now looking into other areas — users (#19867) and pages (#9864). (@helen)
  • CSS: Work continues on the colors.css merge to prep for splitting up wp-admin.css. (@helen, #18380, #26669).

Fun with internals:

  • Multisite: “Our tickets are focused. [As in, reorganized into the ‘multisite’ focus.] I’ve been digging through ms-load.php, ms-settings.php, etc in prep for some fun domain routing work. Would like to compare thoughts on approach soon and get moving on that.” (@jeremyfelt)
  • New Grunt-based Patching Tool: “I’ve been using it locally and haven’t run into any issues. Will be opening a ticket on Trac with a patch and instructions in the next few days.” (@jorbin)
  • Taxonomy: Hope to start with the first few tickets on the roadmap this week. (@nacin)

Housekeeping items last week included a call for GSoC participation from @jenmylo, and trac component reorganization proposal from @nacin. The reorganization was approved during the chat on Wednesday and is well under way. Additionally, there’s now a new Trac reports overlay and Trac’s navigation got overhauled.

For the complete changelog commits to trunk, check out the log on Trac.

More than three dozen contributors had a hand in last week’s efforts. Want to help out this week? Write or test a patch for 3.9.

Thanks for contributions this week from atimmer, aubreypwd, azaozz, c3mdigital, cmmarslender, coffee2code, Denis-de-Bernardy, DrewAPicture, empireoflight, gcornehelen, ippetkov, jeremyfelt, joehoyle, johnjamesjacoby, JoshuaAbenazer, kovshenin, kpdesign, kraftbj, mark8barnes, markjaquith, MattyRob, mdbitz, melchoyce, nacin, neoxx, nofearinc, ocean90, olivM, oso96_2000, ounziw, pento, romaimperator, sbruner, SergeyBiryukov, soulseekah, TobiasBg, toszcze, wonderboymusic, and yoavf!

#3-9, #week-in-core

Widget Customizer Feature-as-Plugin Merge Proposal

Widgets in WordPress provide an easy way to add functionality to predefined areas of your theme templates. However, once you add a widget to a sidebar you have to leave the WordPress admin to go back to the frontend to actually see how the updated widget appears in the sidebar on your site’s public frontend. While you are making these changes and experimenting with a widget, it could be completely broken and everyone visiting your site will see this broken widget since there is no core way to preview changes made to widgets. But WordPress also provides an excellent way to preview changes to various settings on your site via the (Theme) Customizer. Changes made when using the Customizer are not visible to site visitors until you hit Save & Publish. So what if widgets could be edited in the Customizer? That’s what the Widget Customizer plugin makes possible. No longer do you have to edit your widgets blind!

A widget control open the customizer

Each registered sidebar on your site gets its own section in the Customizer panel. Within each section, widgets appear in their sidebar order. The widget controls appear there just as they appear when editing widgets in the widgets admin page. Upon making a change to the widget control, pressing the form’s Update button causes the changes to appear in the preview window; no changes to the widgets are saved permanently for others to see until you hit the Customizer’s Save & Publish button. This goes for whether you’re adding a new widget, editing existing widgets, reordering widgets, dragging widgets to other sidebars, or even removing widgets from the sidebars entirely: all of these actions are previewable.

Adding a widget to a sidebar slides open a panel for browsing the available widgets, complete with the usual names and descriptions, but also featuring widget icons to help quickly identify widgets. The list of available widgets can also be filtered down with a search input.

When you remove a widget from a sidebar, it is not deleted. Instead, it is moved from an active sidebar to the “Inactive Widgets” sidebar which can currently be seen on the widgets admin page. As such, removing a widget now is the same as trashing a widget.

Adding a widget

Customizer control sections for sidebars are shown and hidden dynamically when the preview window is initially loaded or when navigating the site within the preview window, based on whether or not the sidebar gets rendered in the previewed URL. (You may not know this, but you can navigate your site by clicking links in the preview window.) Only sidebars which can be previewed will be shown in the customizer panel. Likewise, widgets that are not rendered in the preview (for example, by means of Jetpack’s Widget Visibility module) will appear in the Customizer as semi-transparent.

Accessibility has also been a key concern for Widget Customizer. The current keyboard navigation on the widgets admin page feels cumbersome, having to open screen options to enable a separate accessibility mode. We wanted to make re-ordering with widgets as seamless as possible. So now when any sidebar section is open, you can invoke a reorder mode to reveal up/down arrows to reorder widgets, as well as a subpanel to open for moving the widget to another sidebar entirely. (This feature is nearing completion in pull request #21.)

Here’s an older walkthrough of the plugin:

Live Previews

(This did not make it into WordPress 3.9 — that also means themes do not need to indicate support for the widgets customizer. Read more about Live Widget Previews: Widget Management in the Customizer in WordPress 3.9.)

While all themes and widgets should work with Widget Customizer, for the best experience the themes and widgets need to indicate they support live previews of sidebars and widgets. Without such support added, each change to a sidebar or widget will result in the preview window being refreshed, resulting in a delay before the changes can be seen (settings default to transport=refresh). To enable a much more responsive preview experience, themes and widgets should indicate that they support Widget Customizer live previews; this will update the relevant settings to use transport=postMessage, the updated widgets will be loaded via Ajax, and the widgets will be re-ordered via DOM manipulation.

All core widgets and themes distributed with WordPress core are supported by default. For other themes, simply include add_theme_support('widget-customizer') in your theme’s functions.php to opt-in. If your theme does some dynamic layout for a sidebar (like Twenty Thirteen uses jQuery Masonry), you’ll also need to then enqueue some JavaScript to listen for changes to the sidebar and reflow them when that happens; see the bundled support for Twenty Thirteen to see an example of what is required.

Along with themes needing to indicate support for live-previewable sidebars, widgets must also indicate that they support being live-previewed with Widget Customizer. When updating a widget, an Ajax call is made to re-render the widget with the latest changes, and then the widget element is replaced in the sidebar inside the preview. If a widget is purely static HTML with no associated script behaviors or dynamic stylesheets (like all widgets in core), then they can right-away indicate support for live previews simply by including 'customizer_support' => true in the array passed to WP_Widget::__construct(). As with sidebars, if a widget has dynamic behaviors which normally only get added when the page first loads (such as a widget which includes a carousel), then a script needs to be enqueued in the Customizer preview which will re-initialize the widget when a widget is changed.

The sidebar-updated and widget-updated events get triggered on wp.customize when sidebars and widgets get updated, each being passed the sidebar ID and the widget ID respectively as the first argument in the callbacks. For a full example demonstrating how to add theme support for live-previewing dynamic sidebars and how to add support for JS-initialized widgets, see this annotated Gist.

Core Tickets

A few Core tickets have been opened with patches to generally improve widgets and the customizer, and also to improve Widget Customizer itself:

  • #26633: Customizer form submission prevention impairs accessibility of links in customizer controls
  • #26061: Customizer settings with non-scalar values incorrectly trigger as changed
  • #26569: URLs exported to JavaScript in Customizer settings get double-encoded
  • #25368: Add temp hooks for Widgets UI Refresh plugin-as-feature
  • #26661: Add before/after hooks to override output of wp_widget_control()
  • #25419: Add support to widgets for icons and screenshots

User Tests

A couple user tests have been done, both of which went pretty well. More user testing is being queued up. Here’s the first user test video, though note it reflects an early rendition of the plugin:

Remaining Issues

In addition to wrapping up the keyboard-accessible widget reordering (#21), there is the dilemma of how to handle wide widget form controls (#18); various solutions have been proposed for how to display a widget control which does not fit within the customizer panel.

The other open issues are enhancements or open questions which may or may not need actioning.

Contributors

While the plugin was first conceived by me (@westonruter) and I’ve been the lead developer, a ton of valuable input and contributions have come from @shaunandrews, @michael-arestad, from my X-Team colleagues (@johnregan3, @akeda, @topher1kenobe), and from others in the community (@bobbravo2, @topquarky, @ricardocorreia).

Development on the plugin has been done on GitHub, with the WordPress.org repo serving as a read-only mirror.

See Also

#customize, #feature-plugins, #merge, #proposal, #widgets

Possible tasks for WP 3.9

During last week’s dev chat, we decided on a schedule. We also chatted about a major focus in 3.9 on improving workflow for new and current contributors alike. If there are further suggestions on changes we can make to workflow to make core easier to contribute to, let us know.

Below is a rundown of what features/enhancements/ideas were discussed as possible for 3.9, including potential volunteers to take point on different tasks. This is all tentative. Thanks @DH-Shredder for compiling this.

In today’s chat, let’s continue to build this out. If you have something you’d love to work on during the release, join us!

Widgets

There are two widget-related feature plugins to review: Better Widgets and Widget Customizer. Decisions on what we’re merging should come by next week, per the schedule. Expect a post from @shaunandrews soon explaining both and requesting help reviewing them.

TinyMCE improvements (@azaozz, @gcorne, @lgladdy)

  • TinyMCE 4 inclusion and troubleshooting
  • Improving editing/positioning images after insertion into the editor

Editor-related media improvements

  • Bringing the image editor into the media manager (@melchoyce, @johnbillion)
  • Allow a user to drop an item for upload on the post screen. This would then open the media modal (as an initial first step).

A better themes experience, part 2 (@matveb)

  • Taking our new experience to the theme installer (this may be started as a plugin)
  • Supporting multiple screenshots, left out of 3.8
  • Backbone routing and subview backend improvements

Improved audio/video support (@wonderboymusic) (see this post)

  • Playlists, subtitles, metadata generation
  • Media manager documentation

JavaScript and CSS

  • wp-admin.css split (@jorbin, @helen) (see this post)
  • Merging colors.css into other CSS files (@helen)
  • Grunt tool for patches (@jorbin)
  • Inline JS documentation using JSDoc (@jorbin)

Miscellaneous

#3-9

Better Widgets

The Widgets team has been busy. 🙂 Outside of the Widget Customizer plugin (posted about previously), we’re also working on some updates to the main wp-admin widgets screen through the Better Widgets plugin. This plugin does a bunch of things:

  • Available widgets have moved to the right side of the screen. The idea is that your widget areas (a.k.a. sidebars) should be the real focus of the screen — these are the things you can edit and manage. This may be a controversial change, as its the opposite of the menu screen (widgets closest cousin.)
  • Brings the widget icons from the Widget Customizer plugin to wp-admin.
  • Available widgets are now contained in a separately scrollable area. The goal is to help reduce to drag-and-scroll-and-scroll-and-scroll-and-drop problem that is so common from our initial research.
  • Widget descriptions are displayed in a single line, and truncated if they are too long. Clicking/Tapping on a widget expands the description (along with the area chooser from 3.8.)
  • Inactive Widgets are displayed below your active widget areas. This may be problematic as you have to drag-and-drop inactive widgets to active widget areas, but its an area we’d like to improve — maybe they should get an “area chooser”-like UI?
  • When editing a widget, the title is highlighted (using your current color scheme).
  • Clicking/Tapping on the “Save” button inside a widget now closes the widget and gives a quick confirmation message that the settings have been saved. This is based on some of our earlier user tests.
  • You’ve always been able to drag an active/inactive widget over the list of available widgets to deactivate it (yes, really!), but its been ugly. We’ve made it a little more tolerable. Give it a try.

The plugin is still very young, but we’re looking to the community to get some interested from designers, developers, and testers. Please, install the plugin and play around. If you’d like to help us improve widgets, please join us every Monday at 20:00 UTC in #wordpress-ui — you can also drop your Skype nick below and we’ll add you to our ongoing chat.

Some things to keep in mind when testing the Better Widgets plugin:

  • Responsive styles are essentially broken. Its on our short list, but we haven’t gotten to it yet.
  • The code is quick and dirrty — I’ve been the only developer committing code. Please, lets change this!
  • Some of this may look familiar to early MP6 adopters — this code comes from an earlier version of MP6, and was removed before the MP6 merge into 3.8.
  • We need accessibility help! Keyboard navigation is a must. I’d love to ditch the separate “accessibility mode” altogether and make it accessible out of the box.

#widgets

Widgets ♥ the Customizer

The Widgets team has been hard at work on our latest project which adds widget management to the customizer. It looks a little something like this:

We’d love to have some more help, especially PHP and Javascript developers with experience with the customizer, to help up polish things up and get ready for a proposal for including in 3.9! If you’re interested in helping, please leave a comment with your Skype handle. I’ll add you to our ongoing chat, and all are welcome to join us in #wordpress-ui every Monday at 20:00 UTC.