PluginProbe
Hello Plus / 1.2.0
Hello Plus v1.2.0
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7.0 1.7.1 1.7.2 1.7.3 All 30 releases
hello-plus / modules / template-parts / classes / steps / setup-header.php

setup-header.php in Hello Plus 1.2.0, at modules/template-parts/classes/steps/setup-header.php

83 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace HelloPlus\Modules\TemplateParts\Classes\Steps;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 use HelloPlus\Includes\Utils;
10
11 class Setup_Header extends \Elementor\Modules\Checklist\Steps\Step_Base {
12 const STEP_ID = 'setup_header_ehp';
13
14 public function get_id(): string {
15 return self::STEP_ID;
16 }
17
18 public function is_visible(): bool {
19 return true;
20 }
21
22 public function is_absolute_completed(): bool {
23 $args = [
24 'post_type' => 'elementor_library',
25 'meta_query' => [
26 'relation' => 'OR',
27 [
28 'relation' => 'AND',
29 [
30 'key' => '_elementor_template_type',
31 'value' => [ 'header', 'ehp-header' ],
32 'compare' => 'IN',
33 ],
34 ],
35 [
36 [
37 'key' => '_elementor_template_type',
38 'value' => 'ehp-header',
39 'compare' => '=',
40 ],
41 ],
42 ],
43 'posts_per_page' => 1,
44 'fields' => 'ids',
45 'no_found_rows' => true,
46 'update_post_term_cache' => false,
47 'update_post_meta_cache' => false,
48 ];
49 $query = $this->wordpress_adapter->get_query( $args );
50 $header_templates = $query->posts ?? [];
51
52 return count( $header_templates ) >= 1;
53 }
54
55 public function get_cta_url(): string {
56 return Utils::get_theme_admin_home();
57 }
58
59 public function get_cta_text(): string {
60 return esc_html__( 'Go to Home Dashboard', 'hello-plus' );
61 }
62
63 public function get_title(): string {
64 return esc_html__( 'Set up a Hello+ header', 'hello-plus' );
65 }
66
67 public function get_description(): string {
68 return esc_html__( 'This element applies across different pages, so visitors can easily navigate around your site.', 'hello-plus' );
69 }
70
71 public function get_image_src(): string {
72 return HELLOPLUS_IMAGES_URL . 'ehp-header-checklist-step.jpg';
73 }
74
75 public function get_is_completion_immutable(): bool {
76 return false;
77 }
78
79 public function get_learn_more_url(): string {
80 return 'https://go.elementor.com/app-website-checklist-header-article';
81 }
82 }
83