WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Post Editor Buttons Fork] Can add span buttons, but not spoiler one…

[Resolved] [Plugin: Post Editor Buttons Fork] Can add span buttons, but not spoiler one…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kailey (trepmal)
    Participant

    @trepmal

    You can allow the spoiler tag, add this to the plugin, or to the functions.php file in your theme.
    add_filter( 'admin_init', 'allowed_tags' );
    function allowed_tags() {
    global $allowedposttags;
    $allowedposttags['spoiler'] = array();
    }

    If you need to add classes or ids to the spoiler tag, do this

    add_filter( 'admin_init', 'allowed_tags' );
    function allowed_tags() {
    global $allowedposttags;
    $allowedposttags['spoiler']['class'] = array();
    $allowedposttags['spoiler']['id'] = array();
    }

    Oh, perfect. That was very quick AND working. Thank you very very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Post Editor Buttons Fork] Can add span buttons, but not spoiler one…’ is closed to new replies.