Save form defaults or recommended values.

Paramètres

array $element: Form element or child element.

Return value

array An array of form names and the recommended value for that setting.

2 calls to advagg_find_all_recommended_admin_values()
advagg_critical_css_admin_settings_form_submit dans advagg_critical_css/advagg_critical_css.admin.inc
Submit callback, process the advagg_critical_css form.
advagg_set_admin_form_defaults_recommended dans ./advagg.module
Save form defaults or recommended values.

Fichier

./advagg.module, line 6769

Code

function advagg_find_all_recommended_admin_values(array &$element, $key_name = '#recommended_value') {
    $results = array();
    $children = element_children($element);
    foreach ($children as $key) {
        $child = $element[$key];
        if (is_array($child)) {
            if (!empty($child['#type']) && !empty($child['#name']) && isset($child[$key_name])) {
                $results[$child['#name']] = $child[$key_name];
            }
            $results = array_merge($results, advagg_find_all_recommended_admin_values($child, $key_name));
        }
        unset($child);
    }
    return $results;
}