Skip to content

Instantly share code, notes, and snippets.

@yhira
Created May 27, 2020 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yhira/e03f5ebd909bd13b5134cd093f56b854 to your computer and use it in GitHub Desktop.
Save yhira/e03f5ebd909bd13b5134cd093f56b854 to your computer and use it in GitHub Desktop.
[Cocoon]吹き出しショートコード簡略版
add_shortcode('hukidashi1', 'hukidashi1Func');
function hukidashi1Func( $atts, $content = null ) {
ob_start();
?>
<div class="wp-block-cocoon-blocks-balloon-ex-box-1 speech-wrap sb-id-3 sbs-line sbp-l sbis-cb cf block-box">
<div class="speech-person">
<figure class="speech-icon"><img data-src="http://cocoon.local/wp-content/themes/cocoon-master/images/b-man.png" alt="bbb" class="speech-icon-image " src="http://cocoon.local/wp-content/themes/cocoon-master/images/b-man.png" data-loaded="true">
<noscript><img src="http://cocoon.local/wp-content/themes/cocoon-master/images/b-man.png" alt="bbb" class="speech-icon-image" /></noscript>
</figure>
<div class="speech-name">名前</div>
</div>
<div class="speech-balloon">
<?php echo $content; ?>
</div>
</div>
<?php
return ob_get_clean();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment