Skip to content

Instantly share code, notes, and snippets.

@yhira
Created April 25, 2019 11:02
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/763c236a4b5efb877321187577c31dce to your computer and use it in GitHub Desktop.
Save yhira/763c236a4b5efb877321187577c31dce to your computer and use it in GitHub Desktop.
ビジュアルエディタのショートコードプルダウンにアイテムを追加する
<?php //商品追加ショートコード
$before = '[rakuten search="商品名" kw="商品名" title="商品名"]';
$after = '';
?>
shortcodes[18] = new Array();
shortcodes[18].title = '<?php echo __( '楽天商品リンク(独自追加)', THEME_NAME ); ?>';
shortcodes[18].tag = '<?php echo $before.$msg.$after; ?>';
shortcodes[18].before = '<?php echo $before; ?>';
shortcodes[18].after = '<?php echo $after; ?>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment