Title: Removepoint when delete post
Last modified: August 21, 2016

---

# Removepoint when delete post

 *  Resolved [nyan-nyan](https://wordpress.org/support/users/nyan-nyan/)
 * (@nyan-nyan)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/removepoint-when-delete-post/)
 * I used Buddypress.
 * I would like to remove　point when delete own post.
    Because user can repeat 
   for delete and upload. So points only increase.
 * any way?
 * [https://wordpress.org/plugins/mycred/](https://wordpress.org/plugins/mycred/)

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

 *  Plugin Author [myCred](https://wordpress.org/support/users/designbymerovingi/)
 * (@designbymerovingi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/removepoint-when-delete-post/#post-4703402)
 * Hi!
 * There is no built in limit for Points being awarded when a user posts a new content.
   I assume you give points for new posts under the “Points for publishing content”
   hook?
 *  Thread Starter [nyan-nyan](https://wordpress.org/support/users/nyan-nyan/)
 * (@nyan-nyan)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/removepoint-when-delete-post/#post-4703508)
 * Hi Gabriel!
 * >>”Points for publishing content”
    Yes! It is something like “Points for comments
   > Trashed / Unapproved Comments”
 * I hope to the possibility of myCRED.
 * Thanks Gabriel!
 *  Plugin Author [myCred](https://wordpress.org/support/users/designbymerovingi/)
 * (@designbymerovingi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/removepoint-when-delete-post/#post-4703530)
 * Your only option is to hook into the [mycred_add](http://codex.mycred.me/filters/mycred_add-2/)
   filter which fires just before points are awarded / deducted from users allowing
   you to stop a process if needed. Filters simply just need to return either true(
   go ahead and give / take points ), false (stop what you are doing) or ‘done’ (
   in case you award points yourself due to some custom formula or something and
   don’t want myCRED to duplicate things but indicate that points have been awarded).
 * Example:
 *     ```
       add_filter( 'mycred_add', 'enforce_limit_for_published_content', 10, 3 );
       function enforce_limit_for_published_content( $reply, $request, $mycred ) {
       	// If another filter has already declined this, so do we
       	if ( $reply === false ) return $reply;
   
       	// Check the log how many points this user has received
       	// today for publishing content
       	$points_today = mycred_get_total_by_time( 'today', 'now', 'publishing_content', $request['user_id'] );
   
       	// In this example I assume users get 1 point per content
       	// So 1 point * 1 = 1
       	// In the user has not received points today, $points_today will return zero
       	if ( $points_today == 1 ) return false;
   
       	return true;
       }
       ```
   
 * You can find more information on how to use the [mycred_get_total_by_time](http://codex.mycred.me/functions/mycred_get_total_by_time/)
   function in the codex.
 * Let me know if you require further assistance.

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

The topic ‘Removepoint when delete post’ is closed to new replies.

 * ![](https://ps.w.org/mycred/assets/icon-128x128.gif?rev=3512531)
 * [Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred](https://wordpress.org/plugins/mycred/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mycred/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mycred/)
 * [Active Topics](https://wordpress.org/support/plugin/mycred/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mycred/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mycred/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [myCred](https://wordpress.org/support/users/designbymerovingi/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/removepoint-when-delete-post/#post-4703530)
 * Status: resolved