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
1662                $actions['inline'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
1663                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
1664           }
1665           if ( in_array($post->post_status, array('pending', 'draft')) ) {
1666                if ( current_user_can('edit_page', $page->ID) )
1667                     $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
1668           } else {
1669                $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
1670           }
1671           $actions = apply_filters('page_row_actions', $actions, $page);
1672           $action_count = count($actions);
1673
1674           $i = 0;
1675           echo '<div class="row-actions">';
1676           foreach ( $actions as $action => $link ) {
1677                ++$i;
1678                ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
1679                echo "<span class='$action'>$link$sep</span>";
1680           }