Overriding default PHP timezone with `date_default_timezone_set()`, while not recommended, should not inadvertently result in changing existing permalinks.
Add a unit test.
Props Rarst, steevithak, archon810, maciejmackowiak, Ov3rfly, Cybr, hometowntrailers, scvleon, miette49.
Fixes#48623.
git-svn-id: https://develop.svn.wordpress.org/trunk@46795 602fd350-edb4-49c9-b593-d223f7449a82
With the changes in [45908], `mysql2date()` works correctly for all local time inputs, but should not be used for UTC time inputs.
Add a unit test.
Props Rarst, lisota.
Fixes#48675.
git-svn-id: https://develop.svn.wordpress.org/trunk@46756 602fd350-edb4-49c9-b593-d223f7449a82
This is only a wrapper for the `add_node()` method, but it's in widespread use both in core until [46642] and in thousands of plugins and themes. Deprecating it would have made sense when #19647 was originally opened but that's no longer the case.
Props whyisjake
Fixes#19647
git-svn-id: https://develop.svn.wordpress.org/trunk@46678 602fd350-edb4-49c9-b593-d223f7449a82
Make sure it actually tests the change in behavior, previously it passed both before and after the patch.
Add `wp_unslash()` to the last remaining instance of `$_POST['user_login']` that didn't have it.
See #38744.
git-svn-id: https://develop.svn.wordpress.org/trunk@46650 602fd350-edb4-49c9-b593-d223f7449a82
Move the test to a more appropriate place for consistency with `wp_sanitize_redirect()` and `wp_validate_redirect()` tests.
See #44317.
git-svn-id: https://develop.svn.wordpress.org/trunk@46649 602fd350-edb4-49c9-b593-d223f7449a82
The REST API supports filtering by terms across multiple taxonomies using an AND relation. This adds support for an OR relation by adding "tax_relation=OR" as a query parameter.
Props earnjam.
Fixes#44326.
git-svn-id: https://develop.svn.wordpress.org/trunk@46646 602fd350-edb4-49c9-b593-d223f7449a82
The tests for good redirects send headers that we can't handle in the test suite, so let's just remove them.
Unprops Jorbin.
Fixes#44317.
git-svn-id: https://develop.svn.wordpress.org/trunk@46645 602fd350-edb4-49c9-b593-d223f7449a82
This patch replaces all references to the add_menu() method with the add_node() one. (Also some code structure modifications for wp_admin_bar_appearance_menu().)
Fixes: #19647
Props: linuxologos, paulschreiber, morganestes, akibjorklund, nacin, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@46642 602fd350-edb4-49c9-b593-d223f7449a82
Redirects should use redirect status codes and if you attempt to call wp_safe_redirect or wp_redirect with a non redirect status it can lead to undesired behavior and head scratching.
Fixes#44317.
Props spenserhale, johnbillion, mjnewman for initial patch.
git-svn-id: https://develop.svn.wordpress.org/trunk@46641 602fd350-edb4-49c9-b593-d223f7449a82
Allows a login to have an apostorphe. Which would normally be created as a mistake, but this allows the login to happen.
Fixes#38744
Props wpkuf, desrosj, socalchristina, bibliofille, santilinwp, nsubugak, sncoker, cafenoirdesign, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@46640 602fd350-edb4-49c9-b593-d223f7449a82
* `_deprecated_function()`
* `_deprecated_argument()`
* `_deprecated_constructor()`
* `_deprecated_file()`
The error level passed is `E_USER_DEPRECATED` for the deprecated function group and `E_USER_NOTICE` for `_doing_it_wrong()`.
Props jrf.
Fixes#36561.
git-svn-id: https://develop.svn.wordpress.org/trunk@46625 602fd350-edb4-49c9-b593-d223f7449a82
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.
Fixes#31432. See #42594, #47411.
git-svn-id: https://develop.svn.wordpress.org/trunk@46612 602fd350-edb4-49c9-b593-d223f7449a82
There is no functional difference between `gmt_offset` and `timezone_string` timezone modes for the issue.
See #48384.
git-svn-id: https://develop.svn.wordpress.org/trunk@46583 602fd350-edb4-49c9-b593-d223f7449a82
Add `$source` parameter to `get_post_datetime()` to instantiate from local or UTC time in database.
Props Rarst, david.binda.
Reviewed by azaozz, SergeyBiryukov.
Fixes#48384.
git-svn-id: https://develop.svn.wordpress.org/trunk@46580 602fd350-edb4-49c9-b593-d223f7449a82
This is a follow-up to [46149] to avoid unnecessary breakage in case of using the old notation.
Props david.binda, jrf.
Reviewed by azaozz.
Fixes#48312.
git-svn-id: https://develop.svn.wordpress.org/trunk@46568 602fd350-edb4-49c9-b593-d223f7449a82
Introduce `make_clickable_rel` filter for the `rel` value that is added to URL matches converted to links.
This is a follow-up to [46349], which added the `rel="nofollow ugc"` attribute to existing `<a>` tags in comments via `wp_rel_ugc()`.
UGC stands for User Generated Content, and the `ugc` attribute value is recommended for links within user generated content, such as comments and forum posts.
See https://webmasters.googleblog.com/2019/09/evolving-nofollow-new-ways-to-identify.html.
Props blogginglife, SergeyBiryukov.
Reviewed by desrosj, audrasjb.
Fixes#48022.
git-svn-id: https://develop.svn.wordpress.org/trunk@46564 602fd350-edb4-49c9-b593-d223f7449a82
Introducing complex meta value handling in [45807] unintentionally removed value casting for empty scalar meta values.
Props TimothyBlynJacobs, chrisvanpatten, rmccue, kadamwhite.
Fixes#48363.
git-svn-id: https://develop.svn.wordpress.org/trunk@46563 602fd350-edb4-49c9-b593-d223f7449a82
Previously, searching for symbol references to replace with post or attachment IDs in array values resulted in a PHP warning.
Props timph, JarretC, SergeyBiryukov.
Fixes#45484.
git-svn-id: https://develop.svn.wordpress.org/trunk@46548 602fd350-edb4-49c9-b593-d223f7449a82
We decided to mark Social Links block as an experimental feature in Gutenberg. In effect, we are moving all related code from WordPress 5.3 release.
Props youknowriad.
Fixes#48263.
git-svn-id: https://develop.svn.wordpress.org/trunk@46543 602fd350-edb4-49c9-b593-d223f7449a82
Coding standards, ensure that nonce is valid with identical, rather then equal operator.
Props vortfu, xknown, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@46477 602fd350-edb4-49c9-b593-d223f7449a82