HEX
Server: Apache
System: Linux linplesk41.pumo.com.tw 3.10.0-962.3.2.lve1.5.27.el7.x86_64 #1 SMP Sat Nov 30 02:18:52 EST 2019 x86_64
User: rajlaw (10192)
PHP: 7.4.24
Disabled: phpinfo,passthru,exec,shell_exec,system,popen,proc_open,proc_close,show_source,pcntl_exec,escapeshellcmd,proc_get_status,proc_nice,proc_terminate,escapeshellarg
Upload Files
File: /home/httpd/vhosts/rajlaw.com.tw/httpdocs/wp-content/themes/gutenify-starter/js/admin.js
"use strict";

var _wp = wp,
    apiFetch = _wp.apiFetch;
jQuery(function ($) {
  var gutenify_starterRedirectToKitPage = function gutenify_starterRedirectToKitPage(res) {
    // if( res?.status && 'active' === res.status ) {
    window.location = "".concat(window.gutenify_starter.gutenify_kit_gallery); // }
  }; // Activate Gutenify.


  $(document).on('click', '.gutenify-starter-activate-gutenify', function () {
    $(this).html('<span class="dashicons dashicons-update"></span> Loading...').addClass('gutenify-starter-importing-gutenify');
    apiFetch({
      path: '/wp/v2/plugins/gutenify/gutenify',
      method: 'POST',
      data: {
        "status": "active"
      }
    }).then(function (res) {
      gutenify_starterRedirectToKitPage(res);
    })["catch"](function () {
      gutenify_starterRedirectToKitPage({});
    });
  });
  $(document).on('click', '.gutenify-starter-install-gutenify', function () {
    $(this).html('<span class="dashicons dashicons-update"></span> Loading...').addClass('gutenify-starter-importing-gutenify');
    apiFetch({
      path: '/wp/v2/plugins',
      method: 'POST',
      data: {
        "slug": "gutenify",
        "status": "active"
      }
    }).then(function (res) {
      gutenify_starterRedirectToKitPage(res);
    })["catch"](function () {
      gutenify_starterRedirectToKitPage({});
    });
  });
  $(document).on('click', '.gutenify-starter-admin-notice .notice-dismiss', function () {
    console.log(ajaxurl + "?action=gutenify_starter_hide_theme_info_noticebar");
    apiFetch({
      url: ajaxurl + "?action=gutenify_starter_hide_theme_info_noticebar&gutenify_starter-nonce-name=".concat(window.gutenify_starter.gutenify_starter_nonce),
      method: 'POST'
    }).then(function (res) {
      console.log(res);
    })["catch"](function (res) {
      console.log(res);
    });
  });
});