Title: Using Hooks
Last modified: August 22, 2016

---

# Using Hooks

 *  Resolved [codenamebrian](https://wordpress.org/support/users/codenamebrian/)
 * (@codenamebrian)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/using-hooks-1/)
 * Hi!
 * First off I’d like to thank you for this plugin! Really helpful 🙂
 * I’d like to call a php file on my production server that does some DB cleanup
   after the batch has been sent. I tried adding the code below to my functions.
   php without any luck, am I using the hook correctly?
 *     ```
       add_action( 'sme_deployed' , 'call_url_fix' );
       function call_url_fix() {
   
       file_get_contents('http://domain.com/db-cleanup.php');
   
       }
       ```
   
 * Thanks!
 * [https://wordpress.org/plugins/content-staging/](https://wordpress.org/plugins/content-staging/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [stenberg.me](https://wordpress.org/support/users/stenbergme/)
 * (@stenbergme)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/using-hooks-1/#post-5434151)
 * Glad to hear that the plugin is of help!
 * Currently there is no _sme\_deployed_ hook, but as you correctly points out, 
   there really should be!
 * I’ll make sure to include this in the next release, I will keep you posted on
   any progress on this.
 * I’ve created an issue to address this: [https://github.com/stenberg/content-staging/issues/56](https://github.com/stenberg/content-staging/issues/56)
 *  Plugin Author [stenberg.me](https://wordpress.org/support/users/stenbergme/)
 * (@stenbergme)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/using-hooks-1/#post-5434246)
 * Hi!
 * Two new hooks has been added in the last release of the [WordPress Content Staging plugin version 1.2.1](https://wordpress.org/plugins/content-staging/)
   that addresses this feature request.
 * The hook you want to use is called _sme\_imported_ and runs on the production
   environment after the entire batch has been imported:
 *     ```
       function call_url_fix( $job ) {
       	// Do something here ...
       }
   
       // Triggered on production when import is completed.
       add_action( 'sme_imported', 'call_url_fix' );
       ```
   
 * If you would like to perform some operations on the staging environment as well
   after deploy is completed, you can use the _sme\_deployed_ hook:
 *     ```
       add_action( 'sme_deployed', function() {
       	// Do something on staging environment ...
       });
       ```
   
 * Hope this helps!
 *  Thread Starter [codenamebrian](https://wordpress.org/support/users/codenamebrian/)
 * (@codenamebrian)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/using-hooks-1/#post-5434250)
 * Wow! Wasn’t expecting this feature to be added so quickly, thanks!
 * I will give it a try ASAP and let you know the outcome.
 *  Thread Starter [codenamebrian](https://wordpress.org/support/users/codenamebrian/)
 * (@codenamebrian)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/using-hooks-1/#post-5434292)
 * I was finally able to test the new feature and it worked like a charm! I will
   be using this plugin extensively over the next few weeks so I will provide feedback
   and help wherever I can.
 * Thanks again for your speedy fix!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Using Hooks’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/content-staging.svg)
 * [Content Staging](https://wordpress.org/plugins/content-staging/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-staging/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-staging/)
 * [Active Topics](https://wordpress.org/support/plugin/content-staging/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-staging/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-staging/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [codenamebrian](https://wordpress.org/support/users/codenamebrian/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/using-hooks-1/#post-5434292)
 * Status: resolved