<?php
|
|
|
|
/**
|
|
* The core plugin class.
|
|
*
|
|
* This is used to define internationalization, admin-specific hooks, and
|
|
* public-facing site hooks.
|
|
*
|
|
* Also maintains the unique identifier of this plugin as well as the current
|
|
* version of the plugin.
|
|
*
|
|
* @since 1.0.0
|
|
* @package Test
|
|
* @subpackage Test/includes
|
|
* @author test <test>
|
|
*
|
|
*/
|
|
|
|
if (!defined('ABSPATH')) {
|
|
exit; // Exit if accessed directly
|
|
}
|
|
|
|
class Test
|
|
{
|
|
/**
|
|
* Define the core functionality of the plugin.
|
|
*
|
|
* Set the plugin name and the plugin version that can be used throughout the plugin.
|
|
* Load the dependencies, define the locale, and set the hooks for the admin area and
|
|
* the public-facing side of the site.
|
|
*
|
|
* @since 1.0.0
|
|
*/
|
|
public function __construct()
|
|
{
|
|
// load dependencies
|
|
require_once plugin_dir_path(dirname( __FILE__ )).'includes/class-i18n.php';
|
|
|
|
$this->set_locale();
|
|
$this->admin();
|
|
$this->public();
|
|
}
|
|
|
|
/**
|
|
* Define the locale for this plugin for internationalization.
|
|
*
|
|
* Uses the Test_i18n class in order to set the domain and to register the hook
|
|
* with WordPress.
|
|
*
|
|
* @since 1.0.0
|
|
* @access private
|
|
*/
|
|
private function set_locale()
|
|
{
|
|
$plugin_i18n = new Test_i18n();
|
|
$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
|
|
}
|
|
|
|
/**
|
|
* Register all of the hooks related to the admin area functionality
|
|
* of the plugin.
|
|
*
|
|
* @since 1.0.0
|
|
* @access private
|
|
*/
|
|
private function define_admin()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* Register all of the hooks related to the public-facing functionality
|
|
* of the plugin.
|
|
*
|
|
* @since 1.0.0
|
|
* @access private
|
|
*/
|
|
private function define_public()
|
|
{
|
|
|
|
}
|
|
}
|