name = $name; $this->set_props( $args ); } /** * Returns whether this widget type ships a renderable script module. * * @return bool */ public function is_renderable() { return ! empty( $this->render_module ); } /** * Hydrates the widget type properties from the args array. * * @param array $args Widget type arguments. */ public function set_props( $args ) { if ( ! is_array( $args ) ) { return; } unset( $args['name'] ); foreach ( $args as $property_name => $property_value ) { $this->$property_name = $property_value; } } } }