Commit Graph

19189 Commits

Author SHA1 Message Date
Weston Ruter
31d02887b6 Customizer: Fix moving focus to available nav menu items search.
Fixes regression introduced in [34219].

Props tyxla.
See #33360.
Fixes #34125 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 15:27:24 +00:00
Boone Gorges
0e7c1d3b14 Use wp_installing() instead of WP_INSTALLING constant.
The `WP_INSTALLING` constant is a flag that WordPress sets in a number of
places, telling the system that options should be fetched directly from the
database instead of from the cache, that WP should not ping wordpress.org for
updates, that the normal "not installed" checks should be bypassed, and so on.

A constant is generally necessary for this purpose, because the flag is
typically set before the WP bootstrap, meaning that WP functions are not yet
available.  However, it is possible - notably, during `wpmu_create_blog()` -
for the "installing" flag to be set after WP has already loaded. In these
cases, `WP_INSTALLING` would be set for the remainder of the process, since
there's no way to change a constant once it's defined. This, in turn, polluted
later function calls that ought to have been outside the scope of site
creation, particularly the non-caching of option data. The problem was
particularly evident in the case of the automated tests, where `WP_INSTALLING`
was set the first time a site was created, and remained set for the rest of the
suite.

The new `wp_installing()` function allows developers to fetch the current
installation status (when called without any arguments) or to set the
installation status (when called with a boolean `true` or `false`). Use of
the `WP_INSTALLING` constant is still supported; `wp_installing()` will default
to `true` if the constant is defined during the bootstrap.

Props boonebgorges, jeremyfelt.
See #31130.
Built from https://develop.svn.wordpress.org/trunk@34828


git-svn-id: http://core.svn.wordpress.org/trunk@34793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 15:06:28 +00:00
Drew Jaynes
aa6fbdaa92 Docs: Add a missing DocBlock summary for wp_list_widget_controls_dynamic_sidebar().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 03:06:24 +00:00
Drew Jaynes
b1b2ec30e2 Docs: Add missing DocBlock summaries for five functions in wp-admin/includes/template-functions.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 03:03:25 +00:00
Drew Jaynes
0b332f6d7a Docs: Add missing DocBlock summaries to three functions in wp-admin/includes/plugin.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:55:24 +00:00
Drew Jaynes
4c2203b370 Docs: Add missing summaries for functions in wp-admin/includes/misc.php.
Also restructures the summary for `update_home_siteurl()`.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:52:24 +00:00
Drew Jaynes
2de4cc7149 Docs: Add missing DocBlock summaries for a multitude of functions in wp-admin/includes/media.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:44:25 +00:00
Drew Jaynes
3866a8cf58 Docs: Add missing method summaries for the deprecated WP_User_Search class, including prepare_query(), query(), prepare_vars_for_template_usage(), do_paging(), and get_results().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:35:25 +00:00
Drew Jaynes
1f1c2335ad Docs: Add missing summaries for three deprecated admin functions: dropdown_categories(), dropdown_link_categories(), and wp_dropdown_cats().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:29:26 +00:00
Sergey Biryukov
a285a1cf22 Use home_url() instead of get_option( 'siteurl' ) in notifications that are sent when a user's email address or password is changed.
Props tyxla, ramay.
Fixes #34071.
Built from https://develop.svn.wordpress.org/trunk@34820


git-svn-id: http://core.svn.wordpress.org/trunk@34785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-04 23:03:26 +00:00
Jeremy Felt
a8771a3914 MS: Populate site_name property in a new WP_Network.
This allows us to reduce some extra handling in `ms-settings.php`. Requires [34777].

Props johnjamesjacoby for the initial patch.
See #31985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-04 20:51:25 +00:00
Drew Jaynes
6650dfea4f Docs: Document the plugin data array returned by get_plugin_data() with a hash-notation.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-04 19:06:27 +00:00
Drew Jaynes
f6948c38fa Widgets: Add more tests for registering and unregistering sidebars with 1) no ID, 2) a string ID, 3) a numeric ID.
See #17078.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-04 05:23:24 +00:00
Drew Jaynes
a0c6f8cca2 Widgets: Add tests for dynamic_sidebar() where sidebars were registered with 1) no supplied ID, 2) a numeric ID, 3) a string ID.
See #17078.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-04 04:44:27 +00:00
Boone Gorges
1438ad7bb8 Rechristen the get_page_of_comment filter.
See [34808].

Props DrewAPicture, SergeyBiryukov.
Fixes #13939.
Built from https://develop.svn.wordpress.org/trunk@34815


git-svn-id: http://core.svn.wordpress.org/trunk@34780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 22:43:27 +00:00
Jeremy Felt
908b1f0b7d MS: Align HTML structure in wp-signup.php and wp-activate.php.
Assigns the `wp-activate-container` and `wp-signup-container` to the container inside `#signup-container` on each. This container already existed in `wp-signup.php` and is new in `wp-activate.php`.

Props ocean90.
Fixes #25478.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 21:51:25 +00:00
Drew Jaynes
b453c9e976 Users: Don't pass the current WP_Users_List_Table or WP_MS_Users_List_Table instance to the users_list_table_query_args filter after all.
After some discussion, it was decided that Multisite vs single site context can just as easily be derived using available functions like `is_network_admin()`, `get_current_screen()`, etc., rendering the second parameter moot. The hook was introduced in [34796].

Fixes #25360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 21:49:24 +00:00
Boone Gorges
f08e5c2d80 Update the taxonomy relationship cache in is_object_in_term().
This function attempts to read from the relationship cache, and uses any data
it finds. If it finds no data, it does a query for the data it needs. Since we
are going to the trouble to query for the relationships, and since we are
already using cached data when available, let's go ahead and cache it for
later use.

Props joehoyle, boonebgorges.
Fixes #32044.
Built from https://develop.svn.wordpress.org/trunk@34812


git-svn-id: http://core.svn.wordpress.org/trunk@34777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 21:19:23 +00:00
Boone Gorges
5be41d618f Don't prime term meta cache in is_object_in_term().
Term meta is not necessary in this case, so priming the cache wastes a query.

See #10142, #32044.
Built from https://develop.svn.wordpress.org/trunk@34811


git-svn-id: http://core.svn.wordpress.org/trunk@34776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 21:07:24 +00:00
Drew Jaynes
c1fc5e79c8 Tests: Permalink Structures Phase II: DRY up logic for setting permalink structures in test methods.
Renames `reset_permalinks()` to `set_permalink_structure()` (mimicking `$wp_rewrite->set_permalink_structure()`) and allows it to accept an optional permalink structure. In this way, we can double dip using it to both set and reset the permalink structure from anywhere.

Removes alot of duplicated code from tests.

See #33968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 20:55:24 +00:00
Boone Gorges
28625bfc38 When creating terms, avoid false dupe checks due to accented characters.
`wp_insert_term()` doesn't allow the creation of a term when the term `name`
is the same as another term in the same hierarchy level of the same taxonomy.
Previously, this duplicate check used `get_term_by( 'name' )`, which uses the
database collation to determine sameness. But common collations do not
distinguish between accented and non-accented versions of a character. As a
result, it was impossible to create a term 'Foo' if a sibling term with an
accented character existed.

We address this problem by using `get_terms()` to do the duplicate check. This
query returns all potentially matching terms. We then do a stricter check
for equivalence in PHP, before determining whether one of the matches is
indeed a duplicate.

Props boonebgorges, tyxla, geza.miklo, mehulkaklotar.
Fixes #33864.
Built from https://develop.svn.wordpress.org/trunk@34809


git-svn-id: http://core.svn.wordpress.org/trunk@34774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 20:25:26 +00:00
Boone Gorges
32dda547c1 Introduce 'page_of_comment' filter.
This filter allows developers to modify the output of `get_page_of_comment()`.

As a side effect of this new filter, comment page numbers will always be
returned as integers. Previously, they would sometimes be returned as floats -
eg `float(2.0)` instead of `int(2)`.

Props laceous.
See #13939.
Built from https://develop.svn.wordpress.org/trunk@34808


git-svn-id: http://core.svn.wordpress.org/trunk@34773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 19:39:25 +00:00
Drew Jaynes
6f2d3fea3b Tests: Last try: It's redundant to reset permalinks on tearDown() if we're already doing it on every setUp().
Removes the restoration logic, which leveraged a static property initialized with `get_option()`.

See #33968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 19:27:26 +00:00
Boone Gorges
25e7ad64cf Use 'comments_per_page' option as fallback in get_page_of_comment().
The function now uses the following order of precedence when calculating
comment pagination: 1. the 'per_page' value passed in the `$args` array,
2. the 'comments_per_page' query var in `$wp_query`, and 3. the
'comments_per_page' setting from options-discussion.php. This change allows
`get_page_of_comment()` to return an accurate value before the main query
has been run.

Props laceous.
See #13939.
Built from https://develop.svn.wordpress.org/trunk@34806


git-svn-id: http://core.svn.wordpress.org/trunk@34771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 19:26:24 +00:00
Boone Gorges
cd5cd380e8 Only count top-level comments when calculating threaded pagination.
The change in [34535] did not properly account for threading.

See #13939, #11334.
Built from https://develop.svn.wordpress.org/trunk@34805


git-svn-id: http://core.svn.wordpress.org/trunk@34770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 19:16:24 +00:00
Boone Gorges
198dee542d Ensure that WP_User_Query vars are filled after 'pre_get_users'.
This prevents notices from being thrown when a 'pre_get_users' callback
removes required values from the list of `query_vars`.

For backward compatibility with previous uses of 'pre_get_users', default
values are parsed both before and after the action is fired.

Fixes #33449.
Built from https://develop.svn.wordpress.org/trunk@34804


git-svn-id: http://core.svn.wordpress.org/trunk@34769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 18:45:25 +00:00
Drew Jaynes
86f8dedf68 Tests: Move the global permalinks reset routine to only fire when running core tests.
Should fix intermittent mysqli response errors in the AJAX tests.

See #33968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 18:36:26 +00:00
Drew Jaynes
a127d95c89 Tests: Introduce WP_UnitTestCase::reset_permalinks(), an attempt to DRY up logic for resetting and restoring default permalinks on setUp() and tearDown().
See #33968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 17:15:24 +00:00
Sergey Biryukov
4f709678fb Add missing unit tests from [34799].
Props johnbillion.
See #34059.
Built from https://develop.svn.wordpress.org/trunk@34801


git-svn-id: http://core.svn.wordpress.org/trunk@34766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 15:10:25 +00:00
Sergey Biryukov
3792591dfb Add single-{post_type}-{post_name}.php to the top of the template hierarchy for single posts.
This is consistent with page and taxonomy templates, which support slugs as well.

Props ericjuden, johnbillion.
Fixes #18859.
Built from https://develop.svn.wordpress.org/trunk@34800


git-svn-id: http://core.svn.wordpress.org/trunk@34765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 15:00:25 +00:00
Sergey Biryukov
9dc1a858f8 Abstract functionality from wp-comments-post.php into a function, wp_handle_comment_submission().
Add unit tests.

Props johnbillion.
Fixes #34059.
Built from https://develop.svn.wordpress.org/trunk@34799


git-svn-id: http://core.svn.wordpress.org/trunk@34764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 14:47:26 +00:00
Sergey Biryukov
0aacea6535 Merge some strings with the same meaning in wp-includes/class-wp-xmlrpc-server.php.
Props pavelevap.
Fixes #33644.
Built from https://develop.svn.wordpress.org/trunk@34798


git-svn-id: http://core.svn.wordpress.org/trunk@34763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 14:09:43 +00:00
Sergey Biryukov
6b71b2304b Merge some strings in wp-admin/upload.php with existing strings with the same meaning.
Props pavelevap.
Fixes #31727.
Built from https://develop.svn.wordpress.org/trunk@34797


git-svn-id: http://core.svn.wordpress.org/trunk@34762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 13:57:27 +00:00
Drew Jaynes
b38569a5fc 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.
The current list table is passed as a second parameter, `$this`, and can take the form of either a `WP_Users_List_Table` or `WP_MS_Users_List_Table` instance depending on the context in which the filter was evaluated.

Props juliobox for the initial patch.
Fixes #25360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 07:24:25 +00:00
Boone Gorges
f6b2797bd3 Remove search_terms from WP_Query doc block.
It's not actually a query param.

Introduced in [28887].
Built from https://develop.svn.wordpress.org/trunk@34795


git-svn-id: http://core.svn.wordpress.org/trunk@34760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 04:36:27 +00:00
Sergey Biryukov
d6865505d5 Respect the force_delete parameter of get_delete_post_link().
Previously, it only worked if `EMPTY_TRASH_DAYS` was disabled.

Props johnbillion, chriscct7.
Fixes #26832.
Built from https://develop.svn.wordpress.org/trunk@34794


git-svn-id: http://core.svn.wordpress.org/trunk@34759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 01:50:25 +00:00
John Blackbourn
5e98b20e84 Adjust _default_wp_die_handler() formatting so it doesn't confuse Sublime Text's parsing and syntax highlighting.
Fixes #34135

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


git-svn-id: http://core.svn.wordpress.org/trunk@34758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 01:32:24 +00:00
Boone Gorges
ca86a8a404 Remove dead code added to get_comment_link() in [34735].
See #34073.
Built from https://develop.svn.wordpress.org/trunk@34792


git-svn-id: http://core.svn.wordpress.org/trunk@34757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 01:27:24 +00:00
Sergey Biryukov
1137b70ef3 Twenty Fifteen: Document the 'twentyfifteen_color_schemes' filter.
Props DrewAPicture.
Fixes #34119.
Built from https://develop.svn.wordpress.org/trunk@34791


git-svn-id: http://core.svn.wordpress.org/trunk@34756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 01:10:26 +00:00
John Blackbourn
cf5ac0b6bf Use wp_login_url() for login links when signing up for a new blog or activating a new blog on Multisite.
Fixes #31495
Props GregLone for the intial patch

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


git-svn-id: http://core.svn.wordpress.org/trunk@34755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 00:34:25 +00:00
Weston Ruter
d9cca27386 Customize: Fix nav_menu_item CSS classes array being incorrectly presented in input field as comma-delimited list.
Instead of using `Array.toString()` to serialize an array with comma delimiters, explicitly `join` the array using spaces instead. Also ensure that `xfn` is handled properly if it ever gets stored as an array. 

Props tyxla, westonruter.
Fixes #34111.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 00:15:24 +00:00
John Blackbourn
27dbbdfba4 Introduce a register_taxonomy_args filter for filtering the arguments passed when calling register_taxonomy(). This is the taxonomy equivalent of the newly introduced register_post_type_args filter.
Fixes #33990
Props tyxla for initial patch

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


git-svn-id: http://core.svn.wordpress.org/trunk@34752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 23:57:25 +00:00
John Blackbourn
9bc54c9442 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.
Fixes #34117

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


git-svn-id: http://core.svn.wordpress.org/trunk@34751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 23:44:26 +00:00
John Blackbourn
9d7d1508e2 Add VideoPress as a trusted oEmbed provider.
Fixes #34031
Props kraftbj

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


git-svn-id: http://core.svn.wordpress.org/trunk@34750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 23:20:28 +00:00
John Blackbourn
939ef7887e shttp is not a protocol.
See #27115

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


git-svn-id: http://core.svn.wordpress.org/trunk@34749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 22:48:26 +00:00
John Blackbourn
815635548a Switch the remaining user-facing links to wordpress.org over to HTTPS.
Fixes #27115

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


git-svn-id: http://core.svn.wordpress.org/trunk@34748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 22:46:28 +00:00
Drew Jaynes
6f7a298c18 Docs: Fix the placement and ordering of some @since tags following [34780].
See #12133. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 20:50:25 +00:00
Drew Jaynes
bfa2a5295e Docs: Improve a variety of inline docs in wp-includes/l10n.php.
* Corrects phrasing used in the descriptions for and filters in `_n()` and `_nx()`, particularly with regard to the use of 'singular' instead of 'single' or '1', and 'plural' instead of 'not 1'.
* Adds example usage to `_n()`, `_nx()`, `_nx_noop()`, and `translate_nooped_plural()`.
* Adds hash notation `@return` doc for `_n_noop()` and `_nx_noop()`.
* Adds missing default values for the optional `$domain` parameter in several places.

Props johnbillion.
Fixes #34127.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 20:45:24 +00:00
John Blackbourn
7707dbf862 Introduce support for array format field names in WP_Widget::get_field_name() and WP_Widget::get_field_id().
Fixes #12133
Props ch1902, welcher

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


git-svn-id: http://core.svn.wordpress.org/trunk@34745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 20:24:24 +00:00
Jeremy Felt
dba5a73119 Docs: Add deprecation note for $use_cache in get_site_option().
Props johnbillion.
See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:32:30 +00:00
Jeremy Felt
54512d64cb MS: Use *_network_option() functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function.

This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation.

Props spacedmonkey.
See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:08:26 +00:00
Jeremy Felt
3c2273ef45 MS: Introduce *_network_option functions.
Introduces `add_network_option()`, `update_network_option()`, `get_network_option()`, and `delete_network_option()`, which use the internals previously found in the `*_site_option()` functions and allow for a network ID to enable cross network storage and retrieval of network options.

* `*_site_option()` functions are now wrappers for `*_network_option()` and will interact with options for the current network in a multisite environment.
* All will continue to fallback to `*_option()` for non-multisite uses.
* Adds basic tests for cross network storage and retrieval.
* Existing tests for `*_site_option()` functions provide coverage for storage and retrieval of current network options.

Props spacedmonkey, DrewAPicture, jeremyfelt.
See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 18:01:27 +00:00
Aaron Jorbin
0da3150609 Add PHP Nightlies to the test suite
PHP branched master for 7, which means that nightly builds are now technically 7.1. The difference is minimal at the moment, but it's a good idea for us to test against the nightly build in part so that regressions can be reported upstream. Nightlies are allowed failure so that the build doesn't go red due to unstable versions. Additionally, nightlies are not officially supported by WordPress Core.

See #33410

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


git-svn-id: http://core.svn.wordpress.org/trunk@34741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 16:51:28 +00:00
Boone Gorges
d3dd6a93e8 More explicit tests for image_get_intermediate_size().
After [33807], `Tests_Image_Intermediate_Size::test_get_intermediate_sizes_by_array_zero_width()`
was failing intermittently. This failure was due to the use of a random number
for the image height. When the height was sufficiently large - $height >= 202 -
to change the aspect ratio of the cropped image (based on WP's threshold of a
1px difference), the test passed. And when the height was exactly 200, the
medium image size was hit exactly. The failure occurred only with a height of
201, which is close enough to 200 so that WP determined that the aspect ratio
of the potential crop was close enough to match.

The current changeset splits the test into two, in order to demonstrate the
failure.

See #17626. Fixes #34087.
Built from https://develop.svn.wordpress.org/trunk@34775


git-svn-id: http://core.svn.wordpress.org/trunk@34740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 14:14:24 +00:00
Boone Gorges
1b91e135a1 Pinking shears in shortcode test file.
Built from https://develop.svn.wordpress.org/trunk@34774


git-svn-id: http://core.svn.wordpress.org/trunk@34739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 13:52:14 +00:00
Boone Gorges
334fe04832 Improvements to PCRE benchmarking tests.
* Add test file accidentally omitted from [34761].
* Bail properly from benchmarker when a `preg_last_error()` is found.

Props miqrogroove.
See #34121.
Built from https://develop.svn.wordpress.org/trunk@34773


git-svn-id: http://core.svn.wordpress.org/trunk@34738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 13:51:50 +00:00
Boone Gorges
4265fa897a Fix preg_match_all() syntax in PCRE benchmark test util.
In versions of PHP earlier than 5.4, the `$matches` parameter was required.
Excluding it here meant that PCRE benchmarking tests were erroring on older
versions of PHP without cleaning up the PCRE ini settings, causing various
problems on later tests.

Props miqrogroove, dd32, boonebgorges.

And to the cosmic forces that cause bugs like this. The best part of waking up
is diagnosing leakage between automated tests.

See #34121.
Built from https://develop.svn.wordpress.org/trunk@34772


git-svn-id: http://core.svn.wordpress.org/trunk@34737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 13:51:26 +00:00
Dion Hulse
19ee18ccc2 Skip two wp_json_encode() tests when mbstring is unavailable.
Built from https://develop.svn.wordpress.org/trunk@34771


git-svn-id: http://core.svn.wordpress.org/trunk@34736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 08:55:26 +00:00
Drew Jaynes
c6bbcdb256 Docs: Remove documentation for a phantom parameter not actually passed to the is_email filter.
The documentation error was introduced in [26485].

Props chrisvendiadvertisingcom.
Fixes #34097.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 07:03:25 +00:00
Drew Jaynes
a3ead57e90 Introduce the wp_add_nav_menu_item action, fired immediately after a new nav menu item has been added.
This hook can be leveraged both for the legacy menus interface and the menus integration in the Customizer, as both use the containing function, `wp_update_nav_menu_item()`.

Props MikeHansenMe, tyxla.
Fixes #30983.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 06:46:24 +00:00
Drew Jaynes
e6da469a20 Docs: Fix a few syntatical issues with inline documentation in wp-includes/post-template.php.
Props welcher.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 06:38:26 +00:00
Scott Taylor
08ab8bad4b Unit Tests: when wp_using_ext_object_cache(), mark some transient tests as skipped.
Props ocean90.
See #31491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 05:10:25 +00:00
Scott Taylor
8d1161392a Unit Tests: tests that want to flush the cache should use their instance method instead of calling wp_cache_flush() - more properties need to be wiped out in between tests.
Props ocean90.
See #31491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 05:09:25 +00:00
Scott Taylor
51cdca0906 Unit Tests: in Tests_Cache::test_wp_cache_init(), when wp_using_ext_object_cache(), just check that the global is an instance of WP_Object_Cache. External object cache instances of WP_Object_Cache will contain resources as props that will always have differing internal IDs, so strict comparison won't work.
See #31491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 05:06:24 +00:00
Drew Jaynes
769ad80521 Docs: Also clarify the expected element types depending on the value of $action in the hook doc for the plugins_api filter.
See [34763] for context.

See #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 04:52:25 +00:00
Drew Jaynes
8478a1341b Docs: Clarify the expected replacement element type if replacing the object or array in plugins_api() via the plugins_api hook.
If the `$action` type is 'query_plugins' or 'plugin_information', the API will return an object, thus an object should be passed if replacing it. For 'hot_tags' and 'hot_categories', the same logic applies, but with arrays instead.

See #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 04:48:25 +00:00
Scott Taylor
5c6c4e3713 Posts: In wp_insert_post(), don't set post_date to current time if it can be derived from a passed value for post_date_gmt.
Adds unit tests.

Props oso96_2000, kawauso.
Fixes #15946.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 04:36:24 +00:00
Scott Taylor
7a0f8602f3 Shortcodes/Formatting: Add PCRE Performance Testing
* Move pattern from `wptexturize()` into a separate function.
* Move pattern from `wp_html_split()` into a separate function.
* Beautify code for `wp_html_split()`.
* Remove unnecessary instances of `/s` modifier in patterns that don't use dots.
* Add `tests/phpunit/data/formatting/whole-posts.php` for testing larger strings.
* Add function `benchmark_pcre_backtracking()`.
* Add tests for `wp_html_split()`.
* Add tests for `wptexturize()`.
* Add tests for `get_shortcode_regex()`.

Props miqrogroove.
Fixes #34121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 04:26:25 +00:00
Scott Taylor
da1c938a5c Plugins: on the Install page, move the name of each plugin into the <h4> to accommodate screen readers.
Props afercia, ChrisMKindred.
Fixes #32400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 04:16:27 +00:00
Jeremy Felt
ddc1670e90 Tests: Clarify site option tests storing and retrieving serialized data.
See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 02:06:26 +00:00
Jeremy Felt
8908480594 Tests: Split test_default_filter() Site Option test into multiple tests.
See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 01:56:26 +00:00
Jeremy Felt
a7a239b39b Tests: Split test_the_basics() Site Option test into many tests.
Many assertions in one test are now many tests with one assertion.

See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 01:33:50 +00:00
Jeremy Felt
e2c6216b21 MS: Remove @todo for ms_protect_special_option() from delete_site_option().
This todo has been in place since the original merge of MU. At the time of merge, `wpmu_protect_special_option()` protected an empty array, and there has been no noticeable need since. As we introduce `_network_option()`, let's leave this behind. A new ticket can be opened if necessary.

See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 22:46:28 +00:00
John Blackbourn
ea28454867 Deprecate get_admin_users_for_domain(). This function has never been used in core.
Fixes #34122

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


git-svn-id: http://core.svn.wordpress.org/trunk@34720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 22:27:24 +00:00
John Blackbourn
f33c6a6650 This function is blessed.
Built from https://develop.svn.wordpress.org/trunk@34754


git-svn-id: http://core.svn.wordpress.org/trunk@34719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 22:24:24 +00:00
John Blackbourn
d0d9e4c8d8 Deprecate create_empty_blog(). This function has never been used in core.
Fixes #34120

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


git-svn-id: http://core.svn.wordpress.org/trunk@34718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 22:10:26 +00:00
Dominik Schilling
25b1dd594a Install: Replace the "Privacy" setting with the "Search Engine Visibility" setting from Reading Settings.
Props Clorith, ocean90.
Fixes #27628.
See #16416.
Built from https://develop.svn.wordpress.org/trunk@34752


git-svn-id: http://core.svn.wordpress.org/trunk@34717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 21:35:25 +00:00
Dominik Schilling
18413f3e81 Upgrader: Clear plugin/theme caches directly after a plugin/theme has been installed.
`wp_update_plugins()` and `wp_update_themes()` are both hooked into `upgrader_process_complete` with priority 10. But at this stage the caches in `get_plugins()`, `search_theme_directories()`, and `wp_get_themes()` aren't refreshed yet so both functions couldn't fetch any translations for the new plugin/theme.
To reset the caches `wp_clean_themes_cache()` and `wp_clean_plugins_cache()` are now hooked into `upgrader_process_complete` with priority 9.

Fixes #34029.
Built from https://develop.svn.wordpress.org/trunk@34751


git-svn-id: http://core.svn.wordpress.org/trunk@34716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 21:21:25 +00:00
Jeremy Felt
7c7eee01ef MS: Remove registration of ID column in Sites and Users list tables.
Reverts a portion of [34289] and leaves the render for the column behind. A plugin can register these fields for display via filter.

Fixes #18661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 20:58:24 +00:00
Jeremy Felt
f69396c229 MS: Provide better UI when a main site's /blog prefix is changed.
The main site on a new network is forced by default into using `/blog` as the prefix for its permalink structure. This can be changed easily through the network admin, though the `options-permalink.php` screen is then unusable to make further changes to the structure.

Now, if `/blog/` is not at the beginning of the `permalink_structure` option, we do not force `/blog` as a prefix in the UI.

Fixes #12002.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 20:39:24 +00:00
Dominik Schilling
113a9d4517 Language Upgrader: Re-use the automatic upgrader skin if the parent upgrader is using it.
Prevents broken Ajax responses when `Language_Pack_Upgrader::async_upgrade()` gets triggered during a shiny update.

Fixes #34048.
Built from https://develop.svn.wordpress.org/trunk@34748


git-svn-id: http://core.svn.wordpress.org/trunk@34713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 20:25:26 +00:00
Scott Taylor
99347fd96e Shortcodes: Fix PCRE performance bugs in get_shortcode_regexp() and related to wptexturize(), do_shortcode(), and strip_shortcodes()
Alters unit tests.

Props miqrogroove.
Fixes #33517.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 18:05:25 +00:00
Drew Jaynes
a985977856 Docs: Update the argument descriptions for $child_of and $hierarchical in get_pages() to more closely reflect expected behavior.
See #18701. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 17:40:25 +00:00
Scott Taylor
d8179a2a1f Shortcodes: prevent registration of invalid shortcode names.
Adds unit tests.

Props miqrogroove.
Fixes #34090.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 17:34:24 +00:00
Scott Taylor
82f244414e Shortcodes: clarify the @return docs for shortcode_parse_atts().
Props miqrogroove.
See #23307.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 17:32:26 +00:00
Andrea Fercia
0acededa82 In wp_comment_reply() change the H5 headings in fieldset legends for better accessibility.
Also, add a "Edit Comment" legend before the Quick Edit form to pair it with "Reply to Comment" and "Add new Comment" and move the Name, Email, and URL fields after the Comment textarea.

Props joedolson, afercia.

Fixes #33757.
Built from https://develop.svn.wordpress.org/trunk@34743


git-svn-id: http://core.svn.wordpress.org/trunk@34708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 14:52:25 +00:00
Andrea Fercia
5a2627d38a Bump H3 headings to H2 on the Network Site Users screen for better accessibility.
Fixes #34081.
Built from https://develop.svn.wordpress.org/trunk@34742


git-svn-id: http://core.svn.wordpress.org/trunk@34707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 14:33:26 +00:00
Boone Gorges
8be90670f3 Make sure permastruct is set in comments_template() tests.
After [34735].
Built from https://develop.svn.wordpress.org/trunk@34741


git-svn-id: http://core.svn.wordpress.org/trunk@34706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 12:27:29 +00:00
Dion Hulse
dc9203d753 Rewrite insert_with_markers() to use flock() when available, significant cleanup of the function too.
The call to `flock()` is an exclusive advisory lock, which in my testing only PHP respects (apache continues to read it).
Not all filesystems support locking (remote NFS mounts for example) so this offers minimal benefit to those platforms, but offers much better protection against file corruption on systems which do support it.
The call is blocking, so a second process will wait for the first to complete before writing if supported.

See #31767

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


git-svn-id: http://core.svn.wordpress.org/trunk@34704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 07:46:27 +00:00
Dion Hulse
a4c41f6ee4 Updates: SSH2 Transport: Add a connection error when the SFTP subsystem cannot be initialized.
Fixes #33478

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


git-svn-id: http://core.svn.wordpress.org/trunk@34703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:43:25 +00:00
Dion Hulse
d8aaf01b97 Updates: SSH2 Transport: Use a work around to avoid a bug where PHP's SSH2 extension fails to list the contents of the / directory.
This fixes issues where SSH2 with chrooted environments runs into a `Unable to locate WordPress Content directory (wp-content).` error.

The workaround is to simply list the contents of the `/./` directory instead of `/`.

Fixes #33919

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


git-svn-id: http://core.svn.wordpress.org/trunk@34702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:40:25 +00:00
Gary Pendergast
3942226c90 WPDB: Allow null values in the CRUD functions.
Specifically, `::insert()`, `::replace()`, `::update()`, and `::delete()` can now set a column to `NULL`, or add the `IS NULL` condition to the `WHERE` clause.

This is based on [backpress 279].

Props pento, nbachiyski, sorich87.

Fixes #15158.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:37:26 +00:00
Dion Hulse
9caa7c4ba7 Press This: Make the regular expressions for matching images easier to read by not requiring escaping.
Fixes #32878

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


git-svn-id: http://core.svn.wordpress.org/trunk@34700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:16:25 +00:00
Boone Gorges
b23fdba5a2 Ensure that comment permalinks reflect pagination.
After [34561], `wp_list_comments()` no longer passed all of a post's comments
to `Walker_Comments`. As a result, calls to `get_comment_link()` occurring
inside the comment loop had insufficient context to determine the proper
'cpage' value to use when generating comment permalinks. This, in turn, caused
comment permalinks to behave erratically.

The current changeset addresses the problem as follows:

* `get_comment_link()` now accepts a 'cpage' parameter. When present, 'cpage' will be used to build the comment permalink - no automatic calculation will take place.
* When called within the main loop, `wp_list_comments()` calculates the proper 'cpage' value for comments in the loop, and passes it down to `get_comment_link()`.
* `cpage` and `comment-page-x` query vars are generally required in comment permalinks (see #34068), but an exception is made when 'default_comment_page=oldest': the bare post permalink will always be the same as `cpage=1`, so `cpage` is excluded in this case.

Props peterwilsoncc for assiduous spreadsheeting.
Fixes #34073.
Built from https://develop.svn.wordpress.org/trunk@34735


git-svn-id: http://core.svn.wordpress.org/trunk@34699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:13:25 +00:00
Scott Taylor
b97dd529fa Canonical: remove unused code (commented-out) from redirect_canonical().
Props hakre, chriscct7.
Fixes #16934.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:09:50 +00:00
Dion Hulse
731b51ee7f Updates: Try a more compatible method to detect if a file exists when using the FTP Extension.
This change causes it to list the parent directories files, and assets that the node exists within the returned listing, this is a little more compatible than relying upon the FTP server to correctly filter the returned resultset to the specific file/node being requested.
Fixes #28013

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


git-svn-id: http://core.svn.wordpress.org/trunk@34697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:09:25 +00:00
Boone Gorges
51ddf2ca9c Correct some WP_Query metadata lazyloading docs.
Props dlh.
Fixes #34047.
Built from https://develop.svn.wordpress.org/trunk@34732


git-svn-id: http://core.svn.wordpress.org/trunk@34696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 04:01:48 +00:00
Boone Gorges
80654eb17a s/add_action()/add_filter() in WP_Query metadata lazyloading.
Props dlh.
See #34047.
Built from https://develop.svn.wordpress.org/trunk@34731


git-svn-id: http://core.svn.wordpress.org/trunk@34695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 04:01:24 +00:00
Boone Gorges
b2f253fc8e Prevent extra db queries in WP_Comment::get_children().
`WP_Comment_Query::fill_descendants()` queries for a comment tree in a way that
minimizes database overhead, and places the located descendants with their
proper parents. However, it doesn't touch leaf nodes - comments with no
children - so future calls to `get_children()` on those comment objects
result in unnecessary database queries. To prevent this, `fill_descendants()`
now sets a `populated_children` flag on all located `WP_Comment` objects.

See #8071.
Built from https://develop.svn.wordpress.org/trunk@34730


git-svn-id: http://core.svn.wordpress.org/trunk@34694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 03:58:23 +00:00
Boone Gorges
dd9709d179 Simplify pagination logic in comments_template().
[34561] "fixed" the problem of newest-first comments showing fewer than
'per_page' comments on the post permalink when the total number of comments
was not divisible by 'per_page'. See #29462. But this fix caused numerous
other problems. First, comment pages reported by `get_page_of_comment()`
(which expects comment pages to be filled oldest-first) were no longer correct.
Second, and more seriously, the new logic caused comments to be shifted
between pages, making their permalinks non-permanent.

The current changeset reverts the changed behavior. In order to preserve the
performance improvements introduced in [34561], an additional query must be
performed when 'default_comments_page=newest' and 'cpage=0' (ie, you're viewing
the post permalink). A nice side effect of this revert is that we no longer
need the hacks required to determine proper comment pagination, introduced in
[34561].

See #8071. See #34073.
Built from https://develop.svn.wordpress.org/trunk@34729


git-svn-id: http://core.svn.wordpress.org/trunk@34693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 03:11:30 +00:00
Scott Taylor
594a208753 Post List Table: Ensure that edit.php with no query string produces the proper markup and links in the date column header.
Add 2 methods to `WP_List_Table`, `->get_orderby()` and `->get_order()`. Override the methods in `WP_Posts_List_Table`.

`WP_Posts_List_Table` calls `wp_edit_posts_query()` in `->prepare_items()` which is a wrapper for `wp()`. As such, we can obtain `orderby` and `order` via `get_query_var()`, instead of the URL.

Fixes #25493.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 02:10:25 +00:00
Drew Jaynes
ec9ec3138e Formatting: Rename the $richedit parameter in format_to_edit() to $rich_text.
Previously, it was necessary to explain in a double-negative that `$richedit` being false would prevent `$content` from being passed through `esc_textarea()`. The updated `$rich_edit` name and documentation now better reflects the intent of the parameter.

Fixes #21613.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 02:01:26 +00:00
Helen Hou-Sandí
1bacb00c01 Comments: Trash blacklisted comments by default.
If trash is disabled, they wil continue to go into spam like they do now.

props wonderboymusic, solarissmoke, MikeHansenMe.
fixes #7051.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 01:49:25 +00:00
Drew Jaynes
3d6f53da06 Docs: Document declaration of the $submenu_file global in wp-admin/menu-header.php.
See #24531. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 01:48:25 +00:00
Drew Jaynes
2a0a841a13 Declare the $submenu_file global to avoid a notice generated by passing it as a parameter to the submenu_file hook, introduced in [34722].
Fixes #24531.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 01:23:25 +00:00
Helen Hou-Sandí
7365e0ebbb Don't show the "Add New" link on post-new.php.
Using the same `$post_new_file` global variable name in `wp-admin/menu.php` in [33723] was unintentional, but we're already unsetting other variables that are in global scope so we can just unset this one as well. Someday the admin menu won't be a big pile of sad and cryptic globals. Maybe.

props johnjamesjacoby, norcross.
fixes #34045.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 00:48:25 +00:00
Sergey Biryukov
145deeeada Add 'submenu_file' filter for the file of an admin menu sub-menu item.
This complements the `'parent_file'` filter added in [12712].

Props swissspidy, kraftbj.
Fixes #24531.
Built from https://develop.svn.wordpress.org/trunk@34722


git-svn-id: http://core.svn.wordpress.org/trunk@34686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 00:23:28 +00:00
Weston Ruter
35631aeeeb Customize: Style the nav menu "Add Items" button as disabled when reordering.
Fixes CSS selector to match what is being used for the "Add Widget" button in the customizer.

Props umesh.nevase.
Fixes #34102.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 22:55:26 +00:00
Boone Gorges
d6a1a9655c Fix db_version juggling during non-multisite tests.
Continuing with the "code is poetry" theme after [34719], we need to continue
to update the option in the database on non-multisite in this
`wp_insert_term()` test.

See #31130.
Built from https://develop.svn.wordpress.org/trunk@34720


git-svn-id: http://core.svn.wordpress.org/trunk@34684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 13:28:26 +00:00
Boone Gorges
a09e95214a Prevent Multisite term tests from hitting database for 'db_version'.
[34718] introduced a 'db_version' check to term meta functions, to ensure that
they don't run when the term meta schema is not yet in place. This call to
`get_option()` causes a database hit during Multisite tests, due to the
presence of the `WP_INSTALLING` constant. See #31130. The extra database
queries are causing cache tests to fail.

In similar cases, we have `markTestSkipped()` when `is_multisite()`. Because
the term meta API is so extensive - term meta caches can be primed anywhere a
`WP_Query` loop is fired up - we implement a more generous workaround in this
case. To prevent `get_option( 'db_version' )` from hitting the database during
multisite unit tests, we use a 'pre_option_' filter.

Heaven help us.

See #34091.
Built from https://develop.svn.wordpress.org/trunk@34719


git-svn-id: http://core.svn.wordpress.org/trunk@34683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 13:09:27 +00:00
Boone Gorges
dac1de24f7 Bail out of termmeta functions if schema is not up-to-date.
Termmeta cache priming was throwing database errors on installations that had
not yet gone through the database update routine. To avoid errors in all cases,
the check has been added to all termmeta functions. These checks will be
removed in a future version of WordPress. (Hang on to your hats!)

Fixes #34091.
Built from https://develop.svn.wordpress.org/trunk@34718


git-svn-id: http://core.svn.wordpress.org/trunk@34682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 04:53:25 +00:00
Drew Jaynes
8b4c499664 Docs: There are quite alot of typos in core inline comments.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 04:13:48 +00:00
Boone Gorges
5dcced2d13 Use array hash notation for get_comment_link() $args.
See #34068, #34073.
Built from https://develop.svn.wordpress.org/trunk@34716


git-svn-id: http://core.svn.wordpress.org/trunk@34680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 04:13:25 +00:00
Drew Jaynes
85eafd7632 Themes: Introduce three new arguments for get_the_post_navigation(), in_same_term, excluded_terms, and taxonomy.
The addition of these new arguments brings `get_the_post_navigation()` into argument parity with `get_previous_post_link()` and `get_next_post_link()`, both of which it wraps, and will allow for more flexibility in configuring the next and previous post links for simultaneous display in themes.

Props ChaseWiseman.
Fixes #32618.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 03:41:26 +00:00
Drew Jaynes
5ec1077a38 Widgets: Introduce a delete_widget action, which fires after a widget has been marked for deletion.
Props afercia for the initial patch.
Fixes #27444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 03:21:26 +00:00
Boone Gorges
67077ce72a Fix logical errors in some comment pagination tests.
The tests included in [34669] contained a couple of problems:

* Comments were not always created in the expected order, due to the incorrect use of 'comment_date_gmt'.
* 'asc'/'desc' and 'older'/'newer' were confused.
* 'default_comments_page=newest' ('last') didn't properly account for the cpage=1 offset.

The code itself powering this pagination was correct; it's only the tests that
were wrong.

See #8071.
Built from https://develop.svn.wordpress.org/trunk@34713


git-svn-id: http://core.svn.wordpress.org/trunk@34677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 03:07:26 +00:00
Drew Jaynes
d25ac6bfec Docs: Mark a few optional parameters as such in wp-includes/rewrite-functions.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 02:42:26 +00:00
Boone Gorges
654eeb3785 Improve lazyloading of comment meta in WP_Query loops.
Lazy-loading logic is moved to a method on `WP_Query`. This makes it possible
for comment feeds to take advantage of metadata lazyloading, in addition to
comments loaded via `comments_template()`.

This new technique parallels the termmeta lazyloading technique introduced in
[34704].

Fixes #34047.
Built from https://develop.svn.wordpress.org/trunk@34711


git-svn-id: http://core.svn.wordpress.org/trunk@34675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 01:35:26 +00:00
Scott Taylor
21752923f0 List Tables: .column-date needs to become wider at smaller screen sizes, bump it from 10% to 14% at the breakpoint to prevent wrapping.
Fixes #32691.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 01:25:25 +00:00
Scott Taylor
41bc0aee88 Revert [34083], I was willing to try this out for the greater good. The good was not greater. There is too much baggage associated with this specific change as pertains to BC and expected layout.
See #32691.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 01:19:24 +00:00
Scott Taylor
619063b4e2 Rewrite: allow add_rewrite_rule|WP_Rewrite::add_rule() to accept an associative array for the value of $redirect instead of requiring a query string.
Adds unit tests.

Props scribu, DrewAPicture.
Fixes #16840.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 01:11:25 +00:00
Scott Taylor
882c34d555 List Tables: only hide bulk actions when there are no items, don't hide all of the extra table nav.
Fixes #33824.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 00:47:27 +00:00
Drew Jaynes
471a507dfd Docs: Add an @see reference for the "use-instead-of" function in the DocBlock for force_ssl_login(), deprecated in [34700].
See #34011. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 22:46:25 +00:00
Drew Jaynes
492c11508a Users: Add the default arguments array as a second parameter to the wp_dropdown_users_args filter, introduced in [34692].
Adjust hook doc descriptions accordingly.

See #19867.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 22:39:25 +00:00
Boone Gorges
db880777f4 Improve lazyloading of term metadata in WP_Query loops.
[34529] introduced lazyloading for the metadata belonging to terms matching
posts in the main `WP_Query`. The current changeset improves this technique
in the following ways:

* Term meta lazyloading is now performed on the results of all `WP_Query` queries, not just the main query.
* Fewer global variable touches and greater encapsulation.
* The logic for looping through posts to identify terms is now only performed once per `WP_Query`.

Props dlh, boonebgorges.
See #34047.
Built from https://develop.svn.wordpress.org/trunk@34704


git-svn-id: http://core.svn.wordpress.org/trunk@34668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 22:00:24 +00:00
John Blackbourn
ae5f825093 force_ssl_login() has been functionally identical to force_ssl_admin() since 4.0 (#10267), so its test assertions can be removed as the function has been deprecated in [34700]. The remaining assertions suitably cover force_ssl_admin().
See #34011

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


git-svn-id: http://core.svn.wordpress.org/trunk@34667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 21:44:33 +00:00
Scott Taylor
addb8fe492 Customizer: make "Current header" clickable in the same way that "Background Image" is - will open the media modal.
Props umesh.nevase.
Fixes #33586.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 21:40:24 +00:00
Scott Taylor
84dbb036d1 Network Upgrade: switch <h3> to <h2>.
Props afercia.
Fixes #34082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 21:29:13 +00:00
John Blackbourn
a8728b987f Deprecate force_ssl_login(), which is simply a wrapper for force_ssl_admin() and is not used in core.
Fixes #34011

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


git-svn-id: http://core.svn.wordpress.org/trunk@34664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 21:28:50 +00:00
Drew Jaynes
25f5bf2389 Tests: Add two tests for the current behavior of the 'hierarchical' and 'child_of' arguments in get_pages().
See #18701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 21:28:26 +00:00
Drew Jaynes
504ff681d4 Tests: Add two tests for the current 'hierarchical' argument behavior in get_pages().
See #18701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 20:50:26 +00:00
Boone Gorges
c36d4fb8a9 WP_Query should not ignore an offset of 0.
Props mazurstas.
Fixes #34060.
Built from https://develop.svn.wordpress.org/trunk@34697


git-svn-id: http://core.svn.wordpress.org/trunk@34661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 19:37:23 +00:00
Boone Gorges
5b32e27a00 Fix 'exclude_tree' in wp_list_categories().
The 'exclude_tree' parameter must be compatible with 'hierarchical';
previously, 'hierarchical' canceled it out. This changeset also makes it so
that 'exclude_tree' is compatible with 'exclude'. When both are passed, and
'hierarchical' is true, the descendant trees of terms in both parameters will
be excluded from matched terms.

Props tott, webord, MikeHansenMe.
Fixes #12981.
Built from https://develop.svn.wordpress.org/trunk@34696


git-svn-id: http://core.svn.wordpress.org/trunk@34660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 19:12:27 +00:00
Andrea Fercia
9bb09f0e08 Bump H3 headings to H2 on the Network Settings screen for better accessibility.
Fixes #34078.
Built from https://develop.svn.wordpress.org/trunk@34695


git-svn-id: http://core.svn.wordpress.org/trunk@34659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 18:52:26 +00:00
Aaron Jorbin
0209b32d67 Cleanup image size in unit tests
This helps prevent test leakage that can cause Tests_Media::test_add_image_size to break.

See #33968


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


git-svn-id: http://core.svn.wordpress.org/trunk@34658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 17:48:26 +00:00
John Blackbourn
27646b7ee0 Revert the introduction of validation of the comment author's email address when sanity checking input in wp-comments-post.php (introduced in r34274). This allows a problematic email address to fall through to the correct validation routine and show the "Please enter a valid email address" as expected.
Fixes #23416

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


git-svn-id: http://core.svn.wordpress.org/trunk@34657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 17:27:26 +00:00
Drew Jaynes
7866772449 Users: Introduce the wp_dropdown_users_args filter, making it possible to filter the arguments for wp_dropdown_users() before the query is run.
The 'name' argument (or the `WP_Screen` object if in the admin) can be used to help target specific instances of `wp_dropdown_users()` via this hook.

Props norcross.
See #19867.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 15:40:27 +00:00
John Blackbourn
4d377dd4a1 On the Permalink Settings screen, add a link to the Nginx documentation when the current site is running Nginx. This is in lieu of showing actual Nginx configuration like we do for mod_rewrite or IIS.
Fixes #18852

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


git-svn-id: http://core.svn.wordpress.org/trunk@34655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 11:15:26 +00:00
Gary Pendergast
cf173408cd Permalinks: Add pretty permalinks for unattached attachments.
Previously, unattached attachments would have unsightly `/?attachment_id=1` URLs. As we've moved away from attachments being specifically attached to posts, instead being Media items, this has made the unattached URLs a more common occurrence.

We can breath easy once more, knowing that the world is a little bit safer from the horror of unnecessarily ugly URLs.

Props SergeyBiryukov, wonderboymusic, pento.

Fixes #1914.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 09:42:26 +00:00
Drew Jaynes
1d86c9c1ed Docs: Move the hook doc to once again directly precede the hook line for the getarchives_where filter following [34686].
See #21596.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 06:39:25 +00:00
Drew Jaynes
b69ef84a77 Tests: Relocate tests for general-template.php to a more logically-placed (and named) file, tests/general/template.php.
See #34070.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 05:52:26 +00:00
Drew Jaynes
d38e2fe848 Tests: Consolidate author-template tests into a single, more logically-placed file, tests/user/author.php.
See #34070.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 05:37:24 +00:00
Scott Taylor
eeb539e90f Allow wp_get_archives() to accept post_type as an arg.
Adds unit test.

Fixes #21596.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 05:11:24 +00:00
Gary Pendergast
1db89dd3bf Rewrite: Redirect attachment URLs when their slug changes.
Using the same logic that we use to redirect posts when their slug changes, we can provide the same functionality for attachments. Attachment pages are posts, too.

Props swissspdy.

Fixes #34043.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 04:58:25 +00:00
Scott Taylor
7efab8df3f Edit Media: wrap long filenames in the Publish meta box.
Fixes #34069.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 04:51:25 +00:00
Scott Taylor
f77499ed22 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.
Fixes #22010.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 04:32:25 +00:00
Scott Taylor
f2bd17193d XML-RPC: add a unit test for mw.editPost.
See #16980.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 04:28:25 +00:00
Scott Taylor
111c05ba47 XML-RPC: calculate the proper offset for GMT in wp.newPost, mw.newPost, and mw.editPost when post_date is set, wp.editComment when comment_date is set. post|comment_date is assumed to be GMT. This is only true if the timezone string for the site matches GMT.
Adds unit tests for each.

Props smerriman, justdaiv, wonderboymusic.
Fixes #30429.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 04:05:24 +00:00
Boone Gorges
f584a3debb Add unit tests for post_exists().
Props MikeHansenMe.
See #34012.
Built from https://develop.svn.wordpress.org/trunk@34680


git-svn-id: http://core.svn.wordpress.org/trunk@34644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 04:02:24 +00:00
Boone Gorges
061c536031 Don't require explicit taxonomy when getting terms by term_taxonomy_id.
Props wonderboymusic.
Fixes #30620.
Built from https://develop.svn.wordpress.org/trunk@34679


git-svn-id: http://core.svn.wordpress.org/trunk@34643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 03:52:25 +00:00