| 1 |
<?php |
| 2 |
|
| 3 |
namespace Hostinger\Admin\Onboarding; |
| 4 |
|
| 5 |
use Hostinger\Admin\Actions as Admin_Actions; |
| 6 |
|
| 7 |
defined( 'ABSPATH' ) || exit; |
| 8 |
|
| 9 |
class Settings { |
| 10 |
public static function all_steps_completed(): bool { |
| 11 |
$actions = Admin_Actions::ACTIONS_LIST; |
| 12 |
$completed_steps = get_option( 'hostinger_onboarding_steps', array() ); |
| 13 |
$completed_step_actions = array_column( $completed_steps, 'action' ); |
| 14 |
$completed_steps_count = count( array_intersect( $completed_step_actions, $actions ) ); |
| 15 |
|
| 16 |
return $completed_steps_count === count( $actions ); |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
new Settings(); |
| 21 |
|