<?php

class Intense_Field_Rel extends Intense_Field_Dropdown {
	private function set_default_options() {
		if ( empty( $this->args['options'] ) ) {
			$this->args['options'] = array(
				'' => '',
				'alternate' => 'alternate',
				'author' => 'author',
				'bookmark' => 'bookmark',
				'help' => 'help',
				'license' => 'license',
				'next' => 'next',
				'nofollow' => 'nofollow',
				'noreferrer' => 'noreferrer',
				'prefetch' => 'prefetch',
				'prev' => 'prev',
				'search' => 'search',
				'tag' => 'tag',
			);
		}

		$this->description = __( 'see <a href="http://www.w3schools.com/tags/att_a_rel.asp">rel</a> for more information.', 'intense' );
	}

	protected function render() {
		$this->set_default_options();

		return parent::render();
	}

	public function map_visual_composer() {
		$this->set_default_options();

		return parent::map_visual_composer();
	}
}
