This function is defined in wp-includes / link-template.php and it offers a filter:
function admin_url($path = '') {
$url = site_url('wp-admin/', 'admin');
if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
$url .= ltrim($path, '/');
return apply_filters('admin_url', $url, $path);
}
This way you can control the output using your own filter function in your functions.php themes :
add_filter('admin_url', 'my_new_admin_url');
function my_new_admin_url()
{
return 'http://example.org/boss/';
}
Now we hope that all authors of the plugin use this function, and not a hard-coded path ... :)
Adding
Add this line to your .htaccess:
Redirect permanent /wp-admin/ http://example.org/new_url/
source
share