Saving wordpress settings api options with ajax,
问题 I have been wrestling with this problem for quite some time now. I have an options page for a theme, and a single option registered. I have been trying to get the option updated via ajax every time a user presses the save button, here is my code. JS: function save_main_options_ajax() { $('.main-options-form').submit( function () { var b = $(this).serialize(), optdata = { action : "wp_ajax_main_options_save", data: b }; $.post( ajaxurl, b, function (response) { if (response == 1 ) { alert(