What You Need To Know About WordPress 3.9

Advertisement

The latest version of WordPress named “Smith” was released yesterday which brings us another round of core changes. This time, the team worked mainly on the back-end editing and admin functions, such as a big TinyMCE (visual editor) update, gallery previews, media playlists, an improved widget UI and live theme previews (only to mention a few). Here’s what you need to know about the major changes in WordPress 3.9.

Improved Widget Interface

While the old widget interface set the standard for drag-and-drop UI when it was introduced, it was time for an overhaul. The developer team took the Widget Customizer plugin1 and essentially built it into the core.

The biggest changes that come with the new widget interface are live previews, among others:

  • Editing existing widgets
  • Adding a new widgets
  • Widget reordering
  • Entirely remove Widgets
  • Adding a new widget

widget-click-add2
(See large preview3)

Updated Visual Editor

The visual editor has received a major overhaul (both under the hood and on the UI end), adding a horizontal line button, updated Plupload, and an updated TinyMCE. Small visual changes seem to have been applied to many different button icons.

The new visual editor brings with it gallery previews, meaning no more place holder boxes for galleries! You’ll have a live preview of your gallery, just like you do with images and other media.

TinyMCE has also been updated to version 4.04 for WordPress 3.9. Plupload 2.x has made it’s way in5, as well. It handles most of the file upload interfaces in WordPress.

rc2-welcome6
(See large preview7)

The updated visual editor also brings drag & drop functionality, allowing you to drag images from your desktop, and drop them right into the post. They’ll be automatically formatted to fit the post.

Here’s a quick preview of how it works:


A preview of the updated visual editor in WordPress’ latest 3.9 version. (Watch on YouTube8)

Live Theme Preview Additions

Live theme preview gives you a way to see how your site would look using a different theme. This has been around for a while and WordPress is finally adding new features to the framework they’ve built.

Apart from the usual customizations options like color, title and whatever else is defined by the theme, you can now add widgets and rearrange them, seeing exactly how they will look once saved. In addition, the header image facility has received an overhaul and now provides even more flexibility.

Easier Theme Installation

The new theme installation interface is a vast improvement over the old. It will be blatantly obvious to anyone who’s ever seen the pre-WordPress 3.9 theme installation screen.

Installing new themes is even easier now, too. The theme installation interface has been totally redone. Some of the most popular themes are displayed immediately in the “Featured” tab, for quick installation.

add-themes-new9
(See large preview10)

There are also tabs for popular themes and latest themes. The feature filter has been moved into it’s own tab, and has been generally cleaned up.

Audio & Video Playlists

Users are now able to create audio and video playlists with WordPress 3.9. They work as a shortcode, just like the image galleries do currently. Uploading audio and video is handled through the usual media uploader, with images and everything else. From there, you have the option to add them to a playlist.

A neat little feature is that WordPress 3.9 will try to automatically fetch album cover artwork using the ID3 tags in your media file.

Key Points For Developers

Plugin and theme developers need to know a few new and important things. Right when upgrading to WordPress 3.9, four new utility functions are mentioned. doing_action() and doing_filter() allow for identifying a hook in progress. The other two functions, has_image_size() and remove_image_size() allow manipulation of custom image sizes.

Various external libraries have been updated, including jQuery11, the ever popular JavaScript framework. TinyMCE12, which provides the text and visual editing components. Underscore13, a utility-belt for functional JavaScript programming. Plupload14, which drives most of the upload interfaces in WordPress. Backbone15, which uses Underscore as it’s backbone, essentially provides models with key-value bindings and custom events16. MediaElement is a well-crafted HTML5 audio and video player. Masonry 317 is a cascading grid layout library.

The database layer has also been improved, making it more fault-resistant and bringing improved compatibility with PHP 5.5 and MySQL 5.6. For example, PHP’s mysqli library is now used when PHP 5.5+ is available. Autosave functionality18 has been improved, as well.

Your themes can now make use of HTML5 galleries and captions19. Adding add_theme_support( 'html5', array( 'gallery', 'caption' ) ); to your theme’s functions.php file will enable HTML5 galleries and captions. Symlinked plugins20 are a new thing to WordPress 3.9. While it was technically possible in the past, it’s now fully supported:

“One of the cool little features included with 3.9 is the ability to symlink plugin directories. While it has been possible to symlink plugins in the past, functions such as plugins_url() return the wrong URL, which causes breakage in most plugins.”

If you’re a theme or a plugin developer, don’t forget to update your repositories. For some items you may just need to change your “Tested Up To” strings, in other cases (especially if you utilize heavily modified editor or upload configurations) you may need to look at the core changes in more detail.

rc1-welcome21
(Large preview22)

So, What Are You Waiting For?

Keep in mind that upgrading your WordPress installation is the number one way to prevent malicious activity and exploits. As always, before any update, please do not forget to back up your database23 just in case anything goes pear shaped!

WordPress 3.9 is available for download at the usual location, http://wordpress.org/download/24.

(dp, il)

Footnotes

  1. 1 http://wordpress.org/plugins/widget-customizer/
  2. 2 http://www.smashingmagazine.com/wp-content/uploads/2014/04/widget-click-add-large-preview.png
  3. 3 http://www.smashingmagazine.com/wp-content/uploads/2014/04/widget-click-add-large-preview.png
  4. 4 http://make.wordpress.org/core/2014/01/18/tinymce-4-0-is-in-core/
  5. 5 http://make.wordpress.org/core/2014/04/11/plupload-2-x-in-wordpress-3-9/
  6. 6 http://www.smashingmagazine.com/wp-content/uploads/2014/04/rc2-welcome-large-preview.jpg
  7. 7 http://www.smashingmagazine.com/wp-content/uploads/2014/04/rc2-welcome-large-preview.jpg
  8. 8 https://www.youtube.com/watch?v=pIbMQRLpvbE
  9. 9 http://www.smashingmagazine.com/wp-content/uploads/2014/04/add-themes-new-large-preview.jpg
  10. 10 http://www.smashingmagazine.com/wp-content/uploads/2014/04/add-themes-new-large-preview.jpg
  11. 11 http://jquery.com/
  12. 12 http://www.tinymce.com/
  13. 13 http://underscorejs.org/
  14. 14 http://www.plupload.com/
  15. 15 http://backbonejs.org/
  16. 16 http://backbonejs.org/
  17. 17 http://masonry.desandro.com/
  18. 18 https://core.trac.wordpress.org/ticket/25272
  19. 19 http://make.wordpress.org/core/2014/04/15/html5-galleries-captions-in-wordpress-3-9/
  20. 20 http://make.wordpress.org/core/2014/04/14/symlinked-plugins-in-wordpress-3-9/
  21. 21 http://www.smashingmagazine.com/wp-content/uploads/2014/04/rc1-welcome-large-preview.png
  22. 22 http://www.smashingmagazine.com/wp-content/uploads/2014/04/rc1-welcome-large-preview.png
  23. 23 'http://codex.wordpress.org/WordPress_Backups'
  24. 24 http://wordpress.org/download/

↑ Back to top Tweet itShare on Facebook

Tyler Longren is a freelance web developer based in Iowa, USA, and has a beautiful daughter and wife, with another baby on the way (due September 2014!). He likes PHP, JavaScript, WordPress, Git, HTML5 & CSS3, and other neat things. He also really loves the open source community, too.

Advertising
  1. 1

    Is there a a way to update the core files and plugins automatically?

    0
    • 52

      Hi There,

      Sure there is, it does depend on what you mean by automatically. If you go to the updates page you can get the latest version of the core and the plugins in one click.

      If you want beta versions you can use the WordPress beta tester plugin.

      Also, WordPress has automatic background updating which should take care of this for you. It is on by default, here is some more info

      1
  2. 103

    Thanks for your write-up!

    I should probably downgrade to wp 3.7 since all the other upgrades meant some plugin incompatibility issues. With WP 4.0 even disabling all plugins did not work, the admin dashboard is just very slow and theme options saved at one go are not in fruition (not all options being updated).

    I shall wait for 4.0 to be over.

    0
  3. 154

    This is a great tutorial, im searing some widgets for my sites brightverge.com and gocime.com but still unable to search, manually I am creating but every time I edit my theme functions file I end up with an error message. I have double-checked it against what you put up above and can’t seem to resolve it.

    0

Leave a Comment

Yay! You've decided to leave a comment. That's fantastic! Please keep in mind that comments are moderated and rel="nofollow" is in use. So, please do not use a spammy keyword or a domain as your name, or else it will be deleted. Let's have a personal and meaningful conversation instead. Thanks for dropping by!

↑ Back to top