rest_route_for_post_type_items

过滤钩子


apply_filters( 'rest_route_for_post_type_items', $route, $post_type )
参数
  • (string)
    $route
    The route path.
    Required:
  • (WP_Post_Type)
    $post_type
    The post type object.
    Required:
定义位置
  • wp-includes/rest-api.php
    , line 3142
引入
5.9.0
弃用

Filters the REST API route for a post type.

return apply_filters( 'rest_route_for_post_type_items', $route, $post_type );