• Hello,

    Was wondering if it would be possible to add suppport for a “-“, a dash in the variable names? Right now it supports letters, numbers and underscore. This would be useful because links typically use – attributes, and making them natively supported in Shortcoder would be very useful.

    Thank you!

    Dave

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ddrager

    (@ddrager)

    I believe this should be fixed with a change:
    line 207 of shortcoder.php:

            -preg_match_all('/%%([a-zA-Z0-9_]+)\:?(.*?)%%/', $content, $matches);
            +preg_match_all('/%%([a-zA-Z0-9_\-]+)\:?(.*?)%%/', $content, $matches);
    Plugin Author vaakash

    (@vaakash)

    Hi @ddrager,

    Sure I’ll add support for it in the next release.

    Thanks,
    Aakash

    Thread Starter ddrager

    (@ddrager)

    Thank you, really appreciate that!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Support for dash in variable’ is closed to new replies.