PluginProbe
Polylang / 0.3
Polylang v0.3
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 / admin.js

admin.js in Polylang 0.3, at admin.js

31 lines 810 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(document).ready(function($) {
2
3 // ajax for post metabox
4 jQuery('#post_lang_choice').change( function() {
5 var data = {
6 action: 'post_lang_choice',
7 lang: jQuery(this).attr('value'),
8 post_id: jQuery('#post_ID').attr('value')
9 }
10
11 jQuery.post(ajaxurl, data , function(response) {
12 jQuery("#post-translations").html(response);
13 });
14 })
15
16 // ajax for term edit
17 jQuery('#term_lang_choice').change( function() {
18 var data = {
19 action: 'term_lang_choice',
20 lang: jQuery(this).attr('value'),
21 term_id: jQuery("input[name='tag_ID']").attr('value'),
22 taxonomy: jQuery("input[name='taxonomy']").attr('value')
23 }
24
25 jQuery.post(ajaxurl, data, function(response) {
26 jQuery("#term-translations").html(response);
27 });
28 })
29
30 });
31