The save_post
action fires when a post is updated and/or published, including when a new post is inserted. You can use it for custom post types also.
Assume that your CPT is book.
add_action( 'save_book', 'wpse63478_save' );
function wpse63478_save() {
//Your Code to give point to user
}
Related Posts:
- Can I count the number of users matching a value in a multiple value key?
- Save custom user meta on registration
- How to get users by a custom field / by user meta data?
- How do you add a custom option to user data?
- Show User Their Password
- How to update serialized data in the user meta data
- How can I sort get_users() by any value (last_name, user defined fields and more)
- Displaying additional User Contact Information
- get_user_meta Short Profile Section
- Separate table or usermeta
- meta_query for a string inside a meta field containing a comma-separated list
- How to update custom user meta field in wp?
- WordPress User Profile Upload – If page is saved file reset
- Conditional custom field query
- ACF: How to get the full field name (meta_key) by a field key?
- How do I create a column in Users list and display user data from custom registration field
- Conditionally hide or show woocommerce product variation in fontend by custom field
- How to save multiple options from a dropdown in user profile
- WP_User_Query pulling ACF to loop
- Users Select inside custom metabox
- query usermeta from custom field
- custom avatar removal
- How to add upload video option in wordpress for user?
- Passing args to WP_User_Query am I using meta correctly?
- How to save the date/time of last update of an extra user profile field?
- Specific coditional usage [closed]
- Show image if author meta (profile fields) exists outside loop
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- How to add fields in custom registration form, validate it and aave to db? [closed]
- check for duplicate user meta data before updating
- Custom Field Repeating When Using foreach
- Increment user meta data by 1 each time a page is visited
- Front-End User Profile
- Get emails from users by custom field SQL
- How to update user profile custom fields
- The conditional logic only works to show or hide?
- Help with this custom field conditional if no field is set display nothing
- Save custom field types with this function…?
- Display Additional Info
- Populate custom checkout fields with data from previous orders
- Add WordPress user custom meta to chartjs vertically stacked chart in Divi theme
- User query – getting values for custom meta keys/fields
- Delete user meta but only if found in array
- How to get data from user meta custom fields created with acf-pro plugin?
- How to save multiple values with same meta_key, each value linked to another tag id
- author.php not showing content if Author has no Posts
- Getting user’s data, by custom field lookup (meta)
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- Redirecting to an external URL
- update_user_meta(): invisible data storage
- Extend WP_User_Query or WP_User to return all custom fields?
- Populate a select box with data stored in the database?
- Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
- Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page
- Is it possible in WordPress
- wordpress simple post multi rating with post_meta and user_meta
- How do i get a specific user metadata using custom metavalue outside of wordpress?
- Echo text if field under user_meta is empty with get_users()
- Create citation and url in post using 3 custom fields with conditions for each field… So close!
- Custom registration form and custom field
- how to add radio field on user meta on function.php?
- Can’t sort custom column on user.php by number / meta_value_num?
- Conditional display based on ACF checkbox
- Add a Jquery Datepicker to custom field in post edit
- Order Posts by Closest Numeric Values
- Create additional short URL with custom field and 301 redirect
- get_post_meta fields don’t show up on posts page
- Using custom fields in a filter hook
- Function to change meta value in database for each post
- Include woocommerce custom field value in front-end search result
- How to validate custom field on lost password form before the user id field?
- MySQL Query that looks for post with Custom Field, then changes Category
- Woocommerce: Custom fields and email shortcodes, ec_custom_field
- Create Pop-Up Box with Custom Field Content Inside the Loop
- Adding an editable field to template?
- Transferring author information from a custom field to a proper author
- Prevent update of custom user profile meta field on the front end after 1st entry
- jQuery – Automatic event trigger does not **really** check my form
- Display URL in a Custom Field
- pre_get_posts : only get posts by wp_usermeta value
- Display list of terms having the same custom field value
- How to display custom field in woocommerce email orders? [closed]
- Custom meta is not being saved
- Get text from user and display it on page
- If metabox has content display content
- Custom meta boxes not saving
- Listing the most popular 8 city (custom fields) as used in posts
- How to delete file uploaded by Plupload
- Display Meta Data with HTML?
- Order by custom date field
- Meta field bulk editing no longer working in WP 6.0 [closed]
- meta_query to check all custom fields
- Show Custom Taxonomy as Headline for related posts
- display Flexible Fields from options
- list pages by custom_field?
- Get custom field from page, in a post?
- Advenced custom fields auto fill problem
- Add fields to edit in custom widget
- custom field value is blank or empty
- How to add a custom field to the comments “Quick Edit” screen?