From d1556fb5bb6173636ef13b99008ac722773c0e3f Mon Sep 17 00:00:00 2001 From: dlousa92 Date: Wed, 13 Mar 2019 11:59:23 -0400 Subject: [PATCH 1/5] define allowed blocks for theme --- .../themes/defense360/inc/allowed-blocks.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 wp-content/themes/defense360/inc/allowed-blocks.php diff --git a/wp-content/themes/defense360/inc/allowed-blocks.php b/wp-content/themes/defense360/inc/allowed-blocks.php new file mode 100644 index 0000000..fcea8ad --- /dev/null +++ b/wp-content/themes/defense360/inc/allowed-blocks.php @@ -0,0 +1,26 @@ + \ No newline at end of file From 5643d05af6c7bed2731b1576af3980abb023f0d4 Mon Sep 17 00:00:00 2001 From: dlousa92 Date: Wed, 13 Mar 2019 11:59:41 -0400 Subject: [PATCH 2/5] require allowed blocks include --- wp-content/themes/defense360/functions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-content/themes/defense360/functions.php b/wp-content/themes/defense360/functions.php index 7e4de93..08cb60f 100644 --- a/wp-content/themes/defense360/functions.php +++ b/wp-content/themes/defense360/functions.php @@ -103,6 +103,11 @@ function defense360_scripts() { } add_action( 'wp_enqueue_scripts', 'defense360_scripts' ); +/** + * Allowed Blocks + */ +require get_template_directory() . '/inc/allowed-blocks.php'; + /** * Custom Post Types */ From daed12ada9bdb82b665872a2e668683b1cf3a000 Mon Sep 17 00:00:00 2001 From: dlousa92 Date: Thu, 14 Mar 2019 15:12:19 -0400 Subject: [PATCH 3/5] reorder and add adiitional blocks --- .../themes/defense360/inc/allowed-blocks.php | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/wp-content/themes/defense360/inc/allowed-blocks.php b/wp-content/themes/defense360/inc/allowed-blocks.php index fcea8ad..988edce 100644 --- a/wp-content/themes/defense360/inc/allowed-blocks.php +++ b/wp-content/themes/defense360/inc/allowed-blocks.php @@ -10,17 +10,23 @@ function defense360_allowed_block_types( $allowed_blocks) { return array( - 'core/image', - 'core/paragraph', + 'core/embed', + 'core/freeform', + 'core/gallery', 'core/heading', + 'core/html', + 'core/image', 'core/list', - 'core/quote', - // We may include either regular quotes or pull quotes. - // 'core/pullquote', + 'core/paragraph', + 'core/quote', // We may include either regular quotes or pull quotes 'core/pullquote', 'core/shortcode', - 'core/gallery', - 'core/freeform', - + 'core/table', + 'core/video', + 'core-embed/twitter', + 'core-embed/youtube', + 'core-embed/facebook', + 'core-embed/soundcloud', + 'core-embed/flickr', + 'core-embed/vimeo', ); } -?> \ No newline at end of file From 3d7a08860ff0b191672dfe9bfad17eed56c8e3ed Mon Sep 17 00:00:00 2001 From: dlousa92 Date: Thu, 14 Mar 2019 15:21:59 -0400 Subject: [PATCH 4/5] add blank line at end of file --- wp-content/themes/defense360/inc/allowed-blocks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-content/themes/defense360/inc/allowed-blocks.php b/wp-content/themes/defense360/inc/allowed-blocks.php index 988edce..9a6a8a0 100644 --- a/wp-content/themes/defense360/inc/allowed-blocks.php +++ b/wp-content/themes/defense360/inc/allowed-blocks.php @@ -30,3 +30,4 @@ function defense360_allowed_block_types( $allowed_blocks) { 'core-embed/vimeo', ); } + From 4607123a547f94e7e24152972b9cbb386c1ace1f Mon Sep 17 00:00:00 2001 From: dlousa92 Date: Tue, 19 Mar 2019 10:49:09 -0400 Subject: [PATCH 5/5] update allowed blocks to include jetpack plugins --- wp-content/themes/defense360/inc/allowed-blocks.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/defense360/inc/allowed-blocks.php b/wp-content/themes/defense360/inc/allowed-blocks.php index 9a6a8a0..57aa7bb 100644 --- a/wp-content/themes/defense360/inc/allowed-blocks.php +++ b/wp-content/themes/defense360/inc/allowed-blocks.php @@ -18,7 +18,7 @@ function defense360_allowed_block_types( $allowed_blocks) { 'core/image', 'core/list', 'core/paragraph', - 'core/quote', // We may include either regular quotes or pull quotes 'core/pullquote', + 'core/quote', // We may include either regular quotes or pull quotes 'core/pullquote' 'core/shortcode', 'core/table', 'core/video', @@ -28,6 +28,10 @@ function defense360_allowed_block_types( $allowed_blocks) { 'core-embed/soundcloud', 'core-embed/flickr', 'core-embed/vimeo', + 'jetpack/slideshow', + 'jetpack/tiled-gallery', + 'jetpack/carousel' + ); }