protected function is_theme_version_valid( $slug, $version ) {
		// Get Theme Info.
		$theme_info = themes_api( 'theme_information', array( 'slug' => $slug ) );

		// Return empty string for themes not on WP.org.
		if ( is_wp_error( $theme_info ) ) {
			return '';
		}

		// Compare theme version info.
		return ! version_compare( $version, $theme_info->version, '>' );

	}
protected function is_theme_version_valid( $slug, $version ) {
		// Get Theme Info.
		$theme_info = themes_api( 'theme_information', array( 'slug' => $slug ) );

		// Return empty string for themes not on WP.org.
		if ( is_wp_error( $theme_info ) ) {
			return '';
		}

		// Compare theme version info.
		return ! version_compare( $version, $theme_info->version, '>' );

	}
protected function is_theme_version_valid ( $ slug , $ version ) { // Get Theme Info. $ theme_info = themes_api ( 'theme_information' , array ( 'slug' => $ slug ) ) ; // Return empty string for themes not on WP.org. if ( is_wp_error ( $ theme_info ) ) { return '' ; } // Compare theme version info. return ! version_compare ( $ version , $ theme_info -> version , '>' ) ; }
Check if current version of the theme is higher than the one available at WP.org.

@param string $slug Theme slug.
@param string $version Theme current version.

@return bool|string
Check if current version of the theme is higher than the one available at WP . org .