public function __construct() { parent::__construct("wordlift_entity_autocomplete_widget", "Select Entity", array('description' => "This widget allows to select an entity using an auto-complete select box.")); }
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." ); }
/** * Register widget with WordPress. */ public function __construct() { parent::__construct("wordlift_related_posts_widget", "Related Posts", array('description' => "This widget shows the related posts.")); }