<?php
/**
 * WP Glossary Hover Plugin
 *
 * @package   WP_Glossary_Hover_Admin
 * @author    chorton2227
 * @license   GPL-2.0+
 * @copyright 2014
 */

/**
 * WP Glossary Hover Admin class. This class works with administrative side of the WordPress site.
 *
 * @package   WP_Glossary_Hover_Admin
 * @author    chorton2227
 */
class WP_Glossary_Hover_Admin
{

    /**
     * Instance of this class.
     *
     * @since    1.0.0
     * @var      object
     */
    protected static $instance = null;

    /**
     * Slug of the plugin screen.
     *
     * @since 1.0.0
     * @var string
     */
    protected $plugin_screen_hook_suffix = null;

    /**
     * Settings for the plugin
     *
     * @since    1.0.0
     * @var      string
     */
    protected $plugin_settings = null;

    /**
     * Initialize the plugin by loading admin scripts & styles and adding a
     * settings page and menu.
     *
     * @since     1.0.0
     */
    private function __construct()
    {

        // Register plugin settings
        add_action('init', array('WPGH_Plugin_Config', 'register_plugin_settings'));

    }

    /**
     * Return an instance of this class.
     *
     * @since     1.0.0
     * @return    object    A single instance of this class.
     */
    public static function get_instance()
    {

        // If the single instance hasn't been set, set it now.
        if (null == self::$instance) {
            self::$instance = new self;
        }

        return self::$instance;
    }

    /**
     * Register the administration menu for this plugin into the WordPress Dashboard menu.
     *
     * @since    1.0.0
     */
    public function add_plugin_admin_menu()
    {

        /*
         * Add a settings page for this plugin to the Settings menu.
         */
        $this->plugin_screen_hook_suffix = add_options_page(
            __('WP Glossary Hover', WP_Glossary_Hover::PLUGIN_SLUG),
            __('WP Glossary Hover', WP_Glossary_Hover::PLUGIN_SLUG),
            'manage_options',
            WP_Glossary_Hover::PLUGIN_SLUG
        );

    }

}
