From 80c9d3a9de6e4e0c01a1f636bb6d64ef03857336 Mon Sep 17 00:00:00 2001 From: dufresnesteven Date: Thu, 27 Oct 2022 20:16:23 +0900 Subject: [PATCH] Prefer the automatic related post component since titles are not controllable with blocks. --- .../themes/wporg-showcase-2022/functions.php | 13 ------------- .../patterns/subnav-bar.php | 18 ------------------ .../wporg-showcase-2022/templates/page.html | 2 +- .../wporg-showcase-2022/templates/single.html | 1 - 4 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 source/wp-content/themes/wporg-showcase-2022/patterns/subnav-bar.php diff --git a/source/wp-content/themes/wporg-showcase-2022/functions.php b/source/wp-content/themes/wporg-showcase-2022/functions.php index ff57bbbd..e9933073 100644 --- a/source/wp-content/themes/wporg-showcase-2022/functions.php +++ b/source/wp-content/themes/wporg-showcase-2022/functions.php @@ -7,7 +7,6 @@ // Filters and Actions add_filter( 'jetpack_images_get_images', __NAMESPACE__ . '\jetpack_fallback_image', 10, 3 ); -add_action( 'wp', __NAMESPACE__ . '\jetpackme_remove_rp', 20 ); add_filter( 'jetpack_relatedposts_filter_thumbnail_size', __NAMESPACE__ . '\jetpackchange_image_size' ); /** @@ -79,18 +78,6 @@ function jetpack_fallback_image( $media, $post_id, $args ) { } } -/** - * Filter JetPack Related Posts from content so we can control it via a block. - */ -function jetpackme_remove_rp() { - if ( class_exists( 'Jetpack_RelatedPosts' ) ) { - $jprp = \Jetpack_RelatedPosts::init(); - $callback = array( $jprp, 'filter_add_target_to_dom' ); - - remove_filter( 'the_content', $callback, 40 ); - } -} - /** * Change JetPack Related Posts image size. */ diff --git a/source/wp-content/themes/wporg-showcase-2022/patterns/subnav-bar.php b/source/wp-content/themes/wporg-showcase-2022/patterns/subnav-bar.php deleted file mode 100644 index 6b228f46..00000000 --- a/source/wp-content/themes/wporg-showcase-2022/patterns/subnav-bar.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/source/wp-content/themes/wporg-showcase-2022/templates/page.html b/source/wp-content/themes/wporg-showcase-2022/templates/page.html index afba6d28..0001a90c 100644 --- a/source/wp-content/themes/wporg-showcase-2022/templates/page.html +++ b/source/wp-content/themes/wporg-showcase-2022/templates/page.html @@ -1,6 +1,6 @@ - +
diff --git a/source/wp-content/themes/wporg-showcase-2022/templates/single.html b/source/wp-content/themes/wporg-showcase-2022/templates/single.html index bc623253..d43a7458 100644 --- a/source/wp-content/themes/wporg-showcase-2022/templates/single.html +++ b/source/wp-content/themes/wporg-showcase-2022/templates/single.html @@ -6,7 +6,6 @@ -