Week in Core: Sept. 21-27, 2015

Oh Snap!, it’s time to usher in a new edition of Week in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.! If you have the time, throw a house party with some friends and read the full force of changes on Trac; if not, don’t sweat it — take simple pleasure in these highlights.

This post covers changesets [34362][34658], committed during Sept. 21–27, 2015. Let’s give a hi-five and some TLC to the 102 contributors for a combined 296 updates! Together, we’re making WordPress nice & smooth.

News you can use

The Flow Patrol is documenting visual changes to the UIUI User interface, and adding new keywords to TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.. Developers (and ticketticket Created for both bug reports and feature development on the bug tracker. reporters) can help by taking before and after screenshots when your code affects the UXUX User experience.

Big changes for the default comments form are now in trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision., including the form layout and the order hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. are fired. Have feedback? Leave it on ticket #29974.

Speaking of big changes, Term MetaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. is here! Are you ready?

It’s a big change week, including a (possible) Customizer roadmap, and updates to Twenty Sixteen, oEmbed, and Responsive Images. Lots of good reading available here!

Code changes

Actions, filters, functions, and parameters

  • XML-RPC: In wp_xmlrpc_server::wp_getComments(), allow post_type to be passed as part of $struct. [34575] #20026
  • Comments: add __get() and __set() to WP_Comment to provide BC. [34583] #27571
  • Comments: in WP_Comment::get_children(), accept an array so that the values for format, status, hierarchical, and orderby can be passed, instead of just format[34569] #8071
  • Comments: Introduce 'duplicate_comment_id' filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output.[34536] #9775
  • Comments: in comment_form(), add args for cancel_reply_before and cancel_reply_after to eradicate remaining hard-coded HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. bits. [34523] #23797
  • Comments: add a 'comment_excerpt_length' filter to get_comment_excerpt()[34520] #27526
  • Comments: add date column to WP_Comments_List_Table to allow sorting and to break out the date/time from the comment content column. [34504] #15520
  • Comments: Introduce template functions for comment navigation: [34367] #29808, #30589
    • get_the_comments_navigation() and the_comments_navigation() for navigation to the next and previous page of comments.
    • get_the_comments_pagination() and the_comments_pagination() for paginated navigation between pages of comments. Uses paginate_comments_links().
  • Taxonomies: Introduce 'the_category_list' filter. [34625] #9227
  • Taxonomies: Pass the post ID to the 'get_the_categories' filter. [34624] #9227
  • Updates: Introduce 'send_update_notification_email' filter which controls whether an update notification email is sent for background updates. [34543] #33932
  • RevisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.: add a 'wp_prepare_revision_for_js' filter. [34541] #28627
  • Users: Introduce $paged parameter for WP_User_Query as an alternative to using $offset.
  • Users: add __unset to WP_User[34380] #20043
  • Links: in get_adjacent_post(), add a "get_{$adjacent}_post_excluded_terms" filter. [34528] #9571
  • Menus: Add $depth as a parameter in the 'nav_menu_item_args' filter. [34507] #29417
  • Menus: Add a 'nav_menu_item_args' filter to Walker_Nav_Menu::start_el(). [34471] #29417
  • Posts: Make the 'register_post_type_args' filter introduced in [34242] available for built-in post types too. [34451] #17447
  • Media: Add new functions, get_the_post_thumbnail_url() and the_post_thumbnail_url()[34373] #33070
  • Media: Add a new function, wp_get_attachment_image_url(), which is a shortcut for wp_get_attachment_image_src() — same function signature, but returns just the URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org based on $size[34372] #33878
  • HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands.: Add some new Cookie helper functions: [34369] #33711
    • wp_remote_retrieve_cookies( $response )
    • wp_remote_retrieve_cookie( $response, $name )
    • wp_remote_retrieve_cookie_value( $response, $name )

Miscellany

  • Media: Add size-$size class to <img> in wp_get_attachment_image(). [34629] #32093
  • Notices: Add styles for use against white backgrounds. [34365] #32244
  • WPDB: Make sure we don’t run sanity checks on DB dropins. [34655] #33501
  • WPDB & Comments: After [35461], remove ‘page_comments’ from database. [34562] #8071
  • Canonical: after [34272], don’t redirect rewrite endpoints on attachment URLs when pretty permalinks are enabled. [34643] #19918
  • Testing: Introduce WP_UnitTestCase::assertNotWPError() for when a test needs to assert that something is, well, not a WP_Error. [34638] #33978
  • Widgets: Restore and deprecate the WP_Widget_Recent_Comments::flush_widget_cache method, removed in [34580]. [34622] #25556
  • Customize: Prevent showing “Front Page” and “Posts Page” states for pages in list table when $show_on_front is not “page”. [34605] #34004
  • Comments: Improve post field lazyloading for comments. [34599] #27571
  • Comments: In comment_form(), move the comment textarea to the top for logged-out users when replying, improves keyboard/focus navigation. [34525] #29974
  • Comments: In get_comment_statuses(), also return trash[34524] #30965
  • Plugins: Don’t request all fields via plugins_api( 'plugin_information' ) for pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party installs and update checks. [34598] #34030
  • Profile: on user-new.php, don’t allow the password fields to be hidden. When hidden, you can’t add a user. [34582] #15115
  • Plugins: Implement ‘Recently Active’ functionality for networknetwork (versus site, blog)-wide plugins in the Network Adminadmin (and super admin)[34551] #20468
  • Multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site: Don’t limit site titles to 50 chars. [34455] #33973

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:

Props

Thanks to @5um17, @adamsilverstein, @afercia, @apokalyptik, @atomicjack, @austinginder, @bjornjohansen, @boonebgorges, @bravokeyl, @brentvr, @chriscct7, @coffee2code, @couturefreak, @daniloercoli, @dannydehaan, @dbru, @dd32, @dimadin, @dipeshkakadiya, @DrewAPicture, @elusiveunit, @ericlewis, @ericmann, @fjarrett, @flixos90, @fonglh, @garyc40, @gizburdt, @grvrulz, @helen, @hrishiv90, @hugobaeta, @icete, @jakubtyrcha, @Japh, @jeichor, @jeremyfelt, @jesin, @jmayhak, @johnbillion, @johnjamesjacoby, @johnpbloch, @joostdevalk, @jorbin, @jshreve, @jtsternberg, @jubstuff, @kadamwhite, @KevinB, @koke, @kucrut, @ldinclaux, @leemon, @manolis09, @markoheijnen, @mdawaffe, @melchoyce, @metodiew, @micahwave, @MikeHansenMe, @MikeSchinkel, @miyauchi, @mordauk, @mrmist, @Netweb, @niallkennedy, @NickDuncan, @nikeo, @nprasath002, @obenland, @ocean90, @pareshradadiya, @paulwilde, @pento, @prasad-nevase, @rachelbaker, @ramiy, @rmccue, @ronalf, @ruudjoyo, @sam2kb, @samuelsidle, @sebastianpisula, @SergeyBiryukov, @shedonist, @Shelob9, @sirzooro, @sjmur, @SteveHoneyNZ, @swissspidy, @tellyworth, @Thaicloud, @theode, @Tmeister, @Toro_Unit, @tyxla, @umeshnevase, @Viper007Bond, @walterebert, @westonruter, @wmertens, and @wonderboymusic for their contributions!

#4-4, #week-in-core