Automatically generated list of your shortcodes in edit window

Automatically generated list of your shortcodesTo generarte a list of all shortcodes used in the theme or plugins while editing the post or page – just add the following code to functions.php:

function add_sc_select(){
    global $shortcode_tags;
     /* ------------------------------------- */
     /* enter names of shortcode to exclude bellow */
     /* ------------------------------------- */
    $exclude = array("wp_caption", "embed");
    echo '&nbsp;<select id="sc_select"><option>Shortcode</option>';
    foreach ($shortcode_tags as $key => $val){
            $shortcodes_list .= '<option value="['.$key.'][/'.$key.']">'.$key.'</option>';
     echo $shortcodes_list;
     echo '</select>';
add_action('admin_head', 'button_js');
function button_js() {
        echo '<script type="text/javascript">
           jQuery("#sc_select").change(function() {
                          send_to_editor(jQuery("#sc_select :selected").val());
                          return false;


Mariusz Szatkowski
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *