Skip to content

Add playground embedder#145

Closed
jdevalk wants to merge 0 commit intoWordPress:trunkfrom
jdevalk:trunk
Closed

Add playground embedder#145
jdevalk wants to merge 0 commit intoWordPress:trunkfrom
jdevalk:trunk

Conversation

@jdevalk
Copy link

@jdevalk jdevalk commented Jun 8, 2023


$url = add_query_arg( $query_parameters, 'https://playground.wordpress.net/' );

return sprintf( '<iframe src="%1$s" width="800" height="600"></iframe>', $url );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The width and height attributes should likely be pulled from the shortcode attributes, but this could be addressed in a later PR.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also $url should probably be escaped, I've tested and esc_url( $url ) works as expected

@adamwoodnz adamwoodnz added the [Type] Enhancement New feature or request label Jun 8, 2023
@jdevalk jdevalk closed this Jun 12, 2023
@jdevalk jdevalk force-pushed the trunk branch 2 times, most recently from 3294362 to fcbfe9c Compare June 12, 2023 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants