Support » Plugins » Adding own function

  • If I want to add my own php function to be run when someone presses the ‘publish’ button are these the only things that I need to do?

    1. In the publish-post.php file add:
    if ($post_status == 'publish') {
    add_action('publish_post', 'makeLink') .... }
    2. add my code to the functions.php file
    Is that all? I understand that when someone presses the "publish" button my code will be added with the
    add() call but do I also need to do a do()` call also? I’m new to this so thanks for any help you can give.

  • The topic ‘Adding own function’ is closed to new replies.