private function loadWidgets($widgets) { // set the applicationContext of the WidgetProxy. WordPress_WidgetProxy::$applicationContext = $this; foreach ($widgets as $widget) { $classID = (string) $widget->attributes()->class; if (empty($classID)) { $this->logger->error("An editor property is missing the property name."); continue; } $class = $this->getClassDefinition($classID); $this->loadClass($class); $className = $this->getClassName($class); // $this->logger->trace( "Found a widget [ classID :: $classID ][ className:: $className ]." ); register_widget($className); } // $this->logger->trace( count( $this->widgets ) . " widget(s) loaded." ); }