This repository has been archived on 2026-11-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2014-04-07 12:01:12 +02:00

29 lines
728 B
PHP

<?php
add_action( 'widgets_init', 'dslc_sidebars' );
function dslc_sidebars() {
$sidebars = dslc_get_option( 'sidebars', 'dslc_plugin_options_widgets_m' );
if ( $sidebars !== '' ) {
$sidebars_array = explode( ',', substr( $sidebars, 0, -1 ) );
foreach( $sidebars_array as $sidebar ) {
$sidebar_ID = 'dslc_' . strtolower( str_replace( ' ', '_', $sidebar ) );
register_sidebar( array(
'name' => $sidebar,
'id' => $sidebar_ID,
'before_widget' => '<div id="%1$s" class="dslc-widget dslc-col %2$s"><div class="dslc-widget-wrap">',
'after_widget' => '</div></div>',
'before_title' => '<h3 class="dslc-widget-title">',
'after_title' => '</h3>',
) );
}
}
}