예제 #1
0
/**
 * Echo widget badge.
 *
 * @since 1.0.0
 */
function beans_widget_badge()
{
    if (!beans_get_widget('badge')) {
        return;
    }
    echo beans_open_markup('beans_widget_badge' . _beans_widget_subfilters(), 'div', 'class=uk-panel-badge uk-badge');
    echo beans_widget_shortcodes(beans_get_widget('badge_content'));
    echo beans_close_markup('beans_widget_badge' . _beans_widget_subfilters(), 'div');
}
예제 #2
0
// Widgets.
if (beans_have_widgets()) {
    /**
     * Fires before widgets loop.
     *
     * This hook only fires if widgets exist.
     *
     * @since 1.0.0
     */
    do_action('beans_before_widgets_loop');
    while (beans_have_widgets()) {
        beans_setup_widget();
        if ('grid' == beans_get_widget_area('beans_type')) {
            beans_open_markup_e('beans_widget_grid' . _beans_widget_subfilters(), 'div', beans_widget_shortcodes('class=uk-width-medium-1-{count}'));
        }
        beans_open_markup_e('beans_widget_panel' . _beans_widget_subfilters(), 'div', beans_widget_shortcodes('class=tm-widget uk-panel widget_{type} {id}'));
        /**
         * Fires in each widget panel structural HTML.
         *
         * @since 1.0.0
         */
        do_action('beans_widget');
        beans_close_markup_e('beans_widget_panel' . _beans_widget_subfilters(), 'div');
        if ('grid' == beans_get_widget_area('beans_type')) {
            beans_close_markup_e('beans_widget_grid' . _beans_widget_subfilters(), 'div');
        }
    }
    /**
     * Fires after the widgets loop.
     *
     * This hook only fires if widgets exist.