如何将“拉丁扩展”添加到WordPress主题的php查询中?
我的头衔并不能说明什么。所以我会尽量澄清的。我使用的是wordpress主题,它预装了谷歌字体。但是,包含的字体php不包含拉丁扩展选项。我应该如何添加&subset=拉丁语,拉丁语ext 守则如下:如何将“拉丁扩展”添加到WordPress主题的php查询中?,php,wordpress,webfonts,google-font-api,Php,Wordpress,Webfonts,Google Font Api,我的头衔并不能说明什么。所以我会尽量澄清的。我使用的是wordpress主题,它预装了谷歌字体。但是,包含的字体php不包含拉丁扩展选项。我应该如何添加&subset=拉丁语,拉丁语ext 守则如下: foreach($googlefonts as $googlefont) { if(!in_array($googlefont, $default)) { $themename_customfont = str_replace(' ', '+', $googlefont). ':
foreach($googlefonts as $googlefont) {
if(!in_array($googlefont, $default)) {
$themename_customfont = str_replace(' ', '+', $googlefont). ':300,300italic,400,400italic,700,700italic,900,900italic|' . $themename_customfont;
}
}
if ($themename_customfont != "") {
function google_fonts() {
global $themename_customfont;
$protocol = is_ssl() ? 'https' : 'http';
wp_enqueue_style( 'themename-googlefonts', "$protocol://fonts.googleapis.com/css?family=". substr_replace($theretailer_customfont ,"",-1) . "' rel='stylesheet' type='text/css" );
}
add_action( 'wp_enqueue_scripts', 'google_fonts' );