Commit Graph

20308 Commits

Author SHA1 Message Date
Andrew Ozz
698b825760 Responsive images: when creating srcset do not exclude the image size which is in the src attribute even when it is larger than max_srcset_image_width.
Props joemcgill.
Fixes #35108 for trunk.
Built from https://develop.svn.wordpress.org/trunk@36110


git-svn-id: http://core.svn.wordpress.org/trunk@36075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-28 02:29:28 +00:00
Boone Gorges
eefe6b0779 Force non-public taxonomies to have a query_var of false.
[35333] implemented `public=false` for taxonomies. The implementation prevented
non-public taxonomies from having their archives accessed via query_var during
a normal request. But it didn't prevent non-public taxonomies from registering
their query vars in the `$wp_taxonomies` global. The latter implementation
details causes problems specifically when a taxonomy is registered with
`query_var=true`; for public taxonomies, `register_taxonomy()` translates this
into a query_var equivalent to the taxonomy name, but in the case of non-public
taxonomies, the query_var was set to the boolean itself. The boolean then
causes problems when using non-strict comparison to filter taxonomy objects by
query_var, as when using `get_taxonomies()`.

This changeset addresses the issue by forcing the query_var property of
non-public taxonomies to `false`.

Fixes #35089.
Built from https://develop.svn.wordpress.org/trunk@36108


git-svn-id: http://core.svn.wordpress.org/trunk@36073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-27 16:41:27 +00:00
Sergey Biryukov
20594e4ecc Docs: Improve documentation for wp_admin_css_color().
Props kiranpotphode.
Fixes #34857.
Built from https://develop.svn.wordpress.org/trunk@36107


git-svn-id: http://core.svn.wordpress.org/trunk@36072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-27 16:32:29 +00:00
Sergey Biryukov
b0b561517d Docs: Fix typo in a comment in wp_rand().
Props boluda.
Fixes #35228.
Built from https://develop.svn.wordpress.org/trunk@36102


git-svn-id: http://core.svn.wordpress.org/trunk@36067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 11:07:28 +00:00
Dion Hulse
85718ebf9a Allow map_deep() to work with object properties containing a reference. Restores the previous behaviour of stripslashes_deep().
Props jeff@pyebrook.com, swissspidy.
See #22300, [35252].
Fixes #35058.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 05:22:26 +00:00
Dion Hulse
484f118eec Tests: Use the correct URL in some shortcode tests.
Built from https://develop.svn.wordpress.org/trunk@36099


git-svn-id: http://core.svn.wordpress.org/trunk@36064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 04:51:26 +00:00
Dion Hulse
2038a29352 Shortcodes: = is a reserved character in shortcode names, mark it as such.
This allows for shortcodes such as `[shortcode=attribute]` to work, which while never intentionally supported were widely used in the pre-shortcode days.

Props aaroncampbell.
Fixes #34939 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 04:46:28 +00:00
Dion Hulse
67c5150ba6 Canonical: Output correct canonical links for paged posts when not using pretty permalinks.
Props peterwilsoncc.
Fixes #34890

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


git-svn-id: http://core.svn.wordpress.org/trunk@36061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 04:28:26 +00:00
Dion Hulse
1d19b930fc Nav Menus: Avoid a PHP Notice when a menu contains a now unregistered post type archive.
Props kucrut.
Fixes #34449 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 04:05:25 +00:00
Dion Hulse
d5d401ad10 Pages: get_page_uri() should return the URI at which the resource being accessed is available at, this may include non-'publish' status posts.
Reverts [34001] and fixes the original issue in #15963 - avoiding a PHP Notice for when the post doesn't exist.

Props tharsheblows.
See #15963.
Fixes #35084.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 03:46:28 +00:00
Sergey Biryukov
63cc66469b Toolbar: In Comments link, replace title attribute containing the number of pending comments with a screen reader text.
Props slushman, rachelbaker.
Fixes #34895.
Built from https://develop.svn.wordpress.org/trunk@36093


git-svn-id: http://core.svn.wordpress.org/trunk@36058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 01:40:27 +00:00
Sergey Biryukov
7270205975 Remove redundant title attribute from wp_star_rating(). Hide the visible number of ratings from assistive technologies.
This data is redundant, as the same information is already conveyed by the text hidden with `.screen-reader-text` class.

Props afercia.
Fixes #35141.
Built from https://develop.svn.wordpress.org/trunk@36092


git-svn-id: http://core.svn.wordpress.org/trunk@36057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 00:48:27 +00:00
Sergey Biryukov
7d9d7f2df4 Docs: Clarify that get_post_types() accepts 'not' as its $operator parameter.
Props barryceelen.
Fixes #35225.
Built from https://develop.svn.wordpress.org/trunk@36091


git-svn-id: http://core.svn.wordpress.org/trunk@36056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 00:38:25 +00:00
Sergey Biryukov
b742304f13 Docs: Clarify that wp_filter_object_list() accepts 'not' as its $operator parameter.
Props barryceelen.
See #35225.
Built from https://develop.svn.wordpress.org/trunk@36090


git-svn-id: http://core.svn.wordpress.org/trunk@36055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 00:37:26 +00:00
Aaron Jorbin
94aac7055c Help Tab Order should be based on the Priority Argument
[34370] made the order that tabs are returned respect the order they are added, however it broke the respect of priority. By using a ksort instead of a sort, we can restore that default behavior. This adjusts the unit tests so that both order added and priority are tested.

Props meitar,  swissspidy, jorbin
Fixes #35215. See #33941.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-25 22:44:27 +00:00
Sergey Biryukov
2328667dc9 Theme Editor: Break $wp_file_descriptions array into sections and reorder for consistency and readability.
Props ramiy.
Fixes #35223.
Built from https://develop.svn.wordpress.org/trunk@36088


git-svn-id: http://core.svn.wordpress.org/trunk@36053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-25 21:12:26 +00:00
Sergey Biryukov
11b89a88a9 Theme Editor: Add taxonomy.php, home.php, front-page.php, date.php, and singular.php to file descriptions.
Props ramiy.
See #35223.
Built from https://develop.svn.wordpress.org/trunk@36087


git-svn-id: http://core.svn.wordpress.org/trunk@36052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-25 21:05:25 +00:00
Sergey Biryukov
d9d21cf3ff Docs: Correct @return type for rest_parse_date().
Props TimothyBlynJacobs.
Fixes #35224.
Built from https://develop.svn.wordpress.org/trunk@36086


git-svn-id: http://core.svn.wordpress.org/trunk@36051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-25 20:41:26 +00:00
Sergey Biryukov
8009f97f79 Docs: Correct @return type for count_user_posts().
Props nofearinc.
Fixes #35222.
Built from https://develop.svn.wordpress.org/trunk@36085


git-svn-id: http://core.svn.wordpress.org/trunk@36050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-25 20:18:27 +00:00
Gary Pendergast
f9bba421b5 User: Don't continue checking a password reset key, if the hash is empty.
An empty reset key hash will never be valid, so we can skip seeing if it can be used to validate the given key, and return a failure early.

This fixes a warning in the unit tests under HHVM.

See #33926.



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


git-svn-id: http://core.svn.wordpress.org/trunk@36049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-24 02:49:26 +00:00
Gary Pendergast
bd1d11b3cf Upgrade PHPMailer from 5.2.10 to 5.2.14.
The full list of changes is available here: https://github.com/PHPMailer/PHPMailer/compare/v5.2.10...v5.2.14

Fixes #35212 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-24 01:59:26 +00:00
Konstantin Obenland
6c54bf4dcb Menus: Bring back line break between menu items.
While removing line breaks was great for all use cases except justified menu
items, it broke menus with justified menu items.
Reverts [34321].

Props wp-architect.
Fixes #35107.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-24 00:21:27 +00:00
Konstantin Obenland
8c72912432 Taxonomy: Pass object ids to delete_* actions.
Allows for more targeted updates to affected posts in callbacks.
Disambiguates `$objects` variable and amends unit tests.

Fixes #35213.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 23:44:26 +00:00
Boone Gorges
9e0f434726 Improve post-filter sanitization of excluded terms in get_adjacent_post().
See [36078], #35211.
Built from https://develop.svn.wordpress.org/trunk@36079


git-svn-id: http://core.svn.wordpress.org/trunk@36044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 20:15:25 +00:00
Boone Gorges
753243a6f7 Move excluded_terms filter in get_adjacent_post().
The filter was added in 4.4 [34528] #9571, but in a place where it could not
affect the adjacent post query.

Fixes #35211.
Built from https://develop.svn.wordpress.org/trunk@36078


git-svn-id: http://core.svn.wordpress.org/trunk@36043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 19:57:27 +00:00
Boone Gorges
7d734dd91f Move get_adjacent_post() tests to their own file.
See #35211.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 19:39:27 +00:00
Boone Gorges
303efba1ec Respect $_wp_suspend_cache_invalidation in clean_object_term_cache().
Props mwidmann.
Fixes #35208.
Built from https://develop.svn.wordpress.org/trunk@36076


git-svn-id: http://core.svn.wordpress.org/trunk@36041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 19:29:28 +00:00
Sergey Biryukov
421604cb67 Twenty Fifteen: Add left margin for lists inside blockquotes in editor-style.css.
Props diddledan.
Fixes #33380.
Built from https://develop.svn.wordpress.org/trunk@36075


git-svn-id: http://core.svn.wordpress.org/trunk@36040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 13:10:28 +00:00
John Blackbourn
0003a004db Docs: Miscellaneous docblock code quality tweaks.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:53:26 +00:00
John Blackbourn
7e43e20436 Docs: @see != @since.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:13:26 +00:00
Drew Jaynes
5a69733045 Docs: Properly mark the optional $redirect, $network_wide, and $silent parameters as such in the DocBlock for activate_plugin().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:00:27 +00:00
Drew Jaynes
0a314eed32 Docs: Add missing @since and properly mark the optional $type parameter as such in the DocBlock for the deprecated get_others_unpublished_posts() function.
Introduced in [5707].

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 06:58:25 +00:00
Drew Jaynes
ad64c0f2d7 Docs: Properly mark the $exclude_zeros parameter in the DocBlock for get_editable_user_ids() as optional.
Also fixes a couple of typos.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 06:53:26 +00:00
John Blackbourn
1402c3d8b4 Docs: Miscellaneous docblock corrections.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 06:31:27 +00:00
Dion Hulse
04bca9732b Users: When determining whether to show the reassign content option during user delete, don't rely upon WP_Query as it doesn't return all forms of content wp_delete_user() operates on.
This restores the reassign form when a user has a non-public post type or links assigned to them.

Props swissspidy & tharsheblows for initial patches.
Fixes #34993 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 04:46:28 +00:00
Andrew Ozz
e7b3d9cd11 Editor: remove the format_for_editor filter from the_editor_content after it runs as the next editor instance on the same page may not need it.
Props marcochiesi, azaozz.
Fixes #28403.
Built from https://develop.svn.wordpress.org/trunk@36062


git-svn-id: http://core.svn.wordpress.org/trunk@36027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-22 22:39:31 +00:00
John Blackbourn
c1976fff71 Revert [35804]. This change has unintended side effects, notably that media URLs in the admin area now unexpectedly use the https scheme. A more comprehensive approach will be taken in 4.5.
See #13941, #35120

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


git-svn-id: http://core.svn.wordpress.org/trunk@36026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-22 13:02:29 +00:00
Gary Pendergast
324cbf5d7e Embeds: Don't show embed discovery link on a static front page.
There's currently no iframe content being generated for a static front page. Giving out a link to that isn't an ideal user experience.

Props peterwilsoncc.

Fixes #35194 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-22 10:50:31 +00:00
Boone Gorges
e638f72a9a Order terms by 'name' when populating object term cache.
[34217] removed the `ORDER BY` clause from `update_object_term_cache()`, for
improved performance. But this proved to cause problems in cases where users
were expecting the results of `get_the_terms()` to be ordered by 'name'. Let's
revert the change for the time being, and look into more disciplined ordering
in a future release.

Props afercia.
See #28922. Fixes #35180.
Built from https://develop.svn.wordpress.org/trunk@36056


git-svn-id: http://core.svn.wordpress.org/trunk@36021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-22 01:51:28 +00:00
Gary Pendergast
2f53c1ada2 Tests: Use the default_storage_engine MySQL option on newer MySQL versions.
In MySQL 5.5.3, `storage_engine` was deprecated in favour of `default_storage_engine`, and subsequently removed in MySQL 5.7. To avoid errors when running tests on MySQL 5.7, we need to switch between the options based on MySQL version.

Props skithund, jeremyfelt.

Fixes #34692.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 22:27:25 +00:00
Drew Jaynes
79705d5cc1 Docs: Fix a typo in the 4.4.0 changlog entry in the intermediate_image_sizes_advanced hook doc.
Props morganestes.
Fixes #35190.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 22:24:27 +00:00
Andrea Fercia
dc31b503ec Accessibility: Remove the revisions limit title attribute from the Publish box.
The revisions limit warning is now always displayed in plain text even when the
limit is not reached yet. Removes the plus "+" from the revisions count number.

Fixes #35029.
Built from https://develop.svn.wordpress.org/trunk@36053


git-svn-id: http://core.svn.wordpress.org/trunk@36018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 14:39:28 +00:00
John Blackbourn
779d639c85 Tests: Prevent role capability pollution in Tests_Post_GetPostsByAuthorSql::test_user_has_access_only_to_private_posts_for_certain_post_types().
Built from https://develop.svn.wordpress.org/trunk@36050


git-svn-id: http://core.svn.wordpress.org/trunk@36015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 07:16:29 +00:00
John Blackbourn
bfc3302852 Tests: Fix all the things.
See #30017, #32394

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


git-svn-id: http://core.svn.wordpress.org/trunk@36014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 07:10:27 +00:00
John Blackbourn
405d5ba71d Query: Re-initialise any dynamically-added public query vars before running the public query vars test.
See #35115

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


git-svn-id: http://core.svn.wordpress.org/trunk@36013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 07:00:28 +00:00
John Blackbourn
3fdd127ce2 Tests: Shave a second off the user capability tests by reusing its user fixtures.
See #30017, #32394

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


git-svn-id: http://core.svn.wordpress.org/trunk@36012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 06:57:37 +00:00
John Blackbourn
45019c3467 Query: Introduce a unit test which will fail when new public query vars are introduced without also updating the test. This adds an extra layer of explicitness to introducing public query vars in order to avoid introducing unintentional clashes with URL query vars that are already in use.
See #35115 

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


git-svn-id: http://core.svn.wordpress.org/trunk@36010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 05:49:28 +00:00
John Blackbourn
d4eb85569b Login: Revert [34213] and [35897]. It has become apparent that there is a need for a separate function (and corresponding filter) which allows for the login form action URL to differ from the URL used to access the login form, so that plugins or implementations which change the login URL do not need to worry about handling the form submission at the same URL.
For now, we'll revert to the pre-4.4 behaviour of hard-coding the login form action URL as `wp-login.php` and look at implementing a separate function and corresponding filter in 4.5.

Props KrissieV, salcode, JPry
Fixes #34925
See #35103

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


git-svn-id: http://core.svn.wordpress.org/trunk@36007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 03:23:29 +00:00
Boone Gorges
26caa329f2 Respect approval status when determining comment page count in comments_template().
Since 4.4, when fetching the first page of comments and the 'newest' comments
are set to display first, `comments_template()` must perform arithmetic to
determine which comments to show. See #8071. This arithmetic requires the
total comment count for the current post, which is calculated with a separate
`WP_Comment_Query`. This secondary comment query did not properly account for
non-approved comment statuses; all unapproved comments should be part of the
comment count for admins, and individual users should have their own
unapproved comments included in the count. As a result, `comments_template()`
was, in some cases, being fooled into thinking that a post had fewer comments
available for pagination than it actually had, which resulted in empty pages
of comments.

We correct this problem by mirroring 'status' and 'include_unapproved' params
of the main comment query within the secondary query used to calculate
pagination.

Fixes #35068.
Built from https://develop.svn.wordpress.org/trunk@36040


git-svn-id: http://core.svn.wordpress.org/trunk@36005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 03:07:32 +00:00
John Blackbourn
afc7f43ca0 Comments: When a comment is submitted, ensure the user_ID element in the array that's passed to the preprocess_comment filter gets populated.
Fixes #34997

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


git-svn-id: http://core.svn.wordpress.org/trunk@36003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 02:47:26 +00:00