get_class_vars( 'Base', 'options' ); $db_version = isset( $options['db_version'] ) ? (int) $options['db_version'] : 6000; if ( $db_version === $this->db_version ) { return; } switch ( $db_version ) { case $db_version < $this->db_version: $this->delete_flush_cache(); break; default: break; } $options = array_merge( (array) $options, [ 'db_version' => (int) $this->db_version ] ); update_site_option( 'github_updater', $options ); } /** * Flush caches and delete cached options. */ private function delete_flush_cache() { wp_cache_flush(); $this->delete_all_cached_data(); } }