[wp-hackers] Specific hooks for working with custom post types?

Simon B piemanek at gmail.com
Mon Mar 29 16:57:19 UTC 2010


On 28 March 2010 16:37, scribu <scribu at gmail.com> wrote:

> You hava an additional parameter on the save_post hook:
>
> function save_post_callback($post_id, $post) {
> if ( 'case-study' == $post->post_type {
> ...
> }
> }
> add_action('save_post', 'save_post_callback', 10, 2);
>
>

Thanks very much, I'd forgotten there was the $post parameter available on
that hook. Works perfectly.


More information about the wp-hackers mailing list