pre_get_networks
Fires before networks are retrieved.
Description
Parameters (1)
- 0. $array (array) =>
array( &$this )
- &
$this
Current instance ofWP_Network_Query
, passed by reference.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'pre_get_networks', $array );
- The following example is for adding a hook callback.
- // define the pre_get_networks callback
- function action_pre_get_networks( $array ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'pre_get_networks', 'action_pre_get_networks', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'pre_get_networks', 'action_pre_get_networks', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/class-wp-network-query.php
- do_action_ref_array( 'pre_get_networks', array( &$this ) );