Skip to content

Commit

Permalink
fix widget id naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ibelar committed Dec 15, 2017
1 parent c726748 commit 31a8c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/WidgetComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function initializeWidget($id, array $config, AtkWp $plugin)
$this->plugin = $plugin;
$this->name = $config['title'];
//make sure our id_base is unique
$this->id_base = $plugin->name.$id;
$this->id_base = $plugin->pluginName.'-'.$id;
//Widget option_name in Option table that will hold the widget instance field value.
$this->option_name = 'widget_'.$this->id_base;
$this->widget_options = wp_parse_args($config['widget_ops'], ['classname' => $this->option_name]);
Expand Down

0 comments on commit 31a8c5e

Please sign in to comment.