$args = array(
\'id_form\' => \'commentform\',
\'class_form\' => \'comment-form theme-comment-action\',
\'id_submit\' => \'submit\',
\'class_submit\' => \'submit\',
\'name_submit\' => \'submit\',
\'submit_button\' => \'<a name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s"><i class="fa fa-comment" aria-hidden="true"></i><span> Submit Comment </span></a>\',
\'title_reply\' => \'\',
\'title_reply_to\' => __( \'Reply to %s\',\'text-domain\' ),
\'cancel_reply_link\' => __( \'Cancel comment\',\'text-domain\' ),
\'label_submit\' => __( \'Post comment\',\'text-domain\' ),
\'format\' => \'xhtml\',
\'comment_field\' => \'<textarea id="comment" name="comment" placeholder="\'.__(\'Enter Your Comment Here\',\'text-domain\').\'" cols="45" rows="8" aria-required="true">\' .\'</textarea>\',
\'logged_in_as\' => \'<p class="logged-in-as">\' .
sprintf(
__( \'Logged in as %1$s. <a href="%2$s" title="%3$s">%4$s</a>\', \'text-domain\'),
$user_identity,
wp_logout_url( apply_filters( \'the_permalink\', get_permalink( ) ) ),
__(\'Log out?\',\'text-domain\'),
__(\'Click to log out.\',\'text-domain\')
) . \'</p>\',
\'comment_notes_before\' => \'<p class="comment-notes">\' . __( \'Your email address will not be published.\',\'text-domain\' ) .\'</p>\',
\'fields\' => apply_filters( \'comment_form_default_fields\', $fields ),
);
comment_form( $args );
以上是我们如何更改注释系统中某些字段的方法。
其中一个字段是submit按钮→
\'submit_button\' => \'<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />\',
但我的HTML的设计方式是使用
<a></a>
标签我试着用这样的方法:
<a name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s"><i class="fa fa-comment" aria-hidden="true"></i><span> Submit Comment </span></a>
但这是行不通的。有人能推荐一些修复方法吗?