| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\Checklist\Steps; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) { |
| 6 |
exit; // Exit if accessed directly. |
| 7 |
} |
| 8 |
|
| 9 |
class Assign_Homepage extends Step_Base { |
| 10 |
const STEP_ID = 'assign_homepage'; |
| 11 |
|
| 12 |
public function get_id(): string { |
| 13 |
return self::STEP_ID; |
| 14 |
} |
| 15 |
|
| 16 |
public function is_absolute_completed(): bool { |
| 17 |
$front_page_id = (int) ( $this->wordpress_adapter->get_option( 'page_on_front' ) ?? 0 ); |
| 18 |
|
| 19 |
return (bool) $front_page_id; |
| 20 |
} |
| 21 |
|
| 22 |
public function get_title(): string { |
| 23 |
return esc_html__( 'Assign a homepage', 'elementor' ); |
| 24 |
} |
| 25 |
|
| 26 |
public function get_description(): string { |
| 27 |
return esc_html__( 'Before your launch, make sure to assign a homepage so visitors have a clear entry point into your site.', 'elementor' ); |
| 28 |
} |
| 29 |
|
| 30 |
public function get_cta_text(): string { |
| 31 |
return esc_html__( 'Assign homepage', 'elementor' ); |
| 32 |
} |
| 33 |
|
| 34 |
public function get_cta_url(): string { |
| 35 |
return admin_url( 'options-reading.php' ); |
| 36 |
} |
| 37 |
|
| 38 |
public function get_is_completion_immutable(): bool { |
| 39 |
return false; |
| 40 |
} |
| 41 |
|
| 42 |
public function get_image_src(): string { |
| 43 |
return 'https://assets.elementor.com/checklist/v1/images/checklist-step-6.jpg'; |
| 44 |
} |
| 45 |
|
| 46 |
public function get_learn_more_url(): string { |
| 47 |
return 'http://go.elementor.com/app-website-checklist-assign-home-article'; |
| 48 |
} |
| 49 |
} |
| 50 |
|