widget create dynamiclly in wordpress plugin
问题 I am writing wordpress plugin. This plugin will create widgets based upon response of API call. My API return an array of some third party site links. So based upon count of array, I have to create widgets. Say, response have 10 entries I have to create 10 widgets based upon response. Currently I am creating 10 classes based on response. But I need to iterate through array and create 10 widgets dynamically. Is there any other way I can accomplish this task? please help. class widget_Mywidget