not-supported.php (1479B)
1 <?php 2 namespace Elementor\Modules\Library\Documents; 3 4 use Elementor\TemplateLibrary\Source_Local; 5 use Elementor\Utils; 6 7 if ( ! defined( 'ABSPATH' ) ) { 8 exit; // Exit if accessed directly 9 } 10 11 /** 12 * Elementor section library document. 13 * 14 * Elementor section library document handler class is responsible for 15 * handling a document of a section type. 16 * 17 */ 18 class Not_Supported extends Library_Document { 19 20 /** 21 * Get document properties. 22 * 23 * Retrieve the document properties. 24 * 25 * @access public 26 * @static 27 * 28 * @return array Document properties. 29 */ 30 public static function get_properties() { 31 $properties = parent::get_properties(); 32 33 $properties['admin_tab_group'] = ''; 34 $properties['register_type'] = false; 35 $properties['is_editable'] = false; 36 $properties['show_in_library'] = false; 37 38 $properties['cpt'] = [ 39 Source_Local::CPT, 40 ]; 41 42 return $properties; 43 } 44 45 public static function get_type() { 46 return 'not-supported'; 47 } 48 49 /** 50 * Get document title. 51 * 52 * Retrieve the document title. 53 * 54 * @access public 55 * @static 56 * 57 * @return string Document title. 58 */ 59 public static function get_title() { 60 return esc_html__( 'Not Supported', 'elementor' ); 61 } 62 63 public function save_template_type() { 64 // Do nothing. 65 } 66 67 public function print_admin_column_type() { 68 Utils::print_unescaped_internal_string( self::get_title() ); 69 } 70 71 public function filter_admin_row_actions( $actions ) { 72 unset( $actions['view'] ); 73 74 return $actions; 75 } 76 }