0

我最近使用自定义帖子类型在我的网站上实现了一个博客。当我激活评论时,如果我已登录,评论通过正常,但我注销并测试评论,它会将我带到一个 SMTP 错误页面,内容如下:

SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "220 mx.google.com ESMTP u1sm13031122oee.8 - gsmtp "
SMTP -> get_lines(): $data is "220 mx.google.com ESMTP u1sm13031122oee.8 - gsmtp "
SMTP -> FROM SERVER:220 mx.google.com ESMTP u1sm13031122oee.8 - gsmtp

再加上大约五十行。

尝试将电子邮件发送到非“本地”地址时似乎出现错误。

自定义帖子类型的代码如下:

<?php

function my_custom_post_articles() {
    $labels = array(
        'name'               => _x( 'Articles', 'post type general name' ),
        'singular_name'      => _x( 'Article', 'post type singular name' ),
        'add_new'            => _x( 'Add New', 'book' ),
        'add_new_item'       => __( 'Add New Article' ),
        'edit_item'          => __( 'Edit Article' ),
        'new_item'           => __( 'New Article' ),
        'all_items'          => __( 'All Articles' ),
        'view_item'          => __( 'View Article' ),
        'search_items'       => __( 'Search Articles' ),
        'not_found'          => __( 'No Articles found' ),
        'not_found_in_trash' => __( 'No Articles found in the Trash' ), 
        'parent_item_colon'  => '',
        'menu_name'          => 'Articles'
    );
    $args = array(
        'labels'        => $labels,
        'description'   => 'Holds our articles and article specific data',
        'public'        => true,
        'menu_position' => 5,
        'supports'      => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
        'has_archive'   => true,
    );
    register_post_type( 'articles', $args );    
    flush_rewrite_rules();
}
add_action( 'init', 'my_custom_post_articles' );



?>
4

0 回答 0