rtMedia for WordPress, BuddyPress and bbPress - Version 3.10.4

Version Description

Requires BuddyPress 1.7 or higher, if using BuddyPress. Fixed browser title if theme has title-tag support, Fixed the video & audio player issue for activity load more, Fixed minor bugs

=

Download this release

Release Info

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

Code changes from version 3.10.3 to 3.10.4

Gruntfile.js CHANGED
@@ -118,7 +118,8 @@ module.exports = function ( grunt ) {
118
'*.php',
119
'**/*.php',
120
'!node_modules/**',
121
- '!tests/**'
122
], //all php
123
expand: true
124
} ]
118
'*.php',
119
'**/*.php',
120
'!node_modules/**',
121
+ '!tests/**',
122
+ '!lib/freemius/**'
123
], //all php
124
expand: true
125
} ]
app/assets/admin/js/admin.min.js CHANGED
@@ -2,4 +2,4 @@
2
* rtMedia JavaScript Library
3
* @package rtMedia
4
*/
5
- function rtmedia_addon_do_not_show(){var a={action:"rtmedia_addon_popup_not_show_again"};jQuery.post(rtmedia_admin_ajax,a,function(a){jQuery("#TB_window").remove(),jQuery("#TB_overlay").remove()})}"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")?!1:!0;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")?!1:!0;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),jQuery(document).ready(function(a){a(".rtm-tabs").rtTab(),a('input[name^="rtmedia-options"]').on("change",function(){a(".rtm-save-settings-msg").remove(),0===a(".rtm-fly-warning").length&&(a(".rtm-button-container.top").prepend('<div class="rtm-warning rtm-fly-warning hide">Settings have changed, you should save them!</div>'),a(".rtm-fly-warning").slideDown())}),a(".rtm-img-size-setting .form-table tr:nth-child(7) td:last-child").attr("colspan","3"),a(".rtm-field-wrap .switch input[type=checkbox]").each(function(){var b=a(this);b.parents("table").attr("data-depends")||(b.is(":checked")?(b.parents("table").next(".rtm-notice").slideDown(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideDown()})):(b.parents("table").next(".rtm-notice").slideUp(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideUp()}))),b.parents("tr").next("tr").attr("data-depends")&&(b.is(":checked")?b.parents("tr").next("tr").slideDown():b.parents("tr").next("tr").slideUp())}),a(".rtm-field-wrap .switch input[type=checkbox]").on("change",function(){var b=a(this);b.parents("table").attr("data-depends")||(b.parents("table").next(".rtm-notice").slideToggle(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideToggle()})),b.parents("tr").next("tr").attr("data-depends")&&b.parents("tr").next("tr").slideToggle()});var b=Backbone.View.extend({el:a(".bp-media-admin"),events:{"click .rtm-theme":"render","click .rtm-close":"close","click .rtm-previous":"previousTheme","click .rtm-next":"nextTheme",keyup:"keyEvent"},initialize:function(){_.bindAll(this,"render","close","nextTheme","previousTheme","keyEvent"),this.keyEvent()},render:function(b){a(".rtm-theme").removeClass("rtm-modal-open");var c=a(b.currentTarget).addClass("rtm-modal-open").find(".rtm-theme-content").html();a(".rtm-theme-overlay")[0]?(a(".rtm-theme-overlay").show(),a(this.el).find(".rtm-theme-content-wrap").empty().append(c)):a(this.el).append('<div class="theme-overlay rtm-theme-overlay"><div class="theme-backdrop rtm-close"></div><div class="rtm-theme-content-wrap">'+c+"</div></div>"),a(b.currentTarget).is(":first-child")?a(".rtm-previous").addClass("disabled"):a(b.currentTarget).is(":last-child")?a(".rtm-next").addClass("disabled"):a(".rtm-next, .rtm-previous").removeClass("disabled")},close:function(){a(".rtm-theme").removeClass("rtm-modal-open"),a(".rtm-theme-overlay").hide(),a(".rtm-next, .rtm-previous").removeClass("disabled")},nextTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1},previousTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1},keyEvent:function(){a("body").on("keyup",function(b){return 39===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1):37===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1):void(27===b.keyCode&&a(".rtm-close").trigger("click"))})}});new b}),jQuery(document).ready(function(a){function b(a){return jQuery.post(ajaxurl,a,function(b){if(0!=b){var c=!1,d=Math.ceil((20*parseInt(b)+parseInt(a.values.finished))/parseInt(a.values.total)*100);d>100&&(d=100,c=!0),jQuery("#rtprogressbar>div").css("width",d+"%"),finished=jQuery("#rtprivacyinstaller span.finished").html(),jQuery("#rtprivacyinstaller span.finished").html(parseInt(finished)+a.count),c&&jQuery.post(ajaxurl,{action:"rtmedia_privacy_redirect"},function(a){window.location=settings_url})}else jQuery("#map_progress_msgs").html('<div class="map_mapping_failure">Row '+b+" failed.</div>")})}function c(a){return jQuery.getJSON(ajaxurl,a,function(b){if(favorites=!1,b){var c=Math.ceil((5*parseInt(b.page)+parseInt(a.values.finished))/parseInt(a.values.total)*100);comments_total=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.total").html(),users_total=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.total").html(),media_total=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.total").html(),comments_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(),users_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html();var f=Math.ceil((parseInt(b.comments)+parseInt(comments_finished))/parseInt(comments_total)*100),g=Math.ceil(parseInt(b.users)/parseInt(users_total)*100);(c>100||100==c)&&(c=100,favorites=!0),jQuery(".bp-album-media #rtprogressbar>div").css("width",c+"%"),jQuery(".bp-album-comments #rtprogressbar>div").css("width",f+"%"),jQuery(".bp-album-users #rtprogressbar>div").css("width",g+"%"),media_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(),parseInt(media_finished)<parseInt(media_total)&&jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(parseInt(media_finished)+a.count),jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(parseInt(b.comments)+parseInt(comments_finished)),jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html(parseInt(b.users)),favorites&&(favorite_data={action:"rtmedia_rt_album_import_favorites"},jQuery.post(ajaxurl,favorite_data,function(a){if(0!==a.favorites||"0"!==a.favorites){jQuery(".bp-album-favorites").length||jQuery(".bp-album-comments").after('<br /><div class="bp-album-favorites"><strong>User\'s Favorites: <span class="finished">0</span> / <span class="total">'+a.users+'</span></strong><div id="rtprogressbar"><div style="width:0%"></div></div></div>'),$favorites={},0!=a.offset||"0"!=a.offset?start=1*a.offset+1:start=1;for(var b=start;b<=a.users;b++)$count=1,b==a.users&&($count=parseInt(a.users%$count),0==$count&&($count=1)),newvals={action:"rtmedia_rt_album_import_step_favorites",offset:1*(b-1),redirect:b==a.users},$favorites[b]=newvals;var c=jQuery.Deferred();c.resolve(),jQuery.each($favorites,function(a,b){c=c.pipe(function(){return d(b)})})}else window.setTimeout(e,2e3)},"json"))}else jQuery("#map_progress_msgs").html('<div class="map_mapping_failure">Row '+b.page+" failed.</div>")})}function d(a){return jQuery.post(ajaxurl,a,function(a){redirect=!1,favorites_total=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.total").html(),favorites_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(),jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(parseInt(favorites_finished)+1);var b=Math.ceil(parseInt(favorites_finished+1)/parseInt(favorites_total)*100);(b>100||100==b)&&(b=100,redirect=!0),jQuery(".bp-album-favorites #rtprogressbar>div").css("width",b+"%"),redirect&&window.setTimeout(e,2e3)})}function e(){window.location=document.URL}a(".rtm-save-settings-msg").length>0&&setTimeout(function(){a(".rtm-save-settings-msg").remove()},1e4),jQuery("#spread-the-word").on("click","#bp-media-add-linkback",function(){var a={action:"rtmedia_linkback",linkback:jQuery("#bp-media-add-linkback:checked").length};jQuery.post(rtmedia_admin_ajax,a,function(a){})}),jQuery("#bp-media-settings-boxes").on("change","#select-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html('<div class="support_form_loader"></div>');var a={action:"rtmedia_select_request",form:jQuery(this).val()};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("click","#cancel-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html('<div class="support_form_loader"></div>');var a={action:"rtmedia_cancel_request"};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("submit","#bp_media_settings_form, .rtmedia-settings-submit",function(a){var b=!0,c=new RegExp("^[0-9]+quot;);jQuery("input[name*='defaultSizes']").each(function(a){return c.test(jQuery(this).val())?void 0:(alert("Invalid value for "+jQuery(this).attr("name").replace("rtmedia-options[defaultSizes_","").replace("]","").replace(/_/g," ").replace(/(\b)([a-zA-Z] )/g,function(a){return a.toUpperCase()})),b=!1,!1)});var d=jQuery('input[name^="rtmedia-options[general_videothumbs]"]');if(b&&d.length>0&&"undefined"!=typeof d){var e="",f=0;if(d.val()<=0?(e+="Number of video thumbnails to be generated should be greater than 0 in media sizes settings. Setting it to default value 2.",f=2):c.test(d.val())||(e+="Invalid value for Number of video thumbnails in media sizes settings. Setting it to round value "+Math.round(d.val())+".",f=Math.round(d.val())),""!=e)return alert(e),d.val(f),b=!1,!1}var g=jQuery('input[name^="rtmedia-options[general_jpeg_image_quality]"]');if(b&&g.length>0&&"undefined"!=typeof g){var e="",h=0;if(g.val()<=0?(e+="Number of percentage in JPEG image quality should be greater than 0 in media sizes settings. Setting it to default value 90.",h=90):g.val()>100?(e+="Number of percentage in JPEG image quality should be less than 100 in media sizes settings. Setting it to 100.",h=100):c.test(g.val())||(e+="Invalid value for percentage in JPEG image quality in media sizes settings. Setting it to round value "+Math.round(g.val())+".",h=Math.round(g.val())),""!=e)return alert(e),g.val(h),b=!1,!1}var i=jQuery('input[name^="rtmedia-options[general_perPageMedia]"]');if(b&&i.length>0&&"undefined"!=typeof i){var e="",j=0;if(i.val()<1?(e+="Please enter positive integer value only. Setting number of media per page value to default value 10.",j=10):jQuery.isNumeric(i.val())&&Math.floor(i.val())!=i.val()&&(e+="Please enter positive integer value only. Setting number of media per page value to round value "+Math.round(i.val())+".",j=Math.round(i.val())),""!=e)return alert(e),i.val(j),b=!1,!1}b||a.preventDefault()}),jQuery(document).on("click","#bpm-services .encoding-try-now,#rtm-services .encoding-try-now",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.are_you_sure)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_free_encoding_subscribe"};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),document.location.href=b+"&apikey="+a.apikey+c}else jQuery(".encoding-try-now").next().remove(),jQuery("#settings-error-encoding-error").remove(),jQuery("#bp-media-settings-boxes").before('<div class="error" id="settings-error-encoding-error"><p>'+a.error+"</p></div>")})}}),jQuery(document).on("click","#api-key-submit",function(a){a.preventDefault(),0==jQuery(this).next("img").length&&jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_enter_api_key",apikey:jQuery("#new-api-key").val()};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),-1==b.toString().indexOf("&apikey="+a.apikey)&&(b+="&apikey="+a.apikey),-1==b.toString().indexOf("&update=true")&&(b+="&update=true"),document.location.href=b+c}else jQuery("#settings-error-api-key-error").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-api-key-error"><p>'+a.error+"</p></div>");jQuery("#api-key-submit").next("img").remove()})}),jQuery(document).on("click","#disable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.disable_encoding)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_disable_encoding"};jQuery.post(ajaxurl,b,function(a){a?(jQuery(".settings-error-encoding-disabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0?jQuery("#settings-encoding-successfully-updated p").html(a):jQuery("h2:first").after('<div class="updated" id="settings-encoding-successfully-updated"><p>'+a+"</p></div>"),jQuery("#rtmedia-encoding-usage").hide(),jQuery("#disable-encoding").next("img").remove(),jQuery("#disable-encoding").hide(),jQuery("#enable-encoding").show()):(jQuery("#settings-error-encoding-disabled").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-encoding-disabled"><p>'+rtmedia_admin_strings.something_went_wrong+"</p></div>"))})}}),jQuery(document).on("click","#enable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.enable_encoding)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_enable_encoding"};jQuery.post(ajaxurl,b,function(a){a?(jQuery(".settings-error-encoding-enabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0?jQuery("#settings-encoding-successfully-updated p").html(a):jQuery("h2:first").after('<div class="updated" id="settings-encoding-successfully-updated"><p>'+a+"</p></div>"),jQuery("#enable-encoding").next("img").remove(),jQuery("#enable-encoding").hide(),jQuery("#disable-encoding").show()):(jQuery("#settings-error-encoding-disabled").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-encoding-enabled"><p>'+rtmedia_admin_strings.something_went_wrong+"</p></div>"))})}}),jQuery(".bp-media-encoding-table").on("click",".bpm-unsubscribe",function(a){a.preventDefault(),jQuery("#bpm-unsubscribe-dialog").dialog({dialogClass:"wp-dialog",modal:!0,buttons:{Unsubscribe:function(){jQuery(this).dialog("close"),jQuery(".bpm-unsubscribe").after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var a={action:"rtmedia_unsubscribe_encoding_service",note:jQuery("#bpm-unsubscribe-note").val(),plan:jQuery(".bpm-unsubscribe").attr("data-plan"),price:jQuery(".bpm-unsubscribe").attr("data-price")};jQuery.getJSON(ajaxurl,a,function(a){void 0===a.error&&a.updated?(jQuery(".bpm-unsubscribe").next().remove(),jQuery(".bpm-unsubscribe").after(a.form),jQuery(".bpm-unsubscribe").remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove(),jQuery("h2:first").after('<div class="updated" id="settings-unsubscribed-successfully"><p>'+a.updated+"</p></div>"),window.location.hash="#settings-unsubscribed-successfully"):(jQuery(".bpm-unsubscribe").next().remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove(),jQuery("h2:first").after('<div class="error" id="settings-unsubscribe-error"><p>'+a.error+"</p></div>"),window.location.hash="#settings-unsubscribe-error")})}}})}),jQuery("#bpmedia-bpalbumimporter").on("change","#bp-album-import-accept",function(){jQuery(".bp-album-import-accept").toggleClass("i-accept"),jQuery(".bp-album-importer-wizard").slideToggle()}),jQuery("#rtprivacyinstall").click(function(a){a.preventDefault(),$progress_parent=jQuery("#rtprivacyinstaller"),$progress_parent.find(".rtprivacytype").each(function(){if($type=jQuery(this).attr("id"),"total"==$type){$values=[],jQuery(this).find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),$data={};for(var a=1;a<=$values.steps[0];a++)$count=20,a==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=20)),newvals={page:a,action:"rtmedia_privacy_install",count:$count,values:$values},$data[a]=newvals;var c=jQuery.Deferred();c.resolve(),jQuery.each($data,function(a,d){c=c.pipe(function(){return b(d)})})}})}),jQuery("#bpmedia-bpalbumimport-cleanup").click(function(a){a.preventDefault(),jQuery.post(ajaxurl,{action:"rtmedia_rt_album_cleanup"},function(a){window.location=settings_rt_album_import_url})}),jQuery("#bpmedia-bpalbumimporter").on("click","#bpmedia-bpalbumimport",function(a){if(a.preventDefault(),!jQuery("#bp-album-import-accept").prop("checked")){jQuery("html, body").animate({scrollTop:jQuery("#bp-album-import-accept").offset().top},500);var b=jQuery(".bp-album-import-accept"),d=500,e="#FFEBE8",f=3;return void function h(){b.css("background-color","#EE0000"),setTimeout(function(){b.css("background-color",e),--f&&setTimeout(h,d)},d)}()}jQuery(this).prop("disabled",!0),wp_admin_url=ajaxurl.replace("admin-ajax.php",""),jQuery(".bpm-ajax-loader").length||jQuery(this).after(' <img class="bpm-ajax-loader" src="'+wp_admin_url+'images/wpspin_light.gif" /> <strong>'+rtmedia_admin_strings.no_refresh+"</strong>"),$progress_parent=jQuery("#bpmedia-bpalbumimport"),$values=[],jQuery(this).parent().find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),0==$values.steps[0]&&($values.steps[0]=1),$data={};for(var f=1;f<=$values.steps[0];f++)$count=5,f==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=5)),newvals={page:f,action:"rtmedia_rt_album_import",count:$count,values:$values},$data[f]=newvals;var g=jQuery.Deferred();g.resolve(),jQuery.each($data,function(a,b){g=g.pipe(function(){return c(b)})})}),jQuery("#bp-media-settings-boxes").on("click",".interested",function(){jQuery(".interested-container").removeClass("hidden"),jQuery(".choice-free").attr("required","required")}),jQuery("#bp-media-settings-boxes").on("click",".not-interested",function(){jQuery(".interested-container").addClass("hidden"),jQuery(".choice-free").removeAttr("required")}),jQuery("#video-transcoding-main-container").on("click",".video-transcoding-survey",function(a){a.preventDefault();var b={action:"rtmedia_convert_videos_form",email:jQuery(".email").val(),url:jQuery(".url").val(),choice:jQuery('input[name="choice"]:checked').val(),interested:jQuery('input[name="interested"]:checked').val()};return jQuery.post(ajaxurl,b,function(a){jQuery("#video-transcoding-main-container").html("<p><strong>"+a+"</strong></p>")}),!1}),jQuery("#bpmedia-bpalbumimporter").on("click",".deactivate-bp-album",function(a){a.preventDefault(),$bpalbum=jQuery(this);var b={action:"rtmedia_rt_album_deactivate"};jQuery.get(ajaxurl,b,function(a){a?location.reload():$bpalbum.parent().after("<p>"+rtmedia_admin_strings.something_went_wrong+"</p>")})}),jQuery(".updated").on("click",".bpm-hide-encoding-notice",function(){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var a={action:"rtmedia_hide_encoding_notice"};jQuery.post(ajaxurl,a,function(a){a&&jQuery(".bpm-hide-encoding-notice").closest(".updated").remove()})}),jQuery("#rtmedia-bp-enable-activity").is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("readonly",!1):jQuery(".rtmedia-bp-activity-setting").prop("readonly",!0),jQuery("#rtmedia-bp-enable-activity").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("readonly",!1):jQuery(".rtmedia-bp-activity-setting").prop("readonly",!0)});var f="",g="";void 0!==rtmedia_on_label&&(f='data-on-label="'+rtmedia_on_label+'"'),void 0!==rtmedia_off_label&&(g='data-off-label="'+rtmedia_off_label+'"'),jQuery("#rtmedia-submit-request").click(function(){var b=jQuery("#name").val(),c=jQuery("#email").val(),d=jQuery("#website").val(),e=jQuery("#phone").val(),f=jQuery("#subject").val(),g=jQuery("#details").val(),h=jQuery('input[name="request_type"]').val(),i=jQuery('input[name="request_id"]').val(),j=jQuery('input[name="server_address"]').val(),k=jQuery('input[name="ip_address"]').val(),l=jQuery('input[name="server_type"]').val(),m=jQuery('input[name="user_agent"]').val(),n={name:b,email:c,website:d,phone:e,subject:f,details:g,request_id:i,request_type:"premium_support",server_address:j,ip_address:k,server_type:l,user_agent:m};if("bug_report"==h){var o=jQuery("#wp_admin_username").val();if(""==o)return alert("Please enter WP Admin Login."),!1;var p=jQuery("#wp_admin_pwd").val();if(""==p)return alert("Please enter WP Admin password."),!1;var q=jQuery("#ssh_ftp_host").val();if(""==q)return alert("Please enter SSH / FTP host."),!1;var r=jQuery("#ssh_ftp_username").val();if(""==r)return alert("Please enter SSH / FTP login."),!1;var s=jQuery("#ssh_ftp_pwd").val();if(""==s)return alert("Please enter SSH / FTP password."),!1;n={name:b,email:c,website:d,phone:e,subject:f,details:g,request_id:i,request_type:"premium_support",server_address:j,ip_address:k,server_type:l,user_agent:m,wp_admin_username:o,wp_admin_pwd:p,ssh_ftp_host:q,ssh_ftp_username:r,ssh_ftp_pwd:s}}for(formdata in n)if(""==n[formdata]&&"phone"!=formdata)return alert("Please enter "+formdata.replace("_"," ")+" field."),!1;return data={action:"rtmedia_submit_request",form_data:n},jQuery.post(ajaxurl,data,function(b){return b=b.trim(),"false"==b?(alert("Please fill all the fields."),!1):(a("#rtmedia_service_contact_container").empty(),void a("#rtmedia_service_contact_container").append(b))}),!1}),jQuery("#cancel-request").click(function(){return!1}),jQuery(".rtm_enable_masonry_view input[type=checkbox]").is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide(),jQuery(".rtm_enable_masonry_view input[type=checkbox]").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide()}),jQuery("#rtm-masonry-change-thumbnail-info").click(function(a){jQuery("html, body").animate({scrollTop:0},"500","swing")})}),jQuery(window).load(function(){jQuery(".rtmedia-addon-thickbox").trigger("click")});
2
* rtMedia JavaScript Library
3
* @package rtMedia
4
*/
5
+ function rtmedia_addon_do_not_show(){var a={action:"rtmedia_addon_popup_not_show_again"};jQuery.post(rtmedia_admin_ajax,a,function(a){jQuery("#TB_window").remove(),jQuery("#TB_overlay").remove()})}"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),jQuery(document).ready(function(a){a(".rtm-tabs").rtTab(),a('input[name^="rtmedia-options"]').on("change",function(){a(".rtm-save-settings-msg").remove(),0===a(".rtm-fly-warning").length&&(a(".rtm-button-container.top").prepend('<div class="rtm-warning rtm-fly-warning hide">Settings have changed, you should save them!</div>'),a(".rtm-fly-warning").slideDown())}),a(".rtm-img-size-setting .form-table tr:nth-child(7) td:last-child").attr("colspan","3"),a(".rtm-field-wrap .switch input[type=checkbox]").each(function(){var b=a(this);b.parents("table").attr("data-depends")||(b.is(":checked")?(b.parents("table").next(".rtm-notice").slideDown(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideDown()})):(b.parents("table").next(".rtm-notice").slideUp(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideUp()}))),b.parents("tr").next("tr").attr("data-depends")&&(b.is(":checked")?b.parents("tr").next("tr").slideDown():b.parents("tr").next("tr").slideUp())}),a(".rtm-field-wrap .switch input[type=checkbox]").on("change",function(){var b=a(this);b.parents("table").attr("data-depends")||(b.parents("table").next(".rtm-notice").slideToggle(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideToggle()})),b.parents("tr").next("tr").attr("data-depends")&&b.parents("tr").next("tr").slideToggle()});var b=Backbone.View.extend({el:a(".bp-media-admin"),events:{"click .rtm-theme":"render","click .rtm-close":"close","click .rtm-previous":"previousTheme","click .rtm-next":"nextTheme",keyup:"keyEvent"},initialize:function(){_.bindAll(this,"render","close","nextTheme","previousTheme","keyEvent"),this.keyEvent()},render:function(b){a(".rtm-theme").removeClass("rtm-modal-open");var c=a(b.currentTarget).addClass("rtm-modal-open").find(".rtm-theme-content").html();a(".rtm-theme-overlay")[0]?(a(".rtm-theme-overlay").show(),a(this.el).find(".rtm-theme-content-wrap").empty().append(c)):a(this.el).append('<div class="theme-overlay rtm-theme-overlay"><div class="theme-backdrop rtm-close"></div><div class="rtm-theme-content-wrap">'+c+"</div></div>"),a(b.currentTarget).is(":first-child")?a(".rtm-previous").addClass("disabled"):a(b.currentTarget).is(":last-child")?a(".rtm-next").addClass("disabled"):a(".rtm-next, .rtm-previous").removeClass("disabled")},close:function(){a(".rtm-theme").removeClass("rtm-modal-open"),a(".rtm-theme-overlay").hide(),a(".rtm-next, .rtm-previous").removeClass("disabled")},nextTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1},previousTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1},keyEvent:function(){a("body").on("keyup",function(b){return 39===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1):37===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1):void(27===b.keyCode&&a(".rtm-close").trigger("click"))})}});new b}),jQuery(document).ready(function(a){function b(a){return jQuery.post(ajaxurl,a,function(b){if(0!=b){var c=!1,d=Math.ceil((20*parseInt(b)+parseInt(a.values.finished))/parseInt(a.values.total)*100);d>100&&(d=100,c=!0),jQuery("#rtprogressbar>div").css("width",d+"%"),finished=jQuery("#rtprivacyinstaller span.finished").html(),jQuery("#rtprivacyinstaller span.finished").html(parseInt(finished)+a.count),c&&jQuery.post(ajaxurl,{action:"rtmedia_privacy_redirect"},function(a){window.location=settings_url})}else jQuery("#map_progress_msgs").html('<div class="map_mapping_failure">Row '+b+" failed.</div>")})}function c(a){return jQuery.getJSON(ajaxurl,a,function(b){if(favorites=!1,b){var c=Math.ceil((5*parseInt(b.page)+parseInt(a.values.finished))/parseInt(a.values.total)*100);comments_total=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.total").html(),users_total=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.total").html(),media_total=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.total").html(),comments_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(),users_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html();var f=Math.ceil((parseInt(b.comments)+parseInt(comments_finished))/parseInt(comments_total)*100),g=Math.ceil(parseInt(b.users)/parseInt(users_total)*100);(c>100||100==c)&&(c=100,favorites=!0),jQuery(".bp-album-media #rtprogressbar>div").css("width",c+"%"),jQuery(".bp-album-comments #rtprogressbar>div").css("width",f+"%"),jQuery(".bp-album-users #rtprogressbar>div").css("width",g+"%"),media_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(),parseInt(media_finished)<parseInt(media_total)&&jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(parseInt(media_finished)+a.count),jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(parseInt(b.comments)+parseInt(comments_finished)),jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html(parseInt(b.users)),favorites&&(favorite_data={action:"rtmedia_rt_album_import_favorites"},jQuery.post(ajaxurl,favorite_data,function(a){if(0!==a.favorites||"0"!==a.favorites){jQuery(".bp-album-favorites").length||jQuery(".bp-album-comments").after('<br /><div class="bp-album-favorites"><strong>User\'s Favorites: <span class="finished">0</span> / <span class="total">'+a.users+'</span></strong><div id="rtprogressbar"><div style="width:0%"></div></div></div>'),$favorites={},0!=a.offset||"0"!=a.offset?start=1*a.offset+1:start=1;for(var b=start;b<=a.users;b++)$count=1,b==a.users&&($count=parseInt(a.users%$count),0==$count&&($count=1)),newvals={action:"rtmedia_rt_album_import_step_favorites",offset:1*(b-1),redirect:b==a.users},$favorites[b]=newvals;var c=jQuery.Deferred();c.resolve(),jQuery.each($favorites,function(a,b){c=c.pipe(function(){return d(b)})})}else window.setTimeout(e,2e3)},"json"))}else jQuery("#map_progress_msgs").html('<div class="map_mapping_failure">Row '+b.page+" failed.</div>")})}function d(a){return jQuery.post(ajaxurl,a,function(a){redirect=!1,favorites_total=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.total").html(),favorites_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(),jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(parseInt(favorites_finished)+1);var b=Math.ceil(parseInt(favorites_finished+1)/parseInt(favorites_total)*100);(b>100||100==b)&&(b=100,redirect=!0),jQuery(".bp-album-favorites #rtprogressbar>div").css("width",b+"%"),redirect&&window.setTimeout(e,2e3)})}function e(){window.location=document.URL}a(".rtm-save-settings-msg").length>0&&setTimeout(function(){a(".rtm-save-settings-msg").remove()},1e4),jQuery("#spread-the-word").on("click","#bp-media-add-linkback",function(){var a={action:"rtmedia_linkback",linkback:jQuery("#bp-media-add-linkback:checked").length};jQuery.post(rtmedia_admin_ajax,a,function(a){})}),jQuery("#bp-media-settings-boxes").on("change","#select-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html('<div class="support_form_loader"></div>');var a={action:"rtmedia_select_request",form:jQuery(this).val()};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("click","#cancel-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html('<div class="support_form_loader"></div>');var a={action:"rtmedia_cancel_request"};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("submit","#bp_media_settings_form, .rtmedia-settings-submit",function(a){var b=!0,c=new RegExp("^[0-9]+quot;);jQuery("input[name*='defaultSizes']").each(function(a){return c.test(jQuery(this).val())?void 0:(alert("Invalid value for "+jQuery(this).attr("name").replace("rtmedia-options[defaultSizes_","").replace("]","").replace(/_/g," ").replace(/(\b)([a-zA-Z] )/g,function(a){return a.toUpperCase()})),b=!1,!1)});var d=jQuery('input[name^="rtmedia-options[general_videothumbs]"]');if(b&&d.length>0&&"undefined"!=typeof d){var e="",f=0;if(d.val()<=0?(e+="Number of video thumbnails to be generated should be greater than 0 in media sizes settings. Setting it to default value 2.",f=2):c.test(d.val())||(e+="Invalid value for Number of video thumbnails in media sizes settings. Setting it to round value "+Math.round(d.val())+".",f=Math.round(d.val())),""!=e)return alert(e),d.val(f),b=!1,!1}var g=jQuery('input[name^="rtmedia-options[general_jpeg_image_quality]"]');if(b&&g.length>0&&"undefined"!=typeof g){var e="",h=0;if(g.val()<=0?(e+="Number of percentage in JPEG image quality should be greater than 0 in media sizes settings. Setting it to default value 90.",h=90):g.val()>100?(e+="Number of percentage in JPEG image quality should be less than 100 in media sizes settings. Setting it to 100.",h=100):c.test(g.val())||(e+="Invalid value for percentage in JPEG image quality in media sizes settings. Setting it to round value "+Math.round(g.val())+".",h=Math.round(g.val())),""!=e)return alert(e),g.val(h),b=!1,!1}var i=jQuery('input[name^="rtmedia-options[general_perPageMedia]"]');if(b&&i.length>0&&"undefined"!=typeof i){var e="",j=0;if(i.val()<1?(e+="Please enter positive integer value only. Setting number of media per page value to default value 10.",j=10):jQuery.isNumeric(i.val())&&Math.floor(i.val())!=i.val()&&(e+="Please enter positive integer value only. Setting number of media per page value to round value "+Math.round(i.val())+".",j=Math.round(i.val())),""!=e)return alert(e),i.val(j),b=!1,!1}b||a.preventDefault()}),jQuery(document).on("click","#bpm-services .encoding-try-now,#rtm-services .encoding-try-now",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.are_you_sure)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_free_encoding_subscribe"};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),document.location.href=b+"&apikey="+a.apikey+c}else jQuery(".encoding-try-now").next().remove(),jQuery("#settings-error-encoding-error").remove(),jQuery("#bp-media-settings-boxes").before('<div class="error" id="settings-error-encoding-error"><p>'+a.error+"</p></div>")})}}),jQuery(document).on("click","#api-key-submit",function(a){a.preventDefault(),0==jQuery(this).next("img").length&&jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_enter_api_key",apikey:jQuery("#new-api-key").val()};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),-1==b.toString().indexOf("&apikey="+a.apikey)&&(b+="&apikey="+a.apikey),-1==b.toString().indexOf("&update=true")&&(b+="&update=true"),document.location.href=b+c}else jQuery("#settings-error-api-key-error").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-api-key-error"><p>'+a.error+"</p></div>");jQuery("#api-key-submit").next("img").remove()})}),jQuery(document).on("click","#disable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.disable_encoding)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_disable_encoding"};jQuery.post(ajaxurl,b,function(a){a?(jQuery(".settings-error-encoding-disabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0?jQuery("#settings-encoding-successfully-updated p").html(a):jQuery("h2:first").after('<div class="updated" id="settings-encoding-successfully-updated"><p>'+a+"</p></div>"),jQuery("#rtmedia-encoding-usage").hide(),jQuery("#disable-encoding").next("img").remove(),jQuery("#disable-encoding").hide(),jQuery("#enable-encoding").show()):(jQuery("#settings-error-encoding-disabled").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-encoding-disabled"><p>'+rtmedia_admin_strings.something_went_wrong+"</p></div>"))})}}),jQuery(document).on("click","#enable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.enable_encoding)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_enable_encoding"};jQuery.post(ajaxurl,b,function(a){a?(jQuery(".settings-error-encoding-enabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0?jQuery("#settings-encoding-successfully-updated p").html(a):jQuery("h2:first").after('<div class="updated" id="settings-encoding-successfully-updated"><p>'+a+"</p></div>"),jQuery("#enable-encoding").next("img").remove(),jQuery("#enable-encoding").hide(),jQuery("#disable-encoding").show()):(jQuery("#settings-error-encoding-disabled").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-encoding-enabled"><p>'+rtmedia_admin_strings.something_went_wrong+"</p></div>"))})}}),jQuery(".bp-media-encoding-table").on("click",".bpm-unsubscribe",function(a){a.preventDefault(),jQuery("#bpm-unsubscribe-dialog").dialog({dialogClass:"wp-dialog",modal:!0,buttons:{Unsubscribe:function(){jQuery(this).dialog("close"),jQuery(".bpm-unsubscribe").after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var a={action:"rtmedia_unsubscribe_encoding_service",note:jQuery("#bpm-unsubscribe-note").val(),plan:jQuery(".bpm-unsubscribe").attr("data-plan"),price:jQuery(".bpm-unsubscribe").attr("data-price")};jQuery.getJSON(ajaxurl,a,function(a){void 0===a.error&&a.updated?(jQuery(".bpm-unsubscribe").next().remove(),jQuery(".bpm-unsubscribe").after(a.form),jQuery(".bpm-unsubscribe").remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove(),jQuery("h2:first").after('<div class="updated" id="settings-unsubscribed-successfully"><p>'+a.updated+"</p></div>"),window.location.hash="#settings-unsubscribed-successfully"):(jQuery(".bpm-unsubscribe").next().remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove(),jQuery("h2:first").after('<div class="error" id="settings-unsubscribe-error"><p>'+a.error+"</p></div>"),window.location.hash="#settings-unsubscribe-error")})}}})}),jQuery("#bpmedia-bpalbumimporter").on("change","#bp-album-import-accept",function(){jQuery(".bp-album-import-accept").toggleClass("i-accept"),jQuery(".bp-album-importer-wizard").slideToggle()}),jQuery("#rtprivacyinstall").click(function(a){a.preventDefault(),$progress_parent=jQuery("#rtprivacyinstaller"),$progress_parent.find(".rtprivacytype").each(function(){if($type=jQuery(this).attr("id"),"total"==$type){$values=[],jQuery(this).find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),$data={};for(var a=1;a<=$values.steps[0];a++)$count=20,a==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=20)),newvals={page:a,action:"rtmedia_privacy_install",count:$count,values:$values},$data[a]=newvals;var c=jQuery.Deferred();c.resolve(),jQuery.each($data,function(a,d){c=c.pipe(function(){return b(d)})})}})}),jQuery("#bpmedia-bpalbumimport-cleanup").click(function(a){a.preventDefault(),jQuery.post(ajaxurl,{action:"rtmedia_rt_album_cleanup"},function(a){window.location=settings_rt_album_import_url})}),jQuery("#bpmedia-bpalbumimporter").on("click","#bpmedia-bpalbumimport",function(a){if(a.preventDefault(),!jQuery("#bp-album-import-accept").prop("checked")){jQuery("html, body").animate({scrollTop:jQuery("#bp-album-import-accept").offset().top},500);var b=jQuery(".bp-album-import-accept"),d=500,e="#FFEBE8",f=3;return void function h(){b.css("background-color","#EE0000"),setTimeout(function(){b.css("background-color",e),--f&&setTimeout(h,d)},d)}()}jQuery(this).prop("disabled",!0),wp_admin_url=ajaxurl.replace("admin-ajax.php",""),jQuery(".bpm-ajax-loader").length||jQuery(this).after(' <img class="bpm-ajax-loader" src="'+wp_admin_url+'images/wpspin_light.gif" /> <strong>'+rtmedia_admin_strings.no_refresh+"</strong>"),$progress_parent=jQuery("#bpmedia-bpalbumimport"),$values=[],jQuery(this).parent().find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),0==$values.steps[0]&&($values.steps[0]=1),$data={};for(var f=1;f<=$values.steps[0];f++)$count=5,f==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=5)),newvals={page:f,action:"rtmedia_rt_album_import",count:$count,values:$values},$data[f]=newvals;var g=jQuery.Deferred();g.resolve(),jQuery.each($data,function(a,b){g=g.pipe(function(){return c(b)})})}),jQuery("#bp-media-settings-boxes").on("click",".interested",function(){jQuery(".interested-container").removeClass("hidden"),jQuery(".choice-free").attr("required","required")}),jQuery("#bp-media-settings-boxes").on("click",".not-interested",function(){jQuery(".interested-container").addClass("hidden"),jQuery(".choice-free").removeAttr("required")}),jQuery("#video-transcoding-main-container").on("click",".video-transcoding-survey",function(a){a.preventDefault();var b={action:"rtmedia_convert_videos_form",email:jQuery(".email").val(),url:jQuery(".url").val(),choice:jQuery('input[name="choice"]:checked').val(),interested:jQuery('input[name="interested"]:checked').val()};return jQuery.post(ajaxurl,b,function(a){jQuery("#video-transcoding-main-container").html("<p><strong>"+a+"</strong></p>")}),!1}),jQuery("#bpmedia-bpalbumimporter").on("click",".deactivate-bp-album",function(a){a.preventDefault(),$bpalbum=jQuery(this);var b={action:"rtmedia_rt_album_deactivate"};jQuery.get(ajaxurl,b,function(a){a?location.reload():$bpalbum.parent().after("<p>"+rtmedia_admin_strings.something_went_wrong+"</p>")})}),jQuery(".updated").on("click",".bpm-hide-encoding-notice",function(){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var a={action:"rtmedia_hide_encoding_notice"};jQuery.post(ajaxurl,a,function(a){a&&jQuery(".bpm-hide-encoding-notice").closest(".updated").remove()})}),jQuery("#rtmedia-bp-enable-activity").is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("readonly",!1):jQuery(".rtmedia-bp-activity-setting").prop("readonly",!0),jQuery("#rtmedia-bp-enable-activity").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("readonly",!1):jQuery(".rtmedia-bp-activity-setting").prop("readonly",!0)});var f="",g="";void 0!==rtmedia_on_label&&(f='data-on-label="'+rtmedia_on_label+'"'),void 0!==rtmedia_off_label&&(g='data-off-label="'+rtmedia_off_label+'"'),jQuery("#rtmedia-submit-request").click(function(){var b=jQuery("#name").val(),c=jQuery("#email").val(),d=jQuery("#website").val(),e=jQuery("#phone").val(),f=jQuery("#subject").val(),g=jQuery("#details").val(),h=jQuery('input[name="request_type"]').val(),i=jQuery('input[name="request_id"]').val(),j=jQuery('input[name="server_address"]').val(),k=jQuery('input[name="ip_address"]').val(),l=jQuery('input[name="server_type"]').val(),m=jQuery('input[name="user_agent"]').val(),n={name:b,email:c,website:d,phone:e,subject:f,details:g,request_id:i,request_type:"premium_support",server_address:j,ip_address:k,server_type:l,user_agent:m};if("bug_report"==h){var o=jQuery("#wp_admin_username").val();if(""==o)return alert("Please enter WP Admin Login."),!1;var p=jQuery("#wp_admin_pwd").val();if(""==p)return alert("Please enter WP Admin password."),!1;var q=jQuery("#ssh_ftp_host").val();if(""==q)return alert("Please enter SSH / FTP host."),!1;var r=jQuery("#ssh_ftp_username").val();if(""==r)return alert("Please enter SSH / FTP login."),!1;var s=jQuery("#ssh_ftp_pwd").val();if(""==s)return alert("Please enter SSH / FTP password."),!1;n={name:b,email:c,website:d,phone:e,subject:f,details:g,request_id:i,request_type:"premium_support",server_address:j,ip_address:k,server_type:l,user_agent:m,wp_admin_username:o,wp_admin_pwd:p,ssh_ftp_host:q,ssh_ftp_username:r,ssh_ftp_pwd:s}}for(formdata in n)if(""==n[formdata]&&"phone"!=formdata)return alert("Please enter "+formdata.replace("_"," ")+" field."),!1;return data={action:"rtmedia_submit_request",form_data:n},jQuery.post(ajaxurl,data,function(b){return b=b.trim(),"false"==b?(alert("Please fill all the fields."),!1):(a("#rtmedia_service_contact_container").empty(),void a("#rtmedia_service_contact_container").append(b))}),!1}),jQuery("#cancel-request").click(function(){return!1}),jQuery(".rtm_enable_masonry_view input[type=checkbox]").is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide(),jQuery(".rtm_enable_masonry_view input[type=checkbox]").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide()}),jQuery("#rtm-masonry-change-thumbnail-info").click(function(a){jQuery("html, body").animate({scrollTop:0},"500","swing")})}),jQuery(window).load(function(){jQuery(".rtmedia-addon-thickbox").trigger("click")});
app/assets/js/rtMedia.backbone.js CHANGED
@@ -549,11 +549,18 @@ jQuery( function ( $ ) {
549
550
jQuery( '.start-media-upload' ).on( 'click', function ( e ) {
551
e.preventDefault();
552
- var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
553
- if ( allow_upload == false ) {
554
- return false;
555
- }
556
- uploaderObj.uploadFiles();
557
} );
558
559
uploaderObj.uploader.bind( 'UploadProgress', function ( up, file ) {
@@ -717,360 +724,411 @@ jQuery( document ).ready( function ( $ ) {
717
}
718
var activity_attachemnt_ids = [ ];
719
720
- objUploadView = new UploadView( rtMedia_update_plupload_config );
721
- objUploadView.initUploader();
722
723
- setTimeout( function () {
724
- if ( $( "#rtmedia-add-media-button-post-update" ).length > 0 ) {
725
- $( "#whats-new-options" ).prepend( $( ".rtmedia-plupload-container" ) );
726
- if ( $( "#rtm-file_upload-ui .privacy" ).length > 0 ) {
727
- $( ".rtmedia-plupload-container" ).append( $( "#rtm-file_upload-ui .privacy" ) );
728
}
729
- $( '#rtmedia-whts-new-upload-container > div' ).css( 'top', '0' );
730
- $( '#rtmedia-whts-new-upload-container > div' ).css( 'left', '0' );
731
}
732
- }, 100 );
733
734
- if ( $( '#whats-new-options' ).length > 0 && $( '.rtmedia-uploader-div' ).length > 0 ) {
735
- $( '#whats-new-options' ).append( $( '.rtmedia-uploader-div' ) );
736
- }
737
738
- $( "#whats-new-form" ).on( 'click', '#rtmedia-add-media-button-post-update', function ( e ) {
739
- objUploadView.uploader.refresh();
740
- $( '#rtmedia-whts-new-upload-container > div' ).css( 'top', '0' );
741
- $( '#rtmedia-whts-new-upload-container > div' ).css( 'left', '0' );
742
743
- //Enable 'post update' button when media get select
744
- $( '#aw-whats-new-submit' ).prop("disabled", false);
745
- } );
746
- //whats-new-post-in
747
748
- objUploadView.upload_remove_array = [ ];
749
- objUploadView.uploader.bind( 'FilesAdded', function ( upl, rfiles ) {
750
- //$("#aw-whats-new-submit").attr('disabled', 'disabled');
751
752
- $.each( rfiles, function ( i, file ) {
753
754
- //set file title along with file
755
- rtm_file_name_array = file.name.split( '.' );
756
- file.title = rtm_file_name_array[0];
757
758
- var hook_respo = rtMediaHook.call( 'rtmedia_js_file_added', [ upl, file, "#rtmedia_uploader_filelist" ] );
759
760
- if ( hook_respo == false ) {
761
- file.status = - 1;
762
- objUploadView.upload_remove_array.push( file.id );
763
- return true;
764
- }
765
766
- if ( objUploadView.uploader.settings.max_file_size < file.size ) {
767
- return true;
768
- }
769
770
- var tmp_array = file.name.split( "." );
771
772
- if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
773
- var ext_array = objUploadView.uploader.settings.filters.mime_types[0].extensions.split( ',' );
774
- } else {
775
- var ext_array = objUploadView.uploader.settings.filters[0].extensions.split( ',' );
776
- }
777
- if ( tmp_array.length > 1 ) {
778
- var ext = tmp_array[tmp_array.length - 1];
779
- ext = ext.toLowerCase();
780
- if ( jQuery.inArray( ext, ext_array ) === - 1 ) {
781
return true;
782
}
783
- } else {
784
- return true;
785
- }
786
787
- rtmedia_selected_file_list( plupload, file, '', '' );
788
789
- jQuery( '#whats-new-content' ).css( 'padding-bottom', '0px' );
790
-
791
- $( "#" + file.id + " .plupload_delete" ).click( function ( e ) {
792
- e.preventDefault();
793
- objUploadView.uploader.removeFile( upl.getFile( file.id ) );
794
- $( "#" + file.id ).remove();
795
- return false;
796
- } );
797
798
- // To change the name of the uploading file
799
- $( "#label_" + file.id ).click( function ( e ) {
800
- e.preventDefault();
801
802
- rtm_file_label = this;
803
804
- rtm_file_title_id = 'text_' + file.id;
805
- rtm_file_title_input = '#' + rtm_file_title_id;
806
- rtm_file_title_wrapper_id = 'rtm_title_wp_' + file.id;
807
- rtm_file_title_wrapper = '#' + rtm_file_title_wrapper_id;
808
809
- rtm_file_desc_id = 'rtm_desc_' + file.id;
810
- rtm_file_desc_input = '#' + rtm_file_desc_id;
811
- rtm_file_desc_wrapper_id = 'rtm_desc_wp_' + file.id;
812
- rtm_file_desc_wrapper = '#' + rtm_file_desc_wrapper_id;
813
814
- rtm_file_save_id = 'save_' + file.id;
815
- rtm_file_save_el = '#' + rtm_file_save_id;
816
817
- jQuery( rtm_file_label ).hide();
818
- jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).hide();
819
820
- // show/create text box to edit media title
821
- if( jQuery( rtm_file_title_input ).length === 0 ) {
822
- jQuery( rtm_file_label ).parent( '.plupload_file_name' ).prepend( '<div id="' + rtm_file_title_wrapper_id + '" class="rtm-upload-edit-title-wrapper"><label>' + rtmedia_edit_media_info_upload.title + '</label><input type="text" class="rtm-upload-edit-title" id="' + rtm_file_title_id + '" value="' + file.title + '" style="width: 75%;" /></div><div id="' + rtm_file_desc_wrapper_id + '" class="rtm-upload-edit-desc-wrapper"><label>' + rtmedia_edit_media_info_upload.description + '</label><textarea class="rtm-upload-edit-desc" id="' + rtm_file_desc_id + '"></textarea></div><span id="' + rtm_file_save_id + '" title="Save Change" class="rtmicon dashicons dashicons-yes"></span>' );
823
- } else {
824
- jQuery( rtm_file_title_wrapper ).show();
825
- jQuery( rtm_file_desc_wrapper ).show();
826
- jQuery( rtm_file_save_el ).show();
827
- }
828
829
- jQuery( rtm_file_title_input ).focus();
830
831
- jQuery( rtm_file_save_el).click( function(){
832
- var file_title_val = jQuery( rtm_file_title_input ).val();
833
- var file_desc_val = jQuery( rtm_file_desc_input ).val();
834
- var file_name_wrapper_el = jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' );
835
836
- if( file_title_val != '' ){
837
- file_name_wrapper_el.text( file_title_val + "." + rtm_file_name_array[ 1 ] );
838
- file.title = file_title_val;
839
- }
840
841
- if( file_desc_val != '' ){
842
- file.description = file_desc_val;
843
- }
844
845
- jQuery( rtm_file_title_wrapper ).hide();
846
- jQuery( rtm_file_desc_wrapper ).hide();
847
- file_name_wrapper_el.show();
848
- jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' )
849
- jQuery( rtm_file_label ).show();
850
- jQuery( this ).hide();
851
- } );
852
- } );
853
- } );
854
855
- $.each( objUploadView.upload_remove_array, function ( i, rfile ) {
856
- if ( upl.getFile( rfile ) )
857
- upl.removeFile( upl.getFile( rfile ) );
858
- } );
859
-
860
- if( typeof rtmedia_direct_upload_enabled != 'undefined' && rtmedia_direct_upload_enabled == '1' && jQuery.trim( jQuery( "#whats-new" ).val() ) != "" ) {
861
- //Call upload event direct when direct upload is enabled (removed UPLOAD button and its triggered event)
862
- var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
863
-
864
- if( allow_upload == false ) {
865
- return false;
866
- }
867
-
868
- objUploadView.uploadFiles();
869
- }
870
- } );
871
872
- objUploadView.uploader.bind( 'FileUploaded', function ( up, file, res ) {
873
- if ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) ) { //test for MSIE x.x;
874
- var ieversion = new Number( RegExp.$1 ) // capture x.x portion and store as a number
875
876
- if ( ieversion < 10 ) {
877
- try {
878
- if ( typeof JSON.parse( res.response ) !== "undefined" )
879
- res.status = 200;
880
}
881
- catch ( e ) {
882
}
883
}
884
- }
885
886
- if ( res.status == 200 ) {
887
- try {
888
- var objIds = JSON.parse( res.response );
889
- $.each( objIds, function ( key, val ) {
890
- activity_attachemnt_ids.push( val );
891
- if ( $( "#whats-new-form" ).find( "#rtmedia_attached_id_" + val ).length < 1 ) {
892
- $( "#whats-new-form" ).append( "<input type='hidden' name='rtMedia_attached_files[]' data-mode='rtMedia-update' id='rtmedia_attached_id_" + val + "' value='"
893
+ val + "' />" );
894
- }
895
- } );
896
- } catch ( e ) {
897
898
}
899
- rtMediaHook.call( 'rtmedia_js_after_file_upload', [ up, file, res.response ] );
900
- }
901
- } );
902
903
- objUploadView.uploader.bind( 'Error', function ( up, err ) {
904
905
- if ( err.code == - 600 ) { //file size error // if file size is greater than server's max allowed size
906
- var tmp_array;
907
- var ext = tr = '';
908
- tmp_array = err.file.name.split( "." );
909
- if ( tmp_array.length > 1 ) {
910
911
- ext = tmp_array[tmp_array.length - 1];
912
- if ( ! ( typeof ( up.settings.upload_size ) != "undefined" && typeof ( up.settings.upload_size[ext] ) != "undefined" && ( up.settings.upload_size[ext]["size"] < 1 || ( up.settings.upload_size[ext]["size"] * 1024 * 1024 ) >= err.file.size ) ) ) {
913
- rtmedia_selected_file_list( plupload, err.file, up, err );
914
}
915
}
916
- }
917
- else {
918
- if ( err.code == - 601 ) { // file extension error
919
- err.message = rtmedia_file_extension_error_msg;
920
- }
921
922
- rtmedia_selected_file_list( plupload, err.file, '', err );
923
- }
924
925
- jQuery( '.plupload_delete' ).on( 'click', function ( e ) {
926
e.preventDefault();
927
jQuery( this ).parent().parent( 'li' ).remove();
928
} );
929
-
930
- return false;
931
-
932
- } );
933
934
- objUploadView.uploader.bind( 'BeforeUpload', function ( up, files ) {
935
936
- $.each( objUploadView.upload_remove_array, function ( i, rfile ) {
937
- if ( up.getFile( rfile ) )
938
- up.removeFile( up.getFile( rfile ) );
939
} );
940
941
- var object = '';
942
- var item_id = jQuery( "#whats-new-post-in" ).val();
943
- if ( item_id == undefined )
944
- item_id = 0;
945
- if ( item_id > 0 ) {
946
- object = "group";
947
- } else {
948
- object = "profile";
949
- }
950
951
- up.settings.multipart_params.context = object;
952
- up.settings.multipart_params.context_id = item_id;
953
- up.settings.multipart_params.title = files.title.split( '.' )[ 0 ];
954
-
955
- if( typeof files.description != "undefined" ){
956
- up.settings.multipart_params.description = files.description;
957
- } else {
958
- up.settings.multipart_params.description = '';
959
- }
960
961
- // if privacy dropdown is not disabled, then get the privacy value of the update
962
- if ( jQuery( "select.privacy" ).prop( 'disabled' ) === false ) {
963
- up.settings.multipart_params.privacy = jQuery( "select.privacy" ).val();
964
- }
965
- } );
966
- objUploadView.uploader.bind( 'UploadComplete', function ( up, files ) {
967
- media_uploading = true;
968
- $( "#aw-whats-new-submit" ).click();
969
- $( '#rtmedia_uploader_filelist li.plupload_queue_li' ).remove();
970
- //$("#aw-whats-new-submit").removeAttr('disabled');
971
- window.onbeforeunload = null;
972
- } );
973
- objUploadView.uploader.bind( 'UploadProgress', function ( up, file ) {
974
- //$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
975
- $( "#" + file.id + " .plupload_file_status" ).html( '<div class="plupload_file_progress ui-widget-header" style="width: ' + file.percent + '%;"></div>' );
976
- $( "#" + file.id ).addClass( 'upload-progress' );
977
- if ( file.percent == 100 ) {
978
- $( "#" + file.id ).toggleClass( 'upload-success' );
979
- }
980
981
- window.onbeforeunload = function ( evt ) {
982
- var message = rtmedia_upload_progress_error_message;
983
- return message;
984
- };
985
- } );
986
987
- $( "#rtMedia-start-upload" ).hide();
988
989
- var change_flag = false
990
- var media_uploading = false;
991
- $.ajaxPrefilter( function ( options, originalOptions, jqXHR ) {
992
- // Modify options, control originalOptions, store jqXHR, etc
993
- try {
994
- if ( originalOptions.data == null || typeof ( originalOptions.data ) == "undefined" || typeof ( originalOptions.data.action ) == "undefined" ) {
995
- return true;
996
}
997
- } catch ( e ) {
998
- return true;
999
- }
1000
- if ( originalOptions.data.action == 'post_update' || originalOptions.data.action == 'activity_widget_filter' ) {
1001
- var temp = activity_attachemnt_ids;
1002
- while ( activity_attachemnt_ids.length > 0 ) {
1003
- options.data += "&rtMedia_attached_files[]=" + activity_attachemnt_ids.pop();
1004
}
1005
- options.data += "&rtmedia-privacy=" + jQuery( "select.privacy" ).val();
1006
- activity_attachemnt_ids = temp;
1007
-
1008
- var orignalSuccess = originalOptions.success;
1009
- options.beforeSend = function () {
1010
- if ( originalOptions.data.action == 'post_update' ) {
1011
- if ( $.trim( $( "#whats-new" ).val() ) == "" && objUploadView.uploader.files.length > 0 ) {
1012
- /*
1013
- *Added $nbsp; as activity text to post activity without TEXT
1014
- * Disabled TextBox color(transparent)
1015
- */
1016
- $( "#whats-new").css('color', 'transparent');
1017
- $( "#whats-new" ).val('&nbsp;');
1018
- }
1019
- }
1020
- if ( ! media_uploading && objUploadView.uploader.files.length > 0 ) {
1021
- $( "#whats-new-post-in" ).attr( 'disabled', 'disabled' );
1022
- $( "#rtmedia-add-media-button-post-update" ).attr( 'disabled', 'disabled' );
1023
- objUploadView.uploadFiles()
1024
- media_uploading = true;
1025
- return false;
1026
- } else {
1027
- media_uploading = false;
1028
return true;
1029
}
1030
1031
1032
- }
1033
- options.success = function ( response ) {
1034
- orignalSuccess( response );
1035
- if ( response[0] + response[1] == '-1' ) {
1036
- //Error
1037
1038
- } else {
1039
- if ( originalOptions.data.action == 'activity_widget_filter' ) {
1040
- $( "div.activity" ).bind( "fadeIn", function () {
1041
- apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.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' ) );
1042
- rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
1043
- } );
1044
- $( "div.activity" ).fadeIn( 100 );
1045
}
1046
- jQuery( "input[data-mode=rtMedia-update]" ).remove();
1047
- while ( objUploadView.uploader.files.pop() != undefined ) {
1048
}
1049
- objUploadView.uploader.refresh();
1050
- $( '#rtmedia-whts-new-upload-container > div' ).css( { 'top': '0', 'left': '0' } );
1051
- $( '#rtMedia-update-queue-list' ).html( '' );
1052
- //$("#div-attache-rtmedia").hide();
1053
- apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.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' ) );
1054
- jQuery( 'ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode' ).mediaelementplayer( {
1055
- // if the <video width> is not specified, this is the default
1056
- defaultVideoWidth: 480,
1057
- // if the <video height> is not specified, this is the default
1058
- defaultVideoHeight: 270,
1059
- // if set, overrides <video width>
1060
- //videoWidth: 1,
1061
- // if set, overrides <video height>
1062
- //videoHeight: 1
1063
- } );
1064
- rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
1065
}
1066
- $( "#whats-new-post-in" ).removeAttr( 'disabled' );
1067
- $( "#rtmedia-add-media-button-post-update" ).removeAttr( 'disabled' );
1068
- // Enabled TextBox color back to normal
1069
- $( "#whats-new").css('color', '');
1070
1071
}
1072
- }
1073
- } );
1074
} );
1075
/**
1076
* rtMedia Comment Js
549
550
jQuery( '.start-media-upload' ).on( 'click', function ( e ) {
551
e.preventDefault();
552
+
553
+ /**
554
+ * To check if any media file is selected or not for uploading
555
+ */
556
+ if( jQuery( '#rtmedia_uploader_filelist').children( 'li').length > 0 ) {
557
+ var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
558
+
559
+ if ( allow_upload == false ) {
560
+ return false;
561
+ }
562
+ uploaderObj.uploadFiles();
563
+ }
564
} );
565
566
uploaderObj.uploader.bind( 'UploadProgress', function ( up, file ) {
724
}
725
var activity_attachemnt_ids = [ ];
726
727
+ if ( $( "#rtmedia-add-media-button-post-update" ).length > 0 ) {
728
+ objUploadView = new UploadView( rtMedia_update_plupload_config );
729
+ objUploadView.initUploader();
730
731
+ setTimeout( function () {
732
+ if ( $( "#rtmedia-add-media-button-post-update" ).length > 0 ) {
733
+ $( "#whats-new-options" ).prepend( $( ".rtmedia-plupload-container" ) );
734
+ if ( $( "#rtm-file_upload-ui .privacy" ).length > 0 ) {
735
+ $( ".rtmedia-plupload-container" ).append( $( "#rtm-file_upload-ui .privacy" ) );
736
+ }
737
+ $( '#rtmedia-whts-new-upload-container > div' ).css( 'top', '0' );
738
+ $( '#rtmedia-whts-new-upload-container > div' ).css( 'left', '0' );
739
}
740
+ }, 100 );
741
+
742
+ if ( $( '#whats-new-options' ).length > 0 && $( '.rtmedia-uploader-div' ).length > 0 ) {
743
+ $( '#whats-new-options' ).append( $( '.rtmedia-uploader-div' ) );
744
}
745
746
+ $( "#whats-new-form" ).on( 'click', '#rtmedia-add-media-button-post-update', function ( e ) {
747
+ objUploadView.uploader.refresh();
748
+ $( '#rtmedia-whts-new-upload-container > div' ).css( 'top', '0' );
749
+ $( '#rtmedia-whts-new-upload-container > div' ).css( 'left', '0' );
750
751
+ //Enable 'post update' button when media get select
752
+ $( '#aw-whats-new-submit' ).prop("disabled", false);
753
+ } );
754
+ //whats-new-post-in
755
756
+ objUploadView.upload_remove_array = [ ];
757
758
+ objUploadView.uploader.bind( 'FilesAdded', function ( upl, rfiles ) {
759
+ //$("#aw-whats-new-submit").attr('disabled', 'disabled');
760
761
+ $.each( rfiles, function ( i, file ) {
762
763
+ //set file title along with file
764
+ rtm_file_name_array = file.name.split( '.' );
765
+ file.title = rtm_file_name_array[0];
766
767
+ var hook_respo = rtMediaHook.call( 'rtmedia_js_file_added', [ upl, file, "#rtmedia_uploader_filelist" ] );
768
769
+ if ( hook_respo == false ) {
770
+ file.status = - 1;
771
+ objUploadView.upload_remove_array.push( file.id );
772
+ return true;
773
+ }
774
775
+ if ( objUploadView.uploader.settings.max_file_size < file.size ) {
776
+ return true;
777
+ }
778
779
+ var tmp_array = file.name.split( "." );
780
781
+ if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
782
+ var ext_array = objUploadView.uploader.settings.filters.mime_types[0].extensions.split( ',' );
783
+ } else {
784
+ var ext_array = objUploadView.uploader.settings.filters[0].extensions.split( ',' );
785
+ }
786
+ if ( tmp_array.length > 1 ) {
787
+ var ext = tmp_array[tmp_array.length - 1];
788
+ ext = ext.toLowerCase();
789
+ if ( jQuery.inArray( ext, ext_array ) === - 1 ) {
790
+ return true;
791
+ }
792
+ } else {
793
return true;
794
}
795
796
+ rtmedia_selected_file_list( plupload, file, '', '' );
797
798
+ jQuery( '#whats-new-content' ).css( 'padding-bottom', '0px' );
799
800
+ $( "#" + file.id + " .plupload_delete" ).click( function ( e ) {
801
+ e.preventDefault();
802
+ objUploadView.uploader.removeFile( upl.getFile( file.id ) );
803
+ $( "#" + file.id ).remove();
804
+ return false;
805
+ } );
806
807
+ // To change the name of the uploading file
808
+ $( "#label_" + file.id ).click( function ( e ) {
809
+ e.preventDefault();
810
811
+ rtm_file_label = this;
812
813
+ rtm_file_title_id = 'text_' + file.id;
814
+ rtm_file_title_input = '#' + rtm_file_title_id;
815
+ rtm_file_title_wrapper_id = 'rtm_title_wp_' + file.id;
816
+ rtm_file_title_wrapper = '#' + rtm_file_title_wrapper_id;
817
818
+ rtm_file_desc_id = 'rtm_desc_' + file.id;
819
+ rtm_file_desc_input = '#' + rtm_file_desc_id;
820
+ rtm_file_desc_wrapper_id = 'rtm_desc_wp_' + file.id;
821
+ rtm_file_desc_wrapper = '#' + rtm_file_desc_wrapper_id;
822
823
+ rtm_file_save_id = 'save_' + file.id;
824
+ rtm_file_save_el = '#' + rtm_file_save_id;
825
826
+ jQuery( rtm_file_label ).hide();
827
+ jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).hide();
828
829
+ // show/create text box to edit media title
830
+ if( jQuery( rtm_file_title_input ).length === 0 ) {
831
+ jQuery( rtm_file_label ).parent( '.plupload_file_name' ).prepend( '<div id="' + rtm_file_title_wrapper_id + '" class="rtm-upload-edit-title-wrapper"><label>' + rtmedia_edit_media_info_upload.title + '</label><input type="text" class="rtm-upload-edit-title" id="' + rtm_file_title_id + '" value="' + file.title + '" style="width: 75%;" /></div><div id="' + rtm_file_desc_wrapper_id + '" class="rtm-upload-edit-desc-wrapper"><label>' + rtmedia_edit_media_info_upload.description + '</label><textarea class="rtm-upload-edit-desc" id="' + rtm_file_desc_id + '"></textarea></div><span id="' + rtm_file_save_id + '" title="Save Change" class="rtmicon dashicons dashicons-yes"></span>' );
832
+ } else {
833
+ jQuery( rtm_file_title_wrapper ).show();
834
+ jQuery( rtm_file_desc_wrapper ).show();
835
+ jQuery( rtm_file_save_el ).show();
836
+ }
837
838
+ jQuery( rtm_file_title_input ).focus();
839
840
+ jQuery( rtm_file_save_el).click( function(){
841
+ var file_title_val = jQuery( rtm_file_title_input ).val();
842
+ var file_desc_val = jQuery( rtm_file_desc_input ).val();
843
+ var file_name_wrapper_el = jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' );
844
845
+ if( file_title_val != '' ){
846
+ file_name_wrapper_el.text( file_title_val + "." + rtm_file_name_array[ 1 ] );
847
+ file.title = file_title_val;
848
+ }
849
850
+ if( file_desc_val != '' ){
851
+ file.description = file_desc_val;
852
+ }
853
854
+ jQuery( rtm_file_title_wrapper ).hide();
855
+ jQuery( rtm_file_desc_wrapper ).hide();
856
+ file_name_wrapper_el.show();
857
+ jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' )
858
+ jQuery( rtm_file_label ).show();
859
+ jQuery( this ).hide();
860
+ } );
861
+ } );
862
+ } );
863
+
864
+ $.each( objUploadView.upload_remove_array, function ( i, rfile ) {
865
+ if ( upl.getFile( rfile ) )
866
+ upl.removeFile( upl.getFile( rfile ) );
867
+ } );
868
869
+ if( typeof rtmedia_direct_upload_enabled != 'undefined' && rtmedia_direct_upload_enabled == '1' && jQuery.trim( jQuery( "#whats-new" ).val() ) != "" ) {
870
+ //Call upload event direct when direct upload is enabled (removed UPLOAD button and its triggered event)
871
+ var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
872
873
+ if( allow_upload == false ) {
874
+ return false;
875
}
876
+
877
+ objUploadView.uploadFiles();
878
+ }
879
+ } );
880
+
881
+ objUploadView.uploader.bind( 'FileUploaded', function ( up, file, res ) {
882
+ if ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) ) { //test for MSIE x.x;
883
+ var ieversion = new Number( RegExp.$1 ) // capture x.x portion and store as a number
884
+
885
+ if ( ieversion < 10 ) {
886
+ try {
887
+ if ( typeof JSON.parse( res.response ) !== "undefined" )
888
+ res.status = 200;
889
+ }
890
+ catch ( e ) {
891
+ }
892
}
893
}
894
895
+ if ( res.status == 200 ) {
896
+ try {
897
+ var objIds = JSON.parse( res.response );
898
+ $.each( objIds, function ( key, val ) {
899
+ activity_attachemnt_ids.push( val );
900
+ if ( $( "#whats-new-form" ).find( "#rtmedia_attached_id_" + val ).length < 1 ) {
901
+ $( "#whats-new-form" ).append( "<input type='hidden' name='rtMedia_attached_files[]' data-mode='rtMedia-update' id='rtmedia_attached_id_" + val + "' value='"
902
+ val + "' />" );
903
+ }
904
+ } );
905
+ } catch ( e ) {
906
907
+ }
908
+ rtMediaHook.call( 'rtmedia_js_after_file_upload', [ up, file, res.response ] );
909
}
910
+ } );
911
912
+ objUploadView.uploader.bind( 'Error', function ( up, err ) {
913
914
+ if ( err.code == - 600 ) { //file size error // if file size is greater than server's max allowed size
915
+ var tmp_array;
916
+ var ext = tr = '';
917
+ tmp_array = err.file.name.split( "." );
918
+ if ( tmp_array.length > 1 ) {
919
920
+ ext = tmp_array[tmp_array.length - 1];
921
+ if ( ! ( typeof ( up.settings.upload_size ) != "undefined" && typeof ( up.settings.upload_size[ext] ) != "undefined" && ( up.settings.upload_size[ext]["size"] < 1 || ( up.settings.upload_size[ext]["size"] * 1024 * 1024 ) >= err.file.size ) ) ) {
922
+ rtmedia_selected_file_list( plupload, err.file, up, err );
923
+ }
924
}
925
}
926
+ else {
927
+ if ( err.code == - 601 ) { // file extension error
928
+ err.message = rtmedia_file_extension_error_msg;
929
+ }
930
931
+ rtmedia_selected_file_list( plupload, err.file, '', err );
932
+ }
933
934
+ jQuery( '.plupload_delete' ).on( 'click', function ( e ) {
935
e.preventDefault();
936
jQuery( this ).parent().parent( 'li' ).remove();
937
} );
938
939
+ return false;
940
941
} );
942
943
+ objUploadView.uploader.bind( 'BeforeUpload', function ( up, files ) {
944
945
+ $.each( objUploadView.upload_remove_array, function ( i, rfile ) {
946
+ if ( up.getFile( rfile ) )
947
+ up.removeFile( up.getFile( rfile ) );
948
+ } );
949
950
+ var object = '';
951
+ var item_id = jQuery( "#whats-new-post-in" ).val();
952
+ if ( item_id == undefined )
953
+ item_id = 0;
954
+ if ( item_id > 0 ) {
955
+ object = "group";
956
+ } else {
957
+ object = "profile";
958
+ }
959
960
+ up.settings.multipart_params.context = object;
961
+ up.settings.multipart_params.context_id = item_id;
962
+ up.settings.multipart_params.title = files.title.split( '.' )[ 0 ];
963
964
+ if( typeof files.description != "undefined" ){
965
+ up.settings.multipart_params.description = files.description;
966
+ } else {
967
+ up.settings.multipart_params.description = '';
968
+ }
969
970
+ // if privacy dropdown is not disabled, then get the privacy value of the update
971
+ if ( jQuery( "select.privacy" ).prop( 'disabled' ) === false ) {
972
+ up.settings.multipart_params.privacy = jQuery( "select.privacy" ).val();
973
}
974
+ } );
975
+
976
+ objUploadView.uploader.bind( 'UploadComplete', function ( up, files ) {
977
+ media_uploading = true;
978
+ $( "#aw-whats-new-submit" ).click();
979
+ $( '#rtmedia_uploader_filelist li.plupload_queue_li' ).remove();
980
+ //$("#aw-whats-new-submit").removeAttr('disabled');
981
+ window.onbeforeunload = null;
982
+ } );
983
+
984
+ objUploadView.uploader.bind( 'UploadProgress', function ( up, file ) {
985
+ //$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
986
+ $( "#" + file.id + " .plupload_file_status" ).html( '<div class="plupload_file_progress ui-widget-header" style="width: ' + file.percent + '%;"></div>' );
987
+ $( "#" + file.id ).addClass( 'upload-progress' );
988
+ if ( file.percent == 100 ) {
989
+ $( "#" + file.id ).toggleClass( 'upload-success' );
990
}
991
+
992
+ window.onbeforeunload = function ( evt ) {
993
+ var message = rtmedia_upload_progress_error_message;
994
+ return message;
995
+ };
996
+ } );
997
+
998
+ $( "#rtMedia-start-upload" ).hide();
999
+
1000
+ var change_flag = false
1001
+ var media_uploading = false;
1002
+
1003
+ $.ajaxPrefilter( function ( options, originalOptions, jqXHR ) {
1004
+ // Modify options, control originalOptions, store jqXHR, etc
1005
+ try {
1006
+ if ( originalOptions.data == null || typeof ( originalOptions.data ) == "undefined" || typeof ( originalOptions.data.action ) == "undefined" ) {
1007
return true;
1008
}
1009
+ } catch ( e ) {
1010
+ return true;
1011
+ }
1012
+
1013
+ if ( originalOptions.data.action == 'post_update' || originalOptions.data.action == 'activity_widget_filter' ) {
1014
+ var temp = activity_attachemnt_ids;
1015
+ while ( activity_attachemnt_ids.length > 0 ) {
1016
+ options.data += "&rtMedia_attached_files[]=" + activity_attachemnt_ids.pop();
1017
+ }
1018
+ options.data += "&rtmedia-privacy=" + jQuery( "select.privacy" ).val();
1019
+ activity_attachemnt_ids = temp;
1020
1021
+ var orignalSuccess = originalOptions.success;
1022
+ options.beforeSend = function () {
1023
+ /**
1024
+ * This hook is added for rtMedia Upload Terms plugin to check if it is checked or not for activity
1025
+ */
1026
+ var allowActivityPost = rtMediaHook.call( 'rtmedia_js_before_activity_added', true );
1027
1028
+ if( !allowActivityPost ) {
1029
+ $( '#rtmedia_upload_terms_conditions').removeAttr( 'disabled' );
1030
+ $( '#rtmedia-whts-new-upload-container').find('input').removeAttr( 'disabled' );
1031
1032
+ return false;
1033
+ }
1034
+
1035
+ if ( originalOptions.data.action == 'post_update' ) {
1036
+ if ( $.trim( $( "#whats-new" ).val() ) == "" && objUploadView.uploader.files.length > 0 ) {
1037
+ /*
1038
+ *Added $nbsp; as activity text to post activity without TEXT
1039
+ * Disabled TextBox color(transparent)
1040
+ */
1041
+ $( "#whats-new").css('color', 'transparent');
1042
+ $( "#whats-new" ).val('&nbsp;');
1043
+ }
1044
}
1045
+ if ( ! media_uploading && objUploadView.uploader.files.length > 0 ) {
1046
+ $( "#whats-new-post-in" ).attr( 'disabled', 'disabled' );
1047
+ $( "#rtmedia-add-media-button-post-update" ).attr( 'disabled', 'disabled' );
1048
+ objUploadView.uploadFiles()
1049
+ media_uploading = true;
1050
+ return false;
1051
+ } else {
1052
+ media_uploading = false;
1053
+ return true;
1054
}
1055
+
1056
+
1057
}
1058
+ options.success = function ( response ) {
1059
+ orignalSuccess( response );
1060
+ if ( response[0] + response[1] == '-1' ) {
1061
+ //Error
1062
1063
+ } else {
1064
+ if ( originalOptions.data.action == 'activity_widget_filter' ) {
1065
+ $( "div.activity" ).bind( "fadeIn", function () {
1066
+ apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.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' ) );
1067
+ rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
1068
+ } );
1069
+ $( "div.activity" ).fadeIn( 100 );
1070
+ }
1071
+ jQuery( "input[data-mode=rtMedia-update]" ).remove();
1072
+ while ( objUploadView.uploader.files.pop() != undefined ) {
1073
+ }
1074
+ objUploadView.uploader.refresh();
1075
+ $( '#rtmedia-whts-new-upload-container > div' ).css( { 'top': '0', 'left': '0' } );
1076
+ $( '#rtMedia-update-queue-list' ).html( '' );
1077
+ //$("#div-attache-rtmedia").hide();
1078
+ apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.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' ) );
1079
+ jQuery( 'ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode' ).mediaelementplayer( {
1080
+ // if the <video width> is not specified, this is the default
1081
+ defaultVideoWidth: 480,
1082
+ // if the <video height> is not specified, this is the default
1083
+ defaultVideoHeight: 270,
1084
+ // if set, overrides <video width>
1085
+ //videoWidth: 1,
1086
+ // if set, overrides <video height>
1087
+ //videoHeight: 1
1088
+ } );
1089
+ rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
1090
+ }
1091
+
1092
+ $( "#whats-new-post-in" ).removeAttr( 'disabled' );
1093
+ $( "#rtmedia-add-media-button-post-update" ).removeAttr( 'disabled' );
1094
+ // Enabled TextBox color back to normal
1095
+ $( "#whats-new").css('color', '');
1096
+
1097
+ }
1098
}
1099
+ } );
1100
+ } else {
1101
+ $.ajaxPrefilter( function ( options, originalOptions, jqXHR ) {
1102
+ // Modify options, control originalOptions, store jqXHR, etc
1103
+ try {
1104
+ if ( originalOptions.data == null || typeof ( originalOptions.data ) == "undefined" || typeof ( originalOptions.data.action ) == "undefined" ) {
1105
+ return true;
1106
+ }
1107
+ } catch ( e ) {
1108
+ return true;
1109
+ }
1110
+
1111
+ if ( originalOptions.data.action == 'post_update' || originalOptions.data.action == 'activity_widget_filter' ) {
1112
+ options.data += "&rtmedia-privacy=" + jQuery( "select.privacy" ).val();
1113
+ var orignalSuccess = originalOptions.success;
1114
+ options.success = function ( response ) {
1115
+ orignalSuccess( response );
1116
+ if ( response[0] + response[1] == '-1' ) {
1117
+ //Error
1118
+ } else {
1119
+ if ( originalOptions.data.action == 'activity_widget_filter' ) {
1120
+ $( "div.activity" ).fadeIn( 100 );
1121
+ }
1122
+ }
1123
+
1124
+ $( "#whats-new-post-in" ).removeAttr( 'disabled' );
1125
+ // Enabled TextBox color back to normal
1126
+ $( "#whats-new").css('color', '');
1127
+
1128
+ }
1129
+ }
1130
+ } );
1131
+ }
1132
} );
1133
/**
1134
* rtMedia Comment Js
app/assets/js/rtMedia.js CHANGED
@@ -137,7 +137,9 @@ function rtmedia_init_action_dropdown() {
137
jQuery( 'document' ).ready( function ( $ ) {
138
139
// Tabs
140
- $( '.rtm-tabs' ).rtTab();
141
142
// open magnific popup as modal for create album/playlist
143
if ( jQuery( '.rtmedia-modal-link' ).length > 0 ) {
@@ -228,6 +230,18 @@ jQuery( 'document' ).ready( function ( $ ) {
228
options.success = function ( response ) {
229
orignalSuccess( response );
230
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' );
231
rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
232
}
233
}
137
jQuery( 'document' ).ready( function ( $ ) {
138
139
// Tabs
140
+ if( typeof rtTab !== 'undefined' ) {
141
+ $( '.rtm-tabs' ).rtTab();
142
+ }
143
144
// open magnific popup as modal for create album/playlist
145
if ( jQuery( '.rtmedia-modal-link' ).length > 0 ) {
230
options.success = function ( response ) {
231
orignalSuccess( response );
232
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' );
233
+
234
+ 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( {
235
+ // if the <video width> is not specified, this is the default
236
+ defaultVideoWidth: 480,
237
+ // if the <video height> is not specified, this is the default
238
+ defaultVideoHeight: 270
239
+ // if set, overrides <video width>
240
+ //videoWidth: 1,
241
+ // if set, overrides <video height>
242
+ //videoHeight: 1
243
+ } );
244
+
245
rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
246
}
247
}
app/assets/js/rtmedia.min.js CHANGED
@@ -2,5 +2,5 @@
2
* rtMedia JavaScript Library
3
* @package rtMedia
4
*/
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.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),b(".mfp-content .wp-audio-shortcode,.mfp-content .wp-video-shortcode,.mfp-content .bp_media_content video").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270,success:function(a,b){a.play()}}),b(".mfp-content .mejs-audio .mejs-controls").css("position","relative"),rtMediaHook.call("rtmedia_js_popup_after_content_added",[])},close:function(a){rtmedia_init_action_dropdown()},BeforeChange:function(a){}}}))})}function rtmedia_init_action_dropdown(){var a,b;jQuery(".click-nav > span, .click-nav > div").toggleClass("no-js js"),jQuery(".click-nav .js ul").hide(),jQuery(".click-nav .clicker").click(function(c){a=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),b=jQuery(this).next("ul"),jQuery.each(a,function(a,c){jQuery(c).html()!=b.html()&&jQuery(c).hide()}),jQuery(b).toggle(),c.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);f>e;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?!0:!1}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=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),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:!1;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){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(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++,200>e?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:!1},_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(){return e.indexOf(this.index)>-1?(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):void 0});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:0>a?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(){return b.items.length>1?(b.next(),!1):void 0}),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})):!1},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+#x2F;,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")?!1:!0;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")?!1:!0;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,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,b){if("undefined"!=typeof rtMediaHook.hooks[a])for(i=0;i<rtMediaHook.hooks[a].length;++i)if(1!=rtMediaHook.hooks[a][i](b))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(document).on("focusin","#comment_content",function(){jQuery(document).unbind("keydown")}),jQuery(document).on("focusout","#comment_content",function(){var a=jQuery.magnificPopup.instance;jQuery(document).on("keydown",function(b){37===b.keyCode?a.prev():39===b.keyCode&&a.next()})})}function e(){jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()})}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):!0}),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, .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(d){return!0}if("activity_get_older_updates"==b.data.action){var e=b.success;a.success=function(a){e(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 e=b.success;a.success=function(a){e(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(d){return!0}if("activity_get_older_updates"==b.data.action){var e=b.success;a.success=function(a){e(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",[])}}}),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){
6
- 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(b=jQuery.parseJSON(b),"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(){return jQuery(this).attr("value")===$context?(c=!1,void jQuery(this).append('<option value="'+b+'">'+$albumname+"</option>")):void 0}),c){var a=$context.charAt(0).toUpperCase()+$context.slice(1),d='<optgroup value="'+$context+'" label="'+a+' Albums"><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="Privacy updated successfully.",d="success"):(c="Couldn't change privacy, please try again.",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(),e(),mfp=jQuery.magnificPopup.instance,jQuery(mfp.items).size()>1&&c(),d();var f=a(window).height();jQuery(".rtm-lightbox-container .mejs-video").css({height:.8*f,"max-height":.8*f,"over-flow":"hidden"}),jQuery(".mfp-content .rtmedia-media").css({"max-height":.87*f,"over-flow":"hidden"}),rtmedia_init_action_dropdown(),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").shorten({showChars:130});var g=a(".rtm-gallery-title"),h="";h=a.isEmptyObject(g)?a("#subnav.item-list-tabs li.selected ").html():g.html(),""!=h&&a(".rtm-ltb-gallery-title .ltb-title").html(h);var i=a("#subnav.item-list-tabs li.selected span").html();return a("li.total").html(i),!0});var f=jQuery("#drag-drop-area"),g=jQuery("#whats-new");f.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){jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&g.addClass("rtm-drag-drop-active"),f.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show()}).on("dragleave",function(a){a.preventDefault(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(g.removeClass("rtm-drag-drop-active"),g.removeAttr("style")),f.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}).on("drop",function(a){a.preventDefault(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(g.removeClass("rtm-drag-drop-active"),g.removeAttr("style")),f.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").children("input[type=file]").hide():jQuery("div.moxie-shim").children("input[type=file]").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("file deleted successfully.","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){var c={showChars:100,ellipsesText:"...",moreText:"more",lessText:"less"};return b&&a.extend(c,b),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.addClass("less"),b.html(c.lessText)),b.parent().prev().toggle(),b.prev().toggle(),!1}},".morelink"),this.each(function(){var b=a(this);if(!b.hasClass("shortened")){b.addClass("shortened");var d=b.html();if(d.length>c.showChars){var e=d.substr(0,c.showChars),f=d.substr(c.showChars,d.length-c.showChars),g=e+'<span class="moreellipses">'+c.ellipsesText+' </span><span class="morecontent"><span>'+f+'</span> <a href="#" class="morelink">'+c.moreText+"</a></span>";b.html(g),a(".morecontent span").hide()}}})}}(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)};
2
* rtMedia JavaScript Library
3
* @package rtMedia
4
*/
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.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),b(".mfp-content .wp-audio-shortcode,.mfp-content .wp-video-shortcode,.mfp-content .bp_media_content video").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270,success:function(a,b){a.play()}}),b(".mfp-content .mejs-audio .mejs-controls").css("position","relative"),rtMediaHook.call("rtmedia_js_popup_after_content_added",[])},close:function(a){rtmedia_init_action_dropdown()},BeforeChange:function(a){}}}))})}function rtmedia_init_action_dropdown(){var a,b;jQuery(".click-nav > span, .click-nav > div").toggleClass("no-js js"),jQuery(".click-nav .js ul").hide(),jQuery(".click-nav .clicker").click(function(c){a=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),b=jQuery(this).next("ul"),jQuery.each(a,function(a,c){jQuery(c).html()!=b.html()&&jQuery(c).hide()}),jQuery(b).toggle(),c.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);f>e;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=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),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:!1;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){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(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++,200>e?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:!1},_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(){return e.indexOf(this.index)>-1?(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):void 0});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:0>a?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(){return b.items.length>1?(b.next(),!1):void 0}),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})):!1},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+#x2F;,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,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(document).on("focusin","#comment_content",function(){jQuery(document).unbind("keydown")}),jQuery(document).on("focusout","#comment_content",function(){var a=jQuery.magnificPopup.instance;jQuery(document).on("keydown",function(b){37===b.keyCode?a.prev():39===b.keyCode&&a.next()})})}function e(){jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()})}"undefined"!=typeof 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):!0}),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, .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(d){return!0}if("activity_get_older_updates"==b.data.action){var e=b.success;a.success=function(a){e(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 e=b.success;a.success=function(a){e(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(d){return!0}if("activity_get_older_updates"==b.data.action){var e=b.success;a.success=function(a){e(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}),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()),
6
+ $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(b=jQuery.parseJSON(b),"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(){return jQuery(this).attr("value")===$context?(c=!1,void jQuery(this).append('<option value="'+b+'">'+$albumname+"</option>")):void 0}),c){var a=$context.charAt(0).toUpperCase()+$context.slice(1),d='<optgroup value="'+$context+'" label="'+a+' Albums"><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="Privacy updated successfully.",d="success"):(c="Couldn't change privacy, please try again.",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(),e(),mfp=jQuery.magnificPopup.instance,jQuery(mfp.items).size()>1&&c(),d();var f=a(window).height();jQuery(".rtm-lightbox-container .mejs-video").css({height:.8*f,"max-height":.8*f,"over-flow":"hidden"}),jQuery(".mfp-content .rtmedia-media").css({"max-height":.87*f,"over-flow":"hidden"}),rtmedia_init_action_dropdown(),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").shorten({showChars:130});var g=a(".rtm-gallery-title"),h="";h=a.isEmptyObject(g)?a("#subnav.item-list-tabs li.selected ").html():g.html(),""!=h&&a(".rtm-ltb-gallery-title .ltb-title").html(h);var i=a("#subnav.item-list-tabs li.selected span").html();return a("li.total").html(i),!0});var f=jQuery("#drag-drop-area"),g=jQuery("#whats-new");f.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){jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&g.addClass("rtm-drag-drop-active"),f.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show()}).on("dragleave",function(a){a.preventDefault(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(g.removeClass("rtm-drag-drop-active"),g.removeAttr("style")),f.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}).on("drop",function(a){a.preventDefault(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(g.removeClass("rtm-drag-drop-active"),g.removeAttr("style")),f.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").children("input[type=file]").hide():jQuery("div.moxie-shim").children("input[type=file]").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("file deleted successfully.","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){var c={showChars:100,ellipsesText:"...",moreText:"more",lessText:"less"};return b&&a.extend(c,b),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.addClass("less"),b.html(c.lessText)),b.parent().prev().toggle(),b.prev().toggle(),!1}},".morelink"),this.each(function(){var b=a(this);if(!b.hasClass("shortened")){b.addClass("shortened");var d=b.html();if(d.length>c.showChars){var e=d.substr(0,c.showChars),f=d.substr(c.showChars,d.length-c.showChars),g=e+'<span class="moreellipses">'+c.ellipsesText+' </span><span class="morecontent"><span>'+f+'</span> <a href="#" class="morelink">'+c.moreText+"</a></span>";b.html(g),a(".morecontent span").hide()}}})}}(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)};
app/main/RTMedia.php CHANGED
@@ -249,6 +249,7 @@ class RTMedia {
249
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail {
250
max-width: <?php echo $this->options[ "defaultSizes_photo_medium_width" ]; ?>px;
251
max-height: <?php echo $this->options[ "defaultSizes_photo_medium_height" ]; ?>px;
252
}
253
.rtmedia-activity-container .mejs-container.mejs-video{
254
min-height: <?php echo $this->options[ "defaultSizes_video_activityPlayer_height" ]; ?>px;
249
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail {
250
max-width: <?php echo $this->options[ "defaultSizes_photo_medium_width" ]; ?>px;
251
max-height: <?php echo $this->options[ "defaultSizes_photo_medium_height" ]; ?>px;
252
+ overflow: hidden;
253
}
254
.rtmedia-activity-container .mejs-container.mejs-video{
255
min-height: <?php echo $this->options[ "defaultSizes_video_activityPlayer_height" ]; ?>px;
app/main/controllers/activity/RTMediaBuddyPressActivity.php CHANGED
@@ -246,8 +246,10 @@ class RTMediaBuddyPressActivity {
246
if ( rtmedia_is_uploader_view_allowed( true, 'activity' ) ){
247
$params = array(
248
'url' => $url,
249
- 'runtimes' => 'html5,flash,html4', 'browse_button' => 'rtmedia-add-media-button-post-update', // browse button assigned to "Attach Files" Button.
250
- 'container' => 'rtmedia-whts-new-upload-container', 'drop_element' => 'whats-new-textarea', // drag-drop area assigned to activity update textarea
251
'filters' => apply_filters( 'rtmedia_plupload_files_filter', array( array( 'title' => __( 'Media Files', 'buddypress-media' ), 'extensions' => get_rtmedia_allowed_upload_type() ) ) ),
252
'max_file_size' => ( wp_max_upload_size() ) / ( 1024 * 1024 ) . 'M',
253
'multipart' => true, 'urlstream_upload' => true,
@@ -390,38 +392,41 @@ class RTMediaBuddyPressActivity {
390
391
// Generating user_link with name
392
$user_link = '<a href="' . $activities[ $index ]->primary_link . '">' . $matches[ 1 ] . '</a>';
393
- // Counting media linked with activity
394
- $count = sizeof( $rtmedia_media_type_array[ $activities[ $index ]->id ] );
395
- // Getting constant with single label or plural label
396
- $media_const = 'RTMEDIA_' . strtoupper( $rtmedia_media_type_array[ $activities[ $index ]->id ][ 0 ] );
397
- if ( $count > 1 ){
398
- $media_const .= '_PLURAL';
399
- }
400
- $media_const .= '_LABEL';
401
- if( defined( $media_const ) ){
402
- $media_str = constant( $media_const );
403
- } else {
404
- $media_str = RTMEDIA_MEDIA_SLUG;
405
- }
406
407
- $action = '';
408
- $user = get_userdata( $activities[ $index ]->user_id );
409
- // Updating activity based on count
410
- if( $count == 1 ) {
411
- $action = sprintf( __( '%s added a %s', 'buddypress-media' ), $user_link, $media_str );
412
- } else {
413
- // Checking all the media linked with activity are of same type
414
- if( isset( $rtmedia_media_type_array[ $activities[ $index ]->id ] )
415
- && !empty( $rtmedia_media_type_array[ $activities[ $index ]->id ] )
416
- && count( array_unique( $rtmedia_media_type_array[ $activities[ $index ]->id ] ) ) == 1 ) {
417
- $action = sprintf( __( '%s added %d %s', 'buddypress-media' ), $user_link, $count, $media_str );
418
- } else {
419
- $action = sprintf( __( '%s added %d %s', 'buddypress-media' ), $user_link, $count, RTMEDIA_MEDIA_SLUG );
420
- }
421
- }
422
-
423
- $action = apply_filters( 'rtmedia_bp_activity_action_text', $action, $user_link, $count, $user, $rtmedia_media_type_array[ $activities[ $index ]->id ][ 0 ], $activities[ $index ]->id );
424
- $activities[ $index ]->action = $action;
425
}
426
}
427
246
if ( rtmedia_is_uploader_view_allowed( true, 'activity' ) ){
247
$params = array(
248
'url' => $url,
249
+ 'runtimes' => 'html5,flash,html4',
250
+ 'browse_button' => apply_filters( 'rtmedia_upload_button_id', 'rtmedia-add-media-button-post-update' ), // browse button assigned to "Attach Files" Button.
251
+ 'container' => 'rtmedia-whts-new-upload-container',
252
+ 'drop_element' => 'whats-new-textarea', // drag-drop area assigned to activity update textarea
253
'filters' => apply_filters( 'rtmedia_plupload_files_filter', array( array( 'title' => __( 'Media Files', 'buddypress-media' ), 'extensions' => get_rtmedia_allowed_upload_type() ) ) ),
254
'max_file_size' => ( wp_max_upload_size() ) / ( 1024 * 1024 ) . 'M',
255
'multipart' => true, 'urlstream_upload' => true,
392
393
// Generating user_link with name
394
$user_link = '<a href="' . $activities[ $index ]->primary_link . '">' . $matches[ 1 ] . '</a>';
395
396
+ if( isset( $rtmedia_media_type_array[ $activities[ $index ]->id ] ) ) {
397
+ // Counting media linked with activity
398
+ $count = sizeof( $rtmedia_media_type_array[ $activities[ $index ]->id ] );
399
+ // Getting constant with single label or plural label
400
+ $media_const = 'RTMEDIA_' . strtoupper( $rtmedia_media_type_array[ $activities[ $index ]->id ][ 0 ] );
401
+ if ( $count > 1 ){
402
+ $media_const .= '_PLURAL';
403
+ }
404
+ $media_const .= '_LABEL';
405
+ if( defined( $media_const ) ){
406
+ $media_str = constant( $media_const );
407
+ } else {
408
+ $media_str = RTMEDIA_MEDIA_SLUG;
409
+ }
410
+
411
+ $action = '';
412
+ $user = get_userdata( $activities[ $index ]->user_id );
413
+ // Updating activity based on count
414
+ if( $count == 1 ) {
415
+ $action = sprintf( __( '%s added a %s', 'buddypress-media' ), $user_link, $media_str );
416
+ } else {
417
+ // Checking all the media linked with activity are of same type
418
+ if( isset( $rtmedia_media_type_array[ $activities[ $index ]->id ] )
419
+ && !empty( $rtmedia_media_type_array[ $activities[ $index ]->id ] )
420
+ && count( array_unique( $rtmedia_media_type_array[ $activities[ $index ]->id ] ) ) == 1 ) {
421
+ $action = sprintf( __( '%s added %d %s', 'buddypress-media' ), $user_link, $count, $media_str );
422
+ } else {
423
+ $action = sprintf( __( '%s added %d %s', 'buddypress-media' ), $user_link, $count, RTMEDIA_MEDIA_SLUG );
424
+ }
425
+ }
426
+
427
+ $action = apply_filters( 'rtmedia_bp_activity_action_text', $action, $user_link, $count, $user, $rtmedia_media_type_array[ $activities[ $index ]->id ][ 0 ], $activities[ $index ]->id );
428
+ $activities[ $index ]->action = $action;
429
+ }
430
}
431
}
432
app/main/controllers/media/RTMediaMedia.php CHANGED
@@ -478,9 +478,7 @@ class RTMediaMedia {
478
* FIX WORDPRESS 3.6 METADATA
479
*/
480
require_once( ABSPATH . 'wp-admin/includes/media.php' );
481
- /**
482
- *
483
- */
484
wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file_object[ $key ][ 'file' ] ) );
485
} else {
486
unlink( $file_object[ $key ][ 'file' ] );
@@ -569,23 +567,24 @@ class RTMediaMedia {
569
return $media_id;
570
}
571
572
- function insert_activity( $id, $media ) {
573
if( !$this->activity_enabled() ) {
574
return false;
575
}
576
- $activity = new RTMediaActivity( $media->id, $media->privacy );
577
$activity_content = $activity->create_activity_html();
578
$user = get_userdata( $media->media_author );
579
$username = '<a href="' . get_rtmedia_user_link( $media->media_author ) . '">' . $user->user_nicename . '</a>';
580
$count = count( $id );
581
$media_const = 'RTMEDIA_' . strtoupper( $media->media_type );
582
if( $count > 1 ) {
583
$media_const .= '_PLURAL';
584
}
585
- $media_const .= '_LABEL';
586
587
$media_str = constant( $media_const );
588
-
589
$action = sprintf( ( $count == 1 ) ? __( '%1$s added a %2$s', 'buddypress-media' ) : __( '%1$s added %4$d %3$s', 'buddypress-media' ), $username, $media->media_type, $media_str, $count );
590
$action = apply_filters( 'rtmedia_buddypress_action_text_fitler', $action, $username, $count, $user->user_nicename, $media->media_type );
591
$activity_args = array(
@@ -603,6 +602,7 @@ class RTMediaMedia {
603
604
if( $media->context == 'group' || $media->context == 'profile' ) {
605
$activity_args[ 'component' ] = $media->context;
606
if( $media->context == 'group' ) {
607
$activity_args[ 'component' ] = "groups";
608
$activity_args[ 'item_id' ] = $media->context_id;
@@ -610,12 +610,13 @@ class RTMediaMedia {
610
}
611
612
$activity_id = bp_activity_add( $activity_args );
613
- bp_activity_update_meta( $activity_id, 'rtmedia_privacy', ( $media->privacy == 0 ) ? - 1 : $media->privacy );
614
615
$this->model->update( array( 'activity_id' => $activity_id ), array( 'id' => $media->id ) );
616
617
// insert/update activity details in rtmedia activity table
618
$rtmedia_activity_model = new RTMediaActivityModel();
619
if( !$rtmedia_activity_model->check( $activity_id ) ) {
620
$rtmedia_activity_model->insert( array( 'activity_id' => $activity_id, 'user_id' => $media->media_author, 'privacy' => $media->privacy ) );
621
} else {
478
* FIX WORDPRESS 3.6 METADATA
479
*/
480
require_once( ABSPATH . 'wp-admin/includes/media.php' );
481
+
482
wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file_object[ $key ][ 'file' ] ) );
483
} else {
484
unlink( $file_object[ $key ][ 'file' ] );
567
return $media_id;
568
}
569
570
+ function insert_activity( $id, $media, $activity_text = false ) {
571
if( !$this->activity_enabled() ) {
572
return false;
573
}
574
+
575
+ $activity = new RTMediaActivity( $media->id, $media->privacy, $activity_text );
576
$activity_content = $activity->create_activity_html();
577
$user = get_userdata( $media->media_author );
578
$username = '<a href="' . get_rtmedia_user_link( $media->media_author ) . '">' . $user->user_nicename . '</a>';
579
$count = count( $id );
580
$media_const = 'RTMEDIA_' . strtoupper( $media->media_type );
581
+
582
if( $count > 1 ) {
583
$media_const .= '_PLURAL';
584
}
585
586
+ $media_const .= '_LABEL';
587
$media_str = constant( $media_const );
588
$action = sprintf( ( $count == 1 ) ? __( '%1$s added a %2$s', 'buddypress-media' ) : __( '%1$s added %4$d %3$s', 'buddypress-media' ), $username, $media->media_type, $media_str, $count );
589
$action = apply_filters( 'rtmedia_buddypress_action_text_fitler', $action, $username, $count, $user->user_nicename, $media->media_type );
590
$activity_args = array(
602
603
if( $media->context == 'group' || $media->context == 'profile' ) {
604
$activity_args[ 'component' ] = $media->context;
605
+
606
if( $media->context == 'group' ) {
607
$activity_args[ 'component' ] = "groups";
608
$activity_args[ 'item_id' ] = $media->context_id;
610
}
611
612
$activity_id = bp_activity_add( $activity_args );
613
614
+ bp_activity_update_meta( $activity_id, 'rtmedia_privacy', ( $media->privacy == 0 ) ? - 1 : $media->privacy );
615
$this->model->update( array( 'activity_id' => $activity_id ), array( 'id' => $media->id ) );
616
617
// insert/update activity details in rtmedia activity table
618
$rtmedia_activity_model = new RTMediaActivityModel();
619
+
620
if( !$rtmedia_activity_model->check( $activity_id ) ) {
621
$rtmedia_activity_model->insert( array( 'activity_id' => $activity_id, 'user_id' => $media->media_author, 'privacy' => $media->privacy ) );
622
} else {
app/main/controllers/shortcodes/RTMediaGalleryShortcode.php CHANGED
@@ -61,7 +61,7 @@ class RTMediaGalleryShortcode {
61
$params = array(
62
'url' => $url,
63
'runtimes' => 'html5,flash,html4',
64
- 'browse_button' => 'rtMedia-upload-button',
65
'container' => 'rtmedia-upload-container',
66
'drop_element' => 'drag-drop-area',
67
'filters' => apply_filters ( 'rtmedia_plupload_files_filter', array( array( 'title' => "Media Files", 'extensions' => get_rtmedia_allowed_upload_type () ) ) ),
@@ -73,7 +73,7 @@ class RTMediaGalleryShortcode {
73
'file_data_name' => 'rtmedia_file', // key passed to $_FILE.
74
'multi_selection' => true,
75
'multipart_params' => apply_filters ( 'rtmedia-multi-params', array( 'redirect' => 'no', 'action' => 'wp_handle_upload', '_wp_http_referer' => $_SERVER[ 'REQUEST_URI' ], 'mode' => 'file_upload', 'rtmedia_upload_nonce' => RTMediaUploadView::upload_nonce_generator ( false, true ) ) ),
76
- 'max_file_size_msg' => apply_filters("rtmedia_plupload_file_size_msg",min ( array( ini_get ( 'upload_max_filesize' ), ini_get ( 'post_max_size' ) ) ))
77
);
78
if ( wp_is_mobile () )
79
$params[ 'multi_selection' ] = false;
61
$params = array(
62
'url' => $url,
63
'runtimes' => 'html5,flash,html4',
64
+ 'browse_button' => apply_filters( 'rtmedia_upload_button_id', 'rtMedia-upload-button' ),
65
'container' => 'rtmedia-upload-container',
66
'drop_element' => 'drag-drop-area',
67
'filters' => apply_filters ( 'rtmedia_plupload_files_filter', array( array( 'title' => "Media Files", 'extensions' => get_rtmedia_allowed_upload_type () ) ) ),
73
'file_data_name' => 'rtmedia_file', // key passed to $_FILE.
74
'multi_selection' => true,
75
'multipart_params' => apply_filters ( 'rtmedia-multi-params', array( 'redirect' => 'no', 'action' => 'wp_handle_upload', '_wp_http_referer' => $_SERVER[ 'REQUEST_URI' ], 'mode' => 'file_upload', 'rtmedia_upload_nonce' => RTMediaUploadView::upload_nonce_generator ( false, true ) ) ),
76
+ 'max_file_size_msg' => apply_filters("rtmedia_plupload_file_size_msg",min ( array( ini_get ( 'upload_max_filesize' ), ini_get ( 'post_max_size' ) ) ))
77
);
78
if ( wp_is_mobile () )
79
$params[ 'multi_selection' ] = false;
app/main/controllers/template/RTMediaNav.php CHANGED
@@ -56,7 +56,7 @@ class RTMediaNav {
56
$tab_position = apply_filters('rtmedia_media_tab_position',99);
57
if ( $rtmedia->options[ "buddypress_enableOnProfile" ] != 0 ) {
58
bp_core_new_nav_item ( array(
59
- 'name' => RTMEDIA_MEDIA_LABEL . '<span>' . $profile_counts[ 'total' ][ 'all' ] . '</span>',
60
'slug' => apply_filters('rtmedia_media_tab_slug', RTMEDIA_MEDIA_SLUG ),
61
'screen_function' => array( $this, 'media_screen' ),
62
'default_subnav_slug' => 'all',
@@ -78,7 +78,7 @@ class RTMediaNav {
78
$group_counts = $this->actual_counts ( $bp->groups->current_group->id, "group" );
79
$slug = apply_filters('rtmedia_group_media_tab_slug', RTMEDIA_MEDIA_SLUG );
80
$bp->bp_options_nav[ bp_get_current_group_slug () ][ 'media' ] = array(
81
- 'name' => RTMEDIA_MEDIA_LABEL . '<span>' . $group_counts[ 'total' ][ 'all' ] . '</span>',
82
'link' => trailingslashit ( bp_get_root_domain () . '/' . bp_get_groups_root_slug () . '/' . bp_get_current_group_slug () . '/' ) . $slug,
83
'slug' => $slug,
84
'user_has_access' => true,
56
$tab_position = apply_filters('rtmedia_media_tab_position',99);
57
if ( $rtmedia->options[ "buddypress_enableOnProfile" ] != 0 ) {
58
bp_core_new_nav_item ( array(
59
+ 'name' => RTMEDIA_MEDIA_LABEL . ' <span>' . $profile_counts[ 'total' ][ 'all' ] . '</span>',
60
'slug' => apply_filters('rtmedia_media_tab_slug', RTMEDIA_MEDIA_SLUG ),
61
'screen_function' => array( $this, 'media_screen' ),
62
'default_subnav_slug' => 'all',
78
$group_counts = $this->actual_counts ( $bp->groups->current_group->id, "group" );
79
$slug = apply_filters('rtmedia_group_media_tab_slug', RTMEDIA_MEDIA_SLUG );
80
$bp->bp_options_nav[ bp_get_current_group_slug () ][ 'media' ] = array(
81
+ 'name' => RTMEDIA_MEDIA_LABEL . ' <span>' . $group_counts[ 'total' ][ 'all' ] . '</span>',
82
'link' => trailingslashit ( bp_get_root_domain () . '/' . bp_get_groups_root_slug () . '/' . bp_get_current_group_slug () . '/' ) . $slug,
83
'slug' => $slug,
84
'user_has_access' => true,
app/main/controllers/template/rt-template-functions.php CHANGED
@@ -2875,3 +2875,25 @@ function rtmedia_add_multiple_meta( $media_id, $meta_key_val ){
2875
return $meta_ids;
2876
}
2877
2875
return $meta_ids;
2876
}
2877
2878
+ /**
2879
+ * WordPress filter to change browser title if theme has title-tag support
2880
+ *
2881
+ * @param array $title
2882
+ *
2883
+ * @return array
2884
+ */
2885
+ function rtm_modify_document_title_parts( $title = array() ) {
2886
+ if( is_rtmedia_page() ) {
2887
+ global $rtmedia_query;
2888
+
2889
+ if ( isset( $rtmedia_query->action_query->media_type ) ) {
2890
+ ( !class_exists( 'BuddyPress' ) ) ? array_unshift( $title, ucfirst( $rtmedia_query->action_query->media_type ), RTMEDIA_MEDIA_LABEL ) : array_unshift( $title, ucfirst( $rtmedia_query->action_query->media_type ) );
2891
+ } else {
2892
+ ( !class_exists( 'BuddyPress' ) ) ? array_unshift( $title, RTMEDIA_MEDIA_LABEL ) : '';
2893
+ }
2894
+ }
2895
+
2896
+ return $title;
2897
+ }
2898
+
2899
+ add_filter( 'document_title_parts', 'rtm_modify_document_title_parts', 30, 1 );
app/main/controllers/upload/RTMediaUploadView.php CHANGED
@@ -78,7 +78,7 @@ class RTMediaUploadView {
78
'class' => array( 'rtm-upload-tab', 'active' ),
79
'content' => '<div class="rtm-upload-tab-content" data-id="rtm-upload-tab">'
80
. apply_filters( 'rtmedia_uploader_before_select_files', "" )
81
- . '<div class="rtm-select-files"><input id="rtMedia-upload-button" value="' . __( "Select your files", 'buddypress-media' ) . '" type="button" class="rtmedia-upload-input rtmedia-file" />'
82
. '<span class="rtm-seperator">' . __('or','buddypress-media') .'</span><span class="drag-drop-info">' . __('Drop your files here', 'buddypress-media') . '</span> <i class="rtm-file-size-limit rtmicon-info-circle rtmicon-fw"></i></div>'
83
. apply_filters( 'rtmedia_uploader_after_select_files', "" )
84
. '</div>',
@@ -106,7 +106,7 @@ class RTMediaUploadView {
106
}
107
global $rtmedia;
108
//Render UPLOAD button only if direct upload is disabled
109
- $upload_button = ( ! ( isset( $rtmedia->options[ "general_direct_upload" ] )&& $rtmedia->options[ "general_direct_upload" ] == 1 ) ? '<input type="button" class="start-media-upload" value="' . __( 'Start upload', 'buddypress-media' ) . '"/>' : '' );
110
$tabs = array(
111
'file_upload' => array(
112
'default' => array(
@@ -114,15 +114,16 @@ class RTMediaUploadView {
114
'content' =>
115
'<div id="rtmedia-upload-container" >'
116
. '<div id="drag-drop-area" class="drag-drop clearfix">'
117
- . apply_filters( 'rtmedia_uploader_before_album_privacy', "" )
118
- . "<div class='rtm-album-privacy'>" . $album . $privacy . "</div>"
119
- . $upload_tab_html
120
- . apply_filters( 'rtmedia_uploader_before_start_upload_button', "" )
121
- . $upload_button
122
- . apply_filters( 'rtmedia_uploader_after_start_upload_button', "" )
123
. '</div>'
124
- . '<div class="clearfix">'
125
- . '<ul class="plupload_filelist_content ui-sortable rtm-plupload-list clearfix" id="rtmedia_uploader_filelist"></ul></div>'
126
. '</div>'
127
),
128
'activity' => array(
@@ -131,9 +132,8 @@ class RTMediaUploadView {
131
'<div class="rtmedia-plupload-container rtmedia-container clearfix">'
132
.'<div id="rtmedia-action-update" class="clearfix">'
133
.'<div class="rtm-upload-button-wrapper">'
134
- .'<div id="rtmedia-whts-new-upload-container">'
135
- .'</div>'
136
- .'<button type="button" class="rtmedia-add-media-button" id="rtmedia-add-media-button-post-update" title="' . apply_filters( 'rtmedia_attach_media_button_title', __( 'Attach Media', 'buddypress-media' ) ) . '">'
137
.'<span class="dashicons dashicons-admin-media"></span>'
138
. apply_filters( 'rtmedia_attach_file_message', '' )
139
. '</button>'
@@ -141,9 +141,9 @@ class RTMediaUploadView {
141
. $up_privacy
142
. '</div>'
143
.'</div>'
144
.'<div class="rtmedia-plupload-notice">'
145
- .'<ul class="plupload_filelist_content ui-sortable rtm-plupload-list clearfix" id="rtmedia_uploader_filelist">'
146
- .'</ul>'
147
.'</div>'
148
)
149
),
78
'class' => array( 'rtm-upload-tab', 'active' ),
79
'content' => '<div class="rtm-upload-tab-content" data-id="rtm-upload-tab">'
80
. apply_filters( 'rtmedia_uploader_before_select_files', "" )
81
+ . '<div class="rtm-select-files"><input id="' . apply_filters( 'rtmedia_upload_button_id', 'rtMedia-upload-button' ) . '" value="' . __( "Select your files", 'buddypress-media' ) . '" type="button" class="rtmedia-upload-input rtmedia-file" />'
82
. '<span class="rtm-seperator">' . __('or','buddypress-media') .'</span><span class="drag-drop-info">' . __('Drop your files here', 'buddypress-media') . '</span> <i class="rtm-file-size-limit rtmicon-info-circle rtmicon-fw"></i></div>'
83
. apply_filters( 'rtmedia_uploader_after_select_files', "" )
84
. '</div>',
106
}
107
global $rtmedia;
108
//Render UPLOAD button only if direct upload is disabled
109
+ $upload_button = '<input type="button" class="start-media-upload" value="' . __( 'Start upload', 'buddypress-media' ) . '"/>';
110
$tabs = array(
111
'file_upload' => array(
112
'default' => array(
114
'content' =>
115
'<div id="rtmedia-upload-container" >'
116
. '<div id="drag-drop-area" class="drag-drop clearfix">'
117
+ . apply_filters( 'rtmedia_uploader_before_album_privacy', "" )
118
+ . "<div class='rtm-album-privacy'>" . $album . $privacy . "</div>"
119
+ . $upload_tab_html
120
+ . apply_filters( 'rtmedia_uploader_before_start_upload_button', "" )
121
+ . $upload_button
122
+ . apply_filters( 'rtmedia_uploader_after_start_upload_button', "" )
123
. '</div>'
124
+ . '<div class="clearfix">'
125
+ . '<ul class="plupload_filelist_content ui-sortable rtm-plupload-list clearfix" id="rtmedia_uploader_filelist"></ul>'
126
+ . '</div>'
127
. '</div>'
128
),
129
'activity' => array(
132
'<div class="rtmedia-plupload-container rtmedia-container clearfix">'
133
.'<div id="rtmedia-action-update" class="clearfix">'
134
.'<div class="rtm-upload-button-wrapper">'
135
+ .'<div id="rtmedia-whts-new-upload-container"></div>'
136
+ .'<button type="button" class="rtmedia-add-media-button" id="' . apply_filters( 'rtmedia_upload_button_id', 'rtmedia-add-media-button-post-update' ) . '" title="' . apply_filters( 'rtmedia_attach_media_button_title', __( 'Attach Media', 'buddypress-media' ) ) . '">'
137
.'<span class="dashicons dashicons-admin-media"></span>'
138
. apply_filters( 'rtmedia_attach_file_message', '' )
139
. '</button>'
141
. $up_privacy
142
. '</div>'
143
.'</div>'
144
+ . apply_filters( 'rtmedia_uploader_after_activity_upload_button', "" )
145
.'<div class="rtmedia-plupload-notice">'
146
+ .'<ul class="plupload_filelist_content ui-sortable rtm-plupload-list clearfix" id="rtmedia_uploader_filelist"></ul>'
147
.'</div>'
148
)
149
),
index.php CHANGED
@@ -4,7 +4,7 @@
4
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
Plugin URI: http://rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
- Version: 3.10.3
8
Author: rtCamp
9
Text Domain: buddypress-media
10
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
4
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
Plugin URI: http://rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
+ Version: 3.10.4
8
Author: rtCamp
9
Text Domain: buddypress-media
10
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
languages/buddypress-media.po CHANGED
@@ -1,2896 +1,2572 @@
1
- # Copyright (C) 2015 rtCamp
2
# This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
3
msgid ""
4
msgstr ""
5
- "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 3.9.4\n"
6
"Report-Msgid-Bugs-To: http://community.rtcamp.com/c/rtmedia/\n"
7
- "POT-Creation-Date: 2015-12-22 16:22+0530\n"
8
- "PO-Revision-Date: 2015-12-22 16:22+0530\n"
9
- "Last-Translator: rtMedia <rtmedia@rtcamp.com>\n"
10
- "Language-Team: rtMedia <rtmedia@rtcamp.com>\n"
11
- "Language: en\n"
12
"MIME-Version: 1.0\n"
13
"Content-Type: text/plain; charset=utf-8\n"
14
"Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 1.5.4\n"
16
- "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
- "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
- "esc_html_x:1,2c\n"
19
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
"X-Poedit-SourceCharset: UTF-8\n"
21
"X-Poedit-Basepath: ../\n"
22
- "X-Textdomain-Support: yes\n"
23
"X-Poedit-SearchPath-0: .\n"
24
25
- #: node_modules/grunt-wp-i18n/test/fixtures/translator-comments/translator-comments.php:7
26
- msgid "A"
27
msgstr ""
28
29
- #: node_modules/grunt-wp-i18n/test/fixtures/translator-comments/translator-comments.php:15
30
- msgid "B"
31
msgstr ""
32
33
- #: node_modules/grunt-wp-i18n/test/fixtures/basic-theme/exclude/file.php:3
34
- #: node_modules/grunt-wp-i18n/test/fixtures/plugin-include/plugin-include.php:6
35
- msgid "Exclude"
36
msgstr ""
37
38
- #: node_modules/grunt-wp-i18n/test/fixtures/plugin-include/include/file.php:2
39
- msgid "Include"
40
msgstr ""
41
42
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:2
43
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:3
44
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:4
45
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/add-domain.php:2
46
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:2
47
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:3
48
- msgid "String"
49
msgstr ""
50
51
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:6
52
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:7
53
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:8
54
- msgctxt "a string"
55
- msgid "String"
56
msgstr ""
57
58
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:9
59
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:10
60
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:11
61
- #, php-format
62
- msgid "1 Star"
63
- msgid_plural "%s Stars"
64
- msgstr[0] ""
65
- msgstr[1] ""
66
67
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:3
68
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:5
69
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:9
70
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:10
71
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:14
72
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:15
73
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:4
74
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:6
75
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:10
76
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:11
77
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:15
78
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:16
79
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:3
80
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:5
81
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:9
82
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:10
83
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:14
84
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:15
85
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:3
86
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:5
87
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:9
88
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:10
89
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:14
90
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:15
91
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:3
92
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:5
93
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:9
94
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:10
95
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:14
96
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:15
97
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:4
98
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:6
99
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:10
100
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:11
101
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:15
102
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:16
103
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:3
104
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:5
105
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:9
106
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:10
107
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:14
108
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:15
109
- msgid "Hello World"
110
- msgstr ""
111
-
112
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:4
113
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:6
114
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:11
115
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:16
116
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:5
117
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:7
118
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:12
119
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:17
120
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:4
121
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:6
122
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:11
123
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:16
124
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:4
125
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:6
126
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:11
127
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:16
128
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:4
129
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:6
130
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:11
131
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:16
132
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:5
133
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:7
134
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:12
135
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:17
136
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:4
137
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:6
138
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:11
139
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:16
140
- msgctxt "verb"
141
- msgid "Post"
142
- msgstr ""
143
-
144
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:20
145
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:24
146
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:21
147
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:25
148
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:20
149
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:24
150
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:20
151
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:24
152
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:20
153
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:24
154
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:21
155
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:25
156
- #: node_modules/grunt-checktextdomain/test/fixtures/plurals.php:3
157
- #: node_modules/grunt-checktextdomain/test/fixtures/plurals.php:8
158
- #: node_modules/grunt-checktextdomain/test/fixtures/plurals.php:15
159
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:20
160
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:24
161
- #, php-format
162
- msgid "%d apple"
163
- msgid_plural "%d apples"
164
- msgstr[0] ""
165
- msgstr[1] ""
166
167
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:21
168
- #: node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:25
169
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:22
170
- #: node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:26
171
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:21
172
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:25
173
- #: node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:25
174
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:21
175
- #: node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:25
176
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:22
177
- #: node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:26
178
- #: node_modules/grunt-checktextdomain/test/fixtures/plurals.php:4
179
- #: node_modules/grunt-checktextdomain/test/fixtures/plurals.php:9
180
- #: node_modules/grunt-checktextdomain/test/fixtures/plurals.php:16
181
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:21
182
- #: node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:25
183
- #, php-format
184
- msgctxt "noun, job positions"
185
- msgid "%d post"
186
- msgid_plural "%d posts"
187
- msgstr[0] ""
188
- msgstr[1] ""
189
190
- #: lib/freemius/includes/i18n.php:5
191
- msgid "Account"
192
msgstr ""
193
194
- #: lib/freemius/includes/i18n.php:6
195
- msgid "Add On"
196
msgstr ""
197
198
- #: lib/freemius/includes/i18n.php:7
199
- #: app/main/controllers/template/rt-template-functions.php:2714
200
- msgid "Contact Us"
201
msgstr ""
202
203
- #: lib/freemius/includes/i18n.php:8
204
- msgid "Change Ownership"
205
msgstr ""
206
207
- #: lib/freemius/includes/i18n.php:9 app/admin/RTMediaAdmin.php:743
208
- #: app/admin/RTMediaAdmin.php:746 app/admin/RTMediaAdmin.php:872
209
- #: app/admin/RTMediaAdmin.php:1414 app/helper/RTMediaSupport.php:51
210
- #: app/helper/RTMediaSupport.php:52 app/helper/RTMediaSettings.php:210
211
- msgid "Support"
212
msgstr ""
213
214
- #: lib/freemius/includes/i18n.php:10
215
- msgid "Support Forum"
216
msgstr ""
217
218
- #: lib/freemius/includes/i18n.php:11
219
- msgid "Add Ons"
220
msgstr ""
221
222
- #: lib/freemius/includes/i18n.php:12
223
- msgctxt "verb"
224
- msgid "Upgrade"
225
msgstr ""
226
227
- #: lib/freemius/includes/i18n.php:13
228
- msgid "Awesome"
229
msgstr ""
230
231
- #: lib/freemius/includes/i18n.php:14 app/services/RTMediaEncoding.php:391
232
- msgid "Pricing"
233
msgstr ""
234
235
- #: lib/freemius/includes/i18n.php:15
236
- msgctxt "noun"
237
- msgid "Price"
238
msgstr ""
239
240
- #: lib/freemius/includes/i18n.php:16
241
- msgid "Unlimited Updates"
242
msgstr ""
243
244
- #: lib/freemius/includes/i18n.php:17
245
- msgctxt "verb"
246
- msgid "Downgrade"
247
msgstr ""
248
249
- #: lib/freemius/includes/i18n.php:18
250
- msgid "Free Trial"
251
msgstr ""
252
253
- #: lib/freemius/includes/i18n.php:19 app/helper/RTMediaSupport.php:447
254
- #: templates/media/media-single-edit.php:16
255
- #: templates/media/album-single-edit.php:16
256
- msgid "Details"
257
msgstr ""
258
259
- #: lib/freemius/includes/i18n.php:20
260
- msgid "Account Details"
261
msgstr ""
262
263
- #: lib/freemius/includes/i18n.php:21
264
- msgctxt "verb"
265
- msgid "Delete"
266
msgstr ""
267
268
- #: lib/freemius/includes/i18n.php:22
269
- msgid "Delete Account"
270
msgstr ""
271
272
- #: lib/freemius/includes/i18n.php:23 app/admin/RTMediaAdmin.php:395
273
- msgid "Dismiss"
274
msgstr ""
275
276
- #: lib/freemius/includes/i18n.php:24
277
- msgctxt "as product pricing plan"
278
- msgid "Plan"
279
msgstr ""
280
281
- #: lib/freemius/includes/i18n.php:25
282
- msgid "Change Plan"
283
msgstr ""
284
285
- #: lib/freemius/includes/i18n.php:26
286
- #, php-format
287
- msgctxt "as download professional version"
288
- msgid "Download %s Version"
289
msgstr ""
290
291
- #: lib/freemius/includes/i18n.php:27
292
- #, php-format
293
- msgctxt "as download professional version now"
294
- msgid "Download %s version now"
295
msgstr ""
296
297
- #: lib/freemius/includes/i18n.php:28
298
- msgctxt "as download latest version"
299
- msgid "Download Latest"
300
msgstr ""
301
302
- #: lib/freemius/includes/i18n.php:29
303
- #, php-format
304
- msgctxt "E.g. you have a professional license."
305
- msgid "You have a %s license."
306
msgstr ""
307
308
- #: lib/freemius/includes/i18n.php:30
309
- msgid "New"
310
msgstr ""
311
312
- #: lib/freemius/includes/i18n.php:31 app/services/RTMediaEncoding.php:349
313
- #: app/services/RTMediaEncoding.php:392
314
- msgid "Free"
315
msgstr ""
316
317
- #: lib/freemius/includes/i18n.php:32
318
- msgctxt "as trial plan"
319
- msgid "Trial"
320
msgstr ""
321
322
- #: lib/freemius/includes/i18n.php:33
323
- msgctxt "verb"
324
- msgid "Purchase"
325
msgstr ""
326
327
- #: lib/freemius/includes/i18n.php:34
328
- msgid "Single Site License"
329
msgstr ""
330
331
- #: lib/freemius/includes/i18n.php:35
332
- msgid "Unlimited Licenses"
333
msgstr ""
334
335
- #: lib/freemius/includes/i18n.php:36
336
- #, php-format
337
- msgid "Up to %s Sites"
338
msgstr ""
339
340
- #: lib/freemius/includes/i18n.php:37
341
- #, php-format
342
- msgctxt "e.g. Professional Plan"
343
- msgid "%s Plan"
344
msgstr ""
345
346
- #: lib/freemius/includes/i18n.php:38
347
- #, php-format
348
- msgid "You are just one step away - %s"
349
msgstr ""
350
351
- #: lib/freemius/includes/i18n.php:39
352
- #, php-format
353
- msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
354
- msgid "Complete \"%s\" Activation Now"
355
msgstr ""
356
357
- #: lib/freemius/includes/i18n.php:40
358
- #, php-format
359
- msgid "We made a few tweaks to the plugin, %s"
360
msgstr ""
361
362
- #: lib/freemius/includes/i18n.php:41
363
- #, php-format
364
- msgid "Opt-in to make \"%s\" Better!"
365
msgstr ""
366
367
- #: lib/freemius/includes/i18n.php:42
368
- msgid "Error"
369
msgstr ""
370
371
- #: lib/freemius/includes/i18n.php:43
372
- msgid ""
373
- "Freemius SDK couldn't find the plugin's main file. Please contact "
374
- "sdk@freemius.com with the current error."
375
msgstr ""
376
377
- #: lib/freemius/includes/i18n.php:46
378
- msgctxt "as expiration date"
379
- msgid "Expiration"
380
msgstr ""
381
382
- #: lib/freemius/includes/i18n.php:47
383
- msgid "not verified"
384
msgstr ""
385
386
- #: lib/freemius/includes/i18n.php:48
387
- msgid "Verify Email"
388
msgstr ""
389
390
- #: lib/freemius/includes/i18n.php:49
391
- #, php-format
392
- msgctxt "e.g. expires in 2 months"
393
- msgid "Expires in %s"
394
msgstr ""
395
396
- #: lib/freemius/includes/i18n.php:50
397
- #, php-format
398
- msgctxt "e.g. auto renews in 2 months"
399
- msgid "Auto renews in %s"
400
msgstr ""
401
402
- #: lib/freemius/includes/i18n.php:51
403
- msgid "No expiration"
404
msgstr ""
405
406
- #: lib/freemius/includes/i18n.php:52
407
- msgid "Expired"
408
msgstr ""
409
410
- #: lib/freemius/includes/i18n.php:53
411
- #, php-format
412
- msgid "In %s"
413
msgstr ""
414
415
- #: lib/freemius/includes/i18n.php:54
416
- msgctxt "as plugin version"
417
- msgid "Version"
418
msgstr ""
419
420
- #: lib/freemius/includes/i18n.php:55 app/helper/RTMediaSupport.php:415
421
- msgid "Name"
422
msgstr ""
423
424
- #: lib/freemius/includes/i18n.php:56 app/helper/RTMediaSupport.php:426
425
- msgid "Email"
426
msgstr ""
427
428
- #: lib/freemius/includes/i18n.php:57
429
- msgid "Verified"
430
msgstr ""
431
432
- #: lib/freemius/includes/i18n.php:58
433
- msgid "Plugin"
434
msgstr ""
435
436
- #: lib/freemius/includes/i18n.php:59
437
- msgid "Title"
438
msgstr ""
439
440
- #: lib/freemius/includes/i18n.php:60
441
- msgctxt "as WP plugin slug"
442
- msgid "Slug"
443
msgstr ""
444
445
- #: lib/freemius/includes/i18n.php:61
446
- msgid "ID"
447
msgstr ""
448
449
- #: lib/freemius/includes/i18n.php:62 app/importers/BPMediaAlbumimporter.php:80
450
- msgid "Users"
451
msgstr ""
452
453
- #: lib/freemius/includes/i18n.php:63
454
- msgid "Plugin Installs"
455
msgstr ""
456
457
- #: lib/freemius/includes/i18n.php:64
458
- msgctxt "like websites"
459
- msgid "Sites"
460
- msgstr ""
461
-
462
- #: lib/freemius/includes/i18n.php:65
463
- msgid "User ID"
464
- msgstr ""
465
-
466
- #: lib/freemius/includes/i18n.php:66
467
- msgid "Site ID"
468
- msgstr ""
469
-
470
- #: lib/freemius/includes/i18n.php:67
471
- msgid "Public Key"
472
- msgstr ""
473
-
474
- #: lib/freemius/includes/i18n.php:68
475
- msgid "Secret Key"
476
- msgstr ""
477
-
478
- #: lib/freemius/includes/i18n.php:69
479
- msgctxt "as secret encryption key missing"
480
- msgid "No Secret"
481
- msgstr ""
482
-
483
- #: lib/freemius/includes/i18n.php:70
484
- msgid "No ID"
485
- msgstr ""
486
-
487
- #: lib/freemius/includes/i18n.php:71
488
- msgctxt "as synchronize license"
489
- msgid "Sync License"
490
- msgstr ""
491
-
492
- #: lib/freemius/includes/i18n.php:72 app/helper/RTMediaLicense.php:96
493
- msgid "Deactivate License"
494
- msgstr ""
495
-
496
- #: lib/freemius/includes/i18n.php:73
497
- msgid "Activate"
498
- msgstr ""
499
-
500
- #: lib/freemius/includes/i18n.php:74 lib/freemius/includes/i18n.php:95
501
- msgid "Deactivate"
502
msgstr ""
503
504
- #: lib/freemius/includes/i18n.php:75
505
- msgctxt "active mode"
506
- msgid "Active"
507
msgstr ""
508
509
- #: lib/freemius/includes/i18n.php:76
510
- #: lib/freemius/includes/fs-plugin-functions.php:390
511
- msgid "Install Now"
512
msgstr ""
513
514
- #: lib/freemius/includes/i18n.php:77
515
- #: lib/freemius/includes/fs-plugin-functions.php:395
516
- msgid "Install Update Now"
517
msgstr ""
518
519
- #: lib/freemius/includes/i18n.php:78
520
- #, php-format
521
- msgid "More information about %s"
522
msgstr ""
523
524
- #: lib/freemius/includes/i18n.php:79
525
- msgid "Localhost"
526
msgstr ""
527
528
- #: lib/freemius/includes/i18n.php:80
529
- #, php-format
530
- msgctxt "as activate Professional plan"
531
- msgid "Activate %s Plan"
532
msgstr ""
533
534
- #: lib/freemius/includes/i18n.php:81
535
- #, php-format
536
- msgid "What is your %s?"
537
msgstr ""
538
539
- #: lib/freemius/includes/i18n.php:82
540
- msgid "Activate this add-on"
541
msgstr ""
542
543
- #: lib/freemius/includes/i18n.php:83
544
msgid ""
545
- "Deactivating your license will block all premium features, but will enable "
546
- "you to activate the license on another site. Are you sure you want to "
547
- "proceed?"
548
msgstr ""
549
550
- #: lib/freemius/includes/i18n.php:84
551
- #, php-format
552
msgid ""
553
- "Deleting the account will automatically deactivate your %s plan license so "
554
- "you can use it on other sites. If you want to terminate the recurring "
555
- "payments as well, click the \"Cancel\" button, and first \"Downgrade\" your "
556
- "account. Are you sure you would like to continue with the deletion?"
557
msgstr ""
558
559
- #: lib/freemius/includes/i18n.php:85
560
- msgid ""
561
- "Deletion is not temporary. Only delete if you no longer want to use this "
562
- "plugin anymore. Are you sure you would like to continue with the deletion?"
563
msgstr ""
564
565
- #: lib/freemius/includes/i18n.php:86
566
- #, php-format
567
- msgid ""
568
- "Downgrading your plan will immediately stop all future recurring payments "
569
- "and your %s plan license will expire in %s."
570
msgstr ""
571
572
- #: lib/freemius/includes/i18n.php:87
573
- #, php-format
574
- msgid ""
575
- "You can still enjoy all %s features but you will not have access to plugin "
576
- "updates and support."
577
msgstr ""
578
579
- #: lib/freemius/includes/i18n.php:88
580
- #, php-format
581
msgid ""
582
- "Once your license expire you can still use the Free version but you will NOT "
583
- "have access to the %s features."
584
msgstr ""
585
586
- #: lib/freemius/includes/i18n.php:89
587
- msgid "Are you sure you want to proceed?"
588
msgstr ""
589
590
- #: lib/freemius/includes/i18n.php:92
591
- #, php-format
592
- msgid "Add Ons for %s"
593
msgstr ""
594
595
- #: lib/freemius/includes/i18n.php:94
596
- msgid "If you have a moment, please let us know why you are deactivating"
597
msgstr ""
598
599
- #: lib/freemius/includes/i18n.php:96
600
- msgid "Yes - Deactivate"
601
msgstr ""
602
603
- #: lib/freemius/includes/i18n.php:97
604
- msgid "Submit & Deactivate"
605
msgstr ""
606
607
- #: lib/freemius/includes/i18n.php:98
608
- msgctxt "the text of the cancel button of the plugin deactivation dialog box."
609
- msgid "Cancel"
610
msgstr ""
611
612
- #: lib/freemius/includes/i18n.php:99
613
- msgid "I no longer need the plugin"
614
msgstr ""
615
616
- #: lib/freemius/includes/i18n.php:100
617
- msgid "I found a better plugin"
618
msgstr ""
619
620
- #: lib/freemius/includes/i18n.php:101
621
- msgid "I only needed the plugin for a short period"
622
msgstr ""
623
624
- #: lib/freemius/includes/i18n.php:102
625
- msgid "The plugin broke my site"
626
msgstr ""
627
628
- #: lib/freemius/includes/i18n.php:103
629
- msgid "The plugin suddenly stopped working"
630
msgstr ""
631
632
- #: lib/freemius/includes/i18n.php:104
633
- msgid "I can't pay for it anymore"
634
msgstr ""
635
636
- #: lib/freemius/includes/i18n.php:105
637
- msgctxt ""
638
- "the text of the \"other\" reason for deactivating the plugin that is shown "
639
- "in the modal box."
640
- msgid "Other"
641
msgstr ""
642
643
- #: lib/freemius/includes/i18n.php:106
644
- msgid "What's the plugin's name?"
645
msgstr ""
646
647
- #: lib/freemius/includes/i18n.php:107
648
- msgid "What price would you feel comfortable paying?"
649
msgstr ""
650
651
- #: lib/freemius/includes/i18n.php:108
652
- msgid "I couldn't understand how to make it work"
653
msgstr ""
654
655
- #: lib/freemius/includes/i18n.php:109
656
- msgid "The plugin is great, but I need specific feature that you don't support"
657
msgstr ""
658
659
- #: lib/freemius/includes/i18n.php:110
660
- msgid "The plugin is not working"
661
msgstr ""
662
663
- #: lib/freemius/includes/i18n.php:111
664
- msgid "It's not what I was looking for"
665
msgstr ""
666
667
- #: lib/freemius/includes/i18n.php:112
668
- msgid "The plugin didn't work as expected"
669
msgstr ""
670
671
- #: lib/freemius/includes/i18n.php:113
672
- msgid "What feature?"
673
msgstr ""
674
675
- #: lib/freemius/includes/i18n.php:114
676
- msgid "Kindly share what didn't work so we can fix it for future users..."
677
msgstr ""
678
679
- #: lib/freemius/includes/i18n.php:115
680
- msgid "What you've been looking for?"
681
msgstr ""
682
683
- #: lib/freemius/includes/i18n.php:116
684
- msgid "What did you expect?"
685
msgstr ""
686
687
- #: lib/freemius/includes/i18n.php:117
688
- msgid "The plugin didn't work"
689
msgstr ""
690
691
- #: lib/freemius/includes/i18n.php:118
692
- msgid "I don't like to share my information with you"
693
msgstr ""
694
695
- #: lib/freemius/includes/i18n.php:122
696
- #, php-format
697
- msgctxt "greeting"
698
- msgid "Hey %s,"
699
msgstr ""
700
701
- #: lib/freemius/includes/i18n.php:123
702
- #, php-format
703
- msgctxt "a greeting. E.g. Thanks John!"
704
- msgid "Thanks %s!"
705
msgstr ""
706
707
- #: lib/freemius/includes/i18n.php:124
708
- #, php-format
709
msgid ""
710
- "In order to enjoy all our features and functionality, %s needs to connect "
711
- "your user, %s at %s, to %s"
712
msgstr ""
713
714
- #: lib/freemius/includes/i18n.php:125
715
- #, php-format
716
- msgid ""
717
- "You should receive an activation email for %s to your mailbox at %s. Please "
718
- "make sure you click the activation button in that email to complete the "
719
- "install."
720
msgstr ""
721
722
- #: lib/freemius/includes/i18n.php:126
723
- msgid "What permissions are being granted?"
724
msgstr ""
725
726
- #: lib/freemius/includes/i18n.php:127
727
- msgid "Your Profile Overview"
728
msgstr ""
729
730
- #: lib/freemius/includes/i18n.php:128
731
- msgid "Name and email address"
732
msgstr ""
733
734
- #: lib/freemius/includes/i18n.php:129
735
- msgid "Your Site Overview"
736
msgstr ""
737
738
- #: lib/freemius/includes/i18n.php:130
739
- msgid "Site address and WordPress version"
740
msgstr ""
741
742
- #: lib/freemius/includes/i18n.php:131
743
- msgid "Current Plugin Events"
744
msgstr ""
745
746
- #: lib/freemius/includes/i18n.php:132
747
- msgid "Activation, deactivation and uninstall"
748
msgstr ""
749
750
- #: lib/freemius/includes/i18n.php:133
751
- msgid "Privacy Policy"
752
msgstr ""
753
754
- #: lib/freemius/includes/i18n.php:134
755
- msgid "Terms of Service"
756
msgstr ""
757
758
- #: lib/freemius/includes/i18n.php:135
759
- msgctxt "as activating plugin"
760
- msgid "Activating"
761
msgstr ""
762
763
- #: lib/freemius/includes/i18n.php:136
764
- msgctxt "button label"
765
- msgid "Allow & Continue"
766
msgstr ""
767
768
- #: lib/freemius/includes/i18n.php:137
769
- msgctxt "verb"
770
- msgid "Skip"
771
msgstr ""
772
773
- #: lib/freemius/includes/i18n.php:138
774
- msgid "Re-send activation email"
775
msgstr ""
776
777
- #: lib/freemius/includes/i18n.php:142
778
- msgid "Screenshots"
779
msgstr ""
780
781
- #: lib/freemius/includes/i18n.php:143
782
- #, php-format
783
- msgid "Click to view full-size screenshot %d"
784
msgstr ""
785
786
- #: lib/freemius/includes/i18n.php:147
787
- #, php-format
788
- msgid "Add Ons of Plugin %s"
789
msgstr ""
790
791
- #: lib/freemius/includes/i18n.php:148
792
- msgid "Are you sure you want to delete the all Freemius data?"
793
msgstr ""
794
795
- #: lib/freemius/includes/i18n.php:149
796
- msgid "Delete All Accounts"
797
msgstr ""
798
799
- #: lib/freemius/includes/i18n.php:153
800
- msgctxt "as congratulations"
801
- msgid "Congrats"
802
msgstr ""
803
804
- #: lib/freemius/includes/i18n.php:154
805
- msgctxt "exclamation"
806
- msgid "Oops"
807
msgstr ""
808
809
- #: lib/freemius/includes/i18n.php:155
810
- msgctxt "interjection expressing joy or exuberance"
811
- msgid "Yee-haw"
812
msgstr ""
813
814
- #: lib/freemius/includes/i18n.php:156
815
- msgctxt ""
816
- "(especially in electronic communication) used to express elation, "
817
- "enthusiasm, or triumph."
818
- msgid "W00t"
819
msgstr ""
820
821
- #: lib/freemius/includes/i18n.php:157
822
- msgctxt "a positive response"
823
- msgid "Right on"
824
msgstr ""
825
826
- #: lib/freemius/includes/i18n.php:158
827
- msgctxt ""
828
- "something somebody says when they are thinking about what you have just "
829
- "said. "
830
- msgid "Hmm"
831
msgstr ""
832
833
- #: lib/freemius/includes/i18n.php:159
834
- msgid "O.K"
835
msgstr ""
836
837
- #: lib/freemius/includes/i18n.php:160
838
- msgctxt "exclamation"
839
- msgid "Hey"
840
msgstr ""
841
842
- #: lib/freemius/includes/i18n.php:161
843
- msgctxt "advance notice of something that will need attention."
844
- msgid "Heads up"
845
msgstr ""
846
847
- #: lib/freemius/includes/i18n.php:165
848
- msgid "Seems like you got the latest release."
849
msgstr ""
850
851
- #: lib/freemius/includes/i18n.php:166
852
- msgid "You are all good!"
853
msgstr ""
854
855
- #: lib/freemius/includes/i18n.php:167
856
msgid ""
857
- "Sorry, we could not complete the email update. Another user with the same "
858
- "email is already registered."
859
msgstr ""
860
861
- #: lib/freemius/includes/i18n.php:168
862
- #, php-format
863
- msgid ""
864
- "If you would like to give up the ownership of the plugin's account to %s "
865
- "click the Change Ownership button."
866
msgstr ""
867
868
- #: lib/freemius/includes/i18n.php:169
869
- msgid ""
870
- "Your email was successfully updated. You should receive an email with "
871
- "confirmation instructions in few moments."
872
msgstr ""
873
874
- #: lib/freemius/includes/i18n.php:170
875
- msgid "Your name was successfully updated."
876
msgstr ""
877
878
- #: lib/freemius/includes/i18n.php:171
879
- #, php-format
880
- msgid "You have successfully updated your %s."
881
msgstr ""
882
883
- #: lib/freemius/includes/i18n.php:172
884
- msgid "Please provide your full name."
885
msgstr ""
886
887
- #: lib/freemius/includes/i18n.php:173
888
- #, php-format
889
- msgid ""
890
- "Verification mail was just sent to %s. If you can't find it after 5 min, "
891
- "please check your spam box."
892
msgstr ""
893
894
- #: lib/freemius/includes/i18n.php:174
895
- #, php-format
896
msgid ""
897
- "Just letting you know that the add-ons information of %s is being pulled "
898
- "from external server."
899
- msgstr ""
900
-
901
- #: lib/freemius/includes/i18n.php:175
902
- msgid "No credit card required"
903
- msgstr ""
904
-
905
- #: lib/freemius/includes/i18n.php:176
906
- msgid "Premium plugin version was successfully activated."
907
msgstr ""
908
909
- #: lib/freemius/includes/i18n.php:177
910
- #, php-format
911
- msgid "The upgrade of %s was successfully completed."
912
- msgstr ""
913
-
914
- #: lib/freemius/includes/i18n.php:178
915
- #, php-format
916
- msgid "Your account was successfully activated with the %s plan."
917
msgstr ""
918
919
- #: lib/freemius/includes/i18n.php:179
920
- #, php-format
921
- msgid "Download the latest %s version now"
922
msgstr ""
923
924
- #: lib/freemius/includes/i18n.php:180
925
- msgid "Download the latest version now"
926
msgstr ""
927
928
- #: lib/freemius/includes/i18n.php:181
929
- #, php-format
930
- msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
931
- msgid "%s Add-on was successfully purchased."
932
msgstr ""
933
934
- #: lib/freemius/includes/i18n.php:182
935
- #, php-format
936
- msgid "Your %s Add-on plan was successfully upgraded."
937
msgstr ""
938
939
- #: lib/freemius/includes/i18n.php:183
940
- msgid "Your email has been successfully verified - you are AWESOME!"
941
msgstr ""
942
943
- #: lib/freemius/includes/i18n.php:184
944
- msgid "Your plan was successfully upgraded."
945
msgstr ""
946
947
- #: lib/freemius/includes/i18n.php:185
948
- #, php-format
949
- msgid "Your plan was successfully changed to %s."
950
msgstr ""
951
952
- #: lib/freemius/includes/i18n.php:186
953
- msgid ""
954
- "Your license has expired. You can still continue using the free plugin "
955
- "forever."
956
msgstr ""
957
958
- #: lib/freemius/includes/i18n.php:187
959
- msgid "Your trial has been successfully started."
960
msgstr ""
961
962
- #: lib/freemius/includes/i18n.php:188
963
- msgid "Your license was successfully activated."
964
msgstr ""
965