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
354                 * Filter the action links displayed next the sites a user belongs to
355                 * in the Network Admin Users list table.
356                 *
357                 * @since 3.1.0
358                 *
359                 * @param array $actions     An array of action links to be displayed.
360                 *                           Default 'Edit', 'View'.
361                 * @param int   $userblog_id The site ID.
362                 */
363                $actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id );
364
365                $i=0;
366                $action_count = count( $actions );
367                foreach ( $actions as $action => $link ) {
368                     ++$i;
369                     $sep = ( $i == $action_count ) ? '' : ' | ';
370                     echo "<span class='$action'>$link$sep</span>";
371                }
372                echo '</small></span><br/>';