bp_forums_bbpress_admin

Outputs the markup for the bb-forums-admin panel.

Description

bp_forums_bbpress_admin(); 

Usage

  1. if ( !function_exists( 'bp_forums_bbpress_admin' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/deprecated/1.6.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_forums_bbpress_admin(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/deprecated/1.6.php  
  1. function bp_forums_bbpress_admin() { 
  2.  
  3. // The text and URL of the Site Wide Forums button differs depending on whether bbPress 
  4. // is running. 
  5. if ( is_plugin_active( 'bbpress/bbpress.php' ) ) { 
  6. // The bbPress admin page will always be on the root blog. switch_to_blog() will 
  7. // pass through if we're already there. 
  8. $button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ); 
  9.  
  10. $button_text = __( 'Configure bbPress', buddypress ); 
  11. } else { 
  12. $button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) ); 
  13. $button_text = __( 'Install bbPress', buddypress ); 
  14.  
  15. $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?> 
  16.  
  17. <div class="wrap"> 
  18. <h2 class="nav-tab-wrapper"><?php bp_core_admin_tabs( __( 'Forums', buddypress ) ); ?></h2> 
  19.  
  20. <?php if ( isset( $_POST['submit'] ) ) : ?> 
  21.  
  22. <div id="message" class="updated fade"> 
  23. <p><?php _e( 'Settings Saved.', buddypress ) ?></p> 
  24. </div> 
  25.  
  26. <?php endif; ?> 
  27.  
  28. <?php 
  29.  
  30. if ( isset( $_REQUEST['reinstall'] ) || !bp_forums_is_installed_correctly() ) : 
  31.  
  32. // Delete the bb-config.php location option. 
  33. bp_delete_option( 'bb-config-location' ); 
  34.  
  35. // Now delete the bb-config.php file. 
  36. @unlink( ABSPATH . 'bb-config.php' ); 
  37.  
  38. // Show the updated wizard. 
  39.  
  40. else : ?> 
  41.  
  42. <div style="width: 45%; float: left; margin-top: 20px;"> 
  43. <h3><?php _e( '(Installed)', buddypress ); ?> <?php _e( 'Forums for Groups', buddypress ) ?></h3> 
  44.  
  45. <p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , buddypress ); ?></p> 
  46.  
  47. <p><?php _e( 'Note: This component is retired and will not be receiving any updates in the future. Only use this component if your current site relies on it.' , buddypress ); ?></p> 
  48.  
  49. <h4 style="margin-bottom: 10px;"><?php _e( 'Features', buddypress ); ?></h4> 
  50. <ul class="description" style="list-style: square; margin-left: 30px;"> 
  51. <li><?php _e( 'Group Integration', buddypress ); ?></p></li> 
  52. <li><?php _e( 'Member Profile Integration', buddypress ); ?></p></li> 
  53. <li><?php _e( 'Activity Stream Integration', buddypress ); ?></p></li> 
  54. <li><?php _e( '@ Mention Integration', buddypress ); ?></p></li> 
  55. </ul> 
  56.  
  57. <div> 
  58. <a class="button button-primary confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', buddypress ) ?></a>   
  59. </div> 
  60. </div> 
  61.  
  62. <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;"> 
  63. <h3><?php _e( 'New! bbPress', buddypress ) ?></h3> 
  64. <p><?php _e( 'bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', buddypress ) ?></p> 
  65.  
  66. <p><?php _e( 'It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', buddypress ) ?></p> 
  67.  
  68. <ul class="description" style="list-style: square; margin-left: 30px;"> 
  69. <li><?php _e( 'Non-group specific forum creation', buddypress ); ?></p></li> 
  70. <li><?php _e( 'Moderation via the WP admin dashboard', buddypress ); ?></p></li> 
  71. <li><?php _e( 'Topic splitting', buddypress ); ?></p></li> 
  72. <li><?php _e( 'Revisions', buddypress ); ?></p></li> 
  73. <li><?php _e( 'Spam management', buddypress ); ?></p></li> 
  74. <li><?php _e( 'Subscriptions', buddypress ); ?></p></li> 
  75. <li><?php _e( 'And more!', buddypress ); ?></p></li> 
  76. </ul> 
  77.  
  78. <p><?php printf( __( 'If you decide to use bbPress, you will need to deactivate the legacy group forum component. For more info, <a href="%s">read this codex article</a>.', buddypress ), 'https://codex.buddypress.org/legacy/getting-started/using-bbpress-2-2-with-buddypress/' ) ?></p> 
  79.  
  80. <div> 
  81. <a class="button thickbox button-primary" href="<?php echo esc_url( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a>   
  82. </div> 
  83. </div> 
  84.  
  85. <?php endif; ?> 
  86.  
  87. </div> 
  88. <?php