HEX
Server: Apache
System: Linux wp02.tdr-lab.com 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64
User: kusanagi (1001)
PHP: 7.4.23
Disabled: NONE
Upload Files
File: //home/kusanagi/ninibaikyaku-soleil.com/DocumentRoot/wp-content/replace-class.php
<?php
if ( ! defined( 'ABSPATH' ) ) { exit; }
class KUSANAGI_Replace {
	static function replace( $content ) {
		$replace_login = '0';
		$replaces = array(

		);

		if ( ! $replace_login && 'wp-login.php' == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
			return $content;
		}

		if ( ! function_exists( 'is_user_logged_in' ) || ! is_user_logged_in() ) {
			foreach ( $replaces as $reg => $val ) {
				$reg = preg_quote( $reg, '#' );
				$content = preg_replace( "#$reg#", $val, $content );
			}
		}
		return $content;
	}
}