wp_is_development_mode

The timeline below displays how wordpress function wp_is_development_mode has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Checks whether the site is in the given development mode.
 *
 * @since 6.3.0
 *
 * @param string $mode Development mode to check for. Either 'core', 'plugin', 'theme', or 'all'.
 * @return bool True if the given mode is covered by the current development mode, false otherwise.
 */
function wp_is_development_mode($mode)
{
    $current_mode = wp_get_development_mode();
    if (empty($current_mode)) {
        return false;
    }
    // Return true if the current mode encompasses all modes.
    if ('all' === $current_mode) {
        return true;
    }
    // Return true if the current mode is the given mode.
    return $mode === $current_mode;
}