Week in Core: Aug. 31 – Sept. 12, 2015

Welcome to the Week in Core, with updates from weeks 2 & 3: Aug. 31 – Sept. 12, 2015, changesets [33821][34092].

It’s been a busy couple of weeks in Core, with almost too many changes to count (for the record, this one covers 271 commits!). I’m going to keep this update shorter than usual and highlight some of the bigger changes.

If you’re interested in helping write this weekly post, ping @morganestes in #core-weekly-update on Slack.

Special Note: WordPress 4.3.1 was released this week, with three security-related fixes. Be sure to update your sites!

Here’s some highlights of recent changes in core, along with some future plans and ongoing initiatives. Remember, Core moves pretty fast. If you don’t stop and look around once in a while, you could miss it.

  • WordPress will support PHP7 when it’s released. Huzzah!
  • HTTP/2 is coming! Here’s a list of tickets that need attention to get WordPress ready.
  • Get involved in Twenty Sixteen, which is in active development on GitHub.
  • Write better commit messages. The world will thank you for it. 🙂
  • As described in this post by @johnbillion, the show_ui flag for post types now gets fully honored. See #33763 for the ticket discussion.
  • A new helper function, wp_validate_action( $action = '' ), was introduced in [34059] and is used throughout admin instead of directly accessing $_REQUEST['action'].
  • A new file, wp-admin/includes/noop.php, was created to load all of the noop functions for load-script|styles.php and is only loaded by those files. DRYs in the process. [34037] #33813
  • Schema change introduced in [34030] to increase the length of wp_options.option_name to 191 chars. #13310
  • Implement a priority system for Help Tabs to add them at specific positions. [33985] #19828
  • Multisite: Don’t allow sites to be created with the following reserved slugs: wp-admin, wp-content, wp-includes [33952] #33615
  • Updated recommendations for minimum versions of PHP (5.6) and MySQL (5.5), with a special note that Oracle only actively supports MySQL for 5 years after a General Availability release. [33937] [33946]

For the full report, visit https://core.trac.wordpress.org/log/?verbose=on&format=changelog&rev=34092&stop_rev=33821&limit=400&mode=stop_on_copy.

Thanks to @adamsilverstein, @afercia, @amereservant, @ankit-k-gupta, @antpb, @austinginder, @azaozz, @BdN3504, @benjmay, @boonebgorges, @bradt, @brettz95, @celloexpressions, @cgrymala, @Cheffheid, @chriscct7, @codeelite, @CoenJacobs, @danielbachhuber, @daniellandau, @dannydehaan, @dd32, @dimadin, @dipeshkakadiya, @dlh, @DrewAPicture, @dustinbolton, @egower, @enshrined, @ericdaams, @ericlewis, @extendwings, @figureone, @filosofo, @gaelan, @GaryJ, @gitlost, @gnaka08, @gradyetc, @gregrickaby, @hauvong, @helen, @imath, @ippetkov, @iseulde, @ixkaito, @jazbek, @jeffstieler, @jeremyfelt, @jesin, @jobst, @johnbillion, @joostdevalk, @jorbin, @juliobox, @JustinSainton, @kevinlangleyjr, @khromov, @kitchin, @kraftbj, @lancewillett, @liljimmi, @lukecarbis, @macmanx, @MatheusFD, @mehulkaklotar, @mercime, @metodiew, @michielhab, @MikeHansenMe, @miqrogroove, @mitchoyoshitaka, @mordauk, @morganestes, @mrahmadawais, @mrmist, @Mte9, @nacin, @netweb, @nikeo, @nikolovtmw, @nofearinc, @obenland, @ocean90, @OriginalEXE, @Otto42, @paulwilde, @pavelevap, @pento, @peterwilsoncc, @racaseh, @rachelbaker, @rajnikmit, @rmccue, @rommelxcastro, @sc0ttkclark, @scribu, @SergeyBiryukov, @sillybean, @solarissmoke, @stevehenty, @swissspidy, @tmatsuur, @trepmal, @tyxla, @umeshnevase, @utkarshpatel, @wen-solutions, @wenthemes, @westonruter, @wojtekszkutnik, @wonderboymusic, @yoavf, and @zeo for their contributions!

#4-4, #week-in-core

WordPress Core Weekly – Aug. 24-30, 2015

Welcome back to the weekly core development recap post, with highlights from Trac changesets and other development updates for 4.4. This week’s update covers changesets [33721][33820], Aug. 24-30, 2015. That’s a lot of changes, but there are a few that developers need to be especially aware of:

  • File restructuring: new class and functions files have been introduced, and existing files used as loaders for the new files for backwards compatibility.
  • File and class documentation enhancements: ensuring every file gets a standard file header, even if that file only contains a class that is itself documented.
  • Switching themes now takes menu locations into account so the new theme (maybe) gets the locations of the current theme.
  • New hooks introduced: 'invite_user' (Multisite users) and 'wp_verify_nonce_failed'.
  • The Twenty Sixteen theme is being developed on GitHub.

Now on to the firehose…

Administration

  • Bump h3 headings to h2 on various admin screens for better accessibility:
  • Network Admin: Hide the bulk actions checkbox for super admins. [33777] #28529
  • Avoid PHP notices in redirect_canonical() and _wp_menu_item_classes_by_context() if $_SERVER['HTTP_HOST'] is not set. [33775] #32229

General

  • Remove error from the query variables when cleaning up a URL in wp_admin_canonical_url(). [33770] #32847
  • Prevent unintended password change after clicking “Generate Password” and then “Cancel” when editing a user profile. [33766] #33419
  • When wp_json_encode() calls json_encode(), the latter will generate warnings if the string contains non-UTF-8 characters. No one likes warnings, so we need to do something about that. [33747] #33524
  • Add oEmbed support for ReverbNation. [33745] #33207
  • Remove rounded corners from “Choose from the most used tags” result in Tags meta box. [33742] #31560
  • Add some more data for shortcode unit tests. [33740] #33455
  • Allow these CSS properties in KSES: min-height', 'max-height', 'min-width', 'max-width' [33739] #31949
  • Pass option name to option and transient filters with dynamic names. [33738] #28402
  • In get_home_url(), import the $pagenow global to avoid having to check if it exists before comparing against it. [33736] #33545
  • In WP_Users_List_Table::single_row(), $actions is not always set before being used. [33735] #33491
  • foreach is a statement, not a function. [33734] #33491
  • Instead of [33713], allow WP_Posts_List_Table::get_bulk_actions() to check edit_posts AND delete_posts. [33733] #29789
  • TinyMCE: ensure the wordpress plugin is loaded before calling _createToolbar(). [33728] #33393
  • With a few modifications in wp-admin/menu.php, we can eliminate the extra logic for Post and Page menu registration. Instead, they can just declare menu_position on post type registration. [33723] #16865
  • WP_Query: add changelog for the title param after [33706] [33722] #33074

Restructured some files for separation of purpose, so class files only contain classes, functions files only contain functions, and the existing file loads the new files for backwards compatibility.

Taxonomy

Move WP_Tax_Query into class-wp-tax-query.php and functions into taxonomy-functions.php; taxonomy.php contains only top-level code and loads the new files. [33760] #33413

Posts

Move WP_Post into class-wp-post.php and functions into post-functions.php. post.php contains only top-level code and loads the new files. [33759] #33413

Roles

Move classes into their own files, and functions into its own:

  • class-wp-roles.php
  • class-wp-role.php
  • class-wp-user.php
  • capbilities-functions.php

capbilities.php contains only top-level code and loads the new files. [33752] #33413

HTTP

Move classes into their own files and functions into its own:

  • class-wp-http-cookie.php
  • class-wp-http-curl.php
  • class-wp-http-encoding.php
  • class-wp-http-proxy.php
  • class-wp-http-streams.php
  • http-functions.php

http.php contains only top-level code and loads the new files, so this is 100% BC if someone is loading http.php directly.

class-http.php requires functions from http.php, so loading it by itself wouldn’t have worked.

WP_Http remains in class-http.php. [33748] #33413

Meta

Move WP_Meta_Query into class-wp-meta-query.php and functions into meta-functions.php. meta.php contains only top-level code and loads the new files. [33761] #33413

Rewrite

Move WP_Rewrite into class-wp-rewrite.php, functions into rewrite-functions.php, and constants into rewrite-constants.php. rewrite.php contains only top-level code and loads the new files.

The rewrite functions have all kinds of cross-dependencies (like WP_Query), so loading the file by itself would have been bizarre (and still is). [33751] #33413

Comments

Move WP_Comment_Query into class-wp-comment-query.php, and functions into comment-functions.php. comment.php contains only top-level code and loads the new files. [33750] #33413

Users

Move WP_User_Query into class-wp-user-query.php and functions into user-functions.php. user.php contains only top-level code and loads the new files. [33749] #33413

Widgets

Move classes and functions into their own files:

  • class-wp-widget.php
  • class-wp-widget-factory.php
  • widget-functions.php

widgets.php contains only top-level code and loads the new files. [33746] #33413

Docs

It’s important for every file in WordPress, regardless of makeup or architecture, to have its own file header, even if the file contains nothing but a class. When parsed, files and classes are mutually exclusive and should be documented with this in mind. [33755] [33756] #33413

  • Bring the file header and class DocBlock summaries for class-wp-widget.php in-line with the intention of the docs standard:
    • File headers: What the file is
    • Class DocBlocks: What purpose the class serves. Mentioning the class name in the class DocBlock is redundant [33816] #33413
  • Add inline-docblocks for the require_once() calls that now bring in the WP_Widget and WP_Widget_Factory classes, as well as general core widgets functionality, as of [33746]. [33758] #33413
  • Add a file header description and @since version to wp-includes/widget-functions.php, introduced in [33746].
    Also adds sub-section headers per the inline documentation standards for syntax. [33757] #33413
  • Add a file header to wp-includes/class-wp-widget-factory.php, created when the WP_Widget_Factory class was moved to its own file in [33746]. [33756] #33413
  • Correct the hook docs for the user_profile_update_errors action. [33769] #33537
  • After [33764], fix docblock formatting for wp_list_categories(). [33765] #33460
  • Use proper array documentation formatting for wp_list_categories().
    This changeset also corrects a few parameter descriptions, and adds a few that
    were previously missing. [33763] #33556
  • Fix copy pasta in wp_cache_decr() doc block. [33809] #33548
  • The type for the $t_time parameter in the post_date_column_time filter docs should be string, not array. [33731] #33540
  • Document the default comment data arguments for wp_new_comment(). [33730] #32369
  • After [33698], wrap the time constants in a DocBlock template. [33737] #33397
  • Clarify the return description for wp_create_user() to illustrate that a WP_Error object will be returned on failure. [33725] #33321

Add changelog entries for a variety of hook doc parameters added in [33738]:

hook parameter changeset/ticket
set_site_transient_$transient $transient [33794] #28402
site_transient_$transient $transient [33792] #28402
pre_delete_site_option_$option $option [33789] #28402
pre_add_site_option_$option $option [33788] #28402
pre_site_option_$option $option [33785] #28402
transient_$transient $transient [33783] #28402
option_$option $option [33779] #28402
pre_option_$option $option [33768] #28402
pre_set_site_transient_$transient $transient [33793] #28402
pre_site_transient_$transient $transient [33791] #28402
pre_update_site_option_$option $option [33790] #28402
site_option_$option $option [33787] #28402
default_site_option_$option $option [33786] #28402
pre_set_transient_$transient $transient [33784] #28402
pre_transient_$transient $transient [33782] #28402
update_option_{$option} $option [33781] #28402
pre_update_option_$option $option [33780] #28402
default_option_$option $option [33778] #28402

Themes

  • Get the correct theme when template and stylesheet were both passed as arguments. Fixes a bug introduced in [21131] where $new_theme got set before the second argument was
    appropriately handled, causing the current_theme option to later always be updated to the parent theme’s name. [33815] #32635

Widgets

  • Improve/update escaping in default widgets:
    • wrap some variables in esc_attr() before echoing
    • replace some strip_tags() calls with sanitize_text_field()
    • call esc_url() when wrapping some URLs [33814] #23012
  • Improve/update escaping in WP_Widget_Pages. [33813] #23012
  • Switch back to using array_key_exists() instead of isset() for widget instance existence check.
    Reverts unnecessary change in [32602] since array_key_exists() does actually work with ArrayIterator objects.
    Merges [33696] to the 4.3 branch. [33721] #32474, #33442

Customizer

Comments

  • Fix the doc block syntax for the 'wp_get_current_commenter' filter. [33811] #33304
  • get_comment_count() currently increments awaiting_moderation when comments are in the trash. This occurs because case 0: will match any value passed to switch that is a string that isn’t specified in the list of cases. This is terrifying.
    Cases for 0 and 1 should be '1' and '0'
    Add unit tests for get_comment_count(). Currently, there are none. [33806] #33414

I18N

  • Favor using the consistent and agnostic string ‘Attach’ over ‘Attach to a post’ in the media list table. [33810] #33515
  • Make a period translatable. [33802] #33594
  • Switching themes: if the new theme doesn’t have nav_menu_locations defined, but the old theme does, copy the old theme’s nav_menu_locations into the new theme’s theme mods. [33808] #18588

Media

  • Improve the reliability of the crop returned by image_get_intermediate_size() and add a bunch of unit tests to tests/image/intermediate_size.php. [33807] #17626
  • When inserting an image into a post, the values in wp.media.controller.Library should not default to linking the image when no user settings are present.
    The default display setting value for link is now none. User settings persist and will override or confirm this value based on user actions. [33729] #31467

Posts, Post Types

  • In get_post_type_labels(), ensure that filtered labels contain all required default values. [33776] #33543
  • Don’t change the View Post button permalink in the sample permalink HTML when updating the slug on a published or future post. [33773] #32954
  • Pass taxonomy name to filters in get_adjacent_post(). [33805] #33568
  • Make post meta box toggles accessible. [33762] #33544

Multisite

  • Improve the efficiency of is_user_member_of_blog() by removing its use of get_blogs_of_user(). Adds additional tests. [33771] #32472
  • Add 'invite_user' action that fires immediately after a user is invited to join a site, but before the notification is sent. [33732] #33008

Taxonomy

  • In wp_list_categories(), ‘current_category’ should accept an array of values. [33804] #33565
  • Introduce $hide_title_if_no_cats parameter to wp_list_categories(). [33764] #33460
  • Rename param added to wp_list_categories() in [33764] to $hide_title_if_empty. [33767] #33565
  • Term Splitting: Switch to a faster cron unschedule process to benefit sites with thousands of affected jobs. Fix the cron hook name in the failsafe rescheduler. [33727] #33423
  • In WP_Query::parse_tax_query(), allow ‘cat’ and ‘tag’ querystrings to be formatted as arrays. [33724] #32454, #33532

Date/Time

  • Simplify the weeks-per-year calculation WP_Date_Query::validate_date_values(). [33803] #30845

Users

  • Bring network admin user searching to parity with single site user searching by wrapping search terms in asterisks. This means that searches don’t require an exact match and therefore significantly reduces friction when searching for users on the network admin screens. [33801] #32913

Bundled Theme

Correct license information in readme.txt.

Text Changes

  • Drop the hyphen from e-mail and standardize on email.
    The AP Stylebook changed this in 2011, and we’re woefully inconsistent, so let’s go with the standard. [33774] #26156

Upgrade/Install

Security

  • Add 'wp_verify_nonce_failed' action that fires when nonce verification fails. [33744] #24030
  • Fire the check_ajax_referer action on failure as well as success. [33743] #33342

Build Tools

Thanks to @azaozz, @BinaryKitten, @boonebgorges, @bordoni, @Cheffheid, @chipbennett, @danielbachhuber, @dd32, @DeBAAT, @dimadin, @DrewAPicture, @ebinnion, @egill, @eherman24, @ericlewis, @garza, @hauvong, @helen, @janhenckens, @jjeato, @jmayha, @joedolson, @joehills, @joemcgill, @johnbillion, @KalenJohnson, @kitchin, @liljimmi, @luciole135, @mako09, @MikeHansenMe, @miqrogroove, @morganestes, @niallkennedy, @nikeo, @obenland, @Otto42, @pavelevap, @pento, @peterwilsoncc, @rachelbaker, @rhubbardreverb, @sammybeats, @sboisvert, @scribu, @SergeyBiryukov, @Shelob9, @tyxla, @Veraxus, @vilkatis, @Viper007Bond, @voldemortensen, @welcher, @westonruter, @wonderboymusic, and @yamchhetr for their contributions!

#4-4, #week-in-core

WordPress Core Weekly

Hi everyone!

It’s time for WordPress Core Weekly (formerly known as Last Week in WordPress Core) again! There have been suggestions to change the name of these summary posts to stop confusions about being the last week of WordPress.

This updates covers all commits since last week up to today, October 15th. There has been much progress this week with lots of improvements to the WP_*_Query classes, fixes in the admin and of course the introduction of the Twenty Fifteen theme! The complete summary:

Admin

  • Add missing labels to category filter dropdowns. [29870] [29871] #29921
  • Differentiate between invalid and missing admin emails when adding a new site [29877] #17890
  • Multisite: Do not send a welcome notification when noconfirmation has been flagged [29880] #16235
  • Admin menu: [29898] #29806
    • Fix pinning after resizing the window.
    • Merge the two DOM ready callbacks in common.js
    • Fix the submenus position adjustment on focus.

Editor

  • TinyMCE: fix the ‘wpgallery’ plugin to use a placeholder for galleries when either the ‘wpview’ plugin or wp.mce is not loaded. [29883] #28756
  • Quicktags: move focusing the editor after inserting content to the end of the code blocks. [29884] #29944
  • Editor-expand: reset the editor height after the window is resized. [29886] #29952

Customizer

  • Change instances of “Theme Customizer” to just “Customizer”, as the Customizer isn’t necessarily theme-specific. [29903] #29947
  • Only POST dirty settings to preview to improve performance. [29905] #29983
  • Don’t trigger a change event if two unchanged object values are equal, second pass. [29907] #26061

Bundled Themes

  • Add an alt attribute with the site title for header images linked to the home page. [29842] #15926

Twenty Fifteen

Comments

  • Add aria-describedby attributes to comment_form(). [29846] #24148

External Scripts

  • Update jQuery UI to 1.11.1. [29847] #29833
    • Rename all files, remove the jquery.ui. prefix. Add old files to $_old_files.
    • Add and use non-minified files in /src.
    • Add grunt task to minify jQuery UI files.
    • (Non-minified files will not be shipped.)

Language Packs

  • Language packs: Remove translations when deleting a theme or a plugin. [29856] #29860

Internals

  • Handle deficiencies in PHP’s parse_url in older versions of PHP (<5.4.7) in WP_HTTP::make_absolute_url(). [29851] [29850] [29861] #28001, #29886
    • Correctly handle url’s containing url’s in WP_HTTP::make_absolute_url().
    • Correctly support Schemeless URLs in WP_HTTP::make_absolute_url() by respecting the ‘host’ field if present in the relative url.
  • New remove() method and some unit tests for the WP_Error class. @29854 #28092
  • Return an error when adding a term to a non-existent parent. [29867] #29614

Queries

  • Use the primary meta_query clause when parsing orderby in WP_Query. [29855] #16814
  • Introduce support for nested queries in WP_Meta_Query. [29887] #29642
  • Use only LEFT JOINs when a meta_query contains a NOT EXISTS clause. [29890] #29062
  • Introduce support for nested queries in WP_Tax_Query. [29891] #29718 #29738
  • Support EXISTS and NOT EXISTS in WP_Tax_Query. [29896] #29181
  • Support nested tax query syntax in redirect_canonical(). [29901] #29738
  • Avoid redundant table joins in WP_Tax_Query. [29902] #18105

Thanks to @rianrietveld, @tschutter, @netweb, @joedolson, @bramd, @Fab1en, @ocean90, @stephenharris, @boonebgorges, @georgestephanis, @jesin, @afercia, @miqrogroove, @avryl, @mboynes, @transom, @DrewAPicture, @johnrom, @matt, @iandstewart, @iamtakashi, @obenland, @cainm, @kristastevens, @karmatosed, @chellycat, @lancewillett, @kwight, @davidakennedy, @otto42, @jakub.tyrcha, @studionashvegas, @tareq1988, @westonruter for their core contributions!

Revisions covered: [29842] to [29907]. 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.1.

#4-1, #week-in-core

Summary for 5/21, Agenda for 5/28

Summary of 5/21 dev chat (IRC log):

General

  • Posts like the i18n goals one serve as a great model for anybody who has ideas for a feature or component roadmap, whether that’s within one cycle or longer term: a list of concrete goals that can be divided up into specific tasks.
  • The make/* blogs should be used as much as possible for discussions and progress updates. Teams that have been using separate P2s but should consider using the make.wordpress.org instead for wider reach and more active participation from the community.
  • Keep in mind that plugins are supposed to encourage rapid and possibly wild experimentation – please do not discourage that.
  • Think of meetings as blocked out times where you can more reliably get a group together and get unstuck as needed, but we should take advantage of async (Trac, P2) and adhoc (IRC outside of meeting) discussion as much as possible.

Team Updates

  • i18n goals for 4.0 have been posted, @nacin is seeking people to help with a lot of it. @yoavf, @kovshenin, @iandunn, @coffee2code, and @otto42 have done or will do some of the i18n tasks.
  • JSON REST API was given another week to collate a detailed compare-and-contrast with the other available APIs, including the JSON API plugin and Jetpack/.com’s API, and proven client implementations.
  • Media Grid has a narrowed scope for 4.0 inclusion: something more visually driven than the standard list table, much like theme browser brought to themes and is being investigated for plugins in 4.0. Will also fix some long-standing issues that were brought in with 3.5.
  • Editor improvement ideas: @markjaquith and @avryl have put together a proof-of-concept plugin that we should smooth out and make a decision on.

Agenda for 5/28:

  • Make final decision on JSON REST API.
  • One sentence updates from various groups – i18n, media grid, plugins, oEmbed, etc. Come prepared.

Please propose any other agenda items in the comments below.

#4-0, #agenda, #dev-chat

Improving the Plugins page

The WordPress Plugins page has barely changed in 5 years or more – compare WP 2.7.1 with 3.9.1.

The very first page seen by a new user who clicks on the Plugins tab is a list view showing two installed plugins. The main thing thing that has changed since 2.7 is that the way to find and install new plugins has become less obvious.

Similarly, the plugin-install page has barely changed in that time: WP 2.7.1 and 3.9.1.

The default page is very much geared towards maintenance by established users. The most common interaction is probably deactivating and reactivating plugins for troubleshooting – certainly a necessary task, but I think it misses a good opportunity for helping people to find and use the plugins they need.

There are a number of improvements that could be made with relatively minor changes:

Improve the experience for new and infrequent users.

  • The obvious fix here would be to make the path for discovering and installing new plugins much more obvious than the “Add New” link. Perhaps even go as far as making plugin-install.php the default page.
  • The Search Installed Plugins box on plugins.php is easily mistaken for a plugin directory search. Either make it less confusing, or use a unified search.
  • When searching for plugins in the directory via plugin-install.php, tailor the results to the current WP version. Give more weight to those that are compatible with the current version, and/or filter out those that are likely to be incompatible.

Help users to discover the plugins they need, especially the most robust and well-maintained.

  • On the Add New page, the most common tags in the cloud are “widget”, “post” and “plugin”. It’s next to useless. Replace it with a well-defined list of categories more in line with common needs: “contact forms”, “image galleries”, “security” and so on.
  • Improve the quality of plugin directory search results generally. Incorporate things like ratings, support stats, age, usage stats, and update frequency in the relevancy scores.
  • Augment or replace version compatibility votes with stats based on active installs per WP version.
  • Re-evaluate the tabs on the Install Plugins page. Is “Newest” helpful? Should “Popular” or “Featured” have a summary on the main page?
  • Improve the algorithm used for averaging ratings, to smooth out errors for plugins with only a handful of ratings.
  • Change the columns displayed in Search Results. “Version” doesn’t need a column; but compatibility and age ought to be shown.
  • Also show compatibility for installed plugins #27699
  • Improve the ordering and filtering possible in the plugin search API #12696 and #27316

Improve the way detailed information is given about plugins.

  • Either eliminate the thickbox for the plugin details, or make it more consistent with the theme browser (allow next/prev)
  • Add a Details view for installed plugins #17902
  • Show reviews in the detailed view #22599
  • Show contributors in the detailed view #19784
  • Show the plugin’s banner in the detailed view, and generally make it more consistent with what’s on the web site.

Help and encourage developers to publish and maintain their plugins.

  • Support screenshots, logos, or banners in the search results, installed plugin list and plugin directory.
  • Do a better job of handling ratings, reviews, updates, and support stats, especially when determining search ordering and popularity.
  • Improve the profile page to list version compatibility, support stats, and other useful info for all your plugins.
  • Add a version requirement check and/or upgrade prompt #26909 and #27323

And finally there are some other tickets suggesting improvements and fixes that could use a second look:

  • #28085 – Recently Updated plugins view (recently updated installed plugins)
  • #20578 – allow delete without uninstall
  • #27110 – allow filtering the plugin list
  • #26202 – bugfix for thickbox title truncation
  • #27623 – search results for a single space
  • #27994 – handling of automatic plugin deactivation in the event of an error

I’m working on the API side, starting with improvements to search quality. There are tickets above for many of these items already. If you’d like to help out, keep an eye on the Plugins Component in trac, open and help with tickets. Or leave a comment here with your suggestions if you’re interested.

 

 

 

 

 

#plugins

Last Week in WordPress Core

Hello there! This is Last Week in WordPress Core for the week of April 8-April 14. Similar to last week, commits are included up to RC2, which was released today. In addition, maintenance releases 3.8.3 and 3.7.3 are available, and automatic updates are rolling out.

Customizer

  • Widgets: Properly handle widget settings when activating a previewed theme. [28124] #27767
  • Widgets: Account for a sidebar with no container to which classes can be added. [28100] #27780
  • Custom Headers: Fix image ordering. [28102] #27791
  • Custom Headers: Fix cropping when working with large images. [28101] #27790
  • Add color scheme support for widget choosers. [28122] #27793

Theme Installer

  • Improve route handling and make ?theme= work. [28123] #27708
  • Revert to proxying through PHP for WordPress.org API requests to ensure we have valid installation nonces. [28126] #27798

TinyMCE

  • Update TinyMCE to 4.0.21.1. [28066] #27744
  • Update TinyMCE paste plugin to the latest development version. Improves Pasting from Word to remove inline comments and change tracking. [28089] #27771
  • Ensure vertical resizing and menubar show/hide are set to default for each TinyMCE instance. [28059] #27724
  • Stabilize MediaElement within TinyMCE, and avoid adding undo steps when the body of a wpView changes. [28084] #27389
  • Improve fallback compatibility for wpViews with IE7 and 8. [28062] [28063] #27546

Media

  • In the Image Details modal, remember the last state of the advanced toggle. [28125] #27366
  • Add hooks for wpeditimage TinyMCE plugin and Image Details modal. Includes wp.media.events, which is intended to be a global media event bus. [28095] #27698
  • Apply new add_image_size() cropping preferences to all sizes when image is saved in editor. [28072] #19393
  • Fix tabbing out of the title field on Media->Edit Media screen. [28069] [28070] #27750

Internals

  • Updates: Add a TTL to core update checks to allow us to narrow the 12-hour update window. [28129] #27772
  • User Query: Don’t blindly re-append new meta queries for capabilities. [28087] #21119
  • Avoid stomping of bulk postdata inside the bulk_edit_posts() loop. Reverts [27990], which did not fix it for authors and comment/ping status. [28113] #27792
  • RTL fixes for Login screen ([28096] #27784), Themes screen ([28104] #27779), TinyMCE ([28094] #27773), and feature pointers ([28107] #27778).

Externals

For the complete list of commits to trunk, check out the log on Trac. Release is scheduled for this Wednesday, so, the best way to help is to test! Please let us know if you run into problems in the Alpha/Beta forums or on trac.

Thanks to @azaozz, @dd32, @DrewAPicture, @ehg, @GaryJ, @gcorne, @helen, @jesin, @johnbillion, @kerikae, @kpdesign, @mattheu, @matveb, @melchoyce, @morganestes, @nacin, @ocean90, @Otto42, @pavelevap, @redsweater, @ryelle, @scottlee, @SergeyBiryukov, @siobhan, @westonruter, @wonderboymusic, and @yoavf for their help this week!

#3-9, #week-in-core

Last Week in WordPress Core

Hey Everyone! This is Last Week in WordPress Core for the week of March 10–16. It’s been a busy week after Beta 1. Here are some highlights from the week:

  • Appearance: Bring the theme browsing experience from 3.8 to the theme installer. [27499] #27055
  • Customizer: Add header image uploads with cropping to the customizer. [27497] #21785
  • Plugin Management: Restyle the plugin install details modal to match the rest of the admin. [27559] #26952
  • Edit Post: Correct the “View Post” button link when changing a post slug. [27508] #16477
  • Admin Colors: Revert [27203], fix color scheme stylesheets. Restores [27111]. [27515] #27175; see #20729.
  • Editor: figcaption should not be treated as a block-level element by wpautop(). [27527] #25646
  • TinyMCE: add internal command and shortcut (Alt+Shift+X) for toggling <code>. Define a button that can be added to any toolbar as wp_code. [27545] #6331
  • Permalink Settings: Don’t show “update your .htaccess now” if nothing needs to change. [27549] #19268.
  • Query: In WP_Query::get_queried_object(), account for pre_get_posts by checking for tag when tag_id isn’t present. Tags still need to be rolled up into tax_query.  [27511] #27362
  • Filesystem: Update request_filesystem_credentials() to handle the correct ssh value of FS_METHOD. [27546] #27265

Widget Customizer:

  • Move widget area sections to bottom, as a theme can have a lot of widget areas and we don’t want to bury other sections. [27541] #27401
  • Introduce a customizer processing state to prevent saves while updates are occurring. [27540] #27390
  • Make temp hooks permanent. New hooks are: dynamic_sidebar_before, dynamic_sidebar_after, dynamic_sidebar_has_widgets and is_active_sidebar. [27543] #25368

Media:

  • Start embedding functional audio/video players in the editor, instead of placeholders. [27528] was reverted in [27530] but added back this week in [27615]. Whitelist media types by browser. [27539] [27542]. See also [27534] [27535] [27536] [27537] [27538] and others. Everything is contained in #27389.
  • The Image Editor should apply changes to custom image sizes by checking registered image sizes. [27522] #19889
  • Remove Qik from the oEmbed provider list as it’s shutting down. [27526] #27302
  • Smooth out some display and race condition issues with the media modal loading spinner. [27516] #24859

XML-RPC:

  • Avoid saving slashed data in XML-RPC’s wp.setOptions. [27551] #22936
  • Allow query strings for servers in IXR_Client and WP_HTTP_IXR_Client. [27552] #26947
  • Include sticky in the struct returned from metaWeblog.getRecentPosts. Using wp.getPosts is preferred and non-WP XML-RPC APIs are no longer actively maintained. This is simply for parity with existing MW methods. [27553] #26679
  • In wp.editPost, Remove all terms in a taxonomy when an empty array is explicitly passed. [27554] #26686

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. The goals for this week — besides releasing Beta 2 — are two-fold:

Thanks to @aubreypwd, @avryl, @azaozz, @bravokeyl, @cfinke, @danielbachhuber, @DrewAPicture, @ehg, @enej, @ericmann, @gcorne, @helen, @jayjdk, @jnielsendotnet, @johnpbloch, @joostdevalk, @jstraitiff, @JustinSainton, @kadamwhite, @klihelp, @kovshenin, @ldebrouwer, @mattonomics, @matveb, @mauryaratan, @maxcutler, @mcsf, @MikeHansenMe, @nacin, @nendeb55, @ocean90, @oso96_2000, @Otto42, @paulwilde, @pento, @rodrigosprimo, @SergeyBiryukov, @soulseekah, @tlovett1, @westonruter, @wonderboymusic, and @wpsmith for their help this week!

#3-9, #week-in-core

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

Migration update: cron importer

Following last week’s update about the WP_Importer_Cron approach to writing importers and running import jobs, I’ve been steadily transitioning code from the current non-stateful, single-execution plugin to a stateful, step-wise process (#327).

At the same time, I needed to separate presentation from logic/backend processing (#331) — something that @otto42 also recommended — in two ways:

  • Removing direct printf(), echo statements that were used by the WXR importer (example)
    and changing them to WP_Error objects (example of fatal error; of non-fatal warning)
  • Handling uploads and UI choices in a separate class

Why must this be done now? Well, asynchronous tasks differ from PHP scripts directly responding to a browser request — we can’t depend on having access to submitted $_POST data, nor can we directly pipe output to the user. This change would also make it easier to understand what the code is doing from reading it, and to test programmatically.

One dilemma I’ve encountered: how best to store the parsed import XML file. Since each step of the import (users, categories, plugins, etc) runs separately, we must…

  1. store all of the parsed data in variables, which are serialized into an option between runs
    (obviously, a huge amount of data for which this may not be the most robust or efficient method);
  2. re-parse the XML on each run
    (currently, parsers handle all parts of the XML at once, which means unnecessarily duplicated effort and time);
  3. modify the parsers to parse only part of the XML at a time; or
  4. split the XML file into chunks based on their contents (authors, categories, etc) and then feed only partial chunks to the parser at a time.

Any thoughts? Solving this problem could also help the plugin deal with large XML files that we used to need to break up by hand before importing. (The Tumblr importer doesn’t have the same problem because there is no massive amount of data being uploaded at the beginning.)

I haven’t yet finished transitioning all the steps; I’m afraid it won’t be possible to use this just yet. Before next Monday, I should have a downloadable plugin that’s safe to try.

#importers, #migration-portability, #weekly-update

Migration update: WXR importer

This week, I began work on the next phase of my project: fixing up the WXR importer plugin. A number of developers, including Jon Cave, Peter Westwood, and Andrew Nacin have been maintaining this plugin since at least May 2010.

I forked the code from the plugins repository into my GSoC Subversion directory in preparation. It’s taken a while to test this (manually) against XML files from existing sites, so that I can see under what circumstances it fails to complete the import or perform to expectations, and what can be done. Trac tickets and forum posts have been informative as well. (See the linked posts for the results and observations.)

I’ve also run the unit tests that apply to the importer plugin; however, the test cases are generally small (indeed, the biggest XML test case is 26 KB, titled small-export.xml) and don’t trigger the kinds of issues that importing dozens or hundreds of posts and attachments—with WXR files of megabytes in size—does.

So, the first task at hand is breaking up the process—which currently executes in one step with little indication of progress—into discrete chunks that can run in separate, stateful (stepwise) requests.

A chat with my mentors has pointed me in the direction of WP_Importer_Cron, which was first developed for other importers that need to make external API calls (e.g. Tumblr Importer) potentially subject to rate constraints. There are some parallels between “external API calls” and “remote attachment fetching”, which is why this can be a suitable approach for fixing the timeout issues that present with the current WordPress importer. After the process is discretized, showing progress (an enhancement long overdue) will be easier.

#migration-portability, #weekly-update