Filter hook 'found_networks_query'

in WP Core File wp-includes/class-wp-network-query.php at line 531

View Source

found_networks_query

Filter Hook
Description
Filters the query used to retrieve found network count.

Hook Information

File Location wp-includes/class-wp-network-query.php View on GitHub
Hook Type Filter
Line Number 531

Hook Parameters

Type Name Description
string $found_networks_query SQL query. Default 'SELECT FOUND_ROWS()'.
WP_Network_Query $network_query The `WP_Network_Query` instance.

Usage Examples

Basic Usage
<?php
// Hook into found_networks_query
add_filter('found_networks_query', 'my_custom_filter', 10, 2);

function my_custom_filter($found_networks_query, $network_query) {
    // Your custom filtering logic here
    return $found_networks_query;
}

Source Code Context

wp-includes/class-wp-network-query.php:531 - How this hook is used in WordPress core
<?php
 526  			 * @since 4.6.0
 527  			 *
 528  			 * @param string           $found_networks_query SQL query. Default 'SELECT FOUND_ROWS()'.
 529  			 * @param WP_Network_Query $network_query        The `WP_Network_Query` instance.
 530  			 */
 531  			$found_networks_query = apply_filters( 'found_networks_query', 'SELECT FOUND_ROWS()', $this );
 532  
 533  			$this->found_networks = (int) $wpdb->get_var( $found_networks_query );
 534  		}
 535  	}
 536  

PHP Documentation

<?php
/**
			 * Filters the query used to retrieve found network count.
			 *
			 * @since 4.6.0
			 *
			 * @param string           $found_networks_query SQL query. Default 'SELECT FOUND_ROWS()'.
			 * @param WP_Network_Query $network_query        The `WP_Network_Query` instance.
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/class-wp-network-query.php
Related Hooks

Related hooks will be displayed here in future updates.