Make WordPress Core


Ignore:
Timestamp:
12/16/2018 01:18:22 AM (6 years ago)
Author:
jeremyfelt
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.

Merges [43837] from the 5.0 branch to trunk.

Props pento, peterwilsoncc.
Fixes #45172.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/edit-form-blocks.php

    r44177 r44214  
    364364do_action( 'enqueue_block_editor_assets' );
    365365
     366// In order to duplicate classic meta box behaviour, we need to run the classic meta box actions.
     367require_once( ABSPATH . 'wp-admin/includes/meta-boxes.php' );
     368register_and_do_post_meta_boxes( $post );
     369
     370// Some meta boxes hook into the 'edit_form_advanced' filter.
     371/** This action is documented in wp-admin/edit-form-advanced.php */
     372do_action( 'edit_form_advanced', $post );
     373
    366374require_once( ABSPATH . 'wp-admin/admin-header.php' );
    367375?>
Note: See TracChangeset for help on using the changeset viewer.