Commit Graph

47992 Commits

Author SHA1 Message Date
Andrew Ozz
9f80bbceeb Help/About: Fix typo in [56171]: support forum "topic", not "ticket".
Props: tobifjellner.
Fixes: #58199.

git-svn-id: https://develop.svn.wordpress.org/trunk@56237 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 22:09:51 +00:00
Andrew Ozz
118c36999a Menus: Fix critical errors when the page_on_front and/or page_for_posts options contain references to non-existing posts.
props: hbhalodia, wplindavantol, josklever, audrasjb.
Fixes: #58345.

git-svn-id: https://develop.svn.wordpress.org/trunk@56236 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 21:45:05 +00:00
Andrew Ozz
e77bf1ec99 Editir: Fix open_basedir warnings on the classic Edit Post screen when additional TinyMCE plugins are used.
Props: rembem, MadtownLems, njsamsatli, sabernhardt, azaozz.
Fixes: #54354.

git-svn-id: https://develop.svn.wordpress.org/trunk@56235 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 20:57:53 +00:00
Sergey Biryukov
3dff98beb4 Help/About: Adjust horizontal padding on the tabs under 960 pixels width.
This ensures that the About / Credits / Freedoms / Privacy / Get Involved tabs menu does not expand beyond the container when the side admin menu is expanded.

Follow-up to [56220], [56227], [56233].

Props costdev, mukesh27.
See #23348.

git-svn-id: https://develop.svn.wordpress.org/trunk@56234 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 15:40:42 +00:00
Sergey Biryukov
21374c2e60 Help/About: Update “Get Involved” tab content with the latest edits.
Follow-up to [56220], [56227].

Props oglekler, richtabor, SeReedMedia, eidolonnight, davidbaumwald, ibrahimmonir, ugyensupport, alexstine, suzettefranck.
See #23348.

git-svn-id: https://develop.svn.wordpress.org/trunk@56233 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 15:32:34 +00:00
Sergey Biryukov
93bf3a1ece Docs: Use consistent wording for development mode.
Follow-up to [56042], [56223], [56231].

See #57487, #57840.

git-svn-id: https://develop.svn.wordpress.org/trunk@56232 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 14:13:52 +00:00
Sergey Biryukov
2548797fc6 Docs: Clarify where the wp_get_development_mode() value is retrieved from.
Includes:
* Adding a mention of the `WP_DEVELOPMENT_MODE` constant.
* Minor DocBlock formatting adjustments.

Follow-up to [56042], [56223].

See #57487, #57840.

git-svn-id: https://develop.svn.wordpress.org/trunk@56231 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 14:08:04 +00:00
Isabel Brison
ec42a73cef Editor: fix typos in templates info.
Fixes two small typos in `wp-includes/block-template-utils.php`.

Props SergeyBiryukov.
Fixes #58713.



git-svn-id: https://develop.svn.wordpress.org/trunk@56230 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 05:16:21 +00:00
Isabel Brison
cfd3a6d100 Editor: update npm packages with first round of bug fixes for 6.3 RC1.
Includes miscellaneous bug fixes for 6.3 RC1.

Props ramonopoly.
See #58804.


git-svn-id: https://develop.svn.wordpress.org/trunk@56229 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 04:30:55 +00:00
Joe Dolson
f4d2a1593f Media: Set default state for image rotation button.
Adds `aria-expanded="false"` as default state for image rotation toggle in admin image editor. See #50523.

Props joedolson.
Fixes #58800.

git-svn-id: https://develop.svn.wordpress.org/trunk@56228 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-13 16:40:21 +00:00
Sergey Biryukov
de6f51823a Tests: Add tests to ensure the contribute Toolbar node is added when appropriate.
Follow-up to [56220].

Props costdev.
See #23348.

git-svn-id: https://develop.svn.wordpress.org/trunk@56227 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-13 12:39:42 +00:00
Jonny Harris
fc538206ec Editor: Lazily load Duotone settings only when needed.
Introduced in [56101] the `WP_Duotone` class, hooks into the `wp_loaded` action to load duotone style data from global styles. Hooking in early in the bootstrap process caused a number of problems. This hook, triggered an error on installing, as this lookup for global styles, would result in a global post trying to be created, even before the table existed. Additionally, this implementation caused a severe performance regression, as duotone styling data was loaded unnecessarily for requests that did not require such data, such as REST API calls or actions within the wp-admin interface.

In this change, refactor the `WP_Duotone` to lazily load the global styles and theme.json data, only when a block that supports duotone is encountered. The method `render_duotone_support` was change to take a third parameter to reuse the existing `WP_Block_Type` object passed to the filter, to save it being looked up again. The code has also got improved type checking and the use of the util function  `block_has_support`. Furthermore, the code's readability has been improved, along with enhancements to the documentation blocks.

Props Chouby, spacedmonkey, SergeyBiryukov, swissspidy, costdev, joemcgill, flixos90, mukesh27, nazmul111, ajlende, isabel_brison.
Fixes #58673.

git-svn-id: https://develop.svn.wordpress.org/trunk@56226 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-13 11:32:19 +00:00
Isabel Brison
23a1516926 Editor: fix duotone filters in classic themes.
Makes sure duotone block styles are output in the front end on classic themes.

Props ajlende, jeryj, spacedmonkey, vivekawsm, sabernhardt, costdev, mrinal013.
Fixes #58734.


git-svn-id: https://develop.svn.wordpress.org/trunk@56225 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-13 04:14:27 +00:00
Peter Wilson
b892f5177e General: Update Opera browser sniff follow UA string changes.
Since switching to the Blink engine, Opera browsers contain both the strings `Chrome` and `OPR\`. This change relocates the Opera test to take place before the Chrome test to ensure the correct browser is detected.

Props brasofilo, desrosj, costdev, mukesh27, swissspidy.
Fixes #46132.


git-svn-id: https://develop.svn.wordpress.org/trunk@56224 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-13 00:56:19 +00:00
Peter Wilson
65a048fc15 General: Introduce all development mode.
Introduce the development mode `all` as a a cover-all mode for the existing `theme`, `plugin` and `core` development modes. Developers can use the `all` mode if they are developing both themes and plugins, for example.

Introduce the utility function `wp_in_development_mode()` allowing developers to detect the mode via a parameter. If the development mode is set to `all` this function will always return `true`. If the development mode is specific then only the chosen mode will return `true`.

Follow up to [56079,56042].

Props flixos90.
Fixes #57487.



git-svn-id: https://develop.svn.wordpress.org/trunk@56223 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-13 00:27:06 +00:00
Sergey Biryukov
cdf3ac093d Coding Standards: Use single quotes for a string in Tests_Comment.
This resolves a WPCS error:
{{{
Error: String "1" does not require double quotes; use single quotes instead.
}}}

Includes updating a few related comments for clarity.

Follow-up to [56221].

See #57855.

git-svn-id: https://develop.svn.wordpress.org/trunk@56222 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-12 20:59:37 +00:00
Aaron Jorbin
434dd6be91 Tests: Use assertSame() in Tests_Comment
See #57855.


git-svn-id: https://develop.svn.wordpress.org/trunk@56221 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-12 20:04:02 +00:00
Sergey Biryukov
aa5f91a182 Help/About: Add a “Get Involved” tab to the About page.
This aims to make all the various ways of contributing to open-source WordPress project more discoverable, as well as make it easier to find an area that aligns with new contributor’s skills and interests.

Props oglekler, jpantani, SeReedMedia, ryelle, marybaum, karmatosed, eidolonnight, mt_suzette, Shelob9, desrosj, cathibosco1, jenmylo, nacin, helen, joostdevalk, hugobaeta, TacoVerdo, swissspidy, markoheijnen, lukecavanagh, boemedia, bridgetwillard, jeffmora, davidmusnik, mehdi01, johnbillion, fierevere, tobifjellner, richtabor, meher, courane01, webcommsat, audrasjb, mukesh27, davidbaumwald, costdev, joedolson, robinwpdeveloper, estelaris, mohiuddinomran, SergeyBiryukov.
See #23348.

git-svn-id: https://develop.svn.wordpress.org/trunk@56220 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-12 12:52:26 +00:00
Sergey Biryukov
a8d12183f2 Coding Standards: Use strict comparison in wp-includes/class-wp-network.php.
Follow-up to [41380], [41861], [45910].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56219 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-12 09:44:30 +00:00
Peter Wilson
44173677fa General: Escape nonce used for block theme activation.
Add `wp_json_encode()` as an escaping function when setting the `WP_BLOCK_THEME_ACTIVATE_NONCE` global on the block theme preview screen.

This account for custom nonce implementations making use of special characters that require escaping in JavaScript strings.

Props antonvlasenko, ramonopoly.
Fixes #58712.



git-svn-id: https://develop.svn.wordpress.org/trunk@56218 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-12 05:19:39 +00:00
Isabel Brison
ee7434fefa Editor: fix since annotation in rest blocks controller class.
Changes `6.3` to `6.3.0` in the since annotation for the `filter_response_by_context` function.

Props swissspidy, peterwilsoncc, mukesh27.
Fixes #58677.


git-svn-id: https://develop.svn.wordpress.org/trunk@56217 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-12 04:25:53 +00:00
Sergey Biryukov
effea6699a Post WordPress 6.3 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@56216 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 16:36:02 +00:00
Sergey Biryukov
ba1ac233ff WordPress 6.3 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@56215 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 16:11:25 +00:00
Joe McGill
ed174730d3 Media: Optimize images created in shortcodes.
This fixes an issue where images dynamically created during shortcode rendering (e.g., shortcode image galleries), were not getting image optimizations like `loading="lazy"` or `fetchpriority="hight"` applied. Note that even after this commit, shortcodes are processed after the main content images, which can affect the order in which optimizations are applied in content areas.

Follow-up to [56037].

Props spacedmonkey, flixos90, thekt12, swissspidy, joemcgill.
Fixes #58681.


git-svn-id: https://develop.svn.wordpress.org/trunk@56214 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 13:56:55 +00:00
Joe McGill
baec3f39c1 Revert package-lock.json changes committed by mistake in [56212].
Props spacedmonkey, swissspidy.
See #58775.


git-svn-id: https://develop.svn.wordpress.org/trunk@56213 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 13:54:42 +00:00
Joe McGill
cb54fdb142 Build/Test Tools: Reset main query object after each test.
This resets the main query variable, `$wp_the_query` during the `WP_UnitTestCase_Base::tear_down` method that runs after each PHPUnit test. This ensures any changes to the main query object is reset after each test to avoid cross contamination between tests, similar to how other globals are reset.

Props flixos90, spacedmonkey, joemcgill.
Fixes #58776.


git-svn-id: https://develop.svn.wordpress.org/trunk@56212 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 13:31:03 +00:00
Jb Audras
8c1b5794e4 I18n: Improve the use of dashicons-external icon for external links.
This changeset modifies how the `dashicons-external` icon is used in external links by editing its styles and adding a space between the text and the icon 
for better accessibility.

Props SergeyBiryukov, afercia, isabel_brison, mukesh27, sabernhardt, oglekler, audrasjb.
Fixes #47303.




git-svn-id: https://develop.svn.wordpress.org/trunk@56211 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 12:57:19 +00:00
Sergey Biryukov
252a2c1f18 Coding Standards: Use strict comparison in wp-includes/class-wp-rewrite.php.
Follow-up to [3638], [13689], [19743].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56210 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 11:32:15 +00:00
Mike Schroder
154d340395 Toolbar: Make the 'Edit site' link open the editor with the current template.
Adds a global, `$_wp_current_template_id`, to allow the 'Edit site' link in the admin bar to be aware of the current template and pass it to the Site Editor, so it can load the appropriate one directly.

See https://github.com/WordPress/gutenberg/issues/37850 for further discussion.

Props Mamaduka, poena, abitofmind, audrasjb, mikinc860, alexstine, annezazu, beckej, jameskoster, bacoords, clubkert, paaljoachim, get_dave, priethor, skorasaurus.
Fixes #58746.

git-svn-id: https://develop.svn.wordpress.org/trunk@56209 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 11:31:48 +00:00
Sergey Biryukov
31fdf8f20b Coding Standards: Use strict comparison in wp-includes/rewrite.php.
Follow-up to [6614], [13689], [19743].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56208 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 11:13:30 +00:00
Isabel Brison
4e864a1ded Bundled Theme: fix height of featured images in Twenty Twenty Three.
Fixes max height of the featured images in the Archive, Home, Index, and Search templates to prevent expanding iframe bug.

Props mikachan, ramonopoly.
Fixes #58766.


git-svn-id: https://develop.svn.wordpress.org/trunk@56207 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 07:22:17 +00:00
Isabel Brison
c21b63c0d0 Editor: remove one preloaded navigation endpoint.
Removes one of the preloaded navigation endpoints from the site editor as it is not in use anymore.

Props scruffian.
Fixes #58749.


git-svn-id: https://develop.svn.wordpress.org/trunk@56206 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 07:15:21 +00:00
Isabel Brison
efb0610df4 Editor: update npm packages with bug fixes and blessed tasks.
Includes miscellaneous bug fixes and enhancements to the Library task (#58579).

Props andrewserong, ramonopoly.
Fixes #58745.


git-svn-id: https://develop.svn.wordpress.org/trunk@56205 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 06:56:31 +00:00
Jb Audras
9b08513ce9 Docs: Fix incorrect type for $crop param is various WP_Image_Editor classes and methods.
This changeset updates the `$crop` docblock type in various `WP_Image_Editor`, `WP_Image_Editor_GD` and `WP_Image_Editor_Imagick` functions, to match the 
type documented in `image_resize_dimensions()`.

Props thunderdw.
Fixes #58271.
See #57840.




git-svn-id: https://develop.svn.wordpress.org/trunk@56204 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 06:29:11 +00:00
Jb Audras
488e431aaa I18n: Move translator comments inside sprintf for tagline field description.
Props costdev.
Fixes #57675.




git-svn-id: https://develop.svn.wordpress.org/trunk@56203 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 05:53:19 +00:00
Isabel Brison
a02886a868 Editor: opt out of Navigation fallback.
Allows developers to opt out of the auto-creation of the Navigation fallback through a filter.

Props get_dave, spacedmonkey, ramonopoly.
Fixes #58750.


git-svn-id: https://develop.svn.wordpress.org/trunk@56202 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 05:39:33 +00:00
Isabel Brison
eea94adc54 General: fix botched file move in r56199.
Moves `src/wp-admin/includes/theme-previews.php` to `src/wp-includes/theme-previews.php`.

Props peterwilsoncc.
See #58712.


git-svn-id: https://develop.svn.wordpress.org/trunk@56201 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 05:17:56 +00:00
Isabel Brison
444bdf49bc Editor: update string incorrectly marked for translation in Chrome.
Update the Pattern post type `edit_item` label to be `Edit Block Pattern` instead of `Edit Pattern` so Chrome doesn’t open the translation modal.

Props andrewserong,, ramonopoly, eric.7186, audrasjb, wildworks, Toro_Unit.
Fixes #58716.


git-svn-id: https://develop.svn.wordpress.org/trunk@56200 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 05:08:50 +00:00
Isabel Brison
7813524023 General: add nonce for block theme preview activation.
Adds a nonce so that activation works for block theme previews. Temporary fix until there is a REST API endpoint for activating themes.

Props scruffian, peterwilsoncc, nithins53, nithi22, jomonthomaslobo1, poena, syamraj24, vivekawsm, mrinal013.
Fixes #58712.


git-svn-id: https://develop.svn.wordpress.org/trunk@56199 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 05:01:05 +00:00
Peter Wilson
0c5e0dfd7c Build/Test Tools: Suppress E2E test suite Slack notifications.
Remove Slack notifications of E2E test suite failures while the tests are flakey to improve the signal-to-noise ratio.

Fixes #58779.



git-svn-id: https://develop.svn.wordpress.org/trunk@56198 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 04:08:03 +00:00
Peter Wilson
5e14c430a3 Build/Test Tools: Prevent 404 errors in the E2E tests.
Modifies the cache control headers tests to prevent 404 errors for each of the tests.

Props costdev.
Fixes #58777.


git-svn-id: https://develop.svn.wordpress.org/trunk@56197 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 03:39:39 +00:00
Jb Audras
d7ddda1bbf Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192], [56193], [56194], [56195].

Props costdev, audrasjb.
See #58459.




git-svn-id: https://develop.svn.wordpress.org/trunk@56196 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 23:19:12 +00:00
Jb Audras
f80f37b320 Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192], [56193], [56194].

Props costdev, audrasjb.
See #58459.




git-svn-id: https://develop.svn.wordpress.org/trunk@56195 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 23:17:05 +00:00
Jb Audras
74d34d0879 Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192], [56193].

Props costdev, audrasjb.
See #58459.




git-svn-id: https://develop.svn.wordpress.org/trunk@56194 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 23:09:16 +00:00
Jb Audras
add61a8d7c Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192].

Props costdev, audrasjb.
See #58459.




git-svn-id: https://develop.svn.wordpress.org/trunk@56193 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 22:58:33 +00:00
Jb Audras
2a66e49e96 Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191].

Props costdev, audrasjb.
See #58459.




git-svn-id: https://develop.svn.wordpress.org/trunk@56192 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 22:46:22 +00:00
Jb Audras
3666c0e31b Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180].

Props costdev, audrasjb.
See #58459.




git-svn-id: https://develop.svn.wordpress.org/trunk@56191 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 22:36:06 +00:00
Jb Audras
a5352c3680 Twenty Twenty-Three: Add a border to Quote block.
This changeset adds a border to the Quote block on front-end, in order to be consistent with the Editor styles.

Props nidhidhandhukiya, poena, akrocks, sabernhardt, nithins53, zoonini.
Fixes #57506.




git-svn-id: https://develop.svn.wordpress.org/trunk@56190 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 22:18:27 +00:00
Joe Dolson
bdc7d56955 Media: Fix responsive views in image editor
Adjust breakpoints for mid-range responsive views to prevent the save panel from overflowing other sections.

Props wildworks, mikinc860, mukesh27, sabernhardt, dhrumilk.
Fixes #58692.

git-svn-id: https://develop.svn.wordpress.org/trunk@56189 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 22:09:21 +00:00
Jb Audras
57ab21fb51 Twenty Seventeen: Use wp_register_script() to register HTML5 Shiv script.
This replaces `wp_register_style()` with `wp_register_script()`.

Props sabernhardt.
Fixes #56699.




git-svn-id: https://develop.svn.wordpress.org/trunk@56188 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 22:02:31 +00:00