403Webshell
Server IP : 63.250.38.98  /  Your IP : 216.73.216.235
Web Server : LiteSpeed
System : Linux premium291.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User : samejjip ( 1289)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/samejjip/www/wp-content/plugins/insert-headers-and-footers/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/samejjip/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 );  // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}

Youez - 2016 - github.com/yon3zu
LinuXploit