HEX
Server: Apache
System: Linux hvh16.mirohost.net 6.14.0-29-generic #29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Aug 14 16:52:50 UTC 2 x86_64
User: likoholding (1037)
PHP: 7.3.33-25+0~20250707.133+debian12~1.gbp70fb14
Disabled: apache_child_terminate, dl, exec, imap_body, imap_createmailbox, imap_deletemailbox, imap_list, imap_open, imap_renamemailbox, inject_code, mb_send_mail, passthru, pcntl_alarm, pcntl_async_signals, pcntl_errno, pcntl_exec, pcntl_fork, pcntl_get_last_error, pcntl_getpriority, pcntl_setpriority, pcntl_signal, pcntl_signal_dispatch, pcntl_signal_get_handler, pcntl_sigprocmask, pcntl_sigtimedwait, pcntl_sigwaitinfo, pcntl_strerror, pcntl_wait, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifcontinued, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, set_time_limit, shell_exec, symlink, system
Upload Files
File: /var/www/likoholding/liko-holding.com.ua/wp-content/plugins/wp-fastest-cache/inc/admin-toolbar.php
<?php
	class WpFastestCacheAdminToolbar{
		public function __construct(){}

		public function add(){
			if(is_admin()){
				add_action('wp_before_admin_bar_render', array($this, "wpfc_tweaked_toolbar_on_admin_panel"));
				add_action('admin_enqueue_scripts', array($this, 'load_toolbar_js'));
				add_action('admin_enqueue_scripts', array($this, 'load_toolbar_css'));
			}else{
				if(is_admin_bar_showing()){
					add_action('wp_before_admin_bar_render', array($this, "wpfc_tweaked_toolbar_on_frontpage"));
					add_action('wp_enqueue_scripts', array($this, 'load_toolbar_js'));
					add_action('wp_enqueue_scripts', array($this, 'load_toolbar_css'));
					add_action('wp_footer', array($this, 'print_my_inline_script'));
				}
			}
		}

		public function load_toolbar_js(){
			wp_enqueue_script("wpfc-toolbar", plugins_url("wp-fastest-cache/js/toolbar.js"), array(), time(), true);
		}

		public function load_toolbar_css(){
			wp_enqueue_style("wp-fastest-cache-toolbar", plugins_url("wp-fastest-cache/css/toolbar.css"), array(), time(), "all");
		}

		public function print_my_inline_script() {
			?>
			<script type="text/javascript">var wpfc_ajaxurl = "<?php echo admin_url( 'admin-ajax.php' );?>";</script>
			<?php
		}

		public function wpfc_tweaked_toolbar_on_frontpage() {
			global $wp_admin_bar;

			$wp_admin_bar->add_node(array(
				'id'    => 'wpfc-toolbar-parent',
				'title' => 'Clear Cache'
			));

			$wp_admin_bar->add_menu( array(
				'id'    => 'wpfc-toolbar-parent-clear-cache-of-this-page',
				'title' => 'Clear Cache of This Page',
				'parent'=> 'wpfc-toolbar-parent',
				'meta' => array("class" => "wpfc-toolbar-child")
			));

			$wp_admin_bar->add_menu( array(
				'id'    => 'wpfc-toolbar-parent-delete-cache',
				'title' => 'Delete Cache',
				'parent'=> 'wpfc-toolbar-parent',
				'meta' => array("class" => "wpfc-toolbar-child")
			));

			$wp_admin_bar->add_menu( array(
				'id'    => 'wpfc-toolbar-parent-delete-cache-and-minified',
				'title' => 'Delete Cache and Minified CSS/JS',
				'parent'=> 'wpfc-toolbar-parent',
				'meta' => array("class" => "wpfc-toolbar-child")
			));
		}

		public function wpfc_tweaked_toolbar_on_admin_panel() {
			global $wp_admin_bar;

			$wp_admin_bar->add_node(array(
				'id'    => 'wpfc-toolbar-parent',
				'title' => 'Clear Cache'
			));

			$wp_admin_bar->add_menu( array(
				'id'    => 'wpfc-toolbar-parent-delete-cache',
				'title' => 'Delete Cache',
				'parent'=> 'wpfc-toolbar-parent',
				'meta' => array("class" => "wpfc-toolbar-child")
			));

			$wp_admin_bar->add_menu( array(
				'id'    => 'wpfc-toolbar-parent-delete-cache-and-minified',
				'title' => 'Delete Cache and Minified CSS/JS',
				'parent'=> 'wpfc-toolbar-parent',
				'meta' => array("class" => "wpfc-toolbar-child")
			));
		}
	}
?>