Changeset 3515711
- Timestamp:
- 04/26/2026 10:04:21 AM (3 weeks ago)
- Location:
- ht-mega-for-elementor
- Files:
-
- 6 edited
- 1 copied
-
tags/3.0.9 (copied) (copied from ht-mega-for-elementor/trunk)
-
tags/3.0.9/htmega_addons_elementor.php (modified) (2 diffs)
-
tags/3.0.9/includes/helper-function.php (modified) (2 diffs)
-
tags/3.0.9/readme.txt (modified) (2 diffs)
-
trunk/htmega_addons_elementor.php (modified) (2 diffs)
-
trunk/includes/helper-function.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ht-mega-for-elementor/tags/3.0.9/htmega_addons_elementor.php
r3501420 r3515711 6 6 * Author: HasThemes 7 7 * Author URI: https://hasthemes.com/ 8 * Version: 3.0. 88 * Version: 3.0.9 9 9 * License: GPL2 10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 16 16 17 17 if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly 18 define( 'HTMEGA_VERSION', '3.0. 8' );18 define( 'HTMEGA_VERSION', '3.0.9' ); 19 19 define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ ); 20 20 define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) ); -
ht-mega-for-elementor/tags/3.0.9/includes/helper-function.php
r3501420 r3515711 1184 1184 if ( !function_exists('htmega_get_template_content_by_id') ) { 1185 1185 function htmega_get_template_content_by_id($template_id) { 1186 // Static cache for same request (e.g., same template used in multiple slides)1187 1186 static $template_cache = []; 1188 1187 1189 if ( isset( $template_cache[ $template_id ] ) ) { 1190 return $template_cache[ $template_id ]; 1188 $current_post_id = (int) get_the_ID(); 1189 $cache_key = $template_id . '_' . $current_post_id; 1190 1191 if ( isset( $template_cache[ $cache_key ] ) ) { 1192 return $template_cache[ $cache_key ]; 1191 1193 } 1192 1194 1193 1195 $template_post = get_post( $template_id ); 1194 1196 1195 // Check if the post exists and its status is 'publish'1196 1197 if ( $template_post && $template_post->post_status === 'publish' ) { 1197 1198 1198 // Transient cache: persists across requests, invalidated on template save 1199 $transient_key = 'htmega_tmpl_' . $template_id . '_' . $template_post->post_modified; 1199 $current_post = $current_post_id ? get_post( $current_post_id ) : null; 1200 $post_modified = $current_post ? $current_post->post_modified : ''; 1201 $transient_key = 'htmega_tmpl_' . $template_id . '_' . $current_post_id . '_' . $template_post->post_modified . '_' . $post_modified; 1200 1202 $content = get_transient( $transient_key ); 1201 1203 … … 1210 1212 } 1211 1213 1212 $template_cache[ $ template_id] = $content;1214 $template_cache[ $cache_key ] = $content; 1213 1215 1214 1216 return $content; -
ht-mega-for-elementor/tags/3.0.9/readme.txt
r3501420 r3515711 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 3.0. 86 Stable tag: 3.0.9 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 238 238 == Changelog == 239 239 240 = Version 3.0.9 - Date: 2026-04-26 = 241 * Fixed: Theme builder single post template showing incorrect content. 242 240 243 = Version 3.0.8 - Date: 2026-04-08 = 241 244 * Added: [Political Campaign (Modern) Template Kit](https://library.wphtmega.com/political-campaign-home-modern/) (Pro). -
ht-mega-for-elementor/trunk/htmega_addons_elementor.php
r3501420 r3515711 6 6 * Author: HasThemes 7 7 * Author URI: https://hasthemes.com/ 8 * Version: 3.0. 88 * Version: 3.0.9 9 9 * License: GPL2 10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 16 16 17 17 if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly 18 define( 'HTMEGA_VERSION', '3.0. 8' );18 define( 'HTMEGA_VERSION', '3.0.9' ); 19 19 define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ ); 20 20 define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) ); -
ht-mega-for-elementor/trunk/includes/helper-function.php
r3501420 r3515711 1184 1184 if ( !function_exists('htmega_get_template_content_by_id') ) { 1185 1185 function htmega_get_template_content_by_id($template_id) { 1186 // Static cache for same request (e.g., same template used in multiple slides)1187 1186 static $template_cache = []; 1188 1187 1189 if ( isset( $template_cache[ $template_id ] ) ) { 1190 return $template_cache[ $template_id ]; 1188 $current_post_id = (int) get_the_ID(); 1189 $cache_key = $template_id . '_' . $current_post_id; 1190 1191 if ( isset( $template_cache[ $cache_key ] ) ) { 1192 return $template_cache[ $cache_key ]; 1191 1193 } 1192 1194 1193 1195 $template_post = get_post( $template_id ); 1194 1196 1195 // Check if the post exists and its status is 'publish'1196 1197 if ( $template_post && $template_post->post_status === 'publish' ) { 1197 1198 1198 // Transient cache: persists across requests, invalidated on template save 1199 $transient_key = 'htmega_tmpl_' . $template_id . '_' . $template_post->post_modified; 1199 $current_post = $current_post_id ? get_post( $current_post_id ) : null; 1200 $post_modified = $current_post ? $current_post->post_modified : ''; 1201 $transient_key = 'htmega_tmpl_' . $template_id . '_' . $current_post_id . '_' . $template_post->post_modified . '_' . $post_modified; 1200 1202 $content = get_transient( $transient_key ); 1201 1203 … … 1210 1212 } 1211 1213 1212 $template_cache[ $ template_id] = $content;1214 $template_cache[ $cache_key ] = $content; 1213 1215 1214 1216 return $content; -
ht-mega-for-elementor/trunk/readme.txt
r3501420 r3515711 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 3.0. 86 Stable tag: 3.0.9 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 238 238 == Changelog == 239 239 240 = Version 3.0.9 - Date: 2026-04-26 = 241 * Fixed: Theme builder single post template showing incorrect content. 242 240 243 = Version 3.0.8 - Date: 2026-04-08 = 241 244 * Added: [Political Campaign (Modern) Template Kit](https://library.wphtmega.com/political-campaign-home-modern/) (Pro).
Note: See TracChangeset
for help on using the changeset viewer.
