PluginProbe
Hostinger Tools / 2.0.6
Hostinger Tools v2.0.6
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
hostinger / src / js / autocomplete_steps.js

autocomplete_steps.js in Hostinger Tools 2.0.6, at src/js/autocomplete_steps.js

62 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function ($) {
2
3 $(document).on('ready', function () {
4 function getParams(actionName) {
5 return {
6 type: 'post',
7 url: ajaxurl,
8 data: {
9 'action': 'hostinger_identify_action',
10 'action_name': actionName
11 },
12 dataType: 'json'
13 };
14 }
15
16 const onboardingSteps = [
17 {
18 'event': 'click',
19 'element': '#customize-control-custom_logo .button-add-media',
20 'action': 'logo_upload',
21 },
22 {
23 'event': 'click',
24 'element': '#wp-media-grid .page-title-action, #file-form #plupload-browse-button',
25 'action': 'image_upload',
26 },
27 { 'event': 'input',
28 'element': '#_customize-input-blogname',
29 'action': 'edit_site_title',
30 },
31 { 'event': 'click',
32 'element': '#menu-settings .wp-has-submenu, #menu-settings.wp-has-submenu .wp-submenu .wp-first-item .wp-first-item',
33 'action': 'edit_site_title',
34 },
35 { 'event': 'click',
36 'element': '.hsr-onboarding-step.edit_description .hsr-btn.hsr-primary-btn,.post-type-post .postbox-container #publish, .post-type-post #the-list .row-title, .post-type-post #the-list .row-actions .edit a',
37 'action': 'edit_description',
38 },
39 { 'event': 'click',
40 'element': '#wp-admin-bar-new-post,.wp-admin.post-type-post .wrap .page-title-action, #hst-add_post',
41 'action': 'add_post',
42 },
43 { 'event': 'click',
44 'element': '#wp-admin-bar-new-page, .wp-admin.post-type-page .wrap .page-title-action, #hst-add_page',
45 'action': 'add_page',
46 },
47 { 'event': 'click',
48 'element': '.post-type-product #posts-filter .woocommerce-BlankState-cta.button-primary, .post-type-product .wrap .page-title-action',
49 'action': 'add_product',
50 },
51 ];
52
53 onboardingSteps.forEach(step => {
54 $(document).on(step.event, step.element, () => {
55 $.ajax(getParams(step.action));
56 });
57 });
58
59 });
60
61 })(jQuery);
62