function icl_st_render_option_writes($option_name, $option_value, $option_key = '') { $has_translations = ''; if (is_array($option_value) || is_object($option_value)) { echo '<h4><a class="icl_stow_toggler" href="#">- ' . $option_name . '</a></h4>'; echo '<ul class="icl_st_option_writes">'; foreach ($option_value as $key => $value) { echo '<li>'; icl_st_render_option_writes($key, $value, $option_key . '[' . $option_name . ']'); echo '</li>'; } echo '</ul>'; } elseif (is_string($option_value) || is_numeric($option_value)) { if (icl_st_is_registered_string('admin_texts_theme_' . get_option('template'), $option_key . $option_name)) { $checked = ' checked="checked"'; if (icl_st_string_has_translations('admin_texts_theme_' . get_option('template'), $option_key . $option_name)) { $has_translations = ' class="icl_st_has_translations"'; } else { $has_translations = ''; } } else { $checked = ''; } if (is_numeric($option_value)) { $class = 'icl_st_numeric'; } else { $class = 'icl_st_string'; } global $iclTranslationManagement; $int = preg_match_all('#\\[([^\\]]+)\\]#', $option_key . '[' . $option_name . ']', $matches); $_v = $iclTranslationManagement->admin_texts_to_translate; if ($int) { foreach ($matches[1] as $m) { if (isset($_v[$m])) { $_v = $_v[$m]; } else { $_v = 0; break; } } } if ($_v) { $disabled = ' disabled="disabled"'; } else { $disabled = ''; } echo '<div class="icl_st_admin_string ' . $class . '">'; echo '<input' . $disabled . ' type="hidden" name="icl_admin_options' . $option_key . '[' . $option_name . ']" value="" />'; echo '<input' . $disabled . $has_translations . ' type="checkbox" name="icl_admin_options' . $option_key . '[' . $option_name . ']" value="' . htmlspecialchars($option_value) . '" ' . $checked . ' />'; echo '<input type="text" readonly="readonly" value="' . $option_name . '" size="32" />'; echo '<input type="text" value="' . htmlspecialchars($option_value) . '" readonly="readonly" size="48" />'; //echo '<br /><input type="text" size="100" value="icl_admin_options'.$option_key.'['.$option_name.']" />'; echo '</div><br clear="all" />'; } }
?> " /> <img class="ajax_loader" src="<?php echo WPML_ST_URL; ?> /res/img/ajax-loader.gif" style="display:none" width="16" height="16" /> </p> <p id="icl_st_ow_export_out"></p> <form name="icl_st_option_writes_form" id="icl_st_option_write_form"> <?php foreach ($troptions as $option_name => $option_value) { ?> <?php echo icl_st_render_option_writes($option_name, $option_value); ?> <br clear="all" /> <?php } ?> <span id="icl_st_options_write_success" class="hidden updated message fade"><?php printf(__('The selected strings can now be translated using the <a%s>string translation</a> screen', 'wpml-string-translation'), ' href="admin.php?page=' . WPML_ST_FOLDER . '/menu/string-translation.php&context=admin_texts_theme_' . get_option('template') . '"'); ?> </span> <span id="icl_st_options_write_confirm" class="hidden"><?php _e('You have removed some of the texts that are translated already. The translations will be lost.', 'wpml-string-translation'); ?> </span> <p class="submit">