PluginProbe
Elementor Website Builder – more than just a page builder / 4.1.3
Elementor Website Builder – more than just a page builder v4.1.3
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
elementor / modules / library / traits / library.php

library.php in Elementor Website Builder – more than just a page builder 4.1.3, at modules/library/traits/library.php

42 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\Library\Traits;
3
4 use Elementor\TemplateLibrary\Source_Local;
5
6 /**
7 * Elementor Library Trait
8 *
9 * This trait is used by all Library Documents and Landing Pages.
10 *
11 * @since 3.1.0
12 */
13 trait Library {
14 /**
15 * Print Admin Column Type
16 *
17 * Runs on WordPress' 'manage_{custom post type}_posts_custom_column' hook to modify each row's content.
18 *
19 * @since 3.1.0
20 * @access public
21 */
22 public function print_admin_column_type() {
23 $admin_filter_url = admin_url( Source_Local::ADMIN_MENU_SLUG . '&elementor_library_type=' . $this->get_name() );
24 // PHPCS - Not a user input
25 printf( '<a href="%s">%s</a>', $admin_filter_url, $this->get_title() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
26 }
27
28 /**
29 * Save document type.
30 *
31 * Set new/updated document type.
32 *
33 * @since 3.1.0
34 * @access public
35 */
36 public function save_template_type() {
37 parent::save_template_type();
38
39 wp_set_object_terms( $this->post->ID, $this->get_name(), Source_Local::TAXONOMY_TYPE_SLUG );
40 }
41 }
42