Changeset 391 for trunk/bp-xprofile.php
- Timestamp:
- 10/12/2008 08:19:04 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile.php
r375 r391 70 70 id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete 71 71 ) VALUES ( 72 1, 1, 0, 'textbox', ' First Name', '', 1, 1, 0, '', 1, 072 1, 1, 0, 'textbox', '" . __( 'First Name', 'buddypress') . "', '', 1, 1, 0, '', 1, 0 73 73 );"; 74 74 … … 76 76 id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete 77 77 ) VALUES ( 78 2, 1, 0, 'textbox', ' Last Name', '', 1, 2, 0, '', 1, 078 2, 1, 0, 'textbox', '" . __( 'Last Name', 'buddypress') . "', '', 1, 2, 0, '', 1, 0 79 79 );"; 80 80 … … 138 138 139 139 if ( $wpdb->blogid == $bp['current_homebase_id'] ) { 140 add_menu_page( __('Profile' ), __('Profile'), 1, basename(__FILE__), 'bp_core_avatar_admin' );141 add_submenu_page( basename(__FILE__), __('Profile › Avatar' ), __('Avatar'), 1, basename(__FILE__), 'xprofile_avatar_admin' );140 add_menu_page( __('Profile', 'buddypress'), __('Profile', 'buddypress'), 1, basename(__FILE__), 'bp_core_avatar_admin' ); 141 add_submenu_page( basename(__FILE__), __('Profile › Avatar', 'buddypress'), __('Avatar', 'buddypress'), 1, basename(__FILE__), 'xprofile_avatar_admin' ); 142 142 143 143 $groups = BP_XProfile_Group::get_all(); … … 145 145 for ( $i=0; $i < count($groups); $i++ ) { 146 146 if ( $groups[$i]->fields ) { 147 add_submenu_page( basename(__FILE__), __('Profile' ) . ' › ' . $groups[$i]->name, $groups[$i]->name, 1, "xprofile_" . $groups[$i]->name, "xprofile_edit" );147 add_submenu_page( basename(__FILE__), __('Profile', 'buddypress') . ' › ' . $groups[$i]->name, $groups[$i]->name, 1, "xprofile_" . $groups[$i]->name, "xprofile_edit" ); 148 148 } 149 149 } … … 154 154 155 155 /* Add the administration tab under the "Site Admin" tab for site administrators */ 156 add_submenu_page( 'wpmu-admin.php', __("Profiles" ), __("Profiles"), 1, "xprofile_settings", "xprofile_admin" );156 add_submenu_page( 'wpmu-admin.php', __("Profiles", 'buddypress'), __("Profiles", 'buddypress'), 1, "xprofile_settings", "xprofile_admin" ); 157 157 } 158 158 … … 175 175 176 176 /* Add 'Profile' to the main navigation */ 177 bp_core_add_nav_item( __('Profile' ), $bp['profile']['slug'] );177 bp_core_add_nav_item( __('Profile', 'buddypress'), $bp['profile']['slug'] ); 178 178 bp_core_add_nav_default( $bp['profile']['slug'], 'xprofile_screen_display_profile', 'public' ); 179 179 … … 181 181 182 182 /* Add the subnav items to the profile */ 183 bp_core_add_subnav_item( $bp['profile']['slug'], 'public', __('Public' ), $profile_link, 'xprofile_screen_display_profile' );184 bp_core_add_subnav_item( $bp['profile']['slug'], 'edit', __('Edit Profile' ), $profile_link, 'xprofile_screen_edit_profile' );185 bp_core_add_subnav_item( $bp['profile']['slug'], 'change-avatar', __('Change Avatar' ), $profile_link, 'xprofile_screen_change_avatar' );183 bp_core_add_subnav_item( $bp['profile']['slug'], 'public', __('Public', 'buddypress'), $profile_link, 'xprofile_screen_display_profile' ); 184 bp_core_add_subnav_item( $bp['profile']['slug'], 'edit', __('Edit Profile', 'buddypress'), $profile_link, 'xprofile_screen_edit_profile' ); 185 bp_core_add_subnav_item( $bp['profile']['slug'], 'change-avatar', __('Change Avatar', 'buddypress'), $profile_link, 'xprofile_screen_change_avatar' ); 186 186 187 187 if ( $bp['current_component'] == $bp['profile']['slug'] ) { 188 188 if ( bp_is_home() ) { 189 $bp['bp_options_title'] = __('My Profile' );189 $bp['bp_options_title'] = __('My Profile', 'buddypress'); 190 190 } else { 191 191 $bp['bp_options_avatar'] = bp_core_get_avatar( $bp['current_userid'], 1 ); … … 263 263 264 264 if ( ( $wire_post->item_id == $bp['loggedin_userid'] && $wire_post->user_id == $bp['loggedin_userid'] ) || ( $wire_post->item_id == $bp['current_userid'] && $wire_post->user_id == $bp['current_userid'] ) ) { 265 $content = bp_core_get_userlink($wire_post->user_id) . ' ' . __('wrote on their own wire' ) . ': <span class="time-since">%s</span>';265 $content = bp_core_get_userlink($wire_post->user_id) . ' ' . __('wrote on their own wire', 'buddypress') . ': <span class="time-since">%s</span>'; 266 266 } else if ( ( $wire_post->item_id != $bp['loggedin_userid'] && $wire_post->user_id == $bp['loggedin_userid'] ) || ( $wire_post->item_id != $bp['current_userid'] && $wire_post->user_id == $bp['current_userid'] ) ) { 267 $content = bp_core_get_userlink($wire_post->user_id) . ' ' . __('wrote on ' ) . bp_core_get_userlink( $wire_post->item_id, false, false, true, true ) . ' wire: <span class="time-since">%s</span>';267 $content = bp_core_get_userlink($wire_post->user_id) . ' ' . __('wrote on ', 'buddypress') . bp_core_get_userlink( $wire_post->item_id, false, false, true, true ) . ' wire: <span class="time-since">%s</span>'; 268 268 } 269 269 … … 277 277 return false; 278 278 279 return bp_core_get_userlink($bp['current_userid']) . ' ' . __('updated the' ) . ' "<a href="' . $bp['current_domain'] . $bp['profile']['slug'] . '">' . $profile_group->name . '</a>" ' . __('information on') . ' ' . bp_your_or_their() . ' ' . __('profile') . '. <span class="time-since">%s</span>';279 return bp_core_get_userlink($bp['current_userid']) . ' ' . __('updated the', 'buddypress') . ' "<a href="' . $bp['current_domain'] . $bp['profile']['slug'] . '">' . $profile_group->name . '</a>" ' . __('information on', 'buddypress') . ' ' . bp_your_or_their() . ' ' . __('profile', 'buddypress') . '. <span class="time-since">%s</span>'; 280 280 break; 281 281 } … … 309 309 <div class="wrap"> 310 310 311 <h2><?php echo $group->name ?> <?php _e("Information" ) ?></h2>311 <h2><?php echo $group->name ?> <?php _e("Information", 'buddypress') ?></h2> 312 312 313 313 <?php … … 329 329 330 330 // Validate the field. 331 $field->message = sprintf( __('%s cannot be left blank.' ), $field->name );331 $field->message = sprintf( __('%s cannot be left blank.', 'buddypress'), $field->name ); 332 332 $errors[] = $field->message . "<br />"; 333 333 } else if ( !$field->is_required && ( $current_field == '' || is_null($current_field) ) ) { … … 357 357 358 358 if( !$profile_data->save() ) { 359 $field->message = __('There was a problem saving changes to this field, please try again.' );359 $field->message = __('There was a problem saving changes to this field, please try again.', 'buddypress'); 360 360 } else { 361 361 $field->data->value = $profile_data->value; … … 370 370 371 371 $list_html .= '<p class="submit"> 372 <input type="submit" name="save" id="save" value="'.__('Save Changes »' ).'" />372 <input type="submit" name="save" id="save" value="'.__('Save Changes »', 'buddypress').'" /> 373 373 </p>'; 374 374 375 375 if ( $errors && isset($_POST['save']) ) { 376 376 $type = 'error'; 377 $message = __('There were problems saving your information. Please fix the following:<br />' );377 $message = __('There were problems saving your information. Please fix the following:<br />', 'buddypress'); 378 378 379 379 for ( $i = 0; $i < count($errors); $i++ ) { … … 382 382 } else if ( !$errors && isset($_POST['save'] ) ) { 383 383 $type = 'success'; 384 $message = __('Changes saved.' );384 $message = __('Changes saved.', 'buddypress'); 385 385 386 386 do_action( 'bp_xprofile_updated_profile', array( 'item_id' => $group->id, 'component_name' => 'profile', 'component_action' => 'updated_profile', 'is_private' => 0 ) ); … … 390 390 else { ?> 391 391 <div id="message" class="error fade"> 392 <p><?php _e('That group does not exist.' ); ?></p>392 <p><?php _e('That group does not exist.', 'buddypress'); ?></p> 393 393 </div> 394 394 <?php … … 431 431 ?> 432 432 <div class="wrap"> 433 <h2><?php _e('Profile Settings' ); ?></h2>433 <h2><?php _e('Profile Settings', 'buddypress'); ?></h2> 434 434 <p>Member profile settings will appear here.</p> 435 435 </div>
Note: See TracChangeset
for help on using the changeset viewer.