在页面模板上使用样式表标题的原因是什么?在php中,关键值是在注释块中指定的,而不仅仅是声明常量、对象或其他php结构?
样式表标题如下所示:
/*
Theme Name: Twenty Fifteen Child
Theme URI: *
Description: Twenty Fifteen Child Theme
Author: John Doe
Author URI: *
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI:*
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-child
*/
与将这些值放入数组相比,注释块中的活动代码有什么优势,如下例所示?没有php代码比在注释中添加实时值更好的了吗?
$child_theme_definition=array();
$child_theme_definition[\'theme_name\']=\'Twenty Fifteen Child\';
$child_theme_definition[\'theme_uri\']=\'\'*;
$child_theme_definition[\'Description\']=\'Twenty Fifteen Child Theme\';
$child_theme_definition[\'Author\']=\'John Doe\';
$child_theme_definition[\'Author URI\']=\'\'*;
$child_theme_definition[\'Template\']=\'twentyfifteen\';
$child_theme_definition[\'Version\']=\'1.0.0\';
$child_theme_definition[\'License\']=\'GNU General Public License v2 or later\';
$child_theme_definition[\'License URI\']=\'\'*;
$child_theme_definition[\'Tags\']=\'light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-child\';
*URL省略,因为我的新帐户不允许在一篇文章中包含两个以上的URL。