'ffffff') ) ); add_theme_support( 'custom-header', array( // 'width' => 1160, 'width' => 1080, 'height' => 190, 'flex-height' => true, // 'flex-width' => false, ) ); register_nav_menus( array( 'top' => __( 'Main Menu', 'basic' ), 'bottom' => __( 'Footer Menu', 'basic' ) ) ); } 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_deregister_script( 'jquery-core' ); wp_register_script( 'jquery-core', '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, true); wp_enqueue_script( 'jquery' ); 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'); if ( 'share42' == $socbtns ) wp_enqueue_script( 'basic-share42', get_template_directory_uri() . '/js/share42.min.js', array('jquery'), true, true ); 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 * ========================================================================== */ function basic_editor_styles() { add_editor_style( 'editor-style.css' ); } add_action( 'admin_init', 'basic_editor_styles' ); /* ========================================================================== */ /* ========================================================================== * Register widget area * ========================================================================== */ 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' => '
', )); } add_action( 'widgets_init', 'basic_widgets_init' ); /* ========================================================================== * Add Open Graph meta for singular pages * ========================================================================== */ 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 <<