Last active
July 10, 2019 06:25
-
-
Save imran-khan1/804210cba9bb7fd53bd3fd316db59c18 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/* | |
custom filter hook | |
*/ | |
function custom_filter_something_cool() { | |
$output = 'Hello World'; | |
return apply_filters('my_custom_filter', $output); | |
} | |
echo custom_filter_something_cool(); | |
//Place in functions.php or else | |
function custom_filter_function( $text ) { | |
return 'The updated text will appear.'; | |
} | |
add_filter('my_custom_filter', 'custom_filter_function'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment