Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/29/2021 08:31:02 AM (5 years ago)
Author:
imath
Message:

Member Invites: add missing /* translators: */ inline comments

This commit also:

  • adds some tiny improvements to get along with WP Coding Standards,
  • removes a forgotten PHP notice using the right $args variable instead of the undefined $all_args one in bp_members_invitations_get_registration_welcome_message()
  • removes an extra <hr class="wp-header-end"> into the Manage Invitations Admin screen that was causing admin notices to appear twice.
  • Uses the wpautop() function instead of an inexisting wpautop filter into bp_members_invitations_add_legacy_welcome_message() and bp_members_invitations_add_legacy_registration_disabled_message().

Huge Props dcavins for this awesome new feature!

See #8139

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/classes/class-bp-members-invitations-list-table.php

    r12927 r12930  
    6767
    6868                $args = array(
    69                         'invite_sent'       => 'all',
    70                         'accepted'          => 'all',
    71                         'search_terms'      => $search,
    72                         'order_by'          => 'date_modified',
    73                         'sort_order'        => 'DESC',
    74                         'page'              => $paged,
    75                         'per_page'          => $per_page,
     69                        'invite_sent'  => 'all',
     70                        'accepted'     => 'all',
     71                        'search_terms' => $search,
     72                        'order_by'     => 'date_modified',
     73                        'sort_order'   => 'DESC',
     74                        'page'         => $paged,
     75                        'per_page'     => $per_page,
    7676                );
    7777
     
    123123                ?>
    124124
    125                 <h2 class="screen-reader-text"><?php
     125                <h2 class="screen-reader-text">
     126                        <?php
    126127                        /* translators: accessibility text */
    127128                        esc_html_e( 'Filter invitations list', 'buddypress' );
    128                 ?></h2>
     129                        ?>
     130                </h2>
    129131                <ul class="subsubsub">
    130132                        <li class="all">
     
    199201                 * @param array $value Array of columns to display.
    200202                 */
    201                 return apply_filters( 'bp_members_invitations_list_columns', array(
    202                         'cb'                       => '<input type="checkbox" />',
    203                         'invitee_email'            => __( 'Invitee', 'buddypress' ),
    204                         'username'                 => __( 'Inviter', 'buddypress' ),
    205                         'inviter_registered_date'  => __( 'Inviter Registered', 'buddypress' ),
    206                         'invitation_date_modified' => __( 'Date Modified', 'buddypress' ),
    207                         'invitation_sent'          => __( 'Email Sent', 'buddypress' ),
    208                         'invitation_accepted'      => __( 'Accepted', 'buddypress' )
    209                 ) );
     203                return apply_filters(
     204                        'bp_members_invitations_list_columns',
     205                        array(
     206                                'cb'                       => '<input type="checkbox" />',
     207                                'invitee_email'            => __( 'Invitee', 'buddypress' ),
     208                                'username'                 => __( 'Inviter', 'buddypress' ),
     209                                'inviter_registered_date'  => __( 'Inviter Registered', 'buddypress' ),
     210                                'invitation_date_modified' => __( 'Date Modified', 'buddypress' ),
     211                                'invitation_sent'          => __( 'Email Sent', 'buddypress' ),
     212                                'invitation_accepted'      => __( 'Accepted', 'buddypress' )
     213                        )
     214                );
    210215        }
    211216
     
    239244                        esc_html_e( 'No invitations found.', 'buddypress' );
    240245                } else {
    241                         $link = sprintf( '<a href="%1$s">%2$s</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-settings' ), 'admin.php' ) ) ), esc_html__( 'Edit settings', 'buddypress' ) );
     246                        $link = sprintf(
     247                                '<a href="%1$s">%2$s</a>',
     248                                esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-settings' ), 'admin.php' ) ) ),
     249                                esc_html__( 'Edit settings', 'buddypress' )
     250                        );
    242251
    243252                        /* translators: %s: url to site settings */
     
    302311         */
    303312        public function column_cb( $invite = null ) {
    304         ?>
    305                 <label class="screen-reader-text" for="invitation_<?php echo intval( $invite->id ); ?>"><?php
    306                         /* translators: accessibility text */
    307                         printf( esc_html__( 'Select invitation: %s', 'buddypress' ), $invite->id );
    308                 ?></label>
     313                ?>
     314                <label class="screen-reader-text" for="invitation_<?php echo intval( $invite->id ); ?>">
     315                        <?php
     316                                /* translators: accessibility text */
     317                                printf( esc_html__( 'Select invitation: %s', 'buddypress' ), $invite->id );
     318                        ?>
     319                </label>
    309320                <input type="checkbox" id="invitation_<?php echo intval( $invite->id ) ?>" name="invite_ids[]" value="<?php echo esc_attr( $invite->id ) ?>" />
    310321                <?php
Note: See TracChangeset for help on using the changeset viewer.