| 1 |
<?php |
| 2 |
/** |
| 3 |
* Complete Step |
| 4 |
*/ |
| 5 |
|
| 6 |
namespace UltimatePostKit\SetupWizard; |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; |
| 10 |
} |
| 11 |
|
| 12 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template partial included within a method; variables are method-scoped, not global. |
| 13 |
|
| 14 |
$templates_path = BDTUPK_INC_PATH . 'setup-wizard/assets/data.json'; |
| 15 |
$templates = json_decode( file_get_contents( $templates_path ), true ); |
| 16 |
|
| 17 |
?> |
| 18 |
<div class="bdt-wizard-step bdt-text-center" data-step="finish"> |
| 19 |
|
| 20 |
<div class="bdt-templates-section"> |
| 21 |
<div class="bdt-success-icon"> |
| 22 |
<i class="dashicons dashicons-yes-alt"></i> |
| 23 |
</div> |
| 24 |
|
| 25 |
<h3><?php esc_html_e( 'Ready-to-Use Templates', 'ultimate-post-kit' ); ?></h3> |
| 26 |
<p><?php esc_html_e( 'Get a head start with these professional templates. Just click on Import to add them to your site.', 'ultimate-post-kit' ); ?></p> |
| 27 |
|
| 28 |
<div class="template-list"> |
| 29 |
<?php foreach ( $templates as $template ) : ?> |
| 30 |
<?php |
| 31 |
// $importUrl = $template['import_url']; // or any file path / URL |
| 32 |
$assets_url = plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'setup-wizard/assets'; |
| 33 |
$importUrl = $assets_url . $template['import_url']; |
| 34 |
$thumbnailUrl = $assets_url . $template['thumbnail']; |
| 35 |
|
| 36 |
$extension = pathinfo($importUrl, PATHINFO_EXTENSION); |
| 37 |
if (!$extension || !in_array(strtolower($extension), ['json', 'zip'])) { |
| 38 |
continue; |
| 39 |
} |
| 40 |
$extension = strtolower($extension); |
| 41 |
?> |
| 42 |
<div class="choose-template <?php echo esc_attr( $extension ) ?> <?php echo $extension =='zip' ? 'bdt-upk-import-temp-zip':'bdt-upk-import-temp-json' ?>" data-import-url="<?php echo esc_url( $importUrl ); ?>"> |
| 43 |
<div class="template-image"> |
| 44 |
<img src="<?php echo esc_url( $thumbnailUrl ); ?>" alt="<?php echo esc_attr( $template['title'] ); ?>"> |
| 45 |
<div class="template-actions"> |
| 46 |
<a href="<?php echo esc_url( $template['demo_url'] ); ?>" target="_blank" class="template-preview"> |
| 47 |
<i class="dashicons dashicons-visibility"></i> <?php esc_html_e( 'Preview', 'ultimate-post-kit' ); ?> |
| 48 |
</a> |
| 49 |
<button class="template-import"> |
| 50 |
<i class="dashicons dashicons-download"></i> <?php esc_html_e( 'Import', 'ultimate-post-kit' ); ?> |
| 51 |
</button> |
| 52 |
</div> |
| 53 |
</div> |
| 54 |
<div class="template-title"><?php echo esc_html( $template['title'] ); ?></div> |
| 55 |
</div> |
| 56 |
<?php endforeach; ?> |
| 57 |
</div> |
| 58 |
</div> |
| 59 |
|
| 60 |
<div class="bdt-help-resources"> |
| 61 |
<h3><?php esc_html_e( 'Helpful Resources', 'ultimate-post-kit' ); ?></h3> |
| 62 |
|
| 63 |
<div class="bdt-resources-grid"> |
| 64 |
<a href="https://bdthemes.com/knowledge-base/ultimate-post-kit/" target="_blank" class="bdt-resource-item"> |
| 65 |
<div class="resource-icon"> |
| 66 |
<i class="dashicons dashicons-book"></i> |
| 67 |
</div> |
| 68 |
<h4><?php esc_html_e( 'Documentation', 'ultimate-post-kit' ); ?></h4> |
| 69 |
<p><?php esc_html_e( 'Find detailed guides and documentation', 'ultimate-post-kit' ); ?></p> |
| 70 |
</a> |
| 71 |
|
| 72 |
<a href="https://bdthemes.com/support/" target="_blank" class="bdt-resource-item"> |
| 73 |
<div class="resource-icon"> |
| 74 |
<i class="dashicons dashicons-sos"></i> |
| 75 |
</div> |
| 76 |
<h4><?php esc_html_e( 'Get Support', 'ultimate-post-kit' ); ?></h4> |
| 77 |
<p><?php esc_html_e( 'Contact our customer support team', 'ultimate-post-kit' ); ?></p> |
| 78 |
</a> |
| 79 |
|
| 80 |
<a href="https://www.youtube.com/watch?v=zNeoRz94cPw&list=PLP0S85GEw7DNBnZCb4RtJzlf38GCJ7z1b" target="_blank" class="bdt-resource-item"> |
| 81 |
<div class="resource-icon"> |
| 82 |
<i class="dashicons dashicons-video-alt3"></i> |
| 83 |
</div> |
| 84 |
<h4><?php esc_html_e( 'Video Tutorials', 'ultimate-post-kit' ); ?></h4> |
| 85 |
<p><?php esc_html_e( 'Watch tutorials on our YouTube channel', 'ultimate-post-kit' ); ?></p> |
| 86 |
</a> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
|
| 90 |
<div class="bdt-flex bdt-flex-between bdt-flex-wrap"> |
| 91 |
<div class="bdt-wizard-navigation"> |
| 92 |
<button class="bdt-button bdt-button-secondary bdt-wizard-prev" data-step="integration"> |
| 93 |
<span><i class="dashicons dashicons-arrow-left-alt"></i></span> |
| 94 |
<?php esc_html_e( 'Previous Step', 'ultimate-post-kit' ); ?> |
| 95 |
</button> |
| 96 |
</div> |
| 97 |
|
| 98 |
<div class="bdt-next-steps"> |
| 99 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=ultimate_post_kit_options' ) ); ?>" class="bdt-button bdt-button-primary"> |
| 100 |
<i class="dashicons dashicons-dashboard"></i> |
| 101 |
<?php esc_html_e( 'Go to Ultimate Post Kit Dashboard', 'ultimate-post-kit' ); ?> |
| 102 |
</a> |
| 103 |
|
| 104 |
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=page' ) ); ?>" class="bdt-button bdt-button-secondary"> |
| 105 |
<i class="dashicons dashicons-edit"></i> |
| 106 |
<?php esc_html_e( 'Edit Your Pages', 'ultimate-post-kit' ); ?> |
| 107 |
</a> |
| 108 |
</div> |
| 109 |
</div> |
| 110 |
|
| 111 |
</div> |