mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Localize strings. http://mosquito.wordpress.org/view.php?id=909 Props: nbachiyski
git-svn-id: https://develop.svn.wordpress.org/trunk@2377 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+14
-14
@@ -26,7 +26,7 @@ switch($action) {
|
||||
case 'post':
|
||||
|
||||
if ( !user_can_create_draft($user_ID) )
|
||||
die('You are not allowed to create posts or drafts on this blog.');
|
||||
die( __('You are not allowed to create posts or drafts on this blog.') );
|
||||
|
||||
$post_pingback = (int) $_POST['post_pingback'];
|
||||
$content = apply_filters('content_save_pre', $_POST['content']);
|
||||
@@ -201,7 +201,7 @@ case 'edit':
|
||||
$post = $post_ID = $p = (int) $_GET['post'];
|
||||
|
||||
if ( !user_can_edit_post($user_ID, $post_ID) )
|
||||
die ('You are not allowed to edit this post.');
|
||||
die ( __('You are not allowed to edit this post.') );
|
||||
|
||||
$postdata = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$post_ID'");
|
||||
$content = $postdata->post_content;
|
||||
@@ -224,7 +224,7 @@ case 'edit':
|
||||
$menu_order = $postdata->menu_order;
|
||||
|
||||
if( 'private' == $postdata->post_status && $postdata->post_author != $user_ID )
|
||||
die ('You are not allowed to view other users\' private posts.');
|
||||
die ( __('You are not allowed to view other users\' private posts.') );
|
||||
|
||||
if ($post_status == 'static') {
|
||||
$page_template = get_post_meta($post_ID, '_wp_page_template', true);
|
||||
@@ -258,7 +258,7 @@ case 'editpost':
|
||||
$post_ID = $_POST['post_ID'];
|
||||
|
||||
if (!user_can_edit_post($user_ID, $post_ID, $blog_ID))
|
||||
die('You are not allowed to edit this post.');
|
||||
die( __('You are not allowed to edit this post.') );
|
||||
|
||||
$post_categories = $_POST['post_category'];
|
||||
if (!$post_categories) $post_categories[] = 1;
|
||||
@@ -440,11 +440,11 @@ case 'delete':
|
||||
$post_id = (isset($_GET['post'])) ? intval($_GET['post']) : intval($_POST['post_ID']);
|
||||
|
||||
if (!user_can_delete_post($user_ID, $post_id)) {
|
||||
die('You are not allowed to delete this post.');
|
||||
die( __('You are not allowed to delete this post.') );
|
||||
}
|
||||
|
||||
if (! wp_delete_post($post_id))
|
||||
die(__('Error in deleting...'));
|
||||
die( __('Error in deleting...') );
|
||||
|
||||
$sendback = $_SERVER['HTTP_REFERER'];
|
||||
if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
|
||||
@@ -465,7 +465,7 @@ case 'editcomment':
|
||||
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)'));
|
||||
|
||||
if (!user_can_edit_post_comments($user_ID, $commentdata['comment_post_ID'])) {
|
||||
die('You are not allowed to edit comments on this post.');
|
||||
die( __('You are not allowed to edit comments on this post.') );
|
||||
}
|
||||
|
||||
$content = $commentdata['comment_content'];
|
||||
@@ -487,7 +487,7 @@ case 'confirmdeletecomment':
|
||||
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
|
||||
|
||||
if (!user_can_delete_post_comments($user_ID, $commentdata['comment_post_ID'])) {
|
||||
die('You are not allowed to delete comments on this post.');
|
||||
die( __('You are not allowed to delete comments on this post.') );
|
||||
}
|
||||
|
||||
echo "<div class=\"wrap\">\n";
|
||||
@@ -529,7 +529,7 @@ case 'deletecomment':
|
||||
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'post.php'));
|
||||
|
||||
if (!user_can_delete_post_comments($user_ID, $commentdata['comment_post_ID'])) {
|
||||
die('You are not allowed to edit comments on this post.');
|
||||
die( __('You are not allowed to edit comments on this post.') );
|
||||
}
|
||||
|
||||
wp_set_comment_status($comment, "delete");
|
||||
@@ -560,7 +560,7 @@ case 'unapprovecomment':
|
||||
$commentdata = get_commentdata($comment) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
|
||||
|
||||
if (!user_can_edit_post_comments($user_ID, $commentdata['comment_post_ID'])) {
|
||||
die('You are not allowed to edit comments on this post, so you cannot disapprove this comment.');
|
||||
die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') );
|
||||
}
|
||||
|
||||
wp_set_comment_status($comment, "hold");
|
||||
@@ -580,7 +580,7 @@ case 'mailapprovecomment':
|
||||
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
|
||||
|
||||
if (!user_can_edit_post_comments($user_ID, $commentdata['comment_post_ID'])) {
|
||||
die('You are not allowed to edit comments on this post, so you cannot approve this comment.');
|
||||
die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
|
||||
}
|
||||
|
||||
if ('1' != $commentdata['comment_approved']) {
|
||||
@@ -605,7 +605,7 @@ case 'approvecomment':
|
||||
$commentdata = get_commentdata($comment) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
|
||||
|
||||
if (!user_can_edit_post_comments($user_ID, $commentdata['comment_post_ID'])) {
|
||||
die('You are not allowed to edit comments on this post, so you cannot approve this comment.');
|
||||
die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
|
||||
}
|
||||
|
||||
wp_set_comment_status($comment, "approve");
|
||||
@@ -632,7 +632,7 @@ case 'editedcomment':
|
||||
$comment_status = $_POST['comment_status'];
|
||||
|
||||
if (!user_can_edit_post_comments($user_ID, $comment_post_ID)) {
|
||||
die('You are not allowed to edit comments on this post, so you cannot edit this comment.');
|
||||
die( __('You are not allowed to edit comments on this post, so you cannot edit this comment.') );
|
||||
}
|
||||
|
||||
if (user_can_edit_post_date($user_ID, $post_ID) && (!empty($_POST['edit_date']))) {
|
||||
@@ -676,7 +676,7 @@ default:
|
||||
require_once ('./admin-header.php');
|
||||
?>
|
||||
<?php if ( isset($_GET['posted']) ) : ?>
|
||||
<div class="updated"><p>Post saved. <a href="<?php bloginfo('home'); ?>">View site »</a></p></div>
|
||||
<div class="updated"><p><?php printf(__('Post saved. <a href="%s">View site »</a>'), get_bloginfo('home')); ?></p></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if (user_can_create_draft($user_ID)) {
|
||||
|
||||
Reference in New Issue
Block a user