Gary Pendergast
6073c6e209
Docs: Update the `@since` version for the `doing_it_wrong_trigger_error` filter.
...
Fixes #34183 .
Built from https://develop.svn.wordpress.org/trunk@44590
git-svn-id: http://core.svn.wordpress.org/trunk@44421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:52:50 +00:00
Gary Pendergast
2f288c306c
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 .
Built from https://develop.svn.wordpress.org/trunk@44589
git-svn-id: http://core.svn.wordpress.org/trunk@44420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:43:49 +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
d2695fe283
Query: Cache the result when `get_pages()` doesn't find anything in the database.
...
Props flixos90, soulseekah.
Fixes #43514 .
Built from https://develop.svn.wordpress.org/trunk@44587
git-svn-id: http://core.svn.wordpress.org/trunk@44418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:27:50 +00:00
Gary Pendergast
56e77d8928
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 .
Built from https://develop.svn.wordpress.org/trunk@44586
git-svn-id: http://core.svn.wordpress.org/trunk@44417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:12:50 +00:00
Gary Pendergast
767fb99e94
Docs: Improve documentation of the ``$wp_registered_sidebars` global.
...
Props mukesh27.
Fixes #43448 .
Built from https://develop.svn.wordpress.org/trunk@44585
git-svn-id: http://core.svn.wordpress.org/trunk@44416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:01:49 +00:00
desrosj
a7d0293446
Tests: Add missing `parent::tearDown()`.
...
Also, remove a `tearDown()` method that was not serving any purpose.
Fixes #45931 .
Built from https://develop.svn.wordpress.org/trunk@44584
git-svn-id: http://core.svn.wordpress.org/trunk@44415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 21:34:55 +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
b083cc65aa
Customizer: Fix a coding standards issue introduced in [44580].
...
See #40020 .
Built from https://develop.svn.wordpress.org/trunk@44582
git-svn-id: http://core.svn.wordpress.org/trunk@44413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 07:23: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
Gary Pendergast
d8f4a04232
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 .
Built from https://develop.svn.wordpress.org/trunk@44580
git-svn-id: http://core.svn.wordpress.org/trunk@44411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 06:38:51 +00:00
Gary Pendergast
10c66fb426
Formatting: Remove soft hyphens when sanitising titles.
...
Props andg.
Fixes #45378 .
Built from https://develop.svn.wordpress.org/trunk@44579
git-svn-id: http://core.svn.wordpress.org/trunk@44410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 05:39:51 +00:00
Gary Pendergast
fcd66d09d9
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 .
Built from https://develop.svn.wordpress.org/trunk@44578
git-svn-id: http://core.svn.wordpress.org/trunk@44409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 05:05:48 +00:00
Gary Pendergast
5ed789dc63
Tests: Add missing `parent::setUp()` calls to all test classes.
...
Props johnbillion, birgire.
Fixes #37375 .
Built from https://develop.svn.wordpress.org/trunk@44577
git-svn-id: http://core.svn.wordpress.org/trunk@44408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 04:54:50 +00:00
Gary Pendergast
0bbfe3b8e2
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 .
Built from https://develop.svn.wordpress.org/trunk@44576
git-svn-id: http://core.svn.wordpress.org/trunk@44407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 01:47:51 +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
Gary Pendergast
8656a65e1e
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 .
Built from https://develop.svn.wordpress.org/trunk@44573
git-svn-id: http://core.svn.wordpress.org/trunk@44404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:06:48 +00:00
Gary Pendergast
3a697f7f46
Coding Standards: Remove an unnecessary line whitelisting.
...
Props jrf.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44572
git-svn-id: http://core.svn.wordpress.org/trunk@44403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 04:53:51 +00:00
Gary Pendergast
f72594974f
Coding Standards: Exclude some external files.
...
- `class-wp-block-parser.php` and `wp-includes/blocks/*` are imported from the Gutenberg plugin.
- `speed-trap-listener.php` is a third party library.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44571
git-svn-id: http://core.svn.wordpress.org/trunk@44402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 04:01:50 +00:00
Gary Pendergast
57fcb7d8dd
Coding Standards: Fix an incorrect `phpcs:ignore` comment.
...
It's `phpcs:ignore`, not `wpcs:ignore`.
Props GaryJ.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44570
git-svn-id: http://core.svn.wordpress.org/trunk@44401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 03:49:49 +00:00
Gary Pendergast
08e8270a48
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 .
Built from https://develop.svn.wordpress.org/trunk@44569
git-svn-id: http://core.svn.wordpress.org/trunk@44400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 03:20:48 +00:00
desrosj
2785313bf2
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 .
Built from https://develop.svn.wordpress.org/trunk@44568
git-svn-id: http://core.svn.wordpress.org/trunk@44399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 18:19:49 +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
c00229969a
Coding Standards: Add exceptions for `WordPress.Files.FileName.NotHyphenatedLowercase`.
...
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44564
git-svn-id: http://core.svn.wordpress.org/trunk@44395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:17:50 +00:00
Gary Pendergast
3cbd512161
Coding Standards: Ignore the violations of `Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase`.
...
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44563
git-svn-id: http://core.svn.wordpress.org/trunk@44394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:08: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
Gary Pendergast
e05b19d248
Coding Standards: `template.php` isn't a template tag file.
...
`WordPress.Files.FileName.InvalidTemplateTagFileName` shouldn't apply to it.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44561
git-svn-id: http://core.svn.wordpress.org/trunk@44392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 05:00:50 +00:00
Gary Pendergast
9e87cb7fa2
Coding Standards: Ignore the single WordPress.PHP.RestrictedPHPFunctions.create_function_create_function violation.
...
This is intentional, for older PHP support.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44560
git-svn-id: http://core.svn.wordpress.org/trunk@44391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 03:45:48 +00:00
Gary Pendergast
5afa0c9ee3
Coding Standards: Remove PHPCS 2.x `@codingStandardsIgnore*` ignore syntax.
...
Props netweb.
Fixes #42808 .
Built from https://develop.svn.wordpress.org/trunk@44559
git-svn-id: http://core.svn.wordpress.org/trunk@44390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 03:04:51 +00:00
Gary Pendergast
3c0c01f348
Post WordPress 5.1 Beta 1 version bump.
...
Built from https://develop.svn.wordpress.org/trunk@44558
git-svn-id: http://core.svn.wordpress.org/trunk@44389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 00:59:50 +00:00
Gary Pendergast
e11b64ddba
WordPress 5.1 Beta 1.
...
Built from https://develop.svn.wordpress.org/trunk@44557
git-svn-id: http://core.svn.wordpress.org/trunk@44388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 00:42:48 +00:00
Gary Pendergast
8e623691c0
Emoji: Fix a code formatting error introduced in [44554].
...
See #45930 .
Built from https://develop.svn.wordpress.org/trunk@44556
git-svn-id: http://core.svn.wordpress.org/trunk@44387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:40:49 +00:00
Gary Pendergast
203d686ec9
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 .
Built from https://develop.svn.wordpress.org/trunk@44555
git-svn-id: http://core.svn.wordpress.org/trunk@44386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:31:50 +00:00
Gary Pendergast
92146fe52b
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 .
Built from https://develop.svn.wordpress.org/trunk@44554
git-svn-id: http://core.svn.wordpress.org/trunk@44385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:20:52 +00:00
Gary Pendergast
8e2f6a9923
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 .
Built from https://develop.svn.wordpress.org/trunk@44553
git-svn-id: http://core.svn.wordpress.org/trunk@44384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:16:50 +00:00
desrosj
b98affb210
Embeds: Remove Photobucket, FunnyOrDie from the list of oEmbed providers.
...
These services no longer support oEmbed.
Props skostadinov, notnownikki.
Fixes #45399 .
Built from https://develop.svn.wordpress.org/trunk@44552
git-svn-id: http://core.svn.wordpress.org/trunk@44383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:42:51 +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
desrosj
d11928bc65
Docs: Add missing periods to `param` annotations for `flip()` in `WP_Image_Editor_GD`.
...
Props hitendra-chopda.
Fixes #45208 .
Built from https://develop.svn.wordpress.org/trunk@44550
git-svn-id: http://core.svn.wordpress.org/trunk@44381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:10:50 +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
desrosj
3dcc536b80
Media: Correct `since` annotation for adding the `caption_id` attribute.
...
Introduced in [42704]
Fixes #34595 .
Built from https://develop.svn.wordpress.org/trunk@44548
git-svn-id: http://core.svn.wordpress.org/trunk@44379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:37:49 +00:00
Felix Arntz
be54938eef
General: Fix existing coding standard violations in bookmark tests, as outlined in [44546].
...
See #43977 .
Built from https://develop.svn.wordpress.org/trunk@44547
git-svn-id: http://core.svn.wordpress.org/trunk@44378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:17:51 +00:00
Felix Arntz
a71d208785
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 .
Built from https://develop.svn.wordpress.org/trunk@44546
git-svn-id: http://core.svn.wordpress.org/trunk@44377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:06: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
desrosj
ae5c195d57
Media: Introduce the `has_post_thumbnail` filter.
...
Props rzen, desrosj.
Fixes #44859 .
Built from https://develop.svn.wordpress.org/trunk@44542
git-svn-id: http://core.svn.wordpress.org/trunk@44373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 15:28:50 +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