class-ecs-editorial-text-module.php
52 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Module: Editorial Text |
| 4 | * |
| 5 | * Provides the DTE Editorial Text widget — WYSIWYG content with an optional |
| 6 | * image that flows inline (none / before / after / float left / float right). |
| 7 | */ |
| 8 | |
| 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | exit; |
| 11 | } |
| 12 | |
| 13 | class ECS_Editorial_Text_Module extends ECS_Module_Base { |
| 14 | |
| 15 | public function get_id(): string { |
| 16 | return 'editorial_text'; |
| 17 | } |
| 18 | |
| 19 | public function get_title(): string { |
| 20 | return __( 'Editorial Text', 'ele-custom-skin' ); |
| 21 | } |
| 22 | |
| 23 | public function get_description(): string { |
| 24 | return __( 'A widget for editorial-style content with inline image support (float left/right, before/after) and fine typographic controls.', 'ele-custom-skin' ); |
| 25 | } |
| 26 | |
| 27 | public function boot(): void {} |
| 28 | |
| 29 | public function register_widgets( $widgets_manager ): void { |
| 30 | require_once $this->module_path() . 'widgets/class-ecs-editorial-text-widget.php'; |
| 31 | $widgets_manager->register( new ECS_Editorial_Text_Widget() ); |
| 32 | } |
| 33 | |
| 34 | public function enqueue_frontend_assets(): void { |
| 35 | wp_enqueue_style( |
| 36 | 'ecs-editorial-text', |
| 37 | $this->module_url() . 'assets/css/ecs-editorial-text.css', |
| 38 | [], |
| 39 | ECS_VERSION |
| 40 | ); |
| 41 | } |
| 42 | |
| 43 | public function enqueue_editor_assets(): void { |
| 44 | wp_enqueue_style( |
| 45 | 'ecs-editorial-text-editor', |
| 46 | $this->module_url() . 'assets/css/ecs-editorial-text.css', |
| 47 | [], |
| 48 | ECS_VERSION |
| 49 | ); |
| 50 | } |
| 51 | } |
| 52 |