wp_installing( int $is_installing = null )
Vérifie ou met Wordpress en mode installation.
Paramètre
$is_installing(int)optionnelTrue pour mettre Wordpress en mode installation, false pour désactiver ce mode. En omettant ce paramètre, on obtient le status actuel.
Valeur par défaut : null
Description / Informations supplémentaires
Si la constante WP_INSTALLING est définie durant le programme, la fonction retournera true.
Retourne
(bool) True si WordPress est en installation, sinon retourne false.
Déclaration et structure de la fonction wp_installing()
wp_installing() est déclarée dans le fichier wp-includes/load.php à la ligne 1593 :
function wp_installing( $is_installing = null ) {
static $installing = null;
// Support for the `WP_INSTALLING` constant, defined before WP is loaded.
if ( is_null( $installing ) ) {
$installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING;
}
if ( ! is_null( $is_installing ) ) {
$old_installing = $installing;
$installing = $is_installing;
return (bool) $old_installing;
}
return (bool) $installing;
}
Où est utilisée la fonction wp_installing()
dans le CMS WordPress
Sources
Codex WordPress : wp_installing()
Autres fonctions dans le même fichier : wp-includes/load.php