Last active
December 19, 2015 09:18
-
-
Save wokamoto/5931674 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('StaticPress::options_page', 'static_press_options_page'); | |
function static_press_options_page(){ | |
$access_key = get_option('static_press_access_key'); | |
$secret_key = get_option('static_press_secret_key'); | |
$s3_bucket = get_option('static_press_s3_bucket'); | |
?> | |
<div class="wrap"> | |
<h2><?php echo esc_html( $title ); ?></h2> | |
<form method="post" action=""> | |
<?php echo wp_nonce_field('nonce_action', 'nonce_name', true, false) . "\n"; ?> | |
<table class="wp-list-table fixed"><tbody> | |
<tr> | |
<th><label for="access_key">AWS Access Key</label></th> | |
<td> | |
<input type="text" name="access_key" value="<?php echo esc_attr($access_key); ?>" id="access_key" size=100 /> | |
</td> | |
</tr> | |
<tr> | |
<th><label for="secret_key">AWS Secret Key</label></th> | |
<td> | |
<input type="text" name="secret_key" value="<?php echo esc_attr($secret_key); ?>" id="secret_key" size=100 /> | |
</td> | |
</tr> | |
<tr> | |
<th><label for="region">AWS Region</label></th> | |
<td><select name="region"> | |
<option value=""></option> | |
<option value="US_EAST_1">US_EAST_1</option> | |
<option value="US_WEST_1">US_WEST_1</option> | |
<option value="US_WEST_2">US_WEST_2</option> | |
<option value="EU_WEST_1">EU_WEST_1</option> | |
<option value="AP_SOUTHEAST_1">AP_SOUTHEAST_1</option> | |
<option value="AP_SOUTHEAST_2">AP_SOUTHEAST_2</option> | |
<option value="AP_NORTHEAST_1" selected>AP_NORTHEAST_1</option> | |
<option value="SA_EAST_1">SA_EAST_1</option> | |
<option value="US_GOV_WEST_1">US_GOV_WEST_1</option> | |
</select> | |
</td> | |
</tr> | |
<tr> | |
<th><label for="s3_bucket">S3 Bucket</label></th> | |
<td> | |
<input type="text" name="s3_bucket" value="<?php echo esc_attr($s3_bucket); ?>" id="s3_bucket" size=100 /> | |
</td> | |
</tr> | |
</tbody></table> | |
<?php submit_button(); ?> | |
</form> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment