PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.1.3
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.1.3
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/TemplateLoader.php +8 -5 3.0.43.1.3 View file →
@@ -106,13 +106,16 @@
106 106 public function wrapper_attributes( $attributes, $document ) {
107 107 $post_type = get_post_type($document->get_main_id());
108 108
109 109 if( $post_type === 'templately_library' ){
110 - $template = templately()->theme_builder->get_template( $document->get_main_id() );
111 - $attributes['data-elementor-type'] = 'templately-' . $template->get_type();
112 - $attributes['data-elementor-id'] = $template->get_main_id();
113 - $attributes['data-elementor-post-type'] = 'templately_library';
114 - $attributes['data-elementor-title'] = $template->get_title();
110 + $template = templately()->theme_builder->get_template( $document->get_main_id() );
111 + if($template){
112 + $attributes['data-elementor-type'] = 'templately-' . $template->get_type();
113 + $attributes['data-elementor-id'] = $template->get_main_id();
114 + $attributes['data-elementor-post-type'] = 'templately_library';
115 + $attributes['data-elementor-title'] = $template->get_title();
116 + $attributes['class'] .= ' ' . implode( ' ', get_post_class() );
117 + }
115 118 }
116 119
117 120 return $attributes;
118 121 }