PluginProbe
Polylang / 0.5
Polylang v0.5
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
polylang / include / edit-term-form.php

edit-term-form.php in Polylang 0.5, at include/edit-term-form.php

27 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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"><?php
8 if (PLL_DISPLAY_ALL) // for those who want undefined language
9 echo '<option value="0"></option>';
10 foreach ($listlanguages as $language) {
11 printf(
12 "<option value='%s'%s>%s</option>\n",
13 esc_attr($language->term_id),
14 $language == $lang ? ' selected="selected"' : '',
15 esc_html($language->name)
16 );
17 } ?>
18 </select><br />
19 <span class="description"><?php _e('Sets the language', 'polylang');?></span></td>
20 </tr>
21
22 <tr id="term-translations" class="form-field"><?php
23 // do not display translation fields if term language is not set (possible if PLL_DISPLAY_ALL == true)
24 if ($lang)
25 include(PLL_INC.'/term-translations.php');?>
26 </tr>
27