rtMedia for WordPress, BuddyPress and bbPress - Version 4.0

Version Description

Requires BuddyPress 1.7 or higher, if using BuddyPress. WordPress VIP compatibility and fixes for BuddyPress 2.6

=

Download this release

Release Info

Developer rtcamp
Plugin Icon 128x128 rtMedia for WordPress, BuddyPress and bbPress
Version 4.0
Comparing to
See all releases

Code changes from version 3.10.9 to 4.0

app/main/controllers/group/RTMediaGroup.php CHANGED
@@ -26,7 +26,7 @@ class RTMediaGroup {
26
  return;
27
  }
28
 
29
- if ( function_exists( 'bp_is_active' ) && bp_is_active( 'groups' ) ) {
30
  bp_register_group_extension( 'RTMediaGroupExtension' );
31
  }
32
 
26
  return;
27
  }
28
 
29
+ if ( function_exists( 'bp_is_active' ) && bp_is_active( 'groups' ) && class_exists( 'BP_Group_Extension' ) ) {
30
  bp_register_group_extension( 'RTMediaGroupExtension' );
31
  }
32
 
app/main/controllers/media/RTMediaFeatured.php CHANGED
@@ -210,7 +210,7 @@ class RTMediaFeatured extends RTMediaUserInteraction {
210
  }
211
 
212
  function rtmedia_featured( $user_id = false ) {
213
- echo esc_html( rtmedia_get_featured( $user_id ) );
214
  }
215
 
216
  function rtmedia_get_featured( $user_id = false ) {
210
  }
211
 
212
  function rtmedia_featured( $user_id = false ) {
213
+ echo rtmedia_get_featured( $user_id );
214
  }
215
 
216
  function rtmedia_get_featured( $user_id = false ) {
app/main/controllers/template/RTMediaNav.php CHANGED
@@ -43,7 +43,7 @@ class RTMediaNav {
43
  * @global object $bp global BuddyPress object
44
  */
45
  function custom_media_nav_tab() {
46
- global $bp;
47
  if ( ! function_exists( 'bp_core_new_nav_item' ) ) {
48
  return;
49
  }
@@ -67,7 +67,6 @@ class RTMediaNav {
67
  }
68
  }
69
  if ( bp_is_group() && 0 !== intval( $rtmedia->options['buddypress_enableOnGroup'] ) ) {
70
- global $bp;
71
  $media_enabled = true;
72
  //filter for rtMedia PRO for PER GROUP MEDIA enable/disable functionality
73
  $media_enabled = apply_filters( 'rtmedia_media_enabled_for_current_group', $media_enabled );
@@ -79,16 +78,41 @@ class RTMediaNav {
79
  if ( $media_enabled && $is_visible_to_current_user ) {
80
  $group_counts = $this->actual_counts( $bp->groups->current_group->id, 'group' );
81
  $slug = apply_filters( 'rtmedia_group_media_tab_slug', RTMEDIA_MEDIA_SLUG );
82
- $bp->bp_options_nav[ bp_get_current_group_slug() ]['media'] = array(
83
- 'name' => RTMEDIA_MEDIA_LABEL . ' <span>' . $group_counts['total']['all'] . '</span>',
84
- 'link' => trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . bp_get_current_group_slug() . '/' ) . $slug,
85
- 'slug' => $slug,
86
- 'user_has_access' => true,
87
- 'css_id' => 'rtmedia-media-nav',
88
- 'position' => 99,
89
- 'screen_function' => array( $this, 'media_screen' ),
90
- 'default_subnav_slug' => 'all',
91
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
  }
94
  }
43
  * @global object $bp global BuddyPress object
44
  */
45
  function custom_media_nav_tab() {
46
+ $bp = buddypress();
47
  if ( ! function_exists( 'bp_core_new_nav_item' ) ) {
48
  return;
49
  }
67
  }
68
  }
69
  if ( bp_is_group() && 0 !== intval( $rtmedia->options['buddypress_enableOnGroup'] ) ) {
 
70
  $media_enabled = true;
71
  //filter for rtMedia PRO for PER GROUP MEDIA enable/disable functionality
72
  $media_enabled = apply_filters( 'rtmedia_media_enabled_for_current_group', $media_enabled );
78
  if ( $media_enabled && $is_visible_to_current_user ) {
79
  $group_counts = $this->actual_counts( $bp->groups->current_group->id, 'group' );
80
  $slug = apply_filters( 'rtmedia_group_media_tab_slug', RTMEDIA_MEDIA_SLUG );
81
+
82
+ if( isset( $bp->version ) && $bp->version > '2.5.3' ){
83
+
84
+ /*
85
+ * As from BuddyPress 2.6, you can't access $bp->bp_options_nav directly.
86
+ * Use `bp_core_new_subnav_item` to add subnav item.
87
+ *
88
+ * Check https://buddypress.trac.wordpress.org/ticket/6534 and https://buddypress.trac.wordpress.org/changeset/10745
89
+ * for more details
90
+ */
91
+ bp_core_new_subnav_item( array(
92
+ 'name' => RTMEDIA_MEDIA_LABEL . ' <span>' . $group_counts['total']['all'] . '</span>',
93
+ 'link' => trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . bp_get_current_group_slug() . '/' ) . $slug,
94
+ 'slug' => $slug,
95
+ 'parent_slug' => bp_get_current_group_slug(),
96
+ 'parent_url' => trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . bp_get_current_group_slug() . '/' ),
97
+ 'user_has_access' => true,
98
+ 'css_id' => 'rtmedia-media-nav',
99
+ 'position' => 99,
100
+ 'screen_function' => array( $this, 'media_screen' ),
101
+ 'default_subnav_slug' => 'all',
102
+ ) );
103
+
104
+ } else {
105
+ $bp->bp_options_nav[ bp_get_current_group_slug() ]['media'] = array(
106
+ 'name' => RTMEDIA_MEDIA_LABEL . ' <span>' . $group_counts['total']['all'] . '</span>',
107
+ 'link' => trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . bp_get_current_group_slug() . '/' ) . $slug,
108
+ 'slug' => $slug,
109
+ 'user_has_access' => true,
110
+ 'css_id' => 'rtmedia-media-nav',
111
+ 'position' => 99,
112
+ 'screen_function' => array( $this, 'media_screen' ),
113
+ 'default_subnav_slug' => 'all',
114
+ );
115
+ }
116
  }
117
  }
118
  }
index.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
  Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
- Version: 3.10.9
8
  Author: rtCamp
9
  Text Domain: buddypress-media
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
  Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
+ Version: 4.0
8
  Author: rtCamp
9
  Text Domain: buddypress-media
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
readme.txt CHANGED
@@ -6,13 +6,13 @@ License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: 4.5.2
9
- Stable tag: 3.10.9
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
12
 
13
  == Description ==
14
 
15
- rtMedia is the **only** complete media solution for WordPress, BuddyPress and bbPress, and is WordPress VIP compatible.
16
 
17
  Built with a mobile-first approach, it works on mobile/tablet devices (like iPhone/iPad, Android).
18
 
@@ -138,6 +138,11 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
138
 
139
  == Changelog ==
140
 
 
 
 
 
 
141
  = 3.10.9 [Jun 20, 2016] =
142
  * WordPress VIP compatibility added
143
 
@@ -1156,8 +1161,8 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
1156
 
1157
  == Upgrade Notice ==
1158
 
1159
- = 3.10.9 =
1160
- Requires BuddyPress 1.7 or higher, if using BuddyPress. WordPress VIP compatibility added
1161
 
1162
  == Sponsors ==
1163
 
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: 4.5.2
9
+ Stable tag: 4.0
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
12
 
13
  == Description ==
14
 
15
+ rtMedia is the **only** complete media solution for WordPress, BuddyPress and bbPress, and is **WordPress VIP** compatible.
16
 
17
  Built with a mobile-first approach, it works on mobile/tablet devices (like iPhone/iPad, Android).
18
 
138
 
139
  == Changelog ==
140
 
141
+ = 4.0 [Jun 21, 2016] =
142
+ * Removed esc_html causing stripping of html tags in rtMedia featured for WordPress VIP compatibility
143
+ * Fixed BuddyPress nav items in group issue for BuddyPress 2.6 with backward compatibility
144
+ * Fixed check of class_exist for group extension for BuddyPress 2.6 compatibility
145
+
146
  = 3.10.9 [Jun 20, 2016] =
147
  * WordPress VIP compatibility added
148
 
1161
 
1162
  == Upgrade Notice ==
1163
 
1164
+ = 4.0 =
1165
+ Requires BuddyPress 1.7 or higher, if using BuddyPress. WordPress VIP compatibility and fixes for BuddyPress 2.6
1166
 
1167
  == Sponsors ==
1168