Ticket #2965: 2965.001.diff
File 2965.001.diff, 85.4 KB (added by , 14 years ago) |
---|
-
bp-friends.php
571 571 572 572 function friends_remove_data( $user_id ) { 573 573 global $bp; 574 574 575 575 BP_Friends_Friendship::delete_all_for_user($user_id); 576 576 577 577 /* Remove usermeta */ -
bp-activity.php
508 508 * 509 509 * @package BuddyPress Activity 510 510 * @since 1.3 511 * 511 * 512 512 * @param $content The content of the activity, usually found in $activity->content 513 513 * @return array $usernames Array of the found usernames that match existing users 514 514 */ 515 515 function bp_activity_find_mentions( $content ) { 516 516 $pattern = '/[@]+([A-Za-z0-9-_\.]+)/'; 517 517 preg_match_all( $pattern, $content, $usernames ); 518 518 519 519 // Make sure there's only one instance of each username 520 520 if ( !$usernames = array_unique( $usernames[1] ) ) 521 521 return false; 522 522 523 523 return $usernames; 524 524 } 525 525 … … 530 530 * 531 531 * @package BuddyPress Activity 532 532 * @since 1.3 533 * 533 * 534 534 * @param $activity_id The unique id for the activity item 535 535 */ 536 536 function bp_activity_reduce_mention_count( $activity_id ) { 537 537 $activity = new BP_Activity_Activity( $activity_id ); 538 539 if ( $usernames = bp_activity_find_mentions( strip_tags( $activity->content ) ) ) { 538 539 if ( $usernames = bp_activity_find_mentions( strip_tags( $activity->content ) ) ) { 540 540 include_once( ABSPATH . WPINC . '/registration.php' ); 541 542 foreach( (array)$usernames as $username ) { 541 542 foreach( (array)$usernames as $username ) { 543 543 if ( !$user_id = username_exists( $username ) ) 544 544 continue; 545 545 546 546 // Decrease the number of new @ mentions for the user 547 547 $new_mention_count = (int)get_user_meta( $user_id, 'bp_new_mention_count', true ); 548 548 update_user_meta( $user_id, 'bp_new_mention_count', $new_mention_count - 1 ); … … 577 577 return apply_filters( 'bp_activity_multiple_at_mentions_notification', '<a href="' . $at_mention_link . '" title="' . $at_mention_title . '">' . sprintf( __( 'You have %1$d new activity mentions', 'buddypress' ), (int)$total_items ) . '</a>', $at_mention_link, $total_items, $activity_id, $poster_user_id ); 578 578 } else { 579 579 $user_fullname = bp_core_get_user_displayname( $poster_user_id ); 580 580 581 581 return apply_filters( 'bp_activity_single_at_mentions_notification', '<a href="' . $at_mention_link . '" title="' . $at_mention_title . '">' . sprintf( __( '%1$s mentioned you in an activity update', 'buddypress' ), $user_fullname ) . '</a>', $at_mention_link, $total_items, $activity_id, $poster_user_id ); 582 582 } 583 583 break; … … 998 998 $new_width = $new_height * $ratio; 999 999 1000 1000 $image = '<img src="' . esc_attr( $src ) . '" width="' . $new_width . '" height="' . $new_height . '" alt="' . __( 'Thumbnail', 'buddypress' ) . '" class="align-left thumbnail" />'; 1001 1001 1002 1002 if ( !empty( $link ) ) { 1003 1003 $image = '<a href="' . $link . '">' . $image . '</a>'; 1004 1004 } … … 1223 1223 1224 1224 /** 1225 1225 * updates_register_activity_actions() 1226 * 1226 * 1227 1227 * Register the activity stream actions for updates 1228 * 1228 * 1229 1229 * @global array $bp 1230 1230 */ 1231 1231 function updates_register_activity_actions() { -
bp-themes/bp-default/groups/single/admin.php
199 199 200 200 <h5> 201 201 <?php bp_group_member_link() ?> 202 202 203 203 <?php if ( bp_get_group_member_is_banned() ) _e( '(banned)', 'buddypress'); ?> 204 204 205 <span class="small"> - 206 205 <span class="small"> - 206 207 207 <?php if ( bp_get_group_member_is_banned() ) : ?> 208 208 209 209 <a href="<?php bp_group_member_unban_link() ?>" class="confirm member-unban" title="<?php _e( 'Unban this member', 'buddypress' ) ?>"><?php _e( 'Remove Ban', 'buddypress' ); ?></a> 210 210 211 211 <?php else : ?> -
bp-themes/bp-default/functions.php
488 488 * 489 489 * @deprecated 1.3 490 490 * @deprecated No longer required. 491 * @param string $template Absolute path to the page template 491 * @param string $template Absolute path to the page template 492 492 * @return string 493 493 * @since 1.2 494 494 */ -
bp-themes/bp-default/_inc/css/default.css
19 19 margin: 0 auto; 20 20 padding-top: 0 !important; /* Remove the top padding space for the admin bar in this theme */ 21 21 } 22 22 23 23 body.activity-permalink { 24 24 min-width: 960px; 25 25 max-width: 960px; 26 26 } 27 27 28 h1, 29 h2, 30 h3, 31 h4, 32 h5, 28 h1, 29 h2, 30 h3, 31 h4, 32 h5, 33 33 h6 { 34 34 margin: 5px 0 15px 0; 35 35 } 36 36 37 h1 { 38 font-size: 28px; 39 margin-bottom: 25px; 37 h1 { 38 font-size: 28px; 39 margin-bottom: 25px; 40 40 } 41 41 42 h2 { 43 font-size: 24px; 44 margin-bottom: 20px; 42 h2 { 43 font-size: 24px; 44 margin-bottom: 20px; 45 45 } 46 46 47 h3 { 48 font-size: 20px; 47 h3 { 48 font-size: 20px; 49 49 } 50 50 51 h4 { 52 font-size: 16px; 53 margin-bottom: 15px; 51 h4 { 52 font-size: 16px; 53 margin-bottom: 15px; 54 54 } 55 55 56 h5 { 57 font-size: 14px; 58 margin-bottom: 0; 56 h5 { 57 font-size: 14px; 58 margin-bottom: 0; 59 59 } 60 60 61 h6 { 62 font-size: 12px; 63 margin-bottom: 0; 61 h6 { 62 font-size: 12px; 63 margin-bottom: 0; 64 64 } 65 65 66 a { 67 color: #1fb3dd; 66 a { 67 color: #1fb3dd; 68 68 } 69 69 70 a:hover, 71 a:active { 72 color: #888; 70 a:hover, 71 a:active { 72 color: #888; 73 73 } 74 74 75 a:focus { 76 outline: 1px dotted #ccc; 75 a:focus { 76 outline: 1px dotted #ccc; 77 77 } 78 78 79 .padder { 80 padding: 19px; 79 .padder { 80 padding: 19px; 81 81 } 82 82 83 .clear { 84 clear: left; 83 .clear { 84 clear: left; 85 85 } 86 86 87 p { 88 margin-bottom: 15px; 87 p { 88 margin-bottom: 15px; 89 89 } 90 90 91 p:last-child { 92 margin-bottom: 0; 91 p:last-child { 92 margin-bottom: 0; 93 93 } 94 94 95 95 hr { … … 127 127 height: 0; 128 128 line-height: 1; 129 129 vertical-align: baseline; 130 position: relative; 130 position: relative; 131 131 } 132 132 133 133 … … 153 153 height: 100px; 154 154 padding-top: 25px; 155 155 } 156 156 157 157 #header #search-bar { 158 158 position: absolute; 159 159 top: 25px; … … 192 192 width: 44%; 193 193 margin: 0 0 -5px 0; 194 194 } 195 195 196 196 #header h1 a { 197 197 color: #fff; 198 198 font-size: 26px; … … 212 212 bottom: 0; 213 213 max-width: 65%; 214 214 } 215 215 216 216 ul#nav li { 217 217 float: left; 218 218 margin: 0 5px 0 0; 219 219 } 220 220 221 221 ul#nav li a { 222 222 display: block; 223 223 color: #fff; … … 229 229 -moz-border-radius-topright: 3px; 230 230 -webkit-border-top-right-radius: 3px; 231 231 } 232 233 ul#nav li.selected a, 232 233 ul#nav li.selected a, 234 234 ul#nav li.current_page_item a { 235 235 background: #f5f5f5; 236 236 color: #555; 237 237 } 238 239 ul#nav a:focus { 240 outline: none; 238 239 ul#nav a:focus { 240 outline: none; 241 241 } 242 242 243 243 /* > Container … … 253 253 overflow: hidden; 254 254 margin-bottom: 20px; 255 255 } 256 256 257 257 body.activity-permalink div#container { 258 258 background: none; 259 259 border: none; … … 273 273 -webkit-border-top-right-radius: 3px; 274 274 background: url( ../images/sidebar_back.gif ) top left repeat-x; 275 275 } 276 276 277 277 div#sidebar div#sidebar-me img.avatar { 278 278 float: left; 279 279 margin: 0 10px 15px 0; … … 289 289 clear: left; 290 290 margin: 15px -16px; 291 291 } 292 292 293 293 div#sidebar ul#bp-nav li { 294 294 padding: 10px 15px; 295 295 } … … 306 306 div#sidebar .widget_search { 307 307 margin-top: 20px; 308 308 } 309 309 310 310 #footer-widget-area .widget_search input[type=text], 311 311 div#sidebar .widget_search input[type=text] { 312 312 width: 110px; 313 313 padding: 2px; 314 314 } 315 315 316 #footer-widget-area ul#recentcomments li, 316 #footer-widget-area ul#recentcomments li, 317 317 #footer-widget-area .widget_recent_entries ul li, 318 div#sidebar ul#recentcomments li, 318 div#sidebar ul#recentcomments li, 319 319 div#sidebar .widget_recent_entries ul li { 320 320 margin-bottom: 15px; 321 321 } … … 326 326 height: 20px; 327 327 margin-right: 10px; 328 328 } 329 329 330 330 #footer-widget-area div.item-avatar img, 331 331 div#sidebar div.item-avatar img { 332 332 width: 40px; … … 335 335 } 336 336 337 337 #footer-widget-area .avatar-block, 338 div#sidebar .avatar-block { 339 overflow: hidden; 338 div#sidebar .avatar-block { 339 overflow: hidden; 340 340 } 341 341 342 342 #footer-widget-area ul.item-list div.item-title, … … 352 352 font-size: 11px; 353 353 } 354 354 355 #footer-widget-area div.item-meta, 355 #footer-widget-area div.item-meta, 356 356 #footer-widget-area div.item-content, 357 div#sidebar div.item-meta, 357 div#sidebar div.item-meta, 358 358 div#sidebar div.item-content { 359 359 margin-left: 38px; 360 360 font-size: 11px; … … 386 386 -moz-border-radius-bottomleft: 6px; 387 387 -webkit-border-bottom-left-radius: 6px; 388 388 } 389 389 390 390 div#content .one-column { 391 391 margin-right: 0; 392 392 border-right: 0 none; … … 409 409 overflow: hidden; 410 410 } 411 411 412 div#item-header div#item-header-content { 413 margin-left: 170px; 412 div#item-header div#item-header-content { 413 margin-left: 170px; 414 414 } 415 415 416 416 div#item-header h2 { … … 418 418 margin: 0 0 15px 0; 419 419 line-height: 120%; 420 420 } 421 421 422 422 div#item-header h2 a { 423 423 text-decoration: none; 424 424 color: #777; … … 429 429 margin: 0 15px 25px 0; 430 430 } 431 431 432 div#item-header h2 { 433 margin-bottom: 5px; 432 div#item-header h2 { 433 margin-bottom: 5px; 434 434 } 435 435 436 div#item-header span.activity, 436 div#item-header span.activity, 437 437 div#item-header h2 span.highlight { 438 438 vertical-align: middle; 439 439 font-size: 11px; … … 442 442 margin-bottom: 7px; 443 443 } 444 444 445 div#item-header h2 span.highlight { 446 font-size: 16px; 445 div#item-header h2 span.highlight { 446 font-size: 16px; 447 447 } 448 448 449 449 div#item-header h2 span.highlight span { … … 477 477 margin: 0 0 15px 15px; 478 478 text-align: right; 479 479 } 480 480 481 481 div#item-header div#item-actions h3 { 482 482 font-size: 12px; 483 483 margin: 0 0 5px 0; … … 488 488 margin-bottom: 15px; 489 489 } 490 490 491 div#item-header ul h5, 492 div#item-header ul span, 491 div#item-header ul h5, 492 div#item-header ul span, 493 493 div#item-header ul hr { 494 494 display: none; 495 495 } … … 498 498 float: right; 499 499 } 500 500 501 div#item-header ul img.avatar, 501 div#item-header ul img.avatar, 502 502 div#item-header ul.avatars img.avatar { 503 503 width: 30px; 504 504 height: 30px; 505 505 margin: 2px; 506 506 } 507 507 508 div#item-header div.generic-button, 508 div#item-header div.generic-button, 509 509 div#item-header a.button { 510 510 float: left; 511 511 margin: 10px 10px 0 0; … … 522 522 ul.item-list { 523 523 width: 100%; 524 524 } 525 525 526 526 ul.item-list li { 527 527 position: relative; 528 528 padding: 15px 0; 529 529 border-bottom: 1px solid #eaeaea; 530 530 } 531 532 ul.single-line li { 533 border: none; 531 532 ul.single-line li { 533 border: none; 534 534 } 535 535 536 536 ul.item-list li img.avatar { … … 538 538 margin: 0 10px 10px 0; 539 539 } 540 540 541 ul.item-list li div.item-title, 541 ul.item-list li div.item-title, 542 542 ul.item-list li h4 { 543 543 font-weight: normal; 544 544 font-size: 14px; 545 545 width: 75%; 546 546 margin: 0; 547 547 } 548 548 549 549 ul.item-list li div.item-title span { 550 550 font-size: 12px; 551 551 color: #999; … … 586 586 margin: 25px -19px 20px -19px; 587 587 background: #eaeaea; 588 588 } 589 589 590 590 div.item-list-tabs ul li a { 591 591 text-decoration: none; 592 592 } … … 594 594 div.item-list-tabs ul { 595 595 width: 100%; 596 596 } 597 597 598 598 div.item-list-tabs ul li { 599 599 float: left; 600 600 margin: 5px 0 0 5px; 601 601 } 602 602 603 603 div.item-list-tabs#subnav ul li { 604 604 margin-top: 0; 605 605 } … … 612 612 float: right; 613 613 margin: 7px 20px 0 0; 614 614 } 615 615 616 616 div.item-list-tabs#subnav ul li.last { 617 617 margin-top: 4px; 618 618 } … … 627 627 padding: 5px 10px; 628 628 text-decoration: none; 629 629 } 630 630 631 631 div.item-list-tabs ul li span { 632 632 color: #aaa; 633 633 } … … 648 648 -moz-border-radius-topright: 3px; 649 649 -webkit-border-top-right-radius: 3px; 650 650 } 651 651 652 652 ul li.loading a { 653 653 background-image: url( ../images/ajax-loader.gif ); 654 654 background-position: 92% 50%; 655 655 background-repeat: no-repeat; 656 656 padding-right: 30px !important; 657 657 } 658 658 659 659 div#item-nav ul li.loading a { 660 660 background-position: 88% 50%; 661 661 } … … 685 685 margin: 20px 0; 686 686 } 687 687 688 span.activity, 688 span.activity, 689 689 div#message p { 690 690 display: inline-block; 691 691 font-size: 11px; … … 710 710 float: right; 711 711 margin: -37px 0 0 0; 712 712 } 713 713 714 714 div.dir-search input[type=text] { 715 715 padding: 4px; 716 716 font-size: 12px; … … 728 728 font-size: 11px; 729 729 height: 16px; 730 730 } 731 732 div.pagination#user-pag, 731 732 div.pagination#user-pag, 733 733 .friends div.pagination, 734 .mygroups div.pagination, 735 .myblogs div.pagination, 734 .mygroups div.pagination, 735 .myblogs div.pagination, 736 736 noscript div.pagination { 737 737 background: #f8f8f8; 738 738 border: none; … … 746 746 div.pagination .pagination-links { 747 747 float: right; 748 748 } 749 749 750 750 div.pagination .pagination-links span, 751 751 div.pagination .pagination-links a { 752 752 font-size: 12px; 753 753 padding: 0 5px; 754 754 } 755 755 756 756 div.pagination .pagination-links a:hover { 757 757 font-weight: bold; 758 758 } … … 768 768 div#message { 769 769 margin: 15px 0; 770 770 } 771 771 772 772 div#message.updated { 773 clear: both; 773 clear: both; 774 774 } 775 775 776 776 div#message p { … … 778 778 font-size: 12px; 779 779 display:block; 780 780 } 781 781 782 782 div#message.error p { 783 783 background: #e41717; 784 784 color: #fff; … … 807 807 /* > Buttons 808 808 -------------------------------------------------------------- */ 809 809 810 a.button, 811 input[type=submit], 812 input[type=button], 810 a.button, 811 input[type=submit], 812 input[type=button], 813 813 input[type=reset], 814 ul.button-nav li a, 814 ul.button-nav li a, 815 815 div.generic-button a { 816 816 background: url( ../images/white-grad.png ) top left repeat-x; 817 817 border: 1px solid #ddd; … … 826 826 vertical-align: bottom; 827 827 cursor: pointer; 828 828 } 829 830 a.button:hover, 831 a.button:focus, 832 input[type=submit]:hover, 833 input[type=button]:hover, 829 830 a.button:hover, 831 a.button:focus, 832 input[type=submit]:hover, 833 input[type=button]:hover, 834 834 input[type=reset]:hover, 835 ul.button-nav li a:hover, 835 ul.button-nav li a:hover, 836 836 ul.button-nav li.current a, 837 837 div.generic-button a:hover { 838 838 border-color: #aaa; … … 846 846 color: #bbb; 847 847 cursor: default; 848 848 } 849 850 div.pending a:hover, 851 a.disabled:hover { 852 border-color: #eee; 853 color: #bbb; 849 850 div.pending a:hover, 851 a.disabled:hover { 852 border-color: #eee; 853 color: #bbb; 854 854 } 855 855 856 div.accept, 856 div.accept, 857 857 div.reject { 858 858 float: left; 859 859 margin-left: 10px; … … 863 863 float: left; 864 864 margin: 0 10px 10px 0; 865 865 } 866 866 867 867 ul.button-nav li.current a { 868 868 font-weight: bold; 869 869 } … … 887 887 /* > Input Forms 888 888 -------------------------------------------------------------- */ 889 889 890 form.standard-form textarea, 890 form.standard-form textarea, 891 891 form.standard-form input[type=text], 892 form.standard-form select, 892 form.standard-form select, 893 893 form.standard-form input[type=password], 894 894 .dir-search input[type=text] { 895 895 border: 1px inset #ccc; … … 901 901 font-size: 14px; 902 902 color: #888; 903 903 } 904 904 905 905 form.standard-form select { 906 906 padding: 3px; 907 907 } … … 910 910 margin-bottom: 5px; 911 911 } 912 912 913 form.standard-form label, 913 form.standard-form label, 914 914 form.standard-form span.label { 915 915 display: block; 916 916 font-weight: bold; 917 917 margin: 15px 0 5px 0; 918 918 } 919 919 920 920 form.standard-form div.checkbox label, 921 921 form.standard-form div.radio label { 922 922 font-weight: normal; … … 932 932 form.standard-form input[type=text] { 933 933 width: 75%; 934 934 } 935 935 936 936 form.standard-form#sidebar-login-form input[type=text], 937 937 form.standard-form#sidebar-login-form input[type=password] { 938 938 padding: 4px; … … 948 948 form.standard-form#signup_form textarea { 949 949 width: 90%; 950 950 } 951 951 952 952 form.standard-form#signup_form div.submit { 953 float: right; 953 float: right; 954 954 } 955 955 956 div#signup-avatar img { 957 margin: 0 15px 10px 0; 956 div#signup-avatar img { 957 margin: 0 15px 10px 0; 958 958 } 959 959 960 960 form.standard-form textarea { 961 961 width: 75%; 962 962 height: 120px; 963 963 } 964 964 965 965 form.standard-form textarea#message_content { 966 966 height: 200px; 967 967 } … … 980 980 padding: 15px 0; 981 981 clear: both; 982 982 } 983 983 984 984 form.standard-form div.submit input { 985 985 margin-right: 15px; 986 986 } … … 989 989 margin: 10px 0 15px 38px; 990 990 list-style: disc; 991 991 } 992 992 993 993 form.standard-form div.radio ul li { 994 994 margin-bottom: 5px; 995 995 } … … 1000 1000 outline: none; 1001 1001 } 1002 1002 1003 form.standard-form #basic-details-section, 1003 form.standard-form #basic-details-section, 1004 1004 form.standard-form #blog-details-section, 1005 1005 form.standard-form #profile-details-section { 1006 1006 float: left; 1007 1007 width: 48%; 1008 1008 } 1009 1010 form.standard-form #profile-details-section { 1011 float: right; 1009 1010 form.standard-form #profile-details-section { 1011 float: right; 1012 1012 } 1013 1013 1014 1014 form.standard-form #blog-details-section { 1015 1015 clear: left; 1016 1016 } 1017 1017 1018 form.standard-form input:focus, 1019 form.standard-form textarea:focus, 1018 form.standard-form input:focus, 1019 form.standard-form textarea:focus, 1020 1020 form.standard-form select:focus { 1021 1021 background: #fafafa; 1022 1022 color: #555; … … 1025 1025 form#send-invite-form { 1026 1026 margin-top: 20px; 1027 1027 } 1028 1028 1029 1029 div#invite-list { 1030 1030 height: 400px; 1031 1031 overflow: scroll; … … 1046 1046 table { 1047 1047 width: 100%; 1048 1048 } 1049 1049 1050 1050 table thead tr { 1051 1051 background: #eaeaea; 1052 1052 } … … 1057 1057 } 1058 1058 1059 1059 table.profile-fields { 1060 margin-bottom: 20px; 1060 margin-bottom: 20px; 1061 1061 } 1062 1062 1063 1063 div#sidebar table { … … 1069 1069 padding: 8px; 1070 1070 vertical-align: middle; 1071 1071 } 1072 1072 1073 1073 table tr td.label { 1074 1074 border-right: 1px solid #eaeaea; 1075 1075 font-weight: bold; 1076 1076 width: 25%; 1077 1077 } 1078 1079 table tr td.thread-info p { 1080 margin: 0; 1078 1079 table tr td.thread-info p { 1080 margin: 0; 1081 1081 } 1082 1082 1083 1083 table tr td.thread-info p.thread-excerpt { … … 1085 1085 font-size: 11px; 1086 1086 margin-top: 3px; 1087 1087 } 1088 1088 1089 1089 div#sidebar table td, 1090 table.forum td { 1091 text-align: center; 1090 table.forum td { 1091 text-align: center; 1092 1092 } 1093 1093 1094 1094 table tr.alt { … … 1099 1099 margin-bottom: 20px; 1100 1100 text-align: left; 1101 1101 } 1102 1103 table.notification-settings th.icon, 1104 table.notification-settings td:first-child { 1105 display: none; 1102 1103 table.notification-settings th.icon, 1104 table.notification-settings td:first-child { 1105 display: none; 1106 1106 } 1107 1107 1108 table.notification-settings th.title { 1109 width: 80%; 1108 table.notification-settings th.title { 1109 width: 80%; 1110 1110 } 1111 1112 table.notification-settings .yes, 1113 table.notification-settings .no { 1114 width: 40px; 1115 text-align: center; 1111 1112 table.notification-settings .yes, 1113 table.notification-settings .no { 1114 width: 40px; 1115 text-align: center; 1116 1116 } 1117 1117 1118 1118 table.forum { 1119 1119 margin: -9px -20px 20px -20px; 1120 1120 width: auto; 1121 1121 } 1122 1122 1123 1123 table.forum tr.sticky td { 1124 1124 background: #fff9db; 1125 1125 border-top: 1px solid #ffe8C4; … … 1138 1138 font-size: 11px; 1139 1139 } 1140 1140 1141 table.forum tr > td:first-child, 1141 table.forum tr > td:first-child, 1142 1142 table.forum tr > th:first-child { 1143 1143 padding-left: 15px; 1144 1144 } 1145 1145 1146 table.forum tr > td:last-child, 1146 table.forum tr > td:last-child, 1147 1147 table.forum tr > th:last-child { 1148 1148 padding-right: 15px; 1149 1149 } 1150 1150 1151 table.forum tr th#th-title, 1151 table.forum tr th#th-title, 1152 1152 table.forum tr th#th-poster, 1153 table.forum tr th#th-group, 1153 table.forum tr th#th-group, 1154 1154 table.forum td.td-poster, 1155 table.forum td.td-group, 1156 table.forum td.td-title { 1157 text-align: left; 1155 table.forum td.td-group, 1156 table.forum td.td-title { 1157 text-align: left; 1158 1158 } 1159 1159 1160 1160 table.forum td.td-freshness { … … 1226 1226 -webkit-border-radius: 3px; 1227 1227 border-radius: 3px; 1228 1228 } 1229 1229 1230 1230 form#whats-new-form textarea { 1231 1231 width: 100%; 1232 1232 height: 50px; … … 1270 1270 min-height: 35px; 1271 1271 padding: 12px 0 0 0; 1272 1272 } 1273 1273 1274 1274 .activity-list li.mini div.activity-meta { 1275 1275 margin: 0; 1276 1276 } … … 1285 1285 height: 20px; 1286 1286 margin-left: 36px; 1287 1287 } 1288 1288 1289 1289 .activity-list li.activity_comment .activity-avatar img.avatar, 1290 1290 .activity-list li.activity_comment .activity-avatar img.FB_profile_pic { 1291 1291 width: 40px; … … 1313 1313 position: absolute; 1314 1314 right: 0; 1315 1315 } 1316 1316 1317 1317 body.activity-permalink .activity-list li.mini .activity-meta { 1318 1318 position: absolute; 1319 1319 right: 15px; … … 1333 1333 padding-left: 25px; 1334 1334 background: url( ../images/replyto_arrow.gif ) 7px 0 no-repeat; 1335 1335 } 1336 1336 1337 1337 .activity-list li .activity-inreplyto > p { 1338 1338 margin: 0; 1339 1339 display: inline; … … 1353 1353 width: 50px; 1354 1354 height: 50px; 1355 1355 } 1356 1356 1357 1357 body.activity-permalink .activity-list .activity-avatar img { 1358 1358 width: 100px; 1359 1359 height: 100px; … … 1362 1362 .activity-list .activity-content { 1363 1363 margin-left: 70px; 1364 1364 } 1365 1365 1366 1366 body.activity-permalink .activity-list li .activity-content { 1367 1367 -moz-border-radius: 4px; 1368 1368 -webkit-border-radius: 4px; … … 1377 1377 min-height: 35px; 1378 1378 margin-right: 0; 1379 1379 } 1380 1380 1381 1381 body.activity-permalink .activity-list li .activity-header > p { 1382 1382 background: url( ../images/activity_arrow.gif ) top left no-repeat; 1383 1383 margin-left: -35px; … … 1392 1392 color: #888; 1393 1393 line-height: 220%; 1394 1394 } 1395 1395 1396 1396 .activity-list .activity-content .activity-header img.avatar { 1397 1397 float: none !important; 1398 1398 margin: 0 5px -8px 0 !important; … … 1411 1411 border-radius: 4px; 1412 1412 margin-right: 3px; 1413 1413 } 1414 1414 1415 1415 .activity-list .activity-header a:first-child:hover { 1416 1416 background: #059ae7 !important; 1417 1417 color: #fff !important; 1418 1418 } 1419 1420 .activity-list .activity-content a:first-child:focus { 1421 outline: none; 1419 1420 .activity-list .activity-content a:first-child:focus { 1421 outline: none; 1422 1422 } 1423 1423 1424 1424 .activity-list .activity-content span.time-since { … … 1434 1434 color: #aaa; 1435 1435 text-decoration: underline; 1436 1436 } 1437 1437 1438 1438 .activity-list .activity-content span.activity-header-meta a:hover { 1439 1439 color: inherit; 1440 1440 text-decoration: none; … … 1445 1445 margin: 15px 0 15px 5px; 1446 1446 overflow: hidden; 1447 1447 } 1448 1448 1449 1449 body.activity-permalink .activity-content .activity-inner, 1450 1450 body.activity-permalink .activity-content blockquote { 1451 1451 margin-top: 5px; 1452 1452 } 1453 1453 1454 1454 /* Backwards compatibility. */ 1455 .activity-inner > .activity-inner { 1456 margin: 0 !important; 1455 .activity-inner > .activity-inner { 1456 margin: 0 !important; 1457 1457 } 1458 1459 .activity-inner > blockquote { 1460 margin: 0 !important; 1458 1459 .activity-inner > blockquote { 1460 margin: 0 !important; 1461 1461 } 1462 1462 1463 1463 .activity-list .activity-content img.thumbnail { … … 1478 1478 -webkit-border-radius: 4px; 1479 1479 border-radius: 4px; 1480 1480 } 1481 1481 1482 1482 .activity-list li.load-more a { 1483 1483 color: #555; 1484 1484 } … … 1505 1505 border-radius: 4px; 1506 1506 margin-right: 3px; 1507 1507 } 1508 1508 1509 1509 .activity-list div.activity-meta a.acomment-reply { 1510 1510 background: #fff9db; 1511 1511 border-bottom: 1px solid #ffe8c4; … … 1513 1513 color: #ffa200; 1514 1514 } 1515 1515 1516 div.activity-meta a:focus { 1517 outline: none; 1516 div.activity-meta a:focus { 1517 outline: none; 1518 1518 } 1519 1519 1520 1520 div.activity-meta a:hover { 1521 1521 background: #aaa; 1522 1522 color: #fff; 1523 1523 border-color: #aaa; 1524 1524 } 1525 1525 1526 1526 div.activity-meta a.acomment-reply:hover { 1527 1527 background: #f7740a; 1528 1528 color: #fff; … … 1562 1562 border-top: 2px solid #fff; 1563 1563 padding: 10px 0 0; 1564 1564 } 1565 1565 1566 1566 body.activity-permalink .activity-list li.mini .activity-comments { 1567 1567 clear: none; 1568 1568 margin-top: 0; … … 1589 1589 margin-top: 0; 1590 1590 margin-left: 20px; 1591 1591 } 1592 1592 1593 1593 body.activity-permalink div.activity-comments ul li > ul { 1594 1594 margin-top: 15px; 1595 1595 } … … 1605 1605 margin-left: 39px; 1606 1606 margin-top: 5px; 1607 1607 } 1608 1609 div.acomment-content .time-since { 1610 display: none; 1608 1609 div.acomment-content .time-since { 1610 display: none; 1611 1611 } 1612 1612 1613 div.acomment-content .activity-delete-link { 1614 display: none; 1613 div.acomment-content .activity-delete-link { 1614 display: none; 1615 1615 } 1616 1617 div.acomment-content .comment-header { 1618 display: none; 1616 1617 div.acomment-content .comment-header { 1618 display: none; 1619 1619 } 1620 1620 1621 1621 body.activity-permalink div.activity-comments div.acomment-content { … … 1637 1637 border-radius: 4px; 1638 1638 padding: 8px; 1639 1639 } 1640 1640 1641 1641 div.activity-comments li form.ac-form { 1642 1642 margin-right: 15px; 1643 1643 } … … 1656 1656 background-position: 2% 95%; 1657 1657 background-repeat: no-repeat; 1658 1658 } 1659 1659 1660 1660 div.activity-comments form .ac-textarea { 1661 1661 padding: 8px; 1662 1662 border: 1px inset #ccc; … … 1666 1666 -webkit-border-radius: 3px; 1667 1667 border-radius: 3px; 1668 1668 } 1669 1669 1670 1670 div.activity-comments form textarea { 1671 1671 width: 100%; 1672 1672 font-family: inherit; … … 1676 1676 border: none; 1677 1677 padding: 0; 1678 1678 } 1679 1679 1680 1680 div.activity-comments form input { 1681 1681 margin-top: 5px; 1682 1682 } … … 1684 1684 div.activity-comments form div.ac-reply-avatar { 1685 1685 float: left; 1686 1686 } 1687 1687 1688 1688 div.ac-reply-avatar img { 1689 1689 border: 2px solid #fff !important; 1690 1690 } … … 1711 1711 background: #fff; 1712 1712 } 1713 1713 1714 li span.unread-count, 1714 li span.unread-count, 1715 1715 tr.unread span.unread-count { 1716 1716 background: #dd0000; 1717 1717 padding: 2px 8px; … … 1721 1721 -webkit-border-radius: 3px; 1722 1722 border-radius: 3px; 1723 1723 } 1724 1724 1725 1725 div.item-list-tabs ul li a span.unread-count { 1726 1726 padding: 1px 6px; 1727 1727 color: #fff; … … 1739 1739 margin: 0 -20px; 1740 1740 padding: 15px; 1741 1741 } 1742 1742 1743 1743 div#message-thread div.alt { 1744 1744 background: #f4f4f4; 1745 1745 } … … 1758 1758 margin: 0; 1759 1759 font-size: 16px; 1760 1760 } 1761 1761 1762 1762 div#message-thread strong a { 1763 1763 text-decoration: none; 1764 1764 } … … 1813 1813 color: #888; 1814 1814 font-size: 11px; 1815 1815 } 1816 1816 1817 1817 div#topic-meta div.admin-links { 1818 1818 bottom: 0; 1819 1819 right: 0; … … 1824 1824 position: relative; 1825 1825 padding: 5px 0; 1826 1826 } 1827 1827 1828 1828 div#topic-meta h3 { 1829 font-size: 20px; 1829 font-size: 20px; 1830 1830 } 1831 1831 1832 1832 div#new-topic-post { … … 1843 1843 overflow: hidden; 1844 1844 } 1845 1845 1846 div.post h2.pagetitle, 1846 div.post h2.pagetitle, 1847 1847 div.post h2.posttitle { 1848 1848 margin: 0; 1849 1849 line-height: 120%; 1850 1850 } 1851 1852 div.post h2.pagetitle a, 1851 1852 div.post h2.pagetitle a, 1853 1853 div.post h2.posttitle a { 1854 1854 color: #666; 1855 1855 text-decoration: none; 1856 1856 } 1857 1857 1858 .navigation, 1859 .paged-navigation, 1858 .navigation, 1859 .paged-navigation, 1860 1860 .comment-navigation { 1861 1861 overflow: hidden; 1862 1862 font-family: georgia, times, serif; … … 1876 1876 margin-right: 15px; 1877 1877 } 1878 1878 1879 div.post p { 1880 margin: 0 0 20px 0; 1879 div.post p { 1880 margin: 0 0 20px 0; 1881 1881 } 1882 1882 1883 div.post ul, 1884 div.post ol, 1885 div.post dl { 1886 margin: 0 0 18px 1.5em; 1883 div.post ul, 1884 div.post ol, 1885 div.post dl { 1886 margin: 0 0 18px 1.5em; 1887 1887 } 1888 1888 1889 1889 div.post ul { 1890 list-style: square; 1890 list-style: square; 1891 1891 } 1892 1893 div.post ol { 1892 1893 div.post ol { 1894 1894 list-style: decimal; 1895 1895 } 1896 1897 div.post ol ol { 1898 list-style: upper-alpha; 1896 1897 div.post ol ol { 1898 list-style: upper-alpha; 1899 1899 } 1900 1901 div.post dl { 1902 margin-left: 0; 1900 1901 div.post dl { 1902 margin-left: 0; 1903 1903 } 1904 1905 div.post dt { 1906 font-size: 14px; 1907 font-weight: bold; 1904 1905 div.post dt { 1906 font-size: 14px; 1907 font-weight: bold; 1908 1908 } 1909 1910 div.post dd { 1909 1910 div.post dd { 1911 1911 margin: 0 0 15px 0; 1912 1912 } 1913 1913 1914 div.post pre, 1914 div.post pre, 1915 1915 div.post code p { 1916 1916 padding: 15px; 1917 1917 background: #f4f4f4; … … 1921 1921 } 1922 1922 1923 1923 div.post code { 1924 font-family: "Monaco", courier, sans-serif; 1924 font-family: "Monaco", courier, sans-serif; 1925 1925 } 1926 1926 1927 1927 div.post blockquote { … … 1938 1938 border-spacing:0; 1939 1939 border: 1px solid #eee; 1940 1940 } 1941 1941 1942 1942 div.post table th { 1943 border-top: 1px solid #eee; 1944 text-align: left; 1943 border-top: 1px solid #eee; 1944 text-align: left; 1945 1945 } 1946 1947 div.post table td { 1948 border-top: 1px solid #eee; 1946 1947 div.post table td { 1948 border-top: 1px solid #eee; 1949 1949 } 1950 1951 div.post div.author-box, 1950 1951 div.post div.author-box, 1952 1952 div.comment-avatar-box { 1953 1953 background: #f0f0f0; 1954 1954 padding: 10px; … … 1962 1962 -webkit-border-radius: 3px; 1963 1963 border-radius: 3px; 1964 1964 } 1965 1966 div.author-box p, 1967 div.comment-avatar-box p { 1968 margin: 5px 0 0; 1965 1966 div.author-box p, 1967 div.comment-avatar-box p { 1968 margin: 5px 0 0; 1969 1969 } 1970 1971 div.author-box a, 1972 div.comment-avatar-box a { 1973 text-decoration: none; 1970 1971 div.author-box a, 1972 div.comment-avatar-box a { 1973 text-decoration: none; 1974 1974 } 1975 1975 1976 div.post div.author-box img, 1976 div.post div.author-box img, 1977 1977 div.comment-avatar-box img { 1978 1978 float: none; 1979 1979 border: 4px solid #fff; 1980 1980 margin: 0; 1981 1981 } 1982 1982 1983 div.post div.post-content, 1983 div.post div.post-content, 1984 1984 div.comment-content { 1985 1985 margin-left: 105px; 1986 1986 } 1987 1987 1988 div.post p.date, div.post p.postmetadata, 1988 div.post p.date, div.post p.postmetadata, 1989 1989 div.comment-meta, div.comment-options { 1990 1990 color: #888; 1991 1991 font-size: 12px; … … 2002 2002 overflow: hidden; 2003 2003 } 2004 2004 2005 div.post .tags { 2006 float: left; 2005 div.post .tags { 2006 float: left; 2007 2007 } 2008 2008 2009 div.post .comments { 2010 float: right; 2009 div.post .comments { 2010 float: right; 2011 2011 } 2012 2012 2013 div.post img { 2014 margin-bottom: 15px; 2013 div.post img { 2014 margin-bottom: 15px; 2015 2015 } 2016 2016 2017 div.post img.wp-smiley { 2018 padding: 0 !important; 2019 margin: 0 !important; 2020 border: none !important; 2021 float: none !important; 2022 clear: none !important; 2017 div.post img.wp-smiley { 2018 padding: 0 !important; 2019 margin: 0 !important; 2020 border: none !important; 2021 float: none !important; 2022 clear: none !important; 2023 2023 } 2024 2024 2025 2025 div.post img.centered, img.aligncenter { … … 2040 2040 display: inline; 2041 2041 } 2042 2042 2043 div.post .aligncenter, 2043 div.post .aligncenter, 2044 2044 div.post div.aligncenter { 2045 2045 display: block; 2046 2046 margin-left: auto; … … 2063 2063 border: 0 none; 2064 2064 } 2065 2065 2066 div.post dd.wp-caption p.wp-caption-text, 2066 div.post dd.wp-caption p.wp-caption-text, 2067 2067 div.post .wp-caption p.wp-caption-text { 2068 2068 font-size: 0.9em; 2069 2069 line-height: 17px; … … 2082 2082 margin-top: 30px; 2083 2083 } 2084 2084 2085 #comments h3, 2086 #trackbacks h3, 2085 #comments h3, 2086 #trackbacks h3, 2087 2087 #respond h3 { 2088 2088 font-size: 20px; 2089 2089 margin: 5px 0 25px 0; … … 2091 2091 color: #555; 2092 2092 } 2093 2093 2094 #comments span.title, 2094 #comments span.title, 2095 2095 #trackbacks span.title { 2096 2096 color: #aaa; 2097 2097 } … … 2117 2117 border-bottom: none; 2118 2118 } 2119 2119 2120 ol.commentlist ul.children { 2121 margin-left: 105px; 2120 ol.commentlist ul.children { 2121 margin-left: 105px; 2122 2122 } 2123 2123 2124 2124 … … 2135 2135 border-bottom: 1px solid #e0e0e0; 2136 2136 background: #fff; 2137 2137 } 2138 2138 2139 2139 #site-generator { 2140 2140 text-align: center; 2141 2141 color: #bbb; … … 2162 2162 background: #eaeaea; 2163 2163 padding: 5px 15px; 2164 2164 font-size: 12px; 2165 clear: left; 2165 clear: left; 2166 2166 } 2167 2167 2168 2168 #footer-widget-area div div.item-options { … … 2184 2184 z-index: 99999; 2185 2185 right: 0; 2186 2186 } 2187 2187 2188 2188 #nav li:hover > ul { 2189 2189 display: block; 2190 2190 } -
bp-themes/bp-default/_inc/ajax.php
567 567 // Include everyone in the autocomplete, or just friends? 568 568 if ( $bp->messages->slug == $bp->current_component ) 569 569 $autocomplete_all = $bp->messages->autocomplete_all; 570 570 571 571 $friends = false; 572 572 573 573 $limit = $_GET['limit'] ? $_GET['limit'] : apply_filters( 'bp_autocomplete_max_results', 10 ); … … 575 575 // Get the user ids based on the search terms 576 576 if ( $autocomplete_all ) { 577 577 $users = BP_Core_User::search_users( $_GET['q'], $limit, $pag_page ); 578 578 579 579 if ( !empty( $users['users'] ) ) { 580 580 // Build an array with the correct format 581 581 $user_ids = array(); … … 583 583 if ( $user->id != $bp->loggedin_user->id ) 584 584 $user_ids[] = $user->id; 585 585 } 586 586 587 587 $user_ids = apply_filters( 'bp_core_autocomplete_ids', $user_ids, $_GET['q'], $limit ); 588 588 } 589 589 } else { 590 590 if ( function_exists( 'friends_search_friends' ) ) { 591 591 $users = friends_search_friends( $_GET['q'], $bp->loggedin_user->id, $limit, 1 ); 592 592 593 593 // Keeping the bp_friends_autocomplete_list filter for backward compatibility 594 594 $users = apply_filters( 'bp_friends_autocomplete_list', $users, $_GET['q'], $limit ); 595 595 596 596 if ( !empty( $users['friends'] ) ) 597 597 $user_ids = apply_filters( 'bp_friends_autocomplete_ids', $users['friends'], $_GET['q'], $limit ); 598 598 } 599 599 } 600 601 600 601 602 602 if ( $user_ids ) { 603 603 foreach ( $user_ids as $user_id ) { 604 604 $ud = get_userdata($user_id); -
bp-themes/bp-default/_inc/global.js
824 824 }).mouseout( function() { 825 825 jq(this).removeClass('over'); 826 826 }); 827 827 828 828 jq('body#bp-default table.zebra tbody tr:odd').addClass('alt'); 829 829 830 830 jq('div.message-box').each( function(i) { -
bp-themes/bp-default/registration/register.php
162 162 <?php do_action( 'bp_after_signup_profile_fields' ) ?> 163 163 164 164 <?php endif; ?> 165 165 166 166 <?php if ( bp_get_blog_signup_allowed() ) : ?> 167 167 168 168 <?php do_action( 'bp_before_blog_details_fields' ) ?> -
bp-themes/bp-default/forums/index.php
115 115 <?php do_action( 'bp_after_directory_forums_content' ) ?> 116 116 117 117 </form> 118 118 119 119 <?php do_action( 'bp_after_directory_forums' ) ?> 120 120 121 121 </div><!-- .padder --> -
bp-themes/bp-default/comments.php
18 18 $numTrackBacks = 0; $numComments = 0; 19 19 foreach ( (array)$comments as $comment ) 20 20 if ( 'comment' != get_comment_type() ) 21 $numTrackBacks++; 21 $numTrackBacks++; 22 22 else 23 23 $numComments++; 24 24 ?> -
bp-xprofile/admin/js/admin.dev.js
12 12 13 13 var label = document.createElement('label'); 14 14 label.setAttribute('for', forWhat + '_option' + theId); 15 15 16 16 var txt = document.createTextNode("Option " + theId + ": "); 17 17 label.appendChild(txt); 18 18 19 19 var isDefault = document.createElement('input'); 20 20 21 21 if(forWhat == 'checkbox' || forWhat == 'multiselectbox') { 22 22 isDefault.setAttribute('type', 'checkbox'); 23 23 isDefault.setAttribute('name', 'isDefault_' + forWhat + '_option[' + theId + ']'); 24 24 } else { 25 25 isDefault.setAttribute('type', 'radio'); 26 isDefault.setAttribute('name', 'isDefault_' + forWhat + '_option'); 26 isDefault.setAttribute('name', 'isDefault_' + forWhat + '_option'); 27 27 } 28 28 29 29 isDefault.setAttribute('value', theId); 30 30 31 31 var label1 = document.createElement('label'); 32 32 var txt1 = document.createTextNode(" Default Value "); 33 33 34 34 label1.appendChild(txt1); 35 35 label1.setAttribute('for', 'isDefault_' + forWhat + '_option[]'); 36 36 toDelete = document.createElement('a'); 37 37 38 38 toDeleteText = document.createTextNode('[x]'); 39 39 toDelete.setAttribute('href',"javascript:hide('" + forWhat + '_div' + theId + "')"); 40 40 41 41 toDelete.setAttribute('class','delete'); 42 42 43 43 toDelete.appendChild(toDeleteText); … … 46 46 newDiv.appendChild(newOption); 47 47 newDiv.appendChild(document.createTextNode(" ")); 48 48 newDiv.appendChild(isDefault); 49 newDiv.appendChild(label1); 50 newDiv.appendChild(toDelete); 49 newDiv.appendChild(label1); 50 newDiv.appendChild(toDelete); 51 51 holder.appendChild(newDiv); 52 53 52 53 54 54 theId++ 55 55 document.getElementById(forWhat + "_option_number").value = theId; 56 56 } … … 60 60 document.getElementById("selectbox").style.display = "none"; 61 61 document.getElementById("multiselectbox").style.display = "none"; 62 62 document.getElementById("checkbox").style.display = "none"; 63 63 64 64 if(forWhat == "radio") 65 65 document.getElementById("radio").style.display = ""; 66 66 67 67 if(forWhat == "selectbox") 68 document.getElementById("selectbox").style.display = ""; 69 68 document.getElementById("selectbox").style.display = ""; 69 70 70 if(forWhat == "multiselectbox") 71 document.getElementById("multiselectbox").style.display = ""; 72 71 document.getElementById("multiselectbox").style.display = ""; 72 73 73 if(forWhat == "checkbox") 74 document.getElementById("checkbox").style.display = ""; 74 document.getElementById("checkbox").style.display = ""; 75 75 } 76 76 77 77 function hide(id) { 78 78 if ( !document.getElementById(id) ) return false; 79 79 80 80 document.getElementById(id).style.display = "none"; 81 81 document.getElementById(id).value = ''; 82 82 } 83 83 84 84 // Set up deleting options ajax 85 85 jQuery(document).ready( function() { 86 87 jQuery("a.ajax-option-delete").click( 86 87 jQuery("a.ajax-option-delete").click( 88 88 function() { 89 89 var theId = this.id.split('-'); 90 90 theId = theId[1]; 91 91 92 92 jQuery.post( ajaxurl, { 93 93 action: 'xprofile_delete_option', 94 94 'cookie': encodeURIComponent(document.cookie), 95 95 '_wpnonce': jQuery("input#_wpnonce").val(), 96 96 97 97 'option_id': theId 98 98 }, 99 99 function(response) 100 100 {}); 101 101 } 102 ); 102 ); 103 103 }); 104 104 105 105 var fixHelper = function(e, ui) { … … 160 160 .css( 'cursor', 'move' ); 161 161 162 162 /* tabs init with a custom tab template and an "add" callback filling in the content */ 163 var $tab_items; 163 var $tab_items; 164 164 var $tabs = jQuery( "#tabs" ).tabs(); 165 165 set_tab_items( $tabs ); 166 166 -
bp-xprofile/bp-xprofile-classes.php
760 760 function exists() { 761 761 global $wpdb, $bp; 762 762 763 763 764 764 $retval = $wpdb->get_row( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = %d", $this->user_id, $this->field_id ) ); 765 765 766 766 return apply_filters( 'xprofile_data_exists', (bool)$retval, $this ); -
bp-core/bp-core-signup.php
15 15 return false; 16 16 17 17 $bp->is_directory = false; 18 18 19 19 if ( bp_is_component_front_page( 'register' ) && ( is_user_logged_in() || !bp_get_signup_allowed() ) ) 20 20 bp_core_redirect( $bp->root_domain . '/' . $bp->members->slug ); 21 21 … … 325 325 326 326 if ( defined( 'BP_ACTIVATION_SLUG' ) ) 327 327 $bp_component_slugs[] = BP_ACTIVATION_SLUG; 328 328 329 329 // Add our slugs to the array and allow them to be filtered 330 330 $filtered_illegal_names = apply_filters( 'bp_core_illegal_usernames', array_merge( array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' ), $bp_component_slugs ) ); 331 331 … … 634 634 $message = apply_filters( 'bp_core_activation_signup_user_notification_message', $message, $user_id ); 635 635 636 636 wp_mail( $to, $subject, $message, $message_headers ); 637 637 638 638 do_action( 'bp_core_sent_user_validation_email', $admin_email, $subject, $message, $user_id, $user_email, $key ); 639 639 } 640 640 -
bp-core/bp-core-widgets.php
63 63 <span class="activity"> 64 64 <?php 65 65 if ( 'newest' == $instance['member_default'] ) 66 bp_member_registered(); 66 bp_member_registered(); 67 67 if ( 'active' == $instance['member_default'] ) 68 68 bp_member_last_active(); 69 69 if ( 'popular' == $instance['member_default'] ) … … 107 107 'member_default' => 'active' 108 108 ); 109 109 $instance = wp_parse_args( (array) $instance, $defaults ); 110 110 111 111 $title = strip_tags( $instance['title'] ); 112 112 $max_members = strip_tags( $instance['max_members'] ); 113 113 $member_default = strip_tags( $instance['member_default'] ); … … 116 116 <p><label for="bp-core-widget-title"><?php _e('Title:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" style="width: 100%" /></label></p> 117 117 118 118 <p><label for="bp-core-widget-members-max"><?php _e('Max members to show:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_members' ); ?>" name="<?php echo $this->get_field_name( 'max_members' ); ?>" type="text" value="<?php echo esc_attr( $max_members ); ?>" style="width: 30%" /></label></p> 119 119 120 120 <p> 121 <label for="bp-core-widget-groups-default"><?php _e('Default members to show:', 'buddypress'); ?> 121 <label for="bp-core-widget-groups-default"><?php _e('Default members to show:', 'buddypress'); ?> 122 122 <select name="<?php echo $this->get_field_name( 'member_default' ) ?>"> 123 123 <option value="newest" <?php if ( $member_default == 'newest' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Newest', 'buddypress' ) ?></option> 124 124 <option value="active" <?php if ( $member_default == 'active' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Active', 'buddypress' ) ?></option> 125 125 <option value="popular" <?php if ( $member_default == 'popular' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Popular', 'buddypress' ) ?></option> 126 </select> 126 </select> 127 127 </label> 128 128 </p> 129 129 130 130 <?php 131 131 } 132 132 } … … 183 183 'max_members' => 15 184 184 ); 185 185 $instance = wp_parse_args( (array) $instance, $defaults ); 186 186 187 187 $title = strip_tags( $instance['title'] ); 188 188 $max_members = strip_tags( $instance['max_members'] ); 189 189 ?> … … 247 247 'max_members' => 15 248 248 ); 249 249 $instance = wp_parse_args( (array) $instance, $defaults ); 250 250 251 251 $title = strip_tags( $instance['title'] ); 252 252 $max_members = strip_tags( $instance['max_members'] ); 253 253 ?> … … 298 298 <?php if ( 'active' == $type ) : ?> 299 299 <div class="item-meta"><span class="activity"><?php bp_member_last_active() ?></span></div> 300 300 <?php elseif ( 'newest' == $type ) : ?> 301 <div class="item-meta"><span class="activity"><?php bp_member_registered() ?></span></div> 301 <div class="item-meta"><span class="activity"><?php bp_member_registered() ?></span></div> 302 302 <?php elseif ( bp_is_active( 'friends' ) ) : ?> 303 303 <div class="item-meta"><span class="activity"><?php bp_member_total_friend_count() ?></span></div> 304 304 <?php endif; ?> -
bp-core/bp-core-filters.php
205 205 $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message, $domain, $path, $title, $user, $user_email, $key, $meta ); 206 206 207 207 wp_mail( $to, $subject, $message, $message_headers ); 208 208 209 209 do_action( 'bp_core_sent_blog_signup_email', $admin_email, $subject, $message, $domain, $path, $title, $user, $user_email, $key, $meta ); 210 210 211 211 // Return false to stop the original WPMU function from continuing -
bp-core/admin/bp-core-upgrade.php
9 9 10 10 // Install site options on activation 11 11 bp_core_activate_site_options( array( 'bp-disable-account-deletion' => 0, 'bp-disable-avatar-uploads' => 0, 'bp-disable-blogforum-comments' => 0, 'bp-disable-forum-directory' => 0, 'bp-disable-profile-sync' => 0 ) ); 12 12 13 13 /** 14 14 * bp_core_activate_site_options() 15 15 * … … 55 55 if ( !$this->current_version = get_site_option( 'bp-db-version' ) ) 56 56 if ( $this->current_version = get_option( 'bp-db-version' ) ) 57 57 $this->is_network_activate = true; 58 58 59 59 $this->new_version = constant( 'BP_DB_VERSION' ); 60 60 $this->setup_type = ( empty( $this->current_version ) && !(int)get_site_option( 'bp-core-db-version' ) ) ? 'new' : 'upgrade'; 61 61 $this->current_step = $this->current_step(); … … 103 103 } 104 104 } else { 105 105 // Upgrade wizard steps 106 106 107 107 if ( $this->is_network_activate ) 108 108 $steps[] = __( 'Multisite Upgrade', 'buddypress' ); 109 109 110 110 if ( $this->current_version < $this->new_version ) 111 111 $steps[] = __( 'Database Upgrade', 'buddypress' ); 112 112 … … 242 242 </div> 243 243 <?php 244 244 } 245 245 246 246 function step_ms_upgrade() { 247 247 if ( !current_user_can( 'activate_plugins' ) ) 248 248 return false; … … 251 251 $blogs_slug = constant( 'BP_BLOGS_SLUG' ); 252 252 else 253 253 $blogs_slug = __( 'blogs', 'buddypress' ); 254 254 255 255 if ( !defined( 'BP_ENABLE_MULTIBLOG' ) && is_multisite() ) 256 256 $existing_pages = get_blog_option( BP_ROOT_BLOG, 'bp-pages' ); 257 257 else … … 261 261 <div class="prev-next submit clear"> 262 262 <p><input type="submit" value="<?php _e( 'Save & Next →', 'buddypress' ) ?>" name="submit" /></p> 263 263 </div> 264 264 265 265 <p><?php printf( __( 'It looks like you have just activated WordPress Multisite mode, which allows members of your BuddyPress community to have their own WordPress blogs. You can enable or disable this feature at any time at <a href="%s">Network Options</a>.', 'buddypress' ), admin_url( 'ms-options.php' ) ); ?></p> 266 266 267 267 <p><?php _e( "Please select the WordPress page you would like to use to display the blog directory. You can either choose an existing page or let BuddyPress auto-create a page for you. If you'd like to manually create pages, please go ahead and do that now, you can come back to this step once you are finished.", 'buddypress' ) ?></p> 268 268 269 269 <p><strong><?php _e( 'Please Note:', 'buddypress' ) ?></strong> <?php _e( "If you have manually added BuddyPress navigation links in your theme you may need to remove these from your header.php to avoid duplicate links.", 'buddypress' ) ?></p> … … 280 280 <p><input type="radio" name="bp_pages[blogs]" checked="checked" value="<?php echo $blogs_slug ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ) ?> <?php echo site_url( $blogs_slug ) ?>/</p> 281 281 </td> 282 282 </tr> 283 283 284 284 </table> 285 285 286 286 <p><?php _e( 'Would you like to enable blog tracking, which tracks blog activity across your network?', 'buddypress' ); ?></p> 287 287 288 288 <div class="left-col"> 289 289 290 290 <div class="component"> 291 291 <h5><?php _e( "Blog Tracking", 'buddypress' ) ?></h5> 292 292 … … 297 297 298 298 <img src="<?php echo plugins_url( 'buddypress/screenshot-7.gif' ) ?>" alt="Activity Streams" /> 299 299 <p><?php _e( "Track new blogs, new posts and new comments across your entire blog network.", 'buddypress' ) ?></p> 300 </div> 300 </div> 301 301 </div> 302 302 303 303 <div class="submit clear"> 304 304 <p><input type="submit" value="<?php _e( 'Save & Next →', 'buddypress' ) ?>" name="submit" /></p> 305 305 … … 307 307 <input type="hidden" name="step" value="<?php echo esc_attr( $this->current_step ) ?>" /> 308 308 <?php wp_nonce_field( 'bpwizard_ms_upgrade' ) ?> 309 309 </div> 310 310 311 311 <script type="text/javascript"> 312 312 jQuery('select').click( function() { 313 313 jQuery(this).parent().children('input').attr( 'checked', 'checked' ); … … 837 837 // Make sure that the pages are created on the BP_ROOT_BLOG, no matter which Dashboard the setup is being run on 838 838 if ( $current_blog->blog_id != BP_ROOT_BLOG && !defined( 'BP_ENABLE_MULTIBLOG' ) ) 839 839 switch_to_blog( BP_ROOT_BLOG ); 840 840 841 841 $existing_pages = get_option( 'bp-pages' ); 842 842 843 843 $bp_pages = $this->setup_pages( (array)$_POST['bp_pages'] ); 844 844 845 845 $bp_pages = array_merge( (array)$existing_pages, (array)$bp_pages ); 846 846 847 847 update_option( 'bp-pages', $bp_pages ); 848 848 849 849 if ( $current_blog->blog_id != BP_ROOT_BLOG ) 850 850 restore_current_blog(); 851 851 852 852 unset( $disabled['bp-blogs.php'] ); 853 853 854 854 bp_core_install( $disabled ); 855 855 } 856 856 857 857 update_site_option( 'bp-deactivated-components', $disabled ); 858 858 859 859 return true; … … 1044 1044 1045 1045 return false; 1046 1046 } 1047 1047 1048 1048 function setup_pages( $pages ) { 1049 1049 foreach ( $pages as $key => $value ) { 1050 1050 if ( 'page' == $value ) { … … 1058 1058 $bp_pages[$key] = wp_insert_post( array( 'post_title' => ucwords( $value ), 'post_status' => 'publish', 'post_type' => 'page' ) ); 1059 1059 } 1060 1060 } 1061 1061 1062 1062 return $bp_pages; 1063 1063 } 1064 1064 -
bp-core/admin/bp-core-schema.php
227 227 KEY can_delete (can_delete), 228 228 KEY is_required (is_required) 229 229 ) {$charset_collate};"; 230 230 231 231 $sql[] = "CREATE TABLE {$wpdb->base_prefix}bp_xprofile_data ( 232 232 id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, 233 233 field_id bigint(20) unsigned NOT NULL, -
bp-core/bp-core-templatetags.php
704 704 } 705 705 function bp_get_avatar_admin_step() { 706 706 global $bp; 707 707 708 708 if ( isset( $bp->avatar_admin->step ) ) 709 709 $step = $bp->avatar_admin->step; 710 710 else … … 718 718 } 719 719 function bp_get_avatar_to_crop() { 720 720 global $bp; 721 721 722 722 if ( isset( $bp->avatar_admin->image->url ) ) 723 723 $url = $bp->avatar_admin->image->url; 724 724 else … … 1023 1023 global $bp; 1024 1024 1025 1025 $options = array(); 1026 1026 1027 1027 if ( bp_is_active( 'xprofile' ) ) 1028 1028 $options['members'] = __( 'Members', 'buddypress' ); 1029 1029 … … 1530 1530 $path = bp_core_get_site_path(); 1531 1531 else 1532 1532 $path = $current_blog->path; 1533 1533 1534 1534 if ( 'page' != get_option( 'show_on_front' ) || !$component || empty( $bp->pages->{$component} ) || $_SERVER['REQUEST_URI'] != $path ) 1535 1535 return false; 1536 1536 -
bp-core/bp-core-classes.php
140 140 141 141 if ( 'alphabetical' == $type ) 142 142 $sql['where_alpha'] = "AND pd.field_id = 1"; 143 143 144 144 if ( !empty( $exclude ) ) 145 145 $sql['where_exclude'] = "AND u.ID NOT IN ({$exclude})"; 146 146 … … 259 259 260 260 $total_users_sql = apply_filters( 'bp_core_users_by_letter_count_sql', $wpdb->prepare( "SELECT COUNT(DISTINCT u.ID) FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC", BP_XPROFILE_FULLNAME_FIELD_NAME ), $letter ); 261 261 $paged_users_sql = apply_filters( 'bp_core_users_by_letter_sql', $wpdb->prepare( "SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.user_email FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC{$pag_sql}", BP_XPROFILE_FULLNAME_FIELD_NAME ), $letter, $pag_sql ); 262 262 263 263 $total_users = $wpdb->get_var( $total_users_sql ); 264 264 $paged_users = $wpdb->get_results( $paged_users_sql ); 265 265 -
bp-core/bp-core-settings.php
23 23 24 24 if ( !is_super_admin() && empty( $bp->site_options['bp-disable-account-deletion'] ) ) 25 25 bp_core_new_subnav_item( array( 'name' => __( 'Delete Account', 'buddypress' ), 'slug' => 'delete-account', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_delete_account', 'position' => 90, 'user_has_access' => bp_is_my_profile() ) ); 26 26 27 27 do_action( 'bp_core_settings_setup_nav' ); 28 28 } 29 29 add_action( 'bp_setup_nav', 'bp_core_add_settings_nav' ); … … 44 44 require_once( WPINC . '/registration.php' ); 45 45 46 46 // Form has been submitted and nonce checks out, lets do it. 47 47 48 48 // Validate the user again for the current password when making a big change 49 49 if ( !empty( $_POST['pwd'] ) && $_POST['pwd'] != '' && wp_check_password($_POST['pwd'], $current_user->user_pass, $current_user->ID) ) { 50 50 51 51 // Make sure changing an email address does not already exist 52 52 if ( $_POST['email'] != '' ) { 53 53 54 54 // What is missing from the profile page vs signup - lets double check the goodies 55 55 $user_email = sanitize_email( wp_specialchars( trim( $_POST['email'] ) ) ); 56 56 57 57 if ( !is_email( $user_email ) ) 58 58 $email_error = true; 59 59 60 60 $limited_email_domains = get_site_option( 'limited_email_domains', 'buddypress' ); 61 61 62 62 if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) { 63 63 $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) ); 64 64 65 65 if ( in_array( $emaildomain, (array)$limited_email_domains ) == false ) { 66 66 $email_error = true; 67 67 68 68 } 69 69 } 70 70 71 71 if ( !$email_error && $current_user->user_email != $user_email ) { 72 72 73 73 //we don't want email dups in the system 74 74 if ( email_exists( $user_email ) ) 75 75 $email_error = true; 76 76 77 77 if (!$email_error) 78 78 $current_user->user_email = $user_email; 79 79 } 80 80 } 81 81 82 82 if ( $_POST['pass1'] != '' && $_POST['pass2'] != '' ) { 83 83 84 84 if ( $_POST['pass1'] == $_POST['pass2'] && !strpos( " " . $_POST['pass1'], "\\" ) ) 85 85 $current_user->user_pass = $_POST['pass1']; 86 86 else 87 87 $pass_error = true; 88 88 89 89 } else if ( empty( $_POST['pass1'] ) && !empty( $_POST['pass2'] ) || !empty( $_POST['pass1'] ) && empty( $_POST['pass2'] ) ) { 90 90 $pass_error = true; 91 91 } else { 92 92 unset( $current_user->user_pass ); 93 93 } 94 94 95 95 if ( !$email_error && !$pass_error && wp_update_user( get_object_vars( $current_user ) ) ) 96 96 $bp_settings_updated = true; 97 97 98 98 } else { 99 99 $pwd_error = true; 100 100 } 101 101 102 102 do_action( 'bp_core_general_settings_after_save' ); 103 103 } 104 104 … … 126 126 <p><?php _e( 'Your passwords did not match', 'buddypress' ) ?></p> 127 127 </div> 128 128 <?php } ?> 129 129 130 130 <?php if ( $pwd_error && !$bp_settings_updated ) { ?> 131 131 <div id="message" class="error fade"> 132 132 <p><?php _e( 'Your password is incorrect', 'buddypress' ) ?></p> 133 133 </div> 134 134 <?php } ?> 135 135 136 <?php 136 <?php 137 137 if ( $email_error && !$bp_settings_updated ) { ?> 138 138 <div id="message" class="error fade"> 139 139 <p><?php _e( 'Sorry, that email address is already used or is invalid', 'buddypress' ) ?></p> … … 152 152 <label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ) ?></label> 153 153 <input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /> <?php _e( 'New Password', 'buddypress' ) ?><br /> 154 154 <input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /> <?php _e( 'Repeat New Password', 'buddypress' ) ?> 155 155 156 156 <?php do_action( 'bp_core_general_settings_before_submit' ) ?> 157 157 158 158 <div class="submit"> 159 159 <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" id="submit" class="auto" /> 160 160 </div> 161 161 162 162 <?php do_action( 'bp_core_general_settings_after_submit' ) ?> 163 163 164 164 <?php wp_nonce_field('bp_settings_general') ?> … … 183 183 } 184 184 185 185 $bp_settings_updated = true; 186 186 187 187 do_action( 'bp_core_notification_settings_after_save' ); 188 188 } 189 189 … … 216 216 </div> 217 217 218 218 <?php do_action( 'bp_core_notification_settings_after_submit' ) ?> 219 219 220 220 <?php wp_nonce_field('bp_settings_notifications') ?> 221 221 222 222 </form> … … 256 256 <input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" /> <?php _e( 'I understand the consequences of deleting my account.', 'buddypress' ); ?> 257 257 258 258 <?php do_action( 'bp_core_delete_account_before_submit' ) ?> 259 259 260 260 <div class="submit"> 261 261 <input type="submit" disabled="disabled" value="<?php _e( 'Delete My Account', 'buddypress' ) ?> →" id="delete-account-button" name="delete-account-button" /> 262 262 </div> 263 263 264 264 <?php do_action( 'bp_core_delete_account_after_submit' ) ?> 265 265 266 266 <?php wp_nonce_field('delete-account') ?> -
bp-core/bp-core-avatars.php
484 484 */ 485 485 function bp_core_fetch_avatar_filter( $avatar, $user, $size, $default, $alt ) { 486 486 global $pagenow; 487 487 488 488 // Do not filter if inside WordPress options page 489 489 if ( 'options-discussion.php' == $pagenow ) 490 490 return $avatar; 491 491 492 492 // If passed an object, assume $user->user_id 493 493 if ( is_object( $user ) ) 494 494 $id = $user->user_id; -
bp-core/bp-core-catchuri.php
65 65 66 66 // Running off blog other than root 67 67 if ( defined( 'BP_ENABLE_MULTIBLOG' ) || 1 != BP_ROOT_BLOG ) { 68 68 69 69 // Any subdirectory names must be removed from $bp_uri. 70 70 // This includes two cases: (1) when WP is installed in a subdirectory, 71 71 // and (2) when BP is running on secondary blog of a subdirectory … … 73 73 if ( $chunks = explode( '/', $current_blog->path ) ) { 74 74 foreach( $chunks as $key => $chunk ) { 75 75 $bkey = array_search( $chunk, $bp_uri ); 76 76 77 77 if ( $bkey !== false ) 78 78 unset( $bp_uri[$bkey] ); 79 79 80 80 $bp_uri = array_values( $bp_uri ); 81 81 } 82 82 } … … 139 139 140 140 unset( $uri_chunks ); 141 141 } 142 142 143 143 // Search doesn't have an associated page, so we check for it separately 144 144 if ( !empty( $bp_uri[0] ) && BP_SEARCH_SLUG == $bp_uri[0] ) 145 145 $matches[] = 1; 146 146 147 147 // This is not a BuddyPress page, so just return. 148 148 if ( !isset( $matches ) ) 149 149 return false; -
bp-friends/bp-friends-notifications.php
39 39 $message = apply_filters( 'friends_notification_new_request_message', $message, $initiator_name, $initiator_link, $all_requests_link ); 40 40 41 41 wp_mail( $to, $subject, $message ); 42 42 43 43 do_action( 'bp_friends_sent_request_email', $friend_id, $subject, $message, $friendship_id, $initiator_id ); 44 44 } 45 45 … … 79 79 $message = apply_filters( 'friends_notification_accepted_request_message', $message, $friend_name, $friend_link ); 80 80 81 81 wp_mail( $to, $subject, $message ); 82 82 83 83 do_action( 'bp_friends_sent_accepted_email', $initator_id, $subject, $message, $friendship_id, $friend_id ); 84 84 } 85 85 -
bp-activity/bp-activity-filters.php
109 109 * Finds and links @-mentioned users in activity updates 110 110 * 111 111 * @package BuddyPress Activity 112 * 112 * 113 113 * @param string $content The activity content 114 114 */ 115 115 function bp_activity_at_name_filter( $content ) { -
bp-activity/bp-activity-notifications.php
14 14 foreach( (array)$usernames as $username ) { 15 15 if ( !$receiver_user_id = bp_core_get_userid( $username ) ) 16 16 continue; 17 18 bp_core_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $poster_user_id );19 17 18 bp_core_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $poster_user_id ); 19 20 20 // Now email the user with the contents of the message (if they have enabled email notifications) 21 21 if ( 'no' != get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) { 22 22 $poster_name = bp_core_get_user_displayname( $poster_user_id ); … … 53 53 wp_mail( $to, $subject, $message ); 54 54 } 55 55 } 56 56 57 57 do_action( 'bp_activity_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $activity_id ); 58 58 } 59 59 add_action( 'bp_activity_posted_update', 'bp_activity_at_message_notification', 10, 3 ); … … 97 97 $message = apply_filters( 'bp_activity_new_comment_notification_message', $message, $poster_name, $content, $thread_link ); 98 98 99 99 wp_mail( $to, $subject, $message ); 100 100 101 101 do_action( 'bp_activity_sent_reply_to_update_email', $original_activity->user_id, $subject, $message, $comment_id, $commenter_id, $params ); 102 102 } 103 103 … … 142 142 $message = apply_filters( 'bp_activity_new_comment_notification_comment_author_message', $message, $poster_name, $content ); 143 143 144 144 wp_mail( $to, $subject, $message ); 145 145 146 146 do_action( 'bp_activity_sent_reply_to_reply_email', $original_activity->user_id, $subject, $message, $comment_id, $commenter_id, $params ); 147 147 } 148 148 } -
bp-activity/bp-activity-templatetags.php
135 135 /** 136 136 * bp_has_activities() 137 137 * 138 * Initializes the activity loop. 138 * Initializes the activity loop. 139 139 * 140 140 * Based on the $args passed, bp_has_activities() populates the $activities_template global. 141 141 * … … 173 173 if ( 'public' != $bp->groups->current_group->status && ( groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) || $bp->loggedin_user->is_super_admin ) ) 174 174 $show_hidden = true; 175 175 } 176 176 177 177 // The default scope should recognize custom slugs 178 178 if ( array_key_exists( $bp->current_action, (array)$bp->active_components ) ) { 179 179 $scope = $bp->active_components[$bp->current_action]; … … 941 941 return apply_filters( 'bp_activity_can_comment_reply', $can_comment, $comment ); 942 942 } 943 943 944 function bp_activity_can_favorite() { 944 function bp_activity_can_favorite() { 945 945 $can_favorite = true; 946 946 947 947 return apply_filters( 'bp_activity_can_favorite', $can_favorite ); 948 948 } 949 949 … … 1030 1030 function bp_member_activity_feed_link() { 1031 1031 echo bp_get_member_activity_feed_link(); 1032 1032 } 1033 function bp_activities_member_rss_link() { 1034 echo bp_get_member_activity_feed_link(); 1033 function bp_activities_member_rss_link() { 1034 echo bp_get_member_activity_feed_link(); 1035 1035 } 1036 1036 1037 1037 function bp_get_member_activity_feed_link() { -
bp-activity/bp-activity-classes.php
120 120 // Exclude specified items 121 121 if ( $exclude ) 122 122 $where_conditions['exclude'] = "a.id NOT IN ({$exclude})"; 123 123 124 124 // The specific ids to which you want to limit the query 125 125 if ( !empty( $in ) ) { 126 126 if ( is_array( $in ) ) … … 461 461 462 462 // array of prepared integers or quoted strings 463 463 $items_prepared = array(); 464 464 465 465 // clean up and format each item 466 466 foreach ( $items_dirty as $item ) { 467 467 // clean up the string -
bp-loader.php
112 112 'registration', 113 113 'fileupload_maxk' 114 114 ) ); 115 115 116 116 // These options always come from the options table of BP_ROOT_BLOG 117 117 $root_blog_options = apply_filters( 'bp_core_root_blog_options', array( 118 118 'avatar_default' … … 124 124 $site_meta = $wpdb->get_results( "SELECT meta_key AS name, meta_value AS value FROM {$wpdb->sitemeta} WHERE meta_key IN ({$meta_keys}) AND site_id = {$wpdb->siteid}" ); 125 125 else 126 126 $site_meta = $wpdb->get_results( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ({$meta_keys})" ); 127 127 128 128 $root_blog_meta_keys = "'" . implode( "','", (array)$root_blog_options ) ."'"; 129 129 130 130 $root_blog_meta_table = $wpdb->get_blog_prefix( BP_ROOT_BLOG ) . 'options'; 131 131 $root_blog_meta = $wpdb->get_results( $wpdb->prepare( "SELECT option_name AS name, option_value AS value FROM {$root_blog_meta_table} WHERE option_name IN ({$root_blog_meta_keys})" ) ); 132 132 -
bp-blogs.php
475 475 476 476 if ( empty( $role ) ) { 477 477 $key = $wpdb->get_blog_prefix( $id ). 'capabilities'; 478 478 479 479 $roles = get_user_meta( $user_id, $key, true ); 480 480 481 481 if ( is_array( $roles ) ) 482 482 $role = array_search( 1, $roles ); 483 483 else -
bp-forums.php
72 72 $error_message = __( 'Please provide a title for your forum topic.', 'buddypress' ); 73 73 else if ( empty( $_POST['topic_text'] ) ) 74 74 $error_message = __( 'Forum posts cannot be empty. Please enter some text.', 'buddypress' ); 75 75 76 76 if ( $error_message ) { 77 77 bp_core_add_message( $error_message, 'error' ); 78 78 $redirect = bp_get_group_permalink( $bp->groups->current_group ) . 'forum'; … … 85 85 $redirect = bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/'; 86 86 } 87 87 } 88 88 89 89 bp_core_redirect( $redirect ); 90 90 91 91 } else { 92 92 bp_core_add_message( __( 'Please pick the group forum where you would like to post this topic.', 'buddypress' ), 'error' ); 93 93 } -
bp-groups.php
495 495 $error_message = __( 'Please provide a title for your forum topic.', 'buddypress' ); 496 496 else if ( empty( $_POST['topic_text'] ) ) 497 497 $error_message = __( 'Forum posts cannot be empty. Please enter some text.', 'buddypress' ); 498 498 499 499 if ( isset( $error_message ) ) { 500 500 bp_core_add_message( $error_message, 'error' ); 501 501 $redirect = bp_get_group_permalink( $bp->groups->current_group ) . 'forum'; … … 1038 1038 bp_core_add_message( __( 'Please fill in all of the required fields', 'buddypress' ), 'error' ); 1039 1039 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' ); 1040 1040 } 1041 1041 1042 1042 $new_group_id = isset( $bp->groups->new_group_id ) ? $bp->groups->new_group_id : 0; 1043 1043 1044 1044 if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title( esc_attr( $_POST['group-name'] ) ) ), 'date_created' => bp_core_current_time(), 'status' => 'public' ) ) ) { … … 1330 1330 1331 1331 function groups_update_last_activity( $group_id = false ) { 1332 1332 global $bp; 1333 1333 1334 1334 if ( !$group_id ) 1335 1335 $group_id = $bp->groups->current_group->id; 1336 1336 1337 1337 if ( !$group_id ) 1338 1338 return false; 1339 1339 1340 1340 groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() ); 1341 1341 } 1342 1342 add_action( 'groups_leave_group', 'groups_update_last_activity' ); -
bp-blogs/bp-blogs-classes.php
112 112 foreach ( (array)$paged_blogs as $blog ) { 113 113 $blog_ids[] = $blog->blog_id; 114 114 } 115 115 116 116 $blog_ids = $wpdb->escape( join( ',', (array)$blog_ids ) ); 117 117 $paged_blogs = BP_Blogs_Blog::get_blog_extras( &$paged_blogs, $blog_ids, $type ); 118 118 -
bp-messages/bp-messages-notifications.php
43 43 44 44 wp_mail( $email_to, $email_subject, $email_content ); 45 45 } 46 46 47 47 do_action( 'bp_messages_sent_notification_email', $recipients, $email_subject, $email_content, $args ); 48 48 } 49 49 -
bp-messages/bp-messages-templatetags.php
660 660 661 661 function bp_thread_has_messages( $args = '' ) { 662 662 global $bp, $thread_template, $group_id; 663 663 664 664 $defaults = array( 665 665 'thread_id' => false, 666 666 'order' => 'ASC' -
bp-messages/js/autocomplete/jquery.autocompletefb.dev.js
6 6 * Credits: 7 7 * - Idea: Facebook 8 8 * - Guillermo Rauch: Original MooTools script 9 * - InteRiders <http://interiders.com/> 9 * - InteRiders <http://interiders.com/> 10 10 * 11 11 * Copyright (c) 2008 Widi Harsojo <wharsojo@gmail.com>, http://wharsojo.wordpress.com/ 12 12 * Dual licensed under the MIT and GPL licenses: 13 13 * http://www.opensource.org/licenses/mit-license.php 14 14 * http://www.gnu.org/licenses/gpl.html 15 15 */ 16 17 jQuery.fn.autoCompletefb = function(options) 16 17 jQuery.fn.autoCompletefb = function(options) 18 18 { 19 19 var tmp = this; 20 var settings = 20 var settings = 21 21 { 22 22 ul : tmp, 23 23 urlLookup : [""], … … 25 25 foundClass : ".friend-tab", 26 26 inputClass : ".send-to-input" 27 27 } 28 28 29 29 if(options) jQuery.extend(settings, options); 30 31 var acfb = 30 31 var acfb = 32 32 { 33 33 params : settings, 34 34 removeFind : function(o){ … … 42 42 jQuery('#send-to-usernames').removeClass(newID[1]); 43 43 } 44 44 } 45 45 46 46 jQuery(settings.foundClass+" img.p").click(function(){ 47 47 acfb.removeFind(this); 48 48 }); 49 49 50 50 jQuery(settings.inputClass,tmp).autocomplete(settings.urlLookup,settings.acOptions); 51 51 jQuery(settings.inputClass,tmp).result(function(e,d,f){ 52 52 var f = settings.foundClass.replace(/\./,''); … … 56 56 var l = jQuery(ln).attr('value'); 57 57 var v = '<li class="'+f+'" id="un-'+un+'"><span><a href="'+l+'">'+d[0]+'</a></span> <span class="p">X</span></li>'; 58 58 var x = jQuery(settings.inputClass,tmp).before(v); 59 59 60 60 jQuery('#send-to-usernames').addClass(un); 61 61 62 62 jQuery('.p',x[0].previousSibling).click(function(){ 63 63 acfb.removeFind(this); 64 64 }); 65 65 jQuery(settings.inputClass,tmp).val(''); 66 66 }); 67 67 68 68 jQuery(settings.inputClass,tmp).focus(); 69 69 return acfb; 70 70 } -
bp-messages/js/autocomplete/jquery.autocompletefb.js
6 6 * Credits: 7 7 * - Idea: Facebook 8 8 * - Guillermo Rauch: Original MooTools script 9 * - InteRiders <http://interiders.com/> 9 * - InteRiders <http://interiders.com/> 10 10 * 11 11 * Copyright (c) 2008 Widi Harsojo <wharsojo@gmail.com>, http://wharsojo.wordpress.com/ 12 12 * Dual licensed under the MIT and GPL licenses: -
bp-messages/js/autocomplete/jquery.bgiframe.min.js
1 1 /* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) 2 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 2 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 3 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 4 * 5 5 * $LastChangedDate: 2007-07-22 01:45:56 +0200 (Son, 22 Jul 2007) $ -
bp-messages/js/autocomplete/jquery.dimensions.dev.js
12 12 */ 13 13 14 14 (function($){ 15 15 16 16 $.dimensions = { 17 17 version: '@VERSION' 18 18 }; 19 19 20 20 // Create innerHeight, innerWidth, outerHeight and outerWidth methods 21 21 $.each( [ 'Height', 'Width' ], function(i, name){ 22 22 23 23 // innerHeight and innerWidth 24 24 $.fn[ 'inner' + name ] = function() { 25 25 if (!this[0]) return; 26 26 27 27 var torl = name == 'Height' ? 'Top' : 'Left', // top or left 28 28 borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right 29 29 30 30 return this[ name.toLowerCase() ]() + num(this, 'padding' + torl) + num(this, 'padding' + borr); 31 31 }; 32 32 33 33 // outerHeight and outerWidth 34 34 $.fn[ 'outer' + name ] = function(options) { 35 35 if (!this[0]) return; 36 36 37 37 var torl = name == 'Height' ? 'Top' : 'Left', // top or left 38 38 borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right 39 39 40 40 options = $.extend({ margin: false }, options || {}); 41 41 42 42 return this[ name.toLowerCase() ]() 43 43 + num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width') 44 44 + num(this, 'padding' + torl) + num(this, 'padding' + borr) … … 50 50 $.each( ['Left', 'Top'], function(i, name) { 51 51 $.fn[ 'scroll' + name ] = function(val) { 52 52 if (!this[0]) return; 53 53 54 54 return val != undefined ? 55 55 56 56 // Set the scroll offset 57 57 this.each(function() { 58 58 this == window || this == document ? 59 window.scrollTo( 59 window.scrollTo( 60 60 name == 'Left' ? val : $(window)[ 'scrollLeft' ](), 61 61 name == 'Top' ? val : $(window)[ 'scrollTop' ]() 62 62 ) : 63 63 this[ 'scroll' + name ] = val; 64 64 }) : 65 65 66 66 // Return the scroll offset 67 67 this[0] == window || this[0] == document ? 68 68 self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] || … … 75 75 $.fn.extend({ 76 76 position: function() { 77 77 var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results; 78 78 79 79 if (elem) { 80 80 // Get *real* offsetParent 81 81 offsetParent = this.offsetParent(); 82 82 83 83 // Get correct offsets 84 84 offset = this.offset(); 85 85 parentOffset = offsetParent.offset(); 86 86 87 87 // Subtract element margins 88 88 offset.top -= num(elem, 'marginTop'); 89 89 offset.left -= num(elem, 'marginLeft'); 90 90 91 91 // Add offsetParent borders 92 92 parentOffset.top += num(offsetParent, 'borderTopWidth'); 93 93 parentOffset.left += num(offsetParent, 'borderLeftWidth'); 94 94 95 95 // Subtract the two offsets 96 96 results = { 97 97 top: offset.top - parentOffset.top, 98 98 left: offset.left - parentOffset.left 99 99 }; 100 100 } 101 101 102 102 return results; 103 103 }, 104 104 105 105 offsetParent: function() { 106 106 var offsetParent = this[0].offsetParent; 107 107 while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') ) -
bp-forums/bp-forums-filters.php
8 8 add_filter( 'bp_get_the_topic_latest_post_excerpt', 'bp_forums_filter_kses', 1 ); 9 9 add_filter( 'bp_get_the_topic_post_content', 'bp_forums_filter_kses', 1 ); 10 10 11 add_filter( 'bp_get_the_topic_title', 'force_balance_tags' ); 11 add_filter( 'bp_get_the_topic_title', 'force_balance_tags' ); 12 12 add_filter( 'bp_get_the_topic_latest_post_excerpt', 'force_balance_tags' ); 13 13 add_filter( 'bp_get_the_topic_post_content', 'force_balance_tags' ); 14 14 … … 120 120 */ 121 121 function bp_forums_strip_mentions_on_post_edit( $content ) { 122 122 global $bp; 123 123 124 124 $content = htmlspecialchars_decode( $content ); 125 125 126 126 $pattern = "|<a href='" . $bp->root_domain . "/" . $bp->members->slug . "/[A-Za-z0-9-_\.]+/' rel='nofollow'>(@[A-Za-z0-9-_\.]+)</a>|"; 127 127 128 128 $content = preg_replace( $pattern, "$1", $content ); 129 129 130 130 return $content; 131 131 } 132 132 add_filter( 'bp_get_the_topic_post_edit_text', 'bp_forums_strip_mentions_on_post_edit' ); -
bp-core.php
482 482 $wpdb->update( $wpdb->users, array( 'spam' => $is_spam ), array( 'ID' => $bp->displayed_user->id ) ); 483 483 484 484 $wpdb->update( $wpdb->users, array( 'user_status' => $is_spam ), array( 'ID' => $bp->displayed_user->id ) ); 485 485 486 486 if ( $is_spam ) 487 487 bp_core_add_message( __( 'User marked as spammer. Spam users are visible only to site admins.', 'buddypress' ) ); 488 488 else … … 491 491 /* Hide this user's activity */ 492 492 if ( $is_spam && function_exists( 'bp_activity_hide_user_activity' ) ) 493 493 bp_activity_hide_user_activity( $bp->displayed_user->id ); 494 494 495 495 // We need a special hook for is_spam so that components can delete data at spam time 496 496 if ( $is_spam ) 497 497 do_action( 'bp_make_spam_user', $bp->displayed_user->id ); … … 2000 2000 * Functions to set up custom BuddyPress actions that all other components can 2001 2001 * hook in to. 2002 2002 */ 2003 2003 2004 2004 /** 2005 2005 * bp_include() 2006 2006 * -
bp-xprofile.php
633 633 if ( is_array( $values ) ) { 634 634 $data = array(); 635 635 foreach( (array)$values as $value ) { 636 $data[] = apply_filters( 'xprofile_get_field_data', $value ); 636 $data[] = apply_filters( 'xprofile_get_field_data', $value ); 637 637 } 638 638 } else { 639 639 $data = apply_filters( 'xprofile_get_field_data', $values ); 640 640 } 641 641 642 642 return $data; 643 643 } 644 644 … … 927 927 928 928 if ( !$object_id ) 929 929 return false; 930 930 931 931 if ( !isset( $object_type ) ) 932 932 return false; 933 933 934 934 if ( !in_array( $object_type, array( 'group', 'field', 'data' ) ) ) 935 935 return false; 936 936 … … 961 961 962 962 if ( !$object_id ) 963 963 return false; 964 964 965 965 if ( !isset( $object_type ) ) 966 966 return false; 967 967 968 968 if ( !in_array( $object_type, array( 'group', 'field', 'data' ) ) ) 969 969 return false; 970 970 … … 1002 1002 1003 1003 if ( !$object_id ) 1004 1004 return false; 1005 1005 1006 1006 if ( !isset( $object_type ) ) 1007 1007 return false; 1008 1008 1009 1009 if ( !in_array( $object_type, array( 'group', 'field', 'data' ) ) ) 1010 1010 return false; 1011 1011 1012 1012 $meta_key = preg_replace( '|[^a-z0-9_]|i', '', $meta_key ); 1013 1013 1014 1014 if ( is_string( $meta_value ) ) … … 1018 1018 1019 1019 if ( empty( $meta_value ) ) 1020 1020 return bp_xprofile_delete_meta( $object_id, $object_type, $meta_key ); 1021 1021 1022 1022 $cur = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $bp->profile->table_name_meta . " WHERE object_id = %d AND object_type = %s AND meta_key = %s", $object_id, $object_type, $meta_key ) ); 1023 1023 1024 1024 if ( !$cur ) … … 1035 1035 } 1036 1036 1037 1037 function bp_xprofile_update_fieldgroup_meta( $field_group_id, $meta_key, $meta_value ) { 1038 return bp_xprofile_update_meta( $field_group_id, 'group', $meta_key, $meta_value ); 1038 return bp_xprofile_update_meta( $field_group_id, 'group', $meta_key, $meta_value ); 1039 1039 } 1040 1040 1041 1041 function bp_xprofile_update_field_meta( $field_id, $meta_key, $meta_value ) { 1042 return bp_xprofile_update_meta( $field_id, 'field', $meta_key, $meta_value ); 1042 return bp_xprofile_update_meta( $field_id, 'field', $meta_key, $meta_value ); 1043 1043 } 1044 1044 1045 1045 function bp_xprofile_update_fielddata_meta( $field_data_id, $meta_key, $meta_value ) { 1046 return bp_xprofile_update_meta( $field_data_id, 'data', $meta_key, $meta_value ); 1046 return bp_xprofile_update_meta( $field_data_id, 'data', $meta_key, $meta_value ); 1047 1047 } 1048 1048 1049 1049 /******************************************************************************** -
bp-groups/bp-groups-classes.php
288 288 $include = $wpdb->escape( $include ); 289 289 $sql['include'] = " AND g.id IN ({$include})"; 290 290 } 291 291 292 292 if ( !empty( $exclude ) ) { 293 293 $exclude = $wpdb->escape( $exclude ); 294 294 $sql['exclude'] = " AND g.id NOT IN ({$exclude})"; … … 357 357 358 358 return array( 'groups' => $paged_groups, 'total' => $total_groups ); 359 359 } 360 360 361 361 function get_by_most_forum_topics( $limit = null, $page = null, $user_id = false, $search_terms = false, $populate_extras = true, $exclude = false ) { 362 362 global $wpdb, $bp, $bbdb; 363 363 … … 375 375 $search_terms = like_escape( $wpdb->escape( $search_terms ) ); 376 376 $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )"; 377 377 } 378 378 379 379 if ( !empty( $exclude ) ) { 380 380 $exclude = $wpdb->escape( $exclude ); 381 381 $exclude_sql = " AND g.id NOT IN ({$exclude})"; … … 416 416 $search_terms = like_escape( $wpdb->escape( $search_terms ) ); 417 417 $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )"; 418 418 } 419 419 420 420 if ( !empty( $exclude ) ) { 421 421 $exclude = $wpdb->escape( $exclude ); 422 422 $exclude_sql = " AND g.id NOT IN ({$exclude})"; … … 493 493 $search_terms = like_escape( $wpdb->escape( $search_terms ) ); 494 494 $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )"; 495 495 } 496 496 497 497 if ( !empty( $exclude ) ) { 498 498 $exclude = $wpdb->escape( $exclude ); 499 499 $exclude_sql = " AND g.id NOT IN ({$exclude})"; … … 866 866 global $wpdb, $bp; 867 867 868 868 $pag_sql = ( !empty( $limit ) && !empty( $page ) ) ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ) : ''; 869 869 870 870 $exclude_sql = !empty( $exclude ) ? $wpdb->prepare( " AND g.id NOT IN (%s)", $exclude ) : ''; 871 871 872 872 $paged_groups = $wpdb->get_results( $wpdb->prepare( "SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = %d {$exclude_sql} ORDER BY m.date_modified ASC {$pag_sql}", $user_id ) ); -
bp-groups/bp-groups-widgets.php
23 23 24 24 function widget( $args, $instance ) { 25 25 global $bp; 26 26 27 27 $user_id = apply_filters( 'bp_group_widget_user_id', '0' ); 28 28 29 29 extract( $args ); … … 99 99 'title' => __( 'Groups', 'buddypress' ), 100 100 'max_members' => 5, 101 101 'group_default' => 'active' 102 ); 102 ); 103 103 $instance = wp_parse_args( (array) $instance, $defaults ); 104 104 105 105 $title = strip_tags( $instance['title'] ); 106 106 $max_groups = strip_tags( $instance['max_groups'] ); 107 107 $group_default = strip_tags( $instance['group_default'] ); 108 108 ?> 109 109 110 110 <p><label for="bp-groups-widget-title"><?php _e('Title:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" style="width: 100%" /></label></p> 111 111 112 112 <p><label for="bp-groups-widget-groups-max"><?php _e('Max groups to show:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_groups' ); ?>" name="<?php echo $this->get_field_name( 'max_groups' ); ?>" type="text" value="<?php echo esc_attr( $max_groups ); ?>" style="width: 30%" /></label></p> 113 113 114 114 <p> 115 <label for="bp-groups-widget-groups-default"><?php _e('Default groups to show:', 'buddypress'); ?> 115 <label for="bp-groups-widget-groups-default"><?php _e('Default groups to show:', 'buddypress'); ?> 116 116 <select name="<?php echo $this->get_field_name( 'group_default' ); ?>"> 117 117 <option value="newest" <?php if ( $group_default == 'newest' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Newest', 'buddypress' ) ?></option> 118 118 <option value="active" <?php if ( $group_default == 'active' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Active', 'buddypress' ) ?></option> 119 119 <option value="popular" <?php if ( $group_default == 'popular' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Popular', 'buddypress' ) ?></option> 120 </select> 120 </select> 121 121 </label> 122 122 </p> 123 123 <?php -
bp-groups/bp-groups-notifications.php
38 38 39 39 unset( $message, $to ); 40 40 } 41 41 42 42 do_action( 'bp_groups_sent_updated_email', $user_ids, $subject, $message, $group_id ); 43 43 } 44 44 … … 86 86 $message = apply_filters( 'groups_notification_new_membership_request_message', $message, &$group, $requesting_user_name, $profile_link, $group_requests ); 87 87 88 88 wp_mail( $to, $subject, $message ); 89 89 90 90 do_action( 'bp_groups_sent_membership_request_email', $admin_id, $subject, $message, $requesting_user_id, $group_id, $membership_id ); 91 91 } 92 92 … … 142 142 $message = apply_filters( 'groups_notification_membership_request_completed_message', $message, &$group, $group_link ); 143 143 144 144 wp_mail( $to, $subject, $message ); 145 145 146 146 do_action( 'bp_groups_sent_membership_approved_email', $requesting_user_id, $subject, $message, $group_id ); 147 147 } 148 148 … … 190 190 $message = apply_filters( 'groups_notification_promoted_member_message', $message, &$group, $promoted_to, $group_link ); 191 191 192 192 wp_mail( $to, $subject, $message ); 193 193 194 194 do_action( 'bp_groups_sent_promoted_email', $user_id, $subject, $message, $group_id ); 195 195 } 196 196 add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 ); … … 245 245 246 246 wp_mail( $to, $subject, $message ); 247 247 } 248 248 249 249 do_action( 'bp_groups_sent_invited_email', $invited_user_id, $subject, $message, $group ); 250 250 } 251 251 … … 306 306 wp_mail( $to, $subject, $message ); 307 307 } 308 308 } 309 309 310 310 do_action( 'bp_groups_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $group_id, $activity_id ); 311 311 } 312 312 add_action( 'bp_groups_posted_update', 'groups_at_message_notification', 10, 4 ); -
bp-groups/bp-groups-templatetags.php
1715 1715 } 1716 1716 function bp_get_new_group_id() { 1717 1717 global $bp; 1718 1718 1719 1719 if ( isset( $bp->groups->new_group_id ) ) 1720 1720 $new_group_id = $bp->groups->new_group_id; 1721 1721 else 1722 1722 $new_group_id = 0; 1723 1723 1724 1724 return apply_filters( 'bp_get_new_group_id', $new_group_id ); 1725 1725 } 1726 1726 … … 1729 1729 } 1730 1730 function bp_get_new_group_name() { 1731 1731 global $bp; 1732 1732 1733 1733 if ( isset( $bp->groups->current_group->name ) ) 1734 1734 $name = $bp->groups->current_group->name; 1735 1735 else 1736 1736 $name = ''; 1737 1737 1738 1738 return apply_filters( 'bp_get_new_group_name', $name ); 1739 1739 } 1740 1740 … … 1743 1743 } 1744 1744 function bp_get_new_group_description() { 1745 1745 global $bp; 1746 1746 1747 1747 if ( isset( $bp->groups->current_group->description ) ) 1748 1748 $description = $bp->groups->current_group->description; 1749 1749 else 1750 1750 $description = ''; 1751 1751 1752 1752 return apply_filters( 'bp_get_new_group_description', $description ); 1753 1753 } 1754 1754 … … 1855 1855 1856 1856 for ( $i = 0; $i < count( $friends ); $i++ ) { 1857 1857 $checked = ''; 1858 1858 1859 1859 if ( !empty( $invites ) ) { 1860 1860 if ( in_array( $friends[$i]['id'], $invites ) ) 1861 1861 $checked = ' checked="checked"'; … … 2245 2245 2246 2246 if ( !$group_id ) { 2247 2247 /* Backwards compatibility */ 2248 if ( !empty( $bp->groups->current_group ) ) 2248 if ( !empty( $bp->groups->current_group ) ) 2249 2249 $group_id = $bp->groups->current_group->id; 2250 2250 if ( !empty( $bp->groups->new_group_id ) ) 2251 2251 $group_id = $bp->groups->new_group_id;