-add_action('wp_head', 'danix_google_anal', 10);
-*/
-/**
- * The googlemaps shortcode
- *
- * @param width the width of the returned map
- * @param height the height of the returned map
- * @param src the url of the map you want to display
- * @return string HTML the map object
- * @since 0.57
- *
- */
-/*function danix_gmaps($atts, $content = null) {
- extract(shortcode_atts(array(
- "width" => '640',
- "height" => '480',
- "src" => ''
- ), $atts));
- return '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'&output=embed" ></iframe>';
+add_action( 'wp_enqueue_scripts', 'baguette_register_assets' );
+
+function baguette_enqueue_assets() {
+ if ( has_block( 'gallery' ) || has_block( 'image' ) ) {
+ wp_enqueue_script( 'baguettebox' );
+ wp_enqueue_script( 'baguetteload' );
+ wp_enqueue_style( 'baguettebox-css' );
+ }