From dab5cc0c2d2a9671939d79d318ce1349a02a6c17 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Thu, 12 Sep 2024 11:41:33 -0400 Subject: [PATCH] Performance: Only load dashicons when the pledge teams block is rendered --- themes/wporg-5ftf-2024/functions.php | 2 +- themes/wporg-5ftf-2024/src/pledge-teams/block.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/wporg-5ftf-2024/functions.php b/themes/wporg-5ftf-2024/functions.php index ea736fb..752d9bf 100644 --- a/themes/wporg-5ftf-2024/functions.php +++ b/themes/wporg-5ftf-2024/functions.php @@ -44,7 +44,7 @@ function enqueue_assets() { wp_enqueue_style( 'wporg-5ftf-2024', get_theme_file_uri( 'build/style/style-index.css' ), - array( 'wporg-parent-2021-style', 'wporg-global-fonts', 'dashicons' ), + array( 'wporg-parent-2021-style', 'wporg-global-fonts' ), $metadata['version'] ); } diff --git a/themes/wporg-5ftf-2024/src/pledge-teams/block.json b/themes/wporg-5ftf-2024/src/pledge-teams/block.json index 02facef..55550b2 100644 --- a/themes/wporg-5ftf-2024/src/pledge-teams/block.json +++ b/themes/wporg-5ftf-2024/src/pledge-teams/block.json @@ -13,6 +13,6 @@ }, "usesContext": [ "postId", "postType" ], "editorScript": "file:./index.js", - "style": "file:./style-index.css", + "style": [ "dashicons", "file:./style-index.css" ], "render": "file:./render.php" }