config['php_class'] = get_class($this);
// element id
$this->config['id'] = 'video_vimeo';
// element name
$this->config['name'] = __('Vimeo', 'fusion-core');
// element icon
$this->config['icon_url'] = "icons/sc-text_block.png";
// css class related to this element
$this->config['css_class'] = "fusion_element_box";
// element icon class
$this->config['icon_class'] = 'fusion-icon builder-options-icon fusiona-vimeo2';
// tooltip that will be displyed upon mouse over the element
//$this->config['tool_tip'] = 'Creates a Video Element';
// any special html data attribute (i.e. data-width) needs to be passed
// drop_level: elements with higher drop level can be dropped in elements with lower drop_level,
// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.
$this->config['data'] = array("drop_level" => "4");
}
// override default implemenation for this function as this element have special view
public function create_visual_editor( $params ) {
$innerHtml = '
';
$innerHtml .= '
'.__('Vimeo', 'fusion-core').'http://vimeo.com/75230326
';
$innerHtml .= '
';
$this->config['innerHtml'] = $innerHtml;
}
//this function defines TextBlock sub elements or structure
function popup_elements() {
$reverse_choices = Helper::get_reversed_choice_data();
$this->config['subElements'] = array(
array("name" => __('Video ID', 'fusion-core'),
"desc" => __('For example the Video ID for
https://vimeo.com/75230326 is 75230326', 'fusion-core'),
"id" => "fusion_id",
"type" => ElementTypeEnum::INPUT,
"value" => ""
),
array("name" => __('Width', 'fusion-core'),
"desc" => __('In pixels but only enter a number, ex: 600', 'fusion-core'),
"id" => "fusion_width",
"type" => ElementTypeEnum::INPUT,
"value" => "600"
),
array("name" => __('Height', 'fusion-core'),
"desc" => __('In pixels but only enter a number, ex: 350', 'fusion-core'),
"id" => "fusion_height",
"type" => ElementTypeEnum::INPUT,
"value" => "350"
),
array("name" => __('Autoplay Video', 'fusion-core'),
"desc" => __('Set to yes to make video autoplaying', 'fusion-core'),
"id" => "fusion_autoplay",
"type" => ElementTypeEnum::SELECT,
"value" => "no",
"allowedValues" => $reverse_choices
),
array("name" => __('AdditionalAPI Parameter', 'fusion-core'),
"desc" => __('Use additional API parameter, for example &title=0 to disable title on video. VimeoPlus account may be required.', 'fusion-core'),
"id" => "fusion_apiparams",
"type" => ElementTypeEnum::INPUT,
"value" => ""
),
array("name" => __('CSS Class', 'fusion-core'),
"desc" => __('Add a class to the wrapping HTML element.', 'fusion-core'),
"id" => "fusion_class",
"type" => ElementTypeEnum::INPUT,
"value" => ""
),
);
}
}