[wp-trac] [WordPress Trac] #46261: Args for register_post_type() missing blocks $template.

WordPress Trac noreply at wordpress.org
Mon Oct 26 18:22:06 UTC 2020


#46261: Args for register_post_type() missing blocks $template.
--------------------------+-----------------------
 Reporter:  milana_cap    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  5.6
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  docs
--------------------------+-----------------------

Comment (by metalandcoffee):

 The check for the `template` property is being performed in `wp-admin
 /edit-form-blocks.php`.


 {{{
 if ( ! empty( $post_type_object->template ) ) {
   $editor_settings['template']     = $post_type_object->template;
   $editor_settings['templateLock'] = ! empty(
 $post_type_object->template_lock ) ? $post_type_object->template_lock :
 false;
 }
 }}}

 I think we should add the `template` property to the `WP_Post_Type` class.
 Then that would clear up the confusion that @joyously pointed out. Happy
 to do this if this is agreed upon...

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46261#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list