Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add trash/restore hooks #608

Merged
merged 1 commit into from
Apr 20, 2017
Merged

Conversation

haffla
Copy link
Contributor

@haffla haffla commented Apr 20, 2017

I don't know how to update the documentation on http://camaleon.tuzitio.com/documentation/category/40758-modules/hooks-1.html though.

I think these are important hooks. If you cache menus for example you need to empty that cache if a post is trashed/restored.

@owen2345 owen2345 merged commit 72bccd7 into owen2345:master Apr 20, 2017
@owen2345
Copy link
Owner

Hi @haffla,
Please send me the description to add into the doc.
Regards!

@haffla haffla deleted the trash-hooks branch April 20, 2017 15:29
@haffla haffla restored the trash-hooks branch April 20, 2017 15:29
@haffla
Copy link
Contributor Author

haffla commented Apr 24, 2017

Thanks. Would add it myself but here you go:

Key Arguments Description
trashed_post {post: @post, post_type: @post_type} Triggered when a post is moved to the trash.
post: The post being saved
post_type: The post's post_type
restored_post {post: @post, post_type: @post_type} Triggered when a post is restored from trash.
post: The post being saved
post_type: The post's post_type

@owen2345
Copy link
Owner

Thank you, done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants