BP_Core_Follow_Following_Widget::form( $instance )
Widget settings form.
Description
Source
File: bp-core/classes/class-bp-core-follow-following-widget.php
function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'title' => __( "Users I'm Following", 'buddyboss' ), 'max_users' => 16 ) ); ?> <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( $instance['title'] ); ?>" /></p> <p><label for="bp-follow-widget-users-max"><?php _e('Max members to show:', 'buddyboss'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_users' ); ?>" name="<?php echo $this->get_field_name( 'max_users' ); ?>" type="text" value="<?php echo esc_attr( (int) $instance['max_users'] ); ?>" style="width: 30%" /></label></p> <p><small><?php _e( 'Note: This widget is only displayed if a member is logged in and if the logged-in user is following some users.', 'buddyboss' ); ?></small></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.