Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: ms_user_list_site_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
267                                               * Filter the action links displayed next the sites a user belongs to
268                                               * in the Network Admin Users list table.
269                                               *
270                                               * @since 3.1.0
271                                               *
272                                               * @param array $actions     An array of action links to be displayed.
273                                               *                           Default 'Edit', 'View'.
274                                               * @param int   $userblog_id The site ID.
275                                               */
276                                              $actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id );
277
278                                              $i=0;
279                                              $action_count = count( $actions );
280                                              foreach ( $actions as $action => $link ) {
281                                                   ++$i;
282                                                   ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
283                                                   echo "<span class='$action'>$link$sep</span>";
284                                              }
285                                              echo '</small></span><br/>';