'desc' => __( 'Change the width of your elements and let them appear beside each other instead of underneath', 'avia_framework' ), 'id' => 'width', 'type' => 'select', 'std' => '', 'lockable' => true, 'required' => array( 'type', 'parent_not_in_array', 'html,headline,empty_line' ), 'subtype' => array( __( 'Fullwidth', 'avia_framework' ) => '', '1/2' => 'element_half', '1/3' => 'element_third' , '2/3' => 'element_two_third', '1/4' => 'element_fourth', '3/4' => 'element_three_fourth' ) ), array( 'name' => __( 'Heading Type', 'avia_framework' ), 'desc' => __( 'Select which kind of heading you want to display.', 'avia_framework' ), 'id' => 'headline_tag', 'type' => 'select', 'std' => 'h3', 'lockable' => true, 'required' => array( 'type', 'equals', 'headline' ), 'subtype' => array( 'H1' => 'h1', 'H2' => 'h2', 'H3' => 'h3', 'H4' => 'h4', 'H5' => 'h5', 'H6' => 'h6' ) ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'modal_styling_width' ), $c ); } /** * Editor Sub Element - this function defines the visual appearance of an element that is displayed within a modal window and on click opens its own modal window * Works in the same way as Editor Element * @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. */ function editor_sub_element( $params ) { $default = array(); $locked = array(); $attr = $params['args']; Avia_Element_Templates()->set_locked_attributes( $attr, $this, $this->config['shortcode_nested'][0], $default, $locked ); $template = $this->update_template_lockable( 'label', __( 'Element', 'avia_framework' ) . ': {{label}}', $locked ); $params['innerHtml'] = ''; $params['innerHtml'] .= "
"; $params['innerHtml'] .= '
class_by_arguments_lockable( 'check' ,$attr, $locked ) . '>'; $params['innerHtml'] .= "" . __( 'Element', 'avia_framework' ) . ": {$attr['label']}"; $params['innerHtml'] .= " *"; $params['innerHtml'] .= '
'; $params['innerHtml'] .= '
'; 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 * @return string $output returns the modified html string */ function shortcode_handler( $atts, $content = '', $shortcodename = '', $meta = '' ) { $default = apply_filters( 'avf_sc_contact_default_atts', array( 'email' => get_option( 'admin_email' ), 'from_email' => '', 'button' => __( 'Submit', 'avia_framework' ), 'autoresponder_email' => '', 'autoresponder_subject' => '', 'autoresponder_reply_to' => '', 'autorespond' => '', 'autorespond_after' => '', 'captcha' => '', 'captcha_theme' => 'light', 'captcha_size' => 'normal', 'captcha_score' => '', 'subject' => '', 'on_send' => '', 'link' => '', 'sent' => __( 'Your message has been sent!', 'avia_framework' ), 'title' => __( 'Send us mail', 'avia_framework' ), 'color' => '', 'hide_labels' => '', 'form_align' => '' )); $locked = array(); Avia_Element_Templates()->set_locked_attributes( $atts, $this, $shortcodename, $default, $locked, $content ); Avia_Element_Templates()->add_template_class( $meta, $atts, $default ); $meta = aviaShortcodeTemplate::set_frontend_developer_heading_tag( $atts, $meta ); extract( AviaHelper::av_mobile_sizes( $atts ) ); //return $av_font_classes, $av_title_font_classes and $av_display_classes $atts = shortcode_atts( $default, $atts, $this->config['shortcode'] ); /** * For backwards comp. only - can be removed in future versions * In this case set default value in shortcode_atts to get_option('admin_email') * * @since 4.4.2 */ if( empty( $atts['autoresponder_email'] ) ) { $atts['autoresponder_email'] = $atts['email']; } /** * For backwards comp. only - can be removed in future versions * * @since 4.6.2 */ if( empty( $atts['captcha_theme'] ) ) { $atts['captcha_theme'] = 'light'; } if( empty( $atts['autoresponder_subject'] ) ) { $atts['autoresponder_subject'] = __( 'Thank you for your Message!', 'avia_framework' ); } extract( $atts ); $post_id = function_exists( 'avia_get_the_id' ) ? avia_get_the_id() : get_the_ID(); $redirect = ! empty( $on_send ) ? AviaHelper::get_url( $link ) : ''; if( ! empty( $form_align ) ) { $meta['el_class'] .= ' av-centered-form '; } $default_heading = ! empty( $meta['heading_tag'] ) ? $meta['heading_tag'] : 'h3'; $args = array( 'heading' => $default_heading, 'extra_class' => $meta['heading_class'] ); $extra_args = array( $this, $atts, $content, 'title' ); /** * @since 4.5.7.2 * @return array */ $args = apply_filters( 'avf_customize_heading_settings', $args, __CLASS__, $extra_args ); $heading = ! empty( $args['heading'] ) ? $args['heading'] : $default_heading; $css = ! empty( $args['extra_class'] ) ? $args['extra_class'] : $meta['heading_class']; $form_args = array( 'heading' => $title ? "<{$heading} class='{$css}'>{$title}" : '', 'success' => "<{$heading} class='avia-form-success {$css}'>{$sent}", 'submit' => $button, 'myemail' => $email, 'myfrom' => $from_email, 'action' => get_permalink( $post_id ), 'myblogname' => get_option( 'blogname' ), 'autoresponder' => $autorespond, 'autoresponder_after' => $autorespond_after, 'autoresponder_subject' => $autoresponder_subject, 'autoresponder_email' => $autoresponder_email, 'autoresponder_reply_to' => $autoresponder_reply_to, 'subject' => $subject, 'form_class' => $meta['el_class'] . ' ' . $color . ' ' . $av_display_classes, 'multiform' => true, //allows creation of multiple forms without id collision 'label_first' => true, 'redirect' => $redirect, 'placeholder' => $hide_labels, 'numeric_names' => true, 'el-id' => $meta['custom_el_id'], 'aria_label' => $meta['aria_label'], 'captcha' => '' ); if( trim( $form_args['myemail'] ) == '') { $form_args['myemail'] = get_option('admin_email'); } $content = str_replace( "\,", ',', $content ); $content = ShortcodeHelper::shortcode2array( $content, 1 ); foreach( $content as $key => &$item ) { $item_def = $this->get_default_modal_group_args(); Avia_Element_Templates()->set_locked_attributes( $item['attr'], $this, $this->config['shortcode_nested'][0], $item_def, $locked, $item['content'] ); } unset( $item ); //form fields passed by the user $form_fields = $this->helper_array2form_fields( $content ); //fake username field that is not visible. if the field has a value a spam bot tried to send the form $elements['avia_username'] = array( 'type'=>'decoy', 'label'=>'', 'check'=> 'must_empty' ); //captcha field for the user to verify that he is real $google = in_array( $captcha, array( 'recaptcha_v2', 'recaptcha_v3' ) ); if( 'active' == $captcha || ( $google && Avia_Google_reCAPTCHA()->is_loading_prohibited() ) ) { $form_args['captcha'] = 'active'; $elements['avia_age'] = array( 'type' => 'captcha', 'check' => 'captcha', 'label' => __( 'Please prove that you are human by solving the equation', 'avia_framework' ) ); } else if( $google ) { $form_args['captcha'] = $captcha; $elements['avia_age'] = array( 'type' => 'grecaptcha', 'container_class' => '', 'custom_class' => '', 'context' => 'av_contact_form', 'token_input' => 'av_recaptcha_token', 'version' => 'avia_' . $captcha, 'theme' => $captcha_theme, 'size' => $captcha_size, 'score' => $captcha_score, 'text_to_preview' => Avia_Builder()->in_text_to_preview_mode() ); } //merge all fields $form_fields = apply_filters( 'avia_contact_form_elements', array_merge( $form_fields, $elements ) ); $form_fields = apply_filters( 'avf_sc_contact_form_elements', $form_fields, $atts ); $form_args = apply_filters( 'avia_contact_form_args', $form_args, $post_id ); $contact_form = new avia_form( $form_args ); $contact_form->create_elements( $form_fields ); $output = $contact_form->display_form( true ); return $output; } /** * Converts the shortcode sub array into the format necessary for the contact form * * @param array $base * @return array */ protected function helper_array2form_fields( $base ) { $form_fields = array(); $labels = array(); if( is_array( $base ) ) { foreach( $base as $key => $field ) { $sanizited_id = trim( strtolower( $field['attr']['label'] ) ); $labels[ $sanizited_id ] = empty( $labels[ $sanizited_id ] ) ? 1 : $labels[ $sanizited_id ] + 1; if( $labels[ $sanizited_id ] > 1 ) { $sanizited_id = $sanizited_id . '_' . $labels[ $sanizited_id ]; } $form_fields[ $sanizited_id ] = $field['attr']; if( ! empty( $field['content'] ) ) { $form_fields[ $sanizited_id ]['content'] = ShortcodeHelper::avia_apply_autop( $field['content'] ); } } } return $form_fields; } } } {"version":"1.0","provider_name":"Stichting Collot Zien en Beleven","provider_url":"https:\/\/www.collotzienenbeleven.nl","author_name":"Stichting Collot Zien en Beleven","author_url":"https:\/\/www.collotzienenbeleven.nl","title":"Intense Casino 100 Free Spins","type":"rich","width":600,"height":338,"html":"
Intense Casino 100 Free Spins<\/a><\/blockquote>