Closed schlessera closed 4 years ago
@schlessera Does this also fix all the problems that you were facing in WP-CLI as well caused by this?
@pattonwebz I'm not sure, and it is actually difficult to test if the change is not in a release.
However, I've built a work-around for WP-CLI already to make sure I'm not hit by this when 5.3 is released: https://github.com/wp-cli/wp-cli-tests/pull/72
In your test, can you add a wp_die()
in the root of the starter-content
theme and see if it is only hit in the customizer, and does not break outside of it?
@schlessera I tested this with xDebug (and again I tested with your wp_die() method) and the file/function is only hit on customizer pages as expected. I haven't found any other admin pages that it fires on but there may be some places or situations in the dashboard that resolve to true
on is_customize_preview()
but I have not found any of those in my browsing around just now.
This seems good to me but I will test for another few minutes to make sure I am not missing anything, if I run into no troubles I will merge this in :)
To avoid parsing the starter content on every single page request, we only add the theme support for the starter content when
is_customizer_preview()
is true.Fixes #973