Commit Graph

44840 Commits

Author SHA1 Message Date
Sergey Biryukov 6ad1bf0e3e Coding Standards: Rename the `$strResponse` argument to `$str_response` in `WP_Http::processResponse()`.
This fixes a `Variable "$strResponse" is not in valid snake_case format` WPCS warning.

Additionally, rename a `$res` variable to `$response` for clarity.

Follow-up to [8516], [51823], [51826], [51877].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@52025


git-svn-id: http://core.svn.wordpress.org/trunk@51617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-06 21:56:59 +00:00
hellofromTonya 862f6e9569 Posts/Post Types: Add filter to `is_post_type_viewable()`.
Introduces a new filter `'is_post_type_viewable'` which allows overriding the check. The expected filtered value is a boolean. As filtered values can change, including the data type, this commit includes a `is_bool()` check, thus ensuring backwards-compatibility.

Follow-up to [33666], [36402].

Props audrasjb, deepaklalwani, hellofromTonya, peterwilsoncc, powerbuoy, sergeybiryukov.
Fixes #49628.
Built from https://develop.svn.wordpress.org/trunk@52024


git-svn-id: http://core.svn.wordpress.org/trunk@51616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 23:01:58 +00:00
hellofromTonya c5662ee7a1 Bundled Theme: Add privacy policy link to Twenty Twenty footer.
If a privacy policy is set, its page is now linked in the footer.

Follow-up to [46271].

Props audrasjb, justinahinon, kapilpaul, ryelle, sabernhardt.
Fixes #53446.
Built from https://develop.svn.wordpress.org/trunk@52023


git-svn-id: http://core.svn.wordpress.org/trunk@51615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 22:29:01 +00:00
hellofromTonya d4c8830ae3 Bundled Theme: Ensure logo displays in Customizer previewer.
Fixes an issue with the logo not displaying the Customizer previewer when changing the site title or description.

Follow-up to [46271].

Props acosmin, boniu91, sabernhardt.
Fixes #51337.
Built from https://develop.svn.wordpress.org/trunk@52022


git-svn-id: http://core.svn.wordpress.org/trunk@51614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 22:20:58 +00:00
Clorith 44f50060eb Site Health: Add the constant `WP_ENVIRONMENT_TYPE` for debug data.
As a legacy from the old Health Check plugin, the constant `WP_LOCAL_DEV` was included in the debug data under the "WordPress Constants" section. This was incorrect, and has never been a constant used by core.

Instead, that field is now replaced by `WP_ENVIRONMENT_TYPE`, which was introduced with WordPress 5.5, and is a much more appropriate value to provide in a debug scenario.

Props johnbillion, bgoewert, sabbirshouvo.
Fixes #54340.
Built from https://develop.svn.wordpress.org/trunk@52021


git-svn-id: http://core.svn.wordpress.org/trunk@51613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 21:05:00 +00:00
Sergey Biryukov 0531cc11b4 Coding Standards: Consistently escape attribute in `wp-admin/themes.php`.
Follow-up to [27012], [38057], [47816], [51083].

Props sabbirshouvo, audrasjb.
Fixes #54256.
Built from https://develop.svn.wordpress.org/trunk@52020


git-svn-id: http://core.svn.wordpress.org/trunk@51612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 17:58:57 +00:00
hellofromTonya b9d15392bf Code Modernization: Pass correct default value to `http_build_query()` in `get_core_checksums()` and `wp_version_check()`.
The `get_core_checksums()` and `wp_version_check()` functions call the PHP native `http_build_query()` function, the second parameter of which is the ''optional'' `$numeric_prefix` parameter which expects a non-nullable `string`.

A parameter being optional, however, does not automatically make it nullable.

As of PHP 8.1, passing `null` to a non-nullable PHP native function will generate a deprecation notice.

In this case, this function call yielded a `http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated` notice.

Changing the `null` to an empty string fixes this without a backward compatibility break.

References:
* [https://www.php.net/manual/en/function.http-build-query.php PHP Manual: http_build_query()]
* [https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg PHP RFC: Deprecate passing null to non-nullable arguments of internal functions]

Follow-up to [18697], [25540].

Props bjorsch, kraftbj, hellofromTonya, jrf.
See #54229.
Built from https://develop.svn.wordpress.org/trunk@52019


git-svn-id: http://core.svn.wordpress.org/trunk@51611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 12:18:58 +00:00
Clorith 500da91f70 Site Health: Update the icon used when no issues are reported.
The icon used to be a rather blocky checkmark, but has now been changed to the more friendly, and less ambiguous, smiley dashicon.

It also helps cover a rare cases where a checkmark, while often used to mark something as done, may also be used to indicate that something is incorrect (many thanks to my 6th grade teacher for this rationale).

As an added bonus, this commit also adjusts the margins used around the icon, to make it fit more nicely on both large and small viewports.

Props sabernhardt, generosus.
Fixes #53980.
Built from https://develop.svn.wordpress.org/trunk@52018


git-svn-id: http://core.svn.wordpress.org/trunk@51610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 11:41:01 +00:00
TimothyBlynJacobs fa473014dc REST API: Support subdirectory themes in the Themes controller.
This allows for themes that are included inside of a subdirectory, for example `subdir/my-theme`, to be accessed via the single item route of the `/wp/v2/themes` controller.

Fixes #54349.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 02:30:57 +00:00
TimothyBlynJacobs 04a853195b REST API: Allow sidebars and their widgets to be public.
By default, only users with the `edit_theme_options` capability can access the sidebars and widgets REST API endpoints. In this commit, A new `show_in_rest` parameter is added to the `register_sidebar` function. When enabled, all users will be able to access that sidebar and any widgets belonging to that sidebar.

This commit reduces the `context` for a widget's `instance` information to only `edit`. This is to ensure that internal widget data is not inadvertently exposed to the public. A future ticket may expose additional APIs to allow widget authors to indicate that their instance data can be safely exposed. REST API consumers intending to access this `instance` information should take care to explicitly set the `context` parameter to `edit`.

Props spacedmonkey, zieladam.
Fixes #53915.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 02:15:59 +00:00
Dion Hulse 1268bbd613 Add some whitespace to svn:externals to test automatic bumping of the Akismet external.
See https://make.wordpress.org/systems/?p=1717


git-svn-id: http://core.svn.wordpress.org/trunk@51607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-05 00:31:49 +00:00
Peter Wilson cae71f232c Comments: Avoid reparenting during post deletion.
Delete comments in a descending order by comment ID when deleting a post.

This avoids the expense of additional database queries required to re-parent threaded comments that are themselves about to be deleted.

Props Mte90, andraganescu, johnbillion, hellofromTonya, peterwilsoncc.
Fixes #37703.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 23:56:58 +00:00
hellofromTonya 9036739acc Administration: Make dashboard widget control submit button text more clear.
Changes the submit button text from "Submit" to "Save Changes".

Why? The text is more semantic and clear of what happens when activating that button.

Follow-up to [9103].

Props zodiac1978, knutsp, hilayt24, audrasjb.
Fixes #54229.
Built from https://develop.svn.wordpress.org/trunk@52014


git-svn-id: http://core.svn.wordpress.org/trunk@51605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 23:30:58 +00:00
hellofromTonya fcf096f4b9 Bundled Themes: Remove the "role" attribute on HTML elements with a default landmark role.
With IE11 no longer supported, the primary problem with assistive technology support for native HTML5 elements no longer applies.

This commit removes the `role` attribute from the following HTML5 elements with default landmark roles, per formerly required role attributes and W3C.

Follow-up to [17669], [21261], [23452], [24832], [29892], [38833], [40851], [43842], [46271], [49216].

Props costdev, craigfrancis, joedolson, mukesh27, ryokuhi, sabernhardt.
Fixes #54079.
Built from https://develop.svn.wordpress.org/trunk@52013


git-svn-id: http://core.svn.wordpress.org/trunk@51604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 18:18:01 +00:00
gziolo e4da863a6f Docs: Clarify the path usage register_block_type_from_metadata
The filename passed with the first param must end with `block.json`.

Fixes #53806.
Props coreyw, costdev.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 16:03:57 +00:00
gziolo 56e4bf827d Build: Remove polyfills from block view scripts
Related changes in Gutenberg: https://github.com/WordPress/gutenberg/pull/35038.

When adding a block with a view.js script, the frontend loads an additional ~20kb of scripts that were previously not there. These are coming from polyfills that are defined as a dependency for view.js scripts.
Since WordPress dropped support for IE, these polyfills are no longer needed and can be removed.

Follow-up to [51501].
See #53690.
Props aristath.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 15:57:58 +00:00
hellofromTonya 507cc58f72 Coding Standards: Add visibility to methods in `tests/phpunit/tests/`.
Adds a `public` visibility to test fixtures, tests, data providers, and callbacks methods.

Adds a `private` visibility to helper methods within test classes.

Renames callbacks and helpers that previously started with a `_` prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit.

Props costdev, jrf, hellofromTonya.
Fixes #54177.
Built from https://develop.svn.wordpress.org/trunk@52010


git-svn-id: http://core.svn.wordpress.org/trunk@51601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 15:23:59 +00:00
hellofromTonya ce599b652a Coding Standards: Add `public` visibility to methods in `tests/phpunit/includes/`.
This commit adds the `public` visibility keyword to each method which did not have an explicit visibility keyword.

Why `public`?

With no visibility previously declared, these methods are implicitly `public` and available for use. As these are part of the WordPress testing framework (for Core and extenders), changing them to anything else would be a backwards-compatibility break.

Props costdev, jrf, hellofromTonya.
See #54177.
Built from https://develop.svn.wordpress.org/trunk@52009


git-svn-id: http://core.svn.wordpress.org/trunk@51600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 13:16:57 +00:00
hellofromTonya 27d239d01b REST API: Improve translations, comments, and readability in URL Details endpoint.
Improvements:
* Removes HTML tags from translatable strings. Uses `sprintf` with placeholder and translators comment.
* Spells out "OG" to "Open Graph" to help translators.
* Adds `@since` param to new filters.
* Improves comments for code standards and consistency.
* Improves readability by making multiple args multiline.
* Micro-optimizations to avoid unnecessary variable assignments.

Follow-up to [51973].

Props hellofromTonya, sergeybiryukov, swissspidy.
Fixes #54358.
Built from https://develop.svn.wordpress.org/trunk@52008


git-svn-id: http://core.svn.wordpress.org/trunk@51599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 12:44:01 +00:00
Dion Hulse 42769ea145 Bump Akismet external to 4.2.1
See #54004.


git-svn-id: http://core.svn.wordpress.org/trunk@51597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 02:35:52 +00:00
davidbaumwald 2e249395de Comments: Add `noopener noreferrer` to author links in list table.
When viewing the listing of all comments, author links previously passed referrer information to untrusted URLs.  This change adds `noreferrer` to each author link, as well as `noopener` to prevent the passing of information about the parent window.

Props cybr, adam3128, erayalakese, andraganescu, audrasjb, joedolson, sabernhardt. 
Fixes #40916.
Built from https://develop.svn.wordpress.org/trunk@52007


git-svn-id: http://core.svn.wordpress.org/trunk@51596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 20:02:02 +00:00
Sergey Biryukov aa62c253e0 External Libraries: Update the Iris color picker to version 1.1.1.
The latest version includes jQuery 3.x deprecation fixes:
* `$.isArray` → `Array.isArray`
* Event attachment/trigger shorthands → `.on()` and `.trigger()`

For a full list of changes in this update, see the PR on GitHub:
https://github.com/Automattic/Iris/pull/72

Follow-up to [22030], [22033], [22385], [22457], [22697], [22732], [23443], [26334], [30551], [30650], [38931], [50547].

Props Clorith, mattwiebe, Cybr.
Fixes #54224.
Built from https://develop.svn.wordpress.org/trunk@52006


git-svn-id: http://core.svn.wordpress.org/trunk@51595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 19:40:00 +00:00
Sergey Biryukov 8117af8bb2 General: Remove the `svn:executable` property from `wp-admin/_index.php`.
The property appears to be added accidentally. The removing was mentioned but not included in the previous commit.

Follow-up to [38049], [42200], [46585], [51995], [52001].

See #54321.
Built from https://develop.svn.wordpress.org/trunk@52005


git-svn-id: http://core.svn.wordpress.org/trunk@51594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 17:23:56 +00:00
johnjamesjacoby 3e81de0a3d Themes/TwentySixteen: correct invalid CSS `font-style` value.
This change swaps out `none` for `normal` in the `.wp-block-pullquote cite` styling of `blocks.css`.

Props malae, mukesh27, sabernhardt.

Fixes #46807.
Built from https://develop.svn.wordpress.org/trunk@52004


git-svn-id: http://core.svn.wordpress.org/trunk@51593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 17:01:57 +00:00
hellofromTonya 6a10d18458 Customize: Fix `focus()` to collapse child panels and show parent panel.
When a child panel is open, `wp.customize.panel('parent_panel').focus()` (e.g. `'parent_parent'` might be `'nav_menus'`) collapses the child panel(s) to show the parent panel. 

Follow-up to [30102], [31920], [38648].

Props celloexpressions, costdev, dlh, hareesh-pillai, hellofromTonya, westonruter, wpweaver. 
Fixes #34436.
Built from https://develop.svn.wordpress.org/trunk@52003


git-svn-id: http://core.svn.wordpress.org/trunk@51592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 15:05:58 +00:00
desrosj e2315352e9 Build/Test Tools: Pass workflow outcome to Slack Notifications.
When using a workflow as a callable workflow, the job status check functions do not take the called workflow into account. This has caused some failures to be incorrectly reported as successful.

This adds an input to the Slack notifications workflow for when the `workflow_call` event is used.

See #53363.
Built from https://develop.svn.wordpress.org/trunk@52002


git-svn-id: http://core.svn.wordpress.org/trunk@51591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 14:56:04 +00:00
Sergey Biryukov a59ade2290 Help/About: Improve typography in the `Welcome to your WordPress Dashboard!` text.
Per the general consensus in #8714 and similar tickets, user-facing strings should use “curly quotes” for better typography.

Remove the `svn:executable` property that appears to be added accidentally.

Follow-up to [38049], [42200], [46585], [51995].

See #54321.
Built from https://develop.svn.wordpress.org/trunk@52001


git-svn-id: http://core.svn.wordpress.org/trunk@51590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 03:16:57 +00:00
Sergey Biryukov 7effeb4fc1 Build/Test Tools: Restore the `https` URL for `browserify-aes`.
Follow-up to [51967], [51974].

See #54054.
Built from https://develop.svn.wordpress.org/trunk@52000


git-svn-id: http://core.svn.wordpress.org/trunk@51589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 03:00:57 +00:00
Sergey Biryukov 8ea16bd30e Tests: Clean up the `$_REQUEST` superglobal in `WP_UnitTestCase_Base::clean_up_global_scope()`.
This resolves an issue where setting up `$_REQUEST['post_type']` and not clearing it afterwards in `Tests_Admin_IncludesScreen::setup_block_editor_test()` started affecting a few `WP_Comments_List_Table` tests after [51997]. It also ensures a similar issue does not inadvertently happen in other tests.

Follow-up to [760/tests], [51997].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51999


git-svn-id: http://core.svn.wordpress.org/trunk@51588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 02:57:58 +00:00
Sergey Biryukov a949417a2e Tests: Correct `@covers` tags in `WP_Comments_List_Table` tests.
Follow-up to [51993], [51997].

See #39265.
Built from https://develop.svn.wordpress.org/trunk@51998


git-svn-id: http://core.svn.wordpress.org/trunk@51587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 00:55:56 +00:00
Sergey Biryukov 012f50f565 Tests: Split `WP_Posts_List_Table` and `WP_Comments_List_Table` tests into two separate files for clarity.
These were previously combined in the `includesListTable.php` file. Since the tests were specific neither to the `_get_list_table()` function nor the parent `WP_List_Table` class, the naming was confusing, which should now be resolved.

Follow-up to [31730], [38854], [40297], [48151], [48521], [49190], [51993].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51997


git-svn-id: http://core.svn.wordpress.org/trunk@51586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-03 00:49:58 +00:00
hellofromTonya b87617e271 Customizer: Make range controls full width.
Adds CSS for range controls in the Customizer to be as wide as possible allowing for smaller increments to be more easily obtained by the user.

Follow-up to [28930].

Props domainsupport, dlh, sabernhardt, audrasjb.
Fixes #54329.
Built from https://develop.svn.wordpress.org/trunk@51996


git-svn-id: http://core.svn.wordpress.org/trunk@51585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 23:19:59 +00:00
hellofromTonya 22e4a52258 Help/About: Improve the Welcome text in `wp-admin/_index.php`.
Improves the `Welcome to your WordPress Dashboard!` copy in the `Overview` section of the help tab.

Follow-up to [18914], [19007], [37680].

Props webcommsat, marybaum, costdev, audrasjb.
Fixes #54321.
Built from https://develop.svn.wordpress.org/trunk@51995


git-svn-id: http://core.svn.wordpress.org/trunk@51584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 22:54:59 +00:00
hellofromTonya 973f1f1cac Build/Test Tools: Add missing `@covers` and visibility for `Tests_Admin_includesMisc`.
Adds the `@covers` tag to the test DocBlock.
Adds missing `public` visibility to the test method.

Follow-up to [25002].

Props pbearne, jrf, hellofromTonya.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@51994


git-svn-id: http://core.svn.wordpress.org/trunk@51583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 22:08:59 +00:00
hellofromTonya f45b359aa2 Build/Test Tools: Add missing `@covers` tags for `Tests_Admin_includesListTable`.
Follow-up to [31730].

Props pbearne, jrf, hellofromTonya.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@51993


git-svn-id: http://core.svn.wordpress.org/trunk@51582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 22:01:59 +00:00
hellofromTonya 9869a44a0f Build/Test Tools: Add missing `@covers` tags for `Tests_Admin_includesFile`.
Follow-up to [25002], [42773].

Props pbearne, jrf, hellofromTonya.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@51992


git-svn-id: http://core.svn.wordpress.org/trunk@51581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 21:57:57 +00:00
hellofromTonya 3819fa7340 Help/About: Simplifies WordPress version in "Help" sidebar.
Simplifies the logic for when not in alpha/beta/RC.

The changelog URL is translatable in a few other places in core. This commit uses the same pattern for consistency.

Follow-up to [51985].

Props sergeybiryukov.
Fixes #47848.
Built from https://develop.svn.wordpress.org/trunk@51991


git-svn-id: http://core.svn.wordpress.org/trunk@51580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 21:43:57 +00:00
hellofromTonya db11516237 Build/Test Tools: Add end-to-end (e2e) tests for edit posts page.
Adds e2e tests for 'Edit Posts':
* No posts found
* Shows a single post after publishing
* Edit existing post via Edit button
* Quick edit existing post via Quick Edit button
* Delete post

Props isabel_brison, azaozz, hellofromTonya, justinahinon, talldanwp, youknowriad.
Fixes #49507.
Built from https://develop.svn.wordpress.org/trunk@51990


git-svn-id: http://core.svn.wordpress.org/trunk@51579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 21:26:58 +00:00
hellofromTonya e7e57a7aeb Build/Test Tools: Introduce local visual regression testing.
Adds the ability to ''locally'' run visual regression testing for wp-admin pages via `npm run test:visual`. Snapshots are stored on contributors' local machines.

Note:
Wiring to the CI is not included. Why? The challenges for the CI are storage of the artifacts and unreliability of testing these across different environments.

This commit is a first step towards visual regression testing. Running it locally provides a learning opportunity which could help to craft how to build it into the automated CI process.

Props isabel_brison, andraganescu, azaozz, danfarrow, desrosj, hellofromTonya, justinahinon, netweb, talldanwp.
Fixes #49606.
Built from https://develop.svn.wordpress.org/trunk@51989


git-svn-id: http://core.svn.wordpress.org/trunk@51578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 21:05:13 +00:00
Sergey Biryukov 1fdea15a96 Coding Standards: Fix some WPCS errors and warnings in `wp-admin/user-edit.php`:
* Add missing translators comment.
* Add missing space, correct indentation.
* Put opening and closing PHP tag on a line by itself.
* Remove unnecessary escaping for consistency with other strings.

Follow-up to [51980].

See #53658.
Built from https://develop.svn.wordpress.org/trunk@51988


git-svn-id: http://core.svn.wordpress.org/trunk@51577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 20:19:59 +00:00
johnjamesjacoby 88e9e36233 Help/About: add WordPress version to contextual "Help" sidebar area.
This change adds a new way for users to quickly identify what version of WordPress they are looking at, directly from the "Help" sidebar on the main "Dashboard" page.

* Stable versions will link to their respective support documents.
* Development versions (alpha/beta/RC) will not link anywhere.

Props audrasjb, costdev, donmhico, hellofromtonya, ipstenu, justinahinon, karmatosed, knutsp, marybaum, sergeybiryukov, webcommsat.

Fixes #47848.
Built from https://develop.svn.wordpress.org/trunk@51985


git-svn-id: http://core.svn.wordpress.org/trunk@51574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 19:09:03 +00:00
johnjamesjacoby 43644069ea Permalinks: Sanitize non-visible characters inside `sanitize_title_with_dashes()`.
This change prevents non-visible characters in titles from creating encoded values in permalinks, opting instead for the following replacement strategy:

* Non-visible non-zero-width characters are replaced with hyphens
* Non-visible zero-width characters are removed entirely

Included with this change are 64 additional PHPUnit assertions to confirm that only the targeted non-visible characters are sanitized as intended.

Before this change, URLs would unintentionally contain encoded values where these non-visible characters were. After this change, URLs intentionally strip out or hyphenate these non-visible characters.

Props costdev, dhanendran, hellofromtonya, paaljoachim, peterwilsoncc, poena, sergeybiryukov.

Fixes #47912.
Built from https://develop.svn.wordpress.org/trunk@51984


git-svn-id: http://core.svn.wordpress.org/trunk@51573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 18:47:57 +00:00
Sergey Biryukov 3ab8d52d78 Media: Use `WP_Query::get()` method to retrieve the `posts_per_page` value in `wp_ajax_query_attachments()`.
This avoids a PHP notice and ensures that a default value is always provided if none is set by the user.

Follow-up to [51145], [51485].

Props davidwebca, mukesh27.
Fixes #54129.
Built from https://develop.svn.wordpress.org/trunk@51982


git-svn-id: http://core.svn.wordpress.org/trunk@51571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 18:30:02 +00:00
johnjamesjacoby fae48afc92 Application Passwords: display guiding text & link in `user-edit.php` when unavailable.
This change intends to avoid confusion around the requirements of the Application Passwords feature, specific to it requiring HTTPS and the `WP_ENVIRONMENT_TYPE` constant.

It does this by conditionally hiding the traditional UI and showing some insightful explanations instead, including a translatable link to the `WP_ENVIRONMENT_TYPE` documentation on the "Editing wp-config.php" support page.

Props ashfame, audrasjb, iluy, johnbillion.

Fixes  #53658.
Built from https://develop.svn.wordpress.org/trunk@51980


git-svn-id: http://core.svn.wordpress.org/trunk@51569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 17:57:03 +00:00
johnjamesjacoby 6d451fb64b Admin/UI-Copy: reword some "we" usages.
This changes some admin-area, user-facing text, to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word “we” should be avoided (...) unless its made very clear which group is speaking

(There are several more usages of "we" that will receive this same scrutiny in future commits/releases.)

Props audrasjb, johnbillion, marybaum, peterwilsoncc, sergeybiryukov, shital-patel.

Fixes  #46057.
Built from https://develop.svn.wordpress.org/trunk@51979


git-svn-id: http://core.svn.wordpress.org/trunk@51568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 17:37:57 +00:00
johnjamesjacoby f5991aed63 Themes: Introduce `get_header_image_tag_attributes` hook.
This change adds a filter inside of the `get_header_image_tag()` function allowing developers to filter the attributes of the header image HTML tag before they are escaped, concatenated, and returned.

Before this change, it was not possible to externally and preemptively intercept this array of attributes. After this change, these attributes can now be easily filtered, matching it nicely to the `wp_get_attachment_image_attributes` hook.

Props audrasjb, chaion07, junaidbhura, sabernhardt.

Fixes #38942.
Built from https://develop.svn.wordpress.org/trunk@51978


git-svn-id: http://core.svn.wordpress.org/trunk@51567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 17:21:58 +00:00
johnjamesjacoby f60dae0731 Admin/Menu: include `960` exact pixel width in collapse measurements.
This change removes a 1 pixel gap in the measurement of the viewport width when clicking the "Collapse menu" button (at the bottom of the admin menu UI) when already collapsed, causing the menu not to open as intended when exactly 960 pixels wide.

Before this change, the menu would be stuck in the collapsed position. After this change, the menu opens as expected.

Props abesell132, ankit-k-gupta, audrasjb, boniu91, mai21, sabernhardt, webaxones.

Fixes #54210.
Built from https://develop.svn.wordpress.org/trunk@51977


git-svn-id: http://core.svn.wordpress.org/trunk@51566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 17:07:57 +00:00
johnjamesjacoby dd7cb532a1 Admin/Discussion Settings: attempt to clarify intent of "Default post settings" section.
This changes the descriptive text underneath 3 settings that are frequently overridden by individual posts & pages, and are also often misunderstood to work differently than they do.

"(These settings may be overridden for individual posts.)"

...becomes...

"Individual posts may override these settings. Changes here will only be applied to new posts."

* Parenthesis were removed to improve text layout and flow for RTL languages.
* Original statement was reworded to emphasize "individual posts".
* New statement provides clarity to users about settings changes not being retroactive.

Props audrasjb, johnjamesjacoby, sabbirshouvo, sabernhardt, tobifjellner.

Fixes #54300.
Built from https://develop.svn.wordpress.org/trunk@51976


git-svn-id: http://core.svn.wordpress.org/trunk@51565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 16:42:59 +00:00
johnjamesjacoby 791998fb7c Admin/Comments: remove bespoke truncation from search string HTML.
This change removes a call to `wp_html_excerpt()` used on the HTML output of the search string, supplied by the current user in the previous page request via the named `s` input in the search-box UI.

If the search string is extremely long, it wraps around the available empty space in a way that is not visually displeasing, confirming that truncation is not a requirement here.

This also addresses a small accessibility concern as the non-truncated string was not alternatively presented, and helps normalize the output of `$_REQUEST['s']` for more broad improvements in the future.

Props hareesh-pillai, jakubtyrcha, johnjamesjacoby, lukecavanagh, sabernhardt.

Fixes #17636.
Built from https://develop.svn.wordpress.org/trunk@51975


git-svn-id: http://core.svn.wordpress.org/trunk@51564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 15:57:59 +00:00
joedolson a5293aa581 Build/Test Tools: Restore changes to package.json.
Reverts changes to package.json and package-lock.json accidentally committed in [51967].

Props tobiasbg.
Fixes #54054.
Built from https://develop.svn.wordpress.org/trunk@51974


git-svn-id: http://core.svn.wordpress.org/trunk@51563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 14:26:14 +00:00