[wp-trac] [WordPress Trac] #54965: Custom post type set as not public breaks media uploader functionality
WordPress Trac
noreply at wordpress.org
Fri Jan 28 02:39:31 UTC 2022
#54965: Custom post type set as not public breaks media uploader functionality
-------------------------------+------------------------------
Reporter: catacaustic | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.9
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by catacaustic):
The only difference that I have here is that 'show_in_rest' is false.
{{{#!php
<?php
$labels = array (
'name' => __ ('Content'),
'singular_name' => __ ('Block'),
'add_new' => __ ('Add New', 'empire'),
'add_new_item' => __ ('Add New Block'),
'edit_item' => __ ('Edit Bock'),
'new_item' => __ ('New Block'),
'view_item' => __ ('View Block'),
'search_items' => __ ('Search Blocks'),
'not_found' => __ ('Nothing found'),
'not_found_in_trash' => __ ('Nothing found in Trash'),
'parent_item_colon' => ''
);
$args = array (
'labels' => $labels,
'public' => false,
'publicly_queryable' => false,
'show_ui' => true,
'query_var' => false,
'show_in_rest' => true,
'rewrite' => false,
'capability_type' => 'post',
'hierarchical' => false,
'has_archive' => false,
'menu_position' => null,
'supports' => array (
'title',
'editor',
'page-attributes'
)
);
register_post_type ('customblock', $args);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54965#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list