WordPress.org

Making WordPress.org

Changeset 8082


Ignore:
Timestamp:
01/15/2019 03:54:51 AM (8 months ago)
Author:
dd32
Message:

Forums: Remove the 'Popular' view as it wasn't operational and doesn't make sense to enable from a performance perspective.

Fixes #2532.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-performance-optimizations.php

    r8050 r8082  
    4545        // Disable canonical redirects for short post_names
    4646        add_filter( 'template_redirect', array( $this, 'maybe_disable_404_canonical' ), 9 );
     47
     48        // Disable the 'popular' view.
     49        add_filter( 'bbp_register_views', array( $this, 'disable_popular_view' ) );
    4750
    4851    }
     
    426429        return $bound_id;
    427430    }
     431
     432    /**
     433     * Deregister the 'popular' view as it doesn't make sense on the Global Forums from a performance perspective.
     434     */
     435    public function disable_popular_view() {
     436        bbp_deregister_view( 'popular' );
     437    }
    428438}
Note: See TracChangeset for help on using the changeset viewer.