Last active
May 10, 2020 06:53
-
-
Save westonruter/f451337351e803044413d942f307229b to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Plugin Name: Bad Hooks | |
* Description: Action and filter which add bad markup. | |
* Version: 0.1 | |
* Plugin URI: https://gist.github.com/westonruter/f451337351e803044413d942f307229b | |
* Author: Weston Ruter | |
*/ | |
namespace Bad\Hooks; | |
\add_action( | |
'wp_footer', | |
function () { | |
echo '<script>document.write("Bad action!!!");</script><noscript>Bad action!</noscript>'; | |
} | |
); | |
\add_filter( | |
'the_content', | |
function ( $content ) { | |
return $content . '<script>document.write("Bad filter!!!");</script><noscript>Bad filter!</noscript>'; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment