Changeset 13394
- Timestamp:
- 01/06/2023 11:58:20 PM (2 years ago)
- Location:
- trunk/src/bp-xprofile
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-admin.php
r13393 r13394 72 72 'do_delete_field', 73 73 'delete_option', 74 'do_delete_option' 74 'do_delete_option', 75 75 ); 76 76 … … 134 134 $add_group_url = add_query_arg( array( 135 135 'page' => 'bp-profile-setup', 136 'mode' => 'add_group' 136 'mode' => 'add_group', 137 137 ), $url ); 138 138 … … 142 142 // Get all of the profile groups & fields. 143 143 $groups = bp_xprofile_get_groups( array( 144 'fetch_fields' => true 144 'fetch_fields' => true, 145 145 ) ); ?> 146 146 … … 203 203 'page' => 'bp-profile-setup', 204 204 'mode' => 'add_field', 205 'group_id' => (int) $group->id 205 'group_id' => (int) $group->id, 206 206 ), $url ); 207 207 … … 210 210 'page' => 'bp-profile-setup', 211 211 'mode' => 'edit_group', 212 'group_id' => (int) $group->id 212 'group_id' => (int) $group->id, 213 213 ), $url ); 214 214 … … 217 217 'page' => 'bp-profile-setup', 218 218 'mode' => 'delete_group', 219 'group_id' => (int) $group->id 219 'group_id' => (int) $group->id, 220 220 ), $url ), 'bp_xprofile_delete_group' ); ?> 221 221 … … 1027 1027 'mode' => 'edit_field', 1028 1028 'group_id' => (int) $field->group_id, 1029 'field_id' => (int) $field->id 1029 'field_id' => (int) $field->id, 1030 1030 ), $url ); 1031 1031 … … 1035 1035 'page' => 'bp-profile-setup', 1036 1036 'mode' => 'delete_field', 1037 'field_id' => (int) $field->id 1037 'field_id' => (int) $field->id, 1038 1038 ), $url . '#tabs-' . (int) $field->group_id ); 1039 1039 } -
trunk/src/bp-xprofile/bp-xprofile-cache.php
r12886 r13394 69 69 'group', 70 70 'field', 71 'data' 71 'data', 72 72 ); 73 73 -
trunk/src/bp-xprofile/bp-xprofile-functions.php
r13393 r13394 1310 1310 // If the current user and displayed user are friends, show all. 1311 1311 } elseif ( bp_is_active( 'friends' ) && friends_check_friendship( $displayed_user_id, $current_user_id ) ) { 1312 $hidden_levels = array( 'adminsonly' ,);1312 $hidden_levels = array( 'adminsonly' ); 1313 1313 1314 1314 // Current user is logged in but not friends, so exclude friends-only. 1315 1315 } else { 1316 $hidden_levels = array( 'friends', 'adminsonly' ,);1316 $hidden_levels = array( 'friends', 'adminsonly' ); 1317 1317 } 1318 1318 1319 1319 // Current user is not logged in, so exclude friends-only, loggedin, and adminsonly. 1320 1320 } else { 1321 $hidden_levels = array( 'friends', 'loggedin', 'adminsonly' ,);1321 $hidden_levels = array( 'friends', 'loggedin', 'adminsonly' ); 1322 1322 } 1323 1323 -
trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php
r13393 r13394 50 50 buddypress()->plugin_dir, 51 51 array( 52 'adminbar_myaccount_order' => 20 52 'adminbar_myaccount_order' => 20, 53 53 ) 54 54 ); … … 174 174 'public' => array( 175 175 'id' => 'public', 176 'label' => _x( 'Everyone', 'Visibility level setting', 'buddypress' ) 176 'label' => _x( 'Everyone', 'Visibility level setting', 'buddypress' ), 177 177 ), 178 178 'adminsonly' => array( 179 179 'id' => 'adminsonly', 180 'label' => _x( 'Only Me', 'Visibility level setting', 'buddypress' ) 180 'label' => _x( 'Only Me', 'Visibility level setting', 'buddypress' ), 181 181 ), 182 182 'loggedin' => array( 183 183 'id' => 'loggedin', 184 'label' => _x( 'All Members', 'Visibility level setting', 'buddypress' ) 185 ) 184 'label' => _x( 'All Members', 'Visibility level setting', 'buddypress' ), 185 ), 186 186 ); 187 187 … … 189 189 $this->visibility_levels['friends'] = array( 190 190 'id' => 'friends', 191 'label' => _x( 'My Friends', 'Visibility level setting', 'buddypress' ) 191 'label' => _x( 'My Friends', 'Visibility level setting', 'buddypress' ), 192 192 ); 193 193 } … … 250 250 'screen_function' => 'xprofile_screen_display_profile', 251 251 'default_subnav_slug' => 'public', 252 'item_css_id' => $this->id 252 'item_css_id' => $this->id, 253 253 ); 254 254 … … 260 260 'parent_slug' => $slug, 261 261 'screen_function' => 'xprofile_screen_display_profile', 262 'position' => 10 262 'position' => 10, 263 263 ); 264 264 … … 271 271 'screen_function' => 'xprofile_screen_edit_profile', 272 272 'position' => 20, 273 'user_has_access' => $access 273 'user_has_access' => $access, 274 274 ); 275 275 … … 313 313 'screen_function' => 'bp_xprofile_screen_settings', 314 314 'position' => 30, 315 'user_has_access' => bp_core_can_edit_settings() 315 'user_has_access' => bp_core_can_edit_settings(), 316 316 ), 'members' ); 317 317 } … … 337 337 'id' => 'my-account-' . $this->id, 338 338 'title' => _x( 'Profile', 'My Account Profile', 'buddypress' ), 339 'href' => $profile_link 339 'href' => $profile_link, 340 340 ); 341 341 … … 346 346 'title' => _x( 'View', 'My Account Profile sub nav', 'buddypress' ), 347 347 'href' => trailingslashit( $profile_link . 'public' ), 348 'position' => 10 348 'position' => 10, 349 349 ); 350 350 … … 355 355 'title' => _x( 'Edit', 'My Account Profile sub nav', 'buddypress' ), 356 356 'href' => trailingslashit( $profile_link . 'edit' ), 357 'position' => 20 357 'position' => 20, 358 358 ); 359 359 } … … 389 389 390 390 /* translators: %s: member name */ 391 'alt' => sprintf( _x( 'Profile picture of %s', 'Avatar alt', 'buddypress' ), bp_get_displayed_user_fullname() ) 391 'alt' => sprintf( _x( 'Profile picture of %s', 'Avatar alt', 'buddypress' ), bp_get_displayed_user_fullname() ), 392 392 ) ); 393 393 $bp->bp_options_title = bp_get_displayed_user_fullname(); … … 436 436 'id' => 'my-account-' . buddypress()->settings->id . '-profile', 437 437 'title' => _x( 'Profile', 'My Account Settings sub nav', 'buddypress' ), 438 'href' => trailingslashit( $settings_link . 'profile' ) 438 'href' => trailingslashit( $settings_link . 'profile' ), 439 439 ); 440 440 -
trunk/src/bp-xprofile/classes/class-bp-xprofile-data-template.php
r13358 r13394 144 144 7 => 'hide_empty_fields', 145 145 8 => 'fetch_visibility_level', 146 9 => 'update_meta_cache' 146 9 => 'update_meta_cache', 147 147 ); 148 148 -
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php
r13392 r13394 82 82 83 83 <?php bp_the_profile_field_options( array( 84 'user_id' => $user_id 84 'user_id' => $user_id, 85 85 ) ); ?> 86 86 -
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php
r13392 r13394 121 121 <?php bp_the_profile_field_options( array( 122 122 'type' => 'day', 123 'user_id' => $user_id 123 'user_id' => $user_id, 124 124 ) ); ?> 125 125 </select> … … 131 131 <?php bp_the_profile_field_options( array( 132 132 'type' => 'month', 133 'user_id' => $user_id 133 'user_id' => $user_id, 134 134 ) ); ?> 135 135 </select> … … 141 141 <?php bp_the_profile_field_options( array( 142 142 'type' => 'year', 143 'user_id' => $user_id 143 'user_id' => $user_id, 144 144 ) ); ?> 145 145 </select> … … 236 236 __( 'October', 'buddypress' ), 237 237 __( 'November', 'buddypress' ), 238 __( 'December', 'buddypress' ) 238 __( 'December', 'buddypress' ), 239 239 ); 240 240 -
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php
r13392 r13394 89 89 <select <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-labelledby="<?php bp_the_profile_field_input_name(); ?>-1" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"> 90 90 <?php bp_the_profile_field_options( array( 91 'user_id' => $user_id 91 'user_id' => $user_id, 92 92 ) ); ?> 93 93 </select> -
trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php
r13393 r13394 283 283 $int_fields = array( 284 284 'id', 'is_required', 'group_id', 'parent_id', 'is_default_option', 285 'field_order', 'option_order', 'can_delete' 285 'field_order', 'option_order', 'can_delete', 286 286 ); 287 287 … … 1238 1238 'page' => 'bp-profile-setup', 1239 1239 'mode' => 'add_field', 1240 'group_id' => (int) $this->group_id 1240 'group_id' => (int) $this->group_id, 1241 1241 ), $users_url . '#tabs-' . (int) $this->group_id ); 1242 1242 … … 1261 1261 'mode' => 'edit_field', 1262 1262 'group_id' => (int) $this->group_id, 1263 'field_id' => (int) $this->id 1263 'field_id' => (int) $this->id, 1264 1264 ), $users_url . '#tabs-' . (int) $this->group_id ); 1265 1265 } ?> … … 1420 1420 $users_url = bp_get_admin_url( 'users.php' ); 1421 1421 $cancel_url = add_query_arg( array( 1422 'page' => 'bp-profile-setup' 1422 'page' => 'bp-profile-setup', 1423 1423 ), $users_url ); 1424 1424 … … 1429 1429 'page' => 'bp-profile-setup', 1430 1430 'mode' => 'delete_field', 1431 'field_id' => (int) $this->id 1431 'field_id' => (int) $this->id, 1432 1432 ), $users_url ), 'bp_xprofile_delete_field-' . $this->id, 'bp_xprofile_delete_field' ); 1433 1433 } -
trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php
r13392 r13394 93 93 // Get this group. 94 94 $group = self::get( array( 95 'profile_group_id' => $id 95 'profile_group_id' => $id, 96 96 ) ); 97 97 … … 838 838 // URL to cancel to. 839 839 $cancel_url = add_query_arg( array( 840 'page' => 'bp-profile-setup' 840 'page' => 'bp-profile-setup', 841 841 ), $users_url ); 842 842 … … 847 847 $action = add_query_arg( array( 848 848 'page' => 'bp-profile-setup', 849 'mode' => 'add_group' 849 'mode' => 'add_group', 850 850 ), $users_url ); 851 851 … … 857 857 'page' => 'bp-profile-setup', 858 858 'mode' => 'edit_group', 859 'group_id' => (int) $this->id 859 'group_id' => (int) $this->id, 860 860 ), $users_url ); 861 861 … … 865 865 'page' => 'bp-profile-setup', 866 866 'mode' => 'delete_group', 867 'group_id' => (int) $this->id 867 'group_id' => (int) $this->id, 868 868 ), $users_url ), 'bp_xprofile_delete_group' ); 869 869 } -
trunk/src/bp-xprofile/classes/class-bp-xprofile-meta-query.php
r13392 r13394 185 185 'BETWEEN', 'NOT BETWEEN', 186 186 'EXISTS', 'NOT EXISTS', 187 'REGEXP', 'NOT REGEXP', 'RLIKE' 187 'REGEXP', 'NOT REGEXP', 'RLIKE', 188 188 ) ) ) { 189 189 $clause['compare'] = '='; -
trunk/src/bp-xprofile/classes/class-bp-xprofile-query.php
r12534 r13394 371 371 'BETWEEN', 'NOT BETWEEN', 372 372 'EXISTS', 'NOT EXISTS', 373 'REGEXP', 'NOT REGEXP', 'RLIKE' 373 'REGEXP', 'NOT REGEXP', 'RLIKE', 374 374 ) ) ) { 375 375 $clause['compare'] = '=';
Note: See TracChangeset
for help on using the changeset viewer.