/** * Initialize the plugin by setting localization, filters, and administration functions. */ private function __construct() { //include everything we need! require_once FOOGALLERY_PATH . 'includes/includes.php'; register_activation_hook(__FILE__, array('FooGallery_Plugin', 'activate')); //init FooPluginBase $this->init(FOOGALLERY_FILE, FOOGALLERY_SLUG, FOOGALLERY_VERSION, 'FooGallery'); //setup text domain $this->load_plugin_textdomain(); //setup gallery post type new FooGallery_PostTypes(); //load any extensions new FooGallery_Extensions_Loader(); if (is_admin()) { new FooGallery_Admin(); add_action('wpmu_new_blog', array($this, 'set_default_extensions_for_multisite_network_activated')); } else { new FooGallery_Public(); } new FooGallery_Thumbnails(); new FooGallery_Polylang_Compatibility(); $checker = new FooGallery_Version_Check(); $checker->wire_up_checker(); }
/** * Performs a check to see if the plugin has been updated, and perform any housekeeping if necessary */ function foogallery_perform_version_check() { $checker = new FooGallery_Version_Check(); $checker->perform_check(); }