0

Following up on this little discussion with @toscho in chat I went through the first 50 most relevant of 800 questions that contain the word 'iframe' and found there a actually quite some questions that pertain to how to use the <iframe> tag in the WP context.

EDIT: more examples added

  1. Here's an example I created
  2. Another one (there are quite some questions of this type: how to split templates in iframes?)
  3. One more (this is about allowing iframes in widgets)

Before I proceed retagging the most relevant questions I thought I'd test if I get thumbs up for this.

The downside I can think of is that this tag might easily get polluted with off topic questions ("there's an iframe in my site that I didn't put there and it is loading a script from welovemayhem.ru, what is happening?")

7
  • 2
    Please do not use answers for polls. I have deleted both answers, because this type of "predefined answers" does not fit into our model of multiple, equally justified answers per questions.
    – fuxia Mod
    Commented Jul 11, 2016 at 12:33
  • 2
    To extend on mechanics a bit on meta site votes on question itself indicate agreement/disagreement (not quality of question).
    – Rarst Mod
    Commented Jul 11, 2016 at 14:35
  • Sounds good. Tags need more love. Go for it!
    – kaiser Mod
    Commented Jul 11, 2016 at 18:47
  • What sort of questions pertain to iframe that would be on-topic? I think I'd prefer to see more examples before deciding one way or the other. You've done such a great job burning irrelevant tags; I'd be worried this would just become another one of those! The example you linked to is not as much about iframes per se as it is about WP's implementation of TinyMCE and I can't off the top of my head think of any other questions that wouldn't fit into this context (but perhaps you have more examples?)
    – Tim Malone
    Commented Jul 12, 2016 at 0:12
  • @TimMalone Two more examples added where you need a trick to circumvent WP's normal interaction with iframes (I also think standard behaviour of WP's TincyMCE should be regarded on topic).
    – cjbj
    Commented Jul 12, 2016 at 8:24
  • @cjbj Thanks. I had a look those additional examples; I've added an answer. I didn't mean to imply I thought TinyMCE was off-topic - just that I thought a question about iframes pertaining to TinyMCE would fit under the existing tag(s) :)
    – Tim Malone
    Commented Jul 12, 2016 at 10:36
  • Yes, I got that. But I disagree. ;-)
    – cjbj
    Commented Jul 12, 2016 at 10:39

3 Answers 3

0

The element iframe (like the rarely used object) is somewhat special in WP, because its use is bound to the role of the post author, and even that is different on single-sites and multi-sites.

Maybe there are enough on-topic questions possible to justify this, like: How can I enable the element for other roles? Are there security concerns that can be handled with WP functions?

Having that tag would make it easier for askers to find related questions, because the algorithm for that is comparing question tags.

On the other hand, maybe this could be covered by our existing embed tag? Then again, that tag is broader than iframe. You can embed something as a DOM node per JavaScript without using iframe or object

We don't need a tag for every HTML element like we don't need one for every WP function. The basic purpose of a tag is to group related questions so they can be found easier. At the same time, a tag should be specific enough to distinguish its use from other tags.

I think both criteria are met for a tag iframe.

1

My opinion would be that iframes are used quite actively in core, even though the relevant bits are not that often extended/customized.

I hadn't paid attention to the tag, but unless it's A Big Problem with off topic then I would guess it makes sense.

0

I'm unconvinced we need an iframe tag, because iframes are not an easily defined WordPress development issue.

When iframe questions do come up, they're usually in the context of something else that we have a tag for, such as or in the case of this question, in the case of this one, and in the case of this one (using the three examples cjbj provided).

There is likely to be quite a bit of disambiguation between the various uses of this tag - eg. 'my iframe tag got filtered' is a completely different category of iframe question than 'I want to show a portion of my WordPress menu in an iframe'.

Because of this disambiguation:

  • it's likely that iframe questions will require expertise in completely different parts of WordPress;
  • and, iframes are unlikely to be the core issue being asked about - the core issues in the examples above are filtering of disallowed tags, and displaying WordPress content outside of the WordPress environment.

I think because of this a tag for iframes wouldn't serve an easily definable purpose, and could possibly end up as a candidate for removal in the future.

1
  • 1
    Of course you're right that those questions fit under the tags you mention. But especially widgets and menus are so broad, they only become meaningful when there are additional tags to narrow them down (which is needed for the 'related questions' feature as toscho explains)
    – cjbj
    Commented Jul 12, 2016 at 10:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .