| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\Announcements\Classes; |
| 4 |
|
| 5 |
use Elementor\Modules\Announcements\Triggers\IsFlexContainerInactive; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; // Exit if accessed directly. |
| 9 |
} |
| 10 |
|
| 11 |
class Utils { |
| 12 |
/** |
| 13 |
* get_trigger_object |
| 14 |
* |
| 15 |
* @param $trigger |
| 16 |
* |
| 17 |
* @return IsFlexContainerInactive|false |
| 18 |
*/ |
| 19 |
public static function get_trigger_object( $trigger ) { |
| 20 |
//@TODO - replace with trigger manager |
| 21 |
switch ( $trigger['action'] ) { |
| 22 |
case 'isFlexContainerInactive': |
| 23 |
return new IsFlexContainerInactive(); |
| 24 |
default: |
| 25 |
return false; |
| 26 |
} |
| 27 |
} |
| 28 |
} |
| 29 |
|