ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

class-kirki-toolkit.php (909B)


      1 <?php
      2 /**
      3  * The main Kirki object
      4  *
      5  * @package     Kirki
      6  * @category    Core
      7  * @author      Aristeides Stathopoulos
      8  * @copyright   Copyright (c) 2016, Aristeides Stathopoulos
      9  * @license     http://opensource.org/licenses/https://opensource.org/licenses/MIT
     10  * @since       1.0
     11  */
     12 
     13 // Exit if accessed directly.
     14 if ( ! defined( 'ABSPATH' ) ) {
     15 	exit;
     16 }
     17 
     18 if ( ! class_exists( 'Kirki_Toolkit' ) ) {
     19 
     20 	/**
     21 	 * Singleton class
     22 	 */
     23 	final class Kirki_Toolkit {
     24 
     25 		/**
     26 		 * Holds the one, true instance of this object.
     27 		 *
     28 		 * @static
     29 		 * @access protected
     30 		 * @var object
     31 		 */
     32 		protected static $instance = null;
     33 
     34 		/**
     35 		 * Access the single instance of this class.
     36 		 *
     37 		 * @static
     38 		 * @access public
     39 		 * @return object Kirki_Toolkit.
     40 		 */
     41 		public static function get_instance() {
     42 			if ( null === self::$instance ) {
     43 				self::$instance = new self();
     44 			}
     45 			return self::$instance;
     46 		}
     47 	}
     48 }