Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: user_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
1916                $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( esc_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) );
1917           }
1918           $edit = "<strong><a href=\"$edit_link\">$user_object->user_login</a></strong><br />";
1919
1920           // Set up the hover actions for this user
1921           $actions = array();
1922           $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
1923           if ( $current_user->ID != $user_object->ID )
1924                $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . "</a>";
1925           $actions = apply_filters('user_row_actions', $actions, $user_object);
1926           $action_count = count($actions);
1927           $i = 0;
1928           $edit .= '<div class="row-actions">';
1929           foreach ( $actions as $action => $link ) {
1930                ++$i;
1931                ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
1932                $edit .= "<span class='$action'>$link$sep</span>";
1933           }
1934           $edit .= '</div>';