LoginSignup
0
0

More than 3 years have passed since last update.

【WordPress】wp_enqueue_styleで読み込んだパスがエンコードされるのをなるべく防ぐ

Posted at

エンコードされた例

wp_enqueue_style( 'font', '//fonts.googleapis.com/css?family=Roboto:400,700');

<link rel='stylesheet' id='font-css'  href='//fonts.googleapis.com/css?family=Roboto%3A400%2C700&#038;ver=xxx' type='text/css' media='all' />

ちょっと減らせた例

// wp_enqueue_style
wp_enqueue_style( 'font?family=Roboto:400,700', '//fonts.googleapis.com/css');

<link rel='stylesheet' id='font-css'  href='//fonts.googleapis.com/css?ver=xxx&#038;family=Roboto:400,700' type='text/css' media='all' />

あと&だけ・・・

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0