kaiseki/wp-favicon 问题修复 & 功能扩展

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

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

kaiseki/wp-favicon

Composer 安装命令:

composer require kaiseki/wp-favicon

包简介

Render favicon and touch-icon link tags on the WordPress front end, admin and login screens

README 文档

README

Render favicon and touch-icon link tags on the WordPress front end, admin and login screens.

Point it at a directory containing favicon.ico, icon.svg, apple-touch-icon.png and manifest.json; it prints the matching <link> tags on wp_head, login_head and (optionally) admin_head, and disables WordPress' own site-icon output in the admin. Wired through ConfigProvider and the favicon config key.

Installation

composer require kaiseki/wp-favicon

Requires PHP 8.2 or newer.

Usage

Register ConfigProvider with your laminas-style config aggregator and configure the favicon key:

use Kaiseki\WordPress\Favicon\Favicon;

return [
    'favicon' => [
        // Directory holding the icon assets, relative to the active theme directory
        // (the theme directory URI is prepended automatically).
        'path' => 'assets/favicon',
        // Optional separate directory for the admin; falls back to `path`.
        'admin_path' => '',
        // Whether to also render the favicon in the admin when no admin_path is set.
        'show_in_admin' => true,
    ],
    'hook' => [
        'provider' => [
            Favicon::class,
        ],
    ],
];

ConfigProvider registers FaviconFactory, which reads the favicon config. With path set, the front-end and login tags are rendered; admin_path (or show_in_admin) controls the admin output.

Development

composer install
composer check   # check-deps, cs-check, phpstan

License

MIT — see LICENSE.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固