class-page-wizard-complete.php
1 week ago
class-page-wizard-incompatible.php
1 week ago
class-page-wizard-intro.php
1 week ago
class-page-wizard-main.php
1 week ago
class-page-wizard-stages.php
1 week ago
class-page-wizard-incompatible.php
69 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SuperbAddons\Admin\Pages\Wizard; |
| 4 | |
| 5 | use SuperbAddons\Admin\Controllers\Wizard\WizardController; |
| 6 | use SuperbAddons\Components\Admin\Modal; |
| 7 | |
| 8 | defined('ABSPATH') || exit(); |
| 9 | |
| 10 | class PageWizardIncompatiblePage |
| 11 | { |
| 12 | private $themes; |
| 13 | private $current_theme; |
| 14 | private $theme_name; |
| 15 | |
| 16 | public function __construct() |
| 17 | { |
| 18 | $this->current_theme = wp_get_theme(); |
| 19 | $this->theme_name = $this->current_theme->get('Name'); |
| 20 | $this->themes = WizardController::GetRecommendedBlockThemes(); |
| 21 | $this->Render(); |
| 22 | } |
| 23 | |
| 24 | private function Render() |
| 25 | { |
| 26 | ?> |
| 27 | <div class="superbaddons-template-stage" data-stageid="theme-stage" data-type="single-selection"> |
| 28 | <div class="superbaddons-wizard-wrapper-small"> |
| 29 | <div class="superbaddons-admindashboard-content-box-large"> |
| 30 | <p class="superbaddons-element-text-sm superbaddons-wizard-tagline"><?php echo esc_html(sprintf(/* translators: %s: a theme name */__("Unfortunately, this feature is currently exclusive to block themes. The theme you're using, \"%s\", is not a block theme or does not support block theme templates.", "superb-blocks"), $this->theme_name)); ?> |
| 31 | <button type="button" class="superbaddons-element-colorlink superbaddons-element-text-xs superbaddons-element-ml1" id="superbaddons-restart-block-theme-tour" style="background:none;border:none;cursor:pointer;padding:0;"> |
| 32 | <?php esc_html_e("What is a block theme?", "superb-blocks"); ?> |
| 33 | </button> |
| 34 | </p> |
| 35 | <br> |
| 36 | <p class="superbaddons-element-text-sm superbaddons-wizard-tagline"><strong><?php echo esc_html__("Choose a Block theme to use the theme designer:", "superb-blocks"); ?> </strong></p> |
| 37 | </div> |
| 38 | </div> |
| 39 | <div class="superbaddons-theme-template-container superbaddons-element-mt1"> |
| 40 | <?php foreach ($this->themes->themes as $theme) : |
| 41 | if ($theme->slug == $this->current_theme->stylesheet) continue; // skip current theme |
| 42 | ?> |
| 43 | <div class="superbaddons-theme-page-template superbaddons-element-text-dark" style="height:auto !important;" data-title="<?php echo esc_attr($theme->name); ?>" data-slug="<?php echo esc_attr($theme->slug); ?>" data-package="free"> |
| 44 | <div class="superbaddons-template-content-wrapper"> |
| 45 | <img class="superbaddons-preview-image" src="<?php echo esc_url($theme->screenshot_url); ?>" width="100%" height="auto" style="user-select:none;" /> |
| 46 | </div> |
| 47 | <div class="superbaddons-template-information"> |
| 48 | <div class="superbaddons-template-information-inner superbaddons-element-flex-center"> |
| 49 | <div class="superbaddons-template-information-title superbaddons-element-text-sm"> |
| 50 | <?php echo esc_html($theme->name); ?> |
| 51 | </div> |
| 52 | <div class="superbaddons-template-information-package superbaddons-element-text-xs superbaddons-element-text-gray"> |
| 53 | <?php echo esc_html__("Free", "superb-blocks"); ?> |
| 54 | </div> |
| 55 | </div> |
| 56 | </div> |
| 57 | </div> |
| 58 | <?php endforeach; ?> |
| 59 | </div> |
| 60 | </div> |
| 61 | <div class="superbaddons-theme-template-menu superbadd superbaddons-element-flex-center superbaddons-element-flex-gap1" style="display:none;"> |
| 62 | <p class="superbaddons-element-text-sm superbaddons-element-m0 superbaddons-wizard-tagline"><?php echo esc_html__("Install", "superb-blocks"); ?> <strong id="superbaddons-selected-theme-name"></strong> <?php echo esc_html__("and get started?", "superb-blocks"); ?></p> |
| 63 | <button id="superbaddons-theme-install-button" class="superbthemes-module-cta superbthemes-module-cta-green" style="display:block;"><?php echo esc_html__("Install", "superb-blocks"); ?></button> |
| 64 | </div> |
| 65 | <?php |
| 66 | new Modal(); |
| 67 | } |
| 68 | } |
| 69 |