golden hour
/home/godaofbq/hardchambers.com/wp-content/plugins/essential-blocks/includes/Blocks
⬆️ Go Up
Upload
File/Folder
Size
Actions
Accordion.php
1.03 KB
Del
OK
AccordionItem.php
335 B
Del
OK
AddToCart.php
3.43 KB
Del
OK
AdvancedHeading.php
4.59 KB
Del
OK
AdvancedImage.php
1.94 KB
Del
OK
AdvancedNavigation.php
703 B
Del
OK
AdvancedTabs.php
886 B
Del
OK
AdvancedVideo.php
1021 B
Del
OK
Breadcrumbs.php
11.37 KB
Del
OK
Button.php
351 B
Del
OK
CallToAction.php
365 B
Del
OK
Column.php
220 B
Del
OK
CountDown.php
605 B
Del
OK
DualButton.php
666 B
Del
OK
FeatureList.php
332 B
Del
OK
FlipBox.php
648 B
Del
OK
FluentForms.php
3.77 KB
Del
OK
Form.php
5.4 KB
Del
OK
FormTextField.php
246 B
Del
OK
GoogleMap.php
2.55 KB
Del
OK
Icon.php
323 B
Del
OK
ImageComparison.php
620 B
Del
OK
ImageGallery.php
2.26 KB
Del
OK
InfoBox.php
374 B
Del
OK
InstagramFeed.php
5.89 KB
Del
OK
InteractivePromo.php
321 B
Del
OK
LottieAnimation.php
608 B
Del
OK
NftGallery.php
649 B
Del
OK
Notice.php
580 B
Del
OK
NumberCounter.php
598 B
Del
OK
Openverse.php
480 B
Del
OK
ParallaxSlider.php
664 B
Del
OK
PopUp.php
625 B
Del
OK
PostBlock.php
1.57 KB
Del
OK
PostCarousel.php
4.59 KB
Del
OK
PostGrid.php
5.75 KB
Del
OK
PostMeta.php
3.51 KB
Del
OK
PricingTable.php
333 B
Del
OK
ProductDetails.php
3.51 KB
Del
OK
ProductImages.php
2.83 KB
Del
OK
ProductPrice.php
4.75 KB
Del
OK
ProductRating.php
2.97 KB
Del
OK
ProgressBar.php
604 B
Del
OK
Row.php
455 B
Del
OK
ShapeDivider.php
602 B
Del
OK
Slider.php
996 B
Del
OK
Social.php
352 B
Del
OK
SocialShare.php
3.89 KB
Del
OK
Tab.php
214 B
Del
OK
TableOfContents.php
17.31 KB
Del
OK
Taxonomy.php
4.9 KB
Del
OK
TeamMember.php
361 B
Del
OK
Testimonial.php
373 B
Del
OK
Text.php
2.48 KB
Del
OK
ToggleContent.php
613 B
Del
OK
TypingText.php
594 B
Del
OK
WPForms.php
2.92 KB
Del
OK
WooProductGrid.php
8.39 KB
Del
OK
Wrapper.php
359 B
Del
OK
price.php
239 B
Del
OK
Edit: Form.php
<?php namespace EssentialBlocks\Blocks; use EssentialBlocks\Core\Block; use EssentialBlocks\Utils\Helper; class Form extends Block { protected $frontend_scripts = [ 'essential-blocks-form-frontend' ]; protected $frontend_styles = [ 'essential-blocks-fontawesome' ]; /** * Default attributes * * @var array */ protected $default_attributes; public function __construct() { $this->default_attributes = [ 'btnAddIcon' => false, 'iconPosition' => 'right', 'buttonText' => __( 'Submit', 'essential-blocks' ), 'icon' => 'fas fa-chevron-right', 'formLayout' => 'block', 'formStyle' => 'form-style-classic' ]; } /** * Unique name of the block. * @return string */ public function get_name() { return 'form'; } /** * Initialize the InnerBlocks for Accordion * @return array<Block> */ public function inner_blocks() { return [ FormTextField::get_instance() ]; } /** * Register all other scripts * @return void */ public function register_scripts() { $this->assets_manager->register( 'form-frontend', $this->path() . '/frontend.js', [ 'essential-blocks-babel-bundle' ] ); } /** * Render callback */ public function render_callback( $attributes, $content ) { if ( is_admin() ) { return; } //Modify wp_kses rules for Form Block kses add_filter( 'wp_kses_allowed_html', [ new Helper, 'eb_allowed_html' ], 99, 2 ); $_essential_attributes = [ 'formType' => 'contact_form', 'preset' => 'contact_form_1', 'confirmationType' => 'message', 'successMessage' => __( 'Your form has been submitted Successfully!', 'essential-blocks' ), 'errorMessage' => __( 'Your form couldn\'t been submitted! Please try again', 'essential-blocks' ) ]; foreach ( $_essential_attributes as $key => $value ) { if ( isset( $attributes[ $key ] ) && is_bool( $attributes[ $key ] ) ) { $_essential_attributes[ $key ] = $attributes[ $key ]; } elseif ( ! empty( $attributes[ $key ] ) ) { $_essential_attributes[ $key ] = $attributes[ $key ]; } else { $_essential_attributes[ $key ] = $value; } } $attributes = wp_parse_args( $attributes, $this->default_attributes ); if ( empty( $attributes[ 'formType' ] ) ) { return ''; } if ( empty( $content ) ) { return ''; } $classHook = isset( $attributes[ 'classHook' ] ) ? $attributes[ 'classHook' ] : ''; $submit_btn_attr = apply_filters( 'eb_form_submit_btn_attr', [ 'data-id' => $attributes[ 'blockId' ], 'data-form-id' => $attributes[ 'formId' ] ] ); $submit_btn_classes = apply_filters( 'eb_form_submit_btn_classes', 'btn btn-primary eb-form-submit-button' ); $submit_button_icon = sprintf( '%1$s', Helper::eb_render_icon( Helper::eb_get_icon_type( $attributes[ 'icon' ] ), 'eb-button-icon', $attributes[ 'icon' ] ) ); $submit_button_html = sprintf( '<button type="submit" class="%1$s" %2$s> %4$s%3$s%5$s <img class="eb-form-submit-loader" src="%6$sassets/images/loading.svg" /> </button>', $submit_btn_classes, http_build_query( $submit_btn_attr, '', ' ' ), $attributes[ 'buttonText' ], $attributes[ 'btnAddIcon' ] && $attributes[ 'iconPosition' ] === 'left' ? $submit_button_icon : '', $attributes[ 'btnAddIcon' ] && $attributes[ 'iconPosition' ] === 'right' ? $submit_button_icon : '', ESSENTIAL_BLOCKS_URL ); $confirmation_div_attr = apply_filters( 'eb_form_confirmation_div_attr', [ 'data-confirmation-type' => esc_attr( $_essential_attributes[ 'confirmationType' ] ), 'data-success' => esc_html( $_essential_attributes[ 'successMessage' ] ), 'data-error' => esc_html( $_essential_attributes[ 'errorMessage' ] ) ], $attributes ); $attributes_html = ''; foreach ( $confirmation_div_attr as $key => $value ) { $attributes_html .= sprintf( '%s="%s" ', esc_attr( $key ), esc_attr( $value ) ); } $confirmation_div_html = sprintf( '<div class="eb_form_submit_response" %1$s></div>', trim( $attributes_html ) ); // $confirmation_div_html = sprintf( // '<div class="eb_form_submit_response" %1$s></div>', // http_build_query( $confirmation_div_attr, '', ' ' ) // ); ob_start(); Helper::views( 'form-block', array_merge( $attributes, [ 'essentialAttr' => $_essential_attributes, 'classHook' => $classHook, 'submit_button_html' => $submit_button_html, 'confirmation_div_html' => $confirmation_div_html, 'content' => $content, 'nonce' => wp_create_nonce( $attributes[ 'blockId' ] . '-nonce' ) ] ) ); return ob_get_clean(); } }
Save