Making WordPress.org

Ticket #1976: 1976.diff

File 1976.diff, 1.5 KB (added by netweb, 6 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

     
    88                // Basic behavior filters and actions.
    99                add_filter( 'bbp_get_forum_pagination_count', '__return_empty_string' );
    1010
    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 
    1511                // oEmbed.
    1612                add_filter( 'oembed_discovery_links', array( $this, 'disable_oembed_discovery_links' ) );
    1713                add_filter( 'oembed_response_data', array( $this, 'disable_oembed_response_data' ), 10, 2 );
     
    2016        }
    2117
    2218        /**
    23          * Remove "Trash" from admin links. Trashing a topic or reply will eventually
    24          * permanently delete it when the trash is emptied. Better to mark it as
    25          * 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         /**
    3719         * Removes oEmbed discovery links for bbPress' post types.
    3820         *
    3921         * @param string $output HTML of the discovery links.