diff --git a/fields/field.url.php b/fields/field.url.php index 1ff5915..cdc3521 100644 --- a/fields/field.url.php +++ b/fields/field.url.php @@ -11,6 +11,15 @@ class FieldURL extends Field { + /** + * Compatible field types. Only Entry URL atm. + * + * @var array + */ + public $field_types; + + + /*------------------------------------------------------------------------------------------------*/ /* Definition */ /*------------------------------------------------------------------------------------------------*/ @@ -20,6 +29,8 @@ public function __construct(){ $this->_name = 'URL'; $this->_required = 'yes'; + + $this->field_types = array('entry_url'); } public function createTable(){ @@ -64,7 +75,7 @@ public function displaySettingsPanel(&$wrapper, $errors = null){ $fields = array(); foreach( $section_fields as $f ){ - if( $f->get('type') === 'entry_url' ){ + if( in_array($f->get('type'), $this->field_types) ){ $fields[] = array( $f->get('id'), is_array($this->get('related_field_id')) ? in_array($f->get('id'), $this->get('related_field_id')) : false,