Changeset 1798 for trunk/bp-xprofile/bp-xprofile-classes.php
- Timestamp:
- 09/06/2009 01:07:21 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile/bp-xprofile-classes.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-classes.php
r1728 r1798 82 82 83 83 // Get field ids for the current group. 84 if ( !$fields = $wpdb->get_results( $wpdb->prepare("SELECT id, type FROM {$bp->profile->table_name_fields} WHERE group_id = %d AND parent_id = 0 ORDER BY id", $this->id ) ) )84 if ( !$fields = $wpdb->get_results( $wpdb->prepare("SELECT id, type FROM {$bp->profile->table_name_fields} WHERE group_id = %d AND parent_id = 0 ORDER BY field_order", $this->id ) ) ) 85 85 return false; 86 86 … … 128 128 129 129 if ( !$this->id ) { 130 $title = __('Add Group', 'buddypress');130 $title = __('Add New Field Group', 'buddypress'); 131 131 $action = "admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&mode=add_group"; 132 132 } else { 133 $title = __('Edit Group', 'buddypress');133 $title = __('Edit Field Group', 'buddypress'); 134 134 $action = "admin.php?page=" . BP_PLUGIN_DIR . "/bp-xprofile.php&mode=edit_group&group_id=" . $this->id; 135 135 } … … 152 152 153 153 <div id="titlediv"> 154 <label for="group_name"><?php _e( "ProfileGroup Name", 'buddypress') ?></label>154 <label for="group_name"><?php _e( "Field Group Name", 'buddypress') ?></label> 155 155 <div> 156 156 <input type="text" name="group_name" id="group_name" value="<?php echo attribute_escape( $this->name ) ?>" style="width:50%" /> … … 372 372 $wpdb->query($sql); 373 373 } 374 375 // Static Functions 374 376 375 377 function get_type( $field_id ) { … … 411 413 412 414 return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", $field_name ) ); 415 } 416 417 function update_position( $field_id, $position ) { 418 global $wpdb, $bp; 419 420 if ( !is_numeric( $position ) ) 421 return false; 422 423 return $wpdb->query( $wpdb->prepare( "UPDATE {$bp->profile->table_name_fields} SET field_order = %d WHERE id = %d", $position, $field_id ) ); 413 424 } 414 425
Note: See TracChangeset
for help on using the changeset viewer.