I have no idea what this coding is, is this some type of templating code?
@if ($spm_display_ids != null)
@if (get_field('toggle_sm', 'options') && in_array($id, $spm_display_ids) === true)
@include('specials-modal')
@endif
@endif
So I don’t know what this is doing @include('specials-modal')
but whatever is doing the outputting is happening in there.