summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-admin/admin-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-08-31 09:50:02 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-08-31 09:50:02 +0000
commitf9d834aed9c0c6cba6faf7777e7952bf2cd8e4a5 (patch)
tree239419a4308e9639822269ff5eb935262cbd46a3 /wp-inst/wp-admin/admin-functions.php
parentad74c2c392bcdd0b8f2eee0e4d9cd0c2309617e3 (diff)
downloadwordpress-mu-f9d834aed9c0c6cba6faf7777e7952bf2cd8e4a5.tar.gz
wordpress-mu-f9d834aed9c0c6cba6faf7777e7952bf2cd8e4a5.tar.xz
wordpress-mu-f9d834aed9c0c6cba6faf7777e7952bf2cd8e4a5.zip
WP Core Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@261 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/admin-functions.php')
-rw-r--r--wp-inst/wp-admin/admin-functions.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php
index 1a5c8cc..c23d5d0 100644
--- a/wp-inst/wp-admin/admin-functions.php
+++ b/wp-inst/wp-admin/admin-functions.php
@@ -264,7 +264,8 @@ function wp_insert_category($catarr) {
do_action('edit_category', $cat_ID);
} else {
$rval = $wpdb->insert_id;
- do_action('create_category', $cat_ID);
+ do_action('create_category', $rval);
+ do_action('add_category', $rval);
}
list( $update, $cat_ID, $category_nicename, $cat_name, $rval ) = apply_filters( "new_category", $update, $cat_ID, $category_nicename, $cat_name, $rval );
@@ -443,12 +444,12 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) {
$count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID");
$pad = str_repeat('&#8212; ', $level);
if ( current_user_can('manage_categories') )
- $edit = "<a href='categories.php?action=edit&amp;cat_ID=$category->cat_ID' class='edit'>" . __('Edit') . "</a></td><td><a href='categories.php?action=delete&amp;cat_ID=$category->cat_ID' onclick=\"return confirm('". sprintf(__("You are about to delete the category \'%s\'. All of its posts will go to the default category.\\n \'OK\' to delete, \'Cancel\' to stop."), $wpdb->escape($category->cat_name)) . "')\" class='delete'>" . __('Delete') . "</a>";
+ $edit = "<a href='categories.php?action=edit&amp;cat_ID=$category->cat_ID' class='edit'>" . __('Edit') . "</a></td><td><a href='categories.php?action=delete&amp;cat_ID=$category->cat_ID' onclick=\"return deleteSomething( 'cat', $category->cat_ID, '" . sprintf(__("You are about to delete the category &quot;%s&quot;. All of its posts will go to the default category.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars($category->cat_name, 1)) . "' );\" class='delete'>" . __('Delete') . "</a>";
else
$edit = '';
$class = ('alternate' == $class) ? '' : 'alternate';
- echo "<tr class='$class'><th scope='row'>$category->cat_ID</th><td>$pad $category->cat_name</td>
+ echo "<tr id='cat-$category->cat_ID' class='$class'><th scope='row'>$category->cat_ID</th><td>$pad $category->cat_name</td>
<td>$category->category_description</td>
<td>$count</td>
<td>$edit</td>
@@ -474,7 +475,7 @@ function page_rows( $parent = 0, $level = 0, $pages = 0 ) {
$id = $post->ID;
$class = ('alternate' == $class) ? '' : 'alternate';
?>
- <tr class='<?php echo $class; ?>'>
+ <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
<th scope="row"><?php echo $post->ID; ?></th>
<td>
<?php echo $pad; ?><?php the_title() ?>
@@ -483,7 +484,7 @@ function page_rows( $parent = 0, $level = 0, $pages = 0 ) {
<td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
<td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
- <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), the_title('','',0)) . "')\">" . __('Delete') . "</a>"; } ?></td>
+ <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
</tr>
<?php
@@ -1213,16 +1214,16 @@ $wp_file_descriptions =
array(
'index.php' => __('Main Index Template'),
'style.css' => __('Stylesheet'),
- 'comments.php' => __('Comments Template'),
- 'comments-popup.php' => __('Popup Comments Template'),
- 'footer.php' => __('Footer Template'),
- 'header.php' => __('Header Template'),
- 'sidebar.php' => __('Sidebar Template'),
- 'archive.php' => __('Archive Template'),
+ 'comments.php' => __('Comments'),
+ 'comments-popup.php' => __('Popup Comments'),
+ 'footer.php' => __('Footer'),
+ 'header.php' => __('Header'),
+ 'sidebar.php' => __('Sidebar'),
+ 'archive.php' => __('Archives'),
'category.php' => __('Category Template'),
'page.php' => __('Page Template'),
- 'search.php' => __('Search Template'),
- 'single.php' => __('Post Template'),
+ 'search.php' => __('Search Results'),
+ 'single.php' => __('Single Post'),
'404.php' => __('404 Template'),
'my-hacks.php' => __('my-hacks.php (legacy hacks support)'),
'.htaccess' => __('.htaccess (for rewrite rules)'),