Commit Graph

22712 Commits

Author SHA1 Message Date
Sergey Biryukov
543c9f50cc Editor: Clarify single post and page template descriptions.
Follow-up to [55500].

Props mikachan.
Fixes #60216.

git-svn-id: https://develop.svn.wordpress.org/trunk@57265 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 17:06:51 +00:00
Dennis Snell
7c1c48c141 HTML API: Add support for list elements.
Adds support for the following HTML elements to the HTML Processor:

 - LI, OL, UL.
 - DD, DL, DT.

Previously, these elements were not supported and the HTML Processor would bail when encountering them.
With this patch it will proceed to parse an HTML document when encountering those tags as long as other normal conditions don't cause it to bail (such as complicated format reconstruction).

Props audrasjb, jonsurrell, bernhard-reiter.
Fixes #60215.



git-svn-id: https://develop.svn.wordpress.org/trunk@57264 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 14:03:57 +00:00
Colin Stewart
eff1a3d24b Docs: Correct some typos in docblocks and inline comments.
This corrects several typos in documentation, including:
- "imput" -> "input"
- "proessing" -> "processing"
- "instantating" -> "instantiating"
- "filtersing" -> "filtering"
- "officaly" -> "officially"

Follow-up to [8852], [25307], [26191], [37488], [54416].

Props benniledl, mukesh27, jayadevankbh, Presskopp.
Fixes #60069. See #59651.

git-svn-id: https://develop.svn.wordpress.org/trunk@57263 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 11:55:04 +00:00
Colin Stewart
3da32969b2 Customize: Correct a typo in a console warning message.
This corrects a typo from "instantating" to "instantiating".

Follow-up to [41374].

Props benniledl, mukesh27, Presskopp.
Fixes #60222.

git-svn-id: https://develop.svn.wordpress.org/trunk@57262 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 11:11:02 +00:00
Isabel Brison
57597d9ccc Editor: fix inline comment formatting.
Correctly formats inline comment in `wp_get_global_stylesheet`.

Follow-up to [57259].

Props mukesh27.
See #60134.


git-svn-id: https://develop.svn.wordpress.org/trunk@57261 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 04:07:32 +00:00
Isabel Brison
ca24196233 Editor: Allow default duotone styles if not explicitly disabled in theme.json.
Removes setting that disabled default duotone palette from being output in themes without theme.json.

Props andrewserong.
Fixes #60136.


git-svn-id: https://develop.svn.wordpress.org/trunk@57260 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 00:25:19 +00:00
Isabel Brison
788d709a56 Editor: output palette presets when appearance tools or border are enabled.
Adds color palette presets to global styles output if current theme supports either appearance tools or border.

Props andrewserong, noisysocks.
Fixes #60134.


git-svn-id: https://develop.svn.wordpress.org/trunk@57259 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 23:30:10 +00:00
Aaron Jorbin
18cacc0abb Editor: update npm packages in trunk for 6.4.3.
Package Update includes fixes for:
- Image Block: Enable image block to be selected correctly when clicked.
- Reduce specificity of default Cover text color styles.
- Image Block: Fix deprecation when width/height attribute is number.
- Text selection: show CSS hack to Safari only.
- SlotFill: Allow contextual SlotFillProviders.

See: https://github.com/WordPress/wordpress-develop/pull/5696
See: bd6767b8a4
See: https://github.com/WordPress/gutenberg/pull/56043
See: https://github.com/WordPress/gutenberg/pull/56411
See: https://github.com/WordPress/gutenberg/pull/57063
See: https://github.com/WordPress/gutenberg/pull/57300
See: https://github.com/WordPress/gutenberg/pull/56779

Props mikachan, wildworks, alexstine, poena, isabel_brison, andrewserong, czapla, andraganescu, joen, ellatrix, youknowriad, ntsekouras.
Fixes #59943, #59943.



git-svn-id: https://develop.svn.wordpress.org/trunk@57258 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 20:15:30 +00:00
Sergey Biryukov
20f8b300cb Docs: Add a mention of appearance-tools as a possible value for add_theme_support().
Follow-up to [57255].

See #60118.

git-svn-id: https://develop.svn.wordpress.org/trunk@57256 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 11:39:16 +00:00
Isabel Brison
cb564055e0 Themes: Add theme support for appearance tools.
Reapplies the patch reverted in #57649 as the original patch was no longer applying cleanly. Adds theme support for appearance tools to `WP_Theme_JSON_Resolver`.

Props andrewserong, mukesh27, noisysocks.
Fixes #60118.



git-svn-id: https://develop.svn.wordpress.org/trunk@57255 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 06:24:44 +00:00
Isabel Brison
15b5be2acd Editor: add size and repeat to background image support.
Adds background size and background repeat style processing to the background image block support and `WP_Style_Engine` definitions.

Props andrewserong, mukesh27.
Fixes #60175.



git-svn-id: https://develop.svn.wordpress.org/trunk@57254 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 06:10:09 +00:00
Isabel Brison
2d764b4101 Editor: add CSS var parsing for fontSize and fontFamily.
Adds capability to parse CSS custom properties for fontSize and fontFamily in `WP_Style_Engine`.

Props ramonopoly.
Fixes #59982.


git-svn-id: https://develop.svn.wordpress.org/trunk@57253 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 02:43:48 +00:00
Aaron Jorbin
fa421cac11 Upgrade/Install: Check theme compatibility during bulk upgrades.
Previously, bulk upgrades did not verify that a theme package was compatible with the site's WordPress version or the server's PHP version.

This was previusly done for plugins in #59198, but themes were missed.

Follow-up to: [56525].

Props salcode, lakshmananphp.
Fixes #59758.


git-svn-id: https://develop.svn.wordpress.org/trunk@57252 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 23:17:48 +00:00
Sergey Biryukov
868f2ef1fd Taxonomy: Check for empty term after DB sanitization in wp_insert_term().
When inserting a new term in the database, `wp_insert_term()` will check if the term is empty and return a corresponding error.

Afterwards the term is sanitized and inserted in the database. However, there is a chance the term is empty after the DB sanitization.

This commit adds a check for an empty term name after the term is sanitized, returning an error in that case.

Follow-up to [5726], [8393].

Props fgiannar, kraftbj.
Fixes #59995.

git-svn-id: https://develop.svn.wordpress.org/trunk@57251 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 22:42:49 +00:00
bernhard-reiter
8b2ed2fe62 HTML API: Add explicit handling or failure for all tags.
The HTML API HTML processor does not yet support all tags. Many tags (e.g. list elements) have some complicated rules in the [https://html.spec.whatwg.org/#parsing-main-inbody "in body" insertion mode].

Implementing these special rules is blocking the implementation for a catch-all rule for "any other tag" because we need to prevent special rules from being handled by the catch-all.

  Any other start tag
  Reconstruct the active formatting elements, if any.

  Insert an HTML element for the token.

  …

This change ensures the HTML Processor fails when handling special tags. This is the same as existing behavior, but will allow us to implement the catch-all "any other tag" handling without unintentionally handling special elements.

Additionally, we add tests that assert the special elements are unhandled. As these tags are implemented, this should help to ensure they're removed from the unsupported tag list.

Props jonsurrell, dmsnell.
Fixes #60092.

git-svn-id: https://develop.svn.wordpress.org/trunk@57248 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 14:03:40 +00:00
Isabel Brison
b315d4ec01 Editor: add setting to disable layout content and wide size controls.
Adds support for an `allowCustomContentAndWideSize` setting in `WP_Theme_JSON` valid settings.

Props andrewserong.
Fixes #60133.


git-svn-id: https://develop.svn.wordpress.org/trunk@57247 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 06:21:02 +00:00
Isabel Brison
f7041f1cbf Editor: add layout classes to legacy Group inner container.
Moves generated layout classes into the Group block inner container in classic themes, so that block gap support can work correctly.

Props flixos90, mukesh27.
Fixes #60130.


git-svn-id: https://develop.svn.wordpress.org/trunk@57246 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 06:12:00 +00:00
Sergey Biryukov
4c90a9118a Site Health: Include site ID in debug data on multisite installations.
Follow-up to [44986].

Props sebastienserre, mukesh27.
Fixes #60081.

git-svn-id: https://develop.svn.wordpress.org/trunk@57245 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-07 16:07:47 +00:00
Colin Stewart
15637fa436 Docs: Fix typo in twentyten_header_image_height filter's docblock.
This corrects a minor typo from "defaul" to "default" in the docblock of the `twentyten_header_image_height` filter.

Props mukesh27.
See #59651.

git-svn-id: https://develop.svn.wordpress.org/trunk@57243 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-06 09:45:44 +00:00
hellofromTonya
43d2455dc6 Fonts: Fix font_style typo in wp_print_font_faces().
Changes `font_style` to `font-style` to reflect the CSS property.

Follow-up to [56540].

Props tmatsuur, rajinsharwar, audrasjb. 
Fixes #59858.

git-svn-id: https://develop.svn.wordpress.org/trunk@57240 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-03 22:11:01 +00:00
Tonya Mork
489b9e737f Docs: Replace "sanity" with "confidence" for inclusive language.
The phrase "sanity check" unnecessarily references mental health. It's an old phrase used to denote an extra step in verifying code works as expected.

“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”

While "sanity check" is a well-known phrase with a specific meaning, "confidence check" is a direct replacement that is more clear of its intent while being more inclusive.

Words matter.

Follow-up to [49216], [46271], [40583], [38832], [38637], [37409], [33359], [32162], [30346], [30345], [30238], [30055], [29902], [28763], [26141], [25002], [22227], [13428], [12148], [11025], [8927].

Props dartiss, hellofromTonya.
Fixes #60187.

git-svn-id: https://develop.svn.wordpress.org/trunk@57239 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-03 21:57:32 +00:00
Sergey Biryukov
0e559891ef Customize: Pass the previous status to post trash hooks when trashing a changeset.
This ensures that the correct number of arguments is passed to post trash hooks in `WP_Customize_Manager::trash_changeset_post()`, which bypasses `wp_trash_post()`.

Follow-up to [56043].

Props joelcj91, mukesh27.
Fixes #60183.

git-svn-id: https://develop.svn.wordpress.org/trunk@57238 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-03 16:20:02 +00:00
Sergey Biryukov
8e88bc8efa Docs: Remove a trailing period from a URL in a @see tag.
This ensures that the ticket link works as expected.

Follow-up to [55005].

Props mukesh27.
Fixes #60171.

git-svn-id: https://develop.svn.wordpress.org/trunk@57236 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-01 14:15:17 +00:00
Gary Pendergast
7aa146dfad Happy New Year! 😘
Update copyright year to 2024 in `license.txt` and bundled themes.

Follow-up to [18201], [23306], [28064], [36855], [36856], [39659], [40241], [42424], [46719], [46720], [47025], [47026], [49915], [52427], [55024].



git-svn-id: https://develop.svn.wordpress.org/trunk@57235 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-01 00:00:37 +00:00
Sergey Biryukov
f759a365a6 Docs: Document the $wp_registered_sidebars global in wp_map_sidebars_widgets().
Follow-up to [41555].

Props shailu25.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57234 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-31 13:32:50 +00:00
Sergey Biryukov
5df258b6a6 Docs: Correct the variable name passed to the determine_locale filter.
Follow-up to [43776], [44134].

Props truptikanzariya.
Fixes #60167.

git-svn-id: https://develop.svn.wordpress.org/trunk@57233 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-30 11:44:20 +00:00
Sergey Biryukov
9f7fc54ca7 Canonical: Check if the author parameter is a string in redirect_canonical().
This avoids a PHP warning or error when viewing an author on the front end, while an array is passed as `$_GET['author']`.

Follow-up to [12034], [12040], [12202].

Props david.binda, antonvlasenko, azaozz, SergeyBiryukov.
Fixes #60059.

git-svn-id: https://develop.svn.wordpress.org/trunk@57232 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-29 13:52:57 +00:00
Andrea Fercia
da1f881cf4 External Libraries: Accessibility: Clean up clipboard.js Copy buttons from focus management workaround.
`clipboard.js` used to suffer from a bug that triggered a focus loss when activating the Copy buttons. The bug was fixed a while ago with the `clipboard.js` 2.0.11 release so that the workaround implemented in WordPress is no longer necessary.

Props dhrumilk, paulkevan, afercia.
Fixes #60139.


git-svn-id: https://develop.svn.wordpress.org/trunk@57231 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-28 15:25:26 +00:00
Sergey Biryukov
0928c1dcb9 Docs: Document the $post global in REST API posts and revisions controllers.
Follow-up to [38832], [40601].

Props viralsampat.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57230 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-28 15:17:16 +00:00
Sergey Biryukov
455044e626 Twenty Twenty-Four: Use consistent title case in custom template names.
Follow-up to [56716].

Props wildworks, mukesh27.
Fixes #60083.

git-svn-id: https://develop.svn.wordpress.org/trunk@57229 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-27 10:59:45 +00:00
Sergey Biryukov
0e28444795 KSES: Add background-repeat to the list of safe CSS properties.
Follow-up to [45242], [46235].

Props andrewserong, ramonopoly, mukesh27.
Fixes #60132.

git-svn-id: https://develop.svn.wordpress.org/trunk@57228 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-26 14:22:45 +00:00
Sergey Biryukov
e9f335df2f Coding Standards: Correct alignment in WP_HTML_Tag_Processor::apply_attributes_updates().
This fixes an `Equals sign not aligned correctly` WPCS warning.

Follow-up to [57179].

Props antonvlasenko, dmsnell, ironprogrammer.
Fixes #60078.

git-svn-id: https://develop.svn.wordpress.org/trunk@57227 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-25 14:01:34 +00:00
Sergey Biryukov
e98fe1f0d7 Docs: Document the $wp_hasher global in wp_generate_user_request_key().
Includes adding a description for the global in a few other functions.

Follow-up to [42791], [42964], [43008].

Props viralsampat.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57226 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-24 13:03:12 +00:00
Sergey Biryukov
c973689ff4 Customize: Remove unused $wpdb global in _wp_customize_publish_changeset().
Follow-up to [38810], [39180], [41192], [41824].

Props viralsampat.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57225 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-23 14:41:37 +00:00
Sergey Biryukov
e3731cc113 Docs: Remove unused $posts global reference in get_attachment_template().
Follow-up to [32628], [32804].

Props viralsampat.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57223 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-22 14:50:04 +00:00
Isabel Brison
d1faee936d REST API: check parent and revision ids match before retrieving revision.
Adds a condition to check that parent id matches revision parent id in `WP_REST_Revisions_Controller` `get_item` method.

Props ramonopoly, adamsilverstein, danielbachhuber, spacedmonkey, andrewserong.
Fixes #59875.


git-svn-id: https://develop.svn.wordpress.org/trunk@57222 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-22 02:10:18 +00:00
Sergey Biryukov
9cedd5fa94 Docs: Document some globals in wp-includes/widgets.php.
Follow-up to [41555], [50995].

Props upadalavipul.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57216 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-21 18:34:05 +00:00
Joe McGill
77dcb1771a Themes: Improve the performance of _get_block_templates_paths.
This avoids redundant recursive lookups for block template paths in the same base directory by implementing a static cache. It also replaces an potentially expensive `file_exists` call in favor of doing recursive iteration of files inside a try/catch block. 

Props thekt12, spacedmonkey, flixos90, mukesh27, joemcgill.
Fixes #58196.


git-svn-id: https://develop.svn.wordpress.org/trunk@57215 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-20 20:00:04 +00:00
Jonathan Desrosiers
ed9ade3997 Build/Test Tools: Add engines for default themes.
This adds the `engines` field to the `package.json` file for the three default themes with build processes in order to encourage consistent tooling for contributors.

Some minor dependency updates for these themes are also included in this change.

Props jorbin, joemcgill, swissspidy.
See #59663.

git-svn-id: https://develop.svn.wordpress.org/trunk@57213 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-20 18:50:08 +00:00
bernhard-reiter
c6773eeffd HTML API: Avoid processing incomplete tokens.
Currently the Tag Processor assumes that an input document is a ''full'' HTML document. Because of this, if there's lingering content after the last tag match it will treat that content as plaintext and skip over it. This is fine for the Tag Processor because if there is lingering content that isn't a valid tag then there's nothing for `next_tag()` to match.

However, in order to support a number of feature expansions it is important to recognize that the remaining content ''may'' involve partial syntax elements, such as incomplete tags, attributes, or comments.

In this patch we're adding a mode inside the Tag Processor which will flip when we start parsing HTML syntax but the document finishes before the token does. This will provide the ability to:

- extend the input document,
- avoid misinterpreting syntax as text, and
- guess if we have a complete document, know if we have an incomplete document.

In the process of building this patch a few fixes were identified and fixed in the Tag Processor, namely in the handling of incomplete syntax elements.

Props dmsnell, jonsurrell.
Fixes #60122, #60108.

git-svn-id: https://develop.svn.wordpress.org/trunk@57211 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-20 17:50:04 +00:00
bernhard-reiter
cafaabfaf4 HTML API: Apply linting changes to @TODO comments.
Lowercase `@TODO` comments introduced by [57186], and remove spurious colons after them.

Props dmsnell, TobiasBg, mukesh27, sergeybiryukov, jonsurrell.
Fixes #60060.

git-svn-id: https://develop.svn.wordpress.org/trunk@57209 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-20 12:34:34 +00:00
Sergey Biryukov
c78e3fbce4 Docs: Document the $shortcode_tags global in wp_just_in_time_script_localization().
Follow-up to [41395], [41844].

Props upadalavipul.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57204 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-19 13:10:35 +00:00
Sergey Biryukov
1e29ef9b0a Docs: Document some globals in wp-includes/deprecated.php.
Includes removing `$allowed_options` global references from functions where it's not actually used.

Props viralsampat.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57196 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-18 13:51:20 +00:00
Sergey Biryukov
59947c5623 Docs: Correct $wp_the_query global reference in WP_Query::is_main_query().
Follow-up to [18699], [32620], [34337], [45739].

See #59651.

git-svn-id: https://develop.svn.wordpress.org/trunk@57195 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-17 02:46:38 +00:00
Sergey Biryukov
deda757c06 Docs: Document the $wp_locale global in WP_Fatal_Error_Handler::handle().
Follow-up to [45277].

Props viralsampat.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57194 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-16 09:36:45 +00:00
Sergey Biryukov
e5e8ccbd3a Docs: Document the $current_screen global in _WP_Editors::editor().
Follow-up to [32899].

Props viralsampat.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57193 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-16 09:29:16 +00:00
Sergey Biryukov
8e56669a49 General: Revert code changes from [57191].
The unit tests for `get_bookmark()` expect the function to modify the `$GLOBALS` array directly.

Follow-up to [57191].

See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57192 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-15 14:31:56 +00:00
Sergey Biryukov
bd88eafee1 Docs: Document the $link global in get_bookmark().
Follow-up to [8758].

Props upadalavipul, mukesh27.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57191 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-15 12:57:07 +00:00
Sergey Biryukov
7914d30555 Docs: Document the $wpdb global in WP_User::__construct().
Follow-up to [19325].

Props upadalavipul.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57190 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-15 12:35:54 +00:00
Sergey Biryukov
f2c78fe642 Docs: Fix typo in WP_Date_Query::build_mysql_datetime() DocBlock.
Follow-up to [25139].

Props nithi22, benniledl, mukesh27.
Fixes #60067.

git-svn-id: https://develop.svn.wordpress.org/trunk@57189 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-14 10:21:40 +00:00