Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
WP_REST_Post_Types_Controller example
$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
(
)
;
// Taxonomies.
$controller
=
new
WP_REST_Taxonomies_Controller
(
)
;
$controller
->
register_routes
(
)
;
// Terms.