Skip to content
Closed
Changes from all commits
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 @@ -31,6 +31,14 @@ class WP_REST_Global_Styles_Revisions_Controller extends WP_REST_Revisions_Contr
*/
protected $parent_base;

/**
* Parent post type.
*
* @since 6.5.0
* @var string
*/
protected $parent_post_type;

/**
* Constructor.
*
Expand All @@ -39,7 +47,7 @@ class WP_REST_Global_Styles_Revisions_Controller extends WP_REST_Revisions_Contr
*
* @param string $parent_post_type Post type of the parent.
*/
public function __construct( $parent_post_type ) {
public function __construct( $parent_post_type = 'wp_global_styles' ) {
parent::__construct( $parent_post_type );
$post_type_object = get_post_type_object( $parent_post_type );
$parent_controller = $post_type_object->get_rest_controller();
Expand Down