Changeset 15571 for trunk/wp-admin/includes/default-list-tables.php
- Timestamp:
- 09/05/2010 04:53:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/default-list-tables.php
r15569 r15571 456 456 457 457 $actions = apply_filters( $this->hierarchical_display ? 'page_row_actions' : 'post_row_actions', $actions, $post ); 458 $action_count = count( $actions ); 459 $i = 0; 460 echo '<div class="row-actions">'; 461 foreach ( $actions as $action => $link ) { 462 ++$i; 463 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 464 echo "<span class='$action'>$link$sep</span>"; 465 } 466 echo '</div>'; 458 echo $this->row_actions( $actions ); 467 459 468 460 get_inline_data( $post ); … … 1116 1108 } 1117 1109 $actions = apply_filters( 'media_row_actions', $actions, $post ); 1118 $action_count = count( $actions ); 1119 $i = 0; 1120 echo '<div class="row-actions">'; 1121 foreach ( $actions as $action => $link ) { 1122 $sep = ( ++$i == $action_count ) ? '' : ' | '; 1123 echo "<span class='$action'>$link$sep</span>"; 1124 } 1125 echo '</div>'; 1110 echo $this->row_actions( $actions ); 1126 1111 ?> 1127 1112 </td> … … 1269 1254 echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) ); 1270 1255 ?> 1271 <div class="row-actions">1272 1256 <?php 1273 1257 $actions = array(); … … 1286 1270 $actions = apply_filters( 'media_row_actions', $actions, $post ); 1287 1271 1288 $action_count = count( $actions ); 1289 $i = 0; 1290 foreach ( $actions as $action => $link ) { 1291 $sep = ( ++$i == $action_count ) ? '' : ' | '; 1292 echo "<span class='$action'>$link$sep</span>"; 1293 } 1294 ?> 1295 </div> 1272 echo $this->row_actions( $actions ); 1273 ?> 1296 1274 </td> 1297 1275 <td class="author column-author"> … … 1565 1543 case 'name': 1566 1544 $out .= '<td ' . $attributes . '><strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $name ) ) . '">' . $name . '</a></strong><br />'; 1545 1567 1546 $actions = array(); 1568 1547 if ( current_user_can( $tax->cap->edit_terms ) ) { … … 1576 1555 $actions = apply_filters( "${taxonomy}_row_actions", $actions, $tag ); 1577 1556 1578 $action_count = count( $actions ); 1579 $i = 0; 1580 $out .= '<div class="row-actions">'; 1581 foreach ( $actions as $action => $link ) { 1582 ++$i; 1583 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 1584 $out .= "<span class='$action'>$link$sep</span>"; 1585 } 1586 $out .= '</div>'; 1557 $out .= $this->row_actions( $actions ); 1587 1558 $out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">'; 1588 1559 $out .= '<div class="name">' . $qe_data->name . '</div>'; … … 1845 1816 $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url( "users.php?action=remove&user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Remove' ) . "</a>"; 1846 1817 $actions = apply_filters( 'user_row_actions', $actions, $user_object ); 1847 $action_count = count( $actions ); 1848 $i = 0; 1849 $edit .= '<div class="row-actions">'; 1850 foreach ( $actions as $action => $link ) { 1851 ++$i; 1852 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 1853 $edit .= "<span class='$action'>$link$sep</span>"; 1854 } 1855 $edit .= '</div>'; 1818 $edit .= $this->row_actions( $actions ); 1856 1819 1857 1820 // Set up the checkbox ( because the user is editable, otherwise its empty ) … … 2461 2424 case 'name': 2462 2425 echo "<td $attributes><strong><a class='row-title' href='$edit_link' title='" . esc_attr( sprintf( __( 'Edit “%s”' ), $link->link_name ) ) . "'>$link->link_name</a></strong><br />"; 2426 2463 2427 $actions = array(); 2464 2428 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>'; 2465 2429 $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( '" . esc_js( 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>"; 2466 $action_count = count( $actions ); 2467 $i = 0; 2468 echo '<div class="row-actions">'; 2469 foreach ( $actions as $action => $linkaction ) { 2470 ++$i; 2471 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 2472 echo "<span class='$action'>$linkaction$sep</span>"; 2473 } 2474 echo '</div>'; 2430 echo $this->row_actions( $actions ); 2431 2475 2432 echo '</td>'; 2476 2433 break; … … 2728 2685 $actions['visit'] = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'] ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a></span>'; 2729 2686 $actions = array_filter( $actions ); 2730 if ( count( $actions ) ) : ?> 2731 <div class="row-actions"> 2732 <?php echo implode( ' | ', $actions ); ?> 2733 </div> 2734 <?php endif; ?> 2687 echo $this->row_actions( $actions ); 2688 ?> 2735 2689 </td> 2736 2690 <?php … … 2965 2919 ?></strong> 2966 2920 <br/> 2967 <div class="row-actions"> 2968 <span class="edit"><a href="<?php echo esc_url( admin_url( $edit_link ) ); ?>"><?php _e( 'Edit' ); ?></a></span> 2969 <?php if ( ! in_array( $user['user_login'], $super_admins ) ) { ?> 2970 | <span class="delete"><a href="<?php echo $delete = esc_url( network_admin_url( add_query_arg( '_wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'edit.php', 'deleteuser' ) . '&action=deleteuser&id=' . $user['ID'] ) ) ); ?>" class="delete"><?php _e( 'Delete' ); ?></a></span> 2971 <?php } ?> 2921 <?php 2922 $actions = array(); 2923 $actions['edit'] = '<a href="' . esc_url( admin_url( $edit_link ) ) . '">' . __( 'Edit' ) . '</a>'; 2924 2925 if ( ! in_array( $user['user_login'], $super_admins ) ) { 2926 $actions['delete'] = '<a href="' . $delete = esc_url( network_admin_url( add_query_arg( '_wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'edit.php', 'deleteuser' ) . '&action=deleteuser&id=' . $user['ID'] ) ) ) . '" class="delete">' . __( 'Delete' ) . '</a>'; 2927 } 2928 2929 echo $this->row_actions( $actions ); 2930 ?> 2972 2931 </div> 2973 2932 </td>
Note: See TracChangeset
for help on using the changeset viewer.