Created
March 16, 2018 21:40
-
-
Save nickdavis/c4afa54d97ab6a69e1d6eecdf3268fd7 to your computer and use it in GitHub Desktop.
add_filter shortcuts in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'my_filter', '__return_true' ); | |
add_filter( 'my_filter', '__return_false' ); | |
add_filter( 'my_filter', '__return_zero' ); | |
add_filter( 'my_filter', '__return_null' ); | |
add_filter( 'my_filter', '__return_empty_string' ); | |
add_filter( 'my_filter', '__return_empty_array' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment