Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Can custom fields be used to determine specific actions upon saving a post to the database?

Which action(s) make this possible, since adding post medata seems to always occur after saving a post and thus any plugin hooking into wp_insert_post is activated before the post meta data has been added to the post.

share|improve this question
    
@BjornW: If you can give a few more details of you use case maybe I or someone else could whip up a small example to show you how. –  MikeSchinkel Sep 1 '10 at 18:02
add comment

2 Answers

If you are wanting to run the function after the post meta data has been added/updated, use:

add_action( 'updated_post_meta', 'my_post_meta_function' );
share|improve this answer
add comment

If there's no complicated logic involved in updating the custom fields, you could derive the new values by grabbing their (changed) values from $_POST and combining these with their existing values from the database. Base your processing upon the resulting values.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.