100, 'width' => 400, 'flex-height' => true, 'flex-width' => true ) ); add_theme_support('title-tag'); add_theme_support('woocommerce'); add_theme_support('wc-product-gallery-zoom'); add_theme_support('wc-product-gallery-lightbox'); add_theme_support('wc-product-gallery-slider'); add_theme_support('automatic-feed-links'); add_theme_support('post-thumbnails'); $args = array('default-color' => 'fff'); add_theme_support( 'custom-background', $args ); register_nav_menus( array( 'primary' => esc_html__('Primary Menu', 'natalielite') ) ); } // Load Google fonts function natalielite_google_fonts_url() { $fonts_url = ''; $Lora = _x( 'on', 'Lora font: on or off', 'natalielite' ); $Montserrat = _x( 'on', 'Montserrat: on or off', 'natalielite' ); $Dancing = _x( 'on', 'Dancing Script font: on or off', 'natalielite' ); if ( 'off' !== $Montserrat || 'off' !== $Lora ) { $font_families = array(); if ( 'off' !== $Lora ) $font_families[] = 'Lora:400,400italic'; if ('off' !== $Montserrat) { $font_families[] = 'Montserrat:300,400,500'; } $query_args = array( 'family' => urlencode(implode('|', $font_families )), 'subset' => urlencode('latin,latin-ext') ); $fonts_url = add_query_arg($query_args, '//fonts.googleapis.com/css'); } return esc_url_raw($fonts_url); } // Google fonts function natalielite_enqueue_googlefonts() { wp_enqueue_style( 'natalielite-googlefonts', natalielite_google_fonts_url(), array(), null ); } add_action('wp_enqueue_scripts', 'natalielite_enqueue_googlefonts'); // Register & Enqueue Styles / Scripts add_action('wp_enqueue_scripts', 'natalielite_load_scripts'); function natalielite_load_scripts() { // CSS wp_enqueue_style('bootstrap', NATALIELITE_LIBS_URI . 'bootstrap/bootstrap.min.css'); wp_enqueue_style('fontawesome', NATALIELITE_LIBS_URI . 'fontawesome/css/all.css'); wp_enqueue_style('chosen-min', NATALIELITE_LIBS_URI . 'chosen/chosen.min.css'); wp_enqueue_style('natalielite-style', get_template_directory_uri() . '/style.css'); // JS wp_enqueue_script( 'chosen', NATALIELITE_LIBS_URI . 'chosen/chosen.jquery.min.js', array('jquery'), false, true ); wp_enqueue_script( 'az-frontend', get_template_directory_uri() . '/assets/js/az-frontend.js', array(), false, true ); if ( is_singular() && get_option( 'thread_comments' ) ) { wp_enqueue_script('comment-reply'); } } add_action( 'widgets_init', 'natalielite_widgets_init' ); function natalielite_widgets_init() { // Register Sidebar if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => esc_html__( 'Sidebar', 'natalielite' ), 'id' => 'sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', 'description' => esc_html__('Display widgets for blog, archive and single post.', 'natalielite') )); register_sidebar(array( 'name' => esc_html__( 'Before Footer', 'natalielite' ), 'id' => 'footer-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', 'description' => esc_html__( 'Should use the "Instagram" widget here. IMPORTANT: For best result set number of photos to 8.', 'natalielite' ) )); } } /** * 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 natalielite_skip_link_focus_fix() { // The following is minified via `terser --compress --mangle -- js/skip-link-focus-fix.js`. ?> < id="comment-">
%s', get_comment_author_link() ); ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
comment_approved == '0' ) : ?>
found_posts > (int)get_option('posts_per_page') ) : ?>
'', 'next_text' => '' ); the_posts_pagination($args); ?>
ID) . '">' . esc_html__('Continue Reading', 'natalielite') . ''; return $excerpt; } add_filter( 'excerpt_more', 'natalie_the_excerpt_more_link' ); // Url Encode function natalielite_url_encode($title) { $title = html_entity_decode($title); $title = urlencode($title); return $title; } // Include the TGM_Plugin_Activation class add_action('tgmpa_register', 'natalielite_register_required_plugins'); function natalielite_register_required_plugins() { $plugins = array( array( 'name' => esc_html__( 'Contact Form 7', 'natalielite' ), 'slug' => 'contact-form-7' ), array( 'name' => esc_html__( 'MailChimp for WordPress', 'natalielite' ), 'slug' => 'mailchimp-for-wp' ), ); $config = array( 'id' => 'tgmpa', 'default_path' => '', 'menu' => 'tgmpa-install-plugins', 'parent_slug' => 'themes.php', 'capability' => 'edit_theme_options', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => true, 'message' => '' ); tgmpa($plugins, $config); }