| 1 |
<?php |
| 2 |
|
| 3 |
namespace Cookiez\Modules\Elementor\Documents; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) { |
| 6 |
exit; |
| 7 |
} |
| 8 |
|
| 9 |
use ElementorPro\Modules\Popup\Document; |
| 10 |
|
| 11 |
abstract class Document_Base extends Document { |
| 12 |
|
| 13 |
public static function get_type(): string { |
| 14 |
return static::DOCUMENT_TYPE; |
| 15 |
} |
| 16 |
|
| 17 |
public function get_name(): string { |
| 18 |
return static::DOCUMENT_TYPE; |
| 19 |
} |
| 20 |
|
| 21 |
public static function get_properties(): array { |
| 22 |
$properties = parent::get_properties(); |
| 23 |
|
| 24 |
$properties['admin_tab_group'] = 'popup'; |
| 25 |
|
| 26 |
return $properties; |
| 27 |
} |
| 28 |
|
| 29 |
public function get_initial_config(): array { |
| 30 |
$config = parent::get_initial_config(); |
| 31 |
$config['panel']['default_route'] = 'panel/page-settings/settings'; |
| 32 |
|
| 33 |
return $config; |
| 34 |
} |
| 35 |
|
| 36 |
public function get_frontend_settings(): array { |
| 37 |
$settings = parent::get_frontend_settings(); |
| 38 |
|
| 39 |
unset( $settings['triggers'], $settings['timing'] ); |
| 40 |
|
| 41 |
return $settings; |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Override the edit url to remove the library filter. |
| 46 |
*/ |
| 47 |
public function get_edit_url(): string { |
| 48 |
return str_replace( '#library', '', parent::get_edit_url() ); |
| 49 |
} |
| 50 |
} |
| 51 |
|