不需要电子邮件备注。php

时间:2013-01-25 作者:kallekillen

我需要编辑我的评论。php不需要制作电子邮件。我已经在下面附上了我的代码,我知道我需要从我的电子邮件字段中删除$req和$aria\\u req,但由于该网站是实时的,我不想在没有正确操作的情况下尝试进行任何更改。

非常感谢。

$author_name = get_comment_author();

$args = array(\'title_reply\' => __( \'Post a new comment\' ),
              \'title_reply_to\' => __( \'Post a new comment\' ),
              \'label_submit\' => __( \'Submit Comment\' ),
              \'comment_field\' => \'<div class="comment_field_parent"><p class="comment-form-comment"><textarea id="comment" name="comment" placeholder="Enter text right here!" cols="45" rows="8" aria-required="true"></textarea></p></div>\',

              \'fields\' => apply_filters( 
                        \'comment_form_default_fields\', array(

                            \'author\' => \'<div class="fields-parent"><p class="comment-form-author" id="cfa"><label for="author">\' . __( \'Name\', \'domainreference\' ) . \'</label> \' . ( $req ? \'<span class="required"></span>\' : \'\' ) . \'<input id="author" name="author" type="text" value="" size="30" \' . $aria_req . \'/></p>\',

                            \'email\' => \'<p class="comment-form-email" id="cfe"><label for="email">\' . __( \'Email\', \'domainreference\' ) . \'</label> \' . ( $req ? \'<span class="required"></span>\' : \'\' ) . \'<input id="email" name="email" type="text" value="" size="30" \' . $aria_req . \'/></p></div>\')),

              \'logged_in_as\' => \'<p class="logged-in-as-hide">\' . sprintf( __( \'Posting as <a href="%1$s">%2$s</a> (<a href="%3$s" title="Log out of this account">Logout</a>)\' ), admin_url( \'profile.php\' ), $user_identity, wp_logout_url( apply_filters( \'the_permalink\', get_permalink( ) ) ) ) . \'</p>\', 

              \'cancel_reply_link\' => __( \'Cancel\' )

              );

$args_log = array(\'title_reply\' => __( \'Post a new comment\' ),
              \'title_reply_to\' => __( \'Post a new comment\' ),
              \'label_submit\' => __( \'Submit Comment\' ),
              \'comment_field\' => \'<div class="comment_field_parent_log"><p class="comment-form-comment"><textarea id="comment" name="comment" placeholder="Enter text right here!" cols="45" rows="8" aria-required="true"></textarea></p></div>\',

              \'fields\' => apply_filters(
              \'comment_form_default_fields\', array(

              \'author\' => \'<div class="fields-parent"><p class="comment-form-author" id="cfa"><label for="author">\' . __( \'Name\', \'domainreference\' ) . \'</label> \' . ( $req ? \'<span class="required"></span>\' : \'\' ) . \'<input id="author" name="author" type="text" value="" size="30" /></p>\',

              \'email\' => \'<p class="comment-form-email" id="cfe"><label for="email">\' . __( \'Email\', \'domainreference\' ) . \'</label> \' . ( $req ? \'<span class="required"></span>\' : \'\' ) . \'<input id="email" name="email" type="text" value="" size="30" /></p></div>\')),

              \'logged_in_as\' => \'<p class="logged-in-as">\' . sprintf( __( \'Posting as <a href="%1$s">%2$s</a> (<a href="%3$s" title="Log out of this account">Logout</a>)\' ), admin_url( \'profile.php\' ), $user_identity, wp_logout_url( apply_filters( \'the_permalink\', get_permalink( ) ) ) ) . \'</p>\',

              \'cancel_reply_link\' => \'<div id="cancel-log">\'.__( \'Cancel\' ).\'</div>\'

              );

1 个回复
最合适的回答,由SO网友:fuxia 整理而成

您不能更改主题中的需求,只能更改该需求的表示。

在中进行设置wp-admin/options-discussion.php 而是:

enter image description here

结束

相关推荐

如何正确使用Comments-template.php

我想修改已登录用户和未登录用户的评论表单。我通过更改注释修改了未登录用户的表单。php,但我不太确定如何为登录用户修改我的表单。我知道我必须使用comments\\u template(),但每当我尝试在页面中使用它时。php,我遇到这样的错误Notice: Undefined variable: args in {PATH}/twwr-theme/comments-template.php on line 13 这些是我评论的内容。php,有点乱<?php if (!empty