Commit Graph

7170 Commits

Author SHA1 Message Date
Sergey Biryukov
66afb60397 Site Health: Use consistent verbiage for "Learn more" links.
Props ronakganatra, garrett-eclipse.
Fixes #47302.
Built from https://develop.svn.wordpress.org/trunk@45649


git-svn-id: http://core.svn.wordpress.org/trunk@45460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-16 22:28:57 +00:00
Sergey Biryukov
e5ad773194 I18N: Merge duplicate "Your plugins/themes/translations are all up to date" strings.
Props ramiy.
Fixes #47252.
Built from https://develop.svn.wordpress.org/trunk@45647


git-svn-id: http://core.svn.wordpress.org/trunk@45458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-16 22:13:58 +00:00
Andrew Ozz
5eba5381e6 Media: Sort the new sizes array by priority when creating image sub-sizes.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45645


git-svn-id: http://core.svn.wordpress.org/trunk@45456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-16 21:48:56 +00:00
Sergey Biryukov
83d175cdd0 I18N: Add context for theme filter strings in WP_MS_Themes_List_Table::get_views().
Props audrasjb.
Fixes #47695.
Built from https://develop.svn.wordpress.org/trunk@45634


git-svn-id: http://core.svn.wordpress.org/trunk@45445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-14 14:47:56 +00:00
Gary Pendergast
4c3d541e23 Block Editor: Fix the link to the classic editor when incompatible meta boxen are detected.
Props tmatsuur, mukesh27.
Fixes #45935.

Built from https://develop.svn.wordpress.org/trunk@45618


git-svn-id: http://core.svn.wordpress.org/trunk@45429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-11 06:01:58 +00:00
Sergey Biryukov
7369ff02f5 Coding Standards: Remove extra whitespace in list tables' column_cb() methods.
See #47632.
Built from https://develop.svn.wordpress.org/trunk@45617


git-svn-id: http://core.svn.wordpress.org/trunk@45428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 21:11:58 +00:00
Sergey Biryukov
9a5f538153 Coding Standards: Remove extra whitespace in wp-admin/includes/image-edit.php.
See #47632.
Built from https://develop.svn.wordpress.org/trunk@45616


git-svn-id: http://core.svn.wordpress.org/trunk@45427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 21:05:57 +00:00
Sergey Biryukov
6a696f6051 I18N: Move code out of translatable string in a _deprecated_argument() message in wp_stream_image(), wp_save_image_file(), and image_edit_apply_changes().
Props ramiy.
Fixes #47406.
Built from https://develop.svn.wordpress.org/trunk@45615


git-svn-id: http://core.svn.wordpress.org/trunk@45426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 20:57:56 +00:00
Sergey Biryukov
bb365054b8 Menus: Remove extra whitespace from URLs in Walker_Nav_Menu_Edit::start_el().
Props alexeyskr, SergeyBiryukov.
Fixes #47666.
Built from https://develop.svn.wordpress.org/trunk@45614


git-svn-id: http://core.svn.wordpress.org/trunk@45425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 20:45:56 +00:00
Sergey Biryukov
29e5155969 Filesystem API: Check correct variable in WP_Filesystem_Direct::dirlist() after [45611].
Props zinigor.
Fixes #47668. See #47632.
Built from https://develop.svn.wordpress.org/trunk@45613


git-svn-id: http://core.svn.wordpress.org/trunk@45424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 15:58:57 +00:00
Gary Pendergast
4be25f3d06 Coding Standards: Fix instances of WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase.
See #46732.

Built from https://develop.svn.wordpress.org/trunk@45612


git-svn-id: http://core.svn.wordpress.org/trunk@45423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 06:29:57 +00:00
Gary Pendergast
abcbee954f Coding Standards: Fix instances of WordPress.PHP.NoSilencedErrors.Discouraged.
Noteable changes:
- The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set.
- Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
- Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4.
- Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.

See #46732.

Built from https://develop.svn.wordpress.org/trunk@45611


git-svn-id: http://core.svn.wordpress.org/trunk@45422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 05:45:58 +00:00
Gary Pendergast
14c7533162 Coding Standards: Fix all WordPress.DB.PreparedSQLPlaceholders issues.
See #47632.


Built from https://develop.svn.wordpress.org/trunk@45603


git-svn-id: http://core.svn.wordpress.org/trunk@45414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 05:43:55 +00:00
Gary Pendergast
87675d288b Coding Standards: Fix all WordPress.WhiteSpace.PrecisionAlignment issues.
See #47632.


Built from https://develop.svn.wordpress.org/trunk@45602


git-svn-id: http://core.svn.wordpress.org/trunk@45413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 05:21:56 +00:00
Gary Pendergast
a02b5cc2a8 Coding Standards: Mark the handful of hook names with uppercase characters or hyphens as ignored.
See #47632.


Built from https://develop.svn.wordpress.org/trunk@45599


git-svn-id: http://core.svn.wordpress.org/trunk@45410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 01:45:56 +00:00
Gary Pendergast
cf3fa9f7c8 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632.


Built from https://develop.svn.wordpress.org/trunk@45583


git-svn-id: http://core.svn.wordpress.org/trunk@45394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 12:52:01 +00:00
Gary Pendergast
55af0f0d0a Coding Standards: Fix/ignore the WordPress.NamingConventions.ValidFunctionName violations.
See #47632


Built from https://develop.svn.wordpress.org/trunk@45580


git-svn-id: http://core.svn.wordpress.org/trunk@45391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 08:01:57 +00:00
Gary Pendergast
072682b1ed Multisite: Use size_format() in display_space_usage().
Deleted code is the best code.

Fixes #28239.


Built from https://develop.svn.wordpress.org/trunk@45579


git-svn-id: http://core.svn.wordpress.org/trunk@45390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 03:47:56 +00:00
Andrea Fercia
ba24a8f6d3 Plugins: Fix the plugin details modal layout after [45520].
Props mukesh27, marybaum, audrasjb.
Fixes #47561.

Built from https://develop.svn.wordpress.org/trunk@45563


git-svn-id: http://core.svn.wordpress.org/trunk@45374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-25 14:11:55 +00:00
Sergey Biryukov
f0e9ffdebb Plugins: When validating plugin's WordPress and PHP requirements, check for Requires at least and Requires PHP headers in the plugin's main PHP file.
This allows for blocking plugin activation if it requires a higher version of PHP or WordPress, and does not have a `readme.txt` file.

If the headers are defined in both `readme.txt` and the main plugin file, precedence is given to the plugin file.

Props afragen, Otto42, Ipstenu.
Fixes #46938.
Built from https://develop.svn.wordpress.org/trunk@45546


git-svn-id: http://core.svn.wordpress.org/trunk@45357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-18 03:24:52 +00:00
Andrew Ozz
88ffa41ee3 Media: Ignore errors coming from image_resize_dimensions() when creating sub-sizes (for now). It returns false when the requested size is larger than the original image and should be skipped. This triggers new WP_Error in WP_Image_Editor::resize().
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45543


git-svn-id: http://core.svn.wordpress.org/trunk@45354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-16 01:33:51 +00:00
Andrew Ozz
da7839dc45 After [45538]: fix another WPCS "strict comparison" fix.
Props birgire.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45540


git-svn-id: http://core.svn.wordpress.org/trunk@45351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-15 16:24:52 +00:00
Andrew Ozz
5987caeecc After [45538]: fix a WPCS fix and make couple of var names consistent.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45539


git-svn-id: http://core.svn.wordpress.org/trunk@45350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-15 01:32:53 +00:00
Andrew Ozz
05302bd054 Save progress of intermediate image creation after upload. First run.
- Introduces `wp_get_missing_image_subsizes()` and `wp_update_image_subsizes()` to generate image sub-sizes that are missing or were not created after the upload.
- Adds a way to display errors that happened while creating sub-sizes.
- Introduces `wp_create_image_subsizes()` intended for use after an image was uploaded. It saves/updates the image metadata immediately after each sub-size is created. This fixes the (long standing) problem when some of the sub-size image files were created but there was a timeout or an error and the metadata was not saved. Until now such uploads were considered "failed" which usually resulted in the user trying to upload the same image again, creating even more "orphan" image files.

Note that the patch also includes some unrelated WPCS fixes.

Props mikeschroder, azaozz.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45538


git-svn-id: http://core.svn.wordpress.org/trunk@45349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-15 01:02:52 +00:00
Sergey Biryukov
0239fe6d10 Administration: Adjust code for "Manage widgets or menus" item on "Welcome to WordPress" panel to avoid an extra space after [42343].
Props Presskopp, davidbaumwald.
Fixes #47536.
Built from https://develop.svn.wordpress.org/trunk@45536


git-svn-id: http://core.svn.wordpress.org/trunk@45347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-14 00:29:52 +00:00
Andrew Ozz
727838a11b Add a Recovery Mode Exit button to the notice. This fixes it in responsive view.
Props desrosj, karmatosed, chetan200891, afercia, afragen, garrett-eclipse.
Fixes #47070.
Built from https://develop.svn.wordpress.org/trunk@45529


git-svn-id: http://core.svn.wordpress.org/trunk@45340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-13 16:00:52 +00:00
Andrew Ozz
d0c1b77cda Privacy tools:
- Move the (remaining) privacy tools related functions from `wp-admin/includes/file.php` to `wp-admin/includes/privacy-tools.php`.
- Move the `WP_User_Request` class to a separate file.

See #43895.
Built from https://develop.svn.wordpress.org/trunk@45519


git-svn-id: http://core.svn.wordpress.org/trunk@45330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-10 23:54:53 +00:00
Sergey Biryukov
3b69e493f6 I18N: Merge duplicate "authenticity could not be verified" strings, fix comma placement on About page.
Props pedromendonca, garrett-eclipse.
Fixes #47475.
Built from https://develop.svn.wordpress.org/trunk@45515


git-svn-id: http://core.svn.wordpress.org/trunk@45326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-10 14:14:51 +00:00
Peter Wilson
a5e57d7245 Site health: Introduce view_site_health_checks capability.
Introduces the faux primitive capability `view_site_health_checks` available to single site admins and multisite super-admin to view the site health page within the admin.

The capability is mapped to the `install_plugins` capability without being dependent on the file system being writable. This fixes a bug where the feature couldn't be used by sites unable to write to the file system or managed through version control.

The capability is granted on the `user_has_cap` filter.

Props birgire, Clorith, palmiak, peterwilsoncc, spacedmonkey.
Fixes #46957.


Built from https://develop.svn.wordpress.org/trunk@45507


git-svn-id: http://core.svn.wordpress.org/trunk@45318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-10 07:42:52 +00:00
John Blackbourn
c9b51df3d0 I18N: Allow the length of automatically generated excerpts to be localized.
This introduces three new strings that can be used to control the maximum length of automatically generated excerpts for posts, comments, and draft post previews in the dashboard. Optionally combined with the existing word count type control this allows languages which include many multibyte characters to specify more appropriate maximum excerpt lengths.

Props miyauchi, birgire, johnbillion

Fixes #44541

Built from https://develop.svn.wordpress.org/trunk@45505


git-svn-id: http://core.svn.wordpress.org/trunk@45316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-08 18:42:52 +00:00
Andrea Fercia
935c35fe34 Accessibility: Improve the Screen Options and Help buttons order.
- makes the buttons visual order match the DOM order
- also, restores the focus style on the "hero" primary button after [34948]

Props vrimill, mukesh27 for reporting and testing.
Fixes #45094.

Built from https://develop.svn.wordpress.org/trunk@45503


git-svn-id: http://core.svn.wordpress.org/trunk@45314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-08 16:31:53 +00:00
Andrew Ozz
7cee029897 Privacy tools: remove some left-over code and fix inline comment.
See #43895.


Built from https://develop.svn.wordpress.org/trunk@45500


git-svn-id: http://core.svn.wordpress.org/trunk@45311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-08 00:30:51 +00:00
Andrea Fercia
6a9bcaeaa9 Accessibility: Improve accessibility of all the media views form controls.
- changes the media views form controls to have explicitly associated labels with for/id attributes
- adds a few missing labels / aria-labels
- improves a few existing labels / aria-labels
- improves semantics in a few places, by adding visually hidden headings, fieldset + legend elements, aria-describedby attributes
- improves the image custom size input fields and their labelling
- adds `role="status"` to the "saved" indicator so that status messages are announced to assistive technologies
- swaps the columns source order in the image details template, to make visual and DOM order match
- swaps the "Replace" and "Back" buttons source order in the Replace Image view, to make visual and DOM order match
- gallery settings: move checkbox label to the right: checkboxes are supposed to have labels on the right
- merge similar strings, unified to "Drop files to upload" (removed "Drop files here", and "Drop files anywhere to upload")
- makes the "upload-ui" consistent across the media views
- hides the IE 11 "X" `::-ms-clear` button in the Insert from URL field, as it conflicts with the uploading spinner
- adds comments to all the media templates to clarify their usage
- slightly increases vertical spacing between form fields in the media sidebar
- removes some CSS selectors introduced as backwards compatibility for WordPress pre-4.4
- removes some CSS still targeting Internet Explorer 7 and 8

Fixes #47141.
Fixes #47122.

Built from https://develop.svn.wordpress.org/trunk@45499


git-svn-id: http://core.svn.wordpress.org/trunk@45310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-07 20:45:02 +00:00
desrosj
4c0620bdf8 Privacy: Remove inline CSS within personal data request list tables.
The `.hidden` class can be used to show and hide UI elements instead.

Props birgire, pratikthink, garrett-eclipse.
Fixes #44839.
Built from https://develop.svn.wordpress.org/trunk@45490


git-svn-id: http://core.svn.wordpress.org/trunk@45301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-04 23:40:55 +00:00
Sergey Biryukov
13da094c39 Upgrade/Install: Correct operator precedence for an error code in WP_Ajax_Upgrader_Skin::error().
Props jrf.
Fixes #47441.
Built from https://develop.svn.wordpress.org/trunk@45487


git-svn-id: http://core.svn.wordpress.org/trunk@45298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-31 14:14:52 +00:00
desrosj
bb3c264350 Administration: Add missing filter documentation for Site Health auto update tests.
Props johnbillion, mukesh27.
Fixes #47388.
Built from https://develop.svn.wordpress.org/trunk@45459


git-svn-id: http://core.svn.wordpress.org/trunk@45270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-29 13:59:51 +00:00
Sergey Biryukov
51ee349942 Docs: Add a comment about the reinstated wp-admin/options-privacy.php.
See #43895.
Built from https://develop.svn.wordpress.org/trunk@45454


git-svn-id: http://core.svn.wordpress.org/trunk@45265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-27 03:03:52 +00:00
Sergey Biryukov
96b4570781 Privacy: Remove reinstated wp-admin/options-privacy.php from $_old_files.
Fix WPCS violations in [45448].

See #43895.
Built from https://develop.svn.wordpress.org/trunk@45453


git-svn-id: http://core.svn.wordpress.org/trunk@45264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-27 02:40:53 +00:00
John Blackbourn
6aab3f2f05 Docs: Improve documentation for some more variadic functions.
Fixes #37402

Built from https://develop.svn.wordpress.org/trunk@45450


git-svn-id: http://core.svn.wordpress.org/trunk@45261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 22:48:51 +00:00
Andrew Ozz
87acdab81d Privacy tools: Organize privacy functions into logical files and classes.
Props xkon, birgire, desrosj, garrett-eclipse, azaozz.
See #43895.
Built from https://develop.svn.wordpress.org/trunk@45448


git-svn-id: http://core.svn.wordpress.org/trunk@45259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 20:50:53 +00:00
Sergey Biryukov
cd9c6ce36e I18N: Merge duplicate "Add Comment" strings.
Props ramiy.
Fixes #47246.
Built from https://develop.svn.wordpress.org/trunk@45441


git-svn-id: http://core.svn.wordpress.org/trunk@45252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 18:43:52 +00:00
Sergey Biryukov
b97a2d4366 I18N: Merge duplicate "Loading..." strings.
Props ramiy.
Fixes #47248.
Built from https://develop.svn.wordpress.org/trunk@45438


git-svn-id: http://core.svn.wordpress.org/trunk@45249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 15:46:52 +00:00
Sergey Biryukov
9f4c2fcbae I18N: Merge duplicate "Try Again" strings.
Props ramiy.
Fixes #47251.
Built from https://develop.svn.wordpress.org/trunk@45433


git-svn-id: http://core.svn.wordpress.org/trunk@45244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 14:40:51 +00:00
Sergey Biryukov
f5db16738e Administration: Merge similar "file does not exist" messages in plugin and theme editors.
Props ramiy.
Fixes #47249.
Built from https://develop.svn.wordpress.org/trunk@45431


git-svn-id: http://core.svn.wordpress.org/trunk@45242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 12:35:51 +00:00
Sergey Biryukov
c77e771c84 Date/Time: Replace all instances of date() with gmdate().
Use of `date()` in core depends on PHP timezone set to UTC and not changed by third party code (which cannot be guaranteed).

`gmdate()` is functionally equivalent, but is not affected by PHP timezone setting: it's always UTC, which is the exact behavior the core needs.

Props nielsdeblaauw, Rarst.
Fixes #46438. See #44491.
Built from https://develop.svn.wordpress.org/trunk@45424


git-svn-id: http://core.svn.wordpress.org/trunk@45235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 00:12:54 +00:00
Andrea Fercia
48d9d94881 Accessibility: Improve settings tables and forms after [45403].
- adds `role="presentation"` to the edit comment table 
- removes a few pointless `<fieldset>` elements
- adds a few missing `<label>` elements
- adds the CSS class `class="td-full"` to table rows spanning to multiple cells
- adds explicit `scope="row"` attribute to the table headers in `options-permalink.php`: this table is better communicated as data table 
- uses consistent label association in the "Privacy Settings" page
- in the installation page "Set up your database connection": associates descriptions to their inout fields using `aria-describedby`
- improves the link to gravatar.com in the `user-edit.php` page

See #46899.
Fixes #47390.

Built from https://develop.svn.wordpress.org/trunk@45416


git-svn-id: http://core.svn.wordpress.org/trunk@45227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-25 15:19:53 +00:00
Sergey Biryukov
35a2322d32 General: Update support forum links.
There are a lot of places in Core that link to https://wordpress.org/support/ for the support forums, but that's now the URL for HelpHub. The new forums link is https://wordpress.org/support/forums/.

This is a follow-up to [45140], which changed the links in help tabs.

Props dilipbheda.
Fixes #47239. See #46790.
Built from https://develop.svn.wordpress.org/trunk@45412


git-svn-id: http://core.svn.wordpress.org/trunk@45223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-25 14:24:50 +00:00
John Blackbourn
ca028cfc4c Users: Allow Super Admins to remove themselves from a site on a Multisite network.
Props Mista-Flo, birgire

Fixes #41439

Built from https://develop.svn.wordpress.org/trunk@45407


git-svn-id: http://core.svn.wordpress.org/trunk@45218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-25 00:13:53 +00:00
Sergey Biryukov
b77cf42c0b Accessibility: Make sure layout tables across the admin are correctly linearized.
Adds `role="presentation"` to the `<table>` elements used for layout purposes.

Ideally, HTML tables should be used for tabular data. When tables are used for layout purposes, it's important to remove any native semantics so that assistive technologies can correctly announce the table content in a linearized fashion.

Props greatislander, afercia.
Fixes #46899.
Built from https://develop.svn.wordpress.org/trunk@45403


git-svn-id: http://core.svn.wordpress.org/trunk@45214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-24 21:56:54 +00:00
Sergey Biryukov
729d4a4942 I18N: Remove PHP function name from translatable string in WP_Debug_Data.
Props ramiy.
Fixes #47254.
Built from https://develop.svn.wordpress.org/trunk@45399


git-svn-id: http://core.svn.wordpress.org/trunk@45210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-24 01:41:52 +00:00