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 hook to fire purge_all for any caching type #232

Merged
merged 2 commits into from Feb 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions admin/class-nginx-helper-admin.php
Expand Up @@ -717,6 +717,17 @@ public function purge_all() {
break;
}

if ( 'purge' === $action ) {

/**
* Fire an action after the entire cache has been purged whatever caching type is used.
*
* @since 2.2.2
*/
do_action( 'rt_nginx_helper_after_purge_all' );

}

wp_redirect( esc_url_raw( $redirect_url ) );
exit();

Expand Down