Skip to:
Content

bbPress.org

Changeset 6694


Ignore:
Timestamp:
09/13/2017 05:41:30 PM (6 years ago)
Author:
johnjamesjacoby
Message:

Options: set default database version to 0.

This change avoids race conditions with the updater when no version exists in the database. This would cause the database version to not be bumped, resulting in rewrite rules being needlessly flushed on each visit to wp-admin.

(Also tweak some nearby array values to make them easier to read.)

File:
1 edited

Legend:

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

    r6642 r6694  
    2222function bbp_get_default_options() {
    2323
     24    // Use the participant role for the default-default role
     25    $role = bbp_get_participant_role();
     26
    2427    // Filter & return
    2528    return (array) apply_filters( 'bbp_get_default_options', array(
     
    2730        /** DB Version ********************************************************/
    2831
    29         '_bbp_db_version'           => bbpress()->db_version,
     32        '_bbp_db_version'             => 0,         // Database version
    3033
    3134        /** Settings **********************************************************/
    3235
    33         '_bbp_edit_lock'              => 5,                          // Lock post editing after 5 minutes
    34         '_bbp_throttle_time'          => 10,                         // Throttle post time to 10 seconds
    35         '_bbp_enable_favorites'       => 1,                          // Favorites
    36         '_bbp_enable_subscriptions'   => 1,                          // Subscriptions
    37         '_bbp_enable_engagements'     => 1,                          // Engagements
    38         '_bbp_allow_content_edit'     => 1,                          // Allow content edit
    39         '_bbp_allow_content_throttle' => 1,                          // Allow content throttle
    40         '_bbp_allow_anonymous'        => 0,                          // Allow anonymous posting
    41         '_bbp_allow_global_access'    => 1,                          // Users from all sites can post
    42         '_bbp_allow_revisions'        => 1,                          // Allow revisions
    43         '_bbp_allow_topic_tags'       => 1,                          // Allow topic tagging
    44         '_bbp_allow_forum_mods'       => 1,                          // Allow per-forum moderation
    45         '_bbp_allow_super_mods'       => 0,                          // Allow mods to edit users
    46         '_bbp_allow_threaded_replies' => 0,                          // Allow threaded replies
    47         '_bbp_allow_search'           => 1,                          // Allow forum-wide search
    48         '_bbp_thread_replies_depth'   => 2,                          // Thread replies depth
    49         '_bbp_use_wp_editor'          => 1,                          // Use the WordPress editor if available
    50         '_bbp_use_autoembed'          => 0,                          // Allow oEmbed in topics and replies
    51         '_bbp_theme_package_id'       => 'default',                  // The ID for the current theme package
    52         '_bbp_default_role'           => bbp_get_participant_role(), // Default forums role
    53         '_bbp_settings_integration'   => 'basic',                    // How to integrate into wp-admin
     36        '_bbp_edit_lock'              => 5,         // Lock post editing after 5 minutes
     37        '_bbp_throttle_time'          => 10,        // Throttle post time to 10 seconds
     38        '_bbp_enable_favorites'       => 1,         // Favorites
     39        '_bbp_enable_subscriptions'   => 1,         // Subscriptions
     40        '_bbp_enable_engagements'     => 1,         // Engagements
     41        '_bbp_allow_content_edit'     => 1,         // Allow content edit
     42        '_bbp_allow_content_throttle' => 1,         // Allow content throttle
     43        '_bbp_allow_anonymous'        => 0,         // Allow anonymous posting
     44        '_bbp_allow_global_access'    => 1,         // Users from all sites can post
     45        '_bbp_allow_revisions'        => 1,         // Allow revisions
     46        '_bbp_allow_topic_tags'       => 1,         // Allow topic tagging
     47        '_bbp_allow_forum_mods'       => 1,         // Allow per-forum moderation
     48        '_bbp_allow_super_mods'       => 0,         // Allow mods to edit users
     49        '_bbp_allow_threaded_replies' => 0,         // Allow threaded replies
     50        '_bbp_allow_search'           => 1,         // Allow forum-wide search
     51        '_bbp_thread_replies_depth'   => 2,         // Thread replies depth
     52        '_bbp_use_wp_editor'          => 1,         // Use the WordPress editor if available
     53        '_bbp_use_autoembed'          => 0,         // Allow oEmbed in topics and replies
     54        '_bbp_theme_package_id'       => 'default', // The ID for the current theme package
     55        '_bbp_default_role'           => $role,    // Default forums role
     56        '_bbp_settings_integration'   => 'basic',   // How to integrate into wp-admin
    5457
    5558        /** Per Page **********************************************************/
Note: See TracChangeset for help on using the changeset viewer.