怎么设置wordpress的评论内容必须含有中文?
在 wp-includes/comment-template.php2055 行function comment_form里面。
/*** Filter the default comment form fields.** @since 3.0.0** @param array $fields The default comment fields.*/$fields = apply_filters( 'comment_form_default_fields', $fields );$defaults = array('fields' => $fields,'comment_field' => '' . _x( 'Comment', 'noun' ) . ' ',/** This filter is documented in wp-includes/link-template.php */'must_log_in' => '' . sprintf( __( 'You must be logged in to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '',/** This filter is documented in wp-includes/link-template.php */'logged_in_as' => '' . sprintf( __( 'Logged in as %2$s. Log out?' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '','comment_notes_before' => '' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '','comment_notes_after' => '' . sprintf( __( 'You may use these HTML tags and attributes: %s' ), ' ' . allowed_tags() . '' ) . '','id_form' => 'commentform','id_submit' => 'submit','title_reply' => __( 'Leave a Reply' ),'title_reply_to' => __( 'Leave a Reply to %s' ),'cancel_reply_link' => __( 'Cancel reply' ),'label_submit' => __( 'Post Comment' ),'format' => 'xhtml',);根据你自己要求改就OK
转载请注明出处51数据库 » wordpress刷评论