bbPress - Version 2.1-rc2

Version Description

Download this release

Release Info

Developer johnjamesjacoby
Plugin Icon 128x128 bbPress
Version 2.1-rc2
Comparing to
See all releases

Code changes from version 2.1-rc1 to 2.1-rc2

bbp-admin/bbp-admin.php CHANGED
@@ -291,10 +291,10 @@ class BBP_Admin {
291
  foreach ( $fields as $field_id => $field ) {
292
 
293
  // Add the field
294
- add_settings_field( $field_id, $field['title'], $field['callback'], $field['page'], $section_id, $field['args'] );
295
 
296
  // Register the setting
297
- register_setting( $section_id, $field_id, $field['sanitize_callback'] );
298
  }
299
  }
300
  }
291
  foreach ( $fields as $field_id => $field ) {
292
 
293
  // Add the field
294
+ add_settings_field( $field_id, $field['title'], $field['callback'], $section['page'], $section_id, $field['args'] );
295
 
296
  // Register the setting
297
+ register_setting( $section['page'], $field_id, $field['sanitize_callback'] );
298
  }
299
  }
300
  }
bbp-admin/bbp-settings.php CHANGED
@@ -81,7 +81,6 @@ function bbp_admin_get_settings_fields() {
81
  'title' => __( 'Lock post editing after', 'bbpress' ),
82
  'callback' => 'bbp_admin_setting_callback_editlock',
83
  'sanitize_callback' => 'intval',
84
- 'page' => 'bbpress',
85
  'args' => array()
86
  ),
87
 
@@ -90,7 +89,6 @@ function bbp_admin_get_settings_fields() {
90
  'title' => __( 'Throttle time', 'bbpress' ),
91
  'callback' => 'bbp_admin_setting_callback_throttle',
92
  'sanitize_callback' => 'intval',
93
- 'page' => 'bbpress',
94
  'args' => array()
95
  ),
96
 
@@ -99,7 +97,6 @@ function bbp_admin_get_settings_fields() {
99
  'title' => __( 'Allow Revisions', 'bbpress' ),
100
  'callback' => 'bbp_admin_setting_callback_revisions',
101
  'sanitize_callback' => 'intval',
102
- 'page' => 'bbpress',
103
  'args' => array()
104
  ),
105
 
@@ -108,7 +105,6 @@ function bbp_admin_get_settings_fields() {
108
  'title' => __( 'Allow Favorites', 'bbpress' ),
109
  'callback' => 'bbp_admin_setting_callback_favorites',
110
  'sanitize_callback' => 'intval',
111
- 'page' => 'bbpress',
112
  'args' => array()
113
  ),
114
 
@@ -117,7 +113,6 @@ function bbp_admin_get_settings_fields() {
117
  'title' => __( 'Allow Subscriptions', 'bbpress' ),
118
  'callback' => 'bbp_admin_setting_callback_subscriptions',
119
  'sanitize_callback' => 'intval',
120
- 'page' => 'bbpress',
121
  'args' => array()
122
  ),
123
 
@@ -126,7 +121,6 @@ function bbp_admin_get_settings_fields() {
126
  'title' => __( 'Allow Anonymous Posting', 'bbpress' ),
127
  'callback' => 'bbp_admin_setting_callback_anonymous',
128
  'sanitize_callback' => 'intval',
129
- 'page' => 'bbpress',
130
  'args' => array()
131
  ),
132
 
@@ -135,7 +129,6 @@ function bbp_admin_get_settings_fields() {
135
  'title' => __( 'Allow Global Access', 'bbpress' ),
136
  'callback' => 'bbp_admin_setting_callback_global_access',
137
  'sanitize_callback' => 'intval',
138
- 'page' => 'bbpress',
139
  'args' => array()
140
  ),
141
 
@@ -143,7 +136,6 @@ function bbp_admin_get_settings_fields() {
143
  '_bbp_use_wp_editor' => array(
144
  'title' => __( 'Fancy Editor', 'bbpress' ),
145
  'callback' => 'bbp_admin_setting_callback_use_wp_editor',
146
- 'page' => 'bbpress',
147
  'args' => array(),
148
  'sanitize_callback' => 'intval'
149
  ),
@@ -153,7 +145,6 @@ function bbp_admin_get_settings_fields() {
153
  'title' => __( 'Auto-embed Links', 'bbpress' ),
154
  'callback' => 'bbp_admin_setting_callback_use_autoembed',
155
  'sanitize_callback' => 'intval',
156
- 'page' => 'bbpress',
157
  'args' => array()
158
  )
159
  ),
@@ -166,8 +157,7 @@ function bbp_admin_get_settings_fields() {
166
  '_bbp_theme_package_id' => array(
167
  'title' => __( 'Current Package', 'bbpress' ),
168
  'callback' => 'bbp_admin_setting_callback_subtheme_id',
169
- 'sanitize_callback' => 'intval',
170
- 'page' => 'bbpress',
171
  'args' => array()
172
  )
173
  ),
@@ -181,7 +171,6 @@ function bbp_admin_get_settings_fields() {
181
  'title' => __( 'Topics', 'bbpress' ),
182
  'callback' => 'bbp_admin_setting_callback_topics_per_page',
183
  'sanitize_callback' => 'intval',
184
- 'page' => 'bbpress',
185
  'args' => array()
186
  ),
187
 
@@ -190,7 +179,6 @@ function bbp_admin_get_settings_fields() {
190
  'title' => __( 'Replies', 'bbpress' ),
191
  'callback' => 'bbp_admin_setting_callback_replies_per_page',
192
  'sanitize_callback' => 'intval',
193
- 'page' => 'bbpress',
194
  'args' => array()
195
  )
196
  ),
@@ -204,7 +192,6 @@ function bbp_admin_get_settings_fields() {
204
  'title' => __( 'Topics', 'bbpress' ),
205
  'callback' => 'bbp_admin_setting_callback_topics_per_rss_page',
206
  'sanitize_callback' => 'intval',
207
- 'page' => 'bbpress',
208
  'args' => array()
209
  ),
210
 
@@ -213,7 +200,6 @@ function bbp_admin_get_settings_fields() {
213
  'title' => __( 'Replies', 'bbpress' ),
214
  'callback' => 'bbp_admin_setting_callback_replies_per_rss_page',
215
  'sanitize_callback' => 'intval',
216
- 'page' => 'bbpress',
217
  'args' => array()
218
  )
219
  ),
@@ -227,7 +213,6 @@ function bbp_admin_get_settings_fields() {
227
  'title' => __( 'Forums base', 'bbpress' ),
228
  'callback' => 'bbp_admin_setting_callback_root_slug',
229
  'sanitize_callback' => 'esc_sql',
230
- 'page' => 'bbpress',
231
  'args' => array()
232
  ),
233
 
@@ -235,8 +220,7 @@ function bbp_admin_get_settings_fields() {
235
  '_bbp_topic_archive_slug' => array(
236
  'title' => __( 'Topics base', 'bbpress' ),
237
  'callback' => 'bbp_admin_setting_callback_topic_archive_slug',
238
- 'sanitize_callback' => 'intval',
239
- 'page' => 'bbpress',
240
  'args' => array()
241
  )
242
  ),
@@ -250,7 +234,6 @@ function bbp_admin_get_settings_fields() {
250
  'title' => __( 'Forum Prefix', 'bbpress' ),
251
  'callback' => 'bbp_admin_setting_callback_include_root',
252
  'sanitize_callback' => 'intval',
253
- 'page' => 'bbpress',
254
  'args' => array()
255
  ),
256
 
@@ -259,7 +242,6 @@ function bbp_admin_get_settings_fields() {
259
  'title' => __( 'Forum slug', 'bbpress' ),
260
  'callback' => 'bbp_admin_setting_callback_forum_slug',
261
  'sanitize_callback' => 'sanitize_title',
262
- 'page' => 'bbpress',
263
  'args' => array()
264
  ),
265
 
@@ -268,7 +250,6 @@ function bbp_admin_get_settings_fields() {
268
  'title' => __( 'Topic slug', 'bbpress' ),
269
  'callback' => 'bbp_admin_setting_callback_topic_slug',
270
  'sanitize_callback' => 'sanitize_title',
271
- 'page' => 'bbpress',
272
  'args' => array()
273
  ),
274
 
@@ -277,7 +258,6 @@ function bbp_admin_get_settings_fields() {
277
  'title' => __( 'Topic tag slug', 'bbpress' ),
278
  'callback' => 'bbp_admin_setting_callback_topic_tag_slug',
279
  'sanitize_callback' => 'sanitize_title',
280
- 'page' => 'bbpress',
281
  'args' => array()
282
  ),
283
 
@@ -286,7 +266,6 @@ function bbp_admin_get_settings_fields() {
286
  'title' => __( 'Reply slug', 'bbpress' ),
287
  'callback' => 'bbp_admin_setting_callback_reply_slug',
288
  'sanitize_callback' => 'sanitize_title',
289
- 'page' => 'bbpress',
290
  'args' => array()
291
  ),
292
 
@@ -295,7 +274,6 @@ function bbp_admin_get_settings_fields() {
295
  'title' => __( 'User slug', 'bbpress' ),
296
  'callback' => 'bbp_admin_setting_callback_user_slug',
297
  'sanitize_callback' => 'sanitize_title',
298
- 'page' => 'bbpress',
299
  'args' => array()
300
  ),
301
 
@@ -304,7 +282,6 @@ function bbp_admin_get_settings_fields() {
304
  'title' => __( 'Topic view slug', 'bbpress' ),
305
  'callback' => 'bbp_admin_setting_callback_view_slug',
306
  'sanitize_callback' => 'sanitize_title',
307
- 'page' => 'bbpress',
308
  'args' => array()
309
  )
310
  ),
@@ -318,7 +295,6 @@ function bbp_admin_get_settings_fields() {
318
  'title' => __( 'Enable Group Forums', 'bbpress' ),
319
  'callback' => 'bbp_admin_setting_callback_group_forums',
320
  'sanitize_callback' => 'intval',
321
- 'page' => 'bbpress',
322
  'args' => array()
323
  ),
324
 
@@ -327,7 +303,6 @@ function bbp_admin_get_settings_fields() {
327
  'title' => __( 'Group Forums Parent', 'bbpress' ),
328
  'callback' => 'bbp_admin_setting_callback_group_forums_root_id',
329
  'sanitize_callback' => 'intval',
330
- 'page' => 'bbpress',
331
  'args' => array()
332
  )
333
  ),
@@ -341,7 +316,6 @@ function bbp_admin_get_settings_fields() {
341
  'title' => __( 'Use Akismet', 'bbpress' ),
342
  'callback' => 'bbp_admin_setting_callback_akismet',
343
  'sanitize_callback' => 'intval',
344
- 'page' => 'bbpress',
345
  'args' => array()
346
  )
347
  )
81
  'title' => __( 'Lock post editing after', 'bbpress' ),
82
  'callback' => 'bbp_admin_setting_callback_editlock',
83
  'sanitize_callback' => 'intval',
 
84
  'args' => array()
85
  ),
86
 
89
  'title' => __( 'Throttle time', 'bbpress' ),
90
  'callback' => 'bbp_admin_setting_callback_throttle',
91
  'sanitize_callback' => 'intval',
 
92
  'args' => array()
93
  ),
94
 
97
  'title' => __( 'Allow Revisions', 'bbpress' ),
98
  'callback' => 'bbp_admin_setting_callback_revisions',
99
  'sanitize_callback' => 'intval',
 
100
  'args' => array()
101
  ),
102
 
105
  'title' => __( 'Allow Favorites', 'bbpress' ),
106
  'callback' => 'bbp_admin_setting_callback_favorites',
107
  'sanitize_callback' => 'intval',
 
108
  'args' => array()
109
  ),
110
 
113
  'title' => __( 'Allow Subscriptions', 'bbpress' ),
114
  'callback' => 'bbp_admin_setting_callback_subscriptions',
115
  'sanitize_callback' => 'intval',
 
116
  'args' => array()
117
  ),
118
 
121
  'title' => __( 'Allow Anonymous Posting', 'bbpress' ),
122
  'callback' => 'bbp_admin_setting_callback_anonymous',
123
  'sanitize_callback' => 'intval',
 
124
  'args' => array()
125
  ),
126
 
129
  'title' => __( 'Allow Global Access', 'bbpress' ),
130
  'callback' => 'bbp_admin_setting_callback_global_access',
131
  'sanitize_callback' => 'intval',
 
132
  'args' => array()
133
  ),
134
 
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'
141
  ),
145
  'title' => __( 'Auto-embed Links', 'bbpress' ),
146
  'callback' => 'bbp_admin_setting_callback_use_autoembed',
147
  'sanitize_callback' => 'intval',
 
148
  'args' => array()
149
  )
150
  ),
157
  '_bbp_theme_package_id' => array(
158
  'title' => __( 'Current Package', 'bbpress' ),
159
  'callback' => 'bbp_admin_setting_callback_subtheme_id',
160
+ 'sanitize_callback' => 'esc_sql',
 
161
  'args' => array()
162
  )
163
  ),
171
  'title' => __( 'Topics', 'bbpress' ),
172
  'callback' => 'bbp_admin_setting_callback_topics_per_page',
173
  'sanitize_callback' => 'intval',
 
174
  'args' => array()
175
  ),
176
 
179
  'title' => __( 'Replies', 'bbpress' ),
180
  'callback' => 'bbp_admin_setting_callback_replies_per_page',
181
  'sanitize_callback' => 'intval',
 
182
  'args' => array()
183
  )
184
  ),
192
  'title' => __( 'Topics', 'bbpress' ),
193
  'callback' => 'bbp_admin_setting_callback_topics_per_rss_page',
194
  'sanitize_callback' => 'intval',
 
195
  'args' => array()
196
  ),
197
 
200
  'title' => __( 'Replies', 'bbpress' ),
201
  'callback' => 'bbp_admin_setting_callback_replies_per_rss_page',
202
  'sanitize_callback' => 'intval',
 
203
  'args' => array()
204
  )
205
  ),
213
  'title' => __( 'Forums base', 'bbpress' ),
214
  'callback' => 'bbp_admin_setting_callback_root_slug',
215
  'sanitize_callback' => 'esc_sql',
 
216
  'args' => array()
217
  ),
218
 
220
  '_bbp_topic_archive_slug' => array(
221
  'title' => __( 'Topics base', 'bbpress' ),
222
  'callback' => 'bbp_admin_setting_callback_topic_archive_slug',
223
+ 'sanitize_callback' => 'esc_sql',
 
224
  'args' => array()
225
  )
226
  ),
234
  'title' => __( 'Forum Prefix', 'bbpress' ),
235
  'callback' => 'bbp_admin_setting_callback_include_root',
236
  'sanitize_callback' => 'intval',
 
237
  'args' => array()
238
  ),
239
 
242
  'title' => __( 'Forum slug', 'bbpress' ),
243
  'callback' => 'bbp_admin_setting_callback_forum_slug',
244
  'sanitize_callback' => 'sanitize_title',
 
245
  'args' => array()
246
  ),
247
 
250
  'title' => __( 'Topic slug', 'bbpress' ),
251
  'callback' => 'bbp_admin_setting_callback_topic_slug',
252
  'sanitize_callback' => 'sanitize_title',
 
253
  'args' => array()
254
  ),
255
 
258
  'title' => __( 'Topic tag slug', 'bbpress' ),
259
  'callback' => 'bbp_admin_setting_callback_topic_tag_slug',
260
  'sanitize_callback' => 'sanitize_title',
 
261
  'args' => array()
262
  ),
263
 
266
  'title' => __( 'Reply slug', 'bbpress' ),
267
  'callback' => 'bbp_admin_setting_callback_reply_slug',
268
  'sanitize_callback' => 'sanitize_title',
 
269
  'args' => array()
270
  ),
271
 
274
  'title' => __( 'User slug', 'bbpress' ),
275
  'callback' => 'bbp_admin_setting_callback_user_slug',
276
  'sanitize_callback' => 'sanitize_title',
 
277
  'args' => array()
278
  ),
279
 
282
  'title' => __( 'Topic view slug', 'bbpress' ),
283
  'callback' => 'bbp_admin_setting_callback_view_slug',
284
  'sanitize_callback' => 'sanitize_title',
 
285
  'args' => array()
286
  )
287
  ),
295
  'title' => __( 'Enable Group Forums', 'bbpress' ),
296
  'callback' => 'bbp_admin_setting_callback_group_forums',
297
  'sanitize_callback' => 'intval',
 
298
  'args' => array()
299
  ),
300
 
303
  'title' => __( 'Group Forums Parent', 'bbpress' ),
304
  'callback' => 'bbp_admin_setting_callback_group_forums_root_id',
305
  'sanitize_callback' => 'intval',
 
306
  'args' => array()
307
  )
308
  ),
316
  'title' => __( 'Use Akismet', 'bbpress' ),
317
  'callback' => 'bbp_admin_setting_callback_akismet',
318
  'sanitize_callback' => 'intval',
 
319
  'args' => array()
320
  )
321
  )
bbp-includes/bbp-extend-akismet.php CHANGED
@@ -48,8 +48,10 @@ class BBP_Akismet {
48
 
49
  // bbPress functions to check for spam
50
  $checks['check'] = array(
51
- 'bbp_new_topic_pre_insert' => 1, // Topic check
52
- 'bbp_new_reply_pre_insert' => 1 // Reply check
 
 
53
  );
54
 
55
  // bbPress functions for spam and ham submissions
48
 
49
  // bbPress functions to check for spam
50
  $checks['check'] = array(
51
+ 'bbp_new_topic_pre_insert' => 1, // New topic check
52
+ 'bbp_new_reply_pre_insert' => 1, // New reply check
53
+ 'bbp_edit_topic_pre_insert' => 1, // Edit topic check
54
+ 'bbp_edit_reply_pre_insert' => 1 // Edit reply check
55
  );
56
 
57
  // bbPress functions for spam and ham submissions
bbpress.php CHANGED
@@ -5,8 +5,8 @@
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
- * $Id: bbpress.php 4013 2012-06-27 03:32:24Z johnjamesjacoby $
9
- *
10
  * @package bbPress
11
  * @subpackage Main
12
  */
@@ -17,7 +17,7 @@
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-rc1
21
  * Text Domain: bbpress
22
  * Domain Path: /bbp-languages/
23
  */
@@ -69,7 +69,7 @@ final class bbPress {
69
  /**
70
  * @var array Overloads get_option()
71
  */
72
- public $options = array();
73
 
74
  /**
75
  * @var array Overloads get_user_meta()
@@ -173,8 +173,8 @@ final class bbPress {
173
 
174
  /** Versions **********************************************************/
175
 
176
- $this->version = '2.1-rc1'; // bbPress version
177
- $this->db_version = '202'; // bbPress DB version
178
 
179
  /** Paths *************************************************************/
180
 
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
+ * $Id: bbpress.php 4021 2012-06-27 21:28:12Z johnjamesjacoby $
9
+ *
10
  * @package bbPress
11
  * @subpackage Main
12
  */
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-rc2
21
  * Text Domain: bbpress
22
  * Domain Path: /bbp-languages/
23
  */
69
  /**
70
  * @var array Overloads get_option()
71
  */
72
+ public $options = array();
73
 
74
  /**
75
  * @var array Overloads get_user_meta()
173
 
174
  /** Versions **********************************************************/
175
 
176
+ $this->version = '2.1-rc2'; // bbPress version
177
+ $this->db_version = '203'; // bbPress DB version
178
 
179
  /** Paths *************************************************************/
180
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: matt, johnjamesjacoby
3
  Tags: bbpress, forums, discussion, support, theme, buddypress, akismet, multisite
4
  Requires at least: 3.4
5
  Tested up to: 3.4
6
- Stable tag: 2.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -26,6 +26,10 @@ We're keeping things as small and light as possible while still allowing for gre
26
 
27
  == Changelog ==
28
 
 
 
 
 
29
  = 2.1-rc-1 =
30
  * Improved post cache invalidation
31
  * Improved admin settings API
3
  Tags: bbpress, forums, discussion, support, theme, buddypress, akismet, multisite
4
  Requires at least: 3.4
5
  Tested up to: 3.4
6
+ Stable tag: 2.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
26
 
27
  == Changelog ==
28
 
29
+ = 2.1-rc-2 =
30
+ * Fix settings screen regressions
31
+ * Run topic and reply edits through Akismet
32
+
33
  = 2.1-rc-1 =
34
  * Improved post cache invalidation
35
  * Improved admin settings API