Fixes a layout issue in the Customizer UI. Also de-duplicate title display logic, outputting "Loading..." as site title in PHP with actual title being set upon Customizer `ready`. Also update the site title in response to a `blogname` setting change as opposed to `input` DOM events on the control.
Fixes#35579.
git-svn-id: https://develop.svn.wordpress.org/trunk@36388 602fd350-edb4-49c9-b593-d223f7449a82
After [36381], the default value of `0` was causing the list table at
edit-comments.php to be empty. `false` prevents this.
This fix is likely temporary, while more research is done into the backward
compatibility concerns tied to [36381].
See #35090.
git-svn-id: https://develop.svn.wordpress.org/trunk@36387 602fd350-edb4-49c9-b593-d223f7449a82
This effort focuses on `src/wp-includes/link-template.php`.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.
Props mrahmadawais.
Fixes#35589.
git-svn-id: https://develop.svn.wordpress.org/trunk@36386 602fd350-edb4-49c9-b593-d223f7449a82
Add missing `params.completeCallback` to `MenuItemControl.focus()` for parity with `Control.focus()`. Also adds `params` to `MenuItemControl.expandForm`, `MenuItemControl.collapseForm()`, and `MenuItemControl.toggleForm()`.
Props MattGeri, westonruter.
Fixes#32681.
git-svn-id: https://develop.svn.wordpress.org/trunk@36383 602fd350-edb4-49c9-b593-d223f7449a82
Previously, this was not possible due to an overly broad `empty()` check.
Passing `null`, `false`, or `''` to 'post_id', or omitting 'post_id'
altogether, will continue to return comments regardless of `comment_post_ID`,
as before. Passing `0` or `'0'` will limit results to comments with no
associated post.
Props danielbachhuber.
Fixes#35090.
git-svn-id: https://develop.svn.wordpress.org/trunk@36381 602fd350-edb4-49c9-b593-d223f7449a82
Also, adds missing labels and improves the existing ones.
Updates the "custom links" labels and inputs in the Customizer too.
Introduces a generic, reusable, `.wp-initial-focus` CSS class to be used for
the sole purpose of setting the initial focus.
"Quick Search": uniform the attached events and avoids new AJAX requests to
be triggered when the pressed key doesn't change the searched term.
Fixes#35374.
git-svn-id: https://develop.svn.wordpress.org/trunk@36379 602fd350-edb4-49c9-b593-d223f7449a82
This aligns with the `.customize-panel-description` element which is also excluded if there is no description.
Props drebbits.web.
Fixes#35540.
git-svn-id: https://develop.svn.wordpress.org/trunk@36374 602fd350-edb4-49c9-b593-d223f7449a82
* Prevent following jump links (starting with `#`), but instead scroll that element into view.
* Prevent following links clicked in the Customizer if shift key is pressed when clicking; this fixes an issue when trying to shift-click on a widget or nav menu item (#32681) to just focus on the control in the Customizer.
Fixes#26005.
git-svn-id: https://develop.svn.wordpress.org/trunk@36371 602fd350-edb4-49c9-b593-d223f7449a82
When the method was introduced in [17914], the name was underscore-prefixed as is core style for private-use, though it was also introduced with a `public` access modifier for the declaration. Due to core's committment to backward-compatibility, the access modifier overrules in this case, meaning that while the method is underscore-prefixed and was originally-intentioned to be private, it is and always will be a public method, and the documentation should reflect that.
Props Frozzare.
Fixes#35289.
git-svn-id: https://develop.svn.wordpress.org/trunk@36367 602fd350-edb4-49c9-b593-d223f7449a82
* Move the legacy `allowed_themes` filter to `WP_Theme::get_allowed_on_network()`, where it will continue to filter themes allowed on the network.
* Add `network_allowed_themes` filter to `WP_Theme::get_allowed()` and pass `$blog_id` to provide context.
* Add `site_allowed_themes` filter to `WP_Theme::get_allowed_on_site()` and pass `$blog_id` to provide context.
Props pauldewouters, lamosty, michalzuber, dmsnell, johnnypea, rob.
Fixes#28436.
git-svn-id: https://develop.svn.wordpress.org/trunk@36366 602fd350-edb4-49c9-b593-d223f7449a82
We'll be adjusting the placement of this filter and adding two other related filters, so we should make sure it continues to work as expected after the change.
See #28436.
git-svn-id: https://develop.svn.wordpress.org/trunk@36350 602fd350-edb4-49c9-b593-d223f7449a82
[32353] changed the way the 'name' param in `get_terms()` is sanitized, by
running it through `sanitize_term_field( 'name' )` before performing the SQL
query. An unintentional side effect of this change was that the string is
double-escaped: once by `wp_filter_kses()`, and once by `esc_sql()`. The
double-escaping was causing 'name' queries to fail when the param contained
apostrophes or other escaped characters.
Fixes#35493.
git-svn-id: https://develop.svn.wordpress.org/trunk@36348 602fd350-edb4-49c9-b593-d223f7449a82
This makes the code easier to browse.
`factory.php` loads the new files, so this is backwards compatible in case `factory.php` is loaded directly for access to one of the classes.
See #35492.
git-svn-id: https://develop.svn.wordpress.org/trunk@36347 602fd350-edb4-49c9-b593-d223f7449a82
In [36338], a template loading error was shown only to users with the `install_themes` capability. This is now displayed users with the `switch_themes` capability, as users with this cap can at least switch to a different theme. Also, this will now show for site administrators in multisite, whereas `install_themes` is limited to superadmins.
Props dd32.
See #21931.
git-svn-id: https://develop.svn.wordpress.org/trunk@36344 602fd350-edb4-49c9-b593-d223f7449a82
We still generate the `wp-admin.*` files for compabitility purposes, however they only include the `@import()` lines.
Fixes#35229
git-svn-id: https://develop.svn.wordpress.org/trunk@36341 602fd350-edb4-49c9-b593-d223f7449a82
* `$cookie_domain` was incorrectly documented as an `int`.
* `$id` and `$blog_id`, though numeric, are provided as strings and should be documented as such.
Fixes#35404.
git-svn-id: https://develop.svn.wordpress.org/trunk@36340 602fd350-edb4-49c9-b593-d223f7449a82
In r35674 only the local variables were unset, when using `unset()` with a global variable the `$GLOBALS` array must be used.
Fixes#35506.
git-svn-id: https://develop.svn.wordpress.org/trunk@36339 602fd350-edb4-49c9-b593-d223f7449a82
After [36335], if a template file is not loaded, an error is displayed
to logged-in users. As logged-in users may have no capabilities,
this check is insubstantial. Limit the display of this error to users
with the `install_themes` capability, i.e. someone who has the capacity
to deal with the error.
See #21931.
git-svn-id: https://develop.svn.wordpress.org/trunk@36338 602fd350-edb4-49c9-b593-d223f7449a82
On the off-chance the active theme folder is renamed or deleted, a "white screen
of death" was displayed to the user. Instead, the user is shown a useful error
screen displaying any errors the theme has (e.g. if the theme can't be found).
Props MikeHansenMe, SergeyBiryukov.
See #21931.
git-svn-id: https://develop.svn.wordpress.org/trunk@36335 602fd350-edb4-49c9-b593-d223f7449a82