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( 'menu-1' => esc_html__( 'Primary', 'realy-store' ), ) ); /* * 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( 'realy_store_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, ) ); } endif; add_action( 'after_setup_theme', 'realy_store_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 $realy_store_content_width */ function realy_store_content_width() { $GLOBALS['realy_store_content_width'] = apply_filters( 'realy_store_content_width', 640 ); } add_action( 'after_setup_theme', 'realy_store_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function realy_store_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'realy-store' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'realy-store' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 1', 'realy-store' ), 'id' => 'footer-1', 'description' => esc_html__( 'Add widgets here.', 'realy-store' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 2', 'realy-store' ), 'id' => 'footer-2', 'description' => esc_html__( 'Add widgets here.', 'realy-store' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 3', 'realy-store' ), 'id' => 'footer-3', 'description' => esc_html__( 'Add widgets here.', 'realy-store' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 4', 'realy-store' ), 'id' => 'footer-4', 'description' => esc_html__( 'Add widgets here.', 'realy-store' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if (is_plugin_active( 'woocommerce/woocommerce.php')) { //if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { register_sidebar( array( 'name' => esc_html__( 'WooCommerce Product Section', 'realy-store' ), 'id' => 'woocommerce_product', 'description' => esc_html__( 'Add widgets here.', 'realy-store' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } } add_action( 'widgets_init', 'realy_store_widgets_init' ); /** * Enqueue scripts and styles. */ function realy_store_scripts() { wp_enqueue_script('jquery', false, array(), false, false); wp_enqueue_style( 'realy-store-style', get_stylesheet_uri(), array(), realy_store_S_VERSION ); wp_style_add_data( 'realy-store-style', 'rtl', 'replace' ); wp_enqueue_style( 'realy-store-fontawesome-css', esc_url(get_template_directory_uri()).'/assets/fontawesome/css/font-awesome.css' , array(), realy_store_S_VERSION ); wp_enqueue_style( 'realy-store-theme-css', esc_url(get_template_directory_uri()).'/assets/css/theme.css' , array(), realy_store_S_VERSION ); wp_enqueue_script( 'realy-store-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), realy_store_S_VERSION, true ); wp_enqueue_style( 'realy-store-owl-carousel-css', esc_url(get_template_directory_uri()).'/assets/css/owl.carousel.css' , array(), realy_store_S_VERSION ); wp_enqueue_style( 'realy-store-owl-carousel_theme-css', esc_url(get_template_directory_uri()).'/assets/css/owl.theme.css' , array(), realy_store_S_VERSION ); wp_enqueue_script( 'realy-store-owl-carousel-js', get_template_directory_uri() . '/assets/js/owl.carousel.js', array(), realy_store_S_VERSION, true ); wp_enqueue_script( 'realy-store-custom-js', get_template_directory_uri() . '/assets/js/custom.js', array(), realy_store_S_VERSION, true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'realy_store_scripts' ); function realy_store_admin_script_style(){ wp_enqueue_style( 'realy-store-admin-site-css', esc_url(get_template_directory_uri()).'/assets/css/admin_site.css' , array(), realy_store_S_VERSION ); wp_enqueue_style('wp-color-picker' ); wp_enqueue_script('wp-color-picker-alpha', get_template_directory_uri() . '/assets/js/wp-color-picker-alpha.js', array( 'wp-color-picker' ), '1.0.0', true ); $color_picker_strings = array( 'clear' => __( 'Clear', 'realy-store' ), 'clearAriaLabel' => __( 'Clear color', 'realy-store' ), 'defaultString' => __( 'Default', 'realy-store' ), 'defaultAriaLabel' => __( 'Select default color', 'realy-store' ), 'pick' => __( 'Select Color', 'realy-store' ), 'defaultLabel' => __( 'Color value', 'realy-store' ), ); wp_localize_script( 'wp-color-picker-alpha', 'wpColorPickerL10n', $color_picker_strings ); wp_enqueue_script( 'wp-color-picker-alpha' ); } add_action('admin_enqueue_scripts', 'realy_store_admin_script_style'); /** * 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'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; require get_template_directory() . '/inc/customizer-css.php'; require get_template_directory() . '/inc/customizer_control.php'; require get_template_directory() . '/inc/about.php'; require get_template_directory() . '/inc/default_setting.php'; require get_template_directory() . '/inc/err-our-team/err-our-team.php'; require get_template_directory() . '/inc/wptt-webfont-loader.php'; /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; } /** * Load WooCommerce compatibility file. */ if ( class_exists( 'WooCommerce' ) ) { require get_template_directory() . '/inc/woocommerce.php'; } function realy_store_breadcrumb_slider(){ ?>
esc_attr(get_theme_mod('featured_slider_autoplay', 'true')), 'img_autoplayspped' => esc_attr(get_theme_mod('featured_slider_autoplay_speed','1000')), 'img_autoplaytimeout' => esc_attr(get_theme_mod('featured_slider_autoplay_timeout','5000')), 'autoplay' => esc_attr(get_theme_mod('our_testimonial_slider_autoplay', 'true')), 'autoplayspped' => esc_attr(get_theme_mod('our_testimonial_slider_autoplay_speed','1000')), 'autoplaytimeout' => esc_attr(get_theme_mod('our_testimonial_autoplay_timeout','5000')), 'sponsor_autoplay' => esc_attr(get_theme_mod('our_sponsors_slider_autoplay', 'true')), 'sponsor_autoplayspped' => esc_attr(get_theme_mod('our_sponsors_slider_autoplay_speed','1000')), 'sponsor_autoplaytimeout' => esc_attr(get_theme_mod('our_sponsors_autoplay_timeout','5000')), ); wp_localize_script( 'realy-store-main-js', 'realy_store_main_vars', $main_js_data ); } add_action( 'wp_enqueue_scripts', 'realy_store_main_js' );