WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/29/2018 02:42:23 AM (14 months ago)
Author:
pento
Message:

Block Editor: Fix meta boxes not showing.

The block editor needs to duplicate the classic meta box behaviour, so it can extract the registered meta boxes, and import them into the block editor.

To match the classic editor behaviour as closely as possible, this moves the relevant code from the classic editor, into a new function, so it can be called by both.

Props pento, peterwilsoncc.
Fixes #45172.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/edit-form-blocks.php

    r43833 r43837  
    369369do_action( 'enqueue_block_editor_assets' );
    370370
     371// In order to duplicate classic meta box behaviour, we need to run the classic meta box actions.
     372require_once( ABSPATH . 'wp-admin/includes/meta-boxes.php' );
     373register_and_do_post_meta_boxes( $post );
     374
     375// Some meta boxes hook into the 'edit_form_advanced' filter.
     376/** This action is documented in wp-admin/edit-form-advanced.php */
     377do_action( 'edit_form_advanced', $post );
     378
    371379require_once( ABSPATH . 'wp-admin/admin-header.php' );
    372380?>
Note: See TracChangeset for help on using the changeset viewer.