wp admin – Run function when ACF options page is updated

I have an options page on my wordpress site created using advanced custom fields, which has a number field on it.

What I am trying to do is to check the value of the number when the page is updated.

the problem i am having is to know when the page is submitted i read that if it is a post you can use post id but that it is not a post and it does not have post id , I’m not sure what I can use to check it.

The URL looks like this: /wp-admin/admin.php?page=acf-options-site-options

And if I try to check it using:

global $pagenow;

echo "postid:".$pagenow;

it just returns admin.php

Please what do I need to use to run a function when this page is updated?

Thanks for any help you can give.

Leave a Comment