Skip to content

Commit

Permalink
Plugin: Avoid setting generic "Edit Post" title on load (#13552)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored and youknowriad committed Mar 6, 2019
1 parent a577559 commit 6166e0e
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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 <title> 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.
Expand Down

0 comments on commit 6166e0e

Please sign in to comment.