Ticket #31130: 31130.5.diff
File 31130.5.diff, 2.8 KB (added by , 9 years ago) |
---|
-
src/wp-includes/functions.php
1260 1260 } 1261 1261 1262 1262 /** 1263 * Check or set whether WordPress is in "installation" mode.1264 *1265 * If the `WP_INSTALLING` constant is defined during the bootstrap, `wp_installing()` will default to `true`.1266 *1267 * @since 4.4.01268 *1269 * @staticvar bool $installing1270 *1271 * @param bool $is_installing Optional. True to set WP into Installing mode, false to turn Installing mode off.1272 * Omit this parameter if you only want to fetch the current status.1273 * @return bool True if WP is installing, otherwise false. When a `$is_installing` is passed, the function will1274 * report whether WP was in installing mode prior to the change to `$is_installing`.1275 */1276 function wp_installing( $is_installing = null ) {1277 static $installing = null;1278 1279 // Support for the `WP_INSTALLING` constant, defined before WP is loaded.1280 if ( is_null( $installing ) ) {1281 $installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING;1282 }1283 1284 if ( ! is_null( $is_installing ) ) {1285 $old_installing = $installing;1286 $installing = $is_installing;1287 return (bool) $old_installing;1288 }1289 1290 return (bool) $installing;1291 }1292 1293 /**1294 1263 * Test whether blog is already installed. 1295 1264 * 1296 1265 * The cache will be checked first. If you have a cache plugin, which saves -
src/wp-includes/load.php
841 841 842 842 $wp_locale = new WP_Locale(); 843 843 } 844 845 /** 846 * Check or set whether WordPress is in "installation" mode. 847 * 848 * If the `WP_INSTALLING` constant is defined during the bootstrap, `wp_installing()` will default to `true`. 849 * 850 * @since 4.4.0 851 * 852 * @staticvar bool $installing 853 * 854 * @param bool $is_installing Optional. True to set WP into Installing mode, false to turn Installing mode off. 855 * Omit this parameter if you only want to fetch the current status. 856 * @return bool True if WP is installing, otherwise false. When a `$is_installing` is passed, the function will 857 * report whether WP was in installing mode prior to the change to `$is_installing`. 858 */ 859 function wp_installing( $is_installing = null ) { 860 static $installing = null; 861 862 // Support for the `WP_INSTALLING` constant, defined before WP is loaded. 863 if ( is_null( $installing ) ) { 864 $installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING; 865 } 866 867 if ( ! is_null( $is_installing ) ) { 868 $old_installing = $installing; 869 $installing = $is_installing; 870 return (bool) $old_installing; 871 } 872 873 return (bool) $installing; 874 }