Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/10/2011 04:23:18 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Split apart bbp-functions.php into smaller, more manageable files. Also fix missing global on subscription removal. Props GautamGupta via Google Code-in

File:
1 edited

Legend:

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

    r2789 r2790  
    1717 *
    1818 * @uses add_option() Adds default options
     19 * @uses do_action() Calls 'bbp_add_options'
    1920 */
    2021function bbp_add_options() {
     
    8283}
    8384
     85/** Active? *******************************************************************/
     86
     87/**
     88 * Checks if favorites feature is enabled.
     89 *
     90 * @since bbPress (r2658)
     91 *
     92 * @uses get_option() To get the favorites option
     93 * @return bool Is favorites enabled or not
     94 */
     95function bbp_is_favorites_active() {
     96    return (bool) get_option( '_bbp_enable_favorites', true );
     97}
     98
     99/**
     100 * Checks if subscription feature is enabled.
     101 *
     102 * @since bbPress (r2658)
     103 *
     104 * @uses get_option() To get the subscriptions option
     105 * @return bool Is subscription enabled or not
     106 */
     107function bbp_is_subscriptions_active() {
     108    return (bool) get_option( '_bbp_enable_subscriptions' );
     109}
     110
     111/**
     112 * Is the anonymous posting allowed?
     113 *
     114 * @since bbPress (r2659)
     115 *
     116 * @uses get_option() To get the allow anonymous option
     117 * @return bool Is anonymous posting allowed?
     118 */
     119function bbp_allow_anonymous() {
     120    return apply_filters( 'bbp_allow_anonymous', get_option( '_bbp_allow_anonymous', false ) );
     121}
     122
    84123?>
Note: See TracChangeset for help on using the changeset viewer.