buddypress / next-template-packs

is this the next BuddyPress template pack?
35 stars 9 forks source link

Replace esc_attr_e() with ex() for text in buttons for Send Invites #123

Closed mercime closed 7 years ago

mercime commented 7 years ago

bp-nouveau/buddypress/_accessoires/invites/index.php: from:

    <div class="action">
        <button  type="button" id="bp-invites-reset" class="button bp-secondary-action" ><?php esc_attr_e( 'Cancel', 'bp-nouveau' ); ?></button>
        <button type="button" id="bp-invites-send" class="button bp-primary-action"  ><?php esc_attr_e( 'Send', 'bp-nouveau' ); ?></button>
    </div>

to

    <div class="action">
        <button  type="button" id="bp-invites-reset" class="button bp-secondary-action" ><?php _ex( 'Cancel',  Cancel invitation', 'bp-nouveau' ); ?></button>
        <button type="button" id="bp-invites-send" class="button bp-primary-action"  ><?php _ex( 'Send',  Send invitation', 'bp-nouveau' ); ?></button>
    </div>
hnla commented 7 years ago

Are we sure about _ex() I'm not familiar with these other than the basic ones, but noted a slight warning about not all editors handling 'context' strings, I haven't looked in depth at a lot of these templates as they were written already.

I also note some other instances of esc_attr_e() in the file do they need changing too?

mercime commented 7 years ago

_ex used for button text in this line for profile visibility settings . We cannot use esc_attr_e() on the button text, as it is used on values of attributes only.

Checked other instances of esc_attr_e() and they are all used appropriately on attribute values. Only the two above needed fixing.