/**
     * Runs the Admin Page and outputs the HTML
     *
     * @return void
     */
    public static function admin()
    {
        // Get Settings
        self::get_settings(true);
        // Save Settings if POST
        $response = GRAV_BLOCKS_PLUGIN_SETTINGS::save_settings();
        if ($response['error']) {
            $error = 'Error saving Settings. Please try again.';
        } else {
            if ($response['success']) {
                $success = 'Settings saved successfully.';
            }
        }
        ?>
		<?php 
        add_thickbox();
        ?>
		<div class="wrap grav-blocks">
			<header>
				<h1><img itemprop="logo" src="//uploads.gravitatedesign.com/2016/03/27080812/grav_logo.png" alt="Gravitate"> Blocks</h1>
			</header>
			<main>
			<h4 class="blocks-version">Version <?php 
        echo self::$version;
        ?>
</h4>


			<?php 
        if (!function_exists('acf_add_local_field_group')) {
            self::acf_notice(false);
        }
        ?>

			<?php 
        if (!empty($error)) {
            ?>
<div class="error"><p><?php 
            echo $error;
            ?>
</p></div><?php 
        }
        ?>
			<?php 
        if (!empty($success)) {
            ?>
<div class="updated"><p><?php 
            echo $success;
            ?>
</p></div><?php 
        }
        ?>
			</main>


		<br>
		<div class="gravitate-redirects-page-links">
			<a href="<?php 
        echo self::$page;
        ?>
&section=general" class="<?php 
        echo self::get_current_tab($_GET['section'], 'general');
        ?>
">General</a>
			<a href="<?php 
        echo self::$page;
        ?>
&section=advanced" class="<?php 
        echo self::get_current_tab($_GET['section'], 'advanced');
        ?>
">Advanced</a>
			<a href="<?php 
        echo self::$page;
        ?>
&section=developers" class="<?php 
        echo self::get_current_tab($_GET['section'], 'developers');
        ?>
">Developers</a>
		</div>

		<br>
		<br>

		<?php 
        $section = !empty($_GET['section']) ? $_GET['section'] : 'settings';
        switch ($section) {
            case 'advanced':
                self::form('advanced');
                break;
            case 'developers':
                self::developers();
                break;
            default:
            case 'settings':
                self::form();
                break;
        }
        ?>
		</div>
		<?php 
    }