summaryrefslogtreecommitdiffstats
path: root/wp-admin
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin')
-rw-r--r--wp-admin/admin-ajax.php6
-rw-r--r--wp-admin/admin-functions.php21
-rw-r--r--wp-admin/cat-js.php2
-rw-r--r--wp-admin/edit-category-form.php4
-rw-r--r--wp-admin/edit-comments.php6
-rw-r--r--wp-admin/edit-form-advanced.php2
-rw-r--r--wp-admin/edit-form-comment.php2
-rw-r--r--wp-admin/edit.php10
-rw-r--r--wp-admin/export.php3
-rw-r--r--wp-admin/import.php2
-rw-r--r--wp-admin/import/blogger.php4
-rw-r--r--wp-admin/import/dotclear.php12
-rw-r--r--wp-admin/import/greymatter.php4
-rw-r--r--wp-admin/import/livejournal.php5
-rw-r--r--wp-admin/import/mt.php15
-rw-r--r--wp-admin/import/rss.php2
-rw-r--r--wp-admin/import/textpattern.php5
-rw-r--r--wp-admin/import/wordpress.php3
-rw-r--r--wp-admin/link-manager.php111
-rw-r--r--wp-admin/page.php7
-rw-r--r--wp-admin/post.php7
-rw-r--r--wp-admin/upgrade-functions.php9
-rw-r--r--wp-admin/upload-functions.php12
-rw-r--r--wp-admin/upload-js.php46
-rw-r--r--wp-admin/upload.php8
-rw-r--r--wp-admin/users.js3
-rw-r--r--wp-admin/users.php4
-rw-r--r--wp-admin/wp-admin.css5
28 files changed, 191 insertions, 129 deletions
diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php
index c5d48b9..67fe5a9 100644
--- a/wp-admin/admin-ajax.php
+++ b/wp-admin/admin-ajax.php
@@ -147,7 +147,7 @@ case 'add-cat' : // From Manage->Categories
'what' => 'cat',
'id' => $cat->cat_ID,
'data' => _cat_row( $cat, $level, $cat_full_name ),
- 'supplemental' => array('name' => $cat_full_name)
+ 'supplemental' => array('name' => $cat_full_name, 'show-link' => sprintf(__( 'Category <a href="#%s">%s</a> added' ), "cat-$cat->cat_ID", $cat_full_name))
) );
$x->send();
break;
@@ -211,10 +211,12 @@ case 'add-user' :
echo "<p>$message<p>";
exit;
}
+ $user_object = new WP_User( $user_id );
$x = new WP_Ajax_Response( array(
'what' => 'user',
'id' => $user_id,
- 'data' => user_row( $user_id )
+ 'data' => user_row( $user_object ),
+ 'supplemental' => array('show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login))
) );
$x->send();
break;
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php
index 624b693..160dcc7 100644
--- a/wp-admin/admin-functions.php
+++ b/wp-admin/admin-functions.php
@@ -722,6 +722,7 @@ function cat_rows( $parent = 0, $level = 0, $categories = 0 ) {
$categories = get_categories( 'hide_empty=0' );
if ( $categories ) {
+ ob_start();
foreach ( $categories as $category ) {
if ( $category->cat_ID == 0 ) { // HACK, added 2006-05-13
$wpdb->query("DELETE FROM $wpdb->categories WHERE cat_ID = 0");
@@ -732,6 +733,12 @@ function cat_rows( $parent = 0, $level = 0, $categories = 0 ) {
cat_rows( $category->cat_ID, $level +1, $categories );
}
}
+ $output = ob_get_contents();
+ ob_end_clean();
+
+ $output = apply_filters('cat_rows', $output);
+
+ echo $output;
} else {
return false;
}
@@ -826,11 +833,13 @@ function user_row( $user_object, $style = '' ) {
if ( $numposts > 0 ) {
$r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>";
$r .= sprintf( __('View %1$s %2$s' ), $numposts, __ngettext( 'post', 'posts', $numposts ));
+ $r .= '</a>';
}
$r .= "</td>\n\t\t<td>";
- $edit_link = add_query_arg( 'wp_http_referer', wp_specialchars( urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" );
- if ( ( is_site_admin() || $current_user->ID == $user_object->ID ) && current_user_can('edit_user', $user_object->ID) )
+ if ( ( is_site_admin() || $current_user->ID == $user_object->ID ) && current_user_can( 'edit_user', $user_object->ID ) ) {
+ $edit_link = wp_specialchars( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), "user-edit.php?user_id=$user_object->ID" ) );
$r .= "<a href='$edit_link' class='edit'>".__( 'Edit' )."</a>";
+ }
$r .= "</td>\n\t</tr>";
return $r;
}
@@ -1296,8 +1305,8 @@ function get_page_templates() {
if ( is_array( $templates ) ) {
foreach ( $templates as $template ) {
$template_data = implode( '', file( ABSPATH.$template ));
- preg_match( "|Template Name:(.* )|i", $template_data, $name );
- preg_match( "|Description:(.* )|i", $template_data, $description );
+ preg_match( "|Template Name:(.*)|i", $template_data, $name );
+ preg_match( "|Description:(.*)|i", $template_data, $description );
$name = $name[1];
$description = $description[1];
@@ -2020,7 +2029,7 @@ function the_attachment_links( $id = false ) {
return false;
$icon = get_attachment_icon( $post->ID );
- $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true );
+ $attachment_data = wp_get_attachment_metadata( $id );
$thumb = isset( $attachment_data['thumb'] );
?>
<form id="the-attachment-links">
@@ -2037,7 +2046,7 @@ function the_attachment_links( $id = false ) {
<td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid; ?>"><?php echo $icon ?></a></textarea></td>
</tr>
<tr>
- <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to file' ); ?></th>
+ <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to page' ); ?></th>
<td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link( $post->ID ) ?>" rel="attachment wp-att-<?php echo $post->ID; ?>"><?php echo $icon ?></a></textarea></td>
</tr>
<?php else : ?>
diff --git a/wp-admin/cat-js.php b/wp-admin/cat-js.php
index 35df2c8..399aace 100644
--- a/wp-admin/cat-js.php
+++ b/wp-admin/cat-js.php
@@ -8,7 +8,7 @@ function newCatAddIn() {
var jaxcat = $('jaxcat');
if ( !jaxcat )
return false;
- jaxcat.update('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="<?php echo js_escape(__('Add')); ?>"/><span id="howto"><?php js_escape(__('Separate multiple categories with commas.')); ?></span></span>');
+ jaxcat.update('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="<?php echo js_escape(__('Add')); ?>"/><span id="howto"><?php echo js_escape(__('Separate multiple categories with commas.')); ?></span></span>');
$('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); };
$('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); };
}
diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php
index fece01f..44328fa 100644
--- a/wp-admin/edit-category-form.php
+++ b/wp-admin/edit-category-form.php
@@ -5,17 +5,20 @@ if ( ! empty($cat_ID) ) {
$form = '<form name="editcat" id="editcat" method="post" action="categories.php">';
$action = 'editedcat';
$nonce_action = 'update-category_' . $cat_ID;
+ do_action('edit_category_form_pre', $category);
} else {
$heading = __('Add Category');
$submit_text = __('Add Category &raquo;');
$form = '<form name="addcat" id="addcat" method="post" action="categories.php">';
$action = 'addcat';
$nonce_action = 'add-category';
+ do_action('add_category_form_pre', $category);
}
?>
<div class="wrap">
<h2><?php echo $heading ?></h2>
+<div id="ajax-response"></div>
<?php echo $form ?>
<input type="hidden" name="action" value="<?php echo $action ?>" />
<input type="hidden" name="cat_ID" value="<?php echo $category->cat_ID ?>" />
@@ -39,7 +42,6 @@ if ( ! empty($cat_ID) ) {
</table>
<?php autocomplete_textbox( "wpmu-edit.php?action=searchcategories&search=", "cat_name", "searchresults" ); ?>
<p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" /></p>
-<div id="ajax-response"></div>
<?php do_action('edit_category_form', $category); ?>
</form>
</div>
diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php
index fda618c..e48cdb9 100644
--- a/wp-admin/edit-comments.php
+++ b/wp-admin/edit-comments.php
@@ -223,14 +223,14 @@ $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo "<a href='comment.php?action=editcomment&amp;c=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
- echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), $comment->comment_author )) . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> ";
+ echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by '%s'. \n 'Cancel' to stop, 'OK' to delete."), $comment->comment_author )) . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> ";
} ?></td>
</tr>
<?php
} // end foreach
?></table>
-<p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments &raquo;') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to delete")); ?>'); return false } return confirm('<?php echo js_escape(sprintf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete.")), "' + numchecked + '"); ?>')" />
- <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam &raquo;') ?>" onclick="return confirm('<?php echo js_escape(__("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.")); ?>')" /></p>
+<p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments &raquo;') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to delete")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to delete %s comments permanently \n 'Cancel' to stop, 'OK' to delete.")), "' + numchecked + '"); ?>')" />
+ <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam &raquo;') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to mark as spam")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to mark %s comments as spam \n 'Cancel' to stop, 'OK' to mark as spam.")), "' + numchecked + '"); ?>')" /></p>
</form>
<div id="ajax-response"></div>
<?php
diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
index 2b18d8e..2c1c23e 100644
--- a/wp-admin/edit-form-advanced.php
+++ b/wp-admin/edit-form-advanced.php
@@ -249,7 +249,7 @@ list_meta($metadata);
</div>
<?php if ('edit' == $action) : $delete_nonce = wp_create_nonce( 'delete-post_' . $post_ID ); ?>
-<input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />
+<input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />
<?php endif; ?>
</div>
diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php
index ac20ed7..0cc2a37 100644
--- a/wp-admin/edit-form-comment.php
+++ b/wp-admin/edit-form-comment.php
@@ -30,7 +30,7 @@ addLoadEvent(focusit);
</div>
</fieldset>
<fieldset id="uridiv">
- <legend><label for="URL"><?php _e('URL:') ?></label></legend>
+ <legend><label for="newcomment_author_url"><?php _e('URL:') ?></label></legend>
<div>
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo $comment->comment_author_url ?>" tabindex="3" id="URL" />
</div>
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index 529ca15..c044879 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -282,13 +282,13 @@ foreach ($comments as $comment) {
<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>';
- echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $post->ID . '&amp;comment=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';
+ echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."'>" . __('Edit') . '</a>';
+ echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $post->ID . '&amp;c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';
if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) {
- echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $post->ID . '&amp;comment=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';
- echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&amp;p=' . $post->ID . '&amp;comment=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';
+ echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $post->ID . '&amp;c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';
+ echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&amp;p=' . $post->ID . '&amp;c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';
}
- echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ]";
+ echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=".$comment->comment_post_ID."&amp;c=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ]";
} // end if any comments to show
?>
</p>
diff --git a/wp-admin/export.php b/wp-admin/export.php
index 1a49700..32de2bb 100644
--- a/wp-admin/export.php
+++ b/wp-admin/export.php
@@ -12,8 +12,9 @@ require_once ('admin-header.php');
<div class="wrap">
<h2><?php _e('Export'); ?></h2>
<div class="narrow">
-<p><?php _e('When you click the button below WordPress will create a XML file for you to save to your computer.'); ?></p>
+<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, comments, custom fields, and categories.'); ?></p>
+<p><?php _e('Once you\'ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p>
<form action="" method="get">
<h3><?php _e('Optional options'); ?></h3>
diff --git a/wp-admin/import.php b/wp-admin/import.php
index 99f8d39..e808c92 100644
--- a/wp-admin/import.php
+++ b/wp-admin/import.php
@@ -7,7 +7,7 @@ require_once ('admin-header.php');
<div class="wrap">
<h2><?php _e('Import'); ?></h2>
-<p><?php _e('If you have posts or comments in another system WordPress can import them into your current blog. To get started, choose a system to import from below:'); ?></p>
+<p><?php _e('If you have posts or comments in another system, WordPress can import those into this blog. To get started, choose a system to import from below:'); ?></p>
<?php
diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php
index 060a5e9..6ba0a16 100644
--- a/wp-admin/import/blogger.php
+++ b/wp-admin/import/blogger.php
@@ -7,7 +7,7 @@ class Blogger_Import {
// Shows the welcome screen and the magic iframe.
function greet() {
- $title = __('Import Blogger');
+ $title = __('Import Blogger or Blogspot');
$welcome = __('Howdy! This importer allows you to import posts and comments from your Blogger account into your WordPress blog.');
$noiframes = __('This feature requires iframe support.');
$warning = js_escape(__('This will delete everything saved by the Blogger importer except your posts and comments. Are you sure you want to do this?'));
@@ -670,6 +670,6 @@ class Blogger_Import {
$blogger_import = new Blogger_Import();
-register_importer('blogger', __('Blogger and Blogspot'), __('Import <strong>posts and comments</strong> from your Blogger account'), array ($blogger_import, 'start'));
+register_importer('blogger', __('Blogger or Blog*Spot'), __('Import posts, comments, and users from a Blogger or Blog*Spot blog'), array ($blogger_import, 'start'));
?>
diff --git a/wp-admin/import/dotclear.php b/wp-admin/import/dotclear.php
index 02c030f..0eb092b 100644
--- a/wp-admin/import/dotclear.php
+++ b/wp-admin/import/dotclear.php
@@ -1,6 +1,6 @@
<?php
/*
- * Dotclear import plugin
+ * DotClear import plugin
* by Thomas Quinot - http://thomas.quinot.org/
*/
@@ -296,7 +296,7 @@ class Dotclear_Import {
}
$dcid2wpid[$user_id] = $ret_id;
- // Set Dotclear-to-WordPress permissions translation
+ // Set DotClear-to-WordPress permissions translation
// Update Usermeta Data
$user = new WP_User($ret_id);
@@ -345,7 +345,7 @@ class Dotclear_Import {
$count++;
extract($post);
- // Set Dotclear-to-WordPress status translation
+ // Set DotClear-to-WordPress status translation
$stattrans = array(0 => 'draft', 1 => 'publish');
$comment_status_map = array (0 => 'closed', 1 => 'open');
@@ -647,9 +647,9 @@ class Dotclear_Import {
function db_form()
{
echo '<table class="editform">';
- printf('<tr><th><label for="dbuser">%s</label></th><td><input type="text" name="dbuser" id="dbuser" /></td></tr>', __('Dotclear Database User:'));
+ printf('<tr><th><label for="dbuser">%s</label></th><td><input type="text" name="dbuser" id="dbuser" /></td></tr>', __('DotClear Database User:'));
printf('<tr><th><label for="dbpass">%s</label></th><td><input type="password" name="dbpass" id="dbpass" /></td></tr>', __('DotClear Database Password:'));
- printf('<tr><th><label for="dbname">%s</label></th><td><input type="text" name="dbname" id="dbname" /></td></tr>', __('Dotclear Database Name:'));
+ printf('<tr><th><label for="dbname">%s</label></th><td><input type="text" name="dbname" id="dbname" /></td></tr>', __('DotClear Database Name:'));
printf('<tr><th><label for="dbhost">%s</label></th><td><input type="text" name="dbhost" nameid="dbhost" value="localhost" /></td></tr>', __('DotClear Database Host:'));
printf('<tr><th><label for="dbprefix">%s</label></th><td><input type="text" name="dbprefix" id="dbprefix" value="dc_"/></td></tr>', __('DotClear Table prefix:'));
printf('<tr><th><label for="dccharset">%s</label></th><td><input type="text" name="dccharset" id="dccharset" value="ISO-8859-15"/></td></tr>', __('Originating character set:'));
@@ -744,5 +744,5 @@ class Dotclear_Import {
}
$dc_import = new Dotclear_Import();
-register_importer('dotclear', __('DotClear'), __('Import posts from a DotClear Blog'), array ($dc_import, 'dispatch'));
+register_importer('dotclear', __('DotClear'), __('Import categories, users, posts, comments, and links from a DotClear blog'), array ($dc_import, 'dispatch'));
?>
diff --git a/wp-admin/import/greymatter.php b/wp-admin/import/greymatter.php
index ea05ff2..7332937 100644
--- a/wp-admin/import/greymatter.php
+++ b/wp-admin/import/greymatter.php
@@ -6,7 +6,7 @@ class GM_Import {
function header() {
echo '<div class="wrap">';
- echo '<h2>'.__('Import Greymatter').'</h2>';
+ echo '<h2>'.__('Import GreyMatter').'</h2>';
}
function footer() {
@@ -281,7 +281,7 @@ class GM_Import {
?>
</ul><strong><?php _e('Done') ?></strong></li></ul>
<p>&nbsp;</p>
-<p><?php _e('Completed Greymatter import!') ?></p>
+<p><?php _e('Completed GreyMatter import!') ?></p>
<?php
$this->footer();
}
diff --git a/wp-admin/import/livejournal.php b/wp-admin/import/livejournal.php
index 2d770ec..e1389cd 100644
--- a/wp-admin/import/livejournal.php
+++ b/wp-admin/import/livejournal.php
@@ -21,7 +21,8 @@ class LJ_Import {
function greet() {
echo '<div class="narrow">';
- echo '<p>'.__('Howdy! This importer allows you to extract posts from LiveJournal XML export file into your blog. Pick a LiveJournal file to upload and click Import.').'</p>';
+ echo '<p>'.__('Howdy! Upload your LiveJournal XML export file and we&#8217;ll import the posts into this blog.').'</p>';
+ echo '<p>'.__('Choose a LiveJournal XML file to upload, then click Upload file and import.').'</p>';
wp_import_upload_form("admin.php?import=livejournal&amp;step=1");
echo '</div>';
}
@@ -166,5 +167,5 @@ class LJ_Import {
$livejournal_import = new LJ_Import();
-register_importer('livejournal', __('LiveJournal'), __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch'));
+register_importer('livejournal', __('LiveJournal'), __('Import posts from a LiveJournal XML export file'), array ($livejournal_import, 'dispatch'));
?>
diff --git a/wp-admin/import/mt.php b/wp-admin/import/mt.php
index ffb869b..733c7fa 100644
--- a/wp-admin/import/mt.php
+++ b/wp-admin/import/mt.php
@@ -11,7 +11,7 @@ class MT_Import {
function header() {
echo '<div class="wrap">';
- echo '<h2>'.__('Import Movable Type and TypePad').'</h2>';
+ echo '<h2>'.__('Import Movable Type or TypePad').'</h2>';
}
function footer() {
@@ -22,7 +22,7 @@ class MT_Import {
$this->header();
?>
<div class="narrow">
-<p><?php _e('Howdy! We&#8217;re about to begin the process to import all of your Movable Type entries into WordPress. To begin, select a file to upload and click Import.'); ?></p>
+<p><?php _e('Howdy! We&#8217;re about to begin importing all of your Movable Type or Typepad entries into WordPress. To begin, choose a file to upload and click Upload file and import.'); ?></p>
<?php wp_import_upload_form( add_query_arg('step', 1) ); ?>
<p><?php _e('The importer is smart enough not to import duplicates, so you can run this multiple times without worry if&#8212;for whatever reason&#8212;it doesn\'t finish. If you get an <strong>out of memory</strong> error try splitting up the import file into pieces.'); ?> </p>
</div>
@@ -95,6 +95,13 @@ class MT_Import {
$formnames = array ();
$selectnames = array ();
+ foreach ($_POST['user'] as $key => $line) {
+ $newname = trim(stripslashes($line));
+ if ($newname == '')
+ $newname = 'left_blank'; //passing author names from step 1 to step 2 is accomplished by using POST. left_blank denotes an empty entry in the form.
+ array_push($formnames, "$newname");
+ } // $formnames is the array with the form entered names
+
foreach ($_POST['userselect'] as $user => $key) {
$selected = trim(stripslashes($key));
array_push($selectnames, "$selected");
@@ -131,7 +138,7 @@ class MT_Import {
echo '</li>';
}
- echo '<input type="submit" value="Submit">'.'<br/>';
+ echo '<input type="submit" value="'.__('Submit').'">'.'<br/>';
echo '</form>';
echo '</ol></div>';
@@ -408,5 +415,5 @@ class MT_Import {
$mt_import = new MT_Import();
-register_importer('mt', __('Movable Type and TypePad'), __('Imports <strong>posts and comments</strong> from your Movable Type or TypePad blog'), array ($mt_import, 'dispatch'));
+register_importer('mt', __('Movable Type and TypePad'), __('Import posts and comments from a Movable Type or Typepad blog'), array ($mt_import, 'dispatch'));
?>
diff --git a/wp-admin/import/rss.php b/wp-admin/import/rss.php
index 8a9b9a6..944b297 100644
--- a/wp-admin/import/rss.php
+++ b/wp-admin/import/rss.php
@@ -22,7 +22,7 @@ class RSS_Import {
function greet() {
echo '<div class="narrow">';
- echo '<p>'.__('Howdy! This importer allows you to extract posts from any RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.').'</p>';
+ echo '<p>'.__('Howdy! This importer allows you to extract posts from an RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.').'</p>';
wp_import_upload_form("admin.php?import=rss&amp;step=1");
echo '</div>';
}
diff --git a/wp-admin/import/textpattern.php b/wp-admin/import/textpattern.php
index 435a588..db60e15 100644
--- a/wp-admin/import/textpattern.php
+++ b/wp-admin/import/textpattern.php
@@ -52,7 +52,8 @@ class Textpattern_Import {
function greet() {
echo '<div class="narrow">';
- echo '<p>'.__('Howdy! This importer allows you to extract posts from any Textpattern 4.0.2+ into your blog. This has not been tested on previous versions of Textpattern. Mileage may vary.').'</p>';
+ echo '<p>'.__('Howdy! This imports categories, users, posts, comments, and links from any Textpattern 4.0.2+ into this blog.').'</p>';
+ echo '<p>'.__('This has not been tested on previous versions of Textpattern. Mileage may vary.').'</p>';
echo '<p>'.__('Your Textpattern Configuration settings are as follows:').'</p>';
echo '<form action="admin.php?import=textpattern&amp;step=1" method="post">';
$this->db_form();
@@ -660,5 +661,5 @@ class Textpattern_Import {
}
$txp_import = new Textpattern_Import();
-register_importer('textpattern', __('Textpattern'), __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));
+register_importer('textpattern', __('Textpattern'), __('Import categories, users, posts, comments, and links from a Textpattern blog'), array ($txp_import, 'dispatch'));
?>
diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php
index 109d0a7..028cbf0 100644
--- a/wp-admin/import/wordpress.php
+++ b/wp-admin/import/wordpress.php
@@ -27,6 +27,7 @@ class WP_Import {
function greet() {
echo '<div class="narrow">';
echo '<p>'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we&#8217;ll import the posts, comments, custom fields, and categories into this blog.').'</p>';
+ echo '<p>'.__('Choose a WordPress WXR file to upload, then click Upload file and import.').'</p>';
wp_import_upload_form("admin.php?import=wordpress&amp;step=1");
echo '</div>';
}
@@ -323,6 +324,6 @@ class WP_Import {
$wp_import = new WP_Import();
-register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, and categories</strong> from a WordPress export file'), array ($wp_import, 'dispatch'));
+register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, pages, and categories</strong> from a WordPress export file'), array ($wp_import, 'dispatch'));
?>
diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php
index 0a4d4e8..562e2e5 100644
--- a/wp-admin/link-manager.php
+++ b/wp-admin/link-manager.php
@@ -73,7 +73,7 @@ if ( isset($_GET['deleted']) ) {
<div class="wrap">
<h2><?php _e('Blogroll Management'); ?></h2>
-<p><?php _e('Here you add links to sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it&#8217;s called a &#8220;blogroll.&#8221;'); ?></p>
+<p><?php _e('Here you <a href="link-add.php">add links</a> to sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it&#8217;s called a &#8220;blogroll.&#8221;'); ?></p>
<form id="cats" method="get" action="">
<p><?php
$categories = get_categories("hide_empty=1&type=link");
@@ -93,6 +93,24 @@ printf(__('Currently showing %1$s links ordered by %2$s'), $select_cat, $select_
?>
<input type="submit" name="action" value="<?php _e('Update &raquo;') ?>" /></p>
</form>
+<?php
+$link_columns = array(
+ 'name' => '<th width="15%">' . __('Name') . '</th>',
+ 'url' => '<th>' . __('URL') . '</th>',
+ 'categories' => '<th>' . __('Categories') . '</th>',
+ 'rel' => '<th style="text-align: center">' . __('rel') . '</th>',
+ 'visible' => '<th style="text-align: center">' . __('Visible') . '</th>',
+ 'action' => '<th colspan="2" style="text-align: center">' . __('Action') . '</th>',
+);
+$link_columns = apply_filters('manage_link_columns', $link_columns);
+?>
+
+<?php
+if ( 'all' == $cat_id )
+ $cat_id = '';
+$links = get_bookmarks( "category=$cat_id&hide_invisible=0&orderby=$sqlorderby&hide_empty=0" );
+if ( $links ) {
+?>
<form id="links" method="post" action="link.php">
<?php wp_nonce_field('bulk-bookmarks') ?>
@@ -103,21 +121,14 @@ printf(__('Currently showing %1$s links ordered by %2$s'), $select_cat, $select_
<table class="widefat">
<thead>
<tr>
- <th width="15%"><?php _e('Name') ?></th>
- <th><?php _e('URL') ?></th>
- <th><?php _e('Categories') ?></th>
- <th style="text-align: center"><?php _e('rel') ?></th>
- <th style="text-align: center"><?php _e('Visible') ?></th>
- <th colspan="2" style="text-align: center"><?php _e('Action') ?></th>
- <th style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('links'));" /></th>
+<?php foreach($link_columns as $column_display_name) {
+ echo $column_display_name;
+} ?>
+ <th style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('links'));" /></th>
</tr>
</thead>
<tbody id="the-list">
<?php
-if ( 'all' == $cat_id )
- $cat_id = '';
-$links = get_bookmarks("category=$cat_id&hide_invisible=0&orderby=$sqlorderby&hide_empty=0");
-if ($links)
foreach ($links as $link) {
$link->link_name = wp_specialchars($link->link_name);
$link->link_description = wp_specialchars($link->link_description);
@@ -133,47 +144,59 @@ if ($links)
$visible = ($link->link_visible == 'Y') ? __('Yes') : __('No');
++ $i;
$style = ($i % 2) ? '' : ' class="alternate"';
-?>
- <tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>>
- <td><strong><?php echo $link->link_name; ?></strong><br />
- <?php
-
-
- echo $link->link_description . "</td>";
- echo "<td><a href=\"$link->link_url\" title=\"".sprintf(__('Visit %s'), $link->link_name)."\">$short_url</a></td>";
- ?>
- <td>
- <?php
-
- $cat_names = array();
- foreach ($link->link_category as $category) {
- $cat_name = get_the_category_by_ID($category);
- $cat_name = wp_specialchars($cat_name);
- if ( $cat_id != $category )
- $cat_name = "<a href='link-manager.php?cat_id=$category'>$cat_name</a>";
- $cat_names[] = $cat_name;
- }
- echo implode(', ', $cat_names);
- ?>
- </td>
- <td><?php echo $link->link_rel; ?></td>
- <td align='center'><?php echo $visible; ?></td>
-<?php
+ ?><tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>><?php
+ foreach($link_columns as $column_name=>$column_display_name) {
+ switch($column_name) {
+ case 'name':
+ ?><td><strong><?php echo $link->link_name; ?></strong><br /><?php
+ echo $link->link_description . "</td>";
+ break;
+ case 'url':
+ echo "<td><a href='$link->link_url' title='".sprintf(__('Visit %s'), $link->link_name)."'>$short_url</a></td>";
+ break;
+ case 'categories':
+ ?><td><?php
+ $cat_names = array();
+ foreach ($link->link_category as $category) {
+ $cat_name = get_the_category_by_ID($category);
+ $cat_name = wp_specialchars($cat_name);
+ if ( $cat_id != $category )
+ $cat_name = "<a href='link-manager.php?cat_id=$category'>$cat_name</a>";
+ $cat_names[] = $cat_name;
+ }
+ echo implode(', ', $cat_names);
+ ?> </td><?php
+ break;
+ case 'rel':
+ ?><td><?php echo $link->link_rel; ?></td><?php
+ break;
+ case 'visible':
+ ?><td align='center'><?php echo $visible; ?></td><?php
+ break;
+ case 'action':
+ echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>';
+ echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the &quot;%s&quot; link to %s.\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').'</a></td>';
+ break;
+ default:
+ ?>
+ <td><?php do_action('manage_link_custom_column', $column_name, $id); ?></td>
+ <?php
+ break;
- echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>';
- echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the &quot;%s&quot; link to %s.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').'</a></td>';
+ }
+ }
echo '<td align="center"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>';
echo "\n </tr>\n";
}
+}
?>
</tbody>
</table>
<div id="ajax-response"></div>
-<p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Links') ?> &raquo;" onclick="return confirm('<?php echo js_escape(__("You are about to delete these links permanently \\n \'Cancel\' to stop, \'OK\' to delete.")); ?>')" /></p>
+<p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Links') ?> &raquo;" onclick="return confirm('<?php echo js_escape(__("You are about to delete these links permanently.\n'Cancel' to stop, 'OK' to delete.")); ?>')" /></p>
</form>
-</div>
<?php
if( wp_cache_get( "checked_bookmarks_table", "options" ) == false ) {
@@ -187,8 +210,8 @@ if( wp_cache_get( "checked_bookmarks_table", "options" ) == false ) {
}
}
wp_cache_set( "checked_bookmarks_table", "1", "options" );
-}
+} ?>
-?>
+</div>
<?php include('admin-footer.php'); ?>
diff --git a/wp-admin/page.php b/wp-admin/page.php
index 4728b5d..0e523e2 100644
--- a/wp-admin/page.php
+++ b/wp-admin/page.php
@@ -76,13 +76,10 @@ case 'editattachment':
$_POST['post_type'] = 'attachment';
// Update the thumbnail filename
- $oldmeta = $newmeta = get_post_meta($page_id, '_wp_attachment_metadata', true);
+ $newmeta = wp_get_attachment_metadata( $page_id, true );
$newmeta['thumb'] = $_POST['thumb'];
- if ( '' !== $oldmeta )
- update_post_meta($page_id, '_wp_attachment_metadata', $newmeta, $oldmeta);
- else
- add_post_meta($page_id, '_wp_attachment_metadata', $newmeta);
+ wp_update_attachment_metadata( $newmeta );
case 'editpost':
$page_ID = (int) $_POST['post_ID'];
diff --git a/wp-admin/post.php b/wp-admin/post.php
index 31d16bd..b35ff33 100644
--- a/wp-admin/post.php
+++ b/wp-admin/post.php
@@ -78,13 +78,10 @@ case 'editattachment':
$_POST['post_type'] = 'attachment';
// Update the thumbnail filename
- $oldmeta = $newmeta = get_post_meta($post_id, '_wp_attachment_metadata', true);
+ $newmeta = wp_get_attachment_metadata( $post_id, true );
$newmeta['thumb'] = $_POST['thumb'];
- if ( '' !== $oldmeta )
- update_post_meta($post_id, '_wp_attachment_metadata', $newmeta, $oldmeta);
- else
- add_post_meta($post_id, '_wp_attachment_metadata', $newmeta);
+ wp_update_attachment_metadata( $post_id, $newmeta );
case 'editpost':
$post_ID = (int) $_POST['post_ID'];
diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php
index 2349dca..ce4e62c 100644
--- a/wp-admin/upgrade-functions.php
+++ b/wp-admin/upgrade-functions.php
@@ -475,7 +475,7 @@ function upgrade_160() {
$meta = get_post_meta($object->ID, 'imagedata', true);
if ( ! empty($meta['file']) )
- add_post_meta($object->ID, '_wp_attached_file', $meta['file']);
+ update_attached_file( $object->ID, $meta['file'] );
}
}
}
@@ -556,6 +556,13 @@ function upgrade_210() {
}
}
+function upgrade_old_slugs() {
+ // upgrade people who were using the Redirect Old Slugs plugin
+ global $wpdb;
+ $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'");
+}
+
+
// The functions we use to actually do stuff
// General
diff --git a/wp-admin/upload-functions.php b/wp-admin/upload-functions.php
index 3900c6e..11f3b77 100644
--- a/wp-admin/upload-functions.php
+++ b/wp-admin/upload-functions.php
@@ -2,7 +2,7 @@
function wp_upload_display( $dims = false, $href = '' ) {
global $post;
$id = get_the_ID();
- $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true );
+ $attachment_data = wp_get_attachment_metadata( $id );
if ( isset($attachment_data['width']) )
list($width,$height) = wp_shrink_dimensions($attachment_data['width'], $attachment_data['height'], 171, 128);
ob_start();
@@ -57,7 +57,7 @@ function wp_upload_display( $dims = false, $href = '' ) {
function wp_upload_view() {
global $style, $post_id, $style;
$id = get_the_ID();
- $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true );
+ $attachment_data = wp_get_attachment_metadata( $id );
?>
<div id="upload-file">
<div id="file-title">
@@ -98,7 +98,7 @@ function wp_upload_form() {
<?php
if ( $id ) :
$attachment = get_post_to_edit( $id );
- $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true );
+ $attachment_data = wp_get_attachment_metadata( $id );
?>
<div id="file-title">
<h2><?php if ( !isset($attachment_data['width']) && 'inline' != $style )
@@ -229,7 +229,7 @@ function wp_upload_tab_upload_action() {
$imagedata['hwstring_small'] = "height='$uheight' width='$uwidth'";
$imagedata['file'] = $file;
- add_post_meta($id, '_wp_attachment_metadata', $imagedata);
+ wp_update_attachment_metadata( $id, $imagedata );
if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) {
if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 )
@@ -240,13 +240,13 @@ function wp_upload_tab_upload_action() {
if ( @file_exists($thumb) ) {
$newdata = $imagedata;
$newdata['thumb'] = basename($thumb);
- update_post_meta($id, '_wp_attachment_metadata', $newdata, $imagedata);
+ wp_update_attachment_metadata( $id, $newdata );
} else {
$error = $thumb;
}
}
} else {
- add_post_meta($id, '_wp_attachment_metadata', array());
+ wp_update_attachment_metadata( $id, array() );
}
wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=browse&action=view&ID=$id&post_id=$post_id");
diff --git a/wp-admin/upload-js.php b/wp-admin/upload-js.php
index 5ee62c1..c0a7a1b 100644
--- a/wp-admin/upload-js.php
+++ b/wp-admin/upload-js.php
@@ -72,22 +72,22 @@ addLoadEvent( function() {
var params = $H(this.params);
params.ID = '';
params.action = '';
- h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='Browse your files' class='back'>&laquo; Back</a>";
+ h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1); ?></a>";
} else {
- h += "<a href='#' onclick='return theFileList.cancelView();' title='Browse your files' class='back'>&laquo; Back</a>";
+ h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1) ?></a>";
}
h += "<div id='file-title'>"
if ( !this.currentImage.isImage )
- h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='Direct link to file'>" + this.currentImage.title + "</a></h2>";
+ h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>'>" + this.currentImage.title + "</a></h2>";
else
h += "<h2>" + this.currentImage.title + "</h2>";
h += " &#8212; <span>";
- h += "<a href='#' onclick='return theFileList.editView(" + id + ");'>Edit</a>"
+ h += "<a href='#' onclick='return theFileList.editView(" + id + ");'><?php echo wp_specialchars(__('Edit'), 1); ?></a>"
h += "</span>";
h += '</div>'
h += "<div id='upload-file-view' class='alignleft'>";
if ( this.currentImage.isImage ) {
- h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='Direct link to file'>";
+ h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>'>";
h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
h += "</a>";
} else
@@ -97,20 +97,20 @@ addLoadEvent( function() {
h += "<form name='uploadoptions' id='uploadoptions' class='alignleft'>";
h += "<table>";
if ( this.currentImage.thumb ) {
- h += "<tr><th style='padding-bottom:.5em'><?php echo js_escape(__('Show:')); ?></th><td style='padding-bottom:.5em'>";
- h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo js_escape(__('Thumbnail')); ?></label><br />";
- h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo js_escape(__('Full size')); ?></label>";
+ h += "<tr><th style='padding-bottom:.5em'><?php echo wp_specialchars(__('Show:'), 1); ?></th><td style='padding-bottom:.5em'>";
+ h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo wp_specialchars(__('Thumbnail'), 1); ?></label><br />";
+ h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo wp_specialchars(__('Full size'), 1); ?></label>";
h += "</td></tr>";
}
- h += "<tr><th><?php echo js_escape(__('Link to:')); ?></th><td>";
- h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo js_escape(__('File')); ?></label><br />";
- h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo js_escape(__('Page')); ?></label><br />";
- h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo js_escape(__('None')); ?></label>";
+ h += "<tr><th><?php echo wp_specialchars(__('Link to:'), 1); ?></th><td>";
+ h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo wp_specialchars(__('File'), 1); ?></label><br />";
+ h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo wp_specialchars(__('Page'), 1); ?></label><br />";
+ h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo wp_specialchars(__('None'), 1); ?></label>";
h += "</td></tr>";
h += "<tr><td colspan='2'><p class='submit'>";
- h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo js_escape(__('Send to editor &raquo;')); ?>' />";
+ h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo wp_specialchars(__('Send to editor &raquo;'), 1); ?>' />";
h += "</p></td></tr></table>";
h += "</form>";
@@ -134,22 +134,22 @@ addLoadEvent( function() {
var params = $H(this.params);
params.ID = '';
params.action = '';
- h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo js_escape(__('Browse your files')); ?>' class='back'>&laquo; <?php echo js_escape(__('Back')); ?></a>";
+ h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1); ?></a>";
} else {
- h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo js_escape(__('Browse your files')); ?>' class='back'>&laquo; <?php echo js_escape(__('Back')); ?></a>";
+ h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1); ?></a>";
}
h += "<div id='file-title'>"
if ( !this.currentImage.isImage )
- h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo js_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>";
+ h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>'>" + this.currentImage.title + "</a></h2>";
else
h += "<h2>" + this.currentImage.title + "</h2>";
h += " &#8212; <span>";
- h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'><?php js_escape(__('Insert')); ?></a>"
+ h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'><?php wp_specialchars(__('Insert'), 1); ?></a>"
h += "</span>";
h += '</div>'
h += "<div id='upload-file-view' class='alignleft'>";
if ( this.currentImage.isImage ) {
- h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo js_escape(__('Direct link to file')); ?>'>";
+ h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file')); ?>'>";
h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
h += "</a>";
} else
@@ -158,20 +158,20 @@ addLoadEvent( function() {
h += "<table><col /><col class='widefat' /><tr>"
- h += "<th scope='row'><label for='url'><?php echo js_escape(__('URL')); ?></label></th>";
+ h += "<th scope='row'><label for='url'><?php echo wp_specialchars(__('URL'), 1); ?></label></th>";
h += "<td><input type='text' id='url' class='readonly' value='" + this.currentImage.srcBase + this.currentImage.src + "' readonly='readonly' /></td>";
h += "</tr><tr>";
- h += "<th scope='row'><label for='post_title'><?php echo js_escape(__('Title')); ?></label></th>";
+ h += "<th scope='row'><label for='post_title'><?php echo wp_specialchars(__('Title'), 1); ?></label></th>";
h += "<td><input type='text' id='post_title' name='post_title' value='" + this.currentImage.title + "' /></td>";
h += "</tr><tr>";
- h += "<th scope='row'><label for='post_content'><?php echo js_escape(__('Description')); ?></label></th>";
+ h += "<th scope='row'><label for='post_content'><?php echo wp_specialchars(__('Description'), 1); ?></label></th>";
h += "<td><textarea name='post_content' id='post_content'>" + this.currentImage.description + "</textarea></td>";
- h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value='<?php echo js_escape(__('Delete File')); ?>' onclick='theFileList.deleteFile(" + id + ");' />";
+ h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value='<?php echo wp_specialchars(__('Delete File'), 1); ?>' onclick='theFileList.deleteFile(" + id + ");' />";
h += "<input type='hidden' name='from_tab' value='" + this.tab + "' />";
h += "<input type='hidden' name='action' id='action-value' value='save' />";
h += "<input type='hidden' name='ID' value='" + id + "' />";
h += "<input type='hidden' name='_wpnonce' value='" + this.nonce + "' />";
- h += "<div class='submit'><input type='submit' value='<?php echo js_escape(__('Save &raquo;')); ?>' /></div>";
+ h += "<div class='submit'><input type='submit' value='<?php echo wp_specialchars(__('Save &raquo;'), 1); ?>' /></div>";
h += "</td></tr></table></form>";
new Insertion.Top('upload-content', h);
diff --git a/wp-admin/upload.php b/wp-admin/upload.php
index 53d1e56..b2977c7 100644
--- a/wp-admin/upload.php
+++ b/wp-admin/upload.php
@@ -8,6 +8,14 @@ if (!current_user_can('upload_files'))
wp_reset_vars(array('action', 'tab', 'from_tab', 'style', 'post_id', 'ID', 'paged', 'post_title', 'post_content', 'delete'));
+// IDs should be integers
+$ID = (int) $ID;
+$post_id = (int) $post_id;
+
+// Require an ID for the edit screen
+if ( $action == 'edit' && !$ID )
+ wp_die(__("You are not allowed to be here"));
+
require_once('upload-functions.php');
if ( !$tab )
$tab = 'browse-all';
diff --git a/wp-admin/users.js b/wp-admin/users.js
index 5e40418..f249f65 100644
--- a/wp-admin/users.js
+++ b/wp-admin/users.js
@@ -2,7 +2,8 @@ addLoadEvent(function() {
theListEls = document.getElementsByTagName('tbody');
theUserLists = new Array();
for ( var l = 0; l < theListEls.length; l++ ) {
- theUserLists[theListEls[l].id] = new listMan(theListEls[l].id);
+ if ( theListEls[l].id )
+ theUserLists[theListEls[l].id] = new listMan(theListEls[l].id);
}
addUserInputs = document.getElementById('adduser').getElementsByTagName('input');
for ( var i = 0; i < addUserInputs.length; i++ ) {
diff --git a/wp-admin/users.php b/wp-admin/users.php
index 3c260ab..ca49c24 100644
--- a/wp-admin/users.php
+++ b/wp-admin/users.php
@@ -506,7 +506,7 @@ default:
foreach($roleclasses as $role => $roleclass) {
uksort($roleclass, "strnatcasecmp");
?>
-
+<tbody>
<tr>
<?php if ( !empty($role) ) : ?>
<th colspan="7"><h3><?php echo $wp_roles->role_names[$role]; ?></h3></th>
@@ -522,7 +522,7 @@ foreach($roleclasses as $role => $roleclass) {
<th><?php _e('Website') ?></th>
<th colspan="2" style="text-align: center"><?php _e('Actions') ?></th>
</tr>
-</thead>
+</tbody>
<tbody id="role-<?php echo $role; ?>"><?php
$style = '';
foreach ( (array) $roleclass as $user_object ) {
diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css
index 010dc60..e31c000 100644
--- a/wp-admin/wp-admin.css
+++ b/wp-admin/wp-admin.css
@@ -46,6 +46,10 @@ a.delete:hover {
overflow: hidden;
}
+#planetnews cite {
+ font-size: 11px;
+}
+
#planetnews li .post {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 18px;
@@ -824,6 +828,7 @@ input.delete:hover {
margin: 0;
font-size: 15px;
}
+
.plugins p {
}