Commit Graph

14680 Commits

Author SHA1 Message Date
Gary Pendergast
3a6ffa1d18 Users: Correct the default value in setup_userdata().
The `$for_user_id` parameter is an `int`, not a `string`, so the default value should be `0`, rather than an empty string.

Props subrataemfluence.
Fixes #44697.



git-svn-id: https://develop.svn.wordpress.org/trunk@44603 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 06:32:21 +00:00
Gary Pendergast
0393473016 Users: Check that a valid user is passed to get_password_reset_key().
Props edocev.
Fixes #44601.



git-svn-id: https://develop.svn.wordpress.org/trunk@44602 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 06:26:23 +00:00
Gary Pendergast
de1b02f61b Docs: Fix the WP_Object_Cache::get() docblock.
The `$force` parameter is a `bool`, not a `string`. The matching `wp_cache_get()` docblock has the correct type.

Props subrataemfluence.
Fixes #44454.



git-svn-id: https://develop.svn.wordpress.org/trunk@44601 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 06:17:42 +00:00
Gary Pendergast
c1ae8b91e2 Docs: Add docblocks for WP_Customize_Header_Image_Control member variables.
Props subrataemfluence.
Fixes #44410.



git-svn-id: https://develop.svn.wordpress.org/trunk@44600 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:53:35 +00:00
Gary Pendergast
bb59882be8 Coding Standards: Move an assignment out of a condition in wp-admin/admin.php.
Props subrataemfluence, jrf, pento.
Fixes #44363.



git-svn-id: https://develop.svn.wordpress.org/trunk@44598 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:47:04 +00:00
Gary Pendergast
da17f41cc1 Coding Standards: Move assignments out of conditions in wp-includes/user.php.
Props subrataemfluence.
See #44315.



git-svn-id: https://develop.svn.wordpress.org/trunk@44597 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:37:48 +00:00
Gary Pendergast
65d6dd18b9 Updates: Tweak the "before updating, please back up..." message.
Props chetan200891, sebastien@thivinfo.com.
See #43790.



git-svn-id: https://develop.svn.wordpress.org/trunk@44596 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:19:59 +00:00
Jonathan Desrosiers
66eefd653c Coding Standards: Assignments must be the first block of code on a line.
Props subrataemfluence.
Fixes #44225.

git-svn-id: https://develop.svn.wordpress.org/trunk@44593 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 02:40:59 +00:00
Jonathan Desrosiers
425b59c048 Docs: Update inaccurate return descriptions.
In the `@return` tag description for `get_post_modified_time()`, `get_the_time()`, and `get_post_time()`, the `$d` parameter is incorrectly referred to as `$id`.

Props behzod.
Fixes #45323.

git-svn-id: https://develop.svn.wordpress.org/trunk@44592 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 02:07:41 +00:00
Gary Pendergast
f418ee12b1 Link Template: In get_adjacent_post(), move the sanitisation of $excluded_terms earlier.
This is a followup to [42828], ensuring that the `get_{$adjacent}_post_excluded_terms` filter is always passed an array, as expected.

Props soulseekah, zottto.
Fixes #43521.



git-svn-id: https://develop.svn.wordpress.org/trunk@44591 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 01:53:02 +00:00
Gary Pendergast
d7e86e8313 Docs: Update the @since version for the doing_it_wrong_trigger_error filter.
Fixes #34183.



git-svn-id: https://develop.svn.wordpress.org/trunk@44590 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 00:51:44 +00:00
Gary Pendergast
e121a5e03d Widgets: Remove unnecessary sanitize_text_field() calls in core widget ::form() methods.
This sanitisation only needs to be run in `::update()` to correctly clean up the input.

Props welcher, greenshady.
Fixes #42461.



git-svn-id: https://develop.svn.wordpress.org/trunk@44589 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 00:42:30 +00:00
Gary Pendergast
580d483105 Admin: Make the Help tab available on small screens.
Props jobthomas, xkon.
Fixes #43221.



git-svn-id: https://develop.svn.wordpress.org/trunk@44588 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 00:19:54 +00:00
Gary Pendergast
5cdc0e1397 Query: Cache the result when get_pages() doesn't find anything in the database.
Props flixos90, soulseekah.
Fixes #43514.



git-svn-id: https://develop.svn.wordpress.org/trunk@44587 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 23:26:20 +00:00
Gary Pendergast
464c9a72f0 Docs: Improve the docblock of wp_admin_bar_edit_menu().
What age were you when you learned that there's a `$user_id` global, as well as `$user_ID` global? I was today years old.

Props pento, mukesh27.
Fixes #43448.



git-svn-id: https://develop.svn.wordpress.org/trunk@44586 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 23:11:20 +00:00
Gary Pendergast
25ffb39d0a Docs: Improve documentation of the `$wp_registered_sidebars global.
Props mukesh27.
Fixes #43448.



git-svn-id: https://develop.svn.wordpress.org/trunk@44585 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 23:00:05 +00:00
Gary Pendergast
c80325658f Customizer: Use the sandbox attribute to prevent top navigation from the preview.
Props valchovski.
Fixes #42341.



git-svn-id: https://develop.svn.wordpress.org/trunk@44583 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 07:24:16 +00:00
Gary Pendergast
7de213856b Docs: Improve docblocks for _get_plugin_data_markup_translate() and _sort_uname_callback().
Props Jaydeep Rami.
Fixes #42228.



git-svn-id: https://develop.svn.wordpress.org/trunk@44581 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 06:53:44 +00:00
Gary Pendergast
f5f5da1fff Customizer: Improve browser compatibility of the preview iframe.
When `home` and `siteurl` are different, the customizer preview iframe will be blank in Chrome and Safari, due to their `X-Frame-Options` implementation quirks.

Changing this to `SAMEORIGIN` and adding the `frame-ancestors` Content Security Policy gives the correct behaviour.

Props fullyint.
Fixes #40020.



git-svn-id: https://develop.svn.wordpress.org/trunk@44580 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 06:37:30 +00:00
Gary Pendergast
71abc20def Formatting: Remove soft hyphens when sanitising titles.
Props andg.
Fixes #45378.



git-svn-id: https://develop.svn.wordpress.org/trunk@44579 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 05:38:41 +00:00
Gary Pendergast
4550488c99 Widgets: Don't log invalid HTML in the Text Widget.
[41215] supresses these irrelevant error messages from the front end, this removes them from the error log, too.

Props jeherve.
Fixes #43815.



git-svn-id: https://develop.svn.wordpress.org/trunk@44578 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 05:04:12 +00:00
Gary Pendergast
f73d8da051 Blocks: Add a $source_block parameter to the render_block_data filter.
This contains a copy of the block, unmodified by other filter functions, so that plugins have a clean reference to work from, if they need.

Props dmsnell.
Fixes #45451.



git-svn-id: https://develop.svn.wordpress.org/trunk@44576 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 01:46:56 +00:00
Andrea Fercia
627ce6f4b4 Accessibility: Exclude the Windows High Contrast mode transparent outline from the CSS transition after [44544].
See #41286.


git-svn-id: https://develop.svn.wordpress.org/trunk@44575 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 15:00:04 +00:00
Gary Pendergast
992184cf73 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@44574 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 06:40:16 +00:00
Gary Pendergast
a139c8cbf7 Coding Standards: Fix and whitelist variable names.
From the `WordPress.NamingConventions.ValidVariableName` sniff, this commit fixes/whitelists all `NotSnakeCaseMemberVar`, `MemberNotSnakeCase`, and `StringNotSnakeCase` violations. It also fixes a handful of the `NotSnakeCase` violations.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44573 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 06:05:55 +00:00
Gary Pendergast
cf5be804c7 Coding Standards: Remove an unnecessary line whitelisting.
Props jrf.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44572 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 04:52:53 +00:00
Gary Pendergast
358d65b9c7 Coding Standards: Fix an incorrect phpcs:ignore comment.
It's `phpcs:ignore`, not `wpcs:ignore`.

Props GaryJ.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44570 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 03:48:05 +00:00
Gary Pendergast
ff53bd388c Coding Standards: Extract extract() from the codebase.
Of the last four instances of `extract()` occurring, three of them are removed by this commit, and the fourth is appropriately documented.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44569 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 03:19:23 +00:00
Jonathan Desrosiers
34e3de7b7f REST API: Encourage proper usage of register_rest_route().
Calling `register_rest_route()` too early in the loading process has the potential to cause some unintentional problems and pitfalls. Because `register_rest_route()` calls `rest_get_server()` (which creates the `WP_REST_Server` instance), calling the function directly and/or before `rest_api_init` should be discouraged.

For example, if `register_rest_route ()` is called on `init`, the REST API server instance is set up (and all functions added to `rest_api_init` and other related hooks are invoked), even though the current request may not be a REST request. Also, if `register_rest_route()` is called even earlier (say, in an `mu-plugin` file), required endpoints may be missing since normal plugins have not yet been loaded and have not had a chance to register their own action hooks.

This adds a `_doing_it_wrong()` notice the first time `register_rest_route()` is called before `rest_api_init` in a request to encourage best practices for registering REST API routes.

Props kraftbj, desrosj, timothyblynjacobs.
Fixes #45265.

git-svn-id: https://develop.svn.wordpress.org/trunk@44568 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 18:18:41 +00:00
Andrea Fercia
d78fa59746 Menus: Make menu items not jump while dragging items.
Props alexvorn2, welcher, afercia.
Fixes #41160.


git-svn-id: https://develop.svn.wordpress.org/trunk@44567 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 13:55:28 +00:00
Gary Pendergast
33caf61b8b Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace violations.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44566 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:39:55 +00:00
Gary Pendergast
83af0329a2 Coding Standards: Document intentional case block fall-throughs.
Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44565 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:25:37 +00:00
Gary Pendergast
6f0487c2f0 Coding Standards: Ignore the violations of Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44563 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:07:50 +00:00
Gary Pendergast
8cc49330a4 Coding Standards: Fix the minor WordPress.WP.I18n violations.
`WordPress.WP.I18n.MissingTranslatorsComment` is in progress in #44360.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44562 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:03:46 +00:00
Gary Pendergast
b0c61e267b Post WordPress 5.1 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@44558 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 00:58:03 +00:00
Gary Pendergast
2792e71cec WordPress 5.1 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@44557 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 00:41:39 +00:00
Gary Pendergast
49f5f62f30 Emoji: Fix a code formatting error introduced in [44554].
See #45930.



git-svn-id: https://develop.svn.wordpress.org/trunk@44556 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 23:39:19 +00:00
Gary Pendergast
1eaf7453f9 Blocks: Reverse the logic when checking the pre_render_block result.
We should be returning if the result isn't null, not when it is.

See #45451.



git-svn-id: https://develop.svn.wordpress.org/trunk@44555 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 23:31:01 +00:00
Gary Pendergast
d32cead515 Emoji: Improve performance when encoding or staticizing emoji.
Both `wp_encode_emoji()` and `wp_staticize_emoji()` perform a PHP version check when deciding how to apply their behaviour, but this check only needs to happen once, rather than every time in their internal looks.

Moving the check outside of the loop reduces processing time by 50%.

Props johnbillion.
Fixes #45930.



git-svn-id: https://develop.svn.wordpress.org/trunk@44554 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 23:19:37 +00:00
Gary Pendergast
041471735a Blocks: Add the pre_render_block and render_block_data filters.
At the start of `render_block()`, the `pre_render_block` filter allows the function to be short-circuited, and the `render_block_data` filter is applied to the `$block` parameter before it's processed.

Props kkarpieszuk, pento.
Fixes #45451.



git-svn-id: https://develop.svn.wordpress.org/trunk@44553 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 23:15:49 +00:00
Jonathan Desrosiers
7508db604b Embeds: Remove Photobucket, FunnyOrDie from the list of oEmbed providers.
These services no longer support oEmbed.

Props skostadinov, notnownikki.
Fixes #45399.

git-svn-id: https://develop.svn.wordpress.org/trunk@44552 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 22:41:13 +00:00
Andrea Fercia
b3fcb41718 Accessibility: Improve text input in the Tags meta box when using Safari + Voiceover.
Props parbaugh, konainm, wbrubaker, pento, ryelle.
Fixes #44966.


git-svn-id: https://develop.svn.wordpress.org/trunk@44551 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 22:29:46 +00:00
Jonathan Desrosiers
2e8b87cd83 Docs: Add missing periods to param annotations for flip() in WP_Image_Editor_GD.
Props hitendra-chopda.
Fixes #45208.

git-svn-id: https://develop.svn.wordpress.org/trunk@44550 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 22:09:26 +00:00
Andrea Fercia
a0bca4f976 Accessibility: Improve color contrast ratio in the Events and News dashboard widget.
Props boemedia, lucagrandicelli.
Fixes #45280.


git-svn-id: https://develop.svn.wordpress.org/trunk@44549 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 22:07:42 +00:00
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
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
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
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
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
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
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
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
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
Gary Pendergast
3d030132ae Privacy: Fix a code formatting error introduced in [44491].
See #44908.



git-svn-id: https://develop.svn.wordpress.org/trunk@44494 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 04:32:59 +00:00
Gary Pendergast
acba2e55df Privacy: Tweak the wording of the success notice when updating the privacy policy page setting.
Props garrett-eclipse.
Fixes #44129.



git-svn-id: https://develop.svn.wordpress.org/trunk@44493 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 04:18:10 +00:00
Gary Pendergast
1c6336c881 Privacy: Always show the privacy policy guide.
Previously, the link to the privacy policy guide would only be displayed when a privacy policy page had been selected, but the guide is generally useful without that.

Props mukesh27, birgire.
Fixes #44871.



git-svn-id: https://develop.svn.wordpress.org/trunk@44492 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 04:00:10 +00:00
Gary Pendergast
37b849714f Privacy: Remove some unnecessary parameters being passed to wp_update_post() by wp_generate_user_request_key().
Props garrett-eclipse.
Fixes #44908.



git-svn-id: https://develop.svn.wordpress.org/trunk@44491 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 03:50:33 +00:00
Gary Pendergast
b4c34c1710 Help/About: Add a lang attribute to the <html> tag in readme.html
Props audrasjb.
Fixes #44955.



git-svn-id: https://develop.svn.wordpress.org/trunk@44490 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 02:55:54 +00:00
Gary Pendergast
bc027fb70f Login: Improve the error message when retrieving a lost password.
When an invalid username or email address is entered, the form now displays a better error message.

Props mrtortai, iamfriendly, TomHarrigan, afercia, pento.
Fixes #31788.



git-svn-id: https://develop.svn.wordpress.org/trunk@44489 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 02:05:08 +00:00
Alex Shiels
e06121f2ed Cron API: Make wp-cron.php non-blocking where possible.
This should make cron spawning faster by ensuring requests to wp-cron.php return immediately regardless of transport method. It is enabled only on recent PHP versions with fastcgi, due to historical bugs and availability of `fastcgi_finish_request()`. This needs testing on a range of platforms, to help determine if it's safe to use in other contexts also.

Props vnsavage, johnbillion, jnylen0.
See #18738, #41358


git-svn-id: https://develop.svn.wordpress.org/trunk@44488 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 01:05:16 +00:00
Gary Pendergast
bd7415490e Docs: Update the @since tag for the comment_status_links filter.
Fixes #42379.



git-svn-id: https://develop.svn.wordpress.org/trunk@44487 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 01:05:04 +00:00
Gary Pendergast
d2f0d5c812 Embeds: Add Instagram TV support.
Props dannydehaan.
Fixes #44557.



git-svn-id: https://develop.svn.wordpress.org/trunk@44486 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 00:23:35 +00:00
Gary Pendergast
b9e752770c Admin: Add a "Set up your homepage" link to the Welcome panel.
As many WordPress sites use a static homepage rather than a blog, this link gives a natural next step for new sites owners wanting to configure their site in this manner.

Props professor44, joyously, nielslange, mukesh27, melchoyce.
Fixes #45019.



git-svn-id: https://develop.svn.wordpress.org/trunk@44485 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 00:11:25 +00:00
Gary Pendergast
78064d5ce3 Embeds: Polldaddy is now called Crowdsignal.
Crowdsignal adds an additional embed URL, survey.fm.

Props donncha.
Fixes #45036.



git-svn-id: https://develop.svn.wordpress.org/trunk@44484 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 23:51:25 +00:00
Peter Wilson
0bc20594c7 Cron API: Add function and filter to return ready cron jobs.
Add the function `wp_get_ready_cron_jobs()` to return a modified version of the cron array limited to jobs ready to be run, ie with a timestamp of `time()` or earlier.

The new function includes the filter `pre_get_ready_cron_jobs` to allow for custom cron storage systems. This rounds out the functionality added in #32656.

Props Pento for code review.
Fixes #45797.



git-svn-id: https://develop.svn.wordpress.org/trunk@44483 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 21:48:07 +00:00
Jonathan Desrosiers
5778bffd42 REST API: Introduce rest_post_search_query filter.
This filter allows the query arguments to be manipulated for a post search query in the REST API.

Props Chouby, swissspidy.
Fixes #45454.

git-svn-id: https://develop.svn.wordpress.org/trunk@44482 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 21:44:06 +00:00
Adam Silverstein
f968e9d52f Media: improve the human_readable_duration function and tests.
Improve the `human_readable_duration` added in #39667:
* Remove upper limit.
* More resilient handling: remove negative prefix, trim.
* Correct @since to 5.1.0.
* Adds more test cases and improve inline docs.

Props birgire.
Fixes #39667.


git-svn-id: https://develop.svn.wordpress.org/trunk@44481 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 19:55:31 +00:00
Jonathan Desrosiers
559056f62f Docs: Improve accuracy of wp_list_sort()’s $list parameter description.
Props manikmist09.
Fixes #45766.

git-svn-id: https://develop.svn.wordpress.org/trunk@44480 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 19:53:34 +00:00
Jonathan Desrosiers
cd100a117d Docs: Fix typos in Twenty Seventeen function descriptions.
Props faisal03, mukesh27.
Fixes #45466.

git-svn-id: https://develop.svn.wordpress.org/trunk@44479 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 19:21:28 +00:00
Jonathan Desrosiers
49509a1c6a Docs: Specify missing global variables used in wp_print_theme_file_tree().
The `$relative_file` and `$stylesheet` variables are used in the `wp_print_theme_file_tree()` function but were not noted within the inline documentation.

Props mukesh27, desrosj,
Fixes #43682.

git-svn-id: https://develop.svn.wordpress.org/trunk@44477 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 18:32:10 +00:00
Felix Arntz
aea4b2765a General: Make Update PHP notice link customizable.
After [42832], [42891] and [43006], this changeset refines the core notice informing about an outdated PHP version:

* The link to the Update PHP information page can now be adjusted using either a `WP_UPDATE_PHP_URL` environment variable, or a new `wp_update_php_url` filter.
* If that URL is different from the default one that points to https://wordpress.org/support/update-php/ or its localized equivalent, a note indicates that the linked resource has not been provided by WordPress itself, and the default URL is still linked to as an additional resource.
* The URL for the default information page has been updated to use the slug `update-php` instead of `upgrade-php`.
* `@since` annotations have been updated.

Going forward, admin areas that display information related to the PHP version should use the new function `wp_get_update_php_url()`.

Props afragen, fierevere, flixos90, markjaquith, miss_jwo, nerrad, pento, schlessera, SergeyBiryukov, spacedmonkey.
Fixes #45686. See #41191.


git-svn-id: https://develop.svn.wordpress.org/trunk@44476 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 17:26:38 +00:00
Jonathan Desrosiers
59bb9742e6 Docs: Fix order of parameter type and variable name.
The order of the type and variable name in the `param` tags for the `wp_get_default_privacy_policy_content` filter is incorrectly reversed. This moves the two into the correct order.

Props ishitaka, mukesh27.
Fixes #45416.

git-svn-id: https://develop.svn.wordpress.org/trunk@44475 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 17:02:55 +00:00
Jonathan Desrosiers
30461b62da Widgets: Fix custom HTML widget editor content not updating after save.
An integer comparison is performed against `control.currentErrorAnnotations`, but `control.currentErrorAnnotations` is actually an array. This fixes that comparison so the content saves correctly.

Props barryceelen.
Fixes #43657.

git-svn-id: https://develop.svn.wordpress.org/trunk@44474 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 16:41:53 +00:00
Gary Pendergast
0311c0d083 Users: Add the pre_count_users filter.
Props spacedmonkey.
Fixes #43693.



git-svn-id: https://develop.svn.wordpress.org/trunk@44473 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 09:48:09 +00:00
Felix Arntz
1e35159a2d Multisite: Introduce ms-site.php and ms-network.php files.
By providing distinct files for the site and network APIs, a better overview is provided. Prior to this change, the `ms-blogs.php` file had grown too big, mixing site APIs, network APIs and related legacy APIs that need to be maintained. Since multisite is often used in unexpected ways, backward-compatibility is ensured by including the two new files from `ms-blogs.php`, which previously contained all functions that have been moved to the new files.

This changeset does not contain any functional changes.

Fixes #40647.


git-svn-id: https://develop.svn.wordpress.org/trunk@44472 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 09:14:20 +00:00
Gary Pendergast
fbabf54a72 Media: Add $attr to the wp_get_attachment_link filter.
Props danielbachhuber.
Fixes #40155.



git-svn-id: https://develop.svn.wordpress.org/trunk@44471 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 09:08:06 +00:00
Gary Pendergast
801e193ae0 Coding Standards: Fix an error introduced in [44465].
See #45748.



git-svn-id: https://develop.svn.wordpress.org/trunk@44470 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 09:02:50 +00:00
Felix Arntz
855606e29d Multisite: Update @since tags for site management APIs.
Fixes #40364. Fixes #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@44469 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 08:57:32 +00:00
Felix Arntz
5fdfac40f2 Multisite: Move site-specific metadata integrations from the wrapper functions to the low-level Meta API functions.
This complements the work in [43729] and prepares site metadata for future REST API support.

Props spacedmonkey.
Fixes #45091. See #44467.


git-svn-id: https://develop.svn.wordpress.org/trunk@44468 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 08:47:37 +00:00
Felix Arntz
4657735ba6 Multisite: Update @since tags for site meta introduction.
Fixes #37923. Fixes #40229.


git-svn-id: https://develop.svn.wordpress.org/trunk@44467 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 08:17:34 +00:00
Gary Pendergast
34cd08cd37 Comments: Improve the Author box in the Edit Comment screen.
- Add a border below the heading, to match meta boxes.
- Remove the colons from the input labels.
- Tweak the padding and margins.

Props birgire, abdullahramzan, rhetorical, BODA1982, pento.
Fixes #43586.



git-svn-id: https://develop.svn.wordpress.org/trunk@44466 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 06:18:17 +00:00
Gary Pendergast
cfbb2e735f Users: Use email_exists() in send_confirmation_on_profile_email(), instead of a manual query.
This gives us caching, and removes the use of the `$wpdb` global.

Props spacedmonkey, pento.
Fixes #45748.



git-svn-id: https://develop.svn.wordpress.org/trunk@44465 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 06:06:04 +00:00
Gary Pendergast
19e46911cf Docs: Fix the @param type for wp_make_plugin_file_tree().
`$plugin_editable_files` is an `array`, not a `string`.

Props subrataemfluence.
Fixes #45593.



git-svn-id: https://develop.svn.wordpress.org/trunk@44464 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 06:01:50 +00:00
Gary Pendergast
06cc3de7ec Docs: Improve the @global tags in wp-includes/option.php.
Props upadalavipul.
Fixes #45581.



git-svn-id: https://develop.svn.wordpress.org/trunk@44463 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:59:27 +00:00
Gary Pendergast
0cbd818ce8 Docs: Correct the parameters passed to the twentyseventeen_custom_header_args filter.
The documented `$default_text_color` parameter isn't passed, and the `$video` parameter is passed, but not documented.

Props mukesh27.
Fixes #44920.


git-svn-id: https://develop.svn.wordpress.org/trunk@44462 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:55:55 +00:00
Gary Pendergast
ab3b19d94e Coding Standards: Improve the readability of get_the_modified_author().
Props promz.
Fixes #44951.



git-svn-id: https://develop.svn.wordpress.org/trunk@44461 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:49:50 +00:00
Gary Pendergast
34d4988db6 Docs: Improve the @return description of network_domain_check().
Props ishitaka, vaishalipanchal.
Fixes #45403.



git-svn-id: https://develop.svn.wordpress.org/trunk@44460 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:26:29 +00:00
Gary Pendergast
fb0fbbd063 Docs: Add a missing @global to the WP_Customize_Date_Time_Control::get_month_choices() docblock.
Props utsav72640.
Fixes #45500.



git-svn-id: https://develop.svn.wordpress.org/trunk@44459 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:23:39 +00:00
Gary Pendergast
4f3b9672c4 Docs: Add a reference to WP_Customize_Control from the WP_Customize_Nav_Menu_Locations_Control docblock.
`WP_Customize_Control` is the parent class of `WP_Customize_Nav_Menu_Locations_Control`.

Props utsav72640.
Fixes #45570.



git-svn-id: https://develop.svn.wordpress.org/trunk@44458 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:17:28 +00:00
Gary Pendergast
7d057ea1ad Docs: Fix the @param types for `comments_popup_link().
Props Mirucon.
Fixes #44841.



git-svn-id: https://develop.svn.wordpress.org/trunk@44457 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 04:49:42 +00:00
Gary Pendergast
07eb075961 Query: Fix some code formatting issues introduced in [44452].
See #38034.



git-svn-id: https://develop.svn.wordpress.org/trunk@44456 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 04:31:56 +00:00
Gary Pendergast
ccc55debda General: Replace "Happy blogging" with "Happy publishing".
As of this commit, WordPress is no longer a simple blogging platform. It's now a comprehensive publishing solution.

This also replaces a couple of other "blog" references that were missed previously.

Props igmoweb, Valer1e, audrasjb, pento.
Fixes #41000.



git-svn-id: https://develop.svn.wordpress.org/trunk@44455 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 04:29:06 +00:00
Gary Pendergast
a37ee6171e Permalinks: Add a pre_wp_unique_post_slug filter.
Returning a non-`null` value on this fillter will cause `wp_unique_post_slug()` to return early with that value, skipping potentially expensive database queries on some sites.

Props coffee2code, javorszky, iCaleb.
Fixes #21112.



git-svn-id: https://develop.svn.wordpress.org/trunk@44454 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 03:46:58 +00:00
Gary Pendergast
b8413cc372 Bootstrap: Allow WP_DEBUG_LOG to override the debug.log location.
Setting `WP_DEBUG_LOG` to a file path will now cause the debug log to be written to that file, rather than the default `WP_CONTENT_DIR/debug.log`.

Props SergeyBiryukov, ethitter, sebastian.pisula, nacin.
Fixes #18391.



git-svn-id: https://develop.svn.wordpress.org/trunk@44453 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 03:41:38 +00:00
Boone Gorges
082c5d1534 Query: Standardize treatment of 'orderby' values post__in, post_parent__in, and post_name__in.
Ordering by `post__in` was introduced in [21776], but the code assumed that
`post__in` would be a comma-separated string listing post IDs. When an array
of post IDs was passed to the `post__in` query var, 'orderby=post__in' was
not respected. This changeset changes this behavior by handling
'orderby=post__in' in the same way as most other values of 'orderby',
which ensures that arrays as well as strings can be properly parsed.

The same treatment is given to the similar `post_name__in` and
`post_parent__in` options of 'orderby', so that most query generation for
orderby clauses happens in the same place, instead of in special cases.

A slight change in the resulting SQL (related to the whitespace around
parentheses and commas) necessitates a change to an existing REST API test
that does a string comparison against the SQL query.

Props mgibbs189, kelvink.
Fixes #38034.

git-svn-id: https://develop.svn.wordpress.org/trunk@44452 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 03:32:04 +00:00
Gary Pendergast
7bf44ed065 Install/Upgrade: Link to HelpHub instead of the Codex.
WordPress version links in the Codex (eg, https://codex.wordpress.org/Version_5.0) are redirected to their HelpHub equivalent.

Rather than relying on the redirect, Core and link directly to HelpHub.

Props swissspidy.
Fixes #45574.



git-svn-id: https://develop.svn.wordpress.org/trunk@44451 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 03:28:15 +00:00
Gary Pendergast
36949b760f Docs: Update @since for populate_site_meta().
Fixes #44896.



git-svn-id: https://develop.svn.wordpress.org/trunk@44450 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 03:17:16 +00:00
Gary Pendergast
c7ed2d098d Docs: Update @since for populate_network_meta().
Fixes #44895.



git-svn-id: https://develop.svn.wordpress.org/trunk@44449 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 03:16:04 +00:00
Gary Pendergast
6b9c60a98a Docs: Update @since for the optional $options parameter to populate_options().
Fixes #44893.



git-svn-id: https://develop.svn.wordpress.org/trunk@44448 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 03:14:09 +00:00
Gary Pendergast
4d9ac6832f Docs: Update @since for is_taxonomy_viewable().
Props andizer.
Fixes #44466.



git-svn-id: https://develop.svn.wordpress.org/trunk@44447 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 03:10:45 +00:00
Gary Pendergast
09dd371fc0 REST API: Remove permalink_structure from the REST API settings endpoint.
This was ultimately fixed in #45017, so is redunant.

Reverts [42142,42359,42540].
See #41014.



git-svn-id: https://develop.svn.wordpress.org/trunk@44446 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 02:50:05 +00:00
Joe McGill
843111a03b PHPCS: Fix formatting issues.
Fixes formatting issues introduced in [44438].

See #45615.


git-svn-id: https://develop.svn.wordpress.org/trunk@44441 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 21:08:03 +00:00
Joe McGill
94c8a5d994 Upload: Fix upload failures of common text file types.
This adds some special case handling in 'wp_check_filetype_and_ext()' that prevents some common file types from being blocked based on mismatched MIME checks, which were made more strict in WordPress 5.0.1.

Props Kloon, birgire, tellyworth, joemcgill.
See #45615.


git-svn-id: https://develop.svn.wordpress.org/trunk@44438 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 20:47:56 +00:00
Jonathan Desrosiers
c7fb3b36ea Block Editor: Display notice to the user when JavaScript is disabled.
Currently, when viewing the block editor with JavaScript disabled, the user sees a blank admin page with the admin menu sidebar. This adds an admin notice informing the user that JavaScript is required for the new block editor.

Props mkaz, pento, azaozz, ocean90, desrosj.
Fixes #45453.

git-svn-id: https://develop.svn.wordpress.org/trunk@44437 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 20:39:56 +00:00
Sergey Biryukov
60af2079ed Default Themes: Bump the version numbers and release dates.
Update the theme versions and release dates for the default themes, in time for WordPress 5.0.3.

The POT file for Twenty Eleven has also been updated.

Props laurelfulford.
Fixes #45792.

git-svn-id: https://develop.svn.wordpress.org/trunk@44435 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 18:57:17 +00:00
Sergey Biryukov
cbb7f0397d Twenty Twelve: Correct padding rule precedence for Quote block.
Props superpoincare.
Fixes #45794.

git-svn-id: https://develop.svn.wordpress.org/trunk@44432 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 18:08:04 +00:00
Dominik Schilling (ocean90)
ac7c542477 Formatting: Remove unused global import for $wp_filter in _restore_wpautop_hook().
See #45290.

git-svn-id: https://develop.svn.wordpress.org/trunk@44431 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 16:58:15 +00:00
Sergey Biryukov
6d8e3c5864 Plugins: Use newer "Updating PHP" page URL in the notice displayed when a plugin requires a higher PHP version.
Props afragen.
Fixes #43986. See #45686.

git-svn-id: https://develop.svn.wordpress.org/trunk@44420 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 15:34:34 +00:00
Dominik Schilling (ocean90)
32ec9382a9 I18n: Expose JSON translation file paths in load_script_textdomain().
Removes `file_exist()` checks before calling `load_script_translations()` to let the determined paths be passed to `load_script_translations()` which provides its own file check and the possibility to filter the path.

Props swissspidy, johnbillion, ocean90.
See #45769.

git-svn-id: https://develop.svn.wordpress.org/trunk@44418 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 13:59:01 +00:00
Sergey Biryukov
7b362c12ed Importers: Use correct l10n variable in wp.updates.installImporterError and filesystem credentials dialog.
Missed in [40034].

Props afercia, abhayvishwakarma.
Fixes #45765.

git-svn-id: https://develop.svn.wordpress.org/trunk@44417 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 13:48:32 +00:00
Sergey Biryukov
cc400e9099 Accessibility: Themes: use aria-current for the Walker_Page current link.
See [42808] for `Walker_Nav_Menu`.

The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of `aria-current` after [42440], [41683], [41359], and [41371].

Props chetan200891, wpzinc.
Fixes #43522.

git-svn-id: https://develop.svn.wordpress.org/trunk@44416 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 13:35:56 +00:00
Sergey Biryukov
e1e3467c5e Pages, Post Types: Escape CSS classes in Walker_Page::start_el() after the page_css_class filter runs.
Don't add an empty `class` attribute if there are no classes, for consistency with `Walker_Nav_Menu::start_el()`.

Props abhijitrakas, mukesh27.
Fixes #44880.

git-svn-id: https://develop.svn.wordpress.org/trunk@44415 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 12:53:22 +00:00
Sergey Biryukov
d81408d7f6 Taxonomy: Escape CSS classes in Walker_Category::start_el() after the category_css_class filter runs.
Don't add an empty `class` attribute if there are no classes, for consistency with `Walker_Nav_Menu::start_el()`.

Props abhijitrakas, mukesh27.
See #44880.

git-svn-id: https://develop.svn.wordpress.org/trunk@44414 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 12:53:07 +00:00
Sergey Biryukov
d6b53ec840 Taxonomy: Escape feed_image argument in Walker_Category::start_el().
See [11838] for the instance in `wp_list_authors()`.

Props abhijitrakas.
See #44880.

git-svn-id: https://develop.svn.wordpress.org/trunk@44413 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 12:47:38 +00:00
Sergey Biryukov
f46f7efaf4 Docs: Fix typo in the description of status parameter of WP_Comment_Query.
See #41338.

git-svn-id: https://develop.svn.wordpress.org/trunk@44412 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 11:37:24 +00:00
Andrea Fercia
063fad80cb Accessibility: Update since annotation for wp_link_pages().
Updates the since annotation for the `aria_current` argument introduced in #42440.

Fixes #41859.


git-svn-id: https://develop.svn.wordpress.org/trunk@44411 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 08:01:57 +00:00
Sergey Biryukov
c4394e12f8 Docs: Correct @since tag for users_pre_query filter added in [44373].
Revert unintended change to the `@since` tag for the `WP_User_Query` instance added to `found_users_query` filter in [43660].

See #44169, #43679.

git-svn-id: https://develop.svn.wordpress.org/trunk@44410 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-07 07:55:19 +00:00
Jonathan Desrosiers
73ba0f5126 Twenty Seventeen: Update since and see annotations for twentyseventeen_unique_id().
Previously introduced in [43659].

See #44883.

git-svn-id: https://develop.svn.wordpress.org/trunk@44408 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-06 20:14:35 +00:00
Jonathan Desrosiers
3ea2d810d9 General: Update since annotation for wp_unique_id().
In [43658], `wp_unique_id()` was introduced. This updates the `since` annotation to be accurate.

See #44883.

git-svn-id: https://develop.svn.wordpress.org/trunk@44406 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-06 19:51:14 +00:00
Dominik Schilling (ocean90)
690b0cbf83 I18N/Script Loader: Support text domains other than "messages".
The inline JavaScript added by `WP_Scripts::print_translations()` should check whether `locale_data.$text_domain` exists and fall back to `locale_data.messages` otherwise.

Props swissspidy.
See #45441.

git-svn-id: https://develop.svn.wordpress.org/trunk@44403 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-06 16:22:46 +00:00
laurelfulford
899e5163fa Twenty Seventeen: Improve selectors for block editor custom colors.
Twenty Seventeen's original styles for the block editor custom colors had some issues: they weren't being applied to the button blocks due to lack of specificity, and when applied to paragraph blocks, there was no padding in the editor. This update makes sure the colors and related styles work as expected.

Fixes #45426.



git-svn-id: https://develop.svn.wordpress.org/trunk@44402 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-05 21:15:43 +00:00
Jonathan Desrosiers
537faa7178 Editor: Fix name of the new editor for inline comment.
In [44398], an inline comment was introduced that did not refer to the new editor as the Block Editor. This corrects that comment.

See #45788.

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