Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove trailing spaces and convert spaces to tabs. Props Nazgul. fixe…

…s #986

git-svn-id: http://svn.automattic.com/wordpress/trunk@4495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 9f534ebae6d90aa74b6e211ce57c2942548164a1 1 parent 38e8682
ryan authored
Showing with 1,532 additions and 1,532 deletions.
  1. +1 −1  index.php
  2. +1 −1  wp-admin/admin-ajax.php
  3. +23 −23 wp-admin/admin-db.php
  4. +5 −5 wp-admin/admin-functions.php
  5. +10 −10 wp-admin/bookmarklet.php
  6. +4 −4 wp-admin/categories.php
  7. +2 −2 wp-admin/custom-fields.js
  8. +1 −1  wp-admin/dbx-admin-key-js.php
  9. +2 −2 wp-admin/edit-category-form.php
  10. +3 −3 wp-admin/edit-comments.php
  11. +6 −7 wp-admin/edit-form-advanced.php
  12. +2 −2 wp-admin/edit-form-comment.php
  13. +6 −6 wp-admin/edit-form.php
  14. +3 −3 wp-admin/edit-link-form.php
  15. +7 −7 wp-admin/edit-page-form.php
  16. +8 −8 wp-admin/edit-pages.php
  17. +30 −30 wp-admin/edit.php
  18. +3 −3 wp-admin/export.php
  19. +1 −1  wp-admin/import/blogger.php
  20. +8 −8 wp-admin/import/blogware.php
  21. +69 −68 wp-admin/import/dotclear.php
  22. +7 −7 wp-admin/import/greymatter.php
  23. +3 −3 wp-admin/import/mt.php
  24. +96 −96 wp-admin/import/textpattern.php
  25. +3 −3 wp-admin/import/wordpress.php
  26. +5 −5 wp-admin/index.php
  27. +85 −85 wp-admin/install-helper.php
  28. +3 −3 wp-admin/link-add.php
  29. +4 −4 wp-admin/link-manager.php
  30. +22 −22 wp-admin/link-parse-opml.php
  31. +1 −1  wp-admin/link.php
  32. +3 −3 wp-admin/menu-header.php
  33. +2 −2 wp-admin/menu.php
  34. +17 −17 wp-admin/moderation.php
  35. +5 −5 wp-admin/options-misc.php
  36. +1 −1  wp-admin/options-permalink.php
  37. +10 −10 wp-admin/options-privacy.php
  38. +6 −6 wp-admin/options-writing.php
  39. +23 −23 wp-admin/plugin-editor.php
  40. +2 −2 wp-admin/post.php
  41. +8 −8 wp-admin/profile.php
  42. +76 −76 wp-admin/setup-config.php
  43. +8 −8 wp-admin/sidebar.php
  44. +24 −24 wp-admin/templates.php
  45. +17 −17 wp-admin/theme-editor.php
  46. +4 −4 wp-admin/themes.php
  47. +3 −3 wp-admin/update-links.php
  48. +84 −84 wp-admin/upgrade-functions.php
  49. +1 −1  wp-admin/upgrade-schema.php
  50. +1 −1  wp-admin/upgrade.php
  51. +13 −13 wp-admin/user-edit.php
  52. +6 −6 wp-admin/wp-admin.css
  53. +4 −4 wp-admin/xfn.js
  54. +7 −7 wp-atom.php
  55. +6 −6 wp-commentsrss2.php
  56. +2 −2 wp-content/themes/classic/comments-popup.php
  57. +2 −2 wp-content/themes/classic/comments.php
  58. +1 −1  wp-content/themes/classic/header.php
  59. +3 −3 wp-content/themes/classic/index.php
  60. +3 −3 wp-content/themes/classic/sidebar.php
  61. +1 −1  wp-content/themes/default/archive.php
  62. +6 −6 wp-content/themes/default/archives.php
  63. +2 −2 wp-content/themes/default/comments-popup.php
  64. +12 −12 wp-content/themes/default/comments.php
  65. +1 −1  wp-content/themes/default/footer.php
  66. +3 −3 wp-content/themes/default/header.php
  67. +2 −2 wp-content/themes/default/page.php
  68. +2 −2 wp-content/themes/default/sidebar.php
  69. +3 −3 wp-content/themes/default/single.php
  70. +2 −2 wp-feed.php
  71. +1 −1  wp-includes/bookmark-template.php
  72. +5 −5 wp-includes/bookmark.php
  73. +3 −3 wp-includes/cache.php
  74. +12 −12 wp-includes/capabilities.php
  75. +4 −4 wp-includes/category-template.php
  76. +48 −48 wp-includes/classes.php
  77. +9 −9 wp-includes/comment-template.php
  78. +21 −21 wp-includes/comment.php
  79. +32 −32 wp-includes/compat.php
  80. +71 −71 wp-includes/deprecated.php
  81. +49 −49 wp-includes/formatting.php
  82. +8 −8 wp-includes/functions.php
  83. +1 −1  wp-includes/general-template.php
  84. +1 −1  wp-includes/l10n.php
  85. +7 −7 wp-includes/link-template.php
  86. +7 −7 wp-includes/pluggable.php
  87. +39 −39 wp-includes/post.php
  88. +11 −11 wp-includes/query.php
  89. +2 −2 wp-includes/registration.php
  90. +36 −36 wp-includes/rewrite.php
  91. +44 −44 wp-includes/rss.php
  92. +2 −2 wp-includes/script-loader.php
  93. +1 −1  wp-includes/user.php
  94. +1 −1  wp-includes/wp-db.php
  95. +6 −6 wp-links-opml.php
  96. +1 −1  wp-login.php
  97. +1 −1  wp-rss2.php
  98. +2 −2 wp-trackback.php
  99. +307 −307 xmlrpc.php
View
2  index.php
@@ -1,4 +1,4 @@
-<?php
+<?php
/* Short and sweet */
define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
View
2  wp-admin/admin-ajax.php
@@ -128,7 +128,7 @@ function wp_ajax_meta_row( $pid, $mid, $key, $value ) {
break;
case 'add-cat' : // From Manage->Categories
if ( !current_user_can( 'manage_categories' ) )
- die('-1');
+ die('-1');
if ( !$cat = wp_insert_category( $_POST ) )
die('0');
if ( !$cat = get_category( $cat ) )
View
46 wp-admin/admin-db.php
@@ -48,7 +48,7 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true ) {
if ( ! $user->has_cap('edit_others_posts') ) {
if ( $user->has_cap('edit_posts') || $exclude_zeros == false )
return array($user->id);
- else
+ else
return false;
}
@@ -96,7 +96,7 @@ function wp_insert_category($catarr) {
$update = false;
$cat_name = apply_filters('pre_category_name', $cat_name);
-
+
if (empty ($category_nicename))
$category_nicename = sanitize_title($cat_name);
else
@@ -198,7 +198,7 @@ function wp_delete_category($cat_ID) {
$cats = array($default_cat);
else
$cats = array_diff($cats, array($cat_ID));
- wp_set_post_categories($post_id, $cats);
+ wp_set_post_categories($post_id, $cats);
}
$default_link_cat = get_option('default_link_category');
@@ -209,9 +209,9 @@ function wp_delete_category($cat_ID) {
$cats = array($default_link_cat);
else
$cats = array_diff($cats, array($cat_ID));
- wp_set_link_cats($link_id, $cats);
+ wp_set_link_cats($link_id, $cats);
}
-
+
wp_cache_delete($cat_ID, 'category');
wp_cache_delete('all_category_ids', 'category');
@@ -285,9 +285,9 @@ function wp_delete_user($id, $reassign = 'novalue') {
function wp_revoke_user($id) {
$id = (int) $id;
-
+
$user = new WP_User($id);
- $user->remove_all_caps();
+ $user->remove_all_caps();
}
function wp_insert_link($linkdata) {
@@ -385,15 +385,15 @@ function wp_update_link($linkdata) {
$link = add_magic_quotes($link);
// Passed link category list overwrites existing category list if not empty.
- if ( isset($linkdata['link_category']) && is_array($linkdata['link_category'])
+ if ( isset($linkdata['link_category']) && is_array($linkdata['link_category'])
&& 0 != count($linkdata['link_category']) )
- $link_cats = $linkdata['link_category'];
- else
- $link_cats = $link['link_category'];
+ $link_cats = $linkdata['link_category'];
+ else
+ $link_cats = $link['link_category'];
// Merge old and new fields with new fields overwriting old ones.
$linkdata = array_merge($link, $linkdata);
- $linkdata['link_category'] = $link_cats;
+ $linkdata['link_category'] = $link_cats;
return wp_insert_link($linkdata);
}
@@ -402,7 +402,7 @@ function wp_delete_link($link_id) {
global $wpdb;
do_action('delete_link', $link_id);
-
+
$categories = wp_get_link_cats($link_id);
if( is_array( $categories ) ) {
foreach ( $categories as $category ) {
@@ -418,9 +418,9 @@ function wp_delete_link($link_id) {
function wp_get_link_cats($link_ID = 0) {
global $wpdb;
- $sql = "SELECT category_id
- FROM $wpdb->link2cat
- WHERE link_id = $link_ID
+ $sql = "SELECT category_id
+ FROM $wpdb->link2cat
+ WHERE link_id = $link_ID
ORDER BY category_id";
$result = $wpdb->get_col($sql);
@@ -441,8 +441,8 @@ function wp_set_link_cats($link_ID = 0, $link_categories = array()) {
// First the old categories
$old_categories = $wpdb->get_col("
- SELECT category_id
- FROM $wpdb->link2cat
+ SELECT category_id
+ FROM $wpdb->link2cat
WHERE link_id = $link_ID");
if (!$old_categories) {
@@ -457,9 +457,9 @@ function wp_set_link_cats($link_ID = 0, $link_categories = array()) {
if ($delete_cats) {
foreach ($delete_cats as $del) {
$wpdb->query("
- DELETE FROM $wpdb->link2cat
- WHERE category_id = $del
- AND link_id = $link_ID
+ DELETE FROM $wpdb->link2cat
+ WHERE category_id = $del
+ AND link_id = $link_ID
");
}
}
@@ -470,11 +470,11 @@ function wp_set_link_cats($link_ID = 0, $link_categories = array()) {
if ($add_cats) {
foreach ($add_cats as $new_cat) {
$wpdb->query("
- INSERT INTO $wpdb->link2cat (link_id, category_id)
+ INSERT INTO $wpdb->link2cat (link_id, category_id)
VALUES ($link_ID, $new_cat)");
}
}
-
+
// Update category counts.
$all_affected_cats = array_unique(array_merge($link_categories, $old_categories));
foreach ( $all_affected_cats as $cat_id ) {
View
10 wp-admin/admin-functions.php
@@ -1139,10 +1139,10 @@ function touch_time( $edit = 1, $for_post = 1 ) {
?>
</select>
<input type="text" id="jj" name="jj" value="<?php echo $jj; ?>" size="2" maxlength="2" onchange="edit_date.checked=true"/>
-<input type="text" id="aa" name="aa" value="<?php echo $aa ?>" size="4" maxlength="5" onchange="edit_date.checked=true" /> @
-<input type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> :
-<input type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />
-<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />
+<input type="text" id="aa" name="aa" value="<?php echo $aa ?>" size="4" maxlength="5" onchange="edit_date.checked=true" /> @
+<input type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> :
+<input type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />
+<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />
<?php
if ( $edit ) {
_e( 'Existing timestamp' );
@@ -1387,7 +1387,7 @@ function user_can_access_admin_page() {
return false;
}
}
-
+
return true;
}
View
20 wp-admin/bookmarklet.php
@@ -35,16 +35,16 @@
else
$post->post_title = $popuptitle;
-
+
$content = wp_specialchars($_REQUEST['content']);
$popupurl = wp_specialchars($_REQUEST['popupurl']);
- if ( !empty($content) ) {
- $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) );
- } else {
- $post->post_content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
- }
+if ( !empty($content) ) {
+ $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) );
+} else {
+ $post->post_content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
+}
- /* /big funky fixes */
+/* /big funky fixes */
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -77,15 +77,15 @@
}
#wpbookmarklet .wrap {
- border: 0px;
+ border: 0px;
}
#wpbookmarklet #postdiv {
- margin-bottom: 0.5em;
+ margin-bottom: 0.5em;
}
#wpbookmarklet #titlediv {
- margin-bottom: 1em;
+ margin-bottom: 1em;
}
-->
View
8 wp-admin/categories.php
@@ -48,10 +48,10 @@
case 'edit':
- require_once ('admin-header.php');
- $cat_ID = (int) $_GET['cat_ID'];
- $category = get_category_to_edit($cat_ID);
- include('edit-category-form.php');
+ require_once ('admin-header.php');
+ $cat_ID = (int) $_GET['cat_ID'];
+ $category = get_category_to_edit($cat_ID);
+ include('edit-category-form.php');
break;
View
4 wp-admin/custom-fields.js
@@ -14,10 +14,10 @@ function customFieldsAddIn() {
for ( var i=0; i < inputs.length; i++ ) {
if ('text' == inputs[i].type) {
inputs[i].setAttribute('autocomplete', 'off');
- inputs[i].onkeypress = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.name.slice(5),10) + '");', e); };
+ inputs[i].onkeypress = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.name.slice(5),10) + '");', e); };
}
if ('updatemeta' == inputs[i].className) {
- inputs[i].onclick = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.parentNode.parentNode.id.slice(5),10) + '");', e); };
+ inputs[i].onclick = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.parentNode.parentNode.id.slice(5),10) + '");', e); };
}
}
View
2  wp-admin/dbx-admin-key-js.php
@@ -9,7 +9,7 @@
break;
case 'page.php' :
case 'page-new.php' :
- $man = 'pagemeta';
+ $man = 'pagemeta';
break;
case 'link.php' :
$man = 'linkmeta';
View
4 wp-admin/edit-category-form.php
@@ -22,8 +22,8 @@
<?php wp_nonce_field($nonce_action); ?>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
- <th width="33%" scope="row" valign="top"><label for="cat_name"><?php _e('Category name:') ?></label></th>
- <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo wp_specialchars($category->cat_name); ?>" size="40" /></td>
+ <th width="33%" scope="row" valign="top"><label for="cat_name"><?php _e('Category name:') ?></label></th>
+ <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo wp_specialchars($category->cat_name); ?>" size="40" /></td>
</tr>
<tr>
<th scope="row" valign="top"><label for="category_nicename"><?php _e('Category slug:') ?></label></th>
View
6 wp-admin/edit-comments.php
@@ -143,7 +143,7 @@ function getNumChecked(form)
++$i; $class = '';
$authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
$comment_status = wp_get_comment_status($comment->comment_ID);
- if ('unapproved' == $comment_status)
+ if ('unapproved' == $comment_status)
$class .= ' unapproved';
if ($i % 2)
$class .= ' alternate';
@@ -153,7 +153,7 @@ function getNumChecked(form)
<?php comment_text() ?>
-<p><?php comment_date('M j, g:i A'); ?> &#8212; [
+<p><?php comment_date('M j, g:i A'); ?> &#8212; [
<?php
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."'>" . __('Edit') . '</a>';
@@ -181,7 +181,7 @@ function getNumChecked(form)
?>
<p>
- <strong><?php _e('No comments found.') ?></strong></p>
+ <strong><?php _e('No comments found.') ?></strong></p>
<?php
} // end if ($comments)
View
13 wp-admin/edit-form-advanced.php
@@ -8,8 +8,7 @@
<?php endif; ?>
<form name="post" action="post.php" method="post" id="post">
-<?php if ( (isset($mode) && 'bookmarklet' == $mode) ||
- isset($_GET['popupurl']) ): ?>
+<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
<input type="hidden" name="mode" value="bookmarklet" />
<?php endif; ?>
@@ -121,7 +120,7 @@ function focusit() {
<h3 class="dbx-handle"><?php _e('Post Author'); ?>:</h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
-<?php
+<?php
foreach ($authors as $o) :
$o = get_userdata( $o->ID );
if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
@@ -140,8 +139,8 @@ function focusit() {
</div>
<fieldset id="titlediv">
- <legend><?php _e('Title') ?></legend>
- <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div>
+ <legend><?php _e('Title') ?></legend>
+ <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div>
</fieldset>
<fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>">
@@ -208,7 +207,7 @@ function focusit() {
</div>
<div class="dbx-content-wrapper">
<div class="dbx-content"><?php _e('Send trackbacks to'); ?>: <?php echo $form_trackback; ?> (<?php _e('Separate multiple URIs with spaces'); ?>)
-<?php
+<?php
if ( ! empty($pings) )
echo $pings;
?>
@@ -227,7 +226,7 @@ function focusit() {
<table cellpadding="3">
<?php
$metadata = has_meta($post_ID);
-list_meta($metadata);
+list_meta($metadata);
?>
</table>
View
4 wp-admin/edit-form-comment.php
@@ -54,8 +54,8 @@ function focusit() { // focus on first input field
<tr>
<th scope="row" valign="top"><?php _e('Comment Status') ?>:</th>
<td><label for="comment_status_approved" class="selectit"><input id="comment_status_approved" name="comment_status" type="radio" value="1" <?php checked($comment->comment_approved, '1'); ?> /> <?php _e('Approved') ?></label><br />
- <label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment->comment_approved, '0'); ?> /> <?php _e('Moderated') ?></label><br />
- <label for="comment_status_spam" class="selectit"><input id="comment_status_spam" name="comment_status" type="radio" value="spam" <?php checked($comment->comment_approved, 'spam'); ?> /> <?php _e('Spam') ?></label></td>
+ <label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment->comment_approved, '0'); ?> /> <?php _e('Moderated') ?></label><br />
+ <label for="comment_status_spam" class="selectit"><input id="comment_status_spam" name="comment_status" type="radio" value="spam" <?php checked($comment->comment_approved, 'spam'); ?> /> <?php _e('Spam') ?></label></td>
</tr>
<?php if ( current_user_can('edit_posts') ) : ?>
View
12 wp-admin/edit-form.php
@@ -54,17 +54,17 @@ function focusit() { // focus on first input field
<p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Locator">URL</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Locator">URL</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') ?>
<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>
-<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
- <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
+<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
+ <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
<?php if ( current_user_can('edit_posts') ) : ?>
- <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" />
+ <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" />
<?php endif; ?>
<?php if ('bookmarklet' != $mode) {
- echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' . __('Advanced Editing &raquo;') . '" />';
- } ?>
- <input name="referredby" type="hidden" id="referredby" value="<?php if ( wp_get_referer() ) echo urlencode(wp_get_referer()); ?>" />
+ echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' . __('Advanced Editing &raquo;') . '" />';
+ } ?>
+ <input name="referredby" type="hidden" id="referredby" value="<?php if ( wp_get_referer() ) echo urlencode(wp_get_referer()); ?>" />
</p>
<?php do_action('simple_edit_form', ''); ?>
View
6 wp-admin/edit-link-form.php
@@ -30,7 +30,7 @@ function xfn_check($class, $value = '', $type = 'check') {
}
?>
-<div class="wrap">
+<div class="wrap">
<h2><?php echo $heading ?></h2>
<?php echo $form ?>
<?php wp_nonce_field($nonce_action); ?>
@@ -48,7 +48,7 @@ function xfn_check($class, $value = '', $type = 'check') {
</fieldset>
<fieldset class="dbx-box">
-<h3 class="dbx-handle"><?php _e('Target') ?></h3>
+<h3 class="dbx-handle"><?php _e('Target') ?></h3>
<div class="dbx-content">
<label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo(($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />
@@ -63,7 +63,7 @@ function xfn_check($class, $value = '', $type = 'check') {
</fieldset>
<fieldset class="dbx-box">
-<h3 class="dbx-handle"><?php _e('Visible') ?></h3>
+<h3 class="dbx-handle"><?php _e('Visible') ?></h3>
<div class="dbx-content">
<label for="link_visible_yes" class="selectit">
<input id="link_visible_yes" type="radio" name="link_visible" <?php if ($link->link_visible == 'Y') echo "checked='checked'"; ?> value="Y" />
View
14 wp-admin/edit-page-form.php
@@ -16,7 +16,7 @@
$sendto = wp_get_referer();
if ( 0 != $post_ID && $sendto == get_permalink($post_ID) )
- $sendto = 'redo';
+ $sendto = 'redo';
$sendto = wp_specialchars( $sendto );
?>
@@ -27,7 +27,7 @@
wp_nonce_field($nonce_action);
if (isset($mode) && 'bookmarklet' == $mode) {
- echo '<input type="hidden" name="mode" value="bookmarklet" />';
+ echo '<input type="hidden" name="mode" value="bookmarklet" />';
}
?>
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
@@ -103,7 +103,7 @@ function focusit() { // focus on first input field
<h3 class="dbx-handle"><?php _e('Page Author'); ?>:</h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
-<?php
+<?php
foreach ($authors as $o) :
$o = get_userdata( $o->ID );
if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
@@ -117,7 +117,7 @@ function focusit() { // focus on first input field
<?php endif; ?>
<fieldset id="pageorder" class="dbx-box">
-<h3 class="dbx-handle"><?php _e('Page Order') ?></h3>
+<h3 class="dbx-handle"><?php _e('Page Order') ?></h3>
<div class="dbx-content"><p><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $post->menu_order ?>" /></p></div>
</fieldset>
@@ -168,9 +168,9 @@ function focusit() { // focus on first input field
<h3 class="dbx-handle"><?php _e('Custom Fields') ?></h3>
<div id="postcustomstuff" class="dbx-content">
<table cellpadding="3">
-<?php
+<?php
$metadata = has_meta($post_ID);
-list_meta($metadata);
+list_meta($metadata);
?>
</table>
@@ -186,7 +186,7 @@ function focusit() { // focus on first input field
</div>
<?php if ('edit' == $action) :
- $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID );
+ $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID );
if ( current_user_can('delete_page', $post->ID) ) ?>
<input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />
<?php endif; ?>
View
16 wp-admin/edit-pages.php
@@ -10,12 +10,12 @@
<h2><?php _e('Page Management'); ?></h2>
<p><?php _e('Pages are like posts except they live outside of the normal blog chronology and can be hierarchical. You can use pages to organize and manage any amount of content.'); ?> <a href="page-new.php"><?php _e('Create a new page &raquo;'); ?></a></p>
-<form name="searchform" action="" method="get">
- <fieldset>
- <legend><?php _e('Search Pages&hellip;') ?></legend>
- <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
- <input type="submit" name="submit" value="<?php _e('Search') ?>" />
- </fieldset>
+<form name="searchform" action="" method="get">
+ <fieldset>
+ <legend><?php _e('Search Pages&hellip;') ?></legend>
+ <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
+ <input type="submit" name="submit" value="<?php _e('Search') ?>" />
+ </fieldset>
</form>
<?php
@@ -53,10 +53,10 @@
<p><?php _e('No pages yet.') ?></p>
<?php
} // end if ($posts)
-?>
+?>
<h3><a href="page-new.php"><?php _e('Create New Page &raquo;'); ?></a></h3>
</div>
-<?php include('admin-footer.php'); ?>
+<?php include('admin-footer.php'); ?>
View
60 wp-admin/edit.php
@@ -12,11 +12,11 @@
$other_drafts = get_others_drafts( $user_ID);
if ($drafts || $other_drafts) {
-?>
+?>
<div class="wrap">
<?php if ($drafts) { ?>
- <p><strong><?php _e('Your Drafts:') ?></strong>
- <?php
+ <p><strong><?php _e('Your Drafts:') ?></strong>
+ <?php
$i = 0;
foreach ($drafts as $draft) {
if (0 != $i)
@@ -27,13 +27,13 @@
echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
++$i;
}
- ?>
- .</p>
+ ?>
+ .</p>
<?php } ?>
-<?php if ($other_drafts) { ?>
- <p><strong><?php _e('Other&#8217;s Drafts:') ?></strong>
- <?php
+<?php if ($other_drafts) { ?>
+ <p><strong><?php _e('Other&#8217;s Drafts:') ?></strong>
+ <?php
$i = 0;
foreach ($other_drafts as $draft) {
if (0 != $i)
@@ -44,8 +44,8 @@
echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
++$i;
}
- ?>
- .</p>
+ ?>
+ .</p>
<?php } ?>
@@ -88,7 +88,7 @@
<form name="viewarc" id="viewarc" action="" method="get">
<fieldset>
<legend><?php _e('Browse Month&hellip;') ?></legend>
- <select name='m'>
+ <select name='m'>
<?php
foreach ($arc_result as $arc_row) {
if ( $arc_row->yyear == 0 )
@@ -127,12 +127,12 @@
<?php
// define the columns to display, the syntax is 'internal name' => 'display name'
$posts_columns = array(
- 'id' => __('ID'),
- 'date' => __('When'),
- 'title' => __('Title'),
- 'categories' => __('Categories'),
- 'comments' => __('Comments'),
- 'author' => __('Author')
+ 'id' => __('ID'),
+ 'date' => __('When'),
+ 'title' => __('Title'),
+ 'categories' => __('Categories'),
+ 'comments' => __('Comments'),
+ 'author' => __('Author')
);
$posts_columns = apply_filters('manage_posts_columns', $posts_columns);
@@ -143,7 +143,7 @@
?>
-<table class="widefat">
+<table class="widefat">
<thead>
<tr>
@@ -160,7 +160,7 @@
while (have_posts()) : the_post();
add_filter('the_title','wp_specialchars');
$class = ('alternate' == $class) ? '' : 'alternate';
-?>
+?>
<tr id='post-<?php echo $id; ?>' class='<?php echo $class; ?>'>
<?php
@@ -195,9 +195,9 @@
case 'comments':
?>
- <td style="text-align: center"><a href="edit.php?p=<?php echo $id ?>&amp;c=1">
- <?php comments_number(__('0'), __('1'), __('%')) ?>
- </a></td>
+ <td style="text-align: center"><a href="edit.php?p=<?php echo $id ?>&amp;c=1">
+ <?php comments_number(__('0'), __('1'), __('%')) ?>
+ </a></td>
<?php
break;
@@ -259,9 +259,9 @@
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
if ($comments) {
- ?>
-<h3 id="comments"><?php _e('Comments') ?></h3>
-<ol id="the-comment-list" class="commentlist">
+ ?>
+<h3 id="comments"><?php _e('Comments') ?></h3>
+<ol id="the-comment-list" class="commentlist">
<?php
$i = 0;
foreach ($comments as $comment) {
@@ -269,7 +269,7 @@
++$i; $class = '';
$authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
$comment_status = wp_get_comment_status($comment->comment_ID);
- if ('unapproved' == $comment_status)
+ if ('unapproved' == $comment_status)
$class .= ' unapproved';
if ($i % 2)
$class .= ' alternate';
@@ -299,8 +299,8 @@
echo '</ol>';
}//end if comments
?>
-<?php } ?>
-</div>
-<?php
+<?php } ?>
+</div>
+<?php
include('admin-footer.php');
-?>
+?>
View
6 wp-admin/export.php
@@ -72,7 +72,7 @@ function export_wp() {
<!-- You will be taken through the simple import procedure. -->
<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" created="<?php echo date('Y-m-d H:m'); ?>"-->
-<rss version="2.0"
+<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
@@ -108,7 +108,7 @@ function export_wp() {
<wp:post_parent><?php echo $post->post_parent; ?></wp:post_parent>
<wp:post_type><?php echo $post->post_type; ?></wp:post_type>
<?php
-$postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID");
+$postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID");
if ( $postmeta ) {
?>
<?php foreach( $postmeta as $meta ) { ?>
@@ -119,7 +119,7 @@ function export_wp() {
<?php } ?>
<?php } ?>
<?php
-$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID");
+$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID");
if ( $comments ) { foreach ( $comments as $c ) { ?>
<wp:comment>
<wp:comment_id><?php echo $c->comment_ID; ?></wp:comment_id>
View
2  wp-admin/import/blogger.php
@@ -517,7 +517,7 @@ function get_archive() {
$did_one = true;
}
$output.= "<p>$archivename $status</p>\n";
- }
+ }
if ( ! $did_one )
$this->set_next_step(7);
die( $this->refresher(1000) . $output );
View
16 wp-admin/import/blogware.php
@@ -20,7 +20,7 @@ function unhtmlentities($string) { // From php.net for < 4.3 compat
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
}
-
+
function greet() {
echo '<div class="narrow">';
echo '<p>'.__('Howdy! This importer allows you to extract posts from Blogware XML export file into your blog. Pick a Blogware file to upload and click Import.').'</p>';
@@ -30,7 +30,7 @@ function greet() {
function import_posts() {
global $wpdb, $current_user;
-
+
set_magic_quotes_runtime(0);
$importdata = file($this->file); // Read the file into an array
$importdata = implode('', $importdata); // squish it
@@ -39,7 +39,7 @@ function import_posts() {
preg_match_all('|(<item[^>]+>(.*?)</item>)|is', $importdata, $posts);
$posts = $posts[1];
unset($importdata);
- echo '<ol>';
+ echo '<ol>';
foreach ($posts as $post) {
flush();
preg_match('|<item type=\"(.*?)\">|is', $post, $post_type);
@@ -102,7 +102,7 @@ function import_posts() {
preg_match_all('|<comment>(.*?)</comment>|is', $post, $comments);
$comments = $comments[1];
-
+
if ( $comments ) {
$comment_post_ID = $post_id;
$num_comments = 0;
@@ -157,7 +157,7 @@ function import() {
$this->file = $file['file'];
$this->import_posts();
wp_import_cleanup($file['id']);
-
+
echo '<h3>';
printf(__('All done. <a href="%s">Have fun!</a>'), get_option('home'));
echo '</h3>';
@@ -170,7 +170,7 @@ function dispatch() {
$step = (int) $_GET['step'];
$this->header();
-
+
switch ($step) {
case 0 :
$this->greet();
@@ -179,12 +179,12 @@ function dispatch() {
$this->import();
break;
}
-
+
$this->footer();
}
function BW_Import() {
- // Nothing.
+ // Nothing.
}
}
View
137 wp-admin/import/dotclear.php
@@ -9,7 +9,7 @@
**/
if(!function_exists('get_catbynicename'))
{
- function get_catbynicename($category_nicename)
+ function get_catbynicename($category_nicename)
{
global $wpdb;
@@ -60,57 +60,58 @@ function link_exists($linkname)
//
// This cries out for a C-implementation to be included in PHP core
//
- function valid_1byte($char) {
- if(!is_int($char)) return false;
- return ($char & 0x80) == 0x00;
- }
-
- function valid_2byte($char) {
- if(!is_int($char)) return false;
- return ($char & 0xE0) == 0xC0;
- }
-
- function valid_3byte($char) {
- if(!is_int($char)) return false;
- return ($char & 0xF0) == 0xE0;
- }
-
- function valid_4byte($char) {
- if(!is_int($char)) return false;
- return ($char & 0xF8) == 0xF0;
- }
-
- function valid_nextbyte($char) {
- if(!is_int($char)) return false;
- return ($char & 0xC0) == 0x80;
- }
-
- function valid_utf8($string) {
- $len = strlen($string);
- $i = 0;
- while( $i < $len ) {
- $char = ord(substr($string, $i++, 1));
- if(valid_1byte($char)) { // continue
- continue;
- } else if(valid_2byte($char)) { // check 1 byte
- if(!valid_nextbyte(ord(substr($string, $i++, 1))))
- return false;
- } else if(valid_3byte($char)) { // check 2 bytes
- if(!valid_nextbyte(ord(substr($string, $i++, 1))))
- return false;
- if(!valid_nextbyte(ord(substr($string, $i++, 1))))
- return false;
- } else if(valid_4byte($char)) { // check 3 bytes
- if(!valid_nextbyte(ord(substr($string, $i++, 1))))
- return false;
- if(!valid_nextbyte(ord(substr($string, $i++, 1))))
- return false;
- if(!valid_nextbyte(ord(substr($string, $i++, 1))))
- return false;
- } // goto next char
- }
- return true; // done
- }
+
+function valid_1byte($char) {
+ if(!is_int($char)) return false;
+ return ($char & 0x80) == 0x00;
+}
+
+function valid_2byte($char) {
+ if(!is_int($char)) return false;
+ return ($char & 0xE0) == 0xC0;
+}
+
+function valid_3byte($char) {
+ if(!is_int($char)) return false;
+ return ($char & 0xF0) == 0xE0;
+}
+
+function valid_4byte($char) {
+ if(!is_int($char)) return false;
+ return ($char & 0xF8) == 0xF0;
+}
+
+function valid_nextbyte($char) {
+ if(!is_int($char)) return false;
+ return ($char & 0xC0) == 0x80;
+}
+
+function valid_utf8($string) {
+ $len = strlen($string);
+ $i = 0;
+ while( $i < $len ) {
+ $char = ord(substr($string, $i++, 1));
+ if(valid_1byte($char)) { // continue
+ continue;
+ } else if(valid_2byte($char)) { // check 1 byte
+ if(!valid_nextbyte(ord(substr($string, $i++, 1))))
+ return false;
+ } else if(valid_3byte($char)) { // check 2 bytes
+ if(!valid_nextbyte(ord(substr($string, $i++, 1))))
+ return false;
+ if(!valid_nextbyte(ord(substr($string, $i++, 1))))
+ return false;
+ } else if(valid_4byte($char)) { // check 3 bytes
+ if(!valid_nextbyte(ord(substr($string, $i++, 1))))
+ return false;
+ if(!valid_nextbyte(ord(substr($string, $i++, 1))))
+ return false;
+ if(!valid_nextbyte(ord(substr($string, $i++, 1))))
+ return false;
+ } // goto next char
+ }
+ return true; // done
+}
function csc ($s) {
if (valid_utf8 ($s)) {
@@ -151,7 +152,7 @@ function greet()
echo '</form></div>';
}
- function get_dc_cats()
+ function get_dc_cats()
{
global $wpdb;
// General Housekeeping
@@ -186,7 +187,7 @@ function get_dc_posts()
// Get Posts
return $dcdb->get_results('SELECT '.$dbprefix.'post.*, '.$dbprefix.'categorie.cat_libelle_url AS post_cat_name
FROM '.$dbprefix.'post INNER JOIN '.$dbprefix.'categorie
- ON '.$dbprefix.'post.cat_id = '.$dbprefix.'categorie.cat_id', ARRAY_A);
+ ON '.$dbprefix.'post.cat_id = '.$dbprefix.'categorie.cat_id', ARRAY_A);
}
function get_dc_comments()
@@ -211,7 +212,7 @@ function get_dc_links()
return $dcdb->get_results('SELECT * FROM '.$dbprefix.'link ORDER BY position', ARRAY_A);
}
- function cat2wp($categories='')
+ function cat2wp($categories='')
{
// General Housekeeping
global $wpdb;
@@ -221,7 +222,7 @@ function cat2wp($categories='')
if(is_array($categories))
{
echo '<p>'.__('Importing Categories...').'<br /><br /></p>';
- foreach ($categories as $category)
+ foreach ($categories as $category)
{
$count++;
extract($category);
@@ -283,7 +284,7 @@ function users2wp($users='')
'display_name' => $Realname)
);
}
- else
+ else
{
$ret_id = wp_insert_user(array(
'user_login' => $user_id,
@@ -384,7 +385,7 @@ function posts2wp($posts='')
'comment_count' => $post_nb_comment + $post_nb_trackback)
);
}
- else
+ else
{
$ret_id = wp_insert_post(array(
'post_author' => $authorid,
@@ -460,7 +461,7 @@ function comments2wp($comments='')
'comment_approved' => $comment_approved)
);
}
- else
+ else
{
// Insert comments
$ret_id = wp_insert_comment(array(
@@ -547,7 +548,7 @@ function links2wp($links='')
return false;
}
- function import_categories()
+ function import_categories()
{
// Category Import
$cats = $this->get_dc_cats();
@@ -565,7 +566,7 @@ function import_categories()
function import_users()
{
// User Import
- $users = $this->get_dc_users();
+ $users = $this->get_dc_users();
$this->users2wp($users);
echo '<form action="admin.php?import=dotclear&amp;step=3" method="post">';
@@ -655,7 +656,7 @@ function db_form()
echo '</table>';
}
- function dispatch()
+ function dispatch()
{
if (empty ($_GET['step']))
@@ -664,7 +665,7 @@ function dispatch()
$step = (int) $_GET['step'];
$this->header();
- if ( $step > 0 )
+ if ( $step > 0 )
{
if($_POST['dbuser'])
{
@@ -689,25 +690,25 @@ function dispatch()
{
if(get_option('dchost'))
delete_option('dchost');
- add_option('dchost',$_POST['dbhost']);
+ add_option('dchost',$_POST['dbhost']);
}
if($_POST['dccharset'])
{
if(get_option('dccharset'))
delete_option('dccharset');
- add_option('dccharset',$_POST['dccharset']);
+ add_option('dccharset',$_POST['dccharset']);
}
if($_POST['dbprefix'])
{
if(get_option('dcdbprefix'))
delete_option('dcdbprefix');
- add_option('dcdbprefix',$_POST['dbprefix']);
+ add_option('dcdbprefix',$_POST['dbprefix']);
}
}
- switch ($step)
+ switch ($step)
{
default:
case 0 :
@@ -736,7 +737,7 @@ function dispatch()
$this->footer();
}
- function Dotclear_Import()
+ function Dotclear_Import()
{
// Nothing.
}
View
14 wp-admin/import/greymatter.php
@@ -66,10 +66,10 @@ function gm2autobr($string) { // transforms GM's |*| into b2's <br />\n
$string = str_replace("|*|","<br />\n",$string);
return($string);
}
-
+
function import() {
global $wpdb;
-
+
$wpvarstoreset = array('gmpath', 'archivespath', 'lastentry');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
@@ -136,11 +136,11 @@ function import() {
<li><?php _e('importing posts, comments, and karma...') ?><br /><ul><?php
chdir($archivespath);
-
+
for($i = 0; $i <= $lastentry; $i = $i + 1) {
-
+
$entryfile = "";
-
+
if ($i<10000000) {
$entryfile .= "0";
if ($i<1000000) {
@@ -194,7 +194,7 @@ function import() {
$post_status = 'publish'; //in greymatter, there are no drafts
$comment_status = 'open';
$ping_status = 'closed';
-
+
if ($post_ID = post_exists($post_title, '', $post_date)) {
echo ' ';
_e('(already exists)');
@@ -303,7 +303,7 @@ function dispatch() {
}
function GM_Import() {
- // Nothing.
+ // Nothing.
}
}
View
6 wp-admin/import/mt.php
@@ -55,9 +55,9 @@ function checkauthor($author) {
$pass = 'changeme';
if (!(in_array($author, $this->mtnames))) { //a new mt author name is found
++ $this->j;
- $this->mtnames[$this->j] = $author; //add that new mt author name to an array
+ $this->mtnames[$this->j] = $author; //add that new mt author name to an array
$user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user
- if (!$user_id) { //banging my head against the desk now.
+ if (!$user_id) { //banging my head against the desk now.
if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname
$user_id = wp_create_user($author, $pass);
$this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank.
@@ -399,7 +399,7 @@ function process_posts() {
function import() {
$this->id = (int) $_GET['id'];
-
+
$this->file = get_attached_file($this->id);
$this->get_authors_from_post();
$this->get_entries();
View
192 wp-admin/import/textpattern.php
@@ -4,7 +4,7 @@
**/
if(!function_exists('get_catbynicename'))
{
- function get_catbynicename($category_nicename)
+ function get_catbynicename($category_nicename)
{
global $wpdb;
@@ -70,13 +70,13 @@ function get_txp_cats()
$prefix = get_option('tpre');
// Get Categories
- return $txpdb->get_results('SELECT
- id,
- name,
- title
- FROM '.$prefix.'txp_category
- WHERE type = "article"',
- ARRAY_A);
+ return $txpdb->get_results('SELECT
+ id,
+ name,
+ title
+ FROM '.$prefix.'txp_category
+ WHERE type = "article"',
+ ARRAY_A);
}
function get_txp_users()
@@ -90,12 +90,12 @@ function get_txp_users()
// Get Users
return $txpdb->get_results('SELECT
- user_id,
- name,
- RealName,
- email,
- privs
- FROM '.$prefix.'txp_users', ARRAY_A);
+ user_id,
+ name,
+ RealName,
+ email,
+ privs
+ FROM '.$prefix.'txp_users', ARRAY_A);
}
function get_txp_posts()
@@ -106,22 +106,22 @@ function get_txp_posts()
$prefix = get_option('tpre');
// Get Posts
- return $txpdb->get_results('SELECT
- ID,
- Posted,
- AuthorID,
- LastMod,
- Title,
- Body,
- Excerpt,
- Category1,
- Category2,
- Status,
- Keywords,
- url_title,
- comments_count
- FROM '.$prefix.'textpattern
- ', ARRAY_A);
+ return $txpdb->get_results('SELECT
+ ID,
+ Posted,
+ AuthorID,
+ LastMod,
+ Title,
+ Body,
+ Excerpt,
+ Category1,
+ Category2,
+ Status,
+ Keywords,
+ url_title,
+ comments_count
+ FROM '.$prefix.'textpattern
+ ', ARRAY_A);
}
function get_txp_comments()
@@ -143,18 +143,18 @@ function get_txp_links()
set_magic_quotes_runtime(0);
$prefix = get_option('tpre');
- return $txpdb->get_results('SELECT
- id,
- date,
- category,
- url,
- linkname,
- description
- FROM '.$prefix.'txp_link',
- ARRAY_A);
+ return $txpdb->get_results('SELECT
+ id,
+ date,
+ category,
+ url,
+ linkname,
+ description
+ FROM '.$prefix.'txp_link',
+ ARRAY_A);
}
- function cat2wp($categories='')
+ function cat2wp($categories='')
{
// General Housekeeping
global $wpdb;
@@ -164,7 +164,7 @@ function cat2wp($categories='')
if(is_array($categories))
{
echo '<p>'.__('Importing Categories...').'<br /><br /></p>';
- foreach ($categories as $category)
+ foreach ($categories as $category)
{
$count++;
extract($category);
@@ -226,7 +226,7 @@ function users2wp($users='')
'display_name' => $name)
);
}
- else
+ else
{
$ret_id = wp_insert_user(array(
'user_login' => $name,
@@ -302,35 +302,35 @@ function posts2wp($posts='')
if($pinfo = post_exists($Title,$Body))
{
$ret_id = wp_insert_post(array(
- 'ID' => $pinfo,
- 'post_date' => $Posted,
- 'post_date_gmt' => $post_date_gmt,
- 'post_author' => $authorid,
- 'post_modified' => $LastMod,
- 'post_modified_gmt' => $post_modified_gmt,
- 'post_title' => $Title,
- 'post_content' => $Body,
- 'post_excerpt' => $Excerpt,
- 'post_status' => $post_status,
- 'post_name' => $url_title,
- 'comment_count' => $comments_count)
- );
+ 'ID' => $pinfo,
+ 'post_date' => $Posted,
+ 'post_date_gmt' => $post_date_gmt,
+ 'post_author' => $authorid,
+ 'post_modified' => $LastMod,
+ 'post_modified_gmt' => $post_modified_gmt,
+ 'post_title' => $Title,
+ 'post_content' => $Body,
+ 'post_excerpt' => $Excerpt,
+ 'post_status' => $post_status,
+ 'post_name' => $url_title,
+ 'comment_count' => $comments_count)
+ );
}
- else
+ else
{
$ret_id = wp_insert_post(array(
- 'post_date' => $Posted,
- 'post_date_gmt' => $post_date_gmt,
- 'post_author' => $authorid,
- 'post_modified' => $LastMod,
- 'post_modified_gmt' => $post_modified_gmt,
- 'post_title' => $Title,
- 'post_content' => $Body,
- 'post_excerpt' => $Excerpt,
- 'post_status' => $post_status,
- 'post_name' => $url_title,
- 'comment_count' => $comments_count)
- );
+ 'post_date' => $Posted,
+ 'post_date_gmt' => $post_date_gmt,
+ 'post_author' => $authorid,
+ 'post_modified' => $LastMod,
+ 'post_modified_gmt' => $post_modified_gmt,
+ 'post_title' => $Title,
+ 'post_content' => $Body,
+ 'post_excerpt' => $Excerpt,
+ 'post_status' => $post_status,
+ 'post_name' => $url_title,
+ 'comment_count' => $comments_count)
+ );
}
$txpposts2wpposts[$ID] = $ret_id;
@@ -379,29 +379,29 @@ function comments2wp($comments='')
{
// Update comments
$ret_id = wp_update_comment(array(
- 'comment_ID' => $cinfo,
- 'comment_post_ID' => $comment_post_ID,
- 'comment_author' => $name,
- 'comment_author_email' => $email,
- 'comment_author_url' => $web,
- 'comment_date' => $posted,
- 'comment_content' => $message,
- 'comment_approved' => $comment_approved)
- );
+ 'comment_ID' => $cinfo,
+ 'comment_post_ID' => $comment_post_ID,
+ 'comment_author' => $name,
+ 'comment_author_email' => $email,
+ 'comment_author_url' => $web,
+ 'comment_date' => $posted,
+ 'comment_content' => $message,
+ 'comment_approved' => $comment_approved)
+ );
}
- else
+ else
{
// Insert comments
$ret_id = wp_insert_comment(array(
- 'comment_post_ID' => $comment_post_ID,
- 'comment_author' => $name,
- 'comment_author_email' => $email,
- 'comment_author_url' => $web,
- 'comment_author_IP' => $ip,
- 'comment_date' => $posted,
- 'comment_content' => $message,
- 'comment_approved' => $comment_approved)
- );
+ 'comment_post_ID' => $comment_post_ID,
+ 'comment_author' => $name,
+ 'comment_author_email' => $email,
+ 'comment_author_url' => $web,
+ 'comment_author_IP' => $ip,
+ 'comment_date' => $posted,
+ 'comment_content' => $message,
+ 'comment_approved' => $comment_approved)
+ );
}
$txpcm2wpcm[$comment_ID] = $ret_id;
}
@@ -450,7 +450,7 @@ function links2wp($links='')
'link_updated' => $date)
);
}
- else
+ else
{
$ret_id = wp_insert_link(array(
'link_url' => $url,
@@ -472,7 +472,7 @@ function links2wp($links='')
return false;
}
- function import_categories()
+ function import_categories()
{
// Category Import
$cats = $this->get_txp_cats();
@@ -490,7 +490,7 @@ function import_categories()
function import_users()
{
// User Import
- $users = $this->get_txp_users();
+ $users = $this->get_txp_users();
$this->users2wp($users);
echo '<form action="admin.php?import=textpattern&amp;step=3" method="post">';
@@ -578,7 +578,7 @@ function db_form()
echo '</table>';
}
- function dispatch()
+ function dispatch()
{
if (empty ($_GET['step']))
@@ -587,7 +587,7 @@ function dispatch()
$step = (int) $_GET['step'];
$this->header();
- if ( $step > 0 )
+ if ( $step > 0 )
{
if($_POST['dbuser'])
{
@@ -612,19 +612,19 @@ function dispatch()
{
if(get_option('txphost'))
delete_option('txphost');
- add_option('txphost',$_POST['dbhost']);
+ add_option('txphost',$_POST['dbhost']);
}
if($_POST['dbprefix'])
{
if(get_option('tpre'))
delete_option('tpre');
- add_option('tpre',$_POST['dbprefix']);
+ add_option('tpre',$_POST['dbprefix']);
}
}
- switch ($step)
+ switch ($step)
{
default:
case 0 :
@@ -653,7 +653,7 @@ function dispatch()
$this->footer();
}
- function Textpattern_Import()
+ function Textpattern_Import()
{
// Nothing.
}
View
6 wp-admin/import/wordpress.php
@@ -58,9 +58,9 @@ function checkauthor($author) {
$pass = 'changeme';
if (!(in_array($author, $this->mtnames))) { //a new mt author name is found
++ $this->j;
- $this->mtnames[$this->j] = $author; //add that new mt author name to an array
+ $this->mtnames[$this->j] = $author; //add that new mt author name to an array
$user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user
- if (!$user_id) { //banging my head against the desk now.
+ if (!$user_id) { //banging my head against the desk now.
if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname
$user_id = wp_create_user($author, $pass);
$this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank.
@@ -273,7 +273,7 @@ function process_posts() {
function import() {
$this->id = (int) $_GET['id'];
-
+
$this->file = get_attached_file($this->id);
$this->get_authors_from_post();
$this->get_entries();
View
10 wp-admin/index.php
@@ -46,11 +46,11 @@ function dashboard_init() {
<?php endif; ?>
<ul>
-<?php
+<?php
if ( $comments ) {
foreach ($comments as $comment) {
echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>');
- edit_comment_link(__("Edit"), ' <small>(', ')</small>');
+ edit_comment_link(__("Edit"), ' <small>(', ')</small>');
echo '</li>';
}
}
@@ -80,7 +80,7 @@ function dashboard_init() {
<?php
if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'future' ORDER BY post_date ASC") ) :
-?>
+?>
<div>
<h3><?php _e('Scheduled Entries:') ?></h3>
<ul>
@@ -90,7 +90,7 @@ function dashboard_init() {
$post->post_title = sprintf(__('Post #%s'), $post->ID);
echo "<li>" . sprintf(__('%1$s in %2$s'), "<a href='post.php?action=edit&amp;post=$post->ID' title='" . __('Edit this post') . "'>$post->post_title</a>", human_time_diff( current_time('timestamp', 1), strtotime($post->post_date_gmt. ' GMT') )) . "</li>";
}
-?>
+?>
</ul>
</div>
<?php endif; ?>
@@ -99,7 +99,7 @@ function dashboard_init() {
<h3><?php _e('Blog Stats'); ?></h3>
<?php
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'");
-if (0 < $numposts) $numposts = number_format($numposts);
+if (0 < $numposts) $numposts = number_format($numposts);
$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
if (0 < $numcomms) $numcomms = number_format($numcomms);
View
170 wp-admin/install-helper.php
@@ -9,21 +9,21 @@
** false on error
*/
function maybe_create_table($table_name, $create_ddl) {
- global $wpdb;
- foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
- if ($table == $table_name) {
- return true;
- }
- }
- //didn't find it try to create it.
- $q = $wpdb->query($create_ddl);
- // we cannot directly tell that whether this succeeded!
- foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
- if ($table == $table_name) {
- return true;
- }
- }
- return false;
+ global $wpdb;
+ foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
+ if ($table == $table_name) {
+ return true;
+ }
+ }
+ //didn't find it try to create it.
+ $q = $wpdb->query($create_ddl);
+ // we cannot directly tell that whether this succeeded!
+ foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
+ if ($table == $table_name) {
+ return true;
+ }
+ }
+ return false;
}
/**
@@ -33,22 +33,22 @@ function maybe_create_table($table_name, $create_ddl) {
** false on error
*/
function maybe_add_column($table_name, $column_name, $create_ddl) {
- global $wpdb, $debug;
- foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
- if ($debug) echo("checking $column == $column_name<br />");
- if ($column == $column_name) {
- return true;
- }
- }
- //didn't find it try to create it.
- $q = $wpdb->query($create_ddl);
- // we cannot directly tell that whether this succeeded!
- foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
- if ($column == $column_name) {
- return true;
- }
- }
- return false;
+ global $wpdb, $debug;
+ foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
+ if ($debug) echo("checking $column == $column_name<br />");
+ if ($column == $column_name) {
+ return true;
+ }
+ }
+ //didn't find it try to create it.
+ $q = $wpdb->query($create_ddl);
+ // we cannot directly tell that whether this succeeded!
+ foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
+ if ($column == $column_name) {
+ return true;
+ }
+ }
+ return false;
}
@@ -59,21 +59,21 @@ function maybe_add_column($table_name, $column_name, $create_ddl) {
** false on error
*/
function maybe_drop_column($table_name, $column_name, $drop_ddl) {
- global $wpdb;
- foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
- if ($column == $column_name) {
- //found it try to drop it.
- $q = $wpdb->query($drop_ddl);
- // we cannot directly tell that whether this succeeded!
- foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
- if ($column == $column_name) {
- return false;
- }
- }
- }
- }
- // else didn't find it
- return true;
+ global $wpdb;
+ foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
+ if ($column == $column_name) {
+ //found it try to drop it.
+ $q = $wpdb->query($drop_ddl);
+ // we cannot directly tell that whether this succeeded!
+ foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
+ if ($column == $column_name) {
+ return false;
+ }
+ }
+ }
+ }
+ // else didn't find it
+ return true;
}