[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Network API

File Size: 141 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.
since: 4.6.0

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()
since: 4.6.0

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.
since: 4.6.0

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.
since: 4.6.0

_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.
since: 4.6.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1