Skip to content

Commit

Permalink
Disable inline styles in dev mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
justintadlock committed Jan 24, 2024
1 parent 2b76a0a commit bff6764
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dev/functions-helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
function bootstrap(): void
{
// Only run when in development mode.
if (! wp_is_development_mode('theme')) {
if (
! wp_is_development_mode('theme')
|| false === apply_filters('x3p0/ideas/dev', true))
{
return;
}

// Let developers disable dev features.
if (false === apply_filters('x3p0/ideas/dev', true)) {
return;
}
// Don't inline stylesheets while in dev mode.
add_filter('styles_inline_size_limit', '__return_zero', PHP_INT_MAX);

// Set the Symfony var dumper, giving it a nicer color scheme. Use
// `dump()` instead of `var_dump()` or `dd()` to dump and die.
Expand Down

0 comments on commit bff6764

Please sign in to comment.