function _simpleads_show_field in SimpleAds 7
Helper function. Show field in simpleads node form if other module is enabled. See hook_simpleads_form().
Parameters
string $field_name:
1 call to _simpleads_show_field()
- simpleads_campaigns_enable in modules/
simpleads_campaigns/ simpleads_campaigns.install - Implements hook_enable().
File
- includes/
simpleads.helper.inc, line 467 - SimpleAds Helper functions.
Code
function _simpleads_show_field($field_name) {
$fields_to_hide = variable_get('simpleads_form_alter', array());
$new_array = array();
if (count($fields_to_hide)) {
foreach ($fields_to_hide as $field) {
if ($field != $field_name) {
$new_array[$field] = $field;
}
}
}
variable_set('simpleads_form_alter', $new_array);
}