WordPress.org

Making WordPress.org

Changeset 8201


Ignore:
Timestamp:
02/05/2019 12:48:02 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Support Forums: Bump the topics per page setting to 30 for better discoverability.

Previously, the value was manually adjusted for English forums. This change makes sure the same value is used on Rosetta forums.

See #2480.

File:
1 edited

Legend:

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

    r8168 r8201  
    99    public function __construct() {
    1010        // Basic behavior filters and actions.
    11         add_filter( 'bbp_get_forum_pagination_count', '__return_empty_string' );
    12         add_filter( 'bbp_get_form_topic_subscribed',  array( $this, 'check_topic_subscription_checkbox' ) );
    13         add_action( 'pre_get_posts',                  array( $this, 'hide_non_public_forums' ) );
    14         add_filter( 'pre_option__bbp_edit_lock',      array( $this, 'increase_edit_lock_time' ) );
    15         add_filter( 'bbp_map_meta_caps',              array( $this, 'disallow_editing_past_lock_time' ), 10, 4 );
    16         add_filter( 'redirect_canonical',             array( $this, 'disable_redirect_guess_404_permalink' ) );
    17         add_action( 'template_redirect',              array( $this, 'redirect_update_php_page' ) );
    18         add_filter( 'wp_insert_post_data',            array( $this, 'set_post_date_gmt_for_pending_posts' ) );
    19         add_action( 'wp_print_footer_scripts',        array( $this, 'replace_quicktags_blockquote_button' ) );
     11        add_filter( 'bbp_get_forum_pagination_count',  '__return_empty_string' );
     12        add_filter( 'bbp_get_form_topic_subscribed',   array( $this, 'check_topic_subscription_checkbox' ) );
     13        add_action( 'pre_get_posts',                   array( $this, 'hide_non_public_forums' ) );
     14        add_filter( 'pre_option__bbp_edit_lock',       array( $this, 'increase_edit_lock_time' ) );
     15        add_filter( 'pre_option__bbp_topics_per_page', array( $this, 'increase_topics_per_page' ) );
     16        add_filter( 'bbp_map_meta_caps',               array( $this, 'disallow_editing_past_lock_time' ), 10, 4 );
     17        add_filter( 'redirect_canonical',              array( $this, 'disable_redirect_guess_404_permalink' ) );
     18        add_action( 'template_redirect',               array( $this, 'redirect_update_php_page' ) );
     19        add_filter( 'wp_insert_post_data',             array( $this, 'set_post_date_gmt_for_pending_posts' ) );
     20        add_action( 'wp_print_footer_scripts',         array( $this, 'replace_quicktags_blockquote_button' ) );
    2021
    2122        // Link to create new topics atop topic list.
     
    123124    public function increase_edit_lock_time() {
    124125        return 60;
     126    }
     127
     128    /**
     129     * Increase bbPress' default topics per page setting from 15 to 30.
     130     *
     131     * @return int Filtered topics per page setting.
     132     */
     133    public function increase_topics_per_page() {
     134        return 30;
    125135    }
    126136
Note: See TracChangeset for help on using the changeset viewer.