Skip to:
Content

BuddyPress.org

Ticket #6377: 6377.patch

File 6377.patch, 1.4 KB (added by imath, 10 years ago)
  • src/bp-xprofile/bp-xprofile-admin.php

    diff --git src/bp-xprofile/bp-xprofile-admin.php src/bp-xprofile/bp-xprofile-admin.php
    index 198313a..27376e6 100644
    class BP_XProfile_User_Admin { 
    690690         * @since BuddyPress (2.3.0)
    691691         */
    692692        public function enqueue_scripts( $screen_id ) {
    693                 if ( ( false === strpos( $screen_id, 'users_page_bp-profile-edit' ) && false === strpos( $screen_id, 'profile_page_bp-profile-edit' ) ) || bp_core_get_root_option( 'bp-disable-avatar-uploads' ) ) {
     693                if ( ( false === strpos( $screen_id, 'users_page_bp-profile-edit' ) && false === strpos( $screen_id, 'profile_page_bp-profile-edit' ) ) || bp_core_get_root_option( 'bp-disable-avatar-uploads' ) || ! buddypress()->avatar->show_avatars ) {
    694694                        return;
    695695                }
    696696
    class BP_XProfile_User_Admin { 
    768768                        );
    769769                }
    770770
    771                 // Avatar Metabox
    772                 add_meta_box(
    773                         'bp_xprofile_user_admin_avatar',
    774                         _x( 'Profile Photo', 'xprofile user-admin edit screen', 'buddypress' ),
    775                         array( $this, 'user_admin_avatar_metabox' ),
    776                         $screen_id,
    777                         'side',
    778                         'low'
    779                 );
     771                if ( buddypress()->avatar->show_avatars ) {
     772                        // Avatar Metabox
     773                        add_meta_box(
     774                                'bp_xprofile_user_admin_avatar',
     775                                _x( 'Profile Photo', 'xprofile user-admin edit screen', 'buddypress' ),
     776                                array( $this, 'user_admin_avatar_metabox' ),
     777                                $screen_id,
     778                                'side',
     779                                'low'
     780                        );
     781                }
    780782        }
    781783
    782784        /**