[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/ -> ms-network.php (summary)

Network API

File Size: 138 lines (4 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions

  get_network()
  get_networks()
  clean_network_cache()
  update_network_cache()
  _prime_network_caches()

Functions
Functions that are not part of a class:

get_network( $network = null )   X-Ref
Retrieves network data given a network ID or network object.

Network data will be cached and returned after being passed through a filter.
If the provided network is empty, the current network global will be used.

return: WP_Network|null The network object or null if not found.
param: WP_Network|int|null $network Optional. Network to retrieve. Default is the current network.

get_networks( $args = array()   X-Ref
Retrieves a list of networks.

return: array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
param: string|array $args Optional. Array or string of arguments. See WP_Network_Query::parse_query()

clean_network_cache( $ids )   X-Ref
Removes a network from the object cache.

param: int|array $ids Network ID or an array of network IDs to remove from cache.

update_network_cache( $networks )   X-Ref
Updates the network cache of given networks.

Will add the networks in $networks to the cache. If network ID already exists
in the network cache then it will not be updated. The network is added to the
cache using the network group with the key using the ID of the networks.

param: array $networks Array of network row objects.

_prime_network_caches( $network_ids )   X-Ref
Adds any networks from the given IDs to the cache that do not already exist in cache.

param: array $network_ids Array of network IDs.



Generated: Mon Aug 19 08:20:01 2019 Cross-referenced by PHPXref 0.7