Commit Graph

22458 Commits

Author SHA1 Message Date
Jeremy Felt
1e9f495a18 Multisite: Use get_sites() in get_blogs_of_user().
Previously, we looped through all of the site IDs found via user meta and ran `get_blog_details()` for each site. Now, we can pass all of the site IDs at once to `get_sites()` and receive full `WP_Site` objects.

To avoid possible issues with return type, sites are still processed into a standard object that also has a `userblog_id` property attached. Nothing is changed for non-multisite configurations.

Props flixos90.
Fixes #37061.

Built from https://develop.svn.wordpress.org/trunk@38682


git-svn-id: http://core.svn.wordpress.org/trunk@38625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 04:35:27 +00:00
Jeremy Felt
5c038aefb3 Multisite: Ensure a consistent WP_Site return from get_site_by_path().
It is possible to short circuit `get_site_by_path()` using the `pre_get_site_by_path` filter. When this happens and a standard site object is provided, we can make sure it is upgraded to a proper `WP_Site` object before passing it on.

Props flixos90.
Fixes #37053.

Built from https://develop.svn.wordpress.org/trunk@38681


git-svn-id: http://core.svn.wordpress.org/trunk@38624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 04:10:27 +00:00
Jeremy Felt
0dc18d3ffb Multisite: Use get_sites() in network upgrade.
Use `get_sites()` to generate the same query that was previously performed manually.

Props spacedmonkey, flixos90.
Fixes #37823.

Built from https://develop.svn.wordpress.org/trunk@38680


git-svn-id: http://core.svn.wordpress.org/trunk@38623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 03:51:30 +00:00
Boone Gorges
0aca312697 Tests: Move get_the_excerpt() tests to their own file.
See #36934. Fixes #38196.

Built from https://develop.svn.wordpress.org/trunk@38679


git-svn-id: http://core.svn.wordpress.org/trunk@38622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 03:24:29 +00:00
Boone Gorges
cb68ce1fc4 Tests: Reset post-related globals after each test.
Globals like `$pages` were leaking between tests, resulting in various
bits of weirdness.

Globals will kill WordPress. Globals are killing WordPress.

See #38196.
Built from https://develop.svn.wordpress.org/trunk@38678


git-svn-id: http://core.svn.wordpress.org/trunk@38621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 03:16:29 +00:00
Dominik Schilling
324748a854 Taxonomy: Use WP_Term_Query in get_term_by().
`WP_Term_Query` already supports querying terms by 'slug', 'name', and 'term_taxonomy_id'. Its additional arguments allow us to generate nearly the same SQL queries as before.
This change has one yuge benefit: the term queries are now cached. 

Add tests to increase coverage of `get_term_by()`.

Props spacedmonkey, boonebgorges, johnjamesjacoby, pento, ocean90.
Fixes #21760.
Built from https://develop.svn.wordpress.org/trunk@38677


git-svn-id: http://core.svn.wordpress.org/trunk@38620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 22:36:30 +00:00
Ryan McCue
e53b79b726 Options: Add missing since for register_setting argument.
[38635] added support for extra arguments on registration, but was not documented.

See #37885.

Built from https://develop.svn.wordpress.org/trunk@38676


git-svn-id: http://core.svn.wordpress.org/trunk@38619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 21:12:27 +00:00
Sergey Biryukov
6c2d92c19f Docs: Correct 'Since' version number for Cloudup in oembed_providers filter description.
Props jrf.
Fixes #38188.
Built from https://develop.svn.wordpress.org/trunk@38675


git-svn-id: http://core.svn.wordpress.org/trunk@38618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 17:13:29 +00:00
Rachel Baker
bf21f3f62f Comments: Introduce the wp_update_comment_data filter.
Filters the comment data immediately before it is updated in the database. 

Props frankiet, dshanske, DrewAPicture.
Fixes #36302.
Built from https://develop.svn.wordpress.org/trunk@38674


git-svn-id: http://core.svn.wordpress.org/trunk@38617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 13:47:31 +00:00
Joe McGill
498040b809 Media: Use wp_basename() to create attachment titles from filenames.
In [38294], `pathinfo()` was used with the `PATHINFO_BASENAME` constant to
get the basename of the file to be used as an attachment title, which depends
on PHP locale and can cause issues with UTF-8 characters. This uses
`wp_basename()` instead, which is a more i18n-friendly version of `basename()`.

Props SergeyBiryukov.
Fixes #37608, #37989.
Built from https://develop.svn.wordpress.org/trunk@38673


git-svn-id: http://core.svn.wordpress.org/trunk@38616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 01:21:31 +00:00
Andrea Fercia
eeefec932f Administration: Improve the usage of the button CSS classes.
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.

Built from https://develop.svn.wordpress.org/trunk@38672


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00
Aaron Jorbin
232be98c0e Pings/Trackbacks: Add filter argument to fetching of pingbacks_url in X-pingback header
It is possible to delegate pingback processing to a service function outside of WordPress itself. All other calls in default themes (and likely other themes) uses `bloginfo` which automatically adds the filter argument of "display".  This adds consistency.

Props dshanske.
Fixes #34633.


Built from https://develop.svn.wordpress.org/trunk@38671


git-svn-id: http://core.svn.wordpress.org/trunk@38614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:28:30 +00:00
Pascal Birchler
cfa32db674 Docs: Improve parameter description for wp_parse_args().
Props dimadin for initial patch.
Fixes #38167.
Built from https://develop.svn.wordpress.org/trunk@38670


git-svn-id: http://core.svn.wordpress.org/trunk@38613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 08:41:29 +00:00
Boone Gorges
0d01992968 Set default value of 'max_depth' in get_comment_reply_link().
Introduced in [8878].

Props d4z_c0nf.
Fixes #38170.
Built from https://develop.svn.wordpress.org/trunk@38669


git-svn-id: http://core.svn.wordpress.org/trunk@38612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 04:20:55 +00:00
Weston Ruter
9a9af068e5 Customize: Fix focusing on controls for widgets and nav menu items after [38648].
Shift-click on nav menu items was not expanding the nav menu section, and shift-clicking on widgets would not always result in focus being added to an element in the control's container.

See #34391.

Built from https://develop.svn.wordpress.org/trunk@38668


git-svn-id: http://core.svn.wordpress.org/trunk@38611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 04:20:29 +00:00
Boone Gorges
3b6314e032 Taxonomy: Use WP_Term_Query when querying for object terms.
The new 'object_ids' parameter for `WP_Term_Query` allows queries for
terms that "belong to" a given object. This change makes it possible
to use `WP_Term_Query` inside of `wp_get_object_terms()`, rather than
assembling a SQL query.

The refactor has a couple of benefits:
* Less redundancy.
* Better consistency in accepted arguments between the term query functions. See #31105.
* Less redundancy.
* Object term queries are now cached. The `get_object_term_cache()` cache remains, and will be a somewhat less fragile secondary cache in front of the query cache (which is subject to frequent invalidation).
* Less redundancy.

A small breaking change: Previously, if a non-hierarchical taxonomy had
terms that had a non-zero 'parent' (perhaps because of a direct SQL
query), `wp_get_object_terms()` would respect the 'parent' argument.
This is in contrast to `WP_Term_Query` and `get_terms()`, which have
always rejected 'parent' queries for non-hierarchical taxonomies. For
consistency, the behavior of `get_terms()` is being applied across the
board: passing 'parent' for a non-hierarchical taxonomy will result in
an empty result set (since the cached taxonomy hierarchy will be empty).

Props flixos90, boonebgorges.
See #37198.
Built from https://develop.svn.wordpress.org/trunk@38667


git-svn-id: http://core.svn.wordpress.org/trunk@38610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 03:55:33 +00:00
Sergey Biryukov
ee109482db Text Changes: Unify two more permission error messages.
Props ramiy.
Fixes #38158. See #34521.
Built from https://develop.svn.wordpress.org/trunk@38666


git-svn-id: http://core.svn.wordpress.org/trunk@38609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 00:17:28 +00:00
Sergey Biryukov
ddd0456020 Text Changes: Unify two permission error messages in wp-admin/network/site-users.php.
Props ramiy.
Fixes #38178. See #34521.
Built from https://develop.svn.wordpress.org/trunk@38665


git-svn-id: http://core.svn.wordpress.org/trunk@38608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 23:52:28 +00:00
Jeremy Felt
1084773c1c Multisite: Use get_home_url() instead of get_blogaddress_by_id() in wp-activate.php.
`get_home_url()` is a better fit for the "View your site" link and can be properly filtered. This is the last remaining use of `get_blogaddress_by_id()` in core.

Props boboudreau, spacedmonkey.
Fixes #26855.

Built from https://develop.svn.wordpress.org/trunk@38664


git-svn-id: http://core.svn.wordpress.org/trunk@38607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 21:36:28 +00:00
Dominik Schilling
8cb4991bcf Toolbar: Split tests added in [38660] and add a multisite specific test.
See #37949.
Built from https://develop.svn.wordpress.org/trunk@38663


git-svn-id: http://core.svn.wordpress.org/trunk@38606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 20:11:28 +00:00
Jeremy Felt
7d6c7b441d Multsite: Flush output buffer after readfile() in ms-files.php.
Props fuscata, MikeLittle for testing, iamfriendly for testing.
Fixes #14730.

Built from https://develop.svn.wordpress.org/trunk@38662


git-svn-id: http://core.svn.wordpress.org/trunk@38605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 20:05:28 +00:00
Dominik Schilling
d3b9431ab9 Toolbar: Don't run the test from [38660] for multisite.
See #37949.
Built from https://develop.svn.wordpress.org/trunk@38661


git-svn-id: http://core.svn.wordpress.org/trunk@38604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 19:38:27 +00:00
Dominik Schilling
7627255d7e Toolbar: Update links to the about page if current user can't access the dashboard of the current site.
Add missing focus styling for menu items with an icon.

Fixes #37949.
Built from https://develop.svn.wordpress.org/trunk@38660


git-svn-id: http://core.svn.wordpress.org/trunk@38603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 19:01:29 +00:00
Jeremy Felt
b5d68be194 Multisite: Use get_sites() instead of a database lookup in get_id_from_blogname().
Because queries generated via `get_sites()` are cached, we can remove the `get_id_from_blogname` cache key.

Props flixos90.
Fixes #38175.

Built from https://develop.svn.wordpress.org/trunk@38659


git-svn-id: http://core.svn.wordpress.org/trunk@38602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 18:18:28 +00:00
Jeremy Felt
7fe5b6d182 Multisite: Handle get_id_from_blogname() lookups when the network domain has www..
Previously, if a network's domain started with `www.` in a subdomain configuration, a slug lookup with `get_id_from_blogname()` would not match an existing site. A similar lookup in a subdirectory configuration would work fine.

This strips `www.` from the network's domain in a subdomain configuration during the lookup and returns the site as expected.

Adds tests which would previously fail in a subdomain configuration, but now pass in both configurations.

Props igmoweb, flixos90.
Fixes #34450.

Built from https://develop.svn.wordpress.org/trunk@38658


git-svn-id: http://core.svn.wordpress.org/trunk@38601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 17:57:30 +00:00
Jeremy Felt
3d19ab1ce2 Multisite: Remove redundant is_multisite() checks in network admin templates.
`wp-admin/network/admin.php` is required by all of the individual network templates and begins with an `is_multisite()` check of its own. Because of this, we can remove the 26 other checks in the individual templates.

Props flixos90.
Fixes #37447.

Built from https://develop.svn.wordpress.org/trunk@38657


git-svn-id: http://core.svn.wordpress.org/trunk@38600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 15:39:29 +00:00
Jeremy Felt
03dd15bf7f Multisite: Replace die() with wp_die() in site users list table.
`wp_die()` is available and appropriate when checking capabilities while processing list table actions.

Props imath.
Fixes 38151.

Built from https://develop.svn.wordpress.org/trunk@38656


git-svn-id: http://core.svn.wordpress.org/trunk@38599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 15:27:30 +00:00
Dominik Schilling
4a6f90db58 Multisite: Allow to set the site language of a new site to English.
An empty string in `WPLANG` is used to define the site language as `en_US`. The `! empty()` check didn't catch this case so that `wpmu_create_blog()` fell back to the network setting.

Fixes #36918.
Built from https://develop.svn.wordpress.org/trunk@38655


git-svn-id: http://core.svn.wordpress.org/trunk@38598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-26 18:39:32 +00:00
John Blackbourn
a1ef815d04 Built/Test Tools: Unify the way the permastructure is set when used in conjunction with re-registering the initial taxonomies. This ensure that rewrite rules for taxonomies are consistently available.
Fixes #35452

Built from https://develop.svn.wordpress.org/trunk@38654


git-svn-id: http://core.svn.wordpress.org/trunk@38597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-26 17:02:29 +00:00
John Blackbourn
61ff4980a4 Administration: Remove the input qualifier for the .regular-text class rule. This allows for other elements such as textareas to be styled with the same width as regular text inputs.
Fixes #20928
Props curdin

Built from https://develop.svn.wordpress.org/trunk@38653


git-svn-id: http://core.svn.wordpress.org/trunk@38596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-26 16:46:33 +00:00
Andrea Fercia
c3ad2eee78 Accessibility: Handle focus when closing the media modal.
When closing the media modal, by default focus should be moved back to the UI
control that was clicked to open the modal. The only exception is when inserting
images into the Visual or Text editor.

Fixes #38142.

Built from https://develop.svn.wordpress.org/trunk@38652


git-svn-id: http://core.svn.wordpress.org/trunk@38595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 21:33:31 +00:00
Boone Gorges
13f243747f Allow 'role' parameters to be passed to wp_dropdown_users().
`wp_dropdown_users()` contains a whitelist of function params that are
passed through to `get_users()`. `role`, `role__in`, and `role__not_in`
have now been added to this whitelist.

Props sillybean.
Fixes #38135.
Built from https://develop.svn.wordpress.org/trunk@38651


git-svn-id: http://core.svn.wordpress.org/trunk@38594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 17:45:28 +00:00
Boone Gorges
0d1d1c4d06 Pass comment ID to get_page_of_comment filter.
Introduced in [34808].

Props zhildzik.
Fixes #38155.
Built from https://develop.svn.wordpress.org/trunk@38650


git-svn-id: http://core.svn.wordpress.org/trunk@38593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 17:33:32 +00:00
Weston Ruter
76681c40e3 Customize: Opt to disable IE8 support via conditional comments instead of using unreliable Array.prototype.indexOf feature detection.
Deprecate/remove `WP_Customize_Manager::customize_preview_html5()` and remove `document.head` polyfill, both of which were only in place for IE8 support.

Props ryankienstra, westonruter.
Fixes #38021.

Built from https://develop.svn.wordpress.org/trunk@38649


git-svn-id: http://core.svn.wordpress.org/trunk@38592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 04:35:32 +00:00
Weston Ruter
9fe024cd3f Customize: Re-architect and harden panel/section UI logic.
Removes contents for sections and panels from being logically nested (in the DOM) in order to eliminate many issues related to using `margin-top` hacks. The element containing the link to expand the content element for panels and sections is now a sibling element to its content element: the content is removed from being nested at initialization. The content element is now available in a `contentContainer` property whereas the head element (containing the link to open the construct) is in a `headContainer` property. The existing `container` property is now a jQuery collection that contains both of these elements. Since the head element is no longer in an ancestor element to the `content` element, the `aria-owns` property is now used to maintain the relationship between the `headContainer` and the `contentContainer`. These changes are also accompanied by an improvement to the animation performance for the sliding panes.

Props delawski, celloexpressions.
Fixes #34391.
Fixes #34344.
Fixes #35947.

Built from https://develop.svn.wordpress.org/trunk@38648


git-svn-id: http://core.svn.wordpress.org/trunk@38591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 22:23:30 +00:00
Eric Lewis
d27606936b Allow custom bulk actions in admin list tables.
Bulk action filtering was introduced in 3.1, but only to remove default bulk actions, not add new ones.

Bulk actions can now be registered for all admin list table dropdowns via the `bulk_actions-{get_current_screen()->id}` filter. Handling custom bulk actions can be performed in the corresponding and newly introduced `handle_bulk_actions-${get_current_screen()->id}` filter.

Props scribu, flixos90, Veraxus.
See #16031.


Built from https://develop.svn.wordpress.org/trunk@38647


git-svn-id: http://core.svn.wordpress.org/trunk@38590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 20:33:30 +00:00
Sergey Biryukov
c3ad13e72e I18N: Add support for Serbian crossed D in remove_accents().
Props Krstarica for the report.
Fixes #38078.
Built from https://develop.svn.wordpress.org/trunk@38646


git-svn-id: http://core.svn.wordpress.org/trunk@38589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 00:07:29 +00:00
Sergey Biryukov
bae2b337f0 Docs: Add home and commentpaged as accepted values for user_trailingslashit filter.
Props sebastian.pisula.
Fixes #37734.
Built from https://develop.svn.wordpress.org/trunk@38645


git-svn-id: http://core.svn.wordpress.org/trunk@38588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 22:54:29 +00:00
Sergey Biryukov
bb0cec0bfe Docs: Add documentation for wp-admin/js/inline-edit-tax.js.
Props atimmer, boblinthorst.
Fixes #37571.
Built from https://develop.svn.wordpress.org/trunk@38644


git-svn-id: http://core.svn.wordpress.org/trunk@38587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 18:50:28 +00:00
Sergey Biryukov
78138cd2c7 Docs: Add documentation for wp-admin/js/postbox.js.
Props atimmer, andizer.
Fixes #37365.
Built from https://develop.svn.wordpress.org/trunk@38643


git-svn-id: http://core.svn.wordpress.org/trunk@38586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 18:47:31 +00:00
Andrea Fercia
b558fbec6f Accessibility: Fix the Customizer available menu items toggles focus for Safari and VoiceOver.
In rare circumstances, for example buttons with icons and no visible text,
`user-select: none;` may trigger a bug that happens only when using Safari and
VoiceOver and doesn't allow focusable elements to receive focus correctly.
Worth reminding `user-select: none;` is a non-standard property and should be
used with care especially now that `::selection` is almost universally supported.

Fixes #37589.

Built from https://develop.svn.wordpress.org/trunk@38642


git-svn-id: http://core.svn.wordpress.org/trunk@38585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 14:59:30 +00:00
Sergey Biryukov
d790e246d5 Docs: Correct @see entry for clean_url().
Props rabmalin.
Fixes #38126.
Built from https://develop.svn.wordpress.org/trunk@38641


git-svn-id: http://core.svn.wordpress.org/trunk@38584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 09:40:31 +00:00
Andrea Fercia
88c7224355 Accessibility: Add Themes Feature Filter form improvements.
- adds "Apply Filters" and "Clear" at the end of the form
- changes the "Feature Filter", "Apply Filters", "Clear", and "Edit" links in `<button>` elements
- removes a leftover from [27963]
- clarifies one button text and adds an `aria-label` attribute
- adds a `wp.a11y.speak()` message when clicking on "Apply Filters" and no features are selected

Fixes #38086.

Built from https://develop.svn.wordpress.org/trunk@38640


git-svn-id: http://core.svn.wordpress.org/trunk@38583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 17:54:28 +00:00
Dominik Schilling
1babe4b968 Comments: Revert [38298].
Instead use the correct comparison operator which was changed in [38297].

Fixes #37416.
Built from https://develop.svn.wordpress.org/trunk@38639


git-svn-id: http://core.svn.wordpress.org/trunk@38582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 17:38:28 +00:00
Andrea Fercia
d885e3cfb0 Administration: Fix the main background color for the Light color scheme.
Props trepmal.
Fixes #38004.

Built from https://develop.svn.wordpress.org/trunk@38638


git-svn-id: http://core.svn.wordpress.org/trunk@38581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 17:36:31 +00:00
Sergey Biryukov
fd091e7ced Editor: Improve post.js documentation.
Props jipmoors, boblinthorst.
Fixes #38118.
Built from https://develop.svn.wordpress.org/trunk@38637


git-svn-id: http://core.svn.wordpress.org/trunk@38580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 08:57:30 +00:00
Jeremy Felt
58f107fa95 Multisite: Revert [38388].
Restore `get_current_site()` to a multisite only function. Providing this in single site may be a possibility in the future, but should have a dedicated ticket and discussion.

See #37699.

Built from https://develop.svn.wordpress.org/trunk@38636


git-svn-id: http://core.svn.wordpress.org/trunk@38579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 21:39:29 +00:00
Joe Hoyle
2ec9f4b369 Options: Build out register_setting like register_meta.
`register_setting` can now be passed an array arguments to specify meta-data about the setting,
much like using the `register_meta` API. Of note, it will now accept a `show_in_rest` arg to
hint the inclusion of the setting in the REST API. `get_registered_settings()` is available
as a utility to get all registered settings.

Props rmccue, aaroncampbell.
Fixes #37885.



Built from https://develop.svn.wordpress.org/trunk@38635


git-svn-id: http://core.svn.wordpress.org/trunk@38578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 20:52:28 +00:00
Pascal Birchler
8fe586ad57 Toolbar: Add a 'View Posts' link to the toolbar when on the post listing screen.
This adds a new link to visit the post type archive if the post type supports it. Also introduces a new `view_items` label to `get_post_type_labels()`.

Props paulwilde, akibjorklund, swissspidy.
Fixes #34113.
Built from https://develop.svn.wordpress.org/trunk@38634


git-svn-id: http://core.svn.wordpress.org/trunk@38577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 20:02:28 +00:00
Dominik Schilling
7cbecfa33e Multisite: Show always domain and path when deleting a site.
Add a missing translators comment.

Props ian.edington.
Fixes #37309.
Built from https://develop.svn.wordpress.org/trunk@38633


git-svn-id: http://core.svn.wordpress.org/trunk@38576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 19:55:29 +00:00
Jeremy Felt
63664c1282 Multisite: Use get_networks() in get_main_network_id().
The manual query for the main network ID can now be replaced with a cached `get_networks()` query. This allows us to eliminate the `primary_network_id` cache key entirely.

Props spacedmonkey.
Fixes #37218.

Built from https://develop.svn.wordpress.org/trunk@38632


git-svn-id: http://core.svn.wordpress.org/trunk@38575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 18:47:27 +00:00
Jeremy Felt
02c8bd1909 Multisite: Provide $join as a possible SQL clause to the sites_clauses filter.
Previously, `compact()` provided a non existent `$join` and could cause confusion for anyone attempting to extend `WP_Site_Query` with their own tables. This aligns with the current behavior in `WP_Network_Query`.

Props johnjamesjacoby.
Fixes #37922.

Built from https://develop.svn.wordpress.org/trunk@38631


git-svn-id: http://core.svn.wordpress.org/trunk@38574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 17:49:28 +00:00
Jeremy Felt
1adca14cd7 Multisite: Add annotations for extended WP_Site properties.
Props ryanplas.
Fixes #37932.

Built from https://develop.svn.wordpress.org/trunk@38630


git-svn-id: http://core.svn.wordpress.org/trunk@38573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 17:22:29 +00:00
Sergey Biryukov
3c5204f9f4 Docs: Correct the description of {$taxonomy}_term_new_form_tag hook, making it more consistent with other *_form_tag hooks.
Props BjornW.
Fixes #38104.
Built from https://develop.svn.wordpress.org/trunk@38629


git-svn-id: http://core.svn.wordpress.org/trunk@38572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 13:33:29 +00:00
Dominik Schilling
f05c688ec7 Customize: Add wp-util as a dependency for customize-controls.
Fixes #38107.
Built from https://develop.svn.wordpress.org/trunk@38628


git-svn-id: http://core.svn.wordpress.org/trunk@38571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 13:24:31 +00:00
Weston Ruter
4c4271a691 Customize: Remove IE8 access to customizer to discontinue support.
Uses feature detection for `Array.prototype.indexOf` since it is not implemented in IE8.

Props ryankienstra.
See #38021.

Built from https://develop.svn.wordpress.org/trunk@38627


git-svn-id: http://core.svn.wordpress.org/trunk@38570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 04:02:31 +00:00
Joe McGill
0a906543af Media: Align input and button heights in attachment details.
This tweaks the padding of the text inputs in image settings boxes on
image edit screens to match the height of the scale button.

Props eliorivero.
Fixes #37806.
Built from https://develop.svn.wordpress.org/trunk@38626


git-svn-id: http://core.svn.wordpress.org/trunk@38569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 02:18:30 +00:00
Joe McGill
8f36a570cb Media: Make media library searchable by filename.
This applies a new private function, `_filter_query_attachment_filenames()`,
to the `post_clauses` filter hook during `wp_ajax_query_attachments()` and
`wp_edit_attachments_query_vars()` to include `_wp_attached_file` post meta
in search queries performed from the media library or in a `WP_Media_List_Table`.

Props wonderboymusic, DrewAPicture, joemcgill, swissspidy.
Fixes #22744.
Built from https://develop.svn.wordpress.org/trunk@38625


git-svn-id: http://core.svn.wordpress.org/trunk@38568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 01:45:31 +00:00
Weston Ruter
d84c343cc6 Customize: Let static_front_page section be contextually active based on whether there are any published pages.
If there are no pages when the customizer is opened, the `static_front_page` section will be hidden. As soon as a page is created in the customizer session, the `static_front_page` section will be revealed. Previously the section would not be registered if there were no pages. Page stubs created via nav menus will appear in the `dropdown-pages` controls for `page_for_posts` and `page_on_front`, and such page stubs will thus cause the `static_front_page` section to appear. Plugins that facilitate page creation in the customizer by filtering `get_pages` will also cause the section to appear.

See #34923.
Fixes #38013.

Built from https://develop.svn.wordpress.org/trunk@38624


git-svn-id: http://core.svn.wordpress.org/trunk@38567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 00:47:30 +00:00
Sergey Biryukov
94ff5710ce Docs: Correct two references to plugins in the $args parameter description for themes_api().
Props hideokamoto.
Fixes #37939.
Built from https://develop.svn.wordpress.org/trunk@38623


git-svn-id: http://core.svn.wordpress.org/trunk@38566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-19 16:46:30 +00:00
Sergey Biryukov
05a947c05a Docs: Correct a comment and @return entry in WP_Upgrader::create_lock().
Props markshep.
Fixes #38089.
Built from https://develop.svn.wordpress.org/trunk@38622


git-svn-id: http://core.svn.wordpress.org/trunk@38565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 20:16:29 +00:00
Boone Gorges
65bc3d39e6 Pass taxonomy name to actions in term-relationship CRUD functions.
Props Takahashi_Fumiki.
Fixes #38006.
Built from https://develop.svn.wordpress.org/trunk@38621


git-svn-id: http://core.svn.wordpress.org/trunk@38564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 18:53:30 +00:00
Sergey Biryukov
788c3680f9 XML-RPC: Avoid a PHP notice in ::pingback_ping() if page title was not found.
Props RedSand.
Fixes #36727.
Built from https://develop.svn.wordpress.org/trunk@38620


git-svn-id: http://core.svn.wordpress.org/trunk@38563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 14:26:29 +00:00
John Blackbourn
34a7bc4e67 Upgrade/Install: Automatically log users in after installation.
This change means that after entering their site's settings upon installation, users are immediately logged in and redirected to the admin dashboard, instead of being presented with the 'Success!' screen and then being asked to log in. This reduces friction and reduces the number of steps for installation.

Fixes #34084

Built from https://develop.svn.wordpress.org/trunk@38619


git-svn-id: http://core.svn.wordpress.org/trunk@38562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 11:42:30 +00:00
Weston Ruter
037a236e42 Customize: Ensure nav menu items lacking a label use the title from the original object.
Use original title as placeholder for label and in control title. Prevent original title from overriding empty label in initial setting values.

Fixes #38015.

Built from https://develop.svn.wordpress.org/trunk@38618


git-svn-id: http://core.svn.wordpress.org/trunk@38561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 21:50:30 +00:00
Andrea Fercia
ea69657b59 Plugins: style the primary action link in the non-js "Installing Plugin" page.
Props curdin, ericlewis, melchoyce, karmatosed.
Fixes #36430.

Built from https://develop.svn.wordpress.org/trunk@38617


git-svn-id: http://core.svn.wordpress.org/trunk@38560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 16:23:27 +00:00
Andrea Fercia
576bdf9f8c Accessibility: Standardize the remove/delete/cancel links in the Menus screen and Publish meta boxes.
The `submitdelete` CSS class is used in various places across the admin for some
"red" action links. It is worth simplifying this rule for further improvements
related to color contrast.

- simplifies a non-standard styling for the "Remove/Cancel" links in the Menus screen
- underlines all the "Move to trash/Delete" red links in all the Publish meta boxes
- fixes CSS classes usage for all the Publish meta boxes primary buttons
- fixes broken layout for the old Link Manager publish meta box

Props karmatosed, hugobaeta, monikarao, afercia.
Fixes #37969, #37018. See #37448, #37138, #27314.

Built from https://develop.svn.wordpress.org/trunk@38616


git-svn-id: http://core.svn.wordpress.org/trunk@38559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 15:39:30 +00:00
Aaron Campbell
405def3da4 Media: Improved media titles when created from filename.
Preserves spaces and generally creates more accurate, cleaner titles from filenames of uploaded media.

Props joemcgill.
Fixes #37989.


Built from https://develop.svn.wordpress.org/trunk@38614


git-svn-id: http://core.svn.wordpress.org/trunk@38557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 05:42:31 +00:00
Pascal Birchler
15df6d24eb Menus: Use strict comparison for the condition added in [38612].
See #37846.
Built from https://develop.svn.wordpress.org/trunk@38613


git-svn-id: http://core.svn.wordpress.org/trunk@38556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-15 16:56:29 +00:00
Pascal Birchler
a0ce261a24 Menus: Remove 'sub item' label when removing the sub item's parent.
Props rnoakes3rd, adamsilverstein.
Fixes #37846.
Built from https://develop.svn.wordpress.org/trunk@38612


git-svn-id: http://core.svn.wordpress.org/trunk@38555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-15 16:10:31 +00:00
Sergey Biryukov
0bae73682b I18N: Correct context for Next/Previous strings in get_the_posts_pagination().
Props FlorianBrinkmann.
Fixes #37952.
Built from https://develop.svn.wordpress.org/trunk@38611


git-svn-id: http://core.svn.wordpress.org/trunk@38554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-15 09:20:29 +00:00
Sergey Biryukov
d4d8ae2422 Docs: Use a third-person singular verb for register_post_type_args filter added in [34242].
See #37770.
Built from https://develop.svn.wordpress.org/trunk@38610


git-svn-id: http://core.svn.wordpress.org/trunk@38553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:58:29 +00:00
Sergey Biryukov
f348f9a59c Docs: Use a third-person singular verb for {$type}_template_hierarchy filter added in [38385].
See #14310.
Built from https://develop.svn.wordpress.org/trunk@38609


git-svn-id: http://core.svn.wordpress.org/trunk@38552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:54:30 +00:00
Sergey Biryukov
9c6da56cc7 Docs: Use a third-person singular verb for smilies filter added in [38504].
See #35905.
Built from https://develop.svn.wordpress.org/trunk@38608


git-svn-id: http://core.svn.wordpress.org/trunk@38551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:53:29 +00:00
Sergey Biryukov
7196188459 Docs: Use a third-person singular verb for wp_doing_ajax filter added in [38334].
See #25669.
Built from https://develop.svn.wordpress.org/trunk@38607


git-svn-id: http://core.svn.wordpress.org/trunk@38550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:51:28 +00:00
Sergey Biryukov
b6397b4fda Docs: Use a third-person singular verb in the DocBlock summary for get_theme_file_uri(), get_parent_theme_file_uri(), get_theme_file_path(), and get_parent_theme_file_path(), introduced in [38578].
See #18302.
Built from https://develop.svn.wordpress.org/trunk@38606


git-svn-id: http://core.svn.wordpress.org/trunk@38549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:48:28 +00:00
Sergey Biryukov
4d7e41653e Docs: Use a third-person singular verb for theme_file_uri, parent_theme_file_uri, theme_file_path, and parent_theme_file_path filters added in [38578].
See #18302.
Built from https://develop.svn.wordpress.org/trunk@38605


git-svn-id: http://core.svn.wordpress.org/trunk@38548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:45:29 +00:00
Sergey Biryukov
4058b11ccd Docs: Add a @since entry for the post_password_required filter introduced in [38603].
Use a third-person singular verb for the filter description.

See #38056.
Built from https://develop.svn.wordpress.org/trunk@38604


git-svn-id: http://core.svn.wordpress.org/trunk@38547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:37:29 +00:00
Aaron Jorbin
d31057a009 Posts: Add filter to allow overriding post_password_required return
Post Passwords are incredibly inflexible. One Password per site at a time and other limitations that can't really be changed without a backwards compatibility break.  This adds the ability for sites to change the password behavior such as doing per post passwords or allowing multiple passwords to be set in a browser. The possibilities are YUGE.

Additionally, it allows for a behavior other than returning a html form when a password is needed. This is important for non website use cases (such as in a restful API).

Fixes #38056. See #16483.
Props rmccue.


Built from https://develop.svn.wordpress.org/trunk@38603


git-svn-id: http://core.svn.wordpress.org/trunk@38546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:28:30 +00:00
Helen Hou-Sandí
dd6da701b2 Customizer: Better hover/focus state for section titles and available widgets.
The 4px border pattern is found in a number of places across the admin, including plugins, notices, and Press This.

props celloexpressions, folletto, hugobaeta.
see #29158.


Built from https://develop.svn.wordpress.org/trunk@38602


git-svn-id: http://core.svn.wordpress.org/trunk@38545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 16:15:29 +00:00
Joe Hoyle
794dd5d8cb REST API: Enable sanitize_callback to return WP_Error.
Give developers the opportunity to reject incoming data without using the validation callback. It also enables us to do sanitization and validation in one function in instances where this could be useful.

Props websupporter, rmccue.
Fixes #37560.

Built from https://develop.svn.wordpress.org/trunk@38601


git-svn-id: http://core.svn.wordpress.org/trunk@38544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 15:50:29 +00:00
Sergey Biryukov
d7f840a211 XML-RPC: Check the minimum number of arguments in ::wp_getUsersBlogs() and ::blogger_getUsersBlogs().
Props kitchin for initial patch.
Fixes #29750.
Built from https://develop.svn.wordpress.org/trunk@38600


git-svn-id: http://core.svn.wordpress.org/trunk@38543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 23:17:28 +00:00
Konstantin Obenland
320fe3a2b6 Make wpList easier to contribute to.
Uses more semantic variable names and adds function and inline documentation.

Props rommelxcastro for parallel work in #34917.
Fixes #36264.

Built from https://develop.svn.wordpress.org/trunk@38599


git-svn-id: http://core.svn.wordpress.org/trunk@38542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 22:24:30 +00:00
Sergey Biryukov
84cf528449 Media: Adjust test_video_shortcode_body() after [38597].
See #38040.
Built from https://develop.svn.wordpress.org/trunk@38598


git-svn-id: http://core.svn.wordpress.org/trunk@38541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 14:09:29 +00:00
Sergey Biryukov
893f9487d4 Media: Remove an extra space in style attribute in wp_video_shortcode() after [30082].
Props danielpietrasik.
Fixes #38040.
Built from https://develop.svn.wordpress.org/trunk@38597


git-svn-id: http://core.svn.wordpress.org/trunk@38540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 13:45:31 +00:00
Sergey Biryukov
b434cda3a6 Docs: Synchronize docblocks for WP_Site_Query::__construct() and get_sites() after the changes in [37735], [38008], [38103], and [38336].
Props MaximeCulea.
Fixes #38039.
Built from https://develop.svn.wordpress.org/trunk@38596


git-svn-id: http://core.svn.wordpress.org/trunk@38539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 13:20:35 +00:00
Sergey Biryukov
1cdb4b52af Docs: Correct description for domain and path arguments in WP_Network_Query::__construct().
See #32504.
Built from https://develop.svn.wordpress.org/trunk@38595


git-svn-id: http://core.svn.wordpress.org/trunk@38538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 13:10:32 +00:00
Gary Pendergast
3e08cf2b66 Formatting: Update autop() to match wpautop().
[38592] changed the behaviour of `wpautop()` , so it's nice to change `autop()` to match.

Interestingly, this change isn't necessary for the functionality to work - #4857 didn't affect content that had been run through `autop()` at some point, as `autop()` would add a single line break before block elements, then `wpautop()` would later add a second line break, making it work correctly.

Props nacin for finding out about [38592] on Twitter, and DMing me to remind me to review `autop()`.
See #4857.


Built from https://develop.svn.wordpress.org/trunk@38594


git-svn-id: http://core.svn.wordpress.org/trunk@38537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 06:03:31 +00:00
Gary Pendergast
e1d553e20a Docs: Fix an outdated comment.
[38592] changed the functionality of `wpautop()`, but didn't update the associated comment to match.

Fixes #4857.


Built from https://develop.svn.wordpress.org/trunk@38593


git-svn-id: http://core.svn.wordpress.org/trunk@38536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 04:01:30 +00:00
Gary Pendergast
109ffb9390 Formatting: Add an extra line break before block elements in wpautop().
`wpautop()` considers double line breaks to be the separator between block level HTML elements. By adding two line breaks before a block element, this allows us to process the text before a block element correctly.

Fixes #4857.


Built from https://develop.svn.wordpress.org/trunk@38592


git-svn-id: http://core.svn.wordpress.org/trunk@38535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 07:06:30 +00:00
Gary Pendergast
a18b133c01 Database: Normalise index names in dbDelta().
When comparing index definitions, normalise the index names to lower case, as they are not case sensitive within MySQL.

Fixes #34874.


Built from https://develop.svn.wordpress.org/trunk@38591


git-svn-id: http://core.svn.wordpress.org/trunk@38534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 05:09:30 +00:00
Gary Pendergast
65fa220a08 Database: Increase the size of wp_posts.post_password to 255 characters.
Longer passwords and passphrases are much more common than when post passwords were introduced all those eons ago, so let's increase the length of the `post_password` field from 20 to 255 characters.

The password will continue to be stored in plaintext, as the ability for the post author to view the password is a commonly used feature.

Trivia: this was the last 3 digit Trac ticket to be closed.

Props skippy, nazgul, iandunn, adamsilverstein, pento.
Fixes #881.


Built from https://develop.svn.wordpress.org/trunk@38590


git-svn-id: http://core.svn.wordpress.org/trunk@38533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 02:28:30 +00:00
Gary Pendergast
4dcb7a0fa9 Bootstrap: Use dirname() when loading class-wp-hook.php from plugin.php.
To allow `plugin.php` to be loaded before the rest of WordPress is loaded, it cannot rely on WordPress constants, such as `ABSPATH` and `WPINC`.

Instead, we can assume that `class-wp-hook.php` will be in the same directory as `plugin.php`, so `dirname( __FILE__ )` will give us the correct path to load from.

Props pento, dd32.
Fixes #37707.


Built from https://develop.svn.wordpress.org/trunk@38589


git-svn-id: http://core.svn.wordpress.org/trunk@38532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 01:50:30 +00:00
Weston Ruter
4156988a3c Docs: Fix phpdoc and jsdoc typos introduced in [38584] and [38587], respectively.
See #33742.
See #20714.

Built from https://develop.svn.wordpress.org/trunk@38588


git-svn-id: http://core.svn.wordpress.org/trunk@38531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-11 18:46:30 +00:00
Weston Ruter
edf170c943 Customize: Implement previewing of form submissions which use the GET method.
This finally allows the search results template to navigated to in the customizer preview.

Fixes #20714.

Built from https://develop.svn.wordpress.org/trunk@38587


git-svn-id: http://core.svn.wordpress.org/trunk@38530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-11 05:05:30 +00:00
Boone Gorges
132f3d0d19 Query: Eliminate unnecessary wp_list_filter() call in get_queried_object().
The refactor in [30711] swapped out the old `queries` property for the
new `queried_terms`, but should also have gotten rid of the now-
superfluous `wp_list_filter()` call.

Fixes #37962.
Built from https://develop.svn.wordpress.org/trunk@38586


git-svn-id: http://core.svn.wordpress.org/trunk@38529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 19:49:29 +00:00
Boone Gorges
163d59f8e1 Query: Avoid PHP notice in get_queried_object() when query contains NOT EXISTS tax query.
Props johnjamesjacoby.
See #37962.
Built from https://develop.svn.wordpress.org/trunk@38585


git-svn-id: http://core.svn.wordpress.org/trunk@38528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 19:37:38 +00:00
Weston Ruter
84f9592f88 Menus: Prevent non-published posts/pages from being returned in search results for adding as nav menu items.
Re-use the same query vars in searching as when listing posts. Aligns with behavior of nav menus in customizer.

Fixes #33742.
Props welcher, westonruter.

Built from https://develop.svn.wordpress.org/trunk@38584


git-svn-id: http://core.svn.wordpress.org/trunk@38527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 04:59:31 +00:00
John Blackbourn
e482549183 Themes: Add the non-encoded form of the queried item slug to the template hierarchy when the slug contains non-ASCII characters.
This affects category, tag, and custom taxonomy archives, and single posts, pages, and custom post types.

Fixes #37655

Built from https://develop.svn.wordpress.org/trunk@38583


git-svn-id: http://core.svn.wordpress.org/trunk@38526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 00:48:28 +00:00
Gary Pendergast
f54dafc2b7 Tests: Use add_filter() when it's available.
The `tests_add_filter()` helper function directly manipulates the `$wp_filter` global, instead of using `add_filter()`. We can use `add_filter()` when it's available, and fall back to manipulating `$wp_filter` when it isn't, relying on the `$wp_filter` bootstrap code at the top of `plugin.php` to handle conversion.

Props boonebgorges, dd32 and pento: WordPress Thought Leadership Triumvirate.
Fixes #17817.


Built from https://develop.svn.wordpress.org/trunk@38582


git-svn-id: http://core.svn.wordpress.org/trunk@38525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 00:34:31 +00:00