is_registered_sidebar

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

WordPress Version: 6.5

/**
 * Checks if a sidebar is registered.
 *
 * @since 4.4.0
 *
 * @global array $wp_registered_sidebars The registered sidebars.
 *
 * @param string|int $sidebar_id The ID of the sidebar when it was registered.
 * @return bool True if the sidebar is registered, false otherwise.
 */
function is_registered_sidebar($sidebar_id)
{
    global $wp_registered_sidebars;
    return isset($wp_registered_sidebars[$sidebar_id]);
}

WordPress Version: 4.4

/**
 * Checks if a sidebar is registered.
 *
 * @since 4.4.0
 *
 * @global array $wp_registered_sidebars Registered sidebars.
 *
 * @param string|int $sidebar_id The ID of the sidebar when it was registered.
 * @return bool True if the sidebar is registered, false otherwise.
 */
function is_registered_sidebar($sidebar_id)
{
    global $wp_registered_sidebars;
    return isset($wp_registered_sidebars[$sidebar_id]);
}