(dev/core#5464) Iframe - Add support for hosting Civi IFRAMEs on WordPress #31460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
See https://lab.civicrm.org/dev/core/-/issues/5464
Before
If you enable the extension
iframe
, then it complains about the lack of a template.After
In combination with other patches for
civicrm-wordpress.git
(civicrm/civicrm-wordpress#336), it should be able to handle IFRAMEs on WordPress without needing to deploy a dedicatediframe.php
connector.To indicate that a URL should be rendered in the fashion of an iframe, append
?_cvwpif=1
.Technical Details
When making an
<IFRAME SRC="...">
tag, this uses/index.php?...&_cvwpif=1
instead of using/iframe.php
. This indicates that the request is supposed to be handled in the style of an IFRAME (stripping out CMS navigation; disregarding any pre-existing sessions within the iframe).I've done some initial testing using a cross-domain IFRAME:
civicrm/event/register
)We'll see what Jenkins has to say. It should be safe to merge the PRs for
civicrm-core
andcivicrm-wordpress
in any order, though it generally makes to merge them at about the same time.