WordPress.org

Plugin Directory

Changeset 1601895


Ignore:
Timestamp:
02/23/17 07:36:47 (3 months ago)
Author:
rtcamp
Message:

Update version v4.3.1

Location:
buddypress-media/trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • buddypress-media/trunk/app/admin/RTMediaFormHandler.php

    r1595586 r1601895  
    304304                    'key' => 'general_enableLikes', 
    305305                    'value' => $options['general_enableLikes'], 
    306                     'desc' => __( 'You may want to disable like feature if you had enabled rating feature.', 'buddypress-media' ), 
     306                    'desc' => __( 'Enabling this setting will add like feature for media.', 'buddypress-media' ), 
    307307                ), 
    308308                'group' => '11', 
     
    10191019            ), 
    10201020            'buddypress_enableOnComment'      => array( 
    1021                 'title'     => esc_html__( 'Allow upload to Comment', 'buddypress-media' ), 
     1021                'title'     => esc_html__( 'Enable media in comment', 'buddypress-media' ), 
    10221022                'callback'  => array( 'RTMediaFormHandler', 'checkbox' ), 
    10231023                'args'      => array( 
    10241024                    'key'   => 'buddypress_enableOnComment', 
    10251025                    'value' => $options['buddypress_enableOnComment'], 
    1026                     'desc'  => esc_html__( 'Enable Media in Comment', 'buddypress-media' ), 
     1026                    'desc'  => esc_html__( 'This will allow users to upload media in comment section for originally uploaded media up to 1 level.', 'buddypress-media' ), 
    10271027                ), 
    10281028                'group'    => 660, 
    10291029            ), 
    10301030            'rtmedia_disable_media_in_commented_media'      => array( 
    1031                 'title'     => esc_html__( 'Disable upload to Comment Media', 'buddypress-media' ), 
     1031                'title'     => esc_html__( 'Disable upload in comment media', 'buddypress-media' ), 
    10321032                'callback'  => array( 'RTMediaFormHandler', 'checkbox' ), 
    10331033                'args'      => array( 
    10341034                    'key'   => 'rtmedia_disable_media_in_commented_media', 
    10351035                    'value' => $options['rtmedia_disable_media_in_commented_media'], 
    1036                     'desc'  => esc_html__( 'Enable Media in Comment', 'buddypress-media' ), 
     1036                    'desc'  => esc_html__( 'Disable upload in comment media', 'buddypress-media' ), 
    10371037                ), 
    10381038                'group'    => 660, 
     
    10941094                ), 
    10951095                'group' => 50, 
     1096            ), 
     1097            'general_enableAlbums_description'            => array( 
     1098                'title'     => esc_html__( 'Show album description', 'buddypress-media' ), 
     1099                'callback'  => array( 'RTMediaFormHandler', 'checkbox' ), 
     1100                'args'      => array( 
     1101                    'id'    => 'rtmedia-album-description-enable', 
     1102                    'key'   => 'general_enableAlbums_description', 
     1103                    'value' => $options['general_enableAlbums_description'], 
     1104                    'desc'  => esc_html__( 'This will show description of an album under album gallery page.', 'buddypress-media' ), 
     1105                ), 
     1106                'group' => 50, 
     1107                'depends' => 'general_enableAlbums', 
    10961108            ), 
    10971109        ); 
  • buddypress-media/trunk/app/assets/js/rtMedia.js

    r1595586 r1601895  
    6767                        } 
    6868                        var $single_meta_h = jQuery( ".rtmedia-container .rtmedia-single-meta" ).height(); 
     69 
     70                        var probablymobile = false; 
     71                        // check if it's is an mobile or not 
     72                        if( typeof mfp != 'undefined' && typeof mfp.probablyMobile != 'undefined' && mfp.probablyMobile == true ){ 
     73                            probablymobile = true; 
     74                        } 
    6975                        /* adding auto play button in the popup */ 
    7076                        $( '.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', true ); 
     77 
     78                        // if it's mobile then add mute button to it 
     79                        if( probablymobile ){ 
     80                            $( '.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video' ).attr( 'muted', false ); 
     81                        } 
    7182 
    7283                        $( '.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( { 
    7384                            // If the <video width> is not specified, this is the default 
    7485                            defaultVideoWidth: 480, 
     86                            // always show the volume button 
     87                            hideVolumeOnTouchDevices: false, 
     88                            features: ['playpause','progress','current','volume','fullscreen'], 
    7589                            // If the <video height> is not specified, this is the default 
    7690                            defaultVideoHeight: 270, 
     91                            // always show control for mobile 
     92                            alwaysShowControls: probablymobile, 
    7793                            enableAutosize: true, 
     94                            clickToPlayPause: true, 
    7895                             // if set, overrides <video height> 
    7996                            videoHeight: -1, 
     
    90107                                }, false); 
    91108                                // Call the play method 
    92                                 if( $( window ).width() < 760 ){ 
    93                                     window.addEventListener('touchstart', function videoStart() { 
    94                                       mediaElement.play(); 
    95                                       // remove from the window and call the function we are removing 
    96                                       this.removeEventListener('touchstart', videoStart); 
     109                                // check if it's mobile 
     110                                if( probablymobile && mediaElement.hasClass( "wp-video-shortcode" ) ){ 
     111                                    jQuery( 'body' ).on('touchstart', '.mejs-overlay-button' , function(e) { 
     112                                        mediaElement.paused ? mediaElement.play() : mediaElement.pause(); 
    97113                                    }); 
    98114                                } else { 
  • buddypress-media/trunk/app/assets/js/rtmedia.min.js

    r1595586 r1601895  
    33 * @package rtMedia  
    44 */ 
    5 function apply_rtMagnificPopup(a){jQuery("document").ready(function(b){var c="";c="undefined"==typeof rtmedia_load_more?"Loading media":rtmedia_load_more,"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&(b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").length>0&&b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").addClass("no-popup"),rtMagnificPopup=jQuery(a).magnificPopup({delegate:"a:not(.no-popup, .mejs-time-slider, .mejs-volume-slider, .mejs-horizontal-volume-slider)",type:"ajax",tLoading:c+" #%curr%...",mainClass:"mfp-img-mobile",preload:[1,3],closeOnBgClick:!0,gallery:{enabled:!0,navigateByImgClick:!0,arrowMarkup:"",preload:[0,1]},image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.',titleSrc:function(a){return a.el.attr("title")+"<small>by Marsel Van Oosten</small>"}},callbacks:{ajaxContentAdded:function(){a=jQuery.magnificPopup.instance,1===jQuery(a.items).size()&&jQuery(".mfp-arrow").remove();var a=jQuery.magnificPopup.instance,c=a.currItem.el,d=c.parent();if(d.is("li")||(d=d.parent()),(d.is(":nth-last-child(2)")||d.is(":last-child"))&&d.find("a").hasClass("rtmedia-list-item-a")){d.next();"block"==jQuery("#rtMedia-galary-next").css("display")&&jQuery("#rtMedia-galary-next").click()}var e=a.items.length;if(a.index==e-1&&!d.is(":last-child"))return void c.click();var f={};"undefined"!=typeof _wpmejsSettings&&(f.pluginPath=_wpmejsSettings.pluginPath);var g=jQuery(".rtmedia-container .rtmedia-single-meta").height();b(".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),b(".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({defaultVideoWidth:480,defaultVideoHeight:270,enableAutosize:!0,videoHeight:-1,success:function(a,c){a.addEventListener("loadeddata",function(c){var d=b(a).height(),e=b(window).height(),f=jQuery("div.rtm-ltb-action-container").height(),f=f+50,h=g-f;d>e&&jQuery(".rtmedia-container #rtmedia-single-media-container .mejs-container").attr("style","height:"+h+"px !important; transition:0.2s")},!1),b(window).width()<760?window.addEventListener("touchstart",function b(){a.play(),this.removeEventListener("touchstart",b)}):a.play()}}),b(".mfp-content .mejs-audio .mejs-controls").css("position","relative"),rtMediaHook.call("rtmedia_js_popup_after_content_added",[]),"undefined"!=typeof bp&&"undefined"!=typeof bp.mentions&&"undefined"!=typeof bp.mentions.users&&(b("#atwho-container #atwho-ground-comment_content").remove(),b("#comment_content").bp_mentions(bp.mentions.users)),rtmedia_reset_video_and_audio_for_popup(),apply_rtMagnificPopup(".rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container")},close:function(a){rtmedia_single_page_popup_close()},BeforeChange:function(a){}}})),jQuery(document).ajaxComplete(function(){jQuery("[id^=imgedit-leaving]").filter(function(){var a=jQuery(this).text();jQuery(this).text(a.replace("OK","Save"))})})})}function rtmedia_init_action_dropdown(a){var b,c;jQuery(a+" .click-nav > span,"+a+" .click-nav > div").toggleClass("no-js js"),jQuery(a+" .click-nav .js ul").hide(),jQuery(a+" .click-nav .clicker").click(function(a){b=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),c=jQuery(this).next("ul"),jQuery.each(b,function(a,b){jQuery(b).html()!=c.html()&&jQuery(b).hide()}),jQuery(c).toggle(),a.stopPropagation()})}function bp_media_create_element(a){return!1}function rtmedia_version_compare(a,b){if(typeof a+typeof b!="stringstring")return!1;for(var c=a.split("."),d=b.split("."),e=0,f=Math.max(c.length,d.length);e<f;e++){if(c[e]&&!d[e]&&parseInt(c[e])>0||parseInt(c[e])>parseInt(d[e]))return!0;if(d[e]&&!c[e]&&parseInt(d[e])>0||parseInt(c[e])<parseInt(d[e]))return!1}return!0}function rtm_is_element_exist(a){return jQuery(a).length>0}function rtm_masonry_reload(a){setTimeout(function(){a.masonry("reload")},250)}function rtmediaGetParameterByName(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null==c?"":decodeURIComponent(c[1].replace(/\+/g," "))}function rtmedia_single_media_alert_message(a,b){var c="rtmedia-success";"warning"==b&&(c="rtmedia-warning"),jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","0.2"),jQuery(".rtmedia-single-media .rtmedia-media").after("<div class='rtmedia-message-container'><span class='"+c+"'>"+a+" </span></div>"),setTimeout(function(){jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","1"),jQuery(".rtmedia-message-container").remove()},3e3),jQuery(".rtmedia-message-container").click(function(){jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","1"),jQuery(".rtmedia-message-container").remove()})}function rtmedia_gallery_action_alert_message(a,b){var c="rtmedia-success";"warning"==b&&(c="rtmedia-warning");var d='<div class="rtmedia-gallery-alert-container"> </div>';jQuery("body").append(d),jQuery(".rtmedia-gallery-alert-container").append("<div class='rtmedia-gallery-message-box'><span class='"+c+"'>"+a+" </span></div>"),setTimeout(function(){jQuery(".rtmedia-gallery-alert-container").remove()},3e3),jQuery(".rtmedia-gallery-message-box").click(function(){jQuery(".rtmedia-gallery-alert-container").remove()})}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=c.indexOf("MSIE 7.")!==-1,b.isIE8=c.indexOf("MSIE 8.")!==-1,b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=!!b.st[d]&&b.st[d].markup;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){if(c.target!==b.wrap[0]&&!a.contains(b.wrap[0],c.target))return b._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},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:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,e<200?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return!!b.currItem.hasSize&&b.currItem.img},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',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(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){if(e.indexOf(this.index)>-1)return this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:a<0?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',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 c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,!(!c||!c.enabled)&&(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){if(b.items.length>1)return b.next(),!1}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null}))},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}),"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.rtTab.options,b),d.rtTabs()},rtTabs:function(){var c=this,d=c.options.activeTab;c.$elem.find("li:nth-child("+d+")").addClass("active"),c.rtTabContent(activeTabContent="yes"),c.rtClick();var e="false"!==c.$elem.attr("data-hash");if(e===!0){var f=b.location.hash;f&&c.$elem.find("li").find('a[href="'+f+'"]').trigger("click"),a(b).on("hashchange",function(){var a=b.location.hash;c.$elem.find("li").find('a[href="'+a+'"]').trigger("click")})}},rtClick:function(){var c=this,d=c.$elem.find("li"),e=d.find("a");e.on("click",function(e){e.preventDefault(),d.removeClass("active"),c.rtTabContent(),a(this).parent().addClass("active");var f=a(this).attr("href");a(f).removeClass("hide");var g="false"!==c.$elem.attr("data-hash");if(g===!0){var h=a(b).scrollTop();location.hash=a(this).attr("href"),a(b).scrollTop(h)}"function"==typeof c.options.onComplete&&c.options.onComplete.apply(c.elem,arguments)})},rtTabContent:function(b){var c=this,d=c.$elem.find("li"),e=d.find("a");e.each(function(){var c=a(this),d=c.attr("href");"yes"===b?c.parent().hasClass("active")||a(d).addClass("hide"):a(d).addClass("hide")})}};a.fn.rtTab=function(b){return this.each(function(){var c=Object.create(e);c.init(b,this),a.data(this,"rtTab",c)})},a.fn.rtTab.options={activeTab:1,onComplete:null}}(jQuery,window,document);var rtMagnificPopup,rtm_masonry_container,comment_media=!1,rtMediaHook={hooks:[],is_break:!1,register:function(a,b){"undefined"==typeof rtMediaHook.hooks[a]&&(rtMediaHook.hooks[a]=[]),rtMediaHook.hooks[a].push(b)},call:function(a,arguments){if("undefined"!=typeof rtMediaHook.hooks[a])for(i=0;i<rtMediaHook.hooks[a].length;++i)if(1!=rtMediaHook.hooks[a][i](arguments))return rtMediaHook.is_break=!0,!1;return!0}};jQuery("document").ready(function(a){function b(){if(jQuery("#rtmedia-media-view-form").length>0){var a=jQuery("#rtmedia-media-view-form").attr("action");jQuery.post(a,{},function(a){})}}function c(){var a=jQuery.magnificPopup.instance;jQuery(".mfp-arrow-right").on("click",function(b){a.next()}),jQuery(".mfp-arrow-left").on("click",function(b){a.prev()}),jQuery(".mfp-content .rtmedia-media").swipe({swipeLeft:function(b,c,d,e,f){a.next()},swipeRight:function(b,c,d,e,f){a.prev()},threshold:0})}function d(){jQuery(".mfp-arrow-right").hide(),jQuery(".mfp-arrow-left").hide(),jQuery(document).unbind("keydown")}function e(){rtmedia_disable_popup_navigation("#comment_content")}function f(){jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()})}"undefined"!=typeof a.fn.rtTab&&a(".rtm-tabs").rtTab(),jQuery(".rtmedia-modal-link").length>0&&a(".rtmedia-modal-link").magnificPopup({type:"inline",midClick:!0,closeBtnInside:!0}),a("#rt_media_comment_form").submit(function(b){return""!=a.trim(a("#comment_content").val())||(0==jQuery("#rtmedia-single-media-container").length?rtmedia_gallery_action_alert_message(rtmedia_empty_comment_msg,"warning"):rtmedia_single_media_alert_message(rtmedia_empty_comment_msg,"warning"),!1)}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&apply_rtMagnificPopup(".rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container"),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(a){return!0}if("activity_get_older_updates"==b.data.action){var d=b.success;a.success=function(a){d(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}else if("get_single_activity_content"==b.data.action){var d=b.success;a.success=function(a){d(a),setTimeout(function(){apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),jQuery("ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270})},900)}}}),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(a){return!0}if("activity_get_older_updates"==b.data.action){var d=b.success;a.success=function(a){d(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"), 
    6 jQuery("ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > audio.wp-audio-shortcode, ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > video.wp-video-shortcode").mediaelementplayer({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(a){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(a){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(a){jQuery(".rtmedia-delete-container").slideUp(),jQuery(".rtmedia-move-container").slideToggle()}),jQuery("#rtmedia-create-album-modal").on("click","#rtmedia_create_new_album",function(b){if($albumname=jQuery("<span/>").text(jQuery.trim(jQuery("#rtmedia_album_name").val())).html(),$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 c={action:"rtmedia_create_album",name:$albumname,context:$context,context_id:$context_id,create_album_nonce:$create_album_nonce};""!==$privacy&&(c.privacy=$privacy),a("#rtmedia_create_new_album").attr("disabled","disabled");var d=a("#rtmedia_create_new_album").html();a("#rtmedia_create_new_album").prepend("<img src='"+rMedia_loading_file+"' />"),jQuery.post(rtmedia_ajax_url,c,function(b){if("undefined"!=typeof b.album){b=jQuery.trim(b.album);var c=!0;jQuery(".rtmedia-user-album-list").each(function(){if(jQuery(this).children("optgroup").each(function(){if(jQuery(this).attr("value")===$context)return c=!1,void jQuery(this).append('<option value="'+b+'">'+$albumname+"</option>")}),c){var a=$context.charAt(0).toUpperCase()+$context.slice(1)+" "+rtmedia_main_js_strings.rtmedia_albums,d='<optgroup value="'+$context+'" label="'+a+'"><option value="'+b+'">'+$albumname+"</option></optgroup>";jQuery(this).append(d)}}),jQuery('select.rtmedia-user-album-list option[value="'+b+'"]').prop("selected",!0),jQuery(".rtmedia-create-new-album-container").slideToggle(),jQuery("#rtmedia_album_name").val(""),jQuery("#rtmedia-create-album-modal").append("<div class='rtmedia-success rtmedia-create-album-alert'><b>"+$albumname+"</b>"+rtmedia_album_created_msg+"</div>"),setTimeout(function(){jQuery(".rtmedia-create-album-alert").remove()},4e3),setTimeout(function(){galleryObj.reloadView(),jQuery(".close-reveal-modal").click()},2e3)}else"undefined"!=typeof b.error?rtmedia_gallery_action_alert_message(b.error,"warning"):rtmedia_gallery_action_alert_message(rtmedia_something_wrong_msg,"warning");a("#rtmedia_create_new_album").removeAttr("disabled"),a("#rtmedia_create_new_album").html(d)})}else rtmedia_gallery_action_alert_message(rtmedia_empty_album_name_msg,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_delete_confirmation)&&jQuery(this).closest("form").attr("action","../../../"+rtmedia_media_slug+"/delete").submit():rtmedia_gallery_action_alert_message(rtmedia_no_media_selected,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-move-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_move_confirmation)&&jQuery(this).closest("form").attr("action","").submit():rtmedia_gallery_action_alert_message(rtmedia_no_media_selected,"warning")}),jQuery("#buddypress").on("change",".rtm-activity-privacy-opt",function(){var a=jQuery(this).attr("id");a=a.split("-"),a=a[a.length-1];var b=this;data={activity_id:a,privacy:jQuery(this).val(),nonce:jQuery("#rtmedia_activity_privacy_nonce").val(),action:"rtm_change_activity_privacy"},jQuery.post(ajaxurl,data,function(a){var c="",d="";"true"==a?(c=rtmedia_main_js_strings.privacy_update_success,d="success"):(c=rtmedia_main_js_strings.privacy_update_error,d="fail"),jQuery(b).after('<p class="rtm-ac-privacy-updated '+d+'">'+c+"</p>"),setTimeout(function(){jQuery(b).siblings(".rtm-ac-privacy-updated").remove()},2e3)})}),b(),rtMediaHook.register("rtmedia_js_popup_after_content_added",function(){b(),f(),mfp=jQuery.magnificPopup.instance,jQuery(mfp.items).size()>1&&0==comment_media?c():d(),e(),rtmedia_disable_popup_navigation_comment_media_focus();var g=a(window).height();jQuery(".rtm-lightbox-container .mejs-video").css({height:.8*g,"over-flow":"hidden"}),jQuery(".mfp-content .rtmedia-media").css({"max-height":.87*g,"over-flow":"hidden"}),rtmedia_init_action_dropdown(".rtm-lightbox-container .rtmedia-actions"),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").shorten({showChars:130});var h=a(".rtm-gallery-title"),i="";i=a.isEmptyObject(h)?a("#subnav.item-list-tabs li.selected ").html():h.html(),""!=i&&a(".rtm-ltb-gallery-title .ltb-title").html(i);var j=a("#subnav.item-list-tabs li.selected span").html();return a("li.total").html(j),!0});var g=jQuery("#drag-drop-area"),h=jQuery("#whats-new");g.html();jQuery("#rtmedia-upload-container").after("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&jQuery("#whats-new-textarea").append("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),jQuery(document).on("dragover",function(a){a.preventDefault(),a.target!=this&&(jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&h.addClass("rtm-drag-drop-active"),g.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show())}).on("dragleave",function(a){return a.preventDefault(),(0==a.originalEvent.pageX||0==a.originalEvent.pageY)&&("undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(h.removeClass("rtm-drag-drop-active"),h.removeAttr("style")),g.removeClass("rtm-drag-drop-active"),void jQuery("#rtm-drop-files-title").hide())}).on("drop",function(a){a.preventDefault(),jQuery(".bp-suggestions").focus(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(h.removeClass("rtm-drag-drop-active"),h.removeAttr("style")),g.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-album",function(a){a.preventDefault(),confirm(rtmedia_album_delete_confirmation)&&jQuery(this).closest("form").submit()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),rtmedia_init_action_dropdown(""),a(document).click(function(){a(".click-nav ul").is(":visible")&&a(".click-nav ul",this).hide()}),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").length>0&&a(".rtm-more").shorten({showChars:200}),"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&(rtm_masonry_container=jQuery(".rtmedia-container .rtmedia-list"),rtm_masonry_container.masonry({itemSelector:".rtmedia-list-item"}),setInterval(function(){jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())}),rtm_masonry_reload(rtm_masonry_container)},1e3),jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())})),jQuery(".rtm-uploader-tabs").length>0&&jQuery(".rtm-uploader-tabs li").click(function(a){jQuery(this).hasClass("active")||(jQuery(this).siblings().removeClass("active"),jQuery(this).parents(".rtm-uploader-tabs").siblings().hide(),class_name=jQuery(this).attr("class"),jQuery(this).parents(".rtm-uploader-tabs").siblings('[data-id="'+class_name+'"]').show(),jQuery(this).addClass("active"),"rtm-upload-tab"!=class_name?jQuery("div.moxie-shim").hide():jQuery("div.moxie-shim").show())}),jQuery(".rtmedia-container").on("click",".rtm-delete-media",function(a){a.preventDefault();var b="Are you sure you want to delete this media?";if("undefined"!=typeof rtmedia_media_delete_confirmation&&(b=rtmedia_media_delete_confirmation),confirm(b)){var c=jQuery(this).closest("li"),d=jQuery("#rtmedia_media_delete_nonce").val(),e={action:"delete_uploaded_media",nonce:d,media_id:c.attr("id")};jQuery.ajax({url:ajaxurl,type:"post",data:e,success:function(a){"1"==a?(rtmedia_gallery_action_alert_message(rtmedia_main_js_strings.file_delete_success,"success"),c.remove(),"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)):rtmedia_gallery_action_alert_message(rtmedia_file_not_deleted,"warning")}})}})}),function(a){a.fn.shorten=function(b){"use strict";var c={showChars:100,minHideChars:10,ellipsesText:"...",moreText:rtmedia_read_more,lessText:rtmedia__show_less,onLess:function(){},onMore:function(){},errMsg:null,force:!1};return b&&a.extend(c,b),!(a(this).data("jquery.shorten")&&!c.force)&&(a(this).data("jquery.shorten",!0),a(document).off("click",".morelink"),a(document).on({click:function(){var b=a(this);return b.hasClass("less")?(b.removeClass("less"),b.html(c.moreText),b.parent().prev().hide(0,function(){b.parent().prev().prev().show()}).hide(0,function(){c.onLess()})):(b.addClass("less"),b.html(c.lessText),b.parent().prev().show(0,function(){b.parent().prev().prev().hide()}).show(0,function(){c.onMore()})),!1}},".morelink"),this.each(function(){var b=a(this),d=b.html(),e=b.text().length;if(e>c.showChars+c.minHideChars){var f=d.substr(0,c.showChars);if(f.indexOf("<")>=0){for(var g=!1,h="",i=0,k=[],l=null,m=0,n=0;n<=c.showChars;m++)if("<"!=d[m]||g||(g=!0,l=d.substring(m+1,d.indexOf(">",m)),"/"==l[0]?l!="/"+k[0]?c.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":k.shift():"br"!=l.toLowerCase()&&k.unshift(l)),g&&">"==d[m]&&(g=!1),g)h+=d.charAt(m);else if(n++,i<=c.showChars)h+=d.charAt(m),i++;else if(k.length>0){for(j=0;j<k.length;j++)h+="</"+k[j]+">";break}f=a("<div/>").html(h+'<span class="ellip">'+c.ellipsesText+"</span>").html()}else f+=c.ellipsesText;var o='<div class="shortcontent">'+f+'</div><div class="allcontent">'+d+'</div><span><a href="javascript://nop/" class="morelink">'+c.moreText+"</a></span>";b.html(o),b.find(".allcontent").hide(),a(".shortcontent p:last",b).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)}; 
     5function apply_rtMagnificPopup(a){jQuery("document").ready(function(b){var c="";c="undefined"==typeof rtmedia_load_more?"Loading media":rtmedia_load_more,"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&(b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").length>0&&b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").addClass("no-popup"),rtMagnificPopup=jQuery(a).magnificPopup({delegate:"a:not(.no-popup, .mejs-time-slider, .mejs-volume-slider, .mejs-horizontal-volume-slider)",type:"ajax",tLoading:c+" #%curr%...",mainClass:"mfp-img-mobile",preload:[1,3],closeOnBgClick:!0,gallery:{enabled:!0,navigateByImgClick:!0,arrowMarkup:"",preload:[0,1]},image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.',titleSrc:function(a){return a.el.attr("title")+"<small>by Marsel Van Oosten</small>"}},callbacks:{ajaxContentAdded:function(){a=jQuery.magnificPopup.instance,1===jQuery(a.items).size()&&jQuery(".mfp-arrow").remove();var a=jQuery.magnificPopup.instance,c=a.currItem.el,d=c.parent();if(d.is("li")||(d=d.parent()),(d.is(":nth-last-child(2)")||d.is(":last-child"))&&d.find("a").hasClass("rtmedia-list-item-a")){d.next();"block"==jQuery("#rtMedia-galary-next").css("display")&&jQuery("#rtMedia-galary-next").click()}var e=a.items.length;if(a.index==e-1&&!d.is(":last-child"))return void c.click();var f={};"undefined"!=typeof _wpmejsSettings&&(f.pluginPath=_wpmejsSettings.pluginPath);var g=jQuery(".rtmedia-container .rtmedia-single-meta").height(),h=!1;"undefined"!=typeof a&&"undefined"!=typeof a.probablyMobile&&1==a.probablyMobile&&(h=!0),b(".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),h&&b(".mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").attr("muted",!1),b(".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({defaultVideoWidth:480,hideVolumeOnTouchDevices:!1,features:["playpause","progress","current","volume","fullscreen"],defaultVideoHeight:270,alwaysShowControls:h,enableAutosize:!0,clickToPlayPause:!0,videoHeight:-1,success:function(a,c){a.addEventListener("loadeddata",function(c){var d=b(a).height(),e=b(window).height(),f=jQuery("div.rtm-ltb-action-container").height(),f=f+50,h=g-f;d>e&&jQuery(".rtmedia-container #rtmedia-single-media-container .mejs-container").attr("style","height:"+h+"px !important; transition:0.2s")},!1),h&&a.hasClass("wp-video-shortcode")?jQuery("body").on("touchstart",".mejs-overlay-button",function(b){a.paused?a.play():a.pause()}):a.play()}}),b(".mfp-content .mejs-audio .mejs-controls").css("position","relative"),rtMediaHook.call("rtmedia_js_popup_after_content_added",[]),"undefined"!=typeof bp&&"undefined"!=typeof bp.mentions&&"undefined"!=typeof bp.mentions.users&&(b("#atwho-container #atwho-ground-comment_content").remove(),b("#comment_content").bp_mentions(bp.mentions.users)),rtmedia_reset_video_and_audio_for_popup(),apply_rtMagnificPopup(".rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container")},close:function(a){rtmedia_single_page_popup_close()},BeforeChange:function(a){}}})),jQuery(document).ajaxComplete(function(){jQuery("[id^=imgedit-leaving]").filter(function(){var a=jQuery(this).text();jQuery(this).text(a.replace("OK","Save"))})})})}function rtmedia_init_action_dropdown(a){var b,c;jQuery(a+" .click-nav > span,"+a+" .click-nav > div").toggleClass("no-js js"),jQuery(a+" .click-nav .js ul").hide(),jQuery(a+" .click-nav .clicker").click(function(a){b=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),c=jQuery(this).next("ul"),jQuery.each(b,function(a,b){jQuery(b).html()!=c.html()&&jQuery(b).hide()}),jQuery(c).toggle(),a.stopPropagation()})}function bp_media_create_element(a){return!1}function rtmedia_version_compare(a,b){if(typeof a+typeof b!="stringstring")return!1;for(var c=a.split("."),d=b.split("."),e=0,f=Math.max(c.length,d.length);e<f;e++){if(c[e]&&!d[e]&&parseInt(c[e])>0||parseInt(c[e])>parseInt(d[e]))return!0;if(d[e]&&!c[e]&&parseInt(d[e])>0||parseInt(c[e])<parseInt(d[e]))return!1}return!0}function rtm_is_element_exist(a){return jQuery(a).length>0}function rtm_masonry_reload(a){setTimeout(function(){a.masonry("reload")},250)}function rtmediaGetParameterByName(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null==c?"":decodeURIComponent(c[1].replace(/\+/g," "))}function rtmedia_single_media_alert_message(a,b){var c="rtmedia-success";"warning"==b&&(c="rtmedia-warning"),jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","0.2"),jQuery(".rtmedia-single-media .rtmedia-media").after("<div class='rtmedia-message-container'><span class='"+c+"'>"+a+" </span></div>"),setTimeout(function(){jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","1"),jQuery(".rtmedia-message-container").remove()},3e3),jQuery(".rtmedia-message-container").click(function(){jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","1"),jQuery(".rtmedia-message-container").remove()})}function rtmedia_gallery_action_alert_message(a,b){var c="rtmedia-success";"warning"==b&&(c="rtmedia-warning");var d='<div class="rtmedia-gallery-alert-container"> </div>';jQuery("body").append(d),jQuery(".rtmedia-gallery-alert-container").append("<div class='rtmedia-gallery-message-box'><span class='"+c+"'>"+a+" </span></div>"),setTimeout(function(){jQuery(".rtmedia-gallery-alert-container").remove()},3e3),jQuery(".rtmedia-gallery-message-box").click(function(){jQuery(".rtmedia-gallery-alert-container").remove()})}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=c.indexOf("MSIE 7.")!==-1,b.isIE8=c.indexOf("MSIE 8.")!==-1,b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=!!b.st[d]&&b.st[d].markup;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){if(c.target!==b.wrap[0]&&!a.contains(b.wrap[0],c.target))return b._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},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:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,e<200?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return!!b.currItem.hasSize&&b.currItem.img},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',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(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){if(e.indexOf(this.index)>-1)return this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:a<0?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',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 c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,!(!c||!c.enabled)&&(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){if(b.items.length>1)return b.next(),!1}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null}))},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}),"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.rtTab.options,b),d.rtTabs()},rtTabs:function(){var c=this,d=c.options.activeTab;c.$elem.find("li:nth-child("+d+")").addClass("active"),c.rtTabContent(activeTabContent="yes"),c.rtClick();var e="false"!==c.$elem.attr("data-hash");if(e===!0){var f=b.location.hash;f&&c.$elem.find("li").find('a[href="'+f+'"]').trigger("click"),a(b).on("hashchange",function(){var a=b.location.hash;c.$elem.find("li").find('a[href="'+a+'"]').trigger("click")})}},rtClick:function(){var c=this,d=c.$elem.find("li"),e=d.find("a");e.on("click",function(e){e.preventDefault(),d.removeClass("active"),c.rtTabContent(),a(this).parent().addClass("active");var f=a(this).attr("href");a(f).removeClass("hide");var g="false"!==c.$elem.attr("data-hash");if(g===!0){var h=a(b).scrollTop();location.hash=a(this).attr("href"),a(b).scrollTop(h)}"function"==typeof c.options.onComplete&&c.options.onComplete.apply(c.elem,arguments)})},rtTabContent:function(b){var c=this,d=c.$elem.find("li"),e=d.find("a");e.each(function(){var c=a(this),d=c.attr("href");"yes"===b?c.parent().hasClass("active")||a(d).addClass("hide"):a(d).addClass("hide")})}};a.fn.rtTab=function(b){return this.each(function(){var c=Object.create(e);c.init(b,this),a.data(this,"rtTab",c)})},a.fn.rtTab.options={activeTab:1,onComplete:null}}(jQuery,window,document);var rtMagnificPopup,rtm_masonry_container,comment_media=!1,rtMediaHook={hooks:[],is_break:!1,register:function(a,b){"undefined"==typeof rtMediaHook.hooks[a]&&(rtMediaHook.hooks[a]=[]),rtMediaHook.hooks[a].push(b)},call:function(a,arguments){if("undefined"!=typeof rtMediaHook.hooks[a])for(i=0;i<rtMediaHook.hooks[a].length;++i)if(1!=rtMediaHook.hooks[a][i](arguments))return rtMediaHook.is_break=!0,!1;return!0}};jQuery("document").ready(function(a){function b(){if(jQuery("#rtmedia-media-view-form").length>0){var a=jQuery("#rtmedia-media-view-form").attr("action");jQuery.post(a,{},function(a){})}}function c(){var a=jQuery.magnificPopup.instance;jQuery(".mfp-arrow-right").on("click",function(b){a.next()}),jQuery(".mfp-arrow-left").on("click",function(b){a.prev()}),jQuery(".mfp-content .rtmedia-media").swipe({swipeLeft:function(b,c,d,e,f){a.next()},swipeRight:function(b,c,d,e,f){a.prev()},threshold:0})}function d(){jQuery(".mfp-arrow-right").hide(),jQuery(".mfp-arrow-left").hide(),jQuery(document).unbind("keydown")}function e(){rtmedia_disable_popup_navigation("#comment_content")}function f(){jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()})}"undefined"!=typeof a.fn.rtTab&&a(".rtm-tabs").rtTab(),jQuery(".rtmedia-modal-link").length>0&&a(".rtmedia-modal-link").magnificPopup({type:"inline",midClick:!0,closeBtnInside:!0}),a("#rt_media_comment_form").submit(function(b){return""!=a.trim(a("#comment_content").val())||(0==jQuery("#rtmedia-single-media-container").length?rtmedia_gallery_action_alert_message(rtmedia_empty_comment_msg,"warning"):rtmedia_single_media_alert_message(rtmedia_empty_comment_msg,"warning"),!1)}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&apply_rtMagnificPopup(".rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container"),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(a){return!0}if("activity_get_older_updates"==b.data.action){var d=b.success;a.success=function(a){d(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}else if("get_single_activity_content"==b.data.action){var d=b.success;a.success=function(a){d(a),setTimeout(function(){apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),jQuery("ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode").mediaelementplayer({ 
     6defaultVideoWidth:480,defaultVideoHeight:270})},900)}}}),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(a){return!0}if("activity_get_older_updates"==b.data.action){var d=b.success;a.success=function(a){d(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),jQuery("ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > audio.wp-audio-shortcode, ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > video.wp-video-shortcode").mediaelementplayer({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(a){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(a){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(a){jQuery(".rtmedia-delete-container").slideUp(),jQuery(".rtmedia-move-container").slideToggle()}),jQuery("#rtmedia-create-album-modal").on("click","#rtmedia_create_new_album",function(b){if($albumname=jQuery("<span/>").text(jQuery.trim(jQuery("#rtmedia_album_name").val())).html(),$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 c={action:"rtmedia_create_album",name:$albumname,context:$context,context_id:$context_id,create_album_nonce:$create_album_nonce};""!==$privacy&&(c.privacy=$privacy),a("#rtmedia_create_new_album").attr("disabled","disabled");var d=a("#rtmedia_create_new_album").html();a("#rtmedia_create_new_album").prepend("<img src='"+rMedia_loading_file+"' />"),jQuery.post(rtmedia_ajax_url,c,function(b){if("undefined"!=typeof b.album){b=jQuery.trim(b.album);var c=!0;jQuery(".rtmedia-user-album-list").each(function(){if(jQuery(this).children("optgroup").each(function(){if(jQuery(this).attr("value")===$context)return c=!1,void jQuery(this).append('<option value="'+b+'">'+$albumname+"</option>")}),c){var a=$context.charAt(0).toUpperCase()+$context.slice(1)+" "+rtmedia_main_js_strings.rtmedia_albums,d='<optgroup value="'+$context+'" label="'+a+'"><option value="'+b+'">'+$albumname+"</option></optgroup>";jQuery(this).append(d)}}),jQuery('select.rtmedia-user-album-list option[value="'+b+'"]').prop("selected",!0),jQuery(".rtmedia-create-new-album-container").slideToggle(),jQuery("#rtmedia_album_name").val(""),jQuery("#rtmedia-create-album-modal").append("<div class='rtmedia-success rtmedia-create-album-alert'><b>"+$albumname+"</b>"+rtmedia_album_created_msg+"</div>"),setTimeout(function(){jQuery(".rtmedia-create-album-alert").remove()},4e3),setTimeout(function(){galleryObj.reloadView(),jQuery(".close-reveal-modal").click()},2e3)}else"undefined"!=typeof b.error?rtmedia_gallery_action_alert_message(b.error,"warning"):rtmedia_gallery_action_alert_message(rtmedia_something_wrong_msg,"warning");a("#rtmedia_create_new_album").removeAttr("disabled"),a("#rtmedia_create_new_album").html(d)})}else rtmedia_gallery_action_alert_message(rtmedia_empty_album_name_msg,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_delete_confirmation)&&jQuery(this).closest("form").attr("action","../../../"+rtmedia_media_slug+"/delete").submit():rtmedia_gallery_action_alert_message(rtmedia_no_media_selected,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-move-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_move_confirmation)&&jQuery(this).closest("form").attr("action","").submit():rtmedia_gallery_action_alert_message(rtmedia_no_media_selected,"warning")}),jQuery("#buddypress").on("change",".rtm-activity-privacy-opt",function(){var a=jQuery(this).attr("id");a=a.split("-"),a=a[a.length-1];var b=this;data={activity_id:a,privacy:jQuery(this).val(),nonce:jQuery("#rtmedia_activity_privacy_nonce").val(),action:"rtm_change_activity_privacy"},jQuery.post(ajaxurl,data,function(a){var c="",d="";"true"==a?(c=rtmedia_main_js_strings.privacy_update_success,d="success"):(c=rtmedia_main_js_strings.privacy_update_error,d="fail"),jQuery(b).after('<p class="rtm-ac-privacy-updated '+d+'">'+c+"</p>"),setTimeout(function(){jQuery(b).siblings(".rtm-ac-privacy-updated").remove()},2e3)})}),b(),rtMediaHook.register("rtmedia_js_popup_after_content_added",function(){b(),f(),mfp=jQuery.magnificPopup.instance,jQuery(mfp.items).size()>1&&0==comment_media?c():d(),e(),rtmedia_disable_popup_navigation_comment_media_focus();var g=a(window).height();jQuery(".rtm-lightbox-container .mejs-video").css({height:.8*g,"over-flow":"hidden"}),jQuery(".mfp-content .rtmedia-media").css({"max-height":.87*g,"over-flow":"hidden"}),rtmedia_init_action_dropdown(".rtm-lightbox-container .rtmedia-actions"),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").shorten({showChars:130});var h=a(".rtm-gallery-title"),i="";i=a.isEmptyObject(h)?a("#subnav.item-list-tabs li.selected ").html():h.html(),""!=i&&a(".rtm-ltb-gallery-title .ltb-title").html(i);var j=a("#subnav.item-list-tabs li.selected span").html();return a("li.total").html(j),!0});var g=jQuery("#drag-drop-area"),h=jQuery("#whats-new");g.html();jQuery("#rtmedia-upload-container").after("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&jQuery("#whats-new-textarea").append("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),jQuery(document).on("dragover",function(a){a.preventDefault(),a.target!=this&&(jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&h.addClass("rtm-drag-drop-active"),g.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show())}).on("dragleave",function(a){return a.preventDefault(),(0==a.originalEvent.pageX||0==a.originalEvent.pageY)&&("undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(h.removeClass("rtm-drag-drop-active"),h.removeAttr("style")),g.removeClass("rtm-drag-drop-active"),void jQuery("#rtm-drop-files-title").hide())}).on("drop",function(a){a.preventDefault(),jQuery(".bp-suggestions").focus(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(h.removeClass("rtm-drag-drop-active"),h.removeAttr("style")),g.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-album",function(a){a.preventDefault(),confirm(rtmedia_album_delete_confirmation)&&jQuery(this).closest("form").submit()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),rtmedia_init_action_dropdown(""),a(document).click(function(){a(".click-nav ul").is(":visible")&&a(".click-nav ul",this).hide()}),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").length>0&&a(".rtm-more").shorten({showChars:200}),"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&(rtm_masonry_container=jQuery(".rtmedia-container .rtmedia-list"),rtm_masonry_container.masonry({itemSelector:".rtmedia-list-item"}),setInterval(function(){jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())}),rtm_masonry_reload(rtm_masonry_container)},1e3),jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())})),jQuery(".rtm-uploader-tabs").length>0&&jQuery(".rtm-uploader-tabs li").click(function(a){jQuery(this).hasClass("active")||(jQuery(this).siblings().removeClass("active"),jQuery(this).parents(".rtm-uploader-tabs").siblings().hide(),class_name=jQuery(this).attr("class"),jQuery(this).parents(".rtm-uploader-tabs").siblings('[data-id="'+class_name+'"]').show(),jQuery(this).addClass("active"),"rtm-upload-tab"!=class_name?jQuery("div.moxie-shim").hide():jQuery("div.moxie-shim").show())}),jQuery(".rtmedia-container").on("click",".rtm-delete-media",function(a){a.preventDefault();var b="Are you sure you want to delete this media?";if("undefined"!=typeof rtmedia_media_delete_confirmation&&(b=rtmedia_media_delete_confirmation),confirm(b)){var c=jQuery(this).closest("li"),d=jQuery("#rtmedia_media_delete_nonce").val(),e={action:"delete_uploaded_media",nonce:d,media_id:c.attr("id")};jQuery.ajax({url:ajaxurl,type:"post",data:e,success:function(a){"1"==a?(rtmedia_gallery_action_alert_message(rtmedia_main_js_strings.file_delete_success,"success"),c.remove(),"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)):rtmedia_gallery_action_alert_message(rtmedia_file_not_deleted,"warning")}})}})}),function(a){a.fn.shorten=function(b){"use strict";var c={showChars:100,minHideChars:10,ellipsesText:"...",moreText:rtmedia_read_more,lessText:rtmedia__show_less,onLess:function(){},onMore:function(){},errMsg:null,force:!1};return b&&a.extend(c,b),!(a(this).data("jquery.shorten")&&!c.force)&&(a(this).data("jquery.shorten",!0),a(document).off("click",".morelink"),a(document).on({click:function(){var b=a(this);return b.hasClass("less")?(b.removeClass("less"),b.html(c.moreText),b.parent().prev().hide(0,function(){b.parent().prev().prev().show()}).hide(0,function(){c.onLess()})):(b.addClass("less"),b.html(c.lessText),b.parent().prev().show(0,function(){b.parent().prev().prev().hide()}).show(0,function(){c.onMore()})),!1}},".morelink"),this.each(function(){var b=a(this),d=b.html(),e=b.text().length;if(e>c.showChars+c.minHideChars){var f=d.substr(0,c.showChars);if(f.indexOf("<")>=0){for(var g=!1,h="",i=0,k=[],l=null,m=0,n=0;n<=c.showChars;m++)if("<"!=d[m]||g||(g=!0,l=d.substring(m+1,d.indexOf(">",m)),"/"==l[0]?l!="/"+k[0]?c.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":k.shift():"br"!=l.toLowerCase()&&k.unshift(l)),g&&">"==d[m]&&(g=!1),g)h+=d.charAt(m);else if(n++,i<=c.showChars)h+=d.charAt(m),i++;else if(k.length>0){for(j=0;j<k.length;j++)h+="</"+k[j]+">";break}f=a("<div/>").html(h+'<span class="ellip">'+c.ellipsesText+"</span>").html()}else f+=c.ellipsesText;var o='<div class="shortcontent">'+f+'</div><div class="allcontent">'+d+'</div><span><a href="javascript://nop/" class="morelink">'+c.moreText+"</a></span>";b.html(o),b.find(".allcontent").hide(),a(".shortcontent p:last",b).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)}; 
  • buddypress-media/trunk/app/helper/RTMediaSettings.php

    r1595586 r1601895  
    4545            $defaults = array( 
    4646                'general_enableAlbums'        => 1, 
     47                'general_enableAlbums_description'        => 0, 
    4748                'general_enableComments'      => 0, 
    4849                'general_enableLikes'         => 1, 
  • buddypress-media/trunk/app/main/RTMedia.php

    r1595586 r1601895  
    12101210 
    12111211        wp_localize_script( 'rtmedia-main', 'rtmedia_disable_media_in_commented_media_text', esc_html__( 'Adding media in Comments is not allowed', 'buddypress-media' ) ); 
    1212          
     1212 
    12131213        wp_localize_script( 'rtmedia-backbone', 'rtmedia_exteansions', $rtmedia_extns ); 
    12141214        wp_localize_script( 'rtmedia-backbone', 'rtMedia_update_plupload_comment', $params ); 
    12151215        wp_localize_script( 'rtmedia-backbone', 'rMedia_loading_file', admin_url( '/images/loading.gif' ) ); 
    1216  
    12171216 
    12181217    } 
  • buddypress-media/trunk/app/main/controllers/privacy/RTMediaPrivacy.php

    r1595586 r1601895  
    6767 
    6868            //todo strict standard error 
    69             self::select_privacy_ui( true, 'rtm-ac-privacy-' . $activities_template->activity->id, array( 'rtm-activity-privacy-opt' ), $selected ); 
     69            if ( isset( $activities_template->activity->privacy ) && $activities_template->activity->privacy != '80' ) { 
     70                self::select_privacy_ui( true, 'rtm-ac-privacy-' . $activities_template->activity->id, array( 'rtm-activity-privacy-opt' ), $selected ); 
     71            } 
    7072        } 
    7173    } 
     
    371373        $nonce           = filter_input( INPUT_POST, 'rtmedia_member_settings_privacy', FILTER_SANITIZE_STRING ); 
    372374 
    373         if ( NULL !== $default_privacy ) { 
     375        if ( null !== $default_privacy ) { 
    374376            $status = false; 
    375377            if ( wp_verify_nonce( $nonce, 'rtmedia_member_settings_privacy' ) ) { 
  • buddypress-media/trunk/app/main/controllers/shortcodes/RTMediaGalleryShortcode.php

    r1595586 r1601895  
    150150 
    151151            $attr = array( 'name' => 'gallery', 'attr' => $attr ); 
     152 
     153            $attr = apply_filters( 'rtmedia_gallery_shortcode_parameter_pre_filter', $attr ); 
     154 
    152155            global $post, $rtmedia_shortcode_attr; 
    153156            if ( isset( $attr ) && isset( $attr['attr'] ) ) { 
  • buddypress-media/trunk/app/main/controllers/template/RTMediaTemplate.php

    r1595586 r1601895  
    221221        if ( $rtmedia_query->media ) { 
    222222            foreach ( $rtmedia_query->media as $key => $media ) { 
     223                $media_class = 'hide'; 
     224                if( isset( $media->media_type ) && function_exists( 'rtmedia_hide_title_media_gallery' ) ) { 
     225                    $media_class = rtmedia_hide_title_media_gallery( $media->media_type ); 
     226                } 
    223227                $media_array[ $key ]               = $media; 
    224228                $media_array[ $key ]->media_count  = rtm_get_album_media_count( $media->id ); 
     
    226230                $media_array[ $key ]->rt_permalink = get_rtmedia_permalink( $media->id ); 
    227231                $media_array[ $key ]->duration     = rtmedia_duration( $media->id ); 
     232                $media_array[ $key ]->media_class  = $media_class; 
    228233                $media_array[ $key ]               = apply_filters( 'rtmedia_media_array_backbone', $media_array[ $key ] ); 
    229234            } 
  • buddypress-media/trunk/app/main/controllers/template/rtmedia-actions.php

    r1595586 r1601895  
    949949} 
    950950add_action( 'rtmedia_after_media', 'rtmedia_after_media_callback', 10 ); 
     951 
     952 
     953if ( ! function_exists( 'rtmedia_gallery_after_title_callback' ) ) { 
     954    function rtmedia_gallery_after_title_callback() { 
     955        // show description in album gallery page 
     956        global $rtmedia_query; 
     957        // check if it's an album gallery page and album id is not empty 
     958        if ( 
     959            isset( $rtmedia_query->query ) && isset( $rtmedia_query->query['media_type'] ) && 'album' == $rtmedia_query->query['media_type'] 
     960            && 
     961            isset( $rtmedia_query->media_query ) && isset( $rtmedia_query->media_query['album_id'] ) && ! empty( $rtmedia_query->media_query['album_id'] ) 
     962            && 
     963            function_exists( 'rtmedia_get_album_description_setting' ) && rtmedia_get_album_description_setting() 
     964        ) { 
     965            $description = rtmedia_get_media_description( $rtmedia_query->media_query['album_id'] ); 
     966            if ( ! empty( $description ) ) { 
     967                echo '<div class="gallery-description gallery-album-description">' . $description . '</div>'; 
     968            } 
     969        } 
     970    } 
     971} 
     972add_action( 'rtmedia_gallery_after_title', 'rtmedia_gallery_after_title_callback', 11, 1 ); 
  • buddypress-media/trunk/app/main/controllers/template/rtmedia-filters.php

    r1595586 r1601895  
    668668add_filter( 'rtmedia_like_html_you_and_more_like', 'rtmedia_like_html_you_and_more_like_callback', 10, 2 ); 
    669669 
    670 function rtmedia_comment_max_links_callback( $values, $option ) { 
     670function rtmedia_comment_max_links_callback( $values, $option = '' ) { 
    671671    $new_values = $values; 
    672672    if ( apply_filters( 'rtmedia_comment_max_links', true ) && 'comment_max_links' == $option ) { 
    673         $rtMedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); 
    674         if ( is_array( $rtMedia_attached_files ) && ! empty( $rtMedia_attached_files[0] ) ) { 
     673        $rtmedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); 
     674        if ( is_array( $rtmedia_attached_files ) && ! empty( $rtmedia_attached_files[0] ) ) { 
    675675            if ( $new_values < 5 ) { 
    676676                $new_values = 5; 
     
    693693} 
    694694add_filter( 'bp_activity_get_meta', 'rtmedia_bp_activity_get_meta_callback', 10, 4 ); 
     695 
     696 
     697// remove unwanted attr of sorting when rtmedia-sorting addon is not there 
     698if ( ! function_exists( 'rtmedia_gallery_shortcode_parameter_pre_filter_callback' ) ) { 
     699    function rtmedia_gallery_shortcode_parameter_pre_filter_callback( $attr ) { 
     700        $new_attr = $attr; 
     701        if ( ! class_exists( 'RTMediaSorting' ) && isset( $attr['attr'] ) && isset( $attr['attr']['sort_parameters'] ) ) { 
     702            unset( $new_attr['attr']['sort_parameters'] ); 
     703        } 
     704        return $new_attr; 
     705    } 
     706} 
     707add_filter( 'rtmedia_gallery_shortcode_parameter_pre_filter', 'rtmedia_gallery_shortcode_parameter_pre_filter_callback', 10, 1 ); 
     708 
  • buddypress-media/trunk/app/main/controllers/template/rtmedia-functions.php

    r1595586 r1601895  
    12491249            $class = 'hide'; 
    12501250            if ( 0 == $i ) { 
    1251                 echo '<div class="rtmedia-like-info"><span id="rtmedia_show_all_comment"> ' . esc_html( 'Show all ' . $count . ' comments', 'rtmedia' ) . ' </span></div>'; 
     1251                echo '<div class="rtmedia-like-info"><span id="rtmedia_show_all_comment"> ' . sprintf( esc_html__( 'Show all %s comments', 'buddypress-media' ), esc_html( $count ) ) . ' </span></div>'; 
    12521252            } 
    12531253        } 
     
    13611361 
    13621362    if ( isset( $rtmedia_query->action_query->media_type ) ) { 
    1363         $media_type_array = array( 'photo', 'music', 'video', 'album', 'playlist' ); 
     1363        $media_type_array = apply_filters( 'rtmedia_media_type_support', array( 'photo', 'music', 'video', 'album' ) ); 
    13641364 
    13651365        if ( in_array( $rtmedia_query->action_query->media_type, $media_type_array, true ) ) { 
     
    14141414            $post    = get_post( get_post_field( 'post_parent', $post_id ) ); 
    14151415 
    1416             $link .= $site_url . $post->post_name . '/'; 
     1416            if ( isset( $post->post_name ) ) { 
     1417                $link .= $site_url . $post->post_name . '/'; 
     1418            } else { 
     1419                $link .= $site_url; 
     1420            } 
    14171421        } 
    14181422    } 
     
    14251429 
    14261430    if ( isset( $rtmedia_query->action_query->media_type ) ) { 
    1427         $media_type_array = array( 'photo', 'music', 'video', 'album', 'playlist' ); 
     1431        $media_type_array = apply_filters( 'rtmedia_media_type_support', array( 'photo', 'music', 'video', 'album' ) ); 
    14281432 
    14291433        if ( in_array( $rtmedia_query->action_query->media_type, $media_type_array, true ) ) { 
     
    14481452function rtmedia_pagination_page_link( $page_no = '' ) { 
    14491453 
    1450     global $rtmedia_interaction, $rtmedia_query, $post; 
     1454    global $rtmedia_interaction, $rtmedia_query, $post, $rtmedia; 
    14511455 
    14521456    $wp_default_context = array( 'page', 'post' ); 
     
    14641468 
    14651469    if ( $rtmedia_interaction && isset( $rtmedia_interaction->context ) && 'profile' === $rtmedia_interaction->context->type ) { 
    1466         if ( function_exists( 'bp_core_get_user_domain' ) && ! empty( $rtmedia_query->media_query['context_id'] ) ) { 
    1467             $link .= trailingslashit( bp_core_get_user_domain( $rtmedia_query->media_query['context_id'] ) ); 
     1470        if ( function_exists( 'bp_core_get_user_domain' ) && ! empty( $rtmedia_query->query['context_id'] ) ) { 
     1471            $link .= trailingslashit( bp_core_get_user_domain( $rtmedia_query->query['context_id'] ) ); 
    14681472        } else { 
    14691473            if ( $is_shortcode_on_home ) { 
     
    15041508    } 
    15051509 
     1510    // For albums tab 
    15061511    if ( isset( $rtmedia_query->media_query['album_id'] ) && intval( $rtmedia_query->media_query['album_id'] ) > 0 ) { 
    15071512        $link .= $rtmedia_query->media_query['album_id'] . '/'; 
    15081513    } 
    15091514 
     1515    // For those pages of which es id is set into action query 
     1516    if ( isset( $rtmedia_query->action_query->id ) && intval( $rtmedia_query->action_query->id ) > 0 ) { 
     1517        $link .= $rtmedia_query->action_query->id . '/'; 
     1518    } 
     1519 
     1520    $allowed_types = array( 'album' ); 
     1521 
     1522    // get all allowed media type 
     1523    foreach ( $rtmedia->allowed_types as $type ) { 
     1524        $name = strtoupper( $type['name'] ); 
     1525        $allowed_types[] = constant( 'RTMEDIA_' . $name . '_SLUG' ); 
     1526    } 
     1527 
    15101528    if ( isset( $rtmedia_query->action_query->media_type ) ) { 
    1511         $media_type_array = array( 'photo', 'music', 'video', 'album', 'playlist' ); 
    1512  
    1513         if ( in_array( $rtmedia_query->action_query->media_type, $media_type_array, true ) ) { 
    1514             $link .= $rtmedia_query->action_query->media_type . '/'; 
    1515         } 
     1529 
     1530        /** 
     1531         * Filters media types. 
     1532         * 
     1533         * @param array Array of all media types. 
     1534         */ 
     1535        $media_type = apply_filters( 'rtmedia_media_type', $rtmedia_query->action_query->media_type ); 
     1536 
     1537        if ( isset( $media_type ) ) { 
     1538 
     1539            /** 
     1540             * Filters allowed media types. 
     1541             * 
     1542             * @param array Array of all allowed media types. 
     1543             */ 
     1544            $media_type_array = apply_filters( 'rtmedia_media_type_support', $allowed_types ); 
     1545            if ( in_array( $media_type, $media_type_array, true ) ) { 
     1546                $link .= $media_type . '/'; 
     1547            } 
     1548        } 
     1549 
    15161550    } 
    15171551 
     
    22462280    $global_option  = rtmedia_global_album_list( $selected_album_id ); 
    22472281    $global_albums  = rtmedia_global_albums(); 
     2282 
     2283    $user_id = apply_filters( 'rtmedia_album_by_user', get_current_user_id() ); 
    22482284    $album_objects  = $model->get_media( array( 
    2249         'media_author' => get_current_user_id(), 
     2285        'media_author' => $user_id, 
    22502286        'media_type'   => 'album', 
    22512287    ), false, 'context' ); 
     
    24882524    $privacy      = $privacymodel->select_privacy_ui( $echo = false ); 
    24892525 
    2490     if ( $privacy  && empty( $comment_media ) ) { 
    2491         return "<div class='rtmedia-edit-privacy rtm-field-wrap'><label for='privacy'>" . esc_html__( 'Privacy : ', 'buddypress-media' ) . '</label>' . $privacy . '</div>'; 
    2492     } 
    2493  
     2526    if ( isset( $rtmedia_query->media ) && is_array( $rtmedia_query->media ) && isset( $rtmedia_query->media['0'] ) ) { 
     2527        if ( isset( $rtmedia_query->media['0']->privacy ) && $rtmedia_query->media['0']->privacy != '80' ) { 
     2528            if ( $privacy  && empty( $comment_media ) ) { 
     2529                return "<div class='rtmedia-edit-privacy rtm-field-wrap'><label for='privacy'>" . esc_html__( 'Privacy : ', 'buddypress-media' ) . '</label>' . $privacy . '</div>'; 
     2530            } 
     2531        } 
     2532    } 
    24942533} 
    24952534 
     
    28252864 * @return      string  HTML 
    28262865 */ 
    2827 if( ! function_exists( 'rtmedia_who_like_html' ) ){ 
    2828     function rtmedia_who_like_html( $like_count, $user_like_it ){ 
     2866if ( ! function_exists( 'rtmedia_who_like_html' ) ) { 
     2867    function rtmedia_who_like_html( $like_count, $user_like_it ) { 
    28292868        $like_count = ( $like_count ) ? $like_count : false; 
    28302869        $user_like_it = ( $user_like_it ) ? true : false; 
    28312870        $like_count_new = $like_count; 
    2832         $html = ""; 
     2871        $html = ''; 
    28332872        if ( $like_count == 1 && $user_like_it ) { 
    28342873            /** 
     
    28392878             * @return html TEXT to  display 
    28402879            */ 
    2841             $html =  apply_filters( 'rtmedia_like_html_you_only_like', esc_html__( 'You like this', 'buddypress-media' ), $like_count, $user_like_it ); 
     2880            $html = apply_filters( 'rtmedia_like_html_you_only_like', esc_html__( 'You like this', 'buddypress-media' ), $like_count, $user_like_it ); 
    28422881        } elseif ( $like_count ) { 
    28432882            if ( $like_count > 1 && $user_like_it ) { 
     
    28492888                 * @return html TEXT to  display 
    28502889                */ 
    2851                 $html .=  apply_filters( 'rtmedia_like_html_you_and_more_like', esc_html__( 'You and ', 'buddypress-media' ), $like_count, $user_like_it ); 
     2890                $html .= apply_filters( 'rtmedia_like_html_you_and_more_like', esc_html__( 'You and ', 'buddypress-media' ), $like_count, $user_like_it ); 
    28522891                $like_count_new--; 
    28532892            } 
     
    28592898             * @return INT Count to  display 
    28602899            */ 
    2861             $html .=  apply_filters( 'rtmedia_like_html_you_and_more_like', $like_count, $user_like_it ); 
     2900            $html .= apply_filters( 'rtmedia_like_html_you_and_more_like', $like_count, $user_like_it ); 
    28622901 
    28632902            /** 
     
    28682907             * @return html TEXT to  display 
    28692908            */ 
    2870             $html .=  apply_filters( 'rtmedia_like_html_othe_likes_this', _n( ' person likes this', ' people like this', $like_count_new, 'buddypress-media' ) ,$like_count, $user_like_it ); 
     2909            $html .= apply_filters( 'rtmedia_like_html_othe_likes_this', _n( ' person likes this', ' people like this', $like_count_new, 'buddypress-media' ) ,$like_count, $user_like_it ); 
    28712910        } 
    28722911 
     
    28782917         * @return html TEXT to  display 
    28792918        */ 
    2880         $html =  apply_filters( 'rtmedia_who_like_html', $html ,$like_count, $user_like_it ); 
     2919        $html = apply_filters( 'rtmedia_who_like_html', $html ,$like_count, $user_like_it ); 
    28812920        return $html; 
    28822921    } 
     
    35863625        return false; 
    35873626    } 
    3588  
    35893627 
    35903628    $license    = $addon['args']['license_key']; 
     
    38303868    } 
    38313869} 
     3870 
     3871/** 
     3872 * check if the show desc in album gallery setting is set or not 
     3873 * @return boolean if the general is enable then return true or else false 
     3874 */ 
     3875if ( ! function_exists( 'rtmedia_get_album_description_setting' ) ) { 
     3876    function rtmedia_get_album_description_setting() { 
     3877        $return = false; 
     3878        global $rtmedia; 
     3879        if ( isset( $rtmedia->options ) && isset( $rtmedia->options['general_enableAlbums_description'] ) && 1 == intval( $rtmedia->options['general_enableAlbums_description'] ) ) { 
     3880            $return = true; 
     3881        } 
     3882        return $return; 
     3883    } 
     3884} 
     3885 
     3886 
     3887if ( ! function_exists( 'rtmedia_hide_title_media_gallery' ) ) { 
     3888    function rtmedia_hide_title_media_gallery( $media_type = false ) { 
     3889        $return = 'hide'; 
     3890        $media_type_allow = array(); 
     3891        $media_type_allow = apply_filters( 'rtmedia_show_title_media_gallery', $media_type_allow ); 
     3892        if ( ! is_array( $media_type_allow ) ) { 
     3893            $media_type_allow = array(); 
     3894        } 
     3895 
     3896        if ( is_array( $media_type_allow ) && ! empty( $media_type ) && in_array( $media_type, $media_type_allow ) ) { 
     3897            $return = 'show'; 
     3898        } 
     3899        return $return; 
     3900    } 
     3901} 
     3902 
     3903 
     3904/** 
     3905 * echo the title of the media 
     3906 * 
     3907 * @global      array       $rtmedia_backbone 
     3908 * 
     3909 * @return      string 
     3910 */ 
     3911if ( ! function_exists( 'rtmedia_show_title' ) ) { 
     3912    function rtmedia_show_title() { 
     3913 
     3914        global $rtmedia_backbone; 
     3915 
     3916        if ( $rtmedia_backbone['backbone'] ) { 
     3917            echo '<%= media_class %>'; 
     3918        } else { 
     3919            global $rtmedia_media; 
     3920            $media_class = 'hide'; 
     3921            if ( isset( $rtmedia_media->media_type ) && function_exists( 'rtmedia_hide_title_media_gallery' ) ) { 
     3922                $media_class = rtmedia_hide_title_media_gallery( $rtmedia_media->media_type ); 
     3923            } 
     3924            return $media_class; 
     3925        } 
     3926    } 
     3927} 
     3928 
  • buddypress-media/trunk/app/main/controllers/upload/RTMediaUploadView.php

    r1595586 r1601895  
    7676                $up_privacy = $up_privacy->select_privacy_ui( false, 'rtSelectPrivacy' ); 
    7777                if ( $up_privacy ) { 
    78                     $privacy = "<span> <label for='privacy'> <i class='dashicons dashicons-visibility rtmicon'></i>" . esc_html__( 'Privacy: ', 'buddypress-media' ) . '</label>' . $up_privacy . '</span>'; 
     78                    $privacy = "<span> <label for='privacy'> <i class='dashicons dashicons-visibility rtmicon'></i>" . esc_html__( 'Privacy:', 'buddypress-media' ) . '</label>' . $up_privacy . '</span>'; 
    7979                } 
    8080            } 
  • buddypress-media/trunk/index.php

    r1595586 r1601895  
    44  Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media 
    55  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! 
    6   Version: 4.3 
     6  Version: 4.3.1 
    77  Author: rtCamp 
    88  Text Domain: buddypress-media 
     
    2323     * 
    2424     */ 
    25     define( 'RTMEDIA_VERSION', '4.3' ); 
     25    define( 'RTMEDIA_VERSION', '4.3.1' ); 
    2626} 
    2727 
  • buddypress-media/trunk/languages/buddypress-media.po

    r1595586 r1601895  
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.3\n" 
     5"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.3.1\n" 
    66"Report-Msgid-Bugs-To: http://community.rtcamp.com/c/rtmedia/\n" 
    7 "POT-Creation-Date: 2017-02-14 08:13:37+00:00\n" 
     7"POT-Creation-Date: 2017-02-23 06:18:32+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Content-Type: text/plain; charset=utf-8\n" 
     
    140140#: app/admin/RTMediaAdmin.php:727 app/admin/RTMediaAdmin.php:783 
    141141#: app/admin/RTMediaAdmin.php:786 app/admin/RTMediaAdmin.php:949 
    142 #: app/admin/RTMediaAdmin.php:1312 app/helper/RTMediaSettings.php:246 
     142#: app/admin/RTMediaAdmin.php:1312 app/helper/RTMediaSettings.php:247 
    143143#: app/helper/RTMediaSupport.php:67 app/helper/RTMediaSupport.php:68 
    144144msgid "Support" 
     
    330330 
    331331#: app/admin/RTMediaAdmin.php:1428 
    332 #: app/main/controllers/privacy/RTMediaPrivacy.php:426 
     332#: app/main/controllers/privacy/RTMediaPrivacy.php:428 
    333333msgid "Privacy" 
    334334msgstr "" 
     
    402402#: app/admin/RTMediaAdmin.php:1576 app/admin/RTMediaAdmin.php:1594 
    403403#: app/admin/RTMediaAdmin.php:1612 app/admin/RTMediaFormHandler.php:446 
    404 #: app/admin/RTMediaFormHandler.php:457 app/helper/RTMediaSettings.php:322 
     404#: app/admin/RTMediaFormHandler.php:457 app/helper/RTMediaSettings.php:323 
    405405#: app/helper/RTMediaSupport.php:416 app/helper/RTMediaSupport.php:694 
    406406msgid "here" 
     
    473473 
    474474#: app/admin/RTMediaFormHandler.php:278 templates/media/album-gallery.php:67 
    475 #: templates/media/media-gallery.php:75 
     475#: templates/media/media-gallery.php:84 
    476476msgid "Load More" 
    477477msgstr "" 
     
    496496 
    497497#: app/admin/RTMediaFormHandler.php:306 
    498 msgid "You may want to disable like feature if you had enabled rating feature." 
     498msgid "Enabling this setting will add like feature for media." 
    499499msgstr "" 
    500500 
     
    666666msgstr "" 
    667667 
    668 #: app/admin/RTMediaFormHandler.php:568 app/helper/RTMediaSettings.php:344 
     668#: app/admin/RTMediaFormHandler.php:568 app/helper/RTMediaSettings.php:345 
    669669msgid "Media Type" 
    670670msgstr "" 
     
    803803 
    804804#: app/admin/RTMediaFormHandler.php:1021 
    805 msgid "Allow upload to Comment" 
    806 msgstr "" 
    807  
    808 #: app/admin/RTMediaFormHandler.php:1026 app/admin/RTMediaFormHandler.php:1036 
    809 msgid "Enable Media in Comment" 
    810 msgstr "" 
    811  
    812 #: app/admin/RTMediaFormHandler.php:1031 
    813 msgid "Disable upload to Comment Media" 
     805msgid "Enable media in comment" 
     806msgstr "" 
     807 
     808#: app/admin/RTMediaFormHandler.php:1026 
     809msgid "" 
     810"This will allow users to upload media in comment section for originally " 
     811"uploaded media up to 1 level." 
     812msgstr "" 
     813 
     814#: app/admin/RTMediaFormHandler.php:1031 app/admin/RTMediaFormHandler.php:1036 
     815msgid "Disable upload in comment media" 
    814816msgstr "" 
    815817 
     
    862864msgstr "" 
    863865 
     866#: app/admin/RTMediaFormHandler.php:1098 
     867msgid "Show album description" 
     868msgstr "" 
     869 
     870#: app/admin/RTMediaFormHandler.php:1104 
     871msgid "This will show description of an album under album gallery page." 
     872msgstr "" 
     873 
    864874#: app/admin/templates/tmpl-rtm-album-favourites-importer.php:4 
    865875msgid "User's Favorites:" 
     
    13791389msgstr "" 
    13801390 
    1381 #: app/helper/RTMediaSettings.php:241 
     1391#: app/helper/RTMediaSettings.php:242 
    13821392msgid "BuddyPress Media Addons for Photos" 
    13831393msgstr "" 
    13841394 
    1385 #: app/helper/RTMediaSettings.php:251 
     1395#: app/helper/RTMediaSettings.php:252 
    13861396msgid "rtMedia Themes" 
    13871397msgstr "" 
    13881398 
    1389 #: app/helper/RTMediaSettings.php:321 
     1399#: app/helper/RTMediaSettings.php:322 
    13901400msgid "" 
    13911401"Currently your network allows uploading of the following file types. You " 
     
    13931403msgstr "" 
    13941404 
    1395 #: app/helper/RTMediaSettings.php:342 app/helper/RTMediaSettings.php:344 
     1405#: app/helper/RTMediaSettings.php:343 app/helper/RTMediaSettings.php:345 
    13961406msgid "Atleast one Media Type Must be selected" 
    13971407msgstr "" 
    13981408 
    1399 #: app/helper/RTMediaSettings.php:353 app/helper/RTMediaSettings.php:355 
     1409#: app/helper/RTMediaSettings.php:354 app/helper/RTMediaSettings.php:356 
    14001410msgid "\"Number of media\" count value should be numeric and greater than 0." 
    14011411msgstr "" 
    14021412 
    1403 #: app/helper/RTMediaSettings.php:355 
     1413#: app/helper/RTMediaSettings.php:356 
    14041414msgid "Default Count" 
    14051415msgstr "" 
    14061416 
    1407 #: app/helper/RTMediaSettings.php:360 
     1417#: app/helper/RTMediaSettings.php:361 
    14081418msgid "Settings saved." 
    14091419msgstr "" 
    14101420 
    1411 #: app/helper/RTMediaSettings.php:384 
     1421#: app/helper/RTMediaSettings.php:385 
    14121422msgid "If you make changes to width, height or crop settings, you must use " 
    14131423msgstr "" 
    14141424 
    1415 #: app/helper/RTMediaSettings.php:385 
     1425#: app/helper/RTMediaSettings.php:386 
    14161426msgid "Regenerate Thumbnail Plugin" 
    14171427msgstr "" 
    14181428 
    1419 #: app/helper/RTMediaSettings.php:386 
     1429#: app/helper/RTMediaSettings.php:387 
    14201430msgid " to regenerate old images." 
    14211431msgstr "" 
    14221432 
    1423 #: app/helper/RTMediaSettings.php:409 
     1433#: app/helper/RTMediaSettings.php:410 
    14241434msgid "BuddyPress Media 2.6 requires a database upgrade. " 
    14251435msgstr "" 
    14261436 
    1427 #: app/helper/RTMediaSettings.php:410 
     1437#: app/helper/RTMediaSettings.php:411 
    14281438msgid "Update Database" 
    14291439msgstr "" 
    14301440 
    1431 #: app/helper/RTMediaSettings.php:424 
     1441#: app/helper/RTMediaSettings.php:425 
    14321442msgid "" 
    14331443"If your site has some issues due to rtMedia and you want one on one support " 
     
    14351445msgstr "" 
    14361446 
    1437 #: app/helper/RTMediaSettings.php:425 
     1447#: app/helper/RTMediaSettings.php:426 
    14381448msgid "rtMedia Support Forum" 
    14391449msgstr "" 
    14401450 
    1441 #: app/helper/RTMediaSettings.php:427 
     1451#: app/helper/RTMediaSettings.php:428 
    14421452msgid "" 
    14431453"If you have any suggestions, enhancements or bug reports, then you can open " 
     
    14451455msgstr "" 
    14461456 
    1447 #: app/helper/RTMediaSettings.php:428 app/helper/RTMediaSupport.php:467 
     1457#: app/helper/RTMediaSettings.php:429 app/helper/RTMediaSupport.php:467 
    14481458msgid "GitHub" 
    14491459msgstr "" 
     
    22622272#: app/main/controllers/media/RTMediaGalleryItemAction.php:67 
    22632273#: app/main/controllers/media/RTMediaGalleryItemAction.php:80 
    2264 #: app/main/controllers/template/rtmedia-functions.php:2013 
    2265 #: app/main/controllers/template/rtmedia-functions.php:2022 
     2274#: app/main/controllers/template/rtmedia-functions.php:2047 
     2275#: app/main/controllers/template/rtmedia-functions.php:2056 
    22662276#: templates/media/album-single-edit.php:78 
    22672277msgid "Delete" 
     
    23512361#: app/main/controllers/media/RTMediaComment.php:172 
    23522362#: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:100 
    2353 #: app/main/controllers/template/rtmedia-functions.php:2052 
     2363#: app/main/controllers/template/rtmedia-functions.php:2086 
    23542364msgid "You are not allowed to upload/attach media." 
    23552365msgstr "" 
     
    26312641 
    26322642#: app/main/controllers/group/RTMediaGroupExtension.php:130 
    2633 #: app/main/controllers/privacy/RTMediaPrivacy.php:418 
     2643#: app/main/controllers/privacy/RTMediaPrivacy.php:420 
    26342644#: templates/media/album-single-edit.php:55 
    26352645msgid "Save Changes" 
     
    27862796msgstr "" 
    27872797 
    2788 #: app/main/controllers/privacy/RTMediaPrivacy.php:380 
     2798#: app/main/controllers/privacy/RTMediaPrivacy.php:382 
    27892799msgid "No changes were made to your account." 
    27902800msgstr "" 
    27912801 
    2792 #: app/main/controllers/privacy/RTMediaPrivacy.php:383 
     2802#: app/main/controllers/privacy/RTMediaPrivacy.php:385 
    27932803msgid "Your default privacy settings saved successfully." 
    27942804msgstr "" 
    27952805 
    2796 #: app/main/controllers/privacy/RTMediaPrivacy.php:407 
     2806#: app/main/controllers/privacy/RTMediaPrivacy.php:409 
    27972807msgid "Default Privacy" 
    27982808msgstr "" 
    27992809 
    2800 #: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:253 
     2810#: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:256 
    28012811msgid "You do not have sufficient privileges to view this gallery" 
    28022812msgstr "" 
     
    28232833msgstr "" 
    28242834 
    2825 #: app/main/controllers/template/RTMediaTemplate.php:370 
    2826 #: app/main/controllers/template/RTMediaTemplate.php:463 
    2827 #: app/main/controllers/template/RTMediaTemplate.php:561 
    2828 #: app/main/controllers/template/RTMediaTemplate.php:762 
     2835#: app/main/controllers/template/RTMediaTemplate.php:375 
     2836#: app/main/controllers/template/RTMediaTemplate.php:468 
     2837#: app/main/controllers/template/RTMediaTemplate.php:566 
     2838#: app/main/controllers/template/RTMediaTemplate.php:767 
    28292839msgid "Ooops !!! Invalid access. No nonce was found !!" 
    28302840msgstr "" 
    28312841 
    2832 #: app/main/controllers/template/RTMediaTemplate.php:377 
     2842#: app/main/controllers/template/RTMediaTemplate.php:382 
    28332843msgid "Media updated Sucessfully" 
    28342844msgstr "" 
    28352845 
    2836 #: app/main/controllers/template/RTMediaTemplate.php:383 
     2846#: app/main/controllers/template/RTMediaTemplate.php:388 
    28372847msgid "Error in updating Media" 
    28382848msgstr "" 
     
    29332943 
    29342944#: app/main/controllers/template/rtmedia-ajax-actions.php:88 
    2935 #: app/main/controllers/template/rtmedia-functions.php:1952 
     2945#: app/main/controllers/template/rtmedia-functions.php:1986 
    29362946msgid "Comment" 
    29372947msgstr "" 
     
    29532963msgstr "" 
    29542964 
     2965#: app/main/controllers/template/rtmedia-functions.php:1251 
     2966msgid "Show all %s comments" 
     2967msgstr "" 
     2968 
    29552969#: app/main/controllers/template/rtmedia-functions.php:1284 
    29562970msgid "Delete Comment" 
    29572971msgstr "" 
    29582972 
    2959 #: app/main/controllers/template/rtmedia-functions.php:1584 
     2973#: app/main/controllers/template/rtmedia-functions.php:1618 
    29602974msgid "Go to page no : " 
    29612975msgstr "" 
    29622976 
    2963 #: app/main/controllers/template/rtmedia-functions.php:1589 
     2977#: app/main/controllers/template/rtmedia-functions.php:1623 
    29642978msgid "Go" 
    29652979msgstr "" 
    29662980 
    2967 #: app/main/controllers/template/rtmedia-functions.php:1950 
     2981#: app/main/controllers/template/rtmedia-functions.php:1984 
    29682982msgid "Type Comment..." 
    29692983msgstr "" 
    29702984 
    2971 #: app/main/controllers/template/rtmedia-functions.php:2013 
    2972 #: app/main/controllers/template/rtmedia-functions.php:2022 
     2985#: app/main/controllers/template/rtmedia-functions.php:2047 
     2986#: app/main/controllers/template/rtmedia-functions.php:2056 
    29732987msgid "Delete Media" 
    29742988msgstr "" 
    29752989 
    2976 #: app/main/controllers/template/rtmedia-functions.php:2268 
     2990#: app/main/controllers/template/rtmedia-functions.php:2304 
    29772991msgid "Profile Albums" 
    29782992msgstr "" 
    29792993 
    2980 #: app/main/controllers/template/rtmedia-functions.php:2272 
    2981 #: app/main/controllers/template/rtmedia-functions.php:2317 
     2994#: app/main/controllers/template/rtmedia-functions.php:2308 
     2995#: app/main/controllers/template/rtmedia-functions.php:2353 
    29822996msgid "Group Albums" 
    29832997msgstr "" 
    29842998 
    2985 #: app/main/controllers/template/rtmedia-functions.php:2491 
     2999#: app/main/controllers/template/rtmedia-functions.php:2529 
    29863000msgid "Privacy : " 
    29873001msgstr "" 
    29883002 
    2989 #: app/main/controllers/template/rtmedia-functions.php:2841 
     3003#: app/main/controllers/template/rtmedia-functions.php:2880 
    29903004msgid "You like this" 
    29913005msgstr "" 
    29923006 
    2993 #: app/main/controllers/template/rtmedia-functions.php:2851 
     3007#: app/main/controllers/template/rtmedia-functions.php:2890 
    29943008msgid "You and " 
    29953009msgstr "" 
    29963010 
    2997 #: app/main/controllers/template/rtmedia-functions.php:2870 
     3011#: app/main/controllers/template/rtmedia-functions.php:2909 
    29983012msgid " person likes this" 
    29993013msgid_plural " people like this" 
     
    30013015msgstr[1] "" 
    30023016 
    3003 #: app/main/controllers/template/rtmedia-functions.php:2975 
     3017#: app/main/controllers/template/rtmedia-functions.php:3014 
    30043018msgid "Public" 
    30053019msgstr "" 
    30063020 
    3007 #: app/main/controllers/template/rtmedia-functions.php:2980 
     3021#: app/main/controllers/template/rtmedia-functions.php:3019 
    30083022msgid "All members" 
    30093023msgstr "" 
    30103024 
    3011 #: app/main/controllers/template/rtmedia-functions.php:2985 
     3025#: app/main/controllers/template/rtmedia-functions.php:3024 
    30123026msgid "Your friends" 
    30133027msgstr "" 
    30143028 
    3015 #: app/main/controllers/template/rtmedia-functions.php:2990 
     3029#: app/main/controllers/template/rtmedia-functions.php:3029 
    30163030msgid "Only you" 
    30173031msgstr "" 
    30183032 
    3019 #: app/main/controllers/template/rtmedia-functions.php:2995 
     3033#: app/main/controllers/template/rtmedia-functions.php:3034 
    30203034msgid "Blocked temporarily" 
    30213035msgstr "" 
    30223036 
    3023 #: app/main/controllers/template/rtmedia-functions.php:3048 
     3037#: app/main/controllers/template/rtmedia-functions.php:3087 
    30243038msgid "%s ago " 
    30253039msgstr "" 
    30263040 
    3027 #: app/main/controllers/template/rtmedia-functions.php:3062 
     3041#: app/main/controllers/template/rtmedia-functions.php:3101 
    30283042msgid "1 second" 
    30293043msgid_plural "%s seconds" 
     
    30313045msgstr[1] "" 
    30323046 
    3033 #: app/main/controllers/template/rtmedia-functions.php:3066 
     3047#: app/main/controllers/template/rtmedia-functions.php:3105 
    30343048msgid "1 minute" 
    30353049msgid_plural "%s minutes" 
     
    30373051msgstr[1] "" 
    30383052 
    3039 #: app/main/controllers/template/rtmedia-functions.php:3070 
     3053#: app/main/controllers/template/rtmedia-functions.php:3109 
    30403054msgid "1 hour" 
    30413055msgid_plural "%s hours" 
     
    30433057msgstr[1] "" 
    30443058 
    3045 #: app/main/controllers/template/rtmedia-functions.php:3671 
     3059#: app/main/controllers/template/rtmedia-functions.php:3709 
    30463060#. translators: date format, see http:php.net/date 
    30473061msgid "View Conversation" 
     
    30493063 
    30503064#: app/main/controllers/upload/RTMediaUploadView.php:78 
    3051 msgid "Privacy: " 
     3065msgid "Privacy:" 
    30523066msgstr "" 
    30533067 
     
    31323146msgstr "" 
    31333147 
     3148#: templates/media/album-gallery.php:75 
     3149#: templates/media/media-single-edit.php:63 
     3150#: templates/media/media-single.php:165 
     3151msgid "Sorry !! There's no media found for the request !!" 
     3152msgstr "" 
     3153 
    31343154#: templates/media/album-single-edit.php:14 
    31353155msgid "Edit Album : " 
     
    31873207msgstr "" 
    31883208 
    3189 #: templates/media/media-gallery.php:16 templates/media/media-gallery.php:32 
     3209#: templates/media/media-gallery.php:17 templates/media/media-gallery.php:37 
    31903210msgid "Media Gallery" 
     3211msgstr "" 
     3212 
     3213#: templates/media/media-gallery.php:92 
     3214msgid "Oops !! There's no media found for the request !!" 
    31913215msgstr "" 
    31923216 
  • buddypress-media/trunk/readme.txt

    r1595586 r1601895  
    77Requires at least: WordPress 4.1 
    88Tested up to: 4.7.2 
    9 Stable tag: 4.3 
     9Stable tag: 4.3.1 
    1010 
    1111Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices. 
     
    138138== Changelog == 
    139139 
     140= 4.3.1 [Feb 23, 2017] = 
     141 
     142* ENHANCEMENTS 
     143 
     144 * Remove media titles from media tab 
     145 * Change text in rtMedia setting for comment media 
     146 * Added: Filter to change user id while fetching user's album list 
     147 
     148* FIXED 
     149 
     150 * Pagination and navigation fix in media tab 
     151 * Warnings when uploading media in activity comment 
     152 * Privacy for reported media in moderation 
     153 
    140154= 4.3 [Feb 14, 2017] = 
    141155 
     
    13201334== Upgrade Notice == 
    13211335 
    1322 = 4.3 = 
    1323 Now upload media in comment & fixed rtMedia shortcode pagination along with several other bugs. Please update/re-save the permalinks after the plugin update. 
     1336= 4.3.1 = 
     1337Remove media title & fixed pagination in media tab along with several other bugs fixed. Please update/re-save the permalinks after the plugin update. 
    13241338 
    13251339== Sponsors == 
  • buddypress-media/trunk/templates/media/album-gallery.php

    r1595586 r1601895  
    7373        <p class="rtmedia-no-media-found"> 
    7474            <?php 
    75             esc_html_e( apply_filters( 'rtmedia_no_media_found_message_filter', 'Sorry !! There\'s no media found for the request !!' ), 'buddypress-media' ); 
     75            apply_filters( 'rtmedia_no_media_found_message_filter', esc_html_e( 'Sorry !! There\'s no media found for the request !!', 'buddypress-media' ) ); 
    7676            ?> 
    7777        </p> 
  • buddypress-media/trunk/templates/media/media-gallery-item.php

    r1440068 r1601895  
    3636 
    3737        <?php if ( apply_filters( 'rtmedia_media_gallery_show_media_title', true ) ) { ?> 
    38             <div class="rtmedia-item-title"> 
     38            <div class="rtmedia-item-title <?php echo esc_html( rtmedia_show_title() ); ?>" > 
    3939                <h4 title="<?php echo esc_attr( rtmedia_title() ); ?>"> 
    4040                    <?php echo esc_html( rtmedia_title() ); ?> 
  • buddypress-media/trunk/templates/media/media-gallery.php

    r1595586 r1601895  
    1414        ?> 
    1515        <div id="rtm-gallery-title-container" class="clearfix"> 
    16             <h2 class="rtm-gallery-title"><?php esc_html_e( 'Media Gallery', 'buddypress-media' ); ?></h2> 
     16            <h2 class="rtm-gallery-title"> 
     17                <?php esc_html_e( 'Media Gallery', 'buddypress-media' ); ?> 
     18            </h2> 
     19 
     20            <?php do_action( 'rtmedia_gallery_after_title' ); ?> 
     21 
    1722            <div id="rtm-media-options" class="rtm-media-options"> 
    1823                <?php do_action( 'rtmedia_media_gallery_shortcode_actions' ); ?> 
     
    2025        </div> 
    2126 
    22         <?php do_action( 'rtmedia_gallery_after_title' ); ?> 
     27        <?php do_action( 'rtmedia_gallery_after_title_container' ); ?> 
    2328 
    2429    <?php } else { 
     
    3439                ?> 
    3540            </h2> 
    36             <div id="rtm-media-options" 
    37                  class="rtm-media-options"><?php do_action( 'rtmedia_media_gallery_actions' ); ?></div> 
     41 
     42            <?php do_action( 'rtmedia_gallery_after_title' ); ?> 
     43 
     44            <div id="rtm-media-options" class="rtm-media-options"> 
     45                <?php do_action( 'rtmedia_media_gallery_actions' ); ?> 
     46            </div> 
    3847        </div> 
    3948 
    40         <?php do_action( 'rtmedia_gallery_after_title' ); ?> 
     49        <?php do_action( 'rtmedia_gallery_after_title_container' ); ?> 
    4150 
    4251        <div id="rtm-media-gallery-uploader" class="rtm-media-gallery-uploader"> 
     
    8190        <p class="rtmedia-no-media-found"> 
    8291            <?php 
    83             esc_html_e( apply_filters( 'rtmedia_no_media_found_message_filter', 'Oops !! There\'s no media found for the request !!' ), 'buddypress-media' ); 
     92            apply_filters( 'rtmedia_no_media_found_message_filter', esc_html_e( 'Oops !! There\'s no media found for the request !!','buddypress-media' ) ); 
    8493            ?> 
    8594        </p> 
    86     <?php } ?> 
     95    <?php } // End if(). 
     96    ?> 
    8797 
    8898    <?php do_action( 'rtmedia_after_media_gallery' ); ?> 
  • buddypress-media/trunk/templates/media/media-single-edit.php

    r1440068 r1601895  
    6161        <p class="rtmedia-no-media-found"> 
    6262            <?php 
    63             esc_html_e( apply_filters( 'rtmedia_no_media_found_message_filter', 'Sorry !! There\'s no media found for the request !!' ), 'buddypress-media' ); 
     63            apply_filters( 'rtmedia_no_media_found_message_filter', esc_html_e( 'Sorry !! There\'s no media found for the request !!','buddypress-media'  ) ); 
    6464            ?> 
    6565        </p> 
    6666        <?php 
    67     endif; 
     67    endif; // End if(). 
    6868    ?> 
    6969</div> 
  • buddypress-media/trunk/templates/media/media-single.php

    r1595586 r1601895  
    163163        <?php else : ?> 
    164164            <p class="rtmedia-no-media-found"><?php 
    165                 esc_html_e( apply_filters( 'rtmedia_no_media_found_message_filter', 'Sorry !! There\'s no media found for the request !!' ), 'buddypress-media' ); 
     165                apply_filters( 'rtmedia_no_media_found_message_filter', esc_html_e( 'Sorry !! There\'s no media found for the request !!','buddypress-media' ) ); 
    166166                ?> 
    167167            </p> 
Note: See TracChangeset for help on using the changeset viewer.