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.8.0 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 All 112 releases
← All changes | includes/Builder/Widgets/Post_Title.php +2 -13 3.7.3 → 3.1.2 View file →
@@ -101,22 +101,11 @@
101 101 $this->end_controls_section();
102 102 }
103 103
104 104 protected function get_dynamic_post_ID() {
105 - $post_type = 'post';
106 - $type = get_post_meta( get_the_ID(), '_templately_template_type', true );
107 - if($type == 'single') {
108 - $post_type = 'post';
109 - }
110 - else if($type == 'page_single') {
111 - $post_type = 'page';
112 - }
113 - else if($type == 'product_single') {
114 - $post_type = 'product';
115 - }
116 - $latest_cpt = get_posts( "post_type=$post_type&numberposts=1" );
105 + $latest_cpt = get_posts( "post_type=post&numberposts=1" );
117 106
118 - return Plugin::$instance->editor->is_edit_mode() || isset($_GET['templately_library'], $_GET['preview_id']) ? $latest_cpt[0]->ID : get_the_ID();
107 + return Plugin::$instance->editor->is_edit_mode() || isset( $_GET['preview_id'] ) || isset( $_GET['preview'] ) ? $latest_cpt[0]->ID : get_the_ID();
119 108 }
120 109
121 110 protected function render() {
122 111 $settings = $this->get_settings_for_display();