Plugin Directory

Changeset 3341631


Ignore:
Timestamp:
08/08/2025 12:31:11 PM (7 months ago)
Author:
digibrief
Message:

Bump to 1.0.1 – Elementor placeholder visibility tweak

Location:
cubelaunch/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cubelaunch/trunk/cubelaunch.php

    r3341115 r3341631  
    77Plugin Name: CubeLaunch
    88Description: Displays rotatable shapes with customisable faces for shortcode or block editor insertion, or a separate Coming Soon override.
    9 Version: 1.0.0
     9Version: 1.0.1
    1010Author: DigiBrief
    1111Text Domain: cubelaunch
     
    3131// --- Define Core Version Constant ---
    3232if ( ! defined( 'CUBELAUNCH_CORE_VERSION' ) ) {
    33     define( 'CUBELAUNCH_CORE_VERSION', '1.0.0' );
     33    define( 'CUBELAUNCH_CORE_VERSION', '1.0.1' );
    3434}
    3535
     
    4545register_activation_hook( CUBELAUNCH_MAIN_FILE, 'cubelaunch_activate' );
    4646
    47 
     47// For placeholder to show in elementor editor where check customizer/widgets later
     48function cubelaunch_is_elementor_edit_mode() : bool {
     49    return defined( 'ELEMENTOR_VERSION' )
     50        && class_exists( '\Elementor\Plugin' )
     51        && \Elementor\Plugin::$instance->editor->is_edit_mode();
     52}
    4853
    4954/**
     
    20052010    }
    20062011
    2007     // --- Customizer / Widgets placeholder ---
     2012    /* --- Customizer / Widgets / Page-Builder placeholder --- */
    20082013    if (
    20092014        ( function_exists( 'is_customize_preview' ) && is_customize_preview() )
    20102015        || ( is_admin() && isset( $GLOBALS['pagenow'] ) && $GLOBALS['pagenow'] === 'widgets.php' )
     2016        || ( defined( 'ELEMENTOR_VERSION' ) && class_exists( '\Elementor\Plugin' )
     2017            && \Elementor\Plugin::$instance->editor->is_edit_mode() )
    20112018    ) {
    2012         $placeholder_msg = esc_html__(
    2013             'CubeLaunch dimensions preview – shape spins and zooms (pinch) within it on the front‑end. Save and view the page to see your 3D shape.',
    2014             'cubelaunch'
     2019        $placeholder_msg = sprintf(
     2020            /* translators: 1: shortcode example, 2: CSS example */
     2021            __( 'CubeLaunch dimensions preview – shape spins and zooms (pinch) within it on the front-end. Save and view the page to see your 3D shape. Too big? Add a class on the shortcode, e.g. %1$s, and set max-width in Custom CSS, e.g. %2$s', 'cubelaunch' ),
     2022            '[cubelaunch_shape id="705" class="my-cube"]',
     2023            '.my-cube.cubelaunch-canvas {max-width:450px;}'
    20152024        );
    20162025
    20172026        return sprintf(
    2018             '<div class="%1$s cubelaunch-placeholder" id="%2$s" data-config-id="%3$d" ' .
    2019                 'style="position:relative;">' .
    2020                     /* NOTE: no width/height attributes here */
    2021                     '<canvas id="%4$s" class="%5$s" ' .
    2022                         'data-buf-w="1600" data-buf-h="1600" ' .
    2023                         'style="background:#f0f8ff;border:1px solid #ccc;display:block;"></canvas>' .
    2024                     '<div class="cubelaunch-placeholder-note" ' .
    2025                         'style="margin-top:10px;text-align:center;font-style:italic;color:#888;font-size:13px;">%6$s</div>' .
     2027            '<div class="%1$s cubelaunch-placeholder" id="%2$s" data-config-id="%3$d" style="position:relative;display:block;max-width:750px;margin:0 auto;">' .
     2028                /* canvas */
     2029                '<canvas id="%4$s" class="%5$s" data-buf-w="1600" data-buf-h="1600" style="background:#f0f8ff;border:1px solid #ccc;display:block;width:clamp(150px,75vmin,750px);height:auto;aspect-ratio:1/1;"></canvas>' .
     2030                /* overlay note */
     2031                '<span class="cubelaunch-placeholder-note" style="position:absolute;left:50%%;bottom:8px;transform:translateX(-50%%);width:90%%;max-width:calc(100%% - 16px);font-size:13px;line-height:1.3;text-align:center;color:#888;background:rgba(255,255,255,0.8);backdrop-filter:blur(2px);padding:4px 6px;border-radius:4px;">%6$s</span>' .
    20262032            '</div>',
    20272033            esc_attr( implode( ' ', $wrapper_classes ) ),
     
    20332039        );
    20342040    }
     2041
    20352042
    20362043    // ----------- FRONT-END PATH BELOW (unchanged) -----------
  • cubelaunch/trunk/readme.txt

    r3341115 r3341631  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 1.0.0
     8Stable tag: 1.0.1
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    178178== Changelog ==
    179179
     180= 1.0.1 =
     181* Fix: Elementor placeholder visibility.
     182
    180183= 1.0.0 =
    181184* Initial release.
    182185
    183 == Upgrade Notice ==
    184 
    185 = 1.0.0 =
    186 Initial public release.
    187186
    188187== Third Party Libraries ==
Note: See TracChangeset for help on using the changeset viewer.