[wp-trac] [WordPress Trac] #52816: Post metabox style Twenty Seventeen has a border

WordPress Trac noreply at wordpress.org
Mon Mar 15 12:59:18 UTC 2021


#52816: Post metabox style Twenty Seventeen has a border
---------------------------+----------------------
 Reporter:  joseeyoast     |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.7.1
Component:  Bundled Theme  |     Version:  5.7
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  ui, css
---------------------------+----------------------

Comment (by audrasjb):

 Step to reproduce the issue:

 - Install Twenty Seventeen
 - Add the following code to the theme’s functions.php file
 - Go the post editor

 {{{
 function wporg_add_custom_box() {
     $screens = [ 'post', 'wporg_cpt' ];
     foreach ( $screens as $screen ) {
         add_meta_box(
             'wporg_box_id',                 // Unique ID
             'Custom Meta Box Title',      // Box title
             'wporg_custom_box_html',  // Content callback, must be of type
 callable
             $screen                            // Post type
         );
     }
 }
 add_action( 'add_meta_boxes', 'wporg_add_custom_box' );

 function wporg_custom_box_html( $post ) {
     ?>
     <p>
         <label for="wporg_field">Description for this field</label><br />
         <input type="text" value="My value" />
     </p>
     <?php
 }
 }}}

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


More information about the wp-trac mailing list