context['postId'])) { $ctx = (int) $block->context['postId']; if ($ctx > 0 && get_post_type($ctx) === $cpt) { $pid = $ctx; } } if ($pid <= 0 && function_exists('is_singular') && is_singular($cpt)) { $pid = (int) get_queried_object_id(); } if ($pid <= 0 || get_post_type($pid) !== $cpt) { return; } $wrapper = get_block_wrapper_attributes(array('class' => 'aieo-event-registration')); echo '