コード例 #1
0
 /**
  * This function controls the display of the widget on the site.
  */
 function widget($args, $instance)
 {
     extract($args);
     echo $before_widget;
     $title = apply_filters('widget_title', !empty($instance['title']) ? $instance['title'] : '', $instance);
     if (!empty($instance['title'])) {
         echo $before_title . esc_html($title) . $after_title;
     }
     sds_social_media();
     echo $after_widget;
 }
コード例 #2
0
ファイル: sidebar.php プロジェクト: sdsweb/baton
?>
 <?php 
echo is_active_sidebar('secondary-sidebar') ? 'has-secondary-sidebar' : false;
?>
">
	<section class="sidebar-container">
		<?php 
global $sds_theme_options;
// Primary Sidebar
if (!isset($sds_theme_options['body_class']) || !empty($sds_theme_options['body_class']) && strpos($sds_theme_options['body_class'], 'cols-1') === false) {
    ?>
				<!-- Primary Sidebar-->
				<aside class="sidebar <?php 
    echo is_active_sidebar('primary-sidebar') ? 'widgets' : 'no-widgets';
    ?>
">
					<?php 
    // Primary Sidebar
    if (is_active_sidebar('primary-sidebar')) {
        sds_primary_sidebar();
    } else {
        sds_social_media();
    }
    ?>
				</aside>
				<!-- End Primary Sidebar-->
		<?php 
}
?>
	</section>
</div>