WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/ return false

Contents

Description

__return_false() is one of a group of utility functions in WordPress that are helpful when you need an automatic result. In this case, calling the __return_false() function will result in a value of false.

This can be especially useful for filters that need a boolean and you just need a false value.

Usage

<?php 
// This will add a filter on `example_filter` that returns false 
add_filter('example_filter''__return_false'); 
?>

Return Values

(boolean) 
false

Change Log

Since: 3.0

Source File

__return_false() is located in wp-includes/functions.php

Related