Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Created February 5, 2018 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/5d16ae21d04606ef08e9ed61468b606b to your computer and use it in GitHub Desktop.
Save KaineLabs/5d16ae21d04606ef08e9ed61468b606b to your computer and use it in GitHub Desktop.
Remove Defer Script
/**
* Remove Defer Scripts.
*/
function yz_filter_defer_scripts_on_account_settings() {
if ( ! function_exists( 'bp_current_component' ) || ! bp_current_component() ) {
return false;
}
// Remove Defer.
add_filter( 'clean_url', 'youzer_delete_defer_scripts', 12, 2 );
}
add_action( 'init', 'yz_filter_defer_scripts_on_account_settings', 999 );
/**
* Reset Original Link.
*/
function youzer_delete_defer_scripts( $url, $original_url ) {
return $original_url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment