| @@ 1300-1312 (lines=13) @@ | ||
| 1297 | * Finds out if a site is using a version control system. | |
| 1298 | * @return string ( '1' | '0' ) | |
| 1299 | **/ | |
| 1300 | 	public static function is_version_controlled() { | |
| 1301 | ||
| 1302 | 		if ( !class_exists( 'WP_Automatic_Updater' ) ) { | |
| 1303 | require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); | |
| 1304 | } | |
| 1305 | $updater = new WP_Automatic_Updater(); | |
| 1306 | $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) ); | |
| 1307 | // transients should not be empty | |
| 1308 | 		if ( empty( $is_version_controlled ) ) { | |
| 1309 | $is_version_controlled = '0'; | |
| 1310 | } | |
| 1311 | return $is_version_controlled; | |
| 1312 | } | |
| 1313 | ||
| 1314 | /** | |
| 1315 | * Determines whether the current theme supports featured images or not. | |
| @@ 28-40 (lines=13) @@ | ||
| 25 | * Finds out if a site is using a version control system. | |
| 26 | * @return string ( '1' | '0' ) | |
| 27 | **/ | |
| 28 | 	public static function is_version_controlled() { | |
| 29 | ||
| 30 | 		if ( ! class_exists( 'WP_Automatic_Updater' ) ) { | |
| 31 | require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); | |
| 32 | } | |
| 33 | $updater = new WP_Automatic_Updater(); | |
| 34 | $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) ); | |
| 35 | // transients should not be empty | |
| 36 | 		if ( empty( $is_version_controlled ) ) { | |
| 37 | $is_version_controlled = '0'; | |
| 38 | } | |
| 39 | return $is_version_controlled; | |
| 40 | } | |
| 41 | ||
| 42 | /** | |
| 43 | * Returns true if the site has file write access false otherwise. | |