Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/06/2012 04:24:22 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Admin Audit:

  • Introduce bp_is_network_activated() to tell if BuddyPress is active at a network level.
  • Use bp_is_network_activated() in places where multiblog or single-site activation might mistakingly link to the incorrect site/network admin.
  • Add phpdoc to bp_is_multiblog_mode() to further explain why it exists, and why you should not use it.
  • Audit usage of network_admin_url() and admin_url(), and replace with bp_get_admin_url() where appropriate.
  • Escape some admin URL usages; maybe more to do here.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-slugs.php

    r6084 r6310  
    9595
    9696                        <td>
    97                             <?php if ( !bp_is_root_blog() )
    98                                 switch_to_blog( bp_get_root_blog_id() ) ?>
     97
     98                            <?php if ( ! bp_is_root_blog() ) switch_to_blog( bp_get_root_blog_id() ); ?>
    9999
    100100                            <?php echo wp_dropdown_pages( array(
     
    114114                            <?php endif; ?>
    115115
    116                             <?php if ( !bp_is_root_blog() )
    117                                 restore_current_blog() ?>
     116                            <?php if ( ! bp_is_root_blog() ) restore_current_blog(); ?>
    118117
    119118                        </td>
     
    159158
    160159                        <td>
     160                           
     161                            <?php if ( ! bp_is_root_blog() ) switch_to_blog( bp_get_root_blog_id() ); ?>
     162
    161163                            <?php echo wp_dropdown_pages( array(
    162164                                'name'             => 'bp_pages[' . esc_attr( $name ) . ']',
     
    174176
    175177                            <?php endif; ?>
     178
     179                            <?php if ( ! bp_is_root_blog() ) restore_current_blog(); ?>
    176180
    177181                        </td>
Note: See TracChangeset for help on using the changeset viewer.