builder
2 years ago
plugin-updates
8 years ago
settings
2 years ago
views
2 years ago
class-evf-admin-addons.php
4 years ago
class-evf-admin-assets.php
2 years ago
class-evf-admin-builder.php
7 years ago
class-evf-admin-deactivation-feedback.php
3 years ago
class-evf-admin-editor.php
4 years ago
class-evf-admin-entries-table-list.php
3 years ago
class-evf-admin-entries.php
4 years ago
class-evf-admin-form-templates.php
3 years ago
class-evf-admin-forms-table-list.php
3 years ago
class-evf-admin-forms.php
3 years ago
class-evf-admin-import-export.php
4 years ago
class-evf-admin-menus.php
2 years ago
class-evf-admin-notices.php
3 years ago
class-evf-admin-settings.php
2 years ago
class-evf-admin-tools.php
4 years ago
class-evf-admin-welcome.php
2 years ago
class-evf-admin.php
2 years ago
evf-admin-functions.php
3 years ago
class-evf-admin-welcome.php
117 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Welcome Class |
| 4 | * |
| 5 | * Takes new users to Welcome Page. |
| 6 | * |
| 7 | * @package EverestForms/Admin |
| 8 | * @version 1.5.5 |
| 9 | */ |
| 10 | |
| 11 | defined( 'ABSPATH' ) || exit; |
| 12 | |
| 13 | /** |
| 14 | * Welcome class. |
| 15 | */ |
| 16 | class EVF_Admin_Welcome { |
| 17 | |
| 18 | /** |
| 19 | * Hook in methods. |
| 20 | */ |
| 21 | public static function init() { |
| 22 | if ( |
| 23 | apply_filters( 'everest_forms_show_welcome_page', true ) |
| 24 | && current_user_can( 'manage_everest_forms' ) |
| 25 | ) { |
| 26 | add_action( 'admin_menu', array( __CLASS__, 'add_menu' ) ); |
| 27 | add_action( 'admin_head', array( __CLASS__, 'hide_menu' ) ); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Add admin menus/screens. |
| 33 | */ |
| 34 | public static function add_menu() { |
| 35 | $welcome_page = add_dashboard_page( |
| 36 | esc_html__( 'Welcome to Everest Forms', 'everest-forms' ), |
| 37 | esc_html__( 'Welcome to Everest Forms', 'everest-forms' ), |
| 38 | 'manage_everest_forms', |
| 39 | 'evf-welcome', |
| 40 | array( __CLASS__, 'welcome_page' ) |
| 41 | ); |
| 42 | |
| 43 | add_action( 'load-' . $welcome_page, array( __CLASS__, 'welcome_page_init' ) ); |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Removed the dashboard pages from the admin menu. |
| 48 | * |
| 49 | * This means the pages are still available to us, but hidden. |
| 50 | * |
| 51 | * @since 1.0.0 |
| 52 | */ |
| 53 | public static function hide_menu() { |
| 54 | remove_submenu_page( 'index.php', 'evf-welcome' ); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Welcome page init. |
| 59 | */ |
| 60 | public static function welcome_page_init() { |
| 61 | delete_transient( '_evf_activation_redirect' ); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Show the welcome page. |
| 66 | */ |
| 67 | public static function welcome_page() { |
| 68 | ?> |
| 69 | <div id="everest-forms-welcome" > |
| 70 | <div class="eveverest-forms-welcome-header"> |
| 71 | <div class="eveverest-forms-welcome-header__logo-wrap"> |
| 72 | <div class="eveverest-forms-welcome-header__logo-icon"> |
| 73 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.88,3l1.37,2.25H15.89L14.52,3ZM21,21H1L12,3.15l6.84,11.11H10.6L12,12H14.8L12,7.43,5,18.74H21.58L23,21ZM18.64,9.77,17.27,7.53h4.36L23,9.77Z"/></svg> |
| 74 | </div> |
| 75 | <span><?php esc_html_e( 'Getting Started', 'everest-forms' ); ?></span> |
| 76 | </div> |
| 77 | <a class="everest-forms-welcome__skip" href="<?php echo esc_url( admin_url() ); ?>"> |
| 78 | <span class="dashicons dashicons-no-alt"></span> |
| 79 | </a> |
| 80 | </div> |
| 81 | <div class="everest-forms-welcome-container"> |
| 82 | <div class="everest-forms-welcome-container__header"> |
| 83 | <h2><?php esc_html_e( 'Welcome to Everest Forms', 'everest-forms' ); ?></h2> |
| 84 | <p><?php esc_html_e( 'Thank you for choosing Everest Forms, the most powerful and easy drag & drop WordPress form builder in the market.', 'everest-forms' ); ?></p> |
| 85 | </div> |
| 86 | <a class="everest-forms-welcome-video welcome-video-play"> |
| 87 | <img src="<?php echo esc_url( evf()->plugin_url() . '/assets/images/welcome-video-thumb.png' ); ?>" alt="<?php esc_attr_e( 'Watch how to create your first form with Everest Forms', 'everest-forms' ); ?>" class="everest-froms-welcome-thumb"> |
| 88 | <button class="everest-forms-welcome-video__button dashicons dashicons-controls-play"></button> |
| 89 | </a> |
| 90 | <div class="everest-forms-welcome-container__action"> |
| 91 | <a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-builder&create-form=1' ) ); ?>" class="everest-forms-welcome-container__action-card"> |
| 92 | <figure class="everest-forms-welcome-container__action-card-img"> |
| 93 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><style>.cls-1{fill:none;}.cls-1,.cls-2{stroke:#3D8FC9;stroke-linecap:round;stroke-linejoin:round;stroke-width:2px;}.cls-2{fill:#E1F0FA;}</style></defs><rect class="cls-1" x="12" y="11" width="40" height="48" rx="2" ry="2"/><rect class="cls-2" x="18" y="46" width="6" height="6"/><circle class="cls-2" cx="12" cy="52" r="7"/><line class="cls-1" x1="12" y1="49" x2="12" y2="55"/><line class="cls-1" x1="9" y1="52" x2="15" y2="52"/><path class="cls-2" d="M35,8a3,3,0,0,0-6,0H25a2,2,0,0,0-2,2v2a2,2,0,0,0,2,2H39a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"/><rect class="cls-2" x="49" y="29" width="6" height="18"/><polygon class="cls-2" points="52 57 49 51 49 47 55 47 55 51 52 57"/><path class="cls-2" d="M52,23h0a3,3,0,0,1,3,3v3a0,0,0,0,1,0,0H49a0,0,0,0,1,0,0V26A3,3,0,0,1,52,23Z"/><line class="cls-1" x1="59" y1="25" x2="59" y2="39"/><line class="cls-1" x1="49.5" y1="29" x2="58.5" y2="29"/><rect class="cls-2" x="18" y="22" width="28" height="6"/><rect class="cls-2" x="18" y="34" width="6" height="6"/><line class="cls-1" x1="28" y1="37" x2="42" y2="37"/><line class="cls-1" x1="28" y1="49" x2="42" y2="49"/></svg> |
| 94 | </figure> |
| 95 | <div class="everest-forms-welcome-container__action-card-content"> |
| 96 | <h3><?php esc_html_e( 'Create Your First Form', 'everest-forms' ); ?></h3> |
| 97 | <p><?php esc_html_e( 'Let\'s get started with the first contact forms for your site.', 'everest-forms' ); ?></p> |
| 98 | </div> |
| 99 | </a> |
| 100 | <a href="https://docs.everestforms.net/" class="everest-forms-welcome-container__action-card" target="blank"> |
| 101 | <figure class="everest-forms-welcome-container__action-card-img"> |
| 102 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><style>.cls-1{fill:none;}.cls-1,.cls-2{stroke:#3D8FC9;stroke-linecap:round;stroke-miterlimit:10;stroke-width:2px;}.cls-2{fill:#E1F0FA;}</style></defs><rect x="13" y="5" width="26" height="38" rx="2" ry="2" class="cls-1"/><path class="cls-1" d="M22,19a3,3,0,0,0-3,3V40a3,3,0,0,1-3,3h9V22A3,3,0,0,0,22,19Z"/><path class="cls-2" d="M49,19H22a3,3,0,0,1,3,3V57a2,2,0,0,0,2,2H49a2,2,0,0,0,2-2V21A2,2,0,0,0,49,19Z"/><line class="cls-1" x1="30" y1="27" x2="46" y2="27"/><line class="cls-1" x1="18" y1="13" x2="34" y2="13"/><line class="cls-1" x1="30" y1="33" x2="46" y2="33"/><line class="cls-1" x1="30" y1="39" x2="46" y2="39"/><line class="cls-1" x1="30" y1="45" x2="40" y2="45"/><line class="cls-1" x1="44" y1="45" x2="46" y2="45"/><line class="cls-1" x1="30" y1="51" x2="40" y2="51"/><line class="cls-1" x1="44" y1="51" x2="46" y2="51"/></svg> |
| 103 | </figure> |
| 104 | <div class="everest-forms-welcome-container__action-card-content"> |
| 105 | <h3><?php esc_html_e( 'Read The Full Guide', 'everest-forms' ); ?></h3> |
| 106 | <p><?php esc_html_e( 'Read our step by step guide on how to create your first form.', 'everest-forms' ); ?></p> |
| 107 | </div> |
| 108 | </a> |
| 109 | </div> |
| 110 | </div> |
| 111 | </div> |
| 112 | <?php |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | EVF_Admin_Welcome::init(); |
| 117 |