Rename plugin to wp-seoprostack-plugin, update file structure
This commit is contained in:
69
includes/core/class-seoprostack-plugin.php
Normal file
69
includes/core/class-seoprostack-plugin.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* The core plugin class.
|
||||
*
|
||||
* @package SEO_Pro_Stack
|
||||
* @subpackage SEO_Pro_Stack/Core
|
||||
*/
|
||||
|
||||
// If this file is called directly, abort.
|
||||
if (!defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* The core plugin class.
|
||||
*/
|
||||
class SEOProStack_Plugin {
|
||||
|
||||
/**
|
||||
* The loader that's responsible for maintaining and registering all hooks.
|
||||
*
|
||||
* @var SEOProStack_Loader $loader Maintains and registers all hooks.
|
||||
*/
|
||||
protected $loader;
|
||||
|
||||
/**
|
||||
* Define the core functionality of the plugin.
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->load_dependencies();
|
||||
$this->define_admin_hooks();
|
||||
$this->define_features();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the required dependencies for this plugin.
|
||||
*/
|
||||
private function load_dependencies() {
|
||||
// The class responsible for orchestrating the actions and filters
|
||||
require_once SEOPROSTACK_PLUGIN_DIR . 'includes/core/class-seoprostack-loader.php';
|
||||
$this->loader = new SEOProStack_Loader();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all of the hooks related to the admin area.
|
||||
*/
|
||||
private function define_admin_hooks() {
|
||||
// Admin functionality
|
||||
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/class-seoprostack-admin.php';
|
||||
$admin = new SEOProStack_Admin();
|
||||
$admin->initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all of the hooks related to plugin features.
|
||||
*/
|
||||
private function define_features() {
|
||||
// Auto Upload feature
|
||||
require_once SEOPROSTACK_PLUGIN_DIR . 'includes/features/auto-upload/class-seoprostack-auto-upload.php';
|
||||
$auto_upload = new SEOProStack_Auto_Upload();
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the loader to execute all of the hooks with WordPress.
|
||||
*/
|
||||
public function run() {
|
||||
$this->loader->run();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user