/** * Remove our menu option from Gallery --> Other Options --> Lightbox Effects, * and the associated meta-data NextGEN inserts in the wp_postmeta table. * * @wp-hook register_deactivation_hook * @uses update_option() * @since 2.0.0 * @return void */ function uninstall() { // Return if we're using NextGEN 2.0.7+, as the "C_Lightbox_Installer" class we extended for earlier versions was removed in v2.0.71. // Also check if the C_Lightbox_Installer::uninstall_lightbox() method exists, as the "C_Lightbox_Installer" class was *reintroduced* in NextGEN v2.0.74+, but without an "uninstall_lightbox()" method. if (!class_exists('C_Lightbox_Installer') || !method_exists('C_Lightbox_Installer', 'uninstall_lightbox')) { return; } require_once $this->plugin_dir_path . 'admin/assets/install/class-' . $this->prefix . '-lightbox-installer-nextgen-v2.php'; $instance = NGGOBASIC_Lightbox_Installer_NextGEN_V2::get_instance(); $instance->do_uninstall($this->lightbox_name); }
/** * 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; }