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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58725 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58724 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58717 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58715 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58714 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58713 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58712 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58710 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58708 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58705 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58704 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58703 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58689 602fd350-edb4-49c9-b593-d223f7449a82
`wp_parse_str()` expects an array as the second parameter.
Follow-up to [49252].
Props antonvlasenko.
See #61593.
git-svn-id: https://develop.svn.wordpress.org/trunk@58688 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58687 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58686 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58683 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58682 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58681 602fd350-edb4-49c9-b593-d223f7449a82
When WordPress sends out a password-reset or new-user email, it generates
a link for someone to follow in order to take them to the reset page. If
the user login name ends in a period, however, that generated URL will
end in a period and many email clients will confuse it with a
sentence-ending period instead of being part of the query arguments.
In this patch, the generated URL's query argument are rearranged so that
the link will never end in a period. Alternative ideas were explored to
create a new function to escape URL-ending periods, but this patch resolves
the reported problem without raising any further architectural questions.
Developed in https://github.com/WordPress/wordpress-develop/pull/6834
Discussed in https://core.trac.wordpress.org/ticket/42957
Props audrasjb, costdev, daveagp, dmsnell, hellofromTonya, markparnell, mukesh27, nhrrob, obrienlabs, paulcline.
Fixes#42957.
git-svn-id: https://develop.svn.wordpress.org/trunk@58674 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [56082].
See #61573.
git-svn-id: https://develop.svn.wordpress.org/trunk@58673 602fd350-edb4-49c9-b593-d223f7449a82
Updates the performance improvements string with the finalized percentage improvement in the editor and to improve styling and language consistency.
Props ryelle, annezazu, peterwilsoncc.
Fixes#61320.
git-svn-id: https://develop.svn.wordpress.org/trunk@58671 602fd350-edb4-49c9-b593-d223f7449a82
In order to add support for the SELECT and TABLE tags in the HTML Processor, it
needs to implement the HTML algorithm named "reset the insertion mode
appropriately".
This patch implements that algorithm to unblock the additional tag support. The
algorithm resets the parsing mode after specific state changes in complicated
situations where alternative rules are in effect (such as rules governing how
the parser handles tags found within a TABLE element).
Developed in https://github.com/WordPress/wordpress-develop/pull/6020
Discussed in https://core.trac.wordpress.org/ticket/61549
Props dmsnell, jonsurrell.
Fixes#61549.
git-svn-id: https://develop.svn.wordpress.org/trunk@58656 602fd350-edb4-49c9-b593-d223f7449a82
After the changes in [58165] and [58645] and all associated backports, the workflow that dispatches regular testing in older branches needed to be updated.
- The `test-npm.yml` workflow no longer exists.
- The `test-build-processes.yml` has taken the place of `test-npm.yml` in all branches.
Also, the workflow will now run whenever an old version of the reusable PHPUnit workflow is updated (v1 or v2). This is to ensure the changes don’t cause any compatibility problems in older branches.
See #61213.
git-svn-id: https://develop.svn.wordpress.org/trunk@58654 602fd350-edb4-49c9-b593-d223f7449a82
This adds a ` -v3` suffix to the current reusable PHPUnit workflow name. This avoids having to update older branches in the future when the workflow’s logic drastically changes and a `v4` is needed.
See #61213.
git-svn-id: https://develop.svn.wordpress.org/trunk@58645 602fd350-edb4-49c9-b593-d223f7449a82
The table and calendar block font sizes were not as expected on front end within editor. This includes changes for header cells (th), removes redundant font size rules, corrects font-weight and updates figcaption selector along with editing text alignment and adding RTL font selection.
Props nidhidhandhukiya, sabernhardt, sheulyshila, iamfarhan09, bijit027, jannathsyeda, pooja1210, shailu25, hmbashar.
Fixes#58355.
git-svn-id: https://develop.svn.wordpress.org/trunk@58635 602fd350-edb4-49c9-b593-d223f7449a82
The margin specified in this theme caused issues when the gallery was placed in another block. This fix covers both themes as the selector is used within both.
Props pevogam, sabernhardt.
Fixes#58362.
git-svn-id: https://develop.svn.wordpress.org/trunk@58634 602fd350-edb4-49c9-b593-d223f7449a82
The table and calendar block font sizes were not the same on front and in editor. This resolves in using relative line-height.
Props iamfarhan09, bijit027, sabernhardt.
Fixes#58362.
git-svn-id: https://develop.svn.wordpress.org/trunk@58633 602fd350-edb4-49c9-b593-d223f7449a82
As the HTML Processor starts to support other insertion modes outside of
"IN BODY" it needs to be aware of those other modes. This patch
introduces the missing insertion modes in preparation for adding that
support.
Extracted as necessary prep work to the following more complete change:
https://github.com/WordPress/wordpress-develop/pull/6020
Props jonsurrell.
See #61549.
git-svn-id: https://develop.svn.wordpress.org/trunk@58631 602fd350-edb4-49c9-b593-d223f7449a82