Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress Hook After Options Page Save
<?php
/**
* Hook into options page after save.
*/
public function km_hook_into_options_page_after_save( $old_value, $new_value ) {
if ( $old_value['some_option'] != $new_value['some_option'] ) {
// This value has been changed. Insert code here.
}
}
add_action( 'update_option_km_my_cool_options', 'km_hook_into_options_page_after_save', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.