Changeset 3369 for trunk/bp-xprofile/bp-xprofile-admin.php
- Timestamp:
- 11/07/2010 12:20:02 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-admin.php
r3300 r3369 68 68 if ( $groups ) : 69 69 foreach ( $groups as $group ) { ?> 70 <li id="group_<?php echo $group->id; ?>"><a href="#tabs-<?php echo $group->id; ?>" class="ui-tab"><?php echo attribute_escape( $group->name ); ?><?php if ( !$group->can_delete ) : ?> <?php _e( '(Core)', 'buddypress'); endif; ?></a></li>70 <li id="group_<?php echo $group->id; ?>"><a href="#tabs-<?php echo $group->id; ?>" class="ui-tab"><?php echo esc_attr( $group->name ); ?><?php if ( !$group->can_delete ) : ?> <?php _e( '(Core)', 'buddypress'); endif; ?></a></li> 71 71 <?php } 72 72 endif; ?> … … 76 76 foreach ( $groups as $group ) { ?> 77 77 <noscript> 78 <h3><?php echo attribute_escape( $group->name ) ?></h3>78 <h3><?php echo esc_attr( $group->name ) ?></h3> 79 79 </noscript> 80 80 <div id="tabs-<?php echo $group->id; ?>" class="tab-wrapper"> 81 81 <div class="tab-toolbar"> 82 82 <div class="tab-toolbar-left"> 83 <a class="button" href="admin.php?page=bp-profile-setup&group_id=<?php echo attribute_escape( $group->id ); ?>&mode=add_field"><?php _e( 'Add New Field', 'buddypress' ); ?></a>84 <a class="button edit" href="admin.php?page=bp-profile-setup&mode=edit_group&group_id=<?php echo attribute_escape( $group->id ); ?>"><?php _e( 'Edit Group', 'buddypress' ); ?></a>83 <a class="button" href="admin.php?page=bp-profile-setup&group_id=<?php echo esc_attr( $group->id ); ?>&mode=add_field"><?php _e( 'Add New Field', 'buddypress' ); ?></a> 84 <a class="button edit" href="admin.php?page=bp-profile-setup&mode=edit_group&group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Edit Group', 'buddypress' ); ?></a> 85 85 <?php if ( $group->can_delete ) : ?> 86 <a class="button delete" href="admin.php?page=bp-profile-setup&mode=delete_group&group_id=<?php echo attribute_escape( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>86 <a class="button delete" href="admin.php?page=bp-profile-setup&mode=delete_group&group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a> 87 87 <?php endif; ?> 88 88 </div> … … 91 91 <fieldset id="<?php echo $group->id; ?>" class="connectedSortable field-group"> 92 92 <?php if( $group->description ) : ?> 93 <legend><?php echo attribute_escape( $group->description ) ?></legend>93 <legend><?php echo esc_attr( $group->description ) ?></legend> 94 94 <?php endif; 95 95 … … 99 99 /* Load the field */ 100 100 $field = new BP_XProfile_Field( $field->id ); 101 102 $class = ''; 101 103 if ( !$field->can_delete ) 102 $class .= ' core nodrag';104 $class = ' core nodrag'; 103 105 104 106 /* This function handles the WYSIWYG profile field 105 107 * display for the xprofile admin setup screen 106 108 */ 107 xprofile_admin_field( $field, $group );109 xprofile_admin_field( $field, $group, $class ); 108 110 109 111 } /* end for */ … … 328 330 Handles the WYSIWYG display of each profile field on the edit screen 329 331 **************************************************************************/ 330 function xprofile_admin_field( $admin_field, $admin_group ) {332 function xprofile_admin_field( $admin_field, $admin_group, $class='' ) { 331 333 global $field; 332 334 333 335 $field = $admin_field; 334 336 ?> 335 <fieldset id="field_<?php echo attribute_escape( $field->id ); ?>" class="sortable<?php echo ' ' . $field->type; if ( $class ) echo ' ' . $class; ?>">337 <fieldset id="field_<?php echo esc_attr( $field->id ); ?>" class="sortable<?php echo ' ' . $field->type; if ( $class ) echo ' ' . $class; ?>"> 336 338 <legend><?php bp_the_profile_field_name(); ?> <?php if( !$field->can_delete ) : ?> <?php _e( '(Core)', 'buddypress' ); endif; ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></legend> 337 339 <div class="field-wrapper"> … … 394 396 <?php } ?> 395 397 <div class="actions"> 396 <a class="button edit" href="admin.php?page=bp-profile-setup&group_id=<?php echo attribute_escape( $admin_group->id ); ?>&field_id=<?php echo attribute_escape( $field->id ); ?>&mode=edit_field"><?php _e( 'Edit', 'buddypress' ); ?></a>397 <?php if ( !$field->can_delete ) : ?> <?php else : ?><a class="button delete" href="admin.php?page=bp-profile-setup&field_id=<?php echo attribute_escape( $field->id ); ?>&mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a><?php endif; ?>398 <a class="button edit" href="admin.php?page=bp-profile-setup&group_id=<?php echo esc_attr( $admin_group->id ); ?>&field_id=<?php echo esc_attr( $field->id ); ?>&mode=edit_field"><?php _e( 'Edit', 'buddypress' ); ?></a> 399 <?php if ( !$field->can_delete ) : ?> <?php else : ?><a class="button delete" href="admin.php?page=bp-profile-setup&field_id=<?php echo esc_attr( $field->id ); ?>&mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a><?php endif; ?> 398 400 399 401 </div> 400 402 <?php if ( $field->description ) : ?> 401 <p class="description"><?php echo attribute_escape( $field->description ); ?></p>403 <p class="description"><?php echo esc_attr( $field->description ); ?></p> 402 404 <?php endif; ?> 403 405 </div>
Note: See TracChangeset
for help on using the changeset viewer.