wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



rest_{$this->post_type}_query › WordPress Filter Hooks

Da5.7.0
Deprecaton/a
› apply_filters( "rest_{$this->post_type}_query", $args, $request )
Parametri: (2)
  • () args Array of arguments for WP_Query.
    Richiesto: Sì
  • () request The REST API request.
    Richiesto: Sì
Definito a:
Codex:

Filters WP_Query arguments when querying posts via the REST API.

The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug. Possible hook names include: - `rest_post_query` - `rest_page_query` - `rest_attachment_query` Enables adding extra arguments or setting defaults for a post collection request.




Sorgenti

$args = apply_filters( "rest_{$this->post_type}_query", $args, $request );