Commit Graph

39117 Commits

Author SHA1 Message Date
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
0c9236ae42 Build Tools: Don't send AppVeyor notifications on Slack on repeated successful builds.
See #44276.



git-svn-id: https://develop.svn.wordpress.org/trunk@44599 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:48:46 +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
Gary Pendergast
e8781736ed Build Tools: Tweak AppVeyor settings.
- Set `grunt build` as the build script
- Disable testing and deployment options
- Customise the Slack integration message
- Only show the Slack message when the status changes

See #44276.



git-svn-id: https://develop.svn.wordpress.org/trunk@44595 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 04:50:03 +00:00
Gary Pendergast
6dbb6750e3 Build Tools: Add AppVeyor integration.
AppVeyor allows us to test in a Windows environment. This first iteration tests that building works correctly.

Props netweb.
Fixes #44276.



git-svn-id: https://develop.svn.wordpress.org/trunk@44594 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 04:20:10 +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
Jonathan Desrosiers
dd85c357d8 Tests: Add missing parent::tearDown().
Also, remove a `tearDown()` method that was not serving any purpose.

Fixes #45931.

git-svn-id: https://develop.svn.wordpress.org/trunk@44584 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 21:33:56 +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
065e7817c4 Customizer: Fix a coding standards issue introduced in [44580].
See #40020.




git-svn-id: https://develop.svn.wordpress.org/trunk@44582 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 07:22:03 +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
e547ecc791 Tests: Add missing parent::setUp() calls to all test classes.
Props johnbillion, birgire.
Fixes #37375.



git-svn-id: https://develop.svn.wordpress.org/trunk@44577 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 04:54:01 +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
c1d4ff496c 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@44571 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 04:00:42 +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
d0f00b58e2 Coding Standards: Add exceptions for WordPress.Files.FileName.NotHyphenatedLowercase.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44564 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:16:35 +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
df771316d1 Coding Standards: template.php isn't a template tag file.
`WordPress.Files.FileName.InvalidTemplateTagFileName` shouldn't apply to it.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44561 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 04:59:23 +00:00
Gary Pendergast
65f5fcb0fb Coding Standards: Ignore the single WordPress.PHP.RestrictedPHPFunctions.create_function_create_function violation.
This is intentional, for older PHP support.

See #45934.


git-svn-id: https://develop.svn.wordpress.org/trunk@44560 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 03:44:20 +00:00
Gary Pendergast
63fbf4a316 Coding Standards: Remove PHPCS 2.x @codingStandardsIgnore* ignore syntax.
Props netweb.
Fixes #42808.



git-svn-id: https://develop.svn.wordpress.org/trunk@44559 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 03:03:08 +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