mirror of
https://gh.wpcy.net/https://github.com/WordPress/create-block-theme.git
synced 2026-04-27 12:22:16 +08:00
69 lines
1.4 KiB
PHP
69 lines
1.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* The core Create Block Theme plugin class.
|
|
*
|
|
* @since 0.0.2
|
|
* @package Create_Block_Theme
|
|
* @subpackage Create_Block_Theme/includes
|
|
* @author WordPress.org
|
|
*/
|
|
class Create_Block_Theme {
|
|
|
|
/**
|
|
* Define the core functionality of the plugin.
|
|
*
|
|
* @since 0.0.2
|
|
*/
|
|
public function __construct() {
|
|
|
|
$this->load_dependencies();
|
|
$this->define_admin_hooks();
|
|
|
|
}
|
|
|
|
/**
|
|
* Load the required dependencies for this plugin.
|
|
*
|
|
* @since 0.0.2
|
|
* @access private
|
|
*/
|
|
private function load_dependencies() {
|
|
|
|
/**
|
|
* The class responsible for orchestrating the actions and filters of the
|
|
* core plugin.
|
|
*/
|
|
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-create-block-theme-loader.php';
|
|
|
|
/**
|
|
* The class responsible for defining all actions that occur in the admin area.
|
|
*/
|
|
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-create-block-theme-admin.php';
|
|
|
|
$this->loader = new Create_Block_Theme_Loader();
|
|
|
|
}
|
|
|
|
/**
|
|
* Register all of the hooks related to the admin area functionality
|
|
* of the plugin.
|
|
*
|
|
* @since 0.0.2
|
|
* @access private
|
|
*/
|
|
private function define_admin_hooks() {
|
|
|
|
$plugin_admin = new Create_Block_Theme_Admin();
|
|
|
|
}
|
|
|
|
/**
|
|
* Run the loader to execute all of the hooks with WordPress.
|
|
*
|
|
* @since 0.0.2
|
|
*/
|
|
public function run() {
|
|
$this->loader->run();
|
|
}
|
|
}
|