Ejemplo n.º 1
0
/**
 * Renders sidebar.
 * 
 */
function g1_sidebar_render($s = 'primary')
{
    if (is_active_sidebar($s)) {
        dynamic_sidebar($s);
        return;
    } elseif (current_user_can('administrator')) {
        $helpmode = new G1_Helpmode('empty_sidebar_' . $s, __('Empty sidebar', 'g1_theme'), '<p>' . sprintf(__('The "%s" sidebar is empty.', 'g1_theme'), $s) . ' ' . sprintf(__('You should <a href="%s">add some widgets</a> to it.', 'g1_theme'), network_admin_url('widgets.php')) . '</p>', 'warning');
        $helpmode->render();
    }
}
Ejemplo n.º 2
0
        ?>
            </ol>
        </div>
    <?php 
    }
    ?>

    <?php 
    if (comments_open()) {
        ?>
        <?php 
        if (is_front_page()) {
            ?>
            <?php 
            $g1_helpmode = new G1_Helpmode('hide_comments', __('Do you want to hide comments?', 'g1_theme'), '<ul>' . '<li>' . sprintf(__('When <a href="%s">editing this page</a> make sure the "Discussion" box is visible: configure your screen options in the top-right section of the WordPress Admin. Sometimes this box can be hidden.', 'g1_theme'), get_edit_post_link()) . '</li>' . '<li>' . __('Uncheck "Allow comments" and "Allow trackbacks and pingbacks on this page".', 'g1_theme') . '</li>' . '<li>' . __('Save changes', 'g1_theme') . '</li>' . '</ul>', 'warning');
            $g1_helpmode->render();
            ?>
        <?php 
        }
        ?>

        <?php 
        comment_form();
        ?>

    <?php 
    }
    ?>
    </section><!-- #comments -->
<?php 
}