WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just got into using hooks and have now understand the beauty of them. I understand that I can hook into the following by using add_filter('hook_name','my_hook_name', $variable);

function a_function($variable){
    return add_filter('hook_name', $variable);

But what if your the function you wanted to hook into simply returned a variable.

function a_function($variable){
    return $variable

I don't have the 'hook_name' to hook into anymore. So am I missing something? How can I edit that second function via my functions.php?

share|improve this question
up vote 3 down vote accepted

You cannot hook in a function without a hook. If it returns a variable, you will have to use it as it is returned. And then, maybe, perform your operations on that.

share|improve this answer
That's what I feared. Ok thanks for clarifying. – zilj Mar 6 '13 at 11:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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