Changeset 12930 for trunk/src/bp-members/bp-members-filters.php
- Timestamp:
- 04/29/2021 08:31:02 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-filters.php
r12923 r12930 209 209 return $message; 210 210 } 211 211 212 $invite = bp_get_members_invitation_from_request(); 212 213 if ( ! $invite->id || ! $invite->invitee_email ) { … … 220 221 if ( $maybe_user ) { 221 222 $message = sprintf( 222 esc_html__( 'Welcome! You are already a member of this site. Please %1$s to continue. ', 'buddypress' ), 223 sprintf( '<a href="%1$s">%2$s</a>', esc_url( wp_login_url( bp_get_root_domain() ) ), esc_html__( 'log in', 'buddypress' ) ) 223 /* translators: %s: The log in link `<a href="login_url">log in</a>` */ 224 esc_html__( 'Welcome! You are already a member of this site. Please %s to continue.', 'buddypress' ), 225 sprintf( 226 '<a href="%1$s">%2$s</a>', 227 esc_url( wp_login_url( bp_get_root_domain() ) ), 228 esc_html__( 'log in', 'buddypress' ) 229 ) 224 230 ); 231 225 232 // This user can register! 226 233 } else { … … 231 238 'invite_sent' => 'sent', 232 239 ); 233 $all_invites = bp_members_invitations_get_invites( $all_args ); 234 $inviters = array(); 240 241 $all_invites = bp_members_invitations_get_invites( $args ); 242 $inviters = array(); 243 235 244 foreach ( $all_invites as $inv ) { 236 245 $inviters[] = bp_core_get_user_displayname( $inv->inviter_id ); … … 238 247 239 248 if ( ! empty( $inviters ) ) { 240 $message = sprintf( _n( 'Welcome! You’ve been invited to join the site by the following user: %s. ', 'Welcome! You’ve been invited to join the site by the following users: %s. ', count( $inviters ), 'buddypress' ), implode( ', ', $inviters ) ); 249 $message = sprintf( 250 /* translators: %s: The comma separated list of inviters display names */ 251 _n( 'Welcome! You’ve been invited to join the site by the following user: %s.', 'Welcome! You’ve been invited to join the site by the following users: %s.', count( $inviters ), 'buddypress' ), 252 implode( ', ', $inviters ) 253 ); 241 254 } else { 242 255 $message = __( 'Welcome! You’ve been invited to join the site. ', 'buddypress' ); … … 270 283 271 284 if ( ! $maybe_user ) { 272 $message = __( 'Member registration is allowed by invitation only.', 'buddypress' ); 285 $message_parts = array( esc_html__( 'Member registration is allowed by invitation only.', 'buddypress' ) ); 286 273 287 // Is the user trying to accept an invitation but something is wrong? 274 288 if ( ! empty( $_GET['inv'] ) ) { 275 $message .= __( 'It looks like there is a problem with your invitation. Please try again.', 'buddypress' );289 $message_parts[] = esc_html__( 'It looks like there is a problem with your invitation. Please try again.', 'buddypress' ); 276 290 } 291 292 $message = implode( ' ', $message_parts ); 277 293 } else if ( 'nouveau' === bp_get_theme_package_id() ) { 278 294 $message = sprintf( 295 /* translators: 1: The log in link `<a href="login_url">log in</a>`. 2: The lost password link `<a href="lost_password_url">log in</a>` */ 279 296 esc_html__( 'Welcome! You are already a member of this site. Please %1$s to continue. If you have forgotten your password, you can %2$s.', 'buddypress' ), 280 sprintf( '<a href="%1$s">%2$s</a>', esc_url( wp_login_url( bp_get_root_domain() ) ), esc_html__( 'log in', 'buddypress' ) ), 281 sprintf( '<a href="%1$s">%2$s</a>', esc_url( wp_lostpassword_url( bp_get_root_domain() ) ), esc_html__( 'reset it', 'buddypress' ) ) 297 sprintf( 298 '<a href="%1$s">%2$s</a>', 299 esc_url( wp_login_url( bp_get_root_domain() ) ), 300 esc_html__( 'log in', 'buddypress' ) 301 ), 302 sprintf( 303 '<a href="%1$s">%2$s</a>', 304 esc_url( wp_lostpassword_url( bp_get_root_domain() ) ), 305 esc_html__( 'reset it', 'buddypress' ) 306 ) 282 307 ); 283 308 } 284 309 } 310 285 311 return $message; 286 312 }
Note: See TracChangeset
for help on using the changeset viewer.