BP_Messages_Sitewide_Notices_Widget::form( array $instance )

Render the settings form for Appearance > Widgets.

Description

See also

Parameters

$instance

(Required) See {@WP_Widget::form()}.

Return

(string|null) Widget form output.

Source

File: bp-messages/classes/class-bp-messages-sitewide-notices-widget.php

107
108
109
110
111
112
113
114
115
116
117
118
119
120
public function form( $instance ) {
    $instance = wp_parse_args( (array) $instance, array(
        'title' => '',
    ) );
 
    $title = strip_tags( $instance['title'] ); ?>
 
    <p>
        <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'buddyboss' ); ?></label>
        <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
    </p>
 
    <?php
}

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.