Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sbruner/71a96c2604113292b8267aaf955f3533 to your computer and use it in GitHub Desktop.
Save sbruner/71a96c2604113292b8267aaf955f3533 to your computer and use it in GitHub Desktop.
<?php
//When the user enters data in the piklist_demo_fields settings page and they press save, add another setting called option_key with the value of option_value.
add_filter('piklist_pre_update_option_piklist_demo_fields','my_update_option',10,4);
function my_update_option($settings, $setting, $new, $old) {
$settings['option_key'] = 'option_value';
return $settings;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment