[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Network API: WP_Network class
File Size: | 473 lines (12 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Network:: (9 methods):
get_instance()
__construct()
__get()
__isset()
__set()
get_main_site_id()
_set_site_name()
_set_cookie_domain()
get_by_path()
Class: WP_Network - X-Ref
Core class used for interacting with a multisite network.get_instance( $network_id ) X-Ref |
Retrieve a network from the database by its ID. param: int $network_id The ID of the network to retrieve. return: WP_Network|false The network's object if found. False if not. since: 4.4.0 |
__construct( $network ) X-Ref |
Create a new WP_Network object. Will populate object properties from the object provided and assign other default properties based on that information. param: WP_Network|object $network A network object. since: 4.4.0 |
__get( $key ) X-Ref |
Getter. Allows current multisite naming conventions when getting properties. param: string $key Property to get. return: mixed Value of the property. Null if not available. since: 4.6.0 |
__isset( $key ) X-Ref |
Isset-er. Allows current multisite naming conventions when checking for properties. param: string $key Property to check if set. return: bool Whether the property is set. since: 4.6.0 |
__set( $key, $value ) X-Ref |
Setter. Allows current multisite naming conventions while setting properties. param: string $key Property to set. param: mixed $value Value to assign to the property. since: 4.6.0 |
get_main_site_id() X-Ref |
Returns the main site ID for the network. Internal method used by the magic getter for the 'blog_id' and 'site_id' properties. return: int The ID of the main site. since: 4.9.0 |
_set_site_name() X-Ref |
Set the site name assigned to the network if one has not been populated. since: 4.4.0 |
_set_cookie_domain() X-Ref |
Set the cookie domain based on the network domain if one has not been populated. since: 4.4.0 |
get_by_path( $domain = '', $path = '', $segments = null ) X-Ref |
Retrieve the closest matching network for a domain and path. This will not necessarily return an exact match for a domain and path. Instead, it breaks the domain and path into pieces that are then used to match the closest possibility from a query. The intent of this method is to match a network during bootstrap for a requested site address. param: string $domain Domain to check. param: string $path Path to check. param: int|null $segments Path segments to use. Defaults to null, or the full path. return: WP_Network|false Network object if successful. False when no network is found. since: 4.4.0 |
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |