1var otgs_wp_installer_recommended_plugin = { 2 3 init: function () { 4 jQuery('.js-install-recommended').click(otgs_wp_installer_recommended_plugin.install_and_activate); 5 }, 6 7 install_and_activate: function () { 8 var pluginElement = jQuery(this).parent(); 9 var activate = 1; 10 var data = { 11 action: 'installer_download_plugin', 12 data: jQuery(this).val(), 13 activate: activate 14 }; 15 16 var spinner = pluginElement.find('.spinner'); 17 18 spinner.css('visibility', 'visible'); 19 jQuery.ajax({ 20 url: ajaxurl, 21 type: 'POST', 22 dataType: 'json', 23 data: data, 24 success: function (ret) { 25 jQuery.ajax({ 26 url: ajaxurl, 27 type: 'POST', 28 dataType: 'json', 29 data: { 30 action: 'installer_activate_plugin', 31 plugin_id: ret.plugin_id, 32 nonce: ret.nonce 33 }, 34 success: function (ret) { 35 jQuery.ajax({ 36 url: ajaxurl, 37 type: 'POST', 38 dataType: 'json', 39 data: { 40 action: 'installer_recommendation_success', 41 pluginData: pluginElement.find('#originalPluginData').val(), 42 nonce: pluginElement.find('#recommendation_success_nonce').val() 43 }, 44 success: 45 function () { 46 location.reload(); 47 } 48 }); 49 } 50 }); 51 } 52 }); 53 54 return false; 55 } 56}; 57 58jQuery(document).ready(otgs_wp_installer_recommended_plugin.init);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.