WordPress: Users who do not appear in the Authorizer field


I added a custom type to Wordpress, a personalized message type supports authors (see below). The user type of user has all the privileges of the author, except for "posting messages", but not in the list of possible authors for the appointment of this post.

What am I doing wrong?

the code:

if (!get_role('member')) {
        add_role('member', 'SFUK Member', array(
            'delete_posts' => true,
            'edit_posts' => true,
            'read' => true,
            'upload_files' => true,
            'edit_published_posts' => true,
            'delete_published_posts' => true
        ));
}

and here is the custom post type:

$args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'query_var' => true,
    'rewrite' => true,
    'capability_type' => 'post',
    'hierarchical' => true,
    'menu_position' => 0,
    'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'author')
);

if (!post_type_exists('ent')) {
    register_post_type('ent', $args);
    remove_post_type_support('ent', 'editor');

}

Let me know if additional information is needed.

+5
source share
1 answer

The following call is created in the drop-down list of authors:

wp_dropdown_users( array(
    'who' => 'authors',
    'name' => 'post_author_override',
    'selected' => empty($post->ID) ? $user_ID : $post->post_author,
    'include_selected' => true
) );

who , "", Codex , "", ( ). , HTML. , HTML. .

'who' ​​ 'author' , 0, , . Trac, "level_1" , . , , HTML .

EDIT: : , , , . , , .

+6

All Articles