Commit Graph

48020 Commits

Author SHA1 Message Date
David Baumwald
d6f72bad6f Post WordPress 6.3 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@56265 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 17:02:33 +00:00
David Baumwald
a0e2ecfa24 WordPress 6.3 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@56264 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 16:44:12 +00:00
Kelly Choyce-Dwan
53a51a046d Help/About: Update the About page for 6.3.
This is the start of the WordPress 6.3 about page, introducing new content and a first pass of the new style.

Props jpantani, dansoschin, annezazu, priethor, marybaum, eidolonnight, clarkeemily, flixos90, cbringmann, meher, richtabor, markoserb, joen, saxonafletcher, jameskoster, davidbaumwald, peterwilsoncc, ryelle.
See #58067.



git-svn-id: https://develop.svn.wordpress.org/trunk@56263 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 16:18:32 +00:00
Bernie Reiter
75caa9c318 Editor: Add test for context setting in Comment Template block.
Test that `commentId` context is correctly set and made available by the Comment Template block to the `render_block_context` filter (at priority 2 and higher), and to the `render_block` filter (important when programmatically inserting child blocks into the Comment Template block).

Furthermore, test that child blocks inserted via the `render_block_data` filter are retained and thus present at `render_block` filter stage.

Props andrewserong, ramonopoly, peterwilsoncc, costdev, mukesh27, flixos90.
Fixes #58839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56262 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 16:07:49 +00:00
Sergey Biryukov
722f73761c Administration: Add a missing closing </span> tag for column sorting indicators.
Includes wrapping a few other long markup lines for better readability.

Follow-up to [55971], [56004], [56260].

See #32170, #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56261 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 14:07:02 +00:00
Sergey Biryukov
eb52f08d4e Coding Standards: Use strict comparison for static strings in wp-admin/includes/class-wp-list-table.php.
Follow-up to [55971], [56004].

See #32170, #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56260 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 14:03:57 +00:00
Jb Audras
b973822085 Help/About: String changes in the Contribute screen.
Follow-up to [56220], [56227], [56233], [56234].

Props costdev.
See #23348.




git-svn-id: https://develop.svn.wordpress.org/trunk@56259 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 10:45:24 +00:00
Jonny Harris
d0b8f4927f Upgrade/Install: Add correct parameters to add_option in upgrade_630
Introduced in [55854], `upgrade_630` function was introduced to update `can_compress_scripts` option to autoload. However the function `add_option` was invoked incorrectly, passing 3 parameters and not 4. The third parameter, which is deprecated, triggers a  deprecated argument warning. In this change, pass 4 parameters instead of 3. 

Props gudmdharalds, spacedmonkey, costdev, mukesh27.
Fixes #58821.

git-svn-id: https://develop.svn.wordpress.org/trunk@56258 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 10:07:05 +00:00
Jb Audras
3df7a53c98 Docs: Various docblocks corrections.
See #57840.




git-svn-id: https://develop.svn.wordpress.org/trunk@56257 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 07:35:16 +00:00
Jb Audras
30071283f5 Docs: Fix various incorrect @since mentions.
Props costdev, mukesh27.
Fixes #58834.
See #57840.




git-svn-id: https://develop.svn.wordpress.org/trunk@56256 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 07:28:47 +00:00
Isabel Brison
9520d9eb69 Editor: update npm packages with second round of bug fixes for 6.3 RC1.
Includes miscellaneous bug fixes for 6.3 RC1.

Props ramonopoly, mukesh27.
Fixes #58804.


git-svn-id: https://develop.svn.wordpress.org/trunk@56255 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 07:17:23 +00:00
Felix Arntz
2b931da110 Editor: Fix bug where it was not possible to style custom block elements in theme.json.
This changeset resolves a bug where WordPress would only allow HTML elements within core's own blocks to be styled in `theme.json`. Prior to this change, any `theme.json` rules applying to elements in custom blocks were ignored. With this fix it is now possible to style third-party block elements in `theme.json`.

Props flixos90, azaozz, costdev, glendaviesnz, spacedmonkey, oandregal.
Fixes #57868.


git-svn-id: https://develop.svn.wordpress.org/trunk@56254 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 00:00:49 +00:00
Jb Audras
2e64ff87b8 Twenty Twenty-Three: Revert [55898].
This changeset reverts [55898] which removed redundant `px` units in a few inline styles, because 1) The values in the block comment and the style 
attribute needs to match ; 2) The block control does not accept unitless values.

Follow-up to [54312], [54629], [55898].

Props TobiasBg, poena, oglekler.
See #58485.




git-svn-id: https://develop.svn.wordpress.org/trunk@56253 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 22:24:39 +00:00
Jb Audras
36e890071e External Libraries: Update deprecated jQuery code in Farbtastic lib.
This changeset updates some deprecated jQuery code in the Farbtastic external library. As this vendor script is not maintained anymore, this changeset 
also adds a docblock to specify that the library has been "adopted" by WP Core.

Props Malae, sabernhardt, SergeyBiryukov, Presskopp, mrinal013, peterwilsoncc, oglekler, jorbin.
Fixes #57946.




git-svn-id: https://develop.svn.wordpress.org/trunk@56252 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 22:01:08 +00:00
Andrew Ozz
d36975aee7 Twenty Twenty-Three: Remove the perPage attribute where the query inherits from the global query. The global attribute should be used instead.
Props: mikachan, onemaggie.
Fixes: #58581.

git-svn-id: https://develop.svn.wordpress.org/trunk@56251 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 21:32:47 +00:00
Andrew Ozz
924df264a0 Media: Stop using and deprecate set_imagick_time_limit(). Seems it causes more problems than it solves.
Follow-up to #52569 and [55404].

Props: dsar, antpb, audrasjb, SergeyBiryukov, hberberoglu, mtxz, densityapps, ekazda, matt_fw, soulseekah, mikeschroder, azaozz.

Fixes: #58202.

git-svn-id: https://develop.svn.wordpress.org/trunk@56250 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 20:02:11 +00:00
Joe McGill
be1cb4583a General: Rename wp_in_development_mode() to wp_is_development_mode().
This changes the function name for the helper function to check whether the current environment is running with the `WP_DEVELOPMENT_MODE` constant set to be more consistent with similar functions in core, like `wp_is_maintenance_mode()` and `wp_is_recover_mode()`.

Props flixos90, swissspidy, costdev, peterwilson, robinwpdeveloper, SergeyBiryukov, joemcgill.
See 57487.


git-svn-id: https://develop.svn.wordpress.org/trunk@56249 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 14:48:48 +00:00
Jb Audras
7df1b8366d Editor: Fix a PHP notice appearing when adding a new template part.
This changeset fixes a PHP notice appearing when a template part is created in the site editor. It also adds a unit test case to cover 
`WP_REST_Templates_Controller::prepare_item_for_database`.

Props wildworks, dunhakdis, Rahmohn, oglekler, audrasjb, mukesh27, costdev, dunhakdis.
Fixes #57851.




git-svn-id: https://develop.svn.wordpress.org/trunk@56248 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 14:20:42 +00:00
K. Adam White
fb9814474e Build Tools: Remove outmoded jsvalidate task from Gruntfile.
grunt-jsvalidate was added to catch situations where minification introduced parsing errors in Internet Explorer.
IE is no longer supported by WordPress, and the grunt task itself has not been maintained for a decade.
Removing this task simplifies the build and avoids false-positive warnings where the outdated tool flags modern JS syntax incorrectly.

Props westonruter, joemcgill, jorbin, youknowriad, desrosj, swissspidy.
Fixes #58645. See #26615.


git-svn-id: https://develop.svn.wordpress.org/trunk@56247 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 14:05:51 +00:00
Joe McGill
967abef19e Script Loader: Improve test coverage for wp_print_scripts().
This is a follow-up to [56092], which further improves PHPUnit test coverage and inline docs for ensuring `async` and `defer` attributes are being properly handled for scripts that are printed without being enqueued.

Props peterwilsoncc, azaozz, westonruter, joemcgill.
See #58648.


git-svn-id: https://develop.svn.wordpress.org/trunk@56246 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 14:04:00 +00:00
Sergey Biryukov
8b5cfe0887 Code Modernization: Use str_contains() in a few more places.
`str_contains()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) contains the given substring (needle).

WordPress core includes a polyfill for `str_contains()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `false !== strpos( ... )` with `str_contains()` in core files, making the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [55988], [55990], [56014], [56021], [56031], [56032], [56065], [56241].

See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56245 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 13:16:14 +00:00
Isabel Brison
2beefda2c0 Editor: trim footnote anchors from post excerpts.
Adds the `excerpt_remove_footnotes` function to trim footnote anchors from post excerpts.

Props: ramonopoly, costdev, mukesh27, mcsf, azaozz.
Fixes #58805.


git-svn-id: https://develop.svn.wordpress.org/trunk@56244 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 01:45:24 +00:00
Joe Dolson
b4b0c03adc Help/About: Fix closing contextual help when scrolled.
Change from `scrollIntoView` to `scrollIntoViewIfNeeded` so scrolling will only fire when it is required. `scrollIntoViewIfNeeded` is a proprietary method that is not standardized and not currently on a track towards standards. However, testing has it working well, including in Firefox, which supposedly does not support it.

Props mikecho, studionashvegas, mai21, piotrek, Heiko_Mamerow, costdev, joedolson.
Fixes #55342.

git-svn-id: https://develop.svn.wordpress.org/trunk@56243 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-16 16:43:07 +00:00
Joe Dolson
9562f40776 Media: Fix admin image editor layout at intermediary widths.
Follow up to [56189], which resolved the initial problem but created new problems with control proximity on wide monitors. Change admin image editor panels to use flex so panels only occupy the space needed.

Props joedolson, sabernhardt, mikinc860.
Fixes #58692.

git-svn-id: https://develop.svn.wordpress.org/trunk@56242 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-16 15:57:14 +00:00
Sergey Biryukov
3349f1a527 Bootstrap/Load: Require wp-includes/compat.php in src/index.php.
This allows for using polyfill functions if `src/index.php` is the entry point (this file exists as a reminder to build the assets, and is different from the actual `index.php` file that gets built and boots WordPress).

Includes:
* Moving the check for the required PHP and MySQL versions earlier.
* Making the load order consistent between `src/index.php`, `wp-load.php`, and `wp-settings.php`.

Follow-up to [46183], [56006], [56007].

Props westonruter, Presskopp, joemcgill, SergeyBiryukov.
See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56241 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-16 12:14:47 +00:00
Joe Dolson
ccce81f0fb Revert package-lock.json changes committed by mistake in [56239]
Props joedolson.
See #58756.

git-svn-id: https://develop.svn.wordpress.org/trunk@56240 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-15 21:50:26 +00:00
Joe Dolson
83d8a63adf Media: Improve layout of image rotation options panel.
Add visual affordance to expanded/collapsed states and move panel under the control rather than placing it next to the toggle, to prevent overflow with the save menu.

Props nithi22, deepakvijayan, antpb, joedolson.
Fixes #58756.

git-svn-id: https://develop.svn.wordpress.org/trunk@56239 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-15 21:40:19 +00:00
Sergey Biryukov
0ef8fa7885 Coding Standards: Use strict comparison in wp-includes/load.php.
Includes minor code layout fixes for better readability.

Follow-up to [6058], [6208], [10217], [12732], [37677].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@56238 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-15 09:02:37 +00:00
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