@@ 30-42 (lines=13) @@ | ||
27 | * Finds out if a site is using a version control system. |
|
28 | * @return string ( '1' | '0' ) |
|
29 | **/ |
|
30 | public static function is_version_controlled() { |
|
31 | ||
32 | if ( ! class_exists( 'WP_Automatic_Updater' ) ) { |
|
33 | require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); |
|
34 | } |
|
35 | $updater = new WP_Automatic_Updater(); |
|
36 | $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) ); |
|
37 | // transients should not be empty |
|
38 | if ( empty( $is_version_controlled ) ) { |
|
39 | $is_version_controlled = '0'; |
|
40 | } |
|
41 | ||
42 | return $is_version_controlled; |
|
43 | } |
|
44 | ||
45 | /** |
@@ 1065-1077 (lines=13) @@ | ||
1062 | * Finds out if a site is using a version control system. |
|
1063 | * @return string ( '1' | '0' ) |
|
1064 | **/ |
|
1065 | public static function is_version_controlled() { |
|
1066 | ||
1067 | if ( !class_exists( 'WP_Automatic_Updater' ) ) { |
|
1068 | require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); |
|
1069 | } |
|
1070 | $updater = new WP_Automatic_Updater(); |
|
1071 | $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) ); |
|
1072 | // transients should not be empty |
|
1073 | if ( empty( $is_version_controlled ) ) { |
|
1074 | $is_version_controlled = '0'; |
|
1075 | } |
|
1076 | return $is_version_controlled; |
|
1077 | } |
|
1078 | ||
1079 | /** |
|
1080 | * Determines whether the current theme supports featured images or not. |