Skip to:
Content

bbPress.org


Ignore:
Timestamp:
03/02/2008 07:04:36 AM (18 years ago)
Author:
sambauers
Message:

Make Bozo and Akismet plugins. Add bb-plugins directory in 0.8 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.8/bb-settings.php

    r1146 r1175  
    109109require( BBPATH . BBINC . 'deprecated.php');
    110110
    111 if ( defined('BB_DISABLE_BOZO_CHECKS') && !BB_DISABLE_BOZO_CHECKS )
    112     require( BBPATH . BBINC . 'bozo.php');
    113 
    114111require( BBPATH . BBINC . 'default-filters.php');
    115112require( BBPATH . BBINC . 'script-loader.php');
     
    122119    $bbdb->show_errors();
    123120}
    124 
    125 if ( bb_get_option( 'akismet_key' ) )
    126     require( BBPATH . BBINC . 'akismet.php');
    127121
    128122$_GET    = bb_global_sanitize($_GET   );
     
    164158if ( !defined('BBPLUGINURL') )
    165159    define('BBPLUGINURL', $bb->uri . 'my-plugins/');
     160if ( !defined('BBDEFAULTPLUGINDIR') )
     161    define('BBDEFAULTPLUGINDIR', BBPATH . 'bb-plugins/');
     162if ( !defined('BBDEFAULTPLUGINURL') )
     163    define('BBDEFAULTPLUGINURL', $bb->uri . 'bb-plugins/');
    166164if ( !defined('BBTHEMEDIR') )
    167165    define('BBTHEMEDIR', BBPATH . 'my-templates/');
     
    295293
    296294// Load Plugins
    297 if ( function_exists( 'glob' ) && is_callable( 'glob' ) && $_plugins_glob = glob(BBPLUGINDIR . '_*.php') )
     295
     296// Underscore plugins
     297if ( function_exists( 'glob' ) && is_callable( 'glob' ) ) {
     298    // First BBDEFAULTPLUGINDIR
     299    $_plugins_glob = glob(BBDEFAULTPLUGINDIR . '_*.php');
    298300    foreach ( $_plugins_glob as $_plugin )
    299301        require($_plugin);
    300 unset($_plugins_glob, $_plugin);
     302    unset($_plugins_glob, $_plugin);
     303   
     304    // Second BBPLUGINDIR, with no name clash testing
     305    $_plugins_glob = glob(BBPLUGINDIR . '_*.php');
     306    foreach ( $_plugins_glob as $_plugin )
     307        require($_plugin);
     308    unset($_plugins_glob, $_plugin);
     309}
    301310do_action( 'bb_underscore_plugins_loaded' );
    302311
     312// Plugins in BBPLUGINDIR take precedence over BBDEFAULTPLUGINDIR when names collide
    303313if ( $plugins = bb_get_option( 'active_plugins' ) )
    304314    foreach ( (array) $plugins as $plugin )
    305         if ( file_exists(BBPLUGINDIR . $plugin) )
     315        if ( file_exists(BBPLUGINDIR . $plugin) ) {
    306316            require( BBPLUGINDIR . $plugin );
     317        } elseif ( file_exists(BBDEFAULTPLUGINDIR . $plugin) ) {
     318            require( BBDEFAULTPLUGINDIR . $plugin );
     319        }
    307320do_action( 'bb_plugins_loaded' );
    308321unset($plugins, $plugin);
Note: See TracChangeset for help on using the changeset viewer.