if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) {
require get_template_directory() . '/inc/back-compat.php';
}
if ( ! function_exists( 'lideranca_setup' ) ) :
function lideranca_setup() {
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded
tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/* Enable support for Post Thumbnails on posts and pages. */
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 441, 360, true );
add_image_size( 'home-latest-news', 320, 240, true );
add_image_size( 'services-thumb', 480, 270, true );
add_image_size( 'services-header', 1120, 460, true );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'main' => __( 'Menu principal' ),
'footer' => __( 'Menu rodapé' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
) );
/*
* Enable support for Post Formats.
*
* See: https://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside',
) );
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css' ) );
}
endif; // twentyfifteen_setup
add_action( 'after_setup_theme', 'lideranca_setup' );
// Enqueue scripts and styles
function lideranca_scripts() {
// Load main stylesheet
wp_enqueue_style( 'lideranca-style', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'lideranca_scripts' );
// Remove admin bar
add_filter('show_admin_bar', '__return_false');
// Widgets
function lideranca_widgets_init() {
register_sidebar( array(
'name' => __( 'Barra lateral - Curso' ),
'id' => 'course',
'description' => __( 'Adicione widgets para aparecerem na página do curso.' ),
'before_widget' => '',
'before_title' => '