PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.6
Elementor Website Builder – more than just a page builder v3.0.6
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | modules/library/documents/library-document.php +19 -14 4.1.13.0.6 View file →
@@ -1,13 +1,12 @@
1 1 <?php
2 2 namespace Elementor\Modules\Library\Documents;
3 3
4 4 use Elementor\Core\Base\Document;
5 -use Elementor\Modules\Library\Traits\Library;
6 5 use Elementor\TemplateLibrary\Source_Local;
7 6
8 7 if ( ! defined( 'ABSPATH' ) ) {
9 - exit; // Exit if accessed directly.
8 + exit; // Exit if accessed directly
10 9 }
11 10
12 11 /**
13 12 * Elementor library document.
@@ -18,11 +17,8 @@
18 17 * @since 2.0.0
19 18 */
20 19 abstract class Library_Document extends Document {
21 20
22 - // Library Document Trait
23 - use Library;
24 -
25 21 /**
26 22 * The taxonomy type slug for the library document.
27 23 */
28 24 const TAXONOMY_TYPE_SLUG = 'elementor_library_type';
@@ -27,13 +23,8 @@
27 23 */
28 24 const TAXONOMY_TYPE_SLUG = 'elementor_library_type';
29 25
30 26 /**
31 - * The customization group for Kit Export.
32 - */
33 - const EXPORT_GROUP = 'site-templates';
34 -
35 - /**
36 27 * Get document properties.
37 28 *
38 29 * Retrieve the document properties.
39 30 *
@@ -48,10 +39,8 @@
48 39
49 40 $properties['admin_tab_group'] = 'library';
50 41 $properties['show_in_library'] = true;
51 42 $properties['register_type'] = true;
52 - $properties['cpt'] = [ Source_Local::CPT ];
53 - $properties['export_group'] = static::EXPORT_GROUP;
54 43
55 44 return $properties;
56 45 }
57 46
@@ -77,8 +66,24 @@
77 66
78 67 return $config;
79 68 }
80 69
81 - public function get_content( $with_css = false ) {
82 - return do_shortcode( parent::get_content( $with_css ) );
70 + public function print_admin_column_type() {
71 + $admin_filter_url = admin_url( Source_Local::ADMIN_MENU_SLUG . '&elementor_library_type=' . $this->get_name() );
72 +
73 + printf( '<a href="%s">%s</a>', $admin_filter_url, $this->get_title() );
74 + }
75 +
76 + /**
77 + * Save document type.
78 + *
79 + * Set new/updated document type.
80 + *
81 + * @since 2.0.0
82 + * @access public
83 + */
84 + public function save_template_type() {
85 + parent::save_template_type();
86 +
87 + wp_set_object_terms( $this->post->ID, $this->get_name(), self::TAXONOMY_TYPE_SLUG );
83 88 }
84 89 }