Run Custom Function on Save Setting

Support MB Settings Page Run Custom Function on Save SettingResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16765
    Manoj KumarManoj Kumar
    Participant

    Hi,

    I need to run my custom function on clicking the Save Settings button. Are there any hooks to run my custom function.

    Thanks in Advance.

    #16782
    Anh TranAnh Tran
    Keymaster

    Hi Manoj,

    Please use the hook mb_settings_page_load with priority > 10, like this:

    add_action( 'mb_settings_page_load', function() {
        // Run your code.
    }, 20 );
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.