Plugin Directory

Changeset 3280710


Ignore:
Timestamp:
04/24/2025 08:49:32 AM (10 months ago)
Author:
driveworks
Message:

1.0.2 - Fixed: Undefined variable warnings with WP_DEBUG enabled

Location:
driveworks-shortcode-form-embed
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • driveworks-shortcode-form-embed/trunk/driveworks-shortcode-form-embed.php

    r2668382 r3280710  
    77 * Author:            DriveWorks Ltd
    88 * Author URI:        https://driveworks.co.uk
    9  * Version:           1.0.1
     9 * Version:           1.0.2
    1010 * License:           GPL v2 or later
    1111 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     
    5050        $dw_shortcode_embed_form_message_cancel = "This submission has been cancelled.";
    5151
     52        $dw_shortcode_embed_project_name_attr = "";
     53        if ( $dw_shortcode_embed_project_name ) {
     54            $dw_shortcode_embed_project_name_attr = ' data-project-name="' . htmlspecialchars($dw_shortcode_embed_project_name) . '"';
     55        }
     56
     57        $dw_shortcode_embed_drive_app_alias_attr = "";
     58        if ( isset($dw_shortcode_embed_drive_app_alias) ) {
     59            $dw_shortcode_embed_drive_app_alias_attr = ' data-drive-app-alias="' . htmlspecialchars($dw_shortcode_embed_drive_app_alias) . '"';
     60        }
     61
     62        $dw_shortcode_embed_ping_interval_attr = "";
     63        if ( isset($dw_shortcode_embed_ping_interval) ) {
     64            $dw_shortcode_embed_drive_app_alias_attr = ' data-ping-interval="' . htmlspecialchars($dw_shortcode_embed_ping_interval) . '"';
     65        }
     66
     67        $dw_shortcode_embed_height_attr = "auto";
     68        if ( isset($dw_shortcode_embed_height) ) {
     69            $dw_shortcode_embed_height_attr = htmlspecialchars($dw_shortcode_embed_height);
     70        }
     71
    5272        $dw_shortcode_embed_markup = '<div data-driveworks-shortcode-embed class="dw-shortcode-embed dw-is-loading"' . (is_user_logged_in() ? ' data-debug="true"' : '');
    5373        $dw_shortcode_embed_markup .= ' data-server-url="' . $dw_shortcode_embed_server_url . '"';
    5474        $dw_shortcode_embed_markup .= ' data-group-alias="' . htmlspecialchars($dw_shortcode_embed_group_alias) . '"';
    55         $dw_shortcode_embed_project_name ? $dw_shortcode_embed_markup .= ' data-project-name="' . htmlspecialchars($dw_shortcode_embed_project_name) . '"' : "";
    56         $dw_shortcode_embed_drive_app_alias ? $dw_shortcode_embed_markup .= ' data-drive-app-alias="' . htmlspecialchars($dw_shortcode_embed_drive_app_alias) . '"' : "";
    57         $dw_shortcode_embed_ping_interval ? $dw_shortcode_embed_markup .= ' data-ping-interval="' . htmlspecialchars($dw_shortcode_embed_ping_interval) . '"' : "";
     75        $dw_shortcode_embed_markup .= $dw_shortcode_embed_project_name_attr;
     76        $dw_shortcode_embed_markup .= $dw_shortcode_embed_drive_app_alias_attr;
     77        $dw_shortcode_embed_markup .= $dw_shortcode_embed_ping_interval_attr;
     78
    5879        $dw_shortcode_embed_markup .= '>
    59             <div data-form-output class="dw-form-output" style="height: ' . ($dw_shortcode_embed_height ? htmlspecialchars($dw_shortcode_embed_height) : 'auto') . ';">
     80            <div data-form-output class="dw-form-output" style="height: ' . $dw_shortcode_embed_height_attr . ';">
    6081                <div class="dw-embed-loading dw-embed-message">' . $dw_shortcode_embed_form_message_loading . '</div>
    6182            </div>
  • driveworks-shortcode-form-embed/trunk/readme.txt

    r3279871 r3280710  
    22Contributors: driveworks
    33Tags: driveworks, shortcode, embed, integration, project
    4 Stable tag: 1.0.1
     4Stable tag: 1.0.2
    55Requires at least: 4.0
    66Tested up to: 6.8
     
    103103== Changelog ==
    104104
     105= 1.0.2 =
     106
     107* Fixed: Undefined variable warnings with WP_DEBUG enabled.
     108
    105109= 1.0.1 =
    106110
Note: See TracChangeset for help on using the changeset viewer.