Uname: Linux webm021.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
Software: Apache
PHP version: 5.4.45 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.91.62
Your Ip: 216.73.216.52
User: matthif (139342) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : link-rel.js
import { addFilter } from '@wordpress/hooks';

const NOOPENER_DEFAULT = 'noopener noreferrer';

addFilter(
	'vpf.editor.controls-on-change',
	'vpf/editor/controls-on-change/link-rel',
	(newAttributes, control, val, attributes) => {
		if (control.name === 'items_click_action_url_target') {
			if (val === '_blank' && !attributes.items_click_action_url_rel) {
				newAttributes.items_click_action_url_rel = NOOPENER_DEFAULT;
			}
			if (
				val !== '_blank' &&
				NOOPENER_DEFAULT === attributes.items_click_action_url_rel
			) {
				newAttributes.items_click_action_url_rel = '';
			}
		}

		return newAttributes;
	}
);
© 2026 XylotrechusZ