Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
WP_REST_Autosaves_Controller example
continue
;
}
$controller
->
register_routes
(
)
;
if
(
post_type_supports
(
$post_type
->name, 'revisions'
)
)
{
$revisions_controller
=
new
WP_REST_Revisions_Controller
(
$post_type
->name
)
;
$revisions_controller
->
register_routes
(
)
;
}
if
(
'attachment' !==
$post_type
->name
)
{
$autosaves_controller
=
new
WP_REST_Autosaves_Controller
(
$post_type
->name
)
;
$autosaves_controller
->
register_routes
(
)
;
}
}
// Post types.
$controller
=
new
WP_REST_Post_Types_Controller
(
)
;
$controller
->
register_routes
(
)
;
// Post statuses.
$controller
=
new
WP_REST_Post_Statuses_Controller
(
)
;
$controller
->
register_routes
(
)
;