Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin: Deprecate gutenberg_add_admin_body_class #13572

Merged
merged 2 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa
- 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.
- `window._wpLoadGutenbergEditor` has been removed. Use `window._wpLoadBlockEditor` instead. Note: This is a private API, not intended for public use. It may be removed in the future.
- The PHP function `gutenberg_get_script_polyfill` has been removed. Use [`wp_get_script_polyfill`](https://developer.wordpress.org/reference/functions/wp_get_script_polyfill/) instead.
- The PHP function `gutenberg_add_admin_body_class` has been removed.

## 4.5.0
- `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed.
Expand Down
12 changes: 4 additions & 8 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ function gutenberg_init( $return, $post ) {

add_action( 'admin_enqueue_scripts', 'gutenberg_editor_scripts_and_styles' );
add_filter( 'screen_options_show_screen', '__return_false' );
add_filter( 'admin_body_class', 'gutenberg_add_admin_body_class' );

/*
* Remove the emoji script as it is incompatible with both React and any
Expand Down Expand Up @@ -299,18 +298,15 @@ function gutenberg_replace_default_add_new_button() {
* Adds the block-editor-page class to the body tag on the Gutenberg page.
*
* @since 1.5.0
* @deprecated 5.0.0
*
* @param string $classes Space separated string of classes being added to the body tag.
* @return string The $classes string, with block-editor-page appended.
*/
function gutenberg_add_admin_body_class( $classes ) {
// gutenberg-editor-page is left for backward compatibility.
if ( current_theme_supports( 'editor-styles' ) && current_theme_supports( 'dark-editor-style' ) ) {
return "$classes block-editor-page gutenberg-editor-page is-fullscreen-mode wp-embed-responsive is-dark-theme";
} else {
// Default to is-fullscreen-mode to avoid jumps in the UI.
return "$classes block-editor-page gutenberg-editor-page is-fullscreen-mode wp-embed-responsive";
}
_deprecated_function( __FUNCTION__, '5.0.0' );

return $classes;
}

/**
Expand Down