apply_filters( 'ms_user_list_site_class', string[] $site_classes, int $site_id, int $network_id, WP_User $user )
- Since
- 5.2.0
Filters the span class for a site listing on the multisite user list table.
Compatibility
- WordPress
- since 5.2.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$site_classesstring[]- Array of class names used within the span tag.
Default "site-#" with the site's network ID. $site_idint- Site ID.
$network_idint- Network ID.
$userWP_User- WP_User object.
Where this hook fires · 1
wp-admin/includes/class-wp-ms-users-list-table.php:398WP_MS_Users_List_Table::column_blogs()
Source code
<?php * @param string[] $site_classes Array of class names used within the span tag. * Default "site-#" with the site's network ID. * @param int $site_id Site ID. * @param int $network_id Network ID. * @param WP_User $user WP_User object. */ $site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $site->userblog_id, $site->site_id, $user ); if ( is_array( $site_classes ) && ! empty( $site_classes ) ) { $site_classes = array_map( 'sanitize_html_class', array_unique( $site_classes ) ); echo '<span class="' . esc_attr( implode( ' ', $site_classes ) ) . '">'; } else { echo '<span>';Changelog
Introduced in 5.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.