Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/20/2012 10:53:38 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Topic Tags:

  • First pass to allow topic tags to be globally disabled.
  • Handles toggling the UI in template parts and admin area.
  • Props jaredatch.
  • Fixes #1806.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-core-options.php

    r4067 r4098  
    3434        '_bbp_enable_favorites'     => 1,           // Favorites
    3535        '_bbp_enable_subscriptions' => 1,           // Subscriptions
     36        '_bbp_allow_topic_tags'     => 1,           // Topic Tags
    3637        '_bbp_allow_anonymous'      => 0,           // Allow anonymous posting
    3738        '_bbp_allow_global_access'  => 0,           // Users from all sites can post
     
    203204function bbp_is_subscriptions_active( $default = 1 ) {
    204205    return (bool) apply_filters( 'bbp_is_subscriptions_active', (bool) get_option( '_bbp_enable_subscriptions', $default ) );
     206}
     207
     208/**
     209 * Are topic tags allowed
     210 *
     211 * @since bbPress (r4097)
     212 * @param $default bool Optional. Default value true
     213 * @uses get_option() To get the allow tags
     214 * @return bool Are tags allowed?
     215 */
     216function bbp_allow_topic_tags( $default = 1 ) {
     217    return (bool) apply_filters( 'bbp_allow_topic_tags', (bool) get_option( '_bbp_allow_topic_tags', $default ) );
    205218}
    206219
Note: See TracChangeset for help on using the changeset viewer.