Skip to:
Content

BuddyPress.org

Ticket #2789: 2789.003.patch

File 2789.003.patch, 1.6 KB (added by r-a-y, 9 years ago)
  • buddypress/bp-core/admin/bp-core-upgrade.php

     
    12581258        else
    12591259                $status = __( 'Upgrade', 'buddypress' );
    12601260
    1261         /* Add the administration tab under the "Site Admin" tab for site administrators */
     1261        // Add the administration tab under the "Site Admin" tab for site administrators
    12621262        bp_core_add_admin_menu_page( array(
    12631263                'menu_title' => __( 'BuddyPress', 'buddypress' ),
    12641264                'page_title' => __( 'BuddyPress', 'buddypress' ),
     
    12691269
    12701270        $hook = add_submenu_page( 'bp-wizard', $status, $status, 'manage_options', 'bp-wizard', array( $bp_wizard, 'html' ) );
    12711271
    1272         /* Add a hook for css/js */
     1272        // Add a hook for css/js
    12731273        add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' );
     1274
     1275        // Add a notice on themes page if BuddyPress setup wizard hasn't run yet
     1276        add_action( 'load-themes.php', 'bp_core_add_theme_notice' );
    12741277}
    12751278add_action( 'admin_menu', 'bp_core_add_admin_menu' );
     1279
     1280function bp_core_add_theme_notice() {
     1281        function bp_core_theme_message() { ?>
     1282                        <div id="message" class="fade error">
     1283                                <p style="line-height: 150%"><?php printf( __( "<strong>Do not activate a BuddyPress Theme!</strong> It looks like you haven't finished setting up BuddyPress yet.  Please run the <a href='%s'>BuddyPress setup wizard</a> now.", 'buddypress' ), admin_url( 'admin.php?page=bp-wizard' ) ) ?></p>
     1284                        </div>
     1285        <?php
     1286        }
     1287        add_action( 'admin_notices', 'bp_core_theme_message', 1 );     
     1288}
    12761289
    12771290function bp_core_add_admin_menu_styles() {
    12781291        if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )