function bb_get_plugins_callback($type = 'normal', $path, $filename) { if ('.php' != substr($filename, -4)) { return false; } $data = array('autoload' => 0); if ($has_underscore = '_' === substr($filename, 0, 1)) { switch ($type) { case 'all': case 'autoload': $data['autoload'] = 1; break; case 'normal': default: return false; break; } } elseif ('autoload' === $type) { return false; } if ($_data = bb_get_plugin_data($path)) { return array_merge($_data, $data); } return false; }
} // Stop processing exit; } // Display notices if (isset($_GET['message'])) { switch ($_GET['message']) { case 'error': bb_admin_notice(__('<strong>Plugin could not be activated, it produced a Fatal Error</strong>. The error is shown below.'), 'error'); break; case 'activate': $plugin_data = bb_get_plugin_data($plugin); bb_admin_notice(sprintf(__('<strong>"%s" plugin activated</strong>'), esc_attr($plugin_data['name']))); break; case 'deactivate': $plugin_data = bb_get_plugin_data($plugin); bb_admin_notice(sprintf(__('<strong>"%s" plugin deactivated</strong>'), esc_attr($plugin_data['name']))); break; } } if (isset($bb->safemode) && $bb->safemode === true) { bb_admin_notice(__('<strong>"Safe mode" is on, all plugins are disabled even if they are listed as active.</strong>'), 'error'); } $bb_admin_body_class = ' bb-admin-plugins'; bb_get_admin_header(); ?> <div class="wrap"> <h2><?php _e('Manage Plugins');