2010-11-25 72 views

回答

0

據我所知,你到底,你要展現在後右側的編輯表單元框相關的功能?這是您的解決方案。

function bilge_edit_custom_box() { 
global $post; 
echo '<input type="hidden" name="featured_noncename" id="featured_noncename" value="' . wp_create_nonce(plugin_basename(__FILE__)) . '" />'; 

     $featured = get_post_meta($post->ID,'featured',true); 
     if($featured=="1"){ 
      $checked1 = ' checked="checked" '; 
     }else{ 
      $checked1 = ''; 
     } 

     $summary = get_post_meta($post->ID,'summary',true); 
     if($summary=="1"){ 
      $checked2 = ' checked="checked" '; 
     }else{ 
      $checked2 = ''; 
     } 

     $categored = get_post_meta($post->ID,'categored',true); 
     if($categored=="1"){ 
      $checked3 = ' checked="checked" '; 
     }else{ 
      $checked3 = ''; 
     } 
echo '<p><input type="checkbox" id="featured" name="featured" value="1" '.$checked1.' />&nbsp;<label for="featured"><strong>'. _e('Featured Posts', 'bilge') .'</strong></label></p>'; 
echo '<p><input type="checkbox" id="summary" name="summary" value="1" '. $checked2.' />&nbsp;<label for="summary"><strong>'. _e('Summary Posts', 'bilge') .'</strong></label></p>'; 
echo '<p><input type="checkbox" id="categored" name="categored" value="1" '. $checked3.' />&nbsp;<label for="categored"><strong>'. _e('Category Based Posts', 'bilge') .'</strong></label></p>'; 

}

+0

我已添加的屏幕截圖 – 2010-11-25 10:32:09

相關問題