In my wordpress site virus script added in footer on wp_footer action.

I try many techniques, but i cant find virus hook location.

Is there any wp action/filter, that hook after each action /filter hooked including hooked output data?

I mean, if some one hook

function abc(){
  echo "inside content";

I want this.

output: inside content
function ABC, file : foo.php

I am using this code, that only return list of hooks.

add_action('wp', function(){ 
      echo '<pre>';
      echo '</pre>';
  • The plugin Debug Objects list you all functions, that are fired on a hook. Maybe this helps you.
    – bueltge
    Apr 21, 2017 at 8:28

1 Answer 1


Check also if it was added by JavaScript. To list all the functions hooked wp_footer, this might help:

global $wp_filter;
var_dump( $wp_filter['wp_footer'] );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.