HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux sci 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: tpdc (1002)
PHP: 7.4.3-4ubuntu2.29
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/nsci/wp-content/plugins/penci-shortcodes/optimize/html.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // No direct access, please.
}

// Developed based on https://wordpress.org/plugins/wp-html-compression/ plugin

$penci_html_compression_run = false;


function penci_speed_do_minify_html(){

	if( get_theme_mod( 'penci_speed_html_minify' ) && ! current_user_can( 'manage_options' ) ){

		// Don't run lib for AMP pages
		if( ( function_exists( 'is_penci_amp' ) && is_penci_amp() ) || ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) ){
			return;
		}

		// Include libs
		if( ! class_exists( 'HTML_Minify' ) ){
			require_once( 'libs/html-minify.php' );
		}

		global $penci_html_compression_run;

		if ( ! $penci_html_compression_run ){
			$penci_html_compression_run = true;

			// "Humans TXT" plugin support
			$is_humans = ( !function_exists('is_humans') ) ? false : is_humans();

			if ( ! $is_humans && ! is_feed() && ! is_robots() ){
				ob_start('html_minify_buffer');
			}
		}
	}
}

// Hook - don't running hooks when wp_html_compression_start included: https://gist.github.com/sethbergman/d07e879200bef6862131
if ( ! is_admin() && ! function_exists( 'wp_html_compression_start' ) ){
	add_action('template_redirect', 'penci_speed_do_minify_html', -1 );
	add_action('get_header', 'penci_speed_do_minify_html');
}