Skip to content

Instantly share code, notes, and snippets.

@wokamoto
Created July 5, 2013 04:57
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 wokamoto/5931806 to your computer and use it in GitHub Desktop.
Save wokamoto/5931806 to your computer and use it in GitHub Desktop.
<?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