Skip to content

Register default bff icons collection for core/icon block - #524

Open
firestar300 wants to merge 1 commit into
masterfrom
feature/register-icon-collections
Open

firestar300 wants to merge 1 commit into
masterfrom
feature/register-icon-collections

Conversation

@firestar300

@firestar300 firestar300 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
image

Note

Medium Risk
Changes which blocks editors can use and replaces the default core icon picker with theme SVGs on init; misconfigured paths or filters could leave the Icon block with an empty or unexpected library.

Overview
Adds a new Icon framework service that registers General (beapi-sprite) and Social (beapi-social) icon collections for the WordPress Icon block (7.1+), loading icons from built or source SVG folders under dist/images/{sprite|social} or src/img/icons/{sprite|social}. Collections, labels, properties, and whether to drop the default core icon library are overridable via bff_icon_collections, bff_icon_label, bff_icon_properties, and bff_unregister_core_icon_collection.

The service is bootstrapped in Framework, and core/icon is no longer blocklisted in the editor so authors can use the block with the theme sets. SVGO config only gains a short comment on extra plugins.

Reviewed by Cursor Bugbot for commit 4ec21e4. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread inc/Services/Icon.php
}

$candidates = [
get_theme_file_path( 'dist/images/' . $source_subdir ),

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.

Normal de chercher aussi les svg dans ce dossier ? ça vient de src/img/static non ?

Comment thread inc/Services/Icon.php

$candidates = [
get_theme_file_path( 'dist/images/' . $source_subdir ),
get_theme_file_path( 'src/img/icons/' . $source_subdir ),

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.

Ici aussi, ce dossier n'est pas déployé.

Je sais plus comment tu as géré la copie des svg dans ton autre PR? dans un dossier dédié ? ou à la racine de dist/images comme le dossier static ?

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.

Pardon je crois que j'ai mal lu la PR, on a des sous dossiers dédiés pour les icônes ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants