'ffffff' ) ) ); add_theme_support( 'custom-header', array( 'width' => 1080, 'height' => 190, 'flex-height' => true, 'flex-width' => true, ) ); register_nav_menus( array( 'top' => __( 'Main Menu', 'basic' ), 'bottom' => __( 'Footer Menu', 'basic' ) ) ); // 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', 'basic_setup' ); /* ========================================================================== */ /* ========================================================================== * Load scripts and styles * ========================================================================== */ if ( ! function_exists( 'basic_enqueue_style_and_script' ) ) : function basic_enqueue_style_and_script() { global $post, $wp_query; // STYLES wp_enqueue_style( 'basic-fonts', '//fonts.googleapis.com/css?family=PT+Serif:400,700|Open+Sans:400,400italic,700,700italic&subset=latin,cyrillic', array(), true ); wp_enqueue_style( 'basic-style', get_stylesheet_uri(), array(), true ); // SCRIPTS wp_enqueue_script( 'basic-html5shiv', get_template_directory_uri() . '/js/html5shiv.min.js', array(), '3.7.3', true ); wp_script_add_data( 'basic-html5shiv', 'conditional', 'lt IE 9' ); wp_enqueue_script( 'basic-scripts', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), true, true ); if ( is_singular() ) { $socbtns = basic_get_theme_option( 'social_share', 'custom' ); if ( 'yandex' == $socbtns ) { wp_enqueue_script( 'basic-yandexshare', '//yastatic.net/share2/share.js', array(), true, true ); } if ( comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply', false, true, true ); } } } endif; add_action( 'wp_enqueue_scripts', 'basic_enqueue_style_and_script' ); /* ========================================================================== */ /* ========================================================================== * admin area * ========================================================================== */ if ( ! function_exists( 'basic_editor_styles' ) ) : function basic_editor_styles() { add_editor_style( 'editor-style.css' ); } endif; add_action( 'admin_init', 'basic_editor_styles' ); /* ========================================================================== */ /* ========================================================================== * Register widget area * ========================================================================== */ if ( ! function_exists( 'basic_widgets_init' ) ) : function basic_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'basic' ), 'id' => 'sidebar', 'description' => __( 'Add widgets here to appear in your sidebar.', 'basic' ), 'before_widget' => '
', 'after_title' => '
', ) ); } endif; add_action( 'widgets_init', 'basic_widgets_init' ); /* ========================================================================== * Add Open Graph meta for singular pages * ========================================================================== */ if ( ! function_exists( 'basic_add_social' ) ) : function basic_add_social( $content ) { global $post; if ( is_singular() && basic_get_theme_option( 'add_social_meta' ) ) { $aiod = get_post_meta( $post->ID, '_aioseop_description', true ); $descr = ( isset( $aiod ) ) ? esc_html( $aiod ) : $post->post_excerpt; $title = get_the_title(); $url = get_the_permalink(); $blogname = get_bloginfo( 'name' ); $img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail', false ); echo <<