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
377                 * Filters the span class for a site listing on the mulisite user list table.
378                 *
379                 * @since 5.2.0
380                 *
381                 * @param string[] $site_classes Array of class names used within the span tag. Default "site-#" with the site's network ID.
382                 * @param int      $site_id      Site ID.
383                 * @param int      $network_id   Network ID.
384                 * @param WP_User  $user         WP_User object.
385                 */
386                $site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $val->userblog_id, $val->site_id, $user );
387                if ( is_array( $site_classes ) && ! empty( $site_classes ) ) {
388                     $site_classes = array_map( 'sanitize_html_class', array_unique( $site_classes ) );
389                     echo '<span class="' . esc_attr( implode( ' ', $site_classes ) ) . '">';
390                } else {
391                     echo '<span>';
392                }
393                echo '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) . '">' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . '</a>';
394                echo ' <small class="row-actions">';
395                $actions         = array();