2
我原來的回答是:Google Fonts giving: No 'Access-Control-Allow-Origin' header is present on the requested resource.將屬性添加到通過wp_register_style生成的鏈接標記?
有沒有辦法將data-noprefix屬性添加到我的Google Fonts鏈接標記中?
我的functions.php看起來是這樣的:
wp_register_script('prefixfree', get_template_directory_uri().'/js/prefixfree.min.js', array('jquery'));
wp_enqueue_script('prefixfree');
wp_register_style('google-fonts', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300italic,400,400italic,600,600italic,700,700italic', '', '', 'all');
wp_enqueue_style('google-fonts');