ControlledChaos
3/28/2016 - 6:40 PM

Gray out inactive WordPress plugin details on the Plugins page. Add green and red hover colors to activate, deactivate and delete links.

Gray out inactive WordPress plugin details on the Plugins page. Add green and red hover colors to activate, deactivate and delete links.

<?php
// For use in a plugin
function ccd_gray_deactivated_plugins() {
  wp_register_style( 'gray-deactivated-plugins', plugins_url('gray-deactivated-plugins.css', __FILE__) );
  wp_enqueue_style( 'gray-deactivated-plugins' );
}
add_action( 'admin_enqueue_scripts', 'ccd_gray_deactivated_plugins' );

?>
/*
 * Plugins page
 */

.plugins tr.inactive *,
.plugins a.delete,
.row-actions span.delete a {
	background: #f3f3f3;
	color: #777777;
}

.plugins tr.inactive .activate a:hover {
	color: #76a91d;
}

.plugins tr.active .deactivate a:hover,
.plugins tr.inactive .delete a:hover {
	color: #aa0000;
}

.plugins a.delete:hover,
.row-actions span.delete a:hover {
	color: #aa0000 !important;
}

Gray Out Deactivated Plugins

WordPress Snippet