BuddyPress - Version 1.1

Version Description

Download this release

Release Info

Developer apeatling
Plugin Icon 128x128 BuddyPress
Version 1.1
Comparing to
See all releases

Code changes from version 1.0.3 to 1.1

Files changed (736) hide show
  1. bp-activity.php +250 -153
  2. bp-activity/bp-activity-classes.php +196 -190
  3. bp-activity/bp-activity-cssjs.php +0 -10
  4. bp-activity/bp-activity-filters.php +19 -6
  5. bp-activity/bp-activity-templatetags.php +162 -59
  6. bp-activity/bp-activity-widgets.php +45 -27
  7. bp-activity/css/widget-activity.css +0 -14
  8. bp-activity/deprecated/bp-activity-deprecated.php +95 -0
  9. bp-activity/{css → deprecated/css}/structure.css +0 -0
  10. bp-activity/{images → deprecated/images}/rss.png +0 -0
  11. bp-activity/feeds/bp-activity-friends-feed.php +2 -2
  12. bp-activity/feeds/bp-activity-personal-feed.php +2 -2
  13. bp-activity/feeds/bp-activity-sitewide-feed.php +2 -2
  14. bp-blogs.php +215 -242
  15. bp-blogs/admin-tabs/bp-blogs-comments-tab.php +1 -1
  16. bp-blogs/admin-tabs/bp-blogs-posts-tab.php +1 -1
  17. bp-blogs/admin-tabs/bp-blogs-tab.php +1 -1
  18. bp-blogs/bp-blogs-ajax.php +0 -12
  19. bp-blogs/bp-blogs-cssjs.php +0 -10
  20. bp-blogs/bp-blogs-templatetags.php +26 -17
  21. bp-blogs/bp-blogs-widgets.php +6 -3
  22. bp-blogs/css/widget-blogs.css +0 -29
  23. bp-blogs/deprecated/bp-blogs-deprecated.php +105 -0
  24. bp-blogs/{css → deprecated/css}/structure.css +0 -0
  25. bp-blogs/{js → deprecated/js}/directory-blogs.js +0 -0
  26. bp-core.php +593 -369
  27. bp-core/bp-core-activation.php +85 -107
  28. bp-core/bp-core-admin.php +30 -2
  29. bp-core/bp-core-adminbar.php +16 -13
  30. bp-core/bp-core-ajax.php +0 -81
  31. bp-core/bp-core-avatars.php +283 -422
  32. bp-core/bp-core-catchuri.php +71 -106
  33. bp-core/bp-core-classes.php +12 -15
  34. bp-core/bp-core-cssjs.php +134 -134
  35. bp-core/bp-core-notifications.php +2 -5
  36. bp-core/bp-core-settings.php +37 -19
  37. bp-core/bp-core-signup.php +183 -382
  38. bp-core/bp-core-templatetags.php +809 -191
  39. bp-core/bp-core-widgets.php +75 -7
  40. bp-core/deprecated/bp-core-deprecated.php +980 -0
  41. bp-core/{css → deprecated/css}/admin-bar.css +6 -1
  42. bp-core/{css → deprecated/css}/structure.css +10 -9
  43. bp-core/{images → deprecated/images}/accept_button_side.gif +0 -0
  44. bp-core/{images → deprecated/images}/add_button_side.gif +0 -0
  45. bp-core/{images → deprecated/images}/add_friend_button.gif +0 -0
  46. bp-core/{images → deprecated/images}/admin-menu-arrow.gif +0 -0
  47. bp-core/{images → deprecated/images}/admin_bar_back.gif +0 -0
  48. bp-core/{images → deprecated/images}/admin_bar_logo.gif +0 -0
  49. bp-core/{images → deprecated/images}/ajax-loader.gif +0 -0
  50. bp-core/{images → deprecated/images}/blog.png +0 -0
  51. bp-core/{images → deprecated/images}/button_back.gif +0 -0
  52. bp-core/{images → deprecated/images}/check_button_side.gif +0 -0
  53. bp-core/{images → deprecated/images}/loading_button_side.gif +0 -0
  54. bp-core/{images → deprecated/images}/logout_bullet.gif +0 -0
  55. bp-core/{images → deprecated/images}/member.png +0 -0
  56. bp-core/{images → deprecated/images}/nav_bullet.gif +0 -0
  57. bp-core/{images → deprecated/images}/reject_button_side.gif +0 -0
  58. bp-core/{images → deprecated/images}/remove_button_side.gif +0 -0
  59. bp-core/{images → deprecated/images}/remove_friend_button.gif +0 -0
  60. bp-core/{images → deprecated/images}/requested_friend_button.gif +0 -0
  61. bp-core/{images → deprecated/images}/view_button_side.gif +0 -0
  62. bp-core/{js → deprecated/js}/directory-members.js +0 -0
  63. bp-core/{js → deprecated/js}/general.js +0 -12
  64. bp-core/{js → deprecated/js}/jquery/jquery.livequery.pack.js +0 -0
  65. bp-core/{js → deprecated/js}/jquery/jquery.tablednd.js +0 -0
  66. bp-core/images/Jcrop.gif +0 -0
  67. bp-core/images/admin_menu_icon.png +0 -0
  68. bp-core/js/admin-bar.js +9 -0
  69. bp-core/js/widget-members.js +1 -2
  70. bp-forums.php +318 -119
  71. bp-forums/bb-config.php +11 -0
  72. bp-forums/bbpress-plugins/buddypress-enable.php +0 -55
  73. bp-forums/bbpress/bb-admin/admin-action.php +5 -0
  74. bp-forums/bbpress/bb-admin/admin-ajax.php +243 -0
  75. bp-forums/bbpress/bb-admin/admin-base.php +19 -0
  76. bp-forums/bbpress/bb-admin/admin-footer.php +33 -0
  77. bp-forums/bbpress/bb-admin/admin-header.php +51 -0
  78. bp-forums/bbpress/bb-admin/admin.php +37 -0
  79. bp-forums/bbpress/bb-admin/bb-forum.php +61 -0
  80. bp-forums/bbpress/bb-admin/delete-post.php +78 -0
  81. bp-forums/bbpress/bb-admin/delete-topic.php +53 -0
  82. bp-forums/bbpress/bb-admin/export.php +306 -0
  83. bp-forums/bbpress/bb-admin/forums.php +106 -0
  84. bp-forums/bbpress/bb-admin/images/admin-header-logo.gif +0 -0
  85. bp-forums/bbpress/bb-admin/images/bbpress-logo.png +0 -0
  86. bp-forums/bbpress/bb-admin/images/blank.gif +0 -0
  87. bp-forums/bbpress/bb-admin/images/button-grad.png +0 -0
  88. bp-forums/bbpress/bb-admin/images/drag.gif +0 -0
  89. bp-forums/bbpress/bb-admin/images/gray-grad.png +0 -0
  90. bp-forums/bbpress/bb-admin/images/icons32.png +0 -0
  91. bp-forums/bbpress/bb-admin/images/input-lock.png +0 -0
  92. bp-forums/bbpress/bb-admin/images/menu-arrows.gif +0 -0
  93. bp-forums/bbpress/bb-admin/images/menu-bits-rtl.gif +0 -0
  94. bp-forums/bbpress/bb-admin/images/menu-bits.gif +0 -0
  95. bp-forums/bbpress/bb-admin/images/menu-dark-rtl.gif +0 -0
  96. bp-forums/bbpress/bb-admin/images/menu-dark.gif +0 -0
  97. bp-forums/bbpress/bb-admin/images/menu.png +0 -0
  98. bp-forums/bbpress/bb-admin/images/visit-site-button-grad.gif +0 -0
  99. bp-forums/bbpress/bb-admin/images/white-grad-active.png +0 -0
  100. bp-forums/bbpress/bb-admin/images/white-grad.png +0 -0
  101. bp-forums/bbpress/bb-admin/includes/class.bb-install.php +2763 -0
  102. bp-forums/bbpress/bb-admin/includes/defaults.bb-htaccess.php +46 -0
  103. bp-forums/bbpress/bb-admin/includes/defaults.bb-schema.php +219 -0
  104. bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php +1432 -0
  105. bp-forums/bbpress/bb-admin/includes/functions.bb-plugin.php +441 -0
  106. bp-forums/bbpress/bb-admin/includes/functions.bb-upgrade.php +503 -0
  107. bp-forums/bbpress/bb-admin/index.php +123 -0
  108. bp-forums/bbpress/bb-admin/install-rtl.css +100 -0
  109. bp-forums/bbpress/bb-admin/install.css +433 -0
  110. bp-forums/bbpress/bb-admin/install.php +401 -0
  111. bp-forums/bbpress/bb-admin/js/admin-forums.js +140 -0
  112. bp-forums/bbpress/bb-admin/js/common.js +87 -0
  113. bp-forums/bbpress/bb-admin/js/utils.js +166 -0
  114. bp-forums/bbpress/bb-admin/options-discussion.php +131 -0
  115. bp-forums/bbpress/bb-admin/options-general.php +244 -0
  116. bp-forums/bbpress/bb-admin/options-permalinks.php +188 -0
  117. bp-forums/bbpress/bb-admin/options-reading.php +69 -0
  118. bp-forums/bbpress/bb-admin/options-wordpress.php +311 -0
  119. bp-forums/bbpress/bb-admin/options-writing.php +86 -0
  120. bp-forums/bbpress/bb-admin/plugins.php +268 -0
  121. bp-forums/bbpress/bb-admin/posts.php +119 -0
  122. bp-forums/bbpress/bb-admin/rewrite-rules.php +4 -0
  123. bp-forums/bbpress/bb-admin/sticky.php +29 -0
  124. bp-forums/bbpress/bb-admin/style-rtl.css +456 -0
  125. bp-forums/bbpress/bb-admin/style.css +1854 -0
  126. bp-forums/bbpress/bb-admin/tag-destroy.php +22 -0
  127. bp-forums/bbpress/bb-admin/tag-merge.php +26 -0
  128. bp-forums/bbpress/bb-admin/tag-rename.php +22 -0
  129. bp-forums/bbpress/bb-admin/themes.php +159 -0
  130. bp-forums/bbpress/bb-admin/tools-recount.php +211 -0
  131. bp-forums/bbpress/bb-admin/topic-move.php +30 -0
  132. bp-forums/bbpress/bb-admin/topic-toggle.php +33 -0
  133. bp-forums/bbpress/bb-admin/topics.php +180 -0
  134. bp-forums/bbpress/bb-admin/upgrade.php +210 -0
  135. bp-forums/bbpress/bb-admin/users.php +22 -0
  136. bp-forums/bbpress/bb-config-sample.php +64 -0
  137. bp-forums/bbpress/bb-cron.php +57 -0
  138. bp-forums/bbpress/bb-edit.php +46 -0
  139. bp-forums/bbpress/bb-includes/backpress/class.bp-log.php +550 -0
  140. bp-forums/bbpress/bb-includes/backpress/class.bp-roles.php +86 -0
  141. bp-forums/bbpress/bb-includes/backpress/class.bp-sql-schema-parser.php +615 -0
  142. bp-forums/bbpress/bb-includes/backpress/class.bp-user.php +398 -0
  143. bp-forums/bbpress/bb-includes/backpress/class.bpdb-multi.php +196 -0
  144. bp-forums/bbpress/bb-includes/backpress/class.bpdb.php +1164 -0
  145. bp-forums/bbpress/bb-includes/backpress/class.ixr.php +900 -0
  146. bp-forums/bbpress/bb-includes/backpress/class.mailer-smtp.php +1061 -0
  147. bp-forums/bbpress/bb-includes/backpress/class.mailer.php +1921 -0
  148. bp-forums/bbpress/bb-includes/backpress/class.passwordhash.php +258 -0
  149. bp-forums/bbpress/bb-includes/backpress/class.wp-ajax-response.php +138 -0
  150. bp-forums/bbpress/bb-includes/backpress/class.wp-auth.php +298 -0
  151. bp-forums/bbpress/bb-includes/backpress/class.wp-dependencies.php +239 -0
  152. bp-forums/bbpress/bb-includes/backpress/class.wp-error.php +204 -0
  153. bp-forums/bbpress/bb-includes/backpress/class.wp-http.php +2052 -0
  154. bp-forums/bbpress/bb-includes/backpress/class.wp-object-cache-memcached.php +463 -0
  155. bp-forums/bbpress/bb-includes/backpress/class.wp-object-cache.php +305 -0
  156. bp-forums/bbpress/bb-includes/backpress/class.wp-pass.php +141 -0
  157. bp-forums/bbpress/bb-includes/backpress/class.wp-scripts.php +197 -0
  158. bp-forums/bbpress/bb-includes/backpress/class.wp-styles.php +119 -0
  159. bp-forums/bbpress/bb-includes/backpress/class.wp-taxonomy.php +2072 -0
  160. bp-forums/bbpress/bb-includes/backpress/class.wp-users.php +575 -0
  161. bp-forums/bbpress/bb-includes/backpress/functions.bp-options.php +64 -0
  162. bp-forums/bbpress/bb-includes/backpress/functions.compat.php +140 -0
  163. bp-forums/bbpress/bb-includes/backpress/functions.core.php +1237 -0
  164. bp-forums/bbpress/bb-includes/backpress/functions.formatting.php +1795 -0
  165. bp-forums/bbpress/bb-includes/backpress/functions.kses.php +712 -0
  166. bp-forums/bbpress/bb-includes/backpress/functions.plugin-api.php +697 -0
  167. bp-forums/bbpress/bb-includes/backpress/functions.shortcodes.php +295 -0
  168. bp-forums/bbpress/bb-includes/backpress/functions.wp-cron.php +399 -0
  169. bp-forums/bbpress/bb-includes/backpress/functions.wp-object-cache.php +173 -0
  170. bp-forums/bbpress/bb-includes/backpress/functions.wp-scripts.php +128 -0
  171. bp-forums/bbpress/bb-includes/backpress/functions.wp-styles.php +104 -0
  172. bp-forums/bbpress/bb-includes/backpress/functions.wp-taxonomy.php +185 -0
  173. bp-forums/bbpress/bb-includes/backpress/interface.bp-options.php +129 -0
  174. bp-forums/bbpress/bb-includes/backpress/loader.wp-object-cache-memcached.php +4 -0
  175. bp-forums/bbpress/bb-includes/backpress/loader.wp-object-cache.php +4 -0
  176. bp-forums/bbpress/bb-includes/backpress/pomo/entry.php +70 -0
  177. bp-forums/bbpress/bb-includes/backpress/pomo/mo.php +185 -0
  178. bp-forums/bbpress/bb-includes/backpress/pomo/po.php +360 -0
  179. bp-forums/bbpress/bb-includes/backpress/pomo/sample/app.php +63 -0
  180. bp-forums/bbpress/bb-includes/backpress/pomo/sample/languages/app-side.pot +21 -0
  181. bp-forums/bbpress/bb-includes/backpress/pomo/sample/languages/app.pot +34 -0
  182. bp-forums/bbpress/bb-includes/backpress/pomo/sample/languages/bg-side.mo +0 -0
  183. bp-forums/bbpress/bb-includes/backpress/pomo/sample/languages/bg-side.po +19 -0
  184. bp-forums/bbpress/bb-includes/backpress/pomo/sample/languages/bg.mo +0 -0
  185. bp-forums/bbpress/bb-includes/backpress/pomo/sample/languages/bg.po +32 -0
  186. bp-forums/bbpress/bb-includes/backpress/pomo/streams.php +137 -0
  187. bp-forums/bbpress/bb-includes/backpress/pomo/translations.php +199 -0
  188. bp-forums/bbpress/bb-includes/class.bb-dir-map.php +105 -0
  189. bp-forums/bbpress/bb-includes/class.bb-locale.php +449 -0
  190. bp-forums/bbpress/bb-includes/class.bb-pingbacks.php +204 -0
  191. bp-forums/bbpress/bb-includes/class.bb-query.php +1029 -0
  192. bp-forums/bbpress/bb-includes/class.bb-taxonomy.php +329 -0
  193. bp-forums/bbpress/bb-includes/class.bb-walker.php +253 -0
  194. bp-forums/bbpress/bb-includes/class.bp-options.php +97 -0
  195. bp-forums/bbpress/bb-includes/defaults.bb-filters.php +155 -0
  196. bp-forums/bbpress/bb-includes/functions.bb-capabilities.php +346 -0
  197. bp-forums/bbpress/bb-includes/functions.bb-core.php +1789 -0
  198. bp-forums/bbpress/bb-includes/functions.bb-deprecated.php +1179 -0
  199. bp-forums/bbpress/bb-includes/functions.bb-formatting.php +331 -0
  200. bp-forums/bbpress/bb-includes/functions.bb-forums.php +157 -0
  201. bp-forums/bbpress/bb-includes/functions.bb-l10n.php +490 -0
  202. bp-forums/bbpress/bb-includes/functions.bb-meta.php +932 -0
  203. bp-forums/bbpress/bb-includes/functions.bb-pluggable.php +931 -0
  204. bp-forums/bbpress/bb-includes/functions.bb-posts.php +512 -0
  205. bp-forums/bbpress/bb-includes/functions.bb-script-loader.php +100 -0
  206. bp-forums/bbpress/bb-includes/functions.bb-statistics.php +250 -0
  207. bp-forums/bbpress/bb-includes/functions.bb-template.php +3527 -0
  208. bp-forums/bbpress/bb-includes/functions.bb-topic-tags.php +490 -0
  209. bp-forums/bbpress/bb-includes/functions.bb-topics.php +453 -0
  210. bp-forums/bbpress/bb-includes/functions.bb-users.php +440 -0
  211. bp-forums/bbpress/bb-includes/js/jquery/hoverIntent.js +128 -0
  212. bp-forums/bbpress/bb-includes/js/jquery/interface.js +12 -0
  213. bp-forums/bbpress/bb-includes/js/jquery/jquery.color.js +128 -0
  214. bp-forums/bbpress/bb-includes/js/jquery/jquery.js +33 -0
  215. bp-forums/bbpress/bb-includes/js/jquery/password-strength-meter.js +80 -0
  216. bp-core/js/account-admin.js → bp-forums/bbpress/bb-includes/js/profile-edit.js +3 -29
  217. bp-forums/bbpress/bb-includes/js/topic.js +60 -0
  218. bp-forums/bbpress/bb-includes/js/wp-ajax-response.js +64 -0
  219. bp-forums/bbpress/bb-includes/js/wp-lists.js +372 -0
  220. bp-forums/bbpress/bb-load.php +182 -0
  221. bp-forums/bbpress/bb-login.php +104 -0
  222. bp-forums/bbpress/bb-plugins/akismet.php +492 -0
  223. bp-forums/bbpress/bb-plugins/bozo.php +373 -0
  224. bp-forums/bbpress/bb-plugins/hello.php +84 -0
  225. bp-forums/bbpress/bb-plugins/readme.txt +3 -0
  226. bp-forums/bbpress/bb-post.php +61 -0
  227. bp-forums/bbpress/bb-reset-password.php +24 -0
  228. bp-forums/bbpress/bb-settings.php +1219 -0
  229. bp-forums/bbpress/bb-templates/kakumei-blue/images/page_header_bblogo.png +0 -0
  230. bp-forums/bbpress/bb-templates/kakumei-blue/screenshot.png +0 -0
  231. bp-forums/bbpress/bb-templates/kakumei-blue/style-rtl.css +1 -0
  232. bp-forums/bbpress/bb-templates/kakumei-blue/style.css +29 -0
  233. bp-forums/bbpress/bb-templates/kakumei/404.php +9 -0
  234. bp-forums/bbpress/bb-templates/kakumei/edit-form.php +19 -0
  235. bp-forums/bbpress/bb-templates/kakumei/edit-post.php +6 -0
  236. bp-forums/bbpress/bb-templates/kakumei/favorites.php +54 -0
  237. bp-forums/bbpress/bb-templates/kakumei/footer.php +22 -0
  238. bp-forums/bbpress/bb-templates/kakumei/forum.php +67 -0
  239. bp-forums/bbpress/bb-templates/kakumei/front-page.php +90 -0
  240. bp-forums/bbpress/bb-templates/kakumei/header.php +40 -0
  241. bp-forums/bbpress/bb-templates/kakumei/images/feed-icon-16x16.gif +0 -0
  242. bp-forums/bbpress/bb-templates/kakumei/images/page-links-background.gif +0 -0
  243. bp-forums/bbpress/bb-templates/kakumei/images/page_header_bblogo.png +0 -0
  244. bp-forums/bbpress/bb-templates/kakumei/images/page_header_tile.png +0 -0
  245. bp-forums/bbpress/bb-templates/kakumei/logged-in.php +5 -0
  246. bp-forums/bbpress/bb-templates/kakumei/login-form.php +33 -0
  247. bp-forums/bbpress/bb-templates/kakumei/login.php +75 -0
  248. bp-forums/bbpress/bb-templates/kakumei/password-reset.php +20 -0
  249. bp-forums/bbpress/bb-templates/kakumei/post-form.php +29 -0
  250. bp-forums/bbpress/bb-templates/kakumei/post.php +13 -0
  251. bp-forums/bbpress/bb-templates/kakumei/profile-base.php +8 -0
  252. bp-forums/bbpress/bb-templates/kakumei/profile-edit.php +36 -0
  253. bp-forums/bbpress/bb-templates/kakumei/profile.php +87 -0
  254. bp-forums/bbpress/bb-templates/kakumei/register-success.php +9 -0
  255. bp-forums/bbpress/bb-templates/kakumei/register.php +83 -0
  256. bp-forums/bbpress/bb-templates/kakumei/rss2.php +37 -0
  257. bp-forums/bbpress/bb-templates/kakumei/screenshot.png +0 -0
  258. bp-forums/bbpress/bb-templates/kakumei/search-form.php +7 -0
  259. bp-forums/bbpress/bb-templates/kakumei/search.php +45 -0
  260. bp-forums/bbpress/bb-templates/kakumei/stats.php +21 -0
  261. bp-forums/bbpress/bb-templates/kakumei/style-rtl.css +189 -0
  262. bp-forums/bbpress/bb-templates/kakumei/style.css +996 -0
  263. bp-forums/bbpress/bb-templates/kakumei/tag-single.php +41 -0
  264. bp-forums/bbpress/bb-templates/kakumei/tags.php +11 -0
  265. bp-forums/bbpress/bb-templates/kakumei/topic-tags.php +16 -0
  266. bp-forums/bbpress/bb-templates/kakumei/topic.php +57 -0
  267. bp-forums/bbpress/bb-templates/kakumei/view.php +44 -0
  268. bp-forums/bbpress/bb-templates/readme.txt +3 -0
  269. bp-forums/bbpress/edit.php +28 -0
  270. bp-forums/bbpress/favorites.php +49 -0
  271. bp-forums/bbpress/forum.php +26 -0
  272. bp-forums/bbpress/index.php +24 -0
  273. {bp-themes/bpskeletonmember → bp-forums/bbpress}/license.txt +62 -4
  274. bp-forums/bbpress/page.php +3 -0
  275. bp-forums/bbpress/profile-base.php +19 -0
  276. bp-forums/bbpress/profile-edit.php +175 -0
  277. bp-forums/bbpress/profile.php +31 -0
  278. bp-forums/bbpress/readme.txt +22 -0
  279. bp-forums/bbpress/register.php +72 -0
  280. bp-forums/bbpress/rss.php +203 -0
  281. bp-forums/bbpress/search.php +37 -0
  282. bp-forums/bbpress/statistics.php +13 -0
  283. bp-forums/bbpress/tag-add.php +25 -0
  284. bp-forums/bbpress/tag-remove.php +27 -0
  285. bp-forums/bbpress/tags.php +22 -0
  286. bp-forums/bbpress/topic.php +49 -0
  287. bp-forums/bbpress/view.php +28 -0
  288. bp-forums/bbpress/xmlrpc.php +4087 -0
  289. bp-forums/bp-forums-admin.php +231 -103
  290. bp-forums/bp-forums-bbpress-live.php +0 -683
  291. bp-forums/bp-forums-bbpress.php +174 -0
  292. bp-forums/bp-forums-filters.php +15 -24
  293. bp-forums/bp-forums-templatetags.php +459 -63
  294. bp-forums/deprecated/images/closed.png +0 -0
  295. bp-forums/installation-readme.txt +0 -73
  296. bp-friends.php +112 -124
  297. bp-friends/bp-friends-ajax.php +0 -41
  298. bp-friends/bp-friends-classes.php +4 -1
  299. bp-friends/bp-friends-cssjs.php +0 -22
  300. bp-friends/bp-friends-notifications.php +7 -8
  301. bp-friends/bp-friends-templatetags.php +38 -28
  302. bp-friends/deprecated/bp-friends-deprecated.php +102 -0
  303. bp-friends/{css → deprecated/css}/structure.css +0 -0
  304. bp-friends/{images → deprecated/images}/ajax-loader.gif +0 -0
  305. bp-friends/{js → deprecated/js}/general.js +0 -0
  306. bp-groups.php +1417 -1085
  307. bp-groups/bp-groups-ajax.php +0 -271
  308. bp-groups/bp-groups-classes.php +240 -108
  309. bp-groups/bp-groups-cssjs.php +0 -36
  310. bp-groups/bp-groups-filters.php +46 -0
  311. bp-groups/bp-groups-notifications.php +32 -36
  312. bp-groups/bp-groups-templatetags.php +711 -557
  313. bp-groups/bp-groups-widgets.php +65 -6
  314. bp-groups/css/widget-groups.css +0 -21
  315. bp-groups/deprecated/bp-groups-deprecated.php +842 -0
  316. bp-groups/{css → deprecated/css}/structure.css +4 -4
  317. bp-groups/{images → deprecated/images}/ajax-loader.gif +0 -0
  318. bp-groups/{images → deprecated/images}/none-thumbnail.gif +0 -0
  319. bp-groups/{images → deprecated/images}/none.gif +0 -0
  320. bp-groups/{js → deprecated/js}/directory-groups.js +0 -0
  321. bp-groups/{js → deprecated/js}/general.js +1 -2
  322. bp-groups/js/widget-groups.js +2 -3
  323. bp-languages/buddypress.pot +8297 -2384
  324. bp-loader.php +6 -2
  325. bp-messages.php +207 -236
  326. bp-messages/bp-messages-ajax.php +0 -113
  327. bp-messages/bp-messages-classes.php +31 -24
  328. bp-messages/bp-messages-cssjs.php +12 -21
  329. bp-messages/bp-messages-filters.php +13 -6
  330. bp-messages/bp-messages-notifications.php +41 -42
  331. bp-messages/bp-messages-templatetags.php +234 -26
  332. bp-messages/css/autocomplete/jquery.autocompletefb.css +2 -0
  333. bp-messages/deprecated/bp-messages-deprecated.php +305 -0
  334. bp-messages/{css → deprecated/css}/structure.css +0 -0
  335. bp-messages/{images → deprecated/images}/ajax-loader.gif +0 -0
  336. bp-messages/{images → deprecated/images}/email.gif +0 -0
  337. bp-messages/{images → deprecated/images}/email_draft.gif +0 -0
  338. bp-messages/{images → deprecated/images}/email_open.gif +0 -0
  339. bp-messages/{images → deprecated/images}/email_sent.gif +0 -0
  340. bp-messages/{images → deprecated/images}/loading.gif +0 -0
  341. bp-messages/{images → deprecated/images}/nav_bullet.gif +0 -0
  342. bp-messages/{images → deprecated/images}/warning.gif +0 -0
  343. bp-messages/{js → deprecated/js}/general.js +0 -0
  344. bp-messages/js/autocomplete/jquery.autocomplete.js +2 -2
  345. bp-status.php +167 -0
  346. bp-status/bp-status-filters.php +20 -0
  347. bp-status/bp-status-templatetags.php +112 -0
  348. bp-xprofile/css/signup.css → bp-status/bp-status-widgets.php +0 -0
  349. bp-themes/bp-default/_inc/css/adminbar.css +146 -0
  350. bp-themes/bp-default/_inc/css/screen.css +2281 -0
  351. bp-themes/{bpmember → bp-default/_inc}/images/accept_button.gif +0 -0
  352. bp-themes/bp-default/_inc/images/accept_button_side.gif +0 -0
  353. bp-themes/{bpmember → bp-default/_inc}/images/activity_bullet.gif +0 -0
  354. bp-themes/bp-default/_inc/images/add_button_side.gif +0 -0
  355. bp-themes/{bpmember → bp-default/_inc}/images/add_friend_button.gif +0 -0
  356. bp-themes/{bpmember → bp-default/_inc}/images/add_friend_icon.gif +0 -0
  357. bp-themes/bp-default/_inc/images/admin-menu-arrow.gif +0 -0
  358. bp-themes/bp-default/_inc/images/admin_bar_back.gif +0 -0
  359. bp-themes/bp-default/_inc/images/admin_bar_logo.gif +0 -0
  360. bp-themes/bp-default/_inc/images/admin_menu_icon.png +0 -0
  361. bp-themes/bp-default/_inc/images/ajax-loader.gif +0 -0
  362. bp-themes/{bpmember → bp-default/_inc}/images/arrowback_icon.gif +0 -0
  363. bp-themes/{bpmember → bp-default/_inc}/images/background.gif +0 -0
  364. bp-themes/{bpmember → bp-default/_inc}/images/background_blog.gif +0 -0
  365. bp-themes/bp-default/_inc/images/blog.png +0 -0
  366. bp-themes/{bphome → bp-default/_inc}/images/blog_bullet.gif +0 -0
  367. bp-themes/{bpmember → bp-default/_inc}/images/blogadmin_icon.gif +0 -0
  368. bp-themes/{bphome → bp-default/_inc}/images/bp_logo.gif +0 -0
  369. bp-themes/{bphome → bp-default/_inc}/images/button_back.gif +0 -0
  370. bp-themes/{bphome → bp-default/_inc}/images/centercol_header_back.gif +0 -0
  371. bp-themes/bp-default/_inc/images/check_button_side.gif +0 -0
  372. bp-themes/bp-default/_inc/images/closed.png +0 -0
  373. bp-themes/{bphome → bp-default/_inc}/images/comments_icon.gif +0 -0
  374. bp-themes/{bpmember → bp-default/_inc}/images/content_back.gif +0 -0
  375. bp-themes/{bpmember → bp-default/_inc}/images/content_header.gif +0 -0
  376. bp-themes/{bphome → bp-default/_inc}/images/create_account_button.gif +0 -0
  377. bp-themes/{bpmember → bp-default/_inc}/images/cross_bullet.gif +0 -0
  378. bp-themes/{bphome → bp-default/_inc}/images/error_back.gif +0 -0
  379. bp-themes/{bphome → bp-default/_inc}/images/error_icon.gif +0 -0
  380. bp-themes/{bpmember → bp-default/_inc}/images/forum_bullet.gif +0 -0
  381. bp-themes/{bphome → bp-default/_inc}/images/friends_bullet.gif +0 -0
  382. bp-themes/bp-default/_inc/images/group_header.gif +0 -0
  383. bp-themes/{bphome → bp-default/_inc}/images/groups_bullet.gif +0 -0
  384. bp-themes/{bphome → bp-default/_inc}/images/info_icon.gif +0 -0
  385. bp-themes/{bpmember → bp-default/_inc}/images/invite_bullet.gif +0 -0
  386. bp-themes/{bphome → bp-default/_inc}/images/item_list_back.gif +0 -0
  387. bp-themes/bp-default/_inc/images/leftcol_header_back.gif +0 -0
  388. bp-themes/{bpmember → bp-default/_inc}/images/leftmenu_group_header.gif +0 -0
  389. bp-themes/bp-default/_inc/images/loading_button_side.gif +0 -0
  390. bp-themes/{bphome → bp-default/_inc}/images/logo.gif +0 -0
  391. bp-themes/{bpmember → bp-default/_inc}/images/logout_bullet.gif +0 -0
  392. bp-themes/bp-default/_inc/images/member.png +0 -0
  393. bp-themes/{bpmember → bp-default/_inc}/images/message_thread_back.gif +0 -0
  394. bp-themes/{bpmember → bp-default/_inc}/images/message_thread_unread_back.gif +0 -0
  395. bp-themes/{bpmember → bp-default/_inc}/images/messages_bullet.gif +0 -0
  396. bp-themes/bp-default/_inc/images/mystery-man.jpg +0 -0
  397. bp-themes/{bpmember/images/blog_bullet.gif → bp-default/_inc/images/nav_bullet.gif} +0 -0
  398. bp-themes/{bpmember → bp-default/_inc}/images/navitem_selected_back.gif +0 -0
  399. bp-themes/{bpmember → bp-default/_inc}/images/notice_back.gif +0 -0
  400. bp-themes/{bpmember → bp-default/_inc}/images/optionnavitem_selected_back.gif +0 -0
  401. bp-themes/{bpmember → bp-default/_inc}/images/optionsbar_header_arrow.gif +0 -0
  402. bp-themes/{bpmember → bp-default/_inc}/images/optionsbar_header_noarrow.gif +0 -0
  403. bp-themes/{bphome → bp-default/_inc}/images/profile_bullet.gif +0 -0
  404. bp-themes/{bphome → bp-default/_inc}/images/quotes_background.gif +0 -0
  405. bp-themes/{bpmember → bp-default/_inc}/images/reject_button.gif +0 -0
  406. bp-themes/bp-default/_inc/images/reject_button_side.gif +0 -0
  407. bp-themes/bp-default/_inc/images/remove_button_side.gif +0 -0
  408. bp-themes/{bpmember → bp-default/_inc}/images/remove_friend_button.gif +0 -0
  409. bp-themes/{bpmember → bp-default/_inc}/images/request_bullet.gif +0 -0
  410. bp-themes/{bpmember → bp-default/_inc}/images/requested_friend_button.gif +0 -0
  411. bp-themes/bp-default/_inc/images/rightcol_header_back.gif +0 -0
  412. bp-themes/{bpmember → bp-default/_inc}/images/rss.png +0 -0
  413. bp-themes/{bpmember → bp-default/_inc}/images/settings_bullet.gif +0 -0
  414. bp-themes/{bpmember → bp-default/_inc}/images/sidebar_header.gif +0 -0
  415. bp-themes/bp-default/_inc/images/status_bullet.gif +0 -0
  416. bp-themes/{bphome → bp-default/_inc}/images/tag_icon.gif +0 -0
  417. bp-themes/{bpmember → bp-default/_inc}/images/topoption_selected_back.gif +0 -0
  418. bp-themes/{bpmember → bp-default/_inc}/images/updated_back.gif +0 -0
  419. bp-themes/{bpmember → bp-default/_inc}/images/updated_icon.gif +0 -0
  420. bp-themes/{bpmember → bp-default/_inc}/images/userbar_header.gif +0 -0
  421. bp-themes/{bpmember → bp-default/_inc}/images/userbar_selected_arrow.gif +0 -0
  422. bp-themes/{bphome → bp-default/_inc}/images/view_button_side.gif +0 -0
  423. bp-themes/bp-default/_inc/images/welcome_header_back.gif +0 -0
  424. bp-themes/{bphome → bp-default/_inc}/images/wire_bullet.gif +0 -0
  425. bp-themes/{bphome → bp-default}/screenshot.png +0 -0
  426. bp-themes/bp-default/style.css +27 -0
  427. bp-themes/bp-sn-parent/404.php +27 -0
  428. bp-themes/bp-sn-parent/_inc/ajax.php +456 -0
  429. bp-themes/bp-sn-parent/_inc/css/adminbar.css +138 -0
  430. bp-themes/bp-sn-parent/_inc/css/components.css +550 -0
  431. bp-themes/bp-sn-parent/_inc/css/fonts/12px.css +292 -0
  432. bp-themes/bp-sn-parent/_inc/css/fonts/14px.css +292 -0
  433. bp-themes/bp-sn-parent/_inc/css/fonts/18px.css +292 -0
  434. bp-themes/bp-sn-parent/_inc/css/fonts/20px.css +292 -0
  435. bp-themes/bp-sn-parent/_inc/css/fonts/22px.css +292 -0
  436. bp-themes/bp-sn-parent/_inc/css/layout/blog-dir-pages/2c-center.css +10 -0
  437. bp-themes/bp-sn-parent/_inc/css/layout/blog-dir-pages/2c-left.css +18 -0
  438. bp-themes/bp-sn-parent/_inc/css/layout/blog-dir-pages/2c-right.css +18 -0
  439. bp-themes/bp-sn-parent/_inc/css/layout/home-page/1c.css +3 -0
  440. bp-themes/bp-sn-parent/_inc/css/layout/home-page/2c-center.css +11 -0
  441. bp-themes/bp-sn-parent/_inc/css/layout/home-page/2c-left.css +11 -0
  442. bp-themes/bp-sn-parent/_inc/css/layout/home-page/2c-right.css +11 -0
  443. bp-themes/bp-sn-parent/_inc/css/layout/home-page/3c-center.css +16 -0
  444. bp-themes/bp-sn-parent/_inc/css/layout/home-page/3c-left.css +15 -0
  445. bp-themes/bp-sn-parent/_inc/css/layout/home-page/3c-right.css +15 -0
  446. bp-themes/bp-sn-parent/_inc/css/layout/internal-pages/1c.css +27 -0
  447. bp-themes/bp-sn-parent/_inc/css/layout/internal-pages/2c-left.css +36 -0
  448. bp-themes/bp-sn-parent/_inc/css/layout/internal-pages/2c-right.css +36 -0
  449. bp-themes/bp-sn-parent/_inc/css/layout/internal-pages/3c-left.css +19 -0
  450. bp-themes/bp-sn-parent/_inc/css/layout/internal-pages/3c-right.css +19 -0
  451. bp-themes/bp-sn-parent/_inc/css/screen.css +155 -0
  452. bp-themes/bp-sn-parent/_inc/images/admin_bar_logo.gif +0 -0
  453. bp-themes/bp-sn-parent/_inc/images/ajax-loader.gif +0 -0
  454. bp-themes/bp-sn-parent/_inc/images/closed_topic.png +0 -0
  455. bp-themes/bp-sn-parent/_inc/images/mystery-man.jpg +0 -0
  456. bp-themes/bp-sn-parent/_inc/js/ajax.js +1165 -0
  457. bp-themes/bp-sn-parent/_inc/js/jquery-livequery.js +9 -0
  458. bp-themes/bp-sn-parent/activity/just-me.php +73 -0
  459. bp-themes/bp-sn-parent/activity/my-friends.php +74 -0
  460. bp-themes/bp-sn-parent/archive.php +65 -0
  461. bp-themes/bp-sn-parent/attachment.php +47 -0
  462. bp-themes/bp-sn-parent/blogs/create.php +32 -0
  463. bp-themes/bp-sn-parent/blogs/my-blogs.php +44 -0
  464. bp-themes/bp-sn-parent/blogs/recent-comments.php +45 -0
  465. bp-themes/bp-sn-parent/blogs/recent-posts.php +49 -0
  466. bp-themes/bp-sn-parent/comments.php +136 -0
  467. bp-themes/{bpmember → bp-sn-parent}/directories/blogs/blogs-loop.php +16 -8
  468. bp-themes/bp-sn-parent/directories/blogs/index.php +130 -0
  469. bp-themes/bp-sn-parent/directories/forums/forums-loop.php +69 -0
  470. bp-themes/bp-sn-parent/directories/forums/index.php +121 -0
  471. bp-themes/{bpmember → bp-sn-parent}/directories/groups/groups-loop.php +18 -10
  472. bp-themes/bp-sn-parent/directories/groups/index.php +138 -0
  473. bp-themes/bp-sn-parent/directories/members/index.php +125 -0
  474. bp-themes/{bpmember → bp-sn-parent}/directories/members/members-loop.php +15 -7
  475. bp-themes/bp-sn-parent/footer.php +21 -0
  476. bp-themes/bp-sn-parent/friends/friends-loop.php +74 -0
  477. bp-themes/bp-sn-parent/friends/index.php +31 -0
  478. bp-themes/bp-sn-parent/friends/requests.php +65 -0
  479. bp-themes/bp-sn-parent/functions.php +70 -0
  480. bp-themes/bp-sn-parent/groups/create.php +241 -0
  481. bp-themes/bp-sn-parent/groups/group-loop.php +75 -0
  482. bp-themes/bp-sn-parent/groups/index.php +29 -0
  483. bp-themes/bp-sn-parent/groups/invites.php +62 -0
  484. bp-themes/bp-sn-parent/groups/single/admin.php +341 -0
  485. bp-themes/bp-sn-parent/groups/single/forum/edit.php +100 -0
  486. bp-themes/{bpmember/groups → bp-sn-parent/groups/single}/forum/index.php +31 -26
  487. bp-themes/bp-sn-parent/groups/single/forum/topic.php +123 -0
  488. bp-themes/bp-sn-parent/groups/single/home.php +201 -0
  489. bp-themes/bp-sn-parent/groups/single/leave-confirm.php +50 -0
  490. bp-themes/bp-sn-parent/groups/single/members.php +121 -0
  491. bp-themes/bp-sn-parent/groups/single/menu.php +33 -0
  492. bp-themes/bp-sn-parent/groups/single/request-membership.php +56 -0
  493. bp-themes/bp-sn-parent/groups/single/send-invite.php +102 -0
  494. bp-themes/bp-sn-parent/groups/single/wire.php +41 -0
  495. bp-themes/bp-sn-parent/header.php +120 -0
  496. bp-themes/bp-sn-parent/home.php +44 -0
  497. bp-themes/bp-sn-parent/index.php +58 -0
  498. bp-themes/bp-sn-parent/links.php +27 -0
  499. bp-themes/bp-sn-parent/messages/compose.php +51 -0
  500. bp-themes/bp-sn-parent/messages/index.php +76 -0
  501. bp-themes/bp-sn-parent/messages/notices.php +67 -0
  502. bp-themes/bp-sn-parent/messages/sentbox.php +69 -0
  503. bp-themes/bp-sn-parent/messages/view.php +110 -0
  504. bp-themes/bp-sn-parent/optionsbar.php +25 -0
  505. bp-themes/bp-sn-parent/page.php +36 -0
  506. bp-themes/bp-sn-parent/plugin-template.php +13 -0
  507. bp-themes/bp-sn-parent/profile/change-avatar.php +76 -0
  508. bp-themes/bp-sn-parent/profile/edit.php +127 -0
  509. bp-themes/bp-sn-parent/profile/index.php +150 -0
  510. bp-themes/bp-sn-parent/profile/profile-header.php +17 -0
  511. bp-themes/bp-sn-parent/profile/profile-loop.php +64 -0
  512. bp-themes/bp-sn-parent/profile/profile-menu.php +23 -0
  513. bp-themes/bp-sn-parent/registration/activate.php +55 -0
  514. bp-themes/bp-sn-parent/registration/register.php +292 -0
  515. bp-themes/bp-sn-parent/screenshot.png +0 -0
  516. bp-themes/{bphome → bp-sn-parent}/search.php +17 -4
  517. bp-themes/bp-sn-parent/searchform.php +10 -0
  518. bp-themes/bp-sn-parent/sidebar.php +18 -0
  519. bp-themes/bp-sn-parent/single.php +54 -0
  520. bp-themes/bp-sn-parent/status/post-form.php +20 -0
  521. bp-themes/bp-sn-parent/style.css +22 -0
  522. bp-themes/bp-sn-parent/userbar.php +49 -0
  523. bp-themes/bp-sn-parent/wire/latest.php +30 -0
  524. bp-themes/bp-sn-parent/wire/post-form.php +49 -0
  525. bp-themes/bp-sn-parent/wire/post-list.php +76 -0
  526. bp-themes/bphome/404.php +0 -40
  527. bp-themes/bphome/activate.php +0 -25
  528. bp-themes/bphome/archive.php +0 -69
  529. bp-themes/bphome/archives.php +0 -25
  530. bp-themes/bphome/attachment.php +0 -33
  531. bp-themes/bphome/comments-popup.php +0 -116
  532. bp-themes/bphome/comments.php +0 -112
  533. bp-themes/bphome/css/base.css +0 -824
  534. bp-themes/bphome/css/custom-sample.css +0 -4
  535. bp-themes/bphome/css/ie/ie6.css +0 -35
  536. bp-themes/bphome/css/ie/ie7.css +0 -31
  537. bp-themes/bphome/css/site-wide-sample.css +0 -10
  538. bp-themes/bphome/footer.php +0 -12
  539. bp-themes/bphome/functions.php +0 -92
  540. bp-themes/bphome/header.php +0 -64
  541. bp-themes/bphome/home.php +0 -39
  542. bp-themes/bphome/images/leftcol_header_back.gif +0 -0
  543. bp-themes/bphome/images/rightcol_header_back.gif +0 -0
  544. bp-themes/bphome/images/welcome_header_back.gif +0 -0
  545. bp-themes/bphome/index.php +0 -44
  546. bp-themes/bphome/links.php +0 -18
  547. bp-themes/bphome/page.php +0 -23
  548. bp-themes/bphome/plugin-sidebar.php +0 -3
  549. bp-themes/bphome/plugin-template.php +0 -7
  550. bp-themes/bphome/register.php +0 -37
  551. bp-themes/bphome/rtl.css +0 -63
  552. bp-themes/bphome/searchform.php +0 -5
  553. bp-themes/bphome/sidebar.php +0 -10
  554. bp-themes/bphome/single.php +0 -40
  555. bp-themes/bphome/style.css +0 -24
  556. bp-themes/bpmember/404.php +0 -12
  557. bp-themes/bpmember/activity/just-me.php +0 -60
  558. bp-themes/bpmember/activity/my-friends.php +0 -54
  559. bp-themes/bpmember/blogs/create.php +0 -26
  560. bp-themes/bpmember/blogs/my-blogs.php +0 -30
  561. bp-themes/bpmember/blogs/recent-comments.php +0 -31
  562. bp-themes/bpmember/blogs/recent-posts.php +0 -31
  563. bp-themes/bpmember/css/base.css +0 -567
  564. bp-themes/bpmember/css/components.css +0 -482
  565. bp-themes/bpmember/css/custom-components/readme.txt +0 -2
  566. bp-themes/bpmember/css/custom-sample.css +0 -4
  567. bp-themes/bpmember/css/directories.css +0 -158
  568. bp-themes/bpmember/css/ie/ie6.css +0 -78
  569. bp-themes/bpmember/css/ie/ie7.css +0 -11
  570. bp-themes/bpmember/css/loader.php +0 -26
  571. bp-themes/bpmember/css/settings.css +0 -44
  572. bp-themes/bpmember/directories/blogs/index.php +0 -108
  573. bp-themes/bpmember/directories/groups/index.php +0 -115
  574. bp-themes/bpmember/directories/members/index.php +0 -106
  575. bp-themes/bpmember/footer.php +0 -11
  576. bp-themes/bpmember/friends/friends-loop.php +0 -42
  577. bp-themes/bpmember/friends/index.php +0 -23
  578. bp-themes/bpmember/friends/requests.php +0 -46
  579. bp-themes/bpmember/functions.php +0 -21
  580. bp-themes/bpmember/groups/admin/delete-group.php +0 -34
  581. bp-themes/bpmember/groups/admin/edit-details.php +0 -45
  582. bp-themes/bpmember/groups/admin/group-avatar.php +0 -36
  583. bp-themes/bpmember/groups/admin/group-settings.php +0 -90
  584. bp-themes/bpmember/groups/admin/manage-members.php +0 -76
  585. bp-themes/bpmember/groups/admin/membership-requests.php +0 -51
  586. bp-themes/bpmember/groups/create.php +0 -17
  587. bp-themes/bpmember/groups/forum/topic.php +0 -92
  588. bp-themes/bpmember/groups/group-home.php +0 -77
  589. bp-themes/bpmember/groups/group-loop.php +0 -45
  590. bp-themes/bpmember/groups/group-menu.php +0 -21
  591. bp-themes/bpmember/groups/index.php +0 -24
  592. bp-themes/bpmember/groups/leave-group-confirm.php +0 -38
  593. bp-themes/bpmember/groups/list-invites.php +0 -51
  594. bp-themes/bpmember/groups/list-members.php +0 -84
  595. bp-themes/bpmember/groups/request-membership.php +0 -46
  596. bp-themes/bpmember/groups/send-invite.php +0 -39
  597. bp-themes/bpmember/groups/wire.php +0 -37
  598. bp-themes/bpmember/header.php +0 -64
  599. bp-themes/bpmember/images/button_back.gif +0 -0
  600. bp-themes/bpmember/images/comments_icon.gif +0 -0
  601. bp-themes/bpmember/images/error_back.gif +0 -0
  602. bp-themes/bpmember/images/error_icon.gif +0 -0
  603. bp-themes/bpmember/images/friends_bullet.gif +0 -0
  604. bp-themes/bpmember/images/group_header.gif +0 -0
  605. bp-themes/bpmember/images/groups_bullet.gif +0 -0
  606. bp-themes/bpmember/images/info_icon.gif +0 -0
  607. bp-themes/bpmember/images/leftcol_header_back.gif +0 -0
  608. bp-themes/bpmember/images/logo.gif +0 -0
  609. bp-themes/bpmember/images/profile_bullet.gif +0 -0
  610. bp-themes/bpmember/images/quotes_background.gif +0 -0
  611. bp-themes/bpmember/images/rightcol_header_back.gif +0 -0
  612. bp-themes/bpmember/images/tag_icon.gif +0 -0
  613. bp-themes/bpmember/images/view_button_side.gif +0 -0
  614. bp-themes/bpmember/images/wire_bullet.gif +0 -0
  615. bp-themes/bpmember/index.php +0 -5
  616. bp-themes/bpmember/messages/compose.php +0 -51
  617. bp-themes/bpmember/messages/index.php +0 -57
  618. bp-themes/bpmember/messages/notices.php +0 -49
  619. bp-themes/bpmember/messages/sentbox.php +0 -50
  620. bp-themes/bpmember/messages/view.php +0 -13
  621. bp-themes/bpmember/optionsbar.php +0 -40
  622. bp-themes/bpmember/plugin-template.php +0 -13
  623. bp-themes/bpmember/profile/change-avatar.php +0 -15
  624. bp-themes/bpmember/profile/edit.php +0 -19
  625. bp-themes/bpmember/profile/index.php +0 -82
  626. bp-themes/bpmember/profile/profile-header.php +0 -7
  627. bp-themes/bpmember/profile/profile-loop.php +0 -41
  628. bp-themes/bpmember/screenshot.png +0 -0
  629. bp-themes/bpmember/style.css +0 -10
  630. bp-themes/bpmember/userbar.php +0 -48
  631. bp-themes/bpmember/wire/latest.php +0 -36
  632. bp-themes/bpmember/wire/post-form.php +0 -27
  633. bp-themes/bpmember/wire/post-list.php +0 -46
  634. bp-themes/bpskeletonmember/404.php +0 -20
  635. bp-themes/bpskeletonmember/README.txt +0 -51
  636. bp-themes/bpskeletonmember/activity/activity-list.php +0 -36
  637. bp-themes/bpskeletonmember/activity/just-me.php +0 -54
  638. bp-themes/bpskeletonmember/activity/my-friends.php +0 -49
  639. bp-themes/bpskeletonmember/blogs/create.php +0 -35
  640. bp-themes/bpskeletonmember/blogs/my-blogs.php +0 -47
  641. bp-themes/bpskeletonmember/blogs/recent-comments.php +0 -52
  642. bp-themes/bpskeletonmember/blogs/recent-posts.php +0 -51
  643. bp-themes/bpskeletonmember/css/activity.css +0 -11
  644. bp-themes/bpskeletonmember/css/base.css +0 -104
  645. bp-themes/bpskeletonmember/css/blogs.css +0 -20
  646. bp-themes/bpskeletonmember/css/directories.css +0 -13
  647. bp-themes/bpskeletonmember/css/friends.css +0 -16
  648. bp-themes/bpskeletonmember/css/groups.css +0 -126
  649. bp-themes/bpskeletonmember/css/messages.css +0 -42
  650. bp-themes/bpskeletonmember/css/profile.css +0 -21
  651. bp-themes/bpskeletonmember/css/wire.css +0 -15
  652. bp-themes/bpskeletonmember/directories/blogs/blogs-loop.php +0 -62
  653. bp-themes/bpskeletonmember/directories/blogs/index.php +0 -120
  654. bp-themes/bpskeletonmember/directories/groups/groups-loop.php +0 -62
  655. bp-themes/bpskeletonmember/directories/groups/index.php +0 -127
  656. bp-themes/bpskeletonmember/directories/members/index.php +0 -119
  657. bp-themes/bpskeletonmember/directories/members/members-loop.php +0 -56
  658. bp-themes/bpskeletonmember/footer.php +0 -18
  659. bp-themes/bpskeletonmember/friends/friends-loop.php +0 -48
  660. bp-themes/bpskeletonmember/friends/index.php +0 -36
  661. bp-themes/bpskeletonmember/friends/requests.php +0 -58
  662. bp-themes/bpskeletonmember/functions.php +0 -31
  663. bp-themes/bpskeletonmember/groups/admin/delete-group.php +0 -45
  664. bp-themes/bpskeletonmember/groups/admin/edit-details.php +0 -58
  665. bp-themes/bpskeletonmember/groups/admin/group-avatar.php +0 -47
  666. bp-themes/bpskeletonmember/groups/admin/group-settings.php +0 -109
  667. bp-themes/bpskeletonmember/groups/admin/manage-members.php +0 -99
  668. bp-themes/bpskeletonmember/groups/admin/membership-requests.php +0 -64
  669. bp-themes/bpskeletonmember/groups/create.php +0 -30
  670. bp-themes/bpskeletonmember/groups/forum/index.php +0 -111
  671. bp-themes/bpskeletonmember/groups/forum/topic.php +0 -101
  672. bp-themes/bpskeletonmember/groups/group-home.php +0 -94
  673. bp-themes/bpskeletonmember/groups/group-loop.php +0 -61
  674. bp-themes/bpskeletonmember/groups/group-menu.php +0 -40
  675. bp-themes/bpskeletonmember/groups/index.php +0 -37
  676. bp-themes/bpskeletonmember/groups/leave-group-confirm.php +0 -43
  677. bp-themes/bpskeletonmember/groups/list-invites.php +0 -60
  678. bp-themes/bpskeletonmember/groups/list-members.php +0 -101
  679. bp-themes/bpskeletonmember/groups/request-membership.php +0 -57
  680. bp-themes/bpskeletonmember/groups/send-invite.php +0 -45
  681. bp-themes/bpskeletonmember/groups/wire.php +0 -46
  682. bp-themes/bpskeletonmember/header.php +0 -68
  683. bp-themes/bpskeletonmember/index.php +0 -5
  684. bp-themes/bpskeletonmember/messages/compose.php +0 -64
  685. bp-themes/bpskeletonmember/messages/index.php +0 -77
  686. bp-themes/bpskeletonmember/messages/notices.php +0 -61
  687. bp-themes/bpskeletonmember/messages/sentbox.php +0 -69
  688. bp-themes/bpskeletonmember/messages/view.php +0 -21
  689. bp-themes/bpskeletonmember/optionsbar.php +0 -34
  690. bp-themes/bpskeletonmember/plugin-template.php +0 -22
  691. bp-themes/bpskeletonmember/profile/change-avatar.php +0 -21
  692. bp-themes/bpskeletonmember/profile/edit.php +0 -36
  693. bp-themes/bpskeletonmember/profile/index.php +0 -88
  694. bp-themes/bpskeletonmember/profile/profile-header.php +0 -14
  695. bp-themes/bpskeletonmember/profile/profile-loop.php +0 -61
  696. bp-themes/bpskeletonmember/profile/profile-menu.php +0 -29
  697. bp-themes/bpskeletonmember/screenshot.png +0 -0
  698. bp-themes/bpskeletonmember/style.css +0 -26
  699. bp-themes/bpskeletonmember/userbar.php +0 -63
  700. bp-themes/bpskeletonmember/wire/latest.php +0 -32
  701. bp-themes/bpskeletonmember/wire/post-form.php +0 -42
  702. bp-themes/bpskeletonmember/wire/post-list.php +0 -61
  703. bp-themes/readme.txt +0 -32
  704. bp-wire.php +44 -55
  705. bp-wire/bp-wire-ajax.php +0 -49
  706. bp-wire/bp-wire-cssjs.php +0 -10
  707. bp-wire/bp-wire-filters.php +18 -2
  708. bp-wire/bp-wire-templatetags.php +14 -20
  709. bp-wire/deprecated/bp-wire-deprecated.php +101 -0
  710. bp-wire/{css → deprecated/css}/structure.css +0 -0
  711. bp-wire/{images → deprecated/images}/ajax-loader.gif +0 -0
  712. bp-xprofile.php +540 -351
  713. bp-xprofile/{css → admin/css}/admin.css +11 -0
  714. bp-xprofile/admin/images/move.gif +0 -0
  715. bp-xprofile/{images → admin/images}/tick.gif +0 -0
  716. bp-xprofile/{js → admin/js}/admin.js +32 -33
  717. bp-xprofile/bp-xprofile-admin.php +110 -65
  718. bp-xprofile/bp-xprofile-ajax.php +0 -11
  719. bp-xprofile/bp-xprofile-classes.php +208 -562
  720. bp-xprofile/bp-xprofile-cssjs.php +7 -46
  721. bp-xprofile/bp-xprofile-filters.php +11 -27
  722. bp-xprofile/bp-xprofile-notifications.php +5 -5
  723. bp-xprofile/bp-xprofile-signup.php +0 -387
  724. bp-xprofile/bp-xprofile-templatetags.php +351 -41
  725. bp-xprofile/deprecated/bp-xprofile-deprecated.php +779 -0
  726. bp-xprofile/{js/general.js → deprecated/css/signup.css} +0 -0
  727. bp-xprofile/{css → deprecated/css}/structure.css +9 -4
  728. bp-xprofile/{images → deprecated/images}/cross.gif +0 -0
  729. bp-xprofile/{images → deprecated/images}/nav_bullet.gif +0 -0
  730. bp-xprofile/{images → deprecated/images}/none-thumbnail.gif +0 -0
  731. bp-xprofile/{images → deprecated/images}/none.gif +0 -0
  732. bp-xprofile/deprecated/js/general.js +0 -0
  733. bp-xprofile/prebuilt-fields/countries.csv +0 -255
  734. bp-xprofile/prebuilt-fields/languages.csv +0 -156
  735. bp-xprofile/prebuilt-fields/states.csv +0 -68
  736. readme.txt +17 -11
bp-activity.php CHANGED
@@ -1,82 +1,37 @@
1
<?php
2
3
- define ( 'BP_ACTIVITY_DB_VERSION', '1300' );
4
5
/* Define the slug for the component */
6
if ( !defined( 'BP_ACTIVITY_SLUG' ) )
7
define ( 'BP_ACTIVITY_SLUG', 'activity' );
8
9
- /* How long before activity items in streams are re-cached? */
10
- if ( !defined( 'BP_ACTIVITY_CACHE_LENGTH' ) )
11
- define ( 'BP_ACTIVITY_CACHE_LENGTH', '6 HOURS' );
12
-
13
require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-classes.php' );
14
require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-templatetags.php' );
15
require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-widgets.php' );
16
- require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-cssjs.php' );
17
require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-filters.php' );
18
19
-
20
- /**************************************************************************
21
- bp_bp_activity_install()
22
-
23
- Sets up the component ready for use on a site installation.
24
- **************************************************************************/
25
-
26
function bp_activity_install() {
27
global $wpdb, $bp;
28
29
if ( !empty($wpdb->charset) )
30
$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
31
32
- $sql[] = "CREATE TABLE {$bp->activity->table_name_user_activity} (
33
- id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
34
- user_id bigint(20) NOT NULL,
35
- component_name varchar(75) NOT NULL,
36
- component_action varchar(75) NOT NULL,
37
- item_id bigint(20) NOT NULL,
38
- secondary_item_id bigint(20) NOT NULL,
39
- date_recorded datetime NOT NULL,
40
- is_private tinyint(1) NOT NULL DEFAULT 0,
41
- no_sitewide_cache tinyint(1) NOT NULL DEFAULT 0,
42
- KEY item_id (item_id),
43
- KEY user_id (user_id),
44
- KEY is_private (is_private),
45
- KEY component_name (component_name)
46
- ) {$charset_collate};";
47
-
48
- $sql[] = "CREATE TABLE {$bp->activity->table_name_user_activity_cached} (
49
id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
50
user_id bigint(20) NOT NULL,
51
component_name varchar(75) NOT NULL,
52
component_action varchar(75) NOT NULL,
53
content longtext NOT NULL,
54
primary_link varchar(150) NOT NULL,
55
- item_id bigint(20) NOT NULL,
56
- secondary_item_id bigint(20) NOT NULL,
57
- date_cached datetime NOT NULL,
58
- date_recorded datetime NOT NULL,
59
- is_private tinyint(1) NOT NULL DEFAULT 0,
60
- KEY date_cached (date_cached),
61
- KEY date_recorded (date_recorded),
62
- KEY is_private (is_private),
63
- KEY user_id (user_id),
64
- KEY item_id (item_id),
65
- KEY component_name (component_name)
66
- ) {$charset_collate};";
67
-
68
- $sql[] = "CREATE TABLE {$bp->activity->table_name_sitewide} (
69
- id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
70
- user_id bigint(20) NOT NULL,
71
- item_id bigint(20) NOT NULL,
72
- secondary_item_id bigint(20),
73
- content longtext NOT NULL,
74
- primary_link varchar(150) NOT NULL,
75
- component_name varchar(75) NOT NULL,
76
- component_action varchar(75) NOT NULL,
77
- date_cached datetime NOT NULL,
78
date_recorded datetime NOT NULL,
79
- KEY date_cached (date_cached),
80
KEY date_recorded (date_recorded),
81
KEY user_id (user_id),
82
KEY item_id (item_id),
@@ -86,84 +41,81 @@ function bp_activity_install() {
86
require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
87
dbDelta($sql);
88
89
- if ( '' == get_site_option( 'bp-activity-db-merge' ) || !get_site_option( 'bp-activity-db-merge' ) ) {
90
- $users = $wpdb->get_col( "SELECT ID FROM " . CUSTOM_USER_TABLE );
91
-
92
- foreach ( $users as $user_id ) {
93
- BP_Activity_Activity::convert_tables_for_user( $user_id );
94
- BP_Activity_Activity::kill_tables_for_user( $user_id );
95
- }
96
-
97
- add_site_option( 'bp-activity-db-merge', 1 );
98
- }
99
100
update_site_option( 'bp-activity-db-version', BP_ACTIVITY_DB_VERSION );
101
}
102
103
- /**************************************************************************
104
- bp_activity_setup_globals()
105
-
106
- Set up and add all global variables for this component, and add them to
107
- the $bp global variable array.
108
- **************************************************************************/
109
-
110
function bp_activity_setup_globals() {
111
global $bp, $wpdb, $current_blog;
112
113
- $bp->activity->table_name_user_activity = $wpdb->base_prefix . 'bp_activity_user_activity';
114
- $bp->activity->table_name_user_activity_cached = $wpdb->base_prefix . 'bp_activity_user_activity_cached';
115
- $bp->activity->table_name_sitewide = $wpdb->base_prefix . 'bp_activity_sitewide';
116
117
- $bp->activity->image_base = BP_PLUGIN_URL . '/bp-activity/images';
118
$bp->activity->slug = BP_ACTIVITY_SLUG;
119
120
- $bp->version_numbers->activity = BP_ACTIVITY_VERSION;
121
122
- if ( is_site_admin() && get_site_option( 'bp-activity-db-version' ) < BP_ACTIVITY_DB_VERSION )
123
bp_activity_install();
124
}
125
- add_action( 'plugins_loaded', 'bp_activity_setup_globals', 5 );
126
- add_action( 'admin_menu', 'bp_activity_setup_globals', 1 );
127
128
function bp_activity_setup_root_component() {
129
- /* Register 'groups' as a root component */
130
bp_core_add_root_component( BP_ACTIVITY_SLUG );
131
}
132
- add_action( 'plugins_loaded', 'bp_activity_setup_root_component', 1 );
133
-
134
-
135
- /**************************************************************************
136
- bp_activity_setup_nav()
137
-
138
- Set up front end navigation.
139
- **************************************************************************/
140
141
function bp_activity_setup_nav() {
142
global $bp;
143
-
144
/* Add 'Activity' to the main navigation */
145
- bp_core_add_nav_item( __('Activity', 'buddypress'), $bp->activity->slug );
146
- bp_core_add_nav_default( $bp->activity->slug, 'bp_activity_screen_my_activity', 'just-me' );
147
-
148
$activity_link = $bp->loggedin_user->domain . $bp->activity->slug . '/';
149
-
150
/* Add the subnav items to the activity nav item */
151
- bp_core_add_subnav_item( $bp->activity->slug, 'just-me', __('Just Me', 'buddypress'), $activity_link, 'bp_activity_screen_my_activity' );
152
- bp_core_add_subnav_item( $bp->activity->slug, 'my-friends', __('My Friends', 'buddypress'), $activity_link, 'bp_activity_screen_friends_activity', 'activity-my-friends', bp_is_home() );
153
-
154
if ( $bp->current_component == $bp->activity->slug ) {
155
if ( bp_is_home() ) {
156
$bp->bp_options_title = __( 'My Activity', 'buddypress' );
157
} else {
158
- $bp->bp_options_avatar = bp_core_get_avatar( $bp->displayed_user->id, 1 );
159
$bp->bp_options_title = $bp->displayed_user->fullname;
160
}
161
}
162
}
163
- add_action( 'wp', 'bp_activity_setup_nav', 2 );
164
- add_action( 'admin_menu', 'bp_activity_setup_nav', 2 );
165
166
- /***** Screens **********/
167
168
function bp_activity_screen_my_activity() {
169
do_action( 'bp_activity_screen_my_activity' );
@@ -175,49 +127,49 @@ function bp_activity_screen_friends_activity() {
175
bp_core_load_template( apply_filters( 'bp_activity_template_friends_activity', 'activity/my-friends' ) );
176
}
177
178
- /***** Actions **********/
179
180
- function bp_activity_record( $item_id, $component_name, $component_action, $is_private, $secondary_item_id = false, $user_id = false, $secondary_user_id = false, $recorded_time = false ) {
181
- global $bp, $wpdb;
182
-
183
- if ( !$user_id )
184
- $user_id = $bp->loggedin_user->id;
185
186
- if ( !$recorded_time )
187
- $recorded_time = time();
188
-
189
- $activity = new BP_Activity_Activity;
190
- $activity->item_id = $item_id;
191
- $activity->secondary_item_id = $secondary_item_id;
192
- $activity->user_id = $user_id;
193
- $activity->component_name = $component_name;
194
- $activity->component_action = $component_action;
195
- $activity->date_recorded = $recorded_time;
196
- $activity->is_private = $is_private;
197
198
- $loggedin_user_save = $activity->save();
199
200
- /* Save an activity entry for both logged in and secondary user. For example for a new friend connection
201
- you would want to show "X and Y are now friends" on both users activity stream */
202
- if ( $secondary_user_id ) {
203
- $activity = new BP_Activity_Activity;
204
- $activity->item_id = $item_id;
205
- $activity->user_id = $secondary_user_id;
206
- $activity->component_name = $component_name;
207
- $activity->component_action = $component_action;
208
- $activity->date_recorded = $recorded_time;
209
- $activity->is_private = $is_private;
210
-
211
- // We don't want to record this on the sitewide stream, otherwise we will get duplicates.
212
- $activity->no_sitewide_cache = true;
213
-
214
- $secondary_user_save = $activity->save();
215
}
216
217
- do_action( 'bp_activity_record', $item_id, $component_name, $component_action, $is_private, $secondary_item_id, $user_id, $secondary_user_id );
218
219
- return true;
220
}
221
222
function bp_activity_action_sitewide_feed() {
223
global $bp, $wp_query;
@@ -261,46 +213,191 @@ function bp_activity_action_friends_feed() {
261
}
262
add_action( 'wp', 'bp_activity_action_friends_feed', 3 );
263
264
- function bp_activity_get_last_updated() {
265
- return BP_Activity_Activity::get_last_updated();
266
}
267
268
- function bp_activity_get_sitewide_activity( $max_items = 30, $pag_num = false, $pag_page = false ) {
269
- return BP_Activity_Activity::get_sitewide_activity( $max_items, $pag_num, $pag_page );
270
}
271
272
- function bp_activity_get_user_activity( $user_id, $max_items = 30, $since = '-4 weeks', $pag_num = false, $pag_page = false ) {
273
- return BP_Activity_Activity::get_activity_for_user( $user_id, $max_items, $since, $pag_num, $pag_page );
274
}
275
276
- function bp_activity_get_friends_activity( $user_id, $max_items = 30, $since = '-4 weeks', $max_items_per_friend = false, $pag_num = false, $pag_page = false ) {
277
- return BP_Activity_Activity::get_activity_for_friends( $user_id, $max_items, $since, $max_items_per_friend, $pag_num, $pag_page );
278
}
279
280
- function bp_activity_delete( $item_id, $component_name, $component_action, $user_id, $secondary_item_id ) {
281
- if ( !BP_Activity_Activity::delete( $item_id, $component_name, $component_action, $user_id, $secondary_item_id ) )
282
return false;
283
-
284
- do_action( 'bp_activity_delete', $item_id, $component_name, $component_action, $user_id, $secondary_item_id );
285
286
return true;
287
}
288
289
- function bp_activity_order_by_date( $a, $b ) {
290
- return strcasecmp( $b['date_recorded'], $a['date_recorded'] );
291
}
292
293
function bp_activity_remove_data( $user_id ) {
294
// Clear the user's activity from the sitewide stream and clear their activity tables
295
- BP_Activity_Activity::delete_activity_for_user( $user_id );
296
-
297
- // Remove the deleted users activity tables
298
- BP_Activity_Activity::kill_tables_for_user( $user_id );
299
300
do_action( 'bp_activity_remove_data', $user_id );
301
}
302
add_action( 'wpmu_delete_user', 'bp_activity_remove_data' );
303
add_action( 'delete_user', 'bp_activity_remove_data' );
304
305
306
?>
1
<?php
2
3
+ define ( 'BP_ACTIVITY_DB_VERSION', '1800' );
4
5
/* Define the slug for the component */
6
if ( !defined( 'BP_ACTIVITY_SLUG' ) )
7
define ( 'BP_ACTIVITY_SLUG', 'activity' );
8
9
require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-classes.php' );
10
require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-templatetags.php' );
11
require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-widgets.php' );
12
require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-filters.php' );
13
14
+ /* Include deprecated functions if settings allow */
15
+ if ( !defined( 'BP_IGNORE_DEPRECATED' ) )
16
+ require ( BP_PLUGIN_DIR . '/bp-activity/deprecated/bp-activity-deprecated.php' );
17
+
18
function bp_activity_install() {
19
global $wpdb, $bp;
20
21
if ( !empty($wpdb->charset) )
22
$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
23
24
+ $sql[] = "CREATE TABLE {$bp->activity->table_name} (
25
id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
26
user_id bigint(20) NOT NULL,
27
component_name varchar(75) NOT NULL,
28
component_action varchar(75) NOT NULL,
29
content longtext NOT NULL,
30
primary_link varchar(150) NOT NULL,
31
+ item_id varchar(75) NOT NULL,
32
+ secondary_item_id varchar(75) NOT NULL,
33
date_recorded datetime NOT NULL,
34
+ hide_sitewide bool DEFAULT 0,
35
KEY date_recorded (date_recorded),
36
KEY user_id (user_id),
37
KEY item_id (item_id),
41
require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
42
dbDelta($sql);
43
44
+ /* Drop the old sitewide and user activity tables */
45
+ $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->base_prefix}bp_activity_user_activity" );
46
+ $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->base_prefix}bp_activity_sitewide" );
47
+
48
+ /* TODO: Rename the old user activity cached table */
49
+ //$wpdb->query( "RENAME TABLE {$wpdb->base_prefix}bp_activity_user_activity_cached TO {$bp->activity->table_name}" );
50
51
update_site_option( 'bp-activity-db-version', BP_ACTIVITY_DB_VERSION );
52
}
53
54
function bp_activity_setup_globals() {
55
global $bp, $wpdb, $current_blog;
56
57
+ /* Internal identifier */
58
+ $bp->activity->id = 'activity';
59
60
+ $bp->activity->table_name = $wpdb->base_prefix . 'bp_activity_user_activity_cached';
61
$bp->activity->slug = BP_ACTIVITY_SLUG;
62
+
63
+ /* Register this in the active components array */
64
+ $bp->active_components[$bp->activity->slug] = $bp->activity->id;
65
66
+ do_action( 'bp_activity_setup_globals' );
67
+ }
68
+ add_action( 'plugins_loaded', 'bp_activity_setup_globals', 5 );
69
+ add_action( 'admin_menu', 'bp_activity_setup_globals', 2 );
70
71
+ function bp_activity_check_installed() {
72
+ global $wpdb, $bp;
73
+
74
+ if ( get_site_option('bp-activity-db-version') < BP_ACTIVITY_DB_VERSION )
75
bp_activity_install();
76
}
77
+ add_action( 'admin_menu', 'bp_activity_check_installed' );
78
79
function bp_activity_setup_root_component() {
80
+ /* Register 'activity' as a root component (for RSS feed use) */
81
bp_core_add_root_component( BP_ACTIVITY_SLUG );
82
}
83
+ add_action( 'plugins_loaded', 'bp_activity_setup_root_component', 2 );
84
85
function bp_activity_setup_nav() {
86
global $bp;
87
+
88
/* Add 'Activity' to the main navigation */
89
+ bp_core_new_nav_item( array( 'name' => __( 'Activity', 'buddypress' ), 'slug' => $bp->activity->slug, 'position' => 10, 'screen_function' => 'bp_activity_screen_my_activity', 'default_subnav_slug' => 'just-me', 'item_css_id' => $bp->activity->id ) );
90
+
91
$activity_link = $bp->loggedin_user->domain . $bp->activity->slug . '/';
92
+
93
/* Add the subnav items to the activity nav item */
94
+ bp_core_new_subnav_item( array( 'name' => __( 'Just Me', 'buddypress' ), 'slug' => 'just-me', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_my_activity', 'position' => 10 ) );
95
+ bp_core_new_subnav_item( array( 'name' => __( 'My Friends', 'buddypress' ), 'slug' => 'my-friends', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_friends_activity', 'position' => 20, 'item_css_id' => 'activity-my-friends' ) );
96
+
97
if ( $bp->current_component == $bp->activity->slug ) {
98
if ( bp_is_home() ) {
99
$bp->bp_options_title = __( 'My Activity', 'buddypress' );
100
} else {
101
+ $bp->bp_options_avatar = bp_core_fetch_avatar( array( 'item_id' => $bp->displayed_user->id, 'type' => 'thumb' ) );
102
$bp->bp_options_title = $bp->displayed_user->fullname;
103
}
104
}
105
+
106
+ do_action( 'bp_activity_setup_nav' );
107
}
108
+ add_action( 'plugins_loaded', 'bp_activity_setup_nav' );
109
+ add_action( 'admin_menu', 'bp_activity_setup_nav' );
110
111
+
112
+ /********************************************************************************
113
+ * Screen Functions
114
+ *
115
+ * Screen functions are the controllers of BuddyPress. They will execute when their
116
+ * specific URL is caught. They will first save or manipulate data using business
117
+ * functions, then pass on the user to a template file.
118
+ */
119
120
function bp_activity_screen_my_activity() {
121
do_action( 'bp_activity_screen_my_activity' );
127
bp_core_load_template( apply_filters( 'bp_activity_template_friends_activity', 'activity/my-friends' ) );
128
}
129
130
131
+ /********************************************************************************
132
+ * Action Functions
133
+ *
134
+ * Action functions are exactly the same as screen functions, however they do not
135
+ * have a template screen associated with them. Usually they will send the user
136
+ * back to the default screen after execution.
137
+ */
138
139
+ function bp_activity_action_delete_activity() {
140
+ global $bp;
141
142
+ if ( $bp->current_component != $bp->activity->slug || $bp->current_action != 'delete' )
143
+ return false;
144
+
145
+ if ( empty( $bp->action_variables[0] ) || !is_numeric( $bp->action_variables[0] ) )
146
+ return false;
147
+
148
+ /* Check the nonce */
149
+ check_admin_referer( 'bp_activity_delete_link' );
150
+
151
+ $activity_id = $bp->action_variables[0];
152
153
+ /* Check access */
154
+ if ( !is_site_admin() ) {
155
+ $activity = new BP_Activity_Activity( $activity_id );
156
+
157
+ if ( $activity->user_id != $bp->loggedin_user->id )
158
+ return false;
159
}
160
161
+ /* Now delete the activity item */
162
+ if ( bp_activity_delete_by_activity_id( $activity_id ) )
163
+ bp_core_add_message( __( 'Activity deleted', 'buddypress' ) );
164
+ else
165
+ bp_core_add_message( __( 'There was an error when deleting that activity', 'buddypress' ), 'error' );
166
+
167
+ do_action( 'bp_activity_action_delete_activity', $activity_id );
168
169
+ bp_core_redirect( $_SERVER['HTTP_REFERER'] );
170
}
171
+ add_action( 'wp', 'bp_activity_action_delete_activity', 3 );
172
+
173
174
function bp_activity_action_sitewide_feed() {
175
global $bp, $wp_query;
213
}
214
add_action( 'wp', 'bp_activity_action_friends_feed', 3 );
215
216
+
217
+ /********************************************************************************
218
+ * Business Functions
219
+ *
220
+ * Business functions are where all the magic happens in BuddyPress. They will
221
+ * handle the actual saving or manipulation of information. Usually they will
222
+ * hand off to a database class for data access, then return
223
+ * true or false on success or failure.
224
+ */
225
+
226
+ function bp_activity_add( $args = '' ) {
227
+ global $bp, $wpdb;
228
+
229
+ $defaults = array(
230
+ 'content' => false, // The content of the activity item
231
+ 'primary_link' => false, // The primary URL for this item in RSS feeds
232
+ 'component_name' => false, // The name/ID of the component e.g. groups, profile, mycomponent
233
+ 'component_action' => false, // The component action e.g. new_wire_post, profile_updated
234
+
235
+ 'user_id' => $bp->loggedin_user->id, // Optional: The user to record the activity for, can be false if this activity is not for a user.
236
+ 'item_id' => false, // Optional: The ID of the specific item being recorded, e.g. a blog_id, or wire_post_id
237
+ 'secondary_item_id' => false, // Optional: A second ID used to further filter e.g. a comment_id
238
+ 'recorded_time' => time(), // The time that this activity was recorded
239
+ 'hide_sitewide' => false // Should this be hidden on the sitewide activity stream?
240
+ );
241
+
242
+ $r = wp_parse_args( $args, $defaults );
243
+ extract( $r, EXTR_SKIP );
244
+
245
+ /* Insert the "time-since" placeholder */
246
+ if ( $content )
247
+ $content = bp_activity_add_timesince_placeholder( $content );
248
+
249
+ $activity = new BP_Activity_Activity;
250
+ $activity->user_id = $user_id;
251
+ $activity->content = $content;
252
+ $activity->primary_link = $primary_link;
253
+ $activity->component_name = $component_name;
254
+ $activity->component_action = $component_action;
255
+ $activity->item_id = $item_id;
256
+ $activity->secondary_item_id = $secondary_item_id;
257
+ $activity->date_recorded = $recorded_time;
258
+ $activity->hide_sitewide = $hide_sitewide;
259
+
260
+ if ( !$activity->save() )
261
+ return false;
262
+
263
+ do_action( 'bp_activity_add', $args );
264
+
265
+ return true;
266
}
267
268
+ /* There are multiple ways to delete activity items, depending on the information you have at the time. */
269
+
270
+ function bp_activity_delete_by_item_id( $args = '' ) {
271
+ global $bp;
272
+
273
+ $defaults = array(
274
+ 'item_id' => false,
275
+ 'component_name' => false,
276
+ 'component_action' => false, // optional
277
+ 'user_id' => false, // optional
278
+ 'secondary_item_id' => false // optional
279
+ );
280
+
281
+ $r = wp_parse_args( $args, $defaults );
282
+ extract( $r, EXTR_SKIP );
283
+
284
+ if ( !BP_Activity_Activity::delete_by_item_id( $item_id, $component_name, $component_action, $user_id, $secondary_item_id ) )
285
+ return false;
286
+
287
+ do_action( 'bp_activity_delete_by_item_id', $item_id, $component_name, $component_action, $user_id, $secondary_item_id );
288
+
289
+ return true;
290
}
291
292
+ function bp_activity_delete_by_activity_id( $activity_id ) {
293
+ if ( !BP_Activity_Activity::delete_by_activity_id( $activity_id ) )
294
+ return false;
295
+
296
+ do_action( 'bp_activity_delete_by_activity_id', $activity_id );
297
+
298
+ return true;
299
}
300
301
+ function bp_activity_delete_by_content( $user_id, $content, $component_name, $component_action ) {
302
+ /* Insert the "time-since" placeholder to match the existing content in the DB */
303
+ $content = bp_activity_add_timesince_placeholder( $content );
304
+
305
+ if ( !BP_Activity_Activity::delete_by_content( $user_id, $content, $component_name, $component_action ) )
306
+ return false;
307
+
308
+ do_action( 'bp_activity_delete_by_content', $user_id, $content, $component_name, $component_action );
309
+
310
+ return true;
311
}
312
313
+ function bp_activity_delete_for_user_by_component( $user_id, $component_name ) {
314
+ if ( !BP_Activity_Activity::delete_for_user_by_component( $user_id, $component_name ) )
315
return false;
316
+
317
+ do_action( 'bp_activity_delete_for_user_by_component', $user_id, $component_name );
318
319
return true;
320
}
321
322
+ function bp_activity_add_timesince_placeholder( $content ) {
323
+ /* Check a time-since span doesn't already exist */
324
+ if ( false === strpos( $content, '<span class="time-since">' ) ) {
325
+ if ( !$pos = strpos( $content, '<blockquote' ) ) {
326
+ if ( !$pos = strpos( $content, '<div' ) ) {
327
+ if ( !$pos = strpos( $content, '<ul' ) ) {
328
+ $content .= ' <span class="time-since">%s</span>';
329
+ }
330
+ }
331
+ }
332
+ }
333
+
334
+ if ( (int) $pos ) {
335
+ $before = substr( $content, 0, (int) $pos );
336
+ $after = substr( $content, (int) $pos, strlen( $content ) );
337
+
338
+ $content = $before . ' <span class="time-since">%s</span>' . $after;
339
+ }
340
+
341
+ return apply_filters( 'bp_activity_add_timesince_placeholder', $content );
342
+ }
343
+
344
+ function bp_activity_set_action( $component_id, $key, $value ) {
345
+ global $bp;
346
+
347
+ if ( empty( $component_id ) || empty( $key ) || empty( $value ) )
348
+ return false;
349
+
350
+ $bp->activity->actions->{$component_id}->{$key} = apply_filters( 'bp_activity_set_action', array(
351
+ 'key' => $key,
352
+ 'value' => $value
353
+ ), $component_id, $key, $value );
354
+ }
355
+
356
+ function bp_activity_get_action( $component_id, $key ) {
357
+ global $bp;
358
+
359
+ if ( empty( $component_id ) || empty( $key ) )
360
+ return false;
361
+
362
+ return apply_filters( 'bp_activity_get_action', $bp->activity->actions->{$component_id}->{$key}, $component_id, $key );
363
+ }
364
+
365
+ function bp_activity_check_exists_by_content( $content ) {
366
+ /* Insert the "time-since" placeholder to match the existing content in the DB */
367
+ $content = bp_activity_add_timesince_placeholder( $content );
368
+
369
+ return apply_filters( 'bp_activity_check_exists_by_content', BP_Activity_Activity::check_exists_by_content( $content ) );
370
+ }
371
+
372
+ function bp_activity_get_last_updated() {
373
+ return apply_filters( 'bp_activity_get_last_updated', BP_Activity_Activity::get_last_updated() );
374
+ }
375
+
376
+ function bp_activity_get_sitewide_activity( $max_items = 30, $pag_num = false, $pag_page = false, $filter = false ) {
377
+ return apply_filters( 'bp_activity_get_sitewide_activity', BP_Activity_Activity::get_sitewide_activity( $max_items, $pag_num, $pag_page, $filter ), $max_items, $pag_num, $pag_page, $filter );
378
+ }
379
+
380
+ function bp_activity_get_user_activity( $user_id, $max_items = 30, $pag_num = false, $pag_page = false, $filter = false ) {
381
+ return apply_filters( 'bp_activity_get_user_activity', BP_Activity_Activity::get_activity_for_user( $user_id, $max_items, $pag_num, $pag_page, $filter ), $user_id, $max_items, $pag_num, $pag_page, $filter );
382
+ }
383
+
384
+ function bp_activity_get_friends_activity( $user_id, $max_items = 30, $max_items_per_friend = false, $pag_num = false, $pag_page = false, $filter = false ) {
385
+ return apply_filters( 'bp_activity_get_friends_activity', BP_Activity_Activity::get_activity_for_friends( $user_id, $max_items, $max_items_per_friend, $pag_num, $pag_page, $filter ), $user_id, $max_items, $max_items_per_friend, $pag_num, $pag_page, $filter );
386
}
387
388
function bp_activity_remove_data( $user_id ) {
389
// Clear the user's activity from the sitewide stream and clear their activity tables
390
+ BP_Activity_Activity::delete_for_user( $user_id );
391
392
do_action( 'bp_activity_remove_data', $user_id );
393
}
394
add_action( 'wpmu_delete_user', 'bp_activity_remove_data' );
395
add_action( 'delete_user', 'bp_activity_remove_data' );
396
+ add_action( 'make_spam_user', 'bp_activity_remove_data' );
397
398
+ /* Ordering function - don't call this directly */
399
+ function bp_activity_order_by_date( $a, $b ) {
400
+ return apply_filters( 'bp_activity_order_by_date', strcasecmp( $b['date_recorded'], $a['date_recorded'] ) );
401
+ }
402
403
?>
bp-activity/bp-activity-classes.php CHANGED
@@ -9,37 +9,32 @@ Class BP_Activity_Activity {
9
var $component_name;
10
var $component_action;
11
var $date_recorded;
12
- var $is_private = false;
13
- var $no_sitewide_cache = false;
14
15
- var $table_name;
16
- var $table_name_cached;
17
- var $for_secondary_user = false;
18
-
19
- function bp_activity_activity( $id = null, $populate = true ) {
20
global $bp;
21
22
if ( $id ) {
23
$this->id = $id;
24
-
25
- if ( $populate )
26
- $this->populate();
27
}
28
}
29
30
function populate() {
31
global $wpdb, $bp;
32
33
- $activity = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$this->table_name} WHERE id = %d", $this->id ) );
34
-
35
$this->item_id = $activity->item_id;
36
$this->secondary_item_id = $activity->secondary_item_id;
37
$this->user_id = $activity->user_id;
38
$this->component_name = $activity->component_name;
39
$this->component_action = $activity->component_action;
40
$this->date_recorded = $activity->date_recorded;
41
- $this->is_private = $activity->is_private;
42
- $this->no_sitewide_cache = $activity->no_sitewide_cache;
43
}
44
45
function save() {
@@ -47,73 +42,108 @@ Class BP_Activity_Activity {
47
48
do_action( 'bp_activity_before_save', $this );
49
50
- if ( !$this->item_id || !$this->user_id || $this->is_private || !$this->component_name )
51
return false;
52
-
53
- // Set the table names
54
- $this->table_name = $bp->activity->table_name_user_activity;
55
- $this->table_name_cached = $bp->activity->table_name_user_activity_cached;
56
-
57
- if ( !$this->exists() ) {
58
- // Insert the new activity into the activity table.
59
- $activity = $wpdb->query( $wpdb->prepare( "INSERT INTO {$this->table_name} ( item_id, secondary_item_id, user_id, component_name, component_action, date_recorded, is_private, no_sitewide_cache ) VALUES ( %d, %d, %d, %s, %s, FROM_UNIXTIME(%d), %d, %d )", $this->item_id, $this->secondary_item_id, $this->user_id, $this->component_name, $this->component_action, $this->date_recorded, $this->is_private, $this->no_sitewide_cache ) );
60
-
61
- // Fetch the formatted activity content so we can add it to the cache.
62
if ( function_exists( $bp->{$this->component_name}->format_activity_function ) ) {
63
- if ( !$activity_content = call_user_func( $bp->{$this->component_name}->format_activity_function, $this->item_id, $this->user_id, $this->component_action, $this->secondary_item_id, $this->for_secondary_user ) )
64
return false;
65
}
66
-
67
- // Add the cached version of the activity to the cached activity table.
68
- $activity_cached = $wpdb->query( $wpdb->prepare( "INSERT INTO {$this->table_name_cached} ( user_id, item_id, secondary_item_id, content, primary_link, component_name, component_action, date_cached, date_recorded, is_private ) VALUES ( %d, %d, %d, %s, %s, %s, %s, FROM_UNIXTIME(%d), FROM_UNIXTIME(%d), %d )", $this->user_id, $this->item_id, $this->secondary_item_id, $activity_content['content'], $activity_content['primary_link'], $this->component_name, $this->component_action, time(), $this->date_recorded, $this->is_private ) );
69
-
70
- // Add the cached version of the activity to the sitewide activity table.
71
- if ( !$this->no_sitewide_cache )
72
- $sitewide_cached = $wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->activity->table_name_sitewide} ( user_id, item_id, secondary_item_id, content, primary_link, component_name, component_action, date_cached, date_recorded ) VALUES ( %d, %d, %d, %s, %s, %s, %s, FROM_UNIXTIME(%d), FROM_UNIXTIME(%d) )", $this->user_id, $this->item_id, $this->secondary_item_id, $activity_content['content'], $activity_content['primary_link'], $this->component_name, $this->component_action, time(), $this->date_recorded ) );
73
-
74
- if ( $activity && $activity_cached ) {
75
do_action( 'bp_activity_after_save', $this );
76
return true;
77
}
78
-
79
- return false;
80
}
81
}
82
83
function exists() {
84
global $wpdb, $bp;
85
- return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$this->table_name} WHERE item_id = %d AND secondary_item_id = %d AND user_id = %d AND component_name = %s AND component_action = %s", $this->item_id, $this->secondary_item_id, $this->user_id, $this->component_name, $this->component_action ) );
86
}
87
88
/* Static Functions */
89
90
- function delete( $item_id, $component_name, $component_action, $user_id, $secondary_item_id = false ) {
91
global $wpdb, $bp;
92
-
93
- if ( !$user_id )
94
- return false;
95
96
- if ( !$bp->activity )
97
- bp_activity_setup_globals();
98
99
- if ( $secondary_item_id )
100
- $secondary_sql = $wpdb->prepare( "AND secondary_item_id = %d", $secondary_item_id );
101
102
- if ( $component_action ) {
103
- $component_action_sql = $wpdb->prepare( "AND component_action = %s AND user_id = %d", $component_action, $user_id );
104
- $cached_component_action_sql = $wpdb->prepare( "AND component_action = %s", $component_action );
105
- }
106
-
107
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_user_activity} WHERE item_id = %d {$secondary_sql} AND component_name = %s {$component_action_sql}", $item_id, $component_name ) );
108
-
109
- // Delete this entry from the user activity cache table and the sitewide cache table
110
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_user_activity_cached} WHERE user_id = %d AND item_id = %d {$secondary_sql} AND component_name = %s {$cached_component_action_sql}", $user_id, $item_id, $component_name ) );
111
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_sitewide} WHERE item_id = %d {$secondary_sql} AND component_name = %s {$component_action_sql}", $item_id, $component_name ) );
112
113
- return true;
114
}
115
116
- function get_activity_for_user( $user_id, $max_items, $since, $limit, $page ) {
117
global $wpdb, $bp;
118
119
$since = strtotime($since);
@@ -121,34 +151,24 @@ Class BP_Activity_Activity {
121
if ( $limit && $page )
122
$pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
123
124
- if ( $max )
125
- $max_sql = $wpdb->prepare( "LIMIT %d", $max );
126
127
- if ( !bp_is_home() )
128
- $privacy_sql = " AND is_private = 0";
129
-
130
- if ( $limit && $page && $max )
131
- $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name_user_activity_cached} WHERE user_id = %d AND date_recorded >= FROM_UNIXTIME(%d) $privacy_sql ORDER BY date_recorded DESC $pag_sql", $user_id, $since ) );
132
else
133
- $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name_user_activity_cached} WHERE user_id = %d AND date_recorded >= FROM_UNIXTIME(%d) $privacy_sql ORDER BY date_recorded DESC $pag_sql $max_sql", $user_id, $since ) );
134
-
135
- $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->activity->table_name_user_activity_cached} WHERE user_id = %d AND date_recorded >= FROM_UNIXTIME(%d) $privacy_sql ORDER BY date_recorded DESC $max_sql", $user_id, $since ) );
136
-
137
- for ( $i = 0; $i < count( $activities ); $i++ ) {
138
- if ( !$activities[$i]->is_private ) {
139
- $activities_formatted[$i]['content'] = $activities[$i]->content;
140
- $activities_formatted[$i]['primary_link'] = $activities[$i]->primary_link;
141
- $activities_formatted[$i]['date_recorded'] = $activities[$i]->date_recorded;
142
- $activities_formatted[$i]['component_name'] = $activities[$i]->component_name;
143
- $activities_formatted[$i]['component_action'] = $activities[$i]->component_action;
144
- $activities_formatted[$i]['is_private'] = $activities[$i]->is_private;
145
- }
146
- }
147
148
- return array( 'activities' => $activities_formatted, 'total' => (int)$total_activities );
149
}
150
151
- function get_activity_for_friends( $user_id, $max_items, $since, $max_items_per_friend, $limit, $page ) {
152
global $wpdb, $bp;
153
154
// TODO: Max items per friend not yet implemented.
@@ -159,10 +179,12 @@ Class BP_Activity_Activity {
159
if ( $limit && $page )
160
$pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
161
162
- if ( $max )
163
- $max_sql = $wpdb->prepare( "LIMIT %d", $max );
164
-
165
- $since = strtotime($since);
166
167
$friend_ids = friends_get_friend_user_ids( $user_id );
168
@@ -171,17 +193,17 @@ Class BP_Activity_Activity {
171
172
$friend_ids = implode( ',', $friend_ids );
173
174
- if ( $limit && $page && $max )
175
- $activities = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT user_id, content, primary_link, date_recorded, component_name, component_action FROM {$bp->activity->table_name_sitewide} WHERE user_id IN ({$friend_ids}) AND date_recorded >= FROM_UNIXTIME(%d) ORDER BY date_recorded DESC $pag_sql", $since ) );
176
else
177
- $activities = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT user_id, content, primary_link, date_recorded, component_name, component_action FROM {$bp->activity->table_name_sitewide} WHERE user_id IN ({$friend_ids}) AND date_recorded >= FROM_UNIXTIME(%d) ORDER BY date_recorded DESC $pag_sql $max_sql", $since ) );
178
-
179
- $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(user_id) FROM {$bp->activity->table_name_sitewide} WHERE user_id IN ({$friend_ids}) AND date_recorded >= FROM_UNIXTIME(%d) ORDER BY date_recorded DESC $max_sql", $since ) );
180
181
return array( 'activities' => $activities, 'total' => (int)$total_activities );
182
}
183
184
- function get_sitewide_activity( $max, $limit, $page ) {
185
global $wpdb, $bp;
186
187
if ( $limit && $page )
@@ -189,26 +211,25 @@ Class BP_Activity_Activity {
189
190
if ( $max )
191
$max_sql = $wpdb->prepare( "LIMIT %d", $max );
192
193
- /* Remove entries that are older than 6 months */
194
- $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->activity->table_name_sitewide . " WHERE DATE_ADD(date_recorded, INTERVAL 6 MONTH) <= NOW()" ) );
195
-
196
if ( $limit && $page && $max )
197
- $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name_sitewide} ORDER BY date_recorded DESC $pag_sql" ) );
198
else
199
- $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name_sitewide} ORDER BY date_recorded DESC $pag_sql $max_sql" ) );
200
201
- $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->activity->table_name_sitewide} ORDER BY date_recorded DESC $max_sql" ) );
202
-
203
- for ( $i = 0; $i < count( $activities ); $i++ ) {
204
- $activities_formatted[$i]['content'] = $activities[$i]->content;
205
- $activities_formatted[$i]['primary_link'] = $activities[$i]->primary_link;
206
- $activities_formatted[$i]['date_recorded'] = $activities[$i]->date_recorded;
207
- $activities_formatted[$i]['component_name'] = $activities[$i]->component_name;
208
- $activities_formatted[$i]['component_action'] = $activities[$i]->component_action;
209
- }
210
211
- return array( 'activities' => $activities_formatted, 'total' => (int)$total_activities );
212
}
213
214
function get_sitewide_items_for_feed( $limit = 35 ) {
@@ -227,105 +248,90 @@ Class BP_Activity_Activity {
227
return $activity_feed;
228
}
229
230
- function cache_friends_activities( $activity_array ) {
231
- global $wpdb, $bp;
232
233
- /* Empty the cache */
234
- $wpdb->query( "TRUNCATE TABLE {$bp->activity->table_name_loggedin_user_friends_cached}" );
235
-
236
- for ( $i = 0; $i < count($activity_array); $i++ ) {
237
- // Cache that sucka...
238
- $cached = $wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->activity->table_name_loggedin_user_friends_cached} ( user_id, content, primary_link, component_name, component_action, date_cached, date_recorded ) VALUES ( %d, %s, %s, %s, %s, FROM_UNIXTIME(%d), %s )", $activity_array[$i]['user_id'], $activity_array[$i]['content'], $activity_array[$i]['primary_link'], $activity_array[$i]['component_name'], $activity_array[$i]['component_action'], time(), $activity_array[$i]['date_recorded'] ) );
239
}
240
-
241
- update_usermeta( $bp->loggedin_user->id, 'bp_activity_friends_last_cached', time() );
242
- }
243
-
244
- function cache_activities( $activity_array, $user_id ) {
245
- global $wpdb, $bp;
246
247
- /* Delete cached items older than 30 days for the user */
248
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_user_activity_cached} WHERE user_id = %d AND DATE_ADD(date_recorded, INTERVAL 30 DAY) <= NOW()", $user_id ) );
249
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_sitewide} WHERE user_id = %d AND DATE_ADD(date_recorded, INTERVAL 30 DAY) <= NOW()", $user_id ) );
250
-
251
- for ( $i = 0; $i < count($activity_array); $i++ ) {
252
- if ( empty( $activity_array[$i]['content'] ) ) continue;
253
-
254
- // Cache that sucka...
255
- $wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->activity->table_name_user_activity_cached} ( user_id, content, item_id, secondary_item_id, primary_link, component_name, component_action, date_cached, date_recorded, is_private ) VALUES ( %d, %s, %d, %d, %s, %s, %s, FROM_UNIXTIME(%d), %s, %d )", $user_id, $activity_array[$i]['content'], $activity_array[$i]['item_id'], $activity_array[$i]['secondary_item_id'], $activity_array[$i]['primary_link'], $activity_array[$i]['component_name'], $activity_array[$i]['component_action'], time(), $activity_array[$i]['date_recorded'], $activity_array[$i]['is_private'] ) );
256
-
257
- // Add to the sitewide activity stream
258
- if ( !$activity_array[$i]['is_private'] && !$activity_array[$i]['no_sitewide_cache'] )
259
- $wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->activity->table_name_sitewide} ( user_id, content, item_id, secondary_item_id, primary_link, component_name, component_action, date_cached, date_recorded ) VALUES ( %d, %s, %d, %d, %s, %s, %s, FROM_UNIXTIME(%d), %s )", $user_id, $activity_array[$i]['content'], $activity_array[$i]['item_id'], $activity_array[$i]['secondary_item_id'], $activity_array[$i]['primary_link'], $activity_array[$i]['component_name'], $activity_array[$i]['component_action'], time(), $activity_array[$i]['date_recorded'] ) );
260
}
261
262
- update_usermeta( $bp->displayed_user->id, 'bp_activity_last_cached', time() );
263
- }
264
-
265
- function delete_activity_for_user( $user_id ) {
266
- global $wpdb, $bp;
267
-
268
- /* Empty user's activities from the sitewide stream */
269
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_sitewide} WHERE user_id = %d", $user_id ) );
270
271
- /* Empty the user's activity items and cached activity items */
272
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_user_activity} WHERE user_id = %d", $user_id ) );
273
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_user_activity_cached} WHERE user_id = %d", $user_id ) );
274
275
- return true;
276
}
277
278
function get_last_updated() {
279
global $bp, $wpdb;
280
281
- return $wpdb->get_var( $wpdb->prepare( "SELECT date_recorded FROM " . $bp->activity->table_name_sitewide . " ORDER BY date_recorded ASC LIMIT 1" ) );
282
}
283
284
- function kill_tables_for_user( $user_id ) {
285
- global $bp, $wpdb;
286
287
- if ( !$wpdb->get_var( "SHOW TABLES LIKE 'wp_user_{$user_id}_activity'" ) )
288
- return false;
289
-
290
- $wpdb->query( $wpdb->prepare( "DROP TABLE wp_user_{$user_id}_activity" ) );
291
- $wpdb->query( $wpdb->prepare( "DROP TABLE wp_user_{$user_id}_activity_cached" ) );
292
- $wpdb->query( $wpdb->prepare( "DROP TABLE wp_user_{$user_id}_friends_activity_cached" ) );
293
-
294
- return true;
295
- }
296
-
297
- function convert_tables_for_user( $user_id ) {
298
- global $bp, $wpdb;
299
-
300
- if ( !$wpdb->get_var( "SHOW TABLES LIKE 'wp_user_{$user_id}_activity'" ) )
301
- return false;
302
-
303
- $activity_items = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM wp_user_{$user_id}_activity" ) );
304
- $activity_cached_items = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM wp_user_{$user_id}_activity_cached" ) );
305
-
306
- if ( $activity_items ) {
307
- foreach ( $activity_items as $activity_item ) {
308
- $wpdb->query( $wpdb->prepare(
309
- "INSERT INTO {$bp->activity->table_name_user_activity}
310
- ( item_id, secondary_item_id, user_id, component_name, component_action, date_recorded, is_private, no_sitewide_cache )
311
- VALUES
312
- ( %d, %d, %d, %s, %s, %s, %d, %d )",
313
- $activity_item->item_id, $activity_item->secondary_item_id, $user_id, $activity_item->component_name, $activity_item->component_action, $activity_item->date_recorded, $activity_item->is_private, $activity_item->no_sitewide_cache
314
- ) );
315
- }
316
- }
317
-
318
- if ( $activity_cached_items ) {
319
- foreach ( $activity_cached_items as $activity_cached_item ) {
320
- $wpdb->query( $wpdb->prepare(
321
- "INSERT INTO {$bp->activity->table_name_user_activity_cached}
322
- ( content, primary_link, item_id, secondary_item_id, user_id, component_name, component_action, date_recorded, date_cached, is_private )
323
- VALUES
324
- ( %s, %s, %d, %d, %d, %s, %s, %s, %s, %d )",
325
- $activity_cached_item->content, $activity_cached_item->primary_link, $activity_cached_item->item_id, $activity_cached_item->secondary_item_id, $user_id, $activity_cached_item->component_name, $activity_cached_item->component_action, $activity_cached_item->date_recorded, $activity_cached_item->date_cached, $activity_cached_item->is_private
326
- ) );
327
- }
328
- }
329
}
330
}
331
9
var $component_name;
10
var $component_action;
11
var $date_recorded;
12
+ var $hide_sitewide = false;
13
14
+ function bp_activity_activity( $id = false ) {
15
global $bp;
16
17
if ( $id ) {
18
$this->id = $id;
19
+ $this->populate();
20
}
21
}
22
23
function populate() {
24
global $wpdb, $bp;
25
26
+ $activity = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE id = %d", $this->id ) );
27
+
28
+ $this->id = $activity->id;
29
$this->item_id = $activity->item_id;
30
$this->secondary_item_id = $activity->secondary_item_id;
31
$this->user_id = $activity->user_id;
32
+ $this->content = $activity->content;
33
+ $this->primary_link = $activity->primary_link;
34
$this->component_name = $activity->component_name;
35
$this->component_action = $activity->component_action;
36
$this->date_recorded = $activity->date_recorded;
37
+ $this->hide_sitewide = $activity->hide_sitewide;
38
}
39
40
function save() {
42
43
do_action( 'bp_activity_before_save', $this );
44
45
+ if ( !$this->component_name || !$this->component_action )
46
return false;
47
+
48
+ /***
49
+ * Before v1.1 of BuddyPress, activity content was calculated at a later point. This is no longer the
50
+ * case, to to be backwards compatible we need to fetch content here to continue.
51
+ */
52
+ if ( empty( $this->content ) || !$this->content ) {
53
if ( function_exists( $bp->{$this->component_name}->format_activity_function ) ) {
54
+ if ( !$fetched_content = call_user_func( $bp->{$this->component_name}->format_activity_function, $this->item_id, $this->user_id, $this->component_action, $this->secondary_item_id, $this->for_secondary_user ) )
55
return false;
56
+
57
+ $this->content = $fetched_content['content'];
58
+ $this->primary_link = $fetched_content['primary_link'];
59
}
60
+ }
61
+
62
+ if ( !$this->primary_link )
63
+ $this->primary_link = $bp->loggedin_user->domain;
64
+
65
+ if ( $existing_activity_id = $this->exists() )
66
+ BP_Activity_Activity::delete_by_activity_id( $existing_activity_id );
67
+
68
+ /* If we have an existing ID, update the activity item, otherwise insert it. */
69
+ if ( $this->id ) {
70
+ if ( $wpdb->query( $wpdb->prepare( "UPDATE {$bp->activity->table_name} SET user_id = %d, component_name = %s, component_action = %s, content = %s, primary_link = %s, date_recorded = FROM_UNIXTIME(%d), item_id = %s, secondary_item_id = %s, hide_sitewide = %d WHERE id = %d", $this->user_id, $this->component_name, $this->component_action, $this->content, $this->primary_link, $this->date_recorded, $this->item_id, $this->secondary_item_id, $this->hide_sitewide, $this->id ) ) ) {
71
+ do_action( 'bp_activity_after_save', $this );
72
+ return true;
73
+ }
74
+ } else {
75
+ if ( $wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->activity->table_name} ( user_id, component_name, component_action, content, primary_link, date_recorded, item_id, secondary_item_id, hide_sitewide ) VALUES ( %d, %s, %s, %s, %s, FROM_UNIXTIME(%d), %s, %s, %d )", $this->user_id, $this->component_name, $this->component_action, $this->content, $this->primary_link, $this->date_recorded, $this->item_id, $this->secondary_item_id, $this->hide_sitewide ) ) ) {
76
do_action( 'bp_activity_after_save', $this );
77
return true;
78
}
79
}
80
+
81
+ return false;
82
}
83
84
function exists() {
85
global $wpdb, $bp;
86
+
87
+ /* This doesn't seem to be working correctly at the moment, so it is disabled [TODO] */
88
+ return false;
89
+
90
+ /* If we have an item id, try and match on that, if not do a content match */
91
+ if ( $this->item_id ) {
92
+ if ( $this->secondary_item_id )
93
+ $secondary_sql = $wpdb->prepare( " AND secondary_item_id = %s", $secondary_item_id );
94
+
95
+ return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE user_id = %d AND item_id = %s{$secondary_sql} AND component_name = %s AND component_action = %s", $this->user_id, $this->item_id, $this->component_name, $this->component_action ) );
96
+ } else {
97
+ return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE user_id = %d AND content = %s AND component_name = %s AND component_action = %s", $this->user_id, $this->content, $this->component_name, $this->component_action ) );
98
+ }
99
}
100
101
/* Static Functions */
102
103
+ function delete( $item_id, $component_name, $component_action, $user_id = false, $secondary_item_id = false ) {
104
global $wpdb, $bp;
105
+
106
+ if ( $secondary_item_id )
107
+ $secondary_sql = $wpdb->prepare( "AND secondary_item_id = %s", $secondary_item_id );
108
109
+ if ( $component_action )
110
+ $component_action_sql = $wpdb->prepare( "AND component_action = %s", $component_action );
111
112
+ if ( $user_id )
113
+ $user_sql = $wpdb->prepare( "AND user_id = %d", $user_id );
114
+
115
+ return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} WHERE item_id = %s {$secondary_sql} AND component_name = %s {$component_action_sql} {$user_sql}", $item_id, $component_name ) );
116
+ }
117
+
118
+ function delete_by_item_id( $item_id, $component_name, $component_action, $user_id = false, $secondary_item_id = false ) {
119
+ return BP_Activity_Activity::delete( $item_id, $component_name, $component_action, $user_id, $secondary_item_id );
120
+ }
121
+
122
+ function delete_by_activity_id( $activity_id ) {
123
+ global $bp, $wpdb;
124
125
+ return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} WHERE id = %d", $activity_id ) );
126
+ }
127
+
128
+ function delete_by_content( $user_id, $content, $component_name, $component_action ) {
129
+ global $bp, $wpdb;
130
+
131
+ return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} WHERE user_id = %d AND content = %s AND component_name = %s AND component_action = %s", $user_id, $content, $component_name, $component_action ) );
132
+ }
133
+
134
+ function delete_for_user_by_component( $user_id, $component_name ) {
135
+ global $bp, $wpdb;
136
+
137
+ return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} WHERE user_id = %d AND component_name = %s", $user_id, $component_name ) );
138
+ }
139
+
140
+ function delete_for_user( $user_id ) {
141
+ global $wpdb, $bp;
142
143
+ return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} WHERE user_id = %d", $user_id ) );
144
}
145
146
+ function get_activity_for_user( $user_id, $max_items, $limit, $page, $filter ) {
147
global $wpdb, $bp;
148
149
$since = strtotime($since);
151
if ( $limit && $page )
152
$pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
153
154
+ if ( $max_items )
155
+ $max_sql = $wpdb->prepare( "LIMIT %d", $max_items );
156
157
+ /* Sort out filtering */
158
+ if ( $filter )
159
+ $filter_sql = BP_Activity_Activity::get_filter_sql( $filter );
160
+
161
+ if ( $limit && $page && $max_items )
162
+ $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d $filter_sql ORDER BY date_recorded DESC $pag_sql", $user_id ) );
163
else
164
+ $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d $filter_sql ORDER BY date_recorded DESC $pag_sql $max_sql", $user_id ) );
165
+
166
+ $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->activity->table_name} WHERE user_id = %d $filter_sql ORDER BY date_recorded DESC $max_sql", $user_id ) );
167
168
+ return array( 'activities' => $activities, 'total' => (int)$total_activities );
169
}
170
171
+ function get_activity_for_friends( $user_id, $max_items, $max_items_per_friend, $limit, $page, $filter ) {
172
global $wpdb, $bp;
173
174
// TODO: Max items per friend not yet implemented.
179
if ( $limit && $page )
180
$pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
181
182
+ if ( $max_items )
183
+ $max_sql = $wpdb->prepare( "LIMIT %d", $max_items );
184
+
185
+ /* Sort out filtering */
186
+ if ( $filter )
187
+ $filter_sql = BP_Activity_Activity::get_filter_sql( $filter );
188
189
$friend_ids = friends_get_friend_user_ids( $user_id );
190
193
194
$friend_ids = implode( ',', $friend_ids );
195
196
+ if ( $limit && $page && $max_items )
197
+ $activities = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT id, user_id, content, primary_link, date_recorded, component_name, component_action FROM {$bp->activity->table_name} WHERE user_id IN ({$friend_ids}) $filter_sql ORDER BY date_recorded DESC $pag_sql" ) );
198
else
199
+ $activities = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT id, user_id, content, primary_link, date_recorded, component_name, component_action FROM {$bp->activity->table_name} WHERE user_id IN ({$friend_ids}) $filter_sql ORDER BY date_recorded DESC $pag_sql $max_sql" ) );
200
+
201
+ $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(user_id) FROM {$bp->activity->table_name} WHERE user_id IN ({$friend_ids}) $filter_sql ORDER BY date_recorded DESC $max_sql" ) );
202
203
return array( 'activities' => $activities, 'total' => (int)$total_activities );
204
}
205
206
+ function get_sitewide_activity( $max, $limit, $page, $filter ) {
207
global $wpdb, $bp;
208
209
if ( $limit && $page )
211
212
if ( $max )
213
$max_sql = $wpdb->prepare( "LIMIT %d", $max );
214
+
215
+ /* Sort out filtering */
216
+ if ( $filter )
217
+ $filter_sql = BP_Activity_Activity::get_filter_sql( $filter );
218
219
if ( $limit && $page && $max )
220
+ $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE hide_sitewide = 0 $filter_sql ORDER BY date_recorded DESC $pag_sql" ) );
221
else
222
+ $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE hide_sitewide = 0 $filter_sql ORDER BY date_recorded DESC $pag_sql $max_sql" ) );
223
224
+ $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->activity->table_name} WHERE hide_sitewide = 0 $filter_sql ORDER BY date_recorded DESC $max_sql" ) );
225
226
+ return array( 'activities' => $activities, 'total' => (int)$total_activities );
227
+ }
228
+
229
+ function get_recorded_component_names() {
230
+ global $wpdb, $bp;
231
+
232
+ return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT component_name FROM {$bp->activity->table_name} ORDER BY component_name ASC" ) );
233
}
234
235
function get_sitewide_items_for_feed( $limit = 35 ) {
248
return $activity_feed;
249
}
250
251
+ function get_filter_sql( $filter_array ) {
252
+ global $wpdb;
253
254
+ if ( !empty( $filter_array['object'] ) ) {
255
+ $object_filter = explode( ',', $filter_array['object'] );
256
+ $object_sql = ' AND ( ';
257
+
258
+ $counter = 1;
259
+ foreach( (array) $object_filter as $object ) {
260
+ $object_sql .= $wpdb->prepare( "component_name = %s", trim( $object ) );
261
+
262
+ if ( $counter != count( $object_filter ) )
263
+ $object_sql .= ' || ';
264
+
265
+ $counter++;
266
+ }
267
+
268
+ $object_sql .= ' )';
269
}
270
271
+ if ( !empty( $filter_array['action'] ) ) {
272
+ $action_filter = explode( ',', $filter_array['action'] );
273
+ $action_sql = ' AND ( ';
274
+
275
+ $counter = 1;
276
+ foreach( (array) $action_filter as $action ) {
277
+ $action_sql .= $wpdb->prepare( "component_action = %s", trim( $action ) );
278
+
279
+ if ( $counter != count( $action_filter ) )
280
+ $action_sql .= ' || ';
281
+
282
+ $counter++;
283
+ }
284
+
285
+ $action_sql .= ' )';
286
}
287
288
+ if ( !empty( $filter_array['primary_id'] ) ) {
289
+ $pid_filter = explode( ',', $filter_array['primary_id'] );
290
+ $pid_sql = ' AND ( ';
291
+
292
+ $counter = 1;
293
+ foreach( (array) $pid_filter as $pid ) {
294
+ $pid_sql .= $wpdb->prepare( "item_id = %s", trim( $pid ) );
295
+
296
+ if ( $counter != count( $pid_filter ) )
297
+ $pid_sql .= ' || ';
298
+
299
+ $counter++;
300
+ }
301
+
302
+ $pid_sql .= ' )';
303
+ }
304
305
+ if ( !empty( $filter_array['secondary_id'] ) ) {
306
+ $sid_filter = explode( ',', $filter_array['secondary_id'] );
307
+ $sid_sql = ' AND ( ';
308
+
309
+ $counter = 1;
310
+ foreach( (array) $sid_filter as $sid ) {
311
+ $sid_sql .= $wpdb->prepare( "secondary_item_id = %s", trim( $sid ) );
312
+
313
+ if ( $counter != count( $sid_filter ) )
314
+ $sid_sql .= ' || ';
315
+
316
+ $counter++;
317
+ }
318
+
319
+ $sid_sql .= ' )';
320
+ }
321
322
+ return $object_sql . $action_sql . $pid_sql . $sid_sql;
323
}
324
325
function get_last_updated() {
326
global $bp, $wpdb;
327
328
+ return $wpdb->get_var( $wpdb->prepare( "SELECT date_recorded FROM {$bp->activity->table_name} ORDER BY date_recorded ASC LIMIT 1" ) );
329
}
330
331
+ function check_exists_by_content( $content ) {
332
+ global $wpdb, $bp;
333
334
+ return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE content = %s", $content ) );
335
}
336
}
337
bp-activity/bp-activity-cssjs.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- function bp_activity_add_structure_css() {
4
- /* Enqueue the structure CSS file to give basic positional formatting for components */
5
- wp_enqueue_style( 'bp-activity-structure', BP_PLUGIN_URL . '/bp-activity/css/structure.css' );
6
- }
7
- add_action( 'bp_styles', 'bp_activity_add_structure_css' );
8
-
9
-
10
- ?>
bp-activity/bp-activity-filters.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
3
/* Apply WordPress defined filters */
4
- add_filter( 'bp_get_activity_content', 'wp_filter_kses', 1 );
5
add_filter( 'bp_get_activity_content', 'force_balance_tags' );
6
add_filter( 'bp_get_activity_content', 'wptexturize' );
7
add_filter( 'bp_get_activity_content', 'convert_smilies' );
@@ -10,11 +10,24 @@ add_filter( 'bp_get_activity_content', 'wpautop' );
10
add_filter( 'bp_get_activity_content', 'make_clickable' );
11
add_filter( 'bp_get_activity_content', 'stripslashes_deep' );
12
13
- function bp_activity_add_allowed_tags( $allowedtags ) {
14
- $allowedtags['span'] = array();
15
- $allowedtags['span']['class'] = array();
16
- return $allowedtags;
17
}
18
- add_filter( 'edit_allowedtags', 'bp_activity_add_allowed_tags', 1 );
19
20
?>
1
<?php
2
3
/* Apply WordPress defined filters */
4
+ add_filter( 'bp_get_activity_content', 'bp_activity_filter_kses', 1 );
5
add_filter( 'bp_get_activity_content', 'force_balance_tags' );
6
add_filter( 'bp_get_activity_content', 'wptexturize' );
7
add_filter( 'bp_get_activity_content', 'convert_smilies' );