BuddyPress - Version 2.8.2

Version Description

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

Download this release

Release Info

Developer boonebgorges
Plugin Icon 128x128 BuddyPress
Version 2.8.2
Comparing to
See all releases

Code changes from version 2.1.4 to 2.8.2

Files changed (767) hide show
  1. bp-activity/admin/css/admin-rtl.css +7 -0
  2. bp-activity/admin/css/admin-rtl.min.css +1 -1
  3. bp-activity/admin/css/admin.css +7 -0
  4. bp-activity/admin/css/admin.min.css +1 -1
  5. bp-activity/admin/js/admin.js +11 -9
  6. bp-activity/admin/js/admin.min.js +1 -2
  7. bp-activity/bp-activity-actions.php +391 -211
  8. bp-activity/bp-activity-admin.php +279 -817
  9. bp-activity/bp-activity-adminbar.php +47 -0
  10. bp-activity/bp-activity-akismet.php +29 -588
  11. bp-activity/bp-activity-cache.php +35 -10
  12. bp-activity/bp-activity-cssjs.php +36 -8
  13. bp-activity/bp-activity-embeds.php +352 -0
  14. bp-activity/bp-activity-filters.php +360 -108
  15. bp-activity/bp-activity-functions.php +2392 -600
  16. bp-activity/bp-activity-loader.php +5 -353
  17. bp-activity/bp-activity-notifications.php +248 -302
  18. bp-activity/bp-activity-screens.php +170 -248
  19. bp-activity/bp-activity-template.php +1515 -1355
  20. bp-activity/{bp-activity-classes.php → classes/class-bp-activity-activity.php} +868 -758
  21. bp-activity/classes/class-bp-activity-component.php +384 -0
  22. bp-activity/classes/class-bp-activity-feed.php +468 -0
  23. bp-activity/classes/class-bp-activity-list-table.php +858 -0
  24. bp-activity/classes/class-bp-activity-oembed-extension.php +329 -0
  25. bp-activity/classes/class-bp-activity-query.php +247 -0
  26. bp-activity/classes/class-bp-activity-template.php +408 -0
  27. bp-activity/classes/class-bp-activity-theme-compat.php +180 -0
  28. bp-activity/classes/class-bp-akismet.php +651 -0
  29. bp-activity/css/mentions-rtl.css +19 -7
  30. bp-activity/css/mentions-rtl.min.css +1 -1
  31. bp-activity/css/mentions.css +20 -7
  32. bp-activity/css/mentions.min.css +1 -1
  33. bp-activity/js/mentions.js +81 -30
  34. bp-activity/js/mentions.min.js +1 -2
  35. bp-blogs/bp-blogs-actions.php +7 -7
  36. bp-blogs/bp-blogs-activity.php +732 -279
  37. bp-blogs/bp-blogs-cache.php +20 -28
  38. bp-blogs/bp-blogs-filters.php +94 -11
  39. bp-blogs/bp-blogs-functions.php +654 -684
  40. bp-blogs/bp-blogs-loader.php +7 -239
  41. bp-blogs/bp-blogs-screens.php +20 -178
  42. bp-blogs/bp-blogs-template.php +628 -414
  43. bp-blogs/bp-blogs-widgets.php +7 -122
  44. bp-blogs/{bp-blogs-classes.php → classes/class-bp-blogs-blog.php} +237 -103
  45. bp-blogs/classes/class-bp-blogs-component.php +317 -0
  46. bp-blogs/classes/class-bp-blogs-recent-posts-widget.php +164 -0
  47. bp-blogs/classes/class-bp-blogs-template.php +246 -0
  48. bp-blogs/classes/class-bp-blogs-theme-compat.php +201 -0
  49. bp-core/admin/bp-core-actions.php +0 -174
  50. bp-core/admin/bp-core-admin-actions.php +236 -0
  51. bp-core/admin/{bp-core-components.php → bp-core-admin-components.php} +107 -149
  52. bp-core/admin/{bp-core-functions.php → bp-core-admin-functions.php} +444 -194
  53. bp-core/admin/{bp-core-schema.php → bp-core-admin-schema.php} +128 -102
  54. bp-core/admin/{bp-core-settings.php → bp-core-admin-settings.php} +117 -76
  55. bp-core/admin/{bp-core-slugs.php → bp-core-admin-slugs.php} +105 -50
  56. bp-core/admin/{bp-core-tools.php → bp-core-admin-tools.php} +173 -73
  57. bp-core/admin/css/common-rtl.css +474 -273
  58. bp-core/admin/css/common-rtl.min.css +1 -1
  59. bp-core/admin/css/common.css +474 -273
  60. bp-core/admin/css/common.min.css +1 -1
  61. bp-core/admin/css/customizer-controls-rtl.css +10 -0
  62. bp-core/admin/css/customizer-controls-rtl.min.css +1 -0
  63. bp-core/admin/css/customizer-controls.css +10 -0
  64. bp-core/admin/css/customizer-controls.min.css +1 -0
  65. bp-core/admin/images/icons32.png +0 -0
  66. bp-core/admin/images/icons64.png +0 -0
  67. bp-core/admin/images/list-unsubscribe.png +0 -0
  68. bp-core/admin/images/mentions.gif +0 -0
  69. bp-core/admin/images/menu-2x.png +0 -0
  70. bp-core/admin/images/menu-wp.png +0 -0
  71. bp-core/admin/images/menu.png +0 -0
  72. bp-core/admin/images/pending-accounts.png +0 -0
  73. bp-core/admin/images/twenty-seventeen.png +0 -0
  74. bp-core/admin/js/customizer-controls.js +22 -0
  75. bp-core/admin/js/customizer-controls.min.js +1 -0
  76. bp-core/admin/js/customizer-receiver-emails.js +115 -0
  77. bp-core/admin/js/customizer-receiver-emails.min.js +1 -0
  78. bp-core/admin/js/dismissible-admin-notices.js +16 -0
  79. bp-core/admin/js/dismissible-admin-notices.min.js +1 -0
  80. bp-core/bp-core-actions.php +31 -17
  81. bp-core/bp-core-admin.php +31 -833
  82. bp-core/bp-core-adminbar.php +27 -33
  83. bp-core/bp-core-attachments.php +1463 -0
  84. bp-core/bp-core-avatars.php +1357 -511
  85. bp-core/bp-core-buddybar.php +625 -291
  86. bp-core/bp-core-cache.php +162 -46
  87. bp-core/bp-core-caps.php +219 -92
  88. bp-core/bp-core-catchuri.php +453 -204
  89. bp-core/bp-core-classes.php +0 -2700
  90. bp-core/bp-core-component.php +5 -607
  91. bp-core/bp-core-cssjs.php +370 -47
  92. bp-core/bp-core-customizer-email.php +434 -0
  93. bp-core/bp-core-dependency.php +438 -82
  94. bp-core/bp-core-filters.php +716 -192
  95. bp-core/bp-core-functions.php +2111 -331
  96. bp-core/bp-core-loader.php +5 -248
  97. bp-core/bp-core-moderation.php +194 -126
  98. bp-core/bp-core-options.php +386 -200
  99. bp-core/bp-core-taxonomy.php +279 -0
  100. bp-core/bp-core-template-loader.php +285 -119
  101. bp-core/bp-core-template.php +1468 -360
  102. bp-core/bp-core-theme-compatibility.php +366 -259
  103. bp-core/bp-core-update.php +359 -102
  104. bp-core/bp-core-widgets.php +6 -561
  105. bp-core/bp-core-wpabstraction.php +106 -16
  106. bp-core/classes/class-bp-admin.php +1170 -0
  107. bp-core/classes/class-bp-attachment-avatar.php +435 -0
  108. bp-core/classes/class-bp-attachment-cover-image.php +291 -0
  109. bp-core/classes/class-bp-attachment.php +658 -0
  110. bp-core/classes/class-bp-button.php +428 -0
  111. bp-core/classes/class-bp-component.php +844 -0
  112. bp-core/classes/class-bp-core-bp-nav-backcompat.php +270 -0
  113. bp-core/classes/class-bp-core-bp-options-nav-backcompat.php +138 -0
  114. bp-core/classes/class-bp-core-html-element.php +127 -0
  115. bp-core/classes/class-bp-core-login-widget.php +186 -0
  116. bp-core/classes/class-bp-core-nav-item.php +15 -0
  117. bp-core/classes/class-bp-core-nav.php +402 -0
  118. bp-core/classes/class-bp-core-notification.php +282 -0
  119. bp-core/classes/class-bp-core-oembed-extension.php +622 -0
  120. bp-core/classes/class-bp-core-user.php +954 -0
  121. bp-core/classes/class-bp-core.php +324 -0
  122. bp-core/classes/class-bp-customizer-control-range.php +57 -0
  123. bp-core/classes/class-bp-date-query.php +70 -0
  124. bp-core/classes/class-bp-email-delivery.php +31 -0
  125. bp-core/classes/class-bp-email-recipient.php +195 -0
  126. bp-core/classes/class-bp-email.php +963 -0
  127. bp-core/classes/class-bp-embed.php +251 -0
  128. bp-core/classes/class-bp-media-extractor.php +928 -0
  129. bp-core/classes/class-bp-members-suggestions.php +138 -0
  130. bp-core/classes/class-bp-phpmailer.php +163 -0
  131. bp-core/classes/class-bp-recursive-query.php +230 -0
  132. bp-core/classes/class-bp-suggestions.php +145 -0
  133. bp-core/classes/class-bp-theme-compat.php +120 -0
  134. bp-core/classes/class-bp-user-query.php +828 -0
  135. bp-core/classes/class-bp-walker-category-checklist.php +109 -0
  136. bp-core/classes/class-bp-walker-nav-menu-checklist.php +118 -0
  137. bp-core/classes/class-bp-walker-nav-menu.php +213 -0
  138. bp-core/css/admin-bar-rtl.css +16 -3
  139. bp-core/css/admin-bar-rtl.min.css +1 -1
  140. bp-core/css/admin-bar.css +16 -3
  141. bp-core/css/admin-bar.min.css +1 -1
  142. bp-core/css/avatar-rtl.css +420 -0
  143. bp-core/css/avatar-rtl.min.css +1 -0
  144. bp-core/css/avatar.css +420 -0
  145. bp-core/css/avatar.min.css +1 -0
  146. bp-core/css/buddybar-rtl.css +3 -3
  147. bp-core/css/buddybar-rtl.min.css +1 -1
  148. bp-core/deprecated/1.2.php +2 -4
  149. bp-core/deprecated/1.5.php +88 -79
  150. bp-core/deprecated/1.6.php +22 -23
  151. bp-core/deprecated/1.7.php +13 -14
  152. bp-core/deprecated/1.9.php +11 -12
  153. bp-core/deprecated/2.0.php +4 -4
  154. bp-core/deprecated/2.1.php +86 -123
  155. bp-core/deprecated/2.2.php +116 -0
  156. bp-core/deprecated/2.3.php +24 -0
  157. bp-core/deprecated/2.4.php +25 -0
  158. bp-core/deprecated/2.5.php +934 -0
  159. bp-core/deprecated/2.6.php +50 -0
  160. bp-core/deprecated/2.7.php +26 -0
  161. bp-core/deprecated/2.8.php +199 -0
  162. bp-core/deprecated/js/autocomplete/jquery.autocomplete.min.js +0 -2
  163. bp-core/deprecated/js/autocomplete/jquery.autocompletefb.min.js +0 -2
  164. bp-core/deprecated/js/autocomplete/jquery.bgiframe.js +0 -39
  165. bp-core/deprecated/js/autocomplete/jquery.bgiframe.min.js +0 -2
  166. bp-core/deprecated/js/autocomplete/jquery.dimensions.min.js +0 -2
  167. bp-core/images/mystery-group-50.png +0 -0
  168. bp-core/images/mystery-group.png +0 -0
  169. bp-core/js/avatar.js +682 -0
  170. bp-core/js/avatar.min.js +1 -0
  171. bp-core/js/bp-plupload.js +414 -0
  172. bp-core/js/bp-plupload.min.js +1 -0
  173. bp-core/js/confirm.min.js +1 -2
  174. bp-core/js/cover-image.js +277 -0
  175. bp-core/js/cover-image.min.js +1 -0
  176. bp-core/js/jquery-query.min.js +0 -1
  177. bp-core/js/jquery.atwho.min.js +0 -2
  178. bp-core/js/jquery.caret.js +0 -366
  179. bp-core/js/jquery.caret.min.js +0 -2
  180. bp-core/js/{jquery-cookie.js → vendor/jquery-cookie.js} +0 -0
  181. bp-core/js/{jquery-cookie.min.js → vendor/jquery-cookie.min.js} +1 -2
  182. bp-core/{deprecated/js → js/vendor}/jquery-scroll-to.js +0 -0
  183. bp-core/{deprecated/js → js/vendor}/jquery-scroll-to.min.js +1 -2
  184. bp-core/js/{jquery.atwho.js → vendor/jquery.atwho.js} +117 -66
  185. bp-core/js/vendor/jquery.atwho.min.js +1 -0
  186. bp-core/js/{jquery.atwho.txt → vendor/jquery.atwho.txt} +0 -0
  187. bp-core/js/vendor/jquery.caret.js +405 -0
  188. bp-core/js/vendor/jquery.caret.min.js +1 -0
  189. bp-core/js/{jquery.caret.txt → vendor/jquery.caret.txt} +0 -0
  190. bp-core/js/vendor/livestamp.js +129 -0
  191. bp-core/js/vendor/livestamp.min.js +1 -0
  192. bp-core/js/vendor/moment-js/locale/af.js +73 -0
  193. bp-core/js/vendor/moment-js/locale/af.min.js +1 -0
  194. bp-core/js/vendor/moment-js/locale/ar-ly.js +122 -0
  195. bp-core/js/vendor/moment-js/locale/ar-ly.min.js +1 -0
  196. bp-core/js/vendor/moment-js/locale/ar-ma.js +60 -0
  197. bp-core/js/vendor/moment-js/locale/ar-ma.min.js +1 -0
  198. bp-core/js/vendor/moment-js/locale/ar-sa.js +104 -0
  199. bp-core/js/vendor/moment-js/locale/ar-sa.min.js +1 -0
  200. bp-core/js/vendor/moment-js/locale/ar-tn.js +59 -0
  201. bp-core/js/vendor/moment-js/locale/ar-tn.min.js +1 -0
  202. bp-core/js/vendor/moment-js/locale/ar.js +137 -0
  203. bp-core/js/vendor/moment-js/locale/ar.min.js +1 -0
  204. bp-core/js/vendor/moment-js/locale/az.js +105 -0
  205. bp-core/js/vendor/moment-js/locale/az.min.js +1 -0
  206. bp-core/js/vendor/moment-js/locale/be.js +134 -0
  207. bp-core/js/vendor/moment-js/locale/be.min.js +1 -0
  208. bp-core/js/vendor/moment-js/locale/bg.js +90 -0
  209. bp-core/js/vendor/moment-js/locale/bg.min.js +1 -0
  210. bp-core/js/vendor/moment-js/locale/bn.js +119 -0
  211. bp-core/js/vendor/moment-js/locale/bn.min.js +1 -0
  212. bp-core/js/vendor/moment-js/locale/bo.js +119 -0
  213. bp-core/js/vendor/moment-js/locale/bo.min.js +1 -0
  214. bp-core/js/vendor/moment-js/locale/br.js +108 -0
  215. bp-core/js/vendor/moment-js/locale/br.min.js +1 -0
  216. bp-core/js/vendor/moment-js/locale/bs.js +143 -0
  217. bp-core/js/vendor/moment-js/locale/bs.min.js +1 -0
  218. bp-core/js/vendor/moment-js/locale/ca.js +81 -0
  219. bp-core/js/vendor/moment-js/locale/ca.min.js +1 -0
  220. bp-core/js/vendor/moment-js/locale/cs.js +172 -0
  221. bp-core/js/vendor/moment-js/locale/cs.min.js +1 -0
  222. bp-core/js/vendor/moment-js/locale/cv.js +63 -0
  223. bp-core/js/vendor/moment-js/locale/cv.min.js +1 -0
  224. bp-core/js/vendor/moment-js/locale/cy.js +81 -0
  225. bp-core/js/vendor/moment-js/locale/cy.min.js +1 -0
  226. bp-core/js/vendor/moment-js/locale/da.js +60 -0
  227. bp-core/js/vendor/moment-js/locale/da.min.js +1 -0
  228. bp-core/js/vendor/moment-js/locale/de-at.js +79 -0
  229. bp-core/js/vendor/moment-js/locale/de-at.min.js +1 -0
  230. bp-core/js/vendor/moment-js/locale/de.js +78 -0
  231. bp-core/js/vendor/moment-js/locale/de.min.js +1 -0
  232. bp-core/js/vendor/moment-js/locale/dv.js +99 -0
  233. bp-core/js/vendor/moment-js/locale/dv.min.js +1 -0
  234. bp-core/js/vendor/moment-js/locale/el.js +98 -0
  235. bp-core/js/vendor/moment-js/locale/el.min.js +1 -0
  236. bp-core/js/vendor/moment-js/locale/en-au.js +67 -0
  237. bp-core/js/vendor/moment-js/locale/en-au.min.js +1 -0
  238. bp-core/js/vendor/moment-js/locale/en-ca.js +63 -0
  239. bp-core/js/vendor/moment-js/locale/en-ca.min.js +1 -0
  240. bp-core/js/vendor/moment-js/locale/en-gb.js +67 -0
  241. bp-core/js/vendor/moment-js/locale/en-gb.min.js +1 -0
  242. bp-core/js/vendor/moment-js/locale/en-ie.js +67 -0
  243. bp-core/js/vendor/moment-js/locale/en-ie.min.js +1 -0
  244. bp-core/js/vendor/moment-js/locale/en-nz.js +67 -0
  245. bp-core/js/vendor/moment-js/locale/en-nz.min.js +1 -0
  246. bp-core/js/vendor/moment-js/locale/eo.js +73 -0
  247. bp-core/js/vendor/moment-js/locale/eo.min.js +1 -0
  248. bp-core/js/vendor/moment-js/locale/es-do.js +80 -0
  249. bp-core/js/vendor/moment-js/locale/es-do.min.js +1 -0
  250. bp-core/js/vendor/moment-js/locale/es.js +81 -0
  251. bp-core/js/vendor/moment-js/locale/es.min.js +1 -0
  252. bp-core/js/vendor/moment-js/locale/et.js +80 -0
  253. bp-core/js/vendor/moment-js/locale/et.min.js +1 -0
  254. bp-core/js/vendor/moment-js/locale/eu.js +66 -0
  255. bp-core/js/vendor/moment-js/locale/eu.min.js +1 -0
  256. bp-core/js/vendor/moment-js/locale/fa.js +106 -0
  257. bp-core/js/vendor/moment-js/locale/fa.min.js +1 -0
  258. bp-core/js/vendor/moment-js/locale/fi.js +107 -0
  259. bp-core/js/vendor/moment-js/locale/fi.min.js +1 -0
  260. bp-core/js/vendor/moment-js/locale/fo.js +60 -0
  261. bp-core/js/vendor/moment-js/locale/fo.min.js +1 -0
  262. bp-core/js/vendor/moment-js/locale/fr-ca.js +60 -0
  263. bp-core/js/vendor/moment-js/locale/fr-ca.min.js +1 -0
  264. bp-core/js/vendor/moment-js/locale/fr-ch.js +64 -0
  265. bp-core/js/vendor/moment-js/locale/fr-ch.min.js +1 -0
  266. bp-core/js/vendor/moment-js/locale/fr.js +64 -0
  267. bp-core/js/vendor/moment-js/locale/fr.min.js +1 -0
  268. bp-core/js/vendor/moment-js/locale/fy.js +73 -0
  269. bp-core/js/vendor/moment-js/locale/fy.min.js +1 -0
  270. bp-core/js/vendor/moment-js/locale/gd.js +76 -0
  271. bp-core/js/vendor/moment-js/locale/gd.min.js +1 -0
  272. bp-core/js/vendor/moment-js/locale/gl.js +77 -0
  273. bp-core/js/vendor/moment-js/locale/gl.min.js +1 -0
  274. bp-core/js/vendor/moment-js/locale/he.js +99 -0
  275. bp-core/js/vendor/moment-js/locale/he.min.js +1 -0
  276. bp-core/js/vendor/moment-js/locale/hi.js +124 -0
  277. bp-core/js/vendor/moment-js/locale/hi.min.js +1 -0
  278. bp-core/js/vendor/moment-js/locale/hr.js +145 -0
  279. bp-core/js/vendor/moment-js/locale/hr.min.js +1 -0
  280. bp-core/js/vendor/moment-js/locale/hu.js +109 -0
  281. bp-core/js/vendor/moment-js/locale/hu.min.js +1 -0
  282. bp-core/js/vendor/moment-js/locale/hy-am.js +95 -0
  283. bp-core/js/vendor/moment-js/locale/hy-am.min.js +1 -0
  284. bp-core/js/vendor/moment-js/locale/id.js +83 -0
  285. bp-core/js/vendor/moment-js/locale/id.min.js +1 -0
  286. bp-core/js/vendor/moment-js/locale/is.js +127 -0
  287. bp-core/js/vendor/moment-js/locale/is.min.js +1 -0
  288. bp-core/js/vendor/moment-js/locale/it.js +70 -0
  289. bp-core/js/vendor/moment-js/locale/it.min.js +1 -0
  290. bp-core/js/vendor/moment-js/locale/ja.js +76 -0
  291. bp-core/js/vendor/moment-js/locale/ja.min.js +1 -0
  292. bp-core/js/vendor/moment-js/locale/jv.js +83 -0
  293. bp-core/js/vendor/moment-js/locale/jv.min.js +1 -0
  294. bp-core/js/vendor/moment-js/locale/ka.js +89 -0
  295. bp-core/js/vendor/moment-js/locale/ka.min.js +1 -0
  296. bp-core/js/vendor/moment-js/locale/kk.js +87 -0
  297. bp-core/js/vendor/moment-js/locale/kk.min.js +1 -0
  298. bp-core/js/vendor/moment-js/locale/km.js +58 -0
  299. bp-core/js/vendor/moment-js/locale/km.min.js +1 -0
  300. bp-core/js/vendor/moment-js/locale/ko.js +65 -0
  301. bp-core/js/vendor/moment-js/locale/ko.min.js +1 -0
  302. bp-core/js/vendor/moment-js/locale/ky.js +88 -0
  303. bp-core/js/vendor/moment-js/locale/ky.min.js +1 -0
  304. bp-core/js/vendor/moment-js/locale/lb.js +137 -0
  305. bp-core/js/vendor/moment-js/locale/lb.min.js +1 -0
  306. bp-core/js/vendor/moment-js/locale/lo.js +70 -0
  307. bp-core/js/vendor/moment-js/locale/lo.min.js +1 -0
  308. bp-core/js/vendor/moment-js/locale/lt.js +117 -0
  309. bp-core/js/vendor/moment-js/locale/lt.min.js +1 -0
  310. bp-core/js/vendor/moment-js/locale/lv.js +97 -0
  311. bp-core/js/vendor/moment-js/locale/lv.min.js +1 -0
  312. bp-core/js/vendor/moment-js/locale/me.js +111 -0
  313. bp-core/js/vendor/moment-js/locale/me.min.js +1 -0
  314. bp-core/js/vendor/moment-js/locale/mi.js +64 -0
  315. bp-core/js/vendor/moment-js/locale/mi.min.js +1 -0
  316. bp-core/js/vendor/moment-js/locale/mk.js +90 -0
  317. bp-core/js/vendor/moment-js/locale/mk.min.js +1 -0
  318. bp-core/js/vendor/moment-js/locale/ml.js +81 -0
  319. bp-core/js/vendor/moment-js/locale/ml.min.js +1 -0
  320. bp-core/js/vendor/moment-js/locale/mr.js +159 -0
  321. bp-core/js/vendor/moment-js/locale/mr.min.js +1 -0
  322. bp-core/js/vendor/moment-js/locale/ms-my.js +83 -0
  323. bp-core/js/vendor/moment-js/locale/ms-my.min.js +1 -0
  324. bp-core/js/vendor/moment-js/locale/ms.js +82 -0
  325. bp-core/js/vendor/moment-js/locale/ms.min.js +1 -0
  326. bp-core/js/vendor/moment-js/locale/my.js +95 -0
  327. bp-core/js/vendor/moment-js/locale/my.min.js +1 -0
  328. bp-core/js/vendor/moment-js/locale/nb.js +63 -0
  329. bp-core/js/vendor/moment-js/locale/nb.min.js +1 -0
  330. bp-core/js/vendor/moment-js/locale/ne.js +123 -0
  331. bp-core/js/vendor/moment-js/locale/ne.min.js +1 -0
  332. bp-core/js/vendor/moment-js/locale/nl.js +86 -0
  333. bp-core/js/vendor/moment-js/locale/nl.min.js +1 -0
  334. bp-core/js/vendor/moment-js/locale/nn.js +60 -0
  335. bp-core/js/vendor/moment-js/locale/nn.min.js +1 -0
  336. bp-core/js/vendor/moment-js/locale/pa-in.js +124 -0
  337. bp-core/js/vendor/moment-js/locale/pa-in.min.js +1 -0
  338. bp-core/js/vendor/moment-js/locale/pl.js +105 -0
  339. bp-core/js/vendor/moment-js/locale/pl.min.js +1 -0
  340. bp-core/js/vendor/moment-js/locale/pt-br.js +61 -0
  341. bp-core/js/vendor/moment-js/locale/pt-br.min.js +1 -0
  342. bp-core/js/vendor/moment-js/locale/pt.js +65 -0
  343. bp-core/js/vendor/moment-js/locale/pt.min.js +1 -0
  344. bp-core/js/vendor/moment-js/locale/ro.js +75 -0
  345. bp-core/js/vendor/moment-js/locale/ro.min.js +1 -0
  346. bp-core/js/vendor/moment-js/locale/ru.js +183 -0
  347. bp-core/js/vendor/moment-js/locale/ru.min.js +1 -0
  348. bp-core/js/vendor/moment-js/locale/se.js +61 -0
  349. bp-core/js/vendor/moment-js/locale/se.min.js +1 -0
  350. bp-core/js/vendor/moment-js/locale/si.js +71 -0
  351. bp-core/js/vendor/moment-js/locale/si.min.js +1 -0
  352. bp-core/js/vendor/moment-js/locale/sk.js +150 -0
  353. bp-core/js/vendor/moment-js/locale/sk.min.js +1 -0
  354. bp-core/js/vendor/moment-js/locale/sl.js +162 -0
  355. bp-core/js/vendor/moment-js/locale/sl.min.js +1 -0
  356. bp-core/js/vendor/moment-js/locale/sq.js +70 -0
  357. bp-core/js/vendor/moment-js/locale/sq.min.js +1 -0
  358. bp-core/js/vendor/moment-js/locale/sr-cyrl.js +110 -0
  359. bp-core/js/vendor/moment-js/locale/sr-cyrl.min.js +1 -0
  360. bp-core/js/vendor/moment-js/locale/sr.js +110 -0
  361. bp-core/js/vendor/moment-js/locale/sr.min.js +1 -0
  362. bp-core/js/vendor/moment-js/locale/ss.js +89 -0
  363. bp-core/js/vendor/moment-js/locale/ss.min.js +1 -0
  364. bp-core/js/vendor/moment-js/locale/sv.js +69 -0
  365. bp-core/js/vendor/moment-js/locale/sv.min.js +1 -0
  366. bp-core/js/vendor/moment-js/locale/sw.js +59 -0
  367. bp-core/js/vendor/moment-js/locale/sw.min.js +1 -0
  368. bp-core/js/vendor/moment-js/locale/ta.js +129 -0
  369. bp-core/js/vendor/moment-js/locale/ta.min.js +1 -0
  370. bp-core/js/vendor/moment-js/locale/te.js +89 -0
  371. bp-core/js/vendor/moment-js/locale/te.min.js +1 -0
  372. bp-core/js/vendor/moment-js/locale/th.js +67 -0
  373. bp-core/js/vendor/moment-js/locale/th.min.js +1 -0
  374. bp-core/js/vendor/moment-js/locale/tl-ph.js +62 -0
  375. bp-core/js/vendor/moment-js/locale/tl-ph.min.js +1 -0
  376. bp-core/js/vendor/moment-js/locale/tlh.js +120 -0
  377. bp-core/js/vendor/moment-js/locale/tlh.min.js +1 -0
  378. bp-core/js/vendor/moment-js/locale/tr.js +90 -0
  379. bp-core/js/vendor/moment-js/locale/tr.min.js +1 -0
  380. bp-core/js/vendor/moment-js/locale/tzl.js +91 -0
  381. bp-core/js/vendor/moment-js/locale/tzl.min.js +1 -0
  382. bp-core/js/vendor/moment-js/locale/tzm-latn.js +58 -0
  383. bp-core/js/vendor/moment-js/locale/tzm-latn.min.js +1 -0
  384. bp-core/js/vendor/moment-js/locale/tzm.js +58 -0
  385. bp-core/js/vendor/moment-js/locale/tzm.min.js +1 -0
  386. bp-core/js/vendor/moment-js/locale/uk.js +146 -0
  387. bp-core/js/vendor/moment-js/locale/uk.min.js +1 -0
  388. bp-core/js/vendor/moment-js/locale/uz.js +58 -0
  389. bp-core/js/vendor/moment-js/locale/uz.min.js +1 -0
  390. bp-core/js/vendor/moment-js/locale/vi.js +79 -0
  391. bp-core/js/vendor/moment-js/locale/vi.min.js +1 -0
  392. bp-core/js/vendor/moment-js/locale/x-pseudo.js +68 -0
  393. bp-core/js/vendor/moment-js/locale/x-pseudo.min.js +1 -0
  394. bp-core/js/vendor/moment-js/locale/zh-cn.js +127 -0
  395. bp-core/js/vendor/moment-js/locale/zh-cn.min.js +1 -0
  396. bp-core/js/vendor/moment-js/locale/zh-hk.js +105 -0
  397. bp-core/js/vendor/moment-js/locale/zh-hk.min.js +1 -0
  398. bp-core/js/vendor/moment-js/locale/zh-tw.js +104 -0
  399. bp-core/js/vendor/moment-js/locale/zh-tw.min.js +1 -0
  400. bp-core/js/vendor/moment-js/moment.js +4234 -0
  401. bp-core/js/vendor/moment-js/moment.min.js +2 -0
  402. bp-core/js/webcam.js +309 -0
  403. bp-core/js/webcam.min.js +1 -0
  404. bp-core/js/widget-members.js +14 -3
  405. bp-core/js/widget-members.min.js +1 -2
  406. bp-forums/bb-config.php +5 -1
  407. bp-forums/bbpress/bb-admin/includes/class.bb-install.php +6 -2
  408. bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php +19 -9
  409. bp-forums/bbpress/bb-includes/backpress/class.bp-roles.php +9 -5
  410. bp-forums/bbpress/bb-includes/backpress/class.bp-user.php +5 -1
  411. bp-forums/bbpress/bb-includes/backpress/class.ixr.php +61 -11
  412. bp-forums/bbpress/bb-includes/backpress/class.mailer-smtp.php +5 -1
  413. bp-forums/bbpress/bb-includes/backpress/class.mailer.php +17 -5
  414. bp-forums/bbpress/bb-includes/backpress/class.passwordhash.php +6 -1
  415. bp-forums/bbpress/bb-includes/backpress/class.wp-ajax-response.php +5 -1
  416. bp-forums/bbpress/bb-includes/backpress/class.wp-dependencies.php +7 -3
  417. bp-forums/bbpress/bb-includes/backpress/class.wp-error.php +5 -1
  418. bp-forums/bbpress/bb-includes/backpress/class.wp-http-ixr-client.php +6 -1
  419. bp-forums/bbpress/bb-includes/backpress/class.wp-object-cache-memcached.php +6 -1
  420. bp-forums/bbpress/bb-includes/backpress/class.wp-taxonomy.php +1 -1
  421. bp-forums/bbpress/bb-includes/backpress/functions.core.php +21 -23
  422. bp-forums/bbpress/bb-includes/backpress/functions.kses.php +1 -1
  423. bp-forums/bbpress/bb-includes/backpress/functions.wp-object-cache.php +1 -1
  424. bp-forums/bbpress/bb-includes/backpress/functions.wp-taxonomy.php +1 -1
  425. bp-forums/bbpress/bb-includes/backpress/pomo/entry.php +32 -9
  426. bp-forums/bbpress/bb-includes/backpress/pomo/mo.php +174 -57
  427. bp-forums/bbpress/bb-includes/backpress/pomo/po.php +112 -26
  428. bp-forums/bbpress/bb-includes/backpress/pomo/sample/app.php +2 -3
  429. bp-forums/bbpress/bb-includes/backpress/pomo/streams.php +250 -72
  430. bp-forums/bbpress/bb-includes/backpress/pomo/translations.php +190 -31
  431. bp-forums/bbpress/bb-includes/class.bb-dir-map.php +5 -1
  432. bp-forums/bbpress/bb-includes/class.bb-locale.php +5 -1
  433. bp-forums/bbpress/bb-includes/class.bb-query.php +10 -2
  434. bp-forums/bbpress/bb-includes/class.bb-walker.php +5 -1
  435. bp-forums/bbpress/bb-includes/functions.bb-deprecated.php +4 -1
  436. bp-forums/bbpress/bb-includes/functions.bb-forums.php +2 -1
  437. bp-forums/bbpress/bb-includes/functions.bb-l10n.php +1 -1
  438. bp-forums/bbpress/bb-includes/functions.bb-template.php +11 -7
  439. bp-forums/bbpress/bb-includes/functions.bb-topic-tags.php +6 -4
  440. bp-forums/bbpress/bb-includes/functions.bb-topics.php +5 -3
  441. bp-forums/bbpress/bb-includes/functions.bb-users.php +1 -1
  442. bp-forums/bbpress/bb-plugins/akismet.php +2 -2
  443. bp-forums/bbpress/bb-plugins/bozo.php +11 -12
  444. bp-forums/bbpress/bb-settings.php +1 -1
  445. bp-forums/bbpress/xmlrpc.php +8 -7
  446. bp-forums/bp-forums-actions.php +4 -3
  447. bp-forums/bp-forums-bbpress-sa.php +124 -67
  448. bp-forums/bp-forums-bbpress.php +7 -3
  449. bp-forums/bp-forums-filters.php +43 -26
  450. bp-forums/bp-forums-functions.php +319 -146
  451. bp-forums/bp-forums-loader.php +94 -56
  452. bp-forums/bp-forums-screens.php +110 -17
  453. bp-forums/bp-forums-template.php +1134 -307
  454. bp-forums/deprecated/1.6.php +35 -30
  455. bp-forums/deprecated/1.7.php +15 -16
  456. bp-friends/bp-friends-actions.php +12 -8
  457. bp-friends/bp-friends-activity.php +203 -40
  458. bp-friends/bp-friends-cache.php +60 -16
  459. bp-friends/bp-friends-classes.php +0 -629
  460. bp-friends/bp-friends-filters.php +19 -25
  461. bp-friends/bp-friends-functions.php +404 -117
  462. bp-friends/bp-friends-loader.php +7 -234
  463. bp-friends/bp-friends-notifications.php +102 -179
  464. bp-friends/bp-friends-screens.php +61 -12
  465. bp-friends/bp-friends-template.php +191 -48
  466. bp-friends/bp-friends-widgets.php +14 -177
  467. bp-friends/classes/class-bp-core-friends-widget.php +205 -0
  468. bp-friends/classes/class-bp-friends-component.php +294 -0
  469. bp-friends/classes/class-bp-friends-friendship.php +986 -0
  470. bp-friends/js/widget-friends.js +14 -3
  471. bp-friends/js/widget-friends.min.js +1 -2
  472. bp-groups/admin/css/admin-rtl.css +45 -9
  473. bp-groups/admin/css/admin-rtl.min.css +1 -1
  474. bp-groups/admin/css/admin.css +45 -9
  475. bp-groups/admin/css/admin.min.css +1 -1
  476. bp-groups/admin/js/admin.min.js +1 -2
  477. bp-groups/bp-groups-actions.php +225 -87
  478. bp-groups/bp-groups-activity.php +272 -45
  479. bp-groups/bp-groups-admin.php +444 -615
  480. bp-groups/bp-groups-adminbar.php +45 -70
  481. bp-groups/bp-groups-cache.php +150 -29
  482. bp-groups/bp-groups-classes.php +0 -4512
  483. bp-groups/bp-groups-filters.php +151 -39
  484. bp-groups/bp-groups-forums.php +285 -61
  485. bp-groups/bp-groups-functions.php +1353 -316
  486. bp-groups/bp-groups-loader.php +6 -619
  487. bp-groups/bp-groups-notifications.php +610 -287
  488. bp-groups/bp-groups-screens.php +643 -333
  489. bp-groups/bp-groups-template.php +3526 -1656
  490. bp-groups/bp-groups-widgets.php +27 -165
  491. bp-groups/classes/class-bp-group-extension.php +1702 -0
  492. bp-groups/classes/class-bp-group-member-query.php +378 -0
  493. bp-groups/classes/class-bp-groups-component.php +885 -0
  494. bp-groups/classes/class-bp-groups-group-members-template.php +279 -0
  495. bp-groups/classes/class-bp-groups-group.php +1842 -0
  496. bp-groups/classes/class-bp-groups-invite-template.php +271 -0
  497. bp-groups/classes/class-bp-groups-list-table.php +792 -0
  498. bp-groups/classes/class-bp-groups-member-suggestions.php +172 -0
  499. bp-groups/classes/class-bp-groups-member.php +1360 -0
  500. bp-groups/classes/class-bp-groups-membership-requests-template.php +254 -0
  501. bp-groups/classes/class-bp-groups-template.php +403 -0
  502. bp-groups/classes/class-bp-groups-theme-compat.php +267 -0
  503. bp-groups/classes/class-bp-groups-widget.php +234 -0
  504. bp-groups/js/widget-groups.js +14 -3
  505. bp-groups/js/widget-groups.min.js +1 -2
  506. bp-loader.php +50 -583
  507. bp-members/admin/bp-members-admin-classes.php +19 -0
  508. bp-members/admin/bp-members-classes.php +0 -688
  509. bp-members/admin/css/admin-rtl.css +107 -13
  510. bp-members/admin/css/admin-rtl.min.css +1 -1
  511. bp-members/admin/css/admin.css +107 -13
  512. bp-members/admin/css/admin.min.css +1 -1
  513. bp-members/admin/js/admin.js +1 -1
  514. bp-members/admin/js/admin.min.js +0 -1
  515. bp-members/bp-members-actions.php +28 -19
  516. bp-members/bp-members-activity.php +97 -0
  517. bp-members/bp-members-admin.php +6 -1803
  518. bp-members/bp-members-adminbar.php +44 -28
  519. bp-members/bp-members-cache.php +75 -0
  520. bp-members/bp-members-filters.php +31 -18
  521. bp-members/bp-members-functions.php +1110 -385
  522. bp-members/bp-members-loader.php +6 -257
  523. bp-members/bp-members-screens.php +184 -366
  524. bp-members/bp-members-template.php +1217 -517
  525. bp-members/bp-members-widgets.php +106 -0
  526. bp-members/classes/class-bp-core-members-template.php +301 -0
  527. bp-members/classes/class-bp-core-members-widget.php +255 -0
  528. bp-members/classes/class-bp-core-recently-active-widget.php +173 -0
  529. bp-members/classes/class-bp-core-whos-online-widget.php +172 -0
  530. bp-members/classes/class-bp-members-admin.php +2381 -0
  531. bp-members/classes/class-bp-members-component.php +403 -0
  532. bp-members/classes/class-bp-members-list-table.php +411 -0
  533. bp-members/classes/class-bp-members-ms-list-table.php +413 -0
  534. bp-members/classes/class-bp-members-theme-compat.php +215 -0
  535. bp-members/classes/class-bp-registration-theme-compat.php +140 -0
  536. bp-members/{bp-members-classes.php → classes/class-bp-signup.php} +229 -67
  537. bp-messages/bp-messages-actions.php +360 -12
  538. bp-messages/bp-messages-cache.php +58 -18
  539. bp-messages/bp-messages-classes.php +0 -975
  540. bp-messages/bp-messages-cssjs.php +21 -9
  541. bp-messages/bp-messages-filters.php +46 -13
  542. bp-messages/bp-messages-functions.php +367 -72
  543. bp-messages/bp-messages-loader.php +7 -282
  544. bp-messages/bp-messages-notifications.php +129 -153
  545. bp-messages/bp-messages-screens.php +111 -87
  546. bp-messages/bp-messages-star.php +528 -0
  547. bp-messages/bp-messages-template.php +882 -639
  548. bp-messages/bp-messages-widgets.php +7 -102
  549. bp-messages/classes/class-bp-messages-box-template.php +346 -0
  550. bp-messages/classes/class-bp-messages-component.php +364 -0
  551. bp-messages/classes/class-bp-messages-message.php +281 -0
  552. bp-messages/classes/class-bp-messages-notice.php +310 -0
  553. bp-messages/classes/class-bp-messages-sitewide-notices-widget.php +122 -0
  554. bp-messages/classes/class-bp-messages-thread-template.php +186 -0
  555. bp-messages/classes/class-bp-messages-thread.php +892 -0
  556. {bp-core/deprecated → bp-messages}/css/autocomplete/jquery.autocompletefb-rtl.css +2 -2
  557. {bp-core/deprecated → bp-messages}/css/autocomplete/jquery.autocompletefb-rtl.min.css +1 -1
  558. {bp-core/deprecated → bp-messages}/css/autocomplete/jquery.autocompletefb.css +0 -0
  559. {bp-core/deprecated → bp-messages}/css/autocomplete/jquery.autocompletefb.min.css +0 -0
  560. {bp-core/deprecated → bp-messages}/js/autocomplete/jquery.autocomplete.js +27 -3
  561. bp-messages/js/autocomplete/jquery.autocomplete.min.js +1 -0
  562. {bp-core/deprecated → bp-messages}/js/autocomplete/jquery.autocompletefb.js +7 -8
  563. bp-messages/js/autocomplete/jquery.autocompletefb.min.js +1 -0
  564. bp-messages/js/autocomplete/jquery.bgiframe.js +69 -0
  565. bp-messages/js/autocomplete/jquery.bgiframe.min.js +1 -0
  566. {bp-core/deprecated → bp-messages}/js/autocomplete/jquery.dimensions.js +0 -0
  567. bp-messages/js/autocomplete/jquery.dimensions.min.js +1 -0
  568. {bp-core/deprecated → bp-messages}/js/autocomplete/license.bgiframe.txt +5 -5
  569. bp-notifications/bp-notifications-actions.php +83 -22
  570. bp-notifications/bp-notifications-adminbar.php +7 -5
  571. bp-notifications/bp-notifications-cache.php +72 -9
  572. bp-notifications/bp-notifications-functions.php +337 -121
  573. bp-notifications/bp-notifications-loader.php +5 -232
  574. bp-notifications/bp-notifications-screens.php +32 -6
  575. bp-notifications/bp-notifications-template.php +513 -526
  576. bp-notifications/classes/class-bp-notifications-component.php +287 -0
  577. bp-notifications/{bp-notifications-classes.php → classes/class-bp-notifications-notification.php} +426 -234
  578. bp-notifications/classes/class-bp-notifications-template.php +356 -0
  579. bp-settings/bp-settings-actions.php +142 -111
  580. bp-settings/bp-settings-functions.php +11 -6
  581. bp-settings/bp-settings-loader.php +9 -189
  582. bp-settings/bp-settings-screens.php +40 -14
  583. bp-settings/bp-settings-template.php +43 -24
  584. bp-settings/classes/class-bp-settings-component.php +218 -0
  585. bp-templates/bp-legacy/buddypress-functions.php +794 -325
  586. bp-templates/bp-legacy/buddypress/activity/activity-loop.php +23 -3
  587. bp-templates/bp-legacy/buddypress/activity/comment.php +24 -8
  588. bp-templates/bp-legacy/buddypress/activity/entry.php +62 -14
  589. bp-templates/bp-legacy/buddypress/activity/index.php +145 -24
  590. bp-templates/bp-legacy/buddypress/activity/post-form.php +37 -7
  591. bp-templates/bp-legacy/buddypress/activity/single/home.php +19 -3
  592. bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/camera.php +29 -0
  593. bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/crop.php +26 -0
  594. bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/index.php +47 -0
  595. bp-templates/bp-legacy/buddypress/assets/_attachments/cover-images/index.php +36 -0
  596. bp-templates/bp-legacy/buddypress/assets/_attachments/uploader.php +42 -0
  597. bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php +227 -0
  598. bp-templates/bp-legacy/buddypress/assets/embeds/activity.php +11 -0
  599. bp-templates/bp-legacy/buddypress/assets/embeds/footer.php +9 -0
  600. bp-templates/bp-legacy/buddypress/assets/embeds/header-activity.php +26 -0
  601. bp-templates/bp-legacy/buddypress/assets/embeds/header.php +18 -0
  602. bp-templates/bp-legacy/buddypress/blogs/blogs-loop.php +49 -12
  603. bp-templates/bp-legacy/buddypress/blogs/create.php +47 -7
  604. bp-templates/bp-legacy/buddypress/blogs/index.php +118 -16
  605. bp-templates/bp-legacy/buddypress/common/search/dir-search-form.php +16 -0
  606. bp-templates/bp-legacy/buddypress/forums/forums-loop.php +57 -9
  607. bp-templates/bp-legacy/buddypress/forums/index.php +144 -30
  608. bp-templates/bp-legacy/buddypress/groups/create.php +295 -65
  609. bp-templates/bp-legacy/buddypress/groups/groups-loop.php +60 -13
  610. bp-templates/bp-legacy/buddypress/groups/index.php +114 -18
  611. bp-templates/bp-legacy/buddypress/groups/single/activity.php +59 -8
  612. bp-templates/bp-legacy/buddypress/groups/single/admin.php +51 -326
  613. bp-templates/bp-legacy/buddypress/groups/single/admin/delete-group.php +41 -0
  614. bp-templates/bp-legacy/buddypress/groups/single/admin/edit-details.php +53 -0
  615. bp-templates/bp-legacy/buddypress/groups/single/admin/group-avatar.php +67 -0
  616. bp-templates/bp-legacy/buddypress/groups/single/admin/group-cover-image.php +33 -0
  617. bp-templates/bp-legacy/buddypress/groups/single/admin/group-settings.php +124 -0
  618. bp-templates/bp-legacy/buddypress/groups/single/admin/manage-members.php +332 -0
  619. bp-templates/bp-legacy/buddypress/groups/single/admin/membership-requests.php +35 -0
  620. bp-templates/bp-legacy/buddypress/groups/single/cover-image-header.php +129 -0
  621. bp-templates/bp-legacy/buddypress/groups/single/forum.php +49 -11
  622. bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php +68 -9
  623. bp-templates/bp-legacy/buddypress/groups/single/forum/topic.php +97 -31
  624. bp-templates/bp-legacy/buddypress/groups/single/group-header.php +79 -15
  625. bp-templates/bp-legacy/buddypress/groups/single/home.php +72 -18
  626. bp-templates/bp-legacy/buddypress/groups/single/invites-loop.php +45 -14
  627. bp-templates/bp-legacy/buddypress/groups/single/members.php +61 -9
  628. bp-templates/bp-legacy/buddypress/groups/single/plugins.php +30 -3
  629. bp-templates/bp-legacy/buddypress/groups/single/request-membership.php +36 -4
  630. bp-templates/bp-legacy/buddypress/groups/single/requests-loop.php +41 -8
  631. bp-templates/bp-legacy/buddypress/groups/single/send-invites.php +51 -6
  632. bp-templates/bp-legacy/buddypress/members/activate.php +50 -6
  633. bp-templates/bp-legacy/buddypress/members/index.php +114 -18
  634. bp-templates/bp-legacy/buddypress/members/members-loop.php +52 -11
  635. bp-templates/bp-legacy/buddypress/members/register.php +282 -49
  636. bp-templates/bp-legacy/buddypress/members/single/activity.php +37 -6
  637. bp-templates/bp-legacy/buddypress/members/single/blogs.php +27 -8
  638. bp-templates/bp-legacy/buddypress/members/single/cover-image-header.php +106 -0
  639. bp-templates/bp-legacy/buddypress/members/single/forums.php +23 -4
  640. bp-templates/bp-legacy/buddypress/members/single/forums/topics.php +4 -3
  641. bp-templates/bp-legacy/buddypress/members/single/friends.php +35 -4
  642. bp-templates/bp-legacy/buddypress/members/single/friends/requests.php +53 -7
  643. bp-templates/bp-legacy/buddypress/members/single/groups.php +38 -7
  644. bp-templates/bp-legacy/buddypress/members/single/groups/invites.php +51 -10
  645. bp-templates/bp-legacy/buddypress/members/single/home.php +63 -8
  646. bp-templates/bp-legacy/buddypress/members/single/member-header.php +49 -11
  647. bp-templates/bp-legacy/buddypress/members/single/messages.php +48 -6
  648. bp-templates/bp-legacy/buddypress/members/single/messages/compose.php +33 -5
  649. bp-templates/bp-legacy/buddypress/members/single/messages/message.php +86 -0
  650. bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php +182 -50
  651. bp-templates/bp-legacy/buddypress/members/single/messages/notices-loop.php +56 -8
  652. bp-templates/bp-legacy/buddypress/members/single/messages/single.php +104 -54
  653. bp-templates/bp-legacy/buddypress/members/single/notifications.php +2 -5
  654. bp-templates/bp-legacy/buddypress/members/single/notifications/feedback-no-notifications.php +11 -2
  655. bp-templates/bp-legacy/buddypress/members/single/notifications/notifications-loop.php +45 -20
  656. bp-templates/bp-legacy/buddypress/members/single/notifications/read.php +16 -1
  657. bp-templates/bp-legacy/buddypress/members/single/notifications/unread.php +16 -1
  658. bp-templates/bp-legacy/buddypress/members/single/plugins.php +42 -7
  659. bp-templates/bp-legacy/buddypress/members/single/profile.php +23 -5
  660. bp-templates/bp-legacy/buddypress/members/single/profile/change-avatar.php +42 -6
  661. bp-templates/bp-legacy/buddypress/members/single/profile/change-cover-image.php +33 -0
  662. bp-templates/bp-legacy/buddypress/members/single/profile/edit.php +59 -10
  663. bp-templates/bp-legacy/buddypress/members/single/profile/profile-loop.php +35 -7
  664. bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php +47 -6
  665. bp-templates/bp-legacy/buddypress/members/single/settings.php +1 -2
  666. bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php +31 -5
  667. bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php +31 -5
  668. bp-templates/bp-legacy/buddypress/members/single/settings/general.php +43 -8
  669. bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php +43 -5
  670. bp-templates/bp-legacy/buddypress/members/single/settings/profile.php +43 -4
  671. bp-templates/bp-legacy/css/buddypress-rtl.css +286 -71
  672. bp-templates/bp-legacy/css/buddypress-rtl.min.css +1 -1
  673. bp-templates/bp-legacy/css/buddypress.css +286 -71
  674. bp-templates/bp-legacy/css/buddypress.min.css +1 -1
  675. bp-templates/bp-legacy/css/embeds-activity-rtl.css +152 -0
  676. bp-templates/bp-legacy/css/embeds-activity-rtl.min.css +1 -0
  677. bp-templates/bp-legacy/css/embeds-activity.css +152 -0
  678. bp-templates/bp-legacy/css/embeds-activity.min.css +1 -0
  679. bp-templates/bp-legacy/css/twentyeleven-rtl.css +2025 -0
  680. bp-templates/bp-legacy/css/twentyeleven-rtl.min.css +1 -0
  681. bp-templates/bp-legacy/css/twentyeleven.css +2025 -0
  682. bp-templates/bp-legacy/css/twentyeleven.min.css +1 -0
  683. bp-templates/bp-legacy/css/twentyeleven.scss +2577 -0
  684. bp-templates/bp-legacy/css/twentyfifteen-rtl.css +1968 -0
  685. bp-templates/bp-legacy/css/twentyfifteen-rtl.min.css +1 -0
  686. bp-templates/bp-legacy/css/twentyfifteen.css +1968 -0
  687. bp-templates/bp-legacy/css/twentyfifteen.min.css +1 -0
  688. bp-templates/bp-legacy/css/twentyfifteen.scss +2347 -0
  689. bp-templates/bp-legacy/css/twentyfourteen-rtl.css +1517 -0
  690. bp-templates/bp-legacy/css/twentyfourteen-rtl.min.css +1 -0
  691. bp-templates/bp-legacy/css/twentyfourteen.css +1517 -0
  692. bp-templates/bp-legacy/css/twentyfourteen.min.css +1 -0
  693. bp-templates/bp-legacy/css/twentyfourteen.scss +1928 -0
  694. bp-templates/bp-legacy/css/twentyseventeen-rtl.css +2194 -0
  695. bp-templates/bp-legacy/css/twentyseventeen-rtl.min.css +1 -0
  696. bp-templates/bp-legacy/css/twentyseventeen.css +2194 -0
  697. bp-templates/bp-legacy/css/twentyseventeen.min.css +1 -0
  698. bp-templates/bp-legacy/css/twentyseventeen.scss +3036 -0
  699. bp-templates/bp-legacy/css/twentysixteen-rtl.css +1938 -0
  700. bp-templates/bp-legacy/css/twentysixteen-rtl.min.css +1 -0
  701. bp-templates/bp-legacy/css/twentysixteen.css +1938 -0
  702. bp-templates/bp-legacy/css/twentysixteen.min.css +1 -0
  703. bp-templates/bp-legacy/css/twentysixteen.scss +2459 -0
  704. bp-templates/bp-legacy/css/twentyten-rtl.css +1976 -0
  705. bp-templates/bp-legacy/css/twentyten-rtl.min.css +1 -0
  706. bp-templates/bp-legacy/css/twentyten.css +1976 -0
  707. bp-templates/bp-legacy/css/twentyten.min.css +1 -0
  708. bp-templates/bp-legacy/css/twentyten.scss +2478 -0
  709. bp-templates/bp-legacy/css/twentythirteen-rtl.css +1974 -0
  710. bp-templates/bp-legacy/css/twentythirteen-rtl.min.css +1 -0
  711. bp-templates/bp-legacy/css/twentythirteen.css +1974 -0
  712. bp-templates/bp-legacy/css/twentythirteen.min.css +1 -0
  713. bp-templates/bp-legacy/css/twentythirteen.scss +2427 -0
  714. bp-templates/bp-legacy/css/twentytwelve-rtl.css +2017 -0
  715. bp-templates/bp-legacy/css/twentytwelve-rtl.min.css +1 -0
  716. bp-templates/bp-legacy/css/twentytwelve.css +2017 -0
  717. bp-templates/bp-legacy/css/twentytwelve.min.css +1 -0
  718. bp-templates/bp-legacy/css/twentytwelve.scss +2517 -0
  719. bp-templates/bp-legacy/js/buddypress.js +300 -175
  720. bp-templates/bp-legacy/js/buddypress.min.js +2 -2
  721. bp-templates/bp-legacy/js/password-verify.min.js +1 -2
  722. bp-themes/bp-default/_inc/ajax.php +11 -4
  723. bp-themes/bp-default/groups/single/home.php +3 -0
  724. bp-xprofile/admin/css/admin-rtl.css +164 -53
  725. bp-xprofile/admin/css/admin-rtl.min.css +1 -1
  726. bp-xprofile/admin/css/admin.css +164 -53
  727. bp-xprofile/admin/css/admin.min.css +1 -1
  728. bp-xprofile/admin/js/admin.js +126 -12
  729. bp-xprofile/admin/js/admin.min.js +1 -2
  730. bp-xprofile/bp-xprofile-actions.php +37 -25
  731. bp-xprofile/bp-xprofile-activity.php +116 -106
  732. bp-xprofile/bp-xprofile-admin.php +317 -491
  733. bp-xprofile/bp-xprofile-cache.php +202 -86
  734. bp-xprofile/bp-xprofile-caps.php +57 -22
  735. bp-xprofile/bp-xprofile-classes.php +0 -3274
  736. bp-xprofile/bp-xprofile-cssjs.php +25 -16
  737. bp-xprofile/bp-xprofile-filters.php +261 -75
  738. bp-xprofile/bp-xprofile-functions.php +474 -259
  739. bp-xprofile/bp-xprofile-loader.php +12 -363
  740. bp-xprofile/bp-xprofile-notifications.php +55 -0
  741. bp-xprofile/bp-xprofile-screens.php +159 -63
  742. bp-xprofile/bp-xprofile-settings.php +19 -13
  743. bp-xprofile/bp-xprofile-template.php +891 -305
  744. bp-xprofile/classes/class-bp-xprofile-component.php +446 -0
  745. bp-xprofile/classes/class-bp-xprofile-data-template.php +364 -0
  746. bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php +212 -0
  747. bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php +641 -0
  748. bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php +212 -0
  749. bp-xprofile/classes/class-bp-xprofile-field-type-number.php +116 -0
  750. bp-xprofile/classes/class-bp-xprofile-field-type-placeholder.php +65 -0
  751. bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php +200 -0
  752. bp-xprofile/classes/class-bp-xprofile-field-type-selectbox.php +192 -0
  753. bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php +173 -0
  754. bp-xprofile/classes/class-bp-xprofile-field-type-textbox.php +117 -0
  755. bp-xprofile/classes/class-bp-xprofile-field-type-url.php +174 -0
  756. bp-xprofile/classes/class-bp-xprofile-field-type.php +527 -0
  757. bp-xprofile/classes/class-bp-xprofile-field.php +1597 -0
  758. bp-xprofile/classes/class-bp-xprofile-group.php +843 -0
  759. bp-xprofile/classes/class-bp-xprofile-meta-query.php +363 -0
  760. bp-xprofile/classes/class-bp-xprofile-profiledata.php +684 -0
  761. bp-xprofile/classes/class-bp-xprofile-query.php +532 -0
  762. bp-xprofile/classes/class-bp-xprofile-user-admin.php +492 -0
  763. buddypress.pot +5601 -3289
  764. class-buddypress.php +734 -0
  765. composer.json +34 -0
  766. humans.txt +40 -2
  767. readme.txt +125 -122
bp-activity/admin/css/admin-rtl.css CHANGED
@@ -44,6 +44,7 @@
44
}
45
#bp-activities-form .column-response img {
46
float: right;
47
margin-left: 10px;
48
margin-top: 1px;
49
}
@@ -78,3 +79,9 @@
78
.column-action {
79
width: 12%;
80
}
44
}
45
#bp-activities-form .column-response img {
46
float: right;
47
+ margin-bottom: 5px;
48
margin-left: 10px;
49
margin-top: 1px;
50
}
79
.column-action {
80
width: 12%;
81
}
82
+
83
+ @media screen and (max-width: 782px) {
84
+ body.toplevel_page_bp-activity .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column) {
85
+ display: table-cell;
86
+ }
87
+ }
bp-activity/admin/css/admin-rtl.min.css CHANGED
@@ -1 +1 @@
1
- .akismet-status{float:left}.akismet-status a{color:#AAA;font-style:italic}.akismet-history{margin:13px}.akismet-history div{margin-bottom:13px}.akismet-history span{color:#999}#wp-bp-activities-wrap{padding:5px 0}#bp-activities{height:120px}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#bp-replysubmit img.waiting{float:left;padding:4px 10px 0;vertical-align:top}#bp-activities-form .column-response img{float:right;margin-left:10px;margin-top:1px}.activity-errors{list-style-type:disc;margin-right:2em}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0}#bp_activity_action h3,#bp_activity_content h3{cursor:auto}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:#fff}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px}#bp_activity_link input{width:99%}#bp-activities-primaryid{margin-bottom:1em}.column-action{width:12%}
1
+ .akismet-status{float:left}.akismet-status a{color:#AAA;font-style:italic}.akismet-history{margin:13px}.akismet-history div{margin-bottom:13px}.akismet-history span{color:#999}#wp-bp-activities-wrap{padding:5px 0}#bp-activities{height:120px}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#bp-replysubmit img.waiting{float:left;padding:4px 10px 0;vertical-align:top}#bp-activities-form .column-response img{float:right;margin-bottom:5px;margin-left:10px;margin-top:1px}.activity-errors{list-style-type:disc;margin-right:2em}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0}#bp_activity_action h3,#bp_activity_content h3{cursor:auto}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:#fff}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px}#bp_activity_link input{width:99%}#bp-activities-primaryid{margin-bottom:1em}.column-action{width:12%}@media screen and (max-width:782px){body.toplevel_page_bp-activity .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){display:table-cell}}
bp-activity/admin/css/admin.css CHANGED
@@ -44,6 +44,7 @@
44
}
45
#bp-activities-form .column-response img {
46
float: left;
47
margin-right: 10px;
48
margin-top: 1px;
49
}
@@ -78,3 +79,9 @@
78
.column-action {
79
width: 12%;
80
}
44
}
45
#bp-activities-form .column-response img {
46
float: left;
47
+ margin-bottom: 5px;
48
margin-right: 10px;
49
margin-top: 1px;
50
}
79
.column-action {
80
width: 12%;
81
}
82
+
83
+ @media screen and (max-width: 782px) {
84
+ body.toplevel_page_bp-activity .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column) {
85
+ display: table-cell;
86
+ }
87
+ }
bp-activity/admin/css/admin.min.css CHANGED
@@ -1 +1 @@
1
- .akismet-status{float:right}.akismet-status a{color:#AAA;font-style:italic}.akismet-history{margin:13px}.akismet-history div{margin-bottom:13px}.akismet-history span{color:#999}#wp-bp-activities-wrap{padding:5px 0}#bp-activities{height:120px}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#bp-replysubmit img.waiting{float:right;padding:4px 10px 0;vertical-align:top}#bp-activities-form .column-response img{float:left;margin-right:10px;margin-top:1px}.activity-errors{list-style-type:disc;margin-left:2em}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0}#bp_activity_action h3,#bp_activity_content h3{cursor:auto}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:#fff}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px}#bp_activity_link input{width:99%}#bp-activities-primaryid{margin-bottom:1em}.column-action{width:12%}
1
+ .akismet-status{float:right}.akismet-status a{color:#AAA;font-style:italic}.akismet-history{margin:13px}.akismet-history div{margin-bottom:13px}.akismet-history span{color:#999}#wp-bp-activities-wrap{padding:5px 0}#bp-activities{height:120px}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#bp-replysubmit img.waiting{float:right;padding:4px 10px 0;vertical-align:top}#bp-activities-form .column-response img{float:left;margin-bottom:5px;margin-right:10px;margin-top:1px}.activity-errors{list-style-type:disc;margin-left:2em}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0}#bp_activity_action h3,#bp_activity_content h3{cursor:auto}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:#fff}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px}#bp_activity_link input{width:99%}#bp-activities-primaryid{margin-bottom:1em}.column-action{width:12%}@media screen and (max-width:782px){body.toplevel_page_bp-activity .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){display:table-cell}}
bp-activity/admin/js/admin.js CHANGED
@@ -4,14 +4,14 @@
4
/**
5
* Activity reply object for the activity index screen
6
*
7
- * @since BuddyPress (1.6)
8
*/
9
var activityReply = {
10
11
/**
12
* Attach event handler functions to the relevant elements.
13
*
14
- * @since BuddyPress (1.6)
15
*/
16
init : function() {
17
$(document).on( 'click', '.row-actions a.reply', activityReply.open );
@@ -29,7 +29,7 @@ var activityReply = {
29
/**
30
* Reveals the entire row when "reply" is pressed.
31
*
32
- * @since BuddyPress (1.6)
33
*/
34
open : function() {
35
// Hide the container row, and move it to the new location
@@ -46,7 +46,7 @@ var activityReply = {
46
/**
47
* Hide and reset the entire row when "cancel", or escape, are pressed.
48
*
49
- * @since BuddyPress (1.6)
50
*/
51
close : function() {
52
// Hide the container row
@@ -66,7 +66,7 @@ var activityReply = {
66
/**
67
* Submits "form" via AJAX back to WordPress.
68
*
69
- * @since BuddyPress (1.6)
70
*/
71
send : function() {
72
// Hide any existing error message, and show the loading spinner
@@ -100,7 +100,7 @@ var activityReply = {
100
/**
101
* send() error message handler
102
*
103
- * @since BuddyPress (1.6)
104
*/
105
error : function( r ) {
106
var er = r.statusText;
@@ -118,7 +118,7 @@ var activityReply = {
118
/**
119
* send() success handler
120
*
121
- * @since BuddyPress (1.6)
122
*/
123
show : function ( xml ) {
124
var bg, id, response;
@@ -165,9 +165,11 @@ $(document).ready( function () {
165
$( '#bp_activity_action h3, #bp_activity_content h3' ).unbind( 'click' );
166
167
// redo the post box toggles to reset the one made by comment.js in favor
168
- // of activity administration page id so that metaboxes are still collapsible
169
// in single Activity Administration screen.
170
- postboxes.add_postbox_toggles( bp_activity_admin_vars.page );
171
});
172
173
})(jQuery);
4
/**
5
* Activity reply object for the activity index screen
6
*
7
+ * @since 1.6.0
8
*/
9
var activityReply = {
10
11
/**
12
* Attach event handler functions to the relevant elements.
13
*
14
+ * @since 1.6.0
15
*/
16
init : function() {
17
$(document).on( 'click', '.row-actions a.reply', activityReply.open );
29
/**
30
* Reveals the entire row when "reply" is pressed.
31
*
32
+ * @since 1.6.0
33
*/
34
open : function() {
35
// Hide the container row, and move it to the new location
46
/**
47
* Hide and reset the entire row when "cancel", or escape, are pressed.
48
*
49
+ * @since 1.6.0
50
*/
51
close : function() {
52
// Hide the container row
66
/**
67
* Submits "form" via AJAX back to WordPress.
68
*
69
+ * @since 1.6.0
70
*/
71
send : function() {
72
// Hide any existing error message, and show the loading spinner
100
/**
101
* send() error message handler
102
*
103
+ * @since 1.6.0
104
*/
105
error : function( r ) {
106
var er = r.statusText;
118
/**
119
* send() success handler
120
*
121
+ * @since 1.6.0
122
*/
123
show : function ( xml ) {
124
var bg, id, response;
165
$( '#bp_activity_action h3, #bp_activity_content h3' ).unbind( 'click' );
166
167
// redo the post box toggles to reset the one made by comment.js in favor
168
+ // of activity administration page id so that metaboxes are still collapsible
169
// in single Activity Administration screen.
170
+ if ( typeof postboxes !== 'undefined' ) {
171
+ postboxes.add_postbox_toggles( bp_activity_admin_vars.page );
172
+ }
173
});
174
175
})(jQuery);
bp-activity/admin/js/admin.min.js CHANGED
@@ -1,2 +1 @@
1
- /*! buddypress - v2.1.2 - 2015-11-11 4:43:05 AM 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"),postboxes.add_postbox_toggles(bp_activity_admin_vars.page)})}(jQuery);
1
+ !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/bp-activity-actions.php CHANGED
@@ -1,5 +1,4 @@
1
<?php
2
-
3
/**
4
* Action functions are exactly the same as screen functions, however they do
5
* not have a template screen associated with them. Usually they will send the
@@ -7,19 +6,25 @@
7
*
8
* @package BuddyPress
9
* @subpackage ActivityActions
10
*/
11
12
- // Exit if accessed directly
13
- if ( !defined( 'ABSPATH' ) ) exit;
14
15
/**
16
* Allow core components and dependent plugins to register activity actions.
17
*
18
- * @since BuddyPress (1.2)
19
*
20
- * @uses do_action() To call 'bp_register_activity_actions' hook.
21
*/
22
function bp_register_activity_actions() {
23
do_action( 'bp_register_activity_actions' );
24
}
25
add_action( 'bp_init', 'bp_register_activity_actions', 8 );
@@ -27,34 +32,21 @@ add_action( 'bp_init', 'bp_register_activity_actions', 8 );
27
/**
28
* Catch and route requests for single activity item permalinks.
29
*
30
- * @since BuddyPress (1.2)
31
- *
32
- * @global object $bp BuddyPress global settings
33
- * @uses bp_is_activity_component()
34
- * @uses bp_is_current_action()
35
- * @uses bp_action_variable()
36
- * @uses bp_activity_get_specific()
37
- * @uses bp_is_active()
38
- * @uses bp_core_get_user_domain()
39
- * @uses groups_get_group()
40
- * @uses bp_get_group_permalink()
41
- * @uses apply_filters_ref_array() To call the 'bp_activity_permalink_redirect_url' hook.
42
- * @uses bp_core_redirect()
43
- * @uses bp_get_root_domain()
44
*
45
* @return bool False on failure.
46
*/
47
function bp_activity_action_permalink_router() {
48
49
- // Not viewing activity
50
if ( ! bp_is_activity_component() || ! bp_is_current_action( 'p' ) )
51
return false;
52
53
- // No activity to display
54
if ( ! bp_action_variable( 0 ) || ! is_numeric( bp_action_variable( 0 ) ) )
55
return false;
56
57
- // Get the activity details
58
$activity = bp_activity_get_specific( array( 'activity_ids' => bp_action_variable( 0 ), 'show_hidden' => true ) );
59
60
// 404 if activity does not exist
@@ -65,43 +57,49 @@ function bp_activity_action_permalink_router() {
65
$activity = $activity['activities'][0];
66
}
67
68
- // Do not redirect at default
69
$redirect = false;
70
71
- // Redirect based on the type of activity
72
if ( bp_is_active( 'groups' ) && $activity->component == buddypress()->groups->id ) {
73
74
- // Activity is a user update
75
if ( ! empty( $activity->user_id ) ) {
76
$redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
77
78
- // Activity is something else
79
} else {
80
81
- // Set redirect to group activity stream
82
- if ( $group = groups_get_group( array( 'group_id' => $activity->item_id ) ) ) {
83
$redirect = bp_get_group_permalink( $group ) . bp_get_activity_slug() . '/' . $activity->id . '/';
84
}
85
}
86
87
- // Set redirect to users' activity stream
88
- } else if ( ! empty( $activity->user_id ) ) {
89
$redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
90
}
91
92
- // If set, add the original query string back onto the redirect URL
93
if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
94
$query_frags = array();
95
wp_parse_str( $_SERVER['QUERY_STRING'], $query_frags );
96
$redirect = add_query_arg( urlencode_deep( $query_frags ), $redirect );
97
}
98
99
- // Allow redirect to be filtered
100
if ( ! $redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) ) {
101
bp_core_redirect( bp_get_root_domain() );
102
}
103
104
- // Redirect to the actual activity permalink page
105
bp_core_redirect( $redirect );
106
}
107
add_action( 'bp_actions', 'bp_activity_action_permalink_router' );
@@ -109,59 +107,62 @@ add_action( 'bp_actions', 'bp_activity_action_permalink_router' );
109
/**
110
* Delete specific activity item and redirect to previous page.
111
*
112
- * @since BuddyPress (1.1)
113
*
114
* @param int $activity_id Activity id to be deleted. Defaults to 0.
115
- *
116
- * @uses bp_is_activity_component()
117
- * @uses bp_is_current_action()
118
- * @uses bp_action_variable()
119
- * @uses check_admin_referer()
120
- * @uses bp_activity_user_can_delete()
121
- * @uses do_action() Calls 'bp_activity_before_action_delete_activity' hook to allow actions to be taken before the activity is deleted.
122
- * @uses bp_activity_delete()
123
- * @uses bp_core_add_message()
124
- * @uses do_action() Calls 'bp_activity_action_delete_activity' hook to allow actions to be taken after the activity is deleted.
125
- * @uses bp_core_redirect()
126
- *
127
* @return bool False on failure.
128
*/
129
function bp_activity_action_delete_activity( $activity_id = 0 ) {
130
131
- // Not viewing activity or action is not delete
132
if ( !bp_is_activity_component() || !bp_is_current_action( 'delete' ) )
133
return false;
134
135
if ( empty( $activity_id ) && bp_action_variable( 0 ) )
136
$activity_id = (int) bp_action_variable( 0 );
137
138
- // Not viewing a specific activity item
139
if ( empty( $activity_id ) )
140
return false;
141
142
- // Check the nonce
143
check_admin_referer( 'bp_activity_delete_link' );
144
145
- // Load up the activity item
146
$activity = new BP_Activity_Activity( $activity_id );
147
148
- // Check access
149
if ( ! bp_activity_user_can_delete( $activity ) )
150
return false;
151
152
- // Call the action before the delete so plugins can still fetch information about it
153
do_action( 'bp_activity_before_action_delete_activity', $activity_id, $activity->user_id );
154
155
- // Delete the activity item and provide user feedback
156
if ( bp_activity_delete( array( 'id' => $activity_id, 'user_id' => $activity->user_id ) ) )
157
bp_core_add_message( __( 'Activity deleted successfully', 'buddypress' ) );
158
else
159
bp_core_add_message( __( 'There was an error when deleting that activity', 'buddypress' ), 'error' );
160
161
do_action( 'bp_activity_action_delete_activity', $activity_id, $activity->user_id );
162
163
- // Check for the redirect query arg, otherwise let WP handle things
164
- if ( !empty( $_GET['redirect_to'] ) )
165
bp_core_redirect( esc_url( $_GET['redirect_to'] ) );
166
else
167
bp_core_redirect( wp_get_referer() );
@@ -171,23 +172,22 @@ add_action( 'bp_actions', 'bp_activity_action_delete_activity' );
171
/**
172
* Mark specific activity item as spam and redirect to previous page.
173
*
174
- * @since BuddyPress (1.6)
175
*
176
- * @global object $bp BuddyPress global settings
177
* @param int $activity_id Activity id to be deleted. Defaults to 0.
178
* @return bool False on failure.
179
*/
180
function bp_activity_action_spam_activity( $activity_id = 0 ) {
181
- global $bp;
182
183
- // Not viewing activity, or action is not spam, or Akismet isn't present
184
if ( !bp_is_activity_component() || !bp_is_current_action( 'spam' ) || empty( $bp->activity->akismet ) )
185
return false;
186
187
if ( empty( $activity_id ) && bp_action_variable( 0 ) )
188
$activity_id = (int) bp_action_variable( 0 );
189
190
- // Not viewing a specific activity item
191
if ( empty( $activity_id ) )
192
return false;
193
@@ -195,28 +195,43 @@ function bp_activity_action_spam_activity( $activity_id = 0 ) {
195
if ( !bp_activity_user_can_mark_spam() )
196
return false;
197
198
- // Load up the activity item
199
$activity = new BP_Activity_Activity( $activity_id );
200
if ( empty( $activity->id ) )
201
return false;
202
203
- // Check nonce
204
check_admin_referer( 'bp_activity_akismet_spam_' . $activity->id );
205
206
- // Call an action before the spamming so plugins can modify things if they want to
207
do_action( 'bp_activity_before_action_spam_activity', $activity->id, $activity );
208
209
- // Mark as spam
210
bp_activity_mark_as_spam( $activity );
211
$activity->save();
212
213
- // Tell the user the spamming has been succesful
214
bp_core_add_message( __( 'The activity item has been marked as spam and is no longer visible.', 'buddypress' ) );
215
216
do_action( 'bp_activity_action_spam_activity', $activity_id, $activity->user_id );
217
218
- // Check for the redirect query arg, otherwise let WP handle things
219
- if ( !empty( $_GET['redirect_to'] ) )
220
bp_core_redirect( esc_url( $_GET['redirect_to'] ) );
221
else
222
bp_core_redirect( wp_get_referer() );
@@ -226,72 +241,89 @@ add_action( 'bp_actions', 'bp_activity_action_spam_activity' );
226
/**
227
* Post user/group activity update.
228
*
229
- * @since BuddyPress (1.2)
230
- *
231
- * @uses is_user_logged_in()
232
- * @uses bp_is_activity_component()
233
- * @uses bp_is_current_action()
234
- * @uses check_admin_referer()
235
- * @uses apply_filters() To call 'bp_activity_post_update_content' hook.
236
- * @uses apply_filters() To call 'bp_activity_post_update_object' hook.
237
- * @uses apply_filters() To call 'bp_activity_post_update_item_id' hook.
238
- * @uses bp_core_add_message()
239
- * @uses bp_core_redirect()
240
- * @uses bp_activity_post_update()
241
- * @uses groups_post_update()
242
- * @uses bp_core_redirect()
243
- * @uses apply_filters() To call 'bp_activity_custom_update' hook.
244
*
245
* @return bool False on failure.
246
*/
247
function bp_activity_action_post_update() {
248
249
- // Do not proceed if user is not logged in, not viewing activity, or not posting
250
if ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'post' ) )
251
return false;
252
253
- // Check the nonce
254
check_admin_referer( 'post_update', '_wpnonce_post_update' );
255
256
- // Get activity info
257
$content = apply_filters( 'bp_activity_post_update_content', $_POST['whats-new'] );
258
259
if ( ! empty( $_POST['whats-new-post-object'] ) ) {
260
$object = apply_filters( 'bp_activity_post_update_object', $_POST['whats-new-post-object'] );
261
}
262
263
if ( ! empty( $_POST['whats-new-post-in'] ) ) {
264
$item_id = apply_filters( 'bp_activity_post_update_item_id', $_POST['whats-new-post-in'] );
265
}
266
267
- // No activity content so provide feedback and redirect
268
if ( empty( $content ) ) {
269
bp_core_add_message( __( 'Please enter some content to post.', 'buddypress' ), 'error' );
270
bp_core_redirect( wp_get_referer() );
271
}
272
273
- // No existing item_id
274
if ( empty( $item_id ) ) {
275
$activity_id = bp_activity_post_update( array( 'content' => $content ) );
276
277
- // Post to groups object
278
- } else if ( 'groups' == $object && bp_is_active( 'groups' ) ) {
279
if ( (int) $item_id ) {
280
$activity_id = groups_post_update( array( 'content' => $content, 'group_id' => $item_id ) );
281
}
282
283
- // Special circumstance so let filters handle it
284
} else {
285
$activity_id = apply_filters( 'bp_activity_custom_update', $object, $item_id, $content );
286
}
287
288
- // Provide user feedback
289
if ( !empty( $activity_id ) )
290
bp_core_add_message( __( 'Update Posted!', 'buddypress' ) );
291
else
292
- bp_core_add_message( __( 'There was an error when posting your update, please try again.', 'buddypress' ), 'error' );
293
294
- // Redirect
295
bp_core_redirect( wp_get_referer() );
296
}
297
add_action( 'bp_actions', 'bp_activity_action_post_update' );
@@ -299,18 +331,7 @@ add_action( 'bp_actions', 'bp_activity_action_post_update' );
299
/**
300
* Post new activity comment.
301
*
302
- * @since BuddyPress (1.2)
303
- *
304
- * @uses is_user_logged_in()
305
- * @uses bp_is_activity_component()
306
- * @uses bp_is_current_action()
307
- * @uses check_admin_referer()
308
- * @uses apply_filters() To call 'bp_activity_post_comment_activity_id' hook.
309
- * @uses apply_filters() To call 'bp_activity_post_comment_content' hook.
310
- * @uses bp_core_add_message()
311
- * @uses bp_core_redirect()
312
- * @uses bp_activity_new_comment()
313
- * @uses wp_get_referer()
314
*
315
* @return bool False on failure.
316
*/
@@ -319,10 +340,25 @@ function bp_activity_action_post_comment() {
319
if ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'reply' ) )
320
return false;
321
322
- // Check the nonce
323
check_admin_referer( 'new_activity_comment', '_wpnonce_new_activity_comment' );
324
325
$activity_id = apply_filters( 'bp_activity_post_comment_activity_id', $_POST['comment_form_id'] );
326
$content = apply_filters( 'bp_activity_post_comment_content', $_POST['ac_input_' . $activity_id] );
327
328
if ( empty( $content ) ) {
@@ -339,7 +375,7 @@ function bp_activity_action_post_comment() {
339
if ( !empty( $comment_id ) )
340
bp_core_add_message( __( 'Reply Posted!', 'buddypress' ) );
341
else
342
- bp_core_add_message( __( 'There was an error posting that reply, please try again.', 'buddypress' ), 'error' );
343
344
bp_core_redirect( wp_get_referer() . '#ac-form-' . $activity_id );
345
}
@@ -348,17 +384,7 @@ add_action( 'bp_actions', 'bp_activity_action_post_comment' );
348
/**
349
* Mark activity as favorite.
350
*
351
- * @since BuddyPress (1.2)
352
- *
353
- * @uses is_user_logged_in()
354
- * @uses bp_is_activity_component()
355
- * @uses bp_is_current_action()
356
- * @uses check_admin_referer()
357
- * @uses bp_activity_add_user_favorite()
358
- * @uses bp_action_variable()
359
- * @uses bp_core_add_message()
360
- * @uses bp_core_redirect()
361
- * @uses wp_get_referer()
362
*
363
* @return bool False on failure.
364
*/
@@ -367,13 +393,13 @@ function bp_activity_action_mark_favorite() {
367
if ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'favorite' ) )
368
return false;
369
370
- // Check the nonce
371
check_admin_referer( 'mark_favorite' );
372
373
if ( bp_activity_add_user_favorite( bp_action_variable( 0 ) ) )
374
bp_core_add_message( __( 'Activity marked as favorite.', 'buddypress' ) );
375
else
376
- bp_core_add_message( __( 'There was an error marking that activity as a favorite, please try again.', 'buddypress' ), 'error' );
377
378
bp_core_redirect( wp_get_referer() . '#activity-' . bp_action_variable( 0 ) );
379
}
@@ -382,17 +408,7 @@ add_action( 'bp_actions', 'bp_activity_action_mark_favorite' );
382
/**
383
* Remove activity from favorites.
384
*
385
- * @since BuddyPress (1.2)
386
- *
387
- * @uses is_user_logged_in()
388
- * @uses bp_is_activity_component()
389
- * @uses bp_is_current_action()
390
- * @uses check_admin_referer()
391
- * @uses bp_activity_remove_user_favorite()
392
- * @uses bp_action_variable()
393
- * @uses bp_core_add_message()
394
- * @uses bp_core_redirect()
395
- * @uses wp_get_referer()
396
*
397
* @return bool False on failure.
398
*/
@@ -401,13 +417,13 @@ function bp_activity_action_remove_favorite() {
401
if ( ! is_user_logged_in() || ! bp_is_activity_component() || ! bp_is_current_action( 'unfavorite' ) )
402
return false;
403
404
- // Check the nonce
405
check_admin_referer( 'unmark_favorite' );
406
407
if ( bp_activity_remove_user_favorite( bp_action_variable( 0 ) ) )
408
bp_core_add_message( __( 'Activity removed as favorite.', 'buddypress' ) );
409
else
410
- bp_core_add_message( __( 'There was an error removing that activity as a favorite, please try again.', 'buddypress' ), 'error' );
411
412
bp_core_redirect( wp_get_referer() . '#activity-' . bp_action_variable( 0 ) );
413
}
@@ -416,23 +432,17 @@ add_action( 'bp_actions', 'bp_activity_action_remove_favorite' );
416
/**
417
* Load the sitewide activity feed.
418
*
419
- * @since BuddyPress (1.0)
420
- *
421
- * @global object $bp BuddyPress global settings
422
- * @uses bp_is_activity_component()
423
- * @uses bp_is_current_action()
424
- * @uses bp_is_user()
425
- * @uses status_header()
426
*
427
* @return bool False on failure.
428
*/
429
function bp_activity_action_sitewide_feed() {
430
- global $bp;
431
432
if ( ! bp_is_activity_component() || ! bp_is_current_action( 'feed' ) || bp_is_user() || ! empty( $bp->groups->current_group ) )
433
return false;
434
435
- // setup the feed
436
buddypress()->activity->feed = new BP_Activity_Feed( array(
437
'id' => 'sitewide',
438
@@ -449,11 +459,7 @@ add_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
449
/**
450
* Load a user's personal activity feed.
451
*
452
- * @since BuddyPress (1.0)
453
- *
454
- * @uses bp_is_user_activity()
455
- * @uses bp_is_current_action()
456
- * @uses status_header()
457
*
458
* @return bool False on failure.
459
*/
@@ -462,7 +468,7 @@ function bp_activity_action_personal_feed() {
462
return false;
463
}
464
465
- // setup the feed
466
buddypress()->activity->feed = new BP_Activity_Feed( array(
467
'id' => 'personal',
468
@@ -479,14 +485,7 @@ add_action( 'bp_actions', 'bp_activity_action_personal_feed' );
479
/**
480
* Load a user's friends' activity feed.
481
*
482
- * @since BuddyPress (1.0)
483
- *
484
- * @uses bp_is_active()
485
- * @uses bp_is_user_activity()
486
- * @uses bp_is_current_action()
487
- * @uses bp_get_friends_slug()
488
- * @uses bp_is_action_variable()
489
- * @uses status_header()
490
*
491
* @return bool False on failure.
492
*/
@@ -495,7 +494,7 @@ function bp_activity_action_friends_feed() {
495
return false;
496
}
497
498
- // setup the feed
499
buddypress()->activity->feed = new BP_Activity_Feed( array(
500
'id' => 'friends',
501
@@ -512,14 +511,7 @@ add_action( 'bp_actions', 'bp_activity_action_friends_feed' );
512
/**
513
* Load the activity feed for a user's groups.
514
*
515
- * @since BuddyPress (1.2)
516
- *
517
- * @uses bp_is_active()
518
- * @uses bp_is_user_activity()
519
- * @uses bp_is_current_action()
520
- * @uses bp_get_groups_slug()
521
- * @uses bp_is_action_variable()
522
- * @uses status_header()
523
*
524
* @return bool False on failure.
525
*/
@@ -528,11 +520,11 @@ function bp_activity_action_my_groups_feed() {
528
return false;
529
}
530
531
- // get displayed user's group IDs
532
$groups = groups_get_user_groups();
533
$group_ids = implode( ',', $groups['groups'] );
534
535
- // setup the feed
536
buddypress()->activity->feed = new BP_Activity_Feed( array(
537
'id' => 'mygroups',
538
@@ -553,12 +545,7 @@ add_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
553
/**
554
* Load a user's @mentions feed.
555
*
556
- * @since BuddyPress (1.2)
557
- *
558
- * @uses bp_is_user_activity()
559
- * @uses bp_is_current_action()
560
- * @uses bp_is_action_variable()
561
- * @uses status_header()
562
*
563
* @return bool False on failure.
564
*/
@@ -571,7 +558,7 @@ function bp_activity_action_mentions_feed() {
571
return false;
572
}
573
574
- // setup the feed
575
buddypress()->activity->feed = new BP_Activity_Feed( array(
576
'id' => 'mentions',
577
@@ -590,12 +577,7 @@ add_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
590
/**
591
* Load a user's favorites feed.
592
*
593
- * @since BuddyPress (1.2)
594
- *
595
- * @uses bp_is_user_activity()
596
- * @uses bp_is_current_action()
597
- * @uses bp_is_action_variable()
598
- * @uses status_header()
599
*
600
* @return bool False on failure.
601
*/
@@ -604,11 +586,11 @@ function bp_activity_action_favorites_feed() {
604
return false;
605
}
606
607
- // get displayed user's favorite activity IDs
608
$favs = bp_activity_get_user_favorites( bp_displayed_user_id() );
609
$fav_ids = implode( ',', (array) $favs );
610
611
- // setup the feed
612
buddypress()->activity->feed = new BP_Activity_Feed( array(
613
'id' => 'favorites',
614
@@ -622,36 +604,10 @@ function bp_activity_action_favorites_feed() {
622
}
623
add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
624
625
- /**
626
- * Loads Akismet filtering for activity.
627
- *
628
- * @since BuddyPress (1.6)
629
- *
630
- * @global object $bp BuddyPress global settings
631
- */
632
- function bp_activity_setup_akismet() {
633
- global $bp;
634
-
635
- // Bail if Akismet is not active
636
- if ( ! defined( 'AKISMET_VERSION' ) )
637
- return;
638
-
639
- // Bail if no Akismet key is set
640
- if ( ! bp_get_option( 'wordpress_api_key' ) && ! defined( 'WPCOM_API_KEY' ) )
641
- return;
642
-
643
- // Bail if BuddyPress Activity Akismet support has been disabled by another plugin
644
- if ( ! apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) )
645
- return;
646
-
647
- // Instantiate Akismet for BuddyPress
648
- $bp->activity->akismet = new BP_Akismet();
649
- }
650
-
651
/**
652
* AJAX endpoint for Suggestions API lookups.
653
*
654
- * @since BuddyPress (2.1.0)
655
*/
656
function bp_ajax_get_suggestions() {
657
if ( ! bp_is_user_active() || empty( $_GET['term'] ) || empty( $_GET['type'] ) ) {
@@ -659,10 +615,17 @@ function bp_ajax_get_suggestions() {
659
exit;
660
}
661
662
- $results = bp_core_get_suggestions( array(
663
'term' => sanitize_text_field( $_GET['term'] ),
664
'type' => sanitize_text_field( $_GET['type'] ),
665
- ) );
666
667
if ( is_wp_error( $results ) ) {
668
wp_send_json_error( $results->get_error_message() );
@@ -672,3 +635,220 @@ function bp_ajax_get_suggestions() {
672
wp_send_json_success( $results );
673
}
674
add_action( 'wp_ajax_bp_get_suggestions', 'bp_ajax_get_suggestions' );
1
<?php
2
/**
3
* Action functions are exactly the same as screen functions, however they do
4
* not have a template screen associated with them. Usually they will send the
6
*
7
* @package BuddyPress
8
* @subpackage ActivityActions
9
+ * @since 1.5.0
10
*/
11
12
+ // Exit if accessed directly.
13
+ defined( 'ABSPATH' ) || exit;
14
15
/**
16
* Allow core components and dependent plugins to register activity actions.
17
*
18
+ * @since 1.2.0
19
*
20
*/
21
function bp_register_activity_actions() {
22
+
23
+ /**
24
+ * Fires on bp_init to allow core components and dependent plugins to register activity actions.
25
+ *
26
+ * @since 1.2.0
27
+ */
28
do_action( 'bp_register_activity_actions' );
29
}
30
add_action( 'bp_init', 'bp_register_activity_actions', 8 );
32
/**
33
* Catch and route requests for single activity item permalinks.
34
*
35
+ * @since 1.2.0
36
*
37
* @return bool False on failure.
38
*/
39
function bp_activity_action_permalink_router() {
40
41
+ // Not viewing activity.
42
if ( ! bp_is_activity_component() || ! bp_is_current_action( 'p' ) )
43
return false;
44
45
+ // No activity to display.
46
if ( ! bp_action_variable( 0 ) || ! is_numeric( bp_action_variable( 0 ) ) )
47
return false;
48
49
+ // Get the activity details.
50
$activity = bp_activity_get_specific( array( 'activity_ids' => bp_action_variable( 0 ), 'show_hidden' => true ) );
51
52
// 404 if activity does not exist
57
$activity = $activity['activities'][0];
58
}
59
60
+ // Do not redirect at default.
61
$redirect = false;
62
63
+ // Redirect based on the type of activity.
64
if ( bp_is_active( 'groups' ) && $activity->component == buddypress()->groups->id ) {
65
66
+ // Activity is a user update.
67
if ( ! empty( $activity->user_id ) ) {
68
$redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
69
70
+ // Activity is something else.
71
} else {
72
73
+ // Set redirect to group activity stream.
74
+ if ( $group = groups_get_group( $activity->item_id ) ) {
75
$redirect = bp_get_group_permalink( $group ) . bp_get_activity_slug() . '/' . $activity->id . '/';
76
}
77
}
78
79
+ // Set redirect to users' activity stream.
80
+ } elseif ( ! empty( $activity->user_id ) ) {
81
$redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
82
}
83
84
+ // If set, add the original query string back onto the redirect URL.
85
if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
86
$query_frags = array();
87
wp_parse_str( $_SERVER['QUERY_STRING'], $query_frags );
88
$redirect = add_query_arg( urlencode_deep( $query_frags ), $redirect );
89
}
90
91
+ /**
92
+ * Filter the intended redirect url before the redirect occurs for the single activity item.
93
+ *
94
+ * @since 1.2.2
95
+ *
96
+ * @param array $value Array with url to redirect to and activity related to the redirect.
97
+ */
98
if ( ! $redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) ) {
99
bp_core_redirect( bp_get_root_domain() );
100
}
101
102
+ // Redirect to the actual activity permalink page.
103
bp_core_redirect( $redirect );
104
}
105
add_action( 'bp_actions', 'bp_activity_action_permalink_router' );
107
/**
108
* Delete specific activity item and redirect to previous page.
109
*
110
+ * @since 1.1.0
111
*
112
* @param int $activity_id Activity id to be deleted. Defaults to 0.
113
* @return bool False on failure.
114
*/
115
function bp_activity_action_delete_activity( $activity_id = 0 ) {
116
117
+ // Not viewing activity or action is not delete.
118
if ( !bp_is_activity_component() || !bp_is_current_action( 'delete' ) )
119
return false;
120
121
if ( empty( $activity_id ) && bp_action_variable( 0 ) )
122
$activity_id = (int) bp_action_variable( 0 );
123
124
+ // Not viewing a specific activity item.
125
if ( empty( $activity_id ) )
126
return false;
127
128
+ // Check the nonce.
129
check_admin_referer( 'bp_activity_delete_link' );
130
131
+ // Load up the activity item.
132
$activity = new BP_Activity_Activity( $activity_id );
133
134
+ // Check access.
135
if ( ! bp_activity_user_can_delete( $activity ) )
136
return false;
137
138
+ /**
139
+ * Fires before the deletion so plugins can still fetch information about it.
140
+ *
141
+ * @since 1.5.0
142
+ *
143
+ * @param int $activity_id The activity ID.
144
+ * @param int $user_id The user associated with the activity.
145
+ */
146
do_action( 'bp_activity_before_action_delete_activity', $activity_id, $activity->user_id );
147
148
+ // Delete the activity item and provide user feedback.
149
if ( bp_activity_delete( array( 'id' => $activity_id, 'user_id' => $activity->user_id ) ) )
150
bp_core_add_message( __( 'Activity deleted successfully', 'buddypress' ) );
151
else
152
bp_core_add_message( __( 'There was an error when deleting that activity', 'buddypress' ), 'error' );
153
154
+ /**
155
+ * Fires after the deletion so plugins can act afterwards based on the activity.
156
+ *
157
+ * @since 1.1.0
158
+ *
159
+ * @param int $activity_id The activity ID.
160
+ * @param int $user_id The user associated with the activity.
161
+ */
162
do_action( 'bp_activity_action_delete_activity', $activity_id, $activity->user_id );
163
164
+ // Check for the redirect query arg, otherwise let WP handle things.
165
+ if ( !empty( $_GET['redirect_to'] ) )
166
bp_core_redirect( esc_url( $_GET['redirect_to'] ) );
167
else
168
bp_core_redirect( wp_get_referer() );
172
/**
173
* Mark specific activity item as spam and redirect to previous page.
174
*
175
+ * @since 1.6.0
176
*
177
* @param int $activity_id Activity id to be deleted. Defaults to 0.
178
* @return bool False on failure.
179
*/
180
function bp_activity_action_spam_activity( $activity_id = 0 ) {
181
+ $bp = buddypress();
182
183
+ // Not viewing activity, or action is not spam, or Akismet isn't present.
184
if ( !bp_is_activity_component() || !bp_is_current_action( 'spam' ) || empty( $bp->activity->akismet ) )
185
return false;
186
187
if ( empty( $activity_id ) && bp_action_variable( 0 ) )
188
$activity_id = (int) bp_action_variable( 0 );
189
190
+ // Not viewing a specific activity item.
191
if ( empty( $activity_id ) )
192
return false;
193
195
if ( !bp_activity_user_can_mark_spam() )
196
return false;
197
198
+ // Load up the activity item.
199
$activity = new BP_Activity_Activity( $activity_id );
200
if ( empty( $activity->id ) )
201
return false;
202
203
+ // Check nonce.
204
check_admin_referer( 'bp_activity_akismet_spam_' . $activity->id );
205
206
+ /**
207
+ * Fires before the marking activity as spam so plugins can modify things if they want to.
208
+ *
209
+ * @since 1.6.0
210
+ *
211
+ * @param int $activity_id Activity ID to be marked as spam.
212
+ * @param object $activity Activity object for the ID to be marked as spam.
213
+ */
214
do_action( 'bp_activity_before_action_spam_activity', $activity->id, $activity );
215
216
+ // Mark as spam.
217
bp_activity_mark_as_spam( $activity );
218
$activity->save();
219
220
+ // Tell the user the spamming has been successful.
221
bp_core_add_message( __( 'The activity item has been marked as spam and is no longer visible.', 'buddypress' ) );
222
223
+ /**
224
+ * Fires after the marking activity as spam so plugins can act afterwards based on the activity.
225
+ *
226
+ * @since 1.6.0
227
+ *
228
+ * @param int $activity_id Activity ID that was marked as spam.
229
+ * @param int $user_id User ID associated with activity.
230
+ */
231
do_action( 'bp_activity_action_spam_activity', $activity_id, $activity->user_id );
232
233
+ // Check for the redirect query arg, otherwise let WP handle things.
234
+ if ( !empty( $_GET['redirect_to'] ) )
235
bp_core_redirect( esc_url( $_GET['redirect_to'] ) );
236
else
237
bp_core_redirect( wp_get_referer() );
241
/**
242
* Post user/group activity update.
243
*
244
+ * @since 1.2.0
245
*
246
* @return bool False on failure.
247
*/
248
function bp_activity_action_post_update() {
249
250
+ // Do not proceed if user is not logged in, not viewing activity, or not posting.
251
if ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'post' ) )
252
return false;
253
254
+ // Check the nonce.
255
check_admin_referer( 'post_update', '_wpnonce_post_update' );
256
257
+ /**
258
+ * Filters the content provided in the activity input field.
259
+ *
260
+ * @since 1.2.0
261
+ *
262
+ * @param string $value Activity message being posted.
263
+ */
264
$content = apply_filters( 'bp_activity_post_update_content', $_POST['whats-new'] );
265
266
if ( ! empty( $_POST['whats-new-post-object'] ) ) {
267
+
268
+ /**
269
+ * Filters the item type that the activity update should be associated with.
270
+ *
271
+ * @since 1.2.0
272
+ *
273
+ * @param string $value Item type to associate with.
274
+ */
275
$object = apply_filters( 'bp_activity_post_update_object', $_POST['whats-new-post-object'] );
276
}
277
278
if ( ! empty( $_POST['whats-new-post-in'] ) ) {
279
+
280
+ /**
281
+ * Filters what component the activity is being to.
282
+ *
283
+ * @since 1.2.0
284
+ *
285
+ * @param string $value Chosen component to post activity to.
286
+ */
287
$item_id = apply_filters( 'bp_activity_post_update_item_id', $_POST['whats-new-post-in'] );
288
}
289
290
+ // No activity content so provide feedback and redirect.
291
if ( empty( $content ) ) {
292
bp_core_add_message( __( 'Please enter some content to post.', 'buddypress' ), 'error' );
293
bp_core_redirect( wp_get_referer() );
294
}
295
296
+ // No existing item_id.
297
if ( empty( $item_id ) ) {
298
$activity_id = bp_activity_post_update( array( 'content' => $content ) );
299
300
+ // Post to groups object.
301
+ } elseif ( 'groups' == $object && bp_is_active( 'groups' ) ) {
302
if ( (int) $item_id ) {
303
$activity_id = groups_post_update( array( 'content' => $content, 'group_id' => $item_id ) );
304
}
305
306
} else {
307
+
308
+ /**
309
+ * Filters activity object for BuddyPress core and plugin authors before posting activity update.
310
+ *
311
+ * @since 1.2.0
312
+ *
313
+ * @param string $object Activity item being associated to.
314
+ * @param string $item_id Component ID being posted to.
315
+ * @param string $content Activity content being posted.
316
+ */
317
$activity_id = apply_filters( 'bp_activity_custom_update', $object, $item_id, $content );
318
}
319
320
+ // Provide user feedback.
321
if ( !empty( $activity_id ) )
322
bp_core_add_message( __( 'Update Posted!', 'buddypress' ) );
323
else
324
+ bp_core_add_message( __( 'There was an error when posting your update. Please try again.', 'buddypress' ), 'error' );
325
326
+ // Redirect.
327
bp_core_redirect( wp_get_referer() );
328
}
329
add_action( 'bp_actions', 'bp_activity_action_post_update' );
331
/**
332
* Post new activity comment.
333
*
334
+ * @since 1.2.0
335
*
336
* @return bool False on failure.
337
*/
340
if ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'reply' ) )
341
return false;
342
343
+ // Check the nonce.
344
check_admin_referer( 'new_activity_comment', '_wpnonce_new_activity_comment' );
345
346
+ /**
347
+ * Filters the activity ID a comment will be in reply to.
348
+ *
349
+ * @since 1.2.0
350
+ *
351
+ * @param string $value ID of the activity being replied to.
352
+ */
353
$activity_id = apply_filters( 'bp_activity_post_comment_activity_id', $_POST['comment_form_id'] );
354
+
355
+ /**
356
+ * Filters the comment content for a comment reply.
357
+ *
358
+ * @since 1.2.0
359
+ *
360
+ * @param string $value Comment content being posted.
361
+ */
362
$content = apply_filters( 'bp_activity_post_comment_content', $_POST['ac_input_' . $activity_id] );
363
364
if ( empty( $content ) ) {
375
if ( !empty( $comment_id ) )
376
bp_core_add_message( __( 'Reply Posted!', 'buddypress' ) );
377
else
378
+ bp_core_add_message( __( 'There was an error posting that reply. Please try again.', 'buddypress' ), 'error' );
379
380
bp_core_redirect( wp_get_referer() . '#ac-form-' . $activity_id );
381
}
384
/**
385
* Mark activity as favorite.
386
*
387
+ * @since 1.2.0
388
*
389
* @return bool False on failure.
390
*/
393
if ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'favorite' ) )
394
return false;
395
396
+ // Check the nonce.
397
check_admin_referer( 'mark_favorite' );
398
399
if ( bp_activity_add_user_favorite( bp_action_variable( 0 ) ) )
400
bp_core_add_message( __( 'Activity marked as favorite.', 'buddypress' ) );
401
else
402
+ bp_core_add_message( __( 'There was an error marking that activity as a favorite. Please try again.', 'buddypress' ), 'error' );
403
404
bp_core_redirect( wp_get_referer() . '#activity-' . bp_action_variable( 0 ) );
405
}
408
/**
409
* Remove activity from favorites.
410
*
411
+ * @since 1.2.0
412
*
413
* @return bool False on failure.
414
*/
417
if ( ! is_user_logged_in() || ! bp_is_activity_component() || ! bp_is_current_action( 'unfavorite' ) )
418
return false;
419
420
+ // Check the nonce.
421
check_admin_referer( 'unmark_favorite' );
422
423
if ( bp_activity_remove_user_favorite( bp_action_variable( 0 ) ) )
424
bp_core_add_message( __( 'Activity removed as favorite.', 'buddypress' ) );
425
else
426
+ bp_core_add_message( __( 'There was an error removing that activity as a favorite. Please try again.', 'buddypress' ), 'error' );
427
428
bp_core_redirect( wp_get_referer() . '#activity-' . bp_action_variable( 0 ) );
429
}
432
/**
433
* Load the sitewide activity feed.
434
*
435
+ * @since 1.0.0
436
*
437
* @return bool False on failure.
438
*/
439
function bp_activity_action_sitewide_feed() {
440
+ $bp = buddypress();
441
442
if ( ! bp_is_activity_component() || ! bp_is_current_action( 'feed' ) || bp_is_user() || ! empty( $bp->groups->current_group ) )
443
return false;
444
445
+ // Setup the feed.
446
buddypress()->activity->feed = new BP_Activity_Feed( array(
447
'id' => 'sitewide',
448
459
/**
460
* Load a user's personal activity feed.
461
*
462
+ * @since 1.0.0
463
*
464
* @return bool False on failure.
465
*/
468
return false;
469
}
470
471
+ // Setup the feed.
472
buddypress()->activity->feed = new BP_Activity_Feed( array(
473
'id' => 'personal',
474
485
/**
486
* Load a user's friends' activity feed.
487
*
488
+ * @since 1.0.0
489
*
490
* @return bool False on failure.
491
*/
494
return false;
495
}
496
497
+ // Setup the feed.
498
buddypress()->activity->feed = new BP_Activity_Feed( array(
499
'id' => 'friends',
500
511
/**
512
* Load the activity feed for a user's groups.
513
*
514
+ * @since 1.2.0
515
*
516
* @return bool False on failure.
517
*/
520
return false;
521
}
522
523
+ // Get displayed user's group IDs.
524
$groups = groups_get_user_groups();
525
$group_ids = implode( ',', $groups['groups'] );
526
527
+ // Setup the feed.
528
buddypress()->activity->feed = new BP_Activity_Feed( array(
529
'id' => 'mygroups',
530
545
/**
546
* Load a user's @mentions feed.
547
*
548
+ * @since 1.2.0
549
*
550
* @return bool False on failure.
551
*/
558
return false;
559
}
560
561
+ // Setup the feed.
562
buddypress()->activity->feed = new BP_Activity_Feed( array(
563
'id' => 'mentions',
564
577
/**
578
* Load a user's favorites feed.
579
*
580