BuddyPress - Version 2.8.0-beta1

Version Description

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

Download this release

Release Info

Developer slaFFik
Plugin Icon 128x128 BuddyPress
Version 2.8.0-beta1
Comparing to
See all releases

Code changes from version 2.5.4 to 2.8.0-beta1

Files changed (682) hide show
  1. bp-activity/admin/js/admin.min.js +0 -1
  2. bp-activity/bp-activity-actions.php +6 -143
  3. bp-activity/bp-activity-admin.php +41 -14
  4. bp-activity/bp-activity-adminbar.php +47 -0
  5. bp-activity/bp-activity-akismet.php +22 -1
  6. bp-activity/bp-activity-cache.php +21 -0
  7. bp-activity/bp-activity-classes.php +0 -15
  8. bp-activity/bp-activity-embeds.php +352 -0
  9. bp-activity/bp-activity-filters.php +56 -51
  10. bp-activity/bp-activity-functions.php +437 -233
  11. bp-activity/bp-activity-loader.php +1 -3
  12. bp-activity/bp-activity-notifications.php +184 -237
  13. bp-activity/bp-activity-screens.php +23 -65
  14. bp-activity/bp-activity-template.php +47 -328
  15. bp-activity/classes/class-bp-activity-activity.php +115 -81
  16. bp-activity/classes/class-bp-activity-component.php +23 -32
  17. bp-activity/classes/class-bp-activity-list-table.php +41 -18
  18. bp-activity/classes/class-bp-activity-oembed-extension.php +329 -0
  19. bp-activity/classes/class-bp-activity-template.php +1 -2
  20. bp-activity/css/mentions-rtl.css +2 -3
  21. bp-activity/css/mentions-rtl.min.css +1 -1
  22. bp-activity/css/mentions.css +3 -3
  23. bp-activity/css/mentions.min.css +1 -1
  24. bp-activity/js/mentions.js +1 -1
  25. bp-activity/js/mentions.min.js +1 -2
  26. bp-blogs/bp-blogs-activity.php +150 -7
  27. bp-blogs/bp-blogs-classes.php +0 -13
  28. bp-blogs/bp-blogs-filters.php +14 -1
  29. bp-blogs/bp-blogs-functions.php +209 -162
  30. bp-blogs/bp-blogs-loader.php +2 -2
  31. bp-blogs/bp-blogs-screens.php +0 -2
  32. bp-blogs/bp-blogs-template.php +135 -48
  33. bp-blogs/bp-blogs-widgets.php +1 -3
  34. bp-blogs/classes/class-bp-blogs-blog.php +50 -10
  35. bp-blogs/classes/class-bp-blogs-component.php +15 -3
  36. bp-blogs/classes/class-bp-blogs-recent-posts-widget.php +3 -2
  37. bp-core/admin/bp-core-admin-actions.php +0 -9
  38. bp-core/admin/bp-core-admin-classes.php +0 -13
  39. bp-core/admin/bp-core-admin-components.php +28 -94
  40. bp-core/admin/bp-core-admin-functions.php +88 -18
  41. bp-core/admin/bp-core-admin-schema.php +13 -48
  42. bp-core/admin/bp-core-admin-settings.php +0 -16
  43. bp-core/admin/bp-core-admin-slugs.php +11 -4
  44. bp-core/admin/bp-core-admin-tools.php +38 -23
  45. bp-core/admin/css/common-rtl.css +345 -80
  46. bp-core/admin/css/common-rtl.min.css +1 -1
  47. bp-core/admin/css/common.css +345 -80
  48. bp-core/admin/css/common.min.css +1 -1
  49. bp-core/admin/images/autolink-feature.png +0 -0
  50. bp-core/admin/images/bp-emails-feature.png +0 -0
  51. bp-core/admin/images/emoji-feature.png +0 -0
  52. bp-core/admin/images/post-type.png +0 -0
  53. bp-core/admin/images/twentytwelve.png +0 -0
  54. bp-core/admin/js/customizer-controls.min.js +0 -1
  55. bp-core/admin/js/customizer-receiver-emails.min.js +0 -1
  56. bp-core/admin/js/dismissible-admin-notices.js +16 -0
  57. bp-core/admin/js/dismissible-admin-notices.min.js +1 -0
  58. bp-core/bp-core-actions.php +13 -4
  59. bp-core/bp-core-admin.php +27 -22
  60. bp-core/bp-core-adminbar.php +0 -11
  61. bp-core/bp-core-attachments.php +26 -11
  62. bp-core/bp-core-avatars.php +102 -85
  63. bp-core/bp-core-buddybar.php +225 -161
  64. bp-core/bp-core-cache.php +107 -0
  65. bp-core/bp-core-caps.php +65 -37
  66. bp-core/bp-core-catchuri.php +147 -29
  67. bp-core/bp-core-classes.php +0 -32
  68. bp-core/bp-core-component.php +3 -1
  69. bp-core/bp-core-cssjs.php +145 -22
  70. bp-core/bp-core-customizer-email.php +6 -13
  71. bp-core/bp-core-dependency.php +39 -47
  72. bp-core/bp-core-filters.php +68 -49
  73. bp-core/bp-core-functions.php +598 -115
  74. bp-core/bp-core-loader.php +1 -5
  75. bp-core/bp-core-moderation.php +28 -27
  76. bp-core/bp-core-options.php +22 -102
  77. bp-core/bp-core-taxonomy.php +165 -19
  78. bp-core/bp-core-template-loader.php +68 -15
  79. bp-core/bp-core-template.php +235 -114
  80. bp-core/bp-core-theme-compatibility.php +15 -43
  81. bp-core/bp-core-update.php +109 -42
  82. bp-core/bp-core-widgets.php +1 -3
  83. bp-core/bp-core-wpabstraction.php +0 -7
  84. bp-core/classes/class-bp-admin.php +212 -96
  85. bp-core/classes/class-bp-attachment-avatar.php +1 -21
  86. bp-core/classes/class-bp-attachment-cover-image.php +291 -291
  87. bp-core/classes/class-bp-attachment.php +14 -28
  88. bp-core/classes/class-bp-button.php +231 -76
  89. bp-core/classes/class-bp-component.php +2 -16
  90. bp-core/classes/class-bp-core-bp-nav-backcompat.php +270 -0
  91. bp-core/classes/class-bp-core-bp-options-nav-backcompat.php +138 -0
  92. bp-core/classes/class-bp-core-html-element.php +127 -0
  93. bp-core/classes/class-bp-core-login-widget.php +4 -3
  94. bp-core/classes/class-bp-core-nav-item.php +15 -0
  95. bp-core/classes/class-bp-core-nav.php +402 -0
  96. bp-core/classes/class-bp-core-oembed-extension.php +622 -0
  97. bp-core/classes/class-bp-core-sort-by-key-callback.php +0 -83
  98. bp-core/classes/class-bp-core-user.php +18 -13
  99. bp-core/classes/class-bp-core.php +4 -1
  100. bp-core/classes/class-bp-email-recipient.php +36 -13
  101. bp-core/classes/class-bp-embed.php +0 -9
  102. bp-core/classes/class-bp-media-extractor.php +1 -1
  103. bp-core/classes/class-bp-phpmailer.php +12 -1
  104. bp-core/classes/class-bp-theme-compat.php +1 -1
  105. bp-core/classes/class-bp-user-query.php +18 -10
  106. bp-core/classes/class-bp-walker-category-checklist.php +1 -1
  107. bp-core/classes/class-bp-walker-nav-menu.php +1 -3
  108. bp-core/css/admin-bar-rtl.css +15 -2
  109. bp-core/css/admin-bar-rtl.min.css +1 -1
  110. bp-core/css/admin-bar.css +15 -2
  111. bp-core/css/admin-bar.min.css +1 -1
  112. bp-core/css/avatar-rtl.css +16 -2
  113. bp-core/css/avatar-rtl.min.css +1 -1
  114. bp-core/css/avatar.css +16 -2
  115. bp-core/css/avatar.min.css +1 -1
  116. bp-core/css/buddybar-rtl.css +3 -3
  117. bp-core/css/buddybar-rtl.min.css +1 -1
  118. bp-core/deprecated/1.2.php +0 -2
  119. bp-core/deprecated/1.7.php +0 -1
  120. bp-core/deprecated/2.5.php +2 -2
  121. bp-core/deprecated/2.6.php +50 -0
  122. bp-core/deprecated/2.7.php +26 -0
  123. bp-core/deprecated/2.8.php +199 -0
  124. bp-core/images/mystery-group-50.png +0 -0
  125. bp-core/images/mystery-group.png +0 -0
  126. bp-core/js/avatar.min.js +0 -1
  127. bp-core/js/bp-plupload.min.js +1 -2
  128. bp-core/js/confirm.min.js +1 -2
  129. bp-core/js/cover-image.js +277 -277
  130. bp-core/js/cover-image.min.js +0 -1
  131. bp-core/js/jquery-query.min.js +0 -1
  132. bp-core/js/jquery.atwho.min.js +0 -2
  133. bp-core/js/{jquery-cookie.js → vendor/jquery-cookie.js} +0 -0
  134. bp-core/js/{jquery-cookie.min.js → vendor/jquery-cookie.min.js} +1 -2
  135. bp-core/js/{jquery-scroll-to.js → vendor/jquery-scroll-to.js} +0 -0
  136. bp-core/js/{jquery-scroll-to.min.js → vendor/jquery-scroll-to.min.js} +1 -2
  137. bp-core/js/{jquery.atwho.js → vendor/jquery.atwho.js} +0 -0
  138. bp-core/js/vendor/jquery.atwho.min.js +1 -0
  139. bp-core/js/{jquery.atwho.txt → vendor/jquery.atwho.txt} +0 -0
  140. bp-core/js/{jquery.caret.js → vendor/jquery.caret.js} +0 -0
  141. bp-core/js/{jquery.caret.min.js → vendor/jquery.caret.min.js} +1 -2
  142. bp-core/js/{jquery.caret.txt → vendor/jquery.caret.txt} +0 -0
  143. bp-core/js/vendor/livestamp.js +129 -0
  144. bp-core/js/vendor/livestamp.min.js +1 -0
  145. bp-core/js/vendor/moment-js/locale/af.js +73 -0
  146. bp-core/js/vendor/moment-js/locale/af.min.js +1 -0
  147. bp-core/js/vendor/moment-js/locale/ar-ly.js +122 -0
  148. bp-core/js/vendor/moment-js/locale/ar-ly.min.js +1 -0
  149. bp-core/js/vendor/moment-js/locale/ar-ma.js +60 -0
  150. bp-core/js/vendor/moment-js/locale/ar-ma.min.js +1 -0
  151. bp-core/js/vendor/moment-js/locale/ar-sa.js +104 -0
  152. bp-core/js/vendor/moment-js/locale/ar-sa.min.js +1 -0
  153. bp-core/js/vendor/moment-js/locale/ar-tn.js +59 -0
  154. bp-core/js/vendor/moment-js/locale/ar-tn.min.js +1 -0
  155. bp-core/js/vendor/moment-js/locale/ar.js +137 -0
  156. bp-core/js/vendor/moment-js/locale/ar.min.js +1 -0
  157. bp-core/js/vendor/moment-js/locale/az.js +105 -0
  158. bp-core/js/vendor/moment-js/locale/az.min.js +1 -0
  159. bp-core/js/vendor/moment-js/locale/be.js +134 -0
  160. bp-core/js/vendor/moment-js/locale/be.min.js +1 -0
  161. bp-core/js/vendor/moment-js/locale/bg.js +90 -0
  162. bp-core/js/vendor/moment-js/locale/bg.min.js +1 -0
  163. bp-core/js/vendor/moment-js/locale/bn.js +119 -0
  164. bp-core/js/vendor/moment-js/locale/bn.min.js +1 -0
  165. bp-core/js/vendor/moment-js/locale/bo.js +119 -0
  166. bp-core/js/vendor/moment-js/locale/bo.min.js +1 -0
  167. bp-core/js/vendor/moment-js/locale/br.js +108 -0
  168. bp-core/js/vendor/moment-js/locale/br.min.js +1 -0
  169. bp-core/js/vendor/moment-js/locale/bs.js +143 -0
  170. bp-core/js/vendor/moment-js/locale/bs.min.js +1 -0
  171. bp-core/js/vendor/moment-js/locale/ca.js +81 -0
  172. bp-core/js/vendor/moment-js/locale/ca.min.js +1 -0
  173. bp-core/js/vendor/moment-js/locale/cs.js +172 -0
  174. bp-core/js/vendor/moment-js/locale/cs.min.js +1 -0
  175. bp-core/js/vendor/moment-js/locale/cv.js +63 -0
  176. bp-core/js/vendor/moment-js/locale/cv.min.js +1 -0
  177. bp-core/js/vendor/moment-js/locale/cy.js +81 -0
  178. bp-core/js/vendor/moment-js/locale/cy.min.js +1 -0
  179. bp-core/js/vendor/moment-js/locale/da.js +60 -0
  180. bp-core/js/vendor/moment-js/locale/da.min.js +1 -0
  181. bp-core/js/vendor/moment-js/locale/de-at.js +79 -0
  182. bp-core/js/vendor/moment-js/locale/de-at.min.js +1 -0
  183. bp-core/js/vendor/moment-js/locale/de.js +78 -0
  184. bp-core/js/vendor/moment-js/locale/de.min.js +1 -0
  185. bp-core/js/vendor/moment-js/locale/dv.js +99 -0
  186. bp-core/js/vendor/moment-js/locale/dv.min.js +1 -0
  187. bp-core/js/vendor/moment-js/locale/el.js +98 -0
  188. bp-core/js/vendor/moment-js/locale/el.min.js +1 -0
  189. bp-core/js/vendor/moment-js/locale/en-au.js +67 -0
  190. bp-core/js/vendor/moment-js/locale/en-au.min.js +1 -0
  191. bp-core/js/vendor/moment-js/locale/en-ca.js +63 -0
  192. bp-core/js/vendor/moment-js/locale/en-ca.min.js +1 -0
  193. bp-core/js/vendor/moment-js/locale/en-gb.js +67 -0
  194. bp-core/js/vendor/moment-js/locale/en-gb.min.js +1 -0
  195. bp-core/js/vendor/moment-js/locale/en-ie.js +67 -0
  196. bp-core/js/vendor/moment-js/locale/en-ie.min.js +1 -0
  197. bp-core/js/vendor/moment-js/locale/en-nz.js +67 -0
  198. bp-core/js/vendor/moment-js/locale/en-nz.min.js +1 -0
  199. bp-core/js/vendor/moment-js/locale/eo.js +73 -0
  200. bp-core/js/vendor/moment-js/locale/eo.min.js +1 -0
  201. bp-core/js/vendor/moment-js/locale/es-do.js +80 -0
  202. bp-core/js/vendor/moment-js/locale/es-do.min.js +1 -0
  203. bp-core/js/vendor/moment-js/locale/es.js +81 -0
  204. bp-core/js/vendor/moment-js/locale/es.min.js +1 -0
  205. bp-core/js/vendor/moment-js/locale/et.js +80 -0
  206. bp-core/js/vendor/moment-js/locale/et.min.js +1 -0
  207. bp-core/js/vendor/moment-js/locale/eu.js +66 -0
  208. bp-core/js/vendor/moment-js/locale/eu.min.js +1 -0
  209. bp-core/js/vendor/moment-js/locale/fa.js +106 -0
  210. bp-core/js/vendor/moment-js/locale/fa.min.js +1 -0
  211. bp-core/js/vendor/moment-js/locale/fi.js +107 -0
  212. bp-core/js/vendor/moment-js/locale/fi.min.js +1 -0
  213. bp-core/js/vendor/moment-js/locale/fo.js +60 -0
  214. bp-core/js/vendor/moment-js/locale/fo.min.js +1 -0
  215. bp-core/js/vendor/moment-js/locale/fr-ca.js +60 -0
  216. bp-core/js/vendor/moment-js/locale/fr-ca.min.js +1 -0
  217. bp-core/js/vendor/moment-js/locale/fr-ch.js +64 -0
  218. bp-core/js/vendor/moment-js/locale/fr-ch.min.js +1 -0
  219. bp-core/js/vendor/moment-js/locale/fr.js +64 -0
  220. bp-core/js/vendor/moment-js/locale/fr.min.js +1 -0
  221. bp-core/js/vendor/moment-js/locale/fy.js +73 -0
  222. bp-core/js/vendor/moment-js/locale/fy.min.js +1 -0
  223. bp-core/js/vendor/moment-js/locale/gd.js +76 -0
  224. bp-core/js/vendor/moment-js/locale/gd.min.js +1 -0
  225. bp-core/js/vendor/moment-js/locale/gl.js +77 -0
  226. bp-core/js/vendor/moment-js/locale/gl.min.js +1 -0
  227. bp-core/js/vendor/moment-js/locale/he.js +99 -0
  228. bp-core/js/vendor/moment-js/locale/he.min.js +1 -0
  229. bp-core/js/vendor/moment-js/locale/hi.js +124 -0
  230. bp-core/js/vendor/moment-js/locale/hi.min.js +1 -0
  231. bp-core/js/vendor/moment-js/locale/hr.js +145 -0
  232. bp-core/js/vendor/moment-js/locale/hr.min.js +1 -0
  233. bp-core/js/vendor/moment-js/locale/hu.js +109 -0
  234. bp-core/js/vendor/moment-js/locale/hu.min.js +1 -0
  235. bp-core/js/vendor/moment-js/locale/hy-am.js +95 -0
  236. bp-core/js/vendor/moment-js/locale/hy-am.min.js +1 -0
  237. bp-core/js/vendor/moment-js/locale/id.js +83 -0
  238. bp-core/js/vendor/moment-js/locale/id.min.js +1 -0
  239. bp-core/js/vendor/moment-js/locale/is.js +127 -0
  240. bp-core/js/vendor/moment-js/locale/is.min.js +1 -0
  241. bp-core/js/vendor/moment-js/locale/it.js +70 -0
  242. bp-core/js/vendor/moment-js/locale/it.min.js +1 -0
  243. bp-core/js/vendor/moment-js/locale/ja.js +76 -0
  244. bp-core/js/vendor/moment-js/locale/ja.min.js +1 -0
  245. bp-core/js/vendor/moment-js/locale/jv.js +83 -0
  246. bp-core/js/vendor/moment-js/locale/jv.min.js +1 -0
  247. bp-core/js/vendor/moment-js/locale/ka.js +89 -0
  248. bp-core/js/vendor/moment-js/locale/ka.min.js +1 -0
  249. bp-core/js/vendor/moment-js/locale/kk.js +87 -0
  250. bp-core/js/vendor/moment-js/locale/kk.min.js +1 -0
  251. bp-core/js/vendor/moment-js/locale/km.js +58 -0
  252. bp-core/js/vendor/moment-js/locale/km.min.js +1 -0
  253. bp-core/js/vendor/moment-js/locale/ko.js +65 -0
  254. bp-core/js/vendor/moment-js/locale/ko.min.js +1 -0
  255. bp-core/js/vendor/moment-js/locale/ky.js +88 -0
  256. bp-core/js/vendor/moment-js/locale/ky.min.js +1 -0
  257. bp-core/js/vendor/moment-js/locale/lb.js +137 -0
  258. bp-core/js/vendor/moment-js/locale/lb.min.js +1 -0
  259. bp-core/js/vendor/moment-js/locale/lo.js +70 -0
  260. bp-core/js/vendor/moment-js/locale/lo.min.js +1 -0
  261. bp-core/js/vendor/moment-js/locale/lt.js +117 -0
  262. bp-core/js/vendor/moment-js/locale/lt.min.js +1 -0
  263. bp-core/js/vendor/moment-js/locale/lv.js +97 -0
  264. bp-core/js/vendor/moment-js/locale/lv.min.js +1 -0
  265. bp-core/js/vendor/moment-js/locale/me.js +111 -0
  266. bp-core/js/vendor/moment-js/locale/me.min.js +1 -0
  267. bp-core/js/vendor/moment-js/locale/mi.js +64 -0
  268. bp-core/js/vendor/moment-js/locale/mi.min.js +1 -0
  269. bp-core/js/vendor/moment-js/locale/mk.js +90 -0
  270. bp-core/js/vendor/moment-js/locale/mk.min.js +1 -0
  271. bp-core/js/vendor/moment-js/locale/ml.js +81 -0
  272. bp-core/js/vendor/moment-js/locale/ml.min.js +1 -0
  273. bp-core/js/vendor/moment-js/locale/mr.js +159 -0
  274. bp-core/js/vendor/moment-js/locale/mr.min.js +1 -0
  275. bp-core/js/vendor/moment-js/locale/ms-my.js +83 -0
  276. bp-core/js/vendor/moment-js/locale/ms-my.min.js +1 -0
  277. bp-core/js/vendor/moment-js/locale/ms.js +82 -0
  278. bp-core/js/vendor/moment-js/locale/ms.min.js +1 -0
  279. bp-core/js/vendor/moment-js/locale/my.js +95 -0
  280. bp-core/js/vendor/moment-js/locale/my.min.js +1 -0
  281. bp-core/js/vendor/moment-js/locale/nb.js +63 -0
  282. bp-core/js/vendor/moment-js/locale/nb.min.js +1 -0
  283. bp-core/js/vendor/moment-js/locale/ne.js +123 -0
  284. bp-core/js/vendor/moment-js/locale/ne.min.js +1 -0
  285. bp-core/js/vendor/moment-js/locale/nl.js +86 -0
  286. bp-core/js/vendor/moment-js/locale/nl.min.js +1 -0
  287. bp-core/js/vendor/moment-js/locale/nn.js +60 -0
  288. bp-core/js/vendor/moment-js/locale/nn.min.js +1 -0
  289. bp-core/js/vendor/moment-js/locale/pa-in.js +124 -0
  290. bp-core/js/vendor/moment-js/locale/pa-in.min.js +1 -0
  291. bp-core/js/vendor/moment-js/locale/pl.js +105 -0
  292. bp-core/js/vendor/moment-js/locale/pl.min.js +1 -0
  293. bp-core/js/vendor/moment-js/locale/pt-br.js +61 -0
  294. bp-core/js/vendor/moment-js/locale/pt-br.min.js +1 -0
  295. bp-core/js/vendor/moment-js/locale/pt.js +65 -0
  296. bp-core/js/vendor/moment-js/locale/pt.min.js +1 -0
  297. bp-core/js/vendor/moment-js/locale/ro.js +75 -0
  298. bp-core/js/vendor/moment-js/locale/ro.min.js +1 -0
  299. bp-core/js/vendor/moment-js/locale/ru.js +183 -0
  300. bp-core/js/vendor/moment-js/locale/ru.min.js +1 -0
  301. bp-core/js/vendor/moment-js/locale/se.js +61 -0
  302. bp-core/js/vendor/moment-js/locale/se.min.js +1 -0
  303. bp-core/js/vendor/moment-js/locale/si.js +71 -0
  304. bp-core/js/vendor/moment-js/locale/si.min.js +1 -0
  305. bp-core/js/vendor/moment-js/locale/sk.js +150 -0
  306. bp-core/js/vendor/moment-js/locale/sk.min.js +1 -0
  307. bp-core/js/vendor/moment-js/locale/sl.js +162 -0
  308. bp-core/js/vendor/moment-js/locale/sl.min.js +1 -0
  309. bp-core/js/vendor/moment-js/locale/sq.js +70 -0
  310. bp-core/js/vendor/moment-js/locale/sq.min.js +1 -0
  311. bp-core/js/vendor/moment-js/locale/sr-cyrl.js +110 -0
  312. bp-core/js/vendor/moment-js/locale/sr-cyrl.min.js +1 -0
  313. bp-core/js/vendor/moment-js/locale/sr.js +110 -0
  314. bp-core/js/vendor/moment-js/locale/sr.min.js +1 -0
  315. bp-core/js/vendor/moment-js/locale/ss.js +89 -0
  316. bp-core/js/vendor/moment-js/locale/ss.min.js +1 -0
  317. bp-core/js/vendor/moment-js/locale/sv.js +69 -0
  318. bp-core/js/vendor/moment-js/locale/sv.min.js +1 -0
  319. bp-core/js/vendor/moment-js/locale/sw.js +59 -0
  320. bp-core/js/vendor/moment-js/locale/sw.min.js +1 -0
  321. bp-core/js/vendor/moment-js/locale/ta.js +129 -0
  322. bp-core/js/vendor/moment-js/locale/ta.min.js +1 -0
  323. bp-core/js/vendor/moment-js/locale/te.js +89 -0
  324. bp-core/js/vendor/moment-js/locale/te.min.js +1 -0
  325. bp-core/js/vendor/moment-js/locale/th.js +67 -0
  326. bp-core/js/vendor/moment-js/locale/th.min.js +1 -0
  327. bp-core/js/vendor/moment-js/locale/tl-ph.js +62 -0
  328. bp-core/js/vendor/moment-js/locale/tl-ph.min.js +1 -0
  329. bp-core/js/vendor/moment-js/locale/tlh.js +120 -0
  330. bp-core/js/vendor/moment-js/locale/tlh.min.js +1 -0
  331. bp-core/js/vendor/moment-js/locale/tr.js +90 -0
  332. bp-core/js/vendor/moment-js/locale/tr.min.js +1 -0
  333. bp-core/js/vendor/moment-js/locale/tzl.js +91 -0
  334. bp-core/js/vendor/moment-js/locale/tzl.min.js +1 -0
  335. bp-core/js/vendor/moment-js/locale/tzm-latn.js +58 -0
  336. bp-core/js/vendor/moment-js/locale/tzm-latn.min.js +1 -0
  337. bp-core/js/vendor/moment-js/locale/tzm.js +58 -0
  338. bp-core/js/vendor/moment-js/locale/tzm.min.js +1 -0
  339. bp-core/js/vendor/moment-js/locale/uk.js +146 -0
  340. bp-core/js/vendor/moment-js/locale/uk.min.js +1 -0
  341. bp-core/js/vendor/moment-js/locale/uz.js +58 -0
  342. bp-core/js/vendor/moment-js/locale/uz.min.js +1 -0
  343. bp-core/js/vendor/moment-js/locale/vi.js +79 -0
  344. bp-core/js/vendor/moment-js/locale/vi.min.js +1 -0
  345. bp-core/js/vendor/moment-js/locale/x-pseudo.js +68 -0
  346. bp-core/js/vendor/moment-js/locale/x-pseudo.min.js +1 -0
  347. bp-core/js/vendor/moment-js/locale/zh-cn.js +127 -0
  348. bp-core/js/vendor/moment-js/locale/zh-cn.min.js +1 -0
  349. bp-core/js/vendor/moment-js/locale/zh-hk.js +105 -0
  350. bp-core/js/vendor/moment-js/locale/zh-hk.min.js +1 -0
  351. bp-core/js/vendor/moment-js/locale/zh-tw.js +104 -0
  352. bp-core/js/vendor/moment-js/locale/zh-tw.min.js +1 -0
  353. bp-core/js/vendor/moment-js/moment.js +4234 -0
  354. bp-core/js/vendor/moment-js/moment.min.js +2 -0
  355. bp-core/js/webcam.min.js +0 -1
  356. bp-core/js/widget-members.js +12 -1
  357. bp-core/js/widget-members.min.js +1 -2
  358. bp-forums/bbpress/bb-admin/includes/class.bb-install.php +6 -2
  359. bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php +19 -9
  360. bp-forums/bbpress/bb-includes/backpress/class.bp-roles.php +9 -5
  361. bp-forums/bbpress/bb-includes/backpress/class.bp-user.php +5 -1
  362. bp-forums/bbpress/bb-includes/backpress/class.ixr.php +61 -11
  363. bp-forums/bbpress/bb-includes/backpress/class.mailer-smtp.php +5 -1
  364. bp-forums/bbpress/bb-includes/backpress/class.mailer.php +17 -5
  365. bp-forums/bbpress/bb-includes/backpress/class.passwordhash.php +6 -1
  366. bp-forums/bbpress/bb-includes/backpress/class.wp-ajax-response.php +5 -1
  367. bp-forums/bbpress/bb-includes/backpress/class.wp-dependencies.php +7 -3
  368. bp-forums/bbpress/bb-includes/backpress/class.wp-error.php +5 -1
  369. bp-forums/bbpress/bb-includes/backpress/class.wp-http-ixr-client.php +6 -1
  370. bp-forums/bbpress/bb-includes/backpress/class.wp-object-cache-memcached.php +6 -1
  371. bp-forums/bbpress/bb-includes/backpress/class.wp-taxonomy.php +1 -1
  372. bp-forums/bbpress/bb-includes/backpress/functions.core.php +21 -23
  373. bp-forums/bbpress/bb-includes/backpress/functions.kses.php +1 -1
  374. bp-forums/bbpress/bb-includes/backpress/functions.wp-object-cache.php +1 -1
  375. bp-forums/bbpress/bb-includes/backpress/functions.wp-taxonomy.php +1 -1
  376. bp-forums/bbpress/bb-includes/backpress/pomo/entry.php +32 -9
  377. bp-forums/bbpress/bb-includes/backpress/pomo/mo.php +174 -57
  378. bp-forums/bbpress/bb-includes/backpress/pomo/po.php +112 -26
  379. bp-forums/bbpress/bb-includes/backpress/pomo/sample/app.php +2 -3
  380. bp-forums/bbpress/bb-includes/backpress/pomo/streams.php +250 -72
  381. bp-forums/bbpress/bb-includes/backpress/pomo/translations.php +190 -31
  382. bp-forums/bbpress/bb-includes/class.bb-dir-map.php +5 -1
  383. bp-forums/bbpress/bb-includes/class.bb-locale.php +5 -1
  384. bp-forums/bbpress/bb-includes/class.bb-query.php +10 -2
  385. bp-forums/bbpress/bb-includes/class.bb-walker.php +5 -1
  386. bp-forums/bbpress/bb-includes/functions.bb-deprecated.php +4 -1
  387. bp-forums/bbpress/bb-includes/functions.bb-forums.php +2 -1
  388. bp-forums/bbpress/bb-includes/functions.bb-l10n.php +1 -1
  389. bp-forums/bbpress/bb-includes/functions.bb-template.php +11 -7
  390. bp-forums/bbpress/bb-includes/functions.bb-topic-tags.php +6 -4
  391. bp-forums/bbpress/bb-includes/functions.bb-topics.php +5 -3
  392. bp-forums/bbpress/bb-includes/functions.bb-users.php +1 -1
  393. bp-forums/bbpress/bb-plugins/akismet.php +2 -2
  394. bp-forums/bbpress/bb-plugins/bozo.php +11 -12
  395. bp-forums/bbpress/bb-settings.php +1 -1
  396. bp-forums/bbpress/xmlrpc.php +8 -7
  397. bp-forums/bp-forums-bbpress-sa.php +44 -13
  398. bp-forums/bp-forums-filters.php +12 -0
  399. bp-forums/bp-forums-functions.php +50 -0
  400. bp-forums/bp-forums-loader.php +29 -0
  401. bp-forums/bp-forums-screens.php +12 -0
  402. bp-forums/bp-forums-template.php +315 -23
  403. bp-forums/deprecated/1.6.php +12 -6
  404. bp-forums/deprecated/1.7.php +1 -1
  405. bp-friends/bp-friends-actions.php +2 -2
  406. bp-friends/bp-friends-activity.php +1 -1
  407. bp-friends/bp-friends-cache.php +41 -0
  408. bp-friends/bp-friends-classes.php +0 -13
  409. bp-friends/bp-friends-filters.php +7 -34
  410. bp-friends/bp-friends-functions.php +102 -6
  411. bp-friends/bp-friends-loader.php +1 -3
  412. bp-friends/bp-friends-notifications.php +15 -98
  413. bp-friends/bp-friends-screens.php +16 -4
  414. bp-friends/bp-friends-template.php +20 -18
  415. bp-friends/bp-friends-widgets.php +4 -6
  416. bp-friends/classes/class-bp-core-friends-widget.php +24 -16
  417. bp-friends/classes/class-bp-friends-component.php +32 -8
  418. bp-friends/classes/class-bp-friends-friendship.php +311 -60
  419. bp-friends/js/widget-friends.js +12 -1
  420. bp-friends/js/widget-friends.min.js +1 -2
  421. bp-groups/admin/css/admin-rtl.css +43 -7
  422. bp-groups/admin/css/admin-rtl.min.css +1 -1
  423. bp-groups/admin/css/admin.css +43 -7
  424. bp-groups/admin/css/admin.min.css +1 -1
  425. bp-groups/admin/js/admin.min.js +1 -2
  426. bp-groups/bp-groups-actions.php +80 -11
  427. bp-groups/bp-groups-activity.php +7 -15
  428. bp-groups/bp-groups-admin.php +240 -34
  429. bp-groups/bp-groups-adminbar.php +9 -9
  430. bp-groups/bp-groups-cache.php +114 -3
  431. bp-groups/bp-groups-classes.php +0 -17
  432. bp-groups/bp-groups-filters.php +29 -3
  433. bp-groups/bp-groups-forums.php +1 -1
  434. bp-groups/bp-groups-functions.php +733 -89
  435. bp-groups/bp-groups-loader.php +1 -3
  436. bp-groups/bp-groups-notifications.php +71 -12
  437. bp-groups/bp-groups-screens.php +104 -13
  438. bp-groups/bp-groups-template.php +462 -197
  439. bp-groups/bp-groups-widgets.php +12 -15
  440. bp-groups/classes/class-bp-group-extension.php +17 -19
  441. bp-groups/classes/class-bp-group-member-query.php +1 -1
  442. bp-groups/classes/class-bp-groups-component.php +80 -26
  443. bp-groups/classes/class-bp-groups-group-members-template.php +6 -5
  444. bp-groups/classes/class-bp-groups-group.php +595 -380
  445. bp-groups/classes/class-bp-groups-invite-template.php +5 -4
  446. bp-groups/classes/class-bp-groups-list-table.php +161 -10
  447. bp-groups/classes/class-bp-groups-member-suggestions.php +1 -6
  448. bp-groups/classes/class-bp-groups-member.php +183 -27
  449. bp-groups/classes/class-bp-groups-membership-requests-template.php +1 -2
  450. bp-groups/classes/class-bp-groups-template.php +41 -35
  451. bp-groups/classes/class-bp-groups-theme-compat.php +8 -4
  452. bp-groups/classes/class-bp-groups-widget.php +23 -10
  453. bp-groups/js/widget-groups.js +12 -1
  454. bp-groups/js/widget-groups.min.js +1 -2
  455. bp-loader.php +46 -645
  456. bp-members/admin/css/admin-rtl.css +98 -10
  457. bp-members/admin/css/admin-rtl.min.css +1 -1
  458. bp-members/admin/css/admin.css +98 -10
  459. bp-members/admin/css/admin.min.css +1 -1
  460. bp-members/admin/js/admin.min.js +0 -1
  461. bp-members/bp-members-actions.php +4 -0
  462. bp-members/bp-members-activity.php +2 -2
  463. bp-members/bp-members-admin.php +0 -2
  464. bp-members/bp-members-adminbar.php +2 -2
  465. bp-members/bp-members-cache.php +14 -2
  466. bp-members/bp-members-classes.php +0 -13
  467. bp-members/bp-members-filters.php +1 -1
  468. bp-members/bp-members-functions.php +167 -36
  469. bp-members/bp-members-loader.php +2 -2
  470. bp-members/bp-members-screens.php +18 -22
  471. bp-members/bp-members-template.php +389 -73
  472. bp-members/bp-members-widgets.php +4 -8
  473. bp-members/classes/class-bp-core-members-template.php +25 -0
  474. bp-members/classes/class-bp-core-members-widget.php +32 -21
  475. bp-members/classes/class-bp-core-recently-active-widget.php +12 -6
  476. bp-members/classes/class-bp-core-whos-online-widget.php +12 -7
  477. bp-members/classes/class-bp-members-admin.php +298 -10
  478. bp-members/classes/class-bp-members-component.php +117 -29
  479. bp-members/classes/class-bp-members-list-table.php +12 -9
  480. bp-members/classes/class-bp-members-ms-list-table.php +11 -8
  481. bp-members/classes/class-bp-signup.php +39 -5
  482. bp-messages/bp-messages-classes.php +0 -15
  483. bp-messages/bp-messages-functions.php +130 -24
  484. bp-messages/bp-messages-loader.php +3 -3
  485. bp-messages/bp-messages-notifications.php +85 -125
  486. bp-messages/bp-messages-screens.php +12 -3
  487. bp-messages/bp-messages-template.php +34 -22
  488. bp-messages/bp-messages-widgets.php +1 -3
  489. bp-messages/classes/class-bp-messages-box-template.php +1 -2
  490. bp-messages/classes/class-bp-messages-component.php +22 -5
  491. bp-messages/classes/class-bp-messages-message.php +46 -20
  492. bp-messages/classes/class-bp-messages-notice.php +38 -6
  493. bp-messages/classes/class-bp-messages-sitewide-notices-widget.php +3 -2
  494. bp-messages/classes/class-bp-messages-thread.php +61 -15
  495. bp-messages/css/autocomplete/jquery.autocompletefb-rtl.css +2 -2
  496. bp-messages/css/autocomplete/jquery.autocompletefb-rtl.min.css +1 -1
  497. bp-messages/js/autocomplete/jquery.autocomplete.js +2 -1
  498. bp-messages/js/autocomplete/jquery.autocomplete.min.js +1 -2
  499. bp-messages/js/autocomplete/jquery.autocompletefb.js +1 -1
  500. bp-messages/js/autocomplete/jquery.autocompletefb.min.js +1 -2
  501. bp-messages/js/autocomplete/jquery.bgiframe.js +66 -36
  502. bp-messages/js/autocomplete/jquery.bgiframe.min.js +1 -2
  503. bp-messages/js/autocomplete/jquery.dimensions.min.js +1 -2
  504. bp-messages/js/autocomplete/license.bgiframe.txt +5 -5
  505. bp-notifications/bp-notifications-classes.php +0 -15
  506. bp-notifications/bp-notifications-functions.php +37 -16
  507. bp-notifications/bp-notifications-loader.php +1 -3
  508. bp-notifications/bp-notifications-template.php +201 -103
  509. bp-notifications/classes/class-bp-notifications-component.php +25 -4
  510. bp-notifications/classes/class-bp-notifications-notification.php +38 -21
  511. bp-settings/bp-settings-actions.php +2 -2
  512. bp-settings/bp-settings-functions.php +5 -0
  513. bp-settings/bp-settings-loader.php +1 -3
  514. bp-settings/bp-settings-template.php +8 -7
  515. bp-templates/bp-legacy/buddypress-functions.php +96 -83
  516. bp-templates/bp-legacy/buddypress/activity/comment.php +2 -2
  517. bp-templates/bp-legacy/buddypress/activity/entry.php +7 -4
  518. bp-templates/bp-legacy/buddypress/activity/index.php +18 -15
  519. bp-templates/bp-legacy/buddypress/activity/post-form.php +8 -2
  520. bp-templates/bp-legacy/buddypress/activity/single/home.php +7 -3
  521. bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/index.php +2 -2
  522. bp-templates/bp-legacy/buddypress/assets/_attachments/cover-images/index.php +36 -36
  523. bp-templates/bp-legacy/buddypress/assets/_attachments/uploader.php +4 -1
  524. bp-templates/bp-legacy/buddypress/assets/embeds/activity.php +11 -0
  525. bp-templates/bp-legacy/buddypress/assets/embeds/footer.php +9 -0
  526. bp-templates/bp-legacy/buddypress/assets/embeds/header-activity.php +26 -0
  527. bp-templates/bp-legacy/buddypress/assets/embeds/header.php +18 -0
  528. bp-templates/bp-legacy/buddypress/blogs/create.php +6 -3
  529. bp-templates/bp-legacy/buddypress/blogs/index.php +19 -5
  530. bp-templates/bp-legacy/buddypress/common/search/dir-search-form.php +16 -0
  531. bp-templates/bp-legacy/buddypress/forums/index.php +18 -7
  532. bp-templates/bp-legacy/buddypress/groups/create.php +96 -33
  533. bp-templates/bp-legacy/buddypress/groups/groups-loop.php +6 -2
  534. bp-templates/bp-legacy/buddypress/groups/index.php +25 -8
  535. bp-templates/bp-legacy/buddypress/groups/single/activity.php +2 -2
  536. bp-templates/bp-legacy/buddypress/groups/single/admin.php +19 -437
  537. bp-templates/bp-legacy/buddypress/groups/single/admin/delete-group.php +41 -0
  538. bp-templates/bp-legacy/buddypress/groups/single/admin/edit-details.php +53 -0
  539. bp-templates/bp-legacy/buddypress/groups/single/admin/group-avatar.php +67 -0
  540. bp-templates/bp-legacy/buddypress/groups/single/admin/group-cover-image.php +33 -0
  541. bp-templates/bp-legacy/buddypress/groups/single/admin/group-settings.php +124 -0
  542. bp-templates/bp-legacy/buddypress/groups/single/admin/manage-members.php +332 -0
  543. bp-templates/bp-legacy/buddypress/groups/single/admin/membership-requests.php +35 -0
  544. bp-templates/bp-legacy/buddypress/groups/single/cover-image-header.php +129 -123
  545. bp-templates/bp-legacy/buddypress/groups/single/forum.php +1 -1
  546. bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php +5 -2
  547. bp-templates/bp-legacy/buddypress/groups/single/forum/topic.php +5 -2
  548. bp-templates/bp-legacy/buddypress/groups/single/group-header.php +14 -8
  549. bp-templates/bp-legacy/buddypress/groups/single/home.php +1 -1
  550. bp-templates/bp-legacy/buddypress/groups/single/invites-loop.php +1 -1
  551. bp-templates/bp-legacy/buddypress/groups/single/members.php +1 -1
  552. bp-templates/bp-legacy/buddypress/groups/single/request-membership.php +5 -0
  553. bp-templates/bp-legacy/buddypress/groups/single/requests-loop.php +22 -13
  554. bp-templates/bp-legacy/buddypress/groups/single/send-invites.php +3 -1
  555. bp-templates/bp-legacy/buddypress/members/activate.php +6 -3
  556. bp-templates/bp-legacy/buddypress/members/index.php +20 -7
  557. bp-templates/bp-legacy/buddypress/members/members-loop.php +2 -2
  558. bp-templates/bp-legacy/buddypress/members/register.php +45 -29
  559. bp-templates/bp-legacy/buddypress/members/single/activity.php +2 -2
  560. bp-templates/bp-legacy/buddypress/members/single/blogs.php +1 -1
  561. bp-templates/bp-legacy/buddypress/members/single/cover-image-header.php +106 -103
  562. bp-templates/bp-legacy/buddypress/members/single/forums.php +1 -1
  563. bp-templates/bp-legacy/buddypress/members/single/friends.php +13 -1
  564. bp-templates/bp-legacy/buddypress/members/single/friends/requests.php +5 -0
  565. bp-templates/bp-legacy/buddypress/members/single/groups.php +13 -1
  566. bp-templates/bp-legacy/buddypress/members/single/groups/invites.php +5 -0
  567. bp-templates/bp-legacy/buddypress/members/single/home.php +5 -2
  568. bp-templates/bp-legacy/buddypress/members/single/member-header.php +7 -4
  569. bp-templates/bp-legacy/buddypress/members/single/messages.php +18 -1
  570. bp-templates/bp-legacy/buddypress/members/single/messages/compose.php +5 -0
  571. bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php +17 -3
  572. bp-templates/bp-legacy/buddypress/members/single/messages/single.php +6 -3
  573. bp-templates/bp-legacy/buddypress/members/single/notifications.php +1 -1
  574. bp-templates/bp-legacy/buddypress/members/single/notifications/notifications-loop.php +8 -2
  575. bp-templates/bp-legacy/buddypress/members/single/notifications/read.php +5 -0
  576. bp-templates/bp-legacy/buddypress/members/single/notifications/unread.php +5 -0
  577. bp-templates/bp-legacy/buddypress/members/single/plugins.php +1 -1
  578. bp-templates/bp-legacy/buddypress/members/single/profile.php +1 -1
  579. bp-templates/bp-legacy/buddypress/members/single/profile/change-avatar.php +6 -3
  580. bp-templates/bp-legacy/buddypress/members/single/profile/change-cover-image.php +33 -33
  581. bp-templates/bp-legacy/buddypress/members/single/profile/edit.php +4 -4
  582. bp-templates/bp-legacy/buddypress/members/single/profile/profile-loop.php +1 -1
  583. bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php +1 -1
  584. bp-templates/bp-legacy/buddypress/members/single/settings.php +1 -1
  585. bp-templates/bp-legacy/buddypress/members/single/settings/general.php +9 -1
  586. bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php +5 -0
  587. bp-templates/bp-legacy/buddypress/members/single/settings/profile.php +5 -0
  588. bp-templates/bp-legacy/css/buddypress-rtl.css +75 -19
  589. bp-templates/bp-legacy/css/buddypress-rtl.min.css +1 -1
  590. bp-templates/bp-legacy/css/buddypress.css +75 -19
  591. bp-templates/bp-legacy/css/buddypress.min.css +1 -1
  592. bp-templates/bp-legacy/css/embeds-activity-rtl.css +152 -0
  593. bp-templates/bp-legacy/css/embeds-activity-rtl.min.css +1 -0
  594. bp-templates/bp-legacy/css/embeds-activity.css +152 -0
  595. bp-templates/bp-legacy/css/embeds-activity.min.css +1 -0
  596. bp-templates/bp-legacy/css/twentyeleven-rtl.css +2025 -0
  597. bp-templates/bp-legacy/css/twentyeleven-rtl.min.css +1 -0
  598. bp-templates/bp-legacy/css/twentyeleven.css +2025 -0
  599. bp-templates/bp-legacy/css/twentyeleven.min.css +1 -0
  600. bp-templates/bp-legacy/css/twentyeleven.scss +2577 -0
  601. bp-templates/bp-legacy/css/twentyfifteen-rtl.css +15 -5
  602. bp-templates/bp-legacy/css/twentyfifteen-rtl.min.css +1 -1
  603. bp-templates/bp-legacy/css/twentyfifteen.css +15 -5
  604. bp-templates/bp-legacy/css/twentyfifteen.min.css +1 -1
  605. bp-templates/bp-legacy/css/twentyfifteen.scss +18 -5
  606. bp-templates/bp-legacy/css/twentyfourteen-rtl.css +28 -7
  607. bp-templates/bp-legacy/css/twentyfourteen-rtl.min.css +1 -1
  608. bp-templates/bp-legacy/css/twentyfourteen.css +28 -7
  609. bp-templates/bp-legacy/css/twentyfourteen.min.css +1 -1
  610. bp-templates/bp-legacy/css/twentyfourteen.scss +32 -8
  611. bp-templates/bp-legacy/css/twentyseventeen-rtl.css +2194 -0
  612. bp-templates/bp-legacy/css/twentyseventeen-rtl.min.css +1 -0
  613. bp-templates/bp-legacy/css/twentyseventeen.css +2194 -0
  614. bp-templates/bp-legacy/css/twentyseventeen.min.css +1 -0
  615. bp-templates/bp-legacy/css/twentyseventeen.scss +3036 -0
  616. bp-templates/bp-legacy/css/twentysixteen-rtl.css +224 -192
  617. bp-templates/bp-legacy/css/twentysixteen-rtl.min.css +1 -1
  618. bp-templates/bp-legacy/css/twentysixteen.css +224 -192
  619. bp-templates/bp-legacy/css/twentysixteen.min.css +1 -1
  620. bp-templates/bp-legacy/css/twentysixteen.scss +2459 -2417
  621. bp-templates/bp-legacy/css/twentyten-rtl.css +1976 -0
  622. bp-templates/bp-legacy/css/twentyten-rtl.min.css +1 -0
  623. bp-templates/bp-legacy/css/twentyten.css +1976 -0
  624. bp-templates/bp-legacy/css/twentyten.min.css +1 -0
  625. bp-templates/bp-legacy/css/twentyten.scss +2478 -0
  626. bp-templates/bp-legacy/css/twentythirteen-rtl.css +209 -200
  627. bp-templates/bp-legacy/css/twentythirteen-rtl.min.css +1 -1
  628. bp-templates/bp-legacy/css/twentythirteen.css +209 -200
  629. bp-templates/bp-legacy/css/twentythirteen.min.css +1 -1
  630. bp-templates/bp-legacy/css/twentythirteen.scss +2427 -2418
  631. bp-templates/bp-legacy/css/twentytwelve-rtl.css +198 -194
  632. bp-templates/bp-legacy/css/twentytwelve-rtl.min.css +1 -1
  633. bp-templates/bp-legacy/css/twentytwelve.css +198 -194
  634. bp-templates/bp-legacy/css/twentytwelve.min.css +1 -1
  635. bp-templates/bp-legacy/css/twentytwelve.scss +2517 -2514
  636. bp-templates/bp-legacy/js/buddypress.js +45 -18
  637. bp-templates/bp-legacy/js/buddypress.min.js +2 -3
  638. bp-templates/bp-legacy/js/password-verify.min.js +1 -2
  639. bp-themes/bp-default/_inc/ajax.php +11 -4
  640. bp-themes/bp-default/groups/single/home.php +3 -0
  641. bp-xprofile/admin/css/admin-rtl.css +78 -2
  642. bp-xprofile/admin/css/admin-rtl.min.css +1 -1
  643. bp-xprofile/admin/css/admin.css +78 -2
  644. bp-xprofile/admin/css/admin.min.css +1 -1
  645. bp-xprofile/admin/js/admin.js +44 -3
  646. bp-xprofile/admin/js/admin.min.js +1 -2
  647. bp-xprofile/bp-xprofile-actions.php +2 -2
  648. bp-xprofile/bp-xprofile-activity.php +1 -6
  649. bp-xprofile/bp-xprofile-admin.php +58 -26
  650. bp-xprofile/bp-xprofile-cache.php +10 -0
  651. bp-xprofile/bp-xprofile-caps.php +31 -6
  652. bp-xprofile/bp-xprofile-classes.php +0 -28
  653. bp-xprofile/bp-xprofile-cssjs.php +3 -3
  654. bp-xprofile/bp-xprofile-filters.php +22 -13
  655. bp-xprofile/bp-xprofile-functions.php +89 -16
  656. bp-xprofile/bp-xprofile-loader.php +3 -3
  657. bp-xprofile/bp-xprofile-screens.php +8 -20
  658. bp-xprofile/bp-xprofile-settings.php +0 -2
  659. bp-xprofile/bp-xprofile-template.php +232 -64
  660. bp-xprofile/classes/class-bp-xprofile-component.php +12 -2
  661. bp-xprofile/classes/class-bp-xprofile-data-template.php +22 -2
  662. bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php +9 -6
  663. bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php +366 -52
  664. bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php +4 -1
  665. bp-xprofile/classes/class-bp-xprofile-field-type-number.php +4 -1
  666. bp-xprofile/classes/class-bp-xprofile-field-type-placeholder.php +2 -0
  667. bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php +11 -8
  668. bp-xprofile/classes/class-bp-xprofile-field-type-selectbox.php +4 -1
  669. bp-xprofile/classes/class-bp-xprofile-field-type-textbox.php +4 -1
  670. bp-xprofile/classes/class-bp-xprofile-field-type-url.php +8 -5
  671. bp-xprofile/classes/class-bp-xprofile-field-type.php +42 -2
  672. bp-xprofile/classes/class-bp-xprofile-field.php +73 -38
  673. bp-xprofile/classes/class-bp-xprofile-group.php +39 -11
  674. bp-xprofile/classes/class-bp-xprofile-meta-query.php +1 -4
  675. bp-xprofile/classes/class-bp-xprofile-profiledata.php +79 -14
  676. bp-xprofile/classes/class-bp-xprofile-query.php +1 -1
  677. bp-xprofile/classes/class-bp-xprofile-user-admin.php +45 -32
  678. buddypress.pot +3001 -2290
  679. class-buddypress.php +734 -0
  680. composer.json +7 -6
  681. humans.txt +14 -1
  682. readme.txt +32 -160
bp-activity/admin/js/admin.min.js CHANGED
@@ -1,2 +1 @@
1
- /*! buddypress - v2.5.3 - 2016-05-24 5:17:45 PM UTC - https://wordpress.org/plugins/buddypress/ */
2
!function(a){var b={init:function(){a(document).on("click",".row-actions a.reply",b.open),a(document).on("click","#bp-activities-container a.cancel",b.close),a(document).on("click","#bp-activities-container a.save",b.send),a(document).on("keyup","#bp-activities:visible",function(a){27===a.which&&b.close()})},open:function(){var b=a("#bp-activities-container").hide();return a(this).parents("tr").after(b),b.fadeIn("300"),a("#bp-activities").focus(),!1},close:function(){return a("#bp-activities-container").fadeOut("200",function(){a("#bp-activities").val("").blur(),a("#bp-replysubmit .error").html("").hide(),a("#bp-replysubmit .waiting").hide()}),!1},send:function(){a("#bp-replysubmit .error").hide(),a("#bp-replysubmit .waiting").show();var c={};return c["_ajax_nonce-bp-activity-admin-reply"]=a('#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]').val(),c.action="bp-activity-admin-reply",c.content=a("#bp-activities").val(),c.parent_id=a("#bp-activities-container").prev().data("parent_id"),c.root_id=a("#bp-activities-container").prev().data("root_id"),a.ajax({data:c,type:"POST",url:ajaxurl,error:function(a){b.error(a)},success:function(a){b.show(a)}}),!1},error:function(b){var c=b.statusText;a("#bp-replysubmit .waiting").hide(),b.responseText&&(c=b.responseText.replace(/<.[^<>]*?>/g,"")),c&&a("#bp-replysubmit .error").html(c).show()},show:function(c){var d,e,f;return"string"==typeof c?(b.error({responseText:c}),!1):(f=wpAjax.parseAjaxResponse(c),f.errors?(b.error({responseText:wpAjax.broken}),!1):(f=f.responses[0],void a("#bp-activities-container").fadeOut("200",function(){a("#bp-activities").val("").blur(),a("#bp-replysubmit .error").html("").hide(),a("#bp-replysubmit .waiting").hide(),a("#bp-activities-container").before(f.data),e=a("#activity-"+f.id),d=e.closest(".widefat").css("backgroundColor"),e.animate({backgroundColor:"#CEB"},300).animate({backgroundColor:d},300)})))}};a(document).ready(function(){b.init(),a("#bp_activity_action h3, #bp_activity_content h3").unbind("click"),"undefined"!=typeof postboxes&&postboxes.add_postbox_toggles(bp_activity_admin_vars.page)})}(jQuery);
1
!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
@@ -17,7 +17,6 @@ defined( 'ABSPATH' ) || exit;
17
*
18
* @since 1.2.0
19
*
20
- * @uses do_action() To call 'bp_register_activity_actions' hook.
21
*/
22
function bp_register_activity_actions() {
23
@@ -35,18 +34,6 @@ add_action( 'bp_init', 'bp_register_activity_actions', 8 );
35
*
36
* @since 1.2.0
37
*
38
- * @uses bp_is_activity_component()
39
- * @uses bp_is_current_action()
40
- * @uses bp_action_variable()
41
- * @uses bp_activity_get_specific()
42
- * @uses bp_is_active()
43
- * @uses bp_core_get_user_domain()
44
- * @uses groups_get_group()
45
- * @uses bp_get_group_permalink()
46
- * @uses apply_filters_ref_array() To call the 'bp_activity_permalink_redirect_url' hook.
47
- * @uses bp_core_redirect()
48
- * @uses bp_get_root_domain()
49
- *
50
* @return bool False on failure.
51
*/
52
function bp_activity_action_permalink_router() {
@@ -84,7 +71,7 @@ function bp_activity_action_permalink_router() {
84
} else {
85
86
// Set redirect to group activity stream.
87
- if ( $group = groups_get_group( array( 'group_id' => $activity->item_id ) ) ) {
88
$redirect = bp_get_group_permalink( $group ) . bp_get_activity_slug() . '/' . $activity->id . '/';
89
}
90
}
@@ -122,17 +109,6 @@ add_action( 'bp_actions', 'bp_activity_action_permalink_router' );
122
*
123
* @since 1.1.0
124
*
125
- * @uses bp_is_activity_component()
126
- * @uses bp_is_current_action()
127
- * @uses bp_action_variable()
128
- * @uses check_admin_referer()
129
- * @uses bp_activity_user_can_delete()
130
- * @uses do_action() Calls 'bp_activity_before_action_delete_activity' hook to allow actions to be taken before the activity is deleted.
131
- * @uses bp_activity_delete()
132
- * @uses bp_core_add_message()
133
- * @uses do_action() Calls 'bp_activity_action_delete_activity' hook to allow actions to be taken after the activity is deleted.
134
- * @uses bp_core_redirect()
135
- *
136
* @param int $activity_id Activity id to be deleted. Defaults to 0.
137
* @return bool False on failure.
138
*/
@@ -267,20 +243,6 @@ add_action( 'bp_actions', 'bp_activity_action_spam_activity' );
267
*
268
* @since 1.2.0
269
*
270
- * @uses is_user_logged_in()
271
- * @uses bp_is_activity_component()
272
- * @uses bp_is_current_action()
273
- * @uses check_admin_referer()
274
- * @uses apply_filters() To call 'bp_activity_post_update_content' hook.
275
- * @uses apply_filters() To call 'bp_activity_post_update_object' hook.
276
- * @uses apply_filters() To call 'bp_activity_post_update_item_id' hook.
277
- * @uses bp_core_add_message()
278
- * @uses bp_core_redirect()
279
- * @uses bp_activity_post_update()
280
- * @uses groups_post_update()
281
- * @uses bp_core_redirect()
282
- * @uses apply_filters() To call 'bp_activity_custom_update' hook.
283
- *
284
* @return bool False on failure.
285
*/
286
function bp_activity_action_post_update() {
@@ -371,17 +333,6 @@ add_action( 'bp_actions', 'bp_activity_action_post_update' );
371
*
372
* @since 1.2.0
373
*
374
- * @uses is_user_logged_in()
375
- * @uses bp_is_activity_component()
376
- * @uses bp_is_current_action()
377
- * @uses check_admin_referer()
378
- * @uses apply_filters() To call 'bp_activity_post_comment_activity_id' hook.
379
- * @uses apply_filters() To call 'bp_activity_post_comment_content' hook.
380
- * @uses bp_core_add_message()
381
- * @uses bp_core_redirect()
382
- * @uses bp_activity_new_comment()
383
- * @uses wp_get_referer()
384
- *
385
* @return bool False on failure.
386
*/
387
function bp_activity_action_post_comment() {
@@ -435,16 +386,6 @@ add_action( 'bp_actions', 'bp_activity_action_post_comment' );
435
*
436
* @since 1.2.0
437
*
438
- * @uses is_user_logged_in()
439
- * @uses bp_is_activity_component()
440
- * @uses bp_is_current_action()
441
- * @uses check_admin_referer()
442
- * @uses bp_activity_add_user_favorite()
443
- * @uses bp_action_variable()
444
- * @uses bp_core_add_message()
445
- * @uses bp_core_redirect()
446
- * @uses wp_get_referer()
447
- *
448
* @return bool False on failure.
449
*/
450
function bp_activity_action_mark_favorite() {
@@ -469,16 +410,6 @@ add_action( 'bp_actions', 'bp_activity_action_mark_favorite' );
469
*
470
* @since 1.2.0
471
*
472
- * @uses is_user_logged_in()
473
- * @uses bp_is_activity_component()
474
- * @uses bp_is_current_action()
475
- * @uses check_admin_referer()
476
- * @uses bp_activity_remove_user_favorite()
477
- * @uses bp_action_variable()
478
- * @uses bp_core_add_message()
479
- * @uses bp_core_redirect()
480
- * @uses wp_get_referer()
481
- *
482
* @return bool False on failure.
483
*/
484
function bp_activity_action_remove_favorite() {
@@ -503,11 +434,6 @@ add_action( 'bp_actions', 'bp_activity_action_remove_favorite' );
503
*
504
* @since 1.0.0
505
*
506
- * @uses bp_is_activity_component()
507
- * @uses bp_is_current_action()
508
- * @uses bp_is_user()
509
- * @uses status_header()
510
- *
511
* @return bool False on failure.
512
*/
513
function bp_activity_action_sitewide_feed() {
@@ -535,10 +461,6 @@ add_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
535
*
536
* @since 1.0.0
537
*
538
- * @uses bp_is_user_activity()
539
- * @uses bp_is_current_action()
540
- * @uses status_header()
541
- *
542
* @return bool False on failure.
543
*/
544
function bp_activity_action_personal_feed() {
@@ -565,13 +487,6 @@ add_action( 'bp_actions', 'bp_activity_action_personal_feed' );
565
*
566
* @since 1.0.0
567
*
568
- * @uses bp_is_active()
569
- * @uses bp_is_user_activity()
570
- * @uses bp_is_current_action()
571
- * @uses bp_get_friends_slug()
572
- * @uses bp_is_action_variable()
573
- * @uses status_header()
574
- *
575
* @return bool False on failure.
576
*/
577
function bp_activity_action_friends_feed() {
@@ -598,13 +513,6 @@ add_action( 'bp_actions', 'bp_activity_action_friends_feed' );
598
*
599
* @since 1.2.0
600
*
601
- * @uses bp_is_active()
602
- * @uses bp_is_user_activity()
603
- * @uses bp_is_current_action()
604
- * @uses bp_get_groups_slug()
605
- * @uses bp_is_action_variable()
606
- * @uses status_header()
607
- *
608
* @return bool False on failure.
609
*/
610
function bp_activity_action_my_groups_feed() {
@@ -639,11 +547,6 @@ add_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
639
*
640
* @since 1.2.0
641
*
642
- * @uses bp_is_user_activity()
643
- * @uses bp_is_current_action()
644
- * @uses bp_is_action_variable()
645
- * @uses status_header()
646
- *
647
* @return bool False on failure.
648
*/
649
function bp_activity_action_mentions_feed() {
@@ -676,11 +579,6 @@ add_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
676
*
677
* @since 1.2.0
678
*
679
- * @uses bp_is_user_activity()
680
- * @uses bp_is_current_action()
681
- * @uses bp_is_action_variable()
682
- * @uses status_header()
683
- *
684
* @return bool False on failure.
685
*/
686
function bp_activity_action_favorites_feed() {
@@ -706,45 +604,6 @@ function bp_activity_action_favorites_feed() {
706
}
707
add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
708
709
- /**
710
- * Loads Akismet filtering for activity.
711
- *
712
- * @since 1.6.0
713
- * @since 2.3.0 We only support Akismet 3+.
714
- */
715
- function bp_activity_setup_akismet() {
716
- $bp = buddypress();
717
-
718
- // Bail if Akismet is not active.
719
- if ( ! defined( 'AKISMET_VERSION' ) ) {
720
- return;
721
- }
722
-
723
- // Bail if older version of Akismet.
724
- if ( ! class_exists( 'Akismet' ) ) {
725
- return;
726
- }
727
-
728
- // Bail if no Akismet key is set.
729
- if ( ! bp_get_option( 'wordpress_api_key' ) && ! defined( 'WPCOM_API_KEY' ) ) {
730
- return;
731
- }
732
-
733
- /**
734
- * Filters if BuddyPress Activity Akismet support has been disabled by another plugin.
735
- *
736
- * @since 1.6.0
737
- *
738
- * @param bool $value Return value of bp_is_akismet_active boolean function.
739
- */
740
- if ( ! apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) ) {
741
- return;
742
- }
743
-
744
- // Instantiate Akismet for BuddyPress.
745
- $bp->activity->akismet = new BP_Akismet();
746
- }
747
-
748
/**
749
* AJAX endpoint for Suggestions API lookups.
750
*
@@ -973,7 +832,11 @@ function bp_activity_transition_post_type_comment_status( $new_status, $old_stat
973
974
// Add "new_post_type_comment" to the whitelisted activity types, so that the activity's Akismet history is generated
975
$post_type_comment_action = $activity_comment_object->action_id;
976
- $comment_akismet_history = create_function( '$t', '$t[] = $post_type_comment_action; return $t;' );
977
add_filter( 'bp_akismet_get_activity_types', $comment_akismet_history );
978
979
// Make sure the activity change won't edit the comment if sync is on
17
*
18
* @since 1.2.0
19
*
20
*/
21
function bp_register_activity_actions() {
22
34
*
35
* @since 1.2.0
36
*
37
* @return bool False on failure.
38
*/
39
function bp_activity_action_permalink_router() {
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
}
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
*/
243
*
244
* @since 1.2.0
245
*
246
* @return bool False on failure.
247
*/
248
function bp_activity_action_post_update() {
333
*
334
* @since 1.2.0
335
*
336
* @return bool False on failure.
337
*/
338
function bp_activity_action_post_comment() {
386
*
387
* @since 1.2.0
388
*
389
* @return bool False on failure.
390
*/
391
function bp_activity_action_mark_favorite() {
410
*
411
* @since 1.2.0
412
*
413
* @return bool False on failure.
414
*/
415
function bp_activity_action_remove_favorite() {
434
*
435
* @since 1.0.0
436
*
437
* @return bool False on failure.
438
*/
439
function bp_activity_action_sitewide_feed() {
461
*
462
* @since 1.0.0
463
*
464
* @return bool False on failure.
465
*/
466
function bp_activity_action_personal_feed() {
487
*
488
* @since 1.0.0
489
*
490
* @return bool False on failure.
491
*/
492
function bp_activity_action_friends_feed() {
513
*
514
* @since 1.2.0
515
*
516
* @return bool False on failure.
517
*/
518
function bp_activity_action_my_groups_feed() {
547
*
548
* @since 1.2.0
549
*
550
* @return bool False on failure.
551
*/
552
function bp_activity_action_mentions_feed() {
579
*
580
* @since 1.2.0
581
*
582
* @return bool False on failure.
583
*/
584
function bp_activity_action_favorites_feed() {
604
}
605
add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
606
607
/**
608
* AJAX endpoint for Suggestions API lookups.
609
*
832
833
// Add "new_post_type_comment" to the whitelisted activity types, so that the activity's Akismet history is generated
834
$post_type_comment_action = $activity_comment_object->action_id;
835
+ $comment_akismet_history = function ( $activity_types ) use ( $post_type_comment_action ) {
836
+ $activity_types[] = $post_type_comment_action;
837
+
838
+ return $activity_types;
839
+ };
840
add_filter( 'bp_akismet_get_activity_types', $comment_akismet_history );
841
842
// Make sure the activity change won't edit the comment if sync is on
bp-activity/bp-activity-admin.php CHANGED
@@ -16,8 +16,6 @@ defined( 'ABSPATH' ) || exit;
16
// Include WP's list table class.
17
if ( !class_exists( 'WP_List_Table' ) ) require( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
18
19
- require dirname( __FILE__ ) . '/classes/class-bp-activity-list-table.php';
20
-
21
// Per_page screen option. Has to be hooked in extremely early.
22
if ( is_admin() && ! empty( $_REQUEST['page'] ) && 'bp-activity' == $_REQUEST['page'] )
23
add_filter( 'set-screen-option', 'bp_activity_admin_screen_options', 10, 3 );
@@ -167,8 +165,9 @@ function bp_activity_admin_screen_options( $value, $option, $new_value ) {
167
* @return array Hidden Meta Boxes.
168
*/
169
function bp_activity_admin_edit_hidden_metaboxes( $hidden, $screen ) {
170
- if ( empty( $screen->id ) || 'toplevel_page_bp-activity' != $screen->id && 'toplevel_page_bp-activity_network' != $screen->id )
171
return $hidden;
172
173
// Hide the primary link meta box by default.
174
$hidden = array_merge( (array) $hidden, array( 'bp_activity_itemids', 'bp_activity_link', 'bp_activity_type', 'bp_activity_userid', ) );
@@ -299,6 +298,7 @@ function bp_activity_admin_load() {
299
// Add accessible hidden heading and text for Activity screen pagination.
300
if ( bp_get_major_wp_version() >= 4.4 ) {
301
get_current_screen()->set_screen_reader_content( array(
302
'heading_pagination' => __( 'Activity list navigation', 'buddypress' ),
303
) );
304
}
@@ -390,8 +390,8 @@ function bp_activity_admin_load() {
390
* Remove moderation and blacklist checks in case we want to ham an activity
391
* which contains one of these listed keys.
392
*/
393
- remove_action( 'bp_activity_before_save', 'bp_activity_check_moderation_keys', 2, 1 );
394
- remove_action( 'bp_activity_before_save', 'bp_activity_check_blacklist_keys', 2, 1 );
395
396
bp_activity_mark_as_ham( $activity );
397
$result = $activity->save();
@@ -576,9 +576,9 @@ function bp_activity_admin_load() {
576
577
// If an error occurred, pass back the activity ID that failed.
578
if ( $error )
579
- $redirect_to = add_query_arg( 'error', (int) $error, $redirect_to );
580
else
581
- $redirect_to = add_query_arg( 'updated', (int) $activity->id, $redirect_to );
582
583
/**
584
* Filters URL to redirect to after saving.
@@ -674,6 +674,10 @@ function bp_activity_admin_edit() {
674
<div id="bp_activity_action" class="postbox">
675
<h2><?php _e( 'Action', 'buddypress' ); ?></h2>
676
<div class="inside">
677
<?php wp_editor( stripslashes( $activity->action ), 'bp-activities-action', array( 'media_buttons' => false, 'textarea_rows' => 7, 'teeny' => true, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ) ) ); ?>
678
</div>
679
</div>
@@ -681,6 +685,10 @@ function bp_activity_admin_edit() {
681
<div id="bp_activity_content" class="postbox">
682
<h2><?php _e( 'Content', 'buddypress' ); ?></h2>
683
<div class="inside">
684
<?php wp_editor( stripslashes( $activity->content ), 'bp-activities-content', array( 'media_buttons' => false, 'teeny' => true, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ) ) ); ?>
685
</div>
686
</div>
@@ -704,10 +712,16 @@ function bp_activity_admin_edit() {
704
</form>
705
706
<?php else : ?>
707
- <p>
708
- <?php _e( 'No activity found with this ID.', 'buddypress' ); ?>
709
- <a href="<?php echo esc_url( bp_get_admin_url( 'admin.php?page=bp-activity' ) ); ?>"><?php _e( 'Go back and try again.', 'buddypress' ); ?></a>
710
- </p>
711
<?php endif; ?>
712
713
</div><!-- .wrap -->
@@ -781,7 +795,10 @@ function bp_activity_admin_edit_metabox_status( $item ) {
781
function bp_activity_admin_edit_metabox_link( $item ) {
782
?>
783
784
- <label class="screen-reader-text" for="bp-activities-link"><?php _e( 'Link', 'buddypress' ); ?></label>
785
<input type="url" name="bp-activities-link" id="bp-activities-link" value="<?php echo esc_url( $item->primary_link ); ?>" aria-describedby="bp-activities-link-description" />
786
<p id="bp-activities-link-description"><?php _e( 'Activity generated by posts and comments, forum topics and replies, and some plugins, uses the link field for a permalink back to the content item.', 'buddypress' ); ?></p>
787
@@ -798,7 +815,10 @@ function bp_activity_admin_edit_metabox_link( $item ) {
798
function bp_activity_admin_edit_metabox_userid( $item ) {
799
?>
800
801
- <label class="screen-reader-text" for="bp-activities-userid"><?php _e( 'Author ID', 'buddypress' ); ?></label>
802
<input type="number" name="bp-activities-userid" id="bp-activities-userid" value="<?php echo esc_attr( $item->user_id ); ?>" min="1" />
803
804
<?php
@@ -873,7 +893,10 @@ function bp_activity_admin_edit_metabox_type( $item ) {
873
874
?>
875
876
- <label for="bp-activities-type" class="screen-reader-text"><?php esc_html_e( 'Select activity type', 'buddypress' ); ?></label>
877
<select name="bp-activities-type" id="bp-activities-type">
878
<?php foreach ( $actions as $k => $v ) : ?>
879
<option value="<?php echo esc_attr( $k ); ?>" <?php selected( $k, $selected ); ?>><?php echo esc_html( $v ); ?></option>
@@ -1016,6 +1039,10 @@ function bp_activity_admin_index() {
1016
<form method="get" action="">
1017
1018
<h3 id="bp-replyhead"><?php _e( 'Reply to Activity', 'buddypress' ); ?></h3>
1019
<?php wp_editor( '', 'bp-activities', array( 'dfw' => false, 'media_buttons' => false, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ), 'tinymce' => false, ) ); ?>
1020
1021
<p id="bp-replysubmit" class="submit">
16
// Include WP's list table class.
17
if ( !class_exists( 'WP_List_Table' ) ) require( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
18
19
// Per_page screen option. Has to be hooked in extremely early.
20
if ( is_admin() && ! empty( $_REQUEST['page'] ) && 'bp-activity' == $_REQUEST['page'] )
21
add_filter( 'set-screen-option', 'bp_activity_admin_screen_options', 10, 3 );
165
* @return array Hidden Meta Boxes.
166
*/
167
function bp_activity_admin_edit_hidden_metaboxes( $hidden, $screen ) {
168
+ if ( empty( $screen->id ) || 'toplevel_page_bp-activity' !== $screen->id && 'toplevel_page_bp-activity-network' !== $screen->id ) {
169
return $hidden;
170
+ }
171
172
// Hide the primary link meta box by default.
173
$hidden = array_merge( (array) $hidden, array( 'bp_activity_itemids', 'bp_activity_link', 'bp_activity_type', 'bp_activity_userid', ) );
298
// Add accessible hidden heading and text for Activity screen pagination.
299
if ( bp_get_major_wp_version() >= 4.4 ) {
300
get_current_screen()->set_screen_reader_content( array(
301
+ /* translators: accessibility text */
302
'heading_pagination' => __( 'Activity list navigation', 'buddypress' ),
303
) );
304
}
390
* Remove moderation and blacklist checks in case we want to ham an activity
391
* which contains one of these listed keys.
392
*/
393
+ remove_action( 'bp_activity_before_save', 'bp_activity_check_moderation_keys', 2 );
394
+ remove_action( 'bp_activity_before_save', 'bp_activity_check_blacklist_keys', 2 );
395
396
bp_activity_mark_as_ham( $activity );
397
$result = $activity->save();
576
577
// If an error occurred, pass back the activity ID that failed.
578
if ( $error )
579
+ $redirect_to = add_query_arg( 'error', $error, $redirect_to );
580
else
581
+ $redirect_to = add_query_arg( 'updated', $activity->id, $redirect_to );
582
583
/**
584
* Filters URL to redirect to after saving.
674
<div id="bp_activity_action" class="postbox">
675
<h2><?php _e( 'Action', 'buddypress' ); ?></h2>
676
<div class="inside">
677
+ <label for="bp-activities-action" class="screen-reader-text"><?php
678
+ /* translators: accessibility text */
679
+ _e( 'Edit activity action', 'buddypress' );
680
+ ?></label>
681
<?php wp_editor( stripslashes( $activity->action ), 'bp-activities-action', array( 'media_buttons' => false, 'textarea_rows' => 7, 'teeny' => true, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ) ) ); ?>
682
</div>
683
</div>
685
<div id="bp_activity_content" class="postbox">
686
<h2><?php _e( 'Content', 'buddypress' ); ?></h2>
687
<div class="inside">
688
+ <label for="bp-activities-content" class="screen-reader-text"><?php
689
+ /* translators: accessibility text */
690
+ _e( 'Edit activity content', 'buddypress' );
691
+ ?></label>
692
<?php wp_editor( stripslashes( $activity->content ), 'bp-activities-content', array( 'media_buttons' => false, 'teeny' => true, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ) ) ); ?>
693
</div>
694
</div>
712
</form>
713
714
<?php else : ?>
715
+
716
+ <p><?php
717
+ printf(
718
+ '%1$s <a href="%2$s">%3$s</a>',
719
+ __( 'No activity found with this ID.', 'buddypress' ),
720
+ esc_url( bp_get_admin_url( 'admin.php?page=bp-activity' ) ),
721
+ __( 'Go back and try again.', 'buddypress' )
722
+ );
723
+ ?></p>
724
+
725
<?php endif; ?>
726
727
</div><!-- .wrap -->
795
function bp_activity_admin_edit_metabox_link( $item ) {
796
?>
797
798
+ <label class="screen-reader-text" for="bp-activities-link"><?php
799
+ /* translators: accessibility text */
800
+ _e( 'Link', 'buddypress' );
801
+ ?></label>
802
<input type="url" name="bp-activities-link" id="bp-activities-link" value="<?php echo esc_url( $item->primary_link ); ?>" aria-describedby="bp-activities-link-description" />
803
<p id="bp-activities-link-description"><?php _e( 'Activity generated by posts and comments, forum topics and replies, and some plugins, uses the link field for a permalink back to the content item.', 'buddypress' ); ?></p>
804
815
function bp_activity_admin_edit_metabox_userid( $item ) {
816
?>
817
818
+ <label class="screen-reader-text" for="bp-activities-userid"><?php
819
+ /* translators: accessibility text */
820
+ _e( 'Author ID', 'buddypress' );
821
+ ?></label>
822
<input type="number" name="bp-activities-userid" id="bp-activities-userid" value="<?php echo esc_attr( $item->user_id ); ?>" min="1" />
823
824
<?php
893
894
?>
895
896
+ <label for="bp-activities-type" class="screen-reader-text"><?php
897
+ /* translators: accessibility text */
898
+ esc_html_e( 'Select activity type', 'buddypress' );
899
+ ?></label>
900
<select name="bp-activities-type" id="bp-activities-type">
901
<?php foreach ( $actions as $k => $v ) : ?>
902
<option value="<?php echo esc_attr( $k ); ?>" <?php selected( $k, $selected ); ?>><?php echo esc_html( $v ); ?></option>
1039
<form method="get" action="">
1040
1041
<h3 id="bp-replyhead"><?php _e( 'Reply to Activity', 'buddypress' ); ?></h3>
1042
+ <label for="bp-activities" class="screen-reader-text"><?php
1043
+ /* translators: accessibility text */
1044
+ _e( 'Reply', 'buddypress' );
1045
+ ?></label>
1046
<?php wp_editor( '', 'bp-activities', array( 'dfw' => false, 'media_buttons' => false, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ), 'tinymce' => false, ) ); ?>
1047
1048
<p id="bp-replysubmit" class="submit">
bp-activity/bp-activity-adminbar.php ADDED
@@ -0,0 +1,47 @@
1
+ <?php
2
+ /**
3
+ * BuddyPress Activity Toolbar.
4
+ *
5
+ * Handles the activity functions related to the WordPress Toolbar.
6
+ *
7
+ * @package BuddyPress
8
+ * @subpackage Activity
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ defined( 'ABSPATH' ) || exit;
13
+
14
+ /**
15
+ * Add the Activity top-level menu link when viewing single activity item.
16
+ *
17
+ * @since 2.6.0
18
+ *
19
+ * @return null Null if user does not have access to editing functionality.
20
+ */
21
+ function bp_activity_admin_menu() {
22
+ global $wp_admin_bar;
23
+
24
+ // Only show if viewing a single activity item.
25
+ if ( ! bp_is_single_activity() ) {
26
+ return;
27
+ }
28
+
29
+ // Only show this menu to super admins
30
+ if ( ! bp_current_user_can( 'bp_moderate' ) ) {
31
+ return;
32
+ }
33
+
34
+ $activity_edit_link = add_query_arg( array(
35
+ 'page' => 'bp-activity',
36
+ 'aid' => bp_current_action(),
37
+ 'action' => 'edit'
38
+ ), bp_get_admin_url( 'admin.php' ) );
39
+
40
+ // Add the top-level Edit Activity button.
41
+ $wp_admin_bar->add_menu( array(
42
+ 'id' => 'activity-admin',
43
+ 'title' => __( 'Edit Activity', 'buddypress' ),
44
+ 'href' => esc_url( $activity_edit_link ),
45
+ ) );
46
+ }
47
+ add_action( 'admin_bar_menu', 'bp_activity_admin_menu', 99 );
bp-activity/bp-activity-akismet.php CHANGED
@@ -10,7 +10,28 @@
10
// Exit if accessed directly.
11
defined( 'ABSPATH' ) || exit;
12
13
- require dirname( __FILE__ ) . '/classes/class-bp-akismet.php';
14
15
/**
16
* Delete old spam activity meta data.
10
// Exit if accessed directly.
11
defined( 'ABSPATH' ) || exit;
12
13
+ /**
14
+ * Loads Akismet filtering for activity.
15
+ *
16
+ * @since 1.6.0
17
+ * @since 2.3.0 We only support Akismet 3+.
18
+ */
19
+ function bp_activity_setup_akismet() {
20
+ /**
21
+ * Filters if BuddyPress Activity Akismet support has been disabled by another plugin.
22
+ *
23
+ * @since 1.6.0
24
+ *
25
+ * @param bool $value Return value of bp_is_akismet_active boolean function.
26
+ */
27
+ if ( ! apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) ) {
28
+ return;
29
+ }
30
+
31
+ // Instantiate Akismet for BuddyPress.
32
+ buddypress()->activity->akismet = new BP_Akismet();
33
+ }
34
+ add_action( 'bp_activity_setup_globals', 'bp_activity_setup_akismet' );
35
36
/**
37
* Delete old spam activity meta data.
bp-activity/bp-activity-cache.php CHANGED
@@ -63,3 +63,24 @@ function bp_activity_clear_cache_for_deleted_activity( $deleted_ids ) {
63
}
64
}
65
add_action( 'bp_activity_deleted_activities', 'bp_activity_clear_cache_for_deleted_activity' );
63
}
64
}
65
add_action( 'bp_activity_deleted_activities', 'bp_activity_clear_cache_for_deleted_activity' );
66
+
67
+ /**
68
+ * Reset cache incrementor for the Activity component.
69
+ *
70
+ * Called whenever an activity item is created, updated, or deleted, this
71
+ * function effectively invalidates all cached results of activity queries.
72
+ *
73
+ * @since 2.7.0
74
+ *
75
+ * @return bool True on success, false on failure.
76
+ */
77
+ function bp_activity_reset_cache_incrementor() {
78
+ $without_last_activity = bp_core_reset_incrementor( 'bp_activity' );
79
+ $with_last_activity = bp_core_reset_incrementor( 'bp_activity_with_last_activity' );
80
+ return $without_last_activity && $with_last_activity;
81
+ }
82
+ add_action( 'bp_activity_delete', 'bp_activity_reset_cache_incrementor' );
83
+ add_action( 'bp_activity_add', 'bp_activity_reset_cache_incrementor' );
84
+ add_action( 'added_activity_meta', 'bp_activity_reset_cache_incrementor' );
85
+ add_action( 'updated_activity_meta', 'bp_activity_reset_cache_incrementor' );
86
+ add_action( 'deleted_activity_meta', 'bp_activity_reset_cache_incrementor' );
bp-activity/bp-activity-classes.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
- /**
3
- * BuddyPress Activity Classes.
4
- *
5
- * @package BuddyPress
6
- * @subpackage ActivityClasses
7
- * @since 1.0.0
8
- */
9
-
10
- // Exit if accessed directly.
11
- defined( 'ABSPATH' ) || exit;
12
-
13
- require dirname( __FILE__ ) . '/classes/class-bp-activity-activity.php';
14
- require dirname( __FILE__ ) . '/classes/class-bp-activity-feed.php';
15
- require dirname( __FILE__ ) . '/classes/class-bp-activity-query.php';
bp-activity/bp-activity-embeds.php ADDED
@@ -0,0 +1,352 @@
1
+ <?php
2
+ /**
3
+ * Functions related to embedding single activity items externally.
4
+ *
5
+ * Relies on WordPress 4.5.
6
+ *
7
+ * @since 2.6.0
8
+ *
9
+ * @package BuddyPress
10
+ * @subpackage ActivityEmbeds
11
+ */
12
+
13
+ // Exit if accessed directly.
14
+ defined( 'ABSPATH' ) || exit;
15
+
16
+ /**
17
+ * Loads our activity oEmbed component.
18
+ *
19
+ * @since 2.6.0
20
+ */
21
+ function bp_activity_setup_oembed() {
22
+ if ( version_compare( $GLOBALS['wp_version'], '4.5', '>=' ) && bp_is_active( 'activity', 'embeds' ) ) {
23
+ buddypress()->activity->oembed = new BP_Activity_oEmbed_Extension;
24
+ }
25
+ }
26
+ add_action( 'bp_loaded', 'bp_activity_setup_oembed' );
27
+
28
+ /**
29
+ * Catch links in embed excerpt so top.location.href can be added.
30
+ *
31
+ * Due to <iframe sandbox="allow-top-navigation">, links in embeds can only be
32
+ * clicked if invoked with top.location.href via JS.
33
+ *
34
+ * @since 2.6.0
35
+ *
36
+ * @param string $text Embed excerpt
37
+ * @return string
38
+ */
39
+ function bp_activity_embed_excerpt_onclick_location_filter( $text ) {
40
+ return preg_replace_callback( '/<a\s+[^>]*href=\"([^\"]*)\"/iU', 'bp_activity_embed_excerpt_onclick_location_filter_callback', $text );
41
+ }
42
+ /**
43
+ * Add onclick="top.location.href" to a link.
44
+ *
45
+ * @since 2.6.0
46
+ *
47
+ * @param array $matches Items matched by bp_activity_embed_excerpt_onclick_location_filter().
48
+ * @return string
49
+ */
50
+ function bp_activity_embed_excerpt_onclick_location_filter_callback( $matches ) {
51
+ return sprintf( '<a href="%1$s" onclick="top.location.href=\'%1$s\'"', $matches[1] );
52
+ }
53
+
54
+ /**
55
+ * Add inline styles for BP activity embeds.
56
+ *
57
+ * @since 2.6.0
58
+ */
59
+ function bp_activity_embed_add_inline_styles() {
60
+ if ( false === bp_is_single_activity() ) {
61
+ return;
62
+ }
63
+
64
+ $min = bp_core_get_minified_asset_suffix();
65
+
66
+ if ( is_rtl() ) {
67
+ $css = bp_locate_template_asset( "css/embeds-activity-rtl{$min}.css" );
68
+ } else {
69
+ $css = bp_locate_template_asset( "css/embeds-activity{$min}.css" );
70
+ }
71
+
72
+ // Bail if file wasn't found.
73
+ if ( false === $css ) {
74
+ return;
75
+ }
76
+
77
+ // Grab contents of CSS file and do some rudimentary CSS protection.
78
+ $css = file_get_contents( $css['file'] );
79
+ $css = wp_kses( $css, array( "\'", '\"' ) );
80
+
81
+ printf( '<style type="text/css">%s</style>', $css );
82
+ }
83
+ add_action( 'embed_head', 'bp_activity_embed_add_inline_styles', 20 );
84
+
85
+ /**
86
+ * Query for the activity item on the activity embed template.
87
+ *
88
+ * Basically a wrapper for {@link bp_has_activities()}, but allows us to
89
+ * use the activity loop without requerying for it again.
90
+ *
91
+ * @since 2.6.0
92
+ *
93
+ * @param int $activity_id The activity ID.
94
+ * @return bool
95
+ */
96
+ function bp_activity_embed_has_activity( $activity_id = 0 ) {
97
+ global $activities_template;
98
+
99
+ if ( empty( $activity_id ) ) {
100
+ return false;
101
+ }
102
+
103
+ if ( ! empty( $activities_template->activities ) ) {
104
+ $activity = (array) $activities_template->activities;
105
+ $activity = reset( $activity );
106
+
107
+ // No need to requery if we already got the embed activity
108
+ if ( (int) $activity_id === $activity->id ) {
109
+ return $activities_template->has_activities();
110
+ }
111
+ }
112
+
113
+ return bp_has_activities( array(
114
+ 'display_comments' => 'threaded',
115
+ 'show_hidden' => true,
116
+ 'include' => (int) $activity_id,
117
+ ) );
118
+ }
119
+
120
+ /**
121
+ * Outputs excerpt for an activity embed item.
122
+ *
123
+ * @since 2.6.0
124
+ */
125
+ function bp_activity_embed_excerpt( $content = '' ) {
126
+ echo bp_activity_get_embed_excerpt( $content = '' );
127
+ }
128
+
129
+ /**
130
+ * Generates excerpt for an activity embed item.
131
+ *
132
+ * @since 2.6.0
133
+ *
134
+ * @param string $content The content to generate an excerpt for.
135
+ * @return string
136
+ */
137
+ function bp_activity_get_embed_excerpt( $content = '' ) {
138
+ if ( empty( $content ) && ! empty( $GLOBALS['activities_template']->in_the_loop ) ) {
139
+ $content = $GLOBALS['activities_template']->activity->content;
140
+ }
141
+
142
+ /*
143
+ * bp_activity_truncate_entry() includes the 'Read More' link, which is why
144
+ * we're using this instead of bp_create_excerpt().
145
+ */
146
+ $content = html_entity_decode( $content );
147
+ $content = bp_activity_truncate_entry( $content, array(
148
+ 'html' => false,
149
+ 'filter_shortcodes' => true,
150
+ 'strip_tags' => true,
151
+ 'force_truncate' => true
152
+ ) );
153
+
154
+ /**
155
+ * Filter the activity embed excerpt.
156
+ *
157
+ * @since 2.6.0
158
+ *
159
+ * @var string $content Embed Excerpt.
160
+ * @var string $unmodified_content Unmodified activity content.
161
+ */
162
+ return apply_filters( 'bp_activity_get_embed_excerpt', $content, $GLOBALS['activities_template']->activity->content );
163
+ }
164
+
165
+ /**
166
+ * Outputs the first embedded item in the activity oEmbed template.
167
+ *
168
+ * @since 2.6.0
169
+ */
170
+ function bp_activity_embed_media() {
171
+ // Bail if oEmbed request explicitly hides media.
172
+ if ( isset( $_GET['hide_media'] ) && true == wp_validate_boolean( $_GET['hide_media'] ) ) {
173
+ /**
174
+ * Do something after media is rendered for an activity oEmbed item.
175
+ *
176
+ * @since 2.6.0
177
+ */
178
+ do_action( 'bp_activity_embed_after_media' );
179
+
180
+ return;
181
+ }
182
+
183
+ /**
184
+ * Should we display media in the oEmbed template?
185
+ *
186
+ * @since 2.6.0
187
+ *
188
+ * @param bool $retval Defaults to true.
189
+ */
190
+ $allow_media = apply_filters( 'bp_activity_embed_display_media', true );
191
+
192
+ // Find oEmbeds from only WP registered providers.
193
+ bp_remove_all_filters( 'oembed_providers' );
194
+ $media = bp_core_extract_media_from_content( $GLOBALS['activities_template']->activity->content, 'embeds' );
195
+ bp_restore_all_filters( 'oembed_providers' );
196
+
197
+ // oEmbeds have precedence over inline video / audio.
198
+ if ( isset( $media['embeds'] ) && true === $allow_media ) {
199
+ // Autoembed first URL.
200
+ $oembed_defaults = wp_embed_defaults();
201
+ $oembed_args = array(
202
+ 'width' => $oembed_defaults['width'],
203
+ 'height' => $oembed_defaults['height'],
204
+ 'discover' => true
205
+ );
206
+ $url = $media['embeds'][0]['url'];
207
+ $cachekey = '_oembed_response_' . md5( $url . serialize( $oembed_args ) );
208
+
209
+ // Try to fetch oEmbed response from meta.
210
+ $oembed = bp_activity_get_meta( bp_get_activity_id(), $cachekey );
211
+
212
+ // No cache, so fetch full oEmbed response now!
213
+ if ( '' === $oembed ) {
214
+ $o = _wp_oembed_get_object();
215
+ $oembed = $o->fetch( $o->get_provider( $url, $oembed_args ), $url, $oembed_args );
216
+
217
+ // Cache oEmbed response.
218
+ bp_activity_update_meta( bp_get_activity_id(), $cachekey, $oembed );
219
+ }
220
+
221
+ $content = '';
222
+
223
+ /**
224
+ * Filters the default embed display max width.
225
+ *
226
+ * This is used if the oEmbed response does not return a thumbnail width.
227
+ *
228
+ * @since 2.6.0
229
+ *
230
+ * @param int $width.
231
+ */
232
+ $width = (int) apply_filters( 'bp_activity_embed_display_media_width', 550 );
233
+
234
+ // Set thumbnail.
235
+ if ( 'photo' === $oembed->type ) {
236
+ $thumbnail = $oembed->url;
237
+ } elseif ( isset( $oembed->thumbnail_url ) ) {
238
+ $thumbnail = $oembed->thumbnail_url;
239
+
240
+ /* Non-oEmbed standard attributes */
241
+ // Mixcloud
242
+ } elseif ( isset( $oembed->image ) ) {
243
+ $thumbnail = $oembed->image;
244
+ // ReverbNation
245
+ } elseif ( isset( $oembed->{'thumbnail-url'} ) ) {
246
+ $thumbnail = $oembed->{'thumbnail-url'};
247
+ }
248
+
249
+ // Display thumb and related oEmbed meta.
250
+ if ( true === isset ( $thumbnail ) ) {
251
+ $play_icon = $caption = '';
252
+
253
+ // Add play icon for non-photos.
254
+ if ( 'photo' !== $oembed->type ) {
255
+ /**
256
+ * ion-play icon from Ionicons.
257
+ *
258
+ * @link http://ionicons.com/
259
+ * @license MIT
260
+ */
261
+ $play_icon = <<<EOD
262
+ <svg id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M405.2,232.9L126.8,67.2c-3.4-2-6.9-3.2-10.9-3.2c-10.9,0-19.8,9-19.8,20H96v344h0.1c0,11,8.9,20,19.8,20 c4.1,0,7.5-1.4,11.2-3.4l278.1-165.5c6.6-5.5,10.8-13.8,10.8-23.1C416,246.7,411.8,238.5,405.2,232.9z"/></svg>
263
+ EOD;
264
+
265
+ $play_icon = sprintf( '<a rel="nofollow" class="play-btn" href="%1$s" onclick="top.location.href=\'%1$s\'">%2$s</a>', esc_url( $url ), $play_icon );
266
+ }
267
+
268
+ // Thumb width
269
+ $thumb_width = isset( $oembed->thumbnail_width ) && 'photo' !== $oembed->type && (int) $oembed->thumbnail_width < 550 ? (int) $oembed->thumbnail_width : $width;
270
+
271
+ $float_width = 350;
272
+
273
+ // Set up thumb.
274
+ $content = sprintf( '<div class="thumb" style="max-width:%1$spx">%2$s<a href="%3$s" rel="nofollow" onclick="top.location.href=\'%3$s\'"><img src="%4$s" /></a></div>', $thumb_width, $play_icon, esc_url( $url ), esc_url( $thumbnail ) );
275
+
276
+ // Show title.
277
+ if ( isset( $oembed->title ) ) {
278
+ $caption .= sprintf( '<p class="caption-title"><strong>%s</strong></p>', apply_filters( 'single_post_title', $oembed->title ) );
279
+ }
280
+
281
+ // Show description (non-oEmbed standard)
282
+ if ( isset( $oembed->description ) ) {
283
+ $caption .= sprintf( '<div class="caption-description">%s</div>', apply_filters( 'bp_activity_get_embed_excerpt', $oembed->description ) );
284
+ }
285
+
286
+ // Show author info.
287
+ if ( isset( $oembed->provider_name ) && isset( $oembed->author_name ) ) {
288
+ /* translators: By [oEmbed author] on [oEmbed provider]. eg. By BuddyPress on YouTube. */
289
+ $anchor_text = sprintf( __( 'By %1$s on %2$s', 'buddypress' ), $oembed->author_name, $oembed->provider_name );
290
+
291
+ } elseif ( isset( $oembed->provider_name ) ) {
292
+ $anchor_text = sprintf( __( 'View on %s', 'buddypress' ), $oembed->provider_name );
293
+ }
294
+
295
+ if ( true === isset( $anchor_text ) ) {
296
+ $caption .= sprintf( '<a rel="nofollow" href="%1$s" onclick="top.location.href=\'%1$s\'">%2$s</a>', esc_url( $url ), apply_filters( 'the_title', $anchor_text ) );
297
+ }
298
+
299
+ // Set up caption.
300
+ if ( '' !== $caption ) {
301
+ $css_class = isset( $oembed->provider_name ) ? sprintf( ' provider-%s', sanitize_html_class( strtolower( $oembed->provider_name ) ) ) : '';
302
+ $caption = sprintf( '<div class="caption%1$s" style="width:%2$s">%3$s</div>',
303
+ $css_class,
304
+ $thumb_width > $float_width ? 100 . '%' : round( ( $width - (int) $thumb_width ) / $width * 100 ) . '%',
305
+ $caption
306
+ );
307
+
308
+ $content .= $caption;
309
+ }
310
+ }
311
+
312
+ // Print rich content.
313
+ if ( '' !== $content ) {
314
+ printf( '<div class="bp-activity-embed-display-media %s" style="max-width:%spx">%s</div>',
315
+ $thumb_width < $float_width ? 'two-col' : 'one-col',
316
+ $thumb_width < $float_width ? $width : $thumb_width,
317
+ $content
318
+ );
319
+ }
320
+
321
+ // Video / audio.
322
+ } elseif ( true === $allow_media ) {
323
+ // Call BP_Embed if it hasn't already loaded.
324
+ bp_embed_init();
325
+
326
+ // Run shortcode and embed routine.
327
+ $content = buddypress()->embed->run_shortcode( $GLOBALS['activities_template']->activity->content );
328
+ $content = buddypress()->embed->autoembed( $content );
329
+
330
+ // Try to find inline video / audio.
331
+ $media = bp_core_extract_media_from_content( $content, 96 );
332
+
333
+ // Video takes precedence. HTML5-only.
334
+ if ( isset( $media['videos'] ) && 'shortcodes' === $media['videos'][0]['source'] ) {
335
+ printf( '<video controls preload="metadata"><source src="%1$s"><p>%2$s</p></video>',
336
+ esc_url( $media['videos'][0]['url'] ),
337
+ esc_html__( 'Your browser does not support HTML5 video', 'buddypress' )
338
+ );
339
+
340
+ // No video? Try audio. HTML5-only.
341
+ } elseif ( isset( $media['audio'] ) && 'shortcodes' === $media['audio'][0]['source'] ) {
342
+ printf( '<audio controls preload="metadata"><source src="%1$s"><p>%2$s</p></audio>',
343
+ esc_url( $media['audio'][0]['url'] ),
344
+ esc_html__( 'Your browser does not support HTML5 audio', 'buddypress' )
345
+ );
346
+ }
347
+
348
+ }
349
+
350
+ /** This hook is documented in /bp-activity/bp-activity-embeds.php */
351
+ do_action( 'bp_activity_embed_after_media' );
352
+ }
bp-activity/bp-activity-filters.php CHANGED
@@ -43,6 +43,7 @@ add_filter( 'bp_get_activity_content', 'wptexturize' );
43
add_filter( 'bp_get_activity_parent_content', 'wptexturize' );
44
add_filter( 'bp_get_activity_latest_update', 'wptexturize' );
45
add_filter( 'bp_get_activity_latest_update_excerpt', 'wptexturize' );
46
47
add_filter( 'bp_get_activity_action', 'convert_smilies' );
48
add_filter( 'bp_get_activity_content_body', 'convert_smilies' );
@@ -50,6 +51,7 @@ add_filter( 'bp_get_activity_content', 'convert_smilies' );
50
add_filter( 'bp_get_activity_parent_content', 'convert_smilies' );
51
add_filter( 'bp_get_activity_latest_update', 'convert_smilies' );
52
add_filter( 'bp_get_activity_latest_update_excerpt', 'convert_smilies' );
53
54
add_filter( 'bp_get_activity_action', 'convert_chars' );
55
add_filter( 'bp_get_activity_content_body', 'convert_chars' );
@@ -57,11 +59,13 @@ add_filter( 'bp_get_activity_content', 'convert_chars' );
57
add_filter( 'bp_get_activity_parent_content', 'convert_chars' );
58
add_filter( 'bp_get_activity_latest_update', 'convert_chars' );
59
add_filter( 'bp_get_activity_latest_update_excerpt', 'convert_chars' );
60
61
add_filter( 'bp_get_activity_action', 'wpautop' );
62
add_filter( 'bp_get_activity_content_body', 'wpautop' );
63
add_filter( 'bp_get_activity_content', 'wpautop' );
64
add_filter( 'bp_get_activity_feed_item_description', 'wpautop' );
65
66
add_filter( 'bp_get_activity_action', 'make_clickable', 9 );
67
add_filter( 'bp_get_activity_content_body', 'make_clickable', 9 );
@@ -70,6 +74,7 @@ add_filter( 'bp_get_activity_parent_content', 'make_clickable', 9 );
70
add_filter( 'bp_get_activity_latest_update', 'make_clickable', 9 );
71
add_filter( 'bp_get_activity_latest_update_excerpt', 'make_clickable', 9 );
72
add_filter( 'bp_get_activity_feed_item_description', 'make_clickable', 9 );
73
74
add_filter( 'bp_acomment_name', 'stripslashes_deep', 5 );
75
add_filter( 'bp_get_activity_action', 'stripslashes_deep', 5 );
@@ -94,6 +99,7 @@ add_filter( 'pre_comment_content', 'bp_activity_at_name_filter
94
add_filter( 'group_forum_topic_text_before_save', 'bp_activity_at_name_filter' );
95
add_filter( 'group_forum_post_text_before_save', 'bp_activity_at_name_filter' );
96
add_filter( 'the_content', 'bp_activity_at_name_filter' );
97
98
add_filter( 'bp_get_activity_parent_content', 'bp_create_excerpt' );
99
@@ -103,6 +109,8 @@ add_filter( 'bp_get_activity_content', 'bp_activity_truncate_entry', 5 );
103
add_filter( 'bp_get_total_favorite_count_for_user', 'bp_core_number_format' );
104
add_filter( 'bp_get_total_mention_count_for_user', 'bp_core_number_format' );
105
106
/* Actions *******************************************************************/
107
108
// At-name filter.
@@ -147,13 +155,19 @@ function bp_activity_get_moderated_activity_types() {
147
function bp_activity_check_moderation_keys( $activity ) {
148
149
// Only check specific types of activity updates.
150
- if ( !in_array( $activity->type, bp_activity_get_moderated_activity_types() ) )
151
return;
152
153
- // Unset the activity component so activity stream update fails
154
// @todo This is temporary until some kind of moderation is built.
155
- if ( !bp_core_check_for_moderation( $activity->user_id, '', $activity->content ) )
156
$activity->component = false;
157
}
158
159
/**
@@ -166,12 +180,19 @@ function bp_activity_check_moderation_keys( $activity ) {
166
function bp_activity_check_blacklist_keys( $activity ) {
167
168
// Only check specific types of activity updates.
169
- if ( ! in_array( $activity->type, bp_activity_get_moderated_activity_types() ) )
170
return;
171
172
- // Mark as spam.
173
- if ( ! bp_core_check_for_blacklist( $activity->user_id, '', $activity->content ) )
174
- bp_activity_mark_as_spam( $activity, 'by_blacklist' );
175
}
176
177
/**
@@ -179,9 +200,6 @@ function bp_activity_check_blacklist_keys( $activity ) {
179
*
180
* @since 1.1.0
181
*
182
- * @uses apply_filters() To call the 'bp_activity_allowed_tags' hook.
183
- * @uses wp_kses()
184
- *
185
* @param string $content The activity content.
186
* @return string $content Filtered activity content.
187
*/
@@ -189,13 +207,15 @@ function bp_activity_filter_kses( $content ) {
189
global $allowedtags;
190
191
$activity_allowedtags = $allowedtags;
192
- $activity_allowedtags['a']['class'] = array();
193
- $activity_allowedtags['a']['id'] = array();
194
- $activity_allowedtags['a']['rel'] = array();
195
- $activity_allowedtags['a']['title'] = array();
196
- $activity_allowedtags['b'] = array();
197
- $activity_allowedtags['code'] = array();
198
- $activity_allowedtags['i'] = array();
199
$activity_allowedtags['img'] = array();
200
$activity_allowedtags['img']['src'] = array();
201
$activity_allowedtags['img']['alt'] = array();
@@ -204,8 +224,10 @@ function bp_activity_filter_kses( $content ) {
204
$activity_allowedtags['img']['class'] = array();
205
$activity_allowedtags['img']['id'] = array();
206
$activity_allowedtags['img']['title'] = array();
207
- $activity_allowedtags['span'] = array();
208
- $activity_allowedtags['span']['class'] = array();
209
210
211
/**
@@ -260,7 +282,7 @@ function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
260
261
// Linkify the mentions with the username.
262
foreach ( (array) $usernames as $user_id => $username ) {
263
- $content = preg_replace( '/(@' . $username . '\b)/', "<a href='" . bp_core_get_user_domain( $user_id ) . "' rel='nofollow'>@$username</a>", $content );
264
}
265
266
// Put everything back.
@@ -282,8 +304,6 @@ function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
282
*
283
* @since 1.5.0
284
*
285
- * @uses bp_activity_find_mentions()
286
- *
287
* @param BP_Activity_Activity $activity Activity Object.
288
*/
289
function bp_activity_at_name_filter_updates( $activity ) {
@@ -303,7 +323,7 @@ function bp_activity_at_name_filter_updates( $activity ) {
303
if ( ! empty( $usernames ) ) {
304
// Replace @mention text with userlinks.
305
foreach( (array) $usernames as $user_id => $username ) {
306
- $activity->content = preg_replace( '/(@' . $username . '\b)/', "<a href='" . bp_core_get_user_domain( $user_id ) . "' rel='nofollow'>@$username</a>", $activity->content );
307
}
308
309
// Add our hook to send @mention emails after the activity item is saved.
@@ -319,9 +339,6 @@ function bp_activity_at_name_filter_updates( $activity ) {
319
*
320
* @since 1.7.0
321
*
322
- * @uses bp_activity_at_message_notification()
323
- * @uses bp_activity_update_mention_count_for_user()
324
- *
325
* @param BP_Activity_Activity $activity The BP_Activity_Activity object.
326
*/
327
function bp_activity_at_name_send_emails( $activity ) {
@@ -395,19 +412,16 @@ function bp_activity_make_nofollow_filter( $text ) {
395
* This method can only be used inside the Activity loop.
396
*
397
* @since 1.5.0
398
- *
399
- * @uses bp_is_single_activity()
400
- * @uses apply_filters() To call the 'bp_activity_excerpt_append_text' hook.
401
- * @uses apply_filters() To call the 'bp_activity_excerpt_length' hook.
402
- * @uses bp_create_excerpt()
403
- * @uses bp_get_activity_id()
404
- * @uses bp_get_activity_thread_permalink()
405
- * @uses apply_filters() To call the 'bp_activity_truncate_entry' hook.
406
*
407
* @param string $text The original activity entry text.
408
* @return string $excerpt The truncated text.
409
*/
410
- function bp_activity_truncate_entry( $text ) {
411
global $activities_template;
412
413
/**
@@ -423,7 +437,7 @@ function bp_activity_truncate_entry( $text ) {
423
);
424
425
// The full text of the activity update should always show on the single activity screen.
426
- if ( ! $maybe_truncate_text || bp_is_single_activity() ) {
427
return $text;
428
}
429
@@ -436,24 +450,19 @@ function bp_activity_truncate_entry( $text ) {
436
*/
437
$append_text = apply_filters( 'bp_activity_excerpt_append_text', __( '[Read more]', 'buddypress' ) );
438
439
- /**
440
- * Filters the excerpt length for the activity excerpt.
441
- *
442
- * @since 1.5.0
443
- *
444
- * @param int $value Number indicating how many words to trim the excerpt down to.
445
- */
446
- $excerpt_length = apply_filters( 'bp_activity_excerpt_length', 358 );
447
448
// Run the text through the excerpt function. If it's too short, the original text will be returned.
449
- $excerpt = bp_create_excerpt( $text, $excerpt_length, array( 'ending' => __( '&hellip;', 'buddypress' ) ) );
450
451
/*
452
* If the text returned by bp_create_excerpt() is different from the original text (ie it's
453
* been truncated), add the "Read More" link. Note that bp_create_excerpt() is stripping
454
* shortcodes, so we have strip them from the $text before the comparison.
455
*/
456
- if ( $excerpt != strip_shortcodes( $text ) ) {
457
$id = !empty( $activities_template->activity->current_comment->id ) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id();
458
459
$excerpt = sprintf( '%1$s<span class="activity-read-more" id="%2$s"><a href="%3$s" rel="nofollow">%4$s</a></span>', $excerpt, $id, bp_get_activity_thread_permalink(), $append_text );
@@ -476,8 +485,6 @@ function bp_activity_truncate_entry( $text ) {
476
*
477
* @since 2.0.0
478
*
479
- * @uses bp_activity_do_heartbeat() to check if heartbeat is required.
480
- *
481
* @param array $js_handles The original dependencies.
482
* @return array $js_handles The new dependencies.
483
*/
@@ -543,8 +550,6 @@ add_filter( 'bp_get_activity_css_class', 'bp_activity_timestamp_class', 9, 1 );
543
*
544
* @since 2.0.0
545
*
546
- * @uses bp_activity_get_last_updated() to get the recorded date of the last activity.
547
- *
548
* @param array $response Array containing Heartbeat API response.
549
* @param array $data Array containing data for Heartbeat API response.
550