__( 'Primary Navigation', 'titan' ), ) ); /** * Enable support for Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); add_theme_support( 'custom-background', array( 'default-color' => 'f9f7f5', ) ); add_theme_support( 'custom-header', apply_filters( 'titan_custom_header_args', array( 'header-text' => false, 'width' => 960, 'height' => 180, 'wp-head-callback' => 'titan_header_style', 'admin-head-callback' => 'titan_admin_header_style', ) ) ); } endif; // titan_setup add_action( 'after_setup_theme', 'titan_setup' ); // Required functions require_once( TITAN_FUNC_PATH . '/comments.php' ); require_once( TITAN_FUNC_PATH . '/titan-extend.php' ); require_once( get_template_directory() . '/inc/customizer.php' ); // Enable widgets if ( function_exists( 'register_sidebar_widget' ) ) { register_sidebar( array( 'name' => __( 'Sidebar' ), 'id' => 'titan_sidebar' ) ); register_sidebar( array( 'name' => __( 'Footer Left' ), 'id' => 'footer_left' ) ); register_sidebar( array( 'name' => __( 'Footer Center' ), 'id' => 'footer_center' ) ); register_sidebar( array( 'name' => __( 'Footer Right' ), 'id' => 'footer_right' ) ); } // Fallback for primary navigation. function titan_page_menu() { global $titan; ?> by ', 'titan' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'titan' ), get_the_author_meta( 'display_name' ) ) ), esc_attr( get_the_author_meta( 'display_name' ) ) ); } } endif; /** * Enqueue scripts and styles */ function titan_scripts() { wp_enqueue_style( 'titan', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'titan_scripts' ); /** * Filters wp_title to print a neat tag based on what is being viewed. * * @since Titan 1.26 */ function titan_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', 'titan' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'titan_wp_title', 10, 2 ); /** * Template tag that renders the users Twitter URL. */ function titan_twitter_url() { global $titan; $url = 'http://twitter.com/'; $username = titan_sanitize_twitter_username( $titan->twitter() ); if ( ! empty( $username ) ) $url .= $username; echo esc_url( $url ); } /** * Load Jetpack compatibility file. */ if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) ) require get_template_directory() . '/inc/jetpack.php';