| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\App\Modules\Onboarding\Data; |
| 4 |
|
| 5 |
use Elementor\App\Modules\Onboarding\Data\Endpoints\Install_Pro; |
| 6 |
use Elementor\App\Modules\Onboarding\Data\Endpoints\Install_Theme; |
| 7 |
use Elementor\App\Modules\Onboarding\Data\Endpoints\Pro_Install_Screen; |
| 8 |
use Elementor\App\Modules\Onboarding\Data\Endpoints\User_Choices; |
| 9 |
use Elementor\App\Modules\Onboarding\Data\Endpoints\User_Progress; |
| 10 |
use Elementor\Data\V2\Base\Controller as Base_Controller; |
| 11 |
|
| 12 |
if ( ! defined( 'ABSPATH' ) ) { |
| 13 |
exit; |
| 14 |
} |
| 15 |
|
| 16 |
class Controller extends Base_Controller { |
| 17 |
|
| 18 |
public function get_name(): string { |
| 19 |
return 'onboarding'; |
| 20 |
} |
| 21 |
|
| 22 |
public function register_endpoints(): void { |
| 23 |
$this->register_endpoint( new User_Progress( $this ) ); |
| 24 |
$this->register_endpoint( new User_Choices( $this ) ); |
| 25 |
$this->register_endpoint( new Pro_Install_Screen( $this ) ); |
| 26 |
$this->register_endpoint( new Install_Pro( $this ) ); |
| 27 |
$this->register_endpoint( new Install_Theme( $this ) ); |
| 28 |
} |
| 29 |
|
| 30 |
public function get_items_permissions_check( $request ) { |
| 31 |
return current_user_can( 'manage_options' ); |
| 32 |
} |
| 33 |
|
| 34 |
public function get_item_permissions_check( $request ) { |
| 35 |
return current_user_can( 'manage_options' ); |
| 36 |
} |
| 37 |
|
| 38 |
public function create_items_permissions_check( $request ) { |
| 39 |
return current_user_can( 'manage_options' ); |
| 40 |
} |
| 41 |
|
| 42 |
public function create_item_permissions_check( $request ) { |
| 43 |
return current_user_can( 'manage_options' ); |
| 44 |
} |
| 45 |
|
| 46 |
public function update_items_permissions_check( $request ) { |
| 47 |
return current_user_can( 'manage_options' ); |
| 48 |
} |
| 49 |
|
| 50 |
public function update_item_permissions_check( $request ) { |
| 51 |
return current_user_can( 'manage_options' ); |
| 52 |
} |
| 53 |
} |
| 54 |
|