PluginProbe
bbPress / 2.6.19
bbPress v2.6.19
2.6.19 2.6.18 2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 All 74 releases
← All changes | includes/common/widgets.php +32 -26 2.6.18 → 2.6.19 View file →
@@ -25,9 +25,9 @@
25 25 * bbPress Login Widget
26 26 *
27 27 * Registers the login widget
28 28 *
29 - * @since 2.0.0 bbPress (r2827)
29 + * @since 2.1.0 bbPress (r3825)
30 30 */
31 31 public function __construct() {
32 32 $widget_ops = apply_filters(
33 33 'bbp_login_widget_options',
@@ -43,9 +43,9 @@
43 43
44 44 /**
45 45 * Register the widget
46 46 *
47 - * @since 2.0.0 bbPress (r3389)
47 + * @since 2.0.0 bbPress (r3391)
48 48 */
49 49 public static function register_widget() {
50 50 register_widget( 'BBP_Login_Widget' );
51 51 }
@@ -89,9 +89,9 @@
89 89 </div>
90 90
91 91 <div class="bbp-password">
92 92 <label for="user_pass"><?php esc_html_e( 'Password', 'bbpress' ); ?>: </label>
93 - <input type="password" name="pwd" value="<?php bbp_sanitize_val( 'user_pass', 'password' ); ?>" size="20" id="user_pass" autocomplete="off" />
93 + <input type="password" name="pwd" value="" size="20" id="user_pass" autocomplete="off" />
94 94 </div>
95 95
96 96 <div class="bbp-remember-me">
97 97 <input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ) ); ?> id="rememberme" />
@@ -194,9 +194,9 @@
194 194
195 195 /**
196 196 * Merge the widget settings into defaults array.
197 197 *
198 - * @since 2.3.0 bbPress (r4802)
198 + * @since 2.3.0 bbPress (r4806)
199 199 *
200 200 * @param $instance Instance
201 201 */
202 202 public function parse_settings( $instance = array() ) {
@@ -225,9 +225,9 @@
225 225 * bbPress View Widget
226 226 *
227 227 * Registers the view widget
228 228 *
229 - * @since 2.0.0 bbPress (r3020)
229 + * @since 2.1.0 bbPress (r3825)
230 230 */
231 231 public function __construct() {
232 232 $widget_ops = apply_filters(
233 233 'bbp_views_widget_options',
@@ -243,9 +243,9 @@
243 243
244 244 /**
245 245 * Register the widget
246 246 *
247 - * @since 2.0.0 bbPress (r3389)
247 + * @since 2.0.0 bbPress (r3391)
248 248 */
249 249 public static function register_widget() {
250 250 register_widget( 'BBP_Views_Widget' );
251 251 }
@@ -337,9 +337,9 @@
337 337
338 338 /**
339 339 * Merge the widget settings into defaults array.
340 340 *
341 - * @since 2.3.0 bbPress (r4802)
341 + * @since 2.3.0 bbPress (r4806)
342 342 *
343 343 * @param $instance Instance
344 344 */
345 345 public function parse_settings( $instance = array() ) {
@@ -461,9 +461,9 @@
461 461
462 462 /**
463 463 * Merge the widget settings into defaults array.
464 464 *
465 - * @since 2.3.0 bbPress (r4802)
465 + * @since 2.3.0 bbPress (r4806)
466 466 *
467 467 * @param $instance Instance
468 468 */
469 469 public function parse_settings( $instance = array() ) {
@@ -490,9 +490,9 @@
490 490 * bbPress Forum Widget
491 491 *
492 492 * Registers the forum widget
493 493 *
494 - * @since 2.0.0 bbPress (r2653)
494 + * @since 2.1.0 bbPress (r3825)
495 495 */
496 496 public function __construct() {
497 497 $widget_ops = apply_filters(
498 498 'bbp_forums_widget_options',
@@ -508,9 +508,9 @@
508 508
509 509 /**
510 510 * Register the widget
511 511 *
512 - * @since 2.0.0 bbPress (r3389)
512 + * @since 2.0.0 bbPress (r3391)
513 513 */
514 514 public static function register_widget() {
515 515 register_widget( 'BBP_Forums_Widget' );
516 516 }
@@ -644,9 +644,9 @@
644 644
645 645 /**
646 646 * Merge the widget settings into defaults array.
647 647 *
648 - * @since 2.3.0 bbPress (r4802)
648 + * @since 2.3.0 bbPress (r4806)
649 649 *
650 650 * @param $instance Instance
651 651 */
652 652 public function parse_settings( $instance = array() ) {
@@ -674,9 +674,9 @@
674 674 * bbPress Topic Widget
675 675 *
676 676 * Registers the topic widget
677 677 *
678 - * @since 2.0.0 bbPress (r2653)
678 + * @since 2.1.0 bbPress (r3825)
679 679 */
680 680 public function __construct() {
681 681 $widget_ops = apply_filters(
682 682 'bbp_topics_widget_options',
@@ -692,9 +692,9 @@
692 692
693 693 /**
694 694 * Register the widget
695 695 *
696 - * @since 2.0.0 bbPress (r3389)
696 + * @since 2.0.0 bbPress (r3391)
697 697 */
698 698 public static function register_widget() {
699 699 register_widget( 'BBP_Topics_Widget' );
700 700 }
@@ -949,9 +949,9 @@
949 949
950 950 /**
951 951 * Merge the widget settings into defaults array.
952 952 *
953 - * @since 2.3.0 bbPress (r4802)
953 + * @since 2.3.0 bbPress (r4806)
954 954 *
955 955 * @param $instance Instance
956 956 */
957 957 public function parse_settings( $instance = array() ) {
@@ -974,9 +974,9 @@
974 974 * bbPress Statistics Widget
975 975 *
976 976 * Adds a widget which displays the forum statistics
977 977 *
978 - * @since 2.3.0 bbPress (r4509)
978 + * @since 2.3.0 bbPress (r4510)
979 979 */
980 980 class BBP_Stats_Widget extends WP_Widget {
981 981
982 982 /**
@@ -983,9 +983,9 @@
983 983 * bbPress Statistics Widget
984 984 *
985 985 * Registers the statistics widget
986 986 *
987 - * @since 2.3.0 bbPress (r4509)
987 + * @since 2.3.0 bbPress (r4510)
988 988 */
989 989 public function __construct() {
990 990 $widget_ops = apply_filters(
991 991 'bbp_stats_widget_options',
@@ -1001,9 +1001,9 @@
1001 1001
1002 1002 /**
1003 1003 * Register the widget
1004 1004 *
1005 - * @since 2.3.0 bbPress (r4509)
1005 + * @since 2.3.0 bbPress (r4510)
1006 1006 */
1007 1007 public static function register_widget() {
1008 1008 register_widget( 'BBP_Stats_Widget' );
1009 1009 }
@@ -1010,9 +1010,9 @@
1010 1010
1011 1011 /**
1012 1012 * Displays the output, the statistics
1013 1013 *
1014 - * @since 2.3.0 bbPress (r4509)
1014 + * @since 2.3.0 bbPress (r4510)
1015 1015 *
1016 1016 * @param array $args Arguments
1017 1017 * @param array $instance Instance
1018 1018 */
@@ -1040,9 +1040,9 @@
1040 1040
1041 1041 /**
1042 1042 * Update the statistics widget options
1043 1043 *
1044 - * @since 2.3.0 bbPress (r4509)
1044 + * @since 2.3.0 bbPress (r4510)
1045 1045 *
1046 1046 * @param array $new_instance The new instance options
1047 1047 * @param array $old_instance The old instance options
1048 1048 *
@@ -1057,9 +1057,9 @@
1057 1057
1058 1058 /**
1059 1059 * Output the statistics widget options form
1060 1060 *
1061 - * @since 2.3.0 bbPress (r4509)
1061 + * @since 2.3.0 bbPress (r4510)
1062 1062 *
1063 1063 * @param $instance
1064 1064 *
1065 1065 * @return string|void
@@ -1080,9 +1080,9 @@
1080 1080
1081 1081 /**
1082 1082 * Merge the widget settings into defaults array.
1083 1083 *
1084 - * @since 2.3.0 bbPress (r4802)
1084 + * @since 2.3.0 bbPress (r4806)
1085 1085 *
1086 1086 * @param $instance Instance
1087 1087 */
1088 1088 public function parse_settings( $instance = array() ) {
@@ -1109,9 +1109,9 @@
1109 1109 * bbPress Replies Widget
1110 1110 *
1111 1111 * Registers the replies widget
1112 1112 *
1113 - * @since 2.0.0 bbPress (r2653)
1113 + * @since 2.1.0 bbPress (r3825)
1114 1114 */
1115 1115 public function __construct() {
1116 1116 $widget_ops = apply_filters(
1117 1117 'bbp_replies_widget_options',
@@ -1127,9 +1127,9 @@
1127 1127
1128 1128 /**
1129 1129 * Register the widget
1130 1130 *
1131 - * @since 2.0.0 bbPress (r3389)
1131 + * @since 2.0.0 bbPress (r3391)
1132 1132 */
1133 1133 public static function register_widget() {
1134 1134 register_widget( 'BBP_Replies_Widget' );
1135 1135 }
@@ -1188,16 +1188,22 @@
1188 1188 <ul class="bbp-replies-widget">
1189 1189
1190 1190 <?php while ( $widget_query->have_posts() ) :
1191 1191
1192 - $widget_query->the_post(); ?>
1192 + $widget_query->the_post();
1193 + $reply_id = bbp_get_reply_id( $widget_query->post->ID );
1194 + $topic_id = bbp_get_reply_topic_id( $reply_id );
1193 1195
1196 + // Skip replies whose topic is not visible to the current user.
1197 + if ( ! bbp_is_topic_public( $topic_id ) && ! current_user_can( 'read_topic', $topic_id ) ) {
1198 + continue;
1199 + } ?>
1200 +
1194 1201 <li>
1195 1202
1196 1203 <?php
1197 1204
1198 1205 // Verify the reply ID
1199 - $reply_id = bbp_get_reply_id( $widget_query->post->ID );
1200 1206 $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . esc_html( bbp_get_reply_topic_title( $reply_id ) ) . '</a>';
1201 1207 $time = get_the_time( 'U', $reply_id );
1202 1208 $show_date = '<time datetime="' . gmdate( 'Y-m-d H:i:s', $time ) . '">' . esc_html( bbp_get_time_since( $time ) ) . '</time>';
1203 1209
@@ -1300,9 +1306,9 @@
1300 1306
1301 1307 /**
1302 1308 * Merge the widget settings into defaults array.
1303 1309 *
1304 - * @since 2.3.0 bbPress (r4802)
1310 + * @since 2.3.0 bbPress (r4806)
1305 1311 *
1306 1312 * @param $instance Instance
1307 1313 */
1308 1314 public function parse_settings( $instance = array() ) {