Last active
June 9, 2016 09:48
-
-
Save yratof/b6f14cad39f95a7ca597929a5660e7ba to your computer and use it in GitHub Desktop.
Wordpress actions for themes and plugins
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 | |
/* Place this where you need it */ | |
function thing_location(){ | |
do_action( 'location_of_thing' ); | |
} | |
/* Make a function to hook */ | |
function add_new_thing() { | |
echo 'This is a new thing'; | |
} | |
/* Hook onto action with function */ | |
add_action( 'location_of_thing', 'add_new_banner', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment