Changeset 3341631
- Timestamp:
- 08/08/2025 12:31:11 PM (7 months ago)
- Location:
- cubelaunch/trunk
- Files:
-
- 2 edited
-
cubelaunch.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cubelaunch/trunk/cubelaunch.php
r3341115 r3341631 7 7 Plugin Name: CubeLaunch 8 8 Description: Displays rotatable shapes with customisable faces for shortcode or block editor insertion, or a separate Coming Soon override. 9 Version: 1.0. 09 Version: 1.0.1 10 10 Author: DigiBrief 11 11 Text Domain: cubelaunch … … 31 31 // --- Define Core Version Constant --- 32 32 if ( ! defined( 'CUBELAUNCH_CORE_VERSION' ) ) { 33 define( 'CUBELAUNCH_CORE_VERSION', '1.0. 0' );33 define( 'CUBELAUNCH_CORE_VERSION', '1.0.1' ); 34 34 } 35 35 … … 45 45 register_activation_hook( CUBELAUNCH_MAIN_FILE, 'cubelaunch_activate' ); 46 46 47 47 // For placeholder to show in elementor editor where check customizer/widgets later 48 function 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 } 48 53 49 54 /** … … 2005 2010 } 2006 2011 2007 / / --- Customizer / Widgets placeholder ---2012 /* --- Customizer / Widgets / Page-Builder placeholder --- */ 2008 2013 if ( 2009 2014 ( function_exists( 'is_customize_preview' ) && is_customize_preview() ) 2010 2015 || ( 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() ) 2011 2018 ) { 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;}' 2015 2024 ); 2016 2025 2017 2026 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>' . 2026 2032 '</div>', 2027 2033 esc_attr( implode( ' ', $wrapper_classes ) ), … … 2033 2039 ); 2034 2040 } 2041 2035 2042 2036 2043 // ----------- FRONT-END PATH BELOW (unchanged) ----------- -
cubelaunch/trunk/readme.txt
r3341115 r3341631 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 1.0. 08 Stable tag: 1.0.1 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 178 178 == Changelog == 179 179 180 = 1.0.1 = 181 * Fix: Elementor placeholder visibility. 182 180 183 = 1.0.0 = 181 184 * Initial release. 182 185 183 == Upgrade Notice ==184 185 = 1.0.0 =186 Initial public release.187 186 188 187 == Third Party Libraries ==
Note: See TracChangeset
for help on using the changeset viewer.