diff --git a/_inc/build/infinite-scroll/infinity.min.js b/_inc/build/infinite-scroll/infinity.min.js index 3d00b123d73dd..f0b01fe0399a0 100644 --- a/_inc/build/infinite-scroll/infinity.min.js +++ b/_inc/build/infinite-scroll/infinity.min.js @@ -1,3 +1,3 @@ /* Do not modify this file directly. It is compiled from other files. */ /* globals infiniteScroll, _wpmejsSettings, ga, _gaq, WPCOM_sharing_counts, MediaElementPlayer */ -!function(){var Scroller,ajaxurl,stats,type,text,totop,loading_text,isIE=-1!=navigator.userAgent.search("MSIE");if(isIE){var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/);IEVersion=parseInt(IEVersion[1])}function fullscreenState(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?1:0}"https:"==document.location.protocol&&(infiniteScroll.settings.ajaxurl=infiniteScroll.settings.ajaxurl.replace("http://","https://")),Scroller=function(e){var t=this;this.id=e.id,this.body=document.body,this.window=window,this.element=document.getElementById(e.id),this.wrapperClass=e.wrapper_class,this.ready=!0,this.disabled=!1,this.page=1,this.offset=e.offset,this.currentday=e.currentday,this.order=e.order,this.throttle=!1,this.click_handle=e.click_handle,this.google_analytics=e.google_analytics,this.history=e.history,this.origURL=window.location.href,this.handle=document.createElement("div"),this.handle.setAttribute("id","infinite-handle"),this.handle.innerHTML="",this.footer={el:document.getElementById("infinite-footer"),wrap:e.footer},this.checkViewportOnLoadBound=t.checkViewportOnLoad.bind(this),this.wpMediaelement=null,"scroll"==type?(this.window.addEventListener("scroll",function(){t.throttle=!0}),t.gotop(),setInterval(function(){t.throttle&&(t.throttle=!1,t.thefooter(),t.refresh(),t.determineURL())},250),t.ensureFilledViewport(),this.body.addEventListener("is.post-load",t.checkViewportOnLoadBound)):"click"==type&&(this.click_handle&&this.element.appendChild(this.handle),this.handle.addEventListener("click",function(){t.click_handle&&t.handle.parentNode.removeChild(t.handle),t.refresh()})),this.body.addEventListener("is.post-load",t.initializeMejs)},Scroller.prototype.getScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Scroller.prototype.extend=function(e){e=e||{};for(var t=1;t0;){var i=t.shift();this.element.appendChild(i)}this.trigger(this.body,"is.post-load",{jqueryEventName:"post-load",data:e}),this.ready=!0},Scroller.prototype.query=function(){return{page:this.page+this.offset,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,query_before:window.infiniteScroll.settings.query_before,last_post_date:window.infiniteScroll.settings.last_post_date}},Scroller.prototype.animate=function(e,t){var i=performance.now();requestAnimationFrame(function n(o){var r=Math.min(1,(o-i)/t);e(r),r<1&&requestAnimationFrame(n)})},Scroller.prototype.gotop=function(){var e=document.getElementById("infinity-blog-title"),t=this;e&&(e.setAttribute("title",totop),e.addEventListener("click",function(e){var i=t.window.pageYOffset;e.preventDefault(),t.animate(function(e){var t=i-i*e;document.documentElement.scrollTop=document.body.scrollTop=t},200)}))},Scroller.prototype.thefooter=function(){var e,t,i,n,o=this;if(this.footer&&this.footer.el){if("string"==typeof this.footer.wrap){try{t=(t=document.getElementById(this.footer.wrap).getBoundingClientRect()).width}catch(e){t=0}t>479&&(e=this.footer.el.querySelector(".container"))&&(e.style.width=t+"px")}i=parseInt(o.footer.el.style.bottom||-50,10),n=this.window.pageYOffset>=350?0:-50,i!==n&&o.animate(function(e){var t=i+(n-i)*e;o.footer.el.style.bottom=t+"px",1===e&&(i=n)},200)}},Scroller.prototype.urlEncodeJSON=function(e,t){var i,n,o=[];for(var r in e)i=encodeURIComponent(r),n=t?t+"["+i+"]":i,"object"==typeof e[r]?!Array.isArray(e[r])||e[r].length>0?o.push(this.urlEncodeJSON(e[r],n)):o.push(n+"[]="):o.push(n+"="+encodeURIComponent(e[r]));return o.join("&")},Scroller.prototype.refresh=function(){var self=this,query,xhr,loader,customized;if(!this.disabled&&this.ready&&this.check())return this.ready=!1,this.click_handle&&(loader||(document.getElementById("infinite-aria").textContent=loading_text,loader=document.createElement("div"),loader.classList.add("infinite-loader"),loader.setAttribute("role","progress"),loader.innerHTML='
'),this.element.appendChild(loader)),query=self.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each(function(e){e._dirty&&(customized[e.id]=e())}),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),xhr=new XMLHttpRequest,xhr.open("POST",infiniteScroll.settings.ajaxurl,!0),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),xhr.send(self.urlEncodeJSON(query)),xhr.onerror=function(){self.click_handle&&loader.parentNode.removeChild(loader),self.ready=!0},xhr.onload=function(){var response=JSON.parse(xhr.responseText),httpCheck=xhr.status>=200&&xhr.status<300,responseCheck=void 0!==response.html;if(response&&httpCheck&&responseCheck&&(self.click_handle&&loader.parentNode.removeChild(loader),response.scripts&&Array.isArray(response.scripts)&&response.scripts.forEach(function(e){var t=e.footer?"body":"head";window.infiniteScroll.settings.scripts.push(e.handle),e.extra_data&&self.appendInlineScript(e.extra_data,t),e.before_handle&&self.appendInlineScript(e.before_handle,t);var i=document.createElement("script");i.type="text/javascript",i.src=e.src,i.id=e.handle,i.async=!1,e.after_handle&&(i.onload=function(){self.appendInlineScript(e.after_handle,t)}),"wp-mediaelement"===e.handle&&self.body.removeEventListener("is.post-load",self.initializeMejs),"wp-mediaelement"===e.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=i,self.wpMediaelement.element=t,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(t)[0].appendChild(i)}),response.styles&&Array.isArray(response.styles)&&response.styles.forEach(function(item){window.infiniteScroll.settings.styles.push(item.handle);var style=document.createElement("link");style.rel="stylesheet",style.href=item.src,style.id=item.handle+"-css",!item.conditional||isIE&&eval(item.conditional.replace(/%ver/g,IEVersion))||(style=!1),style&&document.getElementsByTagName("head")[0].appendChild(style)}),response.fragment=document.createElement("div"),response.fragment.innerHTML=response.html,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=self.extend(WPCOM_sharing_counts,response.postflair)),self.render.call(self,response),"click"==type?(document.querySelector("#infinite-view-"+(self.page+self.offset-1)+" a:first-of-type").focus({preventScroll:!0}),response.lastbatch?self.click_handle?(self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")):self.trigger(this.body,"infinite-scroll-posts-end"):self.click_handle?self.element.appendChild(self.handle):self.trigger(this.body,"infinite-scroll-posts-more")):response.lastbatch&&(self.disabled=!0,self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics)){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}},xhr},Scroller.prototype.appendInlineScript=function(e,t){var i=document.createElement("script"),n=document.createTextNode("//");i.type="text/javascript",i.appendChild(n),document.getElementsByTagName(t)[0].appendChild(i)},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs.bind(this),250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.addEventListener("is.post-load",this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e){if(e.detail&&e.detail.html&&(-1!==e.detail.html.indexOf("wp-audio-shortcode")||-1!==e.detail.html.indexOf("wp-video-shortcode"))&&"undefined"!=typeof mejs){var t,i={};"undefined"!=typeof _wpmejsSettings&&(i.pluginPath=_wpmejsSettings.pluginPath),i.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1)},t=document.querySelectorAll(".wp-audio-shortcode, .wp-video-shortcode"),t=(t=Array.prototype.slice.call(t)).filter(function(e){for(;e.parentNode;){if(e.classList.contains("mejs-container"))return!1;e=e.parentNode}return!0});for(var n=0;n0;){for(i=r.shift(),o=0;o=a;return{top:s,bottom:l,height:l-s,factor:(Math.min(l,a)-Math.max(s,0))/a,isActive:d}},Scroller.prototype.ensureFilledViewport=function(){var e=this.window.innerHeight,t=this.measure(this.element,[this.wrapperClass]);this.body.removeEventListener("is.post-load",this.checkViewportOnLoadBound),t.bottomn&&(t=parseInt(e[o].dataset.pageNum,10),n=r.factor)}this.updateURL(t)}},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this.origURL;-1!==e&&(t=window.location.protocol+"//"+this.history.host+this.history.path.replace(/%d/,e)+this.history.parameters),window.location.href!=t&&history.pushState(null,null,t)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},Scroller.prototype.trigger=function(e,t,i){var n;(i=i||{}).jqueryEventName&&"undefined"!=typeof jQuery&&jQuery(e).trigger(i.jqueryEventName,i.data||null);try{n=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i.data||null})}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,i.data||null)}e.dispatchEvent(n)};var jetpackInfinityModule=function(){var e=infiniteScroll.settings.body_class.split(" ");if("object"==typeof infiniteScroll&&(e.forEach(function(e){e&&document.body.classList.add(e)}),ajaxurl=infiniteScroll.settings.ajaxurl,stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,loading_text=infiniteScroll.settings.loading_text,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"==type)){var t=null;window.addEventListener("scroll",function(){t||(t=setTimeout(function(){infiniteScroll.scroller.determineURL(),t=null},250))})}};"interactive"===document.readyState||"complete"===document.readyState?jetpackInfinityModule():document.addEventListener("DOMContentLoaded",jetpackInfinityModule)}(); \ No newline at end of file +!function(){var Scroller,ajaxurl,stats,type,text,totop,loading_text,isIE=-1!=navigator.userAgent.search("MSIE");if(isIE){var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/);IEVersion=parseInt(IEVersion[1])}function fullscreenState(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?1:0}"https:"==document.location.protocol&&(infiniteScroll.settings.ajaxurl=infiniteScroll.settings.ajaxurl.replace("http://","https://")),Scroller=function(e){var t=this;this.id=e.id,this.body=document.body,this.window=window,this.element=document.getElementById(e.id),this.wrapperClass=e.wrapper_class,this.ready=!0,this.disabled=!1,this.page=1,this.offset=e.offset,this.currentday=e.currentday,this.order=e.order,this.throttle=!1,this.click_handle=e.click_handle,this.google_analytics=e.google_analytics,this.history=e.history,this.origURL=window.location.href,this.handle=document.createElement("div"),this.handle.setAttribute("id","infinite-handle"),this.handle.innerHTML="",this.footer={el:document.getElementById("infinite-footer"),wrap:e.footer},this.checkViewportOnLoadBound=t.checkViewportOnLoad.bind(this),this.wpMediaelement=null,"scroll"==type?(this.window.addEventListener("scroll",function(){t.throttle=!0}),t.gotop(),setInterval(function(){t.throttle&&(t.throttle=!1,t.thefooter(),t.refresh(),t.determineURL())},250),t.ensureFilledViewport(),this.body.addEventListener("is.post-load",t.checkViewportOnLoadBound)):"click"==type&&(this.click_handle&&this.element.appendChild(this.handle),this.handle.addEventListener("click",function(){t.click_handle&&t.handle.parentNode.removeChild(t.handle),t.refresh()})),this.body.addEventListener("is.post-load",t.initializeMejs)},Scroller.prototype.getScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Scroller.prototype.extend=function(e){e=e||{};for(var t=1;t0;){var i=t.shift();this.element.appendChild(i)}this.trigger(this.body,"is.post-load",{jqueryEventName:"post-load",data:e}),this.ready=!0},Scroller.prototype.query=function(){return{page:this.page+this.offset,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,query_before:window.infiniteScroll.settings.query_before,last_post_date:window.infiniteScroll.settings.last_post_date}},Scroller.prototype.animate=function(e,t){var i=performance.now();requestAnimationFrame(function n(o){var r=Math.min(1,(o-i)/t);e(r),r<1&&requestAnimationFrame(n)})},Scroller.prototype.gotop=function(){var e=document.getElementById("infinity-blog-title"),t=this;e&&(e.setAttribute("title",totop),e.addEventListener("click",function(e){var i=t.window.pageYOffset;e.preventDefault(),t.animate(function(e){var t=i-i*e;document.documentElement.scrollTop=document.body.scrollTop=t},200)}))},Scroller.prototype.thefooter=function(){var e,t,i,n,o=this;if(this.footer&&this.footer.el){if("string"==typeof this.footer.wrap){try{t=(t=document.getElementById(this.footer.wrap).getBoundingClientRect()).width}catch(e){t=0}t>479&&(e=this.footer.el.querySelector(".container"))&&(e.style.width=t+"px")}i=parseInt(o.footer.el.style.bottom||-50,10),n=this.window.pageYOffset>=350?0:-50,i!==n&&o.animate(function(e){var t=i+(n-i)*e;o.footer.el.style.bottom=t+"px",1===e&&(i=n)},200)}},Scroller.prototype.urlEncodeJSON=function(e,t){var i,n,o=[];for(var r in e)i=encodeURIComponent(r),n=t?t+"["+i+"]":i,"object"==typeof e[r]?!Array.isArray(e[r])||e[r].length>0?o.push(this.urlEncodeJSON(e[r],n)):o.push(n+"[]="):o.push(n+"="+encodeURIComponent(e[r]));return o.join("&")},Scroller.prototype.refresh=function(){var self=this,query,xhr,loader,customized;if(!this.disabled&&this.ready&&this.check())return this.ready=!1,this.click_handle&&(loader||(document.getElementById("infinite-aria").textContent=loading_text,loader=document.createElement("div"),loader.classList.add("infinite-loader"),loader.setAttribute("role","progress"),loader.innerHTML='
'),this.element.appendChild(loader)),query=self.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each(function(e){e._dirty&&(customized[e.id]=e())}),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),xhr=new XMLHttpRequest,xhr.open("POST",infiniteScroll.settings.ajaxurl,!0),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),xhr.send(self.urlEncodeJSON(query)),xhr.onerror=function(){self.click_handle&&loader.parentNode.removeChild(loader),self.ready=!0},xhr.onload=function(){var response=JSON.parse(xhr.responseText),httpCheck=xhr.status>=200&&xhr.status<300,responseCheck=void 0!==response.html;if(response&&httpCheck&&responseCheck&&(self.click_handle&&loader.parentNode.removeChild(loader),response.scripts&&Array.isArray(response.scripts)&&response.scripts.forEach(function(e){var t=e.footer?"body":"head";window.infiniteScroll.settings.scripts.push(e.handle),e.extra_data&&self.appendInlineScript(e.extra_data,t),e.before_handle&&self.appendInlineScript(e.before_handle,t);var i=document.createElement("script");i.type="text/javascript",i.src=e.src,i.id=e.handle,i.async=!1,e.after_handle&&(i.onload=function(){self.appendInlineScript(e.after_handle,t)}),"wp-mediaelement"===e.handle&&self.body.removeEventListener("is.post-load",self.initializeMejs),"wp-mediaelement"===e.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=i,self.wpMediaelement.element=t,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(t)[0].appendChild(i)}),response.styles&&Array.isArray(response.styles)&&response.styles.forEach(function(item){window.infiniteScroll.settings.styles.push(item.handle);var style=document.createElement("link");style.rel="stylesheet",style.href=item.src,style.id=item.handle+"-css",!item.conditional||isIE&&eval(item.conditional.replace(/%ver/g,IEVersion))||(style=!1),style&&document.getElementsByTagName("head")[0].appendChild(style)}),response.fragment=document.createElement("div"),response.fragment.innerHTML=response.html,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=self.extend(WPCOM_sharing_counts,response.postflair)),self.render.call(self,response),"click"==type?(infiniteScroll.settings.wrapper&&document.querySelector("#infinite-view-"+(self.page+self.offset-1)+" a:first-of-type").focus({preventScroll:!0}),response.lastbatch?self.click_handle?(self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")):self.trigger(this.body,"infinite-scroll-posts-end"):self.click_handle?self.element.appendChild(self.handle):self.trigger(this.body,"infinite-scroll-posts-more")):response.lastbatch&&(self.disabled=!0,self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics)){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}},xhr},Scroller.prototype.appendInlineScript=function(e,t){var i=document.createElement("script"),n=document.createTextNode("//");i.type="text/javascript",i.appendChild(n),document.getElementsByTagName(t)[0].appendChild(i)},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs.bind(this),250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.addEventListener("is.post-load",this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e){if(e.detail&&e.detail.html&&(-1!==e.detail.html.indexOf("wp-audio-shortcode")||-1!==e.detail.html.indexOf("wp-video-shortcode"))&&"undefined"!=typeof mejs){var t,i={};"undefined"!=typeof _wpmejsSettings&&(i.pluginPath=_wpmejsSettings.pluginPath),i.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1)},t=document.querySelectorAll(".wp-audio-shortcode, .wp-video-shortcode"),t=(t=Array.prototype.slice.call(t)).filter(function(e){for(;e.parentNode;){if(e.classList.contains("mejs-container"))return!1;e=e.parentNode}return!0});for(var n=0;n0;){for(i=r.shift(),o=0;o=a;return{top:s,bottom:l,height:l-s,factor:(Math.min(l,a)-Math.max(s,0))/a,isActive:d}},Scroller.prototype.ensureFilledViewport=function(){var e=this.window.innerHeight,t=this.measure(this.element,[this.wrapperClass]);this.body.removeEventListener("is.post-load",this.checkViewportOnLoadBound),t.bottomn&&(t=parseInt(e[o].dataset.pageNum,10),n=r.factor)}this.updateURL(t)}},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this.origURL;-1!==e&&(t=window.location.protocol+"//"+this.history.host+this.history.path.replace(/%d/,e)+this.history.parameters),window.location.href!=t&&history.pushState(null,null,t)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},Scroller.prototype.trigger=function(e,t,i){var n;(i=i||{}).jqueryEventName&&"undefined"!=typeof jQuery&&jQuery(e).trigger(i.jqueryEventName,i.data||null);try{n=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i.data||null})}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,i.data||null)}e.dispatchEvent(n)};var jetpackInfinityModule=function(){var e=infiniteScroll.settings.body_class.split(" ");if("object"==typeof infiniteScroll&&(e.forEach(function(e){e&&document.body.classList.add(e)}),ajaxurl=infiniteScroll.settings.ajaxurl,stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,loading_text=infiniteScroll.settings.loading_text,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"==type)){var t=null;window.addEventListener("scroll",function(){t||(t=setTimeout(function(){infiniteScroll.scroller.determineURL(),t=null},250))})}};"interactive"===document.readyState||"complete"===document.readyState?jetpackInfinityModule():document.addEventListener("DOMContentLoaded",jetpackInfinityModule)}(); \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 68e120cee9bac..3bdcd9a4a20f1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,14 @@ **This is a list detailing changes for all Jetpack releases.** += 8.8.2 = + +* Release date: August 17, 2020 + +**Bug fixes** + +* Infinite Scroll: avoid loading issues with some themes using Infinite Scroll. + = 8.8.1 = * Release date: August 10, 2020 diff --git a/jetpack.php b/jetpack.php index f0c4d47101661..69db6bd681318 100644 --- a/jetpack.php +++ b/jetpack.php @@ -4,7 +4,7 @@ * Plugin URI: https://jetpack.com * Description: Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users. * Author: Automattic - * Version: 8.8.1 + * Version: 8.8.2 * Author URI: https://jetpack.com * License: GPL2+ * Text Domain: jetpack @@ -16,7 +16,7 @@ define( 'JETPACK__MINIMUM_WP_VERSION', '5.4' ); define( 'JETPACK__MINIMUM_PHP_VERSION', '5.6' ); -define( 'JETPACK__VERSION', '8.8.1' ); +define( 'JETPACK__VERSION', '8.8.2' ); define( 'JETPACK_MASTER_USER', true ); define( 'JETPACK__API_VERSION', 1 ); define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); diff --git a/modules/infinite-scroll/infinity.js b/modules/infinite-scroll/infinity.js index 1288292ba0a21..0489b3a243639 100644 --- a/modules/infinite-scroll/infinity.js +++ b/modules/infinite-scroll/infinity.js @@ -486,12 +486,16 @@ // If 'click' type and there are still posts to fetch, add back the handle if ( type == 'click' ) { - // add focus to new posts, only in button mode as we know where page focus currently is - document - .querySelector( '#infinite-view-' + ( self.page + self.offset - 1 ) + ' a:first-of-type' ) - .focus( { - preventScroll: true, - } ); + // add focus to new posts, only in button mode as we know where page focus currently is and only if we have a wrapper + if ( infiniteScroll.settings.wrapper ) { + document + .querySelector( + '#infinite-view-' + ( self.page + self.offset - 1 ) + ' a:first-of-type' + ) + .focus( { + preventScroll: true, + } ); + } if ( response.lastbatch ) { if ( self.click_handle ) { diff --git a/readme.txt b/readme.txt index b0177dcd02318..b1bd254bc2ba4 100644 --- a/readme.txt +++ b/readme.txt @@ -96,6 +96,14 @@ There are opportunities for developers at all levels to contribute. [Learn more == Changelog == += 8.8.2 = + +* Release date: August 17, 2020 + +**Bug fixes** + +* Infinite Scroll: avoid loading issues with some themes using Infinite Scroll. + = 8.8.1 = * Release date: August 10, 2020 diff --git a/vendor/autoload.php b/vendor/autoload.php index b9837548349ec..93c9d0bd24d1b 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64::getLoader(); +return ComposerAutoloaderInitc22e67954a676ae766a3df84289c5daa::getLoader(); diff --git a/vendor/autoload_functions.php b/vendor/autoload_functions.php index aa99fa565403c..8a0a634b7bca7 100644 --- a/vendor/autoload_functions.php +++ b/vendor/autoload_functions.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8; +namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34; // phpcs:ignore diff --git a/vendor/autoload_packages.php b/vendor/autoload_packages.php index efde2c01770c2..c67003d331758 100644 --- a/vendor/autoload_packages.php +++ b/vendor/autoload_packages.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8; +namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34; // phpcs:ignore diff --git a/vendor/class-autoloader-handler.php b/vendor/class-autoloader-handler.php index 54d5c1005d8fb..5c07cd57980ce 100644 --- a/vendor/class-autoloader-handler.php +++ b/vendor/class-autoloader-handler.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8; +namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34; // phpcs:ignore diff --git a/vendor/class-classes-handler.php b/vendor/class-classes-handler.php index a5045afd5774a..30812ecd95792 100644 --- a/vendor/class-classes-handler.php +++ b/vendor/class-classes-handler.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8; +namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34; // phpcs:ignore diff --git a/vendor/class-files-handler.php b/vendor/class-files-handler.php index 89dc1c6100180..94d56e11feed4 100644 --- a/vendor/class-files-handler.php +++ b/vendor/class-files-handler.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8; +namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34; // phpcs:ignore diff --git a/vendor/class-plugins-handler.php b/vendor/class-plugins-handler.php index 7641085be2902..7efd5b58b9989 100644 --- a/vendor/class-plugins-handler.php +++ b/vendor/class-plugins-handler.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8; +namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34; // phpcs:ignore diff --git a/vendor/class-version-selector.php b/vendor/class-version-selector.php index 56dab6a28e7cd..40482c2088823 100644 --- a/vendor/class-version-selector.php +++ b/vendor/class-version-selector.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpdf10f8600d1e3fbc7a3583ae771162e8; +namespace Automattic\Jetpack\Autoloader\jpb636b56969c8ac0707394eb685333a34; // phpcs:ignore diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 5bddf137be702..1e90b95225e4d 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64 +class ComposerAutoloaderInitc22e67954a676ae766a3df84289c5daa { private static $loader; @@ -22,15 +22,15 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitc22e67954a676ae766a3df84289c5daa', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit430d01c96b612c440e5d3e48a916fb64', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitc22e67954a676ae766a3df84289c5daa', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitc22e67954a676ae766a3df84289c5daa::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,19 +42,19 @@ public static function getLoader() $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitc22e67954a676ae766a3df84289c5daa::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire430d01c96b612c440e5d3e48a916fb64($fileIdentifier, $file); + composerRequirec22e67954a676ae766a3df84289c5daa($fileIdentifier, $file); } return $loader; } } -function composerRequire430d01c96b612c440e5d3e48a916fb64($fileIdentifier, $file) +function composerRequirec22e67954a676ae766a3df84289c5daa($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index ff627413652c3..661fa63a9101e 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit430d01c96b612c440e5d3e48a916fb64 +class ComposerStaticInitc22e67954a676ae766a3df84289c5daa { public static $files = array ( 'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/load-ixr.php', @@ -119,9 +119,9 @@ class ComposerStaticInit430d01c96b612c440e5d3e48a916fb64 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit430d01c96b612c440e5d3e48a916fb64::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitc22e67954a676ae766a3df84289c5daa::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitc22e67954a676ae766a3df84289c5daa::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitc22e67954a676ae766a3df84289c5daa::$classMap; }, null, ClassLoader::class); }