Ticket #1221: rename-desc-to-description.patch
File rename-desc-to-description.patch, 6.1 KB (added by , 15 years ago) |
---|
-
bp-xprofile-admin.php
89 89 90 90 <tr id="field_<?php echo attribute_escape( $field->id ); ?>" class="sortable<?php if ( $class ) { echo ' ' . $class; } ?>"> 91 91 <td width="10"><img src="<?php echo BP_PLUGIN_URL ?>/bp-xprofile/admin/images/move.gif" alt="<?php _e( 'Drag', 'buddypress' ) ?>" /></td> 92 <td><span title="<?php echo $field->desc ; ?>"><?php echo attribute_escape( $field->name ); ?> <?php if(!$field->can_delete) { ?> <?php _e( '(Core Field)', 'buddypress' ) ?><?php } ?></span></td>92 <td><span title="<?php echo $field->description; ?>"><?php echo attribute_escape( $field->name ); ?> <?php if(!$field->can_delete) { ?> <?php _e( '(Core Field)', 'buddypress' ) ?><?php } ?></span></td> 93 93 <td><?php echo attribute_escape( $field->type ); ?></td> 94 94 <td style="text-align:center;"><?php if ( $field->is_required ) { echo '<img src="' . BP_PLUGIN_URL . '/bp-xprofile/admin/images/tick.gif" alt="' . __( 'Yes', 'buddypress' ) . '" />'; } else { ?>--<?php } ?></td> 95 95 <td style="text-align:center;"><?php if ( !$field->can_delete ) { ?><strike><?php _e( 'Edit', 'buddypress' ) ?></strike><?php } else { ?><a class="edit" href="admin.php?page=bp-profile-setup&group_id=<?php echo attribute_escape( $groups[$i]->id ); ?>&field_id=<?php echo attribute_escape( $field->id ); ?>&mode=edit_field"><?php _e( 'Edit', 'buddypress' ) ?></a><?php } ?></td> … … 216 216 if ( isset($_POST['saveField']) ) { 217 217 if ( BP_XProfile_Field::admin_validate() ) { 218 218 $field->name = wp_filter_kses( $_POST['title'] ); 219 $field->desc = wp_filter_kses( $_POST['description'] );219 $field->description = wp_filter_kses( $_POST['description'] ); 220 220 $field->is_required = wp_filter_kses( $_POST['required'] ); 221 221 $field->type = wp_filter_kses( $_POST['fieldtype'] ); 222 222 $field->order_by = wp_filter_kses( $_POST["sort_order_{$field->type}"] ); -
bp-xprofile-classes.php
181 181 var $parent_id; 182 182 var $type; 183 183 var $name; 184 var $desc ;184 var $description; 185 185 var $is_required; 186 186 var $can_delete; 187 187 var $field_order; … … 256 256 $this->parent_id = apply_filters( 'xprofile_field_parent_id_before_save', $this->parent_id, $this->id ); 257 257 $this->type = apply_filters( 'xprofile_field_type_before_save', $this->type, $this->id ); 258 258 $this->name = apply_filters( 'xprofile_field_name_before_save', $this->name, $this->id ); 259 $this->desc = apply_filters( 'xprofile_field_description_before_save', $this->desc, $this->id );259 $this->description = apply_filters( 'xprofile_field_description_before_save', $this->description, $this->id ); 260 260 $this->is_required = apply_filters( 'xprofile_field_is_required_before_save', $this->is_required, $this->id ); 261 261 $this->order_by = apply_filters( 'xprofile_field_order_by_before_save', $this->order_by, $this->id ); 262 262 $this->field_order = apply_filters( 'xprofile_field_field_order_before_save', $this->field_order, $this->id ); … … 264 264 do_action( 'xprofile_field_before_save', $this ); 265 265 266 266 if ( $this->id != null ) 267 $sql = $wpdb->prepare("UPDATE {$bp->profile->table_name_fields} SET group_id = %d, parent_id = 0, type = %s, name = %s, description = %s, is_required = %d, order_by = %s, field_order = %d WHERE id = %d", $this->group_id, $this->type, $this->name, $this->desc , $this->is_required, $this->order_by, $this->field_order, $this->id);267 $sql = $wpdb->prepare("UPDATE {$bp->profile->table_name_fields} SET group_id = %d, parent_id = 0, type = %s, name = %s, description = %s, is_required = %d, order_by = %s, field_order = %d WHERE id = %d", $this->group_id, $this->type, $this->name, $this->description, $this->is_required, $this->order_by, $this->field_order, $this->id); 268 268 else 269 $sql = $wpdb->prepare("INSERT INTO {$bp->profile->table_name_fields} (group_id, parent_id, type, name, description, is_required, order_by, field_order ) VALUES (%d, 0, %s, %s, %s, %d, %s, %d )", $this->group_id, $this->type, $this->name, $this->desc , $this->is_required, $this->order_by, $this->field_order );269 $sql = $wpdb->prepare("INSERT INTO {$bp->profile->table_name_fields} (group_id, parent_id, type, name, description, is_required, order_by, field_order ) VALUES (%d, 0, %s, %s, %s, %d, %s, %d )", $this->group_id, $this->type, $this->name, $this->description, $this->is_required, $this->order_by, $this->field_order ); 270 270 271 271 // Check for null so field options can be changed without changing any other part of the field. 272 272 // The described situation will return 0 here. … … 519 519 $action = "admin.php?page=bp-profile-setup&group_id=" . $this->group_id . "&mode=add_field"; 520 520 521 521 $this->name = $_POST['title']; 522 $this->desc 522 $this->description = $_POST['description']; 523 523 $this->is_required = $_POST['required']; 524 524 $this->type = $_POST['fieldtype']; 525 525 $this->order_by = $_POST["sort_order_{$this->type}"]; … … 554 554 <div id="titlediv" class="inside"> 555 555 <h3><label for="description"><?php _e("Field Description", 'buddypress') ?></label></h3> 556 556 <div id="titlewrap"> 557 <textarea name="description" id="description" rows="8" cols="60"><?php echo htmlspecialchars( $this->desc ); ?></textarea>557 <textarea name="description" id="description" rows="8" cols="60"><?php echo htmlspecialchars( $this->description ); ?></textarea> 558 558 </div> 559 559 </div> 560 560 -
bp-xprofile-templatetags.php
368 368 function bp_get_the_profile_field_description() { 369 369 global $field; 370 370 371 return apply_filters( 'bp_get_the_profile_field_description', $field->desc );371 return apply_filters( 'bp_get_the_profile_field_description', $field->description ); 372 372 } 373 373 374 374 function bp_the_profile_field_input_name() {