/**
 * Adds a custom shortcode button to the WordPress editor.
 *
 * This function adds a custom shortcode button to the WordPress editor using the `QTags.addButton()` function.
 * The button is added if the "quicktags" script is loaded.
 * When the button is clicked, it inserts the "[dacdb_plus show='']" shortcode into the editor content.
 */

function waitForQTags() {
    if (window.QTags) {
        QTags.addButton("dacdb_shortcode", "DACdb", callback);
        function callback() {
            QTags.insertContent("[dacdb_plus show=\"\"]");
        }
    } else {
        setTimeout(waitForQTags, 50);
    }
}

waitForQTags();
