[wp-trac] [WordPress Trac] #49192: All plugin style tags are empty after upgrade to 5.3.2
WordPress Trac
noreply at wordpress.org
Mon Jan 20 16:10:06 UTC 2020
#49192: All plugin style tags are empty after upgrade to 5.3.2
-------------------------------+------------------------------
Reporter: nbdcadmin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version: 5.3.2
Severity: major | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by nbdcadmin):
@SergeyBiryukov Thanks Sergey and sorry about the late reply. Following on
from the article and also your reply I have managed to track down the
issue to a function call in the roots framework. The deails can be seen @
https://discourse.roots.io/t/old-roots-theme-breaks-wp-admin-in-
wordpress-5-3/17083/18
I fixed it using the description @ https://zerogravitymarketing.com
/updating-to-wordpress-5-3-caused-admin-css-issues/
{{{#!php
function roots_clean_style_tag($input) {
preg_match_all("!<link
rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)'
(?:type='text\/css')*media='(.*)' \/>!", $input, $matches);
if($matches[3][0] && $matches[2][0]){
$media = $matches[3][0] !== '' && $matches[3][0] !== 'all'
? ' media="' . $matches[3][0] . '"' : '';
return '<link rel="stylesheet" href="' . $matches[2][0] .
'"' . $media . '>' . "\n";
}
return $input;
}
add_filter('style_loader_tag', 'roots_clean_style_tag');
}}}
Here is the fixed code (credit for the fix to Greg Volpe @
https://zerogravitymarketing.com)
Thanks again for the assistance.
All the best,
Barry.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49192#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list