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 ); } /** * Enqueue Google Fonts on Front End * * @since Organic Horizon 1.0 */ function organic_horizon_scripts_styles() { wp_enqueue_style( 'horizon-fonts', organic_horizon_fonts_url(), array(), null ); } add_action( 'wp_enqueue_scripts', 'organic_horizon_scripts_styles' ); /** * Add Google Scripts for use with the editor * * @since Organic Horizon 1.0 */ function organic_horizon_editor_styles() { add_editor_style( array( 'style.css', organic_horizon_fonts_url() ) ); } add_action( 'after_setup_theme', 'organic_horizon_editor_styles' );