Comments: Introduce a register_comment_type() API#59
Draft
adamsilverstein wants to merge 321 commits into
Draft
Conversation
A plugin may register an oEmbed provider through the `oembed_providers` filter using a malformed structure, such as an associative array rather than the expected tuple of a provider endpoint URL string at index 0 and an optional boolean regex flag at index 1. This previously produced `Undefined array key` PHP warnings when `WP_oEmbed::get_provider()` destructured the entry. Introduce a private `sanitize_provider()` method that validates the match pattern and provider data, normalizing the optional regex flag to a boolean. The constructor now skips malformed entries and reports each one via `_doing_it_wrong()`, and `get_provider()` likewise ignores any invalid entries it encounters at runtime. Developed in WordPress#11568. Props sukhendu2002, westonruter, bradshawtm, rollybueno. Fixes #65068. git-svn-id: https://develop.svn.wordpress.org/trunk@62501 602fd350-edb4-49c9-b593-d223f7449a82
Previously, `get_site_icon_url()` overwrote a caller-supplied fallback URL with the return value of `wp_get_attachment_image_url()` even when that lookup returned `false`, so a defined fallback (such as the bundled WordPress logo) was silently discarded whenever the assigned site icon attachment could not be resolved. Only update the URL when a non-empty attachment URL is returned. Additionally, `the_embed_site_title()` now renders the site icon `<img>` only when a URL is available, and omits the `srcset` attribute when the 2x URL is missing or identical to the 1x URL. This avoids the malformed markup (an empty `src` and a bare ` 2x` `srcset`) that produced a broken image and spurious requests in oEmbed cards. Developed in WordPress#11601. Follow-up to r35571, r36693, r47832. Props sukhendu2002, sabernhardt, mukesh27, westonruter, pontocinza, mohamedahamed, abcd95, manhar, rollybueno. Fixes #65098. git-svn-id: https://develop.svn.wordpress.org/trunk@62502 602fd350-edb4-49c9-b593-d223f7449a82
The arguments match the parameters' default values. Follow-up to [61019]. Props Soean. See #64897. git-svn-id: https://develop.svn.wordpress.org/trunk@62503 602fd350-edb4-49c9-b593-d223f7449a82
…per. Checks that the element classnames get added to doesn’t have a closing tag before the inner blocks start. Props isabel_brison, andrewserong, @darshitrajyaguru97, @tusharaddweb, @gaurangsondagar. Fixes #65101. git-svn-id: https://develop.svn.wordpress.org/trunk@62504 602fd350-edb4-49c9-b593-d223f7449a82
Ensures "fixed" becomes actually fixed with `flex-shrink: 0`, and introduces a new "max" designation for the current behaviour of "fixed". Props isabel_brison, andrewserong. Fixes #65462. git-svn-id: https://develop.svn.wordpress.org/trunk@62505 602fd350-edb4-49c9-b593-d223f7449a82
Unsets any existing background-image if background color is applied as a viewport state. Props iamchitti, isabel_brison. Fixes #65239. git-svn-id: https://develop.svn.wordpress.org/trunk@62506 602fd350-edb4-49c9-b593-d223f7449a82
Developed in WordPress#12043. Props jonsurrell, westonruter, dmsnell. See #64896. git-svn-id: https://develop.svn.wordpress.org/trunk@62507 602fd350-edb4-49c9-b593-d223f7449a82
The list of routes to be copied by the `copy:routes` Grunt task is configured dynamically by the `routes:setup` task, which parses the `gutenberg/build/routes/registry.php` file included in the built asset from the `gutenberg` repository. The task currently produces ouitput only when an error is encountered, such as a missing `registry.php` file or invalide route name. This adjusts the task to produce output so that the list of routes being processed is clear. See #65471. git-svn-id: https://develop.svn.wordpress.org/trunk@62508 602fd350-edb4-49c9-b593-d223f7449a82
Address edge cases where SCRIPT tag closers were not detected and the processor remained paused on an incomplete token. Developed in WordPress#12184. Props jonsurrell, dmsnell. See #65372. git-svn-id: https://develop.svn.wordpress.org/trunk@62509 602fd350-edb4-49c9-b593-d223f7449a82
The `postcss.config.js` file in Twenty Ninteen currently has two `module.exports` asignments configuring two plugins: `autoprefixer` (for ensuring browser-specific CSS nuances are accounted for) and `postcss-focus-within` (ensures `:fucs-within` rules are duplicated as `[focus-within]` attribute selectors). The first assignment is being ignored entirely, which means `autoprefixer` never runs against generated CSS files. This updates the `postcss.config.js` file to contain only one `modules.export` statement, which restores the behavior of `autoprefixer`. The dependencies related to browser usage statistics have also been updated, and the resulting changes to built CSS files subject to version control are also included: - Browser-specific prefixes for the `hyphens` property have been removed. - The `::-moz-selection` is no longer required for the `::selection` psuedo-element. - Brower-specific prefixes are no longer required for `min-content` and `max-content` values. - Webkit browsers no longer require a `-webkit-` prefix for `user-select: none`. - The `-webkit-` prefix is no longer required for the `filter` property. - The `text-decoration` property no longer requires browser prefixes. Fixes #65452. git-svn-id: https://develop.svn.wordpress.org/trunk@62510 602fd350-edb4-49c9-b593-d223f7449a82
…el links. The `touchstart` event on comment reply and cancel links fired before the browser could distinguish a tap from a scroll gesture, causing the reply form to open unexpectedly during scrolling. Since touchscreen users tapping a link already generate a `click` event, the `touchstart` listeners are unnecessary. Prior to ~2015 a `touchstart` event may have been useful to eliminate a 300ms delay for event handlers on tap, but this is long obsolete. Developed in WordPress#12168. Follow-up to r42360. Props edent, szandman, SergeyBiryukov, westonruter, afercia, peterwilsoncc, janpaulkleijn, madhazelnut, joostdevalk, pbearne, eherman24, Znuff. See #47510, #31590. Fixes #46713. git-svn-id: https://develop.svn.wordpress.org/trunk@62511 602fd350-edb4-49c9-b593-d223f7449a82
Reverts the update to cache busting strings in r62423 to restore them to `ver=7.0`. As the images will not change in WordPress 7.0.1 there is no need to deal with stale caches. Follow-up to r62423. Props peterwilsoncc, mukesh27, wildworks. See #65352. git-svn-id: https://develop.svn.wordpress.org/trunk@62512 602fd350-edb4-49c9-b593-d223f7449a82
… states. Enables responsive aspect ratio, scale, width, height and min-height in Image, Featured image and Cover blocks. Props isabel_brison, ramonopoly. See #65164. git-svn-id: https://develop.svn.wordpress.org/trunk@62513 602fd350-edb4-49c9-b593-d223f7449a82
Outputs viewport-specific state styles for elements such as Link or Heading that are part of a block. Props isabel_brison, ramonopoly. Fixes #65164. git-svn-id: https://develop.svn.wordpress.org/trunk@62514 602fd350-edb4-49c9-b593-d223f7449a82
Reject icon names that use uppercase letters, that lack a namespace prefix, or that have already been registered. Add tests covering these cases. Props im3dabasia1, mukesh27, wildworks. See #64847. git-svn-id: https://develop.svn.wordpress.org/trunk@62515 602fd350-edb4-49c9-b593-d223f7449a82
Give interactive elements a consistent 40px height in the admin mobile viewport on the Add Plugins, Media Library grid, Settings > General, and Add Themes screens. Follow-up to [61645]. Props abcd95, wildworks. Fixes #64999. git-svn-id: https://develop.svn.wordpress.org/trunk@62516 602fd350-edb4-49c9-b593-d223f7449a82
…ors. Includes: * Standardizing default values on `null` vs. `false`. * Updating the documentation to correct parameter types. * Adding missing parameter descriptions. Follow-up to [22094]. Props Soean, mukesh27, SergeyBiryukov. See #64897. git-svn-id: https://develop.svn.wordpress.org/trunk@62517 602fd350-edb4-49c9-b593-d223f7449a82
Add `core/list-item` to the block attributes supported by block bindings so its `content` rich text can be bound, and cover the basic (non-nested) case in the render tests. This is a clean enablement with no render-side changes. A List Item that contains a nested List keeps both inside the same `<li>`; preserving that nested list when `content` is bound is handled separately by the `WP_Block::replace_html()` inner-block fix. Props sauliusv, cbravobernal. See #65406. git-svn-id: https://develop.svn.wordpress.org/trunk@62518 602fd350-edb4-49c9-b593-d223f7449a82
Developed in WordPress#12207. Follow-up to [62507]. Props dmsnell. See #64896. git-svn-id: https://develop.svn.wordpress.org/trunk@62519 602fd350-edb4-49c9-b593-d223f7449a82
…locks. The `wp_get_elements_class_name()` function previously generated CSS class names by hashing the serialized block data via `md5()`. Identical blocks received the same `wp-elements-*` class name and the Style Engine deduplicated their CSS rules into one, causing a parent block's element style (e.g. link color) to cascade down and override a child block's identical style due to CSS source order. The function is updated to use `wp_unique_prefixed_id()` instead, generating sequential unique class names (`wp-elements-1`, `wp-elements-2`, etc.) that match the block editor's JavaScript implementation. The now-unused `$parsed_block` parameter is removed from the function signature. PHPStan rule level 10 errors are also resolved in the related code. See #64898. Developed in WordPress#12126. Follow-up to r53260, r58074. Props tusharbharti, westonruter, wildworks. Fixes #65435. git-svn-id: https://develop.svn.wordpress.org/trunk@62520 602fd350-edb4-49c9-b593-d223f7449a82
…ogo. Adds gray WordPress logo image files (`w-logo-gray-white-bg.png` and `w-logo-gray-white-bg.svg`) to `wp-includes/images/`, and updates `the_embed_site_title()` and `do_favicon()` to use the new images as the fallback site icon, maintaining visual consistency with the login screen logo updated in r61989. Replaces CSS custom property references for focus styles in the embed template (`--wp-admin-theme-color` and `--wp-admin-border-width-focus`) with their literal values, as these admin-theme variables are not defined in the oEmbed template context. Developed in WordPress#11293. Follow-up to r61652, r61989, r62502. Props sabernhardt, huzaifaalmesbah, westonruter, jamesbregenzer. See #64708. Fixes #64877. git-svn-id: https://develop.svn.wordpress.org/trunk@62521 602fd350-edb4-49c9-b593-d223f7449a82
`WP_Block::replace_html()` replaced the entire element matched by a rich-text attribute's selector, dropping any markup produced by inner blocks rendered inside that element (e.g. a List nested inside a List Item). Props cbravobernal, jonsurrell. Fixes #65406. git-svn-id: https://develop.svn.wordpress.org/trunk@62522 602fd350-edb4-49c9-b593-d223f7449a82
The ASCII fast-path in `_wp_scan_utf8()` uses `strspn()` to skip past ASCII bytes. When a code point limit was provided without a byte limit, the scan would include the rest of the input even when there was a code point limit. Because ASCII characters are single-byte code points, the fast-path scan length can be bounded by the number of remaining code points. This improves performance when working with some large documents. Developed in WordPress#12214. Follow-up to [60768]. Props jonsurrell, dmsnell, zieladam. Fixes #65483. See #63863. git-svn-id: https://develop.svn.wordpress.org/trunk@62523 602fd350-edb4-49c9-b593-d223f7449a82
When a trace of allocations revealed that `wp_is_numeric_array()` accounted for a significant fraction of the allocations in a page render, it was observed that the function eagerly allocates and copies array keys and then filters them when all it wants to know is whether a single key in the array meets a condition. In this patch the `array_filter( array_keys() )` invocation is replaced with early-aborting iteration to avoid the memory allocation and copying. This patch was prepared as part of WCEU 2026 Contributor Day. Developed in: WordPress#12100 Discussed in: https://core.trac.wordpress.org/ticket/65467 Follow-up to [34927]. Props dmsnell, westonruter, yusufmudagal. Fixes #65467. git-svn-id: https://develop.svn.wordpress.org/trunk@62524 602fd350-edb4-49c9-b593-d223f7449a82
Block editor-related files can currently become stale or are not always deleted from `src` through the relevant `grunt clean` commands reliably. In the past, this primarily caused issues locally when a CSS file was copied from the `@wordpress/block-library` npm package into `src` and later removed from the package entirely. The result was a failing `grunt verify:old-files` task until the `grunt clean` command was run with the `--dev` flag. After [61438] this issue presented in new ways. Mainly, files would remain in the core.svn.wordpress.org build repository indefinitely unless explicitly deleted. [62051] brought the `grunt clean` tasks up to date, but there are still paths where files remain unexpectedly or have outdated contents after rebuilding. This can cause incomplete or inaccurate commits where built files subject to version control are not updated correctly, especially when changing the `gutenberg.sha` value in `package.json`. This change improves the build script to ensure that all files sourced from the zip file with assets built by the Gutenberg repository are always fresh and up to date, and any files that are deleted from the built zip file are also deleted from version control appropriately (in both the `develop` and `core` repositories). A handful of changes were required to accomplish this: - All Gutenberg-sourced outputs are written to `src/` regardless of `--dev`. In production builds, `build:gutenberg` runs before `build:files`, and `copy:files` propagates the tree to `build/`. - `gutenbergFiles` has been split into two different arrays: `gutenbergUnversionedFiles` and `gutenbergVersionedFiles`. The `src` argument for the `clean:gutenberg` task is dynamically populated at run time with a bare `grunt clean` cleaning only the unversioned subset (so version-controlled files are not unexpectedly deleted), and explicit `clean:gutenberg` (or any chain through `build:gutenberg`) cleans both, removing files deleted upstream from version control. - `clean:gutenberg` no longer wipes non-Gutenberg sourced files from `wp-includes/js/`. All file/path lists have been updated to only match files the related tasks are directly responsible for managing. - `tools/gutenberg/copy.js` has been added to `tsconfig.json` and brought under `tsc --build` strict-mode checking. The large `copyBlockAssets()` function was broken into one named function per asset type, each typed against the relevant `COPY_CONFIG` slice. The split is a code-clarity improvement, not a bug fix. Props desrosj, westonruter, jorbin, adamsilverstein. Fixes #65452. git-svn-id: https://develop.svn.wordpress.org/trunk@62525 602fd350-edb4-49c9-b593-d223f7449a82
Instead of crowding the row, actions added by extenders should wrap to new lines. This change has been tested in both the classic editor plugin and hotfix plugin. Follow-up to [61645]. Props abhishekfdd, masteradhoc, rlucian, sabernhardt, cogdesign, threadi, darshitrajyaguru97, desrosj, davidbaumwald, jorbin. Fixes #65286. git-svn-id: https://develop.svn.wordpress.org/trunk@62526 602fd350-edb4-49c9-b593-d223f7449a82
Follow-up to [47740]. Props nareshbheda, manishxdp. Fixes #65470. git-svn-id: https://develop.svn.wordpress.org/trunk@62527 602fd350-edb4-49c9-b593-d223f7449a82
This eliminates over 400 PHPStan errors from the core codebase. * Clarify the inline documentation for the four `wpdb` query methods — `get_results()`, `get_row()`, `get_col()`, and `get_var()`. * Add `@phpstan-return` conditional types that mirror each method's runtime dispatch on `$query` and `$output`. * Add `@phpstan-param` tags narrowing `$output` to the documented constants. * Document that `get_var()` returns `null` both on failure and when the matched cell value is an empty string, directing consumers to `$this->last_error` to distinguish the two cases. * Tighten the `@return` in `get_results()` from `array|object|null` to `array|null`, since the method never returns a bare `stdClass`; the `object` was a copy/paste artifact from `get_row()`. * Fix a deprecated use of `null` as an array offset (PHP 8.5) in the `OBJECT_K` branch when a row's first column is SQL `NULL`. * Gather `get_col()` data as a true list. * Suggest `ext-mysqli` in `composer.json`, which `wpdb` requires at runtime. Developed in WordPress#11855. Props apermo, westonruter. See #30257, #64898. Fixes #65261. git-svn-id: https://develop.svn.wordpress.org/trunk@62529 602fd350-edb4-49c9-b593-d223f7449a82
Add SVG presentation attributes to the list of CSS properties allowed by `safecss_filter_attr()`, so inline SVG markup can be styled via the `style` attribute. This ports Gutenberg PR #79172 to Core. Props afercia, westonruter, wildworks. Fixes #65457. git-svn-id: https://develop.svn.wordpress.org/trunk@62530 602fd350-edb4-49c9-b593-d223f7449a82
…r buttons. Developed in: WordPress#11483 Props pratiknawkar94, joedolson, westonruter, afercia. Fixes #64576. git-svn-id: https://develop.svn.wordpress.org/trunk@62531 602fd350-edb4-49c9-b593-d223f7449a82
Handle the Button block's width through the `dimensions.width` block support so it aligns with Global Styles and offers greater freedom in the block editor. This adds the global styles `calc()` conversion for percentage button widths in `WP_Theme_JSON`, leverages `core/button` dimension size presets in `theme.json` to maintain backward compatibility, and includes test coverage. Developed in: [https://github.com/WordPress/wordpress-develop/pull/12046](https://github.com/WordPress/wordpress-develop/pull/12046) Props aaronrobertshaw, isabel_brison, ramonopoly, adrianduffell. Fixes #65388. git-svn-id: https://develop.svn.wordpress.org/trunk@62746 602fd350-edb4-49c9-b593-d223f7449a82
In order to lower the risk with this change, jQuery UI is set to be in back compat mode to keep support for the jQuery UI 1.11 API. The build for `core.js` is https://jqueryui.com/download/#!version=1.14.2&components=111111111111000000000000000000000000000000000000 with the addition of the deprecated $.ui.plugin from https://github.com/jquery/jquery-ui/blob/1.14.2/ui/plugin.js. All other files are based off of files in https://github.com/jquery/jquery-ui/tree/1.14.2/ui. Developed in: WordPress#12526 Props pankaj.sakaria, mgol, mukesh27, ozgursar, siliconforks, joedolson, OllieJones, wildworks, jorbin. Fixes #62757. git-svn-id: https://develop.svn.wordpress.org/trunk@62747 602fd350-edb4-49c9-b593-d223f7449a82
Introduces a set of public APIs for registering icon collections and individual icons, allowing themes and plugins to register icons for consistent use across the block editor and the wider WordPress admin. * Add the `WP_Icon_Collections_Registry` class, a singleton that manages the registration of icon collections. Each collection groups a set of icons under a namespace and is exposed through the REST API via the new `WP_REST_Icon_Collections_Controller`. * Update the `WP_Icons_Registry` class to allow registering custom icons through public `register()` and `unregister()` methods, surfaced through `WP_REST_Icons_Controller`. * Add four wrapper functions in `icons.php`: `wp_register_icon_collection()` and `wp_unregister_icon_collection()` for collections, and `wp_register_icon()` and `wp_unregister_icon()` for individual icons. * Register the default collections and icons through `_wp_register_default_icon_collections()` and `_wp_register_default_icons()`, both hooked to the `init` action. Props mcsf, tyxla, wildworks. See #64847. git-svn-id: https://develop.svn.wordpress.org/trunk@62748 602fd350-edb4-49c9-b593-d223f7449a82
Add four entries to the block editor preload paths in `wp-admin/edit-form-blocks.php`: the front-page template lookup, the taxonomies list, the `OPTIONS` permissions request for the post type collection, and, for post types that support it, the post author's display name. The editor previously requested all of these over the network on first load. Developed in WordPress#11948. Props ellatrix, mamaduka. Fixes #65636. git-svn-id: https://develop.svn.wordpress.org/trunk@62749 602fd350-edb4-49c9-b593-d223f7449a82
Updates the `htmlhint` library from version `1.8.0` to `1.9.2`. The `devDependencies` entry in `package.json` and the version registered for the bundled `htmlhint` script in `wp_default_scripts()` are both bumped. Props desrosj, khokansardar, luisdavid01, mukesh27, wildworks. Fixes #65632. git-svn-id: https://develop.svn.wordpress.org/trunk@62750 602fd350-edb4-49c9-b593-d223f7449a82
Replace `foreach` loops that call `assertInstanceOf()` on each element with a single `assertContainsOnlyInstancesOf()` assertion. Developed in: WordPress#12515 Props mukesh27, soean, wildworks. See #64894. git-svn-id: https://develop.svn.wordpress.org/trunk@62751 602fd350-edb4-49c9-b593-d223f7449a82
…variables and constants. Introduce two overrides that let a site or hosting provider change the default speculative loading configuration that the `auto` value resolves to, without having to ship an mu-plugin: * `WP_SPECULATIVE_LOADING_DEFAULT_MODE` (`prefetch` or `prerender`) * `WP_SPECULATIVE_LOADING_DEFAULT_EAGERNESS` (`conservative`, `moderate`, or `eager`). Each may be supplied as an environment variable, read via `getenv()`, or as a constant of the same name that takes precedence over it, mirroring how `wp_get_environment_type()` resolves `WP_ENVIRONMENT_TYPE`. An unrecognized value falls back to the core default. These overrides only change what `auto` resolves to, so an explicit mode or eagerness supplied through the `wp_speculation_rules_configuration` filter still wins. An `eagerness` of `immediate` is rejected because WordPress does not permit it for the document-level rules it generates; accepting it would cause `WP_Speculation_Rules::add_rule()` to reject the rule and leave the page with no speculation rules at all. Also relax `WP_Speculation_Rules::is_valid_mode()` and `WP_Speculation_Rules::is_valid_eagerness()` to accept `mixed`, so an arbitrary value from the filter is validated and rejected rather than raising a `TypeError`. Fix PHPStan errors in speculative loading functions resulting from insufficient typing. Developed in WordPress#12514. Follow-up to r59837. Props westonruter, mukesh27, adamsilverstein, swissspidy. See #64066, #62503, #64896, #64898. Fixes #65624. git-svn-id: https://develop.svn.wordpress.org/trunk@62752 602fd350-edb4-49c9-b593-d223f7449a82
…network error message. `WP_AI_Client_HTTP_Client::sendRequestWithOptions()` omitted the HTTP method from its `NetworkException` message, while `sendRequest()` already included it. Both now use the same format, and a new test covers it. Props sagarsdeshmukh, jorbin, gziolo. Fixes #65421. git-svn-id: https://develop.svn.wordpress.org/trunk@62753 602fd350-edb4-49c9-b593-d223f7449a82
When a block theme is active, wrap the post password form's submit button in a `wp-block-button` span and add the `wp-block-button__link` class along with the theme's button element class name, so it is styled consistently with other buttons output by the theme. The `wp-block-button` stylesheet is explicitly enqueued when registered, as it may not otherwise be present on pages without a Button block. Props apermo, mukesh27, sukhendu2002, poena, wildworks. Fixes #64569. git-svn-id: https://develop.svn.wordpress.org/trunk@62754 602fd350-edb4-49c9-b593-d223f7449a82
Remove the unused `$font-weight-regular` and `$font-weight-medium` Sass variables from the admin color scheme tokens. Neither variable has a consumer, so this does not change any generated CSS or runtime styling. These tokens are also inconsistent with the font weights being introduced to the Gutenberg project in WordPress 7.1, where new usage should rely on the new CSS custom properties instead. Developed in WordPress#12524. Props ciampo, aduth, tyxla. Fixes #65629. git-svn-id: https://develop.svn.wordpress.org/trunk@62755 602fd350-edb4-49c9-b593-d223f7449a82
Add `compact` to the type shorthands expanded by `get_submit_button()`, so passing `compact` now yields the `button-compact` class. This matches the existing `primary`, `small`, and `large` shorthands. Developed in: WordPress#11305 Props motylanogha, niravsherasiya7707, wildworks. Fixes #64892. git-svn-id: https://develop.svn.wordpress.org/trunk@62756 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned commit hash of the Gutenberg repository from `2872d71cde528d82675f14862a1b84e2b8abbaea` to `e73c3c481db0650183f092af157f6e42efe9ee2d`. A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@2872d71...e73c3c4 - Icon block: Show text and background color controls by default. (WordPress/gutenberg#80251) - fix: set dataviews popover hover text color (WordPress/gutenberg#80105) - DataViews: Fix the unintended gap between `list` layout items when `groupBy` is set (WordPress/gutenberg#80254) - DataViews: Fix the `list` layout ignoring some settings when `groupBy` is set (WordPress/gutenberg#80255) - DataViews: Add shift-click range selection (WordPress/gutenberg#80046) - Responsive Editing: support editing pattern styles (WordPress/gutenberg#80233) - Tab List: Add toolbar buttons to reorder tabs (WordPress/gutenberg#80107) - Hide color controls for Navigation and Social Icons when viewport states are active (WordPress/gutenberg#80289) - Icons: Fix collection unregister not removing icons after core added its own registry (WordPress/gutenberg#80292) - Notes: increase contrast between avatar border colors (WordPress/gutenberg#80285) - Playlist: Fix track insertion (WordPress/gutenberg#80200) - Fix: Allow icon labels to wrap with word breaks and no ellipsis (WordPress/gutenberg#80309) - Core Abilities: Restore the ready promise and lazy-load via dynamic import (WordPress/gutenberg#79155) Props wildworks. See #65529. git-svn-id: https://develop.svn.wordpress.org/trunk@62757 602fd350-edb4-49c9-b593-d223f7449a82
Adds PHPUnit coverage for the private _wp_apply_block_content_filters() helper, which is used by the Latest Posts block's full-content rendering support. The helper itself and the Latest Posts change have already landed separately. The new tests cover applying the expected content filters, rendering block markup returned by shortcodes, passing the image filter context through, processing embeds, and clearing recursion-guard state after both successful and exceptional block rendering. Props get_dave, wildworks, scruffian. See #65586. git-svn-id: https://develop.svn.wordpress.org/trunk@62758 602fd350-edb4-49c9-b593-d223f7449a82
git-svn-id: https://develop.svn.wordpress.org/trunk@62759 602fd350-edb4-49c9-b593-d223f7449a82
git-svn-id: https://develop.svn.wordpress.org/trunk@62760 602fd350-edb4-49c9-b593-d223f7449a82
…False()`. Replace boolean assertions wrapping other checks with the dedicated PHPUnit assertions: * `assertContains()`/`assertNotContains()` instead of `in_array()` or `array_search()` wrapped in `assertTrue()`/`assertFalse()`. * `assertDirectoryExists()` instead of `assertTrue( is_dir( ... ) )`. This clarifies intent and produces more descriptive failure messages. Props Soean, mukesh27, SergeyBiryukov. See #64894. git-svn-id: https://develop.svn.wordpress.org/trunk@62761 602fd350-edb4-49c9-b593-d223f7449a82
This commit guards `validate_custom_css()` against non-string input, returning a `rest_custom_css_invalid_type` `WP_Error` with a 400 status instead of a fatal. Before, `styles.css` had no type constraint in the global styles request schema, so a REST consumer could PUT an array (or any non-string value). That value reached `strlen()` in `validate_custom_css()` and threw an uncaught `TypeError` on PHP 8+. Developed in: [https://github.com/WordPress/wordpress-develop/pull/12549](https://github.com/WordPress/wordpress-develop/pull/12549) Props andrewserong, ramonopoly. Fixes #65640. git-svn-id: https://develop.svn.wordpress.org/trunk@62762 602fd350-edb4-49c9-b593-d223f7449a82
…nager`. This addresses 3 PHPStan errors: > Unreachable statement - code above always terminates. Each line of code is unreachable because the preceding statement exits execution. Developed in WordPress#12497. Follow-up to r62704. Props soean, mukesh27. See #64898. git-svn-id: https://develop.svn.wordpress.org/trunk@62763 602fd350-edb4-49c9-b593-d223f7449a82
Removes code in `user-profile.js` that was originally meant to set initial focus to the password field in the reset password screen. The call to setting focus leaked on other pages, for example the Add User page, where setting initial focus to a field in the middle of the form is not desirable. The removed code was redundant anyways, as the reset password screen already comes with an inline script that takes care of initial focus. Developed in WordPress#12534 Props iamchitti, afercia. Fixes #65630. git-svn-id: https://develop.svn.wordpress.org/trunk@62764 602fd350-edb4-49c9-b593-d223f7449a82
Returning values from `__construct()` and `__destruct()` is a deprecated practice starting with PHP 8.6, as per [https://wiki.php.net/rfc/deprecate-return-value-from-construct a recent RFC]. Props iamchitti, Soean. Fixes #65637. git-svn-id: https://develop.svn.wordpress.org/trunk@62765 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a fatal out-of-memory error when running `composer run lint` checks. Props Soean. Fixes #65649. git-svn-id: https://develop.svn.wordpress.org/trunk@62766 602fd350-edb4-49c9-b593-d223f7449a82
Register the wp-theme stylesheet in the script loader so design tokens are available to wp-components and the block editor dependency chain. Developed in: WordPress#12560 Reviewed by aduth, ciampo, mukesh27. Fixes #65646. git-svn-id: https://develop.svn.wordpress.org/trunk@62767 602fd350-edb4-49c9-b593-d223f7449a82
…rameter. The case meant to test the optional `$length` parameter passed it as an argument to `assertSame()` instead of `url_shorten()`. So the latter ran with its default length of 35, the expected value happened to match the default output, and the assertion passed — while the `$length` parameter was never actually tested. This commit: * Converts the tests to a data provider with descriptive keys, so a failure points to the exact case. * Separates the default-behavior cases from the custom-length cases. * Adds real coverage for `$length`: the URL is kept when the length exceeds or equals the cleaned URL (pinning the strict `>` comparison) and shortened when it is smaller. * Adds a comment clarifying that a shortened URL is cut to `( $length - 3 )` characters before `…` is appended. No production code is changed — this is a test-only improvement. Developed in WordPress#12558. Follow-up to [35314]. Props Soean, mukesh27, SergeyBiryukov. See #64894. git-svn-id: https://develop.svn.wordpress.org/trunk@62768 602fd350-edb4-49c9-b593-d223f7449a82
Props xknown, johnbillion, joehoyle, jorbin, sergeybiryukov, ehtis, desrosj. git-svn-id: https://develop.svn.wordpress.org/trunk@62769 602fd350-edb4-49c9-b593-d223f7449a82
Props xknown, sergeybiryukov, joehoyle, jorbin, clorith, johnbillion, desrosj. git-svn-id: https://develop.svn.wordpress.org/trunk@62770 602fd350-edb4-49c9-b593-d223f7449a82
Props peterwilsoncc, westonruter, xknown, joehoyle, sergeybiryukov, jorbin, johnbillion, desrosj. git-svn-id: https://develop.svn.wordpress.org/trunk@62771 602fd350-edb4-49c9-b593-d223f7449a82
The files being added to `$_old_files` in this change were previously removed in [62334] and [62337]. However, they remained in the core.svn.wordpress.org repository due to a bug on the build server. That has been fixed and the files have been removed as expected, so they must be added to the list of old files. Props johnbillion, jorbin, desrosj, sergeybiryukov. Fixes #65325. git-svn-id: https://develop.svn.wordpress.org/trunk@62777 602fd350-edb4-49c9-b593-d223f7449a82
This adds one more file to the `$_old_files` list that should be included. Props barry, johnbillion, jorbin, desrosj. See #65325. git-svn-id: https://develop.svn.wordpress.org/trunk@62779 602fd350-edb4-49c9-b593-d223f7449a82
Add register_comment_type(), unregister_comment_type(), get_comment_type_object(), get_comment_types(), comment_type_exists(), a WP_Comment_Type object, the four built-in types (comment, pingback, trackback, note), label support, and a label-aware comment_type() template tag. Rebuilt from WordPress#12311 as the bottom of a stacked-PR trial. Trac ticket: https://core.trac.wordpress.org/ticket/35214
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add register_comment_type(), unregister_comment_type(), get_comment_type_object(),
get_comment_types(), comment_type_exists(), a WP_Comment_Type object, the four
built-in types (comment, pingback, trackback, note), label support, and a
label-aware comment_type() template tag.
Rebuilt from WordPress#12311 as the
bottom of a stacked-PR trial.
Trac ticket: https://core.trac.wordpress.org/ticket/35214
Stack created with GitHub Stacks CLI • Give Feedback 💬