Exemplo n.º 1
0
/**
 * Get the Subtitle
 *
 * @since  1.0
 *
 * @uses  WPSubtitle::get_the_subtitle()
 *
 * @param   int|object  $post    Post ID or object.
 * @param   string      $before  Before the subtitle.
 * @param   string      $after   After the subtitle.
 * @param   bool        $echo    Output if true, return if false.
 * @return  string               The subtitle string.
 */
function get_the_subtitle($post = 0, $before = '', $after = '', $echo = false)
{
    $subtitle = WPSubtitle::get_the_subtitle($post);
    if (!empty($subtitle)) {
        $subtitle = $before . $subtitle . $after;
    }
    if (!$echo) {
        return $subtitle;
    }
    echo $subtitle;
}
Exemplo n.º 2
0
/**
 * Get the Subtitle
 *
 * @since  1.0
 *
 * @uses  WPSubtitle::get_the_subtitle()
 *
 * @param   int|object  $post    Post ID or object.
 * @param   string      $before  Before the subtitle.
 * @param   string      $after   After the subtitle.
 * @param   bool        $echo    Output if true, return if false.
 * @return  string               The subtitle string.
 */
function get_the_subtitle($post = 0, $before = '', $after = '', $echo = true)
{
    $subtitle = WPSubtitle::get_the_subtitle($post);
    if (!empty($subtitle)) {
        $subtitle = wptexturize($before . $subtitle . $after);
    }
    if (!$echo) {
        return $subtitle;
    }
    echo $subtitle;
}