| 1 |
<?php |
| 2 |
if ( !defined( 'ABSPATH' ) ) exit; |
| 3 |
|
| 4 |
if( isset( $_POST['submit'] ) ) { |
| 5 |
if( isset( $_POST['icegram_share_love'] ) ) { |
| 6 |
update_option( 'icegram_share_love', $_POST['icegram_share_love'] ); |
| 7 |
} else { |
| 8 |
update_option( 'icegram_share_love', 'no' ); |
| 9 |
} |
| 10 |
} |
| 11 |
|
| 12 |
?> |
| 13 |
<div class="wrap"> |
| 14 |
<h2><?php _e( "Icegram Settings", "icegram" ) ?></h2> |
| 15 |
<form name="icegram_settings" method="POST" action="<?php echo admin_url(); ?>edit.php?post_type=ig_campaign&page=icegram-settings"> |
| 16 |
<table class="form-table"> |
| 17 |
<tr> |
| 18 |
<th scope="row"><?php _e( 'Share Icegram', 'icegram' ) ?></th> |
| 19 |
<td> |
| 20 |
<label for="icegram_share_love"> |
| 21 |
<input type="checkbox" name="icegram_share_love" id="icegram_share_love"/ value="yes" <?php checked('yes', get_option('icegram_share_love')); ?> /> |
| 22 |
<?php _e( 'Show "Powered by" link', 'icegram' ); ?> |
| 23 |
</label> |
| 24 |
</td> |
| 25 |
</tr> |
| 26 |
</table> |
| 27 |
<?php submit_button(); ?> |
| 28 |
</form> |
| 29 |
</div> |
| 30 |
<?php do_action( 'icegram_settings_after' ); ?> |