Commit Graph

32923 Commits

Author SHA1 Message Date
Dion Hulse
bbaa6b6f71 Query: Avoid invalid SQL when building ORDER BY clause using long search strings.
The introduction of negative search terms in 4.4 [34934] introduced the
possibility that the ORDER BY clause of a search query could be assembled in
such a way as to create invalid syntax. The current changeset fixes this by
ensuring that the ORDER BY clause corresponding to the search terms is
excluded when it would otherwise be empty.

Merges [36251] to the 4.4 branch.
Props salvoaranzulla, boonebgorges.
Fixes #35361.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36354 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 04:37:13 +00:00
Dion Hulse
4de2825d77 Comments: In comments_template(), don't run hierarchical queries if comment threading is disabled.
When hierarchical=true, WP_Comment_Query will always fetch comments according to the comment hierarchy, even if 'thread_comments' is disabled for the site.
This can cause problems when comment threading is disabled after threaded comments have been recorded on the site; comments will no longer be returned in a strictly chronological order.
We address the issue by refraining from querying hierarchically when comment threading is disabled.

Merges [36226] to the 4.4 branch.
Props jmdodd.
Fixes #35378.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36353 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 04:32:22 +00:00
Dion Hulse
d84b9f21f6 Canonical / Query: After [36280] remove the unit tests which are no longer supported for 4.4.
This also removes the `is_feed()` code to avoid confusion - only pages & embeds will be redirected.
See #35344


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36281 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 08:48:14 +00:00
Dion Hulse
bbbf6eab8a Canonical / Query: Restore the is_404() check in wp_old_slug_redirect() which was removed in [34659].
This reverts part of [34659] due to excessive canonical problems it's caused in 4.4.x.

Fixes #35344, #21602 for the 4.4 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36280 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 08:19:48 +00:00
Dion Hulse
c30a5275e8 Multisite: The networks group should be global.
Merges [36258] to the 4.4 branch.
Fixes #35251.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36259 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-11 05:05:09 +00:00
Dion Hulse
bd3c89d1fc Random_Compat: The version included with 4.4 only supports the PHP 5.2+ namespace version of libsodium, don't attempt to use it with PHP 5.2 or old libsodium versions.
Fixes #35327.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36257 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-11 04:37:25 +00:00
Dominik Schilling (ocean90)
429c624941 The 4.4 branch is now 4.4.2-alpha.
git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36239 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 12:55:30 +00:00
Dominik Schilling (ocean90)
13f706d448 About Page: Bump version of the twenty-sixteen-dark-* images.
git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36196 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-06 18:33:42 +00:00
Aaron Jorbin
86afc55ff9 Finish updating about page for 4.4.1
props ocean90


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36195 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-06 18:11:26 +00:00
Aaron Jorbin
2ed9b96eae Bump version to 4.4.1
git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36194 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-06 18:07:13 +00:00
Aaron Jorbin
e8e80d7355 Theme: Escape error messages
[36185] for 4.4 branch


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36186 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-06 17:23:40 +00:00
Dion Hulse
283b31b25f Background Updates: Remove the 7am/7pm background update check.
This changeset is a more basic version of [36180], clearing the extra now redundant schedule.
As the functionality for this was introduced in 3.9, [28129] has been backported to 3.7/3.8, allowing the API TTL to be respected by those versions.

See #27772.
Fixes #35323.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36184 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-06 12:23:15 +00:00
Aaron Jorbin
eb53037213 Bump branches/4.4 to 4.4.1 Release Candidate 1
git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36170 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-04 23:39:10 +00:00
Konstantin Obenland
513f8b27ee Template: Always display the site title on the front page.
Limits using the page title to the blog page when the site has a static front page,
bringing it N’Sync with `wp_title()`.

Merges [36168] to the 4.4 branch.

Props peterwilsoncc.
Fixes #34962.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36169 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-04 17:18:30 +00:00
Andrew Ozz
3848acf830 Media: when inserting an attachment in the editor and it is not an image, ensure the link is set to something else than none.
Props eherman24, azaozz.
Fixes #35153 for 4.4.1.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36167 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-04 00:40:51 +00:00
Aaron Jorbin
0bab0ab599 Add npm-shrinkwrap.json for 4.4
By shrinkwraping our dependencies, the same versions of everything will be installed no matter what rules the dependency package.json has specificed.

See #30787
props nacin, ocean90, netweb


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36165 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-03 22:36:43 +00:00
Andrew Nacin
7b7656950e XML-RPC: Revert [34681] as it broke date handling.
Merges [36163] to the 4.4 branch.

props dossy, hnle, redsweater.
see #35053, #30429 (original ticket).


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36164 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-03 19:49:34 +00:00
Gary Pendergast
e86f49ae47 Emoji: Add Emoji Diversity support, and fall back to twemoji if the browser doesn't support diverse emoji.
Merge of [36126] and [36160] to the 4.4 branch.

See #33592.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36161 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-03 04:41:11 +00:00
Boone Gorges
361b83bf86 Ensure that non-default pagination values work in wp_list_comments().
Prior to 4.4, it was possible to pass 'page' and 'per_page' values to
`wp_list_comments()` that do not match the corresponding global query vars.
This ability was lost in 4.4 with the refactor of how `comments_template()`
queries for comments; when the main comment query started fetching only the
comments that ought to appear on a page, instead of all of a post's comments,
it became impossible for the comment walker to select comments corresponding to
custom pagination parameters. See #8071.

We restore the previous behavior by (a) detecting when a 'page' or 'per_page'
parameter has been passed to `wp_list_comments()` that does not match the
corresponding query vars (so that the desired comments will not be found in
`$wp_query`), and if so, then (b) querying for all of the post's comments and
passing them to the comment walker for pagination, as was the case before 4.4.

Merges [36157] to the 4.4 branch.

Props boonebgorges, smerriman.
Fixes #35175.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36158 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-03 02:06:04 +00:00
Dion Hulse
40c4a410cf List Tables: When a user has hidden all columns, do not override that with the default_hidden_columns filter.
Merges [36154] to the 4.4 branch.
Props Compute, jorbin, voldemortensen.
Fixes #35057.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36155 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 04:44:30 +00:00
Dion Hulse
5eda2cf462 Admin: After [35128], make the 'Configure' link work again for dashboard widgets.
This merges the CSS changes from [35896] into an inline function in formatting.php to avoid a `wp-admin.min.css` rebuild.

Fixes #34987.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36153 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 04:33:08 +00:00
Dion Hulse
60d47bc0e0 Responsive images: fix the check whether the attachment meta matches the image src to work with http/https and CDNs.
Merges [36121] to the 4.4 branch.
Props webaware, joemcgill, azaozz.
Fixes #35045 and #35102.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36152 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:55:47 +00:00
Dion Hulse
fae8680ea6 Responsive images: add compatibility for versions < 2.7 when the full image path was stored in the metadata. Introduces _wp_get_attachment_relative_path() and uses it in wp_get_attachment_url().
Merges [36120] to the 4.4 branch.
Props dd32, SergeyBiryukov.
Fixes #35106.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36151 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:53:21 +00:00
Dion Hulse
750a86d2f9 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.
Merges [36110] to the 4.4 branch.
Props joemcgill.
Fixes #35108.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36150 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:52:01 +00:00
Dion Hulse
641ae4f39f Bump the license.txt year to 2016 to appease the unit tests.
Merges [36141] to the 4.4 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36149 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:47:48 +00:00
Dion Hulse
2b6f78b8e9 Widgets: Revert [34465], as it introduced a regression, making the $index argument of dynamic_sidebar() case-sensitive.
Merges [36130] to the 4.4 branch.
See #23423.
Fixes #34995.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36148 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:38:45 +00:00
Dion Hulse
7c08f52a27 Embeds: Change attachment metadata condition to prevent a warning in the embeds template.
Merges [36123] to the 4.4 branch.
Fixes #35237.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36147 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:35:47 +00:00
Dion Hulse
462b6016b7 Comments: Ensure only approved comments trigger post author notifications
Posts that are trashed shouldn't trigger post author notifications. Adds unit tests to enforce this.

Merges [36119] to the 4.4 branch.
Props scottbrownconsulting, peterwilsoncc, swissspidy.
Fixes #35006.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36146 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:34:35 +00:00
Dion Hulse
9261c6e63a Admin: Restore the "Show advanced menu properties" checkboxes IDs.
These checkboxes are used on the Menus screen options and the Customizer Menus options.
Their IDs were removed in [34991] but they're needed to get the checkboxes to be saved
via AJAX. Also, avoids a useless AJAX call.

Merge [36137] to the 4.4 branch.
Props afercia.
Fixes #35112.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36145 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:33:15 +00:00
Dion Hulse
7c71467f1d Admin: fix repositioning of notices when the first header is not an immediate children of .wrap.
Merges [36134] to the 4.4 branch.
Props afercia, DvanKooten.
Fixes #35047.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36144 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-02 03:31:28 +00:00
Dion Hulse
aca801ca7a XMLRPC: Revert [35509] which caused a change of behviour in at least one XMLRPC client.
XMLRPC has many quirks in it's operation, #16980 being just one of the many, #35185 just became yet another quirk.

Merges [36132] to the 4.4 branch.
See #16980.
Fixes #35185.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36133 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-31 04:06:16 +00:00
Gary Pendergast
13c222a854 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

Merge of [36083] to the 4.4 branch.

Fixes #35212.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36131 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-31 03:31:25 +00:00
Gary Pendergast
68f621f76a Redirects: Prevent redirects if a queried object exists.
After [34659], it became possible to cause an incorrect redirect, by changing the slug of a post, then creating a new post with the old slug. The correct behaviour is to prevent redirecting to the old post.

Props dd32, pento.

Merge of [36128] to the 4.4 branch.

Fixes #35031.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36129 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-31 03:08:28 +00:00
Dion Hulse
2e6fd7f2f1 Tests: After [36100] use an object style which is compatible with PHP5 get_object_vars().
Merges [36117] to the 4.4 branch.
See #35249.
Fixes #35058.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36118 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-29 05:48:58 +00:00
Boone Gorges
b1e92818a8 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`.

Merges [36108] to the 4.4 branch.

Fixes #35089.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36109 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-27 16:42:35 +00:00
Dion Hulse
2be7479109 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.

Merges [36068] to the 4.4 branch.
Props swissspidy & tharsheblows for initial patches.
Fixes #34993.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36106 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-27 02:16:40 +00:00
Dion Hulse
5310dbb071 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.

Merges [36094] to the 4.4 branch.
Props tharsheblows.
See #15963.
Fixes #35084.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36105 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-27 02:15:30 +00:00
Dion Hulse
0c2d4a35db 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.

Merges [36089] to the 4.4 branch.
Props meitar, swissspidy, jorbin
Fixes #35215. See #33941.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36104 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-27 02:13:20 +00:00
Dion Hulse
4410be69f7 Canonical: Output correct canonical links for paged posts when not using pretty permalinks.
Merges [36096] to the 4.4 branch.
Props peterwilsoncc.
Fixes #34890.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36103 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-27 02:11:56 +00:00
Dion Hulse
89743282f7 Allow map_deep() to work with object properties containing a reference. Restores the previous behaviour of stripslashes_deep().
Merges [36100] to the 4.4 branch.
Props jeff@pyebrook.com, swissspidy.
See #22300, [35252].
Fixes #35058.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36101 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-26 05:23:43 +00:00
Dion Hulse
0ad7833b73 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.

Merges [36097] to the 4.4 branch, minus a string change.
Props aaroncampbell.
Fixes #34939.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36098 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-26 04:47:58 +00:00
Konstantin Obenland
a148640ec4 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].

Merges [36081] to the 4.4 branch.
Props wp-architect.
Fixes #35107.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36082 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-24 00:25:06 +00:00
Dion Hulse
1cef7a9426 Widgets: Remove extra quotes from widget title in WP_Widget_RSS, accidentally added in [33814].
Merges [35978] to the 4.4 branch.
Props ShinichiN.
Fixes #34978.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36067 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-23 01:59:22 +00:00
Dion Hulse
bbb7c1ca4e Remove RDIO from oEmbed providers
RDIO is shutting down. https://www.rdio.com/farewell/

Merges[36007] to the 4.4 branch.
Props swissspidy.
Fixes #35152.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36066 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-23 01:52:47 +00:00
Dion Hulse
3b46a8a016 Customize: Ensure that "Change" button appears when there are only 2 themes.
Fixes defect introduced in [35535].

Merges [35943] to the 4.4 branch.
Props igmoweb.
See #34549.
Fixes #35081.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36065 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-23 01:50:27 +00:00
Dion Hulse
546ece8154 In WP::handle_404(), make sure $wp_query->post is a WP_Post object before cloning it.
Merges [35994] to the 4.4 branch.
Props igmoweb, swissspidy.
Fixes #35013.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36064 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-23 01:41:24 +00:00
Dion Hulse
7f503b0c41 I18N: In wp_maybe_decline_date(), bail early if translation functions are not available, e.g. in SHORTINIT mode.
Merges [35880] to the 4.4 branch.
Props SergeyBiryukov.
Fixes #34967.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36063 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-23 01:38:16 +00:00
Gary Pendergast
f605394d46 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.

Merge of [36059] to the 4.4 branch.

Fixes #35194.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36060 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-22 10:54:17 +00:00
Dion Hulse
86cff16c6a Update random_compat to latest
Changes:
 * Checks `disable_classes` for `COM()` before using to avoid PHP Warnings
 * Uses `stream_set_chunk_size()` to avoid reading 8KiB from `/dev/urandom` unintentionally.

Merges [35922] to the 4.4 branch.

Fixes #34948.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36058 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-22 03:22:05 +00:00
Boone Gorges
9b064872d0 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.

Merges [36056] to the 4.4 branch.

Props afercia.
See #28922. Fixes #35180.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36057 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-22 01:52:41 +00:00