footer.php
60 lines
| 1 | <?php |
| 2 | namespace Auxin\Plugin\CoreElements\Elementor\Modules\Documents; |
| 3 | |
| 4 | use Elementor\Modules\Library\Documents\Library_Document; |
| 5 | use Elementor\Core\DocumentTypes\Post; |
| 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 | * @since 2.0.0 |
| 18 | */ |
| 19 | class Footer extends Library_Document { |
| 20 | |
| 21 | public static function get_properties() { |
| 22 | $properties = parent::get_properties(); |
| 23 | |
| 24 | $properties['location'] = 'footer'; |
| 25 | $properties['support_kit'] = true; |
| 26 | |
| 27 | return $properties; |
| 28 | } |
| 29 | |
| 30 | public function get_name() { |
| 31 | return 'footer'; |
| 32 | } |
| 33 | |
| 34 | public static function get_title() { |
| 35 | return __( 'Footer', 'auxin-elements' ); |
| 36 | } |
| 37 | |
| 38 | public function get_css_wrapper_selector() { |
| 39 | return '.elementor-' . $this->get_main_id(); |
| 40 | } |
| 41 | |
| 42 | protected static function get_editor_panel_categories() { |
| 43 | // Move to top as active. |
| 44 | $categories = [ |
| 45 | 'auxin-theme-elements' => [ |
| 46 | 'title' => __( 'Footer', 'auxin-elements' ), |
| 47 | 'active' => true, |
| 48 | ], |
| 49 | ]; |
| 50 | |
| 51 | return $categories + parent::get_editor_panel_categories(); |
| 52 | } |
| 53 | |
| 54 | |
| 55 | protected function register_controls() { |
| 56 | parent::register_controls(); |
| 57 | |
| 58 | Post::register_style_controls( $this ); |
| 59 | } |
| 60 | } |