Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Last active February 8, 2016 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjohnson/1c5241d67b4c388b4e4a to your computer and use it in GitHub Desktop.
Save kjohnson/1c5241d67b4c388b4e4a to your computer and use it in GitHub Desktop.
<?php
function save_example_setting( $setting_value )
{
if( strpos( $setting_value, '_' ) ){
$parts = explode( '_', $setting_value );
foreach( $parts as $key => $value ){
Ninja_Forms()->update_setting( 'example_part_' . $key, $value );
}
}
}
add_action( 'ninja_forms_save_setting_example_setting', 'save_example_setting', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment