/home/altere25/infinet.finance/wp-content/plugins/weforms/includes
Edit: /home/altere25/infinet.finance/wp-content/plugins/weforms/includes/class-frontend-form.php (6806B)
%s
', $type, $message );
}
/**
* Render contact form shortcode
*
* @param array $atts
* @param string $contents
*
* @return string
*/
public function render_shortcode( $atts, $contents = '' ) {
extract( shortcode_atts( [ 'id' => 0 ], $atts ) );
weforms()->scripts->register_frontend();
weforms()->scripts->enqueue_frontend();
ob_start();
$form = weforms()->form->get( $id );
if ( !$form->id ) {
return $this->show_error( __( 'The form couldn\'t be found.', 'weforms' ) );
}
$is_open = $form->is_submission_open();
if ( is_wp_error( $is_open ) ) {
return $this->show_error( $is_open->get_error_message() );
}
$this->render_form( $form, $atts );
return ob_get_clean();
}
/**
* Render the form
*
* @param \WeForms_Form $form
*
* @return void
*/
public function render_form( $form, $atts ) {
$form_fields = $form->get_fields();
$form_settings = $form->get_settings();
$show_credit = weforms_get_settings( 'credit', false );
$formid = 'weforms-' . $form->id;
$use_theme_css = isset( $form_settings['use_theme_css'] ) ? $form_settings['use_theme_css'] : 'wpuf-style';
// if ( $use_theme_css === $form_settings['use_theme_css'] ) {
// wp_dequeue_style( 'weforms-css' );
// }
if ( isset( $atts['modal'] ) && 'true' == $atts['modal'] ) {
wp_enqueue_script( 'weforms-modal-js', WEFORMS_ASSET_URI . '/modal/jquery.modal.js', [ 'jquery', 'weforms-form' ], false, false );
wp_enqueue_style( 'weforms_modal_styles', WEFORMS_ASSET_URI . '/modal/jquery.modal.css' );
$modal_class = 'modal';
$modal_id = 'modal-form';
$modal_style = 'style="display:none"';
} else {
$modal_class = $modal_id = $modal_style = '';
} ?>