GettingStartedView.php
7.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?php
/**
* SearchWP GettingStartedView.
*
* @since 4.3.0
*/
namespace SearchWP\Admin\Views;
use SearchWP\Utils;
use SearchWP\Admin\NavTab;
/**
* Class GettingStartedView is responsible for providing the UI for Getting Started.
*
* @since 4.3.0
*/
class GettingStartedView {
private static $slug = 'getting-started';
/**
* GettingStartedView constructor.
*
* @since 4.3.0
*/
function __construct() {
if ( Utils::is_swp_admin_page( 'about-us' ) ) {
new NavTab([
'page' => 'about-us',
'tab' => self::$slug,
'label' => __( 'Getting Started', 'searchwp' ),
]);
}
if ( Utils::is_swp_admin_page( 'about-us', self::$slug ) ) {
add_action( 'searchwp\settings\view', [ __CLASS__, 'render' ] );
add_action( 'admin_enqueue_scripts', [ __CLASS__, 'assets' ] );
}
}
/**
* Outputs the assets needed for the Settings UI.
*
* @since 4.3.0
* @return void
*/
public static function assets() {
wp_enqueue_style(
SEARCHWP_PREFIX . self::$slug,
SEARCHWP_PLUGIN_URL . 'assets/css/admin/pages/welcome-about.css',
[
Utils::$slug . 'card',
Utils::$slug . 'style',
],
SEARCHWP_VERSION
);
}
/**
* Callback for the render of this view.
*
* @since 4.3.0
* @return void
*/
public static function render() {
?>
<div class="swp-content-container">
<div class="swp-content-section swp-margin-b40">
<div class="swp-content-block swp-bg--white">
<div class="swp-flex--row sm:swp-flex--col swp-flex--gap25">
<div class="swp-flex--item swp-w-3/5 sm:swp-w-full">
<h2 class="swp-h2 swp-leading--160 swp-margin-b25">
<?php esc_html_e( 'Configuring Your First Search Engine', 'searchwp' ); ?>
</h2>
<p class="swp-p-content swp-margin-b25">
<?php esc_html_e( 'To get started with SearchWP, click on one of our helpful documentation tutorials below to learn how you can configure your search engines to surface all the valuable content on your site.', 'searchwp' ); ?>
</p>
<p class="swp-margin-b15">
<a class="swp-a" href="https://searchwp.com/documentation/setup/engines/?utm_source=WordPress&utm_medium=Getting+Started+Documentation+Link&utm_campaign=SearchWP" target="_blank">
<?php esc_html_e( 'Configuring Your First Search Engine', 'searchwp' ); ?> →
</a>
</p>
<p class="swp-margin-b15">
<a class="swp-a" href="https://searchwp.com/documentation/setup/settings/?utm_source=WordPress&utm_medium=Getting+Started+Documentation+Link&utm_campaign=SearchWP" target="_blank">
<?php esc_html_e( 'Configuring Synonyms and Stopwords', 'searchwp' ); ?> →
</a>
</p>
<p class="swp-margin-b15">
<a class="swp-a" href="https://searchwp.com/documentation/setup/advanced/?utm_source=WordPress&utm_medium=Getting+Started+Documentation+Link&utm_campaign=SearchWP" target="_blank">
<?php esc_html_e( 'Configuring Fuzzy Matches, Did You Mean? and More', 'searchwp' ); ?> →
</a>
</p>
<p>
<a class="swp-a" href="https://searchwp.com/documentation/setup/statistics/?utm_source=WordPress&utm_medium=Getting+Started+Documentation+Link&utm_campaign=SearchWP" target="_blank">
<?php esc_html_e( 'Analyzing Search Statistics', 'searchwp' ); ?> →
</a>
</p>
</div>
<div class="swp-flex--item swp-w-2/5 sm:swp-w-full">
<img
src="<?php echo esc_url( SEARCHWP_PLUGIN_URL . 'assets/images/admin/pages/getting-started/engine.png' ); ?>"
alt="<?php esc_attr_e( 'SearchWP Engine Overview', 'searchwp' ); ?>"
style="width:100%"
>
</div>
</div>
</div> <!-- .swp-bg--white -->
</div> <!-- .swp-content-section -->
<div class="swp-content-section swp-margin-b40">
<div class="swp-content-block swp-bg--gray">
<h2 class="swp-h2 swp-leading--160 swp-margin-b25">
<?php esc_html_e( 'Get SearchWP Pro And Unlock All The Powerful Features', 'searchwp' ); ?>
</h2>
<p class="swp-p-content swp-margin-b25">
<?php esc_html_e( 'Upgrade to SearchWP Pro to unlock all the awesome features and experience
why SearchWP is consistently rated the best WordPress search plugin.', 'searchwp' ); ?>
</p>
<p class="swp-p-content">
<?php esc_html_e( 'We know that you will truly love SearchWP Pro. It’s used on over 30,000 smart WordPress websites and is consistently rated 5-stars', 'searchwp' ); ?> ( <span class="swp-rating-stars">★★★★★</span> ) <?php esc_html_e( 'by our customers.', 'searchwp' ); ?>
</p>
</div> <!-- .swp-bg--gray -->
<div class="swp-content-block swp-bg--white">
<ul class="swp-features-list">
<li><?php esc_html_e( 'Search related content', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'Cross-site multisite search', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'Search ecommerce product data', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'Search custom database tables and other custom content', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'Conditional search redirects', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'WPML integration support', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'Advanced Custom Fields (ACF) support', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'Advanced search metrics and insights', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'Custom search result ordering', 'searchwp' ); ?></li>
<li><?php esc_html_e( 'Additional popular plugin integrations', 'searchwp' ); ?></li>
</ul>
<h2 class="swp-h2 swp-margin-b10">
<a class="swp-a swp-font-semibold" href="https://searchwp.com/account/downloads/?utm_source=WordPress&utm_medium=Getting+Started+Upsell+Button&utm_campaign=SearchWP&utm_content=Get+SearchWP+Pro+Today+and+Unlock+all+the+Powerful+Features" target="_blank">
<?php esc_html_e( 'Get SearchWP Pro Today and Unlock all the Powerful Features', 'searchwp' ); ?> »
</a>
</h2>
<p class="swp-p-content">
<?php esc_html_e( 'Bonus: SearchWP users get', 'searchwp' ); ?> <span class="swp-text-green">50% off their upgrade price</span>, <?php esc_html_e( 'automatically applied at checkout.', 'searchwp' ); ?>
</p>
</div> <!-- .swp-bg--white -->
</div> <!-- .swp-content-section -->
</div>
<?php
}
}