_security_page_action_links( array $actions, string $plugin_file, array $plugin_data, string $context )
Plugin action links filter for Security page.
Parameters
- $actions
-
(Required) An array of plugin action links. By default this can include 'activate', 'deactivate', and 'delete'. With Multisite active this can also include 'network_active' and 'network_only' items.
- $plugin_file
-
(Required) Path to the plugin file relative to the plugins directory.
- $plugin_data
-
(Required) An array of plugin data. See
get_plugin_data()
. - $context
-
(Required) The plugin context. By default this can include 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
Source
File: wp-admin/includes/plugin.php
function _security_page_action_links( $actions, $plugin_file, $plugin_data, $context ) {
if ( current_user_can( 'manage_options' ) ) {
$admin_url = ( is_network_admin() )
? network_admin_url( 'security.php' )
: admin_url( 'security.php' );
$parts = explode( '/', $plugin_file );
array_unshift(
$actions,
sprintf(
'<a href="%s?page=%s" title="%s"><span class="dashicon dashicons-shield"></span></a>',
$admin_url,
$parts[0],
__( 'Security' )
)
);
}
return $actions;
}