Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
WP_REST_Post_Statuses_Controller example
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.
foreach
(
get_taxonomies
(
array
(
'show_in_rest' => true
)
, 'object'
)
as
$taxonomy
)
{
$controller
=
$taxonomy
->
get_rest_controller
(
)
;
if
(
!
$controller
)
{