Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php
add_action('StaticPress::options_save', 'static_press_options_save');
function static_press_options_save(){
if ( !isset($_POST['nonce_action'])) || !check_admin_referer('nonce_action', 'nonce_name') )
return;
if ( isset($_POST['access_key']) )
update_option( 'static_press_access_key', $_POST['access_key'] );
if ( isset($_POST['secret_key']) )
update_option( 'static_press_secret_key', $_POST['secret_key'] );
if ( isset($_POST['s3_bucket']) )
update_option( 'static_press_s3_bucket', $_POST['s3_bucket'] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment