sanitizers as $sanitizer ) { $instance = ( new $sanitizer( $post ) ); if ( class_exists( $sanitizer ) && $instance instanceof SanitizerInterface ) { $instance->sanitize(); } } } catch ( BlockNotFoundException $e ) { $instance->log( $e->getMessage() ); } } public static function init() : void { $instance = new self(); add_action( 'save_post', [ $instance, 'sanitize' ], 10, 3 ); } }