Skip to content

Commit

Permalink
Initialize the Autosaves controller, even if revisions are disabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein authored and danielbachhuber committed Aug 7, 2018
1 parent 248fc29 commit 17852d6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ function gutenberg_register_rest_routes() {
continue;
}

if ( post_type_supports( $post_type->name, 'revisions' ) ) {
$autosaves_controller = new WP_REST_Autosaves_Controller( $post_type->name );
$autosaves_controller->register_routes();
}
// Initialize the Autosaves controller.
$autosaves_controller = new WP_REST_Autosaves_Controller( $post_type->name );
$autosaves_controller->register_routes();
}
}
add_action( 'rest_api_init', 'gutenberg_register_rest_routes' );
Expand Down

0 comments on commit 17852d6

Please sign in to comment.