Support

Account

Home Forums Add-ons Options Page When using 'save_post' action, how do you identify which options page? Reply To: When using 'save_post' action, how do you identify which options page?

  • Just to clarify. For options page acf/save_post works as follows:

    
    function my_acf_save_post($post_id) {
        var_dump($post_id); // returns: 'options'
        var_dump($screen->base); // returns: '[parent-slug]_page_[your-menu-slug]'
        exit();
    }
    add_action('acf/save_post', 'my_acf_save_post', 20);