]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/options-writing.php
Wordpress 2.3.2
[autoinstalls/wordpress.git] / wp-admin / options-writing.php
index 96fa30fff29683a27b0549ec955b2b8657ee69f0..e8979c4542d6a31ff3ec2ddd5ddb28f081a6ebe5 100644 (file)
@@ -7,37 +7,50 @@ $parent_file = 'options-general.php';
 include('admin-header.php');
 ?>
 
 include('admin-header.php');
 ?>
 
-<div class="wrap"> 
-<h2><?php _e('Writing Options') ?></h2> 
-<form method="post" action="options.php"> 
+<div class="wrap">
+<h2><?php _e('Writing Options') ?></h2>
+<form method="post" action="options.php">
 <?php wp_nonce_field('update-options') ?>
 <?php wp_nonce_field('update-options') ?>
-<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
-<tr valign="top"> 
-<th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th> 
-<td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " /> 
-<?php _e('lines') ?></td> 
-</tr> 
+<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
+<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
+<tr valign="top">
+<th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th>
+<td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " />
+<?php _e('lines') ?></td>
+</tr>
 <tr valign="top">
 <th scope="row"><?php _e('Formatting:') ?></th>
 <td>
 <tr valign="top">
 <th scope="row"><?php _e('Formatting:') ?></th>
 <td>
-<label for="rich_editing">
-<input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_settings('rich_editing')); ?> />
-<?php _e('Users should use the visual rich editor by default') ?></label><br />
 <label for="use_smilies">
 <label for="use_smilies">
-<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
+<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_option('use_smilies')); ?> />
 <?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label><br />
 <?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label><br />
-<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked('1', get_settings('use_balanceTags')); ?> /> <?php _e('WordPress should correct invalidly nested XHTML automatically') ?></label>
+<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked('1', get_option('use_balanceTags')); ?> /> <?php _e('WordPress should correct invalidly nested XHTML automatically') ?></label>
 </td>
 </tr>
 <tr valign="top">
 <th scope="row"><?php _e('Default post category:') ?></th>
 <td><select name="default_category" id="default_category">
 <?php
 </td>
 </tr>
 <tr valign="top">
 <th scope="row"><?php _e('Default post category:') ?></th>
 <td><select name="default_category" id="default_category">
 <?php
-$categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");
+$categories = get_categories('get=all');
 foreach ($categories as $category) :
 foreach ($categories as $category) :
-if ($category->cat_ID == get_settings('default_category')) $selected = " selected='selected'";
+$category = sanitize_category($category);
+if ($category->term_id == get_option('default_category')) $selected = " selected='selected'";
 else $selected = '';
 else $selected = '';
-echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
+echo "\n\t<option value='$category->term_id' $selected>$category->name</option>";
+endforeach;
+?>
+</select></td>
+</tr>
+<tr valign="top">
+<th scope="row"><?php _e('Default link category:') ?></th>
+<td><select name="default_link_category" id="default_link_category">
+<?php
+$link_categories = get_terms('link_category', 'get=all');
+foreach ($link_categories as $category) :
+$category = sanitize_term($category, 'link_category');
+if ($category->term_id == get_option('default_link_category')) $selected = " selected='selected'";
+else $selected = '';
+echo "\n\t<option value='$category->term_id' $selected>$category->name</option>";
 endforeach;
 ?>
 </select></td>
 endforeach;
 ?>
 </select></td>
@@ -45,14 +58,14 @@ endforeach;
 </table>
 
 <fieldset class="options">
 </table>
 
 <fieldset class="options">
-<legend><?php _e('Writing by e-mail') ?></legend>
+<legend><?php _e('Post via e-mail') ?></legend>
 <p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <code>%s</code>, <code>%s</code>, <code>%s</code>.'), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5)) ?></p>
 
 <p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <code>%s</code>, <code>%s</code>, <code>%s</code>.'), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5)) ?></p>
 
-<table width="100%" cellspacing="2" cellpadding="5" class="editform">
+<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
 <tr valign="top">
 <th scope="row"><?php _e('Mail server:') ?></th>
 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" size="40" />
 <tr valign="top">
 <th scope="row"><?php _e('Mail server:') ?></th>
 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" size="40" />
-<label for="mailserver_port"><?php _e('Port:') ?></label> 
+<label for="mailserver_port"><?php _e('Port:') ?></label>
 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" size="6" />
 </td>
 </tr>
 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" size="6" />
 </td>
 </tr>
@@ -67,12 +80,13 @@ endforeach;
 </td>
 </tr>
 <tr valign="top">
 </td>
 </tr>
 <tr valign="top">
-<th scope="row"><?php _e('Default post by mail category:') ?></th>
+<th scope="row"><?php _e('Default mail category:') ?></th>
 <td><select name="default_email_category" id="default_email_category">
 <?php
 //Alreay have $categories from default_category
 foreach ($categories as $category) :
 <td><select name="default_email_category" id="default_email_category">
 <?php
 //Alreay have $categories from default_category
 foreach ($categories as $category) :
-if ($category->cat_ID == get_settings('default_email_category')) $selected = " selected='selected'";
+$category = sanitize_category($category);
+if ($category->cat_ID == get_option('default_email_category')) $selected = " selected='selected'";
 else $selected = '';
 echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
 endforeach;
 else $selected = '';
 echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
 endforeach;
@@ -84,17 +98,27 @@ endforeach;
 
 <fieldset class="options">
 <legend><?php _e('Update Services') ?></legend>
 
 <fieldset class="options">
 <legend><?php _e('Update Services') ?></legend>
-<p><?php _e('When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="http://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service URIs with line breaks.') ?></p>
+
+<?php if ( get_option('blog_public') ) : ?>
+
+<p><?php _e('When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="http://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service <abbr title="Universal Resource Locator">URL</abbr>s with line breaks.') ?></p>
 
 <textarea name="ping_sites" id="ping_sites" style="width: 98%;" rows="3" cols="50"><?php form_option('ping_sites'); ?></textarea>
 
 <textarea name="ping_sites" id="ping_sites" style="width: 98%;" rows="3" cols="50"><?php form_option('ping_sites'); ?></textarea>
+
+<?php else : ?>
+
+       <p><?php printf(__('WordPress is not notifying any <a href="http://codex.wordpress.org/Update_Services">Update Services</a> because of your blog\'s <a href="%s">privacy settings</a>.'), 'options-privacy.php'); ?>
+
+<?php endif; ?>
+
 </fieldset>
 
 <p class="submit">
 </fieldset>
 
 <p class="submit">
-<input type="hidden" name="action" value="update" /> 
-<input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,rich_editing,ping_sites,mailserver_url,mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category,use_balanceTags" /> 
-<input type="submit" name="Submit" value="<?php _e('Update Options') ?> &raquo;" /> 
+<input type="hidden" name="action" value="update" />
+<input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,ping_sites,mailserver_url,mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category,use_balanceTags,default_link_category" />
+<input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" />
 </p>
 </p>
-</form> 
-</div> 
+</form>
+</div>
 
 <?php include('./admin-footer.php') ?>
\ No newline at end of file
 
 <?php include('./admin-footer.php') ?>
\ No newline at end of file