[wp-hackers] Permission problems in Custom post type

Navjot Singh navjotjsingh at gmail.com
Tue Oct 26 15:12:09 UTC 2010

I am using this code for adding a custom post type

add_action( 'init', 'go_post_types' );

function go_post_types() {
    register_post_type( 'videos',
            'labels' => array(
                'name' => __( 'Videos' ),
                'singular_name' => __( 'Video' ),
            'description' => __( 'Video type posts are used to post Videos
to GO site.' ),
            'public' => true,
            'show_ui' => true,
            'publicly_queryable' => true,
            'exclude_from_search' => false,
            '_builtin' => false,
            'menu_position' => 5,
            'menu_icon' => get_stylesheet_directory_uri() .
            'hierarchical' => false,
            'capability_type' => 'post',
            'supports' => array( 'title', 'editor', 'revisions', 'author',
'excerpt', 'custom-fields', 'thumbnail' ),
            'rewrite' => array( 'slug' => 'videos'),
            'can_export' => true,
    register_taxonomy("video-type", array("videos"), array("hierarchical" =>
true, "label" => "Video Type", "rewrite" => true));

One or two days back everything was fine but today when I logged in, I could
not edit any published video type. Now I can only add videos but not edit
them. Seems some recent Trunk changeset caused the problem. I update the
blog once a day via SVN.

Can't figure out why its like this.

Navjot Singh

More information about the wp-hackers mailing list