Skip to content

Commit

Permalink
Docs: Fix typo in the ms_user_list_site_class filter description.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SergeyBiryukov committed Nov 15, 2023
1 parent 6456e6e commit 0b8ca16
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/wp-admin/includes/class-wp-ms-users-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<span class="' . esc_attr( implode( ' ', $site_classes ) ) . '">';
} else {
echo '<span>';
}

echo '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $site->userblog_id ) ) . '">' . str_replace( '.' . get_network()->domain, '', $site->domain . $path ) . '</a>';
echo ' <small class="row-actions">';

$actions = array();
$actions['edit'] = '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $site->userblog_id ) ) . '">' . __( 'Edit' ) . '</a>';

Expand Down

0 comments on commit 0b8ca16

Please sign in to comment.