__('Home', 'bs3mobilefirst'), 'menu-item-classes' => 'home', 'menu-item-url' => home_url( '/' ), 'menu-item-status' => 'publish')); if (!has_nav_menu($bs_menu_slug)) { $locations = get_theme_mod('nav_menu_locations'); $locations[$bs_menu_slug] = $menu_id; set_theme_mod( 'nav_menu_locations', $locations ); } } register_nav_menus( array( $bs_menu_slug => $bs_menu_name ) ); } add_action( 'init', 'bs3mobilefirst_register_menu' ); /** * Creates a nicely formatted and more specific title element text for output * in head of document, based on current view. * * @since 1.0 * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string The filtered title. */ function bs3mobilefirst_wp_title( $title, $sep ) { global $paged, $page; if (is_feed()) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'bs3mobilefirst' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'bs3mobilefirst_wp_title', 10, 2 ); /** * Registers widget areas * * @since 1.0 * * @return void */ function bs3mobilefirst_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar Widget Area', 'bs3mobilefirst' ), 'id' => 'sidebar-1', 'description' => __( 'Appears on the right side of each page.', 'bs3mobilefirst' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'bs3mobilefirst_widgets_init' ); if ( ! function_exists( 'bs3mobilefirst_paging_nav' ) ) : /** * Displays navigation to next/previous set of posts when applicable. * * @since 1.0 * * @return void */ function bs3mobilefirst_paging_nav() { global $wp_query; // Don't print empty markup if there's only one page. if ( $wp_query->max_num_pages < 2 ) return; ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; ?>
  • '; // Post author if ( 'post' == get_post_type() ) printf('', esc_url( get_author_posts_url( get_the_author_meta( 'ID') ) ), esc_attr( sprintf( __( 'View all posts by %s', 'bs3mobilefirst' ), get_the_author() ) ), get_the_author() ); echo '
  • '; if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) bs3mobilefirst_entry_date(); echo '
  • '; edit_post_link( __( ' Edit', 'bs3mobilefirst' ) ); echo '
  • '; bs3mobilefirst_cat_meta(); echo '

    '; } endif; if ( ! function_exists( 'bs3mobilefirst_entry_date' ) ): /** * Prints HTML with date information for current post. * @since 1.0 * * @param boolean $echo Whether to echo the date. Default true. * @return string The HTML-formatted post date. */ function bs3mobilefirst_entry_date( $echo = true ) { if ( has_post_format( array( 'chat', 'status' ) ) ) $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'bs3mobilefirst' ); else $format_prefix = '%2$s'; $date = sprintf( ' ', esc_url( get_permalink() ), esc_attr( sprintf( __( '%s', 'bs3mobilefirst' ), the_title_attribute( 'echo=0' ) ) ), esc_attr( get_the_date( 'c' ) ), esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) ) ); if ( $echo ) echo $date; return $date; } endif; if ( ! function_exists( 'bs3mobilefirst_tag_meta' ) ): /** * Displays tags for each post * @return null */ function bs3mobilefirst_tag_meta() { // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list(''); if ( $tag_list ) echo $tag_list; } endif; if ( ! function_exists('bs3mobilefirst_cat_meta' ) ): /** * Display categories for each post * @return null */ function bs3mobilefirst_cat_meta() { // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list('
  • '); if ( $categories_list ) echo ''; } endif;