$result = array
( 'label' =>
__( 'Disk space available to safely perform updates'
),
'status' => 'good',
'badge' => array
( 'label' =>
__( 'Security'
),
'color' => 'blue',
),
'description' =>
sprintf( /* translators: %s: Available disk space in MB or GB. */
'<p>' .
__( '%s available disk space was detected, update routines can be performed safely.'
) . '</p>',
size_format( $available_space ) ),
'actions' => '',
'test' => 'available_updates_disk_space',
);
if ( false ===
$available_space ) { $result['description'
] =
__( 'Could not determine available disk space for updates.'
);
$result['status'
] = 'recommended';
} elseif ( $available_space < 20 * MB_IN_BYTES
) { $result['description'
] =
__( 'Available disk space is critically low, less than 20 MB available. Proceed with caution, updates may fail.'
);
$result['status'
] = 'critical';
}