Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I was thinking of removing/hiding admin-bar from my wordpress (3.1.1) installation.

I visited following link:

http://codex.wordpress.org/Plugin_API/Filter_Reference/show_admin_bar

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
add comment

1 Answer 1

up vote 12 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
share|improve this answer
    
Thank you. –  I-M-JM Apr 22 '11 at 7:42
add comment

Your Answer

 
discard

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.