Changeset 7726
- Timestamp:
- 10/12/2018 02:34:59 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php
r7725 r7726 159 159 ); 160 160 161 // Fix domReady for frontendberg162 wp_add_inline_script(163 'wp-dom-ready',164 'wp.domReady = function( callback ) {165 // The included domReady fails to call callbacks which are registered while readyState is "interactive".166 // DOMContentLoaded fires at the start of interactive, but domReady only calls registered methods at "complete".167 // This caused Frontendberg to white screen as the Gutenberg initialize call happens in that timespan when SessionStorage is empty168 if (169 document.readyState === "complete" || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.170 document.readyState === "interactive" // DOMContentLoaded fires at this point, so we call directly.171 ) {172 return callback();173 }174 175 // DOMContentLoaded has not fired yet, delay callback until then.176 document.addEventListener("DOMContentLoaded", callback);177 };'178 );179 180 161 }, 11 ); 181 162 … … 204 185 // This filter is only added on a front-page view of the homepage for this site, no other checks are needed here. 205 186 206 return time() . ':5911429'; // WordPressdotorg user OD187 return time() . ':5911429'; // WordPressdotorg user ID 207 188 }, 10, 3 ); 208 189
Note: See TracChangeset
for help on using the changeset viewer.