Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: page_row_actions

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

Line Code
1676                if ( $post->post_status == 'trash' || !EMPTY_TRASH_DAYS )
1677                     $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>";
1678           }
1679           if ( in_array($post->post_status, array('pending', 'draft')) ) {
1680                if ( current_user_can('edit_page', $page->ID) )
1681                     $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
1682           } elseif ( $post->post_status != 'trash' ) {
1683                $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
1684           }
1685           $actions = apply_filters('page_row_actions', $actions, $page);
1686           $action_count = count($actions);
1687
1688           $i = 0;
1689           echo '<div class="row-actions">';
1690           foreach ( $actions as $action => $link ) {
1691                ++$i;
1692                ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
1693                echo "<span class='$action'>$link$sep</span>";
1694           }