[wp-hackers] URL of edit profile page

Ryan Bilesky rbilesky at gmail.com
Mon Feb 28 22:48:05 UTC 2011


function get_user_profile_link($userid) {
        global $wp_version;

        if (version_compare($wp_version, "3.1", "<")) {
                // If the version is before 3.1 use this method
                return admin_url('profile.php');
        }else{
                // 3.1 or  later
                return get_edit_profile_url($userid);
        }
}
On Mon, Feb 28, 2011 at 6:32 AM, Rafael Ehlers <rafaehlers at gmail.com> wrote:

> Hi Ryan,
>
> can you share that function please?
>
> On Sun, Feb 27, 2011 at 12:28 AM, Ryan Bilesky <rbilesky at gmail.com> wrote:
>
> > Perfect I just wrote a simple function that checks the wp version if it's
> > 3.0 it returns admin_url('profile.php') or if its 3.1 or greater it
> returns
> > self_admin_url('profile.php').
>  > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list