'', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'default-attachment' => '', ); add_theme_support( 'custom-background', $defaults ); add_theme_support( 'custom-logo', array( 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); add_theme_support('post-formats', array( 'link', 'gallery', 'quote', 'image', 'video', 'audio' ) ); // Adds support for a variety of post formats. add_action( 'wp_enqueue_scripts', 'writee_enqueue_styles' ); add_action( 'wp_enqueue_scripts', 'writee_enqueue_scripts' ); add_action( 'wp_enqueue_scripts', 'writee_custom_enqueue_script' ); add_image_size ( 'WRT-slider', 1600, 9999, false ); add_image_size ( 'WRT-post-image', 780, 9999, false ); remove_filter( 'the_content', 'wpautop' ); add_filter( 'the_content', 'wpautop' , 12); } /**********************************************/ ## Attach stylesheets /**********************************************/ function writee_enqueue_styles() { $writee_uri_path = get_template_directory_uri(); $writee_font_url = esc_attr(get_theme_mod('wrt_font_url')); wp_enqueue_style('WRT-style', $writee_uri_path . '/style.css', null, false, 'all'); if ( is_rtl() ) // if RTL language enabled. wp_enqueue_style('WRT-rtl-style', $writee_uri_path . '/assets/css/style-rtl.css', null, false, 'all'); else wp_enqueue_style('WRT-main-style', $writee_uri_path . '/assets/css/style-ltr.css', null, false, 'all'); if($writee_font_url != ''): wp_enqueue_style('WRT-google_fonts',$writee_font_url , null, false, 'all'); endif; } /** * Registers an editor stylesheet for the theme. */ function writee_add_editor_styles() { $writty_uri_path = get_template_directory_uri(); add_editor_style( $writty_uri_path . '/assets/css/admin/editor.css' ); } add_action( 'admin_init', 'writee_add_editor_styles' ); /********************************************/ ## Attach theme javascripts. /*******************************************/ function writee_enqueue_scripts() { $writee_uri_path = get_template_directory_uri(); wp_enqueue_script('WRT-pace', $writee_uri_path . '/assets/js/pace.min.js', array('jquery'), '1.0.0', true); wp_enqueue_script('WRT-modernizr', $writee_uri_path . '/assets/js/modernizr.js', array('jquery'), '1.0.0', true); wp_enqueue_script('WRT-cssua', $writee_uri_path . '/assets/js/cssua.min.js', array('jquery'), '1.0.0', true); wp_enqueue_script('WRT-carousel', $writee_uri_path . '/assets/js/slick.min.js', array('jquery'), '1.0.0', true); wp_enqueue_script('WRT-fitvids', $writee_uri_path . '/assets/js/jquery.fitvids.js', array('jquery'), '1.0.0', true); wp_enqueue_script('WRT-scrollUp', $writee_uri_path . '/assets/js/jquery.scrollUp.min.js', array('jquery'), '1.0.0', true); } /**************************************************/ ## body class filter. /**************************************************/ add_filter('body_class', 'writee_body_class' ); function writee_body_class($classes){ $classes[] = 'theme-header4'; return $classes; } add_filter('post_class', 'writee_post_class' ); function writee_post_class($classes) { $classes[] = 'entry entry-center'; return $classes; } /****************************************************/ ## Social icons list /****************************************************/ function writee_get_social($echo = true){ $link_enabled = 0; $social_link = ''; $writee_fb_link = esc_url(get_theme_mod('wrt_facebook')); $writee_twitter_link = esc_url(get_theme_mod('wrt_twitter')); $writee_insta_link = esc_url(get_theme_mod('wrt_instagram')); $writee_gplus_link = esc_url(get_theme_mod('wrt_googleplus')); $writee_linked_link = esc_url(get_theme_mod('wrt_linkedin')); $writee_ytube_link = esc_url(get_theme_mod('wrt_youtube')); $writee_pint_link = esc_url(get_theme_mod('wrt_pinterest')); $writee_drib_link = esc_url(get_theme_mod('wrt_dribble')); if($writee_fb_link): $social_link .='
', '' ); ?>