Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/28/2011 10:15:30 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Add filter to 'allowed_themes' to force the 'bbp-twentyten' theme to appear, even if not explicitly enabled via the network theme interface.

File:
1 edited

Legend:

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

    r2926 r2944  
    287287bbp_pre_anonymous_filters();
    288288
     289/**
     290 * On multiblog installations you must first allow themes to be activated and show
     291 * up on the theme selection screen. This function will let the bbPress bundled
     292 * themes show up and bypass this step.
     293 *
     294 * @since bbPress (r2944)
     295 *
     296 * @uses is_super_admin()
     297 * @uses apply_filters()
     298 */
     299function bbp_allowed_themes( $themes ) {
     300    if ( !is_super_admin() )
     301        return $themes;
     302
     303    $themes['bbp-twentyten'] = 1;
     304
     305    return apply_filters( 'bbp_allowed_themes', $themes );
     306}
     307add_filter( 'allowed_themes', 'bbp_allowed_themes' );
     308
    289309?>
Note: See TracChangeset for help on using the changeset viewer.