Skip to content

Icons: Add PHP method(s) for rendering inline SVG icons from the registry#78332

Merged
t-hamano merged 30 commits into
trunkfrom
add/php-wp-icons
Jun 26, 2026
Merged

Icons: Add PHP method(s) for rendering inline SVG icons from the registry#78332
t-hamano merged 30 commits into
trunkfrom
add/php-wp-icons

Conversation

@jasmussen

@jasmussen jasmussen commented May 15, 2026

Copy link
Copy Markdown
Contributor

What

Adds a wp_get_icon() PHP helper that returns the SVG markup for any icon in the WordPress icon registry, with optional sizing, classes, an accessible label, and a wp_icon_html filter.

The core/icon block's server-side renderer is updated to use wp_get_icon() instead of duplicating the same aria/label/class logic inline.

Why

There's no PHP-side equivalent to the React <Icon> component. Themes, blocks, and plugins that render in PHP have to either re-fetch SVG files from disk or hand-roll their own icon-rendering logic, which leads to inconsistent output (missing aria attributes, no focusable="false" on decorative icons, etc.).

A single helper makes it cheap to render the same icon set consistently from PHP and React, and gives render_block_core_icon() and any other core/plugin PHP path one place to evolve.

How

wp_get_icon( $name, $args ):

  • Looks up the icon in WP_Icons_Registry.
  • Uses WP_HTML_Tag_Processor to set width/height (or skip when size is 0 null), add CSS classes, and apply accessibility attributes:
    • With label: role="img" + aria-label.
    • Without label: aria-hidden="true" + focusable="false" (matches render_block_core_icon() and the React <Icon> component).
  • Returns the SVG markup through a wp_icon_html filter so plugins can wrap or annotate the output.

render_block_core_icon() is refactored to call wp_get_icon() for the core SVG + aria/class handling, then layers in the block's color, border, spacing, and dimensions styles via the style engine.

Testing instructions

  1. From any PHP context (a theme template, a custom block, etc.), call:

    echo wp_get_icon( 'core/plus' );
    echo wp_get_icon( 'core/plus', array( 'size' => 32, 'label' => 'Add item' ) );

    Confirm:

    • Default output is <svg ... width="24" height="24" aria-hidden="true" focusable="false">…</svg>.
    • With label, output uses role="img" + aria-label instead.
    • With size, width/height match.
    • With class, the class is added; a space-separated string adds each class individually.
    • An unknown icon name returns an empty string.
  2. Add a filter:

    add_filter( 'wp_icon_html', fn( $html, $name ) => "<!-- $name -->$html", 10, 2 );

    Confirm the filter modifies the output.

  3. Run the unit tests:

    composer test -- --filter=WP_Icon_Test
    
  4. Regression check on the core/icon block (now refactored to use wp_get_icon()): insert the block, toggle ariaLabel, apply color/border/width — confirm rendered output matches trunk.

Backport

WordPress core PR: WordPress/wordpress-develop#12010

Use of AI Tools

This PR was authored with Claude Code (Claude Opus 4.6). I tested and reviewed the code. Claude Code is credited via Co-Authored-By in the commit messages.

@jasmussen jasmussen self-assigned this May 15, 2026
@jasmussen jasmussen added Needs Technical Feedback Needs testing from a developer perspective. [Package] Icons /packages/icons [Feature] Icons Related to Icon registration API and Icon REST API labels May 15, 2026
@github-actions

github-actions Bot commented May 15, 2026

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.96 MB

ℹ️ View Unchanged
Filename Size
build/modules/a11y/index.min.js 355 B
build/modules/abilities/index.min.js 42.3 kB
build/modules/block-editor/utils/fit-text-frontend.min.js 617 B
build/modules/block-library/accordion/view.min.js 595 B
build/modules/block-library/file/view.min.js 346 B
build/modules/block-library/form/view.min.js 528 B
build/modules/block-library/image/view.min.js 2.64 kB
build/modules/block-library/navigation/view.min.js 1.14 kB
build/modules/block-library/playlist/view.min.js 10.9 kB
build/modules/block-library/query/view.min.js 518 B
build/modules/block-library/search/view.min.js 498 B
build/modules/block-library/tabs/view.min.js 946 B
build/modules/boot/index.min.js 19.3 kB
build/modules/connectors/index.min.js 2.05 kB
build/modules/content-types/index.min.js 156 kB
build/modules/core-abilities/index.min.js 926 B
build/modules/edit-site-init/index.min.js 1.4 kB
build/modules/interactivity-router/full-page.min.js 451 B
build/modules/interactivity-router/index.min.js 11.6 kB
build/modules/interactivity/index.min.js 15.3 kB
build/modules/latex-to-mathml/index.min.js 56.5 kB
build/modules/latex-to-mathml/loader.min.js 131 B
build/modules/lazy-editor/index.min.js 14.1 kB
build/modules/route/index.min.js 25.2 kB
build/modules/vips/loader.min.js 127 B
build/modules/vips/worker.min.js 4.56 MB
build/modules/workflow/index.min.js 19.9 kB
build/scripts/a11y/index.min.js 1.1 kB
build/scripts/annotations/index.min.js 2.53 kB
build/scripts/api-fetch/index.min.js 2.86 kB
build/scripts/autop/index.min.js 2.21 kB
build/scripts/base-styles/index.min.js 146 B
build/scripts/blob/index.min.js 665 B
build/scripts/block-directory/index.min.js 10.3 kB
build/scripts/block-editor/index.min.js 346 kB
build/scripts/block-library/index.min.js 323 kB
build/scripts/block-serialization-default-parser/index.min.js 1.2 kB
build/scripts/block-serialization-spec-parser/index.min.js 3.12 kB
build/scripts/blocks/index.min.js 57.1 kB
build/scripts/commands/index.min.js 21 kB
build/scripts/components/index.min.js 266 kB
build/scripts/compose/index.min.js 11.1 kB
build/scripts/core-commands/index.min.js 4.37 kB
build/scripts/core-data/index.min.js 31.3 kB
build/scripts/customize-widgets/index.min.js 14.6 kB
build/scripts/data-controls/index.min.js 832 B
build/scripts/data/index.min.js 9.72 kB
build/scripts/date/index.min.js 23.7 kB
build/scripts/deprecated/index.min.js 784 B
build/scripts/dom-ready/index.min.js 502 B
build/scripts/dom/index.min.js 5.04 kB
build/scripts/edit-post/index.min.js 18.8 kB
build/scripts/edit-site/index.min.js 265 kB
build/scripts/edit-widgets/index.min.js 22.2 kB
build/scripts/editor/index.min.js 430 kB
build/scripts/element/index.min.js 5.2 kB
build/scripts/escape-html/index.min.js 622 B
build/scripts/format-library/index.min.js 13.1 kB
build/scripts/hooks/index.min.js 1.86 kB
build/scripts/html-entities/index.min.js 529 B
build/scripts/i18n/index.min.js 2.5 kB
build/scripts/is-shallow-equal/index.min.js 607 B
build/scripts/keyboard-shortcuts/index.min.js 1.65 kB
build/scripts/keycodes/index.min.js 1.6 kB
build/scripts/list-reusable-blocks/index.min.js 2.53 kB
build/scripts/media-utils/index.min.js 79.9 kB
build/scripts/notices/index.min.js 1.89 kB
build/scripts/nux/index.min.js 1.92 kB
build/scripts/patterns/index.min.js 8 kB
build/scripts/plugins/index.min.js 2.18 kB
build/scripts/preferences-persistence/index.min.js 2.19 kB
build/scripts/preferences/index.min.js 3.33 kB
build/scripts/primitives/index.min.js 1.05 kB
build/scripts/priority-queue/index.min.js 1.65 kB
build/scripts/private-apis/index.min.js 1.14 kB
build/scripts/react-i18n/index.min.js 868 B
build/scripts/redux-routine/index.min.js 3.4 kB
build/scripts/reusable-blocks/index.min.js 3.14 kB
build/scripts/rich-text/index.min.js 14 kB
build/scripts/router/index.min.js 5.99 kB
build/scripts/server-side-render/index.min.js 1.94 kB
build/scripts/shortcode/index.min.js 1.62 kB
build/scripts/style-engine/index.min.js 2.45 kB
build/scripts/sync/index.min.js 39.3 kB
build/scripts/theme/index.min.js 22.3 kB
build/scripts/token-list/index.min.js 767 B
build/scripts/undo-manager/index.min.js 954 B
build/scripts/upload-media/index.min.js 11.2 kB
build/scripts/url/index.min.js 4.02 kB
build/scripts/vendors/react-dom.min.js 43.3 kB
build/scripts/vendors/react-jsx-runtime.min.js 667 B
build/scripts/vendors/react.min.js 2.77 kB
build/scripts/viewport/index.min.js 1.25 kB
build/scripts/warning/index.min.js 482 B
build/scripts/widgets/index.min.js 7.84 kB
build/scripts/wordcount/index.min.js 1.07 kB
build/styles/base-styles/admin-schemes-rtl.css 1.71 kB
build/styles/base-styles/admin-schemes-rtl.min.css 775 B
build/styles/base-styles/admin-schemes.css 1.71 kB
build/styles/base-styles/admin-schemes.min.css 775 B
build/styles/block-directory/style-rtl.css 1.97 kB
build/styles/block-directory/style-rtl.min.css 1.06 kB
build/styles/block-directory/style.css 1.98 kB
build/styles/block-directory/style.min.css 1.06 kB
build/styles/block-editor/content-rtl.css 5.44 kB
build/styles/block-editor/content-rtl.min.css 4.01 kB
build/styles/block-editor/content.css 5.44 kB
build/styles/block-editor/content.min.css 4.01 kB
build/styles/block-editor/default-editor-styles-rtl.css 697 B
build/styles/block-editor/default-editor-styles-rtl.min.css 224 B
build/styles/block-editor/default-editor-styles.css 697 B
build/styles/block-editor/default-editor-styles.min.css 224 B
build/styles/block-editor/style-rtl.css 18.7 kB
build/styles/block-editor/style-rtl.min.css 15.9 kB
build/styles/block-editor/style.css 18.7 kB
build/styles/block-editor/style.min.css 15.9 kB
build/styles/block-library/accordion-heading/style-rtl.css 346 B
build/styles/block-library/accordion-heading/style-rtl.min.css 325 B
build/styles/block-library/accordion-heading/style.css 346 B
build/styles/block-library/accordion-heading/style.min.css 325 B
build/styles/block-library/accordion-item/style-rtl.css 239 B
build/styles/block-library/accordion-item/style-rtl.min.css 180 B
build/styles/block-library/accordion-item/style.css 238 B
build/styles/block-library/accordion-item/style.min.css 180 B
build/styles/block-library/accordion-panel/style-rtl.css 110 B
build/styles/block-library/accordion-panel/style-rtl.min.css 99 B
build/styles/block-library/accordion-panel/style.css 110 B
build/styles/block-library/accordion-panel/style.min.css 99 B
build/styles/block-library/accordion/style-rtl.css 69 B
build/styles/block-library/accordion/style-rtl.min.css 62 B
build/styles/block-library/accordion/style.css 69 B
build/styles/block-library/accordion/style.min.css 62 B
build/styles/block-library/archives/style-rtl.css 101 B
build/styles/block-library/archives/style-rtl.min.css 90 B
build/styles/block-library/archives/style.css 101 B
build/styles/block-library/archives/style.min.css 90 B
build/styles/block-library/audio/editor-rtl.css 166 B
build/styles/block-library/audio/editor-rtl.min.css 149 B
build/styles/block-library/audio/editor.css 166 B
build/styles/block-library/audio/editor.min.css 151 B
build/styles/block-library/audio/style-rtl.css 945 B
build/styles/block-library/audio/style-rtl.min.css 132 B
build/styles/block-library/audio/style.css 945 B
build/styles/block-library/audio/style.min.css 132 B
build/styles/block-library/audio/theme-rtl.css 967 B
build/styles/block-library/audio/theme-rtl.min.css 134 B
build/styles/block-library/audio/theme.css 967 B
build/styles/block-library/audio/theme.min.css 134 B
build/styles/block-library/avatar/editor-rtl.css 127 B
build/styles/block-library/avatar/editor-rtl.min.css 115 B
build/styles/block-library/avatar/editor.css 127 B
build/styles/block-library/avatar/editor.min.css 115 B
build/styles/block-library/avatar/style-rtl.css 117 B
build/styles/block-library/avatar/style-rtl.min.css 104 B
build/styles/block-library/avatar/style.css 117 B
build/styles/block-library/avatar/style.min.css 104 B
build/styles/block-library/breadcrumbs/style-rtl.css 233 B
build/styles/block-library/breadcrumbs/style-rtl.min.css 203 B
build/styles/block-library/breadcrumbs/style.css 233 B
build/styles/block-library/breadcrumbs/style.min.css 203 B
build/styles/block-library/button/editor-rtl.css 306 B
build/styles/block-library/button/editor-rtl.min.css 265 B
build/styles/block-library/button/editor.css 317 B
build/styles/block-library/button/editor.min.css 265 B
build/styles/block-library/button/style-rtl.css 651 B
build/styles/block-library/button/style-rtl.min.css 596 B
build/styles/block-library/button/style.css 662 B
build/styles/block-library/button/style.min.css 596 B
build/styles/block-library/buttons/editor-rtl.css 391 B
build/styles/block-library/buttons/editor-rtl.min.css 291 B
build/styles/block-library/buttons/editor.css 391 B
build/styles/block-library/buttons/editor.min.css 291 B
build/styles/block-library/buttons/style-rtl.css 452 B
build/styles/block-library/buttons/style-rtl.min.css 349 B
build/styles/block-library/buttons/style.css 453 B
build/styles/block-library/buttons/style.min.css 349 B
build/styles/block-library/calendar/style-rtl.css 271 B
build/styles/block-library/calendar/style-rtl.min.css 239 B
build/styles/block-library/calendar/style.css 271 B
build/styles/block-library/calendar/style.min.css 239 B
build/styles/block-library/categories/editor-rtl.css 171 B
build/styles/block-library/categories/editor-rtl.min.css 132 B
build/styles/block-library/categories/editor.css 170 B
build/styles/block-library/categories/editor.min.css 131 B
build/styles/block-library/categories/style-rtl.css 226 B
build/styles/block-library/categories/style-rtl.min.css 169 B
build/styles/block-library/categories/style.css 235 B
build/styles/block-library/categories/style.min.css 169 B
build/styles/block-library/classic-rtl.css 402 B
build/styles/block-library/classic-rtl.min.css 358 B
build/styles/block-library/classic.css 402 B
build/styles/block-library/classic.min.css 358 B
build/styles/block-library/code/editor-rtl.css 59 B
build/styles/block-library/code/editor-rtl.min.css 53 B
build/styles/block-library/code/editor.css 59 B
build/styles/block-library/code/editor.min.css 53 B
build/styles/block-library/code/style-rtl.css 158 B
build/styles/block-library/code/style-rtl.min.css 140 B
build/styles/block-library/code/style.css 178 B
build/styles/block-library/code/style.min.css 140 B
build/styles/block-library/code/theme-rtl.css 135 B
build/styles/block-library/code/theme-rtl.min.css 122 B
build/styles/block-library/code/theme.css 135 B
build/styles/block-library/code/theme.min.css 122 B
build/styles/block-library/columns/editor-rtl.css 119 B
build/styles/block-library/columns/editor-rtl.min.css 108 B
build/styles/block-library/columns/editor.css 119 B
build/styles/block-library/columns/editor.min.css 108 B
build/styles/block-library/columns/style-rtl.css 1.3 kB
build/styles/block-library/columns/style-rtl.min.css 421 B
build/styles/block-library/columns/style.css 1.3 kB
build/styles/block-library/columns/style.min.css 421 B
build/styles/block-library/comment-author-avatar/editor-rtl.css 136 B
build/styles/block-library/comment-author-avatar/editor-rtl.min.css 124 B
build/styles/block-library/comment-author-avatar/editor.css 136 B
build/styles/block-library/comment-author-avatar/editor.min.css 124 B
build/styles/block-library/comment-author-name/style-rtl.css 79 B
build/styles/block-library/comment-author-name/style-rtl.min.css 72 B
build/styles/block-library/comment-author-name/style.css 79 B
build/styles/block-library/comment-author-name/style.min.css 72 B
build/styles/block-library/comment-content/style-rtl.css 137 B
build/styles/block-library/comment-content/style-rtl.min.css 120 B
build/styles/block-library/comment-content/style.css 137 B
build/styles/block-library/comment-content/style.min.css 120 B
build/styles/block-library/comment-date/style-rtl.css 72 B
build/styles/block-library/comment-date/style-rtl.min.css 65 B
build/styles/block-library/comment-date/style.css 72 B
build/styles/block-library/comment-date/style.min.css 65 B
build/styles/block-library/comment-edit-link/style-rtl.css 77 B
build/styles/block-library/comment-edit-link/style-rtl.min.css 70 B
build/styles/block-library/comment-edit-link/style.css 77 B
build/styles/block-library/comment-edit-link/style.min.css 70 B
build/styles/block-library/comment-reply-link/style-rtl.css 78 B
build/styles/block-library/comment-reply-link/style-rtl.min.css 71 B
build/styles/block-library/comment-reply-link/style.css 78 B
build/styles/block-library/comment-reply-link/style.min.css 71 B
build/styles/block-library/comment-template/style-rtl.css 213 B
build/styles/block-library/comment-template/style-rtl.min.css 191 B
build/styles/block-library/comment-template/style.css 213 B
build/styles/block-library/comment-template/style.min.css 191 B
build/styles/block-library/comments-pagination-numbers/editor-rtl.css 135 B
build/styles/block-library/comments-pagination-numbers/editor-rtl.min.css 122 B
build/styles/block-library/comments-pagination-numbers/editor.css 144 B
build/styles/block-library/comments-pagination-numbers/editor.min.css 121 B
build/styles/block-library/comments-pagination/editor-rtl.css 184 B
build/styles/block-library/comments-pagination/editor-rtl.min.css 168 B
build/styles/block-library/comments-pagination/editor.css 184 B
build/styles/block-library/comments-pagination/editor.min.css 168 B
build/styles/block-library/comments-pagination/style-rtl.css 224 B
build/styles/block-library/comments-pagination/style-rtl.min.css 201 B
build/styles/block-library/comments-pagination/style.css 236 B
build/styles/block-library/comments-pagination/style.min.css 201 B
build/styles/block-library/comments-title/editor-rtl.css 83 B
build/styles/block-library/comments-title/editor-rtl.min.css 75 B
build/styles/block-library/comments-title/editor.css 83 B
build/styles/block-library/comments-title/editor.min.css 75 B
build/styles/block-library/comments/editor-rtl.css 968 B
build/styles/block-library/comments/editor-rtl.min.css 842 B
build/styles/block-library/comments/editor.css 968 B
build/styles/block-library/comments/editor.min.css 842 B
build/styles/block-library/comments/style-rtl.css 754 B
build/styles/block-library/comments/style-rtl.min.css 637 B
build/styles/block-library/comments/style.css 752 B
build/styles/block-library/comments/style.min.css 637 B
build/styles/block-library/common-rtl.css 2.48 kB
build/styles/block-library/common-rtl.min.css 1.12 kB
build/styles/block-library/common.css 2.5 kB
build/styles/block-library/common.min.css 1.12 kB
build/styles/block-library/cover/editor-rtl.css 1.05 kB
build/styles/block-library/cover/editor-rtl.min.css 631 B
build/styles/block-library/cover/editor.css 1.05 kB
build/styles/block-library/cover/editor.min.css 631 B
build/styles/block-library/cover/style-rtl.css 2.5 kB
build/styles/block-library/cover/style-rtl.min.css 1.82 kB
build/styles/block-library/cover/style.css 2.51 kB
build/styles/block-library/cover/style.min.css 1.81 kB
build/styles/block-library/details/editor-rtl.css 72 B
build/styles/block-library/details/editor-rtl.min.css 65 B
build/styles/block-library/details/editor.css 72 B
build/styles/block-library/details/editor.min.css 65 B
build/styles/block-library/details/style-rtl.css 97 B
build/styles/block-library/details/style-rtl.min.css 86 B
build/styles/block-library/details/style.css 97 B
build/styles/block-library/details/style.min.css 86 B
build/styles/block-library/editor-elements-rtl.css 117 B
build/styles/block-library/editor-elements-rtl.min.css 75 B
build/styles/block-library/editor-elements.css 117 B
build/styles/block-library/editor-elements.min.css 75 B
build/styles/block-library/editor-rtl.css 12.5 kB
build/styles/block-library/editor-rtl.min.css 10.3 kB
build/styles/block-library/editor.css 12.5 kB
build/styles/block-library/editor.min.css 10.3 kB
build/styles/block-library/elements-rtl.css 84 B
build/styles/block-library/elements-rtl.min.css 54 B
build/styles/block-library/elements.css 84 B
build/styles/block-library/elements.min.css 54 B
build/styles/block-library/embed/editor-rtl.css 391 B
build/styles/block-library/embed/editor-rtl.min.css 331 B
build/styles/block-library/embed/editor.css 390 B
build/styles/block-library/embed/editor.min.css 331 B
build/styles/block-library/embed/style-rtl.css 1.29 kB
build/styles/block-library/embed/style-rtl.min.css 448 B
build/styles/block-library/embed/style.css 1.29 kB
build/styles/block-library/embed/style.min.css 448 B
build/styles/block-library/embed/theme-rtl.css 967 B
build/styles/block-library/embed/theme-rtl.min.css 133 B
build/styles/block-library/embed/theme.css 967 B
build/styles/block-library/embed/theme.min.css 133 B
build/styles/block-library/file/editor-rtl.css 352 B
build/styles/block-library/file/editor-rtl.min.css 324 B
build/styles/block-library/file/editor.css 353 B
build/styles/block-library/file/editor.min.css 324 B
build/styles/block-library/file/style-rtl.css 318 B
build/styles/block-library/file/style-rtl.min.css 278 B
build/styles/block-library/file/style.css 331 B
build/styles/block-library/file/style.min.css 278 B
build/styles/block-library/footnotes/style-rtl.css 220 B
build/styles/block-library/footnotes/style-rtl.min.css 198 B
build/styles/block-library/footnotes/style.css 219 B
build/styles/block-library/footnotes/style.min.css 197 B
build/styles/block-library/form-input/editor-rtl.css 286 B
build/styles/block-library/form-input/editor-rtl.min.css 265 B
build/styles/block-library/form-input/editor.css 285 B
build/styles/block-library/form-input/editor.min.css 264 B
build/styles/block-library/form-input/style-rtl.css 467 B
build/styles/block-library/form-input/style-rtl.min.css 366 B
build/styles/block-library/form-input/style.css 467 B
build/styles/block-library/form-input/style.min.css 366 B
build/styles/block-library/form-submission-notification/editor-rtl.css 368 B
build/styles/block-library/form-submission-notification/editor-rtl.min.css 344 B
build/styles/block-library/form-submission-notification/editor.css 368 B
build/styles/block-library/form-submission-notification/editor.min.css 341 B
build/styles/block-library/form-submit-button/style-rtl.css 77 B
build/styles/block-library/form-submit-button/style-rtl.min.css 69 B
build/styles/block-library/form-submit-button/style.css 77 B
build/styles/block-library/form-submit-button/style.min.css 69 B
build/styles/block-library/freeform/editor-rtl.css 1.12 kB
build/styles/block-library/freeform/editor-rtl.min.css 288 B
build/styles/block-library/freeform/editor.css 1.12 kB
build/styles/block-library/freeform/editor.min.css 288 B
build/styles/block-library/gallery/editor-rtl.css 1.52 kB
build/styles/block-library/gallery/editor-rtl.min.css 615 B
build/styles/block-library/gallery/editor.css 1.52 kB
build/styles/block-library/gallery/editor.min.css 616 B
build/styles/block-library/gallery/style-rtl.css 2.84 kB
build/styles/block-library/gallery/style-rtl.min.css 1.84 kB
build/styles/block-library/gallery/style.css 2.84 kB
build/styles/block-library/gallery/style.min.css 1.84 kB
build/styles/block-library/gallery/theme-rtl.css 941 B
build/styles/block-library/gallery/theme-rtl.min.css 108 B
build/styles/block-library/gallery/theme.css 941 B
build/styles/block-library/gallery/theme.min.css 108 B
build/styles/block-library/group/editor-rtl.css 772 B
build/styles/block-library/group/editor-rtl.min.css 335 B
build/styles/block-library/group/editor.css 772 B
build/styles/block-library/group/editor.min.css 335 B
build/styles/block-library/group/style-rtl.css 120 B
build/styles/block-library/group/style-rtl.min.css 103 B
build/styles/block-library/group/style.css 120 B
build/styles/block-library/group/style.min.css 103 B
build/styles/block-library/group/theme-rtl.css 468 B
build/styles/block-library/group/theme-rtl.min.css 79 B
build/styles/block-library/group/theme.css 468 B
build/styles/block-library/group/theme.min.css 79 B
build/styles/block-library/heading/style-rtl.css 604 B
build/styles/block-library/heading/style-rtl.min.css 205 B
build/styles/block-library/heading/style.css 604 B
build/styles/block-library/heading/style.min.css 205 B
build/styles/block-library/html/editor-rtl.css 1.29 kB
build/styles/block-library/html/editor-rtl.min.css 464 B
build/styles/block-library/html/editor.css 1.3 kB
build/styles/block-library/html/editor.min.css 464 B
build/styles/block-library/icon/editor-rtl.css 776 B
build/styles/block-library/icon/editor-rtl.min.css 377 B
build/styles/block-library/icon/editor.css 776 B
build/styles/block-library/icon/editor.min.css 377 B
build/styles/block-library/icon/style-rtl.css 218 B
build/styles/block-library/icon/style-rtl.min.css 154 B
build/styles/block-library/icon/style.css 218 B
build/styles/block-library/icon/style.min.css 154 B
build/styles/block-library/image/editor-rtl.css 1.64 kB
build/styles/block-library/image/editor-rtl.min.css 782 B
build/styles/block-library/image/editor.css 1.64 kB
build/styles/block-library/image/editor.min.css 780 B
build/styles/block-library/image/style-rtl.css 2.92 kB
build/styles/block-library/image/style-rtl.min.css 1.86 kB
build/styles/block-library/image/style.css 2.92 kB
build/styles/block-library/image/style.min.css 1.85 kB
build/styles/block-library/image/theme-rtl.css 971 B
build/styles/block-library/image/theme-rtl.min.css 137 B
build/styles/block-library/image/theme.css 971 B
build/styles/block-library/image/theme.min.css 137 B
build/styles/block-library/latest-comments/style-rtl.css 392 B
build/styles/block-library/latest-comments/style-rtl.min.css 352 B
build/styles/block-library/latest-comments/style.css 390 B
build/styles/block-library/latest-comments/style.min.css 352 B
build/styles/block-library/latest-posts/editor-rtl.css 154 B
build/styles/block-library/latest-posts/editor-rtl.min.css 139 B
build/styles/block-library/latest-posts/editor.css 153 B
build/styles/block-library/latest-posts/editor.min.css 138 B
build/styles/block-library/latest-posts/style-rtl.css 1.36 kB
build/styles/block-library/latest-posts/style-rtl.min.css 520 B
build/styles/block-library/latest-posts/style.css 1.37 kB
build/styles/block-library/latest-posts/style.min.css 520 B
build/styles/block-library/list/style-rtl.css 498 B
build/styles/block-library/list/style-rtl.min.css 107 B
build/styles/block-library/list/style.css 498 B
build/styles/block-library/list/style.min.css 107 B
build/styles/block-library/loginout/style-rtl.css 68 B
build/styles/block-library/loginout/style-rtl.min.css 61 B
build/styles/block-library/loginout/style.css 68 B
build/styles/block-library/loginout/style.min.css 61 B
build/styles/block-library/math/editor-rtl.css 491 B
build/styles/block-library/math/editor-rtl.min.css 105 B
build/styles/block-library/math/editor.css 502 B
build/styles/block-library/math/editor.min.css 105 B
build/styles/block-library/math/style-rtl.css 70 B
build/styles/block-library/math/style-rtl.min.css 61 B
build/styles/block-library/math/style.css 70 B
build/styles/block-library/math/style.min.css 61 B
build/styles/block-library/media-text/editor-rtl.css 389 B
build/styles/block-library/media-text/editor-rtl.min.css 321 B
build/styles/block-library/media-text/editor.css 389 B
build/styles/block-library/media-text/editor.min.css 320 B
build/styles/block-library/media-text/style-rtl.css 873 B
build/styles/block-library/media-text/style-rtl.min.css 552 B
build/styles/block-library/media-text/style.css 901 B
build/styles/block-library/media-text/style.min.css 550 B
build/styles/block-library/more/editor-rtl.css 796 B
build/styles/block-library/more/editor-rtl.min.css 393 B
build/styles/block-library/more/editor.css 798 B
build/styles/block-library/more/editor.min.css 393 B
build/styles/block-library/navigation-link/editor-rtl.css 1.28 kB
build/styles/block-library/navigation-link/editor-rtl.min.css 710 B
build/styles/block-library/navigation-link/editor.css 1.27 kB
build/styles/block-library/navigation-link/editor.min.css 713 B
build/styles/block-library/navigation-link/style-rtl.css 579 B
build/styles/block-library/navigation-link/style-rtl.min.css 190 B
build/styles/block-library/navigation-link/style.css 579 B
build/styles/block-library/navigation-link/style.min.css 188 B
build/styles/block-library/navigation-overlay-close/style-rtl.css 260 B
build/styles/block-library/navigation-overlay-close/style-rtl.min.css 237 B
build/styles/block-library/navigation-overlay-close/style.css 260 B
build/styles/block-library/navigation-overlay-close/style.min.css 237 B
build/styles/block-library/navigation-submenu/editor-rtl.css 1.12 kB
build/styles/block-library/navigation-submenu/editor-rtl.min.css 295 B
build/styles/block-library/navigation-submenu/editor.css 1.12 kB
build/styles/block-library/navigation-submenu/editor.min.css 294 B
build/styles/block-library/navigation/editor-rtl.css 3.28 kB
build/styles/block-library/navigation/editor-rtl.min.css 2.28 kB
build/styles/block-library/navigation/editor.css 3.29 kB
build/styles/block-library/navigation/editor.min.css 2.28 kB
build/styles/block-library/navigation/style-rtl.css 3.59 kB
build/styles/block-library/navigation/style-rtl.min.css 2.52 kB
build/styles/block-library/navigation/style.css 3.59 kB
build/styles/block-library/navigation/style.min.css 2.5 kB
build/styles/block-library/nextpage/editor-rtl.css 799 B
build/styles/block-library/nextpage/editor-rtl.min.css 392 B
build/styles/block-library/nextpage/editor.css 800 B
build/styles/block-library/nextpage/editor.min.css 392 B
build/styles/block-library/page-list/editor-rtl.css 1.18 kB
build/styles/block-library/page-list/editor-rtl.min.css 356 B
build/styles/block-library/page-list/editor.css 1.18 kB
build/styles/block-library/page-list/editor.min.css 356 B
build/styles/block-library/page-list/style-rtl.css 207 B
build/styles/block-library/page-list/style-rtl.min.css 192 B
build/styles/block-library/page-list/style.css 207 B
build/styles/block-library/page-list/style.min.css 192 B
build/styles/block-library/paragraph/editor-rtl.css 315 B
build/styles/block-library/paragraph/editor-rtl.min.css 292 B
build/styles/block-library/paragraph/editor.css 314 B
build/styles/block-library/paragraph/editor.min.css 292 B
build/styles/block-library/paragraph/style-rtl.css 746 B
build/styles/block-library/paragraph/style-rtl.min.css 341 B
build/styles/block-library/paragraph/style.css 752 B
build/styles/block-library/paragraph/style.min.css 340 B
build/styles/block-library/playlist-track/style-rtl.css 453 B
build/styles/block-library/playlist-track/style-rtl.min.css 420 B
build/styles/block-library/playlist-track/style.css 453 B
build/styles/block-library/playlist-track/style.min.css 420 B
build/styles/block-library/playlist/editor-rtl.css 120 B
build/styles/block-library/playlist/editor-rtl.min.css 112 B
build/styles/block-library/playlist/editor.css 120 B
build/styles/block-library/playlist/editor.min.css 112 B
build/styles/block-library/playlist/style-rtl.css 1.52 kB
build/styles/block-library/playlist/style-rtl.min.css 1.42 kB
build/styles/block-library/playlist/style.css 1.52 kB
build/styles/block-library/playlist/style.min.css 1.42 kB
build/styles/block-library/post-author-biography/style-rtl.css 96 B
build/styles/block-library/post-author-biography/style-rtl.min.css 86 B
build/styles/block-library/post-author-biography/style.css 96 B
build/styles/block-library/post-author-biography/style.min.css 86 B
build/styles/block-library/post-author-name/style-rtl.css 76 B
build/styles/block-library/post-author-name/style-rtl.min.css 69 B
build/styles/block-library/post-author-name/style.css 76 B
build/styles/block-library/post-author-name/style.min.css 69 B
build/styles/block-library/post-author/editor-rtl.css 490 B
build/styles/block-library/post-author/editor-rtl.min.css 104 B
build/styles/block-library/post-author/editor.css 490 B
build/styles/block-library/post-author/editor.min.css 104 B
build/styles/block-library/post-author/style-rtl.css 213 B
build/styles/block-library/post-author/style-rtl.min.css 188 B
build/styles/block-library/post-author/style.css 214 B
build/styles/block-library/post-author/style.min.css 189 B
build/styles/block-library/post-comments-count/style-rtl.css 79 B
build/styles/block-library/post-comments-count/style-rtl.min.css 72 B
build/styles/block-library/post-comments-count/style.css 79 B
build/styles/block-library/post-comments-count/style.min.css 72 B
build/styles/block-library/post-comments-form/editor-rtl.css 104 B
build/styles/block-library/post-comments-form/editor-rtl.min.css 96 B
build/styles/block-library/post-comments-form/editor.css 104 B
build/styles/block-library/post-comments-form/editor.min.css 96 B
build/styles/block-library/post-comments-form/style-rtl.css 585 B
build/styles/block-library/post-comments-form/style-rtl.min.css 525 B
build/styles/block-library/post-comments-form/style.css 584 B
build/styles/block-library/post-comments-form/style.min.css 525 B
build/styles/block-library/post-comments-link/style-rtl.css 78 B
build/styles/block-library/post-comments-link/style-rtl.min.css 71 B
build/styles/block-library/post-comments-link/style.css 78 B
build/styles/block-library/post-comments-link/style.min.css 71 B
build/styles/block-library/post-content/style-rtl.css 68 B
build/styles/block-library/post-content/style-rtl.min.css 61 B
build/styles/block-library/post-content/style.css 68 B
build/styles/block-library/post-content/style.min.css 61 B
build/styles/block-library/post-date/style-rtl.css 69 B
build/styles/block-library/post-date/style-rtl.min.css 62 B
build/styles/block-library/post-date/style.css 69 B
build/styles/block-library/post-date/style.min.css 62 B
build/styles/block-library/post-excerpt/editor-rtl.css 78 B
build/styles/block-library/post-excerpt/editor-rtl.min.css 71 B
build/styles/block-library/post-excerpt/editor.css 78 B
build/styles/block-library/post-excerpt/editor.min.css 71 B
build/styles/block-library/post-excerpt/style-rtl.css 171 B
build/styles/block-library/post-excerpt/style-rtl.min.css 155 B
build/styles/block-library/post-excerpt/style.css 171 B
build/styles/block-library/post-excerpt/style.min.css 155 B
build/styles/block-library/post-featured-image/editor-rtl.css 1.14 kB
build/styles/block-library/post-featured-image/editor-rtl.min.css 719 B
build/styles/block-library/post-featured-image/editor.css 1.14 kB
build/styles/block-library/post-featured-image/editor.min.css 717 B
build/styles/block-library/post-featured-image/style-rtl.css 392 B
build/styles/block-library/post-featured-image/style-rtl.min.css 347 B
build/styles/block-library/post-featured-image/style.css 392 B
build/styles/block-library/post-featured-image/style.min.css 347 B
build/styles/block-library/post-navigation-link/style-rtl.css 234 B
build/styles/block-library/post-navigation-link/style-rtl.min.css 215 B
build/styles/block-library/post-navigation-link/style.css 245 B
build/styles/block-library/post-navigation-link/style.min.css 214 B
build/styles/block-library/post-template/style-rtl.css 1.27 kB
build/styles/block-library/post-template/style-rtl.min.css 441 B
build/styles/block-library/post-template/style.css 1.27 kB
build/styles/block-library/post-template/style.min.css 441 B
build/styles/block-library/post-terms/style-rtl.css 108 B
build/styles/block-library/post-terms/style-rtl.min.css 96 B
build/styles/block-library/post-terms/style.css 108 B
build/styles/block-library/post-terms/style.min.css 96 B
build/styles/block-library/post-time-to-read/style-rtl.css 77 B
build/styles/block-library/post-time-to-read/style-rtl.min.css 70 B
build/styles/block-library/post-time-to-read/style.css 77 B
build/styles/block-library/post-time-to-read/style.min.css 70 B
build/styles/block-library/post-title/style-rtl.css 175 B
build/styles/block-library/post-title/style-rtl.min.css 162 B
build/styles/block-library/post-title/style.css 175 B
build/styles/block-library/post-title/style.min.css 162 B
build/styles/block-library/preformatted/style-rtl.css 511 B
build/styles/block-library/preformatted/style-rtl.min.css 125 B
build/styles/block-library/preformatted/style.css 511 B
build/styles/block-library/preformatted/style.min.css 125 B
build/styles/block-library/pullquote/editor-rtl.css 146 B
build/styles/block-library/pullquote/editor-rtl.min.css 133 B
build/styles/block-library/pullquote/editor.css 146 B
build/styles/block-library/pullquote/editor.min.css 133 B
build/styles/block-library/pullquote/style-rtl.css 765 B
build/styles/block-library/pullquote/style-rtl.min.css 365 B
build/styles/block-library/pullquote/style.css 764 B
build/styles/block-library/pullquote/style.min.css 365 B
build/styles/block-library/pullquote/theme-rtl.css 195 B
build/styles/block-library/pullquote/theme-rtl.min.css 176 B
build/styles/block-library/pullquote/theme.css 195 B
build/styles/block-library/pullquote/theme.min.css 176 B
build/styles/block-library/query-pagination-numbers/editor-rtl.css 134 B
build/styles/block-library/query-pagination-numbers/editor-rtl.min.css 121 B
build/styles/block-library/query-pagination-numbers/editor.css 144 B
build/styles/block-library/query-pagination-numbers/editor.min.css 118 B
build/styles/block-library/query-pagination/editor-rtl.css 168 B
build/styles/block-library/query-pagination/editor-rtl.min.css 154 B
build/styles/block-library/query-pagination/editor.css 168 B
build/styles/block-library/query-pagination/editor.min.css 154 B
build/styles/block-library/query-pagination/style-rtl.css 254 B
build/styles/block-library/query-pagination/style-rtl.min.css 237 B
build/styles/block-library/query-pagination/style.css 265 B
build/styles/block-library/query-pagination/style.min.css 237 B
build/styles/block-library/query-title/style-rtl.css 71 B
build/styles/block-library/query-title/style-rtl.min.css 64 B
build/styles/block-library/query-title/style.css 71 B
build/styles/block-library/query-title/style.min.css 64 B
build/styles/block-library/query-total/style-rtl.css 71 B
build/styles/block-library/query-total/style-rtl.min.css 64 B
build/styles/block-library/query-total/style.css 71 B
build/styles/block-library/query-total/style.min.css 64 B
build/styles/block-library/query/editor-rtl.css 1.28 kB
build/styles/block-library/query/editor-rtl.min.css 438 B
build/styles/block-library/query/editor.css 1.28 kB
build/styles/block-library/query/editor.min.css 438 B
build/styles/block-library/quote/style-rtl.css 255 B
build/styles/block-library/quote/style-rtl.min.css 238 B
build/styles/block-library/quote/style.css 256 B
build/styles/block-library/quote/style.min.css 238 B
build/styles/block-library/quote/theme-rtl.css 253 B
build/styles/block-library/quote/theme-rtl.min.css 233 B
build/styles/block-library/quote/theme.css 254 B
build/styles/block-library/quote/theme.min.css 236 B
build/styles/block-library/read-more/style-rtl.css 146 B
build/styles/block-library/read-more/style-rtl.min.css 131 B
build/styles/block-library/read-more/style.css 146 B
build/styles/block-library/read-more/style.min.css 131 B
build/styles/block-library/reset-rtl.css 936 B
build/styles/block-library/reset-rtl.min.css 467 B
build/styles/block-library/reset.css 936 B
build/styles/block-library/reset.min.css 467 B
build/styles/block-library/rss/editor-rtl.css 144 B
build/styles/block-library/rss/editor-rtl.min.css 126 B
build/styles/block-library/rss/editor.css 144 B
build/styles/block-library/rss/editor.min.css 126 B
build/styles/block-library/rss/style-rtl.css 1.11 kB
build/styles/block-library/rss/style-rtl.min.css 284 B
build/styles/block-library/rss/style.css 1.12 kB
build/styles/block-library/rss/style.min.css 283 B
build/styles/block-library/search/editor-rtl.css 217 B
build/styles/block-library/search/editor-rtl.min.css 199 B
build/styles/block-library/search/editor.css 217 B
build/styles/block-library/search/editor.min.css 199 B
build/styles/block-library/search/style-rtl.css 1.1 kB
build/styles/block-library/search/style-rtl.min.css 665 B
build/styles/block-library/search/style.css 1.1 kB
build/styles/block-library/search/style.min.css 666 B
build/styles/block-library/search/theme-rtl.css 130 B
build/styles/block-library/search/theme-rtl.min.css 113 B
build/styles/block-library/search/theme.css 130 B
build/styles/block-library/search/theme.min.css 113 B
build/styles/block-library/separator/editor-rtl.css 106 B
build/styles/block-library/separator/editor-rtl.min.css 100 B
build/styles/block-library/separator/editor.css 106 B
build/styles/block-library/separator/editor.min.css 100 B
build/styles/block-library/separator/style-rtl.css 284 B
build/styles/block-library/separator/style-rtl.min.css 248 B
build/styles/block-library/separator/style.css 297 B
build/styles/block-library/separator/style.min.css 248 B
build/styles/block-library/separator/theme-rtl.css 226 B
build/styles/block-library/separator/theme-rtl.min.css 195 B
build/styles/block-library/separator/theme.css 226 B
build/styles/block-library/separator/theme.min.css 195 B
build/styles/block-library/shortcode/editor-rtl.css 1.1 kB
build/styles/block-library/shortcode/editor-rtl.min.css 286 B
build/styles/block-library/shortcode/editor.css 1.1 kB
build/styles/block-library/shortcode/editor.min.css 286 B
build/styles/block-library/site-logo/editor-rtl.css 1.12 kB
build/styles/block-library/site-logo/editor-rtl.min.css 696 B
build/styles/block-library/site-logo/editor.css 1.12 kB
build/styles/block-library/site-logo/editor.min.css 692 B
build/styles/block-library/site-logo/style-rtl.css 239 B
build/styles/block-library/site-logo/style-rtl.min.css 218 B
build/styles/block-library/site-logo/style.css 238 B
build/styles/block-library/site-logo/style.min.css 218 B
build/styles/block-library/site-tagline/editor-rtl.css 94 B
build/styles/block-library/site-tagline/editor-rtl.min.css 87 B
build/styles/block-library/site-tagline/editor.css 94 B
build/styles/block-library/site-tagline/editor.min.css 87 B
build/styles/block-library/site-tagline/style-rtl.css 72 B
build/styles/block-library/site-tagline/style-rtl.min.css 65 B
build/styles/block-library/site-tagline/style.css 72 B
build/styles/block-library/site-tagline/style.min.css 65 B
build/styles/block-library/site-title/editor-rtl.css 93 B
build/styles/block-library/site-title/editor-rtl.min.css 85 B
build/styles/block-library/site-title/editor.css 93 B
build/styles/block-library/site-title/editor.min.css 85 B
build/styles/block-library/site-title/style-rtl.css 153 B
build/styles/block-library/site-title/style-rtl.min.css 143 B
build/styles/block-library/site-title/style.css 153 B
build/styles/block-library/site-title/style.min.css 143 B
build/styles/block-library/social-link/editor-rtl.css 346 B
build/styles/block-library/social-link/editor-rtl.min.css 314 B
build/styles/block-library/social-link/editor.css 348 B
build/styles/block-library/social-link/editor.min.css 314 B
build/styles/block-library/social-links/editor-rtl.css 737 B
build/styles/block-library/social-links/editor-rtl.min.css 339 B
build/styles/block-library/social-links/editor.css 738 B
build/styles/block-library/social-links/editor.min.css 338 B
build/styles/block-library/social-links/style-rtl.css 1.57 kB
build/styles/block-library/social-links/style-rtl.min.css 1.51 kB
build/styles/block-library/social-links/style.css 1.57 kB
build/styles/block-library/social-links/style.min.css 1.51 kB
build/styles/block-library/spacer/editor-rtl.css 774 B
build/styles/block-library/spacer/editor-rtl.min.css 346 B
build/styles/block-library/spacer/editor.css 774 B
build/styles/block-library/spacer/editor.min.css 346 B
build/styles/block-library/spacer/style-rtl.css 55 B
build/styles/block-library/spacer/style-rtl.min.css 48 B
build/styles/block-library/spacer/style.css 55 B
build/styles/block-library/spacer/style.min.css 48 B
build/styles/block-library/style-rtl.css 21.5 kB
build/styles/block-library/style-rtl.min.css 18 kB
build/styles/block-library/style.css 21.6 kB
build/styles/block-library/style.min.css 18 kB
build/styles/block-library/tab-list/editor-rtl.css 107 B
build/styles/block-library/tab-list/editor-rtl.min.css 97 B
build/styles/block-library/tab-list/editor.css 107 B
build/styles/block-library/tab-list/editor.min.css 97 B
build/styles/block-library/tab-panel/style-rtl.css 238 B
build/styles/block-library/tab-panel/style-rtl.min.css 215 B
build/styles/block-library/tab-panel/style.css 238 B
build/styles/block-library/tab-panel/style.min.css 215 B
build/styles/block-library/tab-panels/style-rtl.css 76 B
build/styles/block-library/tab-panels/style-rtl.min.css 65 B
build/styles/block-library/tab-panels/style.css 76 B
build/styles/block-library/tab-panels/style.min.css 65 B
build/styles/block-library/tab/editor-rtl.css 160 B
build/styles/block-library/tab/editor-rtl.min.css 148 B
build/styles/block-library/tab/editor.css 160 B
build/styles/block-library/tab/editor.min.css 148 B
build/styles/block-library/tab/style-rtl.css 397 B
build/styles/block-library/tab/style-rtl.min.css 352 B
build/styles/block-library/tab/style.css 398 B
build/styles/block-library/tab/style.min.css 356 B
build/styles/block-library/table-of-contents/style-rtl.css 89 B
build/styles/block-library/table-of-contents/style-rtl.min.css 83 B
build/styles/block-library/table-of-contents/style.css 89 B
build/styles/block-library/table-of-contents/style.min.css 83 B
build/styles/block-library/table/editor-rtl.css 1.25 kB
build/styles/block-library/table/editor-rtl.min.css 394 B
build/styles/block-library/table/editor.css 1.25 kB
build/styles/block-library/table/editor.min.css 394 B
build/styles/block-library/table/style-rtl.css 1.06 kB
build/styles/block-library/table/style-rtl.min.css 641 B
build/styles/block-library/table/style.css 1.06 kB
build/styles/block-library/table/style.min.css 640 B
build/styles/block-library/table/theme-rtl.css 985 B
build/styles/block-library/table/theme-rtl.min.css 152 B
build/styles/block-library/table/theme.css 985 B
build/styles/block-library/table/theme.min.css 152 B
build/styles/block-library/tabs/style-rtl.css 64 B
build/styles/block-library/tabs/style-rtl.min.css 57 B
build/styles/block-library/tabs/style.css 64 B
build/styles/block-library/tabs/style.min.css 57 B
build/styles/block-library/tag-cloud/style-rtl.css 283 B
build/styles/block-library/tag-cloud/style-rtl.min.css 248 B
build/styles/block-library/tag-cloud/style.css 283 B
build/styles/block-library/tag-cloud/style.min.css 248 B
build/styles/block-library/template-part/editor-rtl.css 1.2 kB
build/styles/block-library/template-part/editor-rtl.min.css 368 B
build/styles/block-library/template-part/editor.css 1.2 kB
build/styles/block-library/template-part/editor.min.css 368 B
build/styles/block-library/template-part/theme-rtl.css 492 B
build/styles/block-library/template-part/theme-rtl.min.css 113 B
build/styles/block-library/template-part/theme.css 492 B
build/styles/block-library/template-part/theme.min.css 113 B
build/styles/block-library/term-count/style-rtl.css 70 B
build/styles/block-library/term-count/style-rtl.min.css 63 B
build/styles/block-library/term-count/style.css 70 B
build/styles/block-library/term-count/style.min.css 63 B
build/styles/block-library/term-description/style-rtl.css 138 B
build/styles/block-library/term-description/style-rtl.min.css 126 B
build/styles/block-library/term-description/style.css 138 B
build/styles/block-library/term-description/style.min.css 126 B
build/styles/block-library/term-name/style-rtl.css 69 B
build/styles/block-library/term-name/style-rtl.min.css 62 B
build/styles/block-library/term-name/style.css 69 B
build/styles/block-library/term-name/style.min.css 62 B
build/styles/block-library/term-template/editor-rtl.css 267 B
build/styles/block-library/term-template/editor-rtl.min.css 225 B
build/styles/block-library/term-template/editor.css 267 B
build/styles/block-library/term-template/editor.min.css 225 B
build/styles/block-library/term-template/style-rtl.css 124 B
build/styles/block-library/term-template/style-rtl.min.css 114 B
build/styles/block-library/term-template/style.css 124 B
build/styles/block-library/term-template/style.min.css 114 B
build/styles/block-library/text-columns/editor-rtl.css 481 B
build/styles/block-library/text-columns/editor-rtl.min.css 95 B
build/styles/block-library/text-columns/editor.css 481 B
build/styles/block-library/text-columns/editor.min.css 95 B
build/styles/block-library/text-columns/style-rtl.css 177 B
build/styles/block-library/text-columns/style-rtl.min.css 165 B
build/styles/block-library/text-columns/style.css 177 B
build/styles/block-library/text-columns/style.min.css 165 B
build/styles/block-library/theme-rtl.css 1.59 kB
build/styles/block-library/theme-rtl.min.css 715 B
build/styles/block-library/theme.css 1.6 kB
build/styles/block-library/theme.min.css 719 B
build/styles/block-library/verse/style-rtl.css 155 B
build/styles/block-library/verse/style-rtl.min.css 137 B
build/styles/block-library/verse/style.css 155 B
build/styles/block-library/verse/style.min.css 137 B
build/styles/block-library/video/editor-rtl.css 839 B
build/styles/block-library/video/editor-rtl.min.css 428 B
build/styles/block-library/video/editor.css 840 B
build/styles/block-library/video/editor.min.css 428 B
build/styles/block-library/video/style-rtl.css 1.02 kB
build/styles/block-library/video/style-rtl.min.css 202 B
build/styles/block-library/video/style.css 1.02 kB
build/styles/block-library/video/style.min.css 202 B
build/styles/block-library/video/theme-rtl.css 967 B
build/styles/block-library/video/theme-rtl.min.css 134 B
build/styles/block-library/video/theme.css 967 B
build/styles/block-library/video/theme.min.css 134 B
build/styles/commands/style-rtl.css 2.07 kB
build/styles/commands/style-rtl.min.css 1.17 kB
build/styles/commands/style.css 2.06 kB
build/styles/commands/style.min.css 1.17 kB
build/styles/components/style-rtl.css 17.6 kB
build/styles/components/style-rtl.min.css 14.4 kB
build/styles/components/style.css 17.7 kB
build/styles/components/style.min.css 14.4 kB
build/styles/customize-widgets/style-rtl.css 2.35 kB
build/styles/customize-widgets/style-rtl.min.css 1.44 kB
build/styles/customize-widgets/style.css 2.35 kB
build/styles/customize-widgets/style.min.css 1.44 kB
build/styles/edit-post/classic-rtl.css 1.29 kB
build/styles/edit-post/classic-rtl.min.css 425 B
build/styles/edit-post/classic.css 1.31 kB
build/styles/edit-post/classic.min.css 428 B
build/styles/edit-post/style-rtl.css 3.51 kB
build/styles/edit-post/style-rtl.min.css 2.21 kB
build/styles/edit-post/style.css 3.52 kB
build/styles/edit-post/style.min.css 2.21 kB
build/styles/edit-site/style-rtl.css 21.1 kB
build/styles/edit-site/style-rtl.min.css 17.2 kB
build/styles/edit-site/style.css 21.1 kB
build/styles/edit-site/style.min.css 17.2 kB
build/styles/edit-widgets/style-rtl.css 4.85 kB
build/styles/edit-widgets/style-rtl.min.css 3.52 kB
build/styles/edit-widgets/style.css 4.85 kB
build/styles/edit-widgets/style.min.css 3.52 kB
build/styles/editor/style-rtl.css 29.4 kB
build/styles/editor/style-rtl.min.css 24.8 kB
build/styles/editor/style.css 29.4 kB
build/styles/editor/style.min.css 24.8 kB
build/styles/format-library/style-rtl.css 735 B
build/styles/format-library/style-rtl.min.css 326 B
build/styles/format-library/style.css 746 B
build/styles/format-library/style.min.css 326 B
build/styles/list-reusable-blocks/style-rtl.css 1.07 kB
build/styles/list-reusable-blocks/style-rtl.min.css 250 B
build/styles/list-reusable-blocks/style.css 1.07 kB
build/styles/list-reusable-blocks/style.min.css 249 B
build/styles/media-utils/style-rtl.css 2.08 kB
build/styles/media-utils/style-rtl.min.css 1.17 kB
build/styles/media-utils/style.css 2.08 kB
build/styles/media-utils/style.min.css 1.17 kB
build/styles/nux/style-rtl.css 1.48 kB
build/styles/nux/style-rtl.min.css 622 B
build/styles/nux/style.css 1.5 kB
build/styles/nux/style.min.css 618 B
build/styles/patterns/style-rtl.css 1.46 kB
build/styles/patterns/style-rtl.min.css 611 B
build/styles/patterns/style.css 1.46 kB
build/styles/patterns/style.min.css 611 B
build/styles/preferences/style-rtl.css 1.26 kB
build/styles/preferences/style-rtl.min.css 415 B
build/styles/preferences/style.css 1.26 kB
build/styles/preferences/style.min.css 415 B
build/styles/reusable-blocks/style-rtl.css 1.11 kB
build/styles/reusable-blocks/style-rtl.min.css 275 B
build/styles/reusable-blocks/style.css 1.11 kB
build/styles/reusable-blocks/style.min.css 275 B
build/styles/widgets/style-rtl.css 2.05 kB
build/styles/widgets/style-rtl.min.css 1.16 kB
build/styles/widgets/style.css 2.06 kB
build/styles/widgets/style.min.css 1.16 kB

compressed-size-action

@jasmussen jasmussen added the [Type] Feature New feature to highlight in changelogs. label May 15, 2026
@t-hamano

Copy link
Copy Markdown
Contributor

Thanks for the PR! I think this is a great suggestion.

In my opinion, generating PHP for icons is redundant because the Icons Registry already holds the data for registered icons. This data should be parsable using the HTML Tag Processor, allowing for the injection of arbitrary attributes.

So, the wp_icon function should be something like a simple helper function that combines the Icons registry and the HTML Tag Processor. For example:

function wp_icon( $icon_name, $args = array() ) {
	// Default parameters.
	$args = wp_parse_args(
		$args,
		array(
			'size'  => 24,
			'label' => '',
			'class' => '',
		)
	);

	// Check if an icon is registered in the Icons Registry.
	$icon = WP_Icons_Registry::get_instance()->get_registered_icon( $icon_name );
	if ( is_null( $icon ) ) {
		return '';
	}

	$processor = new WP_HTML_Tag_Processor( $icon['content'] );

	// Data is not considered valid if it does not contain an SVG element.
	if ( ! $processor->next_tag( 'svg' ) ) {
		return '';
	}

	// Inject the `size` attribute.
	$processor->set_attribute( 'width', (string) $args['size'] );
	$processor->set_attribute( 'height', (string) $args['size'] );

	// Inject the `aria-label` atribute.
	if ( ! empty( $args['label'] ) ) {
		$processor->set_attribute( 'aria-label', $args['label'] );
	}

	// Inject additional CSS classes.
	if ( ! empty( $args['class'] ) ) {
		$processor->add_class( $args['class'] );
	}

	return $processor->get_updated_html();
}

@jasmussen

Copy link
Copy Markdown
Contributor Author

Solid feedback. In 0d2c4f5 the bot and I, we, whatever, pushed changes based on this, which drastically reduces the complexity of the PR.

On my mind in this effort is to create a new PHP way to insert icons that mimicks as closely as possible the React based one. It seems entirely useful to use the registry, I really like the idea that the function could also reference icons registered by third party plugins.

One key aspect I'd like to maintain, though, is that if you know the name of an icon, you should be able to insert it even if it hasn't been flagged "public". Feel free to clarify any nuance I'm missing in this, but the motivation really is to further the admin refresh that has been started in WordPress 7.0: to actually use this icon set in all of WordPress to unify towards a single icon set. Let me know your thoughts on the latest diff!

@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown

Flaky tests detected in 6610d51.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27952525147
📝 Reported issues:

@t-hamano t-hamano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. One important consideration is what to name the function.

wp_icon();
the_wp_icon();

Upon investigating the core, there are no function names with the the_wp_ prefix.

My proposal is the following:

wp_get_icon();
wp_icon();

Comment thread lib/compat/wordpress-7.1/icons.php
Comment thread lib/icons.php Outdated
Comment thread lib/icons.php Outdated
Comment thread lib/icons.php Outdated
Comment thread packages/icons/README.md Outdated
@t-hamano t-hamano requested review from Mamaduka and tyxla May 18, 2026 10:12
@jasmussen

Copy link
Copy Markdown
Contributor Author

Fantastic feedback, thank you for your time.

On the function names, looks like I got it wrong in a few ways. I was following this standard, but incorrectly. In any case, should be addressed now, along with the majority of your other feedback.

The last bit I'm happy to address also, but let me ask some clarifying questions just to be sure I'm reading it right.

I believe this fallback should be removed. If this function is backported to the core in the feature, this fallback will not be available in the core. This means that the behavior of the wp_icon() function will differ between the core and Gutenberg.

Consistently, I believe this function should only check the Icons registry. How to access private icons is a separate discussion.

Part of the motivation of this PR, also, is to allow us to use WordPress icons in core pages, as part of the admin in both legacy and new PHP pages. Consider the left admin menu that currently uses deprecated dashicons. I would like for the new library to be made available so that menu can be updated, so we can unify on a single icon set for WordPress.

I believe this requires that at least WordPress be able to access private icons. Much of the motivation for making icons private, was specifically for frontend usage, inside the Icon block. In that case, as soon as an icon is used through that block on a website, it becomes substantially harder to edit, redesign, or remove an icon from the set. Which, it isn't something we want to do often, nevertheless a lot of icons do deserve some love now that the larger visual vocabuly of our icons has evolved.

Question: if we remove this fallback, does that mean we'll only be able to use public icons in PHP pages? I don't mind breaking this up in a few PRs for ease of review and so on, but I would love for us to be able to access the full set in admin contexts, just like you can access the full set in React contexts. Let me know if I'm missing nuance!

@t-hamano

Copy link
Copy Markdown
Contributor

Regarding the function name, there are probably two options.

wp_get_icon();
wp_icon();

or

get_the_icon();
the_icon();

However, without the "wp" prefix, there is a high chance of conflict with functions created by consumers. Nowadays, it is common practice to include the "wp" prefix.

Question: if we remove this fallback, does that mean we'll only be able to use public icons in PHP pages?

Yes. If my understanding is correct, the reason we introduced the "public" status for icons was to prevent users from selecting icons for dashboards within the Icon block.

However, I believe this status can be removed in the future. This means that all icons in @wordpress/icons will be shipped to the core and registered in the icon registry. Instead, the Icon block will independently limit the list of selectable icons.

@jasmussen

jasmussen commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Yes. If my understanding is correct, the reason we introduced the "public" status for icons was to prevent users from selecting icons for dashboards within the Icon block.

However, I believe this status can be removed in the future. This means that all icons in @wordpress/icons will be shipped to the core and registered in the icon registry. Instead, the Icon block will independently limit the list of selectable icons.

I think we'll probably want to maintain that status, I think it's useful for the Icon block. What I was suggesting was a more clear delineation of frontend vs. backend—that if used on the frontend we don't want it to break. However you reminded me that as soon as this becomes available to third party plugins frontend vs. backend doesn't make a difference, the support story remains the same. Good point.

So let me rephrase the question instead: will there be a way for the dashboard—for WordPress core itself—to use "private" icons in PHP pages? And if yes, should that be in this PR or a separate one?

@t-hamano

Copy link
Copy Markdown
Contributor

will there be a way for the dashboard—for WordPress core itself—to use "private" icons in PHP pages?

Unfortunately, there is no such way. When creating the manifest file that serves as the basis for synchronizing icons from Gutenberg to the core, only public icons are included, excluding all others. This means that private icons are not bundled with the WordPress core itself. Therefore, the concept of a "private icon" does not exist within the WordPress core itself.

To lift this restriction, we would need to modify the core and Gutenberg synchronization process itself, so we recommend considering it in a separate PR.

@jasmussen

Copy link
Copy Markdown
Contributor Author

Sounds good. If I read this right, the PR should be ready for broader feedback (thanks again for your time), and is now limited by which icons are public.

I'm happy to also work on followup projects that help us further to one of the goals of making icons available to PHP pages, whether that means moving some icon-omission logic to the Icon block directly, or perhaps "graduating" more icons to being public. E.g. maybe we have most of what we need for core already, with what's public?

Comment thread lib/compat/wordpress-7.1/icons.php Outdated
* 'core/arrow-down', 'my-plugin/custom-icon').
* @param array $args Optional. Arguments for the icon. See wp_get_icon() for details.
*/
function wp_icon( $name, $args = array() ) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function really necessary? I feel like wp_get_icon() is enough, and this wrapper is completely redundant. Is this to avoid the need to deal with escaping upon echoing the icons in consumer code (considering that wp_get_icon() uses the HTML API and produces safe code)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From this iteration, it was to match other template functions that usually come in one flavor that gets, and one that echoes. But I'm entirely happy to start with purely the get version. We can always add more if people ask for it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, starting from purely get version.

I can’t finding now, but there’s a proposal for allowing short PHP template syntax, which makes echoing values in templates easier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be addressed here, thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the proposal I mentioned - https://make.wordpress.org/core/2025/12/05/coding-standard-proposal-allow-the-use-of-the-php-short-echo-tag/.

Having a separate echo templates function just saves a couple of characters and is probably not worth including initially. We can add them later if we see enough requests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing it @jasmussen 🙌

@Mamaduka I'm personally not a fan of short_open_tag, but I wouldn't mind if it were part of WPCS.

Comment thread lib/compat/wordpress-7.1/icons.php Outdated
* 'core/arrow-down', 'my-plugin/custom-icon').
* @param array $args Optional. Arguments for the icon. See wp_get_icon() for details.
*/
function wp_icon( $name, $args = array() ) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming question in case we chose to have this function: if we have wp_get_icon() (which makes perfect sense to me), why don't we also follow suit and name this wp_render_icon()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was also to follow classic formula, e.g. the_title and get_the_title, however I guess those are more template tags than what this function is meant for, so for the moment I'm just going to keep wp_get_icon, but let me know if you have any preference otherwise.

@jasmussen jasmussen marked this pull request as ready for review May 26, 2026 10:36
@jasmussen jasmussen requested a review from spacedmonkey as a code owner May 26, 2026 10:36
@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>
Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
Co-authored-by: mcsf <mcsf@git.wordpress.org>
Co-authored-by: getdave <get_dave@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka Mamaduka changed the title Add/php wp icons Icons: Add PHP method(s) for rendering inline SVG icons from the registry May 26, 2026
t-hamano and others added 2 commits June 17, 2026 20:52
The source SVG may already carry aria-hidden/role/aria-label, so each
branch now removes the opposite attributes to avoid emitting a mix of
aria-hidden and role/aria-label on the same element.

Co-Authored-By: Claude <noreply@anthropic.com>
Mirror get_avatar()'s handling: only set width/height when size is
numeric, normalizing with absint() and skipping the attributes when it
resolves to 0 so the SVG's intrinsic dimensions stay untouched.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread lib/compat/wordpress-7.1/icons.php Outdated
Comment on lines +19 to +20
* @type int $size Width and height in pixels. Pass 0 to leave the
* SVG's intrinsic dimensions untouched. Default 24.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass 0 to leave the SVG's intrinsic dimensions untouched.

Zero feels a bit unnatural to me. Would null be more appropriate?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the behavior of the parameters with 87b3f0c.

t-hamano and others added 4 commits June 18, 2026 16:10
Passing 0 to keep the SVG's intrinsic dimensions read unnaturally, since 0
is a valid numeric size. Use null instead to express "no size override" more
clearly. The runtime already handles this (is_numeric() filters out null), so
only the docblock type/wording and the test are updated.

Co-Authored-By: Claude <noreply@anthropic.com>
Drop the truthy guard so a size of 0 produces width="0"/height="0" instead
of being silently ignored. Intrinsic dimensions are now controlled solely by
passing null, making the two cases unambiguous.

Co-Authored-By: Claude <noreply@anthropic.com>
The icon's width comes from the dimensions block support styles applied to
the SVG, so the SVG must keep its intrinsic dimensions. Pass null now that
0 emits explicit width="0"/height="0".

Co-Authored-By: Claude <noreply@anthropic.com>
The wp_get_icon() helper does not expose a filter hook, so the test for
a non-existent 'wp_icon_html' filter could never pass. Remove it rather
than introduce an unneeded extension point.

Co-Authored-By: Claude <noreply@anthropic.com>
@t-hamano

Copy link
Copy Markdown
Contributor

Since I know Joen is going on summer vacation next week, I'm happy to take over this PR 👍

I've made the following changes:

  • To respect SVG's intrinsic dimensions, pass null instead of zero. If zero is passed, width=0 and height=0 will be output.
  • I have removed the filter hook. The MVP will have a minimal implementation, and we may consider adding filters based on user feedback.

In the future, we may consider expanding this to support individual settings for width and height, as well as values other than pixel values (strings).

I welcome any additional feedback!

@tyxla tyxla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last bits of feedback from me 😅

I feel like this is really solid at this point, and I'm actually good to ship it as-is and work on the suggestions in follow-up PRs after.

Great work, folks 🙌

Comment thread lib/compat/wordpress-7.1/icons.php Outdated
Comment on lines +19 to +20
* @type int|null $size Width and height in pixels. Pass null to leave the
* SVG's intrinsic dimensions untouched. Default 24.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also mention that non-numeric values will be ignored?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 1b79978👍

$args = wp_parse_args(
$args,
array(
'size' => 24,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing here is that if we pass some invalid value (like an array or "test") it will not fall back to 24 but rather will omit the size (width/height) altogether. I imagine we're fine with that (WP has some examples of defensive programming, but handling that would probably be pushing it too far?), but wanted to confirm.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I don't like the implicit fallback to default values for invalid inputs. I feel that discarding invalid values rather than implicitly falling back to a default is more transparent to the consumer about the presence of invalid data.

Comment thread lib/compat/wordpress-7.1/icons.php Outdated
Comment on lines +19 to +20
* @type int $size Width and height in pixels. Pass 0 to leave the
* SVG's intrinsic dimensions untouched. Default 24.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess icons are not guaranteed to be square. Maybe we should indeed consider a follow-up where we support different width and height. Not a blocker though.

if ( $flip_vertical ) {
$processor->add_class( 'is-flip-vertical' );
}
$processor = new WP_HTML_Tag_Processor( $svg );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just parsed and serialized in the wp_get_icon() call above, and now we're instantiating a new WP_HTML_Tag_Processor to re-parse and re-process before serializing again. Feels a bit wasteful, would be nice if all these are happening in the same space and parsing/serialization only happens once.

Not necessarily a blocker, could be addressed in a follow-up.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it would be better to stick with the previous implementation (Use the icon registry's methods directly.) without using wp_get_icon(). I would like to consider this in a follow-up.

Comment on lines +50 to +52
if ( ! $processor->next_tag( 'svg' ) ) {
return '';
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this warrants some kind of notice/logging, because it would mean that the registry contains malformed icons, which it is supposed to prevent.

@t-hamano t-hamano Jun 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's absolutely right. Ideally, this code path should be purely defensive and never actually executed.

We need to prevent invalid icon content from being registered in the icon registry in the first place. Perhaps we need to improve the icon registry's sanitizer?

class WP_Icon_Test extends WP_UnitTestCase {

public function test_returns_svg_for_known_icon() {
$output = wp_get_icon( 'core/plus' );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'm no purist when it comes to testing, and indeed I did similar things with the initial work on the icons registry, but:

I notice that there's no provision of test fixtures, just the assumption that the core icon set will have been loaded in the registry by the time the tests run. Is my read correct? If so, is there any chance that this might make the tests unreliable in the future, e.g. once these classes move to Core? (I'm OK with "we'll find out when we get there" 😄)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When wp_get_icon() is called, if the icon registry class has not yet been instantiated, it will be instantiated by get_instance. At that time, all core icons are automatically registered, so the core icons should be guaranteed to be registered. I believe this is the same for the core.

By the way, we plan to register core icons in an init hook instead of the constructor in the future, so we may need to add do_action( 'init' ) later.

t-hamano added a commit to t-hamano/wordpress-develop that referenced this pull request Jun 18, 2026
Align wp_get_icon() with the latest changes from the Gutenberg side
(WordPress/gutenberg#78332):

- Only set width/height when size is numeric, using absint(), so passing
  null leaves the SVG's intrinsic dimensions untouched.
- Drop the fixed 'wp-icon' class and split the class argument on
  whitespace to support multiple space-separated class names.
- Toggle accessibility attributes both ways: when a label is given, set
  role/aria-label and remove aria-hidden/focusable; otherwise set
  aria-hidden/focusable and remove role/aria-label.

Update the unit tests accordingly.

Co-Authored-By: Claude <noreply@anthropic.com>
t-hamano and others added 2 commits June 19, 2026 00:36
Rename the test class to Tests_Icons_WpGetIcon and prefix each method
with test_wp_get_icon_ so the suite matches WordPress Core's naming,
easing the eventual backport.

Co-Authored-By: Claude <noreply@anthropic.com>
t-hamano and others added 3 commits June 22, 2026 20:33
The size argument silently leaves the SVG's intrinsic dimensions untouched
when a non-numeric value is passed. Document this so callers understand the
distinction between intentionally passing null and an ineffective value.

Co-Authored-By: Claude <noreply@anthropic.com>
@getdave

getdave commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Is there any work still outstanding here?

@mcsf

mcsf commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

In case it helps: none of my comments are blockers, this looks good to me.

@t-hamano t-hamano merged commit e7c373b into trunk Jun 26, 2026
42 of 45 checks passed
@t-hamano t-hamano deleted the add/php-wp-icons branch June 26, 2026 07:38
@github-project-automation github-project-automation Bot moved this from 🔎 Needs Review to ✅ Done in WordPress 7.1 Editor Tasks Jun 26, 2026
@github-actions github-actions Bot added this to the Gutenberg 23.6 milestone Jun 26, 2026
@t-hamano

Copy link
Copy Markdown
Contributor

It seems that the unit tests on trunk have failed due to this PR. I have a hunch about the cause and will fix it shortly.

@t-hamano t-hamano added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Jun 26, 2026
SainathPoojary pushed a commit to SainathPoojary/gutenberg that referenced this pull request Jun 29, 2026
…stry (WordPress#78332)

* Icons: Add wp_icon() PHP helper for rendering icons as inline SVG

Introduce a `wp_icon()` function that lets PHP code render any icon from
the modern WordPress icon set as inline SVG — same source files, same
output shape in the DOM as the existing React `<Icon>` component.

A build-time script reads all 331 SVG sources and generates a PHP array
mapping slugs to their inner SVG content. At runtime, `wp_icon()` loads
this manifest once and composes the SVG string per call with no file I/O,
parsing, or DOM mutation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Move wp_icon() to lib/, remove stroke_width, fix docs casing

Move icons.php from lib/compat/wordpress-7.0/ to lib/ since this is a
new API, not a compat shim for a specific release. Remove stroke_width
parameter to keep the initial API surface minimal. Fix heading casing
in README to use sentence case.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Commit generated icons-data.php to fix PHP tests

The generated PHP manifest must be checked into the repo (matching the
convention used by manifest.php) because the PHP runtime needs it
available without a prior npm build step — wp-env mounts the repo
directly and CI's PHP tests may not rebuild every package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Fix PHPCS array arrow alignment in generated icons-data.php

Remove extra padding spaces between array keys and double arrows in the
generated PHP file to satisfy WordPress coding standards (PHPCS).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Use registry + file fallback instead of generated manifest

Rework wp_icon() to check the Icons Registry first (covers public and
third-party icons), then fall back to reading the SVG file directly
for non-public core icons. Uses WP_HTML_Tag_Processor for attribute
manipulation, matching the pattern in the Icon block's index.php.

This removes the generated icons-data.php manifest and its build
script entirely, addressing review feedback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Remove stale build step reference to deleted generate-icons-php.cjs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Fix test assertions for WP_HTML_Tag_Processor output

The processor lowercases attribute names (viewBox → viewbox) and
preserves trailing newlines from SVG files. Adjust assertions to
match actual output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Address review feedback for wp_get_icon() helper

- Rename wp_icon()/the_wp_icon() to wp_get_icon()/wp_icon() per WP conventions
- Move from lib/icons.php to lib/compat/wordpress-7.1/icons.php
- Require explicit namespaced icon names (e.g. 'core/plus')
- Remove forced fill="currentColor" so consumers can apply custom colors
- Remove PHP usage section from @wordpress/icons README (not its concern)
- Remove file fallback and stale test for non-public icon loading

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Remove redundant wp_icon() echo wrapper

wp_get_icon() already produces safe output via WP_HTML_Tag_Processor,
so callers can echo it directly without needing a dedicated wrapper.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Fix PHPCS closing brace placement in icon test class

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Icons: Remove wp_get_icon() unit test class

Drop phpunit/class-wp-icon-test.php. The wp_get_icon() helper in
lib/compat/wordpress-7.1/icons.php remains, but this standalone test
class is no longer carried on the branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Icons: Add backport changelog entry for WP core PR 12010

Record the WordPress core backport (wordpress-develop#12010) tracking
the icons work from Gutenberg PR WordPress#78332.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Add since annotation.

* Update lib/compat/wordpress-7.1/icons.php

Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>

* Icons: Address review feedback on wp_get_icon()

- Drop the unconditional wp-icon class so output matches the icon
  block and React paths.
- Allow size=0 to leave the SVG's intrinsic dimensions untouched.
- Split the class argument on whitespace so multi-class strings work
  with WP_HTML_Tag_Processor::add_class().
- Add a wp_icon_html filter so the markup can be modified by plugins.
- Refactor render_block_core_icon() to call wp_get_icon() for the SVG
  + aria/label/focusable/class handling; the block only layers style
  engine CSS on top now.
- Restore the WP_Icon_Test unit tests, updated for the new behavior
  plus coverage for the filter, multi-class, and size=0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Icons: Remove wp_icon_html filter from wp_get_icon()

Drop the filter on the returned SVG markup and return the processed
HTML directly, keeping the function's surface minimal.

Co-Authored-By: Claude <noreply@anthropic.com>

* Icons: Clear conflicting a11y attributes in wp_get_icon()

The source SVG may already carry aria-hidden/role/aria-label, so each
branch now removes the opposite attributes to avoid emitting a mix of
aria-hidden and role/aria-label on the same element.

Co-Authored-By: Claude <noreply@anthropic.com>

* Icons: Validate size with is_numeric in wp_get_icon()

Mirror get_avatar()'s handling: only set width/height when size is
numeric, normalizing with absint() and skipping the attributes when it
resolves to 0 so the SVG's intrinsic dimensions stay untouched.

Co-Authored-By: Claude <noreply@anthropic.com>

* Icons: Document null as the sentinel for intrinsic size in wp_get_icon()

Passing 0 to keep the SVG's intrinsic dimensions read unnaturally, since 0
is a valid numeric size. Use null instead to express "no size override" more
clearly. The runtime already handles this (is_numeric() filters out null), so
only the docblock type/wording and the test are updated.

Co-Authored-By: Claude <noreply@anthropic.com>

* Icons: Emit zero dimensions when size is 0 in wp_get_icon()

Drop the truthy guard so a size of 0 produces width="0"/height="0" instead
of being silently ignored. Intrinsic dimensions are now controlled solely by
passing null, making the two cases unambiguous.

Co-Authored-By: Claude <noreply@anthropic.com>

* Icon block: Pass null size to wp_get_icon() for intrinsic dimensions

The icon's width comes from the dimensions block support styles applied to
the SVG, so the SVG must keep its intrinsic dimensions. Pass null now that
0 emits explicit width="0"/height="0".

Co-Authored-By: Claude <noreply@anthropic.com>

* Icons: Drop wp_icon_html filter test

The wp_get_icon() helper does not expose a filter hook, so the test for
a non-existent 'wp_icon_html' filter could never pass. Remove it rather
than introduce an unneeded extension point.

Co-Authored-By: Claude <noreply@anthropic.com>

* Icons: Align wp_get_icon() test naming with Core conventions

Rename the test class to Tests_Icons_WpGetIcon and prefix each method
with test_wp_get_icon_ so the suite matches WordPress Core's naming,
easing the eventual backport.

Co-Authored-By: Claude <noreply@anthropic.com>

* Docs: clarify that non-numeric size values are ignored in wp_get_icon()

The size argument silently leaves the SVG's intrinsic dimensions untouched
when a non-numeric value is passed. Document this so callers understand the
distinction between intentionally passing null and an ineffective value.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>
Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
Co-authored-by: mcsf <mcsf@git.wordpress.org>
Co-authored-by: getdave <get_dave@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Icons Related to Icon registration API and Icon REST API Needs Dev Note Requires a developer note for a major WordPress release cycle [Package] Block library /packages/block-library [Package] Icons /packages/icons [Type] Feature New feature to highlight in changelogs.

Projects

Development

Successfully merging this pull request may close these issues.

8 participants