fresh-install.php
5 years ago
migrate-data.php
5 years ago
release-highlight.php
5 years ago
review-conditions.php
5 years ago
fresh-install.php
175 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Welcome dialog for fresh installs. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.0.0 |
| 7 | */ |
| 8 | |
| 9 | $slide_one_1x = self::$plugin_url . 'assets/images/onboard-welcome.png'; |
| 10 | $slide_one_2x = self::$plugin_url . 'assets/images/onboard-welcome@2x.png'; |
| 11 | |
| 12 | $slide_two_1x = self::$plugin_url . 'assets/images/onboard-welcome.png'; |
| 13 | $slide_two_2x = self::$plugin_url . 'assets/images/onboard-welcome@2x.png'; |
| 14 | |
| 15 | $user = wp_get_current_user(); |
| 16 | $username = ! empty( $user->user_firstname ) ? $user->user_firstname : $user->user_login; |
| 17 | ?> |
| 18 | |
| 19 | <div class="sui-modal sui-modal-sm"> |
| 20 | |
| 21 | <div |
| 22 | role="dialog" |
| 23 | id="hustle-dialog--welcome" |
| 24 | class="sui-modal-content" |
| 25 | aria-modal="true" |
| 26 | aria-live="polite" |
| 27 | aria-label="<?php esc_html_e( 'Welcome to Hustle.', 'hustle' ); ?>" |
| 28 | data-nonce="<?php echo esc_attr( wp_create_nonce( 'hustle_dismiss_notification' ) ); ?>" |
| 29 | > |
| 30 | |
| 31 | <div |
| 32 | id="hustle-dialog--welcome-first" |
| 33 | class="sui-modal-slide sui-active" |
| 34 | data-modal-size="md" |
| 35 | > |
| 36 | |
| 37 | <div class="sui-box"> |
| 38 | |
| 39 | <div class="sui-box-header sui-flatten sui-content-center"> |
| 40 | |
| 41 | <figure class="sui-box-banner" role="banner" aria-hidden="true"> |
| 42 | |
| 43 | <?php |
| 44 | if ( ! $this->is_branding_hidden ) : |
| 45 | echo $this->render_image_markup( $slide_one_1x, $slide_one_2x, 'sui-image sui-image-center' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 46 | endif; |
| 47 | ?> |
| 48 | </figure> |
| 49 | |
| 50 | <button class="sui-button-icon sui-button-float--right hustle-button-dismiss-welcome" data-modal-close> |
| 51 | <span class="sui-icon-close sui-md" aria-hidden="true"></span> |
| 52 | <span class="sui-screen-reader-text"><?php esc_html_e( 'Close this dialog window', 'hustle' ); ?></span> |
| 53 | </button> |
| 54 | |
| 55 | <?php /* translators: current user's name */ ?> |
| 56 | <h3 class="sui-box-title sui-lg"><?php printf( esc_html__( 'Hey, %s', 'hustle' ), esc_html( $username ) ); ?></h3> |
| 57 | |
| 58 | <p class="sui-description"><?php esc_html_e( "Welcome to Hustle, the only plugin you'll ever need to turn your visitors into loyal subscribers, leads and customers.", 'hustle' ); ?></p> |
| 59 | |
| 60 | </div> |
| 61 | |
| 62 | <div class="sui-box-body sui-content-center sui-spacing-bottom--60"> |
| 63 | |
| 64 | <button |
| 65 | id="getStarted" |
| 66 | class="sui-button sui-button-blue sui-button-icon-right" |
| 67 | data-modal-slide="hustle-dialog--welcome-second" |
| 68 | > |
| 69 | <?php esc_html_e( 'Get Started', 'hustle' ); ?> |
| 70 | <span class="sui-icon-chevron-right" aria-hidden="true"></span> |
| 71 | </button> |
| 72 | |
| 73 | </div> |
| 74 | |
| 75 | </div> |
| 76 | |
| 77 | <button class="sui-modal-skip" data-modal-close><?php esc_html_e( 'Skip this, I know my way around', 'hustle' ); ?></button> |
| 78 | |
| 79 | </div> |
| 80 | |
| 81 | <div |
| 82 | id="hustle-dialog--welcome-second" |
| 83 | class="sui-modal-slide sui-active" |
| 84 | data-modal-size="md" |
| 85 | > |
| 86 | |
| 87 | <div class="sui-box"> |
| 88 | |
| 89 | <div class="sui-box-header sui-flatten sui-content-center"> |
| 90 | |
| 91 | <figure class="sui-box-banner" role="banner" aria-hidden="true"> |
| 92 | <?php |
| 93 | if ( ! $this->is_branding_hidden ) : |
| 94 | echo $this->render_image_markup( $slide_two_1x, $slide_two_2x, 'sui-image sui-image-center' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 95 | endif; |
| 96 | ?> |
| 97 | </figure> |
| 98 | |
| 99 | <button class="sui-button-icon sui-button-float--left" data-modal-slide="hustle-dialog--welcome-first"> |
| 100 | <span class="sui-icon-chevron-left sui-md" aria-hidden="true"></span> |
| 101 | <span class="sui-screen-reader-text"><?php esc_html_e( 'Return to previous slide', 'hustle' ); ?></span> |
| 102 | </button> |
| 103 | |
| 104 | <button class="sui-button-icon sui-button-float--right hustle-button-dismiss-welcome" data-modal-close> |
| 105 | <span class="sui-icon-close sui-md" aria-hidden="true"></span> |
| 106 | <span class="sui-screen-reader-text"><?php esc_html_e( 'Close this dialog window', 'hustle' ); ?></span> |
| 107 | </button> |
| 108 | |
| 109 | <h3 id="dialogTitle" class="sui-box-title sui-lg"><?php esc_html_e( 'Create Module', 'hustle' ); ?></h3> |
| 110 | |
| 111 | <p class="sui-description"><?php esc_html_e( 'Choose a module to get started on converting your visitors into subscribers, generate more leads and grow your social following.', 'hustle' ); ?></p> |
| 112 | |
| 113 | </div> |
| 114 | |
| 115 | <div class="sui-box-selectors sui-box-selectors-col-2"> |
| 116 | |
| 117 | <ul> |
| 118 | <?php |
| 119 | $module_types = array( |
| 120 | 'popup' => array( |
| 121 | 'name' => __( 'Pop-up', 'hustle' ), |
| 122 | 'icon' => 'popup', |
| 123 | ), |
| 124 | 'slidein' => array( |
| 125 | 'name' => __( 'Slide-in', 'hustle' ), |
| 126 | 'icon' => 'slide-in', |
| 127 | ), |
| 128 | 'embedded' => array( |
| 129 | 'name' => __( 'Embed', 'hustle' ), |
| 130 | 'icon' => 'embed', |
| 131 | ), |
| 132 | 'social_sharing' => array( |
| 133 | 'name' => __( 'Social Share', 'hustle' ), |
| 134 | 'icon' => 'share', |
| 135 | ), |
| 136 | ); |
| 137 | |
| 138 | foreach ( $module_types as $key => $attr ) { |
| 139 | ?> |
| 140 | |
| 141 | <li><label for="hustle-create-<?php echo esc_attr( $key ); ?>" class="sui-box-selector"> |
| 142 | <input type="radio" name="hustle-create-welcome" id="hustle-create-<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $key ); ?>"> |
| 143 | <span> |
| 144 | <span class="sui-icon-<?php echo esc_attr( $attr['icon'] ); ?>" aria-hidden="true"></span> |
| 145 | <?php echo esc_html( $attr['name'] ); ?> |
| 146 | </span> |
| 147 | </label></li> |
| 148 | |
| 149 | <?php |
| 150 | } |
| 151 | ?> |
| 152 | |
| 153 | </ul> |
| 154 | |
| 155 | </div> |
| 156 | |
| 157 | <div class="sui-box-body sui-content-center sui-spacing-bottom--60 sui-spacing-top--0"> |
| 158 | |
| 159 | <button id="hustle-new-create-module" class="sui-button sui-button-blue sui-button-icon-right" disabled="disabled"> |
| 160 | <span class="sui-loading-text"><?php esc_html_e( 'Create', 'hustle' ); ?></span> |
| 161 | <span class="sui-icon-loader sui-loading" aria-hidden="true"></span> |
| 162 | </button> |
| 163 | |
| 164 | </div> |
| 165 | |
| 166 | </div> |
| 167 | |
| 168 | <button class="sui-modal-skip" data-modal-close><?php esc_html_e( "Skip this, I'll create a module later", 'hustle' ); ?></button> |
| 169 | |
| 170 | </div> |
| 171 | |
| 172 | </div> |
| 173 | |
| 174 | </div> |
| 175 |