HEX
Server: Apache
System: Linux webm020.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: bohousj (181416)
PHP: 8.4.22
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/bohousj/www/wp-content/plugins/elementor-pro/core/app/assets/js/hooks/use-feature-lock.js
import ConnectButtonUI from '../ui/connect-button';
import { htmlDecodeTextContent, replaceUtmPlaceholders } from '../utils';

export default function useFeatureLock( featureName ) {
	const appConfig = elementorAppProConfig[ featureName ] ?? {},
		isLocked = appConfig.lock?.is_locked ?? false;

	const buttonText = htmlDecodeTextContent( appConfig.lock?.button.text );
	const buttonLink = replaceUtmPlaceholders(
		appConfig.lock?.button.url ?? '',
		appConfig.utms ?? {},
	);

	const ConnectButton = () => (
		<ConnectButtonUI text={ buttonText } url={ buttonLink } />
	);

	return {
		isLocked,
		ConnectButton,
	};
}