Ticket #1976: 1976.diff
File 1976.diff, 1.5 KB (added by , 6 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
8 8 // Basic behavior filters and actions. 9 9 add_filter( 'bbp_get_forum_pagination_count', '__return_empty_string' ); 10 10 11 // Display-related filters and actions.12 add_filter( 'bbp_get_topic_admin_links', array( $this, 'get_admin_links' ), 10, 3 );13 add_filter( 'bbp_get_reply_admin_links', array( $this, 'get_admin_links' ), 10, 3 );14 15 11 // oEmbed. 16 12 add_filter( 'oembed_discovery_links', array( $this, 'disable_oembed_discovery_links' ) ); 17 13 add_filter( 'oembed_response_data', array( $this, 'disable_oembed_response_data' ), 10, 2 ); … … 20 16 } 21 17 22 18 /** 23 * Remove "Trash" from admin links. Trashing a topic or reply will eventually24 * permanently delete it when the trash is emptied. Better to mark it as25 * pending or spam.26 */27 public function get_admin_links( $retval, $r, $args ) {28 unset( $r['links']['trash'] );29 30 $links = implode( $r['sep'], array_filter( $r['links'] ) );31 $retval = $r['before'] . $links . $r['after'];32 33 return $retval;34 }35 36 /**37 19 * Removes oEmbed discovery links for bbPress' post types. 38 20 * 39 21 * @param string $output HTML of the discovery links.