Changeset 7065 for trunk/bp-blogs/bp-blogs-widgets.php
- Timestamp:
- 05/15/2013 12:17:41 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-widgets.php
r7064 r7065 30 30 extract( $args ); 31 31 32 $ widget_name = apply_filters( 'widget_title', $widget_name);32 $title = ! empty( $instance['title'] ) ? $instance['title'] : __( 'Recent Networkwide Posts', 'buddypress' ); 33 33 34 34 echo $args['before_widget']; 35 echo $args['before_title'] . $widget_name. $args['after_title'];35 echo $args['before_title'] . esc_html( $title ) . $args['after_title']; 36 36 37 37 if ( empty( $instance['max_posts'] ) || !$instance['max_posts'] ) … … 77 77 function update( $new_instance, $old_instance ) { 78 78 $instance = $old_instance; 79 $instance['title'] = strip_tags( $new_instance['title'] ); 79 80 $instance['max_posts'] = strip_tags( $new_instance['max_posts'] ); 80 81 … … 83 84 84 85 function form( $instance ) { 85 $instance = wp_parse_args( (array) $instance, array( 'max_posts' => 10 ) ); 86 $instance = wp_parse_args( (array) $instance, array( 87 'title' => __( 'Recent Networkwide Posts', 'buddypress' ), 88 'max_posts' => 10, 89 ) ); 90 91 $title = strip_tags( $instance['title'] ); 86 92 $max_posts = strip_tags( $instance['max_posts'] ); 93 87 94 ?> 88 95 96 <p><label for="<?php echo $this->get_field_id( 'title' ) ?>"><?php _ex( 'Title:', 'Label for the Title field of the Recent Networkwide Posts widget', 'buddypress' ) ?> <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 ) ?>" style="width: 100%;" /></label></p> 89 97 <p><label for="bp-blogs-widget-posts-max"><?php _e('Max posts to show:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_posts' ); ?>" name="<?php echo $this->get_field_name( 'max_posts' ); ?>" type="text" value="<?php echo esc_attr( $max_posts ); ?>" style="width: 30%" /></label></p> 90 98 <?php
Note: See TracChangeset
for help on using the changeset viewer.