Skip to content
wiki.fftac.org

Linkreviewscanner - Source Excerpt 02

Back to Linkreviewscanner

Summary

This source excerpt preserves a bounded section of Antichrist.net/wp-content/plugins/uaix-locale-router/src/Diagnostics/LinkReviewScanner.php so readers can inspect the evidence without opening the full source file.

**Source path:** Antichrist.net/wp-content/plugins/uaix-locale-router/src/Diagnostics/LinkReviewScanner.php

return true;
			}
		}

		return false;
	}

	/**
	 * Return a filesystem path relative to the WordPress root when possible.
	 *
	 * @param string $file_path Absolute file path.
	 * @return string
	 */
	private static function relative_review_path( $file_path ) {
		$normalized_path = str_replace( '\\', '/', (string) $file_path );
		$root            = str_replace( '\\', '/', (string) ABSPATH );

		if ( 0 === strpos( $normalized_path, $root ) ) {
			return ltrim( substr( $normalized_path, strlen( $root ) ), '/' );
		}

		return $normalized_path;
	}
}