elements.php
1 year ago
features.php
1 year ago
integration.php
1 year ago
popup-pro.php
1 year ago
sidebar.php
1 year ago
welcome.php
1 year ago
integration.php
80 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; // Exit if accessed directly |
| 4 | } |
| 5 | |
| 6 | $integrations = [ |
| 7 | [ |
| 8 | 'slug' => 'bbp-core', |
| 9 | 'basename' => 'bbp-core/bbp-core.php', |
| 10 | 'logo' => SPEL_IMG . '/dashboard/bbp-core-logo.svg', |
| 11 | 'title' => esc_html__( 'BBP Core', 'spider-elements' ), |
| 12 | 'desc' => esc_html__( 'Expand bbPress powered forums with useful features like - private reply, solved topics ...', 'spider-elements' ), |
| 13 | ], |
| 14 | [ |
| 15 | 'slug' => 'eazydocs', |
| 16 | 'basename' => 'eazydocs/eazydocs.php', |
| 17 | 'logo' => SPEL_IMG . '/dashboard/eazydocs-logo.png', |
| 18 | 'title' => esc_html__( 'EazyDocs', 'spider-elements' ), |
| 19 | 'desc' => esc_html__( 'A powerful & beautiful documentation, knowledge base builder plugin.', 'spider-elements' ), |
| 20 | ], |
| 21 | [ |
| 22 | 'slug' => 'changeloger', |
| 23 | 'basename' => 'changeloger/changeloger.php', |
| 24 | 'logo' => SPEL_IMG . '/dashboard/changeloger-logo-black.svg', |
| 25 | 'title' => esc_html__( 'Changeloger', 'spider-elements' ), |
| 26 | 'desc' => esc_html__( 'Auto-convert plain text changelogs into engaging visuals for WordPress.', 'spider-elements' ), |
| 27 | ], |
| 28 | [ |
| 29 | 'slug' => 'advanced-accordion-block', |
| 30 | 'basename' => 'advanced-accordion-block/advanced-accordion-block.php', |
| 31 | 'logo' => SPEL_IMG . '/dashboard/AAGB-logo.svg', |
| 32 | 'title' => esc_html__( 'Advanced Accordion Block', 'spider-elements' ), |
| 33 | 'desc' => esc_html__( 'A custom Gutenberg Block that allows to showcase the content in accordion mode. It also helps to build FAQ sections easily.', |
| 34 | 'spider-elements' ), |
| 35 | ], |
| 36 | ]; |
| 37 | ?> |
| 38 | |
| 39 | <div id="integration" class="tab-box"> |
| 40 | <div class="dashboard_banner integration_banner"> |
| 41 | <h2><?php esc_html_e( 'Elevate Your WordPress Website to the Next Level!', 'spider-elements' ); ?></h2> |
| 42 | <p><?php esc_html_e( 'Explore our versatile range of plugins tailored to meet every need for WordPress, Gutenberg, Elementor, and WooCommerce. Discover solutions that empower your site with enhanced functionality and seamless performance.', 'spider-elements' ); ?></p> |
| 43 | </div> |
| 44 | <div class="ezd-grid ezd-grid-cols-12"> |
| 45 | <?php |
| 46 | if ( isset( $integrations ) && is_array( $integrations ) ) { |
| 47 | foreach ( $integrations as $plugin ) { |
| 48 | $plugin_status = SPEL\includes\Admin\Plugin_Installer::instance(); |
| 49 | $plugin_data = $plugin_status->get_status( $plugin['basename'] ); |
| 50 | |
| 51 | $plugin_status = $plugin_data['status'] ?? ''; |
| 52 | $plugin_activation_url = $plugin_data['activation_url'] ?? ''; |
| 53 | $plugin_installation_url = $plugin_data['installation_url'] ?? ''; |
| 54 | $plugin_status_label = isset( $plugin_data['status'] ) ? ( $plugin_data['status'] == 'activated' ? 'activated' : '' ) : ''; |
| 55 | $plugin_status_title = $plugin_data['title'] ?? esc_html__( 'Activate', 'spider-elements' ); |
| 56 | ?> |
| 57 | <div class="ezd-lg-col-4"> |
| 58 | <div class="element_box integration_item ezd-text-center"> |
| 59 | <img src="<?php echo esc_url( $plugin['logo'] ); ?>" alt="<?php echo esc_attr( $plugin['title'] ); ?>"> |
| 60 | <h3><?php echo esc_html( $plugin['title'] ); ?></h3> |
| 61 | <p><?php echo esc_html( $plugin['desc'] ); ?></p> |
| 62 | |
| 63 | <?php |
| 64 | echo sprintf( |
| 65 | '<a data-plugin_status="%1$s" data-activation_url="%2$s" href="%3$s" class="dashboard_btn %4$s">%5$s</a>', |
| 66 | esc_attr( $plugin_status ), |
| 67 | esc_url( $plugin_activation_url ), |
| 68 | esc_url( $plugin_status === 'not_installed' ? $plugin_installation_url : $plugin_activation_url ), |
| 69 | esc_attr( $plugin_status_label ), |
| 70 | esc_html( $plugin_status_title ) |
| 71 | ); |
| 72 | ?> |
| 73 | </div> |
| 74 | </div> |
| 75 | <?php |
| 76 | } |
| 77 | } |
| 78 | ?> |
| 79 | </div> |
| 80 | </div> |