1533 Commits

Author SHA1 Message Date
Sergey Biryukov
54496bf8b4 Date/Time: Use delta comparison in get_gmt_from_date() tests to avoid race conditions.
Follow-up to [35284].

Props keesiemeijer.
Merges [41920] to the 4.4 branch.
See #38815.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@51616 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-15 13:39:47 +00:00
Jonathan Desrosiers
751caec44f Build/Test Tools: Add an object cache drop-in to the 4.4 branch.
This adds an object cache drop-in to the `tests/phpunit/includes` directory to avoid relying on and having to copy from an external repository.

It also removes a stray character that was mistakenly included in [50210].

Follow up to [50210], [50314].

Unprops desrosj.
See #50401.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@50316 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-12 20:17:51 +00:00
Sergey Biryukov
12bc77d2fb Tests: Move skipTestOnTimeout() to a more appropriate location, for consistency with other branches.
Follow-up to [50088].

Merges [50097] to the 4.4 branch.
See #51669.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@50100 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-30 15:26:59 +00:00
Sergey Biryukov
6307192834 Tests: Use skipTestOnTimeout() in more HTTP tests.
Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".

Merges [38757], [43511], [43512], [46682], [46996] to the 4.4 branch.
See #51669.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@50091 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-30 12:08:49 +00:00
Jake Spurlock
5475e9efc5 General: WordPress updates
* XML-RPC: Improve error messages for unprivileged users.
* External Libraries: Disable deserialization in Requests_Utility_FilteredIterator
* Embeds: Disable embeds on deactivated Multisite sites.
* Coding standards: Modify escaping functions to avoid potential false positives.
* XML-RPC: Return error message if attachment ID is incorrect.
* Upgrade/install: Improve logic check when determining installation status.
* Meta: Sanitize meta key before checking protection status.
* Themes: Ensure that only privileged users can set a background image when a theme is using the deprecated custom background page.

Brings the changes from [49380,49382-49388] to the 4.4 branch.

Props xknown, zieladam, peterwilsoncc, whyisjake, desrosj, dd32.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@49402 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-29 19:04:00 +00:00
Jake Spurlock
63cc1a6ee9 User: Invalidate user_activation_key on password update.
Query: Ensure that only a single post can be returned on date/time based queries.
Cache API: Ensure proper escaping around the stats method in the cache API.
Formatting: Expand `sanitize_file_name` to have better support for utf8 characters.

Brings the changes in [47634], [47635], [47637], and [47638] to the 4.4 branch.

Props: batmoo, ehti, nickdaugherty, peterwilsoncc, sergeybiryukov, sstoqnov, westi, whyisjake, whyisjake, xknown.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@47653 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 16:38:31 +00:00
Sergey Biryukov
69cacb4930 Build/Test Tools: Remove unused ::assertPostHasTerms() method from tests/term.php.
The associated test was removed in [30241].

Merges [47341] to 3.7+ branches.
See #49485.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@47489 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-22 14:29:03 +00:00
Sergey Biryukov
6ee70aa119 Embeds: Remove the external oEmbed tests for YouTube.
These tests no longer test anything that WordPress core has control over. YouTube now serves everything
over HTTPS by default, so the tests for #23149 will always pass, and the tests for #32714 aren't testing
anything that core has control over.

Tests for the responses from oEmbed providers has been attempted and reverted in #32360.

Props johnbillion.
Merges [41712] to the 4.4 branch.
See #42076, #32714, #23149.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@47483 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-22 13:57:09 +00:00
Sergey Biryukov
c8a62fa989 Update wp_kses_bad_protocol() to recognize : on uri attributes,
`wp_kses_bad_protocol()` makes sure to validate that uri attributes don’t contain invalid/or not allowed protocols. While this works fine in most cases, there’s a risk that by using the colon html5 named entity, one is able to bypass this function.

Brings r46895 to the 4.4 branch.

Props: xknown, nickdaugherty, peterwilsoncc.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@46912 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 18:43:41 +00:00
Jake Spurlock
3f12403dc8 Backporting several bug fixes.
- Query: Remove the static query property.
- HTTP API: Protect against hex interpretation.
- Filesystem API: Prevent directory travelersals when creating new folders.
- Administration: Ensure that admin referer nonce is valid.
- REST API: Send a Vary: Origin header on GET requests.
- Customizer: Properly sanitize background images.

Backports [46474], [46475], [46476], [46477], [46478], [46483], [46485] to the 4.4 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@46498 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 19:08:52 +00:00
Jonathan Desrosiers
06968503f3 Fix for URL sanitization in wp_kses_bad_protocol_once().
Merges [45997] to the 4.4 branch.

Props irsdl, sstoqnov, whyisjake.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@46010 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 18:23:17 +00:00
Sergey Biryukov
fcffda2869 Improve handling the existing rel attribute in wp_rel_nofollow_callback().
Merges [45990] to the 4.4 branch.
Props xknown, sstoqnov.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@46001 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 17:56:42 +00:00
Jake Spurlock
dc2184e9b2 Remove _convert_urlencoded_to_entities() from the get_the_content() callback.
Merges [45937] to the 4.4 branch.

Props vortfu, whyisjake, peterwilsoncc


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@45958 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 16:38:59 +00:00
John Blackbourn
52eb3fbe3a Build/Test tools: Backport the fixed tests for wp_normalize_path() from the 4.5 branch into 4.4.
See #35996


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@45012 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-25 17:07:12 +00:00
John Blackbourn
cd94945baf General: Remove the version number from the readme file in the 4.4 branch.
See #42386


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@42103 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 18:07:23 +00:00
Gary Pendergast
ad4bd52b18 Database: Restore numbered placeholders in wpdb::prepare().
[41496] removed support for numbered placeholders in queries send through `wpdb::prepare()`, which, despite being undocumented, were quite commonly used.

This change restores support for numbered placeholders (as well as a subset of placeholder formatting), while also adding extra checks to ensure the correct number of arguments are being passed to `wpdb::prepare()`, given the number of placeholders.

Merges [41662], [42056] to the 4.4 branch.
See #41925.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@42061 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 12:45:48 +00:00
Gary Pendergast
3e606ecd3f Build/Test Tools: Pass correct $message argument to WP_UnitTestCase::setExpectedException() in Tests_Ajax_CompressionTest::test_logged_out() and Tests_Ajax_TagSearch::test_no_results().
PHPUnit 6.4.1 and earlier versions ignored the `'0'` value, causing the issue to go unnoticed.

Merge of [41870] to the 4.4 branch.

Props SergeyBiryukov.
Fixes #42232.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@42055 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 09:13:09 +00:00
Aaron D. Campbell
a003655113 Database: Hardening to bring wpdb::prepare() inline with documentation.
`wpdb::prepare()` supports %s, %d, and %F as placeholders in the query string. Any other non-escaped % will be escaped.

Merges [41496] to 4.4 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@41501 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 18:14:33 +00:00
Aaron D. Campbell
a577ca8fcd Database: Hardening for wpdb::prepare()
Previously if you passed an array of values for placeholders, additional values could be passed as well. Now additional values will be ignored.

Merges [41470] to 4.4 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@41475 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 15:00:28 +00:00
Weston Ruter
a007b519c2 Customize: Fix phpunit tests after [40704] due to logic inversion error.
Merge of [40716] to the 4.4 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@40720 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 14:42:55 +00:00
John Blackbourn
78223153bd Build/Test tools: In Travis, skip some tests when not on trunk.
This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.4 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@40243 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-08 00:31:45 +00:00
Aaron D. Campbell
68cd7a8d08 Strip control characters before validating redirect.
Merges [40183] to 4.4 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@40187 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-06 13:41:23 +00:00
Joe McGill
2043bfee9a Media: Improved media titles when created from filename.
Preserves spaces and generally creates more accurate, cleaner titles from filenames of uploaded media.

Merge of [38615] to the 4.4 branch.

Fixes #37989.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@39712 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 16:14:39 +00:00
Gary Pendergast
b8b3a3ab0b Database: dbDelta() will no longer try to downgrade the size of TEXT and BLOB columns.
When upgrading to `utf8mb4`, `TEXT` fields will be upgraded to `MEDIUMTEXT` (and likewise for all other `*TEXT` and `*BLOB` fields). This is to allow for the additional space requirements of `utf8mb4`.

On the subsequent upgrade, `dbDelta()` would try and downgrade the fields to their original size again. At best, this it a waste of time, at worst, this could truncate any data larger than the original size. There's no harm in leaving them at their new size, so let's do that.

This also fixes a typo in the `dbDelta()` tests.

Merge of [37525] to the 4.4 branch.
Partial merge of [36552] to the 4.4 branch.

See #36748.



git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37936 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-01 06:58:40 +00:00
Joe McGill
ccd5d3e540 Media: Improve handling of extensionless filenames.
Merge of [37756] to the 4.4 branch.

See #37111.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37810 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 14:51:38 +00:00
Pascal Birchler
2d2185bf76 Embeds: Improve performance when embedding a post from the current site.
When the post being embedded is from the same site, there's no reason to do an HTTP request for it. The data can be fetched directly using `get_oembed_response_data()`.

Merge of [37708], [37710] and [37729] to the 4.4 branch.

Fixes #36767.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37798 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 14:41:05 +00:00
Boone Gorges
2aa2ea5249 Revert [37642].
Was mistakenly committed to the 4.4 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37643 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-06 21:16:54 +00:00
Boone Gorges
cba33d06f3 Tests: Move wp_set_object_terms() tests to their own file.
See #37009.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37642 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-06 21:08:23 +00:00
Aaron Jorbin
5ee244e909 Adjust unit tests to account for change in [37145].
Merges [37150] to 4.4 branch


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37151 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-30 19:53:40 +00:00
Pascal Birchler
56ebd53549 Embeds: Improve how iframes are loaded after being initially hidden.
Use a more accessible way to initially hide the iframe. After that, only display an iframe when it was successfully loaded.

Merge of [36648] and [36708] to the 4.4 branch.

Fixes #35894.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37093 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-30 10:56:44 +00:00
Boone Gorges
6e4269761d Query: Ignore search terms consisting of a single dash.
Due to the "exclude" support added in WP 4.4, single dashes were being
converted to "NOT LIKE '%%'" clauses, causing all searches to fail.

Ports [36989] to the 4.4 branch.

Props RomSocial, swissspidy.
Fixes #36195.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37082 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-25 18:40:27 +00:00
Dominik Schilling (ocean90)
9d1455b89b Better validation of the URL used in HTTP redirects.
Merges [36444] to the 4.4 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36447 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-02 16:58:49 +00:00
Dion Hulse
efa391dea7 Customizer: Prevent erroneously directing user to login screen when closing.
Fixes issue where user gets stuck at login screen after trying to close the app if previously they had to first login to access the Customizer. Prevents `WP_Customize_Manager::get_return_url()` from using `wp-login.php` as a referer.

Merges [36261] to the 4.4 branch.
Props chandrapatel.
See #32637.
Fixes #35355.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36363 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 08:36:17 +00:00
Dion Hulse
92f2281f6f Comments: Ignore hierarchy in pagination calculation when comment threading is disabled.
In order to calculate comment pagination when newest comments are displayed
first, `comments_template()` must perform a separate query to determine the
total number of paginating comments available on a post. See [34729], #8071,
pagination calculation - can be defined as a top-level comment, or a comment
with `parent=0`. However, when comment threading is disabled, yet comments
exist in the database that have parents, all comments - even those with a
parent - are "paginating". (This typically happens when comments threading was
once enabled, but has since been turned off.) As such, the total-paginating-
comments query should only be limited to top-level comments when
'thread_comments' is disabled.

Merges [36275] to the 4.4 branch.
Props jmdodd.
Fixes #35419.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36362 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 08:32:00 +00:00
Dion Hulse
bd88063512 Comments: Respect all post-related filters in WP_Comment_Query.
The refactor of `WP_Comment_Query`'s SQL generation in [34542] introduced a bug
that caused only the last post-related filter to be respected in comment
queries. In other words, if querying for comments using params
`post_status=draft&post_author=3`, only the last-processed of these params
would be respected. The current changeset fixes the logic so that these clauses
don't overwrite each other.

Merges [36326] to the 4.4 branch.
Props chriscct7.
Fixes #35478.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36361 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 08:01:55 +00:00
Dion Hulse
c3e627cec3 Taxonomy: Populate term cache with proper clone of term objects.
[34999] modified the cache strategy for terms in the context of
`wp_get_object_terms()`. As part of these changes, the `object_id` property of
term objects had to be unset before being cached. To avoid modifying passed-by-
reference terms, `update_term_cache()` attempted to make a copy of the terms
passed to the function; however, it failed to use the `clone` keyword, and thus
only created a reference instead of a copy.

Merges [36323] to the 4.4 branch.
Props berengerzyla.
Fixes #35462.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36358 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 05:34:30 +00:00
Dion Hulse
b4554835dd Comments: Use the post-filter WHERE clause when querying for comment descendants.
The descendant query in `WP_Comment_Query::fill_descendants()` uses the clauses
of the main `get_comment_ids()` query as a basis, discarding the `parent`,
`parent__in`, and `parent__not_in` clauses. As implemented in WP 4.4 [34546],
the WHERE clause was assembled in such a way that any modifications applied
using the `comments_clauses` filter were not inherited by `fill_descendants()`.
This resulted in descendant queries that did not always properly filter
results, and sometimes contained syntax errors.

The current changeset fixes the problem by using the post-filter WHERE clause
as the basis for the `fill_descendants()` query. This change requires a new
approach for eliminating the unneeded parent-related clauses: instead of
eliminating values in an associative array, we must use regular expressions.

Merges [36277] to the 4.4 branch.
Props boonebgorges, firebird75.
Fixes #35192.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36357 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 05:27:07 +00:00
Dion Hulse
eae3e61822 Comments: Always respect $comments array passed to wp_list_comments().
[36157] fixed a bug whereby `wp_list_comments()` would not properly recognize
custom pagination arguments. See #35175. However, it inadvertently introduced
a bug that caused any `$comments` array explicitly passed to the function to be
ignored, when that array was accompanied by pagination arguments that differ
from those in `$wp_query`. We address this bug by moving the logic introduced
in [36157] inside a block that only fires when no `$comments` array has been
provided to the function.

Merges [36276] to the 4.4 branch.
Props ivankristianto, boonebgorges.
Fixes #35356.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@36356 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 05:23:02 +00:00
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
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 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
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
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
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
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
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