wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



rest_pre_dispatch › WordPress Filter Hooks

Seit4.4.0
Veraltetn/v
apply_filters( 'rest_pre_dispatch', null, $this, $request )
Parameter: (3)
  • () result Response to replace the requested version with. Can be anything a normal endpoint can return, or null to not hijack the request.
    Erforderlich: Ja
  • () server Server instance.
    Erforderlich: Ja
  • () request Request used to generate the response.
    Erforderlich: Ja
Definiert in:
Codex:

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

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




Quellcode

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