1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WordPressのテーマに登録されている有効なショートコード一覧の取得

Last updated at Posted at 2019-04-15

調べる機会があったので。
下記のコードを適当なテーマに貼り付けて表示を確認してみてください。

ショートコード一覧の取得

$shortcode_tagsのkeyがショートコード名になっています。

<?php
    global $shortcode_tags;
    echo "<pre>";
    foreach ($shortcode_tags as $key => $value) {
        var_dump($key);
    }
    echo "</pre>";
    ?>

参考

1
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?