Skip to content

Commit

Permalink
Plugin: Deprecate metabox supports, fall back to core
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Jan 26, 2019
1 parent 1e694cb commit 22f8939
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 790 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ The Gutenberg project's deprecation policy is intended to support backward compa
- The PHP function `gutenberg_load_list_reusable_blocks` has been removed.
- The PHP function `gutenberg_common_scripts_and_styles` has been removed. Use [`wp_common_block_scripts_and_styles`](https://developer.wordpress.org/reference/functions/wp_common_block_scripts_and_styles/) instead.
- The PHP function `gutenberg_enqueue_registered_block_scripts_and_styles` has been removed. Use [`wp_enqueue_registered_block_scripts_and_styles`](https://developer.wordpress.org/reference/functions/wp_enqueue_registered_block_scripts_and_styles/) instead.
- The PHP function `gutenberg_meta_box_save` has been removed.
- The PHP function `gutenberg_meta_box_save_redirect` has been removed.
- The PHP function `gutenberg_filter_meta_boxes` has been removed.
- The PHP function `gutenberg_intercept_meta_box_render` has been removed.
- The PHP function `gutenberg_override_meta_box_callback` has been removed.
- The PHP function `gutenberg_show_meta_box_warning` has been removed.
- The PHP function `the_gutenberg_metaboxes` has been removed. Use [`the_block_editor_meta_boxes`](https://developer.wordpress.org/reference/functions/the_block_editor_meta_boxes/) instead.
- The PHP function `gutenberg_meta_box_post_form_hidden_fields` has been removed. Use [`the_block_editor_meta_box_post_form_hidden_fields`](https://developer.wordpress.org/reference/functions/the_block_editor_meta_box_post_form_hidden_fields/) instead.
- The PHP function `gutenberg_toggle_custom_fields` has been removed.
- The PHP function `gutenberg_collect_meta_box_data` has been removed. Use [`register_and_do_post_meta_boxes`](https://developer.wordpress.org/reference/functions/register_and_do_post_meta_boxes/) instead.

## 4.5.0
- `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed.
Expand Down
6 changes: 3 additions & 3 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function the_gutenberg_project() {
<div class="block-editor gutenberg">
<h1 class="screen-reader-text"><?php echo esc_html( $post_type_object->labels->edit_item ); ?></h1>
<div id="editor" class="block-editor__container gutenberg__editor"></div>
<div id="metaboxes" style="display: none;">
<?php the_gutenberg_metaboxes(); ?>
<div id="metaboxes" class="hidden">
<?php the_block_editor_meta_boxes(); ?>
</div>
</div>
<?php
Expand Down Expand Up @@ -246,7 +246,7 @@ function gutenberg_init( $return, $post ) {
* includes/meta-boxes is typically loaded from edit-form-advanced.php.
*/
require_once ABSPATH . 'wp-admin/includes/meta-boxes.php';
gutenberg_collect_meta_box_data();
register_and_do_post_meta_boxes( $post );

require_once ABSPATH . 'wp-admin/admin-header.php';
the_gutenberg_project();
Expand Down
8 changes: 4 additions & 4 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,10 @@ function gutenberg_editor_scripts_and_styles( $hook ) {
$meta_box_url = admin_url( 'post.php' );
$meta_box_url = add_query_arg(
array(
'post' => $post->ID,
'action' => 'edit',
'classic-editor' => true,
'meta_box' => true,
'post' => $post->ID,
'action' => 'edit',
'meta-box-loader' => true,
'_wpnonce' => wp_create_nonce( 'meta-box-loader' ),
),
$meta_box_url
);
Expand Down
Loading

0 comments on commit 22f8939

Please sign in to comment.