Allow iframe in posts
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 27 Jun 2019 16:50:24 +0000 (12:50 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 27 Jun 2019 16:50:24 +0000 (12:50 -0400)
Iframe now allowed

functions.php
style.css

index 2ae77a0..96f8636 100644 (file)
@@ -152,4 +152,18 @@ function is_post_type($type){
 
 add_action('thematic_searchloop', 'mytheme_search_loop');
 // End of the Contextual/Highlight Search functions
+add_filter(
+    'wp_kses_allowed_html',
+    function ( $allowedposttags) {
+        $allowedposttags['iframe'] = array(
+            'src'             => true,
+            'height'          => true,
+            'width'           => true,
+            'allowfullscreen' => true,
+            'allow'           => true,
+            'frameborder'     => true,
+        );
+        return $allowedposttags;
+    }, 1
+);
 ?>
index 46017ce..00aef0e 100644 (file)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: GreatLakesCenterfortheArts
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A theme for GreatLakesCenterfortheArts
-Version: 1.0.46
+Version: 1.0.47
 */