urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); } /** * Register and enqueue Javascript files */ add_action( 'wp_enqueue_scripts', 'rowling_enqueue_scripts' ); function rowling_enqueue_scripts() { wp_enqueue_style( 'fonts', rowling_fonts_url(), array(), null ); wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/font-awesome/font-awesome.css', array(), date( "Ymd", filemtime( get_template_directory() . '/font-awesome/font-awesome.css' ) ) ); wp_enqueue_style( 'style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) ); wp_enqueue_script( 'skip_link_fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', '', date( "Ymd", filemtime( get_template_directory() . '/js/skip-link-focus-fix.js' ) ), true ); wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/flexslider.js', array( 'jquery' ), date( "Ymd", filemtime( get_template_directory() . '/js/flexslider.js' ) ), true ); wp_enqueue_script( 'doubletap', get_template_directory_uri() . '/js/doubletaptogo.js', array( 'jquery' ), date( "Ymd", filemtime( get_template_directory() . '/js/doubletaptogo.js' ) ), true ); wp_enqueue_script( 'global', get_template_directory_uri() . '/js/global.js', array( 'jquery' ), date( "Ymd", filemtime( get_template_directory() . '/js/global.js' ) ), true ); if ( is_singular() ) { wp_enqueue_script( 'comment-reply' ); } } /** * Check whether the browser supports JavaScript */ add_action( 'wp_head', 'rowling_html_js_class', 1 ); function rowling_html_js_class () { echo ''. "\n"; } /** * Add footer widget areas */ add_action( 'widgets_init', 'rowling_sidebar_reg' ); function rowling_sidebar_reg() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'rowling' ), 'id' => 'sidebar', 'description' => esc_html__( 'Widgets in this area will be shown in the sidebar.', 'rowling' ), 'before_title' => '

', 'after_title' => '

', 'before_widget' => '' ) ); } /** * Functions that interact with the Customizer */ require_once ( get_template_directory() . '/inc/customizer.php' ); /** * Custom template tags for this theme. */ require_once ( get_template_directory() . '/inc/template-tags.php' ); /** * Custom tweaks that change default WP functionality. */ require_once ( get_template_directory() . '/inc/extras.php' ); /** * Functions that interact with the JetPack plugin. */ require_once ( get_template_directory() . '/inc/jetpack.php' ); /** * Functions that interact with WordPress.com. */ require_once ( get_template_directory() . '/inc/wpcom.php' );