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
246                     $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
247                } else {
248                     $edit = "<strong>$user_object->user_login</strong><br />";
249                }
250
251                if ( !is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'delete_user', $user_object->ID ) )
252                     $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "users.php?action=delete&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Delete' ) . "</a>";
253                if ( is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'remove_user', $user_object->ID ) )
254                     $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url( $url."action=remove&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Remove' ) . "</a>";
255                $actions = apply_filters( 'user_row_actions', $actions, $user_object );
256                $edit .= $this->row_actions( $actions );
257
258                // Set up the checkbox ( because the user is editable, otherwise its empty )
259                $checkbox = "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />";
260
261           } else {
262                $edit = '<strong>' . $user_object->user_login . '</strong>';
263           }
264           $role_name = isset( $wp_roles->role_names[$role] ) ? translate_user_role( $wp_roles->role_names[$role] ) : __( 'None' );