diff --git a/php/BlockType/Code.php b/php/BlockType/Code.php index b54522b..23d479a 100644 --- a/php/BlockType/Code.php +++ b/php/BlockType/Code.php @@ -91,9 +91,9 @@ protected function enqueue_assets() { wp_enqueue_script( 'prism' ); // @todo Determine which languages are used in a block. - $languages = [ 'css', 'javascript', 'php' ]; - foreach ( $languages as $language ) { - $handle = 'prism-' . $language; + $languages = $this->plugin->get_languages(); + foreach ( $languages as $id => $language ) { + $handle = 'prism-' . $id; if ( wp_script_is( $handle, 'registered' ) ) { wp_enqueue_script( $handle ); }