str_replace('|', '%7C','PT+Serif:700|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i'), 'subset' => 'latin,latin-ext' ); wp_enqueue_style('google-fonts', add_query_arg ( $googleFontsArgs, "https://fonts.googleapis.com/css" ), array(), '1.0.0' ); wp_enqueue_style( 'bootstrap-grid', get_template_directory_uri() . '/css/bootstrap-grid.css', array(),'4.5.0' ); wp_enqueue_style( 'owl.carousel', get_template_directory_uri() . '/css/owl.carousel.css', array(),'2.3.4' ); wp_enqueue_style( 'owl.theme.default', get_template_directory_uri() . '/css/owl.theme.default.css', array(),'2.3.4' ); wp_enqueue_script( 'javes-navigation', get_template_directory_uri() . '/js/navigation.js', FALSE, '1.0', TRUE ); wp_enqueue_script( 'owl.carousel', get_template_directory_uri() . '/js/owl.carousel.js', array('jquery'), '2.3.4', TRUE ); wp_enqueue_script( 'javes-script', get_template_directory_uri() . '/js/script.js', array('jquery'), '1.0', TRUE ); if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); $css = ''; if ( get_header_image() ) : $css .= ' header.header { background-image: url('.esc_url(get_header_image()).'); -webkit-background-size: cover !important; -moz-background-size: cover !important; -o-background-size: cover !important; background-size: cover !important; }'; endif; if ( get_header_textcolor() ) : $css .= ' .logo a { color: #'.esc_attr(get_header_textcolor()).'; }'; endif; if ( get_theme_mod('javes_color_overlay') ) : $css .= ' a:hover, a:focus, .logo a:hover, .logo a:focus, #main-menu a:hover, #main-menu ul li a:hover, #main-menu li:hover > a, #main-menu a:focus, #main-menu ul li a:focus, #main-menu li.focus > a, #main-menu li:focus > a, #main-menu ul li.current-menu-item > a, #main-menu ul li.current_page_item > a, #main-menu ul li.current-menu-parent > a, #main-menu ul li.current_page_ancestor > a, #main-menu ul li.current-menu-ancestor > a { color: '.esc_attr(get_theme_mod('javes_color_overlay')).'; }'; endif; wp_add_inline_style( 'javes-style', $css ); } add_action( 'wp_enqueue_scripts', 'javes_enqueue_scripts' ); } /*-----------------------------------------------------------------------------------*/ /* Setup theme */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('javes_after_setup_theme')) { function javes_after_setup_theme() { if ( ! isset( $content_width ) ) $content_width = 900; register_nav_menus( array( 'main-menu' => esc_html__( 'Main menu', 'javes' ), )); add_theme_support('title-tag'); add_theme_support('automatic-feed-links'); add_theme_support('post-thumbnails'); add_image_size( 'javes_large_thumbnail', 1110, 400, true ); add_image_size( 'javes_small_thumbnail', 730, 263, true ); add_image_size( 'javes_carousel_thumbnail', 300, 300, true ); add_theme_support( 'custom-background', array( 'default-color' => 'f3f3f3' )); add_theme_support( 'custom-header', array( 'width' => 1920, 'height' => 90 )); require_once( trailingslashit( get_template_directory() ) . '/core/includes/class-plugin-activation.php' ); require_once( trailingslashit( get_template_directory() ) . '/core/functions/function-required-plugins.php' ); } add_action( 'after_setup_theme', 'javes_after_setup_theme', 999 ); } /*-----------------------------------------------------------------------------------*/ /* Get post comments */ /*-----------------------------------------------------------------------------------*/ if ( ! function_exists( 'javes_list_comments' ) ) { function javes_list_comments($comment, $args, $depth) { ?>
  • id="li-comment-">
    comment_author_email, 80, 'retro' ); ?>
    comment_approved == '0') : ?>

    esc_html__('Sidebar','javes'), 'id' => 'javes-sidebar', 'description' => esc_html__('This sidebar will be shown next to the content.', 'javes'), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => esc_html__('Footer sidebar','javes'), 'id' => 'javes-footer-sidebar', 'description' => esc_html__('This sidebar will be shown next at the bottom of your content.', 'javes'), 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' )); } add_action( 'widgets_init', 'javes_widgets_init' ); } function javes_customize_register( $wp_customize ) { $wp_customize->add_panel('javes_panel', array( 'title' => esc_html__( 'Javes settings', 'javes' ), )); $wp_customize->add_section('javes_carousel_settings', array( 'title' => esc_html__( 'Carousel settings', 'javes' ), 'panel' => 'javes_panel', )); $wp_customize->add_setting( 'javes_carousel_items', array( 'default' => 5, 'sanitize_callback' => 'absint', )); $wp_customize->add_control( 'javes_carousel_items', array( 'type' => 'number', 'section' => 'javes_carousel_settings', 'label' => esc_html__('Carousel items.', 'javes'), 'description' => esc_html__('How many items do you want to display?', 'javes'), 'input_attrs' => array( 'min' => 1, 'max' => 10, 'step' => 1, ) )); $wp_customize->add_section('javes_content_settings', array( 'title' => esc_html__( 'Content settings', 'javes' ), 'panel' => 'javes_panel', )); $wp_customize->add_setting( 'javes_content_info', array( 'default' => true, 'sanitize_callback' => 'javes_checkbox_sanize', )); $wp_customize->add_control( 'javes_content_info', array( 'type' => 'checkbox', 'section' => 'javes_content_settings', 'label' => esc_html__('Content informations.', 'javes'), 'description' => esc_html__('Do you want to display the informations of current content?.', 'javes'), )); $wp_customize->add_section('javes_footer_settings', array( 'title' => esc_html__( 'Footer settings', 'javes' ), 'panel' => 'javes_panel', )); $wp_customize->add_setting( 'javes_footer_text', array( 'default' => '', 'sanitize_callback' => 'sanitize_textarea_field', )); $wp_customize->add_control( 'javes_footer_text', array( 'type' => 'textarea', 'section' => 'javes_footer_settings', 'label' => esc_html__('Footer text.', 'javes'), 'description' => esc_html__('Insert here the content of footer.', 'javes'), )); $wp_customize->add_setting( 'javes_color_overlay', array( 'default' => '#8098D0', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( 'javes_color_overlay', array( 'type' => 'color', 'section' => 'colors', 'label' => esc_html__('Color overlay.', 'javes'), 'description' => esc_html__('Select a color on mouse hover.', 'javes'), )); function javes_checkbox_sanize( $input ) { return $input ? true : false; } } add_action( 'customize_register', 'javes_customize_register' ); ?>