Changeset 1185
- Timestamp:
- 03/02/2008 10:57:25 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
bb-admin/admin-functions.php (modified) (1 diff)
-
bb-admin/plugins.php (modified) (2 diffs)
-
bb-admin/themes.php (modified) (3 diffs)
-
bb-includes/functions.php (modified) (1 diff)
-
bb-includes/template-functions.php (modified) (3 diffs)
-
bb-settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/admin-functions.php
r1174 r1185 767 767 768 768 function bb_get_plugins() { 769 $dir = new BB_Dir_Map( BB DEFAULTPLUGINDIR, array(769 $dir = new BB_Dir_Map( BB_CORE_PLUGIN_DIR, array( 770 770 'callback' => 'bb_get_plugins_callback', 771 771 'recurse' => 1 -
trunk/bb-admin/plugins.php
r1174 r1185 5 5 $_plugins = array(); 6 6 if ( function_exists( 'glob' ) && is_callable( 'glob' ) ) { 7 $_plugins_glob = glob(BB DEFAULTPLUGINDIR . '_*.php');7 $_plugins_glob = glob(BB_CORE_PLUGIN_DIR . '_*.php'); 8 8 foreach ( $_plugins_glob as $_plugin ) { 9 9 $_data = bb_get_plugin_data( $_plugin ); … … 25 25 $update = false; 26 26 foreach ( $current as $c => $cur ) 27 if ( !file_exists(BBPLUGINDIR . $cur) && !file_exists(BB DEFAULTPLUGINDIR . $cur) ) {27 if ( !file_exists(BBPLUGINDIR . $cur) && !file_exists(BB_CORE_PLUGIN_DIR . $cur) ) { 28 28 $update = true; 29 29 unset($current[$c]); -
trunk/bb-admin/themes.php
r1128 r1185 5 5 $activetheme = bb_get_option('bb_active_theme'); 6 6 if (!$activetheme) { 7 $activetheme = BB DEFAULTTHEMEDIR;7 $activetheme = BB_DEFAULT_THEME_DIR; 8 8 } 9 9 … … 16 16 do_action( 'bb_deactivate_theme_' . basename($activetheme) ); 17 17 $activetheme = stripslashes($_GET['theme']); 18 if ($activetheme == BB DEFAULTTHEMEDIR) {18 if ($activetheme == BB_DEFAULT_THEME_DIR) { 19 19 bb_delete_option( 'bb_active_theme' ); 20 20 } else { … … 30 30 31 31 if ( !in_array($activetheme, $themes) ) { 32 if ($activetheme == BB DEFAULTTHEMEDIR) {32 if ($activetheme == BB_DEFAULT_THEME_DIR) { 33 33 remove_action( 'bb_admin_notices', $theme_notice ); 34 34 bb_admin_notice( __('Default theme is missing.'), 'error' ); -
trunk/bb-includes/functions.php
r1174 r1185 2361 2361 $activetheme = bb_get_option( 'bb_active_theme' ); 2362 2362 if ( !$activetheme ) 2363 $activetheme = BB DEFAULTTHEMEDIR;2363 $activetheme = BB_DEFAULT_THEME_DIR; 2364 2364 2365 2365 return apply_filters( 'bb_get_active_theme_folder', $activetheme ); -
trunk/bb-includes/template-functions.php
r1169 r1185 20 20 if ( file_exists( bb_get_active_theme_folder() . $file) ) 21 21 return bb_get_active_theme_folder() . $file; 22 return BB DEFAULTTHEMEDIR . $file;22 return BB_DEFAULT_THEME_DIR . $file; 23 23 } 24 24 … … 55 55 $r = bb_get_active_theme_uri() . $css_file; 56 56 else 57 $r = BB DEFAULTTHEMEURL . $css_file;57 $r = BB_DEFAULT_THEME_URL . $css_file; 58 58 return apply_filters( 'bb_get_stylesheet_uri', $r, $stylesheet ); 59 59 } … … 65 65 function bb_get_active_theme_uri() { 66 66 if ( !$active_theme = bb_get_option( 'bb_active_theme' ) ) 67 $active_theme = BB DEFAULTTHEMEDIR;67 $active_theme = BB_DEFAULT_THEME_DIR; 68 68 return apply_filters( 'bb_get_active_theme_uri', bb_get_theme_uri( $active_theme ) ); 69 69 } -
trunk/bb-settings.php
r1174 r1185 178 178 } 179 179 180 define('BB_CORE_PLUGIN_DIR', BBPATH . 'bb-plugins/'); 181 define('BB_CORE_PLUGIN_URL', $bb->uri . 'bb-plugins/'); 182 define('BB_DEFAULT_THEME_DIR', BBPATH . 'bb-templates/kakumei/'); 183 define('BB_DEFAULT_THEME_URL', $bb->uri . 'bb-templates/kakumei/'); 184 180 185 if ( !defined('BBPLUGINDIR') ) 181 186 define('BBPLUGINDIR', BBPATH . 'my-plugins/'); 182 187 if ( !defined('BBPLUGINURL') ) 183 188 define('BBPLUGINURL', $bb->uri . 'my-plugins/'); 184 if ( !defined('BBDEFAULTPLUGINDIR') )185 define('BBDEFAULTPLUGINDIR', BBPATH . 'bb-plugins/');186 if ( !defined('BBDEFAULTPLUGINURL') )187 define('BBDEFAULTPLUGINURL', $bb->uri . 'bb-plugins/');188 189 if ( !defined('BBTHEMEDIR') ) 189 190 define('BBTHEMEDIR', BBPATH . 'my-templates/'); 190 191 if ( !defined('BBTHEMEURL') ) 191 192 define('BBTHEMEURL', $bb->uri . 'my-templates/'); 192 if ( !defined('BBDEFAULTTHEMEDIR') )193 define('BBDEFAULTTHEMEDIR', BBPATH . 'bb-templates/kakumei/');194 if ( !defined('BBDEFAULTTHEMEURL') )195 define('BBDEFAULTTHEMEURL', $bb->uri . 'bb-templates/kakumei/');196 193 197 194 // Check for defined custom user tables … … 378 375 // Underscore plugins 379 376 if ( function_exists( 'glob' ) && is_callable( 'glob' ) ) { 380 // First BB DEFAULTPLUGINDIR381 $_plugins_glob = glob(BB DEFAULTPLUGINDIR . '_*.php');377 // First BB_CORE_PLUGIN_DIR 378 $_plugins_glob = glob(BB_CORE_PLUGIN_DIR . '_*.php'); 382 379 foreach ( $_plugins_glob as $_plugin ) 383 380 require($_plugin); … … 392 389 do_action( 'bb_underscore_plugins_loaded' ); 393 390 394 // Plugins in BBPLUGINDIR take precedence over BB DEFAULTPLUGINDIR when names collide391 // Plugins in BBPLUGINDIR take precedence over BB_CORE_PLUGIN_DIR when names collide 395 392 if ( $plugins = bb_get_option( 'active_plugins' ) ) 396 393 foreach ( (array) $plugins as $plugin ) 397 394 if ( file_exists(BBPLUGINDIR . $plugin) ) { 398 395 require( BBPLUGINDIR . $plugin ); 399 } elseif ( file_exists(BB DEFAULTPLUGINDIR . $plugin) ) {400 require( BB DEFAULTPLUGINDIR . $plugin );396 } elseif ( file_exists(BB_CORE_PLUGIN_DIR . $plugin) ) { 397 require( BB_CORE_PLUGIN_DIR . $plugin ); 401 398 } 402 399 do_action( 'bb_plugins_loaded' );
Note: See TracChangeset
for help on using the changeset viewer.