I complete the file :
<?php function restore_lost_capabilities() {
global $wp_roles;
$caps_to_restore = [
'NextGEN Gallery overview',
'NextGEN Use TinyMCE',
'NextGEN Upload images',
'NextGEN Manage gallery',
'NextGEN Manage others gallery',
'NextGEN Manage tags',
'NextGEN Edit album',
'NextGEN Change style',
'NextGEN Change options',
'NextGEN Attach Interface',
'tablepress Access about screen',
'tablepress Access options screen',
'tablepress Add tables',
'tablepress Copy tables',
'tablepress Delete tables',
'tablepress Edit options',
'tablepress Edit tables',
'tablepress Export tables',
'tablepress Import tables',
'tablepress Import tables wptr',
'tablepress List tables'
];
$role = $wp_roles->get_role('administrator');
foreach($caps_to_restore as $cap) {
if (!$role->has_cap($cap)) {
$role->add_cap($cap, true);
}
}
}
add_action('admin_init', 'restore_lost_capabilities');
?>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
It appears in capabilities custom but the plugin is not back.