From d908bfdc5c2601c88a047e82ef04b627a8dcf950 Mon Sep 17 00:00:00 2001 From: vishalkakadiya Date: Wed, 13 Apr 2022 18:04:56 +0530 Subject: [PATCH 01/15] Fix BPrewrites plugin conflicts with rtMedia --- .../controllers/privacy/RTMediaPrivacy.php | 2 +- app/main/controllers/template/RTMediaNav.php | 2 +- .../controllers/template/rtmedia-actions.php | 54 +++++++++++++++++++ app/main/interactions/RTMediaInteraction.php | 2 +- 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/app/main/controllers/privacy/RTMediaPrivacy.php b/app/main/controllers/privacy/RTMediaPrivacy.php index 0dd4f7f0b..765866420 100755 --- a/app/main/controllers/privacy/RTMediaPrivacy.php +++ b/app/main/controllers/privacy/RTMediaPrivacy.php @@ -34,7 +34,7 @@ class RTMediaPrivacy { public function __construct( $flag = true ) { if ( is_rtmedia_privacy_enable() && $flag ) { - add_action( 'bp_init', array( $this, 'add_nav' ) ); + add_action( 'bp_setup_nav', array( $this, 'add_nav' ) ); add_action( 'bp_template_content', array( $this, 'content' ) ); add_filter( 'bp_activity_get_user_join_filter', array( $this, 'activity_privacy' ), 10, 6 ); diff --git a/app/main/controllers/template/RTMediaNav.php b/app/main/controllers/template/RTMediaNav.php index f358bfbbe..4a2cc0d11 100755 --- a/app/main/controllers/template/RTMediaNav.php +++ b/app/main/controllers/template/RTMediaNav.php @@ -31,7 +31,7 @@ public function __construct( $action = true ) { add_action( 'admin_bar_menu', array( $this, 'admin_nav' ), $order ); if ( class_exists( 'BuddyPress' ) ) { - add_action( 'bp_init', array( $this, 'custom_media_nav_tab' ), 10, 1 ); + add_action( 'bp_setup_nav', array( $this, 'custom_media_nav_tab' ), 10, 1 ); add_filter( 'bp_nouveau_nav_has_count', array( $this, 'rtmedia_bp_nouveau_nav_has_count' ), 10, 3 ); add_filter( 'bp_nouveau_get_nav_count', array( $this, 'rtmedia_bp_nouveau_get_nav_count' ), 10, 3 ); } diff --git a/app/main/controllers/template/rtmedia-actions.php b/app/main/controllers/template/rtmedia-actions.php index 0526b6963..61b45c947 100644 --- a/app/main/controllers/template/rtmedia-actions.php +++ b/app/main/controllers/template/rtmedia-actions.php @@ -1038,6 +1038,60 @@ function rtmedia_gallery_shortcode_json_query_vars( $wp_query ) { } add_action( 'pre_get_posts', 'rtmedia_gallery_shortcode_json_query_vars', 99 ); +/** + * Handles the conflicting between - BuddyPress Rewrites and rtMedia plugins. + * + * @param object $query WP query object. + */ +function rtmedia_pre_get_posts( $query ) { + + global $wp_query; + + if ( ! $query->is_main_query() ) { + return; + } + + if ( get_query_var( 'bp_members' ) ) { + + $bp_member = get_query_var( 'bp_member' ); + $bp_member_component = get_query_var( 'bp_member_component' ); + + if ( $bp_member ) { + + if ( 'media' === $bp_member_component || 'upload' === $bp_member_component ) { + + $wp_query->query['attachment'] = $bp_member; + $wp_query->query_vars['attachment'] = $bp_member; + + unset( $wp_query->queried_object ); + unset( $wp_query->queried_object_id ); + + $wp_query->set( 'tax_query', '' ); + + if ( 'media' === $bp_member_component ) { + + $wp_query->query['media'] = ''; + + $action = get_query_var( 'bp_member_action' ); + $action_variable = get_query_var( 'bp_member_action_variables' ); + + if ( ! empty( $action_variable ) ) { + $action = $action . '/' . $action_variable; + } + + $wp_query->query_vars['media'] = $action; + + } elseif ( 'upload' === $bp_member_component ) { + + $wp_query->query['upload'] = ''; + $wp_query->query_vars['upload'] = ''; + } + } + } + } +} +add_action( 'pre_get_posts', 'rtmedia_pre_get_posts', 9999 ); + /** * Rule for pagination for rtmedia gallery shortcode */ diff --git a/app/main/interactions/RTMediaInteraction.php b/app/main/interactions/RTMediaInteraction.php index 0872b98b2..0766a9171 100755 --- a/app/main/interactions/RTMediaInteraction.php +++ b/app/main/interactions/RTMediaInteraction.php @@ -48,7 +48,7 @@ public function __construct() { add_action( 'init', array( $this, 'flush_rules' ) ); // set up interaction and routes. - add_action( 'template_redirect', array( $this, 'init' ), 99 ); + add_action( 'template_redirect', array( $this, 'init' ), 9999 ); add_filter( 'wp_title', array( $this, 'set_title' ), 99999, 2 ); add_filter( 'wpseo_opengraph_title', array( $this, 'set_title' ), 9999, 1 ); From 49c52fb107838bb144b68662d5c1b9f316afc9c4 Mon Sep 17 00:00:00 2001 From: vishalkakadiya Date: Thu, 14 Apr 2022 11:36:48 +0530 Subject: [PATCH 02/15] Fix BPrewrites plugin conflicts with groups page --- .../controllers/template/rtmedia-actions.php | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/app/main/controllers/template/rtmedia-actions.php b/app/main/controllers/template/rtmedia-actions.php index 61b45c947..fe66f2d40 100644 --- a/app/main/controllers/template/rtmedia-actions.php +++ b/app/main/controllers/template/rtmedia-actions.php @@ -1060,7 +1060,7 @@ function rtmedia_pre_get_posts( $query ) { if ( 'media' === $bp_member_component || 'upload' === $bp_member_component ) { - $wp_query->query['attachment'] = $bp_member; + $wp_query->query['attachment'] = $bp_member; $wp_query->query_vars['attachment'] = $bp_member; unset( $wp_query->queried_object ); @@ -1070,7 +1070,7 @@ function rtmedia_pre_get_posts( $query ) { if ( 'media' === $bp_member_component ) { - $wp_query->query['media'] = ''; + $wp_query->query[ $bp_member_component ] = ''; $action = get_query_var( 'bp_member_action' ); $action_variable = get_query_var( 'bp_member_action_variables' ); @@ -1079,15 +1079,28 @@ function rtmedia_pre_get_posts( $query ) { $action = $action . '/' . $action_variable; } - $wp_query->query_vars['media'] = $action; + $wp_query->query_vars[ $bp_member_component ] = $action; } elseif ( 'upload' === $bp_member_component ) { - $wp_query->query['upload'] = ''; - $wp_query->query_vars['upload'] = ''; + $wp_query->query[ $bp_member_component ] = ''; + $wp_query->query_vars[ $bp_member_component ] = ''; } } } + } elseif ( get_query_var( 'bp_groups' ) ) { + + $bp_group = get_query_var( 'bp_group' ); + $bp_group_action = get_query_var( 'bp_group_action' ); + + $wp_query->query['attachment'] = $bp_group; + $wp_query->query_vars['attachment'] = $bp_group; + + $wp_query->query[ $bp_group_action ] = ''; + $wp_query->query_vars[ $bp_group_action ] = get_query_var( 'bp_group_action_variables' ); + + unset( $wp_query->queried_object ); + unset( $wp_query->queried_object_id ); } } add_action( 'pre_get_posts', 'rtmedia_pre_get_posts', 9999 ); From dab3511dadb73451128dfdc9b92e8ddc2fc2be8b Mon Sep 17 00:00:00 2001 From: vishalkakadiya Date: Thu, 14 Apr 2022 11:59:30 +0530 Subject: [PATCH 03/15] Fix BPrewrites plugin conflicts with activity page --- .../controllers/template/rtmedia-actions.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/app/main/controllers/template/rtmedia-actions.php b/app/main/controllers/template/rtmedia-actions.php index fe66f2d40..88f77df94 100644 --- a/app/main/controllers/template/rtmedia-actions.php +++ b/app/main/controllers/template/rtmedia-actions.php @@ -1096,12 +1096,27 @@ function rtmedia_pre_get_posts( $query ) { $wp_query->query['attachment'] = $bp_group; $wp_query->query_vars['attachment'] = $bp_group; - $wp_query->query[ $bp_group_action ] = ''; - $wp_query->query_vars[ $bp_group_action ] = get_query_var( 'bp_group_action_variables' ); + if ( ! empty( $bp_group_action ) ) { + $wp_query->query[ $bp_group_action ] = ''; + $wp_query->query_vars[ $bp_group_action ] = get_query_var( 'bp_group_action_variables' ); + } unset( $wp_query->queried_object ); unset( $wp_query->queried_object_id ); + + } elseif ( get_query_var( 'bp_activities' ) ) { + + $bp_activity_action = get_query_var( 'bp_activity_action' ); + + if ( ! empty( $bp_activity_action ) ) { + $wp_query->query[ $bp_activity_action ] = ''; + $wp_query->query_vars[ $bp_activity_action ] = ''; + } } + +// error_log( '========= $wp_query NAME ========' ); +// error_log( print_r( $wp_query, true ) ); +// error_log( '========= $wp_query NAME END ========' ); } add_action( 'pre_get_posts', 'rtmedia_pre_get_posts', 9999 ); From 0eec5bdf5bd7b8d3a9a2ed8f2617d5f1bf4c0c5b Mon Sep 17 00:00:00 2001 From: vishalkakadiya Date: Thu, 14 Apr 2022 15:21:46 +0530 Subject: [PATCH 04/15] Remove debug code --- app/main/controllers/template/rtmedia-actions.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/main/controllers/template/rtmedia-actions.php b/app/main/controllers/template/rtmedia-actions.php index 88f77df94..84845d615 100644 --- a/app/main/controllers/template/rtmedia-actions.php +++ b/app/main/controllers/template/rtmedia-actions.php @@ -1113,10 +1113,6 @@ function rtmedia_pre_get_posts( $query ) { $wp_query->query_vars[ $bp_activity_action ] = ''; } } - -// error_log( '========= $wp_query NAME ========' ); -// error_log( print_r( $wp_query, true ) ); -// error_log( '========= $wp_query NAME END ========' ); } add_action( 'pre_get_posts', 'rtmedia_pre_get_posts', 9999 ); From 14bed80355b03c0e4143f95b51ad32b834b93db4 Mon Sep 17 00:00:00 2001 From: vishalkakadiya Date: Fri, 15 Apr 2022 11:10:53 +0530 Subject: [PATCH 05/15] Fix BPrewrites plugin conflicts with rtMedia --- .../controllers/template/rtmedia-actions.php | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/app/main/controllers/template/rtmedia-actions.php b/app/main/controllers/template/rtmedia-actions.php index 84845d615..1f60cf8d1 100644 --- a/app/main/controllers/template/rtmedia-actions.php +++ b/app/main/controllers/template/rtmedia-actions.php @@ -1051,58 +1051,58 @@ function rtmedia_pre_get_posts( $query ) { return; } +// error_log( '========= $wp_query NAME ========' ); +// error_log( print_r( $wp_query, true ) ); +// error_log( '========= $wp_query NAME END ========' ); + if ( get_query_var( 'bp_members' ) ) { $bp_member = get_query_var( 'bp_member' ); $bp_member_component = get_query_var( 'bp_member_component' ); - if ( $bp_member ) { - - if ( 'media' === $bp_member_component || 'upload' === $bp_member_component ) { - - $wp_query->query['attachment'] = $bp_member; - $wp_query->query_vars['attachment'] = $bp_member; + if ( $bp_member && ( 'media' === $bp_member_component || 'upload' === $bp_member_component ) ) { - unset( $wp_query->queried_object ); - unset( $wp_query->queried_object_id ); + $wp_query->query['attachment'] = $bp_member; + $wp_query->query_vars['attachment'] = $bp_member; - $wp_query->set( 'tax_query', '' ); + unset( $wp_query->queried_object ); + unset( $wp_query->queried_object_id ); - if ( 'media' === $bp_member_component ) { + $wp_query->set( 'tax_query', '' ); - $wp_query->query[ $bp_member_component ] = ''; + $wp_query->query[ $bp_member_component ] = ''; - $action = get_query_var( 'bp_member_action' ); - $action_variable = get_query_var( 'bp_member_action_variables' ); - - if ( ! empty( $action_variable ) ) { - $action = $action . '/' . $action_variable; - } + $action = get_query_var( 'bp_member_action' ); - $wp_query->query_vars[ $bp_member_component ] = $action; + if ( 'media' === $bp_member_component ) { - } elseif ( 'upload' === $bp_member_component ) { + $action_variable = get_query_var( 'bp_member_action_variables' ); - $wp_query->query[ $bp_member_component ] = ''; - $wp_query->query_vars[ $bp_member_component ] = ''; + if ( ! empty( $action_variable ) ) { + $action = $action . '/' . $action_variable; } } + + $wp_query->query_vars[ $bp_member_component ] = $action; } } elseif ( get_query_var( 'bp_groups' ) ) { $bp_group = get_query_var( 'bp_group' ); $bp_group_action = get_query_var( 'bp_group_action' ); - $wp_query->query['attachment'] = $bp_group; - $wp_query->query_vars['attachment'] = $bp_group; + if ( $bp_group && 'media' === $bp_group_action || 'upload' === $bp_group_action ) { - if ( ! empty( $bp_group_action ) ) { - $wp_query->query[ $bp_group_action ] = ''; - $wp_query->query_vars[ $bp_group_action ] = get_query_var( 'bp_group_action_variables' ); - } + $wp_query->query['attachment'] = $bp_group; + $wp_query->query_vars['attachment'] = $bp_group; - unset( $wp_query->queried_object ); - unset( $wp_query->queried_object_id ); + if ( ! empty( $bp_group_action ) ) { + $wp_query->query[ $bp_group_action ] = ''; + $wp_query->query_vars[ $bp_group_action ] = get_query_var( 'bp_group_action_variables' ); + } + + unset( $wp_query->queried_object ); + unset( $wp_query->queried_object_id ); + } } elseif ( get_query_var( 'bp_activities' ) ) { From 0956d2bf6c1569a2811303151075957a9943f2bc Mon Sep 17 00:00:00 2001 From: vishalkakadiya Date: Fri, 15 Apr 2022 12:14:53 +0530 Subject: [PATCH 06/15] Remove debug code --- app/main/controllers/template/rtmedia-actions.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/main/controllers/template/rtmedia-actions.php b/app/main/controllers/template/rtmedia-actions.php index 1f60cf8d1..eaf12679b 100644 --- a/app/main/controllers/template/rtmedia-actions.php +++ b/app/main/controllers/template/rtmedia-actions.php @@ -1051,10 +1051,6 @@ function rtmedia_pre_get_posts( $query ) { return; } -// error_log( '========= $wp_query NAME ========' ); -// error_log( print_r( $wp_query, true ) ); -// error_log( '========= $wp_query NAME END ========' ); - if ( get_query_var( 'bp_members' ) ) { $bp_member = get_query_var( 'bp_member' ); From 17f4e308633959f749ea8a275bb649244d1d54a4 Mon Sep 17 00:00:00 2001 From: Mukul Singh Date: Mon, 16 May 2022 18:16:34 +0530 Subject: [PATCH 07/15] Add default video thumbnail for activity page --- app/main/controllers/activity/RTMediaActivity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/controllers/activity/RTMediaActivity.php b/app/main/controllers/activity/RTMediaActivity.php index a71d5a1eb..56fb94fd4 100755 --- a/app/main/controllers/activity/RTMediaActivity.php +++ b/app/main/controllers/activity/RTMediaActivity.php @@ -261,7 +261,7 @@ public function media( $media, $type = 'activity' ) { if ( $cover_art ) { $poster = 'poster = "' . esc_url( $cover_art ) . '"'; } else { - $poster = ''; + $poster = 'poster = "' . esc_url( $rtmedia->allowed_types['video']['thumbnail'] ) . '"'; } if ( empty( $youtube_url ) ) { $html = ''; From 4db87bca299dbbb8a2ab4bb48aba57e4a7920438 Mon Sep 17 00:00:00 2001 From: Mukul Singh Date: Wed, 18 May 2022 11:56:58 +0530 Subject: [PATCH 08/15] Fix album count issue --- app/main/controllers/template/RTMediaNav.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/app/main/controllers/template/RTMediaNav.php b/app/main/controllers/template/RTMediaNav.php index 701f8892d..2822c04e4 100755 --- a/app/main/controllers/template/RTMediaNav.php +++ b/app/main/controllers/template/RTMediaNav.php @@ -275,17 +275,7 @@ public function sub_nav() { } } - $global_albums = rtmedia_global_albums(); - - // Return the album count if the album has media in it. - $global_albums = array_filter( - $global_albums, - function( $album_id ) { - return (int) rtm_get_album_media_count( $album_id ) > 0; - } - ); - - $other_count = count( $global_albums ); + $other_count = count( rtmedia_global_albums() ); $all = ''; if ( ! isset( $rtmedia_query->action_query->media_type ) && ! isset( $rtmedia_query->query['media_type'] ) ) { From 1eb5f8887c3614127f29206f83fcb5e0c4454015 Mon Sep 17 00:00:00 2001 From: Mukul Singh Date: Wed, 18 May 2022 15:37:34 +0530 Subject: [PATCH 09/15] Add video default thumbnail on activity page --- app/main/controllers/activity/RTMediaActivity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/controllers/activity/RTMediaActivity.php b/app/main/controllers/activity/RTMediaActivity.php index 56fb94fd4..a590f1ba0 100755 --- a/app/main/controllers/activity/RTMediaActivity.php +++ b/app/main/controllers/activity/RTMediaActivity.php @@ -261,10 +261,10 @@ public function media( $media, $type = 'activity' ) { if ( $cover_art ) { $poster = 'poster = "' . esc_url( $cover_art ) . '"'; } else { - $poster = 'poster = "' . esc_url( $rtmedia->allowed_types['video']['thumbnail'] ) . '"'; + $poster = ''; } if ( empty( $youtube_url ) ) { - $html = ''; + $html = ''; $html = sprintf( $html, $poster, esc_url( wp_get_attachment_url( $media->media_id ) ), esc_attr( $rtmedia->options['defaultSizes_video_activityPlayer_width'] ), esc_attr( $rtmedia->options['defaultSizes_video_activityPlayer_height'] ), $video_class, esc_attr( $media->id ) ); } } elseif ( 'music' === $media->media_type ) { From c0fea35d1c2c92feef6c581ec051d9e65e0023b4 Mon Sep 17 00:00:00 2001 From: Mukul Singh Date: Wed, 18 May 2022 16:23:10 +0530 Subject: [PATCH 10/15] Fix the count glitch on media upload/delete --- app/assets/js/rtMedia.backbone.js | 2 +- app/assets/js/rtMedia.js | 2 +- app/assets/js/rtmedia.min.js | 2 +- languages/buddypress-media.po | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/js/rtMedia.backbone.js b/app/assets/js/rtMedia.backbone.js index 95a134c93..c6fce3b41 100755 --- a/app/assets/js/rtMedia.backbone.js +++ b/app/assets/js/rtMedia.backbone.js @@ -316,7 +316,7 @@ jQuery( function( $ ) { // Update the count on sub navigations (Albums) - jQuery( '#rtmedia-nav-item-albums span' ).text( response.media_count.albums_count ); + // jQuery( '#rtmedia-nav-item-albums span' ).text( response.media_count.albums_count ); // Update the count on sub navigations (Photo, Video & Music) jQuery( '#rtmedia-nav-item-photo span' ).text( response.media_count.photos_count ); diff --git a/app/assets/js/rtMedia.js b/app/assets/js/rtMedia.js index 8722a19f7..d7aace2cf 100755 --- a/app/assets/js/rtMedia.js +++ b/app/assets/js/rtMedia.js @@ -923,7 +923,7 @@ jQuery( 'document' ).ready( function( $ ) { jQuery( '#user-media span, #media-groups-li #media span, #rtmedia-nav-item-all span' ).text( response.data.all_media_count ); // Update the count on sub navigations (Albums) - jQuery( '#rtmedia-nav-item-albums span' ).text( response.data.albums_count ); + // jQuery( '#rtmedia-nav-item-albums span' ).text( response.data.albums_count ); // Update the count on sub navigations (Photo, Video & Music) jQuery( '#rtmedia-nav-item-photo span' ).text( response.data.photos_count ); diff --git a/app/assets/js/rtmedia.min.js b/app/assets/js/rtmedia.min.js index 643104f54..ee361c3cf 100644 --- a/app/assets/js/rtmedia.min.js +++ b/app/assets/js/rtmedia.min.js @@ -3,4 +3,4 @@ * @package rtMedia */ -var rtMagnificPopup,rtm_masonry_container;!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(d){function e(){}function m(e,t){y.ev.on(i+e+b,t)}function u(e,t,i,a){var r=document.createElement("div");return r.className="mfp-"+e,i&&(r.innerHTML=i),a?t&&t.appendChild(r):(r=d(r),t&&r.appendTo(t)),r}function p(e,t){y.ev.triggerHandler(i+e,t),y.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),y.st.callbacks[e]&&y.st.callbacks[e].apply(y,d.isArray(t)?t:[t]))}function f(e){return e===t&&y.currTemplate.closeBtn||(y.currTemplate.closeBtn=d(y.st.closeMarkup.replace("%title%",y.st.tClose)),t=e),y.currTemplate.closeBtn}function n(){d.magnificPopup.instance||((y=new e).init(),d.magnificPopup.instance=y)}var y,a,_,r,v,t,l="Close",c="BeforeClose",g="MarkupParse",h="Open",o="Change",i="mfp",b="."+i,j="mfp-ready",s="mfp-removing",w="mfp-prevent-close",Q=!!window.jQuery,C=d(window);e.prototype={constructor:e,init:function(){var e=navigator.appVersion;y.isIE7=-1!==e.indexOf("MSIE 7."),y.isIE8=-1!==e.indexOf("MSIE 8."),y.isLowIE=y.isIE7||y.isIE8,y.isAndroid=/android/gi.test(e),y.isIOS=/iphone|ipad|ipod/gi.test(e),y.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),y.probablyMobile=y.isAndroid||y.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),_=d(document),y.popupsCache={}},open:function(e){var t;if(!1===e.isObj){y.items=e.items.toArray(),y.index=0;var i,a=e.items;for(t=0;t(e||C.height())},_setFocus:function(){(y.st.focus?y.content.find(y.st.focus).eq(0):y.wrap).focus()},_onFocusIn:function(e){if(e.target!==y.wrap[0]&&!d.contains(y.wrap[0],e.target))return y._setFocus(),!1},_parseMarkup:function(r,e,t){var n;t.data&&(e=d.extend(t.data,e)),p(g,[r,e,t]),d.each(e,function(e,t){if(void 0===t||!1===t)return!0;if(1<(n=e.split("_")).length){var i=r.find(b+"-"+n[0]);if(0'):i.attr(n[1],t)}}else r.find(b+"-"+e).html(t)})},_getScrollbarSize:function(){if(void 0===y.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),y.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return y.scrollbarSize}},d.magnificPopup={instance:null,proto:e.prototype,modules:[],open:function(e,t){return n(),(e=e?d.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return d.magnificPopup.instance&&d.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(d.magnificPopup.defaults[e]=t.options),d.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},d.fn.magnificPopup=function(e){n();var t=d(this);if("string"==typeof e)if("open"===e){var i,a=Q?t.data("magnificPopup"):t[0].magnificPopup,r=parseInt(arguments[1],10)||0;i=a.items?a.items[r]:(i=t,a.delegate&&(i=i.find(a.delegate)),i.eq(r)),y._openClick({mfpEl:i},t,a)}else y.isOpen&&y[e].apply(y,Array.prototype.slice.call(arguments,1));else e=d.extend(!0,{},e),Q?t.data("magnificPopup",e):t[0].magnificPopup=e,y.addGroup(t,e);return t};function k(){I&&(T.after(I.addClass(x)).detach(),I=null)}var x,T,I,M="inline";d.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){y.types.push(M),m(l+"."+M,function(){k()})},getInline:function(e,t){if(k(),e.src){var i=y.st.inline,a=d(e.src);if(a.length){var r=a[0].parentNode;r&&r.tagName&&(T||(x=i.hiddenClass,T=u(x),x="mfp-"+x),I=a.after(T).detach().removeClass(x)),y.updateStatus("ready")}else y.updateStatus("error",i.tNotFound),a=d("
");return e.inlineElement=a}return y.updateStatus("ready"),y._parseMarkup(t,{},e),t}}});function P(){E&&d(document.body).removeClass(E)}function S(){P(),y.req&&y.req.abort()}var E,O="ajax";d.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){y.types.push(O),E=y.st.ajax.cursor,m(l+"."+O,S),m("BeforeChange."+O,S)},getAjax:function(r){E&&d(document.body).addClass(E),y.updateStatus("loading");var e=d.extend({url:r.src,success:function(e,t,i){var a={data:e,xhr:i};p("ParseAjax",a),y.appendContent(d(a.data),O),r.finished=!0,P(),y._setFocus(),setTimeout(function(){y.wrap.addClass(j)},16),y.updateStatus("ready"),p("AjaxContentAdded")},error:function(){P(),r.finished=r.loadError=!0,y.updateStatus("error",y.st.ajax.tError.replace("%url%",r.src))}},y.st.ajax.settings);return y.req=d.ajax(e),""}}});var z;d.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var e=y.st.image,t=".image";y.types.push("image"),m(h+t,function(){"image"===y.currItem.type&&e.cursor&&d(document.body).addClass(e.cursor)}),m(l+t,function(){e.cursor&&d(document.body).removeClass(e.cursor),C.off("resize"+b)}),m("Resize"+t,y.resizeImage),y.isLowIE&&m("AfterChange",y.resizeImage)},resizeImage:function(){var e=y.currItem;if(e&&e.img&&y.st.image.verticalFit){var t=0;y.isLowIE&&(t=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",y.wH-t)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,z&&clearInterval(z),e.isCheckingImgSize=!1,p("ImageHasSize",e),e.imgHidden&&(y.content&&y.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(t){var i=0,a=t.img[0],r=function(e){z&&clearInterval(z),z=setInterval(function(){0
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){y.types.push(L),m("BeforeChange",function(e,t,i){t!==i&&(t===L?B():i===L&&B(!0))}),m(l+"."+L,function(){B()})},getIframe:function(e,t){var i=e.src,a=y.st.iframe;d.each(a.patterns,function(){if(-1',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=y.st.gallery,e=".mfp-gallery",r=Boolean(d.fn.mfpFastClick);if(y.direction=!0,!n||!n.enabled)return!1;v+=" mfp-gallery",m(h+e,function(){n.navigateByImgClick&&y.wrap.on("click"+e,".mfp-img",function(){if(1=y.index,y.index=e,y.updateItemHTML()},preloadNearbyImages:function(){var e,t=y.st.gallery.preload,i=Math.min(t[0],y.items.length),a=Math.min(t[1],y.items.length);for(e=1;e<=(y.direction?a:i);e++)y._preloadItem(y.index+e);for(e=1;e<=(y.direction?i:a);e++)y._preloadItem(y.index-e)},_preloadItem:function(e){if(e=A(e),!y.items[e].preloaded){var t=y.items[e];t.parsed||(t=y.parseEl(e)),p("LazyLoad",t),"image"===t.type&&(t.img=d('').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,p("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0}}}});var F,R,D="retina";function W(){C.off("touchmove"+R+" touchend"+R)}d.magnificPopup.registerModule(D,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(1 a").siblings("p").children("a").length&&s(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").addClass("no-popup"),rtMagnificPopup=jQuery(t).magnificPopup({delegate:"a:not(.no-popup, .mejs-time-slider, .mejs-volume-slider, .mejs-horizontal-volume-slider)",type:"ajax",fixedContentPos:!0,fixedBgPos:!0,tLoading:e+" #%curr%...",mainClass:"mfp-img-mobile",preload:[1,3],closeOnBgClick:!0,gallery:{enabled:!0,navigateByImgClick:!0,arrowMarkup:"",preload:[0,1]},image:{tError:'The image #%curr% could not be loaded.',titleSrc:function(e){return e.el.attr("title")+"by Marsel Van Oosten"}},callbacks:{ajaxContentAdded:function(){e=jQuery.magnificPopup.instance,1===jQuery(e.items).size()&&jQuery(".mfp-arrow").remove();var e=jQuery.magnificPopup.instance,t=e.currItem.el,i=t.parent();if(i.is("li")||(i=i.parent()),(i.is(":nth-last-child(2)")||i.is(":last-child"))&&i.find("a").hasClass("rtmedia-list-item-a")){i.next();"block"==jQuery("#rtMedia-galary-next").css("display")&&(c||(n=e.ev.children(),c=!0,l=nextpage),jQuery("#rtMedia-galary-next").click())}var a=e.items.length;if(e.index!=a-1||i.is(":last-child")){"undefined"!=typeof _wpmejsSettings&&_wpmejsSettings.pluginPath;var o=jQuery(".rtmedia-container .rtmedia-single-meta").height(),r=!1;void 0!==e&&void 0!==e.probablyMobile&&1==e.probablyMobile&&(r=!0),s(".mfp-content .rtmedia-single-media .wp-audio-shortcode,.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").attr("autoplay",!0),r&&s(".mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").attr("muted",!1),s(".mfp-content .rtmedia-single-media .wp-audio-shortcode,.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").mediaelementplayer({classPrefix:"mejs-",defaultVideoWidth:480,hideVolumeOnTouchDevices:!1,features:["playpause","progress","current","volume","fullscreen"],defaultVideoHeight:270,alwaysShowControls:r,enableAutosize:!0,clickToPlayPause:!0,videoHeight:-1,success:function(n,e){n.addEventListener("loadeddata",function(e){var t=s(n).height(),i=s(window).height(),a=jQuery("div.rtm-ltb-action-container").height(),r=o-(a=a+50);i span,"+e+" .click-nav > div").toggleClass("no-js js"),jQuery(e+" .click-nav .js ul").hide(),jQuery(e+" .click-nav .clicker").click(function(e){t=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),i=jQuery(this).next("ul"),jQuery.each(t,function(e,t){jQuery(t).html()!=i.html()&&jQuery(t).hide()}),jQuery(i).toggle(),e.stopPropagation()})}function bp_media_create_element(e){return!1}function rtmedia_version_compare(e,t){if(typeof e+typeof t!="stringstring")return!1;for(var i=e.split("."),a=t.split("."),r=0,n=Math.max(i.length,a.length);rparseInt(a[r]))return!0;if(a[r]&&!i[r]&&0",{title:"Click to dismiss",class:"rtmedia-message-container"+(i?" rtmedia-empty-comment-error-class":""),style:"margin:1em 0;"}),s=jQuery("",{class:a});s.html(e),s.appendTo(o),i?(n=jQuery("#rt_media_comment_form"),jQuery("#comment_content").focus()):void 0===i&&(n=jQuery(".rtmedia-single-media .rtmedia-media")).css("opacity","0.2"),n.after(o),r&&(s.css({border:"2px solid #884646"}),setTimeout(function(){s.css({border:"none"})},500)),setTimeout(function(){o.remove(),void 0===i&&n.css("opacity","1")},3e3),o.click(function(){o.remove(),void 0===i&&n.css("opacity","1")})}function rtmedia_gallery_action_alert_message(e,t){var i="rtmedia-success";"warning"==t&&(i="rtmedia-warning");jQuery("body").append(''),jQuery(".rtmedia-gallery-alert-container").append(""),setTimeout(function(){jQuery(".rtmedia-gallery-alert-container").remove()},3e3),jQuery(".rtmedia-gallery-message-box").click(function(){jQuery(".rtmedia-gallery-alert-container").remove()})}function rtmedia_activity_masonry(){jQuery("#activity-stream .rtmedia-activity-container .rtmedia-list").masonry({itemSelector:".rtmedia-list-item",gutter:7});var e=0,t=setInterval(function(){5===(e+=1)&&clearInterval(t),jQuery.each(jQuery(".rtmedia-activity-container .rtmedia-list.masonry .rtmedia-item-title"),function(e,t){jQuery(t).width(jQuery(t).siblings(".rtmedia-item-thumbnail").children("img").width())}),rtm_masonry_reload(jQuery("#activity-stream .rtmedia-activity-container .rtmedia-list"))},1e3)}function get_parameter(e,t){if(!e)return!1;t=t||window.location.href;e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp(e+"=([^&#]*)").exec(t);return null!==i&&i[1]}function rtm_upload_terms_activity(){if(0 audio.wp-audio-shortcode, ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > video.wp-video-shortcode").mediaelementplayer({classPrefix:"mejs-",defaultVideoWidth:480,defaultVideoHeight:270}),setTimeout(function(){rtmedia_activity_stream_comment_media()},900),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}}),jQuery(".rtmedia-container").on("click",".select-all",function(e){jQuery(this).toggleClass("unselect-all").toggleClass("select-all"),jQuery(this).attr("title",rtmedia_unselect_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!0)}),jQuery(".rtmedia-list-item").addClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".unselect-all",function(e){jQuery(this).toggleClass("select-all").toggleClass("unselect-all"),jQuery(this).attr("title",rtmedia_select_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!1)}),jQuery(".rtmedia-list-item").removeClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".rtmedia-move",function(e){jQuery(".rtmedia-delete-container").slideUp(),jQuery(".rtmedia-move-container").slideToggle()}),jQuery("#rtmedia-create-album-modal").on("click","#rtmedia_create_new_album",function(e){if($albumname=jQuery("").text(jQuery.trim(jQuery("#rtmedia_album_name").val())).html(),$album_description=jQuery("#rtmedia_album_description"),$context=jQuery.trim(jQuery("#rtmedia_album_context").val()),$context_id=jQuery.trim(jQuery("#rtmedia_album_context_id").val()),$privacy=jQuery.trim(jQuery("#rtmedia_select_album_privacy").val()),$create_album_nonce=jQuery.trim(jQuery("#rtmedia_create_album_nonce").val()),""!=$albumname){var t={action:"rtmedia_create_album",name:$albumname,description:$album_description.val(),context:$context,context_id:$context_id,create_album_nonce:$create_album_nonce};""!==$privacy&&(t.privacy=$privacy),n("#rtmedia_create_new_album").attr("disabled","disabled");var r=n("#rtmedia_create_new_album").html();n("#rtmedia_create_new_album").prepend(""),jQuery.post(rtmedia_ajax_url,t,function(i){if(void 0!==i.album){i=jQuery.trim(i.album);var a=!0;$album_description.val(""),n("#rtmedia_album_name").focus(),jQuery(".rtmedia-user-album-list").each(function(){if(jQuery(this).children("optgroup").each(function(){if(jQuery(this).attr("value")===$context)return a=!1,void jQuery(this).append('")}),a){var e=$context.charAt(0).toUpperCase()+$context.slice(1)+" "+rtmedia_main_js_strings.rtmedia_albums,t='";jQuery(this).append(t)}}),jQuery('select.rtmedia-user-album-list option[value="'+i+'"]').prop("selected",!0),jQuery(".rtmedia-create-new-album-container").slideToggle(),jQuery("#rtmedia_album_name").val(""),jQuery("#rtmedia-create-album-modal").append("
"+$albumname+""+rtmedia_album_created_msg+"
"),setTimeout(function(){jQuery(".rtmedia-create-album-alert").remove()},4e3),setTimeout(function(){galleryObj.reloadView(),window.location.reload(),jQuery(".close-reveal-modal").click()},2e3)}else void 0!==i.error?rtmedia_gallery_action_alert_message(i.error,"warning"):rtmedia_gallery_action_alert_message(rtmedia_something_wrong_msg,"warning");n("#rtmedia_create_new_album").removeAttr("disabled"),n("#rtmedia_create_new_album").html(r)})}else rtmedia_gallery_action_alert_message(rtmedia_empty_album_name_msg,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-selected",function(e){0'+t+"

"),setTimeout(function(){jQuery(a).siblings(".rtm-ac-privacy-updated").remove()},2e3)})}),jQuery(".media_search_input").on("keyup",function(){rtm_search_media_text_validation()}),r(),rtMediaHook.register("rtmedia_js_popup_after_content_added",function(){r(),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(e){e.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),mfp=jQuery.magnificPopup.instance,1"+rtmedia_drop_media_msg+""),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&jQuery("#whats-new-textarea").append("
"+rtmedia_drop_media_msg+"
"),jQuery(document).on("dragover",function(e){e.preventDefault(),e.target!=this&&(jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&i.addClass("rtm-drag-drop-active"),t.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show())}).on("dragleave",function(e){if(e.preventDefault(),0!=e.originalEvent.pageX&&0!=e.originalEvent.pageY)return!1;"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(i.removeClass("rtm-drag-drop-active"),i.removeAttr("style")),t.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}).on("drop",function(e){e.preventDefault(),jQuery(".bp-suggestions").focus(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(i.removeClass("rtm-drag-drop-active"),i.removeAttr("style")),t.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-album",function(e){e.preventDefault(),confirm(rtmedia_album_delete_confirmation)&&jQuery(this).closest("form").submit()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(e){e.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),rtmedia_init_action_dropdown(""),n(document).click(function(){n(".click-nav ul").is(":visible")&&n(".click-nav ul",this).hide()}),jQuery(".rtmedia-comment-link").on("click",function(e){e.preventDefault(),jQuery("#comment_content").focus()}),0m.showChars+m.minHideChars){var i=t.substr(0,m.showChars);if(0<=i.indexOf("<")){for(var a=!1,r="",n=0,o=[],s=null,l=0,c=0;c<=m.showChars;l++)if("<"!=t[l]||a||(a=!0,"/"==(s=t.substring(l+1,t.indexOf(">",l)))[0]?s!="/"+o[0]?m.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":o.shift():"br"!=s.toLowerCase()&&o.unshift(s)),a&&">"==t[l]&&(a=!1),a)r+=t.charAt(l);else if(c++,n<=m.showChars)r+=t.charAt(l),n++;else if(0";break}i=u("
").html(r+''+m.ellipsesText+"").html()}else i+=m.ellipsesText;var d='
'+i+'
'+t+'
'+m.moreText+"";e.html(d),e.find(".allcontent").hide(),u(".shortcontent p:last",e).css("margin-bottom",0)}}))}}(jQuery),window.onload=function(){"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&rtm_masonry_reload(rtm_masonry_container),rtm_search_media_text_validation(),check_condition("search")&&jQuery("#media_search_remove").show()},jQuery(document).ready(function(){rtm_upload_terms_activity(),jQuery("body").hasClass("has-sidebar")&&0===jQuery("#secondary").length&&(jQuery(".rtmedia-single-container").length||jQuery(".rtmedia-container").length)&&jQuery("body").removeClass("has-sidebar"),rtmedia_main&&("undefined"!==rtmedia_main.rtmedia_direct_download_link&&parseInt(rtmedia_main.rtmedia_direct_download_link)||jQuery(document).on("bp_ajax_request",function(e){setTimeout(function(){jQuery("video").each(function(){jQuery(this).attr("controlsList","nodownload"),jQuery(this).load()})},200)}))}); \ No newline at end of file +var rtMagnificPopup,rtm_masonry_container;!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(d){function e(){}function m(e,t){y.ev.on(i+e+b,t)}function u(e,t,i,a){var r=document.createElement("div");return r.className="mfp-"+e,i&&(r.innerHTML=i),a?t&&t.appendChild(r):(r=d(r),t&&r.appendTo(t)),r}function p(e,t){y.ev.triggerHandler(i+e,t),y.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),y.st.callbacks[e]&&y.st.callbacks[e].apply(y,d.isArray(t)?t:[t]))}function f(e){return e===t&&y.currTemplate.closeBtn||(y.currTemplate.closeBtn=d(y.st.closeMarkup.replace("%title%",y.st.tClose)),t=e),y.currTemplate.closeBtn}function n(){d.magnificPopup.instance||((y=new e).init(),d.magnificPopup.instance=y)}var y,a,_,r,v,t,l="Close",c="BeforeClose",g="MarkupParse",h="Open",o="Change",i="mfp",b="."+i,j="mfp-ready",s="mfp-removing",w="mfp-prevent-close",Q=!!window.jQuery,C=d(window);e.prototype={constructor:e,init:function(){var e=navigator.appVersion;y.isIE7=-1!==e.indexOf("MSIE 7."),y.isIE8=-1!==e.indexOf("MSIE 8."),y.isLowIE=y.isIE7||y.isIE8,y.isAndroid=/android/gi.test(e),y.isIOS=/iphone|ipad|ipod/gi.test(e),y.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),y.probablyMobile=y.isAndroid||y.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),_=d(document),y.popupsCache={}},open:function(e){var t;if(!1===e.isObj){y.items=e.items.toArray(),y.index=0;var i,a=e.items;for(t=0;t(e||C.height())},_setFocus:function(){(y.st.focus?y.content.find(y.st.focus).eq(0):y.wrap).focus()},_onFocusIn:function(e){if(e.target!==y.wrap[0]&&!d.contains(y.wrap[0],e.target))return y._setFocus(),!1},_parseMarkup:function(r,e,t){var n;t.data&&(e=d.extend(t.data,e)),p(g,[r,e,t]),d.each(e,function(e,t){if(void 0===t||!1===t)return!0;if(1<(n=e.split("_")).length){var i=r.find(b+"-"+n[0]);if(0'):i.attr(n[1],t)}}else r.find(b+"-"+e).html(t)})},_getScrollbarSize:function(){if(void 0===y.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),y.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return y.scrollbarSize}},d.magnificPopup={instance:null,proto:e.prototype,modules:[],open:function(e,t){return n(),(e=e?d.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return d.magnificPopup.instance&&d.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(d.magnificPopup.defaults[e]=t.options),d.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},d.fn.magnificPopup=function(e){n();var t=d(this);if("string"==typeof e)if("open"===e){var i,a=Q?t.data("magnificPopup"):t[0].magnificPopup,r=parseInt(arguments[1],10)||0;i=a.items?a.items[r]:(i=t,a.delegate&&(i=i.find(a.delegate)),i.eq(r)),y._openClick({mfpEl:i},t,a)}else y.isOpen&&y[e].apply(y,Array.prototype.slice.call(arguments,1));else e=d.extend(!0,{},e),Q?t.data("magnificPopup",e):t[0].magnificPopup=e,y.addGroup(t,e);return t};function k(){I&&(T.after(I.addClass(x)).detach(),I=null)}var x,T,I,M="inline";d.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){y.types.push(M),m(l+"."+M,function(){k()})},getInline:function(e,t){if(k(),e.src){var i=y.st.inline,a=d(e.src);if(a.length){var r=a[0].parentNode;r&&r.tagName&&(T||(x=i.hiddenClass,T=u(x),x="mfp-"+x),I=a.after(T).detach().removeClass(x)),y.updateStatus("ready")}else y.updateStatus("error",i.tNotFound),a=d("
");return e.inlineElement=a}return y.updateStatus("ready"),y._parseMarkup(t,{},e),t}}});function P(){E&&d(document.body).removeClass(E)}function S(){P(),y.req&&y.req.abort()}var E,O="ajax";d.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){y.types.push(O),E=y.st.ajax.cursor,m(l+"."+O,S),m("BeforeChange."+O,S)},getAjax:function(r){E&&d(document.body).addClass(E),y.updateStatus("loading");var e=d.extend({url:r.src,success:function(e,t,i){var a={data:e,xhr:i};p("ParseAjax",a),y.appendContent(d(a.data),O),r.finished=!0,P(),y._setFocus(),setTimeout(function(){y.wrap.addClass(j)},16),y.updateStatus("ready"),p("AjaxContentAdded")},error:function(){P(),r.finished=r.loadError=!0,y.updateStatus("error",y.st.ajax.tError.replace("%url%",r.src))}},y.st.ajax.settings);return y.req=d.ajax(e),""}}});var z;d.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var e=y.st.image,t=".image";y.types.push("image"),m(h+t,function(){"image"===y.currItem.type&&e.cursor&&d(document.body).addClass(e.cursor)}),m(l+t,function(){e.cursor&&d(document.body).removeClass(e.cursor),C.off("resize"+b)}),m("Resize"+t,y.resizeImage),y.isLowIE&&m("AfterChange",y.resizeImage)},resizeImage:function(){var e=y.currItem;if(e&&e.img&&y.st.image.verticalFit){var t=0;y.isLowIE&&(t=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",y.wH-t)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,z&&clearInterval(z),e.isCheckingImgSize=!1,p("ImageHasSize",e),e.imgHidden&&(y.content&&y.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(t){var i=0,a=t.img[0],r=function(e){z&&clearInterval(z),z=setInterval(function(){0
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){y.types.push(L),m("BeforeChange",function(e,t,i){t!==i&&(t===L?B():i===L&&B(!0))}),m(l+"."+L,function(){B()})},getIframe:function(e,t){var i=e.src,a=y.st.iframe;d.each(a.patterns,function(){if(-1',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=y.st.gallery,e=".mfp-gallery",r=Boolean(d.fn.mfpFastClick);if(y.direction=!0,!n||!n.enabled)return!1;v+=" mfp-gallery",m(h+e,function(){n.navigateByImgClick&&y.wrap.on("click"+e,".mfp-img",function(){if(1=y.index,y.index=e,y.updateItemHTML()},preloadNearbyImages:function(){var e,t=y.st.gallery.preload,i=Math.min(t[0],y.items.length),a=Math.min(t[1],y.items.length);for(e=1;e<=(y.direction?a:i);e++)y._preloadItem(y.index+e);for(e=1;e<=(y.direction?i:a);e++)y._preloadItem(y.index-e)},_preloadItem:function(e){if(e=A(e),!y.items[e].preloaded){var t=y.items[e];t.parsed||(t=y.parseEl(e)),p("LazyLoad",t),"image"===t.type&&(t.img=d('').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,p("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0}}}});var F,R,D="retina";function W(){C.off("touchmove"+R+" touchend"+R)}d.magnificPopup.registerModule(D,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(1 a").siblings("p").children("a").length&&s(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").addClass("no-popup"),rtMagnificPopup=jQuery(t).magnificPopup({delegate:"a:not(.no-popup, .mejs-time-slider, .mejs-volume-slider, .mejs-horizontal-volume-slider)",type:"ajax",fixedContentPos:!0,fixedBgPos:!0,tLoading:e+" #%curr%...",mainClass:"mfp-img-mobile",preload:[1,3],closeOnBgClick:!0,gallery:{enabled:!0,navigateByImgClick:!0,arrowMarkup:"",preload:[0,1]},image:{tError:'The image #%curr% could not be loaded.',titleSrc:function(e){return e.el.attr("title")+"by Marsel Van Oosten"}},callbacks:{ajaxContentAdded:function(){e=jQuery.magnificPopup.instance,1===jQuery(e.items).size()&&jQuery(".mfp-arrow").remove();var e=jQuery.magnificPopup.instance,t=e.currItem.el,i=t.parent();if(i.is("li")||(i=i.parent()),(i.is(":nth-last-child(2)")||i.is(":last-child"))&&i.find("a").hasClass("rtmedia-list-item-a")){i.next();"block"==jQuery("#rtMedia-galary-next").css("display")&&(c||(n=e.ev.children(),c=!0,l=nextpage),jQuery("#rtMedia-galary-next").click())}var a=e.items.length;if(e.index!=a-1||i.is(":last-child")){"undefined"!=typeof _wpmejsSettings&&_wpmejsSettings.pluginPath;var o=jQuery(".rtmedia-container .rtmedia-single-meta").height(),r=!1;void 0!==e&&void 0!==e.probablyMobile&&1==e.probablyMobile&&(r=!0),s(".mfp-content .rtmedia-single-media .wp-audio-shortcode,.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").attr("autoplay",!0),r&&s(".mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").attr("muted",!1),s(".mfp-content .rtmedia-single-media .wp-audio-shortcode,.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").mediaelementplayer({classPrefix:"mejs-",defaultVideoWidth:480,hideVolumeOnTouchDevices:!1,features:["playpause","progress","current","volume","fullscreen"],defaultVideoHeight:270,alwaysShowControls:r,enableAutosize:!0,clickToPlayPause:!0,videoHeight:-1,success:function(n,e){n.addEventListener("loadeddata",function(e){var t=s(n).height(),i=s(window).height(),a=jQuery("div.rtm-ltb-action-container").height(),r=o-(a=a+50);i span,"+e+" .click-nav > div").toggleClass("no-js js"),jQuery(e+" .click-nav .js ul").hide(),jQuery(e+" .click-nav .clicker").click(function(e){t=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),i=jQuery(this).next("ul"),jQuery.each(t,function(e,t){jQuery(t).html()!=i.html()&&jQuery(t).hide()}),jQuery(i).toggle(),e.stopPropagation()})}function bp_media_create_element(e){return!1}function rtmedia_version_compare(e,t){if(typeof e+typeof t!="stringstring")return!1;for(var i=e.split("."),a=t.split("."),r=0,n=Math.max(i.length,a.length);rparseInt(a[r]))return!0;if(a[r]&&!i[r]&&0",{title:"Click to dismiss",class:"rtmedia-message-container"+(i?" rtmedia-empty-comment-error-class":""),style:"margin:1em 0;"}),s=jQuery("",{class:a});s.html(e),s.appendTo(o),i?(n=jQuery("#rt_media_comment_form"),jQuery("#comment_content").focus()):void 0===i&&(n=jQuery(".rtmedia-single-media .rtmedia-media")).css("opacity","0.2"),n.after(o),r&&(s.css({border:"2px solid #884646"}),setTimeout(function(){s.css({border:"none"})},500)),setTimeout(function(){o.remove(),void 0===i&&n.css("opacity","1")},3e3),o.click(function(){o.remove(),void 0===i&&n.css("opacity","1")})}function rtmedia_gallery_action_alert_message(e,t){var i="rtmedia-success";"warning"==t&&(i="rtmedia-warning");jQuery("body").append(''),jQuery(".rtmedia-gallery-alert-container").append(""),setTimeout(function(){jQuery(".rtmedia-gallery-alert-container").remove()},3e3),jQuery(".rtmedia-gallery-message-box").click(function(){jQuery(".rtmedia-gallery-alert-container").remove()})}function rtmedia_activity_masonry(){jQuery("#activity-stream .rtmedia-activity-container .rtmedia-list").masonry({itemSelector:".rtmedia-list-item",gutter:7});var e=0,t=setInterval(function(){5===(e+=1)&&clearInterval(t),jQuery.each(jQuery(".rtmedia-activity-container .rtmedia-list.masonry .rtmedia-item-title"),function(e,t){jQuery(t).width(jQuery(t).siblings(".rtmedia-item-thumbnail").children("img").width())}),rtm_masonry_reload(jQuery("#activity-stream .rtmedia-activity-container .rtmedia-list"))},1e3)}function get_parameter(e,t){if(!e)return!1;t=t||window.location.href;e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp(e+"=([^&#]*)").exec(t);return null!==i&&i[1]}function rtm_upload_terms_activity(){if(0 audio.wp-audio-shortcode, ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > video.wp-video-shortcode").mediaelementplayer({classPrefix:"mejs-",defaultVideoWidth:480,defaultVideoHeight:270}),setTimeout(function(){rtmedia_activity_stream_comment_media()},900),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}}),jQuery(".rtmedia-container").on("click",".select-all",function(e){jQuery(this).toggleClass("unselect-all").toggleClass("select-all"),jQuery(this).attr("title",rtmedia_unselect_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!0)}),jQuery(".rtmedia-list-item").addClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".unselect-all",function(e){jQuery(this).toggleClass("select-all").toggleClass("unselect-all"),jQuery(this).attr("title",rtmedia_select_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!1)}),jQuery(".rtmedia-list-item").removeClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".rtmedia-move",function(e){jQuery(".rtmedia-delete-container").slideUp(),jQuery(".rtmedia-move-container").slideToggle()}),jQuery("#rtmedia-create-album-modal").on("click","#rtmedia_create_new_album",function(e){if($albumname=jQuery("").text(jQuery.trim(jQuery("#rtmedia_album_name").val())).html(),$album_description=jQuery("#rtmedia_album_description"),$context=jQuery.trim(jQuery("#rtmedia_album_context").val()),$context_id=jQuery.trim(jQuery("#rtmedia_album_context_id").val()),$privacy=jQuery.trim(jQuery("#rtmedia_select_album_privacy").val()),$create_album_nonce=jQuery.trim(jQuery("#rtmedia_create_album_nonce").val()),""!=$albumname){var t={action:"rtmedia_create_album",name:$albumname,description:$album_description.val(),context:$context,context_id:$context_id,create_album_nonce:$create_album_nonce};""!==$privacy&&(t.privacy=$privacy),n("#rtmedia_create_new_album").attr("disabled","disabled");var r=n("#rtmedia_create_new_album").html();n("#rtmedia_create_new_album").prepend(""),jQuery.post(rtmedia_ajax_url,t,function(i){if(void 0!==i.album){i=jQuery.trim(i.album);var a=!0;$album_description.val(""),n("#rtmedia_album_name").focus(),jQuery(".rtmedia-user-album-list").each(function(){if(jQuery(this).children("optgroup").each(function(){if(jQuery(this).attr("value")===$context)return a=!1,void jQuery(this).append('")}),a){var e=$context.charAt(0).toUpperCase()+$context.slice(1)+" "+rtmedia_main_js_strings.rtmedia_albums,t='";jQuery(this).append(t)}}),jQuery('select.rtmedia-user-album-list option[value="'+i+'"]').prop("selected",!0),jQuery(".rtmedia-create-new-album-container").slideToggle(),jQuery("#rtmedia_album_name").val(""),jQuery("#rtmedia-create-album-modal").append("
"+$albumname+""+rtmedia_album_created_msg+"
"),setTimeout(function(){jQuery(".rtmedia-create-album-alert").remove()},4e3),setTimeout(function(){galleryObj.reloadView(),window.location.reload(),jQuery(".close-reveal-modal").click()},2e3)}else void 0!==i.error?rtmedia_gallery_action_alert_message(i.error,"warning"):rtmedia_gallery_action_alert_message(rtmedia_something_wrong_msg,"warning");n("#rtmedia_create_new_album").removeAttr("disabled"),n("#rtmedia_create_new_album").html(r)})}else rtmedia_gallery_action_alert_message(rtmedia_empty_album_name_msg,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-selected",function(e){0'+t+"

"),setTimeout(function(){jQuery(a).siblings(".rtm-ac-privacy-updated").remove()},2e3)})}),jQuery(".media_search_input").on("keyup",function(){rtm_search_media_text_validation()}),r(),rtMediaHook.register("rtmedia_js_popup_after_content_added",function(){r(),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(e){e.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),mfp=jQuery.magnificPopup.instance,1"+rtmedia_drop_media_msg+"
"),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&jQuery("#whats-new-textarea").append("
"+rtmedia_drop_media_msg+"
"),jQuery(document).on("dragover",function(e){e.preventDefault(),e.target!=this&&(jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&i.addClass("rtm-drag-drop-active"),t.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show())}).on("dragleave",function(e){if(e.preventDefault(),0!=e.originalEvent.pageX&&0!=e.originalEvent.pageY)return!1;"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(i.removeClass("rtm-drag-drop-active"),i.removeAttr("style")),t.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}).on("drop",function(e){e.preventDefault(),jQuery(".bp-suggestions").focus(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(i.removeClass("rtm-drag-drop-active"),i.removeAttr("style")),t.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-album",function(e){e.preventDefault(),confirm(rtmedia_album_delete_confirmation)&&jQuery(this).closest("form").submit()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(e){e.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),rtmedia_init_action_dropdown(""),n(document).click(function(){n(".click-nav ul").is(":visible")&&n(".click-nav ul",this).hide()}),jQuery(".rtmedia-comment-link").on("click",function(e){e.preventDefault(),jQuery("#comment_content").focus()}),0m.showChars+m.minHideChars){var i=t.substr(0,m.showChars);if(0<=i.indexOf("<")){for(var a=!1,r="",n=0,o=[],s=null,l=0,c=0;c<=m.showChars;l++)if("<"!=t[l]||a||(a=!0,"/"==(s=t.substring(l+1,t.indexOf(">",l)))[0]?s!="/"+o[0]?m.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":o.shift():"br"!=s.toLowerCase()&&o.unshift(s)),a&&">"==t[l]&&(a=!1),a)r+=t.charAt(l);else if(c++,n<=m.showChars)r+=t.charAt(l),n++;else if(0";break}i=u("
").html(r+''+m.ellipsesText+"").html()}else i+=m.ellipsesText;var d='
'+i+'
'+t+'
'+m.moreText+"";e.html(d),e.find(".allcontent").hide(),u(".shortcontent p:last",e).css("margin-bottom",0)}}))}}(jQuery),window.onload=function(){"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&rtm_masonry_reload(rtm_masonry_container),rtm_search_media_text_validation(),check_condition("search")&&jQuery("#media_search_remove").show()},jQuery(document).ready(function(){rtm_upload_terms_activity(),jQuery("body").hasClass("has-sidebar")&&0===jQuery("#secondary").length&&(jQuery(".rtmedia-single-container").length||jQuery(".rtmedia-container").length)&&jQuery("body").removeClass("has-sidebar"),rtmedia_main&&("undefined"!==rtmedia_main.rtmedia_direct_download_link&&parseInt(rtmedia_main.rtmedia_direct_download_link)||jQuery(document).on("bp_ajax_request",function(e){setTimeout(function(){jQuery("video").each(function(){jQuery(this).attr("controlsList","nodownload"),jQuery(this).load()})},200)}))}); \ No newline at end of file diff --git a/languages/buddypress-media.po b/languages/buddypress-media.po index cf6b8449e..66dcb5156 100644 --- a/languages/buddypress-media.po +++ b/languages/buddypress-media.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.11\n" "Report-Msgid-Bugs-To: https://rtmedia.io/support/\n" -"POT-Creation-Date: 2022-04-22 11:03:37+00:00\n" +"POT-Creation-Date: 2022-05-18 10:44:17+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -2336,7 +2336,7 @@ msgstr "" msgid "Public - Visible to the world" msgstr "" -#: app/main/RTMedia.php:869 app/main/controllers/template/RTMediaNav.php:294 +#: app/main/RTMedia.php:869 app/main/controllers/template/RTMediaNav.php:284 #: app/main/controllers/template/rtmedia-functions.php:139 msgid "All" msgstr "" @@ -2351,7 +2351,7 @@ msgstr "" #: app/main/RTMedia.php:885 app/main/RTMedia.php:1412 #: app/main/controllers/media/RTMediaAlbum.php:55 #: app/main/controllers/media/RTMediaAlbum.php:67 -#: app/main/controllers/template/RTMediaNav.php:314 +#: app/main/controllers/template/RTMediaNav.php:304 msgid "Albums" msgstr "" From 2752fd41ffa79cb47a93207f07387d8ab8d6e659 Mon Sep 17 00:00:00 2001 From: Pradeep Pal Date: Mon, 6 Jun 2022 09:38:21 +0530 Subject: [PATCH 11/15] add check for object --- templates/media/album-gallery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/media/album-gallery.php b/templates/media/album-gallery.php index 08af57c0a..fbd0c7a8f 100755 --- a/templates/media/album-gallery.php +++ b/templates/media/album-gallery.php @@ -54,7 +54,7 @@
    Date: Thu, 9 Jun 2022 13:52:17 +0530 Subject: [PATCH 12/15] replace addon to premium --- app/admin/RTMediaAdmin.php | 10 +++++----- app/helper/RTMediaAddon.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/admin/RTMediaAdmin.php b/app/admin/RTMediaAdmin.php index e6f00d7fd..dd366c260 100755 --- a/app/admin/RTMediaAdmin.php +++ b/app/admin/RTMediaAdmin.php @@ -838,10 +838,10 @@ public function admin_bar_menu( $admin_bar ) { array( 'id' => 'rt-media-addons', 'parent' => 'rtMedia', - 'title' => esc_html__( 'Addons', 'buddypress-media' ), + 'title' => esc_html__( 'Premium', 'buddypress-media' ), 'href' => admin_url( 'admin.php?page=rtmedia-addons' ), 'meta' => array( - 'title' => esc_html__( 'Addons', 'buddypress-media' ), + 'title' => esc_html__( 'Premium', 'buddypress-media' ), 'target' => '_self', ), ) @@ -1043,8 +1043,8 @@ public function menu() { add_submenu_page( 'rtmedia-settings', - esc_html__( 'Addons', 'buddypress-media' ), - esc_html__( 'Addons', 'buddypress-media' ), + esc_html__( 'Premium', 'buddypress-media' ), + esc_html__( 'Premium', 'buddypress-media' ), 'manage_options', 'rtmedia-addons', array( @@ -1399,7 +1399,7 @@ public function rtmedia_tabs() { ), array( 'href' => get_admin_url( null, esc_url( add_query_arg( array( 'page' => 'rtmedia-addons' ), 'admin.php' ) ) ), - 'name' => esc_html__( 'Addons', 'buddypress-media' ), + 'name' => esc_html__( 'Premium', 'buddypress-media' ), 'slug' => 'rtmedia-addons', ), ); diff --git a/app/helper/RTMediaAddon.php b/app/helper/RTMediaAddon.php index 499e624db..1e98e6321 100755 --- a/app/helper/RTMediaAddon.php +++ b/app/helper/RTMediaAddon.php @@ -88,8 +88,8 @@ public function get_addons() { if ( ! is_rtmedia_vip_plugin() ) { $tabs[] = array( - 'title' => esc_html__( 'Plugins', 'buddypress-media' ), - 'name' => esc_html__( 'Plugins', 'buddypress-media' ), + 'title' => esc_html__( 'Premium Features', 'buddypress-media' ), + 'name' => esc_html__( 'Premium Features', 'buddypress-media' ), 'href' => '#rtm-plugins', 'icon' => 'dashicons-admin-plugins', 'callback' => array( $this, 'plugins_content' ), From 5b10832e45e1df16090fb728dc1e9120090b689b Mon Sep 17 00:00:00 2001 From: Pradeep Pal Date: Thu, 9 Jun 2022 13:58:54 +0530 Subject: [PATCH 13/15] fix count in group album --- app/main/controllers/template/RTMediaNav.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/main/controllers/template/RTMediaNav.php b/app/main/controllers/template/RTMediaNav.php index 701f8892d..f66be669b 100755 --- a/app/main/controllers/template/RTMediaNav.php +++ b/app/main/controllers/template/RTMediaNav.php @@ -278,12 +278,14 @@ public function sub_nav() { $global_albums = rtmedia_global_albums(); // Return the album count if the album has media in it. - $global_albums = array_filter( - $global_albums, - function( $album_id ) { - return (int) rtm_get_album_media_count( $album_id ) > 0; - } - ); + if ( function_exists( 'bp_is_group' ) && bp_is_group() && $user_group_status ) { + $global_albums = array_filter( + $global_albums, + function( $album_id ) { + return (int) rtm_get_album_media_count( $album_id ) > 0; + } + ); + } $other_count = count( $global_albums ); From c4b5de54b9cdf030577ad71ee62f9227a5de95e3 Mon Sep 17 00:00:00 2001 From: Pradeep Pal Date: Tue, 14 Jun 2022 15:11:32 +0530 Subject: [PATCH 14/15] fix bprewrite issue --- app/main/controllers/template/RTMediaNav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/controllers/template/RTMediaNav.php b/app/main/controllers/template/RTMediaNav.php index 3ce351326..0668e55b1 100755 --- a/app/main/controllers/template/RTMediaNav.php +++ b/app/main/controllers/template/RTMediaNav.php @@ -31,7 +31,7 @@ public function __construct( $action = true ) { add_action( 'admin_bar_menu', array( $this, 'admin_nav' ), $order ); if ( class_exists( 'BuddyPress' ) ) { - add_action( 'bp_setup_nav', array( $this, 'custom_media_nav_tab' ), 10, 1 ); + add_action( 'bp_parse_query', array( $this, 'custom_media_nav_tab' ), 99, 1 ); add_filter( 'bp_nouveau_nav_has_count', array( $this, 'rtmedia_bp_nouveau_nav_has_count' ), 10, 3 ); add_filter( 'bp_nouveau_get_nav_count', array( $this, 'rtmedia_bp_nouveau_get_nav_count' ), 10, 3 ); } From dfb93ebdf2f9fb8ea7c33798073dedcc1ceb88ac Mon Sep 17 00:00:00 2001 From: Pradeep Pal Date: Wed, 15 Jun 2022 13:33:03 +0530 Subject: [PATCH 15/15] Version update v4.6.12 --- README.md | 16 +++++++++++++++- index.php | 4 ++-- languages/buddypress-media.po | 14 +++++++------- readme.txt | 21 +++++++++++++++++---- 4 files changed, 41 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index bce8a01ba..6e90dd2a6 100755 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & mor ![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=MU1JamdmRnppK0hhQy9QMU8wdDJ2MUEyb1ZuS0ljVFQvSHZ6anFvNzUxTT0tLXhUNnliTnZGcE5CcW93N0I1eXdnM3c9PQ==--8c124e667dd0c317618efde1bed2b260000916b6) -* **Contributors:** [rtcamp](http://profiles.wordpress.org/rtcamp), [mangeshp](http://profiles.wordpress.org/mangeshp), [sanket.parmar](http://profiles.wordpress.org/sanket.parmar), [pranalipatel](http://profiles.wordpress.org/pranalipatel), [jignesh.nakrani](http://profiles.wordpress.org/jignesh.nakrani), [manishsongirkar36](http://profiles.wordpress.org/manishsongirkar36), [kiranpotphode](http://profiles.wordpress.org/kiranpotphode), [yahil](http://profiles.wordpress.org/yahil), [1naveengiri](http://profiles.wordpress.org/1naveengiri), [bhargavbhandari90](http://profiles.wordpress.org/bhargavbhandari90), [deepak1191](http://profiles.wordpress.org/deepak1191), [rittesh.patel](http://profiles.wordpress.org/rittesh.patel), [sagarjadhav](http://profiles.wordpress.org/sagarjadhav), [pushpak.pop](http://profiles.wordpress.org/pushpak.pop), [faishal](http://profiles.wordpress.org/faishal), [desaiuditd](http://profiles.wordpress.org/desaiuditd), [rahul286](http://profiles.wordpress.org/rahul286), [JoshuaAbenazer](http://profiles.wordpress.org/JoshuaAbenazer), [gagan0123](http://profiles.wordpress.org/gagan0123), [saurabhshukla](http://profiles.wordpress.org/saurabhshukla), [nitun.lanjewar](http://profiles.wordpress.org/nitun.lanjewar), [umesh.nevase](http://profiles.wordpress.org/umesh.nevase), [suhasgirgaonkar](http://profiles.wordpress.org/suhasgirgaonkar), [neerukoul](http://profiles.wordpress.org/neerukoul), [hrishiv90](http://profiles.wordpress.org/hrishiv90), [kanakiyajay](http://profiles.wordpress.org/kanakiyajay), [jarretc](http://profiles.wordpress.org/jarretc), [tobiaskluge](http://profiles.wordpress.org/tobiaskluge), [rafaelfunchal](http://profiles.wordpress.org/rafaelfunchal), [UmeshSingla](http://profiles.wordpress.org/UmeshSingla), [mehulkaklotar](http://profiles.wordpress.org/mehulkaklotar), [tannermirabel](http://profiles.wordpress.org/tannermirabel), [kishores](http://profiles.wordpress.org/kishores), [chandrapatel](http://profiles.wordpress.org/chandrapatel), [rahul3883](http://profiles.wordpress.org/rahul3883/), [nomnom99](http://profiles.wordpress.org/nomnom99), [sayanchakraborty](https://profiles.wordpress.org/sayanchakraborty), [milindmore22](https://profiles.wordpress.org/milindmore22), [thrijith](https://profiles.wordpress.org/thrijith), [abhijitrakas](https://profiles.wordpress.org/abhijitrakas), [sid177](https://profiles.wordpress.org/sid177), [montu3366](https://profiles.wordpress.org/montu3366), [jashwini](https://profiles.wordpress.org/jashwini), [juhise](https://profiles.wordpress.org/juhise), [ravatparmar](https://profiles.wordpress.org/ravatparmar), [dharmin16](https://profiles.wordpress.org/dharmin16), [malavvasita](https://profiles.wordpress.org/malavvasita), [pooja1210](https://profiles.wordpress.org/pooja1210), [krupajnanda](https://profiles.wordpress.org/krupajnanda), [kanumalivad](https://profiles.wordpress.org/kanumalivad), [surajkumarsingh](https://profiles.wordpress.org/surajkumarsingh), [dishitpala](https://profiles.wordpress.org/dishitpala), [shobhit2412](https://profiles.wordpress.org/shobhit2412/), [vkd007](https://profiles.wordpress.org/vkd007/), [vaishu.agola27](https://profiles.wordpress.org/vaishuagola27/), [kapilpaul](https://profiles.wordpress.org/kapilpaul/), [opurockey](https://profiles.wordpress.org/opurockey/), [pavanpatil1](https://profiles.wordpress.org/pavanpatil1/), [pradeep1308](https://profiles.wordpress.org/pradeep1308/), [shardul200](https://profiles.wordpress.org/shardul200/), [ibnulk](https://profiles.wordpress.org/ibnulk/), [sabbir1991](https://profiles.wordpress.org/sabbir1991/), [kamalahmed](https://profiles.wordpress.org/kamalahmed/), [harshbarach](https://profiles.wordpress.org/harshbarach/), [mukulsingh27](https://profiles.wordpress.org/mukulsingh27/), [vishalkakadiya](https://profiles.wordpress.org/vishalkakadiya/) +* **Contributors:** [rtcamp](http://profiles.wordpress.org/rtcamp), [mangeshp](http://profiles.wordpress.org/mangeshp), [sanket.parmar](http://profiles.wordpress.org/sanket.parmar), [pranalipatel](http://profiles.wordpress.org/pranalipatel), [jignesh.nakrani](http://profiles.wordpress.org/jignesh.nakrani), [manishsongirkar36](http://profiles.wordpress.org/manishsongirkar36), [kiranpotphode](http://profiles.wordpress.org/kiranpotphode), [yahil](http://profiles.wordpress.org/yahil), [1naveengiri](http://profiles.wordpress.org/1naveengiri), [bhargavbhandari90](http://profiles.wordpress.org/bhargavbhandari90), [deepak1191](http://profiles.wordpress.org/deepak1191), [rittesh.patel](http://profiles.wordpress.org/rittesh.patel), [sagarjadhav](http://profiles.wordpress.org/sagarjadhav), [pushpak.pop](http://profiles.wordpress.org/pushpak.pop), [faishal](http://profiles.wordpress.org/faishal), [desaiuditd](http://profiles.wordpress.org/desaiuditd), [rahul286](http://profiles.wordpress.org/rahul286), [JoshuaAbenazer](http://profiles.wordpress.org/JoshuaAbenazer), [gagan0123](http://profiles.wordpress.org/gagan0123), [saurabhshukla](http://profiles.wordpress.org/saurabhshukla), [nitun.lanjewar](http://profiles.wordpress.org/nitun.lanjewar), [umesh.nevase](http://profiles.wordpress.org/umesh.nevase), [suhasgirgaonkar](http://profiles.wordpress.org/suhasgirgaonkar), [neerukoul](http://profiles.wordpress.org/neerukoul), [hrishiv90](http://profiles.wordpress.org/hrishiv90), [kanakiyajay](http://profiles.wordpress.org/kanakiyajay), [jarretc](http://profiles.wordpress.org/jarretc), [tobiaskluge](http://profiles.wordpress.org/tobiaskluge), [rafaelfunchal](http://profiles.wordpress.org/rafaelfunchal), [UmeshSingla](http://profiles.wordpress.org/UmeshSingla), [mehulkaklotar](http://profiles.wordpress.org/mehulkaklotar), [tannermirabel](http://profiles.wordpress.org/tannermirabel), [kishores](http://profiles.wordpress.org/kishores), [chandrapatel](http://profiles.wordpress.org/chandrapatel), [rahul3883](http://profiles.wordpress.org/rahul3883/), [nomnom99](http://profiles.wordpress.org/nomnom99), [sayanchakraborty](https://profiles.wordpress.org/sayanchakraborty), [milindmore22](https://profiles.wordpress.org/milindmore22), [thrijith](https://profiles.wordpress.org/thrijith), [abhijitrakas](https://profiles.wordpress.org/abhijitrakas), [sid177](https://profiles.wordpress.org/sid177), [montu3366](https://profiles.wordpress.org/montu3366), [jashwini](https://profiles.wordpress.org/jashwini), [juhise](https://profiles.wordpress.org/juhise), [ravatparmar](https://profiles.wordpress.org/ravatparmar), [dharmin16](https://profiles.wordpress.org/dharmin16), [malavvasita](https://profiles.wordpress.org/malavvasita), [pooja1210](https://profiles.wordpress.org/pooja1210), [krupajnanda](https://profiles.wordpress.org/krupajnanda), [kanumalivad](https://profiles.wordpress.org/kanumalivad), [surajkumarsingh](https://profiles.wordpress.org/surajkumarsingh), [dishitpala](https://profiles.wordpress.org/dishitpala), [shobhit2412](https://profiles.wordpress.org/shobhit2412/), [vkd007](https://profiles.wordpress.org/vkd007/), [vaishu.agola27](https://profiles.wordpress.org/vaishuagola27/), [kapilpaul](https://profiles.wordpress.org/kapilpaul/), [opurockey](https://profiles.wordpress.org/opurockey/), [pavanpatil1](https://profiles.wordpress.org/pavanpatil1/), [pradeep1308](https://profiles.wordpress.org/pradeep1308/), [shardul200](https://profiles.wordpress.org/shardul200/), [ibnulk](https://profiles.wordpress.org/ibnulk/), [sabbir1991](https://profiles.wordpress.org/sabbir1991/), [kamalahmed](https://profiles.wordpress.org/kamalahmed/), [harshbarach](https://profiles.wordpress.org/harshbarach/), [mukulsingh27](https://profiles.wordpress.org/mukulsingh27/), [vishalkakadiya](https://profiles.wordpress.org/vishalkakadiya/), [elifvish](https://profiles.wordpress.org/elifvish/) * **License:** [GPL v2 or later]( http://www.gnu.org/licenses/gpl-2.0.html) @@ -152,6 +152,20 @@ https://www.youtube.com/watch?v=dJrykKQGDcs ## Changelog ## +### 4.6.12 [June 16, 2022] ### + +* Enhancement + + * Compatible with BP-Rewrites latest version. + * Compatible with with WordPress latest version 6.0. + +* Fixed + + * UI/UX Issues. + * Fixed album count issue for non-admin user and group albums. + * Fixed Video thumbnail issue. + + ### 4.6.11 [April 27, 2022] ### * Enhancement diff --git a/index.php b/index.php index 4b1b6bf04..9272ddb4b 100755 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: rtMedia for WordPress, BuddyPress and bbPress * Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media * 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! - * Version: 4.6.11 + * Version: 4.6.12 * Author: rtCamp * Text Domain: buddypress-media * Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media @@ -19,7 +19,7 @@ /** * The version of the plugin */ - define( 'RTMEDIA_VERSION', '4.6.11' ); + define( 'RTMEDIA_VERSION', '4.6.12' ); } if ( ! defined( 'RTMEDIA_PATH' ) ) { diff --git a/languages/buddypress-media.po b/languages/buddypress-media.po index 66dcb5156..057e9db0b 100644 --- a/languages/buddypress-media.po +++ b/languages/buddypress-media.po @@ -2,9 +2,9 @@ # This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package. msgid "" msgstr "" -"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.11\n" +"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.12\n" "Report-Msgid-Bugs-To: https://rtmedia.io/support/\n" -"POT-Creation-Date: 2022-05-18 10:44:17+00:00\n" +"POT-Creation-Date: 2022-06-15 07:59:48+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -154,7 +154,7 @@ msgstr "" #: app/admin/RTMediaAdmin.php:841 app/admin/RTMediaAdmin.php:844 #: app/admin/RTMediaAdmin.php:1046 app/admin/RTMediaAdmin.php:1047 #: app/admin/RTMediaAdmin.php:1402 -msgid "Addons" +msgid "Premium" msgstr "" #: app/admin/RTMediaAdmin.php:867 app/admin/RTMediaAdmin.php:870 @@ -1082,7 +1082,7 @@ msgid "User's Favorites:" msgstr "" #: app/helper/RTMediaAddon.php:91 app/helper/RTMediaAddon.php:92 -msgid "Plugins" +msgid "Premium Features" msgstr "" #: app/helper/RTMediaAddon.php:116 @@ -2336,7 +2336,7 @@ msgstr "" msgid "Public - Visible to the world" msgstr "" -#: app/main/RTMedia.php:869 app/main/controllers/template/RTMediaNav.php:284 +#: app/main/RTMedia.php:869 app/main/controllers/template/RTMediaNav.php:296 #: app/main/controllers/template/rtmedia-functions.php:139 msgid "All" msgstr "" @@ -2351,7 +2351,7 @@ msgstr "" #: app/main/RTMedia.php:885 app/main/RTMedia.php:1412 #: app/main/controllers/media/RTMediaAlbum.php:55 #: app/main/controllers/media/RTMediaAlbum.php:67 -#: app/main/controllers/template/RTMediaNav.php:304 +#: app/main/controllers/template/RTMediaNav.php:316 msgid "Albums" msgstr "" @@ -3168,7 +3168,7 @@ msgstr "" msgid "Search Media" msgstr "" -#: app/main/controllers/template/rtmedia-actions.php:1104 +#: app/main/controllers/template/rtmedia-actions.php:1178 msgid "Please swipe for more media." msgstr "" diff --git a/readme.txt b/readme.txt index c96ada18f..d9e56f945 100755 --- a/readme.txt +++ b/readme.txt @@ -1,11 +1,11 @@ === rtMedia for WordPress, BuddyPress and bbPress === -Contributors: rtcamp, mangeshp, sanket.parmar, pranalipatel, jignesh.nakrani, manishsongirkar36, kiranpotphode, yahil, 1naveengiri, bhargavbhandari90, raftaar1191, rittesh.patel, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores, chandrapatel, rahul3883, nomnom99, sayanchakraborty, milindmore22, thrijith, abhijitrakas, sid177, montu3366, jashwini, juhise, ravatparmar, dharmin16, malavvasita, pooja1210, krupajnanda, surajkumarsingh, kanumalivad, dishitpala, shobhit2412, vaishu.agola27, kapilpaul, opurockey, vkd007, pavanpatil1, pradeep1308, shardul200, sabbir1991, kamalahmed, ibnulk, harshbarach, Mukulsingh27, vishalkakadiya +Contributors: rtcamp, mangeshp, sanket.parmar, pranalipatel, jignesh.nakrani, manishsongirkar36, kiranpotphode, yahil, 1naveengiri, bhargavbhandari90, raftaar1191, rittesh.patel, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores, chandrapatel, rahul3883, nomnom99, sayanchakraborty, milindmore22, thrijith, abhijitrakas, sid177, montu3366, jashwini, juhise, ravatparmar, dharmin16, malavvasita, pooja1210, krupajnanda, surajkumarsingh, kanumalivad, dishitpala, shobhit2412, vaishu.agola27, kapilpaul, opurockey, vkd007, pavanpatil1, pradeep1308, shardul200, sabbir1991, kamalahmed, ibnulk, harshbarach, Mukulsingh27, vishalkakadiya, elifvish Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, media-node, rtMedia, WordPress, bbPress, masonry License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Requires at least: WordPress 4.1 Tested up to: 5.9.3 -Stable tag: 4.6.11 +Stable tag: 4.6.12 Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices. @@ -133,6 +133,19 @@ http://www.youtube.com/watch?v=dJrykKQGDcs == Changelog == += 4.6.12 [June 16, 2022] = + +* Enhancement + + * Compatible with BP-Rewrites latest version. + * Compatible with with WordPress latest version 6.0. + +* Fixed + + * UI/UX Issues. + * Fixed album count issue for non-admin user and group albums. + * Fixed Video thumbnail issue. + = 4.6.11 [April 27, 2022] = * Enhancement @@ -1798,8 +1811,8 @@ http://www.youtube.com/watch?v=dJrykKQGDcs == Upgrade Notice == -= 4.6.11 = -rtMedia 4.6.11 with some enhancements & minor UI/UX fixes. += 4.6.12 = +rtMedia 4.6.12 with some enhancements & minor UI/UX fixes. == Sponsors ==