tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); /* * 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_image_size( 'beatrix-lite-soft-featured', 870, 500, true ); set_post_thumbnail_size( 870, 500, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Header', 'beatrix-lite' ), 'footer' => esc_html__( 'Footer', 'beatrix-lite' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'beatrix_lite_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // Add support for custom logo. add_theme_support( 'custom-logo' ); // Post format. add_theme_support( 'post-formats', array('video', 'audio', 'quote', 'gallery')); } add_action( 'after_setup_theme', 'beatrix_lite_setup' ); /** * Admin Welcome Notice * * @package Beatrix Lite * @since 1.0 */ function beatrix_lite_admin_welcom_notice() { global $pagenow; if ( is_admin() && isset( $_GET['activated'] ) && 'themes.php' === $pagenow ) { echo '

'.sprintf( __( 'Thank you for choosing Beatrix Blog theme. To get started, visit our welcome page.', 'beatrix-lite' ), esc_url( admin_url( 'themes.php?page=beatrix-lite' ) ) ).'

'; } } add_action( 'admin_notices', 'beatrix_lite_admin_welcom_notice' ); /** * Register Sidebars * * @package Beatrix Lite * @since 1.0 */ function beatrix_lite_register_sidebar() { // Main Sidebar Area register_sidebar( array( 'name' => __( 'Main Sidebar', 'beatrix-lite' ), 'id' => 'sidebar-1', 'description' => __( 'Appears on posts and pages.', 'beatrix-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); // Footer Sidebar Area register_sidebar( array( 'name' => __( 'Footer', 'beatrix-lite' ), 'id' => 'footer', 'description' => __( 'Footer Widhet Area : Add widgets here.', 'beatrix-lite' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } // Action to register sidebar add_action( 'widgets_init', 'beatrix_lite_register_sidebar' ); /** * Add a pingback url auto-discovery header for singularly identifiable articles. * * @package Beatrix Lite * @since 1.0 */ function beatrix_lite_pingback_header() { if ( is_singular() && pings_open() ) { echo ''; } } add_action( 'wp_head', 'beatrix_lite_pingback_header', 5 ); // Common Functions File require_once BEATRIX_LITE_DIR . '/includes/beatrix-functions.php'; // Custom template tags for this theme require_once BEATRIX_LITE_DIR . '/includes/template-tags.php'; // Theme Customizer Settings require_once BEATRIX_LITE_DIR . '/includes/customizer.php'; // Script Class require_once( BEATRIX_LITE_DIR . '/includes/class-beatrix-script.php' ); // Theme Dynemic CSS require_once( BEATRIX_LITE_DIR . '/includes/beatrix-theme-css.php' ); // Enable shortcodes in text widgets add_filter('widget_text','do_shortcode'); /** * Load tab dashboard */ if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) { require get_template_directory() . '/includes/dashboard/beatrix-how-it-work.php'; }