/** * Adjust the content width based on the presence of active widgets and page templates. * * @since Sundance 1.0 */ function sundance_set_content_width() { $options = sundance_get_theme_options(); global $content_width; if (is_page_template('full-width-page.php') || is_attachment() || 'off' == $options['show_rss_link'] && '' == $options['twitter_url'] && '' == $options['facebook_url'] && '' == $options['google_url'] && '' == $options['flickr_url'] && !is_active_sidebar('sidebar-1')) { $content_width = 874; } }
/** * Adds custom classes to the array of body classes. * * @since Sundance 1.0 */ function sundance_body_classes($classes) { $options = sundance_get_theme_options(); // Adds a class of group-blog to blogs with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } // Adds a class of no-sidebar when all syndicate links are disabled and no widgets if ('off' == $options['show_rss_link'] && '' == $options['twitter_url'] && '' == $options['facebook_url'] && '' == $options['google_url'] && '' == $options['flickr_url'] && !is_active_sidebar('sidebar-1')) { $classes[] = 'no-sidebar'; } return $classes; }
function sundance_flickr_text_input() { $options = sundance_get_theme_options(); ?> <div> <input type="text" name="sundance_theme_options[flickr_url]" id="flickr_url" value="<?php echo esc_attr($options['flickr_url']); ?> " /> <label class="description" for="flickr-url"><?php _e('Enter your Flickr URL', 'sundance'); ?> </label> </div> <?php }
<?php /** * The Sidebar containing the main widget areas. * * @package Sundance * @since Sundance 1.0 */ $options = sundance_get_theme_options(); if ('off' == $options['show_rss_link'] && '' == $options['twitter_url'] && '' == $options['facebook_url'] && '' == $options['google_url'] && '' == $options['flickr_url'] && !is_active_sidebar('sidebar-1')) { return; } ?> <div id="secondary" class="widget-area" role="complementary"> <?php do_action('before_sidebar'); ?> <?php if ('off' != $options['show_rss_link'] || '' != $options['twitter_url'] || '' != $options['facebook_url'] || '' != $options['google_url'] || '' != $options['flickr_url']) { ?> <div class="syndicate"> <ul> <?php if ('off' != $options['show_rss_link']) { ?> <li><a class="rss-link" href="<?php echo get_feed_link('rss2'); ?> " title="<?php esc_attr_e('RSS', 'sundance');