This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Validate confirmation email ref (https://github.com/elementor/elementor/issues/8684) | |
add_action( 'elementor_pro/forms/validation', function ( $record, $ajax_handler ) { | |
// Create variables representing the field ids of the fields | |
$first_email_field = $record->get_field( ['id' => 'email'] ); // Field ID (Advanced tab) is "email" | |
$second_email_field = $record->get_field( ['id' => 'email_confirm'] ); // Field ID (Advanced tab) is "email_confirm" | |
if ( property_exists( $second_email_field ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Validate password form | |
add_action('elementor_pro/forms/validation', function ( $record, $ajax_handler ) { | |
//make sure its our form | |
$form_name = $record->get_form_settings( 'form_name' ); | |
// Replace MY_FORM_NAME with the name you gave your form | |
if ( 'Sign-up' !== $form_name ) { | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'elementor_pro/forms/new_record', 'planbproject_elementor_form_create_new_user' , 10, 2 ); | |
function planbproject_elementor_form_create_new_user($record,$ajax_handler) // creating function | |
{ | |
$form_name = $record->get_form_settings('form_name'); | |
//Check that the form is the "Sign Up" if not - stop and return; | |
if ('Sign Up' !== $form_name) { // Add form name | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'elementor_pro/forms/validation/email', function( $field, $record, $ajax_handler ) { | |
// Get submitted form data. | |
$raw_fields = $record->get( 'fields' ); | |
foreach ( $raw_fields as $id => $field ) { | |
$fields[ $id ] = $field['value']; | |
if ($field[ 'id' ] == 'FirstName'){ | |
$FirstName = $field[ 'value' ]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? add_action( 'elementor_pro/forms/new_record', function( $record, $handler ) { | |
//Setar o form_name | |
$form_name = $record->get_form_settings( 'form_name' ); | |
//Definir o formulário | |
if ( 'contato' !== $form_name ) { | |
return; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Theme functions and definitions. | |
* | |
* For additional information on potential customization options, | |
* read the developers' documentation: | |
* | |
* https://developers.elementor.com/docs/hello-elementor-theme/ | |
* | |
* @package HelloElementorChild |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"settings": { | |
"typography": { | |
"fontFamilies": [ | |
{ "fontFamily": "Rubik, sans-serif", "slug": "mpons-rubik", "name": "Mpons Rubik" } | |
], | |
"fontSizes": [ | |
{ "slug": "small", "size": "0.75rem", "name": "Small" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Check if GD is installed | |
if (!extension_loaded('gd')) { | |
die("GD library is not installed. Please enable it in your PHP configuration."); | |
} | |
// Set image dimensions and properties | |
$width = 1200; | |
$height = 900; | |
$backgroundColor = [240, 240, 240]; // Light gray background |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Here we use tax query but meta_query is also possible | |
// Unfortunately, there is no way to merge Wordpress default search behaviour, meta_query and tax_query using OR | |
// that I could find. | |
// Default behaviour for merging these queries are AND. | |
// Custom Elementor Query for Search | |
function mpons_custom_property_search_query($query) { | |
// Get the search term from the WP_Query object | |
$search_term = $query->get('s'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// render elementor forms select item for year_built in Angebotsanfrage form | |
// rerender the select field using elementor form api | |
add_filter('elementor_pro/forms/render/item/select', function($item, $index, $form) { | |
if('vehicle_quote_form' === $form->get_settings_for_display('form_name') || 'vehicle_quote_form_popup' === $form->get_settings_for_display('form_name')) { | |
if('year_built' == $item['custom_id'] || 'year_built_popup' == $item['custom_id']) { | |
$item['field_options'] = "Bitte Jahr auswählen|\n"; | |
for($year=date('Y'); $year >= 1970; $year--) { | |
if($year != 1970) { | |
$item['field_options'] .= $year . "|" . $year . "\n"; |