HEX
Server: LiteSpeed
System: Linux server257.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: salhiscp (12590)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: //home/salhiscp/public_html/wp-content/themes/astra/inc/assets/js/custom-fields-priority.js
/**
 * custom-fields-priority.js
 *
 * Provide more preferences to Astra meta setting so wordpress custom field not causing any kind of conflicts.
 *
 * @package Astra
 */
function removeMetaBoxSection() {
	document.getElementById("the-list").remove();
}

function buttonClickEvent() {
	[...document.querySelectorAll('.editor-post-publish-button')].forEach(element => element.addEventListener('click', function (event) {
		removeMetaBoxSection();

	}));

	[...document.querySelectorAll('.editor-post-publish-panel__toggle')].forEach(element => element.addEventListener('click', function (event) {
		removeMetaBoxSection();
	}));
}

function DOMContentLoaded() {
	const elementMetaBox = document.getElementById("the-list");
	if (elementMetaBox != null) {
		setTimeout(buttonClickEvent, 2000);
	}
}

document.addEventListener('DOMContentLoaded', DOMContentLoaded, false);