Changeset 13824 for trunk/src/bp-core/deprecated/12.0.php
- Timestamp:
- 04/29/2024 08:15:44 PM (20 months ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/deprecated/12.0.php (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/deprecated/12.0.php
r13775 r13824 626 626 $user_groups = bp_displayed_user_url() . bp_get_groups_slug(); ?> 627 627 628 <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/recently-active' ); ?>"><?php_e( 'Recently Active', 'buddypress' ); ?></a></li>629 <li<?php if ( bp_is_action_variable( 'recently-joined', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/recently-joined' ); ?>"><?php_e( 'Recently Joined', 'buddypress' ); ?></a></li>630 <li<?php if ( bp_is_action_variable( 'most-popular', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/most-popular' ); ?>"><?php_e( 'Most Popular', 'buddypress' ); ?></a></li>631 <li<?php if ( bp_is_action_variable( 'admin-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/admin-of' ); ?>"><?php_e( 'Administrator Of', 'buddypress' ); ?></a></li>632 <li<?php if ( bp_is_action_variable( 'mod-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/mod-of' ); ?>"><?php_e( 'Moderator Of', 'buddypress' ); ?></a></li>633 <li<?php if ( bp_is_action_variable( 'alphabetically' ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/alphabetically' ); ?>"><?php_e( 'Alphabetically', 'buddypress' ); ?></a></li>628 <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/recently-active' ) ); ?>"><?php esc_html_e( 'Recently Active', 'buddypress' ); ?></a></li> 629 <li<?php if ( bp_is_action_variable( 'recently-joined', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/recently-joined' ) ); ?>"><?php esc_html_e( 'Recently Joined', 'buddypress' ); ?></a></li> 630 <li<?php if ( bp_is_action_variable( 'most-popular', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/most-popular' ) ); ?>"><?php esc_html_e( 'Most Popular', 'buddypress' ); ?></a></li> 631 <li<?php if ( bp_is_action_variable( 'admin-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/admin-of' ) ); ?>"><?php esc_html_e( 'Administrator Of', 'buddypress' ); ?></a></li> 632 <li<?php if ( bp_is_action_variable( 'mod-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/mod-of' ) ); ?>"><?php esc_html_e( 'Moderator Of', 'buddypress' ); ?></a></li> 633 <li<?php if ( bp_is_action_variable( 'alphabetically' ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/alphabetically' ) ); ?>"><?php esc_html_e( 'Alphabetically', 'buddypress' ); ?></a></li> 634 634 635 635 <?php … … 664 664 <?php 665 665 /* translators: %s: the User Display Name */ 666 printf( esc_html__( "%s's Sites", 'buddypress' ), bp_get_displayed_user_fullname() );666 printf( esc_html__( "%s's Sites", 'buddypress' ), esc_html( bp_get_displayed_user_fullname() ) ); 667 667 ?> 668 668 </a> … … 672 672 <?php 673 673 /* translators: %s: the User Display Name */ 674 printf( esc_html__( "%s's Recent Posts", 'buddypress' ), bp_get_displayed_user_fullname() );674 printf( esc_html__( "%s's Recent Posts", 'buddypress' ), esc_html( bp_get_displayed_user_fullname() ) ); 675 675 ?> 676 676 </a> … … 680 680 <?php 681 681 /* translators: %s: the User Display Name */ 682 printf( esc_html__( "%s's Recent Comments", 'buddypress' ), bp_get_displayed_user_fullname() );682 printf( esc_html__( "%s's Recent Comments", 'buddypress' ), esc_html( bp_get_displayed_user_fullname() ) ); 683 683 ?> 684 684 </a> … … 977 977 978 978 <?php 979 / * translators: %s: member name */979 // phpcs:ignore WordPress.Security.EscapeOutput 980 980 echo bp_core_fetch_avatar( 981 981 array( … … 994 994 995 995 <h5> 996 <?php echo bp_core_get_userlink( $mod->user_id ); ?> 996 <?php 997 // phpcs:ignore WordPress.Security.EscapeOutput 998 echo bp_core_get_userlink( $mod->user_id ); 999 ?> 997 1000 998 1001 <span class="small"> 999 <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => $mod->user_id ) ) ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>1000 <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link($mod->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a>1002 <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => $mod->user_id ) ) ?>" class="button confirm mod-promote-to-admin"><?php esc_html_e( 'Promote to Admin', 'buddypress' ); ?></a> 1003 <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link($mod->user_id) ?>"><?php esc_html_e( 'Demote to Member', 'buddypress' ) ?></a> 1001 1004 </span> 1002 1005 </h5> … … 1008 1011 1009 1012 <?php 1013 // phpcs:ignore WordPress.Security.EscapeOutput 1010 1014 echo bp_core_fetch_avatar( 1011 1015 array( … … 1021 1025 ?> 1022 1026 1023 <h5><?php echo bp_core_get_userlink( $mod->user_id ) ?></h5> 1027 <h5> 1028 <?php 1029 // phpcs:ignore WordPress.Security.EscapeOutput 1030 echo bp_core_get_userlink( $mod->user_id ); 1031 ?> 1032 </h5> 1024 1033 1025 1034 <span class="activity"> 1026 1035 <?php 1027 1036 /* translators: %s: human time diff */ 1028 echo bp_core_get_last_activity( strtotime( $mod->date_modified ), __( 'joined %s', 'buddypress') );1037 echo esc_html( bp_core_get_last_activity( strtotime( $mod->date_modified ), esc_html__( 'joined %s', 'buddypress' ) ) ); 1029 1038 ?> 1030 1039 </span> … … 1048 1057 1049 1058 <div id="message" class="info"> 1050 <p><?php _e( 'This group has no moderators', 'buddypress' ); ?></p>1059 <p><?php esc_html_e( 'This group has no moderators', 'buddypress' ); ?></p> 1051 1060 </div> 1052 1061 … … 1062 1071 function bp_activities_title() { 1063 1072 _deprecated_function( __FUNCTION__, '12.0.0' ); 1064 echo bp_get_activities_title();1073 echo esc_html( bp_get_activities_title() ); 1065 1074 } 1066 1075 … … 1098 1107 function bp_activities_no_activity() { 1099 1108 _deprecated_function( __FUNCTION__, '12.0.0' ); 1100 echo bp_get_activities_no_activity();1109 echo esc_html( bp_get_activities_no_activity() ); 1101 1110 } 1102 1111 … … 1141 1150 } 1142 1151 1143 echo apply_filters_deprecated( 'bp_get_options_title', array( esc_attr( $bp->bp_options_title ) ), '12.0.0');1152 echo esc_html( apply_filters_deprecated( 'bp_get_options_title', array( esc_attr( $bp->bp_options_title ) ), '12.0.0' ) ); 1144 1153 } 1145 1154 … … 1166 1175 function bp_get_options_avatar() { 1167 1176 _deprecated_function( __FUNCTION__, '12.0.0' ); 1177 // phpcs:ignore WordPress.Security.EscapeOutput 1168 1178 echo apply_filters_deprecated( 'bp_get_options_avatar', array( buddypress()->bp_options_avatar ), '12.0.0' ); 1169 1179 } … … 1178 1188 global $comment; 1179 1189 1190 // phpcs:ignore WordPress.Security.EscapeOutput 1180 1191 echo apply_filters_deprecated( 1181 1192 'bp_comment_author_avatar', … … 1206 1217 global $post; 1207 1218 1219 // phpcs:ignore WordPress.Security.EscapeOutput 1208 1220 echo apply_filters_deprecated( 1209 1221 'bp_post_author_avatar', … … 1280 1292 function bp_blog_signup_allowed() { 1281 1293 _deprecated_function( __FUNCTION__, '12.0.0' ); 1294 // phpcs:ignore WordPress.Security.EscapeOutput 1282 1295 echo bp_get_blog_signup_allowed(); 1283 1296 } … … 1305 1318 ?> 1306 1319 1307 (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ); ?>)1320 (<?php echo esc_html( BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ); ?>) 1308 1321 1309 1322 <span> … … 1321 1334 1322 1335 <li> 1323 <a href="<?php echo bp_members_get_user_url( $friend_ids[$i] ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $friend_ids[$i], 'type' => 'thumb' ) ) ?></a> 1324 <h5><?php echo bp_core_get_userlink($friend_ids[$i]) ?></h5> 1336 <a href="<?php echo esc_url( bp_members_get_user_url( $friend_ids[$i] ) ); ?>"> 1337 <?php 1338 // phpcs:ignore WordPress.Security.EscapeOutput 1339 echo bp_core_fetch_avatar( array( 'item_id' => $friend_ids[$i], 'type' => 'thumb' ) ); 1340 ?> 1341 </a> 1342 <h5> 1343 <?php 1344 // phpcs:ignore WordPress.Security.EscapeOutput 1345 echo bp_core_get_userlink($friend_ids[$i]); 1346 ?> 1347 </h5> 1325 1348 </li> 1326 1349 … … 1374 1397 1375 1398 <li> 1376 <a href="<?php echo bp_members_get_user_url( $user_ids['users'][$i]->id ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $user_ids['users'][$i]->id, 'type' => 'thumb' ) ) ?></a> 1377 <h5><?php echo bp_core_get_userlink( $user_ids['users'][$i]->id ) ?></h5> 1399 <a href="<?php echo esc_url( bp_members_get_user_url( $user_ids['users'][$i]->id ) ); ?>"> 1400 <?php 1401 // phpcs:ignore WordPress.Security.EscapeOutput 1402 echo bp_core_fetch_avatar( array( 'item_id' => $user_ids['users'][$i]->id, 'type' => 'thumb' ) ); 1403 ?> 1404 </a> 1405 <h5> 1406 <?php 1407 // phpcs:ignore WordPress.Security.EscapeOutput 1408 echo bp_core_get_userlink( $user_ids['users'][$i]->id ); 1409 ?> 1410 </h5> 1378 1411 1379 1412 <?php if ( bp_is_active( 'xprofile' ) ) { ?> … … 1382 1415 1383 1416 <div class="profile-data"> 1384 <p class="field-name"><?php echo $random_data[0]->name?></p>1385 1386 <?php echo $random_data[0]->value?>1417 <p class="field-name"><?php echo esc_html( $random_data[0]->name ); ?></p> 1418 1419 <?php echo esc_html( $random_data[0]->value ); ?> 1387 1420 1388 1421 </div> … … 1408 1441 1409 1442 <div id="message" class="info"> 1410 <p><?php _e( "There aren't enough site members to show a random sample just yet.", 'buddypress' ) ?></p>1443 <p><?php esc_html_e( "There aren't enough site members to show a random sample just yet.", 'buddypress' ) ?></p> 1411 1444 </div> 1412 1445 … … 1506 1539 </form>'; 1507 1540 1541 // phpcs:ignore WordPress.Security.EscapeOutput 1508 1542 echo apply_filters( 'bp_group_search_form', $search_form_html ); 1509 1543 } … … 1559 1593 switch ( $current_filter ) { 1560 1594 case 'recently-active': default: 1561 _e( 'Recently Active', 'buddypress' );1595 esc_html_e( 'Recently Active', 'buddypress' ); 1562 1596 break; 1563 1597 case 'recently-joined': 1564 _e( 'Recently Joined', 'buddypress' );1598 esc_html_e( 'Recently Joined', 'buddypress' ); 1565 1599 break; 1566 1600 case 'most-popular': 1567 _e( 'Most Popular', 'buddypress' );1601 esc_html_e( 'Most Popular', 'buddypress' ); 1568 1602 break; 1569 1603 case 'admin-of': 1570 _e( 'Administrator Of', 'buddypress' );1604 esc_html_e( 'Administrator Of', 'buddypress' ); 1571 1605 break; 1572 1606 case 'mod-of': 1573 _e( 'Moderator Of', 'buddypress' );1607 esc_html_e( 'Moderator Of', 'buddypress' ); 1574 1608 break; 1575 1609 case 'alphabetically': 1576 _e( 'Alphabetically', 'buddypress' );1610 esc_html_e( 'Alphabetically', 'buddypress' ); 1577 1611 break; 1578 1612 }
Note: See TracChangeset
for help on using the changeset viewer.