示例#1
0
/**
 * Template function for showing a View.
 *
 * @since 1.25.0
 *
 * @param null $id
 */
function strong_testimonials_view($id = null)
{
    if (!$id) {
        return;
    }
    $out = WPMST()->get_view_defaults();
    $pairs = array();
    $atts = array('id' => $id);
    $out = WPMST()->parse_view($out, $pairs, $atts);
    echo wpmtst_render_view($out);
}
示例#2
0
/**
 * testimonial_view shortcode
 * Merely a wrapper for the [strong] shortcode until verion 2.0
 *
 * @param      $atts
 * @param null $content
 *
 * @return mixed|string|void
 */
function wpmtst_strong_view_shortcode($atts, $content = null)
{
    $out = shortcode_atts(WPMST()->get_view_defaults(), normalize_empty_atts($atts), 'testimonial_view');
    return wpmtst_render_view($out);
}