Automattic / Automattic/syntaxhighlighter
WordPress Defer Functionality Breaks Plugin
- Dominant language
- CSS
- Stars
- 251
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
Using 'Defer' in functions.php breaks plugin, It converts all code highlighting to none & make it black on grey background you can have a look on my website: http://mandarapte.com/apple/stop-spam-blocking-spam-senders-ip-address-ultimate-solution-block-spam-order-deny-ip-htaccess/
I am using following code defer or async .js files in footer
Code:
// Adapted from https://gist.github.com/toscho/1584783
add_filter( 'clean_url', function( $url )
{
if ( FALSE === strpos( $url, '.js' ) )
{
return $url;
}
return "$url' defer='defer";
}, 11, 1 );
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the functions.php clean_url filter and defer snippet against the linked WordPress page, then inspect the frontend code-highlighting behavior. Done means deferred or asynchronous scripts no longer disable highlighting or change it to black on a grey background.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wordpress
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100