テーマファイルのバージョンの取得について
-
こんにちは、
テーマファイルのファイルヘッダを取得したいのですが、うまくいきません。
やり方の間違いや、正しい方法を教えていただきたくお願いします。functions.php
$theme_name = get_current_theme(); $theme_data = get_theme_data($theme_name); echo "v-".$theme_data['Version']; echo '<pre>'; var_dump($theme_data); echo '</pre>'; 結果が以下の様になり、style.css の ヘッダ情報が取得できません。 array(11) { ["Name"]=> string(0) "" ["URI"]=> string(0) "" ["Description"]=> string(0) "" ["Author"]=> string(6) "匿名" ["AuthorURI"]=> string(0) "" ["Version"]=> string(0) "" ["Template"]=> string(0) "" ["Status"]=> string(7) "publish" ["Tags"]=> array(0) { } ["Title"]=> string(0) "" ["AuthorName"]=> string(6) "匿名" }
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
- トピック「テーマファイルのバージョンの取得について」には新たに返信することはできません。