Ticket #5330: 5330.diff
File 5330.diff, 2.3 KB (added by , 11 years ago) |
---|
-
bp-core/bp-core-admin.php
285 285 // Add the main section 286 286 add_settings_section( 'bp_xprofile', __( 'Profile Settings', 'buddypress' ), 'bp_admin_setting_callback_xprofile_section', 'buddypress' ); 287 287 288 // Allow avatar uploads 289 add_settings_field( 'bp-disable-avatar-uploads', __( 'Avatar Uploads', 'buddypress' ), 'bp_admin_setting_callback_avatar_uploads', 'buddypress', 'bp_xprofile' ); 290 register_setting ( 'buddypress', 'bp-disable-avatar-uploads', 'intval' ); 288 $avatar_setting = 'bp_xprofile'; 291 289 292 290 // Profile sync setting 293 291 add_settings_field( 'bp-disable-profile-sync', __( 'Profile Syncing', 'buddypress' ), 'bp_admin_setting_callback_profile_sync', 'buddypress', 'bp_xprofile' ); … … 301 299 // Add the main section 302 300 add_settings_section( 'bp_groups', __( 'Groups Settings', 'buddypress' ), 'bp_admin_setting_callback_groups_section', 'buddypress' ); 303 301 302 if( empty( $avatar_setting ) ) 303 $avatar_setting = 'bp_groups'; 304 304 305 // Allow subscriptions setting 305 306 add_settings_field( 'bp_restrict_group_creation', __( 'Group Creation', 'buddypress' ), 'bp_admin_setting_callback_group_creation', 'buddypress', 'bp_groups' ); 306 307 register_setting ( 'buddypress', 'bp_restrict_group_creation', 'intval' ); … … 335 336 register_setting ( 'buddypress', '_bp_enable_akismet', 'intval' ); 336 337 } 337 338 } 339 340 /** Avatar upload for users or groups **/ 341 if( !empty( $avatar_setting ) ) { 342 // Allow avatar uploads 343 add_settings_field( 'bp-disable-avatar-uploads', __( 'Avatar Uploads', 'buddypress' ), 'bp_admin_setting_callback_avatar_uploads', 'buddypress', $avatar_setting ); 344 register_setting ( 'buddypress', 'bp-disable-avatar-uploads', 'intval' ); 345 } 338 346 } 339 347 340 348 /**