Changeset 8758 for trunk/wp-admin/link-manager.php
- Timestamp:
- 08/27/2008 10:04:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/link-manager.php
r8682 r8758 164 164 <tbody> 165 165 <?php 166 $ i = 0; // It is slower incrementing an undefined and valueless variable.166 $alt = 0; 167 167 168 168 foreach ($links as $link) { … … 176 176 if (strlen($short_url) > 35) 177 177 $short_url = substr($short_url, 0, 32).'...'; 178 179 178 $visible = ($link->link_visible == 'Y') ? __('Yes') : __('No'); 180 ++ $i; 181 $style = ($i % 2) ? '' : ' class="alternate"'; 179 $style = ($alt % 2) ? '' : ' class="alternate"'; 180 ++ $alt; 181 $edit_link = get_edit_bookmark_link(); 182 182 ?><tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>><?php 183 183 echo '<th scope="row" class="check-column"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></th>'; … … 186 186 case 'name': 187 187 188 echo "<td><strong><a class='row-title' href='link.php?link_id=$link->link_id&action=edit' title='" . attribute_escape(sprintf(__('Edit "%s"'), $link->link_name)) . "' class='edit'>$link->link_name</a></strong><br />"; 189 echo $link->link_description . "</td>"; 188 echo "<td><strong><a class='row-title' href='$edit_link' title='" . attribute_escape(sprintf(__('Edit "%s"'), $link->link_name)) . "' class='edit'>$link->link_name</a></strong><br />"; 189 $actions = array(); 190 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 191 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf( __("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 192 $action_count = count($actions); 193 $i = 0; 194 foreach ( $actions as $action => $link ) { 195 ++$i; 196 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 197 echo "<span class='$action'>$link$sep</span>"; 198 } 199 echo '</td>'; 190 200 break; 191 201 case 'url':
Note: See TracChangeset
for help on using the changeset viewer.