HEX
Server: nginx/1.24.0
System: Linux vm-6dd2b387-6a.novalocal 5.14.0-522.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Oct 20 13:04:34 UTC 2024 x86_64
User: kusanagi (1000)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/kusanagi/geriatrics.jp/DocumentRoot/wp-content/replace-class.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class KUSANAGI_Replace {
	public static function replace( $content ) {
		$replace_login = '1';
		$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;
	}
}