Changeset 8910
- Timestamp:
- 09/17/2008 12:04:02 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r8908 r8910 81 81 $pad = str_repeat( '— ', $level ); 82 82 $name = ( $name_override ? $name_override : $pad . ' ' . $category->name ); 83 $edit_link = "categories.php?action=edit&cat_ID=$category->term_id"; 83 84 if ( current_user_can( 'manage_categories' ) ) { 84 $edit = "<a class='row-title' href='categories.php?action=edit&cat_ID=$category->term_id' title='" . attribute_escape(sprintf(__('Edit "%s"'), $category->name)) . "'>$name</a>"; 85 $edit = "<a class='row-title' href='$edit_link' title='" . attribute_escape(sprintf(__('Edit "%s"'), $category->name)) . "'>$name</a><br />"; 86 $actions = array(); 87 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 88 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("categories.php?action=delete&cat_ID=$category->term_id", 'delete-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 89 $action_count = count($actions); 90 $i = 0; 91 foreach ( $actions as $action => $link ) { 92 ++$i; 93 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 94 $edit .= "<span class='$action'>$link$sep</span>"; 95 } 85 96 } else { 86 97 $edit = $name;
Note: See TracChangeset
for help on using the changeset viewer.