Skip to content

Instantly share code, notes, and snippets.

@remcotolsma
Created January 23, 2014 12:05
Show Gist options
  • Save remcotolsma/8577520 to your computer and use it in GitHub Desktop.
Save remcotolsma/8577520 to your computer and use it in GitHub Desktop.
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