html-admin-page-addons.php
7 years ago
html-admin-page-builder-setup.php
8 years ago
html-admin-page-builder.php
7 years ago
html-admin-page-entries-view.php
8 years ago
html-admin-page-status-logs.php
8 years ago
html-admin-page-status.php
8 years ago
html-admin-settings.php
7 years ago
html-notice-custom.php
8 years ago
html-notice-update.php
8 years ago
html-notice-updated.php
8 years ago
html-notice-updating.php
8 years ago
html-admin-page-addons.php
125 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Page - Addons |
| 4 | * |
| 5 | * @var string $view |
| 6 | * @var object $addons |
| 7 | * |
| 8 | * @package EverestForms |
| 9 | */ |
| 10 | |
| 11 | defined( 'ABSPATH' ) || exit; |
| 12 | |
| 13 | ?> |
| 14 | <div class="wrap everest-forms evf_addons_wrap"> |
| 15 | <h1 class="wp-heading-inline"><?php esc_html_e( 'Everest Forms Add-ons', 'everest-forms' ); ?></h1> |
| 16 | |
| 17 | <?php if ( apply_filters( 'everest_forms_refresh_addons', true ) ) : ?> |
| 18 | <a href="<?php echo esc_url( $refresh_url ); ?>" class="page-title-action"><?php esc_html_e( 'Refresh Add-ons', 'everest-forms' ); ?></a> |
| 19 | <?php endif; ?> |
| 20 | |
| 21 | <hr class="wp-header-end"> |
| 22 | <h2 class="screen-reader-text"><?php esc_html_e( 'Filter add-ons list', 'everest-forms' ); ?></h2> |
| 23 | |
| 24 | <?php if ( $sections ) : ?> |
| 25 | <div class="wp-filter"> |
| 26 | <ul class="filter-links"> |
| 27 | <?php foreach ( $sections as $section ) : ?> |
| 28 | <li class="<?php echo esc_attr( $section->slug ); ?>"> |
| 29 | <a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-addons§ion=' . esc_attr( $section->slug ) ) ); ?>"<?php echo $current_section === $section->slug ? ' class="current" aria-current="page"' : ''; ?>><?php echo esc_html( $section->label ); ?></a> |
| 30 | </li> |
| 31 | <?php endforeach; ?> |
| 32 | </ul> |
| 33 | <form class="search-form search-plugins hidden" method="get"> |
| 34 | <input type="hidden" name="page" value="evf-addons"> |
| 35 | <?php $page_section = ( isset( $_GET['section'] ) && '_featured' !== $_GET['section'] ) ? $_GET['section'] : '_all'; ?> |
| 36 | <input type="hidden" name="section" value="<?php echo esc_attr( $page_section ); ?>"> |
| 37 | <label> |
| 38 | <span class="screen-reader-text"><?php esc_html_e( 'Search Add-ons', 'everest-forms' ); ?></span> |
| 39 | <input type="search" name="s" value="" class="wp-filter-search hidden" placeholder="<?php esc_attr_e( 'Search Add-ons...', 'everest-forms' ); ?>" aria-describedby="live-search-desc" /> |
| 40 | </label> |
| 41 | <input type="submit" id="search-submit" class="button hide-if-js" value="<?php esc_attr_e( 'Search Add-ons', 'everest-forms' ); ?>"> |
| 42 | </form> |
| 43 | </div> |
| 44 | |
| 45 | <br class="clear"> |
| 46 | <p class="refresh"> |
| 47 | <?php printf( esc_html__( 'Make your forms even more robust with our premium addons. Missing any addons? Click the %1$sRefresh Add-ons%2$s button above.', 'everest-forms' ), '<a href="' . esc_url( $refresh_url ) . '">', '</a>' ); ?> |
| 48 | </p> |
| 49 | |
| 50 | <?php if ( '_featured' !== $current_section && $addons ) : ?> |
| 51 | <form id="extension-filter" method="post"> |
| 52 | <div class="wp-list-table widefat extension-install"> |
| 53 | <h2 class="screen-reader-text"><?php esc_html_e( 'Add-ons list', 'everest-forms' ); ?></h2> |
| 54 | |
| 55 | <div class="the-list"> |
| 56 | <?php foreach ( $addons as $addon ) : ?> |
| 57 | <div class="plugin-card plugin-card-<?php echo esc_attr( $addon->slug ); ?>"> |
| 58 | <div class="plugin-card-top"> |
| 59 | <div class="name column-name"> |
| 60 | <h3 class="plugin-name"> |
| 61 | <?php echo esc_html( $addon->title ); ?> |
| 62 | <img src="<?php echo esc_url( $addon->image ); ?>" class="plugin-icon" alt="" /> |
| 63 | </h3> |
| 64 | </div> |
| 65 | <div class="desc column-description"> |
| 66 | <p class="plugin-desc"><?php echo esc_html( $addon->excerpt ); ?></p> |
| 67 | </div> |
| 68 | </div> |
| 69 | <div class="plugin-card-bottom"> |
| 70 | <?php if ( in_array( $license_plan, $addon->plan, true ) ) : ?> |
| 71 | <div class="status column-status"> |
| 72 | <strong><?php esc_html_e( 'Status:', 'everest-forms' ); ?></strong> |
| 73 | <?php if ( is_plugin_active( $addon->slug . '/' . $addon->slug . '.php' ) ) : ?> |
| 74 | <span class="status-label status-active"><?php esc_html_e( 'Activated', 'everest-forms' ); ?></span> |
| 75 | <?php elseif ( file_exists( WP_PLUGIN_DIR . '/' . $addon->slug . '/' . $addon->slug . '.php' ) ): ?> |
| 76 | <span class="status-label status-inactive"><?php esc_html_e( 'Inactive', 'everest-forms' ); ?></span> |
| 77 | <?php else: ?> |
| 78 | <span class="status-label status-install-now"><?php esc_html_e( 'Not Installed', 'everest-forms' ); ?></span> |
| 79 | <?php endif; ?> |
| 80 | </div> |
| 81 | <div class="action-buttons"> |
| 82 | <?php if ( is_plugin_active( $addon->slug . '/' . $addon->slug . '.php' ) ) : ?> |
| 83 | <?php |
| 84 | $plugin_file = plugin_basename( $addon->slug . '/' . $addon->slug . '.php' ); |
| 85 | $url = wp_nonce_url( add_query_arg( array( |
| 86 | 'page' => 'evf-addons', |
| 87 | 'action' => 'deactivate', |
| 88 | 'plugin' => $plugin_file, |
| 89 | ), admin_url( 'admin.php' ) ), 'deactivate-plugin_' . $plugin_file ); |
| 90 | ?> |
| 91 | <a class="button button-secondary deactivate-now" href="<?php echo esc_url( $url ); ?>" aria-label="<?php esc_attr_e( sprintf( __( 'Deactivate %s now', 'everest-forms' ), $addon->title ) ); ?>"><?php esc_html_e( 'Deactivate', 'everest-forms' ); ?></a> |
| 92 | <?php elseif ( file_exists( WP_PLUGIN_DIR . '/' . $addon->slug . '/' . $addon->slug . '.php' ) ): ?> |
| 93 | <?php |
| 94 | $plugin_file = plugin_basename( $addon->slug . '/' . $addon->slug . '.php' ); |
| 95 | $url = wp_nonce_url( add_query_arg( array( |
| 96 | 'page' => 'evf-addons', |
| 97 | 'action' => 'activate', |
| 98 | 'plugin' => $plugin_file, |
| 99 | ), admin_url( 'admin.php' ) ), 'activate-plugin_' . $plugin_file ); |
| 100 | ?> |
| 101 | <a class="button button-primary activate-now" href="<?php echo esc_url( $url ); ?>" aria-label="<?php esc_attr_e( sprintf( __( 'Activate %s now', 'everest-forms' ), $addon->title ) ); ?>"><?php esc_html_e( 'Activate', 'everest-forms' ); ?></a> |
| 102 | <?php else: ?> |
| 103 | <a href="#" class="button install-now" data-slug="<?php echo esc_attr( $addon->slug ); ?>" data-name="<?php echo esc_attr( $addon->name ); ?>" aria-label="<?php esc_attr_e( sprintf( __( 'Install %s now', 'everest-forms' ), $addon->title ) ); ?>"><?php esc_html_e( 'Install Addon', 'everest-forms'); ?></a> |
| 104 | <?php endif; ?> |
| 105 | </div> |
| 106 | <?php else: ?> |
| 107 | <div class="action-buttons upgrade-plan"> |
| 108 | <a class="button upgrade-now" href="https://wpeverest.com/wordpress-plugins/everest-forms/pricing/" target="_blank"><?php esc_html_e( 'Upgrade Plan', 'everest-forms' ); ?></a> |
| 109 | </div> |
| 110 | <?php endif; ?> |
| 111 | </div> |
| 112 | </div> |
| 113 | <?php endforeach; ?> |
| 114 | </div> |
| 115 | </div> |
| 116 | </form> |
| 117 | <?php endif; ?> |
| 118 | <?php else : ?> |
| 119 | <p><?php printf( __( 'Our catalog of Everest Forms Add-ons/Extensions can be found on WPEverest.com here: <a href="%s">Everest Forms Extensions Catalog</a>', 'everest-forms' ), 'https://wpeverest.com/wordpress-plugins/everest-forms/' ); ?></p> |
| 120 | <?php endif; ?> |
| 121 | </div> |
| 122 | <?php |
| 123 | wp_print_request_filesystem_credentials_modal(); |
| 124 | wp_print_admin_notice_templates(); |
| 125 |