/** * Initialize. * * @param array $plugins * @param string $theme_version * @param string $version_option_name */ public static function init($plugins, $theme_version, $version_option_name) { self::$plugins = $plugins; self::$theme_version = $theme_version; self::$version_option_name = $version_option_name; self::generate_plugins_file_paths(); add_action('plugins_api', array(__CLASS__, 'check_info'), 10, 3); add_action('admin_init', array(__CLASS__, 'check_theme_version')); add_filter('pre_set_site_transient_update_plugins', array(__CLASS__, 'update_plugins_transient')); }