D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ltfsolutionsco
/
www
/
wp-content
/
plugins
/
fusion-core
/
shortcodes
/
Filename :
fusion-contact-form.php
back
Copy
<?php /** * Fusion-Builder Shortcode Element. * * @package Fusion-Core * @since 3.9.2 */ /** * Shortcode class. * * @package Fusion-Core * @since 3.9.2 */ class FusionSC_Contact_Form { /** * Constructor. * * @access public * @since 3.9.2 */ public function __construct() { add_shortcode( 'fusion_contact_form', [ $this, 'render' ] ); // Add the contact form to Avada's contact page template. add_action( 'avada_add_contact_template_contents', [ $this, 'echo_contact_form' ] ); } /** * Echos the element. * * @access public * @since 3.9.2 * @return void */ public function echo_contact_form() { $this->render( [ 'echo' => 1 ] ); } /** * Render the element. * * @access public * @since 3.9.2 * @param array $args Shortcode parameters. * @param string $content Content between shortcode. * @return void|string HTML output. */ public function render( $args, $content = '' ) { $fusion_settings = FusionCore_Plugin::get_fusion_settings(); $args = shortcode_atts( [ 'email_address' => $fusion_settings ? $fusion_settings->get( 'email_address' ) : '', 'recaptcha_version' => $fusion_settings ? $fusion_settings->get( 'recaptcha_version' ) : 'v3', 'recaptcha_color_scheme' => $fusion_settings ? $fusion_settings->get( 'recaptcha_color_scheme' ) : 'light', 'public_key' => $fusion_settings ? $fusion_settings->get( 'recaptcha_public' ) : '', 'private_key' => $fusion_settings ? $fusion_settings->get( 'recaptcha_private' ) : '', 'badge_position' => $fusion_settings ? $fusion_settings->get( 'recaptcha_badge_position' ) : 'inline', 'comment_position' => $fusion_settings ? $fusion_settings->get( 'contact_comment_position' ) : 'below', 'privacy_checkbox' => $fusion_settings ? $fusion_settings->get( 'contact_form_privacy_checkbox' ) : 0, 'privacy_label' => $fusion_settings ? $fusion_settings->get( 'contact_form_privacy_label' ) : '', 'echo' => 0, ], $args, 'fusion_contact_form' ); /** * Instantiate the Fusion_Contact class. */ $fusion_contact = new Fusion_Contact( $args ); if ( $args['echo'] ) { $fusion_contact->get_recaptcha_script(); $fusion_contact->get_error_messages(); $fusion_contact->get_contact_form(); } else { ob_start(); $fusion_contact->get_recaptcha_script(); $fusion_contact->get_error_messages(); $fusion_contact->get_contact_form(); $html = ob_get_clean(); return $html; } } } new FusionSC_Contact_Form();
Name
Size
Last Modified
Owner
Permissions
Actions
previews
Dir
May 15 2023 2:21:53
ltfsolutionsco
0755
.htaccess
0.193
KB
June 03 2023 12:11:58
ltfsolutionsco
0644
fusion-contact-form.php
2.53
KB
October 23 2019 10:16:09
ltfsolutionsco
0755
fusion-faq.php
46.949
KB
October 23 2019 10:16:09
ltfsolutionsco
0755
fusion-fusionslider.php
27.788
KB
October 23 2019 10:16:09
ltfsolutionsco
0755
fusion-portfolio.php
97.797
KB
October 23 2019 10:16:09
ltfsolutionsco
0755
fusion-privacy.php
11.937
KB
October 23 2019 10:16:09
ltfsolutionsco
0755
2017 © D7net | D704T team