redirect_network_admin_request
Filter HookDescription
Filters whether to redirect the request to the Network Admin.Hook Information
File Location |
wp-admin/network/admin.php
View on GitHub
|
Hook Type | Filter |
Line Number | 29 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$redirect_network_admin_request
|
Whether the request should be redirected. |
Usage Examples
Basic Usage
<?php
// Hook into redirect_network_admin_request
add_filter('redirect_network_admin_request', 'my_custom_filter', 10, 1);
function my_custom_filter($redirect_network_admin_request) {
// Your custom filtering logic here
return $redirect_network_admin_request;
}
Source Code Context
wp-admin/network/admin.php:29
- How this hook is used in WordPress core
<?php
24 *
25 * @since 3.2.0
26 *
27 * @param bool $redirect_network_admin_request Whether the request should be redirected.
28 */
29 $redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request );
30
31 if ( $redirect_network_admin_request ) {
32 wp_redirect( network_admin_url() );
33 exit;
34 }
PHP Documentation
<?php
/**
* Filters whether to redirect the request to the Network Admin.
*
* @since 3.2.0
*
* @param bool $redirect_network_admin_request Whether the request should be redirected.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/network/admin.php
Related Hooks
Related hooks will be displayed here in future updates.