From 0b8ca16ea3bd9722bd1a38f8ab68901506b1a0e7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 15 Nov 2023 09:31:56 +0000 Subject: [PATCH] Docs: Fix typo in the `ms_user_list_site_class` filter description. Follow-up to [44977]. Props nithins53, shailu25, sabernhardt. Fixes #59907. git-svn-id: https://develop.svn.wordpress.org/trunk@57111 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-ms-users-list-table.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-ms-users-list-table.php b/src/wp-admin/includes/class-wp-ms-users-list-table.php index ec12321dc4c13..d02d380536129 100644 --- a/src/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-users-list-table.php @@ -383,25 +383,30 @@ public function column_blogs( $user ) { $path = ( '/' === $site->path ) ? '' : $site->path; $site_classes = array( 'site-' . $site->site_id ); + /** - * Filters the span class for a site listing on the mulisite user list table. + * Filters the span class for a site listing on the multisite user list table. * * @since 5.2.0 * - * @param string[] $site_classes Array of class names used within the span tag. Default "site-#" with the site's network ID. + * @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 ''; } else { echo ''; } + echo '' . str_replace( '.' . get_network()->domain, '', $site->domain . $path ) . ''; echo ' '; + $actions = array(); $actions['edit'] = '' . __( 'Edit' ) . '';