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



pre_get_posts › WordPress Action Hooks

Da2.0.0
Deprecaton/a
› do_action_ref_array( 'pre_get_posts', array( &$this )
Parametri:
  • () query The WP_Query instance (passed by reference).
    Richiesto: Sì
Definito a:
Codex:

Fires after the query variable object is created, but before the actual query is run.

Note: If using conditional tags, use the method versions within the passed instance (e.g. `$query->is_main_query()` instead of `is_main_query()`). This is because the functions like `is_main_query()` test against the global `$wp_query` instance, not the passed one.




Sorgenti

do_action_ref_array( 'pre_get_posts', array( &$this ) );