PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.0.1
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.0.1
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/Source.php +3 -7 3.6.23.0.1 View file →
@@ -1,9 +1,8 @@
1 1 <?php
2 2
3 3 namespace Templately\Builder;
4 4
5 -use Templately\Core\Importer\FullSiteImport;
6 5 use Templately\Utils\Helper;
7 6 use WP_Post;
8 7 use WP_Query;
9 8
@@ -26,9 +25,9 @@
26 25 $this->register_post_type();
27 26 }
28 27
29 28 private function add_actions() {
30 - add_filter( 'views_edit-' . self::CPT, [ $this, 'admin_print_tabs' ], 100 );
29 + add_filter( 'views_edit-' . self::CPT, [ $this, 'admin_print_tabs' ] );
31 30 add_action( 'in_admin_header', [ $this, 'in_admin_header' ] );
32 31 if ( is_admin() ) {
33 32 // add_action( 'manage_posts_extra_tablenav', [ $this, 'extra_table_nav' ] );
34 33 add_action( 'manage_' . self::CPT . '_posts_custom_column', [ $this, 'custom_column' ], 10, 2 );
@@ -36,9 +35,9 @@
36 35 add_filter( 'post_row_actions', [ $this, 'post_row_actions' ], 10, 2 );
37 36 add_action( 'admin_footer', [ $this, 'app' ] );
38 37 }
39 38
40 - // add_action( 'save_post', [ $this, 'save_post' ], 11, 3 );
39 + add_action( 'save_post', [ $this, 'save_post' ], 11, 3 );
41 40 }
42 41
43 42 /**
44 43 * If needed to add a filter for platform
@@ -70,11 +69,9 @@
70 69 switch ( $column_name ) {
71 70 case 'template_type':
72 71 $types = $this->builder::$templates_manager->get_template_types();
73 72 $type = get_post_meta( $post_id, self::TYPE_META_KEY, true );
74 - if(isset($types[ $type ])){
75 - echo call_user_func( [ $types[ $type ], 'get_title' ] );
76 - }
73 + echo call_user_func( [ $types[ $type ], 'get_title' ] );
77 74 break;
78 75 case 'template_platform':
79 76 echo get_post_meta( $post_id, self::PLATFORM_META_KEY, true );
80 77 break;
@@ -235,9 +232,8 @@
235 232 ];
236 233 }
237 234
238 235 $this->builder::$views->get( 'builder/tabs', [ 'tabs' => $tabs, 'template_types' => $template_types ] );
239 - return [];
240 236 }
241 237
242 238 /**
243 239 * Retrieves items.