Exemplo n.º 1
0
 function widget($args, $instance)
 {
     $out = $args['before_widget'];
     // And here do whatever you want
     $out .= $args['before_title'];
     $out .= $instance['title'];
     $out .= $args['after_title'];
     $out .= '<div class="widget-glossary-terms-list">';
     $out .= get_glossary_terms_list('ASC', $instance['number'], $instance['tax']);
     $out .= '</div>';
     $out .= $args['after_widget'];
     echo $out;
 }
Exemplo n.º 2
0
/**
 * Shortcode for generate list of glossary terms
 *
 * @since    1.1.0
 *
 * @return list of glossary terms
 */
function glossary_terms_list_shortcode($atts)
{
    $atts = shortcode_atts(array('order' => 'asc', 'num' => '100', 'tax' => ''), $atts);
    return get_glossary_terms_list($atts['order'], $atts['num'], $atts['tax']);
}