self_admin_url
Filter HookDescription
Filters the admin URL for the current site or network depending on context.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3907 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$url
|
The complete URL including scheme and path. |
string
|
$path
|
Path relative to the URL. Blank string if no path is specified. |
string
|
$scheme
|
The scheme to use. |
Usage Examples
Basic Usage
<?php
// Hook into self_admin_url
add_filter('self_admin_url', 'my_custom_filter', 10, 3);
function my_custom_filter($url, $path, $scheme) {
// Your custom filtering logic here
return $url;
}
Source Code Context
wp-includes/link-template.php:3907
- How this hook is used in WordPress core
<?php
3902 *
3903 * @param string $url The complete URL including scheme and path.
3904 * @param string $path Path relative to the URL. Blank string if no path is specified.
3905 * @param string $scheme The scheme to use.
3906 */
3907 return apply_filters( 'self_admin_url', $url, $path, $scheme );
3908 }
3909
3910 /**
3911 * Sets the scheme for a URL.
3912 *
PHP Documentation
<?php
/**
* Filters the admin URL for the current site or network depending on context.
*
* @since 4.9.0
*
* @param string $url The complete URL including scheme and path.
* @param string $path Path relative to the URL. Blank string if no path is specified.
* @param string $scheme The scheme to use.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.