Commit Graph

49772 Commits

Author SHA1 Message Date
Sergey Biryukov 04358f497d Docs: Fix typo in a comment in `wp.media.view.Attachment.Details.TwoColumn`.
Follow-up to [41351].

Props devansh2002, mukesh27.
Fixes #61658.
Built from https://develop.svn.wordpress.org/trunk@58743


git-svn-id: http://core.svn.wordpress.org/trunk@58145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 11:28:16 +00:00
dmsnell b7b504dc0d Fix phpdoc nullable types in some files.
It was found that in several places in the HTML API and its supporting files,
the wrong form of type annotation was used for optional parameters.

Instead of using `?type`, this patch uses `type|type-of-default-value` instead,
noting where important if the parameter is optional, and if so, what its default
value is.

Developed in https://github.com/WordPress/wordpress-develop/pull/7031
Discussed in https://core.trac.wordpress.org/ticket/61399

Props dmsnell, jonsurrell.
See #61399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 00:53:17 +00:00
dmsnell c0f074c7ce HTML API: Test code improvements in virtual node breadcrumb tests.
Follow-up after feedback to newly-introduced tests,
mostly to enhance the message when the tests fail.

Developed in https://github.com/WordPress/wordpress-develop/pull/7030
Discussed in https://core.trac.wordpress.org/ticket/61646

Follow-up to [58592].

Props dmsnell, jonsurrell.
See #61646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 00:35:14 +00:00
dmsnell 81fc8b3ddc HTML API: Remove leading whitespace after removing class names.
In part of a larger review of CSS semantics and behaviors, this patch
takes the opportunity to remove leading whitespace in an updated class
attribute after the first class in the attribute has been removed.

Previously, if the first class name had been removed, the whitespace
that formerly followed it would remain in the class attribute. This
stood in contrast to removing other class names, which removed their
associated whitespace.

There should be no semantic or functional changes in this patch, only
a slightly-large diff for modified HTML documents that looks prettier
when removing the first class name in a class attribute.

Developed in https://github.com/WordPress/wordpress-develop/pull/6933
Discussed in https://core.trac.wordpress.org/ticket/61531

Props dmsnell, jonsurrell.
See #61531.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 00:12:18 +00:00
hellofromTonya 4007d27204 Tests: Use data provider in Tests_Interactivity_API_wpInteractivityAPIFunctions.
Refactors the following tests to use a data provider with named test cases:
* `test_wp_interactivity_data_wp_context_with_different_arrays()`
* `test_wp_interactivity_data_wp_context_with_different_arrays_and_a_namespace()`
* `test_wp_interactivity_data_wp_context_with_json_flags()`

This is better as:
1. One failing test will not block the other tests from running.
2. Each test is now referenced by name in any error message, making it more straight forward to see which test failed.
3. The test no longer contains multiple assertions.
3. It makes it more straight forward to add additional tests.

Follow-up to [58594], [58234], [57762], [57743], [57742], [57563].

Props jrf.
See #61530.
Built from https://develop.svn.wordpress.org/trunk@58739


git-svn-id: http://core.svn.wordpress.org/trunk@58141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 18:39:12 +00:00
hellofromTonya 4c2edeb04a Tests: Don't declare nested named function in Tests_Interactivity_API_wpInteractivityAPIFunctions.
Once the `test_process_directives_when_block_is_filtered()` method has run, the named `test_render_block_data()` function declared nested within becomes part of the global namespace, which could cause problems for other tests.

Quite apart from the fact that the name starting with `test_`  is confusing (as methods prefixed with `test_` are supposed to be test methods to be run by PHPUnit).

Using a closure for this callback fixes the issue. Declared as `static` for a micro-optimization.

Follow-up to [57826].

Props jrf, hellofromTonya.
See #61530.
Built from https://develop.svn.wordpress.org/trunk@58738


git-svn-id: http://core.svn.wordpress.org/trunk@58140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 18:22:18 +00:00
dmsnell db0e0abe14 HTML API: Add tests confirming comment behavior in HTML Processor.
There was a bug-fix late in the 6.6 cycle in the HTML Processor which
resolved an issue with the wrong name being reported when paused at
processing-instruction look-alike invalid comments, but no tests were
added to enforce the correct behaviors.

This patch adds the missing tests.

Developed in https://github.com/WordPress/wordpress-develop/pull/6765
Discussed in https://core.trac.wordpress.org/ticket/61530

Follow-up to [58304], [58558].

Props dmsnell, jonsurrell.
See #61530.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 16:02:11 +00:00
hellofromTonya acdd4a5cbb HTML API: Fix "${var} in strings" deprecation notice in html5lib test.
Changeset [58712] introduced the following compile time PHP deprecation notice on >= PHP 8.2 test runs:

{{{
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php on line 257
PHPUnit 9.6.20 by Sebastian Bergmann and contributors.
}}}

The `${` syntax for string interpolation was deprecated in PHP 8.2 and should not be used anymore.

Ref: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation

Follow-up to [58712].

Props jrf.
See #61530, #59654, #61576.
Built from https://develop.svn.wordpress.org/trunk@58733


git-svn-id: http://core.svn.wordpress.org/trunk@58135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 14:35:16 +00:00
Tammie Lister b079b72a24 Multiple themes: Comments Reply heading and Cancel reply link did not have spacing.
This brings spacing in that was missing for both Twenty Seventeen and also Twenty Nineteen. It was missing between the words.

Props pitamdey, sabernhardt, nidhidhandhukiya, poena.
Fixes #59334.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 13:22:15 +00:00
Tammie Lister 112eb192f1 Multiple themes: Verse block font family different on front.
The font family was not showing correctly for the verse block. The approach taken was to match the front end and this involved also removing the styles in [50358].

Props pranitdugad, sabernhardt, poena, pitamdey.
Fixes #61140.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 10:04:13 +00:00
Tammie Lister 6f694a5983 Twenty Fifteen: Fixes code block family being different in iframe editor.
The font family was not being included for the code block. This adds Inconsolata to the code block within the editor styles.

Props pranitdugad, sabernhardt.
Fixes #61571.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 09:50:10 +00:00
Bernhard Reiter c89fb9823f Interactivity API: Use Script Modules filter for store & config data.
A dedicated API exists for passing data to Script Modules implemented in changeset [58579].
Use this Core API instead of a custom implementation for Interactivity API to pass data to the client.

Developed in https://github.com/WordPress/wordpress-develop/pull/6683.

Props jonsurrell, gziolo, luisherranz, cbravobernal.
Fixes #61512.
Built from https://develop.svn.wordpress.org/trunk@58729


git-svn-id: http://core.svn.wordpress.org/trunk@58131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 09:44:14 +00:00
Tammie Lister 9d3bf29704 Twenty Sixteen: Fixes quote block border not changing color.
The border was not changing color when it was changed. This brings that in. It is worth noting the original theme design did not have this but as noted in the ticket this has been in the quote block for about two years so matching the current block styling in this case makes sense.

Props umesh84, desrosj, sabernhardt.
Fixes #56565.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 09:39:17 +00:00
Tammie Lister a8517c8293 Twenty Twenty-Two: Fixes search block not showing selected border on bottom.
The border was not showing on search block. This brings in a resolution for that removing the none from border property.

Props viralsampat, poena, sabernhardt.
Fixes #60669.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-15 19:55:13 +00:00
Tammie Lister 98ef1859bd Twenty Twenty-One: Fixes alignment of site title and navigation links.
There was a text alignment issue not centering on all screen sizes. This fixes that and centers vertically.

Props vijaysinh9094, poena, sabernhardt.
Fixes #61633.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-15 19:45:17 +00:00
Tammie Lister 31b1f8dfa4 Twenty Sixteen: Fixes button block letter spacing control.
The button block had issues with font styling not applying. This not only brings letter-spacing but also line-height, text-transform and font-weight to wp-button-block-buttons. [57300] fixed the separator issue. This fix also added box-shadow none for consistency.

Props darshitrajyaguru97, harshgajipara, shailu25, sabernhardt, alvitazwar052.
Fixes #58609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-15 18:12:12 +00:00
Tammie Lister 84510fb69b Twenty Fifteen: Fixes pullquote issues with text color and border
Pullquote was not showing the color changes. This uses inherit to do that. It also removes the changes from [58368] as this method is preferred.

Props viralsampat, poena, sabernhardt.
Fixes #59801.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-15 16:58:15 +00:00
ellatrix 2f9ff5ebe6 Editor: Update packages for 6.6 RC 4.
This package update includes only one revert PR:

https://github.com/WordPress/gutenberg/pull/63412

You can confirm the changes in this package update here:

https://github.com/WordPress/gutenberg/commits/wp/6.6/

Fixes #61654.

Props santosguillamot.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-15 14:17:17 +00:00
davidbaumwald 5d4375f46f Bundled Themes: Bump default theme versions for release with 6.6.
This updates the version of each default theme to the following versions:
- Twenty Ten: 4.2
- Twenty Eleven: 4.7
- Twenty Twelve: 4.3
- Twenty Thirteen: 4.2
- Twenty Fourteen: 4.0
- Twenty Fifteen: 3.8
- Twenty Sixteen: 3.3
- Twenty Seventeen: 3.7
- Twenty Nineteen: 2.9
- Twenty Twenty: 2.7
- Twenty Twenty-One: 2.3
- Twenty Twenty-Two: 1.8
- Twenty Twenty-Three: 1.5
- Twenty Twenty-Four: 1.2

These versions will released in coordination with WordPress 6.6.

Props sabernhardt, shail-mehta, rudlinkon.
Fixes #60701.
Built from https://develop.svn.wordpress.org/trunk@58718


git-svn-id: http://core.svn.wordpress.org/trunk@58120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-15 13:59:16 +00:00
Sergey Biryukov 16b7936d9f Docs: Correct documentation for `_wp_preview_meta_filter()`.
The `$single` parameter is passed via the `get_post_metadata` filter and has no default value.

Includes minor code layout fixes for consistency with the formatting of other long conditionals in core.

Follow-up to [56714].

Props rodrigosprimo.
Fixes #61645.
Built from https://develop.svn.wordpress.org/trunk@58717


git-svn-id: http://core.svn.wordpress.org/trunk@58119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-15 01:59:16 +00:00
Sergey Biryukov f091afc696 Site Health: Correctly display auto-update status for parent theme.
Follow-up to [47835], [48731].

Props apermo.
Fixes #61649. See #61648.
Built from https://develop.svn.wordpress.org/trunk@58716


git-svn-id: http://core.svn.wordpress.org/trunk@58118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-14 03:47:16 +00:00
Sergey Biryukov 667521c97f Filesystem API: Add a return value for `wp_delete_file()`.
This addresses a discrepancy where using `unlink()` allows for checking if it was successful via the return value, but `wp_delete_file()` did not have a return value, making it impossible to verify the result without doing overhead checks if the file still exists.

This also brings more consistency with the other `wp_delete_*()` functions, specifically:

* `wp_delete_file_from_directory()`
* `wp_delete_post()`
* `wp_delete_post_revision()`
* `wp_delete_attachment()`
* `wp_delete_attachment_files()`
* `wp_delete_comment()`
* `wp_delete_nav_menu()`
* `wp_delete_term()`
* `wp_delete_site()`
* `wp_delete_user()`

Includes adding basic unit tests for `wp_delete_file()`.

Follow-up to [31575].

Props bedas, debarghyabanerjee, mukesh27, SergeyBiryukov.
Fixes #61590.
Built from https://develop.svn.wordpress.org/trunk@58715


git-svn-id: http://core.svn.wordpress.org/trunk@58117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-13 05:03:16 +00:00
dmsnell 4f85cc258c HTML API: Add context to Unsupported_Exception class for improved debugging.
The HTML Processor internally throws an exception when it reaches HTML
that it knows it cannot process, but this exception is not made
available to calling code. It can be useful to extract more knowledge
about why it gave up, especially for debugging purposes.

In this patch, more context is added to the WP_HTML_Unsupported_Exception
and the last exception is made available to calling code through a new
method, `get_unsupported_exception()`.

Developed in https://github.com/WordPress/wordpress-develop/pull/6985
Discussed in https://core.trac.wordpress.org/ticket/61646

Props bernhard-reiter, dmsnell, jonsurrell.
See #61646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-12 22:29:13 +00:00
dmsnell 519a8f6bbd HTML API: Simplify breadcrumb accounting.
Since the HTML Processor started visiting all nodes in a document, both
real and virtual, the breadcrumb accounting became a bit complicated
and it's not entirely clear that it is fully reliable.

In this patch the breadcrumbs are rebuilt separately from the stack of
open elements in order to eliminate the problem of the stateful stack
interactions and the post-hoc event queue.

Breadcrumbs are greatly simplified as a result, and more verifiably
correct, in this construction.

Developed in https://github.com/WordPress/wordpress-develop/pull/6981
Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58590].

Props bernhard-reiter, dmsnell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-12 22:20:15 +00:00
dmsnell befa5f9c92 HTML API: Join successive text nodes in html5lib test representation.
Many tests from the html5lib test suite fail because of differences in
text handling between a DOM API and the HTML API, even though the
semantics of the parse are equivalent. For example, it's possible in
the HTML API to read multiple successive text nodes when the tokens
between them are ignored.

The test suite didn't account for this and so was failing tests. This
patch improves the construction of the representation to compare
against the test suite so that those tests don't fail inaccurately.

Developed in https://github.com/WordPress/wordpress-develop/pull/6984
Discussed in https://core.trac.wordpress.org/ticket/61576

Props bernhard-reiter, dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-12 22:00:14 +00:00
Joe McGill 897ec27a81 Editor: Revert caching of global styles for blocks.
This reverts [58334] to fix a bug where edits to block styles made in the site editor were not showing in the front end.

Props joemcgill, spacedmonkey, andrewserong, hellofromtonya, audrasjb.
See #59595.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-12 19:26:14 +00:00
Sergey Biryukov 1287cb6181 KSES: Add `opacity` to the list of safe CSS properties.
Original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/59891 #59891 Update overlay step function in cover block]

Reference: [https://developer.mozilla.org/en-US/docs/Web/CSS/opacity MDN Web Docs: opacity].

Props sunil25393, wildworks, poena, Mamaduka, presstoke.
Fixes #61536.
Built from https://develop.svn.wordpress.org/trunk@58709


git-svn-id: http://core.svn.wordpress.org/trunk@58111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-12 03:36:15 +00:00
isabel_brison 981871c922 Editor: remove Group inner container from Grid variation in classic themes.
Updates the logic in the layout filter that replaces the Group block inner container in classic themes to exclude the Grid variation.

Props isabel_brison, aaronrobertshaw, andrewserong.
See #61635.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-12 01:34:15 +00:00
hellofromTonya 80784d8b9d Docs: Fix multi-line inline comments in WP_REST_Templates_Controller.
Converts single inline comment formatting into multi-line inline comment formatting, per the coding standards.

Ref: https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments

Follow-up to [58303], [57366].

See #61608.
Built from https://develop.svn.wordpress.org/trunk@58707


git-svn-id: http://core.svn.wordpress.org/trunk@58109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-11 13:40:15 +00:00
Sergey Biryukov 99effa2d51 Docs: Fix typos in various REST API DocBlocks and comments.
Follow-up to [34928], [43739], [46422], [50717], [51973], [54528].

Props antonvlasenko.
Fixes #61593.
Built from https://develop.svn.wordpress.org/trunk@58706


git-svn-id: http://core.svn.wordpress.org/trunk@58108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-11 06:24:17 +00:00
hellofromTonya 70c9c49f9b REST API: Ensure string returned in WP_REST_Templates_Controller::get_wp_templates_author_text_field().
Adds a fail-safe to return an empty string should the `switch` ever fall through without returning.

Currently, `WP_REST_Templates_Controller::get_wp_templates_author_text_field()` is tightly coupled to `WP_REST_Templates_Controller::get_wp_templates_original_source_field()`. However, if the `$original_source` values change in either method, but not both, it is possible a `void` or `null` will be returned, rather than a `string`.

Follow-up to [57366].

Props antonvlasenko, hellofromTonya, debarghyabanerjee.
Fixes #61580.
Built from https://develop.svn.wordpress.org/trunk@58705


git-svn-id: http://core.svn.wordpress.org/trunk@58107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-10 21:25:11 +00:00
Sergey Biryukov a5efdd1cc9 Docs: Correct `@return` values for a few REST API class methods.
Includes listing the expected type first, instead of `WP_Error`.

Follow-up to [39031], [39033], [46696], [49927], [49929], [50993], [51286], [51973], [52079], [52286], [53152], [56415].

Props antonvlasenko.
See #61593.
Built from https://develop.svn.wordpress.org/trunk@58704


git-svn-id: http://core.svn.wordpress.org/trunk@58106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-10 11:12:16 +00:00
isabel_brison ccc46f8ada Editor: enqueue block custom CSS only when block renders on the page.
Updates the global styles custom CSS handling logic to be consistent with other global styles and take advantage of conditional enqueuing of block styles.

Props isabel_brison, aaronrobertshaw, andrewserong.
Fixes #61395.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-10 06:19:17 +00:00
dmsnell 85092d6493 HTML API: Correct node name in `generate_implied_end_tags()`.
The `generate_implied_end_tags()` algorithm has been comparing the
current node to a list of node names, which means that it won't ever
pop any elements from the stack of open elements.

This patch corrects the mistake by comparing node name against the
list, thus fixing the algorithm. This was noted in development work
for the 6.7 release.

Developed in https://github.com/WordPress/wordpress-develop/pull/6988
Discussed in https://core.trac.wordpress.org/ticket/61576

Props dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-09 21:45:17 +00:00
Sergey Biryukov ad3c5a4946 REST API: Remove a few unused variables in `foreach` loops.
Follow-up to [38832], [48173], [49132], [49925].

Props antonvlasenko.
See #61593.
Built from https://develop.svn.wordpress.org/trunk@58694


git-svn-id: http://core.svn.wordpress.org/trunk@58096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-09 13:53:16 +00:00
ellatrix 6d7e0b6a60 Editor: Update packages for 6.6 RC 3.
Fixes #61603.
Fixes https://github.com/WordPress/wordpress-develop/pull/6998.
See https://make.wordpress.org/core/handbook/about/release-cycle/block-editor-release-process-for-major-releases/#package-updates-and-core-patches.

Props ellatrix, youknowriad.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-09 13:45:25 +00:00
ellatrix c56593dfe1 Section Styles: Fix ref values within block style variations.
Fixes #61589.
Fixes https://github.com/WordPress/wordpress-develop/pull/6989.
See https://github.com/WordPress/gutenberg/pull/63172.

Props aaronrobertshaw, andrewserong, ramonopoly.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-09 10:24:19 +00:00
ellatrix 5e060bc838 Section Styles: Prevent flash of variation style updates.
This is fixed by preloading the styles.

Fixes #61589.
Fixes https://github.com/WordPress/wordpress-develop/pull/6989.
See https://github.com/WordPress/gutenberg/pull/63172.

Props aaronrobertshaw, andrewserong, ramonopoly.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-09 10:02:21 +00:00
Tammie Lister bb14ea362e Twenty Sixteen: Fixes pullquote issues with border spacing.
Pullquote spacings wasn't reflected on front when using border settings. This caused double borders which was due to styling but this was done before optional borders were implemented. The pull request chosen presumes when you have an external border you no longer want the internal one but does look visually better. 

Props nidhidhandhukiya, huzaifaalmesbah, poena, sabernhardt.
Fixes #59754.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-08 15:44:16 +00:00
Sergey Biryukov 1d9524c836 REST API: Correct variable type in `WP_Rest_Server::serve_batch_request_v1()`.
`wp_parse_str()` expects an array as the second parameter.

Follow-up to [49252].

Props antonvlasenko.
See #61593.
Built from https://develop.svn.wordpress.org/trunk@58688


git-svn-id: http://core.svn.wordpress.org/trunk@58090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-08 13:25:18 +00:00
Tammie Lister 54b2903296 Twenty Seventeen: Fixes front page panels allow pages of any status to be shown.
If you have a published page set to a section but also private, draft, pending or trash at some point in the future it was still showing on the homepage. There was no clarity to the user what was happening. This adds in a check to the post_status variable before displaying panel content and adjusts the customizer to show a placeholder if the page is draft,trashed,deleted. 

Props brettshumaker, sabernhardt.
Fixes #46604.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-08 10:45:18 +00:00
Tammie Lister 7414d12f0d Twenty Fourteen: Updates styles for Table block and figure captions.
There were multiple discrepancies between the editor and front end with [58399] matched incorrect border color due to specificity. This resolves that and also includes issues not caught in [60293]. The full list of what this does is in ticket but a summary is reduces specificity for table cell border, removes border color rules, replaces selectors and adds wrapper so alignment changes within the iframe.

Props sabernhardt.
Fixes #61563.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-08 08:31:13 +00:00
isabel_brison eaada5a23c Editor: fix root padding for alignwide blocks.
Updates the root padding CSS selectors so wide width container blocks with constrained layout don’t receive padding.

Props isabel_brison, mukesh27, aaronrobertshaw.
Fixes #61587.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-08 06:41:14 +00:00
Sergey Biryukov 61c8c315a9 Code Modernization: Replace `substr( PHP_OS, 0, 3 )` calls with `PHP_OS_FAMILY`.
The `PHP_OS_FAMILY` constant indicates the operating system family PHP was built for, and is available as of PHP 7.2.0.

Reference: [https://www.php.net/manual/en/reserved.constants.php#constant.php-os-family PHP Manual: Predefined Constants: PHP_OS_FAMILY].

Follow-up to [23255], [57753], [57985], [58678].

Props ayeshrajans, jrf.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58684


git-svn-id: http://core.svn.wordpress.org/trunk@58086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-07 12:44:16 +00:00
Sergey Biryukov 82ef77948a Code Modernization: Simplify a conditional in `wp_is_ini_value_changeable()`.
This commit reverts the code to the code from before the bug fix related to PHP 5.2.6–5.2.17.

As support for PHP 5.2 has been dropped, the workaround for the PHP 5.2 bug is no longer needed.

Follow-up to [38015], [38017], [44950], [45058], [57985], [58678], [58682].

Props jrf, ayeshrajans.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58683


git-svn-id: http://core.svn.wordpress.org/trunk@58085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-06 15:07:08 +00:00
Sergey Biryukov 11fb201256 Code Modernization: Remove obsolete comments about older PHP versions.
This commit:
* Removes various comments referencing PHP versions which are no longer supported.
* Removes various comments containing “hints” of things to do after a particular PHP version drop. These hints are incorrect/not actionable for various reasons, so have no value:
 * Even though a function could be turned into a closure, removing the function would be a backward compatibility break which is not acceptable, so this suggestion is not actionable.
 * Short ternaries are forbidden by the coding standard exactly to prevent the faulty code suggested in the comment from getting into the codebase.

Follow-up to [1243/tests], [6543], [11816], [29861], [29864], [34928], [35369], [36698], [38694], [50786], [58678].

Props jrf, ayeshrajans.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58682


git-svn-id: http://core.svn.wordpress.org/trunk@58084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-06 14:54:16 +00:00
dmsnell bccb3e46e1 HTML API: Respect `tag_name` query arg in `HTML_Processor::next_tag()`
Previously the HTML Processor was ignoring the `tag_name` argument in
the `next_tag()` query if it existed. This was wrong adn would lead to
calling code finding the very next tag, regardless of tag name, instead
of the requested taag.

This patch adds the tag name detection code into `next_tag()` to fix
the bug and ensure that `next_tag()` always returns only when finding
a tag of the given name.

Developed in https://github.com/WordPress/wordpress-develop/pull/6980
Discussed in https://core.trac.wordpress.org/ticket/61581

Follow-up to [56274].

Fixes #61581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-06 10:20:15 +00:00
dmsnell 2bcd388bf9 HTML API: Fix wrong @since tag.
When the remaining insertion modes were stubbed in the HTML Processor,
a `@since` tag was mistakenly copied with 6.4.0 instead of 6.7.0.

This patch fixes the invalid tag.

Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58679].

Props tobiasbg.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-05 22:23:14 +00:00
dmsnell e1c3eab4ce HTML API: Stub out remaining insertion modes in the HTML Processor.
As part of work to add more spec support to the HTML API, this patch adds
stubs for all of the remaining parser insertion modes in the HTML Processor.
These modes are not all supported yet, but they will be necessary to continue
adding support for other tags and markup.

Developed in https://github.com/WordPress/wordpress-develop/pull/6973
Discussed in https://core.trac.wordpress.org/ticket/61576

Props dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-05 16:39:17 +00:00
Sergey Biryukov 6ff382af63 Code Modernization: Remove obsolete code targeting PHP < 7.2.24.
Follow-up to [44488], [45262], [53426], [57985].

Props ayeshrajans, jrf.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58678


git-svn-id: http://core.svn.wordpress.org/trunk@58080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-05 10:12:16 +00:00