[wp-trac] [WordPress Trac] #53175: Block Editor: Include the theme.json infrastructure code and support
WordPress Trac
noreply at wordpress.org
Tue May 25 21:48:41 UTC 2021
#53175: Block Editor: Include the theme.json infrastructure code and support
--------------------------------------+--------------------------
Reporter: youknowriad | Owner: youknowriad
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.8
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+--------------------------
Changes (by SergeyBiryukov):
* status: closed => reopened
* resolution: fixed =>
Comment:
Replying to [comment:27 noisysocks]:
> [50992] breaks style concatenation. You can see this by navigating to
`/wp-admin/load-styles.php?load=wp-components`. This should show the CSS
for `@wordpress/components` but instead results in an empty page with
status 500.
[51001] seems to work on PHP 7.4, but I still get a fatal error on PHP
8.0. While the `get_stylesheet_directory()` function is now available, it
also calls `get_theme_root()`, which uses the `WP_CONTENT_DIR` constant,
not defined at that point.
In PHP 7.4 it just silently works, causing a PHP warning hidden by
`error_reporting( 0 )` early in `load-styles.php`:
> `Warning: Use of undefined constant WP_CONTENT_DIR - assumed
'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP)`
In PHP 8.0 it is now a fatal error:
> `Fatal error: Uncaught Error: Undefined constant "WP_CONTENT_DIR"`
See [https://www.php.net/manual/en/migration80.incompatible.php Backward
Incompatible Changes in PHP 8.0]:
> Attempting to access unqualified constants which are undefined.
Previously, unqualified constant accesses resulted in a warning and were
interpreted as strings.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53175#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list