Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/plugins/builder-tiles/modules/module-tile.php
Ðазад
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** * Module Name: Tile */ class TB_Tile_Module extends Themify_Builder_Component_Module { function __construct() { parent::__construct(array( 'name' => __('Tile', 'builder-tiles'), 'slug' => 'tile', 'category' => array('addon') )); } function get_assets() { $instance = Builder_Tiles::get_instance(); $options = array( 'async'=>true, 'fluid_tiles' => $instance->get_option( 'fluid_tiles'), 'tiles_base' => $instance->get_option( 'fluid_tiles_base_size'), 'url' => $instance->url . 'assets/', 'ver' => $instance->version, 'css' => themify_enque($instance->url.'assets/style.css'), 'js' => themify_enque($instance->url . 'assets/script.js') ); return apply_filters( 'builder_tiles_script_vars', $options ); } public function get_options() { $tile_size_options = array(); $instance = Builder_Tiles::get_instance(); $url = $instance->url; $sizes=$instance->get_tile_sizes(); foreach( $sizes as $key => $size ) { $tile_size_options[] = array( 'img' => $size['image'], 'value' => $key, 'label' => $size['label'] ); } $sizes=null; return array( array( 'id' => 'size', 'type' => 'layout', 'label' => __('Size', 'builder-tiles'), 'options' => $tile_size_options ), array( 'type' => 'tabs', 'options' => array( 'front' => array( 'label' => __( 'Front', 'builder-tiles' ), 'options' => array( array( 'id' => 'type_front', 'type' => 'layout', 'label' => __('Type', 'builder-tiles'), 'options' => array( array('img' => $url. 'assets/layouts/tile-type-text.svg', 'value' => 'text', 'label' => __('Text', 'builder-tiles')), array('img' => $url. 'assets/layouts/tile-type-button.svg', 'value' => 'button', 'label' => __('Button', 'builder-tiles')), array('img' => $url. 'assets/layouts/tile-type-gallery.svg', 'value' => 'gallery', 'label' => __('Gallery', 'builder-tiles')), array('img' => $url. 'assets/layouts/tile-type-map.svg', 'value' => 'map', 'label' => __('Map', 'builder-tiles')), array('img' => $url. 'assets/layouts/tile-type-blank.svg', 'value' => 'blank', 'label' => __('Blank', 'builder-tiles')), ) ), array( 'id' => 'color_front', 'type' => 'layout', 'label' => __('Color', 'builder-tiles'), 'class'=>'tb_colors', 'mode'=>'sprite', 'color' => true, 'wrap_class' => 'tb_tile_options tb_tile_options_button tb_tile_options_text tb_tile_options_gallery' ), array( 'id' => 'title_front', 'type' => 'text', 'label' => __('Title', 'builder-tiles'), 'class' => 'fullwidth', 'wrap_class' => 'tb_tile_options tb_tile_options_button tb_tile_options_text' ), /* Text Tile options */ array( 'id' => 'text_front', 'type' => 'wp_editor', 'wrap_class' => 'tb_tile_options tb_tile_options_text' ), /* Button Tile options */ array( 'type' => 'group', 'wrap_class' => 'tb_tile_options tb_tile_options_button', 'options' => array( array( 'id' => 'button_link_front', 'type' => 'url', 'label' => __('Title Link', 'builder-tiles'), 'class' => 'fullwidth', 'binding' => array( 'empty' => array( 'hide' => 'button_link_params_front' ), 'not_empty' => array( 'show' =>'button_link_params_front' ) ) ), array( 'id' => 'button_link_params_front', 'type' => 'checkbox', 'label' => '', 'options' => array( array( 'name' => 'lightbox', 'value' => __('Open link in lightbox', 'builder-tiles')), array( 'name' => 'newtab', 'value' => __('Open link in new tab', 'builder-tiles')) ), 'new_line' => false, 'control'=>false ), array( 'id' => 'icon_type_front', 'type' => 'radio', 'label' => __('Icon Type', 'builder-tiles'), 'options' => array( array('name'=>__('Icon', 'builder-tiles'),'value'=>'icon'), array('name'=>__('Image', 'builder-tiles'),'value'=>'image') ), 'option_js' => true ), array( 'id' => 'icon_front', 'type' => 'icon', 'label' => __('Icon', 'builder-tiles'), 'wrap_class' => 'tb_group_element_icon' ), array( 'id' => 'image_front', 'type' => 'image', 'label' => __('Image URL', 'builder-tiles'), 'class' => 'xlarge', 'wrap_class' => 'tb_group_element_image' ), array( 'id' => 'icon_color_front', 'type' => 'color', 'label' => __('Icon Color', 'builder-tiles'), 'class' => 'small', 'wrap_class' => 'tb_group_element_icon' ), ) ), /* Gallery Tile options */ array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_gallery', 'options'=>array( array( 'id' => 'gallery_front', 'type' => 'gallery', 'label' => __('Gallery Slider', 'builder-tiles') ), array( 'id' => 'gallery_autoplay_front', 'type' => 'select', 'label' => __('Auto play', 'builder-tiles'), 'options' => array( '0' => __( 'Off', 'builder-tiles' ), '1000' => __( '1 Second', 'builder-tiles' ), '2000' => __( '2 Seconds', 'builder-tiles' ), '3000' => __( '3 Seconds', 'builder-tiles' ), '4000' => __( '4 Seconds', 'builder-tiles' ), '5000' => __( '5 Seconds', 'builder-tiles' ), '6000' => __( '6 Seconds', 'builder-tiles' ), '7000' => __( '7 Seconds', 'builder-tiles' ), '8000' => __( '8 Seconds', 'builder-tiles' ), '9000' => __( '9 Seconds', 'builder-tiles' ), '10000' => __( '10 Seconds', 'builder-tiles' ) ) ), array( 'id' => 'gallery_hide_timer_front', 'type' => 'toggle_switch', 'label' => __('Hide Timer', 'builder-tiles'), 'options' => 'simple' ) ) ), array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_text tb_tile_options_gallery', 'options'=>array( array( 'id' => 'action_text_front', 'type' => 'text', 'label' => __('Action Button', 'builder-tiles'), 'class' => 'fullwidth' ), array( 'id' => 'action_link_front', 'type' => 'url', 'label' => __('Button Link', 'builder-tiles'), 'class' => 'fullwidth', 'binding' => array( 'empty' => array( 'hide' => 'action_param_front' ), 'not_empty' => array( 'show' => 'action_param_front' ) ) ), array( 'id' => 'action_param_front', 'type' => 'checkbox', 'label' => '', 'options' => array( array( 'name' => 'lightbox', 'value' => __('Open link in lightbox', 'builder-tiles')), array( 'name' => 'newtab', 'value' => __('Open link in new tab', 'builder-tiles')) ), 'new_line' => false, 'control'=>false ) ) ), /* Map Tile options */ array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_map', 'options'=>array( array( 'id' => 'address_map_front', 'type' => 'textarea', 'class' => 'fullwidth', 'label' => __('Address', 'builder-tiles') ), array( 'id' => 'type_map_front', 'type' => 'select', 'label' => __('Type', 'builder-tiles'), 'options' => array( 'ROADMAP' => 'Road Map', 'SATELLITE' => 'Satellite', 'HYBRID' => 'Hybrid', 'TERRAIN' => 'Terrain' ) ), array( 'id' => 'zoom_map_front', 'type' => 'select', 'label' => __('Zoom', 'builder-tiles'), 'options' => range( 1, 18 ) ), array( 'id' => 'scrollwheel_map_front', 'type' => 'toggle_switch', 'label' => __( 'Scrollwheel', 'builder-tiles' ), 'options' => array( 'on' => array('name'=>'enable', 'value' =>'en'), 'off' => array('name'=>'disable', 'value' =>'dis') ), ), array( 'id' => 'draggable_map_front', 'type' => 'toggle_switch', 'label' => __( 'Draggable', 'builder-tiles' ), 'options' => array( 'on' => array('name'=>'enable', 'value' =>'en'), 'off' => array('name'=>'disable', 'value' =>'dis') ) ) ) ), array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_button tb_tile_options_text', 'options'=>array( array( 'label' => __( 'Custom Style', 'builder-tiles' ), 'type' => 'multi', 'options' => array( array( 'id' => 'background_color_front', 'type' => 'color', 'label' => __('Background Color', 'builder-tiles') ), array( 'id' => 'text_color_front', 'type' => 'color', 'label' => __('Text Color', 'builder-tiles') ), array( 'id' => 'link_color_front', 'type' => 'color', 'label' => __('Link Color', 'builder-tiles') ) ) ), array( 'id' => 'background_image_front', 'type' => 'image', 'label' => __('Background Image', 'builder-tiles'), 'binding'=>array( 'empty' => array( 'hide' => 'bg_image_front' ), 'not_empty' => array( 'show' =>'bg_image_front' ) ) ), array( 'label' => __( 'Image Size', 'builder-tiles' ), 'wrap_class'=>'bg_image_front', 'type' => 'multi', 'options' => array( array( 'id' => 'background_image_front_width', 'type' => 'range', 'label' => 'w', 'units' => array( 'px' => array( 'max' => 2000 ) ) ), array( 'id' => 'background_image_front_height', 'type' => 'range', 'label' => 'ht', 'units' => array( 'px' => array( 'max' => 2000 ) ) ) ) ) ) ) ) ), 'back' => array( 'label' => __( 'Back', 'builder-tiles' ), 'options' => array( array( 'id' => 'type_back', 'type' => 'layout', 'label' => __('Type', 'builder-tiles'), 'options' => array( array('img' => $url . 'assets/layouts/tile-type-text.svg', 'value' => 'text', 'label' => __('Text', 'builder-tiles')), array('img' => $url . 'assets/layouts/tile-type-button.svg', 'value' => 'button', 'label' => __('Button', 'builder-tiles')), array('img' => $url . 'assets/layouts/tile-type-gallery.svg', 'value' => 'gallery', 'label' => __('Gallery', 'builder-tiles')), array('img' => $url . 'assets/layouts/tile-type-map.svg', 'value' => 'map', 'label' => __('Map', 'builder-tiles')), array('img' => $url . 'assets/layouts/tile-type-blank.svg', 'value' => 'blank', 'label' => __('Blank', 'builder-tiles')), ), 'option_js' => true ), array( 'id' => 'color_back', 'type' => 'layout', 'mode'=>'sprite', 'label' => __('Tile Color', 'builder-tiles'), 'class'=>'tb_colors', 'color' => true, 'wrap_class' => 'tb_tile_options tb_tile_options_button tb_tile_options_text tb_tile_options_gallery' ), array( 'id' => 'title_back', 'type' => 'text', 'label' => __('Title', 'builder-tiles'), 'class' => 'fullwidth', 'wrap_class' => 'tb_tile_options tb_tile_options_button tb_tile_options_text' ), /* Text Tile options */ array( 'id' => 'text_back', 'type' => 'wp_editor', 'wrap_class' => 'tb_tile_options tb_tile_options_text' ), /* Button Tile options */ array( 'type' => 'group', 'wrap_class' => 'tb_tile_options tb_tile_options_button', 'options' => array( array( 'id' => 'button_link_back', 'type' => 'text', 'label' => __('Title Link', 'builder-tiles'), 'class' => 'fullwidth', 'binding' => array( 'empty' => array( 'hide' => 'button_link_params_back' ), 'not_empty' => array( 'show' => 'button_link_params_back' ) ) ), array( 'id' => 'button_link_params_back', 'type' => 'checkbox', 'label' => '', 'options' => array( array( 'name' => 'lightbox', 'value' => __('Open link in lightbox', 'builder-tiles')), array( 'name' => 'newtab', 'value' => __('Open link in new tab', 'builder-tiles')) ), 'new_line' => false, 'control'=>false ), array( 'id' => 'icon_type_back', 'type' => 'radio', 'label' => __('Icon Type', 'builder-tiles'), 'options' => array( array('name'=>__('Icon', 'builder-tiles'),'value'=>'icon'), array('name'=>__('Image', 'builder-tiles'),'value'=>'image') ), 'option_js' => true ), array( 'id' => 'icon_back', 'type' => 'icon', 'label' => __('Icon', 'builder-tiles'), 'wrap_class' => 'tb_group_element_icon' ), array( 'id' => 'image_back', 'type' => 'image', 'label' => __('Image URL', 'builder-tiles'), 'class' => 'xlarge', 'wrap_class' => 'tb_group_element_image' ), array( 'id' => 'icon_color_back', 'type' => 'color', 'label' => __('Icon Color', 'builder-tiles'), 'wrap_class' => 'tb_group_element_icon' ), ) ), /* Gallery Tile options */ array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_gallery', 'options'=>array( array( 'id' => 'gallery_back', 'type' => 'gallery', 'label' => __('Gallery Slider', 'builder-tiles'), ), array( 'id' => 'gallery_autoplay_back', 'type' => 'select', 'label' => __('Auto play', 'builder-tiles'), 'options' => array( '0' => __( 'Off', 'builder-tiles' ), '1000' => __( '1 Second', 'builder-tiles' ), '2000' => __( '2 Seconds', 'builder-tiles' ), '3000' => __( '3 Seconds', 'builder-tiles' ), '4000' => __( '4 Seconds', 'builder-tiles' ), '5000' => __( '5 Seconds', 'builder-tiles' ), '6000' => __( '6 Seconds', 'builder-tiles' ), '7000' => __( '7 Seconds', 'builder-tiles' ), '8000' => __( '8 Seconds', 'builder-tiles' ), '9000' => __( '9 Seconds', 'builder-tiles' ), '10000' => __( '10 Seconds', 'builder-tiles' ) ) ), array( 'id' => 'gallery_hide_timer_back', 'type' => 'toggle_switch', 'label' => __('Hide Timer', 'builder-tiles'), 'options' => 'simple' ) ) ), /* Map Tile options */ array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_map', 'options'=>array( array( 'id' => 'address_map_back', 'type' => 'textarea', 'class' => 'fullwidth', 'label' => __('Address', 'builder-tiles') ), array( 'id' => 'type_map_back', 'type' => 'select', 'label' => __('Type', 'builder-tiles'), 'options' => array( 'ROADMAP' => 'Road Map', 'SATELLITE' => 'Satellite', 'HYBRID' => 'Hybrid', 'TERRAIN' => 'Terrain' ) ), array( 'id' => 'zoom_map_back', 'type' => 'select', 'label' => __('Zoom', 'builder-tiles'), 'options' => range( 1, 18 ) ), array( 'id' => 'scrollwheel_map_back', 'type' => 'toggle_switch', 'label' => __( 'Scrollwheel', 'builder-tiles' ), 'options' => array( 'on' => array('name'=>'enable', 'value' =>'en'), 'off' => array('name'=>'disable', 'value' =>'dis') ) ), array( 'id' => 'draggable_map_back', 'type' => 'toggle_switch', 'label' => __( 'Draggable', 'builder-tiles' ), 'options' => array( 'on' => array('name'=>'enable', 'value' =>'en'), 'off' => array('name'=>'disable', 'value' =>'dis') ) ) ) ), array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_text tb_tile_options_gallery', 'options'=>array( array( 'id' => 'action_text_back', 'type' => 'text', 'label' => __('Action Button', 'builder-tiles'), 'class' => 'fullwidth' ), array( 'id' => 'action_link_back', 'type' => 'text', 'label' => __('Button Link', 'builder-tiles'), 'class' => 'fullwidth', 'binding' => array( 'empty' => array( 'hide' =>'action_param_back' ), 'not_empty' => array( 'show' =>'action_param_back' ) ) ), array( 'id' => 'action_param_back', 'type' => 'checkbox', 'label' => '', 'options' => array( array( 'name' => 'lightbox', 'value' => __('Open link in lightbox', 'builder-tiles')), array( 'name' => 'newtab', 'value' => __('Open link in new tab', 'builder-tiles')) ), 'new_line' => false, 'control'=>false ) ) ), array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_button tb_tile_options_text tb_tile_options_gallery tb_tile_options_map', 'options' => array( array( 'id' => 'tile_autoflip', 'type' => 'select', 'label' => __( 'Auto Flip', 'builder-tiles' ), 'options' => array( '0' => __( 'Disabled', 'builder-tiles' ), '1' => __( '1 Second', 'builder-tiles' ), '2' => __( '2 Second', 'builder-tiles' ), '3' => __( '3 Second', 'builder-tiles' ), '4' => __( '4 Second', 'builder-tiles' ), '5' => __( '5 Second', 'builder-tiles' ), '6' => __( '6 Second', 'builder-tiles' ), '7' => __( '7 Second', 'builder-tiles' ), '8' => __( '8 Second', 'builder-tiles' ), '9' => __( '9 Second', 'builder-tiles' ), '10' => __( '10 Second', 'builder-tiles' ) ) ), array( 'id' => 'flip_effect', 'type' => 'select', 'label' => __( 'Flip Effect', 'builder-tiles' ), 'options' => array( 'flip-horizontal' => __( 'Horizontal Flip', 'builder-tiles' ), 'flip-vertical' => __( 'Vertical Flip', 'builder-tiles' ), 'fadeIn' => __( 'Fade In', 'builder-tiles' ), 'fadeInUp' => __( 'fadeInUp', 'builder-tiles' ), 'fadeInLeft' => __( 'fadeInLeft', 'builder-tiles' ), 'fadeInRight' => __( 'fadeInRight', 'builder-tiles' ), 'fadeInDown' => __( 'fadeInDown', 'builder-tiles' ), 'zoomInUp' => __( 'zoomInUp', 'builder-tiles' ), 'zoomInLeft' => __( 'zoomInLeft', 'builder-tiles' ), 'zoomInRight' => __( 'zoomInRight', 'builder-tiles' ), 'zoomInDown' => __( 'zoomInDown', 'builder-tiles' ) ) ) ) ), array( 'type'=>'group', 'wrap_class' => 'tb_tile_options tb_tile_options_button tb_tile_options_text', 'options'=>array( array( 'label' => __( 'Custom Style', 'builder-tiles' ), 'type' => 'multi', 'options' => array( array( 'id' => 'background_color_back', 'type' => 'color', 'label' => __('Background Color', 'builder-tiles') ), array( 'id' => 'text_color_back', 'type' => 'color', 'label' => __('Text Color', 'builder-tiles') ), array( 'id' => 'link_color_back', 'type' => 'color', 'label' => __('Link Color', 'builder-tiles') ) ) ), array( 'id' => 'background_image_back', 'type' => 'image', 'label' => __('Background Image', 'builder-tiles'), 'binding'=>array( 'empty' => array( 'hide' =>'bg_image_back' ), 'not_empty' => array( 'show' =>'bg_image_back' ) ) ), array( 'label' => __( 'Image Size', 'builder-tiles' ), 'wrap_class'=>'bg_image_back', 'type' => 'multi', 'options' => array( array( 'id' => 'background_image_back_width', 'type' => 'range', 'label' =>'w', 'units' => array( 'px' => array( 'max' => 2000 ) ) ), array( 'id' => 'background_image_back_height', 'type' => 'range', 'label' => 'ht', 'units' => array( 'px' => array( 'max' => 2000 ) ) ) ) ) ) ) ) ) ) ), array( 'id' => 'css_class', 'type' => 'custom_css', ), array('type'=>'custom_css_id') ); } public function get_live_default() { return array( 'title_front' => __( 'Tile Title', 'builder-tiles' ), 'text_front' => __( 'Tile content', 'builder-tiles' ), 'address_map_front'=>'', 'address_map_back'=>'', 'type_back'=>'text', 'type_front'=>'text', 'zoom_map_front'=>'8', 'zoom_map_back'=> '8', 'scrollwheel_map_front'=> 'enable', 'scrollwheel_map_back'=> 'enable', 'draggable_map_front'=> 'enable', 'draggable_map_back'=> 'enable', 'type_map_front'=> 'ROADMAP', 'type_map_back'=> 'ROADMAP', 'size'=>'square-large', 'icon_type_front'=>'icon', 'icon_type_back'=>'icon', ); } public function get_icon(){ return 'layers-alt'; } public function get_styling() { /*START temp solution when the addon is new,the FW is old 09.03.19*/ if(version_compare(THEMIFY_VERSION, '4.5', '<')){ return array(); } return array( // Background self::get_expand('bg', array( self::get_tab(array( 'n' => array( 'options' => array( self::get_color(' .tile-flip-box-wrap', 'bg_c', 'bg_c', 'background-color') ) ), 'h' => array( 'options' => array( self::get_color(' .tile-flip-box-wrap', 'bg_c', 'bg_c', 'background-color', 'h') ) ) )) )), // Font self::get_expand('f', array( self::get_tab(array( 'n' => array( 'options' => array( self::get_font_family(), self::get_font_size(), self::get_line_height(array(' .tile-title',' .tile-content')), self::get_letter_spacing(array(' .tile-title',' .tile-content') ), self::get_text_align() ) ), 'h' => array( 'options' => array( self::get_font_family('','f_f','h'), self::get_font_size('','f_s','','h'), self::get_line_height(array(' .tile-title',' .tile-content'),'l_h','h'), self::get_letter_spacing(array(' .tile-title',' .tile-content'),'l_s','h'), self::get_text_align('','t_a','h') ) ) )) )), // Padding self::get_expand('p', array( self::get_tab(array( 'n' => array( 'options' => array( self::get_padding(' .tile-flip-box-wrap') ) ), 'h' => array( 'options' => array( self::get_padding(' .tile-flip-box-wrap','p','h'), ) ) )) )), // Border self::get_expand('b', array( self::get_tab(array( 'n' => array( 'options' => array( self::get_border(' .tile-flip-box-wrap') ) ), 'h' => array( 'options' => array( self::get_border(' .tile-flip-box-wrap','b','h'), ) ) )) )) ); } protected function _visual_template() { $fluid_tiles =in_array( Builder_Tiles::get_instance()->get_option( 'fluid_tiles' ), array( 'yes', 1, '1' ),true ) ? 'fluid-tile' : ''; $flip_button_enabled = apply_filters('builder_tiles_enable_flip_button', true); ?> <# var flip_effect,size, outEffect = { 'flip-horizontal': '', 'flip-vertical': '', 'fadeInUp': 'fadeOutDown', 'fadeIn': 'fadeOut', 'fadeInLeft': 'fadeOutLeft', 'fadeInRight': 'fadeOutRight', 'fadeInDown': 'fadeOutUp', 'zoomInUp': 'zoomOutDown', 'zoomInLeft': 'zoomOutLeft', 'zoomInRight': 'zoomOutRight', 'zoomInDown': 'zoomOutUp' }, module_classes = 'has-flip', size=data.size?data.size:'square-large'; if(data[ 'type_front' ]=== 'gallery' || data[ 'type_back' ]=== 'gallery'){ tb_app.activeModel.trigger('custom:preview:refresh',data); return ''; } if(data.flip_effect==='flip-left'){ flip_effect = 'flip-horizontal'; } else if(!data.flip_effect){ flip_effect = 'flip-horizontal'; } else{ flip_effect=data.flip_effect; } if( ( data.type_back === 'blank' ) || ( data.type_back === 'text' && data.text_back == '' && data.background_image_back == '' && data.title_back == '' ) || ( data.type_back === 'button' && data.title_back == '' && data.image_back == '' && data.icon_back == '' ) || ( data.type_back === 'gallery' && data.gallery_back == '' ) || ( data.type_back === 'map' && data.address_map_back == '' ) ) { module_classes = 'no-flip'; } module_classes+=' tile-type-front-'+data.type_front+' '+flip_effect+' <?php echo $fluid_tiles?>'; #> <div id="tile-{{ data.cid }}-{{ data.cid }}" class="module module-<?php echo $this->slug; ?> size-{{ size }} {{ data.css_class }} {{ module_classes }} tf_mw" data-auto-flip="{{ data.tile_autoflip }}" data-in-effect="{{ flip_effect }}" data-out-effect="{{ outEffect[ flip_effect ] }}"> <?php do_action( 'themify_builder_before_template_content_render' ); ?> <div class="tile-flip-box-wrap tf_abs tf_box tf_overflow tf_w tf_h"> <# _.each( ['front', 'back'], function( side ) { var type=data[ 'type_' + side ], scolor=data[ 'color_' + side ]=='default' || !data[ 'color_' + side ]?'tb_default_color':data[ 'color_' + side ]; if( type != 'blank' ){ var sel ='.tb_element_cid_' + data.cid+ '.module .tile-' + side, c=null, tileStyle = sel+'{'; if ( data['background_color_' + side ] ){ tileStyle+= 'background-color:'+ tb_app.Utils.toRGBA(data['background_color_' + side ]) +';'; } if ( data['background_image_' + side ] ){ tileStyle+= 'background-image:url("'+ data['background_image_' + side ] +'");'; } if ( data['text_color_' + side ] ) { c = tb_app.Utils.toRGBA(data['text_color_' + side ]); tileStyle+='color:'+c+';'; } tileStyle+= '}'; if ( data['link_color_' + side ] ){ tileStyle+=sel+' a{color:'+tb_app.Utils.toRGBA(data['link_color_' + side ])+';'; } tileStyle += '}'; if(c!==null){ tileStyle+=sel+' .tile-title{color:'+c+';}'; } #> <style> {{{tileStyle}}} </style> <# }#> <div class="tile-{{ side }} tile-type-{{ type }} ui {{ scolor }} tf_box tf_w tf_h tf_overflow<# if( side == 'back' ) {#> tf_abs tf_hidden<#}else{#> tf_rel<#}#>"> <div class="tile-inner tf_box"> <# if( type == 'text' ) { if( data[ 'title_' + side ] ) { #> <h4 class="tile-title">{{{ data[ 'title_' + side ] }}}</h4> <# } #> <div class="tile-content"> {{{ data[ 'text_' + side ] }}} </div> <# } else if( type== 'button' ) { var iconStyle = data[ 'icon_color_' + side ] ? 'color:' + tb_app.Utils.toRGBA( data[ 'icon_color_' + side ] ) : ''; if( data[ 'button_link_' + side ] ) { #> <a href="{{ data[ 'button_link_' + side ] }}"> <# } #> <# if( data[ 'title_' + side ] ) { #> <h4 class="tile-title">{{{ data[ 'title_' + side ] }}}</h4> <# } if( data[ 'icon_type_' + side ] == 'icon' && data[ 'icon_' + side ] ) { #> <span class="tile-icon" <# iconStyle && print( 'style="' + iconStyle + '"' ) #>><# print(tb_app.Utils.getIcon(data[ 'icon_' + side ]).outerHTML)#></span> <# } else if( data[ 'icon_type_' + side ] == 'image' && data[ 'image_' + side ] ) { #> <img src="{{ data[ 'image_' + side ] }}" alt="{{ data[ 'title_' + side ] }}" class="tile-icon"> <# } if( data[ 'button_link_' + side ] ) { #> </a> <# } } else if( type == 'map' && data[ 'address_map_' + side ]) { var address = data[ 'address_map_' + side ].trim().replace( /\s+/, '' ), zoom = data[ 'zoom_map_' + side ], type = data[ 'type_map_' + side ], scroll = data[ 'scrollwheel_map_' + side ] == 'enable', drag = data[ 'draggable_map_' + side ] == 'enable'; #> <div class="themify_map map-container tf_h" data-address="{{ address }}" data-zoom="{{ zoom }}" data-type="{{ type }}" data-scroll="{{ scroll }}" data-drag="{{ drag }}" ></div> <# } if(data['action_link_'+side] && (type=='text' || type=='gallery')){#> <a href="{{data['action_link_'+side]}}" class="action-button"><span></span> {{data['action_text_'+side]}} </a> <# } #> <?php if ($flip_button_enabled===true) echo '<a href="#" class="tile-flip-back-button tf_hide"></a>'; ?> </div> </div> <# } ); #> </div> <?php do_action( 'themify_builder_after_template_content_render' ); ?> </div> <?php } } Themify_Builder_Model::register_module( 'TB_Tile_Module' );
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка