Changeset 7067
- Timestamp:
- 05/15/2013 12:17:48 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-widgets.php
r7066 r7067 20 20 add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' ); 21 21 22 /** 23 * The Recent Networkwide Posts widget 24 */ 22 25 class BP_Blogs_Recent_Posts_Widget extends WP_Widget { 23 26 24 27 function __construct() { 25 parent::__construct( false, $name = _x( '(BuddyPress) Recent Networkwide Posts', 'widget name', 'buddypress' ) ); 28 $widget_ops = array( 29 'description' => __( 'A list of recently published posts from across your network.', 'buddypress' ), 30 'classname' => 'widget_bp_blogs_widget buddypress', 31 ); 32 parent::__construct( false, $name = _x( '(BuddyPress) Recent Networkwide Posts', 'widget name', 'buddypress' ), $widget_ops ); 26 33 } 27 34 28 function widget( $args, $instance) {35 function widget( $args, $instance ) { 29 36 30 37 $title = ! empty( $instance['title'] ) ? esc_html( $instance['title'] ) : __( 'Recent Networkwide Posts', 'buddypress' ); … … 101 108 <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> 102 109 <p><label for="<?php echo $this->get_field_id( 'link_title' ) ?>"><input type="checkbox" name="<?php echo $this->get_field_name( 'link_title' ) ?>" value="1" <?php checked( $link_title ) ?> /> <?php _e( 'Link widget title to Blogs directory', 'buddypress' ) ?></label></p> 103 <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>104 <?php110 <p><label for="<?php echo $this->get_field_id( 'max_posts' ) ?>"><?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> 111 <?php 105 112 } 106 113 }
Note: See TracChangeset
for help on using the changeset viewer.