Skip to:
Content

BuddyPress.org

Ticket #8529: 8529.patch

File 8529.patch, 3.7 KB (added by imath, 5 years ago)
  • src/bp-core/classes/class-bp-admin.php

    diff --git src/bp-core/classes/class-bp-admin.php src/bp-core/classes/class-bp-admin.php
    index 7c957ffe5..ffa8d7b92 100644
    class BP_Admin { 
    761761                                                <?php
    762762                                                printf(
    763763                                                        /* translators: 1: heart dashicons. 2: BP Credits screen url. 3: number of BuddyPress contributors to this version. */
    764                                                         _n( 'Built with %1$s by <a href="%2$s">%3$d volunteer</a>.', 'Built with %1$s by <a href="%2$s">%3$d volunteers</a>.', 18, 'buddypress' ),
     764                                                        _n( 'Built with %1$s by <a href="%2$s">%3$d volunteer</a>.', 'Built with %1$s by <a href="%2$s">%3$d volunteers</a>.', 19, 'buddypress' ),
    765765                                                        '<span class="dashicons dashicons-heart"></span>',
    766766                                                        esc_url( bp_get_admin_url( 'admin.php?page=bp-credits' ) ),
    767                                                         number_format_i18n( 18 )
     767                                                        number_format_i18n( 19 )
    768768                                                );
    769769                                                ?>
    770770                                        </p>
    class BP_Admin { 
    948948                                <a href="https://profiles.wordpress.org/sbrajesh/">Brajesh Singh (sbrajesh)</a>,
    949949                                <a href="https://profiles.wordpress.org/dcavins/">David Cavins (dcavins)</a>,
    950950                                <a href="https://profiles.wordpress.org/johnjamesjacoby/">John James Jacoby (johnjamesjacoby)</a>,
     951                                <a href="https://profiles.wordpress.org/leahkoerper/">leahkoerper</a>,
    951952                                <a href="https://profiles.wordpress.org/imath/">Mathieu Viet (imath)</a>,
    952953                                <a href="https://profiles.wordpress.org/modemlooper/">modemlooper</a>,
    953954                                <a href="https://profiles.wordpress.org/niftythree/">Nifty (niftythree)</a>,
  • src/bp-members/admin/js/admin.js

    diff --git src/bp-members/admin/js/admin.js src/bp-members/admin/js/admin.js
    index 6876a6b62..43f100497 100644
     
    22
    33( function( $ ) {
    44        // Profile Visibility Settings
    5 
    65        $( '.visibility-toggle-link' ).on( 'click', function( event ) {
    76                event.preventDefault();
    87
    98                $( this ).attr( 'aria-expanded', 'true' ).parent().hide()
    10                         .siblings( '.field-visibility-settings' ).show();
     9                             .siblings( '.field-visibility-settings' ).show();
    1110        } );
    1211
    1312        $( '.field-visibility-settings-close' ).on( 'click', function( event ) {
    1413                event.preventDefault();
    1514
    16                  $( '.visibility-toggle-link' ).attr( 'aria-expanded', 'false' );
     15                $( '.visibility-toggle-link' ).attr( 'aria-expanded', 'false' );
    1716
    18                 var settings_div = $(this).parent(),
    19                 vis_setting_text = settings_div.find( 'input:checked' ).parent().text();
     17                var settings_div = $( this ).parent(),
     18                    vis_setting_text = settings_div.find( 'input:checked' ).parent().text();
    2019
    2120                settings_div.hide()
    22                         .siblings( '.field-visibility-settings-toggle' )
    23                                 .children( '.current-visibility-level' ).text( vis_setting_text ).end()
    24                         .show();
     21                                .siblings( '.field-visibility-settings-toggle' )
     22                                .find( '.current-visibility-level' ).text( vis_setting_text ).end()
     23                                .show();
    2524        } );
    2625
    2726} )( jQuery );
  • src/bp-xprofile/classes/class-bp-xprofile-user-admin.php

    diff --git src/bp-xprofile/classes/class-bp-xprofile-user-admin.php src/bp-xprofile/classes/class-bp-xprofile-user-admin.php
    index ef71072c5..034bd666e 100644
    class BP_XProfile_User_Admin { 
    271271                }
    272272
    273273                $r = bp_parse_args( $args['args'], array(
    274                         'profile_group_id' => 0,
    275                         'user_id'          => $user->ID,
    276                         'hide_field_types' => array( 'wp-textbox', 'wp-biography' ),
     274                        'profile_group_id'       => 0,
     275                        'user_id'                => $user->ID,
     276                        'hide_field_types'       => array( 'wp-textbox', 'wp-biography' ),
     277                        'fetch_visibility_level' => bp_current_user_can( 'bp_moderate' ) || (int) $user->ID === (int) get_current_user_id(),
    277278                ), 'bp_xprofile_user_admin_profile_loop_args' );
    278279
    279280                // We really need these args.