Support » Plugin: Widget Shortcode » Bug in widget id

  • Hi,

    I have a custom widget which is displaying through Widget Shortcode, but without any of the widget params getting through to it. I have traced the problem to line 173 of init.php:

    preg_match( '/(\d+)/', $id, $number )

    The problem is my widget is called “lsa3_button”, and $id=”lsa3_button-5″, so $number gets [3,3] (from my widget name) not [5,5] (as the instance). I think you need something like

    preg_match( '/-(\d+)$/', $id, $number )

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug in widget id’ is closed to new replies.