I really use ACF options pages and relay fields. To reduce the number of requests (from 500 to 80), I cache some output using the Wordpress Transient API.
I know the hook for ACF options pages:
add_action( 'acf/save_post', 'reference_function') );
But the problem for me is that I have several pages with options. And I do not want all my functions to start when saving any parameter page ...
These are my current settings pages.
add_filter('acf/options_page/settings', 'my_acf_options_page_settings');
if(function_exists("register_options_page")) {
acf_add_options_page();
register_options_page('Spielübersicht');
register_options_page('Mannschaft');
register_options_page('SCHWALBE arena TV');
register_options_page('Sponsoren');
register_options_page('Werbung');
register_options_page('Einstellung');
register_options_page('Fanclubs');
register_options_page('Sidebar');
}
Is there a way to filter the action so that my transients are created only when the linked options page is saved?
source
share