bbPress - Version 2.2

Version Description

  • Improved user roles and capabilities
  • Improved theme compatibility
  • Improved BuddyPress Group Forums integration
  • Improved forums convertion tool
  • Improved forums tools and settings
  • Improved multisite support
  • Added What's New and Credits pages
  • WordPress 3.5 and BuddyPress 1.7 ready
Download this release

Release Info

Developer johnjamesjacoby
Plugin Icon 128x128 bbPress
Version 2.2
Comparing to
See all releases

Code changes from version 2.1.3 to 2.2

Files changed (158) hide show
  1. bbp-admin/bbp-users.php +0 -101
  2. bbp-admin/converters/vBulletin.php +0 -340
  3. bbp-includes/bbp-core-caps.php +0 -718
  4. bbp-includes/bbp-extend-buddypress.php +0 -2145
  5. bbp-theme-compat/bbpress/content-single-user-edit.php +0 -20
  6. bbp-theme-compat/bbpress/content-single-user.php +0 -24
  7. bbp-theme-compat/bbpress/form-forum.php +0 -190
  8. bbp-theme-compat/bbpress/form-reply.php +0 -194
  9. bbp-theme-compat/bbpress/form-topic-merge.php +0 -108
  10. bbp-theme-compat/bbpress/user-details.php +0 -40
  11. bbp-themes/bbp-twentyten/archive-forum.php +0 -30
  12. bbp-themes/bbp-twentyten/archive-topic.php +0 -30
  13. bbp-themes/bbp-twentyten/bbpress-functions.php +0 -307
  14. bbp-themes/bbp-twentyten/bbpress/content-archive-forum.php +0 -30
  15. bbp-themes/bbp-twentyten/bbpress/content-archive-topic.php +0 -34
  16. bbp-themes/bbp-twentyten/bbpress/content-single-forum.php +0 -54
  17. bbp-themes/bbp-twentyten/bbpress/content-single-reply.php +0 -30
  18. bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php +0 -77
  19. bbp-themes/bbp-twentyten/bbpress/content-single-topic.php +0 -54
  20. bbp-themes/bbp-twentyten/bbpress/content-single-user-edit.php +0 -22
  21. bbp-themes/bbp-twentyten/bbpress/content-single-user.php +0 -30
  22. bbp-themes/bbp-twentyten/bbpress/content-single-view.php +0 -34
  23. bbp-themes/bbp-twentyten/bbpress/content-topic-tag-edit.php +0 -24
  24. bbp-themes/bbp-twentyten/bbpress/feedback-logged-in.php +0 -14
  25. bbp-themes/bbp-twentyten/bbpress/feedback-no-access.php +0 -19
  26. bbp-themes/bbp-twentyten/bbpress/feedback-no-forums.php +0 -14
  27. bbp-themes/bbp-twentyten/bbpress/feedback-no-replies.php +0 -14
  28. bbp-themes/bbp-twentyten/bbpress/feedback-no-topics.php +0 -14
  29. bbp-themes/bbp-twentyten/bbpress/form-anonymous.php +0 -42
  30. bbp-themes/bbp-twentyten/bbpress/form-protected.php +0 -19
  31. bbp-themes/bbp-twentyten/bbpress/form-topic-split.php +0 -112
  32. bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php +0 -119
  33. bbp-themes/bbp-twentyten/bbpress/form-topic.php +0 -235
  34. bbp-themes/bbp-twentyten/bbpress/form-user-edit.php +0 -178
  35. bbp-themes/bbp-twentyten/bbpress/form-user-login.php +0 -41
  36. bbp-themes/bbp-twentyten/bbpress/form-user-lost-pass.php +0 -33
  37. bbp-themes/bbp-twentyten/bbpress/form-user-register.php +0 -42
  38. bbp-themes/bbp-twentyten/bbpress/loop-forums.php +0 -41
  39. bbp-themes/bbp-twentyten/bbpress/loop-replies.php +0 -69
  40. bbp-themes/bbp-twentyten/bbpress/loop-single-forum.php +0 -59
  41. bbp-themes/bbp-twentyten/bbpress/loop-single-reply.php +0 -60
  42. bbp-themes/bbp-twentyten/bbpress/loop-single-topic.php +0 -103
  43. bbp-themes/bbp-twentyten/bbpress/loop-topics.php +0 -41
  44. bbp-themes/bbp-twentyten/bbpress/pagination-replies.php +0 -28
  45. bbp-themes/bbp-twentyten/bbpress/pagination-topics.php +0 -28
  46. bbp-themes/bbp-twentyten/bbpress/user-details.php +0 -40
  47. bbp-themes/bbp-twentyten/bbpress/user-favorites.php +0 -37
  48. bbp-themes/bbp-twentyten/bbpress/user-subscriptions.php +0 -45
  49. bbp-themes/bbp-twentyten/bbpress/user-topics-created.php +0 -37
  50. bbp-themes/bbp-twentyten/css/bbpress-rtl.css +0 -687
  51. bbp-themes/bbp-twentyten/css/bbpress.css +0 -744
  52. bbp-themes/bbp-twentyten/js/topic.js +0 -87
  53. bbp-themes/bbp-twentyten/page-create-topic.php +0 -36
  54. bbp-themes/bbp-twentyten/page-forum-statistics.php +0 -122
  55. bbp-themes/bbp-twentyten/page-front-forums.php +0 -36
  56. bbp-themes/bbp-twentyten/page-front-topics.php +0 -36
  57. bbp-themes/bbp-twentyten/page-topic-tags.php +0 -42
  58. bbp-themes/bbp-twentyten/page-topics-no-replies.php +0 -54
  59. bbp-themes/bbp-twentyten/page-user-login.php +0 -42
  60. bbp-themes/bbp-twentyten/page-user-lost-pass.php +0 -42
  61. bbp-themes/bbp-twentyten/page-user-register.php +0 -42
  62. bbp-themes/bbp-twentyten/rtl.css +0 -16
  63. bbp-themes/bbp-twentyten/screenshot.png +0 -0
  64. bbp-themes/bbp-twentyten/single-forum-edit.php +0 -32
  65. bbp-themes/bbp-twentyten/single-forum.php +0 -42
  66. bbp-themes/bbp-twentyten/single-reply-edit.php +0 -32
  67. bbp-themes/bbp-twentyten/single-reply.php +0 -79
  68. bbp-themes/bbp-twentyten/single-topic-edit.php +0 -32
  69. bbp-themes/bbp-twentyten/single-topic-merge.php +0 -32
  70. bbp-themes/bbp-twentyten/single-topic-split.php +0 -32
  71. bbp-themes/bbp-twentyten/single-topic.php +0 -42
  72. bbp-themes/bbp-twentyten/single-user-edit.php +0 -27
  73. bbp-themes/bbp-twentyten/single-user.php +0 -27
  74. bbp-themes/bbp-twentyten/single-view.php +0 -30
  75. bbp-themes/bbp-twentyten/style.css +0 -16
  76. bbp-themes/bbp-twentyten/taxonomy-topic-tag-edit.php +0 -38
  77. bbp-themes/bbp-twentyten/taxonomy-topic-tag.php +0 -50
  78. bbpress.php +138 -105
  79. humans.txt +2 -2
  80. bbp-admin/bbp-actions.php → includes/admin/actions.php +13 -17
  81. bbp-admin/bbp-admin.php → includes/admin/admin.php +539 -68
  82. bbp-admin/bbp-converter.php → includes/admin/converter.php +6 -3
  83. {bbp-admin → includes/admin}/converters/Example.php +0 -0
  84. {bbp-admin → includes/admin}/converters/Invision.php +0 -0
  85. {bbp-admin → includes/admin}/converters/bbPress1.php +0 -0
  86. {bbp-admin → includes/admin}/converters/index.php +0 -0
  87. {bbp-admin → includes/admin}/converters/phpBB.php +0 -0
  88. includes/admin/converters/vBulletin.php +448 -0
  89. bbp-admin/bbp-forums.php → includes/admin/forums.php +6 -6
  90. bbp-admin/bbp-functions.php → includes/admin/functions.php +34 -1
  91. includes/admin/images/badge-2x.png +0 -0
  92. includes/admin/images/badge.png +0 -0
  93. {bbp-admin → includes/admin}/images/button-grad.png +0 -0
  94. {bbp-admin → includes/admin}/images/icons32-2x.png +0 -0
  95. {bbp-admin → includes/admin}/images/icons32.png +0 -0
  96. {bbp-admin → includes/admin}/images/index.php +0 -0
  97. {bbp-admin → includes/admin}/images/menu-2x.png +0 -0
  98. {bbp-admin → includes/admin}/images/menu.png +0 -0
  99. {bbp-admin → includes/admin}/index.php +0 -0
  100. bbp-admin/bbp-metaboxes.php → includes/admin/metaboxes.php +95 -88
  101. bbp-admin/bbp-parser.php → includes/admin/parser.php +0 -0
  102. bbp-admin/bbp-replies.php → includes/admin/replies.php +9 -4
  103. bbp-admin/bbp-settings.php → includes/admin/settings.php +143 -70
  104. bbp-admin/styles/admin.dev.css → includes/admin/styles/green-34.css +7 -5
  105. includes/admin/styles/green-34.dev.css +2080 -0
  106. bbp-admin/styles/admin.css → includes/admin/styles/green-34.min.css +1 -1
  107. includes/admin/styles/green.css +2086 -0
  108. includes/admin/styles/green.min.css +1 -0
  109. {bbp-admin → includes/admin}/styles/index.php +0 -0
  110. bbp-admin/bbp-tools.php → includes/admin/tools.php +193 -56
  111. bbp-admin/bbp-topics.php → includes/admin/topics.php +14 -6
  112. includes/admin/users.php +254 -0
  113. bbp-includes/bbp-core-classes.php → includes/common/classes.php +16 -7
  114. bbp-includes/bbp-common-functions.php → includes/common/functions.php +10 -4
  115. {bbp-includes → includes/common}/index.php +0 -0
  116. bbp-includes/bbp-core-shortcodes.php → includes/common/shortcodes.php +21 -57
  117. bbp-includes/bbp-common-template.php → includes/common/template-tags.php +172 -36
  118. bbp-includes/bbp-core-widgets.php → includes/common/widgets.php +55 -20
  119. bbp-includes/bbp-core-actions.php → includes/core/actions.php +72 -339
  120. bbp-includes/bbp-core-cache.php → includes/core/cache.php +21 -17
  121. includes/core/capabilities.php +564 -0
  122. includes/core/extend.php +69 -0
  123. bbp-includes/bbp-core-filters.php → includes/core/filters.php +27 -51
  124. bbp-includes/bbp-core-functions.php → includes/core/functions.php +108 -10
  125. includes/core/index.php +5 -0
  126. bbp-includes/bbp-core-options.php → includes/core/options.php +66 -16
  127. includes/core/sub-actions.php +391 -0
  128. bbp-includes/bbp-template-functions.php → includes/core/template-functions.php +144 -31
  129. bbp-includes/bbp-template-loader.php → includes/core/template-loader.php +63 -17
  130. bbp-includes/bbp-theme-compatibility.php → includes/core/theme-compat.php +95 -72
  131. bbp-includes/bbp-core-update.php → includes/core/update.php +58 -27
  132. bbp-includes/bbp-extend-akismet.php → includes/extend/akismet.php +7 -24
  133. includes/extend/buddypress/activity.php +708 -0
  134. includes/extend/buddypress/functions.php +455 -0
  135. includes/extend/buddypress/group.php +1101 -0
  136. includes/extend/buddypress/index.php +5 -0
  137. includes/extend/buddypress/loader.php +323 -0
  138. includes/extend/buddypress/members.php +143 -0
  139. includes/extend/index.php +5 -0
  140. includes/forums/capabilities.php +184 -0
  141. bbp-includes/bbp-forum-functions.php → includes/forums/functions.php +4 -6
  142. includes/forums/index.php +5 -0
  143. bbp-includes/bbp-forum-template.php → includes/forums/template-tags.php +58 -47
  144. includes/index.php +5 -0
  145. includes/replies/capabilities.php +183 -0
  146. bbp-includes/bbp-reply-functions.php → includes/replies/functions.php +147 -95
  147. includes/replies/index.php +5 -0
  148. bbp-includes/bbp-reply-template.php → includes/replies/template-tags.php +111 -37
  149. includes/topics/capabilities.php +232 -0
  150. bbp-includes/bbp-topic-functions.php → includes/topics/functions.php +165 -82
  151. includes/topics/index.php +5 -0
  152. bbp-includes/bbp-topic-template.php → includes/topics/template-tags.php +122 -41
  153. includes/users/capabilities.php +613 -0
  154. bbp-includes/bbp-user-functions.php → includes/users/functions.php +98 -413
  155. includes/users/index.php +5 -0
  156. bbp-includes/bbp-user-options.php → includes/users/options.php +29 -20
  157. bbp-includes/bbp-user-template.php → includes/users/template-tags.php +298 -104
  158. {bbp-languages → languages}/bbpress.pot +892 -452
bbp-admin/bbp-users.php DELETED
@@ -1,101 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * bbPress Users Admin Class
5
- *
6
- * @package bbPress
7
- * @subpackage Administration
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- if ( !class_exists( 'BBP_Users_Admin' ) ) :
14
- /**
15
- * Loads bbPress users admin area
16
- *
17
- * @package bbPress
18
- * @subpackage Administration
19
- * @since bbPress (r2464)
20
- */
21
- class BBP_Users_Admin {
22
-
23
- /** Variables *************************************************************/
24
-
25
- /** Functions *************************************************************/
26
-
27
- /**
28
- * The bbPress users admin loader
29
- *
30
- * @since bbPress (r2515)
31
- *
32
- * @uses BBP_Users_Admin::setup_globals() Setup the globals needed
33
- * @uses BBP_Users_Admin::setup_actions() Setup the hooks and actions
34
- */
35
- function __construct() {
36
- $this->setup_globals();
37
- $this->setup_actions();
38
- }
39
-
40
- /**
41
- * Setup the admin hooks, actions and filters
42
- *
43
- * @since bbPress (r2646)
44
- * @access private
45
- *
46
- * @uses add_action() To add various actions
47
- */
48
- function setup_actions() {
49
-
50
- // User profile edit/display actions
51
- add_action( 'edit_user_profile', array( $this, 'user_profile_forums' ) );
52
- add_action( 'show_user_profile', array( $this, 'user_profile_forums' ) );
53
-
54
- // User profile save actions
55
- add_action( 'personal_options_update', array( $this, 'user_profile_update' ) );
56
- add_action( 'edit_user_profile_update', array( $this, 'user_profile_update' ) );
57
- }
58
-
59
- /**
60
- * Admin globals
61
- *
62
- * @since bbPress (r2646)
63
- * @access private
64
- */
65
- function setup_globals() { }
66
-
67
- /**
68
- * Add some general styling to the admin area
69
- *
70
- * @since bbPress (r2464)
71
- *
72
- * @uses bbp_get_forum_post_type() To get the forum post type
73
- * @uses bbp_get_topic_post_type() To get the topic post type
74
- * @uses bbp_get_reply_post_type() To get the reply post type
75
- * @uses sanitize_html_class() To sanitize the classes
76
- */
77
- function admin_head() { }
78
-
79
- /**
80
- * Responsible for saving additional profile options and settings
81
- *
82
- * @since bbPress (r2464)
83
- *
84
- * @param $user_id The user id
85
- * @uses do_action() Calls 'bbp_user_profile_update'
86
- * @return bool Always false
87
- */
88
- function user_profile_update( $user_id ) { }
89
-
90
- /**
91
- * Responsible for saving additional profile options and settings
92
- *
93
- * @since bbPress (r2464)
94
- *
95
- * @param WP_User $profileuser User data
96
- * @uses do_action() Calls 'bbp_user_profile_forums'
97
- * @return bool Always false
98
- */
99
- function user_profile_forums( $profileuser ) { }
100
- }
101
- endif; // class exists
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-admin/converters/vBulletin.php DELETED
@@ -1,340 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Implementation of vBulletin converter.
5
- */
6
- class vBulletin extends BBP_Converter_Base
7
- {
8
- function __construct()
9
- {
10
- parent::__construct();
11
- $this->setup_globals();
12
- }
13
-
14
- public function setup_globals()
15
- {
16
- /** Forum Section ******************************************************/
17
-
18
- // Forum id. Stored in postmeta.
19
- $this->field_map[] = array(
20
- 'from_tablename' => 'forum', 'from_fieldname' => 'forumid',
21
- 'to_type' => 'forum', 'to_fieldname' => '_bbp_forum_id'
22
- );
23
-
24
- // Forum parent id. If no parent, than 0. Stored in postmeta.
25
- $this->field_map[] = array(
26
- 'from_tablename' => 'forum', 'from_fieldname' => 'parentid',
27
- 'to_type' => 'forum', 'to_fieldname' => '_bbp_parent_id'
28
- );
29
-
30
- // Forum title.
31
- $this->field_map[] = array(
32
- 'from_tablename' => 'forum', 'from_fieldname' => 'title',
33
- 'to_type' => 'forum', 'to_fieldname' => 'post_title'
34
- );
35
-
36
- // Forum slug. Clean name.
37
- $this->field_map[] = array(
38
- 'from_tablename' => 'forum', 'from_fieldname' => 'title_clean',
39
- 'to_type' => 'forum', 'to_fieldname' => 'post_name',
40
- 'callback_method' => 'callback_slug'
41
- );
42
-
43
- // Forum description.
44
- $this->field_map[] = array(
45
- 'from_tablename' => 'forum', 'from_fieldname' => 'description',
46
- 'to_type' => 'forum', 'to_fieldname' => 'post_content',
47
- 'callback_method' => 'callback_null'
48
- );
49
-
50
- // Forum display order. Starts from 1.
51
- $this->field_map[] = array(
52
- 'from_tablename' => 'forum', 'from_fieldname' => 'displayorder',
53
- 'to_type' => 'forum', 'to_fieldname' => 'menu_order'
54
- );
55
-
56
- // Forum date update.
57
- $this->field_map[] = array(
58
- 'to_type' => 'forum', 'to_fieldname' => 'post_date',
59
- 'default' => date('Y-m-d H:i:s')
60
- );
61
- $this->field_map[] = array(
62
- 'to_type' => 'forum', 'to_fieldname' => 'post_date_gmt',
63
- 'default' => date('Y-m-d H:i:s')
64
- );
65
- $this->field_map[] = array(
66
- 'to_type' => 'forum', 'to_fieldname' => 'post_modified',
67
- 'default' => date('Y-m-d H:i:s')
68
- );
69
- $this->field_map[] = array(
70
- 'to_type' => 'forum', 'to_fieldname' => 'post_modified_gmt',
71
- 'default' => date('Y-m-d H:i:s')
72
- );
73
-
74
- /** Topic Section ******************************************************/
75
-
76
- // Topic id. Stored in postmeta.
77
- $this->field_map[] = array(
78
- 'from_tablename' => 'thread', 'from_fieldname' => 'threadid',
79
- 'to_type' => 'topic', 'to_fieldname' => '_bbp_topic_id'
80
- );
81
-
82
- // Forum id. Stored in postmeta.
83
- $this->field_map[] = array(
84
- 'from_tablename' => 'thread', 'from_fieldname' => 'forumid',
85
- 'to_type' => 'topic', 'to_fieldname' => '_bbp_forum_id',
86
- 'callback_method' => 'callback_forumid'
87
- );
88
-
89
- // Topic author.
90
- $this->field_map[] = array(
91
- 'from_tablename' => 'thread', 'from_fieldname' => 'postuserid',
92
- 'to_type' => 'topic', 'to_fieldname' => 'post_author',
93
- 'callback_method' => 'callback_userid'
94
- );
95
-
96
- // Topic content.
97
- $this->field_map[] = array(
98
- 'from_tablename' => 'post', 'from_fieldname' => 'pagetext',
99
- 'join_tablename' => 'thread', 'join_type' => 'INNER', 'join_expression' => 'USING (threadid) WHERE post.parentid = 0',
100
- 'to_type' => 'topic', 'to_fieldname' => 'post_content',
101
- 'callback_method' => 'callback_html'
102
- );
103
-
104
- // Topic title.
105
- $this->field_map[] = array(
106
- 'from_tablename' => 'thread', 'from_fieldname' => 'title',
107
- 'to_type' => 'topic', 'to_fieldname' => 'post_title'
108
- );
109
-
110
- // Topic slug. Clean name.
111
- $this->field_map[] = array(
112
- 'from_tablename' => 'thread', 'from_fieldname' => 'title',
113
- 'to_type' => 'topic', 'to_fieldname' => 'post_name',
114
- 'callback_method' => 'callback_slug'
115
- );
116
-
117
- // Forum id. If no parent, than 0.
118
- $this->field_map[] = array(
119
- 'from_tablename' => 'thread', 'from_fieldname' => 'forumid',
120
- 'to_type' => 'topic', 'to_fieldname' => 'post_parent',
121
- 'callback_method' => 'callback_forumid'
122
- );
123
-
124
- // Topic date update.
125
- $this->field_map[] = array(
126
- 'from_tablename' => 'thread', 'from_fieldname' => 'dateline',
127
- 'to_type' => 'topic', 'to_fieldname' => 'post_date',
128
- 'callback_method' => 'callback_datetime'
129
- );
130
- $this->field_map[] = array(
131
- 'from_tablename' => 'thread', 'from_fieldname' => 'dateline',
132
- 'to_type' => 'topic', 'to_fieldname' => 'post_date_gmt',
133
- 'callback_method' => 'callback_datetime'
134
- );
135
- $this->field_map[] = array(
136
- 'from_tablename' => 'thread', 'from_fieldname' => 'dateline',
137
- 'to_type' => 'topic', 'to_fieldname' => 'post_modified',
138
- 'callback_method' => 'callback_datetime'
139
- );
140
- $this->field_map[] = array(
141
- 'from_tablename' => 'thread', 'from_fieldname' => 'dateline',
142
- 'to_type' => 'topic', 'to_fieldname' => 'post_modified_gmt',
143
- 'callback_method' => 'callback_datetime'
144
- );
145
-
146
- /** Tags Section ******************************************************/
147
-
148
- // Topic id.
149
- $this->field_map[] = array(
150
- 'from_tablename' => 'tagcontent', 'from_fieldname' => 'contentid',
151
- 'to_type' => 'tags', 'to_fieldname' => 'objectid',
152
- 'callback_method' => 'callback_topicid'
153
- );
154
-
155
- // Tags text.
156
- $this->field_map[] = array(
157
- 'from_tablename' => 'tag', 'from_fieldname' => 'tagtext',
158
- 'join_tablename' => 'tagcontent', 'join_type' => 'INNER', 'join_expression' => 'USING (tagid)',
159
- 'to_type' => 'tags', 'to_fieldname' => 'name'
160
- );
161
-
162
- /** Post Section ******************************************************/
163
-
164
- // Post id. Stores in postmeta.
165
- $this->field_map[] = array(
166
- 'from_tablename' => 'post', 'from_fieldname' => 'postid', 'from_expression' => 'WHERE post.parentid != 0',
167
- 'to_type' => 'reply', 'to_fieldname' => '_bbp_post_id'
168
- );
169
-
170
- // Forum id. Stores in postmeta.
171
- $this->field_map[] = array(
172
- 'from_tablename' => 'post', 'from_fieldname' => 'threadid',
173
- 'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id',
174
- 'callback_method' => 'callback_topicid_to_forumid'
175
- );
176
-
177
- // Topic id. Stores in postmeta.
178
- $this->field_map[] = array(
179
- 'from_tablename' => 'post', 'from_fieldname' => 'threadid',
180
- 'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id',
181
- 'callback_method' => 'callback_topicid'
182
- );
183
-
184
- // Author ip.
185
- $this->field_map[] = array(
186
- 'from_tablename' => 'post', 'from_fieldname' => 'ipaddress',
187
- 'to_type' => 'reply', 'to_fieldname' => '__bbp_author_ip'
188
- );
189
-
190
- // Post author.
191
- $this->field_map[] = array(
192
- 'from_tablename' => 'post', 'from_fieldname' => 'userid',
193
- 'to_type' => 'reply', 'to_fieldname' => 'post_author',
194
- 'callback_method' => 'callback_userid'
195
- );
196
-
197
- // Topic title.
198
- $this->field_map[] = array(
199
- 'from_tablename' => 'post', 'from_fieldname' => 'title',
200
- 'to_type' => 'reply', 'to_fieldname' => 'post_title'
201
- );
202
-
203
- // Topic slug. Clean name.
204
- $this->field_map[] = array(
205
- 'from_tablename' => 'post', 'from_fieldname' => 'title',
206
- 'to_type' => 'reply', 'to_fieldname' => 'post_name',
207
- 'callback_method' => 'callback_slug'
208
- );
209
-
210
- // Post content.
211
- $this->field_map[] = array(
212
- 'from_tablename' => 'post', 'from_fieldname' => 'pagetext',
213
- 'to_type' => 'reply', 'to_fieldname' => 'post_content',
214
- 'callback_method' => 'callback_html'
215
- );
216
-
217
- // Topic id. If no parent, than 0.
218
- $this->field_map[] = array(
219
- 'from_tablename' => 'post', 'from_fieldname' => 'threadid',
220
- 'to_type' => 'reply', 'to_fieldname' => 'post_parent',
221
- 'callback_method' => 'callback_topicid'
222
- );
223
-
224
- // Topic date update.
225
- $this->field_map[] = array(
226
- 'from_tablename' => 'post', 'from_fieldname' => 'dateline',
227
- 'to_type' => 'reply', 'to_fieldname' => 'post_date',
228
- 'callback_method' => 'callback_datetime'
229
- );
230
- $this->field_map[] = array(
231
- 'from_tablename' => 'post', 'from_fieldname' => 'dateline',
232
- 'to_type' => 'reply', 'to_fieldname' => 'post_date_gmt',
233
- 'callback_method' => 'callback_datetime'
234
- );
235
- $this->field_map[] = array(
236
- 'from_tablename' => 'post', 'from_fieldname' => 'dateline',
237
- 'to_type' => 'reply', 'to_fieldname' => 'post_modified',
238
- 'callback_method' => 'callback_datetime'
239
- );
240
- $this->field_map[] = array(
241
- 'from_tablename' => 'post', 'from_fieldname' => 'dateline',
242
- 'to_type' => 'reply', 'to_fieldname' => 'post_modified_gmt',
243
- 'callback_method' => 'callback_datetime'
244
- );
245
-
246
- /** User Section ******************************************************/
247
-
248
- // Store old User id. Stores in usermeta.
249
- $this->field_map[] = array(
250
- 'from_tablename' => 'user', 'from_fieldname' => 'userid',
251
- 'to_type' => 'user', 'to_fieldname' => '_bbp_user_id'
252
- );
253
-
254
- // Store old User password. Stores in usermeta serialized with salt.
255
- $this->field_map[] = array(
256
- 'from_tablename' => 'user', 'from_fieldname' => 'password',
257
- 'to_type' => 'user', 'to_fieldname' => '_bbp_password',
258
- 'callback_method' => 'callback_savepass'
259
- );
260
-
261
- // Store old User Salt. This is only used for the SELECT row info for the above password save
262
- $this->field_map[] = array(
263
- 'from_tablename' => 'user', 'from_fieldname' => 'salt',
264
- 'to_type' => 'user', 'to_fieldname' => ''
265
- );
266
-
267
- // User password verify class. Stores in usermeta for verifying password.
268
- $this->field_map[] = array(
269
- 'to_type' => 'user', 'to_fieldname' => '_bbp_class',
270
- 'default' => 'vBulletin'
271
- );
272
-
273
- // User name.
274
- $this->field_map[] = array(
275
- 'from_tablename' => 'user', 'from_fieldname' => 'username',
276
- 'to_type' => 'user', 'to_fieldname' => 'user_login'
277
- );
278
-
279
- // User email.
280
- $this->field_map[] = array(
281
- 'from_tablename' => 'user', 'from_fieldname' => 'email',
282
- 'to_type' => 'user', 'to_fieldname' => 'user_email'
283
- );
284
-
285
- // User homepage.
286
- $this->field_map[] = array(
287
- 'from_tablename' => 'user', 'from_fieldname' => 'homepage',
288
- 'to_type' => 'user', 'to_fieldname' => 'user_url'
289
- );
290
-
291
- // User registered.
292
- $this->field_map[] = array(
293
- 'from_tablename' => 'user', 'from_fieldname' => 'joindate',
294
- 'to_type' => 'user', 'to_fieldname' => 'user_registered',
295
- 'callback_method' => 'callback_datetime'
296
- );
297
-
298
- // User aim.
299
- $this->field_map[] = array(
300
- 'from_tablename' => 'user', 'from_fieldname' => 'aim',
301
- 'to_type' => 'user', 'to_fieldname' => 'aim'
302
- );
303
-
304
- // User yahoo.
305
- $this->field_map[] = array(
306
- 'from_tablename' => 'user', 'from_fieldname' => 'yahoo',
307
- 'to_type' => 'user', 'to_fieldname' => 'yim'
308
- );
309
- }
310
-
311
- /**
312
- * This method allows us to indicates what is or is not converted for each
313
- * converter.
314
- */
315
- public function info()
316
- {
317
- return '';
318
- }
319
-
320
- /**
321
- * This method is to save the salt and password together. That
322
- * way when we authenticate it we can get it out of the database
323
- * as one value. Array values are auto sanitized by wordpress.
324
- */
325
- public function callback_savepass( $field, $row )
326
- {
327
- $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
328
- return $pass_array;
329
- }
330
-
331
- /**
332
- * This method is to take the pass out of the database and compare
333
- * to a pass the user has typed in.
334
- */
335
- public function authenticate_pass( $password, $serialized_pass )
336
- {
337
- $pass_array = unserialize( $serialized_pass );
338
- return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
339
- }
340
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-includes/bbp-core-caps.php DELETED
@@ -1,718 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * bbPress Capabilites
5
- *
6
- * @package bbPress
7
- * @subpackage Capabilities
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- /**
14
- * Adds bbPress-specific user roles.
15
- *
16
- * This is called on plugin activation.
17
- *
18
- * @since bbPress (r2741)
19
- *
20
- * @uses get_option() To get the default role
21
- * @uses get_role() To get the default role object
22
- * @uses add_role() To add our own roles
23
- * @uses do_action() Calls 'bbp_add_roles'
24
- */
25
- function bbp_add_roles() {
26
-
27
- // Get new role names
28
- $moderator_role = bbp_get_moderator_role();
29
- $participant_role = bbp_get_participant_role();
30
-
31
- // Add the Moderator role and add the default role caps.
32
- // Mod caps are added by the bbp_add_caps() function
33
- $default = get_role( get_option( 'default_role' ) );
34
-
35
- // If role does not exist, default to read cap
36
- if ( empty( $default->capabilities ) )
37
- $default->capabilities = array( 'read' );
38
-
39
- // Moderators are default role + forum moderating caps in bbp_add_caps()
40
- add_role( $moderator_role, 'Forum Moderator', $default->capabilities );
41
-
42
- // Forum Subscribers are auto added to sites with global forums
43
- add_role( $participant_role, 'Forum Participant', $default->capabilities );
44
-
45
- do_action( 'bbp_add_roles' );
46
- }
47
-
48
- /**
49
- * Adds capabilities to WordPress user roles.
50
- *
51
- * This is called on plugin activation.
52
- *
53
- * @since bbPress (r2608)
54
- *
55
- * @uses get_role() To get the administrator, default and moderator roles
56
- * @uses WP_Role::add_cap() To add various capabilities
57
- * @uses do_action() Calls 'bbp_add_caps'
58
- */
59
- function bbp_add_caps() {
60
- global $wp_roles;
61
-
62
- // Load roles if not set
63
- if ( ! isset( $wp_roles ) )
64
- $wp_roles = new WP_Roles();
65
-
66
- // Loop through available roles
67
- foreach( $wp_roles->roles as $role => $details ) {
68
-
69
- // Load this role
70
- $this_role = get_role( $role );
71
-
72
- // Loop through caps for this role and remove them
73
- foreach ( bbp_get_caps_for_role( $role ) as $cap ) {
74
- $this_role->add_cap( $cap );
75
- }
76
- }
77
-
78
- do_action( 'bbp_add_caps' );
79
- }
80
-
81
- /**
82
- * Removes capabilities from WordPress user roles.
83
- *
84
- * This is called on plugin deactivation.
85
- *
86
- * @since bbPress (r2608)
87
- *
88
- * @uses get_role() To get the administrator and default roles
89
- * @uses WP_Role::remove_cap() To remove various capabilities
90
- * @uses do_action() Calls 'bbp_remove_caps'
91
- */
92
- function bbp_remove_caps() {
93
- global $wp_roles;
94
-
95
- // Load roles if not set
96
- if ( ! isset( $wp_roles ) )
97
- $wp_roles = new WP_Roles();
98
-
99
- // Loop through available roles
100
- foreach( $wp_roles->roles as $role => $details ) {
101
-
102
- // Load this role
103
- $this_role = get_role( $role );
104
-
105
- // Loop through caps for this role and remove them
106
- foreach ( bbp_get_caps_for_role( $role ) as $cap ) {
107
- $this_role->remove_cap( $cap );
108
- }
109
- }
110
-
111
- do_action( 'bbp_remove_caps' );
112
- }
113
-
114
- /**
115
- * Removes bbPress-specific user roles.
116
- *
117
- * This is called on plugin deactivation.
118
- *
119
- * @since bbPress (r2741)
120
- *
121
- * @uses remove_role() To remove our roles
122
- * @uses do_action() Calls 'bbp_remove_roles'
123
- */
124
- function bbp_remove_roles() {
125
-
126
- // Get new role names
127
- $moderator_role = bbp_get_moderator_role();
128
- $participant_role = bbp_get_participant_role();
129
-
130
- // Remove the Moderator role
131
- remove_role( $moderator_role );
132
-
133
- // Remove the Moderator role
134
- remove_role( $participant_role );
135
-
136
- do_action( 'bbp_remove_roles' );
137
- }
138
-
139
- /**
140
- * Maps forum/topic/reply caps to built in WordPress caps
141
- *
142
- * @since bbPress (r2593)
143
- *
144
- * @param array $caps Capabilities for meta capability
145
- * @param string $cap Capability name
146
- * @param int $user_id User id
147
- * @param mixed $args Arguments
148
- * @uses get_post() To get the post
149
- * @uses get_post_type_object() To get the post type object
150
- * @uses apply_filters() Calls 'bbp_map_meta_caps' with caps, cap, user id and
151
- * args
152
- * @return array Actual capabilities for meta capability
153
- */
154
- function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
155
-
156
- // What capability is being checked?
157
- switch ( $cap ) {
158
-
159
- /** Reading ***********************************************************/
160
-
161
- case 'read_forum' :
162
- case 'read_topic' :
163
- case 'read_reply' :
164
-
165
- // Get the post
166
- $_post = get_post( $args[0] );
167
- if ( !empty( $_post ) ) {
168
-
169
- // Get caps for post type object
170
- $post_type = get_post_type_object( $_post->post_type );
171
- $caps = array();
172
-
173
- // Post is public
174
- if ( bbp_get_public_status_id() == $_post->post_status ) {
175
- $caps[] = 'read';
176
-
177
- // User is author so allow read
178
- } elseif ( (int) $user_id == (int) $_post->post_author ) {
179
- $caps[] = 'read';
180
-
181
- // Unknown so map to private posts
182
- } else {
183
- $caps[] = $post_type->cap->read_private_posts;
184
- }
185
- }
186
-
187
- break;
188
-
189
- /** Publishing ********************************************************/
190
-
191
- case 'publish_forums' :
192
- case 'publish_topics' :
193
- case 'publish_replies' :
194
-
195
- // Add do_not_allow cap if user is spam or deleted
196
- if ( bbp_is_user_inactive( $user_id ) )
197
- $caps = array( 'do_not_allow' );
198
-
199
- break;
200
-
201
- /** Editing ***********************************************************/
202
-
203
- // Used primarily in wp-admin
204
- case 'edit_forums' :
205
- case 'edit_topics' :
206
- case 'edit_replies' :
207
-
208
- // Add do_not_allow cap if user is spam or deleted
209
- if ( bbp_is_user_inactive( $user_id ) )
210
- $caps = array( 'do_not_allow' );
211
-
212
- break;
213
-
214
- // Used everywhere
215
- case 'edit_forum' :
216
- case 'edit_topic' :
217
- case 'edit_reply' :
218
-
219
- // Get the post
220
- $_post = get_post( $args[0] );
221
- if ( !empty( $_post ) ) {
222
-
223
- // Get caps for post type object
224
- $post_type = get_post_type_object( $_post->post_type );
225
- $caps = array();
226
-
227
- // Add 'do_not_allow' cap if user is spam or deleted
228
- if ( bbp_is_user_inactive( $user_id ) ) {
229
- $caps[] = 'do_not_allow';
230
-
231
- // User is author so allow edit
232
- } elseif ( (int) $user_id == (int) $_post->post_author ) {
233
- $caps[] = $post_type->cap->edit_posts;
234
-
235
- // Unknown, so map to edit_others_posts
236
- } else {
237
- $caps[] = $post_type->cap->edit_others_posts;
238
- }
239
- }
240
-
241
- break;
242
-
243
- /** Deleting **********************************************************/
244
-
245
- // Allow forum authors to delete forums (for BuddyPress groups, etc)
246
- case 'delete_forum' :
247
-
248
- // Get the post
249
- $_post = get_post( $args[0] );
250
- if ( !empty( $_post ) ) {
251
-
252
- // Get caps for post type object
253
- $post_type = get_post_type_object( $_post->post_type );
254
- $caps = array();
255
-
256
- // Add 'do_not_allow' cap if user is spam or deleted
257
- if ( bbp_is_user_inactive( $user_id ) ) {
258
- $caps[] = 'do_not_allow';
259
-
260
- // User is author so allow to delete
261
- } elseif ( (int) $user_id == (int) $_post->post_author ) {
262
- $caps[] = $post_type->cap->delete_posts;
263
-
264
- // Unknown so map to delete_others_posts
265
- } else {
266
- $caps[] = $post_type->cap->delete_others_posts;
267
- }
268
- }
269
-
270
- break;
271
-
272
- case 'delete_topic' :
273
- case 'delete_reply' :
274
-
275
- // Get the post
276
- $_post = get_post( $args[0] );
277
- if ( !empty( $_post ) ) {
278
-
279
- // Get caps for post type object
280
- $post_type = get_post_type_object( $_post->post_type );
281
- $caps = array();
282
-
283
- // Add 'do_not_allow' cap if user is spam or deleted
284
- if ( bbp_is_user_inactive( $user_id ) ) {
285
- $caps[] = 'do_not_allow';
286
-
287
- // Unknown so map to delete_others_posts
288
- } else {
289
- $caps[] = $post_type->cap->delete_others_posts;
290
- }
291
- }
292
-
293
- break;
294
- }
295
-
296
- return apply_filters( 'bbp_map_meta_caps', $caps, $cap, $user_id, $args );
297
- }
298
-
299
- /**
300
- * Return forum capabilities
301
- *
302
- * @since bbPress (r2593)
303
- *
304
- * @uses apply_filters() Calls 'bbp_get_forum_caps' with the capabilities
305
- * @return array Forum capabilities
306
- */
307
- function bbp_get_forum_caps() {
308
-
309
- // Forum meta caps
310
- $caps = array (
311
- 'delete_posts' => 'delete_forums',
312
- 'delete_others_posts' => 'delete_others_forums'
313
- );
314
-
315
- return apply_filters( 'bbp_get_forum_caps', $caps );
316
- }
317
-
318
- /**
319
- * Return topic capabilities
320
- *
321
- * @since bbPress (r2593)
322
- *
323
- * @uses apply_filters() Calls 'bbp_get_topic_caps' with the capabilities
324
- * @return array Topic capabilities
325
- */
326
- function bbp_get_topic_caps() {
327
-
328
- // Topic meta caps
329
- $caps = array (
330
- 'delete_posts' => 'delete_topics',
331
- 'delete_others_posts' => 'delete_others_topics'
332
- );
333
-
334
- return apply_filters( 'bbp_get_topic_caps', $caps );
335
- }
336
-
337
- /**
338
- * Return reply capabilities
339
- *
340
- * @since bbPress (r2593)
341
- *
342
- * @uses apply_filters() Calls 'bbp_get_reply_caps' with the capabilities
343
- * @return array Reply capabilities
344
- */
345
- function bbp_get_reply_caps () {
346
-
347
- // Reply meta caps
348
- $caps = array (
349
- 'edit_posts' => 'edit_replies',
350
- 'edit_others_posts' => 'edit_others_replies',
351
- 'publish_posts' => 'publish_replies',
352
- 'read_private_posts' => 'read_private_replies',
353
- 'delete_posts' => 'delete_replies',
354
- 'delete_others_posts' => 'delete_others_replies'
355
- );
356
-
357
- return apply_filters( 'bbp_get_reply_caps', $caps );
358
- }
359
-
360
- /**
361
- * Return topic tag capabilities
362
- *
363
- * @since bbPress (r2593)
364
- *
365
- * @uses apply_filters() Calls 'bbp_get_topic_tag_caps' with the capabilities
366
- * @return array Topic tag capabilities
367
- */
368
- function bbp_get_topic_tag_caps () {
369
-
370
- // Topic tag meta caps
371
- $caps = array (
372
- 'manage_terms' => 'manage_topic_tags',
373
- 'edit_terms' => 'edit_topic_tags',
374
- 'delete_terms' => 'delete_topic_tags',
375
- 'assign_terms' => 'assign_topic_tags'
376
- );
377
-
378
- return apply_filters( 'bbp_get_topic_tag_caps', $caps );
379
- }
380
-
381
-
382
- /**
383
- * Returns an array of capabilities based on the role that is being requested.
384
- *
385
- * @since bbPress (r2994)
386
- *
387
- * @param string $role Optional. Defaults to The role to load caps for
388
- * @uses apply_filters() Allow return value to be filtered
389
- *
390
- * @return array Capabilities for $role
391
- */
392
- function bbp_get_caps_for_role( $role = '' ) {
393
-
394
- // Which role are we looking for?
395
- switch ( $role ) {
396
-
397
- // Administrator
398
- case 'administrator' :
399
-
400
- $caps = array(
401
-
402
- // Forum caps
403
- 'publish_forums',
404
- 'edit_forums',
405
- 'edit_others_forums',
406
- 'delete_forums',
407
- 'delete_others_forums',
408
- 'read_private_forums',
409
- 'read_hidden_forums',
410
-
411
- // Topic caps
412
- 'publish_topics',
413
- 'edit_topics',
414
- 'edit_others_topics',
415
- 'delete_topics',
416
- 'delete_others_topics',
417
- 'read_private_topics',
418
-
419
- // Reply caps
420
- 'publish_replies',
421
- 'edit_replies',
422
- 'edit_others_replies',
423
- 'delete_replies',
424
- 'delete_others_replies',
425
- 'read_private_replies',
426
-
427
- // Topic tag caps
428
- 'manage_topic_tags',
429
- 'edit_topic_tags',
430
- 'delete_topic_tags',
431
- 'assign_topic_tags',
432
-
433
- // Misc
434
- 'moderate',
435
- 'throttle',
436
- 'view_trash'
437
- );
438
-
439
- break;
440
-
441
- // Moderator
442
- case bbp_get_moderator_role() :
443
-
444
- $caps = array(
445
-
446
- // Forum caps
447
- 'read_private_forums',
448
- 'read_hidden_forums',
449
-
450
- // Topic caps
451
- 'publish_topics',
452
- 'edit_topics',
453
- 'edit_others_topics',
454
- 'delete_topics',
455
- 'delete_others_topics',
456
- 'read_private_topics',
457
-
458
- // Reply caps
459
- 'publish_replies',
460
- 'edit_replies',
461
- 'edit_others_replies',
462
- 'delete_replies',
463
- 'delete_others_replies',
464
- 'read_private_replies',
465
-
466
- // Topic tag caps
467
- 'manage_topic_tags',
468
- 'edit_topic_tags',
469
- 'delete_topic_tags',
470
- 'assign_topic_tags',
471
-
472
- // Misc
473
- 'moderate',
474
- 'throttle',
475
- 'view_trash'
476
- );
477
-
478
- break;
479
-
480
- // WordPress Core Roles
481
- case 'editor' :
482
- case 'author' :
483
- case 'contributor' :
484
- case 'subscriber' :
485
-
486
- // bbPress Participant Role
487
- case bbp_get_participant_role() :
488
-
489
- // Any other role
490
- default :
491
-
492
- $caps = array(
493
-
494
- // Forum caps
495
- 'read_private_forums',
496
-
497
- // Topic caps
498
- 'publish_topics',
499
- 'edit_topics',
500
-
501
- // Reply caps
502
- 'publish_replies',
503
- 'edit_replies',
504
-
505
- // Topic tag caps
506
- 'assign_topic_tags'
507
- );
508
-
509
- break;
510
- }
511
-
512
- return apply_filters( 'bbp_get_caps_for_role', $caps, $role );
513
- }
514
-
515
- /**
516
- * Give a user the default 'Forum Participant' role when creating a topic/reply
517
- * on a site they do not have a role or capability on.
518
- *
519
- * @since bbPress (r3410)
520
- *
521
- * @uses bbp_allow_global_access()
522
- * @uses bbp_is_user_inactive()
523
- * @uses is_user_logged_in()
524
- * @uses current_user_can()
525
- * @uses WP_User::set_role()
526
- *
527
- * @return If user is not spam/deleted or is already capable
528
- */
529
- function bbp_global_access_auto_role() {
530
-
531
- // Bail if not multisite or forum is not global
532
- if ( ! bbp_allow_global_access() )
533
- return;
534
-
535
- // Bail if user is not active
536
- if ( bbp_is_user_inactive() )
537
- return;
538
-
539
- // Bail if user is not logged in
540
- if ( !is_user_logged_in() )
541
- return;
542
-
543
- // Give the user the 'Forum Participant' role
544
- if ( current_user_can( 'bbp_masked' ) ) {
545
-
546
- // Get the default role
547
- $default_role = bbp_get_participant_role();
548
-
549
- // Set the current users default role
550
- bbpress()->current_user->set_role( $default_role );
551
- }
552
- }
553
-
554
- /**
555
- * The participant role for registered users without roles
556
- *
557
- * This is primarily for multisite compatibility when users without roles on
558
- * sites that have global forums enabled want to create topics and replies
559
- *
560
- * @since bbPress (r3860)
561
- *
562
- * @uses apply_filters() Allow override of hardcoded anonymous role
563
- * @return string
564
- */
565
- function bbp_get_anonymous_role() {
566
- return apply_filters( 'bbp_get_anonymous_role', 'bbp_anonymous' );
567
- }
568
-
569
- /**
570
- * The participant role for registered users without roles
571
- *
572
- * This is primarily for multisite compatibility when users without roles on
573
- * sites that have global forums enabled want to create topics and replies
574
- *
575
- * @since bbPress (r3410)
576
- *
577
- * @uses apply_filters() Allow override of hardcoded participant role
578
- * @return string
579
- */
580
- function bbp_get_participant_role() {
581
- return apply_filters( 'bbp_get_participant_role', 'bbp_participant' );
582
- }
583
-
584
- /**
585
- * The moderator role for bbPress users
586
- *
587
- * @since bbPress (r3410)
588
- *
589
- * @param string $role
590
- * @uses apply_filters() Allow override of hardcoded moderator role
591
- * @return string
592
- */
593
- function bbp_get_moderator_role() {
594
- return apply_filters( 'bbp_get_moderator_role', 'bbp_moderator' );
595
- }
596
-
597
- /**
598
- * Add the default role and mapped bbPress caps to the current user if needed
599
- *
600
- * This function will bail if the forum is not global in a multisite
601
- * installation of WordPress, or if the user is marked as spam or deleted.
602
- *
603
- * @since bbPress (r3380)
604
- *
605
- * @uses bbp_allow_global_access()
606
- * @uses bbp_is_user_inactive()
607
- * @uses is_user_logged_in()
608
- * @uses current_user_can()
609
- * @uses get_option()
610
- * @uses bbp_get_caps_for_role()
611
- *
612
- * @return If not multisite, not global, or user is deleted/spammed
613
- */
614
- function bbp_global_access_role_mask() {
615
-
616
- // Bail if not multisite or forum is not global
617
- if ( ! bbp_allow_global_access() )
618
- return;
619
-
620
- // Bail if user is marked as spam or is deleted
621
- if ( bbp_is_user_inactive() )
622
- return;
623
-
624
- // Normal user is logged in but has no caps
625
- if ( is_user_logged_in() && !current_user_can( 'read' ) ) {
626
-
627
- // Assign user the minimal participant role to map caps to
628
- $default_role = bbp_get_participant_role();
629
-
630
- // Get bbPress caps for the default role
631
- $caps_for_role = bbp_get_caps_for_role( $default_role );
632
-
633
- // Set all caps to true
634
- foreach ( $caps_for_role as $cap ) {
635
- $mapped_meta_caps[$cap] = true;
636
- }
637
-
638
- // Add 'read' cap just in case
639
- $mapped_meta_caps['read'] = true;
640
- $mapped_meta_caps['bbp_masked'] = true;
641
-
642
- // Allow global access caps to be manipulated
643
- $mapped_meta_caps = apply_filters( 'bbp_global_access_mapped_meta_caps', $mapped_meta_caps );
644
-
645
- // Assign the role and mapped caps to the current user
646
- $bbp = bbpress();
647
- $bbp->current_user->roles[0] = $default_role;
648
- $bbp->current_user->caps = $mapped_meta_caps;
649
- $bbp->current_user->allcaps = $mapped_meta_caps;
650
- }
651
- }
652
-
653
- /**
654
- * Can the current user see a specific UI element?
655
- *
656
- * Used when registering post-types and taxonomies to decide if 'show_ui' should
657
- * be set to true or false. Also used for fine-grained control over which admin
658
- * sections are visible under what conditions.
659
- *
660
- * This function is in bbp-core-caps.php rather than in /bbp-admin so that it
661
- * can be used during the bbp_register_post_types action.
662
- *
663
- * @since bbPress (r3944)
664
- *
665
- * @uses current_user_can() To check the 'moderate' capability
666
- * @uses bbp_get_forum_post_type()
667
- * @uses bbp_get_topic_post_type()
668
- * @uses bbp_get_reply_post_type()
669
- * @uses bbp_get_topic_tag_tax_id()
670
- * @uses is_plugin_active()
671
- * @uses is_super_admin()
672
- * @return bool Results of current_user_can( 'moderate' ) check.
673
- */
674
- function bbp_current_user_can_see( $component = '' ) {
675
-
676
- // Define local variable
677
- $retval = false;
678
-
679
- // Which component are we checking UI visibility for?
680
- switch ( $component ) {
681
-
682
- /** Everywhere ********************************************************/
683
-
684
- case bbp_get_forum_post_type() : // Forums
685
- case bbp_get_topic_post_type() : // Topics
686
- case bbp_get_reply_post_type() : // Replies
687
- case bbp_get_topic_tag_tax_id() : // Topic-Tags
688
- $retval = current_user_can( 'moderate' );
689
- break;
690
-
691
- /** Admin Exclusive ***************************************************/
692
-
693
- case 'bbp_settings_buddypress' : // BuddyPress Extension
694
- $retval = ( is_plugin_active( 'buddypress/bp-loader.php' ) && defined( 'BP_VERSION' ) ) && is_super_admin();
695
- break;
696
-
697
- case 'bbp_settings_akismet' : // Akismet Extension
698
- $retval = ( is_plugin_active( 'akismet/akismet.php' ) && defined( 'AKISMET_VERSION' ) ) && is_super_admin();
699
- break;
700
-
701
- case 'bbp_tools_page' : // Tools Page
702
- case 'bbp_tools_repair_page' : // Tools - Repair Page
703
- case 'bbp_tools_import_page' : // Tools - Import Page
704
- case 'bbp_tools_reset_page' : // Tools - Reset Page
705
- case 'bbp_settings?page' : // Settings Page
706
- case 'bbp_settings_main' : // Settings - General
707
- case 'bbp_settings_theme_compat' : // Settings - Theme compat
708
- case 'bbp_settings_root_slugs' : // Settings - Root slugs
709
- case 'bbp_settings_single_slugs' : // Settings - Single slugs
710
- case 'bbp_settings_per_page' : // Settings - Single slugs
711
- case 'bbp_settings_per_page_rss' : // Settings - Single slugs
712
- default : // Anything else
713
- $retval = current_user_can( bbpress()->admin->minimum_capability );
714
- break;
715
- }
716
-
717
- return (bool) apply_filters( 'bbp_current_user_can_see', (bool) $retval, $component );
718
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-includes/bbp-extend-buddypress.php DELETED
@@ -1,2145 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Main bbPress BuddyPress Class
5
- *
6
- * @package bbPress
7
- * @subpackage BuddyPress
8
- * @todo maybe move to BuddyPress Forums once bbPress 1.1 can be removed
9
- */
10
-
11
- // Exit if accessed directly
12
- if ( !defined( 'ABSPATH' ) ) exit;
13
-
14
- if ( !class_exists( 'BBP_BuddyPress' ) ) :
15
- /**
16
- * Loads BuddyPress extension
17
- *
18
- * @since bbPress (r3395)
19
- *
20
- * @package bbPress
21
- * @subpackage BuddyPress
22
- */
23
- class BBP_BuddyPress {
24
-
25
- /** Variables *************************************************************/
26
-
27
- /**
28
- * The name of the BuddyPress component, used in activity streams
29
- *
30
- * @var string
31
- */
32
- private $component = '';
33
-
34
- /**
35
- * Forum Create Activty Action
36
- *
37
- * @var string
38
- */
39
- private $forum_create = '';
40
-
41
- /**
42
- * Topic Create Activty Action
43
- *
44
- * @var string
45
- */
46
- private $topic_create = '';
47
-
48
- /**
49
- * Topic Close Activty Action
50
- *
51
- * @var string
52
- */
53
- private $topic_close = '';
54
-
55
- /**
56
- * Topic Edit Activty Action
57
- *
58
- * @var string
59
- */
60
- private $topic_edit = '';
61
-
62
- /**
63
- * Topic Open Activty Action
64
- *
65
- * @var string
66
- */
67
- private $topic_open = '';
68
-
69
- /**
70
- * Reply Create Activty Action
71
- *
72
- * @var string
73
- */
74
- private $reply_create = '';
75
-
76
- /**
77
- * Reply Edit Activty Action
78
- *
79
- * @var string
80
- */
81
- private $reply_edit = '';
82
-
83
- /** Slugs *****************************************************************/
84
-
85
- /**
86
- * Forums slug
87
- *
88
- * @var string
89
- */
90
- private $forums_slug = '';
91
-
92
- /**
93
- * Topic slug
94
- *
95
- * @var string
96
- */
97
- private $topic_slug = '';
98
-
99
- /**
100
- * Reply slug
101
- *
102
- * @var string
103
- */
104
- private $reply_slug = '';
105
-
106
- /** Setup Methods *********************************************************/
107
-
108
- /**
109
- * The main bbPress BuddyPress loader
110
- *
111
- * @since bbPress (r3395)
112
- */
113
- public function __construct() {
114
- $this->setup_globals();
115
- $this->setup_actions();
116
- $this->setup_filters();
117
- $this->fully_loaded();
118
- }
119
-
120
- /**
121
- * Extension variables
122
- *
123
- * @since bbPress (r3395)
124
- * @access private
125
- * @uses apply_filters() Calls various filters
126
- */
127
- private function setup_globals() {
128
-
129
- // The name of the BuddyPress component, used in activity streams
130
- $this->component = 'bbpress';
131
-
132
- // Forums
133
- $this->forum_create = 'bbp_forum_create';
134
-
135
- // Topics
136
- $this->topic_create = 'bbp_topic_create';
137
- $this->topic_edit = 'bbp_topic_edit';
138
- $this->topic_close = 'bbp_topic_close';
139
- $this->topic_open = 'bbp_topic_open';
140
-
141
- // Replies
142
- $this->reply_create = 'bbp_reply_create';
143
- $this->reply_edit = 'bbp_reply_edit';
144
-
145
- // Forum slugs, as used in BuddyPress
146
- $this->forums_slug = 'forums';
147
- $this->topic_slug = 'topic';
148
- $this->reply_slug = 'reply';
149
- }
150
-
151
- /**
152
- * Setup the actions
153
- *
154
- * @since bbPress (r3395)
155
- * @access private
156
- * @uses add_filter() To add various filters
157
- * @uses add_action() To add various actions
158
- */
159
- private function setup_actions() {
160
-
161
- /** Activity **********************************************************/
162
-
163
- // Bail if activity is not active
164
- if ( bp_is_active( 'activity' ) ) {
165
-
166
- // Register the activity stream actions
167
- add_action( 'bp_register_activity_actions', array( $this, 'register_activity_actions' ) );
168
-
169
- // Hook into topic creation
170
- add_action( 'bbp_new_topic', array( $this, 'topic_create' ), 10, 4 );
171
-
172
- // Hook into reply creation
173
- add_action( 'bbp_new_reply', array( $this, 'reply_create' ), 10, 5 );
174
-
175
- // Append forum filters in site wide activity streams
176
- add_action( 'bp_activity_filter_options', array( $this, 'activity_filter_options' ), 10 );
177
-
178
- // Append forum filters in single member activity streams
179
- add_action( 'bp_member_activity_filter_options', array( $this, 'activity_filter_options' ), 10 );
180
-
181
- // Append forum filters in single group activity streams
182
- add_action( 'bp_group_activity_filter_options', array( $this, 'activity_filter_options' ), 10 );
183
- }
184
-
185
- /** Favorites *********************************************************/
186
-
187
- // Move handler to 'bp_actions' - BuddyPress bypasses template_loader
188
- remove_action( 'template_redirect', 'bbp_favorites_handler', 1 );
189
- add_action( 'bp_actions', 'bbp_favorites_handler', 1 );
190
-
191
- /** Subscriptions *****************************************************/
192
-
193
- // Move handler to 'bp_actions' - BuddyPress bypasses template_loader
194
- remove_action( 'template_redirect', 'bbp_subscriptions_handler', 1 );
195
- add_action( 'bp_actions', 'bbp_subscriptions_handler', 1 );
196
- }
197
-
198
- /**
199
- * Setup the filters
200
- *
201
- * @since bbPress (r3395)
202
- * @access private
203
- * @uses add_filter() To add various filters
204
- * @uses add_action() To add various actions
205
- */
206
- private function setup_filters() {
207
-
208
- /** Activity **********************************************************/
209
-
210
- // Obey BuddyPress commenting rules
211
- add_filter( 'bp_activity_can_comment', array( $this, 'activity_can_comment' ) );
212
-
213
- // Link directly to the topic or reply
214
- add_filter( 'bp_activity_get_permalink', array( $this, 'activity_get_permalink' ), 10, 2 );
215
-
216
- /** Profiles **********************************************************/
217
-
218
- // Override bbPress user profile URL with BuddyPress profile URL
219
- add_filter( 'bbp_pre_get_user_profile_url', array( $this, 'user_profile_url' ) );
220
- add_filter( 'bbp_get_favorites_permalink', array( $this, 'get_favorites_permalink' ), 10, 2 );
221
- add_filter( 'bbp_get_subscriptions_permalink', array( $this, 'get_subscriptions_permalink' ), 10, 2 );
222
-
223
- // Map forum/topic/replys permalinks to their groups
224
- add_filter( 'bbp_get_forum_permalink', array( $this, 'map_forum_permalink_to_group' ), 10, 2 );
225
- add_filter( 'bbp_get_topic_permalink', array( $this, 'map_topic_permalink_to_group' ), 10, 2 );
226
- add_filter( 'bbp_get_reply_permalink', array( $this, 'map_reply_permalink_to_group' ), 10, 2 );
227
-
228
- // Canonical redirects for normal URLs
229
- add_action( 'template_redirect', array( $this, 'redirect_canonical' ) );
230
-
231
- /** Mentions **********************************************************/
232
-
233
- // Only link mentions if activity component is active
234
- if ( bp_is_active( 'activity' ) ) {
235
-
236
- // Convert mentions into links on create
237
- add_filter( 'bbp_new_topic_pre_content', 'bp_activity_at_name_filter' );
238
- add_filter( 'bbp_new_reply_pre_content', 'bp_activity_at_name_filter' );
239
-
240
- // Convert mentions into links on edit
241
- add_filter( 'bbp_edit_topic_pre_content', 'bp_activity_at_name_filter' );
242
- add_filter( 'bbp_edit_reply_pre_content', 'bp_activity_at_name_filter' );
243
- }
244
-
245
- // Revert links into text on edit
246
- add_filter( 'bbp_get_form_topic_content', array( $this, 'strip_mentions_on_edit' ) );
247
- add_filter( 'bbp_get_form_reply_content', array( $this, 'strip_mentions_on_edit' ) );
248
- }
249
-
250
- /**
251
- * Allow the variables, actions, and filters to be modified by third party
252
- * plugins and themes.
253
- *
254
- * @since bbPress (r3902)
255
- */
256
- private function fully_loaded() {
257
- do_action_ref_array( 'bbp_buddypress_loaded', array( $this ) );
258
- }
259
-
260
- /** Methods ***************************************************************/
261
-
262
- /**
263
- * Strip out BuddyPress activity at-name HTML on topic/reply edit
264
- *
265
- * Copied from bp_forums_strip_mentions_on_post_edit() in case forums
266
- * component is not active or is not loaded in yet.
267
- *
268
- * @since bbPress (r3475)
269
- * @param type $content Optional
270
- * @uses bp_get_root_domain()
271
- * @uses bp_get_members_root_slug()
272
- * @return string
273
- */
274
- public function strip_mentions_on_edit( $content = '' ) {
275
-
276
- // Backwards compat for members root slug
277
- if ( function_exists( 'bp_get_members_root_slug' ) )
278
- $members_root = bp_get_members_root_slug();
279
- elseif ( defined( 'BP_MEMBERS_SLUG' ) )
280
- $members_root = BP_MEMBERS_SLUG;
281
- else
282
- $members_root = 'members';
283
-
284
- $content = htmlspecialchars_decode( $content );
285
- $pattern = "|<a href=&#039;" . bp_get_root_domain() . "/" . $members_root . "/[A-Za-z0-9-_\.]+/&#039; rel=&#039;nofollow&#039;>(@[A-Za-z0-9-_\.@]+)</a>|";
286
- $content = preg_replace( $pattern, "$1", $content );
287
-
288
- return $content;
289
- }
290
-
291
- /**
292
- * Register our activity actions with BuddyPress
293
- *
294
- * @since bbPress (r3395)
295
- * @uses bp_activity_set_action()
296
- */
297
- public function register_activity_actions() {
298
- bp_activity_set_action( $this->component, $this->topic_create, __( 'New topic created', 'bbpress' ) );
299
- bp_activity_set_action( $this->component, $this->reply_create, __( 'New reply created', 'bbpress' ) );
300
- }
301
-
302
- /**
303
- * Wrapper for recoding bbPress actions to the BuddyPress activity stream
304
- *
305
- * @since bbPress (r3395)
306
- * @param type $args Array of arguments for bp_activity_add()
307
- * @uses bbp_get_current_user_id()
308
- * @uses bp_core_current_time()
309
- * @uses bbp_parse_args()
310
- * @uses aplly_filters()
311
- * @uses bp_activity_add()
312
- * @return type Activity ID if successful, false if not
313
- */
314
- private function record_activity( $args = '' ) {
315
-
316
- // Default activity args
317
- $defaults = array (
318
- 'user_id' => bbp_get_current_user_id(),
319
- 'type' => '',
320
- 'action' => '',
321
- 'item_id' => '',
322
- 'secondary_item_id' => '',
323
- 'content' => '',
324
- 'primary_link' => '',
325
- 'component' => $this->component,
326
- 'recorded_time' => bp_core_current_time(),
327
- 'hide_sitewide' => false
328
- );
329
- $activity = bbp_parse_args( $args, $defaults, 'record_activity' );
330
-
331
- // Add the activity
332
- return bp_activity_add( $activity );
333
- }
334
-
335
- /**
336
- * Wrapper for deleting bbPress actions from BuddyPress activity stream
337
- *
338
- * @since bbPress (r3395)
339
- * @param type $args Array of arguments for bp_activity_add()
340
- * @uses bbp_get_current_user_id()
341
- * @uses bp_core_current_time()
342
- * @uses bbp_parse_args()
343
- * @uses aplly_filters()
344
- * @uses bp_activity_add()
345
- * @return type Activity ID if successful, false if not
346
- */
347
- public function delete_activity( $args = '' ) {
348
-
349
- // Default activity args
350
- $defaults = array(
351
- 'item_id' => false,
352
- 'component' => $this->component,
353
- 'type' => false,
354
- 'user_id' => false,
355
- 'secondary_item_id' => false
356
- );
357
- $activity = bbp_parse_args( $args, $defaults, 'delete_activity' );
358
-
359
- // Delete the activity
360
- bp_activity_delete_by_item_id( $activity );
361
- }
362
-
363
- /**
364
- * Maybe disable activity stream comments on select actions
365
- *
366
- * @since bbPress (r3399)
367
- * @global BP_Activity_Template $activities_template
368
- * @param boolean $can_comment
369
- * @uses bp_get_activity_action_name()
370
- * @return boolean
371
- */
372
- public function activity_can_comment( $can_comment = true ) {
373
- global $activities_template;
374
-
375
- // Already forced off, so comply
376
- if ( false === $can_comment )
377
- return $can_comment;
378
-
379
- // Check if blog & forum activity stream commenting is off
380
- if ( ( false === $activities_template->disable_blogforum_replies ) || (int) $activities_template->disable_blogforum_replies ) {
381
-
382
- // Get the current action name
383
- $action_name = bp_get_activity_action_name();
384
-
385
- // Setup the array of possibly disabled actions
386
- $disabled_actions = array(
387
- $this->topic_create,
388
- $this->reply_create
389
- );
390
-
391
- // Check if this activity stream action is disabled
392
- if ( in_array( $action_name, $disabled_actions ) ) {
393
- $can_comment = false;
394
- }
395
- }
396
-
397
- return $can_comment;
398
- }
399
-
400
- /**
401
- * Maybe link directly to topics and replies in activity stream entries
402
- *
403
- * @since bbPress (r3399)
404
- * @param string $link
405
- * @param mixed $activity_object
406
- * @return string The link to the activity stream item
407
- */
408
- public function activity_get_permalink( $link = '', $activity_object = false ) {
409
-
410
- // Setup the array of actions to link directly to
411
- $disabled_actions = array(
412
- $this->topic_create,
413
- $this->reply_create
414
- );
415
-
416
- // Check if this activity stream action is directly linked
417
- if ( in_array( $activity_object->type, $disabled_actions ) ) {
418
- $link = $activity_object->primary_link;
419
- }
420
-
421
- return $link;
422
- }
423
-
424
- /**
425
- * Append forum options to activity filter select box
426
- *
427
- * @since bbPress (r3653)
428
- */
429
- function activity_filter_options() {
430
- ?>
431
-
432
- <option value="<?php echo $this->topic_create; ?>"><?php _e( 'Topics', 'bbpress' ); ?></option>
433
- <option value="<?php echo $this->reply_create; ?>"><?php _e( 'Replies', 'bbpress' ); ?></option>
434
-
435
- <?php
436
- }
437
-
438
- /**
439
- * Override bbPress profile URL with BuddyPress profile URL
440
- *
441
- * @since bbPress (r3401)
442
- * @param string $url
443
- * @param int $user_id
444
- * @param string $user_nicename
445
- * @return string
446
- */
447
- public function user_profile_url( $user_id ) {
448
-
449
- // Define local variable(s)
450
- $profile_url = '';
451
-
452
- // Special handling for forum component
453
- if ( bp_is_current_component( 'forums' ) ) {
454
-
455
- // Empty action or 'topics' action
456
- if ( !bp_current_action() || bp_is_current_action( 'topics' ) ) {
457
- $profile_url = bp_core_get_user_domain( $user_id ) . 'forums/topics';
458
-
459
- // Empty action or 'topics' action
460
- } elseif ( bp_is_current_action( 'replies' ) ) {
461
- $profile_url = bp_core_get_user_domain( $user_id ) . 'forums/replies';
462
-
463
- // 'favorites' action
464
- } elseif ( bbp_is_favorites_active() && bp_is_current_action( 'favorites' ) ) {
465
- $profile_url = $this->get_favorites_permalink( '', $user_id );
466
-
467
- // 'subscriptions' action
468
- } elseif ( bbp_is_subscriptions_active() && bp_is_current_action( 'subscriptions' ) ) {
469
- $profile_url = $this->get_subscriptions_permalink( '', $user_id );
470
- }
471
-
472
- // Not in users' forums area
473
- } else {
474
- $profile_url = bp_core_get_user_domain( $user_id );
475
- }
476
-
477
- return trailingslashit( $profile_url );
478
- }
479
-
480
- /**
481
- * Override bbPress favorites URL with BuddyPress profile URL
482
- *
483
- * @since bbPress (r3721)
484
- * @param string $url
485
- * @param int $user_id
486
- * @return string
487
- */
488
- public function get_favorites_permalink( $url, $user_id ) {
489
- $url = trailingslashit( bp_core_get_user_domain( $user_id ) . 'forums/favorites' );
490
- return $url;
491
- }
492
-
493
- /**
494
- * Override bbPress subscriptions URL with BuddyPress profile URL
495
- *
496
- * @since bbPress (r3721)
497
- * @param string $url
498
- * @param int $user_id
499
- * @return string
500
- */
501
- public function get_subscriptions_permalink( $url, $user_id ) {
502
- $url = trailingslashit( bp_core_get_user_domain( $user_id ) . 'forums/subscriptions' );
503
- return $url;
504
- }
505
-
506
- /** Topics ****************************************************************/
507
-
508
- /**
509
- * Record an activity stream entry when a topic is created
510
- *
511
- * @since bbPress (r3395)
512
- * @param int $topic_id
513
- * @param int $forum_id
514
- * @param array $anonymous_data
515
- * @param int $topic_author_id
516
- * @uses bbp_get_topic_id()
517
- * @uses bbp_get_forum_id()
518
- * @uses bbp_get_user_profile_link()
519
- * @uses bbp_get_topic_permalink()
520
- * @uses bbp_get_topic_title()
521
- * @uses bbp_get_topic_content()
522
- * @uses bbp_get_forum_permalink()
523
- * @uses bbp_get_forum_title()
524
- * @uses bp_create_excerpt()
525
- * @uses apply_filters()
526
- * @return Bail early if topic is by anonywous user
527
- */
528
- public function topic_create( $topic_id, $forum_id, $anonymous_data, $topic_author_id ) {
529
-
530
- // Bail early if topic is by anonywous user
531
- if ( !empty( $anonymous_data ) )
532
- return;
533
-
534
- // Bail if site is private
535
- if ( !bbp_is_site_public() )
536
- return;
537
-
538
- // Validate activity data
539
- $user_id = $topic_author_id;
540
- $topic_id = bbp_get_topic_id( $topic_id );
541
- $forum_id = bbp_get_forum_id( $forum_id );
542
-
543
- // Bail if user is not active
544
- if ( bbp_is_user_inactive( $user_id ) )
545
- return;
546
-
547
- // Bail if topic is not published
548
- if ( !bbp_is_topic_published( $topic_id ) )
549
- return;
550
-
551
- // Bail if forum is not public
552
- if ( !bbp_is_forum_public( $forum_id, false ) )
553
- return;
554
-
555
- // User link for topic author
556
- $user_link = bbp_get_user_profile_link( $user_id );
557
-
558
- // Topic
559
- $topic_permalink = bbp_get_topic_permalink( $topic_id );
560
- $topic_title = bbp_get_topic_title ( $topic_id );
561
- $topic_content = bbp_get_topic_content ( $topic_id );
562
- $topic_link = '<a href="' . $topic_permalink . '" title="' . $topic_title . '">' . $topic_title . '</a>';
563
-
564
- // Forum
565
- $forum_permalink = bbp_get_forum_permalink( $forum_id );
566
- $forum_title = bbp_get_forum_title ( $forum_id );
567
- $forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
568
-
569
- // Activity action & text
570
- $activity_text = sprintf( __( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
571
- $activity_action = apply_filters( 'bbp_activity_topic_create', $activity_text, $user_id, $topic_id, $forum_id );
572
- $activity_content = apply_filters( 'bbp_activity_topic_create_excerpt', bp_create_excerpt( $topic_content ), $topic_content );
573
-
574
- // Compile the activity stream results
575
- $activity = array(
576
- 'user_id' => $user_id,
577
- 'action' => $activity_action,
578
- 'content' => $activity_content,
579
- 'primary_link' => $topic_permalink,
580
- 'type' => $this->topic_create,
581
- 'item_id' => $topic_id,
582
- 'secondary_item_id' => $forum_id,
583
- );
584
-
585
- // Record the activity
586
- $activity_id = $this->record_activity( $activity );
587
-
588
- // Add the activity entry ID as a meta value to the topic
589
- if ( !empty( $activity_id ) ) {
590
- update_post_meta( $topic_id, '_bbp_activity_id', $activity_id );
591
- }
592
- }
593
-
594
- /** Replies ***************************************************************/
595
-
596
- /**
597
- * Record an activity stream entry when a reply is created
598
- *
599
- * @since bbPress (r3395)
600
- * @param int $topic_id
601
- * @param int $forum_id
602
- * @param array $anonymous_data
603
- * @param int $topic_author_id
604
- * @uses bbp_get_reply_id()
605
- * @uses bbp_get_topic_id()
606
- * @uses bbp_get_forum_id()
607
- * @uses bbp_get_user_profile_link()
608
- * @uses bbp_get_reply_url()
609
- * @uses bbp_get_reply_content()
610
- * @uses bbp_get_topic_permalink()
611
- * @uses bbp_get_topic_title()
612
- * @uses bbp_get_forum_permalink()
613
- * @uses bbp_get_forum_title()
614
- * @uses bp_create_excerpt()
615
- * @uses apply_filters()
616
- * @return Bail early if topic is by anonywous user
617
- */
618
- public function reply_create( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author_id ) {
619
-
620
- // Do not log activity of anonymous users
621
- if ( !empty( $anonymous_data ) )
622
- return;
623
-
624
- // Bail if site is private
625
- if ( !bbp_is_site_public() )
626
- return;
627
-
628
- // Validate activity data
629
- $user_id = $reply_author_id;
630
- $reply_id = bbp_get_reply_id( $reply_id );
631
- $topic_id = bbp_get_topic_id( $topic_id );
632
- $forum_id = bbp_get_forum_id( $forum_id );
633
-
634
- // Bail if user is not active
635
- if ( bbp_is_user_inactive( $user_id ) )
636
- return;
637
-
638
- // Bail if forum is not public
639
- if ( !bbp_is_forum_public( $forum_id, false ) )
640
- return;
641
-
642
- // Setup links for activity stream
643
- $user_link = bbp_get_user_profile_link( $user_id );
644
-
645
- // Reply
646
- $reply_url = bbp_get_reply_url ( $reply_id );
647
- $reply_content = bbp_get_reply_content( $reply_id );
648
-
649
- // Topic
650
- $topic_permalink = bbp_get_topic_permalink( $topic_id );
651
- $topic_title = bbp_get_topic_title ( $topic_id );
652
- $topic_link = '<a href="' . $topic_permalink . '" title="' . $topic_title . '">' . $topic_title . '</a>';
653
-
654
- // Forum
655
- $forum_permalink = bbp_get_forum_permalink( $forum_id );
656
- $forum_title = bbp_get_forum_title ( $forum_id );
657
- $forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
658
-
659
- // Activity action & text
660
- $activity_text = sprintf( __( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
661
- $activity_action = apply_filters( 'bbp_activity_reply_create', $activity_text, $user_id, $reply_id, $topic_id );
662
- $activity_content = apply_filters( 'bbp_activity_reply_create_excerpt', bp_create_excerpt( $reply_content ), $reply_content );
663
-
664
- // Compile the activity stream results
665
- $activity = array(
666
- 'user_id' => $user_id,
667
- 'action' => $activity_action,
668
- 'content' => $activity_content,
669
- 'primary_link' => $reply_url,
670
- 'type' => $this->reply_create,
671
- 'item_id' => $reply_id,
672
- 'secondary_item_id' => $topic_id,
673
- );
674
-
675
- // Record the activity
676
- $activity_id = $this->record_activity( $activity );
677
-
678
- // Add the activity entry ID as a meta value to the reply
679
- if ( !empty( $activity_id ) ) {
680
- update_post_meta( $reply_id, '_bbp_activity_id', $activity_id );
681
- }
682
- }
683
-
684
- /**
685
- * Map a forum permalink to the corresponding group
686
- *
687
- * @since bbPress (r3802)
688
- * @param string $url
689
- * @param int $forum_id
690
- * @return string
691
- */
692
- public function map_forum_permalink_to_group( $url, $forum_id ) {
693
- $slug = get_post_field( 'post_name', $forum_id );
694
- $group_ids = bbp_get_forum_group_ids( $forum_id );
695
-
696
- // If the topic is not associated with a group, don't mess with it
697
- if ( !empty( $group_ids ) ) {
698
-
699
- // @todo Multiple group forums/forum groups
700
- $group_id = $group_ids[0];
701
- $group = groups_get_group( array( 'group_id' => $group_id ) );
702
-
703
- if ( bp_is_group_admin_screen( $this->forums_slug ) ) {
704
- $group_permalink = bp_get_group_admin_permalink( $group );
705
- } else {
706
- $group_permalink = bp_get_group_permalink( $group );
707
- }
708
-
709
- $url = trailingslashit( $group_permalink . $this->forums_slug . '/' . $slug );
710
- }
711
-
712
- return $url;
713
- }
714
-
715
- /**
716
- * Map a topic permalink to the current group forum
717
- *
718
- * @since bbPress (r3802)
719
- * @param string $url
720
- * @param int $topic_id
721
- * @return string
722
- */
723
- public function map_topic_permalink_to_group( $url, $topic_id ) {
724
- $slug = get_post_field( 'post_name', $topic_id );
725
- $forum_id = bbp_get_topic_forum_id( $topic_id );
726
- $group_ids = bbp_get_forum_group_ids( $forum_id );
727
-
728
- // If the topic is not associated with a group, don't mess with it
729
- if ( !empty( $group_ids ) ) {
730
-
731
- // @todo Multiple group forums/forum groups
732
- $group_id = $group_ids[0];
733
- $group = groups_get_group( array( 'group_id' => $group_id ) );
734
-
735
- if ( bp_is_group_admin_screen( $this->forums_slug ) ) {
736
- $group_permalink = bp_get_group_admin_permalink( $group );
737
- } else {
738
- $group_permalink = bp_get_group_permalink( $group );
739
- }
740
-
741
- $url = trailingslashit( $group_permalink . $this->forums_slug . '/' . $this->topic_slug . '/' . $slug );
742
- }
743
-
744
- return $url;
745
- }
746
-
747
- /**
748
- * Map a topic permalink to the current group forum
749
- *
750
- * @since bbPress (r3802)
751
- * @param string $url
752
- * @param int $reply_id
753
- * @return string
754
- */
755
- public function map_reply_permalink_to_group( $url, $reply_id ) {
756
- $slug = get_post_field( 'post_name', $reply_id );
757
- $forum_id = bbp_get_reply_forum_id( $reply_id );
758
- $group_ids = bbp_get_forum_group_ids( $forum_id );
759
-
760
- // If the topic is not associated with a group, don't mess with it
761
- if ( !empty( $group_ids ) ) {
762
-
763
- // @todo Multiple group forums/forum groups
764
- $group_id = $group_ids[0];
765
- $group = groups_get_group( array( 'group_id' => $group_id ) );
766
-
767
- if ( bp_is_group_admin_screen( $this->forums_slug ) ) {
768
- $group_permalink = bp_get_group_admin_permalink( $group );
769
- } else {
770
- $group_permalink = bp_get_group_permalink( $group );
771
- }
772
-
773
- $url = trailingslashit( $group_permalink . $this->forums_slug . '/' . $this->topic_slug . '/' . $slug );
774
- }
775
-
776
- return $url;
777
- }
778
-
779
- /**
780
- * Ensure that forum content associated with a BuddyPress group can only be
781
- * viewed via the group URL.
782
- *
783
- * @since bbPress (r3802)
784
- */
785
- function redirect_canonical() {
786
-
787
- if ( bbp_is_single_forum() ) {
788
- $forum_id = get_the_ID();
789
- $group_ids = bbp_get_forum_group_ids( $forum_id );
790
- } elseif ( bbp_is_single_topic() ) {
791
- $topic_id = get_the_ID();
792
- $slug = get_post_field( 'post_name', $topic_id );
793
- $forum_id = bbp_get_topic_forum_id( $topic_id );
794
- $group_ids = bbp_get_forum_group_ids( $forum_id );
795
- }
796
-
797
- if ( !empty( $group_ids ) ) {
798
- // @todo Multiple group forums/forum groups
799
- $group_id = $group_ids[0];
800
- $group = groups_get_group( array( 'group_id' => $group_id ) );
801
- $group_permalink = bp_get_group_permalink( $group );
802
- $redirect_to = trailingslashit( $group_permalink . $this->forums_slug );
803
-
804
- if ( !empty( $slug ) ) {
805
- $redirect_to = trailingslashit( $redirect_to . $this->topic_slug . '/' . $slug );
806
- }
807
-
808
- bp_core_redirect( $redirect_to );
809
- }
810
- }
811
- }
812
- endif;
813
-
814
-
815
- if ( !class_exists( 'BBP_Forums_Component' ) ) :
816
- /**
817
- * Loads Forums Component
818
- *
819
- * @since bbPress (r3552)
820
- *
821
- * @package bbPress
822
- * @subpackage BuddyPress
823
- */
824
- class BBP_Forums_Component extends BP_Component {
825
-
826
- /**
827
- * Start the forums component creation process
828
- *
829
- * @since bbPress (r3552)
830
- */
831
- public function __construct() {
832
- parent::start(
833
- 'forums',
834
- __( 'Forums', 'bbpress' ),
835
- BP_PLUGIN_DIR
836
- );
837
- $this->setup_globals();
838
- $this->setup_nav();
839
- }
840
-
841
- /**
842
- * Setup globals
843
- *
844
- * The BP_FORUMS_SLUG constant is deprecated, and only used here for
845
- * backwards compatibility.
846
- *
847
- * @since bbPress (r3552)
848
- * @global BuddyPress $bp
849
- */
850
- public function setup_globals() {
851
- global $bp;
852
-
853
- // Define the parent forum ID
854
- if ( !defined( 'BP_FORUMS_PARENT_FORUM_ID' ) )
855
- define( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
856
-
857
- // Define a slug, if necessary
858
- if ( !defined( 'BP_FORUMS_SLUG' ) )
859
- define( 'BP_FORUMS_SLUG', $this->id );
860
-
861
- // All globals for messaging component.
862
- $globals = array(
863
- 'path' => BP_PLUGIN_DIR,
864
- 'slug' => BP_FORUMS_SLUG,
865
- 'root_slug' => isset( $bp->pages->forums->slug ) ? $bp->pages->forums->slug : BP_FORUMS_SLUG,
866
- 'has_directory' => false,
867
- 'notification_callback' => 'messages_format_notifications',
868
- 'search_string' => __( 'Search Forums...', 'bbpress' ),
869
- );
870
-
871
- parent::setup_globals( $globals );
872
- }
873
-
874
- /**
875
- * Setup BuddyBar navigation
876
- *
877
- * @since bbPress (r3552)
878
- */
879
- public function setup_nav() {
880
-
881
- // Stop if there is no user displayed or logged in
882
- if ( !is_user_logged_in() && !bp_displayed_user_id() )
883
- return;
884
-
885
- // Define local variable(s)
886
- $sub_nav = array();
887
- $user_domain = '';
888
-
889
- // Add 'Forums' to the main navigation
890
- $main_nav = array(
891
- 'name' => __( 'Forums', 'bbpress' ),
892
- 'slug' => $this->slug,
893
- 'position' => 80,
894
- 'screen_function' => 'bbp_member_forums_screen_topics',
895
- 'default_subnav_slug' => 'topics',
896
- 'item_css_id' => $this->id
897
- );
898
-
899
- // Determine user to use
900
- if ( bp_displayed_user_id() )
901
- $user_domain = bp_displayed_user_domain();
902
- elseif ( bp_loggedin_user_domain() )
903
- $user_domain = bp_loggedin_user_domain();
904
- else
905
- return;
906
-
907
- // User link
908
- $forums_link = trailingslashit( $user_domain . $this->slug );
909
-
910
- // Topics started
911
- $sub_nav[] = array(
912
- 'name' => __( 'Topics Started', 'bbpress' ),
913
- 'slug' => 'topics',
914
- 'parent_url' => $forums_link,
915
- 'parent_slug' => $this->slug,
916
- 'screen_function' => 'bbp_member_forums_screen_topics',
917
- 'position' => 20,
918
- 'item_css_id' => 'topics'
919
- );
920
-
921
- // Replies to topics
922
- $sub_nav[] = array(
923
- 'name' => __( 'Topics Replied To', 'bbpress' ),
924
- 'slug' => 'replies',
925
- 'parent_url' => $forums_link,
926
- 'parent_slug' => $this->slug,
927
- 'screen_function' => 'bbp_member_forums_screen_replies',
928
- 'position' => 40,
929
- 'item_css_id' => 'replies'
930
- );
931
-
932
- // Favorite topics
933
- $sub_nav[] = array(
934
- 'name' => __( 'Favorites', 'bbpress' ),
935
- 'slug' => 'favorites',
936
- 'parent_url' => $forums_link,
937
- 'parent_slug' => $this->slug,
938
- 'screen_function' => 'bbp_member_forums_screen_favorites',
939
- 'position' => 60,
940
- 'item_css_id' => 'favorites'
941
- );
942
-
943
- // Subscribed topics (my profile only)
944
- if ( bp_is_my_profile() ) {
945
- $sub_nav[] = array(
946
- 'name' => __( 'Subscriptions', 'bbpress' ),
947
- 'slug' => 'subscriptions',
948
- 'parent_url' => $forums_link,
949
- 'parent_slug' => $this->slug,
950
- 'screen_function' => 'bbp_member_forums_screen_subscriptions',
951
- 'position' => 60,
952
- 'item_css_id' => 'subscriptions'
953
- );
954
- }
955
-
956
- parent::setup_nav( $main_nav, $sub_nav );
957
- }
958
-
959
- /**
960
- * Set up the admin bar
961
- *
962
- * @since bbPress (r3552)
963
- * @global BuddyPress $bp
964
- */
965
- public function setup_admin_bar() {
966
- global $bp;
967
-
968
- // Prevent debug notices
969
- $wp_admin_nav = array();
970
-
971
- // Menus for logged in user
972
- if ( is_user_logged_in() ) {
973
-
974
- // Setup the logged in user variables
975
- $user_domain = bp_loggedin_user_domain();
976
- $forums_link = trailingslashit( $user_domain . $this->slug );
977
-
978
- // Add the "My Account" sub menus
979
- $wp_admin_nav[] = array(
980
- 'parent' => $bp->my_account_menu_id,
981
- 'id' => 'my-account-' . $this->id,
982
- 'title' => __( 'Forums', 'bbpress' ),
983
- 'href' => trailingslashit( $forums_link )
984
- );
985
-
986
- // Topics
987
- $wp_admin_nav[] = array(
988
- 'parent' => 'my-account-' . $this->id,
989
- 'id' => 'my-account-' . $this->id . '-topics',
990
- 'title' => __( 'Topics Started', 'bbpress' ),
991
- 'href' => trailingslashit( $forums_link . 'topics' )
992
- );
993
-
994
- // Replies
995
- $wp_admin_nav[] = array(
996
- 'parent' => 'my-account-' . $this->id,
997
- 'id' => 'my-account-' . $this->id . '-replies',
998
- 'title' => __( 'Topics Replied To', 'bbpress' ),
999
- 'href' => trailingslashit( $forums_link . 'replies' )
1000
- );
1001
-
1002
- // Favorites
1003
- $wp_admin_nav[] = array(
1004
- 'parent' => 'my-account-' . $this->id,
1005
- 'id' => 'my-account-' . $this->id . '-favorites',
1006
- 'title' => __( 'Favorite Topics', 'bbpress' ),
1007
- 'href' => trailingslashit( $forums_link . 'favorites' )
1008
- );
1009
-
1010
- // Subscriptions
1011
- $wp_admin_nav[] = array(
1012
- 'parent' => 'my-account-' . $this->id,
1013
- 'id' => 'my-account-' . $this->id . '-subscriptions',
1014
- 'title' => __( 'Subscribed Topics', 'bbpress' ),
1015
- 'href' => trailingslashit( $forums_link . 'subscriptions' )
1016
- );
1017
- }
1018
-
1019
- parent::setup_admin_bar( $wp_admin_nav );
1020
- }
1021
-
1022
- /**
1023
- * Sets up the title for pages and <title>
1024
- *
1025
- * @since bbPress (r3552)
1026
- *
1027
- * @global BuddyPress $bp
1028
- */
1029
- public function setup_title() {
1030
- global $bp;
1031
-
1032
- // Adjust title based on view
1033
- if ( bp_is_forums_component() ) {
1034
- if ( bp_is_my_profile() ) {
1035
- $bp->bp_options_title = __( 'Forums', 'bbpress' );
1036
- } else {
1037
- $bp->bp_options_avatar = bp_core_fetch_avatar( array(
1038
- 'item_id' => $bp->displayed_user->id,
1039
- 'type' => 'thumb'
1040
- ) );
1041
- $bp->bp_options_title = $bp->displayed_user->fullname;
1042
- }
1043
- }
1044
-
1045
- parent::setup_title();
1046
- }
1047
- }
1048
- endif;
1049
-
1050
- if ( !class_exists( 'BBP_Forums_Group_Extension' ) && class_exists( 'BP_Group_Extension' ) ) :
1051
- /**
1052
- * Loads Group Extension for Forums Component
1053
- *
1054
- * @since bbPress (r3552)
1055
- *
1056
- * @package bbPress
1057
- * @subpackage BuddyPress
1058
- * @todo Everything
1059
- */
1060
- class BBP_Forums_Group_Extension extends BP_Group_Extension {
1061
-
1062
- /**
1063
- * Setup bbPress group extension variables
1064
- *
1065
- * @since bbPress (r3552)
1066
- */
1067
- public function __construct() {
1068
-
1069
- // Name and slug
1070
- $this->name = bbp_get_forum_archive_title();
1071
- $this->nav_item_name = bbp_get_forum_archive_title();
1072
- $this->slug = 'forums';
1073
- $this->topic_slug = 'topic';
1074
- $this->reply_slug = 'reply';
1075
-
1076
- // Forum component is visible @todo configure?
1077
- $this->visibility = 'public';
1078
-
1079
- // Set positions towards end
1080
- $this->create_step_position = 15;
1081
- $this->nav_item_position = 10;
1082
-
1083
- // Allow create step and show in nav
1084
- $this->enable_create_step = true;
1085
- $this->enable_nav_item = true;
1086
- $this->enable_edit_item = true;
1087
-
1088
- // I forget what these do
1089
- $this->display_hook = 'bp_template_content';
1090
- $this->template_file = 'groups/single/plugins';
1091
-
1092
- // Add handlers to bp_actions
1093
- add_action( 'bp_actions', 'bbp_new_forum_handler' );
1094
- add_action( 'bp_actions', 'bbp_new_topic_handler' );
1095
- add_action( 'bp_actions', 'bbp_new_reply_handler' );
1096
- add_action( 'bp_actions', 'bbp_edit_forum_handler' );
1097
- add_action( 'bp_actions', 'bbp_edit_topic_handler' );
1098
- add_action( 'bp_actions', 'bbp_edit_reply_handler' );
1099
-
1100
- // Tweak the redirect field
1101
- add_filter( 'bbp_new_topic_redirect_to', array( $this, 'new_topic_redirect_to' ), 10, 3 );
1102
- add_filter( 'bbp_new_reply_redirect_to', array( $this, 'new_reply_redirect_to' ), 10, 3 );
1103
- }
1104
-
1105
- /**
1106
- * The primary display function for group forums
1107
- */
1108
- public function display() {
1109
-
1110
- // Prevent Topic Parent from appearing
1111
- add_action( 'bbp_theme_before_topic_form_forum', array( $this, 'ob_start' ) );
1112
- add_action( 'bbp_theme_after_topic_form_forum', array( $this, 'ob_end_clean' ) );
1113
- add_action( 'bbp_theme_after_topic_form_forum', array( $this, 'topic_parent' ) );
1114
-
1115
- // Prevent Forum Parent from appearing
1116
- add_action( 'bbp_theme_before_forum_form_parent', array( $this, 'ob_start' ) );
1117
- add_action( 'bbp_theme_after_forum_form_parent', array( $this, 'ob_end_clean' ) );
1118
- add_action( 'bbp_theme_after_forum_form_parent', array( $this, 'forum_parent' ) );
1119
-
1120
- // Hide breadcrumb
1121
- add_filter( 'bbp_no_breadcrumb', '__return_true' );
1122
-
1123
- $this->display_forums( 0 );
1124
- }
1125
-
1126
- /** Edit ******************************************************************/
1127
-
1128
- /**
1129
- * Show forums and new forum form when editing a group
1130
- *
1131
- * @since bbPress (r3563)
1132
- * @uses bbp_get_template_part()
1133
- */
1134
- public function edit_screen() {
1135
-
1136
- // Add group admin actions to forum row actions
1137
- add_action( 'bbp_forum_row_actions', array( $this, 'forum_row_actions' ) );
1138
- add_action( 'bbp_topic_row_actions', array( $this, 'topic_row_actions' ) );
1139
-
1140
- // Prevent Topic Parent from appearing
1141
- add_action( 'bbp_theme_before_topic_form_forum', array( $this, 'ob_start' ) );
1142
- add_action( 'bbp_theme_after_topic_form_forum', array( $this, 'ob_end_clean' ) );
1143
- add_action( 'bbp_theme_after_topic_form_forum', array( $this, 'topic_parent' ) );
1144
-
1145
- // Prevent Forum Parent from appearing
1146
- add_action( 'bbp_theme_before_forum_form_parent', array( $this, 'ob_start' ) );
1147
- add_action( 'bbp_theme_after_forum_form_parent', array( $this, 'ob_end_clean' ) );
1148
- add_action( 'bbp_theme_after_forum_form_parent', array( $this, 'forum_parent' ) );
1149
-
1150
- // Do not show the new topic form in the moderation area
1151
- add_filter( 'bbp_current_user_can_access_create_topic_form', '__return_false' );
1152
-
1153
- // Hide breadcrumb
1154
- add_filter( 'bbp_no_breadcrumb', '__return_true' );
1155
-
1156
- $this->display_forums( 1 );
1157
- }
1158
-
1159
- /**
1160
- * Save the Group Forum data on edit
1161
- *
1162
- * @since bbPress (r3465)
1163
- * @uses bbp_new_forum_handler() To check for forum creation
1164
- * @uses bbp_edit_forum_handler() To check for forum edit
1165
- */
1166
- public function edit_screen_save() {
1167
-
1168
- // Bail if not a POST action
1169
- if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
1170
- return;
1171
-
1172
- // Bail if action is empty
1173
- if ( empty( $_POST['action'] ) )
1174
- return;
1175
-
1176
- // Handle the different actions that can happen here
1177
- switch ( $_POST['action'] ) {
1178
-
1179
- // New forum
1180
- case 'bbp-new-forum' :
1181
-
1182
- // Redirect back here, not to the new forum
1183
- add_filter( 'bbp_new_forum_redirect_to', array( $this, 'edit_redirect_to' ) );
1184
-
1185
- // Add actions to bbp_new_forum
1186
- add_action( 'bbp_new_forum', array( $this, 'new_forum' ), 10, 4 );
1187
-
1188
- // Handle the new forum
1189
- bbp_new_forum_handler();
1190
-
1191
- break;
1192
-
1193
- // Edit existing forum
1194
- case 'bbp-edit-forum' :
1195
-
1196
- // Redirect back here, not to the new forum
1197
- add_filter( 'bbp_edit_forum_redirect_to', array( $this, 'edit_redirect_to' ) );
1198
-
1199
- // Handle the forum edit
1200
- bbp_edit_forum_handler();
1201
-
1202
- break;
1203
-
1204
- // Trash a forum
1205
- case 'bbp-trash-forum' :
1206
- //bbp_trash_forum_handler();
1207
- break;
1208
-
1209
- // Permanently delet a forum
1210
- case 'bbp-delete-forum' :
1211
- //bbp_delete_forum_handler();
1212
- break;
1213
- }
1214
- }
1215
-
1216
- /** Create ****************************************************************/
1217
-
1218
- /**
1219
- * Show forums and new forum form when creating a group
1220
- *
1221
- * @since bbPress (r3465)
1222
- */
1223
- public function create_screen() {
1224
-
1225
- // Bail if not looking at this screen
1226
- if ( !bp_is_group_creation_step( $this->slug ) )
1227
- return false;
1228
-
1229
- $checked = bp_get_new_group_enable_forum() || groups_get_groupmeta( bp_get_new_group_id(), 'forum_id' ); ?>
1230
-
1231
- <h4><?php _e( 'Group Forums', 'bbpress' ); ?></h4>
1232
-
1233
- <p><?php _e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
1234
-
1235
- <div class="checkbox">
1236
- <label><input type="checkbox" name="bbp-create-group-forum" id="bbp-create-group-forum" value="1"<?php checked( $checked ); ?> /> <?php _e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
1237
- </div>
1238
-
1239
- <?php
1240
-
1241
- // Verify intent
1242
- wp_nonce_field( 'groups_create_save_' . $this->slug );
1243
- }
1244
-
1245
- /**
1246
- * Save the Group Forum data on create
1247
- *
1248
- * @since bbPress (r3465)
1249
- */
1250
- public function create_screen_save() {
1251
-
1252
- check_admin_referer( 'groups_create_save_' . $this->slug );
1253
-
1254
- $create_forum = !empty( $_POST['bbp-create-group-forum'] ) ? true : false;
1255
- $forum_id = 0;
1256
- $forum_ids = bbp_get_group_forum_ids( bp_get_new_group_id() );
1257
- if ( !empty( $forum_ids ) )
1258
- $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
1259
-
1260
- // Create a forum, or not
1261
- switch ( $create_forum ) {
1262
- case true :
1263
-
1264
- // Bail if initial content was already created
1265
- if ( !empty( $forum_id ) )
1266
- return;
1267
-
1268
- // Set the default forum status
1269
- switch ( bp_get_new_group_status() ) {
1270
- case 'hidden' :
1271
- $status = bbp_get_hidden_status_id();
1272
- break;
1273
- case 'private' :
1274
- $status = bbp_get_private_status_id();
1275
- break;
1276
- case 'public' :
1277
- default :
1278
- $status = bbp_get_public_status_id();
1279
- break;
1280
- }
1281
-
1282
- // Create the initial forum
1283
- $forum_id = bbp_insert_forum( array(
1284
- 'post_parent' => bbp_get_group_forums_root_id(),
1285
- 'post_title' => bp_get_new_group_name(),
1286
- 'post_content' => bp_get_new_group_description(),
1287
- 'post_status' => $status
1288
- ) );
1289
-
1290
- // Run the BP-specific functions for new groups
1291
- $this->new_forum( array( 'forum_id' => $forum_id ) );
1292
-
1293
- break;
1294
- case false :
1295
-
1296
- // Forum was created but is now being undone
1297
- if ( !empty( $forum_id ) ) {
1298
- wp_delete_post( $forum_id, true );
1299
- groups_delete_groupmeta( bp_get_new_group_id(), 'forum_id' );
1300
- }
1301
-
1302
- break;
1303
- }
1304
- }
1305
-
1306
- /**
1307
- * Used to start an output buffer
1308
- */
1309
- public function ob_start() {
1310
- ob_start();
1311
- }
1312
-
1313
- /**
1314
- * Used to end an output buffer
1315
- */
1316
- public function ob_end_clean() {
1317
- ob_end_clean();
1318
- }
1319
-
1320
- /**
1321
- * Creating a group forum or category (including root for group)
1322
- *
1323
- * @since bbPress (r3653)
1324
- * @param type $forum_args
1325
- * @uses bbp_get_forum_id()
1326
- * @uses bp_get_current_group_id()
1327
- * @uses bbp_add_forum_id_to_group()
1328
- * @uses bbp_add_group_id_to_forum()
1329
- * @return if no forum_id is available
1330
- */
1331
- public function new_forum( $forum_args = array() ) {
1332
-
1333
- // Bail if no forum_id was passed
1334
- if ( empty( $forum_args['forum_id'] ) )
1335
- return;
1336
-
1337
- // Validate forum_id
1338
- $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
1339
- $group_id = bp_get_current_group_id();
1340
-
1341
- bbp_add_forum_id_to_group( $group_id, $forum_id );
1342
- bbp_add_group_id_to_forum( $forum_id, $group_id );
1343
- }
1344
-
1345
- /**
1346
- * Removing a group forum or category (including root for group)
1347
- *
1348
- * @since bbPress (r3653)
1349
- * @param type $forum_args
1350
- * @uses bbp_get_forum_id()
1351
- * @uses bp_get_current_group_id()
1352
- * @uses bbp_add_forum_id_to_group()
1353
- * @uses bbp_add_group_id_to_forum()
1354
- * @return if no forum_id is available
1355
- */
1356
- public function remove_forum( $forum_args = array() ) {
1357
-
1358
- // Bail if no forum_id was passed
1359
- if ( empty( $forum_args['forum_id'] ) )
1360
- return;
1361
-
1362
- // Validate forum_id
1363
- $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
1364
- $group_id = bp_get_current_group_id();
1365
-
1366
- bbp_remove_forum_id_from_group( $group_id, $forum_id );
1367
- bbp_remove_group_id_from_forum( $forum_id, $group_id );
1368
- }
1369
-
1370
- /** Display Methods *******************************************************/
1371
-
1372
- /**
1373
- * Output the forums for a group in the edit screens
1374
- *
1375
- * @since bbPress (r3653)
1376
- * @uses bp_get_current_group_id()
1377
- * @uses bbp_get_group_forum_ids()
1378
- * @uses bbp_has_forums()
1379
- * @uses bbp_get_template_part()
1380
- */
1381
- public function display_forums( $offset = 0 ) {
1382
- global $wpdb;
1383
-
1384
- $bbp = bbpress();
1385
-
1386
- // Forum data
1387
- $forum_ids = bbp_get_group_forum_ids( bp_get_current_group_id() );
1388
- $forum_args = array( 'post__in' => $forum_ids, 'post_parent' => null ); ?>
1389
-
1390
- <div id="bbpress-forums">
1391
-
1392
- <?php
1393
-
1394
- // Looking at the group forum root
1395
- if ( ! bp_action_variable( $offset ) ) :
1396
-
1397
- // Query forums and show them if
1398
- if ( !empty( $forum_ids ) && bbp_has_forums( $forum_args ) ) :
1399
-
1400
- bbp_the_forum();
1401
-
1402
- // Only one forum found
1403
- if ( $bbp->forum_query->post_count == 1 ) :?>
1404
-
1405
- <h3><?php _e( 'Forum', 'bbpress' ); ?></h3>
1406
-
1407
- <?php bbp_set_query_name( 'bbp_single_forum' ); ?>
1408
-
1409
- <?php if ( bbp_has_topics( array( 'post_parent' => bbp_get_forum_id() ) ) ) : ?>
1410
-
1411
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
1412
-
1413
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
1414
-
1415
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
1416
-
1417
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
1418
-
1419
- <?php else : ?>
1420
-
1421
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
1422
-
1423
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
1424
-
1425
- <?php endif;
1426
-
1427
- // More than 1 forum found
1428
- elseif ( $bbp->forum_query->post_count > 1 ) : ?>
1429
-
1430
- <h3><?php _e( 'Forums', 'bbpress' ); ?></h3>
1431
-
1432
- <?php bbp_get_template_part( 'loop', 'forums' ); ?>
1433
-
1434
- <h3><?php _e( 'Topics', 'bbpress' ); ?></h3>
1435
-
1436
- <?php if ( bbp_has_topics( array( 'post_parent__in' => $forum_ids ) ) ) : ?>
1437
-
1438
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
1439
-
1440
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
1441
-
1442
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
1443
-
1444
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
1445
-
1446
- <?php else : ?>
1447
-
1448
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
1449
-
1450
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
1451
-
1452
- <?php endif;
1453
-
1454
- // No forums found
1455
- else : ?>
1456
-
1457
- <div id="message" class="info">
1458
- <p><?php _e( 'This group does not currently have any forums.', 'bbpress' ); ?></p>
1459
- </div>
1460
-
1461
- <?php if ( bp_is_group_admin_screen( $this->slug ) ) :
1462
- bbp_get_template_part( 'form', 'forum' );
1463
- endif;
1464
- endif;
1465
-
1466
- // No forums found
1467
- else : ?>
1468
-
1469
- <div id="message" class="info">
1470
- <p><?php _e( 'This group does not currently have any forums.', 'bbpress' ); ?></p>
1471
- </div>
1472
-
1473
- <?php if ( bp_is_group_admin_screen( $this->slug ) ) :
1474
- bbp_get_template_part( 'form', 'forum' );
1475
- endif;
1476
- endif;
1477
-
1478
- // Single forum
1479
- elseif ( ( bp_action_variable( $offset ) != $this->slug ) && ( bp_action_variable( $offset ) != $this->topic_slug ) ) :
1480
-
1481
- // Get the forum
1482
- $forum_post_type = bbp_get_forum_post_type();
1483
- $forum_slug = bp_action_variable( $offset );
1484
- $forums = $wpdb->get_row( "SELECT ID FROM {$wpdb->posts} WHERE post_name = '{$forum_slug}' AND post_type = '{$forum_post_type}'", ARRAY_N );
1485
-
1486
- // Forum exists
1487
- if ( !empty( $forums ) ) :
1488
- $forum_id = $forums[0];
1489
- $bbp->current_forum_id = $forum_id;
1490
- bbp_set_query_name( 'bbp_single_forum' ); ?>
1491
-
1492
- <h3><?php bbp_forum_title(); ?></h3>
1493
-
1494
- <?php bbp_get_template_part( 'content', 'single-forum' ); ?>
1495
-
1496
- <?php else : ?>
1497
-
1498
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
1499
-
1500
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
1501
-
1502
- <?php endif;
1503
-
1504
- // Single topic
1505
- elseif ( ( bp_action_variable( $offset ) != $this->slug ) && ( bp_action_variable( $offset ) == $this->topic_slug ) ) :
1506
-
1507
- // Get the topic
1508
- $topic_post_type = bbp_get_topic_post_type();
1509
- $topic_slug = bp_action_variable( $offset + 1 );
1510
- $topics = $wpdb->get_row( "SELECT ID FROM {$wpdb->posts} WHERE post_name = '{$topic_slug}' AND post_type = '{$topic_post_type}'", ARRAY_N );
1511
-
1512
- // Topic exists
1513
- if ( !empty( $topics ) ) :
1514
- $topic_id = $topics[0];
1515
- $bbp->current_topic_id = $topic_id;
1516
- bbp_set_query_name( 'bbp_single_topic' ); ?>
1517
-
1518
- <h3><?php bbp_topic_title(); ?></h3>
1519
-
1520
- <?php bbp_get_template_part( 'content', 'single-topic' ); ?>
1521
-
1522
- <?php else : ?>
1523
-
1524
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
1525
-
1526
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
1527
-
1528
- <?php endif;
1529
-
1530
- endif; ?>
1531
-
1532
- </div>
1533
-
1534
- <?php
1535
- }
1536
-
1537
- /**
1538
- * Add forum row action HTML when viewing group forum admin
1539
- *
1540
- * @since bbPress (r3653)
1541
- * @uses bp_is_item_admin()
1542
- * @uses bbp_get_forum_id()
1543
- */
1544
- public function forum_row_actions() {
1545
-
1546
- // Only admins can take actions on forums
1547
- if ( is_super_admin() || current_user_can( 'moderate' ) || bp_is_item_admin() || bp_is_item_mod() ) : ?>
1548
-
1549
- <div class="row-actions">
1550
-
1551
- <?php echo 'Edit | View | Trash'; ?>
1552
-
1553
- </div>
1554
-
1555
- <?php endif;
1556
- }
1557
-
1558
- /**
1559
- * Add topic row action HTML when viewing group forum admin
1560
- *
1561
- * @since bbPress (r3653)
1562
- * @uses bp_is_item_admin()
1563
- * @uses bbp_get_forum_id()
1564
- */
1565
- public function topic_row_actions() {
1566
-
1567
- // Only admins can take actions on forums
1568
- if ( is_super_admin() || current_user_can( 'moderate' ) || bp_is_item_admin() || bp_is_item_mod() ) : ?>
1569
-
1570
- <div class="row-actions">
1571
-
1572
- <?php echo 'Edit | View | Trash | Close | Stick (To Front) | Spam'; ?>
1573
-
1574
- </div>
1575
-
1576
- <?php endif;
1577
- }
1578
-
1579
- /** Redirect Helpers ******************************************************/
1580
-
1581
- /**
1582
- * Redirect to the group forum screen
1583
- *
1584
- * @since bbPress (r3653)
1585
- * @param str $redirect_url
1586
- * @param str $redirect_to
1587
- */
1588
- public function new_topic_redirect_to( $redirect_url = '', $redirect_to = '', $topic_id = 0 ) {
1589
- if ( bp_is_group() ) {
1590
- $topic = bbp_get_topic( $topic_id );
1591
- $topic_hash = '#post-' . $topic_id;
1592
- $redirect_url = trailingslashit( bp_get_group_permalink( groups_get_current_group() ) ) . trailingslashit( $this->slug ) . trailingslashit( $this->topic_slug ) . trailingslashit( $topic->post_name ) . $topic_hash;
1593
- }
1594
-
1595
- return $redirect_url;
1596
- }
1597
-
1598
- /**
1599
- * Redirect to the group forum screen
1600
- *
1601
- * @since bbPress (r3653)
1602
- */
1603
- public function new_reply_redirect_to( $redirect_url = '', $redirect_to = '', $reply_id = 0 ) {
1604
- global $wp_rewrite;
1605
-
1606
- if ( bp_is_group() ) {
1607
- $topic_id = bbp_get_reply_topic_id( $reply_id );
1608
- $topic = bbp_get_topic( $topic_id );
1609
- $reply_position = bbp_get_reply_position( $reply_id, $topic_id );
1610
- $reply_page = ceil( (int) $reply_position / (int) bbp_get_replies_per_page() );
1611
- $reply_hash = '#post-' . $reply_id;
1612
- $topic_url = trailingslashit( bp_get_group_permalink( groups_get_current_group() ) ) . trailingslashit( $this->slug ) . trailingslashit( $this->topic_slug ) . trailingslashit( $topic->post_name );
1613
-
1614
- // Don't include pagination if on first page
1615
- if ( 1 >= $reply_page ) {
1616
- $redirect_url = trailingslashit( $topic_url ) . $reply_hash;
1617
-
1618
- // Include pagination
1619
- } else {
1620
- $redirect_url = trailingslashit( $topic_url ) . trailingslashit( $wp_rewrite->pagination_base ) . trailingslashit( $reply_page ) . $reply_hash;
1621
- }
1622
-
1623
- // Add topic view query arg back to end if it is set
1624
- if ( bbp_get_view_all() ) {
1625
- $redirect_url = bbp_add_view_all( $redirect_url );
1626
- }
1627
- }
1628
-
1629
- return $redirect_url;
1630
- }
1631
-
1632
- /**
1633
- * Redirect to the group admin forum edit screen
1634
- *
1635
- * @since bbPress (r3653)
1636
- * @uses groups_get_current_group()
1637
- * @uses bp_is_group_admin_screen()
1638
- * @uses trailingslashit()
1639
- * @uses bp_get_root_domain()
1640
- * @uses bp_get_groups_root_slug()
1641
- */
1642
- public function edit_redirect_to( $redirect_url = '' ) {
1643
-
1644
- // Get the current group, if there is one
1645
- $group = groups_get_current_group();
1646
-
1647
- // If this is a group of any kind, empty out the redirect URL
1648
- if ( bp_is_group_admin_screen( $this->slug ) )
1649
- $redirect_url = trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/' . $this->slug );
1650
-
1651
- return $redirect_url;
1652
- }
1653
-
1654
- /** Form Helpers **********************************************************/
1655
-
1656
- public function forum_parent() {
1657
- ?>
1658
-
1659
- <input type="hidden" name="bbp_forum_parent_id" id="bbp_forum_parent_id" value="<?php bbp_group_forums_root_id(); ?>" />
1660
-
1661
- <?php
1662
- }
1663
-
1664
- public function topic_parent() {
1665
-
1666
- $forum_ids = bbp_get_group_forum_ids( bp_get_current_group_id() ); ?>
1667
-
1668
- <p>
1669
- <label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
1670
- <?php bbp_dropdown( array( 'include' => $forum_ids, 'selected' => bbp_get_form_topic_forum() ) ); ?>
1671
- </p>
1672
-
1673
- <?php
1674
- }
1675
- }
1676
- endif;
1677
-
1678
- /**
1679
- * Creates the Forums component in BuddyPress
1680
- *
1681
- * @since bbPress (r3653)
1682
- *
1683
- * @global type $bp
1684
- * @return If bbPress is not active
1685
- */
1686
- function bbp_setup_buddypress_component() {
1687
- global $bp;
1688
-
1689
- // Bail if no BuddyPress
1690
- if ( !empty( $bp->maintenance_mode ) || !defined( 'BP_VERSION' ) ) return;
1691
-
1692
- // Bail if BuddyPress Forums are already active
1693
- if ( bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() ) return;
1694
-
1695
- // Create the new BuddyPress Forums component
1696
- $bp->forums = new BBP_Forums_Component();
1697
-
1698
- // Register the group extension only if groups are active
1699
- if ( bbp_is_group_forums_active() && bp_is_active( 'groups' ) ) {
1700
- bp_register_group_extension( 'BBP_Forums_Group_Extension' );
1701
- }
1702
- }
1703
-
1704
- /** BuddyPress Helpers ********************************************************/
1705
-
1706
- /**
1707
- * Filter the current bbPress user ID with the current BuddyPress user ID
1708
- *
1709
- * @since bbPress (r3552)
1710
- *
1711
- * @global BuddyPress $bp
1712
- * @param int $user_id
1713
- * @param bool $displayed_user_fallback
1714
- * @param bool $current_user_fallback
1715
- * @return int User ID
1716
- */
1717
- function bbp_filter_user_id( $user_id = 0, $displayed_user_fallback = true, $current_user_fallback = false ) {
1718
-
1719
- // Define local variable
1720
- $bbp_user_id = 0;
1721
-
1722
- // Get possible user ID's
1723
- $did = bp_displayed_user_id();
1724
- $lid = bp_loggedin_user_id();
1725
-
1726
- // Easy empty checking
1727
- if ( !empty( $user_id ) && is_numeric( $user_id ) )
1728
- $bbp_user_id = $user_id;
1729
-
1730
- // Currently viewing or editing a user
1731
- elseif ( ( true == $displayed_user_fallback ) && !empty( $did ) )
1732
- $bbp_user_id = $did;
1733
-
1734
- // Maybe fallback on the current_user ID
1735
- elseif ( ( true == $current_user_fallback ) && !empty( $lid ) )
1736
- $bbp_user_id = $lid;
1737
-
1738
- return $bbp_user_id;
1739
- }
1740
- add_filter( 'bbp_get_user_id', 'bbp_filter_user_id', 10, 3 );
1741
-
1742
- /**
1743
- * Filter the bbPress is_single_user function with BuddyPress eqivalent
1744
- *
1745
- * @since bbPress (r3552)
1746
- *
1747
- * @param bool $is Optional. Default false
1748
- * @return bool True if viewing single user, false if not
1749
- */
1750
- function bbp_filter_is_single_user( $is = false ) {
1751
- if ( !empty( $is ) )
1752
- return $is;
1753
-
1754
- return bp_is_user();
1755
- }
1756
- add_filter( 'bbp_is_single_user', 'bbp_filter_is_single_user', 10, 1 );
1757
-
1758
- /**
1759
- * Filter the bbPress is_user_home function with BuddyPress eqivalent
1760
- *
1761
- * @since bbPress (r3552)
1762
- *
1763
- * @param bool $is Optional. Default false
1764
- * @return bool True if viewing single user, false if not
1765
- */
1766
- function bbp_filter_is_user_home( $is = false ) {
1767
- if ( !empty( $is ) )
1768
- return $is;
1769
-
1770
- return bp_is_my_profile();
1771
- }
1772
- add_filter( 'bbp_is_user_home', 'bbp_filter_is_user_home', 10, 1 );
1773
-
1774
- /** BuddyPress Screens ********************************************************/
1775
-
1776
- /**
1777
- * Hook bbPress topics template into plugins template
1778
- *
1779
- * @since bbPress (r3552)
1780
- *
1781
- * @uses add_action() To add the content hook
1782
- * @uses bp_core_load_template() To load the plugins template
1783
- */
1784
- function bbp_member_forums_screen_topics() {
1785
- add_action( 'bp_template_content', 'bbp_member_forums_topics_content' );
1786
- bp_core_load_template( apply_filters( 'bbp_member_forums_screen_topics', 'members/single/plugins' ) );
1787
- }
1788
-
1789
- /**
1790
- * Hook bbPress replies template into plugins template
1791
- *
1792
- * @since bbPress (r3552)
1793
- *
1794
- * @uses add_action() To add the content hook
1795
- * @uses bp_core_load_template() To load the plugins template
1796
- */
1797
- function bbp_member_forums_screen_replies() {
1798
- add_action( 'bp_template_content', 'bbp_member_forums_replies_content' );
1799
- bp_core_load_template( apply_filters( 'bbp_member_forums_screen_replies', 'members/single/plugins' ) );
1800
- }
1801
-
1802
- /**
1803
- * Hook bbPress favorites template into plugins template
1804
- *
1805
- * @since bbPress (r3552)
1806
- *
1807
- * @uses add_action() To add the content hook
1808
- * @uses bp_core_load_template() To load the plugins template
1809
- */
1810
- function bbp_member_forums_screen_favorites() {
1811
- add_action( 'bp_template_content', 'bbp_member_forums_favorites_content' );
1812
- bp_core_load_template( apply_filters( 'bbp_member_forums_screen_favorites', 'members/single/plugins' ) );
1813
- }
1814
-
1815
- /**
1816
- * Hook bbPress subscriptions template into plugins template
1817
- *
1818
- * @since bbPress (r3552)
1819
- *
1820
- * @uses add_action() To add the content hook
1821
- * @uses bp_core_load_template() To load the plugins template
1822
- */
1823
- function bbp_member_forums_screen_subscriptions() {
1824
- add_action( 'bp_template_content', 'bbp_member_forums_subscriptions_content' );
1825
- bp_core_load_template( apply_filters( 'bbp_member_forums_screen_subscriptions', 'members/single/plugins' ) );
1826
- }
1827
-
1828
- /** BuddyPress Templates ******************************************************/
1829
-
1830
- /**
1831
- * Get the topics created template part
1832
- *
1833
- * @since bbPress (r3552)
1834
- *
1835
- * @uses bbp_get_template_part()s
1836
- */
1837
- function bbp_member_forums_topics_content() {
1838
- ?>
1839
-
1840
- <div id="bbpress-forums">
1841
-
1842
- <?php bbp_get_template_part( 'user', 'topics-created' ); ?>
1843
-
1844
- </div>
1845
-
1846
- <?php
1847
- }
1848
-
1849
- /**
1850
- * Get the topics replied to template part
1851
- *
1852
- * @since bbPress (r3552)
1853
- *
1854
- * @uses bbp_get_template_part()
1855
- */
1856
- function bbp_member_forums_replies_content() {
1857
- ?>
1858
-
1859
- <div id="bbpress-forums">
1860
-
1861
- <?php bbp_get_template_part( 'user', 'topics-replied-to' ); ?>
1862
-
1863
- </div>
1864
-
1865
- <?php
1866
- }
1867
-
1868
- /**
1869
- * Get the topics favorited template part
1870
- *
1871
- * @since bbPress (r3552)
1872
- *
1873
- * @uses bbp_get_template_part()
1874
- */
1875
- function bbp_member_forums_favorites_content() {
1876
- ?>
1877
-
1878
- <div id="bbpress-forums">
1879
-
1880
- <?php bbp_get_template_part( 'user', 'favorites' ); ?>
1881
-
1882
- </div>
1883
-
1884
- <?php
1885
- }
1886
-
1887
- /**
1888
- * Get the topics subscribed template part
1889
- *
1890
- * @since bbPress (r3552)
1891
- *
1892
- * @uses bbp_get_template_part()
1893
- */
1894
- function bbp_member_forums_subscriptions_content() {
1895
- ?>
1896
-
1897
- <div id="bbpress-forums">
1898
-
1899
- <?php bbp_get_template_part( 'user', 'subscriptions' ); ?>
1900
-
1901
- </div>
1902
-
1903
- <?php
1904
- }
1905
-
1906
- /** Forum/Group Sync **********************************************************/
1907
-
1908
- /**
1909
- * These functions are used to keep the many-to-many relationships between
1910
- * groups and forums synchronized. Each forum and group stores ponters to each
1911
- * other in their respective meta. This way if a group or forum is deleted
1912
- * their associattions can be updated without much effort.
1913
- */
1914
-
1915
- /**
1916
- * Get forum ID's for a group
1917
- *
1918
- * @param type $group_id
1919
- * @since bbPress (r3653)
1920
- */
1921
- function bbp_get_group_forum_ids( $group_id = 0 ) {
1922
-
1923
- // Assume no forums
1924
- $forum_ids = array();
1925
-
1926
- // Use current group if none is set
1927
- if ( empty( $group_id ) )
1928
- $group_id = bp_get_current_group_id();
1929
-
1930
- // Get the forums
1931
- if ( !empty( $group_id ) )
1932
- $forum_ids = groups_get_groupmeta( $group_id, 'forum_id' );
1933
-
1934
- // Make sure result is an array
1935
- if ( !is_array( $forum_ids ) )
1936
- $forum_ids = (array) $forum_ids;
1937
-
1938
- // Trim out any empty array items
1939
- $forum_ids = array_filter( $forum_ids );
1940
-
1941
- return (array) apply_filters( 'bbp_get_group_forum_ids', $forum_ids, $group_id );
1942
- }
1943
-
1944
- /**
1945
- * Get group ID's for a forum
1946
- *
1947
- * @param type $forum_id
1948
- * @since bbPress (r3653)
1949
- */
1950
- function bbp_get_forum_group_ids( $forum_id = 0 ) {
1951
-
1952
- // Assume no forums
1953
- $group_ids = array();
1954
-
1955
- // Use current group if none is set
1956
- if ( empty( $forum_id ) )
1957
- $forum_id = bbp_get_forum_id();
1958
-
1959
- // Get the forums
1960
- if ( !empty( $forum_id ) )
1961
- $group_ids = get_post_meta( $forum_id, '_bbp_group_ids', true );
1962
-
1963
- // Make sure result is an array
1964
- if ( !is_array( $group_ids ) )
1965
- $group_ids = (array) $group_ids;
1966
-
1967
- // Trim out any empty array items
1968
- $group_ids = array_filter( $group_ids );
1969
-
1970
- return (array) apply_filters( 'bbp_get_forum_group_ids', $group_ids, $forum_id );
1971
- }
1972
-
1973
- /**
1974
- * Get forum ID's for a group
1975
- *
1976
- * @param type $group_id
1977
- * @since bbPress (r3653)
1978
- */
1979
- function bbp_update_group_forum_ids( $group_id = 0, $forum_ids = array() ) {
1980
-
1981
- // Use current group if none is set
1982
- if ( empty( $group_id ) )
1983
- $group_id = bp_get_current_group_id();
1984
-
1985
- // Trim out any empties
1986
- $forum_ids = array_filter( $forum_ids );
1987
-
1988
- // Get the forums
1989
- return groups_update_groupmeta( $group_id, 'forum_id', $forum_ids );
1990
- }
1991
-
1992
- /**
1993
- * Update group ID's for a forum
1994
- *
1995
- * @param type $forum_id
1996
- * @since bbPress (r3653)
1997
- */
1998
- function bbp_update_forum_group_ids( $forum_id = 0, $group_ids = array() ) {
1999
- $forum_id = bbp_get_forum_id( $forum_id );
2000
-
2001
- // Trim out any empties
2002
- $group_ids = array_filter( $group_ids );
2003
-
2004
- // Get the forums
2005
- return update_post_meta( $forum_id, '_bbp_group_ids', $group_ids );
2006
- }
2007
-
2008
- /**
2009
- * Add a group to a forum
2010
- *
2011
- * @param type $group_id
2012
- * @since bbPress (r3653)
2013
- */
2014
- function bbp_add_group_id_to_forum( $forum_id = 0, $group_id = 0 ) {
2015
-
2016
- // Validate forum_id
2017
- $forum_id = bbp_get_forum_id( $forum_id );
2018
-
2019
- // Use current group if none is set
2020
- if ( empty( $group_id ) )
2021
- $group_id = bp_get_current_group_id();
2022
-
2023
- // Get current group IDs
2024
- $group_ids = bbp_get_forum_group_ids( $forum_id );
2025
-
2026
- // Maybe update the groups forums
2027
- if ( !in_array( $group_id, $group_ids ) ) {
2028
- $group_ids[] = $group_id;
2029
- return bbp_update_forum_group_ids( $forum_id, $group_ids );
2030
- }
2031
- }
2032
-
2033
- /**
2034
- * Remove a forum from a group
2035
- *
2036
- * @param type $group_id
2037
- * @since bbPress (r3653)
2038
- */
2039
- function bbp_add_forum_id_to_group( $group_id = 0, $forum_id = 0 ) {
2040
-
2041
- // Validate forum_id
2042
- $forum_id = bbp_get_forum_id( $forum_id );
2043
-
2044
- // Use current group if none is set
2045
- if ( empty( $group_id ) )
2046
- $group_id = bp_get_current_group_id();
2047
-
2048
- // Get current group IDs
2049
- $forum_ids = bbp_get_group_forum_ids( $group_id );
2050
-
2051
- // Maybe update the groups forums
2052
- if ( !in_array( $forum_id, $forum_ids ) ) {
2053
- $forum_ids[] = $forum_id;
2054
- return bbp_update_group_forum_ids( $group_id, $forum_ids );
2055
- }
2056
- }
2057
-
2058
- /**
2059
- * Remove a group from a forum
2060
- *
2061
- * @param type $group_id
2062
- * @since bbPress (r3653)
2063
- */
2064
- function bbp_remove_group_id_from_forum( $forum_id = 0, $group_id = 0 ) {
2065
-
2066
- // Validate forum_id
2067
- $forum_id = bbp_get_forum_id( $forum_id );
2068
-
2069
- // Use current group if none is set
2070
- if ( empty( $group_id ) )
2071
- $group_id = bp_get_current_group_id();
2072
-
2073
- // Get current group IDs
2074
- $group_ids = bbp_get_forum_group_ids( $forum_id );
2075
-
2076
- // Maybe update the groups forums
2077
- if ( in_array( $group_id, $group_ids ) ) {
2078
- unset( $group_ids[$group_id] );
2079
- return bbp_update_forum_group_ids( $forum_id, $group_ids );
2080
- }
2081
- }
2082
-
2083
- /**
2084
- * Remove a forum from a group
2085
- *
2086
- * @param type $group_id
2087
- * @since bbPress (r3653)
2088
- */
2089
- function bbp_remove_forum_id_from_group( $group_id = 0, $forum_id = 0 ) {
2090
-
2091
- // Validate forum_id
2092
- $forum_id = bbp_get_forum_id( $forum_id );
2093
-
2094
- // Use current group if none is set
2095
- if ( empty( $group_id ) )
2096
- $group_id = bp_get_current_group_id();
2097
-
2098
- // Get current group IDs
2099
- $forum_ids = bbp_get_group_forum_ids( $group_id );
2100
-
2101
- // Maybe update the groups forums
2102
- if ( in_array( $forum_id, $forum_ids ) ) {
2103
- unset( $forum_ids[$forum_id] );
2104
- return bbp_update_group_forum_ids( $group_id, $forum_ids );
2105
- }
2106
- }
2107
-
2108
- /**
2109
- * Remove a group from aall forums
2110
- *
2111
- * @param type $group_id
2112
- * @since bbPress (r3653)
2113
- */
2114
- function bbp_remove_group_id_from_all_forums( $group_id = 0 ) {
2115
-
2116
- // Use current group if none is set
2117
- if ( empty( $group_id ) )
2118
- $group_id = bp_get_current_group_id();
2119
-
2120
- // Get current group IDs
2121
- $forum_ids = bbp_get_group_forum_ids( $group_id );
2122
-
2123
- // Loop through forums and remove this group from each one
2124
- foreach( (array) $forum_ids as $forum_id ) {
2125
- bbp_remove_group_id_from_forum( $group_id, $forum_id );
2126
- }
2127
- }
2128
-
2129
- /**
2130
- * Remove a forum from all groups
2131
- *
2132
- * @param type $forum_id
2133
- * @since bbPress (r3653)
2134
- */
2135
- function bbp_remove_forum_id_from_all_groups( $forum_id = 0 ) {
2136
-
2137
- // Validate
2138
- $forum_id = bbp_get_forum_id( $forum_id );
2139
- $group_ids = bbp_get_forum_group_ids( $forum_id );
2140
-
2141
- // Loop through groups and remove this forum from each one
2142
- foreach( (array) $group_ids as $group_id ) {
2143
- bbp_remove_forum_id_from_group( $forum_id, $group_id );
2144
- }
2145
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-theme-compat/bbpress/content-single-user-edit.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single User Edit Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php do_action( 'bbp_template_notices' ); ?>
15
-
16
- <?php bbp_get_template_part( 'user', 'details' ); ?>
17
-
18
- <?php bbp_get_template_part( 'form', 'user-edit' ); ?>
19
-
20
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-theme-compat/bbpress/content-single-user.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single User Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php do_action( 'bbp_template_notices' ); ?>
15
-
16
- <?php bbp_get_template_part( 'user', 'details' ); ?>
17
-
18
- <?php bbp_get_template_part( 'user', 'subscriptions' ); ?>
19
-
20
- <?php bbp_get_template_part( 'user', 'favorites' ); ?>
21
-
22
- <?php bbp_get_template_part( 'user', 'topics-created' ); ?>
23
-
24
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-theme-compat/bbpress/form-forum.php DELETED
@@ -1,190 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * New/Edit Forum
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php if ( bbp_is_forum_edit() ) : ?>
13
-
14
- <div id="bbpress-forums">
15
-
16
- <?php bbp_breadcrumb(); ?>
17
-
18
- <?php bbp_single_forum_description( array( 'forum_id' => bbp_get_forum_id() ) ); ?>
19
-
20
- <?php endif; ?>
21
-
22
- <?php if ( bbp_current_user_can_access_create_forum_form() ) : ?>
23
-
24
- <div id="new-forum-<?php bbp_forum_id(); ?>" class="bbp-forum-form">
25
-
26
- <form id="new-post" name="new-post" method="post" action="">
27
-
28
- <?php do_action( 'bbp_theme_before_forum_form' ); ?>
29
-
30
- <fieldset class="bbp-form">
31
- <legend>
32
-
33
- <?php
34
- if ( bbp_is_forum_edit() )
35
- printf( __( 'Now Editing &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() );
36
- else
37
- bbp_is_single_forum() ? printf( __( 'Create New Forum in &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() ) : _e( 'Create New Forum', 'bbpress' );
38
- ?>
39
-
40
- </legend>
41
-
42
- <?php do_action( 'bbp_theme_before_forum_form_notices' ); ?>
43
-
44
- <?php if ( !bbp_is_forum_edit() && bbp_is_forum_closed() ) : ?>
45
-
46
- <div class="bbp-template-notice">
47
- <p><?php _e( 'This forum is closed to new content, however your account still allows you to do so.', 'bbpress' ); ?></p>
48
- </div>
49
-
50
- <?php endif; ?>
51
-
52
- <?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
53
-
54
- <div class="bbp-template-notice">
55
- <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
56
- </div>
57
-
58
- <?php endif; ?>
59
-
60
- <?php do_action( 'bbp_template_notices' ); ?>
61
-
62
- <div>
63
-
64
- <?php do_action( 'bbp_theme_before_forum_form_title' ); ?>
65
-
66
- <p>
67
- <label for="bbp_forum_title"><?php printf( __( 'Forum Name (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />
68
- <input type="text" id="bbp_forum_title" value="<?php bbp_form_forum_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_forum_title" maxlength="<?php bbp_title_max_length(); ?>" />
69
- </p>
70
-
71
- <?php do_action( 'bbp_theme_after_forum_form_title' ); ?>
72
-
73
- <?php do_action( 'bbp_theme_before_forum_form_content' ); ?>
74
-
75
- <?php if ( !function_exists( 'wp_editor' ) ) : ?>
76
-
77
- <p>
78
- <label for="bbp_forum_content"><?php _e( 'Forum Description:', 'bbpress' ); ?></label><br />
79
- <textarea id="bbp_forum_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_forum_content" cols="60" rows="10"><?php bbp_form_forum_content(); ?></textarea>
80
- </p>
81
-
82
- <?php else : ?>
83
-
84
- <?php bbp_the_content( array( 'context' => 'forum' ) ); ?>
85
-
86
- <?php endif; ?>
87
-
88
- <?php do_action( 'bbp_theme_after_forum_form_content' ); ?>
89
-
90
- <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?>
91
-
92
- <p class="form-allowed-tags">
93
- <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
94
- <code><?php bbp_allowed_tags(); ?></code>
95
- </p>
96
-
97
- <?php endif; ?>
98
-
99
- <?php do_action( 'bbp_theme_before_forum_form_type' ); ?>
100
-
101
- <p>
102
- <label for="bbp_forum_type"><?php _e( 'Forum Type:', 'bbpress' ); ?></label><br />
103
- <?php bbp_form_forum_type_dropdown(); ?>
104
- </p>
105
-
106
- <?php do_action( 'bbp_theme_after_forum_form_type' ); ?>
107
-
108
- <?php do_action( 'bbp_theme_before_forum_form_status' ); ?>
109
-
110
- <p>
111
- <label for="bbp_forum_status"><?php _e( 'Status:', 'bbpress' ); ?></label><br />
112
- <?php bbp_form_forum_status_dropdown(); ?>
113
- </p>
114
-
115
- <?php do_action( 'bbp_theme_after_forum_form_status' ); ?>
116
-
117
- <?php do_action( 'bbp_theme_before_forum_form_status' ); ?>
118
-
119
- <p>
120
- <label for="bbp_forum_visibility"><?php _e( 'Visibility:', 'bbpress' ); ?></label><br />
121
- <?php bbp_form_forum_visibility_dropdown(); ?>
122
- </p>
123
-
124
- <?php do_action( 'bbp_theme_after_forum_visibility_status' ); ?>
125
-
126
- <?php do_action( 'bbp_theme_before_forum_form_parent' ); ?>
127
-
128
- <p>
129
- <label for="bbp_forum_parent_id"><?php _e( 'Parent Forum:', 'bbpress' ); ?></label><br />
130
-
131
- <?php
132
- bbp_dropdown( array(
133
- 'select_id' => 'bbp_forum_parent_id',
134
- 'show_none' => __( '(No Parent)', 'bbpress' ),
135
- 'selected' => bbp_get_form_forum_parent(),
136
- 'exclude' => bbp_get_forum_id()
137
- ) );
138
- ?>
139
- </p>
140
-
141
- <?php do_action( 'bbp_theme_after_forum_form_parent' ); ?>
142
-
143
- <?php do_action( 'bbp_theme_before_forum_form_submit_wrapper' ); ?>
144
-
145
- <div class="bbp-submit-wrapper">
146
-
147
- <?php do_action( 'bbp_theme_before_forum_form_submit_button' ); ?>
148
-
149
- <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_forum_submit" name="bbp_forum_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
150
-
151
- <?php do_action( 'bbp_theme_after_forum_form_submit_button' ); ?>
152
-
153
- </div>
154
-
155
- <?php do_action( 'bbp_theme_after_forum_form_submit_wrapper' ); ?>
156
-
157
- </div>
158
-
159
- <?php bbp_forum_form_fields(); ?>
160
-
161
- </fieldset>
162
-
163
- <?php do_action( 'bbp_theme_after_forum_form' ); ?>
164
-
165
- </form>
166
- </div>
167
-
168
- <?php elseif ( bbp_is_forum_closed() ) : ?>
169
-
170
- <div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum">
171
- <div class="bbp-template-notice">
172
- <p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new content.', 'bbpress' ), bbp_get_forum_title() ); ?></p>
173
- </div>
174
- </div>
175
-
176
- <?php else : ?>
177
-
178
- <div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum">
179
- <div class="bbp-template-notice">
180
- <p><?php is_user_logged_in() ? _e( 'You cannot create new forums at this time.', 'bbpress' ) : _e( 'You must be logged in to create new forums.', 'bbpress' ); ?></p>
181
- </div>
182
- </div>
183
-
184
- <?php endif; ?>
185
-
186
- <?php if ( bbp_is_forum_edit() ) : ?>
187
-
188
- </div>
189
-
190
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-theme-compat/bbpress/form-reply.php DELETED
@@ -1,194 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * New/Edit Reply
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php if ( bbp_is_reply_edit() ) : ?>
13
-
14
- <div id="bbpress-forums">
15
-
16
- <?php bbp_breadcrumb(); ?>
17
-
18
- <?php endif; ?>
19
-
20
- <?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>
21
-
22
- <div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form">
23
-
24
- <form id="new-post" name="new-post" method="post" action="">
25
-
26
- <?php do_action( 'bbp_theme_before_reply_form' ); ?>
27
-
28
- <fieldset class="bbp-form">
29
- <legend><?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
30
-
31
- <?php do_action( 'bbp_theme_before_reply_form_notices' ); ?>
32
-
33
- <?php if ( !bbp_is_topic_open() && !bbp_is_reply_edit() ) : ?>
34
-
35
- <div class="bbp-template-notice">
36
- <p><?php _e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p>
37
- </div>
38
-
39
- <?php endif; ?>
40
-
41
- <?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
42
-
43
- <div class="bbp-template-notice">
44
- <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
45
- </div>
46
-
47
- <?php endif; ?>
48
-
49
- <?php do_action( 'bbp_template_notices' ); ?>
50
-
51
- <div>
52
-
53
- <?php bbp_get_template_part( 'form', 'anonymous' ); ?>
54
-
55
- <?php do_action( 'bbp_theme_before_reply_form_content' ); ?>
56
-
57
- <?php if ( !function_exists( 'wp_editor' ) ) : ?>
58
-
59
- <p>
60
- <label for="bbp_reply_content"><?php _e( 'Reply:', 'bbpress' ); ?></label><br />
61
- <textarea id="bbp_reply_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_reply_content" rows="6"><?php bbp_form_reply_content(); ?></textarea>
62
- </p>
63
-
64
- <?php else : ?>
65
-
66
- <?php bbp_the_content( array( 'context' => 'reply' ) ); ?>
67
-
68
- <?php endif; ?>
69
-
70
- <?php do_action( 'bbp_theme_after_reply_form_content' ); ?>
71
-
72
- <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?>
73
-
74
- <p class="form-allowed-tags">
75
- <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
76
- <code><?php bbp_allowed_tags(); ?></code>
77
- </p>
78
-
79
- <?php endif; ?>
80
-
81
- <?php do_action( 'bbp_theme_before_reply_form_tags' ); ?>
82
-
83
- <p>
84
- <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />
85
- <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />
86
- </p>
87
-
88
- <?php do_action( 'bbp_theme_after_reply_form_tags' ); ?>
89
-
90
- <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_reply_edit() || ( bbp_is_reply_edit() && !bbp_is_reply_anonymous() ) ) ) : ?>
91
-
92
- <?php do_action( 'bbp_theme_before_reply_form_subscription' ); ?>
93
-
94
- <p>
95
-
96
- <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" />
97
-
98
- <?php if ( bbp_is_reply_edit() && ( get_the_author_meta( 'ID' ) != bbp_get_current_user_id() ) ) : ?>
99
-
100
- <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
101
-
102
- <?php else : ?>
103
-
104
- <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
105
-
106
- <?php endif; ?>
107
-
108
- </p>
109
-
110
- <?php do_action( 'bbp_theme_after_reply_form_subscription' ); ?>
111
-
112
- <?php endif; ?>
113
-
114
- <?php if ( bbp_allow_revisions() && bbp_is_reply_edit() ) : ?>
115
-
116
- <?php do_action( 'bbp_theme_before_reply_form_revisions' ); ?>
117
-
118
- <fieldset class="bbp-form">
119
- <legend><?php _e( 'Revision', 'bbpress' ); ?></legend>
120
- <div>
121
- <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />
122
- <label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
123
- </div>
124
-
125
- <div>
126
- <label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
127
- <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />
128
- </div>
129
- </fieldset>
130
-
131
- <?php do_action( 'bbp_theme_after_reply_form_revisions' ); ?>
132
-
133
- <?php else : ?>
134
-
135
- <?php bbp_topic_admin_links(); ?>
136
-
137
- <?php endif; ?>
138
-
139
- <?php do_action( 'bbp_theme_before_reply_form_submit_wrapper' ); ?>
140
-
141
- <div class="bbp-submit-wrapper">
142
-
143
- <?php do_action( 'bbp_theme_before_reply_form_submit_button' ); ?>
144
-
145
- <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
146
-
147
- <?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?>
148
-
149
- </div>
150
-
151
- <?php do_action( 'bbp_theme_after_reply_form_submit_wrapper' ); ?>
152
-
153
- </div>
154
-
155
- <?php bbp_reply_form_fields(); ?>
156
-
157
- </fieldset>
158
-
159
- <?php do_action( 'bbp_theme_after_reply_form' ); ?>
160
-
161
- </form>
162
- </div>
163
-
164
- <?php elseif ( bbp_is_topic_closed() ) : ?>
165
-
166
- <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
167
- <div class="bbp-template-notice">
168
- <p><?php printf( __( 'The topic &#8216;%s&#8217; is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></p>
169
- </div>
170
- </div>
171
-
172
- <?php elseif ( bbp_is_forum_closed( bbp_get_topic_forum_id() ) ) : ?>
173
-
174
- <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
175
- <div class="bbp-template-notice">
176
- <p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></p>
177
- </div>
178
- </div>
179
-
180
- <?php else : ?>
181
-
182
- <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
183
- <div class="bbp-template-notice">
184
- <p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></p>
185
- </div>
186
- </div>
187
-
188
- <?php endif; ?>
189
-
190
- <?php if ( bbp_is_reply_edit() ) : ?>
191
-
192
- </div>
193
-
194
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-theme-compat/bbpress/form-topic-merge.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Merge Topic
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php if ( is_user_logged_in() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) : ?>
17
-
18
- <div id="merge-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-merge">
19
-
20
- <form id="merge_topic" name="merge_topic" method="post" action="">
21
-
22
- <fieldset class="bbp-form">
23
-
24
- <legend><?php printf( __( 'Merge topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
25
-
26
- <div>
27
-
28
- <div class="bbp-template-notice info">
29
- <p><?php _e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></p>
30
- <p><?php _e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'bbpress' ); ?></p>
31
- </div>
32
-
33
- <div class="bbp-template-notice">
34
- <p><?php _e( 'All replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted. If the destination topic was created after this one, it\'s post date will be updated to second earlier than this one.', 'bbpress' ); ?></p>
35
- </div>
36
-
37
- <fieldset class="bbp-form">
38
- <legend><?php _e( 'Destination', 'bbpress' ); ?></legend>
39
- <div>
40
- <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>
41
-
42
- <label for="bbp_destination_topic"><?php _e( 'Merge with this topic:', 'bbpress' ); ?></label>
43
-
44
- <?php
45
- bbp_dropdown( array(
46
- 'post_type' => bbp_get_topic_post_type(),
47
- 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
48
- 'selected' => -1,
49
- 'exclude' => bbp_get_topic_id(),
50
- 'select_id' => 'bbp_destination_topic',
51
- 'none_found' => __( 'No topics were found to which the topic could be merged to!', 'bbpress' )
52
- ) );
53
- ?>
54
-
55
- <?php else : ?>
56
-
57
- <label><?php _e( 'There are no other topics in this forum to merge with.', 'bbpress' ); ?></label>
58
-
59
- <?php endif; ?>
60
-
61
- </div>
62
- </fieldset>
63
-
64
- <fieldset class="bbp-form">
65
- <legend><?php _e( 'Topic Extras', 'bbpress' ); ?></legend>
66
-
67
- <div>
68
-
69
- <?php if ( bbp_is_subscriptions_active() ) : ?>
70
-
71
- <input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
72
- <label for="bbp_topic_subscribers"><?php _e( 'Merge topic subscribers', 'bbpress' ); ?></label><br />
73
-
74
- <?php endif; ?>
75
-
76
- <input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
77
- <label for="bbp_topic_favoriters"><?php _e( 'Merge topic favoriters', 'bbpress' ); ?></label><br />
78
-
79
- <input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
80
- <label for="bbp_topic_tags"><?php _e( 'Merge topic tags', 'bbpress' ); ?></label><br />
81
-
82
- </div>
83
- </fieldset>
84
-
85
- <div class="bbp-template-notice error">
86
- <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></p>
87
- </div>
88
-
89
- <div class="bbp-submit-wrapper">
90
- <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
91
- </div>
92
- </div>
93
-
94
- <?php bbp_merge_topic_form_fields(); ?>
95
-
96
- </fieldset>
97
- </form>
98
- </div>
99
-
100
- <?php else : ?>
101
-
102
- <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
103
- <div class="entry-content"><?php is_user_logged_in() ? _e( 'You do not have the permissions to edit this topic!', 'bbpress' ) : _e( 'You cannot edit this topic.', 'bbpress' ); ?></div>
104
- </div>
105
-
106
- <?php endif; ?>
107
-
108
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-theme-compat/bbpress/user-details.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Details
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_user_details' ); ?>
13
-
14
- <span class="page-title author">
15
-
16
- <?php printf( __( 'Profile: %s', 'bbpress' ), "<span class='vcard'><a class='url fn n' href='" . bbp_get_user_profile_url() . "' title='" . esc_attr( bbp_get_displayed_user_field( 'display_name' ) ) . "' rel='me'>" . bbp_get_displayed_user_field( 'display_name' ) . "</a></span>" ); ?>
17
-
18
- <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
19
-
20
- <span class="edit_user_link"><a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( __( 'Edit Profile of User %s', 'bbpress' ), esc_attr( bbp_get_displayed_user_field( 'display_name' ) ) ); ?>"><?php _e( '(Edit)', 'bbpress' ); ?></a></span>
21
-
22
- <?php endif; ?>
23
-
24
- </span>
25
-
26
- <div id="entry-author-info">
27
- <div id="author-avatar">
28
-
29
- <?php echo get_avatar( bbp_get_displayed_user_field( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
30
-
31
- </div><!-- #author-avatar -->
32
- <div id="author-description">
33
- <h1><?php printf( __( 'About %s', 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?></h1>
34
-
35
- <?php bbp_displayed_user_field( 'description' ); ?>
36
-
37
- </div><!-- #author-description -->
38
- </div><!-- #entry-author-info -->
39
-
40
- <?php do_action( 'bbp_template_after_user_details' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/archive-forum.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * bbPress - Forum Archive
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <div id="forum-front" class="bbp-forum-front">
18
- <h1 class="entry-title"><?php bbp_forum_archive_title(); ?></h1>
19
- <div class="entry-content">
20
-
21
- <?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
22
-
23
- </div>
24
- </div><!-- #forum-front -->
25
-
26
- </div><!-- #content -->
27
- </div><!-- #container -->
28
-
29
- <?php get_sidebar(); ?>
30
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/archive-topic.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * bbPress - Topic Archive
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <div id="topic-front" class="bbp-topics-front">
18
- <h1 class="entry-title"><?php bbp_topic_archive_title(); ?></h1>
19
- <div class="entry-content">
20
-
21
- <?php bbp_get_template_part( 'content', 'archive-topic' ); ?>
22
-
23
- </div>
24
- </div><!-- #topics-front -->
25
-
26
- </div><!-- #content -->
27
- </div><!-- #container -->
28
-
29
- <?php get_sidebar(); ?>
30
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress-functions.php DELETED
@@ -1,307 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Functions of bbPress's Twenty Ten theme
5
- *
6
- * @package bbPress
7
- * @subpackage BBP_Twenty_Ten
8
- * @since Twenty Ten 1.1
9
- */
10
-
11
- // Exit if accessed directly
12
- if ( !defined( 'ABSPATH' ) ) exit;
13
-
14
- /** Theme Setup ***************************************************************/
15
-
16
- if ( !class_exists( 'BBP_Twenty_Ten' ) ) :
17
-
18
- /**
19
- * Loads bbPress Twenty Ten Theme functionality
20
- *
21
- * Usually functions.php contains a few functions wrapped in function_exisits()
22
- * checks. Since bbp-twenty-ten is intended to be used both as a child theme and
23
- * for Theme Compatibility, we've moved everything into one convenient class
24
- * that can be copied or extended.
25
- *
26
- * See @link BBP_Theme_Compat() for more.
27
- *
28
- * @since bbPress (r3277)
29
- * @package bbPress
30
- * @subpackage BBP_Twenty_Ten
31
- */
32
- class BBP_Twenty_Ten extends BBP_Theme_Compat {
33
-
34
- /** Functions *************************************************************/
35
-
36
- /**
37
- * The main bbPress (Twenty Ten) Loader
38
- *
39
- * @since bbPress (r3277)
40
- * @uses BBP_Twenty_Ten::setup_globals()
41
- * @uses BBP_Twenty_Ten::setup_actions()
42
- */
43
- public function __construct() {
44
- $this->setup_globals();
45
- $this->setup_actions();
46
- }
47
-
48
- /**
49
- * Component global variables
50
- *
51
- * @since bbPress (r2626)
52
- * @access private
53
- * @uses bbp_get_version() To get the bbPress version
54
- * @uses get_stylesheet_directory() To get the stylesheet path
55
- * @uses get_stylesheet_directory_uri() To get the stylesheet uri
56
- */
57
- private function setup_globals() {
58
- $bbp = bbpress();
59
- $this->id = 'bbp-twentyten';
60
- $this->name = __( 'Twenty Ten (bbPress)', 'bbpress' ) ;
61
- $this->version = bbp_get_version();
62
- $this->dir = trailingslashit( $bbp->themes_dir . 'bbp-twentyten' );
63
- $this->url = trailingslashit( $bbp->themes_url . 'bbp-twentyten' );
64
- }
65
-
66
- /**
67
- * Setup the theme hooks
68
- *
69
- * @since bbPress (r3277)
70
- * @access private
71
- * @uses add_filter() To add various filters
72
- * @uses add_action() To add various actions
73
- */
74
- private function setup_actions() {
75
- add_action( 'bbp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); // Enqueue theme CSS
76
- add_action( 'bbp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // Enqueue theme JS
77
- add_filter( 'bbp_enqueue_scripts', array( $this, 'localize_topic_script' ) ); // Enqueue theme script localization
78
- add_action( 'bbp_head', array( $this, 'head_scripts' ) ); // Output some extra JS in the <head>
79
- add_action( 'wp_ajax_dim-favorite', array( $this, 'ajax_favorite' ) ); // Handles the ajax favorite/unfavorite
80
- add_action( 'wp_ajax_dim-subscription', array( $this, 'ajax_subscription' ) ); // Handles the ajax subscribe/unsubscribe
81
- }
82
-
83
- /**
84
- * Load the theme CSS
85
- *
86
- * @since bbPress (r2652)
87
- * @uses wp_enqueue_style() To enqueue the styles
88
- */
89
- public function enqueue_styles() {
90
-
91
- // Right to left
92
- if ( is_rtl() ) {
93
-
94
- // TwentyTen
95
- if ( 'twentyten' == get_template() ) {
96
- wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $this->version, 'screen' );
97
- wp_enqueue_style( 'twentyten-rtl', get_template_directory_uri() . '/rtl.css', 'twentyten', $this->version, 'screen' );
98
- }
99
-
100
- // bbPress specific
101
- wp_enqueue_style( 'bbp-twentyten-bbpress', $this->url . 'css/bbpress-rtl.css', 'twentyten-rtl', $this->version, 'screen' );
102
-
103
- // Left to right
104
- } else {
105
-
106
- // TwentyTen
107
- if ( 'twentyten' == get_template() ) {
108
- wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $this->version, 'screen' );
109
- }
110
-
111
- // bbPress specific
112
- wp_enqueue_style( 'bbp-twentyten-bbpress', $this->url . 'css/bbpress.css', 'twentyten', $this->version, 'screen' );
113
- }
114
- }
115
-
116
- /**
117
- * Enqueue the required Javascript files
118
- *
119
- * @since bbPress (r2652)
120
- * @uses bbp_is_single_topic() To check if it's the topic page
121
- * @uses get_stylesheet_directory_uri() To get the stylesheet directory uri
122
- * @uses bbp_is_single_user_edit() To check if it's the profile edit page
123
- * @uses wp_enqueue_script() To enqueue the scripts
124
- */
125
- public function enqueue_scripts() {
126
-
127
- if ( bbp_is_single_topic() )
128
- wp_enqueue_script( 'bbp_topic', $this->url . 'js/topic.js', array( 'wp-lists' ), $this->version, true );
129
-
130
- if ( bbp_is_single_user_edit() )
131
- wp_enqueue_script( 'user-profile' );
132
- }
133
-
134
- /**
135
- * Put some scripts in the header, like AJAX url for wp-lists
136
- *
137
- * @since bbPress (r2652)
138
- * @uses bbp_is_single_topic() To check if it's the topic page
139
- * @uses admin_url() To get the admin url
140
- * @uses bbp_is_single_user_edit() To check if it's the profile edit page
141
- */
142
- public function head_scripts() {
143
- if ( bbp_is_single_topic() ) : ?>
144
-
145
- <script type='text/javascript'>
146
- /* <![CDATA[ */
147
- var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
148
- /* ]]> */
149
- </script>
150
-
151
- <?php elseif ( bbp_is_single_user_edit() ) : ?>
152
-
153
- <script type="text/javascript" charset="utf-8">
154
- if ( window.location.hash == '#password' ) {
155
- document.getElementById('pass1').focus();
156
- }
157
- </script>
158
-
159
- <?php
160
- endif;
161
- }
162
-
163
- /**
164
- * Load localizations for topic script
165
- *
166
- * These localizations require information that may not be loaded even by init.
167
- *
168
- * @since bbPress (r2652)
169
- * @uses bbp_is_single_topic() To check if it's the topic page
170
- * @uses is_user_logged_in() To check if user is logged in
171
- * @uses bbp_get_current_user_id() To get the current user id
172
- * @uses bbp_get_topic_id() To get the topic id
173
- * @uses bbp_get_favorites_permalink() To get the favorites permalink
174
- * @uses bbp_is_user_favorite() To check if the topic is in user's favorites
175
- * @uses bbp_is_subscriptions_active() To check if the subscriptions are active
176
- * @uses bbp_is_user_subscribed() To check if the user is subscribed to topic
177
- * @uses bbp_get_topic_permalink() To get the topic permalink
178
- * @uses wp_localize_script() To localize the script
179
- */
180
- public function localize_topic_script() {
181
-
182
- // Bail if not viewing a single topic
183
- if ( !bbp_is_single_topic() )
184
- return;
185
-
186
- // Bail if user is not logged in
187
- if ( !is_user_logged_in() )
188
- return;
189
-
190
- $user_id = bbp_get_current_user_id();
191
-
192
- $localizations = array(
193
- 'currentUserId' => $user_id,
194
- 'topicId' => bbp_get_topic_id(),
195
- );
196
-
197
- // Favorites
198
- if ( bbp_is_favorites_active() ) {
199
- $localizations['favoritesActive'] = 1;
200
- $localizations['favoritesLink'] = bbp_get_favorites_permalink( $user_id );
201
- $localizations['isFav'] = (int) bbp_is_user_favorite( $user_id );
202
- $localizations['favLinkYes'] = __( 'favorites', 'bbpress' );
203
- $localizations['favLinkNo'] = __( '?', 'bbpress' );
204
- $localizations['favYes'] = __( 'This topic is one of your %favLinkYes% [%favDel%]', 'bbpress' );
205
- $localizations['favNo'] = __( '%favAdd% (%favLinkNo%)', 'bbpress' );
206
- $localizations['favDel'] = __( '&times;', 'bbpress' );
207
- $localizations['favAdd'] = __( 'Add this topic to your favorites', 'bbpress' );
208
- } else {
209
- $localizations['favoritesActive'] = 0;
210
- }
211
-
212
- // Subscriptions
213
- if ( bbp_is_subscriptions_active() ) {
214
- $localizations['subsActive'] = 1;
215
- $localizations['isSubscribed'] = (int) bbp_is_user_subscribed( $user_id );
216
- $localizations['subsSub'] = __( 'Subscribe', 'bbpress' );
217
- $localizations['subsUns'] = __( 'Unsubscribe', 'bbpress' );
218
- $localizations['subsLink'] = bbp_get_topic_permalink();
219
- } else {
220
- $localizations['subsActive'] = 0;
221
- }
222
-
223
- wp_localize_script( 'bbp_topic', 'bbpTopicJS', $localizations );
224
- }
225
-
226
- /**
227
- * Add or remove a topic from a user's favorites
228
- *
229
- * @since bbPress (r2652)
230
- * @uses bbp_get_current_user_id() To get the current user id
231
- * @uses current_user_can() To check if the current user can edit the user
232
- * @uses bbp_get_topic() To get the topic
233
- * @uses check_ajax_referer() To verify the nonce & check the referer
234
- * @uses bbp_is_user_favorite() To check if the topic is user's favorite
235
- * @uses bbp_remove_user_favorite() To remove the topic from user's favorites
236
- * @uses bbp_add_user_favorite() To add the topic from user's favorites
237
- */
238
- public function ajax_favorite() {
239
- $user_id = bbp_get_current_user_id();
240
- $id = intval( $_POST['id'] );
241
-
242
- if ( !current_user_can( 'edit_user', $user_id ) )
243
- die( '-1' );
244
-
245
- if ( !$topic = bbp_get_topic( $id ) )
246
- die( '0' );
247
-
248
- check_ajax_referer( 'toggle-favorite_' . $topic->ID );
249
-
250
- if ( bbp_is_user_favorite( $user_id, $topic->ID ) ) {
251
- if ( bbp_remove_user_favorite( $user_id, $topic->ID ) ) {
252
- die( '1' );
253
- }
254
- } else {
255
- if ( bbp_add_user_favorite( $user_id, $topic->ID ) ) {
256
- die( '1' );
257
- }
258
- }
259
-
260
- die( '0' );
261
- }
262
-
263
- /**
264
- * Subscribe/Unsubscribe a user from a topic
265
- *
266
- * @since bbPress (r2668)
267
- * @uses bbp_is_subscriptions_active() To check if the subscriptions are active
268
- * @uses bbp_get_current_user_id() To get the current user id
269
- * @uses current_user_can() To check if the current user can edit the user
270
- * @uses bbp_get_topic() To get the topic
271
- * @uses check_ajax_referer() To verify the nonce & check the referer
272
- * @uses bbp_is_user_subscribed() To check if the topic is in user's
273
- * subscriptions
274
- * @uses bbp_remove_user_subscriptions() To remove the topic from user's
275
- * subscriptions
276
- * @uses bbp_add_user_subscriptions() To add the topic from user's subscriptions
277
- */
278
- public function ajax_subscription() {
279
- if ( !bbp_is_subscriptions_active() )
280
- return;
281
-
282
- $user_id = bbp_get_current_user_id();
283
- $id = intval( $_POST['id'] );
284
-
285
- if ( !current_user_can( 'edit_user', $user_id ) )
286
- die( '-1' );
287
-
288
- if ( !$topic = bbp_get_topic( $id ) )
289
- die( '0' );
290
-
291
- check_ajax_referer( 'toggle-subscription_' . $topic->ID );
292
-
293
- if ( bbp_is_user_subscribed( $user_id, $topic->ID ) ) {
294
- if ( bbp_remove_user_subscription( $user_id, $topic->ID ) ) {
295
- die( '1' );
296
- }
297
- } else {
298
- if ( bbp_add_user_subscription( $user_id, $topic->ID ) ) {
299
- die( '1' );
300
- }
301
- }
302
-
303
- die( '0' );
304
- }
305
- }
306
- new BBP_Twenty_Ten();
307
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-archive-forum.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Archive Forum Content Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php do_action( 'bbp_template_before_forums_index' ); ?>
17
-
18
- <?php if ( bbp_has_forums() ) : ?>
19
-
20
- <?php bbp_get_template_part( 'loop', 'forums' ); ?>
21
-
22
- <?php else : ?>
23
-
24
- <?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
25
-
26
- <?php endif; ?>
27
-
28
- <?php do_action( 'bbp_template_after_forums_index' ); ?>
29
-
30
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-archive-topic.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Archive Topic Content Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php do_action( 'bbp_template_before_topics_index' ); ?>
17
-
18
- <?php if ( bbp_has_topics() ) : ?>
19
-
20
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
21
-
22
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
23
-
24
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
25
-
26
- <?php else : ?>
27
-
28
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
29
-
30
- <?php endif; ?>
31
-
32
- <?php do_action( 'bbp_template_after_topics_index' ); ?>
33
-
34
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-single-forum.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single Topic Content Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php do_action( 'bbp_template_before_single_forum' ); ?>
17
-
18
- <?php if ( post_password_required() ) : ?>
19
-
20
- <?php bbp_get_template_part( 'form', 'protected' ); ?>
21
-
22
- <?php else : ?>
23
-
24
- <?php bbp_single_forum_description(); ?>
25
-
26
- <?php if ( bbp_get_forum_subforum_count() && bbp_has_forums() ) : ?>
27
-
28
- <?php bbp_get_template_part( 'loop', 'forums' ); ?>
29
-
30
- <?php endif; ?>
31
-
32
- <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
33
-
34
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
35
-
36
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
37
-
38
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
39
-
40
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
41
-
42
- <?php elseif ( !bbp_is_forum_category() ) : ?>
43
-
44
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
45
-
46
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
47
-
48
- <?php endif; ?>
49
-
50
- <?php endif; ?>
51
-
52
- <?php do_action( 'bbp_template_after_single_forum' ); ?>
53
-
54
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-single-reply.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single Reply Content Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php do_action( 'bbp_template_before_single_reply' ); ?>
17
-
18
- <?php if ( post_password_required() ) : ?>
19
-
20
- <?php bbp_get_template_part( 'form', 'protected' ); ?>
21
-
22
- <?php else : ?>
23
-
24
- <?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
25
-
26
- <?php endif; ?>
27
-
28
- <?php do_action( 'bbp_template_after_single_reply' ); ?>
29
-
30
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single Topic Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_lead_topic' ); ?>
13
-
14
- <table class="bbp-topic" id="bbp-topic-<?php bbp_topic_id(); ?>">
15
- <thead>
16
- <tr>
17
- <th class="bbp-topic-author"><?php _e( 'Creator', 'bbpress' ); ?></th>
18
- <th class="bbp-topic-content">
19
-
20
- <?php _e( 'Topic', 'bbpress' ); ?>
21
-
22
- <?php bbp_user_subscribe_link(); ?>
23
-
24
- <?php bbp_user_favorites_link(); ?>
25
-
26
- </th>
27
- </tr>
28
- </thead>
29
-
30
- <tfoot>
31
- <tr>
32
- <td colspan="2">
33
-
34
- <?php bbp_topic_admin_links(); ?>
35
-
36
- </td>
37
- </tr>
38
- </tfoot>
39
-
40
- <tbody>
41
-
42
- <tr class="bbp-topic-header">
43
- <td colspan="2">
44
-
45
- <?php printf( __( '%1$s at %2$s', 'bbpress' ), get_the_date(), esc_attr( get_the_time() ) ); ?>
46
-
47
- <a href="#bbp-topic-<?php bbp_topic_id(); ?>" title="<?php bbp_topic_title(); ?>" class="bbp-topic-permalink">#<?php bbp_topic_id(); ?></a>
48
-
49
- </td>
50
- </tr>
51
-
52
- <tr id="post-<?php bbp_topic_id(); ?>" <?php post_class( 'bbp-forum-topic' ); ?>>
53
-
54
- <td class="bbp-topic-author">
55
-
56
- <?php bbp_topic_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
57
-
58
- <?php if ( is_super_admin() ) : ?>
59
-
60
- <div class="bbp-topic-ip"><?php bbp_author_ip( bbp_get_topic_id() ); ?></div>
61
-
62
- <?php endif; ?>
63
-
64
- </td>
65
-
66
- <td class="bbp-topic-content">
67
-
68
- <?php bbp_topic_content(); ?>
69
-
70
- </td>
71
-
72
- </tr><!-- #post-<?php bbp_topic_id(); ?> -->
73
-
74
- </tbody>
75
- </table><!-- #bbp-topic-<?php bbp_topic_id(); ?> -->
76
-
77
- <?php do_action( 'bbp_template_after_lead_topic' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-single-topic.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single Topic Content Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php do_action( 'bbp_template_before_single_topic' ); ?>
17
-
18
- <?php if ( post_password_required() ) : ?>
19
-
20
- <?php bbp_get_template_part( 'form', 'protected' ); ?>
21
-
22
- <?php else : ?>
23
-
24
- <?php bbp_topic_tag_list(); ?>
25
-
26
- <?php bbp_single_topic_description(); ?>
27
-
28
- <?php if ( bbp_show_lead_topic() ) : ?>
29
-
30
- <?php bbp_get_template_part( 'content', 'single-topic-lead' ); ?>
31
-
32
- <?php endif; ?>
33
-
34
- <?php if ( bbp_has_replies() ) : ?>
35
-
36
- <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
37
-
38
- <?php bbp_get_template_part( 'loop', 'replies' ); ?>
39
-
40
- <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
41
-
42
- <?php else : ?>
43
-
44
- <?php bbp_get_template_part( 'feedback', 'no-replies' ); ?>
45
-
46
- <?php endif; ?>
47
-
48
- <?php bbp_get_template_part( 'form', 'reply' ); ?>
49
-
50
- <?php endif; ?>
51
-
52
- <?php do_action( 'bbp_template_after_single_topic' ); ?>
53
-
54
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-single-user-edit.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single User Edit Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php do_action( 'bbp_template_notices' );
15
-
16
- // Profile details
17
- bbp_get_template_part( 'user', 'details' );
18
-
19
- // User edit form
20
- bbp_get_template_part( 'form', 'user-edit' ); ?>
21
-
22
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-single-user.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single User Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php do_action( 'bbp_template_notices' ); ?>
15
-
16
- <?php bbp_get_template_part( 'user', 'details' ); ?>
17
-
18
- <hr />
19
-
20
- <?php bbp_get_template_part( 'user', 'subscriptions' ); ?>
21
-
22
- <hr />
23
-
24
- <?php bbp_get_template_part( 'user', 'favorites' ); ?>
25
-
26
- <hr />
27
-
28
- <?php bbp_get_template_part( 'user', 'topics-created' ); ?>
29
-
30
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-single-view.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single View Content Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php bbp_set_query_name( 'bbp_view' ); ?>
17
-
18
- <?php if ( bbp_view_query() ) : ?>
19
-
20
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
21
-
22
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
23
-
24
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
25
-
26
- <?php else : ?>
27
-
28
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
29
-
30
- <?php endif; ?>
31
-
32
- <?php bbp_reset_query_name(); ?>
33
-
34
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/content-topic-tag-edit.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Topic Tag Edit Content Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php bbp_topic_tag_description(); ?>
17
-
18
- <?php do_action( 'bbp_template_before_topic_tag_edit' ); ?>
19
-
20
- <?php bbp_get_template_part( 'form', 'topic-tag' ); ?>
21
-
22
- <?php do_action( 'bbp_template_after_topic_tag_edit' ); ?>
23
-
24
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/feedback-logged-in.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Already Logged In
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div class="bbp-template-notice info">
13
- <p><?php _e( 'You are already logged in.', 'bbpress' ); ?></p>
14
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/feedback-no-access.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * No access
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="forum-private" class="bbp-forum-content">
13
- <h1 class="entry-title"><?php _e( 'Private', 'bbpress' ); ?></h1>
14
- <div class="entry-content">
15
- <div class="bbp-template-notice info">
16
- <p><?php _e( 'You do not have permission to view this forum.', 'bbpress' ); ?></p>
17
- </div>
18
- </div>
19
- </div><!-- #forum-private -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/feedback-no-forums.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Oh bother!
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div class="bbp-template-notice">
13
- <p><?php _e( 'Oh bother! No forums were found here!', 'bbpress' ); ?></p>
14
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/feedback-no-replies.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Oh bother!
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div class="bbp-template-notice">
13
- <p><?php _e( 'Oh bother! No replies were found here!', 'bbpress' ); ?></p>
14
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/feedback-no-topics.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Oh bother!
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div class="bbp-template-notice">
13
- <p><?php _e( 'Oh bother! No topics were found here!', 'bbpress' ); ?></p>
14
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-anonymous.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Anonymous User
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php if ( bbp_is_anonymous() || ( bbp_is_topic_edit() && bbp_is_topic_anonymous() ) || ( bbp_is_reply_edit() && bbp_is_reply_anonymous() ) ) : ?>
13
-
14
- <?php do_action( 'bbp_theme_before_anonymous_form' ); ?>
15
-
16
- <fieldset class="bbp-form">
17
- <legend><?php ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? _e( 'Author Information', 'bbpress' ) : _e( 'Your information:', 'bbpress' ); ?></legend>
18
-
19
- <?php do_action( 'bbp_theme_anonymous_form_extras_top' ); ?>
20
-
21
- <p>
22
- <label for="bbp_anonymous_author"><?php _e( 'Name (required):', 'bbpress' ); ?></label><br />
23
- <input type="text" id="bbp_anonymous_author" value="<?php bbp_is_topic_edit() ? bbp_topic_author() : bbp_is_reply_edit() ? bbp_reply_author() : bbp_current_anonymous_user_data( 'name' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_name" />
24
- </p>
25
-
26
- <p>
27
- <label for="bbp_anonymous_email"><?php _e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br />
28
- <input type="text" id="bbp_anonymous_email" value="<?php bbp_is_topic_edit() ? bbp_topic_author_email() : bbp_is_reply_edit() ? bbp_reply_author_email() : bbp_current_anonymous_user_data( 'email' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_email" />
29
- </p>
30
-
31
- <p>
32
- <label for="bbp_anonymous_website"><?php _e( 'Website:', 'bbpress' ); ?></label><br />
33
- <input type="text" id="bbp_anonymous_website" value="<?php bbp_is_topic_edit() ? bbp_topic_author_url() : bbp_is_reply_edit() ? bbp_reply_author_url() : bbp_current_anonymous_user_data( 'website' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_website" />
34
- </p>
35
-
36
- <?php do_action( 'bbp_theme_anonymous_form_extras_bottom' ); ?>
37
-
38
- </fieldset>
39
-
40
- <?php do_action( 'bbp_theme_after_anonymous_form' ); ?>
41
-
42
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-protected.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Password Protected
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
- <fieldset class="bbp-form" id="bbp-protected">
14
- <Legend><?php _e( 'Protected', 'bbpress' ); ?></legend>
15
-
16
- <?php echo get_the_password_form(); ?>
17
-
18
- </fieldset>
19
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-topic-split.php DELETED
@@ -1,112 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Split Topic
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <div id="bbpress-forums">
13
-
14
- <?php bbp_breadcrumb(); ?>
15
-
16
- <?php if ( is_user_logged_in() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) : ?>
17
-
18
- <div id="split-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-split">
19
-
20
- <form id="split_topic" name="split_topic" method="post" action="">
21
-
22
- <fieldset class="bbp-form">
23
-
24
- <legend><?php printf( __( 'Split topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
25
-
26
- <div>
27
-
28
- <div class="bbp-template-notice info">
29
- <p><?php _e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'bbpress' ); ?></p>
30
- </div>
31
-
32
- <div class="bbp-template-notice">
33
- <p><?php _e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'bbpress' ); ?></p>
34
- </div>
35
-
36
- <fieldset class="bbp-form">
37
- <legend><?php _e( 'Split Method', 'bbpress' ); ?></legend>
38
-
39
- <div>
40
- <input name="bbp_topic_split_option" id="bbp_topic_split_option_reply" type="radio" checked="checked" value="reply" tabindex="<?php bbp_tab_index(); ?>" />
41
- <label for="bbp_topic_split_option_reply"><?php printf( __( 'New topic in <strong>%s</strong> titled:', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id( bbp_get_topic_id() ) ) ); ?></label>
42
- <input type="text" id="bbp_topic_split_destination_title" value="<?php printf( __( 'Split: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="35" name="bbp_topic_split_destination_title" />
43
- </div>
44
-
45
- <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>
46
-
47
- <div>
48
- <input name="bbp_topic_split_option" id="bbp_topic_split_option_existing" type="radio" value="existing" tabindex="<?php bbp_tab_index(); ?>" />
49
- <label for="bbp_topic_split_option_existing"><?php _e( 'Use an existing topic in this forum:', 'bbpress' ); ?></label>
50
-
51
- <?php
52
- bbp_dropdown( array(
53
- 'post_type' => bbp_get_topic_post_type(),
54
- 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
55
- 'selected' => -1,
56
- 'exclude' => bbp_get_topic_id(),
57
- 'select_id' => 'bbp_destination_topic',
58
- 'none_found' => __( 'No other topics found!', 'bbpress' )
59
- ) );
60
- ?>
61
-
62
- </div>
63
-
64
- <?php endif; ?>
65
-
66
- </fieldset>
67
-
68
- <fieldset class="bbp-form">
69
- <legend><?php _e( 'Topic Extras', 'bbpress' ); ?></legend>
70
-
71
- <div>
72
-
73
- <?php if ( bbp_is_subscriptions_active() ) : ?>
74
-
75
- <input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
76
- <label for="bbp_topic_subscribers"><?php _e( 'Copy subscribers to the new topic', 'bbpress' ); ?></label><br />
77
-
78
- <?php endif; ?>
79
-
80
- <input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
81
- <label for="bbp_topic_favoriters"><?php _e( 'Copy favoriters to the new topic', 'bbpress' ); ?></label><br />
82
-
83
- <input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
84
- <label for="bbp_topic_tags"><?php _e( 'Copy topic tags to the new topic', 'bbpress' ); ?></label><br />
85
-
86
- </div>
87
- </fieldset>
88
-
89
- <div class="bbp-template-notice error">
90
- <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></p>
91
- </div>
92
-
93
- <div class="bbp-submit-wrapper">
94
- <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
95
- </div>
96
- </div>
97
-
98
- <?php bbp_split_topic_form_fields(); ?>
99
-
100
- </fieldset>
101
- </form>
102
- </div>
103
-
104
- <?php else : ?>
105
-
106
- <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
107
- <div class="entry-content"><?php is_user_logged_in() ? _e( 'You do not have the permissions to edit this topic!', 'bbpress' ) : _e( 'You cannot edit this topic.', 'bbpress' ); ?></div>
108
- </div>
109
-
110
- <?php endif; ?>
111
-
112
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php DELETED
@@ -1,119 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Edit Topic Tag
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php if ( current_user_can( 'edit_topic_tags' ) ) : ?>
13
-
14
- <div id="edit-topic-tag-<?php bbp_topic_tag_id(); ?>" class="bbp-topic-tag-form">
15
-
16
- <fieldset class="bbp-form" id="bbp-edit-topic-tag">
17
-
18
- <legend><?php printf( __( 'Manage Tag: "%s"', 'bbpress' ), bbp_get_topic_tag_name() ); ?></legend>
19
-
20
- <fieldset class="bbp-form" id="tag-rename">
21
-
22
- <legend><?php _e( 'Rename', 'bbpress' ); ?></legend>
23
-
24
- <div class="bbp-template-notice info">
25
- <p><?php _e( 'Leave the slug empty to have one automatically generated.', 'bbpress' ); ?></p>
26
- </div>
27
-
28
- <div class="bbp-template-notice">
29
- <p><?php _e( 'Changing the slug affects its permalink. Any links to the old slug will stop working.', 'bbpress' ); ?></p>
30
- </div>
31
-
32
- <form id="rename_tag" name="rename_tag" method="post" action="">
33
-
34
- <div>
35
- <label for="tag-name"><?php _e( 'Name:', 'bbpress' ); ?></label>
36
- <input type="text" id="tag-name" name="tag-name" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( bbp_get_topic_tag_name() ); ?>" />
37
- </div>
38
-
39
- <div>
40
- <label for="tag-slug"><?php _e( 'Slug:', 'bbpress' ); ?></label>
41
- <input type="text" id="tag-slug" name="tag-slug" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( apply_filters( 'editable_slug', bbp_get_topic_tag_slug() ) ); ?>" />
42
- </div>
43
-
44
- <div class="bbp-submit-wrapper">
45
- <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php esc_attr_e( 'Update', 'bbpress' ); ?>" /><br />
46
-
47
- <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
48
- <input type="hidden" name="action" value="bbp-update-topic-tag" />
49
-
50
- <?php wp_nonce_field( 'update-tag_' . bbp_get_topic_tag_id() ); ?>
51
-
52
- </div>
53
- </form>
54
-
55
- </fieldset>
56
-
57
- <fieldset class="bbp-form" id="tag-merge">
58
-
59
- <legend><?php _e( 'Merge', 'bbpress' ); ?></legend>
60
-
61
- <div class="bbp-template-notice">
62
- <p><?php _e( 'Merging tags together cannot be undone.', 'bbpress' ); ?></p>
63
- </div>
64
-
65
- <form id="merge_tag" name="merge_tag" method="post" action="">
66
-
67
- <div>
68
- <label for="tag-existing-name"><?php _e( 'Existing tag:', 'bbpress' ); ?></label>
69
- <input type="text" id="tag-existing-name" name="tag-existing-name" size="22" tabindex="<?php bbp_tab_index(); ?>" maxlength="40" />
70
- </div>
71
-
72
- <div class="bbp-submit-wrapper">
73
- <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php esc_attr_e( 'Merge', 'bbpress' ); ?>"
74
- onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to merge the "%s" tag into the tag you specified?', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');" />
75
-
76
- <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
77
- <input type="hidden" name="action" value="bbp-merge-topic-tag" />
78
-
79
- <?php wp_nonce_field( 'merge-tag_' . bbp_get_topic_tag_id() ); ?>
80
- </div>
81
- </form>
82
-
83
- </fieldset>
84
-
85
- <?php if ( current_user_can( 'delete_topic_tags' ) ) : ?>
86
-
87
- <fieldset class="bbp-form" id="delete-tag">
88
-
89
- <legend><?php _e( 'Delete', 'bbpress' ); ?></legend>
90
-
91
- <div class="bbp-template-notice info">
92
- <p><?php _e( 'This does not delete your topics. Only the tag itself is deleted.', 'bbpress' ); ?></p>
93
- </div>
94
- <div class="bbp-template-notice">
95
- <p><?php _e( 'Deleting a tag cannot be undone.', 'bbpress' ); ?></p>
96
- <p><?php _e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></p>
97
- </div>
98
-
99
- <form id="delete_tag" name="delete_tag" method="post" action="">
100
-
101
- <div class="bbp-submit-wrapper">
102
- <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php _e( 'Delete', 'bbpress' ); ?>"
103
- onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to delete the "%s" tag? This is permanent and cannot be undone.', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');" />
104
-
105
- <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
106
- <input type="hidden" name="action" value="bbp-delete-topic-tag" />
107
-
108
- <?php wp_nonce_field( 'delete-tag_' . bbp_get_topic_tag_id() ); ?>
109
- </div>
110
- </form>
111
-
112
- </fieldset>
113
-
114
- <?php endif; ?>
115
-
116
- </fieldset>
117
- </div>
118
-
119
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-topic.php DELETED
@@ -1,235 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * New/Edit Topic
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php if ( !bbp_is_single_forum() ) : ?>
13
-
14
- <div id="bbpress-forums">
15
-
16
- <?php bbp_breadcrumb(); ?>
17
-
18
- <?php endif; ?>
19
-
20
- <?php if ( bbp_is_topic_edit() ) : ?>
21
-
22
- <?php bbp_topic_tag_list( bbp_get_topic_id() ); ?>
23
-
24
- <?php bbp_single_topic_description( array( 'topic_id' => bbp_get_topic_id() ) ); ?>
25
-
26
- <?php endif; ?>
27
-
28
- <?php if ( bbp_current_user_can_access_create_topic_form() ) : ?>
29
-
30
- <div id="new-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-form">
31
-
32
- <form id="new-post" name="new-post" method="post" action="">
33
-
34
- <?php do_action( 'bbp_theme_before_topic_form' ); ?>
35
-
36
- <fieldset class="bbp-form">
37
- <legend>
38
-
39
- <?php
40
- if ( bbp_is_topic_edit() )
41
- printf( __( 'Now Editing &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_topic_title() );
42
- else
43
- bbp_is_single_forum() ? printf( __( 'Create New Topic in &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() ) : _e( 'Create New Topic', 'bbpress' );
44
- ?>
45
-
46
- </legend>
47
-
48
- <?php do_action( 'bbp_theme_before_topic_form_notices' ); ?>
49
-
50
- <?php if ( !bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?>
51
-
52
- <div class="bbp-template-notice">
53
- <p><?php _e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p>
54
- </div>
55
-
56
- <?php endif; ?>
57
-
58
- <?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
59
-
60
- <div class="bbp-template-notice">
61
- <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
62
- </div>
63
-
64
- <?php endif; ?>
65
-
66
- <?php do_action( 'bbp_template_notices' ); ?>
67
-
68
- <div>
69
-
70
- <?php bbp_get_template_part( 'form', 'anonymous' ); ?>
71
-
72
- <?php do_action( 'bbp_theme_before_topic_form_title' ); ?>
73
-
74
- <p>
75
- <label for="bbp_topic_title"><?php printf( __( 'Topic Title (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />
76
- <input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" />
77
- </p>
78
-
79
- <?php do_action( 'bbp_theme_after_topic_form_title' ); ?>
80
-
81
- <?php do_action( 'bbp_theme_before_topic_form_content' ); ?>
82
-
83
- <?php if ( !function_exists( 'wp_editor' ) ) : ?>
84
-
85
- <p>
86
- <label for="bbp_topic_content"><?php _e( 'Topic:', 'bbpress' ); ?></label><br />
87
- <textarea id="bbp_topic_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_topic_content" cols="60" rows="6"><?php bbp_form_topic_content(); ?></textarea>
88
- </p>
89
-
90
- <?php else : ?>
91
-
92
- <?php bbp_the_content( array( 'context' => 'topic' ) ); ?>
93
-
94
- <?php endif; ?>
95
-
96
- <?php do_action( 'bbp_theme_after_topic_form_content' ); ?>
97
-
98
- <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?>
99
-
100
- <p class="form-allowed-tags">
101
- <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
102
- <code><?php bbp_allowed_tags(); ?></code>
103
- </p>
104
-
105
- <?php endif; ?>
106
-
107
- <?php do_action( 'bbp_theme_before_topic_form_tags' ); ?>
108
-
109
- <p>
110
- <label for="bbp_topic_tags"><?php _e( 'Topic Tags:', 'bbpress' ); ?></label><br />
111
- <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />
112
- </p>
113
-
114
- <?php do_action( 'bbp_theme_after_topic_form_tags' ); ?>
115
-
116
- <?php if ( !bbp_is_single_forum() ) : ?>
117
-
118
- <?php do_action( 'bbp_theme_before_topic_form_forum' ); ?>
119
-
120
- <p>
121
- <label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
122
- <?php bbp_dropdown( array( 'selected' => bbp_get_form_topic_forum() ) ); ?>
123
- </p>
124
-
125
- <?php do_action( 'bbp_theme_after_topic_form_forum' ); ?>
126
-
127
- <?php endif; ?>
128
-
129
- <?php if ( current_user_can( 'moderate' ) ) : ?>
130
-
131
- <?php do_action( 'bbp_theme_before_topic_form_type' ); ?>
132
-
133
- <p>
134
-
135
- <label for="bbp_stick_topic"><?php _e( 'Topic Type:', 'bbpress' ); ?></label><br />
136
-
137
- <?php bbp_topic_type_select(); ?>
138
-
139
- </p>
140
-
141
- <?php do_action( 'bbp_theme_after_topic_form_type' ); ?>
142
-
143
- <?php endif; ?>
144
-
145
- <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_topic_edit() || ( bbp_is_topic_edit() && !bbp_is_topic_anonymous() ) ) ) : ?>
146
-
147
- <?php do_action( 'bbp_theme_before_topic_form_subscriptions' ); ?>
148
-
149
- <p>
150
- <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" />
151
-
152
- <?php if ( bbp_is_topic_edit() && ( get_the_author_meta( 'ID' ) != bbp_get_current_user_id() ) ) : ?>
153
-
154
- <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
155
-
156
- <?php else : ?>
157
-
158
- <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
159
-
160
- <?php endif; ?>
161
- </p>
162
-
163
- <?php do_action( 'bbp_theme_after_topic_form_subscriptions' ); ?>
164
-
165
- <?php endif; ?>
166
-
167
- <?php if ( bbp_allow_revisions() && bbp_is_topic_edit() ) : ?>
168
-
169
- <?php do_action( 'bbp_theme_before_topic_form_revisions' ); ?>
170
-
171
- <fieldset class="bbp-form">
172
- <legend><?php _e( 'Revision', 'bbpress' ); ?></legend>
173
- <div>
174
- <input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" <?php bbp_form_topic_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />
175
- <label for="bbp_log_topic_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
176
- </div>
177
-
178
- <div>
179
- <label for="bbp_topic_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
180
- <input type="text" value="<?php bbp_form_topic_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
181
- </div>
182
- </fieldset>
183
-
184
- <?php do_action( 'bbp_theme_after_topic_form_revisions' ); ?>
185
-
186
- <?php endif; ?>
187
-
188
- <?php do_action( 'bbp_theme_before_topic_form_submit_wrapper' ); ?>
189
-
190
- <div class="bbp-submit-wrapper">
191
-
192
- <?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?>
193
-
194
- <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
195
-
196
- <?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>
197
-
198
- </div>
199
-
200
- <?php do_action( 'bbp_theme_after_topic_form_submit_wrapper' ); ?>
201
-
202
- </div>
203
-
204
- <?php bbp_topic_form_fields(); ?>
205
-
206
- </fieldset>
207
-
208
- <?php do_action( 'bbp_theme_after_topic_form' ); ?>
209
-
210
- </form>
211
- </div>
212
-
213
- <?php elseif ( bbp_is_forum_closed() ) : ?>
214
-
215
- <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
216
- <div class="bbp-template-notice">
217
- <p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title() ); ?></p>
218
- </div>
219
- </div>
220
-
221
- <?php else : ?>
222
-
223
- <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
224
- <div class="bbp-template-notice">
225
- <p><?php is_user_logged_in() ? _e( 'You cannot create new topics at this time.', 'bbpress' ) : _e( 'You must be logged in to create new topics.', 'bbpress' ); ?></p>
226
- </div>
227
- </div>
228
-
229
- <?php endif; ?>
230
-
231
- <?php if ( !bbp_is_single_forum() ) : ?>
232
-
233
- </div>
234
-
235
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-user-edit.php DELETED
@@ -1,178 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * bbPress User Profile Edit Part
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <form id="bbp-your-profile" action="<?php bbp_user_profile_edit_url( bbp_get_displayed_user_id() ); ?>" method="post">
13
-
14
- <h2 class="entry-title"><?php _e( 'Name', 'bbpress' ) ?></h2>
15
-
16
- <?php do_action( 'bbp_user_edit_before' ); ?>
17
-
18
- <fieldset class="bbp-form">
19
- <legend><?php _e( 'Name', 'bbpress' ) ?></legend>
20
-
21
- <?php do_action( 'bbp_user_edit_before_name' ); ?>
22
-
23
- <div>
24
- <label for="first_name"><?php _e( 'First Name', 'bbpress' ) ?></label>
25
- <input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'first_name' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
26
- </div>
27
-
28
- <div>
29
- <label for="last_name"><?php _e( 'Last Name', 'bbpress' ) ?></label>
30
- <input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'last_name' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
31
- </div>
32
-
33
- <div>
34
- <label for="nickname"><?php _e( 'Nickname', 'bbpress' ); ?></label>
35
- <input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'nickname' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
36
- </div>
37
-
38
- <div>
39
- <label for="display_name"><?php _e( 'Display name publicly as', 'bbpress' ) ?></label>
40
-
41
- <?php bbp_edit_user_display_name(); ?>
42
-
43
- </div>
44
-
45
- <?php do_action( 'bbp_user_edit_after_name' ); ?>
46
-
47
- </fieldset>
48
-
49
- <h2 class="entry-title"><?php _e( 'Contact Info', 'bbpress' ) ?></h2>
50
-
51
- <fieldset class="bbp-form">
52
- <legend><?php _e( 'Contact Info', 'bbpress' ) ?></legend>
53
-
54
- <?php do_action( 'bbp_user_edit_before_contact' ); ?>
55
-
56
- <div>
57
- <label for="url"><?php _e( 'Website', 'bbpress' ) ?></label>
58
- <input type="text" name="url" id="url" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_url' ) ); ?>" class="regular-text code" tabindex="<?php bbp_tab_index(); ?>" />
59
- </div>
60
-
61
- <?php foreach ( bbp_edit_user_contact_methods() as $name => $desc ) : ?>
62
-
63
- <div>
64
- <label for="<?php echo $name; ?>"><?php echo apply_filters( 'user_'.$name.'_label', $desc ); ?></label>
65
- <input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'name' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
66
- </div>
67
-
68
- <?php endforeach; ?>
69
-
70
- <?php do_action( 'bbp_user_edit_after_contact' ); ?>
71
-
72
- </fieldset>
73
-
74
- <h2 class="entry-title"><?php bbp_is_user_home_edit() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?></h2>
75
-
76
- <fieldset class="bbp-form">
77
- <legend><?php bbp_is_user_home_edit() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?></legend>
78
-
79
- <?php do_action( 'bbp_user_edit_before_about' ); ?>
80
-
81
- <div>
82
- <label for="description"><?php _e( 'Biographical Info', 'bbpress' ); ?></label>
83
- <textarea name="description" id="description" rows="5" cols="30" tabindex="<?php bbp_tab_index(); ?>"><?php echo esc_attr( bbp_get_displayed_user_field( 'description' ) ); ?></textarea>
84
- <span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'bbpress' ); ?></span>
85
- </div>
86
-
87
- <?php do_action( 'bbp_user_edit_after_about' ); ?>
88
-
89
- </fieldset>
90
-
91
- <h2 class="entry-title"><?php _e( 'Account', 'bbpress' ) ?></h2>
92
-
93
- <fieldset class="bbp-form">
94
- <legend><?php _e( 'Account', 'bbpress' ) ?></legend>
95
-
96
- <?php do_action( 'bbp_user_edit_before_account' ); ?>
97
-
98
- <div>
99
- <label for="user_login"><?php _e( 'Username', 'bbpress' ); ?></label>
100
- <input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_login' ) ); ?>" disabled="disabled" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
101
- <span class="description"><?php _e( 'Usernames cannot be changed.', 'bbpress' ); ?></span>
102
- </div>
103
-
104
- <div>
105
- <label for="email"><?php _e( 'Email', 'bbpress' ); ?></label>
106
-
107
- <input type="text" name="email" id="email" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_email' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
108
-
109
- <?php
110
-
111
- // Handle address change requests
112
- $new_email = get_option( bbp_get_displayed_user_id() . '_new_email' );
113
- if ( $new_email && $new_email != bbp_get_displayed_user_field( 'user_email' ) ) : ?>
114
-
115
- <span class="updated inline">
116
-
117
- <?php printf( __( 'There is a pending email address change to <code>%1$s</code>. <a href="%2$s">Cancel</a>', 'bbpress' ), $new_email['newemail'], esc_url( self_admin_url( 'user.php?dismiss=' . bbp_get_current_user_id() . '_new_email' ) ) ); ?>
118
-
119
- </span>
120
-
121
- <?php endif; ?>
122
-
123
- </div>
124
-
125
- <div id="password">
126
- <label for="pass1"><?php _e( 'New Password', 'bbpress' ); ?></label>
127
- <fieldset class="bbp-form">
128
- <input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" tabindex="<?php bbp_tab_index(); ?>" />
129
- <span class="description"><?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'bbpress' ); ?></span>
130
-
131
- <input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" tabindex="<?php bbp_tab_index(); ?>" />
132
- <span class="description"><?php _e( 'Type your new password again.', 'bbpress' ); ?></span><br />
133
-
134
- <div id="pass-strength-result"></div>
135
- <span class="description indicator-hint"><?php _e( 'Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).', 'bbpress' ); ?></span>
136
- </fieldset>
137
- </div>
138
-
139
- <?php if ( current_user_can( 'edit_users' ) && ! bbp_is_user_home_edit() ) : ?>
140
-
141
- <div>
142
- <label for="role"><?php _e( 'Role:', 'bbpress' ) ?></label>
143
-
144
- <?php bbp_edit_user_role(); ?>
145
-
146
- </div>
147
-
148
- <?php endif; ?>
149
-
150
- <?php if ( is_multisite() && is_super_admin() && current_user_can( 'manage_network_options' ) ) : ?>
151
-
152
- <div>
153
- <label for="role"><?php _e( 'Super Admin', 'bbpress' ); ?></label>
154
- <label>
155
- <input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( bbp_get_displayed_user_id() ) ); ?> tabindex="<?php bbp_tab_index(); ?>" />
156
- <?php _e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?>
157
- </label>
158
- </div>
159
-
160
- <?php endif; ?>
161
-
162
- <?php do_action( 'bbp_user_edit_after_account' ); ?>
163
-
164
- </fieldset>
165
-
166
- <?php do_action( 'bbp_user_edit_after' ); ?>
167
-
168
- <fieldset class="submit">
169
- <legend><?php _e( 'Save Changes', 'bbpress' ); ?></legend>
170
- <div>
171
-
172
- <?php bbp_edit_user_form_fields(); ?>
173
-
174
- <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_user_edit_submit" name="bbp_user_edit_submit" class="button submit user-submit"><?php bbp_is_user_home_edit() ? _e( 'Update Profile', 'bbpress' ) : _e( 'Update User', 'bbpress' ); ?></button>
175
- </div>
176
- </fieldset>
177
-
178
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-user-login.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Login Form
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
13
- <fieldset class="bbp-form">
14
- <legend><?php _e( 'Log In', 'bbpress' ); ?></legend>
15
-
16
- <div class="bbp-username">
17
- <label for="user_login"><?php _e( 'Username', 'bbpress' ); ?>: </label>
18
- <input type="text" name="log" value="<?php bbp_sanitize_val( 'user_login', 'text' ); ?>" size="20" id="user_login" tabindex="<?php bbp_tab_index(); ?>" />
19
- </div>
20
-
21
- <div class="bbp-password">
22
- <label for="user_pass"><?php _e( 'Password', 'bbpress' ); ?>: </label>
23
- <input type="password" name="pwd" value="<?php bbp_sanitize_val( 'user_pass', 'password' ); ?>" size="20" id="user_pass" tabindex="<?php bbp_tab_index(); ?>" />
24
- </div>
25
-
26
- <div class="bbp-remember-me">
27
- <input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ) ); ?> id="rememberme" tabindex="<?php bbp_tab_index(); ?>" />
28
- <label for="rememberme"><?php _e( 'Keep me signed in', 'bbpress' ); ?></label>
29
- </div>
30
-
31
- <div class="bbp-submit-wrapper">
32
-
33
- <?php do_action( 'login_form' ); ?>
34
-
35
- <input type="submit" name="user-submit" value="<?php _e( 'Log In', 'bbpress' ); ?>" tabindex="<?php bbp_tab_index(); ?>" class="user-submit" />
36
-
37
- <?php bbp_user_login_fields(); ?>
38
-
39
- </div>
40
- </fieldset>
41
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-user-lost-pass.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Lost Password Form
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <form method="post" action="<?php bbp_wp_login_action( array( 'action' => 'lostpassword', 'context' => 'login_post' ) ); ?>" class="bbp-user-register">
13
- <fieldset class="bbp-form">
14
- <legend><?php _e( 'Lost Password', 'bbpress' ); ?></legend>
15
-
16
- <div class="bbp-username">
17
- <p>
18
- <label for="user_login" class="hide"><?php _e( 'Username or Email', 'bbpress' ); ?>: </label>
19
- <input type="text" name="user_login" value="" size="20" id="user_login" tabindex="<?php bbp_tab_index(); ?>" />
20
- </p>
21
- </div>
22
-
23
- <div class="bbp-submit-wrapper">
24
-
25
- <?php do_action( 'login_form', 'resetpass' ); ?>
26
-
27
- <input type="submit" name="user-submit" value="<?php _e( 'Reset my password', 'bbpress' ); ?>" class="user-submit" tabindex="<?php bbp_tab_index(); ?>" />
28
-
29
- <?php bbp_user_lost_pass_fields(); ?>
30
-
31
- </div>
32
- </fieldset>
33
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/form-user-register.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Registration Form
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
13
- <fieldset class="bbp-form">
14
- <legend><?php _e( 'Create an Account', 'bbpress' ); ?></legend>
15
-
16
- <div class="bbp-template-notice">
17
- <p><?php _e( 'Your username must be unique, and cannot be changed later.', 'bbpress' ) ?></p>
18
- <p><?php _e( 'We use your email address to email you a secure password and verify your account.', 'bbpress' ) ?></p>
19
-
20
- </div>
21
-
22
- <div class="bbp-username">
23
- <label for="user_login"><?php _e( 'Username', 'bbpress' ); ?>: </label>
24
- <input type="text" name="user_login" value="<?php bbp_sanitize_val( 'user_login' ); ?>" size="20" id="user_login" tabindex="<?php bbp_tab_index(); ?>" />
25
- </div>
26
-
27
- <div class="bbp-email">
28
- <label for="user_email"><?php _e( 'Email', 'bbpress' ); ?>: </label>
29
- <input type="text" name="user_email" value="<?php bbp_sanitize_val( 'user_email' ); ?>" size="20" id="user_email" tabindex="<?php bbp_tab_index(); ?>" />
30
- </div>
31
-
32
- <?php do_action( 'register_form' ); ?>
33
-
34
- <div class="bbp-submit-wrapper">
35
-
36
- <button type="submit" name="user-submit" tabindex="<?php bbp_tab_index(); ?>" class="button submit user-submit"><?php _e( 'Register', 'bbpress' ); ?></button>
37
-
38
- <?php bbp_user_register_fields(); ?>
39
-
40
- </div>
41
- </fieldset>
42
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/loop-forums.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Forums Loop
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_forums_loop' ); ?>
13
-
14
- <table class="bbp-forums">
15
-
16
- <thead>
17
- <tr>
18
- <th class="bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></th>
19
- <th class="bbp-forum-topic-count"><?php _e( 'Topics', 'bbpress' ); ?></th>
20
- <th class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></th>
21
- <th class="bbp-forum-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></th>
22
- </tr>
23
- </thead>
24
-
25
- <tfoot>
26
- <tr><td colspan="4">&nbsp;</td></tr>
27
- </tfoot>
28
-
29
- <tbody>
30
-
31
- <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
32
-
33
- <?php bbp_get_template_part( 'loop', 'single-forum' ); ?>
34
-
35
- <?php endwhile; ?>
36
-
37
- </tbody>
38
-
39
- </table>
40
-
41
- <?php do_action( 'bbp_template_after_forums_loop' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/loop-replies.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Replies Loop
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_replies_loop' ); ?>
13
-
14
- <table class="bbp-replies" id="topic-<?php bbp_topic_id(); ?>-replies">
15
- <thead>
16
- <tr>
17
- <th class="bbp-reply-author"><?php _e( 'Author', 'bbpress' ); ?></th>
18
- <th class="bbp-reply-content">
19
-
20
- <?php if ( !bbp_show_lead_topic() ) : ?>
21
-
22
- <?php _e( 'Posts', 'bbpress' ); ?>
23
-
24
- <?php bbp_user_subscribe_link(); ?>
25
-
26
- <?php bbp_user_favorites_link(); ?>
27
-
28
- <?php else : ?>
29
-
30
- <?php _e( 'Replies', 'bbpress' ); ?>
31
-
32
- <?php endif; ?>
33
-
34
- </th>
35
- </tr>
36
- </thead>
37
-
38
- <tfoot>
39
- <tr>
40
- <th class="bbp-reply-author"><?php _e( 'Author', 'bbpress' ); ?></th>
41
- <th class="bbp-reply-content">
42
-
43
- <?php if ( !bbp_show_lead_topic() ) : ?>
44
-
45
- <?php _e( 'Posts', 'bbpress' ); ?>
46
-
47
- <?php else : ?>
48
-
49
- <?php _e( 'Replies', 'bbpress' ); ?>
50
-
51
- <?php endif; ?>
52
-
53
- </th>
54
- </tr>
55
- </tfoot>
56
-
57
- <tbody>
58
-
59
- <?php while ( bbp_replies() ) : bbp_the_reply(); ?>
60
-
61
- <?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
62
-
63
- <?php endwhile; ?>
64
-
65
- </tbody>
66
-
67
- </table>
68
-
69
- <?php do_action( 'bbp_template_after_replies_loop' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/loop-single-forum.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Forums Loop - Single Forum
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <tr id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>
13
-
14
- <td class="bbp-forum-info">
15
-
16
- <?php do_action( 'bbp_theme_before_forum_title' ); ?>
17
-
18
- <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>"><?php bbp_forum_title(); ?></a>
19
-
20
- <?php do_action( 'bbp_theme_after_forum_title' ); ?>
21
-
22
- <?php do_action( 'bbp_theme_before_forum_sub_forums' ); ?>
23
-
24
- <?php bbp_list_forums(); ?>
25
-
26
- <?php do_action( 'bbp_theme_after_forum_sub_forums' ); ?>
27
-
28
- <?php do_action( 'bbp_theme_before_forum_description' ); ?>
29
-
30
- <div class="bbp-forum-content"><?php the_content(); ?></div>
31
-
32
- <?php do_action( 'bbp_theme_after_forum_description' ); ?>
33
-
34
- </td>
35
-
36
- <td class="bbp-forum-topic-count"><?php bbp_forum_topic_count(); ?></td>
37
-
38
- <td class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? bbp_forum_reply_count() : bbp_forum_post_count(); ?></td>
39
-
40
- <td class="bbp-forum-freshness">
41
-
42
- <?php do_action( 'bbp_theme_before_forum_freshness_link' ); ?>
43
-
44
- <?php bbp_forum_freshness_link(); ?>
45
-
46
- <?php do_action( 'bbp_theme_after_forum_freshness_link' ); ?>
47
-
48
- <p class="bbp-topic-meta">
49
-
50
- <?php do_action( 'bbp_theme_before_topic_author' ); ?>
51
-
52
- <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span>
53
-
54
- <?php do_action( 'bbp_theme_after_topic_author' ); ?>
55
-
56
- </p>
57
- </td>
58
-
59
- </tr><!-- bbp-forum-<?php bbp_forum_id(); ?> -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/loop-single-reply.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Replies Loop - Single Reply
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <tr class="bbp-reply-header">
13
- <td colspan="2">
14
-
15
- <?php printf( __( '%1$s at %2$s', 'bbpress' ), get_the_date(), esc_attr( get_the_time() ) ); ?>
16
-
17
- <a href="<?php bbp_reply_url(); ?>" title="<?php bbp_reply_title(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
18
-
19
- <?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
20
-
21
- <?php bbp_reply_admin_links(); ?>
22
-
23
- <?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>
24
-
25
- </td>
26
- </tr>
27
-
28
- <tr id="post-<?php bbp_reply_id(); ?>" <?php bbp_reply_class(); ?>>
29
-
30
- <td class="bbp-reply-author">
31
-
32
- <?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
33
-
34
- <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
35
-
36
- <?php if ( is_super_admin() ) : ?>
37
-
38
- <?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
39
-
40
- <div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div>
41
-
42
- <?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?>
43
-
44
- <?php endif; ?>
45
-
46
- <?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
47
-
48
- </td>
49
-
50
- <td class="bbp-reply-content">
51
-
52
- <?php do_action( 'bbp_theme_before_reply_content' ); ?>
53
-
54
- <?php bbp_reply_content(); ?>
55
-
56
- <?php do_action( 'bbp_theme_after_reply_content' ); ?>
57
-
58
- </td>
59
-
60
- </tr><!-- #post-<?php bbp_topic_id(); ?> -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/loop-single-topic.php DELETED
@@ -1,103 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Topics Loop - Single
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <tr id="topic-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
13
-
14
- <td class="bbp-topic-title">
15
-
16
- <?php do_action( 'bbp_theme_before_topic_title' ); ?>
17
-
18
- <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>" title="<?php bbp_topic_title(); ?>"><?php bbp_topic_title(); ?></a>
19
-
20
- <?php do_action( 'bbp_theme_after_topic_title' ); ?>
21
-
22
- <?php bbp_topic_pagination(); ?>
23
-
24
- <?php do_action( 'bbp_theme_before_topic_meta' ); ?>
25
-
26
- <p class="bbp-topic-meta">
27
-
28
- <?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
29
-
30
- <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
31
-
32
- <?php do_action( 'bbp_theme_after_topic_started_by' ); ?>
33
-
34
- <?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() != bbp_get_forum_id() ) ) : ?>
35
-
36
- <?php do_action( 'bbp_theme_before_topic_started_in' ); ?>
37
-
38
- <span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>
39
-
40
- <?php do_action( 'bbp_theme_after_topic_started_in' ); ?>
41
-
42
- <?php endif; ?>
43
-
44
- </p>
45
-
46
- <?php do_action( 'bbp_theme_after_topic_meta' ); ?>
47
-
48
- </td>
49
-
50
- <td class="bbp-topic-voice-count"><?php bbp_topic_voice_count(); ?></td>
51
-
52
- <td class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?></td>
53
-
54
- <td class="bbp-topic-freshness">
55
-
56
- <?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
57
-
58
- <?php bbp_topic_freshness_link(); ?>
59
-
60
- <?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
61
-
62
- <p class="bbp-topic-meta">
63
-
64
- <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
65
-
66
- <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
67
-
68
- <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
69
-
70
- </p>
71
- </td>
72
-
73
- <?php if ( bbp_is_user_home() ) : ?>
74
-
75
- <?php if ( bbp_is_favorites() ) : ?>
76
-
77
- <td class="bbp-topic-action">
78
-
79
- <?php do_action( 'bbp_theme_before_topic_favorites_action' ); ?>
80
-
81
- <?php bbp_user_favorites_link( array( 'mid' => '+', 'post' => '' ), array( 'pre' => '', 'mid' => '&times;', 'post' => '' ) ); ?>
82
-
83
- <?php do_action( 'bbp_theme_after_topic_favorites_action' ); ?>
84
-
85
- </td>
86
-
87
- <?php elseif ( bbp_is_subscriptions() ) : ?>
88
-
89
- <td class="bbp-topic-action">
90
-
91
- <?php do_action( 'bbp_theme_before_topic_subscription_action' ); ?>
92
-
93
- <?php bbp_user_subscribe_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '&times;' ) ); ?>
94
-
95
- <?php do_action( 'bbp_theme_after_topic_subscription_action' ); ?>
96
-
97
- </td>
98
-
99
- <?php endif; ?>
100
-
101
- <?php endif; ?>
102
-
103
- </tr><!-- #topic-<?php bbp_topic_id(); ?> -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/loop-topics.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Topics Loop
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_topics_loop' ); ?>
13
-
14
- <table class="bbp-topics" id="bbp-forum-<?php bbp_topic_id(); ?>">
15
- <thead>
16
- <tr>
17
- <th class="bbp-topic-title"><?php _e( 'Topic', 'bbpress' ); ?></th>
18
- <th class="bbp-topic-voice-count"><?php _e( 'Voices', 'bbpress' ); ?></th>
19
- <th class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></th>
20
- <th class="bbp-topic-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></th>
21
- <?php if ( ( bbp_is_user_home() && ( bbp_is_favorites() || bbp_is_subscriptions() ) ) ) : ?><th class="bbp-topic-action"><?php _e( 'Remove', 'bbpress' ); ?></th><?php endif; ?>
22
- </tr>
23
- </thead>
24
-
25
- <tfoot>
26
- <tr><td colspan="<?php echo ( bbp_is_user_home() && ( bbp_is_favorites() || bbp_is_subscriptions() ) ) ? '5' : '4'; ?>">&nbsp;</td></tr>
27
- </tfoot>
28
-
29
- <tbody>
30
-
31
- <?php while ( bbp_topics() ) : bbp_the_topic(); ?>
32
-
33
- <?php bbp_get_template_part( 'loop', 'single-topic' ); ?>
34
-
35
- <?php endwhile; ?>
36
-
37
- </tbody>
38
-
39
- </table><!-- #bbp-forum-<?php bbp_topic_id(); ?> -->
40
-
41
- <?php do_action( 'bbp_template_after_topics_loop' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/pagination-replies.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Pagination for pages of replies (when viewing a topic)
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_pagination_loop' ); ?>
13
-
14
- <div class="bbp-pagination">
15
- <div class="bbp-pagination-count">
16
-
17
- <?php bbp_topic_pagination_count(); ?>
18
-
19
- </div>
20
-
21
- <div class="bbp-pagination-links">
22
-
23
- <?php bbp_topic_pagination_links(); ?>
24
-
25
- </div>
26
- </div>
27
-
28
- <?php do_action( 'bbp_template_after_pagination_loop' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/pagination-topics.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Pagination for pages of topics (when viewing a forum)
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_pagination_loop' ); ?>
13
-
14
- <div class="bbp-pagination">
15
- <div class="bbp-pagination-count">
16
-
17
- <?php bbp_forum_pagination_count(); ?>
18
-
19
- </div>
20
-
21
- <div class="bbp-pagination-links">
22
-
23
- <?php bbp_forum_pagination_links(); ?>
24
-
25
- </div>
26
- </div>
27
-
28
- <?php do_action( 'bbp_template_after_pagination_loop' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/user-details.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Details
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_user_details' ); ?>
13
-
14
- <span class="page-title author">
15
-
16
- <?php printf( __( 'Profile: %s', 'bbpress' ), "<span class='vcard'><a class='url fn n' href='" . bbp_get_user_profile_url() . "' title='" . esc_attr( bbp_get_displayed_user_field( 'display_name' ) ) . "' rel='me'>" . bbp_get_displayed_user_field( 'display_name' ) . "</a></span>" ); ?>
17
-
18
- <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
19
-
20
- <span class="edit_user_link"><a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( __( 'Edit Profile of User %s', 'bbpress' ), esc_attr( bbp_get_displayed_user_field( 'display_name' ) ) ); ?>"><?php _e( '(Edit)', 'bbpress' ); ?></a></span>
21
-
22
- <?php endif; ?>
23
-
24
- </span>
25
-
26
- <div id="entry-author-info">
27
- <div id="author-avatar">
28
-
29
- <?php echo get_avatar( bbp_get_displayed_user_field( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
30
-
31
- </div><!-- #author-avatar -->
32
- <div id="author-description">
33
- <h1><?php printf( __( 'About %s', 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?></h1>
34
-
35
- <?php echo bbp_get_displayed_user_field( 'description' ); ?>
36
-
37
- </div><!-- #author-description -->
38
- </div><!-- #entry-author-info -->
39
-
40
- <?php do_action( 'bbp_template_after_user_details' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/user-favorites.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Favorites
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_user_favorites' ); ?>
13
-
14
- <?php bbp_set_query_name( 'bbp_user_profile_favorites' ); ?>
15
-
16
- <div id="bbp-author-favorites" class="bbp-author-favorites">
17
- <h2 class="entry-title"><?php _e( 'Favorite Forum Topics', 'bbpress' ); ?></h2>
18
- <div class="entry-content">
19
-
20
- <?php if ( bbp_get_user_favorites() ) :
21
-
22
- bbp_get_template_part( 'pagination', 'topics' );
23
- bbp_get_template_part( 'loop', 'topics' );
24
- bbp_get_template_part( 'pagination', 'topics' );
25
-
26
- else : ?>
27
-
28
- <p><?php bbp_is_user_home() ? _e( 'You currently have no favorite topics.', 'bbpress' ) : _e( 'This user has no favorite topics.', 'bbpress' ); ?></p>
29
-
30
- <?php endif; ?>
31
-
32
- </div>
33
- </div><!-- #bbp-author-favorites -->
34
-
35
- <?php bbp_reset_query_name(); ?>
36
-
37
- <?php do_action( 'bbp_template_after_user_favorites' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/user-subscriptions.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Subscriptions
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_user_subscriptions' ); ?>
13
-
14
- <?php if ( bbp_is_subscriptions_active() ) : ?>
15
-
16
- <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
17
-
18
- <?php bbp_set_query_name( 'bbp_user_profile_subscriptions' ); ?>
19
-
20
- <div id="bbp-author-subscriptions" class="bbp-author-subscriptions">
21
- <h2 class="entry-title"><?php _e( 'Subscribed Forum Topics', 'bbpress' ); ?></h2>
22
- <div class="entry-content">
23
-
24
- <?php if ( bbp_get_user_subscriptions() ) :
25
-
26
- bbp_get_template_part( 'pagination', 'topics' );
27
- bbp_get_template_part( 'loop', 'topics' );
28
- bbp_get_template_part( 'pagination', 'topics' );
29
-
30
- else : ?>
31
-
32
- <p><?php bbp_is_user_home() ? _e( 'You are not currently subscribed to any topics.', 'bbpress' ) : _e( 'This user is not currently subscribed to any topics.', 'bbpress' ); ?></p>
33
-
34
- <?php endif; ?>
35
-
36
- </div>
37
- </div><!-- #bbp-author-subscriptions -->
38
-
39
- <?php bbp_reset_query_name(); ?>
40
-
41
- <?php endif; ?>
42
-
43
- <?php endif; ?>
44
-
45
- <?php do_action( 'bbp_template_after_user_subscriptions' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/bbpress/user-topics-created.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Topics Created
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- ?>
11
-
12
- <?php do_action( 'bbp_template_before_user_topics_created' ); ?>
13
-
14
- <?php bbp_set_query_name( 'bbp_user_profile_topics_created' ); ?>
15
-
16
- <div id="bbp-author-topics-started" class="bbp-author-topics-started">
17
- <h2 class="entry-title"><?php _e( 'Forum Topics Created', 'bbpress' ); ?></h2>
18
- <div class="entry-content">
19
-
20
- <?php if ( bbp_get_user_topics_started() ) :
21
-
22
- bbp_get_template_part( 'pagination', 'topics' );
23
- bbp_get_template_part( 'loop', 'topics' );
24
- bbp_get_template_part( 'pagination', 'topics' );
25
-
26
- else : ?>
27
-
28
- <p><?php bbp_is_user_home() ? _e( 'You have not created any topics.', 'bbpress' ) : _e( 'This user has not created any topics.', 'bbpress' ); ?></p>
29
-
30
- <?php endif; ?>
31
-
32
- </div>
33
- </div><!-- #bbp-author-topics-started -->
34
-
35
- <?php bbp_reset_query_name(); ?>
36
-
37
- <?php do_action( 'bbp_template_after_user_topics_created' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/css/bbpress-rtl.css DELETED
@@ -1,687 +0,0 @@
1
- /**
2
- * bbPress specific CSS
3
- *
4
- * @package bbPress
5
- * @subpackage Theme
6
- */
7
-
8
- /* =bbPress Style
9
- -------------------------------------------------------------- */
10
-
11
- #content hr,
12
- #container hr {
13
- margin: 0 0 24px 0;
14
- }
15
- #entry-author-info {
16
- margin: 10px 0 0 0;
17
- border-bottom: 1px solid #fff;
18
- }
19
-
20
- #content table.bbp-topics,
21
- #content table.bbp-forums,
22
- #content table.bbp-replies,
23
-
24
- #container table.bbp-topics,
25
- #container table.bbp-forums,
26
- #container table.bbp-replies,
27
-
28
- #main table.bbp-topics,
29
- #main table.bbp-forums,
30
- #main table.bbp-replies {
31
- table-layout: fixed;
32
- width: 100%;
33
- clear: right;
34
- }
35
-
36
- /* =Breadcrumb and Tags
37
- -------------------------------------------------------------- */
38
-
39
- div.bbp-breadcrumb {
40
- float: right;
41
- }
42
-
43
- div.bbp-breadcrumb,
44
- div.bbp-topic-tags {
45
- font-size: 12px;
46
- }
47
-
48
- #content div.bbp-breadcrumb p,
49
- #content div.bbp-topic-tags p {
50
- margin-bottom: 10px
51
- }
52
-
53
- div.bbp-topic-tags {
54
- float: left;
55
- }
56
-
57
- /* =Tables
58
- -------------------------------------------------------------- */
59
-
60
- #content table tbody tr.even td {
61
- background-color: #fff;
62
- }
63
- #content table tbody tr.odd td {
64
- background-color: #fbfbfb;
65
- }
66
-
67
- #content table tbody tr.status-trash.even td,
68
- #content table tbody tr.status-spam.even td {
69
- background-color: #fee;
70
- }
71
- #content table tbody tr.status-trash.odd td,
72
- #content table tbody tr.status-spam.odd td {
73
- background-color: #fdd;
74
- }
75
-
76
- #content table.bbp-topics tbody tr.status-closed td,
77
- #content table.bbp-topics tbody tr.status-closed td a {
78
- color: #ccc;
79
- }
80
-
81
- table.bbp-topic tbody tr td,
82
- table.bbp-replies tbody tr td {
83
- background-color: #fff;
84
- }
85
-
86
- table.bbp-forums th, table.bbp-topics th,
87
- table.bbp-topic th, table.bbp-replies th {
88
- background-color: #f3f3f3;
89
- }
90
- table.bbp-forums th span, table.bbp-topics th span,
91
- table.bbp-topic th span, table.bbp-replies th span {
92
- float: left;
93
- }
94
- #content th.bbp-topic-author,
95
- #content th.bbp-reply-author {
96
- text-align: center;
97
- width: 120px;
98
- }
99
- #content th.bbp-topic-content,
100
- #content th.bbp-reply-content {
101
- text-align: right;
102
- padding: 9px 15px 9px 10px;
103
- }
104
- #content table.bbp-forums tfoot td, #content table.bbp-topics tfoot td,
105
- #content table.bbp-topic tfoot td, #content table.bbp-replies tfoot td,
106
- #content table.bbp-replies tr.bbp-reply-header td,
107
- #content table.bbp-topic tr.bbp-topic-header td {
108
- background-color: #fafafa;
109
- color: #888;
110
- font-size: 12px;
111
- font-weight: bold;
112
- font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif;
113
- padding: 4px 10px;
114
- }
115
-
116
- span.bbp-author-ip {
117
- font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif;
118
- font-size: 11px;
119
- font-weight: bold;
120
- color: #aaa;
121
- }
122
-
123
- #content .bbp-forum-info {
124
- width: 55%;
125
- text-align: right;
126
- }
127
-
128
- #content .bbp-forum-topic-count,
129
- #content .bbp-forum-reply-count,
130
- #content .bbp-topic-reply-count,
131
- #content .bbp-topic-voice-count,
132
- #content .bbp-topic-action {
133
- width: 10%;
134
- text-align: center;
135
- padding: 6px 0px;
136
- }
137
-
138
- #content td.bbp-topic-author,
139
- #content td.bbp-reply-author {
140
- padding: 20px 0 20px 20px;
141
- width: 90px;
142
- text-align: center;
143
- vertical-align: top;
144
- }
145
-
146
- .bbp-topic-title {
147
- width: 55%;
148
- text-align: right;
149
- }
150
-
151
- .bbp-topic-freshness,
152
- .bbp-forum-freshness {
153
- text-align: center;
154
- width: 25%;
155
- }
156
-
157
- #content tbody .bbp-topic-content,
158
- #content tbody .bbp-reply-content {
159
- vertical-align: top;
160
- padding: 15px 10px 10px 15px;
161
- overflow: auto;
162
- }
163
-
164
- #content .bbp-topic-content img,
165
- #content .bbp-reply-content img {
166
- max-width: 100%;
167
- }
168
-
169
- /* =Admin Links
170
- -------------------------------------------------------------- */
171
-
172
- span.bbp-admin-links {
173
- float: left;
174
- color: #ddd;
175
- }
176
- span.bbp-admin-links a {
177
- color: #bbb;
178
- font-weight: normal;
179
- font-size: 10px;
180
- text-transform: uppercase;
181
- text-decoration: none;
182
- }
183
- fieldset span.bbp-admin-links {
184
- float: right;
185
- }
186
- tr td span.bbp-admin-links a:hover {
187
- color: #ff4b33;
188
- }
189
- td.bbp-topic-admin-links,
190
- td.bbp-topic-counts {
191
- width: 50%;
192
- }
193
-
194
- a.bbp-topic-permalink,
195
- a.bbp-reply-permalink {
196
- float: left;
197
- margin-right: 10px;
198
- color: #ccc;
199
- }
200
-
201
- /* =Toggles
202
- -------------------------------------------------------------- */
203
-
204
- .bbp-topic-action #favorite-toggle a {
205
- text-decoration: none;
206
- padding: 0px 3px 1px;
207
- color: #7c7;
208
- border: 1px solid #aca;
209
- background-color: #dfd;
210
- font-weight: bold;
211
- font-size: 13px;
212
- -moz-border-radius: 8px;
213
- -webkit-border-radius: 8px;
214
- }
215
- .bbp-topic-action #favorite-toggle a:hover {
216
- color: #5a5;
217
- border-color: #7c7;
218
- background-color: #beb;
219
- }
220
- .bbp-topic-action #favorite-toggle span.is-favorite a {
221
- color: #faa;
222
- border: 1px solid #faa;
223
- background-color: #fee;
224
- -moz-border-radius: 5px;
225
- -webkit-border-radius: 5px;
226
- }
227
- .bbp-topic-action #favorite-toggle span.is-favorite a:hover {
228
- color: #c88;
229
- border-color: #c88;
230
- background-color: #fdd;
231
- }
232
-
233
- .bbp-topic-action #subscription-toggle a {
234
- text-decoration: none;
235
- padding: 0px 3px 1px;
236
- color: #7c7;
237
- border: 1px solid #aca;
238
- background-color: #dfd;
239
- font-weight: bold;
240
- font-size: 13px;
241
- -moz-border-radius: 8px;
242
- -webkit-border-radius: 8px;
243
- }
244
- .bbp-topic-action #subscription-toggle a:hover {
245
- color: #5a5;
246
- border-color: #7c7;
247
- background-color: #beb;
248
- }
249
- .bbp-topic-action #subscription-toggle span.is-subscribed a {
250
- color: #faa;
251
- border: 1px solid #faa;
252
- background-color: #fee;
253
- -moz-border-radius: 5px;
254
- -webkit-border-radius: 5px;
255
- }
256
- .bbp-topic-action #subscription-toggle span.is-subscribed a:hover {
257
- color: #c88;
258
- border-color: #c88;
259
- background-color: #fdd;
260
- }
261
-
262
- #content p.bbp-topic-meta {
263
- margin-bottom: 0;
264
- font-size: 11px;
265
- }
266
-
267
- #content p.bbp-topic-meta span {
268
- white-space: nowrap;
269
- }
270
-
271
- /* =Forums
272
- -------------------------------------------------------------- */
273
-
274
- #content table tbody tr .bbp-forum-content p {
275
- margin-bottom: 0;
276
- font-size: 13px;
277
- font-style: italic;
278
- }
279
- #content table tbody tr ul.bbp-forums {
280
- list-style: none;
281
- font-size: 12px;
282
- margin: 0 0 0 10px;
283
- padding: 0 0 0 10px;
284
- border-right: 1px solid #aaa;
285
- }
286
- #content table tbody tr ul.bbp-forums li {
287
- display: inline;
288
- }
289
-
290
- /* =Pagination
291
- -------------------------------------------------------------- */
292
-
293
- .bbp-pagination-count {
294
- float: right;
295
- }
296
- .bbp-pagination-links {
297
- float: left;
298
- }
299
- .bbp-pagination {
300
- float: right;
301
- width: 100%;
302
- margin-bottom: 20px;
303
- }
304
-
305
- .bbp-topic-pagination {
306
- display: inline-block;
307
- margin-right: 5px;
308
- margin-bottom: 2px;
309
- }
310
- .bbp-topic-pagination a {
311
- font-size: 10px;
312
- line-height: 10px;
313
- padding: 1px 3px;
314
- border: 1px solid #ddd;
315
- text-decoration: none;
316
- }
317
-
318
- /* =Forms
319
- -------------------------------------------------------------- */
320
- #content fieldset.bbp-form,
321
- #container fieldset.bbp-form,
322
- #wrapper fieldset.bbp-form {
323
- clear: right;
324
- }
325
-
326
- #content fieldset.bbp-form,
327
- #container fieldset.bbp-form,
328
- #wrapper fieldset.bbp-form {
329
- border: 1px solid #eee;
330
- padding: 10px 20px;
331
- }
332
-
333
- #content fieldset.bbp-form legend,
334
- #container fieldset.bbp-form legend,
335
- #wrapper fieldset.bbp-form legend {
336
- padding: 5px;
337
- }
338
-
339
- #content fieldset.bbp-form label,
340
- #container fieldset.bbp-form label,
341
- #wrapper fieldset.bbp-form label {
342
- margin: 0;
343
- display: inline-block;
344
- }
345
-
346
- #bbp-edit-topic-tag.bbp-form fieldset.bbp-form label,
347
- #bbp-login fieldset label,
348
- #bbp-register fieldset label,
349
- #bbp-lost-pass fieldset label {
350
- width: 100px;
351
- }
352
-
353
- #content fieldset.bbp-form p,
354
- #container fieldset.bbp-form p,
355
- #wrapper fieldset.bbp-form p,
356
- #content fieldset.bbp-form textarea,
357
- #container fieldset.bbp-form textarea,
358
- #wrapper fieldset.bbp-form textarea,
359
- #content fieldset.bbp-form select,
360
- #container fieldset.bbp-form select,
361
- #wrapper fieldset.bbp-form select,
362
- #content fieldset.bbp-form input,
363
- #container fieldset.bbp-form input,
364
- #wrapper fieldset.bbp-form input {
365
- margin: 0px 0px 10px;
366
- }
367
-
368
- #content fieldset.bbp-forum-form-main *,
369
- #container fieldset.bbp-forum-form-main *,
370
- #wrapper fieldset.bbp-forum-form-main * {
371
- width: 97%;
372
- }
373
-
374
- #content fieldset.bbp-forum-form-attributes,
375
- #container fieldset.bbp-forum-form-attributes,
376
- #wrapper fieldset.bbp-forum-form-attributes {
377
- width: 200px;
378
- float: left;
379
- clear: none;
380
- }
381
-
382
- textarea#bbp_reply_content,
383
- textarea#bbp_topic_content {
384
- width: 100%;
385
- box-sizing: border-box;
386
- -webkit-box-sizing: border-box;
387
- -moz-box-sizing: border-box;
388
- -ms-box-sizing: border-box;
389
- }
390
-
391
- .bbp-topic-form,
392
- .bbp-reply-form,
393
- .bbp-topic-tag-form {
394
- clear: right;
395
- }
396
- body.topic-edit .bbp-topic-form div.avatar img,
397
- body.reply-edit .bbp-reply-form div.avatar img,
398
- body.single-forum .bbp-topic-form div.avatar img,
399
- body.single-reply .bbp-reply-form div.avatar img {
400
- margin-left: 0;
401
- padding: 10px;
402
- border: 1px solid #ddd;
403
- line-height: 0;
404
- background-color: #efefef;
405
- }
406
-
407
- body.page .bbp-reply-form code,
408
- body.page .bbp-topic-form code,
409
- body.single-topic .bbp-reply-form code,
410
- body.single-forum .bbp-topic-form code,
411
- body.topic-edit .bbp-topic-form code,
412
- body.reply-edit .bbp-reply-form code {
413
- font-size: 10px;
414
- background-color: #f0fff8;
415
- border: 1px solid #CEEFE1;
416
- display: block;
417
- padding: 8px;
418
- margin-top: 5px;
419
- width: 369px;
420
- }
421
-
422
- #merge_tag,
423
- #delete_tag {
424
- display: inline;
425
- }
426
-
427
- div.bbp-submit-wrapper {
428
- margin-top: 15px;
429
- float: left;
430
- clear: both;
431
- }
432
-
433
- p.form-allowed-tags {
434
- width: 462px;
435
- }
436
-
437
- input[type="password"] {
438
- background: #f9f9f9;
439
- border: 1px solid #ccc;
440
- box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
441
- -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
442
- -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
443
- padding: 2px;
444
- }
445
-
446
- /* =Edit User
447
- -------------------------------------------------------------- */
448
-
449
- #bbp-your-profile fieldset {
450
- margin-top: 20px;
451
- padding: 20px 20px 0 20px;
452
- }
453
- #bbp-your-profile fieldset div {
454
- margin-bottom: 20px;
455
- float: right;
456
- width: 100%;
457
- clear: right;
458
- }
459
- #bbp-your-profile fieldset select {
460
- margin-bottom: 0;
461
- }
462
- #bbp-your-profile fieldset input,
463
- #bbp-your-profile fieldset textarea {
464
- margin-bottom: 0;
465
- width: 400px;
466
- background: #f9f9f9;
467
- border: 1px solid #ccc;
468
- box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
469
- -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
470
- -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
471
- padding: 2px;
472
- }
473
- #bbp-your-profile fieldset legend {
474
- display: none;
475
- }
476
- #content #bbp-your-profile fieldset label,
477
- #container #bbp-your-profile fieldset label {
478
- float: right;
479
- width: 150px;
480
- padding-left: 20px;
481
- text-align: left;
482
- }
483
- #bbp-your-profile fieldset span.description {
484
- margin: 5px 0 0 170px;
485
- font-size: 12px;
486
- font-style: italic;
487
- float: right;
488
- clear: right;
489
- width: 383px;
490
- padding: 5px 10px;
491
- border: #cee1ef 1px solid;
492
- background-color: #f0f8ff;
493
- }
494
-
495
- #content #bbp-your-profile fieldset fieldset,
496
- #container #bbp-your-profile fieldset fieldset {
497
- margin: 0;
498
- width: 260px;
499
- border: none;
500
- padding: 0;
501
- clear: none;
502
- float: none;
503
- }
504
- #bbp-your-profile fieldset fieldset span.description {
505
- margin-right: 0;
506
- margin-bottom: 20px;
507
- }
508
-
509
- #bbp-your-profile fieldset.submit button {
510
- float: left;
511
- }
512
-
513
- /* =Notices
514
- -------------------------------------------------------------- */
515
-
516
- div.bbp-template-notice {
517
- border-width: 1px;
518
- border-style: solid;
519
- padding: 0 0.6em;
520
- margin: 5px 0 15px;
521
- -moz-border-radius: 3px;
522
- -khtml-border-radius: 3px;
523
- -webkit-border-radius: 3px;
524
- border-radius: 3px;
525
- background-color: #ffffe0;
526
- border-color: #e6db55;
527
- color: #000;
528
- clear: both;
529
- }
530
- div.bbp-template-notice a {
531
- color: #555;
532
- text-decoration: none;
533
- }
534
- div.bbp-template-notice a:hover {
535
- color: #000;
536
- }
537
- div.bbp-template-notice.info {
538
- border: #cee1ef 1px solid;
539
- background-color: #f0f8ff;
540
- }
541
- div.bbp-template-notice.important {
542
- border: #e6db55 1px solid;
543
- background-color: #fffbcc;
544
- }
545
- div.bbp-template-notice.error,
546
- div.bbp-template-notice.warning {
547
- background-color: #ffebe8;
548
- border-color: #c00;
549
- }
550
- div.bbp-template-notice.error a,
551
- div.bbp-template-notice.warning a {
552
- color: #c00;
553
- }
554
- div.bbp-template-notice p {
555
- margin: 0.5em 0 6px 0 !important;
556
- padding: 2px;
557
- font-size: 12px;
558
- line-height: 140%;
559
- }
560
-
561
- /* =Stickies
562
- -------------------------------------------------------------- */
563
-
564
- .bbp-topics-front tr.super-sticky td,
565
- .bbp-topics tr.super-sticky td,
566
- .bbp-topics tr.sticky td,
567
- .bbp-forum-content tr.sticky td {
568
- background-color: #ffffe0 !important;
569
- font-size: 1.1em;
570
- }
571
-
572
- /* =Revisions
573
- -------------------------------------------------------------- */
574
- #content .bbp-topic-revision-log,
575
- #content .bbp-reply-revision-log,
576
-
577
- #main .bbp-topic-revision-log,
578
- #main .bbp-reply-revision-log,
579
-
580
- #container .bbp-topic-revision-log,
581
- #container .bbp-reply-revision-log {
582
- border-top: 1px dotted #ddd;
583
- list-style: none;
584
- width: 100%;
585
- margin: 0;
586
- padding: 8px 0 0 0;
587
- font-size: 11px;
588
- color: #aaa;
589
- }
590
-
591
- /* =Widgets
592
- -------------------------------------------------------------- */
593
-
594
- .bbp-login-form fieldset legend {
595
- display: none;
596
- }
597
-
598
- .bbp-login-form .bbp-username input,
599
- .bbp-login-form .bbp-email input,
600
- .bbp-login-form .bbp-password input {
601
- padding: 5px;
602
- }
603
-
604
- .bbp-login-form .bbp-username label,
605
- .bbp-login-form .bbp-password label {
606
- width: 70px;
607
- display: inline-block;
608
- }
609
- .bbp-login-form .bbp-username,
610
- .bbp-login-form .bbp-password,
611
- .bbp-login-form .bbp-remember-me,
612
- .bbp-login-form .bbp-submit-wrapper {
613
- margin-top: 10px;
614
- }
615
-
616
- .bbp-login-form .bbp-remember-me {
617
-
618
- }
619
-
620
- .bbp-login-form .bbp-submit-wrapper {
621
- text-align: left;
622
- }
623
-
624
- .bbp-login-form .bbp-login-links {
625
- }
626
-
627
- .bbp-login-form .bbp-login-links a {
628
- float: right;
629
- clear: right;
630
- }
631
-
632
- .bbp-logged-in img.avatar {
633
- float: right;
634
- margin-left: 15px;
635
- }
636
-
637
- .bbp-logged-in h4 {
638
- font-weight: bold;
639
- font-size: 1.3em;
640
- clear: none;
641
- margin-bottom: 10px;
642
- }
643
-
644
- /* =Avatars
645
- -------------------------------------------------------------- */
646
-
647
- #content p.bbp-topic-meta img.avatar,
648
- #content ul.bbp-reply-revision-log img.avatar,
649
- #content ul.bbp-topic-revision-log img.avatar,
650
- #content div.bbp-template-notice img.avatar,
651
- #content .widget_display_topics img.avatar,
652
- #content .widget_display_replies img.avatar,
653
- #content p.bbp-topic-meta img.avatar,
654
-
655
- #main ul.bbp-reply-revision-log img.avatar,
656
- #main ul.bbp-topic-revision-log img.avatar,
657
- #main div.bbp-template-notice img.avatar,
658
- #main .widget_display_topics img.avatar,
659
- #main .widget_display_replies img.avatar,
660
- #main p.bbp-topic-meta img.avatar,
661
-
662
- #container ul.bbp-reply-revision-log img.avatar,
663
- #container ul.bbp-topic-revision-log img.avatar,
664
- #container div.bbp-template-notice img.avatar,
665
- #container .widget_display_topics img.avatar,
666
- #container .widget_display_replies img.avatar {
667
- float: none;
668
- margin-bottom: -7px;
669
- border: 3px double #ddd;
670
- }
671
-
672
- fieldset div.avatar {
673
- float: left;
674
- }
675
-
676
- /* =BuddyPress Activity Streams
677
- -------------------------------------------------------------- */
678
-
679
- .activity-list li.bbp_topic_create .activity-content .activity-inner,
680
- .activity-list li.bbp_relpy_create .activity-content .activity-inner {
681
- border-left: none;
682
- margin-left: 0;
683
- padding-left: 0;
684
- border-right: 2px solid #EAEAEA;
685
- margin-right: 5px;
686
- padding-right: 10px;
687
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/css/bbpress.css DELETED
@@ -1,744 +0,0 @@
1
- /**
2
- * bbPress specific CSS
3
- *
4
- * @package bbPress
5
- * @subpackage Theme
6
- */
7
-
8
- /* =bbPress Style
9
- -------------------------------------------------------------- */
10
-
11
- #content hr,
12
- #container hr {
13
- margin: 0 0 24px 0;
14
- }
15
- #entry-author-info {
16
- margin: 10px 0 0 0;
17
- border-bottom: 1px solid #fff;
18
- }
19
-
20
- #content table.bbp-topics,
21
- #content table.bbp-forums,
22
- #content table.bbp-replies,
23
-
24
- #container table.bbp-topics,
25
- #container table.bbp-forums,
26
- #container table.bbp-replies,
27
-
28
- #main table.bbp-topics,
29
- #main table.bbp-forums,
30
- #main table.bbp-replies {
31
- clear: left;
32
- table-layout: fixed;
33
- width: 100%;
34
- }
35
-
36
- /* =Breadcrumb and Tags
37
- -------------------------------------------------------------- */
38
-
39
- div.bbp-breadcrumb {
40
- float: left;
41
- }
42
-
43
- div.bbp-breadcrumb,
44
- div.bbp-topic-tags {
45
- font-size: 12px;
46
- }
47
-
48
- #content div.bbp-breadcrumb p,
49
- #content div.bbp-topic-tags p {
50
- margin-bottom: 10px
51
- }
52
-
53
- div.bbp-topic-tags {
54
- float: right;
55
- }
56
-
57
- /* =Tables
58
- -------------------------------------------------------------- */
59
-
60
- #content table tbody tr.even td {
61
- background-color: #fff;
62
- }
63
- #content table tbody tr.odd td {
64
- background-color: #fbfbfb;
65
- }
66
-
67
- #content table tbody tr.status-trash.even td,
68
- #content table tbody tr.status-spam.even td {
69
- background-color: #fee;
70
- }
71
- #content table tbody tr.status-trash.odd td,
72
- #content table tbody tr.status-spam.odd td {
73
- background-color: #fdd;
74
- }
75
-
76
- #content table.bbp-topics tbody tr.status-closed td,
77
- #content table.bbp-topics tbody tr.status-closed td a {
78
- color: #ccc;
79
- }
80
-
81
- table.bbp-topic tbody tr td,
82
- table.bbp-replies tbody tr td {
83
- background-color: #fff;
84
- }
85
-
86
- table.bbp-forums th, table.bbp-topics th,
87
- table.bbp-topic th, table.bbp-replies th {
88
- background-color: #f3f3f3;
89
- }
90
- table.bbp-forums th span, table.bbp-topics th span,
91
- table.bbp-topic th span, table.bbp-replies th span {
92
- float: right;
93
- }
94
- #content th.bbp-topic-author,
95
- #content th.bbp-reply-author {
96
- text-align: center;
97
- width: 120px;
98
- }
99
- #content th.bbp-topic-content,
100
- #content th.bbp-reply-content {
101
- text-align: left;
102
- padding: 9px 10px 9px 15px;
103
- }
104
- #content table.bbp-forums tfoot td, #content table.bbp-topics tfoot td,
105
- #content table.bbp-topic tfoot td, #content table.bbp-replies tfoot td,
106
- #content table.bbp-replies tr.bbp-reply-header td,
107
- #content table.bbp-topic tr.bbp-topic-header td {
108
- background-color: #fafafa;
109
- color: #888;
110
- font-size: 12px;
111
- font-weight: bold;
112
- font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif;
113
- padding: 4px 10px;
114
- }
115
-
116
- span.bbp-author-ip {
117
- font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif;
118
- font-size: 11px;
119
- font-weight: bold;
120
- color: #aaa;
121
- }
122
-
123
- #content .bbp-forum-info {
124
- width: 55%;
125
- text-align: left;
126
- }
127
- #content .bbp-forum-topic-count,
128
- #content .bbp-forum-reply-count,
129
- #content .bbp-topic-reply-count,
130
- #content .bbp-topic-voice-count,
131
- #content .bbp-topic-action {
132
- width: 10%;
133
- text-align: center;
134
- padding: 6px 0px;
135
- }
136
- #content td.bbp-topic-author,
137
- #content td.bbp-reply-author {
138
- padding: 20px;
139
- text-align: center;
140
- vertical-align: top;
141
- }
142
- #content td.bbp-topic-author .bbp-author-role,
143
- #content td.bbp-reply-author .bbp-author-role {
144
- font-size: 11px;
145
- font-style: italic;
146
- }
147
- .bbp-topic-title {
148
- width: 55%;
149
- text-align: left;
150
- }
151
- .bbp-topic-freshness,
152
- .bbp-forum-freshness {
153
- text-align: center;
154
- width: 25%;
155
- }
156
-
157
- #content tbody .bbp-topic-content,
158
- #content tbody .bbp-reply-content {
159
- vertical-align: top;
160
- padding: 15px 10px 10px 15px;
161
- overflow: auto;
162
- }
163
-
164
- #content .bbp-topic-content img,
165
- #content .bbp-reply-content img {
166
- max-width: 100%;
167
- }
168
-
169
- /* =Admin Links
170
- -------------------------------------------------------------- */
171
-
172
- span.bbp-admin-links {
173
- float: right;
174
- color: #ddd;
175
- }
176
- span.bbp-admin-links a {
177
- color: #bbb;
178
- font-weight: normal;
179
- font-size: 10px;
180
- text-transform: uppercase;
181
- text-decoration: none;
182
- }
183
- fieldset span.bbp-admin-links {
184
- float: left;
185
- }
186
- tr td span.bbp-admin-links a:hover {
187
- color: #ff4b33;
188
- }
189
- td.bbp-topic-admin-links,
190
- td.bbp-topic-counts {
191
- width: 50%;
192
- }
193
-
194
- .bbp-topic a.bbp-topic-permalink,
195
- .bbp-replies a.bbp-reply-permalink {
196
- float: right;
197
- margin-left: 10px;
198
- color: #ccc;
199
- }
200
-
201
- /* =Toggles
202
- -------------------------------------------------------------- */
203
-
204
- .bbp-topic-action #favorite-toggle a {
205
- text-decoration: none;
206
- padding: 0px 3px 1px;
207
- color: #7c7;
208
- border: 1px solid #aca;
209
- background-color: #dfd;
210
- font-weight: bold;
211
- font-size: 13px;
212
- -moz-border-radius: 8px;
213
- -webkit-border-radius: 8px;
214
- }
215
- .bbp-topic-action #favorite-toggle a:hover {
216
- color: #5a5;
217
- border-color: #7c7;
218
- background-color: #beb;
219
- }
220
- .bbp-topic-action #favorite-toggle span.is-favorite a {
221
- color: #faa;
222
- border: 1px solid #faa;
223
- background-color: #fee;
224
- -moz-border-radius: 5px;
225
- -webkit-border-radius: 5px;
226
- }
227
- .bbp-topic-action #favorite-toggle span.is-favorite a:hover {
228
- color: #c88;
229
- border-color: #c88;
230
- background-color: #fdd;
231
- }
232
-
233
- .bbp-topic-action #subscription-toggle a {
234
- text-decoration: none;
235
- padding: 0px 3px 1px;
236
- color: #7c7;
237
- border: 1px solid #aca;
238
- background-color: #dfd;
239
- font-weight: bold;
240
- font-size: 13px;
241
- -moz-border-radius: 8px;
242
- -webkit-border-radius: 8px;
243
- }
244
- .bbp-topic-action #subscription-toggle a:hover {
245
- color: #5a5;
246
- border-color: #7c7;
247
- background-color: #beb;
248
- }
249
- .bbp-topic-action #subscription-toggle span.is-subscribed a {
250
- color: #faa;
251
- border: 1px solid #faa;
252
- background-color: #fee;
253
- -moz-border-radius: 5px;
254
- -webkit-border-radius: 5px;
255
- }
256
- .bbp-topic-action #subscription-toggle span.is-subscribed a:hover {
257
- color: #c88;
258
- border-color: #c88;
259
- background-color: #fdd;
260
- }
261
-
262
- #content p.bbp-topic-meta {
263
- margin-bottom: 0;
264
- font-size: 11px;
265
- }
266
-
267
- #content p.bbp-topic-meta span {
268
- white-space: nowrap;
269
- }
270
-
271
- /* =Forums
272
- -------------------------------------------------------------- */
273
-
274
- #content table tbody tr .bbp-forum-content p {
275
- margin-bottom: 0;
276
- font-size: 13px;
277
- font-style: italic;
278
- }
279
-
280
- #content table tbody tr ul.bbp-forums {
281
- list-style: none;
282
- font-size: 12px;
283
- margin: 0 0 0 10px;
284
- padding: 0 0 0 10px;
285
- border-left: 1px solid #aaa;
286
- }
287
- #content table tbody tr ul.bbp-forums li {
288
- display: inline;
289
- }
290
-
291
- #bbpress-forums .bbp-forums-list {
292
- margin: 0 0 0 5px;
293
- padding-left: 15px;
294
- border-left: 1px solid #ddd;
295
- }
296
-
297
- #bbpress-forums .bbp-forums-list li {
298
- display: inline;
299
- font-size: 11px;
300
- }
301
-
302
- /* =Pagination
303
- -------------------------------------------------------------- */
304
-
305
- .bbp-pagination-count {
306
- float: left;
307
- }
308
- .bbp-pagination-links {
309
- float: right;
310
- }
311
- .bbp-pagination {
312
- float: left;
313
- width: 100%;
314
- margin-bottom: 20px;
315
- }
316
-
317
- .bbp-topic-pagination {
318
- display: inline-block;
319
- margin-left: 5px;
320
- margin-bottom: 2px;
321
- }
322
- .bbp-topic-pagination a {
323
- font-size: 10px;
324
- line-height: 10px;
325
- padding: 1px 3px;
326
- border: 1px solid #ddd;
327
- text-decoration: none;
328
- }
329
-
330
- /* =Forms
331
- -------------------------------------------------------------- */
332
- #content fieldset.bbp-form,
333
- #container fieldset.bbp-form,
334
- #wrapper fieldset.bbp-form {
335
- clear: left;
336
- }
337
-
338
- #content fieldset.bbp-form,
339
- #container fieldset.bbp-form,
340
- #wrapper fieldset.bbp-form {
341
- border: 1px solid #eee;
342
- padding: 10px 20px;
343
- }
344
-
345
- #content fieldset.bbp-form legend,
346
- #container fieldset.bbp-form legend,
347
- #wrapper fieldset.bbp-form legend {
348
- padding: 5px;
349
- }
350
-
351
- #content fieldset.bbp-form label,
352
- #container fieldset.bbp-form label,
353
- #wrapper fieldset.bbp-form label {
354
- margin: 0;
355
- display: inline-block;
356
- }
357
-
358
- #bbp-edit-topic-tag.bbp-form fieldset.bbp-form label,
359
- #bbp-login fieldset label,
360
- #bbp-register fieldset label,
361
- #bbp-lost-pass fieldset label {
362
- width: 100px;
363
- }
364
-
365
- #content fieldset.bbp-form p,
366
- #container fieldset.bbp-form p,
367
- #wrapper fieldset.bbp-form p,
368
- #content fieldset.bbp-form textarea,
369
- #container fieldset.bbp-form textarea,
370
- #wrapper fieldset.bbp-form textarea,
371
- #content fieldset.bbp-form select,
372
- #container fieldset.bbp-form select,
373
- #wrapper fieldset.bbp-form select,
374
- #content fieldset.bbp-form input,
375
- #container fieldset.bbp-form input,
376
- #wrapper fieldset.bbp-form input {
377
- margin: 0px 0px 10px;
378
- }
379
-
380
- textarea#bbp_reply_content,
381
- textarea#bbp_topic_content,
382
- textarea#bbp_forum_content {
383
- width: 97%;
384
- box-sizing: border-box;
385
- -webkit-box-sizing:border-box;
386
- -moz-box-sizing: border-box;
387
- -ms-box-sizing: border-box;
388
- }
389
-
390
- textarea#bbp_forum_content {
391
- height: 210px;
392
- }
393
-
394
- #content fieldset.bbp-forum-form-attributes,
395
- #container fieldset.bbp-forum-form-attributes,
396
- #wrapper fieldset.bbp-forum-form-attributes {
397
- width: 200px;
398
- float: right;
399
- clear: none;
400
- }
401
-
402
- .bbp-topic-form,
403
- .bbp-reply-form,
404
- .bbp-topic-tag-form {
405
- clear: left;
406
- }
407
- body.topic-edit .bbp-topic-form div.avatar img,
408
- body.reply-edit .bbp-reply-form div.avatar img,
409
- body.single-forum .bbp-topic-form div.avatar img,
410
- body.single-reply .bbp-reply-form div.avatar img {
411
- margin-right: 0;
412
- padding: 10px;
413
- border: 1px solid #ddd;
414
- line-height: 0;
415
- background-color: #efefef;
416
- }
417
-
418
- body.page .bbp-reply-form code,
419
- body.page .bbp-topic-form code,
420
- body.single-topic .bbp-reply-form code,
421
- body.single-forum .bbp-topic-form code,
422
- body.topic-edit .bbp-topic-form code,
423
- body.reply-edit .bbp-reply-form code {
424
- font-size: 10px;
425
- background-color: #f0fff8;
426
- border: 1px solid #CEEFE1;
427
- display: block;
428
- padding: 8px;
429
- margin-top: 5px;
430
- width: 369px;
431
- }
432
-
433
- #merge_tag,
434
- #delete_tag {
435
- display: inline;
436
- }
437
-
438
- div.bbp-submit-wrapper {
439
- margin-top: 15px;
440
- float: right;
441
- clear: both;
442
- }
443
-
444
- p.form-allowed-tags {
445
- width: 462px;
446
- }
447
-
448
- input[type="password"] {
449
- background: #f9f9f9;
450
- border: 1px solid #ccc;
451
- box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
452
- -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
453
- -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
454
- padding: 2px;
455
- }
456
-
457
- /* =TinyMCE in themes
458
- -------------------------------------------------------------- */
459
- #content div.bbp-the-content-wrapper {
460
- margin-bottom: 10px;
461
- }
462
-
463
- #content div.bbp-the-content-wrapper textarea.bbp-the-content {
464
- width: 100%;
465
- margin: 0;
466
- font-size: 12px;
467
- }
468
-
469
- #content div.bbp-the-content-wrapper table,
470
- #content div.bbp-the-content-wrapper tbody,
471
- #content div.bbp-the-content-wrapper tr,
472
- #content div.bbp-the-content-wrapper td {
473
- border: none;
474
- padding: 0;
475
- margin: 0;
476
- width: auto;
477
- line-height: 1em;
478
- }
479
-
480
- #content div.bbp-the-content-wrapper input {
481
- font-size: 12px;
482
- padding: 5px;
483
- margin: 3px 0 0;
484
- line-height: 1em;
485
- margin: 0;
486
- }
487
-
488
- #content div.bbp-the-content-wrapper div.quicktags-toolbar {
489
- padding: 5px;
490
- min-height: 26px;
491
- }
492
- #content div.bbp-the-content-wrapper td.mceToolbar {
493
- padding: 4px 4px 8px;
494
- }
495
-
496
- #content div.wp-editor-container {
497
- margin: 0;
498
- padding: 0;
499
- line-height: 0;
500
- }
501
-
502
- #content div.bbp-the-content-wrapper td.mceStatusbar {
503
- line-height: 16px;
504
- }
505
-
506
- /* =Edit User
507
- -------------------------------------------------------------- */
508
-
509
- #bbp-your-profile fieldset {
510
- margin-top: 20px;
511
- padding: 20px 20px 0 20px;
512
- }
513
- #bbp-your-profile fieldset div {
514
- margin-bottom: 20px;
515
- float: left;
516
- width: 100%;
517
- clear: left;
518
- }
519
- #bbp-your-profile fieldset select {
520
- margin-bottom: 0;
521
- }
522
- #bbp-your-profile fieldset input,
523
- #bbp-your-profile fieldset textarea {
524
- margin-bottom: 0;
525
- width: 400px;
526
- background: #f9f9f9;
527
- border: 1px solid #ccc;
528
- box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
529
- -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
530
- -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
531
- padding: 2px;
532
- }
533
- #bbp-your-profile fieldset legend {
534
- display: none;
535
- }
536
- #content #bbp-your-profile fieldset label,
537
- #container #bbp-your-profile fieldset label {
538
- float: left;
539
- width: 150px;
540
- padding-right: 20px;
541
- text-align: right;
542
- }
543
- #bbp-your-profile fieldset span.description {
544
- margin: 5px 0 0 170px;
545
- font-size: 12px;
546
- font-style: italic;
547
- float: left;
548
- clear: left;
549
- width: 383px;
550
- padding: 5px 10px;
551
- border: #cee1ef 1px solid;
552
- background-color: #f0f8ff;
553
- }
554
-
555
- #content #bbp-your-profile fieldset fieldset,
556
- #container #bbp-your-profile fieldset fieldset {
557
- margin: 0;
558
- width: 260px;
559
- border: none;
560
- padding: 0;
561
- clear: none;
562
- float: none;
563
- }
564
- #bbp-your-profile fieldset fieldset span.description {
565
- margin-left: 0;
566
- margin-bottom: 20px;
567
- }
568
-
569
- #bbp-your-profile fieldset.submit button {
570
- float: right;
571
- }
572
-
573
- /* =Notices
574
- -------------------------------------------------------------- */
575
-
576
- div.bbp-template-notice {
577
- border-width: 1px;
578
- border-style: solid;
579
- padding: 0 0.6em;
580
- margin: 5px 0 15px;
581
- -moz-border-radius: 3px;
582
- -khtml-border-radius: 3px;
583
- -webkit-border-radius: 3px;
584
- border-radius: 3px;
585
- background-color: #ffffe0;
586
- border-color: #e6db55;
587
- color: #000;
588
- clear: both;
589
- }
590
- div.bbp-template-notice a {
591
- color: #555;
592
- text-decoration: none;
593
- }
594
- div.bbp-template-notice a:hover {
595
- color: #000;
596
- }
597
- div.bbp-template-notice.info {
598
- border: #cee1ef 1px solid;
599
- background-color: #f0f8ff;
600
- }
601
- div.bbp-template-notice.important {
602
- border: #e6db55 1px solid;
603
- background-color: #fffbcc;
604
- }
605
- div.bbp-template-notice.error,
606
- div.bbp-template-notice.warning {
607
- background-color: #ffebe8;
608
- border-color: #c00;
609
- }
610
- div.bbp-template-notice.error a,
611
- div.bbp-template-notice.warning a {
612
- color: #c00;
613
- }
614
- div.bbp-template-notice p {
615
- margin: 0.5em 0 6px 0 !important;
616
- padding: 2px;
617
- font-size: 12px;
618
- line-height: 140%;
619
- }
620
-
621
- /* =Stickies
622
- -------------------------------------------------------------- */
623
-
624
- .bbp-topics-front tr.super-sticky td,
625
- .bbp-topics tr.super-sticky td,
626
- .bbp-topics tr.sticky td,
627
- .bbp-forum-content tr.sticky td {
628
- background-color: #ffffe0 !important;
629
- font-size: 1.1em;
630
- }
631
-
632
- /* =Revisions
633
- -------------------------------------------------------------- */
634
- #content .bbp-topic-revision-log,
635
- #content .bbp-reply-revision-log,
636
-
637
- #main .bbp-topic-revision-log,
638
- #main .bbp-reply-revision-log,
639
-
640
- #container .bbp-topic-revision-log,
641
- #container .bbp-reply-revision-log {
642
- border-top: 1px dotted #ddd;
643
- list-style: none;
644
- width: 100%;
645
- margin: 0;
646
- padding: 8px 0 0 0;
647
- font-size: 11px;
648
- color: #aaa;
649
- }
650
-
651
- /* =Widgets
652
- -------------------------------------------------------------- */
653
-
654
- .bbp-login-form fieldset legend {
655
- display: none;
656
- }
657
-
658
- .bbp-login-form .bbp-username input,
659
- .bbp-login-form .bbp-email input,
660
- .bbp-login-form .bbp-password input {
661
- padding: 5px;
662
- }
663
-
664
- .bbp-login-form .bbp-username label,
665
- .bbp-login-form .bbp-password label {
666
- width: 70px;
667
- display: inline-block;
668
- }
669
- .bbp-login-form .bbp-username,
670
- .bbp-login-form .bbp-password,
671
- .bbp-login-form .bbp-remember-me,
672
- .bbp-login-form .bbp-submit-wrapper {
673
- margin-top: 10px;
674
- }
675
-
676
- .bbp-login-form .bbp-remember-me {
677
-
678
- }
679
-
680
- .bbp-login-form .bbp-submit-wrapper {
681
- text-align: right;
682
- }
683
-
684
- .bbp-login-form .bbp-login-links {
685
- }
686
-
687
- .bbp-login-form .bbp-login-links a {
688
- float: left;
689
- clear: left;
690
- }
691
-
692
- .bbp-logged-in img.avatar {
693
- float: left;
694
- margin-right: 15px;
695
- }
696
-
697
- .bbp-logged-in h4 {
698
- font-weight: bold;
699
- font-size: 1.3em;
700
- clear: none;
701
- margin-bottom: 10px;
702
- }
703
-
704
- /* =Avatars
705
- -------------------------------------------------------------- */
706
-
707
- #content p.bbp-topic-meta img.avatar,
708
- #content ul.bbp-reply-revision-log img.avatar,
709
- #content ul.bbp-topic-revision-log img.avatar,
710
- #content div.bbp-template-notice img.avatar,
711
- #content .widget_display_topics img.avatar,
712
- #content .widget_display_replies img.avatar,
713
- #content p.bbp-topic-meta img.avatar,
714
-
715
- #main ul.bbp-reply-revision-log img.avatar,
716
- #main ul.bbp-topic-revision-log img.avatar,
717
- #main div.bbp-template-notice img.avatar,
718
- #main .widget_display_topics img.avatar,
719
- #main .widget_display_replies img.avatar,
720
- #main p.bbp-topic-meta img.avatar,
721
-
722
- #container ul.bbp-reply-revision-log img.avatar,
723
- #container ul.bbp-topic-revision-log img.avatar,
724
- #container div.bbp-template-notice img.avatar,
725
- #container .widget_display_topics img.avatar,
726
- #container .widget_display_replies img.avatar {
727
- float: none;
728
- margin-bottom: -7px;
729
- border: 3px double #ddd;
730
- }
731
-
732
- fieldset div.avatar {
733
- float: right;
734
- }
735
-
736
- /* =BuddyPress Activity Streams
737
- -------------------------------------------------------------- */
738
-
739
- .activity-list li.bbp_topic_create .activity-content .activity-inner,
740
- .activity-list li.bbp_reply_create .activity-content .activity-inner {
741
- border-left: 2px solid #EAEAEA;
742
- margin-left: 5px;
743
- padding-left: 10px;
744
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/js/topic.js DELETED
@@ -1,87 +0,0 @@
1
- bbpTopicJS = jQuery.extend( {
2
- // User and Topic
3
- currentUserId: '0',
4
- topicId: '0',
5
-
6
- // Favorites
7
- favoritesLink: '',
8
- favoritesActive: 0,
9
- isFav: 0,
10
- favLinkYes: 'favorites',
11
- favLinkNo: '?',
12
- favYes: 'This topic is one of your %favLinkYes% [%favDel%]',
13
- favNo: '%favAdd% (%favLinkNo%)',
14
- favDel: 'x',
15
- favAdd: 'Add this topic to your favorites',
16
-
17
- // Subscriptions
18
- subsLink: '',
19
- subsActive: 0,
20
- isSubscribed: 0,
21
- subsSub: 'Subscribe',
22
- subsUns: 'Unsubscribe'
23
- }, bbpTopicJS );
24
-
25
- // Topic Global
26
- bbpTopicJS.favoritesActive = parseInt( bbpTopicJS.favoritesActive );
27
- bbpTopicJS.isFav = parseInt( bbpTopicJS.isFav );
28
- bbpTopicJS.subsActive = parseInt( bbpTopicJS.subsActive );
29
- bbpTopicJS.isSubscribed = parseInt( bbpTopicJS.isSubscribed );
30
-
31
- // Run it
32
- jQuery(document).ready( function() {
33
-
34
- /** Favorites *************************************************************/
35
-
36
- if ( 1 == bbpTopicJS.favoritesActive ) {
37
- var favoritesToggle = jQuery( '#favorite-toggle' )
38
- .addClass( 'list:favorite' )
39
- .wpList( { alt: '', dimAfter: favLinkSetup } );
40
-
41
- var favoritesToggleSpan = favoritesToggle.children( 'span' )
42
- [bbpTopicJS.isFav ? 'addClass' : 'removeClass' ]( 'is-favorite' );
43
- }
44
-
45
- function favLinkSetup() {
46
- bbpTopicJS.isFav = favoritesToggleSpan.is( '.is-favorite' );
47
- var aLink = "<a href='" + bbpTopicJS.favoritesLink + "'>";
48
- var aDim = "<a href='" + favoritesToggleSpan.find( 'a[class^="dim:"]' ).attr( 'href' ) + "' class='dim:favorite-toggle:" + favoritesToggleSpan.attr( 'id' ) + ":is-favorite'>";
49
- if ( bbpTopicJS.isFav ) {
50
- html = bbpTopicJS.favYes
51
- .replace( /%favLinkYes%/, aLink + bbpTopicJS.favLinkYes + "</a>" )
52
- .replace( /%favDel%/, aDim + bbpTopicJS.favDel + "</a>" );
53
- } else {
54
- html = bbpTopicJS.favNo
55
- .replace( /%favLinkNo%/, aLink + bbpTopicJS.favLinkNo + "</a>" )
56
- .replace( /%favAdd%/, aDim + bbpTopicJS.favAdd + "</a>" );
57
- }
58
- favoritesToggleSpan.html( html );
59
- favoritesToggle.get(0).wpList.process( favoritesToggle );
60
- }
61
-
62
- /** Subscriptions *********************************************************/
63
-
64
- if ( 1 == bbpTopicJS.subsActive ) {
65
- var subscriptionToggle = jQuery( '#subscription-toggle' )
66
- .addClass( 'list:subscription' )
67
- .wpList( { alt: '', dimAfter: subsLinkSetup } );
68
-
69
- var subscriptionToggleSpan = subscriptionToggle.children( 'span' )
70
- [bbpTopicJS.isSubscribed ? 'addClass' : 'removeClass' ]( 'is-subscribed' );
71
- }
72
-
73
- function subsLinkSetup() {
74
- bbpTopicJS.isSubscribed = subscriptionToggleSpan.is( '.is-subscribed' );
75
- var aLink = "<a href='" + bbpTopicJS.subsLink + "'>";
76
- var aDim = "<a href='" + subscriptionToggleSpan.find( 'a[class^="dim:"]' ).attr( 'href' ) + "' class='dim:subscription-toggle:" + subscriptionToggleSpan.attr( 'id' ) + ":is-subscribed'>";
77
-
78
- if ( bbpTopicJS.isSubscribed ) {
79
- html = aDim + bbpTopicJS.subsUns + '</a>';
80
- } else {
81
- html = aDim + bbpTopicJS.subsSub + '</a>';
82
- }
83
-
84
- subscriptionToggleSpan.html( html );
85
- subscriptionToggle.get(0).wpList.process( subscriptionToggle );
86
- }
87
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-create-topic.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - Create Topic
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) : the_post(); ?>
18
-
19
- <div id="bbp-new-topic" class="bbp-new-topic">
20
- <h1 class="entry-title"><?php the_title(); ?></h1>
21
- <div class="entry-content">
22
-
23
- <?php the_content(); ?>
24
-
25
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
26
-
27
- </div>
28
- </div><!-- #bbp-new-topic -->
29
-
30
- <?php endwhile; ?>
31
-
32
- </div><!-- #content -->
33
- </div><!-- #container -->
34
-
35
- <?php get_sidebar(); ?>
36
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-forum-statistics.php DELETED
@@ -1,122 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - Statistics
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- // Get the statistics and extract them for later use in this template
11
- // @todo - remove variable references
12
- extract( bbp_get_statistics(), EXTR_SKIP );
13
-
14
- get_header(); ?>
15
-
16
- <div id="container">
17
- <div id="content" role="main">
18
-
19
- <?php do_action( 'bbp_template_notices' ); ?>
20
-
21
- <?php while ( have_posts() ) : the_post(); ?>
22
-
23
- <div id="bbp-statistics" class="bbp-statistics">
24
- <h1 class="entry-title"><?php the_title(); ?></h1>
25
- <div class="entry-content">
26
-
27
- <?php get_the_content() ? the_content() : _e( '<p>Here are the statistics and popular topics of our forums.</p>', 'bbpress' ); ?>
28
-
29
- <dl role="main">
30
-
31
- <?php do_action( 'bbp_before_statistics' ); ?>
32
-
33
- <dt><?php _e( 'Registered Users', 'bbpress' ); ?></dt>
34
- <dd>
35
- <strong><?php echo $user_count; ?></strong>
36
- </dd>
37
-
38
- <dt><?php _e( 'Forums', 'bbpress' ); ?></dt>
39
- <dd>
40
- <strong><?php echo $forum_count; ?></strong>
41
- </dd>
42
-
43
- <dt><?php _e( 'Topics', 'bbpress' ); ?></dt>
44
- <dd>
45
- <strong><?php echo $topic_count; ?></strong>
46
- </dd>
47
-
48
- <dt><?php _e( 'Replies', 'bbpress' ); ?></dt>
49
- <dd>
50
- <strong><?php echo $reply_count; ?></strong>
51
- </dd>
52
-
53
- <dt><?php _e( 'Topic Tags', 'bbpress' ); ?></dt>
54
- <dd>
55
- <strong><?php echo $topic_tag_count; ?></strong>
56
- </dd>
57
-
58
- <?php if ( !empty( $empty_topic_tag_count ) ) : ?>
59
-
60
- <dt><?php _e( 'Empty Topic Tags', 'bbpress' ); ?></dt>
61
- <dd>
62
- <strong><?php echo $empty_topic_tag_count; ?></strong>
63
- </dd>
64
-
65
- <?php endif; ?>
66
-
67
- <?php if ( !empty( $topic_count_hidden ) ) : ?>
68
-
69
- <dt><?php _e( 'Hidden Topics', 'bbpress' ); ?></dt>
70
- <dd>
71
- <strong>
72
- <abbr title="<?php echo esc_attr( $hidden_topic_title ); ?>"><?php echo $topic_count_hidden; ?></abbr>
73
- </strong>
74
- </dd>
75
-
76
- <?php endif; ?>
77
-
78
- <?php if ( !empty( $reply_count_hidden ) ) : ?>
79
-
80
- <dt><?php _e( 'Hidden Replies', 'bbpress' ); ?></dt>
81
- <dd>
82
- <strong>
83
- <abbr title="<?php echo esc_attr( $hidden_reply_title ); ?>"><?php echo $reply_count_hidden; ?></abbr>
84
- </strong>
85
- </dd>
86
-
87
- <?php endif; ?>
88
-
89
- <?php do_action( 'bbp_after_statistics' ); ?>
90
-
91
- </dl>
92
-
93
- <?php do_action( 'bbp_before_popular_topics' ); ?>
94
-
95
- <?php bbp_set_query_name( 'bbp_popular_topics' ); ?>
96
-
97
- <?php if ( bbp_has_topics( array( 'meta_key' => '_bbp_reply_count', 'posts_per_page' => 15, 'max_num_pages' => 1, 'orderby' => 'meta_value_num', 'show_stickies' => false ) ) ) : ?>
98
-
99
- <h2 class="entry-title"><?php _e( 'Popular Topics', 'bbpress' ); ?></h2>
100
-
101
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
102
-
103
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
104
-
105
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
106
-
107
- <?php endif; ?>
108
-
109
- <?php bbp_reset_query_name(); ?>
110
-
111
- <?php do_action( 'bbp_after_popular_topics' ); ?>
112
-
113
- </div>
114
- </div><!-- #bbp-statistics -->
115
-
116
- <?php endwhile; ?>
117
-
118
- </div><!-- #content -->
119
- </div><!-- #container -->
120
-
121
- <?php get_sidebar(); ?>
122
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-front-forums.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - Forums (Index)
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) : the_post(); ?>
18
-
19
- <div id="forum-front" class="bbp-forum-front">
20
- <h1 class="entry-title"><?php the_title(); ?></h1>
21
- <div class="entry-content">
22
-
23
- <?php the_content(); ?>
24
-
25
- <?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
26
-
27
- </div>
28
- </div><!-- #forum-front -->
29
-
30
- <?php endwhile; ?>
31
-
32
- </div><!-- #content -->
33
- </div><!-- #container -->
34
-
35
- <?php get_sidebar(); ?>
36
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-front-topics.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - Topics (Newest)
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) : the_post(); ?>
18
-
19
- <div id="topics-front" class="bbp-topics-front">
20
- <h1 class="entry-title"><?php the_title(); ?></h1>
21
- <div class="entry-content">
22
-
23
- <?php the_content(); ?>
24
-
25
- <?php bbp_get_template_part( 'content', 'archive-topic' ); ?>
26
-
27
- </div>
28
- </div><!-- #topics-front -->
29
-
30
- <?php endwhile; ?>
31
-
32
- </div><!-- #content -->
33
- </div><!-- #container -->
34
-
35
- <?php get_sidebar(); ?>
36
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-topic-tags.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - Topic Tags
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) : the_post(); ?>
18
-
19
- <div id="bbp-topic-tags" class="bbp-topic-tags">
20
- <h1 class="entry-title"><?php the_title(); ?></h1>
21
- <div class="entry-content">
22
-
23
- <?php get_the_content() ? the_content() : _e( '<p>This is a collection of tags that are currently popular on our forums.</p>', 'bbpress' ); ?>
24
-
25
- <?php bbp_breadcrumb(); ?>
26
-
27
- <div id="bbp-topic-hot-tags">
28
-
29
- <?php wp_tag_cloud( array( 'smallest' => 9, 'largest' => 38, 'number' => 80, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?>
30
-
31
- </div>
32
-
33
- </div>
34
- </div><!-- #bbp-topic-tags -->
35
-
36
- <?php endwhile; ?>
37
-
38
- </div><!-- #content -->
39
- </div><!-- #container -->
40
-
41
- <?php get_sidebar(); ?>
42
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-topics-no-replies.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - Topics (No Replies)
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) : the_post(); ?>
18
-
19
- <div id="topics-front" class="bbp-topics-front">
20
- <h1 class="entry-title"><?php the_title(); ?></h1>
21
- <div class="entry-content">
22
-
23
- <?php the_content(); ?>
24
-
25
- <?php bbp_breadcrumb(); ?>
26
-
27
- <?php bbp_set_query_name( 'bbp_no_replies' ); ?>
28
-
29
- <?php if ( bbp_has_topics( array( 'meta_key' => '_bbp_reply_count', 'meta_value' => '1', 'meta_compare' => '<', 'orderby' => 'date', 'show_stickies' => false ) ) ) : ?>
30
-
31
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
32
-
33
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
34
-
35
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
36
-
37
- <?php else : ?>
38
-
39
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
40
-
41
- <?php endif; ?>
42
-
43
- <?php bbp_reset_query_name(); ?>
44
-
45
- </div>
46
- </div><!-- #topics-front -->
47
-
48
- <?php endwhile; ?>
49
-
50
- </div><!-- #content -->
51
- </div><!-- #container -->
52
-
53
- <?php get_sidebar(); ?>
54
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-user-login.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - User Login
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- // No logged in users
11
- bbp_logged_in_redirect();
12
-
13
- // Begin Template
14
- get_header(); ?>
15
-
16
- <div id="container">
17
- <div id="content" role="main">
18
-
19
- <?php do_action( 'bbp_template_notices' ); ?>
20
-
21
- <?php while ( have_posts() ) : the_post(); ?>
22
-
23
- <div id="bbp-login" class="bbp-login">
24
- <h1 class="entry-title"><?php the_title(); ?></h1>
25
- <div class="entry-content">
26
-
27
- <?php the_content(); ?>
28
-
29
- <?php bbp_breadcrumb(); ?>
30
-
31
- <?php bbp_get_template_part( 'form', 'user-login' ); ?>
32
-
33
- </div>
34
- </div><!-- #bbp-login -->
35
-
36
- <?php endwhile; ?>
37
-
38
- </div><!-- #content -->
39
- </div><!-- #container -->
40
-
41
- <?php get_sidebar(); ?>
42
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-user-lost-pass.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - User Lost Password
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- // No logged in users
11
- bbp_logged_in_redirect();
12
-
13
- // Begin Template
14
- get_header(); ?>
15
-
16
- <div id="container">
17
- <div id="content" role="main">
18
-
19
- <?php do_action( 'bbp_template_notices' ); ?>
20
-
21
- <?php while ( have_posts() ) : the_post(); ?>
22
-
23
- <div id="bbp-lost-pass" class="bbp-lost-pass">
24
- <h1 class="entry-title"><?php the_title(); ?></h1>
25
- <div class="entry-content">
26
-
27
- <?php the_content(); ?>
28
-
29
- <?php bbp_breadcrumb(); ?>
30
-
31
- <?php bbp_get_template_part( 'form', 'user-lost-pass' ); ?>
32
-
33
- </div>
34
- </div><!-- #bbp-lost-pass -->
35
-
36
- <?php endwhile; ?>
37
-
38
- </div><!-- #content -->
39
- </div><!-- #container -->
40
-
41
- <?php get_sidebar(); ?>
42
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/page-user-register.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Template Name: bbPress - User Register
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- // No logged in users
11
- bbp_logged_in_redirect();
12
-
13
- // Begin Template
14
- get_header(); ?>
15
-
16
- <div id="container">
17
- <div id="content" role="main">
18
-
19
- <?php do_action( 'bbp_template_notices' ); ?>
20
-
21
- <?php while ( have_posts() ) : the_post(); ?>
22
-
23
- <div id="bbp-register" class="bbp-register">
24
- <h1 class="entry-title"><?php the_title(); ?></h1>
25
- <div class="entry-content">
26
-
27
- <?php the_content(); ?>
28
-
29
- <?php bbp_breadcrumb(); ?>
30
-
31
- <?php bbp_get_template_part( 'form', 'user-register' ); ?>
32
-
33
- </div>
34
- </div><!-- #bbp-register -->
35
-
36
- <?php endwhile; ?>
37
-
38
- </div><!-- #content -->
39
- </div><!-- #container -->
40
-
41
- <?php get_sidebar(); ?>
42
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/rtl.css DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * Theme Name: bbPress (Twenty Ten)
3
- * Theme URI: http://bbpress.org
4
- * Description: Adds bbPress forums to the Twenty Ten theme
5
- * Author: WordPress and bbPress teams
6
- * Version: 1.4
7
- * Tags: bbpress, black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
8
- * Template: twentyten
9
- *
10
- **
11
- *
12
- * This file intentionally left blank. Styles are enqueued in functions.php
13
- *
14
- * 1 - ./css/bbpress-rtl.css
15
- *
16
- **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/screenshot.png DELETED
Binary file
bbp-themes/bbp-twentyten/single-forum-edit.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Edit handler for forums
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php while ( have_posts() ) : the_post(); ?>
16
-
17
- <div id="bbp-edit-page" class="bbp-edit-page">
18
- <h1 class="entry-title"><?php the_title(); ?></h1>
19
- <div class="entry-content">
20
-
21
- <?php bbp_get_template_part( 'form', 'forum' ); ?>
22
-
23
- </div>
24
- </div><!-- #bbp-edit-page -->
25
-
26
- <?php endwhile; ?>
27
-
28
- </div><!-- #content -->
29
- </div><!-- #container -->
30
-
31
- <?php get_sidebar(); ?>
32
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-forum.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single Forum
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) : the_post(); ?>
18
-
19
- <?php if ( bbp_user_can_view_forum() ) : ?>
20
-
21
- <div id="forum-<?php bbp_forum_id(); ?>" class="bbp-forum-content">
22
- <h1 class="entry-title"><?php bbp_forum_title(); ?></h1>
23
- <div class="entry-content">
24
-
25
- <?php bbp_get_template_part( 'content', 'single-forum' ); ?>
26
-
27
- </div>
28
- </div><!-- #forum-<?php bbp_forum_id(); ?> -->
29
-
30
- <?php else : // Forum exists, user no access ?>
31
-
32
- <?php bbp_get_template_part( 'feedback', 'no-access' ); ?>
33
-
34
- <?php endif; ?>
35
-
36
- <?php endwhile; ?>
37
-
38
- </div><!-- #content -->
39
- </div><!-- #container -->
40
-
41
- <?php get_sidebar(); ?>
42
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-reply-edit.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Edit handler for replies
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php while ( have_posts() ) : the_post(); ?>
16
-
17
- <div id="bbp-edit-page" class="bbp-edit-page">
18
- <h1 class="entry-title"><?php the_title(); ?></h1>
19
- <div class="entry-content">
20
-
21
- <?php bbp_get_template_part( 'form', 'reply' ); ?>
22
-
23
- </div>
24
- </div><!-- #bbp-edit-page -->
25
-
26
- <?php endwhile; ?>
27
-
28
- </div><!-- #content -->
29
- </div><!-- #container -->
30
-
31
- <?php get_sidebar(); ?>
32
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-reply.php DELETED
@@ -1,79 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single Reply
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) : the_post(); ?>
18
-
19
- <div id="bbp-reply-wrapper-<?php bbp_reply_id(); ?>" class="bbp-reply-wrapper">
20
- <h1 class="entry-title"><?php bbp_reply_title(); ?></h1>
21
-
22
- <?php bbp_breadcrumb(); ?>
23
-
24
- <div class="entry-content">
25
-
26
- <table class="bbp-replies" id="topic-<?php bbp_topic_id(); ?>-replies">
27
- <thead>
28
- <tr>
29
- <th class="bbp-reply-author"><?php _e( 'Author', 'bbpress' ); ?></th>
30
- <th class="bbp-reply-content"><?php _e( 'Replies', 'bbpress' ); ?></th>
31
- </tr>
32
- </thead>
33
-
34
- <tfoot>
35
- <tr>
36
- <td colspan="2"><?php bbp_topic_admin_links(); ?></td>
37
- </tr>
38
- </tfoot>
39
-
40
- <tbody>
41
- <tr class="bbp-reply-header">
42
- <td class="bbp-reply-author">
43
-
44
- <?php bbp_reply_author_display_name(); ?>
45
-
46
- </td>
47
- <td class="bbp-reply-content">
48
- <a href="<?php bbp_reply_url(); ?>" title="<?php bbp_reply_title(); ?>">#</a>
49
-
50
- <?php printf( __( 'Posted on %1$s at %2$s', 'bbpress' ), get_the_date(), esc_attr( get_the_time() ) ); ?>
51
-
52
- <span><?php bbp_reply_admin_links(); ?></span>
53
- </td>
54
- </tr>
55
-
56
- <tr id="reply-<?php bbp_reply_id(); ?>" <?php bbp_reply_class(); ?>>
57
-
58
- <td class="bbp-reply-author"><?php bbp_reply_author_link( array( 'type' => 'avatar' ) ); ?></td>
59
-
60
- <td class="bbp-reply-content">
61
-
62
- <?php bbp_reply_content(); ?>
63
-
64
- </td>
65
-
66
- </tr><!-- #topic-<?php bbp_topic_id(); ?>-replies -->
67
- </tbody>
68
- </table>
69
-
70
- </div><!-- .entry-content -->
71
- </div><!-- #bbp-reply-wrapper-<?php bbp_reply_id(); ?> -->
72
-
73
- <?php endwhile; ?>
74
-
75
- </div><!-- #content -->
76
- </div><!-- #container -->
77
-
78
- <?php get_sidebar(); ?>
79
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-topic-edit.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Edit handler for topics
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php while ( have_posts() ) : the_post(); ?>
16
-
17
- <div id="bbp-edit-page" class="bbp-edit-page">
18
- <h1 class="entry-title"><?php the_title(); ?></h1>
19
- <div class="entry-content">
20
-
21
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
22
-
23
- </div>
24
- </div><!-- #bbp-edit-page -->
25
-
26
- <?php endwhile; ?>
27
-
28
- </div><!-- #content -->
29
- </div><!-- #container -->
30
-
31
- <?php get_sidebar(); ?>
32
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-topic-merge.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Merge topic page
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) the_post(); ?>
18
-
19
- <div id="bbp-edit-page" class="bbp-edit-page">
20
- <h1 class="entry-title"><?php the_title(); ?></h1>
21
- <div class="entry-content">
22
-
23
- <?php bbp_get_template_part( 'form', 'topic-merge' ); ?>
24
-
25
- </div>
26
- </div><!-- #bbp-edit-page -->
27
-
28
- </div><!-- #content -->
29
- </div><!-- #container -->
30
-
31
- <?php get_sidebar(); ?>
32
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-topic-split.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Split topic page
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php while ( have_posts() ) the_post(); ?>
18
-
19
- <div id="bbp-edit-page" class="bbp-edit-page">
20
- <h1 class="entry-title"><?php the_title(); ?></h1>
21
- <div class="entry-content">
22
-
23
- <?php bbp_get_template_part( 'form', 'topic-split' ); ?>
24
-
25
- </div>
26
- </div><!-- #bbp-edit-page -->
27
-
28
- </div><!-- #content -->
29
- </div><!-- #container -->
30
-
31
- <?php get_sidebar(); ?>
32
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-topic.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single Topic
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <?php if ( bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) ) : ?>
18
-
19
- <?php while ( have_posts() ) : the_post(); ?>
20
-
21
- <div id="bbp-topic-wrapper-<?php bbp_topic_id(); ?>" class="bbp-topic-wrapper">
22
- <h1 class="entry-title"><?php bbp_topic_title(); ?></h1>
23
- <div class="entry-content">
24
-
25
- <?php bbp_get_template_part( 'content', 'single-topic' ); ?>
26
-
27
- </div>
28
- </div><!-- #bbp-topic-wrapper-<?php bbp_topic_id(); ?> -->
29
-
30
- <?php endwhile; ?>
31
-
32
- <?php elseif ( bbp_is_forum_private( bbp_get_topic_forum_id(), false ) ) : ?>
33
-
34
- <?php bbp_get_template_part( 'feedback', 'no-access' ); ?>
35
-
36
- <?php endif; ?>
37
-
38
- </div><!-- #content -->
39
- </div><!-- #container -->
40
-
41
- <?php get_sidebar(); ?>
42
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-user-edit.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * bbPress User Profile Edit
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <div id="bbp-user-<?php bbp_current_user_id(); ?>" class="bbp-single-user">
16
- <div class="entry-content">
17
-
18
- <?php bbp_get_template_part( 'content', 'single-user-edit' ); ?>
19
-
20
- </div><!-- .entry-content -->
21
- </div><!-- #bbp-user-<?php bbp_current_user_id(); ?> -->
22
-
23
- </div><!-- #content -->
24
- </div><!-- #container -->
25
-
26
- <?php get_sidebar(); ?>
27
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-user.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * User Profile
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <div id="bbp-user-<?php bbp_current_user_id(); ?>" class="bbp-single-user">
16
- <div class="entry-content">
17
-
18
- <?php bbp_get_template_part( 'content', 'single-user' ); ?>
19
-
20
- </div><!-- .entry-content -->
21
- </div><!-- #bbp-user-<?php bbp_current_user_id(); ?> -->
22
-
23
- </div><!-- #content -->
24
- </div><!-- #container -->
25
-
26
- <?php get_sidebar(); ?>
27
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/single-view.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Single View
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <div id="bbp-view-<?php bbp_view_id(); ?>" class="bbp-view">
18
- <h1 class="entry-title"><?php bbp_view_title(); ?></h1>
19
- <div class="entry-content">
20
-
21
- <?php bbp_get_template_part( 'content', 'single-view' ); ?>
22
-
23
- </div>
24
- </div><!-- #bbp-view-<?php bbp_view_id(); ?> -->
25
-
26
- </div><!-- #content -->
27
- </div><!-- #container -->
28
-
29
- <?php get_sidebar(); ?>
30
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/style.css DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * Theme Name: bbPress (Twenty Ten)
3
- * Theme URI: http://bbpress.org
4
- * Description: Adds bbPress forums to the Twenty Ten theme
5
- * Author: WordPress and bbPress teams
6
- * Version: 1.4
7
- * Tags: bbpress, black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
8
- * Template: twentyten
9
- *
10
- **
11
- *
12
- * This file intentionally left blank. Styles are enqueued in functions.php
13
- *
14
- * 1 - ./css/bbpress.css
15
- *
16
- **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/taxonomy-topic-tag-edit.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Topic Tag Edit
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <div id="topic-tag" class="bbp-topic-tag">
18
- <h1 class="entry-title"><?php printf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ); ?></h1>
19
-
20
- <div class="entry-content">
21
-
22
- <?php bbp_breadcrumb(); ?>
23
-
24
- <?php bbp_topic_tag_description(); ?>
25
-
26
- <?php do_action( 'bbp_template_before_topic_tag_edit' ); ?>
27
-
28
- <?php bbp_get_template_part( 'form', 'topic-tag' ); ?>
29
-
30
- <?php do_action( 'bbp_template_after_topic_tag_edit' ); ?>
31
-
32
- </div>
33
- </div><!-- #topic-tag -->
34
- </div><!-- #content -->
35
- </div><!-- #container -->
36
-
37
- <?php get_sidebar(); ?>
38
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-themes/bbp-twentyten/taxonomy-topic-tag.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Topic Tag
5
- *
6
- * @package bbPress
7
- * @subpackage Theme
8
- */
9
-
10
- get_header(); ?>
11
-
12
- <div id="container">
13
- <div id="content" role="main">
14
-
15
- <?php do_action( 'bbp_template_notices' ); ?>
16
-
17
- <div id="topic-tag" class="bbp-topic-tag">
18
- <h1 class="entry-title"><?php printf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ); ?></h1>
19
-
20
- <div class="entry-content">
21
-
22
- <?php bbp_breadcrumb(); ?>
23
-
24
- <?php bbp_topic_tag_description(); ?>
25
-
26
- <?php do_action( 'bbp_template_before_topic_tag' ); ?>
27
-
28
- <?php if ( bbp_has_topics() ) : ?>
29
-
30
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
31
-
32
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
33
-
34
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
35
-
36
- <?php else : ?>
37
-
38
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
39
-
40
- <?php endif; ?>
41
-
42
- <?php do_action( 'bbp_template_after_topic_tag' ); ?>
43
-
44
- </div>
45
- </div><!-- #topic-tag -->
46
- </div><!-- #content -->
47
- </div><!-- #container -->
48
-
49
- <?php get_sidebar(); ?>
50
- <?php get_footer(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbpress.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
- * $Id: bbpress.php 4378 2012-11-09 16:28:15Z johnjamesjacoby $
9
  *
10
  * @package bbPress
11
  * @subpackage Main
@@ -17,9 +17,9 @@
17
  * Description: bbPress is forum software with a twist from the creators of WordPress.
18
  * Author: The bbPress Community
19
  * Author URI: http://bbpress.org
20
- * Version: 2.1.3
21
  * Text Domain: bbpress
22
- * Domain Path: /bbp-languages/
23
  */
24
 
25
  // Exit if accessed directly
@@ -127,14 +127,14 @@ final class bbPress {
127
  *
128
  * @since bbPress (r2464)
129
  */
130
- public function __clone() { wp_die( __( 'Cheatin&#8217; huh?', 'bbpress' ) ); }
131
 
132
  /**
133
  * A dummy magic method to prevent bbPress from being unserialized
134
  *
135
  * @since bbPress (r2464)
136
  */
137
- public function __wakeup() { wp_die( __( 'Cheatin&#8217; huh?', 'bbpress' ) ); }
138
 
139
  /**
140
  * Magic method for checking the existence of a certain custom field
@@ -157,6 +157,13 @@ final class bbPress {
157
  */
158
  public function __set( $key, $value ) { $this->data[$key] = $value; }
159
 
 
 
 
 
 
 
 
160
  /** Private Methods *******************************************************/
161
 
162
  /**
@@ -173,8 +180,8 @@ final class bbPress {
173
 
174
  /** Versions **********************************************************/
175
 
176
- $this->version = '2.1.3'; // bbPress version
177
- $this->db_version = '212'; // bbPress DB version
178
 
179
  /** Paths *************************************************************/
180
 
@@ -184,12 +191,16 @@ final class bbPress {
184
  $this->plugin_dir = apply_filters( 'bbp_plugin_dir_path', plugin_dir_path( $this->file ) );
185
  $this->plugin_url = apply_filters( 'bbp_plugin_dir_url', plugin_dir_url ( $this->file ) );
186
 
187
- // Themes
188
- $this->themes_dir = apply_filters( 'bbp_themes_dir', trailingslashit( $this->plugin_dir . 'bbp-themes' ) );
189
- $this->themes_url = apply_filters( 'bbp_themes_url', trailingslashit( $this->plugin_url . 'bbp-themes' ) );
190
 
191
  // Languages
192
- $this->lang_dir = apply_filters( 'bbp_lang_dir', trailingslashit( $this->plugin_dir . 'bbp-languages' ) );
 
 
 
 
193
 
194
  /** Identifiers *******************************************************/
195
 
@@ -211,6 +222,10 @@ final class bbPress {
211
 
212
  // Other identifiers
213
  $this->user_id = apply_filters( 'bbp_user_id', 'bbp_user' );
 
 
 
 
214
  $this->view_id = apply_filters( 'bbp_view_id', 'bbp_view' );
215
  $this->edit_id = apply_filters( 'bbp_edit_id', 'edit' );
216
 
@@ -221,9 +236,9 @@ final class bbPress {
221
  $this->current_reply_id = 0; // Current reply id
222
  $this->current_topic_tag_id = 0; // Current topic tag id
223
 
224
- $this->forum_query = new stdClass; // Main forum query
225
- $this->topic_query = new stdClass; // Main topic query
226
- $this->reply_query = new stdClass; // Main reply query
227
 
228
  /** Theme Compat ******************************************************/
229
 
@@ -237,6 +252,7 @@ final class bbPress {
237
 
238
  /** Misc **************************************************************/
239
 
 
240
  $this->extend = new stdClass(); // Plugins add data here
241
  $this->errors = new WP_Error(); // Feedback
242
  $this->tab_index = apply_filters( 'bbp_default_tab_index', 100 );
@@ -252,64 +268,64 @@ final class bbPress {
252
  *
253
  * @since bbPress (r2626)
254
  * @access private
255
- * @todo Be smarter about conditionally loading code
256
  * @uses is_admin() If in WordPress admin, load additional file
257
  */
258
  private function includes() {
259
 
260
  /** Core **************************************************************/
261
 
262
- require( $this->plugin_dir . 'bbp-includes/bbp-core-cache.php' ); // Cache helpers
263
- require( $this->plugin_dir . 'bbp-includes/bbp-core-actions.php' ); // All actions
264
- require( $this->plugin_dir . 'bbp-includes/bbp-core-filters.php' ); // All filters
265
- require( $this->plugin_dir . 'bbp-includes/bbp-core-functions.php' ); // Core functions
266
- require( $this->plugin_dir . 'bbp-includes/bbp-core-options.php' ); // Configuration options
267
- require( $this->plugin_dir . 'bbp-includes/bbp-core-caps.php' ); // Roles and capabilities
268
- require( $this->plugin_dir . 'bbp-includes/bbp-core-classes.php' ); // Common classes
269
- require( $this->plugin_dir . 'bbp-includes/bbp-core-widgets.php' ); // Sidebar widgets
270
- require( $this->plugin_dir . 'bbp-includes/bbp-core-shortcodes.php' ); // Shortcodes for use with pages and posts
271
- require( $this->plugin_dir . 'bbp-includes/bbp-core-update.php' ); // Database updater
272
 
273
- /** Templates *********************************************************/
274
-
275
- require( $this->plugin_dir . 'bbp-includes/bbp-template-functions.php' ); // Template functions
276
- require( $this->plugin_dir . 'bbp-includes/bbp-template-loader.php' ); // Template loader
277
- require( $this->plugin_dir . 'bbp-includes/bbp-theme-compatibility.php' ); // Theme compatibility for existing themes
278
-
279
- /** Extensions ********************************************************/
280
-
281
- require( $this->plugin_dir . 'bbp-includes/bbp-extend-akismet.php' ); // Spam prevention for topics and replies
282
 
283
- /**
284
- * BuddyPress extension is loaded in bbp-core-hooks.php
285
- *
286
- * @since bbPress (r3559)
287
- */
 
288
 
289
- /** Components ********************************************************/
 
 
 
290
 
291
- require( $this->plugin_dir . 'bbp-includes/bbp-common-functions.php' ); // Common functions
292
- require( $this->plugin_dir . 'bbp-includes/bbp-common-template.php' ); // Common template tags
 
 
293
 
294
- require( $this->plugin_dir . 'bbp-includes/bbp-forum-functions.php' ); // Forum functions
295
- require( $this->plugin_dir . 'bbp-includes/bbp-forum-template.php' ); // Forum template tags
 
 
296
 
297
- require( $this->plugin_dir . 'bbp-includes/bbp-topic-functions.php' ); // Topic functions
298
- require( $this->plugin_dir . 'bbp-includes/bbp-topic-template.php' ); // Topic template tags
 
 
 
299
 
300
- require( $this->plugin_dir . 'bbp-includes/bbp-reply-functions.php' ); // Reply functions
301
- require( $this->plugin_dir . 'bbp-includes/bbp-reply-template.php' ); // Reply template tags
302
 
303
- require( $this->plugin_dir . 'bbp-includes/bbp-user-functions.php' ); // User functions
304
- require( $this->plugin_dir . 'bbp-includes/bbp-user-template.php' ); // User template tags
305
- require( $this->plugin_dir . 'bbp-includes/bbp-user-options.php' ); // User options
306
 
307
  /** Admin *************************************************************/
308
 
309
  // Quick admin check and load if needed
310
  if ( is_admin() ) {
311
- require( $this->plugin_dir . 'bbp-admin/bbp-admin.php' );
312
- require( $this->plugin_dir . 'bbp-admin/bbp-actions.php' );
313
  }
314
  }
315
 
@@ -318,9 +334,6 @@ final class bbPress {
318
  *
319
  * @since bbPress (r2644)
320
  * @access private
321
- * @todo Not use bbp_is_deactivation()
322
- * @uses register_activation_hook() To register the activation hook
323
- * @uses register_deactivation_hook() To register the deactivation hook
324
  * @uses add_action() To add various actions
325
  */
326
  private function setup_actions() {
@@ -340,8 +353,8 @@ final class bbPress {
340
  'register_post_types', // Register post types (forum|topic|reply)
341
  'register_post_statuses', // Register post statuses (closed|spam|orphan|hidden)
342
  'register_taxonomies', // Register taxonomies (topic-tag)
 
343
  'register_views', // Register the views (no-replies)
344
- 'register_theme_directory', // Register the theme directory (bbp-themes)
345
  'register_theme_packages', // Register bundled theme packages (bbp-theme-compat/bbp-themes)
346
  'load_textdomain', // Load textdomain (bbpress)
347
  'add_rewrite_tags', // Add rewrite tags (view|user|edit)
@@ -369,25 +382,19 @@ final class bbPress {
369
  */
370
  public function register_theme_packages() {
371
 
372
- /** Default Theme *****************************************************/
373
-
374
  bbp_register_theme_package( array(
375
  'id' => 'default',
376
  'name' => __( 'bbPress Default', 'bbpress' ),
377
  'version' => bbp_get_version(),
378
- 'dir' => trailingslashit( $this->plugin_dir . 'bbp-theme-compat' ),
379
- 'url' => trailingslashit( $this->plugin_url . 'bbp-theme-compat' )
380
  ) );
381
 
382
- /** Twenty Ten ********************************************************/
383
-
384
- bbp_register_theme_package( array(
385
- 'id' => 'bbp-twentyten',
386
- 'name' => __( 'Twenty Ten (bbPress)', 'bbpress' ),
387
- 'version' => bbp_get_version(),
388
- 'dir' => trailingslashit( $this->themes_dir . 'bbp-twentyten' ),
389
- 'url' => trailingslashit( $this->themes_url . 'bbp-twentyten' )
390
- ) );
391
  }
392
 
393
  /**
@@ -422,39 +429,28 @@ final class bbPress {
422
  * @return bool True on success, false on failure
423
  */
424
  public function load_textdomain() {
425
- $locale = get_locale(); // Default locale
426
- $locale = apply_filters( 'plugin_locale', $locale, 'bbpress' ); // Traditional WordPress plugin locale filter
427
- $locale = apply_filters( 'bbpress_locale', $locale ); // bbPress specific locale filter
428
- $mofile = sprintf( 'bbpress-%s.mo', $locale ); // Get mo file name
429
 
430
  // Setup paths to current locale file
431
  $mofile_local = $this->lang_dir . $mofile;
432
  $mofile_global = WP_LANG_DIR . '/bbpress/' . $mofile;
433
 
434
- // Look in local /wp-content/plugins/bbpress/bbp-languages/ folder
435
- if ( file_exists( $mofile_local ) ) {
436
- return load_textdomain( 'bbpress', $mofile_local );
437
-
438
  // Look in global /wp-content/languages/bbpress folder
439
- } elseif ( file_exists( $mofile_global ) ) {
440
- return load_textdomain( 'bbpress', $mofile_global );
 
 
 
 
441
  }
442
 
443
  // Nothing found
444
  return false;
445
  }
446
 
447
- /**
448
- * Sets up the bbPress theme directory to use in WordPress
449
- *
450
- * @since bbPress (r2507)
451
- * @uses register_theme_directory() To register the theme directory
452
- * @return bool True on success, false on failure
453
- */
454
- public function register_theme_directory() {
455
- return register_theme_directory( $this->themes_dir );
456
- }
457
-
458
  /**
459
  * Setup the post types for forums, topics and replies
460
  *
@@ -517,7 +513,7 @@ final class bbPress {
517
  'exclude_from_search' => true,
518
  'show_in_nav_menus' => true,
519
  'public' => true,
520
- 'show_ui' => bbp_current_user_can_see( bbp_get_forum_post_type() ),
521
  'can_export' => true,
522
  'hierarchical' => true,
523
  'query_var' => true,
@@ -574,7 +570,7 @@ final class bbPress {
574
  'exclude_from_search' => true,
575
  'show_in_nav_menus' => false,
576
  'public' => true,
577
- 'show_ui' => bbp_current_user_can_see( bbp_get_topic_post_type() ),
578
  'can_export' => true,
579
  'hierarchical' => false,
580
  'query_var' => true,
@@ -631,7 +627,7 @@ final class bbPress {
631
  'has_archive' => false,
632
  'show_in_nav_menus' => false,
633
  'public' => true,
634
- 'show_ui' => bbp_current_user_can_see( bbp_get_reply_post_type() ),
635
  'can_export' => true,
636
  'hierarchical' => false,
637
  'query_var' => true,
@@ -772,7 +768,7 @@ final class bbPress {
772
  'show_tagcloud' => true,
773
  'hierarchical' => false,
774
  'public' => true,
775
- 'show_ui' => bbp_current_user_can_see( bbp_get_topic_tag_tax_id() )
776
  )
777
  ) );
778
  }
@@ -798,6 +794,17 @@ final class bbPress {
798
  ) );
799
  }
800
 
 
 
 
 
 
 
 
 
 
 
 
801
  /**
802
  * Setup the currently logged-in user
803
  *
@@ -822,9 +829,13 @@ final class bbPress {
822
  * @uses add_rewrite_tag() To add the rewrite tags
823
  */
824
  public static function add_rewrite_tags() {
825
- add_rewrite_tag( '%%' . bbp_get_user_rewrite_id() . '%%', '([^/]+)' ); // User Profile tag
826
- add_rewrite_tag( '%%' . bbp_get_view_rewrite_id() . '%%', '([^/]+)' ); // View Page tag
827
- add_rewrite_tag( '%%' . bbp_get_edit_rewrite_id() . '%%', '([1]{1,})' ); // Edit Page tag
 
 
 
 
828
  }
829
 
830
  /**
@@ -841,13 +852,17 @@ final class bbPress {
841
  public static function generate_rewrite_rules( $wp_rewrite ) {
842
 
843
  // Slugs
844
- $user_slug = bbp_get_user_slug();
845
  $view_slug = bbp_get_view_slug();
 
846
 
847
  // Unique rewrite ID's
848
- $user_id = bbp_get_user_rewrite_id();
849
- $view_id = bbp_get_view_rewrite_id();
850
- $edit_id = bbp_get_edit_rewrite_id();
 
 
 
 
851
 
852
  // Rewrite rule matches used repeatedly below
853
  $root_rule = '/([^/]+)/?$';
@@ -855,6 +870,16 @@ final class bbPress {
855
  $feed_rule = '/([^/]+)/feed/?$';
856
  $page_rule = '/([^/]+)/page/?([0-9]{1,})/?$';
857
 
 
 
 
 
 
 
 
 
 
 
858
  // New bbPress specific rules to merge with existing that are not
859
  // handled automatically by custom post types or taxonomy types
860
  $bbp_rules = array(
@@ -866,9 +891,16 @@ final class bbPress {
866
  bbp_get_topic_tag_tax_slug() . $edit_rule => 'index.php?' . bbp_get_topic_tag_tax_id() . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $edit_id . '=1',
867
 
868
  // User Pagination|Edit|View
869
- $user_slug . $page_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&paged=' . $wp_rewrite->preg_index( 2 ),
870
- $user_slug . $edit_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $edit_id . '=1',
871
- $user_slug . $root_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ),
 
 
 
 
 
 
 
872
 
873
  // Topic-View Pagination|Feed|View
874
  $view_slug . $page_rule => 'index.php?' . $view_id . '=' . $wp_rewrite->preg_index( 1 ) . '&paged=' . $wp_rewrite->preg_index( 2 ),
@@ -914,3 +946,4 @@ if ( defined( 'BBPRESS_LATE_LOAD' ) ) {
914
  }
915
 
916
  endif; // class_exists check
 
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
+ * $Id: bbpress.php 4439 2012-11-19 06:15:17Z johnjamesjacoby $
9
  *
10
  * @package bbPress
11
  * @subpackage Main
17
  * Description: bbPress is forum software with a twist from the creators of WordPress.
18
  * Author: The bbPress Community
19
  * Author URI: http://bbpress.org
20
+ * Version: 2.2
21
  * Text Domain: bbpress
22
+ * Domain Path: /languages/
23
  */
24
 
25
  // Exit if accessed directly
127
  *
128
  * @since bbPress (r2464)
129
  */
130
+ public function __clone() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'bbpress' ), '2.1' ); }
131
 
132
  /**
133
  * A dummy magic method to prevent bbPress from being unserialized
134
  *
135
  * @since bbPress (r2464)
136
  */
137
+ public function __wakeup() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'bbpress' ), '2.1' ); }
138
 
139
  /**
140
  * Magic method for checking the existence of a certain custom field
157
  */
158
  public function __set( $key, $value ) { $this->data[$key] = $value; }
159
 
160
+ /**
161
+ * Magic method to prevent notices and errors from invalid method calls
162
+ *
163
+ * @since bbPress (r4252)
164
+ */
165
+ public function __call( $name = '', $args = array() ) { unset( $name, $args ); return null; }
166
+
167
  /** Private Methods *******************************************************/
168
 
169
  /**
180
 
181
  /** Versions **********************************************************/
182
 
183
+ $this->version = '2.2';
184
+ $this->db_version = '220';
185
 
186
  /** Paths *************************************************************/
187
 
191
  $this->plugin_dir = apply_filters( 'bbp_plugin_dir_path', plugin_dir_path( $this->file ) );
192
  $this->plugin_url = apply_filters( 'bbp_plugin_dir_url', plugin_dir_url ( $this->file ) );
193
 
194
+ // Includes
195
+ $this->includes_dir = apply_filters( 'bbp_includes_dir', trailingslashit( $this->plugin_dir . 'includes' ) );
196
+ $this->includes_url = apply_filters( 'bbp_includes_url', trailingslashit( $this->plugin_url . 'includes' ) );
197
 
198
  // Languages
199
+ $this->lang_dir = apply_filters( 'bbp_lang_dir', trailingslashit( $this->plugin_dir . 'languages' ) );
200
+
201
+ // Templates
202
+ $this->themes_dir = apply_filters( 'bbp_themes_dir', trailingslashit( $this->plugin_dir . 'templates' ) );
203
+ $this->themes_url = apply_filters( 'bbp_themes_url', trailingslashit( $this->plugin_url . 'templates' ) );
204
 
205
  /** Identifiers *******************************************************/
206
 
222
 
223
  // Other identifiers
224
  $this->user_id = apply_filters( 'bbp_user_id', 'bbp_user' );
225
+ $this->tops_id = apply_filters( 'bbp_tops_id', 'bbp_tops' );
226
+ $this->reps_id = apply_filters( 'bbp_reps_id', 'bbp_reps' );
227
+ $this->favs_id = apply_filters( 'bbp_favs_id', 'bbp_favs' );
228
+ $this->subs_id = apply_filters( 'bbp_subs_id', 'bbp_subs' );
229
  $this->view_id = apply_filters( 'bbp_view_id', 'bbp_view' );
230
  $this->edit_id = apply_filters( 'bbp_edit_id', 'edit' );
231
 
236
  $this->current_reply_id = 0; // Current reply id
237
  $this->current_topic_tag_id = 0; // Current topic tag id
238
 
239
+ $this->forum_query = new stdClass(); // Main forum query
240
+ $this->topic_query = new stdClass(); // Main topic query
241
+ $this->reply_query = new stdClass(); // Main reply query
242
 
243
  /** Theme Compat ******************************************************/
244
 
252
 
253
  /** Misc **************************************************************/
254
 
255
+ $this->domain = 'bbpress'; // Unique identifier for retrieving translated strings
256
  $this->extend = new stdClass(); // Plugins add data here
257
  $this->errors = new WP_Error(); // Feedback
258
  $this->tab_index = apply_filters( 'bbp_default_tab_index', 100 );
268
  *
269
  * @since bbPress (r2626)
270
  * @access private
 
271
  * @uses is_admin() If in WordPress admin, load additional file
272
  */
273
  private function includes() {
274
 
275
  /** Core **************************************************************/
276
 
277
+ require( $this->includes_dir . 'core/sub-actions.php' );
278
+ require( $this->includes_dir . 'core/functions.php' );
279
+ require( $this->includes_dir . 'core/cache.php' );
280
+ require( $this->includes_dir . 'core/options.php' );
281
+ require( $this->includes_dir . 'core/capabilities.php' );
282
+ require( $this->includes_dir . 'core/update.php' );
283
+ require( $this->includes_dir . 'core/template-functions.php' );
284
+ require( $this->includes_dir . 'core/template-loader.php' );
285
+ require( $this->includes_dir . 'core/theme-compat.php' );
 
286
 
287
+ /** Components ********************************************************/
 
 
 
 
 
 
 
 
288
 
289
+ // Common
290
+ require( $this->includes_dir . 'common/classes.php' );
291
+ require( $this->includes_dir . 'common/functions.php' );
292
+ require( $this->includes_dir . 'common/template-tags.php' );
293
+ require( $this->includes_dir . 'common/widgets.php' );
294
+ require( $this->includes_dir . 'common/shortcodes.php' );
295
 
296
+ // Forums
297
+ require( $this->includes_dir . 'forums/capabilities.php' );
298
+ require( $this->includes_dir . 'forums/functions.php' );
299
+ require( $this->includes_dir . 'forums/template-tags.php' );
300
 
301
+ // Topics
302
+ require( $this->includes_dir . 'topics/capabilities.php' );
303
+ require( $this->includes_dir . 'topics/functions.php' );
304
+ require( $this->includes_dir . 'topics/template-tags.php' );
305
 
306
+ // Replies
307
+ require( $this->includes_dir . 'replies/capabilities.php' );
308
+ require( $this->includes_dir . 'replies/functions.php' );
309
+ require( $this->includes_dir . 'replies/template-tags.php' );
310
 
311
+ // Users
312
+ require( $this->includes_dir . 'users/capabilities.php' );
313
+ require( $this->includes_dir . 'users/functions.php' );
314
+ require( $this->includes_dir . 'users/template-tags.php' );
315
+ require( $this->includes_dir . 'users/options.php' );
316
 
317
+ /** Hooks *************************************************************/
 
318
 
319
+ require( $this->includes_dir . 'core/extend.php' );
320
+ require( $this->includes_dir . 'core/actions.php' );
321
+ require( $this->includes_dir . 'core/filters.php' );
322
 
323
  /** Admin *************************************************************/
324
 
325
  // Quick admin check and load if needed
326
  if ( is_admin() ) {
327
+ require( $this->includes_dir . 'admin/admin.php' );
328
+ require( $this->includes_dir . 'admin/actions.php' );
329
  }
330
  }
331
 
334
  *
335
  * @since bbPress (r2644)
336
  * @access private
 
 
 
337
  * @uses add_action() To add various actions
338
  */
339
  private function setup_actions() {
353
  'register_post_types', // Register post types (forum|topic|reply)
354
  'register_post_statuses', // Register post statuses (closed|spam|orphan|hidden)
355
  'register_taxonomies', // Register taxonomies (topic-tag)
356
+ 'register_shortcodes', // Register shortcodes (bbp-login)
357
  'register_views', // Register the views (no-replies)
 
358
  'register_theme_packages', // Register bundled theme packages (bbp-theme-compat/bbp-themes)
359
  'load_textdomain', // Load textdomain (bbpress)
360
  'add_rewrite_tags', // Add rewrite tags (view|user|edit)
382
  */
383
  public function register_theme_packages() {
384
 
385
+ // Register the default theme compatibility package
 
386
  bbp_register_theme_package( array(
387
  'id' => 'default',
388
  'name' => __( 'bbPress Default', 'bbpress' ),
389
  'version' => bbp_get_version(),
390
+ 'dir' => trailingslashit( $this->themes_dir . 'default' ),
391
+ 'url' => trailingslashit( $this->themes_url . 'default' )
392
  ) );
393
 
394
+ // Register the basic theme stack. This is really dope.
395
+ bbp_register_template_stack( 'get_stylesheet_directory', 10 );
396
+ bbp_register_template_stack( 'get_template_directory', 12 );
397
+ bbp_register_template_stack( 'bbp_get_theme_compat_dir', 14 );
 
 
 
 
 
398
  }
399
 
400
  /**
429
  * @return bool True on success, false on failure
430
  */
431
  public function load_textdomain() {
432
+
433
+ // Traditional WordPress plugin locale filter
434
+ $locale = apply_filters( 'plugin_locale', get_locale(), $this->domain );
435
+ $mofile = sprintf( '%1$s-%2$s.mo', $this->domain, $locale );
436
 
437
  // Setup paths to current locale file
438
  $mofile_local = $this->lang_dir . $mofile;
439
  $mofile_global = WP_LANG_DIR . '/bbpress/' . $mofile;
440
 
 
 
 
 
441
  // Look in global /wp-content/languages/bbpress folder
442
+ if ( file_exists( $mofile_global ) ) {
443
+ return load_textdomain( $this->domain, $mofile_global );
444
+
445
+ // Look in local /wp-content/plugins/bbpress/bbp-languages/ folder
446
+ } elseif ( file_exists( $mofile_local ) ) {
447
+ return load_textdomain( $this->domain, $mofile_local );
448
  }
449
 
450
  // Nothing found
451
  return false;
452
  }
453
 
 
 
 
 
 
 
 
 
 
 
 
454
  /**
455
  * Setup the post types for forums, topics and replies
456
  *
513
  'exclude_from_search' => true,
514
  'show_in_nav_menus' => true,
515
  'public' => true,
516
+ 'show_ui' => current_user_can( 'bbp_forums_admin' ),
517
  'can_export' => true,
518
  'hierarchical' => true,
519
  'query_var' => true,
570
  'exclude_from_search' => true,
571
  'show_in_nav_menus' => false,
572
  'public' => true,
573
+ 'show_ui' => current_user_can( 'bbp_topics_admin' ),
574
  'can_export' => true,
575
  'hierarchical' => false,
576
  'query_var' => true,
627
  'has_archive' => false,
628
  'show_in_nav_menus' => false,
629
  'public' => true,
630
+ 'show_ui' => current_user_can( 'bbp_replies_admin' ),
631
  'can_export' => true,
632
  'hierarchical' => false,
633
  'query_var' => true,
768
  'show_tagcloud' => true,
769
  'hierarchical' => false,
770
  'public' => true,
771
+ 'show_ui' => bbp_allow_topic_tags() && current_user_can( 'bbp_topic_tags_admin' )
772
  )
773
  ) );
774
  }
794
  ) );
795
  }
796
 
797
+ /**
798
+ * Register the bbPress shortcodes
799
+ *
800
+ * @since bbPress (r3031)
801
+ *
802
+ * @uses BBP_Shortcodes
803
+ */
804
+ public function register_shortcodes() {
805
+ $this->shortcodes = new BBP_Shortcodes();
806
+ }
807
+
808
  /**
809
  * Setup the currently logged-in user
810
  *
829
  * @uses add_rewrite_tag() To add the rewrite tags
830
  */
831
  public static function add_rewrite_tags() {
832
+ add_rewrite_tag( '%%' . bbp_get_view_rewrite_id() . '%%', '([^/]+)' ); // View Page tag
833
+ add_rewrite_tag( '%%' . bbp_get_edit_rewrite_id() . '%%', '([1]{1,})' ); // Edit Page tag
834
+ add_rewrite_tag( '%%' . bbp_get_user_rewrite_id() . '%%', '([^/]+)' ); // User Profile tag
835
+ add_rewrite_tag( '%%' . bbp_get_user_favorites_rewrite_id() . '%%', '([1]{1,})' ); // User Favorites tag
836
+ add_rewrite_tag( '%%' . bbp_get_user_subscriptions_rewrite_id() . '%%', '([1]{1,})' ); // User Subscriptions tag
837
+ add_rewrite_tag( '%%' . bbp_get_user_topics_rewrite_id() . '%%', '([1]{1,})' ); // User Topics Tag
838
+ add_rewrite_tag( '%%' . bbp_get_user_replies_rewrite_id() . '%%', '([1]{1,})' ); // User Replies Tag
839
  }
840
 
841
  /**
852
  public static function generate_rewrite_rules( $wp_rewrite ) {
853
 
854
  // Slugs
 
855
  $view_slug = bbp_get_view_slug();
856
+ $user_slug = bbp_get_user_slug();
857
 
858
  // Unique rewrite ID's
859
+ $edit_id = bbp_get_edit_rewrite_id();
860
+ $view_id = bbp_get_view_rewrite_id();
861
+ $user_id = bbp_get_user_rewrite_id();
862
+ $favs_id = bbp_get_user_favorites_rewrite_id();
863
+ $subs_id = bbp_get_user_subscriptions_rewrite_id();
864
+ $tops_id = bbp_get_user_topics_rewrite_id();
865
+ $reps_id = bbp_get_user_replies_rewrite_id();
866
 
867
  // Rewrite rule matches used repeatedly below
868
  $root_rule = '/([^/]+)/?$';
870
  $feed_rule = '/([^/]+)/feed/?$';
871
  $page_rule = '/([^/]+)/page/?([0-9]{1,})/?$';
872
 
873
+ // User profile rules
874
+ $tops_rule = '/([^/]+)/topics/?$';
875
+ $reps_rule = '/([^/]+)/replies/?$';
876
+ $favs_rule = '/([^/]+)/' . bbp_get_user_favorites_slug() . '/?$';
877
+ $subs_rule = '/([^/]+)/' . bbp_get_user_subscriptions_slug() . '/?$';
878
+ $tops_page_rule = '/([^/]+)/topics/page/?([0-9]{1,})/?$';
879
+ $reps_page_rule = '/([^/]+)/replies/page/?([0-9]{1,})/?$';
880
+ $favs_page_rule = '/([^/]+)/' . bbp_get_user_favorites_slug() . '/page/?([0-9]{1,})/?$';
881
+ $subs_page_rule = '/([^/]+)/' . bbp_get_user_subscriptions_slug() . '/page/?([0-9]{1,})/?$';
882
+
883
  // New bbPress specific rules to merge with existing that are not
884
  // handled automatically by custom post types or taxonomy types
885
  $bbp_rules = array(
891
  bbp_get_topic_tag_tax_slug() . $edit_rule => 'index.php?' . bbp_get_topic_tag_tax_id() . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $edit_id . '=1',
892
 
893
  // User Pagination|Edit|View
894
+ $user_slug . $tops_page_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $tops_id . '=1&paged=' . $wp_rewrite->preg_index( 2 ),
895
+ $user_slug . $reps_page_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $reps_id . '=1&paged=' . $wp_rewrite->preg_index( 2 ),
896
+ $user_slug . $favs_page_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $favs_id . '=1&paged=' . $wp_rewrite->preg_index( 2 ),
897
+ $user_slug . $subs_page_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $subs_id . '=1&paged=' . $wp_rewrite->preg_index( 2 ),
898
+ $user_slug . $tops_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $tops_id . '=1',
899
+ $user_slug . $reps_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $reps_id . '=1',
900
+ $user_slug . $favs_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $favs_id . '=1',
901
+ $user_slug . $subs_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $subs_id . '=1',
902
+ $user_slug . $edit_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&' . $edit_id . '=1',
903
+ $user_slug . $root_rule => 'index.php?' . $user_id . '=' . $wp_rewrite->preg_index( 1 ),
904
 
905
  // Topic-View Pagination|Feed|View
906
  $view_slug . $page_rule => 'index.php?' . $view_id . '=' . $wp_rewrite->preg_index( 1 ) . '&paged=' . $wp_rewrite->preg_index( 2 ),
946
  }
947
 
948
  endif; // class_exists check
949
+
humans.txt CHANGED
@@ -39,8 +39,8 @@ Twitter: jjj
39
  Favorite Food: Truffle Lasagna
40
 
41
  /* THANKS */
42
- Mike Adams, Gautam Gupta, Ben L, Justin Tadlock, cnorris23, anointed, andy, nacin, netweb
43
 
44
  /* META */
45
- Updated: 2011/05/29
46
  See: http://humanstxt.org/
39
  Favorite Food: Truffle Lasagna
40
 
41
  /* THANKS */
42
+ Mike Adams, Gautam Gupta, jmdodd, Ben L, Justin Tadlock, cnorris23, anointed, andy, nacin, netweb
43
 
44
  /* META */
45
+ Updated: 2012/11/09
46
  See: http://humanstxt.org/
bbp-admin/bbp-actions.php → includes/admin/actions.php RENAMED
@@ -13,9 +13,8 @@
13
  * There are a few common places that additional actions can currently be found
14
  *
15
  * - bbPress: In {@link bbPress::setup_actions()} in bbpress.php
16
- * - Admin: More in {@link BBP_Admin::setup_actions()} in
17
- * bbp-admin/bbp-admin.php
18
- *
19
  * @see bbp-core-actions.php
20
  * @see bbp-core-filters.php
21
  */
@@ -55,6 +54,7 @@ add_action( 'bbp_admin_init', 'bbp_setup_updater', 999 );
55
  add_action( 'bbp_admin_init', 'bbp_register_importers' );
56
  add_action( 'bbp_admin_init', 'bbp_register_admin_style' );
57
  add_action( 'bbp_admin_init', 'bbp_register_admin_settings' );
 
58
 
59
  // Initialize the admin area
60
  add_action( 'bbp_init', 'bbp_admin' );
@@ -63,22 +63,14 @@ add_action( 'bbp_init', 'bbp_admin' );
63
  add_action( 'bbp_admin_menu', 'bbp_admin_separator' );
64
 
65
  // Activation
66
- add_action( 'bbp_activation', 'bbp_add_roles', 1 );
67
- add_action( 'bbp_activation', 'bbp_add_caps', 2 );
68
- add_action( 'bbp_activation', 'bbp_add_options', 1 );
69
- add_action( 'bbp_activation', 'flush_rewrite_rules' );
70
 
71
  // Deactivation
72
- add_action( 'bbp_deactivation', 'bbp_remove_caps', 1 );
73
- add_action( 'bbp_deactivation', 'bbp_remove_roles', 2 );
74
- add_action( 'bbp_deactivation', 'flush_rewrite_rules' );
75
-
76
- //
77
- add_action( 'bbp_new_site', 'bbp_add_roles', 2 );
78
- add_action( 'bbp_new_site', 'bbp_add_caps', 4 );
79
- add_action( 'bbp_new_site', 'bbp_add_options', 6 );
80
  add_action( 'bbp_new_site', 'bbp_create_initial_content', 8 );
81
- add_action( 'bbp_new_site', 'flush_rewrite_rules' );
82
 
83
  // Contextual Helpers
84
  add_action( 'load-settings_page_bbpress', 'bbp_admin_settings_help' );
@@ -105,11 +97,15 @@ add_filter( 'post_type_link', 'bbp_filter_sample_permalink', 10, 4 );
105
  */
106
  function bbp_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
107
 
 
 
 
 
108
  // Switch to the new blog
109
  switch_to_blog( $blog_id );
110
 
111
  // Do the bbPress activation routine
112
- do_action( 'bbp_new_site' );
113
 
114
  // restore original blog
115
  restore_current_blog();
13
  * There are a few common places that additional actions can currently be found
14
  *
15
  * - bbPress: In {@link bbPress::setup_actions()} in bbpress.php
16
+ * - Admin: More in {@link BBP_Admin::setup_actions()} in admin.php
17
+ *
 
18
  * @see bbp-core-actions.php
19
  * @see bbp-core-filters.php
20
  */
54
  add_action( 'bbp_admin_init', 'bbp_register_importers' );
55
  add_action( 'bbp_admin_init', 'bbp_register_admin_style' );
56
  add_action( 'bbp_admin_init', 'bbp_register_admin_settings' );
57
+ add_action( 'bbp_admin_init', 'bbp_do_activation_redirect', 1 );
58
 
59
  // Initialize the admin area
60
  add_action( 'bbp_init', 'bbp_admin' );
63
  add_action( 'bbp_admin_menu', 'bbp_admin_separator' );
64
 
65
  // Activation
66
+ add_action( 'bbp_activation', 'bbp_delete_rewrite_rules' );
 
 
 
67
 
68
  // Deactivation
69
+ add_action( 'bbp_deactivation', 'bbp_remove_caps' );
70
+ add_action( 'bbp_deactivation', 'bbp_delete_rewrite_rules' );
71
+
72
+ // New Site
 
 
 
 
73
  add_action( 'bbp_new_site', 'bbp_create_initial_content', 8 );
 
74
 
75
  // Contextual Helpers
76
  add_action( 'load-settings_page_bbpress', 'bbp_admin_settings_help' );
97
  */
98
  function bbp_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
99
 
100
+ // Bail if plugin is not network activated
101
+ if ( ! is_plugin_active_for_network( bbpress()->basename ) )
102
+ return;
103
+
104
  // Switch to the new blog
105
  switch_to_blog( $blog_id );
106
 
107
  // Do the bbPress activation routine
108
+ do_action( 'bbp_new_site', $blog_id, $user_id, $domain, $path, $site_id, $meta );
109
 
110
  // restore original blog
111
  restore_current_blog();
bbp-admin/bbp-admin.php → includes/admin/admin.php RENAMED
@@ -76,10 +76,10 @@ class BBP_Admin {
76
  */
77
  private function setup_globals() {
78
  $bbp = bbpress();
79
- $this->admin_dir = trailingslashit( $bbp->plugin_dir . 'bbp-admin' ); // Admin path
80
- $this->admin_url = trailingslashit( $bbp->plugin_url . 'bbp-admin' ); // Admin url
81
- $this->images_url = trailingslashit( $this->admin_url . 'images' ); // Admin images URL
82
- $this->styles_url = trailingslashit( $this->admin_url . 'styles' ); // Admin styles URL
83
  }
84
 
85
  /**
@@ -89,14 +89,15 @@ class BBP_Admin {
89
  * @access private
90
  */
91
  private function includes() {
92
- require( $this->admin_dir . 'bbp-tools.php' );
93
- require( $this->admin_dir . 'bbp-converter.php' );
94
- require( $this->admin_dir . 'bbp-settings.php' );
95
- require( $this->admin_dir . 'bbp-functions.php' );
96
- require( $this->admin_dir . 'bbp-metaboxes.php' );
97
- require( $this->admin_dir . 'bbp-forums.php' );
98
- require( $this->admin_dir . 'bbp-topics.php' );
99
- require( $this->admin_dir . 'bbp-replies.php' );
 
100
  }
101
 
102
  /**
@@ -110,6 +111,10 @@ class BBP_Admin {
110
  */
111
  private function setup_actions() {
112
 
 
 
 
 
113
  /** General Actions ***************************************************/
114
 
115
  add_action( 'bbp_admin_menu', array( $this, 'admin_menus' ) ); // Add menu item to settings menu
@@ -118,12 +123,24 @@ class BBP_Admin {
118
  add_action( 'bbp_register_admin_style', array( $this, 'register_admin_style' ) ); // Add green admin style
119
  add_action( 'bbp_register_admin_settings', array( $this, 'register_admin_settings' ) ); // Add settings
120
  add_action( 'bbp_activation', array( $this, 'new_install' ) ); // Add menu item to settings menu
 
121
  add_action( 'wp_dashboard_setup', array( $this, 'dashboard_widget_right_now' ) ); // Forums 'Right now' Dashboard widget
122
 
 
 
 
 
 
123
  /** Filters ***********************************************************/
124
 
125
- // Add link to settings page
126
- add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 10, 2 );
 
 
 
 
 
 
127
 
128
  /** Network Admin *****************************************************/
129
 
@@ -150,8 +167,8 @@ class BBP_Admin {
150
  $hooks = array();
151
 
152
  // These are later removed in admin_head
153
- if ( bbp_current_user_can_see( 'bbp_tools_page' ) ) {
154
- if ( bbp_current_user_can_see( 'bbp_tools_repair_page' ) ) {
155
  $hooks[] = add_management_page(
156
  __( 'Repair Forums', 'bbpress' ),
157
  __( 'Forum Repair', 'bbpress' ),
@@ -161,7 +178,7 @@ class BBP_Admin {
161
  );
162
  }
163
 
164
- if ( bbp_current_user_can_see( 'bbp_tools_import_page' ) ) {
165
  $hooks[] = add_management_page(
166
  __( 'Import Forums', 'bbpress' ),
167
  __( 'Forum Import', 'bbpress' ),
@@ -171,7 +188,7 @@ class BBP_Admin {
171
  );
172
  }
173
 
174
- if ( bbp_current_user_can_see( 'bbp_tools_reset_page' ) ) {
175
  $hooks[] = add_management_page(
176
  __( 'Reset Forums', 'bbpress' ),
177
  __( 'Forum Reset', 'bbpress' ),
@@ -197,7 +214,7 @@ class BBP_Admin {
197
  }
198
 
199
  // Are settings enabled?
200
- if ( bbp_current_user_can_see( 'bbp_settings_page' ) ) {
201
  add_options_page(
202
  __( 'Forums', 'bbpress' ),
203
  __( 'Forums', 'bbpress' ),
@@ -206,6 +223,41 @@ class BBP_Admin {
206
  'bbp_admin_settings'
207
  );
208
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }
210
 
211
  /**
@@ -215,6 +267,11 @@ class BBP_Admin {
215
  * @uses add_submenu_page() To add the Update Forums page in Updates
216
  */
217
  public function network_admin_menus() {
 
 
 
 
 
218
  add_submenu_page(
219
  'upgrade.php',
220
  __( 'Update Forums', 'bbpress' ),
@@ -229,7 +286,7 @@ class BBP_Admin {
229
  * If this is a new installation, create some initial forum content.
230
  *
231
  * @since bbPress (r3767)
232
- * @return type
233
  */
234
  public static function new_install() {
235
  if ( !bbp_is_install() )
@@ -251,35 +308,97 @@ class BBP_Admin {
251
  public static function register_admin_settings() {
252
 
253
  // Bail if no sections available
254
- if ( ! $sections = bbp_admin_get_settings_sections() )
 
255
  return false;
256
 
257
  // Loop through sections
258
- foreach ( $sections as $section_id => $section ) {
259
 
260
  // Only proceed if current user can see this section
261
- if ( ! bbp_current_user_can_see( $section_id ) )
262
  continue;
263
 
264
  // Only add section and fields if section has fields
265
- if ( $fields = bbp_admin_get_settings_fields_for_section( $section_id ) ) {
 
 
266
 
267
- // Add the section
268
- add_settings_section( $section_id, $section['title'], $section['callback'], $section['page'] );
269
 
270
- // Loop through fields for this section
271
- foreach ( $fields as $field_id => $field ) {
272
 
273
- // Add the field
274
- add_settings_field( $field_id, $field['title'], $field['callback'], $section['page'], $section_id, $field['args'] );
275
 
276
- // Register the setting
277
- register_setting( $section['page'], $field_id, $field['sanitize_callback'] );
278
- }
279
  }
280
  }
281
  }
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  /**
284
  * Register the importers
285
  *
@@ -338,14 +457,17 @@ class BBP_Admin {
338
  * @param string $file Current plugin basename
339
  * @return array Processed links
340
  */
341
- public static function add_settings_link( $links, $file ) {
342
 
343
- if ( plugin_basename( bbpress()->file ) == $file ) {
344
- $settings_link = '<a href="' . add_query_arg( array( 'page' => 'bbpress' ), admin_url( 'options-general.php' ) ) . '">' . __( 'Settings', 'bbpress' ) . '</a>';
345
- array_unshift( $links, $settings_link );
346
- }
347
 
348
- return $links;
 
 
 
 
349
  }
350
 
351
  /**
@@ -359,6 +481,14 @@ class BBP_Admin {
359
  wp_add_dashboard_widget( 'bbp-dashboard-right-now', __( 'Right Now in Forums', 'bbpress' ), 'bbp_dashboard_widget_right_now' );
360
  }
361
 
 
 
 
 
 
 
 
 
362
  /**
363
  * Add some general styling to the admin area
364
  *
@@ -376,6 +506,8 @@ class BBP_Admin {
376
  remove_submenu_page( 'tools.php', 'bbp-repair' );
377
  remove_submenu_page( 'tools.php', 'bbp-converter' );
378
  remove_submenu_page( 'tools.php', 'bbp-reset' );
 
 
379
 
380
  // The /wp-admin/images/ folder
381
  $wp_admin_url = admin_url( 'images/' );
@@ -386,15 +518,65 @@ class BBP_Admin {
386
  $icon32_url = $this->images_url . 'icons32.png?ver=' . $version;
387
  $menu_icon_url_2x = $this->images_url . 'menu-2x.png?ver=' . $version;
388
  $icon32_url_2x = $this->images_url . 'icons32-2x.png?ver=' . $version;
 
 
 
 
 
 
 
 
 
389
 
390
  // Top level menu classes
391
  $forum_class = sanitize_html_class( bbp_get_forum_post_type() );
392
  $topic_class = sanitize_html_class( bbp_get_topic_post_type() );
393
  $reply_class = sanitize_html_class( bbp_get_reply_post_type() ); ?>
394
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  <style type="text/css" media="screen">
396
  /*<![CDATA[*/
397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  #bbp-dashboard-right-now p.sub,
399
  #bbp-dashboard-right-now .table,
400
  #bbp-dashboard-right-now .versions {
@@ -560,7 +742,7 @@ class BBP_Admin {
560
  #menu-posts-<?php echo $topic_class; ?>:hover .wp-menu-image,
561
  #menu-posts-<?php echo $reply_class; ?>:hover .wp-menu-image,
562
 
563
- #menu-posts-<?php echo $forum_class; ?>.wp-has-current-submenu .wp-menu-image,
564
  #menu-posts-<?php echo $topic_class; ?>.wp-has-current-submenu .wp-menu-image,
565
  #menu-posts-<?php echo $reply_class; ?>.wp-has-current-submenu .wp-menu-image {
566
  background: url('<?php echo $menu_icon_url; ?>');
@@ -600,18 +782,23 @@ class BBP_Admin {
600
  #menu-posts-<?php echo $topic_class; ?>:hover .wp-menu-image,
601
  #menu-posts-<?php echo $reply_class; ?>:hover .wp-menu-image,
602
 
603
- #menu-posts-<?php echo $forum_class; ?>.wp-has-current-submenu .wp-menu-image,
604
  #menu-posts-<?php echo $topic_class; ?>.wp-has-current-submenu .wp-menu-image,
605
  #menu-posts-<?php echo $reply_class; ?>.wp-has-current-submenu .wp-menu-image {
606
  background-image: url('<?php echo $menu_icon_url_2x; ?>');
607
  background-size: 100px 64px;
608
  }
 
 
 
 
 
609
  }
610
 
611
  <?php if ( 'bbpress' == get_user_option( 'admin_color' ) ) : ?>
612
 
613
  /* Green Scheme Images */
614
-
615
  .post-com-count {
616
  background-image: url('<?php echo $wp_admin_url; ?>bubble_bg.gif');
617
  }
@@ -952,7 +1139,7 @@ class BBP_Admin {
952
  .rtl .sidebar-name:hover .sidebar-name-arrow {
953
  background-image: url('<?php echo $wp_admin_url; ?>arrows-dark.png');
954
  }
955
-
956
  @media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
957
  .icon32.icon-post,
958
  #icon-edit,
@@ -986,7 +1173,7 @@ class BBP_Admin {
986
  .icon32.icon-site,
987
  #icon-ms-admin {
988
  background-image: url('<?php echo $wp_admin_url; ?>icons32-2x.png?ver=20120412') !important;
989
- background-size: 708px 45px;
990
  }
991
 
992
  .icon16.icon-dashboard,
@@ -1037,7 +1224,294 @@ class BBP_Admin {
1037
  * @uses wp_admin_css_color() To register the color scheme
1038
  */
1039
  public function register_admin_style () {
1040
- wp_admin_css_color( 'bbpress', __( 'Green', 'bbpress' ), $this->styles_url . 'admin.css', array( '#222222', '#006600', '#deece1', '#6eb469' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1041
  }
1042
 
1043
  /** Updaters **************************************************************/
@@ -1064,29 +1538,13 @@ class BBP_Admin {
1064
 
1065
  // Taking action
1066
  switch ( $action ) {
1067
- case 'bbpress-update' :
1068
 
1069
- // @todo more update stuff here, evaluate performance
 
1070
 
1071
- // Remove roles and caps
1072
- bbp_remove_roles();
1073
- bbp_remove_caps();
1074
-
1075
- // Make sure roles, capabilities, and options exist
1076
- bbp_add_roles();
1077
- bbp_add_caps();
1078
- bbp_add_options();
1079
-
1080
- // Ensure any new permalinks are created
1081
- flush_rewrite_rules();
1082
-
1083
- // Ensure proper version in the DB
1084
- bbp_version_bump();
1085
-
1086
- ?>
1087
-
1088
  <p><?php _e( 'All done!', 'bbpress' ); ?></p>
1089
- <a class="button" href="index.php?page=bbpress-update"><?php _e( 'Go Back', 'bbpress' ); ?></a>
1090
 
1091
  <?php
1092
 
@@ -1096,7 +1554,7 @@ class BBP_Admin {
1096
  default : ?>
1097
 
1098
  <p><?php _e( 'You can update your forum through this page. Hit the link below to update.', 'bbpress' ); ?></p>
1099
- <p><a class="button" href="index.php?page=bbpress-update&amp;action=bbpress-update"><?php _e( 'Update Forum', 'bbpress' ); ?></a></p>
1100
 
1101
  <?php break;
1102
 
@@ -1161,14 +1619,27 @@ class BBP_Admin {
1161
 
1162
  // Get the response of the bbPress update on this site
1163
  $response = wp_remote_get(
1164
- trailingslashit( $siteurl ) . 'wp-admin/index.php?page=bbpress-update&step=bbpress-update',
1165
- array( 'timeout' => 120, 'httpversion' => '1.1' )
1166
  );
1167
 
1168
  // Site errored out, no response?
1169
  if ( is_wp_error( $response ) )
1170
  wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: <em>%2$s</em>', 'bbpress' ), $siteurl, $response->get_error_message() ) );
1171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1172
  // Do some actions to allow plugins to do things too
1173
  do_action( 'after_bbpress_upgrade', $response );
1174
  do_action( 'bbp_upgrade_site', $details[ 'blog_id' ] );
76
  */
77
  private function setup_globals() {
78
  $bbp = bbpress();
79
+ $this->admin_dir = trailingslashit( $bbp->includes_dir . 'admin' ); // Admin path
80
+ $this->admin_url = trailingslashit( $bbp->includes_url . 'admin' ); // Admin url
81
+ $this->images_url = trailingslashit( $this->admin_url . 'images' ); // Admin images URL
82
+ $this->styles_url = trailingslashit( $this->admin_url . 'styles' ); // Admin styles URL
83
  }
84
 
85
  /**
89
  * @access private
90
  */
91
  private function includes() {
92
+ require( $this->admin_dir . 'tools.php' );
93
+ require( $this->admin_dir . 'converter.php' );
94
+ require( $this->admin_dir . 'settings.php' );
95
+ require( $this->admin_dir . 'functions.php' );
96
+ require( $this->admin_dir . 'metaboxes.php' );
97
+ require( $this->admin_dir . 'forums.php' );
98
+ require( $this->admin_dir . 'topics.php' );
99
+ require( $this->admin_dir . 'replies.php' );
100
+ require( $this->admin_dir . 'users.php' );
101
  }
102
 
103
  /**
111
  */
112
  private function setup_actions() {
113
 
114
+ // Bail to prevent interfering with the deactivation process
115
+ if ( bbp_is_deactivation() )
116
+ return;
117
+
118
  /** General Actions ***************************************************/
119
 
120
  add_action( 'bbp_admin_menu', array( $this, 'admin_menus' ) ); // Add menu item to settings menu
123
  add_action( 'bbp_register_admin_style', array( $this, 'register_admin_style' ) ); // Add green admin style
124
  add_action( 'bbp_register_admin_settings', array( $this, 'register_admin_settings' ) ); // Add settings
125
  add_action( 'bbp_activation', array( $this, 'new_install' ) ); // Add menu item to settings menu
126
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // Add enqueued JS and CSS
127
  add_action( 'wp_dashboard_setup', array( $this, 'dashboard_widget_right_now' ) ); // Forums 'Right now' Dashboard widget
128
 
129
+ /** Ajax **************************************************************/
130
+
131
+ add_action( 'wp_ajax_bbp_suggest_topic', array( $this, 'suggest_topic' ) );
132
+ add_action( 'wp_ajax_nopriv_bbp_suggest_topic', array( $this, 'suggest_topic' ) );
133
+
134
  /** Filters ***********************************************************/
135
 
136
+ // Modify bbPress's admin links
137
+ add_filter( 'plugin_action_links', array( $this, 'modify_plugin_action_links' ), 10, 2 );
138
+
139
+ // Map settings capabilities
140
+ add_filter( 'bbp_map_meta_caps', array( $this, 'map_settings_meta_caps' ), 10, 4 );
141
+
142
+ // Hide the theme compat package selection
143
+ add_filter( 'bbp_admin_get_settings_sections', array( $this, 'hide_theme_compat_packages' ) );
144
 
145
  /** Network Admin *****************************************************/
146
 
167
  $hooks = array();
168
 
169
  // These are later removed in admin_head
170
+ if ( current_user_can( 'bbp_tools_page' ) ) {
171
+ if ( current_user_can( 'bbp_tools_repair_page' ) ) {
172
  $hooks[] = add_management_page(
173
  __( 'Repair Forums', 'bbpress' ),
174
  __( 'Forum Repair', 'bbpress' ),
178
  );
179
  }
180
 
181
+ if ( current_user_can( 'bbp_tools_import_page' ) ) {
182
  $hooks[] = add_management_page(
183
  __( 'Import Forums', 'bbpress' ),
184
  __( 'Forum Import', 'bbpress' ),
188
  );
189
  }
190
 
191
+ if ( current_user_can( 'bbp_tools_reset_page' ) ) {
192
  $hooks[] = add_management_page(
193
  __( 'Reset Forums', 'bbpress' ),
194
  __( 'Forum Reset', 'bbpress' ),
214
  }
215
 
216
  // Are settings enabled?
217
+ if ( current_user_can( 'bbp_settings_page' ) ) {
218
  add_options_page(
219
  __( 'Forums', 'bbpress' ),
220
  __( 'Forums', 'bbpress' ),
223
  'bbp_admin_settings'
224
  );
225
  }
226
+
227
+ // These are later removed in admin_head
228
+ if ( current_user_can( 'bbp_about_page' ) ) {
229
+
230
+ // About
231
+ add_dashboard_page(
232
+ __( 'Welcome to bbPress', 'bbpress' ),
233
+ __( 'Welcome to bbPress', 'bbpress' ),
234
+ $this->minimum_capability,
235
+ 'bbp-about',
236
+ array( $this, 'about_screen' )
237
+ );
238
+
239
+ // Credits
240
+ add_dashboard_page(
241
+ __( 'Welcome to bbPress', 'bbpress' ),
242
+ __( 'Welcome to bbPress', 'bbpress' ),
243
+ $this->minimum_capability,
244
+ 'bbp-credits',
245
+ array( $this, 'credits_screen' )
246
+ );
247
+ }
248
+
249
+ // Bail if plugin is not network activated
250
+ if ( ! is_plugin_active_for_network( bbpress()->basename ) )
251
+ return;
252
+
253
+ add_submenu_page(
254
+ 'index.php',
255
+ __( 'Update Forums', 'bbpress' ),
256
+ __( 'Update Forums', 'bbpress' ),
257
+ 'manage_network',
258
+ 'bbp-update',
259
+ array( $this, 'update_screen' )
260
+ );
261
  }
262
 
263
  /**
267
  * @uses add_submenu_page() To add the Update Forums page in Updates
268
  */
269
  public function network_admin_menus() {
270
+
271
+ // Bail if plugin is not network activated
272
+ if ( ! is_plugin_active_for_network( bbpress()->basename ) )
273
+ return;
274
+
275
  add_submenu_page(
276
  'upgrade.php',
277
  __( 'Update Forums', 'bbpress' ),
286
  * If this is a new installation, create some initial forum content.
287
  *
288
  * @since bbPress (r3767)
289
+ * @return type
290
  */
291
  public static function new_install() {
292
  if ( !bbp_is_install() )
308
  public static function register_admin_settings() {
309
 
310
  // Bail if no sections available
311
+ $sections = bbp_admin_get_settings_sections();
312
+ if ( empty( $sections ) )
313
  return false;
314
 
315
  // Loop through sections
316
+ foreach ( (array) $sections as $section_id => $section ) {
317
 
318
  // Only proceed if current user can see this section
319
+ if ( ! current_user_can( $section_id ) )
320
  continue;
321
 
322
  // Only add section and fields if section has fields
323
+ $fields = bbp_admin_get_settings_fields_for_section( $section_id );
324
+ if ( empty( $fields ) )
325
+ continue;
326
 
327
+ // Add the section
328
+ add_settings_section( $section_id, $section['title'], $section['callback'], $section['page'] );
329
 
330
+ // Loop through fields for this section
331
+ foreach ( (array) $fields as $field_id => $field ) {
332
 
333
+ // Add the field
334
+ add_settings_field( $field_id, $field['title'], $field['callback'], $section['page'], $section_id, $field['args'] );
335
 
336
+ // Register the setting
337
+ register_setting( $section['page'], $field_id, $field['sanitize_callback'] );
 
338
  }
339
  }
340
  }
341
 
342
+ /**
343
+ * Maps settings capabilities
344
+ *
345
+ * @since bbPress (r4242)
346
+ *
347
+ * @param array $caps Capabilities for meta capability
348
+ * @param string $cap Capability name
349
+ * @param int $user_id User id
350
+ * @param mixed $args Arguments
351
+ * @uses get_post() To get the post
352
+ * @uses get_post_type_object() To get the post type object
353
+ * @uses apply_filters() Calls 'bbp_map_meta_caps' with caps, cap, user id and
354
+ * args
355
+ * @return array Actual capabilities for meta capability
356
+ */
357
+ public static function map_settings_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
358
+
359
+ // What capability is being checked?
360
+ switch ( $cap ) {
361
+
362
+ // BuddyPress
363
+ case 'bbp_settings_buddypress' :
364
+ if ( ( is_plugin_active( 'buddypress/bp-loader.php' ) && defined( 'BP_VERSION' ) ) && is_super_admin() ) {
365
+ $caps = array( bbpress()->admin->minimum_capability );
366
+ } else {
367
+ $caps = array( 'do_not_allow' );
368
+ }
369
+
370
+ break;
371
+
372
+ // Akismet
373
+ case 'bbp_settings_akismet' :
374
+ if ( ( is_plugin_active( 'akismet/akismet.php' ) && defined( 'AKISMET_VERSION' ) ) && is_super_admin() ) {
375
+ $caps = array( bbpress()->admin->minimum_capability );
376
+ } else {
377
+ $caps = array( 'do_not_allow' );
378
+ }
379
+
380
+ break;
381
+
382
+ // bbPress
383
+ case 'bbp_about_page' : // About and Credits
384
+ case 'bbp_tools_page' : // Tools Page
385
+ case 'bbp_tools_repair_page' : // Tools - Repair Page
386
+ case 'bbp_tools_import_page' : // Tools - Import Page
387
+ case 'bbp_tools_reset_page' : // Tools - Reset Page
388
+ case 'bbp_settings_page' : // Settings Page
389
+ case 'bbp_settings_main' : // Settings - General
390
+ case 'bbp_settings_theme_compat' : // Settings - Theme compat
391
+ case 'bbp_settings_root_slugs' : // Settings - Root slugs
392
+ case 'bbp_settings_single_slugs' : // Settings - Single slugs
393
+ case 'bbp_settings_per_page' : // Settings - Single slugs
394
+ case 'bbp_settings_per_page_rss' : // Settings - Single slugs
395
+ $caps = array( bbpress()->admin->minimum_capability );
396
+ break;
397
+ }
398
+
399
+ return apply_filters( 'bbp_map_settings_meta_caps', $caps, $cap, $user_id, $args );
400
+ }
401
+
402
  /**
403
  * Register the importers
404
  *
457
  * @param string $file Current plugin basename
458
  * @return array Processed links
459
  */
460
+ public static function modify_plugin_action_links( $links, $file ) {
461
 
462
+ // Return normal links if not bbPress
463
+ if ( plugin_basename( bbpress()->file ) != $file )
464
+ return $links;
 
465
 
466
+ // Add a few links to the existing links array
467
+ return array_merge( $links, array(
468
+ 'settings' => '<a href="' . add_query_arg( array( 'page' => 'bbpress' ), admin_url( 'options-general.php' ) ) . '">' . esc_html__( 'Settings', 'bbpress' ) . '</a>',
469
+ 'about' => '<a href="' . add_query_arg( array( 'page' => 'bbp-about' ), admin_url( 'index.php' ) ) . '">' . esc_html__( 'About', 'bbpress' ) . '</a>'
470
+ ) );
471
  }
472
 
473
  /**
481
  wp_add_dashboard_widget( 'bbp-dashboard-right-now', __( 'Right Now in Forums', 'bbpress' ), 'bbp_dashboard_widget_right_now' );
482
  }
483
 
484
+ /**
485
+ * Enqueue any admin scripts we might need
486
+ * @since bbPress (4260)
487
+ */
488
+ public function enqueue_scripts() {
489
+ wp_enqueue_script( 'suggest' );
490
+ }
491
+
492
  /**
493
  * Add some general styling to the admin area
494
  *
506
  remove_submenu_page( 'tools.php', 'bbp-repair' );
507
  remove_submenu_page( 'tools.php', 'bbp-converter' );
508
  remove_submenu_page( 'tools.php', 'bbp-reset' );
509
+ remove_submenu_page( 'index.php', 'bbp-about' );
510
+ remove_submenu_page( 'index.php', 'bbp-credits' );
511
 
512
  // The /wp-admin/images/ folder
513
  $wp_admin_url = admin_url( 'images/' );
518
  $icon32_url = $this->images_url . 'icons32.png?ver=' . $version;
519
  $menu_icon_url_2x = $this->images_url . 'menu-2x.png?ver=' . $version;
520
  $icon32_url_2x = $this->images_url . 'icons32-2x.png?ver=' . $version;
521
+ $badge_url = $this->images_url . 'badge.png?ver=' . $version;
522
+ $badge_url_2x = $this->images_url . 'badge-2x.png?ver=' . $version;
523
+
524
+ // The image size changed in WordPress 3.5
525
+ if ( function_exists( 'wp_enqueue_media' ) ) {
526
+ $icon32_size = '756px 45px';
527
+ } else {
528
+ $icon32_size = '708px 45px';
529
+ }
530
 
531
  // Top level menu classes
532
  $forum_class = sanitize_html_class( bbp_get_forum_post_type() );
533
  $topic_class = sanitize_html_class( bbp_get_topic_post_type() );
534
  $reply_class = sanitize_html_class( bbp_get_reply_post_type() ); ?>
535
 
536
+ <script type="text/javascript">
537
+ jQuery(document).ready(function() {
538
+
539
+ var bbp_topic_id = jQuery( '#bbp_topic_id' );
540
+
541
+ bbp_topic_id.suggest( ajaxurl + '?action=bbp_suggest_topic', {
542
+ onSelect: function() {
543
+ var value = this.value;
544
+ bbp_topic_id.val( value.substr( 0, value.indexOf( ' ' ) ) );
545
+ }
546
+ } );
547
+ });
548
+ </script>
549
+
550
  <style type="text/css" media="screen">
551
  /*<![CDATA[*/
552
 
553
+ /* Kludge for too-wide forums dropdown */
554
+ #poststuff #bbp_forum_attributes select#parent_id,
555
+ #poststuff #bbp_topic_attributes select#parent_id,
556
+ #poststuff #bbp_reply_attributes select#bbp_forum_id {
557
+ max-width: 170px;
558
+ }
559
+
560
+ /* Version Badge */
561
+
562
+ .bbp-badge {
563
+ padding-top: 142px;
564
+ height: 50px;
565
+ width: 173px;
566
+ color: #fafafa;
567
+ font-weight: bold;
568
+ font-size: 14px;
569
+ text-align: center;
570
+ margin: 0 -5px;
571
+ background: url('<?php echo $badge_url; ?>') no-repeat;
572
+ }
573
+
574
+ .about-wrap .bbp-badge {
575
+ position: absolute;
576
+ top: 0;
577
+ right: 0;
578
+ }
579
+
580
  #bbp-dashboard-right-now p.sub,
581
  #bbp-dashboard-right-now .table,
582
  #bbp-dashboard-right-now .versions {
742
  #menu-posts-<?php echo $topic_class; ?>:hover .wp-menu-image,
743
  #menu-posts-<?php echo $reply_class; ?>:hover .wp-menu-image,
744
 
745
+ #menu-posts-<?php echo $forum_class; ?>.wp-has-current-submenu .wp-menu-image,
746
  #menu-posts-<?php echo $topic_class; ?>.wp-has-current-submenu .wp-menu-image,
747
  #menu-posts-<?php echo $reply_class; ?>.wp-has-current-submenu .wp-menu-image {
748
  background: url('<?php echo $menu_icon_url; ?>');
782
  #menu-posts-<?php echo $topic_class; ?>:hover .wp-menu-image,
783
  #menu-posts-<?php echo $reply_class; ?>:hover .wp-menu-image,
784
 
785
+ #menu-posts-<?php echo $forum_class; ?>.wp-has-current-submenu .wp-menu-image,
786
  #menu-posts-<?php echo $topic_class; ?>.wp-has-current-submenu .wp-menu-image,
787
  #menu-posts-<?php echo $reply_class; ?>.wp-has-current-submenu .wp-menu-image {
788
  background-image: url('<?php echo $menu_icon_url_2x; ?>');
789
  background-size: 100px 64px;
790
  }
791
+
792
+ .bbp-badge {
793
+ background-image: url('<?php echo $badge_url_2x; ?>');
794
+ background-size: 173px 194px;
795
+ }
796
  }
797
 
798
  <?php if ( 'bbpress' == get_user_option( 'admin_color' ) ) : ?>
799
 
800
  /* Green Scheme Images */
801
+
802
  .post-com-count {
803
  background-image: url('<?php echo $wp_admin_url; ?>bubble_bg.gif');
804
  }
1139
  .rtl .sidebar-name:hover .sidebar-name-arrow {
1140
  background-image: url('<?php echo $wp_admin_url; ?>arrows-dark.png');
1141
  }
1142
+
1143
  @media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
1144
  .icon32.icon-post,
1145
  #icon-edit,
1173
  .icon32.icon-site,
1174
  #icon-ms-admin {
1175
  background-image: url('<?php echo $wp_admin_url; ?>icons32-2x.png?ver=20120412') !important;
1176
+ background-size: <?php echo $icon32_size; ?>
1177
  }
1178
 
1179
  .icon16.icon-dashboard,
1224
  * @uses wp_admin_css_color() To register the color scheme
1225
  */
1226
  public function register_admin_style () {
1227
+
1228
+ // Updated admin color scheme CSS
1229
+ if ( function_exists( 'wp_enqueue_media' ) ) {
1230
+ $green_scheme = $this->styles_url . 'green.css';
1231
+
1232
+ } else {
1233
+ $green_scheme = $this->styles_url . 'green-34.css';
1234
+ }
1235
+
1236
+ // Register the green scheme
1237
+ wp_admin_css_color( 'bbpress', esc_html_x( 'Green', 'admin color scheme', 'bbpress' ), $green_scheme, array( '#222222', '#006600', '#deece1', '#6eb469' ) );
1238
+ }
1239
+
1240
+ /**
1241
+ * Hide theme compat package selection if only 1 package is registered
1242
+ *
1243
+ * @since bbPress (r4315)
1244
+ *
1245
+ * @param array $sections Forums settings sections
1246
+ * @return array
1247
+ */
1248
+ public function hide_theme_compat_packages( $sections = array() ) {
1249
+ if ( count( bbpress()->theme_compat->packages ) <= 1 )
1250
+ unset( $sections['bbp_settings_theme_compat'] );
1251
+
1252
+ return $sections;
1253
+ }
1254
+
1255
+ /** Ajax ******************************************************************/
1256
+
1257
+ /**
1258
+ * Ajax action for facilitating the forum auto-suggest
1259
+ *
1260
+ * @since bbPress (r4261)
1261
+ *
1262
+ * @uses get_posts()
1263
+ * @uses bbp_get_topic_post_type()
1264
+ * @uses bbp_get_topic_id()
1265
+ * @uses bbp_get_topic_title()
1266
+ */
1267
+ public function suggest_topic() {
1268
+
1269
+ // TRy to get some topics
1270
+ $topics = get_posts( array(
1271
+ 's' => like_escape( $_REQUEST['q'] ),
1272
+ 'post_type' => bbp_get_topic_post_type()
1273
+ ) );
1274
+
1275
+ // If we found some topics, loop through and display them
1276
+ if ( ! empty( $topics ) ) {
1277
+ foreach ( (array) $topics as $post ) {
1278
+ echo sprintf( __( '%s - %s', 'bbpress' ), bbp_get_topic_id( $post->ID ), bbp_get_topic_title( $post->ID ) ) . "\n";
1279
+ }
1280
+ }
1281
+ die();
1282
+ }
1283
+
1284
+ /** About *****************************************************************/
1285
+
1286
+ /**
1287
+ * Output the about screen
1288
+ *
1289
+ * @since bbPress (r4159)
1290
+ */
1291
+ public function about_screen() {
1292
+
1293
+ list( $display_version ) = explode( '-', bbp_get_version() ); ?>
1294
+
1295
+ <div class="wrap about-wrap">
1296
+ <h1><?php printf( __( 'Welcome to bbPress %s' ), $display_version ); ?></h1>
1297
+ <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! bbPress %s is ready to make your community a safer, faster, and better looking place to hang out!' ), $display_version ); ?></div>
1298
+ <div class="bbp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
1299
+
1300
+ <h2 class="nav-tab-wrapper">
1301
+ <a class="nav-tab nav-tab-active" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-about' ), 'index.php' ) ) ); ?>">
1302
+ <?php _e( 'What&#8217;s New' ); ?>
1303
+ </a><a class="nav-tab" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-credits' ), 'index.php' ) ) ); ?>">
1304
+ <?php _e( 'Credits' ); ?>
1305
+ </a>
1306
+ </h2>
1307
+
1308
+ <div class="changelog">
1309
+ <h3><?php _e( 'In-depth User Profiles', 'bbpress' ); ?></h3>
1310
+
1311
+ <div class="feature-section">
1312
+ <h4><?php _e( 'User Details', 'bbpress' ); ?></h4>
1313
+ <p><?php _e( 'Forum profiles include the details of your forum activity, including your topics and replies, subscriptions, and favorites.', 'bbpress' ); ?></p>
1314
+
1315
+ <h4><?php _e( 'Easy Updating', 'bbpress' ); ?></h4>
1316
+ <p><?php _e( 'You can easily update your profile without leaving bbPress.', 'bbpress' ); ?></p>
1317
+ </div>
1318
+ </div>
1319
+
1320
+ <div class="changelog">
1321
+ <h3><?php _e( 'Theme Compatability', 'bbpress' ); ?></h3>
1322
+
1323
+ <div class="feature-section">
1324
+ <h4><?php _e( 'Twenty Twelve', 'bbpress' ); ?></h4>
1325
+ <p><?php _e( 'Updated default templates are now Twenty Twelve compatible, and we refreshed our CSS to better integrate with other popular themes, too.', 'bbpress' ); ?></p>
1326
+ </div>
1327
+ </div>
1328
+
1329
+ <div class="changelog">
1330
+ <h3><?php _e( 'Improved User Management', 'bbpress' ); ?></h3>
1331
+
1332
+ <div class="feature-section">
1333
+ <h4><?php _e( 'Dynamic User Roles and Capabilities', 'bbpress' ); ?></h4>
1334
+ <p><?php _e( 'bbPress now includes some fancy user-roles with smart default capabilities to help you manage your forums. New roles include Key Master (for complete administrative access), Moderator, and Participant for regular forum users.', 'bbpress' ); ?></p>
1335
+
1336
+ <h4><?php _e( 'Manage Forum Users from WordPress', 'bbpress' ); ?></h4>
1337
+ <p><?php _e( 'You can assign Forums roles to users individually, or bulk update them from the WordPress Users page. Users automatically start out as forum participants.', 'bbpress' ); ?></p>
1338
+ </div>
1339
+ </div>
1340
+
1341
+ <div class="changelog">
1342
+ <h3><?php _e( 'Better BuddyPress Integration', 'bbpress' ); ?></h3>
1343
+
1344
+ <div class="feature-section">
1345
+ <h4><?php _e( 'Use bbPress for Your BuddyPress Group Forums', 'bbpress' ); ?></h4>
1346
+ <p><?php _e( 'You can now use bbPress to manage your BuddyPress Group Forums, allowing for seamless integration and improved plugin performance. Plugins developed for bbPress can now be extended to improve the BuddyPress Group Forums experience.', 'bbpress' ); ?></p>
1347
+
1348
+ <h4><?php _e( 'Activity Stream Syncing', 'bbpress' ); ?></h4>
1349
+ <p><?php _e( 'bbPress now keeps track of changes to topics and replies and keeps their corresponding BuddyPress Activity Stream updates synced.', 'bbpress' ); ?></p>
1350
+ </div>
1351
+ </div>
1352
+
1353
+ <div class="changelog">
1354
+ <h3><?php _e( 'Under the Hood', 'bbpress' ); ?></h3>
1355
+
1356
+ <div class="feature-section three-col">
1357
+ <div>
1358
+ <h4><?php _e( 'Template Logic', 'bbpress' ); ?></h4>
1359
+ <p><?php _e( 'New functions and template stacks are in place to help plugin developers extend bbPress further.', 'bbpress' ); ?></p>
1360
+
1361
+ <h4><?php _e( 'Plugin Directory Structure', 'bbpress' ); ?></h4>
1362
+ <p><?php _e( 'We simplified the bbPress plugin directory structure, making it easier for plugin developers to find the relevant code.', 'bbpress' ); ?></p>
1363
+ </div>
1364
+
1365
+ <div>
1366
+ <h4><?php _e( 'Autocomplete', 'bbpress' ); ?></h4>
1367
+ <p><?php _e( 'In WordPress Admin, you now select a parent forum or topic via autocomplete rather than a dropdown.', 'bbpress' ); ?></p>
1368
+
1369
+ <h4><?php _e( 'Fancy Editor Support', 'bbpress' ); ?></h4>
1370
+ <p><?php _e( 'We improved our support of the Fancy Editor, giving forum users a better experience.', 'bbpress' ); ?></p>
1371
+ </div>
1372
+
1373
+ <div class="last-feature">
1374
+ <h4><?php _e( 'WordPress 3.5-ready', 'bbpress' ); ?></h4>
1375
+ <p><?php _e( 'bbPress 2.2 has been thoroughly tested against the ongoing development of WordPress 3.5.', 'bbpress' ); ?></p>
1376
+ </div>
1377
+ </div>
1378
+ </div>
1379
+
1380
+ <div class="return-to-dashboard">
1381
+ <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php _e( 'Go to Forum Settings' ); ?></a>
1382
+ </div>
1383
+
1384
+ </div>
1385
+
1386
+ <?php
1387
+ }
1388
+
1389
+ /**
1390
+ * Output the credits screen
1391
+ *
1392
+ * Hardcoding this in here is pretty janky. It's fine for 2.2, but we'll
1393
+ * want to leverage api.wordpress.org eventually.
1394
+ *
1395
+ * @since bbPress (r4159)
1396
+ */
1397
+ public function credits_screen() {
1398
+
1399
+ list( $display_version ) = explode( '-', bbp_get_version() ); ?>
1400
+
1401
+ <div class="wrap about-wrap">
1402
+ <h1><?php printf( __( 'Welcome to bbPress %s' ), $display_version ); ?></h1>
1403
+ <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! bbPress %s is ready to make your community a safer, faster, and better looking place to hang out!' ), $display_version ); ?></div>
1404
+ <div class="bbp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
1405
+
1406
+ <h2 class="nav-tab-wrapper">
1407
+ <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-about' ), 'index.php' ) ) ); ?>" class="nav-tab">
1408
+ <?php _e( 'What&#8217;s New' ); ?>
1409
+ </a><a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-credits' ), 'index.php' ) ) ); ?>" class="nav-tab nav-tab-active">
1410
+ <?php _e( 'Credits' ); ?>
1411
+ </a>
1412
+ </h2>
1413
+
1414
+ <p class="about-description"><?php _e( 'bbPress is created by a worldwide swarm of busy, busy bees.', 'bbpress' ); ?></p>
1415
+
1416
+ <h4 class="wp-people-group"><?php _e( 'Project Leaders', 'bbpress' ); ?></h4>
1417
+ <ul class="wp-people-group " id="wp-people-group-project-leaders">
1418
+ <li class="wp-person" id="wp-person-matt">
1419
+ <a href="http://profiles.wordpress.org/matt"><img src="http://0.gravatar.com/avatar/767fc9c115a1b989744c755db47feb60?s=60" class="gravatar" alt="Matt Mullenweg" /></a>
1420
+ <a class="web" href="http://profiles.wordpress.org/matt">Matt Mullenweg</a>
1421
+ <span class="title"><?php _e( 'Founding Developer', 'bbpress' ); ?></span>
1422
+ </li>
1423
+ <li class="wp-person" id="wp-person-johnjamesjacoby">
1424
+ <a href="http://profiles.wordpress.org/johnjamesjacoby"><img src="http://0.gravatar.com/avatar/81ec16063d89b162d55efe72165c105f?s=60" class="gravatar" alt="John James Jacoby" /></a>
1425
+ <a class="web" href="http://profiles.wordpress.org/johnjamesjacoby">John James Jacoby</a>
1426
+ <span class="title"><?php _e( 'Lead Developer', 'bbpress' ); ?></span>
1427
+ </li>
1428
+ </ul>
1429
+
1430
+ <h4 class="wp-people-group"><?php _e( 'Contributing Developers', 'bbpress' ); ?></h4>
1431
+ <ul class="wp-people-group " id="wp-people-group-contributing-developers">
1432
+ <li class="wp-person" id="wp-person-jmdodd">
1433
+ <a href="http://profiles.wordpress.org/jmdodd"><img src="http://0.gravatar.com/avatar/6a7c997edea340616bcc6d0fe03f65dd?s=60" class="gravatar" alt="Jennifer M. Dodd" /></a>
1434
+ <a class="web" href="http://profiles.wordpress.org/jmdodd">Jennifer M. Dodd</a>
1435
+ <span class="title"></span>
1436
+ </li>
1437
+ <li class="wp-person" id="wp-person-jaredatch">
1438
+ <a href="http://profiles.wordpress.org/jaredatch"><img src="http://0.gravatar.com/avatar/e341eca9e1a85dcae7127044301b4363?s=60" class="gravatar" alt="Jared Atchison" /></a>
1439
+ <a class="web" href="http://profiles.wordpress.org/jaredatch">Jared Atchison</a>
1440
+ <span class="title"></span>
1441
+ </li>
1442
+ <li class="wp-person" id="wp-person-gautamgupta">
1443
+ <a href="http://profiles.wordpress.org/gautamgupta"><img src="http://0.gravatar.com/avatar/b0810422cbe6e4eead4def5ae7a90b34?s=60" class="gravatar" alt="Gautam Gupta" /></a>
1444
+ <a class="web" href="http://profiles.wordpress.org/gautamgupta">Gautam Gupta</a>
1445
+ <span class="title"></span>
1446
+ </li>
1447
+ </ul>
1448
+
1449
+ <h4 class="wp-people-group"><?php _e( 'Codex Rockstars', 'bbpress' ); ?></h4>
1450
+ <ul class="wp-people-group " id="wp-people-group-codex-rockstars">
1451
+ <li class="wp-person" id="wp-person-masonjames">
1452
+ <a href="http://profiles.wordpress.org/masonjames"><img src="http://0.gravatar.com/avatar/99dee4d5287d0f9e26ff72e7228d97ac?s=60" class="gravatar" alt="Mason James" /></a>
1453
+ <a class="web" href="http://profiles.wordpress.org/masonjames">Mason James</a>
1454
+ <span class="title"></span>
1455
+ </li>
1456
+ <li class="wp-person" id="wp-person-wordsforwp">
1457
+ <a href="http://profiles.wordpress.org/wordsforwp"><img src="http://0.gravatar.com/avatar/5437119b446adad1af813c44944e6c9c?s=60" class="gravatar" alt="Siobhan McKeown" /></a>
1458
+ <a class="web" href="http://profiles.wordpress.org/wordsforwp">Siobhan McKeown</a>
1459
+ <span class="title"></span>
1460
+ </li>
1461
+ <li class="wp-person" id="wp-person-JarretC">
1462
+ <a href="http://profiles.wordpress.org/JarretC"><img src="http://0.gravatar.com/avatar/e00501bf782b42d5db19ff75fca14f6a?s=60" class="gravatar" alt="Jarret Cade" /></a>
1463
+ <a class="web" href="http://profiles.wordpress.org/JarretC">Jarret Cade</a>
1464
+ <span class="title"></span>
1465
+ </li>
1466
+ </ul>
1467
+
1468
+ <h4 class="wp-people-group"><?php _e( 'Core Contributors to bbPress 2.2', 'bbpress' ); ?></h4>
1469
+ <p class="wp-credits-list">
1470
+ <a href="http://profiles.wordpress.org/alexvorn2">alexvorn2</a>,
1471
+ <a href="http://profiles.wordpress.org/anointed">anointed</a>,
1472
+ <a href="http://profiles.wordpress.org/boonebgorges">boonebgorges</a>,
1473
+ <a href="http://profiles.wordpress.org/chexee">chexee</a>,
1474
+ <a href="http://profiles.wordpress.org/cnorris23">cnorris23</a>,
1475
+ <a href="http://profiles.wordpress.org/DanielJuhl">DanielJuhl</a>,
1476
+ <a href="http://profiles.wordpress.org/DanielJuhl">daveshine</a>,
1477
+ <a href="http://profiles.wordpress.org/dimadin">dimadin</a>,
1478
+ <a href="http://profiles.wordpress.org/DJPaul">DJPaul</a>,
1479
+ <a href="http://profiles.wordpress.org/duck_">duck_</a>,
1480
+ <a href="http://profiles.wordpress.org/gawain">gawain</a>,
1481
+ <a href="http://profiles.wordpress.org/iamzippy">iamzippy</a>,
1482
+ <a href="http://profiles.wordpress.org/isaacchapman">isaacchapman</a>,
1483
+ <a href="http://profiles.wordpress.org/jane">jane</a>,
1484
+ <a href="http://profiles.wordpress.org/jkudish">jkudish</a>,
1485
+ <a href="http://profiles.wordpress.org/mamaduka">mamaduka</a>,
1486
+ <a href="http://profiles.wordpress.org/mercime">mercime</a>,
1487
+ <a href="http://profiles.wordpress.org/mesayre">mesayre</a>,
1488
+ <a href="http://profiles.wordpress.org/mordauk">mordauk</a>,
1489
+ <a href="http://profiles.wordpress.org/MZAWeb">MZAWeb</a>,
1490
+ <a href="http://profiles.wordpress.org/netweb">netweb</a>,
1491
+ <a href="http://profiles.wordpress.org/nexia">nexia</a>,
1492
+ <a href="http://profiles.wordpress.org/Omicron7">Omicron7</a>,
1493
+ <a href="http://profiles.wordpress.org/otto42">otto42</a>,
1494
+ <a href="http://profiles.wordpress.org/pavelevap">pavelevap</a>,
1495
+ <a href="http://profiles.wordpress.org/plescheff">plescheff</a>,
1496
+ <a href="http://profiles.wordpress.org/scribu">scribu</a>,
1497
+ <a href="http://profiles.wordpress.org/sorich87">sorich87</a>,
1498
+ <a href="http://profiles.wordpress.org/SteveAtty">SteveAtty</a>,
1499
+ <a href="http://profiles.wordpress.org/tmoorewp">tmoorewp</a>,
1500
+ <a href="http://profiles.wordpress.org/tott">tott</a>,
1501
+ <a href="http://profiles.wordpress.org/tungdo">tungdo</a>,
1502
+ <a href="http://profiles.wordpress.org/vibol">vibol</a>,
1503
+ <a href="http://profiles.wordpress.org/wonderboymusic">wonderboymusic</a>,
1504
+ <a href="http://profiles.wordpress.org/westi">westi</a>,
1505
+ <a href="http://profiles.wordpress.org/xiosen">xiosen</a>,
1506
+ </p>
1507
+
1508
+ <div class="return-to-dashboard">
1509
+ <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php _e( 'Go to Forum Settings' ); ?></a>
1510
+ </div>
1511
+
1512
+ </div>
1513
+
1514
+ <?php
1515
  }
1516
 
1517
  /** Updaters **************************************************************/
1538
 
1539
  // Taking action
1540
  switch ( $action ) {
1541
+ case 'bbp-update' :
1542
 
1543
+ // Run the full updater
1544
+ bbp_version_updater(); ?>
1545
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1546
  <p><?php _e( 'All done!', 'bbpress' ); ?></p>
1547
+ <a class="button" href="index.php?page=bbp-update"><?php _e( 'Go Back', 'bbpress' ); ?></a>
1548
 
1549
  <?php
1550
 
1554
  default : ?>
1555
 
1556
  <p><?php _e( 'You can update your forum through this page. Hit the link below to update.', 'bbpress' ); ?></p>
1557
+ <p><a class="button" href="index.php?page=bbp-update&amp;action=bbp-update"><?php _e( 'Update Forum', 'bbpress' ); ?></a></p>
1558
 
1559
  <?php break;
1560
 
1619
 
1620
  // Get the response of the bbPress update on this site
1621
  $response = wp_remote_get(
1622
+ trailingslashit( $siteurl ) . 'wp-admin/index.php?page=bbp-update&action=bbp-update',
1623
+ array( 'timeout' => 30, 'httpversion' => '1.1' )
1624
  );
1625
 
1626
  // Site errored out, no response?
1627
  if ( is_wp_error( $response ) )
1628
  wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: <em>%2$s</em>', 'bbpress' ), $siteurl, $response->get_error_message() ) );
1629
 
1630
+ // Switch to the new blog
1631
+ switch_to_blog( $details[ 'blog_id' ] );
1632
+
1633
+ $basename = bbpress()->basename;
1634
+
1635
+ // Run the updater on this site
1636
+ if ( is_plugin_active_for_network( $basename ) || is_plugin_active( $basename ) ) {
1637
+ bbp_version_updater();
1638
+ }
1639
+
1640
+ // restore original blog
1641
+ restore_current_blog();
1642
+
1643
  // Do some actions to allow plugins to do things too
1644
  do_action( 'after_bbpress_upgrade', $response );
1645
  do_action( 'bbp_upgrade_site', $details[ 'blog_id' ] );
bbp-admin/bbp-converter.php → includes/admin/converter.php RENAMED
@@ -693,11 +693,10 @@ abstract class BBP_Converter_Base {
693
 
694
  /** User Section ******************************************************/
695
 
696
- $default_role = ( is_multisite() && get_option( '_bbp_allow_global_access' ) ) ? bbp_get_participant_role() : get_option( 'default_role' );
697
  $this->field_map[] = array(
698
  'to_type' => 'user',
699
  'to_fieldname' => 'role',
700
- 'default' => $default_role
701
  );
702
  }
703
 
@@ -939,6 +938,10 @@ abstract class BBP_Converter_Base {
939
 
940
  add_post_meta( $post_id, $key, $value, true );
941
 
 
 
 
 
942
  // Topics need an extra bit of metadata
943
  // to be keyed to the new post_id
944
  if ( ( 'topic' == $to_type ) && ( '_bbp_topic_id' == $key ) ) {
@@ -1238,7 +1241,7 @@ abstract class BBP_Converter_Base {
1238
  }
1239
 
1240
  protected function callback_html( $field ) {
1241
- require_once( bbpress()->admin->admin_dir . 'bbp-parser.php' );
1242
  $bbcode = BBCode::getInstance();
1243
  return html_entity_decode( $bbcode->Parse( $field ) );
1244
  }
693
 
694
  /** User Section ******************************************************/
695
 
 
696
  $this->field_map[] = array(
697
  'to_type' => 'user',
698
  'to_fieldname' => 'role',
699
+ 'default' => get_option( 'default_role' )
700
  );
701
  }
702
 
938
 
939
  add_post_meta( $post_id, $key, $value, true );
940
 
941
+ // Forums need to save their old ID for group forum association
942
+ if ( ( 'forum' == $to_type ) && ( '_bbp_forum_id' == $key ) )
943
+ add_post_meta( $post_id, '_bbp_old_forum_id', $value );
944
+
945
  // Topics need an extra bit of metadata
946
  // to be keyed to the new post_id
947
  if ( ( 'topic' == $to_type ) && ( '_bbp_topic_id' == $key ) ) {
1241
  }
1242
 
1243
  protected function callback_html( $field ) {
1244
+ require_once( bbpress()->admin->admin_dir . 'parser.php' );
1245
  $bbcode = BBCode::getInstance();
1246
  return html_entity_decode( $bbcode->Parse( $field ) );
1247
  }
{bbp-admin → includes/admin}/converters/Example.php RENAMED
File without changes
{bbp-admin → includes/admin}/converters/Invision.php RENAMED
File without changes
{bbp-admin → includes/admin}/converters/bbPress1.php RENAMED
File without changes
{bbp-admin → includes/admin}/converters/index.php RENAMED
File without changes
{bbp-admin → includes/admin}/converters/phpBB.php RENAMED
File without changes
includes/admin/converters/vBulletin.php ADDED
@@ -0,0 +1,448 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * vBulletin Converter
5
+ *
6
+ * @since bbPress (r)
7
+ */
8
+ class vBulletin extends BBP_Converter_Base {
9
+
10
+ /**
11
+ * Main constructor
12
+ *
13
+ * @uses vBulletin::setup_globals()
14
+ */
15
+ function __construct() {
16
+ parent::__construct();
17
+ $this->setup_globals();
18
+ }
19
+
20
+ /**
21
+ * Sets up the field mappings
22
+ */
23
+ private function setup_globals() {
24
+
25
+ /** Forum Section *****************************************************/
26
+
27
+ // Forum id (Stored in postmeta)
28
+ $this->field_map[] = array(
29
+ 'from_tablename' => 'forum',
30
+ 'from_fieldname' => 'forumid',
31
+ 'to_type' => 'forum',
32
+ 'to_fieldname' => '_bbp_forum_id'
33
+ );
34
+
35
+ // Forum parent id (If no parent, than 0. Stored in postmeta)
36
+ $this->field_map[] = array(
37
+ 'from_tablename' => 'forum',
38
+ 'from_fieldname' => 'parentid',
39
+ 'to_type' => 'forum',
40
+ 'to_fieldname' => '_bbp_forum_parent_id'
41
+ );
42
+
43
+ // Forum title.
44
+ $this->field_map[] = array(
45
+ 'from_tablename' => 'forum',
46
+ 'from_fieldname' => 'title',
47
+ 'to_type' => 'forum',
48
+ 'to_fieldname' => 'post_title'
49
+ );
50
+
51
+ // Forum slug (Clean name to avoid confilcts)
52
+ $this->field_map[] = array(
53
+ 'from_tablename' => 'forum',
54
+ 'from_fieldname' => 'title_clean',
55
+ 'to_type' => 'forum',
56
+ 'to_fieldname' => 'post_name',
57
+ 'callback_method' => 'callback_slug'
58
+ );
59
+
60
+ // Forum description.
61
+ $this->field_map[] = array(
62
+ 'from_tablename' => 'forum',
63
+ 'from_fieldname' => 'description',
64
+ 'to_type' => 'forum',
65
+ 'to_fieldname' => 'post_content',
66
+ 'callback_method' => 'callback_null'
67
+ );
68
+
69
+ // Forum display order (Starts from 1)
70
+ $this->field_map[] = array(
71
+ 'from_tablename' => 'forum',
72
+ 'from_fieldname' => 'displayorder',
73
+ 'to_type' => 'forum',
74
+ 'to_fieldname' => 'menu_order'
75
+ );
76
+
77
+ // Forum date update.
78
+ $this->field_map[] = array(
79
+ 'to_type' => 'forum',
80
+ 'to_fieldname' => 'post_date',
81
+ 'default' => date( 'Y-m-d H:i:s' )
82
+ );
83
+ $this->field_map[] = array(
84
+ 'to_type' => 'forum',
85
+ 'to_fieldname' => 'post_date_gmt',
86
+ 'default' => date( 'Y-m-d H:i:s' )
87
+ );
88
+ $this->field_map[] = array(
89
+ 'to_type' => 'forum',
90
+ 'to_fieldname' => 'post_modified',
91
+ 'default' => date( 'Y-m-d H:i:s' )
92
+ );
93
+ $this->field_map[] = array(
94
+ 'to_type' => 'forum',
95
+ 'to_fieldname' => 'post_modified_gmt',
96
+ 'default' => date( 'Y-m-d H:i:s' )
97
+ );
98
+
99
+ /** Topic Section *****************************************************/
100
+
101
+ // Topic id (Stored in postmeta)
102
+ $this->field_map[] = array(
103
+ 'from_tablename' => 'thread',
104
+ 'from_fieldname' => 'threadid',
105
+ 'to_type' => 'topic',
106
+ 'to_fieldname' => '_bbp_topic_id'
107
+ );
108
+
109
+ // Forum id (Stored in postmeta)
110
+ $this->field_map[] = array(
111
+ 'from_tablename' => 'thread',
112
+ 'from_fieldname' => 'forumid',
113
+ 'to_type' => 'topic',
114
+ 'to_fieldname' => '_bbp_forum_id',
115
+ 'callback_method' => 'callback_forumid'
116
+ );
117
+
118
+ // Topic author.
119
+ $this->field_map[] = array(
120
+ 'from_tablename' => 'thread',
121
+ 'from_fieldname' => 'postuserid',
122
+ 'to_type' => 'topic',
123
+ 'to_fieldname' => 'post_author',
124
+ 'callback_method' => 'callback_userid'
125
+ );
126
+
127
+ // Topic title.
128
+ $this->field_map[] = array(
129
+ 'from_tablename' => 'thread',
130
+ 'from_fieldname' => 'title',
131
+ 'to_type' => 'topic',
132
+ 'to_fieldname' => 'post_title'
133
+ );
134
+
135
+ // Topic slug (Clean name to avoid conflicts)
136
+ $this->field_map[] = array(
137
+ 'from_tablename' => 'thread',
138
+ 'from_fieldname' => 'title',
139
+ 'to_type' => 'topic',
140
+ 'to_fieldname' => 'post_name',
141
+ 'callback_method' => 'callback_slug'
142
+ );
143
+
144
+ // Forum id (If no parent, than 0)
145
+ $this->field_map[] = array(
146
+ 'from_tablename' => 'thread',
147
+ 'from_fieldname' => 'forumid',
148
+ 'to_type' => 'topic',
149
+ 'to_fieldname' => 'post_parent',
150
+ 'callback_method' => 'callback_forumid'
151
+ );
152
+
153
+ // Topic content.
154
+ // Note: We join the posts table because topics do not have content.
155
+ $this->field_map[] = array(
156
+ 'from_tablename' => 'post',
157
+ 'from_fieldname' => 'pagetext',
158
+ 'join_tablename' => 'thread',
159
+ 'join_type' => 'INNER',
160
+ 'join_expression' => 'USING (threadid) WHERE post.parentid = 0',
161
+ 'to_type' => 'topic',
162
+ 'to_fieldname' => 'post_content',
163
+ 'callback_method' => 'callback_html'
164
+ );
165
+
166
+ // Topic date update.
167
+ $this->field_map[] = array(
168
+ 'from_tablename' => 'thread',
169
+ 'from_fieldname' => 'dateline',
170
+ 'to_type' => 'topic',
171
+ 'to_fieldname' => 'post_date',
172
+ 'callback_method' => 'callback_datetime'
173
+ );
174
+ $this->field_map[] = array(
175
+ 'from_tablename' => 'thread',
176
+ 'from_fieldname' => 'dateline',
177
+ 'to_type' => 'topic',
178
+ 'to_fieldname' => 'post_date_gmt',
179
+ 'callback_method' => 'callback_datetime'
180
+ );
181
+ $this->field_map[] = array(
182
+ 'from_tablename' => 'thread',
183
+ 'from_fieldname' => 'dateline',
184
+ 'to_type' => 'topic',
185
+ 'to_fieldname' => 'post_modified',
186
+ 'callback_method' => 'callback_datetime'
187
+ );
188
+ $this->field_map[] = array(
189
+ 'from_tablename' => 'thread',
190
+ 'from_fieldname' => 'dateline',
191
+ 'to_type' => 'topic',
192
+ 'to_fieldname' => 'post_modified_gmt',
193
+ 'callback_method' => 'callback_datetime'
194
+ );
195
+
196
+ /** Tags Section ******************************************************/
197
+
198
+ // Topic id.
199
+ $this->field_map[] = array(
200
+ 'from_tablename' => 'tagcontent',
201
+ 'from_fieldname' => 'contentid',
202
+ 'to_type' => 'tags',
203
+ 'to_fieldname' => 'objectid',
204
+ 'callback_method' => 'callback_topicid'
205
+ );
206
+
207
+ // Tags text.
208
+ $this->field_map[] = array(
209
+ 'from_tablename' => 'tag',
210
+ 'from_fieldname' => 'tagtext',
211
+ 'join_tablename' => 'tagcontent',
212
+ 'join_type' => 'INNER',
213
+ 'join_expression' => 'USING (tagid)',
214
+ 'to_type' => 'tags',
215
+ 'to_fieldname' => 'name'
216
+ );
217
+
218
+ /** Post Section ******************************************************/
219
+
220
+ // Post id (Stores in postmeta)
221
+ $this->field_map[] = array(
222
+ 'from_tablename' => 'post',
223
+ 'from_fieldname' => 'postid',
224
+ 'from_expression' => 'WHERE post.parentid != 0',
225
+ 'to_type' => 'reply',
226
+ 'to_fieldname' => '_bbp_post_id'
227
+ );
228
+
229
+ // Forum id (Stores in postmeta)
230
+ $this->field_map[] = array(
231
+ 'from_tablename' => 'post',
232
+ 'from_fieldname' => 'threadid',
233
+ 'to_type' => 'reply',
234
+ 'to_fieldname' => '_bbp_forum_id',
235
+ 'callback_method' => 'callback_topicid_to_forumid'
236
+ );
237
+
238
+ // Topic id (Stores in postmeta)
239
+ $this->field_map[] = array(
240
+ 'from_tablename' => 'post',
241
+ 'from_fieldname' => 'threadid',
242
+ 'to_type' => 'reply',
243
+ 'to_fieldname' => '_bbp_topic_id',
244
+ 'callback_method' => 'callback_topicid'
245
+ );
246
+
247
+ // Author ip.
248
+ $this->field_map[] = array(
249
+ 'from_tablename' => 'post',
250
+ 'from_fieldname' => 'ipaddress',
251
+ 'to_type' => 'reply',
252
+ 'to_fieldname' => '_bbp_author_ip'
253
+ );
254
+
255
+ // Post author.
256
+ $this->field_map[] = array(
257
+ 'from_tablename' => 'post',
258
+ 'from_fieldname' => 'userid',
259
+ 'to_type' => 'reply',
260
+ 'to_fieldname' => 'post_author',
261
+ 'callback_method' => 'callback_userid'
262
+ );
263
+
264
+ // Topic title.
265
+ $this->field_map[] = array(
266
+ 'from_tablename' => 'post',
267
+ 'from_fieldname' => 'title',
268
+ 'to_type' => 'reply',
269
+ 'to_fieldname' => 'post_title'
270
+ );
271
+
272
+ // Topic slug (Clean name)
273
+ $this->field_map[] = array(
274
+ 'from_tablename' => 'post',
275
+ 'from_fieldname' => 'title',
276
+ 'to_type' => 'reply',
277
+ 'to_fieldname' => 'post_name',
278
+ 'callback_method' => 'callback_slug'
279
+ );
280
+
281
+ // Post content.
282
+ $this->field_map[] = array(
283
+ 'from_tablename' => 'post',
284
+ 'from_fieldname' => 'pagetext',
285
+ 'to_type' => 'reply',
286
+ 'to_fieldname' => 'post_content',
287
+ 'callback_method' => 'callback_html'
288
+ );
289
+
290
+ // Topic id (If no parent, than 0)
291
+ $this->field_map[] = array(
292
+ 'from_tablename' => 'post',
293
+ 'from_fieldname' => 'threadid',
294
+ 'to_type' => 'reply',
295
+ 'to_fieldname' => 'post_parent',
296
+ 'callback_method' => 'callback_topicid'
297
+ );
298
+
299
+ // Topic date update.
300
+ $this->field_map[] = array(
301
+ 'from_tablename' => 'post',
302
+ 'from_fieldname' => 'dateline',
303
+ 'to_type' => 'reply',
304
+ 'to_fieldname' => 'post_date',
305
+ 'callback_method' => 'callback_datetime'
306
+ );
307
+ $this->field_map[] = array(
308
+ 'from_tablename' => 'post',
309
+ 'from_fieldname' => 'dateline',
310
+ 'to_type' => 'reply',
311
+ 'to_fieldname' => 'post_date_gmt',
312
+ 'callback_method' => 'callback_datetime'
313
+ );
314
+ $this->field_map[] = array(
315
+ 'from_tablename' => 'post',
316
+ 'from_fieldname' => 'dateline',
317
+ 'to_type' => 'reply',
318
+ 'to_fieldname' => 'post_modified',
319
+ 'callback_method' => 'callback_datetime'
320
+ );
321
+ $this->field_map[] = array(
322
+ 'from_tablename' => 'post',
323
+ 'from_fieldname' => 'dateline',
324
+ 'to_type' => 'reply',
325
+ 'to_fieldname' => 'post_modified_gmt',
326
+ 'callback_method' => 'callback_datetime'
327
+ );
328
+
329
+ /** User Section ******************************************************/
330
+
331
+ // Store old User id (Stores in usermeta)
332
+ $this->field_map[] = array(
333
+ 'from_tablename' => 'user',
334
+ 'from_fieldname' => 'userid',
335
+ 'to_type' => 'user',
336
+ 'to_fieldname' => '_bbp_user_id'
337
+ );
338
+
339
+ // Store old User password (Stores in usermeta serialized with salt)
340
+ $this->field_map[] = array(
341
+ 'from_tablename' => 'user',
342
+ 'from_fieldname' => 'password',
343
+ 'to_type' => 'user',
344
+ 'to_fieldname' => '_bbp_password',
345
+ 'callback_method' => 'callback_savepass'
346
+ );
347
+
348
+ // Store old User Salt (This is only used for the SELECT row info for
349
+ // the above password save)
350
+ $this->field_map[] = array(
351
+ 'from_tablename' => 'user',
352
+ 'from_fieldname' => 'salt',
353
+ 'to_type' => 'user',
354
+ 'to_fieldname' => ''
355
+ );
356
+
357
+ // User password verify class (Stores in usermeta for verifying password)
358
+ $this->field_map[] = array(
359
+ 'to_type' => 'user',
360
+ 'to_fieldname' => '_bbp_class',
361
+ 'default' => 'vBulletin'
362
+ );
363
+
364
+ // User name.
365
+ $this->field_map[] = array(
366
+ 'from_tablename' => 'user',
367
+ 'from_fieldname' => 'username',
368
+ 'to_type' => 'user',
369
+ 'to_fieldname' => 'user_login'
370
+ );
371
+
372
+ // User nice name.
373
+ $this->field_map[] = array(
374
+ 'from_tablename' => 'user',
375
+ 'from_fieldname' => 'user_nicename',
376
+ 'to_type' => 'user',
377
+ 'to_fieldname' => 'user_nicename'
378
+ );
379
+
380
+ // User email.
381
+ $this->field_map[] = array(
382
+ 'from_tablename' => 'user',
383
+ 'from_fieldname' => 'email',
384
+ 'to_type' => 'user',
385
+ 'to_fieldname' => 'user_email'
386
+ );
387
+
388
+ // User homepage.
389
+ $this->field_map[] = array(
390
+ 'from_tablename' => 'user',
391
+ 'from_fieldname' => 'homepage',
392
+ 'to_type' => 'user',
393
+ 'to_fieldname' => 'user_url'
394
+ );
395
+
396
+ // User registered.
397
+ $this->field_map[] = array(
398
+ 'from_tablename' => 'user',
399
+ 'from_fieldname' => 'joindate',
400
+ 'to_type' => 'user',
401
+ 'to_fieldname' => 'user_registered',
402
+ 'callback_method' => 'callback_datetime'
403
+ );
404
+
405
+ // User aim.
406
+ $this->field_map[] = array(
407
+ 'from_tablename' => 'user',
408
+ 'from_fieldname' => 'aim',
409
+ 'to_type' => 'user',
410
+ 'to_fieldname' => 'aim'
411
+ );
412
+
413
+ // User yahoo.
414
+ $this->field_map[] = array(
415
+ 'from_tablename' => 'user',
416
+ 'from_fieldname' => 'yahoo',
417
+ 'to_type' => 'user',
418
+ 'to_fieldname' => 'yim'
419
+ );
420
+ }
421
+
422
+ /**
423
+ * This method allows us to indicates what is or is not converted for each
424
+ * converter.
425
+ */
426
+ public function info() {
427
+ return '';
428
+ }
429
+
430
+ /**
431
+ * This method is to save the salt and password together. That
432
+ * way when we authenticate it we can get it out of the database
433
+ * as one value. Array values are auto sanitized by wordpress.
434
+ */
435
+ public function callback_savepass( $field, $row ) {
436
+ $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
437
+ return $pass_array;
438
+ }
439
+
440
+ /**
441
+ * This method is to take the pass out of the database and compare
442
+ * to a pass the user has typed in.
443
+ */
444
+ public function authenticate_pass( $password, $serialized_pass ) {
445
+ $pass_array = unserialize( $serialized_pass );
446
+ return ( $pass_array['hash'] == md5( md5( $password ) . $pass_array['salt'] ) );
447
+ }
448
+ }
bbp-admin/bbp-forums.php → includes/admin/forums.php RENAMED
@@ -91,7 +91,7 @@ class BBP_Forums_Admin {
91
 
92
  return false;
93
  }
94
-
95
  /**
96
  * Admin globals
97
  *
@@ -246,7 +246,7 @@ class BBP_Forums_Admin {
246
  * @uses do_action() Calls 'bbp_forum_attributes_metabox'
247
  */
248
  public function attributes_metabox() {
249
-
250
  if ( $this->bail() ) return;
251
 
252
  add_meta_box (
@@ -333,7 +333,7 @@ class BBP_Forums_Admin {
333
  * @uses do_action() Calls 'bbp_admin_head'
334
  */
335
  public function admin_head() {
336
-
337
  if ( $this->bail() ) return;
338
 
339
  ?>
@@ -412,7 +412,7 @@ class BBP_Forums_Admin {
412
  * @return array $columns bbPress forum columns
413
  */
414
  public function column_headers( $columns ) {
415
-
416
  if ( $this->bail() ) return $columns;
417
 
418
  $columns = array (
@@ -446,7 +446,7 @@ class BBP_Forums_Admin {
446
  * column and forum id
447
  */
448
  public function column_data( $column, $forum_id ) {
449
-
450
  if ( $this->bail() ) return;
451
 
452
  switch ( $column ) {
@@ -495,7 +495,7 @@ class BBP_Forums_Admin {
495
  * @return array $actions Actions
496
  */
497
  public function row_actions( $actions, $forum ) {
498
-
499
  if ( $this->bail() ) return $actions;
500
 
501
  unset( $actions['inline hide-if-no-js'] );
91
 
92
  return false;
93
  }
94
+
95
  /**
96
  * Admin globals
97
  *
246
  * @uses do_action() Calls 'bbp_forum_attributes_metabox'
247
  */
248
  public function attributes_metabox() {
249
+
250
  if ( $this->bail() ) return;
251
 
252
  add_meta_box (
333
  * @uses do_action() Calls 'bbp_admin_head'
334
  */
335
  public function admin_head() {
336
+
337
  if ( $this->bail() ) return;
338
 
339
  ?>
412
  * @return array $columns bbPress forum columns
413
  */
414
  public function column_headers( $columns ) {
415
+
416
  if ( $this->bail() ) return $columns;
417
 
418
  $columns = array (
446
  * column and forum id
447
  */
448
  public function column_data( $column, $forum_id ) {
449
+
450
  if ( $this->bail() ) return;
451
 
452
  switch ( $column ) {
495
  * @return array $actions Actions
496
  */
497
  public function row_actions( $actions, $forum ) {
498
+
499
  if ( $this->bail() ) return $actions;
500
 
501
  unset( $actions['inline hide-if-no-js'] );
bbp-admin/bbp-functions.php → includes/admin/functions.php RENAMED
@@ -129,7 +129,7 @@ function bbp_filter_sample_permalink( $post_link, $_post, $leavename = false, $s
129
  * Uninstall all bbPress options and capabilities from a specific site.
130
  *
131
  * @since bbPress (r3765)
132
- * @param type $site_id
133
  */
134
  function bbp_do_uninstall( $site_id = 0 ) {
135
  if ( empty( $site_id ) )
@@ -142,6 +142,39 @@ function bbp_do_uninstall( $site_id = 0 ) {
142
  restore_current_blog();
143
  }
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  /**
146
  * This tells WP to highlight the Tools > Forums menu item,
147
  * regardless of which actual bbPress Tools screen we are on.
129
  * Uninstall all bbPress options and capabilities from a specific site.
130
  *
131
  * @since bbPress (r3765)
132
+ * @param type $site_id
133
  */
134
  function bbp_do_uninstall( $site_id = 0 ) {
135
  if ( empty( $site_id ) )
142
  restore_current_blog();
143
  }
144
 
145
+ /**
146
+ * Redirect user to bbPress's What's New page on activation
147
+ *
148
+ * @since bbPress (r4389)
149
+ *
150
+ * @internal Used internally to redirect bbPress to the about page on activation
151
+ *
152
+ * @uses get_transient() To see if transient to redirect exists
153
+ * @uses delete_transient() To delete the transient if it exists
154
+ * @uses is_network_admin() To bail if being network activated
155
+ * @uses wp_safe_redirect() To redirect
156
+ * @uses add_query_arg() To help build the URL to redirect to
157
+ * @uses admin_url() To get the admin URL to index.php
158
+ *
159
+ * @return If no transient, or in network admin, or is bulk activation
160
+ */
161
+ function bbp_do_activation_redirect() {
162
+
163
+ // Bail if no activation redirect
164
+ if ( ! get_transient( '_bbp_activation_redirect' ) )
165
+ return;
166
+
167
+ // Delete the redirect transient
168
+ delete_transient( '_bbp_activation_redirect' );
169
+
170
+ // Bail if activating from network, or bulk
171
+ if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
172
+ return;
173
+
174
+ // Redirect to bbPress about page
175
+ wp_safe_redirect( add_query_arg( array( 'page' => 'bbp-about' ), admin_url( 'index.php' ) ) );
176
+ }
177
+
178
  /**
179
  * This tells WP to highlight the Tools > Forums menu item,
180
  * regardless of which actual bbPress Tools screen we are on.
includes/admin/images/badge-2x.png ADDED
Binary file
includes/admin/images/badge.png ADDED
Binary file
{bbp-admin → includes/admin}/images/button-grad.png RENAMED
File without changes
{bbp-admin → includes/admin}/images/icons32-2x.png RENAMED
File without changes
{bbp-admin → includes/admin}/images/icons32.png RENAMED
File without changes
{bbp-admin → includes/admin}/images/index.php RENAMED
File without changes
{bbp-admin → includes/admin}/images/menu-2x.png RENAMED
File without changes
{bbp-admin → includes/admin}/images/menu.png RENAMED
File without changes
{bbp-admin → includes/admin}/index.php RENAMED
File without changes
bbp-admin/bbp-metaboxes.php → includes/admin/metaboxes.php RENAMED
@@ -94,22 +94,26 @@ function bbp_dashboard_widget_right_now() {
94
 
95
  </tr>
96
 
97
- <tr>
98
 
99
- <?php
100
- $num = $topic_tag_count;
101
- $text = _n( 'Topic Tag', 'Topic Tags', $topic_tag_count, 'bbpress' );
102
- if ( current_user_can( 'manage_topic_tags' ) ) {
103
- $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) );
104
- $num = '<a href="' . $link . '">' . $num . '</a>';
105
- $text = '<a href="' . $link . '">' . $text . '</a>';
106
- }
107
- ?>
 
 
108
 
109
- <td class="first b b-topic_tags"><span class="total-count"><?php echo $num; ?></span></td>
110
- <td class="t topic_tags"><?php echo $text; ?></td>
111
 
112
- </tr>
 
 
113
 
114
  <?php do_action( 'bbp_dashboard_widget_right_now_content_table_end' ); ?>
115
 
@@ -185,7 +189,7 @@ function bbp_dashboard_widget_right_now() {
185
 
186
  <?php endif; ?>
187
 
188
- <?php if ( isset( $empty_topic_tag_count ) ) : ?>
189
 
190
  <tr>
191
 
@@ -294,23 +298,31 @@ function bbp_forum_metabox() {
294
  <p>
295
  <strong class="label"><?php _e( 'Parent:', 'bbpress' ); ?></strong>
296
  <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum Parent', 'bbpress' ); ?></label>
297
-
298
- <?php
299
- bbp_dropdown( array(
300
- 'exclude' => $post_id,
301
- 'selected' => $post_parent,
302
- 'show_none' => __( '(No Parent)', 'bbpress' ),
303
- 'select_id' => 'parent_id',
304
- 'disable_categories' => false
305
- ) );
306
- ?>
307
-
 
 
 
 
 
 
 
 
308
  </p>
309
 
310
  <p>
311
  <strong class="label"><?php _e( 'Order:', 'bbpress' ); ?></strong>
312
  <label class="screen-reader-text" for="menu_order"><?php _e( 'Forum Order', 'bbpress' ); ?></label>
313
- <input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $menu_order; ?>" />
314
  </p>
315
 
316
  <?php
@@ -328,32 +340,41 @@ function bbp_forum_metabox() {
328
  * @since bbPress (r2464)
329
  *
330
  * @uses bbp_get_topic_forum_id() To get the topic forum id
331
- * @uses bbp_dropdown() To show a dropdown of the forums for topic parent
332
  * @uses do_action() Calls 'bbp_topic_metabox'
333
  */
334
  function bbp_topic_metabox() {
335
 
336
  // Post ID
337
- $post_id = get_the_ID();
338
-
339
- $args = array(
340
- 'selected' => bbp_get_topic_forum_id( $post_id ),
341
- 'select_id' => 'parent_id',
342
- 'show_none' => is_super_admin() ? __( '(No Forum)', 'bbpress' ) : '',
343
- ); ?>
344
-
345
- <p><strong><?php _e( 'Forum', 'bbpress' ); ?></strong></p>
346
 
347
  <p>
348
- <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum', 'bbpress' ); ?></label>
349
- <?php bbp_dropdown( $args ); ?>
 
350
  </p>
351
 
352
- <p><strong><?php _e( 'Topic Type', 'bbpress' ); ?></strong></p>
353
-
354
  <p>
355
- <label class="screen-reader-text" for="bbp_stick_topic"><?php _e( 'Topic Type', 'bbpress' ); ?></label>
356
- <?php bbp_topic_type_select( array( 'topic_id' => $post_id ) ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  </p>
358
 
359
  <?php
@@ -371,7 +392,6 @@ function bbp_topic_metabox() {
371
  * @since bbPress (r2464)
372
  *
373
  * @uses bbp_get_topic_post_type() To get the topic post type
374
- * @uses bbp_dropdown() To show a dropdown of the topics for reply parent
375
  * @uses do_action() Calls 'bbp_reply_metabox'
376
  */
377
  function bbp_reply_metabox() {
@@ -384,47 +404,38 @@ function bbp_reply_metabox() {
384
  $reply_forum_id = bbp_get_reply_forum_id( $post_id );
385
 
386
  // Allow individual manipulation of reply forum
387
- if ( current_user_can( 'edit_others_replies' ) || current_user_can( 'moderate' ) ) :
388
-
389
- // Forums
390
- $args = array(
391
- 'selected' => $reply_forum_id,
392
- 'select_id' => 'bbp_forum_id',
393
- 'show_none' => __( '(Use Forum of Topic)', 'bbpress' )
394
- ); ?>
395
-
396
- <p><strong><?php _e( 'Forum', 'bbpress' ); ?></strong></p>
397
 
398
  <p>
 
399
  <label class="screen-reader-text" for="bbp_forum_id"><?php _e( 'Forum', 'bbpress' ); ?></label>
400
-
401
- <?php bbp_dropdown( $args ); ?>
402
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
  </p>
404
 
405
- <?php endif;
406
-
407
- // Topics
408
- $args = array(
409
- 'post_type' => bbp_get_topic_post_type(),
410
- 'selected' => $reply_topic_id,
411
- 'select_id' => 'parent_id',
412
- 'orderby' => 'post_date',
413
- 'numberposts' => '250',
414
- 'show_none' => is_super_admin() ? __( '(No Topic)', 'bbpress' ) : '',
415
- );
416
-
417
- // Allow the dropdown to be filtered, to extend or limit the available
418
- // topics to choose as the reply parent.
419
- $args = apply_filters( 'bbp_reply_parent_dropdown', $args ); ?>
420
-
421
- <p><strong><?php _e( 'Topic', 'bbpress' ); ?></strong></p>
422
 
423
  <p>
 
424
  <label class="screen-reader-text" for="parent_id"><?php _e( 'Topic', 'bbpress' ); ?></label>
425
-
426
- <?php bbp_dropdown( $args ); ?>
427
-
428
  </p>
429
 
430
  <?php
@@ -452,34 +463,30 @@ function bbp_author_metabox() {
452
  // Show extra bits if topic/reply is anonymous
453
  if ( bbp_is_reply_anonymous( $post_id ) || bbp_is_topic_anonymous( $post_id ) ) : ?>
454
 
455
- <p><strong><?php _e( 'Name', 'bbpress' ); ?></strong></p>
456
-
457
  <p>
 
458
  <label class="screen-reader-text" for="bbp_anonymous_name"><?php _e( 'Name', 'bbpress' ); ?></label>
459
- <input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_name', true ) ); ?>" size="25" />
460
  </p>
461
 
462
- <p><strong><?php _e( 'Email', 'bbpress' ); ?></strong></p>
463
-
464
  <p>
 
465
  <label class="screen-reader-text" for="bbp_anonymous_email"><?php _e( 'Email', 'bbpress' ); ?></label>
466
- <input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_email', true ) ); ?>" size="25" />
467
  </p>
468
 
469
- <p><strong><?php _e( 'Website', 'bbpress' ); ?></strong></p>
470
-
471
  <p>
 
472
  <label class="screen-reader-text" for="bbp_anonymous_website"><?php _e( 'Website', 'bbpress' ); ?></label>
473
- <input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_website', true ) ); ?>" size="25" />
474
  </p>
475
 
476
  <?php endif; ?>
477
 
478
- <p><strong><?php _e( 'IP Address', 'bbpress' ); ?></strong></p>
479
-
480
  <p>
 
481
  <label class="screen-reader-text" for="bbp_author_ip_address"><?php _e( 'IP Address', 'bbpress' ); ?></label>
482
- <input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_author_ip', true ) ); ?>" size="25" disabled="disabled" />
483
  </p>
484
 
485
  <?php
94
 
95
  </tr>
96
 
97
+ <?php if ( bbp_allow_topic_tags() ) : ?>
98
 
99
+ <tr>
100
+
101
+ <?php
102
+ $num = $topic_tag_count;
103
+ $text = _n( 'Topic Tag', 'Topic Tags', $topic_tag_count, 'bbpress' );
104
+ if ( current_user_can( 'manage_topic_tags' ) ) {
105
+ $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) );
106
+ $num = '<a href="' . $link . '">' . $num . '</a>';
107
+ $text = '<a href="' . $link . '">' . $text . '</a>';
108
+ }
109
+ ?>
110
 
111
+ <td class="first b b-topic_tags"><span class="total-count"><?php echo $num; ?></span></td>
112
+ <td class="t topic_tags"><?php echo $text; ?></td>
113
 
114
+ </tr>
115
+
116
+ <?php endif; ?>
117
 
118
  <?php do_action( 'bbp_dashboard_widget_right_now_content_table_end' ); ?>
119
 
189
 
190
  <?php endif; ?>
191
 
192
+ <?php if ( bbp_allow_topic_tags() && isset( $empty_topic_tag_count ) ) : ?>
193
 
194
  <tr>
195
 
298
  <p>
299
  <strong class="label"><?php _e( 'Parent:', 'bbpress' ); ?></strong>
300
  <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum Parent', 'bbpress' ); ?></label>
301
+ <?php bbp_dropdown( array(
302
+ 'post_type' => bbp_get_forum_post_type(),
303
+ 'selected' => $post_parent,
304
+ 'child_of' => '0',
305
+ 'numberposts' => -1,
306
+ 'orderby' => 'title',
307
+ 'order' => 'ASC',
308
+ 'walker' => '',
309
+ 'exclude' => $post_id,
310
+
311
+ // Output-related
312
+ 'select_id' => 'parent_id',
313
+ 'tab' => bbp_get_tab_index(),
314
+ 'options_only' => false,
315
+ 'show_none' => __( '&mdash; No parent &mdash;', 'bbpress' ),
316
+ 'none_found' => false,
317
+ 'disable_categories' => false,
318
+ 'disabled' => ''
319
+ ) ); ?>
320
  </p>
321
 
322
  <p>
323
  <strong class="label"><?php _e( 'Order:', 'bbpress' ); ?></strong>
324
  <label class="screen-reader-text" for="menu_order"><?php _e( 'Forum Order', 'bbpress' ); ?></label>
325
+ <input name="menu_order" type="number" step="1" size="4" id="menu_order" value="<?php echo esc_attr( $menu_order ); ?>" />
326
  </p>
327
 
328
  <?php
340
  * @since bbPress (r2464)
341
  *
342
  * @uses bbp_get_topic_forum_id() To get the topic forum id
 
343
  * @uses do_action() Calls 'bbp_topic_metabox'
344
  */
345
  function bbp_topic_metabox() {
346
 
347
  // Post ID
348
+ $post_id = get_the_ID(); ?>
 
 
 
 
 
 
 
 
349
 
350
  <p>
351
+ <strong class="label"><?php _e( 'Type:', 'bbpress' ); ?></strong>
352
+ <label class="screen-reader-text" for="bbp_stick_topic"><?php _e( 'Topic Type', 'bbpress' ); ?></label>
353
+ <?php bbp_topic_type_select( array( 'topic_id' => $post_id ) ); ?>
354
  </p>
355
 
 
 
356
  <p>
357
+ <strong class="label"><?php _e( 'Forum:', 'bbpress' ); ?></strong>
358
+ <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum', 'bbpress' ); ?></label>
359
+ <?php bbp_dropdown( array(
360
+ 'post_type' => bbp_get_forum_post_type(),
361
+ 'selected' => bbp_get_topic_forum_id( $post_id ),
362
+ 'child_of' => '0',
363
+ 'numberposts' => -1,
364
+ 'orderby' => 'title',
365
+ 'order' => 'ASC',
366
+ 'walker' => '',
367
+ 'exclude' => '',
368
+
369
+ // Output-related
370
+ 'select_id' => 'parent_id',
371
+ 'tab' => bbp_get_tab_index(),
372
+ 'options_only' => false,
373
+ 'show_none' => __( '&mdash; No parent &mdash;', 'bbpress' ),
374
+ 'none_found' => false,
375
+ 'disable_categories' => current_user_can( 'edit_forums' ),
376
+ 'disabled' => ''
377
+ ) ); ?>
378
  </p>
379
 
380
  <?php
392
  * @since bbPress (r2464)
393
  *
394
  * @uses bbp_get_topic_post_type() To get the topic post type
 
395
  * @uses do_action() Calls 'bbp_reply_metabox'
396
  */
397
  function bbp_reply_metabox() {
404
  $reply_forum_id = bbp_get_reply_forum_id( $post_id );
405
 
406
  // Allow individual manipulation of reply forum
407
+ if ( current_user_can( 'edit_others_replies' ) || current_user_can( 'moderate' ) ) : ?>
 
 
 
 
 
 
 
 
 
408
 
409
  <p>
410
+ <strong class="label"><?php _e( 'Forum:', 'bbpress' ); ?></strong>
411
  <label class="screen-reader-text" for="bbp_forum_id"><?php _e( 'Forum', 'bbpress' ); ?></label>
412
+ <?php bbp_dropdown( array(
413
+ 'post_type' => bbp_get_forum_post_type(),
414
+ 'selected' => $reply_forum_id,
415
+ 'child_of' => '0',
416
+ 'numberposts' => -1,
417
+ 'orderby' => 'title',
418
+ 'order' => 'ASC',
419
+ 'walker' => '',
420
+ 'exclude' => '',
421
+
422
+ // Output-related
423
+ 'select_id' => 'bbp_forum_id',
424
+ 'tab' => bbp_get_tab_index(),
425
+ 'options_only' => false,
426
+ 'show_none' => __( '&mdash; No parent &mdash;', 'bbpress' ),
427
+ 'none_found' => false,
428
+ 'disable_categories' => current_user_can( 'edit_forums' ),
429
+ 'disabled' => ''
430
+ ) ); ?>
431
  </p>
432
 
433
+ <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
 
435
  <p>
436
+ <strong class="label"><?php _e( 'Topic:', 'bbpress' ); ?></strong>
437
  <label class="screen-reader-text" for="parent_id"><?php _e( 'Topic', 'bbpress' ); ?></label>
438
+ <input name="parent_id" id="bbp_topic_id" type="text" value="<?php echo esc_attr( $reply_topic_id ); ?>" />
 
 
439
  </p>
440
 
441
  <?php
463
  // Show extra bits if topic/reply is anonymous
464
  if ( bbp_is_reply_anonymous( $post_id ) || bbp_is_topic_anonymous( $post_id ) ) : ?>
465
 
 
 
466
  <p>
467
+ <strong class="label"><?php _e( 'Name:', 'bbpress' ); ?></strong>
468
  <label class="screen-reader-text" for="bbp_anonymous_name"><?php _e( 'Name', 'bbpress' ); ?></label>
469
+ <input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_name', true ) ); ?>" />
470
  </p>
471
 
 
 
472
  <p>
473
+ <strong class="label"><?php _e( 'Email:', 'bbpress' ); ?></strong>
474
  <label class="screen-reader-text" for="bbp_anonymous_email"><?php _e( 'Email', 'bbpress' ); ?></label>
475
+ <input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_email', true ) ); ?>" />
476
  </p>
477
 
 
 
478
  <p>
479
+ <strong class="label"><?php _e( 'Website:', 'bbpress' ); ?></strong>
480
  <label class="screen-reader-text" for="bbp_anonymous_website"><?php _e( 'Website', 'bbpress' ); ?></label>
481
+ <input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_anonymous_website', true ) ); ?>" />
482
  </p>
483
 
484
  <?php endif; ?>
485
 
 
 
486
  <p>
487
+ <strong class="label"><?php _e( 'IP:', 'bbpress' ); ?></strong>
488
  <label class="screen-reader-text" for="bbp_author_ip_address"><?php _e( 'IP Address', 'bbpress' ); ?></label>
489
+ <input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php echo esc_attr( get_post_meta( $post_id, '_bbp_author_ip', true ) ); ?>" disabled="disabled" />
490
  </p>
491
 
492
  <?php
bbp-admin/bbp-parser.php → includes/admin/parser.php RENAMED
File without changes
bbp-admin/bbp-replies.php → includes/admin/replies.php RENAMED
@@ -103,7 +103,7 @@ class BBP_Replies_Admin {
103
 
104
  return false;
105
  }
106
-
107
  /**
108
  * Admin globals
109
  *
@@ -417,7 +417,7 @@ class BBP_Replies_Admin {
417
  * @uses do_action() Calls 'bbp_admin_head'
418
  */
419
  public function admin_head() {
420
-
421
  if ( $this->bail() ) return;
422
 
423
  ?>
@@ -425,6 +425,11 @@ class BBP_Replies_Admin {
425
  <style type="text/css" media="screen">
426
  /*<![CDATA[*/
427
 
 
 
 
 
 
428
  .column-bbp_forum_topic_count,
429
  .column-bbp_forum_reply_count,
430
  .column-bbp_topic_reply_count,
@@ -884,7 +889,7 @@ class BBP_Replies_Admin {
884
 
885
  // URL for the current topic
886
  $topic_url = bbp_get_topic_permalink( bbp_get_reply_topic_id( $post_ID ) );
887
-
888
  // Current reply's post_date
889
  $post_date = bbp_get_global_post_field( 'post_date', 'raw' );
890
 
@@ -940,7 +945,7 @@ endif; // class_exists check
940
  *
941
  * This is currently here to make hooking and unhooking of the admin UI easy.
942
  * It could use dependency injection in the future, but for now this is easier.
943
- *
944
  * @since bbPress (r2596)
945
  *
946
  * @uses BBP_Replies_Admin
103
 
104
  return false;
105
  }
106
+
107
  /**
108
  * Admin globals
109
  *
417
  * @uses do_action() Calls 'bbp_admin_head'
418
  */
419
  public function admin_head() {
420
+
421
  if ( $this->bail() ) return;
422
 
423
  ?>
425
  <style type="text/css" media="screen">
426
  /*<![CDATA[*/
427
 
428
+ strong.label {
429
+ display: inline-block;
430
+ width: 60px;
431
+ }
432
+
433
  .column-bbp_forum_topic_count,
434
  .column-bbp_forum_reply_count,
435
  .column-bbp_topic_reply_count,
889
 
890
  // URL for the current topic
891
  $topic_url = bbp_get_topic_permalink( bbp_get_reply_topic_id( $post_ID ) );
892
+
893
  // Current reply's post_date
894
  $post_date = bbp_get_global_post_field( 'post_date', 'raw' );
895
 
945
  *
946
  * This is currently here to make hooking and unhooking of the admin UI easy.
947
  * It could use dependency injection in the future, but for now this is easier.
948
+ *
949
  * @since bbPress (r2596)
950
  *
951
  * @uses BBP_Replies_Admin
bbp-admin/bbp-settings.php → includes/admin/settings.php RENAMED
@@ -13,13 +13,13 @@ if ( !defined( 'ABSPATH' ) ) exit;
13
  /** Sections ******************************************************************/
14
 
15
  /**
16
- * Get the bbPress settings sections.
17
  *
18
  * @since bbPress (r4001)
19
  * @return array
20
  */
21
  function bbp_admin_get_settings_sections() {
22
- return apply_filters( 'bbp_admin_get_settings_sections', array(
23
  'bbp_settings_main' => array(
24
  'title' => __( 'Main Settings', 'bbpress' ),
25
  'callback' => 'bbp_admin_setting_callback_main_section',
@@ -70,7 +70,7 @@ function bbp_admin_get_settings_sections() {
70
  * @return type
71
  */
72
  function bbp_admin_get_settings_fields() {
73
- return apply_filters( 'bbp_admin_get_settings_fields', array(
74
 
75
  /** Main Section ******************************************************/
76
 
@@ -78,7 +78,7 @@ function bbp_admin_get_settings_fields() {
78
 
79
  // Edit lock setting
80
  '_bbp_edit_lock' => array(
81
- 'title' => __( 'Lock post editing after', 'bbpress' ),
82
  'callback' => 'bbp_admin_setting_callback_editlock',
83
  'sanitize_callback' => 'intval',
84
  'args' => array()
@@ -86,7 +86,7 @@ function bbp_admin_get_settings_fields() {
86
 
87
  // Throttle setting
88
  '_bbp_throttle_time' => array(
89
- 'title' => __( 'Throttle time', 'bbpress' ),
90
  'callback' => 'bbp_admin_setting_callback_throttle',
91
  'sanitize_callback' => 'intval',
92
  'args' => array()
@@ -94,7 +94,7 @@ function bbp_admin_get_settings_fields() {
94
 
95
  // Allow topic and reply revisions
96
  '_bbp_allow_revisions' => array(
97
- 'title' => __( 'Allow Revisions', 'bbpress' ),
98
  'callback' => 'bbp_admin_setting_callback_revisions',
99
  'sanitize_callback' => 'intval',
100
  'args' => array()
@@ -102,7 +102,7 @@ function bbp_admin_get_settings_fields() {
102
 
103
  // Allow favorites setting
104
  '_bbp_enable_favorites' => array(
105
- 'title' => __( 'Allow Favorites', 'bbpress' ),
106
  'callback' => 'bbp_admin_setting_callback_favorites',
107
  'sanitize_callback' => 'intval',
108
  'args' => array()
@@ -110,23 +110,39 @@ function bbp_admin_get_settings_fields() {
110
 
111
  // Allow subscriptions setting
112
  '_bbp_enable_subscriptions' => array(
113
- 'title' => __( 'Allow Subscriptions', 'bbpress' ),
114
  'callback' => 'bbp_admin_setting_callback_subscriptions',
115
  'sanitize_callback' => 'intval',
116
  'args' => array()
117
  ),
118
 
 
 
 
 
 
 
 
 
119
  // Allow anonymous posting setting
120
  '_bbp_allow_anonymous' => array(
121
- 'title' => __( 'Allow Anonymous Posting', 'bbpress' ),
122
  'callback' => 'bbp_admin_setting_callback_anonymous',
123
  'sanitize_callback' => 'intval',
124
  'args' => array()
125
  ),
126
 
 
 
 
 
 
 
 
 
127
  // Allow global access (on multisite)
128
  '_bbp_allow_global_access' => array(
129
- 'title' => __( 'Allow Global Access', 'bbpress' ),
130
  'callback' => 'bbp_admin_setting_callback_global_access',
131
  'sanitize_callback' => 'intval',
132
  'args' => array()
@@ -134,7 +150,7 @@ function bbp_admin_get_settings_fields() {
134
 
135
  // Allow fancy editor setting
136
  '_bbp_use_wp_editor' => array(
137
- 'title' => __( 'Fancy Editor', 'bbpress' ),
138
  'callback' => 'bbp_admin_setting_callback_use_wp_editor',
139
  'args' => array(),
140
  'sanitize_callback' => 'intval'
@@ -142,7 +158,7 @@ function bbp_admin_get_settings_fields() {
142
 
143
  // Allow auto embedding setting
144
  '_bbp_use_autoembed' => array(
145
- 'title' => __( 'Auto-embed Links', 'bbpress' ),
146
  'callback' => 'bbp_admin_setting_callback_use_autoembed',
147
  'sanitize_callback' => 'intval',
148
  'args' => array()
@@ -338,7 +354,7 @@ function bbp_admin_get_settings_fields_for_section( $section_id = '' ) {
338
  $fields = bbp_admin_get_settings_fields();
339
  $retval = isset( $fields[$section_id] ) ? $fields[$section_id] : false;
340
 
341
- return apply_filters( 'bbp_admin_get_settings_fields_for_section', $retval, $section_id );
342
  }
343
 
344
  /** Main Section **************************************************************/
@@ -366,7 +382,7 @@ function bbp_admin_setting_callback_main_section() {
366
  function bbp_admin_setting_callback_editlock() {
367
  ?>
368
 
369
- <input name="_bbp_edit_lock" type="number" min="0" step="1" id="_bbp_edit_lock" value="<?php bbp_form_option( '_bbp_edit_lock', '5' ); ?>" class="small-text" />
370
  <label for="_bbp_edit_lock"><?php _e( 'minutes', 'bbpress' ); ?></label>
371
 
372
  <?php
@@ -382,7 +398,7 @@ function bbp_admin_setting_callback_editlock() {
382
  function bbp_admin_setting_callback_throttle() {
383
  ?>
384
 
385
- <input name="_bbp_throttle_time" type="number" min="0" step="1" id="_bbp_throttle_time" value="<?php bbp_form_option( '_bbp_throttle_time', '10' ); ?>" class="small-text" />
386
  <label for="_bbp_throttle_time"><?php _e( 'seconds', 'bbpress' ); ?></label>
387
 
388
  <?php
@@ -398,7 +414,7 @@ function bbp_admin_setting_callback_throttle() {
398
  function bbp_admin_setting_callback_favorites() {
399
  ?>
400
 
401
- <input id="_bbp_enable_favorites" name="_bbp_enable_favorites" type="checkbox" id="_bbp_enable_favorites" value="1" <?php checked( bbp_is_favorites_active( true ) ); ?> />
402
  <label for="_bbp_enable_favorites"><?php _e( 'Allow users to mark topics as favorites', 'bbpress' ); ?></label>
403
 
404
  <?php
@@ -414,12 +430,28 @@ function bbp_admin_setting_callback_favorites() {
414
  function bbp_admin_setting_callback_subscriptions() {
415
  ?>
416
 
417
- <input id="_bbp_enable_subscriptions" name="_bbp_enable_subscriptions" type="checkbox" id="_bbp_enable_subscriptions" value="1" <?php checked( bbp_is_subscriptions_active( true ) ); ?> />
418
  <label for="_bbp_enable_subscriptions"><?php _e( 'Allow users to subscribe to topics', 'bbpress' ); ?></label>
419
 
420
  <?php
421
  }
422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
423
  /**
424
  * Allow topic and reply revisions
425
  *
@@ -430,7 +462,7 @@ function bbp_admin_setting_callback_subscriptions() {
430
  function bbp_admin_setting_callback_revisions() {
431
  ?>
432
 
433
- <input id="_bbp_allow_revisions" name="_bbp_allow_revisions" type="checkbox" id="_bbp_allow_revisions" value="1" <?php checked( bbp_allow_revisions( true ) ); ?> />
434
  <label for="_bbp_allow_revisions"><?php _e( 'Allow topic and reply revision logging', 'bbpress' ); ?></label>
435
 
436
  <?php
@@ -446,7 +478,7 @@ function bbp_admin_setting_callback_revisions() {
446
  function bbp_admin_setting_callback_anonymous() {
447
  ?>
448
 
449
- <input id="_bbp_allow_anonymous" name="_bbp_allow_anonymous" type="checkbox" id="_bbp_allow_anonymous" value="1" <?php checked( bbp_allow_anonymous( false ) ); ?> />
450
  <label for="_bbp_allow_anonymous"><?php _e( 'Allow guest users without accounts to create topics and replies', 'bbpress' ); ?></label>
451
 
452
  <?php
@@ -462,12 +494,34 @@ function bbp_admin_setting_callback_anonymous() {
462
  function bbp_admin_setting_callback_global_access() {
463
  ?>
464
 
465
- <input id="_bbp_allow_global_access" name="_bbp_allow_global_access" type="checkbox" id="_bbp_allow_global_access" value="1" <?php checked( bbp_allow_global_access( false ) ); ?> />
466
- <label for="_bbp_allow_global_access"><?php _e( 'Allow all users of your multisite installation to create topics and replies', 'bbpress' ); ?></label>
467
 
468
  <?php
469
  }
470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  /**
472
  * Use the WordPress editor setting field
473
  *
@@ -478,7 +532,7 @@ function bbp_admin_setting_callback_global_access() {
478
  function bbp_admin_setting_callback_use_wp_editor() {
479
  ?>
480
 
481
- <input id="_bbp_use_wp_editor" name="_bbp_use_wp_editor" type="checkbox" id="_bbp_use_wp_editor" value="1" <?php checked( bbp_use_wp_editor( true ) ); ?> />
482
  <label for="_bbp_use_wp_editor"><?php _e( 'Use the fancy WordPress editor to create and edit topics and replies', 'bbpress' ); ?></label>
483
 
484
  <?php
@@ -510,7 +564,7 @@ function bbp_admin_setting_callback_subtheme_id() {
510
  $theme_options = '';
511
  $current_package = bbp_get_theme_package_id( 'default' );
512
 
513
- // Note: This should never be empty. /bbp-includes/bbp-theme-compat/ is the
514
  // canonical backup if no other packages exist. If there's an error here,
515
  // something else is wrong.
516
  //
@@ -521,13 +575,12 @@ function bbp_admin_setting_callback_subtheme_id() {
521
 
522
  if ( !empty( $theme_options ) ) : ?>
523
 
524
- <select name="_bbp_theme_package_id" id="_bbp_theme_package_id" /><?php echo $theme_options ?></select>
525
  <label for="_bbp_theme_package_id"><?php _e( 'will serve all bbPress templates', 'bbpress' ); ?></label>
526
 
527
  <?php else : ?>
528
 
529
- <select name="_bbp_theme_package_id" id="_bbp_theme_package_id" /><?php echo $theme_options ?></select>
530
- <label for="_bbp_theme_package_id"><?php _e( 'Use the fancy WordPress editor to create and edit topics and replies', 'bbpress' ); ?></label>
531
 
532
  <?php endif;
533
  }
@@ -542,8 +595,8 @@ function bbp_admin_setting_callback_subtheme_id() {
542
  function bbp_admin_setting_callback_use_autoembed() {
543
  ?>
544
 
545
- <input id="_bbp_use_autoembed" name="_bbp_use_autoembed" type="checkbox" id="_bbp_use_autoembed" value="1" <?php checked( bbp_use_autoembed( true ) ); ?> />
546
- <label for="_bbp_use_autoembed"><?php _e( 'Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and replies.', 'bbpress' ); ?></label>
547
 
548
  <?php
549
  }
@@ -573,7 +626,7 @@ function bbp_admin_setting_callback_per_page_section() {
573
  function bbp_admin_setting_callback_topics_per_page() {
574
  ?>
575
 
576
- <input name="_bbp_topics_per_page" type="number" min="1" step="1" id="_bbp_topics_per_page" value="<?php bbp_form_option( '_bbp_topics_per_page', '15' ); ?>" class="small-text" />
577
  <label for="_bbp_topics_per_page"><?php _e( 'per page', 'bbpress' ); ?></label>
578
 
579
  <?php
@@ -589,7 +642,7 @@ function bbp_admin_setting_callback_topics_per_page() {
589
  function bbp_admin_setting_callback_replies_per_page() {
590
  ?>
591
 
592
- <input name="_bbp_replies_per_page" type="number" min="1" step="1" id="_bbp_replies_per_page" value="<?php bbp_form_option( '_bbp_replies_per_page', '15' ); ?>" class="small-text" />
593
  <label for="_bbp_replies_per_page"><?php _e( 'per page', 'bbpress' ); ?></label>
594
 
595
  <?php
@@ -620,7 +673,7 @@ function bbp_admin_setting_callback_per_rss_page_section() {
620
  function bbp_admin_setting_callback_topics_per_rss_page() {
621
  ?>
622
 
623
- <input name="_bbp_topics_per_rss_page" type="number" min="1" step="1" id="_bbp_topics_per_rss_page" value="<?php bbp_form_option( '_bbp_topics_per_rss_page', '25' ); ?>" class="small-text" />
624
  <label for="_bbp_topics_per_rss_page"><?php _e( 'per page', 'bbpress' ); ?></label>
625
 
626
  <?php
@@ -636,7 +689,7 @@ function bbp_admin_setting_callback_topics_per_rss_page() {
636
  function bbp_admin_setting_callback_replies_per_rss_page() {
637
  ?>
638
 
639
- <input name="_bbp_replies_per_rss_page" type="number" min="1" step="1" id="_bbp_replies_per_rss_page" value="<?php bbp_form_option( '_bbp_replies_per_rss_page', '25' ); ?>" class="small-text" />
640
  <label for="_bbp_replies_per_rss_page"><?php _e( 'per page', 'bbpress' ); ?></label>
641
 
642
  <?php
@@ -670,7 +723,7 @@ function bbp_admin_setting_callback_root_slug_section() {
670
  function bbp_admin_setting_callback_root_slug() {
671
  ?>
672
 
673
- <input name="_bbp_root_slug" type="text" id="_bbp_root_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_root_slug', 'forums', true ); ?>" />
674
 
675
  <?php
676
  // Slug Check
@@ -687,7 +740,7 @@ function bbp_admin_setting_callback_root_slug() {
687
  function bbp_admin_setting_callback_topic_archive_slug() {
688
  ?>
689
 
690
- <input name="_bbp_topic_archive_slug" type="text" id="_bbp_topic_archive_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_topic_archive_slug', 'topics', true ); ?>" />
691
 
692
  <?php
693
  // Slug Check
@@ -719,7 +772,7 @@ function bbp_admin_setting_callback_single_slug_section() {
719
  function bbp_admin_setting_callback_include_root() {
720
  ?>
721
 
722
- <input id="_bbp_include_root" name="_bbp_include_root" type="checkbox" id="_bbp_include_root" value="1" <?php checked( get_option( '_bbp_include_root', true ) ); ?> />
723
  <label for="_bbp_include_root"><?php _e( 'Prefix your forum area with the Forum Base slug (Recommended)', 'bbpress' ); ?></label>
724
 
725
  <?php
@@ -735,7 +788,7 @@ function bbp_admin_setting_callback_include_root() {
735
  function bbp_admin_setting_callback_forum_slug() {
736
  ?>
737
 
738
- <input name="_bbp_forum_slug" type="text" id="_bbp_forum_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_forum_slug', 'forum', true ); ?>" />
739
 
740
  <?php
741
  // Slug Check
@@ -752,7 +805,7 @@ function bbp_admin_setting_callback_forum_slug() {
752
  function bbp_admin_setting_callback_topic_slug() {
753
  ?>
754
 
755
- <input name="_bbp_topic_slug" type="text" id="_bbp_topic_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_topic_slug', 'topic', true ); ?>" />
756
 
757
  <?php
758
  // Slug Check
@@ -769,7 +822,7 @@ function bbp_admin_setting_callback_topic_slug() {
769
  function bbp_admin_setting_callback_reply_slug() {
770
  ?>
771
 
772
- <input name="_bbp_reply_slug" type="text" id="_bbp_reply_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_reply_slug', 'reply', true ); ?>" />
773
 
774
  <?php
775
  // Slug Check
@@ -786,7 +839,7 @@ function bbp_admin_setting_callback_reply_slug() {
786
  function bbp_admin_setting_callback_topic_tag_slug() {
787
  ?>
788
 
789
- <input name="_bbp_topic_tag_slug" type="text" id="_bbp_topic_tag_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_topic_tag_slug', 'topic-tag', true ); ?>" />
790
 
791
  <?php
792
 
@@ -806,7 +859,7 @@ function bbp_admin_setting_callback_topic_tag_slug() {
806
  function bbp_admin_setting_callback_user_slug() {
807
  ?>
808
 
809
- <input name="_bbp_user_slug" type="text" id="_bbp_user_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_user_slug', 'users', true ); ?>" />
810
 
811
  <?php
812
  // Slug Check
@@ -823,7 +876,7 @@ function bbp_admin_setting_callback_user_slug() {
823
  function bbp_admin_setting_callback_view_slug() {
824
  ?>
825
 
826
- <input name="_bbp_view_slug" type="text" id="_bbp_view_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_view_slug', 'view', true ); ?>" />
827
 
828
  <?php
829
  // Slug Check
@@ -855,7 +908,7 @@ function bbp_admin_setting_callback_buddypress_section() {
855
  function bbp_admin_setting_callback_group_forums() {
856
  ?>
857
 
858
- <input id="_bbp_enable_group_forums" name="_bbp_enable_group_forums" type="checkbox" id="_bbp_enable_group_forums" value="1" <?php checked( bbp_is_group_forums_active( true ) ); ?> />
859
  <label for="_bbp_enable_group_forums"><?php _e( 'Allow BuddyPress Groups to have their own forums', 'bbpress' ); ?></label>
860
 
861
  <?php
@@ -869,16 +922,17 @@ function bbp_admin_setting_callback_group_forums() {
869
  * @uses bbp_form_option() To output the option value
870
  */
871
  function bbp_admin_setting_callback_group_forums_root_id() {
872
- ?>
873
 
874
- <?php
875
- bbp_dropdown( array(
876
- 'selected' => bbp_get_group_forums_root_id(),
877
- 'show_none' => __( '(Forum Root)', 'bbpress' ),
878
- 'select_id' => '_bbp_group_forums_root_id',
879
- 'disable_categories' => false
880
- ) );
881
- ?>
 
 
882
 
883
  <label for="_bbp_group_forums_root_id"><?php _e( 'is the parent for all group forums', 'bbpress' ); ?></label>
884
  <p class="description"><?php _e( 'Using the Forum Root is not recommended. Changing this does not move existing forums.', 'bbpress' ); ?></p>
@@ -912,7 +966,7 @@ function bbp_admin_setting_callback_akismet_section() {
912
  function bbp_admin_setting_callback_akismet() {
913
  ?>
914
 
915
- <input id="_bbp_enable_akismet" name="_bbp_enable_akismet" type="checkbox" id="_bbp_enable_akismet" value="1" <?php checked( bbp_is_akismet_active( true ) ); ?> />
916
  <label for="_bbp_enable_akismet"><?php _e( 'Allow Akismet to actively prevent forum spam.', 'bbpress' ); ?></label>
917
 
918
  <?php
@@ -936,7 +990,7 @@ function bbp_admin_settings() {
936
 
937
  <?php screen_icon(); ?>
938
 
939
- <h2><?php _e( 'bbPress Settings', 'bbpress' ) ?></h2>
940
 
941
  <form action="options.php" method="post">
942
 
@@ -945,7 +999,7 @@ function bbp_admin_settings() {
945
  <?php do_settings_sections( 'bbpress' ); ?>
946
 
947
  <p class="submit">
948
- <input type="submit" name="submit" class="button-primary" value="<?php _e( 'Save Changes', 'bbpress' ); ?>" />
949
  </p>
950
  </form>
951
  </div>
@@ -976,17 +1030,22 @@ function bbp_converter_setting_callback_main_section() {
976
  */
977
  function bbp_converter_setting_callback_platform() {
978
 
979
- $platform_options = array();
 
980
 
981
- if ( $curdir = opendir( bbpress()->admin->admin_dir . 'converters/' ) ) {
982
- while ( $file = readdir( $curdir ) ) {
983
- if ( ( stristr( $file, '.php' ) ) && ( stristr( $file, 'index' ) === false ) ) {
984
- $file = preg_replace( '/.php/', '', $file );
985
- $platform_options .= '<option value="' . $file . '">' . $file . '</option>';
986
- }
 
 
 
987
  }
988
- closedir( $curdir );
989
- } ?>
 
990
 
991
  <select name="_bbp_converter_platform" id="_bbp_converter_platform" /><?php echo $platform_options ?></select>
992
  <label for="_bbp_converter_platform"><?php _e( 'is the previous forum software', 'bbpress' ); ?></label>
@@ -1191,8 +1250,8 @@ function bbp_converter_settings() {
1191
  <?php do_settings_sections( 'bbpress_converter' ); ?>
1192
 
1193
  <p class="submit">
1194
- <input type="button" name="submit" class="button-primary" id="bbp-converter-start" value="<?php _e( 'Start', 'bbpress' ); ?>" onclick="bbconverter_start()" />
1195
- <input type="button" name="submit" class="button-primary" id="bbp-converter-stop" value="<?php _e( 'Stop', 'bbpress' ); ?>" onclick="bbconverter_stop()" />
1196
  <img id="bbp-converter-progress" src="">
1197
  </p>
1198
 
@@ -1206,7 +1265,7 @@ function bbp_converter_settings() {
1206
  /** Helpers *******************************************************************/
1207
 
1208
  /**
1209
- * Contextual help for bbPress settings page
1210
  *
1211
  * @since bbPress (r3119)
1212
  * @uses get_current_screen()
@@ -1223,7 +1282,7 @@ function bbp_admin_settings_help() {
1223
  $current_screen->add_help_tab( array(
1224
  'id' => 'overview',
1225
  'title' => __( 'Overview', 'bbpress' ),
1226
- 'content' => '<p>' . __( 'This screen provides access to all of the bbPress settings.', 'bbpress' ) . '</p>' .
1227
  '<p>' . __( 'Please see the additional help tabs for more information on each indiviual section.', 'bbpress' ) . '</p>'
1228
  ) );
1229
 
@@ -1238,6 +1297,7 @@ function bbp_admin_settings_help() {
1238
  '<li>' . __( '"Throttle time" is the amount of time required between posts from a single author. The higher the throttle time, the longer a user will need to wait between posting to the forum.', 'bbpress' ) . '</li>' .
1239
  '<li>' . __( 'Favorites are a way for users to save and later return to topics they favor. This is enabled by default.', 'bbpress' ) . '</li>' .
1240
  '<li>' . __( 'Subscriptions allow users to subscribe for notifications to topics that interest them. This is enabled by default.', 'bbpress' ) . '</li>' .
 
1241
  '<li>' . __( '"Anonymous Posting" allows guest users who do not have accounts on your site to both create topics as well as replies.', 'bbpress' ) . '</li>' .
1242
  '<li>' . __( 'The Fancy Editor brings the luxury of the Visual editor and HTML editor from the traditional WordPress dashboard into your theme.', 'bbpress' ) . '</li>' .
1243
  '<li>' . __( 'Auto-embed will embed the media content from a URL directly into the replies. For example: links to Flickr and YouTube.', 'bbpress' ) . '</li>' .
@@ -1273,6 +1333,18 @@ function bbp_admin_settings_help() {
1273
  );
1274
  }
1275
 
 
 
 
 
 
 
 
 
 
 
 
 
1276
  /**
1277
  * Output settings API option
1278
  *
@@ -1306,12 +1378,13 @@ function bbp_form_option( $option, $default = '' , $slug = false ) {
1306
  $value = get_option( $option, $default );
1307
 
1308
  // Slug?
1309
- if ( true === $slug )
1310
  $value = esc_attr( apply_filters( 'editable_slug', $value ) );
1311
 
1312
  // Not a slug
1313
- else
1314
  $value = esc_attr( $value );
 
1315
 
1316
  // Fallback to default
1317
  if ( empty( $value ) )
@@ -1389,7 +1462,7 @@ function bbp_form_slug_conflict_check( $slug, $default ) {
1389
  /** BuddyPress Core *******************************************************/
1390
 
1391
  if ( defined( 'BP_VERSION' ) ) {
1392
- global $bp;
1393
 
1394
  // Loop through root slugs and check for conflict
1395
  if ( !empty( $bp->pages ) ) {
13
  /** Sections ******************************************************************/
14
 
15
  /**
16
+ * Get the Forums settings sections.
17
  *
18
  * @since bbPress (r4001)
19
  * @return array
20
  */
21
  function bbp_admin_get_settings_sections() {
22
+ return (array) apply_filters( 'bbp_admin_get_settings_sections', array(
23
  'bbp_settings_main' => array(
24
  'title' => __( 'Main Settings', 'bbpress' ),
25
  'callback' => 'bbp_admin_setting_callback_main_section',
70
  * @return type
71
  */
72
  function bbp_admin_get_settings_fields() {
73
+ return (array) apply_filters( 'bbp_admin_get_settings_fields', array(
74
 
75
  /** Main Section ******************************************************/
76
 
78
 
79
  // Edit lock setting
80
  '_bbp_edit_lock' => array(
81
+ 'title' => __( 'Disallow editing after', 'bbpress' ),
82
  'callback' => 'bbp_admin_setting_callback_editlock',
83
  'sanitize_callback' => 'intval',
84
  'args' => array()
86
 
87
  // Throttle setting
88
  '_bbp_throttle_time' => array(
89
+ 'title' => __( 'Throttle posting every', 'bbpress' ),
90
  'callback' => 'bbp_admin_setting_callback_throttle',
91
  'sanitize_callback' => 'intval',
92
  'args' => array()
94
 
95
  // Allow topic and reply revisions
96
  '_bbp_allow_revisions' => array(
97
+ 'title' => __( 'Revisions', 'bbpress' ),
98
  'callback' => 'bbp_admin_setting_callback_revisions',
99
  'sanitize_callback' => 'intval',
100
  'args' => array()
102
 
103
  // Allow favorites setting
104
  '_bbp_enable_favorites' => array(
105
+ 'title' => __( 'Favorites', 'bbpress' ),
106
  'callback' => 'bbp_admin_setting_callback_favorites',
107
  'sanitize_callback' => 'intval',
108
  'args' => array()
110
 
111
  // Allow subscriptions setting
112
  '_bbp_enable_subscriptions' => array(
113
+ 'title' => __( 'Subscriptions', 'bbpress' ),
114
  'callback' => 'bbp_admin_setting_callback_subscriptions',
115
  'sanitize_callback' => 'intval',
116
  'args' => array()
117
  ),
118
 
119
+ // Allow topic tags
120
+ '_bbp_allow_topic_tags' => array(
121
+ 'title' => __( 'Topic tags', 'bbpress' ),
122
+ 'callback' => 'bbp_admin_setting_callback_topic_tags',
123
+ 'sanitize_callback' => 'intval',
124
+ 'args' => array()
125
+ ),
126
+
127
  // Allow anonymous posting setting
128
  '_bbp_allow_anonymous' => array(
129
+ 'title' => __( 'Anonymous posting', 'bbpress' ),
130
  'callback' => 'bbp_admin_setting_callback_anonymous',
131
  'sanitize_callback' => 'intval',
132
  'args' => array()
133
  ),
134
 
135
+ // Allow global access (on multisite)
136
+ '_bbp_default_role' => array(
137
+ 'title' => __( 'Default user role', 'bbpress' ),
138
+ 'callback' => 'bbp_admin_setting_callback_default_role',
139
+ 'sanitize_callback' => 'sanitize_text_field',
140
+ 'args' => array()
141
+ ),
142
+
143
  // Allow global access (on multisite)
144
  '_bbp_allow_global_access' => array(
145
+ 'title' => __( 'Auto role', 'bbpress' ),
146
  'callback' => 'bbp_admin_setting_callback_global_access',
147
  'sanitize_callback' => 'intval',
148
  'args' => array()
150
 
151
  // Allow fancy editor setting
152
  '_bbp_use_wp_editor' => array(
153
+ 'title' => __( 'Fancy editor', 'bbpress' ),
154
  'callback' => 'bbp_admin_setting_callback_use_wp_editor',
155
  'args' => array(),
156
  'sanitize_callback' => 'intval'
158
 
159
  // Allow auto embedding setting
160
  '_bbp_use_autoembed' => array(
161
+ 'title' => __( 'Auto-embed links', 'bbpress' ),
162
  'callback' => 'bbp_admin_setting_callback_use_autoembed',
163
  'sanitize_callback' => 'intval',
164
  'args' => array()
354
  $fields = bbp_admin_get_settings_fields();
355
  $retval = isset( $fields[$section_id] ) ? $fields[$section_id] : false;
356
 
357
+ return (array) apply_filters( 'bbp_admin_get_settings_fields_for_section', $retval, $section_id );
358
  }
359
 
360
  /** Main Section **************************************************************/
382
  function bbp_admin_setting_callback_editlock() {
383
  ?>
384
 
385
+ <input name="_bbp_edit_lock" type="number" min="0" step="1" id="_bbp_edit_lock" value="<?php bbp_form_option( '_bbp_edit_lock', '5' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_edit_lock' ); ?> />
386
  <label for="_bbp_edit_lock"><?php _e( 'minutes', 'bbpress' ); ?></label>
387
 
388
  <?php
398
  function bbp_admin_setting_callback_throttle() {
399
  ?>
400
 
401
+ <input name="_bbp_throttle_time" type="number" min="0" step="1" id="_bbp_throttle_time" value="<?php bbp_form_option( '_bbp_throttle_time', '10' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_throttle_time' ); ?> />
402
  <label for="_bbp_throttle_time"><?php _e( 'seconds', 'bbpress' ); ?></label>
403
 
404
  <?php
414
  function bbp_admin_setting_callback_favorites() {
415
  ?>
416
 
417
+ <input id="_bbp_enable_favorites" name="_bbp_enable_favorites" type="checkbox" id="_bbp_enable_favorites" value="1" <?php checked( bbp_is_favorites_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_favorites' ); ?> />
418
  <label for="_bbp_enable_favorites"><?php _e( 'Allow users to mark topics as favorites', 'bbpress' ); ?></label>
419
 
420
  <?php
430
  function bbp_admin_setting_callback_subscriptions() {
431
  ?>
432
 
433
+ <input id="_bbp_enable_subscriptions" name="_bbp_enable_subscriptions" type="checkbox" id="_bbp_enable_subscriptions" value="1" <?php checked( bbp_is_subscriptions_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_subscriptions' ); ?> />
434
  <label for="_bbp_enable_subscriptions"><?php _e( 'Allow users to subscribe to topics', 'bbpress' ); ?></label>
435
 
436
  <?php
437
  }
438
 
439
+ /**
440
+ * Allow topic tags setting field
441
+ *
442
+ * @since bbPress (r####)
443
+ *
444
+ * @uses checked() To display the checked attribute
445
+ */
446
+ function bbp_admin_setting_callback_topic_tags() {
447
+ ?>
448
+
449
+ <input id="_bbp_allow_topic_tags" name="_bbp_allow_topic_tags" type="checkbox" id="_bbp_allow_topic_tags" value="1" <?php checked( bbp_allow_topic_tags( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_topic_tags' ); ?> />
450
+ <label for="_bbp_allow_topic_tags"><?php _e( 'Allow topics to have tags', 'bbpress' ); ?></label>
451
+
452
+ <?php
453
+ }
454
+
455
  /**
456
  * Allow topic and reply revisions
457
  *
462
  function bbp_admin_setting_callback_revisions() {
463
  ?>
464
 
465
+ <input id="_bbp_allow_revisions" name="_bbp_allow_revisions" type="checkbox" id="_bbp_allow_revisions" value="1" <?php checked( bbp_allow_revisions( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_revisions' ); ?> />
466
  <label for="_bbp_allow_revisions"><?php _e( 'Allow topic and reply revision logging', 'bbpress' ); ?></label>
467
 
468
  <?php
478
  function bbp_admin_setting_callback_anonymous() {
479
  ?>
480
 
481
+ <input id="_bbp_allow_anonymous" name="_bbp_allow_anonymous" type="checkbox" id="_bbp_allow_anonymous" value="1" <?php checked( bbp_allow_anonymous( false ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_anonymous' ); ?> />
482
  <label for="_bbp_allow_anonymous"><?php _e( 'Allow guest users without accounts to create topics and replies', 'bbpress' ); ?></label>
483
 
484
  <?php
494
  function bbp_admin_setting_callback_global_access() {
495
  ?>
496
 
497
+ <input id="_bbp_allow_global_access" name="_bbp_allow_global_access" type="checkbox" id="_bbp_allow_global_access" value="1" <?php checked( bbp_allow_global_access( false ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_global_access' ); ?> />
498
+ <label for="_bbp_allow_global_access"><?php _e( 'Automatically assign default role to new, registered users upon visiting the site.', 'bbpress' ); ?></label>
499
 
500
  <?php
501
  }
502
 
503
+ /**
504
+ * Output forum role selector (for user edit)
505
+ *
506
+ * @since bbPress (r4284)
507
+ */
508
+ function bbp_admin_setting_callback_default_role() {
509
+
510
+ $default_role = bbp_get_default_role(); ?>
511
+
512
+ <select name="_bbp_default_role" id="_bbp_default_role" <?php bbp_maybe_admin_setting_disabled( '_bbp_default_role' ); ?>>
513
+
514
+ <?php foreach ( bbp_get_dynamic_roles() as $role => $details ) : ?>
515
+
516
+ <option <?php selected( $default_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>
517
+
518
+ <?php endforeach; ?>
519
+
520
+ </select>
521
+
522
+ <?php
523
+ }
524
+
525
  /**
526
  * Use the WordPress editor setting field
527
  *
532
  function bbp_admin_setting_callback_use_wp_editor() {
533
  ?>
534
 
535
+ <input id="_bbp_use_wp_editor" name="_bbp_use_wp_editor" type="checkbox" id="_bbp_use_wp_editor" value="1" <?php checked( bbp_use_wp_editor( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_use_wp_editor' ); ?> />
536
  <label for="_bbp_use_wp_editor"><?php _e( 'Use the fancy WordPress editor to create and edit topics and replies', 'bbpress' ); ?></label>
537
 
538
  <?php
564
  $theme_options = '';
565
  $current_package = bbp_get_theme_package_id( 'default' );
566
 
567
+ // Note: This should never be empty. /templates/ is the
568
  // canonical backup if no other packages exist. If there's an error here,
569
  // something else is wrong.
570
  //
575
 
576
  if ( !empty( $theme_options ) ) : ?>
577
 
578
+ <select name="_bbp_theme_package_id" id="_bbp_theme_package_id" <?php bbp_maybe_admin_setting_disabled( '_bbp_theme_package_id' ); ?>><?php echo $theme_options ?></select>
579
  <label for="_bbp_theme_package_id"><?php _e( 'will serve all bbPress templates', 'bbpress' ); ?></label>
580
 
581
  <?php else : ?>
582
 
583
+ <p><?php _e( 'No template packages available.', 'bbpress' ); ?></p>
 
584
 
585
  <?php endif;
586
  }
595
  function bbp_admin_setting_callback_use_autoembed() {
596
  ?>
597
 
598
+ <input id="_bbp_use_autoembed" name="_bbp_use_autoembed" type="checkbox" id="_bbp_use_autoembed" value="1" <?php checked( bbp_use_autoembed( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_use_autoembed' ); ?> />
599
+ <label for="_bbp_use_autoembed"><?php _e( 'Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and replies', 'bbpress' ); ?></label>
600
 
601
  <?php
602
  }
626
  function bbp_admin_setting_callback_topics_per_page() {
627
  ?>
628
 
629
+ <input name="_bbp_topics_per_page" type="number" min="1" step="1" id="_bbp_topics_per_page" value="<?php bbp_form_option( '_bbp_topics_per_page', '15' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_topics_per_page' ); ?> />
630
  <label for="_bbp_topics_per_page"><?php _e( 'per page', 'bbpress' ); ?></label>
631
 
632
  <?php
642
  function bbp_admin_setting_callback_replies_per_page() {
643
  ?>
644
 
645
+ <input name="_bbp_replies_per_page" type="number" min="1" step="1" id="_bbp_replies_per_page" value="<?php bbp_form_option( '_bbp_replies_per_page', '15' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_replies_per_page' ); ?> />
646
  <label for="_bbp_replies_per_page"><?php _e( 'per page', 'bbpress' ); ?></label>
647
 
648
  <?php
673
  function bbp_admin_setting_callback_topics_per_rss_page() {
674
  ?>
675
 
676
+ <input name="_bbp_topics_per_rss_page" type="number" min="1" step="1" id="_bbp_topics_per_rss_page" value="<?php bbp_form_option( '_bbp_topics_per_rss_page', '25' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_topics_per_rss_page' ); ?> />
677
  <label for="_bbp_topics_per_rss_page"><?php _e( 'per page', 'bbpress' ); ?></label>
678
 
679
  <?php
689
  function bbp_admin_setting_callback_replies_per_rss_page() {
690
  ?>
691
 
692
+ <input name="_bbp_replies_per_rss_page" type="number" min="1" step="1" id="_bbp_replies_per_rss_page" value="<?php bbp_form_option( '_bbp_replies_per_rss_page', '25' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_replies_per_rss_page' ); ?> />
693
  <label for="_bbp_replies_per_rss_page"><?php _e( 'per page', 'bbpress' ); ?></label>
694
 
695
  <?php
723
  function bbp_admin_setting_callback_root_slug() {
724
  ?>
725
 
726
+ <input name="_bbp_root_slug" type="text" id="_bbp_root_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_root_slug', 'forums', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_root_slug' ); ?> />
727
 
728
  <?php
729
  // Slug Check
740
  function bbp_admin_setting_callback_topic_archive_slug() {
741
  ?>
742
 
743
+ <input name="_bbp_topic_archive_slug" type="text" id="_bbp_topic_archive_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_topic_archive_slug', 'topics', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_topic_archive_slug' ); ?> />
744
 
745
  <?php
746
  // Slug Check
772
  function bbp_admin_setting_callback_include_root() {
773
  ?>
774
 
775
+ <input id="_bbp_include_root" name="_bbp_include_root" type="checkbox" id="_bbp_include_root" value="1" <?php checked( get_option( '_bbp_include_root', true ) ); bbp_maybe_admin_setting_disabled( '_bbp_include_root' ); ?> />
776
  <label for="_bbp_include_root"><?php _e( 'Prefix your forum area with the Forum Base slug (Recommended)', 'bbpress' ); ?></label>
777
 
778
  <?php
788
  function bbp_admin_setting_callback_forum_slug() {
789
  ?>
790
 
791
+ <input name="_bbp_forum_slug" type="text" id="_bbp_forum_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_forum_slug', 'forum', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_forum_slug' ); ?> />
792
 
793
  <?php
794
  // Slug Check
805
  function bbp_admin_setting_callback_topic_slug() {
806
  ?>
807
 
808
+ <input name="_bbp_topic_slug" type="text" id="_bbp_topic_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_topic_slug', 'topic', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_topic_slug' ); ?> />
809
 
810
  <?php
811
  // Slug Check
822
  function bbp_admin_setting_callback_reply_slug() {
823
  ?>
824
 
825
+ <input name="_bbp_reply_slug" type="text" id="_bbp_reply_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_reply_slug', 'reply', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_reply_slug' ); ?> />
826
 
827
  <?php
828
  // Slug Check
839
  function bbp_admin_setting_callback_topic_tag_slug() {
840
  ?>
841
 
842
+ <input name="_bbp_topic_tag_slug" type="text" id="_bbp_topic_tag_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_topic_tag_slug', 'topic-tag', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_topic_tag_slug' ); ?> />
843
 
844
  <?php
845
 
859
  function bbp_admin_setting_callback_user_slug() {
860
  ?>
861
 
862
+ <input name="_bbp_user_slug" type="text" id="_bbp_user_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_user_slug', 'users', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_user_slug' ); ?> />
863
 
864
  <?php
865
  // Slug Check
876
  function bbp_admin_setting_callback_view_slug() {
877
  ?>
878
 
879
+ <input name="_bbp_view_slug" type="text" id="_bbp_view_slug" class="regular-text code" value="<?php bbp_form_option( '_bbp_view_slug', 'view', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_view_slug' ); ?> />
880
 
881
  <?php
882
  // Slug Check
908
  function bbp_admin_setting_callback_group_forums() {
909
  ?>
910
 
911
+ <input id="_bbp_enable_group_forums" name="_bbp_enable_group_forums" type="checkbox" id="_bbp_enable_group_forums" value="1" <?php checked( bbp_is_group_forums_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_group_forums' ); ?> />
912
  <label for="_bbp_enable_group_forums"><?php _e( 'Allow BuddyPress Groups to have their own forums', 'bbpress' ); ?></label>
913
 
914
  <?php
922
  * @uses bbp_form_option() To output the option value
923
  */
924
  function bbp_admin_setting_callback_group_forums_root_id() {
 
925
 
926
+ // Output the dropdown for all forums
927
+ bbp_dropdown( array(
928
+ 'selected' => bbp_get_group_forums_root_id(),
929
+ 'show_none' => __( '&mdash; Forum root &mdash;', 'bbpress' ),
930
+ 'orderby' => 'title',
931
+ 'order' => 'ASC',
932
+ 'select_id' => '_bbp_group_forums_root_id',
933
+ 'disable_categories' => false,
934
+ 'disabled' => '_bbp_group_forums_root_id'
935
+ ) ); ?>
936
 
937
  <label for="_bbp_group_forums_root_id"><?php _e( 'is the parent for all group forums', 'bbpress' ); ?></label>
938
  <p class="description"><?php _e( 'Using the Forum Root is not recommended. Changing this does not move existing forums.', 'bbpress' ); ?></p>
966
  function bbp_admin_setting_callback_akismet() {
967
  ?>
968
 
969
+ <input id="_bbp_enable_akismet" name="_bbp_enable_akismet" type="checkbox" id="_bbp_enable_akismet" value="1" <?php checked( bbp_is_akismet_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_akismet' ); ?> />
970
  <label for="_bbp_enable_akismet"><?php _e( 'Allow Akismet to actively prevent forum spam.', 'bbpress' ); ?></label>
971
 
972
  <?php
990
 
991
  <?php screen_icon(); ?>
992
 
993
+ <h2><?php _e( 'Forums Settings', 'bbpress' ) ?></h2>
994
 
995
  <form action="options.php" method="post">
996
 
999
  <?php do_settings_sections( 'bbpress' ); ?>
1000
 
1001
  <p class="submit">
1002
+ <input type="submit" name="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'bbpress' ); ?>" />
1003
  </p>
1004
  </form>
1005
  </div>
1030
  */
1031
  function bbp_converter_setting_callback_platform() {
1032
 
1033
+ $platform_options = '';
1034
+ $curdir = opendir( bbpress()->admin->admin_dir . 'converters/' );
1035
 
1036
+ // Bail if no directory was found (how did this happen?)
1037
+ if ( empty( $curdir ) )
1038
+ return;
1039
+
1040
+ // Loop through files in the converters folder and assemble some options
1041
+ while ( $file = readdir( $curdir ) ) {
1042
+ if ( ( stristr( $file, '.php' ) ) && ( stristr( $file, 'index' ) === false ) ) {
1043
+ $file = preg_replace( '/.php/', '', $file );
1044
+ $platform_options .= '<option value="' . $file . '">' . $file . '</option>';
1045
  }
1046
+ }
1047
+
1048
+ closedir( $curdir ); ?>
1049
 
1050
  <select name="_bbp_converter_platform" id="_bbp_converter_platform" /><?php echo $platform_options ?></select>
1051
  <label for="_bbp_converter_platform"><?php _e( 'is the previous forum software', 'bbpress' ); ?></label>
1250
  <?php do_settings_sections( 'bbpress_converter' ); ?>
1251
 
1252
  <p class="submit">
1253
+ <input type="button" name="submit" class="button-primary" id="bbp-converter-start" value="<?php esc_attr_e( 'Start', 'bbpress' ); ?>" onclick="bbconverter_start()" />
1254
+ <input type="button" name="submit" class="button-primary" id="bbp-converter-stop" value="<?php esc_attr_e( 'Stop', 'bbpress' ); ?>" onclick="bbconverter_stop()" />
1255
  <img id="bbp-converter-progress" src="">
1256
  </p>
1257
 
1265
  /** Helpers *******************************************************************/
1266
 
1267
  /**
1268
+ * Contextual help for Forums settings page
1269
  *
1270
  * @since bbPress (r3119)
1271
  * @uses get_current_screen()
1282
  $current_screen->add_help_tab( array(
1283
  'id' => 'overview',
1284
  'title' => __( 'Overview', 'bbpress' ),
1285
+ 'content' => '<p>' . __( 'This screen provides access to all of the Forums settings.', 'bbpress' ) . '</p>' .
1286
  '<p>' . __( 'Please see the additional help tabs for more information on each indiviual section.', 'bbpress' ) . '</p>'
1287
  ) );
1288
 
1297
  '<li>' . __( '"Throttle time" is the amount of time required between posts from a single author. The higher the throttle time, the longer a user will need to wait between posting to the forum.', 'bbpress' ) . '</li>' .
1298
  '<li>' . __( 'Favorites are a way for users to save and later return to topics they favor. This is enabled by default.', 'bbpress' ) . '</li>' .
1299
  '<li>' . __( 'Subscriptions allow users to subscribe for notifications to topics that interest them. This is enabled by default.', 'bbpress' ) . '</li>' .
1300
+ '<li>' . __( 'Topic-Tags allow users to filter topics between forums. This is enabled by default.', 'bbpress' ) . '</li>' .
1301
  '<li>' . __( '"Anonymous Posting" allows guest users who do not have accounts on your site to both create topics as well as replies.', 'bbpress' ) . '</li>' .
1302
  '<li>' . __( 'The Fancy Editor brings the luxury of the Visual editor and HTML editor from the traditional WordPress dashboard into your theme.', 'bbpress' ) . '</li>' .
1303
  '<li>' . __( 'Auto-embed will embed the media content from a URL directly into the replies. For example: links to Flickr and YouTube.', 'bbpress' ) . '</li>' .
1333
  );
1334
  }
1335
 
1336
+ /**
1337
+ * Disable a settings field if the value is forcibly set in bbPress's global
1338
+ * options array.
1339
+ *
1340
+ * @since bbPress (r4347)
1341
+ *
1342
+ * @param string $option_key
1343
+ */
1344
+ function bbp_maybe_admin_setting_disabled( $option_key = '' ) {
1345
+ disabled( isset( bbpress()->options[$option_key] ) );
1346
+ }
1347
+
1348
  /**
1349
  * Output settings API option
1350
  *
1378
  $value = get_option( $option, $default );
1379
 
1380
  // Slug?
1381
+ if ( true === $slug ) {
1382
  $value = esc_attr( apply_filters( 'editable_slug', $value ) );
1383
 
1384
  // Not a slug
1385
+ } else {
1386
  $value = esc_attr( $value );
1387
+ }
1388
 
1389
  // Fallback to default
1390
  if ( empty( $value ) )
1462
  /** BuddyPress Core *******************************************************/
1463
 
1464
  if ( defined( 'BP_VERSION' ) ) {
1465
+ $bp = buddypress();
1466
 
1467
  // Loop through root slugs and check for conflict
1468
  if ( !empty( $bp->pages ) ) {
bbp-admin/styles/admin.dev.css → includes/admin/styles/green-34.css RENAMED
@@ -1,3 +1,5 @@
 
 
1
  /*------------------------------------------------------------------------------
2
 
3
 
@@ -1163,7 +1165,7 @@ table.widefat .spam a:hover,
1163
  background-color: transparent;
1164
  background-repeat: no-repeat;
1165
  background-attachment: scroll;
1166
- background-position: -271px -31px;
1167
  }
1168
 
1169
  .icon16.icon-media,
@@ -1993,7 +1995,7 @@ div.widgets-sortables,
1993
  ------------------------------------------------------------------------------*/
1994
 
1995
  .rtl .bar {
1996
- border-right-color: transparent;
1997
  border-left-color: #99d;
1998
  }
1999
 
@@ -2026,7 +2028,7 @@ div.widgets-sortables,
2026
  }
2027
 
2028
  .rtl #adminmenu .wp-submenu .wp-submenu-head {
2029
- border-right-color: transparent;
2030
  border-left-color: #dfdfdf;
2031
  }
2032
 
@@ -2061,7 +2063,7 @@ div.widgets-sortables,
2061
  }
2062
 
2063
  .rtl #post-body .misc-pub-section {
2064
- border-right-color: transparent;
2065
  border-left-color: #eee;
2066
  }
2067
 
@@ -2075,4 +2077,4 @@ div.widgets-sortables,
2075
  background-color: transparent;
2076
  background-repeat: no-repeat;
2077
  background-position: 5px 9px;
2078
- }
1
+
2
+
3
  /*------------------------------------------------------------------------------
4
 
5
 
1165
  background-color: transparent;
1166
  background-repeat: no-repeat;
1167
  background-attachment: scroll;
1168
+ background-position: -271px -33px;
1169
  }
1170
 
1171
  .icon16.icon-media,
1995
  ------------------------------------------------------------------------------*/
1996
 
1997
  .rtl .bar {
1998
+ border-right-color: none;
1999
  border-left-color: #99d;
2000
  }
2001
 
2028
  }
2029
 
2030
  .rtl #adminmenu .wp-submenu .wp-submenu-head {
2031
+ border-right-color: none;
2032
  border-left-color: #dfdfdf;
2033
  }
2034
 
2063
  }
2064
 
2065
  .rtl #post-body .misc-pub-section {
2066
+ border-right-color: none;
2067
  border-left-color: #eee;
2068
  }
2069
 
2077
  background-color: transparent;
2078
  background-repeat: no-repeat;
2079
  background-position: 5px 9px;
2080
+ }
includes/admin/styles/green-34.dev.css ADDED
@@ -0,0 +1,2080 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ /*------------------------------------------------------------------------------
4
+
5
+
6
+ Howdy! This is the CSS file that controls the
7
+ Green (minty) color style on the WordPress Dashboard.
8
+
9
+ This file contains both LTR and RTL styles.
10
+
11
+
12
+ TABLE OF CONTENTS:
13
+ ------------------
14
+ 1.0 - Left to Right Styles
15
+ 2.0 - Right to Left Styles
16
+
17
+
18
+ ------------------------------------------------------------------------------*/
19
+
20
+
21
+ /*------------------------------------------------------------------------------
22
+ 1.0 - Left to Right Styles
23
+ ------------------------------------------------------------------------------*/
24
+
25
+ html,
26
+ .wp-dialog {
27
+ background-color: #fff;
28
+ }
29
+
30
+ textarea,
31
+ input[type="text"],
32
+ input[type="password"],
33
+ input[type="file"],
34
+ input[type="button"],
35
+ input[type="submit"],
36
+ input[type="reset"],
37
+ input[type="email"],
38
+ input[type="number"],
39
+ input[type="search"],
40
+ input[type="tel"],
41
+ input[type="url"],
42
+ select {
43
+ border-color: #dfdfdf;
44
+ background-color: #fff;
45
+ }
46
+
47
+ textarea:focus,
48
+ input[type="text"]:focus,
49
+ input[type="password"]:focus,
50
+ input[type="file"]:focus,
51
+ input[type="button"]:focus,
52
+ input[type="submit"]:focus,
53
+ input[type="reset"]:focus,
54
+ input[type="email"]:focus,
55
+ input[type="number"]:focus,
56
+ input[type="search"]:focus,
57
+ input[type="tel"]:focus,
58
+ input[type="url"]:focus,
59
+ select:focus {
60
+ border-color: #bbb;
61
+ }
62
+
63
+ kbd,
64
+ code {
65
+ background: #eaeaea;
66
+ }
67
+
68
+ input[readonly] {
69
+ background-color: #eee;
70
+ }
71
+
72
+ .find-box-search {
73
+ border-color: #dfdfdf;
74
+ background-color: #f1f1f1;
75
+ }
76
+
77
+ .find-box {
78
+ background-color: #f1f1f1;
79
+ }
80
+
81
+ .find-box-inside {
82
+ background-color: #fff;
83
+ }
84
+
85
+ a.page-numbers:hover {
86
+ border-color: #999;
87
+ }
88
+
89
+ body,
90
+ #wpbody,
91
+ .form-table .pre {
92
+ color: #333;
93
+ }
94
+
95
+ body > #upload-menu {
96
+ border-bottom-color: #fff;
97
+ }
98
+
99
+ #postcustomstuff table,
100
+ #your-profile fieldset,
101
+ #rightnow,
102
+ div.dashboard-widget,
103
+ #dashboard-widgets p.dashboard-widget-links {
104
+ border-color: #ccc;
105
+ }
106
+
107
+ #poststuff .inside label.spam,
108
+ #poststuff .inside label.deleted {
109
+ color: red;
110
+ }
111
+
112
+ #poststuff .inside label.waiting {
113
+ color: orange;
114
+ }
115
+
116
+ #poststuff .inside label.approved {
117
+ color: green;
118
+ }
119
+
120
+ #postcustomstuff table {
121
+ border-color: #dfdfdf;
122
+ background-color: #F9F9F9;
123
+ }
124
+
125
+ #postcustomstuff thead th {
126
+ background-color: #F1F1F1;
127
+ }
128
+
129
+ .widefat {
130
+ border-color: #dfdfdf;
131
+ background-color: #eefcf1;
132
+ }
133
+ textarea.widefat {
134
+ background-color: #fff;
135
+ }
136
+
137
+ div.dashboard-widget-error {
138
+ background-color: #c43;
139
+ }
140
+
141
+ div.dashboard-widget-notice {
142
+ background-color: #cfe1ef;
143
+ }
144
+
145
+ div.dashboard-widget-submit {
146
+ border-top-color: #ccc;
147
+ }
148
+
149
+ div.tabs-panel,
150
+ .wp-tab-panel,
151
+ ul.category-tabs li.tabs,
152
+ ul.add-menu-item-tabs li.tabs,
153
+ .wp-tab-active {
154
+ border-color: #dfdfdf;
155
+ background-color: #fff;
156
+ }
157
+
158
+ ul.category-tabs li.tabs,
159
+ ul.add-menu-item-tabs li.tabs,
160
+ .wp-tab-active {
161
+ background-color: #fff;
162
+ }
163
+
164
+ input.disabled,
165
+ textarea.disabled {
166
+ background-color: #ccc;
167
+ }
168
+ /* #upload-menu li a.upload-tab-link, */
169
+ #plugin-information .action-button a,
170
+ #plugin-information .action-button a:hover,
171
+ #plugin-information .action-button a:visited {
172
+ color: #fff;
173
+ }
174
+
175
+ .widget .widget-top,
176
+ .postbox h3,
177
+ .stuffbox h3,
178
+ .widefat thead tr th,
179
+ .widefat tfoot tr th,
180
+ h3.dashboard-widget-title,
181
+ h3.dashboard-widget-title span,
182
+ h3.dashboard-widget-title small,
183
+ .find-box-head,
184
+ .sidebar-name,
185
+ #nav-menu-header,
186
+ #nav-menu-footer,
187
+ .menu-item-handle,
188
+ #fullscreen-topbar {
189
+ background-color: #f1f1f1; /* Fallback */
190
+ background-image: -ms-linear-gradient(top, #eefcf1, #deece1); /* IE10 */
191
+ background-image: -moz-linear-gradient(top, #eefcf1, #deece1); /* Firefox */
192
+ background-image: -o-linear-gradient(top, #eefcf1, #deece1); /* Opera */
193
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eefcf1), to(#deece1)); /* old Webkit */
194
+ background-image: -webkit-linear-gradient(top, #eefcf1, #deece1); /* new Webkit */
195
+ background-image: linear-gradient(top, #eefcf1, #deece1); /* proposed W3C Markup */
196
+ }
197
+
198
+ .widget .widget-top,
199
+ .postbox h3,
200
+ .stuffbox h3 {
201
+ border-bottom-color: #dfdfdf;
202
+ text-shadow: #fff 0 1px 0;
203
+ -moz-box-shadow: 0 1px 0 #fff;
204
+ -webkit-box-shadow: 0 1px 0 #fff;
205
+ box-shadow: 0 1px 0 #fff;
206
+ }
207
+
208
+ .form-table th,
209
+ .form-wrap label {
210
+ color: #222;
211
+ text-shadow: #fff 0 1px 0;
212
+ }
213
+
214
+ .description,
215
+ .form-wrap p {
216
+ color: #666;
217
+ }
218
+
219
+ strong .post-com-count span {
220
+ background-color: #007700;
221
+ }
222
+
223
+ .sorthelper {
224
+ background-color: #ccf3fa;
225
+ }
226
+
227
+ .ac_match,
228
+ .subsubsub a.current {
229
+ color: #000;
230
+ }
231
+
232
+ .wrap h2 {
233
+ color: #464646;
234
+ }
235
+
236
+ .wrap .add-new-h2 {
237
+ background: #f1f1f1;
238
+ }
239
+
240
+ .subtitle {
241
+ color: #777;
242
+ }
243
+
244
+ .ac_over {
245
+ background-color: #f0f0b8;
246
+ }
247
+
248
+ .ac_results {
249
+ background-color: #fff;
250
+ border-color: #6EB469;
251
+ }
252
+
253
+ .ac_results li {
254
+ color: #101010;
255
+ }
256
+
257
+ .alternate,
258
+ .alt {
259
+ background-color: #fefefe;
260
+ }
261
+
262
+ .available-theme a.screenshot {
263
+ background-color: #f1f1f1;
264
+ border-color: #ddd;
265
+ }
266
+
267
+ .bar {
268
+ background-color: #e8e8e8;
269
+ border-right-color: #99d;
270
+ }
271
+
272
+ #media-upload,
273
+ #media-upload .media-item .slidetoggle {
274
+ background: #fff;
275
+ }
276
+
277
+ #media-upload .slidetoggle {
278
+ border-top-color: #dfdfdf;
279
+ }
280
+
281
+ div.error,
282
+ .login #login_error {
283
+ background-color: #ffebe8;
284
+ border-color: #c00;
285
+ }
286
+
287
+ div.error a {
288
+ color: #c00;
289
+ }
290
+
291
+ .form-invalid {
292
+ background-color: #ffebe8 !important;
293
+ }
294
+
295
+ .form-invalid input,
296
+ .form-invalid select {
297
+ border-color: #c00 !important;
298
+ }
299
+
300
+ .submit {
301
+ border-color: #DFDFDF;
302
+ }
303
+
304
+ .highlight {
305
+ background-color: #e4f2fd;
306
+ color: #000;
307
+ }
308
+
309
+ .howto,
310
+ .nonessential,
311
+ #edit-slug-box,
312
+ .form-input-tip,
313
+ .subsubsub {
314
+ color: #666;
315
+ }
316
+
317
+ #wpbody-content #media-items .describe {
318
+ border-top-color: #dfdfdf;
319
+ }
320
+
321
+ .media-upload-form label.form-help,
322
+ td.help {
323
+ color: #9a9a9a;
324
+ }
325
+
326
+ .post-com-count {
327
+ color: #fff;
328
+ }
329
+
330
+ .post-com-count span {
331
+ background-color: #bbb;
332
+ color: #fff;
333
+ }
334
+
335
+ .post-com-count:hover span {
336
+ background-color: #d54e21;
337
+ }
338
+
339
+ .quicktags, .search {
340
+ background-color: #ccc;
341
+ color: #000;
342
+ }
343
+
344
+ .side-info h5 {
345
+ border-bottom-color: #dadada;
346
+ }
347
+
348
+ .side-info ul {
349
+ color: #666;
350
+ }
351
+
352
+ .button,
353
+ .button-secondary,
354
+ .submit input,
355
+ input[type=button],
356
+ input[type=submit] {
357
+ border-color: #bbb;
358
+ color: #464646;
359
+ }
360
+
361
+ .button:hover,
362
+ .button-secondary:hover,
363
+ .submit input:hover,
364
+ input[type=button]:hover,
365
+ input[type=submit]:hover {
366
+ color: #000;
367
+ border-color: #666;
368
+ }
369
+
370
+ .button,
371
+ .submit input,
372
+ .button-secondary {
373
+ background-color: #f2f2f2;
374
+ background-repeat: repeat-x;
375
+ background-attachment: scroll;
376
+ background-position: left top;
377
+ text-shadow: rgba(255,255,255,1) 0 1px 0;
378
+ }
379
+
380
+ .button:active,
381
+ .submit input:active,
382
+ .button-secondary:active {
383
+ background-color: #eee;
384
+ background-repeat: repeat-x;
385
+ background-attachment: scroll;
386
+ background-position: left top;
387
+ }
388
+
389
+ input.button-primary,
390
+ button.button-primary,
391
+ a.button-primary {
392
+ border-color: #298cba;
393
+ font-weight: bold;
394
+ color: #fff;
395
+ background-image: url('../images/button-grad.png');
396
+ background-color: #007700;
397
+ background-repeat: repeat-x;
398
+ background-attachment: scroll;
399
+ background-position: left top;
400
+ text-shadow: rgba(0,0,0,0.3) 0 -1px 0;
401
+ }
402
+
403
+ input.button-primary:active,
404
+ button.button-primary:active,
405
+ a.button-primary:active {
406
+ background-image: url('../images/button-grad-active.png');
407
+ background-color: #007700;
408
+ background-repeat: repeat-x;
409
+ background-attachment: scroll;
410
+ background-position: left top;
411
+ color: #eaf2fa;
412
+ }
413
+
414
+ input.button-primary:hover,
415
+ button.button-primary:hover,
416
+ a.button-primary:hover,
417
+ a.button-primary:focus,
418
+ a.button-primary:active {
419
+ border-color: #13455b;
420
+ color: #eaf2fa;
421
+ }
422
+
423
+ .button-disabled,
424
+ .button[disabled],
425
+ .button:disabled,
426
+ .button-secondary[disabled],
427
+ .button-secondary:disabled,
428
+ a.button.disabled {
429
+ color: #aaa !important;
430
+ border-color: #ddd !important;
431
+ }
432
+
433
+ .button-primary-disabled,
434
+ .button-primary[disabled],
435
+ .button-primary:disabled {
436
+ color: #9FD0D5 !important;
437
+ background: #298CBA !important;
438
+ }
439
+
440
+ a:hover,
441
+ a:active,
442
+ a:focus {
443
+ color: #d54e21;
444
+ }
445
+
446
+ #adminmenu a:hover,
447
+ #adminmenu li.menu-top > a:focus,
448
+ #adminmenu ul.wp-submenu a:hover,
449
+ #the-comment-list .comment a:hover,
450
+ #rightnow a:hover,
451
+ #media-upload a.del-link:hover,
452
+ div.dashboard-widget-submit input:hover,
453
+ .subsubsub a:hover,
454
+ .subsubsub a.current:hover,
455
+ .ui-tabs-nav a:hover,
456
+ .plugins .inactive a:hover,
457
+ #all-plugins-table .plugins .inactive a:hover,
458
+ #search-plugins-table .plugins .inactive a:hover {
459
+ color: #d54e21;
460
+ }
461
+
462
+ #the-comment-list .comment-item,
463
+ #dashboard-widgets #dashboard_quick_press form p.submit {
464
+ border-color: #dfdfdf;
465
+ }
466
+
467
+ #side-sortables .category-tabs .tabs a,
468
+ #side-sortables .add-menu-item-tabs .tabs a,
469
+ .wp-tab-bar .wp-tab-active a {
470
+ color: #333;
471
+ }
472
+
473
+ #rightnow .rbutton {
474
+ background-color: #ebebeb;
475
+ color: #264761;
476
+ }
477
+
478
+ .submitbox .submit {
479
+ background-color: #464646;
480
+ color: #ccc;
481
+ }
482
+
483
+ .plugins a.delete:hover,
484
+ #all-plugins-table .plugins a.delete:hover,
485
+ #search-plugins-table .plugins a.delete:hover,
486
+ .submitbox .submitdelete {
487
+ color: #f00;
488
+ border-bottom-color: #f00;
489
+ }
490
+
491
+ .submitbox .submitdelete:hover,
492
+ #media-items a.delete:hover {
493
+ color: #fff;
494
+ background-color: #f00;
495
+ border-bottom-color: #f00;
496
+ }
497
+
498
+ #normal-sortables .submitbox .submitdelete:hover {
499
+ color: #000;
500
+ background-color: #f00;
501
+ border-bottom-color: #f00;
502
+ }
503
+
504
+ .tablenav .dots {
505
+ border-color: transparent;
506
+ }
507
+
508
+ .tablenav .next,
509
+ .tablenav .prev {
510
+ border-color: transparent;
511
+ color: #007700;
512
+ }
513
+
514
+ .tablenav .next:hover,
515
+ .tablenav .prev:hover {
516
+ border-color: transparent;
517
+ color: #d54e21;
518
+ }
519
+
520
+ div.updated,
521
+ .login .message {
522
+ background-color: #ffffe0;
523
+ border-color: #e6db55;
524
+ }
525
+
526
+ .update-message {
527
+ color: #000;
528
+ }
529
+
530
+ a.page-numbers {
531
+ border-bottom-color: #B8D3E2;
532
+ }
533
+
534
+ .commentlist li {
535
+ border-bottom-color: #ccc;
536
+ }
537
+
538
+ .widefat td,
539
+ .widefat th {
540
+ border-top-color: #fff;
541
+ border-bottom-color: #dfdfdf;
542
+ }
543
+
544
+ .widefat th {
545
+ text-shadow: rgba(255,255,255,0.8) 0 1px 0;
546
+ }
547
+
548
+ .widefat td {
549
+ color: #555;
550
+ }
551
+ .widefat p,
552
+ .widefat ol,
553
+ .widefat ul {
554
+ color: #333;
555
+ }
556
+
557
+ .widefat thead tr th,
558
+ .widefat tfoot tr th,
559
+ h3.dashboard-widget-title,
560
+ h3.dashboard-widget-title span,
561
+ h3.dashboard-widget-title small,
562
+ .find-box-head {
563
+ color: #333;
564
+ }
565
+
566
+ th.sortable a:hover, th.sortable a:active, th.sortable a:focus {
567
+ color: #333;
568
+ }
569
+
570
+ h3.dashboard-widget-title small a {
571
+ color: #d7d7d7;
572
+ }
573
+
574
+ h3.dashboard-widget-title small a:hover {
575
+ color: #fff;
576
+ }
577
+
578
+ a,
579
+ #adminmenu a,
580
+ #the-comment-list p.comment-author strong a,
581
+ #media-upload a.del-link,
582
+ #media-items a.delete,
583
+ .plugins a.delete,
584
+ .ui-tabs-nav a {
585
+ color: #007700;
586
+ }
587
+
588
+ #adminmenu .awaiting-mod,
589
+ #adminmenu .update-plugins,
590
+ #sidemenu a .update-plugins,
591
+ #rightnow .reallynow {
592
+ background-color: #464646;
593
+ color: #fff;
594
+ -moz-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
595
+ -khtml-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
596
+ -webkit-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
597
+ box-shadow: rgba(255,255,255,0.5) 0 1px 0;
598
+ }
599
+ #plugin-information .action-button {
600
+ background-color: #d54e21;
601
+ color: #fff;
602
+ }
603
+
604
+ #adminmenu li.current a .awaiting-mod,
605
+ #adminmenu li a.wp-has-current-submenu .update-plugins{
606
+ background-color: #464646;
607
+ color: #fff;
608
+ -moz-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
609
+ -khtml-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
610
+ -webkit-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
611
+ box-shadow: rgba(255,255,255,0.5) 0 1px 0;
612
+ }
613
+
614
+ div#media-upload-header,
615
+ div#plugin-information-header {
616
+ background-color: #eefcf1;
617
+ border-bottom-color: #dfdfdf;
618
+ }
619
+
620
+ #currenttheme img {
621
+ border-color: #666;
622
+ }
623
+
624
+ #dashboard_secondary div.dashboard-widget-content ul li a {
625
+ background-color: #eefcf1;
626
+ }
627
+
628
+ input.readonly, textarea.readonly {
629
+ background-color: #ddd;
630
+ }
631
+
632
+ #editable-post-name {
633
+ background-color: #fffbcc;
634
+ }
635
+
636
+ #edit-slug-box strong,
637
+ .tablenav .displaying-num,
638
+ #submitted-on,
639
+ .submitted-on {
640
+ color: #777;
641
+ }
642
+
643
+ .login #nav a,
644
+ .login #backtoblog a {
645
+ color: #007700 !important;
646
+ }
647
+
648
+ .login #nav a:hover,
649
+ .login #backtoblog a:hover {
650
+ color: #d54e21 !important;
651
+ }
652
+
653
+ #footer {
654
+ color: #777;
655
+ border-color: #dfdfdf;
656
+ }
657
+
658
+ #media-items,
659
+ .imgedit-group,
660
+ .media-item {
661
+ border-color: #dfdfdf;
662
+ }
663
+
664
+ .checkbox,
665
+ .side-info,
666
+ .plugins tr,
667
+ #your-profile #rich_editing {
668
+ background-color: #fcfcfc;
669
+ }
670
+
671
+ .plugins .inactive,
672
+ .plugins .inactive th,
673
+ .plugins .inactive td,
674
+ tr.inactive + tr.plugin-update-tr .plugin-update {
675
+ background-color: #f4f4f4;
676
+ }
677
+
678
+ .plugin-update-tr .update-message {
679
+ background-color: #fffbe4;
680
+ border-color: #dfdfdf;
681
+ }
682
+
683
+ .plugins .active,
684
+ .plugins .active th,
685
+ .plugins .active td {
686
+ color: #000;
687
+ }
688
+
689
+ .plugins .inactive a {
690
+ color: #557799;
691
+ }
692
+
693
+ #the-comment-list tr.undo,
694
+ #the-comment-list div.undo {
695
+ background-color: #f4f4f4;
696
+ }
697
+
698
+ #the-comment-list .unapproved {
699
+ background-color: #ffffe0;
700
+ }
701
+
702
+ #the-comment-list .approve a {
703
+ color: #006505;
704
+ }
705
+
706
+ #the-comment-list .unapprove a {
707
+ color: #d98500;
708
+ }
709
+
710
+ table.widefat span.delete a,
711
+ table.widefat span.trash a,
712
+ table.widefat span.spam a,
713
+ #dashboard_recent_comments .delete a,
714
+ #dashboard_recent_comments .trash a,
715
+ #dashboard_recent_comments .spam a {
716
+ color: #bc0b0b;
717
+ }
718
+
719
+ .welcome-panel {
720
+ border-color: #dfdfdf;
721
+ }
722
+ .welcome-panel p {
723
+ color: #777;
724
+ }
725
+ .welcome-panel-column p {
726
+ color: #464646;
727
+ }
728
+ .welcome-panel .welcome-panel-close {
729
+ background: #eee;
730
+ text-shadow: 1px 1px 1px #eee;
731
+ }
732
+ .welcome-panel h3 {
733
+ text-shadow: 1px 1px 1px white;
734
+ }
735
+
736
+ .widget,
737
+ #widget-list .widget-top,
738
+ .postbox,
739
+ #titlediv,
740
+ #poststuff .postarea,
741
+ .stuffbox {
742
+ border-color: #dfdfdf;
743
+ -moz-box-shadow: inset 0 1px 0 #fff;
744
+ -webkit-box-shadow: inset 0 1px 0 #fff;
745
+ box-shadow: inset 0 1px 0 #fff;
746
+ -moz-border-radius: 3px;
747
+ -khtml-border-radius: 3px;
748
+ -webkit-border-radius: 3px;
749
+ border-radius: 3px;
750
+ }
751
+
752
+ .widget,
753
+ #widget-list .widget-top,
754
+ .postbox,
755
+ .menu-item-settings {
756
+ background-color: #eefcf1; /* Fallback */
757
+ background-image: -ms-linear-gradient(top, #eefcf1, #deece1); /* IE10 */
758
+ background-image: -moz-linear-gradient(top, #eefcf1, #deece1); /* Firefox */
759
+ background-image: -o-linear-gradient(top, #eefcf1, #deece1); /* Opera */
760
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eefcf1), to(#deece1)); /* old Webkit */
761
+ background-image: -webkit-linear-gradient(top, #eefcf1, #deece1); /* new Webkit */
762
+ background-image: linear-gradient(top, #eefcf1, #deece1); /* proposed W3C Markup */
763
+ }
764
+
765
+ .postbox h3 {
766
+ color: #464646;
767
+ }
768
+
769
+ .widget .widget-top {
770
+ color: #222;
771
+ }
772
+
773
+ .sidebar-name:hover h3,
774
+ .postbox h3:hover {
775
+ color: #000;
776
+ }
777
+
778
+ #quicktags #ed_link {
779
+ color: #00f;
780
+ }
781
+
782
+ #rightnow .youhave {
783
+ background-color: #f0f6fb;
784
+ }
785
+
786
+ #rightnow a {
787
+ color: #448abd;
788
+ }
789
+
790
+ .tagchecklist span a,
791
+ #bulk-titles div a {
792
+
793
+ background-repeat: no-repeat;
794
+ }
795
+
796
+ .tagchecklist span a:hover,
797
+ #bulk-titles div a:hover {
798
+ background-repeat: no-repeat;
799
+ background-position: -10px 0;
800
+ }
801
+
802
+ #update-nag, .update-nag {
803
+ background-color: #FFFBCC;
804
+ border-color: #E6DB55;
805
+ color: #555;
806
+ }
807
+
808
+ #screen-meta {
809
+ background-color: #f1f1f1;
810
+ border-color: #ccc;
811
+ -webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 );
812
+ box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 );
813
+ }
814
+
815
+ .contextual-help-tabs a:hover {
816
+ color: #333;
817
+ }
818
+
819
+ .contextual-help-sidebar,
820
+ .contextual-help-tabs .active {
821
+ border-color: #ccc;
822
+ }
823
+
824
+ .contextual-help-tabs .active,
825
+ .contextual-help-tabs .active a,
826
+ .contextual-help-tabs .active a:hover {
827
+ background: #fff;
828
+ color: #000;
829
+ }
830
+
831
+ .contextual-help-tabs-wrap {
832
+ border-color: #ccc;
833
+ background-color: #fff;
834
+ }
835
+
836
+ /* screen options and help tabs */
837
+ #screen-options-link-wrap,
838
+ #contextual-help-link-wrap {
839
+ background-color: #e3e3e3; /* Fallback */
840
+ border-right: 1px solid transparent;
841
+ border-left: 1px solid transparent;
842
+ border-bottom: 1px solid transparent;
843
+ background-image: -ms-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* IE10 */
844
+ background-image: -moz-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Firefox */
845
+ background-image: -o-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Opera */
846
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#dfdfdf), to(#f1f1f1)); /* old Webkit */
847
+ background-image: -webkit-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* new Webkit */
848
+ background-image: linear-gradient(bottom, #dfdfdf, #f1f1f1); /* proposed W3C Markup */
849
+ }
850
+
851
+ #screen-meta-links a.show-settings {
852
+ color: #777;
853
+ }
854
+
855
+ #screen-meta-links a.show-settings:hover {
856
+ color: #000;
857
+ }
858
+
859
+ #screen-meta-links a.show-settings {
860
+ background-color: transparent;
861
+ background-repeat: no-repeat;
862
+ background-position: right 3px;
863
+ }
864
+
865
+ #screen-meta-links a.show-settings.screen-meta-active {
866
+ background-color: transparent;
867
+ background-repeat: no-repeat;
868
+ background-position: right -33px;
869
+ }
870
+
871
+ /* end screen options and help tabs */
872
+
873
+ .login #backtoblog a {
874
+ color: #464646;
875
+ }
876
+
877
+ #wphead {
878
+ border-bottom:#dfdfdf 1px solid;
879
+ }
880
+
881
+ #wphead h1 a {
882
+ color: #464646;
883
+ }
884
+
885
+ #footer a:link,
886
+ #footer a:visited {
887
+ text-decoration: none;
888
+ }
889
+
890
+ #footer a:hover {
891
+ color: #000;
892
+ text-decoration: underline;
893
+ }
894
+
895
+ .file-error,
896
+ abbr.required,
897
+ .widget-control-remove:hover,
898
+ table.widefat .delete a:hover,
899
+ table.widefat .trash a:hover,
900
+ table.widefat .spam a:hover,
901
+ #dashboard_recent_comments .delete a:hover,
902
+ #dashboard_recent_comments .trash a:hover
903
+ #dashboard_recent_comments .spam a:hover {
904
+ color: #f00;
905
+ }
906
+
907
+ #pass-strength-result {
908
+ background-color: #eee;
909
+ border-color: #ddd !important;
910
+ }
911
+
912
+ #pass-strength-result.bad {
913
+ background-color: #ffb78c;
914
+ border-color: #ff853c !important;
915
+ }
916
+
917
+ #pass-strength-result.good {
918
+ background-color: #ffec8b;
919
+ border-color: #fc0 !important;
920
+ }
921
+
922
+ #pass-strength-result.short {
923
+ background-color: #ffa0a0;
924
+ border-color: #f04040 !important;
925
+ }
926
+
927
+ #pass-strength-result.strong {
928
+ background-color: #c3ff88;
929
+ border-color: #8dff1c !important;
930
+ }
931
+
932
+ #titlediv #title {
933
+ border-color: #ccc;
934
+ }
935
+
936
+ #post-status-info {
937
+ border-color: #dfdfdf #ccc #ccc;
938
+ background-color: #eaeaea;
939
+ }
940
+
941
+ .editwidget .widget-inside {
942
+ border-color: #dfdfdf;
943
+ }
944
+
945
+ #titlediv #title {
946
+ background-color: #fff;
947
+ }
948
+
949
+ #tTips p#tTips_inside {
950
+ background-color: #ddd;
951
+ color: #333;
952
+ }
953
+
954
+ #timestampdiv input,
955
+ #namediv input,
956
+ #poststuff .inside .the-tagcloud {
957
+ border-color: #ddd;
958
+ }
959
+
960
+ /* menu */
961
+ #adminmenuback,
962
+ #adminmenuwrap {
963
+ background-color: #deece1;
964
+ border-color: #ccc;
965
+ }
966
+
967
+ #adminmenushadow,
968
+ #adminmenuback {
969
+ background-position: top right;
970
+ background-repeat: repeat-y;
971
+ }
972
+
973
+ #adminmenu li.wp-menu-separator {
974
+ background: #dfdfdf;
975
+ border-color: #cfcfcf;
976
+ }
977
+
978
+ #adminmenu div.separator {
979
+ border-color: #e1e1e1;
980
+ }
981
+
982
+ #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,
983
+ #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle {
984
+ background-color: transparent;
985
+ background-repeat: no-repeat;
986
+ background-position: -1px 6px;
987
+ }
988
+
989
+ #adminmenu .wp-has-submenu:hover .wp-menu-toggle,
990
+ #adminmenu .wp-menu-open .wp-menu-toggle {
991
+ background-color: transparent;
992
+ background-repeat: no-repeat;
993
+ background-position: -2px 6px;
994
+ }
995
+
996
+ #adminmenu a.menu-top,
997
+ .folded #adminmenu li.menu-top,
998
+ #adminmenu .wp-submenu .wp-submenu-head {
999
+ border-top-color: #eefcf1;
1000
+ border-bottom-color: #dfdfdf;
1001
+ }
1002
+
1003
+ #adminmenu li.wp-menu-open {
1004
+ border-color: #dfdfdf;
1005
+ }
1006
+
1007
+ #adminmenu li.menu-top:hover > a,
1008
+ #adminmenu li.menu-top.focused > a,
1009
+ #adminmenu li.menu-top > a:focus {
1010
+ background-color: #eefcf1;
1011
+ text-shadow: 0 1px 0 rgba( 255, 255, 255, 0.4 );
1012
+ }
1013
+
1014
+ #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
1015
+ #adminmenu li.current a.menu-top,
1016
+ .folded #adminmenu li.wp-has-current-submenu,
1017
+ .folded #adminmenu li.current.menu-top,
1018
+ #adminmenu .wp-menu-arrow,
1019
+ #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head {
1020
+ background-color: #777; /* Fallback */
1021
+ background-image: -ms-linear-gradient(bottom, #060, #6EB469); /* IE10 */
1022
+ background-image: -moz-linear-gradient(bottom, #060, #6EB469); /* Firefox */
1023
+ background-image: -o-linear-gradient(bottom, #060, #6EB469); /* Opera */
1024
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#060), to(#6EB469)); /* old Webkit */
1025
+ background-image: -webkit-linear-gradient(bottom, #060, #6EB469); /* new Webkit */
1026
+ background-image: linear-gradient(bottom, #060, #6EB469); /* proposed W3C Markup */
1027
+ }
1028
+
1029
+ #adminmenu .wp-menu-arrow div {
1030
+ background-color: #777; /* Fallback */
1031
+ background-image: -ms-linear-gradient(right bottom, #060, #6EB469); /* IE10 */
1032
+ background-image: -moz-linear-gradient(right bottom, #060, #6EB469); /* Firefox */
1033
+ background-image: -o-linear-gradient(right bottom, #060, #6EB469); /* Opera */
1034
+ background-image: -webkit-gradient(linear, right bottom, left top, from(#060), to(#6EB469)); /* old Webkit */
1035
+ background-image: -webkit-linear-gradient(right bottom, #060, #6EB469); /* new Webkit */
1036
+ background-image: linear-gradient(right bottom, #060, #6EB469); /* proposed W3C Markup */
1037
+ }
1038
+
1039
+ #adminmenu li.wp-not-current-submenu .wp-menu-arrow {
1040
+ border-top-color: #eefcf1;
1041
+ border-bottom-color: #dfdfdf;
1042
+ background: #eefcf1;
1043
+ }
1044
+
1045
+ #adminmenu li.wp-not-current-submenu .wp-menu-arrow div {
1046
+ background: #eefcf1;
1047
+ border-color: #ccc;
1048
+ }
1049
+
1050
+ .folded #adminmenu li.menu-top li:hover a {
1051
+ background-image: none;
1052
+ }
1053
+
1054
+ #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
1055
+ #adminmenu li.current a.menu-top,
1056
+ #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head {
1057
+ text-shadow: 0 -1px 0 #333;
1058
+ color: #fff;
1059
+ border-top-color: #6EB469;
1060
+ border-bottom-color: #060;
1061
+ }
1062
+
1063
+ .folded #adminmenu li.wp-has-current-submenu,
1064
+ .folded #adminmenu li.current.menu-top {
1065
+ border-top-color: #6EB469;
1066
+ border-bottom-color: #060;
1067
+ }
1068
+
1069
+ #adminmenu .wp-submenu a:hover,
1070
+ #adminmenu .wp-submenu a:focus {
1071
+ background-color: #eefcf1;
1072
+ color: #333;
1073
+ }
1074
+
1075
+ #adminmenu .wp-submenu li.current,
1076
+ #adminmenu .wp-submenu li.current a,
1077
+ #adminmenu .wp-submenu li.current a:hover {
1078
+ color: #333;
1079
+ }
1080
+
1081
+ #adminmenu .wp-submenu ul {
1082
+ background-color: #fff;
1083
+ }
1084
+
1085
+ #adminmenu .wp-submenu-wrap,
1086
+ #adminmenu .wp-submenu ul {
1087
+ border-color: #dfdfdf;
1088
+ }
1089
+
1090
+ #adminmenu .wp-submenu-wrap,
1091
+ .folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap {
1092
+ -moz-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
1093
+ -webkit-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
1094
+ box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
1095
+ }
1096
+
1097
+ #adminmenu .wp-submenu .wp-submenu-head {
1098
+ border-right-color: #dfdfdf;
1099
+ background-color: #deece1;
1100
+ }
1101
+
1102
+ #adminmenu div.wp-submenu {
1103
+ background-color: transparent;
1104
+ }
1105
+
1106
+ /* collapse menu button */
1107
+ #collapse-menu {
1108
+ color: #aaa;
1109
+ }
1110
+
1111
+ #collapse-menu:hover {
1112
+ color: #999;
1113
+ }
1114
+
1115
+ #collapse-button {
1116
+ border-color: #ccc;
1117
+ background-color: #f4f4f4; /* Fallback */
1118
+ background-image: -ms-linear-gradient(bottom, #dfdfdf, #fff); /* IE10 */
1119
+ background-image: -moz-linear-gradient(bottom, #dfdfdf, #fff); /* Firefox */
1120
+ background-image: -o-linear-gradient(bottom, #dfdfdf, #fff); /* Opera */
1121
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#dfdfdf), to(#fff)); /* old Webkit */
1122
+ background-image: -webkit-linear-gradient(bottom, #dfdfdf, #fff); /* new Webkit */
1123
+ background-image: linear-gradient(bottom, #dfdfdf, #fff); /* proposed W3C Markup */
1124
+ }
1125
+ #collapse-menu:hover #collapse-button {
1126
+ border-color: #aaa;
1127
+ }
1128
+ #collapse-button div {
1129
+ background-color: transparent;
1130
+ background-repeat: no-repeat;
1131
+ background-position: 0 -72px;
1132
+ }
1133
+ .folded #collapse-button div {
1134
+ background-position: 0 -108px;
1135
+ }
1136
+
1137
+ /* menu and screen icons */
1138
+ .icon16.icon-dashboard,
1139
+ #adminmenu .menu-icon-dashboard div.wp-menu-image {
1140
+ background-color: transparent;
1141
+ background-repeat: no-repeat;
1142
+ background-attachment: scroll;
1143
+ background-position: -60px -33px;
1144
+ }
1145
+
1146
+ #adminmenu .menu-icon-dashboard:hover div.wp-menu-image,
1147
+ #adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,
1148
+ #adminmenu .menu-icon-dashboard.current div.wp-menu-image {
1149
+ background-color: transparent;
1150
+ background-repeat: no-repeat;
1151
+ background-attachment: scroll;
1152
+ background-position: -60px -1px;
1153
+ }
1154
+
1155
+ .icon16.icon-post,
1156
+ #adminmenu .menu-icon-post div.wp-menu-image {
1157
+ background-color: transparent;
1158
+ background-repeat: no-repeat;
1159
+ background-attachment: scroll;
1160
+ background-position: -271px -33px;
1161
+ }
1162
+
1163
+ #adminmenu .menu-icon-post:hover div.wp-menu-image,
1164
+ #adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image {
1165
+ background-color: transparent;
1166
+ background-repeat: no-repeat;
1167
+ background-attachment: scroll;
1168
+ background-position: -271px -33px;
1169
+ }
1170
+
1171
+ .icon16.icon-media,
1172
+ #adminmenu .menu-icon-media div.wp-menu-image {
1173
+ background-color: transparent;
1174
+ background-repeat: no-repeat;
1175
+ background-attachment: scroll;
1176
+ background-position: -120px -33px;
1177
+ }
1178
+
1179
+ #adminmenu .menu-icon-media:hover div.wp-menu-image,
1180
+ #adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image {
1181
+ background-color: transparent;
1182
+ background-repeat: no-repeat;
1183
+ background-attachment: scroll;
1184
+ background-position: -120px -1px;
1185
+ }
1186
+
1187
+ .icon16.icon-links,
1188
+ #adminmenu .menu-icon-links div.wp-menu-image {
1189
+ background-color: transparent;
1190
+ background-repeat: no-repeat;
1191
+ background-attachment: scroll;
1192
+ background-position: -90px -33px;
1193
+ }
1194
+
1195
+ #adminmenu .menu-icon-links:hover div.wp-menu-image,
1196
+ #adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image {
1197
+ background-color: transparent;
1198
+ background-repeat: no-repeat;
1199
+ background-attachment: scroll;
1200
+ background-position: -90px -1px;
1201
+ }
1202
+
1203
+ .icon16.icon-page,
1204
+ #adminmenu .menu-icon-page div.wp-menu-image {
1205
+ background-color: transparent;
1206
+ background-repeat: no-repeat;
1207
+ background-attachment: scroll;
1208
+ background-position: -150px -33px;
1209
+ }
1210
+
1211
+ #adminmenu .menu-icon-page:hover div.wp-menu-image,
1212
+ #adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image {
1213
+ background-color: transparent;
1214
+ background-repeat: no-repeat;
1215
+ background-attachment: scroll;
1216
+ background-position: -150px -1px;
1217
+ }
1218
+
1219
+ .icon16.icon-comments,
1220
+ #adminmenu .menu-icon-comments div.wp-menu-image {
1221
+ background-color: transparent;
1222
+ background-repeat: no-repeat;
1223
+ background-attachment: scroll;
1224
+ background-position: -30px -33px;
1225
+ }
1226
+
1227
+ #adminmenu .menu-icon-comments:hover div.wp-menu-image,
1228
+ #adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,
1229
+ #adminmenu .menu-icon-comments.current div.wp-menu-image {
1230
+ background-color: transparent;
1231
+ background-repeat: no-repeat;
1232
+ background-attachment: scroll;
1233
+ background-position: -30px -1px;
1234
+ }
1235
+
1236
+ .icon16.icon-appearance,
1237
+ #adminmenu .menu-icon-appearance div.wp-menu-image {
1238
+ background-color: transparent;
1239
+ background-repeat: no-repeat;
1240
+ background-attachment: scroll;
1241
+ background-position: 0 -33px;
1242
+ }
1243
+
1244
+ #adminmenu .menu-icon-appearance:hover div.wp-menu-image,
1245
+ #adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image {
1246
+ background-color: transparent;
1247
+ background-repeat: no-repeat;
1248
+ background-attachment: scroll;
1249
+ background-position: 0 -1px;
1250
+ }
1251
+
1252
+ .icon16.icon-plugins,
1253
+ #adminmenu .menu-icon-plugins div.wp-menu-image {
1254
+ background-color: transparent;
1255
+ background-repeat: no-repeat;
1256
+ background-attachment: scroll;
1257
+ background-position: -180px -33px;
1258
+ }
1259
+
1260
+ #adminmenu .menu-icon-plugins:hover div.wp-menu-image,
1261
+ #adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image {
1262
+ background-color: transparent;
1263
+ background-repeat: no-repeat;
1264
+ background-attachment: scroll;
1265
+ background-position: -180px -1px;
1266
+ }
1267
+
1268
+ .icon16.icon-users,
1269
+ #adminmenu .menu-icon-users div.wp-menu-image {
1270
+ background-color: transparent;
1271
+ background-repeat: no-repeat;
1272
+ background-attachment: scroll;
1273
+ background-position: -300px -33px;
1274
+ }
1275
+
1276
+ #adminmenu .menu-icon-users:hover div.wp-menu-image,
1277
+ #adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,
1278
+ #adminmenu .menu-icon-users.current div.wp-menu-image {
1279
+ background-color: transparent;
1280
+ background-repeat: no-repeat;
1281
+ background-attachment: scroll;
1282
+ background-position: -300px -1px;
1283
+ }
1284
+
1285
+ .icon16.icon-tools,
1286
+ #adminmenu .menu-icon-tools div.wp-menu-image {
1287
+ background-color: transparent;
1288
+ background-repeat: no-repeat;
1289
+ background-attachment: scroll;
1290
+ background-position: -210px -33px;
1291
+ }
1292
+
1293
+ #adminmenu .menu-icon-tools:hover div.wp-menu-image,
1294
+ #adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,
1295
+ #adminmenu .menu-icon-tools.current div.wp-menu-image {
1296
+ background-color: transparent;
1297
+ background-repeat: no-repeat;
1298
+ background-attachment: scroll;
1299
+ background-position: -210px -1px;
1300
+ }
1301
+
1302
+ .icon16.icon-settings,
1303
+ #adminmenu .menu-icon-settings div.wp-menu-image {
1304
+ background-color: transparent;
1305
+ background-repeat: no-repeat;
1306
+ background-attachment: scroll;
1307
+ background-position: -240px -33px;
1308
+ }
1309
+
1310
+ #adminmenu .menu-icon-settings:hover div.wp-menu-image,
1311
+ #adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image {
1312
+ background-color: transparent;
1313
+ background-repeat: no-repeat;
1314
+ background-attachment: scroll;
1315
+ background-position: -240px -1px;
1316
+ }
1317
+
1318
+ .icon16.icon-site,
1319
+ #adminmenu .menu-icon-site div.wp-menu-image {
1320
+ background-color: transparent;
1321
+ background-repeat: no-repeat;
1322
+ background-attachment: scroll;
1323
+ background-position: -360px -33px;
1324
+ }
1325
+
1326
+ #adminmenu .menu-icon-site:hover div.wp-menu-image,
1327
+ #adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image {
1328
+ background-color: transparent;
1329
+ background-repeat: no-repeat;
1330
+ background-attachment: scroll;
1331
+ background-position: -360px -1px;
1332
+ }
1333
+ /* end menu and screen icons */
1334
+
1335
+ /* Screen Icons */
1336
+ .icon32.icon-post,
1337
+ #icon-edit,
1338
+ #icon-post {
1339
+ background-color: transparent;
1340
+ background-repeat: no-repeat;
1341
+ background-position: -552px -5px;
1342
+ }
1343
+
1344
+ .icon32.icon-dashboard,
1345
+ #icon-index {
1346
+ background-color: transparent;
1347
+ background-repeat: no-repeat;
1348
+ background-position: -137px -5px;
1349
+ }
1350
+
1351
+ .icon32.icon-media,
1352
+ #icon-upload {
1353
+ background-color: transparent;
1354
+ background-repeat: no-repeat;
1355
+ background-position: -251px -5px;
1356
+ }
1357
+
1358
+ .icon32.icon-links,
1359
+ #icon-link-manager,
1360
+ #icon-link,
1361
+ #icon-link-category {
1362
+ background-color: transparent;
1363
+ background-repeat: no-repeat;
1364
+ background-position: -190px -5px;
1365
+ }
1366
+
1367
+ .icon32.icon-page,
1368
+ #icon-edit-pages,
1369
+ #icon-page {
1370
+ background-color: transparent;
1371
+ background-repeat: no-repeat;
1372
+ background-position: -312px -5px;
1373
+ }
1374
+
1375
+ .icon32.icon-comments,
1376
+ #icon-edit-comments {
1377
+ background-color: transparent;
1378
+ background-repeat: no-repeat;
1379
+ background-position: -72px -5px;
1380
+ }
1381
+
1382
+ .icon32.icon-appearance,
1383
+ #icon-themes {
1384
+ background-color: transparent;
1385
+ background-repeat: no-repeat;
1386
+ background-position: -11px -5px;
1387
+ }
1388
+
1389
+ .icon32.icon-plugins,
1390
+ #icon-plugins {
1391
+ background-color: transparent;
1392
+ background-repeat: no-repeat;
1393
+ background-position: -370px -5px;
1394
+ }
1395
+
1396
+ .icon32.icon-users,
1397
+ #icon-users,
1398
+ #icon-profile,
1399
+ #icon-user-edit {
1400
+ background-color: transparent;
1401
+ background-repeat: no-repeat;
1402
+ background-position: -600px -5px;
1403
+ }
1404
+
1405
+ .icon32.icon-tools,
1406
+ #icon-tools,
1407
+ #icon-admin {
1408
+ background-color: transparent;
1409
+ background-repeat: no-repeat;
1410
+ background-position: -432px -5px;
1411
+ }
1412
+
1413
+ .icon32.icon-settings,
1414
+ #icon-options-general {
1415
+ background-color: transparent;
1416
+ background-repeat: no-repeat;
1417
+ background-position: -492px -5px;
1418
+ }
1419
+
1420
+ .icon32.icon-site,
1421
+ #icon-ms-admin {
1422
+ background-color: transparent;
1423
+ background-repeat: no-repeat;
1424
+ background-position: -659px -5px;
1425
+ }
1426
+ /* end screen icons */
1427
+
1428
+
1429
+ /* Diff */
1430
+ table.diff .diff-deletedline {
1431
+ background-color: #fdd;
1432
+ }
1433
+
1434
+ table.diff .diff-deletedline del {
1435
+ background-color: #f99;
1436
+ }
1437
+
1438
+ table.diff .diff-addedline {
1439
+ background-color: #dfd;
1440
+ }
1441
+
1442
+ table.diff .diff-addedline ins {
1443
+ background-color: #9f9;
1444
+ }
1445
+
1446
+ #att-info {
1447
+ background-color: #E4F2FD;
1448
+ }
1449
+
1450
+ /* edit image */
1451
+ #sidemenu a {
1452
+ background-color: #eefcf1;
1453
+ border-color: #eefcf1;
1454
+ border-bottom-color: #dfdfdf;
1455
+ }
1456
+
1457
+ #sidemenu a.current {
1458
+ background-color: #fff;
1459
+ border-color: #dfdfdf #dfdfdf #fff;
1460
+ color: #D54E21;
1461
+ }
1462
+
1463
+ #replyerror {
1464
+ border-color: #ddd;
1465
+ background-color: #eefcf1;
1466
+ }
1467
+
1468
+ /* table vim shortcuts */
1469
+ .vim-current,
1470
+ .vim-current th,
1471
+ .vim-current td {
1472
+ background-color: #E4F2FD !important;
1473
+ }
1474
+
1475
+ /* Install Plugins */
1476
+ .star-average,
1477
+ .star.star-rating {
1478
+ background-color: #fc0;
1479
+ }
1480
+
1481
+ div.star.select:hover {
1482
+ background-color: #d00;
1483
+ }
1484
+
1485
+ div.star img {
1486
+ border-left: 1px solid #fff;
1487
+ border-right: 1px solid #fff;
1488
+ }
1489
+
1490
+ .widefat div.star img {
1491
+ border-left: 1px solid #eefcf1;
1492
+ border-right: 1px solid #eefcf1;
1493
+ }
1494
+
1495
+ #plugin-information .fyi ul {
1496
+ background-color: #eaf3fa;
1497
+ }
1498
+
1499
+ #plugin-information .fyi h2.mainheader {
1500
+ background-color: #cee1ef;
1501
+ }
1502
+
1503
+ #plugin-information pre,
1504
+ #plugin-information code {
1505
+ background-color: #ededff;
1506
+ }
1507
+
1508
+ #plugin-information pre {
1509
+ border: 1px solid #ccc;
1510
+ }
1511
+
1512
+ /* inline editor */
1513
+ .inline-edit-row fieldset input[type="text"],
1514
+ .inline-edit-row fieldset textarea,
1515
+ #bulk-titles {
1516
+ border-color: #ddd;
1517
+ }
1518
+
1519
+ .inline-editor div.title {
1520
+ background-color: #EAF3FA;
1521
+ }
1522
+
1523
+ .inline-editor ul.cat-checklist {
1524
+ background-color: #fff;
1525
+ border-color: #ddd;
1526
+ }
1527
+
1528
+ .inline-editor .categories .catshow,
1529
+ .inline-editor .categories .cathide {
1530
+ color: #007700;
1531
+ }
1532
+
1533
+ .inline-editor .quick-edit-save {
1534
+ background-color: #f1f1f1;
1535
+ }
1536
+
1537
+ fieldset.inline-edit-col-right .inline-edit-col {
1538
+ border-color: #dfdfdf;
1539
+ }
1540
+
1541
+ .attention {
1542
+ color: #D54E21;
1543
+ }
1544
+
1545
+ .meta-box-sortables .postbox:hover .handlediv {
1546
+ background-color: transparent;
1547
+ background-repeat: no-repeat;
1548
+ background-position: 6px 7px;
1549
+ }
1550
+
1551
+ .tablenav .tablenav-pages {
1552
+ color: #555;
1553
+ }
1554
+
1555
+ .tablenav .tablenav-pages a {
1556
+ border-color: #e3e3e3;
1557
+ background-color: #eee;
1558
+ background-repeat: repeat-x;
1559
+ background-attachment: scroll;
1560
+ background-position: left -379px;
1561
+ }
1562
+
1563
+ .tablenav .tablenav-pages a:hover,
1564
+ .tablenav .tablenav-pages a:focus {
1565
+ color: #d54e21;
1566
+ }
1567
+
1568
+ .tablenav .tablenav-pages a.disabled,
1569
+ .tablenav .tablenav-pages a.disabled:hover,
1570
+ .tablenav .tablenav-pages a.disabled:focus {
1571
+ color: #aaa;
1572
+ }
1573
+
1574
+ .tablenav .tablenav-pages .current {
1575
+ background: #dfdfdf;
1576
+ border-color: #d3d3d3;
1577
+ }
1578
+
1579
+ #availablethemes,
1580
+ #availablethemes td {
1581
+ border-color: #ddd;
1582
+ }
1583
+
1584
+ #current-theme img {
1585
+ border-color: #999;
1586
+ }
1587
+
1588
+ #TB_window #TB_title a.tb-theme-preview-link,
1589
+ #TB_window #TB_title a.tb-theme-preview-link:visited {
1590
+ color: #999;
1591
+ }
1592
+
1593
+ #TB_window #TB_title a.tb-theme-preview-link:hover,
1594
+ #TB_window #TB_title a.tb-theme-preview-link:focus {
1595
+ color: #ccc;
1596
+ }
1597
+
1598
+ .misc-pub-section {
1599
+ border-top-color: #fff;
1600
+ border-bottom-color: #dfdfdf;
1601
+ }
1602
+
1603
+ #minor-publishing {
1604
+ border-bottom-color: #dfdfdf;
1605
+ }
1606
+
1607
+ #post-body .misc-pub-section {
1608
+ border-right-color: #eee;
1609
+ }
1610
+
1611
+ .post-com-count span {
1612
+ background-color: #bbb;
1613
+ }
1614
+
1615
+ .form-table .color-palette td {
1616
+ border-color: #fff;
1617
+ }
1618
+
1619
+ .sortable-placeholder {
1620
+ border-color: #bbb;
1621
+ background-color: #eefcf1;
1622
+ }
1623
+
1624
+ #post-body ul.category-tabs li.tabs a,
1625
+ #post-body ul.add-menu-item-tabs li.tabs a,
1626
+ body.press-this ul.category-tabs li.tabs a {
1627
+ color: #333;
1628
+ }
1629
+
1630
+ .view-switch #view-switch-list {
1631
+ background-color: transparent;
1632
+ background-repeat: no-repeat;
1633
+ background-position: 0 0;
1634
+ }
1635
+
1636
+ .view-switch .current #view-switch-list {
1637
+ background-color: transparent;
1638
+ background-repeat: no-repeat;
1639
+ background-position: -40px 0;
1640
+ }
1641
+
1642
+ .view-switch #view-switch-excerpt {
1643
+ background-color: transparent;
1644
+ background-repeat: no-repeat;
1645
+ background-position: -20px 0;
1646
+ }
1647
+
1648
+ .view-switch .current #view-switch-excerpt {
1649
+ background-color: transparent;
1650
+ background-repeat: no-repeat;
1651
+ background-position: -60px 0;
1652
+ }
1653
+
1654
+ #header-logo {
1655
+ background-color: transparent;
1656
+ background-repeat: no-repeat;
1657
+ background-attachment: scroll;
1658
+ background-position: center center;
1659
+ }
1660
+
1661
+ .popular-tags,
1662
+ .feature-filter {
1663
+ background-color: #fff;
1664
+ border-color: #DFDFDF;
1665
+ }
1666
+
1667
+ #theme-information .action-button {
1668
+ border-top-color: #DFDFDF;
1669
+ }
1670
+
1671
+ .theme-listing br.line {
1672
+ border-bottom-color: #ccc;
1673
+ }
1674
+
1675
+ div.widgets-sortables,
1676
+ #widgets-left .inactive {
1677
+ background-color: #fcfcfc;
1678
+ border-color: #dfdfdf;
1679
+ }
1680
+
1681
+ #available-widgets .widget-holder {
1682
+ background-color: #fcfcfc;
1683
+ border-color: #dfdfdf;
1684
+ }
1685
+
1686
+ #available-widgets .widget-description {
1687
+ color: #555;
1688
+ }
1689
+
1690
+ .sidebar-name {
1691
+ color: #464646;
1692
+ text-shadow: #fff 0 1px 0;
1693
+ border-color: #dfdfdf;
1694
+ -moz-box-shadow: inset 0 1px 0 #fff;
1695
+ -webkit-box-shadow: inset 0 1px 0 #fff;
1696
+ box-shadow: inset 0 1px 0 #fff;
1697
+ }
1698
+
1699
+ .sidebar-name:hover,
1700
+ #removing-widget {
1701
+ color: #d54e21;
1702
+ }
1703
+
1704
+ #removing-widget span {
1705
+ color: black;
1706
+ }
1707
+
1708
+ .sidebar-name-arrow {
1709
+ background-color: transparent;
1710
+ background-repeat: no-repeat;
1711
+ background-position: 5px 9px;
1712
+ }
1713
+
1714
+ .sidebar-name:hover .sidebar-name-arrow {
1715
+ background-color: transparent;
1716
+ background-repeat: no-repeat;
1717
+ background-position: 5px 9px;
1718
+ }
1719
+
1720
+ .in-widget-title {
1721
+ color: #606060;
1722
+ }
1723
+
1724
+ .deleting .widget-title * {
1725
+ color: #aaa;
1726
+ }
1727
+
1728
+ .imgedit-menu div {
1729
+ border-color: #d5d5d5;
1730
+ background-color: #f1f1f1;
1731
+ }
1732
+
1733
+ .imgedit-menu div:hover {
1734
+ border-color: #c1c1c1;
1735
+ background-color: #eaeaea;
1736
+ }
1737
+
1738
+ .imgedit-menu div.disabled {
1739
+ border-color: #ccc;
1740
+ background-color: #ddd;
1741
+ filter: alpha(opacity=50);
1742
+ opacity: 0.5;
1743
+ }
1744
+
1745
+ #dashboard_recent_comments div.undo {
1746
+ border-top-color: #dfdfdf;
1747
+ }
1748
+
1749
+ .comment-ays,
1750
+ .comment-ays th {
1751
+ border-color: #ddd;
1752
+ }
1753
+
1754
+ .comment-ays th {
1755
+ background-color: #f1f1f1;
1756
+ }
1757
+
1758
+ /* added from nav-menu.css */
1759
+ #menu-management .menu-edit {
1760
+ border-color: #dfdfdf;
1761
+ }
1762
+
1763
+ #post-body {
1764
+ background: #fff;
1765
+ border-top-color: #fff;
1766
+ border-bottom-color: #dfdfdf;
1767
+ }
1768
+
1769
+ #nav-menu-header {
1770
+ border-bottom-color: #dfdfdf;
1771
+ }
1772
+
1773
+ #nav-menu-footer {
1774
+ border-top-color: #fff;
1775
+ }
1776
+
1777
+ #menu-management .nav-tabs-arrow a {
1778
+ color: #C1C1C1;
1779
+ }
1780
+
1781
+ #menu-management .nav-tabs-arrow a:hover {
1782
+ color: #D54E21;
1783
+ }
1784
+
1785
+ #menu-management .nav-tabs-arrow a:active {
1786
+ color: #464646;
1787
+ }
1788
+
1789
+ #menu-management .nav-tab-active {
1790
+ border-color: #dfdfdf;
1791
+ }
1792
+
1793
+ #menu-management .nav-tab {
1794
+ background: #fbfbfb;
1795
+ border-color: #dfdfdf;
1796
+ }
1797
+
1798
+ .js .input-with-default-title {
1799
+ color: #aaa;
1800
+ }
1801
+
1802
+ #cancel-save {
1803
+ color: #ff0000;
1804
+ }
1805
+
1806
+ #cancel-save:hover {
1807
+ background-color: #FF0000;
1808
+ color: #fff;
1809
+ }
1810
+
1811
+ .list-container {
1812
+ border-color: #DFDFDF;
1813
+ }
1814
+
1815
+ .menu-item-handle {
1816
+ border-color: #dfdfdf;
1817
+ }
1818
+
1819
+ .menu li.deleting .menu-item-handle {
1820
+ background-color: #f66;
1821
+ text-shadow: #ccc;
1822
+ }
1823
+
1824
+ .item-type { /* Menu item controls */
1825
+ color: #999999;
1826
+ }
1827
+
1828
+ .item-controls .menu-item-delete:hover {
1829
+ color: #ff0000;
1830
+ }
1831
+
1832
+ .item-edit {
1833
+ background-color: transparent;
1834
+ background-repeat: no-repeat;
1835
+ background-position: 8px 10px;
1836
+ border-bottom-color: #eee;
1837
+ }
1838
+
1839
+ .item-edit:hover {
1840
+ background-color: transparent;
1841
+ background-repeat: no-repeat;
1842
+ background-position: 8px 10px;
1843
+ }
1844
+
1845
+ .menu-item-settings { /* Menu editing */
1846
+ border-color: #dfdfdf;
1847
+ }
1848
+
1849
+ .link-to-original {
1850
+ color: #777;
1851
+ border-color: #dfdfdf;
1852
+ }
1853
+
1854
+ #cancel-save:hover {
1855
+ color: #fff !important;
1856
+ }
1857
+
1858
+ #update-menu-item {
1859
+ color: #fff !important;
1860
+ }
1861
+
1862
+ #update-menu-item:hover,
1863
+ #update-menu-item:active,
1864
+ #update-menu-item:focus {
1865
+ color: #eaf2fa !important;
1866
+ border-color: #13455b !important;
1867
+ }
1868
+
1869
+ .submitbox .submitcancel {
1870
+ color: #007700;
1871
+ border-bottom-color: #007700;
1872
+ }
1873
+
1874
+ .submitbox .submitcancel:hover {
1875
+ background: #007700;
1876
+ color: #fff;
1877
+ }
1878
+ /* end added from nav-menu.css */
1879
+
1880
+ #menu-management .nav-tab-active,
1881
+ .menu-item-handle,
1882
+ .menu-item-settings {
1883
+ -moz-box-shadow: inset 0 1px 0 #fff;
1884
+ -webkit-box-shadow: inset 0 1px 0 #fff;
1885
+ box-shadow: inset 0 1px 0 #fff;
1886
+ }
1887
+
1888
+ #menu-management .nav-tab-active {
1889
+ background: #eefcf1;
1890
+ border-bottom-color: #eefcf1;
1891
+ }
1892
+
1893
+ /* custom header & background pages */
1894
+ #upload-form label {
1895
+ color: #777;
1896
+ }
1897
+ /* custom header & background pages */
1898
+
1899
+ /* full screen */
1900
+ .fullscreen-overlay {
1901
+ background: #fff;
1902
+ }
1903
+
1904
+ .wp-fullscreen-focus #wp-fullscreen-title,
1905
+ .wp-fullscreen-focus #wp-fullscreen-container {
1906
+ border-color: #ccc;
1907
+ }
1908
+
1909
+ #fullscreen-topbar {
1910
+ border-bottom-color: #DFDFDF;
1911
+ }
1912
+
1913
+ /* Begin About Pages */
1914
+
1915
+ .about-wrap h1 {
1916
+ color: #333;
1917
+ text-shadow: 1px 1px 1px white;
1918
+ }
1919
+
1920
+ .about-text {
1921
+ color: #777;
1922
+ }
1923
+
1924
+ .wp-badge {
1925
+ color: #fff;
1926
+ text-shadow: 0 -1px 0 #0c3d57;
1927
+ border-color: #2B5173;
1928
+
1929
+ -moz-box-shadow: inset 0 0 0 1px #5F8CA8;
1930
+ -webkit-box-shadow: inset 0 0 0 1px #5F8CA8;
1931
+ box-shadow: inset 0 0 0 1px #5F8CA8;
1932
+
1933
+ background-color: #378aac;
1934
+ }
1935
+
1936
+ .about-wrap h2 .nav-tab {
1937
+ color: #007700;
1938
+ }
1939
+ .about-wrap h2 .nav-tab:hover {
1940
+ color: #d54e21;
1941
+ }
1942
+ .about-wrap h2 .nav-tab-active,
1943
+ .about-wrap h2 .nav-tab-active:hover {
1944
+ color: #333;
1945
+ }
1946
+ .about-wrap h2 .nav-tab-active {
1947
+ text-shadow: 1px 1px 1px white;
1948
+ color: #464646;
1949
+ }
1950
+
1951
+ .about-wrap h3 {
1952
+ color: #333;
1953
+ text-shadow: 1px 1px 1px white;
1954
+ }
1955
+
1956
+ .about-wrap .feature-section h4 {
1957
+ color: #464646;
1958
+ }
1959
+
1960
+ .about-wrap .feature-section img {
1961
+ background: #eefcf1;
1962
+ border-color: #dfdfdf;
1963
+
1964
+ -moz-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
1965
+ -webkit-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
1966
+ box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
1967
+ }
1968
+
1969
+ .about-wrap h4.wp-people-group {
1970
+ text-shadow: 1px 1px 1px white;
1971
+ }
1972
+
1973
+ .about-wrap li.wp-person img.gravatar {
1974
+ -moz-box-shadow: 0 0 4px rgba( 0, 0, 0, 0.4 );
1975
+ -webkit-box-shadow: 0 0 4px rgba( 0, 0, 0, 0.4 );
1976
+ box-shadow: 0 0 4px rgba( 0, 0, 0, 0.4 );
1977
+ }
1978
+ .about-wrap li.wp-person .title {
1979
+ color: #464646;
1980
+ text-shadow: 1px 1px 1px white;
1981
+ }
1982
+
1983
+ .freedoms-php .about-wrap ol li {
1984
+ color: #999;
1985
+ }
1986
+ .freedoms-php .about-wrap ol p {
1987
+ color: #464646;
1988
+ }
1989
+
1990
+ /* End About Pages */
1991
+
1992
+
1993
+ /*------------------------------------------------------------------------------
1994
+ 2.0 - Right to Left Styles
1995
+ ------------------------------------------------------------------------------*/
1996
+
1997
+ .rtl .bar {
1998
+ border-right-color: none;
1999
+ border-left-color: #99d;
2000
+ }
2001
+
2002
+ .rtl #screen-meta-links a.show-settings {
2003
+ background-position: left 3px;
2004
+ }
2005
+
2006
+ .rtl #screen-meta-links a.show-settings.screen-meta-active {
2007
+ background-position: left -33px;
2008
+ }
2009
+
2010
+ /* Menu */
2011
+ .rtl #adminmenushadow,
2012
+ .rtl #adminmenuback {
2013
+ background-position: top left;
2014
+ }
2015
+
2016
+ .rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,
2017
+ .rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle {
2018
+ background-color: transparent;
2019
+ background-repeat: no-repeat;
2020
+ background-position: 8px 6px;
2021
+ }
2022
+
2023
+ .rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,
2024
+ .rtl #adminmenu .wp-menu-open .wp-menu-toggle {
2025
+ background-color: transparent;
2026
+ background-repeat: no-repeat;
2027
+ background-position: 8px 6px;
2028
+ }
2029
+
2030
+ .rtl #adminmenu .wp-submenu .wp-submenu-head {
2031
+ border-right-color: none;
2032
+ border-left-color: #dfdfdf;
2033
+ }
2034
+
2035
+ .rtl .folded #adminmenu .wp-submenu-wrap {
2036
+ -moz-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
2037
+ -webkit-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
2038
+ box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
2039
+ }
2040
+
2041
+ /* Collapse Menu Button */
2042
+ .rtl #collapse-button div {
2043
+ background-position: 0 -108px;
2044
+ }
2045
+
2046
+ .rtl .folded #collapse-button div {
2047
+ background-position: 0 -72px;
2048
+ }
2049
+
2050
+ /* Edit Image */
2051
+ .rtl .meta-box-sortables .postbox:hover .handlediv {
2052
+ background-color: transparent;
2053
+ background-repeat: no-repeat;
2054
+ background-position: 6px 7px;
2055
+ }
2056
+
2057
+ .rtl .tablenav .tablenav-pages a {
2058
+ border-color: #e3e3e3;
2059
+ background-color: #eee;
2060
+ background-repeat: repeat-x;
2061
+ background-attachment: scroll;
2062
+ background-position: right -379px;
2063
+ }
2064
+
2065
+ .rtl #post-body .misc-pub-section {
2066
+ border-right-color: none;
2067
+ border-left-color: #eee;
2068
+ }
2069
+
2070
+ .rtl .sidebar-name-arrow {
2071
+ background-color: transparent;
2072
+ background-repeat: no-repeat;
2073
+ background-position: 5px 9px;
2074
+ }
2075
+
2076
+ .rtl .sidebar-name:hover .sidebar-name-arrow {
2077
+ background-color: transparent;
2078
+ background-repeat: no-repeat;
2079
+ background-position: 5px 9px;
2080
+ }
bbp-admin/styles/admin.css → includes/admin/styles/green-34.min.css RENAMED
@@ -1 +1 @@
1
- html,.wp-dialog{background-color:#fff}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],select{border-color:#dfdfdf;background-color:#fff}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="file"]:focus,input[type="button"]:focus,input[type="submit"]:focus,input[type="reset"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="url"]:focus,select:focus{border-color:#bbb}kbd,code{background:#eaeaea}input[readonly]{background-color:#eee}.find-box-search{border-color:#dfdfdf;background-color:#f1f1f1}.find-box{background-color:#f1f1f1}.find-box-inside{background-color:#fff}a.page-numbers:hover{border-color:#999}body,#wpbody,.form-table .pre{color:#333}body>#upload-menu{border-bottom-color:#fff}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links{border-color:#ccc}#poststuff .inside label.spam,#poststuff .inside label.deleted{color:red}#poststuff .inside label.waiting{color:orange}#poststuff .inside label.approved{color:green}#postcustomstuff table{border-color:#dfdfdf;background-color:#f9f9f9}#postcustomstuff thead th{background-color:#f1f1f1}.widefat{border-color:#dfdfdf;background-color:#eefcf1}textarea.widefat{background-color:#fff}div.dashboard-widget-error{background-color:#c43}div.dashboard-widget-notice{background-color:#cfe1ef}div.dashboard-widget-submit{border-top-color:#ccc}div.tabs-panel,.wp-tab-panel,ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-color:#dfdfdf;background-color:#fff}ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{background-color:#fff}input.disabled,textarea.disabled{background-color:#ccc}#plugin-information .action-button a,#plugin-information .action-button a:hover,#plugin-information .action-button a:visited{color:#fff}.widget .widget-top,.postbox h3,.stuffbox h3,.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head,.sidebar-name,#nav-menu-header,#nav-menu-footer,.menu-item-handle,#fullscreen-topbar{background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#eefcf1,#deece1);background-image:-moz-linear-gradient(top,#eefcf1,#deece1);background-image:-o-linear-gradient(top,#eefcf1,#deece1);background-image:-webkit-gradient(linear,left top,left bottom,from(#eefcf1),to(#deece1));background-image:-webkit-linear-gradient(top,#eefcf1,#deece1);background-image:linear-gradient(top,#eefcf1,#deece1)}.widget .widget-top,.postbox h3,.stuffbox h3{border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-moz-box-shadow:0 1px 0 #fff;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.form-table th,.form-wrap label{color:#222;text-shadow:#fff 0 1px 0}.description,.form-wrap p{color:#666}strong .post-com-count span{background-color:#070}.sorthelper{background-color:#ccf3fa}.ac_match,.subsubsub a.current{color:#000}.wrap h2{color:#464646}.wrap .add-new-h2{background:#f1f1f1}.subtitle{color:#777}.ac_over{background-color:#f0f0b8}.ac_results{background-color:#fff;border-color:#6eb469}.ac_results li{color:#101010}.alternate,.alt{background-color:#fefefe}.available-theme a.screenshot{background-color:#f1f1f1;border-color:#ddd}.bar{background-color:#e8e8e8;border-right-color:#99d}#media-upload,#media-upload .media-item .slidetoggle{background:#fff}#media-upload .slidetoggle{border-top-color:#dfdfdf}div.error,.login #login_error{background-color:#ffebe8;border-color:#c00}div.error a{color:#c00}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.submit{border-color:#dfdfdf}.highlight{background-color:#e4f2fd;color:#000}.howto,.nonessential,#edit-slug-box,.form-input-tip,.subsubsub{color:#666}#wpbody-content #media-items .describe{border-top-color:#dfdfdf}.media-upload-form label.form-help,td.help{color:#9a9a9a}.post-com-count{color:#fff}.post-com-count span{background-color:#bbb;color:#fff}.post-com-count:hover span{background-color:#d54e21}.quicktags,.search{background-color:#ccc;color:#000}.side-info h5{border-bottom-color:#dadada}.side-info ul{color:#666}.button,.button-secondary,.submit input,input[type=button],input[type=submit]{border-color:#bbb;color:#464646}.button:hover,.button-secondary:hover,.submit input:hover,input[type=button]:hover,input[type=submit]:hover{color:#000;border-color:#666}.button,.submit input,.button-secondary{background-color:#f2f2f2;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;text-shadow:rgba(255,255,255,1) 0 1px 0}.button:active,.submit input:active,.button-secondary:active{background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:left top}input.button-primary,button.button-primary,a.button-primary{border-color:#298cba;font-weight:bold;color:#fff;background-image:url('../images/button-grad.png');background-color:#070;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;text-shadow:rgba(0,0,0,0.3) 0 -1px 0}input.button-primary:active,button.button-primary:active,a.button-primary:active{background-image:url('../images/button-grad-active.png');background-color:#070;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;color:#eaf2fa}input.button-primary:hover,button.button-primary:hover,a.button-primary:hover,a.button-primary:focus,a.button-primary:active{border-color:#13455b;color:#eaf2fa}.button-disabled,.button[disabled],.button:disabled,.button-secondary[disabled],.button-secondary:disabled,a.button.disabled{color:#aaa!important;border-color:#ddd!important}.button-primary-disabled,.button-primary[disabled],.button-primary:disabled{color:#9fd0d5!important;background:#298cba!important}a:hover,a:active,a:focus{color:#d54e21}#adminmenu a:hover,#adminmenu li.menu-top>a:focus,#adminmenu ul.wp-submenu a:hover,#the-comment-list .comment a:hover,#rightnow a:hover,#media-upload a.del-link:hover,div.dashboard-widget-submit input:hover,.subsubsub a:hover,.subsubsub a.current:hover,.ui-tabs-nav a:hover,.plugins .inactive a:hover,#all-plugins-table .plugins .inactive a:hover,#search-plugins-table .plugins .inactive a:hover{color:#d54e21}#the-comment-list .comment-item,#dashboard-widgets #dashboard_quick_press form p.submit{border-color:#dfdfdf}#side-sortables .category-tabs .tabs a,#side-sortables .add-menu-item-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#333}#rightnow .rbutton{background-color:#ebebeb;color:#264761}.submitbox .submit{background-color:#464646;color:#ccc}.plugins a.delete:hover,#all-plugins-table .plugins a.delete:hover,#search-plugins-table .plugins a.delete:hover,.submitbox .submitdelete{color:#f00;border-bottom-color:#f00}.submitbox .submitdelete:hover,#media-items a.delete:hover{color:#fff;background-color:#f00;border-bottom-color:#f00}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:#f00;border-bottom-color:#f00}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#070}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#d54e21}div.updated,.login .message{background-color:#ffffe0;border-color:#e6db55}.update-message{color:#000}a.page-numbers{border-bottom-color:#b8d3e2}.commentlist li{border-bottom-color:#ccc}.widefat td,.widefat th{border-top-color:#fff;border-bottom-color:#dfdfdf}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0}.widefat td{color:#555}.widefat p,.widefat ol,.widefat ul{color:#333}.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head{color:#333}th.sortable a:hover,th.sortable a:active,th.sortable a:focus{color:#333}h3.dashboard-widget-title small a{color:#d7d7d7}h3.dashboard-widget-title small a:hover{color:#fff}a,#adminmenu a,#the-comment-list p.comment-author strong a,#media-upload a.del-link,#media-items a.delete,.plugins a.delete,.ui-tabs-nav a{color:#070}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-khtml-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}#plugin-information .action-button{background-color:#d54e21;color:#fff}#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-khtml-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}div#media-upload-header,div#plugin-information-header{background-color:#eefcf1;border-bottom-color:#dfdfdf}#currenttheme img{border-color:#666}#dashboard_secondary div.dashboard-widget-content ul li a{background-color:#eefcf1}input.readonly,textarea.readonly{background-color:#ddd}#editable-post-name{background-color:#fffbcc}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on,.submitted-on{color:#777}.login #nav a,.login #backtoblog a{color:#070!important}.login #nav a:hover,.login #backtoblog a:hover{color:#d54e21!important}#footer{color:#777;border-color:#dfdfdf}#media-items,.imgedit-group,.media-item{border-color:#dfdfdf}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fcfcfc}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#f4f4f4}.plugin-update-tr .update-message{background-color:#fffbe4;border-color:#dfdfdf}.plugins .active,.plugins .active th,.plugins .active td{color:#000}.plugins .inactive a{color:#579}#the-comment-list tr.undo,#the-comment-list div.undo{background-color:#f4f4f4}#the-comment-list .unapproved{background-color:#ffffe0}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}table.widefat span.delete a,table.widefat span.trash a,table.widefat span.spam a,#dashboard_recent_comments .delete a,#dashboard_recent_comments .trash a,#dashboard_recent_comments .spam a{color:#bc0b0b}.welcome-panel{border-color:#dfdfdf}.welcome-panel p{color:#777}.welcome-panel-column p{color:#464646}.welcome-panel .welcome-panel-close{background:#eee;text-shadow:1px 1px 1px #eee}.welcome-panel h3{text-shadow:1px 1px 1px white}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.widget,#widget-list .widget-top,.postbox,.menu-item-settings{background-color:#eefcf1;background-image:-ms-linear-gradient(top,#eefcf1,#deece1);background-image:-moz-linear-gradient(top,#eefcf1,#deece1);background-image:-o-linear-gradient(top,#eefcf1,#deece1);background-image:-webkit-gradient(linear,left top,left bottom,from(#eefcf1),to(#deece1));background-image:-webkit-linear-gradient(top,#eefcf1,#deece1);background-image:linear-gradient(top,#eefcf1,#deece1)}.postbox h3{color:#464646}.widget .widget-top{color:#222}.sidebar-name:hover h3,.postbox h3:hover{color:#000}#quicktags #ed_link{color:#00f}#rightnow .youhave{background-color:#f0f6fb}#rightnow a{color:#448abd}.tagchecklist span a,#bulk-titles div a{background-repeat:no-repeat}.tagchecklist span a:hover,#bulk-titles div a:hover{background-repeat:no-repeat;background-position:-10px 0}#update-nag,.update-nag{background-color:#fffbcc;border-color:#e6db55;color:#555}#screen-meta{background-color:#f1f1f1;border-color:#ccc;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.05);box-shadow:0 1px 3px rgba(0,0,0,0.05)}.contextual-help-tabs a:hover{color:#333}.contextual-help-sidebar,.contextual-help-tabs .active{border-color:#ccc}.contextual-help-tabs .active,.contextual-help-tabs .active a,.contextual-help-tabs .active a:hover{background:#fff;color:#000}.contextual-help-tabs-wrap{border-color:#ccc;background-color:#fff}#screen-options-link-wrap,#contextual-help-link-wrap{background-color:#e3e3e3;border-right:1px solid transparent;border-left:1px solid transparent;border-bottom:1px solid transparent;background-image:-ms-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-moz-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-o-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#f1f1f1));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:linear-gradient(bottom,#dfdfdf,#f1f1f1)}#screen-meta-links a.show-settings{color:#777}#screen-meta-links a.show-settings:hover{color:#000}#screen-meta-links a.show-settings{background-color:transparent;background-repeat:no-repeat;background-position:right 3px}#screen-meta-links a.show-settings.screen-meta-active{background-color:transparent;background-repeat:no-repeat;background-position:right -33px}.login #backtoblog a{color:#464646}#wphead{border-bottom:#dfdfdf 1px solid}#wphead h1 a{color:#464646}#footer a:link,#footer a:visited{text-decoration:none}#footer a:hover{color:#000;text-decoration:underline}.file-error,abbr.required,.widget-control-remove:hover,table.widefat .delete a:hover,table.widefat .trash a:hover,table.widefat .spam a:hover,#dashboard_recent_comments .delete a:hover,#dashboard_recent_comments .trash a:hover #dashboard_recent_comments .spam a:hover{color:#f00}#pass-strength-result{background-color:#eee;border-color:#ddd!important}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}#titlediv #title{border-color:#ccc}#post-status-info{border-color:#dfdfdf #ccc #ccc;background-color:#eaeaea}.editwidget .widget-inside{border-color:#dfdfdf}#titlediv #title{background-color:#fff}#tTips p#tTips_inside{background-color:#ddd;color:#333}#timestampdiv input,#namediv input,#poststuff .inside .the-tagcloud{border-color:#ddd}#adminmenuback,#adminmenuwrap{background-color:#deece1;border-color:#ccc}#adminmenushadow,#adminmenuback{background-position:top right;background-repeat:repeat-y}#adminmenu li.wp-menu-separator{background:#dfdfdf;border-color:#cfcfcf}#adminmenu div.separator{border-color:#e1e1e1}#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:-1px 6px}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:-2px 6px}#adminmenu a.menu-top,.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#eefcf1;border-bottom-color:#dfdfdf}#adminmenu li.wp-menu-open{border-color:#dfdfdf}#adminmenu li.menu-top:hover>a,#adminmenu li.menu-top.focused>a,#adminmenu li.menu-top>a:focus{background-color:#eefcf1;text-shadow:0 1px 0 rgba(255,255,255,0.4)}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,#adminmenu .wp-menu-arrow,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#777;background-image:-ms-linear-gradient(bottom,#060,#6eb469);background-image:-moz-linear-gradient(bottom,#060,#6eb469);background-image:-o-linear-gradient(bottom,#060,#6eb469);background-image:-webkit-gradient(linear,left bottom,left top,from(#060),to(#6eb469));background-image:-webkit-linear-gradient(bottom,#060,#6eb469);background-image:linear-gradient(bottom,#060,#6eb469)}#adminmenu .wp-menu-arrow div{background-color:#777;background-image:-ms-linear-gradient(right bottom,#060,#6eb469);background-image:-moz-linear-gradient(right bottom,#060,#6eb469);background-image:-o-linear-gradient(right bottom,#060,#6eb469);background-image:-webkit-gradient(linear,right bottom,left top,from(#060),to(#6eb469));background-image:-webkit-linear-gradient(right bottom,#060,#6eb469);background-image:linear-gradient(right bottom,#060,#6eb469)}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{border-top-color:#eefcf1;border-bottom-color:#dfdfdf;background:#eefcf1}#adminmenu li.wp-not-current-submenu .wp-menu-arrow div{background:#eefcf1;border-color:#ccc}.folded #adminmenu li.menu-top li:hover a{background-image:none}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{text-shadow:0 -1px 0 #333;color:#fff;border-top-color:#6eb469;border-bottom-color:#060}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{border-top-color:#6eb469;border-bottom-color:#060}#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu a:focus{background-color:#eefcf1;color:#333}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333}#adminmenu .wp-submenu ul{background-color:#fff}#adminmenu .wp-submenu-wrap,#adminmenu .wp-submenu ul{border-color:#dfdfdf}#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4)}#adminmenu .wp-submenu .wp-submenu-head{border-right-color:#dfdfdf;background-color:#deece1}#adminmenu div.wp-submenu{background-color:transparent}#collapse-menu{color:#aaa}#collapse-menu:hover{color:#999}#collapse-button{border-color:#ccc;background-color:#f4f4f4;background-image:-ms-linear-gradient(bottom,#dfdfdf,#fff);background-image:-moz-linear-gradient(bottom,#dfdfdf,#fff);background-image:-o-linear-gradient(bottom,#dfdfdf,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#fff));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#fff);background-image:linear-gradient(bottom,#dfdfdf,#fff)}#collapse-menu:hover #collapse-button{border-color:#aaa}#collapse-button div{background-color:transparent;background-repeat:no-repeat;background-position:0 -72px}.folded #collapse-button div{background-position:0 -108px}.icon16.icon-dashboard,#adminmenu .menu-icon-dashboard div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-60px -33px}#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-dashboard.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-60px -1px}.icon16.icon-post,#adminmenu .menu-icon-post div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-271px -33px}#adminmenu .menu-icon-post:hover div.wp-menu-image,#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-271px -31px}.icon16.icon-media,#adminmenu .menu-icon-media div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-120px -33px}#adminmenu .menu-icon-media:hover div.wp-menu-image,#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-120px -1px}.icon16.icon-links,#adminmenu .menu-icon-links div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-90px -33px}#adminmenu .menu-icon-links:hover div.wp-menu-image,#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-90px -1px}.icon16.icon-page,#adminmenu .menu-icon-page div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-150px -33px}#adminmenu .menu-icon-page:hover div.wp-menu-image,#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-150px -1px}.icon16.icon-comments,#adminmenu .menu-icon-comments div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-30px -33px}#adminmenu .menu-icon-comments:hover div.wp-menu-image,#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-comments.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-30px -1px}.icon16.icon-appearance,#adminmenu .menu-icon-appearance div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:0 -33px}#adminmenu .menu-icon-appearance:hover div.wp-menu-image,#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:0 -1px}.icon16.icon-plugins,#adminmenu .menu-icon-plugins div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-180px -33px}#adminmenu .menu-icon-plugins:hover div.wp-menu-image,#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-180px -1px}.icon16.icon-users,#adminmenu .menu-icon-users div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-300px -33px}#adminmenu .menu-icon-users:hover div.wp-menu-image,#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-users.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-300px -1px}.icon16.icon-tools,#adminmenu .menu-icon-tools div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-210px -33px}#adminmenu .menu-icon-tools:hover div.wp-menu-image,#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-tools.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-210px -1px}.icon16.icon-settings,#adminmenu .menu-icon-settings div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-240px -33px}#adminmenu .menu-icon-settings:hover div.wp-menu-image,#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-240px -1px}.icon16.icon-site,#adminmenu .menu-icon-site div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-360px -33px}#adminmenu .menu-icon-site:hover div.wp-menu-image,#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-360px -1px}.icon32.icon-post,#icon-edit,#icon-post{background-color:transparent;background-repeat:no-repeat;background-position:-552px -5px}.icon32.icon-dashboard,#icon-index{background-color:transparent;background-repeat:no-repeat;background-position:-137px -5px}.icon32.icon-media,#icon-upload{background-color:transparent;background-repeat:no-repeat;background-position:-251px -5px}.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category{background-color:transparent;background-repeat:no-repeat;background-position:-190px -5px}.icon32.icon-page,#icon-edit-pages,#icon-page{background-color:transparent;background-repeat:no-repeat;background-position:-312px -5px}.icon32.icon-comments,#icon-edit-comments{background-color:transparent;background-repeat:no-repeat;background-position:-72px -5px}.icon32.icon-appearance,#icon-themes{background-color:transparent;background-repeat:no-repeat;background-position:-11px -5px}.icon32.icon-plugins,#icon-plugins{background-color:transparent;background-repeat:no-repeat;background-position:-370px -5px}.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit{background-color:transparent;background-repeat:no-repeat;background-position:-600px -5px}.icon32.icon-tools,#icon-tools,#icon-admin{background-color:transparent;background-repeat:no-repeat;background-position:-432px -5px}.icon32.icon-settings,#icon-options-general{background-color:transparent;background-repeat:no-repeat;background-position:-492px -5px}.icon32.icon-site,#icon-ms-admin{background-color:transparent;background-repeat:no-repeat;background-position:-659px -5px}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#e4f2fd}#sidemenu a{background-color:#eefcf1;border-color:#eefcf1;border-bottom-color:#dfdfdf}#sidemenu a.current{background-color:#fff;border-color:#dfdfdf #dfdfdf #fff;color:#d54e21}#replyerror{border-color:#ddd;background-color:#eefcf1}.vim-current,.vim-current th,.vim-current td{background-color:#e4f2fd!important}.star-average,.star.star-rating{background-color:#fc0}div.star.select:hover{background-color:#d00}div.star img{border-left:1px solid #fff;border-right:1px solid #fff}.widefat div.star img{border-left:1px solid #eefcf1;border-right:1px solid #eefcf1}#plugin-information .fyi ul{background-color:#eaf3fa}#plugin-information .fyi h2.mainheader{background-color:#cee1ef}#plugin-information pre,#plugin-information code{background-color:#ededff}#plugin-information pre{border:1px solid #ccc}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea,#bulk-titles{border-color:#ddd}.inline-editor div.title{background-color:#eaf3fa}.inline-editor ul.cat-checklist{background-color:#fff;border-color:#ddd}.inline-editor .categories .catshow,.inline-editor .categories .cathide{color:#070}.inline-editor .quick-edit-save{background-color:#f1f1f1}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf}.attention{color:#d54e21}.meta-box-sortables .postbox:hover .handlediv{background-color:transparent;background-repeat:no-repeat;background-position:6px 7px}.tablenav .tablenav-pages{color:#555}.tablenav .tablenav-pages a{border-color:#e3e3e3;background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:left -379px}.tablenav .tablenav-pages a:hover,.tablenav .tablenav-pages a:focus{color:#d54e21}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:focus{color:#aaa}.tablenav .tablenav-pages .current{background:#dfdfdf;border-color:#d3d3d3}#availablethemes,#availablethemes td{border-color:#ddd}#current-theme img{border-color:#999}#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{color:#999}#TB_window #TB_title a.tb-theme-preview-link:hover,#TB_window #TB_title a.tb-theme-preview-link:focus{color:#ccc}.misc-pub-section{border-top-color:#fff;border-bottom-color:#dfdfdf}#minor-publishing{border-bottom-color:#dfdfdf}#post-body .misc-pub-section{border-right-color:#eee}.post-com-count span{background-color:#bbb}.form-table .color-palette td{border-color:#fff}.sortable-placeholder{border-color:#bbb;background-color:#eefcf1}#post-body ul.category-tabs li.tabs a,#post-body ul.add-menu-item-tabs li.tabs a,body.press-this ul.category-tabs li.tabs a{color:#333}.view-switch #view-switch-list{background-color:transparent;background-repeat:no-repeat;background-position:0 0}.view-switch .current #view-switch-list{background-color:transparent;background-repeat:no-repeat;background-position:-40px 0}.view-switch #view-switch-excerpt{background-color:transparent;background-repeat:no-repeat;background-position:-20px 0}.view-switch .current #view-switch-excerpt{background-color:transparent;background-repeat:no-repeat;background-position:-60px 0}#header-logo{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:center center}.popular-tags,.feature-filter{background-color:#fff;border-color:#dfdfdf}#theme-information .action-button{border-top-color:#dfdfdf}.theme-listing br.line{border-bottom-color:#ccc}div.widgets-sortables,#widgets-left .inactive{background-color:#fcfcfc;border-color:#dfdfdf}#available-widgets .widget-holder{background-color:#fcfcfc;border-color:#dfdfdf}#available-widgets .widget-description{color:#555}.sidebar-name{color:#464646;text-shadow:#fff 0 1px 0;border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.sidebar-name:hover,#removing-widget{color:#d54e21}#removing-widget span{color:black}.sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.sidebar-name:hover .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.in-widget-title{color:#606060}.deleting .widget-title *{color:#aaa}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:.5}#dashboard_recent_comments div.undo{border-top-color:#dfdfdf}.comment-ays,.comment-ays th{border-color:#ddd}.comment-ays th{background-color:#f1f1f1}#menu-management .menu-edit{border-color:#dfdfdf}#post-body{background:#fff;border-top-color:#fff;border-bottom-color:#dfdfdf}#nav-menu-header{border-bottom-color:#dfdfdf}#nav-menu-footer{border-top-color:#fff}#menu-management .nav-tabs-arrow a{color:#c1c1c1}#menu-management .nav-tabs-arrow a:hover{color:#d54e21}#menu-management .nav-tabs-arrow a:active{color:#464646}#menu-management .nav-tab-active{border-color:#dfdfdf}#menu-management .nav-tab{background:#fbfbfb;border-color:#dfdfdf}.js .input-with-default-title{color:#aaa}#cancel-save{color:#f00}#cancel-save:hover{background-color:#f00;color:#fff}.list-container{border-color:#dfdfdf}.menu-item-handle{border-color:#dfdfdf}.menu li.deleting .menu-item-handle{background-color:#f66;text-shadow:#ccc}.item-type{color:#999}.item-controls .menu-item-delete:hover{color:#f00}.item-edit{background-color:transparent;background-repeat:no-repeat;background-position:8px 10px;border-bottom-color:#eee}.item-edit:hover{background-color:transparent;background-repeat:no-repeat;background-position:8px 10px}.menu-item-settings{border-color:#dfdfdf}.link-to-original{color:#777;border-color:#dfdfdf}#cancel-save:hover{color:#fff!important}#update-menu-item{color:#fff!important}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important}.submitbox .submitcancel{color:#070;border-bottom-color:#070}.submitbox .submitcancel:hover{background:#070;color:#fff}#menu-management .nav-tab-active,.menu-item-handle,.menu-item-settings{-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}#menu-management .nav-tab-active{background:#eefcf1;border-bottom-color:#eefcf1}#upload-form label{color:#777}.fullscreen-overlay{background:#fff}.wp-fullscreen-focus #wp-fullscreen-title,.wp-fullscreen-focus #wp-fullscreen-container{border-color:#ccc}#fullscreen-topbar{border-bottom-color:#dfdfdf}.about-wrap h1{color:#333;text-shadow:1px 1px 1px white}.about-text{color:#777}.wp-badge{color:#fff;text-shadow:0 -1px 0 #0c3d57;border-color:#2b5173;-moz-box-shadow:inset 0 0 0 1px #5f8ca8;-webkit-box-shadow:inset 0 0 0 1px #5f8ca8;box-shadow:inset 0 0 0 1px #5f8ca8;background-color:#378aac}.about-wrap h2 .nav-tab{color:#070}.about-wrap h2 .nav-tab:hover{color:#d54e21}.about-wrap h2 .nav-tab-active,.about-wrap h2 .nav-tab-active:hover{color:#333}.about-wrap h2 .nav-tab-active{text-shadow:1px 1px 1px white;color:#464646}.about-wrap h3{color:#333;text-shadow:1px 1px 1px white}.about-wrap .feature-section h4{color:#464646}.about-wrap .feature-section img{background:#eefcf1;border-color:#dfdfdf;-moz-box-shadow:0 0 6px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 6px rgba(0,0,0,0.3);box-shadow:0 0 6px rgba(0,0,0,0.3)}.about-wrap h4.wp-people-group{text-shadow:1px 1px 1px white}.about-wrap li.wp-person img.gravatar{-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);box-shadow:0 0 4px rgba(0,0,0,0.4)}.about-wrap li.wp-person .title{color:#464646;text-shadow:1px 1px 1px white}.freedoms-php .about-wrap ol li{color:#999}.freedoms-php .about-wrap ol p{color:#464646}.rtl .bar{border-right-color:none;border-left-color:#99d}.rtl #screen-meta-links a.show-settings{background-position:left 3px}.rtl #screen-meta-links a.show-settings.screen-meta-active{background-position:left -33px}.rtl #adminmenushadow,.rtl #adminmenuback{background-position:top left}.rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,.rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:8px 6px}.rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,.rtl #adminmenu .wp-menu-open .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:8px 6px}.rtl #adminmenu .wp-submenu .wp-submenu-head{border-right-color:none;border-left-color:#dfdfdf}.rtl .folded #adminmenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4)}.rtl #collapse-button div{background-position:0 -108px}.rtl .folded #collapse-button div{background-position:0 -72px}.rtl .meta-box-sortables .postbox:hover .handlediv{background-color:transparent;background-repeat:no-repeat;background-position:6px 7px}.rtl .tablenav .tablenav-pages a{border-color:#e3e3e3;background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:right -379px}.rtl #post-body .misc-pub-section{border-right-color:none;border-left-color:#eee}.rtl .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.rtl .sidebar-name:hover .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}
1
+ html,.wp-dialog{background-color:#fff}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],select{border-color:#dfdfdf;background-color:#fff}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="file"]:focus,input[type="button"]:focus,input[type="submit"]:focus,input[type="reset"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="url"]:focus,select:focus{border-color:#bbb}kbd,code{background:#eaeaea}input[readonly]{background-color:#eee}.find-box-search{border-color:#dfdfdf;background-color:#f1f1f1}.find-box{background-color:#f1f1f1}.find-box-inside{background-color:#fff}a.page-numbers:hover{border-color:#999}body,#wpbody,.form-table .pre{color:#333}body>#upload-menu{border-bottom-color:#fff}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links{border-color:#ccc}#poststuff .inside label.spam,#poststuff .inside label.deleted{color:red}#poststuff .inside label.waiting{color:orange}#poststuff .inside label.approved{color:green}#postcustomstuff table{border-color:#dfdfdf;background-color:#f9f9f9}#postcustomstuff thead th{background-color:#f1f1f1}.widefat{border-color:#dfdfdf;background-color:#eefcf1}textarea.widefat{background-color:#fff}div.dashboard-widget-error{background-color:#c43}div.dashboard-widget-notice{background-color:#cfe1ef}div.dashboard-widget-submit{border-top-color:#ccc}div.tabs-panel,.wp-tab-panel,ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-color:#dfdfdf;background-color:#fff}ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{background-color:#fff}input.disabled,textarea.disabled{background-color:#ccc}#plugin-information .action-button a,#plugin-information .action-button a:hover,#plugin-information .action-button a:visited{color:#fff}.widget .widget-top,.postbox h3,.stuffbox h3,.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head,.sidebar-name,#nav-menu-header,#nav-menu-footer,.menu-item-handle,#fullscreen-topbar{background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#eefcf1,#deece1);background-image:-moz-linear-gradient(top,#eefcf1,#deece1);background-image:-o-linear-gradient(top,#eefcf1,#deece1);background-image:-webkit-gradient(linear,left top,left bottom,from(#eefcf1),to(#deece1));background-image:-webkit-linear-gradient(top,#eefcf1,#deece1);background-image:linear-gradient(top,#eefcf1,#deece1)}.widget .widget-top,.postbox h3,.stuffbox h3{border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-moz-box-shadow:0 1px 0 #fff;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.form-table th,.form-wrap label{color:#222;text-shadow:#fff 0 1px 0}.description,.form-wrap p{color:#666}strong .post-com-count span{background-color:#070}.sorthelper{background-color:#ccf3fa}.ac_match,.subsubsub a.current{color:#000}.wrap h2{color:#464646}.wrap .add-new-h2{background:#f1f1f1}.subtitle{color:#777}.ac_over{background-color:#f0f0b8}.ac_results{background-color:#fff;border-color:#6eb469}.ac_results li{color:#101010}.alternate,.alt{background-color:#fefefe}.available-theme a.screenshot{background-color:#f1f1f1;border-color:#ddd}.bar{background-color:#e8e8e8;border-right-color:#99d}#media-upload,#media-upload .media-item .slidetoggle{background:#fff}#media-upload .slidetoggle{border-top-color:#dfdfdf}div.error,.login #login_error{background-color:#ffebe8;border-color:#c00}div.error a{color:#c00}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.submit{border-color:#dfdfdf}.highlight{background-color:#e4f2fd;color:#000}.howto,.nonessential,#edit-slug-box,.form-input-tip,.subsubsub{color:#666}#wpbody-content #media-items .describe{border-top-color:#dfdfdf}.media-upload-form label.form-help,td.help{color:#9a9a9a}.post-com-count{color:#fff}.post-com-count span{background-color:#bbb;color:#fff}.post-com-count:hover span{background-color:#d54e21}.quicktags,.search{background-color:#ccc;color:#000}.side-info h5{border-bottom-color:#dadada}.side-info ul{color:#666}.button,.button-secondary,.submit input,input[type=button],input[type=submit]{border-color:#bbb;color:#464646}.button:hover,.button-secondary:hover,.submit input:hover,input[type=button]:hover,input[type=submit]:hover{color:#000;border-color:#666}.button,.submit input,.button-secondary{background-color:#f2f2f2;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;text-shadow:rgba(255,255,255,1) 0 1px 0}.button:active,.submit input:active,.button-secondary:active{background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:left top}input.button-primary,button.button-primary,a.button-primary{border-color:#298cba;font-weight:bold;color:#fff;background-image:url('../images/button-grad.png');background-color:#070;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;text-shadow:rgba(0,0,0,0.3) 0 -1px 0}input.button-primary:active,button.button-primary:active,a.button-primary:active{background-image:url('../images/button-grad-active.png');background-color:#070;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;color:#eaf2fa}input.button-primary:hover,button.button-primary:hover,a.button-primary:hover,a.button-primary:focus,a.button-primary:active{border-color:#13455b;color:#eaf2fa}.button-disabled,.button[disabled],.button:disabled,.button-secondary[disabled],.button-secondary:disabled,a.button.disabled{color:#aaa!important;border-color:#ddd!important}.button-primary-disabled,.button-primary[disabled],.button-primary:disabled{color:#9fd0d5!important;background:#298cba!important}a:hover,a:active,a:focus{color:#d54e21}#adminmenu a:hover,#adminmenu li.menu-top>a:focus,#adminmenu ul.wp-submenu a:hover,#the-comment-list .comment a:hover,#rightnow a:hover,#media-upload a.del-link:hover,div.dashboard-widget-submit input:hover,.subsubsub a:hover,.subsubsub a.current:hover,.ui-tabs-nav a:hover,.plugins .inactive a:hover,#all-plugins-table .plugins .inactive a:hover,#search-plugins-table .plugins .inactive a:hover{color:#d54e21}#the-comment-list .comment-item,#dashboard-widgets #dashboard_quick_press form p.submit{border-color:#dfdfdf}#side-sortables .category-tabs .tabs a,#side-sortables .add-menu-item-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#333}#rightnow .rbutton{background-color:#ebebeb;color:#264761}.submitbox .submit{background-color:#464646;color:#ccc}.plugins a.delete:hover,#all-plugins-table .plugins a.delete:hover,#search-plugins-table .plugins a.delete:hover,.submitbox .submitdelete{color:#f00;border-bottom-color:#f00}.submitbox .submitdelete:hover,#media-items a.delete:hover{color:#fff;background-color:#f00;border-bottom-color:#f00}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:#f00;border-bottom-color:#f00}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#070}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#d54e21}div.updated,.login .message{background-color:#ffffe0;border-color:#e6db55}.update-message{color:#000}a.page-numbers{border-bottom-color:#b8d3e2}.commentlist li{border-bottom-color:#ccc}.widefat td,.widefat th{border-top-color:#fff;border-bottom-color:#dfdfdf}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0}.widefat td{color:#555}.widefat p,.widefat ol,.widefat ul{color:#333}.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head{color:#333}th.sortable a:hover,th.sortable a:active,th.sortable a:focus{color:#333}h3.dashboard-widget-title small a{color:#d7d7d7}h3.dashboard-widget-title small a:hover{color:#fff}a,#adminmenu a,#the-comment-list p.comment-author strong a,#media-upload a.del-link,#media-items a.delete,.plugins a.delete,.ui-tabs-nav a{color:#070}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-khtml-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}#plugin-information .action-button{background-color:#d54e21;color:#fff}#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-khtml-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}div#media-upload-header,div#plugin-information-header{background-color:#eefcf1;border-bottom-color:#dfdfdf}#currenttheme img{border-color:#666}#dashboard_secondary div.dashboard-widget-content ul li a{background-color:#eefcf1}input.readonly,textarea.readonly{background-color:#ddd}#editable-post-name{background-color:#fffbcc}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on,.submitted-on{color:#777}.login #nav a,.login #backtoblog a{color:#070!important}.login #nav a:hover,.login #backtoblog a:hover{color:#d54e21!important}#footer{color:#777;border-color:#dfdfdf}#media-items,.imgedit-group,.media-item{border-color:#dfdfdf}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fcfcfc}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#f4f4f4}.plugin-update-tr .update-message{background-color:#fffbe4;border-color:#dfdfdf}.plugins .active,.plugins .active th,.plugins .active td{color:#000}.plugins .inactive a{color:#579}#the-comment-list tr.undo,#the-comment-list div.undo{background-color:#f4f4f4}#the-comment-list .unapproved{background-color:#ffffe0}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}table.widefat span.delete a,table.widefat span.trash a,table.widefat span.spam a,#dashboard_recent_comments .delete a,#dashboard_recent_comments .trash a,#dashboard_recent_comments .spam a{color:#bc0b0b}.welcome-panel{border-color:#dfdfdf}.welcome-panel p{color:#777}.welcome-panel-column p{color:#464646}.welcome-panel .welcome-panel-close{background:#eee;text-shadow:1px 1px 1px #eee}.welcome-panel h3{text-shadow:1px 1px 1px white}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.widget,#widget-list .widget-top,.postbox,.menu-item-settings{background-color:#eefcf1;background-image:-ms-linear-gradient(top,#eefcf1,#deece1);background-image:-moz-linear-gradient(top,#eefcf1,#deece1);background-image:-o-linear-gradient(top,#eefcf1,#deece1);background-image:-webkit-gradient(linear,left top,left bottom,from(#eefcf1),to(#deece1));background-image:-webkit-linear-gradient(top,#eefcf1,#deece1);background-image:linear-gradient(top,#eefcf1,#deece1)}.postbox h3{color:#464646}.widget .widget-top{color:#222}.sidebar-name:hover h3,.postbox h3:hover{color:#000}#quicktags #ed_link{color:#00f}#rightnow .youhave{background-color:#f0f6fb}#rightnow a{color:#448abd}.tagchecklist span a,#bulk-titles div a{background-repeat:no-repeat}.tagchecklist span a:hover,#bulk-titles div a:hover{background-repeat:no-repeat;background-position:-10px 0}#update-nag,.update-nag{background-color:#fffbcc;border-color:#e6db55;color:#555}#screen-meta{background-color:#f1f1f1;border-color:#ccc;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.05);box-shadow:0 1px 3px rgba(0,0,0,0.05)}.contextual-help-tabs a:hover{color:#333}.contextual-help-sidebar,.contextual-help-tabs .active{border-color:#ccc}.contextual-help-tabs .active,.contextual-help-tabs .active a,.contextual-help-tabs .active a:hover{background:#fff;color:#000}.contextual-help-tabs-wrap{border-color:#ccc;background-color:#fff}#screen-options-link-wrap,#contextual-help-link-wrap{background-color:#e3e3e3;border-right:1px solid transparent;border-left:1px solid transparent;border-bottom:1px solid transparent;background-image:-ms-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-moz-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-o-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#f1f1f1));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:linear-gradient(bottom,#dfdfdf,#f1f1f1)}#screen-meta-links a.show-settings{color:#777}#screen-meta-links a.show-settings:hover{color:#000}#screen-meta-links a.show-settings{background-color:transparent;background-repeat:no-repeat;background-position:right 3px}#screen-meta-links a.show-settings.screen-meta-active{background-color:transparent;background-repeat:no-repeat;background-position:right -33px}.login #backtoblog a{color:#464646}#wphead{border-bottom:#dfdfdf 1px solid}#wphead h1 a{color:#464646}#footer a:link,#footer a:visited{text-decoration:none}#footer a:hover{color:#000;text-decoration:underline}.file-error,abbr.required,.widget-control-remove:hover,table.widefat .delete a:hover,table.widefat .trash a:hover,table.widefat .spam a:hover,#dashboard_recent_comments .delete a:hover,#dashboard_recent_comments .trash a:hover #dashboard_recent_comments .spam a:hover{color:#f00}#pass-strength-result{background-color:#eee;border-color:#ddd!important}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}#titlediv #title{border-color:#ccc}#post-status-info{border-color:#dfdfdf #ccc #ccc;background-color:#eaeaea}.editwidget .widget-inside{border-color:#dfdfdf}#titlediv #title{background-color:#fff}#tTips p#tTips_inside{background-color:#ddd;color:#333}#timestampdiv input,#namediv input,#poststuff .inside .the-tagcloud{border-color:#ddd}#adminmenuback,#adminmenuwrap{background-color:#deece1;border-color:#ccc}#adminmenushadow,#adminmenuback{background-position:top right;background-repeat:repeat-y}#adminmenu li.wp-menu-separator{background:#dfdfdf;border-color:#cfcfcf}#adminmenu div.separator{border-color:#e1e1e1}#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:-1px 6px}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:-2px 6px}#adminmenu a.menu-top,.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#eefcf1;border-bottom-color:#dfdfdf}#adminmenu li.wp-menu-open{border-color:#dfdfdf}#adminmenu li.menu-top:hover>a,#adminmenu li.menu-top.focused>a,#adminmenu li.menu-top>a:focus{background-color:#eefcf1;text-shadow:0 1px 0 rgba(255,255,255,0.4)}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,#adminmenu .wp-menu-arrow,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#777;background-image:-ms-linear-gradient(bottom,#060,#6eb469);background-image:-moz-linear-gradient(bottom,#060,#6eb469);background-image:-o-linear-gradient(bottom,#060,#6eb469);background-image:-webkit-gradient(linear,left bottom,left top,from(#060),to(#6eb469));background-image:-webkit-linear-gradient(bottom,#060,#6eb469);background-image:linear-gradient(bottom,#060,#6eb469)}#adminmenu .wp-menu-arrow div{background-color:#777;background-image:-ms-linear-gradient(right bottom,#060,#6eb469);background-image:-moz-linear-gradient(right bottom,#060,#6eb469);background-image:-o-linear-gradient(right bottom,#060,#6eb469);background-image:-webkit-gradient(linear,right bottom,left top,from(#060),to(#6eb469));background-image:-webkit-linear-gradient(right bottom,#060,#6eb469);background-image:linear-gradient(right bottom,#060,#6eb469)}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{border-top-color:#eefcf1;border-bottom-color:#dfdfdf;background:#eefcf1}#adminmenu li.wp-not-current-submenu .wp-menu-arrow div{background:#eefcf1;border-color:#ccc}.folded #adminmenu li.menu-top li:hover a{background-image:none}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{text-shadow:0 -1px 0 #333;color:#fff;border-top-color:#6eb469;border-bottom-color:#060}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{border-top-color:#6eb469;border-bottom-color:#060}#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu a:focus{background-color:#eefcf1;color:#333}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333}#adminmenu .wp-submenu ul{background-color:#fff}#adminmenu .wp-submenu-wrap,#adminmenu .wp-submenu ul{border-color:#dfdfdf}#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4)}#adminmenu .wp-submenu .wp-submenu-head{border-right-color:#dfdfdf;background-color:#deece1}#adminmenu div.wp-submenu{background-color:transparent}#collapse-menu{color:#aaa}#collapse-menu:hover{color:#999}#collapse-button{border-color:#ccc;background-color:#f4f4f4;background-image:-ms-linear-gradient(bottom,#dfdfdf,#fff);background-image:-moz-linear-gradient(bottom,#dfdfdf,#fff);background-image:-o-linear-gradient(bottom,#dfdfdf,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#fff));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#fff);background-image:linear-gradient(bottom,#dfdfdf,#fff)}#collapse-menu:hover #collapse-button{border-color:#aaa}#collapse-button div{background-color:transparent;background-repeat:no-repeat;background-position:0 -72px}.folded #collapse-button div{background-position:0 -108px}.icon16.icon-dashboard,#adminmenu .menu-icon-dashboard div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-60px -33px}#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-dashboard.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-60px -1px}.icon16.icon-post,#adminmenu .menu-icon-post div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-271px -33px}#adminmenu .menu-icon-post:hover div.wp-menu-image,#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-271px -33px}.icon16.icon-media,#adminmenu .menu-icon-media div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-120px -33px}#adminmenu .menu-icon-media:hover div.wp-menu-image,#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-120px -1px}.icon16.icon-links,#adminmenu .menu-icon-links div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-90px -33px}#adminmenu .menu-icon-links:hover div.wp-menu-image,#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-90px -1px}.icon16.icon-page,#adminmenu .menu-icon-page div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-150px -33px}#adminmenu .menu-icon-page:hover div.wp-menu-image,#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-150px -1px}.icon16.icon-comments,#adminmenu .menu-icon-comments div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-30px -33px}#adminmenu .menu-icon-comments:hover div.wp-menu-image,#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-comments.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-30px -1px}.icon16.icon-appearance,#adminmenu .menu-icon-appearance div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:0 -33px}#adminmenu .menu-icon-appearance:hover div.wp-menu-image,#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:0 -1px}.icon16.icon-plugins,#adminmenu .menu-icon-plugins div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-180px -33px}#adminmenu .menu-icon-plugins:hover div.wp-menu-image,#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-180px -1px}.icon16.icon-users,#adminmenu .menu-icon-users div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-300px -33px}#adminmenu .menu-icon-users:hover div.wp-menu-image,#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-users.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-300px -1px}.icon16.icon-tools,#adminmenu .menu-icon-tools div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-210px -33px}#adminmenu .menu-icon-tools:hover div.wp-menu-image,#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-tools.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-210px -1px}.icon16.icon-settings,#adminmenu .menu-icon-settings div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-240px -33px}#adminmenu .menu-icon-settings:hover div.wp-menu-image,#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-240px -1px}.icon16.icon-site,#adminmenu .menu-icon-site div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-360px -33px}#adminmenu .menu-icon-site:hover div.wp-menu-image,#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-360px -1px}.icon32.icon-post,#icon-edit,#icon-post{background-color:transparent;background-repeat:no-repeat;background-position:-552px -5px}.icon32.icon-dashboard,#icon-index{background-color:transparent;background-repeat:no-repeat;background-position:-137px -5px}.icon32.icon-media,#icon-upload{background-color:transparent;background-repeat:no-repeat;background-position:-251px -5px}.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category{background-color:transparent;background-repeat:no-repeat;background-position:-190px -5px}.icon32.icon-page,#icon-edit-pages,#icon-page{background-color:transparent;background-repeat:no-repeat;background-position:-312px -5px}.icon32.icon-comments,#icon-edit-comments{background-color:transparent;background-repeat:no-repeat;background-position:-72px -5px}.icon32.icon-appearance,#icon-themes{background-color:transparent;background-repeat:no-repeat;background-position:-11px -5px}.icon32.icon-plugins,#icon-plugins{background-color:transparent;background-repeat:no-repeat;background-position:-370px -5px}.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit{background-color:transparent;background-repeat:no-repeat;background-position:-600px -5px}.icon32.icon-tools,#icon-tools,#icon-admin{background-color:transparent;background-repeat:no-repeat;background-position:-432px -5px}.icon32.icon-settings,#icon-options-general{background-color:transparent;background-repeat:no-repeat;background-position:-492px -5px}.icon32.icon-site,#icon-ms-admin{background-color:transparent;background-repeat:no-repeat;background-position:-659px -5px}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#e4f2fd}#sidemenu a{background-color:#eefcf1;border-color:#eefcf1;border-bottom-color:#dfdfdf}#sidemenu a.current{background-color:#fff;border-color:#dfdfdf #dfdfdf #fff;color:#d54e21}#replyerror{border-color:#ddd;background-color:#eefcf1}.vim-current,.vim-current th,.vim-current td{background-color:#e4f2fd!important}.star-average,.star.star-rating{background-color:#fc0}div.star.select:hover{background-color:#d00}div.star img{border-left:1px solid #fff;border-right:1px solid #fff}.widefat div.star img{border-left:1px solid #eefcf1;border-right:1px solid #eefcf1}#plugin-information .fyi ul{background-color:#eaf3fa}#plugin-information .fyi h2.mainheader{background-color:#cee1ef}#plugin-information pre,#plugin-information code{background-color:#ededff}#plugin-information pre{border:1px solid #ccc}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea,#bulk-titles{border-color:#ddd}.inline-editor div.title{background-color:#eaf3fa}.inline-editor ul.cat-checklist{background-color:#fff;border-color:#ddd}.inline-editor .categories .catshow,.inline-editor .categories .cathide{color:#070}.inline-editor .quick-edit-save{background-color:#f1f1f1}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf}.attention{color:#d54e21}.meta-box-sortables .postbox:hover .handlediv{background-color:transparent;background-repeat:no-repeat;background-position:6px 7px}.tablenav .tablenav-pages{color:#555}.tablenav .tablenav-pages a{border-color:#e3e3e3;background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:left -379px}.tablenav .tablenav-pages a:hover,.tablenav .tablenav-pages a:focus{color:#d54e21}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:focus{color:#aaa}.tablenav .tablenav-pages .current{background:#dfdfdf;border-color:#d3d3d3}#availablethemes,#availablethemes td{border-color:#ddd}#current-theme img{border-color:#999}#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{color:#999}#TB_window #TB_title a.tb-theme-preview-link:hover,#TB_window #TB_title a.tb-theme-preview-link:focus{color:#ccc}.misc-pub-section{border-top-color:#fff;border-bottom-color:#dfdfdf}#minor-publishing{border-bottom-color:#dfdfdf}#post-body .misc-pub-section{border-right-color:#eee}.post-com-count span{background-color:#bbb}.form-table .color-palette td{border-color:#fff}.sortable-placeholder{border-color:#bbb;background-color:#eefcf1}#post-body ul.category-tabs li.tabs a,#post-body ul.add-menu-item-tabs li.tabs a,body.press-this ul.category-tabs li.tabs a{color:#333}.view-switch #view-switch-list{background-color:transparent;background-repeat:no-repeat;background-position:0 0}.view-switch .current #view-switch-list{background-color:transparent;background-repeat:no-repeat;background-position:-40px 0}.view-switch #view-switch-excerpt{background-color:transparent;background-repeat:no-repeat;background-position:-20px 0}.view-switch .current #view-switch-excerpt{background-color:transparent;background-repeat:no-repeat;background-position:-60px 0}#header-logo{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:center center}.popular-tags,.feature-filter{background-color:#fff;border-color:#dfdfdf}#theme-information .action-button{border-top-color:#dfdfdf}.theme-listing br.line{border-bottom-color:#ccc}div.widgets-sortables,#widgets-left .inactive{background-color:#fcfcfc;border-color:#dfdfdf}#available-widgets .widget-holder{background-color:#fcfcfc;border-color:#dfdfdf}#available-widgets .widget-description{color:#555}.sidebar-name{color:#464646;text-shadow:#fff 0 1px 0;border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.sidebar-name:hover,#removing-widget{color:#d54e21}#removing-widget span{color:black}.sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.sidebar-name:hover .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.in-widget-title{color:#606060}.deleting .widget-title *{color:#aaa}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:.5}#dashboard_recent_comments div.undo{border-top-color:#dfdfdf}.comment-ays,.comment-ays th{border-color:#ddd}.comment-ays th{background-color:#f1f1f1}#menu-management .menu-edit{border-color:#dfdfdf}#post-body{background:#fff;border-top-color:#fff;border-bottom-color:#dfdfdf}#nav-menu-header{border-bottom-color:#dfdfdf}#nav-menu-footer{border-top-color:#fff}#menu-management .nav-tabs-arrow a{color:#c1c1c1}#menu-management .nav-tabs-arrow a:hover{color:#d54e21}#menu-management .nav-tabs-arrow a:active{color:#464646}#menu-management .nav-tab-active{border-color:#dfdfdf}#menu-management .nav-tab{background:#fbfbfb;border-color:#dfdfdf}.js .input-with-default-title{color:#aaa}#cancel-save{color:#f00}#cancel-save:hover{background-color:#f00;color:#fff}.list-container{border-color:#dfdfdf}.menu-item-handle{border-color:#dfdfdf}.menu li.deleting .menu-item-handle{background-color:#f66;text-shadow:#ccc}.item-type{color:#999}.item-controls .menu-item-delete:hover{color:#f00}.item-edit{background-color:transparent;background-repeat:no-repeat;background-position:8px 10px;border-bottom-color:#eee}.item-edit:hover{background-color:transparent;background-repeat:no-repeat;background-position:8px 10px}.menu-item-settings{border-color:#dfdfdf}.link-to-original{color:#777;border-color:#dfdfdf}#cancel-save:hover{color:#fff!important}#update-menu-item{color:#fff!important}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important}.submitbox .submitcancel{color:#070;border-bottom-color:#070}.submitbox .submitcancel:hover{background:#070;color:#fff}#menu-management .nav-tab-active,.menu-item-handle,.menu-item-settings{-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}#menu-management .nav-tab-active{background:#eefcf1;border-bottom-color:#eefcf1}#upload-form label{color:#777}.fullscreen-overlay{background:#fff}.wp-fullscreen-focus #wp-fullscreen-title,.wp-fullscreen-focus #wp-fullscreen-container{border-color:#ccc}#fullscreen-topbar{border-bottom-color:#dfdfdf}.about-wrap h1{color:#333;text-shadow:1px 1px 1px white}.about-text{color:#777}.wp-badge{color:#fff;text-shadow:0 -1px 0 #0c3d57;border-color:#2b5173;-moz-box-shadow:inset 0 0 0 1px #5f8ca8;-webkit-box-shadow:inset 0 0 0 1px #5f8ca8;box-shadow:inset 0 0 0 1px #5f8ca8;background-color:#378aac}.about-wrap h2 .nav-tab{color:#070}.about-wrap h2 .nav-tab:hover{color:#d54e21}.about-wrap h2 .nav-tab-active,.about-wrap h2 .nav-tab-active:hover{color:#333}.about-wrap h2 .nav-tab-active{text-shadow:1px 1px 1px white;color:#464646}.about-wrap h3{color:#333;text-shadow:1px 1px 1px white}.about-wrap .feature-section h4{color:#464646}.about-wrap .feature-section img{background:#eefcf1;border-color:#dfdfdf;-moz-box-shadow:0 0 6px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 6px rgba(0,0,0,0.3);box-shadow:0 0 6px rgba(0,0,0,0.3)}.about-wrap h4.wp-people-group{text-shadow:1px 1px 1px white}.about-wrap li.wp-person img.gravatar{-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);box-shadow:0 0 4px rgba(0,0,0,0.4)}.about-wrap li.wp-person .title{color:#464646;text-shadow:1px 1px 1px white}.freedoms-php .about-wrap ol li{color:#999}.freedoms-php .about-wrap ol p{color:#464646}.rtl .bar{border-right-color:none;border-left-color:#99d}.rtl #screen-meta-links a.show-settings{background-position:left 3px}.rtl #screen-meta-links a.show-settings.screen-meta-active{background-position:left -33px}.rtl #adminmenushadow,.rtl #adminmenuback{background-position:top left}.rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,.rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:8px 6px}.rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,.rtl #adminmenu .wp-menu-open .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:8px 6px}.rtl #adminmenu .wp-submenu .wp-submenu-head{border-right-color:none;border-left-color:#dfdfdf}.rtl .folded #adminmenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4)}.rtl #collapse-button div{background-position:0 -108px}.rtl .folded #collapse-button div{background-position:0 -72px}.rtl .meta-box-sortables .postbox:hover .handlediv{background-color:transparent;background-repeat:no-repeat;background-position:6px 7px}.rtl .tablenav .tablenav-pages a{border-color:#e3e3e3;background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:right -379px}.rtl #post-body .misc-pub-section{border-right-color:none;border-left-color:#eee}.rtl .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.rtl .sidebar-name:hover .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}
includes/admin/styles/green.css ADDED
@@ -0,0 +1,2086 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*------------------------------------------------------------------------------
2
+
3
+
4
+ Howdy! This is the CSS file that controls the
5
+ Green (minty) color style on the WordPress Dashboard.
6
+
7
+ This file contains both LTR and RTL styles.
8
+
9
+
10
+ TABLE OF CONTENTS:
11
+ ------------------
12
+ 1.0 - Left to Right Styles
13
+ 2.0 - Right to Left Styles
14
+
15
+
16
+ ------------------------------------------------------------------------------*/
17
+
18
+
19
+ /*------------------------------------------------------------------------------
20
+ 1.0 - Left to Right Styles
21
+ ------------------------------------------------------------------------------*/
22
+
23
+ html,
24
+ .wp-dialog {
25
+ background-color: #fff;
26
+ }
27
+
28
+ textarea,
29
+ input[type="text"],
30
+ input[type="password"],
31
+ input[type="file"],
32
+ input[type="button"],
33
+ input[type="submit"],
34
+ input[type="reset"],
35
+ input[type="email"],
36
+ input[type="number"],
37
+ input[type="search"],
38
+ input[type="tel"],
39
+ input[type="url"],
40
+ select {
41
+ border-color: #dfdfdf;
42
+ background-color: #fff;
43
+ }
44
+
45
+ textarea:focus,
46
+ input[type="text"]:focus,
47
+ input[type="password"]:focus,
48
+ input[type="file"]:focus,
49
+ input[type="button"]:focus,
50
+ input[type="submit"]:focus,
51
+ input[type="reset"]:focus,
52
+ input[type="email"]:focus,
53
+ input[type="number"]:focus,
54
+ input[type="search"]:focus,
55
+ input[type="tel"]:focus,
56
+ input[type="url"]:focus,
57
+ select:focus {
58
+ border-color: #bbb;
59
+ }
60
+
61
+ kbd,
62
+ code {
63
+ background: #eaeaea;
64
+ }
65
+
66
+ input[readonly] {
67
+ background-color: #eee;
68
+ }
69
+
70
+ .find-box-search {
71
+ border-color: #dfdfdf;
72
+ background-color: #f1f1f1;
73
+ }
74
+
75
+ .find-box {
76
+ background-color: #f1f1f1;
77
+ }
78
+
79
+ .find-box-inside {
80
+ background-color: #fff;
81
+ }
82
+
83
+ a.page-numbers:hover {
84
+ border-color: #999;
85
+ }
86
+
87
+ body,
88
+ #wpbody,
89
+ .form-table .pre {
90
+ color: #555;
91
+ }
92
+
93
+ body > #upload-menu {
94
+ border-bottom-color: #fff;
95
+ }
96
+
97
+ #postcustomstuff table,
98
+ #your-profile fieldset,
99
+ #rightnow,
100
+ div.dashboard-widget,
101
+ #dashboard-widgets p.dashboard-widget-links {
102
+ border-color: #ccc;
103
+ }
104
+
105
+ #poststuff .inside label.spam,
106
+ #poststuff .inside label.deleted {
107
+ color: red;
108
+ }
109
+
110
+ #poststuff .inside label.waiting {
111
+ color: orange;
112
+ }
113
+
114
+ #poststuff .inside label.approved {
115
+ color: green;
116
+ }
117
+
118
+ #postcustomstuff table {
119
+ border-color: #dfdfdf;
120
+ background-color: #F9F9F9;
121
+ }
122
+
123
+ #postcustomstuff thead th {
124
+ background-color: #F1F1F1;
125
+ }
126
+
127
+ .widefat {
128
+ border-color: #dfdfdf;
129
+ background-color: #eefcf1;
130
+ }
131
+ textarea.widefat {
132
+ background-color: #fff;
133
+ }
134
+
135
+ div.dashboard-widget-error {
136
+ background-color: #c43;
137
+ }
138
+
139
+ div.dashboard-widget-notice {
140
+ background-color: #cfe1ef;
141
+ }
142
+
143
+ div.dashboard-widget-submit {
144
+ border-top-color: #ccc;
145
+ }
146
+
147
+ div.tabs-panel,
148
+ .wp-tab-panel,
149
+ ul.category-tabs li.tabs,
150
+ ul.add-menu-item-tabs li.tabs,
151
+ .wp-tab-active {
152
+ border-color: #dfdfdf;
153
+ background-color: #fff;
154
+ }
155
+
156
+ ul.category-tabs li.tabs,
157
+ ul.add-menu-item-tabs li.tabs,
158
+ .wp-tab-active {
159
+ background-color: #fff;
160
+ }
161
+
162
+ input.disabled,
163
+ textarea.disabled {
164
+ background-color: #ccc;
165
+ }
166
+ /* #upload-menu li a.upload-tab-link, */
167
+ #plugin-information .action-button a,
168
+ #plugin-information .action-button a:hover,
169
+ #plugin-information .action-button a:visited {
170
+ color: #fff;
171
+ }
172
+
173
+ .widget .widget-top,
174
+ .postbox h3,
175
+ .stuffbox h3,
176
+ .widefat thead tr th,
177
+ .widefat tfoot tr th,
178
+ h3.dashboard-widget-title,
179
+ h3.dashboard-widget-title span,
180
+ h3.dashboard-widget-title small,
181
+ .find-box-head,
182
+ .sidebar-name,
183
+ #nav-menu-header,
184
+ #nav-menu-footer,
185
+ .menu-item-handle,
186
+ #fullscreen-topbar {
187
+ background-color: #f1f1f1; /* Fallback */
188
+ background-image: -ms-linear-gradient(top, #eefcf1, #deece1); /* IE10 */
189
+ background-image: -moz-linear-gradient(top, #eefcf1, #deece1); /* Firefox */
190
+ background-image: -o-linear-gradient(top, #eefcf1, #deece1); /* Opera */
191
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eefcf1), to(#deece1)); /* old Webkit */
192
+ background-image: -webkit-linear-gradient(top, #eefcf1, #deece1); /* new Webkit */
193
+ background-image: linear-gradient(top, #eefcf1, #deece1); /* proposed W3C Markup */
194
+ }
195
+
196
+ .widget .widget-top,
197
+ .postbox h3,
198
+ .stuffbox h3 {
199
+ border-bottom-color: #dfdfdf;
200
+ text-shadow: #fff 0 1px 0;
201
+ -moz-box-shadow: 0 1px 0 #fff;
202
+ -webkit-box-shadow: 0 1px 0 #fff;
203
+ box-shadow: 0 1px 0 #fff;
204
+ }
205
+
206
+ .form-table th,
207
+ .form-wrap label {
208
+ color: #222;
209
+ text-shadow: #fff 0 1px 0;
210
+ }
211
+
212
+ .description,
213
+ .form-wrap p {
214
+ color: #666;
215
+ }
216
+
217
+ strong .post-com-count span {
218
+ background-color: #007700;
219
+ }
220
+
221
+ .sorthelper {
222
+ background-color: #ccf3fa;
223
+ }
224
+
225
+ .ac_match,
226
+ .subsubsub a.current {
227
+ color: #000;
228
+ }
229
+
230
+ .wrap h2 {
231
+ color: #464646;
232
+ }
233
+
234
+ .wrap .add-new-h2 {
235
+ background: #f1f1f1;
236
+ }
237
+
238
+ .subtitle {
239
+ color: #777;
240
+ }
241
+
242
+ .ac_over {
243
+ background-color: #f0f0b8;
244
+ }
245
+
246
+ .ac_results {
247
+ background-color: #fff;
248
+ border-color: #6EB469;
249
+ }
250
+
251
+ .ac_results li {
252
+ color: #101010;
253
+ }
254
+
255
+ .alternate,
256
+ .alt {
257
+ background-color: #fefefe;
258
+ }
259
+
260
+ .available-theme a.screenshot {
261
+ background-color: #f1f1f1;
262
+ border-color: #ddd;
263
+ }
264
+
265
+ .bar {
266
+ background-color: #e8e8e8;
267
+ border-right-color: #99d;
268
+ }
269
+
270
+ #media-upload,
271
+ #media-upload .media-item .slidetoggle {
272
+ background: #fff;
273
+ }
274
+
275
+ #media-upload .slidetoggle {
276
+ border-top-color: #dfdfdf;
277
+ }
278
+
279
+ div.error,
280
+ .login #login_error {
281
+ background-color: #ffebe8;
282
+ border-color: #c00;
283
+ }
284
+
285
+ div.error a {
286
+ color: #c00;
287
+ }
288
+
289
+ .form-invalid {
290
+ background-color: #ffebe8 !important;
291
+ }
292
+
293
+ .form-invalid input,
294
+ .form-invalid select {
295
+ border-color: #c00 !important;
296
+ }
297
+
298
+ .submit {
299
+ border-color: #DFDFDF;
300
+ }
301
+
302
+ .highlight {
303
+ background-color: #e4f2fd;
304
+ color: #000;
305
+ }
306
+
307
+ .howto,
308
+ .nonessential,
309
+ #edit-slug-box,
310
+ .form-input-tip,
311
+ .subsubsub {
312
+ color: #666;
313
+ }
314
+
315
+ #wpbody-content #media-items .describe {
316
+ border-top-color: #dfdfdf;
317
+ }
318
+
319
+ .media-upload-form label.form-help,
320
+ td.help {
321
+ color: #9a9a9a;
322
+ }
323
+
324
+ .post-com-count {
325
+ color: #fff;
326
+ }
327
+
328
+ .post-com-count span {
329
+ background-color: #bbb;
330
+ color: #fff;
331
+ }
332
+
333
+ .post-com-count:hover span {
334
+ background-color: #d54e21;
335
+ }
336
+
337
+ .quicktags, .search {
338
+ background-color: #ccc;
339
+ color: #000;
340
+ }
341
+
342
+ .side-info h5 {
343
+ border-bottom-color: #dadada;
344
+ }
345
+
346
+ .side-info ul {
347
+ color: #666;
348
+ }
349
+
350
+ .button,
351
+ .button-secondary,
352
+ .submit input,
353
+ input[type=button],
354
+ input[type=submit] {
355
+ border-color: #bbb;
356
+ color: #464646;
357
+ }
358
+
359
+ .button:hover,
360
+ .button-secondary:hover,
361
+ .submit input:hover,
362
+ input[type=button]:hover,
363
+ input[type=submit]:hover {
364
+ color: #000;
365
+ border-color: #666;
366
+ }
367
+
368
+ .button,
369
+ .submit input,
370
+ .button-secondary {
371
+ background-color: #f2f2f2;
372
+ background-repeat: repeat-x;
373
+ background-attachment: scroll;
374
+ background-position: left top;
375
+ text-shadow: rgba(255,255,255,1) 0 1px 0;
376
+ }
377
+
378
+ .button:active,
379
+ .submit input:active,
380
+ .button-secondary:active {
381
+ background-color: #eee;
382
+ background-repeat: repeat-x;
383
+ background-attachment: scroll;
384
+ background-position: left top;
385
+ }
386
+
387
+ input.button-primary,
388
+ button.button-primary,
389
+ a.button-primary {
390
+ border-color: #298cba;
391
+ font-weight: bold;
392
+ color: #fff;
393
+ background-image: url('../images/button-grad.png');
394
+ background-color: #007700;
395
+ background-repeat: repeat-x;
396
+ background-attachment: scroll;
397
+ background-position: left top;
398
+ text-shadow: rgba(0,0,0,0.3) 0 -1px 0;
399
+ }
400
+
401
+ input.button-primary:active,
402
+ button.button-primary:active,
403
+ a.button-primary:active {
404
+ background-image: url('../images/button-grad-active.png');
405
+ background-color: #007700;
406
+ background-repeat: repeat-x;
407
+ background-attachment: scroll;
408
+ background-position: left top;
409
+ color: #eaf2fa;
410
+ }
411
+
412
+ input.button-primary:hover,
413
+ button.button-primary:hover,
414
+ a.button-primary:hover,
415
+ a.button-primary:focus,
416
+ a.button-primary:active {
417
+ border-color: #13455b;
418
+ color: #eaf2fa;
419
+ }
420
+
421
+ .button-disabled,
422
+ .button[disabled],
423
+ .button:disabled,
424
+ .button-secondary[disabled],
425
+ .button-secondary:disabled,
426
+ a.button.disabled {
427
+ color: #aaa !important;
428
+ border-color: #ddd !important;
429
+ }
430
+
431
+ .button-primary-disabled,
432
+ .button-primary[disabled],
433
+ .button-primary:disabled {
434
+ color: #9FD0D5 !important;
435
+ background: #298CBA !important;
436
+ }
437
+
438
+ a:hover,
439
+ a:active,
440
+ a:focus {
441
+ color: #d54e21;
442
+ }
443
+
444
+ #adminmenu a:hover,
445
+ #adminmenu li.menu-top > a:focus,
446
+ #adminmenu ul.wp-submenu a:hover,
447
+ #the-comment-list .comment a:hover,
448
+ #rightnow a:hover,
449
+ #media-upload a.del-link:hover,
450
+ div.dashboard-widget-submit input:hover,
451
+ .subsubsub a:hover,
452
+ .subsubsub a.current:hover,
453
+ .ui-tabs-nav a:hover,
454
+ .plugins .inactive a:hover,
455
+ #all-plugins-table .plugins .inactive a:hover,
456
+ #search-plugins-table .plugins .inactive a:hover {
457
+ color: #d54e21;
458
+ }
459
+
460
+ #the-comment-list .comment-item,
461
+ #dashboard-widgets #dashboard_quick_press form p.submit {
462
+ border-color: #dfdfdf;
463
+ }
464
+
465
+ #side-sortables .category-tabs .tabs a,
466
+ #side-sortables .add-menu-item-tabs .tabs a,
467
+ .wp-tab-bar .wp-tab-active a {
468
+ color: #333;
469
+ }
470
+
471
+ #rightnow .rbutton {
472
+ background-color: #ebebeb;
473
+ color: #264761;
474
+ }
475
+
476
+ .submitbox .submit {
477
+ background-color: #464646;
478
+ color: #ccc;
479
+ }
480
+
481
+ .plugins a.delete:hover,
482
+ #all-plugins-table .plugins a.delete:hover,
483
+ #search-plugins-table .plugins a.delete:hover,
484
+ .submitbox .submitdelete {
485
+ color: #f00;
486
+ border-bottom-color: #f00;
487
+ }
488
+
489
+ .submitbox .submitdelete:hover,
490
+ #media-items a.delete:hover {
491
+ color: #fff;
492
+ background-color: #f00;
493
+ border-bottom-color: #f00;
494
+ }
495
+
496
+ #normal-sortables .submitbox .submitdelete:hover {
497
+ color: #000;
498
+ background-color: #f00;
499
+ border-bottom-color: #f00;
500
+ }
501
+
502
+ .tablenav .dots {
503
+ border-color: transparent;
504
+ }
505
+
506
+ .tablenav .next,
507
+ .tablenav .prev {
508
+ border-color: transparent;
509
+ color: #007700;
510
+ }
511
+
512
+ .tablenav .next:hover,
513
+ .tablenav .prev:hover {
514
+ border-color: transparent;
515
+ color: #d54e21;
516
+ }
517
+
518
+ div.updated,
519
+ .login .message {
520
+ background-color: #ffffe0;
521
+ border-color: #e6db55;
522
+ }
523
+
524
+ .update-message {
525
+ color: #000;
526
+ }
527
+
528
+ a.page-numbers {
529
+ border-bottom-color: #B8D3E2;
530
+ }
531
+
532
+ .commentlist li {
533
+ border-bottom-color: #ccc;
534
+ }
535
+
536
+ .widefat td,
537
+ .widefat th {
538
+ border-top-color: #fff;
539
+ border-bottom-color: #dfdfdf;
540
+ }
541
+
542
+ .widefat th {
543
+ text-shadow: rgba(255,255,255,0.8) 0 1px 0;
544
+ }
545
+
546
+ .widefat td {
547
+ color: #555;
548
+ }
549
+ .widefat p,
550
+ .widefat ol,
551
+ .widefat ul {
552
+ color: #333;
553
+ }
554
+
555
+ .widefat thead tr th,
556
+ .widefat tfoot tr th,
557
+ h3.dashboard-widget-title,
558
+ h3.dashboard-widget-title span,
559
+ h3.dashboard-widget-title small,
560
+ .find-box-head {
561
+ color: #333;
562
+ }
563
+
564
+ th.sortable a:hover, th.sortable a:active, th.sortable a:focus {
565
+ color: #333;
566
+ }
567
+
568
+ h3.dashboard-widget-title small a {
569
+ color: #d7d7d7;
570
+ }
571
+
572
+ h3.dashboard-widget-title small a:hover {
573
+ color: #fff;
574
+ }
575
+
576
+ a,
577
+ #adminmenu a,
578
+ #the-comment-list p.comment-author strong a,
579
+ #media-upload a.del-link,
580
+ #media-items a.delete,
581
+ .plugins a.delete,
582
+ .ui-tabs-nav a {
583
+ color: #007700;
584
+ }
585
+
586
+ #adminmenu .awaiting-mod,
587
+ #adminmenu .update-plugins,
588
+ #sidemenu a .update-plugins,
589
+ #rightnow .reallynow {
590
+ background-color: #464646;
591
+ color: #fff;
592
+ -moz-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
593
+ -khtml-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
594
+ -webkit-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
595
+ box-shadow: rgba(255,255,255,0.5) 0 1px 0;
596
+ }
597
+ #plugin-information .action-button {
598
+ background-color: #d54e21;
599
+ color: #fff;
600
+ }
601
+
602
+ #adminmenu li.current a .awaiting-mod,
603
+ #adminmenu li a.wp-has-current-submenu .update-plugins{
604
+ background-color: #464646;
605
+ color: #fff;
606
+ -moz-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
607
+ -khtml-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
608
+ -webkit-box-shadow: rgba(255,255,255,0.5) 0 1px 0;
609
+ box-shadow: rgba(255,255,255,0.5) 0 1px 0;
610
+ }
611
+
612
+ div#media-upload-header,
613
+ div#plugin-information-header {
614
+ background-color: #eefcf1;
615
+ border-bottom-color: #dfdfdf;
616
+ }
617
+
618
+ #currenttheme img {
619
+ border-color: #666;
620
+ }
621
+
622
+ #dashboard_secondary div.dashboard-widget-content ul li a {
623
+ background-color: #eefcf1;
624
+ }
625
+
626
+ input.readonly, textarea.readonly {
627
+ background-color: #ddd;
628
+ }
629
+
630
+ #editable-post-name {
631
+ background-color: #fffbcc;
632
+ }
633
+
634
+ #edit-slug-box strong,
635
+ .tablenav .displaying-num,
636
+ #submitted-on,
637
+ .submitted-on {
638
+ color: #777;
639
+ }
640
+
641
+ .login #nav a,
642
+ .login #backtoblog a {
643
+ color: #007700 !important;
644
+ }
645
+
646
+ .login #nav a:hover,
647
+ .login #backtoblog a:hover {
648
+ color: #d54e21 !important;
649
+ }
650
+
651
+ #footer {
652
+ color: #777;
653
+ border-color: #dfdfdf;
654
+ }
655
+
656
+ #media-items,
657
+ .imgedit-group,
658
+ .media-item {
659
+ border-color: #dfdfdf;
660
+ }
661
+
662
+ .checkbox,
663
+ .side-info,
664
+ .plugins tr,
665
+ #your-profile #rich_editing {
666
+ background-color: #fcfcfc;
667
+ }
668
+
669
+ .plugins .inactive,
670
+ .plugins .inactive th,
671
+ .plugins .inactive td,
672
+ tr.inactive + tr.plugin-update-tr .plugin-update {
673
+ background-color: #f4f4f4;
674
+ }
675
+
676
+ .plugin-update-tr .update-message {
677
+ background-color: #fffbe4;
678
+ border-color: #dfdfdf;
679
+ }
680
+
681
+ .plugins .active,
682
+ .plugins .active th,
683
+ .plugins .active td {
684
+ color: #000;
685
+ }
686
+
687
+ .plugins .inactive a {
688
+ color: #557799;
689
+ }
690
+
691
+ #the-comment-list tr.undo,
692
+ #the-comment-list div.undo {
693
+ background-color: #f4f4f4;
694
+ }
695
+
696
+ #the-comment-list .unapproved {
697
+ background-color: #ffffe0;
698
+ }
699
+
700
+ #the-comment-list .approve a {
701
+ color: #006505;
702
+ }
703
+
704
+ #the-comment-list .unapprove a {
705
+ color: #d98500;
706
+ }
707
+
708
+ table.widefat span.delete a,
709
+ table.widefat span.trash a,
710
+ table.widefat span.spam a,
711
+ #dashboard_recent_comments .delete a,
712
+ #dashboard_recent_comments .trash a,
713
+ #dashboard_recent_comments .spam a {
714
+ color: #bc0b0b;
715
+ }
716
+
717
+ .welcome-panel {
718
+ border-color: #dfdfdf;
719
+ }
720
+ .welcome-panel p {
721
+ color: #777;
722
+ }
723
+ .welcome-panel-column p {
724
+ color: #464646;
725
+ }
726
+ .welcome-panel .welcome-panel-close {
727
+ background: #eee;
728
+ text-shadow: 1px 1px 1px #eee;
729
+ }
730
+ .welcome-panel h3 {
731
+ text-shadow: 1px 1px 1px white;
732
+ }
733
+
734
+ .widget,
735
+ #widget-list .widget-top,
736
+ .postbox,
737
+ #titlediv,
738
+ #poststuff .postarea,
739
+ .stuffbox {
740
+ border-color: #dfdfdf;
741
+ -moz-box-shadow: inset 0 1px 0 #fff;
742
+ -webkit-box-shadow: inset 0 1px 0 #fff;
743
+ box-shadow: inset 0 1px 0 #fff;
744
+ -moz-border-radius: 3px;
745
+ -khtml-border-radius: 3px;
746
+ -webkit-border-radius: 3px;
747
+ border-radius: 3px;
748
+ }
749
+
750
+ .widget,
751
+ #widget-list .widget-top,
752
+ .postbox,
753
+ .menu-item-settings {
754
+ background-color: #eefcf1; /* Fallback */
755
+ background-image: -ms-linear-gradient(top, #eefcf1, #deece1); /* IE10 */
756
+ background-image: -moz-linear-gradient(top, #eefcf1, #deece1); /* Firefox */
757
+ background-image: -o-linear-gradient(top, #eefcf1, #deece1); /* Opera */
758
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eefcf1), to(#deece1)); /* old Webkit */
759
+ background-image: -webkit-linear-gradient(top, #eefcf1, #deece1); /* new Webkit */
760
+ background-image: linear-gradient(top, #eefcf1, #deece1); /* proposed W3C Markup */
761
+ }
762
+
763
+ .postbox h3 {
764
+ color: #464646;
765
+ }
766
+
767
+ .widget .widget-top {
768
+ color: #222;
769
+ }
770
+
771
+ .sidebar-name:hover h3,
772
+ .postbox h3:hover {
773
+ color: #000;
774
+ }
775
+
776
+ #quicktags #ed_link {
777
+ color: #00f;
778
+ }
779
+
780
+ #rightnow .youhave {
781
+ background-color: #f0f6fb;
782
+ }
783
+
784
+ #rightnow a {
785
+ color: #448abd;
786
+ }
787
+
788
+ .tagchecklist span a,
789
+ #bulk-titles div a {
790
+
791
+ background-repeat: no-repeat;
792
+ }
793
+
794
+ .tagchecklist span a:hover,
795
+ #bulk-titles div a:hover {
796
+ background-repeat: no-repeat;
797
+ background-position: -10px 0;
798
+ }
799
+
800
+ #update-nag, .update-nag {
801
+ background-color: #FFFBCC;
802
+ border-color: #E6DB55;
803
+ color: #555;
804
+ }
805
+
806
+ #screen-meta {
807
+ background-color: #f1f1f1;
808
+ border-color: #ccc;
809
+ -webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 );
810
+ box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 );
811
+ }
812
+
813
+ .contextual-help-tabs a:hover {
814
+ color: #333;
815
+ }
816
+
817
+ .contextual-help-sidebar,
818
+ .contextual-help-tabs .active {
819
+ border-color: #ccc;
820
+ }
821
+
822
+ .contextual-help-tabs .active,
823
+ .contextual-help-tabs .active a,
824
+ .contextual-help-tabs .active a:hover {
825
+ background: #fff;
826
+ color: #000;
827
+ }
828
+
829
+ .contextual-help-tabs-wrap {
830
+ border-color: #ccc;
831
+ background-color: #fff;
832
+ }
833
+
834
+ /* screen options and help tabs */
835
+ #screen-options-link-wrap,
836
+ #contextual-help-link-wrap {
837
+ background-color: #e3e3e3; /* Fallback */
838
+ border-right: 1px solid transparent;
839
+ border-left: 1px solid transparent;
840
+ border-bottom: 1px solid transparent;
841
+ background-image: -ms-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* IE10 */
842
+ background-image: -moz-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Firefox */
843
+ background-image: -o-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Opera */
844
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#dfdfdf), to(#f1f1f1)); /* old Webkit */
845
+ background-image: -webkit-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* new Webkit */
846
+ background-image: linear-gradient(bottom, #dfdfdf, #f1f1f1); /* proposed W3C Markup */
847
+ }
848
+
849
+ #screen-meta-links a.show-settings {
850
+ color: #777;
851
+ }
852
+
853
+ #screen-meta-links a.show-settings:hover {
854
+ color: #000;
855
+ }
856
+
857
+ #screen-meta-links a.show-settings {
858
+ background-color: transparent;
859
+ background-repeat: no-repeat;
860
+ background-position: right 3px;
861
+ }
862
+
863
+ #screen-meta-links a.show-settings.screen-meta-active {
864
+ background-color: transparent;
865
+ background-repeat: no-repeat;
866
+ background-position: right -33px;
867
+ }
868
+
869
+ /* end screen options and help tabs */
870
+
871
+ .login #backtoblog a {
872
+ color: #464646;
873
+ }
874
+
875
+ #wphead {
876
+ border-bottom:#dfdfdf 1px solid;
877
+ }
878
+
879
+ #wphead h1 a {
880
+ color: #464646;
881
+ }
882
+
883
+ #footer a:link,
884
+ #footer a:visited {
885
+ text-decoration: none;
886
+ }
887
+
888
+ #footer a:hover {
889
+ color: #000;
890
+ text-decoration: underline;
891
+ }
892
+
893
+ .file-error,
894
+ abbr.required,
895
+ .widget-control-remove:hover,
896
+ table.widefat .delete a:hover,
897
+ table.widefat .trash a:hover,
898
+ table.widefat .spam a:hover,
899
+ #dashboard_recent_comments .delete a:hover,
900
+ #dashboard_recent_comments .trash a:hover
901
+ #dashboard_recent_comments .spam a:hover {
902
+ color: #f00;
903
+ }
904
+
905
+ #pass-strength-result {
906
+ background-color: #eee;
907
+ border-color: #ddd !important;
908
+ }
909
+
910
+ #pass-strength-result.bad {
911
+ background-color: #ffb78c;
912
+ border-color: #ff853c !important;
913
+ }
914
+
915
+ #pass-strength-result.good {
916
+ background-color: #ffec8b;
917
+ border-color: #fc0 !important;
918
+ }
919
+
920
+ #pass-strength-result.short {
921
+ background-color: #ffa0a0;
922
+ border-color: #f04040 !important;
923
+ }
924
+
925
+ #pass-strength-result.strong {
926
+ background-color: #c3ff88;
927
+ border-color: #8dff1c !important;
928
+ }
929
+
930
+ #titlediv #title {
931
+ border-color: #ccc;
932
+ }
933
+
934
+ #post-status-info {
935
+ border-color: #dfdfdf #ccc #ccc;
936
+ background-color: #eaeaea;
937
+ }
938
+
939
+ .editwidget .widget-inside {
940
+ border-color: #dfdfdf;
941
+ }
942
+
943
+ #titlediv #title {
944
+ background-color: #fff;
945
+ }
946
+
947
+ #tTips p#tTips_inside {
948
+ background-color: #ddd;
949
+ color: #333;
950
+ }
951
+
952
+ #timestampdiv input,
953
+ #namediv input,
954
+ #poststuff .inside .the-tagcloud {
955
+ border-color: #ddd;
956
+ }
957
+
958
+ /* menu */
959
+ #adminmenuback,
960
+ #adminmenuwrap {
961
+ background-color: #deece1;
962
+ border-color: #ccc;
963
+ }
964
+
965
+ #adminmenushadow,
966
+ #adminmenuback {
967
+ background-position: top right;
968
+ background-repeat: repeat-y;
969
+ }
970
+
971
+ #adminmenu li.wp-menu-separator {
972
+ background: #dfdfdf;
973
+ border-color: #cfcfcf;
974
+ }
975
+
976
+ #adminmenu div.separator {
977
+ border-color: #e1e1e1;
978
+ }
979
+
980
+ #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,
981
+ #adminmenu li.wp-has-current-submenu.opensub .wp-menu-toggle,
982
+ #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle {
983
+ background-color: transparent;
984
+ background-repeat: no-repeat;
985
+ background-position: -1px 6px;
986
+ }
987
+
988
+ #adminmenu .wp-has-submenu.opensub .wp-menu-toggle,
989
+ #adminmenu .wp-has-submenu:hover .wp-menu-toggle,
990
+ #adminmenu .wp-menu-open .wp-menu-toggle {
991
+ background-color: transparent;
992
+ background-repeat: no-repeat;
993
+ background-position: -2px 6px;
994
+ }
995
+
996
+ #adminmenu a.menu-top,
997
+ .folded #adminmenu li.menu-top,
998
+ #adminmenu .wp-submenu .wp-submenu-head {
999
+ border-top-color: #eefcf1;
1000
+ border-bottom-color: #dfdfdf;
1001
+ }
1002
+
1003
+ #adminmenu li.wp-menu-open {
1004
+ border-color: #dfdfdf;
1005
+ }
1006
+
1007
+ #adminmenu li.menu-top.opensub > a,
1008
+ #adminmenu li.menu-top:hover > a,
1009
+ #adminmenu li.menu-top.focused > a,
1010
+ #adminmenu li.menu-top > a:focus {
1011
+ background-color: #eefcf1;
1012
+ text-shadow: 0 1px 0 rgba( 255, 255, 255, 0.4 );
1013
+ }
1014
+
1015
+ #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
1016
+ #adminmenu li.current a.menu-top,
1017
+ .folded #adminmenu li.wp-has-current-submenu,
1018
+ .folded #adminmenu li.current.menu-top,
1019
+ #adminmenu .wp-menu-arrow,
1020
+ #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head {
1021
+ background-color: #777; /* Fallback */
1022
+ background-image: -ms-linear-gradient(bottom, #060, #6EB469); /* IE10 */
1023
+ background-image: -moz-linear-gradient(bottom, #060, #6EB469); /* Firefox */
1024
+ background-image: -o-linear-gradient(bottom, #060, #6EB469); /* Opera */
1025
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#060), to(#6EB469)); /* old Webkit */
1026
+ background-image: -webkit-linear-gradient(bottom, #060, #6EB469); /* new Webkit */
1027
+ background-image: linear-gradient(bottom, #060, #6EB469); /* proposed W3C Markup */
1028
+ }
1029
+
1030
+ #adminmenu .wp-menu-arrow div {
1031
+ background-color: #777; /* Fallback */
1032
+ background-image: -ms-linear-gradient(right bottom, #060, #6EB469); /* IE10 */
1033
+ background-image: -moz-linear-gradient(right bottom, #060, #6EB469); /* Firefox */
1034
+ background-image: -o-linear-gradient(right bottom, #060, #6EB469); /* Opera */
1035
+ background-image: -webkit-gradient(linear, right bottom, left top, from(#060), to(#6EB469)); /* old Webkit */
1036
+ background-image: -webkit-linear-gradient(right bottom, #060, #6EB469); /* new Webkit */
1037
+ background-image: linear-gradient(right bottom, #060, #6EB469); /* proposed W3C Markup */
1038
+ }
1039
+
1040
+ #adminmenu li.wp-not-current-submenu .wp-menu-arrow {
1041
+ border-top-color: #eefcf1;
1042
+ border-bottom-color: #dfdfdf;
1043
+ background: #eefcf1;
1044
+ }
1045
+
1046
+ #adminmenu li.wp-not-current-submenu .wp-menu-arrow div {
1047
+ background: #eefcf1;
1048
+ border-color: #ccc;
1049
+ }
1050
+
1051
+ .folded #adminmenu li.menu-top li.opensub a,
1052
+ .folded #adminmenu li.menu-top li:hover a {
1053
+ background-image: none;
1054
+ }
1055
+
1056
+ #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
1057
+ #adminmenu li.current a.menu-top,
1058
+ #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head {
1059
+ text-shadow: 0 -1px 0 #333;
1060
+ color: #fff;
1061
+ border-top-color: #6EB469;
1062
+ border-bottom-color: #060;
1063
+ }
1064
+
1065
+ .folded #adminmenu li.wp-has-current-submenu,
1066
+ .folded #adminmenu li.current.menu-top {
1067
+ border-top-color: #6EB469;
1068
+ border-bottom-color: #060;
1069
+ }
1070
+
1071
+ #adminmenu .wp-submenu a:hover,
1072
+ #adminmenu .wp-submenu a:focus {
1073
+ background-color: #eefcf1;
1074
+ color: #333;
1075
+ }
1076
+
1077
+ #adminmenu .wp-submenu li.current,
1078
+ #adminmenu .wp-submenu li.current a,
1079
+ #adminmenu .wp-submenu li.current a:hover {
1080
+ color: #333;
1081
+ }
1082
+
1083
+ #adminmenu .wp-submenu ul {
1084
+ background-color: #fff;
1085
+ }
1086
+
1087
+ #adminmenu .wp-submenu-wrap,
1088
+ #adminmenu .wp-submenu ul {
1089
+ border-color: #dfdfdf;
1090
+ }
1091
+
1092
+ #adminmenu .wp-submenu-wrap,
1093
+ .folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap {
1094
+ -moz-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
1095
+ -webkit-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
1096
+ box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
1097
+ background: #f9f9f9;
1098
+ }
1099
+
1100
+ #adminmenu .wp-submenu .wp-submenu-head {
1101
+ border-right-color: #dfdfdf;
1102
+ background-color: #deece1;
1103
+ }
1104
+
1105
+ #adminmenu div.wp-submenu {
1106
+ background-color: transparent;
1107
+ }
1108
+
1109
+ /* collapse menu button */
1110
+ #collapse-menu {
1111
+ color: #aaa;
1112
+ border-color: transparent;
1113
+ }
1114
+
1115
+ #collapse-menu:hover {
1116
+ color: #999;
1117
+ }
1118
+
1119
+ #collapse-button {
1120
+ border-color: #ccc;
1121
+ background-color: #f4f4f4; /* Fallback */
1122
+ background-image: -ms-linear-gradient(bottom, #dfdfdf, #fff); /* IE10 */
1123
+ background-image: -moz-linear-gradient(bottom, #dfdfdf, #fff); /* Firefox */
1124
+ background-image: -o-linear-gradient(bottom, #dfdfdf, #fff); /* Opera */
1125
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#dfdfdf), to(#fff)); /* old Webkit */
1126
+ background-image: -webkit-linear-gradient(bottom, #dfdfdf, #fff); /* new Webkit */
1127
+ background-image: linear-gradient(bottom, #dfdfdf, #fff); /* proposed W3C Markup */
1128
+ }
1129
+ #collapse-menu:hover #collapse-button {
1130
+ border-color: #aaa;
1131
+ }
1132
+ #collapse-button div {
1133
+ background-color: transparent;
1134
+ background-repeat: no-repeat;
1135
+ background-position: 0 -72px;
1136
+ }
1137
+ .folded #collapse-button div {
1138
+ background-position: 0 -108px;
1139
+ }
1140
+
1141
+ /* menu and screen icons */
1142
+ .icon16.icon-dashboard,
1143
+ #adminmenu .menu-icon-dashboard div.wp-menu-image {
1144
+ background-color: transparent;
1145
+ background-repeat: no-repeat;
1146
+ background-attachment: scroll;
1147
+ background-position: -60px -33px;
1148
+ }
1149
+
1150
+ #adminmenu .menu-icon-dashboard:hover div.wp-menu-image,
1151
+ #adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,
1152
+ #adminmenu .menu-icon-dashboard.current div.wp-menu-image {
1153
+ background-color: transparent;
1154
+ background-repeat: no-repeat;
1155
+ background-attachment: scroll;
1156
+ background-position: -60px -1px;
1157
+ }
1158
+
1159
+ .icon16.icon-post,
1160
+ #adminmenu .menu-icon-post div.wp-menu-image {
1161
+ background-color: transparent;
1162
+ background-repeat: no-repeat;
1163
+ background-attachment: scroll;
1164
+ background-position: -271px -33px;
1165
+ }
1166
+
1167
+ #adminmenu .menu-icon-post:hover div.wp-menu-image,
1168
+ #adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image {
1169
+ background-color: transparent;
1170
+ background-repeat: no-repeat;
1171
+ background-attachment: scroll;
1172
+ background-position: -271px -33px;
1173
+ }
1174
+
1175
+ .icon16.icon-media,
1176
+ #adminmenu .menu-icon-media div.wp-menu-image {
1177
+ background-color: transparent;
1178
+ background-repeat: no-repeat;
1179
+ background-attachment: scroll;
1180
+ background-position: -120px -33px;
1181
+ }
1182
+
1183
+ #adminmenu .menu-icon-media:hover div.wp-menu-image,
1184
+ #adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image {
1185
+ background-color: transparent;
1186
+ background-repeat: no-repeat;
1187
+ background-attachment: scroll;
1188
+ background-position: -120px -1px;
1189
+ }
1190
+
1191
+ .icon16.icon-links,
1192
+ #adminmenu .menu-icon-links div.wp-menu-image {
1193
+ background-color: transparent;
1194
+ background-repeat: no-repeat;
1195
+ background-attachment: scroll;
1196
+ background-position: -90px -33px;
1197
+ }
1198
+
1199
+ #adminmenu .menu-icon-links:hover div.wp-menu-image,
1200
+ #adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image {
1201
+ background-color: transparent;
1202
+ background-repeat: no-repeat;
1203
+ background-attachment: scroll;
1204
+ background-position: -90px -1px;
1205
+ }
1206
+
1207
+ .icon16.icon-page,
1208
+ #adminmenu .menu-icon-page div.wp-menu-image {
1209
+ background-color: transparent;
1210
+ background-repeat: no-repeat;
1211
+ background-attachment: scroll;
1212
+ background-position: -150px -33px;
1213
+ }
1214
+
1215
+ #adminmenu .menu-icon-page:hover div.wp-menu-image,
1216
+ #adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image {
1217
+ background-color: transparent;
1218
+ background-repeat: no-repeat;
1219
+ background-attachment: scroll;
1220
+ background-position: -150px -1px;
1221
+ }
1222
+
1223
+ .icon16.icon-comments,
1224
+ #adminmenu .menu-icon-comments div.wp-menu-image {
1225
+ background-color: transparent;
1226
+ background-repeat: no-repeat;
1227
+ background-attachment: scroll;
1228
+ background-position: -30px -33px;
1229
+ }
1230
+
1231
+ #adminmenu .menu-icon-comments:hover div.wp-menu-image,
1232
+ #adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,
1233
+ #adminmenu .menu-icon-comments.current div.wp-menu-image {
1234
+ background-color: transparent;
1235
+ background-repeat: no-repeat;
1236
+ background-attachment: scroll;
1237
+ background-position: -30px -1px;
1238
+ }
1239
+
1240
+ .icon16.icon-appearance,
1241
+ #adminmenu .menu-icon-appearance div.wp-menu-image {
1242
+ background-color: transparent;
1243
+ background-repeat: no-repeat;
1244
+ background-attachment: scroll;
1245
+ background-position: 0 -33px;
1246
+ }
1247
+
1248
+ #adminmenu .menu-icon-appearance:hover div.wp-menu-image,
1249
+ #adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image {
1250
+ background-color: transparent;
1251
+ background-repeat: no-repeat;
1252
+ background-attachment: scroll;
1253
+ background-position: 0 -1px;
1254
+ }
1255
+
1256
+ .icon16.icon-plugins,
1257
+ #adminmenu .menu-icon-plugins div.wp-menu-image {
1258
+ background-color: transparent;
1259
+ background-repeat: no-repeat;
1260
+ background-attachment: scroll;
1261
+ background-position: -180px -33px;
1262
+ }
1263
+
1264
+ #adminmenu .menu-icon-plugins:hover div.wp-menu-image,
1265
+ #adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image {
1266
+ background-color: transparent;
1267
+ background-repeat: no-repeat;
1268
+ background-attachment: scroll;
1269
+ background-position: -180px -1px;
1270
+ }
1271
+
1272
+ .icon16.icon-users,
1273
+ #adminmenu .menu-icon-users div.wp-menu-image {
1274
+ background-color: transparent;
1275
+ background-repeat: no-repeat;
1276
+ background-attachment: scroll;
1277
+ background-position: -300px -33px;
1278
+ }
1279
+
1280
+ #adminmenu .menu-icon-users:hover div.wp-menu-image,
1281
+ #adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,
1282
+ #adminmenu .menu-icon-users.current div.wp-menu-image {
1283
+ background-color: transparent;
1284
+ background-repeat: no-repeat;
1285
+ background-attachment: scroll;
1286
+ background-position: -300px -1px;
1287
+ }
1288
+
1289
+ .icon16.icon-tools,
1290
+ #adminmenu .menu-icon-tools div.wp-menu-image {
1291
+ background-color: transparent;
1292
+ background-repeat: no-repeat;
1293
+ background-attachment: scroll;
1294
+ background-position: -210px -33px;
1295
+ }
1296
+
1297
+ #adminmenu .menu-icon-tools:hover div.wp-menu-image,
1298
+ #adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,
1299
+ #adminmenu .menu-icon-tools.current div.wp-menu-image {
1300
+ background-color: transparent;
1301
+ background-repeat: no-repeat;
1302
+ background-attachment: scroll;
1303
+ background-position: -210px -1px;
1304
+ }
1305
+
1306
+ .icon16.icon-settings,
1307
+ #adminmenu .menu-icon-settings div.wp-menu-image {
1308
+ background-color: transparent;
1309
+ background-repeat: no-repeat;
1310
+ background-attachment: scroll;
1311
+ background-position: -240px -33px;
1312
+ }
1313
+
1314
+ #adminmenu .menu-icon-settings:hover div.wp-menu-image,
1315
+ #adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image {
1316
+ background-color: transparent;
1317
+ background-repeat: no-repeat;
1318
+ background-attachment: scroll;
1319
+ background-position: -240px -1px;
1320
+ }
1321
+
1322
+ .icon16.icon-site,
1323
+ #adminmenu .menu-icon-site div.wp-menu-image {
1324
+ background-color: transparent;
1325
+ background-repeat: no-repeat;
1326
+ background-attachment: scroll;
1327
+ background-position: -360px -33px;
1328
+ }
1329
+
1330
+ #adminmenu .menu-icon-site:hover div.wp-menu-image,
1331
+ #adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image {
1332
+ background-color: transparent;
1333
+ background-repeat: no-repeat;
1334
+ background-attachment: scroll;
1335
+ background-position: -360px -1px;
1336
+ }
1337
+ /* end menu and screen icons */
1338
+
1339
+ /* Screen Icons */
1340
+ .icon32.icon-post,
1341
+ #icon-edit,
1342
+ #icon-post {
1343
+ background-color: transparent;
1344
+ background-repeat: no-repeat;
1345
+ background-position: -552px -5px;
1346
+ }
1347
+
1348
+ .icon32.icon-dashboard,
1349
+ #icon-index {
1350
+ background-color: transparent;
1351
+ background-repeat: no-repeat;
1352
+ background-position: -137px -5px;
1353
+ }
1354
+
1355
+ .icon32.icon-media,
1356
+ #icon-upload {
1357
+ background-color: transparent;
1358
+ background-repeat: no-repeat;
1359
+ background-position: -251px -5px;
1360
+ }
1361
+
1362
+ .icon32.icon-links,
1363
+ #icon-link-manager,
1364
+ #icon-link,
1365
+ #icon-link-category {
1366
+ background-color: transparent;
1367
+ background-repeat: no-repeat;
1368
+ background-position: -190px -5px;
1369
+ }
1370
+
1371
+ .icon32.icon-page,
1372
+ #icon-edit-pages,
1373
+ #icon-page {
1374
+ background-color: transparent;
1375
+ background-repeat: no-repeat;
1376
+ background-position: -312px -5px;
1377
+ }
1378
+
1379
+ .icon32.icon-comments,
1380
+ #icon-edit-comments {
1381
+ background-color: transparent;
1382
+ background-repeat: no-repeat;
1383
+ background-position: -72px -5px;
1384
+ }
1385
+
1386
+ .icon32.icon-appearance,
1387
+ #icon-themes {
1388
+ background-color: transparent;
1389
+ background-repeat: no-repeat;
1390
+ background-position: -11px -5px;
1391
+ }
1392
+
1393
+ .icon32.icon-plugins,
1394
+ #icon-plugins {
1395
+ background-color: transparent;
1396
+ background-repeat: no-repeat;
1397
+ background-position: -370px -5px;
1398
+ }
1399
+
1400
+ .icon32.icon-users,
1401
+ #icon-users,
1402
+ #icon-profile,
1403
+ #icon-user-edit {
1404
+ background-color: transparent;
1405
+ background-repeat: no-repeat;
1406
+ background-position: -600px -5px;
1407
+ }
1408
+
1409
+ .icon32.icon-tools,
1410
+ #icon-tools,
1411
+ #icon-admin {
1412
+ background-color: transparent;
1413
+ background-repeat: no-repeat;
1414
+ background-position: -432px -5px;
1415
+ }
1416
+
1417
+ .icon32.icon-settings,
1418
+ #icon-options-general {
1419
+ background-color: transparent;
1420
+ background-repeat: no-repeat;
1421
+ background-position: -492px -5px;
1422
+ }
1423
+
1424
+ .icon32.icon-site,
1425
+ #icon-ms-admin {
1426
+ background-color: transparent;
1427
+ background-repeat: no-repeat;
1428
+ background-position: -659px -5px;
1429
+ }
1430
+ /* end screen icons */
1431
+
1432
+
1433
+ /* Diff */
1434
+ table.diff .diff-deletedline {
1435
+ background-color: #fdd;
1436
+ }
1437
+
1438
+ table.diff .diff-deletedline del {
1439
+ background-color: #f99;
1440
+ }
1441
+
1442
+ table.diff .diff-addedline {
1443
+ background-color: #dfd;
1444
+ }
1445
+
1446
+ table.diff .diff-addedline ins {
1447
+ background-color: #9f9;
1448
+ }
1449
+
1450
+ #att-info {
1451
+ background-color: #E4F2FD;
1452
+ }
1453
+
1454
+ /* edit image */
1455
+ #sidemenu a {
1456
+ background-color: #eefcf1;
1457
+ border-color: #eefcf1;
1458
+ border-bottom-color: #dfdfdf;
1459
+ }
1460
+
1461
+ #sidemenu a.current {
1462
+ background-color: #fff;
1463
+ border-color: #dfdfdf #dfdfdf #fff;
1464
+ color: #D54E21;
1465
+ }
1466
+
1467
+ #replyerror {
1468
+ border-color: #ddd;
1469
+ background-color: #eefcf1;
1470
+ }
1471
+
1472
+ /* table vim shortcuts */
1473
+ .vim-current,
1474
+ .vim-current th,
1475
+ .vim-current td {
1476
+ background-color: #E4F2FD !important;
1477
+ }
1478
+
1479
+ /* Install Plugins */
1480
+ .star-average,
1481
+ .star.star-rating {
1482
+ background-color: #fc0;
1483
+ }
1484
+
1485
+ div.star.select:hover {
1486
+ background-color: #d00;
1487
+ }
1488
+
1489
+ div.star img {
1490
+ border-left: 1px solid #fff;
1491
+ border-right: 1px solid #fff;
1492
+ }
1493
+
1494
+ .widefat div.star img {
1495
+ border-left: 1px solid #eefcf1;
1496
+ border-right: 1px solid #eefcf1;
1497
+ }
1498
+
1499
+ #plugin-information .fyi ul {
1500
+ background-color: #eaf3fa;
1501
+ }
1502
+
1503
+ #plugin-information .fyi h2.mainheader {
1504
+ background-color: #cee1ef;
1505
+ }
1506
+
1507
+ #plugin-information pre,
1508
+ #plugin-information code {
1509
+ background-color: #ededff;
1510
+ }
1511
+
1512
+ #plugin-information pre {
1513
+ border: 1px solid #ccc;
1514
+ }
1515
+
1516
+ /* inline editor */
1517
+ .inline-edit-row fieldset input[type="text"],
1518
+ .inline-edit-row fieldset textarea,
1519
+ #bulk-titles {
1520
+ border-color: #ddd;
1521
+ }
1522
+
1523
+ .inline-editor div.title {
1524
+ background-color: #EAF3FA;
1525
+ }
1526
+
1527
+ .inline-editor ul.cat-checklist {
1528
+ background-color: #fff;
1529
+ border-color: #ddd;
1530
+ }
1531
+
1532
+ .inline-editor .categories .catshow,
1533
+ .inline-editor .categories .cathide {
1534
+ color: #007700;
1535
+ }
1536
+
1537
+ .inline-editor .quick-edit-save {
1538
+ background-color: #f1f1f1;
1539
+ }
1540
+
1541
+ fieldset.inline-edit-col-right .inline-edit-col {
1542
+ border-color: #dfdfdf;
1543
+ }
1544
+
1545
+ .attention {
1546
+ color: #D54E21;
1547
+ }
1548
+
1549
+ .meta-box-sortables .postbox:hover .handlediv {
1550
+ background-color: transparent;
1551
+ background-repeat: no-repeat;
1552
+ background-position: 6px 7px;
1553
+ }
1554
+
1555
+ .tablenav .tablenav-pages {
1556
+ color: #555;
1557
+ }
1558
+
1559
+ .tablenav .tablenav-pages a {
1560
+ border-color: #e3e3e3;
1561
+ background-color: #eee;
1562
+ background-repeat: repeat-x;
1563
+ background-attachment: scroll;
1564
+ background-position: left -379px;
1565
+ }
1566
+
1567
+ .tablenav .tablenav-pages a:hover,
1568
+ .tablenav .tablenav-pages a:focus {
1569
+ color: #d54e21;
1570
+ }
1571
+
1572
+ .tablenav .tablenav-pages a.disabled,
1573
+ .tablenav .tablenav-pages a.disabled:hover,
1574
+ .tablenav .tablenav-pages a.disabled:focus {
1575
+ color: #aaa;
1576
+ }
1577
+
1578
+ .tablenav .tablenav-pages .current {
1579
+ background: #dfdfdf;
1580
+ border-color: #d3d3d3;
1581
+ }
1582
+
1583
+ #availablethemes,
1584
+ #availablethemes td {
1585
+ border-color: #ddd;
1586
+ }
1587
+
1588
+ #current-theme img {
1589
+ border-color: #999;
1590
+ }
1591
+
1592
+ #TB_window #TB_title a.tb-theme-preview-link,
1593
+ #TB_window #TB_title a.tb-theme-preview-link:visited {
1594
+ color: #999;
1595
+ }
1596
+
1597
+ #TB_window #TB_title a.tb-theme-preview-link:hover,
1598
+ #TB_window #TB_title a.tb-theme-preview-link:focus {
1599
+ color: #ccc;
1600
+ }
1601
+
1602
+ .misc-pub-section {
1603
+ border-top-color: #fff;
1604
+ border-bottom-color: #dfdfdf;
1605
+ }
1606
+
1607
+ #minor-publishing {
1608
+ border-bottom-color: #dfdfdf;
1609
+ }
1610
+
1611
+ #post-body .misc-pub-section {
1612
+ border-right-color: #eee;
1613
+ }
1614
+
1615
+ .post-com-count span {
1616
+ background-color: #bbb;
1617
+ }
1618
+
1619
+ .form-table .color-palette td {
1620
+ border-color: #fff;
1621
+ }
1622
+
1623
+ .sortable-placeholder {
1624
+ border-color: #bbb;
1625
+ background-color: #eefcf1;
1626
+ }
1627
+
1628
+ #post-body ul.category-tabs li.tabs a,
1629
+ #post-body ul.add-menu-item-tabs li.tabs a,
1630
+ body.press-this ul.category-tabs li.tabs a {
1631
+ color: #333;
1632
+ }
1633
+
1634
+ .view-switch #view-switch-list {
1635
+ background-color: transparent;
1636
+ background-repeat: no-repeat;
1637
+ background-position: 0 0;
1638
+ }
1639
+
1640
+ .view-switch .current #view-switch-list {
1641
+ background-color: transparent;
1642
+ background-repeat: no-repeat;
1643
+ background-position: -40px 0;
1644
+ }
1645
+
1646
+ .view-switch #view-switch-excerpt {
1647
+ background-color: transparent;
1648
+ background-repeat: no-repeat;
1649
+ background-position: -20px 0;
1650
+ }
1651
+
1652
+ .view-switch .current #view-switch-excerpt {
1653
+ background-color: transparent;
1654
+ background-repeat: no-repeat;
1655
+ background-position: -60px 0;
1656
+ }
1657
+
1658
+ #header-logo {
1659
+ background-color: transparent;
1660
+ background-repeat: no-repeat;
1661
+ background-attachment: scroll;
1662
+ background-position: center center;
1663
+ }
1664
+
1665
+ .popular-tags,
1666
+ .feature-filter {
1667
+ background-color: #fff;
1668
+ border-color: #DFDFDF;
1669
+ }
1670
+
1671
+ #theme-information .action-button {
1672
+ border-top-color: #DFDFDF;
1673
+ }
1674
+
1675
+ .theme-listing br.line {
1676
+ border-bottom-color: #ccc;
1677
+ }
1678
+
1679
+ div.widgets-sortables,
1680
+ #widgets-left .inactive {
1681
+ background-color: #fcfcfc;
1682
+ border-color: #dfdfdf;
1683
+ }
1684
+
1685
+ #available-widgets .widget-holder {
1686
+ background-color: #fcfcfc;
1687
+ border-color: #dfdfdf;
1688
+ }
1689
+
1690
+ #available-widgets .widget-description {
1691
+ color: #555;
1692
+ }
1693
+
1694
+ .sidebar-name {
1695
+ color: #464646;
1696
+ text-shadow: #fff 0 1px 0;
1697
+ border-color: #dfdfdf;
1698
+ -moz-box-shadow: inset 0 1px 0 #fff;
1699
+ -webkit-box-shadow: inset 0 1px 0 #fff;
1700
+ box-shadow: inset 0 1px 0 #fff;
1701
+ }
1702
+
1703
+ .sidebar-name:hover,
1704
+ #removing-widget {
1705
+ color: #d54e21;
1706
+ }
1707
+
1708
+ #removing-widget span {
1709
+ color: black;
1710
+ }
1711
+
1712
+ .sidebar-name-arrow {
1713
+ background-color: transparent;
1714
+ background-repeat: no-repeat;
1715
+ background-position: 5px 9px;
1716
+ }
1717
+
1718
+ .sidebar-name:hover .sidebar-name-arrow {
1719
+ background-color: transparent;
1720
+ background-repeat: no-repeat;
1721
+ background-position: 5px 9px;
1722
+ }
1723
+
1724
+ .in-widget-title {
1725
+ color: #606060;
1726
+ }
1727
+
1728
+ .deleting .widget-title * {
1729
+ color: #aaa;
1730
+ }
1731
+
1732
+ .imgedit-menu div {
1733
+ border-color: #d5d5d5;
1734
+ background-color: #f1f1f1;
1735
+ }
1736
+
1737
+ .imgedit-menu div:hover {
1738
+ border-color: #c1c1c1;
1739
+ background-color: #eaeaea;
1740
+ }
1741
+
1742
+ .imgedit-menu div.disabled {
1743
+ border-color: #ccc;
1744
+ background-color: #ddd;
1745
+ filter: alpha(opacity=50);
1746
+ opacity: 0.5;
1747
+ }
1748
+
1749
+ #dashboard_recent_comments div.undo {
1750
+ border-top-color: #dfdfdf;
1751
+ }
1752
+
1753
+ .comment-ays,
1754
+ .comment-ays th {
1755
+ border-color: #ddd;
1756
+ }
1757
+
1758
+ .comment-ays th {
1759
+ background-color: #f1f1f1;
1760
+ }
1761
+
1762
+ /* added from nav-menu.css */
1763
+ #menu-management .menu-edit {
1764
+ border-color: #dfdfdf;
1765
+ }
1766
+
1767
+ #post-body {
1768
+ background: #fff;
1769
+ border-top-color: #fff;
1770
+ border-bottom-color: #dfdfdf;
1771
+ }
1772
+
1773
+ #nav-menu-header {
1774
+ border-bottom-color: #dfdfdf;
1775
+ }
1776
+
1777
+ #nav-menu-footer {
1778
+ border-top-color: #fff;
1779
+ }
1780
+
1781
+ #menu-management .nav-tabs-arrow a {
1782
+ color: #C1C1C1;
1783
+ }
1784
+
1785
+ #menu-management .nav-tabs-arrow a:hover {
1786
+ color: #D54E21;
1787
+ }
1788
+
1789
+ #menu-management .nav-tabs-arrow a:active {
1790
+ color: #464646;
1791
+ }
1792
+
1793
+ #menu-management .nav-tab-active {
1794
+ border-color: #dfdfdf;
1795
+ }
1796
+
1797
+ #menu-management .nav-tab {
1798
+ background: #fbfbfb;
1799
+ border-color: #dfdfdf;
1800
+ }
1801
+
1802
+ .js .input-with-default-title {
1803
+ color: #aaa;
1804
+ }
1805
+
1806
+ #cancel-save {
1807
+ color: #ff0000;
1808
+ }
1809
+
1810
+ #cancel-save:hover {
1811
+ background-color: #FF0000;
1812
+ color: #fff;
1813
+ }
1814
+
1815
+ .list-container {
1816
+ border-color: #DFDFDF;
1817
+ }
1818
+
1819
+ .menu-item-handle {
1820
+ border-color: #dfdfdf;
1821
+ }
1822
+
1823
+ .menu li.deleting .menu-item-handle {
1824
+ background-color: #f66;
1825
+ text-shadow: #ccc;
1826
+ }
1827
+
1828
+ .item-type { /* Menu item controls */
1829
+ color: #999999;
1830
+ }
1831
+
1832
+ .item-controls .menu-item-delete:hover {
1833
+ color: #ff0000;
1834
+ }
1835
+
1836
+ .item-edit {
1837
+ background-color: transparent;
1838
+ background-repeat: no-repeat;
1839
+ background-position: 8px 10px;
1840
+ border-bottom-color: #eee;
1841
+ }
1842
+
1843
+ .item-edit:hover {
1844
+ background-color: transparent;
1845
+ background-repeat: no-repeat;
1846
+ background-position: 8px 10px;
1847
+ }
1848
+
1849
+ .menu-item-settings { /* Menu editing */
1850
+ border-color: #dfdfdf;
1851
+ }
1852
+
1853
+ .link-to-original {
1854
+ color: #777;
1855
+ border-color: #dfdfdf;
1856
+ }
1857
+
1858
+ #cancel-save:hover {
1859
+ color: #fff !important;
1860
+ }
1861
+
1862
+ #update-menu-item {
1863
+ color: #fff !important;
1864
+ }
1865
+
1866
+ #update-menu-item:hover,
1867
+ #update-menu-item:active,
1868
+ #update-menu-item:focus {
1869
+ color: #eaf2fa !important;
1870
+ border-color: #13455b !important;
1871
+ }
1872
+
1873
+ .submitbox .submitcancel {
1874
+ color: #007700;
1875
+ border-bottom-color: #007700;
1876
+ }
1877
+
1878
+ .submitbox .submitcancel:hover {
1879
+ background: #007700;
1880
+ color: #fff;
1881
+ }
1882
+ /* end added from nav-menu.css */
1883
+
1884
+ #menu-management .nav-tab-active,
1885
+ .menu-item-handle,
1886
+ .menu-item-settings {
1887
+ -moz-box-shadow: inset 0 1px 0 #fff;
1888
+ -webkit-box-shadow: inset 0 1px 0 #fff;
1889
+ box-shadow: inset 0 1px 0 #fff;
1890
+ }
1891
+
1892
+ #menu-management .nav-tab-active {
1893
+ background: #eefcf1;
1894
+ border-bottom-color: #eefcf1;
1895
+ }
1896
+
1897
+ /* custom header & background pages */
1898
+ #upload-form label {
1899
+ color: #777;
1900
+ }
1901
+ /* custom header & background pages */
1902
+
1903
+ /* full screen */
1904
+ .fullscreen-overlay {
1905
+ background: #fff;
1906
+ }
1907
+
1908
+ .wp-fullscreen-focus #wp-fullscreen-title,
1909
+ .wp-fullscreen-focus #wp-fullscreen-container {
1910
+ border-color: #ccc;
1911
+ }
1912
+
1913
+ #fullscreen-topbar {
1914
+ border-bottom-color: #DFDFDF;
1915
+ }
1916
+
1917
+ /* Begin About Pages */
1918
+
1919
+ .about-wrap h1 {
1920
+ color: #333;
1921
+ text-shadow: 1px 1px 1px white;
1922
+ }
1923
+
1924
+ .about-text {
1925
+ color: #777;
1926
+ }
1927
+
1928
+ .wp-badge {
1929
+ color: #fff;
1930
+ text-shadow: 0 -1px 0 #0c3d57;
1931
+ border-color: #2B5173;
1932
+
1933
+ -moz-box-shadow: inset 0 0 0 1px #5F8CA8;
1934
+ -webkit-box-shadow: inset 0 0 0 1px #5F8CA8;
1935
+ box-shadow: inset 0 0 0 1px #5F8CA8;
1936
+
1937
+ background-color: #378aac;
1938
+ }
1939
+
1940
+ .about-wrap h2 .nav-tab {
1941
+ color: #007700;
1942
+ }
1943
+ .about-wrap h2 .nav-tab:hover {
1944
+ color: #d54e21;
1945
+ }
1946
+ .about-wrap h2 .nav-tab-active,
1947
+ .about-wrap h2 .nav-tab-active:hover {
1948
+ color: #333;
1949
+ }
1950
+ .about-wrap h2 .nav-tab-active {
1951
+ text-shadow: 1px 1px 1px white;
1952
+ color: #464646;
1953
+ }
1954
+
1955
+ .about-wrap h3 {
1956
+ color: #333;
1957
+ text-shadow: 1px 1px 1px white;
1958
+ }
1959
+
1960
+ .about-wrap .feature-section h4 {
1961
+ color: #464646;
1962
+ }
1963
+
1964
+ .about-wrap .feature-section img {
1965
+ background: #eefcf1;
1966
+ border-color: #dfdfdf;
1967
+
1968
+ -moz-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
1969
+ -webkit-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
1970
+ box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
1971
+ }
1972
+
1973
+ .about-wrap h4.wp-people-group {
1974
+ text-shadow: 1px 1px 1px white;
1975
+ }
1976
+
1977
+ .about-wrap li.wp-person img.gravatar {
1978
+ -moz-box-shadow: 0 0 4px rgba( 0, 0, 0, 0.4 );
1979
+ -webkit-box-shadow: 0 0 4px rgba( 0, 0, 0, 0.4 );
1980
+ box-shadow: 0 0 4px rgba( 0, 0, 0, 0.4 );
1981
+ }
1982
+ .about-wrap li.wp-person .title {
1983
+ color: #464646;
1984
+ text-shadow: 1px 1px 1px white;
1985
+ }
1986
+
1987
+ .freedoms-php .about-wrap ol li {
1988
+ color: #999;
1989
+ }
1990
+ .freedoms-php .about-wrap ol p {
1991
+ color: #464646;
1992
+ }
1993
+
1994
+ /* End About Pages */
1995
+
1996
+
1997
+ /*------------------------------------------------------------------------------
1998
+ 2.0 - Right to Left Styles
1999
+ ------------------------------------------------------------------------------*/
2000
+
2001
+ .rtl .bar {
2002
+ border-right-color: none;
2003
+ border-left-color: #99d;
2004
+ }
2005
+
2006
+ .rtl #screen-meta-links a.show-settings {
2007
+ background-position: left 3px;
2008
+ }
2009
+
2010
+ .rtl #screen-meta-links a.show-settings.screen-meta-active {
2011
+ background-position: left -33px;
2012
+ }
2013
+
2014
+ /* Menu */
2015
+ .rtl #adminmenushadow,
2016
+ .rtl #adminmenuback {
2017
+ background-position: top left;
2018
+ }
2019
+
2020
+ .rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,
2021
+ .rtl #adminmenu li.wp-has-current-submenu.opensub .wp-menu-toggle,
2022
+ .rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle {
2023
+ background-color: transparent;
2024
+ background-repeat: no-repeat;
2025
+ background-position: 8px 6px;
2026
+ }
2027
+
2028
+ .rtl #adminmenu .wp-has-submenu.opensub .wp-menu-toggle,
2029
+ .rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,
2030
+ .rtl #adminmenu .wp-menu-open .wp-menu-toggle {
2031
+ background-color: transparent;
2032
+ background-repeat: no-repeat;
2033
+ background-position: 8px 6px;
2034
+ }
2035
+
2036
+ .rtl #adminmenu .wp-submenu .wp-submenu-head {
2037
+ border-right-color: none;
2038
+ border-left-color: #dfdfdf;
2039
+ }
2040
+
2041
+ .rtl .folded #adminmenu .wp-submenu-wrap {
2042
+ -moz-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
2043
+ -webkit-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
2044
+ box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
2045
+ }
2046
+
2047
+ /* Collapse Menu Button */
2048
+ .rtl #collapse-button div {
2049
+ background-position: 0 -108px;
2050
+ }
2051
+
2052
+ .rtl .folded #collapse-button div {
2053
+ background-position: 0 -72px;
2054
+ }
2055
+
2056
+ /* Edit Image */
2057
+ .rtl .meta-box-sortables .postbox:hover .handlediv {
2058
+ background-color: transparent;
2059
+ background-repeat: no-repeat;
2060
+ background-position: 6px 7px;
2061
+ }
2062
+
2063
+ .rtl .tablenav .tablenav-pages a {
2064
+ border-color: #e3e3e3;
2065
+ background-color: #eee;
2066
+ background-repeat: repeat-x;
2067
+ background-attachment: scroll;
2068
+ background-position: right -379px;
2069
+ }
2070
+
2071
+ .rtl #post-body .misc-pub-section {
2072
+ border-right-color: none;
2073
+ border-left-color: #eee;
2074
+ }
2075
+
2076
+ .rtl .sidebar-name-arrow {
2077
+ background-color: transparent;
2078
+ background-repeat: no-repeat;
2079
+ background-position: 5px 9px;
2080
+ }
2081
+
2082
+ .rtl .sidebar-name:hover .sidebar-name-arrow {
2083
+ background-color: transparent;
2084
+ background-repeat: no-repeat;
2085
+ background-position: 5px 9px;
2086
+ }
includes/admin/styles/green.min.css ADDED
@@ -0,0 +1 @@
 
1
+ html,.wp-dialog{background-color:#fff}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],select{border-color:#dfdfdf;background-color:#fff}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="file"]:focus,input[type="button"]:focus,input[type="submit"]:focus,input[type="reset"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="url"]:focus,select:focus{border-color:#bbb}kbd,code{background:#eaeaea}input[readonly]{background-color:#eee}.find-box-search{border-color:#dfdfdf;background-color:#f1f1f1}.find-box{background-color:#f1f1f1}.find-box-inside{background-color:#fff}a.page-numbers:hover{border-color:#999}body,#wpbody,.form-table .pre{color:#555}body>#upload-menu{border-bottom-color:#fff}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links{border-color:#ccc}#poststuff .inside label.spam,#poststuff .inside label.deleted{color:red}#poststuff .inside label.waiting{color:orange}#poststuff .inside label.approved{color:green}#postcustomstuff table{border-color:#dfdfdf;background-color:#f9f9f9}#postcustomstuff thead th{background-color:#f1f1f1}.widefat{border-color:#dfdfdf;background-color:#eefcf1}textarea.widefat{background-color:#fff}div.dashboard-widget-error{background-color:#c43}div.dashboard-widget-notice{background-color:#cfe1ef}div.dashboard-widget-submit{border-top-color:#ccc}div.tabs-panel,.wp-tab-panel,ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-color:#dfdfdf;background-color:#fff}ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{background-color:#fff}input.disabled,textarea.disabled{background-color:#ccc}#plugin-information .action-button a,#plugin-information .action-button a:hover,#plugin-information .action-button a:visited{color:#fff}.widget .widget-top,.postbox h3,.stuffbox h3,.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head,.sidebar-name,#nav-menu-header,#nav-menu-footer,.menu-item-handle,#fullscreen-topbar{background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#eefcf1,#deece1);background-image:-moz-linear-gradient(top,#eefcf1,#deece1);background-image:-o-linear-gradient(top,#eefcf1,#deece1);background-image:-webkit-gradient(linear,left top,left bottom,from(#eefcf1),to(#deece1));background-image:-webkit-linear-gradient(top,#eefcf1,#deece1);background-image:linear-gradient(top,#eefcf1,#deece1)}.widget .widget-top,.postbox h3,.stuffbox h3{border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-moz-box-shadow:0 1px 0 #fff;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.form-table th,.form-wrap label{color:#222;text-shadow:#fff 0 1px 0}.description,.form-wrap p{color:#666}strong .post-com-count span{background-color:#070}.sorthelper{background-color:#ccf3fa}.ac_match,.subsubsub a.current{color:#000}.wrap h2{color:#464646}.wrap .add-new-h2{background:#f1f1f1}.subtitle{color:#777}.ac_over{background-color:#f0f0b8}.ac_results{background-color:#fff;border-color:#6eb469}.ac_results li{color:#101010}.alternate,.alt{background-color:#fefefe}.available-theme a.screenshot{background-color:#f1f1f1;border-color:#ddd}.bar{background-color:#e8e8e8;border-right-color:#99d}#media-upload,#media-upload .media-item .slidetoggle{background:#fff}#media-upload .slidetoggle{border-top-color:#dfdfdf}div.error,.login #login_error{background-color:#ffebe8;border-color:#c00}div.error a{color:#c00}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.submit{border-color:#dfdfdf}.highlight{background-color:#e4f2fd;color:#000}.howto,.nonessential,#edit-slug-box,.form-input-tip,.subsubsub{color:#666}#wpbody-content #media-items .describe{border-top-color:#dfdfdf}.media-upload-form label.form-help,td.help{color:#9a9a9a}.post-com-count{color:#fff}.post-com-count span{background-color:#bbb;color:#fff}.post-com-count:hover span{background-color:#d54e21}.quicktags,.search{background-color:#ccc;color:#000}.side-info h5{border-bottom-color:#dadada}.side-info ul{color:#666}.button,.button-secondary,.submit input,input[type=button],input[type=submit]{border-color:#bbb;color:#464646}.button:hover,.button-secondary:hover,.submit input:hover,input[type=button]:hover,input[type=submit]:hover{color:#000;border-color:#666}.button,.submit input,.button-secondary{background-color:#f2f2f2;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;text-shadow:rgba(255,255,255,1) 0 1px 0}.button:active,.submit input:active,.button-secondary:active{background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:left top}input.button-primary,button.button-primary,a.button-primary{border-color:#298cba;font-weight:bold;color:#fff;background-image:url('../images/button-grad.png');background-color:#070;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;text-shadow:rgba(0,0,0,0.3) 0 -1px 0}input.button-primary:active,button.button-primary:active,a.button-primary:active{background-image:url('../images/button-grad-active.png');background-color:#070;background-repeat:repeat-x;background-attachment:scroll;background-position:left top;color:#eaf2fa}input.button-primary:hover,button.button-primary:hover,a.button-primary:hover,a.button-primary:focus,a.button-primary:active{border-color:#13455b;color:#eaf2fa}.button-disabled,.button[disabled],.button:disabled,.button-secondary[disabled],.button-secondary:disabled,a.button.disabled{color:#aaa!important;border-color:#ddd!important}.button-primary-disabled,.button-primary[disabled],.button-primary:disabled{color:#9fd0d5!important;background:#298cba!important}a:hover,a:active,a:focus{color:#d54e21}#adminmenu a:hover,#adminmenu li.menu-top>a:focus,#adminmenu ul.wp-submenu a:hover,#the-comment-list .comment a:hover,#rightnow a:hover,#media-upload a.del-link:hover,div.dashboard-widget-submit input:hover,.subsubsub a:hover,.subsubsub a.current:hover,.ui-tabs-nav a:hover,.plugins .inactive a:hover,#all-plugins-table .plugins .inactive a:hover,#search-plugins-table .plugins .inactive a:hover{color:#d54e21}#the-comment-list .comment-item,#dashboard-widgets #dashboard_quick_press form p.submit{border-color:#dfdfdf}#side-sortables .category-tabs .tabs a,#side-sortables .add-menu-item-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#333}#rightnow .rbutton{background-color:#ebebeb;color:#264761}.submitbox .submit{background-color:#464646;color:#ccc}.plugins a.delete:hover,#all-plugins-table .plugins a.delete:hover,#search-plugins-table .plugins a.delete:hover,.submitbox .submitdelete{color:#f00;border-bottom-color:#f00}.submitbox .submitdelete:hover,#media-items a.delete:hover{color:#fff;background-color:#f00;border-bottom-color:#f00}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:#f00;border-bottom-color:#f00}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#070}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#d54e21}div.updated,.login .message{background-color:#ffffe0;border-color:#e6db55}.update-message{color:#000}a.page-numbers{border-bottom-color:#b8d3e2}.commentlist li{border-bottom-color:#ccc}.widefat td,.widefat th{border-top-color:#fff;border-bottom-color:#dfdfdf}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0}.widefat td{color:#555}.widefat p,.widefat ol,.widefat ul{color:#333}.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head{color:#333}th.sortable a:hover,th.sortable a:active,th.sortable a:focus{color:#333}h3.dashboard-widget-title small a{color:#d7d7d7}h3.dashboard-widget-title small a:hover{color:#fff}a,#adminmenu a,#the-comment-list p.comment-author strong a,#media-upload a.del-link,#media-items a.delete,.plugins a.delete,.ui-tabs-nav a{color:#070}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-khtml-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}#plugin-information .action-button{background-color:#d54e21;color:#fff}#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-khtml-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}div#media-upload-header,div#plugin-information-header{background-color:#eefcf1;border-bottom-color:#dfdfdf}#currenttheme img{border-color:#666}#dashboard_secondary div.dashboard-widget-content ul li a{background-color:#eefcf1}input.readonly,textarea.readonly{background-color:#ddd}#editable-post-name{background-color:#fffbcc}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on,.submitted-on{color:#777}.login #nav a,.login #backtoblog a{color:#070!important}.login #nav a:hover,.login #backtoblog a:hover{color:#d54e21!important}#footer{color:#777;border-color:#dfdfdf}#media-items,.imgedit-group,.media-item{border-color:#dfdfdf}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fcfcfc}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#f4f4f4}.plugin-update-tr .update-message{background-color:#fffbe4;border-color:#dfdfdf}.plugins .active,.plugins .active th,.plugins .active td{color:#000}.plugins .inactive a{color:#579}#the-comment-list tr.undo,#the-comment-list div.undo{background-color:#f4f4f4}#the-comment-list .unapproved{background-color:#ffffe0}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}table.widefat span.delete a,table.widefat span.trash a,table.widefat span.spam a,#dashboard_recent_comments .delete a,#dashboard_recent_comments .trash a,#dashboard_recent_comments .spam a{color:#bc0b0b}.welcome-panel{border-color:#dfdfdf}.welcome-panel p{color:#777}.welcome-panel-column p{color:#464646}.welcome-panel .welcome-panel-close{background:#eee;text-shadow:1px 1px 1px #eee}.welcome-panel h3{text-shadow:1px 1px 1px white}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.widget,#widget-list .widget-top,.postbox,.menu-item-settings{background-color:#eefcf1;background-image:-ms-linear-gradient(top,#eefcf1,#deece1);background-image:-moz-linear-gradient(top,#eefcf1,#deece1);background-image:-o-linear-gradient(top,#eefcf1,#deece1);background-image:-webkit-gradient(linear,left top,left bottom,from(#eefcf1),to(#deece1));background-image:-webkit-linear-gradient(top,#eefcf1,#deece1);background-image:linear-gradient(top,#eefcf1,#deece1)}.postbox h3{color:#464646}.widget .widget-top{color:#222}.sidebar-name:hover h3,.postbox h3:hover{color:#000}#quicktags #ed_link{color:#00f}#rightnow .youhave{background-color:#f0f6fb}#rightnow a{color:#448abd}.tagchecklist span a,#bulk-titles div a{background-repeat:no-repeat}.tagchecklist span a:hover,#bulk-titles div a:hover{background-repeat:no-repeat;background-position:-10px 0}#update-nag,.update-nag{background-color:#fffbcc;border-color:#e6db55;color:#555}#screen-meta{background-color:#f1f1f1;border-color:#ccc;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.05);box-shadow:0 1px 3px rgba(0,0,0,0.05)}.contextual-help-tabs a:hover{color:#333}.contextual-help-sidebar,.contextual-help-tabs .active{border-color:#ccc}.contextual-help-tabs .active,.contextual-help-tabs .active a,.contextual-help-tabs .active a:hover{background:#fff;color:#000}.contextual-help-tabs-wrap{border-color:#ccc;background-color:#fff}#screen-options-link-wrap,#contextual-help-link-wrap{background-color:#e3e3e3;border-right:1px solid transparent;border-left:1px solid transparent;border-bottom:1px solid transparent;background-image:-ms-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-moz-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-o-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#f1f1f1));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:linear-gradient(bottom,#dfdfdf,#f1f1f1)}#screen-meta-links a.show-settings{color:#777}#screen-meta-links a.show-settings:hover{color:#000}#screen-meta-links a.show-settings{background-color:transparent;background-repeat:no-repeat;background-position:right 3px}#screen-meta-links a.show-settings.screen-meta-active{background-color:transparent;background-repeat:no-repeat;background-position:right -33px}.login #backtoblog a{color:#464646}#wphead{border-bottom:#dfdfdf 1px solid}#wphead h1 a{color:#464646}#footer a:link,#footer a:visited{text-decoration:none}#footer a:hover{color:#000;text-decoration:underline}.file-error,abbr.required,.widget-control-remove:hover,table.widefat .delete a:hover,table.widefat .trash a:hover,table.widefat .spam a:hover,#dashboard_recent_comments .delete a:hover,#dashboard_recent_comments .trash a:hover #dashboard_recent_comments .spam a:hover{color:#f00}#pass-strength-result{background-color:#eee;border-color:#ddd!important}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}#titlediv #title{border-color:#ccc}#post-status-info{border-color:#dfdfdf #ccc #ccc;background-color:#eaeaea}.editwidget .widget-inside{border-color:#dfdfdf}#titlediv #title{background-color:#fff}#tTips p#tTips_inside{background-color:#ddd;color:#333}#timestampdiv input,#namediv input,#poststuff .inside .the-tagcloud{border-color:#ddd}#adminmenuback,#adminmenuwrap{background-color:#deece1;border-color:#ccc}#adminmenushadow,#adminmenuback{background-position:top right;background-repeat:repeat-y}#adminmenu li.wp-menu-separator{background:#dfdfdf;border-color:#cfcfcf}#adminmenu div.separator{border-color:#e1e1e1}#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,#adminmenu li.wp-has-current-submenu.opensub .wp-menu-toggle,#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:-1px 6px}#adminmenu .wp-has-submenu.opensub .wp-menu-toggle,#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:-2px 6px}#adminmenu a.menu-top,.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#eefcf1;border-bottom-color:#dfdfdf}#adminmenu li.wp-menu-open{border-color:#dfdfdf}#adminmenu li.menu-top.opensub>a,#adminmenu li.menu-top:hover>a,#adminmenu li.menu-top.focused>a,#adminmenu li.menu-top>a:focus{background-color:#eefcf1;text-shadow:0 1px 0 rgba(255,255,255,0.4)}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,#adminmenu .wp-menu-arrow,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#777;background-image:-ms-linear-gradient(bottom,#060,#6eb469);background-image:-moz-linear-gradient(bottom,#060,#6eb469);background-image:-o-linear-gradient(bottom,#060,#6eb469);background-image:-webkit-gradient(linear,left bottom,left top,from(#060),to(#6eb469));background-image:-webkit-linear-gradient(bottom,#060,#6eb469);background-image:linear-gradient(bottom,#060,#6eb469)}#adminmenu .wp-menu-arrow div{background-color:#777;background-image:-ms-linear-gradient(right bottom,#060,#6eb469);background-image:-moz-linear-gradient(right bottom,#060,#6eb469);background-image:-o-linear-gradient(right bottom,#060,#6eb469);background-image:-webkit-gradient(linear,right bottom,left top,from(#060),to(#6eb469));background-image:-webkit-linear-gradient(right bottom,#060,#6eb469);background-image:linear-gradient(right bottom,#060,#6eb469)}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{border-top-color:#eefcf1;border-bottom-color:#dfdfdf;background:#eefcf1}#adminmenu li.wp-not-current-submenu .wp-menu-arrow div{background:#eefcf1;border-color:#ccc}.folded #adminmenu li.menu-top li.opensub a,.folded #adminmenu li.menu-top li:hover a{background-image:none}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{text-shadow:0 -1px 0 #333;color:#fff;border-top-color:#6eb469;border-bottom-color:#060}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{border-top-color:#6eb469;border-bottom-color:#060}#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu a:focus{background-color:#eefcf1;color:#333}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333}#adminmenu .wp-submenu ul{background-color:#fff}#adminmenu .wp-submenu-wrap,#adminmenu .wp-submenu ul{border-color:#dfdfdf}#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4);background:#f9f9f9}#adminmenu .wp-submenu .wp-submenu-head{border-right-color:#dfdfdf;background-color:#deece1}#adminmenu div.wp-submenu{background-color:transparent}#collapse-menu{color:#aaa;border-color:transparent}#collapse-menu:hover{color:#999}#collapse-button{border-color:#ccc;background-color:#f4f4f4;background-image:-ms-linear-gradient(bottom,#dfdfdf,#fff);background-image:-moz-linear-gradient(bottom,#dfdfdf,#fff);background-image:-o-linear-gradient(bottom,#dfdfdf,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#fff));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#fff);background-image:linear-gradient(bottom,#dfdfdf,#fff)}#collapse-menu:hover #collapse-button{border-color:#aaa}#collapse-button div{background-color:transparent;background-repeat:no-repeat;background-position:0 -72px}.folded #collapse-button div{background-position:0 -108px}.icon16.icon-dashboard,#adminmenu .menu-icon-dashboard div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-60px -33px}#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-dashboard.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-60px -1px}.icon16.icon-post,#adminmenu .menu-icon-post div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-271px -33px}#adminmenu .menu-icon-post:hover div.wp-menu-image,#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-271px -33px}.icon16.icon-media,#adminmenu .menu-icon-media div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-120px -33px}#adminmenu .menu-icon-media:hover div.wp-menu-image,#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-120px -1px}.icon16.icon-links,#adminmenu .menu-icon-links div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-90px -33px}#adminmenu .menu-icon-links:hover div.wp-menu-image,#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-90px -1px}.icon16.icon-page,#adminmenu .menu-icon-page div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-150px -33px}#adminmenu .menu-icon-page:hover div.wp-menu-image,#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-150px -1px}.icon16.icon-comments,#adminmenu .menu-icon-comments div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-30px -33px}#adminmenu .menu-icon-comments:hover div.wp-menu-image,#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-comments.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-30px -1px}.icon16.icon-appearance,#adminmenu .menu-icon-appearance div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:0 -33px}#adminmenu .menu-icon-appearance:hover div.wp-menu-image,#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:0 -1px}.icon16.icon-plugins,#adminmenu .menu-icon-plugins div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-180px -33px}#adminmenu .menu-icon-plugins:hover div.wp-menu-image,#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-180px -1px}.icon16.icon-users,#adminmenu .menu-icon-users div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-300px -33px}#adminmenu .menu-icon-users:hover div.wp-menu-image,#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-users.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-300px -1px}.icon16.icon-tools,#adminmenu .menu-icon-tools div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-210px -33px}#adminmenu .menu-icon-tools:hover div.wp-menu-image,#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-tools.current div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-210px -1px}.icon16.icon-settings,#adminmenu .menu-icon-settings div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-240px -33px}#adminmenu .menu-icon-settings:hover div.wp-menu-image,#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-240px -1px}.icon16.icon-site,#adminmenu .menu-icon-site div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-360px -33px}#adminmenu .menu-icon-site:hover div.wp-menu-image,#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-360px -1px}.icon32.icon-post,#icon-edit,#icon-post{background-color:transparent;background-repeat:no-repeat;background-position:-552px -5px}.icon32.icon-dashboard,#icon-index{background-color:transparent;background-repeat:no-repeat;background-position:-137px -5px}.icon32.icon-media,#icon-upload{background-color:transparent;background-repeat:no-repeat;background-position:-251px -5px}.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category{background-color:transparent;background-repeat:no-repeat;background-position:-190px -5px}.icon32.icon-page,#icon-edit-pages,#icon-page{background-color:transparent;background-repeat:no-repeat;background-position:-312px -5px}.icon32.icon-comments,#icon-edit-comments{background-color:transparent;background-repeat:no-repeat;background-position:-72px -5px}.icon32.icon-appearance,#icon-themes{background-color:transparent;background-repeat:no-repeat;background-position:-11px -5px}.icon32.icon-plugins,#icon-plugins{background-color:transparent;background-repeat:no-repeat;background-position:-370px -5px}.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit{background-color:transparent;background-repeat:no-repeat;background-position:-600px -5px}.icon32.icon-tools,#icon-tools,#icon-admin{background-color:transparent;background-repeat:no-repeat;background-position:-432px -5px}.icon32.icon-settings,#icon-options-general{background-color:transparent;background-repeat:no-repeat;background-position:-492px -5px}.icon32.icon-site,#icon-ms-admin{background-color:transparent;background-repeat:no-repeat;background-position:-659px -5px}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#e4f2fd}#sidemenu a{background-color:#eefcf1;border-color:#eefcf1;border-bottom-color:#dfdfdf}#sidemenu a.current{background-color:#fff;border-color:#dfdfdf #dfdfdf #fff;color:#d54e21}#replyerror{border-color:#ddd;background-color:#eefcf1}.vim-current,.vim-current th,.vim-current td{background-color:#e4f2fd!important}.star-average,.star.star-rating{background-color:#fc0}div.star.select:hover{background-color:#d00}div.star img{border-left:1px solid #fff;border-right:1px solid #fff}.widefat div.star img{border-left:1px solid #eefcf1;border-right:1px solid #eefcf1}#plugin-information .fyi ul{background-color:#eaf3fa}#plugin-information .fyi h2.mainheader{background-color:#cee1ef}#plugin-information pre,#plugin-information code{background-color:#ededff}#plugin-information pre{border:1px solid #ccc}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea,#bulk-titles{border-color:#ddd}.inline-editor div.title{background-color:#eaf3fa}.inline-editor ul.cat-checklist{background-color:#fff;border-color:#ddd}.inline-editor .categories .catshow,.inline-editor .categories .cathide{color:#070}.inline-editor .quick-edit-save{background-color:#f1f1f1}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf}.attention{color:#d54e21}.meta-box-sortables .postbox:hover .handlediv{background-color:transparent;background-repeat:no-repeat;background-position:6px 7px}.tablenav .tablenav-pages{color:#555}.tablenav .tablenav-pages a{border-color:#e3e3e3;background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:left -379px}.tablenav .tablenav-pages a:hover,.tablenav .tablenav-pages a:focus{color:#d54e21}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:focus{color:#aaa}.tablenav .tablenav-pages .current{background:#dfdfdf;border-color:#d3d3d3}#availablethemes,#availablethemes td{border-color:#ddd}#current-theme img{border-color:#999}#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{color:#999}#TB_window #TB_title a.tb-theme-preview-link:hover,#TB_window #TB_title a.tb-theme-preview-link:focus{color:#ccc}.misc-pub-section{border-top-color:#fff;border-bottom-color:#dfdfdf}#minor-publishing{border-bottom-color:#dfdfdf}#post-body .misc-pub-section{border-right-color:#eee}.post-com-count span{background-color:#bbb}.form-table .color-palette td{border-color:#fff}.sortable-placeholder{border-color:#bbb;background-color:#eefcf1}#post-body ul.category-tabs li.tabs a,#post-body ul.add-menu-item-tabs li.tabs a,body.press-this ul.category-tabs li.tabs a{color:#333}.view-switch #view-switch-list{background-color:transparent;background-repeat:no-repeat;background-position:0 0}.view-switch .current #view-switch-list{background-color:transparent;background-repeat:no-repeat;background-position:-40px 0}.view-switch #view-switch-excerpt{background-color:transparent;background-repeat:no-repeat;background-position:-20px 0}.view-switch .current #view-switch-excerpt{background-color:transparent;background-repeat:no-repeat;background-position:-60px 0}#header-logo{background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:center center}.popular-tags,.feature-filter{background-color:#fff;border-color:#dfdfdf}#theme-information .action-button{border-top-color:#dfdfdf}.theme-listing br.line{border-bottom-color:#ccc}div.widgets-sortables,#widgets-left .inactive{background-color:#fcfcfc;border-color:#dfdfdf}#available-widgets .widget-holder{background-color:#fcfcfc;border-color:#dfdfdf}#available-widgets .widget-description{color:#555}.sidebar-name{color:#464646;text-shadow:#fff 0 1px 0;border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.sidebar-name:hover,#removing-widget{color:#d54e21}#removing-widget span{color:black}.sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.sidebar-name:hover .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.in-widget-title{color:#606060}.deleting .widget-title *{color:#aaa}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:.5}#dashboard_recent_comments div.undo{border-top-color:#dfdfdf}.comment-ays,.comment-ays th{border-color:#ddd}.comment-ays th{background-color:#f1f1f1}#menu-management .menu-edit{border-color:#dfdfdf}#post-body{background:#fff;border-top-color:#fff;border-bottom-color:#dfdfdf}#nav-menu-header{border-bottom-color:#dfdfdf}#nav-menu-footer{border-top-color:#fff}#menu-management .nav-tabs-arrow a{color:#c1c1c1}#menu-management .nav-tabs-arrow a:hover{color:#d54e21}#menu-management .nav-tabs-arrow a:active{color:#464646}#menu-management .nav-tab-active{border-color:#dfdfdf}#menu-management .nav-tab{background:#fbfbfb;border-color:#dfdfdf}.js .input-with-default-title{color:#aaa}#cancel-save{color:#f00}#cancel-save:hover{background-color:#f00;color:#fff}.list-container{border-color:#dfdfdf}.menu-item-handle{border-color:#dfdfdf}.menu li.deleting .menu-item-handle{background-color:#f66;text-shadow:#ccc}.item-type{color:#999}.item-controls .menu-item-delete:hover{color:#f00}.item-edit{background-color:transparent;background-repeat:no-repeat;background-position:8px 10px;border-bottom-color:#eee}.item-edit:hover{background-color:transparent;background-repeat:no-repeat;background-position:8px 10px}.menu-item-settings{border-color:#dfdfdf}.link-to-original{color:#777;border-color:#dfdfdf}#cancel-save:hover{color:#fff!important}#update-menu-item{color:#fff!important}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important}.submitbox .submitcancel{color:#070;border-bottom-color:#070}.submitbox .submitcancel:hover{background:#070;color:#fff}#menu-management .nav-tab-active,.menu-item-handle,.menu-item-settings{-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}#menu-management .nav-tab-active{background:#eefcf1;border-bottom-color:#eefcf1}#upload-form label{color:#777}.fullscreen-overlay{background:#fff}.wp-fullscreen-focus #wp-fullscreen-title,.wp-fullscreen-focus #wp-fullscreen-container{border-color:#ccc}#fullscreen-topbar{border-bottom-color:#dfdfdf}.about-wrap h1{color:#333;text-shadow:1px 1px 1px white}.about-text{color:#777}.wp-badge{color:#fff;text-shadow:0 -1px 0 #0c3d57;border-color:#2b5173;-moz-box-shadow:inset 0 0 0 1px #5f8ca8;-webkit-box-shadow:inset 0 0 0 1px #5f8ca8;box-shadow:inset 0 0 0 1px #5f8ca8;background-color:#378aac}.about-wrap h2 .nav-tab{color:#070}.about-wrap h2 .nav-tab:hover{color:#d54e21}.about-wrap h2 .nav-tab-active,.about-wrap h2 .nav-tab-active:hover{color:#333}.about-wrap h2 .nav-tab-active{text-shadow:1px 1px 1px white;color:#464646}.about-wrap h3{color:#333;text-shadow:1px 1px 1px white}.about-wrap .feature-section h4{color:#464646}.about-wrap .feature-section img{background:#eefcf1;border-color:#dfdfdf;-moz-box-shadow:0 0 6px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 6px rgba(0,0,0,0.3);box-shadow:0 0 6px rgba(0,0,0,0.3)}.about-wrap h4.wp-people-group{text-shadow:1px 1px 1px white}.about-wrap li.wp-person img.gravatar{-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);box-shadow:0 0 4px rgba(0,0,0,0.4)}.about-wrap li.wp-person .title{color:#464646;text-shadow:1px 1px 1px white}.freedoms-php .about-wrap ol li{color:#999}.freedoms-php .about-wrap ol p{color:#464646}.rtl .bar{border-right-color:none;border-left-color:#99d}.rtl #screen-meta-links a.show-settings{background-position:left 3px}.rtl #screen-meta-links a.show-settings.screen-meta-active{background-position:left -33px}.rtl #adminmenushadow,.rtl #adminmenuback{background-position:top left}.rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,.rtl #adminmenu li.wp-has-current-submenu.opensub .wp-menu-toggle,.rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:8px 6px}.rtl #adminmenu .wp-has-submenu.opensub .wp-menu-toggle,.rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,.rtl #adminmenu .wp-menu-open .wp-menu-toggle{background-color:transparent;background-repeat:no-repeat;background-position:8px 6px}.rtl #adminmenu .wp-submenu .wp-submenu-head{border-right-color:none;border-left-color:#dfdfdf}.rtl .folded #adminmenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4)}.rtl #collapse-button div{background-position:0 -108px}.rtl .folded #collapse-button div{background-position:0 -72px}.rtl .meta-box-sortables .postbox:hover .handlediv{background-color:transparent;background-repeat:no-repeat;background-position:6px 7px}.rtl .tablenav .tablenav-pages a{border-color:#e3e3e3;background-color:#eee;background-repeat:repeat-x;background-attachment:scroll;background-position:right -379px}.rtl #post-body .misc-pub-section{border-right-color:none;border-left-color:#eee}.rtl .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}.rtl .sidebar-name:hover .sidebar-name-arrow{background-color:transparent;background-repeat:no-repeat;background-position:5px 9px}
{bbp-admin → includes/admin}/styles/index.php RENAMED
File without changes
bbp-admin/bbp-tools.php → includes/admin/tools.php RENAMED
@@ -58,7 +58,7 @@ function bbp_admin_repair() {
58
  </table>
59
 
60
  <fieldset class="submit">
61
- <input class="button-primary" type="submit" name="submit" value="<?php _e( 'Repair Items', 'bbpress' ); ?>" />
62
  <?php wp_nonce_field( 'bbpress-do-counts' ); ?>
63
  </fieldset>
64
  </form>
@@ -160,22 +160,21 @@ function bbp_admin_repair_list() {
160
  0 => array( 'bbp-sync-topic-meta', __( 'Recalculate the parent topic for each post', 'bbpress' ), 'bbp_admin_repair_topic_meta' ),
161
  5 => array( 'bbp-sync-forum-meta', __( 'Recalculate the parent forum for each post', 'bbpress' ), 'bbp_admin_repair_forum_meta' ),
162
  10 => array( 'bbp-sync-forum-visibility', __( 'Recalculate private and hidden forums', 'bbpress' ), 'bbp_admin_repair_forum_visibility' ),
163
- 15 => array( 'bbp-forum-topics', __( 'Count topics in each forum', 'bbpress' ), 'bbp_admin_repair_forum_topic_count' ),
164
- 20 => array( 'bbp-forum-replies', __( 'Count replies in each forum', 'bbpress' ), 'bbp_admin_repair_forum_reply_count' ),
165
- 25 => array( 'bbp-topic-replies', __( 'Count replies in each topic', 'bbpress' ), 'bbp_admin_repair_topic_reply_count' ),
166
- 30 => array( 'bbp-topic-voices', __( 'Count voices in each topic', 'bbpress' ), 'bbp_admin_repair_topic_voice_count' ),
167
- 35 => array( 'bbp-topic-hidden-replies', __( 'Count spammed & trashed replies in each topic', 'bbpress' ), 'bbp_admin_repair_topic_hidden_reply_count' ),
168
- 40 => array( 'bbp-user-replies', __( 'Count topics for each user', 'bbpress' ), 'bbp_admin_repair_user_topic_count' ),
169
- 45 => array( 'bbp-user-topics', __( 'Count replies for each user', 'bbpress' ), 'bbp_admin_repair_user_reply_count' ),
170
- 50 => array( 'bbp-user-favorites', __( 'Remove trashed topics from user favorites', 'bbpress' ), 'bbp_admin_repair_user_favorites' ),
171
- 55 => array( 'bbp-user-subscriptions', __( 'Remove trashed topics from user subscriptions', 'bbpress' ), 'bbp_admin_repair_user_subscriptions' ),
172
- 60 => array( 'bbp-sync-all-topics-forums', __( 'Recalculate last activity in each topic and forum', 'bbpress' ), 'bbp_admin_repair_freshness' )
 
 
173
  );
174
  ksort( $repair_list );
175
 
176
- // DO NOT USE: Legacy filter
177
- $repair_list = apply_filters( 'bbp_recount_list', $repair_list );
178
-
179
  return (array) apply_filters( 'bbp_repair_list', $repair_list );
180
  }
181
 
@@ -219,8 +218,7 @@ function bbp_admin_repair_topic_reply_count() {
219
  if ( is_wp_error( $wpdb->query( $sql ) ) )
220
  return array( 2, sprintf( $statement, $result ) );
221
 
222
- $result = __( 'Complete!', 'bbpress' );
223
- return array( 0, sprintf( $statement, $result ) );
224
  }
225
 
226
  /**
@@ -263,8 +261,7 @@ function bbp_admin_repair_topic_voice_count() {
263
  if ( is_wp_error( $wpdb->query( $sql ) ) )
264
  return array( 2, sprintf( $statement, $result ) );
265
 
266
- $result = __( 'Complete!', 'bbpress' );
267
- return array( 0, sprintf( $statement, $result ) );
268
  }
269
 
270
  /**
@@ -290,7 +287,101 @@ function bbp_admin_repair_topic_hidden_reply_count() {
290
  if ( is_wp_error( $wpdb->query( $sql ) ) )
291
  return array( 2, sprintf( $statement, $result ) );
292
 
293
- $result = __( 'Complete!', 'bbpress' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  return array( 0, sprintf( $statement, $result ) );
295
  }
296
 
@@ -325,8 +416,7 @@ function bbp_admin_repair_forum_topic_count() {
325
  return array( 2, sprintf( $statement, $result ) );
326
  }
327
 
328
- $result = __( 'Complete!', 'bbpress' );
329
- return array( 0, sprintf( $statement, $result ) );
330
  }
331
 
332
  /**
@@ -360,8 +450,7 @@ function bbp_admin_repair_forum_reply_count() {
360
  return array( 2, sprintf( $statement, $result ) );
361
  }
362
 
363
- $result = __( 'Complete!', 'bbpress' );
364
- return array( 0, sprintf( $statement, $result ) );
365
  }
366
 
367
  /**
@@ -397,8 +486,7 @@ function bbp_admin_repair_user_topic_count() {
397
  if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
398
  return array( 3, sprintf( $statement, $result ) );
399
 
400
- $insert_values = array_chunk( $insert_values, 10000 );
401
- foreach ( $insert_values as $chunk ) {
402
  $chunk = "\n" . join( ",\n", $chunk );
403
  $sql_insert = "INSERT INTO `{$wpdb->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES $chunk;";
404
 
@@ -407,8 +495,7 @@ function bbp_admin_repair_user_topic_count() {
407
  }
408
  }
409
 
410
- $result = __( 'Complete!', 'bbpress' );
411
- return array( 0, sprintf( $statement, $result ) );
412
  }
413
 
414
  /**
@@ -444,8 +531,7 @@ function bbp_admin_repair_user_reply_count() {
444
  if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
445
  return array( 3, sprintf( $statement, $result ) );
446
 
447
- $insert_values = array_chunk( $insert_values, 10000 );
448
- foreach ( $insert_values as $chunk ) {
449
  $chunk = "\n" . join( ",\n", $chunk );
450
  $sql_insert = "INSERT INTO `{$wpdb->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES $chunk;";
451
 
@@ -454,8 +540,7 @@ function bbp_admin_repair_user_reply_count() {
454
  }
455
  }
456
 
457
- $result = __( 'Complete!', 'bbpress' );
458
- return array( 0, sprintf( $statement, $result ) );
459
  }
460
 
461
  /**
@@ -493,8 +578,11 @@ function bbp_admin_repair_user_favorites() {
493
  if ( empty( $favorites ) || !is_array( $favorites ) )
494
  continue;
495
 
496
- $favorites = join( ',', $favorites );
497
- $values[] = "('{$user->user_id}', '{$key}, '{$favorites}')";
 
 
 
498
  }
499
 
500
  if ( !count( $values ) ) {
@@ -506,16 +594,15 @@ function bbp_admin_repair_user_favorites() {
506
  if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
507
  return array( 4, sprintf( $statement, $result ) );
508
 
509
- $values = array_chunk( $values, 10000 );
510
- foreach ( $values as $chunk ) {
511
  $chunk = "\n" . join( ",\n", $chunk );
512
  $sql_insert = "INSERT INTO `$wpdb->usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES $chunk;";
513
- if ( is_wp_error( $wpdb->query( $sql_insert ) ) )
514
  return array( 5, sprintf( $statement, $result ) );
 
515
  }
516
 
517
- $result = __( 'Complete!', 'bbpress' );
518
- return array( 0, sprintf( $statement, $result ) );
519
  }
520
 
521
  /**
@@ -552,8 +639,11 @@ function bbp_admin_repair_user_subscriptions() {
552
  if ( empty( $subscriptions ) || !is_array( $subscriptions ) )
553
  continue;
554
 
555
- $subscriptions = join( ',', $subscriptions );
556
- $values[] = "('{$user->user_id}', '{$key}', '{$subscriptions}')";
 
 
 
557
  }
558
 
559
  if ( !count( $values ) ) {
@@ -565,15 +655,66 @@ function bbp_admin_repair_user_subscriptions() {
565
  if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
566
  return array( 4, sprintf( $statement, $result ) );
567
 
568
- $values = array_chunk( $values, 10000 );
569
- foreach ( $values as $chunk ) {
570
  $chunk = "\n" . join( ",\n", $chunk );
571
  $sql_insert = "INSERT INTO `{$wpdb->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES $chunk;";
572
- if ( is_wp_error( $wpdb->query( $sql_insert ) ) )
573
  return array( 5, sprintf( $statement, $result ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
574
  }
575
 
576
- $result = __( 'Complete!', 'bbpress' );
577
  return array( 0, sprintf( $statement, $result ) );
578
  }
579
 
@@ -678,10 +819,9 @@ function bbp_admin_repair_freshness() {
678
  bbp_update_forum( array( 'forum_id' => $forum_id ) );
679
  }
680
  }
681
-
682
  // Complete results
683
- $result = __( 'Complete!', 'bbpress' );
684
- return array( 0, sprintf( $statement, $result ) );
685
  }
686
 
687
  /**
@@ -731,8 +871,7 @@ function bbp_admin_repair_forum_visibility() {
731
  wp_reset_postdata();
732
 
733
  // Complete results
734
- $result = __( 'Complete!', 'bbpress' );
735
- return array( 0, sprintf( $statement, $result ) );
736
  }
737
 
738
  /**
@@ -786,8 +925,7 @@ function bbp_admin_repair_forum_meta() {
786
  return array( 4, sprintf( $statement, $result ) );
787
 
788
  // Complete results
789
- $result = __( 'Complete!', 'bbpress' );
790
- return array( 0, sprintf( $statement, $result ) );
791
  }
792
 
793
  /**
@@ -832,8 +970,7 @@ function bbp_admin_repair_topic_meta() {
832
  return array( 4, sprintf( $statement, $result ) );
833
 
834
  // Complete results
835
- $result = __( 'Complete!', 'bbpress' );
836
- return array( 0, sprintf( $statement, $result ) );
837
  }
838
 
839
  /** Reset ********************************************************************/
@@ -888,7 +1025,7 @@ function bbp_admin_reset() {
888
  </table>
889
 
890
  <fieldset class="submit">
891
- <input class="button-primary" type="submit" name="submit" value="<?php _e( 'Reset bbPress', 'bbpress' ); ?>" />
892
  <?php wp_nonce_field( 'bbpress-reset' ); ?>
893
  </fieldset>
894
  </form>
@@ -927,7 +1064,7 @@ function bbp_admin_reset_handler() {
927
  $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
928
  $messages[] = sprintf( $statement, $result );
929
 
930
-
931
  /** Post Meta *********************************************************/
932
 
933
  if ( !empty( $sql_posts ) ) {
@@ -963,7 +1100,7 @@ function bbp_admin_reset_handler() {
963
  $result = $failed;
964
  }
965
  $messages[] = sprintf( $statement, $result );
966
-
967
  /** Options ***********************************************************/
968
 
969
  $statement = __( 'Deleting Settings&hellip; %s', 'bbpress' );
58
  </table>
59
 
60
  <fieldset class="submit">
61
+ <input class="button-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Repair Items', 'bbpress' ); ?>" />
62
  <?php wp_nonce_field( 'bbpress-do-counts' ); ?>
63
  </fieldset>
64
  </form>
160
  0 => array( 'bbp-sync-topic-meta', __( 'Recalculate the parent topic for each post', 'bbpress' ), 'bbp_admin_repair_topic_meta' ),
161
  5 => array( 'bbp-sync-forum-meta', __( 'Recalculate the parent forum for each post', 'bbpress' ), 'bbp_admin_repair_forum_meta' ),
162
  10 => array( 'bbp-sync-forum-visibility', __( 'Recalculate private and hidden forums', 'bbpress' ), 'bbp_admin_repair_forum_visibility' ),
163
+ 15 => array( 'bbp-sync-all-topics-forums', __( 'Recalculate last activity in each topic and forum', 'bbpress' ), 'bbp_admin_repair_freshness' ),
164
+ 20 => array( 'bbp-group-forums', __( 'Repair BuddyPress Group Forum relationships', 'bbpress' ), 'bbp_admin_repair_group_forum_relationship' ),
165
+ 25 => array( 'bbp-forum-topics', __( 'Count topics in each forum', 'bbpress' ), 'bbp_admin_repair_forum_topic_count' ),
166
+ 30 => array( 'bbp-forum-replies', __( 'Count replies in each forum', 'bbpress' ), 'bbp_admin_repair_forum_reply_count' ),
167
+ 35 => array( 'bbp-topic-replies', __( 'Count replies in each topic', 'bbpress' ), 'bbp_admin_repair_topic_reply_count' ),
168
+ 40 => array( 'bbp-topic-voices', __( 'Count voices in each topic', 'bbpress' ), 'bbp_admin_repair_topic_voice_count' ),
169
+ 45 => array( 'bbp-topic-hidden-replies', __( 'Count spammed & trashed replies in each topic', 'bbpress' ), 'bbp_admin_repair_topic_hidden_reply_count' ),
170
+ 50 => array( 'bbp-user-replies', __( 'Count topics for each user', 'bbpress' ), 'bbp_admin_repair_user_topic_count' ),
171
+ 55 => array( 'bbp-user-topics', __( 'Count replies for each user', 'bbpress' ), 'bbp_admin_repair_user_reply_count' ),
172
+ 60 => array( 'bbp-user-favorites', __( 'Remove trashed topics from user favorites', 'bbpress' ), 'bbp_admin_repair_user_favorites' ),
173
+ 65 => array( 'bbp-user-subscriptions', __( 'Remove trashed topics from user subscriptions', 'bbpress' ), 'bbp_admin_repair_user_subscriptions' ),
174
+ 70 => array( 'bbp-user-role-map', __( 'Remap existing users to default forum roles', 'bbpress' ), 'bbp_admin_repair_user_roles' )
175
  );
176
  ksort( $repair_list );
177
 
 
 
 
178
  return (array) apply_filters( 'bbp_repair_list', $repair_list );
179
  }
180
 
218
  if ( is_wp_error( $wpdb->query( $sql ) ) )
219
  return array( 2, sprintf( $statement, $result ) );
220
 
221
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
222
  }
223
 
224
  /**
261
  if ( is_wp_error( $wpdb->query( $sql ) ) )
262
  return array( 2, sprintf( $statement, $result ) );
263
 
264
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
265
  }
266
 
267
  /**
287
  if ( is_wp_error( $wpdb->query( $sql ) ) )
288
  return array( 2, sprintf( $statement, $result ) );
289
 
290
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
291
+ }
292
+
293
+ /**
294
+ * Repair group forum ID mappings after a bbPress 1.1 to bbPress 2.2 conversion
295
+ *
296
+ * @since bbPress (r4395)
297
+ *
298
+ * @global WPDB $wpdb
299
+ * @return If a wp_error() occurs and no converted forums are found
300
+ */
301
+ function bbp_admin_repair_group_forum_relationship() {
302
+ global $wpdb;
303
+
304
+ $statement = __( 'Repairing BuddyPress group-forum relationships&hellip; %s', 'bbpress' );
305
+ $g_count = 0;
306
+ $f_count = 0;
307
+
308
+ // Copy the BuddyPress filter here, incase BuddyPress is not active
309
+ $prefix = apply_filters( 'bp_core_get_table_prefix', $wpdb->base_prefix );
310
+ $tablename = $prefix . 'bp_groups_groupmeta';
311
+
312
+ // Get the converted forum IDs
313
+ $forum_ids = $wpdb->query( "SELECT `forum`.`ID`, `forummeta`.`meta_value`
314
+ FROM `{$wpdb->posts}` AS `forum`
315
+ LEFT JOIN `{$wpdb->postmeta}` AS `forummeta`
316
+ ON `forum`.`ID` = `forummeta`.`post_id`
317
+ AND `forummeta`.`meta_key` = '_bbp_old_forum_id'
318
+ WHERE `forum`.`post_type` = 'forum'
319
+ GROUP BY `forum`.`ID`;" );
320
+
321
+ // Bail if forum IDs returned an error
322
+ if ( is_wp_error( $forum_ids ) || empty( $wpdb->last_result ) )
323
+ return array( 2, sprintf( $statement, __( 'Failed!', 'bbpress' ) ) );
324
+
325
+ // Stash the last results
326
+ $results = $wpdb->last_result;
327
+
328
+ // Update each group forum
329
+ foreach ( $results as $group_forums ) {
330
+
331
+ // Only update if is a converted forum
332
+ if ( ! isset( $group_forums->meta_value ) )
333
+ continue;
334
+
335
+ // Attempt to update group meta
336
+ $updated = $wpdb->query( "UPDATE `{$tablename}` SET `meta_value` = '{$group_forums->ID}' WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->meta_value}';" );
337
+
338
+ // Bump the count
339
+ if ( !empty( $updated ) && ! is_wp_error( $updated ) ) {
340
+ ++$g_count;
341
+ }
342
+
343
+ // Update group's forum metadata
344
+ $group_id = (int) $wpdb->get_var( "SELECT `group_id` FROM `{$tablename}` WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->ID}';" );
345
+ if ( !empty( $group_id ) ) {
346
+ update_post_meta( $group_forums->ID, '_bbp_group_ids', array( $group_id ) );
347
+ ++$f_count;
348
+ }
349
+ }
350
+
351
+ // Make some logical guesses at the old group root forum
352
+ if ( function_exists( 'bp_forums_parent_forum_id' ) ) {
353
+ $old_default_forum_id = bp_forums_parent_forum_id();
354
+ } elseif ( defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ) {
355
+ $old_default_forum_id = (int) BP_FORUMS_PARENT_FORUM_ID;
356
+ } else {
357
+ $old_default_forum_id = 1;
358
+ }
359
+
360
+ // Try to get the group root forum
361
+ $posts = get_posts( array(
362
+ 'post_type' => bbp_get_forum_post_type(),
363
+ 'meta_key' => '_bbp_old_forum_id',
364
+ 'meta_value' => $old_default_forum_id,
365
+ 'numberposts' => 1
366
+ ) );
367
+
368
+ // Found the group root forum
369
+ if ( ! empty( $posts ) ) {
370
+
371
+ // Rename 'Default Forum' since it's now visible in sitewide forums
372
+ if ( 'Default Forum' == $posts[0]->post_title ) {
373
+ wp_update_post( array(
374
+ 'ID' => $posts[0]->ID,
375
+ 'post_title' => __( 'Group Forums', 'bbpress' ),
376
+ ) );
377
+ }
378
+
379
+ // Update the group forums root metadata
380
+ update_option( '_bbp_group_forums_root_id', $posts[0]->ID );
381
+ }
382
+
383
+ // Complete results
384
+ $result = sprintf( __( 'Complete! %s groups updated; %s forums updated.', 'bbpress' ), bbp_number_format( $g_count ), bbp_number_format( $f_count ) );
385
  return array( 0, sprintf( $statement, $result ) );
386
  }
387
 
416
  return array( 2, sprintf( $statement, $result ) );
417
  }
418
 
419
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
420
  }
421
 
422
  /**
450
  return array( 2, sprintf( $statement, $result ) );
451
  }
452
 
453
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
454
  }
455
 
456
  /**
486
  if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
487
  return array( 3, sprintf( $statement, $result ) );
488
 
489
+ foreach ( array_chunk( $insert_values, 10000 ) as $chunk ) {
 
490
  $chunk = "\n" . join( ",\n", $chunk );
491
  $sql_insert = "INSERT INTO `{$wpdb->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES $chunk;";
492
 
495
  }
496
  }
497
 
498
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
499
  }
500
 
501
  /**
531
  if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
532
  return array( 3, sprintf( $statement, $result ) );
533
 
534
+ foreach ( array_chunk( $insert_values, 10000 ) as $chunk ) {
 
535
  $chunk = "\n" . join( ",\n", $chunk );
536
  $sql_insert = "INSERT INTO `{$wpdb->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES $chunk;";
537
 
540
  }
541
  }
542
 
543
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
544
  }
545
 
546
  /**
578
  if ( empty( $favorites ) || !is_array( $favorites ) )
579
  continue;
580
 
581
+ $favorites_joined = join( ',', $favorites );
582
+ $values[] = "('{$user->user_id}', '{$key}, '{$favorites_joined}')";
583
+
584
+ // Cleanup
585
+ unset( $favorites, $favorites_joined );
586
  }
587
 
588
  if ( !count( $values ) ) {
594
  if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
595
  return array( 4, sprintf( $statement, $result ) );
596
 
597
+ foreach ( array_chunk( $values, 10000 ) as $chunk ) {
 
598
  $chunk = "\n" . join( ",\n", $chunk );
599
  $sql_insert = "INSERT INTO `$wpdb->usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES $chunk;";
600
+ if ( is_wp_error( $wpdb->query( $sql_insert ) ) ) {
601
  return array( 5, sprintf( $statement, $result ) );
602
+ }
603
  }
604
 
605
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
606
  }
607
 
608
  /**
639
  if ( empty( $subscriptions ) || !is_array( $subscriptions ) )
640
  continue;
641
 
642
+ $subscriptions_joined = join( ',', $subscriptions );
643
+ $values[] = "('{$user->user_id}', '{$key}', '{$subscriptions_joined}')";
644
+
645
+ // Cleanup
646
+ unset( $subscriptions, $subscriptions_joined );
647
  }
648
 
649
  if ( !count( $values ) ) {
655
  if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
656
  return array( 4, sprintf( $statement, $result ) );
657
 
658
+ foreach ( array_chunk( $values, 10000 ) as $chunk ) {
 
659
  $chunk = "\n" . join( ",\n", $chunk );
660
  $sql_insert = "INSERT INTO `{$wpdb->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES $chunk;";
661
+ if ( is_wp_error( $wpdb->query( $sql_insert ) ) ) {
662
  return array( 5, sprintf( $statement, $result ) );
663
+ }
664
+ }
665
+
666
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
667
+ }
668
+
669
+ /**
670
+ * This repair tool will map each user of the current site to their respective
671
+ * forums role. By default, Admins will be Key Masters, and every other role
672
+ * will be the default role defined in Settings > Forums (Participant).
673
+ *
674
+ * @since bbPress (r4340)
675
+ *
676
+ * @uses bbp_get_user_role_map() To get the map of user roles
677
+ * @uses get_editable_roles() To get the current WordPress roles
678
+ * @uses get_users() To get the users of each role (limited to ID field)
679
+ * @uses bbp_set_user_role() To set each user's forums role
680
+ */
681
+ function bbp_admin_repair_user_roles() {
682
+
683
+ $statement = __( 'Remapping forum role for each user on this site&hellip; %s', 'bbpress' );
684
+ $changed = 0;
685
+ $role_map = bbp_get_user_role_map();
686
+
687
+ // Bail if no role map exists
688
+ if ( empty( $role_map ) )
689
+ return array( 1, sprintf( $statement, __( 'Failed!', 'bbpress' ) ) );
690
+
691
+ // Iterate through each role...
692
+ foreach ( array_keys( get_editable_roles() ) as $role ) {
693
+
694
+ // Reset the offset
695
+ $offset = 0;
696
+
697
+ // Get users of this site, limited to 1000
698
+ while ( $users = get_users( array(
699
+ 'role' => $role,
700
+ 'fields' => 'ID',
701
+ 'number' => 1000,
702
+ 'offset' => $offset
703
+ ) ) ) {
704
+
705
+ // Iterate through each user of $role and try to set it
706
+ foreach ( (array) $users as $user_id ) {
707
+ if ( bbp_set_user_role( $user_id, $role_map[$role] ) ) {
708
+ ++$changed; // Keep a count to display at the end
709
+ }
710
+ }
711
+
712
+ // Bump the offset for the next query iteration
713
+ $offset = $offset + 1000;
714
+ }
715
  }
716
 
717
+ $result = sprintf( __( 'Complete! %s users updated.', 'bbpress' ), bbp_number_format( $changed ) );
718
  return array( 0, sprintf( $statement, $result ) );
719
  }
720
 
819
  bbp_update_forum( array( 'forum_id' => $forum_id ) );
820
  }
821
  }
822
+
823
  // Complete results
824
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
825
  }
826
 
827
  /**
871
  wp_reset_postdata();
872
 
873
  // Complete results
874
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
875
  }
876
 
877
  /**
925
  return array( 4, sprintf( $statement, $result ) );
926
 
927
  // Complete results
928
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
929
  }
930
 
931
  /**
970
  return array( 4, sprintf( $statement, $result ) );
971
 
972
  // Complete results
973
+ return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
 
974
  }
975
 
976
  /** Reset ********************************************************************/
1025
  </table>
1026
 
1027
  <fieldset class="submit">
1028
+ <input class="button-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Reset bbPress', 'bbpress' ); ?>" />
1029
  <?php wp_nonce_field( 'bbpress-reset' ); ?>
1030
  </fieldset>
1031
  </form>
1064
  $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1065
  $messages[] = sprintf( $statement, $result );
1066
 
1067
+
1068
  /** Post Meta *********************************************************/
1069
 
1070
  if ( !empty( $sql_posts ) ) {
1100
  $result = $failed;
1101
  }
1102
  $messages[] = sprintf( $statement, $result );
1103
+
1104
  /** Options ***********************************************************/
1105
 
1106
  $statement = __( 'Deleting Settings&hellip; %s', 'bbpress' );
bbp-admin/bbp-topics.php → includes/admin/topics.php RENAMED
@@ -142,8 +142,8 @@ class BBP_Topics_Admin {
142
  '<p>' . __( 'You can customize the display of this screen&#8217;s contents in a number of ways:', 'bbpress' ) . '</p>' .
143
  '<ul>' .
144
  '<li>' . __( 'You can hide/display columns based on your needs and decide how many topics to list per screen using the Screen Options tab.', 'bbpress' ) . '</li>' .
145
- '<li>' . __( 'You can filter the list of topics by forum status using the text links in the upper left to show All, Published, or Trashed topics. The default view is to show all topics.', 'bbpress' ) . '</li>' .
146
- '<li>' . __( 'You can refine the list to show only topics from a specific month by using the dropdown menus above the topics list. Click the Filter button after making your selection. You also can refine the list by clicking on the forum creator in the topics list.', 'bbpress' ) . '</li>' .
147
  '</ul>'
148
  ) );
149
 
@@ -154,10 +154,13 @@ class BBP_Topics_Admin {
154
  'content' =>
155
  '<p>' . __( 'Hovering over a row in the topics list will display action links that allow you to manage your topic. You can perform the following actions:', 'bbpress' ) . '</p>' .
156
  '<ul>' .
157
- '<li>' . __( '<strong>Edit</strong> takes you to the editing screen for that forum. You can also reach that screen by clicking on the forum title.', 'bbpress' ) . '</li>' .
158
- '<li>' . __( '<strong>Trash</strong> removes your forum from this list and places it in the trash, from which you can permanently delete it.', 'bbpress' ) . '</li>' .
159
  '<li>' . __( '<strong>Spam</strong> removes your topic from this list and places it in the spam queue, from which you can permanently delete it.', 'bbpress' ) . '</li>' .
160
  '<li>' . __( '<strong>Preview</strong> will show you what your draft topic will look like if you publish it. View will take you to your live site to view the topic. Which link is available depends on your topic&#8217;s status.', 'bbpress' ) . '</li>' .
 
 
 
161
  '</ul>'
162
  ) );
163
 
@@ -284,7 +287,7 @@ class BBP_Topics_Admin {
284
  * @return int Parent id
285
  */
286
  public function attributes_metabox_save( $topic_id ) {
287
-
288
  if ( $this->bail() ) return $topic_id;
289
 
290
  // Bail if doing an autosave
@@ -440,6 +443,11 @@ class BBP_Topics_Admin {
440
  <style type="text/css" media="screen">
441
  /*<![CDATA[*/
442
 
 
 
 
 
 
443
  .column-bbp_forum_topic_count,
444
  .column-bbp_forum_reply_count,
445
  .column-bbp_topic_reply_count,
@@ -726,7 +734,7 @@ class BBP_Topics_Admin {
726
 
727
  // Output forum name
728
  if ( !empty( $forum_id ) ) {
729
-
730
  // Forum Title
731
  $forum_title = bbp_get_forum_title( $forum_id );
732
  if ( empty( $forum_title ) ) {
142
  '<p>' . __( 'You can customize the display of this screen&#8217;s contents in a number of ways:', 'bbpress' ) . '</p>' .
143
  '<ul>' .
144
  '<li>' . __( 'You can hide/display columns based on your needs and decide how many topics to list per screen using the Screen Options tab.', 'bbpress' ) . '</li>' .
145
+ '<li>' . __( 'You can filter the list of topics by topic status using the text links in the upper left to show All, Published, or Trashed topics. The default view is to show all topics.', 'bbpress' ) . '</li>' .
146
+ '<li>' . __( 'You can refine the list to show only topics from a specific month by using the dropdown menus above the topics list. Click the Filter button after making your selection. You also can refine the list by clicking on the topic creator in the topics list.', 'bbpress' ) . '</li>' .
147
  '</ul>'
148
  ) );
149
 
154
  'content' =>
155
  '<p>' . __( 'Hovering over a row in the topics list will display action links that allow you to manage your topic. You can perform the following actions:', 'bbpress' ) . '</p>' .
156
  '<ul>' .
157
+ '<li>' . __( '<strong>Edit</strong> takes you to the editing screen for that topic. You can also reach that screen by clicking on the topic title.', 'bbpress' ) . '</li>' .
158
+ '<li>' . __( '<strong>Trash</strong> removes your topic from this list and places it in the trash, from which you can permanently delete it.', 'bbpress' ) . '</li>' .
159
  '<li>' . __( '<strong>Spam</strong> removes your topic from this list and places it in the spam queue, from which you can permanently delete it.', 'bbpress' ) . '</li>' .
160
  '<li>' . __( '<strong>Preview</strong> will show you what your draft topic will look like if you publish it. View will take you to your live site to view the topic. Which link is available depends on your topic&#8217;s status.', 'bbpress' ) . '</li>' .
161
+ '<li>' . __( '<strong>Close</strong> will mark the selected topic as &#8217;closed&#8217; and disable the option to post new replies to the topic.', 'bbpress' ) . '</li>' .
162
+ '<li>' . __( '<strong>Stick</strong> will keep the selected topic &#8217;pinned&#8217; to the top the parent forum topic list.', 'bbpress' ) . '</li>' .
163
+ '<li>' . __( '<strong>Stick <em>(to front)</em></strong> will keep the selected topic &#8217;pinned&#8217; to the top of ALL forums and be visable in any forums topics list.', 'bbpress' ) . '</li>' .
164
  '</ul>'
165
  ) );
166
 
287
  * @return int Parent id
288
  */
289
  public function attributes_metabox_save( $topic_id ) {
290
+
291
  if ( $this->bail() ) return $topic_id;
292
 
293
  // Bail if doing an autosave
443
  <style type="text/css" media="screen">
444
  /*<![CDATA[*/
445
 
446
+ strong.label {
447
+ display: inline-block;
448
+ width: 60px;
449
+ }
450
+
451
  .column-bbp_forum_topic_count,
452
  .column-bbp_forum_reply_count,
453
  .column-bbp_topic_reply_count,
734
 
735
  // Output forum name
736
  if ( !empty( $forum_id ) ) {
737
+
738
  // Forum Title
739
  $forum_title = bbp_get_forum_title( $forum_id );
740
  if ( empty( $forum_title ) ) {
includes/admin/users.php ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress Users Admin Class
5
+ *
6
+ * @package bbPress
7
+ * @subpackage Administration
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+ if ( !class_exists( 'BBP_Users_Admin' ) ) :
14
+ /**
15
+ * Loads bbPress users admin area
16
+ *
17
+ * @package bbPress
18
+ * @subpackage Administration
19
+ * @since bbPress (r2464)
20
+ */
21
+ class BBP_Users_Admin {
22
+
23
+ /**
24
+ * The bbPress users admin loader
25
+ *
26
+ * @since bbPress (r2515)
27
+ *
28
+ * @uses BBP_Users_Admin::setup_globals() Setup the globals needed
29
+ * @uses BBP_Users_Admin::setup_actions() Setup the hooks and actions
30
+ */
31
+ public function __construct() {
32
+ $this->setup_actions();
33
+ }
34
+
35
+ /**
36
+ * Setup the admin hooks, actions and filters
37
+ *
38
+ * @since bbPress (r2646)
39
+ * @access private
40
+ *
41
+ * @uses add_action() To add various actions
42
+ */
43
+ function setup_actions() {
44
+
45
+ // Bail if in network admin
46
+ if ( is_network_admin() )
47
+ return;
48
+
49
+ // User profile edit/display actions
50
+ add_action( 'edit_user_profile', array( $this, 'secondary_role_display' ) );
51
+
52
+ // WordPress user screen
53
+ add_action( 'restrict_manage_users', array( $this, 'user_role_bulk_dropdown' ) );
54
+ add_filter( 'manage_users_columns', array( $this, 'user_role_column' ) );
55
+ add_filter( 'manage_users_custom_column', array( $this, 'user_role_row' ), 10, 3 );
56
+
57
+ // Process bulk role change
58
+ add_action( 'load-users.php', array( $this, 'user_role_bulk_change' ) );
59
+ }
60
+
61
+ /**
62
+ * Default interface for setting a forum role
63
+ *
64
+ * @since bbPress (r4285)
65
+ *
66
+ * @param WP_User $profileuser User data
67
+ * @return bool Always false
68
+ */
69
+ public static function secondary_role_display( $profileuser ) {
70
+
71
+ // Bail if current user cannot edit users
72
+ if ( ! current_user_can( 'edit_user', $profileuser->ID ) )
73
+ return;
74
+
75
+ // Get the roles
76
+ $dynamic_roles = bbp_get_dynamic_roles();
77
+
78
+ // Only keymasters can set other keymasters
79
+ if ( ! current_user_can( 'keep_gate' ) )
80
+ unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
81
+
82
+ <h3><?php _e( 'Forums', 'bbpress' ); ?></h3>
83
+
84
+ <table class="form-table">
85
+ <tbody>
86
+ <tr>
87
+ <th><label for="bbp-forums-role"><?php _e( 'Forum Role', 'bbpress' ); ?></label></th>
88
+ <td>
89
+
90
+ <?php $user_role = bbp_get_user_role( $profileuser->ID ); ?>
91
+
92
+ <select name="bbp-forums-role" id="bbp-forums-role">
93
+
94
+ <?php if ( ! empty( $user_role ) ) : ?>
95
+
96
+ <option value=""><?php _e( '&mdash; No role for this forum &mdash;', 'bbpress' ); ?></option>
97
+
98
+ <?php else : ?>
99
+
100
+ <option value="" selected="selected"><?php _e( '&mdash; No role for this forum &mdash;', 'bbpress' ); ?></option>
101
+
102
+ <?php endif; ?>
103
+
104
+ <?php foreach ( $dynamic_roles as $role => $details ) : ?>
105
+
106
+ <option <?php selected( $user_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>
107
+
108
+ <?php endforeach; ?>
109
+
110
+ </select>
111
+ </td>
112
+ </tr>
113
+
114
+ </tbody>
115
+ </table>
116
+
117
+ <?php
118
+ }
119
+
120
+ /**
121
+ * Add bulk forums role dropdown to the WordPress users table
122
+ *
123
+ * @since bbPress (r4360)
124
+ */
125
+ public static function user_role_bulk_dropdown() {
126
+
127
+ // Bail if current user cannot promote users
128
+ if ( !current_user_can( 'promote_users' ) )
129
+ return;
130
+
131
+ // Get the roles
132
+ $dynamic_roles = bbp_get_dynamic_roles();
133
+
134
+ // Only keymasters can set other keymasters
135
+ if ( ! current_user_can( 'keep_gate' ) )
136
+ unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
137
+
138
+ <label class="screen-reader-text" for="bbp-new-role"><?php _e( 'Change forum role to&hellip;', 'bbpress' ) ?></label>
139
+ <select name="bbp-new-role" id="bbp-new-role" style="display:inline-block; float:none;">
140
+ <option value=''><?php _e( 'Change forum role to&hellip;', 'bbpress' ) ?></option>
141
+ <?php foreach ( $dynamic_roles as $role => $details ) : ?>
142
+
143
+ <option value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>
144
+
145
+ <?php endforeach; ?>
146
+ </select>
147
+
148
+ <?php submit_button( __( 'Change', 'bbpress' ), 'secondary', 'bbp-change-role', false );
149
+ }
150
+
151
+ /**
152
+ * Process bulk dropdown form submission from the WordPress Users
153
+ * Table
154
+ *
155
+ * @uses current_user_can() to check for 'promote users' capability
156
+ * @uses bbp_get_dynamic_roles() to get forum roles
157
+ * @uses bbp_get_user_role() to get a user's current forums role
158
+ * @uses bbp_set_user_role() to set the user's new forums role
159
+ * @return bool Always false
160
+ */
161
+ public function user_role_bulk_change() {
162
+
163
+ // Bail if current user cannot promote users
164
+ if ( !current_user_can( 'promote_users' ) )
165
+ return;
166
+
167
+ // Bail if no users specified
168
+ if ( empty( $_REQUEST['users'] ) )
169
+ return;
170
+
171
+ // Bail if this isn't a bbPress action
172
+ if ( empty( $_REQUEST['bbp-new-role'] ) || empty( $_REQUEST['bbp-change-role'] ) )
173
+ return;
174
+
175
+ // Check that the new role exists
176
+ $dynamic_roles = bbp_get_dynamic_roles();
177
+ if ( empty( $dynamic_roles[ $_REQUEST['bbp-new-role'] ] ) )
178
+ return;
179
+
180
+ // Get the current user ID
181
+ $current_user_id = (int) bbp_get_current_user_id();
182
+
183
+ // Run through user ids
184
+ foreach ( (array) $_REQUEST['users'] as $user_id ) {
185
+ $user_id = (int) $user_id;
186
+
187
+ // Don't let a user change their own role
188
+ if ( $user_id == $current_user_id )
189
+ continue;
190
+
191
+ // Set up user and role data
192
+ $user_role = bbp_get_user_role( $user_id );
193
+ $new_role = sanitize_text_field( $_REQUEST['bbp-new-role'] );
194
+
195
+ // Only keymasters can set other keymasters
196
+ if ( in_array( bbp_get_keymaster_role(), array( $user_role, $new_role ) ) && ! current_user_can( 'keep_gate' ) )
197
+ continue;
198
+
199
+ // Set the new forums role
200
+ if ( $new_role != $user_role ) {
201
+ bbp_set_user_role( $user_id, $new_role );
202
+ }
203
+ }
204
+ }
205
+
206
+ /**
207
+ * Add Forum Role column to the WordPress Users table, and change the
208
+ * core role title to "Site Role"
209
+ *
210
+ * @since bbPress (r4337)
211
+ *
212
+ * @param array $columns Users table columns
213
+ * @return array $columns
214
+ */
215
+ public static function user_role_column( $columns = array() ) {
216
+ $columns['role'] = __( 'Site Role', 'bbpress' );
217
+ $columns['bbp_user_role'] = __( 'Forum Role', 'bbpress' );
218
+
219
+ return $columns;
220
+ }
221
+
222
+ /**
223
+ * Return user's forums role for display in the WordPress Users list table
224
+ *
225
+ * @since bbPress (r4337)
226
+ *
227
+ * @param string $retval
228
+ * @param string $column_name
229
+ * @param int $user_id
230
+ *
231
+ * @return string Displayable bbPress user role
232
+ */
233
+ public static function user_role_row( $retval = '', $column_name = '', $user_id = 0 ) {
234
+
235
+ // Only looking for bbPress's user role column
236
+ if ( 'bbp_user_role' == $column_name ) {
237
+
238
+ // Get the users role
239
+ $user_role = bbp_get_user_role( $user_id );
240
+ $retval = false;
241
+
242
+ // Translate user role for display
243
+ if ( ! empty( $user_role ) ) {
244
+ $roles = bbp_get_dynamic_roles();
245
+ $retval = translate_user_role( $roles[$user_role]['name'] );
246
+ }
247
+ }
248
+
249
+ // Pass retval through
250
+ return $retval;
251
+ }
252
+ }
253
+ new BBP_Users_Admin();
254
+ endif; // class exists
bbp-includes/bbp-core-classes.php → includes/common/classes.php RENAMED
@@ -361,18 +361,27 @@ class BBP_Walker_Dropdown extends Walker {
361
  */
362
  public function start_el( &$output, $_post, $depth, $args ) {
363
  $pad = str_repeat( '&nbsp;', $depth * 3 );
364
- $output .= "\t<option class=\"level-$depth\"";
365
-
366
- // Disable the <option> if we're told to do so, the post type is bbp_forum and the forum is a category or is closed
367
- if ( true == $args['disable_categories'] && $_post->post_type == bbp_get_forum_post_type() && ( bbp_is_forum_category( $_post->ID ) || ( !current_user_can( 'edit_forum', $_post->ID ) && bbp_is_forum_closed( $_post->ID ) ) ) )
 
 
 
 
 
 
 
 
 
368
  $output .= ' disabled="disabled" value=""';
369
- else
370
  $output .= ' value="' . $_post->ID .'"' . selected( $args['selected'], $_post->ID, false );
 
371
 
372
  $output .= '>';
373
- $title = esc_html( $_post->post_title );
374
  $title = apply_filters( 'bbp_walker_dropdown_post_title', $_post->post_title, $output, $_post, $depth, $args );
375
- $output .= $pad . $title;
376
  $output .= "</option>\n";
377
  }
378
  }
361
  */
362
  public function start_el( &$output, $_post, $depth, $args ) {
363
  $pad = str_repeat( '&nbsp;', $depth * 3 );
364
+ $output .= '<option class="level-' . $depth . '"';
365
+
366
+ // Disable the <option> if:
367
+ // - we're told to do so
368
+ // - the post type is a forum
369
+ // - the forum is a category
370
+ // - forum is closed
371
+ if ( ( true == $args['disable_categories'] )
372
+ && ( bbp_get_forum_post_type() == $_post->post_type )
373
+ && ( bbp_is_forum_category( $_post->ID )
374
+ || ( !current_user_can( 'edit_forum', $_post->ID ) && bbp_is_forum_closed( $_post->ID )
375
+ )
376
+ ) ) {
377
  $output .= ' disabled="disabled" value=""';
378
+ } else {
379
  $output .= ' value="' . $_post->ID .'"' . selected( $args['selected'], $_post->ID, false );
380
+ }
381
 
382
  $output .= '>';
 
383
  $title = apply_filters( 'bbp_walker_dropdown_post_title', $_post->post_title, $output, $_post, $depth, $args );
384
+ $output .= $pad . esc_html( $title );
385
  $output .= "</option>\n";
386
  }
387
  }
bbp-includes/bbp-common-functions.php → includes/common/functions.php RENAMED
@@ -528,7 +528,7 @@ function bbp_get_statistics( $args = '' ) {
528
  }
529
 
530
  // Topic Tags
531
- if ( !empty( $count_tags ) ) {
532
 
533
  // Get the count
534
  $topic_tag_count = wp_count_terms( bbp_get_topic_tag_tax_id(), array( 'hide_empty' => true ) );
@@ -1047,11 +1047,14 @@ Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
1047
  if ( empty( $subject ) )
1048
  continue;
1049
 
 
 
 
1050
  // Get user data of this user
1051
  $user = get_userdata( $user_id );
1052
 
1053
  // Send notification email
1054
- wp_mail( $user->user_email, $subject, $message );
1055
  }
1056
 
1057
  do_action( 'bbp_post_notify_subscribers', $reply_id, $topic_id, $user_ids );
@@ -1404,17 +1407,20 @@ function bbp_get_global_post_field( $field = 'ID', $context = 'edit' ) {
1404
  function bbp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) {
1405
 
1406
  // Get the home URL
1407
- $home_url = strtolower( home_url() );
1408
 
1409
  // Build the currently requested URL
1410
  $scheme = is_ssl() ? 'https://' : 'http://';
1411
  $requested_url = strtolower( $scheme . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
1412
 
 
 
 
1413
  // Check the nonce
1414
  $result = isset( $_REQUEST[$query_arg] ) ? wp_verify_nonce( $_REQUEST[$query_arg], $action ) : false;
1415
 
1416
  // Nonce check failed
1417
- if ( empty( $result ) || empty( $action ) || ( strpos( $requested_url, $home_url ) !== 0 ) )
1418
  $result = false;
1419
 
1420
  // Do extra things
528
  }
529
 
530
  // Topic Tags
531
+ if ( !empty( $count_tags ) && bbp_allow_topic_tags() ) {
532
 
533
  // Get the count
534
  $topic_tag_count = wp_count_terms( bbp_get_topic_tag_tax_id(), array( 'hide_empty' => true ) );
1047
  if ( empty( $subject ) )
1048
  continue;
1049
 
1050
+ // Custom headers
1051
+ $headers = apply_filters( 'bbp_subscription_mail_headers', array() );
1052
+
1053
  // Get user data of this user
1054
  $user = get_userdata( $user_id );
1055
 
1056
  // Send notification email
1057
+ wp_mail( $user->user_email, $subject, $message, $headers );
1058
  }
1059
 
1060
  do_action( 'bbp_post_notify_subscribers', $reply_id, $topic_id, $user_ids );
1407
  function bbp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) {
1408
 
1409
  // Get the home URL
1410
+ $home_url = strtolower( home_url() );
1411
 
1412
  // Build the currently requested URL
1413
  $scheme = is_ssl() ? 'https://' : 'http://';
1414
  $requested_url = strtolower( $scheme . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
1415
 
1416
+ // Filter the requested URL, for configurations like reverse proxying
1417
+ $matched_url = apply_filters( 'bbp_verify_nonce_request_url', $requested_url );
1418
+
1419
  // Check the nonce
1420
  $result = isset( $_REQUEST[$query_arg] ) ? wp_verify_nonce( $_REQUEST[$query_arg], $action ) : false;
1421
 
1422
  // Nonce check failed
1423
+ if ( empty( $result ) || empty( $action ) || ( strpos( $matched_url, $home_url ) !== 0 ) )
1424
  $result = false;
1425
 
1426
  // Do extra things
{bbp-includes → includes/common}/index.php RENAMED
File without changes
bbp-includes/bbp-core-shortcodes.php → includes/common/shortcodes.php RENAMED
@@ -55,58 +55,35 @@ class BBP_Shortcodes {
55
 
56
  /** Forums ********************************************************/
57
 
58
- // Forum Index
59
- 'bbp-forum-index' => array( $this, 'display_forum_index' ),
60
-
61
- // Topic form
62
- 'bbp-forum-form' => array( $this, 'display_forum_form' ),
63
-
64
- // Specific forum - pass an 'id' attribute
65
- 'bbp-single-forum' => array( $this, 'display_forum' ),
66
 
67
  /** Topics ********************************************************/
68
 
69
- // Topic index
70
- 'bbp-topic-index' => array( $this, 'display_topic_index' ),
71
-
72
- // Topic form
73
- 'bbp-topic-form' => array( $this, 'display_topic_form' ),
74
-
75
- // Specific topic - pass an 'id' attribute
76
- 'bbp-single-topic' => array( $this, 'display_topic' ),
77
 
78
  /** Topic Tags ****************************************************/
79
 
80
- // All topic tags in a cloud
81
- 'bbp-topic-tags' => array( $this, 'display_topic_tags' ),
82
-
83
- // Topics of tag Tag
84
- 'bbp-single-topic-tag' => array( $this, 'display_topics_of_tag' ),
85
 
86
  /** Replies *******************************************************/
87
 
88
- // Reply form
89
- 'bbp-reply-form' => array( $this, 'display_reply_form' ),
90
-
91
- // Specific reply - pass an 'id' attribute
92
- 'bbp-single-reply' => array( $this, 'display_reply' ),
93
 
94
  /** Views *********************************************************/
95
 
96
- // Single view
97
- 'bbp-single-view' => array( $this, 'display_view' ),
98
 
99
  /** Account *******************************************************/
100
 
101
- // Login
102
- 'bbp-login' => array( $this, 'display_login' ),
103
-
104
- // Register
105
- 'bbp-register' => array( $this, 'display_register' ),
106
-
107
- // Lost Password
108
- 'bbp-lost-pass' => array( $this, 'display_lost_pass' ),
109
-
110
  ) );
111
  }
112
 
@@ -119,13 +96,9 @@ class BBP_Shortcodes {
119
  * @uses do_action()
120
  */
121
  private function add_shortcodes() {
122
-
123
- // Loop through and add the shortcodes
124
- foreach( $this->codes as $code => $function )
125
  add_shortcode( $code, $function );
126
-
127
- // Custom shortcodes
128
- do_action( 'bbp_register_shortcodes' );
129
  }
130
 
131
  /**
@@ -243,6 +216,8 @@ class BBP_Shortcodes {
243
  *
244
  * @param array $attr
245
  * @param string $content
 
 
246
  * @return string
247
  */
248
  public function display_forum( $attr, $content = '' ) {
@@ -352,7 +327,7 @@ class BBP_Shortcodes {
352
  $topic_id = bbpress()->current_topic_id = $attr['id'];
353
  $forum_id = bbp_get_topic_forum_id( $topic_id );
354
 
355
- // Bail if ID passed is not a forum
356
  if ( !bbp_is_topic( $topic_id ) )
357
  return $content;
358
 
@@ -434,7 +409,7 @@ class BBP_Shortcodes {
434
  $reply_id = bbpress()->current_reply_id = $attr['id'];
435
  $forum_id = bbp_get_reply_forum_id( $reply_id );
436
 
437
- // Bail if ID passed is not a forum
438
  if ( !bbp_is_reply( $reply_id ) )
439
  return $content;
440
 
@@ -715,7 +690,7 @@ class BBP_Shortcodes {
715
  $this->unset_globals();
716
 
717
  // Start output buffer
718
- $this->ob_start();
719
 
720
  // Output breadcrumb
721
  bbp_breadcrumb();
@@ -760,14 +735,3 @@ class BBP_Shortcodes {
760
  }
761
  }
762
  endif;
763
-
764
- /**
765
- * Register the bbPress shortcodes
766
- *
767
- * @since bbPress (r3031)
768
- *
769
- * @uses BBP_Shortcodes
770
- */
771
- function bbp_register_shortcodes() {
772
- bbpress()->shortcodes = new BBP_Shortcodes();
773
- }
55
 
56
  /** Forums ********************************************************/
57
 
58
+ 'bbp-forum-index' => array( $this, 'display_forum_index' ), // Forum Index
59
+ 'bbp-forum-form' => array( $this, 'display_forum_form' ), // Topic form
60
+ 'bbp-single-forum' => array( $this, 'display_forum' ), // Specific forum - pass an 'id' attribute
 
 
 
 
 
61
 
62
  /** Topics ********************************************************/
63
 
64
+ 'bbp-topic-index' => array( $this, 'display_topic_index' ), // Topic index
65
+ 'bbp-topic-form' => array( $this, 'display_topic_form' ), // Topic form
66
+ 'bbp-single-topic' => array( $this, 'display_topic' ), // Specific topic - pass an 'id' attribute
 
 
 
 
 
67
 
68
  /** Topic Tags ****************************************************/
69
 
70
+ 'bbp-topic-tags' => array( $this, 'display_topic_tags' ), // All topic tags in a cloud
71
+ 'bbp-single-tag' => array( $this, 'display_topics_of_tag' ), // Topics of Tag
 
 
 
72
 
73
  /** Replies *******************************************************/
74
 
75
+ 'bbp-reply-form' => array( $this, 'display_reply_form' ), // Reply form
76
+ 'bbp-single-reply' => array( $this, 'display_reply' ), // Specific reply - pass an 'id' attribute
 
 
 
77
 
78
  /** Views *********************************************************/
79
 
80
+ 'bbp-single-view' => array( $this, 'display_view' ), // Single view
 
81
 
82
  /** Account *******************************************************/
83
 
84
+ 'bbp-login' => array( $this, 'display_login' ), // Login
85
+ 'bbp-register' => array( $this, 'display_register' ), // Register
86
+ 'bbp-lost-pass' => array( $this, 'display_lost_pass' ), // Lost Password
 
 
 
 
 
 
87
  ) );
88
  }
89
 
96
  * @uses do_action()
97
  */
98
  private function add_shortcodes() {
99
+ foreach( (array) $this->codes as $code => $function ) {
 
 
100
  add_shortcode( $code, $function );
101
+ }
 
 
102
  }
103
 
104
  /**
216
  *
217
  * @param array $attr
218
  * @param string $content
219
+ * @uses get_template_part()
220
+ * @uses bbp_single_forum_description()
221
  * @return string
222
  */
223
  public function display_forum( $attr, $content = '' ) {
327
  $topic_id = bbpress()->current_topic_id = $attr['id'];
328
  $forum_id = bbp_get_topic_forum_id( $topic_id );
329
 
330
+ // Bail if ID passed is not a topic
331
  if ( !bbp_is_topic( $topic_id ) )
332
  return $content;
333
 
409
  $reply_id = bbpress()->current_reply_id = $attr['id'];
410
  $forum_id = bbp_get_reply_forum_id( $reply_id );
411
 
412
+ // Bail if ID passed is not a reply
413
  if ( !bbp_is_reply( $reply_id ) )
414
  return $content;
415
 
690
  $this->unset_globals();
691
 
692
  // Start output buffer
693
+ $this->start();
694
 
695
  // Output breadcrumb
696
  bbp_breadcrumb();
735
  }
736
  }
737
  endif;
 
 
 
 
 
 
 
 
 
 
 
bbp-includes/bbp-common-template.php → includes/common/template-tags.php RENAMED
@@ -173,6 +173,10 @@ function bbp_is_single_forum() {
173
  // Assume false
174
  $retval = false;
175
 
 
 
 
 
176
  // Single and a match
177
  if ( is_singular( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_single_forum' ) )
178
  $retval = true;
@@ -244,6 +248,10 @@ function bbp_is_single_topic() {
244
  // Assume false
245
  $retval = false;
246
 
 
 
 
 
247
  // Single and a match
248
  if ( is_singular( bbp_get_topic_post_type() ) || bbp_is_query_name( 'bbp_single_topic' ) )
249
  $retval = true;
@@ -347,6 +355,10 @@ function bbp_is_topic_split() {
347
  */
348
  function bbp_is_topic_tag() {
349
 
 
 
 
 
350
  // Return false if editing a topic tag
351
  if ( bbp_is_topic_tag_edit() )
352
  return false;
@@ -355,7 +367,7 @@ function bbp_is_topic_tag() {
355
  $retval = false;
356
 
357
  // Check tax and query vars
358
- if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( $bbp->topic_query->is_tax ) || get_query_var( 'bbp_topic_tag' ) )
359
  $retval = true;
360
 
361
  return (bool) apply_filters( 'bbp_is_topic_tag', $retval );
@@ -372,6 +384,10 @@ function bbp_is_topic_tag() {
372
  function bbp_is_topic_tag_edit() {
373
  global $wp_query, $pagenow, $taxnow;
374
 
 
 
 
 
375
  // Assume false
376
  $retval = false;
377
 
@@ -479,6 +495,10 @@ function bbp_is_single_reply() {
479
  // Assume false
480
  $retval = false;
481
 
 
 
 
 
482
  // Single and a match
483
  if ( is_singular( bbp_get_reply_post_type() ) || ( bbp_is_query_name( 'bbp_single_reply' ) ) )
484
  $retval = true;
@@ -491,12 +511,17 @@ function bbp_is_single_reply() {
491
  *
492
  * @since bbPress (r2652)
493
  *
494
- * @uses bbp_is_query_name() To get the query name
495
  * @return bool True if it's the favorites page, false if not
496
  */
497
  function bbp_is_favorites() {
 
498
 
499
- $retval = bbp_is_query_name( 'bbp_user_profile_favorites' );
 
 
 
 
 
500
 
501
  return (bool) apply_filters( 'bbp_is_favorites', $retval );
502
  }
@@ -506,12 +531,17 @@ function bbp_is_favorites() {
506
  *
507
  * @since bbPress (r2652)
508
  *
509
- * @uses bbp_is_query_name() To get the query name
510
  * @return bool True if it's the subscriptions page, false if not
511
  */
512
  function bbp_is_subscriptions() {
 
 
 
 
513
 
514
- $retval = bbp_is_query_name( 'bbp_user_profile_subscriptions' );
 
 
515
 
516
  return (bool) apply_filters( 'bbp_is_subscriptions', $retval );
517
  }
@@ -526,12 +556,40 @@ function bbp_is_subscriptions() {
526
  * @return bool True if it's the topics created page, false if not
527
  */
528
  function bbp_is_topics_created() {
 
529
 
530
- $retval = bbp_is_query_name( 'bbp_user_profile_topics_created' );
 
 
 
 
 
531
 
532
  return (bool) apply_filters( 'bbp_is_topics_created', $retval );
533
  }
534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  /**
536
  * Check if current page is the currently logged in users author page
537
  *
@@ -543,12 +601,14 @@ function bbp_is_topics_created() {
543
  * @return bool True if it's the user's home, false if not
544
  */
545
  function bbp_is_user_home() {
 
546
 
547
  // Assume false
548
  $retval = false;
549
 
550
- if ( bbp_is_single_user() && is_user_logged_in() )
551
- $retval = (bool) ( bbp_get_displayed_user_id() == bbp_get_current_user_id() );
 
552
 
553
  return (bool) apply_filters( 'bbp_is_user_home', $retval );
554
  }
@@ -568,8 +628,8 @@ function bbp_is_user_home_edit() {
568
  // Assume false
569
  $retval = false;
570
 
571
- if ( bbp_is_single_user_edit() && is_user_logged_in() )
572
- $retval = (bool) ( bbp_get_displayed_user_id() == bbp_get_current_user_id() );
573
 
574
  return (bool) apply_filters( 'bbp_is_user_home_edit', $retval );
575
  }
@@ -616,6 +676,69 @@ function bbp_is_single_user_edit() {
616
  return (bool) apply_filters( 'bbp_is_single_user_edit', $retval );
617
  }
618
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
619
  /**
620
  * Check if current page is a view page
621
  *
@@ -796,11 +919,8 @@ function bbp_body_class( $wp_classes, $custom_classes = false ) {
796
  if ( !empty( $bbp_classes ) )
797
  $bbp_classes[] = 'bbPress';
798
 
799
- // Merge WP classes with bbPress classes
800
- $classes = array_merge( (array) $bbp_classes, (array) $wp_classes );
801
-
802
- // Remove any duplicates
803
- $classes = array_unique( $classes );
804
 
805
  return apply_filters( 'bbp_get_the_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );
806
  }
@@ -1139,7 +1259,8 @@ function bbp_dropdown( $args = '' ) {
1139
  'options_only' => false,
1140
  'show_none' => false,
1141
  'none_found' => false,
1142
- 'disable_categories' => true
 
1143
  );
1144
  $r = bbp_parse_args( $args, $defaults, 'get_dropdown' );
1145
 
@@ -1190,6 +1311,7 @@ function bbp_dropdown( $args = '' ) {
1190
  $tab = (int) $tab;
1191
  $retval = '';
1192
  $posts = get_posts( $r );
 
1193
 
1194
  /** Drop Down *********************************************************/
1195
 
@@ -1197,7 +1319,7 @@ function bbp_dropdown( $args = '' ) {
1197
  if ( !empty( $posts ) ) {
1198
  if ( empty( $options_only ) ) {
1199
  $tab = !empty( $tab ) ? ' tabindex="' . $tab . '"' : '';
1200
- $retval .= '<select name="' . $name . '" id="' . $select_id . '"' . $tab . '>' . "\n";
1201
  }
1202
 
1203
  $retval .= !empty( $show_none ) ? "\t<option value=\"\" class=\"level-0\">" . $show_none . '</option>' : '';
@@ -1341,7 +1463,7 @@ function bbp_reply_form_fields() {
1341
 
1342
  if ( bbp_is_reply_edit() ) : ?>
1343
 
1344
- <input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" maxlength="<?php bbp_get_title_max_length(); ?>" />
1345
  <input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php bbp_reply_id(); ?>" />
1346
  <input type="hidden" name="action" id="bbp_post_action" value="bbp-edit-reply" />
1347
 
@@ -1352,7 +1474,7 @@ function bbp_reply_form_fields() {
1352
 
1353
  else : ?>
1354
 
1355
- <input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" maxlength="<?php bbp_get_title_max_length(); ?>" />
1356
  <input type="hidden" name="bbp_topic_id" id="bbp_topic_id" value="<?php bbp_topic_id(); ?>" />
1357
  <input type="hidden" name="action" id="bbp_post_action" value="bbp-new-reply" />
1358
 
@@ -1459,10 +1581,11 @@ function bbp_the_content( $args = array() ) {
1459
  'after' => '</div>',
1460
  'wpautop' => true,
1461
  'media_buttons' => false,
1462
- 'textarea_rows' => '6',
1463
  'tabindex' => bbp_get_tab_index(),
1464
  'editor_class' => 'bbp-the-content',
1465
  'tinymce' => true,
 
1466
  'quicktags' => true
1467
  );
1468
  $r = bbp_parse_args( $args, $defaults, 'get_the_content' );
@@ -1484,22 +1607,26 @@ function bbp_the_content( $args = array() ) {
1484
 
1485
  // Use TinyMCE if available
1486
  if ( bbp_use_wp_editor() ) :
1487
-
1488
- $settings = array(
1489
  'wpautop' => $wpautop,
1490
  'media_buttons' => $media_buttons,
1491
  'textarea_rows' => $textarea_rows,
1492
  'tabindex' => $tabindex,
1493
  'editor_class' => $editor_class,
1494
  'tinymce' => $tinymce,
 
1495
  'quicktags' => $quicktags
1496
- );
1497
- wp_editor( htmlspecialchars_decode( $post_content, ENT_QUOTES ), 'bbp_' . $context . '_content', $settings );
1498
-
1499
- // Fallback to normal textarea
 
 
 
 
1500
  else : ?>
1501
 
1502
- <textarea id="bbp_<?php echo $context; ?>_content" class="<?php echo $editor_class; ?>" name="bbp_<?php echo $context; ?>_content" cols="60" rows="<?php echo $textarea_rows; ?>" tabindex="<?php echo $tabindex; ?>"><?php echo $post_content; ?></textarea>
1503
 
1504
  <?php endif;
1505
 
@@ -1844,8 +1971,16 @@ function bbp_breadcrumb( $args = array() ) {
1844
  // HTML
1845
  'before' => '<div class="bbp-breadcrumb"><p>',
1846
  'after' => '</p></div>',
 
 
1847
  'sep' => __( '&rsaquo;', 'bbpress' ),
1848
  'pad_sep' => 1,
 
 
 
 
 
 
1849
 
1850
  // Home
1851
  'include_home' => $pre_include_home,
@@ -1857,7 +1992,9 @@ function bbp_breadcrumb( $args = array() ) {
1857
 
1858
  // Current
1859
  'include_current' => $pre_include_current,
1860
- 'current_text' => $pre_current_text
 
 
1861
  );
1862
  $r = bbp_parse_args( $args, $defaults, 'get_breadcrumb' );
1863
  extract( $r );
@@ -1866,7 +2003,7 @@ function bbp_breadcrumb( $args = array() ) {
1866
 
1867
  // Get post ancestors
1868
  if ( is_page() || is_single() || bbp_is_forum_edit() || bbp_is_topic_edit() || bbp_is_reply_edit() )
1869
- $ancestors = array_reverse( get_post_ancestors( get_the_ID() ) );
1870
 
1871
  // Do we want to include a link to home?
1872
  if ( !empty( $include_home ) || empty( $home_text ) )
@@ -1932,13 +2069,13 @@ function bbp_breadcrumb( $args = array() ) {
1932
 
1933
  // Add current page to breadcrumb
1934
  if ( !empty( $include_current ) || empty( $pre_current_text ) )
1935
- $crumbs[] = '<span class="bbp-breadcrumb-current">' . $current_text . '</span>';
1936
 
1937
  /** Separator *********************************************************/
1938
 
1939
- // Wrap the separator in a span before padding and filter
1940
- if ( !empty( $sep ) )
1941
- $sep = '<span class="bbp-breadcrumb-separator">' . $sep . '</span>';
1942
 
1943
  // Pad the separator
1944
  if ( !empty( $pad_sep ) )
@@ -1951,7 +2088,7 @@ function bbp_breadcrumb( $args = array() ) {
1951
  $crumbs = apply_filters( 'bbp_breadcrumbs', $crumbs );
1952
 
1953
  // Build the trail
1954
- $trail = !empty( $crumbs ) ? ( $before . implode( $sep, $crumbs ) . $after ) : '';
1955
 
1956
  return apply_filters( 'bbp_get_breadcrumb', $trail, $crumbs, $r );
1957
  }
@@ -2195,8 +2332,7 @@ function bbp_title( $title = '', $sep = '&raquo;', $seplocation = '' ) {
2195
 
2196
  // sep on right, so reverse the order
2197
  if ( 'right' == $seplocation ) {
2198
- $title_array = explode( $t_sep, $title );
2199
- $title_array = array_reverse( $title_array );
2200
  $title = implode( " $sep ", $title_array ) . $prefix;
2201
 
2202
  // sep on left, do not reverse
173
  // Assume false
174
  $retval = false;
175
 
176
+ // Edit is not a single forum
177
+ if ( bbp_is_forum_edit() )
178
+ return false;
179
+
180
  // Single and a match
181
  if ( is_singular( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_single_forum' ) )
182
  $retval = true;
248
  // Assume false
249
  $retval = false;
250
 
251
+ // Edit is not a single topic
252
+ if ( bbp_is_topic_edit() )
253
+ return false;
254
+
255
  // Single and a match
256
  if ( is_singular( bbp_get_topic_post_type() ) || bbp_is_query_name( 'bbp_single_topic' ) )
257
  $retval = true;
355
  */
356
  function bbp_is_topic_tag() {
357
 
358
+ // Bail if topic-tags are off
359
+ if ( ! bbp_allow_topic_tags() )
360
+ return false;
361
+
362
  // Return false if editing a topic tag
363
  if ( bbp_is_topic_tag_edit() )
364
  return false;
367
  $retval = false;
368
 
369
  // Check tax and query vars
370
+ if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( bbpress()->topic_query->is_tax ) || get_query_var( 'bbp_topic_tag' ) )
371
  $retval = true;
372
 
373
  return (bool) apply_filters( 'bbp_is_topic_tag', $retval );
384
  function bbp_is_topic_tag_edit() {
385
  global $wp_query, $pagenow, $taxnow;
386
 
387
+ // Bail if topic-tags are off
388
+ if ( ! bbp_allow_topic_tags() )
389
+ return false;
390
+
391
  // Assume false
392
  $retval = false;
393
 
495
  // Assume false
496
  $retval = false;
497
 
498
+ // Edit is not a single reply
499
+ if ( bbp_is_reply_edit() )
500
+ return false;
501
+
502
  // Single and a match
503
  if ( is_singular( bbp_get_reply_post_type() ) || ( bbp_is_query_name( 'bbp_single_reply' ) ) )
504
  $retval = true;
511
  *
512
  * @since bbPress (r2652)
513
  *
 
514
  * @return bool True if it's the favorites page, false if not
515
  */
516
  function bbp_is_favorites() {
517
+ global $wp_query;
518
 
519
+ // Assume false
520
+ $retval = false;
521
+
522
+ // Check query
523
+ if ( !empty( $wp_query->bbp_is_single_user_favs ) && ( true == $wp_query->bbp_is_single_user_favs ) )
524
+ $retval = true;
525
 
526
  return (bool) apply_filters( 'bbp_is_favorites', $retval );
527
  }
531
  *
532
  * @since bbPress (r2652)
533
  *
 
534
  * @return bool True if it's the subscriptions page, false if not
535
  */
536
  function bbp_is_subscriptions() {
537
+ global $wp_query;
538
+
539
+ // Assume false
540
+ $retval = false;
541
 
542
+ // Check query
543
+ if ( !empty( $wp_query->bbp_is_single_user_subs ) && ( true == $wp_query->bbp_is_single_user_subs ) )
544
+ $retval = true;
545
 
546
  return (bool) apply_filters( 'bbp_is_subscriptions', $retval );
547
  }
556
  * @return bool True if it's the topics created page, false if not
557
  */
558
  function bbp_is_topics_created() {
559
+ global $wp_query;
560
 
561
+ // Assume false
562
+ $retval = false;
563
+
564
+ // Check query
565
+ if ( !empty( $wp_query->bbp_is_single_user_topics ) && ( true == $wp_query->bbp_is_single_user_topics ) )
566
+ $retval = true;
567
 
568
  return (bool) apply_filters( 'bbp_is_topics_created', $retval );
569
  }
570
 
571
+ /**
572
+ * Check if current page shows the topics created by a bbPress user (profile
573
+ * page)
574
+ *
575
+ * @since bbPress (r4225)
576
+ *
577
+ * @uses bbp_is_query_name() To get the query name
578
+ * @return bool True if it's the topics created page, false if not
579
+ */
580
+ function bbp_is_replies_created() {
581
+ global $wp_query;
582
+
583
+ // Assume false
584
+ $retval = false;
585
+
586
+ // Check query
587
+ if ( !empty( $wp_query->bbp_is_single_user_replies ) && ( true == $wp_query->bbp_is_single_user_replies ) )
588
+ $retval = true;
589
+
590
+ return (bool) apply_filters( 'bbp_is_replies_created', $retval );
591
+ }
592
+
593
  /**
594
  * Check if current page is the currently logged in users author page
595
  *
601
  * @return bool True if it's the user's home, false if not
602
  */
603
  function bbp_is_user_home() {
604
+ global $wp_query;
605
 
606
  // Assume false
607
  $retval = false;
608
 
609
+ // Check query
610
+ if ( !empty( $wp_query->bbp_is_single_user_home ) && ( true == $wp_query->bbp_is_single_user_home ) )
611
+ $retval = true;
612
 
613
  return (bool) apply_filters( 'bbp_is_user_home', $retval );
614
  }
628
  // Assume false
629
  $retval = false;
630
 
631
+ if ( bbp_is_user_home() && bbp_is_single_user_edit() )
632
+ $retval = true;
633
 
634
  return (bool) apply_filters( 'bbp_is_user_home_edit', $retval );
635
  }
676
  return (bool) apply_filters( 'bbp_is_single_user_edit', $retval );
677
  }
678
 
679
+ /**
680
+ * Check if current page is a user profile page
681
+ *
682
+ * @since bbPress (r4225)
683
+ *
684
+ * @uses WP_Query Checks if WP_Query::bbp_is_single_user_profile is set to true
685
+ * @return bool True if it's a user's profile page, false if not
686
+ */
687
+ function bbp_is_single_user_profile() {
688
+ global $wp_query;
689
+
690
+ // Assume false
691
+ $retval = false;
692
+
693
+ // Check query
694
+ if ( !empty( $wp_query->bbp_is_single_user_profile ) && ( true == $wp_query->bbp_is_single_user_profile ) )
695
+ $retval = true;
696
+
697
+ return (bool) apply_filters( 'bbp_is_single_user_profile', $retval );
698
+ }
699
+
700
+ /**
701
+ * Check if current page is a user topics created page
702
+ *
703
+ * @since bbPress (r4225)
704
+ *
705
+ * @uses WP_Query Checks if WP_Query::bbp_is_single_user_topics is set to true
706
+ * @return bool True if it's a user's topics page, false if not
707
+ */
708
+ function bbp_is_single_user_topics() {
709
+ global $wp_query;
710
+
711
+ // Assume false
712
+ $retval = false;
713
+
714
+ // Check query
715
+ if ( !empty( $wp_query->bbp_is_single_user_topics ) && ( true == $wp_query->bbp_is_single_user_topics ) )
716
+ $retval = true;
717
+
718
+ return (bool) apply_filters( 'bbp_is_single_user_topics', $retval );
719
+ }
720
+
721
+ /**
722
+ * Check if current page is a user replies created page
723
+ *
724
+ * @since bbPress (r4225)
725
+ *
726
+ * @uses WP_Query Checks if WP_Query::bbp_is_single_user_replies is set to true
727
+ * @return bool True if it's a user's replies page, false if not
728
+ */
729
+ function bbp_is_single_user_replies() {
730
+ global $wp_query;
731
+
732
+ // Assume false
733
+ $retval = false;
734
+
735
+ // Check query
736
+ if ( !empty( $wp_query->bbp_is_single_user_replies ) && ( true == $wp_query->bbp_is_single_user_replies ) )
737
+ $retval = true;
738
+
739
+ return (bool) apply_filters( 'bbp_is_single_user_replies', $retval );
740
+ }
741
+
742
  /**
743
  * Check if current page is a view page
744
  *
919
  if ( !empty( $bbp_classes ) )
920
  $bbp_classes[] = 'bbPress';
921
 
922
+ // Merge WP classes with bbPress classes and remove any duplicates
923
+ $classes = array_unique( array_merge( (array) $bbp_classes, (array) $wp_classes ) );
 
 
 
924
 
925
  return apply_filters( 'bbp_get_the_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );
926
  }
1259
  'options_only' => false,
1260
  'show_none' => false,
1261
  'none_found' => false,
1262
+ 'disable_categories' => true,
1263
+ 'disabled' => ''
1264
  );
1265
  $r = bbp_parse_args( $args, $defaults, 'get_dropdown' );
1266
 
1311
  $tab = (int) $tab;
1312
  $retval = '';
1313
  $posts = get_posts( $r );
1314
+ $disabled = disabled( isset( bbpress()->options[$disabled] ), true, false );
1315
 
1316
  /** Drop Down *********************************************************/
1317
 
1319
  if ( !empty( $posts ) ) {
1320
  if ( empty( $options_only ) ) {
1321
  $tab = !empty( $tab ) ? ' tabindex="' . $tab . '"' : '';
1322
+ $retval .= '<select name="' . $name . '" id="' . $select_id . '"' . $tab . $disabled . '>' . "\n";
1323
  }
1324
 
1325
  $retval .= !empty( $show_none ) ? "\t<option value=\"\" class=\"level-0\">" . $show_none . '</option>' : '';
1463
 
1464
  if ( bbp_is_reply_edit() ) : ?>
1465
 
1466
+ <input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" />
1467
  <input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php bbp_reply_id(); ?>" />
1468
  <input type="hidden" name="action" id="bbp_post_action" value="bbp-edit-reply" />
1469
 
1474
 
1475
  else : ?>
1476
 
1477
+ <input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" />
1478
  <input type="hidden" name="bbp_topic_id" id="bbp_topic_id" value="<?php bbp_topic_id(); ?>" />
1479
  <input type="hidden" name="action" id="bbp_post_action" value="bbp-new-reply" />
1480
 
1581
  'after' => '</div>',
1582
  'wpautop' => true,
1583
  'media_buttons' => false,
1584
+ 'textarea_rows' => '12',
1585
  'tabindex' => bbp_get_tab_index(),
1586
  'editor_class' => 'bbp-the-content',
1587
  'tinymce' => true,
1588
+ 'teeny' => true,
1589
  'quicktags' => true
1590
  );
1591
  $r = bbp_parse_args( $args, $defaults, 'get_the_content' );
1607
 
1608
  // Use TinyMCE if available
1609
  if ( bbp_use_wp_editor() ) :
1610
+ wp_editor( htmlspecialchars_decode( $post_content, ENT_QUOTES ), 'bbp_' . $context . '_content', array(
 
1611
  'wpautop' => $wpautop,
1612
  'media_buttons' => $media_buttons,
1613
  'textarea_rows' => $textarea_rows,
1614
  'tabindex' => $tabindex,
1615
  'editor_class' => $editor_class,
1616
  'tinymce' => $tinymce,
1617
+ 'teeny' => $teeny,
1618
  'quicktags' => $quicktags
1619
+ ) );
1620
+
1621
+ /**
1622
+ * Fallback to normal textarea.
1623
+ *
1624
+ * Note that we do not use esc_textarea() here to prevent double
1625
+ * escaping the editable output, mucking up existing content.
1626
+ */
1627
  else : ?>
1628
 
1629
+ <textarea id="bbp_<?php echo esc_attr( $context ); ?>_content" class="<?php echo esc_attr( $editor_class ); ?>" name="bbp_<?php echo esc_attr( $context ); ?>_content" cols="60" rows="<?php echo esc_attr( $textarea_rows ); ?>" tabindex="<?php echo esc_attr( $tabindex ); ?>"><?php echo $post_content; ?></textarea>
1630
 
1631
  <?php endif;
1632
 
1971
  // HTML
1972
  'before' => '<div class="bbp-breadcrumb"><p>',
1973
  'after' => '</p></div>',
1974
+
1975
+ // Separator
1976
  'sep' => __( '&rsaquo;', 'bbpress' ),
1977
  'pad_sep' => 1,
1978
+ 'sep_before' => '<span class="bbp-breadcrumb-sep">',
1979
+ 'sep_after' => '</span>',
1980
+
1981
+ // Crumbs
1982
+ 'crumb_before' => '',
1983
+ 'crumb_after' => '',
1984
 
1985
  // Home
1986
  'include_home' => $pre_include_home,
1992
 
1993
  // Current
1994
  'include_current' => $pre_include_current,
1995
+ 'current_text' => $pre_current_text,
1996
+ 'current_before' => '<span class="bbp-breadcrumb-current">',
1997
+ 'current_after' => '</span>',
1998
  );
1999
  $r = bbp_parse_args( $args, $defaults, 'get_breadcrumb' );
2000
  extract( $r );
2003
 
2004
  // Get post ancestors
2005
  if ( is_page() || is_single() || bbp_is_forum_edit() || bbp_is_topic_edit() || bbp_is_reply_edit() )
2006
+ $ancestors = array_reverse( (array) get_post_ancestors( get_the_ID() ) );
2007
 
2008
  // Do we want to include a link to home?
2009
  if ( !empty( $include_home ) || empty( $home_text ) )
2069
 
2070
  // Add current page to breadcrumb
2071
  if ( !empty( $include_current ) || empty( $pre_current_text ) )
2072
+ $crumbs[] = $current_before . $current_text . $current_after;
2073
 
2074
  /** Separator *********************************************************/
2075
 
2076
+ // Wrap the separator in before/after before padding and filter
2077
+ if ( ! empty( $sep ) )
2078
+ $sep = $sep_before . $sep . $sep_after;
2079
 
2080
  // Pad the separator
2081
  if ( !empty( $pad_sep ) )
2088
  $crumbs = apply_filters( 'bbp_breadcrumbs', $crumbs );
2089
 
2090
  // Build the trail
2091
+ $trail = !empty( $crumbs ) ? ( $before . $crumb_before . implode( $sep . $crumb_after . $crumb_before , $crumbs ) . $crumb_after . $after ) : '';
2092
 
2093
  return apply_filters( 'bbp_get_breadcrumb', $trail, $crumbs, $r );
2094
  }
2332
 
2333
  // sep on right, so reverse the order
2334
  if ( 'right' == $seplocation ) {
2335
+ $title_array = array_reverse( explode( $t_sep, $title ) );
 
2336
  $title = implode( " $sep ", $title_array ) . $prefix;
2337
 
2338
  // sep on left, do not reverse
bbp-includes/bbp-core-widgets.php → includes/common/widgets.php RENAMED
@@ -49,7 +49,7 @@ class BBP_Login_Widget extends WP_Widget {
49
  *
50
  * @uses register_widget()
51
  */
52
- public function register_widget() {
53
  register_widget( 'BBP_Login_Widget' );
54
  }
55
 
@@ -112,13 +112,13 @@ class BBP_Login_Widget extends WP_Widget {
112
 
113
  <?php if ( !empty( $register ) ) : ?>
114
 
115
- <a href="<?php echo esc_url( $register ); ?>" title="<?php _e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php _e( 'Register', 'bbpress' ); ?></a>
116
 
117
  <?php endif; ?>
118
 
119
  <?php if ( !empty( $lostpass ) ) : ?>
120
 
121
- <a href="<?php echo esc_url( $lostpass ); ?>" title="<?php _e( 'Lost Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php _e( 'Lost Password', 'bbpress' ); ?></a>
122
 
123
  <?php endif; ?>
124
 
@@ -234,7 +234,7 @@ class BBP_Views_Widget extends WP_Widget {
234
  *
235
  * @uses register_widget()
236
  */
237
- public function register_widget() {
238
  register_widget( 'BBP_Views_Widget' );
239
  }
240
 
@@ -351,7 +351,7 @@ class BBP_Forums_Widget extends WP_Widget {
351
  *
352
  * @uses register_widget()
353
  */
354
- public function register_widget() {
355
  register_widget( 'BBP_Forums_Widget' );
356
  }
357
 
@@ -503,7 +503,7 @@ class BBP_Topics_Widget extends WP_Widget {
503
  *
504
  * @uses register_widget()
505
  */
506
- public function register_widget() {
507
  register_widget( 'BBP_Topics_Widget' );
508
  }
509
 
@@ -520,7 +520,6 @@ class BBP_Topics_Widget extends WP_Widget {
520
  * @uses bbp_get_topic_last_active_time() To get the topic last active
521
  * time
522
  * @uses bbp_get_topic_id() To get the topic id
523
- * @uses bbp_get_topic_reply_count() To get the topic reply count
524
  */
525
  public function widget( $args, $instance ) {
526
 
@@ -529,6 +528,7 @@ class BBP_Topics_Widget extends WP_Widget {
529
  $title = apply_filters( 'bbp_topic_widget_title', $instance['title'] );
530
  $max_shown = !empty( $instance['max_shown'] ) ? (int) $instance['max_shown'] : 5;
531
  $show_date = !empty( $instance['show_date'] ) ? 'on' : false;
 
532
  $parent_forum = !empty( $instance['parent_forum'] ) ? $instance['parent_forum'] : 'any';
533
  $order_by = !empty( $instance['order_by'] ) ? $instance['order_by'] : false;
534
 
@@ -598,11 +598,18 @@ class BBP_Topics_Widget extends WP_Widget {
598
  <?php while ( $widget_query->have_posts() ) :
599
 
600
  $widget_query->the_post();
601
- $topic_id = bbp_get_topic_id( $widget_query->post->ID ); ?>
 
602
 
603
  <li>
604
  <a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>" title="<?php bbp_topic_title( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a>
605
 
 
 
 
 
 
 
606
  <?php if ( 'on' == $show_date ) : ?>
607
 
608
  <div><?php bbp_topic_last_active_time( $topic_id ); ?></div>
@@ -624,7 +631,7 @@ class BBP_Topics_Widget extends WP_Widget {
624
  }
625
 
626
  /**
627
- * Update the forum widget options
628
  *
629
  * @since bbPress (r2653)
630
  *
@@ -636,6 +643,7 @@ class BBP_Topics_Widget extends WP_Widget {
636
  $instance['title'] = strip_tags( $new_instance['title'] );
637
  $instance['max_shown'] = strip_tags( $new_instance['max_shown'] );
638
  $instance['show_date'] = strip_tags( $new_instance['show_date'] );
 
639
  $instance['order_by'] = strip_tags( $new_instance['order_by'] );
640
 
641
  return $instance;
@@ -654,11 +662,14 @@ class BBP_Topics_Widget extends WP_Widget {
654
  $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
655
  $max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
656
  $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
 
657
  $order_by = !empty( $instance['order_by'] ) ? esc_attr( $instance['order_by'] ) : ''; ?>
658
 
659
  <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
660
  <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum topics to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo $max_shown; ?>" /></label></p>
661
  <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $show_date ); ?> /></label></p>
 
 
662
  <p>
663
  <label for="<?php echo $this->get_field_id( 'order_by' ); ?>"><?php _e( 'Order By:', 'bbpress' ); ?></label>
664
  <select name="<?php echo $this->get_field_name( 'order_by' ); ?>" id="<?php echo $this->get_field_name( 'order_by' ); ?>">
@@ -709,7 +720,7 @@ class BBP_Replies_Widget extends WP_Widget {
709
  *
710
  * @uses register_widget()
711
  */
712
- public function register_widget() {
713
  register_widget( 'BBP_Replies_Widget' );
714
  }
715
 
@@ -735,8 +746,9 @@ class BBP_Replies_Widget extends WP_Widget {
735
  extract( $args );
736
 
737
  $title = apply_filters( 'bbp_replies_widget_title', $instance['title'] );
738
- $max_shown = !empty( $instance['max_shown'] ) ? $instance['max_shown'] : '5';
739
- $show_date = !empty( $instance['show_date'] ) ? 'on' : false;
 
740
  $post_types = !empty( $instance['post_type'] ) ? array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) : bbp_get_reply_post_type();
741
 
742
  // Note: private and hidden forums will be excluded via the
@@ -759,18 +771,38 @@ class BBP_Replies_Widget extends WP_Widget {
759
  <?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
760
 
761
  <li>
 
762
  <?php
763
 
764
  $reply_id = bbp_get_reply_id( $widget_query->post->ID );
765
  $author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) );
766
  $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . bbp_get_reply_excerpt( $reply_id, 50 ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a>';
767
 
768
- /* translators: bbpress replies widget: 1: reply author, 2: reply link, 3: reply date, 4: reply time */
769
- if ( $show_date == 'on' ) {
770
- printf( _x( '%1$s on %2$s %3$s, %4$s', 'widgets', 'bbpress' ), $author_link, $reply_link, '<div>' . get_the_date(), get_the_time() . '</div>' );
771
- } else {
772
- printf( _x( '%1$s on %2$s', 'widgets', 'bbpress' ), $author_link, $reply_link );
773
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
774
 
775
  ?>
776
 
@@ -789,7 +821,7 @@ class BBP_Replies_Widget extends WP_Widget {
789
  }
790
 
791
  /**
792
- * Update the forum widget options
793
  *
794
  * @since bbPress (r2653)
795
  *
@@ -801,6 +833,7 @@ class BBP_Replies_Widget extends WP_Widget {
801
  $instance['title'] = strip_tags( $new_instance['title'] );
802
  $instance['max_shown'] = strip_tags( $new_instance['max_shown'] );
803
  $instance['show_date'] = strip_tags( $new_instance['show_date'] );
 
804
 
805
  return $instance;
806
  }
@@ -817,11 +850,13 @@ class BBP_Replies_Widget extends WP_Widget {
817
  public function form( $instance ) {
818
  $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
819
  $max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
820
- $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : ''; ?>
 
821
 
822
  <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
823
  <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum replies to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo $max_shown; ?>" /></label></p>
824
  <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $show_date ); ?> /></label></p>
 
825
 
826
  <?php
827
  }
49
  *
50
  * @uses register_widget()
51
  */
52
+ public static function register_widget() {
53
  register_widget( 'BBP_Login_Widget' );
54
  }
55
 
112
 
113
  <?php if ( !empty( $register ) ) : ?>
114
 
115
+ <a href="<?php echo esc_url( $register ); ?>" title="<?php esc_attr_e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php _e( 'Register', 'bbpress' ); ?></a>
116
 
117
  <?php endif; ?>
118
 
119
  <?php if ( !empty( $lostpass ) ) : ?>
120
 
121
+ <a href="<?php echo esc_url( $lostpass ); ?>" title="<?php esc_attr_e( 'Lost Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php _e( 'Lost Password', 'bbpress' ); ?></a>
122
 
123
  <?php endif; ?>
124
 
234
  *
235
  * @uses register_widget()
236
  */
237
+ public static function register_widget() {
238
  register_widget( 'BBP_Views_Widget' );
239
  }
240
 
351
  *
352
  * @uses register_widget()
353
  */
354
+ public static function register_widget() {
355
  register_widget( 'BBP_Forums_Widget' );
356
  }
357
 
503
  *
504
  * @uses register_widget()
505
  */
506
+ public static function register_widget() {
507
  register_widget( 'BBP_Topics_Widget' );
508
  }
509
 
520
  * @uses bbp_get_topic_last_active_time() To get the topic last active
521
  * time
522
  * @uses bbp_get_topic_id() To get the topic id
 
523
  */
524
  public function widget( $args, $instance ) {
525
 
528
  $title = apply_filters( 'bbp_topic_widget_title', $instance['title'] );
529
  $max_shown = !empty( $instance['max_shown'] ) ? (int) $instance['max_shown'] : 5;
530
  $show_date = !empty( $instance['show_date'] ) ? 'on' : false;
531
+ $show_user = !empty( $instance['show_user'] ) ? 'on' : false;
532
  $parent_forum = !empty( $instance['parent_forum'] ) ? $instance['parent_forum'] : 'any';
533
  $order_by = !empty( $instance['order_by'] ) ? $instance['order_by'] : false;
534
 
598
  <?php while ( $widget_query->have_posts() ) :
599
 
600
  $widget_query->the_post();
601
+ $topic_id = bbp_get_topic_id( $widget_query->post->ID );
602
+ $author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) ); ?>
603
 
604
  <li>
605
  <a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>" title="<?php bbp_topic_title( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a>
606
 
607
+ <?php if ( 'on' == $show_user ) : ?>
608
+
609
+ <?php printf( _x( 'by %1$s', 'widgets', 'bbpress' ), '<span class="topic-author">' . $author_link . '</span>' ); ?>
610
+
611
+ <?php endif; ?>
612
+
613
  <?php if ( 'on' == $show_date ) : ?>
614
 
615
  <div><?php bbp_topic_last_active_time( $topic_id ); ?></div>
631
  }
632
 
633
  /**
634
+ * Update the topic widget options
635
  *
636
  * @since bbPress (r2653)
637
  *
643
  $instance['title'] = strip_tags( $new_instance['title'] );
644
  $instance['max_shown'] = strip_tags( $new_instance['max_shown'] );
645
  $instance['show_date'] = strip_tags( $new_instance['show_date'] );
646
+ $instance['show_user'] = strip_tags( $new_instance['show_user'] );
647
  $instance['order_by'] = strip_tags( $new_instance['order_by'] );
648
 
649
  return $instance;
662
  $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
663
  $max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
664
  $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
665
+ $show_user = !empty( $instance['show_user'] ) ? esc_attr( $instance['show_user'] ) : '';
666
  $order_by = !empty( $instance['order_by'] ) ? esc_attr( $instance['order_by'] ) : ''; ?>
667
 
668
  <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
669
  <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum topics to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo $max_shown; ?>" /></label></p>
670
  <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $show_date ); ?> /></label></p>
671
+ <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show topic author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( 'on', $show_user ); ?> /></label></p>
672
+
673
  <p>
674
  <label for="<?php echo $this->get_field_id( 'order_by' ); ?>"><?php _e( 'Order By:', 'bbpress' ); ?></label>
675
  <select name="<?php echo $this->get_field_name( 'order_by' ); ?>" id="<?php echo $this->get_field_name( 'order_by' ); ?>">
720
  *
721
  * @uses register_widget()
722
  */
723
+ public static function register_widget() {
724
  register_widget( 'BBP_Replies_Widget' );
725
  }
726
 
746
  extract( $args );
747
 
748
  $title = apply_filters( 'bbp_replies_widget_title', $instance['title'] );
749
+ $max_shown = !empty( $instance['max_shown'] ) ? $instance['max_shown'] : '5';
750
+ $show_date = !empty( $instance['show_date'] ) ? 'on' : false;
751
+ $show_user = !empty( $instance['show_user'] ) ? 'on' : false;
752
  $post_types = !empty( $instance['post_type'] ) ? array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) : bbp_get_reply_post_type();
753
 
754
  // Note: private and hidden forums will be excluded via the
771
  <?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
772
 
773
  <li>
774
+
775
  <?php
776
 
777
  $reply_id = bbp_get_reply_id( $widget_query->post->ID );
778
  $author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) );
779
  $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . bbp_get_reply_excerpt( $reply_id, 50 ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a>';
780
 
781
+ // Reply author, link, and timestamp
782
+ if ( ( 'on' == $show_date ) && ( 'on' == $show_user ) ) :
783
+
784
+ // translators: 1: reply author, 2: reply link, 3: reply timestamp
785
+ printf( _x( '%1$s on %2$s %3$s', 'widgets', 'bbpress' ), $author_link, $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
786
+
787
+ // Reply link and timestamp
788
+ elseif ( $show_date == 'on' ) :
789
+
790
+ // translators: 1: reply link, 2: reply timestamp
791
+ printf( _x( '%1$s %2$s', 'widgets', 'bbpress' ), $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
792
+
793
+ // Reply author and title
794
+ elseif ( $show_user == 'on' ) :
795
+
796
+ // translators: 1: reply author, 2: reply link
797
+ printf( _x( '%1$s on %2$s', 'widgets', 'bbpress' ), $author_link, $reply_link );
798
+
799
+ // Only the reply title
800
+ else :
801
+
802
+ // translators: 1: reply link
803
+ printf( _x( '%1$s', 'widgets', 'bbpress' ), $reply_link );
804
+
805
+ endif;
806
 
807
  ?>
808
 
821
  }
822
 
823
  /**
824
+ * Update the reply widget options
825
  *
826
  * @since bbPress (r2653)
827
  *
833
  $instance['title'] = strip_tags( $new_instance['title'] );
834
  $instance['max_shown'] = strip_tags( $new_instance['max_shown'] );
835
  $instance['show_date'] = strip_tags( $new_instance['show_date'] );
836
+ $instance['show_user'] = strip_tags( $new_instance['show_user'] );
837
 
838
  return $instance;
839
  }
850
  public function form( $instance ) {
851
  $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
852
  $max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
853
+ $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
854
+ $show_user = !empty( $instance['show_user'] ) ? esc_attr( $instance['show_user'] ) : ''; ?>
855
 
856
  <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
857
  <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum replies to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo $max_shown; ?>" /></label></p>
858
  <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $show_date ); ?> /></label></p>
859
+ <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show reply author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( 'on', $show_user ); ?> /></label></p>
860
 
861
  <?php
862
  }
bbp-includes/bbp-core-actions.php → includes/core/actions.php RENAMED
@@ -13,12 +13,9 @@
13
  * There are a few common places that additional actions can currently be found
14
  *
15
  * - bbPress: In {@link bbPress::setup_actions()} in bbpress.php
16
- * - Component: In {@link BBP_Component::setup_actions()} in
17
- * bbp-includes/bbp-classes.php
18
- * - Admin: More in {@link BBP_Admin::setup_actions()} in
19
- * bbp-admin/bbp-admin.php
20
- *
21
- * @see bbp-core-filters.php
22
  */
23
 
24
  // Exit if accessed directly
@@ -38,21 +35,23 @@ if ( !defined( 'ABSPATH' ) ) exit;
38
  * For more information on how this works, see the 'Plugin Dependency' section
39
  * near the bottom of this file.
40
  *
41
- * v--WordPress Actions v--bbPress Sub-actions
42
- */
43
- add_action( 'plugins_loaded', 'bbp_loaded', 10 );
44
- add_action( 'init', 'bbp_init', 10 );
45
- add_action( 'widgets_init', 'bbp_widgets_init', 10 );
46
- add_action( 'parse_query', 'bbp_parse_query', 2 ); // Early for overrides
47
- add_action( 'generate_rewrite_rules', 'bbp_generate_rewrite_rules', 10 );
48
- add_action( 'wp_enqueue_scripts', 'bbp_enqueue_scripts', 10 );
49
- add_action( 'wp_head', 'bbp_head', 10 );
50
- add_action( 'wp_footer', 'bbp_footer', 10 );
51
- add_action( 'set_current_user', 'bbp_setup_current_user', 10 );
52
- add_action( 'setup_theme', 'bbp_setup_theme', 10 );
53
- add_action( 'after_setup_theme', 'bbp_after_setup_theme', 10 );
54
- add_action( 'template_redirect', 'bbp_template_redirect', 10 );
55
- add_action( 'login_form_login', 'bbp_login_form_login', 10 );
 
 
56
 
57
  /**
58
  * bbp_loaded - Attached to 'plugins_loaded' above
@@ -67,24 +66,57 @@ add_action( 'bbp_loaded', 'bbp_includes', 6 );
67
  add_action( 'bbp_loaded', 'bbp_setup_globals', 8 );
68
  add_action( 'bbp_loaded', 'bbp_setup_option_filters', 10 );
69
  add_action( 'bbp_loaded', 'bbp_setup_user_option_filters', 12 );
70
- add_action( 'bbp_loaded', 'bbp_register_theme_directory', 14 );
71
- add_action( 'bbp_loaded', 'bbp_register_theme_packages', 16 );
72
- add_action( 'bbp_loaded', 'bbp_load_textdomain', 18 );
73
 
74
  /**
75
  * bbp_init - Attached to 'init' above
76
  *
77
  * Attach various initialization actions to the init action.
78
  * The load order helps to execute code at the correct time.
79
- * v---Load order
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  */
81
- add_action( 'bbp_init', 'bbp_register_post_types', 10 );
82
- add_action( 'bbp_init', 'bbp_register_post_statuses', 12 );
83
- add_action( 'bbp_init', 'bbp_register_taxonomies', 14 );
84
- add_action( 'bbp_init', 'bbp_register_views', 16 );
85
- add_action( 'bbp_init', 'bbp_register_shortcodes', 18 );
86
- add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20 );
87
- add_action( 'bbp_init', 'bbp_ready', 999 );
88
 
89
  // Autoembeds
90
  add_action( 'bbp_init', 'bbp_reply_content_autoembed', 8 );
@@ -103,9 +135,6 @@ add_action( 'bp_include', 'bbp_setup_buddypress', 10 ); // Social network integr
103
  // Try to load the bbpress-functions.php file from the active themes
104
  add_action( 'bbp_after_setup_theme', 'bbp_load_theme_functions', 10 );
105
 
106
- // Multisite Global Forum Access
107
- add_action( 'bbp_setup_current_user', 'bbp_global_access_role_mask', 10 );
108
-
109
  // Widgets
110
  add_action( 'bbp_widgets_init', array( 'BBP_Login_Widget', 'register_widget' ), 10 );
111
  add_action( 'bbp_widgets_init', array( 'BBP_Views_Widget', 'register_widget' ), 10 );
@@ -212,12 +241,15 @@ add_action( 'bbp_spammed_reply', 'bbp_update_reply_walker' );
212
  add_action( 'bbp_unspammed_reply', 'bbp_update_reply_walker' );
213
 
214
  // User status
 
215
  add_action( 'make_ham_user', 'bbp_make_ham_user' );
216
  add_action( 'make_spam_user', 'bbp_make_spam_user' );
217
 
218
  // User role
219
- add_action( 'bbp_new_topic', 'bbp_global_access_auto_role' );
220
- add_action( 'bbp_new_reply', 'bbp_global_access_auto_role' );
 
 
221
 
222
  // Caches
223
  add_action( 'bbp_new_forum_pre_extras', 'bbp_clean_post_cache' );
@@ -231,9 +263,10 @@ add_action( 'bbp_new_reply_post_extras', 'bbp_clean_post_cache' );
231
  * bbPress needs to redirect the user around in a few different circumstances:
232
  *
233
  * 1. Form submission within a theme (new and edit)
234
- * 2. Accessing private or hidden forums
235
  * 3. Editing forums, topics, replies, users, and tags
236
  */
 
237
  add_action( 'bbp_template_redirect', 'bbp_forum_enforce_hidden', -1 );
238
  add_action( 'bbp_template_redirect', 'bbp_forum_enforce_private', -1 );
239
  add_action( 'bbp_template_redirect', 'bbp_new_forum_handler', 10 );
@@ -259,304 +292,4 @@ add_action( 'bbp_template_redirect', 'bbp_check_topic_tag_edit', 10 );
259
  // Maybe convert the users password
260
  add_action( 'bbp_login_form_login', 'bbp_user_maybe_convert_pass' );
261
 
262
- /**
263
- * Requires and creates the BuddyPress extension, and adds component creation
264
- * action to bp_init hook. @see bbp_setup_buddypress_component()
265
- *
266
- * @since bbPress (r3395)
267
- * @return If BuddyPress is not active
268
- */
269
- function bbp_setup_buddypress() {
270
- global $bp;
271
-
272
- // Bail if no BuddyPress
273
- if ( !empty( $bp->maintenance_mode ) || !defined( 'BP_VERSION' ) ) return;
274
-
275
- // Include the BuddyPress Component
276
- require( bbpress()->plugin_dir . 'bbp-includes/bbp-extend-buddypress.php' );
277
-
278
- // Instantiate BuddyPress for bbPress
279
- bbpress()->extend->buddypress = new BBP_BuddyPress();
280
-
281
- // Add component setup to bp_init action
282
- add_action( 'bp_init', 'bbp_setup_buddypress_component' );
283
- }
284
-
285
- /**
286
- * Plugin Dependency
287
- *
288
- * The purpose of the following actions is to mimic the behavior of something
289
- * called 'plugin dependency' which enables a plugin to have plugins of their
290
- * own in a safe and reliable way.
291
- *
292
- * We do this in bbPress by mirroring existing WordPress actions in many places
293
- * allowing dependant plugins to hook into the bbPress specific ones, thus
294
- * guaranteeing proper code execution only when bbPress is active.
295
- *
296
- * The following functions are wrappers for their actions, allowing them to be
297
- * manually called and/or piggy-backed on top of other actions if needed.
298
- */
299
-
300
- /** Activation Actions ********************************************************/
301
-
302
- /**
303
- * Runs on bbPress activation
304
- *
305
- * @since bbPress (r2509)
306
- * @uses register_uninstall_hook() To register our own uninstall hook
307
- * @uses do_action() Calls 'bbp_activation' hook
308
- */
309
- function bbp_activation() {
310
- do_action( 'bbp_activation' );
311
- }
312
-
313
- /**
314
- * Runs on bbPress deactivation
315
- *
316
- * @since bbPress (r2509)
317
- * @uses do_action() Calls 'bbp_deactivation' hook
318
- */
319
- function bbp_deactivation() {
320
- do_action( 'bbp_deactivation' );
321
- }
322
-
323
- /**
324
- * Runs when uninstalling bbPress
325
- *
326
- * @since bbPress (r2509)
327
- * @uses do_action() Calls 'bbp_uninstall' hook
328
- */
329
- function bbp_uninstall() {
330
- do_action( 'bbp_uninstall' );
331
- }
332
-
333
- /** Main Actions **************************************************************/
334
-
335
- /**
336
- * Main action responsible for constants, globals, and includes
337
- *
338
- * @since bbPress (r2599)
339
- * @uses do_action() Calls 'bbp_loaded'
340
- */
341
- function bbp_loaded() {
342
- do_action( 'bbp_loaded' );
343
- }
344
-
345
- /**
346
- * Setup constants
347
- *
348
- * @since bbPress (r2599)
349
- * @uses do_action() Calls 'bbp_constants'
350
- */
351
- function bbp_constants() {
352
- do_action( 'bbp_constants' );
353
- }
354
-
355
- /**
356
- * Setup globals BEFORE includes
357
- *
358
- * @since bbPress (r2599)
359
- * @uses do_action() Calls 'bbp_boot_strap_globals'
360
- */
361
- function bbp_boot_strap_globals() {
362
- do_action( 'bbp_boot_strap_globals' );
363
- }
364
-
365
- /**
366
- * Include files
367
- *
368
- * @since bbPress (r2599)
369
- * @uses do_action() Calls 'bbp_includes'
370
- */
371
- function bbp_includes() {
372
- do_action( 'bbp_includes' );
373
- }
374
-
375
- /**
376
- * Setup globals AFTER includes
377
- *
378
- * @since bbPress (r2599)
379
- * @uses do_action() Calls 'bbp_setup_globals'
380
- */
381
- function bbp_setup_globals() {
382
- do_action( 'bbp_setup_globals' );
383
- }
384
-
385
- /**
386
- * Initialize any code after everything has been loaded
387
- *
388
- * @since bbPress (r2599)
389
- * @uses do_action() Calls 'bbp_init'
390
- */
391
- function bbp_init() {
392
- do_action ( 'bbp_init' );
393
- }
394
-
395
- /**
396
- * Initialize widgets
397
- *
398
- * @since bbPress (r3389)
399
- * @uses do_action() Calls 'bbp_widgets_init'
400
- */
401
- function bbp_widgets_init() {
402
- do_action ( 'bbp_widgets_init' );
403
- }
404
-
405
- /**
406
- * Setup the currently logged-in user
407
- *
408
- * @since bbPress (r2695)
409
- * @uses do_action() Calls 'bbp_setup_current_user'
410
- */
411
- function bbp_setup_current_user() {
412
- do_action ( 'bbp_setup_current_user' );
413
- }
414
-
415
- /** Supplemental Actions ******************************************************/
416
-
417
- /**
418
- * Load translations for current language
419
- *
420
- * @since bbPress (r2599)
421
- * @uses do_action() Calls 'bbp_load_textdomain'
422
- */
423
- function bbp_load_textdomain() {
424
- do_action( 'bbp_load_textdomain' );
425
- }
426
-
427
- /**
428
- * Sets up the theme directory
429
- *
430
- * @since bbPress (r2507)
431
- * @uses do_action() Calls 'bbp_register_theme_directory'
432
- */
433
- function bbp_register_theme_directory() {
434
- do_action( 'bbp_register_theme_directory' );
435
- }
436
-
437
- /**
438
- * Setup the post types
439
- *
440
- * @since bbPress (r2464)
441
- * @uses do_action() Calls 'bbp_register_post_type'
442
- */
443
- function bbp_register_post_types() {
444
- do_action ( 'bbp_register_post_types' );
445
- }
446
-
447
- /**
448
- * Setup the post statuses
449
- *
450
- * @since bbPress (r2727)
451
- * @uses do_action() Calls 'bbp_register_post_statuses'
452
- */
453
- function bbp_register_post_statuses() {
454
- do_action ( 'bbp_register_post_statuses' );
455
- }
456
-
457
- /**
458
- * Register the built in bbPress taxonomies
459
- *
460
- * @since bbPress (r2464)
461
- * @uses do_action() Calls 'bbp_register_taxonomies'
462
- */
463
- function bbp_register_taxonomies() {
464
- do_action ( 'bbp_register_taxonomies' );
465
- }
466
-
467
- /**
468
- * Register the default bbPress views
469
- *
470
- * @since bbPress (r2789)
471
- * @uses do_action() Calls 'bbp_register_views'
472
- */
473
- function bbp_register_views() {
474
- do_action ( 'bbp_register_views' );
475
- }
476
-
477
- /**
478
- * Enqueue bbPress specific CSS and JS
479
- *
480
- * @since bbPress (r3373)
481
- * @uses do_action() Calls 'bbp_enqueue_scripts'
482
- */
483
- function bbp_enqueue_scripts() {
484
- do_action ( 'bbp_enqueue_scripts' );
485
- }
486
-
487
- /**
488
- * Add the bbPress-specific rewrite tags
489
- *
490
- * @since bbPress (r2753)
491
- * @uses do_action() Calls 'bbp_add_rewrite_tags'
492
- */
493
- function bbp_add_rewrite_tags() {
494
- do_action ( 'bbp_add_rewrite_tags' );
495
- }
496
-
497
- /**
498
- * Add the bbPress-specific login forum action
499
- *
500
- * @since bbPress (r2753)
501
- * @uses do_action() Calls 'bbp_login_form_login'
502
- */
503
- function bbp_login_form_login() {
504
- do_action ( 'bbp_login_form_login' );
505
- }
506
-
507
- /** Final Action **************************************************************/
508
-
509
- /**
510
- * bbPress has loaded and initialized everything, and is okay to go
511
- *
512
- * @since bbPress (r2618)
513
- * @uses do_action() Calls 'bbp_ready'
514
- */
515
- function bbp_ready() {
516
- do_action( 'bbp_ready' );
517
- }
518
-
519
- /** Theme Permissions *********************************************************/
520
-
521
- /**
522
- * The main action used for redirecting bbPress theme actions that are not
523
- * permitted by the current_user
524
- *
525
- * @since bbPress (r3605)
526
- * @uses do_action()
527
- */
528
- function bbp_template_redirect() {
529
- do_action( 'bbp_template_redirect' );
530
- }
531
-
532
- /** Theme Helpers *************************************************************/
533
-
534
- /**
535
- * The main action used for executing code before the theme has been setup
536
- *
537
- * @since bbPress (r3829)
538
- * @uses do_action()
539
- */
540
- function bbp_register_theme_packages() {
541
- do_action( 'bbp_register_theme_packages' );
542
- }
543
-
544
- /**
545
- * The main action used for executing code before the theme has been setup
546
- *
547
- * @since bbPress (r3732)
548
- * @uses do_action()
549
- */
550
- function bbp_setup_theme() {
551
- do_action( 'bbp_setup_theme' );
552
- }
553
-
554
- /**
555
- * The main action used for executing code after the theme has been setup
556
- *
557
- * @since bbPress (r3732)
558
- * @uses do_action()
559
- */
560
- function bbp_after_setup_theme() {
561
- do_action( 'bbp_after_setup_theme' );
562
- }
13
  * There are a few common places that additional actions can currently be found
14
  *
15
  * - bbPress: In {@link bbPress::setup_actions()} in bbpress.php
16
+ * - Admin: More in {@link BBP_Admin::setup_actions()} in admin.php
17
+ *
18
+ * @see /core/filters.php
 
 
 
19
  */
20
 
21
  // Exit if accessed directly
35
  * For more information on how this works, see the 'Plugin Dependency' section
36
  * near the bottom of this file.
37
  *
38
+ * v--WordPress Actions v--bbPress Sub-actions
39
+ */
40
+ add_action( 'plugins_loaded', 'bbp_loaded', 10 );
41
+ add_action( 'init', 'bbp_init', 0 ); // Early for bbp_register
42
+ add_action( 'parse_query', 'bbp_parse_query', 2 ); // Early for overrides
43
+ add_action( 'widgets_init', 'bbp_widgets_init', 10 );
44
+ add_action( 'generate_rewrite_rules', 'bbp_generate_rewrite_rules', 10 );
45
+ add_action( 'wp_enqueue_scripts', 'bbp_enqueue_scripts', 10 );
46
+ add_action( 'wp_head', 'bbp_head', 10 );
47
+ add_action( 'wp_footer', 'bbp_footer', 10 );
48
+ add_action( 'set_current_user', 'bbp_setup_current_user', 10 );
49
+ add_action( 'setup_theme', 'bbp_setup_theme', 10 );
50
+ add_action( 'after_setup_theme', 'bbp_after_setup_theme', 10 );
51
+ add_action( 'template_redirect', 'bbp_template_redirect', 10 );
52
+ add_action( 'login_form_login', 'bbp_login_form_login', 10 );
53
+ add_action( 'profile_update', 'bbp_profile_update', 10, 2 ); // user_id and old_user_data
54
+ add_action( 'user_register', 'bbp_user_register', 10 );
55
 
56
  /**
57
  * bbp_loaded - Attached to 'plugins_loaded' above
66
  add_action( 'bbp_loaded', 'bbp_setup_globals', 8 );
67
  add_action( 'bbp_loaded', 'bbp_setup_option_filters', 10 );
68
  add_action( 'bbp_loaded', 'bbp_setup_user_option_filters', 12 );
69
+ add_action( 'bbp_loaded', 'bbp_register_theme_packages', 14 );
70
+ add_action( 'bbp_loaded', 'bbp_filter_user_roles_option', 16 );
 
71
 
72
  /**
73
  * bbp_init - Attached to 'init' above
74
  *
75
  * Attach various initialization actions to the init action.
76
  * The load order helps to execute code at the correct time.
77
+ * v---Load order
78
+ */
79
+ add_action( 'bbp_init', 'bbp_register', 0 );
80
+ add_action( 'bbp_init', 'bbp_load_textdomain', 10 );
81
+ add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20 );
82
+ add_action( 'bbp_init', 'bbp_ready', 999 );
83
+
84
+ /**
85
+ * There is no action API for roles to use, so hook in immediately after the
86
+ * $wp_roles global is set, which is the 'setup_theme' action.
87
+ *
88
+ * This is kind of lame, but is all we have for now.
89
+ */
90
+ add_action( 'bbp_setup_theme', 'bbp_add_forums_roles', 1 );
91
+
92
+ /**
93
+ * When switching to a new blog, a users mapped role will get wiped out by
94
+ * WP_User::for_blog() and WP_User::_init_caps().
95
+ *
96
+ * This happens naturally in multisite setups during WP_Admin_Bar::initialize(),
97
+ * which is annoying because it will happen on each page-load.
98
+ *
99
+ * Resetting the role on blog-switch enables us to maintain the user's dynamic
100
+ * role between sites. Note that if a user already has a role on that site, no
101
+ * mapping will occur.
102
+ *
103
+ * We also hook to 'bbp_setup_current_user' -- naturally.
104
+ */
105
+ add_action( 'switch_blog', 'bbp_set_current_user_default_role' );
106
+ add_action( 'bbp_setup_current_user', 'bbp_set_current_user_default_role' );
107
+
108
+ /**
109
+ * bbp_register - Attached to 'init' above on 0 priority
110
+ *
111
+ * Attach various initialization actions early to the init action.
112
+ * The load order helps to execute code at the correct time.
113
+ * v---Load order
114
  */
115
+ add_action( 'bbp_register', 'bbp_register_post_types', 2 );
116
+ add_action( 'bbp_register', 'bbp_register_post_statuses', 4 );
117
+ add_action( 'bbp_register', 'bbp_register_taxonomies', 6 );
118
+ add_action( 'bbp_register', 'bbp_register_views', 8 );
119
+ add_action( 'bbp_register', 'bbp_register_shortcodes', 10 );
 
 
120
 
121
  // Autoembeds
122
  add_action( 'bbp_init', 'bbp_reply_content_autoembed', 8 );
135
  // Try to load the bbpress-functions.php file from the active themes
136
  add_action( 'bbp_after_setup_theme', 'bbp_load_theme_functions', 10 );
137
 
 
 
 
138
  // Widgets
139
  add_action( 'bbp_widgets_init', array( 'BBP_Login_Widget', 'register_widget' ), 10 );
140
  add_action( 'bbp_widgets_init', array( 'BBP_Views_Widget', 'register_widget' ), 10 );
241
  add_action( 'bbp_unspammed_reply', 'bbp_update_reply_walker' );
242
 
243
  // User status
244
+ // @todo make these sub-actions
245
  add_action( 'make_ham_user', 'bbp_make_ham_user' );
246
  add_action( 'make_spam_user', 'bbp_make_spam_user' );
247
 
248
  // User role
249
+ add_action( 'bbp_profile_update', 'bbp_profile_update_role' );
250
+
251
+ // Hook WordPress admin actions to bbPress profiles on save
252
+ add_action( 'bbp_user_edit_after', 'bbp_user_edit_after' );
253
 
254
  // Caches
255
  add_action( 'bbp_new_forum_pre_extras', 'bbp_clean_post_cache' );
263
  * bbPress needs to redirect the user around in a few different circumstances:
264
  *
265
  * 1. Form submission within a theme (new and edit)
266
+ * 2. Accessing private or hidden content (forums/topics/replies)
267
  * 3. Editing forums, topics, replies, users, and tags
268
  */
269
+ add_action( 'bbp_template_redirect', 'bbp_forum_enforce_blocked', -1 );
270
  add_action( 'bbp_template_redirect', 'bbp_forum_enforce_hidden', -1 );
271
  add_action( 'bbp_template_redirect', 'bbp_forum_enforce_private', -1 );
272
  add_action( 'bbp_template_redirect', 'bbp_new_forum_handler', 10 );
292
  // Maybe convert the users password
293
  add_action( 'bbp_login_form_login', 'bbp_user_maybe_convert_pass' );
294
 
295
+ add_action( 'bbp_activation', 'bbp_add_activation_redirect' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbp-includes/bbp-core-cache.php → includes/core/cache.php RENAMED
@@ -129,36 +129,40 @@ new BBP_Skip_Children();
129
  * @since bbPress (r4040)
130
  *
131
  * @uses do_action() Calls 'bbp_clean_post_cache' on $id
132
- * @param object|int $post The post object or ID to remove from the cache
133
  */
134
- function bbp_clean_post_cache( $post ) {
135
- global $wpdb;
136
 
137
  // Bail if no post
138
- $post = get_post( $post );
139
- if ( empty( $post ) )
140
  return;
141
 
142
- wp_cache_delete( $post->ID, 'posts' );
143
- wp_cache_delete( $post->ID, 'post_meta' );
144
 
145
- clean_object_term_cache( $post->ID, $post->post_type );
146
 
147
- do_action( 'bbp_clean_post_cache', $post->ID, $post );
148
 
149
  // Child query types to clean
150
- $post_types = array( bbp_get_topic_post_type(), bbp_get_forum_post_type(), bbp_get_reply_post_type() );
 
 
 
 
151
 
152
  // Loop through query types and clean caches
153
  foreach ( $post_types as $post_type ) {
154
- wp_cache_delete( 'bbp_get_forum_' . $post->ID . '_reply_id', 'bbpress' );
155
- wp_cache_delete( 'bbp_parent_' . $post->ID . '_type_' . $post_type . '_child_last_id', 'bbpress' );
156
- wp_cache_delete( 'bbp_parent_' . $post->ID . '_type_' . $post_type . '_child_count', 'bbpress' );
157
- wp_cache_delete( 'bbp_parent_public_' . $post->ID . '_type_' . $post_type . '_child_ids', 'bbpress' );
158
- wp_cache_delete( 'bbp_parent_all_' . $post->ID . '_type_' . $post_type . '_child_ids', 'bbpress' );
159
  }
160
 
161
  // Invalidate parent caches
162
- if ( $parent = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_type FROM $wpdb->posts WHERE ID = %d", $post->post_parent ) ) )
163
- bbp_clean_post_cache( $parent );
 
164
  }
129
  * @since bbPress (r4040)
130
  *
131
  * @uses do_action() Calls 'bbp_clean_post_cache' on $id
132
+ * @param object|int $_post The post object or ID to remove from the cache
133
  */
134
+ function bbp_clean_post_cache( $_post = '' ) {
 
135
 
136
  // Bail if no post
137
+ $_post = get_post( $_post );
138
+ if ( empty( $_post ) )
139
  return;
140
 
141
+ wp_cache_delete( $_post->ID, 'posts' );
142
+ wp_cache_delete( $_post->ID, 'post_meta' );
143
 
144
+ clean_object_term_cache( $_post->ID, $_post->post_type );
145
 
146
+ do_action( 'bbp_clean_post_cache', $_post->ID, $_post );
147
 
148
  // Child query types to clean
149
+ $post_types = array(
150
+ bbp_get_topic_post_type(),
151
+ bbp_get_forum_post_type(),
152
+ bbp_get_reply_post_type()
153
+ );
154
 
155
  // Loop through query types and clean caches
156
  foreach ( $post_types as $post_type ) {
157
+ wp_cache_delete( 'bbp_get_forum_' . $_post->ID . '_reply_id', 'bbpress' );
158
+ wp_cache_delete( 'bbp_parent_' . $_post->ID . '_type_' . $post_type . '_child_last_id', 'bbpress' );
159
+ wp_cache_delete( 'bbp_parent_' . $_post->ID . '_type_' . $post_type . '_child_count', 'bbpress' );
160
+ wp_cache_delete( 'bbp_parent_public_' . $_post->ID . '_type_' . $post_type . '_child_ids', 'bbpress' );
161
+ wp_cache_delete( 'bbp_parent_all_' . $_post->ID . '_type_' . $post_type . '_child_ids', 'bbpress' );
162
  }
163
 
164
  // Invalidate parent caches
165
+ if ( ! empty( $_post->post_parent ) ) {
166
+ bbp_clean_post_cache( $_post->post_parent );
167
+ }
168
  }
includes/core/capabilities.php ADDED
@@ -0,0 +1,564 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress Capabilites
5
+ *
6
+ * The functions in this file are used primarily as convenient wrappers for
7
+ * capability output in user profiles. This includes mapping capabilities and
8
+ * groups to human readable strings,
9
+ *
10
+ * @package bbPress
11
+ * @subpackage Capabilities
12
+ */
13
+
14
+ // Exit if accessed directly
15
+ if ( !defined( 'ABSPATH' ) ) exit;
16
+
17
+ /** Mapping *******************************************************************/
18
+
19
+ /**
20
+ * Returns an array of capabilities based on the role that is being requested.
21
+ *
22
+ * @since bbPress (r2994)
23
+ *
24
+ * @todo Map all of these and deprecate
25
+ *
26
+ * @param string $role Optional. Defaults to The role to load caps for
27
+ * @uses apply_filters() Allow return value to be filtered
28
+ *
29
+ * @return array Capabilities for $role
30
+ */
31
+ function bbp_get_caps_for_role( $role = '' ) {
32
+
33
+ // Which role are we looking for?
34
+ switch ( $role ) {
35
+
36
+ // Keymaster
37
+ case bbp_get_keymaster_role() :
38
+ $caps = array(
39
+
40
+ // Keymasters only
41
+ 'keep_gate' => true,
42
+
43
+ // Primary caps
44
+ 'spectate' => true,
45
+ 'participate' => true,
46
+ 'moderate' => true,
47
+ 'throttle' => true,
48
+ 'view_trash' => true,
49
+
50
+ // Forum caps
51
+ 'publish_forums' => true,
52
+ 'edit_forums' => true,
53
+ 'edit_others_forums' => true,
54
+ 'delete_forums' => true,
55
+ 'delete_others_forums' => true,
56
+ 'read_private_forums' => true,
57
+ 'read_hidden_forums' => true,
58
+
59
+ // Topic caps
60
+ 'publish_topics' => true,
61
+ 'edit_topics' => true,
62
+ 'edit_others_topics' => true,
63
+ 'delete_topics' => true,
64
+ 'delete_others_topics' => true,
65
+ 'read_private_topics' => true,
66
+
67
+ // Reply caps
68
+ 'publish_replies' => true,
69
+ 'edit_replies' => true,
70
+ 'edit_others_replies' => true,
71
+ 'delete_replies' => true,
72
+ 'delete_others_replies' => true,
73
+ 'read_private_replies' => true,
74
+
75
+ // Topic tag caps
76
+ 'manage_topic_tags' => true,
77
+ 'edit_topic_tags' => true,
78
+ 'delete_topic_tags' => true,
79
+ 'assign_topic_tags' => true
80
+ );
81
+
82
+ break;
83
+
84
+ // Moderator
85
+ case bbp_get_moderator_role() :
86
+ $caps = array(
87
+
88
+ // Primary caps
89
+ 'spectate' => true,
90
+ 'participate' => true,
91
+ 'moderate' => true,
92
+ 'throttle' => true,
93
+ 'view_trash' => false,
94
+
95
+ // Forum caps
96
+ 'publish_forums' => true,
97
+ 'edit_forums' => true,
98
+ 'edit_others_forums' => false,
99
+ 'delete_forums' => false,
100
+ 'delete_others_forums' => false,
101
+ 'read_private_forums' => true,
102
+ 'read_hidden_forums' => false,
103
+
104
+ // Topic caps
105
+ 'publish_topics' => true,
106
+ 'edit_topics' => true,
107
+ 'edit_others_topics' => true,
108
+ 'delete_topics' => true,
109
+ 'delete_others_topics' => true,
110
+ 'read_private_topics' => true,
111
+
112
+ // Reply caps
113
+ 'publish_replies' => true,
114
+ 'edit_replies' => true,
115
+ 'edit_others_replies' => true,
116
+ 'delete_replies' => true,
117
+ 'delete_others_replies' => true,
118
+ 'read_private_replies' => true,
119
+
120
+ // Topic tag caps
121
+ 'manage_topic_tags' => true,
122
+ 'edit_topic_tags' => true,
123
+ 'delete_topic_tags' => true,
124
+ 'assign_topic_tags' => true,
125
+ );
126
+
127
+ break;
128
+
129
+ // Spectators can only read
130
+ case bbp_get_spectator_role() :
131
+ $caps = array(
132
+
133
+ // Primary caps
134
+ 'spectate' => true,
135
+ 'participate' => false,
136
+ 'moderate' => false,
137
+ 'throttle' => false,
138
+ 'view_trash' => false,
139
+
140
+ // Forum caps
141
+ 'publish_forums' => false,
142
+ 'edit_forums' => false,
143
+ 'edit_others_forums' => false,
144
+ 'delete_forums' => false,
145
+ 'delete_others_forums' => false,
146
+ 'read_private_forums' => false,
147
+ 'read_hidden_forums' => false,
148
+
149
+ // Topic caps
150
+ 'publish_topics' => false,
151
+ 'edit_topics' => false,
152
+ 'edit_others_topics' => false,
153
+ 'delete_topics' => false,
154
+ 'delete_others_topics' => false,
155
+ 'read_private_topics' => false,
156
+
157
+ // Reply caps
158
+ 'publish_replies' => false,
159
+ 'edit_replies' => false,
160
+ 'edit_others_replies' => false,
161
+ 'delete_replies' => false,
162
+ 'delete_others_replies' => false,
163
+ 'read_private_replies' => false,
164
+
165
+ // Topic tag caps
166
+ 'manage_topic_tags' => false,
167
+ 'edit_topic_tags' => false,
168
+ 'delete_topic_tags' => false,
169
+ 'assign_topic_tags' => false,
170
+ );
171
+
172
+ break;
173
+
174
+ // Explicitly blocked
175
+ case bbp_get_blocked_role() :
176
+ $caps = array(
177
+
178
+ // Primary caps
179
+ 'spectate' => false,
180
+ 'participate' => false,
181
+ 'moderate' => false,
182
+ 'throttle' => false,
183
+ 'view_trash' => false,
184
+
185
+ // Forum caps
186
+ 'publish_forums' => false,
187
+ 'edit_forums' => false,
188
+ 'edit_others_forums' => false,
189
+ 'delete_forums' => false,
190
+ 'delete_others_forums' => false,
191
+ 'read_private_forums' => false,
192
+ 'read_hidden_forums' => false,
193
+
194
+ // Topic caps
195
+ 'publish_topics' => false,
196
+ 'edit_topics' => false,
197
+ 'edit_others_topics' => false,
198
+ 'delete_topics' => false,
199
+ 'delete_others_topics' => false,
200
+ 'read_private_topics' => false,
201
+
202
+ // Reply caps
203
+ 'publish_replies' => false,
204
+ 'edit_replies' => false,
205
+ 'edit_others_replies' => false,
206
+ 'delete_replies' => false,
207
+ 'delete_others_replies' => false,
208
+ 'read_private_replies' => false,
209
+
210
+ // Topic tag caps
211
+ 'manage_topic_tags' => false,
212
+ 'edit_topic_tags' => false,
213
+ 'delete_topic_tags' => false,
214
+ 'assign_topic_tags' => false,
215
+ );
216
+
217
+ break;
218
+
219
+ // Participant/Default
220
+ case bbp_get_visitor_role() :
221
+ case bbp_get_participant_role() :
222
+ default :
223
+ $caps = array(
224
+
225
+ // Primary caps
226
+ 'spectate' => true,
227
+ 'participate' => true,
228
+ 'moderate' => false,
229
+ 'throttle' => false,
230
+ 'view_trash' => false,
231
+
232
+ // Forum caps
233
+ 'publish_forums' => false,
234
+ 'edit_forums' => false,
235
+ 'edit_others_forums' => false,
236
+ 'delete_forums' => false,
237
+ 'delete_others_forums' => false,
238
+ 'read_private_forums' => true,
239
+ 'read_hidden_forums' => false,
240
+
241
+ // Topic caps
242
+ 'publish_topics' => true,
243
+ 'edit_topics' => true,
244
+ 'edit_others_topics' => false,
245
+ 'delete_topics' => false,
246
+ 'delete_others_topics' => false,
247
+ 'read_private_topics' => false,
248
+
249
+ // Reply caps
250
+ 'publish_replies' => true,
251
+ 'edit_replies' => true,
252
+ 'edit_others_replies' => false,
253
+ 'delete_replies' => false,
254
+ 'delete_others_replies' => false,
255
+ 'read_private_replies' => false,
256
+
257
+ // Topic tag caps
258
+ 'manage_topic_tags' => false,
259
+ 'edit_topic_tags' => false,
260
+ 'delete_topic_tags' => false,
261
+ 'assign_topic_tags' => true,
262
+ );
263
+
264
+ break;
265
+ }
266
+
267
+ return apply_filters( 'bbp_get_caps_for_role', $caps, $role );
268
+ }
269
+
270
+ /**
271
+ * Adds capabilities to WordPress user roles.
272
+ *
273
+ * @since bbPress (r2608)
274
+ */
275
+ function bbp_add_caps() {
276
+
277
+ // Loop through available roles and add caps
278
+ foreach( bbp_get_wp_roles()->role_objects as $role ) {
279
+ foreach ( bbp_get_caps_for_role( $role->name ) as $cap => $value ) {
280
+ $role->add_cap( $cap, $value );
281
+ }
282
+ }
283
+
284
+ do_action( 'bbp_add_caps' );
285
+ }
286
+
287
+ /**
288
+ * Removes capabilities from WordPress user roles.
289
+ *
290
+ * @since bbPress (r2608)
291
+ */
292
+ function bbp_remove_caps() {
293
+
294
+ // Loop through available roles and remove caps
295
+ foreach( bbp_get_wp_roles()->role_objects as $role ) {
296
+ foreach ( array_keys( bbp_get_caps_for_role( $role->name ) ) as $cap ) {
297
+ $role->remove_cap( $cap );
298
+ }
299
+ }
300
+
301
+ do_action( 'bbp_remove_caps' );
302
+ }
303
+
304
+ /**
305
+ * Get the $wp_roles global without needing to declare it everywhere
306
+ *
307
+ * @since bbPress (r4293)
308
+ *
309
+ * @global WP_Roles $wp_roles
310
+ * @return WP_Roles
311
+ */
312
+ function bbp_get_wp_roles() {
313
+ global $wp_roles;
314
+
315
+ // Load roles if not set
316
+ if ( ! isset( $wp_roles ) )
317
+ $wp_roles = new WP_Roles();
318
+
319
+ return $wp_roles;
320
+ }
321
+
322
+ /** Forum Roles ***************************************************************/
323
+
324
+ /**
325
+ * Add the bbPress roles to the $wp_roles global.
326
+ *
327
+ * We do this to avoid adding these values to the database.
328
+ *
329
+ * @since bbPress (r4290)
330
+ */
331
+ function bbp_add_forums_roles() {
332
+ $wp_roles = bbp_get_wp_roles();
333
+
334
+ foreach( bbp_get_dynamic_roles() as $role_id => $details ) {
335
+ $wp_roles->roles[$role_id] = $details;
336
+ $wp_roles->role_objects[$role_id] = new WP_Role( $details['name'], $details['capabilities'] );
337
+ $wp_roles->role_names[$role_id] = $details['name'];
338
+ }
339
+ }
340
+
341
+ /**
342
+ * Helper function to add filter to option_wp_user_roles
343
+ *
344
+ * @since bbPress (r4363)
345
+ *
346
+ * @see _bbp_reinit_dynamic_roles()
347
+ *
348
+ * @global WPDB $wpdb Used to get the database prefix
349
+ */
350
+ function bbp_filter_user_roles_option() {
351
+ global $wpdb;
352
+
353
+ $role_key = $wpdb->prefix . 'user_roles';
354
+
355
+ add_filter( 'option_' . $role_key, '_bbp_reinit_dynamic_roles' );
356
+ }
357
+
358
+ /**
359
+ * This is necessary because in a few places (noted below) WordPress initializes
360
+ * a blog's roles directly from the database option. When this happens, the
361
+ * $wp_roles global gets flushed, causing a user to magically lose any
362
+ * dynamically assigned roles or capabilities when $current_user in refreshed.
363
+ *
364
+ * Because dynamic multiple roles is a new concept in WordPress, we work around
365
+ * it here for now, knowing that improvements will come to WordPress core later.
366
+ *
367
+ * @see switch_to_blog()
368
+ * @see restore_current_blog()
369
+ * @see WP_Roles::_init()
370
+ *
371
+ * @since bbPress (r4363)
372
+ *
373
+ * @internal Used by bbPress to reinitialize dynamic roles on blog switch
374
+ *
375
+ * @param array $roles
376
+ * @return array Combined array of database roles and dynamic bbPress roles
377
+ */
378
+ function _bbp_reinit_dynamic_roles( $roles = array() ) {
379
+ foreach( bbp_get_dynamic_roles() as $role_id => $details ) {
380
+ $roles[$role_id] = $details;
381
+ }
382
+ return $roles;
383
+ }
384
+
385
+ /**
386
+ * Fetch a filtered list of forum roles that the current user is
387
+ * allowed to have.
388
+ *
389
+ * Simple function who's main purpose is to allow filtering of the
390
+ * list of forum roles so that plugins can remove inappropriate ones depending
391
+ * on the situation or user making edits.
392
+ *
393
+ * Specifically because without filtering, anyone with the edit_users
394
+ * capability can edit others to be administrators, even if they are
395
+ * only editors or authors. This filter allows admins to delegate
396
+ * user management.
397
+ *
398
+ * @since bbPress (r4284)
399
+ *
400
+ * @return array
401
+ */
402
+ function bbp_get_dynamic_roles() {
403
+ return (array) apply_filters( 'bbp_get_dynamic_roles', array(
404
+
405
+ // Keymaster
406
+ bbp_get_keymaster_role() => array(
407
+ 'name' => __( 'Keymaster', 'bbpress' ),
408
+ 'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
409
+ ),
410
+
411
+ // Moderator
412
+ bbp_get_moderator_role() => array(
413
+ 'name' => __( 'Moderator', 'bbpress' ),
414
+ 'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
415
+ ),
416
+
417
+ // Participant
418
+ bbp_get_participant_role() => array(
419
+ 'name' => __( 'Participant', 'bbpress' ),
420
+ 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
421
+ ),
422
+
423
+ // Spectator
424
+ bbp_get_spectator_role() => array(
425
+ 'name' => __( 'Spectator', 'bbpress' ),
426
+ 'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
427
+ ),
428
+
429
+ // Visitor
430
+ bbp_get_visitor_role() => array(
431
+ 'name' => __( 'Visitor', 'bbpress' ),
432
+ 'capabilities' => bbp_get_caps_for_role( bbp_get_visitor_role() )
433
+ ),
434
+
435
+ // Blocked
436
+ bbp_get_blocked_role() => array(
437
+ 'name' => __( 'Blocked', 'bbpress' ),
438
+ 'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
439
+ )
440
+ ) );
441
+ }
442
+
443
+ /**
444
+ * Removes the bbPress roles from the editable roles array
445
+ *
446
+ * This used to use array_diff_assoc() but it randomly broke before 2.2 release.
447
+ * Need to research what happened, and if there's a way to speed this up.
448
+ *
449
+ * @since bbPress (r4303)
450
+ *
451
+ * @param array $all_roles All registered roles
452
+ * @return array
453
+ */
454
+ function bbp_filter_blog_editable_roles( $all_roles = array() ) {
455
+
456
+ // Loop through bbPress roles
457
+ foreach ( array_keys( bbp_get_dynamic_roles() ) as $bbp_role ) {
458
+
459
+ // Loop through WordPress roles
460
+ foreach ( array_keys( $all_roles ) as $wp_role ) {
461
+
462
+ // If keys match, unset
463
+ if ( $wp_role == $bbp_role ) {
464
+ unset( $all_roles[$wp_role] );
465
+ }
466
+ }
467
+ }
468
+
469
+ return $all_roles;
470
+ }
471
+
472
+ /**
473
+ * The keymaster role for bbPress users
474
+ *
475
+ * @since bbPress (r4284)
476
+ *
477
+ * @uses apply_filters() Allow override of hardcoded keymaster role
478
+ * @return string
479
+ */
480
+ function bbp_get_keymaster_role() {
481
+ return apply_filters( 'bbp_get_keymaster_role', 'bbp_keymaster' );
482
+ }
483
+
484
+ /**
485
+ * The moderator role for bbPress users
486
+ *
487
+ * @since bbPress (r3410)
488
+ *
489
+ * @uses apply_filters() Allow override of hardcoded moderator role
490
+ * @return string
491
+ */
492
+ function bbp_get_moderator_role() {
493
+ return apply_filters( 'bbp_get_moderator_role', 'bbp_moderator' );
494
+ }
495
+
496
+ /**
497
+ * The participant role for registered user that can participate in forums
498
+ *
499
+ * @since bbPress (r3410)
500
+ *
501
+ * @uses apply_filters() Allow override of hardcoded participant role
502
+ * @return string
503
+ */
504
+ function bbp_get_participant_role() {
505
+ return apply_filters( 'bbp_get_participant_role', 'bbp_participant' );
506
+ }
507
+
508
+ /**
509
+ * The spectator role is for registered users without any capabilities
510
+ *
511
+ * @since bbPress (r3860)
512
+ *
513
+ * @uses apply_filters() Allow override of hardcoded spectator role
514
+ * @return string
515
+ */
516
+ function bbp_get_spectator_role() {
517
+ return apply_filters( 'bbp_get_spectator_role', 'bbp_spectator' );
518
+ }
519
+
520
+ /**
521
+ * The visitor role for any registered user without a set forum role.
522
+ *
523
+ * @since bbPress (r3860)
524
+ *
525
+ * @uses apply_filters() Allow override of hardcoded visitor role
526
+ * @return string
527
+ */
528
+ function bbp_get_visitor_role() {
529
+ return apply_filters( 'bbp_get_visitor_role', 'bbp_visitor' );
530
+ }
531
+
532
+ /**
533
+ * The blocked role is for registered users that cannot spectate or participate
534
+ *
535
+ * @since bbPress (r4284)
536
+ *
537
+ * @uses apply_filters() Allow override of hardcoded blocked role
538
+ * @return string
539
+ */
540
+ function bbp_get_blocked_role() {
541
+ return apply_filters( 'bbp_get_blocked_role', 'bbp_blocked' );
542
+ }
543
+
544
+ /** Deprecated ****************************************************************/
545
+
546
+ /**
547
+ * Adds bbPress-specific user roles.
548
+ *
549
+ * @since bbPress (r2741)
550
+ * @deprecated since version 2.2
551
+ */
552
+ function bbp_add_roles() {
553
+ _doing_it_wrong( 'bbp_add_roles', __( 'Editable forum roles no longer exist.', 'bbpress' ), '2.2' );
554
+ }
555
+
556
+ /**
557
+ * Removes bbPress-specific user roles.
558
+ *
559
+ * @since bbPress (r2741)
560
+ * @deprecated since version 2.2
561
+ */
562
+ function bbp_remove_roles() {
563
+ _doing_it_wrong( 'bbp_remove_roles', __( 'Editable forum roles no longer exist.', 'bbpress' ), '2.2' );
564
+ }
includes/core/extend.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress Extentions
5
+ *
6
+ * There's a world of really cool plugins out there, and bbPress comes with
7
+ * support for some of the most popular ones.
8
+ *
9
+ * @package bbPress
10
+ * @subpackage Extend
11
+ */
12
+
13
+ // Exit if accessed directly
14
+ if ( !defined( 'ABSPATH' ) ) exit;
15
+
16
+ /**
17
+ * Loads Akismet inside the bbPress global class
18
+ *
19
+ * @since bbPress (r3277)
20
+ *
21
+ * @return If bbPress is not active
22
+ */
23
+ function bbp_setup_akismet() {
24
+
25
+ // Bail if no akismet
26
+ if ( !defined( 'AKISMET_VERSION' ) ) return;
27
+
28
+ // Bail if Akismet is turned off
29
+ if ( !bbp_is_akismet_active() ) return;
30
+
31
+ // Include the Akismet Component
32
+ require( bbpress()->includes_dir . 'extend/akismet.php' );
33
+
34
+ // Instantiate Akismet for bbPress
35
+ bbpress()->extend->akismet = new BBP_Akismet();
36
+ }
37
+
38
+ /**
39
+ * Requires and creates the BuddyPress extension, and adds component creation
40
+ * action to bp_init hook. @see bbp_setup_buddypress_component()
41
+ *
42
+ * @since bbPress (r3395)
43
+ * @return If BuddyPress is not active
44
+ */
45
+ function bbp_setup_buddypress() {
46
+
47
+ if ( ! function_exists( 'buddypress' ) ) {
48
+
49
+ /**
50
+ * Helper for BuddyPress 1.6 and earlier
51
+ *
52
+ * @since bbPress (r4395)
53
+ * @return BuddyPress
54
+ */
55
+ function buddypress() {
56
+ return isset( $GLOBALS['bp'] ) ? $GLOBALS['bp'] : false;
57
+ }
58
+ }
59
+
60
+ // Bail if in maintenance mode
61
+ if ( ! buddypress() || buddypress()->maintenance_mode )
62
+ return;
63
+
64
+ // Include the BuddyPress Component
65
+ require( bbpress()->includes_dir . 'extend/buddypress/loader.php' );
66
+
67
+ // Instantiate BuddyPress for bbPress
68
+ bbpress()->extend->buddypress = new BBP_Forums_Component();
69
+ }
bbp-includes/bbp-core-filters.php → includes/core/filters.php RENAMED
@@ -13,12 +13,9 @@
13
  * There are a few common places that additional filters can currently be found
14
  *
15
  * - bbPress: In {@link bbPress::setup_actions()} in bbpress.php
16
- * - Component: In {@link BBP_Component::setup_actions()} in
17
- * bbp-includes/bbp-classes.php
18
- * - Admin: More in {@link BBP_Admin::setup_actions()} in
19
- * bbp-admin/bbp-admin.php
20
  *
21
- * @see bbp-core-actions.php
22
  */
23
 
24
  // Exit if accessed directly
@@ -49,6 +46,7 @@ add_filter( 'allowed_themes', 'bbp_allowed_themes', 10 );
49
  add_filter( 'redirect_canonical', 'bbp_redirect_canonical', 10 );
50
  add_filter( 'login_redirect', 'bbp_redirect_login', 2, 3 );
51
  add_filter( 'logout_url', 'bbp_logout_url', 2, 2 );
 
52
 
53
  // Fix post author id for anonymous posts (set it back to 0) when the post status is changed
54
  add_filter( 'wp_insert_post_data', 'bbp_fix_post_author', 30, 2 );
@@ -59,6 +57,9 @@ add_filter( 'comments_open', 'bbp_force_comment_status' );
59
  // Add post_parent__in to posts_where
60
  add_filter( 'posts_where', 'bbp_query_post_parent__in', 10, 2 );
61
 
 
 
 
62
  /**
63
  * Feeds
64
  *
@@ -126,6 +127,7 @@ add_filter( 'bbp_get_reply_content', 'make_clickable', 9 );
126
  add_filter( 'bbp_get_reply_content', 'force_balance_tags', 25 );
127
  add_filter( 'bbp_get_reply_content', 'convert_smilies', 20 );
128
  add_filter( 'bbp_get_reply_content', 'wpautop', 30 );
 
129
 
130
  // Run filters on topic content
131
  add_filter( 'bbp_get_topic_content', 'capital_P_dangit' );
@@ -135,6 +137,7 @@ add_filter( 'bbp_get_topic_content', 'make_clickable', 9 );
135
  add_filter( 'bbp_get_topic_content', 'force_balance_tags', 25 );
136
  add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 );
137
  add_filter( 'bbp_get_topic_content', 'wpautop', 30 );
 
138
 
139
  // Add number format filter to functions requiring numeric output
140
  add_filter( 'bbp_get_user_topic_count', 'bbp_number_format', 10 );
@@ -203,52 +206,12 @@ add_filter( 'bbp_pre_anonymous_post_author_website', 'wp_filter_kses', 10 )
203
  // Queries
204
  add_filter( 'posts_request', '_bbp_has_replies_where', 10, 2 );
205
 
206
- /** Functions *****************************************************************/
207
-
208
- /**
209
- * Piggy back filter for WordPress's 'request' filter
210
- *
211
- * @since bbPress (r3758)
212
- * @param array $query_vars
213
- * @return array
214
- */
215
- function bbp_request( $query_vars = array() ) {
216
- return apply_filters( 'bbp_request', $query_vars );
217
- }
218
-
219
- /**
220
- * The main filter used for theme compatibility and displaying custom bbPress
221
- * theme files.
222
- *
223
- * @since bbPress (r3311)
224
- * @uses apply_filters()
225
- * @param string $template
226
- * @return string Template file to use
227
- */
228
- function bbp_template_include( $template = '' ) {
229
- return apply_filters( 'bbp_template_include', $template );
230
- }
231
-
232
- /**
233
- * Generate bbPress-specific rewrite rules
234
- *
235
- * @since bbPress (r2688)
236
- * @param WP_Rewrite $wp_rewrite
237
- * @uses do_action() Calls 'bbp_generate_rewrite_rules' with {@link WP_Rewrite}
238
- */
239
- function bbp_generate_rewrite_rules( $wp_rewrite ) {
240
- do_action_ref_array( 'bbp_generate_rewrite_rules', array( &$wp_rewrite ) );
241
- }
242
-
243
- /**
244
- * Filter the allowed themes list for bbPress specific themes
245
- *
246
- * @since bbPress (r2944)
247
- * @uses apply_filters() Calls 'bbp_allowed_themes' with the allowed themes list
248
- */
249
- function bbp_allowed_themes( $themes ) {
250
- return apply_filters( 'bbp_allowed_themes', $themes );
251
- }
252
 
253
  /** Deprecated ****************************************************************/
254
 
@@ -261,6 +224,19 @@ function bbp_allowed_themes( $themes ) {
261
  * codebase with _before_ and _after_ filters everywhere.
262
  */
263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  /**
265
  * Deprecated forums query filter
266
  *
13
  * There are a few common places that additional filters can currently be found
14
  *
15
  * - bbPress: In {@link bbPress::setup_actions()} in bbpress.php
16
+ * - Admin: More in {@link BBP_Admin::setup_actions()} in admin.php
 
 
 
17
  *
18
+ * @see /core/actions.php
19
  */
20
 
21
  // Exit if accessed directly
46
  add_filter( 'redirect_canonical', 'bbp_redirect_canonical', 10 );
47
  add_filter( 'login_redirect', 'bbp_redirect_login', 2, 3 );
48
  add_filter( 'logout_url', 'bbp_logout_url', 2, 2 );
49
+ add_filter( 'plugin_locale', 'bbp_plugin_locale', 10, 2 );
50
 
51
  // Fix post author id for anonymous posts (set it back to 0) when the post status is changed
52
  add_filter( 'wp_insert_post_data', 'bbp_fix_post_author', 30, 2 );
57
  // Add post_parent__in to posts_where
58
  add_filter( 'posts_where', 'bbp_query_post_parent__in', 10, 2 );
59
 
60
+ // Remove forums roles from list of all roles
61
+ add_filter( 'editable_roles', 'bbp_filter_blog_editable_roles' );
62
+
63
  /**
64
  * Feeds
65
  *
127
  add_filter( 'bbp_get_reply_content', 'force_balance_tags', 25 );
128
  add_filter( 'bbp_get_reply_content', 'convert_smilies', 20 );
129
  add_filter( 'bbp_get_reply_content', 'wpautop', 30 );
130
+ add_filter( 'bbp_get_reply_content', 'bbp_mention_filter', 40 );
131
 
132
  // Run filters on topic content
133
  add_filter( 'bbp_get_topic_content', 'capital_P_dangit' );
137
  add_filter( 'bbp_get_topic_content', 'force_balance_tags', 25 );
138
  add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 );
139
  add_filter( 'bbp_get_topic_content', 'wpautop', 30 );
140
+ add_filter( 'bbp_get_topic_content', 'bbp_mention_filter', 40 );
141
 
142
  // Add number format filter to functions requiring numeric output
143
  add_filter( 'bbp_get_user_topic_count', 'bbp_number_format', 10 );
206
  // Queries
207
  add_filter( 'posts_request', '_bbp_has_replies_where', 10, 2 );
208
 
209
+ // Capabilities
210
+ add_filter( 'bbp_map_meta_caps', 'bbp_map_primary_meta_caps', 10, 4 ); // Primary caps
211
+ add_filter( 'bbp_map_meta_caps', 'bbp_map_forum_meta_caps', 10, 4 ); // Forums
212
+ add_filter( 'bbp_map_meta_caps', 'bbp_map_topic_meta_caps', 10, 4 ); // Topics
213
+ add_filter( 'bbp_map_meta_caps', 'bbp_map_reply_meta_caps', 10, 4 ); // Replies
214
+ add_filter( 'bbp_map_meta_caps', 'bbp_map_topic_tag_meta_caps', 10, 4 ); // Topic tags
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
216
  /** Deprecated ****************************************************************/
217
 
224
  * codebase with _before_ and _after_ filters everywhere.
225
  */
226
 
227
+ /**
228
+ * Deprecated locale filter
229
+ *
230
+ * @since bbPress (r4213)
231
+ *
232
+ * @param type $locale
233
+ * @return type
234
+ */
235
+ function _bbp_filter_locale( $locale = '' ) {
236
+ return apply_filters( 'bbpress_locale', $locale );
237
+ }
238
+ add_filter( 'bbp_plugin_locale', '_bbp_filter_locale', 10, 1 );
239
+
240
  /**
241
  * Deprecated forums query filter
242
  *
bbp-includes/bbp-core-functions.php → includes/core/functions.php RENAMED
@@ -148,11 +148,17 @@ function bbp_get_views() {
148
  * @param string $title View title
149
  * @param mixed $query_args {@link bbp_has_topics()} arguments.
150
  * @param bool $feed Have a feed for the view? Defaults to true. NOT IMPLEMENTED
 
151
  * @uses sanitize_title() To sanitize the view name
152
  * @uses esc_html() To sanitize the view title
153
  * @return array The just registered (but processed) view
154
  */
155
- function bbp_register_view( $view, $title, $query_args = '', $feed = true ) {
 
 
 
 
 
156
  $bbp = bbpress();
157
  $view = sanitize_title( $view );
158
  $title = esc_html( $title );
@@ -162,7 +168,7 @@ function bbp_register_view( $view, $title, $query_args = '', $feed = true ) {
162
 
163
  $query_args = bbp_parse_args( $query_args, '', 'register_view' );
164
 
165
- // Set exclude_stickies to true if it wasn't supplied
166
  if ( !isset( $query_args['show_stickies'] ) )
167
  $query_args['show_stickies'] = false;
168
 
@@ -270,18 +276,60 @@ function bbp_add_error( $code = '', $message = '', $data = '' ) {
270
  * @usese WP_Error::get_error_codes()
271
  */
272
  function bbp_has_errors() {
 
273
 
274
- // Assume no errors
275
- $has_errors = false;
276
 
277
- // Check for errors
278
- if ( bbpress()->errors->get_error_codes() )
279
- $has_errors = true;
 
 
 
 
 
 
 
 
 
280
 
281
- // Filter return value
282
- $has_errors = apply_filters( 'bbp_has_errors', $has_errors, bbpress()->errors );
 
283
 
284
- return $has_errors;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  }
286
 
287
  /** Post Statuses *************************************************************/
@@ -396,6 +444,46 @@ function bbp_get_edit_rewrite_id() {
396
  return bbpress()->edit_id;
397
  }
398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  /**
400
  * Return the unique ID for topic view rewrite rules
401
  *
@@ -405,3 +493,13 @@ function bbp_get_edit_rewrite_id() {
405
  function bbp_get_view_rewrite_id() {
406
  return bbpress()->view_id;
407
  }
 
 
 
 
 
 
 
 
 
 
148
  * @param string $title View title
149
  * @param mixed $query_args {@link bbp_has_topics()} arguments.
150
  * @param bool $feed Have a feed for the view? Defaults to true. NOT IMPLEMENTED
151
+ * @param string $capability Capability that the current user must have
152
  * @uses sanitize_title() To sanitize the view name
153
  * @uses esc_html() To sanitize the view title
154
  * @return array The just registered (but processed) view
155
  */
156
+ function bbp_register_view( $view, $title, $query_args = '', $feed = true, $capability = '' ) {
157
+
158
+ // Bail if user does not have capability
159
+ if ( ! empty( $capability ) && ! current_user_can( $capability ) )
160
+ return false;
161
+
162
  $bbp = bbpress();
163
  $view = sanitize_title( $view );
164
  $title = esc_html( $title );
168
 
169
  $query_args = bbp_parse_args( $query_args, '', 'register_view' );
170
 
171
+ // Set show_stickies to false if it wasn't supplied
172
  if ( !isset( $query_args['show_stickies'] ) )
173
  $query_args['show_stickies'] = false;
174
 
276
  * @usese WP_Error::get_error_codes()
277
  */
278
  function bbp_has_errors() {
279
+ $has_errors = bbpress()->errors->get_error_codes() ? true : false;
280
 
281
+ return apply_filters( 'bbp_has_errors', $has_errors, bbpress()->errors );
282
+ }
283
 
284
+ /**
285
+ * Searches through the content to locate usernames, designated by an @ sign.
286
+ *
287
+ * @since bbPress (r4323)
288
+ *
289
+ * @param string $content The content
290
+ * @return bool|array $usernames Existing usernames. False if no matches.
291
+ */
292
+ function bbp_find_mentions( $content = '' ) {
293
+ $pattern = '/[@]+([A-Za-z0-9-_\.@]+)\b/';
294
+ preg_match_all( $pattern, $content, $usernames );
295
+ $usernames = array_unique( array_filter( $usernames[1] ) );
296
 
297
+ // Bail if no usernames
298
+ if ( empty( $usernames ) )
299
+ return false;
300
 
301
+ return $usernames;
302
+ }
303
+
304
+ /**
305
+ * Finds and links @-mentioned users in the content
306
+ *
307
+ * @since bbPress (r4323)
308
+ *
309
+ * @uses bbp_find_mentions() To get usernames in content areas
310
+ * @return string $content Content filtered for mentions
311
+ */
312
+ function bbp_mention_filter( $content = '' ) {
313
+
314
+ // Get Usernames and bail if none exist
315
+ $usernames = bbp_find_mentions( $content );
316
+ if ( empty( $usernames ) )
317
+ return $content;
318
+
319
+ // Loop through usernames and link to profiles
320
+ foreach( (array) $usernames as $username ) {
321
+
322
+ // Skip if username does not exist or user is not active
323
+ $user_id = username_exists( $username );
324
+ if ( empty( $user_id ) || bbp_is_user_inactive( $user_id ) )
325
+ continue;
326
+
327
+ // Replace name in content
328
+ $content = preg_replace( '/(@' . $username . '\b)/', "<a href='" . bbp_get_user_profile_url( $user_id ) . "' rel='nofollow' class='bbp-mention-link $username'>@$username</a>", $content );
329
+ }
330
+
331
+ // Return modified content
332
+ return $content;
333
  }
334
 
335
  /** Post Statuses *************************************************************/
444
  return bbpress()->edit_id;
445
  }
446
 
447
+ /**
448
+ * Return the unique ID for user topics rewrite rules
449
+ *
450
+ * @since bbPress (r4321)
451
+ * @return string
452
+ */
453
+ function bbp_get_user_topics_rewrite_id() {
454
+ return bbpress()->tops_id;
455
+ }
456
+
457
+ /**
458
+ * Return the unique ID for user replies rewrite rules
459
+ *
460
+ * @since bbPress (r4321)
461
+ * @return string
462
+ */
463
+ function bbp_get_user_replies_rewrite_id() {
464
+ return bbpress()->reps_id;
465
+ }
466
+
467
+ /**
468
+ * Return the unique ID for user caps rewrite rules
469
+ *
470
+ * @since bbPress (r4181)
471
+ * @return string
472
+ */
473
+ function bbp_get_user_favorites_rewrite_id() {
474
+ return bbpress()->favs_id;
475
+ }
476
+
477
+ /**
478
+ * Return the unique ID for user caps rewrite rules
479
+ *
480
+ * @since bbPress (r4181)
481
+ * @return string
482
+ */
483
+ function bbp_get_user_subscriptions_rewrite_id() {
484
+ return bbpress()->subs_id;
485
+ }
486
+
487
  /**
488
  * Return the unique ID for topic view rewrite rules
489
  *
493
  function bbp_get_view_rewrite_id() {
494
  return bbpress()->view_id;
495
  }
496
+
497
+ /**
498
+ * Delete a blogs rewrite rules, so that they are automatically rebuilt on
499
+ * the subsequent page load.
500
+ *
501
+ * @since bbPress (r4198)
502
+ */
503
+ function bbp_delete_rewrite_rules() {
504
+ delete_option( 'rewrite_rules' );
505
+ }
includes/core/index.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Do not modify the files in this folder.
5
+ */
bbp-includes/bbp-core-options.php → includes/core/options.php RENAMED
@@ -29,15 +29,17 @@ function bbp_get_default_options() {
29
 
30
  /** Settings **********************************************************/
31
 
32
- '_bbp_edit_lock' => 5, // Lock post editing after 5 minutes
33
- '_bbp_throttle_time' => 10, // Throttle post time to 10 seconds
34
- '_bbp_enable_favorites' => 1, // Favorites
35
- '_bbp_enable_subscriptions' => 1, // Subscriptions
36
- '_bbp_allow_anonymous' => 0, // Allow anonymous posting
37
- '_bbp_allow_global_access' => 0, // Users from all sites can post
38
- '_bbp_use_wp_editor' => 1, // Use the WordPress editor if available
39
- '_bbp_use_autoembed' => 0, // Allow oEmbed in topics and replies
40
- '_bbp_theme_package_id' => 'default', // The ID for the current theme packag.
 
 
41
 
42
  /** Per Page **********************************************************/
43
 
@@ -68,9 +70,14 @@ function bbp_get_default_options() {
68
  '_bbp_reply_slug' => 'reply', // Reply slug
69
  '_bbp_topic_tag_slug' => 'topic-tag', // Topic tag slug
70
 
 
 
 
 
 
 
71
  /** Other Slugs *******************************************************/
72
 
73
- '_bbp_user_slug' => 'users', // User profile slug
74
  '_bbp_view_slug' => 'view', // View slug
75
 
76
  /** Topics ************************************************************/
@@ -130,7 +137,7 @@ function bbp_add_options() {
130
  function bbp_delete_options() {
131
 
132
  // Add default options
133
- foreach ( bbp_get_default_options() as $key => $value )
134
  delete_option( $key );
135
 
136
  // Allow previously activated plugins to append their own options.
@@ -149,7 +156,7 @@ function bbp_delete_options() {
149
  function bbp_setup_option_filters() {
150
 
151
  // Add filters to each bbPress option
152
- foreach ( bbp_get_default_options() as $key => $value )
153
  add_filter( 'pre_option_' . $key, 'bbp_pre_get_option' );
154
 
155
  // Allow previously activated plugins to append their own options.
@@ -165,14 +172,13 @@ function bbp_setup_option_filters() {
165
  * @return mixed false if not overloaded, mixed if set
166
  */
167
  function bbp_pre_get_option( $value = '' ) {
168
- $bbp = bbpress();
169
 
170
  // Remove the filter prefix
171
  $option = str_replace( 'pre_option_', '', current_filter() );
172
 
173
  // Check the options global for preset value
174
- if ( isset( $bbp->options[$option] ) )
175
- $value = $bbp->options[$option];
176
 
177
  // Always return a value, even if false
178
  return $value;
@@ -204,6 +210,18 @@ function bbp_is_subscriptions_active( $default = 1 ) {
204
  return (bool) apply_filters( 'bbp_is_subscriptions_active', (bool) get_option( '_bbp_enable_subscriptions', $default ) );
205
  }
206
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  /**
208
  * Are topic and reply revisions allowed
209
  *
@@ -236,10 +254,22 @@ function bbp_allow_anonymous( $default = 0 ) {
236
  * @uses get_option() To get the global access option
237
  * @return bool Is global access allowed?
238
  */
239
- function bbp_allow_global_access( $default = 0 ) {
240
  return (bool) apply_filters( 'bbp_allow_global_access', (bool) get_option( '_bbp_allow_global_access', $default ) );
241
  }
242
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  /**
244
  * Use the WordPress editor if available
245
  *
@@ -439,6 +469,26 @@ function bbp_get_user_slug( $default = 'user' ) {
439
  return apply_filters( 'bbp_get_user_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_user_slug', $default ) );
440
  }
441
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
  /**
443
  * Return the topic view slug
444
  *
29
 
30
  /** Settings **********************************************************/
31
 
32
+ '_bbp_edit_lock' => 5, // Lock post editing after 5 minutes
33
+ '_bbp_throttle_time' => 10, // Throttle post time to 10 seconds
34
+ '_bbp_enable_favorites' => 1, // Favorites
35
+ '_bbp_enable_subscriptions' => 1, // Subscriptions
36
+ '_bbp_allow_topic_tags' => 1, // Topic Tags
37
+ '_bbp_allow_anonymous' => 0, // Allow anonymous posting
38
+ '_bbp_allow_global_access' => 1, // Users from all sites can post
39
+ '_bbp_use_wp_editor' => 1, // Use the WordPress editor if available
40
+ '_bbp_use_autoembed' => 0, // Allow oEmbed in topics and replies
41
+ '_bbp_theme_package_id' => 'default', // The ID for the current theme package.
42
+ '_bbp_default_role' => bbp_get_participant_role(), // Default forums role
43
 
44
  /** Per Page **********************************************************/
45
 
70
  '_bbp_reply_slug' => 'reply', // Reply slug
71
  '_bbp_topic_tag_slug' => 'topic-tag', // Topic tag slug
72
 
73
+ /** User Slugs ********************************************************/
74
+
75
+ '_bbp_user_slug' => 'users', // User profile slug
76
+ '_bbp_user_favs_slug' => 'favorites', // User favorites slug
77
+ '_bbp_user_subs_slug' => 'subscriptions', // User subscriptions slug
78
+
79
  /** Other Slugs *******************************************************/
80
 
 
81
  '_bbp_view_slug' => 'view', // View slug
82
 
83
  /** Topics ************************************************************/
137
  function bbp_delete_options() {
138
 
139
  // Add default options
140
+ foreach ( array_keys( bbp_get_default_options() ) as $key )
141
  delete_option( $key );
142
 
143
  // Allow previously activated plugins to append their own options.
156
  function bbp_setup_option_filters() {
157
 
158
  // Add filters to each bbPress option
159
+ foreach ( array_keys( bbp_get_default_options() ) as $key )
160
  add_filter( 'pre_option_' . $key, 'bbp_pre_get_option' );
161
 
162
  // Allow previously activated plugins to append their own options.
172
  * @return mixed false if not overloaded, mixed if set
173
  */
174
  function bbp_pre_get_option( $value = '' ) {
 
175
 
176
  // Remove the filter prefix
177
  $option = str_replace( 'pre_option_', '', current_filter() );
178
 
179
  // Check the options global for preset value
180
+ if ( isset( bbpress()->options[$option] ) )
181
+ $value = bbpress()->options[$option];
182
 
183
  // Always return a value, even if false
184
  return $value;
210
  return (bool) apply_filters( 'bbp_is_subscriptions_active', (bool) get_option( '_bbp_enable_subscriptions', $default ) );
211
  }
212
 
213
+ /**
214
+ * Are topic tags allowed
215
+ *
216
+ * @since bbPress (r4097)
217
+ * @param $default bool Optional. Default value true
218
+ * @uses get_option() To get the allow tags
219
+ * @return bool Are tags allowed?
220
+ */
221
+ function bbp_allow_topic_tags( $default = 1 ) {
222
+ return (bool) apply_filters( 'bbp_allow_topic_tags', (bool) get_option( '_bbp_allow_topic_tags', $default ) );
223
+ }
224
+
225
  /**
226
  * Are topic and reply revisions allowed
227
  *
254
  * @uses get_option() To get the global access option
255
  * @return bool Is global access allowed?
256
  */
257
+ function bbp_allow_global_access( $default = 1 ) {
258
  return (bool) apply_filters( 'bbp_allow_global_access', (bool) get_option( '_bbp_allow_global_access', $default ) );
259
  }
260
 
261
+ /**
262
+ * Is this forum available to all users on all sites in this installation?
263
+ *
264
+ * @since bbPress (r4294)
265
+ * @param $default string Optional. Default value empty
266
+ * @uses get_option() To get the default forums role option
267
+ * @return string The default forums user role
268
+ */
269
+ function bbp_get_default_role( $default = 'bbp_participant' ) {
270
+ return apply_filters( 'bbp_get_default_role', get_option( '_bbp_default_role', $default ) );
271
+ }
272
+
273
  /**
274
  * Use the WordPress editor if available
275
  *
469
  return apply_filters( 'bbp_get_user_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_user_slug', $default ) );
470
  }
471
 
472
+ /**
473
+ * Return the single user favorites slug
474
+ *
475
+ * @since bbPress (r4187)
476
+ * @return string
477
+ */
478
+ function bbp_get_user_favorites_slug( $default = 'favorites' ) {
479
+ return apply_filters( 'bbp_get_user_favorites_slug', get_option( '_bbp_user_favs_slug', $default ) );
480
+ }
481
+
482
+ /**
483
+ * Return the single user subscriptions slug
484
+ *
485
+ * @since bbPress (r4187)
486
+ * @return string
487
+ */
488
+ function bbp_get_user_subscriptions_slug( $default = 'subscriptions' ) {
489
+ return apply_filters( 'bbp_get_user_subscriptions_slug', get_option( '_bbp_user_subs_slug', $default ) );
490
+ }
491
+
492
  /**
493
  * Return the topic view slug
494
  *
includes/core/sub-actions.php ADDED
@@ -0,0 +1,391 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Plugin Dependency
5
+ *
6
+ * The purpose of the following hooks is to mimic the behavior of something
7
+ * called 'plugin dependency' which enables a plugin to have plugins of their
8
+ * own in a safe and reliable way.
9
+ *
10
+ * We do this in bbPress by mirroring existing WordPress hookss in many places
11
+ * allowing dependant plugins to hook into the bbPress specific ones, thus
12
+ * guaranteeing proper code execution only when bbPress is active.
13
+ *
14
+ * The following functions are wrappers for hookss, allowing them to be
15
+ * manually called and/or piggy-backed on top of other hooks if needed.
16
+ *
17
+ * @todo use anonymous functions when PHP minimun requirement allows (5.3)
18
+ */
19
+
20
+ /** Activation Actions ********************************************************/
21
+
22
+ /**
23
+ * Runs on bbPress activation
24
+ *
25
+ * @since bbPress (r2509)
26
+ * @uses register_uninstall_hook() To register our own uninstall hook
27
+ * @uses do_action() Calls 'bbp_activation' hook
28
+ */
29
+ function bbp_activation() {
30
+ do_action( 'bbp_activation' );
31
+ }
32
+
33
+ /**
34
+ * Runs on bbPress deactivation
35
+ *
36
+ * @since bbPress (r2509)
37
+ * @uses do_action() Calls 'bbp_deactivation' hook
38
+ */
39
+ function bbp_deactivation() {
40
+ do_action( 'bbp_deactivation' );
41
+ }
42
+
43
+ /**
44
+ * Runs when uninstalling bbPress
45
+ *
46
+ * @since bbPress (r2509)
47
+ * @uses do_action() Calls 'bbp_uninstall' hook
48
+ */
49
+ function bbp_uninstall() {
50
+ do_action( 'bbp_uninstall' );
51
+ }
52
+
53
+ /** Main Actions **************************************************************/
54
+
55
+ /**
56
+ * Main action responsible for constants, globals, and includes
57
+ *
58
+ * @since bbPress (r2599)
59
+ * @uses do_action() Calls 'bbp_loaded'
60
+ */
61
+ function bbp_loaded() {
62
+ do_action( 'bbp_loaded' );
63
+ }
64
+
65
+ /**
66
+ * Setup constants
67
+ *
68
+ * @since bbPress (r2599)
69
+ * @uses do_action() Calls 'bbp_constants'
70
+ */
71
+ function bbp_constants() {
72
+ do_action( 'bbp_constants' );
73
+ }
74
+
75
+ /**
76
+ * Setup globals BEFORE includes
77
+ *
78
+ * @since bbPress (r2599)
79
+ * @uses do_action() Calls 'bbp_boot_strap_globals'
80
+ */
81
+ function bbp_boot_strap_globals() {
82
+ do_action( 'bbp_boot_strap_globals' );
83
+ }
84
+
85
+ /**
86
+ * Include files
87
+ *
88
+ * @since bbPress (r2599)
89
+ * @uses do_action() Calls 'bbp_includes'
90
+ */
91
+ function bbp_includes() {
92
+ do_action( 'bbp_includes' );
93
+ }
94
+
95
+ /**
96
+ * Setup globals AFTER includes
97
+ *
98
+ * @since bbPress (r2599)
99
+ * @uses do_action() Calls 'bbp_setup_globals'
100
+ */
101
+ function bbp_setup_globals() {
102
+ do_action( 'bbp_setup_globals' );
103
+ }
104
+
105
+ /**
106
+ * Register any objects before anything is initialized
107
+ *
108
+ * @since bbPress (r4180)
109
+ * @uses do_action() Calls 'bbp_register'
110
+ */
111
+ function bbp_register() {
112
+ do_action( 'bbp_register' );
113
+ }
114
+
115
+ /**
116
+ * Initialize any code after everything has been loaded
117
+ *
118
+ * @since bbPress (r2599)
119
+ * @uses do_action() Calls 'bbp_init'
120
+ */
121
+ function bbp_init() {
122
+ do_action( 'bbp_init' );
123
+ }
124
+
125
+ /**
126
+ * Initialize widgets
127
+ *
128
+ * @since bbPress (r3389)
129
+ * @uses do_action() Calls 'bbp_widgets_init'
130
+ */
131
+ function bbp_widgets_init() {
132
+ do_action( 'bbp_widgets_init' );
133
+ }
134
+
135
+ /**
136
+ * Setup the currently logged-in user
137
+ *
138
+ * @since bbPress (r2695)
139
+ * @uses do_action() Calls 'bbp_setup_current_user'
140
+ */
141
+ function bbp_setup_current_user() {
142
+ do_action( 'bbp_setup_current_user' );
143
+ }
144
+
145
+ /** Supplemental Actions ******************************************************/
146
+
147
+ /**
148
+ * Load translations for current language
149
+ *
150
+ * @since bbPress (r2599)
151
+ * @uses do_action() Calls 'bbp_load_textdomain'
152
+ */
153
+ function bbp_load_textdomain() {
154
+ do_action( 'bbp_load_textdomain' );
155
+ }
156
+
157
+ /**
158
+ * Setup the post types
159
+ *
160
+ * @since bbPress (r2464)
161
+ * @uses do_action() Calls 'bbp_register_post_type'
162
+ */
163
+ function bbp_register_post_types() {
164
+ do_action( 'bbp_register_post_types' );
165
+ }
166
+
167
+ /**
168
+ * Setup the post statuses
169
+ *
170
+ * @since bbPress (r2727)
171
+ * @uses do_action() Calls 'bbp_register_post_statuses'
172
+ */
173
+ function bbp_register_post_statuses() {
174
+ do_action( 'bbp_register_post_statuses' );
175
+ }
176
+
177
+ /**
178
+ * Register the built in bbPress taxonomies
179
+ *
180
+ * @since bbPress (r2464)
181
+ * @uses do_action() Calls 'bbp_register_taxonomies'
182
+ */
183
+ function bbp_register_taxonomies() {
184
+ do_action( 'bbp_register_taxonomies' );
185
+ }
186
+
187
+ /**
188
+ * Register the default bbPress views
189
+ *
190
+ * @since bbPress (r2789)
191
+ * @uses do_action() Calls 'bbp_register_views'
192
+ */
193
+ function bbp_register_views() {
194
+ do_action( 'bbp_register_views' );
195
+ }
196
+
197
+ /**
198
+ * Register the default bbPress shortcodes
199
+ *
200
+ * @since bbPress (r4211)
201
+ * @uses do_action() Calls 'bbp_register_shortcodes'
202
+ */
203
+ function bbp_register_shortcodes() {
204
+ do_action( 'bbp_register_shortcodes' );
205
+ }
206
+
207
+ /**
208
+ * Enqueue bbPress specific CSS and JS
209
+ *
210
+ * @since bbPress (r3373)
211
+ * @uses do_action() Calls 'bbp_enqueue_scripts'
212
+ */
213
+ function bbp_enqueue_scripts() {
214
+ do_action( 'bbp_enqueue_scripts' );
215
+ }
216
+
217
+ /**
218
+ * Add the bbPress-specific rewrite tags
219
+ *
220
+ * @since bbPress (r2753)
221
+ * @uses do_action() Calls 'bbp_add_rewrite_tags'
222
+ */
223
+ function bbp_add_rewrite_tags() {
224
+ do_action( 'bbp_add_rewrite_tags' );
225
+ }
226
+
227
+ /**
228
+ * Add the bbPress-specific login forum action
229
+ *
230
+ * @since bbPress (r2753)
231
+ * @uses do_action() Calls 'bbp_login_form_login'
232
+ */
233
+ function bbp_login_form_login() {
234
+ do_action( 'bbp_login_form_login' );
235
+ }
236
+
237
+ /** User Actions **************************************************************/
238
+
239
+ /**
240
+ * The main action for hooking into when a user account is updated
241
+ *
242
+ * @since bbPress (r4304)
243
+ *
244
+ * @param int $user_id ID of user being edited
245
+ * @param array $old_user_data The old, unmodified user data
246
+ * @uses do_action() Calls 'bbp_profile_update'
247
+ */
248
+ function bbp_profile_update( $user_id = 0, $old_user_data = array() ) {
249
+ do_action( 'bbp_profile_update', $user_id, $old_user_data );
250
+ }
251
+
252
+ /**
253
+ * The main action for hooking into a user being registered
254
+ *
255
+ * @since bbPress (r4304)
256
+ * @param int $user_id ID of user being edited
257
+ * @uses do_action() Calls 'bbp_user_register'
258
+ */
259
+ function bbp_user_register( $user_id = 0 ) {
260
+ do_action( 'bbp_user_register', $user_id );
261
+ }
262
+
263
+ /** Final Action **************************************************************/
264
+
265
+ /**
266
+ * bbPress has loaded and initialized everything, and is okay to go
267
+ *
268
+ * @since bbPress (r2618)
269
+ * @uses do_action() Calls 'bbp_ready'
270
+ */
271
+ function bbp_ready() {
272
+ do_action( 'bbp_ready' );
273
+ }
274
+
275
+ /** Theme Permissions *********************************************************/
276
+
277
+ /**
278
+ * The main action used for redirecting bbPress theme actions that are not
279
+ * permitted by the current_user
280
+ *
281
+ * @since bbPress (r3605)
282
+ * @uses do_action()
283
+ */
284
+ function bbp_template_redirect() {
285
+ do_action( 'bbp_template_redirect' );
286
+ }
287
+
288
+ /** Theme Helpers *************************************************************/
289
+
290
+ /**
291
+ * The main action used for executing code before the theme has been setup
292
+ *
293
+ * @since bbPress (r3829)
294
+ * @uses do_action()
295
+ */
296
+ function bbp_register_theme_packages() {
297
+ do_action( 'bbp_register_theme_packages' );
298
+ }
299
+
300
+ /**
301
+ * The main action used for executing code before the theme has been setup
302
+ *
303
+ * @since bbPress (r3732)
304
+ * @uses do_action()
305
+ */
306
+ function bbp_setup_theme() {
307
+ do_action( 'bbp_setup_theme' );
308
+ }
309
+
310
+ /**
311
+ * The main action used for executing code after the theme has been setup
312
+ *
313
+ * @since bbPress (r3732)
314
+ * @uses do_action()
315
+ */
316
+ function bbp_after_setup_theme() {
317
+ do_action( 'bbp_after_setup_theme' );
318
+ }
319
+
320
+ /**
321
+ * Filter the plugin locale and domain.
322
+ *
323
+ * @since bbPress (r4213)
324
+ *
325
+ * @param string $locale
326
+ * @param string $domain
327
+ */
328
+ function bbp_plugin_locale( $locale = '', $domain = '' ) {
329
+ return apply_filters( 'bbp_plugin_locale', $locale, $domain );
330
+ }
331
+
332
+ /** Filters *******************************************************************/
333
+
334
+ /**
335
+ * Piggy back filter for WordPress's 'request' filter
336
+ *
337
+ * @since bbPress (r3758)
338
+ * @param array $query_vars
339
+ * @return array
340
+ */
341
+ function bbp_request( $query_vars = array() ) {
342
+ return apply_filters( 'bbp_request', $query_vars );
343
+ }
344
+
345
+ /**
346
+ * The main filter used for theme compatibility and displaying custom bbPress
347
+ * theme files.
348
+ *
349
+ * @since bbPress (r3311)
350
+ * @uses apply_filters()
351
+ * @param string $template
352
+ * @return string Template file to use
353
+ */
354
+ function bbp_template_include( $template = '' ) {
355
+ return apply_filters( 'bbp_template_include', $template );
356
+ }
357
+
358
+ /**
359
+ * Generate bbPress-specific rewrite rules
360
+ *
361
+ * @since bbPress (r2688)
362
+ * @param WP_Rewrite $wp_rewrite
363
+ * @uses do_action() Calls 'bbp_generate_rewrite_rules' with {@link WP_Rewrite}
364
+ */
365
+ function bbp_generate_rewrite_rules( $wp_rewrite ) {
366
+ do_action_ref_array( 'bbp_generate_rewrite_rules', array( &$wp_rewrite ) );
367
+ }
368
+
369
+ /**
370
+ * Filter the allowed themes list for bbPress specific themes
371
+ *
372
+ * @since bbPress (r2944)
373
+ * @uses apply_filters() Calls 'bbp_allowed_themes' with the allowed themes list
374
+ */
375
+ function bbp_allowed_themes( $themes ) {
376
+ return apply_filters( 'bbp_allowed_themes', $themes );
377
+ }
378
+
379
+ /**
380
+ * Maps forum/topic/reply caps to built in WordPress caps
381
+ *
382
+ * @since bbPress (r2593)
383
+ *
384
+ * @param array $caps Capabilities for meta capability
385
+ * @param string $cap Capability name
386
+ * @param int $user_id User id
387
+ * @param mixed $args Arguments
388
+ */
389
+ function bbp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
390
+ return apply_filters( 'bbp_map_meta_caps', $caps, $cap, $user_id, $args );
391
+ }
bbp-includes/bbp-template-functions.php → includes/core/template-functions.php RENAMED
@@ -46,7 +46,7 @@ function bbp_get_template_part( $slug, $name = null ) {
46
  /**
47
  * Retrieve the name of the highest priority template file that exists.
48
  *
49
- * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
50
  * inherit from a parent theme can just overload one file. If the template is
51
  * not found in either of those, it looks in the theme-compat folder last.
52
  *
@@ -61,7 +61,8 @@ function bbp_get_template_part( $slug, $name = null ) {
61
  function bbp_locate_template( $template_names, $load = false, $require_once = true ) {
62
 
63
  // No file found yet
64
- $located = false;
 
65
 
66
  // Try to find a template file
67
  foreach ( (array) $template_names as $template_name ) {
@@ -71,31 +72,105 @@ function bbp_locate_template( $template_names, $load = false, $require_once = tr
71
  continue;
72
 
73
  // Trim off any slashes from the template name
74
- $template_name = ltrim( $template_name, '/' );
75
-
76
- // Check child theme first
77
- if ( file_exists( trailingslashit( STYLESHEETPATH ) . $template_name ) ) {
78
- $located = trailingslashit( STYLESHEETPATH ) . $template_name;
79
- break;
80
-
81
- // Check parent theme next
82
- } elseif ( file_exists( trailingslashit( TEMPLATEPATH ) . $template_name ) ) {
83
- $located = trailingslashit( TEMPLATEPATH ) . $template_name;
84
- break;
85
-
86
- // Check theme compatibility last
87
- } elseif ( file_exists( trailingslashit( bbp_get_theme_compat_dir() ) . $template_name ) ) {
88
- $located = trailingslashit( bbp_get_theme_compat_dir() ) . $template_name;
89
- break;
90
  }
91
  }
92
 
 
93
  if ( ( true == $load ) && !empty( $located ) )
94
  load_template( $located, $require_once );
95
 
96
  return $located;
97
  }
98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  /**
100
  * Retrieve path to a template
101
  *
@@ -160,11 +235,11 @@ function bbp_add_template_locations( $templates = array() ) {
160
  $locations = bbp_get_template_locations( $templates );
161
 
162
  // Loop through locations and templates and combine
163
- foreach ( $locations as $location )
164
- foreach ( $templates as $template )
165
- $retval[] = trailingslashit( $location ) . $template;
166
 
167
- return apply_filters( 'bbp_add_template_locations', $retval, $templates );
168
  }
169
 
170
  /**
@@ -190,9 +265,10 @@ function bbp_add_template_locations( $templates = array() ) {
190
  * @uses get_query_var() To get {@link WP_Query} query var
191
  * @uses is_email() To check if the string is an email
192
  * @uses get_user_by() To try to get the user by email and nicename
193
- * @uses WP_User to get the user data
194
- * @uses WP_Query::set_404() To set a 404 status
195
  * @uses current_user_can() To check if the current user can edit the user
 
 
196
  * @uses apply_filters() Calls 'enable_edit_any_user_configuration' with true
197
  * @uses bbp_get_view_query_args() To get the view query args
198
  * @uses bbp_get_forum_post_type() To get the forum post type
@@ -215,8 +291,8 @@ function bbp_parse_query( $posts_query ) {
215
  return;
216
 
217
  // Get query variables
218
- $bbp_user = $posts_query->get( bbp_get_user_rewrite_id() );
219
  $bbp_view = $posts_query->get( bbp_get_view_rewrite_id() );
 
220
  $is_edit = $posts_query->get( bbp_get_edit_rewrite_id() );
221
 
222
  // It is a user page - We'll also check if it is user edit
@@ -240,17 +316,22 @@ function bbp_parse_query( $posts_query ) {
240
  }
241
  }
242
 
243
- // Create new user
244
- $user = new WP_User( $bbp_user );
245
 
246
- // Bail if no user
247
- if ( !isset( $user ) || empty( $user ) || empty( $user->ID ) ) {
248
  $posts_query->set_404();
249
  return;
250
  }
251
 
252
  /** User Exists *******************************************************/
253
 
 
 
 
 
 
254
  // View or edit?
255
  if ( !empty( $is_edit ) ) {
256
 
@@ -267,20 +348,52 @@ function bbp_parse_query( $posts_query ) {
267
  require_once( ABSPATH . 'wp-admin/includes/user.php' );
268
  }
269
 
 
 
 
 
 
270
  // Editing a user
271
  $posts_query->bbp_is_edit = true;
272
 
273
- // We are viewing a profile
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  } else {
275
- $posts_query->bbp_is_single_user = true;
276
  }
277
 
 
 
 
278
  // Make sure 404 is not set
279
  $posts_query->is_404 = false;
280
 
281
  // Correct is_home variable
282
  $posts_query->is_home = false;
283
 
 
 
 
 
 
 
 
 
284
  // Set bbp_user_id for future reference
285
  $posts_query->set( 'bbp_user_id', $user->ID );
286
 
46
  /**
47
  * Retrieve the name of the highest priority template file that exists.
48
  *
49
+ * Searches in the child theme before parent theme so that themes which
50
  * inherit from a parent theme can just overload one file. If the template is
51
  * not found in either of those, it looks in the theme-compat folder last.
52
  *
61
  function bbp_locate_template( $template_names, $load = false, $require_once = true ) {
62
 
63
  // No file found yet
64
+ $located = false;
65
+ $template_locations = bbp_get_template_stack();
66
 
67
  // Try to find a template file
68
  foreach ( (array) $template_names as $template_name ) {
72
  continue;
73
 
74
  // Trim off any slashes from the template name
75
+ $template_name = ltrim( $template_name, '/' );
76
+
77
+ // Loop through template stack
78
+ foreach ( (array) $template_locations as $template_location ) {
79
+
80
+ // Continue if $template_location is empty
81
+ if ( empty( $template_location ) )
82
+ continue;
83
+
84
+ // Check child theme first
85
+ if ( file_exists( trailingslashit( $template_location ) . $template_name ) ) {
86
+ $located = trailingslashit( $template_location ) . $template_name;
87
+ break 2;
88
+ }
 
 
89
  }
90
  }
91
 
92
+ // Maybe load the template if one was located
93
  if ( ( true == $load ) && !empty( $located ) )
94
  load_template( $located, $require_once );
95
 
96
  return $located;
97
  }
98
 
99
+ /**
100
+ * This is really cool. This function registers a new template stack location,
101
+ * using WordPress's built in filters API.
102
+ *
103
+ * This allows for templates to live in places beyond just the parent/child
104
+ * relationship, to allow for custom template locations. Used in conjunction
105
+ * with bbp_locate_template(), this allows for easy template overrides.
106
+ *
107
+ * @since bbPress (r4323)
108
+ *
109
+ * @param string $location Callback function that returns the
110
+ * @param int $priority
111
+ */
112
+ function bbp_register_template_stack( $location_callback = '', $priority = 10 ) {
113
+
114
+ // Bail if no location, or function does not exist
115
+ if ( empty( $location_callback ) || ! function_exists( $location_callback ) )
116
+ return false;
117
+
118
+ // Add location callback to template stack
119
+ add_filter( 'bbp_template_stack', $location_callback, (int) $priority );
120
+ }
121
+
122
+ /**
123
+ * Call the functions added to the 'bbp_template_stack' filter hook, and return
124
+ * an array of the template locations.
125
+ *
126
+ * @see bbp_register_template_stack()
127
+ *
128
+ * @since bbPress (r4323)
129
+ *
130
+ * @global array $wp_filter Stores all of the filters
131
+ * @global array $merged_filters Merges the filter hooks using this function.
132
+ * @global array $wp_current_filter stores the list of current filters with the current one last
133
+ *
134
+ * @return array The filtered value after all hooked functions are applied to it.
135
+ */
136
+ function bbp_get_template_stack() {
137
+ global $wp_filter, $merged_filters, $wp_current_filter;
138
+
139
+ // Setup some default variables
140
+ $tag = 'bbp_template_stack';
141
+ $args = $stack = array();
142
+
143
+ // Add 'bbp_template_stack' to the current filter array
144
+ $wp_current_filter[] = $tag;
145
+
146
+ // Sort
147
+ if ( ! isset( $merged_filters[ $tag ] ) ) {
148
+ ksort( $wp_filter[$tag] );
149
+ $merged_filters[ $tag ] = true;
150
+ }
151
+
152
+ // Ensure we're always at the beginning of the filter array
153
+ reset( $wp_filter[ $tag ] );
154
+
155
+ // Loop through 'bbp_template_stack' filters, and call callback functions
156
+ do {
157
+ foreach( (array) current( $wp_filter[$tag] ) as $the_ ) {
158
+ if ( ! is_null( $the_['function'] ) ) {
159
+ $args[1] = $stack;
160
+ $stack[] = call_user_func_array( $the_['function'], array_slice( $args, 1, (int) $the_['accepted_args'] ) );
161
+ }
162
+ }
163
+ } while ( next( $wp_filter[$tag] ) !== false );
164
+
165
+ // Remove 'bbp_template_stack' from the current filter array
166
+ array_pop( $wp_current_filter );
167
+
168
+ // Remove empties and duplicates
169
+ $stack = array_unique( array_filter( $stack ) );
170
+
171
+ return (array) apply_filters( 'bbp_get_template_stack', $stack ) ;
172
+ }
173
+
174
  /**
175
  * Retrieve path to a template
176
  *
235
  $locations = bbp_get_template_locations( $templates );
236
 
237
  // Loop through locations and templates and combine
238
+ foreach ( (array) $locations as $location )
239
+ foreach ( (array) $templates as $template )
240
+ $retval[] = ltrim( trailingslashit( $location ) . $template, '/' );
241
 
242
+ return apply_filters( 'bbp_add_template_locations', array_unique( $retval ), $templates );
243
  }
244
 
245
  /**
265
  * @uses get_query_var() To get {@link WP_Query} query var
266
  * @uses is_email() To check if the string is an email
267
  * @uses get_user_by() To try to get the user by email and nicename
268
+ * @uses get_userdata() to get the user data
 
269
  * @uses current_user_can() To check if the current user can edit the user
270
+ * @uses is_user_member_of_blog() To check if user profile page exists
271
+ * @uses WP_Query::set_404() To set a 404 status
272
  * @uses apply_filters() Calls 'enable_edit_any_user_configuration' with true
273
  * @uses bbp_get_view_query_args() To get the view query args
274
  * @uses bbp_get_forum_post_type() To get the forum post type
291
  return;
292
 
293
  // Get query variables
 
294
  $bbp_view = $posts_query->get( bbp_get_view_rewrite_id() );
295
+ $bbp_user = $posts_query->get( bbp_get_user_rewrite_id() );
296
  $is_edit = $posts_query->get( bbp_get_edit_rewrite_id() );
297
 
298
  // It is a user page - We'll also check if it is user edit
316
  }
317
  }
318
 
319
+ // Cast as int, just in case
320
+ $bbp_user = (int) $bbp_user;
321
 
322
+ // 404 and bail if user does not have a profile
323
+ if ( ! bbp_user_has_profile( $bbp_user ) ) {
324
  $posts_query->set_404();
325
  return;
326
  }
327
 
328
  /** User Exists *******************************************************/
329
 
330
+ $is_favs = $posts_query->get( bbp_get_user_favorites_rewrite_id() );
331
+ $is_subs = $posts_query->get( bbp_get_user_subscriptions_rewrite_id() );
332
+ $is_topics = $posts_query->get( bbp_get_user_topics_rewrite_id() );
333
+ $is_replies = $posts_query->get( bbp_get_user_replies_rewrite_id() );
334
+
335
  // View or edit?
336
  if ( !empty( $is_edit ) ) {
337
 
348
  require_once( ABSPATH . 'wp-admin/includes/user.php' );
349
  }
350
 
351
+ // Load the grant/revoke super admin functions
352
+ if ( is_multisite() && !function_exists( 'revoke_super_admin' ) ) {
353
+ require_once( ABSPATH . 'wp-admin/includes/ms.php' );
354
+ }
355
+
356
  // Editing a user
357
  $posts_query->bbp_is_edit = true;
358
 
359
+ // User favorites
360
+ } elseif ( ! empty( $is_favs ) ) {
361
+ $posts_query->bbp_is_single_user_favs = true;
362
+
363
+ // User subscriptions
364
+ } elseif ( ! empty( $is_subs ) ) {
365
+ $posts_query->bbp_is_single_user_subs = true;
366
+
367
+ // User topics
368
+ } elseif ( ! empty( $is_topics ) ) {
369
+ $posts_query->bbp_is_single_user_topics = true;
370
+
371
+ // User topics
372
+ } elseif ( ! empty( $is_replies ) ) {
373
+ $posts_query->bbp_is_single_user_replies = true;
374
+
375
+ // User profile
376
  } else {
377
+ $posts_query->bbp_is_single_user_profile = true;
378
  }
379
 
380
+ // Looking at a single user
381
+ $posts_query->bbp_is_single_user = true;
382
+
383
  // Make sure 404 is not set
384
  $posts_query->is_404 = false;
385
 
386
  // Correct is_home variable
387
  $posts_query->is_home = false;
388
 
389
+ // Get the user data
390
+ $user = get_userdata( $bbp_user );
391
+
392
+ // User is looking at their own profile
393
+ if ( get_current_user_id() == $user->ID ) {
394
+ $posts_query->bbp_is_single_user_home = true;
395
+ }
396
+
397
  // Set bbp_user_id for future reference
398
  $posts_query->set( 'bbp_user_id', $user->ID );
399
 
bbp-includes/bbp-template-loader.php → includes/core/template-loader.php RENAMED
@@ -49,6 +49,12 @@ function bbp_template_include_theme_supports( $template = '' ) {
49
  // Editing a user
50
  if ( bbp_is_single_user_edit() && ( $new_template = bbp_get_single_user_edit_template() ) ) :
51
 
 
 
 
 
 
 
52
  // Viewing a user
53
  elseif ( bbp_is_single_user() && ( $new_template = bbp_get_single_user_template() ) ) :
54
 
@@ -119,6 +125,10 @@ function bbp_template_include_theme_supports( $template = '' ) {
119
  function bbp_load_theme_functions() {
120
  global $pagenow;
121
 
 
 
 
 
122
  if ( ! defined( 'WP_INSTALLING' ) || ( !empty( $pagenow ) && ( 'wp-activate.php' !== $pagenow ) ) ) {
123
  bbp_locate_template( 'bbpress-functions.php', true );
124
  }
@@ -160,7 +170,7 @@ function bbp_get_single_user_edit_template() {
160
  $nicename = bbp_get_displayed_user_field( 'user_nicename' );
161
  $user_id = bbp_get_displayed_user_id();
162
  $templates = array(
163
- 'single-user-edit-' . $nicename . '.php', // Single User Edt nicename
164
  'single-user-edit-' . $user_id . '.php', // Single User Edit ID
165
  'single-user-edit.php', // Single User Edit
166
  'user-edit.php', // User Edit
@@ -169,6 +179,52 @@ function bbp_get_single_user_edit_template() {
169
  return bbp_get_query_template( 'profile_edit', $templates );
170
  }
171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  /**
173
  * Get the view template
174
  *
@@ -231,10 +287,8 @@ function bbp_get_forum_archive_template() {
231
  * @return string Path to template file
232
  */
233
  function bbp_get_forum_edit_template() {
234
- $post_type = bbp_get_forum_post_type();
235
  $templates = array(
236
- 'single-' . $post_type . '-edit.php', // Single Forum Edit
237
- 'single-' . $post_type . '.php', // Single Forum
238
  );
239
  return bbp_get_query_template( 'forum_edit', $templates );
240
  }
@@ -281,10 +335,8 @@ function bbp_get_topic_archive_template() {
281
  * @return string Path to template file
282
  */
283
  function bbp_get_topic_edit_template() {
284
- $post_type = bbp_get_topic_post_type();
285
  $templates = array(
286
- 'single-' . $post_type . '-edit.php', // Single Topic Edit
287
- 'single-' . $post_type . '.php', // Single Topic
288
  );
289
  return bbp_get_query_template( 'topic_edit', $templates );
290
  }
@@ -299,9 +351,8 @@ function bbp_get_topic_edit_template() {
299
  * @return string Path to template file
300
  */
301
  function bbp_get_topic_split_template() {
302
- $post_type = bbp_get_topic_post_type();
303
  $templates = array(
304
- 'single-' . $post_type . '-split.php', // Topic Split
305
  );
306
  return bbp_get_query_template( 'topic_split', $templates );
307
  }
@@ -316,9 +367,8 @@ function bbp_get_topic_split_template() {
316
  * @return string Path to template file
317
  */
318
  function bbp_get_topic_merge_template() {
319
- $post_type = bbp_get_topic_post_type();
320
  $templates = array(
321
- 'single-' . $post_type . '-merge.php', // Topic Merge
322
  );
323
  return bbp_get_query_template( 'topic_merge', $templates );
324
  }
@@ -349,10 +399,8 @@ function bbp_get_single_reply_template() {
349
  * @return string Path to template file
350
  */
351
  function bbp_get_reply_edit_template() {
352
- $post_type = bbp_get_reply_post_type();
353
  $templates = array(
354
- 'single-' . $post_type . '-edit.php', // Single Reply Edit
355
- 'single-' . $post_type . '.php', // Single Reply
356
  );
357
  return bbp_get_query_template( 'reply_edit', $templates );
358
  }
@@ -390,9 +438,7 @@ function bbp_get_topic_tag_edit_template() {
390
  $tt_id = bbp_get_topic_tag_tax_id();
391
  $templates = array(
392
  'taxonomy-' . $tt_slug . '-edit.php', // Single Topic Tag Edit slug
393
- 'taxonomy-' . $tt_id . '-edit.php', // Single Topic Tag Edit ID
394
- 'taxonomy-' . $tt_slug . '.php', // Single Topic Tag slug
395
- 'taxonomy-' . $tt_id . '.php', // Single Topic Tag ID
396
  );
397
  return bbp_get_query_template( 'topic_tag_edit', $templates );
398
  }
49
  // Editing a user
50
  if ( bbp_is_single_user_edit() && ( $new_template = bbp_get_single_user_edit_template() ) ) :
51
 
52
+ // User favorites
53
+ elseif ( bbp_is_favorites() && ( $new_template = bbp_get_favorites_template() ) ) :
54
+
55
+ // User favorites
56
+ elseif ( bbp_is_subscriptions() && ( $new_template = bbp_get_subscriptions_template() ) ) :
57
+
58
  // Viewing a user
59
  elseif ( bbp_is_single_user() && ( $new_template = bbp_get_single_user_template() ) ) :
60
 
125
  function bbp_load_theme_functions() {
126
  global $pagenow;
127
 
128
+ // If bbPress is being deactivated, do not load any more files
129
+ if ( bbp_is_deactivation() )
130
+ return;
131
+
132
  if ( ! defined( 'WP_INSTALLING' ) || ( !empty( $pagenow ) && ( 'wp-activate.php' !== $pagenow ) ) ) {
133
  bbp_locate_template( 'bbpress-functions.php', true );
134
  }
170
  $nicename = bbp_get_displayed_user_field( 'user_nicename' );
171
  $user_id = bbp_get_displayed_user_id();
172
  $templates = array(
173
+ 'single-user-edit-' . $nicename . '.php', // Single User Edit nicename
174
  'single-user-edit-' . $user_id . '.php', // Single User Edit ID
175
  'single-user-edit.php', // Single User Edit
176
  'user-edit.php', // User Edit
179
  return bbp_get_query_template( 'profile_edit', $templates );
180
  }
181
 
182
+ /**
183
+ * Get the user favorites template
184
+ *
185
+ * @since bbPress (r4225)
186
+ *
187
+ * @uses bbp_get_displayed_user_id()
188
+ * @uses bbp_get_query_template()
189
+ * @return string Path to template file
190
+ */
191
+ function bbp_get_favorites_template() {
192
+ $nicename = bbp_get_displayed_user_field( 'user_nicename' );
193
+ $user_id = bbp_get_displayed_user_id();
194
+ $templates = array(
195
+ 'single-user-favorites-' . $nicename . '.php', // Single User Favs nicename
196
+ 'single-user-favorites-' . $user_id . '.php', // Single User Favs ID
197
+ 'favorites-' . $nicename . '.php', // Favorites nicename
198
+ 'favorites-' . $user_id . '.php', // Favorites ID
199
+ 'favorites.php', // Favorites
200
+ 'user.php', // User
201
+ );
202
+ return bbp_get_query_template( 'favorites', $templates );
203
+ }
204
+
205
+ /**
206
+ * Get the user subscriptions template
207
+ *
208
+ * @since bbPress (r4225)
209
+ *
210
+ * @uses bbp_get_displayed_user_id()
211
+ * @uses bbp_get_query_template()
212
+ * @return string Path to template file
213
+ */
214
+ function bbp_get_subscriptions_template() {
215
+ $nicename = bbp_get_displayed_user_field( 'user_nicename' );
216
+ $user_id = bbp_get_displayed_user_id();
217
+ $templates = array(
218
+ 'single-user-subscriptions-' . $nicename . '.php', // Single User Subs nicename
219
+ 'single-user-subscriptions-' . $user_id . '.php', // Single User Subs ID
220
+ 'subscriptions-' . $nicename . '.php', // Subscriptions nicename
221
+ 'subscriptions-' . $user_id . '.php', // Subscriptions ID
222
+ 'subscriptions.php', // Subscriptions
223
+ 'user.php', // User
224
+ );
225
+ return bbp_get_query_template( 'subscriptions', $templates );
226
+ }
227
+
228
  /**
229
  * Get the view template
230
  *
287
  * @return string Path to template file
288
  */
289
  function bbp_get_forum_edit_template() {
 
290
  $templates = array(
291
+ 'single-' . bbp_get_forum_post_type() . '-edit.php' // Single Forum Edit
 
292
  );
293
  return bbp_get_query_template( 'forum_edit', $templates );
294
  }
335
  * @return string Path to template file
336
  */
337
  function bbp_get_topic_edit_template() {
 
338
  $templates = array(
339
+ 'single-' . bbp_get_topic_post_type() . '-edit.php' // Single Topic Edit
 
340
  );
341
  return bbp_get_query_template( 'topic_edit', $templates );
342
  }
351
  * @return string Path to template file
352
  */
353
  function bbp_get_topic_split_template() {
 
354
  $templates = array(
355
+ 'single-' . bbp_get_topic_post_type() . '-split.php', // Topic Split
356
  );
357
  return bbp_get_query_template( 'topic_split', $templates );
358
  }
367
  * @return string Path to template file
368
  */
369
  function bbp_get_topic_merge_template() {
 
370
  $templates = array(
371
+ 'single-' . bbp_get_topic_post_type() . '-merge.php', // Topic Merge
372
  );
373
  return bbp_get_query_template( 'topic_merge', $templates );
374
  }
399
  * @return string Path to template file
400
  */
401
  function bbp_get_reply_edit_template() {
 
402
  $templates = array(
403
+ 'single-' . bbp_get_reply_post_type() . '-edit.php' // Single Reply Edit
 
404
  );
405
  return bbp_get_query_template( 'reply_edit', $templates );
406
  }
438
  $tt_id = bbp_get_topic_tag_tax_id();
439
  $templates = array(
440
  'taxonomy-' . $tt_slug . '-edit.php', // Single Topic Tag Edit slug
441
+ 'taxonomy-' . $tt_id . '-edit.php' // Single Topic Tag Edit ID
 
 
442
  );
443
  return bbp_get_query_template( 'topic_tag_edit', $templates );
444
  }
bbp-includes/bbp-theme-compatibility.php → includes/core/theme-compat.php RENAMED
@@ -299,16 +299,30 @@ function bbp_theme_compat_reset_post( $args = array() ) {
299
 
300
  // Default arguments
301
  $defaults = array(
302
- 'ID' => -9999,
303
- 'post_title' => '',
304
- 'post_author' => 0,
305
- 'post_date' => 0,
306
- 'post_content' => '',
307
- 'post_excerpt' => '',
308
- 'post_type' => 'page',
309
- 'post_status' => bbp_get_public_status_id(),
310
- 'post_name' => '',
311
- 'comment_status' => 'closed',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  'is_404' => false,
313
  'is_page' => false,
314
  'is_single' => false,
@@ -317,18 +331,32 @@ function bbp_theme_compat_reset_post( $args = array() ) {
317
  );
318
 
319
  // Switch defaults if post is set
320
- if ( isset( $wp_query->post ) ) {
321
  $defaults = array(
322
- 'ID' => get_the_ID(),
323
- 'post_title' => get_the_title(),
324
- 'post_author' => get_the_author_meta('ID'),
325
- 'post_date' => get_the_date(),
326
- 'post_content' => get_the_content(),
327
- 'post_excerpt' => get_the_excerpt(),
328
- 'post_type' => get_post_type(),
329
- 'post_status' => get_post_status(),
330
- 'post_name' => !empty( $wp_query->post->post_name ) ? $wp_query->post->post_name : '',
331
- 'comment_status' => comments_open(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  'is_404' => false,
333
  'is_page' => false,
334
  'is_single' => false,
@@ -344,17 +372,30 @@ function bbp_theme_compat_reset_post( $args = array() ) {
344
  unset( $post );
345
 
346
  // Setup the dummy post object
347
- $wp_query->post = new stdClass;
348
- $wp_query->post->ID = $dummy['ID'];
349
- $wp_query->post->post_title = $dummy['post_title'];
350
- $wp_query->post->post_author = $dummy['post_author'];
351
- $wp_query->post->post_date = $dummy['post_date'];
352
- $wp_query->post->post_content = $dummy['post_content'];
353
- $wp_query->post->post_excerpt = $dummy['post_excerpt'];
354
- $wp_query->post->post_type = $dummy['post_type'];
355
- $wp_query->post->post_status = $dummy['post_status'];
356
- $wp_query->post->post_name = $dummy['post_name'];
357
- $wp_query->post->comment_status = $dummy['comment_status'];
 
 
 
 
 
 
 
 
 
 
 
 
 
358
 
359
  // Set the $post global
360
  $post = $wp_query->post;
@@ -370,6 +411,14 @@ function bbp_theme_compat_reset_post( $args = array() ) {
370
  $wp_query->is_archive = $dummy['is_archive'];
371
  $wp_query->is_tax = $dummy['is_tax'];
372
 
 
 
 
 
 
 
 
 
373
  // If we are resetting a post, we are in theme compat
374
  bbp_set_theme_compat_active();
375
  }
@@ -477,7 +526,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
477
  ) );
478
 
479
  // Single Topic
480
- } elseif ( bbp_is_topic_edit() || bbp_is_topic_split() || bbp_is_topic_merge() || bbp_is_single_topic() ) {
481
 
482
  // Reset post
483
  bbp_theme_compat_reset_post( array(
@@ -543,25 +592,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
543
  /** Topic Tags ********************************************************/
544
 
545
  // Topic Tag Edit
546
- } elseif ( bbp_is_topic_tag_edit() ) {
547
-
548
- // Stash the current term in a new var
549
- set_query_var( 'bbp_topic_tag', get_query_var( 'term' ) );
550
-
551
- // Reset the post with our new title
552
- bbp_theme_compat_reset_post( array(
553
- 'ID' => 0,
554
- 'post_author' => 0,
555
- 'post_date' => 0,
556
- 'post_content' => '',
557
- 'post_type' => '',
558
- 'post_title' => sprintf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ),
559
- 'post_status' => bbp_get_public_status_id(),
560
- 'comment_status' => 'closed'
561
- ) );
562
-
563
- // Topc Tag
564
- } elseif ( bbp_is_topic_tag() ) {
565
 
566
  // Stash the current term in a new var
567
  set_query_var( 'bbp_topic_tag', get_query_var( 'term' ) );
@@ -621,6 +652,11 @@ function bbp_template_include_theme_compat( $template = '' ) {
621
  * @return type
622
  */
623
  function bbp_replace_the_content( $content = '' ) {
 
 
 
 
 
624
  $bbp = bbpress();
625
 
626
  // Define local variable(s)
@@ -636,7 +672,7 @@ function bbp_replace_the_content( $content = '' ) {
636
  /** Users *************************************************************/
637
 
638
  // Profile View
639
- if ( bbp_is_single_user() ) {
640
  ob_start();
641
 
642
  bbp_get_template_part( 'content', 'single-user' );
@@ -645,16 +681,6 @@ function bbp_replace_the_content( $content = '' ) {
645
 
646
  ob_end_clean();
647
 
648
- // Profile Edit
649
- } elseif ( bbp_is_single_user_edit() ) {
650
- ob_start();
651
-
652
- bbp_get_template_part( 'content', 'single-user-edit' );
653
-
654
- $new_content = ob_get_contents();
655
-
656
- ob_end_clean();
657
-
658
  /** Forums ************************************************************/
659
 
660
  // Forum archive
@@ -780,16 +806,13 @@ function bbp_replace_the_content( $content = '' ) {
780
 
781
  /** Topic Tags ********************************************************/
782
 
783
- } elseif ( get_query_var( 'bbp_topic_tag' ) ) {
784
-
785
- // Edit topic tag
786
- if ( bbp_is_topic_tag_edit() ) {
787
- $new_content = $bbp->shortcodes->display_topic_tag_form();
788
 
789
- // Show topics of tag
790
- } else {
791
- $new_content = $bbp->shortcodes->display_topics_of_tag( array( 'id' => bbp_get_topic_tag_id() ) );
792
- }
793
  }
794
 
795
  // Juggle the content around and try to prevent unsightly comments
299
 
300
  // Default arguments
301
  $defaults = array(
302
+ 'ID' => -9999,
303
+ 'post_status' => bbp_get_public_status_id(),
304
+ 'post_author' => 0,
305
+ 'post_parent' => 0,
306
+ 'post_type' => 'page',
307
+ 'post_date' => 0,
308
+ 'post_date_gmt' => 0,
309
+ 'post_modified' => 0,
310
+ 'post_modified_gmt' => 0,
311
+ 'post_content' => '',
312
+ 'post_title' => '',
313
+ 'post_excerpt' => '',
314
+ 'post_content_filtered' => '',
315
+ 'post_mime_type' => '',
316
+ 'post_password' => '',
317
+ 'post_name' => '',
318
+ 'guid' => '',
319
+ 'menu_order' => 0,
320
+ 'pinged' => '',
321
+ 'to_ping' => '',
322
+ 'ping_status' => '',
323
+ 'comment_status' => 'closed',
324
+ 'comment_count' => 0,
325
+
326
  'is_404' => false,
327
  'is_page' => false,
328
  'is_single' => false,
331
  );
332
 
333
  // Switch defaults if post is set
334
+ if ( isset( $wp_query->post ) ) {
335
  $defaults = array(
336
+ 'ID' => $wp_query->post->ID,
337
+ 'post_status' => $wp_query->post->post_status,
338
+ 'post_author' => $wp_query->post->post_author,
339
+ 'post_parent' => $wp_query->post->post_parent,
340
+ 'post_type' => $wp_query->post->post_type,
341
+ 'post_date' => $wp_query->post->post_date,
342
+ 'post_date_gmt' => $wp_query->post->post_date_gmt,
343
+ 'post_modified' => $wp_query->post->post_modified,
344
+ 'post_modified_gmt' => $wp_query->post->post_modified_gmt,
345
+ 'post_content' => $wp_query->post->post_content,
346
+ 'post_title' => $wp_query->post->post_title,
347
+ 'post_excerpt' => $wp_query->post->post_excerpt,
348
+ 'post_content_filtered' => $wp_query->post->post_content_filtered,
349
+ 'post_mime_type' => $wp_query->post->post_mime_type,
350
+ 'post_password' => $wp_query->post->post_password,
351
+ 'post_name' => $wp_query->post->post_name,
352
+ 'guid' => $wp_query->post->guid,
353
+ 'menu_order' => $wp_query->post->menu_order,
354
+ 'pinged' => $wp_query->post->pinged,
355
+ 'to_ping' => $wp_query->post->to_ping,
356
+ 'ping_status' => $wp_query->post->ping_status,
357
+ 'comment_status' => $wp_query->post->comment_status,
358
+ 'comment_count' => $wp_query->post->comment_count,
359
+
360
  'is_404' => false,
361
  'is_page' => false,
362
  'is_single' => false,
372
  unset( $post );
373
 
374
  // Setup the dummy post object
375
+ $wp_query->post = new stdClass;
376
+ $wp_query->post->ID = $dummy['ID'];
377
+ $wp_query->post->post_status = $dummy['post_status'];
378
+ $wp_query->post->post_author = $dummy['post_author'];
379
+ $wp_query->post->post_parent = $dummy['post_parent'];
380
+ $wp_query->post->post_type = $dummy['post_type'];
381
+ $wp_query->post->post_date = $dummy['post_date'];
382
+ $wp_query->post->post_date_gmt = $dummy['post_date_gmt'];
383
+ $wp_query->post->post_modified = $dummy['post_modified'];
384
+ $wp_query->post->post_modified_gmt = $dummy['post_modified_gmt'];
385
+ $wp_query->post->post_content = $dummy['post_content'];
386
+ $wp_query->post->post_title = $dummy['post_title'];
387
+ $wp_query->post->post_excerpt = $dummy['post_excerpt'];
388
+ $wp_query->post->post_content_filtered = $dummy['post_content_filtered'];
389
+ $wp_query->post->post_mime_type = $dummy['post_mime_type'];
390
+ $wp_query->post->post_password = $dummy['post_password'];
391
+ $wp_query->post->post_name = $dummy['post_name'];
392
+ $wp_query->post->guid = $dummy['guid'];
393
+ $wp_query->post->menu_order = $dummy['menu_order'];
394
+ $wp_query->post->pinged = $dummy['pinged'];
395
+ $wp_query->post->to_ping = $dummy['to_ping'];
396
+ $wp_query->post->ping_status = $dummy['ping_status'];
397
+ $wp_query->post->comment_status = $dummy['comment_status'];
398
+ $wp_query->post->comment_count = $dummy['comment_count'];
399
 
400
  // Set the $post global
401
  $post = $wp_query->post;
411
  $wp_query->is_archive = $dummy['is_archive'];
412
  $wp_query->is_tax = $dummy['is_tax'];
413
 
414
+ /**
415
+ * Force the header back to 200 status if not a deliberate 404
416
+ *
417
+ * @see http://bbpress.trac.wordpress.org/ticket/1973
418
+ */
419
+ if ( ! $wp_query->is_404() )
420
+ status_header( 200 );
421
+
422
  // If we are resetting a post, we are in theme compat
423
  bbp_set_theme_compat_active();
424
  }
526
  ) );
527
 
528
  // Single Topic
529
+ } elseif ( bbp_is_topic_edit() || bbp_is_single_topic() ) {
530
 
531
  // Reset post
532
  bbp_theme_compat_reset_post( array(
592
  /** Topic Tags ********************************************************/
593
 
594
  // Topic Tag Edit
595
+ } elseif ( bbp_is_topic_tag_edit() || bbp_is_topic_tag() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
596
 
597
  // Stash the current term in a new var
598
  set_query_var( 'bbp_topic_tag', get_query_var( 'term' ) );
652
  * @return type
653
  */
654
  function bbp_replace_the_content( $content = '' ) {
655
+
656
+ // Bail if not inside the main query loop
657
+ if ( ! in_the_loop() || ! is_main_query() )
658
+ return $content;
659
+
660
  $bbp = bbpress();
661
 
662
  // Define local variable(s)
672
  /** Users *************************************************************/
673
 
674
  // Profile View
675
+ if ( bbp_is_single_user_edit() || bbp_is_single_user() ) {
676
  ob_start();
677
 
678
  bbp_get_template_part( 'content', 'single-user' );
681
 
682
  ob_end_clean();
683
 
 
 
 
 
 
 
 
 
 
 
684
  /** Forums ************************************************************/
685
 
686
  // Forum archive
806
 
807
  /** Topic Tags ********************************************************/
808
 
809
+ // Show topics of tag
810
+ } elseif ( bbp_is_topic_tag() ) {
811
+ $new_content = $bbp->shortcodes->display_topics_of_tag( array( 'id' => bbp_get_topic_tag_id() ) );
 
 
812
 
813
+ // Edit topic tag
814
+ } elseif ( bbp_is_topic_tag_edit() ) {
815
+ $new_content = $bbp->shortcodes->display_topic_tag_form();
 
816
  }
817
 
818
  // Juggle the content around and try to prevent unsightly comments
bbp-includes/bbp-core-update.php → includes/core/update.php RENAMED
@@ -33,7 +33,10 @@ function bbp_is_install() {
33
  * @return bool True if update, False if not
34
  */
35
  function bbp_is_update() {
36
- return (bool) ( (int) bbp_get_db_version_raw() < (int) bbp_get_db_version() );
 
 
 
37
  }
38
 
39
  /**
@@ -60,10 +63,11 @@ function bbp_is_activation( $basename = '' ) {
60
  return false;
61
 
62
  // The plugin(s) being activated
63
- if ( $action == 'activate' )
64
  $plugins = isset( $_GET['plugin'] ) ? array( $_GET['plugin'] ) : array();
65
- else
66
  $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
 
67
 
68
  // Set basename if empty
69
  if ( empty( $basename ) && !empty( $bbp->basename ) )
@@ -73,7 +77,7 @@ function bbp_is_activation( $basename = '' ) {
73
  if ( empty( $basename ) )
74
  return false;
75
 
76
- // Is bbPress being deactivated?
77
  return in_array( $basename, $plugins );
78
  }
79
 
@@ -97,10 +101,11 @@ function bbp_is_deactivation( $basename = '' ) {
97
  return false;
98
 
99
  // The plugin(s) being deactivated
100
- if ( $action == 'deactivate' )
101
  $plugins = isset( $_GET['plugin'] ) ? array( $_GET['plugin'] ) : array();
102
- else
103
  $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
 
104
 
105
  // Set basename if empty
106
  if ( empty( $basename ) && !empty( $bbp->basename ) )
@@ -131,27 +136,18 @@ function bbp_version_bump() {
131
  *
132
  * @since bbPress (r3419)
133
  *
 
134
  * @uses bbp_version_bump()
135
- * @uses bbp_deactivation()
136
- * @uses bbp_activation()
137
  */
138
  function bbp_setup_updater() {
139
 
140
- // Are we running an outdated version of bbPress?
141
- if ( bbp_is_update() ) {
142
-
143
- // Call the automated updater
144
- bbp_version_updater();
145
-
146
- // Bump the version
147
- bbp_version_bump();
148
-
149
- // Run the deactivation function to wipe roles, caps, and rewrite rules
150
- bbp_deactivation();
151
 
152
- // Run the activation function to reset roles, caps, and rewrite rules
153
- bbp_activation();
154
- }
155
  }
156
 
157
  /**
@@ -227,10 +223,6 @@ function bbp_version_updater() {
227
  // Get the raw database version
228
  $raw_db_version = (int) bbp_get_db_version_raw();
229
 
230
- // Bail if no database version exists
231
- if ( empty( $raw_db_version ) )
232
- return;
233
-
234
  /** 2.0 Branch ************************************************************/
235
 
236
  // 2.0, 2.0.1, 2.0.2, 2.0.3
@@ -255,6 +247,45 @@ function bbp_version_updater() {
255
 
256
  // 2.2
257
  if ( $raw_db_version < 220 ) {
258
- // No changes yet
 
 
 
 
 
 
 
 
 
259
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  }
33
  * @return bool True if update, False if not
34
  */
35
  function bbp_is_update() {
36
+ $raw = (int) bbp_get_db_version_raw();
37
+ $cur = (int) bbp_get_db_version();
38
+ $retval = (bool) ( $raw < $cur );
39
+ return $retval;
40
  }
41
 
42
  /**
63
  return false;
64
 
65
  // The plugin(s) being activated
66
+ if ( $action == 'activate' ) {
67
  $plugins = isset( $_GET['plugin'] ) ? array( $_GET['plugin'] ) : array();
68
+ } else {
69
  $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
70
+ }
71
 
72
  // Set basename if empty
73
  if ( empty( $basename ) && !empty( $bbp->basename ) )
77
  if ( empty( $basename ) )
78
  return false;
79
 
80
+ // Is bbPress being activated?
81
  return in_array( $basename, $plugins );
82
  }
83
 
101
  return false;
102
 
103
  // The plugin(s) being deactivated
104
+ if ( $action == 'deactivate' ) {
105
  $plugins = isset( $_GET['plugin'] ) ? array( $_GET['plugin'] ) : array();
106
+ } else {
107
  $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
108
+ }
109
 
110
  // Set basename if empty
111
  if ( empty( $basename ) && !empty( $bbp->basename ) )
136
  *
137
  * @since bbPress (r3419)
138
  *
139
+ * @uses bbp_version_updater()
140
  * @uses bbp_version_bump()
141
+ * @uses flush_rewrite_rules()
 
142
  */
143
  function bbp_setup_updater() {
144
 
145
+ // Bail if no update needed
146
+ if ( ! bbp_is_update() )
147
+ return;
 
 
 
 
 
 
 
 
148
 
149
+ // Call the automated updater
150
+ bbp_version_updater();
 
151
  }
152
 
153
  /**
223
  // Get the raw database version
224
  $raw_db_version = (int) bbp_get_db_version_raw();
225
 
 
 
 
 
226
  /** 2.0 Branch ************************************************************/
227
 
228
  // 2.0, 2.0.1, 2.0.2, 2.0.3
247
 
248
  // 2.2
249
  if ( $raw_db_version < 220 ) {
250
+
251
+ // Remove bbPress 1.1 roles (BuddyPress)
252
+ remove_role( 'member' );
253
+ remove_role( 'inactive' );
254
+ remove_role( 'blocked' );
255
+ remove_role( 'moderator' );
256
+ remove_role( 'keymaster' );
257
+
258
+ // Refresh capabilities
259
+ bbp_remove_caps();
260
  }
261
+
262
+ /** All done! *************************************************************/
263
+
264
+ // Bump the version
265
+ bbp_version_bump();
266
+
267
+ // Delete rewrite rules to force a flush
268
+ bbp_delete_rewrite_rules();
269
+ }
270
+
271
+ /**
272
+ * Redirect user to bbPress's What's New page on activation
273
+ *
274
+ * @since bbPress (r4389)
275
+ *
276
+ * @internal Used internally to redirect bbPress to the about page on activation
277
+ *
278
+ * @uses is_network_admin() To bail if being network activated
279
+ * @uses set_transient() To drop the activation transient for 30 seconds
280
+ *
281
+ * @return If network admin or bulk activation
282
+ */
283
+ function bbp_add_activation_redirect() {
284
+
285
+ // Bail if activating from network, or bulk
286
+ if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
287
+ return;
288
+
289
+ // Add the transient to redirect
290
+ set_transient( '_bbp_activation_redirect', true, 30 );
291
  }
bbp-includes/bbp-extend-akismet.php → includes/extend/akismet.php RENAMED
@@ -384,19 +384,21 @@ class BBP_Akismet {
384
  $query_string .= $key . '=' . urlencode( stripslashes( $data ) ) . '&';
385
 
386
  // Aim...
387
- if ( 'check' == $check )
388
  $path = '/1.1/comment-check';
389
- elseif ( 'submit' == $check )
390
  $path = '/1.1/submit-' . $spam;
 
391
 
392
  // Fire!
393
  $response = $this->http_post( $query_string, $akismet_api_host, $path, $akismet_api_port );
394
 
395
  // Check the high-speed cam
396
- if ( !empty( $response[1] ) && ! is_wp_error( $response[1] ) )
397
  $post_data['bbp_akismet_result'] = $response[1];
398
- else
399
- $post_data['bbp_akismet_result'] = 'false';
 
400
 
401
  // This is ham
402
  return $post_data;
@@ -682,22 +684,3 @@ class BBP_Akismet {
682
  }
683
  }
684
  endif;
685
-
686
- /**
687
- * Loads Akismet inside the bbPress global class
688
- *
689
- * @since bbPress (r3277)
690
- *
691
- * @return If bbPress is not active
692
- */
693
- function bbp_setup_akismet() {
694
-
695
- // Bail if no akismet
696
- if ( !defined( 'AKISMET_VERSION' ) ) return;
697
-
698
- // Bail if Akismet is turned off
699
- if ( !bbp_is_akismet_active() ) return;
700
-
701
- // Instantiate Akismet for bbPress
702
- bbpress()->extend->akismet = new BBP_Akismet();
703
- }
384
  $query_string .= $key . '=' . urlencode( stripslashes( $data ) ) . '&';
385
 
386
  // Aim...
387
+ if ( 'check' == $check ) {
388
  $path = '/1.1/comment-check';
389
+ } elseif ( 'submit' == $check ) {
390
  $path = '/1.1/submit-' . $spam;
391
+ }
392
 
393
  // Fire!
394
  $response = $this->http_post( $query_string, $akismet_api_host, $path, $akismet_api_port );
395
 
396
  // Check the high-speed cam
397
+ if ( !empty( $response[1] ) ) {
398
  $post_data['bbp_akismet_result'] = $response[1];
399
+ } else {
400
+ $post_data['bbp_akismet_result'] = __( 'No response', 'bbpress' );
401
+ }
402
 
403
  // This is ham
404
  return $post_data;
684
  }
685
  }
686
  endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/extend/buddypress/activity.php ADDED
@@ -0,0 +1,708 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress BuddyPress Activity Class
5
+ *
6
+ * @package bbPress
7
+ * @subpackage BuddyPress
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+ if ( !class_exists( 'BBP_BuddyPress_Activity' ) ) :
14
+ /**
15
+ * Loads BuddyPress Activity extension
16
+ *
17
+ * @since bbPress (r3395)
18
+ *
19
+ * @package bbPress
20
+ * @subpackage BuddyPress
21
+ */
22
+ class BBP_BuddyPress_Activity {
23
+
24
+ /** Variables *************************************************************/
25
+
26
+ /**
27
+ * The name of the BuddyPress component, used in activity streams
28
+ *
29
+ * @var string
30
+ */
31
+ private $component = '';
32
+
33
+ /**
34
+ * Forum Create Activty Action
35
+ *
36
+ * @var string
37
+ */
38
+ private $forum_create = '';
39
+
40
+ /**
41
+ * Topic Create Activty Action
42
+ *
43
+ * @var string
44
+ */
45
+ private $topic_create = '';
46
+
47
+ /**
48
+ * Topic Close Activty Action
49
+ *
50
+ * @var string
51
+ */
52
+ private $topic_close = '';
53
+
54
+ /**
55
+ * Topic Edit Activty Action
56
+ *
57
+ * @var string
58
+ */
59
+ private $topic_edit = '';
60
+
61
+ /**
62
+ * Topic Open Activty Action
63
+ *
64
+ * @var string
65
+ */
66
+ private $topic_open = '';
67
+
68
+ /**
69
+ * Reply Create Activty Action
70
+ *
71
+ * @var string
72
+ */
73
+ private $reply_create = '';
74
+
75
+ /**
76
+ * Reply Edit Activty Action
77
+ *
78
+ * @var string
79
+ */
80
+ private $reply_edit = '';
81
+
82
+ /** Setup Methods *********************************************************/
83
+
84
+ /**
85
+ * The bbPress BuddyPress Activity loader
86
+ *
87
+ * @since bbPress (r3395)
88
+ */
89
+ public function __construct() {
90
+ $this->setup_globals();
91
+ $this->setup_actions();
92
+ $this->setup_filters();
93
+ $this->fully_loaded();
94
+ }
95
+
96
+ /**
97
+ * Extension variables
98
+ *
99
+ * @since bbPress (r3395)
100
+ * @access private
101
+ * @uses apply_filters() Calls various filters
102
+ */
103
+ private function setup_globals() {
104
+
105
+ // The name of the BuddyPress component, used in activity streams
106
+ $this->component = 'bbpress';
107
+
108
+ // Forums
109
+ $this->forum_create = 'bbp_forum_create';
110
+
111
+ // Topics
112
+ $this->topic_create = 'bbp_topic_create';
113
+ $this->topic_edit = 'bbp_topic_edit';
114
+ $this->topic_close = 'bbp_topic_close';
115
+ $this->topic_open = 'bbp_topic_open';
116
+
117
+ // Replies
118
+ $this->reply_create = 'bbp_reply_create';
119
+ $this->reply_edit = 'bbp_reply_edit';
120
+ }
121
+
122
+ /**
123
+ * Setup the actions
124
+ *
125
+ * @since bbPress (r3395)
126
+ * @access private
127
+ * @uses add_filter() To add various filters
128
+ * @uses add_action() To add various actions
129
+ */
130
+ private function setup_actions() {
131
+
132
+ // Register the activity stream actions
133
+ add_action( 'bp_register_activity_actions', array( $this, 'register_activity_actions' ) );
134
+
135
+ // Hook into topic and reply creation
136
+ add_action( 'bbp_new_topic', array( $this, 'topic_create' ), 10, 4 );
137
+ add_action( 'bbp_new_reply', array( $this, 'reply_create' ), 10, 5 );
138
+
139
+ // Hook into topic and reply status changes
140
+ add_action( 'wp_insert_post', array( $this, 'topic_update' ), 10, 2 );
141
+ add_action( 'wp_insert_post', array( $this, 'reply_update' ), 10, 2 );
142
+
143
+ // Hook into topic and reply deletion
144
+ add_action( 'bbp_delete_topic', array( $this, 'topic_delete' ), 10, 1 );
145
+ add_action( 'bbp_delete_reply', array( $this, 'reply_delete' ), 10, 1 );
146
+
147
+ // Append forum filters in site wide activity streams
148
+ add_action( 'bp_activity_filter_options', array( $this, 'activity_filter_options' ), 10 );
149
+
150
+ // Append forum filters in single member activity streams
151
+ add_action( 'bp_member_activity_filter_options', array( $this, 'activity_filter_options' ), 10 );
152
+
153
+ // Append forum filters in single group activity streams
154
+ add_action( 'bp_group_activity_filter_options', array( $this, 'activity_filter_options' ), 10 );
155
+ }
156
+
157
+ /**
158
+ * Setup the filters
159
+ *
160
+ * @since bbPress (r3395)
161
+ * @access private
162
+ * @uses add_filter() To add various filters
163
+ * @uses add_action() To add various actions
164
+ */
165
+ private function setup_filters() {
166
+
167
+ /** Activity **********************************************************/
168
+
169
+ // Obey BuddyPress commenting rules
170
+ add_filter( 'bp_activity_can_comment', array( $this, 'activity_can_comment' ) );
171
+
172
+ // Link directly to the topic or reply
173
+ add_filter( 'bp_activity_get_permalink', array( $this, 'activity_get_permalink' ), 10, 2 );
174
+
175
+ /** Mentions **********************************************************/
176
+
177
+ // Convert mentions into links on create
178
+ add_filter( 'bbp_new_topic_pre_content', 'bp_activity_at_name_filter' );
179
+ add_filter( 'bbp_new_reply_pre_content', 'bp_activity_at_name_filter' );
180
+
181
+ // Convert mentions into links on edit
182
+ add_filter( 'bbp_edit_topic_pre_content', 'bp_activity_at_name_filter' );
183
+ add_filter( 'bbp_edit_reply_pre_content', 'bp_activity_at_name_filter' );
184
+
185
+ // Revert links into text on edit
186
+ add_filter( 'bbp_get_form_topic_content', array( $this, 'strip_mentions_on_edit' ) );
187
+ add_filter( 'bbp_get_form_reply_content', array( $this, 'strip_mentions_on_edit' ) );
188
+ }
189
+
190
+ /**
191
+ * Allow the variables, actions, and filters to be modified by third party
192
+ * plugins and themes.
193
+ *
194
+ * @since bbPress (r3902)
195
+ */
196
+ private function fully_loaded() {
197
+ do_action_ref_array( 'bbp_buddypress_activity_loaded', array( $this ) );
198
+ }
199
+
200
+ /** Methods ***************************************************************/
201
+
202
+ /**
203
+ * Strip out BuddyPress activity at-name HTML on topic/reply edit
204
+ *
205
+ * Copied from bp_forums_strip_mentions_on_post_edit() in case forums
206
+ * component is not active or is not loaded in yet.
207
+ *
208
+ * @since bbPress (r3475)
209
+ * @param type $content Optional
210
+ * @uses bp_get_root_domain()
211
+ * @uses bp_get_members_root_slug()
212
+ * @return string
213
+ */
214
+ public function strip_mentions_on_edit( $content = '' ) {
215
+
216
+ // Backwards compat for members root slug
217
+ if ( function_exists( 'bp_get_members_root_slug' ) ) {
218
+ $members_root = bp_get_members_root_slug();
219
+ } elseif ( defined( 'BP_MEMBERS_SLUG' ) ) {
220
+ $members_root = BP_MEMBERS_SLUG;
221
+ } else {
222
+ $members_root = 'members';
223
+ }
224
+
225
+ $pattern = "|<a href=&#039;" . bp_get_root_domain() . "/" . $members_root . "/[A-Za-z0-9-_\.]+/&#039; rel=&#039;nofollow&#039;>(@[A-Za-z0-9-_\.@]+)</a>|";
226
+ $content = preg_replace( $pattern, "$1", htmlspecialchars_decode( $content ) );
227
+
228
+ return $content;
229
+ }
230
+
231
+ /**
232
+ * Register our activity actions with BuddyPress
233
+ *
234
+ * @since bbPress (r3395)
235
+ * @uses bp_activity_set_action()
236
+ */
237
+ public function register_activity_actions() {
238
+ bp_activity_set_action( $this->component, $this->topic_create, __( 'New topic created', 'bbpress' ) );
239
+ bp_activity_set_action( $this->component, $this->reply_create, __( 'New reply created', 'bbpress' ) );
240
+ }
241
+
242
+ /**
243
+ * Wrapper for recoding bbPress actions to the BuddyPress activity stream
244
+ *
245
+ * @since bbPress (r3395)
246
+ * @param type $args Array of arguments for bp_activity_add()
247
+ * @uses bbp_get_current_user_id()
248
+ * @uses bp_core_current_time()
249
+ * @uses bbp_parse_args()
250
+ * @uses aplly_filters()
251
+ * @uses bp_activity_add()
252
+ * @return type Activity ID if successful, false if not
253
+ */
254
+ private function record_activity( $args = '' ) {
255
+
256
+ // Default activity args
257
+ $defaults = array (
258
+ 'id' => null,
259
+ 'user_id' => bbp_get_current_user_id(),
260
+ 'type' => '',
261
+ 'action' => '',
262
+ 'item_id' => '',
263
+ 'secondary_item_id' => '',
264
+ 'content' => '',
265
+ 'primary_link' => '',
266
+ 'component' => $this->component,
267
+ 'recorded_time' => bp_core_current_time(),
268
+ 'hide_sitewide' => false
269
+ );
270
+ $activity = bbp_parse_args( $args, $defaults, 'record_activity' );
271
+
272
+ // Add the activity
273
+ return bp_activity_add( $activity );
274
+ }
275
+
276
+ /**
277
+ * Wrapper for deleting bbPress actions from BuddyPress activity stream
278
+ *
279
+ * @since bbPress (r3395)
280
+ * @param type $args Array of arguments for bp_activity_add()
281
+ * @uses bbp_get_current_user_id()
282
+ * @uses bp_core_current_time()
283
+ * @uses bbp_parse_args()
284
+ * @uses aplly_filters()
285
+ * @uses bp_activity_add()
286
+ * @return type Activity ID if successful, false if not
287
+ */
288
+ public function delete_activity( $args = '' ) {
289
+
290
+ // Default activity args
291
+ $defaults = array(
292
+ 'item_id' => false,
293
+ 'component' => $this->component,
294
+ 'type' => false,
295
+ 'user_id' => false,
296
+ 'secondary_item_id' => false
297
+ );
298
+ $activity = bbp_parse_args( $args, $defaults, 'delete_activity' );
299
+
300
+ // Delete the activity
301
+ bp_activity_delete_by_item_id( $activity );
302
+ }
303
+
304
+ /**
305
+ * Check for an existing activity stream entry for a given post_id
306
+ *
307
+ * @param int $post_id ID of the topic or reply
308
+ * @uses get_post_meta()
309
+ * @uses bp_activity_get_specific()
310
+ * @return int if an activity id is verified, false if not
311
+ */
312
+ private static function get_activity_id( $post_id = 0 ) {
313
+
314
+ // Try to get the activity ID of the post
315
+ $activity_id = (int) get_post_meta( $post_id, '_bbp_activity_id', true );
316
+
317
+ // Bail if no activity ID is in post meta
318
+ if ( empty( $activity_id ) )
319
+ return null;
320
+
321
+ // Get the activity stream item, bail if it doesn't exist
322
+ $existing = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'show_hidden' => true, 'spam' => 'all', ) );
323
+ if ( empty( $existing['total'] ) || ( 1 != $existing['total'] ) )
324
+ return null;
325
+
326
+ // Return the activity ID since we've verified the connection
327
+ return $activity_id;
328
+ }
329
+
330
+ /**
331
+ * Maybe disable activity stream comments on select actions
332
+ *
333
+ * @since bbPress (r3399)
334
+ * @global BP_Activity_Template $activities_template
335
+ * @param boolean $can_comment
336
+ * @uses bp_get_activity_action_name()
337
+ * @return boolean
338
+ */
339
+ public function activity_can_comment( $can_comment = true ) {
340
+ global $activities_template;
341
+
342
+ // Already forced off, so comply
343
+ if ( false === $can_comment )
344
+ return $can_comment;
345
+
346
+ // Check if blog & forum activity stream commenting is off
347
+ if ( ( false === $activities_template->disable_blogforum_replies ) || (int) $activities_template->disable_blogforum_replies ) {
348
+
349
+ // Get the current action name
350
+ $action_name = bp_get_activity_action_name();
351
+
352
+ // Setup the array of possibly disabled actions
353
+ $disabled_actions = array(
354
+ $this->topic_create,
355
+ $this->reply_create
356
+ );
357
+
358
+ // Check if this activity stream action is disabled
359
+ if ( in_array( $action_name, $disabled_actions ) ) {
360
+ $can_comment = false;
361
+ }
362
+ }
363
+
364
+ return $can_comment;
365
+ }
366
+
367
+ /**
368
+ * Maybe link directly to topics and replies in activity stream entries
369
+ *
370
+ * @since bbPress (r3399)
371
+ * @param string $link
372
+ * @param mixed $activity_object
373
+ * @return string The link to the activity stream item
374
+ */
375
+ public function activity_get_permalink( $link = '', $activity_object = false ) {
376
+
377
+ // Setup the array of actions to link directly to
378
+ $disabled_actions = array(
379
+ $this->topic_create,
380
+ $this->reply_create
381
+ );
382
+
383
+ // Check if this activity stream action is directly linked
384
+ if ( in_array( $activity_object->type, $disabled_actions ) ) {
385
+ $link = $activity_object->primary_link;
386
+ }
387
+
388
+ return $link;
389
+ }
390
+
391
+ /**
392
+ * Append forum options to activity filter select box
393
+ *
394
+ * @since bbPress (r3653)
395
+ */
396
+ function activity_filter_options() {
397
+ ?>
398
+
399
+ <option value="<?php echo $this->topic_create; ?>"><?php _e( 'Topics', 'bbpress' ); ?></option>
400
+ <option value="<?php echo $this->reply_create; ?>"><?php _e( 'Replies', 'bbpress' ); ?></option>
401
+
402
+ <?php
403
+ }
404
+
405
+ /** Topics ****************************************************************/
406
+
407
+ /**
408
+ * Record an activity stream entry when a topic is created or updated
409
+ *
410
+ * @since bbPress (r3395)
411
+ * @param int $topic_id
412
+ * @param int $forum_id
413
+ * @param array $anonymous_data
414
+ * @param int $topic_author_id
415
+ * @uses bbp_get_topic_id()
416
+ * @uses bbp_get_forum_id()
417
+ * @uses bbp_get_user_profile_link()
418
+ * @uses bbp_get_topic_permalink()
419
+ * @uses bbp_get_topic_title()
420
+ * @uses bbp_get_topic_content()
421
+ * @uses bbp_get_forum_permalink()
422
+ * @uses bbp_get_forum_title()
423
+ * @uses bp_create_excerpt()
424
+ * @uses apply_filters()
425
+ * @return Bail early if topic is by anonymous user
426
+ */
427
+ public function topic_create( $topic_id, $forum_id, $anonymous_data, $topic_author_id ) {
428
+
429
+ // Bail early if topic is by anonymous user
430
+ if ( !empty( $anonymous_data ) )
431
+ return;
432
+
433
+ // Bail if site is private
434
+ if ( !bbp_is_site_public() )
435
+ return;
436
+
437
+ // Validate activity data
438
+ $user_id = $topic_author_id;
439
+ $topic_id = bbp_get_topic_id( $topic_id );
440
+ $forum_id = bbp_get_forum_id( $forum_id );
441
+
442
+ // Bail if user is not active
443
+ if ( bbp_is_user_inactive( $user_id ) )
444
+ return;
445
+
446
+ // Bail if topic is not published
447
+ if ( !bbp_is_topic_published( $topic_id ) )
448
+ return;
449
+
450
+ // Bail if forum is not public
451
+ if ( !bbp_is_forum_public( $forum_id, false ) )
452
+ return;
453
+
454
+ // User link for topic author
455
+ $user_link = bbp_get_user_profile_link( $user_id );
456
+
457
+ // Topic
458
+ $topic_permalink = bbp_get_topic_permalink( $topic_id );
459
+ $topic_title = bbp_get_topic_title ( $topic_id );
460
+ $topic_content = bbp_get_topic_content ( $topic_id );
461
+ $topic_link = '<a href="' . $topic_permalink . '" title="' . $topic_title . '">' . $topic_title . '</a>';
462
+
463
+ // Forum
464
+ $forum_permalink = bbp_get_forum_permalink( $forum_id );
465
+ $forum_title = bbp_get_forum_title ( $forum_id );
466
+ $forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
467
+
468
+ // Activity action & text
469
+ $activity_text = sprintf( __( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
470
+ $activity_action = apply_filters( 'bbp_activity_topic_create', $activity_text, $user_id, $topic_id, $forum_id );
471
+ $activity_content = apply_filters( 'bbp_activity_topic_create_excerpt', bp_create_excerpt( $topic_content ), $topic_content );
472
+
473
+ // Compile the activity stream results
474
+ $activity = array(
475
+ 'id' => $this->get_activity_id( $topic_id ),
476
+ 'user_id' => $user_id,
477
+ 'action' => $activity_action,
478
+ 'content' => $activity_content,
479
+ 'primary_link' => $topic_permalink,
480
+ 'type' => $this->topic_create,
481
+ 'item_id' => $topic_id,
482
+ 'secondary_item_id' => $forum_id,
483
+ 'recorded_time' => get_post_time( 'Y-m-d H:i:s', true, $topic_id ),
484
+ );
485
+
486
+ // Record the activity
487
+ $activity_id = $this->record_activity( $activity );
488
+
489
+ // Add the activity entry ID as a meta value to the topic
490
+ if ( !empty( $activity_id ) ) {
491
+ update_post_meta( $topic_id, '_bbp_activity_id', $activity_id );
492
+ }
493
+ }
494
+
495
+ /**
496
+ * Delete the activity stream entry when a topic is spammed, trashed, or deleted
497
+ *
498
+ * @param int $topic_id
499
+ * @uses bp_activity_delete()
500
+ */
501
+ public function topic_delete( $topic_id ) {
502
+
503
+ // Get activity ID, bail if it doesn't exist
504
+ if ( $activity_id = $this->get_activity_id( $topic_id ) )
505
+ return bp_activity_delete( array( 'id' => $activity_id ) );
506
+
507
+ return false;
508
+ }
509
+
510
+ /**
511
+ * Update the activity stream entry when a topic status changes
512
+ *
513
+ * @param int $post_id
514
+ * @param obj $post
515
+ * @uses get_post_type()
516
+ * @uses bbp_get_topic_post_type()
517
+ * @uses bbp_get_topic_id()
518
+ * @uses bbp_is_topic_anonymous()
519
+ * @uses bbp_get_public_status_id()
520
+ * @uses bbp_get_closed_status_id()
521
+ * @uses bbp_get_topic_forum_id()
522
+ * @uses bbp_get_topic_author_id()
523
+ * @return Bail early if not a topic, or topic is by anonymous user
524
+ */
525
+ public function topic_update( $topic_id, $post ) {
526
+
527
+ // Bail early if not a topic
528
+ if ( get_post_type( $post ) != bbp_get_topic_post_type() )
529
+ return;
530
+
531
+ $topic_id = bbp_get_topic_id( $topic_id );
532
+
533
+ // Bail early if topic is by anonymous user
534
+ if ( bbp_is_topic_anonymous( $topic_id ) )
535
+ return;
536
+
537
+ $anonymous_data = array();
538
+
539
+ // Action based on new status
540
+ if ( in_array( $post->post_status, array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ) ) {
541
+
542
+ // Validate topic data
543
+ $forum_id = bbp_get_topic_forum_id( $topic_id );
544
+ $topic_author_id = bbp_get_topic_author_id( $topic_id );
545
+
546
+ $this->topic_create( $topic_id, $forum_id, $anonymous_data, $topic_author_id );
547
+ } else {
548
+ $this->topic_delete( $topic_id );
549
+ }
550
+ }
551
+
552
+ /** Replies ***************************************************************/
553
+
554
+ /**
555
+ * Record an activity stream entry when a reply is created
556
+ *
557
+ * @since bbPress (r3395)
558
+ * @param int $topic_id
559
+ * @param int $forum_id
560
+ * @param array $anonymous_data
561
+ * @param int $topic_author_id
562
+ * @uses bbp_get_reply_id()
563
+ * @uses bbp_get_topic_id()
564
+ * @uses bbp_get_forum_id()
565
+ * @uses bbp_get_user_profile_link()
566
+ * @uses bbp_get_reply_url()
567
+ * @uses bbp_get_reply_content()
568
+ * @uses bbp_get_topic_permalink()
569
+ * @uses bbp_get_topic_title()
570
+ * @uses bbp_get_forum_permalink()
571
+ * @uses bbp_get_forum_title()
572
+ * @uses bp_create_excerpt()
573
+ * @uses apply_filters()
574
+ * @return Bail early if topic is by anonywous user
575
+ */
576
+ public function reply_create( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author_id ) {
577
+
578
+ // Do not log activity of anonymous users
579
+ if ( !empty( $anonymous_data ) )
580
+ return;
581
+
582
+ // Bail if site is private
583
+ if ( !bbp_is_site_public() )
584
+ return;
585
+
586
+ // Validate activity data
587
+ $user_id = $reply_author_id;
588
+ $reply_id = bbp_get_reply_id( $reply_id );
589
+ $topic_id = bbp_get_topic_id( $topic_id );
590
+ $forum_id = bbp_get_forum_id( $forum_id );
591
+
592
+ // Bail if user is not active
593
+ if ( bbp_is_user_inactive( $user_id ) )
594
+ return;
595
+
596
+ // Bail if reply is not published
597
+ if ( !bbp_is_reply_published( $reply_id ) )
598
+ return;
599
+
600
+ // Bail if forum is not public
601
+ if ( !bbp_is_forum_public( $forum_id, false ) )
602
+ return;
603
+
604
+ // Setup links for activity stream
605
+ $user_link = bbp_get_user_profile_link( $user_id );
606
+
607
+ // Reply
608
+ $reply_url = bbp_get_reply_url ( $reply_id );
609
+ $reply_content = bbp_get_reply_content( $reply_id );
610
+
611
+ // Topic
612
+ $topic_permalink = bbp_get_topic_permalink( $topic_id );
613
+ $topic_title = bbp_get_topic_title ( $topic_id );
614
+ $topic_link = '<a href="' . $topic_permalink . '" title="' . $topic_title . '">' . $topic_title . '</a>';
615
+
616
+ // Forum
617
+ $forum_permalink = bbp_get_forum_permalink( $forum_id );
618
+ $forum_title = bbp_get_forum_title ( $forum_id );
619
+ $forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
620
+
621
+ // Activity action & text
622
+ $activity_text = sprintf( __( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
623
+ $activity_action = apply_filters( 'bbp_activity_reply_create', $activity_text, $user_id, $reply_id, $topic_id );
624
+ $activity_content = apply_filters( 'bbp_activity_reply_create_excerpt', bp_create_excerpt( $reply_content ), $reply_content );
625
+
626
+ // Compile the activity stream results
627
+ $activity = array(
628
+ 'id' => $this->get_activity_id( $reply_id ),
629
+ 'user_id' => $user_id,
630
+ 'action' => $activity_action,
631
+ 'content' => $activity_content,
632
+ 'primary_link' => $reply_url,
633
+ 'type' => $this->reply_create,
634
+ 'item_id' => $reply_id,
635
+ 'secondary_item_id' => $topic_id,
636
+ 'recorded_time' => get_post_time( 'Y-m-d H:i:s', true, $reply_id ),
637
+ );
638
+
639
+ // Record the activity
640
+ $activity_id = $this->record_activity( $activity );
641
+
642
+ // Add the activity entry ID as a meta value to the reply
643
+ if ( !empty( $activity_id ) ) {
644
+ update_post_meta( $reply_id, '_bbp_activity_id', $activity_id );
645
+ }
646
+ }
647
+
648
+ /**
649
+ * Delete the activity stream entry when a reply is spammed, trashed, or deleted
650
+ *
651
+ * @param int $reply_id
652
+ * @uses get_post_meta()
653
+ * @uses bp_activity_delete()
654
+ */
655
+ public function reply_delete( $reply_id ) {
656
+
657
+ // Get activity ID, bail if it doesn't exist
658
+ if ( $activity_id = $this->get_activity_id( $reply_id ) )
659
+ return bp_activity_delete( array( 'id' => $activity_id ) );
660
+
661
+ return false;
662
+ }
663
+
664
+ /**
665
+ * Update the activity stream entry when a reply status changes
666
+ *
667
+ * @param int $post_id
668
+ * @param obj $post
669
+ * @uses get_post_type()
670
+ * @uses bbp_get_reply_post_type()
671
+ * @uses bbp_get_reply_id()
672
+ * @uses bbp_is_reply_anonymous()
673
+ * @uses bbp_get_public_status_id()
674
+ * @uses bbp_get_closed_status_id()
675
+ * @uses bbp_get_reply_topic_id()
676
+ * @uses bbp_get_reply_forum_id()
677
+ * @uses bbp_get_reply_author_id()
678
+ * @return Bail early if not a reply, or reply is by anonymous user
679
+ */
680
+ public function reply_update( $reply_id, $post ) {
681
+
682
+ // Bail early if not a reply
683
+ if ( get_post_type( $post ) != bbp_get_reply_post_type() )
684
+ return;
685
+
686
+ $reply_id = bbp_get_reply_id( $reply_id );
687
+
688
+ // Bail early if reply is by anonymous user
689
+ if ( bbp_is_reply_anonymous( $reply_id ) )
690
+ return;
691
+
692
+ $anonymous_data = array();
693
+
694
+ // Action based on new status
695
+ if ( $post->post_status == bbp_get_public_status_id() ) {
696
+
697
+ // Validate reply data
698
+ $topic_id = bbp_get_reply_topic_id( $reply_id );
699
+ $forum_id = bbp_get_reply_forum_id( $reply_id );
700
+ $reply_author_id = bbp_get_reply_author_id( $reply_id );
701
+
702
+ $this->reply_create( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author_id );
703
+ } else {
704
+ $this->reply_delete( $reply_id );
705
+ }
706
+ }
707
+ }
708
+ endif;
includes/extend/buddypress/functions.php ADDED
@@ -0,0 +1,455 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Main bbPress BuddyPress Class
5
+ *
6
+ * @package bbPress
7
+ * @subpackage BuddyPress
8
+ * @todo maybe move to BuddyPress Forums once bbPress 1.1 can be removed
9
+ */
10
+
11
+ // Exit if accessed directly
12
+ if ( !defined( 'ABSPATH' ) ) exit;
13
+
14
+ /** BuddyPress Helpers ********************************************************/
15
+
16
+ /**
17
+ * Filter the current bbPress user ID with the current BuddyPress user ID
18
+ *
19
+ * @since bbPress (r3552)
20
+ *
21
+ * @param int $user_id
22
+ * @param bool $displayed_user_fallback
23
+ * @param bool $current_user_fallback
24
+ *
25
+ * @return int User ID
26
+ */
27
+ function bbp_filter_user_id( $user_id = 0, $displayed_user_fallback = true, $current_user_fallback = false ) {
28
+
29
+ // Define local variable
30
+ $bbp_user_id = 0;
31
+
32
+ // Get possible user ID's
33
+ $did = bp_displayed_user_id();
34
+ $lid = bp_loggedin_user_id();
35
+
36
+ // Easy empty checking
37
+ if ( !empty( $user_id ) && is_numeric( $user_id ) )
38
+ $bbp_user_id = $user_id;
39
+
40
+ // Currently viewing or editing a user
41
+ elseif ( ( true == $displayed_user_fallback ) && !empty( $did ) )
42
+ $bbp_user_id = $did;
43
+
44
+ // Maybe fallback on the current_user ID
45
+ elseif ( ( true == $current_user_fallback ) && !empty( $lid ) )
46
+ $bbp_user_id = $lid;
47
+
48
+ return $bbp_user_id;
49
+ }
50
+ add_filter( 'bbp_get_user_id', 'bbp_filter_user_id', 10, 3 );
51
+
52
+ /**
53
+ * Filter the bbPress is_single_user function with BuddyPress eqivalent
54
+ *
55
+ * @since bbPress (r3552)
56
+ *
57
+ * @param bool $is Optional. Default false
58
+ * @return bool True if viewing single user, false if not
59
+ */
60
+ function bbp_filter_is_single_user( $is = false ) {
61
+ if ( !empty( $is ) )
62
+ return $is;
63
+
64
+ return bp_is_user();
65
+ }
66
+ add_filter( 'bbp_is_single_user', 'bbp_filter_is_single_user', 10, 1 );
67
+
68
+ /**
69
+ * Filter the bbPress is_user_home function with BuddyPress eqivalent
70
+ *
71
+ * @since bbPress (r3552)
72
+ *
73
+ * @param bool $is Optional. Default false
74
+ * @return bool True if viewing single user, false if not
75
+ */
76
+ function bbp_filter_is_user_home( $is = false ) {
77
+ if ( !empty( $is ) )
78
+ return $is;
79
+
80
+ return bp_is_my_profile();
81
+ }
82
+ add_filter( 'bbp_is_user_home', 'bbp_filter_is_user_home', 10, 1 );
83
+
84
+ /** BuddyPress Screens ********************************************************/
85
+
86
+ /**
87
+ * Hook bbPress topics template into plugins template
88
+ *
89
+ * @since bbPress (r3552)
90
+ *
91
+ * @uses add_action() To add the content hook
92
+ * @uses bp_core_load_template() To load the plugins template
93
+ */
94
+ function bbp_member_forums_screen_topics() {
95
+ add_action( 'bp_template_content', 'bbp_member_forums_topics_content' );
96
+ bp_core_load_template( apply_filters( 'bbp_member_forums_screen_topics', 'members/single/plugins' ) );
97
+ }
98
+
99
+ /**
100
+ * Hook bbPress replies template into plugins template
101
+ *
102
+ * @since bbPress (r3552)
103
+ *
104
+ * @uses add_action() To add the content hook
105
+ * @uses bp_core_load_template() To load the plugins template
106
+ */
107
+ function bbp_member_forums_screen_replies() {
108
+ add_action( 'bp_template_content', 'bbp_member_forums_replies_content' );
109
+ bp_core_load_template( apply_filters( 'bbp_member_forums_screen_replies', 'members/single/plugins' ) );
110
+ }
111
+
112
+ /**
113
+ * Hook bbPress favorites template into plugins template
114
+ *
115
+ * @since bbPress (r3552)
116
+ *
117
+ * @uses add_action() To add the content hook
118
+ * @uses bp_core_load_template() To load the plugins template
119
+ */
120
+ function bbp_member_forums_screen_favorites() {
121
+ add_action( 'bp_template_content', 'bbp_member_forums_favorites_content' );
122
+ bp_core_load_template( apply_filters( 'bbp_member_forums_screen_favorites', 'members/single/plugins' ) );
123
+ }
124
+
125
+ /**
126
+ * Hook bbPress subscriptions template into plugins template
127
+ *
128
+ * @since bbPress (r3552)
129
+ *
130
+ * @uses add_action() To add the content hook
131
+ * @uses bp_core_load_template() To load the plugins template
132
+ */
133
+ function bbp_member_forums_screen_subscriptions() {
134
+ add_action( 'bp_template_content', 'bbp_member_forums_subscriptions_content' );
135
+ bp_core_load_template( apply_filters( 'bbp_member_forums_screen_subscriptions', 'members/single/plugins' ) );
136
+ }
137
+
138
+ /** BuddyPress Templates ******************************************************/
139
+
140
+ /**
141
+ * Get the topics created template part
142
+ *
143
+ * @since bbPress (r3552)
144
+ *
145
+ * @uses bbp_get_template_part()s
146
+ */
147
+ function bbp_member_forums_topics_content() {
148
+ ?>
149
+
150
+ <div id="bbpress-forums">
151
+
152
+ <?php bbp_get_template_part( 'user', 'topics-created' ); ?>
153
+
154
+ </div>
155
+
156
+ <?php
157
+ }
158
+
159
+ /**
160
+ * Get the topics replied to template part
161
+ *
162
+ * @since bbPress (r3552)
163
+ *
164
+ * @uses bbp_get_template_part()
165
+ */
166
+ function bbp_member_forums_replies_content() {
167
+ ?>
168
+
169
+ <div id="bbpress-forums">
170
+
171
+ <?php bbp_get_template_part( 'user', 'replies-created' ); ?>
172
+
173
+ </div>
174
+
175
+ <?php
176
+ }
177
+
178
+ /**
179
+ * Get the topics favorited template part
180
+ *
181
+ * @since bbPress (r3552)
182
+ *
183
+ * @uses bbp_get_template_part()
184
+ */
185
+ function bbp_member_forums_favorites_content() {
186
+ ?>
187
+
188
+ <div id="bbpress-forums">
189
+
190
+ <?php bbp_get_template_part( 'user', 'favorites' ); ?>
191
+
192
+ </div>
193
+
194
+ <?php
195
+ }
196
+
197
+ /**
198
+ * Get the topics subscribed template part
199
+ *
200
+ * @since bbPress (r3552)
201
+ *
202
+ * @uses bbp_get_template_part()
203
+ */
204
+ function bbp_member_forums_subscriptions_content() {
205
+ ?>
206
+
207
+ <div id="bbpress-forums">
208
+
209
+ <?php bbp_get_template_part( 'user', 'subscriptions' ); ?>
210
+
211
+ </div>
212
+
213
+ <?php
214
+ }
215
+
216
+ /** Forum/Group Sync **********************************************************/
217
+
218
+ /**
219
+ * These functions are used to keep the many-to-many relationships between
220
+ * groups and forums synchronized. Each forum and group stores ponters to each
221
+ * other in their respective meta. This way if a group or forum is deleted
222
+ * their associattions can be updated without much effort.
223
+ */
224
+
225
+ /**
226
+ * Get forum ID's for a group
227
+ *
228
+ * @param type $group_id
229
+ * @since bbPress (r3653)
230
+ */
231
+ function bbp_get_group_forum_ids( $group_id = 0 ) {
232
+
233
+ // Assume no forums
234
+ $forum_ids = array();
235
+
236
+ // Use current group if none is set
237
+ if ( empty( $group_id ) )
238
+ $group_id = bp_get_current_group_id();
239
+
240
+ // Get the forums
241
+ if ( !empty( $group_id ) )
242
+ $forum_ids = groups_get_groupmeta( $group_id, 'forum_id' );
243
+
244
+ // Make sure result is an array
245
+ if ( !is_array( $forum_ids ) )
246
+ $forum_ids = (array) $forum_ids;
247
+
248
+ // Trim out any empty array items
249
+ $forum_ids = array_filter( $forum_ids );
250
+
251
+ return (array) apply_filters( 'bbp_get_group_forum_ids', $forum_ids, $group_id );
252
+ }
253
+
254
+ /**
255
+ * Get group ID's for a forum
256
+ *
257
+ * @param type $forum_id
258
+ * @since bbPress (r3653)
259
+ */
260
+ function bbp_get_forum_group_ids( $forum_id = 0 ) {
261
+
262
+ // Assume no forums
263
+ $group_ids = array();
264
+
265
+ // Use current group if none is set
266
+ if ( empty( $forum_id ) )
267
+ $forum_id = bbp_get_forum_id();
268
+
269
+ // Get the forums
270
+ if ( !empty( $forum_id ) )
271
+ $group_ids = get_post_meta( $forum_id, '_bbp_group_ids', true );
272
+
273
+ // Make sure result is an array
274
+ if ( !is_array( $group_ids ) )
275
+ $group_ids = (array) $group_ids;
276
+
277
+ // Trim out any empty array items
278
+ $group_ids = array_filter( $group_ids );
279
+
280
+ return (array) apply_filters( 'bbp_get_forum_group_ids', $group_ids, $forum_id );
281
+ }
282
+
283
+ /**
284
+ * Get forum ID's for a group
285
+ *
286
+ * @param type $group_id
287
+ * @since bbPress (r3653)
288
+ */
289
+ function bbp_update_group_forum_ids( $group_id = 0, $forum_ids = array() ) {
290
+
291
+ // Use current group if none is set
292
+ if ( empty( $group_id ) )
293
+ $group_id = bp_get_current_group_id();
294
+
295
+ // Trim out any empties
296
+ $forum_ids = array_filter( $forum_ids );
297
+
298
+ // Get the forums
299
+ return groups_update_groupmeta( $group_id, 'forum_id', $forum_ids );
300
+ }
301
+
302
+ /**
303
+ * Update group ID's for a forum
304
+ *
305
+ * @param type $forum_id
306
+ * @since bbPress (r3653)
307
+ */
308
+ function bbp_update_forum_group_ids( $forum_id = 0, $group_ids = array() ) {
309
+ $forum_id = bbp_get_forum_id( $forum_id );
310
+
311
+ // Trim out any empties
312
+ $group_ids = array_filter( $group_ids );
313
+
314
+ // Get the forums
315
+ return update_post_meta( $forum_id, '_bbp_group_ids', $group_ids );
316
+ }
317
+
318
+ /**
319
+ * Add a group to a forum
320
+ *
321
+ * @param type $group_id
322
+ * @since bbPress (r3653)
323
+ */
324
+ function bbp_add_group_id_to_forum( $forum_id = 0, $group_id = 0 ) {
325
+
326
+ // Validate forum_id
327
+ $forum_id = bbp_get_forum_id( $forum_id );
328
+
329
+ // Use current group if none is set
330
+ if ( empty( $group_id ) )
331
+ $group_id = bp_get_current_group_id();
332
+
333
+ // Get current group IDs
334
+ $group_ids = bbp_get_forum_group_ids( $forum_id );
335
+
336
+ // Maybe update the groups forums
337
+ if ( !in_array( $group_id, $group_ids ) ) {
338
+ $group_ids[] = $group_id;
339
+ return bbp_update_forum_group_ids( $forum_id, $group_ids );
340
+ }
341
+ }
342
+
343
+ /**
344
+ * Remove a forum from a group
345
+ *
346
+ * @param type $group_id
347
+ * @since bbPress (r3653)
348
+ */
349
+ function bbp_add_forum_id_to_group( $group_id = 0, $forum_id = 0 ) {
350
+
351
+ // Validate forum_id
352
+ $forum_id = bbp_get_forum_id( $forum_id );
353
+
354
+ // Use current group if none is set
355
+ if ( empty( $group_id ) )
356
+ $group_id = bp_get_current_group_id();
357
+
358
+ // Get current group IDs
359
+ $forum_ids = bbp_get_group_forum_ids( $group_id );
360
+
361
+ // Maybe update the groups forums
362
+ if ( !in_array( $forum_id, $forum_ids ) ) {
363
+ $forum_ids[] = $forum_id;
364
+ return bbp_update_group_forum_ids( $group_id, $forum_ids );
365
+ }
366
+ }
367
+
368
+ /**
369
+ * Remove a group from a forum
370
+ *
371
+ * @param type $group_id
372
+ * @since bbPress (r3653)
373
+ */
374
+ function bbp_remove_group_id_from_forum( $forum_id = 0, $group_id = 0 ) {
375
+
376
+ // Validate forum_id
377
+ $forum_id = bbp_get_forum_id( $forum_id );
378
+
379
+ // Use current group if none is set
380
+ if ( empty( $group_id ) )
381
+ $group_id = bp_get_current_group_id();
382
+
383
+ // Get current group IDs
384
+ $group_ids = bbp_get_forum_group_ids( $forum_id );
385
+
386
+ // Maybe update the groups forums
387
+ if ( in_array( $group_id, $group_ids ) ) {
388
+ unset( $group_ids[$group_id] );
389
+ return bbp_update_forum_group_ids( $forum_id, $group_ids );
390
+ }
391
+ }
392
+
393
+ /**
394
+ * Remove a forum from a group
395
+ *
396
+ * @param type $group_id
397
+ * @since bbPress (r3653)
398
+ */
399
+ function bbp_remove_forum_id_from_group( $group_id = 0, $forum_id = 0 ) {
400
+
401
+ // Validate forum_id
402
+ $forum_id = bbp_get_forum_id( $forum_id );
403
+
404
+ // Use current group if none is set
405
+ if ( empty( $group_id ) )
406
+ $group_id = bp_get_current_group_id();
407
+
408
+ // Get current group IDs
409
+ $forum_ids = bbp_get_group_forum_ids( $group_id );
410
+
411
+ // Maybe update the groups forums
412
+ if ( in_array( $forum_id, $forum_ids ) ) {
413
+ unset( $forum_ids[$forum_id] );
414
+ return bbp_update_group_forum_ids( $group_id, $forum_ids );
415
+ }
416
+ }
417
+
418
+ /**
419
+ * Remove a group from aall forums
420
+ *
421
+ * @param type $group_id
422
+ * @since bbPress (r3653)
423
+ */
424
+ function bbp_remove_group_id_from_all_forums( $group_id = 0 ) {
425
+
426
+ // Use current group if none is set
427
+ if ( empty( $group_id ) )
428
+ $group_id = bp_get_current_group_id();
429
+
430
+ // Get current group IDs
431
+ $forum_ids = bbp_get_group_forum_ids( $group_id );
432
+
433
+ // Loop through forums and remove this group from each one
434
+ foreach( (array) $forum_ids as $forum_id ) {
435
+ bbp_remove_group_id_from_forum( $group_id, $forum_id );
436
+ }
437
+ }
438
+
439
+ /**
440
+ * Remove a forum from all groups
441
+ *
442
+ * @param type $forum_id
443
+ * @since bbPress (r3653)
444
+ */
445
+ function bbp_remove_forum_id_from_all_groups( $forum_id = 0 ) {
446
+
447
+ // Validate
448
+ $forum_id = bbp_get_forum_id( $forum_id );
449
+ $group_ids = bbp_get_forum_group_ids( $forum_id );
450
+
451
+ // Loop through groups and remove this forum from each one
452
+ foreach( (array) $group_ids as $group_id ) {
453
+ bbp_remove_forum_id_from_group( $forum_id, $group_id );
454
+ }
455
+ }
includes/extend/buddypress/group.php ADDED
@@ -0,0 +1,1101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress BuddyPress Group Extension Class
5
+ *
6
+ * @package bbPress
7
+ * @subpackage BuddyPress
8
+ * @todo maybe move to BuddyPress Forums once bbPress 1.1 can be removed
9
+ */
10
+
11
+ // Exit if accessed directly
12
+ if ( !defined( 'ABSPATH' ) ) exit;
13
+
14
+ if ( !class_exists( 'BBP_Forums_Group_Extension' ) && class_exists( 'BP_Group_Extension' ) ) :
15
+ /**
16
+ * Loads Group Extension for Forums Component
17
+ *
18
+ * @since bbPress (r3552)
19
+ *
20
+ * @package bbPress
21
+ * @subpackage BuddyPress
22
+ * @todo Everything
23
+ */
24
+ class BBP_Forums_Group_Extension extends BP_Group_Extension {
25
+
26
+ /** Methods ***************************************************************/
27
+
28
+ /**
29
+ * Setup bbPress group extension variables
30
+ *
31
+ * @since bbPress (r3552)
32
+ */
33
+ public function __construct() {
34
+
35
+ // Name and slug
36
+ $this->name = __( 'Forum', 'bbpress' );
37
+ $this->nav_item_name = __( 'Forum', 'bbpress' );
38
+ $this->slug = 'forum';
39
+ $this->topic_slug = 'topic';
40
+ $this->reply_slug = 'reply';
41
+
42
+ // Forum component is visible
43
+ $this->visibility = 'public';
44
+
45
+ // Set positions towards end
46
+ $this->create_step_position = 15;
47
+ $this->nav_item_position = 10;
48
+
49
+ // Allow create step and show in nav
50
+ $this->enable_create_step = true;
51
+ $this->enable_nav_item = true;
52
+ $this->enable_edit_item = true;
53
+
54
+ // Template file to load, and action to hook display on to
55
+ $this->template_file = 'groups/single/plugins';
56
+ $this->display_hook = 'bp_template_content';
57
+
58
+ // Add handlers to bp_actions
59
+ add_action( 'bp_actions', 'bbp_new_forum_handler' );
60
+ add_action( 'bp_actions', 'bbp_new_topic_handler' );
61
+ add_action( 'bp_actions', 'bbp_new_reply_handler' );
62
+ add_action( 'bp_actions', 'bbp_edit_forum_handler' );
63
+ add_action( 'bp_actions', 'bbp_edit_topic_handler' );
64
+ add_action( 'bp_actions', 'bbp_edit_reply_handler' );
65
+
66
+ // Possibly redirect
67
+ add_action( 'bbp_template_redirect', array( $this, 'redirect_canonical' ) );
68
+
69
+ // Group forum pagination
70
+ add_filter( 'bbp_topic_pagination', array( $this, 'topic_pagination' ) );
71
+ add_filter( 'bbp_replies_pagination', array( $this, 'replies_pagination' ) );
72
+
73
+ // Tweak the redirect field
74
+ add_filter( 'bbp_new_topic_redirect_to', array( $this, 'new_topic_redirect_to' ), 10, 3 );
75
+ add_filter( 'bbp_new_reply_redirect_to', array( $this, 'new_reply_redirect_to' ), 10, 3 );
76
+
77
+ // Map forum/topic/replys permalinks to their groups
78
+ add_filter( 'bbp_get_forum_permalink', array( $this, 'map_forum_permalink_to_group' ), 10, 2 );
79
+ add_filter( 'bbp_get_topic_permalink', array( $this, 'map_topic_permalink_to_group' ), 10, 2 );
80
+ add_filter( 'bbp_get_reply_permalink', array( $this, 'map_reply_permalink_to_group' ), 10, 2 );
81
+
82
+ // Map reply edit links to their groups
83
+ add_filter( 'bbp_get_reply_edit_url', array( $this, 'map_reply_edit_url_to_group' ), 10, 2 );
84
+
85
+ // Map assorted template function permalinks
86
+ add_filter( 'post_link', array( $this, 'post_link' ), 10, 2 );
87
+ add_filter( 'page_link', array( $this, 'page_link' ), 10, 2 );
88
+ add_filter( 'post_type_link', array( $this, 'post_type_link' ), 10, 2 );
89
+
90
+ // Allow group member to view private/hidden forums
91
+ add_filter( 'bbp_map_topic_meta_caps', array( $this, 'map_topic_meta_caps' ), 10, 4 );
92
+ add_filter( 'bbp_map_reply_meta_caps', array( $this, 'map_topic_meta_caps' ), 10, 4 );
93
+
94
+ // Remove topic cap map when view is done
95
+ add_action( 'bbp_after_group_forum_display', array( $this, 'remove_topic_meta_cap_map' ) );
96
+
97
+ // Map group forum activity items to groups
98
+ add_filter( 'bbp_before_record_activity_parse_args', array( $this, 'map_activity_to_group' ) );
99
+
100
+ // No subforums yet, so suppress them for now
101
+ add_filter( 'bbp_get_forum_subforum_count_int', array( $this, 'no_subforums_yet' ) );
102
+ }
103
+
104
+ /**
105
+ * The primary display function for group forums
106
+ */
107
+ public function display() {
108
+
109
+ // Prevent Topic Parent from appearing
110
+ add_action( 'bbp_theme_before_topic_form_forum', array( $this, 'ob_start' ) );
111
+ add_action( 'bbp_theme_after_topic_form_forum', array( $this, 'ob_end_clean' ) );
112
+ add_action( 'bbp_theme_after_topic_form_forum', array( $this, 'topic_parent' ) );
113
+
114
+ // Prevent Forum Parent from appearing
115
+ add_action( 'bbp_theme_before_forum_form_parent', array( $this, 'ob_start' ) );
116
+ add_action( 'bbp_theme_after_forum_form_parent', array( $this, 'ob_end_clean' ) );
117
+ add_action( 'bbp_theme_after_forum_form_parent', array( $this, 'forum_parent' ) );
118
+
119
+ // Hide breadcrumb
120
+ add_filter( 'bbp_no_breadcrumb', '__return_true' );
121
+
122
+ $this->display_forums( 0 );
123
+ }
124
+
125
+ /**
126
+ * Allow group members to have advanced priviledges in group forum topics.
127
+ *
128
+ * @since bbPress (r4434)
129
+ *
130
+ * @param array $caps
131
+ * @param string $cap
132
+ * @param int $user_id
133
+ * @param array $args
134
+ * @return array
135
+ */
136
+ public function map_topic_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
137
+
138
+ // Bail if not viewing a single topic
139
+ if ( ! bp_is_single_item() || ! bp_is_groups_component() || ! bp_is_current_action( 'forum' ) || ! bp_is_action_variable( 0, 'topic' ) )
140
+ return $caps;
141
+
142
+ switch ( $cap ) {
143
+
144
+ // If user is a group mmember, allow them to create content.
145
+ case 'read_forum' :
146
+ case 'publish_replies' :
147
+ case 'publish_topics' :
148
+ case 'read_hidden_forums' :
149
+ case 'read_private_forums' :
150
+ if ( bp_group_is_member() ) {
151
+ $caps = array( 'participate' );
152
+ }
153
+ break;
154
+
155
+ // If user is a group mod ar admin, map to participate cap.
156
+ case 'moderate' :
157
+ case 'edit_topic' :
158
+ case 'edit_reply' :
159
+ case 'view_trash' :
160
+ case 'edit_others_replies' :
161
+ case 'edit_others_topics' :
162
+ if ( bp_group_is_mod() || bp_group_is_admin() ) {
163
+ $caps = array( 'participate' );
164
+ }
165
+ break;
166
+
167
+ // If user is a group admin, allow them to delete topics and replies.
168
+ case 'delete_topic' :
169
+ case 'delete_reply' :
170
+ if ( bp_group_is_admin() ) {
171
+ $caps = array( 'participate' );
172
+ }
173
+ break;
174
+ }
175
+
176
+ return apply_filters( 'bbp_map_group_forum_topic_meta_caps', $caps, $cap, $user_id, $args );
177
+ }
178
+
179
+ /**
180
+ * Remove the topic meta cap map, so it doesn't interfere with sidebars.
181
+ *
182
+ * @since bbPress (r4434)
183
+ */
184
+ public function remove_topic_meta_cap_map() {
185
+ remove_filter( 'bbp_map_topic_meta_caps', array( $this, 'map_topic_meta_caps' ), 10, 4 );
186
+ remove_filter( 'bbp_map_reply_meta_caps', array( $this, 'map_topic_meta_caps' ), 10, 4 );
187
+ }
188
+
189
+ /** Edit ******************************************************************/
190
+
191
+ /**
192
+ * Show forums and new forum form when editing a group
193
+ *
194
+ * @since bbPress (r3563)
195
+ * @uses bbp_get_template_part()
196
+ */
197
+ public function edit_screen() {
198
+
199
+ $checked = bp_get_new_group_enable_forum() || bp_group_is_forum_enabled( bp_get_group_id() ); ?>
200
+
201
+ <h4><?php _e( 'Enable Group Forum', 'bbpress' ); ?></h4>
202
+
203
+ <p><?php _e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
204
+
205
+ <div class="checkbox">
206
+ <label><input type="checkbox" name="bbp-edit-group-forum" id="bbp-edit-group-forum" value="1"<?php checked( $checked ); ?> /> <?php _e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
207
+ </div>
208
+
209
+ <p class="description"><?php _e( 'Saying no will not delete existing forum content.', 'bbpress' ); ?></p>
210
+
211
+ <input type="submit" value="<?php esc_attr_e( 'Save Settings', 'bbpress' ); ?>" />
212
+
213
+ <?php
214
+
215
+ // Verify intent
216
+ wp_nonce_field( 'groups_edit_save_' . $this->slug );
217
+ }
218
+
219
+ /**
220
+ * Save the Group Forum data on edit
221
+ *
222
+ * @since bbPress (r3465)
223
+ * @uses bbp_new_forum_handler() To check for forum creation
224
+ * @uses bbp_edit_forum_handler() To check for forum edit
225
+ */
226
+ public function edit_screen_save() {
227
+
228
+ // Bail if not a POST action
229
+ if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
230
+ return;
231
+
232
+ check_admin_referer( 'groups_edit_save_' . $this->slug );
233
+
234
+ $edit_forum = !empty( $_POST['bbp-edit-group-forum'] ) ? true : false;
235
+ $forum_id = 0;
236
+ $group_id = bp_get_current_group_id();
237
+ $forum_ids = bbp_get_group_forum_ids( $group_id );
238
+ if ( !empty( $forum_ids ) )
239
+ $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
240
+
241
+ // Update the group forum setting
242
+ $group = new BP_Groups_Group( $group_id );
243
+ $group->enable_forum = $edit_forum;
244
+ $group->save();
245
+
246
+ // Redirect after save
247
+ bp_core_redirect( trailingslashit( bp_get_group_permalink( buddypress()->groups->current_group ) . '/admin/' . $this->slug ) );
248
+ }
249
+
250
+ /** Create ****************************************************************/
251
+
252
+ /**
253
+ * Show forums and new forum form when creating a group
254
+ *
255
+ * @since bbPress (r3465)
256
+ */
257
+ public function create_screen() {
258
+
259
+ // Bail if not looking at this screen
260
+ if ( !bp_is_group_creation_step( $this->slug ) )
261
+ return false;
262
+
263
+ $checked = bp_get_new_group_enable_forum() || groups_get_groupmeta( bp_get_new_group_id(), 'forum_id' ); ?>
264
+
265
+ <h4><?php _e( 'Group Forum', 'bbpress' ); ?></h4>
266
+
267
+ <p><?php _e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
268
+
269
+ <div class="checkbox">
270
+ <label><input type="checkbox" name="bbp-create-group-forum" id="bbp-create-group-forum" value="1"<?php checked( $checked ); ?> /> <?php _e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
271
+ </div>
272
+
273
+ <?php
274
+
275
+ // Verify intent
276
+ wp_nonce_field( 'groups_create_save_' . $this->slug );
277
+ }
278
+
279
+ /**
280
+ * Save the Group Forum data on create
281
+ *
282
+ * @since bbPress (r3465)
283
+ */
284
+ public function create_screen_save() {
285
+
286
+ check_admin_referer( 'groups_create_save_' . $this->slug );
287
+
288
+ $create_forum = !empty( $_POST['bbp-create-group-forum'] ) ? true : false;
289
+ $forum_id = 0;
290
+ $forum_ids = bbp_get_group_forum_ids( bp_get_new_group_id() );
291
+ if ( !empty( $forum_ids ) )
292
+ $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
293
+
294
+ // Create a forum, or not
295
+ switch ( $create_forum ) {
296
+ case true :
297
+
298
+ // Bail if initial content was already created
299
+ if ( !empty( $forum_id ) )
300
+ return;
301
+
302
+ // Set the default forum status
303
+ switch ( bp_get_new_group_status() ) {
304
+ case 'hidden' :
305
+ $status = bbp_get_hidden_status_id();
306
+ break;
307
+ case 'private' :
308
+ $status = bbp_get_private_status_id();
309
+ break;
310
+ case 'public' :
311
+ default :
312
+ $status = bbp_get_public_status_id();
313
+ break;
314
+ }
315
+
316
+ // Create the initial forum
317
+ $forum_id = bbp_insert_forum( array(
318
+ 'post_parent' => bbp_get_group_forums_root_id(),
319
+ 'post_title' => bp_get_new_group_name(),
320
+ 'post_content' => bp_get_new_group_description(),
321
+ 'post_status' => $status
322
+ ) );
323
+
324
+ // Run the BP-specific functions for new groups
325
+ $this->new_forum( array( 'forum_id' => $forum_id ) );
326
+
327
+ // Update forum active
328
+ groups_update_groupmeta( bp_get_new_group_id(), '_bbp_forum_enabled_' . $forum_id, true );
329
+
330
+ break;
331
+ case false :
332
+
333
+ // Forum was created but is now being undone
334
+ if ( !empty( $forum_id ) ) {
335
+ wp_delete_post( $forum_id, true );
336
+ groups_delete_groupmeta( bp_get_new_group_id(), 'forum_id' );
337
+ groups_delete_groupmeta( bp_get_new_group_id(), '_bbp_forum_enabled_' . $forum_id );
338
+ }
339
+
340
+ break;
341
+ }
342
+ }
343
+
344
+ /**
345
+ * Used to start an output buffer
346
+ */
347
+ public function ob_start() {
348
+ ob_start();
349
+ }
350
+
351
+ /**
352
+ * Used to end an output buffer
353
+ */
354
+ public function ob_end_clean() {
355
+ ob_end_clean();
356
+ }
357
+
358
+ /**
359
+ * Creating a group forum or category (including root for group)
360
+ *
361
+ * @since bbPress (r3653)
362
+ * @param type $forum_args
363
+ * @uses bbp_get_forum_id()
364
+ * @uses bp_get_current_group_id()
365
+ * @uses bbp_add_forum_id_to_group()
366
+ * @uses bbp_add_group_id_to_forum()
367
+ * @return if no forum_id is available
368
+ */
369
+ public function new_forum( $forum_args = array() ) {
370
+
371
+ // Bail if no forum_id was passed
372
+ if ( empty( $forum_args['forum_id'] ) )
373
+ return;
374
+
375
+ // Validate forum_id
376
+ $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
377
+ $group_id = bp_get_current_group_id();
378
+
379
+ bbp_add_forum_id_to_group( $group_id, $forum_id );
380
+ bbp_add_group_id_to_forum( $forum_id, $group_id );
381
+ }
382
+
383
+ /**
384
+ * Removing a group forum or category (including root for group)
385
+ *
386
+ * @since bbPress (r3653)
387
+ * @param type $forum_args
388
+ * @uses bbp_get_forum_id()
389
+ * @uses bp_get_current_group_id()
390
+ * @uses bbp_add_forum_id_to_group()
391
+ * @uses bbp_add_group_id_to_forum()
392
+ * @return if no forum_id is available
393
+ */
394
+ public function remove_forum( $forum_args = array() ) {
395
+
396
+ // Bail if no forum_id was passed
397
+ if ( empty( $forum_args['forum_id'] ) )
398
+ return;
399
+
400
+ // Validate forum_id
401
+ $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
402
+ $group_id = bp_get_current_group_id();
403
+
404
+ bbp_remove_forum_id_from_group( $group_id, $forum_id );
405
+ bbp_remove_group_id_from_forum( $forum_id, $group_id );
406
+ }
407
+
408
+ /** Display Methods *******************************************************/
409
+
410
+ /**
411
+ * Output the forums for a group in the edit screens
412
+ *
413
+ * @since bbPress (r3653)
414
+ * @uses bp_get_current_group_id()
415
+ * @uses bbp_get_group_forum_ids()
416
+ * @uses bbp_has_forums()
417
+ * @uses bbp_get_template_part()
418
+ */
419
+ public function display_forums( $offset = 0 ) {
420
+
421
+ // Allow actions immediately before group forum output
422
+ do_action( 'bbp_before_group_forum_display' );
423
+
424
+ // Load up bbPress once
425
+ $bbp = bbpress();
426
+
427
+ // Forum data
428
+ $forum_ids = bbp_get_group_forum_ids( bp_get_current_group_id() );
429
+ $forum_args = array( 'post__in' => $forum_ids, 'post_parent' => null );
430
+
431
+ // Unset global queries
432
+ $bbp->forum_query = new stdClass;
433
+ $bbp->topic_query = new stdClass;
434
+ $bbp->reply_query = new stdClass;
435
+
436
+ // Unset global ID's
437
+ $bbp->current_forum_id = 0;
438
+ $bbp->current_topic_id = 0;
439
+ $bbp->current_reply_id = 0;
440
+ $bbp->current_topic_tag_id = 0;
441
+
442
+ // Reset the post data
443
+ wp_reset_postdata();
444
+
445
+ // Allow admins special views
446
+ $post_status = array( bbp_get_closed_status_id(), bbp_get_public_status_id() );
447
+ if ( is_super_admin() || current_user_can( 'moderate' ) || bp_is_item_admin() || bp_is_item_mod() )
448
+ $post_status = array_merge( $post_status, array( bbp_get_spam_status_id(), bbp_get_trash_status_id() ) ); ?>
449
+
450
+ <div id="bbpress-forums">
451
+
452
+ <?php
453
+
454
+ // Looking at the group forum root
455
+ if ( !bp_action_variable( $offset ) ) :
456
+
457
+ // Query forums and show them if they exist
458
+ if ( !empty( $forum_ids ) && bbp_has_forums( $forum_args ) ) :
459
+
460
+ // Only one forum found
461
+ if ( 1 == $bbp->forum_query->post_count ) :
462
+
463
+ // Get forum data
464
+ $forum_slug = bp_action_variable( $offset );
465
+ $forum_args = array( 'name' => $forum_slug, 'post_type' => bbp_get_forum_post_type() );
466
+ $forums = get_posts( $forum_args );
467
+
468
+ bbp_the_forum();
469
+
470
+ // Forum exists
471
+ if ( !empty( $forums ) ) :
472
+ $forum = $forums[0];
473
+
474
+ // Suppress subforums for now
475
+ add_filter( 'bbp_get_forum_subforum_count', '__return_false' );
476
+
477
+ // Set up forum data
478
+ $forum_id = bbpress()->current_forum_id = $forum->ID;
479
+ bbp_set_query_name( 'bbp_single_forum' ); ?>
480
+
481
+ <h3><?php bbp_forum_title(); ?></h3>
482
+
483
+ <?php bbp_get_template_part( 'content', 'single-forum' ); ?>
484
+
485
+ <?php
486
+
487
+ // Remove the subforum suppression filter
488
+ remove_filter( 'bbp_get_forum_subforum_count', '__return_false' );
489
+
490
+ ?>
491
+
492
+ <?php else : ?>
493
+
494
+ <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
495
+
496
+ <?php bbp_get_template_part( 'form', 'topic' ); ?>
497
+
498
+ <?php endif;
499
+
500
+ // More than 1 forum found or group forum admin screen
501
+ elseif ( 1 < $bbp->forum_query->post_count ) : ?>
502
+
503
+ <h3><?php _e( 'Forums', 'bbpress' ); ?></h3>
504
+
505
+ <?php bbp_get_template_part( 'loop', 'forums' ); ?>
506
+
507
+ <h3><?php _e( 'Topics', 'bbpress' ); ?></h3>
508
+
509
+ <?php if ( bbp_has_topics( array( 'post_parent__in' => $forum_ids ) ) ) : ?>
510
+
511
+ <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
512
+
513
+ <?php bbp_get_template_part( 'loop', 'topics' ); ?>
514
+
515
+ <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
516
+
517
+ <?php bbp_get_template_part( 'form', 'topic' ); ?>
518
+
519
+ <?php else : ?>
520
+
521
+ <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
522
+
523
+ <?php bbp_get_template_part( 'form', 'topic' ); ?>
524
+
525
+ <?php endif;
526
+
527
+ // No forums found
528
+ else : ?>
529
+
530
+ <div id="message" class="info">
531
+ <p><?php _e( 'This group does not currently have any forums.', 'bbpress' ); ?></p>
532
+ </div>
533
+
534
+ <?php endif;
535
+
536
+ // No forums found
537
+ else : ?>
538
+
539
+ <div id="message" class="info">
540
+ <p><?php _e( 'This group does not currently have any forums.', 'bbpress' ); ?></p>
541
+ </div>
542
+
543
+ <?php endif;
544
+
545
+ // Single forum
546
+ elseif ( ( bp_action_variable( $offset ) != $this->slug ) && ( bp_action_variable( $offset ) != $this->topic_slug ) && ( bp_action_variable( $offset ) != $this->reply_slug ) ) :
547
+
548
+ // Get forum data
549
+ $forum_slug = bp_action_variable( $offset );
550
+ $forum_args = array( 'name' => $forum_slug, 'post_type' => bbp_get_forum_post_type() );
551
+ $forums = get_posts( $forum_args );
552
+
553
+ // Forum exists
554
+ if ( !empty( $forums ) ) :
555
+ $forum = $forums[0];
556
+
557
+ // Set up forum data
558
+ $forum_id = bbpress()->current_forum_id = $forum->ID;
559
+
560
+ // Reset necessary forum_query attributes for forums loop to function
561
+ $bbp->forum_query->query_vars['post_type'] = bbp_get_forum_post_type();
562
+ $bbp->forum_query->in_the_loop = true;
563
+ $bbp->forum_query->post = get_post( $forum_id );
564
+
565
+ // Forum edit
566
+ if ( bp_action_variable( $offset + 1 ) == $bbp->edit_id ) :
567
+ global $wp_query, $post;
568
+
569
+ $wp_query->bbp_is_edit = true;
570
+ $wp_query->bbp_is_forum_edit = true;
571
+ $post = $forum;
572
+
573
+ bbp_set_query_name( 'bbp_forum_form' );
574
+
575
+ bbp_get_template_part( 'form', 'forum' );
576
+
577
+ else :
578
+ bbp_set_query_name( 'bbp_single_forum' ); ?>
579
+
580
+ <h3><?php bbp_forum_title(); ?></h3>
581
+
582
+ <?php bbp_get_template_part( 'content', 'single-forum' );
583
+
584
+ endif;
585
+
586
+ else :
587
+ bbp_get_template_part( 'feedback', 'no-topics' );
588
+ bbp_get_template_part( 'form', 'topic' );
589
+
590
+ endif;
591
+
592
+ // Single topic
593
+ elseif ( bp_action_variable( $offset ) == $this->topic_slug ) :
594
+
595
+ // Get topic data
596
+ $topic_slug = bp_action_variable( $offset + 1 );
597
+ $topic_args = array( 'name' => $topic_slug, 'post_type' => bbp_get_topic_post_type(), 'post_status' => $post_status );
598
+ $topics = get_posts( $topic_args );
599
+
600
+ // Topic exists
601
+ if ( !empty( $topics ) ) :
602
+ $topic = $topics[0];
603
+
604
+ // Set up topic data
605
+ $topic_id = bbpress()->current_topic_id = $topic->ID;
606
+ $forum_id = bbp_get_topic_forum_id( $topic_id );
607
+
608
+ // Reset necessary forum_query attributes for topics loop to function
609
+ $bbp->forum_query->query_vars['post_type'] = bbp_get_forum_post_type();
610
+ $bbp->forum_query->in_the_loop = true;
611
+ $bbp->forum_query->post = get_post( $forum_id );
612
+
613
+ // Reset necessary topic_query attributes for topics loop to function
614
+ $bbp->topic_query->query_vars['post_type'] = bbp_get_topic_post_type();
615
+ $bbp->topic_query->in_the_loop = true;
616
+ $bbp->topic_query->post = $topic;
617
+
618
+ // Topic edit
619
+ if ( bp_action_variable( $offset + 2 ) == $bbp->edit_id ) :
620
+ global $wp_query, $post;
621
+ $wp_query->bbp_is_edit = true;
622
+ $wp_query->bbp_is_topic_edit = true;
623
+ $post = $topic;
624
+
625
+ // Merge
626
+ if ( !empty( $_GET['action'] ) && 'merge' == $_GET['action'] ) :
627
+ bbp_set_query_name( 'bbp_topic_merge' );
628
+
629
+ bbp_get_template_part( 'form', 'topic-merge' );
630
+
631
+ // Split
632
+ elseif ( !empty( $_GET['action'] ) && 'split' == $_GET['action'] ) :
633
+ bbp_set_query_name( 'bbp_topic_split' );
634
+
635
+ bbp_get_template_part( 'form', 'topic-split' );
636
+
637
+ // Edit
638
+ else :
639
+ bbp_set_query_name( 'bbp_topic_form' );
640
+ bbp_get_template_part( 'form', 'topic' );
641
+
642
+ endif;
643
+
644
+ // Single Topic
645
+ else:
646
+
647
+ bbp_set_query_name( 'bbp_single_topic' ); ?>
648
+
649
+ <h3><?php bbp_topic_title(); ?></h3>
650
+
651
+ <?php bbp_get_template_part( 'content', 'single-topic' );
652
+
653
+ endif;
654
+
655
+ // No Topics
656
+ else :
657
+ bbp_get_template_part( 'feedback', 'no-topics' );
658
+ bbp_get_template_part( 'form', 'topic' );
659
+
660
+ endif;
661
+
662
+ // Single reply
663
+ elseif ( bp_action_variable( $offset ) == $this->reply_slug ) :
664
+
665
+ // Get reply data
666
+ $reply_slug = bp_action_variable( $offset + 1 );
667
+ $reply_args = array( 'name' => $reply_slug, 'post_type' => bbp_get_reply_post_type() );
668
+ $replies = get_posts( $reply_args );
669
+
670
+ if ( empty( $replies ) )
671
+ return;
672
+
673
+ // Get the first reply
674
+ $reply = $replies[0];
675
+
676
+ // Set up reply data
677
+ $reply_id = bbpress()->current_reply_id = $reply->ID;
678
+ $topic_id = bbp_get_reply_topic_id( $reply_id );
679
+ $forum_id = bbp_get_reply_forum_id( $reply_id );
680
+
681
+ // Reset necessary forum_query attributes for reply to function
682
+ $bbp->forum_query->query_vars['post_type'] = bbp_get_forum_post_type();
683
+ $bbp->forum_query->in_the_loop = true;
684
+ $bbp->forum_query->post = get_post( $forum_id );
685
+
686
+ // Reset necessary topic_query attributes for reply to function
687
+ $bbp->topic_query->query_vars['post_type'] = bbp_get_topic_post_type();
688
+ $bbp->topic_query->in_the_loop = true;
689
+ $bbp->topic_query->post = get_post( $topic_id );
690
+
691
+ // Reset necessary reply_query attributes for reply to function
692
+ $bbp->reply_query->query_vars['post_type'] = bbp_get_reply_post_type();
693
+ $bbp->reply_query->in_the_loop = true;
694
+ $bbp->reply_query->post = $reply;
695
+
696
+ if ( bp_action_variable( $offset + 2 ) == $bbp->edit_id ) :
697
+ global $wp_query, $post;
698
+
699
+ $wp_query->bbp_is_edit = true;
700
+ $wp_query->bbp_is_reply_edit = true;
701
+ $post = $reply;
702
+
703
+ bbp_set_query_name( 'bbp_reply_form' );
704
+ bbp_get_template_part( 'form', 'reply' );
705
+
706
+ endif;
707
+
708
+ endif; ?>
709
+
710
+ </div>
711
+
712
+ <?php
713
+
714
+ // Allow actions immediately after group forum output
715
+ do_action( 'bbp_after_group_forum_display' );
716
+ }
717
+
718
+ /** Redirect Helpers ******************************************************/
719
+
720
+ /**
721
+ * Redirect to the group forum screen
722
+ *
723
+ * @since bbPress (r3653)
724
+ * @param str $redirect_url
725
+ * @param str $redirect_to
726
+ */
727
+ public function new_topic_redirect_to( $redirect_url = '', $redirect_to = '', $topic_id = 0 ) {
728
+ if ( bp_is_group() ) {
729
+ $topic = bbp_get_topic( $topic_id );
730
+ $topic_hash = '#post-' . $topic_id;
731
+ $redirect_url = trailingslashit( bp_get_group_permalink( groups_get_current_group() ) ) . trailingslashit( $this->slug ) . trailingslashit( $this->topic_slug ) . trailingslashit( $topic->post_name ) . $topic_hash;
732
+ }
733
+
734
+ return $redirect_url;
735
+ }
736
+
737
+ /**
738
+ * Redirect to the group forum screen
739
+ *
740
+ * @since bbPress (r3653)
741
+ */
742
+ public function new_reply_redirect_to( $redirect_url = '', $redirect_to = '', $reply_id = 0 ) {
743
+ global $wp_rewrite;
744
+
745
+ if ( bp_is_group() ) {
746
+ $topic_id = bbp_get_reply_topic_id( $reply_id );
747
+ $topic = bbp_get_topic( $topic_id );
748
+ $reply_position = bbp_get_reply_position( $reply_id, $topic_id );
749
+ $reply_page = ceil( (int) $reply_position / (int) bbp_get_replies_per_page() );
750
+ $reply_hash = '#post-' . $reply_id;
751
+ $topic_url = trailingslashit( bp_get_group_permalink( groups_get_current_group() ) ) . trailingslashit( $this->slug ) . trailingslashit( $this->topic_slug ) . trailingslashit( $topic->post_name );
752
+
753
+ // Don't include pagination if on first page
754
+ if ( 1 >= $reply_page ) {
755
+ $redirect_url = trailingslashit( $topic_url ) . $reply_hash;
756
+
757
+ // Include pagination
758
+ } else {
759
+ $redirect_url = trailingslashit( $topic_url ) . trailingslashit( $wp_rewrite->pagination_base ) . trailingslashit( $reply_page ) . $reply_hash;
760
+ }
761
+
762
+ // Add topic view query arg back to end if it is set
763
+ if ( bbp_get_view_all() ) {
764
+ $redirect_url = bbp_add_view_all( $redirect_url );
765
+ }
766
+ }
767
+
768
+ return $redirect_url;
769
+ }
770
+
771
+ /**
772
+ * Redirect to the group admin forum edit screen
773
+ *
774
+ * @since bbPress (r3653)
775
+ * @uses groups_get_current_group()
776
+ * @uses bp_is_group_admin_screen()
777
+ * @uses trailingslashit()
778
+ * @uses bp_get_root_domain()
779
+ * @uses bp_get_groups_root_slug()
780
+ */
781
+ public function edit_redirect_to( $redirect_url = '' ) {
782
+
783
+ // Get the current group, if there is one
784
+ $group = groups_get_current_group();
785
+
786
+ // If this is a group of any kind, empty out the redirect URL
787
+ if ( bp_is_group_admin_screen( $this->slug ) )
788
+ $redirect_url = trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/' . $this->slug );
789
+
790
+ return $redirect_url;
791
+ }
792
+
793
+ /** Form Helpers **********************************************************/
794
+
795
+ public function forum_parent() {
796
+ ?>
797
+
798
+ <input type="hidden" name="bbp_forum_parent_id" id="bbp_forum_parent_id" value="<?php bbp_group_forums_root_id(); ?>" />
799
+
800
+ <?php
801
+ }
802
+
803
+ public function topic_parent() {
804
+
805
+ $forum_ids = bbp_get_group_forum_ids( bp_get_current_group_id() ); ?>
806
+
807
+ <p>
808
+ <label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
809
+ <?php bbp_dropdown( array( 'include' => $forum_ids, 'selected' => bbp_get_form_topic_forum() ) ); ?>
810
+ </p>
811
+
812
+ <?php
813
+ }
814
+
815
+ /** Permalink Mappers *****************************************************/
816
+
817
+ /**
818
+ * Maybe map a bbPress forum/topic/reply permalink to the corresponding group
819
+ *
820
+ * @param int $post_id
821
+ * @uses get_post()
822
+ * @uses bbp_is_reply()
823
+ * @uses bbp_get_reply_topic_id()
824
+ * @uses bbp_get_reply_forum_id()
825
+ * @uses bbp_is_topic()
826
+ * @uses bbp_get_topic_forum_id()
827
+ * @uses bbp_is_forum()
828
+ * @uses get_post_field()
829
+ * @uses bbp_get_forum_group_ids()
830
+ * @uses groups_get_group()
831
+ * @uses bp_get_group_admin_permalink()
832
+ * @uses bp_get_group_permalink()
833
+ * @return Bail early if not a group forum post
834
+ * @return string
835
+ */
836
+ private function maybe_map_permalink_to_group( $post_id = 0, $url = false ) {
837
+
838
+ switch ( get_post_type( $post_id ) ) {
839
+
840
+ // Reply
841
+ case bbp_get_reply_post_type() :
842
+ $topic_id = bbp_get_reply_topic_id( $post_id );
843
+ $forum_id = bbp_get_reply_forum_id( $post_id );
844
+ $url_end = trailingslashit( $this->reply_slug ) . get_post_field( 'post_name', $post_id );
845
+ break;
846
+
847
+ // Topic
848
+ case bbp_get_topic_post_type() :
849
+ $topic_id = $post_id;
850
+ $forum_id = bbp_get_topic_forum_id( $post_id );
851
+ $url_end = trailingslashit( $this->topic_slug ) . get_post_field( 'post_name', $post_id );
852
+ break;
853
+
854
+ // Forum
855
+ case bbp_get_forum_post_type() :
856
+ $forum_id = $post_id;
857
+ $url_end = ''; //get_post_field( 'post_name', $post_id );
858
+ break;
859
+
860
+ // Unknown
861
+ default :
862
+ return $url;
863
+ break;
864
+ }
865
+
866
+ // Get group ID's for this forum
867
+ $group_ids = bbp_get_forum_group_ids( $forum_id );
868
+
869
+ // Bail if the post isn't associated with a group
870
+ if ( empty( $group_ids ) )
871
+ return $url;
872
+
873
+ // @todo Multiple group forums/forum groups
874
+ $group_id = $group_ids[0];
875
+ $group = groups_get_group( array( 'group_id' => $group_id ) );
876
+
877
+ if ( bp_is_group_admin_screen( $this->slug ) ) {
878
+ $group_permalink = trailingslashit( bp_get_group_admin_permalink( $group ) );
879
+ } else {
880
+ $group_permalink = trailingslashit( bp_get_group_permalink( $group ) );
881
+ }
882
+
883
+ return trailingslashit( trailingslashit( $group_permalink . $this->slug ) . $url_end );
884
+ }
885
+
886
+ /**
887
+ * Map a forum permalink to its corresponding group
888
+ *
889
+ * @since bbPress (r3802)
890
+ * @param string $url
891
+ * @param int $forum_id
892
+ * @uses maybe_map_permalink_to_group()
893
+ * @return string
894
+ */
895
+ public function map_forum_permalink_to_group( $url, $forum_id ) {
896
+ return $this->maybe_map_permalink_to_group( $forum_id, $url );
897
+ }
898
+
899
+ /**
900
+ * Map a topic permalink to its group forum
901
+ *
902
+ * @since bbPress (r3802)
903
+ * @param string $url
904
+ * @param int $topic_id
905
+ * @uses maybe_map_permalink_to_group()
906
+ * @return string
907
+ */
908
+ public function map_topic_permalink_to_group( $url, $topic_id ) {
909
+ return $this->maybe_map_permalink_to_group( $topic_id, $url );
910
+ }
911
+
912
+ /**
913
+ * Map a reply permalink to its group forum
914
+ *
915
+ * @since bbPress (r3802)
916
+ * @param string $url
917
+ * @param int $reply_id
918
+ * @uses maybe_map_permalink_to_group()
919
+ * @return string
920
+ */
921
+ public function map_reply_permalink_to_group( $url, $reply_id ) {
922
+ return $this->maybe_map_permalink_to_group( bbp_get_reply_topic_id( $reply_id ), $url );
923
+ }
924
+
925
+ /**
926
+ * Map a reply edit link to its group forum
927
+ *
928
+ * @param string $url
929
+ * @param int $reply_id
930
+ * @uses maybe_map_permalink_to_group()
931
+ * @return string
932
+ */
933
+ public function map_reply_edit_url_to_group( $url, $reply_id ) {
934
+ $new = $this->maybe_map_permalink_to_group( $reply_id );
935
+
936
+ if ( empty( $new ) )
937
+ return $url;
938
+
939
+ return trailingslashit( $new ) . bbpress()->edit_id . '/';
940
+ }
941
+
942
+ /**
943
+ * Map a post link to its group forum
944
+ *
945
+ * @param string $url
946
+ * @param obj $post
947
+ * @param boolean $leavename
948
+ * @uses maybe_map_permalink_to_group()
949
+ * @return string
950
+ */
951
+ public function post_link( $url, $post ) {
952
+ return $this->maybe_map_permalink_to_group( $post->ID, $url );
953
+ }
954
+
955
+ /**
956
+ * Map a page link to its group forum
957
+ *
958
+ * @param string $url
959
+ * @param int $post_id
960
+ * @param $sample
961
+ * @uses maybe_map_permalink_to_group()
962
+ * @return string
963
+ */
964
+ public function page_link( $url, $post_id ) {
965
+ return $this->maybe_map_permalink_to_group( $post_id, $url );
966
+ }
967
+
968
+ /**
969
+ * Map a custom post type link to its group forum
970
+ *
971
+ * @param string $url
972
+ * @param obj $post
973
+ * @param $leavename
974
+ * @param $sample
975
+ * @uses maybe_map_permalink_to_group()
976
+ * @return string
977
+ */
978
+ public function post_type_link( $url, $post ) {
979
+ return $this->maybe_map_permalink_to_group( $post->ID, $url );
980
+ }
981
+
982
+ /**
983
+ * Fix pagination of topics on forum view
984
+ *
985
+ * @param array $args
986
+ * @global $wp_rewrite
987
+ * @uses bbp_get_forum_id()
988
+ * @uses maybe_map_permalink_to_group
989
+ * @return array
990
+ */
991
+ public function topic_pagination( $args ) {
992
+ $new = $this->maybe_map_permalink_to_group( bbp_get_forum_id() );
993
+
994
+ if ( empty( $new ) )
995
+ return $args;
996
+
997
+ global $wp_rewrite;
998
+
999
+ $args['base'] = trailingslashit( $new ) . $wp_rewrite->pagination_base . '/%#%/';
1000
+
1001
+ return $args;
1002
+ }
1003
+
1004
+ /**
1005
+ * Fix pagination of replies on topic view
1006
+ *
1007
+ * @param array $args
1008
+ * @global $wp_rewrite
1009
+ * @uses bbp_get_topic_id()
1010
+ * @uses maybe_map_permalink_to_group
1011
+ * @return array
1012
+ */
1013
+ public function replies_pagination( $args ) {
1014
+ $new = $this->maybe_map_permalink_to_group( bbp_get_topic_id() );
1015
+ if ( empty( $new ) )
1016
+ return $args;
1017
+
1018
+ global $wp_rewrite;
1019
+
1020
+ $args['base'] = trailingslashit( $new ) . $wp_rewrite->pagination_base . '/%#%/';
1021
+
1022
+ return $args;
1023
+ }
1024
+
1025
+ /**
1026
+ * Ensure that forum content associated with a BuddyPress group can only be
1027
+ * viewed via the group URL.
1028
+ *
1029
+ * @since bbPress (r3802)
1030
+ */
1031
+ public function redirect_canonical() {
1032
+
1033
+ // Viewing a single forum
1034
+ if ( bbp_is_single_forum() ) {
1035
+ $forum_id = get_the_ID();
1036
+ $group_ids = bbp_get_forum_group_ids( $forum_id );
1037
+
1038
+ // Viewing a single topic
1039
+ } elseif ( bbp_is_single_topic() ) {
1040
+ $topic_id = get_the_ID();
1041
+ $slug = get_post_field( 'post_name', $topic_id );
1042
+ $forum_id = bbp_get_topic_forum_id( $topic_id );
1043
+ $group_ids = bbp_get_forum_group_ids( $forum_id );
1044
+
1045
+ // Not a forum or topic
1046
+ } else {
1047
+ return;
1048
+ }
1049
+
1050
+ // Bail if not a group forum
1051
+ if ( empty( $group_ids ) )
1052
+ return;
1053
+
1054
+ // Use the first group ID
1055
+ $group_id = $group_ids[0];
1056
+ $group = groups_get_group( array( 'group_id' => $group_id ) );
1057
+ $group_link = trailingslashit( bp_get_group_permalink( $group ) );
1058
+ $redirect_to = trailingslashit( $group_link . $this->slug );
1059
+
1060
+ // Add topic slug to URL
1061
+ if ( bbp_is_single_topic() ) {
1062
+ $redirect_to = trailingslashit( $redirect_to . $this->topic_slug . '/' . $slug );
1063
+ }
1064
+
1065
+ bp_core_redirect( $redirect_to );
1066
+ }
1067
+
1068
+ /** Activity ***************************************************************/
1069
+
1070
+ /**
1071
+ * Map a forum post to its corresponding group in the group activity stream.
1072
+ *
1073
+ * @since bbPress (r4396)
1074
+ *
1075
+ * @param array $args Arguments from BBP_BuddyPress_Activity::record_activity()
1076
+ * @uses groups_get_current_group() To see if we're posting from a BP group
1077
+ *
1078
+ * @return array
1079
+ */
1080
+ public function map_activity_to_group( $args = array() ) {
1081
+
1082
+ // Get current BP group
1083
+ $group = groups_get_current_group();
1084
+
1085
+ // Not posting from a BuddyPress group? stop now!
1086
+ if ( empty( $group ) )
1087
+ return $args;
1088
+
1089
+ // Set the component to 'groups' so the activity item shows up in the group
1090
+ $args['component'] = buddypress()->groups->id;
1091
+
1092
+ // Move the forum post ID to the secondary item ID
1093
+ $args['secondary_item_id'] = $args['item_id'];
1094
+
1095
+ // Set the item ID to the group ID so the activity item shows up in the group
1096
+ $args['item_id'] = $group->id;
1097
+
1098
+ return $args;
1099
+ }
1100
+ }
1101
+ endif;
includes/extend/buddypress/index.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Do not modify the files in this folder.
5
+ */
includes/extend/buddypress/loader.php ADDED
@@ -0,0 +1,323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress BuddyPress Component Class
5
+ *
6
+ * bbPress and BuddyPress are designed to connect together seamlessly and
7
+ * invisibly, and this is the hunk of code necessary to make that happen.
8
+ *
9
+ * The code in this BuddyPress Extension does some pretty complicated stuff,
10
+ * far outside the realm of the simplicity bbPress is traditionally known for.
11
+ *
12
+ * While the rest of bbPress serves as an example of how to write pretty, simple
13
+ * code, what's in these files is pure madness. It should not be used as an
14
+ * example of anything other than successfully juggling chainsaws and puppy-dogs.
15
+ *
16
+ * @package bbPress
17
+ * @subpackage BuddyPress
18
+ */
19
+
20
+ // Exit if accessed directly
21
+ if ( !defined( 'ABSPATH' ) ) exit;
22
+
23
+ if ( !class_exists( 'BBP_Forums_Component' ) ) :
24
+ /**
25
+ * Loads Forums Component
26
+ *
27
+ * @since bbPress (r3552)
28
+ *
29
+ * @package bbPress
30
+ * @subpackage BuddyPress
31
+ */
32
+ class BBP_Forums_Component extends BP_Component {
33
+
34
+ /**
35
+ * Start the forums component creation process
36
+ *
37
+ * @since bbPress (r3552)
38
+ */
39
+ public function __construct() {
40
+ parent::start(
41
+ 'forums',
42
+ __( 'Forums', 'bbpress' ),
43
+ BP_PLUGIN_DIR
44
+ );
45
+ $this->includes();
46
+ $this->setup_globals();
47
+ $this->setup_actions();
48
+ $this->setup_nav();
49
+ $this->fully_loaded();
50
+ }
51
+
52
+ /**
53
+ * Include BuddyPress classes and functions
54
+ */
55
+ public function includes() {
56
+
57
+ // Helper BuddyPress functions
58
+ require( bbpress()->includes_dir . 'extend/buddypress/functions.php' );
59
+
60
+ // Members modifications
61
+ require( bbpress()->includes_dir . 'extend/buddypress/members.php' );
62
+
63
+ // BuddyPress Activity Extension class
64
+ if ( bp_is_active( 'activity' ) ) {
65
+ require( bbpress()->includes_dir . 'extend/buddypress/activity.php' );
66
+ }
67
+
68
+ // BuddyPress Group Extension class
69
+ if ( bbp_is_group_forums_active() && bp_is_active( 'groups' ) ) {
70
+ require( bbpress()->includes_dir . 'extend/buddypress/group.php' );
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Setup globals
76
+ *
77
+ * The BP_FORUMS_SLUG constant is deprecated, and only used here for
78
+ * backwards compatibility.
79
+ *
80
+ * @since bbPress (r3552)
81
+ */
82
+ public function setup_globals() {
83
+ $bp = buddypress();
84
+
85
+ // Define the parent forum ID
86
+ if ( !defined( 'BP_FORUMS_PARENT_FORUM_ID' ) )
87
+ define( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
88
+
89
+ // Define a slug, if necessary
90
+ if ( !defined( 'BP_FORUMS_SLUG' ) )
91
+ define( 'BP_FORUMS_SLUG', $this->id );
92
+
93
+ // All globals for messaging component.
94
+ $globals = array(
95
+ 'path' => BP_PLUGIN_DIR,
96
+ 'slug' => BP_FORUMS_SLUG,
97
+ 'root_slug' => isset( $bp->pages->forums->slug ) ? $bp->pages->forums->slug : BP_FORUMS_SLUG,
98
+ 'has_directory' => false,
99
+ 'notification_callback' => 'messages_format_notifications',
100
+ 'search_string' => __( 'Search Forums...', 'bbpress' ),
101
+ );
102
+
103
+ parent::setup_globals( $globals );
104
+ }
105
+
106
+ /**
107
+ * Instantiate classes for BuddyPress integration
108
+ *
109
+ * @since bbPress (r3395)
110
+ */
111
+ public function setup_components() {
112
+
113
+ // Always load the members component
114
+ bbpress()->extend->buddypress->members = new BBP_BuddyPress_Members;
115
+
116
+ // Create new activity class
117
+ if ( bp_is_active( 'activity' ) ) {
118
+ bbpress()->extend->buddypress->activity = new BBP_BuddyPress_Activity;
119
+ }
120
+
121
+ // Register the group extension only if groups are active
122
+ if ( bbp_is_group_forums_active() && bp_is_active( 'groups' ) ) {
123
+ bp_register_group_extension( 'BBP_Forums_Group_Extension' );
124
+ }
125
+ }
126
+
127
+ /**
128
+ * Setup the actions
129
+ *
130
+ * @since bbPress (r3395)
131
+ * @access private
132
+ * @uses add_filter() To add various filters
133
+ * @uses add_action() To add various actions
134
+ */
135
+ public function setup_actions() {
136
+
137
+ // Setup the components
138
+ add_action( 'bp_init', array( $this, 'setup_components' ) );
139
+
140
+ parent::setup_actions();
141
+ }
142
+
143
+ /**
144
+ * Allow the variables, actions, and filters to be modified by third party
145
+ * plugins and themes.
146
+ *
147
+ * @since bbPress (r3902)
148
+ */
149
+ private function fully_loaded() {
150
+ do_action_ref_array( 'bbp_buddypress_loaded', array( $this ) );
151
+ }
152
+
153
+ /**
154
+ * Setup BuddyBar navigation
155
+ *
156
+ * @since bbPress (r3552)
157
+ */
158
+ public function setup_nav() {
159
+
160
+ // Stop if there is no user displayed or logged in
161
+ if ( !is_user_logged_in() && !bp_displayed_user_id() )
162
+ return;
163
+
164
+ // Define local variable(s)
165
+ $sub_nav = array();
166
+ $user_domain = '';
167
+
168
+ // Add 'Forums' to the main navigation
169
+ $main_nav = array(
170
+ 'name' => __( 'Forums', 'bbpress' ),
171
+ 'slug' => $this->slug,
172
+ 'position' => 80,
173
+ 'screen_function' => 'bbp_member_forums_screen_topics',
174
+ 'default_subnav_slug' => 'topics',
175
+ 'item_css_id' => $this->id
176
+ );
177
+
178
+ // Determine user to use
179
+ if ( bp_displayed_user_id() )
180
+ $user_domain = bp_displayed_user_domain();
181
+ elseif ( bp_loggedin_user_domain() )
182
+ $user_domain = bp_loggedin_user_domain();
183
+ else
184
+ return;
185
+
186
+ // User link
187
+ $forums_link = trailingslashit( $user_domain . $this->slug );
188
+
189
+ // Topics started
190
+ $sub_nav[] = array(
191
+ 'name' => __( 'Topics Started', 'bbpress' ),
192
+ 'slug' => 'topics',
193
+ 'parent_url' => $forums_link,
194
+ 'parent_slug' => $this->slug,
195
+ 'screen_function' => 'bbp_member_forums_screen_topics',
196
+ 'position' => 20,
197
+ 'item_css_id' => 'topics'
198
+ );
199
+
200
+ // Replies to topics
201
+ $sub_nav[] = array(
202
+ 'name' => __( 'Replies Created', 'bbpress' ),
203
+ 'slug' => 'replies',
204
+ 'parent_url' => $forums_link,
205
+ 'parent_slug' => $this->slug,
206
+ 'screen_function' => 'bbp_member_forums_screen_replies',
207
+ 'position' => 40,
208
+ 'item_css_id' => 'replies'
209
+ );
210
+
211
+ // Favorite topics
212
+ $sub_nav[] = array(
213
+ 'name' => __( 'Favorites', 'bbpress' ),
214
+ 'slug' => 'favorites',
215
+ 'parent_url' => $forums_link,
216
+ 'parent_slug' => $this->slug,
217
+ 'screen_function' => 'bbp_member_forums_screen_favorites',
218
+ 'position' => 60,
219
+ 'item_css_id' => 'favorites'
220
+ );
221
+
222
+ // Subscribed topics (my profile only)
223
+ if ( bp_is_my_profile() ) {
224
+ $sub_nav[] = array(
225
+ 'name' => __( 'Subscriptions', 'bbpress' ),
226
+ 'slug' => 'subscriptions',
227
+ 'parent_url' => $forums_link,
228
+ 'parent_slug' => $this->slug,
229
+ 'screen_function' => 'bbp_member_forums_screen_subscriptions',
230
+ 'position' => 60,
231
+ 'item_css_id' => 'subscriptions'
232
+ );
233
+ }
234
+
235
+ parent::setup_nav( $main_nav, $sub_nav );
236
+ }
237
+
238
+ /**
239
+ * Set up the admin bar
240
+ *
241
+ * @since bbPress (r3552)
242
+ */
243
+ public function setup_admin_bar() {
244
+
245
+ // Prevent debug notices
246
+ $wp_admin_nav = array();
247
+
248
+ // Menus for logged in user
249
+ if ( is_user_logged_in() ) {
250
+
251
+ // Setup the logged in user variables
252
+ $user_domain = bp_loggedin_user_domain();
253
+ $forums_link = trailingslashit( $user_domain . $this->slug );
254
+
255
+ // Add the "My Account" sub menus
256
+ $wp_admin_nav[] = array(
257
+ 'parent' => buddypress()->my_account_menu_id,
258
+ 'id' => 'my-account-' . $this->id,
259
+ 'title' => __( 'Forums', 'bbpress' ),
260
+ 'href' => trailingslashit( $forums_link )
261
+ );
262
+
263
+ // Topics
264
+ $wp_admin_nav[] = array(
265
+ 'parent' => 'my-account-' . $this->id,
266
+ 'id' => 'my-account-' . $this->id . '-topics',
267
+ 'title' => __( 'Topics Started', 'bbpress' ),
268
+ 'href' => trailingslashit( $forums_link . 'topics' )
269
+ );
270
+
271
+ // Replies
272
+ $wp_admin_nav[] = array(
273
+ 'parent' => 'my-account-' . $this->id,
274
+ 'id' => 'my-account-' . $this->id . '-replies',
275
+ 'title' => __( 'Replies Created', 'bbpress' ),
276
+ 'href' => trailingslashit( $forums_link . 'replies' )
277
+ );
278
+
279
+ // Favorites
280
+ $wp_admin_nav[] = array(
281
+ 'parent' => 'my-account-' . $this->id,
282
+ 'id' => 'my-account-' . $this->id . '-favorites',
283
+ 'title' => __( 'Favorite Topics', 'bbpress' ),
284
+ 'href' => trailingslashit( $forums_link . 'favorites' )
285
+ );
286
+
287
+ // Subscriptions
288
+ $wp_admin_nav[] = array(
289
+ 'parent' => 'my-account-' . $this->id,
290
+ 'id' => 'my-account-' . $this->id . '-subscriptions',
291
+ 'title' => __( 'Subscribed Topics', 'bbpress' ),
292
+ 'href' => trailingslashit( $forums_link . 'subscriptions' )
293
+ );
294
+ }
295
+
296
+ parent::setup_admin_bar( $wp_admin_nav );
297
+ }
298
+
299
+ /**
300
+ * Sets up the title for pages and <title>
301
+ *
302
+ * @since bbPress (r3552)
303
+ */
304
+ public function setup_title() {
305
+ $bp = buddypress();
306
+
307
+ // Adjust title based on view
308
+ if ( bp_is_forums_component() ) {
309
+ if ( bp_is_my_profile() ) {
310
+ $bp->bp_options_title = __( 'Forums', 'bbpress' );
311
+ } elseif ( bp_is_user() ) {
312
+ $bp->bp_options_avatar = bp_core_fetch_avatar( array(
313
+ 'item_id' => bp_displayed_user_id(),
314
+ 'type' => 'thumb'
315
+ ) );
316
+ $bp->bp_options_title = bp_get_displayed_user_fullname();
317
+ }
318
+ }
319
+
320
+ parent::setup_title();
321
+ }
322
+ }
323
+ endif;
includes/extend/buddypress/members.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress BuddyPress Members Class
5
+ *
6
+ * @package bbPress
7
+ * @subpackage BuddyPress
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+ if ( !class_exists( 'BBP_Forums_Members' ) ) :
14
+ /**
15
+ * Member profile modifications
16
+ *
17
+ * @since bbPress (r4395)
18
+ *
19
+ * @package bbPress
20
+ * @subpackage BuddyPress
21
+ */
22
+ class BBP_BuddyPress_Members {
23
+
24
+ /**
25
+ * Main constructor for modifying bbPress profile links
26
+ *
27
+ * @since bbPress (r4395)
28
+ */
29
+ public function __construct() {
30
+ $this->setup_actions();
31
+ $this->setup_filters();
32
+ }
33
+
34
+ /**
35
+ * Setup the actions
36
+ *
37
+ * @since bbPress (r4395)
38
+ *
39
+ * @access private
40
+ * @uses add_filter() To add various filters
41
+ * @uses add_action() To add various actions
42
+ */
43
+ private function setup_actions() {
44
+
45
+ /** Favorites *********************************************************/
46
+
47
+ // Move handler to 'bp_actions' - BuddyPress bypasses template_loader
48
+ remove_action( 'template_redirect', 'bbp_favorites_handler', 1 );
49
+ add_action( 'bp_actions', 'bbp_favorites_handler', 1 );
50
+
51
+ /** Subscriptions *****************************************************/
52
+
53
+ // Move handler to 'bp_actions' - BuddyPress bypasses template_loader
54
+ remove_action( 'template_redirect', 'bbp_subscriptions_handler', 1 );
55
+ add_action( 'bp_actions', 'bbp_subscriptions_handler', 1 );
56
+ }
57
+
58
+ /**
59
+ * Setup the filters
60
+ *
61
+ * @since bbPress (r4395)
62
+ *
63
+ * @access private
64
+ * @uses add_filter() To add various filters
65
+ * @uses add_action() To add various actions
66
+ */
67
+ private function setup_filters() {
68
+ add_filter( 'bbp_pre_get_user_profile_url', array( $this, 'user_profile_url' ) );
69
+ add_filter( 'bbp_get_favorites_permalink', array( $this, 'get_favorites_permalink' ), 10, 2 );
70
+ add_filter( 'bbp_get_subscriptions_permalink', array( $this, 'get_subscriptions_permalink' ), 10, 2 );
71
+ }
72
+
73
+ /** Filters ***************************************************************/
74
+
75
+ /**
76
+ * Override bbPress profile URL with BuddyPress profile URL
77
+ *
78
+ * @since bbPress (r3401)
79
+ * @param string $url
80
+ * @param int $user_id
81
+ * @param string $user_nicename
82
+ * @return string
83
+ */
84
+ public function user_profile_url( $user_id ) {
85
+
86
+ // Define local variable(s)
87
+ $profile_url = '';
88
+
89
+ // Special handling for forum component
90
+ if ( bp_is_current_component( 'forums' ) ) {
91
+
92
+ // Empty action or 'topics' action
93
+ if ( !bp_current_action() || bp_is_current_action( 'topics' ) ) {
94
+ $profile_url = bp_core_get_user_domain( $user_id ) . 'forums/topics';
95
+
96
+ // Empty action or 'topics' action
97
+ } elseif ( bp_is_current_action( 'replies' ) ) {
98
+ $profile_url = bp_core_get_user_domain( $user_id ) . 'forums/replies';
99
+
100
+ // 'favorites' action
101
+ } elseif ( bbp_is_favorites_active() && bp_is_current_action( 'favorites' ) ) {
102
+ $profile_url = $this->get_favorites_permalink( '', $user_id );
103
+
104
+ // 'subscriptions' action
105
+ } elseif ( bbp_is_subscriptions_active() && bp_is_current_action( 'subscriptions' ) ) {
106
+ $profile_url = $this->get_subscriptions_permalink( '', $user_id );
107
+ }
108
+
109
+ // Not in users' forums area
110
+ } else {
111
+ $profile_url = bp_core_get_user_domain( $user_id );
112
+ }
113
+
114
+ return trailingslashit( $profile_url );
115
+ }
116
+
117
+ /**
118
+ * Override bbPress favorites URL with BuddyPress profile URL
119
+ *
120
+ * @since bbPress (r3721)
121
+ * @param string $url
122
+ * @param int $user_id
123
+ * @return string
124
+ */
125
+ public function get_favorites_permalink( $url, $user_id ) {
126
+ $url = trailingslashit( bp_core_get_user_domain( $user_id ) . 'forums/favorites' );
127
+ return $url;
128
+ }
129
+
130
+ /**
131
+ * Override bbPress subscriptions URL with BuddyPress profile URL
132
+ *
133
+ * @since bbPress (r3721)
134
+ * @param string $url
135
+ * @param int $user_id
136
+ * @return string
137
+ */
138
+ public function get_subscriptions_permalink( $url, $user_id ) {
139
+ $url = trailingslashit( bp_core_get_user_domain( $user_id ) . 'forums/subscriptions' );
140
+ return $url;
141
+ }
142
+ }
143
+ endif;
includes/extend/index.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Do not modify the files in this folder.
5
+ */
includes/forums/capabilities.php ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress Forum Capabilites
5
+ *
6
+ * Used to map forum capabilities to WordPress's existing capabilities.
7
+ *
8
+ * @package bbPress
9
+ * @subpackage Capabilities
10
+ */
11
+
12
+ /**
13
+ * Return forum capabilities
14
+ *
15
+ * @since bbPress (r2593)
16
+ *
17
+ * @uses apply_filters() Calls 'bbp_get_forum_caps' with the capabilities
18
+ * @return array Forum capabilities
19
+ */
20
+ function bbp_get_forum_caps() {
21
+ return apply_filters( 'bbp_get_forum_caps', array (
22
+ 'edit_posts' => 'edit_forums',
23
+ 'edit_others_posts' => 'edit_others_forums',
24
+ 'publish_posts' => 'publish_forums',
25
+ 'read_private_posts' => 'read_private_forums',
26
+ 'read_hidden_posts' => 'read_hidden_forums',
27
+ 'delete_posts' => 'delete_forums',
28
+ 'delete_others_posts' => 'delete_others_forums'
29
+ ) );
30
+ }
31
+
32
+ /**
33
+ * Maps forum capabilities
34
+ *
35
+ * @since bbPress (r4242)
36
+ *
37
+ * @param array $caps Capabilities for meta capability
38
+ * @param string $cap Capability name
39
+ * @param int $user_id User id
40
+ * @param mixed $args Arguments
41
+ * @uses get_post() To get the post
42
+ * @uses get_post_type_object() To get the post type object
43
+ * @uses apply_filters() Filter capability map results
44
+ * @return array Actual capabilities for meta capability
45
+ */
46
+ function bbp_map_forum_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
47
+
48
+ // What capability is being checked?
49
+ switch ( $cap ) {
50
+
51
+ /** Reading ***********************************************************/
52
+
53
+ case 'read_private_forums' :
54
+ case 'read_hidden_forums' :
55
+
56
+ // Moderators can always read private/hidden forums
57
+ if ( user_can( $user_id, 'moderate' ) ) {
58
+ $caps = array( 'moderate' );
59
+ }
60
+
61
+ break;
62
+
63
+ case 'read_forum' :
64
+
65
+ // User cannot spectate
66
+ if ( ! user_can( $user_id, 'spectate' ) ) {
67
+ $caps = array( 'do_not_allow' );
68
+
69
+ // Do some post ID based logic
70
+ } else {
71
+
72
+ // Get the post
73
+ $_post = get_post( $args[0] );
74
+ if ( !empty( $_post ) ) {
75
+
76
+ // Get caps for post type object
77
+ $post_type = get_post_type_object( $_post->post_type );
78
+
79
+ // Post is public
80
+ if ( bbp_get_public_status_id() == $_post->post_status ) {
81
+ $caps = array( 'spectate' );
82
+
83
+ // User is author so allow read
84
+ } elseif ( (int) $user_id == (int) $_post->post_author ) {
85
+ $caps = array( 'spectate' );
86
+
87
+ // Unknown so map to private posts
88
+ } else {
89
+ $caps = array( $post_type->cap->read_private_forums );
90
+ }
91
+ }
92
+ }
93
+
94
+ break;
95
+
96
+ /** Publishing ********************************************************/
97
+
98
+ case 'publish_forums' :
99
+
100
+ // Moderators can always edit
101
+ if ( user_can( $user_id, 'moderate' ) ) {
102
+ $caps = array( 'moderate' );
103
+ }
104
+
105
+ break;
106
+
107
+ /** Editing ***********************************************************/
108
+
109
+ // Used primarily in wp-admin
110
+ case 'edit_forums' :
111
+ case 'edit_others_forums' :
112
+
113
+ // Moderators can always edit
114
+ if ( user_can( $user_id, 'moderate' ) ) {
115
+ $caps = array( 'moderate' );
116
+ }
117
+
118
+ break;
119
+
120
+ // Used everywhere
121
+ case 'edit_forum' :
122
+
123
+ // Get the post
124
+ $_post = get_post( $args[0] );
125
+ if ( !empty( $_post ) ) {
126
+
127
+ // Get caps for post type object
128
+ $post_type = get_post_type_object( $_post->post_type );
129
+ $caps = array();
130
+
131
+ // Add 'do_not_allow' cap if user is spam or deleted
132
+ if ( bbp_is_user_inactive( $user_id ) ) {
133
+ $caps[] = 'do_not_allow';
134
+
135
+ // User is author so allow edit
136
+ } elseif ( (int) $user_id == (int) $_post->post_author ) {
137
+ $caps[] = $post_type->cap->edit_posts;
138
+
139
+ // Unknown, so map to edit_others_posts
140
+ } else {
141
+ $caps[] = $post_type->cap->edit_others_posts;
142
+ }
143
+ }
144
+
145
+ break;
146
+
147
+ /** Deleting **********************************************************/
148
+
149
+ // Allow forum authors to delete forums (for BuddyPress groups, etc)
150
+ case 'delete_forum' :
151
+
152
+ // Get the post
153
+ $_post = get_post( $args[0] );
154
+ if ( !empty( $_post ) ) {
155
+
156
+ // Get caps for post type object
157
+ $post_type = get_post_type_object( $_post->post_type );
158
+ $caps = array();
159
+
160
+ // Add 'do_not_allow' cap if user is spam or deleted
161
+ if ( bbp_is_user_inactive( $user_id ) ) {
162
+ $caps[] = 'do_not_allow';
163
+
164
+ // User is author so allow to delete
165
+ } elseif ( (int) $user_id == (int) $_post->post_author ) {
166
+ $caps[] = $post_type->cap->delete_posts;
167
+
168
+ // Unknown so map to delete_others_posts
169
+ } else {
170
+ $caps[] = $post_type->cap->delete_others_posts;
171
+ }
172
+ }
173
+
174
+ break;
175
+
176
+ /** Admin *************************************************************/
177
+
178
+ case 'bbp_forums_admin' :
179
+ $caps = array( 'manage_options' );
180
+ break;
181
+ }
182
+
183
+ return apply_filters( 'bbp_map_forum_meta_caps', $caps, $cap, $user_id, $args );
184
+ }
bbp-includes/bbp-forum-functions.php → includes/forums/functions.php RENAMED
@@ -690,7 +690,6 @@ function bbp_walk_forum( $forums, $depth, $current, $r ) {
690
  * @since bbPress (r2746)
691
  *
692
  * @param int $forum_id forum id
693
- * @uses wp_get_single_post() To get the forum
694
  * @uses do_action() Calls 'bbp_close_forum' with the forum id
695
  * @uses update_post_meta() To add the previous status to a meta
696
  * @uses do_action() Calls 'bbp_opened_forum' with the forum id
@@ -715,7 +714,6 @@ function bbp_close_forum( $forum_id = 0 ) {
715
  * @since bbPress (r2746)
716
  *
717
  * @param int $forum_id forum id
718
- * @uses wp_get_single_post() To get the forum
719
  * @uses do_action() Calls 'bbp_open_forum' with the forum id
720
  * @uses get_post_meta() To get the previous status
721
  * @uses update_post_meta() To delete the previous status meta
@@ -956,8 +954,8 @@ function bbp_bump_forum_topic_count( $forum_id = 0, $difference = 1, $update_anc
956
 
957
  // Get some counts
958
  $forum_id = bbp_get_forum_id( $forum_id );
959
- $topic_count = bbp_get_forum_topic_count( $forum_id, false );
960
- $total_topic_count = bbp_get_forum_topic_count( $forum_id, true );
961
 
962
  // Update this forum id
963
  update_post_meta( $forum_id, '_bbp_topic_count', (int) $topic_count + (int) $difference );
@@ -975,8 +973,8 @@ function bbp_bump_forum_topic_count( $forum_id = 0, $difference = 1, $update_anc
975
  foreach ( (array) $ancestors as $parent_forum_id ) {
976
 
977
  // Get forum counts
978
- $parent_topic_count = bbp_get_forum_topic_count( $parent_forum_id, false );
979
- $parent_total_topic_count = bbp_get_forum_topic_count( $parent_forum_id, true );
980
 
981
  // Update counts
982
  update_post_meta( $parent_forum_id, '_bbp_topic_count', (int) $parent_topic_count + (int) $difference );
690
  * @since bbPress (r2746)
691
  *
692
  * @param int $forum_id forum id
 
693
  * @uses do_action() Calls 'bbp_close_forum' with the forum id
694
  * @uses update_post_meta() To add the previous status to a meta
695
  * @uses do_action() Calls 'bbp_opened_forum' with the forum id
714
  * @since bbPress (r2746)
715
  *
716
  * @param int $forum_id forum id
 
717
  * @uses do_action() Calls 'bbp_open_forum' with the forum id
718
  * @uses get_post_meta() To get the previous status
719
  * @uses update_post_meta() To delete the previous status meta
954
 
955
  // Get some counts
956
  $forum_id = bbp_get_forum_id( $forum_id );
957
+ $topic_count = bbp_get_forum_topic_count( $forum_id, false, false );
958
+ $total_topic_count = bbp_get_forum_topic_count( $forum_id, true, false );
959
 
960
  // Update this forum id
961
  update_post_meta( $forum_id, '_bbp_topic_count', (int) $topic_count + (int) $difference );
973
  foreach ( (array) $ancestors as $parent_forum_id ) {
974
 
975
  // Get forum counts
976
+ $parent_topic_count = bbp_get_forum_topic_count( $parent_forum_id, false, false );
977
+ $parent_total_topic_count = bbp_get_forum_topic_count( $parent_forum_id, true, false );
978
 
979
  // Update counts
980
  update_post_meta( $parent_forum_id, '_bbp_topic_count', (int) $parent_topic_count + (int) $difference );
includes/forums/index.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Do not modify the files in this folder.
5
+ */
bbp-includes/bbp-forum-template.php → includes/forums/template-tags.php RENAMED
@@ -61,21 +61,13 @@ function bbp_has_forums( $args = '' ) {
61
  // Setup possible post__not_in array
62
  $post_stati[] = bbp_get_public_status_id();
63
 
64
- // Super admin get whitelisted post statuses
65
- if ( is_super_admin() ) {
66
- $post_stati = array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id() );
67
-
68
- // Not a super admin, so check caps
69
- } else {
70
 
71
- // Check if user can read private forums
72
- if ( current_user_can( 'read_private_forums' ) )
73
- $post_stati[] = bbp_get_private_status_id();
74
-
75
- // Check if user can read hidden forums
76
- if ( current_user_can( 'read_hidden_forums' ) )
77
- $post_stati[] = bbp_get_hidden_status_id();
78
- }
79
 
80
  // The default forum query for most circumstances
81
  $defaults = array (
@@ -701,7 +693,7 @@ function bbp_list_forums( $args = '' ) {
701
  extract( $r, EXTR_SKIP );
702
 
703
  // Bail if there are no subforums
704
- if ( !bbp_get_forum_subforum_count( $forum_id ) )
705
  return;
706
 
707
  // Loop through forums and create a list
@@ -1124,11 +1116,9 @@ function bbp_forum_topics_link( $forum_id = 0 ) {
1124
  * topics link and forum id
1125
  */
1126
  function bbp_get_forum_topics_link( $forum_id = 0 ) {
1127
-
1128
  $forum = bbp_get_forum( $forum_id );
1129
  $forum_id = $forum->ID;
1130
- $topics = bbp_get_forum_topic_count( $forum_id );
1131
- $topics = sprintf( _n( '%s topic', '%s topics', $topics, 'bbpress' ), $topics );
1132
  $retval = '';
1133
 
1134
  // First link never has view=all
@@ -1164,11 +1154,12 @@ function bbp_forum_topics_link( $forum_id = 0 ) {
1164
  *
1165
  * @since bbPress (r2464)
1166
  *
1167
- * @uses bbp_get_forum_subforum_count() To get the forum's subforum count
1168
  * @param int $forum_id Optional. Forum id to check
 
 
1169
  */
1170
- function bbp_forum_subforum_count( $forum_id = 0 ) {
1171
- echo bbp_get_forum_subforum_count( $forum_id );
1172
  }
1173
  /**
1174
  * Return total subforum count of a forum
@@ -1176,17 +1167,19 @@ function bbp_forum_subforum_count( $forum_id = 0 ) {
1176
  * @since bbPress (r2464)
1177
  *
1178
  * @param int $forum_id Optional. Forum id
 
1179
  * @uses bbp_get_forum_id() To get the forum id
1180
  * @uses get_post_meta() To get the subforum count
1181
  * @uses apply_filters() Calls 'bbp_get_forum_subforum_count' with the
1182
  * subforum count and forum id
1183
  * @return int Forum's subforum count
1184
  */
1185
- function bbp_get_forum_subforum_count( $forum_id = 0 ) {
1186
  $forum_id = bbp_get_forum_id( $forum_id );
1187
- $forum_count = get_post_meta( $forum_id, '_bbp_forum_subforum_count', true );
 
1188
 
1189
- return apply_filters( 'bbp_get_forum_subforum_count', (int) $forum_count, $forum_id );
1190
  }
1191
 
1192
  /**
@@ -1196,10 +1189,11 @@ function bbp_forum_subforum_count( $forum_id = 0 ) {
1196
  *
1197
  * @param int $forum_id Optional. Forum id
1198
  * @param bool $total_count Optional. To get the total count or normal count?
 
1199
  * @uses bbp_get_forum_topic_count() To get the forum topic count
1200
  */
1201
- function bbp_forum_topic_count( $forum_id = 0, $total_count = true ) {
1202
- echo bbp_get_forum_topic_count( $forum_id, $total_count );
1203
  }
1204
  /**
1205
  * Return total topic count of a forum
@@ -1209,17 +1203,20 @@ function bbp_forum_topic_count( $forum_id = 0, $total_count = true ) {
1209
  * @param int $forum_id Optional. Forum id
1210
  * @param bool $total_count Optional. To get the total count or normal
1211
  * count? Defaults to total.
 
1212
  * @uses bbp_get_forum_id() To get the forum id
1213
  * @uses get_post_meta() To get the forum topic count
1214
  * @uses apply_filters() Calls 'bbp_get_forum_topic_count' with the
1215
  * topic count and forum id
1216
  * @return int Forum topic count
1217
  */
1218
- function bbp_get_forum_topic_count( $forum_id = 0, $total_count = true ) {
1219
  $forum_id = bbp_get_forum_id( $forum_id );
1220
- $topics = get_post_meta( $forum_id, empty( $total_count ) ? '_bbp_topic_count' : '_bbp_total_topic_count', true );
 
 
1221
 
1222
- return apply_filters( 'bbp_get_forum_topic_count', (int) $topics, $forum_id );
1223
  }
1224
 
1225
  /**
@@ -1229,10 +1226,11 @@ function bbp_forum_topic_count( $forum_id = 0, $total_count = true ) {
1229
  *
1230
  * @param int $forum_id Optional. Forum id
1231
  * @param bool $total_count Optional. To get the total count or normal count?
 
1232
  * @uses bbp_get_forum_reply_count() To get the forum reply count
1233
  */
1234
- function bbp_forum_reply_count( $forum_id = 0, $total_count = true ) {
1235
- echo bbp_get_forum_reply_count( $forum_id, $total_count );
1236
  }
1237
  /**
1238
  * Return total post count of a forum
@@ -1242,17 +1240,20 @@ function bbp_forum_reply_count( $forum_id = 0, $total_count = true ) {
1242
  * @param int $forum_id Optional. Forum id
1243
  * @param bool $total_count Optional. To get the total count or normal
1244
  * count?
 
1245
  * @uses bbp_get_forum_id() To get the forum id
1246
  * @uses get_post_meta() To get the forum reply count
1247
  * @uses apply_filters() Calls 'bbp_get_forum_reply_count' with the
1248
  * reply count and forum id
1249
  * @return int Forum reply count
1250
  */
1251
- function bbp_get_forum_reply_count( $forum_id = 0, $total_count = true ) {
1252
  $forum_id = bbp_get_forum_id( $forum_id );
1253
- $replies = get_post_meta( $forum_id, empty( $total_count ) ? '_bbp_reply_count' : '_bbp_total_reply_count', true );
 
 
1254
 
1255
- return apply_filters( 'bbp_get_forum_reply_count', (int) $replies, $forum_id );
1256
  }
1257
 
1258
  /**
@@ -1262,10 +1263,11 @@ function bbp_forum_reply_count( $forum_id = 0, $total_count = true ) {
1262
  *
1263
  * @param int $forum_id Optional. Forum id
1264
  * @param bool $total_count Optional. To get the total count or normal count?
 
1265
  * @uses bbp_get_forum_post_count() To get the forum post count
1266
  */
1267
- function bbp_forum_post_count( $forum_id = 0, $total_count = true ) {
1268
- echo bbp_get_forum_post_count( $forum_id, $total_count );
1269
  }
1270
  /**
1271
  * Return total post count of a forum
@@ -1275,18 +1277,22 @@ function bbp_forum_post_count( $forum_id = 0, $total_count = true ) {
1275
  * @param int $forum_id Optional. Forum id
1276
  * @param bool $total_count Optional. To get the total count or normal
1277
  * count?
 
1278
  * @uses bbp_get_forum_id() To get the forum id
1279
  * @uses get_post_meta() To get the forum post count
1280
  * @uses apply_filters() Calls 'bbp_get_forum_post_count' with the
1281
  * post count and forum id
1282
  * @return int Forum post count
1283
  */
1284
- function bbp_get_forum_post_count( $forum_id = 0, $total_count = true ) {
1285
  $forum_id = bbp_get_forum_id( $forum_id );
1286
- $topics = bbp_get_forum_topic_count( $forum_id, $total_count );
1287
- $replies = get_post_meta( $forum_id, empty( $total_count ) ? '_bbp_reply_count' : '_bbp_total_reply_count', true );
 
 
 
1288
 
1289
- return apply_filters( 'bbp_get_forum_post_count', (int) $replies + (int) $topics, $forum_id );
1290
  }
1291
 
1292
  /**
@@ -1296,10 +1302,11 @@ function bbp_forum_post_count( $forum_id = 0, $total_count = true ) {
1296
  * @since bbPress (r2883)
1297
  *
1298
  * @param int $forum_id Optional. Topic id
 
1299
  * @uses bbp_get_forum_topic_count_hidden() To get the forum hidden topic count
1300
  */
1301
- function bbp_forum_topic_count_hidden( $forum_id = 0 ) {
1302
- echo bbp_get_forum_topic_count_hidden( $forum_id );
1303
  }
1304
  /**
1305
  * Return total hidden topic count of a forum (hidden includes trashed
@@ -1308,17 +1315,19 @@ function bbp_forum_topic_count_hidden( $forum_id = 0 ) {
1308
  * @since bbPress (r2883)
1309
  *
1310
  * @param int $forum_id Optional. Topic id
 
1311
  * @uses bbp_get_forum_id() To get the forum id
1312
  * @uses get_post_meta() To get the hidden topic count
1313
  * @uses apply_filters() Calls 'bbp_get_forum_topic_count_hidden' with
1314
  * the hidden topic count and forum id
1315
  * @return int Topic hidden topic count
1316
  */
1317
- function bbp_get_forum_topic_count_hidden( $forum_id = 0 ) {
1318
  $forum_id = bbp_get_forum_id( $forum_id );
1319
- $topics = get_post_meta( $forum_id, '_bbp_topic_count_hidden', true );
 
1320
 
1321
- return (int) apply_filters( 'bbp_get_forum_topic_count_hidden', (int) $topics, $forum_id );
1322
  }
1323
 
1324
  /**
@@ -1829,13 +1838,15 @@ function bbp_single_forum_description( $args = '' ) {
1829
  remove_filter( 'bbp_get_forum_permalink', 'bbp_add_view_all' );
1830
 
1831
  // Get some forum data
 
 
1832
  $topic_count = bbp_get_forum_topic_count( $forum_id );
1833
  $reply_count = bbp_get_forum_reply_count( $forum_id );
1834
  $last_active = bbp_get_forum_last_active_id( $forum_id );
1835
 
1836
  // Has replies
1837
  if ( !empty( $reply_count ) ) {
1838
- $reply_text = sprintf( _n( '%s reply', '%s replies', $reply_count, 'bbpress' ), $reply_count );
1839
  }
1840
 
1841
  // Forum has active data
@@ -1846,7 +1857,7 @@ function bbp_single_forum_description( $args = '' ) {
1846
 
1847
  // Forum has no last active data
1848
  } else {
1849
- $topic_text = sprintf( _n( '%s topic', '%s topics', $topic_count, 'bbpress' ), $topic_count );
1850
  }
1851
 
1852
  // Forum has active data
61
  // Setup possible post__not_in array
62
  $post_stati[] = bbp_get_public_status_id();
63
 
64
+ // Check if user can read private forums
65
+ if ( current_user_can( 'read_private_forums' ) )
66
+ $post_stati[] = bbp_get_private_status_id();
 
 
 
67
 
68
+ // Check if user can read hidden forums
69
+ if ( current_user_can( 'read_hidden_forums' ) )
70
+ $post_stati[] = bbp_get_hidden_status_id();
 
 
 
 
 
71
 
72
  // The default forum query for most circumstances
73
  $defaults = array (
693
  extract( $r, EXTR_SKIP );
694
 
695
  // Bail if there are no subforums
696
+ if ( !bbp_get_forum_subforum_count( $forum_id, false ) )
697
  return;
698
 
699
  // Loop through forums and create a list
1116
  * topics link and forum id
1117
  */
1118
  function bbp_get_forum_topics_link( $forum_id = 0 ) {
 
1119
  $forum = bbp_get_forum( $forum_id );
1120
  $forum_id = $forum->ID;
1121
+ $topics = sprintf( _n( '%s topic', '%s topics', bbp_get_forum_topic_count( $forum_id, true, false ), 'bbpress' ), bbp_get_forum_topic_count( $forum_id ) );
 
1122
  $retval = '';
1123
 
1124
  // First link never has view=all
1154
  *
1155
  * @since bbPress (r2464)
1156
  *
 
1157
  * @param int $forum_id Optional. Forum id to check
1158
+ * @param boolean $integer Optional. Whether or not to format the result
1159
+ * @uses bbp_get_forum_subforum_count() To get the forum's subforum count
1160
  */
1161
+ function bbp_forum_subforum_count( $forum_id = 0, $integer = false ) {
1162
+ echo bbp_get_forum_subforum_count( $forum_id, $integer );
1163
  }
1164
  /**
1165
  * Return total subforum count of a forum
1167
  * @since bbPress (r2464)
1168
  *
1169
  * @param int $forum_id Optional. Forum id
1170
+ * @param boolean $integer Optional. Whether or not to format the result
1171
  * @uses bbp_get_forum_id() To get the forum id
1172
  * @uses get_post_meta() To get the subforum count
1173
  * @uses apply_filters() Calls 'bbp_get_forum_subforum_count' with the
1174
  * subforum count and forum id
1175
  * @return int Forum's subforum count
1176
  */
1177
+ function bbp_get_forum_subforum_count( $forum_id = 0, $integer = false ) {
1178
  $forum_id = bbp_get_forum_id( $forum_id );
1179
+ $forum_count = (int) get_post_meta( $forum_id, '_bbp_forum_subforum_count', true );
1180
+ $filter = ( true === $integer ) ? 'bbp_get_forum_subforum_count_int' : 'bbp_get_forum_subforum_count';
1181
 
1182
+ return apply_filters( $filter, $forum_count, $forum_id );
1183
  }
1184
 
1185
  /**
1189
  *
1190
  * @param int $forum_id Optional. Forum id
1191
  * @param bool $total_count Optional. To get the total count or normal count?
1192
+ * @param boolean $integer Optional. Whether or not to format the result
1193
  * @uses bbp_get_forum_topic_count() To get the forum topic count
1194
  */
1195
+ function bbp_forum_topic_count( $forum_id = 0, $total_count = true, $integer = false ) {
1196
+ echo bbp_get_forum_topic_count( $forum_id, $total_count, $integer );
1197
  }
1198
  /**
1199
  * Return total topic count of a forum
1203
  * @param int $forum_id Optional. Forum id
1204
  * @param bool $total_count Optional. To get the total count or normal
1205
  * count? Defaults to total.
1206
+ * @param boolean $integer Optional. Whether or not to format the result
1207
  * @uses bbp_get_forum_id() To get the forum id
1208
  * @uses get_post_meta() To get the forum topic count
1209
  * @uses apply_filters() Calls 'bbp_get_forum_topic_count' with the
1210
  * topic count and forum id
1211
  * @return int Forum topic count
1212
  */
1213
+ function bbp_get_forum_topic_count( $forum_id = 0, $total_count = true, $integer = false ) {
1214
  $forum_id = bbp_get_forum_id( $forum_id );
1215
+ $meta_key = empty( $total_count ) ? '_bbp_topic_count' : '_bbp_total_topic_count';
1216
+ $topics = (int) get_post_meta( $forum_id, $meta_key, true );
1217
+ $filter = ( true === $integer ) ? 'bbp_get_forum_topic_count_int' : 'bbp_get_forum_topic_count';
1218
 
1219
+ return apply_filters( $filter, $topics, $forum_id );
1220
  }
1221
 
1222
  /**
1226
  *
1227
  * @param int $forum_id Optional. Forum id
1228
  * @param bool $total_count Optional. To get the total count or normal count?
1229
+ * @param boolean $integer Optional. Whether or not to format the result
1230
  * @uses bbp_get_forum_reply_count() To get the forum reply count
1231
  */
1232
+ function bbp_forum_reply_count( $forum_id = 0, $total_count = true, $integer = false ) {
1233
+ echo bbp_get_forum_reply_count( $forum_id, $total_count, $integer );
1234
  }
1235
  /**
1236
  * Return total post count of a forum
1240
  * @param int $forum_id Optional. Forum id
1241
  * @param bool $total_count Optional. To get the total count or normal
1242
  * count?
1243
+ * @param boolean $integer Optional. Whether or not to format the result
1244
  * @uses bbp_get_forum_id() To get the forum id
1245
  * @uses get_post_meta() To get the forum reply count
1246
  * @uses apply_filters() Calls 'bbp_get_forum_reply_count' with the
1247
  * reply count and forum id
1248
  * @return int Forum reply count
1249
  */
1250
+ function bbp_get_forum_reply_count( $forum_id = 0, $total_count = true, $integer = false ) {
1251
  $forum_id = bbp_get_forum_id( $forum_id );
1252
+ $meta_key = empty( $total_count ) ? '_bbp_reply_count' : '_bbp_total_reply_count';
1253
+ $replies = (int) get_post_meta( $forum_id, $meta_key, true );
1254
+ $filter = ( true === $integer ) ? 'bbp_get_forum_reply_count_int' : 'bbp_get_forum_reply_count';
1255
 
1256
+ return apply_filters( $filter, $replies, $forum_id );
1257
  }
1258
 
1259
  /**
1263
  *
1264
  * @param int $forum_id Optional. Forum id
1265
  * @param bool $total_count Optional. To get the total count or normal count?
1266
+ * @param boolean $integer Optional. Whether or not to format the result
1267
  * @uses bbp_get_forum_post_count() To get the forum post count
1268
  */
1269
+ function bbp_forum_post_count( $forum_id = 0, $total_count = true, $integer = false ) {
1270
+ echo bbp_get_forum_post_count( $forum_id, $total_count, $integer );
1271
  }
1272
  /**
1273
  * Return total post count of a forum
1277
  * @param int $forum_id Optional. Forum id
1278
  * @param bool $total_count Optional. To get the total count or normal
1279
  * count?
1280
+ * @param boolean $integer Optional. Whether or not to format the result
1281
  * @uses bbp_get_forum_id() To get the forum id
1282
  * @uses get_post_meta() To get the forum post count
1283
  * @uses apply_filters() Calls 'bbp_get_forum_post_count' with the
1284
  * post count and forum id
1285
  * @return int Forum post count
1286
  */
1287
+ function bbp_get_forum_post_count( $forum_id = 0, $total_count = true, $integer = false ) {
1288
  $forum_id = bbp_get_forum_id( $forum_id );
1289
+ $topics = bbp_get_forum_topic_count( $forum_id, $total_count, true );
1290
+ $meta_key = empty( $total_count ) ? '_bbp_reply_count' : '_bbp_total_reply_count';
1291
+ $replies = (int) get_post_meta( $forum_id, $meta_key, true );
1292
+ $retval = $replies + $topics;
1293
+ $filter = ( true === $integer ) ? 'bbp_get_forum_post_count_int' : 'bbp_get_forum_post_count';
1294
 
1295
+ return apply_filters( $filter, $retval, $forum_id );
1296
  }
1297
 
1298
  /**
1302
  * @since bbPress (r2883)
1303
  *
1304
  * @param int $forum_id Optional. Topic id
1305
+ * @param boolean $integer Optional. Whether or not to format the result
1306
  * @uses bbp_get_forum_topic_count_hidden() To get the forum hidden topic count
1307
  */
1308
+ function bbp_forum_topic_count_hidden( $forum_id = 0, $integer = false ) {
1309
+ echo bbp_get_forum_topic_count_hidden( $forum_id, $integer );
1310
  }
1311
  /**
1312
  * Return total hidden topic count of a forum (hidden includes trashed
1315
  * @since bbPress (r2883)
1316
  *
1317
  * @param int $forum_id Optional. Topic id
1318
+ * @param boolean $integer Optional. Whether or not to format the result
1319
  * @uses bbp_get_forum_id() To get the forum id
1320
  * @uses get_post_meta() To get the hidden topic count
1321
  * @uses apply_filters() Calls 'bbp_get_forum_topic_count_hidden' with
1322
  * the hidden topic count and forum id
1323
  * @return int Topic hidden topic count
1324
  */
1325
+ function bbp_get_forum_topic_count_hidden( $forum_id = 0, $integer = false ) {
1326
  $forum_id = bbp_get_forum_id( $forum_id );
1327
+ $topics = (int) get_post_meta( $forum_id, '_bbp_topic_count_hidden', true );
1328
+ $filter = ( true === $integer ) ? 'bbp_get_forum_topic_count_hidden_int' : 'bbp_get_forum_topic_count_hidden';
1329
 
1330
+ return apply_filters( $filter, $topics, $forum_id );
1331
  }
1332
 
1333
  /**
1838
  remove_filter( 'bbp_get_forum_permalink', 'bbp_add_view_all' );
1839
 
1840
  // Get some forum data
1841
+ $tc_int = bbp_get_forum_topic_count( $forum_id, false );
1842
+ $rc_int = bbp_get_forum_reply_count( $forum_id, false );
1843
  $topic_count = bbp_get_forum_topic_count( $forum_id );
1844
  $reply_count = bbp_get_forum_reply_count( $forum_id );
1845
  $last_active = bbp_get_forum_last_active_id( $forum_id );
1846
 
1847
  // Has replies
1848
  if ( !empty( $reply_count ) ) {
1849
+ $reply_text = sprintf( _n( '%s reply', '%s replies', $rc_int, 'bbpress' ), $reply_count );
1850
  }
1851
 
1852
  // Forum has active data
1857
 
1858
  // Forum has no last active data
1859
  } else {
1860
+ $topic_text = sprintf( _n( '%s topic', '%s topics', $tc_int, 'bbpress' ), $topic_count );
1861
  }
1862
 
1863
  // Forum has active data
includes/index.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Do not modify the files in this folder.
5
+ */
includes/replies/capabilities.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress Reply Capabilites
5
+ *
6
+ * Used to map reply capabilities to WordPress's existing capabilities.
7
+ *
8
+ * @package bbPress
9
+ * @subpackage Capabilities
10
+ */
11
+
12
+ /**
13
+ * Return reply capabilities
14
+ *
15
+ * @since bbPress (r2593)
16
+ *
17
+ * @uses apply_filters() Calls 'bbp_get_reply_caps' with the capabilities
18
+ * @return array Reply capabilities
19
+ */
20
+ function bbp_get_reply_caps() {
21
+ return apply_filters( 'bbp_get_reply_caps', array (
22
+ 'edit_posts' => 'edit_replies',
23
+ 'edit_others_posts' => 'edit_others_replies',
24
+ 'publish_posts' => 'publish_replies',
25
+ 'read_private_posts' => 'read_private_replies',
26
+ 'delete_posts' => 'delete_replies',
27
+ 'delete_others_posts' => 'delete_others_replies'
28
+ ) );
29
+ }
30
+
31
+ /**
32
+ * Maps topic capabilities
33
+ *
34
+ * @since bbPress (r4242)
35
+ *
36
+ * @param array $caps Capabilities for meta capability
37
+ * @param string $cap Capability name
38
+ * @param int $user_id User id
39
+ * @param mixed $args Arguments
40
+ * @uses get_post() To get the post
41
+ * @uses get_post_type_object() To get the post type object
42
+ * @uses apply_filters() Filter mapped results
43
+ * @return array Actual capabilities for meta capability
44
+ */
45
+ function bbp_map_reply_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
46
+
47
+ // What capability is being checked?
48
+ switch ( $cap ) {
49
+
50
+ /** Reading ***********************************************************/
51
+
52
+ case 'read_reply' :
53
+
54
+ // User cannot spectate
55
+ if ( ! user_can( $user_id, 'spectate' ) ) {
56
+ $caps = array( 'do_not_allow' );
57
+
58
+ // Do some post ID based logic
59
+ } else {
60
+
61
+ // Get the post
62
+ $_post = get_post( $args[0] );
63
+ if ( !empty( $_post ) ) {
64
+
65
+ // Get caps for post type object
66
+ $post_type = get_post_type_object( $_post->post_type );
67
+
68
+ // Post is public
69
+ if ( bbp_get_public_status_id() == $_post->post_status ) {
70
+ $caps = array( 'spectate' );
71
+
72
+ // User is author so allow read
73
+ } elseif ( (int) $user_id == (int) $_post->post_author ) {
74
+ $caps = array( 'spectate' );
75
+
76
+ // Unknown so map to private posts
77
+ } else {
78
+ $caps = array( $post_type->cap->read_private_forums );
79
+ }
80
+ }
81
+ }
82
+
83
+ break;
84
+
85
+ /** Publishing ********************************************************/
86
+
87
+ case 'publish_replies' :
88
+
89
+ // Moderators can always publish
90
+ if ( user_can( $user_id, 'moderate' ) ) {
91
+ $caps = array( 'moderate' );
92
+ }
93
+
94
+ break;
95
+
96
+ /** Editing ***********************************************************/
97
+
98
+ // Used primarily in wp-admin
99
+ case 'edit_replies' :
100
+ case 'edit_others_replies' :
101
+
102
+ // Moderators can always edit
103
+ if ( user_can( $user_id, 'moderate' ) ) {
104
+ $caps = array( 'moderate' );
105
+ }
106
+
107
+ break;
108
+
109
+ // Used everywhere
110
+ case 'edit_reply' :
111
+
112
+ // Get the post
113
+ $_post = get_post( $args[0] );
114
+ if ( !empty( $_post ) ) {
115
+
116
+ // Get caps for post type object
117
+ $post_type = get_post_type_object( $_post->post_type );
118
+ $caps = array();
119
+
120
+ // Add 'do_not_allow' cap if user is spam or deleted
121
+ if ( bbp_is_user_inactive( $user_id ) ) {
122
+ $caps[] = 'do_not_allow';
123
+
124
+ // User is author so allow edit
125
+ } elseif ( (int) $user_id == (int) $_post->post_author ) {
126
+ $caps[] = $post_type->cap->edit_posts;
127
+
128
+ // Unknown, so map to edit_others_posts
129
+ } else {
130
+ $caps[] = $post_type->cap->edit_others_posts;
131
+ }
132
+ }
133
+
134
+ break;
135
+
136
+ /** Deleting **********************************************************/
137
+
138
+ case 'delete_reply' :
139
+
140
+ // Get the post
141
+ $_post = get_post( $args[0] );
142
+ if ( !empty( $_post ) ) {
143
+
144
+ // Get caps for post type object
145
+ $post_type = get_post_type_object( $_post->post_type );
146
+ $caps = array();
147
+
148
+ // Add 'do_not_allow' cap if user is spam or deleted
149
+ if ( bbp_is_user_inactive( $user_id ) ) {
150
+ $caps[] = 'do_not_allow';
151
+
152
+ // Moderators can always edit forum content
153
+ } elseif ( user_can( $user_id, 'moderate' ) ) {
154
+ $caps[] = 'moderate';
155
+
156
+ // Unknown so map to delete_others_posts
157
+ } else {
158
+ $caps[] = $post_type->cap->delete_others_posts;
159
+ }
160
+ }
161
+
162
+ break;
163
+
164
+ // Moderation override
165
+ case 'delete_replies' :
166
+ case 'delete_others_replies' :
167
+
168
+ // Moderators can always delete
169
+ if ( user_can( $user_id, 'moderate' ) ) {
170
+ $caps = array( 'moderate' );
171
+ }
172
+
173
+ break;
174
+
175
+ /** Admin *************************************************************/
176
+
177
+ case 'bbp_replies_admin' :
178
+ $caps = array( 'moderate' );
179
+ break;
180
+ }
181
+
182
+ return apply_filters( 'bbp_map_reply_meta_caps', $caps, $cap, $user_id, $args );
183
+ }
bbp-includes/bbp-reply-functions.php → includes/replies/functions.php RENAMED
@@ -215,17 +215,32 @@ function bbp_new_reply_handler() {
215
  if ( !bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) )
216
  bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
217
 
218
- /** Reply Moderation ******************************************************/
219
 
220
- $post_status = bbp_get_public_status_id();
221
- if ( !bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) )
222
- $post_status = bbp_get_pending_status_id();
 
 
 
 
 
223
 
224
  /** Topic Tags ************************************************************/
225
 
226
- if ( !empty( $_POST['bbp_topic_tags'] ) )
 
227
  $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
228
 
 
 
 
 
 
 
 
 
 
229
  /** Additional Actions (Before Save) **************************************/
230
 
231
  do_action( 'bbp_new_reply_pre_extras', $topic_id, $forum_id );
@@ -242,11 +257,11 @@ function bbp_new_reply_handler() {
242
  'post_author' => $reply_author,
243
  'post_title' => $reply_title,
244
  'post_content' => $reply_content,
 
245
  'post_parent' => $topic_id,
246
- 'post_status' => $post_status,
247
  'post_type' => bbp_get_reply_post_type(),
248
  'comment_status' => 'closed',
249
- 'menu_order' => (int) ( bbp_get_topic_reply_count( $topic_id ) + 1 )
250
  ) );
251
 
252
  // Insert reply
@@ -349,7 +364,7 @@ function bbp_new_reply_handler() {
349
  * @uses wp_set_post_terms() To set the topic tags
350
  * @uses bbp_has_errors() To get the {@link WP_Error} errors
351
  * @uses wp_save_post_revision() To save a reply revision
352
- * @uses bbp_update_topic_revision_log() To update the reply revision log
353
  * @uses wp_update_post() To update the reply
354
  * @uses bbp_get_reply_topic_id() To get the reply topic id
355
  * @uses bbp_get_topic_forum_id() To get the topic forum id
@@ -371,7 +386,8 @@ function bbp_edit_reply_handler() {
371
  return;
372
 
373
  // Define local variable(s)
374
- $reply = $reply_id = $topic_id = $forum_id = $anonymous_data = 0;
 
375
  $reply_title = $reply_content = $reply_edit_reason = $terms = '';
376
 
377
  /** Reply *****************************************************************/
@@ -402,7 +418,7 @@ function bbp_edit_reply_handler() {
402
  } else {
403
 
404
  // Check users ability to create new reply
405
- if ( !bbp_is_reply_anonymous( $reply_id ) ) {
406
 
407
  // User cannot edit this reply
408
  if ( !current_user_can( 'edit_reply', $reply_id ) ) {
@@ -410,6 +426,9 @@ function bbp_edit_reply_handler() {
410
  return;
411
  }
412
 
 
 
 
413
  // It is an anonymous post
414
  } else {
415
 
@@ -474,20 +493,39 @@ function bbp_edit_reply_handler() {
474
 
475
  /** Reply Blacklist *******************************************************/
476
 
477
- if ( !bbp_check_for_blacklist( $anonymous_data, bbp_get_reply_author_id( $reply_id ), $reply_title, $reply_content ) )
478
  bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
479
 
480
- /** Reply Moderation ******************************************************/
481
 
482
- $post_status = bbp_get_public_status_id();
483
- if ( !bbp_check_for_moderation( $anonymous_data, bbp_get_reply_author_id( $reply_id ), $reply_title, $reply_content ) )
484
- $post_status = bbp_get_pending_status_id();
 
 
 
 
 
 
 
 
 
485
 
486
  /** Topic Tags ************************************************************/
487
 
488
- if ( !empty( $_POST['bbp_topic_tags'] ) )
 
489
  $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
490
 
 
 
 
 
 
 
 
 
 
491
  /** Additional Actions (Before Save) **************************************/
492
 
493
  do_action( 'bbp_edit_reply_pre_extras', $reply_id );
@@ -504,15 +542,27 @@ function bbp_edit_reply_handler() {
504
  'ID' => $reply_id,
505
  'post_title' => $reply_title,
506
  'post_content' => $reply_content,
507
- 'post_status' => $post_status,
508
- 'post_parent' => $reply->post_parent,
509
- 'post_author' => $reply->post_author,
510
  'post_type' => bbp_get_reply_post_type()
511
  ) );
512
 
513
- // Insert reply
 
 
 
 
 
 
514
  $reply_id = wp_update_post( $reply_data );
515
 
 
 
 
 
 
 
516
  /** Topic Tags ************************************************************/
517
 
518
  // Just in time manipulation of reply terms before being edited
@@ -534,7 +584,7 @@ function bbp_edit_reply_handler() {
534
 
535
  // Update revision log
536
  if ( !empty( $_POST['bbp_log_reply_edit'] ) && ( 1 == $_POST['bbp_log_reply_edit'] ) ) {
537
- $revision_id = wp_save_post_revision( $reply_id );
538
  if ( !empty( $revision_id ) ) {
539
  bbp_update_reply_revision_log( array(
540
  'reply_id' => $reply_id,
@@ -550,7 +600,7 @@ function bbp_edit_reply_handler() {
550
  if ( !empty( $reply_id ) && !is_wp_error( $reply_id ) ) {
551
 
552
  // Update counts, etc...
553
- do_action( 'bbp_edit_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply->post_author , true /* Is edit */ );
554
 
555
  /** Additional Actions (After Save) ***********************************/
556
 
@@ -753,65 +803,67 @@ function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id =
753
  $active_id = empty( $reply_id ) ? $topic_id : $reply_id;
754
 
755
  // Setup ancestors array to walk up
756
- $ancestors = array_values( array_unique( array_merge( array( $topic_id, $forum_id ), get_post_ancestors( $topic_id ) ) ) );
757
 
758
  // If we want a full refresh, unset any of the possibly passed variables
759
  if ( true == $refresh )
760
  $forum_id = $topic_id = $reply_id = $active_id = $last_active_time = 0;
761
 
762
  // Walk up ancestors
763
- foreach ( $ancestors as $ancestor ) {
 
764
 
765
- // Reply meta relating to most recent reply
766
- if ( bbp_is_reply( $ancestor ) ) {
767
- // @todo - hierarchical replies
768
 
769
- // Topic meta relating to most recent reply
770
- } elseif ( bbp_is_topic( $ancestor ) ) {
771
 
772
- // Last reply and active ID's
773
- bbp_update_topic_last_reply_id ( $ancestor, $reply_id );
774
- bbp_update_topic_last_active_id( $ancestor, $active_id );
775
 
776
- // Get the last active time if none was passed
777
- $topic_last_active_time = $last_active_time;
778
- if ( empty( $last_active_time ) ) {
779
- $topic_last_active_time = get_post_field( 'post_date', bbp_get_topic_last_active_id( $ancestor ) );
780
- }
781
 
782
- // Only update if reply is published
783
- if ( bbp_is_reply_published( $reply_id ) ) {
784
- bbp_update_topic_last_active_time( $ancestor, $topic_last_active_time );
785
- }
786
 
787
- // Counts
788
- bbp_update_topic_voice_count ( $ancestor );
789
- bbp_update_topic_reply_count ( $ancestor );
790
- bbp_update_topic_reply_count_hidden( $ancestor );
791
 
792
- // Forum meta relating to most recent topic
793
- } elseif ( bbp_is_forum( $ancestor ) ) {
794
 
795
- // Last topic and reply ID's
796
- bbp_update_forum_last_topic_id( $ancestor, $topic_id );
797
- bbp_update_forum_last_reply_id( $ancestor, $reply_id );
798
 
799
- // Last Active
800
- bbp_update_forum_last_active_id( $ancestor, $active_id );
801
 
802
- // Get the last active time if none was passed
803
- $forum_last_active_time = $last_active_time;
804
- if ( empty( $last_active_time ) ) {
805
- $forum_last_active_time = get_post_field( 'post_date', bbp_get_forum_last_active_id( $ancestor ) );
806
- }
807
 
808
- // Only update if reply is published
809
- if ( bbp_is_reply_published( $reply_id ) ) {
810
- bbp_update_forum_last_active_time( $ancestor, $forum_last_active_time );
811
- }
812
 
813
- // Counts
814
- bbp_update_forum_reply_count( $ancestor );
 
815
  }
816
  }
817
  }
@@ -844,17 +896,19 @@ function bbp_update_reply_forum_id( $reply_id = 0, $forum_id = 0 ) {
844
  if ( empty( $forum_id ) ) {
845
 
846
  // Get ancestors
847
- $ancestors = get_post_ancestors( $reply_id );
848
 
849
  // Loop through ancestors
850
- foreach ( $ancestors as $ancestor ) {
 
851
 
852
- // Get first parent that is a forum
853
- if ( get_post_field( 'post_type', $ancestor ) == bbp_get_forum_post_type() ) {
854
- $forum_id = $ancestor;
855
 
856
- // Found a forum, so exit the loop and continue
857
- continue;
 
858
  }
859
  }
860
  }
@@ -891,17 +945,19 @@ function bbp_update_reply_topic_id( $reply_id = 0, $topic_id = 0 ) {
891
  if ( empty( $topic_id ) ) {
892
 
893
  // Get ancestors
894
- $ancestors = get_post_ancestors( $reply_id );
895
 
896
  // Loop through ancestors
897
- foreach ( $ancestors as $ancestor ) {
 
898
 
899
- // Get first parent that is a forum
900
- if ( get_post_field( 'post_type', $ancestor ) == bbp_get_topic_post_type() ) {
901
- $topic_id = $ancestor;
902
 
903
- // Found a forum, so exit the loop and continue
904
- continue;
 
905
  }
906
  }
907
  }
@@ -1110,7 +1166,7 @@ function bbp_toggle_reply_handler() {
1110
  * @since bbPress (r2740)
1111
  *
1112
  * @param int $reply_id Reply id
1113
- * @uses wp_get_single_post() To get the reply
1114
  * @uses do_action() Calls 'bbp_spam_reply' with the reply ID
1115
  * @uses add_post_meta() To add the previous status to a meta
1116
  * @uses wp_insert_post() To insert the updated post
@@ -1120,7 +1176,7 @@ function bbp_toggle_reply_handler() {
1120
  function bbp_spam_reply( $reply_id = 0 ) {
1121
 
1122
  // Get reply
1123
- $reply = wp_get_single_post( $reply_id, ARRAY_A );
1124
  if ( empty( $reply ) )
1125
  return $reply;
1126
 
@@ -1156,7 +1212,7 @@ function bbp_spam_reply( $reply_id = 0 ) {
1156
  * @since bbPress (r2740)
1157
  *
1158
  * @param int $reply_id Reply id
1159
- * @uses wp_get_single_post() To get the reply
1160
  * @uses do_action() Calls 'bbp_unspam_reply' with the reply ID
1161
  * @uses get_post_meta() To get the previous status meta
1162
  * @uses delete_post_meta() To delete the previous status meta
@@ -1167,7 +1223,7 @@ function bbp_spam_reply( $reply_id = 0 ) {
1167
  function bbp_unspam_reply( $reply_id = 0 ) {
1168
 
1169
  // Get reply
1170
- $reply = wp_get_single_post( $reply_id, ARRAY_A );
1171
  if ( empty( $reply ) )
1172
  return $reply;
1173
 
@@ -1304,24 +1360,22 @@ function bbp_untrashed_reply( $reply_id = 0 ) {
1304
  *
1305
  * @since bbPress (r3540)
1306
  *
 
1307
  * @uses get_option() To get the setting
1308
  * @uses apply_filters() To allow the return value to be manipulated
1309
  * @return int
1310
  */
1311
- function bbp_get_replies_per_page() {
1312
-
1313
- // The default per setting
1314
- $default = 15;
1315
 
1316
  // Get database option and cast as integer
1317
- $per = $retval = (int) get_option( '_bbp_replies_per_page', $default );
1318
 
1319
  // If return val is empty, set it to default
1320
  if ( empty( $retval ) )
1321
  $retval = $default;
1322
 
1323
  // Filter and return
1324
- return (int) apply_filters( 'bbp_get_replies_per_page', $retval, $per );
1325
  }
1326
 
1327
  /**
@@ -1329,24 +1383,22 @@ function bbp_get_replies_per_page() {
1329
  *
1330
  * @since bbPress (r3540)
1331
  *
 
1332
  * @uses get_option() To get the setting
1333
  * @uses apply_filters() To allow the return value to be manipulated
1334
  * @return int
1335
  */
1336
- function bbp_get_replies_per_rss_page() {
1337
-
1338
- // The default per setting
1339
- $default = 25;
1340
 
1341
  // Get database option and cast as integer
1342
- $per = $retval = (int) get_option( '_bbp_replies_per_rss_page', $default );
1343
 
1344
  // If return val is empty, set it to default
1345
  if ( empty( $retval ) )
1346
  $retval = $default;
1347
 
1348
  // Filter and return
1349
- return (int) apply_filters( 'bbp_get_replies_per_rss_page', $retval, $per );
1350
  }
1351
 
1352
  /** Autoembed *****************************************************************/
@@ -1480,7 +1532,7 @@ function bbp_display_replies_feed_rss2( $replies_query = array() ) {
1480
  <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
1481
  <link><?php self_link(); ?></link>
1482
  <description><?php //?></description>
1483
- <pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', '', false ); ?></pubDate>
1484
  <generator>http://bbpress.org/?v=<?php bbp_version(); ?></generator>
1485
  <language><?php echo get_option( 'rss_language' ); ?></language>
1486
 
@@ -1632,7 +1684,7 @@ function bbp_get_reply_position_raw( $reply_id = 0, $topic_id = 0 ) {
1632
  if ( $reply_id != $topic_id ) {
1633
 
1634
  // Make sure the topic has replies before running another query
1635
- $reply_count = bbp_get_topic_reply_count( $topic_id );
1636
  if ( !empty( $reply_count ) ) {
1637
 
1638
  // Get reply id's
215
  if ( !bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) )
216
  bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
217
 
218
+ /** Reply Status **********************************************************/
219
 
220
+ // Maybe put into moderation
221
+ if ( !bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
222
+ $reply_status = bbp_get_pending_status_id();
223
+
224
+ // Default
225
+ } else {
226
+ $reply_status = bbp_get_public_status_id();
227
+ }
228
 
229
  /** Topic Tags ************************************************************/
230
 
231
+ // Either replace terms
232
+ if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) && ! empty( $_POST['bbp_topic_tags'] ) ) {
233
  $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
234
 
235
+ // ...or remove them.
236
+ } elseif ( isset( $_POST['bbp_topic_tags'] ) ) {
237
+ $terms = '';
238
+
239
+ // Existing terms
240
+ } else {
241
+ $terms = bbp_get_topic_tag_names( $topic_id );
242
+ }
243
+
244
  /** Additional Actions (Before Save) **************************************/
245
 
246
  do_action( 'bbp_new_reply_pre_extras', $topic_id, $forum_id );
257
  'post_author' => $reply_author,
258
  'post_title' => $reply_title,
259
  'post_content' => $reply_content,
260
+ 'post_status' => $reply_status,
261
  'post_parent' => $topic_id,
 
262
  'post_type' => bbp_get_reply_post_type(),
263
  'comment_status' => 'closed',
264
+ 'menu_order' => bbp_get_topic_reply_count( $topic_id, false ) + 1
265
  ) );
266
 
267
  // Insert reply
364
  * @uses wp_set_post_terms() To set the topic tags
365
  * @uses bbp_has_errors() To get the {@link WP_Error} errors
366
  * @uses wp_save_post_revision() To save a reply revision
367
+ * @uses bbp_update_reply_revision_log() To update the reply revision log
368
  * @uses wp_update_post() To update the reply
369
  * @uses bbp_get_reply_topic_id() To get the reply topic id
370
  * @uses bbp_get_topic_forum_id() To get the topic forum id
386
  return;
387
 
388
  // Define local variable(s)
389
+ $revisions_removed = false;
390
+ $reply = $reply_id = $reply_author = $topic_id = $forum_id = $anonymous_data = 0;
391
  $reply_title = $reply_content = $reply_edit_reason = $terms = '';
392
 
393
  /** Reply *****************************************************************/
418
  } else {
419
 
420
  // Check users ability to create new reply
421
+ if ( ! bbp_is_reply_anonymous( $reply_id ) ) {
422
 
423
  // User cannot edit this reply
424
  if ( !current_user_can( 'edit_reply', $reply_id ) ) {
426
  return;
427
  }
428
 
429
+ // Set reply author
430
+ $reply_author = bbp_get_reply_author_id( $reply_id );
431
+
432
  // It is an anonymous post
433
  } else {
434
 
493
 
494
  /** Reply Blacklist *******************************************************/
495
 
496
+ if ( !bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) )
497
  bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
498
 
499
+ /** Reply Status **********************************************************/
500
 
501
+ // Maybe put into moderation
502
+ if ( !bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
503
+
504
+ // Set post status to pending if public
505
+ if ( bbp_get_public_status_id() == $reply->post_status ) {
506
+ $reply_status = bbp_get_pending_status_id();
507
+ }
508
+
509
+ // Use existing post_status
510
+ } else {
511
+ $reply_status = $reply->post_status;
512
+ }
513
 
514
  /** Topic Tags ************************************************************/
515
 
516
+ // Either replace terms
517
+ if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) && ! empty( $_POST['bbp_topic_tags'] ) ) {
518
  $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
519
 
520
+ // ...or remove them.
521
+ } elseif ( isset( $_POST['bbp_topic_tags'] ) ) {
522
+ $terms = '';
523
+
524
+ // Existing terms
525
+ } else {
526
+ $terms = bbp_get_topic_tag_names( $topic_id );
527
+ }
528
+
529
  /** Additional Actions (Before Save) **************************************/
530
 
531
  do_action( 'bbp_edit_reply_pre_extras', $reply_id );
542
  'ID' => $reply_id,
543
  'post_title' => $reply_title,
544
  'post_content' => $reply_content,
545
+ 'post_status' => $reply_status,
546
+ 'post_parent' => $topic_id,
547
+ 'post_author' => $reply_author,
548
  'post_type' => bbp_get_reply_post_type()
549
  ) );
550
 
551
+ // Toggle revisions to avoid duplicates
552
+ if ( post_type_supports( bbp_get_reply_post_type(), 'revisions' ) ) {
553
+ $revisions_removed = true;
554
+ remove_post_type_support( bbp_get_reply_post_type(), 'revisions' );
555
+ }
556
+
557
+ // Insert topic
558
  $reply_id = wp_update_post( $reply_data );
559
 
560
+ // Toggle revisions back on
561
+ if ( true === $revisions_removed ) {
562
+ $revisions_removed = true;
563
+ add_post_type_support( bbp_get_reply_post_type(), 'revisions' );
564
+ }
565
+
566
  /** Topic Tags ************************************************************/
567
 
568
  // Just in time manipulation of reply terms before being edited
584
 
585
  // Update revision log
586
  if ( !empty( $_POST['bbp_log_reply_edit'] ) && ( 1 == $_POST['bbp_log_reply_edit'] ) ) {
587
+ $revision_id = wp_is_post_revision( $reply_id );
588
  if ( !empty( $revision_id ) ) {
589
  bbp_update_reply_revision_log( array(
590
  'reply_id' => $reply_id,
600
  if ( !empty( $reply_id ) && !is_wp_error( $reply_id ) ) {
601
 
602
  // Update counts, etc...
603
+ do_action( 'bbp_edit_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author , true /* Is edit */ );
604
 
605
  /** Additional Actions (After Save) ***********************************/
606
 
803
  $active_id = empty( $reply_id ) ? $topic_id : $reply_id;
804
 
805
  // Setup ancestors array to walk up
806
+ $ancestors = array_values( array_unique( array_merge( array( $topic_id, $forum_id ), (array) get_post_ancestors( $topic_id ) ) ) );
807
 
808
  // If we want a full refresh, unset any of the possibly passed variables
809
  if ( true == $refresh )
810
  $forum_id = $topic_id = $reply_id = $active_id = $last_active_time = 0;
811
 
812
  // Walk up ancestors
813
+ if ( !empty( $ancestors ) ) {
814
+ foreach ( $ancestors as $ancestor ) {
815
 
816
+ // Reply meta relating to most recent reply
817
+ if ( bbp_is_reply( $ancestor ) ) {
818
+ // @todo - hierarchical replies
819
 
820
+ // Topic meta relating to most recent reply
821
+ } elseif ( bbp_is_topic( $ancestor ) ) {
822
 
823
+ // Last reply and active ID's
824
+ bbp_update_topic_last_reply_id ( $ancestor, $reply_id );
825
+ bbp_update_topic_last_active_id( $ancestor, $active_id );
826
 
827
+ // Get the last active time if none was passed
828
+ $topic_last_active_time = $last_active_time;
829
+ if ( empty( $last_active_time ) ) {
830
+ $topic_last_active_time = get_post_field( 'post_date', bbp_get_topic_last_active_id( $ancestor ) );
831
+ }
832
 
833
+ // Only update if reply is published
834
+ if ( bbp_is_reply_published( $reply_id ) ) {
835
+ bbp_update_topic_last_active_time( $ancestor, $topic_last_active_time );
836
+ }
837
 
838
+ // Counts
839
+ bbp_update_topic_voice_count ( $ancestor );
840
+ bbp_update_topic_reply_count ( $ancestor );
841
+ bbp_update_topic_reply_count_hidden( $ancestor );
842
 
843
+ // Forum meta relating to most recent topic
844
+ } elseif ( bbp_is_forum( $ancestor ) ) {
845
 
846
+ // Last topic and reply ID's
847
+ bbp_update_forum_last_topic_id( $ancestor, $topic_id );
848
+ bbp_update_forum_last_reply_id( $ancestor, $reply_id );
849
 
850
+ // Last Active
851
+ bbp_update_forum_last_active_id( $ancestor, $active_id );
852
 
853
+ // Get the last active time if none was passed
854
+ $forum_last_active_time = $last_active_time;
855
+ if ( empty( $last_active_time ) ) {
856
+ $forum_last_active_time = get_post_field( 'post_date', bbp_get_forum_last_active_id( $ancestor ) );
857
+ }
858
 
859
+ // Only update if reply is published
860
+ if ( bbp_is_reply_published( $reply_id ) ) {
861
+ bbp_update_forum_last_active_time( $ancestor, $forum_last_active_time );
862
+ }
863
 
864
+ // Counts
865
+ bbp_update_forum_reply_count( $ancestor );
866
+ }
867
  }
868
  }
869
  }
896
  if ( empty( $forum_id ) ) {
897
 
898
  // Get ancestors
899
+ $ancestors = (array) get_post_ancestors( $reply_id );
900
 
901
  // Loop through ancestors
902
+ if ( !empty( $ancestors ) ) {
903
+ foreach ( $ancestors as $ancestor ) {
904
 
905
+ // Get first parent that is a forum
906
+ if ( get_post_field( 'post_type', $ancestor ) == bbp_get_forum_post_type() ) {
907
+ $forum_id = $ancestor;
908
 
909
+ // Found a forum, so exit the loop and continue
910
+ continue;
911
+ }
912
  }
913
  }
914
  }
945
  if ( empty( $topic_id ) ) {
946
 
947
  // Get ancestors
948
+ $ancestors = (array) get_post_ancestors( $reply_id );
949
 
950
  // Loop through ancestors
951
+ if ( !empty( $ancestors ) ) {
952
+ foreach ( $ancestors as $ancestor ) {
953
 
954
+ // Get first parent that is a forum
955
+ if ( get_post_field( 'post_type', $ancestor ) == bbp_get_topic_post_type() ) {
956
+ $topic_id = $ancestor;
957
 
958
+ // Found a forum, so exit the loop and continue
959
+ continue;
960
+ }
961
  }
962
  }
963
  }
1166
  * @since bbPress (r2740)
1167
  *
1168
  * @param int $reply_id Reply id
1169
+ * @uses get_post() To get the reply
1170
  * @uses do_action() Calls 'bbp_spam_reply' with the reply ID
1171
  * @uses add_post_meta() To add the previous status to a meta
1172
  * @uses wp_insert_post() To insert the updated post
1176
  function bbp_spam_reply( $reply_id = 0 ) {
1177
 
1178
  // Get reply
1179
+ $reply = get_post( $reply_id, ARRAY_A );
1180
  if ( empty( $reply ) )
1181
  return $reply;
1182
 
1212
  * @since bbPress (r2740)
1213
  *
1214
  * @param int $reply_id Reply id
1215
+ * @uses get_post() To get the reply
1216
  * @uses do_action() Calls 'bbp_unspam_reply' with the reply ID
1217
  * @uses get_post_meta() To get the previous status meta
1218
  * @uses delete_post_meta() To delete the previous status meta
1223
  function bbp_unspam_reply( $reply_id = 0 ) {
1224
 
1225
  // Get reply
1226
+ $reply = get_post( $reply_id, ARRAY_A );
1227
  if ( empty( $reply ) )
1228
  return $reply;
1229
 
1360
  *
1361
  * @since bbPress (r3540)
1362
  *
1363
+ * @param int $default Default replies per page (15)
1364
  * @uses get_option() To get the setting
1365
  * @uses apply_filters() To allow the return value to be manipulated
1366
  * @return int
1367
  */
1368
+ function bbp_get_replies_per_page( $default = 15 ) {
 
 
 
1369
 
1370
  // Get database option and cast as integer
1371
+ $retval = get_option( '_bbp_replies_per_page', $default );
1372
 
1373
  // If return val is empty, set it to default
1374
  if ( empty( $retval ) )
1375
  $retval = $default;
1376
 
1377
  // Filter and return
1378
+ return (int) apply_filters( 'bbp_get_replies_per_page', $retval, $default );
1379
  }
1380
 
1381
  /**
1383
  *
1384
  * @since bbPress (r3540)
1385
  *
1386
+ * @param int $default Default replies per page (25)
1387
  * @uses get_option() To get the setting
1388
  * @uses apply_filters() To allow the return value to be manipulated
1389
  * @return int
1390
  */
1391
+ function bbp_get_replies_per_rss_page( $default = 25 ) {
 
 
 
1392
 
1393
  // Get database option and cast as integer
1394
+ $retval = get_option( '_bbp_replies_per_rss_page', $default );
1395
 
1396
  // If return val is empty, set it to default
1397
  if ( empty( $retval ) )
1398
  $retval = $default;
1399
 
1400
  // Filter and return
1401
+ return (int) apply_filters( 'bbp_get_replies_per_rss_page', $retval, $default );
1402
  }
1403
 
1404
  /** Autoembed *****************************************************************/
1532
  <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
1533
  <link><?php self_link(); ?></link>
1534
  <description><?php //?></description>
1535
+ <pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', current_time( 'mysql' ), false ); ?></pubDate>
1536
  <generator>http://bbpress.org/?v=<?php bbp_version(); ?></generator>
1537
  <language><?php echo get_option( 'rss_language' ); ?></language>
1538
 
1684
  if ( $reply_id != $topic_id ) {
1685
 
1686
  // Make sure the topic has replies before running another query
1687
+ $reply_count = bbp_get_topic_reply_count( $topic_id, false );
1688
  if ( !empty( $reply_count ) ) {
1689
 
1690
  // Get reply id's
includes/replies/index.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Do not modify the files in this folder.
5
+ */
bbp-includes/bbp-reply-template.php → includes/replies/template-tags.php RENAMED
@@ -67,15 +67,16 @@ function bbp_has_replies( $args = '' ) {
67
  global $wp_rewrite;
68
 
69
  // What are the default allowed statuses (based on user caps)
70
- if ( bbp_get_view_all( 'edit_others_replies' ) )
71
- $default_post_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ) );
72
- else
73
- $default_post_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) );
 
74
 
75
- // Maybe Search
76
  $default_reply_search = !empty( $_REQUEST['rs'] ) ? $_REQUEST['rs'] : false;
77
  $default_post_parent = ( bbp_is_single_topic() ) ? bbp_get_topic_id() : 'any';
78
  $default_post_type = ( bbp_is_single_topic() && bbp_show_lead_topic() ) ? bbp_get_reply_post_type() : array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
 
79
 
80
  // Default query args
81
  $default = array(
@@ -100,11 +101,19 @@ function bbp_has_replies( $args = '' ) {
100
 
101
  // Call the query
102
  $bbp->reply_query = new WP_Query( $bbp_r );
103
-
104
  // Add pagination values to query object
105
  $bbp->reply_query->posts_per_page = $posts_per_page;
106
  $bbp->reply_query->paged = $paged;
107
 
 
 
 
 
 
 
 
 
108
  // Only add pagination if query returned results
109
  if ( (int) $bbp->reply_query->found_posts && (int) $bbp->reply_query->posts_per_page ) {
110
 
@@ -115,7 +124,11 @@ function bbp_has_replies( $args = '' ) {
115
  if ( is_page() || is_single() ) {
116
  $base = get_permalink();
117
 
118
- // Topic
 
 
 
 
119
  } else {
120
  $base = get_permalink( bbp_get_topic_id() );
121
  }
@@ -127,26 +140,26 @@ function bbp_has_replies( $args = '' ) {
127
  $base = add_query_arg( 'paged', '%#%' );
128
  }
129
 
130
- // Pagination settings with filter
131
- $bbp_replies_pagination = apply_filters( 'bbp_replies_pagination', array(
132
- 'base' => $base,
133
- 'format' => '',
134
- 'total' => ceil( (int) $bbp->reply_query->found_posts / (int) $posts_per_page ),
135
- 'current' => (int) $bbp->reply_query->paged,
136
- 'prev_text' => '&larr;',
137
- 'next_text' => '&rarr;',
138
- 'mid_size' => 1,
139
- 'add_args' => ( bbp_get_view_all() ) ? array( 'view' => 'all' ) : false
140
- ) );
141
-
142
  // Add pagination to query object
143
- $bbp->reply_query->pagination_links = paginate_links( $bbp_replies_pagination );
 
 
 
 
 
 
 
 
 
 
 
144
 
145
  // Remove first page from pagination
146
- if ( $wp_rewrite->using_permalinks() )
147
  $bbp->reply_query->pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $bbp->reply_query->pagination_links );
148
- else
149
  $bbp->reply_query->pagination_links = str_replace( '&#038;paged=1', '', $bbp->reply_query->pagination_links );
 
150
  }
151
 
152
  // Return object
@@ -219,26 +232,27 @@ function bbp_reply_id( $reply_id = 0 ) {
219
  $bbp = bbpress();
220
 
221
  // Easy empty checking
222
- if ( !empty( $reply_id ) && is_numeric( $reply_id ) )
223
  $bbp_reply_id = $reply_id;
224
 
225
  // Currently inside a replies loop
226
- elseif ( !empty( $bbp->reply_query->in_the_loop ) && isset( $bbp->reply_query->post->ID ) )
227
  $bbp_reply_id = $bbp->reply_query->post->ID;
228
 
229
  // Currently viewing a forum
230
- elseif ( ( bbp_is_single_reply() || bbp_is_reply_edit() ) && !empty( $bbp->current_reply_id ) )
231
  $bbp_reply_id = $bbp->current_reply_id;
232
 
233
  // Currently viewing a reply
234
- elseif ( ( bbp_is_single_reply() || bbp_is_reply_edit() ) && isset( $wp_query->post->ID ) )
235
  $bbp_reply_id = $wp_query->post->ID;
236
 
237
  // Fallback
238
- else
239
  $bbp_reply_id = 0;
 
240
 
241
- return (int) apply_filters( 'bbp_get_reply_id', (int) $bbp_reply_id, $reply_id );
242
  }
243
 
244
  /**
@@ -488,6 +502,52 @@ function bbp_reply_excerpt( $reply_id = 0, $length = 100 ) {
488
  return apply_filters( 'bbp_get_reply_excerpt', $excerpt, $reply_id, $length );
489
  }
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  /**
492
  * Append revisions to the reply content
493
  *
@@ -543,7 +603,14 @@ function bbp_reply_revision_log( $reply_id = 0 ) {
543
  function bbp_get_reply_revision_log( $reply_id = 0 ) {
544
 
545
  // Create necessary variables
546
- $reply_id = bbp_get_reply_id( $reply_id );
 
 
 
 
 
 
 
547
  $revision_log = bbp_get_reply_raw_revision_log( $reply_id );
548
 
549
  // Check reply and revision log exist
@@ -630,13 +697,17 @@ function bbp_get_reply_revisions( $reply_id = 0 ) {
630
  * @since bbPress (r2782)
631
  *
632
  * @param int $reply_id Optional. Reply id
 
633
  * @uses bbp_get_reply_revisions() To get the reply revisions
634
  * @uses apply_filters() Calls 'bbp_get_reply_revision_count'
635
  * with the revision count and reply id
636
  * @return string reply revision count
637
  */
638
- function bbp_get_reply_revision_count( $reply_id = 0 ) {
639
- return apply_filters( 'bbp_get_reply_revisions', count( bbp_get_reply_revisions( $reply_id ) ), $reply_id );
 
 
 
640
  }
641
 
642
  /**
@@ -802,7 +873,7 @@ function bbp_reply_author_id( $reply_id = 0 ) {
802
  $reply_id = bbp_get_reply_id( $reply_id );
803
  $author_id = get_post_field( 'post_author', $reply_id );
804
 
805
- return (int) apply_filters( 'bbp_get_reply_author_id', (int) $author_id, $reply_id );
806
  }
807
 
808
  /**
@@ -975,7 +1046,7 @@ function bbp_reply_author_link( $args = '' ) {
975
  }
976
 
977
  // Add links if not anonymous
978
- if ( empty( $anonymous ) ) {
979
  foreach ( $author_links as $link => $link_text ) {
980
  $link_class = ' class="bbp-author-' . $link . '"';
981
  $author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', $author_url, $link_title, $link_class, $link_text );
@@ -1206,7 +1277,7 @@ function bbp_reply_topic_id( $reply_id = 0 ) {
1206
  // Validate the topic_id
1207
  $topic_id = bbp_get_topic_id( $topic_id );
1208
 
1209
- return apply_filters( 'bbp_get_reply_topic_id', (int) $topic_id, $reply_id );
1210
  }
1211
 
1212
  /**
@@ -1246,7 +1317,7 @@ function bbp_reply_forum_id( $reply_id = 0 ) {
1246
  // Validate the forum_id
1247
  $forum_id = bbp_get_forum_id( $forum_id );
1248
 
1249
- return apply_filters( 'bbp_get_reply_forum_id', (int) $forum_id, $reply_id );
1250
  }
1251
 
1252
  /**
@@ -1309,7 +1380,7 @@ function bbp_reply_position( $reply_id = 0, $topic_id = 0 ) {
1309
  if ( ! bbp_show_lead_topic() )
1310
  $reply_position++;
1311
 
1312
- return (int) apply_filters( 'bbp_get_reply_position', (int) $reply_position, $reply_id, $topic_id );
1313
  }
1314
 
1315
  /** Reply Admin Links *********************************************************/
@@ -1511,7 +1582,7 @@ function bbp_reply_edit_url( $reply_id = 0 ) {
1511
  if ( empty( $reply ) )
1512
  return;
1513
 
1514
- $reply_link = bbp_get_reply_permalink( $reply_id );
1515
 
1516
  // Pretty permalinks
1517
  if ( $wp_rewrite->using_permalinks() ) {
@@ -1523,6 +1594,9 @@ function bbp_reply_edit_url( $reply_id = 0 ) {
1523
  $url = add_query_arg( array( bbp_get_reply_post_type() => $reply->post_name, $bbp->edit_id => '1' ), $reply_link );
1524
  }
1525
 
 
 
 
1526
  return apply_filters( 'bbp_get_reply_edit_url', $url, $reply_id );
1527
  }
1528
 
67
  global $wp_rewrite;
68
 
69
  // What are the default allowed statuses (based on user caps)
70
+ if ( bbp_get_view_all( 'edit_others_replies' ) ) {
71
+ $post_statuses = array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() );
72
+ } else {
73
+ $post_statuses = array( bbp_get_public_status_id(), bbp_get_closed_status_id() );
74
+ }
75
 
 
76
  $default_reply_search = !empty( $_REQUEST['rs'] ) ? $_REQUEST['rs'] : false;
77
  $default_post_parent = ( bbp_is_single_topic() ) ? bbp_get_topic_id() : 'any';
78
  $default_post_type = ( bbp_is_single_topic() && bbp_show_lead_topic() ) ? bbp_get_reply_post_type() : array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
79
+ $default_post_status = join( ',', $post_statuses );
80
 
81
  // Default query args
82
  $default = array(
101
 
102
  // Call the query
103
  $bbp->reply_query = new WP_Query( $bbp_r );
104
+
105
  // Add pagination values to query object
106
  $bbp->reply_query->posts_per_page = $posts_per_page;
107
  $bbp->reply_query->paged = $paged;
108
 
109
+ // Never home, regardless of what parse_query says
110
+ $bbp->reply_query->is_home = false;
111
+
112
+ // Reset is_single if single topic
113
+ if ( bbp_is_single_topic() ) {
114
+ $bbp->reply_query->is_single = true;
115
+ }
116
+
117
  // Only add pagination if query returned results
118
  if ( (int) $bbp->reply_query->found_posts && (int) $bbp->reply_query->posts_per_page ) {
119
 
124
  if ( is_page() || is_single() ) {
125
  $base = get_permalink();
126
 
127
+ // User's replies
128
+ } elseif ( bbp_is_single_user_replies() ) {
129
+ $base = bbp_get_user_replies_created_url( bbp_get_displayed_user_id() );
130
+
131
+ // Single topic
132
  } else {
133
  $base = get_permalink( bbp_get_topic_id() );
134
  }
140
  $base = add_query_arg( 'paged', '%#%' );
141
  }
142
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  // Add pagination to query object
144
+ $bbp->reply_query->pagination_links = paginate_links(
145
+ apply_filters( 'bbp_replies_pagination', array(
146
+ 'base' => $base,
147
+ 'format' => '',
148
+ 'total' => ceil( (int) $bbp->reply_query->found_posts / (int) $posts_per_page ),
149
+ 'current' => (int) $bbp->reply_query->paged,
150
+ 'prev_text' => '&larr;',
151
+ 'next_text' => '&rarr;',
152
+ 'mid_size' => 1,
153
+ 'add_args' => ( bbp_get_view_all() ) ? array( 'view' => 'all' ) : false
154
+ ) )
155
+ );
156
 
157
  // Remove first page from pagination
158
+ if ( $wp_rewrite->using_permalinks() ) {
159
  $bbp->reply_query->pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $bbp->reply_query->pagination_links );
160
+ } else {
161
  $bbp->reply_query->pagination_links = str_replace( '&#038;paged=1', '', $bbp->reply_query->pagination_links );
162
+ }
163
  }
164
 
165
  // Return object
232
  $bbp = bbpress();
233
 
234
  // Easy empty checking
235
+ if ( !empty( $reply_id ) && is_numeric( $reply_id ) ) {
236
  $bbp_reply_id = $reply_id;
237
 
238
  // Currently inside a replies loop
239
+ } elseif ( !empty( $bbp->reply_query->in_the_loop ) && isset( $bbp->reply_query->post->ID ) ) {
240
  $bbp_reply_id = $bbp->reply_query->post->ID;
241
 
242
  // Currently viewing a forum
243
+ } elseif ( ( bbp_is_single_reply() || bbp_is_reply_edit() ) && !empty( $bbp->current_reply_id ) ) {
244
  $bbp_reply_id = $bbp->current_reply_id;
245
 
246
  // Currently viewing a reply
247
+ } elseif ( ( bbp_is_single_reply() || bbp_is_reply_edit() ) && isset( $wp_query->post->ID ) ) {
248
  $bbp_reply_id = $wp_query->post->ID;
249
 
250
  // Fallback
251
+ } else {
252
  $bbp_reply_id = 0;
253
+ }
254
 
255
+ return (int) apply_filters( 'bbp_get_reply_id', $bbp_reply_id, $reply_id );
256
  }
257
 
258
  /**
502
  return apply_filters( 'bbp_get_reply_excerpt', $excerpt, $reply_id, $length );
503
  }
504
 
505
+ /**
506
+ * Output the post date and time of a reply
507
+ *
508
+ * @since bbPress (r4155)
509
+ *
510
+ * @param int $reply_id Optional. Reply id.
511
+ * @param bool $humanize Optional. Humanize output using time_since
512
+ * @param bool $gmt Optional. Use GMT
513
+ * @uses bbp_get_reply_post_date() to get the output
514
+ */
515
+ function bbp_reply_post_date( $reply_id = 0, $humanize = false, $gmt = false ) {
516
+ echo bbp_get_reply_post_date( $reply_id, $humanize, $gmt );
517
+ }
518
+ /**
519
+ * Return the post date and time of a reply
520
+ *
521
+ * @since bbPress (r4155)
522
+ *
523
+ * @param int $reply_id Optional. Reply id.
524
+ * @param bool $humanize Optional. Humanize output using time_since
525
+ * @param bool $gmt Optional. Use GMT
526
+ * @uses bbp_get_reply_id() To get the reply id
527
+ * @uses get_post_time() to get the reply post time
528
+ * @uses bbp_time_since() to maybe humanize the reply post time
529
+ * @return string
530
+ */
531
+ function bbp_get_reply_post_date( $reply_id = 0, $humanize = false, $gmt = false ) {
532
+ $reply_id = bbp_get_reply_id( $reply_id );
533
+
534
+ // 4 days, 4 hours ago
535
+ if ( !empty( $humanize ) ) {
536
+ $gmt = !empty( $gmt ) ? 'G' : 'U';
537
+ $date = get_post_time( $gmt, $reply_id );
538
+ $time = false; // For filter below
539
+ $result = bbp_time_since( $date );
540
+
541
+ // August 4, 2012 at 2:37 pm
542
+ } else {
543
+ $date = get_post_time( get_option( 'date_format' ), $gmt, $reply_id );
544
+ $time = get_post_time( get_option( 'time_format' ), $gmt, $reply_id );
545
+ $result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );
546
+ }
547
+
548
+ return apply_filters( 'bbp_get_reply_post_date', $result, $reply_id, $humanize, $gmt, $date, $time );
549
+ }
550
+
551
  /**
552
  * Append revisions to the reply content
553
  *
603
  function bbp_get_reply_revision_log( $reply_id = 0 ) {
604
 
605
  // Create necessary variables
606
+ $reply_id = bbp_get_reply_id( $reply_id );
607
+
608
+ // Show the topic reply log if this is a topic in a reply loop
609
+ if ( bbp_is_topic( $reply_id ) ) {
610
+ return bbp_get_topic_revision_log( $reply_id );
611
+ }
612
+
613
+ // Get the reply revision log (out of post meta
614
  $revision_log = bbp_get_reply_raw_revision_log( $reply_id );
615
 
616
  // Check reply and revision log exist
697
  * @since bbPress (r2782)
698
  *
699
  * @param int $reply_id Optional. Reply id
700
+ * @param boolean $integer Optional. Whether or not to format the result
701
  * @uses bbp_get_reply_revisions() To get the reply revisions
702
  * @uses apply_filters() Calls 'bbp_get_reply_revision_count'
703
  * with the revision count and reply id
704
  * @return string reply revision count
705
  */
706
+ function bbp_get_reply_revision_count( $reply_id = 0, $integer = false ) {
707
+ $count = (int) count( bbp_get_reply_revisions( $reply_id ) );
708
+ $filter = ( true === $integer ) ? 'bbp_get_reply_revision_count_int' : 'bbp_get_reply_revision_count';
709
+
710
+ return apply_filters( $filter, $count, $reply_id );
711
  }
712
 
713
  /**
873
  $reply_id = bbp_get_reply_id( $reply_id );
874
  $author_id = get_post_field( 'post_author', $reply_id );
875
 
876
+ return (int) apply_filters( 'bbp_get_reply_author_id', $author_id, $reply_id );
877
  }
878
 
879
  /**
1046
  }
1047
 
1048
  // Add links if not anonymous
1049
+ if ( empty( $anonymous ) && bbp_user_has_profile( bbp_get_reply_author_id( $reply_id ) ) ) {
1050
  foreach ( $author_links as $link => $link_text ) {
1051
  $link_class = ' class="bbp-author-' . $link . '"';
1052
  $author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', $author_url, $link_title, $link_class, $link_text );
1277
  // Validate the topic_id
1278
  $topic_id = bbp_get_topic_id( $topic_id );
1279
 
1280
+ return (int) apply_filters( 'bbp_get_reply_topic_id', $topic_id, $reply_id );
1281
  }
1282
 
1283
  /**
1317
  // Validate the forum_id
1318
  $forum_id = bbp_get_forum_id( $forum_id );
1319
 
1320
+ return (int) apply_filters( 'bbp_get_reply_forum_id', $forum_id, $reply_id );
1321
  }
1322
 
1323
  /**
1380
  if ( ! bbp_show_lead_topic() )
1381
  $reply_position++;
1382
 
1383
+ return (int) apply_filters( 'bbp_get_reply_position', $reply_position, $reply_id, $topic_id );
1384
  }
1385
 
1386
  /** Reply Admin Links *********************************************************/
1582
  if ( empty( $reply ) )
1583
  return;
1584
 
1585
+ $reply_link = bbp_remove_view_all( bbp_get_reply_permalink( $reply_id ) );
1586
 
1587
  // Pretty permalinks
1588
  if ( $wp_rewrite->using_permalinks() ) {
1594
  $url = add_query_arg( array( bbp_get_reply_post_type() => $reply->post_name, $bbp->edit_id => '1' ), $reply_link );
1595
  }
1596
 
1597
+ // Maybe add view all
1598
+ $url = bbp_add_view_all( $url );
1599
+
1600
  return apply_filters( 'bbp_get_reply_edit_url', $url, $reply_id );
1601
  }
1602
 
includes/topics/capabilities.php ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress Topic Capabilites
5
+ *
6
+ * Used to map topic capabilities to WordPress's existing capabilities.
7
+ *
8
+ * @package bbPress
9
+ * @subpackage Capabilities
10
+ */
11
+
12
+ /**
13
+ * Return topic capabilities
14
+ *
15
+ * @since bbPress (r2593)
16
+ *
17
+ * @uses apply_filters() Calls 'bbp_get_topic_caps' with the capabilities
18
+ * @return array Topic capabilities
19
+ */
20
+ function bbp_get_topic_caps() {
21
+ return apply_filters( 'bbp_get_topic_caps', array (
22
+ 'edit_posts' => 'edit_topics',
23
+ 'edit_others_posts' => 'edit_others_topics',
24
+ 'publish_posts' => 'publish_topics',
25
+ 'read_private_posts' => 'read_private_topics',
26
+ 'read_hidden_posts' => 'read_hidden_topics',
27
+ 'delete_posts' => 'delete_topics',
28
+ 'delete_others_posts' => 'delete_others_topics'
29
+ ) );
30
+ }
31
+
32
+ /**
33
+ * Return topic tag capabilities
34
+ *
35
+ * @since bbPress (r2593)
36
+ *
37
+ * @uses apply_filters() Calls 'bbp_get_topic_tag_caps' with the capabilities
38
+ * @return array Topic tag capabilities
39
+ */
40
+ function bbp_get_topic_tag_caps() {
41
+ return apply_filters( 'bbp_get_topic_tag_caps', array (
42
+ 'manage_terms' => 'manage_topic_tags',
43
+ 'edit_terms' => 'edit_topic_tags',
44
+ 'delete_terms' => 'delete_topic_tags',
45
+ 'assign_terms' => 'assign_topic_tags'
46
+ ) );
47
+ }
48
+
49
+ /**
50
+ * Maps topic capabilities
51
+ *
52
+ * @since bbPress (r4242)
53
+ *
54
+ * @param array $caps Capabilities for meta capability
55
+ * @param string $cap Capability name
56
+ * @param int $user_id User id
57
+ * @param mixed $args Arguments
58
+ * @uses get_post() To get the post
59
+ * @uses get_post_type_object() To get the post type object
60
+ * @uses apply_filters() Filter capability map results
61
+ * @return array Actual capabilities for meta capability
62
+ */
63
+ function bbp_map_topic_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
64
+
65
+ // What capability is being checked?
66
+ switch ( $cap ) {
67
+
68
+ /** Reading ***********************************************************/
69
+
70
+ case 'read_topic' :
71
+
72
+ // User cannot spectate
73
+ if ( ! user_can( $user_id, 'spectate' ) ) {
74
+ $caps = array( 'do_not_allow' );
75
+
76
+ // Do some post ID based logic
77
+ } else {
78
+
79
+ // Get the post
80
+ $_post = get_post( $args[0] );
81
+ if ( !empty( $_post ) ) {
82
+
83
+ // Get caps for post type object
84
+ $post_type = get_post_type_object( $_post->post_type );
85
+
86
+ // Post is public
87
+ if ( bbp_get_public_status_id() == $_post->post_status ) {
88
+ $caps = array( 'spectate' );
89
+
90
+ // User is author so allow read
91
+ } elseif ( (int) $user_id == (int) $_post->post_author ) {
92
+ $caps = array( 'spectate' );
93
+
94
+ // Unknown so map to private posts
95
+ } else {
96
+ $caps = array( $post_type->cap->read_private_forums );
97
+ }
98
+ }
99
+ }
100
+
101
+ break;
102
+
103
+ /** Publishing ********************************************************/
104
+
105
+ case 'publish_topics' :
106
+
107
+ // Moderators can always publish
108
+ if ( user_can( $user_id, 'moderate' ) ) {
109
+ $caps = array( 'moderate' );
110
+ }
111
+
112
+ break;
113
+
114
+ /** Editing ***********************************************************/
115
+
116
+ // Used primarily in wp-admin
117
+ case 'edit_topics' :
118
+ case 'edit_others_topics' :
119
+
120
+ // Moderators can always edit
121
+ if ( user_can( $user_id, 'moderate' ) ) {
122
+ $caps = array( $cap );
123
+ }
124
+
125
+ break;
126
+
127
+ // Used everywhere
128
+ case 'edit_topic' :
129
+
130
+ // Get the post
131
+ $_post = get_post( $args[0] );
132
+ if ( !empty( $_post ) ) {
133
+
134
+ // Get caps for post type object
135
+ $post_type = get_post_type_object( $_post->post_type );
136
+ $caps = array();
137
+
138
+ // Add 'do_not_allow' cap if user is spam or deleted
139
+ if ( bbp_is_user_inactive( $user_id ) ) {
140
+ $caps[] = 'do_not_allow';
141
+
142
+ // User is author so allow edit
143
+ } elseif ( (int) $user_id == (int) $_post->post_author ) {
144
+ $caps[] = $post_type->cap->edit_posts;
145
+
146
+ // Unknown, so map to edit_others_posts
147
+ } else {
148
+ $caps[] = $post_type->cap->edit_others_posts;
149
+ }
150
+ }
151
+
152
+ break;
153
+
154
+ /** Deleting **********************************************************/
155
+
156
+ case 'delete_topic' :
157
+
158
+ // Get the post
159
+ $_post = get_post( $args[0] );
160
+ if ( !empty( $_post ) ) {
161
+
162
+ // Get caps for post type object
163
+ $post_type = get_post_type_object( $_post->post_type );
164
+ $caps = array();
165
+
166
+ // Add 'do_not_allow' cap if user is spam or deleted
167
+ if ( bbp_is_user_inactive( $user_id ) ) {
168
+ $caps[] = 'do_not_allow';
169
+
170
+ // Moderators can always edit forum content
171
+ } elseif ( user_can( $user_id, 'moderate' ) ) {
172
+ $caps[] = 'moderate';
173
+
174
+ // Unknown so map to delete_others_posts
175
+ } else {
176
+ $caps[] = $post_type->cap->delete_others_posts;
177
+ }
178
+ }
179
+
180
+ break;
181
+
182
+ // Moderation override
183
+ case 'delete_topics' :
184
+ case 'delete_others_topics' :
185
+
186
+ // Moderators can always delete
187
+ if ( user_can( $user_id, 'moderate' ) ) {
188
+ $caps = array( $cap );
189
+ }
190
+
191
+ break;
192
+
193
+ /** Admin *************************************************************/
194
+
195
+ case 'bbp_topics_admin' :
196
+ $caps = array( 'moderate' );
197
+ break;
198
+ }
199
+
200
+ return apply_filters( 'bbp_map_topic_meta_caps', $caps, $cap, $user_id, $args );
201
+ }
202
+
203
+ /**
204
+ * Maps topic tag capabilities
205
+ *
206
+ * @since bbPress (r4242)
207
+ *
208
+ * @param array $caps Capabilities for meta capability
209
+ * @param string $cap Capability name
210
+ * @param int $user_id User id
211
+ * @param mixed $args Arguments
212
+ * @uses apply_filters() Filter capability map results
213
+ * @return array Actual capabilities for meta capability
214
+ */
215
+ function bbp_map_topic_tag_meta_caps( $caps, $cap, $user_id, $args ) {
216
+
217
+ // What capability is being checked?
218
+ switch ( $cap ) {
219
+ case 'manage_topic_tags' :
220
+ case 'edit_topic_tags' :
221
+ case 'delete_topic_tags' :
222
+ case 'assign_topic_tags' :
223
+ case 'bbp_topic_tags_admin' :
224
+
225
+ // Moderators can always edit
226
+ if ( user_can( $user_id, 'moderate' ) ) {
227
+ $caps = array( 'moderate' );
228
+ }
229
+ }
230
+
231
+ return apply_filters( 'bbp_map_topic_tag_meta_caps', $caps, $cap, $user_id, $args );
232
+ }
bbp-includes/bbp-topic-functions.php → includes/topics/functions.php RENAMED
@@ -237,22 +237,28 @@ function bbp_new_topic_handler() {
237
  if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
238
  bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
239
 
240
- /** Topic Moderation ******************************************************/
241
-
242
- $post_status = bbp_get_public_status_id();
243
- if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
244
- $post_status = bbp_get_pending_status_id();
 
 
 
 
 
245
 
246
  /** Topic Tags ************************************************************/
247
 
248
- if ( !empty( $_POST['bbp_topic_tags'] ) ) {
249
 
250
  // Escape tag input
251
  $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
252
 
253
  // Explode by comma
254
- if ( strstr( $terms, ',' ) )
255
  $terms = explode( ',', $terms );
 
256
 
257
  // Add topic tag ID as main key
258
  $terms = array( bbp_get_topic_tag_tax_id() => $terms );
@@ -274,8 +280,8 @@ function bbp_new_topic_handler() {
274
  'post_author' => $topic_author,
275
  'post_title' => $topic_title,
276
  'post_content' => $topic_content,
 
277
  'post_parent' => $forum_id,
278
- 'post_status' => $post_status,
279
  'post_type' => bbp_get_topic_post_type(),
280
  'tax_input' => $terms,
281
  'comment_status' => 'closed'
@@ -427,9 +433,9 @@ function bbp_edit_topic_handler() {
427
  return;
428
 
429
  // Define local variable(s)
430
- $topic = $topic_id = $forum_id = $anonymous_data = 0;
 
431
  $topic_title = $topic_content = $topic_edit_reason = '';
432
- $terms = array( bbp_get_topic_tag_tax_id() => array() );
433
 
434
  /** Topic *****************************************************************/
435
 
@@ -453,13 +459,16 @@ function bbp_edit_topic_handler() {
453
  } else {
454
 
455
  // Check users ability to create new topic
456
- if ( !bbp_is_topic_anonymous( $topic_id ) ) {
457
 
458
  // User cannot edit this topic
459
  if ( !current_user_can( 'edit_topic', $topic_id ) ) {
460
  bbp_add_error( 'bbp_edit_topic_permissions', __( '<strong>ERROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
461
  }
462
 
 
 
 
463
  // It is an anonymous post
464
  } else {
465
 
@@ -538,21 +547,30 @@ function bbp_edit_topic_handler() {
538
  if ( empty( $topic_content ) )
539
  bbp_add_error( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
540
 
541
- /** topic Blacklist *******************************************************/
542
 
543
- if ( !bbp_check_for_blacklist( $anonymous_data, bbp_get_topic_author_id( $topic_id ), $topic_title, $topic_content ) )
544
  bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
545
 
546
- /** Topic Moderation ******************************************************/
547
 
548
- $post_status = bbp_get_public_status_id();
549
- if ( !bbp_check_for_moderation( $anonymous_data, bbp_get_topic_author_id( $topic_id ), $topic_title, $topic_content ) )
550
- $post_status = bbp_get_pending_status_id();
 
 
 
 
 
 
 
 
 
551
 
552
  /** Topic Tags ************************************************************/
553
 
554
- // Tags
555
- if ( !empty( $_POST['bbp_topic_tags'] ) ) {
556
 
557
  // Escape tag input
558
  $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
@@ -563,6 +581,14 @@ function bbp_edit_topic_handler() {
563
 
564
  // Add topic tag ID as main key
565
  $terms = array( bbp_get_topic_tag_tax_id() => $terms );
 
 
 
 
 
 
 
 
566
  }
567
 
568
  /** Additional Actions (Before Save) **************************************/
@@ -581,16 +607,28 @@ function bbp_edit_topic_handler() {
581
  'ID' => $topic_id,
582
  'post_title' => $topic_title,
583
  'post_content' => $topic_content,
584
- 'post_status' => $post_status,
585
  'post_parent' => $forum_id,
586
- 'post_author' => $topic->post_author,
587
  'post_type' => bbp_get_topic_post_type(),
588
  'tax_input' => $terms,
589
  ) );
590
 
 
 
 
 
 
 
591
  // Insert topic
592
  $topic_id = wp_update_post( $topic_data );
593
 
 
 
 
 
 
 
594
  /** Stickies **************************************************************/
595
 
596
  if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
@@ -623,13 +661,16 @@ function bbp_edit_topic_handler() {
623
  $topic_edit_reason = esc_attr( strip_tags( $_POST['bbp_topic_edit_reason'] ) );
624
 
625
  // Update revision log
626
- if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( 1 == $_POST['bbp_log_topic_edit'] ) && ( $revision_id = wp_save_post_revision( $topic_id ) ) ) {
627
- bbp_update_topic_revision_log( array(
628
- 'topic_id' => $topic_id,
629
- 'revision_id' => $revision_id,
630
- 'author_id' => bbp_get_current_user_id(),
631
- 'reason' => $topic_edit_reason
632
- ) );
 
 
 
633
  }
634
 
635
  /** No Errors *************************************************************/
@@ -637,7 +678,7 @@ function bbp_edit_topic_handler() {
637
  if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
638
 
639
  // Update counts, etc...
640
- do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic->post_author , true /* Is edit */ );
641
 
642
  // If the new forum id is not equal to the old forum id, run the
643
  // bbp_move_topic action and pass the topic's forum id as the
@@ -841,7 +882,7 @@ function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id =
841
  }
842
 
843
  // Get topic ancestors
844
- $ancestors = array_values( array_unique( array_merge( array( $forum_id ), get_post_ancestors( $topic_id ) ) ) );
845
 
846
  // Topic status
847
  $topic_status = get_post_status( $topic_id );
@@ -853,20 +894,22 @@ function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id =
853
  }
854
 
855
  // Loop through ancestors
856
- foreach ( $ancestors as $ancestor ) {
857
-
858
- // If ancestor is a forum, update counts
859
- if ( bbp_is_forum( $ancestor ) ) {
860
-
861
- // Update the forum
862
- bbp_update_forum( array(
863
- 'forum_id' => $ancestor,
864
- 'last_topic_id' => $topic_id,
865
- 'last_reply_id' => $reply_id,
866
- 'last_active_id' => $active_id,
867
- 'last_active_time' => 0,
868
- 'last_active_status' => $topic_status
869
- ) );
 
 
870
  }
871
  }
872
  }
@@ -947,18 +990,20 @@ function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
947
  /** Old forum_id **********************************************************/
948
 
949
  // Get topic ancestors
950
- $ancestors = array_values( array_unique( array_merge( array( $old_forum_id ), get_post_ancestors( $old_forum_id ) ) ) );
951
 
952
  // Loop through ancestors
953
- foreach ( $ancestors as $ancestor ) {
 
954
 
955
- // If ancestor is a forum, update counts
956
- if ( bbp_is_forum( $ancestor ) ) {
957
 
958
- // Update the forum
959
- bbp_update_forum( array(
960
- 'forum_id' => $ancestor,
961
- ) );
 
962
  }
963
  }
964
 
@@ -968,18 +1013,20 @@ function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
968
  if ( !in_array( $new_forum_id, $ancestors ) ) {
969
 
970
  // Get topic ancestors
971
- $ancestors = array_values( array_unique( array_merge( array( $new_forum_id ), get_post_ancestors( $new_forum_id ) ) ) );
972
 
973
  // Loop through ancestors
974
- foreach ( $ancestors as $ancestor ) {
 
975
 
976
- // If ancestor is a forum, update counts
977
- if ( bbp_is_forum( $ancestor ) ) {
978
 
979
- // Update the forum
980
- bbp_update_forum( array(
981
- 'forum_id' => $ancestor,
982
- ) );
 
983
  }
984
  }
985
  }
@@ -1417,7 +1464,6 @@ function bbp_split_topic_handler() {
1417
  'post_name' => false,
1418
  'post_type' => bbp_get_topic_post_type(),
1419
  'post_parent' => $source_topic->post_parent,
1420
- 'menu_order' => '1',
1421
  'guid' => ''
1422
  );
1423
 
@@ -1451,6 +1497,24 @@ function bbp_split_topic_handler() {
1451
  // Update counts, etc...
1452
  do_action( 'bbp_pre_split_topic', $from_reply->ID, $source_topic->ID, $destination_topic->ID );
1453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1454
  /** Subscriptions *********************************************************/
1455
 
1456
  // Copy the subscribers
@@ -2522,7 +2586,7 @@ function bbp_update_topic_revision_log( $args = '' ) {
2522
  * @since bbPress (r2740)
2523
  *
2524
  * @param int $topic_id Topic id
2525
- * @uses wp_get_single_post() To get the topic
2526
  * @uses do_action() Calls 'bbp_close_topic' with the topic id
2527
  * @uses add_post_meta() To add the previous status to a meta
2528
  * @uses wp_insert_post() To update the topic with the new status
@@ -2532,7 +2596,7 @@ function bbp_update_topic_revision_log( $args = '' ) {
2532
  function bbp_close_topic( $topic_id = 0 ) {
2533
 
2534
  // Get topic
2535
- if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
2536
  return $topic;
2537
 
2538
  // Bail if already closed
@@ -2567,7 +2631,7 @@ function bbp_close_topic( $topic_id = 0 ) {
2567
  * @since bbPress (r2740)
2568
  *
2569
  * @param int $topic_id Topic id
2570
- * @uses wp_get_single_post() To get the topic
2571
  * @uses do_action() Calls 'bbp_open_topic' with the topic id
2572
  * @uses get_post_meta() To get the previous status
2573
  * @uses delete_post_meta() To delete the previous status meta
@@ -2578,7 +2642,7 @@ function bbp_close_topic( $topic_id = 0 ) {
2578
  function bbp_open_topic( $topic_id = 0 ) {
2579
 
2580
  // Get topic
2581
- if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
2582
  return $topic;
2583
 
2584
  // Bail if already open
@@ -2616,7 +2680,7 @@ function bbp_open_topic( $topic_id = 0 ) {
2616
  * @since bbPress (r2740)
2617
  *
2618
  * @param int $topic_id Topic id
2619
- * @uses wp_get_single_post() To get the topic
2620
  * @uses do_action() Calls 'bbp_spam_topic' with the topic id
2621
  * @uses add_post_meta() To add the previous status to a meta
2622
  * @uses wp_insert_post() To update the topic with the new status
@@ -2626,7 +2690,7 @@ function bbp_open_topic( $topic_id = 0 ) {
2626
  function bbp_spam_topic( $topic_id = 0 ) {
2627
 
2628
  // Get the topic
2629
- if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
2630
  return $topic;
2631
 
2632
  // Bail if topic is spam
@@ -2686,7 +2750,7 @@ function bbp_spam_topic( $topic_id = 0 ) {
2686
  * @since bbPress (r2740)
2687
  *
2688
  * @param int $topic_id Topic id
2689
- * @uses wp_get_single_post() To get the topic
2690
  * @uses do_action() Calls 'bbp_unspam_topic' with the topic id
2691
  * @uses get_post_meta() To get the previous status
2692
  * @uses delete_post_meta() To delete the previous status meta
@@ -2697,7 +2761,7 @@ function bbp_spam_topic( $topic_id = 0 ) {
2697
  function bbp_unspam_topic( $topic_id = 0 ) {
2698
 
2699
  // Get the topic
2700
- if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
2701
  return $topic;
2702
 
2703
  // Bail if already not spam
@@ -3024,24 +3088,22 @@ function bbp_untrashed_topic( $topic_id = 0 ) {
3024
  *
3025
  * @since bbPress (r3540)
3026
  *
 
3027
  * @uses get_option() To get the setting
3028
  * @uses apply_filters() To allow the return value to be manipulated
3029
  * @return int
3030
  */
3031
- function bbp_get_topics_per_page() {
3032
-
3033
- // The default per setting
3034
- $default = 15;
3035
 
3036
  // Get database option and cast as integer
3037
- $per = $retval = (int) get_option( '_bbp_topics_per_page', $default );
3038
 
3039
  // If return val is empty, set it to default
3040
  if ( empty( $retval ) )
3041
  $retval = $default;
3042
 
3043
  // Filter and return
3044
- return (int) apply_filters( 'bbp_get_topics_per_page', $retval, $per );
3045
  }
3046
 
3047
  /**
@@ -3049,24 +3111,45 @@ function bbp_get_topics_per_page() {
3049
  *
3050
  * @since bbPress (r3540)
3051
  *
 
3052
  * @uses get_option() To get the setting
3053
  * @uses apply_filters() To allow the return value to be manipulated
3054
  * @return int
3055
  */
3056
- function bbp_get_topics_per_rss_page() {
3057
-
3058
- // The default per setting
3059
- $default = 25;
3060
 
3061
  // Get database option and cast as integer
3062
- $per = $retval = (int) get_option( '_bbp_topics_per_rss_page', $default );
3063
 
3064
  // If return val is empty, set it to default
3065
  if ( empty( $retval ) )
3066
  $retval = $default;
3067
 
3068
  // Filter and return
3069
- return (int) apply_filters( 'bbp_get_topics_per_rss_page', $retval, $per );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3070
  }
3071
 
3072
  /** Autoembed *****************************************************************/
@@ -3142,7 +3225,7 @@ function bbp_display_topics_feed_rss2( $topics_query = array() ) {
3142
  <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
3143
  <link><?php self_link(); ?></link>
3144
  <description><?php //?></description>
3145
- <pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', '', false ); ?></pubDate>
3146
  <generator>http://bbpress.org/?v=<?php bbp_version(); ?></generator>
3147
  <language><?php echo get_option( 'rss_language' ); ?></language>
3148
 
237
  if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
238
  bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
239
 
240
+ /** Topic Status **********************************************************/
241
+
242
+ // Maybe put into moderation
243
+ if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
244
+ $topic_status = bbp_get_pending_status_id();
245
+
246
+ // Default to published
247
+ } else {
248
+ $topic_status = bbp_get_public_status_id();
249
+ }
250
 
251
  /** Topic Tags ************************************************************/
252
 
253
+ if ( bbp_allow_topic_tags() && !empty( $_POST['bbp_topic_tags'] ) ) {
254
 
255
  // Escape tag input
256
  $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
257
 
258
  // Explode by comma
259
+ if ( strstr( $terms, ',' ) ) {
260
  $terms = explode( ',', $terms );
261
+ }
262
 
263
  // Add topic tag ID as main key
264
  $terms = array( bbp_get_topic_tag_tax_id() => $terms );
280
  'post_author' => $topic_author,
281
  'post_title' => $topic_title,
282
  'post_content' => $topic_content,
283
+ 'post_status' => $topic_status,
284
  'post_parent' => $forum_id,
 
285
  'post_type' => bbp_get_topic_post_type(),
286
  'tax_input' => $terms,
287
  'comment_status' => 'closed'
433
  return;
434
 
435
  // Define local variable(s)
436
+ $revisions_removed = false;
437
+ $topic = $topic_id = $topic_author = $forum_id = $anonymous_data = 0;
438
  $topic_title = $topic_content = $topic_edit_reason = '';
 
439
 
440
  /** Topic *****************************************************************/
441
 
459
  } else {
460
 
461
  // Check users ability to create new topic
462
+ if ( ! bbp_is_topic_anonymous( $topic_id ) ) {
463
 
464
  // User cannot edit this topic
465
  if ( !current_user_can( 'edit_topic', $topic_id ) ) {
466
  bbp_add_error( 'bbp_edit_topic_permissions', __( '<strong>ERROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
467
  }
468
 
469
+ // Set topic author
470
+ $topic_author = bbp_get_topic_author_id( $topic_id );
471
+
472
  // It is an anonymous post
473
  } else {
474
 
547
  if ( empty( $topic_content ) )
548
  bbp_add_error( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
549
 
550
+ /** Topic Blacklist *******************************************************/
551
 
552
+ if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
553
  bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
554
 
555
+ /** Topic Status **********************************************************/
556
 
557
+ // Maybe put into moderation
558
+ if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
559
+
560
+ // Set post status to pending if public or closed
561
+ if ( in_array( $topic->post_status, array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ) ) {
562
+ $topic_status = bbp_get_pending_status_id();
563
+ }
564
+
565
+ // Use existing post_status
566
+ } else {
567
+ $topic_status = $topic->post_status;
568
+ }
569
 
570
  /** Topic Tags ************************************************************/
571
 
572
+ // Either replace terms
573
+ if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) && ! empty( $_POST['bbp_topic_tags'] ) ) {
574
 
575
  // Escape tag input
576
  $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
581
 
582
  // Add topic tag ID as main key
583
  $terms = array( bbp_get_topic_tag_tax_id() => $terms );
584
+
585
+ // ...or remove them.
586
+ } elseif ( isset( $_POST['bbp_topic_tags'] ) ) {
587
+ $terms = array( bbp_get_topic_tag_tax_id() => array() );
588
+
589
+ // Existing terms
590
+ } else {
591
+ $terms = array( bbp_get_topic_tag_tax_id() => explode( ',', bbp_get_topic_tag_names( $topic_id, ',' ) ) );
592
  }
593
 
594
  /** Additional Actions (Before Save) **************************************/
607
  'ID' => $topic_id,
608
  'post_title' => $topic_title,
609
  'post_content' => $topic_content,
610
+ 'post_status' => $topic_status,
611
  'post_parent' => $forum_id,
612
+ 'post_author' => $topic_author,
613
  'post_type' => bbp_get_topic_post_type(),
614
  'tax_input' => $terms,
615
  ) );
616
 
617
+ // Toggle revisions to avoid duplicates
618
+ if ( post_type_supports( bbp_get_topic_post_type(), 'revisions' ) ) {
619
+ $revisions_removed = true;
620
+ remove_post_type_support( bbp_get_topic_post_type(), 'revisions' );
621
+ }
622
+
623
  // Insert topic
624
  $topic_id = wp_update_post( $topic_data );
625
 
626
+ // Toggle revisions back on
627
+ if ( true === $revisions_removed ) {
628
+ $revisions_removed = true;
629
+ add_post_type_support( bbp_get_topic_post_type(), 'revisions' );
630
+ }
631
+
632
  /** Stickies **************************************************************/
633
 
634
  if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
661
  $topic_edit_reason = esc_attr( strip_tags( $_POST['bbp_topic_edit_reason'] ) );
662
 
663
  // Update revision log
664
+ if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( 1 == $_POST['bbp_log_topic_edit'] ) ) {
665
+ $revision_id = wp_save_post_revision( $topic_id );
666
+ if ( ! empty( $revision_id ) ) {
667
+ bbp_update_topic_revision_log( array(
668
+ 'topic_id' => $topic_id,
669
+ 'revision_id' => $revision_id,
670
+ 'author_id' => bbp_get_current_user_id(),
671
+ 'reason' => $topic_edit_reason
672
+ ) );
673
+ }
674
  }
675
 
676
  /** No Errors *************************************************************/
678
  if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
679
 
680
  // Update counts, etc...
681
+ do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic_author , true /* Is edit */ );
682
 
683
  // If the new forum id is not equal to the old forum id, run the
684
  // bbp_move_topic action and pass the topic's forum id as the
882
  }
883
 
884
  // Get topic ancestors
885
+ $ancestors = array_values( array_unique( array_merge( array( $forum_id ), (array) get_post_ancestors( $topic_id ) ) ) );
886
 
887
  // Topic status
888
  $topic_status = get_post_status( $topic_id );
894
  }
895
 
896
  // Loop through ancestors
897
+ if ( !empty( $ancestors ) ) {
898
+ foreach ( $ancestors as $ancestor ) {
899
+
900
+ // If ancestor is a forum, update counts
901
+ if ( bbp_is_forum( $ancestor ) ) {
902
+
903
+ // Update the forum
904
+ bbp_update_forum( array(
905
+ 'forum_id' => $ancestor,
906
+ 'last_topic_id' => $topic_id,
907
+ 'last_reply_id' => $reply_id,
908
+ 'last_active_id' => $active_id,
909
+ 'last_active_time' => 0,
910
+ 'last_active_status' => $topic_status
911
+ ) );
912
+ }
913
  }
914
  }
915
  }
990
  /** Old forum_id **********************************************************/
991
 
992
  // Get topic ancestors
993
+ $ancestors = array_values( array_unique( array_merge( array( $old_forum_id ), (array) get_post_ancestors( $old_forum_id ) ) ) );
994
 
995
  // Loop through ancestors
996
+ if ( !empty( $ancestors ) ) {
997
+ foreach ( $ancestors as $ancestor ) {
998
 
999
+ // If ancestor is a forum, update counts
1000
+ if ( bbp_is_forum( $ancestor ) ) {
1001
 
1002
+ // Update the forum
1003
+ bbp_update_forum( array(
1004
+ 'forum_id' => $ancestor,
1005
+ ) );
1006
+ }
1007
  }
1008
  }
1009
 
1013
  if ( !in_array( $new_forum_id, $ancestors ) ) {
1014
 
1015
  // Get topic ancestors
1016
+ $ancestors = array_values( array_unique( array_merge( array( $new_forum_id ), (array) get_post_ancestors( $new_forum_id ) ) ) );
1017
 
1018
  // Loop through ancestors
1019
+ if ( !empty( $ancestors ) ) {
1020
+ foreach ( $ancestors as $ancestor ) {
1021
 
1022
+ // If ancestor is a forum, update counts
1023
+ if ( bbp_is_forum( $ancestor ) ) {
1024
 
1025
+ // Update the forum
1026
+ bbp_update_forum( array(
1027
+ 'forum_id' => $ancestor,
1028
+ ) );
1029
+ }
1030
  }
1031
  }
1032
  }
1464
  'post_name' => false,
1465
  'post_type' => bbp_get_topic_post_type(),
1466
  'post_parent' => $source_topic->post_parent,
 
1467
  'guid' => ''
1468
  );
1469
 
1497
  // Update counts, etc...
1498
  do_action( 'bbp_pre_split_topic', $from_reply->ID, $source_topic->ID, $destination_topic->ID );
1499
 
1500
+ /** Date Check ************************************************************/
1501
+
1502
+ // Check if the destination topic is older than the from reply
1503
+ if ( strtotime( $from_reply->post_date ) < strtotime( $destination_topic->post_date ) ) {
1504
+
1505
+ // Set destination topic post_date to 1 second before from reply
1506
+ $destination_post_date = date( 'Y-m-d H:i:s', strtotime( $from_reply->post_date ) - 1 );
1507
+
1508
+ $postarr = array(
1509
+ 'ID' => $destination_topic_id,
1510
+ 'post_date' => $destination_post_date,
1511
+ 'post_date_gmt' => get_gmt_from_date( $destination_post_date )
1512
+ );
1513
+
1514
+ // Update destination topic
1515
+ wp_update_post( $postarr );
1516
+ }
1517
+
1518
  /** Subscriptions *********************************************************/
1519
 
1520
  // Copy the subscribers
2586
  * @since bbPress (r2740)
2587
  *
2588
  * @param int $topic_id Topic id
2589
+ * @uses get_post() To get the topic
2590
  * @uses do_action() Calls 'bbp_close_topic' with the topic id
2591
  * @uses add_post_meta() To add the previous status to a meta
2592
  * @uses wp_insert_post() To update the topic with the new status
2596
  function bbp_close_topic( $topic_id = 0 ) {
2597
 
2598
  // Get topic
2599
+ if ( !$topic = get_post( $topic_id, ARRAY_A ) )
2600
  return $topic;
2601
 
2602
  // Bail if already closed
2631
  * @since bbPress (r2740)
2632
  *
2633
  * @param int $topic_id Topic id
2634
+ * @uses get_post() To get the topic
2635
  * @uses do_action() Calls 'bbp_open_topic' with the topic id
2636
  * @uses get_post_meta() To get the previous status
2637
  * @uses delete_post_meta() To delete the previous status meta
2642
  function bbp_open_topic( $topic_id = 0 ) {
2643
 
2644
  // Get topic
2645
+ if ( !$topic = get_post( $topic_id, ARRAY_A ) )
2646
  return $topic;
2647
 
2648
  // Bail if already open
2680
  * @since bbPress (r2740)
2681
  *
2682
  * @param int $topic_id Topic id
2683
+ * @uses get_post() To get the topic
2684
  * @uses do_action() Calls 'bbp_spam_topic' with the topic id
2685
  * @uses add_post_meta() To add the previous status to a meta
2686
  * @uses wp_insert_post() To update the topic with the new status
2690
  function bbp_spam_topic( $topic_id = 0 ) {
2691
 
2692
  // Get the topic
2693
+ if ( !$topic = get_post( $topic_id, ARRAY_A ) )
2694
  return $topic;
2695
 
2696
  // Bail if topic is spam
2750
  * @since bbPress (r2740)
2751
  *
2752
  * @param int $topic_id Topic id
2753
+ * @uses get_post() To get the topic
2754
  * @uses do_action() Calls 'bbp_unspam_topic' with the topic id
2755
  * @uses get_post_meta() To get the previous status
2756
  * @uses delete_post_meta() To delete the previous status meta
2761
  function bbp_unspam_topic( $topic_id = 0 ) {
2762
 
2763
  // Get the topic
2764
+ if ( !$topic = get_post( $topic_id, ARRAY_A ) )
2765
  return $topic;
2766
 
2767
  // Bail if already not spam
3088
  *
3089
  * @since bbPress (r3540)
3090
  *
3091
+ * @param int $default Default replies per page (15)
3092
  * @uses get_option() To get the setting
3093
  * @uses apply_filters() To allow the return value to be manipulated
3094
  * @return int
3095
  */
3096
+ function bbp_get_topics_per_page( $default = 15 ) {
 
 
 
3097
 
3098
  // Get database option and cast as integer
3099
+ $retval = get_option( '_bbp_topics_per_page', $default );
3100
 
3101
  // If return val is empty, set it to default
3102
  if ( empty( $retval ) )
3103
  $retval = $default;
3104
 
3105
  // Filter and return
3106
+ return (int) apply_filters( 'bbp_get_topics_per_page', $retval, $default );
3107
  }
3108
 
3109
  /**
3111
  *
3112
  * @since bbPress (r3540)
3113
  *
3114
+ * @param int $default Default replies per page (25)
3115
  * @uses get_option() To get the setting
3116
  * @uses apply_filters() To allow the return value to be manipulated
3117
  * @return int
3118
  */
3119
+ function bbp_get_topics_per_rss_page( $default = 25 ) {
 
 
 
3120
 
3121
  // Get database option and cast as integer
3122
+ $retval = get_option( '_bbp_topics_per_rss_page', $default );
3123
 
3124
  // If return val is empty, set it to default
3125
  if ( empty( $retval ) )
3126
  $retval = $default;
3127
 
3128
  // Filter and return
3129
+ return (int) apply_filters( 'bbp_get_topics_per_rss_page', $retval, $default );
3130
+ }
3131
+
3132
+ /** Topic Tags ****************************************************************/
3133
+
3134
+ /**
3135
+ * Get topic tags for a specific topic ID
3136
+ *
3137
+ * @since bbPress (r4165)
3138
+ *
3139
+ * @param int $topic_id
3140
+ * @param string $sep
3141
+ * @return string
3142
+ */
3143
+ function bbp_get_topic_tag_names( $topic_id = 0, $sep = ', ' ) {
3144
+ $topic_id = bbp_get_topic_id( $topic_id );
3145
+ $topic_tags = array_filter( (array) get_the_terms( $topic_id, bbp_get_topic_tag_tax_id() ) );
3146
+ $terms = array();
3147
+ foreach( $topic_tags as $term ) {
3148
+ $terms[] = $term->name;
3149
+ }
3150
+ $terms = !empty( $terms ) ? implode( $sep, $terms ) : '';
3151
+
3152
+ return apply_filters( 'bbp_get_topic_tags', $terms, $topic_id );
3153
  }
3154
 
3155
  /** Autoembed *****************************************************************/
3225
  <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
3226
  <link><?php self_link(); ?></link>
3227
  <description><?php //?></description>
3228
+ <pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', current_time( 'mysql' ), false ); ?></pubDate>
3229
  <generator>http://bbpress.org/?v=<?php bbp_version(); ?></generator>
3230
  <language><?php echo get_option( 'rss_language' ); ?></language>
3231
 
includes/topics/index.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Do not modify the files in this folder.
5
+ */
bbp-includes/bbp-topic-template.php → includes/topics/template-tags.php RENAMED
@@ -85,14 +85,16 @@ function bbp_has_topics( $args = '' ) {
85
  global $wp_rewrite;
86
 
87
  // What are the default allowed statuses (based on user caps)
88
- if ( bbp_get_view_all() )
89
- $default_post_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ) );
90
- else
91
- $default_post_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) );
 
92
 
93
- $default_topic_search = !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : false;
94
- $default_show_stickies = (bool) ( bbp_is_single_forum() || bbp_is_topic_archive() ) && ( false === $default_topic_search );
95
- $default_post_parent = bbp_is_single_forum() ? bbp_get_forum_id() : 'any';
 
96
 
97
  // Default argument array
98
  $default = array(
@@ -237,29 +239,42 @@ function bbp_has_topics( $args = '' ) {
237
  // If pretty permalinks are enabled, make our pagination pretty
238
  if ( $wp_rewrite->using_permalinks() ) {
239
 
240
- // Profile page
241
- if ( bbp_is_single_user() )
 
 
 
 
 
 
 
 
 
 
 
 
242
  $base = bbp_get_user_profile_url( bbp_get_displayed_user_id() );
243
 
244
  // View
245
- elseif ( bbp_is_single_view() )
246
  $base = bbp_get_view_url();
247
 
248
  // Topic tag
249
- elseif ( bbp_is_topic_tag() )
250
  $base = bbp_get_topic_tag_link();
251
 
252
  // Page or single post
253
- elseif ( is_page() || is_single() )
254
  $base = get_permalink();
255
 
256
  // Topic archive
257
- elseif ( bbp_is_topic_archive() )
258
  $base = bbp_get_topics_url();
259
 
260
  // Default
261
- else
262
  $base = get_permalink( $post_parent );
 
263
 
264
  // Use pagination base
265
  $base = trailingslashit( $base ) . user_trailingslashit( $wp_rewrite->pagination_base . '/%#%/' );
@@ -630,6 +645,52 @@ function bbp_topic_excerpt( $topic_id = 0, $length = 100 ) {
630
  return apply_filters( 'bbp_get_topic_excerpt', $excerpt, $topic_id, $length );
631
  }
632
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
633
  /**
634
  * Output pagination links of a topic within the topic loop
635
  *
@@ -683,7 +744,7 @@ function bbp_topic_pagination( $args = '' ) {
683
  $base = add_query_arg( 'paged', '%#%', get_permalink( $topic_id ) );
684
 
685
  // Get total and add 1 if topic is included in the reply loop
686
- $total = bbp_get_topic_reply_count( $topic_id );
687
 
688
  // Bump if topic is in loop
689
  if ( !bbp_show_lead_topic() )
@@ -864,8 +925,11 @@ function bbp_get_topic_revisions( $topic_id = 0 ) {
864
  * with the revision count and topic id
865
  * @return string Topic revision count
866
  */
867
- function bbp_get_topic_revision_count( $topic_id = 0 ) {
868
- return apply_filters( 'bbp_get_topic_revisions', count( bbp_get_topic_revisions( $topic_id ) ), $topic_id );
 
 
 
869
  }
870
 
871
  /**
@@ -1295,7 +1359,7 @@ function bbp_topic_author_link( $args = '' ) {
1295
  $link_class = ' class="bbp-author-' . $type . '"';
1296
 
1297
  // Add links if not anonymous
1298
- if ( empty( $anonymous ) ) {
1299
 
1300
  // Assemble the links
1301
  foreach ( $author_links as $link => $link_text ) {
@@ -1801,8 +1865,7 @@ function bbp_topic_replies_link( $topic_id = 0 ) {
1801
 
1802
  $topic = bbp_get_topic( bbp_get_topic_id( (int) $topic_id ) );
1803
  $topic_id = $topic->ID;
1804
- $replies = bbp_get_topic_reply_count( $topic_id );
1805
- $replies = sprintf( _n( '%s reply', '%s replies', $replies, 'bbpress' ), $replies );
1806
  $retval = '';
1807
 
1808
  // First link never has view=all
@@ -1839,10 +1902,11 @@ function bbp_topic_replies_link( $topic_id = 0 ) {
1839
  * @since bbPress (r2485)
1840
  *
1841
  * @param int $topic_id Optional. Topic id
 
1842
  * @uses bbp_get_topic_reply_count() To get the topic reply count
1843
  */
1844
- function bbp_topic_reply_count( $topic_id = 0 ) {
1845
- echo bbp_get_topic_reply_count( $topic_id );
1846
  }
1847
  /**
1848
  * Return total reply count of a topic
@@ -1850,17 +1914,19 @@ function bbp_topic_reply_count( $topic_id = 0 ) {
1850
  * @since bbPress (r2485)
1851
  *
1852
  * @param int $topic_id Optional. Topic id
 
1853
  * @uses bbp_get_topic_id() To get the topic id
1854
  * @uses get_post_meta() To get the topic reply count meta
1855
  * @uses apply_filters() Calls 'bbp_get_topic_reply_count' with the
1856
  * reply count and topic id
1857
  * @return int Reply count
1858
  */
1859
- function bbp_get_topic_reply_count( $topic_id = 0 ) {
1860
  $topic_id = bbp_get_topic_id( $topic_id );
1861
- $replies = get_post_meta( $topic_id, '_bbp_reply_count', true );
 
1862
 
1863
- return apply_filters( 'bbp_get_topic_reply_count', (int) $replies, $topic_id );
1864
  }
1865
 
1866
  /**
@@ -1869,10 +1935,11 @@ function bbp_topic_reply_count( $topic_id = 0 ) {
1869
  * @since bbPress (r2954)
1870
  *
1871
  * @param int $topic_id Optional. Topic id
 
1872
  * @uses bbp_get_topic_post_count() To get the topic post count
1873
  */
1874
- function bbp_topic_post_count( $topic_id = 0 ) {
1875
- echo bbp_get_topic_post_count( $topic_id );
1876
  }
1877
  /**
1878
  * Return total post count of a topic
@@ -1880,17 +1947,19 @@ function bbp_topic_post_count( $topic_id = 0 ) {
1880
  * @since bbPress (r2954)
1881
  *
1882
  * @param int $topic_id Optional. Topic id
 
1883
  * @uses bbp_get_topic_id() To get the topic id
1884
  * @uses get_post_meta() To get the topic post count meta
1885
  * @uses apply_filters() Calls 'bbp_get_topic_post_count' with the
1886
  * post count and topic id
1887
  * @return int Post count
1888
  */
1889
- function bbp_get_topic_post_count( $topic_id = 0 ) {
1890
  $topic_id = bbp_get_topic_id( $topic_id );
1891
- $replies = get_post_meta( $topic_id, '_bbp_reply_count', true );
 
1892
 
1893
- return apply_filters( 'bbp_get_topic_post_count', (int) $replies + 1, $topic_id );
1894
  }
1895
 
1896
  /**
@@ -1900,10 +1969,11 @@ function bbp_topic_post_count( $topic_id = 0 ) {
1900
  * @since bbPress (r2740)
1901
  *
1902
  * @param int $topic_id Optional. Topic id
 
1903
  * @uses bbp_get_topic_reply_count_hidden() To get the topic hidden reply count
1904
  */
1905
- function bbp_topic_reply_count_hidden( $topic_id = 0 ) {
1906
- echo bbp_get_topic_reply_count_hidden( $topic_id );
1907
  }
1908
  /**
1909
  * Return total hidden reply count of a topic (hidden includes trashed
@@ -1912,17 +1982,19 @@ function bbp_topic_reply_count_hidden( $topic_id = 0 ) {
1912
  * @since bbPress (r2740)
1913
  *
1914
  * @param int $topic_id Optional. Topic id
 
1915
  * @uses bbp_get_topic_id() To get the topic id
1916
  * @uses get_post_meta() To get the hidden reply count
1917
  * @uses apply_filters() Calls 'bbp_get_topic_reply_count_hidden' with
1918
  * the hidden reply count and topic id
1919
  * @return int Topic hidden reply count
1920
  */
1921
- function bbp_get_topic_reply_count_hidden( $topic_id = 0 ) {
1922
  $topic_id = bbp_get_topic_id( $topic_id );
1923
- $replies = get_post_meta( $topic_id, '_bbp_reply_count_hidden', true );
 
1924
 
1925
- return (int) apply_filters( 'bbp_get_topic_reply_count_hidden', (int) $replies, $topic_id );
1926
  }
1927
 
1928
  /**
@@ -1933,8 +2005,8 @@ function bbp_topic_reply_count_hidden( $topic_id = 0 ) {
1933
  * @param int $topic_id Optional. Topic id
1934
  * @uses bbp_get_topic_voice_count() To get the topic voice count
1935
  */
1936
- function bbp_topic_voice_count( $topic_id = 0 ) {
1937
- echo bbp_get_topic_voice_count( $topic_id );
1938
  }
1939
  /**
1940
  * Return total voice count of a topic
@@ -1948,11 +2020,12 @@ function bbp_topic_voice_count( $topic_id = 0 ) {
1948
  * voice count and topic id
1949
  * @return int Voice count of the topic
1950
  */
1951
- function bbp_get_topic_voice_count( $topic_id = 0 ) {
1952
  $topic_id = bbp_get_topic_id( $topic_id );
1953
- $voices = get_post_meta( $topic_id, '_bbp_voice_count', true );
 
1954
 
1955
- return apply_filters( 'bbp_get_topic_voice_count', (int) $voices, $topic_id );
1956
  }
1957
 
1958
  /**
@@ -1979,6 +2052,10 @@ function bbp_topic_tag_list( $topic_id = 0, $args = '' ) {
1979
  */
1980
  function bbp_get_topic_tag_list( $topic_id = 0, $args = '' ) {
1981
 
 
 
 
 
1982
  $defaults = array(
1983
  'before' => '<div class="bbp-topic-tags"><p>' . __( 'Tagged:', 'bbpress' ) . '&nbsp;',
1984
  'sep' => ', ',
@@ -2242,7 +2319,8 @@ function bbp_topic_edit_url( $topic_id = 0 ) {
2242
  if ( empty( $topic ) )
2243
  return;
2244
 
2245
- $topic_link = bbp_get_topic_permalink( $topic_id );
 
2246
 
2247
  // Pretty permalinks
2248
  if ( $wp_rewrite->using_permalinks() ) {
@@ -2254,6 +2332,9 @@ function bbp_topic_edit_url( $topic_id = 0 ) {
2254
  $url = add_query_arg( array( bbp_get_topic_post_type() => $topic->post_name, $bbp->edit_id => '1' ), $topic_link );
2255
  }
2256
 
 
 
 
2257
  return apply_filters( 'bbp_get_topic_edit_url', $url, $topic_id );
2258
  }
2259
 
85
  global $wp_rewrite;
86
 
87
  // What are the default allowed statuses (based on user caps)
88
+ if ( bbp_get_view_all() ) {
89
+ $post_statuses = array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() );
90
+ } else {
91
+ $post_statuses = array( bbp_get_public_status_id(), bbp_get_closed_status_id() );
92
+ }
93
 
94
+ $default_topic_search = !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : false;
95
+ $default_show_stickies = (bool) ( bbp_is_single_forum() || bbp_is_topic_archive() ) && ( false === $default_topic_search );
96
+ $default_post_parent = bbp_is_single_forum() ? bbp_get_forum_id() : 'any';
97
+ $default_post_status = join( ',', $post_statuses );
98
 
99
  // Default argument array
100
  $default = array(
239
  // If pretty permalinks are enabled, make our pagination pretty
240
  if ( $wp_rewrite->using_permalinks() ) {
241
 
242
+ // User's topics
243
+ if ( bbp_is_single_user_topics() ) {
244
+ $base = bbp_get_user_topics_created_url( bbp_get_displayed_user_id() );
245
+
246
+ // User's favorites
247
+ } elseif ( bbp_is_favorites() ) {
248
+ $base = bbp_get_favorites_permalink( bbp_get_displayed_user_id() );
249
+
250
+ // User's subscriptions
251
+ } elseif ( bbp_is_subscriptions() ) {
252
+ $base = bbp_get_subscriptions_permalink( bbp_get_displayed_user_id() );
253
+
254
+ // Root profile page
255
+ } elseif ( bbp_is_single_user() ) {
256
  $base = bbp_get_user_profile_url( bbp_get_displayed_user_id() );
257
 
258
  // View
259
+ } elseif ( bbp_is_single_view() ) {
260
  $base = bbp_get_view_url();
261
 
262
  // Topic tag
263
+ } elseif ( bbp_is_topic_tag() ) {
264
  $base = bbp_get_topic_tag_link();
265
 
266
  // Page or single post
267
+ } elseif ( is_page() || is_single() ) {
268
  $base = get_permalink();
269
 
270
  // Topic archive
271
+ } elseif ( bbp_is_topic_archive() ) {
272
  $base = bbp_get_topics_url();
273
 
274
  // Default
275
+ } else {
276
  $base = get_permalink( $post_parent );
277
+ }
278
 
279
  // Use pagination base
280
  $base = trailingslashit( $base ) . user_trailingslashit( $wp_rewrite->pagination_base . '/%#%/' );
645
  return apply_filters( 'bbp_get_topic_excerpt', $excerpt, $topic_id, $length );
646
  }
647
 
648
+ /**
649
+ * Output the post date and time of a topic
650
+ *
651
+ * @since bbPress (r4155)
652
+ *
653
+ * @param int $topic_id Optional. Topic id.
654
+ * @param bool $humanize Optional. Humanize output using time_since
655
+ * @param bool $gmt Optional. Use GMT
656
+ * @uses bbp_get_topic_post_date() to get the output
657
+ */
658
+ function bbp_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) {
659
+ echo bbp_get_topic_post_date( $topic_id, $humanize, $gmt );
660
+ }
661
+ /**
662
+ * Return the post date and time of a topic
663
+ *
664
+ * @since bbPress (r4155)
665
+ *
666
+ * @param int $topic_id Optional. Topic id.
667
+ * @param bool $humanize Optional. Humanize output using time_since
668
+ * @param bool $gmt Optional. Use GMT
669
+ * @uses bbp_get_topic_id() To get the topic id
670
+ * @uses get_post_time() to get the topic post time
671
+ * @uses bbp_time_since() to maybe humanize the topic post time
672
+ * @return string
673
+ */
674
+ function bbp_get_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) {
675
+ $topic_id = bbp_get_topic_id( $topic_id );
676
+
677
+ // 4 days, 4 hours ago
678
+ if ( !empty( $humanize ) ) {
679
+ $gmt = !empty( $gmt ) ? 'G' : 'U';
680
+ $date = get_post_time( $gmt, $topic_id );
681
+ $time = false; // For filter below
682
+ $result = bbp_time_since( $date );
683
+
684
+ // August 4, 2012 at 2:37 pm
685
+ } else {
686
+ $date = get_post_time( get_option( 'date_format' ), $gmt, $topic_id );
687
+ $time = get_post_time( get_option( 'time_format' ), $gmt, $topic_id );
688
+ $result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );
689
+ }
690
+
691
+ return apply_filters( 'bbp_get_topic_post_date', $result, $topic_id, $humanize, $gmt, $date, $time );
692
+ }
693
+
694
  /**
695
  * Output pagination links of a topic within the topic loop
696
  *
744
  $base = add_query_arg( 'paged', '%#%', get_permalink( $topic_id ) );
745
 
746
  // Get total and add 1 if topic is included in the reply loop
747
+ $total = bbp_get_topic_reply_count( $topic_id, true );
748
 
749
  // Bump if topic is in loop
750
  if ( !bbp_show_lead_topic() )
925
  * with the revision count and topic id
926
  * @return string Topic revision count
927
  */
928
+ function bbp_get_topic_revision_count( $topic_id = 0, $integer = false ) {
929
+ $count = (int) count( bbp_get_topic_revisions( $topic_id ) );
930
+ $filter = ( true === $integer ) ? 'bbp_get_topic_revision_count_int' : 'bbp_get_topic_revision_count';
931
+
932
+ return apply_filters( $filter, $count, $topic_id );
933
  }
934
 
935
  /**
1359
  $link_class = ' class="bbp-author-' . $type . '"';
1360
 
1361
  // Add links if not anonymous
1362
+ if ( empty( $anonymous ) && bbp_user_has_profile( bbp_get_topic_author_id( $topic_id ) ) ) {
1363
 
1364
  // Assemble the links
1365
  foreach ( $author_links as $link => $link_text ) {
1865
 
1866
  $topic = bbp_get_topic( bbp_get_topic_id( (int) $topic_id ) );
1867
  $topic_id = $topic->ID;
1868
+ $replies = sprintf( _n( '%s reply', '%s replies', bbp_get_topic_reply_count( $topic_id, true ), 'bbpress' ), bbp_get_topic_reply_count( $topic_id ) );
 
1869
  $retval = '';
1870
 
1871
  // First link never has view=all
1902
  * @since bbPress (r2485)
1903
  *
1904
  * @param int $topic_id Optional. Topic id
1905
+ * @param boolean $integer Optional. Whether or not to format the result
1906
  * @uses bbp_get_topic_reply_count() To get the topic reply count
1907
  */
1908
+ function bbp_topic_reply_count( $topic_id = 0, $integer = false ) {
1909
+ echo bbp_get_topic_reply_count( $topic_id, $integer );
1910
  }
1911
  /**
1912
  * Return total reply count of a topic
1914
  * @since bbPress (r2485)
1915
  *
1916
  * @param int $topic_id Optional. Topic id
1917
+ * @param boolean $integer Optional. Whether or not to format the result
1918
  * @uses bbp_get_topic_id() To get the topic id
1919
  * @uses get_post_meta() To get the topic reply count meta
1920
  * @uses apply_filters() Calls 'bbp_get_topic_reply_count' with the
1921
  * reply count and topic id
1922
  * @return int Reply count
1923
  */
1924
+ function bbp_get_topic_reply_count( $topic_id = 0, $integer = false ) {
1925
  $topic_id = bbp_get_topic_id( $topic_id );
1926
+ $replies = (int) get_post_meta( $topic_id, '_bbp_reply_count', true );
1927
+ $filter = ( true === $integer ) ? 'bbp_get_topic_reply_count_int' : 'bbp_get_topic_reply_count';
1928
 
1929
+ return apply_filters( $filter, $replies, $topic_id );
1930
  }
1931
 
1932
  /**
1935
  * @since bbPress (r2954)
1936
  *
1937
  * @param int $topic_id Optional. Topic id
1938
+ * @param boolean $integer Optional. Whether or not to format the result
1939
  * @uses bbp_get_topic_post_count() To get the topic post count
1940
  */
1941
+ function bbp_topic_post_count( $topic_id = 0, $integer = false ) {
1942
+ echo bbp_get_topic_post_count( $topic_id, $integer );
1943
  }
1944
  /**
1945
  * Return total post count of a topic
1947
  * @since bbPress (r2954)
1948
  *
1949
  * @param int $topic_id Optional. Topic id
1950
+ * @param boolean $integer Optional. Whether or not to format the result
1951
  * @uses bbp_get_topic_id() To get the topic id
1952
  * @uses get_post_meta() To get the topic post count meta
1953
  * @uses apply_filters() Calls 'bbp_get_topic_post_count' with the
1954
  * post count and topic id
1955
  * @return int Post count
1956
  */
1957
+ function bbp_get_topic_post_count( $topic_id = 0, $integer = false ) {
1958
  $topic_id = bbp_get_topic_id( $topic_id );
1959
+ $replies = (int) get_post_meta( $topic_id, '_bbp_reply_count', true ) + 1;
1960
+ $filter = ( true === $integer ) ? 'bbp_get_topic_post_count_int' : 'bbp_get_topic_post_count';
1961
 
1962
+ return apply_filters( $filter, $replies, $topic_id );
1963
  }
1964
 
1965
  /**
1969
  * @since bbPress (r2740)
1970
  *
1971
  * @param int $topic_id Optional. Topic id
1972
+ * @param boolean $integer Optional. Whether or not to format the result
1973
  * @uses bbp_get_topic_reply_count_hidden() To get the topic hidden reply count
1974
  */
1975
+ function bbp_topic_reply_count_hidden( $topic_id = 0, $integer = false ) {
1976
+ echo bbp_get_topic_reply_count_hidden( $topic_id, $integer );
1977
  }
1978
  /**
1979
  * Return total hidden reply count of a topic (hidden includes trashed
1982
  * @since bbPress (r2740)
1983
  *
1984
  * @param int $topic_id Optional. Topic id
1985
+ * @param boolean $integer Optional. Whether or not to format the result
1986
  * @uses bbp_get_topic_id() To get the topic id
1987
  * @uses get_post_meta() To get the hidden reply count
1988
  * @uses apply_filters() Calls 'bbp_get_topic_reply_count_hidden' with
1989
  * the hidden reply count and topic id
1990
  * @return int Topic hidden reply count
1991
  */
1992
+ function bbp_get_topic_reply_count_hidden( $topic_id = 0, $integer = false ) {
1993
  $topic_id = bbp_get_topic_id( $topic_id );
1994
+ $replies = (int) get_post_meta( $topic_id, '_bbp_reply_count_hidden', true );
1995
+ $filter = ( true === $integer ) ? 'bbp_get_topic_reply_count_hidden_int' : 'bbp_get_topic_reply_count_hidden';
1996
 
1997
+ return apply_filters( $filter, $replies, $topic_id );
1998
  }
1999
 
2000
  /**
2005
  * @param int $topic_id Optional. Topic id
2006
  * @uses bbp_get_topic_voice_count() To get the topic voice count
2007
  */
2008
+ function bbp_topic_voice_count( $topic_id = 0, $integer = false ) {
2009
+ echo bbp_get_topic_voice_count( $topic_id, $integer );
2010
  }
2011
  /**
2012
  * Return total voice count of a topic
2020
  * voice count and topic id
2021
  * @return int Voice count of the topic
2022
  */
2023
+ function bbp_get_topic_voice_count( $topic_id = 0, $integer = false ) {
2024
  $topic_id = bbp_get_topic_id( $topic_id );
2025
+ $voices = (int) get_post_meta( $topic_id, '_bbp_voice_count', true );
2026
+ $filter = ( true === $integer ) ? 'bbp_get_topic_voice_count_int' : 'bbp_get_topic_voice_count';
2027
 
2028
+ return apply_filters( $filter, $voices, $topic_id );
2029
  }
2030
 
2031
  /**
2052
  */
2053
  function bbp_get_topic_tag_list( $topic_id = 0, $args = '' ) {
2054
 
2055
+ // Bail if topic-tags are off
2056
+ if ( ! bbp_allow_topic_tags() )
2057
+ return;
2058
+
2059
  $defaults = array(
2060
  'before' => '<div class="bbp-topic-tags"><p>' . __( 'Tagged:', 'bbpress' ) . '&nbsp;',
2061
  'sep' => ', ',
2319
  if ( empty( $topic ) )
2320
  return;
2321
 
2322
+ // Remove view=all link from edit
2323
+ $topic_link = bbp_remove_view_all( bbp_get_topic_permalink( $topic_id ) );
2324
 
2325
  // Pretty permalinks
2326
  if ( $wp_rewrite->using_permalinks() ) {
2332
  $url = add_query_arg( array( bbp_get_topic_post_type() => $topic->post_name, $bbp->edit_id => '1' ), $topic_link );
2333
  }
2334
 
2335
+ // Maybe add view=all
2336
+ $url = bbp_add_view_all( $url );
2337
+
2338
  return apply_filters( 'bbp_get_topic_edit_url', $url, $topic_id );
2339
  }
2340
 
includes/users/capabilities.php ADDED
@@ -0,0 +1,613 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * bbPress User Capabilites
5
+ *
6
+ * Used to map user capabilities to WordPress's existing capabilities.
7
+ *
8
+ * @package bbPress
9
+ * @subpackage Capabilities
10
+ */
11
+
12
+ /**
13
+ * Maps primary capabilities
14
+ *
15
+ * @since bbPress (r4242)
16
+ *
17
+ * @param array $caps Capabilities for meta capability
18
+ * @param string $cap Capability name
19
+ * @param int $user_id User id
20
+ * @param mixed $args Arguments
21
+ * @uses apply_filters() Filter mapped results
22
+ * @return array Actual capabilities for meta capability
23
+ */
24
+ function bbp_map_primary_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
25
+
26
+ // What capability is being checked?
27
+ switch ( $cap ) {
28
+ case 'spectate' :
29
+ case 'participate' :
30
+ case 'moderate' :
31
+
32
+ // Do not allow inactive users
33
+ if ( bbp_is_user_inactive( $user_id ) ) {
34
+ $caps = array( 'do_not_allow' );
35
+
36
+ // Moderators are always participants
37
+ } else {
38
+ $caps = array( $cap );
39
+ }
40
+
41
+ break;
42
+ }
43
+
44
+ return apply_filters( 'bbp_map_primary_meta_caps', $caps, $cap, $user_id, $args );
45
+ }
46
+
47
+ /**
48
+ * Return a user's main role
49
+ *
50
+ * @since bbPress (r3860)
51
+ *
52
+ * @param int $user_id
53
+ * @uses bbp_get_user_id() To get the user id
54
+ * @uses get_userdata() To get the user data
55
+ * @uses apply_filters() Calls 'bbp_set_user_role' with the role and user id
56
+ * @return string
57
+ */
58
+ function bbp_set_user_role( $user_id = 0, $new_role = '' ) {
59
+
60
+ // Validate user id
61
+ $user_id = bbp_get_user_id( $user_id, false, false );
62
+ $user = get_userdata( $user_id );
63
+
64
+ // User exists
65
+ if ( !empty( $user ) ) {
66
+
67
+ // Get users forum role
68
+ $role = bbp_get_user_role( $user_id );
69
+
70
+ // User already has this role so no new role is set
71
+ if ( $new_role == $role ) {
72
+ $new_role = false;
73
+
74
+ // Users role is different than the new role
75
+ } else {
76
+
77
+ // Remove the old role
78
+ if ( ! empty( $role ) ) {
79
+ $user->remove_role( $role );
80
+ }
81
+
82
+ // Add the new role
83
+ if ( !empty( $new_role ) ) {
84
+ $user->add_role( $new_role );
85
+ }
86
+ }
87
+
88
+ // User does don exist so return false
89
+ } else {
90
+ $new_role = false;
91
+ }
92
+
93
+ return apply_filters( 'bbp_set_user_role', $new_role, $user_id, $user );
94
+ }
95
+
96
+ /**
97
+ * Return a user's main role
98
+ *
99
+ * @since bbPress (r3860)
100
+ *
101
+ * @param int $user_id
102
+ * @uses bbp_get_user_id() To get the user id
103
+ * @uses get_userdata() To get the user data
104
+ * @uses apply_filters() Calls 'bbp_get_user_role' with the role and user id
105
+ * @return string
106
+ */
107
+ function bbp_get_user_role( $user_id = 0 ) {
108
+
109
+ // Validate user id
110
+ $user_id = bbp_get_user_id( $user_id, false, false );
111
+ $user = get_userdata( $user_id );
112
+ $role = false;
113
+
114
+ // User has roles so lets
115
+ if ( ! empty( $user->roles ) ) {
116
+ $roles = array_intersect( array_values( $user->roles ), array_keys( bbp_get_dynamic_roles() ) );
117
+
118
+ // If there's a role in the array, use the first one
119
+ if ( !empty( $roles ) ) {
120
+ $role = array_shift( array_values( $roles ) );
121
+ }
122
+ }
123
+
124
+ return apply_filters( 'bbp_get_user_role', $role, $user_id, $user );
125
+ }
126
+
127
+ /**
128
+ * Helper function hooked to 'bbp_edit_user_profile_update' action to save or
129
+ * update user roles and capabilities.
130
+ *
131
+ * @since bbPress (r4235)
132
+ *
133
+ * @param int $user_id
134
+ * @uses bbp_reset_user_caps() to reset caps
135
+ * @usse bbp_save_user_caps() to save caps
136
+ */
137
+ function bbp_profile_update_role( $user_id = 0 ) {
138
+
139
+ // Bail if no user ID was passed
140
+ if ( empty( $user_id ) )
141
+ return;
142
+
143
+ // Bail if no role
144
+ if ( ! isset( $_POST['bbp-forums-role'] ) )
145
+ return;
146
+
147
+ // Fromus role we want the user to have
148
+ $new_role = sanitize_text_field( $_POST['bbp-forums-role'] );
149
+ $forums_role = bbp_get_user_role( $user_id );
150
+
151
+ // Set the new forums role
152
+ if ( $new_role != $forums_role ) {
153
+ bbp_set_user_role( $user_id, $new_role );
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Add the default role to the current user if needed
159
+ *
160
+ * This function will bail if the forum is not global in a multisite
161
+ * installation of WordPress, or if the user is marked as spam or deleted.
162
+ *
163
+ * @since bbPress (r3380)
164
+ *
165
+ * @uses is_user_logged_in() To bail if user is not logged in
166
+ * @uses bbp_get_user_role() To bail if user already has a role
167
+ * @uses bbp_is_user_inactive() To bail if user is inactive
168
+ * @uses bbp_allow_global_access() To know whether to save role to database
169
+ * @uses bbp_get_user_role_map() To get the WP to BBP role map array
170
+ * @uses bbp_get_default_role() To get the site's default forums role
171
+ * @uses get_option()
172
+ *
173
+ * @return If not multisite, not global, or user is deleted/spammed
174
+ */
175
+ function bbp_set_current_user_default_role() {
176
+
177
+ /** Sanity ****************************************************************/
178
+
179
+ // Bail if deactivating bbPress
180
+ if ( bbp_is_deactivation() )
181
+ return;
182
+
183
+ // Catch all, to prevent premature user initialization
184
+ if ( ! did_action( 'set_current_user' ) )
185
+ return;
186
+
187
+ // Bail if not logged in or already a member of this site
188
+ if ( ! is_user_logged_in() )
189
+ return;
190
+
191
+ // Get the current user ID
192
+ $user_id = bbp_get_current_user_id();
193
+
194
+ // Bail if user already has a forums role
195
+ if ( bbp_get_user_role( $user_id ) )
196
+ return;
197
+
198
+ // Bail if user is marked as spam or is deleted
199
+ if ( bbp_is_user_inactive( $user_id ) )
200
+ return;
201
+
202
+ /** Ready *****************************************************************/
203
+
204
+ // Load up bbPress once
205
+ $bbp = bbpress();
206
+
207
+ // Get whether or not to add a role to the user account
208
+ $add_to_site = bbp_allow_global_access();
209
+
210
+ // Get the current user's WordPress role. Set to empty string if none found.
211
+ $user_role = isset( $bbp->current_user->roles ) ? array_shift( $bbp->current_user->roles ) : '';
212
+
213
+ // Loop through the role map, and grant the proper bbPress role
214
+ foreach ( (array) bbp_get_user_role_map() as $wp_role => $bbp_role ) {
215
+
216
+ // User's role matches a possible WordPress role (including none at all)
217
+ if ( $user_role == $wp_role ) {
218
+
219
+ // Add role to user account, making them a user of this site
220
+ if ( true == $add_to_site ) {
221
+
222
+ // Override map to prevent accidental "Visitor"
223
+ if ( empty( $wp_role ) ) {
224
+ $bbp_role = bbp_get_default_role();
225
+ }
226
+
227
+ // Add the mapped forums role to the user's account
228
+ $bbp->current_user->add_role( $bbp_role );
229
+
230
+ // @todo Add the default site role too?
231
+ //$bbp->current_user->add_role( get_option( 'default_role' ) );
232
+
233
+ // Dynamically assign capabilities, making them "anonymous"
234
+ } else {
235
+ $bbp->current_user->caps[$bbp_role] = true;
236
+ $bbp->current_user->get_role_caps();
237
+ }
238
+
239
+ break;
240
+ }
241
+ }
242
+ }
243
+
244
+ /**
245
+ * Return a map of WordPress roles to bbPress roles. Used to automatically grant
246
+ * appropriate bbPress roles to WordPress users that wouldn't already have a
247
+ * role in the forums. Also guarantees WordPress admins get the Keymaster role.
248
+ *
249
+ * @since bbPress (r4334)
250
+ *
251
+ * @return array Filtered array of WordPress roles to bbPress roles
252
+ */
253
+ function bbp_get_user_role_map() {
254
+
255
+ // Get the default role once here
256
+ $default_role = bbp_get_default_role();
257
+
258
+ // Return filtered results, forcing admins to keymasters.
259
+ return (array) apply_filters( 'bbp_get_user_role_map', array (
260
+ 'administrator' => bbp_get_keymaster_role(),
261
+ 'editor' => $default_role,
262
+ 'author' => $default_role,
263
+ 'contributor' => $default_role,
264
+ 'subscriber' => $default_role,
265
+ '' => bbp_get_visitor_role()
266
+ ) );
267
+ }
268
+
269
+ /** User Status ***************************************************************/
270
+
271
+ /**
272
+ * Checks if the user has been marked as a spammer.
273
+ *
274
+ * @since bbPress (r3355)
275
+ *
276
+ * @param int $user_id int The ID for the user.
277
+ * @return bool True if spammer, False if not.
278
+ */
279
+ function bbp_is_user_spammer( $user_id = 0 ) {
280
+
281
+ // Default to current user
282
+ if ( empty( $user_id ) && is_user_logged_in() )
283
+ $user_id = bbp_get_current_user_id();
284
+
285
+ // No user to check
286
+ if ( empty( $user_id ) )
287
+ return false;
288
+
289
+ // Assume user is not spam
290
+ $is_spammer = false;
291
+
292
+ // Get user data
293
+ $user = get_userdata( $user_id );
294
+
295
+ // No user found
296
+ if ( empty( $user ) ) {
297
+ $is_spammer = false;
298
+
299
+ // Check if spam
300
+ } elseif ( !empty( $user->spam ) ) {
301
+ $is_spammer = true;
302
+ }
303
+
304
+ return (bool) apply_filters( 'bp_core_is_user_spammer', $is_spammer );
305
+ }
306
+
307
+ /**
308
+ * Mark a users topics and replies as spam when the user is marked as spam
309
+ *
310
+ * @since bbPress (r3405)
311
+ *
312
+ * @global WPDB $wpdb
313
+ * @param int $user_id Optional. User ID to spam. Defaults to displayed user.
314
+
315
+ * @uses bbp_is_single_user()
316
+ * @uses bbp_is_user_home()
317
+ * @uses bbp_get_displayed_user_field()
318
+ * @uses is_super_admin()
319
+ * @uses get_blogs_of_user()
320
+ * @uses get_current_blog_id()
321
+ * @uses bbp_get_topic_post_type()
322
+ * @uses bbp_get_reply_post_type()
323
+ * @uses switch_to_blog()
324
+ * @uses get_post_type()
325
+ * @uses bbp_spam_topic()
326
+ * @uses bbp_spam_reply()
327
+ * @uses restore_current_blog()
328
+ *
329
+ * @return If no user ID passed
330
+ */
331
+ function bbp_make_spam_user( $user_id = 0 ) {
332
+
333
+ // Use displayed user if it's not yourself
334
+ if ( empty( $user_id ) && bbp_is_single_user() && !bbp_is_user_home() )
335
+ $user_id = bbp_get_displayed_user_id();
336
+
337
+ // Bail if no user ID
338
+ if ( empty( $user_id ) )
339
+ return;
340
+
341
+ // Bail if user ID is super admin
342
+ if ( is_super_admin( $user_id ) )
343
+ return;
344
+
345
+ // Arm the torpedos
346
+ global $wpdb;
347
+
348
+ // Get the blog IDs of the user to mark as spam
349
+ $blogs = get_blogs_of_user( $user_id, true );
350
+
351
+ // If user has no blogs, they are a guest on this site
352
+ if ( empty( $blogs ) )
353
+ $blogs[$wpdb->blogid] = array();
354
+
355
+ // Make array of post types to mark as spam
356
+ $post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
357
+ $post_types = "'" . implode( "', '", $post_types ) . "'";
358
+ $status = bbp_get_public_status_id();
359
+
360
+ // Loop through blogs and remove their posts
361
+ foreach ( (array) array_keys( $blogs ) as $blog_id ) {
362
+
363
+ // Switch to the blog ID
364
+ switch_to_blog( $blog_id );
365
+
366
+ // Get topics and replies
367
+ $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$status}' AND post_type IN ({$post_types})" );
368
+
369
+ // Loop through posts and spam them
370
+ if ( !empty( $posts ) ) {
371
+ foreach ( $posts as $post_id ) {
372
+
373
+ // The routines for topics ang replies are different, so use the
374
+ // correct one based on the post type
375
+ switch ( get_post_type( $post_id ) ) {
376
+
377
+ case bbp_get_topic_post_type() :
378
+ bbp_spam_topic( $post_id );
379
+ break;
380
+
381
+ case bbp_get_reply_post_type() :
382
+ bbp_spam_reply( $post_id );
383
+ break;
384
+ }
385
+ }
386
+ }
387
+
388
+ // Switch back to current blog
389
+ restore_current_blog();
390
+ }
391
+ }
392
+
393
+ /**
394
+ * Mark a users topics and replies as spam when the user is marked as spam
395
+ *
396
+ * @since bbPress (r3405)
397
+ *
398
+ * @global WPDB $wpdb
399
+ * @param int $user_id Optional. User ID to unspam. Defaults to displayed user.
400
+ *
401
+ * @uses bbp_is_single_user()
402
+ * @uses bbp_is_user_home()
403
+ * @uses bbp_get_displayed_user_field()
404
+ * @uses is_super_admin()
405
+ * @uses get_blogs_of_user()
406
+ * @uses bbp_get_topic_post_type()
407
+ * @uses bbp_get_reply_post_type()
408
+ * @uses switch_to_blog()
409
+ * @uses get_post_type()
410
+ * @uses bbp_unspam_topic()
411
+ * @uses bbp_unspam_reply()
412
+ * @uses restore_current_blog()
413
+ *
414
+ * @return If no user ID passed
415
+ */
416
+ function bbp_make_ham_user( $user_id = 0 ) {
417
+
418
+ // Use displayed user if it's not yourself
419
+ if ( empty( $user_id ) && bbp_is_single_user() && !bbp_is_user_home() )
420
+ $user_id = bbp_get_displayed_user_field();
421
+
422
+ // Bail if no user ID
423
+ if ( empty( $user_id ) )
424
+ return;
425
+
426
+ // Bail if user ID is super admin
427
+ if ( is_super_admin( $user_id ) )
428
+ return;
429
+
430
+ // Arm the torpedos
431
+ global $wpdb;
432
+
433
+ // Get the blog IDs of the user to mark as spam
434
+ $blogs = get_blogs_of_user( $user_id, true );
435
+
436
+ // If user has no blogs, they are a guest on this site
437
+ if ( empty( $blogs ) )
438
+ $blogs[$wpdb->blogid] = array();
439
+
440
+ // Make array of post types to mark as spam
441
+ $post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
442
+ $post_types = "'" . implode( "', '", $post_types ) . "'";
443
+ $status = bbp_get_spam_status_id();
444
+
445
+ // Loop through blogs and remove their posts
446
+ foreach ( (array) array_keys( $blogs ) as $blog_id ) {
447
+
448
+ // Switch to the blog ID
449
+ switch_to_blog( $blog_id );
450
+
451
+ // Get topics and replies
452
+ $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$status}' AND post_type IN ({$post_types})" );
453
+
454
+ // Loop through posts and spam them
455
+ if ( !empty( $posts ) ) {
456
+ foreach ( $posts as $post_id ) {
457
+
458
+ // The routines for topics ang replies are different, so use the
459
+ // correct one based on the post type
460
+ switch ( get_post_type( $post_id ) ) {
461
+
462
+ case bbp_get_topic_post_type() :
463
+ bbp_unspam_topic( $post_id );
464
+ break;
465
+
466
+ case bbp_get_reply_post_type() :
467
+ bbp_unspam_reply( $post_id );
468
+ break;
469
+ }
470
+ }
471
+ }
472
+
473
+ // Switch back to current blog
474
+ restore_current_blog();
475
+ }
476
+ }
477
+
478
+ /**
479
+ * Checks if the user has been marked as deleted.
480
+ *
481
+ * @since bbPress (r3355)
482
+ *
483
+ * @param int $user_id int The ID for the user.
484
+ * @return bool True if deleted, False if not.
485
+ */
486
+ function bbp_is_user_deleted( $user_id = 0 ) {
487
+
488
+ // Default to current user
489
+ if ( empty( $user_id ) && is_user_logged_in() )
490
+ $user_id = bbp_get_current_user_id();
491
+
492
+ // No user to check
493
+ if ( empty( $user_id ) )
494
+ return false;
495
+
496
+ // Assume user is not deleted
497
+ $is_deleted = false;
498
+
499
+ // Get user data
500
+ $user = get_userdata( $user_id );
501
+
502
+ // No user found
503
+ if ( empty( $user ) ) {
504
+ $is_deleted = true;
505
+
506
+ // Check if deleted
507
+ } elseif ( !empty( $user->deleted ) ) {
508
+ $is_deleted = true;
509
+ }
510
+
511
+ return (bool) apply_filters( 'bp_core_is_user_deleted', $is_deleted );
512
+ }
513
+
514
+ /**
515
+ * Checks if user is active
516
+ *
517
+ * @since bbPress (r3502)
518
+ *
519
+ * @uses is_user_logged_in() To check if user is logged in
520
+ * @uses bbp_get_displayed_user_id() To get current user ID
521
+ * @uses bbp_is_user_spammer() To check if user is spammer
522
+ * @uses bbp_is_user_deleted() To check if user is deleted
523
+ *
524
+ * @param int $user_id The user ID to check
525
+ * @return bool True if public, false if not
526
+ */
527
+ function bbp_is_user_active( $user_id = 0 ) {
528
+
529
+ // Default to current user
530
+ if ( empty( $user_id ) && is_user_logged_in() )
531
+ $user_id = bbp_get_current_user_id();
532
+
533
+ // No user to check
534
+ if ( empty( $user_id ) )
535
+ return false;
536
+
537
+ // Check spam
538
+ if ( bbp_is_user_spammer( $user_id ) )
539
+ return false;
540
+
541
+ // Check deleted
542
+ if ( bbp_is_user_deleted( $user_id ) )
543
+ return false;
544
+
545
+ // Assume true if not spam or deleted
546
+ return true;
547
+ }
548
+
549
+ /**
550
+ * Checks if user is not active.
551
+ *
552
+ * @since bbPress (r3502)
553
+ *
554
+ * @uses is_user_logged_in() To check if user is logged in
555
+ * @uses bbp_get_displayed_user_id() To get current user ID
556
+ * @uses bbp_is_user_active() To check if user is active
557
+ *
558
+ * @param int $user_id The user ID to check. Defaults to current user ID
559
+ * @return bool True if inactive, false if active
560
+ */
561
+ function bbp_is_user_inactive( $user_id = 0 ) {
562
+
563
+ // Default to current user
564
+ if ( empty( $user_id ) && is_user_logged_in() )
565
+ $user_id = bbp_get_current_user_id();
566
+
567
+ // No user to check
568
+ if ( empty( $user_id ) )
569
+ return false;
570
+
571
+ // Return the inverse of active
572
+ return !bbp_is_user_active( $user_id );
573
+ }
574
+
575
+ /**
576
+ * Does a user have a profile for the current site
577
+ *
578
+ * @since bbPress (r4362)
579
+ *
580
+ * @param int $user_id User ID to check
581
+ * @param int $blog_id Blog ID to check
582
+ *
583
+ * @uses bbp_get_user_id() To verify the user ID
584
+ * @uses get_userdata() To get the user's data
585
+ * @uses is_super_admin() To determine if user can see inactive users
586
+ * @uses bbp_is_user_inactive() To check if user is spammer or deleted
587
+ * @uses apply_filters() To allow override of this functions result
588
+ *
589
+ * @return boolean Whether or not the user has a profile on this blog_id
590
+ */
591
+ function bbp_user_has_profile( $user_id = 0 ) {
592
+
593
+ // Assume every user has a profile
594
+ $retval = true;
595
+
596
+ // Validate user ID, default to displayed or current user
597
+ $user_id = bbp_get_user_id( $user_id, true, true );
598
+
599
+ // Try to get this user's data
600
+ $user = get_userdata( $user_id );
601
+
602
+ // No user found, return false
603
+ if ( empty( $user ) ) {
604
+ $retval = false;
605
+
606
+ // User is inactive, and current user is not a super admin
607
+ } elseif ( ! is_super_admin() && bbp_is_user_inactive( $user->ID ) ) {
608
+ $retval = false;
609
+ }
610
+
611
+ // Filter and return
612
+ return (bool) apply_filters( 'bbp_show_user_profile', $retval, $user_id );
613
+ }
bbp-includes/bbp-user-functions.php → includes/users/functions.php RENAMED
@@ -152,12 +152,7 @@ function bbp_current_author_ip() {
152
  * @return string
153
  */
154
  function bbp_current_author_ua() {
155
-
156
- // Sanity check the user agent
157
- if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) )
158
- $retval = substr( $_SERVER['HTTP_USER_AGENT'], 0, 254 );
159
- else
160
- $retval = '';
161
 
162
  return apply_filters( 'bbp_current_author_ua', $retval );
163
  }
@@ -884,8 +879,6 @@ function bbp_edit_user_handler() {
884
  // Get the displayed user ID
885
  $user_id = bbp_get_displayed_user_id();
886
 
887
- global $wpdb, $user_login, $super_admins;
888
-
889
  // Execute confirmed email change. See send_confirmation_on_profile_email().
890
  if ( is_multisite() && bbp_is_user_home_edit() && isset( $_GET['newuseremail'] ) ) {
891
 
@@ -896,22 +889,24 @@ function bbp_edit_user_handler() {
896
  $user->ID = $user_id;
897
  $user->user_email = esc_html( trim( $new_email['newemail'] ) );
898
 
899
- if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", bbp_get_displayed_user_field( 'user_login' ) ) ) )
 
 
900
  $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $user->user_email, bbp_get_displayed_user_field( 'user_login' ) ) );
 
901
 
902
  wp_update_user( get_object_vars( $user ) );
903
  delete_option( $user_id . '_new_email' );
904
 
905
  wp_safe_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $user_id ) ) );
906
- exit;
907
  }
908
 
 
909
  } elseif ( is_multisite() && bbp_is_user_home_edit() && !empty( $_GET['dismiss'] ) && ( $user_id . '_new_email' == $_GET['dismiss'] ) ) {
910
-
911
  delete_option( $user_id . '_new_email' );
912
  wp_safe_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $user_id ) ) );
913
- exit;
914
-
915
  }
916
 
917
  // Nonce check
@@ -930,42 +925,8 @@ function bbp_edit_user_handler() {
930
  $edit_action = bbp_is_user_home_edit() ? 'personal_options_update' : 'edit_user_profile_update';
931
  do_action( $edit_action, $user_id );
932
 
933
- // Multisite handles the trouble for us ;)
934
- if ( !is_multisite() ) {
935
- $edit_user = edit_user( $user_id );
936
-
937
- // Single site means we need to do some manual labor
938
- } else {
939
- $user = get_userdata( $user_id );
940
-
941
- // Update the email address in signups, if present.
942
- if ( $user->user_login && isset( $_POST['email'] ) && is_email( $_POST['email'] ) && $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $user->user_login ) ) ) {
943
- $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $_POST['email'], $user_login ) );
944
- }
945
-
946
- // WPMU must delete the user from the current blog if WP added him after editing.
947
- $delete_role = false;
948
- $blog_prefix = $wpdb->get_blog_prefix();
949
-
950
- if ( $user_id != $user_id ) {
951
- $cap = $wpdb->get_var( "SELECT meta_value FROM {$wpdb->usermeta} WHERE user_id = '{$user_id}' AND meta_key = '{$blog_prefix}capabilities' AND meta_value = 'a:0:{}'" );
952
- if ( !is_network_admin() && null == $cap && $_POST['role'] == '' ) {
953
- $_POST['role'] = 'contributor';
954
- $delete_role = true;
955
- }
956
- }
957
-
958
- $edit_user = edit_user( $user_id );
959
-
960
- // stops users being added to current blog when they are edited
961
- if ( true === $delete_role ) {
962
- delete_user_meta( $user_id, $blog_prefix . 'capabilities' );
963
- }
964
-
965
- if ( is_multisite() && is_network_admin() & !bbp_is_user_home_edit() && current_user_can( 'manage_network_options' ) && !isset( $super_admins ) && empty( $_POST['super_admin'] ) == is_super_admin( $user_id ) ) {
966
- empty( $_POST['super_admin'] ) ? revoke_super_admin( $user_id ) : grant_super_admin( $user_id );
967
- }
968
- }
969
 
970
  // Error(s) editng the user, so copy them into the global
971
  if ( is_wp_error( $edit_user ) ) {
@@ -973,6 +934,12 @@ function bbp_edit_user_handler() {
973
 
974
  // Successful edit to redirect
975
  } elseif ( is_integer( $edit_user ) ) {
 
 
 
 
 
 
976
  $redirect = add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $edit_user ) );
977
 
978
  wp_safe_redirect( $redirect );
@@ -980,7 +947,27 @@ function bbp_edit_user_handler() {
980
  }
981
  }
982
 
983
- /** END - Edit User ***********************************************************/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
984
 
985
  /**
986
  * Get the topics that a user created
@@ -1015,379 +1002,50 @@ function bbp_get_user_topics_started( $user_id = 0 ) {
1015
  }
1016
 
1017
  /**
1018
- * Get the total number of users on the forums
1019
  *
1020
- * @since bbPress (r2769)
1021
- * @uses wp_cache_get() Check if query is in cache
1022
- * @uses get_users() To execute our query and get the var back
1023
- * @uses wp_cache_set() Set the query in the cache
1024
- * @uses apply_filters() Calls 'bbp_get_total_users' with number of users
1025
- * @return int Total number of users
1026
- */
1027
- function bbp_get_total_users() {
1028
-
1029
- $bbp_total_users = wp_cache_get( 'bbp_total_users', 'bbpress' );
1030
- if ( !empty( $bbp_total_users ) )
1031
- return $bbp_total_users;
1032
-
1033
- $bbp_total_users = count( get_users() );
1034
-
1035
- wp_cache_set( 'bbp_total_users', $bbp_total_users, 'bbpress' );
1036
-
1037
- return apply_filters( 'bbp_get_total_users', (int) $bbp_total_users );
1038
- }
1039
-
1040
- /** User Status ***************************************************************/
1041
-
1042
- /**
1043
- * Checks if the user has been marked as a spammer.
1044
- *
1045
- * @since bbPress (r3355)
1046
  *
1047
- * @param int $user_id int The ID for the user.
1048
- * @return bool True if spammer, False if not.
1049
- */
1050
- function bbp_is_user_spammer( $user_id = 0 ) {
1051
-
1052
- // Default to current user
1053
- if ( empty( $user_id ) && is_user_logged_in() )
1054
- $user_id = bbp_get_current_user_id();
1055
-
1056
- // No user to check
1057
- if ( empty( $user_id ) )
1058
- return false;
1059
-
1060
- // Assume user is not spam
1061
- $is_spammer = false;
1062
-
1063
- // Get user data
1064
- $user = get_userdata( $user_id );
1065
-
1066
- // No user found
1067
- if ( empty( $user ) ) {
1068
- $is_spammer = false;
1069
-
1070
- // User found
1071
- } else {
1072
-
1073
- // Check if spam
1074
- if ( !empty( $user->spam ) )
1075
- $is_spammer = true;
1076
-
1077
- if ( 1 == $user->user_status )
1078
- $is_spammer = true;
1079
- }
1080
-
1081
- return apply_filters( 'bp_core_is_user_spammer', (bool) $is_spammer );
1082
- }
1083
-
1084
- /**
1085
- * Mark a users topics and replies as spam when the user is marked as spam
1086
- *
1087
- * @since bbPress (r3405)
1088
- *
1089
- * @global WPDB $wpdb
1090
- * @param int $user_id Optional. User ID to spam. Defaults to displayed user.
1091
-
1092
- * @uses bbp_is_single_user()
1093
- * @uses bbp_is_user_home()
1094
- * @uses bbp_get_displayed_user_field()
1095
- * @uses is_super_admin()
1096
- * @uses get_blogs_of_user()
1097
- * @uses get_current_blog_id()
1098
- * @uses bbp_get_topic_post_type()
1099
- * @uses bbp_get_reply_post_type()
1100
- * @uses switch_to_blog()
1101
- * @uses get_post_type()
1102
- * @uses bbp_spam_topic()
1103
- * @uses bbp_spam_reply()
1104
- * @uses restore_current_blog()
1105
- *
1106
- * @return If no user ID passed
1107
- */
1108
- function bbp_make_spam_user( $user_id = 0 ) {
1109
-
1110
- // Use displayed user if it's not yourself
1111
- if ( empty( $user_id ) && bbp_is_single_user() && !bbp_is_user_home() )
1112
- $user_id = bbp_get_displayed_user_id();
1113
-
1114
- // Bail if no user ID
1115
- if ( empty( $user_id ) )
1116
- return;
1117
-
1118
- // Bail if user ID is super admin
1119
- if ( is_super_admin( $user_id ) )
1120
- return;
1121
-
1122
- // Arm the torpedos
1123
- global $wpdb;
1124
-
1125
- // Get the blog IDs of the user to mark as spam
1126
- $blogs = get_blogs_of_user( $user_id, true );
1127
-
1128
- // If user has no blogs, they are a guest on this site
1129
- if ( empty( $blogs ) )
1130
- $blogs[$wpdb->blogid] = array();
1131
-
1132
- // We only need the keys
1133
- $blogs = array_keys( $blogs );
1134
-
1135
- // Make array of post types to mark as spam
1136
- $post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
1137
- $post_types = "'" . implode( "', '", $post_types ) . "'";
1138
- $status = bbp_get_public_status_id();
1139
-
1140
- // Loop through blogs and remove their posts
1141
- foreach ( (array) $blogs as $blog_id ) {
1142
-
1143
- // Switch to the blog ID
1144
- switch_to_blog( $blog_id );
1145
-
1146
- // Get topics and replies
1147
- $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$status}' AND post_type IN ({$post_types})" );
1148
-
1149
- // Loop through posts and spam them
1150
- if ( !empty( $posts ) ) {
1151
- foreach ( $posts as $post_id ) {
1152
-
1153
- // The routines for topics ang replies are different, so use the
1154
- // correct one based on the post type
1155
- switch ( get_post_type( $post_id ) ) {
1156
-
1157
- case bbp_get_topic_post_type() :
1158
- bbp_spam_topic( $post_id );
1159
- break;
1160
-
1161
- case bbp_get_reply_post_type() :
1162
- bbp_spam_reply( $post_id );
1163
- break;
1164
- }
1165
- }
1166
- }
1167
-
1168
- // Switch back to current blog
1169
- restore_current_blog();
1170
- }
1171
- }
1172
-
1173
- /**
1174
- * Mark a users topics and replies as spam when the user is marked as spam
1175
- *
1176
- * @since bbPress (r3405)
1177
- *
1178
- * @global WPDB $wpdb
1179
- * @param int $user_id Optional. User ID to unspam. Defaults to displayed user.
1180
- *
1181
- * @uses bbp_is_single_user()
1182
- * @uses bbp_is_user_home()
1183
- * @uses bbp_get_displayed_user_field()
1184
- * @uses is_super_admin()
1185
- * @uses get_blogs_of_user()
1186
- * @uses bbp_get_topic_post_type()
1187
- * @uses bbp_get_reply_post_type()
1188
- * @uses switch_to_blog()
1189
- * @uses get_post_type()
1190
- * @uses bbp_unspam_topic()
1191
- * @uses bbp_unspam_reply()
1192
- * @uses restore_current_blog()
1193
- *
1194
- * @return If no user ID passed
1195
- */
1196
- function bbp_make_ham_user( $user_id = 0 ) {
1197
-
1198
- // Use displayed user if it's not yourself
1199
- if ( empty( $user_id ) && bbp_is_single_user() && !bbp_is_user_home() )
1200
- $user_id = bbp_get_displayed_user_field();
1201
-
1202
- // Bail if no user ID
1203
- if ( empty( $user_id ) )
1204
- return;
1205
-
1206
- // Bail if user ID is super admin
1207
- if ( is_super_admin( $user_id ) )
1208
- return;
1209
-
1210
- // Arm the torpedos
1211
- global $wpdb;
1212
-
1213
- // Get the blog IDs of the user to mark as spam
1214
- $blogs = get_blogs_of_user( $user_id, true );
1215
-
1216
- // If user has no blogs, they are a guest on this site
1217
- if ( empty( $blogs ) )
1218
- $blogs[$wpdb->blogid] = array();
1219
-
1220
- // We only need the keys
1221
- $blogs = array_keys( $blogs );
1222
-
1223
- // Make array of post types to mark as spam
1224
- $post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
1225
- $post_types = "'" . implode( "', '", $post_types ) . "'";
1226
- $status = bbp_get_spam_status_id();
1227
-
1228
- // Loop through blogs and remove their posts
1229
- foreach ( (array) $blogs as $blog_id ) {
1230
-
1231
- // Switch to the blog ID
1232
- switch_to_blog( $blog_id );
1233
-
1234
- // Get topics and replies
1235
- $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$status}' AND post_type IN ({$post_types})" );
1236
-
1237
- // Loop through posts and spam them
1238
- if ( !empty( $posts ) ) {
1239
- foreach ( $posts as $post_id ) {
1240
-
1241
- // The routines for topics ang replies are different, so use the
1242
- // correct one based on the post type
1243
- switch ( get_post_type( $post_id ) ) {
1244
-
1245
- case bbp_get_topic_post_type() :
1246
- bbp_unspam_topic( $post_id );
1247
- break;
1248
-
1249
- case bbp_get_reply_post_type() :
1250
- bbp_unspam_reply( $post_id );
1251
- break;
1252
- }
1253
- }
1254
- }
1255
-
1256
- // Switch back to current blog
1257
- restore_current_blog();
1258
- }
1259
- }
1260
-
1261
- /**
1262
- * Checks if the user has been marked as deleted.
1263
- *
1264
- * @since bbPress (r3355)
1265
- *
1266
- * @param int $user_id int The ID for the user.
1267
- * @return bool True if deleted, False if not.
1268
- */
1269
- function bbp_is_user_deleted( $user_id = 0 ) {
1270
-
1271
- // Default to current user
1272
- if ( empty( $user_id ) && is_user_logged_in() )
1273
- $user_id = bbp_get_current_user_id();
1274
-
1275
- // No user to check
1276
- if ( empty( $user_id ) )
1277
- return false;
1278
-
1279
- // Assume user is not deleted
1280
- $is_deleted = false;
1281
-
1282
- // Get user data
1283
- $user = get_userdata( $user_id );
1284
-
1285
- // No user found
1286
- if ( empty( $user ) ) {
1287
- $is_deleted = true;
1288
-
1289
- // User found
1290
- } else {
1291
-
1292
- // Check if deleted
1293
- if ( !empty( $user->deleted ) )
1294
- $is_deleted = true;
1295
-
1296
- if ( 2 == $user->user_status )
1297
- $is_deleted = true;
1298
-
1299
- }
1300
-
1301
- return apply_filters( 'bp_core_is_user_deleted', (bool) $is_deleted );
1302
- }
1303
-
1304
- /**
1305
- * Checks if user is active
1306
- *
1307
- * @since bbPress (r3502)
1308
- *
1309
- * @uses is_user_logged_in() To check if user is logged in
1310
- * @uses bbp_get_displayed_user_id() To get current user ID
1311
- * @uses bbp_is_user_spammer() To check if user is spammer
1312
- * @uses bbp_is_user_deleted() To check if user is deleted
1313
- *
1314
- * @param int $user_id The user ID to check
1315
- * @return bool True if public, false if not
1316
  */
1317
- function bbp_is_user_active( $user_id = 0 ) {
1318
-
1319
- // Default to current user
1320
- if ( empty( $user_id ) && is_user_logged_in() )
1321
- $user_id = bbp_get_current_user_id();
1322
-
1323
- // No user to check
1324
  if ( empty( $user_id ) )
1325
  return false;
1326
 
1327
- // Check spam
1328
- if ( bbp_is_user_spammer( $user_id ) )
1329
- return false;
1330
-
1331
- // Check deleted
1332
- if ( bbp_is_user_deleted( $user_id ) )
1333
- return false;
1334
-
1335
- // Assume true if not spam or deleted
1336
- return true;
1337
- }
1338
-
1339
- /**
1340
- * Checks if user is not active.
1341
- *
1342
- * @since bbPress (r3502)
1343
- *
1344
- * @uses is_user_logged_in() To check if user is logged in
1345
- * @uses bbp_get_displayed_user_id() To get current user ID
1346
- * @uses bbp_is_user_active() To check if user is active
1347
- *
1348
- * @param int $user_id The user ID to check. Defaults to current user ID
1349
- * @return bool True if inactive, false if active
1350
- */
1351
- function bbp_is_user_inactive( $user_id = 0 ) {
1352
-
1353
- // Default to current user
1354
- if ( empty( $user_id ) && is_user_logged_in() )
1355
- $user_id = bbp_get_current_user_id();
1356
-
1357
- // No user to check
1358
- if ( empty( $user_id ) )
1359
- return false;
1360
 
1361
- // Return the inverse of active
1362
- return !bbp_is_user_active( $user_id );
1363
  }
1364
 
1365
  /**
1366
- * Return a user's main role
1367
- *
1368
- * @since bbPress (r3860)
1369
  *
1370
- * @param int $user_id
1371
- * @uses bbp_get_user_id() To get the user id
1372
- * @uses get_userdata() To get the user data
1373
- * @uses apply_filters() Calls 'bbp_get_user_role' with the
1374
- * role and user id
1375
- * @return string
1376
  */
1377
- function bbp_get_user_role( $user_id = 0 ) {
1378
-
1379
- // Validate user id
1380
- $user_id = bbp_get_user_id( $user_id, false, false );
1381
- if ( empty( $user_id ) )
1382
- return false;
1383
-
1384
- // Get userdata
1385
- $user = get_userdata( $user_id );
1386
-
1387
- // Get the user's main role
1388
- $role = isset( $user->roles ) ? array_shift( $user->roles ) : bbp_get_anonymous_role();
1389
-
1390
- return apply_filters( 'bbp_get_user_role', $role, $user_id, $user );
1391
  }
1392
 
1393
  /** Premissions ***************************************************************/
@@ -1437,6 +1095,30 @@ function bbp_check_user_edit() {
1437
  }
1438
  }
1439
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1440
  /** Converter *****************************************************************/
1441
 
1442
  /**
@@ -1460,10 +1142,13 @@ function bbp_user_maybe_convert_pass() {
1460
  return;
1461
 
1462
  // Setup admin (to include converter)
1463
- require_once( bbpress()->plugin_dir . 'bbp-admin/bbp-admin.php' );
 
 
 
1464
 
1465
  // Convert password
1466
- require_once( bbpress()->admin->admin_dir . 'bbp-converter.php' );
1467
  require_once( bbpress()->admin->admin_dir . 'converters/' . $row->meta_value . '.php' );
1468
 
1469
  // Create the converter
152
  * @return string
153
  */
154
  function bbp_current_author_ua() {
155
+ $retval = !empty( $_SERVER['HTTP_USER_AGENT'] ) ? substr( $_SERVER['HTTP_USER_AGENT'], 0, 254 ) : '';
 
 
 
 
 
156
 
157
  return apply_filters( 'bbp_current_author_ua', $retval );
158
  }
879
  // Get the displayed user ID
880
  $user_id = bbp_get_displayed_user_id();
881
 
 
 
882
  // Execute confirmed email change. See send_confirmation_on_profile_email().
883
  if ( is_multisite() && bbp_is_user_home_edit() && isset( $_GET['newuseremail'] ) ) {
884
 
889
  $user->ID = $user_id;
890
  $user->user_email = esc_html( trim( $new_email['newemail'] ) );
891
 
892
+ global $wpdb;
893
+
894
+ if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", bbp_get_displayed_user_field( 'user_login' ) ) ) ) {
895
  $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $user->user_email, bbp_get_displayed_user_field( 'user_login' ) ) );
896
+ }
897
 
898
  wp_update_user( get_object_vars( $user ) );
899
  delete_option( $user_id . '_new_email' );
900
 
901
  wp_safe_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $user_id ) ) );
902
+ exit();
903
  }
904
 
905
+ // Delete new email address from user options
906
  } elseif ( is_multisite() && bbp_is_user_home_edit() && !empty( $_GET['dismiss'] ) && ( $user_id . '_new_email' == $_GET['dismiss'] ) ) {
 
907
  delete_option( $user_id . '_new_email' );
908
  wp_safe_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $user_id ) ) );
909
+ exit();
 
910
  }
911
 
912
  // Nonce check
925
  $edit_action = bbp_is_user_home_edit() ? 'personal_options_update' : 'edit_user_profile_update';
926
  do_action( $edit_action, $user_id );
927
 
928
+ // Handle user edit
929
+ $edit_user = edit_user( $user_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930
 
931
  // Error(s) editng the user, so copy them into the global
932
  if ( is_wp_error( $edit_user ) ) {
934
 
935
  // Successful edit to redirect
936
  } elseif ( is_integer( $edit_user ) ) {
937
+
938
+ // Maybe update super admin ability
939
+ if ( is_multisite() && ! bbp_is_user_home_edit() ) {
940
+ empty( $_POST['super_admin'] ) ? revoke_super_admin( $edit_user ) : grant_super_admin( $edit_user );
941
+ }
942
+
943
  $redirect = add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $edit_user ) );
944
 
945
  wp_safe_redirect( $redirect );
947
  }
948
  }
949
 
950
+ /**
951
+ * Conditionally hook the core WordPress output actions to the end of the
952
+ * default user's edit profile template.
953
+ *
954
+ * This allows clever plugin authors to conditionally unhook the WordPress core
955
+ * output actions if they don't want any unexpected junk to appear there, and
956
+ * also avoids needing to pollute the templates with additional logic and actions.
957
+ *
958
+ * @since bbPress (r4273)
959
+ *
960
+ * @uses bbp_is_user_home_edit() To switch the action fired
961
+ * @uses get_userdata() To get the current user's data
962
+ * @uses bbp_get_displayed_user_id() To get the currently displayed user ID
963
+ */
964
+ function bbp_user_edit_after() {
965
+ $action = bbp_is_user_home_edit() ? 'show_user_profile' : 'edit_user_profile';
966
+
967
+ do_action( $action, get_userdata( bbp_get_displayed_user_id() ) );
968
+ }
969
+
970
+ /** User Queries **************************************************************/
971
 
972
  /**
973
  * Get the topics that a user created
1002
  }
1003
 
1004
  /**
1005
+ * Get the replies that a user created
1006
  *
1007
+ * @since bbPress (r4225)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1008
  *
1009
+ * @param int $user_id Optional. User id
1010
+ * @uses bbp_get_user_id() To get the topic id
1011
+ * @uses bbp_has_replies() To get the topics created by the user
1012
+ * @return array|bool Results if the user has created topics, otherwise false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1013
  */
1014
+ function bbp_get_user_replies_created( $user_id = 0 ) {
1015
+
1016
+ // Validate user
1017
+ $user_id = bbp_get_user_id( $user_id );
 
 
 
1018
  if ( empty( $user_id ) )
1019
  return false;
1020
 
1021
+ // Try to get the topics
1022
+ $query = bbp_has_replies( array(
1023
+ 'post_type' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ),
1024
+ 'post_parent' => 'any',
1025
+ 'posts_per_page' => bbp_get_replies_per_page(),
1026
+ 'paged' => bbp_get_paged(),
1027
+ 'orderby' => 'date',
1028
+ 'order' => 'DESC',
1029
+ 'author' => $user_id,
1030
+ 'show_stickies' => false,
1031
+ ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1032
 
1033
+ return apply_filters( 'bbp_get_user_replies_created', $query, $user_id );
 
1034
  }
1035
 
1036
  /**
1037
+ * Get the total number of users on the forums
 
 
1038
  *
1039
+ * @since bbPress (r2769)
1040
+ * @uses wp_cache_get() Check if query is in cache
1041
+ * @uses get_users() To execute our query and get the var back
1042
+ * @uses wp_cache_set() Set the query in the cache
1043
+ * @uses apply_filters() Calls 'bbp_get_total_users' with number of users
1044
+ * @return int Total number of users
1045
  */
1046
+ function bbp_get_total_users() {
1047
+ $user_count = count_users();
1048
+ return apply_filters( 'bbp_get_total_users', (int) $user_count['total_users'] );
 
 
 
 
 
 
 
 
 
 
 
1049
  }
1050
 
1051
  /** Premissions ***************************************************************/
1095
  }
1096
  }
1097
 
1098
+ /**
1099
+ * Check if a user is blocked, or cannot spectate the forums.
1100
+ *
1101
+ * @since bbPress (r2996)
1102
+ *
1103
+ * @uses is_user_logged_in() To check if user is logged in
1104
+ * @uses is_super_admin() To check if user is a super admin
1105
+ * @uses current_user_can() To check if the current user can spectate
1106
+ * @uses is_bbpress() To check if in a bbPress section of the site
1107
+ * @uses bbp_set_404() To set a 404 status
1108
+ */
1109
+ function bbp_forum_enforce_blocked() {
1110
+
1111
+ // Bail if not logged in or super admin
1112
+ if ( ! is_user_logged_in() || is_super_admin() ) {
1113
+ return;
1114
+ }
1115
+
1116
+ // Set 404 if in bbPress and user cannot spectate
1117
+ if ( is_bbpress() && ! current_user_can( 'spectate' ) ) {
1118
+ bbp_set_404();
1119
+ }
1120
+ }
1121
+
1122
  /** Converter *****************************************************************/
1123
 
1124
  /**
1142
  return;
1143
 
1144
  // Setup admin (to include converter)
1145
+ require_once( bbpress()->includes_dir . 'admin/admin.php' );
1146
+
1147
+ // Create the admin object
1148
+ bbp_admin();
1149
 
1150
  // Convert password
1151
+ require_once( bbpress()->admin->admin_dir . 'converter.php' );
1152
  require_once( bbpress()->admin->admin_dir . 'converters/' . $row->meta_value . '.php' );
1153
 
1154
  // Create the converter
includes/users/index.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Do not modify the files in this folder.
5
+ */
bbp-includes/bbp-user-options.php → includes/users/options.php RENAMED
@@ -36,7 +36,7 @@ function bbp_get_default_user_options() {
36
  * @since bbPress (r3910)
37
  * @uses bbp_get_default_user_options() To get default options
38
  * @uses update_user_option() Adds default options
39
- * @uses do_action() Calls 'bbp_add_options'
40
  */
41
  function bbp_add_user_options( $user_id = 0 ) {
42
 
@@ -50,7 +50,7 @@ function bbp_add_user_options( $user_id = 0 ) {
50
  update_user_option( $user_id, $key, $value );
51
 
52
  // Allow previously activated plugins to append their own user options.
53
- do_action( 'bbp_add_user_options' );
54
  }
55
 
56
  /**
@@ -76,7 +76,7 @@ function bbp_delete_user_options( $user_id = 0 ) {
76
  delete_user_option( $user_id, $key );
77
 
78
  // Allow previously activated plugins to append their own options.
79
- do_action( 'bbp_delete_user_options' );
80
  }
81
 
82
  /**
@@ -125,11 +125,12 @@ function bbp_filter_get_user_option( $value = false, $option = '', $user = 0 ) {
125
  * @since bbPress (r3632)
126
  *
127
  * @param int $user_id
 
128
  * @uses bbp_get_user_topic_count()
129
  * @return string
130
  */
131
- function bbp_user_topic_count( $user_id = 0 ) {
132
- echo bbp_get_user_topic_count( $user_id );
133
  }
134
  /**
135
  * Return a users reply count
@@ -137,21 +138,23 @@ function bbp_user_topic_count( $user_id = 0 ) {
137
  * @since bbPress (r3632)
138
  *
139
  * @param int $user_id
 
140
  * @uses bbp_get_user_id()
141
  * @uses get_user_option()
142
  * @uses apply_filters()
143
  * @return string
144
  */
145
- function bbp_get_user_topic_count( $user_id = 0 ) {
146
 
147
  // Validate user id
148
  $user_id = bbp_get_user_id( $user_id );
149
  if ( empty( $user_id ) )
150
  return false;
151
 
152
- $count = get_user_option( '_bbp_topic_count', $user_id );
 
153
 
154
- return apply_filters( 'bbp_get_user_topic_count', (int) $count, $user_id );
155
  }
156
 
157
  /**
@@ -160,11 +163,12 @@ function bbp_user_topic_count( $user_id = 0 ) {
160
  * @since bbPress (r3632)
161
  *
162
  * @param int $user_id
 
163
  * @uses bbp_get_user_reply_count()
164
  * @return string
165
  */
166
- function bbp_user_reply_count( $user_id = 0 ) {
167
- echo bbp_get_user_reply_count( $user_id );
168
  }
169
  /**
170
  * Return a users reply count
@@ -172,21 +176,23 @@ function bbp_user_reply_count( $user_id = 0 ) {
172
  * @since bbPress (r3632)
173
  *
174
  * @param int $user_id
 
175
  * @uses bbp_get_user_id()
176
  * @uses get_user_option()
177
  * @uses apply_filters()
178
  * @return string
179
  */
180
- function bbp_get_user_reply_count( $user_id = 0 ) {
181
 
182
  // Validate user id
183
  $user_id = bbp_get_user_id( $user_id );
184
  if ( empty( $user_id ) )
185
  return false;
186
 
187
- $count = get_user_option( '_bbp_reply_count', $user_id );
 
188
 
189
- return apply_filters( 'bbp_get_user_reply_count', (int) $count, $user_id );
190
  }
191
 
192
  /**
@@ -195,11 +201,12 @@ function bbp_user_reply_count( $user_id = 0 ) {
195
  * @since bbPress (r3632)
196
  *
197
  * @param int $user_id
 
198
  * @uses bbp_get_user_post_count()
199
  * @return string
200
  */
201
- function bbp_user_post_count( $user_id = 0 ) {
202
- echo bbp_get_user_post_count( $user_id );
203
  }
204
  /**
205
  * Return a users total post count
@@ -207,23 +214,25 @@ function bbp_user_post_count( $user_id = 0 ) {
207
  * @since bbPress (r3632)
208
  *
209
  * @param int $user_id
 
210
  * @uses bbp_get_user_id()
211
  * @uses get_user_option()
212
  * @uses apply_filters()
213
  * @return string
214
  */
215
- function bbp_get_user_post_count( $user_id = 0 ) {
216
 
217
  // Validate user id
218
  $user_id = bbp_get_user_id( $user_id );
219
  if ( empty( $user_id ) )
220
  return false;
221
 
222
- $topics = bbp_get_user_topic_count( $user_id );
223
- $replies = bbp_get_user_reply_count( $user_id );
224
- $count = (int) $topics + (int) $replies;
 
225
 
226
- return apply_filters( 'bbp_get_user_post_count', (int) $count, $user_id );
227
  }
228
 
229
  /** Last Posted ***************************************************************/
36
  * @since bbPress (r3910)
37
  * @uses bbp_get_default_user_options() To get default options
38
  * @uses update_user_option() Adds default options
39
+ * @uses do_action() Calls 'bbp_add_user_options'
40
  */
41
  function bbp_add_user_options( $user_id = 0 ) {
42
 
50
  update_user_option( $user_id, $key, $value );
51
 
52
  // Allow previously activated plugins to append their own user options.
53
+ do_action( 'bbp_add_user_options', $user_id );
54
  }
55
 
56
  /**
76
  delete_user_option( $user_id, $key );
77
 
78
  // Allow previously activated plugins to append their own options.
79
+ do_action( 'bbp_delete_user_options', $user_id );
80
  }
81
 
82
  /**
125
  * @since bbPress (r3632)
126
  *
127
  * @param int $user_id
128
+ * @param boolean $integer Optional. Whether or not to format the result
129
  * @uses bbp_get_user_topic_count()
130
  * @return string
131
  */
132
+ function bbp_user_topic_count( $user_id = 0, $integer = false ) {
133
+ echo bbp_get_user_topic_count( $user_id, $integer );
134
  }
135
  /**
136
  * Return a users reply count
138
  * @since bbPress (r3632)
139
  *
140
  * @param int $user_id
141
+ * @param boolean $integer Optional. Whether or not to format the result
142
  * @uses bbp_get_user_id()
143
  * @uses get_user_option()
144
  * @uses apply_filters()
145
  * @return string
146
  */
147
+ function bbp_get_user_topic_count( $user_id = 0, $integer = false ) {
148
 
149
  // Validate user id
150
  $user_id = bbp_get_user_id( $user_id );
151
  if ( empty( $user_id ) )
152
  return false;
153
 
154
+ $count = (int) get_user_option( '_bbp_topic_count', $user_id );
155
+ $filter = ( false == $integer ) ? 'bbp_get_user_topic_count_int' : 'bbp_get_user_topic_count';
156
 
157
+ return apply_filters( $filter, $count, $user_id );
158
  }
159
 
160
  /**
163
  * @since bbPress (r3632)
164
  *
165
  * @param int $user_id
166
+ * @param boolean $integer Optional. Whether or not to format the result
167
  * @uses bbp_get_user_reply_count()
168
  * @return string
169
  */
170
+ function bbp_user_reply_count( $user_id = 0, $integer = false ) {
171
+ echo bbp_get_user_reply_count( $user_id, $integer );
172
  }
173
  /**
174
  * Return a users reply count
176
  * @since bbPress (r3632)
177
  *
178
  * @param int $user_id
179
+ * @param boolean $integer Optional. Whether or not to format the result
180
  * @uses bbp_get_user_id()
181
  * @uses get_user_option()
182
  * @uses apply_filters()
183
  * @return string
184
  */
185
+ function bbp_get_user_reply_count( $user_id = 0, $integer = false ) {
186
 
187
  // Validate user id
188
  $user_id = bbp_get_user_id( $user_id );
189
  if ( empty( $user_id ) )
190
  return false;
191
 
192
+ $count = (int) get_user_option( '_bbp_reply_count', $user_id );
193
+ $filter = ( true == $integer ) ? 'bbp_get_user_topic_count_int' : 'bbp_get_user_topic_count';
194
 
195
+ return apply_filters( $filter, $count, $user_id );
196
  }
197
 
198
  /**
201
  * @since bbPress (r3632)
202
  *
203
  * @param int $user_id
204
+ * @param boolean $integer Optional. Whether or not to format the result
205
  * @uses bbp_get_user_post_count()
206
  * @return string
207
  */
208
+ function bbp_user_post_count( $user_id = 0, $integer = false ) {
209
+ echo bbp_get_user_post_count( $user_id, $integer );
210
  }
211
  /**
212
  * Return a users total post count
214
  * @since bbPress (r3632)
215
  *
216
  * @param int $user_id
217
+ * @param boolean $integer Optional. Whether or not to format the result
218
  * @uses bbp_get_user_id()
219
  * @uses get_user_option()
220
  * @uses apply_filters()
221
  * @return string
222
  */
223
+ function bbp_get_user_post_count( $user_id = 0, $integer = false ) {
224
 
225
  // Validate user id
226
  $user_id = bbp_get_user_id( $user_id );
227
  if ( empty( $user_id ) )
228
  return false;
229
 
230
+ $topics = bbp_get_user_topic_count( $user_id, true );
231
+ $replies = bbp_get_user_reply_count( $user_id, true );
232
+ $count = (int) $topics + $replies;
233
+ $filter = ( true == $integer ) ? 'bbp_get_user_post_count_int' : 'bbp_get_user_post_count';
234
 
235
+ return apply_filters( $filter, $count, $user_id );
236
  }
237
 
238
  /** Last Posted ***************************************************************/
bbp-includes/bbp-user-template.php → includes/users/template-tags.php RENAMED
@@ -41,20 +41,21 @@ function bbp_user_id( $user_id = 0, $displayed_user_fallback = true, $current_us
41
  $bbp = bbpress();
42
 
43
  // Easy empty checking
44
- if ( !empty( $user_id ) && is_numeric( $user_id ) )
45
  $bbp_user_id = $user_id;
46
 
47
  // Currently viewing or editing a user
48
- elseif ( ( true == $displayed_user_fallback ) && !empty( $bbp->displayed_user->ID ) )
49
  $bbp_user_id = $bbp->displayed_user->ID;
50
 
51
  // Maybe fallback on the current_user ID
52
- elseif ( ( true == $current_user_fallback ) && !empty( $bbp->current_user->ID ) )
53
  $bbp_user_id = $bbp->current_user->ID;
54
 
55
  // Failsafe
56
- else
57
  $bbp_user_id = get_query_var( 'bbp_user_id' );
 
58
 
59
  return (int) apply_filters( 'bbp_get_user_id', (int) $bbp_user_id, $displayed_user_fallback, $current_user_fallback );
60
  }
@@ -303,7 +304,6 @@ function bbp_user_profile_url( $user_id = 0, $user_nicename = '' ) {
303
  }
304
 
305
  return apply_filters( 'bbp_get_user_profile_url', $url, $user_id, $user_nicename );
306
-
307
  }
308
 
309
  /**
@@ -420,10 +420,10 @@ function bbp_user_display_role( $user_id = 0 ) {
420
  * @since bbPress (r3860)
421
  *
422
  * @param int $user_id
423
- * @uses bbp_get_user_role() To get the main user role
424
- * @uses bbp_get_moderator_role() To get the moderator role
425
- * @uses bbp_get_participant_role() To get the participant role
426
- * @uses bbp_get_moderator_role() To get the moderator role
427
  * @uses apply_filters() Calls 'bbp_get_user_display_role' with the
428
  * display role, user id, and user role
429
  * @return string
@@ -431,63 +431,34 @@ function bbp_user_display_role( $user_id = 0 ) {
431
  function bbp_get_user_display_role( $user_id = 0 ) {
432
 
433
  // Validate user id
434
- $user_id = bbp_get_user_id( $user_id, false, false );
435
- $user_role = bbp_get_user_role( $user_id );
436
 
437
  // Capes earn Vinz Clortho status
438
  if ( is_super_admin( $user_id ) ) {
439
  $role = __( 'Key Master', 'bbpress' );
440
 
441
- // Not the keymaster of Gozer
442
- } else {
443
-
444
- // Get the user's main role for display
445
- switch ( $user_role ) {
446
-
447
- /** bbPress Roles *********************************************/
448
-
449
- // Anonymous
450
- case bbp_get_anonymous_role() :
451
- $role = __( 'Guest', 'bbpress' );
452
- break;
453
-
454
- // Multisite Participant Role
455
- case bbp_get_participant_role() :
456
- $role = __( 'Member', 'bbpress' );
457
- break;
458
-
459
- // Moderator
460
- case bbp_get_moderator_role() :
461
- $role = __( 'Moderator', 'bbpress' );
462
- break;
463
-
464
- /** WordPress Core Roles **************************************/
465
-
466
- case 'administrator' :
467
- case 'editor' :
468
- case 'author' :
469
- case 'contributor' :
470
- case 'subscriber' :
471
- default : // Any other role (plugins, etc...)
472
- global $wp_roles;
473
 
474
- // Load roles if not set
475
- if ( !isset( $wp_roles ) )
476
- $wp_roles = new WP_Roles();
477
 
478
- // Get a translated role name
479
- if ( !empty( $wp_roles->role_names[$user_role] ) )
480
- $role = translate_user_role( $wp_roles->role_names[$user_role] );
481
 
482
- // Fallback for registered user
483
- else
484
- $role = __( 'Member', 'bbpress' );
485
 
486
- break;
487
- }
 
488
  }
489
 
490
- return apply_filters( 'bbp_get_user_display_role', $role, $user_id, $user_role );
491
  }
492
 
493
  /**
@@ -612,7 +583,40 @@ function bbp_favorites_permalink( $user_id = 0 ) {
612
  * @return string Permanent link to user profile page
613
  */
614
  function bbp_get_favorites_permalink( $user_id = 0 ) {
615
- return apply_filters( 'bbp_get_favorites_permalink', bbp_get_user_profile_url( $user_id ), $user_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616
  }
617
 
618
  /**
@@ -742,7 +746,40 @@ function bbp_subscriptions_permalink( $user_id = 0 ) {
742
  * @return string Permanent link to user subscriptions page
743
  */
744
  function bbp_get_subscriptions_permalink( $user_id = 0 ) {
745
- return apply_filters( 'bbp_get_subscriptions_permalink', bbp_get_user_profile_url( $user_id ), $user_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
746
  }
747
 
748
  /**
@@ -927,38 +964,67 @@ function bbp_edit_user_display_name() {
927
  }
928
 
929
  /**
930
- * Output role selector (for user edit)
931
  *
932
  * @since bbPress (r2688)
933
  */
934
- function bbp_edit_user_role() {
935
 
936
- // Return if no user is displayed
937
- if ( !isset( bbpress()->displayed_user ) )
938
  return;
939
 
940
- // Local variables
941
- $p = $r = '';
 
942
 
943
- // print the 'no role' option. Make it selected if the user has no role yet.
944
- $user_role = array_shift( bbpress()->displayed_user->roles );
945
- if ( empty( $user_role ) )
946
- $r .= '<option value="">' . __( '&mdash; No role for this site &mdash;', 'bbpress' ) . '</option>';
947
 
948
- // Loop through roles
949
- foreach ( get_editable_roles() as $role => $details ) {
950
- $name = translate_user_role( $details['name'] );
951
 
952
- // Make default first in list
953
- if ( $user_role == $role ) {
954
- $p = "\n\t<option selected='selected' value='" . esc_attr( $role ) . "'>{$name}</option>";
955
- } else {
956
- $r .= "\n\t<option value='" . esc_attr( $role ) . "'>{$name}</option>";
957
- }
958
- }
959
 
960
- // Output result
961
- echo '<select name="role" id="role">' . $p . $r . '</select>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
962
  }
963
 
964
  /**
@@ -978,6 +1044,126 @@ function bbp_edit_user_contact_methods() {
978
  return apply_filters( 'bbp_edit_user_contact_methods', $contact_methods );
979
  }
980
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
981
  /** Login *********************************************************************/
982
 
983
  /**
@@ -1177,16 +1363,17 @@ function bbp_author_link( $args = '' ) {
1177
  $post_id = $args;
1178
 
1179
  // Confirmed topic
1180
- if ( bbp_is_topic( $post_id ) )
1181
  return bbp_get_topic_author_link( $args );
1182
 
1183
  // Confirmed reply
1184
- elseif ( bbp_is_reply( $post_id ) )
1185
  return bbp_get_reply_author_link( $args );
1186
 
1187
  // Get the post author and proceed
1188
- else
1189
  $user_id = get_post_field( 'post_author', $post_id );
 
1190
 
1191
  // Neither a reply nor a topic, so could be a revision
1192
  if ( !empty( $post_id ) ) {
@@ -1212,7 +1399,7 @@ function bbp_author_link( $args = '' ) {
1212
  }
1213
 
1214
  // Add links if not anonymous
1215
- if ( empty( $anonymous ) ) {
1216
  foreach ( $author_links as $link_text ) {
1217
  $author_link[] = sprintf( '<a href="%1$s"%2$s>%3$s</a>', $author_url, $link_title, $link_text );
1218
  }
@@ -1270,20 +1457,21 @@ function bbp_user_can_view_forum( $args = '' ) {
1270
  $retval = false;
1271
 
1272
  // User is a super admin
1273
- if ( is_super_admin() )
1274
  $retval = true;
1275
 
1276
  // Forum is public, and user can read forums or is not logged in
1277
- elseif ( bbp_is_forum_public ( $forum_id, $check_ancestors ) )
1278
  $retval = true;
1279
 
1280
  // Forum is private, and user can see it
1281
- elseif ( bbp_is_forum_private( $forum_id, $check_ancestors ) && current_user_can( 'read_private_forums' ) )
1282
  $retval = true;
1283
 
1284
  // Forum is hidden, and user can see it
1285
- elseif ( bbp_is_forum_hidden ( $forum_id, $check_ancestors ) && current_user_can( 'read_hidden_forums' ) )
1286
  $retval = true;
 
1287
 
1288
  return apply_filters( 'bbp_user_can_view_forum', $retval, $forum_id, $user_id );
1289
  }
@@ -1308,16 +1496,17 @@ function bbp_current_user_can_publish_topics() {
1308
  $retval = false;
1309
 
1310
  // Always allow super admins
1311
- if ( is_super_admin() )
1312
  $retval = true;
1313
 
1314
  // Do not allow anonymous if not enabled
1315
- elseif ( !is_user_logged_in() && bbp_allow_anonymous() )
1316
  $retval = true;
1317
 
1318
  // User is logged in
1319
- elseif ( current_user_can( 'publish_topics' ) )
1320
  $retval = true;
 
1321
 
1322
  // Allow access to be filtered
1323
  return (bool) apply_filters( 'bbp_current_user_can_publish_forums', $retval );
@@ -1341,12 +1530,13 @@ function bbp_current_user_can_publish_forums() {
1341
  $retval = false;
1342
 
1343
  // Always allow super admins
1344
- if ( is_super_admin() )
1345
  $retval = true;
1346
 
1347
  // User is logged in
1348
- elseif ( current_user_can( 'publish_forums' ) )
1349
  $retval = true;
 
1350
 
1351
  // Allow access to be filtered
1352
  return (bool) apply_filters( 'bbp_current_user_can_publish_forums', $retval );
@@ -1372,16 +1562,17 @@ function bbp_current_user_can_publish_replies() {
1372
  $retval = false;
1373
 
1374
  // Always allow super admins
1375
- if ( is_super_admin() )
1376
  $retval = true;
1377
 
1378
  // Do not allow anonymous if not enabled
1379
- elseif ( !is_user_logged_in() && bbp_allow_anonymous() )
1380
  $retval = true;
1381
 
1382
  // User is logged in
1383
- elseif ( current_user_can( 'publish_replies' ) )
1384
  $retval = true;
 
1385
 
1386
  // Allow access to be filtered
1387
  return (bool) apply_filters( 'bbp_current_user_can_publish_replies', $retval );
@@ -1455,16 +1646,17 @@ function bbp_current_user_can_access_create_forum_form() {
1455
  $retval = false;
1456
 
1457
  // Always allow super admins
1458
- if ( is_super_admin() )
1459
  $retval = true;
1460
 
1461
  // Looking at a single forum & forum is open
1462
- elseif ( ( is_page() || is_single() ) && bbp_is_forum_open() )
1463
  $retval = bbp_current_user_can_publish_forums();
1464
 
1465
  // User can edit this topic
1466
- elseif ( bbp_is_forum_edit() )
1467
  $retval = current_user_can( 'edit_forum', bbp_get_forum_id() );
 
1468
 
1469
  // Allow access to be filtered
1470
  return (bool) apply_filters( 'bbp_current_user_can_access_create_forum_form', (bool) $retval );
@@ -1489,16 +1681,17 @@ function bbp_current_user_can_access_create_topic_form() {
1489
  $retval = false;
1490
 
1491
  // Always allow super admins
1492
- if ( is_super_admin() )
1493
  $retval = true;
1494
 
1495
  // Looking at a single forum & forum is open
1496
- elseif ( ( bbp_is_single_forum() || is_page() || is_single() ) && bbp_is_forum_open() )
1497
  $retval = bbp_current_user_can_publish_topics();
1498
 
1499
  // User can edit this topic
1500
- elseif ( bbp_is_topic_edit() )
1501
  $retval = current_user_can( 'edit_topic', bbp_get_topic_id() );
 
1502
 
1503
  // Allow access to be filtered
1504
  return (bool) apply_filters( 'bbp_current_user_can_access_create_topic_form', (bool) $retval );
@@ -1523,16 +1716,17 @@ function bbp_current_user_can_access_create_reply_form() {
1523
  $retval = false;
1524
 
1525
  // Always allow super admins
1526
- if ( is_super_admin() )
1527
  $retval = true;
1528
 
1529
  // Looking at a single topic, topic is open, and forum is open
1530
- elseif ( ( bbp_is_single_topic() || is_page() || is_single() ) && bbp_is_topic_open() && bbp_is_forum_open() )
1531
  $retval = bbp_current_user_can_publish_replies();
1532
 
1533
  // User can edit this topic
1534
- elseif ( bbp_is_reply_edit() )
1535
  $retval = current_user_can( 'edit_reply', bbp_get_reply_id() );
 
1536
 
1537
  // Allow access to be filtered
1538
  return (bool) apply_filters( 'bbp_current_user_can_access_create_reply_form', (bool) $retval );
41
  $bbp = bbpress();
42
 
43
  // Easy empty checking
44
+ if ( !empty( $user_id ) && is_numeric( $user_id ) ) {
45
  $bbp_user_id = $user_id;
46
 
47
  // Currently viewing or editing a user
48
+ } elseif ( ( true == $displayed_user_fallback ) && !empty( $bbp->displayed_user->ID ) ) {
49
  $bbp_user_id = $bbp->displayed_user->ID;
50
 
51
  // Maybe fallback on the current_user ID
52
+ } elseif ( ( true == $current_user_fallback ) && !empty( $bbp->current_user->ID ) ) {
53
  $bbp_user_id = $bbp->current_user->ID;
54
 
55
  // Failsafe
56
+ } else {
57
  $bbp_user_id = get_query_var( 'bbp_user_id' );
58
+ }
59
 
60
  return (int) apply_filters( 'bbp_get_user_id', (int) $bbp_user_id, $displayed_user_fallback, $current_user_fallback );
61
  }
304
  }
305
 
306
  return apply_filters( 'bbp_get_user_profile_url', $url, $user_id, $user_nicename );
 
307
  }
308
 
309
  /**
420
  * @since bbPress (r3860)
421
  *
422
  * @param int $user_id
423
+ * @uses bbp_get_user_id() to verify the user ID
424
+ * @uses is_super_admin() to check if user is a super admin
425
+ * @uses bbp_is_user_inactive() to check if user is inactive
426
+ * @uses user_can() to check if user has special capabilities
427
  * @uses apply_filters() Calls 'bbp_get_user_display_role' with the
428
  * display role, user id, and user role
429
  * @return string
431
  function bbp_get_user_display_role( $user_id = 0 ) {
432
 
433
  // Validate user id
434
+ $user_id = bbp_get_user_id( $user_id, false, false );
 
435
 
436
  // Capes earn Vinz Clortho status
437
  if ( is_super_admin( $user_id ) ) {
438
  $role = __( 'Key Master', 'bbpress' );
439
 
440
+ // Inactive
441
+ } elseif ( bbp_is_user_inactive() ) {
442
+ $role = __( 'Inactive', 'bbpress' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
 
444
+ // User is not registered
445
+ } elseif ( empty( $user_id ) ) {
446
+ $role = __( 'Guest', 'bbpress' );
447
 
448
+ // Moderator
449
+ } elseif ( user_can( $user_id, 'moderate' ) ) {
450
+ $role = __( 'Moderator', 'bbpress' );
451
 
452
+ // Participant
453
+ } elseif ( user_can( $user_id, 'participate' ) ) {
454
+ $role = __( 'Participant', 'bbpress' );
455
 
456
+ // Anyone else
457
+ } else {
458
+ $role = __( 'Member', 'bbpress' );
459
  }
460
 
461
+ return apply_filters( 'bbp_get_user_display_role', $role, $user_id );
462
  }
463
 
464
  /**
583
  * @return string Permanent link to user profile page
584
  */
585
  function bbp_get_favorites_permalink( $user_id = 0 ) {
586
+ global $wp_rewrite;
587
+
588
+ // Use displayed user ID if there is one, and one isn't requested
589
+ $user_id = bbp_get_user_id( $user_id );
590
+ if ( empty( $user_id ) )
591
+ return false;
592
+
593
+ // Allow early overriding of the profile URL to cut down on processing
594
+ $early_profile_url = apply_filters( 'bbp_pre_get_favorites_permalink', (int) $user_id );
595
+ if ( is_string( $early_profile_url ) )
596
+ return $early_profile_url;
597
+
598
+ // Pretty permalinks
599
+ if ( $wp_rewrite->using_permalinks() ) {
600
+ $url = $wp_rewrite->root . bbp_get_user_slug() . '/%' . bbp_get_user_rewrite_id() . '%/%' . bbp_get_user_favorites_rewrite_id() . '%';
601
+ $user = get_userdata( $user_id );
602
+ if ( ! empty( $user->user_nicename ) ) {
603
+ $user_nicename = $user->user_nicename;
604
+ } else {
605
+ $user_nicename = $user->user_login;
606
+ }
607
+ $url = str_replace( '%' . bbp_get_user_rewrite_id() . '%', $user_nicename, $url );
608
+ $url = str_replace( '%' . bbp_get_user_favorites_rewrite_id() . '%', bbp_get_user_favorites_slug(), $url );
609
+ $url = home_url( user_trailingslashit( $url ) );
610
+
611
+ // Unpretty permalinks
612
+ } else {
613
+ $url = add_query_arg( array(
614
+ bbp_get_user_rewrite_id() => $user_id,
615
+ bbp_get_user_favorites_rewrite_id() => bbp_get_user_favorites_slug(),
616
+ ), home_url( '/' ) );
617
+ }
618
+
619
+ return apply_filters( 'bbp_get_favorites_permalink', $url, $user_id );
620
  }
621
 
622
  /**
746
  * @return string Permanent link to user subscriptions page
747
  */
748
  function bbp_get_subscriptions_permalink( $user_id = 0 ) {
749
+ global $wp_rewrite;
750
+
751
+ // Use displayed user ID if there is one, and one isn't requested
752
+ $user_id = bbp_get_user_id( $user_id );
753
+ if ( empty( $user_id ) )
754
+ return false;
755
+
756
+ // Allow early overriding of the profile URL to cut down on processing
757
+ $early_profile_url = apply_filters( 'bbp_pre_get_subscriptions_permalink', (int) $user_id );
758
+ if ( is_string( $early_profile_url ) )
759
+ return $early_profile_url;
760
+
761
+ // Pretty permalinks
762
+ if ( $wp_rewrite->using_permalinks() ) {
763
+ $url = $wp_rewrite->root . bbp_get_user_slug() . '/%' . bbp_get_user_rewrite_id() . '%/%' . bbp_get_user_subscriptions_rewrite_id() . '%';
764
+ $user = get_userdata( $user_id );
765
+ if ( ! empty( $user->user_nicename ) ) {
766
+ $user_nicename = $user->user_nicename;
767
+ } else {
768
+ $user_nicename = $user->user_login;
769
+ }
770
+ $url = str_replace( '%' . bbp_get_user_rewrite_id() . '%', $user_nicename, $url );
771
+ $url = str_replace( '%' . bbp_get_user_subscriptions_rewrite_id() . '%', bbp_get_user_subscriptions_slug(), $url );
772
+ $url = home_url( user_trailingslashit( $url ) );
773
+
774
+ // Unpretty permalinks
775
+ } else {
776
+ $url = add_query_arg( array(
777
+ bbp_get_user_rewrite_id() => $user_id,
778
+ bbp_get_user_subscriptions_rewrite_id() => bbp_get_user_subscriptions_slug(),
779
+ ), home_url( '/' ) );
780
+ }
781
+
782
+ return apply_filters( 'bbp_get_subscriptions_permalink', $url, $user_id );
783
  }
784
 
785
  /**
964
  }
965
 
966
  /**
967
+ * Output blog role selector (for user edit)
968
  *
969
  * @since bbPress (r2688)
970
  */
971
+ function bbp_edit_user_blog_role() {
972
 
973
+ // Return if no user is being edited
974
+ if ( ! bbp_is_single_user_edit() )
975
  return;
976
 
977
+ // Get users current blog role
978
+ $user = get_userdata( bbp_get_displayed_user_id() );
979
+ $user_role = isset( $user->roles ) ? array_shift( $user->roles ) : ''; ?>
980
 
981
+ <select name="role" id="role">
982
+ <option value=""><?php _e( '&mdash; No role for this site &mdash;', 'bbpress' ); ?></option>
 
 
983
 
984
+ <?php foreach ( get_editable_roles() as $role => $details ) : ?>
 
 
985
 
986
+ <option <?php selected( $user_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>
987
+
988
+ <?php endforeach; ?>
 
 
 
 
989
 
990
+ </select>
991
+
992
+ <?php
993
+ }
994
+
995
+ /**
996
+ * Output forum role selector (for user edit)
997
+ *
998
+ * @since bbPress (r4284)
999
+ */
1000
+ function bbp_edit_user_forums_role() {
1001
+
1002
+ // Return if no user is being edited
1003
+ if ( ! bbp_is_single_user_edit() )
1004
+ return;
1005
+
1006
+ // Get the user's role
1007
+ $user_role = bbp_get_user_role( bbp_get_displayed_user_id() );
1008
+
1009
+ // Get the roles
1010
+ $dynamic_roles = bbp_get_dynamic_roles();
1011
+
1012
+ // Only keymasters can set other keymasters
1013
+ if ( ! current_user_can( 'keep_gate' ) )
1014
+ unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
1015
+
1016
+ <select name="bbp-forums-role" id="bbp-forums-role">
1017
+ <option value=""><?php _e( '&mdash; No role for this forum &mdash;', 'bbpress' ); ?></option>
1018
+
1019
+ <?php foreach ( $dynamic_roles as $role => $details ) : ?>
1020
+
1021
+ <option <?php selected( $user_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>
1022
+
1023
+ <?php endforeach; ?>
1024
+
1025
+ </select>
1026
+
1027
+ <?php
1028
  }
1029
 
1030
  /**
1044
  return apply_filters( 'bbp_edit_user_contact_methods', $contact_methods );
1045
  }
1046
 
1047
+ /** Topics Created ************************************************************/
1048
+
1049
+ /**
1050
+ * Output the link to the user's topics
1051
+ *
1052
+ * @since bbPress (r4225)
1053
+ *
1054
+ * @param int $user_id Optional. User id
1055
+ * @uses bbp_get_favorites_permalink() To get the favorites permalink
1056
+ */
1057
+ function bbp_user_topics_created_url( $user_id = 0 ) {
1058
+ echo bbp_get_user_topics_created_url( $user_id );
1059
+ }
1060
+ /**
1061
+ * Return the link to the user's topics
1062
+ *
1063
+ * @since bbPress (r4225)
1064
+ *
1065
+ * @param int $user_id Optional. User id
1066
+ * @uses bbp_get_user_profile_url() To get the user profile url
1067
+ * @uses apply_filters() Calls 'bbp_get_favorites_permalink' with the
1068
+ * user profile url and user id
1069
+ * @return string Permanent link to user profile page
1070
+ */
1071
+ function bbp_get_user_topics_created_url( $user_id = 0 ) {
1072
+ global $wp_rewrite;
1073
+
1074
+ // Use displayed user ID if there is one, and one isn't requested
1075
+ $user_id = bbp_get_user_id( $user_id );
1076
+ if ( empty( $user_id ) )
1077
+ return false;
1078
+
1079
+ // Allow early overriding of the profile URL to cut down on processing
1080
+ $early_url = apply_filters( 'bbp_pre_get_user_topics_created_url', (int) $user_id );
1081
+ if ( is_string( $early_url ) )
1082
+ return $early_url;
1083
+
1084
+ // Pretty permalinks
1085
+ if ( $wp_rewrite->using_permalinks() ) {
1086
+ $url = $wp_rewrite->root . bbp_get_user_slug() . '/%' . bbp_get_user_rewrite_id() . '%/topics';
1087
+ $user = get_userdata( $user_id );
1088
+ if ( ! empty( $user->user_nicename ) ) {
1089
+ $user_nicename = $user->user_nicename;
1090
+ } else {
1091
+ $user_nicename = $user->user_login;
1092
+ }
1093
+ $url = str_replace( '%' . bbp_get_user_rewrite_id() . '%', $user_nicename, $url );
1094
+ $url = home_url( user_trailingslashit( $url ) );
1095
+
1096
+ // Unpretty permalinks
1097
+ } else {
1098
+ $url = add_query_arg( array(
1099
+ bbp_get_user_rewrite_id() => $user_id,
1100
+ bbp_get_user_topics_rewrite_id() => '1',
1101
+ ), home_url( '/' ) );
1102
+ }
1103
+
1104
+ return apply_filters( 'bbp_get_user_topics_created_url', $url, $user_id );
1105
+ }
1106
+
1107
+ /** Topics Created ************************************************************/
1108
+
1109
+ /**
1110
+ * Output the link to the user's replies
1111
+ *
1112
+ * @since bbPress (r4225)
1113
+ *
1114
+ * @param int $user_id Optional. User id
1115
+ * @uses bbp_get_favorites_permalink() To get the favorites permalink
1116
+ */
1117
+ function bbp_user_replies_created_url( $user_id = 0 ) {
1118
+ echo bbp_get_user_replies_created_url( $user_id );
1119
+ }
1120
+ /**
1121
+ * Return the link to the user's replies
1122
+ *
1123
+ * @since bbPress (r4225)
1124
+ *
1125
+ * @param int $user_id Optional. User id
1126
+ * @uses bbp_get_user_profile_url() To get the user profile url
1127
+ * @uses apply_filters() Calls 'bbp_get_favorites_permalink' with the
1128
+ * user profile url and user id
1129
+ * @return string Permanent link to user profile page
1130
+ */
1131
+ function bbp_get_user_replies_created_url( $user_id = 0 ) {
1132
+ global $wp_rewrite;
1133
+
1134
+ // Use displayed user ID if there is one, and one isn't requested
1135
+ $user_id = bbp_get_user_id( $user_id );
1136
+ if ( empty( $user_id ) )
1137
+ return false;
1138
+
1139
+ // Allow early overriding of the profile URL to cut down on processing
1140
+ $early_url = apply_filters( 'bbp_pre_get_user_replies_created_url', (int) $user_id );
1141
+ if ( is_string( $early_url ) )
1142
+ return $early_url;
1143
+
1144
+ // Pretty permalinks
1145
+ if ( $wp_rewrite->using_permalinks() ) {
1146
+ $url = $wp_rewrite->root . bbp_get_user_slug() . '/%' . bbp_get_user_rewrite_id() . '%/replies';
1147
+ $user = get_userdata( $user_id );
1148
+ if ( ! empty( $user->user_nicename ) ) {
1149
+ $user_nicename = $user->user_nicename;
1150
+ } else {
1151
+ $user_nicename = $user->user_login;
1152
+ }
1153
+ $url = str_replace( '%' . bbp_get_user_rewrite_id() . '%', $user_nicename, $url );
1154
+ $url = home_url( user_trailingslashit( $url ) );
1155
+
1156
+ // Unpretty permalinks
1157
+ } else {
1158
+ $url = add_query_arg( array(
1159
+ bbp_get_user_rewrite_id() => $user_id,
1160
+ bbp_get_user_replies_rewrite_id() => '1',
1161
+ ), home_url( '/' ) );
1162
+ }
1163
+
1164
+ return apply_filters( 'bbp_get_user_replies_created_url', $url, $user_id );
1165
+ }
1166
+
1167
  /** Login *********************************************************************/
1168
 
1169
  /**
1363
  $post_id = $args;
1364
 
1365
  // Confirmed topic
1366
+ if ( bbp_is_topic( $post_id ) ) {
1367
  return bbp_get_topic_author_link( $args );
1368
 
1369
  // Confirmed reply
1370
+ } elseif ( bbp_is_reply( $post_id ) ) {
1371
  return bbp_get_reply_author_link( $args );
1372
 
1373
  // Get the post author and proceed
1374
+ } else {
1375
  $user_id = get_post_field( 'post_author', $post_id );
1376
+ }
1377
 
1378
  // Neither a reply nor a topic, so could be a revision
1379
  if ( !empty( $post_id ) ) {
1399
  }
1400
 
1401
  // Add links if not anonymous
1402
+ if ( empty( $anonymous ) && bbp_user_has_profile( $user_id ) ) {
1403
  foreach ( $author_links as $link_text ) {
1404
  $author_link[] = sprintf( '<a href="%1$s"%2$s>%3$s</a>', $author_url, $link_title, $link_text );
1405
  }
1457
  $retval = false;
1458
 
1459
  // User is a super admin
1460
+ if ( is_super_admin() ) {
1461
  $retval = true;
1462
 
1463
  // Forum is public, and user can read forums or is not logged in
1464
+ } elseif ( bbp_is_forum_public ( $forum_id, $check_ancestors ) ) {
1465
  $retval = true;
1466
 
1467
  // Forum is private, and user can see it
1468
+ } elseif ( bbp_is_forum_private( $forum_id, $check_ancestors ) && current_user_can( 'read_private_forums' ) ) {
1469
  $retval = true;
1470
 
1471
  // Forum is hidden, and user can see it
1472
+ } elseif ( bbp_is_forum_hidden ( $forum_id, $check_ancestors ) && current_user_can( 'read_hidden_forums' ) ) {
1473
  $retval = true;
1474
+ }
1475
 
1476
  return apply_filters( 'bbp_user_can_view_forum', $retval, $forum_id, $user_id );
1477
  }
1496
  $retval = false;
1497
 
1498
  // Always allow super admins
1499
+ if ( is_super_admin() ) {
1500
  $retval = true;
1501
 
1502
  // Do not allow anonymous if not enabled
1503
+ } elseif ( !is_user_logged_in() && bbp_allow_anonymous() ) {
1504
  $retval = true;
1505
 
1506
  // User is logged in
1507
+ } elseif ( current_user_can( 'publish_topics' ) ) {
1508
  $retval = true;
1509
+ }
1510
 
1511
  // Allow access to be filtered
1512
  return (bool) apply_filters( 'bbp_current_user_can_publish_forums', $retval );
1530
  $retval = false;
1531
 
1532
  // Always allow super admins
1533
+ if ( is_super_admin() ) {
1534
  $retval = true;
1535
 
1536
  // User is logged in
1537
+ } elseif ( current_user_can( 'publish_forums' ) ) {
1538
  $retval = true;
1539
+ }
1540
 
1541
  // Allow access to be filtered
1542
  return (bool) apply_filters( 'bbp_current_user_can_publish_forums', $retval );
1562
  $retval = false;
1563
 
1564
  // Always allow super admins
1565
+ if ( is_super_admin() ) {
1566
  $retval = true;
1567
 
1568
  // Do not allow anonymous if not enabled
1569
+ } elseif ( !is_user_logged_in() && bbp_allow_anonymous() ) {
1570
  $retval = true;
1571
 
1572
  // User is logged in
1573
+ } elseif ( current_user_can( 'publish_replies' ) ) {
1574
  $retval = true;
1575
+ }
1576
 
1577
  // Allow access to be filtered
1578
  return (bool) apply_filters( 'bbp_current_user_can_publish_replies', $retval );
1646
  $retval = false;
1647
 
1648
  // Always allow super admins
1649
+ if ( is_super_admin() ) {
1650
  $retval = true;
1651
 
1652
  // Looking at a single forum & forum is open
1653
+ } elseif ( ( is_page() || is_single() ) && bbp_is_forum_open() ) {
1654
  $retval = bbp_current_user_can_publish_forums();
1655
 
1656
  // User can edit this topic
1657
+ } elseif ( bbp_is_forum_edit() ) {
1658
  $retval = current_user_can( 'edit_forum', bbp_get_forum_id() );
1659
+ }
1660
 
1661
  // Allow access to be filtered
1662
  return (bool) apply_filters( 'bbp_current_user_can_access_create_forum_form', (bool) $retval );
1681
  $retval = false;
1682
 
1683
  // Always allow super admins
1684
+ if ( is_super_admin() ) {
1685
  $retval = true;
1686
 
1687
  // Looking at a single forum & forum is open
1688
+ } elseif ( ( bbp_is_single_forum() || is_page() || is_single() ) && bbp_is_forum_open() ) {
1689
  $retval = bbp_current_user_can_publish_topics();
1690
 
1691
  // User can edit this topic
1692
+ } elseif ( bbp_is_topic_edit() ) {
1693
  $retval = current_user_can( 'edit_topic', bbp_get_topic_id() );
1694
+ }
1695
 
1696
  // Allow access to be filtered
1697
  return (bool) apply_filters( 'bbp_current_user_can_access_create_topic_form', (bool) $retval );
1716
  $retval = false;
1717
 
1718
  // Always allow super admins
1719
+ if ( is_super_admin() ) {
1720
  $retval = true;
1721
 
1722
  // Looking at a single topic, topic is open, and forum is open
1723
+ } elseif ( ( bbp_is_single_topic() || is_page() || is_single() ) && bbp_is_topic_open() && bbp_is_forum_open() ) {
1724
  $retval = bbp_current_user_can_publish_replies();
1725
 
1726
  // User can edit this topic
1727
+ } elseif ( bbp_is_reply_edit() ) {
1728
  $retval = current_user_can( 'edit_reply', bbp_get_reply_id() );
1729
+ }
1730
 
1731
  // Allow access to be filtered
1732
  return (bool) apply_filters( 'bbp_current_user_can_access_create_reply_form', (bool) $retval );
{bbp-languages → languages}/bbpress.pot RENAMED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the bbPress package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: bbPress 2.1.2\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/bbpress\n"
7
- "POT-Creation-Date: 2012-08-01 07:39:37+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,268 +12,759 @@ msgstr ""
12
  "Last-Translator: JOHN JAMES JACOBY <jjj@bbpress.org>\n"
13
  "Language-Team: ENGLISH <jjj@bbpress.org>\n"
14
 
15
- #: bbp-admin/bbp-admin.php:163 bbp-admin/bbp-functions.php:191
16
- #: bbp-admin/bbp-tools.php:34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  msgid "Repair Forums"
18
  msgstr ""
19
 
20
- #: bbp-admin/bbp-admin.php:164
21
  msgid "Forum Repair"
22
  msgstr ""
23
 
24
- #: bbp-admin/bbp-admin.php:173 bbp-admin/bbp-functions.php:195
25
- #: bbp-admin/bbp-settings.php:1185
26
  msgid "Import Forums"
27
  msgstr ""
28
 
29
- #: bbp-admin/bbp-admin.php:174
30
  msgid "Forum Import"
31
  msgstr ""
32
 
33
- #: bbp-admin/bbp-admin.php:183 bbp-admin/bbp-functions.php:199
34
- #: bbp-admin/bbp-tools.php:855
35
  msgid "Reset Forums"
36
  msgstr ""
37
 
38
- #: bbp-admin/bbp-admin.php:184
39
  msgid "Forum Reset"
40
  msgstr ""
41
 
42
- #: bbp-admin/bbp-admin.php:198 bbp-admin/bbp-admin.php:199
43
- #: bbp-admin/bbp-admin.php:209 bbp-admin/bbp-admin.php:210
44
- #: bbp-includes/bbp-extend-buddypress.php:834
45
- #: bbp-includes/bbp-extend-buddypress.php:891
46
- #: bbp-includes/bbp-extend-buddypress.php:982
47
- #: bbp-includes/bbp-extend-buddypress.php:1035
48
- #: bbp-includes/bbp-extend-buddypress.php:1430
49
- #: bbp-theme-compat/extras/page-forum-statistics.php:39
50
- #: bbp-themes/bbp-twentyten/page-forum-statistics.php:38 bbpress.php:475
51
- #: bbpress.php:476
52
- msgid "Forums"
53
  msgstr ""
54
 
55
- #: bbp-admin/bbp-admin.php:227 bbp-admin/bbp-admin.php:228
56
- #: bbp-admin/bbp-admin.php:732 bbp-admin/bbp-admin.php:808
 
57
  msgid "Update Forums"
58
  msgstr ""
59
 
60
- #: bbp-admin/bbp-admin.php:351
61
  msgid "Settings"
62
  msgstr ""
63
 
64
- #: bbp-admin/bbp-admin.php:366
 
 
 
 
65
  msgid "Right Now in Forums"
66
  msgstr ""
67
 
68
- #: bbp-admin/bbp-admin.php:647
 
69
  msgid "Green"
70
  msgstr ""
71
 
72
- #: bbp-admin/bbp-admin.php:668 bbp-admin/bbp-admin.php:706
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  msgid "Update Forum"
74
  msgstr ""
75
 
76
- #: bbp-admin/bbp-admin.php:695 bbp-admin/bbp-admin.php:749
77
  msgid "All done!"
78
  msgstr ""
79
 
80
- #: bbp-admin/bbp-admin.php:696 bbp-admin/bbp-admin.php:750
81
  msgid "Go Back"
82
  msgstr ""
83
 
84
- #: bbp-admin/bbp-admin.php:705
85
  msgid ""
86
  "You can update your forum through this page. Hit the link below to update."
87
  msgstr ""
88
 
89
- #: bbp-admin/bbp-admin.php:777
90
  msgid ""
91
  "Warning! Problem updating %1$s. Your server may not be able to connect to "
92
  "sites running on it. Error message: <em>%2$s</em>"
93
  msgstr ""
94
 
95
- #: bbp-admin/bbp-admin.php:788
96
  msgid ""
97
  "If your browser doesn&#8217;t start loading the next page automatically, "
98
  "click this link:"
99
  msgstr ""
100
 
101
- #: bbp-admin/bbp-admin.php:789
102
  msgid "Next Forums"
103
  msgstr ""
104
 
105
- #: bbp-admin/bbp-admin.php:807
106
  msgid ""
107
  "You can update all the forums on your network through this page. It works by "
108
  "calling the update script of each site automatically. Hit the link below to "
109
  "update."
110
  msgstr ""
111
 
112
- #: bbp-admin/bbp-converter.php:80
113
  msgid "Database Settings"
114
  msgstr ""
115
 
116
- #: bbp-admin/bbp-converter.php:83
117
  msgid "Select Platform"
118
  msgstr ""
119
 
120
- #: bbp-admin/bbp-converter.php:87
121
  msgid "Database Server"
122
  msgstr ""
123
 
124
- #: bbp-admin/bbp-converter.php:91
125
  msgid "Database Port"
126
  msgstr ""
127
 
128
- #: bbp-admin/bbp-converter.php:95
129
  msgid "Database Name"
130
  msgstr ""
131
 
132
- #: bbp-admin/bbp-converter.php:99
133
  msgid "Database User"
134
  msgstr ""
135
 
136
- #: bbp-admin/bbp-converter.php:103
137
  msgid "Database Password"
138
  msgstr ""
139
 
140
- #: bbp-admin/bbp-converter.php:107
141
  msgid "Table Prefix"
142
  msgstr ""
143
 
144
- #: bbp-admin/bbp-converter.php:111
145
  msgid "Options"
146
  msgstr ""
147
 
148
- #: bbp-admin/bbp-converter.php:114
149
  msgid "Rows Limit"
150
  msgstr ""
151
 
152
- #: bbp-admin/bbp-converter.php:118
153
  msgid "Delay Time"
154
  msgstr ""
155
 
156
- #: bbp-admin/bbp-converter.php:122
157
  msgid "Convert Users"
158
  msgstr ""
159
 
160
- #: bbp-admin/bbp-converter.php:126
161
  msgid "Start Over"
162
  msgstr ""
163
 
164
- #: bbp-admin/bbp-converter.php:130
165
  msgid "Purge Previous Import"
166
  msgstr ""
167
 
168
- #: bbp-admin/bbp-converter.php:219
169
  msgid "Starting Conversion"
170
  msgstr ""
171
 
172
- #: bbp-admin/bbp-converter.php:244 bbp-admin/bbp-converter.php:471
173
  msgid "Conversion Complete"
174
  msgstr ""
175
 
176
- #: bbp-admin/bbp-converter.php:338
177
  msgid "No data to clean"
178
  msgstr ""
179
 
180
- #: bbp-admin/bbp-converter.php:342
181
  msgid "Deleting previously converted data (%1$s - %2$s)"
182
  msgstr ""
183
 
184
- #: bbp-admin/bbp-converter.php:358
185
  msgid "No users to convert"
186
  msgstr ""
187
 
188
- #: bbp-admin/bbp-converter.php:362
189
  msgid "Converting users (%1$s - %2$s)"
190
  msgstr ""
191
 
192
- #: bbp-admin/bbp-converter.php:378
193
  msgid "No passwords to clear"
194
  msgstr ""
195
 
196
- #: bbp-admin/bbp-converter.php:382
197
  msgid "Delete users wordpress default passwords (%1$s - %2$s)"
198
  msgstr ""
199
 
200
- #: bbp-admin/bbp-converter.php:397
201
  msgid "No forums to convert"
202
  msgstr ""
203
 
204
- #: bbp-admin/bbp-converter.php:401
205
  msgid "Converting forums (%1$s - %2$s)"
206
  msgstr ""
207
 
208
- #: bbp-admin/bbp-converter.php:412
209
  msgid "No forum parents to convert"
210
  msgstr ""
211
 
212
- #: bbp-admin/bbp-converter.php:416
213
  msgid "Calculating forum hierarchy (%1$s - %2$s)"
214
  msgstr ""
215
 
216
- #: bbp-admin/bbp-converter.php:427
217
  msgid "No topics to convert"
218
  msgstr ""
219
 
220
- #: bbp-admin/bbp-converter.php:431
221
  msgid "Converting topics (%1$s - %2$s)"
222
  msgstr ""
223
 
224
- #: bbp-admin/bbp-converter.php:442
225
  msgid "No tags to convert"
226
  msgstr ""
227
 
228
- #: bbp-admin/bbp-converter.php:446
229
  msgid "Converting topic tags (%1$s - %2$s)"
230
  msgstr ""
231
 
232
- #: bbp-admin/bbp-converter.php:457
233
  msgid "No replies to convert"
234
  msgstr ""
235
 
236
- #: bbp-admin/bbp-converter.php:461
237
  msgid "Converting replies (%1$s - %2$s)"
238
  msgstr ""
239
 
240
- #: bbp-admin/bbp-forums.php:120 bbp-admin/bbp-replies.php:132
241
- #: bbp-admin/bbp-settings.php:1225 bbp-admin/bbp-topics.php:132
 
 
 
 
242
  msgid "Overview"
243
  msgstr ""
244
 
245
- #: bbp-admin/bbp-forums.php:122
246
  msgid ""
247
  "This screen displays the individual forums on your site. You can customize "
248
  "the display of this screen to suit your workflow."
249
  msgstr ""
250
 
251
- #: bbp-admin/bbp-forums.php:128 bbp-admin/bbp-replies.php:140
252
- #: bbp-admin/bbp-topics.php:140
253
  msgid "Screen Content"
254
  msgstr ""
255
 
256
- #: bbp-admin/bbp-forums.php:130 bbp-admin/bbp-replies.php:142
257
- #: bbp-admin/bbp-topics.php:142
258
  msgid ""
259
  "You can customize the display of this screen&#8217;s contents in a number of "
260
  "ways:"
261
  msgstr ""
262
 
263
- #: bbp-admin/bbp-forums.php:132
264
  msgid ""
265
  "You can hide/display columns based on your needs and decide how many forums "
266
  "to list per screen using the Screen Options tab."
267
  msgstr ""
268
 
269
- #: bbp-admin/bbp-forums.php:133
270
  msgid ""
271
  "You can filter the list of forums by forum status using the text links in "
272
  "the upper left to show All, Published, or Trashed forums. The default view "
273
  "is to show all forums."
274
  msgstr ""
275
 
276
- #: bbp-admin/bbp-forums.php:134
277
  msgid ""
278
  "You can refine the list to show only forums from a specific month by using "
279
  "the dropdown menus above the forums list. Click the Filter button after "
@@ -281,81 +772,81 @@ msgid ""
281
  "creator in the forums list."
282
  msgstr ""
283
 
284
- #: bbp-admin/bbp-forums.php:141 bbp-admin/bbp-replies.php:154
285
- #: bbp-admin/bbp-topics.php:153
286
  msgid "Available Actions"
287
  msgstr ""
288
 
289
- #: bbp-admin/bbp-forums.php:143
290
  msgid ""
291
  "Hovering over a row in the forums list will display action links that allow "
292
  "you to manage your forum. You can perform the following actions:"
293
  msgstr ""
294
 
295
- #: bbp-admin/bbp-forums.php:145 bbp-admin/bbp-topics.php:157
296
  msgid ""
297
  "<strong>Edit</strong> takes you to the editing screen for that forum. You "
298
  "can also reach that screen by clicking on the forum title."
299
  msgstr ""
300
 
301
- #: bbp-admin/bbp-forums.php:146 bbp-admin/bbp-topics.php:158
302
  msgid ""
303
  "<strong>Trash</strong> removes your forum from this list and places it in "
304
  "the trash, from which you can permanently delete it."
305
  msgstr ""
306
 
307
- #: bbp-admin/bbp-forums.php:147
308
  msgid ""
309
  "<strong>View</strong> will show you what your draft forum will look like if "
310
  "you publish it. View will take you to your live site to view the forum. "
311
  "Which link is available depends on your forum&#8217;s status."
312
  msgstr ""
313
 
314
- #: bbp-admin/bbp-forums.php:154 bbp-admin/bbp-replies.php:169
315
- #: bbp-admin/bbp-topics.php:167
316
  msgid "Bulk Actions"
317
  msgstr ""
318
 
319
- #: bbp-admin/bbp-forums.php:156
320
  msgid ""
321
  "You can also edit or move multiple forums to the trash at once. Select the "
322
  "forums you want to act on using the checkboxes, then select the action you "
323
  "want to take from the Bulk Actions menu and click Apply."
324
  msgstr ""
325
 
326
- #: bbp-admin/bbp-forums.php:157
327
  msgid ""
328
  "When using Bulk Edit, you can change the metadata (categories, author, etc.) "
329
  "for all selected forums at once. To remove a forum from the grouping, just "
330
  "click the x next to its name in the Bulk Edit area that appears."
331
  msgstr ""
332
 
333
- #: bbp-admin/bbp-forums.php:162 bbp-admin/bbp-forums.php:233
334
- #: bbp-admin/bbp-replies.php:177 bbp-admin/bbp-replies.php:245
335
- #: bbp-admin/bbp-settings.php:1270 bbp-admin/bbp-topics.php:175
336
- #: bbp-admin/bbp-topics.php:243
337
  msgid "For more information:"
338
  msgstr ""
339
 
340
- #: bbp-admin/bbp-forums.php:163 bbp-admin/bbp-forums.php:234
341
- #: bbp-admin/bbp-replies.php:178 bbp-admin/bbp-replies.php:246
342
- #: bbp-admin/bbp-settings.php:1271 bbp-admin/bbp-topics.php:176
343
- #: bbp-admin/bbp-topics.php:244
344
  msgid ""
345
  "<a href=\"http://codex.bbpress.org\" target=\"_blank\">bbPress "
346
  "Documentation</a>"
347
  msgstr ""
348
 
349
- #: bbp-admin/bbp-forums.php:164 bbp-admin/bbp-forums.php:235
350
- #: bbp-admin/bbp-replies.php:179 bbp-admin/bbp-replies.php:247
351
- #: bbp-admin/bbp-settings.php:1272 bbp-admin/bbp-topics.php:177
352
- #: bbp-admin/bbp-topics.php:245
353
  msgid ""
354
  "<a href=\"http://bbpress.org/forums/\" target=\"_blank\">bbPress Support "
355
  "Forums</a>"
356
  msgstr ""
357
 
358
- #: bbp-admin/bbp-forums.php:178
359
  msgid ""
360
  "The title field and the big forum editing Area are fixed in place, but you "
361
  "can reposition all the other boxes using drag and drop, and can minimize or "
@@ -365,22 +856,22 @@ msgid ""
365
  "screen."
366
  msgstr ""
367
 
368
- #: bbp-admin/bbp-forums.php:182 bbp-admin/bbp-replies.php:197
369
- #: bbp-admin/bbp-topics.php:195
370
  msgid "Customizing This Display"
371
  msgstr ""
372
 
373
- #: bbp-admin/bbp-forums.php:188
374
  msgid "Title and Forum Editor"
375
  msgstr ""
376
 
377
- #: bbp-admin/bbp-forums.php:190
378
  msgid ""
379
  "<strong>Title</strong> - Enter a title for your forum. After you enter a "
380
  "title, you&#8217;ll see the permalink below, which you can edit."
381
  msgstr ""
382
 
383
- #: bbp-admin/bbp-forums.php:191
384
  msgid ""
385
  "<strong>Forum Editor</strong> - Enter the text for your forum. There are two "
386
  "modes of editing: Visual and HTML. Choose the mode by clicking on the "
@@ -394,7 +885,7 @@ msgid ""
394
  "over the top area. Exit Fullscreen back to the regular forum editor."
395
  msgstr ""
396
 
397
- #: bbp-admin/bbp-forums.php:194
398
  msgid ""
399
  "<strong>Publish</strong> - You can set the terms of publishing your forum in "
400
  "the Publish box. For Status, Visibility, and Publish (immediately), click on "
@@ -405,7 +896,7 @@ msgid ""
405
  "future or backdate a forum."
406
  msgstr ""
407
 
408
- #: bbp-admin/bbp-forums.php:197
409
  msgid ""
410
  "<strong>forum Format</strong> - This designates how your theme will display "
411
  "a specific forum. For example, you could have a <em>standard</em> blog forum "
@@ -416,7 +907,7 @@ msgid ""
416
  "formats."
417
  msgstr ""
418
 
419
- #: bbp-admin/bbp-forums.php:201
420
  msgid ""
421
  "<strong>Featured Image</strong> - This allows you to associate an image with "
422
  "your forum without inserting it. This is usually useful only if your theme "
@@ -424,54 +915,54 @@ msgid ""
424
  "custom header, etc."
425
  msgstr ""
426
 
427
- #: bbp-admin/bbp-forums.php:206 bbp-admin/bbp-forums.php:254
428
  msgid "Forum Attributes"
429
  msgstr ""
430
 
431
- #: bbp-admin/bbp-forums.php:208
432
  msgid "Select the attributes that your forum should have:"
433
  msgstr ""
434
 
435
- #: bbp-admin/bbp-forums.php:210
436
  msgid ""
437
  "<strong>Type</strong> indicates if the forum is a category or forum. "
438
  "Categories generally contain other forums."
439
  msgstr ""
440
 
441
- #: bbp-admin/bbp-forums.php:211
442
  msgid ""
443
  "<strong>Status</strong> allows you to close a forum to new topics and forums."
444
  msgstr ""
445
 
446
- #: bbp-admin/bbp-forums.php:212
447
  msgid ""
448
  "<strong>Visibility</strong> lets you pick the scope of each forum and what "
449
  "users are allowed to access it."
450
  msgstr ""
451
 
452
- #: bbp-admin/bbp-forums.php:213
453
  msgid ""
454
  "<strong>Parent</strong> dropdown determines the parent forum. Select the "
455
  "forum or category from the dropdown, or leave the default (No Parent) to "
456
  "create the forum at the root of your forums."
457
  msgstr ""
458
 
459
- #: bbp-admin/bbp-forums.php:214
460
  msgid "<strong>Order</strong> allows you to order your forums numerically."
461
  msgstr ""
462
 
463
- #: bbp-admin/bbp-forums.php:220 bbp-admin/bbp-replies.php:232
464
- #: bbp-admin/bbp-topics.php:230
465
  msgid "Publish Box"
466
  msgstr ""
467
 
468
- #: bbp-admin/bbp-forums.php:226 bbp-admin/bbp-replies.php:238
469
- #: bbp-admin/bbp-topics.php:236
470
  msgid "Discussion Settings"
471
  msgstr ""
472
 
473
- #: bbp-admin/bbp-forums.php:228 bbp-admin/bbp-replies.php:240
474
- #: bbp-admin/bbp-topics.php:238
475
  msgid ""
476
  "<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy "
477
  "blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to "
@@ -479,301 +970,230 @@ msgid ""
479
  "notified automatically using pingbacks, and this field is unnecessary."
480
  msgstr ""
481
 
482
- #: bbp-admin/bbp-forums.php:229
483
  msgid ""
484
  "<strong>Discussion</strong> - You can turn comments and pings on or off, and "
485
  "if there are comments on the forum, you can see them here and moderate them."
486
  msgstr ""
487
 
488
- #: bbp-admin/bbp-forums.php:420 bbp-admin/bbp-metaboxes.php:50
489
- #: bbp-admin/bbp-metaboxes.php:345 bbp-admin/bbp-metaboxes.php:348
490
- #: bbp-admin/bbp-metaboxes.php:396 bbp-admin/bbp-metaboxes.php:399
491
- #: bbp-admin/bbp-replies.php:616 bbp-admin/bbp-topics.php:678
492
- #: bbp-includes/bbp-extend-buddypress.php:1405
493
- #: bbp-includes/bbp-forum-template.php:2124
494
- #: bbp-theme-compat/bbpress/loop-forums.php:19
495
- #: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:18 bbpress.php:477
496
- msgid "Forum"
497
- msgstr ""
498
-
499
- #: bbp-admin/bbp-forums.php:421 bbp-admin/bbp-settings.php:171
500
- #: bbp-admin/bbp-settings.php:192 bbp-admin/bbp-topics.php:677
501
- #: bbp-includes/bbp-extend-buddypress.php:432
502
- #: bbp-includes/bbp-extend-buddypress.php:1434
503
- #: bbp-includes/bbp-forum-template.php:2272
504
- #: bbp-theme-compat/bbpress/loop-forums.php:20
505
- #: bbp-theme-compat/extras/page-forum-statistics.php:44
506
- #: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:19
507
- #: bbp-themes/bbp-twentyten/page-forum-statistics.php:43 bbpress.php:532
508
- #: bbpress.php:533
509
- msgid "Topics"
510
- msgstr ""
511
-
512
- #: bbp-admin/bbp-forums.php:422 bbp-admin/bbp-settings.php:179
513
- #: bbp-admin/bbp-settings.php:200 bbp-admin/bbp-topics.php:679
514
- #: bbp-includes/bbp-extend-buddypress.php:433
515
- #: bbp-includes/bbp-forum-template.php:2336
516
- #: bbp-includes/bbp-theme-compatibility.php:493
517
- #: bbp-theme-compat/bbpress/loop-forums.php:21
518
- #: bbp-theme-compat/bbpress/loop-replies.php:32
519
- #: bbp-theme-compat/bbpress/loop-replies.php:62
520
- #: bbp-theme-compat/bbpress/loop-topics.php:21
521
- #: bbp-theme-compat/extras/page-forum-statistics.php:49
522
- #: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:20
523
- #: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:30
524
- #: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:49
525
- #: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:19
526
- #: bbp-themes/bbp-twentyten/page-forum-statistics.php:48
527
- #: bbp-themes/bbp-twentyten/single-reply.php:30 bbpress.php:589
528
- #: bbpress.php:590
529
- msgid "Replies"
530
- msgstr ""
531
-
532
- #: bbp-admin/bbp-forums.php:423
533
- #: bbp-theme-compat/bbpress/content-single-topic-lead.php:18
534
- #: bbp-theme-compat/bbpress/content-single-topic-lead.php:90
535
- #: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:17
536
  msgid "Creator"
537
  msgstr ""
538
 
539
- #: bbp-admin/bbp-forums.php:424 bbp-admin/bbp-replies.php:619
540
- #: bbp-admin/bbp-topics.php:682
541
  msgid "Created"
542
  msgstr ""
543
 
544
- #: bbp-admin/bbp-forums.php:425 bbp-admin/bbp-topics.php:683
545
- #: bbp-theme-compat/bbpress/loop-forums.php:22
546
- #: bbp-theme-compat/bbpress/loop-topics.php:22
547
- #: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:21
548
- #: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:20
549
  msgid "Freshness"
550
  msgstr ""
551
 
552
- #: bbp-admin/bbp-forums.php:462 bbp-admin/bbp-replies.php:727
553
- #: bbp-admin/bbp-topics.php:762
554
  msgid "%1$s <br /> %2$s"
555
  msgstr ""
556
 
557
- #: bbp-admin/bbp-forums.php:474 bbp-includes/bbp-forum-template.php:541
558
  msgid "No Topics"
559
  msgstr ""
560
 
561
- #: bbp-admin/bbp-forums.php:540
562
  msgid "Forum updated. <a href=\"%s\">View forum</a>"
563
  msgstr ""
564
 
565
- #: bbp-admin/bbp-forums.php:543 bbp-admin/bbp-replies.php:899
566
- #: bbp-admin/bbp-topics.php:968
567
  msgid "Custom field updated."
568
  msgstr ""
569
 
570
- #: bbp-admin/bbp-forums.php:546 bbp-admin/bbp-replies.php:902
571
- #: bbp-admin/bbp-topics.php:971
572
  msgid "Custom field deleted."
573
  msgstr ""
574
 
575
- #: bbp-admin/bbp-forums.php:549
576
  msgid "Forum updated."
577
  msgstr ""
578
 
579
  #. translators: %s: date and time of the revision
580
- #: bbp-admin/bbp-forums.php:554
581
  msgid "Forum restored to revision from %s"
582
  msgstr ""
583
 
584
- #: bbp-admin/bbp-forums.php:558
585
  msgid "Forum created. <a href=\"%s\">View forum</a>"
586
  msgstr ""
587
 
588
- #: bbp-admin/bbp-forums.php:561
589
  msgid "Forum saved."
590
  msgstr ""
591
 
592
- #: bbp-admin/bbp-forums.php:564
593
  msgid "Forum submitted. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
594
  msgstr ""
595
 
596
- #: bbp-admin/bbp-forums.php:567
597
  msgid ""
598
  "Forum scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
599
  "\">Preview forum</a>"
600
  msgstr ""
601
 
602
  #. translators: Publish box date format, see http:php.net/date
603
- #: bbp-admin/bbp-forums.php:569 bbp-admin/bbp-replies.php:925
604
- #: bbp-admin/bbp-topics.php:994
605
  msgid "M j, Y @ G:i"
606
  msgstr ""
607
 
608
- #: bbp-admin/bbp-forums.php:574
609
  msgid "Forum draft updated. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
610
  msgstr ""
611
 
612
- #: bbp-admin/bbp-metaboxes.php:42
613
  msgid "Discussion"
614
  msgstr ""
615
 
616
- #: bbp-admin/bbp-metaboxes.php:67 bbp-admin/bbp-metaboxes.php:421
617
- #: bbp-admin/bbp-metaboxes.php:424 bbp-admin/bbp-replies.php:617
618
- #: bbp-theme-compat/bbpress/content-single-topic-lead.php:22
619
- #: bbp-theme-compat/bbpress/content-single-topic-lead.php:94
620
- #: bbp-theme-compat/bbpress/loop-topics.php:19
621
- #: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:20
622
- #: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:17 bbpress.php:534
623
- msgid "Topic"
624
- msgid_plural "Topics"
625
- msgstr[0] ""
626
- msgstr[1] ""
627
-
628
- #: bbp-admin/bbp-metaboxes.php:84 bbpress.php:591
629
- msgid "Reply"
630
- msgid_plural "Replies"
631
- msgstr[0] ""
632
- msgstr[1] ""
633
-
634
- #: bbp-admin/bbp-metaboxes.php:101 bbpress.php:745
635
- msgid "Topic Tag"
636
- msgid_plural "Topic Tags"
637
- msgstr[0] ""
638
- msgstr[1] ""
639
-
640
- #: bbp-admin/bbp-metaboxes.php:123
641
  msgid "Users &amp; Moderation"
642
  msgstr ""
643
 
644
- #: bbp-admin/bbp-metaboxes.php:131
645
  msgid "User"
646
  msgid_plural "Users"
647
  msgstr[0] ""
648
  msgstr[1] ""
649
 
650
- #: bbp-admin/bbp-metaboxes.php:150
651
  msgid "Hidden Topic"
652
  msgid_plural "Hidden Topics"
653
  msgstr[0] ""
654
  msgstr[1] ""
655
 
656
- #: bbp-admin/bbp-metaboxes.php:172
657
  msgid "Hidden Reply"
658
  msgid_plural "Hidden Replies"
659
  msgstr[0] ""
660
  msgstr[1] ""
661
 
662
- #: bbp-admin/bbp-metaboxes.php:194
663
  msgid "Empty Topic Tag"
664
  msgid_plural "Empty Topic Tags"
665
  msgstr[0] ""
666
  msgstr[1] ""
667
 
668
- #: bbp-admin/bbp-metaboxes.php:218
669
  msgid "You are using <span class=\"b\">bbPress %s</span>."
670
  msgstr ""
671
 
672
- #: bbp-admin/bbp-metaboxes.php:257 bbp-admin/bbp-metaboxes.php:258
 
673
  msgid "Type:"
674
  msgstr ""
675
 
676
- #: bbp-admin/bbp-metaboxes.php:269 bbp-admin/bbp-metaboxes.php:270
677
- #: bbp-theme-compat/bbpress/form-forum.php:111
678
- #: bbp-themes/bbp-twentyten/bbpress/form-forum.php:111
679
  msgid "Status:"
680
  msgstr ""
681
 
682
- #: bbp-admin/bbp-metaboxes.php:281 bbp-admin/bbp-metaboxes.php:282
683
- #: bbp-theme-compat/bbpress/form-forum.php:120
684
- #: bbp-themes/bbp-twentyten/bbpress/form-forum.php:120
685
  msgid "Visibility:"
686
  msgstr ""
687
 
688
- #: bbp-admin/bbp-metaboxes.php:295
689
  msgid "Parent:"
690
  msgstr ""
691
 
692
- #: bbp-admin/bbp-metaboxes.php:296
693
  msgid "Forum Parent"
694
  msgstr ""
695
 
696
- #: bbp-admin/bbp-metaboxes.php:302 bbp-theme-compat/bbpress/form-forum.php:134
697
- #: bbp-themes/bbp-twentyten/bbpress/form-forum.php:134
698
- msgid "(No Parent)"
699
  msgstr ""
700
 
701
- #: bbp-admin/bbp-metaboxes.php:311
702
  msgid "Order:"
703
  msgstr ""
704
 
705
- #: bbp-admin/bbp-metaboxes.php:312
706
  msgid "Forum Order"
707
  msgstr ""
708
 
709
- #: bbp-admin/bbp-metaboxes.php:342 bbp-admin/bbp-topics.php:740
710
- msgid "(No Forum)"
711
- msgstr ""
712
-
713
- #: bbp-admin/bbp-metaboxes.php:352 bbp-admin/bbp-metaboxes.php:355
714
  msgid "Topic Type"
715
  msgstr ""
716
 
717
- #: bbp-admin/bbp-metaboxes.php:393
718
- msgid "(Use Forum of Topic)"
 
719
  msgstr ""
720
 
721
- #: bbp-admin/bbp-metaboxes.php:414
722
- msgid "(No Topic)"
 
 
723
  msgstr ""
724
 
725
- #: bbp-admin/bbp-metaboxes.php:455 bbp-admin/bbp-metaboxes.php:458
726
- #: bbp-theme-compat/bbpress/form-user-edit.php:14
727
- #: bbp-theme-compat/bbpress/form-user-edit.php:19
728
- #: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:14
729
- #: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:19
730
- msgid "Name"
731
  msgstr ""
732
 
733
- #: bbp-admin/bbp-metaboxes.php:462 bbp-admin/bbp-metaboxes.php:465
734
- #: bbp-theme-compat/bbpress/form-user-edit.php:105
735
- #: bbp-theme-compat/bbpress/form-user-register.php:28
736
- #: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:105
737
- #: bbp-themes/bbp-twentyten/bbpress/form-user-register.php:28
738
  msgid "Email"
739
  msgstr ""
740
 
741
- #: bbp-admin/bbp-metaboxes.php:469 bbp-admin/bbp-metaboxes.php:472
742
- #: bbp-theme-compat/bbpress/form-user-edit.php:57
743
- #: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:57
 
 
 
 
744
  msgid "Website"
745
  msgstr ""
746
 
747
- #: bbp-admin/bbp-metaboxes.php:478 bbp-admin/bbp-metaboxes.php:481
 
 
 
 
748
  msgid "IP Address"
749
  msgstr ""
750
 
751
- #: bbp-admin/bbp-replies.php:134
752
  msgid ""
753
  "This screen provides access to all of your replies. You can customize the "
754
  "display of this screen to suit your workflow."
755
  msgstr ""
756
 
757
- #: bbp-admin/bbp-replies.php:144
758
  msgid ""
759
  "You can hide/display columns based on your needs and decide how many replies "
760
  "to list per screen using the Screen Options tab."
761
  msgstr ""
762
 
763
- #: bbp-admin/bbp-replies.php:145
764
  msgid ""
765
  "You can filter the list of replies by reply status using the text links in "
766
  "the upper left to show All, Published, Draft, or Trashed replies. The "
767
  "default view is to show all replies."
768
  msgstr ""
769
 
770
- #: bbp-admin/bbp-replies.php:146
771
  msgid ""
772
  "You can view replies in a simple title list or with an excerpt. Choose the "
773
  "view you prefer by clicking on the icons at the top of the list on the right."
774
  msgstr ""
775
 
776
- #: bbp-admin/bbp-replies.php:147
777
  msgid ""
778
  "You can refine the list to show only replies in a specific category or from "
779
  "a specific month by using the dropdown menus above the replies list. Click "
@@ -781,52 +1201,52 @@ msgid ""
781
  "by clicking on the reply author, category or tag in the replies list."
782
  msgstr ""
783
 
784
- #: bbp-admin/bbp-replies.php:156
785
  msgid ""
786
  "Hovering over a row in the replies list will display action links that allow "
787
  "you to manage your reply. You can perform the following actions:"
788
  msgstr ""
789
 
790
- #: bbp-admin/bbp-replies.php:158
791
  msgid ""
792
  "<strong>Edit</strong> takes you to the editing screen for that reply. You "
793
  "can also reach that screen by clicking on the reply title."
794
  msgstr ""
795
 
796
- #: bbp-admin/bbp-replies.php:160
797
  msgid ""
798
  "<strong>Trash</strong> removes your reply from this list and places it in "
799
  "the trash, from which you can permanently delete it."
800
  msgstr ""
801
 
802
- #: bbp-admin/bbp-replies.php:161
803
  msgid ""
804
  "<strong>Spam</strong> removes your reply from this list and places it in the "
805
  "spam queue, from which you can permanently delete it."
806
  msgstr ""
807
 
808
- #: bbp-admin/bbp-replies.php:162
809
  msgid ""
810
  "<strong>Preview</strong> will show you what your draft reply will look like "
811
  "if you publish it. View will take you to your live site to view the reply. "
812
  "Which link is available depends on your reply&#8217;s status."
813
  msgstr ""
814
 
815
- #: bbp-admin/bbp-replies.php:171
816
  msgid ""
817
  "You can also edit or move multiple replies to the trash at once. Select the "
818
  "replies you want to act on using the checkboxes, then select the action you "
819
  "want to take from the Bulk Actions menu and click Apply."
820
  msgstr ""
821
 
822
- #: bbp-admin/bbp-replies.php:172
823
  msgid ""
824
  "When using Bulk Edit, you can change the metadata (categories, author, etc.) "
825
  "for all selected replies at once. To remove a reply from the grouping, just "
826
  "click the x next to its name in the Bulk Edit area that appears."
827
  msgstr ""
828
 
829
- #: bbp-admin/bbp-replies.php:193
830
  msgid ""
831
  "The title field and the big reply editing Area are fixed in place, but you "
832
  "can reposition all the other boxes using drag and drop, and can minimize or "
@@ -836,17 +1256,17 @@ msgid ""
836
  "screen."
837
  msgstr ""
838
 
839
- #: bbp-admin/bbp-replies.php:203
840
  msgid "Title and Reply Editor"
841
  msgstr ""
842
 
843
- #: bbp-admin/bbp-replies.php:205
844
  msgid ""
845
  "<strong>Title</strong> - Enter a title for your reply. After you enter a "
846
  "title, you&#8217;ll see the permalink below, which you can edit."
847
  msgstr ""
848
 
849
- #: bbp-admin/bbp-replies.php:206
850
  msgid ""
851
  "<strong>Reply Editor</strong> - Enter the text for your reply. There are two "
852
  "modes of editing: Visual and HTML. Choose the mode by clicking on the "
@@ -860,7 +1280,7 @@ msgid ""
860
  "over the top area. Exit Fullscreen back to the regular reply editor."
861
  msgstr ""
862
 
863
- #: bbp-admin/bbp-replies.php:209
864
  msgid ""
865
  "<strong>Publish</strong> - You can set the terms of publishing your reply in "
866
  "the Publish box. For Status, Visibility, and Publish (immediately), click on "
@@ -871,7 +1291,7 @@ msgid ""
871
  "future or backdate a reply."
872
  msgstr ""
873
 
874
- #: bbp-admin/bbp-replies.php:212
875
  msgid ""
876
  "<strong>reply Format</strong> - This designates how your theme will display "
877
  "a specific reply. For example, you could have a <em>standard</em> blog reply "
@@ -882,7 +1302,7 @@ msgid ""
882
  "formats."
883
  msgstr ""
884
 
885
- #: bbp-admin/bbp-replies.php:216
886
  msgid ""
887
  "<strong>Featured Image</strong> - This allows you to associate an image with "
888
  "your reply without inserting it. This is usually useful only if your theme "
@@ -890,688 +1310,701 @@ msgid ""
890
  "custom header, etc."
891
  msgstr ""
892
 
893
- #: bbp-admin/bbp-replies.php:221 bbp-admin/bbp-replies.php:266
894
  msgid "Reply Attributes"
895
  msgstr ""
896
 
897
- #: bbp-admin/bbp-replies.php:223
898
  msgid "Select the attributes that your reply should have:"
899
  msgstr ""
900
 
901
- #: bbp-admin/bbp-replies.php:225
902
  msgid ""
903
  "<strong>Forum</strong> dropdown determines the parent forum that the reply "
904
  "belongs to. Select the forum, or leave the default (Use Forum of Topic) to "
905
  "post the reply in forum of the topic."
906
  msgstr ""
907
 
908
- #: bbp-admin/bbp-replies.php:226
909
  msgid ""
910
  "<strong>Topic</strong> determines the parent topic that the reply belongs to."
911
  msgstr ""
912
 
913
- #: bbp-admin/bbp-replies.php:241
914
  msgid ""
915
  "<strong>Discussion</strong> - You can turn comments and pings on or off, and "
916
  "if there are comments on the reply, you can see them here and moderate them."
917
  msgstr ""
918
 
919
- #: bbp-admin/bbp-replies.php:351 bbp-admin/bbp-topics.php:366
920
- #: bbp-theme-compat/bbpress/form-anonymous.php:17
921
- #: bbp-themes/bbp-twentyten/bbpress/form-anonymous.php:17
922
  msgid "Author Information"
923
  msgstr ""
924
 
925
- #: bbp-admin/bbp-replies.php:507
926
  msgid "The reply was not found!"
927
  msgstr ""
928
 
929
- #: bbp-admin/bbp-replies.php:510 bbp-admin/bbp-topics.php:533
930
  msgid "You do not have the permission to do that!"
931
  msgstr ""
932
 
933
- #: bbp-admin/bbp-replies.php:578
934
  msgid "There was a problem marking the reply \"%1$s\" as spam."
935
  msgstr ""
936
 
937
- #: bbp-admin/bbp-replies.php:578
938
  msgid "Reply \"%1$s\" successfully marked as spam."
939
  msgstr ""
940
 
941
- #: bbp-admin/bbp-replies.php:582
942
  msgid "There was a problem unmarking the reply \"%1$s\" as spam."
943
  msgstr ""
944
 
945
- #: bbp-admin/bbp-replies.php:582
946
  msgid "Reply \"%1$s\" successfully unmarked as spam."
947
  msgstr ""
948
 
949
- #: bbp-admin/bbp-replies.php:615
950
  msgid "Title"
951
  msgstr ""
952
 
953
- #: bbp-admin/bbp-replies.php:618 bbp-admin/bbp-topics.php:681
954
- #: bbp-theme-compat/bbpress/loop-replies.php:18
955
- #: bbp-theme-compat/bbpress/loop-replies.php:52
956
- #: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:17
957
- #: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:40
958
- #: bbp-themes/bbp-twentyten/single-reply.php:29
959
  msgid "Author"
960
  msgstr ""
961
 
962
- #: bbp-admin/bbp-replies.php:672 bbp-admin/bbp-replies.php:680
963
  msgid "No Topic"
964
  msgstr ""
965
 
966
- #: bbp-admin/bbp-replies.php:698 bbp-admin/bbp-replies.php:713
967
- #: bbp-admin/bbp-topics.php:733
968
  msgid "No Forum"
969
  msgstr ""
970
 
971
- #: bbp-admin/bbp-replies.php:704
972
  msgid "(Mismatch)"
973
  msgstr ""
974
 
975
- #: bbp-admin/bbp-replies.php:772 bbp-admin/bbp-topics.php:822
976
  msgid "View &#8220;%s&#8221;"
977
  msgstr ""
978
 
979
- #: bbp-admin/bbp-replies.php:772 bbp-admin/bbp-topics.php:822
980
  msgid "View"
981
  msgstr ""
982
 
983
- #: bbp-admin/bbp-replies.php:783
984
  msgid "Mark the reply as not spam"
985
  msgstr ""
986
 
987
- #: bbp-admin/bbp-replies.php:783 bbp-admin/bbp-topics.php:853
988
  msgid "Not spam"
989
  msgstr ""
990
 
991
- #: bbp-admin/bbp-replies.php:785
992
  msgid "Mark this reply as spam"
993
  msgstr ""
994
 
995
- #: bbp-admin/bbp-replies.php:785 bbp-admin/bbp-topics.php:855
996
- #: bbp-includes/bbp-reply-template.php:1645
997
- #: bbp-includes/bbp-topic-template.php:2562
998
  msgid "Spam"
999
  msgstr ""
1000
 
1001
- #: bbp-admin/bbp-replies.php:794 bbp-admin/bbp-topics.php:863
1002
- #: bbp-includes/bbp-reply-template.php:1589
1003
- #: bbp-includes/bbp-topic-template.php:2320
1004
  msgid "Restore this item from the Trash"
1005
  msgstr ""
1006
 
1007
- #: bbp-admin/bbp-replies.php:794 bbp-admin/bbp-topics.php:863
1008
- #: bbp-includes/bbp-reply-template.php:1575
1009
- #: bbp-includes/bbp-topic-template.php:2306
1010
  msgid "Restore"
1011
  msgstr ""
1012
 
1013
- #: bbp-admin/bbp-replies.php:796 bbp-admin/bbp-topics.php:865
1014
- #: bbp-includes/bbp-reply-template.php:1591
1015
- #: bbp-includes/bbp-topic-template.php:2322
1016
  msgid "Move this item to the Trash"
1017
  msgstr ""
1018
 
1019
- #: bbp-admin/bbp-replies.php:796 bbp-admin/bbp-topics.php:865
1020
- #: bbp-includes/bbp-reply-template.php:1574
1021
- #: bbp-includes/bbp-topic-template.php:2305
1022
  msgid "Trash"
1023
  msgstr ""
1024
 
1025
- #: bbp-admin/bbp-replies.php:800 bbp-admin/bbp-topics.php:869
1026
- #: bbp-includes/bbp-reply-template.php:1595
1027
- #: bbp-includes/bbp-topic-template.php:2326
1028
  msgid "Delete this item permanently"
1029
  msgstr ""
1030
 
1031
- #: bbp-admin/bbp-replies.php:800 bbp-admin/bbp-topics.php:869
1032
  msgid "Delete Permanently"
1033
  msgstr ""
1034
 
1035
- #: bbp-admin/bbp-replies.php:826 bbp-admin/bbp-topics.php:895
1036
  msgid "Empty Spam"
1037
  msgstr ""
1038
 
1039
- #: bbp-admin/bbp-replies.php:836 bbp-admin/bbp-topics.php:905
1040
  msgid "In all forums"
1041
  msgstr ""
1042
 
1043
- #: bbp-admin/bbp-replies.php:896
1044
  msgid "Reply updated. <a href=\"%s\">View topic</a>"
1045
  msgstr ""
1046
 
1047
- #: bbp-admin/bbp-replies.php:905
1048
  msgid "Reply updated."
1049
  msgstr ""
1050
 
1051
  #. translators: %s: date and time of the revision
1052
- #: bbp-admin/bbp-replies.php:910
1053
  msgid "Reply restored to revision from %s"
1054
  msgstr ""
1055
 
1056
- #: bbp-admin/bbp-replies.php:914
1057
  msgid "Reply created. <a href=\"%s\">View topic</a>"
1058
  msgstr ""
1059
 
1060
- #: bbp-admin/bbp-replies.php:917
1061
  msgid "Reply saved."
1062
  msgstr ""
1063
 
1064
- #: bbp-admin/bbp-replies.php:920
1065
  msgid "Reply submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
1066
  msgstr ""
1067
 
1068
- #: bbp-admin/bbp-replies.php:923
1069
  msgid ""
1070
  "Reply scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
1071
  "\">Preview topic</a>"
1072
  msgstr ""
1073
 
1074
- #: bbp-admin/bbp-replies.php:930
1075
  msgid "Reply draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
1076
  msgstr ""
1077
 
1078
- #: bbp-admin/bbp-settings.php:24 bbp-admin/bbp-settings.php:1233
1079
  msgid "Main Settings"
1080
  msgstr ""
1081
 
1082
- #: bbp-admin/bbp-settings.php:29
1083
  msgid "Theme Packages"
1084
  msgstr ""
1085
 
1086
- #: bbp-admin/bbp-settings.php:34 bbp-admin/bbp-settings.php:1252
1087
  msgid "Per Page"
1088
  msgstr ""
1089
 
1090
- #: bbp-admin/bbp-settings.php:39
1091
  msgid "Per RSS Page"
1092
  msgstr ""
1093
 
1094
- #: bbp-admin/bbp-settings.php:44
1095
  msgid "Archive Slugs"
1096
  msgstr ""
1097
 
1098
- #: bbp-admin/bbp-settings.php:49
1099
  msgid "Single Slugs"
1100
  msgstr ""
1101
 
1102
- #: bbp-admin/bbp-settings.php:54
1103
  msgid "BuddyPress"
1104
  msgstr ""
1105
 
1106
- #: bbp-admin/bbp-settings.php:59
1107
  msgid "Akismet"
1108
  msgstr ""
1109
 
1110
- #: bbp-admin/bbp-settings.php:81
1111
- msgid "Lock post editing after"
 
 
 
 
1112
  msgstr ""
1113
 
1114
- #: bbp-admin/bbp-settings.php:89
1115
- msgid "Throttle time"
1116
  msgstr ""
1117
 
1118
- #: bbp-admin/bbp-settings.php:97
1119
- msgid "Allow Revisions"
 
1120
  msgstr ""
1121
 
1122
- #: bbp-admin/bbp-settings.php:105
1123
- msgid "Allow Favorites"
 
1124
  msgstr ""
1125
 
1126
- #: bbp-admin/bbp-settings.php:113
1127
- msgid "Allow Subscriptions"
1128
  msgstr ""
1129
 
1130
- #: bbp-admin/bbp-settings.php:121
1131
- msgid "Allow Anonymous Posting"
1132
  msgstr ""
1133
 
1134
- #: bbp-admin/bbp-settings.php:129
1135
- msgid "Allow Global Access"
1136
  msgstr ""
1137
 
1138
- #: bbp-admin/bbp-settings.php:137
1139
- msgid "Fancy Editor"
1140
  msgstr ""
1141
 
1142
- #: bbp-admin/bbp-settings.php:145
1143
- msgid "Auto-embed Links"
1144
  msgstr ""
1145
 
1146
- #: bbp-admin/bbp-settings.php:158
 
 
 
 
1147
  msgid "Current Package"
1148
  msgstr ""
1149
 
1150
- #: bbp-admin/bbp-settings.php:213 bbp-admin/bbp-settings.php:1365
1151
  msgid "Forums base"
1152
  msgstr ""
1153
 
1154
- #: bbp-admin/bbp-settings.php:221 bbp-admin/bbp-settings.php:1368
1155
  msgid "Topics base"
1156
  msgstr ""
1157
 
1158
- #: bbp-admin/bbp-settings.php:234
1159
  msgid "Forum Prefix"
1160
  msgstr ""
1161
 
1162
- #: bbp-admin/bbp-settings.php:242 bbp-admin/bbp-settings.php:1371
1163
  msgid "Forum slug"
1164
  msgstr ""
1165
 
1166
- #: bbp-admin/bbp-settings.php:250 bbp-admin/bbp-settings.php:1374
1167
  msgid "Topic slug"
1168
  msgstr ""
1169
 
1170
- #: bbp-admin/bbp-settings.php:258 bbp-admin/bbp-settings.php:1386
1171
  msgid "Topic tag slug"
1172
  msgstr ""
1173
 
1174
- #: bbp-admin/bbp-settings.php:266 bbp-admin/bbp-settings.php:1377
1175
  msgid "Reply slug"
1176
  msgstr ""
1177
 
1178
- #: bbp-admin/bbp-settings.php:274
1179
  msgid "User slug"
1180
  msgstr ""
1181
 
1182
- #: bbp-admin/bbp-settings.php:282
1183
  msgid "Topic view slug"
1184
  msgstr ""
1185
 
1186
- #: bbp-admin/bbp-settings.php:295
1187
  msgid "Enable Group Forums"
1188
  msgstr ""
1189
 
1190
- #: bbp-admin/bbp-settings.php:303
1191
  msgid "Group Forums Parent"
1192
  msgstr ""
1193
 
1194
- #: bbp-admin/bbp-settings.php:316
1195
  msgid "Use Akismet"
1196
  msgstr ""
1197
 
1198
- #: bbp-admin/bbp-settings.php:354
1199
  msgid "Main forum settings for enabling features and setting time limits"
1200
  msgstr ""
1201
 
1202
- #: bbp-admin/bbp-settings.php:370 bbp-includes/bbp-common-functions.php:121
1203
  msgid "minutes"
1204
  msgstr ""
1205
 
1206
- #: bbp-admin/bbp-settings.php:386 bbp-includes/bbp-common-functions.php:122
1207
  msgid "seconds"
1208
  msgstr ""
1209
 
1210
- #: bbp-admin/bbp-settings.php:402
1211
  msgid "Allow users to mark topics as favorites"
1212
  msgstr ""
1213
 
1214
- #: bbp-admin/bbp-settings.php:418
1215
  msgid "Allow users to subscribe to topics"
1216
  msgstr ""
1217
 
1218
- #: bbp-admin/bbp-settings.php:434
 
 
 
 
1219
  msgid "Allow topic and reply revision logging"
1220
  msgstr ""
1221
 
1222
- #: bbp-admin/bbp-settings.php:450
1223
  msgid "Allow guest users without accounts to create topics and replies"
1224
  msgstr ""
1225
 
1226
- #: bbp-admin/bbp-settings.php:466
1227
  msgid ""
1228
- "Allow all users of your multisite installation to create topics and replies"
 
1229
  msgstr ""
1230
 
1231
- #: bbp-admin/bbp-settings.php:482 bbp-admin/bbp-settings.php:530
1232
  msgid "Use the fancy WordPress editor to create and edit topics and replies"
1233
  msgstr ""
1234
 
1235
- #: bbp-admin/bbp-settings.php:495
1236
  msgid "How your forum content is displayed within your existing theme."
1237
  msgstr ""
1238
 
1239
- #: bbp-admin/bbp-settings.php:519
1240
  msgid "%1$s - %2$s"
1241
  msgstr ""
1242
 
1243
- #: bbp-admin/bbp-settings.php:525
1244
  msgid "will serve all bbPress templates"
1245
  msgstr ""
1246
 
1247
- #: bbp-admin/bbp-settings.php:546
 
 
 
 
1248
  msgid ""
1249
  "Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and "
1250
- "replies."
1251
  msgstr ""
1252
 
1253
- #: bbp-admin/bbp-settings.php:561
1254
  msgid "How many topics and replies to show per page"
1255
  msgstr ""
1256
 
1257
- #: bbp-admin/bbp-settings.php:577 bbp-admin/bbp-settings.php:593
1258
- #: bbp-admin/bbp-settings.php:624 bbp-admin/bbp-settings.php:640
1259
  msgid "per page"
1260
  msgstr ""
1261
 
1262
- #: bbp-admin/bbp-settings.php:608
1263
  msgid "How many topics and replies to show per RSS page"
1264
  msgstr ""
1265
 
1266
- #: bbp-admin/bbp-settings.php:658
1267
  msgid ""
1268
  "Custom root slugs to prefix your forums and topics with. These can be "
1269
  "partnered with WordPress pages to allow more flexibility."
1270
  msgstr ""
1271
 
1272
- #: bbp-admin/bbp-settings.php:707
1273
  msgid ""
1274
  "Custom slugs for single forums, topics, replies, tags, users, and views "
1275
  "here. If you change these, existing permalinks will also change."
1276
  msgstr ""
1277
 
1278
- #: bbp-admin/bbp-settings.php:723
1279
  msgid "Prefix your forum area with the Forum Base slug (Recommended)"
1280
  msgstr ""
1281
 
1282
- #: bbp-admin/bbp-settings.php:843
1283
  msgid "Forum settings for BuddyPress"
1284
  msgstr ""
1285
 
1286
- #: bbp-admin/bbp-settings.php:859
1287
  msgid "Allow BuddyPress Groups to have their own forums"
1288
  msgstr ""
1289
 
1290
- #: bbp-admin/bbp-settings.php:877
1291
- msgid "(Forum Root)"
1292
  msgstr ""
1293
 
1294
- #: bbp-admin/bbp-settings.php:883
1295
  msgid "is the parent for all group forums"
1296
  msgstr ""
1297
 
1298
- #: bbp-admin/bbp-settings.php:884
1299
  msgid ""
1300
  "Using the Forum Root is not recommended. Changing this does not move "
1301
  "existing forums."
1302
  msgstr ""
1303
 
1304
- #: bbp-admin/bbp-settings.php:899
1305
  msgid "Forum settings for Akismet"
1306
  msgstr ""
1307
 
1308
- #: bbp-admin/bbp-settings.php:916
1309
  msgid "Allow Akismet to actively prevent forum spam."
1310
  msgstr ""
1311
 
1312
- #: bbp-admin/bbp-settings.php:939
1313
- msgid "bbPress Settings"
1314
  msgstr ""
1315
 
1316
- #: bbp-admin/bbp-settings.php:948
1317
- #: bbp-theme-compat/bbpress/form-user-edit.php:169
1318
- #: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:169
1319
  msgid "Save Changes"
1320
  msgstr ""
1321
 
1322
- #: bbp-admin/bbp-settings.php:967
1323
  msgid ""
1324
  "Information about your previous forums database so that they can be "
1325
  "converted. <strong>Backup your database before proceeding.</strong>"
1326
  msgstr ""
1327
 
1328
- #: bbp-admin/bbp-settings.php:992
1329
  msgid "is the previous forum software"
1330
  msgstr ""
1331
 
1332
- #: bbp-admin/bbp-settings.php:1006
1333
  msgid "IP or hostname"
1334
  msgstr ""
1335
 
1336
- #: bbp-admin/bbp-settings.php:1020
1337
  msgid "Use default 3306 if unsure"
1338
  msgstr ""
1339
 
1340
- #: bbp-admin/bbp-settings.php:1034
1341
  msgid "User for your database connection"
1342
  msgstr ""
1343
 
1344
- #: bbp-admin/bbp-settings.php:1048
1345
  msgid "Password to access the database"
1346
  msgstr ""
1347
 
1348
- #: bbp-admin/bbp-settings.php:1062
1349
  msgid "Name of the database with your old forum data"
1350
  msgstr ""
1351
 
1352
- #: bbp-admin/bbp-settings.php:1075
1353
  msgid "Some optional parameters to help tune the conversion process."
1354
  msgstr ""
1355
 
1356
- #: bbp-admin/bbp-settings.php:1089
1357
  msgid ""
1358
  "(If converting from BuddyPress Forums, use \"wp_bb_\" or your custom prefix)"
1359
  msgstr ""
1360
 
1361
- #: bbp-admin/bbp-settings.php:1103
1362
  msgid "rows to process at a time"
1363
  msgstr ""
1364
 
1365
- #: bbp-admin/bbp-settings.php:1104
1366
  msgid "Keep this low if you experience out-of-memory issues."
1367
  msgstr ""
1368
 
1369
- #: bbp-admin/bbp-settings.php:1118
1370
  msgid "second(s) delay between each group of rows"
1371
  msgstr ""
1372
 
1373
- #: bbp-admin/bbp-settings.php:1119
1374
  msgid "Keep this high to prevent too-many-connection issues."
1375
  msgstr ""
1376
 
1377
- #: bbp-admin/bbp-settings.php:1133
1378
  msgid "Start a fresh conversion from the beginning"
1379
  msgstr ""
1380
 
1381
- #: bbp-admin/bbp-settings.php:1134
1382
  msgid "You should clean old conversion information before starting over."
1383
  msgstr ""
1384
 
1385
- #: bbp-admin/bbp-settings.php:1148
1386
  msgid "Purge all information from a previously attempted import"
1387
  msgstr ""
1388
 
1389
- #: bbp-admin/bbp-settings.php:1149
1390
  msgid ""
1391
  "Use this if an import failed and you want to remove that incomplete data."
1392
  msgstr ""
1393
 
1394
- #: bbp-admin/bbp-settings.php:1163
1395
  msgid "Attempt to import user accounts from previous forums"
1396
  msgstr ""
1397
 
1398
- #: bbp-admin/bbp-settings.php:1164
1399
  msgid ""
1400
  "Non-bbPress passwords cannot be automatically converted. They will be "
1401
  "converted as each user logs in."
1402
  msgstr ""
1403
 
1404
- #: bbp-admin/bbp-settings.php:1194
1405
  msgid "Start"
1406
  msgstr ""
1407
 
1408
- #: bbp-admin/bbp-settings.php:1195
1409
  msgid "Stop"
1410
  msgstr ""
1411
 
1412
- #: bbp-admin/bbp-settings.php:1226
1413
- msgid "This screen provides access to all of the bbPress settings."
1414
  msgstr ""
1415
 
1416
- #: bbp-admin/bbp-settings.php:1227
1417
  msgid ""
1418
  "Please see the additional help tabs for more information on each indiviual "
1419
  "section."
1420
  msgstr ""
1421
 
1422
- #: bbp-admin/bbp-settings.php:1234
1423
  msgid "In the Main Settings you have a number of options:"
1424
  msgstr ""
1425
 
1426
- #: bbp-admin/bbp-settings.php:1237
1427
  msgid ""
1428
  "You can choose to lock a post after a certain number of minutes. \"Locking "
1429
  "post editing\" will prevent the author from editing some amount of time "
1430
  "after saving a post."
1431
  msgstr ""
1432
 
1433
- #: bbp-admin/bbp-settings.php:1238
1434
  msgid ""
1435
  "\"Throttle time\" is the amount of time required between posts from a single "
1436
  "author. The higher the throttle time, the longer a user will need to wait "
1437
  "between posting to the forum."
1438
  msgstr ""
1439
 
1440
- #: bbp-admin/bbp-settings.php:1239
1441
  msgid ""
1442
  "Favorites are a way for users to save and later return to topics they favor. "
1443
  "This is enabled by default."
1444
  msgstr ""
1445
 
1446
- #: bbp-admin/bbp-settings.php:1240
1447
  msgid ""
1448
  "Subscriptions allow users to subscribe for notifications to topics that "
1449
  "interest them. This is enabled by default."
1450
  msgstr ""
1451
 
1452
- #: bbp-admin/bbp-settings.php:1241
 
 
 
 
 
 
1453
  msgid ""
1454
  "\"Anonymous Posting\" allows guest users who do not have accounts on your "
1455
  "site to both create topics as well as replies."
1456
  msgstr ""
1457
 
1458
- #: bbp-admin/bbp-settings.php:1242
1459
  msgid ""
1460
  "The Fancy Editor brings the luxury of the Visual editor and HTML editor from "
1461
  "the traditional WordPress dashboard into your theme."
1462
  msgstr ""
1463
 
1464
- #: bbp-admin/bbp-settings.php:1243
1465
  msgid ""
1466
  "Auto-embed will embed the media content from a URL directly into the "
1467
  "replies. For example: links to Flickr and YouTube."
1468
  msgstr ""
1469
 
1470
- #: bbp-admin/bbp-settings.php:1246
1471
  msgid ""
1472
  "You must click the Save Changes button at the bottom of the screen for new "
1473
  "settings to take effect."
1474
  msgstr ""
1475
 
1476
- #: bbp-admin/bbp-settings.php:1253
1477
  msgid ""
1478
  "Per Page settings allow you to control the number of topics and replies "
1479
  "appear on each page."
1480
  msgstr ""
1481
 
1482
- #: bbp-admin/bbp-settings.php:1254
1483
  msgid ""
1484
  "This is comparable to the WordPress \"Reading Settings\" page, where you can "
1485
  "set the number of posts that should show on blog pages and in feeds."
1486
  msgstr ""
1487
 
1488
- #: bbp-admin/bbp-settings.php:1255
1489
  msgid ""
1490
  "These are broken up into
2
  # This file is distributed under the same license as the bbPress package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: bbPress 2.2\n"
6
+ "Report-Msgid-Bugs-To: http://bbpress.org\n"
7
+ "POT-Creation-Date: 2012-11-19 06:18:52+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: JOHN JAMES JACOBY <jjj@bbpress.org>\n"
13
  "Language-Team: ENGLISH <jjj@bbpress.org>\n"
14
 
15
+ #: bbpress.php:130 bbpress.php:137
16
+ msgid "Cheatin&#8217; huh?"
17
+ msgstr ""
18
+
19
+ #: bbpress.php:388 templates/default/bbpress-functions.php:68
20
+ msgid "bbPress Default"
21
+ msgstr ""
22
+
23
+ #: bbpress.php:471 bbpress.php:472 includes/admin/admin.php:208
24
+ #: includes/admin/admin.php:209 includes/admin/admin.php:219
25
+ #: includes/admin/admin.php:220 includes/admin/users.php:82
26
+ #: includes/extend/buddypress/group.php:503
27
+ #: includes/extend/buddypress/loader.php:42
28
+ #: includes/extend/buddypress/loader.php:170
29
+ #: includes/extend/buddypress/loader.php:259
30
+ #: includes/extend/buddypress/loader.php:310
31
+ #: templates/default/extras/page-forum-statistics.php:39
32
+ msgid "Forums"
33
+ msgstr ""
34
+
35
+ #: bbpress.php:473 includes/admin/forums.php:420
36
+ #: includes/admin/metaboxes.php:50 includes/admin/metaboxes.php:358
37
+ #: includes/admin/metaboxes.php:411 includes/admin/replies.php:621
38
+ #: includes/admin/topics.php:686 includes/extend/buddypress/group.php:36
39
+ #: includes/extend/buddypress/group.php:37
40
+ #: includes/forums/template-tags.php:2135
41
+ #: templates/default/bbpress/loop-forums.php:19
42
+ msgid "Forum"
43
+ msgstr ""
44
+
45
+ #: bbpress.php:474 includes/admin/tools.php:1004
46
+ msgid "All Forums"
47
+ msgstr ""
48
+
49
+ #: bbpress.php:475 bbpress.php:479
50
+ msgid "New Forum"
51
+ msgstr ""
52
+
53
+ #: bbpress.php:476 templates/default/bbpress/form-forum.php:37
54
+ msgid "Create New Forum"
55
+ msgstr ""
56
+
57
+ #: bbpress.php:477 bbpress.php:534 bbpress.php:591
58
+ #: includes/common/template-tags.php:1959
59
+ #: includes/replies/template-tags.php:1525
60
+ #: includes/topics/template-tags.php:2261
61
+ #: templates/default/bbpress/user-details.php:65
62
+ msgid "Edit"
63
+ msgstr ""
64
+
65
+ #: bbpress.php:478
66
+ msgid "Edit Forum"
67
+ msgstr ""
68
+
69
+ #: bbpress.php:480 bbpress.php:481
70
+ msgid "View Forum"
71
+ msgstr ""
72
+
73
+ #: bbpress.php:482
74
+ msgid "Search Forums"
75
+ msgstr ""
76
+
77
+ #: bbpress.php:483
78
+ msgid "No forums found"
79
+ msgstr ""
80
+
81
+ #: bbpress.php:484
82
+ msgid "No forums found in Trash"
83
+ msgstr ""
84
+
85
+ #: bbpress.php:485 templates/default/bbpress/form-forum.php:129
86
+ msgid "Parent Forum:"
87
+ msgstr ""
88
+
89
+ #: bbpress.php:508
90
+ msgid "bbPress Forums"
91
+ msgstr ""
92
+
93
+ #: bbpress.php:528 bbpress.php:529 includes/admin/forums.php:421
94
+ #: includes/admin/settings.php:187 includes/admin/settings.php:208
95
+ #: includes/admin/topics.php:685 includes/extend/buddypress/activity.php:399
96
+ #: includes/extend/buddypress/group.php:507
97
+ #: includes/forums/template-tags.php:2283
98
+ #: templates/default/bbpress/loop-forums.php:20
99
+ #: templates/default/extras/page-forum-statistics.php:44
100
+ msgid "Topics"
101
+ msgstr ""
102
+
103
+ #: bbpress.php:530 includes/admin/metaboxes.php:67
104
+ #: includes/admin/metaboxes.php:437 includes/admin/replies.php:622
105
+ #: templates/default/bbpress/content-single-topic-lead.php:22
106
+ #: templates/default/bbpress/content-single-topic-lead.php:94
107
+ #: templates/default/bbpress/loop-topics.php:19
108
+ msgid "Topic"
109
+ msgstr ""
110
+
111
+ #: bbpress.php:531 includes/admin/tools.php:1005
112
+ #: includes/topics/functions.php:3224
113
+ msgid "All Topics"
114
+ msgstr ""
115
+
116
+ #: bbpress.php:532 bbpress.php:536
117
+ msgid "New Topic"
118
+ msgstr ""
119
+
120
+ #: bbpress.php:533 templates/default/bbpress/form-topic.php:43
121
+ msgid "Create New Topic"
122
+ msgstr ""
123
+
124
+ #: bbpress.php:535
125
+ msgid "Edit Topic"
126
+ msgstr ""
127
+
128
+ #: bbpress.php:537 bbpress.php:538
129
+ msgid "View Topic"
130
+ msgstr ""
131
+
132
+ #: bbpress.php:539
133
+ msgid "Search Topics"
134
+ msgstr ""
135
+
136
+ #: bbpress.php:540
137
+ msgid "No topics found"
138
+ msgstr ""
139
+
140
+ #: bbpress.php:541
141
+ msgid "No topics found in Trash"
142
+ msgstr ""
143
+
144
+ #: bbpress.php:542 includes/admin/metaboxes.php:357
145
+ #: includes/admin/metaboxes.php:410 includes/extend/buddypress/group.php:808
146
+ #: templates/default/bbpress/form-topic.php:125
147
+ msgid "Forum:"
148
+ msgstr ""
149
+
150
+ #: bbpress.php:565
151
+ msgid "bbPress Topics"
152
+ msgstr ""
153
+
154
+ #: bbpress.php:585 bbpress.php:586 includes/admin/forums.php:422
155
+ #: includes/admin/settings.php:195 includes/admin/settings.php:216
156
+ #: includes/admin/topics.php:687 includes/core/theme-compat.php:552
157
+ #: includes/extend/buddypress/activity.php:400
158
+ #: includes/forums/template-tags.php:2347
159
+ #: templates/default/bbpress/loop-forums.php:21
160
+ #: templates/default/bbpress/loop-replies.php:32
161
+ #: templates/default/bbpress/loop-replies.php:62
162
+ #: templates/default/bbpress/loop-topics.php:21
163
+ #: templates/default/extras/page-forum-statistics.php:49
164
+ msgid "Replies"
165
+ msgstr ""
166
+
167
+ #: bbpress.php:587 includes/admin/metaboxes.php:84
168
+ msgid "Reply"
169
+ msgstr ""
170
+
171
+ #: bbpress.php:588 includes/admin/tools.php:1006
172
+ #: includes/replies/functions.php:1514
173
+ msgid "All Replies"
174
+ msgstr ""
175
+
176
+ #: bbpress.php:589 bbpress.php:593
177
+ msgid "New Reply"
178
+ msgstr ""
179
+
180
+ #: bbpress.php:590
181
+ msgid "Create New Reply"
182
+ msgstr ""
183
+
184
+ #: bbpress.php:592
185
+ msgid "Edit Reply"
186
+ msgstr ""
187
+
188
+ #: bbpress.php:594 bbpress.php:595
189
+ msgid "View Reply"
190
+ msgstr ""
191
+
192
+ #: bbpress.php:596
193
+ msgid "Search Replies"
194
+ msgstr ""
195
+
196
+ #: bbpress.php:597
197
+ msgid "No replies found"
198
+ msgstr ""
199
+
200
+ #: bbpress.php:598
201
+ msgid "No replies found in Trash"
202
+ msgstr ""
203
+
204
+ #: bbpress.php:599 includes/admin/metaboxes.php:436
205
+ msgid "Topic:"
206
+ msgstr ""
207
+
208
+ #: bbpress.php:622
209
+ msgid "bbPress Replies"
210
+ msgstr ""
211
+
212
+ #: bbpress.php:657
213
+ msgctxt "post"
214
+ msgid "Closed"
215
+ msgstr ""
216
+
217
+ #: bbpress.php:658
218
+ msgctxt "bbpress"
219
+ msgid "Closed <span class=\"count\">(%s)</span>"
220
+ msgid_plural "Closed <span class=\"count\">(%s)</span>"
221
+ msgstr[0] ""
222
+ msgstr[1] ""
223
+
224
+ #: bbpress.php:668
225
+ msgctxt "post"
226
+ msgid "Spam"
227
+ msgstr ""
228
+
229
+ #: bbpress.php:669
230
+ msgctxt "bbpress"
231
+ msgid "Spam <span class=\"count\">(%s)</span>"
232
+ msgid_plural "Spam <span class=\"count\">(%s)</span>"
233
+ msgstr[0] ""
234
+ msgstr[1] ""
235
+
236
+ #: bbpress.php:681
237
+ msgctxt "post"
238
+ msgid "Orphan"
239
+ msgstr ""
240
+
241
+ #: bbpress.php:682
242
+ msgctxt "bbpress"
243
+ msgid "Orphan <span class=\"count\">(%s)</span>"
244
+ msgid_plural "Orphans <span class=\"count\">(%s)</span>"
245
+ msgstr[0] ""
246
+ msgstr[1] ""
247
+
248
+ #: bbpress.php:694
249
+ msgctxt "post"
250
+ msgid "Hidden"
251
+ msgstr ""
252
+
253
+ #: bbpress.php:695
254
+ msgctxt "bbpress"
255
+ msgid "Hidden <span class=\"count\">(%s)</span>"
256
+ msgid_plural "Hidden <span class=\"count\">(%s)</span>"
257
+ msgstr[0] ""
258
+ msgstr[1] ""
259
+
260
+ #: bbpress.php:740 templates/default/extras/page-forum-statistics.php:54
261
+ msgid "Topic Tags"
262
+ msgstr ""
263
+
264
+ #: bbpress.php:741 includes/admin/metaboxes.php:103
265
+ msgid "Topic Tag"
266
+ msgstr ""
267
+
268
+ #: bbpress.php:742
269
+ msgid "Search Tags"
270
+ msgstr ""
271
+
272
+ #: bbpress.php:743
273
+ msgid "Popular Tags"
274
+ msgstr ""
275
+
276
+ #: bbpress.php:744
277
+ msgid "All Tags"
278
+ msgstr ""
279
+
280
+ #: bbpress.php:745
281
+ msgid "Edit Tag"
282
+ msgstr ""
283
+
284
+ #: bbpress.php:746
285
+ msgid "Update Tag"
286
+ msgstr ""
287
+
288
+ #: bbpress.php:747
289
+ msgid "Add New Tag"
290
+ msgstr ""
291
+
292
+ #: bbpress.php:748
293
+ msgid "New Tag Name"
294
+ msgstr ""
295
+
296
+ #: bbpress.php:749
297
+ msgid "View Topic Tag"
298
+ msgstr ""
299
+
300
+ #: bbpress.php:787
301
+ msgid "Topics with no replies"
302
+ msgstr ""
303
+
304
+ #: includes/admin/admin.php:173 includes/admin/functions.php:224
305
+ #: includes/admin/tools.php:34
306
  msgid "Repair Forums"
307
  msgstr ""
308
 
309
+ #: includes/admin/admin.php:174
310
  msgid "Forum Repair"
311
  msgstr ""
312
 
313
+ #: includes/admin/admin.php:183 includes/admin/functions.php:228
314
+ #: includes/admin/settings.php:1244
315
  msgid "Import Forums"
316
  msgstr ""
317
 
318
+ #: includes/admin/admin.php:184
319
  msgid "Forum Import"
320
  msgstr ""
321
 
322
+ #: includes/admin/admin.php:193 includes/admin/functions.php:232
323
+ #: includes/admin/tools.php:995
324
  msgid "Reset Forums"
325
  msgstr ""
326
 
327
+ #: includes/admin/admin.php:194
328
  msgid "Forum Reset"
329
  msgstr ""
330
 
331
+ #: includes/admin/admin.php:232 includes/admin/admin.php:233
332
+ #: includes/admin/admin.php:241 includes/admin/admin.php:242
333
+ msgid "Welcome to bbPress"
 
 
 
 
 
 
 
 
334
  msgstr ""
335
 
336
+ #: includes/admin/admin.php:255 includes/admin/admin.php:256
337
+ #: includes/admin/admin.php:277 includes/admin/admin.php:278
338
+ #: includes/admin/admin.php:1583 includes/admin/admin.php:1672
339
  msgid "Update Forums"
340
  msgstr ""
341
 
342
+ #: includes/admin/admin.php:468
343
  msgid "Settings"
344
  msgstr ""
345
 
346
+ #: includes/admin/admin.php:469
347
+ msgid "About"
348
+ msgstr ""
349
+
350
+ #: includes/admin/admin.php:481
351
  msgid "Right Now in Forums"
352
  msgstr ""
353
 
354
+ #: includes/admin/admin.php:1237
355
+ msgctxt "admin color scheme"
356
  msgid "Green"
357
  msgstr ""
358
 
359
+ #: includes/admin/admin.php:1278
360
+ msgid "%s - %s"
361
+ msgstr ""
362
+
363
+ #: includes/admin/admin.php:1296 includes/admin/admin.php:1402
364
+ msgid "Welcome to bbPress %s"
365
+ msgstr ""
366
+
367
+ #: includes/admin/admin.php:1297 includes/admin/admin.php:1403
368
+ msgid ""
369
+ "Thank you for updating to the latest version! bbPress %s is ready to make "
370
+ "your community a safer, faster, and better looking place to hang out!"
371
+ msgstr ""
372
+
373
+ #: includes/admin/admin.php:1298 includes/admin/admin.php:1404
374
+ msgid "Version %s"
375
+ msgstr ""
376
+
377
+ #: includes/admin/admin.php:1302 includes/admin/admin.php:1408
378
+ msgid "What&#8217;s New"
379
+ msgstr ""
380
+
381
+ #: includes/admin/admin.php:1304 includes/admin/admin.php:1410
382
+ msgid "Credits"
383
+ msgstr ""
384
+
385
+ #: includes/admin/admin.php:1309
386
+ msgid "In-depth User Profiles"
387
+ msgstr ""
388
+
389
+ #: includes/admin/admin.php:1312
390
+ msgid "User Details"
391
+ msgstr ""
392
+
393
+ #: includes/admin/admin.php:1313
394
+ msgid ""
395
+ "Forum profiles include the details of your forum activity, including your "
396
+ "topics and replies, subscriptions, and favorites."
397
+ msgstr ""
398
+
399
+ #: includes/admin/admin.php:1315
400
+ msgid "Easy Updating"
401
+ msgstr ""
402
+
403
+ #: includes/admin/admin.php:1316
404
+ msgid "You can easily update your profile without leaving bbPress."
405
+ msgstr ""
406
+
407
+ #: includes/admin/admin.php:1321
408
+ msgid "Theme Compatability"
409
+ msgstr ""
410
+
411
+ #: includes/admin/admin.php:1324
412
+ msgid "Twenty Twelve"
413
+ msgstr ""
414
+
415
+ #: includes/admin/admin.php:1325
416
+ msgid ""
417
+ "Updated default templates are now Twenty Twelve compatible, and we refreshed "
418
+ "our CSS to better integrate with other popular themes, too."
419
+ msgstr ""
420
+
421
+ #: includes/admin/admin.php:1330
422
+ msgid "Improved User Management"
423
+ msgstr ""
424
+
425
+ #: includes/admin/admin.php:1333
426
+ msgid "Dynamic User Roles and Capabilities"
427
+ msgstr ""
428
+
429
+ #: includes/admin/admin.php:1334
430
+ msgid ""
431
+ "bbPress now includes some fancy user-roles with smart default capabilities "
432
+ "to help you manage your forums. New roles include Key Master (for complete "
433
+ "administrative access), Moderator, and Participant for regular forum users."
434
+ msgstr ""
435
+
436
+ #: includes/admin/admin.php:1336
437
+ msgid "Manage Forum Users from WordPress"
438
+ msgstr ""
439
+
440
+ #: includes/admin/admin.php:1337
441
+ msgid ""
442
+ "You can assign Forums roles to users individually, or bulk update them from "
443
+ "the WordPress Users page. Users automatically start out as forum "
444
+ "participants."
445
+ msgstr ""
446
+
447
+ #: includes/admin/admin.php:1342
448
+ msgid "Better BuddyPress Integration"
449
+ msgstr ""
450
+
451
+ #: includes/admin/admin.php:1345
452
+ msgid "Use bbPress for Your BuddyPress Group Forums"
453
+ msgstr ""
454
+
455
+ #: includes/admin/admin.php:1346
456
+ msgid ""
457
+ "You can now use bbPress to manage your BuddyPress Group Forums, allowing for "
458
+ "seamless integration and improved plugin performance. Plugins developed for "
459
+ "bbPress can now be extended to improve the BuddyPress Group Forums "
460
+ "experience."
461
+ msgstr ""
462
+
463
+ #: includes/admin/admin.php:1348
464
+ msgid "Activity Stream Syncing"
465
+ msgstr ""
466
+
467
+ #: includes/admin/admin.php:1349
468
+ msgid ""
469
+ "bbPress now keeps track of changes to topics and replies and keeps their "
470
+ "corresponding BuddyPress Activity Stream updates synced."
471
+ msgstr ""
472
+
473
+ #: includes/admin/admin.php:1354
474
+ msgid "Under the Hood"
475
+ msgstr ""
476
+
477
+ #: includes/admin/admin.php:1358
478
+ msgid "Template Logic"
479
+ msgstr ""
480
+
481
+ #: includes/admin/admin.php:1359
482
+ msgid ""
483
+ "New functions and template stacks are in place to help plugin developers "
484
+ "extend bbPress further."
485
+ msgstr ""
486
+
487
+ #: includes/admin/admin.php:1361
488
+ msgid "Plugin Directory Structure"
489
+ msgstr ""
490
+
491
+ #: includes/admin/admin.php:1362
492
+ msgid ""
493
+ "We simplified the bbPress plugin directory structure, making it easier for "
494
+ "plugin developers to find the relevant code."
495
+ msgstr ""
496
+
497
+ #: includes/admin/admin.php:1366
498
+ msgid "Autocomplete"
499
+ msgstr ""
500
+
501
+ #: includes/admin/admin.php:1367
502
+ msgid ""
503
+ "In WordPress Admin, you now select a parent forum or topic via autocomplete "
504
+ "rather than a dropdown."
505
+ msgstr ""
506
+
507
+ #: includes/admin/admin.php:1369
508
+ msgid "Fancy Editor Support"
509
+ msgstr ""
510
+
511
+ #: includes/admin/admin.php:1370
512
+ msgid ""
513
+ "We improved our support of the Fancy Editor, giving forum users a better "
514
+ "experience."
515
+ msgstr ""
516
+
517
+ #: includes/admin/admin.php:1374
518
+ msgid "WordPress 3.5-ready"
519
+ msgstr ""
520
+
521
+ #: includes/admin/admin.php:1375
522
+ msgid ""
523
+ "bbPress 2.2 has been thoroughly tested against the ongoing development of "
524
+ "WordPress 3.5."
525
+ msgstr ""
526
+
527
+ #: includes/admin/admin.php:1381 includes/admin/admin.php:1509
528
+ msgid "Go to Forum Settings"
529
+ msgstr ""
530
+
531
+ #: includes/admin/admin.php:1414
532
+ msgid "bbPress is created by a worldwide swarm of busy, busy bees."
533
+ msgstr ""
534
+
535
+ #: includes/admin/admin.php:1416
536
+ msgid "Project Leaders"
537
+ msgstr ""
538
+
539
+ #: includes/admin/admin.php:1421
540
+ msgid "Founding Developer"
541
+ msgstr ""
542
+
543
+ #: includes/admin/admin.php:1426
544
+ msgid "Lead Developer"
545
+ msgstr ""
546
+
547
+ #: includes/admin/admin.php:1430
548
+ msgid "Contributing Developers"
549
+ msgstr ""
550
+
551
+ #: includes/admin/admin.php:1449
552
+ msgid "Codex Rockstars"
553
+ msgstr ""
554
+
555
+ #: includes/admin/admin.php:1468
556
+ msgid "Core Contributors to bbPress 2.2"
557
+ msgstr ""
558
+
559
+ #: includes/admin/admin.php:1535 includes/admin/admin.php:1557
560
  msgid "Update Forum"
561
  msgstr ""
562
 
563
+ #: includes/admin/admin.php:1546 includes/admin/admin.php:1600
564
  msgid "All done!"
565
  msgstr ""
566
 
567
+ #: includes/admin/admin.php:1547 includes/admin/admin.php:1601
568
  msgid "Go Back"
569
  msgstr ""
570
 
571
+ #: includes/admin/admin.php:1556
572
  msgid ""
573
  "You can update your forum through this page. Hit the link below to update."
574
  msgstr ""
575
 
576
+ #: includes/admin/admin.php:1628
577
  msgid ""
578
  "Warning! Problem updating %1$s. Your server may not be able to connect to "
579
  "sites running on it. Error message: <em>%2$s</em>"
580
  msgstr ""
581
 
582
+ #: includes/admin/admin.php:1652
583
  msgid ""
584
  "If your browser doesn&#8217;t start loading the next page automatically, "
585
  "click this link:"
586
  msgstr ""
587
 
588
+ #: includes/admin/admin.php:1653
589
  msgid "Next Forums"
590
  msgstr ""
591
 
592
+ #: includes/admin/admin.php:1671
593
  msgid ""
594
  "You can update all the forums on your network through this page. It works by "
595
  "calling the update script of each site automatically. Hit the link below to "
596
  "update."
597
  msgstr ""
598
 
599
+ #: includes/admin/converter.php:80
600
  msgid "Database Settings"
601
  msgstr ""
602
 
603
+ #: includes/admin/converter.php:83
604
  msgid "Select Platform"
605
  msgstr ""
606
 
607
+ #: includes/admin/converter.php:87
608
  msgid "Database Server"
609
  msgstr ""
610
 
611
+ #: includes/admin/converter.php:91
612
  msgid "Database Port"
613
  msgstr ""
614
 
615
+ #: includes/admin/converter.php:95
616
  msgid "Database Name"
617
  msgstr ""
618
 
619
+ #: includes/admin/converter.php:99
620
  msgid "Database User"
621
  msgstr ""
622
 
623
+ #: includes/admin/converter.php:103
624
  msgid "Database Password"
625
  msgstr ""
626
 
627
+ #: includes/admin/converter.php:107
628
  msgid "Table Prefix"
629
  msgstr ""
630
 
631
+ #: includes/admin/converter.php:111
632
  msgid "Options"
633
  msgstr ""
634
 
635
+ #: includes/admin/converter.php:114
636
  msgid "Rows Limit"
637
  msgstr ""
638
 
639
+ #: includes/admin/converter.php:118
640
  msgid "Delay Time"
641
  msgstr ""
642
 
643
+ #: includes/admin/converter.php:122
644
  msgid "Convert Users"
645
  msgstr ""
646
 
647
+ #: includes/admin/converter.php:126
648
  msgid "Start Over"
649
  msgstr ""
650
 
651
+ #: includes/admin/converter.php:130
652
  msgid "Purge Previous Import"
653
  msgstr ""
654
 
655
+ #: includes/admin/converter.php:219
656
  msgid "Starting Conversion"
657
  msgstr ""
658
 
659
+ #: includes/admin/converter.php:244 includes/admin/converter.php:471
660
  msgid "Conversion Complete"
661
  msgstr ""
662
 
663
+ #: includes/admin/converter.php:338
664
  msgid "No data to clean"
665
  msgstr ""
666
 
667
+ #: includes/admin/converter.php:342
668
  msgid "Deleting previously converted data (%1$s - %2$s)"
669
  msgstr ""
670
 
671
+ #: includes/admin/converter.php:358
672
  msgid "No users to convert"
673
  msgstr ""
674
 
675
+ #: includes/admin/converter.php:362
676
  msgid "Converting users (%1$s - %2$s)"
677
  msgstr ""
678
 
679
+ #: includes/admin/converter.php:378
680
  msgid "No passwords to clear"
681
  msgstr ""
682
 
683
+ #: includes/admin/converter.php:382
684
  msgid "Delete users wordpress default passwords (%1$s - %2$s)"
685
  msgstr ""
686
 
687
+ #: includes/admin/converter.php:397
688
  msgid "No forums to convert"
689
  msgstr ""
690
 
691
+ #: includes/admin/converter.php:401
692
  msgid "Converting forums (%1$s - %2$s)"
693
  msgstr ""
694
 
695
+ #: includes/admin/converter.php:412
696
  msgid "No forum parents to convert"
697
  msgstr ""
698
 
699
+ #: includes/admin/converter.php:416
700
  msgid "Calculating forum hierarchy (%1$s - %2$s)"
701
  msgstr ""
702
 
703
+ #: includes/admin/converter.php:427
704
  msgid "No topics to convert"
705
  msgstr ""
706
 
707
+ #: includes/admin/converter.php:431
708
  msgid "Converting topics (%1$s - %2$s)"
709
  msgstr ""
710
 
711
+ #: includes/admin/converter.php:442
712
  msgid "No tags to convert"
713
  msgstr ""
714
 
715
+ #: includes/admin/converter.php:446
716
  msgid "Converting topic tags (%1$s - %2$s)"
717
  msgstr ""
718
 
719
+ #: includes/admin/converter.php:457
720
  msgid "No replies to convert"
721
  msgstr ""
722
 
723
+ #: includes/admin/converter.php:461
724
  msgid "Converting replies (%1$s - %2$s)"
725
  msgstr ""
726
 
727
+ #: includes/admin/converters/bbPress1.php:540
728
+ msgid "Re: "
729
+ msgstr ""
730
+
731
+ #: includes/admin/forums.php:120 includes/admin/replies.php:132
732
+ #: includes/admin/settings.php:1284 includes/admin/topics.php:132
733
  msgid "Overview"
734
  msgstr ""
735
 
736
+ #: includes/admin/forums.php:122
737
  msgid ""
738
  "This screen displays the individual forums on your site. You can customize "
739
  "the display of this screen to suit your workflow."
740
  msgstr ""
741
 
742
+ #: includes/admin/forums.php:128 includes/admin/replies.php:140
743
+ #: includes/admin/topics.php:140
744
  msgid "Screen Content"
745
  msgstr ""
746
 
747
+ #: includes/admin/forums.php:130 includes/admin/replies.php:142
748
+ #: includes/admin/topics.php:142
749
  msgid ""
750
  "You can customize the display of this screen&#8217;s contents in a number of "
751
  "ways:"
752
  msgstr ""
753
 
754
+ #: includes/admin/forums.php:132
755
  msgid ""
756
  "You can hide/display columns based on your needs and decide how many forums "
757
  "to list per screen using the Screen Options tab."
758
  msgstr ""
759
 
760
+ #: includes/admin/forums.php:133
761
  msgid ""
762
  "You can filter the list of forums by forum status using the text links in "
763
  "the upper left to show All, Published, or Trashed forums. The default view "
764
  "is to show all forums."
765
  msgstr ""
766
 
767
+ #: includes/admin/forums.php:134
768
  msgid ""
769
  "You can refine the list to show only forums from a specific month by using "
770
  "the dropdown menus above the forums list. Click the Filter button after "
772
  "creator in the forums list."
773
  msgstr ""
774
 
775
+ #: includes/admin/forums.php:141 includes/admin/replies.php:154
776
+ #: includes/admin/topics.php:153
777
  msgid "Available Actions"
778
  msgstr ""
779
 
780
+ #: includes/admin/forums.php:143
781
  msgid ""
782
  "Hovering over a row in the forums list will display action links that allow "
783
  "you to manage your forum. You can perform the following actions:"
784
  msgstr ""
785
 
786
+ #: includes/admin/forums.php:145
787
  msgid ""
788
  "<strong>Edit</strong> takes you to the editing screen for that forum. You "
789
  "can also reach that screen by clicking on the forum title."
790
  msgstr ""
791
 
792
+ #: includes/admin/forums.php:146
793
  msgid ""
794
  "<strong>Trash</strong> removes your forum from this list and places it in "
795
  "the trash, from which you can permanently delete it."
796
  msgstr ""
797
 
798
+ #: includes/admin/forums.php:147
799
  msgid ""
800
  "<strong>View</strong> will show you what your draft forum will look like if "
801
  "you publish it. View will take you to your live site to view the forum. "
802
  "Which link is available depends on your forum&#8217;s status."
803
  msgstr ""
804
 
805
+ #: includes/admin/forums.php:154 includes/admin/replies.php:169
806
+ #: includes/admin/topics.php:170
807
  msgid "Bulk Actions"
808
  msgstr ""
809
 
810
+ #: includes/admin/forums.php:156
811
  msgid ""
812
  "You can also edit or move multiple forums to the trash at once. Select the "
813
  "forums you want to act on using the checkboxes, then select the action you "
814
  "want to take from the Bulk Actions menu and click Apply."
815
  msgstr ""
816
 
817
+ #: includes/admin/forums.php:157
818
  msgid ""
819
  "When using Bulk Edit, you can change the metadata (categories, author, etc.) "
820
  "for all selected forums at once. To remove a forum from the grouping, just "
821
  "click the x next to its name in the Bulk Edit area that appears."
822
  msgstr ""
823
 
824
+ #: includes/admin/forums.php:162 includes/admin/forums.php:233
825
+ #: includes/admin/replies.php:177 includes/admin/replies.php:245
826
+ #: includes/admin/settings.php:1330 includes/admin/topics.php:178
827
+ #: includes/admin/topics.php:246
828
  msgid "For more information:"
829
  msgstr ""
830
 
831
+ #: includes/admin/forums.php:163 includes/admin/forums.php:234
832
+ #: includes/admin/replies.php:178 includes/admin/replies.php:246
833
+ #: includes/admin/settings.php:1331 includes/admin/topics.php:179
834
+ #: includes/admin/topics.php:247
835
  msgid ""
836
  "<a href=\"http://codex.bbpress.org\" target=\"_blank\">bbPress "
837
  "Documentation</a>"
838
  msgstr ""
839
 
840
+ #: includes/admin/forums.php:164 includes/admin/forums.php:235
841
+ #: includes/admin/replies.php:179 includes/admin/replies.php:247
842
+ #: includes/admin/settings.php:1332 includes/admin/topics.php:180
843
+ #: includes/admin/topics.php:248
844
  msgid ""
845
  "<a href=\"http://bbpress.org/forums/\" target=\"_blank\">bbPress Support "
846
  "Forums</a>"
847
  msgstr ""
848
 
849
+ #: includes/admin/forums.php:178
850
  msgid ""
851
  "The title field and the big forum editing Area are fixed in place, but you "
852
  "can reposition all the other boxes using drag and drop, and can minimize or "
856
  "screen."
857
  msgstr ""
858
 
859
+ #: includes/admin/forums.php:182 includes/admin/replies.php:197
860
+ #: includes/admin/topics.php:198
861
  msgid "Customizing This Display"
862
  msgstr ""
863
 
864
+ #: includes/admin/forums.php:188
865
  msgid "Title and Forum Editor"
866
  msgstr ""
867
 
868
+ #: includes/admin/forums.php:190
869
  msgid ""
870
  "<strong>Title</strong> - Enter a title for your forum. After you enter a "
871
  "title, you&#8217;ll see the permalink below, which you can edit."
872
  msgstr ""
873
 
874
+ #: includes/admin/forums.php:191
875
  msgid ""
876
  "<strong>Forum Editor</strong> - Enter the text for your forum. There are two "
877
  "modes of editing: Visual and HTML. Choose the mode by clicking on the "
885
  "over the top area. Exit Fullscreen back to the regular forum editor."
886
  msgstr ""
887
 
888
+ #: includes/admin/forums.php:194
889
  msgid ""
890
  "<strong>Publish</strong> - You can set the terms of publishing your forum in "
891
  "the Publish box. For Status, Visibility, and Publish (immediately), click on "
896
  "future or backdate a forum."
897
  msgstr ""
898
 
899
+ #: includes/admin/forums.php:197
900
  msgid ""
901
  "<strong>forum Format</strong> - This designates how your theme will display "
902
  "a specific forum. For example, you could have a <em>standard</em> blog forum "
907
  "formats."
908
  msgstr ""
909
 
910
+ #: includes/admin/forums.php:201
911
  msgid ""
912
  "<strong>Featured Image</strong> - This allows you to associate an image with "
913
  "your forum without inserting it. This is usually useful only if your theme "
915
  "custom header, etc."
916
  msgstr ""
917
 
918
+ #: includes/admin/forums.php:206 includes/admin/forums.php:254
919
  msgid "Forum Attributes"
920
  msgstr ""
921
 
922
+ #: includes/admin/forums.php:208
923
  msgid "Select the attributes that your forum should have:"
924
  msgstr ""
925
 
926
+ #: includes/admin/forums.php:210
927
  msgid ""
928
  "<strong>Type</strong> indicates if the forum is a category or forum. "
929
  "Categories generally contain other forums."
930
  msgstr ""
931
 
932
+ #: includes/admin/forums.php:211
933
  msgid ""
934
  "<strong>Status</strong> allows you to close a forum to new topics and forums."
935
  msgstr ""
936
 
937
+ #: includes/admin/forums.php:212
938
  msgid ""
939
  "<strong>Visibility</strong> lets you pick the scope of each forum and what "
940
  "users are allowed to access it."
941
  msgstr ""
942
 
943
+ #: includes/admin/forums.php:213
944
  msgid ""
945
  "<strong>Parent</strong> dropdown determines the parent forum. Select the "
946
  "forum or category from the dropdown, or leave the default (No Parent) to "
947
  "create the forum at the root of your forums."
948
  msgstr ""
949
 
950
+ #: includes/admin/forums.php:214
951
  msgid "<strong>Order</strong> allows you to order your forums numerically."
952
  msgstr ""
953
 
954
+ #: includes/admin/forums.php:220 includes/admin/replies.php:232
955
+ #: includes/admin/topics.php:233
956
  msgid "Publish Box"
957
  msgstr ""
958
 
959
+ #: includes/admin/forums.php:226 includes/admin/replies.php:238
960
+ #: includes/admin/topics.php:239
961
  msgid "Discussion Settings"
962
  msgstr ""
963
 
964
+ #: includes/admin/forums.php:228 includes/admin/replies.php:240
965
+ #: includes/admin/topics.php:241
966
  msgid ""
967
  "<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy "
968
  "blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to "
970
  "notified automatically using pingbacks, and this field is unnecessary."
971
  msgstr ""
972
 
973
+ #: includes/admin/forums.php:229
974
  msgid ""
975
  "<strong>Discussion</strong> - You can turn comments and pings on or off, and "
976
  "if there are comments on the forum, you can see them here and moderate them."
977
  msgstr ""
978
 
979
+ #: includes/admin/forums.php:423
980
+ #: templates/default/bbpress/content-single-topic-lead.php:18
981
+ #: templates/default/bbpress/content-single-topic-lead.php:90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
982
  msgid "Creator"
983
  msgstr ""
984
 
985
+ #: includes/admin/forums.php:424 includes/admin/replies.php:624
986
+ #: includes/admin/topics.php:690
987
  msgid "Created"
988
  msgstr ""
989
 
990
+ #: includes/admin/forums.php:425 includes/admin/topics.php:691
991
+ #: templates/default/bbpress/loop-forums.php:22
992
+ #: templates/default/bbpress/loop-topics.php:22
 
 
993
  msgid "Freshness"
994
  msgstr ""
995
 
996
+ #: includes/admin/forums.php:462 includes/admin/replies.php:732
997
+ #: includes/admin/topics.php:770
998
  msgid "%1$s <br /> %2$s"
999
  msgstr ""
1000
 
1001
+ #: includes/admin/forums.php:474 includes/forums/template-tags.php:533
1002
  msgid "No Topics"
1003
  msgstr ""
1004
 
1005
+ #: includes/admin/forums.php:540
1006
  msgid "Forum updated. <a href=\"%s\">View forum</a>"
1007
  msgstr ""
1008
 
1009
+ #: includes/admin/forums.php:543 includes/admin/replies.php:904
1010
+ #: includes/admin/topics.php:976
1011
  msgid "Custom field updated."
1012
  msgstr ""
1013
 
1014
+ #: includes/admin/forums.php:546 includes/admin/replies.php:907
1015
+ #: includes/admin/topics.php:979
1016
  msgid "Custom field deleted."
1017
  msgstr ""
1018
 
1019
+ #: includes/admin/forums.php:549
1020
  msgid "Forum updated."
1021
  msgstr ""
1022
 
1023
  #. translators: %s: date and time of the revision
1024
+ #: includes/admin/forums.php:554
1025
  msgid "Forum restored to revision from %s"
1026
  msgstr ""
1027
 
1028
+ #: includes/admin/forums.php:558
1029
  msgid "Forum created. <a href=\"%s\">View forum</a>"
1030
  msgstr ""
1031
 
1032
+ #: includes/admin/forums.php:561
1033
  msgid "Forum saved."
1034
  msgstr ""
1035
 
1036
+ #: includes/admin/forums.php:564
1037
  msgid "Forum submitted. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
1038
  msgstr ""
1039
 
1040
+ #: includes/admin/forums.php:567
1041
  msgid ""
1042
  "Forum scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
1043
  "\">Preview forum</a>"
1044
  msgstr ""
1045
 
1046
  #. translators: Publish box date format, see http:php.net/date
1047
+ #: includes/admin/forums.php:569 includes/admin/replies.php:930
1048
+ #: includes/admin/topics.php:1002
1049
  msgid "M j, Y @ G:i"
1050
  msgstr ""
1051
 
1052
+ #: includes/admin/forums.php:574
1053
  msgid "Forum draft updated. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
1054
  msgstr ""
1055
 
1056
+ #: includes/admin/metaboxes.php:42
1057
  msgid "Discussion"
1058
  msgstr ""
1059
 
1060
+ #: includes/admin/metaboxes.php:127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1061
  msgid "Users &amp; Moderation"
1062
  msgstr ""
1063
 
1064
+ #: includes/admin/metaboxes.php:135
1065
  msgid "User"
1066
  msgid_plural "Users"
1067
  msgstr[0] ""
1068
  msgstr[1] ""
1069
 
1070
+ #: includes/admin/metaboxes.php:154
1071
  msgid "Hidden Topic"
1072
  msgid_plural "Hidden Topics"
1073
  msgstr[0] ""
1074
  msgstr[1] ""
1075
 
1076
+ #: includes/admin/metaboxes.php:176
1077
  msgid "Hidden Reply"
1078
  msgid_plural "Hidden Replies"
1079
  msgstr[0] ""
1080
  msgstr[1] ""
1081
 
1082
+ #: includes/admin/metaboxes.php:198
1083
  msgid "Empty Topic Tag"
1084
  msgid_plural "Empty Topic Tags"
1085
  msgstr[0] ""
1086
  msgstr[1] ""
1087
 
1088
+ #: includes/admin/metaboxes.php:222
1089
  msgid "You are using <span class=\"b\">bbPress %s</span>."
1090
  msgstr ""
1091
 
1092
+ #: includes/admin/metaboxes.php:261 includes/admin/metaboxes.php:262
1093
+ #: includes/admin/metaboxes.php:351
1094
  msgid "Type:"
1095
  msgstr ""
1096
 
1097
+ #: includes/admin/metaboxes.php:273 includes/admin/metaboxes.php:274
1098
+ #: templates/default/bbpress/form-forum.php:111
 
1099
  msgid "Status:"
1100
  msgstr ""
1101
 
1102
+ #: includes/admin/metaboxes.php:285 includes/admin/metaboxes.php:286
1103
+ #: templates/default/bbpress/form-forum.php:120
 
1104
  msgid "Visibility:"
1105
  msgstr ""
1106
 
1107
+ #: includes/admin/metaboxes.php:299
1108
  msgid "Parent:"
1109
  msgstr ""
1110
 
1111
+ #: includes/admin/metaboxes.php:300
1112
  msgid "Forum Parent"
1113
  msgstr ""
1114
 
1115
+ #: includes/admin/metaboxes.php:315 includes/admin/metaboxes.php:373
1116
+ #: includes/admin/metaboxes.php:426
1117
+ msgid "&mdash; No parent &mdash;"
1118
  msgstr ""
1119
 
1120
+ #: includes/admin/metaboxes.php:323
1121
  msgid "Order:"
1122
  msgstr ""
1123
 
1124
+ #: includes/admin/metaboxes.php:324
1125
  msgid "Forum Order"
1126
  msgstr ""
1127
 
1128
+ #: includes/admin/metaboxes.php:352
 
 
 
 
1129
  msgid "Topic Type"
1130
  msgstr ""
1131
 
1132
+ #: includes/admin/metaboxes.php:467
1133
+ #: templates/default/bbpress/form-topic-tag.php:35
1134
+ msgid "Name:"
1135
  msgstr ""
1136
 
1137
+ #: includes/admin/metaboxes.php:468
1138
+ #: templates/default/bbpress/form-user-edit.php:14
1139
+ #: templates/default/bbpress/form-user-edit.php:19
1140
+ msgid "Name"
1141
  msgstr ""
1142
 
1143
+ #: includes/admin/metaboxes.php:473
1144
+ msgid "Email:"
 
 
 
 
1145
  msgstr ""
1146
 
1147
+ #: includes/admin/metaboxes.php:474
1148
+ #: templates/default/bbpress/form-user-edit.php:105
1149
+ #: templates/default/bbpress/form-user-register.php:28
 
 
1150
  msgid "Email"
1151
  msgstr ""
1152
 
1153
+ #: includes/admin/metaboxes.php:479
1154
+ #: templates/default/bbpress/form-anonymous.php:32
1155
+ msgid "Website:"
1156
+ msgstr ""
1157
+
1158
+ #: includes/admin/metaboxes.php:480
1159
+ #: templates/default/bbpress/form-user-edit.php:57
1160
  msgid "Website"
1161
  msgstr ""
1162
 
1163
+ #: includes/admin/metaboxes.php:487
1164
+ msgid "IP:"
1165
+ msgstr ""
1166
+
1167
+ #: includes/admin/metaboxes.php:488
1168
  msgid "IP Address"
1169
  msgstr ""
1170
 
1171
+ #: includes/admin/replies.php:134
1172
  msgid ""
1173
  "This screen provides access to all of your replies. You can customize the "
1174
  "display of this screen to suit your workflow."
1175
  msgstr ""
1176
 
1177
+ #: includes/admin/replies.php:144
1178
  msgid ""
1179
  "You can hide/display columns based on your needs and decide how many replies "
1180
  "to list per screen using the Screen Options tab."
1181
  msgstr ""
1182
 
1183
+ #: includes/admin/replies.php:145
1184
  msgid ""
1185
  "You can filter the list of replies by reply status using the text links in "
1186
  "the upper left to show All, Published, Draft, or Trashed replies. The "
1187
  "default view is to show all replies."
1188
  msgstr ""
1189
 
1190
+ #: includes/admin/replies.php:146
1191
  msgid ""
1192
  "You can view replies in a simple title list or with an excerpt. Choose the "
1193
  "view you prefer by clicking on the icons at the top of the list on the right."
1194
  msgstr ""
1195
 
1196
+ #: includes/admin/replies.php:147
1197
  msgid ""
1198
  "You can refine the list to show only replies in a specific category or from "
1199
  "a specific month by using the dropdown menus above the replies list. Click "
1201
  "by clicking on the reply author, category or tag in the replies list."
1202
  msgstr ""
1203
 
1204
+ #: includes/admin/replies.php:156
1205
  msgid ""
1206
  "Hovering over a row in the replies list will display action links that allow "
1207
  "you to manage your reply. You can perform the following actions:"
1208
  msgstr ""
1209
 
1210
+ #: includes/admin/replies.php:158
1211
  msgid ""
1212
  "<strong>Edit</strong> takes you to the editing screen for that reply. You "
1213
  "can also reach that screen by clicking on the reply title."
1214
  msgstr ""
1215
 
1216
+ #: includes/admin/replies.php:160
1217
  msgid ""
1218
  "<strong>Trash</strong> removes your reply from this list and places it in "
1219
  "the trash, from which you can permanently delete it."
1220
  msgstr ""
1221
 
1222
+ #: includes/admin/replies.php:161
1223
  msgid ""
1224
  "<strong>Spam</strong> removes your reply from this list and places it in the "
1225
  "spam queue, from which you can permanently delete it."
1226
  msgstr ""
1227
 
1228
+ #: includes/admin/replies.php:162
1229
  msgid ""
1230
  "<strong>Preview</strong> will show you what your draft reply will look like "
1231
  "if you publish it. View will take you to your live site to view the reply. "
1232
  "Which link is available depends on your reply&#8217;s status."
1233
  msgstr ""
1234
 
1235
+ #: includes/admin/replies.php:171
1236
  msgid ""
1237
  "You can also edit or move multiple replies to the trash at once. Select the "
1238
  "replies you want to act on using the checkboxes, then select the action you "
1239
  "want to take from the Bulk Actions menu and click Apply."
1240
  msgstr ""
1241
 
1242
+ #: includes/admin/replies.php:172
1243
  msgid ""
1244
  "When using Bulk Edit, you can change the metadata (categories, author, etc.) "
1245
  "for all selected replies at once. To remove a reply from the grouping, just "
1246
  "click the x next to its name in the Bulk Edit area that appears."
1247
  msgstr ""
1248
 
1249
+ #: includes/admin/replies.php:193
1250
  msgid ""
1251
  "The title field and the big reply editing Area are fixed in place, but you "
1252
  "can reposition all the other boxes using drag and drop, and can minimize or "
1256
  "screen."
1257
  msgstr ""
1258
 
1259
+ #: includes/admin/replies.php:203
1260
  msgid "Title and Reply Editor"
1261
  msgstr ""
1262
 
1263
+ #: includes/admin/replies.php:205
1264
  msgid ""
1265
  "<strong>Title</strong> - Enter a title for your reply. After you enter a "
1266
  "title, you&#8217;ll see the permalink below, which you can edit."
1267
  msgstr ""
1268
 
1269
+ #: includes/admin/replies.php:206
1270
  msgid ""
1271
  "<strong>Reply Editor</strong> - Enter the text for your reply. There are two "
1272
  "modes of editing: Visual and HTML. Choose the mode by clicking on the "
1280
  "over the top area. Exit Fullscreen back to the regular reply editor."
1281
  msgstr ""
1282
 
1283
+ #: includes/admin/replies.php:209
1284
  msgid ""
1285
  "<strong>Publish</strong> - You can set the terms of publishing your reply in "
1286
  "the Publish box. For Status, Visibility, and Publish (immediately), click on "
1291
  "future or backdate a reply."
1292
  msgstr ""
1293
 
1294
+ #: includes/admin/replies.php:212
1295
  msgid ""
1296
  "<strong>reply Format</strong> - This designates how your theme will display "
1297
  "a specific reply. For example, you could have a <em>standard</em> blog reply "
1302
  "formats."
1303
  msgstr ""
1304
 
1305
+ #: includes/admin/replies.php:216
1306
  msgid ""
1307
  "<strong>Featured Image</strong> - This allows you to associate an image with "
1308
  "your reply without inserting it. This is usually useful only if your theme "
1310
  "custom header, etc."
1311
  msgstr ""
1312
 
1313
+ #: includes/admin/replies.php:221 includes/admin/replies.php:266
1314
  msgid "Reply Attributes"
1315
  msgstr ""
1316
 
1317
+ #: includes/admin/replies.php:223
1318
  msgid "Select the attributes that your reply should have:"
1319
  msgstr ""
1320
 
1321
+ #: includes/admin/replies.php:225
1322
  msgid ""
1323
  "<strong>Forum</strong> dropdown determines the parent forum that the reply "
1324
  "belongs to. Select the forum, or leave the default (Use Forum of Topic) to "
1325
  "post the reply in forum of the topic."
1326
  msgstr ""
1327
 
1328
+ #: includes/admin/replies.php:226
1329
  msgid ""
1330
  "<strong>Topic</strong> determines the parent topic that the reply belongs to."
1331
  msgstr ""
1332
 
1333
+ #: includes/admin/replies.php:241
1334
  msgid ""
1335
  "<strong>Discussion</strong> - You can turn comments and pings on or off, and "
1336
  "if there are comments on the reply, you can see them here and moderate them."
1337
  msgstr ""
1338
 
1339
+ #: includes/admin/replies.php:351 includes/admin/topics.php:369
1340
+ #: templates/default/bbpress/form-anonymous.php:17
 
1341
  msgid "Author Information"
1342
  msgstr ""
1343
 
1344
+ #: includes/admin/replies.php:512
1345
  msgid "The reply was not found!"
1346
  msgstr ""
1347
 
1348
+ #: includes/admin/replies.php:515 includes/admin/topics.php:541
1349
  msgid "You do not have the permission to do that!"
1350
  msgstr ""
1351
 
1352
+ #: includes/admin/replies.php:583
1353
  msgid "There was a problem marking the reply \"%1$s\" as spam."
1354
  msgstr ""
1355
 
1356
+ #: includes/admin/replies.php:583
1357
  msgid "Reply \"%1$s\" successfully marked as spam."
1358
  msgstr ""
1359
 
1360
+ #: includes/admin/replies.php:587
1361
  msgid "There was a problem unmarking the reply \"%1$s\" as spam."
1362
  msgstr ""
1363
 
1364
+ #: includes/admin/replies.php:587
1365
  msgid "Reply \"%1$s\" successfully unmarked as spam."
1366
  msgstr ""
1367
 
1368
+ #: includes/admin/replies.php:620
1369
  msgid "Title"
1370
  msgstr ""
1371
 
1372
+ #: includes/admin/replies.php:623 includes/admin/topics.php:689
1373
+ #: templates/default/bbpress/loop-replies.php:18
1374
+ #: templates/default/bbpress/loop-replies.php:52
 
 
 
1375
  msgid "Author"
1376
  msgstr ""
1377
 
1378
+ #: includes/admin/replies.php:677 includes/admin/replies.php:685
1379
  msgid "No Topic"
1380
  msgstr ""
1381
 
1382
+ #: includes/admin/replies.php:703 includes/admin/replies.php:718
1383
+ #: includes/admin/topics.php:741
1384
  msgid "No Forum"
1385
  msgstr ""
1386
 
1387
+ #: includes/admin/replies.php:709
1388
  msgid "(Mismatch)"
1389
  msgstr ""
1390
 
1391
+ #: includes/admin/replies.php:777 includes/admin/topics.php:830
1392
  msgid "View &#8220;%s&#8221;"
1393
  msgstr ""
1394
 
1395
+ #: includes/admin/replies.php:777 includes/admin/topics.php:830
1396
  msgid "View"
1397
  msgstr ""
1398
 
1399
+ #: includes/admin/replies.php:788
1400
  msgid "Mark the reply as not spam"
1401
  msgstr ""
1402
 
1403
+ #: includes/admin/replies.php:788 includes/admin/topics.php:861
1404
  msgid "Not spam"
1405
  msgstr ""
1406
 
1407
+ #: includes/admin/replies.php:790
1408
  msgid "Mark this reply as spam"
1409
  msgstr ""
1410
 
1411
+ #: includes/admin/replies.php:790 includes/admin/topics.php:863
1412
+ #: includes/replies/template-tags.php:1719
1413
+ #: includes/topics/template-tags.php:2643
1414
  msgid "Spam"
1415
  msgstr ""
1416
 
1417
+ #: includes/admin/replies.php:799 includes/admin/topics.php:871
1418
+ #: includes/replies/template-tags.php:1663
1419
+ #: includes/topics/template-tags.php:2401
1420
  msgid "Restore this item from the Trash"
1421
  msgstr ""
1422
 
1423
+ #: includes/admin/replies.php:799 includes/admin/topics.php:871
1424
+ #: includes/replies/template-tags.php:1649
1425
+ #: includes/topics/template-tags.php:2387
1426
  msgid "Restore"
1427
  msgstr ""
1428
 
1429
+ #: includes/admin/replies.php:801 includes/admin/topics.php:873
1430
+ #: includes/replies/template-tags.php:1665
1431
+ #: includes/topics/template-tags.php:2403
1432
  msgid "Move this item to the Trash"
1433
  msgstr ""
1434
 
1435
+ #: includes/admin/replies.php:801 includes/admin/topics.php:873
1436
+ #: includes/replies/template-tags.php:1648
1437
+ #: includes/topics/template-tags.php:2386
1438
  msgid "Trash"
1439
  msgstr ""
1440
 
1441
+ #: includes/admin/replies.php:805 includes/admin/topics.php:877
1442
+ #: includes/replies/template-tags.php:1669
1443
+ #: includes/topics/template-tags.php:2407
1444
  msgid "Delete this item permanently"
1445
  msgstr ""
1446
 
1447
+ #: includes/admin/replies.php:805 includes/admin/topics.php:877
1448
  msgid "Delete Permanently"
1449
  msgstr ""
1450
 
1451
+ #: includes/admin/replies.php:831 includes/admin/topics.php:903
1452
  msgid "Empty Spam"
1453
  msgstr ""
1454
 
1455
+ #: includes/admin/replies.php:841 includes/admin/topics.php:913
1456
  msgid "In all forums"
1457
  msgstr ""
1458
 
1459
+ #: includes/admin/replies.php:901
1460
  msgid "Reply updated. <a href=\"%s\">View topic</a>"
1461
  msgstr ""
1462
 
1463
+ #: includes/admin/replies.php:910
1464
  msgid "Reply updated."
1465
  msgstr ""
1466
 
1467
  #. translators: %s: date and time of the revision
1468
+ #: includes/admin/replies.php:915
1469
  msgid "Reply restored to revision from %s"
1470
  msgstr ""
1471
 
1472
+ #: includes/admin/replies.php:919
1473
  msgid "Reply created. <a href=\"%s\">View topic</a>"
1474
  msgstr ""
1475
 
1476
+ #: includes/admin/replies.php:922
1477
  msgid "Reply saved."
1478
  msgstr ""
1479
 
1480
+ #: includes/admin/replies.php:925
1481
  msgid "Reply submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
1482
  msgstr ""
1483
 
1484
+ #: includes/admin/replies.php:928
1485
  msgid ""
1486
  "Reply scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
1487
  "\">Preview topic</a>"
1488
  msgstr ""
1489
 
1490
+ #: includes/admin/replies.php:935
1491
  msgid "Reply draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
1492
  msgstr ""
1493
 
1494
+ #: includes/admin/settings.php:24 includes/admin/settings.php:1292
1495
  msgid "Main Settings"
1496
  msgstr ""
1497
 
1498
+ #: includes/admin/settings.php:29
1499
  msgid "Theme Packages"
1500
  msgstr ""
1501
 
1502
+ #: includes/admin/settings.php:34 includes/admin/settings.php:1312
1503
  msgid "Per Page"
1504
  msgstr ""
1505
 
1506
+ #: includes/admin/settings.php:39
1507
  msgid "Per RSS Page"
1508
  msgstr ""
1509
 
1510
+ #: includes/admin/settings.php:44
1511
  msgid "Archive Slugs"
1512
  msgstr ""
1513
 
1514
+ #: includes/admin/settings.php:49
1515
  msgid "Single Slugs"
1516
  msgstr ""
1517
 
1518
+ #: includes/admin/settings.php:54
1519
  msgid "BuddyPress"
1520
  msgstr ""
1521
 
1522
+ #: includes/admin/settings.php:59
1523
  msgid "Akismet"
1524
  msgstr ""
1525
 
1526
+ #: includes/admin/settings.php:81
1527
+ msgid "Disallow editing after"
1528
+ msgstr ""
1529
+
1530
+ #: includes/admin/settings.php:89
1531
+ msgid "Throttle posting every"
1532
  msgstr ""
1533
 
1534
+ #: includes/admin/settings.php:97 includes/admin/settings.php:1425
1535
+ msgid "Revisions"
1536
  msgstr ""
1537
 
1538
+ #: includes/admin/settings.php:105 includes/extend/buddypress/loader.php:213
1539
+ #: templates/default/bbpress/user-details.php:48
1540
+ msgid "Favorites"
1541
  msgstr ""
1542
 
1543
+ #: includes/admin/settings.php:113 includes/extend/buddypress/loader.php:225
1544
+ #: templates/default/bbpress/user-details.php:58
1545
+ msgid "Subscriptions"
1546
  msgstr ""
1547
 
1548
+ #: includes/admin/settings.php:121
1549
+ msgid "Topic tags"
1550
  msgstr ""
1551
 
1552
+ #: includes/admin/settings.php:129
1553
+ msgid "Anonymous posting"
1554
  msgstr ""
1555
 
1556
+ #: includes/admin/settings.php:137
1557
+ msgid "Default user role"
1558
  msgstr ""
1559
 
1560
+ #: includes/admin/settings.php:145
1561
+ msgid "Auto role"
1562
  msgstr ""
1563
 
1564
+ #: includes/admin/settings.php:153
1565
+ msgid "Fancy editor"
1566
  msgstr ""
1567
 
1568
+ #: includes/admin/settings.php:161
1569
+ msgid "Auto-embed links"
1570
+ msgstr ""
1571
+
1572
+ #: includes/admin/settings.php:174
1573
  msgid "Current Package"
1574
  msgstr ""
1575
 
1576
+ #: includes/admin/settings.php:229 includes/admin/settings.php:1438
1577
  msgid "Forums base"
1578
  msgstr ""
1579
 
1580
+ #: includes/admin/settings.php:237 includes/admin/settings.php:1441
1581
  msgid "Topics base"
1582
  msgstr ""
1583
 
1584
+ #: includes/admin/settings.php:250
1585
  msgid "Forum Prefix"
1586
  msgstr ""
1587
 
1588
+ #: includes/admin/settings.php:258 includes/admin/settings.php:1444
1589
  msgid "Forum slug"
1590
  msgstr ""
1591
 
1592
+ #: includes/admin/settings.php:266 includes/admin/settings.php:1447
1593
  msgid "Topic slug"
1594
  msgstr ""
1595
 
1596
+ #: includes/admin/settings.php:274 includes/admin/settings.php:1459
1597
  msgid "Topic tag slug"
1598
  msgstr ""
1599
 
1600
+ #: includes/admin/settings.php:282 includes/admin/settings.php:1450
1601
  msgid "Reply slug"
1602
  msgstr ""
1603
 
1604
+ #: includes/admin/settings.php:290
1605
  msgid "User slug"
1606
  msgstr ""
1607
 
1608
+ #: includes/admin/settings.php:298
1609
  msgid "Topic view slug"
1610
  msgstr ""
1611
 
1612
+ #: includes/admin/settings.php:311
1613
  msgid "Enable Group Forums"
1614
  msgstr ""
1615
 
1616
+ #: includes/admin/settings.php:319
1617
  msgid "Group Forums Parent"
1618
  msgstr ""
1619
 
1620
+ #: includes/admin/settings.php:332
1621
  msgid "Use Akismet"
1622
  msgstr ""
1623
 
1624
+ #: includes/admin/settings.php:370
1625
  msgid "Main forum settings for enabling features and setting time limits"
1626
  msgstr ""
1627
 
1628
+ #: includes/admin/settings.php:386 includes/common/functions.php:121
1629
  msgid "minutes"
1630
  msgstr ""
1631
 
1632
+ #: includes/admin/settings.php:402 includes/common/functions.php:122
1633
  msgid "seconds"
1634
  msgstr ""
1635
 
1636
+ #: includes/admin/settings.php:418
1637
  msgid "Allow users to mark topics as favorites"
1638
  msgstr ""
1639
 
1640
+ #: includes/admin/settings.php:434
1641
  msgid "Allow users to subscribe to topics"
1642
  msgstr ""
1643
 
1644
+ #: includes/admin/settings.php:450
1645
+ msgid "Allow topics to have tags"
1646
+ msgstr ""
1647
+
1648
+ #: includes/admin/settings.php:466
1649
  msgid "Allow topic and reply revision logging"
1650
  msgstr ""
1651
 
1652
+ #: includes/admin/settings.php:482
1653
  msgid "Allow guest users without accounts to create topics and replies"
1654
  msgstr ""
1655
 
1656
+ #: includes/admin/settings.php:498
1657
  msgid ""
1658
+ "Automatically assign default role to new, registered users upon visiting the "
1659
+ "site."
1660
  msgstr ""
1661
 
1662
+ #: includes/admin/settings.php:536
1663
  msgid "Use the fancy WordPress editor to create and edit topics and replies"
1664
  msgstr ""
1665
 
1666
+ #: includes/admin/settings.php:549
1667
  msgid "How your forum content is displayed within your existing theme."
1668
  msgstr ""
1669
 
1670
+ #: includes/admin/settings.php:573
1671
  msgid "%1$s - %2$s"
1672
  msgstr ""
1673
 
1674
+ #: includes/admin/settings.php:579
1675
  msgid "will serve all bbPress templates"
1676
  msgstr ""
1677
 
1678
+ #: includes/admin/settings.php:583
1679
+ msgid "No template packages available."
1680
+ msgstr ""
1681
+
1682
+ #: includes/admin/settings.php:599
1683
  msgid ""
1684
  "Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and "
1685
+ "replies"
1686
  msgstr ""
1687
 
1688
+ #: includes/admin/settings.php:614
1689
  msgid "How many topics and replies to show per page"
1690
  msgstr ""
1691
 
1692
+ #: includes/admin/settings.php:630 includes/admin/settings.php:646
1693
+ #: includes/admin/settings.php:677 includes/admin/settings.php:693
1694
  msgid "per page"
1695
  msgstr ""
1696
 
1697
+ #: includes/admin/settings.php:661
1698
  msgid "How many topics and replies to show per RSS page"
1699
  msgstr ""
1700
 
1701
+ #: includes/admin/settings.php:711
1702
  msgid ""
1703
  "Custom root slugs to prefix your forums and topics with. These can be "
1704
  "partnered with WordPress pages to allow more flexibility."
1705
  msgstr ""
1706
 
1707
+ #: includes/admin/settings.php:760
1708
  msgid ""
1709
  "Custom slugs for single forums, topics, replies, tags, users, and views "
1710
  "here. If you change these, existing permalinks will also change."
1711
  msgstr ""
1712
 
1713
+ #: includes/admin/settings.php:776
1714
  msgid "Prefix your forum area with the Forum Base slug (Recommended)"
1715
  msgstr ""
1716
 
1717
+ #: includes/admin/settings.php:896
1718
  msgid "Forum settings for BuddyPress"
1719
  msgstr ""
1720
 
1721
+ #: includes/admin/settings.php:912
1722
  msgid "Allow BuddyPress Groups to have their own forums"
1723
  msgstr ""
1724
 
1725
+ #: includes/admin/settings.php:929
1726
+ msgid "&mdash; Forum root &mdash;"
1727
  msgstr ""
1728
 
1729
+ #: includes/admin/settings.php:937
1730
  msgid "is the parent for all group forums"
1731
  msgstr ""
1732
 
1733
+ #: includes/admin/settings.php:938
1734
  msgid ""
1735
  "Using the Forum Root is not recommended. Changing this does not move "
1736
  "existing forums."
1737
  msgstr ""
1738
 
1739
+ #: includes/admin/settings.php:953
1740
  msgid "Forum settings for Akismet"
1741
  msgstr ""
1742
 
1743
+ #: includes/admin/settings.php:970
1744
  msgid "Allow Akismet to actively prevent forum spam."
1745
  msgstr ""
1746
 
1747
+ #: includes/admin/settings.php:993
1748
+ msgid "Forums Settings"
1749
  msgstr ""
1750
 
1751
+ #: includes/admin/settings.php:1002
1752
+ #: templates/default/bbpress/form-user-edit.php:175
 
1753
  msgid "Save Changes"
1754
  msgstr ""
1755
 
1756
+ #: includes/admin/settings.php:1021
1757
  msgid ""
1758
  "Information about your previous forums database so that they can be "
1759
  "converted. <strong>Backup your database before proceeding.</strong>"
1760
  msgstr ""
1761
 
1762
+ #: includes/admin/settings.php:1051
1763
  msgid "is the previous forum software"
1764
  msgstr ""
1765
 
1766
+ #: includes/admin/settings.php:1065
1767
  msgid "IP or hostname"
1768
  msgstr ""
1769
 
1770
+ #: includes/admin/settings.php:1079
1771
  msgid "Use default 3306 if unsure"
1772
  msgstr ""
1773
 
1774
+ #: includes/admin/settings.php:1093
1775
  msgid "User for your database connection"
1776
  msgstr ""
1777
 
1778
+ #: includes/admin/settings.php:1107
1779
  msgid "Password to access the database"
1780
  msgstr ""
1781
 
1782
+ #: includes/admin/settings.php:1121
1783
  msgid "Name of the database with your old forum data"
1784
  msgstr ""
1785
 
1786
+ #: includes/admin/settings.php:1134
1787
  msgid "Some optional parameters to help tune the conversion process."
1788
  msgstr ""
1789
 
1790
+ #: includes/admin/settings.php:1148
1791
  msgid ""
1792
  "(If converting from BuddyPress Forums, use \"wp_bb_\" or your custom prefix)"
1793
  msgstr ""
1794
 
1795
+ #: includes/admin/settings.php:1162
1796
  msgid "rows to process at a time"
1797
  msgstr ""
1798
 
1799
+ #: includes/admin/settings.php:1163
1800
  msgid "Keep this low if you experience out-of-memory issues."
1801
  msgstr ""
1802
 
1803
+ #: includes/admin/settings.php:1177
1804
  msgid "second(s) delay between each group of rows"
1805
  msgstr ""
1806
 
1807
+ #: includes/admin/settings.php:1178
1808
  msgid "Keep this high to prevent too-many-connection issues."
1809
  msgstr ""
1810
 
1811
+ #: includes/admin/settings.php:1192
1812
  msgid "Start a fresh conversion from the beginning"
1813
  msgstr ""
1814
 
1815
+ #: includes/admin/settings.php:1193
1816
  msgid "You should clean old conversion information before starting over."
1817
  msgstr ""
1818
 
1819
+ #: includes/admin/settings.php:1207
1820
  msgid "Purge all information from a previously attempted import"
1821
  msgstr ""
1822
 
1823
+ #: includes/admin/settings.php:1208
1824
  msgid ""
1825
  "Use this if an import failed and you want to remove that incomplete data."
1826
  msgstr ""
1827
 
1828
+ #: includes/admin/settings.php:1222
1829
  msgid "Attempt to import user accounts from previous forums"
1830
  msgstr ""
1831
 
1832
+ #: includes/admin/settings.php:1223
1833
  msgid ""
1834
  "Non-bbPress passwords cannot be automatically converted. They will be "
1835
  "converted as each user logs in."
1836
  msgstr ""
1837
 
1838
+ #: includes/admin/settings.php:1253
1839
  msgid "Start"
1840
  msgstr ""
1841
 
1842
+ #: includes/admin/settings.php:1254
1843
  msgid "Stop"
1844
  msgstr ""
1845
 
1846
+ #: includes/admin/settings.php:1285
1847
+ msgid "This screen provides access to all of the Forums settings."
1848
  msgstr ""
1849
 
1850
+ #: includes/admin/settings.php:1286
1851
  msgid ""
1852
  "Please see the additional help tabs for more information on each indiviual "
1853
  "section."
1854
  msgstr ""
1855
 
1856
+ #: includes/admin/settings.php:1293
1857
  msgid "In the Main Settings you have a number of options:"
1858
  msgstr ""
1859
 
1860
+ #: includes/admin/settings.php:1296
1861
  msgid ""
1862
  "You can choose to lock a post after a certain number of minutes. \"Locking "
1863
  "post editing\" will prevent the author from editing some amount of time "
1864
  "after saving a post."
1865
  msgstr ""
1866
 
1867
+ #: includes/admin/settings.php:1297
1868
  msgid ""
1869
  "\"Throttle time\" is the amount of time required between posts from a single "
1870
  "author. The higher the throttle time, the longer a user will need to wait "
1871
  "between posting to the forum."
1872
  msgstr ""
1873
 
1874
+ #: includes/admin/settings.php:1298
1875
  msgid ""
1876
  "Favorites are a way for users to save and later return to topics they favor. "
1877
  "This is enabled by default."
1878
  msgstr ""
1879
 
1880
+ #: includes/admin/settings.php:1299
1881
  msgid ""
1882
  "Subscriptions allow users to subscribe for notifications to topics that "
1883
  "interest them. This is enabled by default."
1884
  msgstr ""
1885
 
1886
+ #: includes/admin/settings.php:1300
1887
+ msgid ""
1888
+ "Topic-Tags allow users to filter topics between forums. This is enabled by "
1889
+ "default."
1890
+ msgstr ""
1891
+
1892
+ #: includes/admin/settings.php:1301
1893
  msgid ""
1894
  "\"Anonymous Posting\" allows guest users who do not have accounts on your "
1895
  "site to both create topics as well as replies."
1896
  msgstr ""
1897
 
1898
+ #: includes/admin/settings.php:1302
1899
  msgid ""
1900
  "The Fancy Editor brings the luxury of the Visual editor and HTML editor from "
1901
  "the traditional WordPress dashboard into your theme."
1902
  msgstr ""
1903
 
1904
+ #: includes/admin/settings.php:1303
1905
  msgid ""
1906
  "Auto-embed will embed the media content from a URL directly into the "
1907
  "replies. For example: links to Flickr and YouTube."
1908
  msgstr ""
1909
 
1910
+ #: includes/admin/settings.php:1306
1911
  msgid ""
1912
  "You must click the Save Changes button at the bottom of the screen for new "
1913
  "settings to take effect."
1914
  msgstr ""
1915
 
1916
+ #: includes/admin/settings.php:1313
1917
  msgid ""
1918
  "Per Page settings allow you to control the number of topics and replies "
1919
  "appear on each page."
1920
  msgstr ""
1921
 
1922
+ #: includes/admin/settings.php:1314
1923
  msgid ""
1924
  "This is comparable to the WordPress \"Reading Settings\" page, where you can "
1925
  "set the number of posts that should show on blog pages and in feeds."
1926
  msgstr ""
1927
 
1928
+ #: includes/admin/settings.php:1315
1929
  msgid ""
1930
  "These are broken up into