The filter is added with a priority of `0`, so a loose comparison had an unintended effect of adding the filter on every call.
Props withinboredom.
Fixes#47430.
git-svn-id: https://develop.svn.wordpress.org/trunk@45707 602fd350-edb4-49c9-b593-d223f7449a82
In `WP_REST_Controller::get_fields_for_response()`, exclude fields which are not registered to appear in the request's context.
In conjunction with r45705 this prevents the unnecessary computation of the sample permalink when making a request that is not context=edit.
Props dlh.
Fixes#45605.
git-svn-id: https://develop.svn.wordpress.org/trunk@45706 602fd350-edb4-49c9-b593-d223f7449a82
The sample permalink will now only be generated if the derivative `permalink_template` or `generated_slug` fields are to be included in the response, preventing an unnecessary database request for each post (via `wp_unique_post_slug()`) when those fields are not requested.
Props dlh.
See #45605.
git-svn-id: https://develop.svn.wordpress.org/trunk@45705 602fd350-edb4-49c9-b593-d223f7449a82
This fixes where 2 primary buttons were showing for bulk actions within media trash.
Props garrett-eclipse, afercia, ianbelanger, SergeyBiryukov
Fixes#46757, #46758
git-svn-id: https://develop.svn.wordpress.org/trunk@45701 602fd350-edb4-49c9-b593-d223f7449a82
The icons used across the dashboard had too low contrast to pass AA WCAG guidelines. They’re now slightly darker for better contrast.
Props @melchoyce, @SergeyBiryukov, @chetan200891 , @kjellr
Fixes#46935
git-svn-id: https://develop.svn.wordpress.org/trunk@45700 602fd350-edb4-49c9-b593-d223f7449a82
To run WordPress from /src you have to use the `--dev` flag which also builds the RTL stylesheets thus the admin notice and force to LTR is no longer required.
See #44492.
Fixes#44865.
git-svn-id: https://develop.svn.wordpress.org/trunk@45688 602fd350-edb4-49c9-b593-d223f7449a82
Plugins may not be on the same host/path as the rest of the content. To support loading translations for this setup check if the script source matches `plugins_url()`.
Also fixes an undefined index notice when a custom content URL has no path.
Props odminstudios, ocean90.
Fixes#46336, #46387.
git-svn-id: https://develop.svn.wordpress.org/trunk@45685 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the "My Account" toolbar item stays visible at high zoom levels.
Props isabel_brison, chetan200891.
Fixes#47603.
git-svn-id: https://develop.svn.wordpress.org/trunk@45684 602fd350-edb4-49c9-b593-d223f7449a82
This renames the file containing the `WP_Date_Query` class to conform to the coding standards.
This commit also includes:
- A new `date.php` that includes the new file, for anyone that may've been including the file directly.
- Replaces references to the old filename with the new filename.
Fixes#47775. See #47632.
git-svn-id: https://develop.svn.wordpress.org/trunk@45678 602fd350-edb4-49c9-b593-d223f7449a82
* Include `forms.css` and `l10n.css`, for consistency with login screen and other admin screens.
* Remove redundant `@import` directives from `login.css` for files already declared as dependencies.
* Adjust margin on password strength meter for consistency with other fields.
* Increase font size for "You will need this password to log in" notice.
* Fix misaligned icon on "Hide" button for the password.
Props iseulde, dan@micamedia.com, bassgang, cdog, johnbillion, nmenescardi, mukesh27, SergeyBiryukov.
Fixes#35776, #47757, #47758.
git-svn-id: https://develop.svn.wordpress.org/trunk@45673 602fd350-edb4-49c9-b593-d223f7449a82
The remaining error-level coding standards issues (specifically, associated with the sniffs `WordPress.PHP.YodaConditions.NotYoda`, `WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase`, `WordPress.DB.PreparedSQL.InterpolatedNotPrepared`, `WordPress.DB.PreparedSQL.NotPrepared`, and `WordPress.Files.FileName.InvalidClassFileName`) are marked as warnings, until they're all addressed.
This change allows us to run linting on Travis across the entire codebase, ensuring no other error-level violations can be introduced.
Additionally, PHPCS will now cache results locally, drastically improving performance for subsequent checks: scanning the entire codebase takes 1-2 minutes the first time, and less than one second for subsequent checks.
See #47632.
git-svn-id: https://develop.svn.wordpress.org/trunk@45665 602fd350-edb4-49c9-b593-d223f7449a82
This renames the file containing the `WP_oEmbed` class to conform to the coding standards.
This commit also includes:
- A new `class-oembed.php` that includes the new file, for anyone that may've been including the file directly.
- Replaces references to the old filename with the new filename.
See #47632.
git-svn-id: https://develop.svn.wordpress.org/trunk@45663 602fd350-edb4-49c9-b593-d223f7449a82
This renames the file containing the Custom_Background class to conform to the coding standards.
This commit also includes:
- A new custom-background.php that includes the new file, for anyone that may've been including the file directly.
- Replaces a reference to the old filename with the new filename.
See #47632.
git-svn-id: https://develop.svn.wordpress.org/trunk@45662 602fd350-edb4-49c9-b593-d223f7449a82