Filter hook 'manage_sites_action_links'

in WP Core File wp-admin/includes/class-wp-ms-sites-list-table.php at line 859

View Source

manage_sites_action_links

Filter Hook
Description
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.

Hook Information

File Location wp-admin/includes/class-wp-ms-sites-list-table.php View on GitHub
Hook Type Filter
Line Number 859

Hook Parameters

Type Name Description
string[] $actions An array of action links to be displayed.
int $blog_id The site ID.
string $blogname Site path, formatted depending on whether it is a sub-domain or subdirectory multisite installation.

Usage Examples

Basic Usage
<?php
// Hook into manage_sites_action_links
add_filter('manage_sites_action_links', 'my_custom_filter', 10, 3);

function my_custom_filter($actions, $blog_id, $blogname) {
    // Your custom filtering logic here
    return $actions;
}

Source Code Context

wp-admin/includes/class-wp-ms-sites-list-table.php:859 - How this hook is used in WordPress core
<?php
 854  		 * @param string[] $actions  An array of action links to be displayed.
 855  		 * @param int      $blog_id  The site ID.
 856  		 * @param string   $blogname Site path, formatted depending on whether it is a sub-domain
 857  		 *                           or subdirectory multisite installation.
 858  		 */
 859  		$actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname );
 860  
 861  		return $this->row_actions( $actions );
 862  	}
 863  }

PHP Documentation

<?php
/**
		 * 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.
		 *
		 * @since 3.1.0
		 *
		 * @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.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-admin/includes/class-wp-ms-sites-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.