-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauto_fetch_post_thumbnail_admin.php
27 lines (24 loc) · 1.25 KB
/
auto_fetch_post_thumbnail_admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
if($_POST['auto_fetch_post_thumbnail_hidden'] == 'Y') {
$auto_fetch_image_type = $_POST['auto_fetch_image_type'];
update_option('auto_fetch_image_type', $auto_fetch_image_type);
?>
<div class="updated"><p><strong><?php _e('Options saved.' ); ?></strong></p></div>
<?php
} else {
//Normal page display
$auto_fetch_image_type = get_option('auto_fetch_image_type');
}
?>
<div class="wrap">
<?php echo "<h2>" . __('Auto Fetch Post Thumbnail Options') . "</h2>"; ?>
<form name="auto_fetch_post_thumbnail_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
<input type="hidden" name="auto_fetch_post_thumbnail_hidden" value="Y">
<?php echo "<h4>" . __( '') . "</h4>"; ?>
<p><?php _e("Allowed filetypes: " ); ?><br/><input type="text" name="auto_fetch_image_type" value="<?php echo $auto_fetch_image_type; ?>" size="100"><?php _e("e.g.:jpeg|jpg|gif|png" ); ?></p>
<hr />
<p class="submit">
<input type="submit" name="Submit" value="<?php _e('Update Options') ?>" />
</p>
</form>
</div>