one-click-accessibility/modules/legacy/components/elementor.php
Raz Ohad ae23a192da
♻️ Initial Refactor commit [APP-687] (#109)
* Initial refactor commit

*  Added build and tests CI/CD

* PR Rejects

* Rejects leftover
2024-11-05 14:06:44 +02:00

24 lines
465 B
PHP

<?php
namespace EA11y\Modules\Legacy\Components;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Class Elementor
*/
class Elementor {
public function is_toolbar_active( $is_active ) {
if ( \Elementor\Plugin::$instance->preview->is_preview_mode() ) {
$is_active = false;
}
return $is_active;
}
public function __construct() {
add_filter( 'pojo_a11y_frontend_is_toolbar_active', [ $this, 'is_toolbar_active' ] );
}
}