'ajax-extend' allows you call functions, a function in one plugin or a function you write or even a core wordpress function, via Ajax, in th …
Puanlar
Son güncellenme
August 20, 2011
Sürüm
1.0

ajax-extend allows you call functions, a function in one plugin or a function you write or even a core wordpress function, via Ajax, in the easiest way.

Example: The javascript code:

$j.ajax( { url : home_url, type : 'POST', dataType : 'html', data : { 'ajax_extend_mark' : 1, /* this is indispensable if you want ajax-extend to call the function you need. */ 'ajax_extend_action' : 'my_function', /* the function name (a WP core function, or a function in one plugin. any functions loaded by wp()) */ 'name' : 'sunjianle', }, success : function(data, textStatus, errorThron) { alert(data); } });

The background PHP code:

function my_function() { $name = $_POST["name"]; echo "Hello, " . $name; global $wpdb; $query_sql = "select user_login from wp_users limit 0,10"; $users = $wpdb->get_results($wpdb->prepare($query_sql)); foreach($users as $user){ echo $users->user_login; } }
ÜcretsizCreator paketinde
Yükleme işlemini tamamlayarak, WordPress.com'un Hizmet Şartları ile Üçüncü Taraf Eklenti Şartlarını kabul etmiş olursunuz.
Test edilen son sürüm
3.2.1
Bu eklenti, WordPress tarafından barındırılan kurulumunuzda kullanılmak üzere indirilebilir.