s3rgiosan/icons-extended 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

s3rgiosan/icons-extended

Composer 安装命令:

composer require s3rgiosan/icons-extended

包简介

README 文档

README

Extends the Icon block with custom icons and the ability to remove registered icons.

Try in WordPress Playground

Register custom SVG icons against the core core/icon block via a stable PHP API, and remove icons (including the ones that ship with WordPress) from the registry. Changes are served through the existing Gutenberg icon picker. See docs/icons.md for the full guide.

Looking for inline icons in rich-text fields? See my Outstand Icons plugin.

Features

Custom icons

Register your own SVG icons against the core core/icon block through a stable PHP API (s3s_register_icon() or the s3s_icons_registry filter). Icons are validated at registration time and appear in any picker that consumes the registry. See docs/icons.md for the full guide.

Removing icons

Remove icons from the registry — a single icon, or an entire namespace such as the core/* icons that ship with WordPress — either hard-removed or hidden from picker UIs via REST. See docs/icons.md for the full guide.

Installation

Manual Installation

  1. Download the latest release ZIP from the Releases page.
  2. Go to Plugins > Add New > Upload Plugin in your WordPress admin area.
  3. Upload the ZIP file and click Install Now.
  4. Activate the plugin.

Install with Composer

To include this plugin as a dependency in your Composer-managed WordPress project:

  1. Add the plugin to your project using the following command:
composer require s3rgiosan/icons-extended
  1. Run composer install.
  2. Activate the plugin from your WordPress admin area or using WP-CLI.

Quick start

  1. Register an icon on init priority 1–4 via s3s_register_icon( 'my-plugin/star', [ 'label' => 'Star', 'content' => '<svg…/>' ] ).
  2. In a post or page, insert a core/icon block and pick your icon from the picker.
  3. Optionally remove WordPress's built-in icons with s3s_unregister_icons_namespace( 'core' ) on init priority 6.

Requirements

  • WordPress 7.0 or higher
  • PHP 8.2 or higher

Tests

PHP tests run inside a wp-env container:

npm run test:setup   # first time only — starts Docker WP + test DB
npm run test:unit

Changelog

All notable changes to this project are documented in CHANGELOG.md.

License

This project is licensed under the GPL-3.0-or-later.

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-05-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固