class-page-dashboard.php
2 years ago
class-page-elementor-dashboard.php
2 years ago
class-page-gutenberg-dashboard.php
2 years ago
class-page-settings.php
2 years ago
class-page-support.php
2 years ago
class-page-elementor-dashboard.php
90 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SuperbAddons\Admin\Pages; |
| 4 | |
| 5 | defined('ABSPATH') || exit(); |
| 6 | |
| 7 | use SuperbAddons\Components\Admin\ContentBoxLarge; |
| 8 | use SuperbAddons\Components\Admin\PremiumBox; |
| 9 | use SuperbAddons\Components\Admin\ReviewBox; |
| 10 | use SuperbAddons\Components\Admin\SupportLinkBoxes; |
| 11 | use SuperbAddons\Elementor\Controllers\ElementorController; |
| 12 | use SuperbAddons\Library\Controllers\LibraryController; |
| 13 | |
| 14 | class ElementorDashboardPage |
| 15 | { |
| 16 | private $IsElementorCompatible; |
| 17 | |
| 18 | public function __construct() |
| 19 | { |
| 20 | add_action('admin_footer', array($this, 'LibraryTemplate')); |
| 21 | $this->IsElementorCompatible = ElementorController::is_compatible(); |
| 22 | $this->Render(); |
| 23 | } |
| 24 | |
| 25 | public function LibraryTemplate() |
| 26 | { |
| 27 | LibraryController::InsertTemplates(); |
| 28 | } |
| 29 | |
| 30 | private function Render() |
| 31 | { |
| 32 | if (!$this->IsElementorCompatible) { |
| 33 | ?> |
| 34 | <div id="superbaddons-install-elementor-wrapper"> |
| 35 | <?php |
| 36 | new ContentBoxLarge( |
| 37 | array( |
| 38 | "title" => __("We're sorry, but it appears that Elementor is not installed or activated on your website.", "superbaddons"), |
| 39 | "description" => __("Superb Addons requires Elementor to offer all of its features. Elementor is a powerful page builder that allows you to create beautiful, responsive pages with ease. Once Elementor is installed and activated, you'll be able to take full advantage of all the features and benefits of Superb Addons for Elementor.", "superbaddons"), |
| 40 | "image" => "asset-medium-elementor.jpg", |
| 41 | "icon" => "logo-elementor.svg", |
| 42 | "cta" => __("Install Elementor", "superbaddons"), |
| 43 | "link" => "#", |
| 44 | "class" => 'superbaddons-admindashboard-elementor-box' |
| 45 | ) |
| 46 | ); |
| 47 | ?> |
| 48 | <div class="superbaddons-spinner-wrapper" style="display:none;"> |
| 49 | <img class="spbaddons-spinner" src="<?= SUPERBADDONS_ASSETS_PATH ?>/img/blocks-spinner.svg" /> |
| 50 | </div> |
| 51 | </div> |
| 52 | <?php |
| 53 | return; |
| 54 | } |
| 55 | ?> |
| 56 | <!-- Elementor Addons --> |
| 57 | <div id="superbaddons-elementor-is-active-wrapper"> |
| 58 | <?php new ContentBoxLarge( |
| 59 | array( |
| 60 | "title" => __("Elementor Addons", "superbaddons"), |
| 61 | "description" => __("Unleash the full potential of Elementor with Superb Addons. Create pixel-perfect designs and take your website-building skills to the next level with our seamless integration that gives you access to 250 Elementor sections, elements. Unlock the potential to create visually stunning, high-converting websites in record time.", "superbaddons"), |
| 62 | "image" => "asset-medium-elementor.jpg", |
| 63 | "icon" => "logo-elementor.svg", |
| 64 | "class" => 'superbaddons-admindashboard-elementor-box' |
| 65 | ) |
| 66 | ); |
| 67 | ?> |
| 68 | </div> |
| 69 | <div id="spbaddons-admindashboard-library-wrapper" class="spbaddons-admindashboard-library-wrapper"> |
| 70 | </div> |
| 71 | <div class="superbaddons-admindashboard-sidebarlayout"> |
| 72 | <div class="superbaddons-admindashboard-sidebarlayout-left"> |
| 73 | <!-- Link Boxes --> |
| 74 | <div class="superbaddons-admindashboard-linkbox-wrapper"> |
| 75 | <?php |
| 76 | new SupportLinkBoxes(); |
| 77 | ?> |
| 78 | </div> |
| 79 | </div> |
| 80 | <div class="superbaddons-admindashboard-sidebarlayout-right"> |
| 81 | <?php |
| 82 | new PremiumBox(); |
| 83 | new ReviewBox(); |
| 84 | ?> |
| 85 | </div> |
| 86 | </div> |
| 87 | <?php |
| 88 | } |
| 89 | } |
| 90 |