Plugin Directory

Changeset 2806985


Ignore:
Timestamp:
10/29/2022 10:57:14 AM (3 years ago)
Author:
corymbus
Message:

adding handling of contact.id to prefill web forms

Location:
corymbus-forms
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • corymbus-forms/tags/1.1.0/corymbus-forms.php

    r2806067 r2806985  
    44 * Plugin URI: https://corymb.us/en/wordpress-plugin
    55 * Description: Easily embed Corymbus web pages and forms into WordPress
    6  * Version: 1.0.0
     6 * Version: 1.1.0
    77 * Author: Corymbus SAS
    88 * License: GPLv2 or later
     
    2525        }
    2626        $url = esc_url('https://srv.corymb.us/pages/'.$path);
    27         // sanitize input / xxx-ize output
     27        $contactId = "";
     28        if (array_key_exists('contact.id', $_GET)) {
     29            $contactId = $_GET["contact.id"];
     30        }
     31        else if (array_key_exists('contact_id', $_GET)) { // handle the replacement of contact.id with contact_id
     32            // https://wordpress.stackexchange.com/questions/274569/how-to-get-url-of-current-page-displayed/299898#299898?newreg=8254c6b4c396441991a6449bde0d14aa
     33            $contactId = $_GET["contact_id"];
     34        }
     35        $url = esc_url(add_query_arg('contact.id', $contactId, $url));
    2836        $ret = '<iframe src="'.$url.'" loading="lazy" ';
    2937        foreach(array_keys($atts) as $key) {
  • corymbus-forms/trunk/corymbus-forms.php

    r2806067 r2806985  
    44 * Plugin URI: https://corymb.us/en/wordpress-plugin
    55 * Description: Easily embed Corymbus web pages and forms into WordPress
    6  * Version: 1.0.0
     6 * Version: 1.1.0
    77 * Author: Corymbus SAS
    88 * License: GPLv2 or later
     
    2525        }
    2626        $url = esc_url('https://srv.corymb.us/pages/'.$path);
    27         // sanitize input / xxx-ize output
     27        $contactId = "";
     28        if (array_key_exists('contact.id', $_GET)) {
     29            $contactId = $_GET["contact.id"];
     30        }
     31        else if (array_key_exists('contact_id', $_GET)) { // handle the replacement of contact.id with contact_id
     32            // https://wordpress.stackexchange.com/questions/274569/how-to-get-url-of-current-page-displayed/299898#299898?newreg=8254c6b4c396441991a6449bde0d14aa
     33            $contactId = $_GET["contact_id"];
     34        }
     35        $url = esc_url(add_query_arg('contact.id', $contactId, $url));
    2836        $ret = '<iframe src="'.$url.'" loading="lazy" ';
    2937        foreach(array_keys($atts) as $key) {
Note: See TracChangeset for help on using the changeset viewer.