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/admin/classes/class-bbp-topic-replies-list-table.php +22 -29 trunk → 2.6.19 View file →
@@ -17,9 +17,9 @@
17 17 }
18 18
19 19 if ( class_exists( 'WP_List_Table' ) ) :
20 20 /**
21 - * Topic replies list table.
21 + * Topic replies list table
22 22 *
23 23 * This list table is responsible for showing the replies to a topic in a
24 24 * meta-box, similar to comments in posts and pages.
25 25 *
@@ -27,9 +27,9 @@
27 27 */
28 28 class BBP_Topic_Replies_List_Table extends WP_List_Table {
29 29
30 30 /**
31 - * The main constructor method.
31 + * The main constructor method
32 32 *
33 33 * @since 2.6.0 bbPress (r5886)
34 34 */
35 35 public function __construct( $args = array() ) {
@@ -49,9 +49,9 @@
49 49 parent::__construct( $args );
50 50 }
51 51
52 52 /**
53 - * Setup the list-table columns.
53 + * Setup the list-table columns
54 54 *
55 55 * @since 2.6.0 bbPress (r5886)
56 56 *
57 57 * @see WP_List_Table::::single_row_columns()
@@ -67,13 +67,13 @@
67 67 );
68 68 }
69 69
70 70 /**
71 - * Allow `bbp_reply_created` to be sortable.
71 + * Allow `bbp_reply_created` to be sortable
72 72 *
73 73 * @since 2.6.0 bbPress (r5886)
74 74 *
75 - * @return array An associative array containing the `bbp_reply_created` column.
75 + * @return array An associative array containing the `bbp_reply_created` column
76 76 */
77 77 public function get_sortable_columns() {
78 78 return array(
79 79 'bbp_reply_created' => array( 'bbp_reply_created', false )
@@ -80,32 +80,27 @@
80 80 );
81 81 }
82 82
83 83 /**
84 - * Setup the bulk actions.
84 + * Setup the bulk actions
85 85 *
86 86 * @since 2.6.0 bbPress (r5886)
87 87 *
88 - * @return array An associative array containing all the bulk actions.
88 + * @return array An associative array containing all the bulk actions
89 89 */
90 90 public function get_bulk_actions() {
91 + return array();
91 92
92 - // Default bulk actions
93 - $retval = array(
93 + // @todo cap checks
94 + return array(
94 95 'unapprove' => esc_html__( 'Unapprove', 'bbpress' ),
95 96 'spam' => esc_html__( 'Spam', 'bbpress' ),
96 97 'trash' => esc_html__( 'Trash', 'bbpress' )
97 98 );
98 -
99 - // Override to empty
100 - $retval = array();
101 -
102 - // Return
103 - return $retval;
104 99 }
105 100
106 101 /**
107 - * Output the check-box column for bulk actions (if we implement them).
102 + * Output the check-box column for bulk actions (if we implement them)
108 103 *
109 104 * @since 2.6.0 bbPress (r5886)
110 105 */
111 106 public function column_cb( $item = '' ) {
@@ -116,9 +111,9 @@
116 111 );
117 112 }
118 113
119 114 /**
120 - * Output the contents of the `bbp_topic_reply_author` column.
115 + * Output the contents of the `bbp_topic_reply_author` column
121 116 *
122 117 * @since 2.6.0 bbPress (r5886)
123 118 */
124 119 public function column_bbp_topic_reply_author( $item = '' ) {
@@ -130,9 +125,9 @@
130 125 bbp_author_ip( array( 'post_id' => $item->ID ) );
131 126 }
132 127
133 128 /**
134 - * Output the contents of the `bbp_reply_created` column.
129 + * Output the contents of the `bbp_reply_created` column
135 130 *
136 131 * @since 2.6.0 bbPress (r5886)
137 132 */
138 133 public function column_bbp_reply_created( $item = '' ) {
@@ -142,9 +137,9 @@
142 137 );
143 138 }
144 139
145 140 /**
146 - * Output the contents of the `bbp_reply_content` column.
141 + * Output the contents of the `bbp_reply_content` column
147 142 *
148 143 * @since 2.6.0 bbPress (r5886)
149 144 */
150 145 public function column_bbp_reply_content( $item = '' ) {
@@ -168,9 +163,9 @@
168 163 return $reply_content . $reply_actions;
169 164 }
170 165
171 166 /**
172 - * Handle bulk action requests.
167 + * Handle bulk action requests
173 168 *
174 169 * @since 2.6.0 bbPress (r5886)
175 170 */
176 171 public function process_bulk_action() {
@@ -184,9 +179,9 @@
184 179 }
185 180 }
186 181
187 182 /**
188 - * Prepare the list-table items for display.
183 + * Prepare the list-table items for display
189 184 *
190 185 * @since 2.6.0 bbPress (r5886)
191 186 */
192 187 public function prepare_items( $topic_id = 0 ) {
@@ -254,9 +249,9 @@
254 249 );
255 250 }
256 251
257 252 /**
258 - * Message to be displayed when there are no items.
253 + * Message to be displayed when there are no items
259 254 *
260 255 * @since 2.6.0 bbPress (r5930)
261 256 */
262 257 public function no_items() {
@@ -263,9 +258,9 @@
263 258 esc_html_e( 'No replies to this topic.', 'bbpress' );
264 259 }
265 260
266 261 /**
267 - * Display the list table.
262 + * Display the list table
268 263 *
269 264 * This custom method is necessary because the one in `WP_List_Table` comes
270 265 * with a nonce and check that we do not need.
271 266 *
@@ -300,9 +295,9 @@
300 295 $this->display_tablenav( 'bottom' );
301 296 }
302 297
303 298 /**
304 - * Generate the table navigation above or below the table.
299 + * Generate the table navigation above or below the table
305 300 *
306 301 * This custom method is necessary because the one in `WP_List_Table` comes
307 302 * with a nonce and check that we do not need.
308 303 *
@@ -324,21 +319,19 @@
324 319 <?php
325 320 }
326 321
327 322 /**
328 - * Generates content for a single row of the table.
323 + * Generates content for a single row of the table
329 324 *
330 325 * @since 2.6.0 bbPress (r6546)
331 326 * @access public
332 327 *
333 - * @param object $item The current item.
328 + * @param object $item The current item
334 329 */
335 330 public function single_row( $item ) {
336 331
337 332 // Author
338 - $classes = 'author-' . ( get_current_user_id() === (int) $item->post_author
339 - ? 'self'
340 - : 'other' );
333 + $classes = 'author-' . ( get_current_user_id() == $item->post_author ? 'self' : 'other' );
341 334
342 335 // Locked
343 336 if ( wp_check_post_lock( $item->ID ) ) {
344 337 $classes .= ' wp-locked';