@@ 36-48 (lines=13) @@ | ||
33 | * Finds out if a site is using a version control system. |
|
34 | * @return string ( '1' | '0' ) |
|
35 | **/ |
|
36 | public static function is_version_controlled() { |
|
37 | ||
38 | if ( ! class_exists( 'WP_Automatic_Updater' ) ) { |
|
39 | require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); |
|
40 | } |
|
41 | $updater = new WP_Automatic_Updater(); |
|
42 | $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) ); |
|
43 | // transients should not be empty |
|
44 | if ( empty( $is_version_controlled ) ) { |
|
45 | $is_version_controlled = '0'; |
|
46 | } |
|
47 | ||
48 | return $is_version_controlled; |
|
49 | } |
|
50 | ||
51 | /** |
@@ 1115-1127 (lines=13) @@ | ||
1112 | * Finds out if a site is using a version control system. |
|
1113 | * @return string ( '1' | '0' ) |
|
1114 | **/ |
|
1115 | public static function is_version_controlled() { |
|
1116 | ||
1117 | if ( !class_exists( 'WP_Automatic_Updater' ) ) { |
|
1118 | require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); |
|
1119 | } |
|
1120 | $updater = new WP_Automatic_Updater(); |
|
1121 | $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) ); |
|
1122 | // transients should not be empty |
|
1123 | if ( empty( $is_version_controlled ) ) { |
|
1124 | $is_version_controlled = '0'; |
|
1125 | } |
|
1126 | return $is_version_controlled; |
|
1127 | } |
|
1128 | ||
1129 | /** |
|
1130 | * Determines whether the current theme supports featured images or not. |