Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/26/2017 07:25:15 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Engagements: Allow engagements to be toggled on/off, for forums that have not run the upgrade routine yet.

Also missed a spot in the BuddyPress integration.

See #3068.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/settings.php

    r6320 r6321  
    156156            ),
    157157
     158            // Allow engagements setting
     159            '_bbp_enable_engagements' => array(
     160                'title'             => __( 'Engagements', 'bbpress' ),
     161                'callback'          => 'bbp_admin_setting_callback_engagements',
     162                'sanitize_callback' => 'intval',
     163                'args'              => array()
     164            ),
     165
    158166            // Allow topic tags
    159167            '_bbp_allow_topic_tags' => array(
     
    602610    <input name="_bbp_enable_subscriptions" id="_bbp_enable_subscriptions" type="checkbox" value="1" <?php checked( bbp_is_subscriptions_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_subscriptions' ); ?> />
    603611    <label for="_bbp_enable_subscriptions"><?php esc_html_e( 'Allow users to subscribe to forums and topics', 'bbpress' ); ?></label>
     612
     613<?php
     614}
     615
     616/**
     617 * Allow engagements setting field
     618 *
     619 * @since 2.0.0 bbPress (r2737)
     620 *
     621 * @uses checked() To display the checked attribute
     622 */
     623function bbp_admin_setting_callback_engagements() {
     624?>
     625
     626    <input name="_bbp_enable_engagements" id="_bbp_enable_engagements" type="checkbox" value="1" <?php checked( bbp_is_engagements_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_engagements' ); ?> />
     627    <label for="_bbp_enable_engagements"><?php esc_html_e( 'Track topics each user engages in', 'bbpress' ); ?></label>
    604628
    605629<?php
Note: See TracChangeset for help on using the changeset viewer.