WordPress.org

Ready to get started?Download WordPress

Forums

Our Team by WooThemes
Remove "Gravatar Email Address" & "WordPress Username" Meta (3 posts)

  1. Jason
    Member
    Posted 6 months ago #

    Using this code in the functions.php seems to work great…

    add_filter( 'woothemes_our_team_member_role', '__return_false' );
    add_filter( 'woothemes_our_team_member_url', '__return_false' );
    add_filter( 'woothemes_our_team_member_twitter', '__return_false' );

    …However this code below doesn't seem to work:

    add_filter( 'woothemes_our_team_member_user_id', '__return_false' );
    add_filter( 'woothemes_our_team_member_gravatar_email', '__return_false' );

    How can we remove the "Gravatar Email Address" & "WordPress Username" Meta?

    https://wordpress.org/plugins/our-team-by-woothemes/

  2. iandbanks
    Member
    Posted 2 months ago #

    To remove the WordPress Username add this filter:

    add_filter( 'woothemes_our_team_member_user_search', '__return_false' );

    I haven't been able to figure out how to remove the gravatar_email field yet...kindof frustrating.

  3. marblegravy
    Member
    Posted 2 months ago #

    Gravatar email is currently not removable using the same method as the other fields. You can remove it if you wanted to change class-woothemes-our-team.php. Not sure if this is a bug or not though - from what I can tell the email address isn't required...

    Note that making this change in the Our Team plugin means that it's going to revert next time you update it.

    The bit you want to change is line 384 of class-woothemes-our-team.php:

    change the code:

    $fields['gravatar_email'] = array(
        'name' 				=> __( 'Gravatar E-mail Address', 'our-team-by-woothemes' ),
        'description' 		=> sprintf( __( 'Enter in an e-mail address, to use a %sGravatar%s, instead of using the "Featured Image".', 'our-team-by-woothemes' ), '<a href="' . esc_url( 'http://gravatar.com/' ) . '" target="_blank">', '</a>' ),
        'type' 				=> 'text',
        'default' 			=> '',
        'section' 			=> 'info'
    );

    to:

    if ( apply_filters( 'woothemes_our_team_gravatar_email', true ) ) {
    $fields['gravatar_email'] = array(
    	    'name' 				=> __( 'Gravatar E-mail Address', 'our-team-by-woothemes' ),
    	    'description' 		=> sprintf( __( 'Enter in an e-mail address, to use a %sGravatar%s, instead of using the "Featured Image".', 'our-team-by-woothemes' ), '<a href="' . esc_url( 'http://gravatar.com/' ) . '" target="_blank">', '</a>' ),
    	    'type' 				=> 'text',
    	    'default' 			=> '',
    	    'section' 			=> 'info'
    	);
    }

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.