Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: ms_user_list_site_class

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
343                 * Filters the span class for a site listing on the mulisite user list table.
344                 *
345                 * @since 5.2.0
346                 *
347                 * @param array  $site_classes Class used within the span tag. Default "site-#" with the site's network ID.
348                 * @param int    $site_id      Site ID.
349                 * @param int    $network_id   Network ID.
350                 * @param object $user         WP_User object.
351                 */
352                $site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $val->userblog_id, $val->site_id, $user );
353                if ( is_array( $site_classes ) && ! empty( $site_classes ) ) {
354                     $site_classes = array_map( 'sanitize_html_class', array_unique( $site_classes ) );
355                     echo '<span class="' . esc_attr( implode( ' ', $site_classes ) ) . '">';
356                } else {
357                     echo '<span>';
358                }
359                echo '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) . '">' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . '</a>';
360                echo ' <small class="row-actions">';
361                $actions         = array();