'eeeeee' ) ) ); add_theme_support( 'custom-header', array( 'width' => 1080, 'height' => 190, 'flex-height' => true, 'flex-width' => true, ) ); register_nav_menus( array( 'top' => __( 'Main Menu', 'aperitto' ), 'bottom' => __( 'Footer Menu', 'aperitto' ) ) ); // logo $args = array(); $lpos = get_theme_mod( 'display_logo_and_title' ); if ( false === $lpos || 'image' == $lpos ) { $args['header-text'] = array( 'blog-name' ); } add_theme_support( 'custom-logo', $args ); } endif; add_action( 'after_setup_theme', 'aperitto_setup' ); /* ========================================================================== */ /* ========================================================================== * Load scripts and styles * ========================================================================== */ if ( ! function_exists( 'aperitto_enqueue_style_and_script' ) ) : function aperitto_enqueue_style_and_script() { global $post, $wp_query; // STYLES wp_enqueue_style( 'aperitto-style', get_stylesheet_uri(), array(), true ); // SCRIPTS wp_enqueue_script( 'aperitto-html5shiv', get_template_directory_uri() . '/js/html5shiv.min.js', array(), '3.7.3', true ); wp_script_add_data( 'aperitto-html5shiv', 'conditional', 'lt IE 9' ); wp_enqueue_script( 'aperitto-scripts', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), true, true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply', false, true, true ); } } endif; add_action( 'wp_enqueue_scripts', 'aperitto_enqueue_style_and_script' ); /* ========================================================================== */ /* ========================================================================== * admin area * ========================================================================== */ if ( ! function_exists( 'aperitto_editor_styles' ) ) : function aperitto_editor_styles() { add_editor_style( 'editor-style.css' ); } endif; add_action( 'admin_init', 'aperitto_editor_styles' ); /* ========================================================================== */ /* ========================================================================== * Register widget area * ========================================================================== */ if ( ! function_exists( 'aperitto_widgets_init' ) ) : function aperitto_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'aperitto' ), 'id' => 'sidebar', 'description' => __( 'Add widgets here to appear in your sidebar.', 'aperitto' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } endif; add_action( 'widgets_init', 'aperitto_widgets_init' ); /* ========================================================================== * * default COMMENT callback * ========================================================================== */ if ( ! function_exists( 'aperitto_html5_comment' ) ) : function aperitto_html5_comment( $comment, $args, $depth ) { $tag = ( 'div' === $args['style'] ) ? 'div' : 'li'; ?> < id="comment-" >
    'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>