Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 18.216.32.251
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/cynthiaadediran.com/wp-content/plugins/extendify/src/Library/util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/cynthiaadediran.com/wp-content/plugins/extendify/src/Library/util/css.js
import apiFetch from '@wordpress/api-fetch';

// Add required rules here and they will be checked in Launch
// previews and added to Additional CSS
export const requiredCSSVars = {
	'--wp--preset--spacing--30': 'clamp(1.5rem, 5vw, 2rem)',
	'--wp--preset--spacing--40':
		'clamp(1.8rem, 1.8rem + ((1vw - 0.48rem) * 2.885), 3rem)',
	'--wp--preset--spacing--50': 'clamp(2.5rem, 8vw, 4rem)',
	'--wp--preset--spacing--60': 'clamp(2.5rem, 8vw, 6rem)',
	'--wp--preset--spacing--70': 'clamp(3.75rem, 10vw, 7rem)',
	'--wp--preset--spacing--80':
		'clamp(5rem, 5.25rem + ((1vw - 0.48rem) * 9.096), 8rem)',
};

export const addGlobalCSS = async (missingCSSVars) => {
	const id = window.extSharedData.globalStylesPostID;
	const { styles, settings } = await apiFetch({
		path: `/wp/v2/global-styles/${id}`,
	});
	// If any of the rules are already in the CSS, don't add them
	missingCSSVars = missingCSSVars.filter(
		(key) => !styles?.css?.includes(`${key}:`),
	);
	if (!missingCSSVars.length) return;
	const missingCSSVarsString =
		missingCSSVars.reduce((acc, key) => {
			acc += `${key}: ${requiredCSSVars[key]};\n`;
			return acc;
		}, ':root {\n') + '\n}';
	apiFetch({
		path: `/wp/v2/global-styles/${id}`,
		method: 'PATCH',
		data: {
			id,
			settings,
			styles: {
				...styles,
				css:
					// Preserve the existing css
					(styles?.css ?? '') +
					(styles?.css ? '\n' : '') +
					missingCSSVarsString,
			},
		},
	});
};

Youez - 2016 - github.com/yon3zu
LinuXploit