PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.1.2
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.1.2
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/Builder/Widgets/Featured_Image.php +2 -13 3.7.33.1.2 View file →
@@ -261,22 +261,11 @@
261 261 $this->end_controls_section();
262 262 }
263 263
264 264 protected function get_dynamic_post_ID() {
265 - $post_type = 'post';
266 - $type = get_post_meta( get_the_ID(), '_templately_template_type', true );
267 - if($type == 'single') {
268 - $post_type = 'post';
269 - }
270 - else if($type == 'page_single') {
271 - $post_type = 'page';
272 - }
273 - else if($type == 'product_single') {
274 - $post_type = 'product';
275 - }
276 - $latest_cpt = get_posts( "post_type=$post_type&numberposts=1" );
265 + $latest_cpt = get_posts( "post_type=post&numberposts=1" );
277 266
278 - return Plugin::$instance->editor->is_edit_mode() || isset($_GET['templately_library'], $_GET['preview_id']) ? $latest_cpt[0]->ID : get_the_ID();
267 + return Plugin::$instance->editor->is_edit_mode() || isset( $_GET['preview_id'] ) || isset( $_GET['preview'] ) ? $latest_cpt[0]->ID : get_the_ID();
279 268 }
280 269
281 270 protected function render() {
282 271 $settings = $this->get_settings_for_display();