@user2898224:
您要查找的文件是 WordPress 核心文件 'wp-includes\comment-template.php'。
您需要更改第 #2058 行,如下所示:
'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' .
您所要做的就是在此行中将“网站”更改为“代理商”。
请记住,此更改会修改 WordPress 核心文件,因此,如果您想升级 WordPress 安装,则需要在升级后再次进行相同的更改。
修改 WordPress 核心文件也不是一个好主意,但在这种情况下,更改足够小,您可以侥幸逃脱。
如果您不想(也不应该)修改 WordPress 核心文件,您还可以执行以下操作:
在二十三主题的 'cmets.php' 文件中,将此调用替换为 comment_form 函数:
<?php comment_form(); ?>
有了这段代码(是的,所有这些代码都是必需的):
<?php
$fields = array(
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
'<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
'url' => '<p class="comment-form-url"><label for="url">' . __( 'Agency' ) . '</label> ' .
'<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
);
$comments_args = array(
'fields' => $fields
);
comment_form( $comments_args );
?>
这似乎是一种更复杂的方式来更改评论表单上的一个单词,但它可以防止您弄乱任何 WordPress 核心文件。