69 lines
1.7 KiB
PHP
69 lines
1.7 KiB
PHP
<?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();
|
|
}
|
|
} |