get( 'Version' ); $fonts_url = aarambha_blogger_fonts_url(); if( $fonts_url ){ require_once trailingslashit( get_stylesheet_directory() ) .'inc/wptt-webfont-loader.php'; wp_enqueue_style( 'aarambha-blogger-google-fonts', wptt_get_webfont_url( $fonts_url ), array(), $aarambha_blogger_version ); } wp_enqueue_style( 'aarambha-blogger', trailingslashit( get_stylesheet_directory_uri() ) . 'style.css', array( 'slick-theme','meanmenu','blog-aarambha-style','blog-aarambha-responsive' ), $aarambha_blogger_version ); } add_action( 'wp_enqueue_scripts', 'aarambha_blogger_enqueue_scripts' ); /** * Set default settings when switching themes */ function aarambha_blogger_settings() { set_theme_mod( 'top_header_section_checkbox', '' ); set_theme_mod('blog_post_layout_radio_button','grid'); set_theme_mod('content_type_radio_button','grid'); } add_action( 'after_switch_theme', 'aarambha_blogger_settings' ); /** * Filter the except length to 20 words. * * @param int $length Excerpt length. * @return int (Maybe) modified excerpt length. */ function aarambha_blogger_excerpt_length( $length ) { return 25; } add_filter( 'excerpt_length', 'aarambha_blogger_excerpt_length' ); /** * @param $wp_customize */ function aarambha_blogger_customize_register( $wp_customize ) { $wp_customize->add_setting( 'general_sidebar_home_checkbox', array( 'default' => '', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'blog_aarambha_sanitize_checkbox' ) ); $wp_customize->add_control( 'general_sidebar_home_checkbox', array( 'label' => esc_html__( 'Enable sidebar in home', 'aarambha-blogger' ), 'section' => 'general_theme_option', 'priority' => 10, 'type' => 'checkbox', ) ); } add_action( 'customize_register', 'aarambha_blogger_customize_register' ); if ( ! function_exists( 'aarambha_blogger_fonts_url' ) ) : // Google Fonts URL function aarambha_blogger_fonts_url() { $font_families = array( 'Cormorant+Garamond:wght@400;600;700', ); $fonts_url = add_query_arg( array( 'family' => implode( '&family=', $font_families ), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2' ); return esc_url_raw( $fonts_url ); } endif;