This fixes theme editing on Windows platforms where `validate_file()` will return `2` on a full file path.
Fixes#42609.
git-svn-id: https://develop.svn.wordpress.org/trunk@42244 602fd350-edb4-49c9-b593-d223f7449a82
While caching here seemed like a good idea in theory, in practice the cache would be often stale causing development issues.
We exclude common folders (such as `node_modules`) from the scanning to avoid directories which are not useful to the end-user, so as long as those exclusion lists are held up this shouldn't cause too much of a degredation in the future.
We may consider adding caching here again in the future if it's determined that it is really needed.
Props precies, ibenic, mariovalney, schlessera, and all the others who commented on the ticket(s).
This partually reverts [41806].
See #6531.
Fixes#42573.
git-svn-id: https://develop.svn.wordpress.org/trunk@42242 602fd350-edb4-49c9-b593-d223f7449a82
The WPCS `WordPress.WhiteSpace.PrecisionAlignment` rule throws warnings for a bunch of code that will likely cause issues for `wpcbf`. Fixing these manually beforehand gives us better auto-fixed results later.
See #41057.
git-svn-id: https://develop.svn.wordpress.org/trunk@42228 602fd350-edb4-49c9-b593-d223f7449a82
Using a filename which was generated from `time()` could cause two processes to try to use the same filename, causing unexpected behaviour.
Props jrchamp, bikecrazyy.
Fixes#42265.
git-svn-id: https://develop.svn.wordpress.org/trunk@42224 602fd350-edb4-49c9-b593-d223f7449a82
This corrects the value when the user's language is set to `English (United States)` but the site language is not.
Props ocean90, afercia
Fixes#42242
git-svn-id: https://develop.svn.wordpress.org/trunk@42220 602fd350-edb4-49c9-b593-d223f7449a82
When the setup process reads `wp-config-sample.php`, it assumes that there are no spaces inside the brackes of the `define()`s. Unfortunately, this doesn't match our coding standards, so will no longer work correctly once we start enforcing them.
This also improves coding standards of the generated `wp-config.php` file.
See #41057.
git-svn-id: https://develop.svn.wordpress.org/trunk@42218 602fd350-edb4-49c9-b593-d223f7449a82
This pattern occurs a handful of times across the codebase:
`<div class="foo<?php if ( $bar ) { echo ' baz'; } ?>">`
Unfortunately, it doesn't really play nicely with `phpcbf`, so all instances need to be removed in preperation for auto code formatting.
See #41057.
git-svn-id: https://develop.svn.wordpress.org/trunk@42217 602fd350-edb4-49c9-b593-d223f7449a82
The fix in [41821] caused numeric folder names to be reindexed to 0..n when in the root directory (for example, `my-plugin/24/`).
Props edo888.
See #41524.
Fixes#42628 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42214 602fd350-edb4-49c9-b593-d223f7449a82
The `meta_box_cb` argument was introduced in [25572] to allow plugin
authors to provide a custom callback for rendering their taxonomy's meta
box on the post edit screen. However, the routine used to handle the saving
of these custom taxonomy meta boxes was not customizable, but was instead
based simply on whether the taxonomy was hierarchicaly. See [13535].
The new `meta_box_sanitize_cb` argument defaults to the "tag" routine for
non-hierarchical taxonomies and the "category" routine for hierarchical ones,
thereby maintaining the current default behavior. Developers can override this
when the data passed from their `meta_box_cb` differs.
Props boonebgorges, ZaneMatthew, stephenharris.
Fixes#36514.
git-svn-id: https://develop.svn.wordpress.org/trunk@42211 602fd350-edb4-49c9-b593-d223f7449a82
When querying for 'count', ensure that 0 is returned. Otherwise,
ensure that it's an array.
Props xParham, birgire.
Fixes#42327.
git-svn-id: https://develop.svn.wordpress.org/trunk@42209 602fd350-edb4-49c9-b593-d223f7449a82
This brings the behaviour of the two functions in line with each other.
Props Drivingralle
Fixes 42108
git-svn-id: https://develop.svn.wordpress.org/trunk@42206 602fd350-edb4-49c9-b593-d223f7449a82
This allows defining the constant as `false` to prevent access (rather than requiring the constant to be removed entirely).
Props tiagohillebrandt, munklefish.
See #11717.
Fixes#42622.
git-svn-id: https://develop.svn.wordpress.org/trunk@42205 602fd350-edb4-49c9-b593-d223f7449a82
In IE11 the `input` event erroneously gets triggered initially without any user input.
Amends [41648].
See #37661.
Fixes#42556 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42187 602fd350-edb4-49c9-b593-d223f7449a82
Also prevent `[gallery]` shortcode from dumping out every attachment on the site when a containing Text widget is shown on an archive template.
Props westonruter, bobbingwide, joemcgill for testing.
See #10457.
Fixes#42548, #42547 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42185 602fd350-edb4-49c9-b593-d223f7449a82
Fixes an error since [41783] in which extra paragraphs could be added to content when switching editor tabs.
Props pento, adamsilverstein, aduth.
Fixes#42531.
git-svn-id: https://develop.svn.wordpress.org/trunk@42177 602fd350-edb4-49c9-b593-d223f7449a82
- When switching to the Text view, wait until after the Visual editor element has been hidden, before focussing the `<textarea>`.
- When switching to the Visual view, only scroll if the cursor is not visible on the current screen.
Fixes#42530.
git-svn-id: https://develop.svn.wordpress.org/trunk@42175 602fd350-edb4-49c9-b593-d223f7449a82
The `status` parameter accepts an array or string/comma-separated list.
Introduced in [30084].
Props pbiron.
Fixes#41338.
git-svn-id: https://develop.svn.wordpress.org/trunk@42165 602fd350-edb4-49c9-b593-d223f7449a82
This is a temporary solution while waiting for full I18N support in JS.
Props ocean90, dd32, westonruter, Mirucon for testing.
Amends [41376], [41721], [41389],
See #20491.
Fixes#42510 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42163 602fd350-edb4-49c9-b593-d223f7449a82
Also run CSS autoprefixer to add `-ms-` prefixes for CSS grid identifiers for IE11.
Props Presskopp.
Amends [42121].
See #42087.
Fixes#42524 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42161 602fd350-edb4-49c9-b593-d223f7449a82
Simplify regular expression for checking URL validity to just do basic checks to confirm the value looks like a URL. Leave the complete validation to the server-side logic in `WP_Customize_Nav_Menu_Item_Setting::sanitize()` to avoid having to maintain two separate codebases for validating URLs.
Props westonruter, SergeyBiryukov for testing.
Amends [41697].
See #32816.
Fixes#42506 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42153 602fd350-edb4-49c9-b593-d223f7449a82