Title: Simple! if post is shared execute this code!
Last modified: August 21, 2016

---

# Simple! if post is shared execute this code!

 *  [xblackbonex](https://wordpress.org/support/users/xblackbonex/)
 * (@xblackbonex)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/simple-if-post-is-shared-execute-this-code/)
 * hello
    I dont know where case == success in the plugin script I wanna put this
   code
 *     ```
       <?php
       $user_id = 12;
       if ( !mycred_exclude_user( $user_id ) ) {
       	// Add points and save the current year as ref_id
       	mycred_add( 'birthday_present', $user_id, 10, 'Birthday %plural%!', date( 'y' ) );
       }
       ?>
       ```
   
 * if user has successfully shared the post
 * [http://wordpress.org/plugins/simple-share-buttons-adder/](http://wordpress.org/plugins/simple-share-buttons-adder/)

The topic ‘Simple! if post is shared execute this code!’ is closed to new replies.

 * ![](https://ps.w.org/simple-share-buttons-adder/assets/icon-256x256.png?rev=2661516)
 * [Simple Share Buttons Adder](https://wordpress.org/plugins/simple-share-buttons-adder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-share-buttons-adder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-share-buttons-adder/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-share-buttons-adder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-share-buttons-adder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-share-buttons-adder/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [xblackbonex](https://wordpress.org/support/users/xblackbonex/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/simple-if-post-is-shared-execute-this-code/)
 * Status: not resolved