示例#1
0
/**
* Returns the site description wrapped in an `<h2>` tag.
*
* @since 1.2.0
* @access public
* @return string
*/
function bon_get_site_description()
{
    if ($desc = get_bloginfo('description')) {
        $desc = sprintf('<h2 %s>%s</h2>', bon_get_attr('site-description'), $desc);
    }
    return apply_filters('bon_site_description', $desc);
}
示例#2
0
/**
 * Outputs an HTML element's attributes.
 *
 * @since  1.2.0
 * @access public
 * @param  string  $slug        The slug/ID of the element (e.g., 'sidebar').
 * @param  string  $context     A specific context (e.g., 'primary').
 * @param  array   $attributes  Custom attributes to pass in.
 * @return void
 */
function bon_attr($slug, $context = '', $attributes = array())
{
    echo bon_get_attr($slug, $context, $attributes);
}