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

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

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

kaiseki/wp-hook

最新稳定版本:1.0.1

Composer 安装命令:

composer require kaiseki/wp-hook

包简介

Register classes with add_filter and add_action hooks

README 文档

README

Register classes with add_filter and add_action hooks

Install

composer require kaiseki/wp-hook

Usage

  • Implement a class with the HookProviderInterface, e.g.:
final class DoSomething implements \Kaiseki\WordPress\Hook\HookProviderInterface
{
    public function registerCallbacks(): void
    {
        \add_action('after_setup_theme', [$this, 'doSomething'], 10, 1);
    }

    public function doSomething(): string { /*...*/ }
}
  • Add class name to config key hook/provider
return [
    'hook' => [
        'provider' => [
            DoSomething::class
        ],
    ],
];
  • Classes registered on this key will be called by using HookProviderRegistry and calling registerCallbacks

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固