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.

I've seen on a few tutorials that there are numbers at the end of the call to save Custom Fields/Meta Boxes on the save_post hook. For example, in the WordPress Codex it gives the following example:

<?php add_action( 'save_post', 'my_save_post', 10, 2 ); ?> 

What do the 10 and 2 mean at the end?

I've tried talking to an "expert", but they've been of no help ;)

share|improve this question
2  
You yourself have linked to the codex entry that answers this. –  Johannes Pille Apr 1 '13 at 18:01
add comment

1 Answer 1

up vote 1 down vote accepted

The 10 is the priority (relative to other added actions) and the 2 is simply the number of arguments that my_save_post() will accept.

See the codex.

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.