function acf_translate_field_group($field_group) { // vars $l10n = acf_get_setting('l10n'); $l10n_textdomain = acf_get_setting('l10n_textdomain'); // if if ($l10n && $l10n_textdomain) { // translate $field_group['title'] = acf_translate($field_group['title']); // filters $field_group = apply_filters("acf/translate_field_group", $field_group); } // return return $field_group; }
function acf_translate_field($field) { // vars $l10n = acf_get_setting('l10n'); $l10n_textdomain = acf_get_setting('l10n_textdomain'); // if if ($l10n && $l10n_textdomain) { // translate $field['label'] = acf_translate($field['label']); $field['instructions'] = acf_translate($field['instructions']); // filters $field = apply_filters("acf/translate_field", $field); $field = apply_filters("acf/translate_field/type={$field['type']}", $field); } // return return $field; }
function acf_translate_keys($array, $keys) { // bail early if no keys if (empty($keys)) { return $array; } // translate foreach ($keys as $k) { // bail ealry if not exists if (!isset($array[$k])) { continue; } // translate $array[$k] = acf_translate($array[$k]); } // return return $array; }
function translate_field($field) { // translate $field['message'] = acf_translate($field['message']); // return return $field; }
function translate_field($field) { // translate $field['choices'] = acf_translate($field['choices']); // return return $field; }
function translate_field($field) { // translate $field['button_label'] = acf_translate($field['button_label']); // return return $field; }