This changeset fixes an issue where the `.privacy-policy` styles were applied to other locations than the footer only, like the `privacy-policy` page itself.
Props mnydigital, sabernhardt, huzaifaalmesbah, shailu25, poena.
Fixes#60469.
git-svn-id: https://develop.svn.wordpress.org/trunk@57589 602fd350-edb4-49c9-b593-d223f7449a82
This changeset updates some text labels in `footer.php` to make them translatable.
Props wildworks, sabernhardt, poena, onemaggie, luminuu, mukesh27.
Fixes#60298.
git-svn-id: https://develop.svn.wordpress.org/trunk@57588 602fd350-edb4-49c9-b593-d223f7449a82
On the front end, this changeset restores the theme's default border color when (and only when) the block's text color is the default.
In the editor, these styles repurpose the user-selected color for the border, to match the front.
Props nidhidhandhukiya, sabernhardt, pooja1210, pouicpouic, poena, shailu25, ugyensupport, wasiur195, rajinsharwar, wasiur195, jivygraphics, huzaifaalmesbah, harshgajipara, nicolefurlan, sumitbagthariya16.
Fixes#58022.
git-svn-id: https://develop.svn.wordpress.org/trunk@57587 602fd350-edb4-49c9-b593-d223f7449a82
Storing the data in a non-autoloaded rather than a transient ensures it cannot be accidentally removed due to a cache flush.
Props: kkmuffme, mukesh27.
Fixes#59433.
git-svn-id: https://develop.svn.wordpress.org/trunk@57586 602fd350-edb4-49c9-b593-d223f7449a82
Updates the pattern block's overrides attribute data structure and renames it to content.
This new format should prove more flexible for the future.
Props talldanwp, gziolo.
Fixes#60456.
git-svn-id: https://develop.svn.wordpress.org/trunk@57585 602fd350-edb4-49c9-b593-d223f7449a82
The WP_HTML_Processor::has_bookmark() method has not correctly reported bookmarks
which have been set, because it wraps the given bookmark names when setting them.
Additionally, WP_HTML_Processor::seek() does not seek to correct location if HTML
has been updated because it wasn't flushing enqueued updates to the document.
In this patch both problems are resolved and added tests guard these behaviors
against future regressions.
Developed in https://github.com/WordPress/wordpress-develop/pull/6039
Discussed in https://core.trac.wordpress.org/ticket/60474
Follow-up to [56274].
Props dmsnell, jonsurrell.
Fixes#60474.
git-svn-id: https://develop.svn.wordpress.org/trunk@57582 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that there is some spacing between the Cover and File blocks.
Props mukesh27, mayur8991, panchalhimani711, sabernhardt, itpathsolutions, thakordarshil, ankit-k-gupta, ugyensupport, pooja1210, shailu25, harshgajipara, darshitrajyaguru97, poena.
Fixes#58498.
git-svn-id: https://develop.svn.wordpress.org/trunk@57581 602fd350-edb4-49c9-b593-d223f7449a82
Pre-fill category fields in the Quick/Bulk Edit form with their current status.
When bulk editing, if only some of the selected items are in a given category, the category's checkbox will display a line to indicate an indeterminate status.
Originally committed in [56172], but reverted due to a bug that removed all categories. Updated commit fixes the bug, adds unit tests, and improves the accessibility of the indeterminate state checkboxes.
Props pavelevap, scribu, chasedsiedu, helen, joshcanhelp, ubernaut, Cyberchicken, laumindproductscomau, SergeyBiryukov, Marcoevich, tomybyte, thinkluke, virtality-marketing-solutions, Michalooki, dmsnell, itecrs, pannelars, WHSajid, samba45, Mte90, johnbillion, tomluckies, soulseekah, francina, oglekler, ajmcfadyen, mukesh27, costdev, hellofromTonya, peterwilsoncc, joedolson, pbiron, oglekler, webcommsat, jorbin, ajmcfadyen, huzaifaalmesbah.
Fixes#11302.
git-svn-id: https://develop.svn.wordpress.org/trunk@57580 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that avatars design in the Post Author or Avatar blocks in the editor matches the front end.
Props pitamdey, shailu25, poena, sabernhardt, balub, sarath.ar, nicolefurlan, harshgajipara, pooja1210.
Fixes#59285.
git-svn-id: https://develop.svn.wordpress.org/trunk@57579 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that avatars design in the Post Author or Avatar blocks in the editor matches the front end.
Props pitamdey, sabernhardt, poena, shailu25.
Fixes#59253.
git-svn-id: https://develop.svn.wordpress.org/trunk@57577 602fd350-edb4-49c9-b593-d223f7449a82
Add block bindings support for the linkTarget and rel button block attributes.
This allows using custom fiends or pattern overrides for these attributes.
Props glendaviesnz.
Fixes#60481.
git-svn-id: https://develop.svn.wordpress.org/trunk@57576 602fd350-edb4-49c9-b593-d223f7449a82
Refactors the processing of block bindings into steps:
- Gets the value for each "bound" attribute from the respective source.
- Returns the computer attributes with values from the sources.
- The computed attributes get injected into block's content.
- The `render_callback` gets the updated list of attributes and processeded block content.
Fixes#60282.
Props czapla, gziolo, andraganescu, santosguillamot.
git-svn-id: https://develop.svn.wordpress.org/trunk@57574 602fd350-edb4-49c9-b593-d223f7449a82
Adds missing features to the list for the `$feature` parameter in `add_theme_support()`.
Props up1512001, mukesh27, swissspidy, isabel_brison.
Fixes#60221.
git-svn-id: https://develop.svn.wordpress.org/trunk@57573 602fd350-edb4-49c9-b593-d223f7449a82
Replace the `table` element used to present color palette selection in the user profile screen with generic elements. The extra semantics of a table are at best unhelpful and have some potential to great extraneous verbosity for screen readers.
Props sabernhardt, desrosj.
Fixes#53157.
git-svn-id: https://develop.svn.wordpress.org/trunk@57572 602fd350-edb4-49c9-b593-d223f7449a82
If a plugin also registers the category name `pages` in an `init` hook that runs after the theme's, it can override the label and description unintentionally.
With a prefix, extenders can still override it, but it would be intentional.
Props poena, swissspidy, shailu25.
Fixes#59839.
git-svn-id: https://develop.svn.wordpress.org/trunk@57569 602fd350-edb4-49c9-b593-d223f7449a82
Replaces the alias `join()` with its canonical `implode()`.
Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.
Follow-up to [57539], [49193].
Props davidbinda.
Fixes#60473.
git-svn-id: https://develop.svn.wordpress.org/trunk@57567 602fd350-edb4-49c9-b593-d223f7449a82
Syncing changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/57437.
Scripts and styles can be registered for blocks via `block.json` metadata. There is now a Modules API, but was no way to register or associate module assets with blocks via `block.json`.
Fixes#60233.
Props jonsurrell, gziolo, cbravobernal, luisherranz, youknowriad.
git-svn-id: https://develop.svn.wordpress.org/trunk@57565 602fd350-edb4-49c9-b593-d223f7449a82
It is no longer a hard requirement that a *.asset.php file is present to register a script for block.
Fixes#57234.
Props joefusco, gziolo, spacedmonkey, colorful-tones.
git-svn-id: https://develop.svn.wordpress.org/trunk@57559 602fd350-edb4-49c9-b593-d223f7449a82
By default, users will see a tab in the editor indicating the possibility
to active Google Fonts and install Fonts from there.
Props youknowriad, get_dave, mcsf.
Fixes#59166.
git-svn-id: https://develop.svn.wordpress.org/trunk@57558 602fd350-edb4-49c9-b593-d223f7449a82
Fixing a few translators comments that have incorrect placeholders reference or unnecessary ones.
Props get_dave, mukesh27, afercia.
Fixes#60412.
git-svn-id: https://develop.svn.wordpress.org/trunk@57557 602fd350-edb4-49c9-b593-d223f7449a82
Fixes a bug in the editor where the offset values are displayed as decimals rather than minutes.
Props afercia, get_dave.
Fixes#60105.
git-svn-id: https://develop.svn.wordpress.org/trunk@57556 602fd350-edb4-49c9-b593-d223f7449a82
If a plugin also registers the category name `page` in an `init` hook that runs after the theme's, it can override the label and description unintentionally.
With a prefix, extenders can still override it, but it would be intentional.
Props shailu25, poena, acosmin, harshgajipara, swissspidy.
See #59839.
git-svn-id: https://develop.svn.wordpress.org/trunk@57555 602fd350-edb4-49c9-b593-d223f7449a82
Set a global focus outline for block elements in Twenty Twenty-Four to enhance accessibility. Replace the 1px dotted outline previously assigned on the button block.
Props alh0319, poena, beafialho, shailu25.
Fixes#60334.
git-svn-id: https://develop.svn.wordpress.org/trunk@57554 602fd350-edb4-49c9-b593-d223f7449a82
Apply new focus styles from WordPress 5.3 more broadly. An updated focus style for form inputs, buttons, and link styled as buttons was added in WordPress 5.3; this commit makes other focus styles consistent with those changes so they meet accessibility standards for color contrast.
Props johnbillion, kebbet, joedolson, afercia.
Fixes#51870.
git-svn-id: https://develop.svn.wordpress.org/trunk@57553 602fd350-edb4-49c9-b593-d223f7449a82
The context argument passed to the hooked_block_types filter can also be a Post object
in the case of the navigation block.
This adapts the PHPDoc accordingly.
Props bernhard-reiter, gziolo.
See #59743.
git-svn-id: https://develop.svn.wordpress.org/trunk@57550 602fd350-edb4-49c9-b593-d223f7449a82
This commits add three endpoints to retrieve and manipulate fonts in WordPress.
This commit also means that we now have a fully functional Font Library in the site editor.
Props get_dave, youknowriad, mmaattiiaass, grantmkin, swissspidy, mcsf, jorbin, ocean90.
See #59166.
git-svn-id: https://develop.svn.wordpress.org/trunk@57548 602fd350-edb4-49c9-b593-d223f7449a82
These changes fix the generation of selectors for block style variations. Previously, an incorrect CSS selector could be generated if the block's base selector used an element tag etc.
Props aaronrobertshaw, youknowriad, mukesh27.
Fixes#60453.
git-svn-id: https://develop.svn.wordpress.org/trunk@57547 602fd350-edb4-49c9-b593-d223f7449a82
Changes the output of core block global styles when `should_load_separate_core_block_assets` is true so they are appended to base global styles instead of block-library styles.
Props isabel_brison, oandregal, azaozz, ajlende.
Fixes#60280.
git-svn-id: https://develop.svn.wordpress.org/trunk@57546 602fd350-edb4-49c9-b593-d223f7449a82
Introduces a new "Requires Plugins" plugin header so that plugin developers can list the slugs of the plugins theirs depends on.
This will inform users of the requirements, and provide links to the WordPress.org Plugins Repository that they can click to install and activate the dependencies first.
Plugins whose requirements are not met cannot be installed or activated, and they will be deactivated automatically if their requirements become unmet.
Plugins that others rely on cannot be deactivated or deleted until their dependent plugins are deactivated or deleted.
In memory of Alex Mills and Alex King.
WordPress Remembers.
Props ahoereth, afragen, alanfuller, alexkingorg, amykamala, anonymized_10690803, apeatling, ashfame, atimmer, audrasjb, aristath, azaozz, batmoo, beaulebens, blobaugh, bobbingwide, boonebgorges, brianhenryie, chanthaboune, chrisdavidmiles, coolmann, costdev, courane01, danielbachhuber, davidperez, dd32, Denis-de-Bernardy, dingo_d, DJPaul, dougal, DrewAPicture, ethitter, filosofo, georgestephanis, giuseppemazzapica-1, goldenapples, griffinjt, hellofromTonya, husobj, ideag, jarednova, jbobich, jbrinley, jltallon, joedolson, johnciacia, johnjamesjacoby, joppuyo, jsmoriss, karmatosed, kebbet, knutsp, kraftbj, kraftner, kurtpayne, lkraav, logikal16, luisherranz, man4toman, markjaquith, matt, mbijon, megphillips91, mikeschinkel, mordauk, morehawes, mrwweb, mte90, mukesh27, mzaweb, nacin, norcross, nvwd, nwjames, obliviousharmony, ocean90, oglekler, paaljoachim, pauldewouters, pbaylies, pbiron, peterwilsoncc, Philipp15b, poena, pogidude, retlehs, rmccue, ryan, sabreuse, sc0ttkclark, scribu, sereedmedia, SergeyBiryukov, ShaneF, shidouhikari, soean, spacedmonkey, stephenh1988, swissspidy, taylorde, tazotodua, threadi, TimothyBlynJacobs, TJNowell, tollmanz, toscho, tropicalista, Viper007Bond, westi, whiteshadow, williamsba1, wpsmith, ZaneMatthew.
Fixes#22316.
git-svn-id: https://develop.svn.wordpress.org/trunk@57545 602fd350-edb4-49c9-b593-d223f7449a82
Block themes and classic themes with template parts support
can already access the patterns list within the site editor.
This adds a "Patterns" menu item under Appearance for classic themes
without template parts support.
Props wildworks, kevin940726, aaronrobertshaw, fabiankaegy, swissspidy, get_dave, kebbet.
Fixes#58827.
git-svn-id: https://develop.svn.wordpress.org/trunk@57543 602fd350-edb4-49c9-b593-d223f7449a82
A fix was introduced to the Tag Processor to ensure that contiguous text
in an HTML document emerges as a single text node spanning the full
sequence. Unfortunately, that patch was marginally over-zealous in
checking if a "<" started a syntax token or not. It used the following:
{{{
<?php
if ( 'A' <= $c && 'z' >= $c ) { ... }
}}}
This was based on the assumption that the A-Z and a-z letters are
contiguous in the ASCII range; they aren't, and there's a gap of
several characters in between. The result of this is that in some
cases the parser created a text boundary when it didn't need to.
Text boundaries can be surprising and can be created when reaching
invalid syntax, HTML comments, and more hidden elements, so
semantically this wasn't a major bug, but it was an aesthetic
challenge.
In this patch the check is properly compared for both upper- and
lower-case variants that could potentially form tag names.
{{{
<?php
if ( ( 'A' <= $c && 'Z' >= $c ) || ( 'a' <= $c && 'z' >= $c ) ) { ... }
}}}
This solves the problem and ensures that contiguous text appears
as a single text node when scanning tokens.
Developed in https://github.com/WordPress/wordpress-develop/pull/6041
Discussed in https://core.trac.wordpress.org/ticket/60385
Follow-up to [57489]
Props dmsnell, jonsurrell
Fixes#60385
git-svn-id: https://develop.svn.wordpress.org/trunk@57542 602fd350-edb4-49c9-b593-d223f7449a82
This is the first step towards adding the font library to WordPress.
This commit includes the font library and font face CPTs.
It also adds the necessary APIs and classes to register and manipulate font collections.
This PR backports the font library post types and low level APIs to Core. This is the first step to include the font library entirely into Core. Once this merged, we'll open a PR with the necessary REST API controllers.
Props youknowriad, get_dave, grantmkin, swissspidy, hellofromtonya, mukesh27, mcsf.
See #59166.
git-svn-id: https://develop.svn.wordpress.org/trunk@57539 602fd350-edb4-49c9-b593-d223f7449a82
This resolves a WPCS warning:
{{{
Variable "$oSelf" is not in valid snake_case format, try "$o_self"
}}}
Follow-up to [11853], [38376].
See #59650.
git-svn-id: https://develop.svn.wordpress.org/trunk@57538 602fd350-edb4-49c9-b593-d223f7449a82
`ZipArchive` can fail to validate ZIP files correctly and report valid files as invalid. This introduces a fallback to `PclZip` to check validity of files if `ZipArchive` fails them.
This introduces the new function `wp_zip_file_is_valid()` to validate archives.
Follow up to [57388].
Props audunmb, azaozz, britner, cdevroe, colorful-tones, costdev, courane01, endymion00, feastdesignco, halounsbury, jeffpaul, johnbillion, jorbin, jsandtro, karinclimber, kevincoleman, koesper, maartenbelmans, mathewemoore, melcarthus, mujuonly, nerdpressteam, olegfuture, otto42, peterwilsoncc, room34, sayful, schutzsmith, stephencronin, svitlana41319, swissspidy, tnolte, tobiasbg, vikram6, welaunchio.
Fixes#60398.
git-svn-id: https://develop.svn.wordpress.org/trunk@57537 602fd350-edb4-49c9-b593-d223f7449a82
This private method was introduced in [56033] / #12009 but it's not actually used.
It was part of the inline script implementation which was later reverted before final merge.
The method can be safely removed because it’s private and cannot be used by extenders.
Props joemcgill.
Fixes#60438.
git-svn-id: https://develop.svn.wordpress.org/trunk@57533 602fd350-edb4-49c9-b593-d223f7449a82
This resolves a WPCS warning:
{{{
Variable "$expiresOffset" is not in valid snake_case format, try "$expires_offset"
}}}
Follow-up to [4109], [21996].
See #59650.
git-svn-id: https://develop.svn.wordpress.org/trunk@57532 602fd350-edb4-49c9-b593-d223f7449a82
This resolves a few WPCS warnings:
{{{
Variable "$ID" is not in valid snake_case format, try "$i_d"
}}}
See #59650.
git-svn-id: https://develop.svn.wordpress.org/trunk@57530 602fd350-edb4-49c9-b593-d223f7449a82
The HTML Processor tracks whether a token was found with the self-closing flag.
Depending on the context, this flag may or may not indicate that the element is
self closing. Unfortunately it's been tracking the wrong flag: it's been tracking
the end-tag flag, which indicates that a token is an end tag.
In this patch the right flag is set in the HTML Processor. This hasn't been an
issue because the HTML Processor doesn't yet read that stored flag, but it's an
important fix to make before adding support for foreign content (SVG and MathML)
since that behavior depends on reading the correct flag.
Follow-up to [56274].
Props dmsnell.
git-svn-id: https://develop.svn.wordpress.org/trunk@57528 602fd350-edb4-49c9-b593-d223f7449a82