Index: trunk/src/bp-core/classes/class-bp-admin.php
===================================================================
--- trunk/src/bp-core/classes/class-bp-admin.php	(revision 13878)
+++ trunk/src/bp-core/classes/class-bp-admin.php	(revision 13883)
@@ -11,5 +11,7 @@
 defined( 'ABSPATH' ) || exit;
 
-if ( !class_exists( 'BP_Admin' ) ) :
+if ( class_exists( 'BP_Admin' ) ) {
+	return;
+}
 
 /**
@@ -29,5 +31,5 @@
 	 *
 	 * @since 1.6.0
-	 * @var string $admin_dir
+	 * @var string
 	 */
 	public $admin_dir = '';
@@ -37,32 +39,32 @@
 	/**
 	 * URL to the BuddyPress admin directory.
-	 *
-	 * @since 1.6.0
-	 * @var string $admin_url
-	 */
-	public $admin_url = '';
-
-	/**
-	 * URL to the BuddyPress images directory.
-	 *
-	 * @since 1.6.0
-	 * @var string $images_url
-	 */
-	public $images_url = '';
-
-	/**
-	 * URL to the BuddyPress admin CSS directory.
-	 *
-	 * @since 1.6.0
-	 * @var string $css_url
-	 */
-	public $css_url = '';
-
-	/**
-	 * URL to the BuddyPress admin JS directory.
 	 *
 	 * @since 1.6.0
 	 * @var string
 	 */
+	public $admin_url = '';
+
+	/**
+	 * URL to the BuddyPress images directory.
+	 *
+	 * @since 1.6.0
+	 * @var string
+	 */
+	public $images_url = '';
+
+	/**
+	 * URL to the BuddyPress admin CSS directory.
+	 *
+	 * @since 1.6.0
+	 * @var string
+	 */
+	public $css_url = '';
+
+	/**
+	 * URL to the BuddyPress admin JS directory.
+	 *
+	 * @since 1.6.0
+	 * @var string
+	 */
 	public $js_url = '';
 
@@ -73,5 +75,5 @@
 	 *
 	 * @since 1.9.0
-	 * @var array()
+	 * @var array
 	 */
 	public $notices = array();
@@ -81,5 +83,5 @@
 	 *
 	 * @since 10.0.0
-	 * @var array()
+	 * @var array
 	 */
 	public $nav_tabs = array();
@@ -89,5 +91,5 @@
 	 *
 	 * @since 10.0.0
-	 * @var string()
+	 * @var string
 	 */
 	public $active_nav_tab = '';
@@ -97,5 +99,5 @@
 	 *
 	 * @since 10.0.0
-	 * @var array()
+	 * @var array
 	 */
 	public $submenu_pages = array();
@@ -107,5 +109,4 @@
 	 *
 	 * @since 1.6.0
-	 *
 	 */
 	public function __construct() {
@@ -123,10 +124,10 @@
 		$bp = buddypress();
 
-		// Paths and URLs
-		$this->admin_dir  = trailingslashit( $bp->plugin_dir  . 'bp-core/admin' ); // Admin path.
-		$this->admin_url  = trailingslashit( $bp->plugin_url  . 'bp-core/admin' ); // Admin url.
-		$this->images_url = trailingslashit( $this->admin_url . 'images'        ); // Admin images URL.
-		$this->css_url    = trailingslashit( $this->admin_url . 'css'           ); // Admin css URL.
-		$this->js_url     = trailingslashit( $this->admin_url . 'js'            ); // Admin css URL.
+		// Paths and URLs.
+		$this->admin_dir  = trailingslashit( $bp->plugin_dir . 'bp-core/admin' ); // Admin path.
+		$this->admin_url  = trailingslashit( $bp->plugin_url . 'bp-core/admin' ); // Admin url.
+		$this->images_url = trailingslashit( $this->admin_url . 'images' ); // Admin images URL.
+		$this->css_url    = trailingslashit( $this->admin_url . 'css' ); // Admin css URL.
+		$this->js_url     = trailingslashit( $this->admin_url . 'js' ); // Admin css URL.
 
 		// Main settings page.
@@ -159,5 +160,4 @@
 	 *
 	 * @since 1.6.0
-	 *
 	 */
 	private function setup_actions() {
@@ -166,5 +166,5 @@
 
 		// Add some page specific output to the <head>.
-		add_action( 'bp_admin_head',            array( $this, 'admin_head'  ), 999 );
+		add_action( 'bp_admin_head',            array( $this, 'admin_head' ), 999 );
 
 		// Add menu item to settings menu.
@@ -225,5 +225,5 @@
 		add_filter( 'user_row_actions',    'bp_core_admin_user_row_actions', 10, 2 );
 
-		// Emails
+		// Emails.
 		add_filter( 'bp_admin_menu_order', array( $this, 'emails_admin_menu_order' ), 20 );
 		add_action( 'load-edit.php', array( $this, 'post_type_load_admin_screen' ), 20 );
@@ -232,5 +232,5 @@
 		// Official BuddyPress supported Add-ons.
 		add_filter( 'install_plugins_tabs', array( $this, 'addons_tab' ) );
-		add_filter( 'install_plugins_table_api_args_bp-add-ons', array( $this,'addons_args' ) );
+		add_filter( 'install_plugins_table_api_args_bp-add-ons', array( $this, 'addons_args' ) );
 	}
 
@@ -320,5 +320,5 @@
 
 		$this->submenu_pages['settings']['bp-admin-notifications'] = $bp_admin_notifications;
-		$hooks[]                                                   = $bp_admin_notifications;
+		$hooks[] = $bp_admin_notifications;
 
 		// Credits.
@@ -477,5 +477,4 @@
 	 *
 	 * @since 1.6.0
-	 *
 	 */
 	public function register_admin_settings() {
@@ -490,5 +489,5 @@
 		register_setting( 'buddypress', 'hide-loggedout-adminbar', 'intval' );
 
-		// Community Visibility
+		// Community Visibility.
 		if ( 'rewrites' === bp_core_get_query_parser() ) {
 			add_settings_field( '_bp_community_visibility', __( 'Community Visibility', 'buddypress' ), 'bp_admin_setting_callback_community_visibility', 'buddypress', 'bp_main' );
@@ -547,5 +546,5 @@
 			// Profile sync setting.
 			add_settings_field( 'bp-disable-profile-sync',   __( 'Profile Syncing',  'buddypress' ), 'bp_admin_setting_callback_profile_sync', 'buddypress', 'bp_xprofile' );
-			register_setting  ( 'buddypress', 'bp-disable-profile-sync', 'intval' );
+			register_setting( 'buddypress', 'bp-disable-profile-sync', 'intval' );
 		}
 
@@ -612,13 +611,15 @@
 		}
 
-		$wp_admin_bar->add_node( array(
-			'parent' => 'wp-logo',
-			'id'     => 'bp-about',
-			'title'  => esc_html_x( 'Hello, BuddyPress!', 'Colloquial alternative to "learn about BuddyPress"', 'buddypress' ),
-			'href'   => bp_get_admin_url( '?hello=buddypress' ),
-			'meta'   => array(
-				'class' => 'say-hello-buddypress',
-			),
-		) );
+		$wp_admin_bar->add_node(
+			array(
+				'parent' => 'wp-logo',
+				'id'     => 'bp-about',
+				'title'  => esc_html_x( 'Hello, BuddyPress!', 'Colloquial alternative to "learn about BuddyPress"', 'buddypress' ),
+				'href'   => bp_get_admin_url( '?hello=buddypress' ),
+				'meta'   => array(
+					'class' => 'say-hello-buddypress',
+				),
+			)
+		);
 	}
 
@@ -635,5 +636,5 @@
 
 		// Return normal links if not BuddyPress.
-		if ( plugin_basename( buddypress()->basename ) != $file ) {
+		if ( plugin_basename( buddypress()->basename ) !== $file ) {
 			return $links;
 		}
@@ -780,5 +781,5 @@
 
 		// Get BuddyPress stable version.
-		$version      =  self::display_version();
+		$version      = self::display_version();
 		$version_slug = 'version-' . str_replace( '.', '-', $version );
 
@@ -824,5 +825,5 @@
 						<h2>
 							<?php
-							printf(
+								printf(
 									/* Translators: %s is a raising hands emoji. */
 									esc_html__( 'You now have complete control over all BuddyPress-generated URLs %s', 'buddypress' ),
@@ -895,5 +896,5 @@
 						<h2>
 							<?php
-							printf(
+								printf(
 									/* Translators: %s is a woman supervillain emoji. */
 									esc_html__( 'Here\'s another benefit of the BP Rewrites API: the new "members only" community visibility level %s', 'buddypress' ),
@@ -966,5 +967,5 @@
 								'span' => array(
 									'class' => true,
-								)
+								),
 							)
 						);
@@ -1284,5 +1285,5 @@
 		$taxonomy_object = get_taxonomy( bp_get_email_tax_type() );
 
-		if ( is_wp_error( $terms ) || ! $terms  ) {
+		if ( is_wp_error( $terms ) || ! $terms ) {
 			printf( '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">%s</span>', esc_html( $taxonomy_object->labels->no_terms ) );
 		} else {
@@ -1348,5 +1349,5 @@
 
 			// Check for prerelease hyphen.
-			$pre     = strpos( $version, '-' );
+			$pre = strpos( $version, '-' );
 
 			// Strip prerelease suffix.
@@ -1571,5 +1572,5 @@
 					}
 					%2$s',
-					implode( " ", $grid_columns ),
+					implode( ' ', $grid_columns ),
 					$help_tab_css
 				)
@@ -1612,8 +1613,7 @@
 	 * @global int $paged The current page of the Plugin results.
 	 *
-	 * @param false|array $args  `false` by default.
-	 * @return array             The "BuddyPress add-ons" args.
-	 */
-	public function addons_args( $args = false ) {
+	 * @return array The "BuddyPress add-ons" args.
+	 */
+	public function addons_args() {
 		global $paged;
 
@@ -1686,3 +1686,2 @@
 	}
 }
-endif; // End class_exists check.
