定制 szepeviktor/sentencepress 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

szepeviktor/sentencepress

最新稳定版本:v0.4.0

Composer 安装命令:

composer require szepeviktor/sentencepress

包简介

OOP toolkit for daily tasks in WordPress development.

README 文档

README

Build Status Packagist PHPStan

These tools are recommended for use in agency-type projects where you have full control over the development and installation environment.

Installation

composer require szepeviktor/sentencepress

See WordPress website lifecycle for working with WordPress.

Examples

// Instead of wp_enqueue_script('main-js', get_template_directory_uri() . '/assets/js/main.js', [], '8.44', true)
$mainJs = new Script(get_template_directory_uri() . '/assets/js/main.js');
$mainJs
    ->setHandle('main-js')
    ->setVer('8.44')
    ->moveToFooter()
    ->enqueue();
// Instead of add_action('plugins_loaded', [$this, 'init'], 0, 20);
class Plugin
{
    use SzepeViktor\SentencePress\HookAnnotation;
    public function __construct()
    {
        $this->hookMethods();
    }

    /**
     * @hook plugins_loaded 20
     */
    public function init(): void
    {
        doSomething();
    }
}
// Instead of require __DIR__ . '/inc/template-functions.php';
// template-functions.php will be loaded and pingbackHeader called when wp_head hook is fired
class Template
{
    use SzepeViktor\SentencePress\HookProxy;
    public function __construct()
    {
        $this->lazyHookFunction(
            'wp_head',
            __NAMESPACE__ . '\\TemplateFunction\\pingbackHeader',
            10,
            0,
            __DIR__ . '/inc/template-functions.php'
        );
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固