From 6166e0ef3a698f3a9c02e8269ad425ce1336168c Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Tue, 29 Jan 2019 11:36:51 -0500 Subject: [PATCH] Plugin: Avoid setting generic "Edit Post" title on load (#13552) --- gutenberg.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index 502469ba2f421c..13f0e148b57de8 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -201,8 +201,6 @@ function gutenberg_pre_init() { * @return bool Whether Gutenberg was initialized. */ function gutenberg_init( $return, $post ) { - global $title, $post_type; - if ( true === $return && current_filter() === 'replace_editor' ) { return $return; } @@ -224,17 +222,6 @@ function gutenberg_init( $return, $post ) { add_filter( 'screen_options_show_screen', '__return_false' ); add_filter( 'admin_body_class', 'gutenberg_add_admin_body_class' ); - $post_type_object = get_post_type_object( $post_type ); - - /* - * Always force to 'Edit Post' (or equivalent) - * because it needs to be in a generic state for both - * post-new.php and post.php?post=<id>. - */ - if ( ! empty( $post_type_object ) ) { - $title = $post_type_object->labels->edit_item; - } - /* * Remove the emoji script as it is incompatible with both React and any * contenteditable fields.