Making WordPress.org

Changeset 7726


Ignore:
Timestamp:
10/12/2018 02:34:59 AM (7 years ago)
Author:
dd32
Message:

Gutenberg: Remove the wp.domReady override as it was fixed upstream in https://github.com/WordPress/gutenberg/pull/8578

See [7593].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php

    r7725 r7726  
    159159        );
    160160
    161         // Fix domReady for frontendberg
    162         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 empty
    168                 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 
    180161    }, 11 );
    181162
     
    204185        // This filter is only added on a front-page view of the homepage for this site, no other checks are needed here.
    205186
    206         return time() . ':5911429'; // WordPressdotorg user OD
     187        return time() . ':5911429'; // WordPressdotorg user ID
    207188    }, 10, 3 );
    208189
Note: See TracChangeset for help on using the changeset viewer.