Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Variables could be data pulled from DB as well
- $some_stuff = $wpdb->(...)
- $my_classes = array(...);
- foreach ($my_classes as $my_class) :
- eval('
- class ' . $my_class . ' extends WP_Widget {
- // Extra stuff here using $my_class or $some_stuff variable
- }
- ');
- // after eval() register each widget
- endforeach;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement