Week in Core: Sept. 28 – Oct. 11, 2015

Welcome back to the latest issue of Week in Core, covering changes from Sept. 28 – Oct. 11, 2015, changesets [34659][35029]. Here are the highlights:


See that ↑ right there? That’s an oEmbed. And it’s loaded from inside this site.

Feature Plugins Merged

The Responsive Images, oEmbed Provider, and the “baby” REST API feature plugins have been merged into core. Grab the latest version of trunk and test them out.

WordPress logo with wordmark below

Responsive images in your posts. Just upload and insert!

Potent Notables

These changes were big enough to merit their own blog posts:

Deeper Reading

Some commits pack in a lot of info, from detailed background to best practices in using hooks. Here are a few worth reading the entire commit message:

  • WP_Term class introduced [34997] #14162
  • Fix scalability performance problem for previewing multidimensional settings in the Customizer. [35007] #32103
  • Ensure that wp.customize.Widgets.savedWidgetIds is defined up front. [34883] #33901
  • The history and implementation of oEmbeds. [34903] #32522
  • Improve role-related arguments in WP_User_Query. [34875] #22212
  • Use wp_installing() instead of WP_INSTALLING constant. [34828] #31130
  • Introduce *_network_option functions for Multisite installs. [34777] #28290
  • Ensure that comment permalinks reflect pagination. [34735] #34068, #34073

Code Changes

Functions, hooks, and parameters, oh my!

  • Multisite: Adjust _network_option() parameter order, $network_id is first. [35024] #28290
  • Multisite: Allow for a blog_upload_space setting of 0 to restrict uploads. [35016] #19538, #34037
  • Multisite: Introduce get_subdirectory_reserved_names(), which returns a filterable list of reserved subdirectory site names. [34854] #33615
  • Template: Introduce a new class_form argument in comment_form(), allowing customization of the form class attribute. [34871] #34170, #23851
  • Template: Make it possible to both add and remove items from the page templates list using the theme_page_templates filter. [34995] #13265, #25879
  • Template: Rename the $id parameters in the_permalink(), get_the_permalink(), and get_permalink() to $post. [35001] #34234
  • Template: Pass the $post parameter to the the_permalink filter. [35002] #34234, #23882
  • Template: Introduce a new class_form argument in comment_form(), allowing customization of the form class attribute. [34871] #34170, #23851
  • Terms: Don’t require a $taxonomy to be specified in get_term_field(). [35028] #34245
  • Terms: Return WP_Post objects from wp_get_object_terms(). [34999] #14162
  • Media: Introduce the admin_post_thumbnail_size filter, which enables manipulation of the image size used to display the post thumbnail in the ‘Featured Image’ meta box. [35022] #28512
  • Media: New and updated media functions as part of Responsive Images feature plugin merge: [34855] #12, #33641
    • wp_get_attachment_image_srcset_array()
    • wp_get_attachment_image_srcset()
    • wp_get_attachment_image_sizes()
    • wp_make_content_images_responsive()
    • wp_img_add_srcset_and_sizes()
    • wp_make_content_images_responsive()
    • wp_get_attachment_image()
    • get_media_embedded_in_content()
  • Permalinks: Add $id parameter to the_permalink(), for consistency with get_permalink(). [34982] #23882
  • Embeds: Rename the $return parameter in wp_filter_oembed_result() to $result to provide better context on what is being filtered. [34974] #32522
  • Embeds: Combine the oembed_minwidth and oembed_maxwidth filters into one, similar to how the existing oembed_defaults works for width and height. [34972] #32522, #34227
  • Administration: Add the ability to pass an array of screen IDs to add_meta_box() and remove_meta_box(). [34951] #15000
  • Posts: Add the pre_get_lastpostmodified filter to get_lastpostmodified(). [34935] #34205
  • Passwords: Move the code for creating password reset key into a new function, get_password_reset_key(), and use it in retrieve_password(). [34923] #34180
  • Revisions: Pass the $post parameter to the _wp_post_revision_fields filter. The _wp_post_revision_fields() function now also accepts a WP_Post object as part of this change. [34917] #13382
  • Revisions: Add a wp_post_revision_title_expanded filter. [34842] #9681
  • Revisions: Also pass the $revision post object to the wp_prepare_revision_for_js filter, introduced in [34541]. [34832] #28627
  • Add an optional $description parameter to status_header() so custom HTTP status descriptions can be provided. [34914] #21472
  • Meta Boxes: add an action, post_submitbox_minor_actions. post_submitbox_misc_actions already exists. Pass $post to both for context – avoids having to check for a global post. [34895] #26267
  • Introduce wp_get_server_protocol() to DRY protocol parsing logic and make adding more protocols, like HTTP/2, easier. [34894] #34131
  • List Tables/WP_Screen: in WP_Screen, add methods to store, retrieve, and render screen reader text, primarily used by list table screens. [34891] #32147
  • Login: Pass the $errors object as a parameter to the lostpassword_post hook. [34885] #32116
  • Transients: Add (then rename) new filters: [34865] [34877] #21330
    • expiration_pre_set_transient_$transient => expiration_of_transient_$transient
    • expiration_pre_set_site_transient_$transient => expiration_of_site_transient_$transient
  • Shortcodes: Pass the name as context for shortcode_atts_{$shortcode}. [34868] #34167
  • XML-RPC: allow wp_xmlrpc_server::wp_getPosts() to receive s as a filter. [34860] #25406
  • Installation: Introduce wp_installing() and use it in place of WP_INSTALLING constant. [34828] #31130
  • Introduce ‘page_of_comment’ filter. [34808] #13939
  • Users: Introduce the users_list_table_query_args filter, for modifying the WP_User_Query arguments used within the prepare_items() methods in the users list tables. [34796] #25360
  • Plugins: Remove the unnecessary dynamic prefix used in the plugin_action_links filter name, and in those of its brethren. This way, network_admin_plugin_action_links gets listed as a separate filter. [34786] #34117
  • Menus: Introduce the wp_add_nav_menu_item action, fired immediately after a new nav menu item has been added. [34769] #30983
  • Menus: Add 'submenu_file' filter for the file of an admin menu sub-menu item. [34722] #24531
  • Themes: Introduce three new arguments for get_the_post_navigation(): in_same_term, excluded_terms, and taxonomy. [34715] #32618
  • Users: Introduce the wp_dropdown_users_args filter, making it possible to filter the arguments for wp_dropdown_users() before the query is run. [34692] #19867
  • Archives: Allow wp_get_archives() to accept post_type as an arg. [34686] #21596
  • Authors: Introduce get_the_author_posts_link(), which returns the HTML link to the author page for the current post’s author. [34677] #30355
  • Widgets: Pass $instance to the widget_nav_menu_args filter in the Custom Menu widget. [34662] #33944
  • Dashboard: Introduce the dashboard_recent_drafts_query_args filter, making it possible to manipulate the post query arguments used in the ‘Recent Drafts’ dashboard widget. [35003] #8243
  • Deprecate force_ssl_login(), which is simply a wrapper for force_ssl_admin() and is not used in core. [34700] #34011
  • Deprecate create_empty_blog() which has never been used in core. [34753] #34120


  • External Libraries: update plupload to 2.1.8. [35019] #34251, #22403
  • External Libraries: update json2.js to the 2015-05-03 version. [34863] #26913
  • Use PHP7’s random_int() CSPRNG functionality in wp_rand() with a fallback to the random_compat library for PHP 5.x. [34981] #28633
  • Multisite: Make “Create a New Site” link consistent with other “Add New” links. [34979] #34179
  • Database: After [34529], if a compatible termmeta table is found on database upgrade, convert it to utf8mb4 collation. [34978] #34224
  • WPDB: Allow null values in the CRUD functions. [34737] #15158
  • Users: On the Users list table, show all the roles of a user in a comma-separated list if they have more than one role. This prevents role obfuscation in situations where a user has had more than one role programmatically assigned to them. [34963] #22959
  • Make $blog_id explicitly global. [34961] #34217
  • WP_User_Query role improvement redux. [34959] #22212
  • Search: Allow excluded keywords when searching posts. [34934] #33988
  • Build Tools: upgrade grunt-browserify to ~4.0.0 and remove the watch task for browserify, which has its own internal watcher. Run npm install to update. [34888] #31911
  • Templates: Add single-{post_type}-{post_name}.php to the top of the template hierarchy for single posts. [34800] #18859
  • Multisite: Provide better UI when a main site’s /blog prefix is changed. [34749] #12002
  • Comments: Trash blacklisted comments by default. [34726] #7051
  • Permalinks: Add pretty permalinks for unattached attachments. [34690] #1914
  • Rewrite: Redirect attachment URLs when their slug changes. [34685] #34043
  • Rewrite: When redirecting old slugs, include URL endpoints. [34659] #33920
  • RSS Widget: add a class, rss-widget-icon, to the RSS icon to allow devs to hide it. Not going to remove to not break visual BC. [34683] #22010
  • Edit: Remove the redundant “View Post” button-link and link the sample permalink. [34670] #18306


Thanks to @adamsilverstein, @afercia, @akibjorklund, @alecuf, @alisspers, @amandato, @ankit-k-gupta, @austinginder, @azaozz, @barryceelen, @barrykooij, @benjaminpick, @bobbingwide, @boonebgorges, @bpetty, @ch1902, @ChaseWiseman, @chipbennett, @chriscct7, @chriscoyier, @ChrisMKindred, @chrisvendiadvertisingcom, @Clorith, @cmmarslender, @codebykat, @codfish, @coffee2code, @coliff, @danielbachhuber, @davidbhayes, @davidbinda, @dboulet, @dd32, @Denis-de-Bernard, @desrosj, @DH-Shredder, @dimadin, @dipeshkakadiya, @dlh, @dmchale, @dmenard, @drebbitsweb, @DrewAPicture, @eliorivero, @ericjuden, @ericlewis, @ericpedia, @extendwings, @F4rkie, @flixos90, @frozzare, @fsylum, @GaryJ, @gezamiklo, @gounder, @GregLone, @gwinhlopez, @hakre, @helen, @hubdotcom, @hugobaeta, @hurtige, @iamfriendly, @igmoweb, @ironpaperweight, @iseulde, @janhenckens, @japh, @jaredcobb, @jaspermdegroot, @jdgrimes, @jdolan, @JeffMatson, @jeremyfelt, @jim912, @jjeaton, @jmayhak, @jmusal, @joedolson, @joehoyle, @joemcgill, @johnbillion, @JohnDittmar, @johnjamesjacoby, @jonathanbardo, @joostdevalk, @jorbin, @joshkadis, @jrfnl, @juliobox, @justdaiv, @justinsainton, @kadamwhite, @karinedo, @kawauso, @kellbot, @kingkool68, @kokarn, @kraftbj, @kwight, @laceous, @lessbloat, @madalinungureanu, @markoheijnen, @matrixik, @mattbagwell, @mattheu, @maxcutler, @mazurstas, @mdgl, @mdmcginn, @mehulkaklotar, @melchoyce, @meloniq, @mgibbs189, @micahmills, @michael-arestad, @MikeHansenMe, @miqrogroove, @misterunknown, @mordauk, @mrahmadawais, @nacin, @natewr, @nbachiyski, @neoscrib, @netweb, @nikv, @norcross, @obenland, @ocean90, @oso96_2000, @paulwilde, @pavelevap, @pento, @peterwilsoncc, @pfefferle, @phh, @pkevan, @pollyplummer, @pushred, @quasel, @QWp6t, @rachelbaker, @ramay, @redsweater, @rilwis, @rmccue, @ryanmarkel, @ryelle, @sabreuse, @sarciszewski, @scribu, @SergeyBiryukov, @serpent7776, @shelob9, @shprink, @side777, @simonlampen, @sirbrillig, @smerriman, @solarissmoke, @sorich87, @spacedmonkey, @spmlucas, @stephenharris, @swissspidy, @tapsboy, @tevko, @tfrommen, @thenbrent, @thiago-negri, @tivnet, @tlovett1, @tobych, @Toddses, @tomsommer, @tott, @traversal, @tryon, @tyxla, @umeshnevase, @utkarshpatel, @walterbarcelos, @webord, @welcher, @westonruter, @wonderboymusic, @wpsmith, @wturrell, and @zrothauser for your contributions!

#4-4, #week-in-core