function _node_revision_delete_time_string in Node Revision Delete 7.3
Return the time string for the config_name parameter.
Parameters
string $config_name: The config name.
int $number: The number for the $config_name parameter configuration.
Return value
string The time string for the $config_name parameter.
2 calls to _node_revision_delete_time_string()
- node_revision_delete_admin_settings_form in ./
node_revision_delete.admin.inc - Form constructor for Node Revision Delete administration form.
- node_revision_delete_form_node_type_form_alter in ./
node_revision_delete.module - Implements hook_form_BASE_FORM_ID_alter().
File
- ./
node_revision_delete.helpers.inc, line 115 - Helper functions.
Code
function _node_revision_delete_time_string($config_name, $number) {
$config_name_time = variable_get('node_revision_delete_' . $config_name . '_time');
// Is singular or plural?
$time = _node_revision_delete_time_number_string($number, $config_name_time['time']);
// Return the time string for the $config_name parameter.
switch ($config_name) {
case 'minimum_age_to_delete':
return t('@number @time', array(
'@number' => $number,
'@time' => $time,
));
case 'when_to_delete':
return t('After @number @time of inactivity', array(
'@number' => $number,
'@time' => $time,
));
}
}