コード例 #1
0
 /**
  * Access this class's working instance.
  * If the instance hasn't been set, set it now.
  *
  * @wp-hook	void
  * @uses		void
  * @since		2.0.0
  * @return		object of this class
  */
 public static function get_instance()
 {
     if (null == self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #2
0
 /**
  * Load our dependencies as required.
  *
  * @wp-hook	void
  * @since		2.0.0
  * @uses		void
  * @see			admin_setup()
  * @return 	void
  */
 function load_dependencies()
 {
     // Include our NGGOBASIC_Settings class for installation and settings updates.
     require_once $this->plugin_dir_path . 'admin/assets/class-' . $this->prefix . '-settings.php';
     $this->settings = NGGOBASIC_Settings::get_instance();
     $this->settings->init();
     if ($this->nextgen_v1) {
         // Load appropriate Fancybox installation if we're using NextGEN v1.9.13 and below.
         require_once $this->plugin_dir_path . 'admin/assets/install/class-' . $this->prefix . '-fancybox-installer-nextgen-v1.php';
         $this->fancybox_installer_nextgen_v1 = NGGOBASIC_Fancybox_Installer_NextGEN_V1::get_instance();
         $this->fancybox_installer_nextgen_v1->init();
     }
     if ($this->nextgen_v2) {
         // Load appropriate Fancybox installation if we're using NextGEN v2.0 and above.
         require_once $this->plugin_dir_path . 'admin/assets/install/class-' . $this->prefix . '-fancybox-installer-nextgen-v2.php';
         $this->fancybox_installer_nextgen_v2 = NGGOBASIC_Fancybox_Installer_NextGEN_V2::get_instance();
         $this->fancybox_installer_nextgen_v2->init();
         if ($this->settings->optimize_admin && !$this->is_nextgen_admin()) {
             // Remove all NextGEN 2.0 scripts and styles from the admin (except where required) to speed up page loads.
             require_once $this->plugin_dir_path . 'admin/assets/class-' . $this->prefix . '-admin-cleanup.php';
             $this->admin_cleanup = NGGOBASIC_Admin_Cleanup::get_instance();
             $this->admin_cleanup->init();
         }
     }
     // Include our settings page class.
     require_once $this->plugin_dir_path . 'admin/assets/class-' . $this->prefix . '-settings-page.php';
     $this->settings_page = NGGOBASIC_Settings_Page::get_instance();
     $this->settings_page->init();
     // Include our Dynamic Fancybox Settings Interface demo class.
     require_once $this->plugin_dir_path . 'admin/assets/class-' . $this->prefix . '-dfsi-demo.php';
     $this->DFSI = NGGOBASIC_DFSI_Demo::get_instance();
     $this->DFSI->init();
     // Include our regex operations.
     require_once $this->plugin_dir_path . 'admin/assets/class-' . $this->prefix . '-regex.php';
     $this->regex = NGGOBASIC_Regex::get_instance();
     $this->regex->init();
 }