custom-grid.php
62 lines
| 1 | <?php |
| 2 | |
| 3 | use ElementorPro\Modules\ThemeBuilder\Documents\Theme_Section_Document; |
| 4 | use Elementor\Core\DocumentTypes\Post; |
| 5 | use ElementorPro\Modules\ThemeBuilder\Documents\Single; |
| 6 | |
| 7 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | exit; // Exit if accessed directly |
| 9 | } |
| 10 | |
| 11 | class customGrid extends Theme_Section_Document { |
| 12 | |
| 13 | public static function get_properties() { |
| 14 | $properties = parent::get_properties(); |
| 15 | |
| 16 | $properties['condition_type'] = 'custom_grid'; |
| 17 | $properties['location'] = 'single'; |
| 18 | $properties['support_kit'] = true; |
| 19 | $properties['support_site_editor'] = true; |
| 20 | |
| 21 | return $properties; |
| 22 | } |
| 23 | |
| 24 | protected static function get_site_editor_type() { |
| 25 | return 'custom_grid'; |
| 26 | } |
| 27 | |
| 28 | protected static function get_site_editor_thumbnail_url() { |
| 29 | return ELECS_URL . 'assets/images/custom-grid.svg'; |
| 30 | } |
| 31 | |
| 32 | public function get_name() { |
| 33 | return 'custom_grid'; |
| 34 | } |
| 35 | |
| 36 | public static function get_type() { |
| 37 | return 'custom_grid'; |
| 38 | } |
| 39 | |
| 40 | public static function get_title() { |
| 41 | return __( 'Custom Grid', 'ele-custom-skin' ); |
| 42 | } |
| 43 | |
| 44 | protected static function get_editor_panel_categories() { |
| 45 | $categories = [ |
| 46 | 'ele-custom-grid' => [ |
| 47 | 'title' => __( 'Custom Grid', 'elementor-pro' ), |
| 48 | ], |
| 49 | ]; |
| 50 | return $categories + parent::get_editor_panel_categories(); |
| 51 | |
| 52 | } |
| 53 | |
| 54 | /* |
| 55 | |
| 56 | I want a preview like the template not default |
| 57 | |
| 58 | */ |
| 59 | |
| 60 | |
| 61 | } |
| 62 |