Ticket #5390: 5390.01.patch
File 5390.01.patch, 43.5 KB (added by , 10 years ago) |
---|
-
deleted file src/bp-blogs/bp-blogs-buddybar.php
diff --git a/src/bp-blogs/bp-blogs-buddybar.php b/src/bp-blogs/bp-blogs-buddybar.php deleted file mode 100644 index 6d0a493..0000000
+ - 1 <?php2 3 /**4 * BuddyPress Blogs BuddyBar functions.5 *6 * @package BuddyPress7 * @subpackage BlogsBuddyBar8 */9 10 // Exit if accessed directly11 if ( !defined( 'ABSPATH' ) ) exit;12 13 /**14 * Add a Sites menu to the BuddyBar.15 *16 * @since BuddyPress (1.0.0)17 *18 * @global object $bp The BuddyPress global settings object.19 *20 * @return bool|null Returns false on failure. Otherwise echoes the menu item.21 */22 function bp_adminbar_blogs_menu() {23 global $bp;24 25 if ( !is_user_logged_in() || !bp_is_active( 'blogs' ) )26 return false;27 28 if ( !is_multisite() )29 return false;30 31 $blogs = wp_cache_get( 'bp_blogs_of_user_' . bp_loggedin_user_id() . '_inc_hidden', 'bp' );32 if ( empty( $blogs ) ) {33 $blogs = bp_blogs_get_blogs_for_user( bp_loggedin_user_id(), true );34 wp_cache_set( 'bp_blogs_of_user_' . bp_loggedin_user_id() . '_inc_hidden', $blogs, 'bp' );35 }36 37 $counter = 0;38 if ( is_array( $blogs['blogs'] ) && (int) $blogs['count'] ) {39 40 echo '<li id="bp-adminbar-blogs-menu"><a href="' . trailingslashit( bp_loggedin_user_domain() . bp_get_blogs_slug() ) . '">';41 42 _e( 'My Sites', 'buddypress' );43 44 echo '</a>';45 echo '<ul>';46 47 foreach ( (array) $blogs['blogs'] as $blog ) {48 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';49 $site_url = esc_attr( $blog->siteurl );50 51 echo '<li' . $alt . '>';52 echo '<a href="' . $site_url . '">' . esc_html( $blog->name ) . '</a>';53 echo '<ul>';54 echo '<li class="alt"><a href="' . $site_url . 'wp-admin/">' . __( 'Dashboard', 'buddypress' ) . '</a></li>';55 echo '<li><a href="' . $site_url . 'wp-admin/post-new.php">' . __( 'New Post', 'buddypress' ) . '</a></li>';56 echo '<li class="alt"><a href="' . $site_url . 'wp-admin/edit.php">' . __( 'Manage Posts', 'buddypress' ) . '</a></li>';57 echo '<li><a href="' . $site_url . 'wp-admin/edit-comments.php">' . __( 'Manage Comments', 'buddypress' ) . '</a></li>';58 echo '</ul>';59 60 do_action( 'bp_adminbar_blog_items', $blog );61 62 echo '</li>';63 $counter++;64 }65 66 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';67 68 if ( bp_blog_signup_enabled() ) {69 echo '<li' . $alt . '>';70 echo '<a href="' . bp_get_root_domain() . '/' . bp_get_blogs_root_slug() . '/create/">' . __( 'Create a Site!', 'buddypress' ) . '</a>';71 echo '</li>';72 }73 74 echo '</ul>';75 echo '</li>';76 }77 }78 add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 ); -
src/bp-blogs/bp-blogs-loader.php
diff --git a/src/bp-blogs/bp-blogs-loader.php b/src/bp-blogs/bp-blogs-loader.php index c392d32..55ad320 100644
a b class BP_Blogs_Component extends BP_Component { 93 93 'filters', 94 94 'activity', 95 95 'functions', 96 'buddybar'97 96 ); 98 97 99 98 if ( is_multisite() ) -
src/bp-core/admin/bp-core-settings.php
diff --git a/src/bp-core/admin/bp-core-settings.php b/src/bp-core/admin/bp-core-settings.php index e112df7..71f8f33 100644
a b function bp_admin_setting_callback_account_deletion() { 49 49 <?php 50 50 } 51 51 52 /**53 * If user has upgraded to 1.6 and chose to retain their BuddyBar, offer then a switch to change over54 * to the WP Toolbar.55 *56 * @since BuddyPress (1.6)57 */58 function bp_admin_setting_callback_force_buddybar() {59 ?>60 61 <input id="_bp_force_buddybar" name="_bp_force_buddybar" type="checkbox" value="1" <?php checked( ! bp_force_buddybar( true ) ); ?> />62 <label for="_bp_force_buddybar"><?php _e( 'Switch to WordPress Toolbar', 'buddypress' ); ?></label>63 64 <?php65 }66 67 52 /** Activity *******************************************************************/ 68 53 69 54 /** … … function bp_admin_setting_callback_heartbeat() { 118 103 } 119 104 120 105 /** 121 * Sanitization for _bp_force_buddyvar122 *123 * If upgraded to 1.6 and you chose to keep the BuddyBar, a checkbox asks if you want to switch to124 * the WP Toolbar. The option we store is 1 if the BuddyBar is forced on, so we use this function125 * to flip the boolean before saving the intval.126 *127 * @since BuddyPress (1.6)128 * @access Private129 */130 function bp_admin_sanitize_callback_force_buddybar( $value = false ) {131 return $value ? 0 : 1;132 }133 134 /**135 106 * Sanitization for bp-disable-blogforum-comments setting 136 107 * 137 108 * In the UI, a checkbox asks whether you'd like to *enable* blog/forum activity comments. For -
src/bp-core/bp-core-admin.php
diff --git a/src/bp-core/bp-core-admin.php b/src/bp-core/bp-core-admin.php index 8942a82..58cb2d7 100644
a b class BP_Admin { 319 319 add_settings_field( 'hide-loggedout-adminbar', __( 'Toolbar', 'buddypress' ), 'bp_admin_setting_callback_admin_bar', 'buddypress', 'bp_main' ); 320 320 register_setting ( 'buddypress', 'hide-loggedout-adminbar', 'intval' ); 321 321 322 // Only show 'switch to Toolbar' option if the user chose to retain the BuddyBar during the 1.6 upgrade323 if ( (bool) bp_get_option( '_bp_force_buddybar', false ) ) {324 add_settings_field( '_bp_force_buddybar', __( 'Toolbar', 'buddypress' ), 'bp_admin_setting_callback_force_buddybar', 'buddypress', 'bp_main' );325 register_setting( 'buddypress', '_bp_force_buddybar', 'bp_admin_sanitize_callback_force_buddybar' );326 }327 328 322 // Allow account deletion 329 323 add_settings_field( 'bp-disable-account-deletion', __( 'Account Deletion', 'buddypress' ), 'bp_admin_setting_callback_account_deletion', 'buddypress', 'bp_main' ); 330 324 register_setting ( 'buddypress', 'bp-disable-account-deletion', 'intval' ); -
src/bp-core/bp-core-adminbar.php
diff --git a/src/bp-core/bp-core-adminbar.php b/src/bp-core/bp-core-adminbar.php index f92c396..06150b3 100644
a b function bp_admin_bar_my_account_root() { 23 23 global $wp_admin_bar; 24 24 25 25 // Bail if this is an ajax request 26 if ( !bp_use_wp_admin_bar() ||defined( 'DOING_AJAX' ) )26 if ( defined( 'DOING_AJAX' ) ) 27 27 return; 28 28 29 29 // Only add menu for logged in user … … function bp_admin_bar_my_account_root() { 44 44 add_action( 'admin_bar_menu', 'bp_admin_bar_my_account_root', 100 ); 45 45 46 46 /** 47 * Handle the Toolbar/BuddyBar business.47 * Maybe show the Toolbar for logged out users. 48 48 * 49 49 * @since BuddyPress (1.2.0) 50 50 * 51 51 * @global string $wp_version 52 52 * @uses bp_get_option() 53 53 * @uses is_user_logged_in() 54 * @uses bp_use_wp_admin_bar()55 54 * @uses show_admin_bar() 56 * @uses add_action() To hook 'bp_adminbar_logo' to 'bp_adminbar_logo'.57 * @uses add_action() To hook 'bp_adminbar_login_menu' to 'bp_adminbar_menus'.58 * @uses add_action() To hook 'bp_adminbar_account_menu' to 'bp_adminbar_menus'.59 * @uses add_action() To hook 'bp_adminbar_thisblog_menu' to 'bp_adminbar_menus'.60 * @uses add_action() To hook 'bp_adminbar_random_menu' to 'bp_adminbar_menus'.61 * @uses add_action() To hook 'bp_core_admin_bar' to 'wp_footer'.62 * @uses add_action() To hook 'bp_core_admin_bar' to 'admin_footer'.63 55 */ 64 56 function bp_core_load_admin_bar() { 65 66 // Show the Toolbar for logged out users67 57 if ( ! is_user_logged_in() && (int) bp_get_option( 'hide-loggedout-adminbar' ) != 1 ) { 68 58 show_admin_bar( true ); 69 59 } 70 71 // Hide the WordPress Toolbar and show the BuddyBar72 if ( ! bp_use_wp_admin_bar() ) {73 74 // Keep the WP Toolbar from loading75 show_admin_bar( false );76 77 // Actions used to build the BP Toolbar78 add_action( 'bp_adminbar_logo', 'bp_adminbar_logo' );79 add_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );80 add_action( 'bp_adminbar_menus', 'bp_adminbar_account_menu', 4 );81 add_action( 'bp_adminbar_menus', 'bp_adminbar_thisblog_menu', 6 );82 add_action( 'bp_adminbar_menus', 'bp_adminbar_random_menu', 100 );83 84 // Actions used to append BP Toolbar to footer85 add_action( 'wp_footer', 'bp_core_admin_bar', 8 );86 add_action( 'admin_footer', 'bp_core_admin_bar' );87 }88 60 } 89 61 add_action( 'init', 'bp_core_load_admin_bar', 9 ); 90 62 … … add_action( 'init', 'bp_core_load_admin_bar', 9 ); 96 68 function bp_core_load_admin_bar_css() { 97 69 global $wp_styles; 98 70 99 if ( ! bp_use_wp_admin_bar() || !is_admin_bar_showing() )71 if ( ! is_admin_bar_showing() ) 100 72 return; 101 73 102 74 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; -
src/bp-core/bp-core-buddybar.php
diff --git a/src/bp-core/bp-core-buddybar.php b/src/bp-core/bp-core-buddybar.php index a307af4..3c1e236 100644
a b 5 5 * 6 6 * @package BuddyPress 7 7 * @subpackage Core 8 * @todo Deprecate BuddyBar functions.9 8 */ 10 9 11 10 // Exit if accessed directly … … function bp_core_reset_subnav_items( $parent_slug ) { 556 555 unset( $bp->bp_options_nav[$parent_slug] ); 557 556 } 558 557 559 /** BuddyBar Template functions ***********************************************/560 561 /**562 * Wrapper function for rendering the BuddyBar.563 *564 * @return bool|null Returns false if the BuddyBar is disabled.565 */566 function bp_core_admin_bar() {567 global $bp;568 569 if ( defined( 'BP_DISABLE_ADMIN_BAR' ) && BP_DISABLE_ADMIN_BAR )570 return false;571 572 if ( (int) bp_get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )573 return false;574 575 $bp->doing_admin_bar = true;576 577 echo '<div id="wp-admin-bar"><div class="padder">';578 579 // **** Do bp-adminbar-logo Actions ********580 do_action( 'bp_adminbar_logo' );581 582 echo '<ul class="main-nav">';583 584 // **** Do bp-adminbar-menus Actions ********585 do_action( 'bp_adminbar_menus' );586 587 echo '</ul>';588 echo "</div></div><!-- #wp-admin-bar -->\n\n";589 590 $bp->doing_admin_bar = false;591 }592 593 /**594 * Output the BuddyBar logo.595 */596 function bp_adminbar_logo() {597 echo '<a href="' . bp_get_root_domain() . '" id="admin-bar-logo">' . get_blog_option( bp_get_root_blog_id(), 'blogname' ) . '</a>';598 }599 600 /**601 * Output the "Log In" and "Sign Up" names to the BuddyBar.602 *603 * Visible only to visitors who are not logged in.604 *605 * @return bool|null Returns false if the current user is logged in.606 */607 function bp_adminbar_login_menu() {608 609 if ( is_user_logged_in() )610 return false;611 612 echo '<li class="bp-login no-arrow"><a href="' . wp_login_url() . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';613 614 // Show "Sign Up" link if user registrations are allowed615 if ( bp_get_signup_allowed() )616 echo '<li class="bp-signup no-arrow"><a href="' . bp_get_signup_page() . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>';617 }618 619 /**620 * Output the My Account BuddyBar menu.621 *622 * @return bool|null Returns false on failure.623 */624 function bp_adminbar_account_menu() {625 global $bp;626 627 if ( !$bp->bp_nav || !is_user_logged_in() )628 return false;629 630 echo '<li id="bp-adminbar-account-menu"><a href="' . bp_loggedin_user_domain() . '">';631 echo __( 'My Account', 'buddypress' ) . '</a>';632 echo '<ul>';633 634 // Loop through each navigation item635 $counter = 0;636 foreach( (array) $bp->bp_nav as $nav_item ) {637 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';638 639 if ( -1 == $nav_item['position'] )640 continue;641 642 echo '<li' . $alt . '>';643 echo '<a id="bp-admin-' . $nav_item['css_id'] . '" href="' . $nav_item['link'] . '">' . $nav_item['name'] . '</a>';644 645 if ( isset( $bp->bp_options_nav[$nav_item['slug']] ) && is_array( $bp->bp_options_nav[$nav_item['slug']] ) ) {646 echo '<ul>';647 $sub_counter = 0;648 649 foreach( (array) $bp->bp_options_nav[$nav_item['slug']] as $subnav_item ) {650 $link = $subnav_item['link'];651 $name = $subnav_item['name'];652 653 if ( bp_displayed_user_domain() )654 $link = str_replace( bp_displayed_user_domain(), bp_loggedin_user_domain(), $subnav_item['link'] );655 656 if ( isset( $bp->displayed_user->userdata->user_login ) )657 $name = str_replace( $bp->displayed_user->userdata->user_login, $bp->loggedin_user->userdata->user_login, $subnav_item['name'] );658 659 $alt = ( 0 == $sub_counter % 2 ) ? ' class="alt"' : '';660 echo '<li' . $alt . '><a id="bp-admin-' . $subnav_item['css_id'] . '" href="' . $link . '">' . $name . '</a></li>';661 $sub_counter++;662 }663 echo '</ul>';664 }665 666 echo '</li>';667 668 $counter++;669 }670 671 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';672 673 echo '<li' . $alt . '><a id="bp-admin-logout" class="logout" href="' . wp_logout_url( home_url() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';674 echo '</ul>';675 echo '</li>';676 }677 678 function bp_adminbar_thisblog_menu() {679 if ( current_user_can( 'edit_posts' ) ) {680 echo '<li id="bp-adminbar-thisblog-menu"><a href="' . admin_url() . '">';681 _e( 'Dashboard', 'buddypress' );682 echo '</a>';683 echo '<ul>';684 685 echo '<li class="alt"><a href="' . admin_url() . 'post-new.php">' . __( 'New Post', 'buddypress' ) . '</a></li>';686 echo '<li><a href="' . admin_url() . 'edit.php">' . __( 'Manage Posts', 'buddypress' ) . '</a></li>';687 echo '<li class="alt"><a href="' . admin_url() . 'edit-comments.php">' . __( 'Manage Comments', 'buddypress' ) . '</a></li>';688 689 do_action( 'bp_adminbar_thisblog_items' );690 691 echo '</ul>';692 echo '</li>';693 }694 }695 696 /**697 * Output the Random BuddyBar menu.698 *699 * Not visible for logged-in users.700 */701 function bp_adminbar_random_menu() {702 ?>703 704 <li class="align-right" id="bp-adminbar-visitrandom-menu">705 <a href="#"><?php _e( 'Visit', 'buddypress' ) ?></a>706 <ul class="random-list">707 <li><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) . '?random-member' ?>" rel="nofollow"><?php _e( 'Random Member', 'buddypress' ) ?></a></li>708 709 <?php if ( bp_is_active( 'groups' ) ) : ?>710 711 <li class="alt"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) . '?random-group' ?>" rel="nofollow"><?php _e( 'Random Group', 'buddypress' ) ?></a></li>712 713 <?php endif; ?>714 715 <?php if ( is_multisite() && bp_is_active( 'blogs' ) ) : ?>716 717 <li><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_blogs_root_slug() ) . '?random-blog' ?>" rel="nofollow"><?php _e( 'Random Site', 'buddypress' ) ?></a></li>718 719 <?php endif; ?>720 721 <?php do_action( 'bp_adminbar_random_menu' ) ?>722 723 </ul>724 </li>725 726 <?php727 }728 729 558 /** 730 559 * Retrieve the Toolbar display preference of a user based on context. 731 560 * … … function bp_get_admin_bar_pref( $context, $user = 0 ) { 746 575 return true; 747 576 748 577 return 'true' === $pref; 749 } 750 751 /** 752 * Enqueue the BuddyBar CSS. 753 */ 754 function bp_core_load_buddybar_css() { 755 global $wp_styles; 756 757 if ( bp_use_wp_admin_bar() || ( (int) bp_get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) || ( defined( 'BP_DISABLE_ADMIN_BAR' ) && BP_DISABLE_ADMIN_BAR ) ) 758 return; 759 760 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 761 762 if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) { // Backwards compatibility 763 $stylesheet = get_stylesheet_directory_uri() . '/_inc/css/adminbar.css'; 764 } else { 765 $stylesheet = buddypress()->plugin_url . "bp-core/css/buddybar{$min}.css"; 766 } 767 768 wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_buddybar_rtl_css', $stylesheet ), array(), bp_get_version() ); 769 $wp_styles->add_data( 'bp-admin-bar', 'rtl', true ); 770 if ( $min ) 771 $wp_styles->add_data( 'bp-admin-bar', 'suffix', $min ); 772 } 773 add_action( 'bp_init', 'bp_core_load_buddybar_css' ); 578 } 579 No newline at end of file -
src/bp-core/bp-core-component.php
diff --git a/src/bp-core/bp-core-component.php b/src/bp-core/bp-core-component.php index c16c17c..f7fba2b 100644
a b class BP_Component { 429 429 if ( defined( 'DOING_AJAX' ) ) 430 430 return; 431 431 432 // Do not proceed if BP_USE_WP_ADMIN_BAR constant is not set or is false433 if ( !bp_use_wp_admin_bar() )434 return;435 436 432 // Filter the passed admin nav 437 433 $wp_admin_nav = apply_filters( 'bp_' . $this->id . '_admin_nav', $wp_admin_nav ); 438 434 -
src/bp-core/bp-core-dependency.php
diff --git a/src/bp-core/bp-core-dependency.php b/src/bp-core/bp-core-dependency.php index eaf839c..2c2b1d2 100644
a b function bp_setup_nav() { 49 49 * Fire the 'bp_setup_admin_bar' action, where plugins should add items to the WP admin bar. 50 50 */ 51 51 function bp_setup_admin_bar() { 52 if ( bp_use_wp_admin_bar() ) 53 do_action( 'bp_setup_admin_bar' ); 52 do_action( 'bp_setup_admin_bar' ); 54 53 } 55 54 56 55 /** -
src/bp-core/bp-core-functions.php
diff --git a/src/bp-core/bp-core-functions.php b/src/bp-core/bp-core-functions.php index c22b882..28cd529 100644
a b function bp_is_username_compatibility_mode() { 308 308 /** 309 309 * Should we use the WP Toolbar? 310 310 * 311 * The WP Toolbar, introduced in WP 3.1, is fully supported in BuddyPress as 312 * of BP 1.5. For BP 1.6, the WP Toolbar is the default. 311 * The WP Toolbar, introduced in WP 3.1, is fully supported in BuddyPress as of BP 1.5. 313 312 * 314 313 * @since BuddyPress (1.5.0) 315 314 * … … function bp_is_username_compatibility_mode() { 319 318 * Default: true. 320 319 */ 321 320 function bp_use_wp_admin_bar() { 322 $use_admin_bar = true; 323 324 // Has the WP Toolbar constant been explicity set? 325 if ( defined( 'BP_USE_WP_ADMIN_BAR' ) && ! BP_USE_WP_ADMIN_BAR ) 326 $use_admin_bar = false; 327 328 // Has the admin chosen to use the BuddyBar during an upgrade? 329 elseif ( (bool) bp_get_option( '_bp_force_buddybar', false ) ) 330 $use_admin_bar = false; 331 332 return apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar ); 321 return apply_filters( 'bp_use_wp_admin_bar', true ); 333 322 } 334 323 335 324 /** Directory *****************************************************************/ -
src/bp-core/bp-core-options.php
diff --git a/src/bp-core/bp-core-options.php b/src/bp-core/bp-core-options.php index 8fe2eff..cc3453b 100644
a b function bp_get_default_options() { 81 81 // HeartBeat is on to refresh activities 82 82 '_bp_enable_heartbeat_refresh' => true, 83 83 84 /** BuddyBar **********************************************************/85 86 // Force the BuddyBar87 '_bp_force_buddybar' => false,88 89 84 /** Legacy theme *********************************************/ 90 85 91 86 // Whether to register the bp-default themes directory … … function bp_restrict_group_creation( $default = true ) { 521 516 } 522 517 523 518 /** 524 * Should the old BuddyBar be forced in place of the WP admin bar?525 *526 * @since BuddyPress (1.6.0)527 *528 * @uses bp_get_option() To get the BuddyBar option.529 *530 * @param bool $default Optional. Fallback value if not found in the database.531 * Default: true.532 * @return bool True if the BuddyBar should be forced on, otherwise false.533 */534 function bp_force_buddybar( $default = true ) {535 return (bool) apply_filters( 'bp_force_buddybar', (bool) bp_get_option( '_bp_force_buddybar', $default ) );536 }537 538 /**539 519 * Output the group forums root parent forum id. 540 520 * 541 521 * @since BuddyPress (1.6.0) -
deleted file src/bp-core/css/buddybar-rtl.css
diff --git a/src/bp-core/css/buddybar-rtl.css b/src/bp-core/css/buddybar-rtl.css deleted file mode 100644 index 67f5dcc..0000000
+ - 1 body:not(.wp-admin) {2 padding-top: 25px !important;3 }4 #wp-admin-bar {5 position: fixed;6 top: 0;7 right: 0;8 height: 25px;9 font-size: 11px;10 width: 100%;11 z-index: 9999;12 }13 #wp-admin-bar .padder {14 position: relative;15 padding: 0;16 width: 100%;17 margin: 0 auto;18 background: url('../images/60pc_black.png');19 height: 25px;20 }21 body#bp-default #wp-admin-bar .padder {22 max-width: 1250px;23 }24 #wp-admin-bar * {25 z-index: 999;26 }27 #wp-admin-bar div#admin-bar-logo {28 position: absolute;29 top: 5px;30 right: 10px;31 }32 #wp-admin-bar a img {33 border: none;34 }35 #wp-admin-bar li {36 list-style: none;37 margin: 0;38 padding: 0;39 line-height: 100%;40 text-align: right;41 }42 #wp-admin-bar li a {43 padding: 7px 15px 7px 15px;44 color: #eee;45 text-decoration: none;46 font-size: 11px;47 }48 #wp-admin-bar li.alt {49 border: none;50 }51 #wp-admin-bar li.no-arrow a {52 padding-left: 15px;53 }54 #wp-admin-bar ul li ul li a span {55 display: none;56 }57 #wp-admin-bar li:hover,58 #wp-admin-bar li.hover {59 position: static;60 }61 #admin-bar-logo {62 float: right;63 font-weight: bold;64 font-size: 11px;65 padding: 5px 8px;66 margin: 0;67 text-decoration: none;68 color: #fff;69 }70 body#bp-default #admin-bar-logo {71 padding: 2px 8px;72 }73 74 /* all lists */75 #wp-admin-bar ul {76 margin: 0;77 list-style: none;78 line-height: 1;79 cursor: pointer;80 height: auto;81 padding: 0;82 }83 84 /* all list items */85 #wp-admin-bar ul li {86 padding: 0;87 float: right;88 position: relative;89 background: url('../images/admin-menu-arrow.gif') 12% 53% no-repeat;90 padding-left: 11px;91 }92 #wp-admin-bar ul li.no-arrow {93 background: none;94 padding-left: 0;95 }96 #wp-admin-bar ul li ul li {97 background-image: none;98 }99 #wp-admin-bar ul li.align-right {100 position: absolute;101 left: 0;102 }103 #wp-admin-bar ul li a {104 display: block;105 }106 #wp-admin-bar ul.main-nav li:hover,107 #wp-admin-bar ul.main-nav li.sfhover,108 #wp-admin-bar ul.main-nav li ul li.sfhover {109 background-color: #333;110 }111 112 /* second-level lists */113 #wp-admin-bar ul li ul {114 position: absolute;115 width: 185px;116 right: -999em;117 margin-right: 0;118 background: #333;119 border: 1px solid #222;120 -moz-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);121 -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);122 -moz-border-radius: 3px;123 -webkit-border-radius: 3px;124 -moz-border-radius-topleft: 0;125 -webkit-border-top-right-radius: 0;126 -moz-border-radius-topright: 0;127 -webkit-border-top-left-radius: 0;128 }129 #wp-admin-bar ul li > ul {130 border-top: none;131 }132 #wp-admin-bar ul li ul a {133 color: #eee;134 }135 #wp-admin-bar ul li ul li {136 float: right;137 width: 174px;138 margin: 0;139 }140 #wp-admin-bar ul li ul li:hover a {141 color: #fff;142 }143 #wp-admin-bar ul li div.admin-bar-clear {144 clear: both;145 }146 #wp-admin-bar ul.main-nav li ul li:hover,147 #wp-admin-bar ul.main-nav li ul li.sfhover,148 #wp-admin-bar ul.main-nav li ul li.sfhover {149 background-color: #222;150 }151 152 /* third-and-above-level lists */153 #wp-admin-bar ul li ul ul {154 margin: -25px 184px 0 0;155 -moz-border-radius: 3px;156 -webkit-border-radius: 3px;157 }158 #wp-admin-bar ul li ul li:hover ul li a {159 color: #eee;160 }161 #wp-admin-bar ul li ul li ul li:hover a {162 color: #fff;163 }164 #wp-admin-bar ul li:hover ul,165 #wp-admin-bar ul li ul li:hover ul,166 #wp-admin-bar ul li.sfhover ul,167 #wp-admin-bar ul li ul li.sfhover ul {168 right: auto;169 }170 #wp-admin-bar ul li.align-right:hover ul {171 left: 0;172 }173 #wp-admin-bar ul li:hover ul ul,174 #wp-admin-bar li.sfhover ul li ul {175 right: -999em;176 }177 178 /* Menu item css */179 #wp-admin-bar img.avatar {180 float: right;181 margin-left: 8px;182 }183 #wp-admin-bar span.activity {184 display: block;185 margin-right: 34px;186 padding: 0;187 }188 #wp-admin-bar ul.author-list li a {189 height: 17px;190 }191 #wp-admin-bar ul li#bp-adminbar-notifications-menu a span {192 padding: 0 6px;193 margin-right: 2px;194 background: #fff;195 color: #000;196 -moz-border-radius: 3px;197 -webkit-border-radius: 3px;198 border-radius: 3px;199 }200 #wp-admin-bar-user-info img.avatar {201 height: 64px;202 width: 64px;203 }204 No newline at end of file -
deleted file src/bp-core/css/buddybar.css
diff --git a/src/bp-core/css/buddybar.css b/src/bp-core/css/buddybar.css deleted file mode 100644 index a53920f..0000000
+ - 1 body:not(.wp-admin) {2 padding-top: 25px !important;3 }4 #wp-admin-bar {5 position: fixed;6 top: 0;7 left: 0;8 height: 25px;9 font-size: 11px;10 width: 100%;11 z-index: 9999;12 }13 #wp-admin-bar .padder {14 position: relative;15 padding: 0;16 width: 100%;17 margin: 0 auto;18 background: url('../images/60pc_black.png');19 height: 25px;20 }21 body#bp-default #wp-admin-bar .padder {22 max-width: 1250px;23 }24 #wp-admin-bar * {25 z-index: 999;26 }27 #wp-admin-bar div#admin-bar-logo {28 position: absolute;29 top: 5px;30 left: 10px;31 }32 #wp-admin-bar a img {33 border: none;34 }35 #wp-admin-bar li {36 list-style: none;37 margin: 0;38 padding: 0;39 line-height: 100%;40 text-align: left;41 }42 #wp-admin-bar li a {43 padding: 7px 15px 7px 15px;44 color: #eee;45 text-decoration: none;46 font-size: 11px;47 }48 #wp-admin-bar li.alt {49 border: none;50 }51 #wp-admin-bar li.no-arrow a {52 padding-right: 15px;53 }54 #wp-admin-bar ul li ul li a span {55 display: none;56 }57 #wp-admin-bar li:hover,58 #wp-admin-bar li.hover {59 position: static;60 }61 #admin-bar-logo {62 float: left;63 font-weight: bold;64 font-size: 11px;65 padding: 5px 8px;66 margin: 0;67 text-decoration: none;68 color: #fff;69 }70 body#bp-default #admin-bar-logo {71 padding: 2px 8px;72 }73 74 /* all lists */75 #wp-admin-bar ul {76 margin: 0;77 list-style: none;78 line-height: 1;79 cursor: pointer;80 height: auto;81 padding: 0;82 }83 84 /* all list items */85 #wp-admin-bar ul li {86 padding: 0;87 float: left;88 position: relative;89 background: url('../images/admin-menu-arrow.gif') 88% 53% no-repeat;90 padding-right: 11px;91 }92 #wp-admin-bar ul li.no-arrow {93 background: none;94 padding-right: 0;95 }96 #wp-admin-bar ul li ul li {97 background-image: none;98 }99 #wp-admin-bar ul li.align-right {100 position: absolute;101 right: 0;102 }103 #wp-admin-bar ul li a {104 display: block;105 }106 #wp-admin-bar ul.main-nav li:hover,107 #wp-admin-bar ul.main-nav li.sfhover,108 #wp-admin-bar ul.main-nav li ul li.sfhover {109 background-color: #333;110 }111 112 /* second-level lists */113 #wp-admin-bar ul li ul {114 position: absolute;115 width: 185px;116 left: -999em;117 margin-left: 0;118 background: #333;119 border: 1px solid #222;120 -moz-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);121 -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);122 -moz-border-radius: 3px;123 -webkit-border-radius: 3px;124 -moz-border-radius-topleft: 0;125 -webkit-border-top-left-radius: 0;126 -moz-border-radius-topright: 0;127 -webkit-border-top-right-radius: 0;128 }129 #wp-admin-bar ul li > ul {130 border-top: none;131 }132 #wp-admin-bar ul li ul a {133 color: #eee;134 }135 #wp-admin-bar ul li ul li {136 float: left;137 width: 174px;138 margin: 0;139 }140 #wp-admin-bar ul li ul li:hover a {141 color: #fff;142 }143 #wp-admin-bar ul li div.admin-bar-clear {144 clear: both;145 }146 #wp-admin-bar ul.main-nav li ul li:hover,147 #wp-admin-bar ul.main-nav li ul li.sfhover,148 #wp-admin-bar ul.main-nav li ul li.sfhover {149 background-color: #222;150 }151 152 /* third-and-above-level lists */153 #wp-admin-bar ul li ul ul {154 margin: -25px 0 0 184px;155 -moz-border-radius: 3px;156 -webkit-border-radius: 3px;157 }158 #wp-admin-bar ul li ul li:hover ul li a {159 color: #eee;160 }161 #wp-admin-bar ul li ul li ul li:hover a {162 color: #fff;163 }164 #wp-admin-bar ul li:hover ul,165 #wp-admin-bar ul li ul li:hover ul,166 #wp-admin-bar ul li.sfhover ul,167 #wp-admin-bar ul li ul li.sfhover ul {168 left: auto;169 }170 #wp-admin-bar ul li.align-right:hover ul {171 right: 0;172 }173 #wp-admin-bar ul li:hover ul ul,174 #wp-admin-bar li.sfhover ul li ul {175 left: -999em;176 }177 178 /* Menu item css */179 #wp-admin-bar img.avatar {180 float: left;181 margin-right: 8px;182 }183 #wp-admin-bar span.activity {184 display: block;185 margin-left: 34px;186 padding: 0;187 }188 #wp-admin-bar ul.author-list li a {189 height: 17px;190 }191 #wp-admin-bar ul li#bp-adminbar-notifications-menu a span {192 padding: 0 6px;193 margin-left: 2px;194 background: #fff;195 color: #000;196 -moz-border-radius: 3px;197 -webkit-border-radius: 3px;198 border-radius: 3px;199 }200 #wp-admin-bar-user-info img.avatar {201 height: 64px;202 width: 64px;203 }204 No newline at end of file -
src/bp-core/deprecated/2.1.php
diff --git a/src/bp-core/deprecated/2.1.php b/src/bp-core/deprecated/2.1.php index a6b8133..baaa4fa 100644
a b function bp_core_register_deprecated_styles() { 54 54 wp_register_style( $id, $url . $file . $ext, array(), bp_get_version() ); 55 55 } 56 56 } 57 add_action( 'bp_enqueue_scripts', 'bp_core_register_deprecated_styles', 1 ); 58 No newline at end of file 57 add_action( 'bp_enqueue_scripts', 'bp_core_register_deprecated_styles', 1 ); 58 59 /** 60 * Enqueue the BuddyBar CSS. 61 * 62 * @deprecated BuddyPress (2.1.0) 63 */ 64 function bp_core_load_buddybar_css() { 65 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 66 } 67 68 /** 69 * Output the BuddyBar logo. 70 * 71 * @deprecated BuddyPress (2.1.0) 72 */ 73 function bp_adminbar_logo() { 74 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 75 } 76 77 /** 78 * Output the "Log In" and "Sign Up" names to the BuddyBar. 79 * 80 * @deprecated BuddyPress (2.1.0) 81 */ 82 function bp_adminbar_login_menu() { 83 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 84 } 85 86 /** 87 * Output the My Account BuddyBar menu. 88 * 89 * @deprecated BuddyPress (2.1.0) 90 */ 91 function bp_adminbar_account_menu() { 92 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 93 } 94 95 /** 96 * @deprecated BuddyPress (2.1.0) 97 */ 98 function bp_adminbar_thisblog_menu() { 99 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 100 } 101 102 /** 103 * Output the Random BuddyBar menu. 104 * 105 * @deprecated BuddyPress (2.1.0) 106 */ 107 function bp_adminbar_random_menu() { 108 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 109 } 110 111 /** 112 * Wrapper function for rendering the BuddyBar. 113 * 114 * @deprecated BuddyPress (2.1.0) 115 */ 116 function bp_core_admin_bar() { 117 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 118 } 119 120 /** 121 * Add a Sites menu to the BuddyBar. 122 * 123 * @deprecated BuddyPress (2.1.0) 124 * @since BuddyPress (1.0.0) 125 */ 126 function bp_adminbar_blogs_menu() { 127 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 128 } 129 130 /** 131 * Add menu items to the BuddyBar. 132 * 133 * @deprecated BuddyPress (2.1.0) 134 * @since BuddyPress (1.0.0) 135 */ 136 function bp_groups_adminbar_admin_menu() { 137 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 138 } 139 140 /** 141 * Add the Notifications menu to the BuddyBar. 142 * 143 * @deprecated BuddyPress (2.1.0) 144 */ 145 function bp_adminbar_notifications_menu() { 146 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 147 } 148 149 /** 150 * Add the Blog Authors menu to the BuddyBar (visible when not logged in). 151 * 152 * @deprecated BuddyPress (2.1.0) 153 */ 154 function bp_adminbar_authors_menu() { 155 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 156 } 157 158 /** 159 * Add a member admin menu to the BuddyBar. 160 * 161 * @deprecated BuddyPress (2.1.0) 162 */ 163 function bp_members_adminbar_admin_menu() { 164 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 165 } 166 167 /** 168 * Create the Notifications menu for the BuddyBar. 169 * 170 * @deprecated BuddyPress (2.1.0) 171 * @since BuddyPress (1.9.0) 172 */ 173 function bp_notifications_buddybar_menu() { 174 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 175 } 176 177 /** 178 * Should the old BuddyBar be forced in place of the WP admin bar? 179 * 180 * @param bool $deprecated Deprecated parameter. Not used. 181 * @return bool True if the BuddyBar should be forced on, otherwise false. 182 * @since BuddyPress (1.6.0) 183 */ 184 function bp_force_buddybar( $deprecated = true ) { 185 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 186 return false; 187 } 188 189 /** 190 * If user has upgraded to 1.6 and chose to retain their BuddyBar, offer them a switch to change over 191 * to the WP Toolbar. 192 * 193 * @deprecated BuddyPress (2.1.0) 194 * @since BuddyPress (1.6) 195 */ 196 function bp_admin_setting_callback_force_buddybar() { 197 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 198 } 199 200 /** 201 * Sanitization for _bp_force_buddybar 202 * 203 * @access Private 204 * @return in 205 * @since BuddyPress (1.6) 206 */ 207 function bp_admin_sanitize_callback_force_buddybar( $value = false ) { 208 _deprecated_function( __FUNCTION__, '2.1', 'No longer used.' ); 209 return 0; 210 } -
deleted file src/bp-groups/bp-groups-buddybar.php
diff --git a/src/bp-core/images/60pc_black.png b/src/bp-core/images/60pc_black.png deleted file mode 100644 index d5d91f0..0000000 Binary files a/src/bp-core/images/60pc_black.png and /dev/null differ diff --git a/src/bp-core/images/admin-menu-arrow.gif b/src/bp-core/images/admin-menu-arrow.gif deleted file mode 100644 index 3d8299f..0000000 Binary files a/src/bp-core/images/admin-menu-arrow.gif and /dev/null differ diff --git a/src/bp-groups/bp-groups-buddybar.php b/src/bp-groups/bp-groups-buddybar.php deleted file mode 100644 index 6ce1764..0000000
+ - 1 <?php2 3 /**4 * BuddyPress Groups BuddyBar5 *6 * @package BuddyPress7 * @subpackage GroupsBuddyBar8 */9 10 // Exit if accessed directly11 if ( !defined( 'ABSPATH' ) ) exit;12 13 /**14 * Add menu items to the BuddyBar.15 *16 * @since BuddyPress (1.0.0)17 *18 * @global BuddyPress $bp19 */20 function bp_groups_adminbar_admin_menu() {21 global $bp;22 23 if ( empty( $bp->groups->current_group ) )24 return false;25 26 // Only group admins and site admins can see this menu27 if ( !current_user_can( 'edit_users' ) && !bp_current_user_can( 'bp_moderate' ) && !bp_is_item_admin() )28 return false; ?>29 30 <li id="bp-adminbar-adminoptions-menu">31 <a href="<?php bp_groups_action_link( 'admin' ); ?>"><?php _e( 'Admin Options', 'buddypress' ); ?></a>32 33 <ul>34 <li><a href="<?php bp_groups_action_link( 'admin/edit-details' ); ?>"><?php _e( 'Edit Details', 'buddypress' ); ?></a></li>35 36 <li><a href="<?php bp_groups_action_link( 'admin/group-settings' ); ?>"><?php _e( 'Group Settings', 'buddypress' ); ?></a></li>37 38 <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>39 40 <li><a href="<?php bp_groups_action_link( 'admin/group-avatar' ); ?>"><?php _e( 'Group Avatar', 'buddypress' ); ?></a></li>41 42 <?php endif; ?>43 44 <?php if ( bp_is_active( 'friends' ) ) : ?>45 46 <li><a href="<?php bp_groups_action_link( 'send-invites' ); ?>"><?php _e( 'Manage Invitations', 'buddypress' ); ?></a></li>47 48 <?php endif; ?>49 50 <li><a href="<?php bp_groups_action_link( 'admin/manage-members' ); ?>"><?php _e( 'Manage Members', 'buddypress' ); ?></a></li>51 52 <?php if ( $bp->groups->current_group->status == 'private' ) : ?>53 54 <li><a href="<?php bp_groups_action_link( 'admin/membership-requests' ); ?>"><?php _e( 'Membership Requests', 'buddypress' ); ?></a></li>55 56 <?php endif; ?>57 58 <li><a class="confirm" href="<?php echo wp_nonce_url( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/delete-group/', 'groups_delete_group' ); ?>&delete-group-button=1&delete-group-understand=1"><?php _e( "Delete Group", 'buddypress' ) ?></a></li>59 60 <?php do_action( 'bp_groups_adminbar_admin_menu' ) ?>61 62 </ul>63 </li>64 65 <?php66 }67 add_action( 'bp_adminbar_menus', 'bp_groups_adminbar_admin_menu', 20 ); -
src/bp-groups/bp-groups-loader.php
diff --git a/src/bp-groups/bp-groups-loader.php b/src/bp-groups/bp-groups-loader.php index 0086696..9dbc3f2 100644
a b class BP_Groups_Component extends BP_Component { 102 102 'widgets', 103 103 'activity', 104 104 'template', 105 'buddybar',106 105 'adminbar', 107 106 'functions', 108 107 'notifications' … … class BP_Groups_Component extends BP_Component { 350 349 } 351 350 352 351 /** 353 * Set up BuddyBarnavigation352 * Set up navigation 354 353 * 355 354 * @global BuddyPress $bp The one true BuddyPress instance 356 355 */ -
src/bp-groups/bp-groups-notifications.php
diff --git a/src/bp-groups/bp-groups-notifications.php b/src/bp-groups/bp-groups-notifications.php index 8f50541..b3398b2 100644
a b To view %5$s\'s profile visit: %6$s 309 309 /** Notifications *************************************************************/ 310 310 311 311 /** 312 * Format the BuddyBar/Toolbar notifications for the Groups component312 * Format the Toolbar notifications for the Groups component 313 313 * 314 314 * @since BuddyPress (1.0) 315 315 * @param string $action The kind of notification being rendered -
deleted file src/bp-members/bp-members-buddybar.php
diff --git a/src/bp-members/bp-members-buddybar.php b/src/bp-members/bp-members-buddybar.php deleted file mode 100644 index 2b3217c..0000000
+ - 1 <?php2 3 /**4 * BuddyPress Members BuddyBar5 *6 * Handles the member functions related to the BuddyBar.7 *8 * @package BuddyPress9 * @subpackage MembersBuddyBar10 */11 12 // Exit if accessed directly13 if ( !defined( 'ABSPATH' ) ) exit;14 15 /**16 * Add the Notifications menu to the BuddyBar.17 */18 function bp_adminbar_notifications_menu() {19 20 // Bail if notifications is not active21 if ( ! bp_is_active( 'notifications' ) ) {22 return false;23 }24 25 bp_notifications_buddybar_menu();26 }27 add_action( 'bp_adminbar_menus', 'bp_adminbar_notifications_menu', 8 );28 29 /**30 * Add the Blog Authors menu to the BuddyBar (visible when not logged in).31 */32 function bp_adminbar_authors_menu() {33 global $wpdb;34 35 // Only for multisite36 if ( !is_multisite() )37 return false;38 39 // Hide on root blog40 if ( $wpdb->blogid == bp_get_root_blog_id() || !bp_is_active( 'blogs' ) )41 return false;42 43 $blog_prefix = $wpdb->get_blog_prefix( $wpdb->blogid );44 $authors = $wpdb->get_results( "SELECT user_id, user_login, user_nicename, display_name, user_email, meta_value as caps FROM $wpdb->users u, $wpdb->usermeta um WHERE u.ID = um.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY um.user_id" );45 46 if ( !empty( $authors ) ) {47 // This is a blog, render a menu with links to all authors48 echo '<li id="bp-adminbar-authors-menu"><a href="/">';49 _e('Blog Authors', 'buddypress');50 echo '</a>';51 52 echo '<ul class="author-list">';53 foreach( (array) $authors as $author ) {54 $caps = maybe_unserialize( $author->caps );55 if ( isset( $caps['subscriber'] ) || isset( $caps['contributor'] ) ) continue;56 57 echo '<li>';58 echo '<a href="' . bp_core_get_user_domain( $author->user_id, $author->user_nicename, $author->user_login ) . '">';59 echo bp_core_fetch_avatar( array(60 'item_id' => $author->user_id,61 'email' => $author->user_email,62 'width' => 15,63 'height' => 15,64 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $author->display_name )65 ) );66 echo ' ' . $author->display_name . '</a>';67 echo '<div class="admin-bar-clear"></div>';68 echo '</li>';69 }70 echo '</ul>';71 echo '</li>';72 }73 }74 add_action( 'bp_adminbar_menus', 'bp_adminbar_authors_menu', 12 );75 76 /**77 * Add a member admin menu to the BuddyBar.78 *79 * Adds an Toolbar menu to any profile page providing site moderator actions80 * that allow capable users to clean up a users account.81 */82 function bp_members_adminbar_admin_menu() {83 84 // Only show if viewing a user85 if ( !bp_displayed_user_id() )86 return false;87 88 // Don't show this menu to non site admins or if you're viewing your own profile89 if ( !current_user_can( 'edit_users' ) || bp_is_my_profile() )90 return false; ?>91 92 <li id="bp-adminbar-adminoptions-menu">93 94 <a href=""><?php _e( 'Admin Options', 'buddypress' ) ?></a>95 96 <ul>97 <?php if ( bp_is_active( 'xprofile' ) ) : ?>98 99 <li><a href="<?php bp_members_component_link( 'profile', 'edit' ); ?>"><?php printf( __( "Edit %s's Profile", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ) ?></a></li>100 101 <?php endif ?>102 103 <li><a href="<?php bp_members_component_link( 'profile', 'change-avatar' ); ?>"><?php printf( __( "Edit %s's Avatar", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ) ?></a></li>104 105 <li><a href="<?php bp_members_component_link( 'settings', 'capabilities' ); ?>"><?php _e( 'User Capabilities', 'buddypress' ); ?></a></li>106 107 <li><a href="<?php bp_members_component_link( 'settings', 'delete-account' ); ?>"><?php printf( __( "Delete %s's Account", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ); ?></a></li>108 109 <?php do_action( 'bp_members_adminbar_admin_menu' ) ?>110 111 </ul>112 </li>113 114 <?php115 }116 add_action( 'bp_adminbar_menus', 'bp_members_adminbar_admin_menu', 20 ); -
src/bp-members/bp-members-loader.php
diff --git a/src/bp-members/bp-members-loader.php b/src/bp-members/bp-members-loader.php index 2685000..9741d94 100644
a b class BP_Members_Component extends BP_Component { 44 44 'filters', 45 45 'screens', 46 46 'template', 47 'buddybar',48 47 'adminbar', 49 48 'functions', 50 49 'notifications', -
src/bp-messages/bp-messages-notifications.php
diff --git a/src/bp-messages/bp-messages-notifications.php b/src/bp-messages/bp-messages-notifications.php index bb0118f..912605b 100644
a b add_action( 'messages_message_sent', 'messages_notification_new_message', 10 ); 108 108 /** Notifications *************************************************************/ 109 109 110 110 /** 111 * Format the BuddyBar/Toolbar notifications for the Messages component.111 * Format the Toolbar notifications for the Messages component. 112 112 * 113 113 * @since BuddyPress (1.0.0) 114 114 * -
deleted file src/bp-notifications/bp-notifications-buddybar.php
diff --git a/src/bp-notifications/bp-notifications-buddybar.php b/src/bp-notifications/bp-notifications-buddybar.php deleted file mode 100644 index d49bd94..0000000
+ - 1 <?php2 3 /**4 * BuddyPress Notifications Navigational Functions.5 *6 * Sets up navigation elements, including BuddyBar functionality, for the7 * Notifications component.8 *9 * @package BuddyPress10 * @subpackage NotificationsBuddyBar11 */12 13 // Exit if accessed directly14 if ( !defined( 'ABSPATH' ) ) exit;15 16 /**17 * Create the Notifications menu for the BuddyBar.18 *19 * @since BuddyPress (1.9.0)20 */21 function bp_notifications_buddybar_menu() {22 23 if ( ! is_user_logged_in() ) {24 return false;25 }26 27 echo '<li id="bp-adminbar-notifications-menu"><a href="' . esc_url( bp_loggedin_user_domain() ) . '">';28 _e( 'Notifications', 'buddypress' );29 30 if ( $notification_count = bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) ) : ?>31 <span><?php echo bp_core_number_format( $notification_count ); ?></span>32 <?php33 endif;34 35 echo '</a>';36 echo '<ul>';37 38 if ( $notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id() ) ) {39 $counter = 0;40 for ( $i = 0, $count = count( $notifications ); $i < $count; ++$i ) {41 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>42 43 <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>44 45 <?php $counter++;46 }47 } else { ?>48 49 <li><a href="<?php echo esc_url( bp_loggedin_user_domain() ); ?>"><?php _e( 'No new notifications.', 'buddypress' ); ?></a></li>50 51 <?php52 }53 54 echo '</ul>';55 echo '</li>';56 }57 add_action( 'bp_adminbar_menus', 'bp_adminbar_notifications_menu', 8 ); -
src/bp-notifications/bp-notifications-loader.php
diff --git a/src/bp-notifications/bp-notifications-loader.php b/src/bp-notifications/bp-notifications-loader.php index ab44069..8dde6f1 100644
a b class BP_Notifications_Component extends BP_Component { 46 46 'classes', 47 47 'screens', 48 48 'adminbar', 49 'buddybar',50 49 'template', 51 50 'functions', 52 51 'cache', -
src/bp-settings/bp-settings-loader.php
diff --git a/src/bp-settings/bp-settings-loader.php b/src/bp-settings/bp-settings-loader.php index 8d97f5a..0b6f0c9 100644
a b class BP_Settings_Component extends BP_Component { 64 64 } 65 65 66 66 /** 67 * Set up BuddyBarnavigation67 * Set up navigation 68 68 */ 69 69 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { 70 70 -
deleted file src/bp-xprofile/bp-xprofile-buddybar.php
diff --git a/src/bp-xprofile/bp-xprofile-buddybar.php b/src/bp-xprofile/bp-xprofile-buddybar.php deleted file mode 100644 index 1cd870d..0000000
+ - 1 <?php2 3 // Exit if accessed directly4 if ( !defined( 'ABSPATH' ) ) exit; -
src/bp-xprofile/bp-xprofile-loader.php
diff --git a/src/bp-xprofile/bp-xprofile-loader.php b/src/bp-xprofile/bp-xprofile-loader.php index f8b5c91..84d552d 100644
a b class BP_XProfile_Component extends BP_Component { 63 63 'filters', 64 64 'settings', 65 65 'template', 66 'buddybar',67 66 'functions', 68 67 ); 69 68 … … class BP_XProfile_Component extends BP_Component { 156 155 } 157 156 158 157 /** 159 * Set up BuddyBarnavigation158 * Set up navigation 160 159 * 161 160 * @global BuddyPress $bp The one true BuddyPress instance 162 161 */