Changeset 14269 for trunk/src/bp-core/deprecated/1.5.php
- Timestamp:
- 08/10/2026 12:16:05 AM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/deprecated/1.5.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/deprecated/1.5.php
r14073 r14269 109 109 $admin_page_hooks[$file] = sanitize_title( $menu_title ); 110 110 111 if ( ! empty( $function ) && !empty ( $hookname ) )111 if ( ! empty( $function ) && ! empty( $hookname ) ) { 112 112 add_action( $hookname, $function ); 113 114 if ( empty( $icon_url ) ) 113 } 114 115 if ( empty( $icon_url ) ) { 115 116 $icon_url = 'images/generic.png'; 116 elseif ( is_ssl() && 0 === strpos( $icon_url, 'http://' ) )117 } elseif ( is_ssl() && 0 === strpos( $icon_url, 'http://' ) ) { 117 118 $icon_url = 'https://' . substr( $icon_url, 7 ); 119 } 118 120 119 121 do { … … 340 342 341 343 /* Make sure there's only one instance of each username */ 342 if ( ! $usernames = array_unique( $usernames[1] ) )344 if ( ! $usernames = array_unique( $usernames[1] ) ) { 343 345 return false; 346 } 344 347 345 348 $group = new BP_Groups_Group( $group_id ); 346 349 347 350 foreach ( (array) $usernames as $username ) { 348 if ( !$receiver_user_id = bp_core_get_userid( $username ) ) 351 $receiver_user_id = bp_core_get_userid( $username ); 352 353 if ( ! $receiver_user_id ) { 349 354 continue; 355 } 350 356 351 357 /* Check the user is a member of the group before sending the update. */ 352 if ( !groups_is_user_member( $receiver_user_id, $group_id ) ) 358 if ( !groups_is_user_member( $receiver_user_id, $group_id ) ) { 353 359 continue; 360 } 354 361 355 362 // Now email the user with the contents of the message (if they have enabled email notifications). … … 367 374 $ud = bp_core_get_core_userdata( $receiver_user_id ); 368 375 $to = $ud->user_email; 376 369 377 $subject = bp_get_email_subject( 370 378 array( … … 523 531 function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) { 524 532 _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); 525 if ( !is_admin() || !bp_current_user_can( 'bp_moderate' ) ) 533 if ( !is_admin() || !bp_current_user_can( 'bp_moderate' ) ) { 526 534 return false; 535 } 527 536 528 537 return $oldvalue; … … 589 598 function bp_dtheme_add_blog_comments_js() { 590 599 _deprecated_function( __FUNCTION__, '1.5', "Enqueue the comment-reply script in your theme's header.php." ); 591 if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) 600 if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) { 592 601 wp_enqueue_script( 'comment-reply' ); 602 } 593 603 } 594 604 endif; … … 747 757 748 758 749 if ( $admins = groups_get_group_admins( $group->id ) ) : ?> 750 751 <ul id="admins-list" class="item-list<?php if ( !empty( $admin_list ) ) : ?> single-line<?php endif; ?>"> 759 if ( $admins = groups_get_group_admins( $group->id ) ) : 760 $single_line_class = ! empty( $admin_list ) ? ' single-line' : ''; 761 ?> 762 763 <ul id="admins-list" class="item-list<?php echo esc_attr( $single_line_class ); ?>"> 752 764 753 765 <?php foreach ( (array) $admins as $admin ) { ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)