It seems to be a little inconsistent but this works fine for me:
Trash hook
add_action( 'trash_[custom]', 'my_trash_callback' );
function my_trash_callback( $postID ) {
// Party hard!
}
Untrash hook
add_action( 'untrash_post', 'my_untrash_callback' );
function my_untrash_callback( $postID ) {
if ( get_post( $postID )->post_type === '[custom]' ) {
// Party hard!
}
}
Hello Toro_Unit.
Maybe i’m missing something but i when i register a taxonomy like this:
register_taxonomy('work_category', 'work', array(
'label' => __('Categories'),
'rewrite' => array('slug' => 'mycustomslug'),
'hierarchical' => true
));
Your plugin seems to await Urls like this:
example.org/work/work_category/mycategory/
While WordPress (using get_term_link($mycategoryID)) is generating this url:
example.org/work/mycustomslug/mycategory/
Im using “/%work_category%/%postname%/” as structure.
If you agree you might take a look at my patch: http://dl.dropbox.com/u/5439509/taxonomy_slug.diff
Maybe i misunderstood your tutorial – I really would appreciate a hint from you then 😉
Thanks for this awesome plugin!