Changeset 4175 for trunk/bp-core/admin/bp-core-admin.php
- Timestamp:
- 04/08/2011 09:29:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-admin.php
r4107 r4175 10 10 } 11 11 add_action( 'in_plugin_update_message-buddypress/bp-loader.php', 'bp_core_update_message' ); 12 13 /**14 * When BuddyPress is activated we must make sure that mod_rewrite is enabled.15 * We must also make sure a BuddyPress compatible theme is enabled. This function16 * will show helpful messages to the administrator.17 *18 * @package BuddyPress Core19 */20 function bp_core_activation_notice() {21 global $wp_rewrite, $wpdb, $bp;22 23 if ( isset( $_POST['permalink_structure'] ) )24 return false;25 26 if ( !is_super_admin() )27 return false;28 29 if ( !empty( $wpdb->blogid ) ) {30 if ( $wpdb->blogid != BP_ROOT_BLOG ) {31 return false;32 }33 }34 35 if ( empty( $wp_rewrite->permalink_structure ) ) { ?>36 37 <div id="message" class="updated fade">38 <p><?php printf( __( '<strong>BuddyPress is almost ready</strong>. You must <a href="%s">update your permalink structure</a> to something other than the default for it to work.', 'buddypress' ), admin_url( 'options-permalink.php' ) ) ?></p>39 </div><?php40 41 } else {42 // Get current theme info43 $ct = current_theme_info();44 45 // The best way to remove this notice is to add a "buddypress" tag to46 // your active theme's CSS header.47 if ( !defined( 'BP_SILENCE_THEME_NOTICE' ) && !in_array( 'buddypress', (array)$ct->tags ) ) { ?>48 49 <div id="message" class="updated fade">50 <p style="line-height: 150%"><?php printf( __( "<strong>BuddyPress is ready</strong>. You'll need to <a href='%s'>activate a BuddyPress compatible theme</a> to take advantage of all of the features. We've bundled a default theme, but you can always <a href='%s'>install some other compatible themes</a> or <a href='%s'>update your existing WordPress theme</a>.", 'buddypress' ), network_admin_url( 'themes.php' ), network_admin_url( 'theme-install.php?type=tag&s=buddypress&tab=search' ), network_admin_url( 'plugin-install.php?type=term&tab=search&s=%22bp-template-pack%22' ) ) ?></p>51 </div>52 53 <?php54 }55 }56 }57 add_action( 'admin_notices', 'bp_core_activation_notice' );58 12 59 13 /**
Note: See TracChangeset
for help on using the changeset viewer.