diff --git a/wp-admin/cat-js.php b/wp-admin/cat-js.php index e1b0e288ea..35df2c8bde 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(''); + jaxcat.update(''); $('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); }; $('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); }; } diff --git a/wp-admin/comment.php b/wp-admin/comment.php index ea87ac377c..a583264619 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -18,7 +18,7 @@ case 'editcomment': $comment = (int) $_GET['c']; if ( ! $comment = get_comment($comment) ) - wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'javascript:history.go(-1)')); + wp_die(__('Oops, no comment with this ID.').sprintf(' '.__('Go back').'!', 'javascript:history.go(-1)')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) wp_die( __('You are not allowed to edit comments on this post.') ); @@ -40,7 +40,7 @@ case 'mac': $nonce_action .= $comment; if ( ! $comment = get_comment($comment) ) - wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); + wp_die(__('Oops, no comment with this ID.').sprintf(' '.__('Go back').'!', 'edit.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) wp_die( 'cdc' == $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); @@ -49,11 +49,11 @@ case 'mac':
-

Caution: You are about to mark the following comment as spam:'); ?>

+

'.__('Caution:').' '.__('You are about to mark the following comment as spam:'); ?>

-

Caution: You are about to delete the following comment:'); ?>

+

'.__('Caution:').' '.__('You are about to delete the following comment:'); ?>

-

Caution: You are about to approve the following comment:'); ?>

+

'.__('Caution:').' '.__('You are about to approve the following comment:'); ?>

@@ -116,7 +116,7 @@ case 'deletecomment': } if ( ! $comment = get_comment($comment) ) - wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit-comments.php')); + wp_die(__('Oops, no comment with this ID.').sprintf(' '.__('Go back').'!', 'edit-comments.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) wp_die( __('You are not allowed to edit comments on this post.') ); @@ -145,7 +145,7 @@ case 'unapprovecomment': } if ( ! $comment = get_comment($comment) ) - wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); + wp_die(__('Oops, no comment with this ID.').sprintf(' '.__('Go back').'!', 'edit.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) wp_die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') ); @@ -171,7 +171,7 @@ case 'approvecomment': } if ( ! $comment = get_comment($comment) ) - wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); + wp_die(__('Oops, no comment with this ID.').sprintf(' '.__('Go back').'!', 'edit.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) wp_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); @@ -210,4 +210,4 @@ default: include('admin-footer.php'); -?> \ No newline at end of file +?> diff --git a/wp-admin/dbx-admin-key-js.php b/wp-admin/dbx-admin-key-js.php index 9746a8c510..eb5e1a4371 100644 --- a/wp-admin/dbx-admin-key-js.php +++ b/wp-admin/dbx-admin-key-js.php @@ -32,12 +32,12 @@ addLoadEvent( function() '10', // animate re-ordering [frames per transition, or '0' for no effect] 'yes', // include open/close toggle buttons ['yes'|'no'] 'closed', // default state ['open'|'closed'] - 'open', // word for "open", as in "open this box" - 'close', // word for "close", as in "close this box" - 'click-down and drag to move this box', // sentence for "move this box" by mouse - 'click to %toggle% this box', // pattern-match sentence for "(open|close) this box" by mouse - 'use the arrow keys to move this box', // sentence for "move this box" by keyboard - ', or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard + '', // word for "open", as in "open this box" + '', // word for "close", as in "close this box" + '', // sentence for "move this box" by mouse + '', // pattern-match sentence for "(open|close) this box" by mouse + '', // sentence for "move this box" by keyboard + '', // pattern-match sentence-fragment for "(open|close) this box" by keyboard '%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts ); @@ -57,12 +57,12 @@ addLoadEvent( function() '10', // animate re-ordering [frames per transition, or '0' for no effect] 'yes', // include open/close toggle buttons ['yes'|'no'] 'closed', // default state ['open'|'closed'] - 'open', // word for "open", as in "open this box" - 'close', // word for "close", as in "close this box" - 'click-down and drag to move this box', // sentence for "move this box" by mouse - 'click to %toggle% this box', // pattern-match sentence for "(open|close) this box" by mouse - 'use the arrow keys to move this box', // sentence for "move this box" by keyboard - ', or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard + '', // word for "open", as in "open this box" + '', // word for "close", as in "close this box" + '', // sentence for "move this box" by mouse + '', // pattern-match sentence for "(open|close) this box" by mouse + '', // sentence for "move this box" by keyboard + '', // pattern-match sentence-fragment for "(open|close) this box" by keyboard '%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts ); }); diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 488a055130..fda618c7b0 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -157,12 +157,12 @@ $start = " start='$offset'"; comment_post_ID) ) { echo " " . __('Edit') . ''; - echo ' | comment_author)) . "', theCommentList );\">" . __('Delete') . ' '; + echo ' | comment_author)) . "', theCommentList );\">" . __('Delete') . ' '; if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { echo ' | ' . __('Unapprove') . ' '; echo ' | ' . __('Approve') . ' '; } - echo " | comment_post_ID . "&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 "%s".\\n"Cancel" to stop, "OK" to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . " "; + echo " | comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK" to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . " "; } $post = get_post($comment->comment_post_ID); $post_title = wp_specialchars( $post->post_title, 'double' ); @@ -223,14 +223,14 @@ $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; comment_post_ID) ) { echo "" . __('Edit') . ""; } ?> comment_post_ID) ) { - echo "comment_post_ID."&c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), js_escape( $comment->comment_author )) . "', theCommentList );\" class='delete'>" . __('Delete') . " "; + echo "comment_post_ID."&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') . " "; } ?> -

'); return false } return confirm('')" /> - ')" />

+

'); return false } return confirm('')" /> + ')" />

-post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> +post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />
diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 5f80f26d06..42135ce69f 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -188,7 +188,7 @@ list_meta($metadata); ID) ) ?> - post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> + post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php index d09df85e36..967bd447dd 100644 --- a/wp-admin/import/blogger.php +++ b/wp-admin/import/blogger.php @@ -10,7 +10,7 @@ class Blogger_Import { $title = __('Import Blogger'); $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 = __('This will delete everything saved by the Blogger importer except your posts and comments. Are you sure you want to do this?'); + $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?')); $reset = __('Reset this importer'); $incompat = __('Your web server is not properly configured to use this importer. Please enable the CURL extension for PHP and then reload this page.'); diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php index 2f66e4403c..a327ed2acb 100644 --- a/wp-admin/link-add.php +++ b/wp-admin/link-add.php @@ -29,7 +29,7 @@ require('admin-header.php'); '.__('Edit').''; - echo 'link_id , '".sprintf(__("You are about to delete the "%s" link to %s.\\n"Cancel" to stop, "OK" to delete."), js_escape($link->link_name), js_escape($link->link_url)).'\' );" class="delete">'.__('Delete').''; + echo 'link_id , '".js_escape(sprintf(__("You are about to delete the "%s" link to %s.\\n"Cancel" to stop, "OK" to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').''; echo ''; echo "\n \n"; } @@ -171,7 +171,7 @@ if ($links)
-

')" />

+

')" />

diff --git a/wp-admin/moderation.php b/wp-admin/moderation.php index e9fc505a82..8999741162 100644 --- a/wp-admin/moderation.php +++ b/wp-admin/moderation.php @@ -135,7 +135,7 @@ $i = 0;

— [ comment_ID.'">' . __('Edit') . ' | '; -echo " comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete ') . " | "; ?> +echo " comment_post_ID."&comment=".$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 );\">" . __('Delete ') . " | "; ?> comment_post_ID); $post_title = wp_specialchars( $post->post_title, 'double' ); diff --git a/wp-admin/upload-js.php b/wp-admin/upload-js.php index ca51e3fe6c..5ee62c1e64 100644 --- a/wp-admin/upload-js.php +++ b/wp-admin/upload-js.php @@ -97,20 +97,20 @@ addLoadEvent( function() { h += "

"; h += ""; if ( this.currentImage.thumb ) { - h += ""; } - h += ""; h += "
"; - h += "
"; - h += ""; + h += "
"; + h += "
"; + h += ""; h += "
"; - h += "
"; - h += "
"; - h += ""; + h += "
"; + h += "
"; + h += "
"; + h += ""; h += "

"; - h += " »' />"; + h += "' />"; h += "

"; h += "
"; @@ -134,22 +134,22 @@ addLoadEvent( function() { var params = $H(this.params); params.ID = ''; params.action = ''; - h += "« Back"; + h += "' class='back'>« "; } else { - h += "« Back"; + h += "' class='back'>« "; } h += "
" if ( !this.currentImage.isImage ) - h += "

" + this.currentImage.title + "

"; + h += "

'>" + this.currentImage.title + "

"; else h += "

" + this.currentImage.title + "

"; h += " — "; - h += "Insert" + h += "" h += ""; h += '
' h += "
"; if ( this.currentImage.isImage ) { - h += ""; + h += "'>"; h += "" + this.currentImage.title + ""; h += ""; } else @@ -158,20 +158,20 @@ addLoadEvent( function() { h += "" - h += ""; + h += ""; h += ""; h += ""; - h += ""; + h += ""; h += ""; h += ""; - h += ""; + h += ""; h += ""; - h += "
"; + h += "
' onclick='theFileList.deleteFile(" + id + ");' />"; h += ""; h += ""; h += ""; h += ""; - h += "
"; + h += "
' />
"; h += "
"; new Insertion.Top('upload-content', h); diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index a45da85f8a..b8a41325ad 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -107,7 +107,7 @@ function get_links($category = -1, if ( $show_updated ) if (substr($row->link_updated_f, 0, 2) != '00') - $title .= ' (Last updated ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * 3600)) . ')'; + $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * 3600)) . ')'; if ( '' != $title ) $title = ' title="' . $title . '"'; diff --git a/wp-includes/js/autosave.js.php b/wp-includes/js/autosave.js.php index 2e76230914..934bfa00a5 100644 --- a/wp-includes/js/autosave.js.php +++ b/wp-includes/js/autosave.js.php @@ -38,9 +38,9 @@ function autosave_update_post_ID() { var message; if(isNaN(res)) { - message = "" + response; + message = "" + response; } else { - message = "" + autosave_cur_time(); + message = "" + autosave_cur_time(); $('post_ID').name = "post_ID"; $('post_ID').value = res; // We need new nonces @@ -60,7 +60,7 @@ function autosave_update_post_ID() { } function autosave_loading() { - $('autosave').innerHTML = ""; + $('autosave').innerHTML = ""; } function autosave_saved() { @@ -69,9 +69,9 @@ function autosave_saved() { var message; if(isNaN(res)) { - message = "" + response; + message = "" + response; } else { - message = "" + autosave_cur_time() + "."; + message = "" + autosave_cur_time() + "."; } $('autosave').innerHTML = message; } diff --git a/wp-includes/js/list-manipulation-js.php b/wp-includes/js/list-manipulation-js.php index 112d19f1f3..eb67077bdf 100644 --- a/wp-includes/js/list-manipulation-js.php +++ b/wp-includes/js/list-manipulation-js.php @@ -1,6 +1,6 @@ addLoadEvent(function(){theList=new listMan();}); -function deleteSomething(what,id,message,obj){if(!obj)obj=theList;if(!message)message="";if(confirm(message))return obj.ajaxDelete(what,id);else return false;} +function deleteSomething(what,id,message,obj){if(!obj)obj=theList;if(!message)message="";if(confirm(message))return obj.ajaxDelete(what,id);else return false;} function dimSomething(what,id,dimClass,obj){if(!obj)obj=theList;return obj.ajaxDimmer(what,id,dimClass);} var listMan = Class.create(); @@ -47,7 +47,7 @@ Object.extend(listMan.prototype, { if ( tempObj.showLink ) tempObj.showLink = id; }); - ajaxAdd.myResponseElement.update(tempObj.showLink ? ( "" ) : ''); + ajaxAdd.myResponseElement.update(tempObj.showLink ? ( "" ) : ''); } if ( tempObj.addComplete && typeof tempObj.addComplete == 'function' ) tempObj.addComplete( what, where, update, transport ); diff --git a/wp-includes/js/wp-ajax-js.php b/wp-includes/js/wp-ajax-js.php index 0d4cf2b359..3bb32ce945 100644 --- a/wp-includes/js/wp-ajax-js.php +++ b/wp-includes/js/wp-ajax-js.php @@ -81,7 +81,7 @@ Ajax.Responders.register( { return; wpBeforeUnload = window.onbeforeunload; window.onbeforeunload = function() { - return ""; + return ""; } }, onLoading: function() { // Can switch to onLoaded if we lose data