urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), 'https://fonts.googleapis.com/css' ); } return $fonts_url; } endif; /** * Enqueue Google fonts style to admin screen for custom header display. * * @return void */ function autofocus_admin_fonts() { wp_enqueue_style( 'autofocus-fonts', autofocus_fonts_url(), array(), null ); } add_action( 'admin_print_scripts-appearance_page_custom-header', 'autofocus_admin_fonts' ); add_action( 'widgets_init', 'autofocus_register_sidebars' ); if ( ! function_exists( 'autofocus_register_sidebars' ) ) : /** * Register our sidebars and widgetized areas. */ function autofocus_register_sidebars() { /* Add theme support for widgetized sidebars. */ register_sidebar( array( 'name' => __( 'Primary Sidebar', 'autofocus' ), 'id' => 'primary-sidebar', 'description' => __( 'Widgets in this sidebar will be shown adjacent to page content.', 'autofocus' ), 'before_title' => '

', 'after_title' => '

' ) ); } endif; // autofocus_register_sidebars if ( ! function_exists( 'autofocus_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own autofocus_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. */ function autofocus_comment( $comment, $args, $depth ) { $GLOBALS[ 'comment' ] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • ', '' ); ?>

  • id="li-comment-">
    comment_parent ) $avatar_size = 24; echo get_avatar( $comment, $avatar_size ); /* translators: 1: comment author, 2: date and time */ printf( __( '%1$s on %2$s said:', 'autofocus' ), sprintf( '%s', get_comment_author_link() ), sprintf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'autofocus' ), get_comment_date(), get_comment_time() ) ) ); ?> ', '' ); ?>
    comment_approved == '0' ) : ?>
    __( 'Reply ', 'autofocus' ), 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ] ) ) ); ?>
    tag based on what is being viewed. * * @since Autofocus 1.1å */ function autofocus_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'able' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'autofocus_wp_title', 10, 2 ); /** * Extends the default WordPress body classes. * * @param array $classes A list of existing body class values. * @return array The filtered body class list. */ function autofocus_body_class( $classes ) { if ( function_exists( 'wp_is_mobile' ) && wp_is_mobile() ) $classes[] = 'mobile'; return $classes; } add_filter( 'body_class', 'autofocus_body_class' ); /** * Implement the Custom Header feature */ require get_template_directory() . '/inc/custom-header.php';