Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/29/2017 08:02:13 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Settings: Add _allow_ settings for editing & flooding, and revise the verbiage.

This allows for flood checking & editing to be:

  • Completely disabled
  • Overridden via filters
  • Editing allowed forever
  • A bit more descriptive with additional context provided
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/options.php

    r6438 r6442  
    3636        '_bbp_enable_subscriptions'   => 1,                          // Subscriptions
    3737        '_bbp_enable_engagements'     => 1,                          // Engagements
     38        '_bbp_allow_content_edit'     => 1,                          // Allow content edit
     39        '_bbp_allow_content_throttle' => 1,                          // Allow content throttle
    3840        '_bbp_allow_anonymous'        => 0,                          // Allow anonymous posting
    3941        '_bbp_allow_global_access'    => 1,                          // Users from all sites can post
     
    252254
    253255/**
     256 * Is content editing available when posting new topics & replies?
     257 *
     258 * @since 2.6.0 bbPress (r6441)
     259 *
     260 * @param $default bool Optional. Default value false
     261 * @uses get_option() To get the global content edit option
     262 * @return bool Is content editing allowed?
     263 */
     264function bbp_allow_content_edit( $default = 1 ) {
     265
     266    // Filter & return
     267    return (bool) apply_filters( 'bbp_allow_content_edit', (bool) get_option( '_bbp_allow_content_edit', $default ) );
     268}
     269
     270/**
     271 * Is content throttling engaged when posting new topics & replies?
     272 *
     273 * @since 2.6.0 bbPress (r6441)
     274 *
     275 * @param $default bool Optional. Default value false
     276 * @uses get_option() To get the content throttle  option
     277 * @return bool Is content throttling allowed?
     278 */
     279function bbp_allow_content_throttle( $default = 1 ) {
     280
     281    // Filter & return
     282    return (bool) apply_filters( 'bbp_allow_content_throttle', (bool) get_option( '_bbp_allow_content_throttle', $default ) );
     283}
     284
     285/**
    254286 * Are topic tags allowed
    255287 *
Note: See TracChangeset for help on using the changeset viewer.