%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/shaban/laviva/wp-content/themes/levelup/inc/classes/
Upload File :
Create Path :
Current File : /var/www/html/shaban/laviva/wp-content/themes/levelup/inc/classes/levelup-options.php

<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// Don't duplicate me!
if ( ! class_exists( 'Levelup_Options' ) ) {

	class Levelup_Options {

		public static $instance = null;

		private static $opt_name = 'levelup_options';

		public static $saved_options = array();


		public static function get_instance() {
			if ( null == self::$instance ) {
				self::$instance = new Levelup_Options();
			}
			return self::$instance;
		}


		public function __construct() {

			self::$saved_options   = get_option( self::$opt_name );

		}


		public static function setGlobals () {
			global $levelup_options;

			$options = get_option( self::$opt_name );

			if (!empty($options)) {
				$levelup_options = $options;
			} else {
				return;
			}
		}


		public static function getOption ($key = "") {

			if (!empty(self::$saved_options) && !empty($key)) {

				if (isset(self::$saved_options[$key])) {
					return self::$saved_options[$key];
				} else {
					return;
				}
			} else {
				return;
			}
		}

	}

}

Zerion Mini Shell 1.0