Changeset 6134 for trunk/bp-forums/bp-forums-admin.php
- Timestamp:
- 06/24/2012 08:23:48 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-admin.php
r6108 r6134 19 19 add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' ); 20 20 21 /** 22 * Outputs the markup for the bb-forums-admin panel 23 */ 21 24 function bp_forums_bbpress_admin() { 22 25 global $bp; 26 27 // The text and URL of the Site Wide Forums button differs depending on whether bbPress 28 // is running 29 if ( is_plugin_active( 'bbpress/bbpress.php' ) ) { 30 // The bbPress admin page will always be on the root blog. switch_to_blog() will 31 // pass through if we're already there. 32 switch_to_blog( bp_get_root_blog_id() ); 33 $button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ); 34 restore_current_blog(); 35 36 $button_text = __( 'Configure Site Wide Forums', 'buddypress' ); 37 } else { 38 $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' ) ); 39 $button_text = __( 'Install Site Wide Forums', 'buddypress' ); 40 } 23 41 24 42 $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?> … … 78 96 <li><?php _e( '@ Mention Integration', 'buddypress' ); ?></p></li> 79 97 </ul> 98 80 99 <div> 81 <a class="button thickbox button-primary" href="<?php bp_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) ); ?>"><?php _e( 'Install Site Wide Forums', 'buddypress') ?></a> 100 <a class="button thickbox button-primary" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> 82 101 </div> 83 102 </div>
Note: See TracChangeset
for help on using the changeset viewer.