HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wordpress/wp-content/plugins/hide-my-wp/models/compatibility/Abstract.php
<?php
/**
 * Compatibility Class
 *
 * @file The Abstract Model file
 * @package HMWP/Compatibility/Abstract
 */

defined('ABSPATH') || die('Cheatin\' uh?');

abstract class HMWP_Models_Compatibility_Abstract
{

    public function __construct()
    {
	    if (is_admin() || is_network_admin()) {
			$this->hookAdmin();
	    }else{
		    $this->hookFrontend();
	    }

		if(HMWP_Classes_Tools::isAjax()){
			$this->hookAjax();
		}

	}

	/**
	 * Hook the ajax call
	 * @return void
	 */
	public function hookAjax(){}

	/**
	 * Hook the backend
	 * @return void
	 */
	public function hookAdmin(){}

	/**
	 * Hook the frontend
	 * @return void
	 */
	public function hookFrontend(){}

	/**
	 * Find Replace cache plguins
	 * Stop Buffer from loading
	 *
	 * @param  $content
	 * @return mixed
	 * @throws Exception
	 */
	public function findReplaceCache( $content)
	{

		//if called from cache plugins or hooks, stop the buffer replace
		add_filter('hmwp_process_buffer', '__return_false');

		return HMWP_Classes_ObjController::getClass('HMWP_Models_Rewrite')->find_replace($content);

	}


	/**
	 * Echo the changed HTML buffer
	 * @throws Exception
	 */
	public function findReplaceBuffer()
	{
		//Force to change the URL for xml content types
		$buffer = HMWP_Classes_ObjController::getClass('HMWP_Models_Rewrite')->find_replace(ob_get_contents());

		ob_end_clean();
		echo $buffer;
	}

}