ms_user_list_site_class хук-фильтрWP 5.2.0

Filters the span class for a site listing on the mulisite user list table.

Использование

add_filter( 'ms_user_list_site_class', 'wp_kama_ms_user_list_site_class_filter', 10, 4 );

/**
 * Function for `ms_user_list_site_class` filter-hook.
 * 
 * @param string[] $site_classes Array of class names used within the span tag. 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.
 *
 * @return string[]
 */
function wp_kama_ms_user_list_site_class_filter( $site_classes, $site_id, $network_id, $user ){

	// filter...
	return $site_classes;
}
$site_classes(string[])
Array of class names used within the span tag. with the site's network ID.
По умолчанию: "site-#"
$site_id(int)
Site ID.
$network_id(int)
Network ID.
$user(WP_User)
WP_User object.

Список изменений

С версии 5.2.0 Введена.

Где вызывается хук

WP_MS_Users_List_Table::column_blogs()
ms_user_list_site_class
wp-admin/includes/class-wp-ms-users-list-table.php 390
$site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $site->userblog_id, $site->site_id, $user );

Где используется хук в WordPress

Использование не найдено.