Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



rest_pre_dispatch ›

Od4.4.0
Przestarzałyn/a
apply_filters( 'rest_pre_dispatch', null, $this, $request )
Parametry: (3)
  • (mixed) $result Response to replace the requested version with. Can be anything a normal endpoint can return, or null to not hijack the request.
    Wymagane: Tak
  • (WP_REST_Server) $this Server instance.
    Wymagane: Tak
  • (WP_REST_Request) $request Request used to generate the response.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Filters the pre-calculated result of a REST dispatch request.

Allow hijacking the request before dispatching by returning a non-empty. The returned value will be used to serve the request instead.





Źródło

$result = apply_filters( 'rest_pre_dispatch', null, $this, $request );