__( 'Primary Navigation', 'greyzed' ),
) );
/**
* Enqueue scripts and styles
*/
function greyzed_scripts() {
wp_enqueue_style( 'greyzed', get_stylesheet_uri() );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'greyzed_scripts' );
// Add a home link and make the menu fallback markup more like the menu markup
function greyzed_page_menu_args( $args ) {
$args['show_home'] = true;
$args['menu_class'] = 'menu-header';
return $args;
}
add_filter( 'wp_page_menu_args', 'greyzed_page_menu_args' );
function greyzed_widgets_init() {
register_sidebar(array(
'name' => 'Sidebar 1',
'before_widget' => '
',
'after_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => 'Footer Left',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => 'Footer Middle',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => 'Footer Right',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
));
}
add_action( 'widgets_init', 'greyzed_widgets_init' );
/**
* Filters wp_title to print a neat tag based on what is being viewed.
*
* @since Greyzed 1.0.4
*/
function greyzed_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', 'greyzed' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'greyzed_wp_title', 10, 2 );
/**
* Load Jetpack compatibility file.
*/
if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) )
require get_template_directory() . '/inc/jetpack.php';