rest_route_for_term

過濾鉤子
apply_filters( 'rest_route_for_term', $route, $term )

rest_route_for_term: 這是WordPress中的一個過濾器鉤子,當REST API為一個單一的術語資源構建路由時被觸發。它允許開發者在術語資源被返回之前修改它的路徑。

過濾術語的REST API路由。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'rest_route_for_term', $route, $term );
return apply_filters( 'rest_route_for_term', $route, $term );
return apply_filters( 'rest_route_for_term', $route, $term );

常見問題

FAQs
檢視更多 >