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_filter( 'elementor/widget/render_content', 'insert_wp_variables_in_content' ); | |
| function insert_wp_variables_in_content( $content ) { | |
| // This function replaces the placeholders like {{ post_content }} with the corresponding property values from the $post object in the $content variable. Make sure to replace {{ post_id }}, {{ post_title }}, etc., with the appropriate placeholders you want to replace in your content. | |
| // searching in content for this {{ key }} pattern | |
| $pattern = '/\{\{.*?\}\}/'; |
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
| :root { | |
| scroll-padding-top: 150px!important; | |
| } | |
| @media (max-width: 1024px) { | |
| :root { | |
| scroll-padding-top: 55px; | |
| } | |
| } |
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 | |
| /** | |
| * Change upload folder based on Elementor Form ID | |
| * | |
| * @param $path | |
| * @return string | |
| */ | |
| function zpd_change_elementor_form_upload_path_multi_form( $path ){ | |
| if( $_POST[ 'action'] === 'elementor_pro_forms_send_form'){ | |
| //The folder name |
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
| /* | |
| * Create new user from Elementor form | |
| */ | |
| add_action( 'elementor_pro/forms/new_record', 'gl_elementor_form_create_new_user', 99, 2 ); | |
| function gl_elementor_form_create_new_user( $record, $ajax_handler ) { | |
| $form_id = $record->get_form_settings( 'id' ); | |
| if ( 'register_form' !== $form_id ) { | |
| 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
| /* | |
| * Create new user from Elementor form | |
| */ | |
| add_action( 'elementor_pro/forms/new_record', 'gl_elementor_form_create_new_user', 99, 2 ); | |
| function gl_elementor_form_create_new_user( $record, $ajax_handler ) { | |
| $form_id = $record->get_form_settings( 'id' ); | |
| if ( 'register_form' !== $form_id ) { | |
| 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 | |
| /** | |
| * | |
| * A simple integration of hCaptcha with Elementor Forms, following Elementor’s pattern for reCAPTCHA. | |
| * | |
| * Instructions: | |
| * 1. Add this file to your WordPress theme directory. | |
| * 2. Include the file in your theme's `functions.php` file using: | |
| * |
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 | |
| /** | |
| * | |
| * A simple integration of Cloudflare Turnstile with Elementor Forms, following Elementor’s pattern for reCAPTCHA. | |
| * | |
| * Instructions: | |
| * 1. Add this file to your WordPress theme directory. | |
| * 2. Include the file in your theme's `functions.php` file using: | |
| * |
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', function( $form_record, $ajax_handler ) { | |
| if ( 'Test Form 1' !== $form_record->get_form_settings( 'form_name' ) ) { | |
| return; | |
| } | |
| $fields = $form_record->get('fields'); | |
| $email = $fields['email']['value']; | |
| if ( email_exists( $email ) ) { |
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 | |
| /** | |
| * List Table API: WP_Posts_List_Table class | |
| * | |
| * @package WordPress | |
| * @subpackage Administration | |
| * @since 3.1.0 | |
| */ | |
| /** |
NewerOlder