Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress quick lookup hooks.
<?php
// Add at bottom of https://github.com/WordPress/WordPress/blob/3.8/wp-settings.php
$ip = $_SERVER['REMOTE_ADDR'];
if ( $ip == '0.0.0.0' ) {
// Test hook function
function test_filter_test() {
var_dump( $_POST );
exit;
}
add_action( 'template_redirect', 'test_filter_test', 1 );
// Filters
global $wp_filter;
$hook = 'template_redirect';
print '<pre>';
print_r( $wp_filter[$hook] );
print '</pre>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.