403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.139.234.68
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/HelpCenter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/cynthiaadediran.com/wp-content/plugins/extendify/src/HelpCenter//buttons.js
import { useEffect } from '@wordpress/element';
import { registerPlugin } from '@wordpress/plugins';
import { AdminBar } from '@help-center/components/buttons/AdminBar';
import { render, isOnLaunch } from '@help-center/lib/utils';
import { PostEditor } from './components/buttons/PostEditor';

// Global toolbar
(() => {
	if (isOnLaunch()) return;
	const id = 'wp-admin-bar-help-center-btn';
	if (document.getElementById(id)) return;
	const helpCenter = Object.assign(document.createElement('li'), {
		className: 'extendify-help-center',
		id,
	});
	document.querySelector('#wp-admin-bar-my-account')?.after(helpCenter);
	render(<AdminBar />, helpCenter);
})();

// In editor
registerPlugin('extendify-help-center-buttons', {
	render: () => <HelpCenterButton />,
});
const HelpCenterButton = () => {
	useEffect(() => {
		if (isOnLaunch()) return;
		const id = 'extendify-gtnbrg-help-center-btn';
		if (document.getElementById(id)) return;

		const helpCenter = Object.assign(document.createElement('span'), {
			className: 'extendify-help-center',
			id,
		});
		requestAnimationFrame(() => {
			requestAnimationFrame(() => {
				if (document.getElementById(id)) return;
				const page = '[aria-controls="edit-post:document"]';
				const fse = '[aria-controls="edit-site:template"]';
				document.querySelector(page)?.after(helpCenter);
				document.querySelector(fse)?.after(helpCenter);
				render(<PostEditor />, helpCenter);
			});
		});
	}, []);
	return null;
};

Youez - 2016 - github.com/yon3zu
LinuXploit