定制 backdrop-dev/framework 二次开发

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

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

backdrop-dev/framework

Composer 安装命令:

composer require backdrop-dev/framework

包简介

Backdrop Framework: A framework for developing ClassicPress and WordPress themes and plugins.

README 文档

README

Backdrop is a framework for developing themes & plugins for ClassicPress and WordPress.

Backdrop is the core application layer that consists of a service container and it can be use alone or alongside with Backdrop's available packages.

Requirements

Installation

Use the following command from your preferred command line utility to install Backdrop.

composer require backdrop-dev/framework

Themes

if bundling this directly in your theme, add the following code.

if ( file_exists( get_parent_theme_file_path( 'vendor/autoload.php' ) ) ) {
	require_once( get_parent_theme_file_path( 'vendor/autoload.php' ) );
}

Plugins

if bundling this directly in your plugin, add the following code.

if ( file_exists( plugin_dir_path( __FILE__ ) . '/vendor/autoload.php' ) ) {
	require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php';
}

Registering and Booting Backdrop.

Please note that the Backdrop isn't launched until an instance of its Backdrop\Core\Application class is created and its boot(), check the Backdrop\booted() function before attempting to create a new app. If one exists, then it should use the existing instance via the Backdrop\app() helper function.

// Create a new application
$slug = Backdrop\booted ? Backdrop\app() : new Backdrop\Core\Application();

// Add service provider
$slug->provider( YourProject\Provider::class );

// Create and action hook for child themes or plugins
do_action( "$slug/child/theme", $slug );

// Boot the application
$slug->boot();

Copyright and Licenses

This project is licensed under the GNU GPL, version 2 or later.

2019–2025 © Benjamin Lu

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2024-06-18