WordPress has released its 12th update for 2017, and it’s also the second minor version pushed out this year. WordPress 4.9 includes a lot for users. “Tipton” introduces changesets for theme customizations, previewing, and scheduling of theme customizer updates and code editing syntax highlighting, autocompletion, and error checking using CodeMirror. Finally, there’s a new Gallery widget and an “Add Media” button for the venerable text widget.1Days of hard-coding images into the text widget are seemingly over.
As usual with each new release, I look for improvements and additions for developers. Although there isn’t quite as much for developers in this specific version, there are a few key inclusions that I wanted to highlight.
Next, base HTML5 input types, like number, email, color, etc., are now defined by default using new control “templates”. Further, we can create our own templates for custom controls and reuse them throughout the Customizer.
A new Date/Time Control has also been added to core to support the scheduling of Theme Customizer updates. Developers can use this control independently for their own controls, and there are various settings for date-only and both display and value formatting.
Finally, core adds another sub-panel for control settings and there are new events that can be hooked into for Customizer actions. Notifications have been overhauled to allow for global, section, and panel instances. Notifications can also be filtered and made dismissible. Those of the global type can even be made to take over the entire screen with an
CodeMirror in Core
UPDATE: Due to licensing issues, the development team will be removing JSHint from CodeMirror in Core. Instead, the team will be replacing JSHint with Esprima in WordPress version 4.9.3. If you built a plugin that included the JSHint dependency from Core, you’ll need to include it in your build independently.
CodeMirror has been added to the popular “Additional CSS” control in the Customizer, the HTML Widget, and the plugin and theme file editor. Excitingly, WordPress’s implementation is in the form of an API that’s available to developers. We can add any or all of these CodeMirror features to fields by including just a few lines of code. You can view the code-editor JS on GitHub to see all of the options available when using the API.
This third-party library is used to assist editors with embedded media/video. It’s has been updated to a more recent version which includes bugfixes, updated browser support, updated API usage for YouTube and Vimeo, and removal of all jQuery dependencies. For a full list of details, see the Trac ticket.
Roles and Capabilities
A couple of tweaks here add new capabilities for
update_languages. The first provides a little more control of a specific plugin by passing the plugin file as the second parameter to
current_user_can(). The team has also removed the implicit
do_not_allow capability, which was a possible resultant value mapped from the
This latest version of WordPress comes with a lot of bugfixes and improvements for users as well as site builders. You can read the release announcement for “Tipton” here. As always, you should update as soon as practical. If you need help, I offer this sort of thing as a service. =)
The push toward WordPress 5.0 pushes onward inexorably, and it seems to be on schedule for a Q1 2018 release. I expect a few security/bugfix/feature releases that tweak 4.9 in the next couple of months. Developers should really stay on top of all news coming from Matt and the Core channel in Slack in the coming weeks to ensure there are no big surprises when the next major version is revealed early next year. The Gutenberg editor is the talk of the town, for sure, but I fully expect some new security features, more mobile/desktop UI unification, and more.
References [ + ]
|1.||Days of hard-coding images into the text widget are seemingly over.|
|2.||Although, it looks as if PHP linting will be available in core by the time WordPress 5.0 is released.|