git-svn-id: http://svn.automattic.com/wordpress/trunk@2377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-02-25 00:20:48 +00:00
parent 8d7f5b8cae
commit 894c4cc880
4 changed files with 52 additions and 26 deletions

View File

@ -81,7 +81,7 @@ if (0 < $numcomms) $numcomms = number_format($numcomms);
$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories");
if (0 < $numcats) $numcats = number_format($numcats);
?>
<p>There are currently <?php echo $numposts ?> <a href="edit.php" title="posts">posts</a> and <?php echo $numcomms ?> <a href="edit-comments.php" title="Comments">comments</a>, contained within <?php echo $numcats ?> <a href="categories.php" title="categories">categories</a>.</p>
<p><?php printf(__('There are currently %1$d <a href="%2$s" title="Posts">posts</a> and %3$d <a href="%4$s" title="Comments">comments</a>, contained within %5$d <a href="%6$s" title="categories">categories</a>.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?></p>
</div>
<?php

View File

@ -160,7 +160,7 @@ require('admin-header.php');
</td>
</tr>
<tr>
<th scope="row"> family </th>
<th scope="row"> <?php _e('family'); ?> </th>
<td>
<label for="child">
<input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child', 'radio'); ?> />

View File

@ -108,7 +108,7 @@ switch ($action) {
?>
<div class="wrap">
<h2>Edit &#8220;<?php echo wp_specialchars($row->cat_name)?>&#8221; Category </h2>
<h2><?php printf('Edit &#8220%s&#8221; Category', wp_specialchars($row->cat_name)); ?></h2>
<form name="editcat" method="post">
<input type="hidden" name="action" value="editedcat" />
@ -305,20 +305,46 @@ $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle, show_images
$i = 1;
foreach ($results as $row) {
if ($row->list_limit == -1) {
$row->list_limit = 'none';
$row->list_limit = __('none');
}
$style = ($i % 2) ? ' class="alternate"' : '';
/*
Manually internationalize every sort order option.
*/
switch ($row->sort_order) {
case 'name':
$row->sort_order = __('name');
break;
case 'id':
$row->sort_order = __('id');
break;
case 'url':
$row->sort_order = __('url');
break;
case 'rating':
$row->sort_order = __('rating');
break;
case 'updated':
$row->sort_order = __('updated');
break;
case 'rand':
$row->sort_order = __('rand');
break;
case 'length':
$row->sort_order = __('length');
break;
}
?>
<tr valign="middle" align="center" <?php echo $style ?> style="border-bottom: 1px dotted #9C9A9C;">
<td><?php echo wp_specialchars($row->cat_name)?></td>
<td ><?php echo $row->cat_id?></td>
<td><?php echo $row->auto_toggle?></td>
<td><?php echo $row->show_images?></td>
<td><?php echo $row->show_description?></td>
<td><?php echo $row->show_rating?></td>
<td><?php echo $row->show_updated?></td>
<td><?php echo $row->auto_toggle == 'Y' ? __('Y') : __('N') ?></td>
<td><?php echo $row->show_images == 'Y' ? __('Y') : __('N') ?></td>
<td><?php echo $row->show_description == 'Y' ? __('Y') : __('N') ?></td>
<td><?php echo $row->show_rating == 'Y' ? __('Y') : __('N') ?></td>
<td><?php echo $row->show_updated == 'Y' ? __('Y') : __('N') ?></td>
<td><?php echo $row->sort_order ?></td>
<td><?php echo $row->sort_desc?></td>
<td><?php echo $row->sort_desc == 'Y' ? __('Y') : __('N') ?></td>
<td nowrap="nowrap"><?php echo htmlentities($row->text_before_link)?>&nbsp;</td>
<td nowrap="nowrap"><?php echo htmlentities($row->text_after_link)?>&nbsp;</td>
<td nowrap="nowrap"><?php echo htmlentities($row->text_after_all)?></td>

View File

@ -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,7 +440,7 @@ 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))
@ -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 &raquo;</a></p></div>
<div class="updated"><p><?php printf(__('Post saved. <a href="%s">View site &raquo;</a>'), get_bloginfo('home')); ?></p></div>
<?php endif; ?>
<?php
if (user_can_create_draft($user_ID)) {