WordPress.org

Ready to get started?Download WordPress

Forums

AuthorSure
Remove Skype Field in WP User Profile (5 posts)

  1. User45
    Member
    Posted 1 year ago #

    How to remove Skype from the User Profile form?

    There is no effect with this: unset($contactmethods['skype']);

    http://wordpress.org/extend/plugins/authorsure/

  2. Russell Jamieson
    Member
    Plugin Author

    Posted 1 year ago #

    The unset should work - it might be you are calling it too soon, ie. before AuthorSure adds the skype contact method.

    AuthorSure add the methods at the 'user_contactmethods' filter hook with a priority of 10. If you run your "unset" at the same hook with priority 11 I think it should work

  3. User45
    Member
    Posted 1 year ago #

    I don't understand.

    "Unset" is set at the bottom of the Functions theme file.

    How exactly solve the problem step-by-step?

  4. Russell Jamieson
    Member
    Plugin Author

    Posted 1 year ago #

    Add the following to functions.php

    function custom_remove_skype($methods) {
       if (array_key_exists('skype',$methods)) unset($methods['skype']);
       return $methods;
    }
    add_filter ('user_contactmethods','custom_remove_skype',11);

    This should remove the Skype entry as custom_remove_skype will run AFTER the Authorsure function that adds the Skype method and not before

  5. User45
    Member
    Posted 1 year ago #

    Solved. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.