Changeset 13494
- Timestamp:
- 06/01/2023 01:12:15 AM (2 years ago)
- Location:
- trunk/src/bp-xprofile/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php
r13484 r13494 1514 1514 */ 1515 1515 private function name_and_description() { 1516 // Set default values. 1517 $description = ''; 1518 $name = ''; 1519 1520 if ( $this->description ) { 1521 $description = $this->description; 1522 } 1523 1524 if ( $this->name ) { 1525 $name = $this->name; 1526 } 1516 1527 ?> 1517 1528 … … 1519 1530 <div class="titlewrap"> 1520 1531 <label id="title-prompt-text" for="title"><?php echo esc_html_x( 'Name (required)', 'XProfile admin edit field', 'buddypress' ); ?></label> 1521 <input type="text" name="title" id="title" value="<?php echo esc_attr( $ this->name ); ?>" autocomplete="off" />1532 <input type="text" name="title" id="title" value="<?php echo esc_attr( $name ); ?>" autocomplete="off" /> 1522 1533 </div> 1523 1534 </div> … … 1526 1537 <h2><?php echo esc_html_x( 'Description', 'XProfile admin edit field', 'buddypress' ); ?></h2> 1527 1538 <div class="inside"> 1528 <label for="description" class="screen-reader-text"><?php 1539 <label for="description" class="screen-reader-text"> 1540 <?php 1529 1541 /* translators: accessibility text */ 1530 1542 esc_html_e( 'Add description', 'buddypress' ); 1531 ?></label> 1532 <textarea name="description" id="description" rows="8" cols="60"><?php echo esc_textarea( $this->description ); ?></textarea> 1543 ?> 1544 </label> 1545 <textarea name="description" id="description" rows="8" cols="60"><?php echo esc_textarea( $description ); ?></textarea> 1533 1546 </div> 1534 1547 </div> -
trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php
r13475 r13494 466 466 * @since 5.0.0 467 467 * @since 11.0.0 `$profile_group_id` accepts an array of profile group ids. 468 * 468 * 469 469 * @global wpdb $wpdb WordPress database object. 470 470 * … … 525 525 * 526 526 * @since 5.0.0 527 * 527 * 528 528 * @global wpdb $wpdb WordPress database object. 529 529 * … … 619 619 * 620 620 * @since 2.0.0 621 * 621 * 622 622 * @global wpdb $wpdb WordPress database object. 623 623 * … … 791 791 * 792 792 * @since 1.6.0 793 * 793 * 794 794 * @global wpdb $wpdb WordPress database object. 795 795 * … … 850 850 // New field group. 851 851 if ( empty( $this->id ) ) { 852 $title = __( 'Add New Field Group', 'buddypress' ); 853 $button = __( 'Save', 'buddypress' ); 854 $action = add_query_arg( array( 855 'page' => 'bp-profile-setup', 856 'mode' => 'add_group', 857 ), $users_url ); 852 $title = __( 'Add New Field Group', 'buddypress' ); 853 $button = __( 'Save', 'buddypress' ); 854 $action = add_query_arg( 855 array( 856 'page' => 'bp-profile-setup', 857 'mode' => 'add_group', 858 ), 859 $users_url 860 ); 861 $description = ''; 858 862 859 863 // Existing field group. 860 864 } else { 861 $title = __( 'Edit Field Group', 'buddypress' ); 862 $button = __( 'Update', 'buddypress' ); 863 $action = add_query_arg( array( 864 'page' => 'bp-profile-setup', 865 'mode' => 'edit_group', 866 'group_id' => (int) $this->id, 867 ), $users_url ); 865 $title = __( 'Edit Field Group', 'buddypress' ); 866 $button = __( 'Update', 'buddypress' ); 867 $action = add_query_arg( 868 array( 869 'page' => 'bp-profile-setup', 870 'mode' => 'edit_group', 871 'group_id' => (int) $this->id, 872 ), 873 $users_url 874 ); 875 $description = $this->description; 868 876 869 877 if ( $this->can_delete ) { … … 903 911 <h2><?php esc_html_e( 'Field Group Description', 'buddypress' ); ?></h2> 904 912 <div class="inside"> 905 <label for="group_description" class="screen-reader-text"><?php 913 <label for="group_description" class="screen-reader-text"> 914 <?php 906 915 /* translators: accessibility text */ 907 916 esc_html_e( 'Add description', 'buddypress' ); 908 ?></label> 909 <textarea name="group_description" id="group_description" rows="8" cols="60"><?php echo esc_textarea( $this->description ); ?></textarea> 917 ?> 918 </label> 919 <textarea name="group_description" id="group_description" rows="8" cols="60"><?php echo esc_textarea( $description ); ?></textarea> 910 920 </div> 911 921 </div>
Note: See TracChangeset
for help on using the changeset viewer.