BuddyPress - Version 2.3.0-rc1

Version Description

= 2.2.3.1 = See: https://codex.buddypress.org/releases/version-2-2-3-1/

= 2.2.3 = See: https://codex.buddypress.org/releases/version-2-2-3/

= 2.2.2.1 = See: https://codex.buddypress.org/releases/version-2-2-2-1/

= 2.2.2 = See: https://codex.buddypress.org/releases/version-2-2-2/

= 2.2.1 = See: https://codex.buddypress.org/releases/version-2-2-1/

= 2.2 = See: https://codex.buddypress.org/releases/version-2-2/

= 2.1 = See: https://codex.buddypress.org/releases/version-2-1/

= 2.0.3 = See: https://codex.buddypress.org/releases/version-2-0-3/

= 2.0.2 = See: https://codex.buddypress.org/releases/version-2-0-2/

= 2.0.1 = See: https://codex.buddypress.org/releases/version-2-0-1/

= 2.0 = See: https://codex.buddypress.org/releases/version-2-0/

= 1.9.2 = See: https://codex.buddypress.org/releases/version-1-9-2/

= 1.9.1 = See: https://codex.buddypress.org/releases/version-1-9-1/

= 1.9 = See: https://codex.buddypress.org/releases/version-1-9/

= 1.8.1 = See: https://codex.buddypress.org/releases/version-1-8-1/

= 1.8 = See: https://codex.buddypress.org/releases/version-1-8/

= 1.7.3 = See: https://codex.buddypress.org/releases/version-1-7-3/

= 1.7.2 = See: https://codex.buddypress.org/releases/version-1-7-2/

= 1.7.1 = See: https://codex.buddypress.org/releases/version-1-7-1/

= 1.7 = See: https://codex.buddypress.org/releases/version-1-7/

= 1.6.5 = See: https://codex.buddypress.org/releases/version-1-6-5/

= 1.6.4 = See: https://codex.buddypress.org/releases/version-1-6-4/

= 1.6.3 = See: https://codex.buddypress.org/releases/version-1-6-3/

= 1.6.2 = Compatibility with WordPress 3.5

= 1.6.1 = Fixes 4 bugs

= 1.6 = See: https://codex.buddypress.org/releases/version-1-6/

= 1.5 = See: https://codex.buddypress.org/releases/version-1-5/

= 1.2.9 = Compatibility with WordPress 3.2

= 1.2.8 = Compatibility with WordPress 3.1

= 1.2.7 = Fixes over 10 bugs.

Download this release

Release Info

Developer johnjamesjacoby
Plugin Icon 128x128 BuddyPress
Version 2.3.0-rc1
Comparing to
See all releases

Code changes from version 2.3.0-beta-2 to 2.3.0-rc1

Files changed (64) hide show
  1. bp-activity/admin/js/admin.min.js +1 -1
  2. bp-activity/js/mentions.min.js +1 -1
  3. bp-blogs/bp-blogs-template.php +14 -10
  4. bp-core/admin/bp-core-admin-functions.php +1 -1
  5. bp-core/admin/images/avatar-ui.gif +0 -0
  6. bp-core/admin/images/member-types.png +0 -0
  7. bp-core/bp-core-admin.php +43 -46
  8. bp-core/classes/class-bp-attachment.php +9 -4
  9. bp-core/deprecated/js/autocomplete/jquery.autocomplete.min.js +1 -1
  10. bp-core/deprecated/js/autocomplete/jquery.autocompletefb.min.js +1 -1
  11. bp-core/deprecated/js/autocomplete/jquery.bgiframe.min.js +1 -1
  12. bp-core/deprecated/js/autocomplete/jquery.dimensions.min.js +1 -1
  13. bp-core/js/avatar.min.js +1 -1
  14. bp-core/js/bp-plupload.min.js +1 -1
  15. bp-core/js/confirm.min.js +1 -1
  16. bp-core/js/jquery-cookie.min.js +1 -1
  17. bp-core/js/jquery-query.min.js +1 -1
  18. bp-core/js/jquery-scroll-to.min.js +1 -1
  19. bp-core/js/jquery.atwho.min.js +1 -1
  20. bp-core/js/jquery.caret.min.js +1 -1
  21. bp-core/js/webcam.min.js +1 -1
  22. bp-core/js/widget-members.min.js +1 -1
  23. bp-friends/js/widget-friends.min.js +1 -1
  24. bp-groups/admin/js/admin.min.js +1 -1
  25. bp-groups/bp-groups-template.php +28 -16
  26. bp-groups/js/widget-groups.min.js +1 -1
  27. bp-loader.php +2 -2
  28. bp-members/admin/bp-members-admin-classes.php +35 -11
  29. bp-members/admin/js/admin.min.js +1 -1
  30. bp-members/bp-members-actions.php +1 -2
  31. bp-members/bp-members-activity.php +6 -3
  32. bp-members/bp-members-admin.php +44 -24
  33. bp-members/bp-members-adminbar.php +1 -1
  34. bp-members/bp-members-classes.php +1 -1
  35. bp-members/bp-members-filters.php +9 -6
  36. bp-members/bp-members-functions.php +117 -72
  37. bp-members/bp-members-loader.php +6 -5
  38. bp-members/bp-members-screens.php +6 -4
  39. bp-members/bp-members-template.php +99 -73
  40. bp-members/bp-members-widgets.php +33 -15
  41. bp-members/classes/class-bp-signup.php +18 -9
  42. bp-messages/bp-messages-star.php +2 -2
  43. bp-notifications/bp-notifications-cache.php +38 -3
  44. bp-notifications/classes/class-bp-notifications-notification.php +15 -5
  45. bp-templates/bp-legacy/buddypress-functions.php +29 -11
  46. bp-templates/bp-legacy/buddypress/blogs/index.php +39 -13
  47. bp-templates/bp-legacy/buddypress/groups/index.php +1 -1
  48. bp-templates/bp-legacy/buddypress/members/index.php +1 -1
  49. bp-templates/bp-legacy/buddypress/members/members-loop.php +1 -1
  50. bp-templates/bp-legacy/css/twentyfifteen-rtl.css +200 -145
  51. bp-templates/bp-legacy/css/twentyfifteen-rtl.min.css +1 -1
  52. bp-templates/bp-legacy/css/twentyfifteen.css +200 -145
  53. bp-templates/bp-legacy/css/twentyfifteen.min.css +1 -1
  54. bp-templates/bp-legacy/css/twentyfifteen.scss +175 -65
  55. bp-templates/bp-legacy/css/twentyfourteen-rtl.css +202 -95
  56. bp-templates/bp-legacy/css/twentyfourteen-rtl.min.css +1 -1
  57. bp-templates/bp-legacy/css/twentyfourteen.css +202 -95
  58. bp-templates/bp-legacy/css/twentyfourteen.min.css +1 -1
  59. bp-templates/bp-legacy/css/twentyfourteen.scss +236 -66
  60. bp-templates/bp-legacy/js/buddypress.min.js +1 -1
  61. bp-templates/bp-legacy/js/password-verify.min.js +1 -1
  62. bp-xprofile/admin/js/admin.min.js +1 -1
  63. bp-xprofile/classes/class-bp-xprofile-field.php +50 -8
  64. buddypress.pot +553 -510
bp-activity/admin/js/admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){var b={init:function(){a(document).on("click",".row-actions a.reply",b.open),a(document).on("click","#bp-activities-container a.cancel",b.close),a(document).on("click","#bp-activities-container a.save",b.send),a(document).on("keyup","#bp-activities:visible",function(a){27===a.which&&b.close()})},open:function(){var b=a("#bp-activities-container").hide();return a(this).parents("tr").after(b),b.fadeIn("300"),a("#bp-activities").focus(),!1},close:function(){return a("#bp-activities-container").fadeOut("200",function(){a("#bp-activities").val("").blur(),a("#bp-replysubmit .error").html("").hide(),a("#bp-replysubmit .waiting").hide()}),!1},send:function(){a("#bp-replysubmit .error").hide(),a("#bp-replysubmit .waiting").show();var c={};return c["_ajax_nonce-bp-activity-admin-reply"]=a('#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]').val(),c.action="bp-activity-admin-reply",c.content=a("#bp-activities").val(),c.parent_id=a("#bp-activities-container").prev().data("parent_id"),c.root_id=a("#bp-activities-container").prev().data("root_id"),a.ajax({data:c,type:"POST",url:ajaxurl,error:function(a){b.error(a)},success:function(a){b.show(a)}}),!1},error:function(b){var c=b.statusText;a("#bp-replysubmit .waiting").hide(),b.responseText&&(c=b.responseText.replace(/<.[^<>]*?>/g,"")),c&&a("#bp-replysubmit .error").html(c).show()},show:function(c){var d,e,f;return"string"==typeof c?(b.error({responseText:c}),!1):(f=wpAjax.parseAjaxResponse(c),f.errors?(b.error({responseText:wpAjax.broken}),!1):(f=f.responses[0],void a("#bp-activities-container").fadeOut("200",function(){a("#bp-activities").val("").blur(),a("#bp-replysubmit .error").html("").hide(),a("#bp-replysubmit .waiting").hide(),a("#bp-activities-container").before(f.data),e=a("#activity-"+f.id),d=e.closest(".widefat").css("backgroundColor"),e.animate({backgroundColor:"#CEB"},300).animate({backgroundColor:d},300)})))}};a(document).ready(function(){b.init(),a("#bp_activity_action h3, #bp_activity_content h3").unbind("click"),"undefined"!=typeof postboxes&&postboxes.add_postbox_toggles(bp_activity_admin_vars.page)})}(jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){var b={init:function(){a(document).on("click",".row-actions a.reply",b.open),a(document).on("click","#bp-activities-container a.cancel",b.close),a(document).on("click","#bp-activities-container a.save",b.send),a(document).on("keyup","#bp-activities:visible",function(a){27===a.which&&b.close()})},open:function(){var b=a("#bp-activities-container").hide();return a(this).parents("tr").after(b),b.fadeIn("300"),a("#bp-activities").focus(),!1},close:function(){return a("#bp-activities-container").fadeOut("200",function(){a("#bp-activities").val("").blur(),a("#bp-replysubmit .error").html("").hide(),a("#bp-replysubmit .waiting").hide()}),!1},send:function(){a("#bp-replysubmit .error").hide(),a("#bp-replysubmit .waiting").show();var c={};return c["_ajax_nonce-bp-activity-admin-reply"]=a('#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]').val(),c.action="bp-activity-admin-reply",c.content=a("#bp-activities").val(),c.parent_id=a("#bp-activities-container").prev().data("parent_id"),c.root_id=a("#bp-activities-container").prev().data("root_id"),a.ajax({data:c,type:"POST",url:ajaxurl,error:function(a){b.error(a)},success:function(a){b.show(a)}}),!1},error:function(b){var c=b.statusText;a("#bp-replysubmit .waiting").hide(),b.responseText&&(c=b.responseText.replace(/<.[^<>]*?>/g,"")),c&&a("#bp-replysubmit .error").html(c).show()},show:function(c){var d,e,f;return"string"==typeof c?(b.error({responseText:c}),!1):(f=wpAjax.parseAjaxResponse(c),f.errors?(b.error({responseText:wpAjax.broken}),!1):(f=f.responses[0],void a("#bp-activities-container").fadeOut("200",function(){a("#bp-activities").val("").blur(),a("#bp-replysubmit .error").html("").hide(),a("#bp-replysubmit .waiting").hide(),a("#bp-activities-container").before(f.data),e=a("#activity-"+f.id),d=e.closest(".widefat").css("backgroundColor"),e.animate({backgroundColor:"#CEB"},300).animate({backgroundColor:d},300)})))}};a(document).ready(function(){b.init(),a("#bp_activity_action h3, #bp_activity_content h3").unbind("click"),"undefined"!=typeof postboxes&&postboxes.add_postbox_toggles(bp_activity_admin_vars.page)})}(jQuery);
bp-activity/js/mentions.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){var b,c=[];a.fn.bp_mentions=function(d){a.isArray(d)&&(d={data:d});var e={delay:200,hide_without_suffix:!0,insert_tpl:"</>${atwho-data-value}</>",limit:10,start_with_space:!1,suffix:"",callbacks:{filter:function(a,b,c){var d,e,f,g=[],h=new RegExp("^"+a+"| "+a,"ig");for(e=0,f=b.length;f>e;e++)d=b[e],d[c].toLowerCase().match(h)&&g.push(d);return g},highlighter:function(a,b){if(!b)return a;var c=new RegExp(">(\\s*|[\\w\\s]*)("+this.at.replace("+","\\+")+"?"+b.replace("+","\\+")+")([\\w ]*)\\s*<","ig");return a.replace(c,function(a,b,c,d){return">"+b+"<strong>"+c+"</strong>"+d+"<"})},before_reposition:function(b){var c,d,e,f,g=a("#atwho-ground-"+this.id+" .atwho-view"),h=a("body"),i=this.$inputor.data("atwho");"undefined"!==i&&"undefined"!==i.iframe&&null!==i.iframe?(c=this.$inputor.caret("offset",{iframe:i.iframe}),e=a(i.iframe).offset(),"undefined"!==e&&(c.left+=e.left,c.top+=e.top)):c=this.$inputor.caret("offset"),c.left>h.width()/2?(g.addClass("right"),f=c.left-b.left-this.view.$el.width()):(g.removeClass("right"),f=c.left-b.left+1),h.width()<=400&&a(document).scrollTop(c.top-6),d=parseInt(this.$inputor.css("line-height").substr(0,this.$inputor.css("line-height").length-2),10),(!d||5>d)&&(d=19),b.top=c.top+d,b.left+=f},inserting_wrapper:function(a,b,c){return""+b+c}}},f={callbacks:{remote_filter:function(d,e){var f=a(this),g={};return b=c[d],"object"==typeof b?void e(b):(f.xhr&&f.xhr.abort(),g={action:"bp_get_suggestions",term:d,type:"members"},a.isNumeric(this.$inputor.data("suggestions-group-id"))&&(g["group-id"]=parseInt(this.$inputor.data("suggestions-group-id"),10)),void(f.xhr=a.getJSON(ajaxurl,g).done(function(b){if(b.success){var f=a.map(b.data,function(a){return a.search=a.search||a.ID+" "+a.name,a});c[d]=f,e(f)}})))}},data:a.map(d.data,function(a){return a.search=a.search||a.ID+" "+a.name,a}),at:"@",search_key:"search",tpl:'<li data-value="@${ID}"><img src="${image}" /><span class="username">@${ID}</span><small>${name}</small></li>'},g=a.extend(!0,{},e,f,d);return a.fn.atwho.call(this,g)},a(document).ready(function(){var b,c=0,d=[];"object"==typeof window.BP_Suggestions&&(d=window.BP_Suggestions.friends||d),b=function(){return(4>c||!a("body").hasClass("wp-admin"))&&(c++,"undefined"==typeof window.tinyMCE||null===window.tinyMCE.activeEditor||"undefined"==typeof window.tinyMCE.activeEditor)?void setTimeout(b,500):void a(window.tinyMCE.activeEditor.contentDocument.activeElement).atwho("setIframe",a("#content_ifr")[0]).bp_mentions(d)},a(".bp-suggestions, #comments form textarea, .wp-editor-area").bp_mentions(d),b()})}(jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){var b,c=[];a.fn.bp_mentions=function(d){a.isArray(d)&&(d={data:d});var e={delay:200,hide_without_suffix:!0,insert_tpl:"</>${atwho-data-value}</>",limit:10,start_with_space:!1,suffix:"",callbacks:{filter:function(a,b,c){var d,e,f,g=[],h=new RegExp("^"+a+"| "+a,"ig");for(e=0,f=b.length;f>e;e++)d=b[e],d[c].toLowerCase().match(h)&&g.push(d);return g},highlighter:function(a,b){if(!b)return a;var c=new RegExp(">(\\s*|[\\w\\s]*)("+this.at.replace("+","\\+")+"?"+b.replace("+","\\+")+")([\\w ]*)\\s*<","ig");return a.replace(c,function(a,b,c,d){return">"+b+"<strong>"+c+"</strong>"+d+"<"})},before_reposition:function(b){var c,d,e,f,g=a("#atwho-ground-"+this.id+" .atwho-view"),h=a("body"),i=this.$inputor.data("atwho");"undefined"!==i&&"undefined"!==i.iframe&&null!==i.iframe?(c=this.$inputor.caret("offset",{iframe:i.iframe}),e=a(i.iframe).offset(),"undefined"!==e&&(c.left+=e.left,c.top+=e.top)):c=this.$inputor.caret("offset"),c.left>h.width()/2?(g.addClass("right"),f=c.left-b.left-this.view.$el.width()):(g.removeClass("right"),f=c.left-b.left+1),h.width()<=400&&a(document).scrollTop(c.top-6),d=parseInt(this.$inputor.css("line-height").substr(0,this.$inputor.css("line-height").length-2),10),(!d||5>d)&&(d=19),b.top=c.top+d,b.left+=f},inserting_wrapper:function(a,b,c){return""+b+c}}},f={callbacks:{remote_filter:function(d,e){var f=a(this),g={};return b=c[d],"object"==typeof b?void e(b):(f.xhr&&f.xhr.abort(),g={action:"bp_get_suggestions",term:d,type:"members"},a.isNumeric(this.$inputor.data("suggestions-group-id"))&&(g["group-id"]=parseInt(this.$inputor.data("suggestions-group-id"),10)),void(f.xhr=a.getJSON(ajaxurl,g).done(function(b){if(b.success){var f=a.map(b.data,function(a){return a.search=a.search||a.ID+" "+a.name,a});c[d]=f,e(f)}})))}},data:a.map(d.data,function(a){return a.search=a.search||a.ID+" "+a.name,a}),at:"@",search_key:"search",tpl:'<li data-value="@${ID}"><img src="${image}" /><span class="username">@${ID}</span><small>${name}</small></li>'},g=a.extend(!0,{},e,f,d);return a.fn.atwho.call(this,g)},a(document).ready(function(){var b,c=0,d=[];"object"==typeof window.BP_Suggestions&&(d=window.BP_Suggestions.friends||d),b=function(){return(4>c||!a("body").hasClass("wp-admin"))&&(c++,"undefined"==typeof window.tinyMCE||null===window.tinyMCE.activeEditor||"undefined"==typeof window.tinyMCE.activeEditor)?void setTimeout(b,500):void a(window.tinyMCE.activeEditor.contentDocument.activeElement).atwho("setIframe",a("#content_ifr")[0]).bp_mentions(d)},a(".bp-suggestions, #comments form textarea, .wp-editor-area").bp_mentions(d),b()})}(jQuery);
bp-blogs/bp-blogs-template.php CHANGED
@@ -712,9 +712,11 @@ function bp_blog_description() {
712
* Output the row class of the current blog in the loop.
713
*
714
* @since BuddyPress (1.7.0)
715
*/
716
- function bp_blog_class() {
717
- echo bp_get_blog_class();
718
}
719
/**
720
* Return the row class of the current blog in the loop.
@@ -722,20 +724,22 @@ function bp_blog_class() {
722
* @since BuddyPress (1.7.0)
723
*
724
* @global BP_Blogs_Template $blogs_template
725
*
726
* @return string Row class of the site.
727
*/
728
- function bp_get_blog_class() {
729
global $blogs_template;
730
731
- $classes = array();
732
- $pos_in_loop = (int) $blogs_template->current_blog;
733
734
- // If we've only one site in the loop, don't bother with odd and even.
735
- if ( $blogs_template->blog_count > 1 )
736
- $classes[] = ( $pos_in_loop % 2 ) ? 'even' : 'odd';
737
- else
738
$classes[] = 'bp-single-blog';
739
740
/**
741
* Filters the row class of the current blog in the loop.
@@ -746,8 +750,8 @@ function bp_blog_class() {
746
*/
747
$classes = apply_filters( 'bp_get_blog_class', $classes );
748
$classes = array_merge( $classes, array() );
749
750
- $retval = 'class="' . join( ' ', $classes ) . '"';
751
return $retval;
752
}
753
712
* Output the row class of the current blog in the loop.
713
*
714
* @since BuddyPress (1.7.0)
715
+ *
716
+ * @param array $classes Array of custom classes
717
*/
718
+ function bp_blog_class( $classes = array() ) {
719
+ echo bp_get_blog_class( $classes );
720
}
721
/**
722
* Return the row class of the current blog in the loop.
724
* @since BuddyPress (1.7.0)
725
*
726
* @global BP_Blogs_Template $blogs_template
727
+ * @param array $classes Array of custom classes
728
*
729
* @return string Row class of the site.
730
*/
731
+ function bp_get_blog_class( $classes = array() ) {
732
global $blogs_template;
733
734
+ // Add even/odd classes, but only if there's more than 1 group
735
+ if ( $blogs_template->blog_count > 1 ) {
736
+ $pos_in_loop = (int) $blogs_template->current_blog;
737
+ $classes[] = ( $pos_in_loop % 2 ) ? 'even' : 'odd';
738
739
+ // If we've only one site in the loop, don't bother with odd and even
740
+ } else {
741
$classes[] = 'bp-single-blog';
742
+ }
743
744
/**
745
* Filters the row class of the current blog in the loop.
750
*/
751
$classes = apply_filters( 'bp_get_blog_class', $classes );
752
$classes = array_merge( $classes, array() );
753
+ $retval = 'class="' . join( ' ', $classes ) . '"';
754
755
return $retval;
756
}
757
bp-core/admin/bp-core-admin-functions.php CHANGED
@@ -562,7 +562,7 @@ function bp_core_add_contextual_help_content( $tab = '' ) {
562
break;
563
564
case 'bp-profile-overview' :
565
- $retval = __( 'Your users will distinguish themselves through their profile page. Create relevant profile fields that will show on each users profile.</br></br>Note: Any fields in the first group will appear on the signup page.', 'buddypress' );
566
break;
567
568
default:
562
break;
563
564
case 'bp-profile-overview' :
565
+ $retval = __( 'Your users will distinguish themselves through their profile page. Create relevant profile fields that will show on each users profile.<br /><br />Note: Any fields in the first group will appear on the signup page.', 'buddypress' );
566
break;
567
568
default:
bp-core/admin/images/avatar-ui.gif ADDED
Binary file
bp-core/admin/images/member-types.png DELETED
Binary file
bp-core/bp-core-admin.php CHANGED
@@ -16,6 +16,7 @@ if ( !class_exists( 'BP_Admin' ) ) :
16
*
17
* @package BuddyPress
18
* @subpackage CoreAdministration
19
*
20
* @since BuddyPress (1.6.0)
21
*/
@@ -158,7 +159,7 @@ class BP_Admin {
158
add_action( 'admin_bar_menu', array( $this, 'admin_bar_about_link' ), 15 );
159
160
// Add a description of new BuddyPress tools in the available tools page
161
- add_action( 'tool_box', 'bp_core_admin_available_tools_intro' );
162
add_action( 'bp_network_tool_box', 'bp_core_admin_available_tools_intro' );
163
164
// On non-multisite, catch
@@ -314,11 +315,11 @@ class BP_Admin {
314
/** Main Section ******************************************************/
315
316
// Add the main section
317
- add_settings_section( 'bp_main', __( 'Main Settings', 'buddypress' ), 'bp_admin_setting_callback_main_section', 'buddypress' );
318
319
// Hide toolbar for logged out users setting
320
- add_settings_field( 'hide-loggedout-adminbar', __( 'Toolbar', 'buddypress' ), 'bp_admin_setting_callback_admin_bar', 'buddypress', 'bp_main' );
321
- register_setting ( 'buddypress', 'hide-loggedout-adminbar', 'intval' );
322
323
// Only show 'switch to Toolbar' option if the user chose to retain the BuddyBar during the 1.6 upgrade
324
if ( (bool) bp_get_option( '_bp_force_buddybar', false ) ) {
@@ -328,7 +329,7 @@ class BP_Admin {
328
329
// Allow account deletion
330
add_settings_field( 'bp-disable-account-deletion', __( 'Account Deletion', 'buddypress' ), 'bp_admin_setting_callback_account_deletion', 'buddypress', 'bp_main' );
331
- register_setting ( 'buddypress', 'bp-disable-account-deletion', 'intval' );
332
333
/** XProfile Section **************************************************/
334
@@ -341,8 +342,8 @@ class BP_Admin {
341
register_setting( 'buddypress', 'bp-disable-avatar-uploads', 'intval' );
342
343
// Profile sync setting
344
- add_settings_field( 'bp-disable-profile-sync', __( 'Profile Syncing', 'buddypress' ), 'bp_admin_setting_callback_profile_sync', 'buddypress', 'bp_xprofile' );
345
- register_setting ( 'buddypress', 'bp-disable-profile-sync', 'intval' );
346
}
347
348
/** Groups Section ****************************************************/
@@ -350,11 +351,11 @@ class BP_Admin {
350
if ( bp_is_active( 'groups' ) ) {
351
352
// Add the main section
353
- add_settings_section( 'bp_groups', __( 'Groups Settings', 'buddypress' ), 'bp_admin_setting_callback_groups_section', 'buddypress' );
354
355
// Allow subscriptions setting
356
- add_settings_field( 'bp_restrict_group_creation', __( 'Group Creation', 'buddypress' ), 'bp_admin_setting_callback_group_creation', 'buddypress', 'bp_groups' );
357
- register_setting ( 'buddypress', 'bp_restrict_group_creation', 'intval' );
358
359
// Allow group avatars.
360
add_settings_field( 'bp-disable-group-avatar-uploads', __( 'Group Photo Uploads', 'buddypress' ), 'bp_admin_setting_callback_group_avatar_uploads', 'buddypress', 'bp_groups' );
@@ -366,11 +367,11 @@ class BP_Admin {
366
if ( bp_is_active( 'forums' ) ) {
367
368
// Add the main section
369
- add_settings_section( 'bp_forums', __( 'Legacy Group Forums', 'buddypress' ), 'bp_admin_setting_callback_bbpress_section', 'buddypress' );
370
371
// Allow subscriptions setting
372
add_settings_field( 'bb-config-location', __( 'bbPress Configuration', 'buddypress' ), 'bp_admin_setting_callback_bbpress_configuration', 'buddypress', 'bp_forums' );
373
- register_setting ( 'buddypress', 'bb-config-location', '' );
374
}
375
376
/** Activity Section **************************************************/
@@ -378,7 +379,7 @@ class BP_Admin {
378
if ( bp_is_active( 'activity' ) ) {
379
380
// Add the main section
381
- add_settings_section( 'bp_activity', __( 'Activity Settings', 'buddypress' ), 'bp_admin_setting_callback_activity_section', 'buddypress' );
382
383
// Activity commenting on blog and forum posts
384
add_settings_field( 'bp-disable-blogforum-comments', __( 'Blog &amp; Forum Comments', 'buddypress' ), 'bp_admin_setting_callback_blogforum_comments', 'buddypress', 'bp_activity' );
@@ -390,8 +391,8 @@ class BP_Admin {
390
391
// Allow activity akismet
392
if ( is_plugin_active( 'akismet/akismet.php' ) && defined( 'AKISMET_VERSION' ) ) {
393
- add_settings_field( '_bp_enable_akismet', __( 'Akismet', 'buddypress' ), 'bp_admin_setting_callback_activity_akismet', 'buddypress', 'bp_activity' );
394
- register_setting ( 'buddypress', '_bp_enable_akismet', 'intval' );
395
}
396
}
397
}
@@ -545,81 +546,77 @@ class BP_Admin {
545
</div>
546
</div>
547
548
- <hr />
549
-
550
<?php endif; ?>
551
552
- <div class="changelog headline-feature">
553
- <h2><?php esc_html_e( 'Member Types', 'buddypress' ); ?></h2>
554
<div class="featured-image">
555
- <img src="<?php echo esc_url( buddypress()->plugin_url . 'bp-core/admin/images/member-types.png' ); ?>" alt="<?php esc_attr_e( 'Member types metabox', 'buddypress' ); ?>">
556
</div>
557
558
<div class="feature-section">
559
- <h3><?php esc_html_e( 'Native APIs for crafting great new member experiences.', 'buddypress' ); ?></h3>
560
- <p><?php esc_html_e( 'Registering member types finally enables a strict separation of different and explicit types of community members.', 'buddypress' ); ?></p>
561
- <p><?php esc_html_e( 'This amazing new feature is available to plugin developers starting with BuddyPress 2.2', 'buddypress' ); ?></p>
562
- <p><a href="https://codex.buddypress.org/developer/member-types/"><?php esc_html_e( 'Learn more &rarr;', 'buddypress' ); ?></a></p>
563
</div>
564
565
<div class="clear"></div>
566
</div>
567
568
- <hr />
569
-
570
- <div class="changelog feature-list finer-points">
571
<h2><?php esc_html_e( 'The Finer Points', 'buddypress' ); ?></h2>
572
573
<div class="feature-section col two-col">
574
<div>
575
- <span class=" dashicons dashicons-admin-post"></span>
576
- <h4><?php esc_html_e( 'Post Types Activities', 'buddypress' ); ?></h4>
577
- <p><?php esc_html_e( 'Register custom post types so they appear as activity stream items, complete with custom verbiage.', 'buddypress' ); ?></p>
578
</div>
579
580
<div class="template-pack last-feature">
581
<span class=" dashicons dashicons-admin-appearance"></span>
582
- <h4><?php esc_html_e( 'Template Pack', 'buddypress' ); ?></h4>
583
- <p><?php esc_html_e( 'The Legacy template pack is now more responsive and accommodating to more WordPress themes.', 'buddypress' ); ?></p>
584
</div>
585
586
<div class="group-invites">
587
- <span class=" dashicons dashicons-editor-code"></span>
588
- <h4><?php esc_html_e( 'Message Meta', 'buddypress' ); ?></h4>
589
- <p><?php esc_html_e( 'Private message conversations made infinitely more flexible with an additional metadata table.', 'buddypress' ); ?></p>
590
</div>
591
592
<div class="last-feature">
593
- <span class=" dashicons dashicons-heart"></span>
594
- <h4><?php esc_html_e( 'WordPress 3.6 - 4.1', 'buddypress' ); ?></h4>
595
- <p><?php esc_html_e( 'We support a wide range of WordPress versions, even though you should always stay up-to-date.', 'buddypress' ); ?></p>
596
</div>
597
</div>
598
</div>
599
600
- <hr />
601
-
602
- <div class="changelog feature-list">
603
<h2><?php esc_html_e( 'Under the Hood', 'buddypress' ); ?></h2>
604
605
<div class="feature-section col two-col">
606
<div>
607
- <h4><?php esc_html_e( 'Complex Activity Queries', 'buddypress' ); ?></h4>
608
- <p><?php esc_html_e( 'Metadata, multiple scopes, actions, post types, and more are now easily queried using core APIs and functionality.', 'buddypress' ); ?></p>
609
610
<h4><?php esc_html_e( 'Cache Improvements', 'buddypress' ); ?></h4>
611
- <p><?php esc_html_e( 'We now properly group and cache several different types of queries and objects, with an emphasis on multi-network environments.', 'buddypress' ); ?></p>
612
</div>
613
<div class="last-feature">
614
<h4><?php esc_html_e( 'Developer Reference', 'buddypress' ); ?></h4>
615
<p><?php esc_html_e( 'Continued improvements to inline code documentation make it easier for developers to understand how BuddyPress works.', 'buddypress' ); ?></p>
616
617
- <h4><?php esc_html_e( 'And so Much More', 'buddypress' ); ?></h4>
618
- <p><?php esc_html_e( 'With over 130 bugs squashed and constant attention to improving unit-test coverage, we think this version is just the bee&#8217;s knees.', 'buddypress' ); ?></p>
619
</div>
620
</div>
621
</div>
622
623
<?php
624
}
625
16
*
17
* @package BuddyPress
18
* @subpackage CoreAdministration
19
+ * @todo Break this apart into each applicable Component
20
*
21
* @since BuddyPress (1.6.0)
22
*/
159
add_action( 'admin_bar_menu', array( $this, 'admin_bar_about_link' ), 15 );
160
161
// Add a description of new BuddyPress tools in the available tools page
162
+ add_action( 'tool_box', 'bp_core_admin_available_tools_intro' );
163
add_action( 'bp_network_tool_box', 'bp_core_admin_available_tools_intro' );
164
165
// On non-multisite, catch
315
/** Main Section ******************************************************/
316
317
// Add the main section
318
+ add_settings_section( 'bp_main', __( 'Main Settings', 'buddypress' ), 'bp_admin_setting_callback_main_section', 'buddypress' );
319
320
// Hide toolbar for logged out users setting
321
+ add_settings_field( 'hide-loggedout-adminbar', __( 'Toolbar', 'buddypress' ), 'bp_admin_setting_callback_admin_bar', 'buddypress', 'bp_main' );
322
+ register_setting( 'buddypress', 'hide-loggedout-adminbar', 'intval' );
323
324
// Only show 'switch to Toolbar' option if the user chose to retain the BuddyBar during the 1.6 upgrade
325
if ( (bool) bp_get_option( '_bp_force_buddybar', false ) ) {
329
330
// Allow account deletion
331
add_settings_field( 'bp-disable-account-deletion', __( 'Account Deletion', 'buddypress' ), 'bp_admin_setting_callback_account_deletion', 'buddypress', 'bp_main' );
332
+ register_setting( 'buddypress', 'bp-disable-account-deletion', 'intval' );
333
334
/** XProfile Section **************************************************/
335
342
register_setting( 'buddypress', 'bp-disable-avatar-uploads', 'intval' );
343
344
// Profile sync setting
345
+ add_settings_field( 'bp-disable-profile-sync', __( 'Profile Syncing', 'buddypress' ), 'bp_admin_setting_callback_profile_sync', 'buddypress', 'bp_xprofile' );
346
+ register_setting ( 'buddypress', 'bp-disable-profile-sync', 'intval' );
347
}
348
349
/** Groups Section ****************************************************/
351
if ( bp_is_active( 'groups' ) ) {
352
353
// Add the main section
354
+ add_settings_section( 'bp_groups', __( 'Groups Settings', 'buddypress' ), 'bp_admin_setting_callback_groups_section', 'buddypress' );
355
356
// Allow subscriptions setting
357
+ add_settings_field( 'bp_restrict_group_creation', __( 'Group Creation', 'buddypress' ), 'bp_admin_setting_callback_group_creation', 'buddypress', 'bp_groups' );
358
+ register_setting( 'buddypress', 'bp_restrict_group_creation', 'intval' );
359
360
// Allow group avatars.
361
add_settings_field( 'bp-disable-group-avatar-uploads', __( 'Group Photo Uploads', 'buddypress' ), 'bp_admin_setting_callback_group_avatar_uploads', 'buddypress', 'bp_groups' );
367
if ( bp_is_active( 'forums' ) ) {
368
369
// Add the main section
370
+ add_settings_section( 'bp_forums', __( 'Legacy Group Forums', 'buddypress' ), 'bp_admin_setting_callback_bbpress_section', 'buddypress' );
371
372
// Allow subscriptions setting
373
add_settings_field( 'bb-config-location', __( 'bbPress Configuration', 'buddypress' ), 'bp_admin_setting_callback_bbpress_configuration', 'buddypress', 'bp_forums' );
374
+ register_setting( 'buddypress', 'bb-config-location', '' );
375
}
376
377
/** Activity Section **************************************************/
379
if ( bp_is_active( 'activity' ) ) {
380
381
// Add the main section
382
+ add_settings_section( 'bp_activity', __( 'Activity Settings', 'buddypress' ), 'bp_admin_setting_callback_activity_section', 'buddypress' );
383
384
// Activity commenting on blog and forum posts
385
add_settings_field( 'bp-disable-blogforum-comments', __( 'Blog &amp; Forum Comments', 'buddypress' ), 'bp_admin_setting_callback_blogforum_comments', 'buddypress', 'bp_activity' );
391
392
// Allow activity akismet
393
if ( is_plugin_active( 'akismet/akismet.php' ) && defined( 'AKISMET_VERSION' ) ) {
394
+ add_settings_field( '_bp_enable_akismet', __( 'Akismet', 'buddypress' ), 'bp_admin_setting_callback_activity_akismet', 'buddypress', 'bp_activity' );
395
+ register_setting( 'buddypress', '_bp_enable_akismet', 'intval' );
396
}
397
}
398
}
546
</div>
547
</div>
548
549
<?php endif; ?>
550
551
+ <div class="headline-feature">
552
+ <h3><?php esc_html_e( 'Upload Avatars with a Drag and a Drop', 'buddypress' ); ?></h3>
553
+
554
<div class="featured-image">
555
+ <img src="<?php echo esc_url( buddypress()->plugin_url . 'bp-core/admin/images/avatar-ui.gif' ); ?>" alt="<?php esc_attr_e( 'Revamped Avatar Upload UI', 'buddypress' ); ?>">
556
</div>
557
558
<div class="feature-section">
559
+ <h3><?php esc_html_e( 'Built with the Attachments API, the new foundation for BuddyPress media management.', 'buddypress' ); ?></h3>
560
+ <p><?php esc_html_e( 'You can drag and drop any image you choose to upload as your profile photo. The interface is mobile-ready and now includes integration with phone or laptop cameras. This is an example of what can be developed using the new Attachments API, the long-awaited foundation for media-related BuddyPress components and features.', 'buddypress' ); ?> <a href="https://codex.buddypress.org/plugindev/bp_attachment/"><?php esc_html_e( 'Learn more &rarr;', 'buddypress' ); ?></a></p>
561
</div>
562
563
<div class="clear"></div>
564
</div>
565
566
+ <div class="feature-list finer-points">
567
<h2><?php esc_html_e( 'The Finer Points', 'buddypress' ); ?></h2>
568
569
<div class="feature-section col two-col">
570
<div>
571
+ <span class=" dashicons dashicons-admin-users"></span>
572
+ <h4><?php esc_html_e( 'Member Type Directories', 'buddypress' ); ?></h4>
573
+ <p><?php esc_html_e( 'Create directories of member types in your site using the Member Type API.', 'buddypress' ); ?></p>
574
</div>
575
576
<div class="template-pack last-feature">
577
<span class=" dashicons dashicons-admin-appearance"></span>
578
+ <h4><?php esc_html_e( 'Core Theme Companion Styling', 'buddypress' ); ?></h4>
579
+ <p><?php esc_html_e( 'Improved integration of components in WordPress core themes Twenty Fifteen and Twenty Fourteen.', 'buddypress' ); ?></p>
580
</div>
581
582
<div class="group-invites">
583
+ <span class=" dashicons dashicons-admin-post"></span>
584
+ <h4><?php esc_html_e( 'Blog Post Activity', 'buddypress' ); ?></h4>
585
+ <p><?php esc_html_e( 'Generate better excerpts in the activity streams for posts containing images or other embedded media content.', 'buddypress' ); ?></p>
586
</div>
587
588
<div class="last-feature">
589
+ <span class=" dashicons dashicons-star-filled"></span>
590
+ <h4><?php esc_html_e( 'Star Private Messages ', 'buddypress' ); ?></h4>
591
+ <p><?php esc_html_e( 'Mark important messages in your inbox from your friends with a star.', 'buddypress' ); ?></p>
592
</div>
593
</div>
594
</div>
595
596
+ <div class="feature-list">
597
<h2><?php esc_html_e( 'Under the Hood', 'buddypress' ); ?></h2>
598
599
<div class="feature-section col two-col">
600
<div>
601
+ <h4><?php esc_html_e( 'Components can register new features', 'buddypress' ); ?></h4>
602
+ <p><?php esc_html_e( 'Plugin developers can register new features or check if a component feature is registered using the `BP_Component` class.', 'buddypress' ); ?></p>
603
604
<h4><?php esc_html_e( 'Cache Improvements', 'buddypress' ); ?></h4>
605
+ <p><?php esc_html_e( 'Improved cacheing for the following components: Messages, Profiles, Members &amp; Member Types, and Friends.', 'buddypress' ); ?></p>
606
</div>
607
<div class="last-feature">
608
<h4><?php esc_html_e( 'Developer Reference', 'buddypress' ); ?></h4>
609
<p><?php esc_html_e( 'Continued improvements to inline code documentation make it easier for developers to understand how BuddyPress works.', 'buddypress' ); ?></p>
610
611
+ <h4><?php esc_html_e( 'User Documentation', 'buddypress' ); ?></h4>
612
+ <p><?php esc_html_e( 'The BuddyPress Codex is maintained and updated regularly with new articles and tutorials.', 'buddypress' ); ?></p>
613
</div>
614
</div>
615
</div>
616
617
+ <p><?php esc_html_e( 'Official:', 'buddypress' ); ?> <a href="https://buddypress.org/blog/"><?php esc_html_e( 'News', 'buddypress' ); ?></a> &bullet; <a href="https://buddypress.org/suppport/"><?php esc_html_e( 'Support', 'buddypress' ); ?></a> &bullet; <a href="https://codex.buddypress.org/"><?php esc_html_e( 'Documentation', 'buddypress' ); ?></a> &bullet; <a href="https://bpdevel.wordpress.com/"><?php esc_html_e( 'Development Blog', 'buddypress' ); ?></a></p>
618
+ <p><?php esc_html_e( 'Twitter:', 'buddypress' ); ?> <a href="https://twitter.com/buddypress/"><?php esc_html_e( 'BuddyPress', 'buddypress' ); ?></a> &bullet; <a href="https://twitter.com/bptrac/"><?php esc_html_e( 'BuddyPress Trac', 'buddypress' ); ?></a> &bullet; <a href="https://twitter.com/buddypressdev/"><?php esc_html_e( 'BuddyPress Dev', 'buddypress' ); ?></a></p>
619
+
620
<?php
621
}
622
bp-core/classes/class-bp-attachment.php CHANGED
@@ -196,6 +196,7 @@ abstract class BP_Attachment {
196
*
197
* @param array $file The appropriate entry the from $_FILES superglobal.
198
* @param string $upload_dir_filter A specific filter to be applied to 'upload_dir' (optional).
199
* @uses wp_handle_upload() To upload the file
200
* @uses add_filter() To temporarly overrides WordPress uploads data
201
* @uses remove_filter() To stop overriding WordPress uploads data
@@ -205,7 +206,7 @@ abstract class BP_Attachment {
205
* On failure, returns an array containing the error message
206
* (eg: array( 'error' => $message ) )
207
*/
208
- public function upload( $file, $upload_dir_filter = '' ) {
209
/**
210
* Upload action and the file input name are required parameters
211
* @see BP_Attachment:__construct()
@@ -264,13 +265,17 @@ abstract class BP_Attachment {
264
}
265
266
// Make sure the file will be uploaded in the attachment directory
267
- add_filter( 'upload_dir', $upload_dir_filter, 10, 0 );
268
269
// Upload the attachment
270
- $this->attachment = wp_handle_upload( $file[ $this->file_input ], $overrides );
271
272
// Restore WordPress Uploads data
273
- remove_filter( 'upload_dir', $upload_dir_filter, 10, 0 );
274
275
// Remove the pre WordPress 4.0 static filter
276
remove_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10, 1 );
196
*
197
* @param array $file The appropriate entry the from $_FILES superglobal.
198
* @param string $upload_dir_filter A specific filter to be applied to 'upload_dir' (optional).
199
+ * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
200
* @uses wp_handle_upload() To upload the file
201
* @uses add_filter() To temporarly overrides WordPress uploads data
202
* @uses remove_filter() To stop overriding WordPress uploads data
206
* On failure, returns an array containing the error message
207
* (eg: array( 'error' => $message ) )
208
*/
209
+ public function upload( $file, $upload_dir_filter = '', $time = null ) {
210
/**
211
* Upload action and the file input name are required parameters
212
* @see BP_Attachment:__construct()
265
}
266
267
// Make sure the file will be uploaded in the attachment directory
268
+ if ( ! empty( $upload_dir_filter ) ) {
269
+ add_filter( 'upload_dir', $upload_dir_filter, 10, 0 );
270
+ }
271
272
// Upload the attachment
273
+ $this->attachment = wp_handle_upload( $file[ $this->file_input ], $overrides, $time );
274
275
// Restore WordPress Uploads data
276
+ if ( ! empty( $upload_dir_filter ) ) {
277
+ remove_filter( 'upload_dir', $upload_dir_filter, 10, 0 );
278
+ }
279
280
// Remove the pre WordPress 4.0 static filter
281
remove_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10, 1 );
bp-core/deprecated/js/autocomplete/jquery.autocomplete.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){a.fn.extend({autocomplete:function(b,c){var d="string"==typeof b;return c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c),c.highlight=c.highlight||function(a){return a},this.each(function(){new a.Autocompleter(this,c)})},result:function(a){return this.bind("result",a)},search:function(a){return this.trigger("search",[a])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(a){return this.trigger("setOptions",[a])},unautocomplete:function(){return this.trigger("unautocomplete")}}),a.Autocompleter=function(b,c){function d(){var a=x.selected();if(!a)return!1;var b=a.result;if(t=b,c.multiple){var d=f(s.val());d.length>1&&(b=d.slice(0,d.length-1).join(c.multipleSeparator)+c.multipleSeparator+b),b+=c.multipleSeparator}return s.val(b),j(),s.trigger("result",[a.data,a.value]),!0}function e(a,b){if(q==r.DEL)return void x.hide();var d=s.val();(b||d!=t)&&(t=d,d=g(d),d.length>=c.minChars?(s.addClass(c.loadingClass),jQuery("#send-to-input").addClass("loading"),c.matchCase||(d=d.toLowerCase()),l(d,k,j)):(n(),x.hide()))}function f(b){if(!b)return[""];var d=b.split(a.trim(c.multipleSeparator)),e=[];return a.each(d,function(b,c){a.trim(c)&&(e[b]=a.trim(c))}),e}function g(a){if(!c.multiple)return a;var b=f(a);return b[b.length-1]}function h(d,e){c.autoFill&&g(s.val()).toLowerCase()==d.toLowerCase()&&8!=q&&(s.val(s.val()+e.substring(g(t).length)),a.Autocompleter.Selection(b,t.length,t.length+e.length))}function i(){clearTimeout(p),p=setTimeout(j,200)}function j(){x.hide(),clearTimeout(p),n(),c.mustMatch&&s.search(function(a){a||s.val("")})}function k(a,b){if(b&&b.length&&v){n(),x.display(b,a);var c=b[0].value.split(";");b.value=c[0],h(a,b.value),x.show()}else j()}function l(d,e,f){c.matchCase||(d=d.toLowerCase());var h=u.load(d);if(h&&h.length)e(d,h);else if("string"==typeof c.url&&c.url.length>0){var i={};a.each(c.extraParams,function(a,b){i[a]="function"==typeof b?b():b}),a.ajax({mode:"abort",port:"autocomplete"+b.name,dataType:c.dataType,url:c.url,data:a.extend({q:g(d),limit:c.max,action:"messages_autocomplete_results",cookie:o()},i),success:function(a){var b=c.parse&&c.parse(a)||m(a);u.add(d,b),e(d,b)}})}else f(d)}function m(b){for(var d=[],e=b.split("\n"),f=0;f<e.length;f++){var g=a.trim(e[f]);g&&(g=g.split("|"),d[d.length]={data:g,value:g[0],result:c.formatResult&&c.formatResult(g,g[0])||g[0]})}return d}function n(){s.removeClass(c.loadingClass),jQuery("#send-to-input").removeClass("loading")}function o(){var a,b,c,d,e,f=document.cookie.split(";"),g={},h="bp-";for(a=0;a<f.length;a++)b=f[a],c=b.indexOf("="),d=jq.trim(unescape(b.slice(0,c))),e=unescape(b.slice(c+1)),0===d.indexOf(h)&&(g[d]=e);return encodeURIComponent(jq.param(g))}var p,q,r={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34},s=a(b).attr("autocomplete","off").addClass(c.inputClass),t="",u=a.Autocompleter.Cache(c),v=0,w={mouseDownOnSelect:!1},x=a.Autocompleter.Select(c,b,d,w);s.keydown(function(b){switch(q=b.keyCode,b.keyCode){case r.UP:b.preventDefault(),x.visible()?x.prev():e(0,!0);break;case r.DOWN:b.preventDefault(),x.visible()?x.next():e(0,!0);break;case r.PAGEUP:b.preventDefault(),x.visible()?x.pageUp():e(0,!0);break;case r.PAGEDOWN:b.preventDefault(),x.visible()?x.pageDown():e(0,!0);break;case c.multiple&&","==a.trim(c.multipleSeparator)&&r.COMMA:case r.TAB:case r.RETURN:d()&&(c.multiple||s.blur(),b.preventDefault(),s.focus());break;case r.ESC:x.hide();break;default:clearTimeout(p),p=setTimeout(e,c.delay)}}).keypress(function(){}).focus(function(){v++}).blur(function(){v=0,w.mouseDownOnSelect||i()}).click(function(){v++>1&&!x.visible()&&e(0,!0)}).bind("search",function(){function b(a,b){var d;if(b&&b.length)for(var e=0;e<b.length;e++)if(b[e].result.toLowerCase()==a.toLowerCase()){d=b[e];break}"function"==typeof c?c(d):s.trigger("result",d&&[d.data,d.value])}var c=arguments.length>1?arguments[1]:null;a.each(f(s.val()),function(a,c){l(c,b,b)})}).bind("flushCache",function(){u.flush()}).bind("setOptions",function(){a.extend(c,arguments[1]),"data"in arguments[1]&&u.populate()}).bind("unautocomplete",function(){x.unbind(),s.unbind()})},a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(a){return a[0]},autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(a,b){return a.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:250,attachTo:"body"},a.Autocompleter.Cache=function(b){function c(a,c){b.matchCase||(a=a.toLowerCase());var d=a.indexOf(c);return-1==d?!1:0==d||b.matchContains}function d(a,c){h>b.cacheLength&&f(),g[a]||h++,g[a]=c}function e(){if(!b.data)return!1;var c={},e=0;b.url||(b.cacheLength=1),c[""]=[];for(var f=0,g=b.data.length;g>f;f++){var h=b.data[f];h="string"==typeof h?[h]:h;var i=b.formatItem(h,f+1,b.data.length);if(i!==!1){var j=i.charAt(0).toLowerCase();c[j]||(c[j]=[]);var k={value:i,data:h,result:b.formatResult&&b.formatResult(h)||i};c[j].push(k),e++<b.max&&c[""].push(k)}}a.each(c,function(a,c){b.cacheLength++,d(a,c)})}function f(){g={},h=0}var g={},h=0;return setTimeout(e,25),{flush:f,add:d,populate:e,load:function(d){if(!b.cacheLength||!h)return null;if(!b.url&&b.matchContains){var e=[];for(var f in g)if(f.length>0){var i=g[f];a.each(i,function(a,b){c(b.value,d)&&e.push(b)})}return e}if(g[d])return g[d];if(b.matchSubset)for(var j=d.length-1;j>=b.minChars;j--){var i=g[d.substr(0,j)];if(i){var e=[];return a.each(i,function(a,b){c(b.value,d)&&(e[e.length]=b)}),e}}return null}}},a.Autocompleter.Select=function(b,c,d,e){function f(){s&&(n=a("<div/>").hide().addClass(b.resultsClass).css("position","absolute").appendTo(b.attachTo),o=a("<ul>").appendTo(n).mouseover(function(b){g(b).nodeName&&"LI"==g(b).nodeName.toUpperCase()&&(q=a("li",o).removeClass(p.ACTIVE).index(g(b)),a(g(b)).addClass(p.ACTIVE))}).click(function(b){return a(g(b)).addClass(p.ACTIVE),d(),c.focus(),!1}).mousedown(function(){e.mouseDownOnSelect=!0}).mouseup(function(){e.mouseDownOnSelect=!1}),b.width>0&&n.css("width",b.width),s=!1)}function g(a){for(var b=a.target;b&&"LI"!=b.tagName;)b=b.parentNode;return b?b:[]}function h(a){l.slice(q,q+1).removeClass(),i(a);var c=l.slice(q,q+1).addClass(p.ACTIVE);if(b.scroll){var d=0;l.slice(0,q).each(function(){d+=this.offsetHeight}),d+c[0].offsetHeight-o.scrollTop()>o[0].clientHeight?o.scrollTop(d+c[0].offsetHeight-o.innerHeight()):d<o.scrollTop()&&o.scrollTop(d)}}function i(a){q+=a,0>q?q=l.size()-1:q>=l.size()&&(q=0)}function j(a){return b.max&&b.max<a?b.max:a}function k(){o.empty();for(var c=j(m.length),d=0;c>d;d++)if(m[d]){var e=b.formatItem(m[d].data,d+1,c,m[d].value,r);if(e!==!1){var f=a("<li>").html(b.highlight(e,r)).addClass(d%2==0?"ac_event":"ac_odd").appendTo(o)[0];a.data(f,"ac_data",m[d])}}l=o.find("li"),b.selectFirst&&(l.slice(0,1).addClass(p.ACTIVE),q=0),o.bgiframe()}var l,m,n,o,p={ACTIVE:"ac_over"},q=-1,r="",s=!0;return{display:function(a,b){f(),m=a,r=b,k()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){h(0!=q&&0>q-8?-q:-8)},pageDown:function(){h(q!=l.size()-1&&q+8>l.size()?l.size()-1-q:8)},hide:function(){n&&n.hide(),q=-1},visible:function(){return n&&n.is(":visible")},current:function(){return this.visible()&&(l.filter("."+p.ACTIVE)[0]||b.selectFirst&&l[0])},show:function(){var d=a(c).offset();if(n.css({width:"string"==typeof b.width||b.width>0?b.width:a(c).width(),top:d.top+c.offsetHeight,left:d.left}).show(),b.scroll&&(o.scrollTop(0),o.css({maxHeight:b.scrollHeight,overflow:"auto"}),a.browser.msie&&"undefined"==typeof document.body.style.maxHeight)){var e=0;l.each(function(){e+=this.offsetHeight});var f=e>b.scrollHeight;o.css("height",f?b.scrollHeight:e),f||l.width(o.width()-parseInt(l.css("padding-left"))-parseInt(l.css("padding-right")))}},selected:function(){var b=l&&l.filter("."+p.ACTIVE).removeClass(p.ACTIVE);return b&&b.length&&a.data(b[0],"ac_data")},unbind:function(){n&&n.remove()}}},a.Autocompleter.Selection=function(a,b,c){if(a.createTextRange){var d=a.createTextRange();d.collapse(!0),d.moveStart("character",b),d.moveEnd("character",c),d.select()}else a.setSelectionRange?a.setSelectionRange(b,c):a.selectionStart&&(a.selectionStart=b,a.selectionEnd=c);a.focus()}}(jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){a.fn.extend({autocomplete:function(b,c){var d="string"==typeof b;return c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c),c.highlight=c.highlight||function(a){return a},this.each(function(){new a.Autocompleter(this,c)})},result:function(a){return this.bind("result",a)},search:function(a){return this.trigger("search",[a])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(a){return this.trigger("setOptions",[a])},unautocomplete:function(){return this.trigger("unautocomplete")}}),a.Autocompleter=function(b,c){function d(){var a=x.selected();if(!a)return!1;var b=a.result;if(t=b,c.multiple){var d=f(s.val());d.length>1&&(b=d.slice(0,d.length-1).join(c.multipleSeparator)+c.multipleSeparator+b),b+=c.multipleSeparator}return s.val(b),j(),s.trigger("result",[a.data,a.value]),!0}function e(a,b){if(q==r.DEL)return void x.hide();var d=s.val();(b||d!=t)&&(t=d,d=g(d),d.length>=c.minChars?(s.addClass(c.loadingClass),jQuery("#send-to-input").addClass("loading"),c.matchCase||(d=d.toLowerCase()),l(d,k,j)):(n(),x.hide()))}function f(b){if(!b)return[""];var d=b.split(a.trim(c.multipleSeparator)),e=[];return a.each(d,function(b,c){a.trim(c)&&(e[b]=a.trim(c))}),e}function g(a){if(!c.multiple)return a;var b=f(a);return b[b.length-1]}function h(d,e){c.autoFill&&g(s.val()).toLowerCase()==d.toLowerCase()&&8!=q&&(s.val(s.val()+e.substring(g(t).length)),a.Autocompleter.Selection(b,t.length,t.length+e.length))}function i(){clearTimeout(p),p=setTimeout(j,200)}function j(){x.hide(),clearTimeout(p),n(),c.mustMatch&&s.search(function(a){a||s.val("")})}function k(a,b){if(b&&b.length&&v){n(),x.display(b,a);var c=b[0].value.split(";");b.value=c[0],h(a,b.value),x.show()}else j()}function l(d,e,f){c.matchCase||(d=d.toLowerCase());var h=u.load(d);if(h&&h.length)e(d,h);else if("string"==typeof c.url&&c.url.length>0){var i={};a.each(c.extraParams,function(a,b){i[a]="function"==typeof b?b():b}),a.ajax({mode:"abort",port:"autocomplete"+b.name,dataType:c.dataType,url:c.url,data:a.extend({q:g(d),limit:c.max,action:"messages_autocomplete_results",cookie:o()},i),success:function(a){var b=c.parse&&c.parse(a)||m(a);u.add(d,b),e(d,b)}})}else f(d)}function m(b){for(var d=[],e=b.split("\n"),f=0;f<e.length;f++){var g=a.trim(e[f]);g&&(g=g.split("|"),d[d.length]={data:g,value:g[0],result:c.formatResult&&c.formatResult(g,g[0])||g[0]})}return d}function n(){s.removeClass(c.loadingClass),jQuery("#send-to-input").removeClass("loading")}function o(){var a,b,c,d,e,f=document.cookie.split(";"),g={},h="bp-";for(a=0;a<f.length;a++)b=f[a],c=b.indexOf("="),d=jq.trim(unescape(b.slice(0,c))),e=unescape(b.slice(c+1)),0===d.indexOf(h)&&(g[d]=e);return encodeURIComponent(jq.param(g))}var p,q,r={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34},s=a(b).attr("autocomplete","off").addClass(c.inputClass),t="",u=a.Autocompleter.Cache(c),v=0,w={mouseDownOnSelect:!1},x=a.Autocompleter.Select(c,b,d,w);s.keydown(function(b){switch(q=b.keyCode,b.keyCode){case r.UP:b.preventDefault(),x.visible()?x.prev():e(0,!0);break;case r.DOWN:b.preventDefault(),x.visible()?x.next():e(0,!0);break;case r.PAGEUP:b.preventDefault(),x.visible()?x.pageUp():e(0,!0);break;case r.PAGEDOWN:b.preventDefault(),x.visible()?x.pageDown():e(0,!0);break;case c.multiple&&","==a.trim(c.multipleSeparator)&&r.COMMA:case r.TAB:case r.RETURN:d()&&(c.multiple||s.blur(),b.preventDefault(),s.focus());break;case r.ESC:x.hide();break;default:clearTimeout(p),p=setTimeout(e,c.delay)}}).keypress(function(){}).focus(function(){v++}).blur(function(){v=0,w.mouseDownOnSelect||i()}).click(function(){v++>1&&!x.visible()&&e(0,!0)}).bind("search",function(){function b(a,b){var d;if(b&&b.length)for(var e=0;e<b.length;e++)if(b[e].result.toLowerCase()==a.toLowerCase()){d=b[e];break}"function"==typeof c?c(d):s.trigger("result",d&&[d.data,d.value])}var c=arguments.length>1?arguments[1]:null;a.each(f(s.val()),function(a,c){l(c,b,b)})}).bind("flushCache",function(){u.flush()}).bind("setOptions",function(){a.extend(c,arguments[1]),"data"in arguments[1]&&u.populate()}).bind("unautocomplete",function(){x.unbind(),s.unbind()})},a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(a){return a[0]},autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(a,b){return a.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:250,attachTo:"body"},a.Autocompleter.Cache=function(b){function c(a,c){b.matchCase||(a=a.toLowerCase());var d=a.indexOf(c);return-1==d?!1:0==d||b.matchContains}function d(a,c){h>b.cacheLength&&f(),g[a]||h++,g[a]=c}function e(){if(!b.data)return!1;var c={},e=0;b.url||(b.cacheLength=1),c[""]=[];for(var f=0,g=b.data.length;g>f;f++){var h=b.data[f];h="string"==typeof h?[h]:h;var i=b.formatItem(h,f+1,b.data.length);if(i!==!1){var j=i.charAt(0).toLowerCase();c[j]||(c[j]=[]);var k={value:i,data:h,result:b.formatResult&&b.formatResult(h)||i};c[j].push(k),e++<b.max&&c[""].push(k)}}a.each(c,function(a,c){b.cacheLength++,d(a,c)})}function f(){g={},h=0}var g={},h=0;return setTimeout(e,25),{flush:f,add:d,populate:e,load:function(d){if(!b.cacheLength||!h)return null;if(!b.url&&b.matchContains){var e=[];for(var f in g)if(f.length>0){var i=g[f];a.each(i,function(a,b){c(b.value,d)&&e.push(b)})}return e}if(g[d])return g[d];if(b.matchSubset)for(var j=d.length-1;j>=b.minChars;j--){var i=g[d.substr(0,j)];if(i){var e=[];return a.each(i,function(a,b){c(b.value,d)&&(e[e.length]=b)}),e}}return null}}},a.Autocompleter.Select=function(b,c,d,e){function f(){s&&(n=a("<div/>").hide().addClass(b.resultsClass).css("position","absolute").appendTo(b.attachTo),o=a("<ul>").appendTo(n).mouseover(function(b){g(b).nodeName&&"LI"==g(b).nodeName.toUpperCase()&&(q=a("li",o).removeClass(p.ACTIVE).index(g(b)),a(g(b)).addClass(p.ACTIVE))}).click(function(b){return a(g(b)).addClass(p.ACTIVE),d(),c.focus(),!1}).mousedown(function(){e.mouseDownOnSelect=!0}).mouseup(function(){e.mouseDownOnSelect=!1}),b.width>0&&n.css("width",b.width),s=!1)}function g(a){for(var b=a.target;b&&"LI"!=b.tagName;)b=b.parentNode;return b?b:[]}function h(a){l.slice(q,q+1).removeClass(),i(a);var c=l.slice(q,q+1).addClass(p.ACTIVE);if(b.scroll){var d=0;l.slice(0,q).each(function(){d+=this.offsetHeight}),d+c[0].offsetHeight-o.scrollTop()>o[0].clientHeight?o.scrollTop(d+c[0].offsetHeight-o.innerHeight()):d<o.scrollTop()&&o.scrollTop(d)}}function i(a){q+=a,0>q?q=l.size()-1:q>=l.size()&&(q=0)}function j(a){return b.max&&b.max<a?b.max:a}function k(){o.empty();for(var c=j(m.length),d=0;c>d;d++)if(m[d]){var e=b.formatItem(m[d].data,d+1,c,m[d].value,r);if(e!==!1){var f=a("<li>").html(b.highlight(e,r)).addClass(d%2==0?"ac_event":"ac_odd").appendTo(o)[0];a.data(f,"ac_data",m[d])}}l=o.find("li"),b.selectFirst&&(l.slice(0,1).addClass(p.ACTIVE),q=0),o.bgiframe()}var l,m,n,o,p={ACTIVE:"ac_over"},q=-1,r="",s=!0;return{display:function(a,b){f(),m=a,r=b,k()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){h(0!=q&&0>q-8?-q:-8)},pageDown:function(){h(q!=l.size()-1&&q+8>l.size()?l.size()-1-q:8)},hide:function(){n&&n.hide(),q=-1},visible:function(){return n&&n.is(":visible")},current:function(){return this.visible()&&(l.filter("."+p.ACTIVE)[0]||b.selectFirst&&l[0])},show:function(){var d=a(c).offset();if(n.css({width:"string"==typeof b.width||b.width>0?b.width:a(c).width(),top:d.top+c.offsetHeight,left:d.left}).show(),b.scroll&&(o.scrollTop(0),o.css({maxHeight:b.scrollHeight,overflow:"auto"}),a.browser.msie&&"undefined"==typeof document.body.style.maxHeight)){var e=0;l.each(function(){e+=this.offsetHeight});var f=e>b.scrollHeight;o.css("height",f?b.scrollHeight:e),f||l.width(o.width()-parseInt(l.css("padding-left"))-parseInt(l.css("padding-right")))}},selected:function(){var b=l&&l.filter("."+p.ACTIVE).removeClass(p.ACTIVE);return b&&b.length&&a.data(b[0],"ac_data")},unbind:function(){n&&n.remove()}}},a.Autocompleter.Selection=function(a,b,c){if(a.createTextRange){var d=a.createTextRange();d.collapse(!0),d.moveStart("character",b),d.moveEnd("character",c),d.select()}else a.setSelectionRange?a.setSelectionRange(b,c):a.selectionStart&&(a.selectionStart=b,a.selectionEnd=c);a.focus()}}(jQuery);
bp-core/deprecated/js/autocomplete/jquery.autocompletefb.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
jQuery.fn.autoCompletefb=function(a){var b=this,c={ul:b,urlLookup:[""],acOptions:{},foundClass:".friend-tab",inputClass:".send-to-input"};a&&jQuery.extend(c,a);var d={params:c,removeFind:function(a){return d.removeUsername(a),jQuery(a).unbind("click").parent().remove(),jQuery(c.inputClass,b).focus(),b.acfb},removeUsername:function(a){var b=a.parentNode.id.substr(a.parentNode.id.indexOf("-")+1);jQuery("#send-to-usernames").removeClass(b)}};return jQuery(c.foundClass+" img.p").click(function(){d.removeFind(this)}),jQuery(c.inputClass,b).autocomplete(c.urlLookup,c.acOptions),jQuery(c.inputClass,b).result(function(a,e,f){var f=c.foundClass.replace(/\./,""),e=String(e).split(" ("),g=e[1].substr(0,e[1].length-1);if(0===jQuery(c.inputClass).siblings("#un-"+g).length){var h="#link-"+g,i=jQuery(h).attr("href"),j='<li class="'+f+'" id="un-'+g+'"><span><a href="'+i+'">'+e[0]+'</a></span> <span class="p">X</span></li>',k=jQuery(c.inputClass,b).before(j);jQuery("#send-to-usernames").addClass(g),jQuery(".p",k[0].previousSibling).click(function(){d.removeFind(this)})}jQuery(c.inputClass,b).val("")}),jQuery(c.inputClass,b).focus(),d};
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
jQuery.fn.autoCompletefb=function(a){var b=this,c={ul:b,urlLookup:[""],acOptions:{},foundClass:".friend-tab",inputClass:".send-to-input"};a&&jQuery.extend(c,a);var d={params:c,removeFind:function(a){return d.removeUsername(a),jQuery(a).unbind("click").parent().remove(),jQuery(c.inputClass,b).focus(),b.acfb},removeUsername:function(a){var b=a.parentNode.id.substr(a.parentNode.id.indexOf("-")+1);jQuery("#send-to-usernames").removeClass(b)}};return jQuery(c.foundClass+" img.p").click(function(){d.removeFind(this)}),jQuery(c.inputClass,b).autocomplete(c.urlLookup,c.acOptions),jQuery(c.inputClass,b).result(function(a,e,f){var f=c.foundClass.replace(/\./,""),e=String(e).split(" ("),g=e[1].substr(0,e[1].length-1);if(0===jQuery(c.inputClass).siblings("#un-"+g).length){var h="#link-"+g,i=jQuery(h).attr("href"),j='<li class="'+f+'" id="un-'+g+'"><span><a href="'+i+'">'+e[0]+'</a></span> <span class="p">X</span></li>',k=jQuery(c.inputClass,b).before(j);jQuery("#send-to-usernames").addClass(g),jQuery(".p",k[0].previousSibling).click(function(){d.removeFind(this)})}jQuery(c.inputClass,b).val("")}),jQuery(c.inputClass,b).focus(),d};
bp-core/deprecated/js/autocomplete/jquery.bgiframe.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){function b(a){return a&&a.constructor===Number?a+"px":a}a.fn.bgiframe=a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(c){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:!0,src:"javascript:false;"},c);var d='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==!1?"filter:Alpha(Opacity='0');":"")+"top:"+("auto"==c.top?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(c.top))+";left:"+("auto"==c.left?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(c.left))+";width:"+("auto"==c.width?"expression(this.parentNode.offsetWidth+'px')":b(c.width))+";height:"+("auto"==c.height?"expression(this.parentNode.offsetHeight+'px')":b(c.height))+';"/>';return this.each(function(){0===a(this).children("iframe.bgiframe").length&&this.insertBefore(document.createElement(d),this.firstChild)})}:function(){return this},a.fn.bgIframe=a.fn.bgiframe}(jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){function b(a){return a&&a.constructor===Number?a+"px":a}a.fn.bgiframe=a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(c){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:!0,src:"javascript:false;"},c);var d='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==!1?"filter:Alpha(Opacity='0');":"")+"top:"+("auto"==c.top?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(c.top))+";left:"+("auto"==c.left?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(c.left))+";width:"+("auto"==c.width?"expression(this.parentNode.offsetWidth+'px')":b(c.width))+";height:"+("auto"==c.height?"expression(this.parentNode.offsetHeight+'px')":b(c.height))+';"/>';return this.each(function(){0===a(this).children("iframe.bgiframe").length&&this.insertBefore(document.createElement(d),this.firstChild)})}:function(){return this},a.fn.bgIframe=a.fn.bgiframe}(jQuery);
bp-core/deprecated/js/autocomplete/jquery.dimensions.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){a.dimensions={version:"@VERSION"},a.each(["Height","Width"],function(c,d){a.fn["inner"+d]=function(){if(this[0]){var a="Height"==d?"Top":"Left",c="Height"==d?"Bottom":"Right";return this[d.toLowerCase()]()+b(this,"padding"+a)+b(this,"padding"+c)}},a.fn["outer"+d]=function(c){if(this[0]){var e="Height"==d?"Top":"Left",f="Height"==d?"Bottom":"Right";return c=a.extend({margin:!1},c||{}),this[d.toLowerCase()]()+b(this,"border"+e+"Width")+b(this,"border"+f+"Width")+b(this,"padding"+e)+b(this,"padding"+f)+(c.margin?b(this,"margin"+e)+b(this,"margin"+f):0)}}}),a.each(["Left","Top"],function(b,c){a.fn["scroll"+c]=function(b){return this[0]?void 0!=b?this.each(function(){this==window||this==document?window.scrollTo("Left"==c?b:a(window).scrollLeft(),"Top"==c?b:a(window).scrollTop()):this["scroll"+c]=b}):this[0]==window||this[0]==document?self["Left"==c?"pageXOffset":"pageYOffset"]||a.boxModel&&document.documentElement["scroll"+c]||document.body["scroll"+c]:this[0]["scroll"+c]:void 0}}),a.fn.extend({position:function(){var a,c,d,e,f=this[0];return f&&(d=this.offsetParent(),a=this.offset(),c=d.offset(),a.top-=b(f,"marginTop"),a.left-=b(f,"marginLeft"),c.top+=b(d,"borderTopWidth"),c.left+=b(d,"borderLeftWidth"),e={top:a.top-c.top,left:a.left-c.left}),e},offsetParent:function(){for(var b=this[0].offsetParent;b&&!/^body|html#x2F;i.test(b.tagName)&&"static"==a.css(b,"position");)b=b.offsetParent;return a(b)}});var b=function(b,c){return parseInt(a.css(b.jquery?b[0]:b,c))||0}}(jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){a.dimensions={version:"@VERSION"},a.each(["Height","Width"],function(c,d){a.fn["inner"+d]=function(){if(this[0]){var a="Height"==d?"Top":"Left",c="Height"==d?"Bottom":"Right";return this[d.toLowerCase()]()+b(this,"padding"+a)+b(this,"padding"+c)}},a.fn["outer"+d]=function(c){if(this[0]){var e="Height"==d?"Top":"Left",f="Height"==d?"Bottom":"Right";return c=a.extend({margin:!1},c||{}),this[d.toLowerCase()]()+b(this,"border"+e+"Width")+b(this,"border"+f+"Width")+b(this,"padding"+e)+b(this,"padding"+f)+(c.margin?b(this,"margin"+e)+b(this,"margin"+f):0)}}}),a.each(["Left","Top"],function(b,c){a.fn["scroll"+c]=function(b){return this[0]?void 0!=b?this.each(function(){this==window||this==document?window.scrollTo("Left"==c?b:a(window).scrollLeft(),"Top"==c?b:a(window).scrollTop()):this["scroll"+c]=b}):this[0]==window||this[0]==document?self["Left"==c?"pageXOffset":"pageYOffset"]||a.boxModel&&document.documentElement["scroll"+c]||document.body["scroll"+c]:this[0]["scroll"+c]:void 0}}),a.fn.extend({position:function(){var a,c,d,e,f=this[0];return f&&(d=this.offsetParent(),a=this.offset(),c=d.offset(),a.top-=b(f,"marginTop"),a.left-=b(f,"marginLeft"),c.top+=b(d,"borderTopWidth"),c.left+=b(d,"borderLeftWidth"),e={top:a.top-c.top,left:a.left-c.left}),e},offsetParent:function(){for(var b=this[0].offsetParent;b&&!/^body|html#x2F;i.test(b.tagName)&&"static"==a.css(b,"position");)b=b.offsetParent;return a(b)}});var b=function(b,c){return parseInt(a.css(b.jquery?b[0]:b,c))||0}}(jQuery);
bp-core/js/avatar.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
window.bp=window.bp||{},function(a,b){"undefined"!=typeof BP_Uploader&&(bp.Models=bp.Models||{},bp.Collections=bp.Collections||{},bp.Views=bp.Views||{},bp.Avatar={start:function(){this.removeLegacyUI(),this.views=new Backbone.Collection,this.jcropapi={},this.warning=null,this.setupNav(),this.avatars=bp.Uploader.filesUploaded,bp.Uploader.filesQueue.on("reset",this.cropView,this),b("body.wp-admin").on("tb_unload","#TB_window",function(){bp.Avatar.nav.trigger("bp-avatar-view:changed","upload"),_.each(bp.Avatar.navItems.models,function(a){a.set("upload"===a.id?{active:1}:{active:0})})})},removeLegacyUI:function(){b("#avatar-upload-form").length?(b("#avatar-upload").remove(),b("#avatar-upload-form p").remove()):b("#group-settings-form").length?(b("#group-settings-form p").each(function(a){0!==a&&b(this).remove()}),b("#delete-group-avatar-button").length&&b("#delete-group-avatar-button").remove()):b("#group-create-body").length?(b(".main-column p #file").remove(),b(".main-column p #upload").remove()):b("#bp_xprofile_user_admin_avatar a.bp-xprofile-avatar-user-admin").length&&b("#bp_xprofile_user_admin_avatar a.bp-xprofile-avatar-user-admin").remove()},setView:function(a){switch(_.isUndefined(this.views.models)||_.each(this.views.models,function(a){a.get("view").remove()},this),this.views.reset(),_.isUndefined(this.avatars)||this.avatars.reset(),_.isEmpty(this.jcropapi)||(this.jcropapi.destroy(),this.jcropapi={}),a){case"upload":this.uploaderView();break;case"delete":this.deleteView()}},setupNav:function(){var a,b,c=this;this.navItems=new Backbone.Collection,_.each(BP_Uploader.settings.nav,function(d,e){_.isObject(d)&&(b=0,0===e&&(a=d.id,b=1),c.navItems.add({id:d.id,name:d.caption,href:"#",active:b,hide:_.isUndefined(d.hide)?0:d.hide}))}),this.nav=new bp.Views.Nav({collection:this.navItems}),this.nav.inject(".bp-avatar-nav"),this.setView(a),this.nav.on("bp-avatar-view:changed",_.bind(this.setView,this))},uploaderView:function(){bp.Uploader.filesQueue.on("add",this.uploadProgress,this);var a=new bp.Views.Uploader;this.views.add({id:"upload",view:a}),a.inject(".bp-avatar")},uploadProgress:function(){var a=new bp.Views.uploaderStatus({collection:bp.Uploader.filesQueue});_.isUndefined(this.views.get("status"))?this.views.add({id:"status",view:a}):this.views.set({id:"status",view:a}),a.inject(".bp-avatar-status")},cropView:function(){var a;if(!_.isEmpty(this.avatars.models)){_.isUndefined(this.views.get("status"))||(a=this.views.get("status"),a.get("view").remove(),this.views.remove({id:"status",view:a}));var b=new bp.Views.Avatars({collection:this.avatars});this.views.add({id:"crop",view:b}),b.inject(".bp-avatar")}},setAvatar:function(a){var c,d=this;_.isUndefined(this.views.get("crop"))||(_.isEmpty(this.jcropapi)||(this.jcropapi.destroy(),this.jcropapi={}),c=this.views.get("crop"),c.get("view").remove(),this.views.remove({id:"crop",view:c})),bp.ajax.post("bp_avatar_set",{json:!0,original_file:a.get("url"),crop_w:a.get("w"),crop_h:a.get("h"),crop_x:a.get("x"),crop_y:a.get("y"),item_id:a.get("item_id"),object:a.get("object"),type:_.isUndefined(a.get("type"))?"crop":a.get("type"),nonce:a.get("nonces").set}).done(function(c){var e=new bp.Views.AvatarStatus({value:BP_Uploader.strings.feedback_messages[c.feedback_code],type:"success"});d.views.add({id:"status",view:e}),e.inject(".bp-avatar-status"),b("."+a.get("object")+"-"+c.item_id+"-avatar").each(function(){b(this).prop("src",c.avatar)}),bp.Avatar.navItems.get("delete").set({hide:0})}).fail(function(a){var b=BP_Uploader.strings.default_error;_.isUndefined(a)||(b=BP_Uploader.strings.feedback_messages[a.feedback_code]);var c=new bp.Views.AvatarStatus({value:b,type:"error"});d.views.add({id:"status",view:c}),c.inject(".bp-avatar-status")})},deleteView:function(){var a=new Backbone.Model(_.pick(BP_Uploader.settings.defaults.multipart_params.bp_params,"object","item_id","nonces")),b=new bp.Views.DeleteAvatar({model:a});this.views.add({id:"delete",view:b}),b.inject(".bp-avatar")},deleteAvatar:function(a){var c,d=this;_.isUndefined(this.views.get("delete"))||(c=this.views.get("delete"),c.get("view").remove(),this.views.remove({id:"delete",view:c})),bp.ajax.post("bp_avatar_delete",{json:!0,item_id:a.get("item_id"),object:a.get("object"),nonce:a.get("nonces").remove}).done(function(c){var e=new bp.Views.AvatarStatus({value:BP_Uploader.strings.feedback_messages[c.feedback_code],type:"success"});d.views.add({id:"status",view:e}),e.inject(".bp-avatar-status"),b("."+a.get("object")+"-"+c.item_id+"-avatar").each(function(){b(this).prop("src",c.avatar)}),bp.Avatar.navItems.get("delete").set({active:0,hide:1})}).fail(function(a){var b=BP_Uploader.strings.default_error;_.isUndefined(a)||(b=BP_Uploader.strings.feedback_messages[a.feedback_code]);var c=new bp.Views.AvatarStatus({value:b,type:"error"});d.views.add({id:"status",view:c}),c.inject(".bp-avatar-status")})},removeWarning:function(){_.isNull(this.warning)||this.warning.remove()},displayWarning:function(a){this.removeWarning(),this.warning=new bp.Views.uploaderWarning({value:a}),this.warning.inject(".bp-avatar-status")}},bp.Views.Nav=bp.View.extend({tagName:"ul",className:"avatar-nav-items",events:{"click .bp-avatar-nav-item":"toggleView"},initialize:function(){var a=_.findWhere(this.collection.models,{id:"delete"});1!==a.get("hide")&&bp.Avatar.displayWarning(BP_Uploader.strings.has_avatar_warning),_.each(this.collection.models,this.addNavItem,this),this.collection.on("change:hide",this.showHideNavItem,this)},addNavItem:function(a){1!==a.get("hide")&&this.views.add(new bp.Views.NavItem({model:a}))},showHideNavItem:function(a){var b=null;_.each(this.views._views[""],function(c){1===c.model.get("hide")&&c.remove(),a.get("id")===c.model.get("id")&&(b=!0)}),_.isBoolean(b)||this.addNavItem(a)},toggleView:function(a){a.preventDefault(),bp.Avatar.removeWarning();var c=b(a.target).data("nav");_.each(this.collection.models,function(a){a.id===c?(a.set({active:1}),this.trigger("bp-avatar-view:changed",a.id)):a.set({active:0})},this)}}),bp.Views.NavItem=bp.View.extend({tagName:"li",className:"avatar-nav-item",template:bp.template("bp-avatar-nav"),initialize:function(){1===this.model.get("active")&&(this.el.className+=" current"),this.el.id+="bp-avatar-"+this.model.get("id"),this.model.on("change:active",this.setCurrentNav,this)},setCurrentNav:function(a){1===a.get("active")?this.$el.addClass("current"):this.$el.removeClass("current")}}),bp.Views.Avatars=bp.View.extend({className:"items",initialize:function(){_.each(this.collection.models,this.addItemView,this)},addItemView:function(a){var b={full_h:150,full_w:150};_.isUndefined(BP_Uploader.settings.crop.full_h)||_.isUndefined(BP_Uploader.settings.crop.full_w)||(b.full_h=BP_Uploader.settings.crop.full_h,b.full_w=BP_Uploader.settings.crop.full_w),a.set(_.extend(_.pick(BP_Uploader.settings.defaults.multipart_params.bp_params,"object","item_id","nonces"),b)),this.views.add(new bp.Views.Avatar({model:a}))}}),bp.Views.Avatar=bp.View.extend({className:"item",template:bp.template("bp-avatar-item"),events:{"click .avatar-crop-submit":"cropAvatar"},initialize:function(){_.defaults(this.options,{full_h:BP_Uploader.settings.crop.full_h,full_w:BP_Uploader.settings.crop.full_w,aspectRatio:1}),!1!==this.model.get("feedback")&&bp.Avatar.displayWarning(this.model.get("feedback")),this.on("ready",this.initCropper)},initCropper:function(){var a,c,d,e,f,g,h=this,i=this.$el.find("#avatar-to-crop img"),j=this.$el.width(),k={};_.isUndefined(this.options.full_h)||_.isUndefined(this.options.full_w)||(this.options.aspectRatio=this.options.full_h/this.options.full_w),k.w=this.model.get("width"),k.h=this.model.get("height"),this.options.full_w+k.w+20<j&&(b("#avatar-to-crop").addClass("adjust"),this.$el.find(".avatar-crop-management").addClass("adjust")),k.h<=k.w?(a=Math.round(k.h/4),f=g=Math.round(k.h/2),c=f+a,d=(k.w-g)/2,e=g+d):(d=Math.round(k.w/4),f=g=Math.round(k.w/2),e=g+d,a=(k.h-f)/2,c=f+a),i.Jcrop({onChange:_.bind(h.showPreview,h),onSelect:_.bind(h.showPreview,h),aspectRatio:h.options.aspectRatio,setSelect:[d,a,e,c]},function(){bp.Avatar.jcropapi=this})},cropAvatar:function(a){a.preventDefault(),bp.Avatar.setAvatar(this.model)},showPreview:function(a){if(a.w&&a.h&&parseInt(a.w,10)>0){var c=this.options.full_w,d=this.options.full_h,e=c/a.w,f=d/a.h;this.model.set({x:a.x,y:a.y,w:a.w,h:a.h}),b("#avatar-crop-preview").css({maxWidth:"none",width:Math.round(e*this.model.get("width"))+"px",height:Math.round(f*this.model.get("height"))+"px",marginLeft:"-"+Math.round(e*this.model.get("x"))+"px",marginTop:"-"+Math.round(f*this.model.get("y"))+"px"})}}}),bp.Views.AvatarStatus=bp.View.extend({tagName:"p",className:"updated",id:"bp-avatar-feedback",initialize:function(){this.el.className+=" "+this.options.type,this.value=this.options.value},render:function(){return this.$el.html(this.value),this}}),bp.Views.DeleteAvatar=bp.View.extend({tagName:"div",id:"bp-delete-avatar-container",template:bp.template("bp-avatar-delete"),events:{"click #bp-delete-avatar":"deleteAvatar"},deleteAvatar:function(a){a.preventDefault(),bp.Avatar.deleteAvatar(this.model)}}),bp.Avatar.start())}(bp,jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
window.bp=window.bp||{},function(a,b){"undefined"!=typeof BP_Uploader&&(bp.Models=bp.Models||{},bp.Collections=bp.Collections||{},bp.Views=bp.Views||{},bp.Avatar={start:function(){this.removeLegacyUI(),this.views=new Backbone.Collection,this.jcropapi={},this.warning=null,this.setupNav(),this.avatars=bp.Uploader.filesUploaded,bp.Uploader.filesQueue.on("reset",this.cropView,this),b("body.wp-admin").on("tb_unload","#TB_window",function(){bp.Avatar.nav.trigger("bp-avatar-view:changed","upload"),_.each(bp.Avatar.navItems.models,function(a){a.set("upload"===a.id?{active:1}:{active:0})})})},removeLegacyUI:function(){b("#avatar-upload-form").length?(b("#avatar-upload").remove(),b("#avatar-upload-form p").remove()):b("#group-settings-form").length?(b("#group-settings-form p").each(function(a){0!==a&&b(this).remove()}),b("#delete-group-avatar-button").length&&b("#delete-group-avatar-button").remove()):b("#group-create-body").length?(b(".main-column p #file").remove(),b(".main-column p #upload").remove()):b("#bp_xprofile_user_admin_avatar a.bp-xprofile-avatar-user-admin").length&&b("#bp_xprofile_user_admin_avatar a.bp-xprofile-avatar-user-admin").remove()},setView:function(a){switch(_.isUndefined(this.views.models)||_.each(this.views.models,function(a){a.get("view").remove()},this),this.views.reset(),_.isUndefined(this.avatars)||this.avatars.reset(),_.isEmpty(this.jcropapi)||(this.jcropapi.destroy(),this.jcropapi={}),a){case"upload":this.uploaderView();break;case"delete":this.deleteView()}},setupNav:function(){var a,b,c=this;this.navItems=new Backbone.Collection,_.each(BP_Uploader.settings.nav,function(d,e){_.isObject(d)&&(b=0,0===e&&(a=d.id,b=1),c.navItems.add({id:d.id,name:d.caption,href:"#",active:b,hide:_.isUndefined(d.hide)?0:d.hide}))}),this.nav=new bp.Views.Nav({collection:this.navItems}),this.nav.inject(".bp-avatar-nav"),this.setView(a),this.nav.on("bp-avatar-view:changed",_.bind(this.setView,this))},uploaderView:function(){bp.Uploader.filesQueue.on("add",this.uploadProgress,this);var a=new bp.Views.Uploader;this.views.add({id:"upload",view:a}),a.inject(".bp-avatar")},uploadProgress:function(){var a=new bp.Views.uploaderStatus({collection:bp.Uploader.filesQueue});_.isUndefined(this.views.get("status"))?this.views.add({id:"status",view:a}):this.views.set({id:"status",view:a}),a.inject(".bp-avatar-status")},cropView:function(){var a;if(!_.isEmpty(this.avatars.models)){_.isUndefined(this.views.get("status"))||(a=this.views.get("status"),a.get("view").remove(),this.views.remove({id:"status",view:a}));var b=new bp.Views.Avatars({collection:this.avatars});this.views.add({id:"crop",view:b}),b.inject(".bp-avatar")}},setAvatar:function(a){var c,d=this;_.isUndefined(this.views.get("crop"))||(_.isEmpty(this.jcropapi)||(this.jcropapi.destroy(),this.jcropapi={}),c=this.views.get("crop"),c.get("view").remove(),this.views.remove({id:"crop",view:c})),bp.ajax.post("bp_avatar_set",{json:!0,original_file:a.get("url"),crop_w:a.get("w"),crop_h:a.get("h"),crop_x:a.get("x"),crop_y:a.get("y"),item_id:a.get("item_id"),object:a.get("object"),type:_.isUndefined(a.get("type"))?"crop":a.get("type"),nonce:a.get("nonces").set}).done(function(c){var e=new bp.Views.AvatarStatus({value:BP_Uploader.strings.feedback_messages[c.feedback_code],type:"success"});d.views.add({id:"status",view:e}),e.inject(".bp-avatar-status"),b("."+a.get("object")+"-"+c.item_id+"-avatar").each(function(){b(this).prop("src",c.avatar)}),bp.Avatar.navItems.get("delete").set({hide:0})}).fail(function(a){var b=BP_Uploader.strings.default_error;_.isUndefined(a)||(b=BP_Uploader.strings.feedback_messages[a.feedback_code]);var c=new bp.Views.AvatarStatus({value:b,type:"error"});d.views.add({id:"status",view:c}),c.inject(".bp-avatar-status")})},deleteView:function(){var a=new Backbone.Model(_.pick(BP_Uploader.settings.defaults.multipart_params.bp_params,"object","item_id","nonces")),b=new bp.Views.DeleteAvatar({model:a});this.views.add({id:"delete",view:b}),b.inject(".bp-avatar")},deleteAvatar:function(a){var c,d=this;_.isUndefined(this.views.get("delete"))||(c=this.views.get("delete"),c.get("view").remove(),this.views.remove({id:"delete",view:c})),bp.ajax.post("bp_avatar_delete",{json:!0,item_id:a.get("item_id"),object:a.get("object"),nonce:a.get("nonces").remove}).done(function(c){var e=new bp.Views.AvatarStatus({value:BP_Uploader.strings.feedback_messages[c.feedback_code],type:"success"});d.views.add({id:"status",view:e}),e.inject(".bp-avatar-status"),b("."+a.get("object")+"-"+c.item_id+"-avatar").each(function(){b(this).prop("src",c.avatar)}),bp.Avatar.navItems.get("delete").set({active:0,hide:1})}).fail(function(a){var b=BP_Uploader.strings.default_error;_.isUndefined(a)||(b=BP_Uploader.strings.feedback_messages[a.feedback_code]);var c=new bp.Views.AvatarStatus({value:b,type:"error"});d.views.add({id:"status",view:c}),c.inject(".bp-avatar-status")})},removeWarning:function(){_.isNull(this.warning)||this.warning.remove()},displayWarning:function(a){this.removeWarning(),this.warning=new bp.Views.uploaderWarning({value:a}),this.warning.inject(".bp-avatar-status")}},bp.Views.Nav=bp.View.extend({tagName:"ul",className:"avatar-nav-items",events:{"click .bp-avatar-nav-item":"toggleView"},initialize:function(){var a=_.findWhere(this.collection.models,{id:"delete"});1!==a.get("hide")&&bp.Avatar.displayWarning(BP_Uploader.strings.has_avatar_warning),_.each(this.collection.models,this.addNavItem,this),this.collection.on("change:hide",this.showHideNavItem,this)},addNavItem:function(a){1!==a.get("hide")&&this.views.add(new bp.Views.NavItem({model:a}))},showHideNavItem:function(a){var b=null;_.each(this.views._views[""],function(c){1===c.model.get("hide")&&c.remove(),a.get("id")===c.model.get("id")&&(b=!0)}),_.isBoolean(b)||this.addNavItem(a)},toggleView:function(a){a.preventDefault(),bp.Avatar.removeWarning();var c=b(a.target).data("nav");_.each(this.collection.models,function(a){a.id===c?(a.set({active:1}),this.trigger("bp-avatar-view:changed",a.id)):a.set({active:0})},this)}}),bp.Views.NavItem=bp.View.extend({tagName:"li",className:"avatar-nav-item",template:bp.template("bp-avatar-nav"),initialize:function(){1===this.model.get("active")&&(this.el.className+=" current"),this.el.id+="bp-avatar-"+this.model.get("id"),this.model.on("change:active",this.setCurrentNav,this)},setCurrentNav:function(a){1===a.get("active")?this.$el.addClass("current"):this.$el.removeClass("current")}}),bp.Views.Avatars=bp.View.extend({className:"items",initialize:function(){_.each(this.collection.models,this.addItemView,this)},addItemView:function(a){var b={full_h:150,full_w:150};_.isUndefined(BP_Uploader.settings.crop.full_h)||_.isUndefined(BP_Uploader.settings.crop.full_w)||(b.full_h=BP_Uploader.settings.crop.full_h,b.full_w=BP_Uploader.settings.crop.full_w),a.set(_.extend(_.pick(BP_Uploader.settings.defaults.multipart_params.bp_params,"object","item_id","nonces"),b)),this.views.add(new bp.Views.Avatar({model:a}))}}),bp.Views.Avatar=bp.View.extend({className:"item",template:bp.template("bp-avatar-item"),events:{"click .avatar-crop-submit":"cropAvatar"},initialize:function(){_.defaults(this.options,{full_h:BP_Uploader.settings.crop.full_h,full_w:BP_Uploader.settings.crop.full_w,aspectRatio:1}),!1!==this.model.get("feedback")&&bp.Avatar.displayWarning(this.model.get("feedback")),this.on("ready",this.initCropper)},initCropper:function(){var a,c,d,e,f,g,h=this,i=this.$el.find("#avatar-to-crop img"),j=this.$el.width(),k={};_.isUndefined(this.options.full_h)||_.isUndefined(this.options.full_w)||(this.options.aspectRatio=this.options.full_h/this.options.full_w),k.w=this.model.get("width"),k.h=this.model.get("height"),this.options.full_w+k.w+20<j&&(b("#avatar-to-crop").addClass("adjust"),this.$el.find(".avatar-crop-management").addClass("adjust")),k.h<=k.w?(a=Math.round(k.h/4),f=g=Math.round(k.h/2),c=f+a,d=(k.w-g)/2,e=g+d):(d=Math.round(k.w/4),f=g=Math.round(k.w/2),e=g+d,a=(k.h-f)/2,c=f+a),i.Jcrop({onChange:_.bind(h.showPreview,h),onSelect:_.bind(h.showPreview,h),aspectRatio:h.options.aspectRatio,setSelect:[d,a,e,c]},function(){bp.Avatar.jcropapi=this})},cropAvatar:function(a){a.preventDefault(),bp.Avatar.setAvatar(this.model)},showPreview:function(a){if(a.w&&a.h&&parseInt(a.w,10)>0){var c=this.options.full_w,d=this.options.full_h,e=c/a.w,f=d/a.h;this.model.set({x:a.x,y:a.y,w:a.w,h:a.h}),b("#avatar-crop-preview").css({maxWidth:"none",width:Math.round(e*this.model.get("width"))+"px",height:Math.round(f*this.model.get("height"))+"px",marginLeft:"-"+Math.round(e*this.model.get("x"))+"px",marginTop:"-"+Math.round(f*this.model.get("y"))+"px"})}}}),bp.Views.AvatarStatus=bp.View.extend({tagName:"p",className:"updated",id:"bp-avatar-feedback",initialize:function(){this.el.className+=" "+this.options.type,this.value=this.options.value},render:function(){return this.$el.html(this.value),this}}),bp.Views.DeleteAvatar=bp.View.extend({tagName:"div",id:"bp-delete-avatar-container",template:bp.template("bp-avatar-delete"),events:{"click #bp-delete-avatar":"deleteAvatar"},deleteAvatar:function(a){a.preventDefault(),bp.Avatar.deleteAvatar(this.model)}}),bp.Avatar.start())}(bp,jQuery);
bp-core/js/bp-plupload.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
window.wp=window.wp||{},window.bp=window.bp||window.wp,function(a,b){"undefined"!=typeof BP_Uploader&&(bp.Models=bp.Models||{},bp.Collections=bp.Collections||{},bp.Views=bp.Views||{},bp.Uploader={},bp.Uploader.uploader=function(){var a=this,c=-1!==navigator.userAgent.indexOf("Trident/")||-1!==navigator.userAgent.indexOf("MSIE ");return this.params=BP_Uploader.settings,this.strings=BP_Uploader.strings,this.supports={upload:this.params.browser.supported},this.supported=this.supports.upload,this.supported?(c||"flash"!==plupload.predictRuntime(this.params.defaults)||this.params.defaults.required_features&&this.params.defaults.required_features.hasOwnProperty("send_binary_string")||(this.params.defaults.required_features=this.params.defaults.required_features||{},this.params.defaults.required_features.send_binary_string=!0),this.uploader=new plupload.Uploader(this.params.defaults),this.uploader.bind("Init",function(c){var d=b("#"+a.params.defaults.container),e=b("#"+a.params.defaults.drop_element);"html4"===c.runtime&&(c.settings.multipart_params.html4=!0),c.features.dragdrop&&!a.params.browser.mobile?(d.addClass("drag-drop"),e.bind("dragover.wp-uploader",function(){d.addClass("drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){d.removeClass("drag-over")})):(d.removeClass("drag-drop"),e.unbind(".wp-uploader"))}),this.uploader.init(),this.feedback=function(a,b,c){!_.isNull(c)&&c.item&&c.item.clear(),bp.Uploader.filesError.unshift({message:a,data:b,file:c})},this.uploader.bind("FilesAdded",function(c,d){var e=104857600,f=parseInt(c.settings.max_file_size,10),g=this;if(!c.settings.multi_selection&&d.length>1){for(var h in d)c.removeFile(d[h]);return void b(a).trigger("bp-uploader-warning",a.strings.unique_file_warning)}_.each(d,function(a){var b;plupload.FAILED!==a.status&&(f>e&&a.size>e&&"html5"!==c.runtime?g.uploadSizeError(c,a,!0):(b=_.extend({id:a.id,file:a,uploading:!0,date:new Date,filename:a.name},_.pick(a,"loaded","size","percent")),a.item=new bp.Models.File(b),bp.Uploader.filesQueue.add(a.item)))}),c.refresh(),c.start()}),this.uploader.bind("UploadProgress",function(a,b){b.item.set(_.pick(b,"loaded","percent"))}),this.uploader.bind("FileUploaded",function(b,c,d){var e=a.strings.default_error;try{d=JSON.parse(d.response)}catch(f){return a.feedback(e,f,c)}return!_.isObject(d)||_.isUndefined(d.success)?a.feedback(e,null,c):d.success?(_.each(["file","loaded","size","percent"],function(a){c.item.unset(a)}),c.item.set(_.extend(d.data,{uploading:!1})),void bp.Uploader.filesUploaded.add(c.item)):(d.data&&d.data.message&&(e=d.data.message),a.feedback(e,d.data,c))}),this.uploader.bind("BeforeUpload",function(c,d){b(a).trigger("bp-uploader-new-upload",c,d)}),this.uploader.bind("UploadComplete",function(c,d){b(a).trigger("bp-uploader-upload-complete",c,d),bp.Uploader.filesQueue.reset()}),void this.uploader.bind("Error",function(c,d){var e,f=a.strings.default_error,g={FAILED:a.strings.upload_failed,FILE_EXTENSION_ERROR:a.strings.invalid_filetype,IMAGE_FORMAT_ERROR:a.strings.not_an_image,IMAGE_MEMORY_ERROR:a.strings.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:a.strings.image_dimensions_exceeded,GENERIC_ERROR:a.strings.upload_failed,IO_ERROR:a.strings.io_error,HTTP_ERROR:a.strings.http_error,SECURITY_ERROR:a.strings.security_error,FILE_SIZE_ERROR:a.strings.file_exceeds_size_limit.replace("%s",d.file.name)};for(e in g)if(d.code===plupload[e]){f=g[e];break}b(a).trigger("bp-uploader-warning",f),c.refresh()})):void(BP_Uploader=void 0)},bp.Models.File=Backbone.Model.extend({file:{}}),b.extend(bp.Uploader,{filesQueue:new Backbone.Collection,filesUploaded:new Backbone.Collection,filesError:new Backbone.Collection}),bp.View=bp.Backbone.View.extend({inject:function(a){this.render(),b(a).html(this.el),this.views.ready()},prepare:function(){return!_.isUndefined(this.model)&&_.isFunction(this.model.toJSON)?this.model.toJSON():{}}}),bp.Views.Uploader=bp.View.extend({className:"bp-uploader-window",template:bp.template("upload-window"),defaults:_.pick(BP_Uploader.settings.defaults,"container","drop_element","browse_button"),initialize:function(){this.warning=null,this.model=new Backbone.Model(this.defaults),this.on("ready",this.initUploader)},initUploader:function(){this.uploader=new bp.Uploader.uploader,b(this.uploader).on("bp-uploader-warning",_.bind(this.setWarning,this)),b(this.uploader).on("bp-uploader-new-upload",_.bind(this.resetWarning,this))},setWarning:function(a,b){_.isUndefined(b)||(this.warning=new bp.Views.uploaderWarning({value:b}).render(),this.$el.after(this.warning.el))},resetWarning:function(){_.isNull(this.warning)||(this.warning.remove(),this.warning=null)}}),bp.Views.uploaderWarning=bp.View.extend({tagName:"p",className:"warning",id:"bp-uploader-warning",initialize:function(){this.value=this.options.value},render:function(){return this.$el.html(this.value),this}}),bp.Views.uploaderStatus=bp.View.extend({className:"files",initialize:function(){_.each(this.collection.models,this.addFile,this),this.collection.on("change:percent",this.progress,this),bp.Uploader.filesError.on("add",this.feedback,this)},addFile:function(a){this.views.add(new bp.Views.uploaderProgress({model:a}))},progress:function(a){_.isUndefined(a.get("percent"))||b("#"+a.get("id")+" .bp-progress .bp-bar").css("width",a.get("percent")+"%")},feedback:function(a){_.isUndefined(a.get("message"))||_.isUndefined(a.get("file"))||b("#"+a.get("file").id).html(a.get("message")).addClass("error")}}),bp.Views.uploaderProgress=bp.View.extend({className:"bp-uploader-progress",template:bp.template("progress-window")}))}(bp,jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
window.wp=window.wp||{},window.bp=window.bp||window.wp,function(a,b){"undefined"!=typeof BP_Uploader&&(bp.Models=bp.Models||{},bp.Collections=bp.Collections||{},bp.Views=bp.Views||{},bp.Uploader={},bp.Uploader.uploader=function(){var a=this,c=-1!==navigator.userAgent.indexOf("Trident/")||-1!==navigator.userAgent.indexOf("MSIE ");return this.params=BP_Uploader.settings,this.strings=BP_Uploader.strings,this.supports={upload:this.params.browser.supported},this.supported=this.supports.upload,this.supported?(c||"flash"!==plupload.predictRuntime(this.params.defaults)||this.params.defaults.required_features&&this.params.defaults.required_features.hasOwnProperty("send_binary_string")||(this.params.defaults.required_features=this.params.defaults.required_features||{},this.params.defaults.required_features.send_binary_string=!0),this.uploader=new plupload.Uploader(this.params.defaults),this.uploader.bind("Init",function(c){var d=b("#"+a.params.defaults.container),e=b("#"+a.params.defaults.drop_element);"html4"===c.runtime&&(c.settings.multipart_params.html4=!0),c.features.dragdrop&&!a.params.browser.mobile?(d.addClass("drag-drop"),e.bind("dragover.wp-uploader",function(){d.addClass("drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){d.removeClass("drag-over")})):(d.removeClass("drag-drop"),e.unbind(".wp-uploader"))}),this.uploader.init(),this.feedback=function(a,b,c){!_.isNull(c)&&c.item&&c.item.clear(),bp.Uploader.filesError.unshift({message:a,data:b,file:c})},this.uploader.bind("FilesAdded",function(c,d){var e=104857600,f=parseInt(c.settings.max_file_size,10),g=this;if(!c.settings.multi_selection&&d.length>1){for(var h in d)c.removeFile(d[h]);return void b(a).trigger("bp-uploader-warning",a.strings.unique_file_warning)}_.each(d,function(a){var b;plupload.FAILED!==a.status&&(f>e&&a.size>e&&"html5"!==c.runtime?g.uploadSizeError(c,a,!0):(b=_.extend({id:a.id,file:a,uploading:!0,date:new Date,filename:a.name},_.pick(a,"loaded","size","percent")),a.item=new bp.Models.File(b),bp.Uploader.filesQueue.add(a.item)))}),c.refresh(),c.start()}),this.uploader.bind("UploadProgress",function(a,b){b.item.set(_.pick(b,"loaded","percent"))}),this.uploader.bind("FileUploaded",function(b,c,d){var e=a.strings.default_error;try{d=JSON.parse(d.response)}catch(f){return a.feedback(e,f,c)}return!_.isObject(d)||_.isUndefined(d.success)?a.feedback(e,null,c):d.success?(_.each(["file","loaded","size","percent"],function(a){c.item.unset(a)}),c.item.set(_.extend(d.data,{uploading:!1})),void bp.Uploader.filesUploaded.add(c.item)):(d.data&&d.data.message&&(e=d.data.message),a.feedback(e,d.data,c))}),this.uploader.bind("BeforeUpload",function(c,d){b(a).trigger("bp-uploader-new-upload",c,d)}),this.uploader.bind("UploadComplete",function(c,d){b(a).trigger("bp-uploader-upload-complete",c,d),bp.Uploader.filesQueue.reset()}),void this.uploader.bind("Error",function(c,d){var e,f=a.strings.default_error,g={FAILED:a.strings.upload_failed,FILE_EXTENSION_ERROR:a.strings.invalid_filetype,IMAGE_FORMAT_ERROR:a.strings.not_an_image,IMAGE_MEMORY_ERROR:a.strings.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:a.strings.image_dimensions_exceeded,GENERIC_ERROR:a.strings.upload_failed,IO_ERROR:a.strings.io_error,HTTP_ERROR:a.strings.http_error,SECURITY_ERROR:a.strings.security_error,FILE_SIZE_ERROR:a.strings.file_exceeds_size_limit.replace("%s",d.file.name)};for(e in g)if(d.code===plupload[e]){f=g[e];break}b(a).trigger("bp-uploader-warning",f),c.refresh()})):void(BP_Uploader=void 0)},bp.Models.File=Backbone.Model.extend({file:{}}),b.extend(bp.Uploader,{filesQueue:new Backbone.Collection,filesUploaded:new Backbone.Collection,filesError:new Backbone.Collection}),bp.View=bp.Backbone.View.extend({inject:function(a){this.render(),b(a).html(this.el),this.views.ready()},prepare:function(){return!_.isUndefined(this.model)&&_.isFunction(this.model.toJSON)?this.model.toJSON():{}}}),bp.Views.Uploader=bp.View.extend({className:"bp-uploader-window",template:bp.template("upload-window"),defaults:_.pick(BP_Uploader.settings.defaults,"container","drop_element","browse_button"),initialize:function(){this.warning=null,this.model=new Backbone.Model(this.defaults),this.on("ready",this.initUploader)},initUploader:function(){this.uploader=new bp.Uploader.uploader,b(this.uploader).on("bp-uploader-warning",_.bind(this.setWarning,this)),b(this.uploader).on("bp-uploader-new-upload",_.bind(this.resetWarning,this))},setWarning:function(a,b){_.isUndefined(b)||(this.warning=new bp.Views.uploaderWarning({value:b}).render(),this.$el.after(this.warning.el))},resetWarning:function(){_.isNull(this.warning)||(this.warning.remove(),this.warning=null)}}),bp.Views.uploaderWarning=bp.View.extend({tagName:"p",className:"warning",id:"bp-uploader-warning",initialize:function(){this.value=this.options.value},render:function(){return this.$el.html(this.value),this}}),bp.Views.uploaderStatus=bp.View.extend({className:"files",initialize:function(){_.each(this.collection.models,this.addFile,this),this.collection.on("change:percent",this.progress,this),bp.Uploader.filesError.on("add",this.feedback,this)},addFile:function(a){this.views.add(new bp.Views.uploaderProgress({model:a}))},progress:function(a){_.isUndefined(a.get("percent"))||b("#"+a.get("id")+" .bp-progress .bp-bar").css("width",a.get("percent")+"%")},feedback:function(a){_.isUndefined(a.get("message"))||_.isUndefined(a.get("file"))||b("#"+a.get("file").id).html(a.get("message")).addClass("error")}}),bp.Views.uploaderProgress=bp.View.extend({className:"bp-uploader-progress",template:bp.template("progress-window")}))}(bp,jQuery);
bp-core/js/confirm.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
jQuery(document).ready(function(){jQuery("a.confirm").click(function(){return confirm(BP_Confirm.are_you_sure)?!0:!1})});
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
jQuery(document).ready(function(){jQuery("a.confirm").click(function(){return confirm(BP_Confirm.are_you_sure)?!0:!1})});
bp-core/js/jquery-cookie.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
bp-core/js/jquery-query.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function bp_get_querystring(a){var b=location.search.split(a+"=")[1];return b?decodeURIComponent(b.split("&")[0]):null}
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function bp_get_querystring(a){var b=location.search.split(a+"=")[1];return b?decodeURIComponent(b.split("&")[0]):null}
bp-core/js/jquery-scroll-to.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(b){return a.isFunction(b)||"object"==typeof b?b:{top:b,left:b}}var c=a.scrollTo=function(b,c,d){return a(window).scrollTo(b,c,d)};return c.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>=1.3?0:1,limit:!0},c.window=function(){return a(window)._scrollable()},a.fn._scrollable=function(){return this.map(function(){var b=this,c=!b.nodeName||-1!==a.inArray(b.nodeName.toLowerCase(),["iframe","#document","html","body"]);if(!c)return b;var d=(b.contentWindow||b).document||b.ownerDocument||b;return/webkit/i.test(navigator.userAgent)||"BackCompat"===d.compatMode?d.body:d.documentElement})},a.fn.scrollTo=function(d,e,f){return"object"==typeof e&&(f=e,e=0),"function"==typeof f&&(f={onAfter:f}),"max"===d&&(d=9e9),f=a.extend({},c.defaults,f),e=e||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(e/=2),f.offset=b(f.offset),f.over=b(f.over),this._scrollable().each(function(){function g(a){j.animate(l,e,f.easing,a&&function(){a.call(this,k,f)})}if(null!==d){var h,i=this,j=a(i),k=d,l={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?#x2F;.test(k)){k=b(k);break}if(k=m?a(k):a(k,this),!k.length)return;case"object":(k.is||k.style)&&(h=(k=a(k)).offset())}var n=a.isFunction(f.offset)&&f.offset(i,k)||f.offset;a.each(f.axis.split(""),function(a,b){var d="x"===b?"Left":"Top",e=d.toLowerCase(),o="scroll"+d,p=i[o],q=c.max(i,b);if(h)l[o]=h[e]+(m?0:p-j.offset()[e]),f.margin&&(l[o]-=parseInt(k.css("margin"+d))||0,l[o]-=parseInt(k.css("border"+d+"Width"))||0),l[o]+=n[e]||0,f.over[e]&&(l[o]+=k["x"===b?"width":"height"]()*f.over[e]);else{var r=k[e];l[o]=r.slice&&"%"===r.slice(-1)?parseFloat(r)/100*q:r}f.limit&&/^\d+#x2F;.test(l[o])&&(l[o]=l[o]<=0?0:Math.min(l[o],q)),!a&&f.queue&&(p!==l[o]&&g(f.onAfterFirst),delete l[o])}),g(f.onAfter)}}).end()},c.max=function(b,c){var d="x"===c?"Width":"Height",e="scroll"+d;if(!a(b).is("html,body"))return b[e]-a(b)[d.toLowerCase()]();var f="client"+d,g=b.ownerDocument.documentElement,h=b.ownerDocument.body;return Math.max(g[e],h[e])-Math.min(g[f],h[f])},c});
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(b){return a.isFunction(b)||"object"==typeof b?b:{top:b,left:b}}var c=a.scrollTo=function(b,c,d){return a(window).scrollTo(b,c,d)};return c.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>=1.3?0:1,limit:!0},c.window=function(){return a(window)._scrollable()},a.fn._scrollable=function(){return this.map(function(){var b=this,c=!b.nodeName||-1!==a.inArray(b.nodeName.toLowerCase(),["iframe","#document","html","body"]);if(!c)return b;var d=(b.contentWindow||b).document||b.ownerDocument||b;return/webkit/i.test(navigator.userAgent)||"BackCompat"===d.compatMode?d.body:d.documentElement})},a.fn.scrollTo=function(d,e,f){return"object"==typeof e&&(f=e,e=0),"function"==typeof f&&(f={onAfter:f}),"max"===d&&(d=9e9),f=a.extend({},c.defaults,f),e=e||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(e/=2),f.offset=b(f.offset),f.over=b(f.over),this._scrollable().each(function(){function g(a){j.animate(l,e,f.easing,a&&function(){a.call(this,k,f)})}if(null!==d){var h,i=this,j=a(i),k=d,l={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?#x2F;.test(k)){k=b(k);break}if(k=m?a(k):a(k,this),!k.length)return;case"object":(k.is||k.style)&&(h=(k=a(k)).offset())}var n=a.isFunction(f.offset)&&f.offset(i,k)||f.offset;a.each(f.axis.split(""),function(a,b){var d="x"===b?"Left":"Top",e=d.toLowerCase(),o="scroll"+d,p=i[o],q=c.max(i,b);if(h)l[o]=h[e]+(m?0:p-j.offset()[e]),f.margin&&(l[o]-=parseInt(k.css("margin"+d))||0,l[o]-=parseInt(k.css("border"+d+"Width"))||0),l[o]+=n[e]||0,f.over[e]&&(l[o]+=k["x"===b?"width":"height"]()*f.over[e]);else{var r=k[e];l[o]=r.slice&&"%"===r.slice(-1)?parseFloat(r)/100*q:r}f.limit&&/^\d+#x2F;.test(l[o])&&(l[o]=l[o]<=0?0:Math.min(l[o],q)),!a&&f.queue&&(p!==l[o]&&g(f.onAfterFirst),delete l[o])}),g(f.onAfter)}}).end()},c.max=function(b,c){var d="x"===c?"Width":"Height",e="scroll"+d;if(!a(b).is("html,body"))return b[e]-a(b)[d.toLowerCase()]();var f="client"+d,g=b.ownerDocument.documentElement,h=b.ownerDocument.body;return Math.max(g[e],h[e])-Math.min(g[f],h[f])},c});
bp-core/js/jquery.atwho.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){var b,c,d,e,f,g,h,i=[].slice;c=function(){function b(b){this.current_flag=null,this.controllers={},this.alias_maps={},this.$inputor=a(b),this.setIframe(),this.listen()}return b.prototype.createContainer=function(b){return 0===(this.$el=a("#atwho-container",b)).length?a(b.body).append(this.$el=a("<div id='atwho-container'></div>")):void 0},b.prototype.setIframe=function(a,b){var c;return null==b&&(b=!1),a?(this.window=a.contentWindow,this.document=a.contentDocument||this.window.document,this.iframe=a):(this.document=document,this.window=window,this.iframe=null),(this.iframeStandalone=b)?(null!=(c=this.$el)&&c.remove(),this.createContainer(this.document)):this.createContainer(document)},b.prototype.controller=function(a){var b,c,d,e;if(this.alias_maps[a])c=this.controllers[this.alias_maps[a]];else{e=this.controllers;for(d in e)if(b=e[d],d===a){c=b;break}}return c?c:this.controllers[this.current_flag]},b.prototype.set_context_for=function(a){return this.current_flag=a,this},b.prototype.reg=function(a,b){var c,e;return c=(e=this.controllers)[a]||(e[a]=new d(this,a)),b.alias&&(this.alias_maps[b.alias]=a),c.init(b),this},b.prototype.listen=function(){return this.$inputor.on("keyup.atwhoInner",function(a){return function(b){return a.on_keyup(b)}}(this)).on("keydown.atwhoInner",function(a){return function(b){return a.on_keydown(b)}}(this)).on("scroll.atwhoInner",function(a){return function(b){var c;return null!=(c=a.controller())?c.view.hide(b):void 0}}(this)).on("blur.atwhoInner",function(a){return function(b){var c;return(c=a.controller())?c.view.hide(b,c.get_opt("display_timeout")):void 0}}(this)).on("click.atwhoInner",function(a){return function(){return a.dispatch()}}(this))},b.prototype.shutdown=function(){var a,b,c;c=this.controllers;for(b in c)a=c[b],a.destroy(),delete this.controllers[b];return this.$inputor.off(".atwhoInner"),this.$el.remove()},b.prototype.dispatch=function(){return a.map(this.controllers,function(a){return function(b){var c;return(c=b.get_opt("delay"))?(clearTimeout(a.delayedCallback),a.delayedCallback=setTimeout(function(){return b.look_up()?a.set_context_for(b.at):void 0},c)):b.look_up()?a.set_context_for(b.at):void 0}}(this))},b.prototype.on_keyup=function(b){var c;switch(b.keyCode){case f.ESC:b.preventDefault(),null!=(c=this.controller())&&c.view.hide();break;case f.DOWN:case f.UP:case f.CTRL:a.noop();break;case f.P:case f.N:b.ctrlKey||this.dispatch();break;default:this.dispatch()}},b.prototype.on_keydown=function(b){var c,d;if(c=null!=(d=this.controller())?d.view:void 0,c&&c.visible())switch(b.keyCode){case f.ESC:b.preventDefault(),c.hide(b);break;case f.UP:b.preventDefault(),c.prev();break;case f.DOWN:b.preventDefault(),c.next();break;case f.P:if(!b.ctrlKey)return;b.preventDefault(),c.prev();break;case f.N:if(!b.ctrlKey)return;b.preventDefault(),c.next();break;case f.TAB:case f.ENTER:if(!c.visible())return;b.preventDefault(),c.choose(b);break;default:a.noop()}},b}(),d=function(){function b(b,c){this.app=b,this.at=c,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.setting=null,this.query=null,this.pos=0,this.cur_rect=null,this.range=null,0===(this.$el=a("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=a("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new g(this),this.view=new h(this)}return b.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},b.prototype.init=function(b){return this.setting=a.extend({},this.setting||a.fn.atwho["default"],b),this.view.init(),this.model.reload(this.setting.data)},b.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},b.prototype.call_default=function(){var b,c,d;d=arguments[0],b=2<=arguments.length?i.call(arguments,1):[];try{return e[d].apply(this,b)}catch(f){return c=f,a.error(""+c+" Or maybe At.js doesn't have function "+d)}},b.prototype.trigger=function(a,b){var c,d;return null==b&&(b=[]),b.push(this),c=this.get_opt("alias"),d=c?""+a+"-"+c+".atwho":""+a+".atwho",this.$inputor.trigger(d,b)},b.prototype.callbacks=function(a){return this.get_opt("callbacks")[a]||e[a]},b.prototype.get_opt=function(a){var b;try{return this.setting[a]}catch(c){return b=c,null}},b.prototype.content=function(){var a;if(this.$inputor.is("textarea, input"))return this.$inputor.val();if(a=this.mark_range())return(a.startContainer.textContent||"").slice(0,a.startOffset)},b.prototype.catch_query=function(){var a,b,c,d,e,f;return b=this.content(),a=this.$inputor.caret("pos",{iframe:this.app.iframe}),f=b.slice(0,a),d=this.callbacks("matcher").call(this,this.at,f,this.get_opt("start_with_space")),"string"==typeof d&&d.length<=this.get_opt("max_len",20)?(e=a-d.length,c=e+d.length,this.pos=e,d={text:d,head_pos:e,end_pos:c},this.trigger("matched",[this.at,d.text])):(d=null,this.view.hide()),this.query=d},b.prototype.rect=function(){var b,c,d;if(b=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeStandalone&&(c=a(this.app.iframe).offset(),b.left+=c.left,b.top+=c.top),this.$inputor.is("[contentEditable]")&&(b=this.cur_rect||(this.cur_rect=b)),d=this.app.document.selection?0:2,{left:b.left,top:b.top,bottom:b.top+b.height+d}},b.prototype.reset_rect=function(){return this.$inputor.is("[contentEditable]")?this.cur_rect=null:void 0},b.prototype.mark_range=function(){var a;if(this.$inputor.is("[contentEditable]"))return this.app.window.getSelection&&(a=this.app.window.getSelection()).rangeCount>0?this.range=a.getRangeAt(0):this.app.document.selection?this.ie8_range=this.app.document.selection.createRange():void 0},b.prototype.insert_content_for=function(b){var c,d,e;return d=b.data("value"),e=this.get_opt("insert_tpl"),this.$inputor.is("textarea, input")||!e?d:(c=a.extend({},b.data("item-data"),{"atwho-data-value":d,"atwho-at":this.at}),this.callbacks("tpl_eval").call(this,e,c))},b.prototype.insert=function(b){var c,d,e,f,g,h,i,j,k,l,m,n;if(c=this.$inputor,k=this.callbacks("inserting_wrapper").call(this,c,b,this.get_opt("suffix")),c.is("textarea, input"))h=c.val(),i=h.slice(0,Math.max(this.query.head_pos-this.at.length,0)),j=""+i+k+h.slice(this.query.end_pos||0),c.val(j),c.caret("pos",i.length+k.length,{iframe:this.app.iframe});else if(f=this.range){for(e=f.startOffset-(this.query.end_pos-this.query.head_pos)-this.at.length,f.setStart(f.endContainer,Math.max(e,0)),f.setEnd(f.endContainer,f.endOffset),f.deleteContents(),n=a(k,this.app.document),l=0,m=n.length;m>l;l++)d=n[l],f.insertNode(d),f.setEndAfter(d),f.collapse(!1);g=this.app.window.getSelection(),g.removeAllRanges(),g.addRange(f)}else(f=this.ie8_range)&&(f.moveStart("character",this.query.end_pos-this.query.head_pos-this.at.length),f.pasteHTML(k),f.collapse(!1),f.select());return c.is(":focus")||c.focus(),c.change()},b.prototype.render_view=function(a){var b;return b=this.get_opt("search_key"),a=this.callbacks("sorter").call(this,this.query.text,a.slice(0,1001),b),this.view.render(a.slice(0,this.get_opt("limit")))},b.prototype.look_up=function(){var b,c;if(b=this.catch_query())return c=function(a){return a&&a.length>0?this.render_view(a):this.view.hide()},this.model.query(b.text,a.proxy(c,this)),b},b}(),g=function(){function b(a){this.context=a,this.at=this.context.at,this.storage=this.context.$inputor}return b.prototype.destroy=function(){return this.storage.data(this.at,null)},b.prototype.saved=function(){return this.fetch()>0},b.prototype.query=function(a,b){var c,d,e;return c=this.fetch(),d=this.context.get_opt("search_key"),c=this.context.callbacks("filter").call(this.context,a,c,d)||[],e=this.context.callbacks("remote_filter"),c.length>0||!e&&0===c.length?b(c):e.call(this.context,a,b)},b.prototype.fetch=function(){return this.storage.data(this.at)||[]},b.prototype.save=function(a){return this.storage.data(this.at,this.context.callbacks("before_save").call(this.context,a||[]))},b.prototype.load=function(a){return!this.saved()&&a?this._load(a):void 0},b.prototype.reload=function(a){return this._load(a)},b.prototype._load=function(b){return"string"==typeof b?a.ajax(b,{dataType:"json"}).done(function(a){return function(b){return a.save(b)}}(this)):this.save(b)},b}(),h=function(){function b(b){this.context=b,this.$el=a("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.timeout_id=null,this.context.$el.append(this.$el),this.bind_event()}return b.prototype.init=function(){var a;return a=this.context.get_opt("alias")||this.context.at.charCodeAt(0),this.$el.attr({id:"at-view-"+a})},b.prototype.destroy=function(){return this.$el.remove()},b.prototype.bind_event=function(){var b;return b=this.$el.find("ul"),b.on("mouseenter.atwho-view","li",function(c){return b.find(".cur").removeClass("cur"),a(c.currentTarget).addClass("cur")}).on("click.atwho-view","li",function(c){return function(d){return b.find(".cur").removeClass("cur"),a(d.currentTarget).addClass("cur"),c.choose(d),d.preventDefault()}}(this))},b.prototype.visible=function(){return this.$el.is(":visible")},b.prototype.choose=function(a){var b,c;return(b=this.$el.find(".cur")).length&&(c=this.context.insert_content_for(b),this.context.insert(this.context.callbacks("before_insert").call(this.context,c,b),b),this.context.trigger("inserted",[b,a]),this.hide(a)),this.context.get_opt("hide_without_suffix")?this.stop_showing=!0:void 0},b.prototype.reposition=function(b){var c,d,e,f;return f=this.context.app.iframeStandalone?this.context.app.window:window,b.bottom+this.$el.height()-a(f).scrollTop()>a(f).height()&&(b.bottom=b.top-this.$el.height()),b.left>(d=a(f).width()-this.$el.width()-5)&&(b.left=d),c={left:b.left,top:b.bottom},null!=(e=this.context.callbacks("before_reposition"))&&e.call(this.context,c),this.$el.offset(c),this.context.trigger("reposition",[c])},b.prototype.next=function(){var a,b;return a=this.$el.find(".cur").removeClass("cur"),b=a.next(),b.length||(b=this.$el.find("li:first")),b.addClass("cur"),this.$el.animate({scrollTop:Math.max(0,a.innerHeight()*(b.index()+2)-this.$el.height())},150)},b.prototype.prev=function(){var a,b;return a=this.$el.find(".cur").removeClass("cur"),b=a.prev(),b.length||(b=this.$el.find("li:last")),b.addClass("cur"),this.$el.animate({scrollTop:Math.max(0,a.innerHeight()*(b.index()+2)-this.$el.height())},150)},b.prototype.show=function(){var a;return this.stop_showing?void(this.stop_showing=!1):(this.context.mark_range(),this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(a=this.context.rect())?this.reposition(a):void 0)},b.prototype.hide=function(a,b){var c;if(this.visible())return isNaN(b)?(this.context.reset_rect(),this.$el.hide(),this.context.trigger("hidden",[a])):(c=function(a){return function(){return a.hide()}}(this),clearTimeout(this.timeout_id),this.timeout_id=setTimeout(c,b))},b.prototype.render=function(b){var c,d,e,f,g,h,i;if(!(a.isArray(b)&&b.length>0))return void this.hide();for(this.$el.find("ul").empty(),d=this.$el.find("ul"),g=this.context.get_opt("tpl"),h=0,i=b.length;i>h;h++)e=b[h],e=a.extend({},e,{"atwho-at":this.context.at}),f=this.context.callbacks("tpl_eval").call(this.context,g,e),c=a(this.context.callbacks("highlighter").call(this.context,f,this.context.query.text)),c.data("item-data",e),d.append(c);return this.show(),this.context.get_opt("highlight_first")?d.find("li:first").addClass("cur"):void 0},b}(),f={DOWN:40,UP:38,ESC:27,TAB:9,ENTER:13,CTRL:17,P:80,N:78},e={before_save:function(b){var c,d,e,f;if(!a.isArray(b))return b;for(f=[],d=0,e=b.length;e>d;d++)c=b[d],f.push(a.isPlainObject(c)?c:{name:c});return f},matcher:function(a,b,c){var d,e,f,g;return a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\amp;"),c&&(a="(?:^|\\s)"+a),f=decodeURI("%C3%80"),g=decodeURI("%C3%BF"),e=new RegExp(""+a+"([A-Za-z"+f+"-"+g+"0-9_+-]*)$|"+a+"([^\\x00-\\xff]*)quot;,"gi"),d=e.exec(b),d?d[2]||d[1]:null},filter:function(a,b,c){var d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],~new String(d[c]).toLowerCase().indexOf(a.toLowerCase())&&g.push(d);return g},remote_filter:null,sorter:function(a,b,c){var d,e,f,g;if(!a)return b;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],d.atwho_order=new String(d[c]).toLowerCase().indexOf(a.toLowerCase()),d.atwho_order>-1&&g.push(d);return g.sort(function(a,b){return a.atwho_order-b.atwho_order})},tpl_eval:function(a,b){var c;try{return a.replace(/\$\{([^\}]*)\}/g,function(a,c){return b[c]})}catch(d){return c=d,""}},highlighter:function(a,b){var c;return b?(c=new RegExp(">\\s*(\\w*?)("+b.replace("+","\\+")+")(\\w*)\\s*<","ig"),a.replace(c,function(a,b,c,d){return"> "+b+"<strong>"+c+"</strong>"+d+" <"})):a},before_insert:function(a){return a},inserting_wrapper:function(a,b,c){var d;return c=""===c?c:c||" ",a.is("textarea, input")?""+b+c:"true"===a.attr("contentEditable")?(c=" "===c?"&nbsp;":c,/firefox/i.test(navigator.userAgent)?d="<span>"+b+c+"</span>":(c="<span contenteditable='false'>"+c+"</span>",d="<span contenteditable='false'>"+b+c+"</span>"),this.app.document.selection&&(d="<span contenteditable='true'>"+b+"</span>"),d+"<span></span>"):void 0}},b={load:function(a,b){var c;return(c=this.controller(a))?c.model.load(b):void 0},setIframe:function(a,b){return this.setIframe(a,b),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},a.fn.atwho=function(d){var e,f;return f=arguments,e=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var g,h;return(h=(g=a(this)).data("atwho"))||g.data("atwho",h=new c(this)),"object"!=typeof d&&d?b[d]&&h?e=b[d].apply(h,Array.prototype.slice.call(f,1)):a.error("Method "+d+" does not exist on jQuery.caret"):h.reg(d.at,d)}),e||this},a.fn.atwho["default"]={at:void 0,alias:void 0,data:null,tpl:"<li data-value='${atwho-at}${name}'>${name}</li>",insert_tpl:"<span id='${id}'>${atwho-data-value}</span>",callbacks:e,search_key:"name",suffix:void 0,hide_without_suffix:!1,start_with_space:!0,highlight_first:!0,limit:5,max_len:20,display_timeout:300,delay:null}});
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){var b,c,d,e,f,g,h,i=[].slice;c=function(){function b(b){this.current_flag=null,this.controllers={},this.alias_maps={},this.$inputor=a(b),this.setIframe(),this.listen()}return b.prototype.createContainer=function(b){return 0===(this.$el=a("#atwho-container",b)).length?a(b.body).append(this.$el=a("<div id='atwho-container'></div>")):void 0},b.prototype.setIframe=function(a,b){var c;return null==b&&(b=!1),a?(this.window=a.contentWindow,this.document=a.contentDocument||this.window.document,this.iframe=a):(this.document=document,this.window=window,this.iframe=null),(this.iframeStandalone=b)?(null!=(c=this.$el)&&c.remove(),this.createContainer(this.document)):this.createContainer(document)},b.prototype.controller=function(a){var b,c,d,e;if(this.alias_maps[a])c=this.controllers[this.alias_maps[a]];else{e=this.controllers;for(d in e)if(b=e[d],d===a){c=b;break}}return c?c:this.controllers[this.current_flag]},b.prototype.set_context_for=function(a){return this.current_flag=a,this},b.prototype.reg=function(a,b){var c,e;return c=(e=this.controllers)[a]||(e[a]=new d(this,a)),b.alias&&(this.alias_maps[b.alias]=a),c.init(b),this},b.prototype.listen=function(){return this.$inputor.on("keyup.atwhoInner",function(a){return function(b){return a.on_keyup(b)}}(this)).on("keydown.atwhoInner",function(a){return function(b){return a.on_keydown(b)}}(this)).on("scroll.atwhoInner",function(a){return function(b){var c;return null!=(c=a.controller())?c.view.hide(b):void 0}}(this)).on("blur.atwhoInner",function(a){return function(b){var c;return(c=a.controller())?c.view.hide(b,c.get_opt("display_timeout")):void 0}}(this)).on("click.atwhoInner",function(a){return function(){return a.dispatch()}}(this))},b.prototype.shutdown=function(){var a,b,c;c=this.controllers;for(b in c)a=c[b],a.destroy(),delete this.controllers[b];return this.$inputor.off(".atwhoInner"),this.$el.remove()},b.prototype.dispatch=function(){return a.map(this.controllers,function(a){return function(b){var c;return(c=b.get_opt("delay"))?(clearTimeout(a.delayedCallback),a.delayedCallback=setTimeout(function(){return b.look_up()?a.set_context_for(b.at):void 0},c)):b.look_up()?a.set_context_for(b.at):void 0}}(this))},b.prototype.on_keyup=function(b){var c;switch(b.keyCode){case f.ESC:b.preventDefault(),null!=(c=this.controller())&&c.view.hide();break;case f.DOWN:case f.UP:case f.CTRL:a.noop();break;case f.P:case f.N:b.ctrlKey||this.dispatch();break;default:this.dispatch()}},b.prototype.on_keydown=function(b){var c,d;if(c=null!=(d=this.controller())?d.view:void 0,c&&c.visible())switch(b.keyCode){case f.ESC:b.preventDefault(),c.hide(b);break;case f.UP:b.preventDefault(),c.prev();break;case f.DOWN:b.preventDefault(),c.next();break;case f.P:if(!b.ctrlKey)return;b.preventDefault(),c.prev();break;case f.N:if(!b.ctrlKey)return;b.preventDefault(),c.next();break;case f.TAB:case f.ENTER:if(!c.visible())return;b.preventDefault(),c.choose(b);break;default:a.noop()}},b}(),d=function(){function b(b,c){this.app=b,this.at=c,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.setting=null,this.query=null,this.pos=0,this.cur_rect=null,this.range=null,0===(this.$el=a("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=a("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new g(this),this.view=new h(this)}return b.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},b.prototype.init=function(b){return this.setting=a.extend({},this.setting||a.fn.atwho["default"],b),this.view.init(),this.model.reload(this.setting.data)},b.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},b.prototype.call_default=function(){var b,c,d;d=arguments[0],b=2<=arguments.length?i.call(arguments,1):[];try{return e[d].apply(this,b)}catch(f){return c=f,a.error(""+c+" Or maybe At.js doesn't have function "+d)}},b.prototype.trigger=function(a,b){var c,d;return null==b&&(b=[]),b.push(this),c=this.get_opt("alias"),d=c?""+a+"-"+c+".atwho":""+a+".atwho",this.$inputor.trigger(d,b)},b.prototype.callbacks=function(a){return this.get_opt("callbacks")[a]||e[a]},b.prototype.get_opt=function(a){var b;try{return this.setting[a]}catch(c){return b=c,null}},b.prototype.content=function(){var a;if(this.$inputor.is("textarea, input"))return this.$inputor.val();if(a=this.mark_range())return(a.startContainer.textContent||"").slice(0,a.startOffset)},b.prototype.catch_query=function(){var a,b,c,d,e,f;return b=this.content(),a=this.$inputor.caret("pos",{iframe:this.app.iframe}),f=b.slice(0,a),d=this.callbacks("matcher").call(this,this.at,f,this.get_opt("start_with_space")),"string"==typeof d&&d.length<=this.get_opt("max_len",20)?(e=a-d.length,c=e+d.length,this.pos=e,d={text:d,head_pos:e,end_pos:c},this.trigger("matched",[this.at,d.text])):(d=null,this.view.hide()),this.query=d},b.prototype.rect=function(){var b,c,d;if(b=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeStandalone&&(c=a(this.app.iframe).offset(),b.left+=c.left,b.top+=c.top),this.$inputor.is("[contentEditable]")&&(b=this.cur_rect||(this.cur_rect=b)),d=this.app.document.selection?0:2,{left:b.left,top:b.top,bottom:b.top+b.height+d}},b.prototype.reset_rect=function(){return this.$inputor.is("[contentEditable]")?this.cur_rect=null:void 0},b.prototype.mark_range=function(){var a;if(this.$inputor.is("[contentEditable]"))return this.app.window.getSelection&&(a=this.app.window.getSelection()).rangeCount>0?this.range=a.getRangeAt(0):this.app.document.selection?this.ie8_range=this.app.document.selection.createRange():void 0},b.prototype.insert_content_for=function(b){var c,d,e;return d=b.data("value"),e=this.get_opt("insert_tpl"),this.$inputor.is("textarea, input")||!e?d:(c=a.extend({},b.data("item-data"),{"atwho-data-value":d,"atwho-at":this.at}),this.callbacks("tpl_eval").call(this,e,c))},b.prototype.insert=function(b){var c,d,e,f,g,h,i,j,k,l,m,n;if(c=this.$inputor,k=this.callbacks("inserting_wrapper").call(this,c,b,this.get_opt("suffix")),c.is("textarea, input"))h=c.val(),i=h.slice(0,Math.max(this.query.head_pos-this.at.length,0)),j=""+i+k+h.slice(this.query.end_pos||0),c.val(j),c.caret("pos",i.length+k.length,{iframe:this.app.iframe});else if(f=this.range){for(e=f.startOffset-(this.query.end_pos-this.query.head_pos)-this.at.length,f.setStart(f.endContainer,Math.max(e,0)),f.setEnd(f.endContainer,f.endOffset),f.deleteContents(),n=a(k,this.app.document),l=0,m=n.length;m>l;l++)d=n[l],f.insertNode(d),f.setEndAfter(d),f.collapse(!1);g=this.app.window.getSelection(),g.removeAllRanges(),g.addRange(f)}else(f=this.ie8_range)&&(f.moveStart("character",this.query.end_pos-this.query.head_pos-this.at.length),f.pasteHTML(k),f.collapse(!1),f.select());return c.is(":focus")||c.focus(),c.change()},b.prototype.render_view=function(a){var b;return b=this.get_opt("search_key"),a=this.callbacks("sorter").call(this,this.query.text,a.slice(0,1001),b),this.view.render(a.slice(0,this.get_opt("limit")))},b.prototype.look_up=function(){var b,c;if(b=this.catch_query())return c=function(a){return a&&a.length>0?this.render_view(a):this.view.hide()},this.model.query(b.text,a.proxy(c,this)),b},b}(),g=function(){function b(a){this.context=a,this.at=this.context.at,this.storage=this.context.$inputor}return b.prototype.destroy=function(){return this.storage.data(this.at,null)},b.prototype.saved=function(){return this.fetch()>0},b.prototype.query=function(a,b){var c,d,e;return c=this.fetch(),d=this.context.get_opt("search_key"),c=this.context.callbacks("filter").call(this.context,a,c,d)||[],e=this.context.callbacks("remote_filter"),c.length>0||!e&&0===c.length?b(c):e.call(this.context,a,b)},b.prototype.fetch=function(){return this.storage.data(this.at)||[]},b.prototype.save=function(a){return this.storage.data(this.at,this.context.callbacks("before_save").call(this.context,a||[]))},b.prototype.load=function(a){return!this.saved()&&a?this._load(a):void 0},b.prototype.reload=function(a){return this._load(a)},b.prototype._load=function(b){return"string"==typeof b?a.ajax(b,{dataType:"json"}).done(function(a){return function(b){return a.save(b)}}(this)):this.save(b)},b}(),h=function(){function b(b){this.context=b,this.$el=a("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.timeout_id=null,this.context.$el.append(this.$el),this.bind_event()}return b.prototype.init=function(){var a;return a=this.context.get_opt("alias")||this.context.at.charCodeAt(0),this.$el.attr({id:"at-view-"+a})},b.prototype.destroy=function(){return this.$el.remove()},b.prototype.bind_event=function(){var b;return b=this.$el.find("ul"),b.on("mouseenter.atwho-view","li",function(c){return b.find(".cur").removeClass("cur"),a(c.currentTarget).addClass("cur")}).on("click.atwho-view","li",function(c){return function(d){return b.find(".cur").removeClass("cur"),a(d.currentTarget).addClass("cur"),c.choose(d),d.preventDefault()}}(this))},b.prototype.visible=function(){return this.$el.is(":visible")},b.prototype.choose=function(a){var b,c;return(b=this.$el.find(".cur")).length&&(c=this.context.insert_content_for(b),this.context.insert(this.context.callbacks("before_insert").call(this.context,c,b),b),this.context.trigger("inserted",[b,a]),this.hide(a)),this.context.get_opt("hide_without_suffix")?this.stop_showing=!0:void 0},b.prototype.reposition=function(b){var c,d,e,f;return f=this.context.app.iframeStandalone?this.context.app.window:window,b.bottom+this.$el.height()-a(f).scrollTop()>a(f).height()&&(b.bottom=b.top-this.$el.height()),b.left>(d=a(f).width()-this.$el.width()-5)&&(b.left=d),c={left:b.left,top:b.bottom},null!=(e=this.context.callbacks("before_reposition"))&&e.call(this.context,c),this.$el.offset(c),this.context.trigger("reposition",[c])},b.prototype.next=function(){var a,b;return a=this.$el.find(".cur").removeClass("cur"),b=a.next(),b.length||(b=this.$el.find("li:first")),b.addClass("cur"),this.$el.animate({scrollTop:Math.max(0,a.innerHeight()*(b.index()+2)-this.$el.height())},150)},b.prototype.prev=function(){var a,b;return a=this.$el.find(".cur").removeClass("cur"),b=a.prev(),b.length||(b=this.$el.find("li:last")),b.addClass("cur"),this.$el.animate({scrollTop:Math.max(0,a.innerHeight()*(b.index()+2)-this.$el.height())},150)},b.prototype.show=function(){var a;return this.stop_showing?void(this.stop_showing=!1):(this.context.mark_range(),this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(a=this.context.rect())?this.reposition(a):void 0)},b.prototype.hide=function(a,b){var c;if(this.visible())return isNaN(b)?(this.context.reset_rect(),this.$el.hide(),this.context.trigger("hidden",[a])):(c=function(a){return function(){return a.hide()}}(this),clearTimeout(this.timeout_id),this.timeout_id=setTimeout(c,b))},b.prototype.render=function(b){var c,d,e,f,g,h,i;if(!(a.isArray(b)&&b.length>0))return void this.hide();for(this.$el.find("ul").empty(),d=this.$el.find("ul"),g=this.context.get_opt("tpl"),h=0,i=b.length;i>h;h++)e=b[h],e=a.extend({},e,{"atwho-at":this.context.at}),f=this.context.callbacks("tpl_eval").call(this.context,g,e),c=a(this.context.callbacks("highlighter").call(this.context,f,this.context.query.text)),c.data("item-data",e),d.append(c);return this.show(),this.context.get_opt("highlight_first")?d.find("li:first").addClass("cur"):void 0},b}(),f={DOWN:40,UP:38,ESC:27,TAB:9,ENTER:13,CTRL:17,P:80,N:78},e={before_save:function(b){var c,d,e,f;if(!a.isArray(b))return b;for(f=[],d=0,e=b.length;e>d;d++)c=b[d],f.push(a.isPlainObject(c)?c:{name:c});return f},matcher:function(a,b,c){var d,e,f,g;return a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\amp;"),c&&(a="(?:^|\\s)"+a),f=decodeURI("%C3%80"),g=decodeURI("%C3%BF"),e=new RegExp(""+a+"([A-Za-z"+f+"-"+g+"0-9_+-]*)$|"+a+"([^\\x00-\\xff]*)quot;,"gi"),d=e.exec(b),d?d[2]||d[1]:null},filter:function(a,b,c){var d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],~new String(d[c]).toLowerCase().indexOf(a.toLowerCase())&&g.push(d);return g},remote_filter:null,sorter:function(a,b,c){var d,e,f,g;if(!a)return b;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],d.atwho_order=new String(d[c]).toLowerCase().indexOf(a.toLowerCase()),d.atwho_order>-1&&g.push(d);return g.sort(function(a,b){return a.atwho_order-b.atwho_order})},tpl_eval:function(a,b){var c;try{return a.replace(/\$\{([^\}]*)\}/g,function(a,c){return b[c]})}catch(d){return c=d,""}},highlighter:function(a,b){var c;return b?(c=new RegExp(">\\s*(\\w*?)("+b.replace("+","\\+")+")(\\w*)\\s*<","ig"),a.replace(c,function(a,b,c,d){return"> "+b+"<strong>"+c+"</strong>"+d+" <"})):a},before_insert:function(a){return a},inserting_wrapper:function(a,b,c){var d;return c=""===c?c:c||" ",a.is("textarea, input")?""+b+c:"true"===a.attr("contentEditable")?(c=" "===c?"&nbsp;":c,/firefox/i.test(navigator.userAgent)?d="<span>"+b+c+"</span>":(c="<span contenteditable='false'>"+c+"</span>",d="<span contenteditable='false'>"+b+c+"</span>"),this.app.document.selection&&(d="<span contenteditable='true'>"+b+"</span>"),d+"<span></span>"):void 0}},b={load:function(a,b){var c;return(c=this.controller(a))?c.model.load(b):void 0},setIframe:function(a,b){return this.setIframe(a,b),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},a.fn.atwho=function(d){var e,f;return f=arguments,e=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var g,h;return(h=(g=a(this)).data("atwho"))||g.data("atwho",h=new c(this)),"object"!=typeof d&&d?b[d]&&h?e=b[d].apply(h,Array.prototype.slice.call(f,1)):a.error("Method "+d+" does not exist on jQuery.caret"):h.reg(d.at,d)}),e||this},a.fn.atwho["default"]={at:void 0,alias:void 0,data:null,tpl:"<li data-value='${atwho-at}${name}'>${name}</li>",insert_tpl:"<span id='${id}'>${atwho-data-value}</span>",callbacks:e,search_key:"name",suffix:void 0,hide_without_suffix:!1,start_with_space:!0,highlight_first:!0,limit:5,max_len:20,display_timeout:300,delay:null}});
bp-core/js/jquery.caret.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l;k="caret",b=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.setPos=function(){return this.domInputor},b.prototype.getIEPosition=function(){return this.getPosition()},b.prototype.getPosition=function(){var a,b;return b=this.getOffset(),a=this.$inputor.offset(),b.left-=a.left,b.top-=a.top,b},b.prototype.getOldIEPos=function(){var a,b;return b=h.selection.createRange(),a=h.body.createTextRange(),a.moveToElementText(this.domInputor),a.setEndPoint("EndToEnd",b),a.text.length},b.prototype.getPos=function(){var a,b,c;return(c=this.range())?(a=c.cloneRange(),a.selectNodeContents(this.domInputor),a.setEnd(c.endContainer,c.endOffset),b=a.toString().length,a.detach(),b):h.selection?this.getOldIEPos():void 0},b.prototype.getOldIEOffset=function(){var a,b;return a=h.selection.createRange().duplicate(),a.moveStart("character",-1),b=a.getBoundingClientRect(),{height:b.bottom-b.top,left:b.left,top:b.top}},b.prototype.getOffset=function(){var b,c,d,e,f;return j.getSelection&&(d=this.range())?(d.endOffset-1>0&&d.endContainer===!this.domInputor&&(b=d.cloneRange(),b.setStart(d.endContainer,d.endOffset-1),b.setEnd(d.endContainer,d.endOffset),e=b.getBoundingClientRect(),c={height:e.height,left:e.left+e.width,top:e.top},b.detach()),c&&0!==(null!=c?c.height:void 0)||(b=d.cloneRange(),f=a(h.createTextNode("|")),b.insertNode(f[0]),b.selectNode(f[0]),e=b.getBoundingClientRect(),c={height:e.height,left:e.left,top:e.top},f.remove(),b.detach())):h.selection&&(c=this.getOldIEOffset()),c&&(c.top+=a(j).scrollTop(),c.left+=a(j).scrollLeft()),c},b.prototype.range=function(){var a;if(j.getSelection)return a=j.getSelection(),a.rangeCount>0?a.getRangeAt(0):null},b}(),c=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.getIEPos=function(){var a,b,c,d,e,f,g;return b=this.domInputor,f=h.selection.createRange(),e=0,f&&f.parentElement()===b&&(d=b.value.replace(/\r\n/g,"\n"),c=d.length,g=b.createTextRange(),g.moveToBookmark(f.getBookmark()),a=b.createTextRange(),a.collapse(!1),e=g.compareEndPoints("StartToEnd",a)>-1?c:-g.moveStart("character",-c)),e},b.prototype.getPos=function(){return h.selection?this.getIEPos():this.domInputor.selectionStart},b.prototype.setPos=function(a){var b,c;return b=this.domInputor,h.selection?(c=b.createTextRange(),c.move("character",a),c.select()):b.setSelectionRange&&b.setSelectionRange(a,a),b},b.prototype.getIEOffset=function(a){var b,c,d,e;return c=this.domInputor.createTextRange(),a||(a=this.getPos()),c.move("character",a),d=c.boundingLeft,e=c.boundingTop,b=c.boundingHeight,{left:d,top:e,height:b}},b.prototype.getOffset=function(b){var c,d,e;return c=this.$inputor,h.selection?(d=this.getIEOffset(b),d.top+=a(j).scrollTop()+c.scrollTop(),d.left+=a(j).scrollLeft()+c.scrollLeft(),d):(d=c.offset(),e=this.getPosition(b),d={left:d.left+e.left-c.scrollLeft(),top:d.top+e.top-c.scrollTop(),height:e.height})},b.prototype.getPosition=function(a){var b,c,e,f,g,h,i;return b=this.$inputor,f=function(a){return a=a.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>"),/firefox/i.test(navigator.userAgent)&&(a=a.replace(/\s/g,"&nbsp;")),a},void 0===a&&(a=this.getPos()),i=b.val().slice(0,a),e=b.val().slice(a),g="<span style='position: relative; display: inline;'>"+f(i)+"</span>",g+="<span id='caret' style='position: relative; display: inline;'>|</span>",g+="<span style='position: relative; display: inline;'>"+f(e)+"</span>",h=new d(b),c=h.create(g).rect()},b.prototype.getIEPosition=function(a){var b,c,d,e,f;return d=this.getIEOffset(a),c=this.$inputor.offset(),e=d.left-c.left,f=d.top-c.top,b=d.height,{left:e,top:f,height:b}},b}(),d=function(){function b(a){this.$inputor=a}return b.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"],b.prototype.mirrorCss=function(){var b,c=this;return b={position:"absolute",left:-9999,top:0,zIndex:-2e4},"TEXTAREA"===this.$inputor.prop("tagName")&&this.css_attr.push("width"),a.each(this.css_attr,function(a,d){return b[d]=c.$inputor.css(d)}),b},b.prototype.create=function(b){return this.$mirror=a("<div></div>"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(b),this.$inputor.after(this.$mirror),this},b.prototype.rect=function(){var a,b,c;return a=this.$mirror.find("#caret"),b=a.position(),c={left:b.left,top:b.top,height:a.height()},this.$mirror.remove(),c},b}(),e={contentEditable:function(a){return!(!a[0].contentEditable||"true"!==a[0].contentEditable)}},g={pos:function(a){return a||0===a?this.setPos(a):this.getPos()},position:function(a){return h.selection?this.getIEPosition(a):this.getPosition(a)},offset:function(a){var b;return b=this.getOffset(a)}},h=null,j=null,i=null,l=function(a){var b;return(b=null!=a?a.iframe:void 0)?(i=b,j=b.contentWindow,h=b.contentDocument||j.document):(i=void 0,j=window,h=document)},f=function(a){var b;h=a[0].ownerDocument,j=h.defaultView||h.parentWindow;try{return i=j.frameElement}catch(c){b=c}},a.fn.caret=function(d,f,h){var i;return g[d]?(a.isPlainObject(f)?(l(f),f=void 0):l(h),i=e.contentEditable(this)?new b(this):new c(this),g[d].apply(i,[f])):a.error("Method "+d+" does not exist on jQuery.caret")},a.fn.caret.EditableCaret=b,a.fn.caret.InputCaret=c,a.fn.caret.Utils=e,a.fn.caret.apis=g});
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l;k="caret",b=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.setPos=function(){return this.domInputor},b.prototype.getIEPosition=function(){return this.getPosition()},b.prototype.getPosition=function(){var a,b;return b=this.getOffset(),a=this.$inputor.offset(),b.left-=a.left,b.top-=a.top,b},b.prototype.getOldIEPos=function(){var a,b;return b=h.selection.createRange(),a=h.body.createTextRange(),a.moveToElementText(this.domInputor),a.setEndPoint("EndToEnd",b),a.text.length},b.prototype.getPos=function(){var a,b,c;return(c=this.range())?(a=c.cloneRange(),a.selectNodeContents(this.domInputor),a.setEnd(c.endContainer,c.endOffset),b=a.toString().length,a.detach(),b):h.selection?this.getOldIEPos():void 0},b.prototype.getOldIEOffset=function(){var a,b;return a=h.selection.createRange().duplicate(),a.moveStart("character",-1),b=a.getBoundingClientRect(),{height:b.bottom-b.top,left:b.left,top:b.top}},b.prototype.getOffset=function(){var b,c,d,e,f;return j.getSelection&&(d=this.range())?(d.endOffset-1>0&&d.endContainer===!this.domInputor&&(b=d.cloneRange(),b.setStart(d.endContainer,d.endOffset-1),b.setEnd(d.endContainer,d.endOffset),e=b.getBoundingClientRect(),c={height:e.height,left:e.left+e.width,top:e.top},b.detach()),c&&0!==(null!=c?c.height:void 0)||(b=d.cloneRange(),f=a(h.createTextNode("|")),b.insertNode(f[0]),b.selectNode(f[0]),e=b.getBoundingClientRect(),c={height:e.height,left:e.left,top:e.top},f.remove(),b.detach())):h.selection&&(c=this.getOldIEOffset()),c&&(c.top+=a(j).scrollTop(),c.left+=a(j).scrollLeft()),c},b.prototype.range=function(){var a;if(j.getSelection)return a=j.getSelection(),a.rangeCount>0?a.getRangeAt(0):null},b}(),c=function(){function b(a){this.$inputor=a,this.domInputor=this.$inputor[0]}return b.prototype.getIEPos=function(){var a,b,c,d,e,f,g;return b=this.domInputor,f=h.selection.createRange(),e=0,f&&f.parentElement()===b&&(d=b.value.replace(/\r\n/g,"\n"),c=d.length,g=b.createTextRange(),g.moveToBookmark(f.getBookmark()),a=b.createTextRange(),a.collapse(!1),e=g.compareEndPoints("StartToEnd",a)>-1?c:-g.moveStart("character",-c)),e},b.prototype.getPos=function(){return h.selection?this.getIEPos():this.domInputor.selectionStart},b.prototype.setPos=function(a){var b,c;return b=this.domInputor,h.selection?(c=b.createTextRange(),c.move("character",a),c.select()):b.setSelectionRange&&b.setSelectionRange(a,a),b},b.prototype.getIEOffset=function(a){var b,c,d,e;return c=this.domInputor.createTextRange(),a||(a=this.getPos()),c.move("character",a),d=c.boundingLeft,e=c.boundingTop,b=c.boundingHeight,{left:d,top:e,height:b}},b.prototype.getOffset=function(b){var c,d,e;return c=this.$inputor,h.selection?(d=this.getIEOffset(b),d.top+=a(j).scrollTop()+c.scrollTop(),d.left+=a(j).scrollLeft()+c.scrollLeft(),d):(d=c.offset(),e=this.getPosition(b),d={left:d.left+e.left-c.scrollLeft(),top:d.top+e.top-c.scrollTop(),height:e.height})},b.prototype.getPosition=function(a){var b,c,e,f,g,h,i;return b=this.$inputor,f=function(a){return a=a.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>"),/firefox/i.test(navigator.userAgent)&&(a=a.replace(/\s/g,"&nbsp;")),a},void 0===a&&(a=this.getPos()),i=b.val().slice(0,a),e=b.val().slice(a),g="<span style='position: relative; display: inline;'>"+f(i)+"</span>",g+="<span id='caret' style='position: relative; display: inline;'>|</span>",g+="<span style='position: relative; display: inline;'>"+f(e)+"</span>",h=new d(b),c=h.create(g).rect()},b.prototype.getIEPosition=function(a){var b,c,d,e,f;return d=this.getIEOffset(a),c=this.$inputor.offset(),e=d.left-c.left,f=d.top-c.top,b=d.height,{left:e,top:f,height:b}},b}(),d=function(){function b(a){this.$inputor=a}return b.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"],b.prototype.mirrorCss=function(){var b,c=this;return b={position:"absolute",left:-9999,top:0,zIndex:-2e4},"TEXTAREA"===this.$inputor.prop("tagName")&&this.css_attr.push("width"),a.each(this.css_attr,function(a,d){return b[d]=c.$inputor.css(d)}),b},b.prototype.create=function(b){return this.$mirror=a("<div></div>"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(b),this.$inputor.after(this.$mirror),this},b.prototype.rect=function(){var a,b,c;return a=this.$mirror.find("#caret"),b=a.position(),c={left:b.left,top:b.top,height:a.height()},this.$mirror.remove(),c},b}(),e={contentEditable:function(a){return!(!a[0].contentEditable||"true"!==a[0].contentEditable)}},g={pos:function(a){return a||0===a?this.setPos(a):this.getPos()},position:function(a){return h.selection?this.getIEPosition(a):this.getPosition(a)},offset:function(a){var b;return b=this.getOffset(a)}},h=null,j=null,i=null,l=function(a){var b;return(b=null!=a?a.iframe:void 0)?(i=b,j=b.contentWindow,h=b.contentDocument||j.document):(i=void 0,j=window,h=document)},f=function(a){var b;h=a[0].ownerDocument,j=h.defaultView||h.parentWindow;try{return i=j.frameElement}catch(c){b=c}},a.fn.caret=function(d,f,h){var i;return g[d]?(a.isPlainObject(f)?(l(f),f=void 0):l(h),i=e.contentEditable(this)?new b(this):new c(this),g[d].apply(i,[f])):a.error("Method "+d+" does not exist on jQuery.caret")},a.fn.caret.EditableCaret=b,a.fn.caret.InputCaret=c,a.fn.caret.Utils=e,a.fn.caret.apis=g});
bp-core/js/webcam.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
window.bp=window.bp||{},function(){"undefined"!=typeof BP_Uploader&&(bp.Models=bp.Models||{},bp.Collections=bp.Collections||{},bp.Views=bp.Views||{},bp.WebCam={start:function(){this.params={video:null,videoStream:null,capture_enable:!1,capture:null,canvas:null,warning:null,flipped:!1},bp.Avatar.nav.on("bp-avatar-view:changed",_.bind(this.setView,this))},setView:function(a){if("camera"!==a)return void(_.isNull(this.params.video)||(this.stop(),this.removeWarning()));var b=new bp.Views.WebCamAvatar({model:new Backbone.Model({user_media:!1})});this.params.flipped=!1,bp.Avatar.views.add({id:"camera",view:b}),b.inject(".bp-avatar")},removeView:function(){var a;_.isUndefined(bp.Avatar.views.get("camera"))||(a=bp.Avatar.views.get("camera"),a.get("view").remove(),bp.Avatar.views.remove({id:"camera",view:a}))},gotStream:function(a){var b=bp.WebCam.params.video;bp.WebCam.params.videoStream=a,bp.WebCam.displayWarning("loaded"),b.onerror=function(){bp.WebCam.displayWarning("videoerror"),b&&bp.WebCam.stop()},a.onended=bp.WebCam.noStream(),void 0!==b.mozSrcObject?(b.mozSrcObject=a,b.play()):navigator.mozGetUserMedia?(b.src=a,b.play()):b.src=window.URL?window.URL.createObjectURL(a):a,bp.WebCam.params.capture_enable=!0},stop:function(){bp.WebCam.params.capture_enable=!1,bp.WebCam.params.videoStream&&(bp.WebCam.params.videoStream.stop?bp.WebCam.params.videoStream.stop():bp.WebCam.params.videoStream.msStop&&bp.WebCam.params.videoStream.msStop(),bp.WebCam.params.videoStream.onended=null,bp.WebCam.params.videoStream=null),bp.WebCam.params.video&&(bp.WebCam.params.video.onerror=null,bp.WebCam.params.video.pause(),bp.WebCam.params.video.mozSrcObject&&(bp.WebCam.params.video.mozSrcObject=null),bp.WebCam.params.video.src="")},noStream:function(){_.isNull(bp.WebCam.params.videoStream)&&(bp.WebCam.displayWarning("noaccess"),bp.WebCam.removeView())},setAvatar:function(a){a.get("url")||bp.WebCam.displayWarning("nocapture"),bp.WebCam.removeView(),bp.Avatar.setAvatar(a)},removeWarning:function(){_.isNull(this.params.warning)||this.params.warning.remove()},displayWarning:function(a){this.removeWarning(),this.params.warning=new bp.Views.uploaderWarning({value:BP_Uploader.strings.camera_warnings[a]}),this.params.warning.inject(".bp-avatar-status")}},bp.Views.WebCamAvatar=bp.View.extend({tagName:"div",id:"bp-webcam-avatar",template:bp.template("bp-avatar-webcam"),events:{"click .avatar-webcam-capture":"captureStream","click .avatar-webcam-save":"saveCapture"},initialize:function(){var a;(navigator.getUserMedia||navigator.oGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia)&&(a=_.extend(_.pick(BP_Uploader.settings.defaults.multipart_params.bp_params,"object","item_id","nonces"),{user_media:!0,w:BP_Uploader.settings.crop.full_w,h:BP_Uploader.settings.crop.full_h,x:0,y:0,type:"camera"}),this.model.set(a)),this.on("ready",this.useStream,this)},useStream:function(){this.model.get("user_media")&&(this.options.video=new bp.Views.WebCamVideo,this.options.canvas=new bp.Views.WebCamCanvas,this.$el.find("#avatar-to-crop").append(this.options.video.el),this.$el.find("#avatar-crop-pane").append(this.options.canvas.el),bp.WebCam.params.video=this.options.video.el,bp.WebCam.params.canvas=this.options.canvas.el,bp.WebCam.displayWarning("requesting"),navigator.getUserMedia?navigator.getUserMedia({video:!0},bp.WebCam.gotStream,bp.WebCams.noStream):navigator.oGetUserMedia?navigator.oGetUserMedia({video:!0},bp.WebCam.gotStream,bp.WebCam.noStream):navigator.mozGetUserMedia?navigator.mozGetUserMedia({video:!0},bp.WebCam.gotStream,bp.WebCam.noStream):navigator.webkitGetUserMedia?navigator.webkitGetUserMedia({video:!0},bp.WebCam.gotStream,bp.WebCam.noStream):navigator.msGetUserMedia?navigator.msGetUserMedia({video:!0,audio:!1},bp.WebCams.gotStream,bp.WebCam.noStream):bp.WebCam.displayWarning("errormsg"))},captureStream:function(a){var b,c;return a.preventDefault(),bp.WebCam.params.capture_enable?this.model.get("h")>this.options.video.el.videoHeight||this.model.get("w")>this.options.video.el.videoWidth?void bp.WebCam.displayWarning("videoerror"):(c=this.options.video.el.videoHeight,b=(this.options.video.el.videoWidth-c)/2,bp.WebCam.params.flipped||(this.options.canvas.el.getContext("2d").translate(this.model.get("w"),0),this.options.canvas.el.getContext("2d").scale(-1,1),bp.WebCam.params.flipped=!0),this.options.canvas.el.getContext("2d").drawImage(this.options.video.el,b,0,c,c,0,0,this.model.get("w"),this.model.get("h")),bp.WebCam.params.capture=this.options.canvas.el.toDataURL("image/png"),this.model.set("url",bp.WebCam.params.capture),void bp.WebCam.displayWarning("ready")):void bp.WebCam.displayWarning("loading")},saveCapture:function(a){return a.preventDefault(),bp.WebCam.params.capture?(bp.WebCam.stop(),void bp.WebCam.setAvatar(this.model)):void bp.WebCam.displayWarning("nocapture")}}),bp.Views.WebCamVideo=bp.View.extend({tagName:"video",id:"bp-webcam-video",attributes:{autoplay:"autoplay"}}),bp.Views.WebCamCanvas=bp.View.extend({tagName:"canvas",id:"bp-webcam-canvas",attributes:{width:150,height:150},initialize:function(){_.isUndefined(BP_Uploader.settings.crop.full_h)||_.isUndefined(BP_Uploader.settings.crop.full_w)||(this.el.attributes.width.value=BP_Uploader.settings.crop.full_w,this.el.attributes.height.value=BP_Uploader.settings.crop.full_h)}}),bp.WebCam.start())}(bp,jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
window.bp=window.bp||{},function(){"undefined"!=typeof BP_Uploader&&(bp.Models=bp.Models||{},bp.Collections=bp.Collections||{},bp.Views=bp.Views||{},bp.WebCam={start:function(){this.params={video:null,videoStream:null,capture_enable:!1,capture:null,canvas:null,warning:null,flipped:!1},bp.Avatar.nav.on("bp-avatar-view:changed",_.bind(this.setView,this))},setView:function(a){if("camera"!==a)return void(_.isNull(this.params.video)||(this.stop(),this.removeWarning()));var b=new bp.Views.WebCamAvatar({model:new Backbone.Model({user_media:!1})});this.params.flipped=!1,bp.Avatar.views.add({id:"camera",view:b}),b.inject(".bp-avatar")},removeView:function(){var a;_.isUndefined(bp.Avatar.views.get("camera"))||(a=bp.Avatar.views.get("camera"),a.get("view").remove(),bp.Avatar.views.remove({id:"camera",view:a}))},gotStream:function(a){var b=bp.WebCam.params.video;bp.WebCam.params.videoStream=a,bp.WebCam.displayWarning("loaded"),b.onerror=function(){bp.WebCam.displayWarning("videoerror"),b&&bp.WebCam.stop()},a.onended=bp.WebCam.noStream(),void 0!==b.mozSrcObject?(b.mozSrcObject=a,b.play()):navigator.mozGetUserMedia?(b.src=a,b.play()):b.src=window.URL?window.URL.createObjectURL(a):a,bp.WebCam.params.capture_enable=!0},stop:function(){bp.WebCam.params.capture_enable=!1,bp.WebCam.params.videoStream&&(bp.WebCam.params.videoStream.stop?bp.WebCam.params.videoStream.stop():bp.WebCam.params.videoStream.msStop&&bp.WebCam.params.videoStream.msStop(),bp.WebCam.params.videoStream.onended=null,bp.WebCam.params.videoStream=null),bp.WebCam.params.video&&(bp.WebCam.params.video.onerror=null,bp.WebCam.params.video.pause(),bp.WebCam.params.video.mozSrcObject&&(bp.WebCam.params.video.mozSrcObject=null),bp.WebCam.params.video.src="")},noStream:function(){_.isNull(bp.WebCam.params.videoStream)&&(bp.WebCam.displayWarning("noaccess"),bp.WebCam.removeView())},setAvatar:function(a){a.get("url")||bp.WebCam.displayWarning("nocapture"),bp.WebCam.removeView(),bp.Avatar.setAvatar(a)},removeWarning:function(){_.isNull(this.params.warning)||this.params.warning.remove()},displayWarning:function(a){this.removeWarning(),this.params.warning=new bp.Views.uploaderWarning({value:BP_Uploader.strings.camera_warnings[a]}),this.params.warning.inject(".bp-avatar-status")}},bp.Views.WebCamAvatar=bp.View.extend({tagName:"div",id:"bp-webcam-avatar",template:bp.template("bp-avatar-webcam"),events:{"click .avatar-webcam-capture":"captureStream","click .avatar-webcam-save":"saveCapture"},initialize:function(){var a;(navigator.getUserMedia||navigator.oGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia)&&(a=_.extend(_.pick(BP_Uploader.settings.defaults.multipart_params.bp_params,"object","item_id","nonces"),{user_media:!0,w:BP_Uploader.settings.crop.full_w,h:BP_Uploader.settings.crop.full_h,x:0,y:0,type:"camera"}),this.model.set(a)),this.on("ready",this.useStream,this)},useStream:function(){this.model.get("user_media")&&(this.options.video=new bp.Views.WebCamVideo,this.options.canvas=new bp.Views.WebCamCanvas,this.$el.find("#avatar-to-crop").append(this.options.video.el),this.$el.find("#avatar-crop-pane").append(this.options.canvas.el),bp.WebCam.params.video=this.options.video.el,bp.WebCam.params.canvas=this.options.canvas.el,bp.WebCam.displayWarning("requesting"),navigator.getUserMedia?navigator.getUserMedia({video:!0},bp.WebCam.gotStream,bp.WebCams.noStream):navigator.oGetUserMedia?navigator.oGetUserMedia({video:!0},bp.WebCam.gotStream,bp.WebCam.noStream):navigator.mozGetUserMedia?navigator.mozGetUserMedia({video:!0},bp.WebCam.gotStream,bp.WebCam.noStream):navigator.webkitGetUserMedia?navigator.webkitGetUserMedia({video:!0},bp.WebCam.gotStream,bp.WebCam.noStream):navigator.msGetUserMedia?navigator.msGetUserMedia({video:!0,audio:!1},bp.WebCams.gotStream,bp.WebCam.noStream):bp.WebCam.displayWarning("errormsg"))},captureStream:function(a){var b,c;return a.preventDefault(),bp.WebCam.params.capture_enable?this.model.get("h")>this.options.video.el.videoHeight||this.model.get("w")>this.options.video.el.videoWidth?void bp.WebCam.displayWarning("videoerror"):(c=this.options.video.el.videoHeight,b=(this.options.video.el.videoWidth-c)/2,bp.WebCam.params.flipped||(this.options.canvas.el.getContext("2d").translate(this.model.get("w"),0),this.options.canvas.el.getContext("2d").scale(-1,1),bp.WebCam.params.flipped=!0),this.options.canvas.el.getContext("2d").drawImage(this.options.video.el,b,0,c,c,0,0,this.model.get("w"),this.model.get("h")),bp.WebCam.params.capture=this.options.canvas.el.toDataURL("image/png"),this.model.set("url",bp.WebCam.params.capture),void bp.WebCam.displayWarning("ready")):void bp.WebCam.displayWarning("loading")},saveCapture:function(a){return a.preventDefault(),bp.WebCam.params.capture?(bp.WebCam.stop(),void bp.WebCam.setAvatar(this.model)):void bp.WebCam.displayWarning("nocapture")}}),bp.Views.WebCamVideo=bp.View.extend({tagName:"video",id:"bp-webcam-video",attributes:{autoplay:"autoplay"}}),bp.Views.WebCamCanvas=bp.View.extend({tagName:"canvas",id:"bp-webcam-canvas",attributes:{width:150,height:150},initialize:function(){_.isUndefined(BP_Uploader.settings.crop.full_h)||_.isUndefined(BP_Uploader.settings.crop.full_w)||(this.el.attributes.width.value=BP_Uploader.settings.crop.full_w,this.el.attributes.height.value=BP_Uploader.settings.crop.full_h)}}),bp.WebCam.start())}(bp,jQuery);
bp-core/js/widget-members.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function member_widget_response(a){a=a.substr(0,a.length-1),a=a.split("[[SPLIT]]"),"-1"!==a[0]?jQuery(".widget ul#members-list").fadeOut(200,function(){jQuery(".widget ul#members-list").html(a[1]),jQuery(".widget ul#members-list").fadeIn(200)}):jQuery(".widget ul#members-list").fadeOut(200,function(){var b="<p>"+a[1]+"</p>";jQuery(".widget ul#members-list").html(b),jQuery(".widget ul#members-list").fadeIn(200)})}jQuery(document).ready(function(){jQuery(".widget div#members-list-options a").on("click",function(){var a=this;return jQuery(a).addClass("loading"),jQuery(".widget div#members-list-options a").removeClass("selected"),jQuery(this).addClass("selected"),jQuery.post(ajaxurl,{action:"widget_members",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce-members").val(),"max-members":jQuery("input#members_widget_max").val(),filter:jQuery(this).attr("id")},function(b){jQuery(a).removeClass("loading"),member_widget_response(b)}),!1})});
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function member_widget_response(a){a=a.substr(0,a.length-1),a=a.split("[[SPLIT]]"),"-1"!==a[0]?jQuery(".widget ul#members-list").fadeOut(200,function(){jQuery(".widget ul#members-list").html(a[1]),jQuery(".widget ul#members-list").fadeIn(200)}):jQuery(".widget ul#members-list").fadeOut(200,function(){var b="<p>"+a[1]+"</p>";jQuery(".widget ul#members-list").html(b),jQuery(".widget ul#members-list").fadeIn(200)})}jQuery(document).ready(function(){jQuery(".widget div#members-list-options a").on("click",function(){var a=this;return jQuery(a).addClass("loading"),jQuery(".widget div#members-list-options a").removeClass("selected"),jQuery(this).addClass("selected"),jQuery.post(ajaxurl,{action:"widget_members",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce-members").val(),"max-members":jQuery("input#members_widget_max").val(),filter:jQuery(this).attr("id")},function(b){jQuery(a).removeClass("loading"),member_widget_response(b)}),!1})});
bp-friends/js/widget-friends.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function friend_widget_response(a){a=a.substr(0,a.length-1),a=a.split("[[SPLIT]]"),"-1"!==a[0]?jQuery(".widget ul#friends-list").fadeOut(200,function(){jQuery(".widget ul#friends-list").html(a[1]),jQuery(".widget ul#friends-list").fadeIn(200)}):jQuery(".widget ul#friends-list").fadeOut(200,function(){var b="<p>"+a[1]+"</p>";jQuery(".widget ul#friends-list").html(b),jQuery(".widget ul#friends-list").fadeIn(200)})}jQuery(document).ready(function(){jQuery(".widget div#friends-list-options a").on("click",function(){var a=this;return jQuery(a).addClass("loading"),jQuery(".widget div#friends-list-options a").removeClass("selected"),jQuery(this).addClass("selected"),jQuery.post(ajaxurl,{action:"widget_friends",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce-friends").val(),"max-friends":jQuery("input#friends_widget_max").val(),filter:jQuery(this).attr("id")},function(b){jQuery(a).removeClass("loading"),friend_widget_response(b)}),!1})});
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function friend_widget_response(a){a=a.substr(0,a.length-1),a=a.split("[[SPLIT]]"),"-1"!==a[0]?jQuery(".widget ul#friends-list").fadeOut(200,function(){jQuery(".widget ul#friends-list").html(a[1]),jQuery(".widget ul#friends-list").fadeIn(200)}):jQuery(".widget ul#friends-list").fadeOut(200,function(){var b="<p>"+a[1]+"</p>";jQuery(".widget ul#friends-list").html(b),jQuery(".widget ul#friends-list").fadeIn(200)})}jQuery(document).ready(function(){jQuery(".widget div#friends-list-options a").on("click",function(){var a=this;return jQuery(a).addClass("loading"),jQuery(".widget div#friends-list-options a").removeClass("selected"),jQuery(this).addClass("selected"),jQuery.post(ajaxurl,{action:"widget_friends",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce-friends").val(),"max-friends":jQuery("input#friends_widget_max").val(),filter:jQuery(this).attr("id")},function(b){jQuery(a).removeClass("loading"),friend_widget_response(b)}),!1})});
bp-groups/admin/js/admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){function b(b,c){a("#bp-groups-new-members-list").append('<li data-login="'+c.item.value+'"><a href="#" class="bp-groups-remove-new-member">x</a> '+c.item.label+"</li>")}var c="undefined"!=typeof group_id?"&group_id="+group_id:"";a(document).ready(function(){window.warn_on_leave=!1,a(".bp-suggest-user").autocomplete({source:ajaxurl+"?action=bp_group_admin_member_autocomplete"+c,delay:500,minLength:2,position:"undefined"!=typeof isRtl&&isRtl?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){a(this).addClass("open")},close:function(){a(this).removeClass("open"),a(this).val("")},select:function(a,c){b(a,c)}}),a("#bp-groups-new-members").prop("placeholder",BP_Group_Admin.add_member_placeholder),a("#bp_group_add_members").on("click",".bp-groups-remove-new-member",function(b){b.preventDefault(),a(b.target.parentNode).remove()}),a(document).on("change",'input#bp-groups-name, input#bp-groups-description, select.bp-groups-role, #bp-groups-settings-section-status input[type="radio"]',function(){window.warn_on_leave=!0}),a("input#save").on("click",function(){var b=[];a("#bp-groups-new-members-list li").each(function(){b.push(a(this).data("login"))}),b.length&&a("#bp-groups-new-members").val("").val(b.join(", ")),window.warn_on_leave=!1}),window.onbeforeunload=function(){return window.warn_on_leave?BP_Group_Admin.warn_on_leave:void 0}})}(jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){function b(b,c){a("#bp-groups-new-members-list").append('<li data-login="'+c.item.value+'"><a href="#" class="bp-groups-remove-new-member">x</a> '+c.item.label+"</li>")}var c="undefined"!=typeof group_id?"&group_id="+group_id:"";a(document).ready(function(){window.warn_on_leave=!1,a(".bp-suggest-user").autocomplete({source:ajaxurl+"?action=bp_group_admin_member_autocomplete"+c,delay:500,minLength:2,position:"undefined"!=typeof isRtl&&isRtl?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){a(this).addClass("open")},close:function(){a(this).removeClass("open"),a(this).val("")},select:function(a,c){b(a,c)}}),a("#bp-groups-new-members").prop("placeholder",BP_Group_Admin.add_member_placeholder),a("#bp_group_add_members").on("click",".bp-groups-remove-new-member",function(b){b.preventDefault(),a(b.target.parentNode).remove()}),a(document).on("change",'input#bp-groups-name, input#bp-groups-description, select.bp-groups-role, #bp-groups-settings-section-status input[type="radio"]',function(){window.warn_on_leave=!0}),a("input#save").on("click",function(){var b=[];a("#bp-groups-new-members-list li").each(function(){b.push(a(this).data("login"))}),b.length&&a("#bp-groups-new-members").val("").val(b.join(", ")),window.warn_on_leave=!1}),window.onbeforeunload=function(){return window.warn_on_leave?BP_Group_Admin.warn_on_leave:void 0}})}(jQuery);
bp-groups/bp-groups-template.php CHANGED
@@ -671,42 +671,54 @@ function bp_group_id( $group = false ) {
671
* Output the row class of the current group in the loop.
672
*
673
* @since BuddyPress (1.7.0)
674
*/
675
- function bp_group_class() {
676
- echo bp_get_group_class();
677
}
678
/**
679
* Get the row class of the current group in the loop.
680
*
681
* @since BuddyPress (1.7.0)
682
*
683
* @return string Row class of the group.
684
*/
685
- function bp_get_group_class() {
686
global $groups_template;
687
688
- $classes = array();
689
- $pos_in_loop = (int) $groups_template->current_group;
690
691
- // If we've only one group in the loop, don't both with odd and even.
692
- if ( $groups_template->group_count > 1 )
693
- $classes[] = ( $pos_in_loop % 2 ) ? 'even' : 'odd';
694
- else
695
$classes[] = 'bp-single-group';
696
697
// Group type - public, private, hidden.
698
- $classes[] = esc_attr( $groups_template->group->status );
699
700
- // User's group status
701
if ( bp_is_user_active() ) {
702
- if ( bp_group_is_admin() )
703
- $classes[] = 'is-admin';
704
705
- if ( bp_group_is_member() )
706
- $classes[] = 'is-member';
707
708
- if ( bp_group_is_mod() )
709
$classes[] = 'is-mod';
710
}
711
712
// Whether a group avatar will appear.
671
* Output the row class of the current group in the loop.
672
*
673
* @since BuddyPress (1.7.0)
674
+ *
675
+ * @param array $classes Array of custom classes
676
*/
677
+ function bp_group_class( $classes = array() ) {
678
+ echo bp_get_group_class( $classes );
679
}
680
/**
681
* Get the row class of the current group in the loop.
682
*
683
* @since BuddyPress (1.7.0)
684
*
685
+ * @param array $classes Array of custom classes
686
+ *
687
* @return string Row class of the group.
688
*/
689
+ function bp_get_group_class( $classes = array() ) {
690
global $groups_template;
691
692
+ // Add even/odd classes, but only if there's more than 1 group
693
+ if ( $groups_template->group_count > 1 ) {
694
+ $pos_in_loop = (int) $groups_template->current_group;
695
+ $classes[] = ( $pos_in_loop % 2 ) ? 'even' : 'odd';
696
697
+ // If we've only one group in the loop, don't bother with odd and even
698
+ } else {
699
$classes[] = 'bp-single-group';
700
+ }
701
702
// Group type - public, private, hidden.
703
+ $classes[] = sanitize_key( $groups_template->group->status );
704
705
+ // User's group role
706
if ( bp_is_user_active() ) {
707
708
+ // Admin
709
+ if ( bp_group_is_admin() ) {
710
+ $classes[] = 'is-admin';
711
+ }
712
713
+ // Moderator
714
+ if ( bp_group_is_mod() ) {
715
$classes[] = 'is-mod';
716
+ }
717
+
718
+ // Member
719
+ if ( bp_group_is_member() ) {
720
+ $classes[] = 'is-member';
721
+ }
722
}
723
724
// Whether a group avatar will appear.
bp-groups/js/widget-groups.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function groups_widget_response(a){a=a.substr(0,a.length-1),a=a.split("[[SPLIT]]"),"-1"!==a[0]?jQuery(".widget ul#groups-list").fadeOut(200,function(){jQuery(".widget ul#groups-list").html(a[1]),jQuery(".widget ul#groups-list").fadeIn(200)}):jQuery(".widget ul#groups-list").fadeOut(200,function(){var b="<p>"+a[1]+"</p>";jQuery(".widget ul#groups-list").html(b),jQuery(".widget ul#groups-list").fadeIn(200)})}jQuery(document).ready(function(){jQuery(".widget div#groups-list-options a").on("click",function(){var a=this;return jQuery(a).addClass("loading"),jQuery(".widget div#groups-list-options a").removeClass("selected"),jQuery(this).addClass("selected"),jQuery.post(ajaxurl,{action:"widget_groups_list",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce-groups").val(),max_groups:jQuery("input#groups_widget_max").val(),filter:jQuery(this).attr("id")},function(b){jQuery(a).removeClass("loading"),groups_widget_response(b)}),!1})});
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function groups_widget_response(a){a=a.substr(0,a.length-1),a=a.split("[[SPLIT]]"),"-1"!==a[0]?jQuery(".widget ul#groups-list").fadeOut(200,function(){jQuery(".widget ul#groups-list").html(a[1]),jQuery(".widget ul#groups-list").fadeIn(200)}):jQuery(".widget ul#groups-list").fadeOut(200,function(){var b="<p>"+a[1]+"</p>";jQuery(".widget ul#groups-list").html(b),jQuery(".widget ul#groups-list").fadeIn(200)})}jQuery(document).ready(function(){jQuery(".widget div#groups-list-options a").on("click",function(){var a=this;return jQuery(a).addClass("loading"),jQuery(".widget div#groups-list-options a").removeClass("selected"),jQuery(this).addClass("selected"),jQuery.post(ajaxurl,{action:"widget_groups_list",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce-groups").val(),max_groups:jQuery("input#groups_widget_max").val(),filter:jQuery(this).attr("id")},function(b){jQuery(a).removeClass("loading"),groups_widget_response(b)}),!1})});
bp-loader.php CHANGED
@@ -14,7 +14,7 @@
14
* Description: BuddyPress helps you run any kind of social network on your WordPress, with member profiles, activity streams, user groups, messaging, and more.
15
* Author: The BuddyPress Community
16
* Author URI: https://buddypress.org/
17
- * Version: 2.3.0-beta
18
* Text Domain: buddypress
19
* Domain Path: /bp-languages/
20
* License: GPLv2 or later (license.txt)
@@ -309,7 +309,7 @@ class BuddyPress {
309
310
/** Versions **********************************************************/
311
312
- $this->version = '2.3-beta';
313
$this->db_version = 9848;
314
315
/** Loading ***********************************************************/
14
* Description: BuddyPress helps you run any kind of social network on your WordPress, with member profiles, activity streams, user groups, messaging, and more.
15
* Author: The BuddyPress Community
16
* Author URI: https://buddypress.org/
17
+ * Version: 2.3.0-rc
18
* Text Domain: buddypress
19
* Domain Path: /bp-languages/
20
* License: GPLv2 or later (license.txt)
309
310
/** Versions **********************************************************/
311
312
+ $this->version = '2.3.0-rc';
313
$this->db_version = 9848;
314
315
/** Loading ***********************************************************/
bp-members/admin/bp-members-admin-classes.php CHANGED
@@ -109,13 +109,15 @@ class BP_Members_List_Table extends WP_Users_List_Table {
109
* As we're dealing with signups, we don't need this.
110
*
111
* @since BuddyPress (2.0.0)
112
*/
113
public function extra_tablenav( $which ) {
114
return;
115
}
116
117
/**
118
- * Specific signups columns
119
*
120
* @since BuddyPress (2.0.0)
121
*/
@@ -215,6 +217,13 @@ class BP_Members_List_Table extends WP_Users_List_Table {
215
* @since BuddyPress (2.0.0)
216
*
217
* @see WP_List_Table::single_row() for explanation of params.
218
*/
219
public function single_row( $signup_object = null, $style = '', $role = '', $numposts = 0 ) {
220
echo '<tr' . $style . ' id="signup-' . esc_attr( $signup_object->id ) . '">';
@@ -348,6 +357,10 @@ class BP_Members_List_Table extends WP_Users_List_Table {
348
* Display number of time an activation email has been sent.
349
*
350
* @since BuddyPress (2.0.0)
351
*/
352
public function column_count_sent( $signup_object = null ) {
353
echo absint( $signup_object->count_sent );
@@ -358,8 +371,10 @@ class BP_Members_List_Table extends WP_Users_List_Table {
358
*
359
* @since BuddyPress (2.1.0)
360
*
361
- * @param object $signup_object The signup data object.
362
- * @param string the column name.
363
*/
364
function column_default( $signup_object = null, $column_name = '' ) {
365
@@ -457,7 +472,7 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
457
*
458
* @since BuddyPress (2.0.0)
459
*
460
- * @uses WP_MS_Users_List_Table::get_views() to get the users views
461
*/
462
public function get_views() {
463
$views = parent::get_views();
@@ -470,7 +485,7 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
470
}
471
472
/**
473
- * Specific signups columns
474
*
475
* @since BuddyPress (2.0.0)
476
*/
@@ -495,7 +510,7 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
495
}
496
497
/**
498
- * Specific bulk actions for signups
499
*
500
* @since BuddyPress (2.0.0)
501
*/
@@ -534,7 +549,7 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
534
}
535
536
/**
537
- * The columns signups can be reordered with
538
*
539
* @since BuddyPress (2.0.0)
540
*/
@@ -565,6 +580,9 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
565
* @since BuddyPress (2.0.0)
566
*
567
* @see WP_List_Table::single_row() for explanation of params.
568
*/
569
public function single_row( $signup_object = null, $style = '' ) {
570
echo '<tr' . $style . ' id="signup-' . esc_attr( $signup_object->id ) . '">';
@@ -577,7 +595,7 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
577
*
578
* @since BuddyPress (2.0.0)
579
*
580
- * @param object $signup_object The signup data object.
581
*/
582
public function column_cb( $signup_object = null ) {
583
?>
@@ -666,7 +684,7 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
666
}
667
668
/**
669
- * Display registration date
670
*
671
* @since BuddyPress (2.0.0)
672
*
@@ -688,6 +706,8 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
688
* Display the last time an activation email has been sent.
689
*
690
* @since BuddyPress (2.0.0)
691
*/
692
public function column_date_sent( $signup_object = null ) {
693
global $mode;
@@ -705,6 +725,8 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
705
* Display number of time an activation email has been sent.
706
*
707
* @since BuddyPress (2.0.0)
708
*/
709
public function column_count_sent( $signup_object = null ) {
710
echo absint( $signup_object->count_sent );
@@ -715,8 +737,10 @@ class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {
715
*
716
* @since BuddyPress 2.1.0
717
*
718
- * @param object $signup_object The signup data object.
719
- * @param string the column name.
720
*/
721
function column_default( $signup_object = null, $column_name = '' ) {
722
109
* As we're dealing with signups, we don't need this.
110
*
111
* @since BuddyPress (2.0.0)
112
+ *
113
+ * @param array $which
114
*/
115
public function extra_tablenav( $which ) {
116
return;
117
}
118
119
/**
120
+ * Specific signups columns.
121
*
122
* @since BuddyPress (2.0.0)
123
*/
217
* @since BuddyPress (2.0.0)
218
*
219
* @see WP_List_Table::single_row() for explanation of params.
220
+ *
221
+ * @param object|null $signup_object Signup user object.
222
+ * @param string $style Styles for the row.
223
+ * @param string $role Role to be assigned to user.
224
+ * @param int $numposts Numper of posts.
225
+ *
226
+ * @return string
227
*/
228
public function single_row( $signup_object = null, $style = '', $role = '', $numposts = 0 ) {
229
echo '<tr' . $style . ' id="signup-' . esc_attr( $signup_object->id ) . '">';
357
* Display number of time an activation email has been sent.
358
*
359
* @since BuddyPress (2.0.0)
360
+ *
361
+ * @param object $signup_object Signup object instance.
362
+ *
363
+ * @return int
364
*/
365
public function column_count_sent( $signup_object = null ) {
366
echo absint( $signup_object->count_sent );
371
*
372
* @since BuddyPress (2.1.0)
373
*
374
+ * @param object|null $signup_object The signup data object.
375
+ * @param string $column_name The column name.
376
+ *
377
+ * @return string
378
*/
379
function column_default( $signup_object = null, $column_name = '' ) {
380
472
*
473
* @since BuddyPress (2.0.0)
474
*
475
+ * @uses WP_MS_Users_List_Table::get_views() to get the users views.
476
*/
477
public function get_views() {
478
$views = parent::get_views();
485
}
486
487
/**
488
+ * Specific signups columns.
489
*
490
* @since BuddyPress (2.0.0)
491
*/
510
}
511
512
/**
513
+ * Specific bulk actions for signups.
514
*
515
* @since BuddyPress (2.0.0)
516
*/
549
}
550
551
/**
552
+ * The columns signups can be reordered with.
553
*
554
* @since BuddyPress (2.0.0)
555
*/
580
* @since BuddyPress (2.0.0)
581
*
582
* @see WP_List_Table::single_row() for explanation of params.
583
+ *
584
+ * @param object|null $signup_object Signup user object.
585
+ * @param string $style Styles for the row.
586
*/
587
public function single_row( $signup_object = null, $style = '' ) {
588
echo '<tr' . $style . ' id="signup-' . esc_attr( $signup_object->id ) . '">';
595
*
596
* @since BuddyPress (2.0.0)
597
*
598
+ * @param object|null $signup_object The signup data object.
599
*/
600
public function column_cb( $signup_object = null ) {
601
?>
684
}
685
686
/**
687
+ * Display registration date.
688
*
689
* @since BuddyPress (2.0.0)
690
*
706
* Display the last time an activation email has been sent.
707
*
708
* @since BuddyPress (2.0.0)
709
+ *
710
+ * @param object|null $signup_object Signup object instance.
711
*/
712
public function column_date_sent( $signup_object = null ) {
713
global $mode;
725
* Display number of time an activation email has been sent.
726
*
727
* @since BuddyPress (2.0.0)
728
+ *
729
+ * @param object|null $signup_object Signup object instance.
730
*/
731
public function column_count_sent( $signup_object = null ) {
732
echo absint( $signup_object->count_sent );
737
*
738
* @since BuddyPress 2.1.0
739
*
740
+ * @param object|null $signup_object The signup data object.
741
+ * @param string $column_name The column name.
742
+ *
743
+ * @return string
744
*/
745
function column_default( $signup_object = null, $column_name = '' ) {
746
bp-members/admin/js/admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! buddypress - v2.3.0 - 2015-05-14 8:16:12 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function clear(a){if(a=document.getElementById(a)){var b=a.getElementsByTagName("INPUT"),c=a.getElementsByTagName("OPTION"),d=0;if(b)for(d=0;d<b.length;d++)b[d].checked="";if(c)for(d=0;d<c.length;d++)c[d].selected=!1}}!function(a){a(".visibility-toggle-link").on("click",function(b){b.preventDefault(),a(this).parent().hide().siblings(".field-visibility-settings").show()}),a(".field-visibility-settings-close").on("click",function(b){b.preventDefault();var c=a(this).parent(),d=c.find("input:checked").parent().text();c.hide().siblings(".field-visibility-settings-toggle").children(".current-visibility-level").text(d).end().show()})}(jQuery);
1
+ /*! buddypress - v2.3.0 - 2015-05-21 9:35:03 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
function clear(a){if(a=document.getElementById(a)){var b=a.getElementsByTagName("INPUT"),c=a.getElementsByTagName("OPTION"),d=0;if(b)for(d=0;d<b.length;d++)b[d].checked="";if(c)for(d=0;d<c.length;d++)c[d].selected=!1}}!function(a){a(".visibility-toggle-link").on("click",function(b){b.preventDefault(),a(this).parent().hide().siblings(".field-visibility-settings").show()}),a(".field-visibility-settings-close").on("click",function(b){b.preventDefault();var c=a(this).parent(),d=c.find("input:checked").parent().text();c.hide().siblings(".field-visibility-settings-toggle").children(".current-visibility-level").text(d).end().show()})}(jQuery);
bp-members/bp-members-actions.php CHANGED
@@ -23,8 +23,7 @@ defined( 'ABSPATH' ) || exit;
23
*
24
* Note: no longer used in the current state. See the Settings component.
25
*
26
- * @param int $user_id Optional. User ID to mark as spam. Defaults to displayed
27
- * user.
28
*/
29
function bp_core_action_set_spammer_status( $user_id = 0 ) {
30
23
*
24
* Note: no longer used in the current state. See the Settings component.
25
*
26
+ * @param int $user_id Optional. User ID to mark as spam. Defaults to displayed user.
27
*/
28
function bp_core_action_set_spammer_status( $user_id = 0 ) {
29
bp-members/bp-members-activity.php CHANGED
@@ -11,9 +11,9 @@
11
defined( 'ABSPATH' ) || exit;
12
13
/**
14
- * Register the 'new member' activity type
15
*
16
- * @since BuddyPress (2.2.0)
17
*
18
* @uses bp_activity_set_action()
19
* @uses buddypress()
@@ -43,8 +43,9 @@ add_action( 'bp_register_activity_actions', 'bp_members_register_activity_action
43
*
44
* @since BuddyPress (2.2.0)
45
*
46
- * @param string $action Static activity action.
47
* @param object $activity Activity object.
48
* @return string
49
*/
50
function bp_members_format_activity_action_new_member( $action, $activity ) {
@@ -71,6 +72,8 @@ function bp_members_format_activity_action_new_member( $action, $activity ) {
71
* Create a "became a registered user" activity item when a user activates his account.
72
*
73
* @param array $user Array of userdata passed to bp_core_activated_user hook.
74
*/
75
function bp_core_new_user_activity( $user ) {
76
if ( empty( $user ) ) {
11
defined( 'ABSPATH' ) || exit;
12
13
/**
14
+ * Register the 'new member' activity type.
15
*
16
+ * @since BuddyPress (2.2.0)
17
*
18
* @uses bp_activity_set_action()
19
* @uses buddypress()
43
*
44
* @since BuddyPress (2.2.0)
45
*
46
+ * @param string $action Static activity action.
47
* @param object $activity Activity object.
48
+ *
49
* @return string
50
*/
51
function bp_members_format_activity_action_new_member( $action, $activity ) {
72
* Create a "became a registered user" activity item when a user activates his account.
73
*
74
* @param array $user Array of userdata passed to bp_core_activated_user hook.
75
+ *
76
+ * @return bool
77
*/
78
function bp_core_new_user_activity( $user ) {
79
if ( empty( $user ) ) {
bp-members/bp-members-admin.php CHANGED
@@ -207,7 +207,7 @@ class BP_Members_Admin {
207
}
208
209
/**
210
- * Get the user ID
211
*
212
* Look for $_GET['user_id']. If anything else, force the user ID to the
213
* current user's ID so they aren't left without a user to edit.
@@ -232,7 +232,7 @@ class BP_Members_Admin {
232
}
233
234
/**
235
- * Can the current user edit the one displayed
236
*
237
* self profile editing / or bp_moderate check.
238
* This might be replaced by more granular capabilities
@@ -240,6 +240,10 @@ class BP_Members_Admin {
240
*
241
* @access public
242
* @since BuddyPress (2.1.0)
243
*/
244
private function member_can_edit( $user_id = 0 ) {
245
$retval = false;
@@ -262,7 +266,7 @@ class BP_Members_Admin {
262
}
263
264
/**
265
- * Get admin notice when saving a user or member profile
266
*
267
* @since BuddyPress (2.1.0)
268
*
@@ -463,9 +467,7 @@ class BP_Members_Admin {
463
}
464
465
/**
466
- * Highlight the Users menu if on Edit Profile.
467
- *
468
- * + Check if on the user's admin profile
469
*
470
* @access public
471
* @since BuddyPress (2.1.0)
@@ -598,6 +600,11 @@ class BP_Members_Admin {
598
*
599
* @access public
600
* @since BuddyPress (2.0.0)
601
*/
602
public function profile_nav( $user = null, $active = 'WordPress' ) {
603
@@ -1151,8 +1158,9 @@ class BP_Members_Admin {
1151
* @access public
1152
* @since BuddyPress (2.0.0)
1153
*
1154
- * @param array $actions WordPress row actions (edit, delete).
1155
- * @param object $user The object for the user row.
1156
* @return array Merged actions.
1157
*/
1158
public function row_actions( $actions = '', $user = null ) {
@@ -1205,7 +1213,7 @@ class BP_Members_Admin {
1205
}
1206
1207
/**
1208
- * Add a filter to edit profile url in WP Admin Bar
1209
*
1210
* @access public
1211
* @since BuddyPress (2.1.0)
@@ -1215,12 +1223,18 @@ class BP_Members_Admin {
1215
}
1216
1217
/**
1218
- * Filter the profile url
1219
*
1220
* @access public
1221
* @since BuddyPress (2.1.0)
1222
*
1223
* @uses user_admin_url()
1224
*/
1225
public function filter_adminbar_profile_link( $profile_link = '', $url = '', $user_id = 0 ) {
1226
if ( ! is_super_admin( $user_id ) && is_admin() ) {
@@ -1230,7 +1244,7 @@ class BP_Members_Admin {
1230
}
1231
1232
/**
1233
- * Remove the filter to edit profile url in WP Admin Bar
1234
*
1235
* @access public
1236
* @since BuddyPress (2.1.0)
@@ -1247,10 +1261,11 @@ class BP_Members_Admin {
1247
* @access public
1248
* @since BuddyPress (2.0.0)
1249
*
1250
- * @param int $value
1251
- * @param string $option
1252
- * @param int $new_value
1253
- * @return int the pagination preferences
1254
*/
1255
public function signup_screen_options( $value = 0, $option = '', $new_value = 0 ) {
1256
if ( 'users_page_bp_signups_network_per_page' != $option && 'users_page_bp_signups_per_page' != $option ) {
@@ -1274,7 +1289,8 @@ class BP_Members_Admin {
1274
*
1275
* @since BuddyPress (2.0.0)
1276
*
1277
- * @param WP_User_Query $query The users query.
1278
* @return WP_User_Query The users query without the signups.
1279
*/
1280
public function remove_signups_from_user_query( $query = null ) {
@@ -1316,7 +1332,8 @@ class BP_Members_Admin {
1316
*
1317
* @since BuddyPress (2.0.0)
1318
*
1319
- * @param array $views WP List Table views.
1320
* @return array The views with the signup view added.
1321
*/
1322
public function signup_filter_view( $views = array() ) {
@@ -1343,8 +1360,9 @@ class BP_Members_Admin {
1343
*
1344
* @since BuddyPress (2.0.0)
1345
*
1346
- * @param string $class The name of the class to use.
1347
- * @param string $required The parent class.
1348
* @return WP_List_Table The List table.
1349
*/
1350
public static function get_list_table_class( $class = '', $required = '' ) {
@@ -1568,7 +1586,7 @@ class BP_Members_Admin {
1568
}
1569
1570
/**
1571
- * Get admin notice when viewing the sign-up page
1572
*
1573
* @since BuddyPress (2.1.0)
1574
*
@@ -1719,10 +1737,10 @@ class BP_Members_Admin {
1719
* Signups admin page router.
1720
*
1721
* Depending on the context, display
1722
- * - the list of signups
1723
- * - or the delete confirmation screen
1724
- * - or the activate confirmation screen
1725
- * - or the "resend" email confirmation screen
1726
*
1727
* Also prepare the admin notices.
1728
*
@@ -1863,6 +1881,8 @@ class BP_Members_Admin {
1863
* @since BuddyPress (2.0.0)
1864
*
1865
* @param string $action Delete, activate, or resend activation link.
1866
*/
1867
public function signups_admin_manage( $action = '' ) {
1868
if ( ! current_user_can( $this->capability ) || empty( $action ) ) {
207
}
208
209
/**
210
+ * Get the user ID.
211
*
212
* Look for $_GET['user_id']. If anything else, force the user ID to the
213
* current user's ID so they aren't left without a user to edit.
232
}
233
234
/**
235
+ * Can the current user edit the one displayed.
236
*
237
* self profile editing / or bp_moderate check.
238
* This might be replaced by more granular capabilities
240
*
241
* @access public
242
* @since BuddyPress (2.1.0)
243
+ *
244
+ * @param int $user_id ID of the user being checked for edit ability.
245
+ *
246
+ * @return bool
247
*/
248
private function member_can_edit( $user_id = 0 ) {
249
$retval = false;
266
}
267
268
/**
269
+ * Get admin notice when saving a user or member profile.
270
*
271
* @since BuddyPress (2.1.0)
272
*
467
}
468
469
/**
470
+ * Highlight the Users menu if on Edit Profile and check if on the user's admin profile.
471
*
472
* @access public
473
* @since BuddyPress (2.1.0)
600
*
601
* @access public
602
* @since BuddyPress (2.0.0)
603
+ *
604
+ * @param object|null $user User to create profile navigation for.
605
+ * @param string $active Which profile to highlight.
606
+ *
607
+ * @return string
608
*/
609
public function profile_nav( $user = null, $active = 'WordPress' ) {
610
1158
* @access public
1159
* @since BuddyPress (2.0.0)
1160
*
1161
+ * @param array|string $actions WordPress row actions (edit, delete).
1162
+ * @param object $user The object for the user row.
1163
+ *
1164
* @return array Merged actions.
1165
*/
1166
public function row_actions( $actions = '', $user = null ) {
1213
}
1214
1215
/**
1216
+ * Add a filter to edit profile url in WP Admin Bar.
1217
*
1218
* @access public
1219
* @since BuddyPress (2.1.0)
1223
}
1224
1225
/**
1226
+ * Filter the profile url.
1227
*
1228
* @access public
1229
* @since BuddyPress (2.1.0)
1230
*
1231
* @uses user_admin_url()
1232
+ *
1233
+ * @param string $profile_link Profile Link for admin bar.
1234
+ * @param string $url Profile URL.
1235
+ * @param int $user_id User ID.
1236
+ *
1237
+ * @return string
1238
*/
1239
public function filter_adminbar_profile_link( $profile_link = '', $url = '', $user_id = 0 ) {
1240
if ( ! is_super_admin( $user_id ) && is_admin() ) {
1244
}
1245
1246
/**
1247
+ * Remove the filter to edit profile url in WP Admin Bar.
1248
*
1249
* @access public
1250
* @since BuddyPress (2.1.0)
1261
* @access public
1262
* @since BuddyPress (2.0.0)
1263
*
1264
+ * @param int $value
1265
+ * @param string $option
1266
+ * @param int $new_value
1267
+ *
1268
+ * @return int The pagination preferences.
1269
*/
1270
public function signup_screen_options( $value = 0, $option = '', $new_value = 0 ) {
1271
if ( 'users_page_bp_signups_network_per_page' != $option && 'users_page_bp_signups_per_page' != $option ) {
1289
*
1290
* @since BuddyPress (2.0.0)
1291
*
1292
+ * @param WP_User_Query $query The users query.
1293
+ *
1294
* @return WP_User_Query The users query without the signups.
1295
*/
1296
public function remove_signups_from_user_query( $query = null ) {
1332
*
1333
* @since BuddyPress (2.0.0)
1334
*
1335
+ * @param array $views WP List Table views.
1336
+ *
1337
* @return array The views with the signup view added.
1338
*/
1339
public function signup_filter_view( $views = array() ) {
1360
*
1361
* @since BuddyPress (2.0.0)
1362
*
1363
+ * @param string $class The name of the class to use.
1364
+ * @param string $required The parent class.
1365
+ *
1366
* @return WP_List_Table The List table.
1367
*/
1368
public static function get_list_table_class( $class = '', $required = '' ) {
1586
}
1587
1588
/**
1589
+ * Get admin notice when viewing the sign-up page.
1590
*
1591
* @since BuddyPress (2.1.0)
1592
*
1737
* Signups admin page router.
1738
*
1739
* Depending on the context, display
1740
+ * - the list of signups,
1741
+ * - or the delete confirmation screen,
1742
+ * - or the activate confirmation screen,
1743
+ * - or the "resend" email confirmation screen.
1744
*
1745
* Also prepare the admin notices.
1746
*
1881
* @since BuddyPress (2.0.0)
1882
*
1883
* @param string $action Delete, activate, or resend activation link.
1884
+ *
1885
+ * @return string
1886
*/
1887
public function signups_admin_manage( $action = '' ) {
1888
if ( ! current_user_can( $this->capability ) || empty( $action ) ) {
bp-members/bp-members-adminbar.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
3
/**
4
- * BuddyPress Members Toolbar
5
*
6
* Handles the member functions related to the WordPress Toolbar.
7
*
1
<?php
2
3
/**
4
+ * BuddyPress Members Toolbar.
5
*
6
* Handles the member functions related to the WordPress Toolbar.
7
*
bp-members/bp-members-classes.php CHANGED
@@ -1,6 +1,6 @@
1
<?php
2
/**
3
- * BuddyPress Members Classes
4
*
5
* @package BuddyPress
6
* @subpackage MembersClasses
1
<?php
2
/**
3
+ * BuddyPress Members Classes.
4
*
5
* @package BuddyPress
6
* @subpackage MembersClasses
bp-members/bp-members-filters.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
3
/**
4
- * BuddyPress Members Filters
5
*
6
* Filters specific to the Members component.
7
*
@@ -57,15 +57,17 @@ function bp_members_signup_sanitization() {
57
add_action( 'bp_loaded', 'bp_members_signup_sanitization' );
58
59
/**
60
- * Make sure the username is not the blog slug in case of root profile & subdirectory blog
61
*
62
* If BP_ENABLE_ROOT_PROFILES is defined & multisite config is set to subdirectories,
63
* then there is a chance site.url/username == site.url/blogslug. If so, user's profile
64
* is not reachable, instead the blog is displayed. This filter makes sure the signup username
65
* is not the same than the blog slug for this particular config.
66
*
67
- * @since BuddyPress (2.1.0)
68
- * @param array $illegal_names
69
* @return array $illegal_names
70
*/
71
function bp_members_signup_with_subdirectory_blog( $illegal_names = array() ) {
@@ -98,9 +100,10 @@ add_filter( 'subdirectory_reserved_names', 'bp_members_signup_with_subdirectory_
98
*
99
* @since BuddyPress (1.6.0)
100
*
101
- * @param string $url WP profile edit URL.
102
- * @param int $user_id ID of the user.
103
* @param string $scheme
104
* @return string
105
*/
106
function bp_members_edit_profile_url( $url, $user_id, $scheme = 'admin' ) {
1
<?php
2
3
/**
4
+ * BuddyPress Members Filters.
5
*
6
* Filters specific to the Members component.
7
*
57
add_action( 'bp_loaded', 'bp_members_signup_sanitization' );
58
59
/**
60
+ * Make sure the username is not the blog slug in case of root profile & subdirectory blog.
61
*
62
* If BP_ENABLE_ROOT_PROFILES is defined & multisite config is set to subdirectories,
63
* then there is a chance site.url/username == site.url/blogslug. If so, user's profile
64
* is not reachable, instead the blog is displayed. This filter makes sure the signup username
65
* is not the same than the blog slug for this particular config.
66
*
67
+ * @since BuddyPress (2.1.0)
68
+ *
69
+ * @param array $illegal_names
70
+ *
71
* @return array $illegal_names
72
*/
73
function bp_members_signup_with_subdirectory_blog( $illegal_names = array() ) {
100
*
101
* @since BuddyPress (1.6.0)
102
*
103
+ * @param string $url WP profile edit URL.
104
+ * @param int $user_id ID of the user.
105
* @param string $scheme
106
+ *
107
* @return string
108
*/
109
function bp_members_edit_profile_url( $url, $user_id, $scheme = 'admin' ) {
bp-members/bp-members-functions.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
3
/**
4
- * BuddyPress Member Functions
5
*
6
* Functions specific to the members component.
7
*
@@ -75,7 +75,7 @@ add_action( 'bp_setup_globals', 'bp_core_define_slugs', 11 );
75
* need backward compatibility with BP_Core_User::get_users(), filter the
76
* bp_use_legacy_user_query value, returning true.
77
*
78
- * @param array $args {
79
* Array of arguments. All are optional. See {@link BP_User_Query} for
80
* a more complete description of arguments.
81
* @type string $type Sort order. Default: 'active'.
@@ -85,7 +85,7 @@ add_action( 'bp_setup_globals', 'bp_core_define_slugs', 11 );
85
* @type string $meta_key Limit to users with a meta_key. Default: false.
86
* @type string $meta_value Limit to users with a meta_value (with meta_key). Default: false.
87
* @type array|string $member_type Array or comma-separated string of member types.
88
- * @type mixed $include Limit results by user IDs. Default: false.
89
* @type int $per_page Results per page. Default: 20.
90
* @type int $page Page of results. Default: 1.
91
* @type bool $populate_extras Fetch optional extras. Default: true.
@@ -153,9 +153,11 @@ function bp_core_get_users( $args = '' ) {
153
/**
154
* Return the domain for the passed user: e.g. http://example.com/members/andy/.
155
*
156
- * @param int $user_id The ID of the user.
157
- * @param string $user_nicename Optional. user_nicename of the user.
158
- * @param string $user_login Optional. user_login of the user.
159
*/
160
function bp_core_get_user_domain( $user_id = 0, $user_nicename = false, $user_login = false ) {
161
@@ -193,6 +195,7 @@ function bp_core_get_user_domain( $user_id = 0, $user_nicename = false, $user_lo
193
* Fetch everything in the wp_users table for a user, without any usermeta.
194
*
195
* @param int $user_id The ID of the user.
196
* @return array
197
*/
198
function bp_core_get_core_userdata( $user_id = 0 ) {
@@ -223,6 +226,7 @@ function bp_core_get_core_userdata( $user_id = 0 ) {
223
* @todo Deprecate.
224
*
225
* @param string $user_login user_login of the user being queried.
226
* @return int
227
*/
228
function bp_core_get_displayed_userid( $user_login ) {
@@ -235,6 +239,7 @@ function bp_core_get_displayed_userid( $user_login ) {
235
* @since BuddyPress (1.0.0)
236
*
237
* @param string $username user_login to check.
238
* @return int|null The ID of the matched user on success, null on failure.
239
*/
240
function bp_core_get_userid( $username = '' ) {
@@ -261,6 +266,7 @@ function bp_core_get_userid( $username = '' ) {
261
* @since BuddyPress (1.2.3)
262
*
263
* @param string $user_nicename user_nicename to check.
264
* @return int|null The ID of the matched user on success, null on failure.
265
*/
266
function bp_core_get_userid_from_nicename( $user_nicename = '' ) {
@@ -287,9 +293,10 @@ function bp_core_get_userid_from_nicename( $user_nicename = '' ) {
287
* This function is sensitive to the BP_ENABLE_USERNAME_COMPATIBILITY_MODE,
288
* so it will return the user_login or user_nicename as appropriate.
289
*
290
- * @param int $user_id User ID to check.
291
- * @param string $user_nicename Optional. user_nicename of user being checked.
292
- * @param string $user_login Optional. user_login of user being checked.
293
* @return string|bool The username of the matched user, or false.
294
*/
295
function bp_core_get_username( $user_id = 0, $user_nicename = false, $user_login = false ) {
@@ -373,6 +380,7 @@ function bp_core_get_username( $user_id = 0, $user_nicename = false, $user_login
373
* @todo Refactor to use a WP core function, if possible.
374
*
375
* @param int $user_id User ID to check.
376
* @return string|bool The username of the matched user, or false.
377
*/
378
function bp_members_get_user_nicename( $user_id ) {
@@ -430,8 +438,9 @@ function bp_members_get_user_nicename( $user_id ) {
430
* Return the email address for the user based on user ID.
431
*
432
* @param int $uid User ID to check.
433
* @return string The email for the matched user. Empty string if no user
434
- * matched the $uid.
435
*/
436
function bp_core_get_user_email( $uid ) {
437
@@ -467,13 +476,14 @@ function bp_core_get_user_email( $uid ) {
467
*
468
* Optional parameters will return just the name or just the URL.
469
*
470
- * @param int $user_id User ID to check.
471
* @param bool $no_anchor Disable URL and HTML and just return full name.
472
- * Default: false.
473
* @param bool $just_link Disable full name and HTML and just return the URL
474
- * text. Default false.
475
* @return string|bool The link text based on passed parameters, or false on
476
- * no match.
477
*/
478
function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false ) {
479
$display_name = bp_core_get_user_displayname( $user_id );
@@ -514,6 +524,8 @@ function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false
514
* @since BuddyPress (2.0.0)
515
*
516
* @param array $user_ids
517
*/
518
function bp_core_get_user_displaynames( $user_ids ) {
519
@@ -592,8 +604,9 @@ function bp_core_get_user_displaynames( $user_ids ) {
592
* Fetch the display name for a user.
593
*
594
* @param int|string $user_id_or_username User ID or username.
595
* @return string|bool The display name for the user in question, or false if
596
- * user not found.
597
*/
598
function bp_core_get_user_displayname( $user_id_or_username ) {
599
if ( empty( $user_id_or_username ) ) {
@@ -637,6 +650,7 @@ add_filter( 'bp_core_get_user_displayname', 'esc_html' );
637
* Return the user link for the user based on user email address.
638
*
639
* @param string $email The email address for the user.
640
* @return string The link to the users home base. False on no match.
641
*/
642
function bp_core_get_userlink_by_email( $email ) {
@@ -656,7 +670,9 @@ function bp_core_get_userlink_by_email( $email ) {
656
* Return the user link for the user based on the supplied identifier.
657
*
658
* @param string $username If BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set,
659
- * this should be user_login, otherwise it should be user_nicename.
660
* @return string|bool The link to the user's domain, false on no match.
661
*/
662
function bp_core_get_userlink_by_username( $username ) {
@@ -707,9 +723,9 @@ function bp_core_get_total_member_count() {
707
}
708
709
/**
710
- * Return the total number of members, limited to those members with last_activity
711
*
712
- * @return int The number of active members
713
*/
714
function bp_core_get_active_member_count() {
715
global $wpdb;
@@ -753,12 +769,14 @@ function bp_core_get_active_member_count() {
753
*
754
* @since BuddyPress (1.6.0)
755
*
756
- * @param int $user_id The ID of the user being spammed/hammed.
757
- * @param string $status 'spam' if being marked as spam, 'ham' otherwise.
758
- * @param bool $do_wp_cleanup True to force the cleanup of WordPress content
759
- * and status, otherwise false. Generally, this should only be false if
760
- * WordPress is expected to have performed this cleanup independently,
761
- * as when hooked to 'make_spam_user'.
762
* @return bool True on success, false on failure.
763
*/
764
function bp_core_process_spammer_status( $user_id, $status, $do_wp_cleanup = true ) {
@@ -883,7 +901,6 @@ function bp_core_process_spammer_status( $user_id, $status, $do_wp_cleanup = tru
883
884
return true;
885
}
886
-
887
/**
888
* Hook to WP's make_spam_user and run our custom BP spam functions.
889
*
@@ -912,6 +929,7 @@ add_action( 'make_ham_user', 'bp_core_mark_user_ham_admin' );
912
* Check whether a user has been marked as a spammer.
913
*
914
* @param int $user_id The ID for the user.
915
* @return bool True if spammer, otherwise false.
916
*/
917
function bp_is_user_spammer( $user_id = 0 ) {
@@ -976,6 +994,7 @@ function bp_is_user_spammer( $user_id = 0 ) {
976
* Check whether a user has been marked as deleted.
977
*
978
* @param int $user_id The ID for the user.
979
* @return bool True if deleted, otherwise false.
980
*/
981
function bp_is_user_deleted( $user_id = 0 ) {
@@ -1047,6 +1066,7 @@ function bp_is_user_deleted( $user_id = 0 ) {
1047
* @uses bp_is_user_deleted() To check if user is deleted
1048
*
1049
* @param int $user_id The user ID to check.
1050
* @return bool True if active, otherwise false.
1051
*/
1052
function bp_is_user_active( $user_id = 0 ) {
@@ -1083,11 +1103,12 @@ function bp_is_user_active( $user_id = 0 ) {
1083
* @todo No need for the user fallback checks, since they're done in
1084
* bp_is_user_active().
1085
*
1086
- * @uses is_user_logged_in() To check if user is logged in
1087
- * @uses bp_get_displayed_user_id() To get current user ID
1088
- * @uses bp_is_user_active() To check if user is active
1089
*
1090
* @param int $user_id The user ID to check.
1091
* @return bool True if inactive, otherwise false.
1092
*/
1093
function bp_is_user_inactive( $user_id = 0 ) {
@@ -1111,8 +1132,9 @@ function bp_is_user_inactive( $user_id = 0 ) {
1111
*
1112
* @since BuddyPress (1.9.0)
1113
*
1114
- * @param int $user_id ID of the user being updated.
1115
- * @param string $time Time of last activity, in 'Y-m-d H:i:s' format.
1116
* @return bool True on success, false on failure.
1117
*/
1118
function bp_update_user_last_activity( $user_id = 0, $time = '' ) {
@@ -1156,9 +1178,11 @@ function bp_update_user_last_activity( $user_id = 0, $time = '' ) {
1156
*
1157
* @access private For internal use only.
1158
*
1159
- * @param null $retval
1160
- * @param int $object_id ID of the user.
1161
- * @param string $meta_key Meta key being fetched.
1162
*/
1163
function _bp_get_user_meta_last_activity_warning( $retval, $object_id, $meta_key ) {
1164
static $warned = false;
@@ -1189,9 +1213,9 @@ add_filter( 'get_user_metadata', '_bp_get_user_meta_last_activity_warning', 10,
1189
*
1190
* @access private For internal use only.
1191
*
1192
- * @param int $meta_id ID of the just-set usermeta row.
1193
- * @param int $object_id ID of the user.
1194
- * @param string $meta_key Meta key being fetched.
1195
* @param string $meta_value Active time.
1196
*/
1197
function _bp_update_user_meta_last_activity_warning( $meta_id, $object_id, $meta_key, $meta_value ) {
@@ -1206,8 +1230,9 @@ add_filter( 'update_user_metadata', '_bp_update_user_meta_last_activity_warning'
1206
* Get the last activity for a given user.
1207
*
1208
* @param int $user_id The ID of the user.
1209
* @return string Time of last activity, in 'Y-m-d H:i:s' format, or an empty
1210
- * string if none is found.
1211
*/
1212
function bp_get_user_last_activity( $user_id = 0 ) {
1213
$activity = '';
@@ -1265,6 +1290,7 @@ function bp_last_activity_migrate() {
1265
* @todo Deprecate.
1266
*
1267
* @param int $user_id ID of the user being queried.
1268
* @return array Post IDs.
1269
*/
1270
function bp_core_get_all_posts_for_user( $user_id = 0 ) {
@@ -1283,7 +1309,7 @@ function bp_core_get_all_posts_for_user( $user_id = 0 ) {
1283
* Primarily used for self-deletions, as requested through Settings.
1284
*
1285
* @param int $user_id Optional. ID of the user to be deleted. Default: the
1286
- * logged-in user.
1287
* @return bool True on success, false on failure.
1288
*/
1289
function bp_core_delete_account( $user_id = 0 ) {
@@ -1352,6 +1378,7 @@ function bp_core_delete_account( $user_id = 0 ) {
1352
* @since BuddyPress (1.9.0)
1353
*
1354
* @param int $user_id ID of the user who is about to be deleted.
1355
* @return bool True on success, false on failure.
1356
*/
1357
function bp_core_delete_avatar_on_user_delete( $user_id ) {
@@ -1369,6 +1396,7 @@ add_action( 'delete_user', 'bp_core_delete_avatar_on_user_delete' );
1369
* Uses multibyte functions when available on the PHP build.
1370
*
1371
* @param string $str String to be upper-cased.
1372
* @return string
1373
*/
1374
function bp_core_ucfirst( $str ) {
@@ -1389,9 +1417,10 @@ function bp_core_ucfirst( $str ) {
1389
* @since BuddyPress (1.1.2)
1390
*
1391
* @param WP_User|WP_Error $user Either the WP_User object or the WP_Error
1392
- * object, as passed to the 'authenticate' filter.
1393
* @return WP_User|WP_Error If the user is not a spammer, return the WP_User
1394
- * object. Otherwise a new WP_Error object.
1395
*/
1396
function bp_core_boot_spammer( $user ) {
1397
@@ -1462,9 +1491,10 @@ function bp_core_flush_illegal_names() {
1462
/**
1463
* Add BuddyPress-specific items to the illegal_names array.
1464
*
1465
- * @param array|string $value Illegal names as being saved defined in
1466
- * Multisite settings.
1467
* @param array|string $oldvalue The old value of the option.
1468
* @return array Merged and unique array of illegal names.
1469
*/
1470
function bp_core_get_illegal_names( $value = '', $oldvalue = '' ) {
@@ -1554,9 +1584,10 @@ add_filter( 'pre_update_site_option_illegal_names', 'bp_core_get_illegal_names',
1554
*
1555
* @since BuddyPress (1.6.2)
1556
*
1557
- * @param string $user_email The email being checked
1558
* @return bool|array True if the address passes all checks; otherwise an array
1559
- * of error codes.
1560
*/
1561
function bp_core_validate_email_address( $user_email ) {
1562
$errors = array();
@@ -1605,9 +1636,9 @@ function bp_core_validate_email_address( $user_email ) {
1605
*
1606
* @see bp_core_validate_email_address()
1607
*
1608
- * @param WP_Error $errors WP_Error object.
1609
- * @param array $validation_results The return value of a validation function
1610
- * like bp_core_validate_email_address().
1611
*/
1612
function bp_core_add_validation_error_messages( WP_Error $errors, $validation_results ) {
1613
if ( ! empty( $validation_results['invalid'] ) ) {
@@ -1630,8 +1661,9 @@ function bp_core_add_validation_error_messages( WP_Error $errors, $validation_re
1630
/**
1631
* Validate a user name and email address when creating a new user.
1632
*
1633
- * @param string $user_name Username to validate.
1634
* @param string $user_email Email address to validate.
1635
* @return array Results of user validation including errors, if any.
1636
*/
1637
function bp_core_validate_user_signup( $user_name, $user_email ) {
@@ -1735,8 +1767,9 @@ function bp_core_validate_user_signup( $user_name, $user_email ) {
1735
*
1736
* @todo Why do we have this wrapper?
1737
*
1738
- * @param string $blog_url Blog URL requested during registration.
1739
* @param string $blog_title Blog title requested during registration.
1740
* @return array
1741
*/
1742
function bp_core_validate_blog_signup( $blog_url, $blog_title ) {
@@ -1759,11 +1792,12 @@ function bp_core_validate_blog_signup( $blog_url, $blog_title ) {
1759
*
1760
* @todo There appears to be a bug in the return value on success.
1761
*
1762
- * @param string $user_login Login name requested by the user.
1763
* @param string $user_password Password requested by the user.
1764
- * @param string $user_email Email address entered by the user.
1765
- * @param array $usermeta Miscellaneous metadata about the user (blog-specific
1766
- * signup data, xprofile data, etc).
1767
* @return bool|WP_Error True on success, WP_Error on failure.
1768
*/
1769
function bp_core_signup_user( $user_login, $user_password, $user_email, $usermeta ) {
@@ -1855,11 +1889,13 @@ function bp_core_signup_user( $user_login, $user_password, $user_email, $usermet
1855
* Create a blog and user based on data supplied at user registration.
1856
*
1857
* @param string $blog_domain Domain requested by user.
1858
- * @param string $blog_path Path requested by user.
1859
- * @param string $blog_title Title as entered by user.
1860
- * @param string $user_name user_login of requesting user.
1861
- * @param string $user_email Email address of requesting user.
1862
- * @param string $usermeta Miscellaneous metadata for the user.
1863
*/
1864
function bp_core_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) {
1865
if ( ! is_multisite() || ! function_exists( 'wpmu_signup_blog' ) ) {
@@ -1883,6 +1919,7 @@ function bp_core_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name,
1883
* Activate a signup, as identified by an activation key.
1884
*
1885
* @param string $key Activation key.
1886
* @return int|bool User ID on success, false on failure.
1887
*/
1888
function bp_core_activate_signup( $key ) {
@@ -2124,6 +2161,8 @@ function bp_members_migrate_signups() {
2124
* during normal registration, XProfile data is provided directly by the user.
2125
*
2126
* @param int $user_id ID of the user.
2127
*/
2128
function bp_core_map_user_registration( $user_id ) {
2129
@@ -2186,9 +2225,9 @@ function bp_core_signup_avatar_upload_dir() {
2186
/**
2187
* Send activation email to a newly registered user.
2188
*
2189
- * @param int $user_id ID of the new user.
2190
* @param string $user_email Email address of the new user.
2191
- * @param string $key Activation key.
2192
*/
2193
function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
2194
$activate_url = trailingslashit( bp_get_activation_page() ) . "{$key}/";
@@ -2247,12 +2286,13 @@ function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
2247
/**
2248
* Display a "resend email" link when an unregistered user attempts to log in.
2249
*
2250
- * @param WP_User|WP_Error $user Either the WP_User or the WP_Error object
2251
- * @param string $username The inputted, attempted username.
2252
- * @param string $password The inputted, attempted password.
2253
- * @return WP_User|WP_Error
2254
- *
2255
* @since BuddyPress (1.2.2)
2256
*/
2257
function bp_core_signup_disable_inactive( $user = null, $username = '', $password ='' ) {
2258
// login form not used
@@ -2525,7 +2565,8 @@ function bp_register_member_type( $member_type, $args = array() ) {
2525
*
2526
* @since BuddyPress (2.2.0)
2527
*
2528
- * @param string $member_type The name of the member type.
2529
* @return object A member type object.
2530
*/
2531
function bp_get_member_type_object( $member_type ) {
@@ -2552,6 +2593,7 @@ function bp_get_member_type_object( $member_type ) {
2552
* @param string $operator Optional. The logical operation to perform. 'or' means only one
2553
* element from the array needs to match; 'and' means all elements
2554
* must match. Accepts 'or' or 'and'. Default 'and'.
2555
* @return array A list of member type names or objects.
2556
*/
2557
function bp_get_member_types( $args = array(), $output = 'names', $operator = 'and' ) {
@@ -2659,9 +2701,10 @@ function bp_remove_member_type( $user_id, $member_type ) {
2659
*
2660
* @since BuddyPress (2.2.0)
2661
*
2662
- * @param int $user_id ID of the user.
2663
- * @param bool $single Optional. Whether to return a single type string. If multiple types are found
2664
- * for the user, the oldest one will be returned. Default: true.
2665
* @return string|array|bool On success, returns a single member type (if $single is true) or an array of member
2666
* types (if $single is false). Returns false on failure.
2667
*/
@@ -2703,8 +2746,9 @@ function bp_get_member_type( $user_id, $single = true ) {
2703
*
2704
* @since BuddyPress (2.3.0)
2705
*
2706
- * @param int $user_id $user_id ID of the user.
2707
- * @param string $member_type Member Type.
2708
* @return bool Whether the user has the given member type.
2709
*/
2710
function bp_has_member_type( $user_id, $member_type ) {
@@ -2728,7 +2772,8 @@ function bp_has_member_type( $user_id, $member_type ) {
2728
*
2729
* @since BuddyPress (2.2.0)
2730
*
2731
- * @param int $user_id ID of the user.
2732
* @return See {@see bp_set_member_type()}.
2733
*/
2734
function bp_remove_member_type_on_user_delete( $user_id ) {
1
<?php
2
3
/**
4
+ * BuddyPress Member Functions.
5
*
6
* Functions specific to the members component.
7
*
75
* need backward compatibility with BP_Core_User::get_users(), filter the
76
* bp_use_legacy_user_query value, returning true.
77
*
78
+ * @param array|string $args {
79
* Array of arguments. All are optional. See {@link BP_User_Query} for
80
* a more complete description of arguments.
81
* @type string $type Sort order. Default: 'active'.
85
* @type string $meta_key Limit to users with a meta_key. Default: false.
86
* @type string $meta_value Limit to users with a meta_value (with meta_key). Default: false.
87
* @type array|string $member_type Array or comma-separated string of member types.
88
+ * @type mixed $include Limit results by user IDs. Default: false.
89
* @type int $per_page Results per page. Default: 20.
90
* @type int $page Page of results. Default: 1.
91
* @type bool $populate_extras Fetch optional extras. Default: true.
153
/**
154
* Return the domain for the passed user: e.g. http://example.com/members/andy/.
155
*
156
+ * @param int $user_id The ID of the user.
157
+ * @param string|bool $user_nicename Optional. user_nicename of the user.
158
+ * @param string|bool $user_login Optional. user_login of the user.
159
+ *
160
+ * @return string
161
*/
162
function bp_core_get_user_domain( $user_id = 0, $user_nicename = false, $user_login = false ) {
163
195
* Fetch everything in the wp_users table for a user, without any usermeta.
196
*
197
* @param int $user_id The ID of the user.
198
+ *
199
* @return array
200
*/
201
function bp_core_get_core_userdata( $user_id = 0 ) {
226
* @todo Deprecate.
227
*
228
* @param string $user_login user_login of the user being queried.
229
+ *
230
* @return int
231
*/
232
function bp_core_get_displayed_userid( $user_login ) {
239
* @since BuddyPress (1.0.0)
240
*
241
* @param string $username user_login to check.
242
+ *
243
* @return int|null The ID of the matched user on success, null on failure.
244
*/
245
function bp_core_get_userid( $username = '' ) {
266
* @since BuddyPress (1.2.3)
267
*
268
* @param string $user_nicename user_nicename to check.
269
+ *
270
* @return int|null The ID of the matched user on success, null on failure.
271
*/
272
function bp_core_get_userid_from_nicename( $user_nicename = '' ) {
293
* This function is sensitive to the BP_ENABLE_USERNAME_COMPATIBILITY_MODE,
294
* so it will return the user_login or user_nicename as appropriate.
295
*
296
+ * @param int $user_id User ID to check.
297
+ * @param string|bool $user_nicename Optional. user_nicename of user being checked.
298
+ * @param string|bool $user_login Optional. user_login of user being checked.
299
+ *
300
* @return string|bool The username of the matched user, or false.
301
*/
302
function bp_core_get_username( $user_id = 0, $user_nicename = false, $user_login = false ) {
380
* @todo Refactor to use a WP core function, if possible.
381
*
382
* @param int $user_id User ID to check.
383
+ *
384
* @return string|bool The username of the matched user, or false.
385
*/
386
function bp_members_get_user_nicename( $user_id ) {
438
* Return the email address for the user based on user ID.
439
*
440
* @param int $uid User ID to check.
441
+ *
442
* @return string The email for the matched user. Empty string if no user
443
+ * matched the $uid.
444
*/
445
function bp_core_get_user_email( $uid ) {
446
476
*
477
* Optional parameters will return just the name or just the URL.
478
*
479
+ * @param int $user_id User ID to check.
480
* @param bool $no_anchor Disable URL and HTML and just return full name.
481
+ * Default: false.
482
* @param bool $just_link Disable full name and HTML and just return the URL
483
+ * text. Default false.
484
+ *
485
* @return string|bool The link text based on passed parameters, or false on
486
+ * no match.
487
*/
488
function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false ) {
489
$display_name = bp_core_get_user_displayname( $user_id );
524
* @since BuddyPress (2.0.0)
525
*
526
* @param array $user_ids
527
+ *
528
+ * @return array
529
*/
530
function bp_core_get_user_displaynames( $user_ids ) {
531
604
* Fetch the display name for a user.
605
*
606
* @param int|string $user_id_or_username User ID or username.
607
+ *
608
* @return string|bool The display name for the user in question, or false if
609
+ * user not found.
610
*/
611
function bp_core_get_user_displayname( $user_id_or_username ) {
612
if ( empty( $user_id_or_username ) ) {
650
* Return the user link for the user based on user email address.
651
*
652
* @param string $email The email address for the user.
653
+ *
654
* @return string The link to the users home base. False on no match.
655
*/
656
function bp_core_get_userlink_by_email( $email ) {
670
* Return the user link for the user based on the supplied identifier.
671
*
672
* @param string $username If BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set,
673
+ * this should be user_login, otherwise it should
674
+ * be user_nicename.
675
+ *
676
* @return string|bool The link to the user's domain, false on no match.
677
*/
678
function bp_core_get_userlink_by_username( $username ) {
723
}
724
725
/**
726
+ * Return the total number of members, limited to those members with last_activity.
727
*
728
+ * @return int The number of active members.
729
*/
730
function bp_core_get_active_member_count() {
731
global $wpdb;
769
*
770
* @since BuddyPress (1.6.0)
771
*
772
+ * @param int $user_id The ID of the user being spammed/hammed.
773
+ * @param string $status 'spam' if being marked as spam, 'ham' otherwise.
774
+ * @param bool $do_wp_cleanup True to force the cleanup of WordPress content
775
+ * and status, otherwise false. Generally, this should
776
+ * only be false if WordPress is expected to have
777
+ * performed this cleanup independently, as when hooked
778
+ * to 'make_spam_user'.
779
+ *
780
* @return bool True on success, false on failure.
781
*/
782
function bp_core_process_spammer_status( $user_id, $status, $do_wp_cleanup = true ) {
901
902
return true;
903
}
904
/**
905
* Hook to WP's make_spam_user and run our custom BP spam functions.
906
*
929
* Check whether a user has been marked as a spammer.
930
*
931
* @param int $user_id The ID for the user.
932
+ *
933
* @return bool True if spammer, otherwise false.
934
*/
935
function bp_is_user_spammer( $user_id = 0 ) {
994
* Check whether a user has been marked as deleted.
995
*
996
* @param int $user_id The ID for the user.
997
+ *
998
* @return bool True if deleted, otherwise false.
999
*/
1000
function bp_is_user_deleted( $user_id = 0 ) {
1066
* @uses bp_is_user_deleted() To check if user is deleted
1067
*
1068
* @param int $user_id The user ID to check.
1069
+ *
1070
* @return bool True if active, otherwise false.
1071
*/
1072
function bp_is_user_active( $user_id = 0 ) {
1103
* @todo No need for the user fallback checks, since they're done in
1104
* bp_is_user_active().
1105
*
1106
+ * @uses is_user_logged_in() To check if user is logged in.
1107
+ * @uses bp_get_displayed_user_id() To get current user ID.
1108
+ * @uses bp_is_user_active() To check if user is active.
1109
*
1110
* @param int $user_id The user ID to check.
1111
+ *
1112
* @return bool True if inactive, otherwise false.
1113
*/
1114
function bp_is_user_inactive( $user_id = 0 ) {
1132
*
1133
* @since BuddyPress (1.9.0)
1134
*
1135
+ * @param int $user_id ID of the user being updated.
1136
+ * @param string $time Time of last activity, in 'Y-m-d H:i:s' format.
1137
+ *
1138
* @return bool True on success, false on failure.
1139
*/
1140
function bp_update_user_last_activity( $user_id = 0, $time = '' ) {
1178
*
1179
* @access private For internal use only.
1180
*
1181
+ * @param null $retval
1182
+ * @param int $object_id ID of the user.
1183
+ * @param string $meta_key Meta key being fetched.
1184
+ *
1185
+ * @return mixed
1186
*/
1187
function _bp_get_user_meta_last_activity_warning( $retval, $object_id, $meta_key ) {
1188
static $warned = false;
1213
*
1214
* @access private For internal use only.
1215
*
1216
+ * @param int $meta_id ID of the just-set usermeta row.
1217
+ * @param int $object_id ID of the user.
1218
+ * @param string $meta_key Meta key being fetched.
1219
* @param string $meta_value Active time.
1220
*/
1221
function _bp_update_user_meta_last_activity_warning( $meta_id, $object_id, $meta_key, $meta_value ) {
1230
* Get the last activity for a given user.
1231
*
1232
* @param int $user_id The ID of the user.
1233
+ *
1234
* @return string Time of last activity, in 'Y-m-d H:i:s' format, or an empty
1235
+ * string if none is found.
1236
*/
1237
function bp_get_user_last_activity( $user_id = 0 ) {
1238
$activity = '';
1290
* @todo Deprecate.
1291
*
1292
* @param int $user_id ID of the user being queried.
1293
+ *
1294
* @return array Post IDs.
1295
*/
1296
function bp_core_get_all_posts_for_user( $user_id = 0 ) {
1309
* Primarily used for self-deletions, as requested through Settings.
1310
*
1311
* @param int $user_id Optional. ID of the user to be deleted. Default: the
1312
+ * logged-in user.
1313
* @return bool True on success, false on failure.
1314
*/
1315
function bp_core_delete_account( $user_id = 0 ) {
1378
* @since BuddyPress (1.9.0)
1379
*
1380
* @param int $user_id ID of the user who is about to be deleted.
1381
+ *
1382
* @return bool True on success, false on failure.
1383
*/
1384
function bp_core_delete_avatar_on_user_delete( $user_id ) {
1396
* Uses multibyte functions when available on the PHP build.
1397
*
1398
* @param string $str String to be upper-cased.
1399
+ *
1400
* @return string
1401
*/
1402
function bp_core_ucfirst( $str ) {
1417
* @since BuddyPress (1.1.2)
1418
*
1419
* @param WP_User|WP_Error $user Either the WP_User object or the WP_Error
1420
+ * object, as passed to the 'authenticate' filter.
1421
+ *
1422
* @return WP_User|WP_Error If the user is not a spammer, return the WP_User
1423
+ * object. Otherwise a new WP_Error object.
1424
*/
1425
function bp_core_boot_spammer( $user ) {
1426
1491
/**
1492
* Add BuddyPress-specific items to the illegal_names array.
1493
*
1494
+ * @param array|string $value Illegal names as being saved defined in
1495
+ * Multisite settings.
1496
* @param array|string $oldvalue The old value of the option.
1497
+ *
1498
* @return array Merged and unique array of illegal names.
1499
*/
1500
function bp_core_get_illegal_names( $value = '', $oldvalue = '' ) {
1584
*
1585
* @since BuddyPress (1.6.2)
1586
*
1587
+ * @param string $user_email The email being checked.
1588
+ *
1589
* @return bool|array True if the address passes all checks; otherwise an array
1590
+ * of error codes.
1591
*/
1592
function bp_core_validate_email_address( $user_email ) {
1593
$errors = array();
1636
*
1637
* @see bp_core_validate_email_address()
1638
*
1639
+ * @param WP_Error $errors WP_Error object.
1640
+ * @param array $validation_results The return value of a validation function
1641
+ * like bp_core_validate_email_address().
1642
*/
1643
function bp_core_add_validation_error_messages( WP_Error $errors, $validation_results ) {
1644
if ( ! empty( $validation_results['invalid'] ) ) {
1661
/**
1662
* Validate a user name and email address when creating a new user.
1663
*
1664
+ * @param string $user_name Username to validate.
1665
* @param string $user_email Email address to validate.
1666
+ *
1667
* @return array Results of user validation including errors, if any.
1668
*/
1669
function bp_core_validate_user_signup( $user_name, $user_email ) {
1767
*
1768
* @todo Why do we have this wrapper?
1769
*
1770
+ * @param string $blog_url Blog URL requested during registration.
1771
* @param string $blog_title Blog title requested during registration.
1772
+ *
1773
* @return array
1774
*/
1775
function bp_core_validate_blog_signup( $blog_url, $blog_title ) {
1792
*
1793
* @todo There appears to be a bug in the return value on success.
1794
*
1795
+ * @param string $user_login Login name requested by the user.
1796
* @param string $user_password Password requested by the user.
1797
+ * @param string $user_email Email address entered by the user.
1798
+ * @param array $usermeta Miscellaneous metadata about the user (blog-specific
1799
+ * signup data, xprofile data, etc).
1800
+ *
1801
* @return bool|WP_Error True on success, WP_Error on failure.
1802
*/
1803
function bp_core_signup_user( $user_login, $user_password, $user_email, $usermeta ) {
1889
* Create a blog and user based on data supplied at user registration.
1890
*
1891
* @param string $blog_domain Domain requested by user.
1892
+ * @param string $blog_path Path requested by user.
1893
+ * @param string $blog_title Title as entered by user.
1894
+ * @param string $user_name user_login of requesting user.
1895
+ * @param string $user_email Email address of requesting user.
1896
+ * @param string $usermeta Miscellaneous metadata for the user.
1897
+ *
1898
+ * @return bool
1899
*/
1900
function bp_core_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) {
1901
if ( ! is_multisite() || ! function_exists( 'wpmu_signup_blog' ) ) {
1919
* Activate a signup, as identified by an activation key.
1920
*
1921
* @param string $key Activation key.
1922
+ *
1923
* @return int|bool User ID on success, false on failure.
1924
*/
1925
function bp_core_activate_signup( $key ) {
2161
* during normal registration, XProfile data is provided directly by the user.
2162
*
2163
* @param int $user_id ID of the user.
2164
+ *
2165
+ * @return bool
2166
*/
2167
function bp_core_map_user_registration( $user_id ) {
2168
2225
/**
2226
* Send activation email to a newly registered user.
2227
*
2228
+ * @param int $user_id ID of the new user.
2229
* @param string $user_email Email address of the new user.
2230
+ * @param string $key Activation key.
2231
*/
2232
function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
2233
$activate_url = trailingslashit( bp_get_activation_page() ) . "{$key}/";
2286
/**
2287
* Display a "resend email" link when an unregistered user attempts to log in.
2288
*
2289
* @since BuddyPress (1.2.2)
2290
+ *
2291
+ * @param WP_User|WP_Error $user Either the WP_User or the WP_Error object.
2292
+ * @param string $username The inputted, attempted username.
2293
+ * @param string $password The inputted, attempted password.
2294
+ *
2295
+ * @return WP_User|WP_Error
2296
*/
2297
function bp_core_signup_disable_inactive( $user = null, $username = '', $password ='' ) {
2298
// login form not used
2565
*
2566
* @since BuddyPress (2.2.0)
2567
*
2568
+ * @param string $member_type The name of the member type.
2569
+ *
2570
* @return object A member type object.
2571
*/
2572
function bp_get_member_type_object( $member_type ) {
2593
* @param string $operator Optional. The logical operation to perform. 'or' means only one
2594
* element from the array needs to match; 'and' means all elements
2595
* must match. Accepts 'or' or 'and'. Default 'and'.
2596
+ *
2597
* @return array A list of member type names or objects.
2598
*/
2599
function bp_get_member_types( $args = array(), $output = 'names', $operator = 'and' ) {
2701
*
2702
* @since BuddyPress (2.2.0)
2703
*
2704
+ * @param int $user_id ID of the user.
2705
+ * @param bool $single Optional. Whether to return a single type string. If multiple types are found
2706
+ * for the user, the oldest one will be returned. Default: true.
2707
+ *
2708
* @return string|array|bool On success, returns a single member type (if $single is true) or an array of member
2709
* types (if $single is false). Returns false on failure.
2710
*/
2746
*
2747
* @since BuddyPress (2.3.0)