%s', esc_html( $content ) ); } } /** * prepare */ if ( $is_front ) { custom_sidebars_col_sideber_not_available( __( 'Home Page', 'custom-sidebars' ) ); } elseif ( $is_blog ) { custom_sidebars_col_sideber_not_available( __( 'Blog Page', 'custom-sidebars' ) ); } else if ( $is_woo_shop ) { custom_sidebars_col_sideber_not_available( __( 'WooCommerce Shop', 'custom-sidebars' ) ); } else { global $wp_registered_sidebars; $available = CustomSidebars::sort_sidebars_by_name( $wp_registered_sidebars ); $content = ''; foreach ( $sidebars as $s ) { $sb_name = $available[ $s ]['name']; $replaced = ! empty( $available[ $selected[ $s ] ] ); $class = $replaced ? 'cust' : 'def'; if ( $replaced ) { $content .= sprintf( '
', esc_attr( $s ), isset( $selected[ $s ] )? esc_attr( $selected[ $s ] ):'', esc_attr( $class, 'custom-sidebars' ) ); $content .= esc_html( $sb_name ); $content .= '
'; $content .= '
'; $content .= esc_html( $available[ $selected[ $s ] ]['name'] ); $content .= '
'; } } if ( empty( $content ) ) { echo '-'; } else { echo '
'; echo $content; echo '
'; } }