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 was thinking of removing/hiding admin-bar from my wordpress (3.1.1) installation.

I visited following link:


I was surprised to see only a single line to remove/hide admin-bar

add_filter( 'show_admin_bar', '__return_false' );

My question is what is __return_false means? why __ and _?

share|improve this question
up vote 22 down vote accepted

WordPress contains built in functions for quickly returning values.

They are intended to be used as a quick built in function that returns a common value to a filter hook such as true, false, or an empty array.

  • __return_false — Returns the Boolean value of false.
  • __return_true — Returns the Boolean value of true.
  • __return_empty_array — Returns an empty PHP array.
  • __return_zero — Returns the integer 0.
  • __return_null — Returns NULL.
  • __return_empty_string — Returns ''.
share|improve this answer
Thank you. – I-M-JM Apr 22 '11 at 7:42

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.