Some new options and an option cleanup.
git-svn-id: https://develop.svn.wordpress.org/trunk@949 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ef6846f5a
commit
5fbd33f44e
@ -65,7 +65,8 @@ if ($user_level <= 3) {
|
||||
<div class="wrap">
|
||||
<h2>Writing Options</h2>
|
||||
<form name="form1" method="post" action="options.php">
|
||||
<input type="hidden" name="action" value="update" /> <input type="hidden" name="page_options" value="'default_post_edit_rows','blog_charset','use_smilies','use_balanceTags'" />
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="page_options" value="'default_post_edit_rows','blog_charset','use_smilies','use_balanceTags','advanced_edit','ping_sites'" />
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"> Size of the writing box:</th>
|
||||
@ -79,14 +80,27 @@ if ($user_level <= 3) {
|
||||
The charset you write your blog in (UTF-8 recommended<a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html"></a>)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p><label for="use_smilies"><input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
|
||||
Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics</label>
|
||||
<label for="new_users_can_blog"></label></p>
|
||||
<p>
|
||||
<label for="use_smilies">
|
||||
<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
|
||||
Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics.</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="use_balanceTags">
|
||||
<input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked('1', get_settings('use_balanceTags')); ?> />
|
||||
WordPress should correct invalidly nested XHTML automatically </label>
|
||||
WordPress should correct invalidly nested XHTML automatically.</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="advanced_edit">
|
||||
<input name="advanced_edit" type="checkbox" id="advanced_edit" value="1" <?php checked('1', get_settings('advanced_edit')); ?> />
|
||||
Compose posts using the advanced interface by default.</label>
|
||||
</p>
|
||||
<fieldset>
|
||||
<legend>Update Services</legend>
|
||||
<p>Enter the sites that you would like to notify when you publish a new post. For a list of some recommended sites to ping please see [LINK TO SOMETHING]. Seperate multiple URIs by line breaks.</p>
|
||||
|
||||
<textarea name="ping_sites" id="ping_sites" style="width: 98%;"><?php echo get_settings('ping_sites'); ?></textarea>
|
||||
</fieldset>
|
||||
<p style="text-align: right;">
|
||||
<input type="submit" name="Submit" value="Update Options" />
|
||||
</p>
|
||||
|
@ -693,8 +693,13 @@ switch($action) {
|
||||
$ping_status = get_settings('default_ping_status');
|
||||
$post_pingback = get_settings('default_pingback_flag');
|
||||
$default_post_cat = get_settings('default_post_category');
|
||||
|
||||
if (get_settings('advanced_edit')) {
|
||||
include('edit-form-advanced.php');
|
||||
} else {
|
||||
include('edit-form.php');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h3>WordPress bookmarklet</h3>
|
||||
|
@ -651,7 +651,7 @@ function upgrade_100() {
|
||||
|
||||
function upgrade_101() {
|
||||
global $wpdb, $tableoptionvalues, $tablelinkcategories, $tableposts, $tablecategories, $tablecomments, $tablelinks;
|
||||
// Fix possible duplicate problem from CVS
|
||||
// Fix possible duplicate problem from CVS, we can REMOVE this later
|
||||
$option59 = $wpdb->get_results("SELECT * FROM $tableoptionvalues WHERE option_id = '59'");
|
||||
if (1 < count($option59)) {
|
||||
$wpdb->query("DELETE FROM $tableoptionvalues WHERE option_id = '59' AND optionvalue LIKE('%FROM order%')");
|
||||
@ -672,6 +672,7 @@ function upgrade_101() {
|
||||
add_clean_index($tablelinks , 'link_visible');
|
||||
}
|
||||
|
||||
|
||||
function upgrade_110() {
|
||||
global $wpdb, $tableusers, $tablecomments, $tableposts, $tableoptiongroups, $tableoptiongroup_options, $tableoptions, $tablepostmeta;
|
||||
|
||||
@ -708,8 +709,8 @@ function upgrade_110() {
|
||||
$wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 6");
|
||||
|
||||
// Add blog_charset option
|
||||
if(!$wpdb->get_var("SELECT * FROM $tableoptions WHERE option_id = '93'")) {
|
||||
$wpdb->query("INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level) VALUES (93, 'blog_charset', 3, 'utf-8', 'Your blog’s charset (here’s a <a href=\"http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html\">list of possible charsets</a>)', 8)");
|
||||
if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'blog_charset'")) {
|
||||
$wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('blog_charset', 3, 'utf-8', 8)");
|
||||
}
|
||||
|
||||
// Convert all datetime fields' values to GMT, add a gmt_offset option
|
||||
@ -767,6 +768,18 @@ function upgrade_110() {
|
||||
)
|
||||
");
|
||||
|
||||
// First we need to enlarge option_value so it can hold larger values:
|
||||
$wpdb->query("ALTER TABLE `$tableoptions` CHANGE `option_value` `option_value` TEXT NOT NULL");
|
||||
|
||||
// Now an option for blog pinging
|
||||
if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'ping_sites'")) {
|
||||
$wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('ping_sites', 3, '', 8)");
|
||||
}
|
||||
|
||||
// Option for using the advanced edit screen by default
|
||||
if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'advanced_edit'")) {
|
||||
$wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('advanced_edit', 3, '0', 8)");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user