Avatars plugin in undue places.

Hello!

I'm using the Avatars plugin. The problem is it is appearing in undue places of other plugins. Please see attached image.

I need to know how I do to prevent the Avatars plugin from appearing in other locations.

Abs,
Josimar

  • Kasia Swiderska

    Hello Josimar,

    Avatar plugin shows where user profile is created and also edited - it adds it field to user profile. So if others plugins are editing user profiles they will also grab Avatar field.

    I will ask developer if it's possible to use some filter to remove avatars from some screens, but quickest way would be to hide it with CSS on those pages. If you point me to pages where you think avatar should not show I can help with that CSS (please also grant access
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/ )

    kind regards,
    Kasia

  • Nithin

    Hey JOSIMAR,

    Hope you are doing good today. :slight_smile:

    I got an update from the developer, could please try the following code, and check whether it works fine:

    add_action( 'init', 'custom_disable_avatar_signup' );
    function custom_disable_avatar_signup() {
        // Try to find out where you are
        if ( is_page( 12 ) ) {
            define( 'AVATARS_DISABLE_SIGNUP_UPLOAD', true );
        }
    }

    This would how the basic structure would be, you'll have to make use of the following code, to disable the avatar. However the check used above can differ according to you needs, you'll to customize according to it. In the above example, it'll disable the avatar for page having an id 12

    Please add the above code in your themes functions.php file, would highly recommend that you make changes like this to a theme using a Child theme, so that it won't be overwritten when you update your theme.

    I hope this would help, please let us know if you still need any further help. Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

  • Rupok

    Hi Josimar,

    So sorry to see that it didn't work for you. Can you please try the following code instead of the previous one?

    add_action( 'init', 'custom_disable_avatar_signup' );
    function custom_disable_avatar_signup() {
        if ( ! is_admin() ) {
            define( 'AVATARS_DISABLE_SIGNUP_UPLOAD', true );
        }
    }

    This should hide the avatar option completely from front-end. Please let us know how it goes.

    If it still doesn't work, would you mind allowing Support Access so we can have a closer look at this? Can you please also confirm on which front-end page I can see this avatar uploading option?

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please let us know how that code goes, page URL where we can see this and please confirm here when you are done granting Support Access. I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Kasia Swiderska

    Hello Josimar,

    I will jump in again - I got updated code from developer:

    <?php
    
    add_action( 'init', 'maybe_disable_avatar_signup' );
    function maybe_disable_avatar_signup() {
        // Try to find out where you are
        if ( is_page( 12 ) && ! defined( 'AVATARS_DISABLE_SIGNUP_UPLOAD' ) ) {
            define( 'AVATARS_DISABLE_SIGNUP_UPLOAD', true );
        }
    }

    again this code checks on what page are you - so you have that part is_page( 12 ) to fit your page. Let me know if this will work.

    kind regards,
    Kasia