我找到了方法:
<?php
// Theme Options
require_once(TEMPLATEPATH . \'/functions/admin-menu.php\');
add_action( \'wp_head\', \'theme_options\');
function theme_options() {
// Initiate Theme Options
$options = get_option(\'plugin_options\');
// If logo image was uploaded then remove text from site title
if ($options[\'logo\'] != NULL)
$remove_text = \'-9999px\';
else
$remove_text = 0;
?><style>
body {
background-color: <?php echo $options[\'color_scheme\']; ?>
}
#header h1 a {
background: url(<?php echo $options[\'logo\']; ?>) no-repeat scroll 0 0;
text-indent: <?php echo $remove_text; ?>;
}
</style><?php
}
(代码有效,但如果有更干净或更简单的方法,请告诉我)