Пример #1
0
function cuttz_woo_do_sidebar_alt()
{
    if (!dynamic_sidebar('cuttz-woo-secondary-sb') && current_user_can('edit_theme_options')) {
        genesis_default_widget_area_content('WooCommerce Secondary SB Widget Area');
    }
}
Пример #2
0
/**
 * Echo alternate sidebar default content.
 *
 * Only shows if sidebar is empty, and current user has the ability to edit theme options (manage widgets).
 *
 * @since 1.2.0
 *
 * @uses genesis_default_widget_area_content() Template for default widget are content.
 */
function genesis_do_sidebar_alt()
{
    if (!dynamic_sidebar('sidebar-alt') && current_user_can('edit_theme_options')) {
        genesis_default_widget_area_content(__('Secondary Sidebar Widget Area', 'genesis'));
    }
}
Пример #3
0
/**
 * Outputs Cuttz widget area above footer
 * @return none
 * @since 1.0
 */
function cuttz_sidebar_above_footer()
{
    $show = 'posts' === get_option('show_on_front') && is_home() && genesis_get_option('widgets_above_footer_home', CHILD_SETTINGS_FIELD_EXTRAS, false) || 'page' === get_option('show_on_front') && is_front_page() && genesis_get_option('widgets_above_footer_front', CHILD_SETTINGS_FIELD_EXTRAS, false) || 'page' === get_option('show_on_front') && is_home() && genesis_get_option('widgets_above_footer_posts_page', CHILD_SETTINGS_FIELD_EXTRAS, false) || is_single() && genesis_get_option('widgets_above_footer_post', CHILD_SETTINGS_FIELD_EXTRAS, false) || is_page() && !is_front_page() && genesis_get_option('widgets_above_footer_page', CHILD_SETTINGS_FIELD_EXTRAS, false) || (is_archive() || is_search()) && genesis_get_option('widgets_above_footer_archives', CHILD_SETTINGS_FIELD_EXTRAS, false) || is_404() && genesis_get_option('widgets_above_footer_404', CHILD_SETTINGS_FIELD_EXTRAS, false);
    $show = apply_filters('show_widgets_above_footer', $show);
    if ($show) {
        if (is_active_sidebar('above-footer')) {
            echo '<div class="cuttz-sb-above-footer"><div class="wrap cuttz-sb-wrap cuttz-sb-above-footer-wrap">';
            genesis_widget_area('above-footer');
            echo '</div></div>';
        } else {
            if (current_user_can('edit_theme_options')) {
                $cuttz_show_default_widget_content = apply_filters('widget-default-content-enabled', genesis_get_option('widget-default-content-enabled', CHILD_SETTINGS_FIELD_EXTRAS, false));
                if ($cuttz_show_default_widget_content) {
                    echo '<div class="cuttz-sb-above-footer"><div class="wrap cuttz-sb-wrap cuttz-sb-above-footer-wrap">';
                    genesis_default_widget_area_content(__('Above Footer Widget Area', 'cuttz-framework'));
                    echo '</div></div>';
                }
            }
        }
    }
}