<?php
define(\'TEMPPATH\',get_bloginfo(\'stylesheet_directory\'));
define(\'IMAGES\',TEMPPATH."/images");
add_theme_support(\'nav_menus\');
if(function_exists(\'register_nav_menus\'))
{
register_nav_menus(
array(
\'main\'=>\'Main Nav\'
));
}
if(function_exists(\'register_sidebar\'))
{
register_sidebar(array(
\'name\'=>_(\'Primary Sidebar\', \'primary-sidebar\'),
\'id\'=>\'primary-widget-area\',
\'description\'=>_(\'The primary widget area\', \'dir\'),
\'before_widget\'=>\'<div class="widget">\',
\'after_widget\'=>"</div>",
\'before_title\'=>\'<h3 class="widget-title">\',
\'after_title\'=>\'</h3>\',
)
);
}
?>
这是我的函数。php代码因为我是wordpress主题开发的新手,我的第一个主题会给出这样的警告
Warning: _() expects exactly 1 parameter, 2 given in C:\\xampp\\htdocs\\wordpress\\wp-content\\themes\\theme\\functions.php on line 17
Warning: _() expects exactly 1 parameter, 2 given in C:\\xampp\\htdocs\\wordpress\\wp-content\\themes\\theme\\functions.php on line 19
由于我对主题开发还不熟悉,我对这些警告感到困惑