'527f8d' ) );
/**
* This theme uses wp_nav_menu() in one location.
*/
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'silesia' ),
) );
/**
* Add support for the Aside Post Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery' ) );
add_filter( 'use_default_gallery_style', '__return_false' );
}
endif; // silesia_setup
add_action( 'after_setup_theme', 'silesia_setup' );
/**
* Register widgetized area and update sidebar with default widgets
*
* @since Silesia 1.0
*/
function silesia_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'silesia' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Sliding Sidebar (Left)', 'silesia' ),
'id' => 'sidebar-slide-out',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'silesia_widgets_init' );
/**
* Enqueue scripts and styles
*/
function silesia_scripts() {
wp_enqueue_style( 'silesia-style', get_stylesheet_uri() );
wp_enqueue_script( 'silesia', get_template_directory_uri() . '/js/silesia.js', array( 'jquery' ), '20130117', true );
wp_localize_script( 'silesia', 'silesia', array(
'open_sidebar_title' => __( 'Open sidebar', 'silesia' ),
'close_sidebar_title' => __( 'Close sidebar', 'silesia' )
) );
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' );
}
if ( get_background_color() ) {
wp_add_inline_style( 'silesia-style', '
#tertiary:after {
border-color: transparent #' . get_background_color() . ';
}
');
}
}
add_action( 'wp_enqueue_scripts', 'silesia_scripts' );
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* 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';