html-admin-dashboard-setup.php
1 month ago
html-admin-page-addons-category-nav.php
4 years ago
html-admin-page-product-export.php
1 year ago
html-admin-page-reports.php
2 years ago
html-admin-page-status-logs-db.php
2 years ago
html-admin-page-status-logs.php
2 years ago
html-admin-page-status-report.php
2 months ago
html-admin-page-status-tools.php
1 month ago
html-admin-page-status.php
8 years ago
html-admin-settings.php
1 month ago
html-bulk-edit-product.php
1 year ago
html-email-template-preview.php
1 year ago
html-notice-custom.php
8 years ago
html-notice-update.php
6 months ago
html-notice-updated.php
7 years ago
html-notice-updating.php
6 years ago
html-quick-edit-product.php
1 year ago
html-report-by-date.php
5 years ago
html-admin-dashboard-setup.php
73 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Dashboard - Finish Setup |
| 4 | * |
| 5 | * @package WooCommerce\Admin |
| 6 | */ |
| 7 | |
| 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | exit; |
| 10 | } |
| 11 | |
| 12 | /** |
| 13 | * Dashboard setup widget view variables. |
| 14 | * |
| 15 | * @var array{title:string, content:string, button_label:string, image_url:string, image_alt:string} $task_header Task header data. |
| 16 | * @var bool $task_is_in_progress Whether the task is in progress. |
| 17 | * @var string $task_in_progress_label Task in-progress label. |
| 18 | */ |
| 19 | ?> |
| 20 | <div class="dashboard-widget-finish-setup" data-current-step="<?php echo esc_attr( (string) ( $step_number - 1 ) ); ?>" data-total-steps="<?php echo esc_attr( (string) $tasks_count ); ?>"> |
| 21 | <div class="description"> |
| 22 | <div class="dashboard-widget-finish-setup__content"> |
| 23 | <div class="dashboard-widget-finish-setup__meta"> |
| 24 | <span class='progress-wrapper'> |
| 25 | <svg class="circle-progress" width="17" height="17" version="1.1" xmlns="http://www.w3.org/2000/svg"> |
| 26 | <circle r="6.5" cx="10" cy="10" fill="transparent" stroke-dasharray="40.859" stroke-dashoffset="0"></circle> |
| 27 | <circle class="bar" r="6.5" cx="190" cy="10" fill="transparent" stroke-dasharray="40.859" stroke-dashoffset="<?php echo esc_attr( $circle_dashoffset ); ?>" transform='rotate(-90 100 100)'></circle> |
| 28 | </svg> |
| 29 | <span><?php esc_html_e( 'Step', 'woocommerce' ); ?> <?php echo esc_html( $step_number ); ?> <?php esc_html_e( 'of', 'woocommerce' ); ?> <?php echo esc_html( $tasks_count ); ?></span> |
| 30 | </span> |
| 31 | </div> |
| 32 | <h3 class="dashboard-widget-finish-setup__title"> |
| 33 | <?php echo esc_html( $task_header['title'] ); ?> |
| 34 | <?php if ( $task_is_in_progress && $task_in_progress_label ) : ?> |
| 35 | <span class="dashboard-widget-finish-setup__in-progress"><?php echo esc_html( $task_in_progress_label ); ?></span> |
| 36 | <?php endif; ?> |
| 37 | </h3> |
| 38 | <p><?php echo esc_html( $task_header['content'] ); ?></p> |
| 39 | <div><a href='<?php echo esc_url( $button_link ); ?>' class='button button-primary'><?php echo esc_html( $task_header['button_label'] ); ?></a></div> |
| 40 | </div> |
| 41 | <img |
| 42 | class="dashboard-widget-finish-setup__image" |
| 43 | src="<?php echo esc_url( $task_header['image_url'] ); ?>" |
| 44 | alt="<?php echo esc_attr( $task_header['image_alt'] ); ?>" |
| 45 | /> |
| 46 | </div> |
| 47 | <div class="clear"></div> |
| 48 | </div> |
| 49 | |
| 50 | <script type="text/javascript"> |
| 51 | /*global jQuery */ |
| 52 | (function( $ ) { |
| 53 | const widget = $( '.dashboard-widget-finish-setup' ); |
| 54 | const currentStep = widget.data( 'current-step' ); |
| 55 | const totalSteps = widget.data( 'total-steps' ); |
| 56 | |
| 57 | $( function() { |
| 58 | window.wcTracks.recordEvent( 'wcadmin_setup_widget_view', { |
| 59 | completed_tasks: currentStep, |
| 60 | total_tasks: totalSteps, |
| 61 | } ); |
| 62 | }); |
| 63 | |
| 64 | |
| 65 | $( '.dashboard-widget-finish-setup a' ).on( 'click', function() { |
| 66 | window.wcTracks.recordEvent( 'wcadmin_setup_widget_click', { |
| 67 | completed_tasks: currentStep, |
| 68 | total_tasks: totalSteps, |
| 69 | } ); |
| 70 | }); |
| 71 | })( jQuery ); |
| 72 | </script> |
| 73 |