HEX
Server: nginx
System: Linux pool195-106-36.bur.atomicsites.net 6.12.57+deb12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1~bpo12+1 (2025-11-17) x86_64
User: (0)
PHP: 8.3.32
Disabled: pcntl_fork
Upload Files
File: //srv/wordpress/mu-plugins/photon-subsizes-loader.php
<?php

function photon_subsizes_loader() {
	$should_load = false;

	if ( defined( 'PHOTON_SUBSIZES' ) ) {
		// Enabled by user-defined constant
		$should_load = !! PHOTON_SUBSIZES;
	} else if ( '' !== AT_PHOTON_SUBSIZES ) {
		// Respect platform setting but allow user to override in case it causes issues
		$should_load = apply_filters( 'photon_subsizes_enable', !! AT_PHOTON_SUBSIZES );
	} else {
		// Default loading policy

		$is_newspack = 6 == constant( 'ATOMIC_CLIENT_ID' );
		$is_wpcom_and_should_load = (
			'wp_uploads' !== constant( 'AT_PRIVACY_MODEL' ) &&
			2 == constant( 'ATOMIC_CLIENT_ID' )
		);

		// Allow filtering default loading behavior so sites that
		// urgently need to disable the feature can do so with ease
		$should_load = apply_filters(
			'photon_subsizes_enable',
			$is_newspack || $is_wpcom_and_should_load
		);
	}

	if ( $should_load ) {
		require_once __DIR__ . '/photon-subsizes/photon-subsizes.php';
	}
}
add_action( 'muplugins_loaded', 'photon_subsizes_loader' );