This commit brings the changes in [49452] to the 5.5 branch.
If reinstalling WordPress, there is a condition where tables would exist in the database. Ensures that when that is the case, the install process can carry along without issue.
Fixes#51676.
Props xknown, garubi, mukesh27, desrosj, johnbillion, metalandcoffee, davidbaumwald, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49453 602fd350-edb4-49c9-b593-d223f7449a82
Add specific permission checks to avoid ambiguous failure messages.
This brings the changes in [49380] to the 5.5 branch.
Props zieladam, peterwilsoncc, xknown, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49389 602fd350-edb4-49c9-b593-d223f7449a82
Throw an error for incorrect attachment IDs when requesting a media object to ensure return signature is correct and doesn't include incorrectly typed values within the object.
Props zieladam, peterwilsoncc, whyisjake.
See #49905.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49376 602fd350-edb4-49c9-b593-d223f7449a82
This introduces the `LOCAL_PHPUNIT` environment variable, which allows the desired version of PHPUnit to be specified when running the PHP tests within the local Docker environment.
Because support for newer versions of PHPUnit is not backported, some versions of PHP need the ability to run multiple versions of PHPUnit for different branches. This adds the flexibility needed to use the Docker environment within those older branches to run the PHP tests.
Props johnbillion, SergeyBiryukov.
Merges [49362] to the 5.5 branch.
See #50042.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49363 602fd350-edb4-49c9-b593-d223f7449a82
This prevents an error if constants are not predefined when running the Docker install script while using older combinations of WordPress/PHP/WP-CLI.
Backports [49335] to the 5.5 branch.
See #48301.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49340 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a PHP notice when creating a post with multiple taxonomies both having a default term.
Props yakimun, szaqal21, hareesh-pillai, audrasjb.
Merges [49328] to the 5.5 branch.
Fixes#51320.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49332 602fd350-edb4-49c9-b593-d223f7449a82
This updates the `dealerdirect/phpcodesniffer-composer-installer` package to allow installing version `0.7.0` which supports Composer 2.0.
Props itowhid06, jrf.
Merges [49306] to the 5.5 branch.
See #51624.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49313 602fd350-edb4-49c9-b593-d223f7449a82
This was done for trunk in [49101] as part of other changes, and is now backported to the 5.5 branch.
Follow-up to [49275].
Props iandunn, SergeyBiryukov.
Fixes#51130.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49307 602fd350-edb4-49c9-b593-d223f7449a82
Fix the first step of validating an anonymous commenters in which the length is checked prior to running regular expressions.
Follow up to [47808].
Merges [49271] to the 5.5 branch.
Fixes#51595.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49273 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the reply heading is updated correctly on single post URLs with the `?replytocom` query argument.
Follow-up to [47506], [48876], [48904].
Props mailnew2ster, wpamitkumar, audrasjb, desrosj, SergeyBiryukov.
Merges [49187] to the 5.5 branch.
Fixes#51175.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49191 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a PHP notice for an undefined index of either `plugin` or `theme` in the `auto_{plugin|theme}_update_send_email` filter hook.
Props afragen, audrasjb.
Merges [49166] to the 5.5 branch.
Fixes#51400.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49167 602fd350-edb4-49c9-b593-d223f7449a82
When the mysql extention isn't loaded and a custom db dropin is not in place, we give folks a nice error. However, we can't assume that the WP_CONTENT_DIR constant is set yet since this runs before we define default constants.
This fixes a PHP8 error.
See: #50913.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@49161 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a PHP notice after submitting the Edit Comment form.
Follow-up to [48050].
Props regan.khadgi.
Merges [48958] to the 5.5 branch.
Fixes#51263.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48959 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a PHP notice when editing an image.
Follow-up to [48375].
Props Mista-Flo.
Merges [48946] to the 5.5 branch.
Fixes#51251.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48956 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a conflict with the same global variable used elsewhere, e.g. in Theme Editor.
Follow-up to [48850].
Props vinayak.anivase.
Merges [48938] to the 5.5 branch.
Fixes#51219.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48955 602fd350-edb4-49c9-b593-d223f7449a82
Add some new tests to better cover the functionality, for consistency with `get_the_date()` and `get_the_time()`.
Follow-up to [48911], [48912], [48918].
Props wittich.
Merges [48924] to the 5.5 branch.
Fixes#51184.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48926 602fd350-edb4-49c9-b593-d223f7449a82
The recommended approach for any plugins using these globals or properties is to switch to the newer `wp.i18n` functions.
In the meantime, this ensures that accessing any of these globals does not break the rest of the code on the page, and an appropriate warning message is logged to the JavaScript console.
Follow-up to: https://core.trac.wordpress.org/query?summary=~wp.i18n&milestone=5.5
Props omarreiss, peterwilsoncc, kbjohnson90, johnbillion, TimothyBlynJacobs, joostdevalk, ocean90, desrosj, SergeyBiryukov.
Merges [48923] to the 5.5 branch.
Fixes#51123.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48925 602fd350-edb4-49c9-b593-d223f7449a82
Additionally, simplify the `$format` argument checks for consistency with similar checks in `get_the_modified_date()` and `get_the_modified_time()`.
Follow-up to [48912].
Props Rarst.
Merges [48918] to the 5.5 branch.
See #51184.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48922 602fd350-edb4-49c9-b593-d223f7449a82
Technically, the `$format` argument should always be a string, but passing `false` used to work before [47808], so this restores backward compatibility.
The list of affected functions:
- `get_the_date()`
- `get_the_time()`
- `get_comment_date()`
- `get_comment_time()`
Props wittich, Rarst, akabarikalpesh, SergeyBiryukov.
Merges [48912] to the 5.5 branch.
Fixes#51184.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48921 602fd350-edb4-49c9-b593-d223f7449a82
- Move some tests from `post.php` to a more appropriate location in the `date` directory.
- Rename `date/postTime.php` to `date/getPostTime.php` to match the function name.
Props Rarst.
Merges [48911] to the 5.5 branch.
See #51184.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48920 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the data for the currently installed theme is picked up properly when uploading a theme update on Windows.
Follow-up to [48390].
Props bobbingwide, wpamitkumar, mukesh27.
Merges [48913] to the 5.5 branch.
Fixes#51182.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48919 602fd350-edb4-49c9-b593-d223f7449a82
The value is internally used to detect whether nothing has hooked into this filter.
Props audrasjb, pbiron, johnbillion, SergeyBiryukov.
Merges [48909] to the 5.5 branch.
Fixes#50848.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48916 602fd350-edb4-49c9-b593-d223f7449a82
If any admin functions are used within the filter, their existence should be checked with `function_exists()` before being used.
Follow-up to [47763], [48620].
Props audrasjb, garrett-eclipse, Howdy_McGee, dlh, khag7, SergeyBiryukov.
Merges [48910] to the 5.5 branch.
Fixes#51081.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48915 602fd350-edb4-49c9-b593-d223f7449a82
This ensures consistent results in query var tests, regardless of whether they are run in isolation or as part of a larger group of tests.
Props pbiron, peterwilsoncc.
Merges [48908] to the 5.5 branch.
Fixes#51154.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48914 602fd350-edb4-49c9-b593-d223f7449a82