This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BP_XProfile_Field::name_and_description()

Private method used to output field name and description fields.

Description

Source

File: bp-xprofile/classes/class-bp-xprofile-field.php

1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
private function name_and_description() {
    ?>
 
    <div id="titlediv">
        <div class="titlewrap">
            <label id="title-prompt-text"
                   for="title"><?php echo esc_html__( 'Name (required)', 'buddyboss' ); ?></label>
            <input type="text" name="title" id="title" value="<?php echo esc_attr( $this->name ); ?>"
                   autocomplete="off"/>
        </div>
    </div>
 
    <div class="postbox">
        <h2><?php echo esc_html__( 'Text members see when editing this profile field (optional)', 'buddyboss' ); ?></h2>
        <div class="inside">
            <?php
            /**
             * Alternate title for when user edits their profile field.
             * Reverts to primary title if nothing is entered.
             *
             * @since BuddyBoss 1.0.0
             */
            ?>
            <table class="widefat bp-postbox-table" style="margin-top: 6px;">
                <tbody>
                <tr>
                    <th><?php _e( 'Alternate Title', 'buddyboss' ); ?></th>
                    <td>
                        <input type="text" name="title_secondary" id="title_secondary"
                               value="<?php echo esc_attr( $this->get_alternate_name() ); ?>" autocomplete="off"
                               style="width: 100%;">
                        <p class="description"><?php _e( 'For example, "How old are you?" could be used instead of "Age".', 'buddyboss' ); ?></p>
                    </td>
                </tr>
                <tr>
                    <th><?php _e( 'Instructions', 'buddyboss' ); ?></th>
                    <td>
                        <textarea name="description" id="description" rows="6"
                                  cols="60"><?php echo esc_textarea( $this->description ); ?></textarea>
                        <p class="description"><?php _e( 'Explain to members how best to fill out this field.', 'buddyboss' ); ?></p>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
 
    <?php
}

Changelog

Changelog
Version Description
BuddyPress 2.3.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.