bbPress - Version 2.5.1

Version Description

  • Updated subscriptions setting description
  • Fix forum subscriptions not appearing on profiles for some users
  • Allow links to have targets
  • Improve Windows compatibility
Download this release

Release Info

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

Code changes from version 2.5 to 2.5.1

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 5199 2013-11-25 06:37:25Z johnjamesjacoby $
9
  *
10
  * @package bbPress
11
  * @subpackage Main
@@ -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.5
21
  * Text Domain: bbpress
22
  * Domain Path: /languages/
23
  */
@@ -190,7 +190,7 @@ final class bbPress {
190
 
191
  /** Versions **********************************************************/
192
 
193
- $this->version = '2.5-5199';
194
  $this->db_version = '250';
195
 
196
  /** Paths *************************************************************/
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
+ * $Id: bbpress.php 5217 2013-12-04 21:14:22Z 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.5.1
21
  * Text Domain: bbpress
22
  * Domain Path: /languages/
23
  */
190
 
191
  /** Versions **********************************************************/
192
 
193
+ $this->version = '2.5.1-5217';
194
  $this->db_version = '250';
195
 
196
  /** Paths *************************************************************/
includes/admin/settings.php CHANGED
@@ -578,7 +578,7 @@ function bbp_admin_setting_callback_subscriptions() {
578
  ?>
579
 
580
  <input name="_bbp_enable_subscriptions" id="_bbp_enable_subscriptions" type="checkbox" value="1" <?php checked( bbp_is_subscriptions_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_subscriptions' ); ?> />
581
- <label for="_bbp_enable_subscriptions"><?php esc_html_e( 'Allow users to subscribe to topics', 'bbpress' ); ?></label>
582
 
583
  <?php
584
  }
578
  ?>
579
 
580
  <input name="_bbp_enable_subscriptions" id="_bbp_enable_subscriptions" type="checkbox" value="1" <?php checked( bbp_is_subscriptions_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_subscriptions' ); ?> />
581
+ <label for="_bbp_enable_subscriptions"><?php esc_html_e( 'Allow users to subscribe to forums and topics', 'bbpress' ); ?></label>
582
 
583
  <?php
584
  }
includes/common/formatting.php CHANGED
@@ -28,7 +28,8 @@ function bbp_kses_allowed_tags() {
28
  'a' => array(
29
  'href' => array(),
30
  'title' => array(),
31
- 'rel' => array()
 
32
  ),
33
 
34
  // Quotes
28
  'a' => array(
29
  'href' => array(),
30
  'title' => array(),
31
+ 'rel' => array(),
32
+ 'target' => array()
33
  ),
34
 
35
  // Quotes
includes/core/template-functions.php CHANGED
@@ -158,8 +158,17 @@ function bbp_enqueue_style( $handle = '', $file = '', $dependencies = array(), $
158
  // Enqueue if located
159
  if ( !empty( $located ) ) {
160
 
161
- // Make path to file relative to site URL
162
- $located = trailingslashit( WP_CONTENT_URL ) . ltrim( str_replace( WP_CONTENT_DIR, '', $located ), '/' );
 
 
 
 
 
 
 
 
 
163
 
164
  // Enqueue the style
165
  wp_enqueue_style( $handle, $located, $dependencies, $version, $media );
@@ -217,8 +226,17 @@ function bbp_enqueue_script( $handle = '', $file = '', $dependencies = array(),
217
  // Enqueue if located
218
  if ( !empty( $located ) ) {
219
 
220
- // Make path to file relative to site URL
221
- $located = trailingslashit( WP_CONTENT_URL ) . ltrim( str_replace( WP_CONTENT_DIR, '', $located ), '/' );
 
 
 
 
 
 
 
 
 
222
 
223
  // Enqueue the style
224
  wp_enqueue_script( $handle, $located, $dependencies, $version, $in_footer );
158
  // Enqueue if located
159
  if ( !empty( $located ) ) {
160
 
161
+ $content_dir = constant( 'WP_CONTENT_DIR' );
162
+
163
+ // IIS (Windows) here
164
+ // Replace back slashes with forward slash
165
+ if ( strpos( $located, '\\' ) !== false ) {
166
+ $located = str_replace( '\\', '/', $located );
167
+ $content_dir = str_replace( '\\', '/', $content_dir );
168
+ }
169
+
170
+ // Make path to file relative to site URL
171
+ $located = str_replace( $content_dir, WP_CONTENT_URL, $located );
172
 
173
  // Enqueue the style
174
  wp_enqueue_style( $handle, $located, $dependencies, $version, $media );
226
  // Enqueue if located
227
  if ( !empty( $located ) ) {
228
 
229
+ $content_dir = constant( 'WP_CONTENT_DIR' );
230
+
231
+ // IIS (Windows) here
232
+ // Replace back slashes with forward slash
233
+ if ( strpos( $located, '\\' ) !== false ) {
234
+ $located = str_replace( '\\', '/', $located );
235
+ $content_dir = str_replace( '\\', '/', $content_dir );
236
+ }
237
+
238
+ // Make path to file relative to site URL
239
+ $located = str_replace( $content_dir, WP_CONTENT_URL, $located );
240
 
241
  // Enqueue the style
242
  wp_enqueue_script( $handle, $located, $dependencies, $version, $in_footer );
includes/forums/template.php CHANGED
@@ -114,10 +114,23 @@ function bbp_get_forum_post_type_supports() {
114
  */
115
  function bbp_has_forums( $args = '' ) {
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  // Parse arguments with default forum query for most circumstances
118
  $bbp_f = bbp_parse_args( $args, array(
119
  'post_type' => bbp_get_forum_post_type(),
120
- 'post_parent' => bbp_is_forum_archive() ? 0 : bbp_get_forum_id(),
121
  'post_status' => bbp_get_public_status_id(),
122
  'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
123
  'ignore_sticky_posts' => true,
114
  */
115
  function bbp_has_forums( $args = '' ) {
116
 
117
+ // Forum archive only shows root
118
+ if ( bbp_is_forum_archive() ) {
119
+ $default_post_parent = 0;
120
+
121
+ // User subscriptions shows any
122
+ } elseif ( bbp_is_subscriptions() ) {
123
+ $default_post_parent = 'any';
124
+
125
+ // Could be anything, so look for possible parent ID
126
+ } else {
127
+ $default_post_parent = bbp_get_forum_id();
128
+ }
129
+
130
  // Parse arguments with default forum query for most circumstances
131
  $bbp_f = bbp_parse_args( $args, array(
132
  'post_type' => bbp_get_forum_post_type(),
133
+ 'post_parent' => $default_post_parent,
134
  'post_status' => bbp_get_public_status_id(),
135
  'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
136
  'ignore_sticky_posts' => true,
languages/bbpress.pot CHANGED
@@ -9,8 +9,8 @@ msgstr ""
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
  "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
  #: bbpress.php:133 bbpress.php:140
16
  msgid "Cheatin&#8217; huh?"
@@ -1479,7 +1479,7 @@ msgid "Allow users to mark topics as favorites"
1479
  msgstr ""
1480
 
1481
  #: includes/admin/settings.php:581
1482
- msgid "Allow users to subscribe to topics"
1483
  msgstr ""
1484
 
1485
  #: includes/admin/settings.php:597
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
  "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: JOHN JAMES JACOBY <jjj@bbpress.org>\n"
13
+ "Language-Team: ENGLISH <jjj@bbpress.org>\n"
14
 
15
  #: bbpress.php:133 bbpress.php:140
16
  msgid "Cheatin&#8217; huh?"
1479
  msgstr ""
1480
 
1481
  #: includes/admin/settings.php:581
1482
+ msgid "Allow users to subscribe to forums and topics"
1483
  msgstr ""
1484
 
1485
  #: includes/admin/settings.php:597
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: matt, johnjamesjacoby, jmdodd, netweb
3
  Tags: forums, discussion, support, theme, akismet, multisite
4
  Requires at least: 3.6
5
  Tested up to: 3.6
6
- Stable tag: 2.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -42,6 +42,12 @@ We're keeping things as small and light as possible while still allowing for gre
42
 
43
  == Changelog ==
44
 
 
 
 
 
 
 
45
  = 2.5 =
46
  * Added forum subscriptions
47
  * Added importers for AEF, Drupal, FluxBB, Kunena Forums (Joomla), MyBB, Phorum, PHPFox, PHPWind, PunBB, SMF, Xenforo and XMB
3
  Tags: forums, discussion, support, theme, akismet, multisite
4
  Requires at least: 3.6
5
  Tested up to: 3.6
6
+ Stable tag: 2.5.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
42
 
43
  == Changelog ==
44
 
45
+ = 2.5.1 =
46
+ * Updated subscriptions setting description
47
+ * Fix forum subscriptions not appearing on profiles for some users
48
+ * Allow links to have targets
49
+ * Improve Windows compatibility
50
+
51
  = 2.5 =
52
  * Added forum subscriptions
53
  * Added importers for AEF, Drupal, FluxBB, Kunena Forums (Joomla), MyBB, Phorum, PHPFox, PHPWind, PunBB, SMF, Xenforo and XMB