Changeset 13092 for trunk/src/bp-friends/bp-friends-notifications.php
- Timestamp:
- 08/24/2021 04:16:17 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-friends/bp-friends-notifications.php
r12597 r13092 44 44 } else { 45 45 /* translators: %s: friend name */ 46 $text = sprintf( __( '%s accepted your friendship request', 'buddypress' ), 46 $text = sprintf( __( '%s accepted your friendship request', 'buddypress' ), bp_core_get_user_displayname( $item_id ) ); 47 47 $amount = 'single'; 48 48 } … … 62 62 } else { 63 63 /* translators: %s: friend name */ 64 $text = sprintf( __( 'You have a friendship request from %s', 'buddypress' ), 64 $text = sprintf( __( 'You have a friendship request from %s', 'buddypress' ), bp_core_get_user_displayname( $item_id ) ); 65 65 $amount = 'single'; 66 66 } … … 70 70 71 71 // Return either an HTML link or an array, depending on the requested format. 72 if ( 'string' == $format ) {72 if ( 'string' === $format ) { 73 73 74 74 /** … … 177 177 * @since 1.9.0 178 178 * 179 * @param int $friendship_id Friendship ID (not used).180 * @param object $friendship Friendship object.179 * @param int $friendship_id Friendship ID (not used). 180 * @param BP_Friends_Friendship $friendship The friendship object. 181 181 */ 182 182 function bp_friends_mark_friendship_rejected_notifications_by_item_id( $friendship_id, $friendship ) { … … 216 216 * @since 1.9.0 217 217 * 218 * @param int $friendship_id Friendship ID (not used).219 * @param object $friendship Friendship Object.218 * @param int $friendship_id Friendship ID (not used). 219 * @param BP_Friends_Friendship $friendship The friendship object. 220 220 */ 221 221 function bp_friends_mark_friendship_withdrawn_notifications_by_item_id( $friendship_id, $friendship ) { … … 243 243 function friends_screen_notification_settings() { 244 244 245 if ( !$send_requests = bp_get_user_meta( bp_displayed_user_id(), 'notification_friends_friendship_request', true ) ) 246 $send_requests = 'yes'; 247 248 if ( !$accept_requests = bp_get_user_meta( bp_displayed_user_id(), 'notification_friends_friendship_accepted', true ) ) 245 if ( ! $send_requests = bp_get_user_meta( bp_displayed_user_id(), 'notification_friends_friendship_request', true ) ) { 246 $send_requests = 'yes'; 247 } 248 249 if ( ! $accept_requests = bp_get_user_meta( bp_displayed_user_id(), 'notification_friends_friendship_accepted', true ) ) 249 250 $accept_requests = 'yes'; ?> 250 251 … … 253 254 <tr> 254 255 <th class="icon"></th> 255 <th class="title"><?php _ex( 'Friends', 'Friend settings on notification settings page', 'buddypress' ) ?></th>256 <th class="yes"><?php _e( 'Yes', 'buddypress' )?></th>257 <th class="no"><?php _e( 'No', 'buddypress' )?></th>256 <th class="title"><?php _ex( 'Friends', 'Friend settings on notification settings page', 'buddypress' ); ?></th> 257 <th class="yes"><?php esc_html_e( 'Yes', 'buddypress' ); ?></th> 258 <th class="no"><?php esc_html_e( 'No', 'buddypress' ); ?></th> 258 259 </tr> 259 260 </thead> … … 262 263 <tr id="friends-notification-settings-request"> 263 264 <td></td> 264 <td><?php _ex( 'A member sends you a friendship request', 'Friend settings on notification settings page', 'buddypress' ) ?></td>265 <td><?php _ex( 'A member sends you a friendship request', 'Friend settings on notification settings page', 'buddypress' ); ?></td> 265 266 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" id="notification-friends-friendship-request-yes" value="yes" <?php checked( $send_requests, 'yes', true ) ?>/><label for="notification-friends-friendship-request-yes" class="bp-screen-reader-text"><?php 266 267 /* translators: accessibility text */ 267 _e( 'Yes, send email', 'buddypress' );268 esc_html_e( 'Yes, send email', 'buddypress' ); 268 269 ?></label></td> 269 270 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" id="notification-friends-friendship-request-no" value="no" <?php checked( $send_requests, 'no', true ) ?>/><label for="notification-friends-friendship-request-no" class="bp-screen-reader-text"><?php 270 271 /* translators: accessibility text */ 271 _e( 'No, do not send email', 'buddypress' );272 esc_html_e( 'No, do not send email', 'buddypress' ); 272 273 ?></label></td> 273 274 </tr> … … 277 278 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" id="notification-friends-friendship-accepted-yes" value="yes" <?php checked( $accept_requests, 'yes', true ) ?>/><label for="notification-friends-friendship-accepted-yes" class="bp-screen-reader-text"><?php 278 279 /* translators: accessibility text */ 279 _e( 'Yes, send email', 'buddypress' );280 esc_html_e( 'Yes, send email', 'buddypress' ); 280 281 ?></label></td> 281 282 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" id="notification-friends-friendship-accepted-no" value="no" <?php checked( $accept_requests, 'no', true ) ?>/><label for="notification-friends-friendship-accepted-no" class="bp-screen-reader-text"><?php 282 283 /* translators: accessibility text */ 283 _e( 'No, do not send email', 'buddypress' );284 esc_html_e( 'No, do not send email', 'buddypress' ); 284 285 ?></label></td> 285 286 </tr>
Note: See TracChangeset
for help on using the changeset viewer.