wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



rest_pre_dispatch › Les Filtres WordPress

Depuis4.4.0
Dépréciéen/a
› apply_filters( 'rest_pre_dispatch', null, $this, $request )
Paramètres: (3)
  • () result Response to replace the requested version with. Can be anything a normal endpoint can return, or null to not hijack the request.
    Requis: Oui
  • () server Server instance.
    Requis: Oui
  • () request Request used to generate the response.
    Requis: Oui
Défini(e) dans:
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.




Source

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