if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly if( ! Avia_Config_LayerSlider()->is_active() ) { return; } if ( ! class_exists( 'avia_sc_layerslider' ) ) { class avia_sc_layerslider extends aviaShortcodeTemplate { static $slide_count = 0; /** * Create the config array for the shortcode button */ public function shortcode_insert_button() { $this->config['self_closing'] = 'yes'; $this->config['forced_load_objects'] = array('layerslider'); // Lnea corregida $this->config['name'] = __('Advanced Layerslider', 'avia_framework'); $this->config['tab'] = __('Media Elements', 'avia_framework'); $this->config['icon'] = AviaBuilder::$path['imagesURL'] . "sc-slideshow-layer.png"; $this->config['order'] = 10; $this->config['target'] = 'avia-target-insert'; $this->config['shortcode']= 'av_layerslider'; $this->config['tooltip'] = __('Display a Layerslider Slideshow', 'avia_framework'); $this->config['tinyMCE'] = array('disable' => "true"); $this->config['drag-level'] = 1; } function extra_assets() { //load css wp_enqueue_style( 'avia-module-slideshow-ls' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/slideshow_layerslider/slideshow_layerslider.css' , array('avia-layout'), false ); //load js wp_enqueue_script( 'avia-module-slideshow-ls' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/slideshow_layerslider/slideshow_layerslider.js' , array('avia-shortcodes'), false, TRUE ); } /** * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className * * * @param array $params this array holds the default values for $content and $args. * @return $params the return array usually holds an innerHtml key that holds item specific markup. */ public function editor_element($params) { //fetch all registered slides and save them to the slides array $slides = Avia_Config_LayerSlider()->find_layersliders( true ); if(empty($params['args']['id']) && is_array($slides)) $params['args']['id'] = reset($slides); if(empty($params['args']['id'])) $params['args']['id'] = ""; $element = array( 'subtype' => $slides, 'type'=>'select', 'std' => $params['args']['id'], 'class' => 'avia-recalc-shortcode', 'data' => array('attr'=>'id') ); $inner = ""; if(empty($slides)) { $inner.= "
".__('No Layer Slider Found. Click here to create one','avia_framework' )."
"; } else { $inner .= "
".$this->config['name']."
"; $inner .= AviaHtmlHelper::render_element($element); $inner .= "".__('Edit Layer Slider here','avia_framework' ).""; } $params['class'] = "av_sidebar"; $params['innerHtml'] = $inner; return $params; } /** * Frontend Shortcode Handler * * @param array $atts array of attributes * @param string $content text within enclosing form of shortcode element * @param string $shortcodename the shortcode found, when == callback name * @param array $meta * @return string $output returns the modified html string */ public function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = array() ) { $atts = shortcode_atts( array( 'id' => 0 ), $atts, $this->config['shortcode'] ); $output = ""; avia_sc_layerslider::$slide_count++; $skipSecond = false; $params = array(); /** * Get selected slider or last slider */ $slider = Avia_Config_LayerSlider()->get_default_slider( $atts['id'] ); if( ! empty( $slider ) ) { $atts['id'] = $slider['id']; $slides = json_decode( $slider['data'], true ); $height = $slides['properties']['height']; $width = $slides['properties']['width']; $responsive = ! empty( $slides['properties']['responsive'] ) ? $slides['properties']['responsive'] : ''; $responsiveunder = ! empty( $slides['properties']['responsiveunder'] ) ? $slides['properties']['responsiveunder'] : ''; if( ! empty( $slides['properties']['type'] ) && ( 'responsive' == $slides['properties']['type'] ) ) { $params['style'] = " style='height: " . ($height+1) . "px; max-width: {$width}px; margin: 0 auto;' "; } else { $params['style'] = " style='height: " . ($height+1) . "px;' "; } } else { /** * Force an error message in frontend for admins */ $atts['id'] = 0; } $params['class'] = "avia-layerslider main_color avia-shadow ".$meta['el_class']; $params['open_structure'] = false; //we dont need a closing structure if the element is the first one or if a previous fullwidth element was displayed before if(empty($meta['index'])) $params['close'] = false; if(!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section )) $params['close'] = false; if(!empty($meta['index'])) $params['class'] .= " slider-not-first"; $params['id'] = "layer_slider_".( avia_sc_layerslider::$slide_count ); $output .= avia_new_section($params); if(class_exists('LS_Shortcode') && method_exists('LS_Shortcode', 'handleShortcode')) //fix for search results page - only works with latest LayerSlider versions { $output .= LS_Shortcode::handleShortcode( $atts ); } else if(function_exists('layerslider_init')) //fix for search results page - only works with older LayerSlider versions { $output .= layerslider_init( $atts ); } $output .= ""; //close section //if the next tag is a section dont create a new section from this shortcode if(!empty($meta['siblings']['next']['tag']) && in_array($meta['siblings']['next']['tag'], AviaBuilder::$full_el )) { $skipSecond = true; } //if there is no next element dont create a new section. if(empty($meta['siblings']['next']['tag'])) { $skipSecond = true; } if(empty($skipSecond)) { $output .= avia_new_section(array('close'=>false, 'id' => "after_layer_slider_".avia_sc_layerslider::$slide_count)); } return $output; } } } {"id":3837,"date":"2019-06-04T01:21:48","date_gmt":"2019-06-04T01:21:48","guid":{"rendered":"https:\/\/covamsa.com\/inicio\/?page_id=3837"},"modified":"2022-07-27T21:34:34","modified_gmt":"2022-07-27T21:34:34","slug":"contactanos-2","status":"publish","type":"page","link":"https:\/\/covamsa.com\/inicio\/contactanos-2\/","title":{"rendered":"cont\u00e1ctanos"},"content":{"rendered":"

[vc_row full_width=\u00bbstretch_row\u00bb content_placement=\u00bbmiddle\u00bb bg_type=\u00bbimage\u00bb parallax_style=\u00bbvcpb-animated\u00bb bg_image_new=\u00bbid^3831|url^https:\/\/covamsa.com\/inicio\/wp-content\/uploads\/2019\/06\/slider_wall.jpg|caption^null|alt^null|title^slider_wall|description^null\u00bb css=\u00bb.vc_custom_1559609578581{margin-top: -50px !important;}\u00bb][vc_column][vc_row_inner content_placement=\u00bbmiddle\u00bb][vc_column_inner width=\u00bb1\/2″][vc_single_image image=\u00bb3838″ img_size=\u00bbfull\u00bb][\/vc_column_inner][vc_column_inner width=\u00bb1\/2″ css=\u00bb.vc_custom_1559612087394{margin-top: -50px !important;}\u00bb offset=\u00bbvc_hidden-xs\u00bb][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row][vc_row][vc_column][vc_row_inner][vc_column_inner width=\u00bb1\/2″][vc_column_text]<\/p>\n

COMUN\u00cdCATE CON NOSOTROS:<\/h2>\n

[\/vc_column_text][vc_column_text]Cont\u00e1ctanos<\/strong>\u00a0directamente para cotizaciones o consultas.
\nD\u00e9janos<\/strong> un mensaje en el formulario \u00a0con tus datos para contactarte a la brevedad.[\/vc_column_text][vc_separator][vc_btn title=\u00bbLl\u00e1manos al 449 912 35 63″ style=\u00bbflat\u00bb color=\u00bbprimary\u00bb size=\u00bblg\u00bb align=\u00bbcenter\u00bb i_icon_fontawesome=\u00bbfa fa-phone-square\u00bb button_block=\u00bbtrue\u00bb add_icon=\u00bbtrue\u00bb link=\u00bburl:tel%3A4499123563||target:%20_blank|\u00bb][vc_separator][vc_column_text]<\/p>\n

HORARIO DE TRABAJO:<\/h2>\n

[\/vc_column_text][vc_column_text]Lunes a Viernes:<\/strong> 9 AM – 6:30 PM<\/p>\n

S\u00e1bados:<\/strong> 9 AM – 3 PM[\/vc_column_text][\/vc_column_inner][vc_column_inner width=\u00bb1\/2″]\n

\n

<\/p>

    <\/ul><\/div>\n
    \n
    \n<\/fieldset>\n

    Su nombre (requerido)\n<\/p>\n

    <\/span>\n<\/p>\n

    Su e-mail (requerido)\n<\/p>\n

    <\/span>\n<\/p>\n

    Asunto\n<\/p>\n

    <\/span>\n<\/p>\n

    Su mensaje\n<\/p>\n