tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support('title-tag'); // Add default posts and comments RSS feed links to head. add_theme_support('automatic-feed-links'); //Register Menus register_nav_menus(array( 'primary' => __('Primary Navigation(Header)', 'azeen'), 'top-menu' => esc_html__('Top Bar(Header)', 'azeen') )); // Declare WooCommerce support add_theme_support('woocommerce'); // Add theme support for woocommerce product gallery added in WooCommerce 3.0. add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-slider' ); //Custom Background $args = array( 'default-color' => 'f7f7f7', ); add_theme_support('custom-background', $args); /* * 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( 'video', 'image', 'gallery', 'audio', ) ); /* * Enable support for custom Header image. * * @since advance */ $args = array( 'flex-width' => true, 'flex-height' => true, 'header-text' => false, ); add_theme_support('custom-header', $args); //Post Thumbnail add_theme_support('post-thumbnails'); // Enables post and comment RSS feed links to head add_theme_support('automatic-feed-links'); // Add theme support for selective refresh for widgets. add_theme_support('customize-selective-refresh-widgets'); /* /* * Enable support for custom logo. * * @since azeen */ $defaults = array( 'height' => 100, 'width' => 220, 'flex-width' => true, 'flex-height' => true, 'header-text' => array( 'site-title', 'site-description' ), ); add_theme_support('custom-logo', $defaults); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support('post-thumbnails'); // Add featured image sizes // // Sizes are optimized and cropped for landscape aspect ratio // and optimized for HiDPI displays on 'small' and 'medium' screen sizes. add_image_size('azeen-small', 110, 85, true); // name, width, height, crop add_image_size('azeen-news-big', 370, 370, true); add_image_size('azeen-list-post', 400, 350, true); add_image_size('azeen-large', 750, 400, true); add_image_size('azeen-xlarge', 1440, 400, true); add_image_size('azeen-slider', 1440, 500, true); add_image_size('azeen-slider2', 750, 450, true); // Adding support for core block visual styles. add_theme_support( 'wp-block-styles' ); // Add support for full and wide align images. add_theme_support( 'align-wide' ); } endif; // azeen_setup add_action('after_setup_theme', 'azeen_setup_theme'); if ( ! function_exists( 'wp_body_open' ) ) { /** * Shim for wp_body_open, ensuring backwards compatibility with versions of WordPress older than 5.2. */ function wp_body_open() { do_action( 'wp_body_open' ); } } /** * Fix skip link focus in IE11. * * This does not enqueue the script because it is tiny and because it is only for IE11, * thus it does not warrant having an entire dedicated blocking script being loaded. * * @link https://git.io/vWdr2 */ function azeen_skip_link_focus_fix() { // The following is minified via `terser --compress --mangle -- js/skip-link-focus-fix.js`. ?> __('Blog Sidebar ', 'azeen'), 'id' => 'right-sidebar', 'before_widget' => '
', 'before_title' => '' )); register_sidebar(array( 'name' => __('Footer', 'azeen'), 'id' => 'azeen-footer_sidebar', 'before_widget' => '', 'before_title' => '' )); } add_action('widgets_init', 'azeen_widgets_init');