Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function themeoptions_update()
- {
- // this is where validation would go
- update_option('mytheme_colour', $_POST['colour']);
- update_option('mytheme_ad1image', $_POST['ad1image']);
- update_option('mytheme_ad1url', $_POST['ad1url']);
- update_option('mytheme_ad2image', $_POST['ad2image']);
- update_option('mytheme_ad2url', $_POST['ad2url']);
- if ($_POST['display_sidebar']=='on') { $display = 'checked'; } else { $display = ''; }
- update_option('mytheme_display_sidebar', $display);
- if ($_POST['display_search']=='on') { $display = 'checked'; } else { $display = ''; }
- update_option('mytheme_display_search', $display);
- if ($_POST['display_twitter']=='on') { $display = 'checked'; } else { $display = ''; }
- update_option('mytheme_display_twitter', $display);
- update_option('mytheme_twitter_username', $_POST['twitter_username']);
- }
Add Comment
Please, Sign In to add comment