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

Function acf/save_post likewise wp save_post #82

Open
matata86 opened this issue Dec 1, 2022 · 0 comments
Open

Function acf/save_post likewise wp save_post #82

matata86 opened this issue Dec 1, 2022 · 0 comments

Comments

@matata86
Copy link

matata86 commented Dec 1, 2022

I have this function. I need delete cache if update option page.

function my_acf_save_post($post_id) {
  if ($post_id == 'options') {
    if(isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')){
      $GLOBALS['wp_fastest_cache']->deleteCache();
    }
  }
}
add_action('acf/save_post', 'my_acf_save_post', 20);

Function not run if options page has allow translate. If is page exclude from translate option page, works good.

Any issue?
Thank you.

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

No branches or pull requests

1 participant