My Theme Options
';
mythemeopt_form();
echo '';
}
function mythemeopt_update_options() {
$updated = false;
update_option('mythemeopt_current_date', $_REQUEST['mythemeopt_current_date']);
update_option('mythemeopt_current_title', $_REQUEST['mythemeopt_current_title']);
update_option('mythemeopt_current_thumbnail', $_REQUEST['mythemeopt_current_thumbnail']);
$updated = true;
if ($updated) {
echo '';
echo '
My Theme Options Updated
';
echo '
';
} else {
echo '';
echo '
Unable to update My Theme Options
';
echo '
';
}
}
function mythemeopt_form() {
$mythemeopt_current_date = get_option('mythemeopt_current_date');
$mythemeopt_current_title = get_option('mythemeopt_current_title');
$mythemeopt_current_thumbnail = get_option('mythemeopt_current_thumbnail');
echo "";
}
function mythemeopt ($myopt_request) {
global $wpdb;
$myopt_date = get_option('mythemeopt_current_date');
$myopt_title = get_option('mythemeopt_current_title');
$myopt_thumbnail = get_option('mythemeopt_current_thumbnail');
if ($myopt_request == 'date') { return $myopt_date; };
if ($myopt_request == 'title') { return $myopt_title; };
if ($myopt_request == 'thumbnail') { return $myopt_thumbnail; };
}