Пример #1
0
/**
 * Returns the theme author URL.
 *
 * @since  1.0.0
 * @access public
 * @param  int     $theme_id
 * @return string
 */
function thds_get_theme_author_url($theme_id = 0)
{
    $theme_id = thds_get_theme_id($theme_id);
    $author_id = thds_get_theme_author_id($theme_id);
    $author_url = $author_id ? thds_get_author_url($author_id) : '';
    return apply_filters('thds_get_theme_author_url', $author_url, $theme_id);
}
Пример #2
0
/**
 * Filter on `author_link` to change the URL when viewing a portfolio theme. The new link
 * should point to the portfolio author archive.
 *
 * @since  1.0.0
 * @access public
 * @param  string  $url
 * @param  int     $author_id
 * @param  string  $nicename
 * @return string
 */
function thds_author_link_filter($url, $author_id, $nicename)
{
    return thds_is_theme() ? thds_get_author_url($author_id) : $url;
}