Plugin Directory

Changeset 3388800


Ignore:
Timestamp:
11/03/2025 11:14:52 AM (5 months ago)
Author:
maladeta
Message:

Update to version 1.0.1 from GitHub

Location:
lueira
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • lueira/tags/1.0.1/lueira.php

    r3384166 r3388800  
    44 * Plugin URI: https://lueira.com
    55 * Description: Provides a shortcode that outputs a button opening a modal with an embedded activity iframe.
    6  * Version: 1.0.0
     6 * Version: 1.0.1
    77 * Author: Maladeta Studio
    88 * Author URI: https://maladeta.studio
     
    2323    private const OPTION_HOST = 'lueira_embed_host';
    2424    private const OPTION_DEFAULT_HOST = 'https://store.lueira.com';
    25     private const PLUGIN_VERSION = '1.0.0';
     25    private const PLUGIN_VERSION = '1.0.1';
    2626    private const ASSET_HANDLE = 'lueira-embed';
    2727
     
    163163
    164164        // Validate required parameters
    165         if ($activity_id === '' || $module === '' || $product_type === '') {
     165        if ($activity_id === '' || $module === '') {
    166166            return '';
    167167        }
     
    220220
    221221    private function build_iframe_url(string $activity_id, string $module, string $product_type, string $lang): string {
    222         $base = rtrim($this->host, '/');
    223         return $base . '/' . rawurlencode($lang) . '/embed/' . rawurlencode($module) . '/' . rawurlencode($product_type) . '/' . rawurlencode($activity_id);
     222        $parts = [
     223            rtrim($this->host, '/'),
     224            rawurlencode($lang),
     225            'embed',
     226            rawurlencode($module),
     227        ];
     228
     229        if ($product_type !== '') {
     230            $parts[] = rawurlencode($product_type);
     231        }
     232
     233        $parts[] = rawurlencode($activity_id);
     234
     235        return implode('/', $parts);
    224236    }
    225237
  • lueira/trunk/lueira.php

    r3384166 r3388800  
    44 * Plugin URI: https://lueira.com
    55 * Description: Provides a shortcode that outputs a button opening a modal with an embedded activity iframe.
    6  * Version: 1.0.0
     6 * Version: 1.0.1
    77 * Author: Maladeta Studio
    88 * Author URI: https://maladeta.studio
     
    2323    private const OPTION_HOST = 'lueira_embed_host';
    2424    private const OPTION_DEFAULT_HOST = 'https://store.lueira.com';
    25     private const PLUGIN_VERSION = '1.0.0';
     25    private const PLUGIN_VERSION = '1.0.1';
    2626    private const ASSET_HANDLE = 'lueira-embed';
    2727
     
    163163
    164164        // Validate required parameters
    165         if ($activity_id === '' || $module === '' || $product_type === '') {
     165        if ($activity_id === '' || $module === '') {
    166166            return '';
    167167        }
     
    220220
    221221    private function build_iframe_url(string $activity_id, string $module, string $product_type, string $lang): string {
    222         $base = rtrim($this->host, '/');
    223         return $base . '/' . rawurlencode($lang) . '/embed/' . rawurlencode($module) . '/' . rawurlencode($product_type) . '/' . rawurlencode($activity_id);
     222        $parts = [
     223            rtrim($this->host, '/'),
     224            rawurlencode($lang),
     225            'embed',
     226            rawurlencode($module),
     227        ];
     228
     229        if ($product_type !== '') {
     230            $parts[] = rawurlencode($product_type);
     231        }
     232
     233        $parts[] = rawurlencode($activity_id);
     234
     235        return implode('/', $parts);
    224236    }
    225237
Note: See TracChangeset for help on using the changeset viewer.