Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_filter shortcuts in WordPress
<?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
You can’t perform that action at this time.