Created
February 5, 2018 20:33
-
-
Save KaineLabs/5d16ae21d04606ef08e9ed61468b606b to your computer and use it in GitHub Desktop.
Remove Defer Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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