| @@ -1,9 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Elementor\Modules\Variables\Classes; |
| 4 | 4 | |
| 5 | -use Elementor\Modules\Variables\Services\Variables_Service; | |
| 6 | 5 | use Elementor\Plugin; |
| 7 | 6 | use Elementor\Core\Files\CSS\Post as Post_CSS; |
| 8 | 7 | use Elementor\Modules\Variables\PropTypes\Font_Variable_Prop_Type; |
| 9 | 8 | |
| @@ -11,20 +10,14 @@ | ||
| 11 | 10 | exit; // Exit if accessed directly. |
| 12 | 11 | } |
| 13 | 12 | |
| 14 | 13 | class Fonts { |
| 15 | - private Variables_Service $service; | |
| 16 | - | |
| 17 | - public function __construct( Variables_Service $service ) { | |
| 18 | - $this->service = $service; | |
| 19 | - } | |
| 20 | - | |
| 21 | 14 | public function append_to( Post_CSS $post_css ) { |
| 22 | 15 | if ( ! Plugin::$instance->kits_manager->is_kit( $post_css->get_post_id() ) ) { |
| 23 | 16 | return; |
| 24 | 17 | } |
| 25 | 18 | |
| 26 | - $list_of_variables = $this->service->get_variables_list(); | |
| 19 | + $list_of_variables = ( new Variables() )->get_all(); | |
| 27 | 20 | |
| 28 | 21 | foreach ( $list_of_variables as $variable ) { |
| 29 | 22 | if ( Font_Variable_Prop_Type::get_key() !== $variable['type'] ) { |
| 30 | 23 | continue; |