Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




is_active_sidebar [ WordPress Function ]

is_active_sidebar ( $index )
Parameters:
  • (mixed) $index Sidebar name, id or number to check.
Returns:
  • (bool) true if the sidebar is in use, false otherwise.
Defined at:



Whether a sidebar is in use.

Source


<?php
function is_active_sidebar$index ) {
    
$index = ( is_int($index) ) ? "sidebar-$indexsanitize_title($index);
    
$sidebars_widgets wp_get_sidebars_widgets();
    if ( !empty(
$sidebars_widgets[$index]) )
        return 
true;

    return 
false;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics