widget files need not have ComicPress prefix in filename

This commit is contained in:
John Bintz 2009-12-21 17:33:41 -05:00
parent 1fa777f3b5
commit 12b5b87c20
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ function __comicpress_widgets_init() {
if (($dh = opendir(dirname(__FILE__) . '/widgets')) !== false) {
while (($file = readdir($dh)) !== false) {
if (strpos($file, '.inc') !== false) {
$class_name = preg_replace('#\..*$#', '', $file);
$class_name = "ComicPress" . preg_replace('#\..*$#', '', $file);
require_once(dirname(__FILE__) . '/widgets/' . $file);
register_widget($class_name);
$widget = new $class_name(true);