• @thebrandonallen,this plugin creates a section in the edit profile page for every user. But I want to hide it from the edit profile area. I have used css to hide it but unable to hide it. Please guide me with a fix to it.

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Hi @subhro2321 ,

    I did this by changing permission to admin (so admin still can individualize slug per User, but other users don’t:

    /** 
     * Change permission on edit author slug
     * by replaces Edit Author Slug's function 'ba_eas_can_edit_author_slug'
     */
    function my_remove_eas_on_profile() {
    	//remove plugins inherit function
    	remove_action( 'admin_init', 'ba_eas_can_edit_author_slug' );
    	
    	// permission default to false.
    	$retval = false;
    
    	// True if user is admin.
    	if ( current_user_can( 'manage_options' ) || current_user_can( 'edit_author_slug' ) ) {
    		$retval = true;
    	}
    	return (bool) apply_filters( 'my_remove_eas_on_profile', $retval );	
    }
    add_action( 'admin_init', 'my_remove_eas_on_profile' );
    
Viewing 1 replies (of 1 total)
  • The topic ‘How to hide the settings in edit profile page?’ is closed to new replies.