Permalink
Browse files

Updated via SVN build 3894

  • Loading branch information...
1 parent 8cd36f2 commit 3a79b544e719fe7ba7febab303a304a042f010fb @ntwb committed May 9, 2012
Showing with 2,094 additions and 1,360 deletions.
  1. +4 −3 plugin/bbp-admin/bbp-actions.php
  2. +51 −30 plugin/bbp-admin/bbp-admin.php
  3. +265 −168 plugin/bbp-admin/bbp-converter.php
  4. +1 −1 plugin/bbp-admin/bbp-forums.php
  5. +70 −1 plugin/bbp-admin/bbp-functions.php
  6. +28 −11 plugin/bbp-admin/bbp-settings.php
  7. +350 −348 plugin/bbp-admin/bbp-tools.php
  8. +1 −1 plugin/bbp-admin/bbp-topics.php
  9. +35 −35 plugin/bbp-admin/converters/Example.php
  10. +36 −36 plugin/bbp-admin/converters/Invision.php
  11. +254 −136 plugin/bbp-admin/converters/bbPress1.php
  12. +256 −181 plugin/bbp-admin/converters/phpBB.php
  13. +36 −36 plugin/bbp-admin/converters/vBulletin.php
  14. +120 −11 plugin/bbp-includes/bbp-common-functions.php
  15. +19 −15 plugin/bbp-includes/bbp-core-caps.php
  16. +11 −15 plugin/bbp-includes/bbp-core-filters.php
  17. +6 −20 plugin/bbp-includes/bbp-core-options.php
  18. +2 −2 plugin/bbp-includes/bbp-core-widgets.php
  19. +24 −32 plugin/bbp-includes/bbp-forum-functions.php
  20. +52 −21 plugin/bbp-includes/bbp-forum-template.php
  21. +60 −25 plugin/bbp-includes/bbp-reply-template.php
  22. +73 −39 plugin/bbp-includes/bbp-topic-template.php
  23. +89 −10 plugin/bbp-includes/bbp-user-functions.php
  24. +101 −14 plugin/bbp-includes/bbp-user-template.php
  25. +1 −1 plugin/bbp-theme-compat/bbpress/content-single-topic-lead.php
  26. +3 −5 plugin/bbp-theme-compat/bbpress/form-topic-tag.php
  27. +1 −1 plugin/bbp-theme-compat/bbpress/form-user-edit.php
  28. +1 −1 plugin/bbp-theme-compat/bbpress/form-user-login.php
  29. +2 −2 plugin/bbp-theme-compat/bbpress/form-user-lost-pass.php
  30. +1 −1 plugin/bbp-theme-compat/bbpress/form-user-register.php
  31. +1 −1 plugin/bbp-theme-compat/bbpress/loop-single-reply.php
  32. +28 −30 plugin/bbp-theme-compat/css/bbpress-rtl.css
  33. +94 −120 plugin/bbp-theme-compat/css/bbpress.css
  34. +7 −3 plugin/bbp-themes/bbp-twentyten/bbpress-functions.php
  35. +1 −1 plugin/bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php
  36. +1 −1 plugin/bbp-themes/bbp-twentyten/bbpress/form-user-edit.php
  37. +1 −1 plugin/bbp-themes/bbp-twentyten/bbpress/loop-single-reply.php
  38. +5 −0 plugin/bbp-themes/bbp-twentyten/css/bbpress.css
  39. +1 −1 plugin/humans.txt
  40. +2 −0 plugin/readme.txt
@@ -81,10 +81,11 @@
add_action( 'bbp_new_site', 'flush_rewrite_rules' );
// Contextual Helpers
-add_action( 'load-settings_page_bbpress', 'bbp_admin_settings_help' );
+add_action( 'load-settings_page_bbpress', 'bbp_admin_settings_help' );
-// Handle submission of Recount page
-add_action( 'load-tools_page_bbp-recount', 'bbp_admin_tools_handler' );
+// Handle submission of Tools pages
+add_action( 'load-tools_page_bbp-repair', 'bbp_admin_repair_handler' );
+add_action( 'load-tools_page_bbp-reset', 'bbp_admin_reset_handler' );
// Add sample permalink filter
add_filter( 'post_type_link', 'bbp_filter_sample_permalink', 10, 4 );
@@ -44,12 +44,12 @@ class BBP_Admin {
*/
public $styles_url = '';
- /** Recounts **************************************************************/
+ /** Tools *****************************************************************/
/**
- * @var bool Enable recounts in Tools area
+ * @var bool Enable screens in Tools area
*/
- public $enable_recounts = false;
+ public $enable_tools = false;
/** Admin Scheme **********************************************************/
@@ -150,18 +150,10 @@ private function includes() {
*/
private function setup_globals() {
$bbp = bbpress();
-
- // Admin url
- $this->admin_dir = trailingslashit( $bbp->plugin_dir . 'bbp-admin' );
-
- // Admin url
- $this->admin_url = trailingslashit( $bbp->plugin_url . 'bbp-admin' );
-
- // Admin images URL
- $this->images_url = trailingslashit( $this->admin_url . 'images' );
-
- // Admin images URL
- $this->styles_url = trailingslashit( $this->admin_url . 'styles' );
+ $this->admin_dir = trailingslashit( $bbp->plugin_dir . 'bbp-admin' ); // Admin url
+ $this->admin_url = trailingslashit( $bbp->plugin_url . 'bbp-admin' ); // Admin url
+ $this->images_url = trailingslashit( $this->admin_url . 'images' ); // Admin images URL
+ $this->styles_url = trailingslashit( $this->admin_url . 'styles' ); // Admin styles URL
}
/**
@@ -175,26 +167,49 @@ private function setup_globals() {
*/
public function admin_menus() {
- // Recounts
- if ( is_super_admin() || !empty( $this->enable_recounts ) ) {
+ // Are tools enabled
+ if ( is_super_admin() || !empty( $this->enable_tools ) ) {
+
+ $hooks = array();
+
+ // These are later removed in admin_head
+ $hooks[] = add_management_page(
+ __( 'Repair Forums', 'bbpress' ),
+ __( 'Forum Repair', 'bbpress' ),
+ 'manage_options',
+ 'bbp-repair',
+ 'bbp_admin_repair'
+ );
+ $hooks[] = add_management_page(
+ __( 'Import Forums', 'bbpress' ),
+ __( 'Forum Import', 'bbpress' ),
+ 'manage_options',
+ 'bbp-converter',
+ 'bbp_converter_settings'
+ );
+ $hooks[] = add_management_page(
+ __( 'Reset Forums', 'bbpress' ),
+ __( 'Forum Reset', 'bbpress' ),
+ 'manage_options',
+ 'bbp-reset',
+ 'bbp_admin_reset'
+ );
+
+ // Fudge the highlighted subnav item when on a bbPress admin page
+ foreach( $hooks as $hook ) {
+ add_action( "admin_head-$hook", 'bbp_tools_modify_menu_highlight' );
+ }
+
+ // Forums Tools Root
add_management_page(
- __( 'Recount', 'bbpress' ),
- __( 'Recount', 'bbpress' ),
+ __( 'Forums', 'bbpress' ),
+ __( 'Forums', 'bbpress' ),
'manage_options',
- 'bbp-recount',
- 'bbp_admin_tools_screen'
+ 'bbp-repair',
+ 'bbp_admin_repair'
);
}
- // Converter Page
- add_management_page(
- __( 'Converter', 'bbpress' ),
- __( 'Converter', 'bbpress' ),
- 'manage_options',
- 'bbp-converter',
- 'bbp_converter_settings'
- );
-
// Forums settings
add_options_page(
__( 'Forums', 'bbpress' ),
@@ -492,6 +507,12 @@ public function dashboard_widget_right_now() {
*/
public function admin_head() {
+ // Remove the individual recount and converter menus.
+ // They are grouped together by h2 tabs
+ remove_submenu_page( 'tools.php', 'bbp-repair' );
+ remove_submenu_page( 'tools.php', 'bbp-converter' );
+ remove_submenu_page( 'tools.php', 'bbp-reset' );
+
// Icons for top level admin menus
$menu_icon_url = $this->images_url . 'menu.png';
$icon32_url = $this->images_url . 'icons32.png';
Oops, something went wrong.

0 comments on commit 3a79b54

Please sign in to comment.