Make WordPress Core


Ignore:
Timestamp:
08/20/2008 04:06:36 AM (16 years ago)
Author:
ryan
Message:

Merge crazyhorse management pages. see #7552

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-post-rows.php

    r8656 r8682  
    5959    case 'cb':
    6060        ?>
    61         <th scope="row" class="check-column"><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /><?php } ?></th>
     61        <th scope="row" class="check-column"><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><input type="checkbox" name="post[]" value="<?php the_ID(); ?>" /><?php } ?></th>
    6262        <?php
    6363        break;
     
    8585            }
    8686        }
    87         ?>
    88         <td><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name) ?></abbr></td>
    89         <?php
     87
     88        if ( 'excerpt' == $mode ) : ?>
     89        <td><?php echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode) ?></td>
     90<?php       else : ?>
     91        <td><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) ?></abbr></td>
     92<?php       endif;
    9093        break;
    9194    case 'title':
    9295        ?>
    93         <td><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong>
    94         <?php if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); } ?></td>
     96        <td class="post-title"><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong>
     97        <?php
     98        if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); }
     99
     100        if ( 'excerpt' == $mode )
     101            the_excerpt();
     102
     103        $actions = array();
     104        $actions['edit'] = '<a href="post.php?action=edit&amp;post=' . $post->ID . '">' . __('Edit') . '</a>';
     105        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
     106        $action_count = count($actions);
     107        $i = 0;
     108        foreach ( $actions as $action => $link ) {
     109            ++$i;
     110            ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
     111            echo "<span class='$action'>$link$sep</span>";
     112        }
     113        ?>
     114        </td>
    95115        <?php
    96116        break;
Note: See TracChangeset for help on using the changeset viewer.