Making WordPress.org

Changeset 5134


Ignore:
Timestamp:
03/08/2017 08:38:55 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Increase edit lock time from 5 minutes to 1 hour.

This ensures that Rosetta forums have the same edit lock value as the main support forums.

Fixes #2121.

File:
1 edited

Legend:

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

    r5091 r5134  
    99        add_filter( 'bbp_get_forum_pagination_count', '__return_empty_string' );
    1010        add_action( 'pre_get_posts', array( $this, 'hide_non_public_forums' ) );
     11        add_filter( 'pre_option__bbp_edit_lock', array( $this, 'increase_edit_lock_time' ) );
    1112
    1213        // Display-related filters and actions.
     
    6364            $query->set( 'post_status', 'publish' );
    6465        }
     66    }
     67
     68    /**
     69     * Increase bbPress' default edit lock time from 5 minutes to 1 hour.
     70     *
     71     * @return int Filtered edit lock time.
     72     */
     73    function increase_edit_lock_time() {
     74        return 60;
    6575    }
    6676
Note: See TracChangeset for help on using the changeset viewer.