Commit Graph

40075 Commits

Author SHA1 Message Date
Dominik Schilling 350332019e I18N: Use RTL stylesheets when running from /src.
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
2019-07-27 14:16:59 +00:00
Dominik Schilling 3ea5731049 REST API: Pass current request object to `rest_authentication_errors` filter in `WP_REST_Server::check_authentication()`.
Fixes #46907.

git-svn-id: https://develop.svn.wordpress.org/trunk@45687 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-27 13:43:41 +00:00
Dominik Schilling 2f1afbcf79 Tools: Remove internationalization tools (also known as `makepot.php`).
It has been a great pleasure to work with `makepot.php` over the past [https://i18n.trac.wordpress.org/changeset/4169/ 11 years] but now it's time to say goodbye.
The tools have been integrated into WP-CLI as [https://developer.wordpress.org/cli/commands/i18n/make-pot/ wp i18n make-pot] and [https://developer.wordpress.org/cli/commands/i18n/make-json/ wp i18n make-json]. The new commands were optimized to support current PHP versions and are more flexible and reliable when extracting strings for PHP, and JavaScript.

Access to the old tools continue to exist in previous branches or at https://i18n.svn.wordpress.org/tools/.

Fixes #45287.

git-svn-id: https://develop.svn.wordpress.org/trunk@45686 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-27 13:09:16 +00:00
Dominik Schilling 84b977945c I18N: Add support for custom `WP_PLUGIN_URL` in `load_script_textdomain()`.
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
2019-07-27 12:43:56 +00:00
Sergey Biryukov 160fc055da Accessibility: Toolbar: Make the `min-width` value for `#wpadminbar` at `782px` breakpoint consistent with that of `<body>`.
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
2019-07-26 22:03:31 +00:00
Sergey Biryukov 5618dfc6d3 Accessibility: Taxonomy: When a new category or tag is being added, show a spinner and noop the button to avoid multiple requests.
Props andg, afercia, guddu1315, SergeyBiryukov.
Fixes #47607.

git-svn-id: https://develop.svn.wordpress.org/trunk@45683 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-26 17:45:21 +00:00
Sergey Biryukov 7493196625 Administration: Merge CSS rules for `#adminmenu .wp-submenu a` in one place.
Props ozmatflc, AkSDvP.
Fixes #47780.

git-svn-id: https://develop.svn.wordpress.org/trunk@45682 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-26 13:48:52 +00:00
Sergey Biryukov 455cc051fc REST API: Make "Could not update meta value in database" error messages more helpful.
Props apermo, AkSDvP.
Fixes #46252.

git-svn-id: https://develop.svn.wordpress.org/trunk@45681 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-26 13:19:44 +00:00
Sergey Biryukov 230960f8c0 Site Health: Show parent theme in its own accordion on Site Health Info screen; rename "Other Themes" to "Inactive Themes".
Props garrett-eclipse, mukesh27, Clorith, xkon, msaggiorato.
Fixes #46925.

git-svn-id: https://develop.svn.wordpress.org/trunk@45680 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-26 03:48:32 +00:00
Sergey Biryukov d18b725f75 Coding Standards: Fix newlines in `wp-includes/date.php`.
See #47775.

git-svn-id: https://develop.svn.wordpress.org/trunk@45679 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-26 00:11:37 +00:00
Sergey Biryukov 0eaaf84419 Coding Standards: Move `wp-includes/date.php` to `wp-includes/class-wp-date-query.php`.
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
2019-07-25 23:30:21 +00:00
Sergey Biryukov 48120a1395 I18N: Update translator comment missed in [45676].
See #47771.

git-svn-id: https://develop.svn.wordpress.org/trunk@45677 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 22:55:36 +00:00
Sergey Biryukov 004ff0e1a7 I18N: Update translator comments after [45674].
See #47771.

git-svn-id: https://develop.svn.wordpress.org/trunk@45676 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 22:51:53 +00:00
Sergey Biryukov 5b86d712f4 Bundled Themes: Replace Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.

git-svn-id: https://develop.svn.wordpress.org/trunk@45675 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 22:45:48 +00:00
Sergey Biryukov ae8a620efb General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.

git-svn-id: https://develop.svn.wordpress.org/trunk@45674 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 22:44:48 +00:00
Sergey Biryukov 77a1f39484 Upgrade/Install: Bring some consistency to installation screen styles.
* 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
2019-07-25 19:10:33 +00:00
Sergey Biryukov f00229ac0e Docs: Clarify that `is_network_admin()` does not check if the site is a Multisite network; `is_multisite()` should be used for that.
Props svovaf, dilipbheda, tazotodua.
Fixes #47415.

git-svn-id: https://develop.svn.wordpress.org/trunk@45672 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 15:18:05 +00:00
Sergey Biryukov 128597b69a Posts, Post Types: Introduce `is_sticky` filter in `is_sticky()` to provide more flexibility for custom sticky post implementations.
Props dehisok, greenshady.
Fixes #37629.

git-svn-id: https://develop.svn.wordpress.org/trunk@45671 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 01:35:52 +00:00
Sergey Biryukov d758aa802d Code Editor: Check for correct `mode` value in `wp.codeEditor.initialize` to enable autocomplete support for PHP.
Props ediamin.
Fixes #47769.

git-svn-id: https://develop.svn.wordpress.org/trunk@45670 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 01:26:13 +00:00
Sergey Biryukov 85f0ec3eba Permalinks: Update URLs for "Changing File Permissions" documentation article.
Props patilswapnilv, ianbelanger, SergeyBiryukov.
Fixes #47768.

git-svn-id: https://develop.svn.wordpress.org/trunk@45669 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 01:18:01 +00:00
Sergey Biryukov 66be571e3a Coding Standards: Use correct variable in `wp_dropdown_categories()` after [45667].
See #45059.

git-svn-id: https://develop.svn.wordpress.org/trunk@45668 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 01:06:45 +00:00
Sergey Biryukov e5a0610d53 Coding Standards: Rename `$r` variable used with `wp_parse_args()` to `$parsed_args` for clarity.
Props freewebmentor.
Fixes #45059.

git-svn-id: https://develop.svn.wordpress.org/trunk@45667 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 00:47:53 +00:00
Gary Pendergast 3d1714de71 Coding Standards: Move the remaining PHPCS errors to report as warnings, and add Travis tests.
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
2019-07-19 07:47:16 +00:00
Gary Pendergast ab26c9a2fb Coding Standards: Fix a filename replacement missed in [45663].
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45664 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-19 04:42:00 +00:00
Gary Pendergast 4943b377ce Coding Standards: Move `wp-includes/class-oembed.php` to `wp-includes/class-wp-oembed.php`.
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
2019-07-19 04:31:40 +00:00
Gary Pendergast e0d8dbe350 Coding Standards: Move wp-admin/custom-background.php to wp-admin/includes/class-custom-background.php
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
2019-07-19 04:01:41 +00:00
Gary Pendergast 968254f4f4 Coding Standards: Exclude a handful of incorrectly named files that won't be renamed.
See #47632.


git-svn-id: https://develop.svn.wordpress.org/trunk@45661 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-19 03:49:26 +00:00
Gary Pendergast 8cf3e59fc4 Coding Standards: Improve spacing of `printf()` calls in the admin About pages.
Props garrett-eclipse.
Fixes #47734.



git-svn-id: https://develop.svn.wordpress.org/trunk@45660 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-19 00:08:38 +00:00
Sergey Biryukov 6ec230ac18 I18N: Make URLs to `https://wordpress.org/about/` and related pages translatable, as they can now be localized on Rosetta sites.
Props mukesh27.
Fixes #46386.

git-svn-id: https://develop.svn.wordpress.org/trunk@45659 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-18 12:40:39 +00:00
Gary Pendergast 0b06e59940 Customizer: Show all widgets when the search field is cleared.
When clicking the clear button on the widget search field, the search results should refresh to show all widgets.

Props Mahesh901122.
Fixes #47534.


git-svn-id: https://develop.svn.wordpress.org/trunk@45658 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-18 05:54:10 +00:00
Sergey Biryukov e6e96d0ef9 Editor: Replace external Classic Editor plugin URL with a link to Add Plugins screen with Classic Editor pre-selected.
This applies to messages displayed when JavaScript is disabled in Block Editor, or an incompatible meta box is used.

Props garrett-eclipse, derweili, afercia.
Fixes #47487.

git-svn-id: https://develop.svn.wordpress.org/trunk@45657 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-18 01:32:13 +00:00
Sergey Biryukov 9db88b1b02 Coding Standards: Fix WPCS issues in [45655].
See #47723.

git-svn-id: https://develop.svn.wordpress.org/trunk@45656 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-17 19:21:28 +00:00
Sergey Biryukov fd23000b11 Menus: Trim whitespace from custom link URLs.
Props majemedia, SergeyBiryukov.
Fixes #47723.

git-svn-id: https://develop.svn.wordpress.org/trunk@45655 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-17 18:44:56 +00:00
Gary Pendergast 8416a2b410 Coding Standards: Move `wp-admin/custom-header.php` to `wp-admin/includes/class-custom-image-header.php`
This renames the file containing the `Custom_Image_Header` class to conform to the coding standards.

This commit also includes:
- A new `custom-header.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@45654 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-17 06:16:27 +00:00
Gary Pendergast 3686fd8c59 Coding Standards: Exclude some class names from checks when they can't be renamed.
Renaming the classes would likely cause back compat issues, so the safest option is to allow this handful to continue unchanged.

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45653 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-17 04:33:27 +00:00
Sergey Biryukov 3bb75e0a3f Coding Standards: Fix WPCS issues in [45651].
See #38195.

git-svn-id: https://develop.svn.wordpress.org/trunk@45652 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-17 01:49:08 +00:00
Sergey Biryukov 916916317d Media: Add "Documents", "Spreadsheets", and "Archives" groups to file type filter in Media Library.
Props zodiac1978, swissspidy, karmatosed, SergeyBiryukov.
Fixes #38195.

git-svn-id: https://develop.svn.wordpress.org/trunk@45651 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-17 01:21:55 +00:00
Sergey Biryukov ceeb99ecbc Administration: In `admin-ajax.php`, send `X-Robots-Tag` header earlier, so that it applies before `wp_die()` when no action parameter was provided.
Props robi-bobi, harryfear, garrett-eclipse.
Fixes #47711.

git-svn-id: https://develop.svn.wordpress.org/trunk@45650 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-17 01:10:59 +00:00
Sergey Biryukov 8df86efc2b Site Health: Use consistent verbiage for "Learn more" links.
Props ronakganatra, garrett-eclipse.
Fixes #47302.

git-svn-id: https://develop.svn.wordpress.org/trunk@45649 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 22:27:55 +00:00
Sergey Biryukov 94a6e06ab9 Site Health: Replace "harddrive" with "device" on Site Health Info screen.
Props chetan200891, timhavinga, Cybr, Clorith.
Fixes #46965.

git-svn-id: https://develop.svn.wordpress.org/trunk@45648 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 22:18:58 +00:00
Sergey Biryukov a65fcde5c0 I18N: Merge duplicate "Your plugins/themes/translations are all up to date" strings.
Props ramiy.
Fixes #47252.

git-svn-id: https://develop.svn.wordpress.org/trunk@45647 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 22:13:01 +00:00
Sergey Biryukov 2ae276c44f Media: Add a unit test for `wp_get_mime_types()`.
Props pbearne.
Fixes #47701.

git-svn-id: https://develop.svn.wordpress.org/trunk@45646 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 21:51:45 +00:00
Andrew Ozz 9d00289c60 Media: Sort the new sizes array by priority when creating image sub-sizes.
See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45645 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 21:47:35 +00:00
Sergey Biryukov 98a2971872 Customize: In `WP_Customize_Widgets::capture_filter_pre_update_option()`, return the filtered value instead of `null` when bailing early for ignored options.
Props dlh.
Fixes #47715.

git-svn-id: https://develop.svn.wordpress.org/trunk@45644 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 21:32:21 +00:00
Sergey Biryukov 09fc7ba6ae Docs: Move the `do_mu_upgrade` DocBlock out of the preceding `if` statement.
Props ChriCo, dkarfa.
Fixes #47710.

git-svn-id: https://develop.svn.wordpress.org/trunk@45643 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 13:14:45 +00:00
Sergey Biryukov 811b92192d Docs: Correct `@since` tag for `do_mu_upgrade` hook, for consistency with `after_mu_upgrade` and `wpmu_upgrade_site`.
See #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45642 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 12:41:16 +00:00
Sergey Biryukov 1570f89693 Comments: Fix typo in comment reply observer options.
Props maguiar.
Fixes #47706. See #46260.

git-svn-id: https://develop.svn.wordpress.org/trunk@45641 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 16:45:58 +00:00
Gary Pendergast 9f8a75e154 Code Modernisation: Revert [45624].
Changing the method signatures on `Walker` causes back compat issues.

See #47678.




git-svn-id: https://develop.svn.wordpress.org/trunk@45640 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 07:03:54 +00:00
Gary Pendergast 2da7f9f524 Code Modernisation: Fix known instances of array access on data types that can't be accessed as arrays.
PHP 7.4 addes a warning when trying access a null/bool/int/float/resource (everything but array, string and object) as if it were an array.

This change fixes all of these warnings visible in unit tests.

Props jrf.
See #47704.




git-svn-id: https://develop.svn.wordpress.org/trunk@45639 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 06:24:08 +00:00
Gary Pendergast e6c750b55c Code Modernisation: Document when the Hash polyfills can be removed.
The Hash extension cannot be disabled as of PHP 7.4. So, while we can't remove these polyfills yet, we can document when we'll be able to.

Props jrf.
Fixes #47698.



git-svn-id: https://develop.svn.wordpress.org/trunk@45638 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 05:13:10 +00:00