| 1 |
<?php |
| 2 |
// adds languages related fields in Edit Category and Edit Tag admin panels |
| 3 |
// unfortunately can't reuse add-term-for.php as WordPress uses here a table instead of div :( |
| 4 |
?> |
| 5 |
<tr class="form-field"> |
| 6 |
<th scope="row" valign="top"><label for="term_lang_choice"><?php _e('Language', 'polylang');?></label></th> |
| 7 |
<td><select name="term_lang_choice" id="term_lang_choice"> |
| 8 |
<option value="0"></option><?php |
| 9 |
foreach ($listlanguages as $language) { |
| 10 |
printf( |
| 11 |
"<option value='%s'%s>%s</option>\n", |
| 12 |
esc_attr($language->term_id), |
| 13 |
$language == $lang ? ' selected="selected"' : '', |
| 14 |
esc_attr($language->name) |
| 15 |
); |
| 16 |
} ?> |
| 17 |
</select><br /> |
| 18 |
<span class="description"><?php _e('Sets the language', 'polylang');?></span></td> |
| 19 |
</tr> |
| 20 |
|
| 21 |
<tr id="term-translations" class="form-field"><?php |
| 22 |
// do not display translation fields if term language is not set |
| 23 |
if ($lang) |
| 24 |
include(POLYLANG_DIR.'/term-translations.php');?> |
| 25 |
</tr> |
| 26 |
|