Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/06/2012 04:24:22 AM (9 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/bp-core-admin.php

    r6285 r6310  
    368368     */
    369369    public function add_settings_link( $links, $file ) {
    370         global $bp;
    371 
    372         if ( plugin_basename( $bp->file ) == $file ) {
     370
     371        if ( buddypress()->basename == $file ) {
    373372            $url           = bp_core_do_network_admin() ? network_admin_url( 'settings.php' ) : admin_url( 'options-general.php' );
    374373            $settings_link = '<a href="' . add_query_arg( array( 'page' => 'bp-components' ), $url ) . '">' . __( 'Settings', 'buddypress' ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.