PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 2.8.16
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v2.8.16
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / admin / modules / funnels / views / view.php

view.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 2.8.16, at admin/modules/funnels/views/view.php

585 lines 36.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * This code snippet will check if pro addons is activated or not. if not activated
5 * Total number of funnels will be maximum 3, otherwise customer can add as more funnels
6 * As they want
7 *
8 * @package
9 */
10 $is_pro_active = apply_filters( 'wpfunnels/is_pro_license_activated', false );
11 $count_funnels = wp_count_posts('wpfunnels')->publish + wp_count_posts('wpfunnels')->draft;
12 $total_allowed_funnels = 3;
13 if ( $is_pro_active ) {
14 $total_allowed_funnels = -1;
15 }
16
17 $is_wc = \WPFunnels\Wpfnl_functions::is_wc_active();
18 $is_lms = \WPFunnels\Wpfnl_functions::is_lms_addon_active();
19 $is_mint_pro_active = \WPFunnels\Wpfnl_functions::is_mint_mrm_active();
20 $global_funnel_type = \WPFunnels\Wpfnl_functions::get_global_funnel_type();
21
22 $is_wc_installed = 'no';
23 $is_lms_installed = 'no';
24 $puglins = get_plugins();
25
26 if ( isset( $puglins['woocommerce/woocommerce.php']) ) {
27 $is_wc_installed = 'yes';
28 }
29
30 if ( isset( $puglins['wpfunnels-pro-lms/wpfunnels-pro-lms.php']) ) {
31 $is_lms_installed = 'yes';
32 }
33
34 ?>
35
36
37 <div class="wpfnl">
38 <div class="wpfnl-dashboard">
39 <nav class="wpfnl-dashboard__nav">
40 <?php use WPFunnels\Wpfnl_functions;
41 require_once WPFNL_DIR . '/admin/partials/dashboard-nav.php'; ?>
42 </nav>
43
44 <div class="dashboard-nav__content">
45
46 <div id="templates-library"></div>
47
48 <div class="import-funnel-modal">
49 <div class="import-funnel-modal-inner">
50 <div class="import-funnel-modal-wrapper">
51 <h4 class="import-funnel-modal-title"><?php echo __('Import Funnel','wpfnl') ?></h4>
52
53 <button class="close-modal" type="button">
54 <?php require_once WPFNL_DIR . '/admin/partials/icons/cross-icon.php'; ?>
55 </button>
56
57 <form id="wpfnl-import-funnels" name="form-import" method="post" enctype="multipart/form-data" action >
58
59 <input id="wpfnl-file-import" name="import-data" type="file" title=" " accept="application/JSON"/>
60
61 <label for="wpfnl-file-import" class="import-label">
62 <span class="upload-icon">
63 <svg width="25" height="25" fill="none" viewBox="0 0 25 25" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M18.557 8.628a6.242 6.242 0 00-12.11-.007 6.25 6.25 0 00.586 12.472h2.344a.781.781 0 100-1.562H7.033a4.688 4.688 0 01-.027-9.375.81.81 0 00.86-.667 4.68 4.68 0 019.266 0 .844.844 0 00.839.667 4.687 4.687 0 110 9.375h-2.344a.781.781 0 100 1.562h2.344a6.25 6.25 0 00.586-12.465z"/><path fill="#fff" d="M15.852 15.396a.781.781 0 001.105-1.105l-3.906-3.906a.781.781 0 00-1.105 0L8.04 14.291a.781.781 0 001.104 1.105l2.573-2.573v9.833a.781.781 0 101.563 0v-9.833l2.572 2.573z"/></svg>
64 </span>
65 <span class="upload-success-icon">
66 <svg width="25" height="25" fill="none" viewBox="0 0 25 25" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1138_1680)"><path fill="#fff" stroke="#239654" stroke-width="2" d="M24.268 7.675L11.079 20.863a2.503 2.503 0 01-3.538 0L.733 14.054a2.502 2.502 0 013.538-3.538l5.04 5.04 11.418-11.42a2.502 2.502 0 013.539 3.54z"/></g><defs><clipPath id="clip0_1138_1680"><path fill="#fff" d="M0 0h25v25H0z"/></clipPath></defs></svg>
67 </span>
68
69 <h4><?php echo __('Drag & Drop or ', 'wpfnl'); ?><span class="primary-color"><?php echo __('Choose file ', 'wpfnl'); ?></span> <?php echo __('to upload.', 'wpfnl'); ?></h4>
70 <p><?php echo __('Supported formats: JSON file.', 'wpfnl'); ?></p>
71 </label>
72
73 <span class="hints" id="wpfnl-export-import-warning" style="display:none; color: #d63638 !important" ><?php echo __('Please select a valid file.', 'wpfnl'); ?></span>
74
75 <div class="button-area">
76 <button class="btn-default close-modal cancel" type="button">
77 <?php echo __('Cancel', 'wpfnl'); ?>
78 </button>
79
80 <button id="wpfnl-import-funnel" class="btn-default" type="submit">
81 <?php echo __('Import', 'wpfnl'); ?>
82 <span class="wpfnl-loader"></span>
83 </button>
84 </div>
85 </form>
86 </div>
87 </div>
88 </div>
89
90 <?php if (count($this->funnels) || !empty($_GET['s'])) { ?>
91 <div class="wpfnl-dashboard__header overview-header">
92 <form class="funnel-search" method="get">
93 <?php
94 $s = '';
95 if (isset($_GET['s'])) {
96 $s = sanitize_text_field( $_GET['s'] );
97 }
98 ?>
99
100 <div class="search-group">
101 <input name="page" type="hidden" value="<?php echo WPFNL_MAIN_PAGE_SLUG; ?>">
102 <?php require_once WPFNL_DIR . '/admin/partials/icons/search-icon.php'; ?>
103 <input name="s" type="text" value="<?php echo esc_attr($s); ?>" placeholder="<?php echo __('Search for a funnel...', 'wpfnl'); ?>">
104 </div>
105 </form>
106
107 <!-- Export import -->
108 <?php if ( $is_pro_active ) { ?>
109 <a href="#" class="import-export wpfnl-export-all-funnels">
110 <?php
111 require WPFNL_DIR . '/admin/partials/icons/export-icon.php';
112 echo __('Export All', 'wpfnl');
113 ?>
114 </a>
115
116 <a href="#" class="import-export wpfnl-import-funnels">
117 <?php
118 require WPFNL_DIR . '/admin/partials/icons/import-icon.php';
119 echo __('Import', 'wpfnl');
120 ?>
121 </a>
122 <!-- Export import -->
123 <?php
124 }
125
126 ?>
127 <a href="#" class="btn-default add-new-funnel-btn">
128 <?php
129 require WPFNL_DIR . '/admin/partials/icons/plus-icon.php';
130 echo __('Add new Funnel', 'wpfnl');
131 ?>
132 </a>
133 </div>
134 <?php } ?>
135
136 <div class="wpfnl-dashboard__inner-content <?php echo count($this->funnels) ? '' : 'no-funnel' ?>">
137 <div class="funnel-list__wrapper">
138 <?php if (count($this->funnels)) { ?>
139 <div class="funnel__single-list list-header">
140 <div class="bulk-action-wrapper">
141 <p><span class="selected-funnel-count">2 Funnel</span> Seleted</p>
142
143 <button class="btn-default bulk-delete-toggler">
144 <?php echo __('Bulk Actions', 'wpfnl'); ?>
145 <svg width="8" height="6" fill="none" viewBox="0 0 8 6" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" stroke="#fff" stroke-width=".2" d="M4 5.28a.559.559 0 01-.396-.164l-3.44-3.44A.56.56 0 11.956.884L4 3.928 7.044.884a.56.56 0 01.792.792l-3.44 3.44A.559.559 0 014 5.28z"/></svg>
146
147 <ul class="wpfnl-dropdown">
148 <?php if ($is_pro_active && defined('WPFNL_PRO_VERSION') && version_compare( WPFNL_PRO_VERSION, "1.9.3", ">=" ) ) { ?>
149 <li>
150 <a href="#" class="wpfnl-bulk-export">
151 <?php require WPFNL_DIR . '/admin/partials/icons/export-icon.php'; ?>
152 <?php echo __('Bulk Export', 'wpfnl'); ?>
153 </a>
154 </li>
155 <?php
156 }
157 ?>
158 <li>
159 <a href="#" class="delete wpfnl-bulk-delete" id="funnel__bulk-delete" title="Delete Funnel">
160 <?php require WPFNL_DIR . '/admin/partials/icons/delete-icon.php'; ?>
161 <?php echo __('Delete', 'wpfnl'); ?>
162 </a>
163 </li>
164 </ul>
165 </button>
166 </div>
167
168 <div class="funnel-list__bulk-action">
169 <?php
170 if (count($this->funnels) > 0) {
171 ?>
172 <div class="funnel-list__bulk-select select-all-funnels" >
173 <span class="wpfnl-checkbox no-title">
174 <input type="checkbox" name="funnel-list__bulk-select" id="funnel-list__bulk-select">
175 <label for="funnel-list__bulk-select"></label>
176 </span>
177 </div>
178 <?php
179 }
180 ?>
181 </div>
182 <div class="list-cell wpfnl-name">Name</div>
183 <div class="list-cell wpfnl-intigrations">Integration</div>
184 <div class="list-cell wpfnl-creation-date">Creation Date</div>
185 <div class="list-cell wpfnl-status">Status</div>
186 <div class="list-cell list-action">Action</div>
187 </div>
188
189 <?php
190 foreach ($this->funnels as $funnel) {
191 $funnel_id = $funnel->get_id();
192 $edit_link = add_query_arg(
193 [
194 'page' => WPFNL_EDIT_FUNNEL_SLUG,
195 'id' => $funnel_id,
196 'step_id' => $funnel->get_first_step_id(),
197 ],
198 admin_url('admin.php')
199 );
200 $isAutomationEnable = get_post_meta( $funnel_id, 'is_automation_enabled', true );
201 $isAutomationData = get_post_meta( $funnel_id,'funnel_automation_data',true);
202 $isGbfInstalled = is_plugin_active( 'wpfunnels-pro-gbf/wpfnl-pro-gb.php' );
203 $start_condition = get_post_meta( $funnel_id, 'global_funnel_start_condition', true );
204 $builder = Wpfnl_functions::get_page_builder_by_step_id($funnel_id);
205 $utm_settings = Wpfnl_functions::get_funnel_utm_settings( $funnel_id );
206 $is_mint_automation = Wpfnl_functions::maybe_automation_exist_for_a_funnel( $funnel_id );
207 $funnel_status = 'publish' === get_post_status( $funnel_id ) ? 'Draft': 'Publish';
208 $isGbf = get_post_meta( $funnel_id, 'is_global_funnel', true );
209 $_type = get_post_meta( $funnel_id, '_wpfnl_funnel_type', true );
210
211 if( 'lead' == $_type ){
212 $funnel_type = __('Lead', 'wpfnl');
213 }elseif( 'lms' == $_type ){
214 $funnel_type = __('LMS', 'wpfnl');
215 }else{
216 $funnel_type = __('Woo', 'wpfnl');
217 }
218
219 $first_step_id = Wpfnl_functions::get_first_step( $funnel_id );
220
221 // Fallback for existing users' existing funnel
222 // For new funnel, this condition should not trigger
223 if( !$first_step_id ) {
224 Wpfnl_functions::generate_first_step( $funnel_id );
225 $first_step_id = Wpfnl_functions::get_first_step( $funnel_id );
226 }
227
228 if ($first_step_id) {
229 $view_link = apply_filters( 'wpfunnels/modify_funnel_view_link', get_the_permalink( $first_step_id ), $first_step_id, $funnel_id );
230
231 } else {
232 $view_link = '#';
233 }
234
235 if($utm_settings['utm_enable'] == 'on') {
236 unset($utm_settings['utm_enable']);
237 $view_link = add_query_arg($utm_settings,$view_link);
238 $view_link = strtolower($view_link);
239 }
240 if( 'lead' == $global_funnel_type && ( 'lms' == $_type || 'wc' == $_type ) ){
241 echo '<div class="funnel__single-list list-body funnel-disabled" title="To run/edit this funnel, please change the funnel type to sales from WPFunnels - Settings">';
242 }elseif( 'sales' == $global_funnel_type && 'wc' == $_type && !$is_wc ){
243 echo '<div class="funnel__single-list list-body funnel-disabled" title="To run/edit this funnel, please Activate WooCommerce.">';
244 }elseif( 'sales' == $global_funnel_type && 'lms' == $_type && !$is_lms ){
245 echo '<div class="funnel__single-list list-body funnel-disabled" title="To run/edit this funnel, please Activate LearnDash & WPFunnels Pro - LMS Funnel">';
246 }else{
247 echo '<div class="funnel__single-list list-body">';
248 }
249 ?>
250 <div class="funnel-list__bulk-action">
251 <span class="wpfnl-checkbox no-title">
252 <input type="checkbox" name="funnel-list-select" id="funnel-list<?php echo $funnel->get_id(); ?>-select" data-id="<?php echo $funnel->get_id(); ?>">
253 <label for="funnel-list<?php echo $funnel->get_id(); ?>-select"></label>
254 </span>
255 </div>
256
257 <div class="list-cell wpfnl-name">
258 <?php if( $builder ){ ?>
259 <span class="builder-logo" title="<?php echo str_replace('-',' ',ucfirst($builder));?>">
260 <?php include WPFNL_DIR . '/admin/partials/icons/'.$builder.'.php'; ?>
261 </span>
262
263 <?php } else{ ?>
264 <span class="builder-logo" title="No Builder Found">
265 </span>
266 <?php } ?>
267 <?php if( ('lead' == $global_funnel_type && 'lead' !== $_type) || ( 'sales' == $global_funnel_type && ( ('wc' == $_type && !$is_wc) || ('lms' == $_type && !$is_lms) ) ) ){ ?>
268 <a href="#" class="name disabled"> <?php echo $funnel->get_funnel_name() ?></a>
269 <?php }else{ ?>
270 <a href="<?php echo esc_url_raw($edit_link); ?>" class="name"> <?php echo $funnel->get_funnel_name() ?></a>
271 <?php } ?>
272
273 <span class="steps">
274 <?php echo $funnel->get_total_steps(). ' '. Wpfnl_functions::get_formatted_data_with_phrase($funnel->get_total_steps(), 'step', 'steps'); ?> <?php echo ' - '.$funnel_type ?>
275 </span>
276 </div>
277
278 <div class="list-cell wpfnl-intigrations">
279 <?php if ( $is_pro_active && $is_mint_pro_active ) { ?>
280 <?php if( !empty($is_mint_automation) ) { ?>
281 <span class="automation-tag automation-active">
282 <?php include WPFNL_DIR . '/admin/partials/icons/success-icon-green.php'; ?>
283 <?php echo __('Mail Mint','wpfnl') ?>
284 <span class="tooltip">Mail mint automation is created for this funnel.</span>
285 </span>
286 <?php }else{ ?>
287 <span class="automation-tag automation-inactive">
288 <?php include WPFNL_DIR . '/admin/partials/icons/success-icon-gray.php'; ?>
289 <?php echo __('Mail Mint','wpfnl') ?>
290 <span class="tooltip">Mail mint automation is not created for this funnel.</span>
291 </span>
292 <?php } ?>
293 <?php } ?>
294
295 <?php if ($is_pro_active ) { ?>
296 <?php if( !empty($isAutomationData) ) { ?>
297 <span class="automation-tag automation-active">
298 <?php include WPFNL_DIR . '/admin/partials/icons/success-icon-green.php'; ?>
299 <?php echo __('Integration','wpfnl') ?>
300 <span class="tooltip">Integration is set for this funnel.</span>
301 </span>
302 <?php }else{ ?>
303 <span class="automation-tag automation-inactive">
304 <?php include WPFNL_DIR . '/admin/partials/icons/success-icon-gray.php'; ?>
305 <?php echo __('Integration','wpfnl') ?>
306 <span class="tooltip">Integration is not set for this funnel.</span>
307 </span>
308 <?php } ?>
309
310 <?php } ?>
311
312 <?php if ($isGbfInstalled) { ?>
313 <?php if( $isGbf == 'yes' && !empty($start_condition) ) { ?>
314 <span class="automation-tag automation-active">
315 <?php include WPFNL_DIR . '/admin/partials/icons/success-icon-green.php'; ?>
316 <?php echo __('Global funnel','wpfnl') ?>
317 <span class="tooltip">Global funnel is set for this funnel.</span>
318 </span>
319 <?php } elseif( $isGbf == 'yes' && !$start_condition ){ ?>
320 <span class="automation-tag automation-inactive">
321 <?php include WPFNL_DIR . '/admin/partials/icons/success-icon-warning.php'; ?>
322 <?php echo __('Global funnel','wpfnl') ?>
323 <span class="tooltip">Opps.. It looks like you did not set any condition for global funnel.</span>
324 </span>
325 <?php } else{ ?>
326 <span class="automation-tag automation-inactive">
327 <?php include WPFNL_DIR . '/admin/partials/icons/success-icon-gray.php'; ?>
328 <?php echo __('Global funnel','wpfnl') ?>
329 <span class="tooltip">Global funnel is not set for this funnel.</span>
330 </span>
331 <?php } ?>
332 <?php } ?>
333
334 <?php if(WPFNL_IS_REMOTE) {?>
335 <div class="builder-type">
336 <?php
337 $builders = wp_get_post_terms( $funnel->get_id(), 'template_builder', array( 'fields' => 'all' ) );
338 if($builders) {
339 foreach ($builders as $builder) {
340 echo "<span>{$builder->name}</span>";
341 }
342 }
343 ?>
344 </div>
345 <?php } ?>
346 </div>
347
348 <div class="list-cell wpfnl-creation-date">
349 <span class="post-date"><?php echo $funnel->get_published_date() ?></span>
350 </div>
351
352 <div class="list-cell wpfnl-status <?php echo strtolower($funnel->get_status()) ?>">
353 <span class="post-status"><?php echo $funnel->get_status() ?></span>
354 </div>
355
356 <div class="list-cell list-action">
357 <?php if( ('lead' == $global_funnel_type && 'lead' !== $_type) || ( 'sales' == $global_funnel_type && ( ('wc' == $_type && !$is_wc) || ('lms' == $_type && !$is_lms) ) ) ){ ?>
358 <a href="#" class="edit disabled" title="<?php esc_attr_e( 'Lead funnel type is activated in global settings', 'wpfnl' ) ?>">
359 <?php require WPFNL_DIR . '/admin/partials/icons/edit-icon.php'; ?>
360 <?php //echo __('edit', 'wpfnl'); ?>
361 </a>
362 <?php }else{ ?>
363 <a href="<?php echo esc_url_raw($edit_link); ?>" class="edit" title="Edit">
364 <?php require WPFNL_DIR . '/admin/partials/icons/edit-icon.php'; ?>
365 <?php //echo __('edit', 'wpfnl'); ?>
366 </a>
367 <?php } ?>
368
369 <?php
370 $disable_view_button = apply_filters( 'wpfunnels/disable_funnel_view_button', false, $funnel_id );
371
372 if( ('lead' == $global_funnel_type && 'lead' !== $_type) || ( 'sales' == $global_funnel_type && ( ('wc' == $_type && !$is_wc) || ('lms' == $_type && !$is_lms) ) ) ){ ?>
373 <a class="view <?php echo 'disabled'; ?>" title="<?php esc_attr_e( 'Lead funnel type is activated in global settings', 'wpfnl' ) ?>">
374 <?php require WPFNL_DIR . '/admin/partials/icons/eye-icon.php'; ?>
375 <?php //echo __('view', 'wpfnl'); ?>
376 </a>
377 <?php
378 }elseif( $disable_view_button ){
379 ?>
380 <a class="view <?php echo $disable_view_button ? 'disabled' : ''; ?>" title="<?php esc_attr_e( 'This is a Global Funnel', 'wpfnl' ) ?>">
381 <?php require WPFNL_DIR . '/admin/partials/icons/eye-icon.php'; ?>
382 <?php //echo __('view', 'wpfnl'); ?>
383 </a>
384 <?php
385 }else{
386 ?>
387 <a href="<?php echo esc_url_raw($view_link); ?>" class="view <?php echo $disable_view_button ? 'disabled' : ''; ?>" target="_blank" title="View">
388 <?php require WPFNL_DIR . '/admin/partials/icons/eye-icon.php'; ?>
389 <?php //echo __('view', 'wpfnl'); ?>
390 </a>
391 <?php
392 }
393 ?>
394
395 <span class="more-action funnel-list__more-action" >
396 <?php require WPFNL_DIR . '/admin/partials/icons/dot-icon.php'; ?>
397
398 <ul class="more-actions wpfnl-dropdown">
399 <?php if( $is_pro_active || $count_funnels < 3 ): ?>
400 <li>
401 <a href="#" class="duplicate wpfnl-duplicate-funnel" id="wpfnl-duplicate-funnel" data-id="<?php echo $funnel_id; ?>">
402 <?php require WPFNL_DIR . '/admin/partials/icons/duplicate-icon.php'; ?>
403 <?php echo __('Duplicate', 'wpfnl'); ?>
404 <span class="wpfnl-loader"></span>
405 </a>
406 </li>
407 <?php endif; ?>
408
409 <?php if( $is_pro_active ): ?>
410 <li>
411 <a href="#" class="duplicate wpfnl-export-funnel" id="wpfnl-export-funnel" data-id="
412 <?php
413 echo $funnel_id;
414 ?>
415 ">
416 <?php
417 require WPFNL_DIR . '/admin/partials/icons/export-icon.php';
418 echo __('Export', 'wpfnl');
419 ?>
420 <span class="wpfnl-loader"></span>
421 </a>
422 </li>
423 <?php endif; ?>
424
425 <li>
426 <a href="" class="delete wpfnl-update-funnel-status" id="wpfnl-update-funnel-status" data-id="<?php echo $funnel_id; ?>" data-status="<?php echo strtolower($funnel_status); ?>">
427 <?php
428 if( 'draft' === strtolower($funnel_status) ){
429 require WPFNL_DIR . '/admin/partials/icons/draft-icon.php';
430 }else{
431 require WPFNL_DIR . '/admin/partials/icons/publish-icon.php';
432 }
433 ?>
434 <?php echo $funnel_status; ?>
435 </a>
436 </li>
437 <li>
438 <a href="" class="delete wpfnl-delete-funnel" id="wpfnl-delete-funnel" data-id="<?php echo $funnel_id; ?>">
439 <?php require WPFNL_DIR . '/admin/partials/icons/delete-icon.php'; ?>
440 <?php echo __('Delete', 'wpfnl'); ?>
441 </a>
442 </li>
443
444 </ul>
445 </span>
446 </div>
447 <!-- /list-action -->
448
449 </div>
450 <?php
451 } //--end foreach--
452 } else {
453 if (isset($_GET['s'])) {
454 echo __('Sorry No Funnels Found', 'wpfnl');
455 } else {
456 $create_funnel_link = add_query_arg(
457 [
458 'page' => WPFNL_CREATE_FUNNEL_SLUG,
459 ],
460 admin_url('admin.php')
461 ); ?>
462
463 <div class="no-funnel-wrapper">
464 <?php require WPFNL_DIR . '/admin/partials/icons/no-funnels-icon.php'; ?>
465 <h1>Funnels</h1>
466 <p class="short-desc">Convert More Visitors into Customers: A Step-by-Step Funnel Blueprint</p>
467
468 <div class="create-new-funnel">
469 <a href="#" class="btn-default add-new-funnel-btn">
470 <svg width="15" height="15" fill="none" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M7.723 1.387v11.986M1.717 7.38h12.008"/></svg>
471
472 <?php echo __('Create Your First Funnel', 'wpfnl'); ?>
473 </a>
474
475 <a href="#" class="btn-default import-export wpfnl-import-funnels">
476 <?php
477 require WPFNL_DIR . '/admin/partials/icons/import-icon.php';
478 echo __('Import Funnel', 'wpfnl');
479 ?>
480 </a>
481 </div>
482 </div>
483
484 <!-- <div class="wpfnl-helpe-guide">
485 <button class="setup-guide" type="button" title="Setup Guide">
486 <?php require WPFNL_DIR . '/admin/partials/icons/setup-guide-icon.php'; ?>
487 Setup Guide
488 </button>
489
490 <div class="wpfnl-canvas-helper">
491 <button class="helper-btn" type="button" title="Help & Resources">
492 <?php require WPFNL_DIR . '/admin/partials/icons/question-mark-icon.php'; ?>
493 </button>
494
495 <div class="help-resource" v-if="showHelperResource">
496 <a href="" class="single-menu" target="_blank">YouTube Video</a>
497 <a href="" class="single-menu" target="_blank">Documantation</a>
498 <a href="" class="single-menu" target="_blank">Blog</a>
499 </div>
500 </div>
501 </div> -->
502
503 <?php
504 }
505 } ?>
506
507 <!-- funnel pagination -->
508 <?php if ($this->pagination) { ?>
509 <div class="list-footer">
510 <div class="pagination-number">
511 <p>
512 <strong>Showing</strong>
513 <select name="wpfnl_listing_page_offset" id="wpfnl_listing_page_offset">
514 <option value="10" <?php echo 10 === (int)$per_page ? 'selected' : ''?>>10</option>
515 <option value="20" <?php echo 20 === (int)$per_page ? 'selected' : ''?>>20</option>
516 <option value="30" <?php echo 30 === (int)$per_page ? 'selected' : ''?>>30</option>
517 </select>
518 <?php
519 $limit_starts = $this->offset+1;
520 $limit_ends = min( [ $this->offset+$per_page, $this->total_funnels ] );
521 echo "{$limit_starts}-{$limit_ends} of {$this->total_funnels} items"
522 ?>
523 </p>
524 </div>
525
526 <div class="pagination">
527 <?php
528 $s = '';
529 if (isset($_GET['s'])) {
530 $s = '&s='. sanitize_text_field($_GET['s']);
531 } ?>
532
533 <div class="wpfnl-pagination">
534 <a href="<?php if ($this->current_page <= 1) {
535 echo '#';
536 } else {
537 echo "?page=wp_funnels&pageno=".($this->current_page - 1).$s."&per_page={$per_page}";
538 } ?>" class="nav-link prev <?php if ($this->current_page <= 1) {
539 echo 'disabled';
540 } ?>">
541 <svg width="12" height="12" fill="none" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><path fill="#7A8B9A" d="M6.002 12a.856.856 0 01-.609-.25L.25 6.586a.863.863 0 010-1.214L5.393.207a.855.855 0 011.415.62.863.863 0 01-.206.594L2.067 5.974l4.535 4.554a.862.862 0 01-.6 1.472z"/><path fill="#7A8B9A" d="M11.147 12a.856.856 0 01-.61-.25L5.395 6.586a.863.863 0 010-1.214L10.538.207a.855.855 0 011.414.62.862.862 0 01-.205.594L7.21 5.974l4.536 4.554a.862.862 0 01-.6 1.472z"/></svg>
542 </a>
543
544 <?php
545 for ($i = 1; $i <= $this->total_page; $i ++) {
546 if ($i < 1) {
547 continue;
548 }
549 if ($i > $this->total_funnels) {
550 break;
551 }
552 if ($i == $this->current_page) {
553 $class = "active";
554 } else {
555 $class = "";
556 } ?>
557 <a href="?page=wp_funnels&pageno=<?php echo $i.$s."&per_page={$per_page}"; ?>" class="nav-link <?php echo $class; ?>"><?php echo $i; ?></a>
558 <?php
559 } ?>
560
561 <a href="<?php if ($this->current_page == $this->total_page) {
562 echo '#';
563 } else {
564 echo "?page=wp_funnels&pageno=".($this->current_page + 1)."&per_page={$per_page}";
565 } ?>" class="nav-link next <?php if ($this->current_page >= $this->total_funnels) {
566 echo 'disabled';
567 } ?>">
568 <svg width="12" height="12" fill="none" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><path fill="#7A8B9A" d="M5.998 12a.856.856 0 00.609-.25l5.144-5.164a.863.863 0 000-1.214L6.607.207a.855.855 0 00-1.415.62.863.863 0 00.206.594l4.535 4.553-4.535 4.554a.862.862 0 00.6 1.472z"/><path fill="#7A8B9A" d="M.853 12a.856.856 0 00.61-.25l5.143-5.164a.863.863 0 000-1.214L1.462.207a.855.855 0 00-1.414.62.863.863 0 00.205.594L4.79 5.974.253 10.528A.862.862 0 00.853 12z"/></svg>
569 </a>
570 </div>
571
572 </div>
573 </div>
574 <?php } ?>
575
576 </div>
577 <!-- /funnel-list__wrapper -->
578
579 </div>
580
581
582 </div>
583 </div>
584
585 </div>