I am writing customized plugin and it has plugin choices web page.
In my customized plugin possibility web page is a discipline so as to add the API token.
When saving the shape for the sector API token, it save however I need to run a customized perform after saving it.
The customized capabilities to run is to import information and insert it to our customized database desk from our API.
`
/* register plugin settings /
perform ptgoalserve_registersettings_fnc() {
/
plugin choices pt_livescore_plugin_options
@option_group = ptgoalserve_plugin_options
*/
register_setting(‘ptgoalserve_apidetails’,’ptgoalserve_plugin_options’);
/* sections API Settings
@ptgoalserve_apidata part
*/
add_settings_section('ptgoalserve_apidata', __( 'Goalserve.com API Knowledge', 'ptgoalserve' ), 'ptgs_section_token_cb', 'ptgoalserve' );
/* setting discipline for API Knowledge */
add_settings_field( 'ptgoalserve_token', __( 'API Token', 'ptgoalserve' ), 'ptgoalserve_apitoken_cb', 'ptgoalserve', 'ptgoalserve_apidata' );
}
add_action('admin_init','ptgoalserve_registersettings_fnc');
`
perform insert_todatabase(){
}
I already tried update_option_$option_name or updated_option_$option_name however it would not work or hearth the customized perform.
I attempted to place the do_action(úpdate_option_$optio_name) contained in the
do_action(‘ptgoalserve_plugin_options’);
this one works however it’s going to run everytime I am going this selection web page.