44848 Commits

Author SHA1 Message Date
Anthony Burchell
ff0425a81f Media: Add filter for post thumbnail url.
Introduces new filter `post_thumbnail_url` which allows overriding the default url returned from `wp_get_attachement_image_url()`.

Props ibenic, SergeyBiryukov, jackreichert, audrasjb.
Fixes #40547.



git-svn-id: https://develop.svn.wordpress.org/trunk@52027 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-07 19:27:45 +00:00
Sergey Biryukov
b7bbb52298 Coding Standards: Move wp-includes/class-http.php to wp-includes/class-wp-http.php.
This renames the file containing the `WP_Http` class to conform to the coding standards.

This commit also includes:

- A new `class-http.php` that includes the new file, for anyone that may've been including the file directly.
- Replaces references to the old filename with the new filename.

Follow-up to [8516], [13274], [33748].

Fixes #54389. See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@52026 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-07 01:35:52 +00:00
Sergey Biryukov
6523e724ee 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52025 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-06 21:55:50 +00:00
Tonya Mork
9c72fd73cb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52024 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 23:00:44 +00:00
Tonya Mork
c3d8812856 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52023 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 22:27:30 +00:00
Tonya Mork
76cf854334 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52022 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 22:19:12 +00:00
Marius L. J
3d679af2a7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52021 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 21:03:34 +00:00
Sergey Biryukov
b64d06f784 Coding Standards: Consistently escape attribute in wp-admin/themes.php.
Follow-up to [27012], [38057], [47816], [51083].

Props sabbirshouvo, audrasjb.
Fixes #54256.

git-svn-id: https://develop.svn.wordpress.org/trunk@52020 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 17:57:40 +00:00
Tonya Mork
68b5fffc49 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52019 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 12:17:32 +00:00
Marius L. J
18e9b9a135 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52018 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 11:39:44 +00:00
Timothy Jacobs
ca7450dfdd 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52017 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 02:29:32 +00:00
Timothy Jacobs
827dd20997 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52016 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 02:14:07 +00:00
Peter Wilson
4a67a9774a 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@52015 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 23:55:21 +00:00
Tonya Mork
243149b2c0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52014 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 23:30:01 +00:00
Tonya Mork
58adc101d7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52013 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 18:16:46 +00:00
Greg Ziółkowski
6857e69549 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@52012 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 16:02:42 +00:00
Greg Ziółkowski
1918fe9e25 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@52011 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 15:56:06 +00:00
Tonya Mork
40ac5de838 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52010 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 15:22:47 +00:00
Tonya Mork
80380cd374 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52009 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 13:15:33 +00:00
Tonya Mork
93e6311612 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52008 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 12:42:26 +00:00
David Baumwald
d782ee4c3c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52007 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 20:00:36 +00:00
Sergey Biryukov
bf63e7ab46 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52006 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 19:38:33 +00:00
Sergey Biryukov
a88e82020c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52005 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 17:22:55 +00:00
John James Jacoby
b8564bdf9e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52004 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 17:00:18 +00:00
Tonya Mork
e6e51414c9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52003 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 15:04:55 +00:00
Jonathan Desrosiers
9cfdfd4ecd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52002 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 14:54:20 +00:00
Sergey Biryukov
387269d5e5 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52001 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 03:15:21 +00:00
Sergey Biryukov
213eb89650 Build/Test Tools: Restore the https URL for browserify-aes.
Follow-up to [51967], [51974].

See #54054.

git-svn-id: https://develop.svn.wordpress.org/trunk@52000 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 02:59:30 +00:00
Sergey Biryukov
8a4ffe3883 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51999 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 02:56:27 +00:00
Sergey Biryukov
b8dabaf249 Tests: Correct @covers tags in WP_Comments_List_Table tests.
Follow-up to [51993], [51997].

See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@51998 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 00:54:47 +00:00
Sergey Biryukov
b849ae2685 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51997 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 00:48:42 +00:00
Tonya Mork
53f646d382 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51996 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 23:18:46 +00:00
Tonya Mork
88835bea75 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51995 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 22:53:54 +00:00
Tonya Mork
4e02784e4e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51994 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 22:07:49 +00:00
Tonya Mork
aa83121b9f Build/Test Tools: Add missing @covers tags for Tests_Admin_includesListTable.
Follow-up to [31730].

Props pbearne, jrf, hellofromTonya.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@51993 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 22:00:44 +00:00
Tonya Mork
30fc5ec439 Build/Test Tools: Add missing @covers tags for Tests_Admin_includesFile.
Follow-up to [25002], [42773].

Props pbearne, jrf, hellofromTonya.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@51992 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 21:56:10 +00:00
Tonya Mork
032b98dbdd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51991 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 21:42:44 +00:00
Tonya Mork
36ecafde11 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51990 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 21:25:53 +00:00
Tonya Mork
5da7a6f923 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51989 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 21:03:10 +00:00
Sergey Biryukov
3e2ec6c215 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51988 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 20:18:09 +00:00
John James Jacoby
9007b1dd3a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51985 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 19:07:10 +00:00
John James Jacoby
8f9eea80f9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51984 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 18:46:36 +00:00
Sergey Biryukov
d7518d1927 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51982 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 18:28:23 +00:00
John James Jacoby
4440711bfb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51980 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 17:55:07 +00:00
John James Jacoby
8d26fccb10 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51979 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 17:36:34 +00:00
John James Jacoby
e30e4b6f00 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51978 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 17:20:35 +00:00
John James Jacoby
df8a2b408b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51977 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 17:06:16 +00:00
John James Jacoby
dbf96aadab 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51976 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 16:42:01 +00:00
John James Jacoby
4923d75fb1 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51975 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 15:56:02 +00:00
Joe Dolson
605e7d1b00 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51974 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 14:24:40 +00:00