Commit Graph

39165 Commits

Author SHA1 Message Date
Jonathan Desrosiers 3a6966b69d Media: Correct `since` annotation for adding the `caption_id` attribute.
Introduced in [42704]
Fixes #34595.

git-svn-id: https://develop.svn.wordpress.org/trunk@44548 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 21:36:05 +00:00
Felix Arntz 6cc9452def General: Fix existing coding standard violations in bookmark tests, as outlined in [44546].
See #43977.


git-svn-id: https://develop.svn.wordpress.org/trunk@44547 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 21:16:49 +00:00
Felix Arntz 08564b5a80 General: Fix problematic string to array parsing.
WordPress has historically often used code like `preg_split( '/[\s,]+/', $var )` to parse a string of comma-separated values into an array. However, this approach was causing an empty string to not be parsed into an empty array as expected, but rather into an array with the empty string as its sole element.

This was among other areas causing problems in the REST API where passing an empty request parameter could cause that request to fail because, instead of it being ignored, that parameter would be compared against the valid values for it, which typically do not include an empty string.

Props david.binda, sstoqnov.
Fixes #43977.


git-svn-id: https://develop.svn.wordpress.org/trunk@44546 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 21:05:50 +00:00
Andrea Fercia 238e8991f8 Accessibility: Remove negative tabindex from the login, install, and setup pages header.
Props bamadesigner, rishishah, jainnidhi.
Fixes #42632.


git-svn-id: https://develop.svn.wordpress.org/trunk@44545 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 17:20:59 +00:00
Andrea Fercia 2d4ae6ce6d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@44544 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 16:46:44 +00:00
Andrea Fercia 3b3808feeb 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@44543 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 16:30:03 +00:00
Jonathan Desrosiers ba6f1ff56e Media: Introduce the `has_post_thumbnail` filter.
Props rzen, desrosj.
Fixes #44859.

git-svn-id: https://develop.svn.wordpress.org/trunk@44542 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 15:27:09 +00:00
Felix Arntz 9b19f2eea4 I18n: Add missing translator comments in `wp-admin/includes/class-wp-plugins-list-table.php`.
Fixes #45898.


git-svn-id: https://develop.svn.wordpress.org/trunk@44541 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 10:45:13 +00:00
Jonathan Desrosiers 399048fa0e 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].

git-svn-id: https://develop.svn.wordpress.org/trunk@44540 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 03:30:42 +00:00
Gary Pendergast fa886b237f 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@44539 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 02:56:24 +00:00
Jonathan Desrosiers 1f13137463 Docs: Restore `output` annotation in `tags-suggest.js`.
This was mistakenly removed in [44537].

See #38922.

git-svn-id: https://develop.svn.wordpress.org/trunk@44538 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 02:49:23 +00:00
Jonathan Desrosiers 2fe6670aff 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@44537 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 02:36:40 +00:00
Gary Pendergast 0394aab7a8 Tests: Add support for a `WP_TESTS_SKIP_INSTALL` environment variable.
Defining `WP_TESTS_SKIP_INSTALL=1` when running tests will skip the install step. While this shouldn't be used for full test runs, it's useful for saving time when running small groups of tests.

Props soulseekah.
Fixes #43432.



git-svn-id: https://develop.svn.wordpress.org/trunk@44536 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 02:18:19 +00:00
Jonathan Desrosiers 0161a5b70f Privacy: Add unit tests for privacy erasure fulfillment notifications.
Adds appropriate unit tests for `_wp_privacy_send_erasure_fulfillment_notification()`.

Props birgire, desrosj.
Fixes #44234.

git-svn-id: https://develop.svn.wordpress.org/trunk@44535 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 02:06:44 +00:00
Gary Pendergast e88eb4a63f Build/Tests: Allow running unit tests from `src`.
This is a partial recommit of [44509]: it allows running unit tests from `src` (which is useful), but doesn't make it the default (which Travis is having issues with).

See #45863.



git-svn-id: https://develop.svn.wordpress.org/trunk@44534 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 02:03:25 +00:00
Gary Pendergast ac47db26bc Block Editor: Upgrade the `@wordpress/` packages.
This brings the block editor in core up to date with the Gutenberg 4.8 plugin release.

Props aduth, gziolo, youknowriad, mkaz, jorgefilipecosta, swissspidy, iseulde, soean, noisysocks, joen, brentswisher, dekervit, dimadin, zebulan, johnny5, nosolosw, netweb, ryelle, etoledom, mzorz, desrosj, mmtr86, tinkerbelly, ocean90, earnjam, ajitbohra, talldanwp, notnownikki, mcsf, afercia, adamsilverstein, gutendev, naoki0h, miyauchi, aldavigdis.
Fixes #45885.



git-svn-id: https://develop.svn.wordpress.org/trunk@44533 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 01:53:38 +00:00
Jonathan Desrosiers 986c85c586 PHPCS: Fix formatting issues.
Fixes formatting issues introduced in [44528].

See #42017.

git-svn-id: https://develop.svn.wordpress.org/trunk@44532 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 01:51:39 +00:00
Jonathan Desrosiers 98e1564942 Docs: Update `since` annotation for `text-transform` support in `safecss_filter_attr()`.
Introduced in [42880].

Fixes #42729.

git-svn-id: https://develop.svn.wordpress.org/trunk@44531 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 01:42:54 +00:00
Jonathan Desrosiers bb3872522a Docs: Update `since` annotation for `comments_list_table_query_args`.
Introduced in [42420].

Fixes #42997.

git-svn-id: https://develop.svn.wordpress.org/trunk@44530 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 01:39:20 +00:00
Gary Pendergast 3e5aa4d4a5 Build Tools: Copy unminified JS files to `src`.
This allows `SCRIPT_DEBUG` to be set to `true` when running from `src`.

Fixes #45869.


git-svn-id: https://develop.svn.wordpress.org/trunk@44529 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 01:38:22 +00:00
Jonathan Desrosiers 25e9a6d249 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@44528 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 01:31:52 +00:00
Jonathan Desrosiers da6021b4f9 Docs: Update `since` annotations `WP_Error::has_errors()`
Introduced in [42761].

Fixes #42742.

git-svn-id: https://develop.svn.wordpress.org/trunk@44527 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 22:41:32 +00:00
Felix Arntz d50afa97a3 Upgrade/Install: Add missing call to clear site meta cache in `populate_site_meta()`.
See #44896.


git-svn-id: https://develop.svn.wordpress.org/trunk@44526 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 21:28:21 +00:00
Felix Arntz ffd2a4bd16 Bootstrap/Load: Fix missing object argument for singular capability checks and support capability tests overlooked in [44524].
See #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44525 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 20:43:57 +00:00
Felix Arntz fc37b1746e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@44524 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 20:04:55 +00:00
Boone Gorges 493b90cde1 Taxonomy: Update `@since` annotations for `meta_box_sanitize_cb` arg.
Introduced in [42211].

Fixes #36514.

git-svn-id: https://develop.svn.wordpress.org/trunk@44519 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 15:10:17 +00:00
Jonathan Desrosiers f27fc64e2e Docs: Update `since` annotations for adding `LIKE` comparisons with meta keys.
Previously introduced in [42768].

Fixes #42409.

git-svn-id: https://develop.svn.wordpress.org/trunk@44518 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 14:54:11 +00:00
Pascal Birchler 6bb50ece40 Build/Test Tools: Update `.gitignore` to exclude `twentynineteen` and `twentysixteen`.
Brings the list of bundled themes in `.gitignore` up to date.

Fixes #45474.


git-svn-id: https://develop.svn.wordpress.org/trunk@44517 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 13:44:30 +00:00
Pascal Birchler 1264df85b3 Build/Test Tools: Fix coding standards issues after [44515] and [44514].
See #44494, #43743.


git-svn-id: https://develop.svn.wordpress.org/trunk@44516 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 12:36:43 +00:00
Pascal Birchler aa3be4873e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@44515 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 12:04:32 +00:00
Pascal Birchler a8cb5d247e I18N: Add option to hide en_US locale in `wp_dropdown_languages()`.
Props danieltj for initial patch.
Fixes #44494.


git-svn-id: https://develop.svn.wordpress.org/trunk@44514 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 11:45:02 +00:00
Pascal Birchler e4e9010207 Upgrade/Install: Prevent possible JavaScript error when updating translations.
Props Presskopp.
Fixes #39189.


git-svn-id: https://develop.svn.wordpress.org/trunk@44513 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 11:25:19 +00:00
Gary Pendergast 916695bd78 Tests: Revert [44509].
This commit causes Travis to fail.

See #45863.


git-svn-id: https://develop.svn.wordpress.org/trunk@44512 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 11:13:03 +00:00
Pascal Birchler a5594e7b07 Embeds: Fix typo introduced in [44484].
Props JustinSainton.
Fixes #45036.


git-svn-id: https://develop.svn.wordpress.org/trunk@44511 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:53:14 +00:00
Gary Pendergast ec7687b1d9 Tests: Improve REST API tests for categories and tags.
Props birgire, SergeyBiryukov.
See #39122.
Fixes #45077.



git-svn-id: https://develop.svn.wordpress.org/trunk@44510 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:30:49 +00:00
Gary Pendergast 0137c23f8d Build/Tests: Default to running unit tests from `src`.
This is the actual commit, unlike [44508], which was not.

Props atimmer.
See #44492.
Fixes #45863.


git-svn-id: https://develop.svn.wordpress.org/trunk@44509 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:13:13 +00:00
Gary Pendergast 4198e71db7 Build/Tests: Default to running unit tests from `src`.
This commit also defaults WP-CLI commands to running against `src`, too.


Props atimmer, pento.
See #44492.
Fixes #45863.



git-svn-id: https://develop.svn.wordpress.org/trunk@44508 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:09:02 +00:00
Dominik Schilling (ocean90) ed1b4dc41f Build/Tools: Fix typo in `phpcs.xml.dist`.
See #44366.

git-svn-id: https://develop.svn.wordpress.org/trunk@44507 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:01:32 +00:00
Gary Pendergast ba495ec173 Filesystem: Improve `wp_is_stream()` performance.
Instead of turning the return value of `stream_get_wrappers()` into a regex to match the scheme, we can instead extract the scheme and search the return value of `stream_get_wrappers()`.

Props schlessera, swissspidy.
Fixes #45553.



git-svn-id: https://develop.svn.wordpress.org/trunk@44506 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 09:50:19 +00:00
Peter Wilson f3b7b7f966 Cron: Fix undefined variable notice.
Restore `$gmt_time` variable removed in error from [44483].

Props afragen.
Fixes #45870.



git-svn-id: https://develop.svn.wordpress.org/trunk@44505 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 08:36:07 +00:00
Gary Pendergast e5b5db9e23 Block Editor: Obey the `AUTOSAVE_INTERVAL` constant.
Props youknowriad.
Fixes #45262.



git-svn-id: https://develop.svn.wordpress.org/trunk@44504 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:53:15 +00:00
Gary Pendergast 2a6e44a306 Docs: Correct the documentation for `wp_list_authors()`.
The `exclude_admin` argument defaults to `true`, not `false`.

Props haruharuharuby.
Fixes #45120.



git-svn-id: https://develop.svn.wordpress.org/trunk@44503 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:51:38 +00:00
Gary Pendergast 62b4465532 Comments: Add new tests missed in [44499].
Props dshanske, birgire.
Fixes #44033.


git-svn-id: https://develop.svn.wordpress.org/trunk@44502 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:19:53 +00:00
Gary Pendergast 36a2ed3f56 Docs: Document the `$page_hook` action.
Props johnbillion.
Fixes #43643.



git-svn-id: https://develop.svn.wordpress.org/trunk@44501 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:13:44 +00:00
Gary Pendergast 31fdd577b4 Bundled Themes: Run the `pingback_url` through `esc_url()`.
Twenties Ten through Seventeen have been updated to properly escape the pingback URL. Twenty Nineteen is already escaping the URL.

Props soulseekah, sharaz.
Fixes #43717.



git-svn-id: https://develop.svn.wordpress.org/trunk@44500 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:10:13 +00:00
Gary Pendergast e5bdc271cb Comments: Add a new `is_avatar_comment_type()` function.
This function splits the `get_avatar_comment_types` filter out of `get_avatar_data()`.

Props dshanske, birgire.
Fixes #44033.



git-svn-id: https://develop.svn.wordpress.org/trunk@44499 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:59:49 +00:00
Gary Pendergast 943dcbbcef Docs: Add docblocks to the members of `WP_Widget_Form_Customize_Control`.
Props subrataemfluence.
Fixes #44420.



git-svn-id: https://develop.svn.wordpress.org/trunk@44498 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:48:33 +00:00
Gary Pendergast ae62335191 Docs: Add docblocks for the PHPUnit factory objects.
Props andizer.
Fixes #44521.


git-svn-id: https://develop.svn.wordpress.org/trunk@44497 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:43:14 +00:00
Gary Pendergast 477adade57 Docs: Update Codex references to the `Template_Hierarchy` page.
https://codex.wordpress.org/Template_Hierarchy redirects to https://developer.wordpress.org/themes/basics/template-hierarchy/, so we should link to the correct page.

Props kmeze, pento.
Fixes #45222.



git-svn-id: https://develop.svn.wordpress.org/trunk@44496 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:08:25 +00:00
Gary Pendergast e615ea6b91 Docs: Add `@see WP_Session_Tokens` to the `WP_User_Meta_Session_Tokens` docblock.
Props utsav72640.
Fixes #45499.



git-svn-id: https://develop.svn.wordpress.org/trunk@44495 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:03:25 +00:00