Skip to:
Content

BuddyPress.org

Ticket #8229: 8229.patch

File 8229.patch, 5.0 KB (added by passoniate, 5 years ago)

Patch

  • src/bp-core/deprecated/2.0.php

     
    77 * @deprecated 2.0.0
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
    1313/**
  • src/bp-core/deprecated/2.1.php

     
    77 * @deprecated 2.1.0
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
    1313/**
     
    189189
    190190        echo '<li class="bp-login no-arrow"><a href="' . wp_login_url() . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';
    191191
    192         // Show "Sign Up" link if user registrations are allowed
     192        // Show "Sign Up" link if user registrations are allowed.
    193193        if ( bp_get_signup_allowed() ) {
    194194                echo '<li class="bp-signup no-arrow"><a href="' . bp_get_signup_page() . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>';
    195195        }
     
    213213        echo __( 'My Account', 'buddypress' ) . '</a>';
    214214        echo '<ul>';
    215215
    216         // Loop through each navigation item
     216        // Loop through each navigation item.
    217217        $counter = 0;
    218218        foreach( (array) $bp->bp_nav as $nav_item ) {
    219219                $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';
     
    326326
    327327        $min = bp_core_get_minified_asset_suffix();
    328328
    329         if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) { // Backwards compatibility
     329        if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) { // Backwards compatibility.
    330330                $stylesheet = get_stylesheet_directory_uri() . '/_inc/css/adminbar.css';
    331331        } else {
    332332                $stylesheet = buddypress()->plugin_url . "bp-core/css/buddybar{$min}.css";
     
    355355                return false;
    356356        }
    357357
    358         // Only group admins and site admins can see this menu
     358        // Only group admins and site admins can see this menu.
    359359        if ( !current_user_can( 'edit_users' ) && !bp_current_user_can( 'bp_moderate' ) && !bp_is_item_admin() ) {
    360360                return false;
    361361        } ?>
     
    406406 */
    407407function bp_adminbar_notifications_menu() {
    408408
    409         // Bail if notifications is not active
     409        // Bail if notifications is not active.
    410410        if ( ! bp_is_active( 'notifications' ) ) {
    411411                return false;
    412412        }
     
    423423function bp_adminbar_authors_menu() {
    424424        global $wpdb;
    425425
    426         // Only for multisite
     426        // Only for multisite.
    427427        if ( ! is_multisite() ) {
    428428                return false;
    429429        }
    430430
    431         // Hide on root blog
     431        // Hide on root blog.
    432432        if ( bp_is_root_blog( $wpdb->blogid ) || ! bp_is_active( 'blogs' ) ) {
    433433                return false;
    434434        }
     
    437437        $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" );
    438438
    439439        if ( !empty( $authors ) ) {
    440                 // This is a blog, render a menu with links to all authors
     440                // This is a blog, render a menu with links to all authors.
    441441                echo '<li id="bp-adminbar-authors-menu"><a href="/">';
    442442                _e('Blog Authors', 'buddypress');
    443443                echo '</a>';
     
    478478 */
    479479function bp_members_adminbar_admin_menu() {
    480480
    481         // Only show if viewing a user
     481        // Only show if viewing a user.
    482482        if ( ! bp_displayed_user_id() ) {
    483483                return false;
    484484        }
    485485
    486         // Don't show this menu to non site admins or if you're viewing your own profile
     486        // Don't show this menu to non site admins or if you're viewing your own profile.
    487487        if ( !current_user_can( 'edit_users' ) || bp_is_my_profile() ) {
    488488                return false;
    489489        } ?>
  • src/bp-core/deprecated/2.2.php

     
    77 * @deprecated 2.2.0
    88 */
    99
    10 // Exit if accessed directly
     10// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
    1313/**
     
    2222 * @since 2.0.0
    2323 * @deprecated 2.2.0
    2424 *
    25  * @todo Support untrashing better
     25 * @todo Support untrashing better.
    2626 *
    2727 * @param string $new_status New status for the post.
    2828 * @param string $old_status Old status for the post.
     
    9696}
    9797
    9898/**
    99  * Add 'bp' to global group of network wide cachable objects.
     99 * Add 'bp' to global group of network wide catchable objects.
    100100 *
    101101 * @since 1.1.0
    102102 * @deprecated 2.2.0
  • src/bp-core/deprecated/2.5.php

     
    7979                $to_changed     = true;
    8080
    8181                $value          = array_shift( $original_value );
    82                 $recipient_name = $value->get_name();     // Value - name
    83                 $value          = $value->get_address();  // Key   - email
     82                $recipient_name = $value->get_name();     // Value - name.
     83                $value          = $value->get_address();  // Key   - email.
    8484        }
    8585
    8686        if ( $email_type === 'activity-comment' ) {