Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: post_date_column_time

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 3 times in this file.

Line Code
1316
1317                     if ( $time_diff > 0 && $time_diff < 24*60*60 )
1318                          $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
1319                     else
1320                          $h_time = mysql2date(__('Y/m/d'), $m_time);
1321                }
1322
1323                echo '<td ' . $attributes . '>';
1324                if ( 'excerpt' == $mode )
1325                     echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
1326                else
1327                     echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
1328                echo '<br />';
1329                if ( 'publish' == $post->post_status ) {
1330                     _e('Published');
1331                } elseif ( 'future' == $post->post_status ) {
1332                     if ( $time_diff > 0 )
1333                          echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
1334                     else
1335                          _e('Scheduled');
1336                } else {
 
Line Code
1543
1544                $time_diff = time() - $time;
1545
1546                if ( $time_diff > 0 && $time_diff < 24*60*60 )
1547                     $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
1548                else
1549                     $h_time = mysql2date(__('Y/m/d'), $m_time);
1550           }
1551           echo '<td ' . $attributes . '>';
1552           echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $page, $column_name, '') . '</abbr>';
1553           echo '<br />';
1554           if ( 'publish' == $page->post_status ) {
1555                _e('Published');
1556           } elseif ( 'future' == $page->post_status ) {
1557                if ( $time_diff > 0 )
1558                     echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
1559                else
1560                     _e('Scheduled');
1561           } else {