__( 'Primary Menu', 'widely' ),
) );
/**
* Add support for the Aside Post Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery' ) );
/**
* This theme supports custom background color and image, and here
* we also set up the default background color.
*/
add_theme_support( 'custom-background', array(
'default-color' => 'e6e6e6',
) );
}
endif; // widely_setup
add_action( 'after_setup_theme', 'widely_setup' );
/**
* Register widgetized area and update sidebar with default widgets
*
* @since Widely 1.0
*/
function widely_widgets_init() {
register_sidebar( array(
'name' => __( 'Footer Area One', 'widely' ),
'id' => 'sidebar-1',
'description' => __( 'An optional widget area for your site footer', 'widely' ),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Area Two', 'widely' ),
'id' => 'sidebar-2',
'description' => __( 'An optional widget area for your site footer', 'widely' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Area Three', 'widely' ),
'id' => 'sidebar-3',
'description' => __( 'An optional widget area for your site footer', 'widely' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Area Four', 'widely' ),
'id' => 'sidebar-4',
'description' => __( 'An optional widget area for your site footer', 'widely' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'widely_widgets_init' );
/**
* Enqueue scripts and styles
*/
function widely_scripts() {
wp_enqueue_style( 'widely-style', get_stylesheet_uri(), array(), '20121214' );
wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
if ( is_singular() && wp_attachment_is_image() ) {
wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
}
}
add_action( 'wp_enqueue_scripts', 'widely_scripts' );
/**
* Adjusts content width for pages
*/
function widely_set_content_width() {
global $content_width;
if ( is_page() )
$content_width = 960;
}
add_action( 'template_redirect', 'widely_set_content_width' );
/**
* Implement the Custom Header feature
*/
require( get_template_directory() . '/inc/custom-header.php' );
/**
* Load Jetpack compatibility file.
*/
if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) )
require get_template_directory() . '/inc/jetpack.php';