self_admin_url
Filters the admin URL for the current site or network depending on context.
Usage
add_filter( 'self_admin_url', 'wp_kama_self_admin_url_filter', 10, 3 ); /** * Function for `self_admin_url` filter-hook. * * @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. * * @return string */ function wp_kama_self_admin_url_filter( $url, $path, $scheme ){ // filter... return $url; }
- $url(string)
- The complete URL including scheme and path.
- $path(string)
- Path relative to the URL. Blank string if no path is specified.
- $scheme(string)
- The scheme to use.
Changelog
Since 4.9.0 | Introduced. |
Where the hook is called
self_admin_url
wp-includes/link-template.php 3884
return apply_filters( 'self_admin_url', $url, $path, $scheme );