Commit Graph

17307 Commits

Author SHA1 Message Date
Gary Pendergast
6ef9017c96 Docs: Add missing periods to a grab-bag of docblocks.
Props Hitendra Chopda.
Fixes #45409.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 01:03:50 +00:00
Andrea Fercia
3578f89900 Accessibility: Improve the way Internet Explorer 11 and JAWS announce fieldset legends.
When Internet Explorer encounters a non interactive element with a `tabindex`
attribute, it adds the element to the accessibility tree with a `role=group` and
an accessible name computed from the element. This prevents JAWS from announcing
any fieldset legend within the element.

- removes `tabindex="0"` from the content and the toolbar containers: these tabindex attributes are no longer needed
- removes `aria-label="Main content"` from the content container: not needed
- keeps the media modal focus fallback introduced in [38142] by making the `#wpbody-content` element focusable only when needed

Props stevefaulkner, aardrian.
Fixes #43154.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 11:55:51 +00:00
Andrea Fercia
173e0f9ee7 Administration: CSS coding standards
- properties should be followed by a colon and a space
- media queries shouldn't use spaces within parenthesis
- indentation should use tabs instead of spaces or mixed spaces / tabs
- the content property should use double quotes
- no double spaces

Props nadim0988, afercia.
Fixes #45185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 07:41:52 +00:00
Gary Pendergast
dcdfd7f412 Docs: Fix the last handful of incorrect @since 5.0.0 docblock tags.
Props peterwilsoncc.
Fixes #45543.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:46:50 +00:00
Gary Pendergast
3f847f8b6c Media: media_handle_sideload() expectes wp_insert_attachment() to return a WP_Error.
For `wp_insert_attachment()` to do that, we need to be setting the `$wp_error` parameter to true.

Props subrataemfluence, jirihon.
Fixes #44303.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:27:50 +00:00
Gary Pendergast
3fc76e352b Comments: Correct the "Mine" comment count when viewing comments for a particular post.
The count should only be comments made on that post by the current user, not all comments by them.

Props chetan200891, garrett-eclipse.
Fixes #46014.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 02:45:49 +00:00
Gary Pendergast
b158c806d1 Coding Standards: Remove an assignment in a conditional from get_plugins().
Props subrataemfluence.
Fixes #44249.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 00:49:48 +00:00
desrosj
67bec96f92 Privacy: Improve the ’Copy’ button verbiage to provide more clarity.
On the Privacy Policy Guide, there is currently a ‘Copy’ button below each section of suggested text. It is unclear what copy means without more context. It could be assumed, for instance, that the suggested text is copied to a new page.

This changes the button text to read `Copy this section to clipboard` to more clearly inform the user what is copied and how.

Props JoshuaWold, garrett-eclipse, birgire, vishaldodiya.
Fixes #44677.
Built from https://develop.svn.wordpress.org/trunk@44629


git-svn-id: http://core.svn.wordpress.org/trunk@44460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 22:45:50 +00:00
desrosj
3baecf04ee Privacy: Allow column sorting in the privacy request admin tables.
This allows users to sort the export and erase personal data request tables by “Requester” (`post_title`, or user email) and “Requested” (`post_date`, or when the request was created), which can be helpful when sites have many requests present.

Props birgire, ianbelanger, pbiron, desrosj.
Fixes #43405.
Built from https://develop.svn.wordpress.org/trunk@44628


git-svn-id: http://core.svn.wordpress.org/trunk@44459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 17:52:49 +00:00
Felix Arntz
94fb16f03f Plugins: Use centralized API to display information about updating PHP when a plugin requires a higher version.
This changeset uses the API functions introduced in [44476] to link to the resource about updating PHP when highlighting a plugin's required PHP version is not met. It furthermore expands them, introducing a new `wp_update_php_annotation()` function that prints the markup to indicate that the default URL has been altered by the web host, allowing it to be reused universally.

Furthermore, this changeset adds missing `update_php` capability checks before displaying the information about updating PHP.

Props afragen.
Fixes #45986. See #43986, #45686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 17:07:00 +00:00
Andrea Fercia
da760d1ecf Taxonomy: Remove extra padding around buttons on term edit page.
Props monikarao, mukesh27, chetan200891.
See #9777.
Fixes #45183.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 12:59:52 +00:00
Gary Pendergast
8c702e04f3 Rewrite: Remove extra arguments being passed to WP_Rewrite::iis7_url_rewrite_rules().
Props rafsuntaskin.
Fixes #44185.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:10:50 +00:00
Gary Pendergast
63cbfcbded Plugin Editor: Disable the documentation look up button when no function is selected.
Props xkon.
Fixes #41143.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:01:50 +00:00
Gary Pendergast
4fa5437fc1 Admin: Use is_user_logged_in() instead of wp_validate_auth_cookie() in admin-post.php.
This matches the authentication check in `admin-ajax.php`, and allows the authentication method to be filtered.

Props jmdodd.
Fixes #45475.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:41:50 +00:00
Gary Pendergast
97aef0e336 Docs: Remove duplicate docblocks for the pre_user_login and link_category filters.
Props coffee2code.
Fixes #45308.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:29:49 +00:00
desrosj
50ddffbac3 Privacy: Use consistent variable naming when working with privacy requests.
Throughout the core privacy functions, `WP_User_Request` instances were stored in variables named both `$request`, and `$request_data`. This changes all occurrences of `$request_data` to `$request` for better consistency.

Props nateallen, bruceallen, garrett-eclipse.
Fixes #44708.
Built from https://develop.svn.wordpress.org/trunk@44606


git-svn-id: http://core.svn.wordpress.org/trunk@44437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 22:35:52 +00:00
Andrea Fercia
f76f57e8ab Admin: Use the correct CSS media query for the Help tab on small screens after [44588].
See #43221

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


git-svn-id: http://core.svn.wordpress.org/trunk@44435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 07:48:50 +00:00
Gary Pendergast
883ee72ed6 Coding Standards: Move an assignment out of a condition in wp-admin/admin.php.
Props subrataemfluence, jrf, pento.
Fixes #44363.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:48:50 +00:00
Gary Pendergast
db696999f1 Updates: Tweak the "before updating, please back up..." message.
Props chetan200891, sebastien@thivinfo.com.
See #43790.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:20:50 +00:00
desrosj
59fbee8544 Coding Standards: Assignments must be the first block of code on a line.
Props subrataemfluence.
Fixes #44225.
Built from https://develop.svn.wordpress.org/trunk@44593


git-svn-id: http://core.svn.wordpress.org/trunk@44424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 02:41:50 +00:00
Gary Pendergast
11e9c98d5b Admin: Make the Help tab available on small screens.
Props jobthomas, xkon.
Fixes #43221.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:20:50 +00:00
Gary Pendergast
51f4314441 Customizer: Use the sandbox attribute to prevent top navigation from the preview.
Props valchovski.
Fixes #42341.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 07:25:50 +00:00
Gary Pendergast
0390ddad6b Docs: Improve docblocks for _get_plugin_data_markup_translate() and _sort_uname_callback().
Props Jaydeep Rami.
Fixes #42228.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 06:54:49 +00:00
Andrea Fercia
1c59f76953 Accessibility: Exclude the Windows High Contrast mode transparent outline from the CSS transition after [44544].
See #41286.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 15:01:49 +00:00
Gary Pendergast
7a617078fa Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:41:52 +00:00
Andrea Fercia
298ef1992e Menus: Make menu items not jump while dragging items.
Props alexvorn2, welcher, afercia.
Fixes #41160.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 13:56:49 +00:00
Gary Pendergast
4f861b9548 Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace violations.
See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:40:50 +00:00
Gary Pendergast
6d5cd6842a Coding Standards: Document intentional case block fall-throughs.
Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:26:50 +00:00
Gary Pendergast
c008959e9e Coding Standards: Fix the minor WordPress.WP.I18n violations.
`WordPress.WP.I18n.MissingTranslatorsComment` is in progress in #44360.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:04:49 +00:00
Andrea Fercia
9a9b5699fd Accessibility: Improve text input in the Tags meta box when using Safari + Voiceover.
Props parbaugh, konainm, wbrubaker, pento, ryelle.
Fixes #44966.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:30:49 +00:00
Andrea Fercia
64bbbda39e Accessibility: Improve color contrast ratio in the Events and News dashboard widget.
Props boemedia, lucagrandicelli.
Fixes #45280.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:08:49 +00:00
Andrea Fercia
0b5beabd36 Accessibility: Remove negative tabindex from the login, install, and setup pages header.
Props bamadesigner, rishishah, jainnidhi.
Fixes #42632.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 17:21:52 +00:00
Andrea Fercia
7481337591 Accessibility: Add focus styles for Windows High Contrast mode.
Introduces in core new focus styles dedicated to Windows High Contrast mode. The 
new styles use a transparent CSS outline as already explored in the Block Editor.
This first part covers some of the main user interface controls like buttons, links,
and media views elements. Other parts will be addressed in the next future.

Fixes #41286.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 16:47:50 +00:00
Andrea Fercia
c40ae024cd Accessibility: Improve the way Safari and VoiceOver read out the screen reader text.
Sometimes, Safari and VoiceOver read out the text hidden with `screen-reader-text`
in a wrong order. While there's no known, full, solution, it is possible to make 
them respect the correct order reliably at least within buttons.

Fixes #42006.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 16:31:49 +00:00
Felix Arntz
f251342de7 I18n: Add missing translator comments in wp-admin/includes/class-wp-plugins-list-table.php.
Fixes #45898.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 10:46:53 +00:00
desrosj
ca36ed433b Docs: Correct since annotation for _wp_get_allowed_postdata().
This function was introduced in 5.0.1, not 4.9.9 as currently indicated. Introduced in [44047].
Built from https://develop.svn.wordpress.org/trunk@44540


git-svn-id: http://core.svn.wordpress.org/trunk@44371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 03:31:49 +00:00
Gary Pendergast
2772e5ec06 Admin: Don't use the keyup event in addition to the input event.
The `keyup` event was used to provide support for IE8, where which doesn't support the `input` event. As we dropped IE8 support some time ago, this was simply adding unnecessary complexity and double-event triggers.

Props dlh, afercia.
Fixes #32882.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:57:50 +00:00
desrosj
8eb90ac374 Docs: Restore output annotation in tags-suggest.js.
This was mistakenly removed in [44537].

See #38922.
Built from https://develop.svn.wordpress.org/trunk@44538


git-svn-id: http://core.svn.wordpress.org/trunk@44369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:50:51 +00:00
desrosj
6fbf4ceaea REST API: Restore use of wp_ajax_ajax_tag_search() for tag search.
This solution does not work with custom taxonomies in the current state.

Reverts [42614,42619,42737].

Props danielbachhuber.
See #38922.
Built from https://develop.svn.wordpress.org/trunk@44537


git-svn-id: http://core.svn.wordpress.org/trunk@44368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:37:51 +00:00
desrosj
da77cad30f PHPCS: Fix formatting issues.
Fixes formatting issues introduced in [44528].

See #42017.
Built from https://develop.svn.wordpress.org/trunk@44532


git-svn-id: http://core.svn.wordpress.org/trunk@44363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:52:52 +00:00
desrosj
d83d8e1154 Docs: Update since annotation for comments_list_table_query_args.
Introduced in [42420].

Fixes #42997.
Built from https://develop.svn.wordpress.org/trunk@44530


git-svn-id: http://core.svn.wordpress.org/trunk@44361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:40:51 +00:00
desrosj
13c66b1b18 Media: Store audio creation date in meta.
In [41746], `wp_get_media_creation_timestamp()` was introduced to read the created timestamp for videos from `getID3` in meta whenever possible. This information is useful separately from the dates on the file itself.

This adds the same support audio files by utilizing `wp_get_media_creation_timestamp()` in `wp_read_audio_metadata()`.

Props blob folio, desrosj.
Fixes #42017.
Built from https://develop.svn.wordpress.org/trunk@44528


git-svn-id: http://core.svn.wordpress.org/trunk@44359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:32:50 +00:00
Felix Arntz
5bb4a5aa0e Upgrade/Install: Add missing call to clear site meta cache in populate_site_meta().
See #44896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 21:29:50 +00:00
Felix Arntz
83603991c6 Bootstrap/Load: Fix missing object argument for singular capability checks and support capability tests overlooked in [44524].
See #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 20:44:50 +00:00
Felix Arntz
1e4088fc98 Bootstrap/Load: Introduce fatal error recovery mechanism allowing users to still log in to their admin dashboard.
This changeset introduces a `WP_Shutdown_Handler` class that detects fatal errors and which extension (plugin or theme) causes them. Such an error is then recorded, and an error message is displayed. Subsequently, in certain protected areas, for example the admin, the broken extension will be paused, ensuring that the website is still usable in the respective area. The major benefit is that this mechanism allows site owners to still log in to their website, to fix the problem by either disabling the extension or solving the bug and then resuming the extension.

Extensions are only paused in certain designated areas. The frontend for example stays unaffected, as it is impossible to know what pausing the extension would cause to be missing, so it might be preferrable to clearly see that the website is temporarily not accessible instead.

The fatal error recovery is especially important in scope of encouraging the switch to a maintained PHP version, as not necessarily every WordPress extension is compatible with all PHP versions. If problems occur now, non-technical site owners that do not have immediate access to the codebase are not locked out of their site and can at least temporarily solve the problem quickly.

Websites that have custom requirements in that regard can implement their own shutdown handler by adding a `shutdown-handler.php` drop-in that returns the handler instance to use, which must be based on a class that inherits `WP_Shutdown_Handler`. That handler will then be used in place of the default one.

Websites that would like to modify specifically the error template displayed in the frontend can add a `php-error.php` drop-in that works similarly to the existing `db-error.php` drop-in.

Props afragen, bradleyt, flixos90, ocean90, schlessera, SergeyBiryukov, spacedmonkey.
Fixes #44458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 20:05:49 +00:00
Boone Gorges
811be4779e Taxonomy: Update @since annotations for meta_box_sanitize_cb arg.
Introduced in [42211].

Fixes #36514.
Built from https://develop.svn.wordpress.org/trunk@44519


git-svn-id: http://core.svn.wordpress.org/trunk@44350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 15:11:48 +00:00
Pascal Birchler
9bcdc25145 Build/Test Tools: Fix coding standards issues after [44515] and [44514].
See #44494, #43743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 12:37:49 +00:00
Pascal Birchler
8f5e0ae06c Taxonomy: Display term list table in full width if there is no edit form.
Makes sure there is no empty space when a user can manage terms but lacks the capability to edit terms.

Props mathieuhays, marcwieland95.
Fixes #43743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 12:05:50 +00:00
Pascal Birchler
d32d061a5e Upgrade/Install: Prevent possible JavaScript error when updating translations.
Props Presskopp.
Fixes #39189.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 11:26:50 +00:00
Gary Pendergast
f88769fc3b Block Editor: Obey the AUTOSAVE_INTERVAL constant.
Props youknowriad.
Fixes #45262.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 06:54:49 +00:00