WordPress Release: 4.9.0

Tag Name: 4.9.0

Release Date: 11/16/2017

WordPress LogoWordPress

World's most popular open-source content management system powering over 40% of all websites. Offers extensive plugin ecosystem, themes, and robust community support for blogs, e-commerce, and corporate websites. Highly customizable and scalable platform suitable for beginners and advanced developers.

TL;DR

WordPress 4.9 "Tipton" introduces significant improvements to the Customizer, code editing experience, and widget functionality. This release focuses on enhancing the design customization workflow with features like scheduling, drafting, and sharing of customizations. It also brings powerful code editing capabilities with syntax highlighting, error checking, and auto-completion. The update includes new gallery and media widgets, improved theme browsing, and various UI refinements throughout the platform.

Highlight of the Release

    • Drafting and scheduling of design customizations
    • Sharing of preview links for design changes
    • Syntax highlighting and error checking in code editors
    • New gallery widget and improved media widgets
    • Enhanced theme browsing experience
    • Improved menu creation workflow in the Customizer
    • Better handling of embeds in Text widgets

Migration Guide

Upgrading to WordPress 4.9

  1. Before upgrading, it's recommended to:

    • Back up your website files and database
    • Update all themes and plugins to their latest versions
    • Test compatibility in a staging environment if possible
  2. Code Editor Changes:

    • If you've built custom plugins or themes that interact with the editor, test them with the new CodeMirror integration
    • Review any custom code that relies on the old editor behavior
  3. Customizer API Changes:

    • If you've built plugins that extend the Customizer, review the updated API
    • Note that WP_Customize_New_Menu_Section and WP_Customize_New_Menu_Control are now deprecated
    • The JS class wp.customize.Menus.NewMenuControl is also deprecated
    • Use wp.customize.Menus.createNavMenu() for creating nav menus
  4. Widget Changes:

    • The "Custom Menu" widget has been renamed to "Navigation Menu"
    • Review any documentation or training materials that reference the old name
    • If you've built custom widgets, ensure they properly apply the widget_title filter
  5. MediaElement.js Upgrade:

    • MediaElement.js has been upgraded from 2.22.0 to 4.2.6
    • A back-compat layer (mediaelement-migrate.js) has been added
    • Test any custom media players or extensions for compatibility
  6. Database Query Changes:

    • Support for numbered placeholders in wpdb::prepare() has been restored with additional safety checks
    • Review any custom database queries that use wpdb::prepare() to ensure they follow best practices

Upgrade Recommendations

Recommended for all users: WordPress 4.9 "Tipton" is a significant update that enhances the design customization workflow, improves the code editing experience, and fixes numerous bugs. The new features like drafting and scheduling customizations, syntax highlighting in code editors, and improved widgets provide substantial benefits for all WordPress users.

Priority: Medium-High

Timing:

  • For personal blogs and small sites: Update at your earliest convenience
  • For business sites: Test in a staging environment first, then update within 2 weeks
  • For enterprise/high-traffic sites: Test thoroughly in staging, then schedule an update within 3-4 weeks

Preparation:

  1. Back up your website files and database
  2. Update all themes and plugins to their latest versions
  3. Review the migration guide for any potential compatibility issues
  4. If using custom code editors or extending the Customizer, test compatibility in a staging environment

This update focuses on user experience improvements rather than critical security fixes, so while updating is important, it doesn't require immediate emergency action unless you're experiencing issues addressed by the bug fixes.

Bug Fixes

Customizer Fixes

  • Fixed positioning of device-previewed window when publish settings are open
  • Fixed visibility of theme browser header in Safari
  • Fixed visibility of overlay notifications in Safari
  • Fixed theme details modal from being clipped in Safari
  • Prevented re-highlighting "Add Items" button after available nav menu items pane has already been opened
  • Fixed alignment of Customize, Activate, and Live Preview buttons on Themes admin screen
  • Fixed search icon in available widgets pane
  • Fixed date/time format previewing
  • Fixed reliability of just-in-time publishing for changesets that miss their schedule
  • Fixed PHP notice on theme-switch dashboard welcome link

Widget Fixes

  • Fixed MediaElement.js player overflowing sidebar in Audio widget
  • Fixed handling of empty captions in Image widget
  • Fixed previewing embeds in Text widget
  • Fixed styling of invalid URLs in Image widget link field
  • Fixed handling of gallery widget when attachments are modified outside customized state

Editor Fixes

  • Fixed scrolling behavior when switching between Visual and Text tabs
  • Fixed issue with extra paragraphs being added when switching editor tabs
  • Fixed autosave logic causing dirty state when just switching between editor tabs

Multisite Fixes

  • Fixed handling of WP_Network::$blog_id in get_main_site_id()
  • Fixed file access in multisite installs for file editors
  • Explicitly globalized global variables in ms-settings.php

Accessibility Fixes

  • Improved the File Editors interstitial warning for assistive technologies
  • Fixed focus handling in File Editor
  • Improved menu item type alignment on Menus screen

Other Fixes

  • Fixed PHP 5.2 and 5.3 syntax errors in Code Editor
  • Fixed handling of term queries with number and object_ids parameters
  • Fixed division by zero warning in embed templates when thumbnail has zero height
  • Fixed handling of invalid file names in Zip extraction
  • Fixed placement of structure tags in Permalinks based on cursor position
  • Fixed handling of ports in IPs to avoid PHP warnings
  • Fixed gallery styling in bundled themes

New Features

Design Customization Workflow

  • Draft and Schedule: Save customizations as drafts or schedule them for future publishing
  • Preview Sharing: Generate shareable preview links for team collaboration on design changes
  • Customization Drafts: Edit customization drafts in the admin as regular posts
  • Frontend Preview Links: Updated to reflect current state of previewed URL and theme

Code Editing Experience

  • Syntax Highlighting: CodeMirror integration provides syntax highlighting for PHP, HTML, CSS, and JavaScript
  • Error Checking: Real-time linting identifies coding errors as you type
  • Auto-completion: Code suggestions and auto-completion for faster development
  • Warning System: Interstitial warning before making potentially breaking changes to theme/plugin files
  • CSS Editing Notice: Encourages using the Customizer for CSS changes instead of direct file editing

Widgets and Media

  • Gallery Widget: New widget for displaying image galleries
  • Enhanced Media Widgets: Improved widgets for images, audio, and video
  • Widget Title Filtering: Consistent application of widget_title filter across all widgets
  • Better Embeds: Improved handling of embeds in Text widgets

Theme Experience

  • Improved Browsing: Enhanced theme browsing with better search, filtering, and mobile experience
  • Menu Creation: Streamlined menu creation workflow in the Customizer
  • Navigation Menu Widget: Renamed from "Custom Menu" to "Navigation Menu" for clarity

Security Updates

Security Improvements

  • Added warning system before making potentially breaking changes to theme/plugin files
  • Improved validation of file names in Zip extraction
  • Enhanced URL validation in various components
  • Restored numbered placeholders in wpdb::prepare() with additional safety checks
  • Fixed handling of AUTH_SALT in database queries when undefined or empty
  • Added the core_version_check_query_args filter to control data sent for core update checks

Performance Improvements

Database Performance

  • Improved handling of term queries with number and object_ids parameters
  • Added daily cron task to clear expired transients from the database
  • Optimized nav menu items cache handling when persistent cache is used

UI Performance

  • Improved theme search with debouncing instead of throttling
  • Enhanced theme browsing UI on small screens
  • Optimized menu slug mapping by ordering slugs by popularity

Media Performance

  • Improved MediaElement.js with better compatibility and migration support
  • Enhanced handling of oEmbed caching between oembed_cache and post meta

Impact Summary

WordPress 4.9 "Tipton" represents a significant evolution in how users customize and develop WordPress sites. The most impactful changes revolve around three key areas:

First, the Customizer has been transformed into a more powerful design management tool with the ability to draft, schedule, and share customizations. This fundamentally changes the workflow for site design, allowing teams to collaborate on changes before making them live and enabling site owners to plan design updates to coincide with content or marketing campaigns.

Second, the code editing experience has been dramatically improved with the integration of CodeMirror, bringing syntax highlighting, error checking, and auto-completion to the built-in editors. This makes direct code editing safer and more accessible, potentially reducing errors and improving code quality for users who edit theme and plugin files directly.

Third, the widget system continues to evolve with the addition of a gallery widget and improvements to media widgets, making it easier to create rich, media-heavy sidebars and widget areas without custom code. The improved handling of embeds in Text widgets also enhances content flexibility.

For developers, the update includes important API enhancements and deprecations, particularly around the Customizer and widget systems. The restoration of numbered placeholders in wpdb::prepare() with additional safety checks also addresses a pain point from previous versions.

Overall, WordPress 4.9 focuses on refining the content creation and site customization experience, making powerful features more accessible while maintaining backward compatibility.

Statistics:

File Changed300
Line Additions10,999
Line Deletions6,068
Line Changes17,067
Total Commits250

User Affected:

  • Can now draft, schedule, and share customizations before making them live
  • Improved theme browsing experience with better search and filtering
  • Enhanced gallery and media widgets for better content presentation
  • Better preview capabilities for customizations across different devices

Contributors:

westonruterhelenfelixarntzSergeyBiryukovjeremyfeltaferciajohnbillionboonebgorgesdavidakennedypentomelchoyceobenlandjoemcgilldd32peterwilsonccswissspidyaaronjorbinellatrixjoehoyleiandunnadamsilversteinocean90