Example #1
0
/**
 * Returns the author rewrite slug used for author archives.
 *
 * @since  1.0.0
 * @access public
 * @return string
 */
function thds_get_author_rewrite_slug()
{
    $rewrite_base = thds_get_rewrite_base();
    $author_base = thds_get_author_rewrite_base();
    $slug = $author_base ? trailingslashit($rewrite_base) . $author_base : $rewrite_base;
    return apply_filters('thds_get_author_rewrite_slug', $slug);
}
    /**
     * Author rewrite base field callback.
     *
     * @since  1.0.0
     * @access public
     * @return void
     */
    public function field_author_rewrite_base()
    {
        ?>

		<label>
			<code><?php 
        echo esc_url(home_url(thds_get_rewrite_base() . '/'));
        ?>
</code>
			<input type="text" class="regular-text code" name="thds_settings[author_rewrite_base]" value="<?php 
        echo esc_attr(thds_get_author_rewrite_base());
        ?>
" />
		</label>
	<?php 
    }