Changeset 5688 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
- Timestamp:
- 07/18/2017 10:31:15 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
r5677 r5688 37 37 add_filter( 'bbp_topic_admin_links', array( $this, 'admin_links' ), 10, 2 ); 38 38 add_filter( 'bbp_reply_admin_links', array( $this, 'admin_links' ), 10, 2 ); 39 40 // Adjust the list of row actions for topics and replies. 41 add_filter( 'post_row_actions', array( $this, 'row_actions' ), 11, 2 ); 39 42 40 43 // Add valid topic and reply actions. … … 353 356 * move less commonly used inline quick links to 'Topic Admin' sidebar section. 354 357 * 355 * @param array $r A dmin links array.358 * @param array $r An array of admin links. 356 359 * @param int $post_id Topic or reply ID. 357 * @return array Filtered admin links array.360 * @return array Filtered admin links. 358 361 */ 359 362 public function admin_links( $r, $post_id ) { … … 396 399 397 400 return $r; 401 } 402 403 /** 404 * Remove some unneeded or redundant row action links for topics and replies. 405 * 406 * @param array $actions An array of row action links. 407 * @param WP_Post $post The post object. 408 * @return array Filtered row actions links. 409 */ 410 public function row_actions( $actions, $post ) { 411 // Remove 'Trash' link. 412 unset( $actions['trash'] ); 413 414 // Remove 'Unapprove' link. 415 unset( $actions['unapproved'] ); 416 417 // Remove 'Stick' link for reviews. 418 if ( Plugin::REVIEWS_FORUM_ID == $post->post_parent ) { 419 unset( $actions['stick'] ); 420 } 421 422 423 return $actions; 398 424 } 399 425
Note: See TracChangeset
for help on using the changeset viewer.