WSFormsIntegration.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Hostinger\Reach\Integrations\WSForms; |
| 4 | |
| 5 | use Hostinger\Reach\Dto\PluginData; |
| 6 | use Hostinger\Reach\Integrations\Integration; |
| 7 | use Hostinger\Reach\Integrations\IntegrationInterface; |
| 8 | |
| 9 | class WSFormsIntegration extends Integration implements IntegrationInterface { |
| 10 | |
| 11 | public const INTEGRATION_NAME = 'ws-form'; |
| 12 | |
| 13 | public static function get_name(): string { |
| 14 | return self::INTEGRATION_NAME; |
| 15 | } |
| 16 | |
| 17 | public function get_plugin_data(): PluginData { |
| 18 | |
| 19 | return PluginData::from_array( |
| 20 | array( |
| 21 | 'id' => $this->get_name(), |
| 22 | 'title' => __( 'WS Form', 'hostinger-reach' ), |
| 23 | 'folder' => 'ws-form', |
| 24 | 'file' => 'ws-form.php', |
| 25 | 'admin_url' => 'admin.php?page=ws-form', |
| 26 | 'add_form_url' => 'admin.php?page=ws-form-add', |
| 27 | 'edit_url' => 'admin.php?page=ws-form-edit&id={form_id}', |
| 28 | 'url' => 'https://wordpress.org/plugins/ws-form/', |
| 29 | 'download_url' => 'https://downloads.wordpress.org/plugin/ws-form.zip', |
| 30 | 'icon' => 'https://plugins.svn.wordpress.org/ws-form/assets/icon-256x256.jpg', |
| 31 | 'can_toggle_forms' => false, |
| 32 | ) |
| 33 | ); |
| 34 | } |
| 35 | |
| 36 | public function active_integration_hooks(): void { |
| 37 | return; |
| 38 | } |
| 39 | |
| 40 | public function get_forms(): array { |
| 41 | return array(); |
| 42 | } |
| 43 | } |
| 44 |