现在可以完美运行。更新了代码。谢谢新家具。
function foo_options(){
global $post;
if (isset($custom['website_url']) && isset($custom['website_url'][0])) {
$website_url = isset($custom['website_url']) ? $custom['website_url'][0] : '';}
?>
<div id="foo-options">
<label>Website URL:</label><input name="website_url" value="<?php echo $website_url; ?>" />
</div><!--end foo-options-->
<?php
}
{
function update_website_url(){
global $post;
if (($post != null) && isset($_POST['website_url'])) {
update_post_meta($post->ID, "website_url", $_POST["website_url"]);
}
}
更新了代码和 bin。http://pastebin.com/2ZWisprm