https://t.me/AnonymousX5
Server : LiteSpeed
System : Linux server354.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User : getfsxkz ( 1681)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/getfsxkz/theaztech.org/wp-content/plugins/extendify/src/PageCreator/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/getfsxkz/theaztech.org/wp-content/plugins/extendify/src/PageCreator/lib/processPatterns.js
import { processPlaceholders } from '@page-creator/api/WPApi';
import { getActivePlugins } from '@page-creator/api/WPApi';
import { recordPluginActivity } from '@shared/api/DataApi';

export const processPatterns = async (patterns) => {
	const maxAttempts = 3;
	const delay = 1000; // 1 second delay between retries

	const activePlugins =
		(await getActivePlugins())?.data?.map((path) => path.split('/')[0]) || [];

	const pluginsActivity = patterns
		.filter((p) => p.pluginDependency)
		.map((p) => p.pluginDependency)
		.filter((p) => !activePlugins.includes(p));

	for (const plugin of pluginsActivity) {
		recordPluginActivity({
			slug: plugin,
			source: 'page-creator',
		});
	}

	for (let attempt = 1; attempt <= maxAttempts; attempt++) {
		try {
			return await processPlaceholders(patterns);
		} catch (error) {
			if (attempt === maxAttempts) {
				console.error(
					`Failed to process patterns after ${maxAttempts} attempts:`,
					error,
				);
				return patterns;
			}
			await new Promise((resolve) => setTimeout(resolve, delay));
		}
	}
};

https://t.me/AnonymousX5 - 2025