tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * 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' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'main-menu' => esc_html__( 'Main Menu', 'relax-spa' ), ) ); /* * 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', 'style', 'script' ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'relax_spa_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 core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); add_editor_style(); add_theme_support( 'register_block_style' ); add_theme_support( 'register_block_pattern' ); add_theme_support( "wp-block-styles" ); add_theme_support( "responsive-embeds" ); add_theme_support( "align-wide" ); require get_template_directory() . '/inc/starter-content.php'; $starter_content = relax_spa_starter_content(); add_theme_support( 'starter-content', $starter_content ); } } add_action( 'after_setup_theme', 'relax_spa_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function relax_spa_content_width() { $GLOBALS['content_width'] = apply_filters( 'relax_spa_content_width', 640 ); } add_action( 'after_setup_theme', 'relax_spa_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ require get_template_directory() . '/inc/widgets/widgets.php'; /** * Enqueue scripts and styles. */ function relax_spa_scripts() { $body_font_family = get_theme_mod( 'body_font_family', 'Mulish' ); $heading_font_family = get_theme_mod( 'heading_font_family', 'Poppins' ); $topheading_font_family = get_theme_mod( 'topheading_font_family', 'Caveat' ); $site_identity_font_family = esc_attr( get_theme_mod( 'site_identity_font_family', 'Dancing Script' ) ); wp_enqueue_style( 'relax-spa-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'fontello', get_template_directory_uri() . '/css/fontello.css' ); wp_enqueue_style( 'owl', get_template_directory_uri() . '/css/owl.carousel.min.css' ); wp_enqueue_style( 'relax-spa-style', get_stylesheet_uri(), array(), RELAX_SPA_VERSION ); wp_style_add_data( 'relax-spa-style', 'rtl', 'replace' ); wp_enqueue_style( 'relax-spa-googlefonts', 'https://fonts.googleapis.com/css?family=' . esc_attr( $body_font_family ) . ':200,300,400,500,600,700,800,900|' . esc_attr( $heading_font_family ) . ':200,300,400,500,600,700,800,900|' . esc_attr( $topheading_font_family ) . ':200,300,400,500,600,700,800,900|' . esc_attr( $site_identity_font_family ) . ':200,300,400,500,600,700,800,900|' ); wp_enqueue_script( 'relax-spa-bootstrap', get_template_directory_uri() . '/js/bootstrap.bundle.min.js', array( 'jquery' ) ); wp_enqueue_script( 'owl', get_template_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ) ); wp_enqueue_script( 'relax-spa-navigation', get_template_directory_uri() . '/js/navigation.js', array(), RELAX_SPA_VERSION, true ); wp_enqueue_script( 'relax-spa-script', get_template_directory_uri() . '/js/script.js', array( 'jquery' ), '', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'relax_spa_scripts' ); /** * Recommended Plugins */ require get_template_directory() . '/inc/tgmpa/recommended-plugins.php'; /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; /** * Custom contrl */ require get_template_directory() . '/inc/custom-controls/custom-control.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Shortcode hooks */ require get_template_directory() . '/inc/shortcode-hooks.php'; /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; } /** * Customizer changes css */ require get_template_directory() . '/inc/dynamic-css.php';