HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/wp-content/plugins/insert-headers-and-footers/includes/global-output.php
<?php
/**
 * Add hooks to output global scripts.
 *
 * @package WPCode
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

add_action( 'wp_head', 'wpcode_global_frontend_header' );
add_action( 'wp_footer', 'wpcode_global_frontend_footer' );
add_action( 'wp_body_open', 'wpcode_global_frontend_body', 1 );

/**
 * Output the frontend head scripts.
 *
 * @return void
 */
function wpcode_global_frontend_header() {
	// Filter to prevent specific header output.
	if ( apply_filters( 'disable_ihaf_header', false ) ) {
		return;
	}
	wpcode_global_script_output( 'ihaf_insert_header' );
}

/**
 * Output the frontend footer scripts.
 *
 * @return void
 */
function wpcode_global_frontend_footer() {
	// Filter to prevent specific footer output.
	if ( apply_filters( 'disable_ihaf_footer', false ) ) {
		return;
	}
	wpcode_global_script_output( 'ihaf_insert_footer' );
}

/**
 * Output the frontend body scripts.
 *
 * @return void
 */
function wpcode_global_frontend_body() {
	// Filter to prevent specific body output.
	if ( apply_filters( 'disable_ihaf_body', false ) ) {
		return;
	}
	wpcode_global_script_output( 'ihaf_insert_body' );
}

/**
 * Output everything through this function to get a chance to apply some checks.
 *
 * @param string $option_name The option name to grab data from.
 *
 * @return void
 */
function wpcode_global_script_output( $option_name ) {
	// Ignore admin, feed, robots or trackbacks.
	if ( is_admin() || is_feed() || is_robots() || is_trackback() ) {
		return;
	}
	// Filter to prevent any output.
	if ( apply_filters( 'disable_ihaf', false ) ) {
		return;
	}

	$code = get_option( $option_name );
	if ( empty( $code ) || empty( trim( $code ) ) ) {
		return;
	}

	echo wp_unslash( $code );
}