manage_sites_action_links хук-фильтрWP 3.1.0

Filters the action links displayed for each site in the Sites list table.

The 'Edit', 'Dashboard', 'Delete', and 'Visit' links are displayed by default for each site. The site's status determines whether to show the 'Activate' or 'Deactivate' link, 'Unarchive' or 'Archive' links, and 'Not Spam' or 'Spam' link for each site.

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

add_filter( 'manage_sites_action_links', 'wp_kama_manage_sites_action_links_filter', 10, 3 );

/**
 * Function for `manage_sites_action_links` filter-hook.
 * 
 * @param string[] $actions  An array of action links to be displayed.
 * @param int      $blog_id  The site ID.
 * @param string   $blogname Site path, formatted depending on whether it is a sub-domain or subdirectory multisite installation.
 *
 * @return string[]
 */
function wp_kama_manage_sites_action_links_filter( $actions, $blog_id, $blogname ){

	// filter...
	return $actions;
}
$actions(string[])
An array of action links to be displayed.
$blog_id(int)
The site ID.
$blogname(строка)
Site path, formatted depending on whether it is a sub-domain or subdirectory multisite installation.

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

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

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

WP_MS_Sites_List_Table::handle_row_actions()
manage_sites_action_links
wp-admin/includes/class-wp-ms-sites-list-table.php 745
$actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname );

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

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