过滤器挂钩edit_profile_url
确实如此。它返回URL并提供用户ID,以便您可以使用它来定制新URL。
add_filter( \'edit_profile_url\', \'modify_profile_url_wpse_94075\', 10, 3 );
/**
* http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/link-template.php#L2284
*
* @param string $scheme The scheme to use.
* Default is \'admin\'. \'http\' or \'https\' can be passed to force those schemes.
*/
function modify_profile_url_wpse_94075( $url, $user_id, $scheme )
{
// Makes the link to http://example.com/custom-profile
$url = site_url( \'/custom-profile\' );
return $url;
}
问:;利益相关方:
Where to put my code: plugin or functions.php?