Make WordPress Themes

Changeset 356311


Ignore:
Timestamp:
10/30/2026 01:24:29 PM (12 hours ago)
Author:
themedropbox
Message:

New version of Training Institute Academy - 1.3.7

Location:
training-institute-academy/1.3.7
Files:
3 added
11 edited
1 copied

Legend:

Unmodified
Added
Removed
  • training-institute-academy/1.3.7/classes/class-svg-icons.php

    r354502 r356311  
    9999            ),
    100100            'wp' => array(
    101                 'wordpress.com',
    102                 'wordpress.org',
     101                'WordPress.com',
     102                'WordPress.org',
    103103            ),
    104104        );
  • training-institute-academy/1.3.7/functions.php

    r354502 r356311  
    8181                }
    8282                if (! defined( 'TRAINING_INSTITUTE_ACADEMY_SUPPORT_FREE' ) ){
    83                 define('TRAINING_INSTITUTE_ACADEMY_SUPPORT_FREE',__('https://wordpress.org/support/theme/training-institute-academy/','training-institute-academy'));
     83                define('TRAINING_INSTITUTE_ACADEMY_SUPPORT_FREE',__('https://WordPress.org/support/theme/training-institute-academy/','training-institute-academy'));
    8484                }
    8585                if (! defined( 'TRAINING_INSTITUTE_ACADEMY_REVIEW_FREE' ) ){
    86                 define('TRAINING_INSTITUTE_ACADEMY_REVIEW_FREE',__('https://wordpress.org/support/theme/training-institute-academy/reviews/#new-post','training-institute-academy'));
     86                define('TRAINING_INSTITUTE_ACADEMY_REVIEW_FREE',__('https://WordPress.org/support/theme/training-institute-academy/reviews/#new-post','training-institute-academy'));
    8787                }
    8888                if (! defined( 'TRAINING_INSTITUTE_ACADEMY_DEMO_PRO' ) ){
    … …  
    9494                if (! defined( 'TRAINING_INSTITUTE_ACADEMY_BUNDLE_BUTTON' ) ){
    9595                        define('TRAINING_INSTITUTE_ACADEMY_BUNDLE_BUTTON',__('https://www.omegathemes.com/products/wp-theme-bundle','training-institute-academy'));
     96                }
     97                if (! defined( 'TRAINING_INSTITUTE_ACADEMY_HIRE_EXPERT' ) ){
     98                        define('TRAINING_INSTITUTE_ACADEMY_HIRE_EXPERT',__('https://www.omegathemes.com/pages/contact','training-institute-academy'));
    9699                }
    97100
    … …  
    259262// NOTICE FUNCTION
    260263
    261 function training_institute_academy_admin_notice() {
    262     global $pagenow;
    263     $theme_args = wp_get_theme();
    264     $meta = get_option( 'training_institute_academy_admin_notice' );
    265     $name = $theme_args->get( 'Name' );
    266     $current_screen = get_current_screen();
    267 
    268     if ( ! $meta ) {
    269         if ( is_network_admin() ) {
    270             return;
    271         }
    272 
    273         if ( ! current_user_can( 'manage_options' ) ) {
    274             return;
    275         }
    276 
    277         if ( $current_screen->base != 'appearance_page_traininginstituteacademy-wizard' ) {
    278             ?>
    279             <div class="notice notice-success notice-content">
    280                 <h2><?php esc_html_e('Welcome! Thank you for choosing Training Institute Academy. Let’s Set Up Your Website!', 'training-institute-academy') ?> </h2>
    281                 <p><?php esc_html_e('Before you dive into customization, let’s go through a quick setup process to ensure everything runs smoothly. Click below to start setting up your website in minutes!', 'training-institute-academy') ?> </p>
    282                 <div class="info-link">
    283                     <a href="<?php echo esc_url( admin_url( 'themes.php?page=traininginstituteacademy-wizard' ) ); ?>"><?php esc_html_e('Get Started with Training Institute Academy', 'training-institute-academy'); ?></a>
    284                 </div>
    285                 <p class="dismiss-link"><strong><a href="?training_institute_academy_admin_notice=1"><?php esc_html_e( 'Dismiss', 'training-institute-academy' ); ?></a></strong></p>
     264/**
     265 * Whether the welcome notice should be shown on the current admin screen.
     266 */
     267function training_institute_academy_show_admin_notice() {
     268    if ( get_option( 'training_institute_academy_admin_notice' ) || is_network_admin() || ! current_user_can( 'manage_options' ) ) {
     269        return false;
     270    }
     271
     272    $training_institute_academy_current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;
     273    if ( $training_institute_academy_current_screen && 'appearance_page_traininginstituteacademy-wizard' === $training_institute_academy_current_screen->base ) {
     274        return false;
     275    }
     276
     277    // Once every setup step is done the notice only stays on the Dashboard.
     278    if ( training_institute_academy_setup_is_complete() ) {
     279        return $training_institute_academy_current_screen && 'dashboard' === $training_institute_academy_current_screen->base;
     280    }
     281
     282    return true;
     283}
     284
     285/**
     286 * Whether every Getting Started step is done.
     287 */
     288function training_institute_academy_setup_is_complete() {
     289    return function_exists( 'training_institute_academy_get_setup_progress' ) && ! in_array( false, training_institute_academy_get_setup_progress(), true );
     290}
     291
     292function training_institute_academy_admin_notice() {
     293    if ( ! training_institute_academy_show_admin_notice() ) {
     294        return;
     295    }
     296
     297    $training_institute_academy_theme_args = wp_get_theme();
     298    $training_institute_academy_name = $training_institute_academy_theme_args->get( 'Name' );
     299    $training_institute_academy_progress = function_exists( 'training_institute_academy_get_setup_progress' ) ? training_institute_academy_get_setup_progress() : array();
     300    $training_institute_academy_done = count( array_filter( $training_institute_academy_progress ) );
     301    $training_institute_academy_total = max( 1, count( $training_institute_academy_progress ) );
     302    $training_institute_academy_complete = training_institute_academy_setup_is_complete();
     303    $training_institute_academy_dismiss_url = wp_nonce_url( add_query_arg( 'training_institute_academy_admin_notice', '1' ), 'training_institute_academy_dismiss_notice' );
     304    ?>
     305    <div class="notice omg-notice<?php echo $training_institute_academy_complete ? ' omg-notice--complete' : ''; ?>" data-nonce="<?php echo esc_attr( wp_create_nonce( 'training_institute_academy_dismiss_notice' ) ); ?>">
     306        <div class="omg-notice__media">
     307            <img src="<?php echo esc_url( get_template_directory_uri() . '/screenshot.png' ); ?>" alt="<?php echo esc_attr( $training_institute_academy_name ); ?>">
     308        </div>
     309        <div class="omg-notice__body">
     310            <p class="omg-notice__eyebrow">
     311                <?php
     312                if ( $training_institute_academy_complete ) {
     313                    /* translators: %s: theme name */
     314                    printf( esc_html__( '%s setup complete', 'training-institute-academy' ), esc_html( $training_institute_academy_name ) );
     315                } else {
     316                    /* translators: %s: theme name */
     317                    printf( esc_html__( 'Thanks for choosing %s', 'training-institute-academy' ), esc_html( $training_institute_academy_name ) );
     318                }
     319                ?>
     320            </p>
     321            <?php if ( $training_institute_academy_complete ) : ?>
     322                <h2 class="omg-notice__title"><?php esc_html_e( 'Your website is ready', 'training-institute-academy' ); ?></h2>
     323                <p class="omg-notice__text"><?php esc_html_e( 'Every setup step is done. Add your content, fine-tune the design in the Customizer, or unlock more layouts with Pro.', 'training-institute-academy' ); ?></p>
     324            <?php else : ?>
     325                <h2 class="omg-notice__title"><?php esc_html_e( 'Let’s set up your website in a few minutes', 'training-institute-academy' ); ?></h2>
     326                <p class="omg-notice__text"><?php esc_html_e( 'Install the recommended plugins, import the demo and make it yours, all from one Getting Started page.', 'training-institute-academy' ); ?></p>
     327            <?php endif; ?>
     328            <div class="omg-notice__progress">
     329                <span class="omg-progress"><span class="omg-progress__bar" style="width: <?php echo esc_attr( max( 3, round( $training_institute_academy_done / $training_institute_academy_total * 100 ) ) ); ?>%"></span></span>
     330                <span class="omg-notice__count">
     331                    <?php
     332                    /* translators: 1: steps done, 2: total steps */
     333                    printf( esc_html__( '%1$s of %2$s steps done', 'training-institute-academy' ), esc_html( $training_institute_academy_done ), esc_html( $training_institute_academy_total ) );
     334                    ?>
     335                </span>
    286336            </div>
    287             <?php
    288         }
    289     }
     337            <div class="omg-notice__actions">
     338                <?php if ( $training_institute_academy_complete ) : ?>
     339                    <a class="omg-btn omg-btn--primary" href="<?php echo esc_url( admin_url( 'themes.php?page=traininginstituteacademy-wizard' ) ); ?>"><?php esc_html_e( 'Getting Started', 'training-institute-academy' ); ?></a>
     340                    <a class="omg-btn omg-btn--outline" href="<?php echo esc_url( home_url( '/' ) ); ?>" target="_blank"><?php esc_html_e( 'View your site', 'training-institute-academy' ); ?></a>
     341                    <a class="omg-btn omg-btn--outline" href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>"><?php esc_html_e( 'Customize', 'training-institute-academy' ); ?></a>
     342                <?php else : ?>
     343                    <a class="omg-btn omg-btn--primary" href="<?php echo esc_url( admin_url( 'themes.php?page=traininginstituteacademy-wizard&omg-focus=1' ) ); ?>"><?php echo $training_institute_academy_done ? esc_html__( 'Continue setup', 'training-institute-academy' ) : esc_html__( 'Get started', 'training-institute-academy' ); ?></a>
     344                <?php endif; ?>
     345                <a class="omg-btn omg-btn--premium" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUY_NOW ); ?>" target="_blank"><?php esc_html_e( 'Go To Premium', 'training-institute-academy' ); ?></a>
     346                <a class="omg-btn omg-btn--outline-pink" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUNDLE_BUTTON ); ?>" target="_blank"><?php esc_html_e( 'Get all WP themes for $69', 'training-institute-academy' ); ?></a>
     347            </div>
     348        </div>
     349        <a class="omg-notice__close" href="<?php echo esc_url( $training_institute_academy_dismiss_url ); ?>" aria-label="<?php esc_attr_e( 'Dismiss this notice', 'training-institute-academy' ); ?>">
     350            <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
     351        </a>
     352    </div>
     353    <?php
    290354}
    291355add_action( 'admin_notices', 'training_institute_academy_admin_notice' );
    … …  
    293357if ( ! function_exists( 'training_institute_academy_update_admin_notice' ) ) :
    294358/**
    295  * Updating admin notice on dismiss
     359 * Updating admin notice on dismiss (link fallback when JS is off)
    296360 */
    297361function training_institute_academy_update_admin_notice() {
    298     if ( isset( $_GET['training_institute_academy_admin_notice'] ) && $_GET['training_institute_academy_admin_notice'] == '1' ) {
     362    if ( isset( $_GET['training_institute_academy_admin_notice'] ) && '1' === $_GET['training_institute_academy_admin_notice'] && current_user_can( 'manage_options' ) ) {
     363        check_admin_referer( 'training_institute_academy_dismiss_notice' );
    299364        update_option( 'training_institute_academy_admin_notice', true );
     365        wp_safe_redirect( remove_query_arg( array( 'training_institute_academy_admin_notice', '_wpnonce' ) ) );
     366        exit;
    300367    }
    301368}
    302369endif;
    303370add_action( 'admin_init', 'training_institute_academy_update_admin_notice' );
     371
     372/**
     373 * Dismiss the welcome notice over AJAX
     374 */
     375function training_institute_academy_dismiss_admin_notice() {
     376    check_ajax_referer( 'training_institute_academy_dismiss_notice', 'nonce' );
     377    if ( ! current_user_can( 'manage_options' ) ) {
     378        wp_send_json_error();
     379    }
     380    update_option( 'training_institute_academy_admin_notice', true );
     381    wp_send_json_success();
     382}
     383add_action( 'wp_ajax_training_institute_academy_dismiss_notice', 'training_institute_academy_dismiss_admin_notice' );
    304384
    305385// After Switch theme function
    … …  
    308388    update_option( 'training_institute_academy_admin_notice', false );
    309389}
     390
     391
     392add_filter( 'woocommerce_enable_setup_wizard', '__return_false' );
  • training-institute-academy/1.3.7/inc/custom-functions.php

    r354502 r356311  
    376376                                    echo '<br>';
    377377                                    echo esc_html__('Theme: ', 'training-institute-academy') . '<a href="' . esc_url('https://www.omegathemes.com/products/free-training-institute-wordpress-theme') . '" title="' . esc_attr__('Training Institute Academy', 'training-institute-academy') . '" target="_blank"><span>' . esc_html__('Training Institute Academy', 'training-institute-academy') . '</span></a>' . esc_html__(' By ', 'training-institute-academy') . '  <span>' . esc_html__('OMEGA ', 'training-institute-academy') . '</span>';
    378                                     echo esc_html__('Powered by ', 'training-institute-academy') . '<a href="' . esc_url('https://wordpress.org') . '" title="' . esc_attr__('WordPress', 'training-institute-academy') . '" target="_blank"><span>' . esc_html__('wordpress.', 'training-institute-academy') . '</span></a>';
     378                                    echo esc_html__('Powered by ', 'training-institute-academy') . '<a href="' . esc_url('https://WordPress.org') . '" title="' . esc_attr__('WordPress', 'training-institute-academy') . '" target="_blank"><span>' . esc_html__('WordPress.', 'training-institute-academy') . '</span></a>';
    379379                                ?>
    380380                            </div>
  • training-institute-academy/1.3.7/inc/homepage-setup/assets/css/homepage-setup-style.css

    r274117 r356311  
    1 .whizzie-wrap {
     1/*--------------------------------------------------------------
     2# Getting Started page & welcome notice
     3# All selectors are prefixed with .omg- so they never touch core admin UI
     4--------------------------------------------------------------*/
     5
     6.omg-wrap,
     7.omg-notice {
     8        --omg-ink: #111318;
     9        --omg-text: #2b2f38;
     10        --omg-muted: #555a69;
     11        --omg-border: #e4e6ec;
     12        --omg-surface: #ffffff;
     13        --omg-soft: #f5f6f9;
     14        --omg-blue: #2546e0;
     15        --omg-blue-dark: #1b36b8;
     16        --omg-blue-soft: #e8ecfd;
     17        --omg-pink: #e3165b;
     18        --omg-pink-dark: #c20f4b;
     19        --omg-pink-soft: #fde8ef;
     20        --omg-green: #12a150;
     21        --omg-radius: 14px;
     22        --omg-radius-sm: 9px;
     23        --omg-shadow: 0 1px 2px rgba(17, 19, 24, .04), 0 6px 20px rgba(17, 19, 24, .04);
     24        --omg-ease: cubic-bezier(.22, .8, .3, 1);
     25        font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
     26        color: var(--omg-text);
     27        font-weight: 500;
     28        -webkit-font-smoothing: antialiased;
     29}
     30.omg-wrap *,
     31.omg-notice * {
     32        box-sizing: border-box;
     33}
     34.omg-wrap {
     35        margin: 24px 20px 0 0;
     36}
     37.omg-icon {
     38        width: 1em;
     39        height: 1em;
     40        flex: none;
     41}
     42
     43/* Buttons
     44--------------------------------------------- */
     45.omg-btn {
     46        display: inline-flex;
     47        align-items: center;
     48        justify-content: center;
     49        gap: 6px;
     50        min-height: 44px;
     51        padding: 0 18px;
     52        border: 1px solid transparent;
     53        border-radius: var(--omg-radius-sm);
     54        font-weight: 700;
     55        font-size: 14px;
     56        line-height: 1.2;
     57        font-family: inherit;
     58        text-decoration: none;
     59        cursor: pointer;
     60        transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--omg-ease), box-shadow .2s;
     61}
     62.omg-btn:hover {
     63        transform: translateY(-1px);
     64}
     65.omg-btn:active {
     66        transform: translateY(0);
     67}
     68.omg-btn:focus-visible,
     69.omg-step__head:focus-visible,
     70.omg-code__copy:focus-visible,
     71.omg-chip:focus-visible,
     72.omg-links__item:focus-visible,
     73.omg-notice__close:focus-visible {
     74        outline: 2px solid var(--omg-blue);
     75        outline-offset: 2px;
     76        box-shadow: none;
     77}
     78.omg-btn--primary {
     79        background: var(--omg-blue);
     80        color: #fff;
     81}
     82.omg-btn--primary:hover,
     83.omg-btn--primary:focus {
     84        background: var(--omg-blue-dark);
     85        color: #fff;
     86        box-shadow: 0 6px 16px rgba(37, 70, 224, .25);
     87}
     88.omg-btn--dark {
     89        background: var(--omg-ink);
     90        color: #fff;
     91}
     92.omg-btn--dark:hover,
     93.omg-btn--dark:focus {
     94        background: #000;
     95        color: #fff;
     96}
     97.omg-btn--pink {
     98        background: var(--omg-pink);
     99        color: #fff;
     100}
     101.omg-btn--pink:hover,
     102.omg-btn--pink:focus {
     103        background: var(--omg-pink-dark);
     104        color: #fff;
     105        box-shadow: 0 6px 16px rgba(227, 22, 91, .3);
     106}
     107.omg-btn--ghost,
     108.omg-btn--outline {
     109        background: var(--omg-surface);
     110        border-color: var(--omg-border);
     111        color: var(--omg-ink);
     112}
     113.omg-btn--ghost:hover,
     114.omg-btn--ghost:focus,
     115.omg-btn--outline:hover,
     116.omg-btn--outline:focus {
     117        border-color: var(--omg-ink);
     118        color: var(--omg-ink);
     119}
     120.omg-btn--outline-pink {
     121        background: var(--omg-surface);
     122        border-color: var(--omg-pink);
     123        color: var(--omg-pink);
     124}
     125.omg-btn--outline-pink:hover,
     126.omg-btn--outline-pink:focus {
     127        background: var(--omg-pink);
     128        color: #fff;
     129}
     130.omg-btn--block {
     131        display: flex;
     132        width: 100%;
     133}
     134.omg-btn[disabled],
     135.omg-btn.is-busy {
     136        opacity: .65;
     137        cursor: not-allowed;
     138        transform: none;
     139        box-shadow: none;
     140}
     141.omg-btn.is-busy::before {
     142        content: '';
     143        width: 14px;
     144        height: 14px;
     145        border: 2px solid currentColor;
     146        border-right-color: transparent;
     147        border-radius: 50%;
     148        animation: omg-spin .7s linear infinite;
     149}
     150.omg-link {
     151        display: inline-flex;
     152        align-items: center;
     153        gap: 4px;
     154        margin-top: 16px;
     155        color: var(--omg-blue);
     156        font-weight: 700;
     157        text-underline-offset: 3px;
     158}
     159.omg-link .omg-icon {
     160        transition: transform .2s var(--omg-ease);
     161}
     162.omg-link:hover .omg-icon {
     163        transform: translateX(3px);
     164}
     165
     166/* Header
     167--------------------------------------------- */
     168.omg-header {
     169        display: flex;
     170        align-items: flex-end;
     171        justify-content: space-between;
     172        gap: 16px;
     173        flex-wrap: wrap;
     174        margin-bottom: 22px;
     175}
     176.omg-eyebrow {
     177        margin: 0 0 6px;
     178        color: var(--omg-muted);
     179        font-size: 12px;
     180        font-weight: 700;
     181        letter-spacing: .08em;
     182        text-transform: uppercase;
     183}
     184.omg-wrap .omg-title {
     185        margin: 0;
     186        padding: 0;
     187        color: var(--omg-ink);
     188        font-size: 30px;
     189        font-weight: 800;
     190        line-height: 1.15;
     191        letter-spacing: -.02em;
     192}
     193.omg-header__actions {
     194        display: flex;
     195        gap: 10px;
     196}
     197.omg-wrap .wp-header-end {
     198        margin: 0;
     199}
     200
     201/* Layout & cards
     202--------------------------------------------- */
     203.omg-layout {
     204        display: grid;
     205        grid-template-columns: 360px minmax(0, 1fr);
     206        gap: 22px;
     207        align-items: start;
     208}
     209.omg-main {
     210        display: grid;
     211        gap: 22px;
     212        min-width: 0;
     213}
     214.omg-card {
     215        position: relative;
     216        background: var(--omg-surface);
     217        border: 1px solid var(--omg-border);
     218        border-radius: var(--omg-radius);
     219        box-shadow: var(--omg-shadow);
     220        padding: 24px;
     221}
     222.omg-wrap .omg-card__title {
     223        margin: 0 0 18px;
     224        color: var(--omg-ink);
     225        font-size: 18px;
     226        font-weight: 800;
     227}
     228.omg-wrap .omg-card {
     229        animation: omg-rise .5s var(--omg-ease) both;
     230}
     231.omg-main > :nth-child(1) { animation-delay: .05s; }
     232.omg-promos > :nth-child(1) { animation-delay: .1s; }
     233.omg-promos > :nth-child(2) { animation-delay: .15s; }
     234.omg-info > :nth-child(1) { animation-delay: .2s; }
     235.omg-info > :nth-child(2) { animation-delay: .25s; }
     236
     237/* Badges & kickers */
     238.omg-badges {
     239        display: flex;
     240        gap: 8px;
     241        margin-bottom: 14px;
     242}
     243.omg-badge {
     244        padding: 4px 10px;
     245        border-radius: 999px;
     246        background: var(--omg-soft);
     247        color: var(--omg-text);
     248        font-size: 12px;
     249        font-weight: 700;
     250}
     251.omg-badge--blue {
     252        background: var(--omg-blue-soft);
     253        color: var(--omg-blue);
     254}
     255.omg-kicker {
     256        margin: 0 0 8px;
     257        font-size: 12px;
     258        font-weight: 800;
     259        letter-spacing: .1em;
     260        text-transform: uppercase;
     261}
     262.omg-kicker--pink {
     263        color: var(--omg-pink);
     264}
     265
     266/* Site setup card
     267--------------------------------------------- */
     268.omg-setup__head {
     269        display: flex;
     270        align-items: baseline;
     271        justify-content: space-between;
     272        margin-bottom: 12px;
     273}
     274.omg-wrap .omg-setup__title {
     275        margin: 0;
     276        color: var(--omg-ink);
     277        font-size: 18px;
     278        font-weight: 800;
     279}
     280.omg-setup__count {
     281        color: var(--omg-muted);
     282        font-size: 13px;
     283}
     284.omg-setup__count b {
     285        color: var(--omg-ink);
     286}
     287.omg-progress {
     288        display: block;
     289        height: 8px;
     290        border-radius: 999px;
     291        background: #eceef3;
     292        overflow: hidden;
     293}
     294.omg-progress__bar {
     295        display: block;
     296        height: 100%;
     297        border-radius: inherit;
     298        background: var(--omg-blue);
     299        transition: width .6s var(--omg-ease), background-color .3s;
     300}
     301.omg-setup.is-complete .omg-progress__bar {
     302        background: var(--omg-green);
     303}
     304.omg-setup__intro {
     305        margin: 14px 0 18px;
     306        color: var(--omg-muted);
     307        font-size: 13px;
     308        line-height: 1.6;
     309}
     310.omg-setup__complete {
     311        display: none;
     312        align-items: center;
     313        gap: 12px;
     314        margin-bottom: 18px;
     315        padding: 14px;
     316        border-radius: var(--omg-radius-sm);
     317        background: #e7f6ee;
     318        color: #0b6b36;
     319        font-size: 13px;
     320        line-height: 1.45;
     321}
     322.omg-setup__complete strong {
     323        display: block;
     324        font-size: 14px;
     325}
     326.omg-setup__complete-icon {
     327        display: grid;
     328        place-items: center;
     329        width: 34px;
     330        height: 34px;
     331        border-radius: 50%;
     332        background: var(--omg-green);
     333        color: #fff;
     334        font-size: 18px;
     335        flex: none;
     336}
     337.omg-setup.is-complete .omg-setup__complete {
     338        display: flex;
     339        animation: omg-rise .45s var(--omg-ease) both;
     340}
     341.omg-setup.is-complete .omg-setup__intro {
     342        display: none;
     343}
     344
     345/* Steps */
     346.omg-wrap .omg-steps {
     347        margin: 0;
     348        padding: 0;
     349        list-style: none;
     350}
     351.omg-wrap .omg-step {
     352        position: relative;
     353        margin: 0;
     354        padding-bottom: 8px;
     355}
     356.omg-step:not(:last-child)::before {
     357        content: '';
     358        position: absolute;
     359        top: 40px;
     360        bottom: 0;
     361        left: 16px;
     362        width: 2px;
     363        background: var(--omg-border);
     364        transition: background-color .4s;
     365}
     366.omg-step.is-done:not(:last-child)::before {
     367        background: var(--omg-blue);
     368}
     369.omg-step__head {
     370        display: flex;
     371        align-items: flex-start;
     372        gap: 14px;
     373        width: 100%;
     374        padding: 2px 0 8px;
     375        border: 0;
     376        background: none;
     377        text-align: left;
     378        font-family: inherit;
     379        color: inherit;
     380        cursor: pointer;
     381        border-radius: var(--omg-radius-sm);
     382}
     383.omg-step__num {
     384        position: relative;
     385        display: grid;
     386        place-items: center;
     387        width: 34px;
     388        height: 34px;
     389        border: 2px solid var(--omg-border);
     390        border-radius: 50%;
     391        background: var(--omg-surface);
     392        color: var(--omg-muted);
     393        font-size: 13px;
     394        font-weight: 800;
     395        flex: none;
     396        transition: border-color .3s, background-color .3s, color .3s, box-shadow .3s;
     397}
     398.omg-step__num .omg-icon {
     399        position: absolute;
     400        font-size: 16px;
    2401        opacity: 0;
     402        transform: scale(.4);
     403        transition: opacity .3s, transform .35s var(--omg-ease);
     404}
     405.omg-step__index {
     406        transition: opacity .2s, transform .3s var(--omg-ease);
     407}
     408.omg-step.is-open .omg-step__num {
     409        border-color: var(--omg-blue);
     410        background: var(--omg-blue);
     411        color: #fff;
     412        box-shadow: 0 0 0 4px var(--omg-blue-soft);
     413}
     414.omg-step.is-done .omg-step__num {
     415        border-color: var(--omg-blue);
     416        background: var(--omg-blue);
     417        color: #fff;
     418}
     419.omg-step.is-done .omg-step__num .omg-icon {
     420        opacity: 1;
     421        transform: scale(1);
     422}
     423.omg-step.is-done .omg-step__index {
     424        opacity: 0;
     425        transform: scale(.4);
     426}
     427.omg-step__text {
     428        display: flex;
     429        flex-direction: column;
     430        gap: 2px;
     431        padding-top: 6px;
     432}
     433.omg-step__title {
     434        color: var(--omg-ink);
     435        font-size: 15px;
     436        font-weight: 700;
     437}
     438.omg-step__desc {
     439        color: var(--omg-muted);
     440        font-size: 12.5px;
     441}
     442.omg-step.is-done:not(.is-open) .omg-step__title {
     443        color: var(--omg-muted);
     444}
     445
     446/* Smooth open/close without measuring heights in JS */
     447.omg-step__body {
     448        display: grid;
     449        grid-template-rows: 0fr;
     450        opacity: 0;
     451        transition: grid-template-rows .4s var(--omg-ease), opacity .3s;
     452}
     453.omg-step.is-open .omg-step__body {
     454        grid-template-rows: 1fr;
     455        opacity: 1;
     456}
     457.omg-step__inner {
     458        min-height: 0;
     459        overflow: hidden;
     460        padding-left: 48px;
     461}
     462.omg-step.is-open .omg-step__inner {
     463        padding-bottom: 14px;
     464}
     465.omg-step__note {
     466        margin: 4px 0 12px;
     467        color: var(--omg-muted);
     468        font-size: 13px;
     469        line-height: 1.55;
     470}
     471.omg-step__error {
     472        margin: 0 0 10px;
     473        padding: 10px 12px;
     474        border-radius: var(--omg-radius-sm);
     475        background: var(--omg-pink-soft);
     476        color: var(--omg-pink-dark);
     477        font-size: 12.5px;
     478        line-height: 1.5;
     479}
     480.omg-skip {
     481        display: block;
     482        margin: 10px auto 0;
     483        padding: 2px 4px;
     484        border: 0;
     485        background: none;
     486        color: var(--omg-muted);
     487        font-weight: 700;
     488        font-size: 12.5px;
     489        line-height: 1.4;
     490        font-family: inherit;
     491        text-decoration: underline;
     492        text-underline-offset: 3px;
     493        cursor: pointer;
     494}
     495.omg-skip:hover {
     496        color: var(--omg-ink);
     497}
     498
     499/* Plugins list */
     500.omg-wrap .omg-plugins {
     501        display: grid;
     502        grid-template-columns: minmax(0, 1fr);
     503        gap: 8px;
     504        margin: 4px 0 12px;
     505        padding: 0;
     506        list-style: none;
     507}
     508.omg-wrap .omg-plugin {
     509        display: flex;
     510        align-items: center;
     511        justify-content: space-between;
     512        gap: 10px;
     513        margin: 0;
     514        padding: 10px 12px;
     515        border: 1px solid var(--omg-border);
     516        border-radius: var(--omg-radius-sm);
     517        transition: border-color .2s, background-color .2s;
     518}
     519.omg-plugin:hover {
     520        border-color: #cfd3dc;
     521}
     522.omg-plugin.is-working {
     523        border-color: var(--omg-blue);
     524        background: #f7f9ff;
     525}
     526.omg-plugin__label {
     527        display: flex;
     528        align-items: center;
     529        gap: 10px;
     530        min-width: 0;
     531        flex: 1;
     532        cursor: pointer;
     533}
     534.omg-wrap .omg-plugin__check {
     535        margin: 0;
     536        flex: none;
     537        width: 18px;
     538        height: 18px;
     539        border-radius: 4px;
     540}
     541.omg-wrap .omg-plugin__check:checked {
     542        background: var(--omg-blue);
     543        border-color: var(--omg-blue);
     544}
     545.omg-wrap .omg-plugin__check:checked::before {
     546        content: '';
     547        width: 10px;
     548        height: 5px;
     549        margin: 4px 0 0 3px;
     550        border: solid #fff;
     551        border-width: 0 0 2px 2px;
     552        transform: rotate(-45deg);
     553        float: none;
     554}
     555.omg-wrap .omg-plugin__check:disabled {
     556        opacity: .7;
     557}
     558.omg-plugin__name {
     559        color: var(--omg-ink);
     560        font-size: 13.5px;
     561        font-weight: 700;
     562        overflow: hidden;
     563        text-overflow: ellipsis;
     564        white-space: nowrap;
     565}
     566.omg-plugin__status {
     567        padding: 3px 9px;
     568        border-radius: 999px;
     569        font-size: 11.5px;
     570        font-weight: 700;
     571        white-space: nowrap;
     572        flex: none;
     573}
     574.omg-plugin__status--required {
     575        background: var(--omg-pink-soft);
     576        color: var(--omg-pink);
     577}
     578.omg-plugin__status--optional,
     579.omg-plugin__status--working {
     580        background: var(--omg-soft);
     581        color: var(--omg-muted);
     582}
     583.omg-plugin__status--working {
     584        color: var(--omg-blue);
     585        background: var(--omg-blue-soft);
     586}
     587.omg-plugin__status--active {
     588        background: #e7f6ee;
     589        color: var(--omg-green);
     590}
     591.omg-plugin__status--failed {
     592        background: var(--omg-pink-soft);
     593        color: var(--omg-pink-dark);
     594}
     595
     596/* Customize chips */
     597.omg-chips {
     598        display: grid;
     599        grid-template-columns: 1fr 1fr;
     600        gap: 8px;
     601        margin: 4px 0 12px;
     602}
     603.omg-chip {
     604        padding: 10px 12px;
     605        border: 1px solid var(--omg-border);
     606        border-radius: var(--omg-radius-sm);
     607        color: var(--omg-ink);
     608        font-size: 13px;
     609        font-weight: 700;
     610        text-decoration: none;
     611        transition: border-color .2s, color .2s, background-color .2s;
     612}
     613.omg-chip:hover,
     614.omg-chip:focus {
     615        border-color: var(--omg-blue);
     616        background: #f7f9ff;
     617        color: var(--omg-blue);
     618}
     619
     620.omg-setup__help {
     621        margin: 10px 0 0;
     622        padding-top: 16px;
     623        border-top: 1px solid var(--omg-border);
     624        color: var(--omg-muted);
     625        font-size: 13px;
     626        line-height: 1.6;
     627}
     628.omg-setup__help a {
     629        color: var(--omg-blue);
     630        font-weight: 700;
     631}
     632
     633/* Theme hero
     634--------------------------------------------- */
     635.omg-hero {
     636        display: grid;
     637        grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
     638        gap: 28px;
     639        align-items: center;
     640}
     641.omg-wrap .omg-hero__title {
     642        margin: 0 0 12px;
     643        color: var(--omg-ink);
     644        font-size: 28px;
     645        font-weight: 800;
     646        line-height: 1.15;
     647        letter-spacing: -.02em;
     648}
     649.omg-hero__desc {
     650        margin: 0 0 20px;
     651        color: var(--omg-muted);
     652        font-size: 14px;
     653        line-height: 1.65;
     654}
     655.omg-hero__actions {
     656        display: flex;
     657        gap: 10px;
     658        flex-wrap: wrap;
     659}
     660.omg-hero__media {
     661        padding: 12px;
     662        border-radius: var(--omg-radius);
     663        background: var(--omg-soft);
     664        border: 1px solid var(--omg-border);
     665        overflow: hidden;
     666        margin: 0 auto;
     667}
     668.omg-hero__media img {
     669        display: block;
     670        width: auto;
     671        max-width: 100%;
     672        height: 170px;
     673        object-fit: cover;
     674        border-radius: var(--omg-radius-sm);
     675        box-shadow: 0 8px 24px rgba(17, 19, 24, .1);
     676        transition: transform .6s var(--omg-ease);
     677        text-align: right;
     678}
     679.omg-hero:hover .omg-hero__media img {
     680        transform: scale(1.02);
     681}
     682
     683/* Promo cards
     684--------------------------------------------- */
     685.omg-promos,
     686.omg-info {
     687        display: grid;
     688        grid-template-columns: repeat(2, minmax(0, 1fr));
     689        gap: 22px;
     690}
     691.omg-pro,
     692.omg-bundle {
     693        display: flex;
     694        flex-direction: column;
     695        padding: 28px;
     696        overflow: hidden;
     697}
     698.omg-pro {
     699        background:
     700                radial-gradient(90% 70% at 0% 0%, rgba(123, 47, 247, .35), transparent 60%),
     701                radial-gradient(80% 60% at 100% 100%, rgba(227, 22, 91, .28), transparent 60%),
     702                var(--omg-ink);
     703        border-color: var(--omg-ink);
     704        color: #e8e9ee;
     705}
     706.omg-pro__ribbon {
     707        position: absolute;
     708        top: 26px;
     709        right: -46px;
     710        width: 180px;
     711        padding: 7px 0;
     712        background: var(--omg-pink);
     713        color: #fff;
     714        font-size: 12px;
     715        font-weight: 800;
     716        letter-spacing: .06em;
     717        text-align: center;
     718        text-transform: uppercase;
     719        transform: rotate(40deg);
     720}
     721.omg-wrap .omg-pro__title,
     722.omg-wrap .omg-bundle__title {
     723        margin: 0 0 18px;
     724        font-size: 22px;
     725        font-weight: 800;
     726        line-height: 1.2;
     727        letter-spacing: -.01em;
     728}
     729.omg-wrap .omg-pro__title {
     730        max-width: 85%;
     731        color: #fff;
     732}
     733.omg-wrap .omg-bundle__title {
     734        color: var(--omg-ink);
     735}
     736.omg-pro__links {
     737        display: grid;
     738        grid-template-columns: repeat(3, minmax(0, 1fr));
     739        gap: 8px;
     740        margin-bottom: 20px;
     741}
     742.omg-pro__link {
     743        display: flex;
     744        flex-direction: column;
     745        align-items: center;
     746        gap: 8px;
     747        padding: 14px 8px;
     748        border: 1px solid rgba(255, 255, 255, .1);
     749        border-radius: var(--omg-radius-sm);
     750        background: rgba(255, 255, 255, .04);
     751        color: #fff;
     752        font-size: 12.5px;
     753        font-weight: 700;
     754        line-height: 1.3;
     755        text-align: center;
     756        text-decoration: none;
     757        transition: transform .25s var(--omg-ease), border-color .25s, background .25s;
     758}
     759.omg-pro__link .omg-icon {
     760        width: 22px;
     761        height: 22px;
     762        color: var(--omg-pink);
     763}
     764.omg-pro__link:hover,
     765.omg-pro__link:focus {
     766        border-color: var(--omg-pink);
     767        background: rgba(255, 255, 255, .08);
     768        color: #fff;
     769        transform: translateY(-2px);
     770}
     771.omg-pro__previews {
     772        display: grid;
     773        grid-template-columns: repeat(3, minmax(0, 1fr));
     774        gap: 8px;
     775        margin-bottom: 20px;
     776        padding: 8px;
     777        border: 1px solid rgba(255, 255, 255, .1);
     778        border-radius: var(--omg-radius-sm);
     779        background: rgba(255, 255, 255, .04);
     780}
     781.omg-pro__previews--single {
     782        grid-template-columns: minmax(0, 1fr);
     783}
     784.omg-pro__previews--single .omg-pro__preview {
     785        aspect-ratio: 3 / 2;
     786}
     787.omg-pro__previews--single .omg-pro__preview img {
     788        object-fit: contain;
     789}
     790.omg-pro__preview {
    3791        position: relative;
    4     border: none;
    5 }
    6 .whizzie-wrap.loaded {
    7     max-width: 100% !important;
    8     opacity: 1;
    9     background: transparent;
    10 }
    11 .whizzie-menu .button-primary, .whizzie-menu .button-secondary, .whizzie-menu .button, .other_content .button{
    12     padding: 7px 26px;
    13     font-size: 18px;
    14     font-weight: 700;
    15 }
    16 .whizzie-wrap.spinning .step-loading {
     792        display: block;
     793        aspect-ratio: 4 / 3;
     794        border: 1px solid rgba(255, 255, 255, .08);
     795        border-radius: 6px;
     796        background: #fff;
     797        overflow: hidden;
     798        transition: transform .25s var(--omg-ease), border-color .25s, box-shadow .25s;
     799}
     800.omg-pro__preview:hover,
     801.omg-pro__preview:focus {
     802        border-color: var(--omg-pink);
     803        transform: translateY(-2px);
     804        box-shadow: 0 10px 22px rgba(0, 0, 0, .35);
     805}
     806.omg-pro__preview img {
     807        display: block;
     808        width: 100%;
     809        height: 100%;
     810        object-fit: cover;
     811        object-position: top;
     812        transition: transform .6s var(--omg-ease);
     813}
     814.omg-pro__preview:hover img {
     815        transform: scale(1.06);
     816}
     817.omg-pro__preview-label {
     818        position: absolute;
     819        left: 6px;
     820        bottom: 6px;
     821        padding: 3px 8px;
     822        border-radius: 999px;
     823        background: rgba(17, 19, 24, .82);
     824        color: #fff;
     825        font-size: 10.5px;
     826        font-weight: 700;
     827        letter-spacing: .04em;
     828        line-height: 1.3;
     829        text-transform: uppercase;
     830}
     831.omg-wrap .omg-pro__price {
     832        display: flex;
     833        align-items: baseline;
     834        flex-wrap: wrap;
     835        gap: 4px 10px;
     836        margin: 0 0 18px;
     837}
     838.omg-pro__price strong {
     839        color: #fff;
     840        font-size: 34px;
     841        font-weight: 800;
     842        line-height: 1;
     843        letter-spacing: -.02em;
     844}
     845.omg-pro__price span {
     846        color: #a7aab5;
     847        font-size: 13px;
     848}
     849.omg-wrap .omg-checklist {
     850        display: grid;
     851        gap: 10px;
     852        margin: 0 0 22px;
     853        padding: 0;
     854        list-style: none;
     855}
     856.omg-wrap .omg-checklist li {
     857        display: flex;
     858        align-items: center;
     859        gap: 10px;
     860        margin: 0;
     861        font-size: 14px;
     862}
     863.omg-checklist .omg-icon {
     864        color: var(--omg-pink);
     865        font-size: 16px;
     866}
     867.omg-pro .omg-btn,
     868.omg-bundle .omg-btn {
     869        margin-top: auto;
     870}
     871
     872/* Coupon codes */
     873.omg-code {
     874        display: flex;
     875        align-items: center;
     876        flex-wrap: wrap;
     877        gap: 10px;
     878        margin-bottom: 24px;
     879}
     880.omg-code__label {
     881        font-size: 13px;
     882        color: #a7aab5;
     883}
     884.omg-wrap .omg-code__value {
     885        padding: 7px 10px;
     886        border: 1px dashed rgba(255, 255, 255, .55);
     887        border-radius: 6px;
     888        background: transparent;
     889        color: #fff;
     890        font-size: 13px;
     891        font-weight: 700;
     892        letter-spacing: .04em;
     893}
     894.omg-code__copy {
     895        min-width: 64px;
     896        padding: 7px 12px;
     897        border: 1px solid rgba(255, 255, 255, .3);
     898        border-radius: 6px;
     899        background: transparent;
     900        color: #fff;
     901        font-weight: 700;
     902        font-size: 13px;
     903        line-height: 1.2;
     904        font-family: inherit;
     905        cursor: pointer;
     906        transition: background-color .2s, border-color .2s, color .2s;
     907}
     908.omg-code__copy:hover {
     909        border-color: #fff;
     910}
     911.omg-code__copy.is-copied {
     912        background: var(--omg-green);
     913        border-color: var(--omg-green);
     914        color: #fff;
     915}
     916.omg-code--light .omg-code__label {
     917        color: var(--omg-muted);
     918}
     919.omg-wrap .omg-code--light .omg-code__value {
     920        border-color: var(--omg-pink);
     921        color: var(--omg-pink);
     922}
     923.omg-code--light .omg-code__copy {
     924        border-color: var(--omg-border);
     925        color: var(--omg-ink);
     926}
     927.omg-code--light .omg-code__copy:hover {
     928        border-color: var(--omg-ink);
     929}
     930
     931.omg-bundle {
     932        border: 2px solid var(--omg-pink);
     933}
     934.omg-bundle__head {
     935        display: flex;
     936        justify-content: space-between;
     937        gap: 12px;
     938}
     939.omg-bundle__seal {
     940        display: flex;
     941        flex-direction: column;
     942        align-items: center;
     943        justify-content: center;
     944        width: 72px;
     945        height: 72px;
     946        margin-top: -4px;
     947        border-radius: 50%;
     948        background: var(--omg-pink);
     949        color: #fff;
     950        line-height: 1;
     951        text-transform: uppercase;
     952        flex: none;
     953        box-shadow: 0 8px 18px rgba(227, 22, 91, .3);
     954        animation: omg-pulse 2.6s ease-in-out infinite;
     955}
     956.omg-bundle__seal small {
     957        font-size: 9.5px;
     958        font-weight: 800;
     959}
     960.omg-bundle__seal b {
     961        font-size: 22px;
     962        font-weight: 800;
     963}
     964.omg-bundle__media {
     965        margin-bottom: 16px;
     966        border-radius: var(--omg-radius-sm);
     967        background: var(--omg-pink-soft);
     968        overflow: hidden;
     969}
     970.omg-bundle__media img {
     971        display: block;
     972        width: 100%;
     973        height: 110px;
     974        object-fit: cover;
     975}
     976.omg-bundle__desc {
     977        margin: 0 0 14px;
     978        color: var(--omg-muted);
     979        font-size: 14px;
     980}
     981.omg-wrap .omg-bundle .omg-checklist {
     982        margin-bottom: 16px;
     983        color: var(--omg-ink);
     984}
     985.omg-price {
     986        display: flex;
     987        align-items: baseline;
     988        gap: 10px;
     989        margin: 0 0 14px;
     990}
     991.omg-price del {
     992        color: var(--omg-muted);
     993        font-size: 16px;
     994}
     995.omg-price strong {
     996        color: var(--omg-ink);
     997        font-size: 34px;
     998        font-weight: 800;
     999        letter-spacing: -.02em;
     1000}
     1001
     1002/* Free vs Pro
     1003--------------------------------------------- */
     1004.omg-compare__table {
     1005        width: 100%;
     1006        border-collapse: collapse;
     1007        font-size: 14px;
     1008}
     1009.omg-compare__table th {
     1010        padding: 0 0 10px;
     1011        color: var(--omg-muted);
     1012        font-weight: 700;
     1013        text-align: left;
     1014}
     1015.omg-compare__table td {
     1016        padding: 11px 0;
     1017        border-top: 1px solid var(--omg-border);
     1018        color: var(--omg-ink);
     1019}
     1020.omg-compare__table th:not(:first-child),
     1021.omg-compare__table td:not(:first-child) {
     1022        width: 64px;
     1023        text-align: center;
     1024}
     1025.omg-compare__table th.omg-compare__pro {
     1026        color: var(--omg-pink);
     1027        font-weight: 800;
     1028}
     1029.omg-compare__table tbody tr {
     1030        transition: background-color .2s;
     1031}
     1032.omg-compare__table tbody tr:hover {
     1033        background: var(--omg-soft);
     1034}
     1035.omg-yes .omg-icon {
     1036        color: var(--omg-green);
     1037        font-size: 16px;
     1038}
     1039.omg-no .omg-icon {
     1040        color: #a3a7b3;
     1041        font-size: 16px;
     1042}
     1043
     1044/* Important links
     1045--------------------------------------------- */
     1046.omg-links__grid {
     1047        display: grid;
     1048        grid-template-columns: 1fr 1fr;
     1049        gap: 10px;
     1050}
     1051.omg-links__item {
     1052        display: flex;
     1053        flex-direction: column;
     1054        gap: 4px;
     1055        padding: 14px;
     1056        border: 1px solid var(--omg-border);
     1057        border-radius: var(--omg-radius-sm);
     1058        text-decoration: none;
     1059        transition: border-color .2s, transform .2s var(--omg-ease), box-shadow .2s;
     1060}
     1061.omg-links__item strong {
     1062        color: var(--omg-ink);
     1063        font-size: 14px;
     1064}
     1065.omg-links__item span {
     1066        color: var(--omg-muted);
     1067        font-size: 12.5px;
     1068        line-height: 1.45;
     1069}
     1070.omg-links__item:hover,
     1071.omg-links__item:focus {
     1072        border-color: var(--omg-blue);
     1073        transform: translateY(-2px);
     1074        box-shadow: 0 8px 18px rgba(37, 70, 224, .08);
     1075}
     1076.omg-links__item:hover strong {
     1077        color: var(--omg-blue);
     1078}
     1079
     1080/* Expert banner & footer
     1081--------------------------------------------- */
     1082.omg-links {
     1083        display: flex;
     1084        flex-direction: column;
     1085}
     1086.omg-expert {
     1087        display: flex;
     1088        flex-direction: column;
     1089        align-items: flex-start;
     1090        gap: 16px;
     1091        margin-top: 10px;
     1092        padding: 20px;
     1093        border: 1px solid #d9dffb;
     1094        border-radius: var(--omg-radius-sm);
     1095        background:
     1096                radial-gradient(60% 120% at 100% 50%, rgba(123, 47, 247, .1), transparent 60%),
     1097                var(--omg-blue-soft);
     1098}
     1099.omg-links .omg-links__grid {
     1100        margin-bottom: 18px;
     1101}
     1102.omg-wrap .omg-expert__list {
     1103        display: flex;
     1104        flex-wrap: wrap;
     1105        gap: 8px;
     1106        margin: 14px 0 0;
     1107        padding: 0;
     1108        list-style: none;
     1109}
     1110.omg-wrap .omg-expert__list li {
     1111        display: inline-flex;
     1112        align-items: center;
     1113        gap: 6px;
     1114        margin: 0;
     1115        padding: 5px 11px;
     1116        border-radius: 999px;
     1117        background: var(--omg-surface);
     1118        color: var(--omg-ink);
     1119        font-size: 12.5px;
     1120        font-weight: 700;
     1121}
     1122.omg-expert__list .omg-icon {
     1123        color: var(--omg-blue);
     1124        font-size: 14px;
     1125}
     1126.omg-expert__btn {
     1127        flex: none;
     1128        width: 100%;
     1129}
     1130.omg-wrap .omg-expert__title {
     1131        margin: 0 0 4px;
     1132        color: var(--omg-ink);
     1133        font-size: 17px;
     1134        font-weight: 800;
     1135}
     1136.omg-expert__desc {
     1137        margin: 0;
     1138        color: var(--omg-text);
     1139        font-size: 14px;
     1140}
     1141.omg-footer {
     1142        display: flex;
     1143        justify-content: space-between;
     1144        gap: 12px;
     1145        flex-wrap: wrap;
     1146        margin: 26px 0 10px;
     1147        color: var(--omg-muted);
     1148        font-size: 13px;
     1149}
     1150.omg-footer p {
     1151        margin: 0;
     1152}
     1153.omg-footer a {
     1154        color: var(--omg-blue);
     1155}
     1156
     1157/* Welcome notice
     1158--------------------------------------------- */
     1159.notice.omg-notice {
     1160        position: relative;
     1161        display: flex;
     1162        align-items: center;
     1163        gap: 22px;
     1164        margin: 18px 20px 14px 2px;
     1165        padding: 20px 56px 20px 20px;
     1166        border: 1px solid var(--omg-border);
     1167        border-left: 4px solid var(--omg-blue);
     1168        border-radius: var(--omg-radius);
     1169        background: var(--omg-surface);
     1170        box-shadow: var(--omg-shadow);
     1171        animation: omg-rise .45s var(--omg-ease) both;
     1172        transition: opacity .3s, transform .3s var(--omg-ease);
     1173}
     1174.notice.omg-notice.is-leaving {
     1175        opacity: 0;
     1176        transform: translateY(-6px);
     1177}
     1178.omg-notice__media {
     1179        width: 190px;
     1180        padding: 8px;
     1181        border-radius: var(--omg-radius-sm);
     1182        background: var(--omg-soft);
     1183        flex: none;
     1184}
     1185.omg-notice__media img {
     1186        display: block;
     1187        width: 100%;
     1188        height: auto;
     1189        border-radius: 6px;
     1190}
     1191.omg-notice__body {
     1192        min-width: 0;
     1193}
     1194.omg-notice .omg-notice__eyebrow {
     1195        margin: 0 0 4px;
     1196        padding: 0;
     1197        color: var(--omg-blue);
     1198        font-size: 12px;
     1199        font-weight: 700;
     1200        letter-spacing: .06em;
     1201        text-transform: uppercase;
     1202}
     1203.omg-notice .omg-notice__title {
     1204        margin: 0 0 6px;
     1205        color: var(--omg-ink);
     1206        font-size: 19px;
     1207        font-weight: 800;
     1208        line-height: 1.25;
     1209}
     1210.omg-notice .omg-notice__text {
     1211        margin: 0 0 12px;
     1212        padding: 0;
     1213        color: var(--omg-muted);
     1214        font-size: 13.5px;
     1215        line-height: 1.55;
     1216}
     1217.omg-notice__progress {
     1218        display: flex;
     1219        align-items: center;
     1220        gap: 10px;
     1221        max-width: 360px;
     1222        margin-bottom: 14px;
     1223}
     1224.omg-notice__progress .omg-progress {
     1225        flex: 1;
     1226        height: 6px;
     1227}
     1228.omg-notice__count {
     1229        color: var(--omg-muted);
     1230        font-size: 12.5px;
     1231        font-weight: 700;
     1232        white-space: nowrap;
     1233}
     1234.omg-notice__actions {
     1235        display: flex;
     1236        gap: 10px;
     1237        flex-wrap: wrap;
     1238}
     1239.omg-notice .omg-btn {
     1240        min-height: 38px;
     1241        font-size: 13px;
     1242        text-decoration: none;
     1243}
     1244/* Core styles links inside .notice, so restate the button colors */
     1245.notice.omg-notice .omg-btn--primary,
     1246.notice.omg-notice .omg-btn--primary:hover,
     1247.notice.omg-notice .omg-btn--primary:focus,
     1248.notice.omg-notice .omg-btn--outline-pink:hover,
     1249.notice.omg-notice .omg-btn--outline-pink:focus {
     1250        color: #fff;
     1251}
     1252.notice.omg-notice .omg-btn--outline-pink {
     1253        color: var(--omg-pink);
     1254}
     1255.notice.omg-notice .omg-btn--premium,
     1256.notice.omg-notice .omg-btn--premium:hover,
     1257.notice.omg-notice .omg-btn--premium:focus {
     1258        color: #fff;
     1259}
     1260.notice.omg-notice .omg-btn--outline,
     1261.notice.omg-notice .omg-btn--outline:hover,
     1262.notice.omg-notice .omg-btn--outline:focus {
     1263        color: var(--omg-ink);
     1264}
     1265
     1266/* Setup finished: notice stays on the Dashboard only */
     1267.notice.omg-notice--complete {
     1268        border-left-color: var(--omg-green);
     1269}
     1270.omg-notice--complete .omg-notice__eyebrow {
     1271        color: var(--omg-green);
     1272}
     1273.omg-notice--complete .omg-progress__bar {
     1274        background: var(--omg-green);
     1275}
     1276.notice.omg-notice .omg-btn--outline-pink:hover,
     1277.notice.omg-notice .omg-btn--outline-pink:focus {
     1278        color: #fff;
     1279}
     1280.omg-notice__close {
     1281        position: absolute;
     1282        top: 12px;
     1283        right: 12px;
     1284        display: grid;
     1285        place-items: center;
     1286        width: 30px;
     1287        height: 30px;
     1288        border-radius: 50%;
     1289        color: var(--omg-muted);
     1290        transition: background-color .2s, color .2s;
     1291}
     1292.omg-notice__close:hover,
     1293.omg-notice__close:focus {
     1294        background: var(--omg-soft);
     1295        color: var(--omg-ink);
     1296}
     1297.omg-notice__close svg {
     1298        width: 16px;
     1299        height: 16px;
     1300}
     1301
     1302/* Highlights: demo & premium buttons, animated bundle border
     1303--------------------------------------------- */
     1304.omg-btn--demo,
     1305.omg-btn--premium {
     1306        position: relative;
     1307        overflow: hidden;
     1308        color: #fff;
     1309        isolation: isolate;
     1310}
     1311.omg-btn--demo {
     1312        background: linear-gradient(135deg, #7b2ff7, var(--omg-blue));
     1313        box-shadow: 0 6px 18px rgba(91, 60, 240, .35);
     1314}
     1315.omg-btn--premium {
     1316        background: linear-gradient(135deg, #ff8a00, var(--omg-pink));
     1317        box-shadow: 0 6px 18px rgba(227, 22, 91, .32);
     1318}
     1319.omg-btn--demo:hover,
     1320.omg-btn--demo:focus,
     1321.omg-btn--premium:hover,
     1322.omg-btn--premium:focus {
     1323        color: #fff;
     1324        filter: saturate(1.15) brightness(1.05);
     1325}
     1326.omg-btn--demo:hover {
     1327        box-shadow: 0 10px 24px rgba(91, 60, 240, .45);
     1328}
     1329.omg-btn--premium:hover {
     1330        box-shadow: 0 10px 24px rgba(227, 22, 91, .42);
     1331}
     1332/* Light sweep across the button */
     1333.omg-btn--demo::after,
     1334.omg-btn--premium::after {
     1335        content: '';
    171336        position: absolute;
    181337        top: 0;
    19         bottom: 0;
    20         left: 0;
    21         right: 0;
    22         z-index: 999;
    23         background: rgba(255,255,255,0.8);
    24 }
    25 .spinning .step-loading .spinner {
    26         float: none;
     1338        left: -60%;
     1339        z-index: -1;
     1340        width: 40%;
     1341        height: 100%;
     1342        background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
     1343        transform: skewX(-20deg);
     1344        animation: omg-shine 3.4s ease-in-out infinite;
     1345}
     1346.omg-btn--premium::after {
     1347        animation-delay: 1.2s;
     1348}
     1349.omg-btn--premium .omg-icon {
     1350        font-size: 15px;
     1351        color: #ffe27a;
     1352}
     1353.omg-live-dot {
     1354        width: 8px;
     1355        height: 8px;
     1356        border-radius: 50%;
     1357        background: #3dff9a;
     1358        flex: none;
     1359        animation: omg-live 1.6s ease-out infinite;
     1360}
     1361.omg-compare__demo {
     1362        margin-top: 18px;
     1363}
     1364
     1365/* Tags on the important links */
     1366.omg-links__item strong {
     1367        display: flex;
     1368        align-items: center;
     1369        gap: 6px;
     1370        flex-wrap: wrap;
     1371}
     1372.omg-tag {
     1373        display: inline-flex;
     1374        align-items: center;
     1375        gap: 5px;
     1376        padding: 2px 8px;
     1377        border-radius: 999px;
     1378        font-size: 10.5px;
     1379        font-style: normal;
     1380        font-weight: 800;
     1381        letter-spacing: .05em;
     1382        text-transform: uppercase;
     1383}
     1384.omg-tag--live {
     1385        background: #e5f8ee;
     1386        color: var(--omg-green);
     1387}
     1388.omg-tag--live .omg-live-dot {
     1389        width: 6px;
     1390        height: 6px;
     1391        background: var(--omg-green);
     1392}
     1393.omg-tag--pro {
     1394        background: linear-gradient(135deg, #ff8a00, var(--omg-pink));
     1395        color: #fff;
     1396}
     1397.omg-links__item--demo,
     1398.omg-links__item--premium {
     1399        border: 1.5px solid transparent;
     1400}
     1401.omg-links__item--demo {
     1402        background: linear-gradient(#f8f6ff, #f8f6ff) padding-box, linear-gradient(135deg, #7b2ff7, var(--omg-blue)) border-box;
     1403}
     1404.omg-links__item--premium {
     1405        background: linear-gradient(#fff8f3, #fff8f3) padding-box, linear-gradient(135deg, #ff8a00, var(--omg-pink)) border-box;
     1406}
     1407.omg-links__item--demo:hover,
     1408.omg-links__item--demo:focus,
     1409.omg-links__item--premium:hover,
     1410.omg-links__item--premium:focus {
     1411        border-color: transparent;
     1412}
     1413
     1414/* Hero tint */
     1415.omg-hero {
     1416        background:
     1417                radial-gradient(70% 120% at 100% 0%, #eef0ff 0%, transparent 60%),
     1418                radial-gradient(50% 80% at 0% 100%, #fff1f5 0%, transparent 60%),
     1419                var(--omg-surface);
     1420}
     1421
     1422/* Rotating gradient border on the bundle card */
     1423.omg-card.omg-glow-border {
     1424        border: 0;
     1425        padding: 31px;
     1426        isolation: isolate;
     1427        overflow: hidden;
     1428        box-shadow: 0 14px 36px rgba(227, 22, 91, .2);
     1429}
     1430.omg-glow-border::before {
     1431        content: '';
    271432        position: absolute;
    281433        top: 50%;
    291434        left: 50%;
    30         visibility: visible;
    31         -webkit-transform: translate(-50%,-50%);
    32         transform: translate(-50%,-50%);
    33 }
    34 .spinning a.do-it {
    35         visibility: hidden;
    36 }
    37 .whizzie-menu li.step {
    38         visibility: hidden;
    39 }
    40 .whizzie-menu li.active-step {
    41         visibility: visible;
    42 }
    43 .loaded .whizzie-menu li.step {
    44         visibility: visible;
    45         display: none;
    46 }
    47 .loaded .whizzie-menu li.active-step {
    48         display: list-item;
    49 }
    50 .spinning .spinner {
    51         visibility: visible;
    52         float: none;
    53         text-align: center;
    54 }
    55 .button-wrap {
    56         display: inline-block;
    57         margin: 1em 0;
    58 }
    59 .whizzie-menu .detail ul {
     1435        z-index: -2;
     1436        width: 250%;
     1437        aspect-ratio: 1;
     1438        background: conic-gradient(from 0deg, var(--omg-pink), #ff8a00, #ffd23f, #7b2ff7, var(--omg-blue), var(--omg-pink));
     1439        transform: translate(-50%, -50%);
     1440        animation: omg-rotate 4s linear infinite;
     1441}
     1442.omg-glow-border::after {
     1443        content: '';
     1444        position: absolute;
     1445        inset: 3px;
     1446        z-index: -1;
     1447        border-radius: calc(var(--omg-radius) - 3px);
     1448        background: radial-gradient(90% 60% at 100% 0%, #fff0f5, transparent 60%), var(--omg-surface);
     1449}
     1450
     1451/* Focus mode: only the setup card until the demo is imported
     1452--------------------------------------------- */
     1453.omg-layout {
     1454        position: relative;
     1455}
     1456.omg-wrap > :not(.omg-layout),
     1457.omg-main {
     1458        transition: filter .6s var(--omg-ease), opacity .6s var(--omg-ease);
     1459}
     1460.omg-wrap.is-focus > :not(.omg-layout),
     1461.omg-wrap.is-focus .omg-main {
     1462        filter: blur(5px) grayscale(.15);
     1463        opacity: .45;
     1464        pointer-events: none;
     1465        user-select: none;
     1466}
     1467.omg-setup {
     1468        transition: box-shadow .5s var(--omg-ease), border-color .5s;
     1469}
     1470.omg-wrap.is-focus .omg-setup {
     1471        z-index: 2;
     1472        border-color: var(--omg-blue);
     1473        box-shadow: 0 0 0 5px rgba(37, 70, 224, .14), 0 24px 60px rgba(17, 19, 24, .16);
     1474}
     1475.omg-kicker--blue {
     1476        color: var(--omg-blue);
     1477}
     1478.omg-focus-tip {
     1479        position: absolute;
     1480        top: 22px;
     1481        left: calc(360px + 36px);
     1482        z-index: 3;
     1483        width: 330px;
     1484        padding: 22px;
     1485        border: 1px solid var(--omg-border);
     1486        border-radius: var(--omg-radius);
     1487        background: var(--omg-surface);
     1488        box-shadow: 0 22px 54px rgba(17, 19, 24, .2);
     1489        animation: omg-pop .5s var(--omg-ease) .3s both;
     1490        transition: opacity .35s, transform .35s var(--omg-ease);
     1491}
     1492/* Arrow pointing at the setup card */
     1493.omg-focus-tip::before {
     1494        content: '';
     1495        position: absolute;
     1496        top: 34px;
     1497        left: -8px;
     1498        width: 15px;
     1499        height: 15px;
     1500        border-left: 1px solid var(--omg-border);
     1501        border-bottom: 1px solid var(--omg-border);
     1502        background: var(--omg-surface);
     1503        transform: rotate(45deg);
     1504}
     1505.omg-focus-tip.is-leaving {
     1506        opacity: 0;
     1507        transform: translateY(-8px) scale(.97);
     1508}
     1509.omg-focus-tip__icon {
     1510        display: grid;
     1511        place-items: center;
     1512        width: 40px;
     1513        height: 40px;
     1514        margin-bottom: 12px;
     1515        border-radius: 12px;
     1516        background: linear-gradient(135deg, #7b2ff7, var(--omg-blue));
     1517        color: #fff;
     1518        font-size: 20px;
     1519        box-shadow: 0 8px 18px rgba(91, 60, 240, .3);
     1520}
     1521.omg-wrap .omg-focus-tip__title {
     1522        margin: 0 0 8px;
     1523        color: var(--omg-ink);
     1524        font-size: 18px;
     1525        font-weight: 800;
     1526}
     1527.omg-focus-tip__text {
     1528        margin: 0 0 16px;
     1529        color: var(--omg-muted);
     1530        font-size: 13.5px;
     1531        line-height: 1.6;
     1532}
     1533.omg-focus-tip__actions {
     1534        display: flex;
     1535        align-items: center;
     1536        gap: 12px;
     1537}
     1538.omg-focus-tip__actions .omg-btn {
     1539        min-height: 38px;
     1540}
     1541.omg-focus-tip__actions .omg-skip {
    601542        margin: 0;
    61         background-color: #fff;
    62 }
    63 
    64 ul.whizzie-nav {
    65     list-style: none;
    66     display: webkit-flex;
    67     justify-content: space-evenly;
    68     margin: 45px 27px 45px 0;
    69     display: flex;
    70     position: absolute;
    71     width: 100%;
    72     top: 40px;
    73 }
    74 ul.whizzie-nav li {
    75     opacity: 1;
    76     transition: all 0.25s;
    77     margin: -5px 0 0px 0;
    78 }
    79 ul.whizzie-nav li.active-step .step-number {
    80         background-color: #2271B1;
    81 }
    82 
    83 ul.whizzie-nav li.done-step span {
    84     background: #000;
    85 }
    86 ul.whizzie-nav .step-number {
    87     font-size: 20px;
    88     background: #C5C5C5;
    89     padding: 15px 20px;
    90     border-radius: 50%;
    91     color: white !important;
    92 }
    93 .whizzie-wrap.loaded .summary p{
    94         font-size: 16px;
    95 }
    96 ul.whizzie-nav {
    97     list-style: none;
    98     display: webkit-flex;
    99     justify-content: space-between;
    100     margin: 45px 27px 45px 0;
    101     display: flex;
    102     position: absolute;
    103     width: 100%;
    104     top: 50px;
    105 }
    106 
    107 /* ------- Setup Guid --------- */
    108 li.step {
    109     text-align: center;
    110 }
    111 #training-institute-academy-demo-setup-guid .training-institute-academy-setup-dots{
    112         text-align: center;
    113         padding-top: 25px;
    114 }
    115 #training-institute-academy-demo-setup-guid ol li{
    116         list-style: decimal;
    117         font-size: 15px;
    118         font-weight: 600;
    119 }
    120 #training-institute-academy-demo-setup-guid h4{
    121         font-size: 17px;
    122 }
    123 #training-institute-academy-demo-setup-guid h3{
    124         font-weight: 900;
    125         font-size: 19px;
    126 }
    127 #training-institute-academy-demo-setup-guid h3:before{
    128         content: "\f155";
    129         font-family: dashicons;
    130         font-weight: 400;
    131         display: inline-block;
    132         position: relative;
    133     top: 2px;
    134     padding-right: 6px;
    135 }
    136 #training-institute-academy-demo-setup-guid p{
    137         font-size: 15px;
    138 }
    139 #training-institute-academy-demo-setup-guid .training-institute-academy-setup-social-icon{
    140         display: none;
    141 }
    142 /*---------------Additional CSS----------------*/
    143 .appearance_page_traininginstituteacademy-wizard h1 {
    144         display: none;
    145 }
    146 .appearance_page_traininginstituteacademy-wizard h2 {
    147     text-align: center;
    148     margin-bottom: 20px;
    149     color: #000000;
    150     font-weight: 700;
    151     font-size: 30px;
    152 }
    153 .demo_content {
    154     width: 75%;
    155     text-align: left;
    156     font-size: 12px;
    157     margin-right: 3%;
    158     position: relative;
    159 }
    160 .demo_content_image {
    161     display: flex;
    162     align-items: flex-start;
    163 }
    164 .homepage-setup-links {
    165     width: 100%;
    166     text-align: center;
    167 }
    168 .homepage-setup-links.buttons a,.btnsss a{
    169         font-size: 16px;
    170         font-weight: 600;
    171         padding: 0 20px;
    172         border-radius: 0;
    173 }
    174 
    175 
    176 .customize_div.finish {
    177     display: flex;
    178     justify-content: center;
    179     gap: 0 120px;
    180     align-items: center;
    181 }
    182 .customize_div.finish.btns {
    183     flex-direction: column;
    184 }
    185 .btnsss {
    186     display: grid;
    187     align-items: center;
    188     justify-content: center;
    189     grid-gap: 25px;
    190 }
    191 .btnsss a {
    192     padding: 5px 35px !important;
    193     border-radius: 0 !important;
    194 }
    195 .customize_div.finish.btns h3 {
    196     font-size: 30px !important;
    197     margin-bottom: 50px;
    198     margin-top: 0;
    199 }
    200 .training-institute-academy-setup-finish img {
    201     width: 100%;
    202     max-width: 400px;
    203 }
    204 .whizzie-menu h2 {
    205     font-size: 30px;
    206     font-weight: 700;
    207     line-height: 35px;
    208     margin-bottom: 140px;
    209 }
    210 .homepage-setup-links {
    211     margin-top: 60px;
    212 }
    213 .blank-border {
    214     position: absolute;
    215     border: 4px solid #C5C5C5;
    216     width: 97%;
    217     z-index: -1;
    218 }
    219 .homepage-setup-links.buttons {
    220     display: grid;
    221     grid-template-columns: 1fr 1fr 1fr 1fr;
    222     grid-gap: 30px;
    223     place-content: center;
    224 }
    225 
    226 
    227 .homepage-setup-theme-bundle-three img {
    228     height: 180px;
    229     object-fit: cover;
    230     width: 100%;
    231 }
    232 .homepage-setup-theme-buynow-two img {
    233     object-fit: cover;
    234     width: 100%;
    235 }
    236 .homepage-setup-theme-bundle-one h1 {
    237     display: block;
    238     font-size: 35px;
    239     color: #000;
    240     font-weight: 600;
    241     padding-top: 0;
    242 }
    243 .homepage-setup-theme-bundle-one p,.homepage-setup-theme-buynow-three p {
    244     font-size: 16px;
    245     color: #000;
    246     font-weight: 400;
    247     margin: 0;
    248 }
    249 .homepage-setup-theme-bundle-one p span,.homepage-setup-theme-buynow-three p span{
    250         color: #FF1B82;
    251         font-weight: 600;
    252 }
    253 .homepage-setup {
    254     background: #fff;
    255     padding: 10px;
    256     border-radius: 10px;
    257     box-shadow: 0px 0px 10px 10px #00000009;
    258 }
    259 .homepage-setup-theme-bundle {
    260     display: flex;
    261         align-items: center;
    262     padding: 10px;
    263     border-radius: 10px;
    264         border: 4px solid #FF1B82;
    265 }
    266 .homepage-setup-theme-bundle-one {
    267     width: 25%;
    268     padding-left: 20px;
    269     border-left: 5px solid #000;
    270 }
    271 
    272 .homepage-setup-theme-bundle-two{
    273         width: 10%;
    274 }
    275 
    276 .homepage-setup-theme-bundle-three{
    277         width: 50%;
    278         padding: 0 30px;
    279 }
    280 
    281 .homepage-setup-theme-bundle-four{
    282         width: 15%;
    283         text-align: center;
    284 }
    285 
    286 .homepage-setup-theme-bundle-two p {
    287     font-size: 20px;
    288     background: linear-gradient(180deg, #FF1980 0%, #FF685A 100%);
    289     border-radius: 50%;
    290     padding: 30px 14px;
    291     display: flex;
    292     flex-direction: column;
    293     justify-content: center;
    294     align-items: center;
    295     color: #fff;
    296     outline: 2px solid #fff;
    297     outline-offset: -7px;
    298     font-weight: 600;
    299     margin: 0;
    300 }
    301 .homepage-setup-theme-bundle-two p span {
    302     font-size: 40px;
    303     font-weight: 900;
    304     line-height: 35px;
    305 }
    306 
    307 .homepage-setup-theme-bundle-four p span {
    308     font-size: 30px;
    309     text-decoration: line-through;
    310     font-weight: 400;
    311 }
    312 .homepage-setup-theme-bundle-four p {
    313     color: #000;
    314     font-size: 54px;
    315     font-weight: 600;
    316     margin: 0 0 15px;
    317 }
    318 
    319 .homepage-setup-theme-bundle-four a {
    320     font-size: 22px;
    321     background: linear-gradient(180deg, #FF1980 0%, #FF685A 100%);
    322     border-radius: 10px;
    323     padding: 15px 35px;
    324     color: #fff;
    325     font-weight: 600;
    326     text-decoration: none;
    327     margin: 0 auto;
    328     text-align: center;
    329 }
    330 
    331 
    332 
    333 .homepage-setup-image {
    334     width: 25%;
    335 }
    336 .homepage-setup-theme-buynow {
    337     display: flex;
    338     flex-direction: column;
    339     justify-content: center;
    340     padding: 15px;
    341     border-radius: 10px;
    342     box-shadow: 0px 0px 10px 10px #00000009;
    343     background: #fff;
    344         position: relative;
    345 }
    346 
    347 .homepage-setup-theme-buynow-one h1 {
    348     color: #000;
    349     font-weight: 600;
    350     font-size: 28px;
    351     display: block;
    352     padding-top: 70px;
    353 }
    354 .homepage-setup-theme-buynow-three {
    355     text-align: center;
    356 }
    357 .homepage-setup-theme-buynow-three p {
    358     font-size: 17px;
    359     color: #000;
    360     font-weight: 400;
    361     margin: 10px 0 0 0;
    362     line-height: 18px;
    363 }
    364 .homepage-setup-theme-buynow-four a {
    365     font-size: 18px;
    366     color: #fff;
    367     padding: 10px;
    368     font-weight: 600;
    369     text-decoration: none;
    370 }
    371 .homepage-setup-theme-buynow-four {
    372     background: linear-gradient(180deg, #FF1980 0%, #FF685A 100%);
    373     border-radius: 10px;
    374     padding: 10px;
    375     margin-top: 30px;
    376     text-align: center;
    377 }
    378 
    379 .homepage-setup-theme-buynow-one p {
    380     box-shadow: 0px 0px 8px 4px #00000020;
    381     border-radius: 0px 0px 8px 10px;
    382     font-size: 12px;
    383     background: linear-gradient(180deg, #FF1980 0%, #FF685A 100%);
    384     display: flex;
    385     flex-direction: column;
    386     justify-content: center;
    387     align-items: center;
    388     color: #fff;
    389     outline: 2px solid #fff;
    390     outline-offset: -8px;
    391     font-weight: 500;
    392     margin: 0;
    393     outline-style: dashed;
    394     position: absolute;
    395     top: 0;
    396     right: 15px;
    397     padding: 15px;
    398 }
    399 
    400 .homepage-setup-theme-buynow-one p span {
    401     font-size: 30px;
    402     margin: 0;
    403     line-height: 30px;
    404 }
    405 
    406 @media screen and (max-width: 1500px) {
    407         .homepage-setup-theme-bundle-two p {
     1543}
     1544
     1545/* Motion
     1546--------------------------------------------- */
     1547@keyframes omg-rise {
     1548        from { opacity: 0; transform: translateY(10px); }
     1549        to { opacity: 1; transform: translateY(0); }
     1550}
     1551@keyframes omg-spin {
     1552        to { transform: rotate(360deg); }
     1553}
     1554@keyframes omg-pop {
     1555        from { opacity: 0; transform: translateX(-10px) scale(.96); }
     1556        to { opacity: 1; transform: translateX(0) scale(1); }
     1557}
     1558@keyframes omg-rotate {
     1559        to { transform: translate(-50%, -50%) rotate(360deg); }
     1560}
     1561@keyframes omg-shine {
     1562        0% { left: -60%; }
     1563        55%, 100% { left: 130%; }
     1564}
     1565@keyframes omg-live {
     1566        0% { box-shadow: 0 0 0 0 rgba(61, 255, 154, .7); }
     1567        70% { box-shadow: 0 0 0 7px rgba(61, 255, 154, 0); }
     1568        100% { box-shadow: 0 0 0 0 rgba(61, 255, 154, 0); }
     1569}
     1570@keyframes omg-pulse {
     1571        0%, 100% { transform: scale(1); }
     1572        50% { transform: scale(1.06); }
     1573}
     1574@media (prefers-reduced-motion: reduce) {
     1575        .omg-wrap *,
     1576        .omg-notice,
     1577        .omg-notice * {
     1578                animation: none !important;
     1579                transition: none !important;
     1580        }
     1581}
     1582
     1583/* Responsive
     1584--------------------------------------------- */
     1585@media (max-width: 1280px) {
     1586        .omg-promos,
     1587        .omg-info {
     1588                grid-template-columns: 1fr;
     1589        }
     1590}
     1591@media (max-width: 1080px) {
     1592        .omg-layout {
     1593                grid-template-columns: 1fr;
     1594        }
     1595        .omg-focus-tip {
     1596                position: relative;
     1597                top: auto;
     1598                left: auto;
     1599                order: -1;
     1600                width: auto;
     1601        }
     1602        .omg-focus-tip::before {
     1603                top: auto;
     1604                bottom: -8px;
     1605                left: 40px;
     1606                transform: rotate(-45deg);
     1607        }
     1608}
     1609@media (max-width: 782px) {
     1610        .omg-wrap {
     1611                margin: 16px 10px 0 0;
     1612        }
     1613        .omg-wrap .omg-title {
     1614                font-size: 24px;
     1615        }
     1616        .omg-header {
     1617                align-items: flex-start;
     1618                flex-direction: column;
     1619        }
     1620        .omg-layout,
     1621        .omg-main,
     1622        .omg-promos,
     1623        .omg-info {
     1624                gap: 16px;
     1625        }
     1626        .omg-hero {
     1627                grid-template-columns: 1fr;
     1628                gap: 20px;
     1629        }
     1630        .omg-hero__media {
     1631                order: -1;
     1632        }
     1633        .omg-hero__media img {
     1634                width: 100%;
     1635                height: auto;
     1636        }
     1637        .omg-wrap .omg-hero__title {
     1638                font-size: 24px;
     1639        }
     1640        .omg-footer {
     1641                flex-direction: column;
     1642        }
     1643        .notice.omg-notice {
     1644                margin-right: 10px;
     1645        }
     1646        .omg-notice__media {
     1647                display: none;
     1648        }
     1649}
     1650@media (max-width: 480px) {
     1651        .omg-card,
     1652        .omg-pro,
     1653        .omg-bundle {
     1654                padding: 18px;
     1655        }
     1656        .omg-card.omg-glow-border {
     1657                padding: 21px;
     1658        }
     1659        .omg-wrap .omg-title {
     1660                font-size: 21px;
     1661        }
     1662        .omg-wrap .omg-pro__title,
     1663        .omg-wrap .omg-bundle__title {
     1664                font-size: 19px;
     1665        }
     1666        .omg-wrap .omg-pro__title {
     1667                max-width: 75%;
     1668        }
     1669        .omg-pro__ribbon {
     1670                top: 18px;
     1671                right: -54px;
     1672                font-size: 10.5px;
     1673        }
     1674        .omg-pro__previews {
     1675                gap: 6px;
     1676                padding: 6px;
     1677        }
     1678        .omg-pro__preview-label {
     1679                left: 4px;
     1680                bottom: 4px;
     1681                padding: 2px 6px;
     1682                font-size: 9px;
     1683        }
     1684        .omg-pro__price strong,
     1685        .omg-price strong {
     1686                font-size: 28px;
     1687        }
     1688        .omg-hero__actions .omg-btn {
     1689                flex: 1 1 100%;
     1690        }
     1691        .omg-bundle__seal {
     1692                width: 60px;
     1693                height: 60px;
     1694        }
     1695        .omg-bundle__seal b {
    4081696                font-size: 18px;
    409                 padding: 20px 15px;
    410         }
    411         .homepage-setup-theme-bundle-four p {
    412                 font-size: 45px;
    413         }
    414         .homepage-setup-theme-bundle-four a {
    415                 font-size: 18px;
    416                 padding: 15px 20px;
    417         }
    418         .homepage-setup-theme-buynow-four a {
    419                 font-size: 16px;
    420         }
    421         .homepage-setup-theme-buynow-one p span {
    422                 font-size: 25px;
    423                 line-height: 25px;
    424         }
    425         .homepage-setup-theme-buynow-one p {
    426                 right: 10px;
    427                 padding: 12px;
    428         }
    429 }
    430 
    431 @media screen and (max-width: 1100px) {
    432         .homepage-setup-theme-bundle {
    433                 display: grid;
    434                 grid-template-columns: 1fr 1fr;
    435         }
    436         .homepage-setup-theme-bundle-one,.homepage-setup-theme-bundle-three{
    437                 width: 90%;
    438         }
    439         .homepage-setup-theme-bundle-two p {
    440         font-size: 18px;
    441         padding: 25px 20px;
    442     }
    443         .homepage-setup-image {
    444                 width: 35%;
    445         }
    446         .demo_content {
    447                 width: 65%;
    448         }
    449         .homepage-setup-theme-bundle-two,.homepage-setup-theme-bundle-four{
     1697        }
     1698        .omg-expert {
     1699                padding: 16px;
     1700        }
     1701        .omg-links__grid,
     1702        .omg-chips {
     1703                grid-template-columns: 1fr;
     1704        }
     1705        .omg-header__actions {
    4501706                width: 100%;
    4511707        }
    452         .homepage-setup-theme-bundle {
    453         display: grid;
    454         grid-template-columns: auto auto;
    455     }
    456     ul.whizzie-nav {
    457                 top: 90px;
    458         }
    459         .homepage-setup-links.buttons {
    460                 grid-template-columns: 1fr 1fr;
    461         }
    462 }
    463 @media screen and (max-width: 600px) {
    464     ul.whizzie-nav {
    465         top: 55px;
    466     }
    467         .homepage-setup-links.buttons {
    468                 grid-template-columns: 1fr;
    469         }
    470         .whizzie-menu h2 {
    471                 font-size: 22px;
    472                 line-height: 25px;
    473                 margin-bottom: 100px;
    474         }
    475         ul.whizzie-nav .step-number {
    476                 padding: 10px 15px;
    477         }
    478         .demo_content_image {
    479                 display: block;
    480         }
    481         .demo_content {
    482                 width: 100%;
    483         }
    484         .homepage-setup-theme-bundle {
    485         grid-template-columns: auto;
    486         padding-bottom: 40px;
    487     }
    488         .homepage-setup-theme-bundle-two {
    489                 margin: 10px 0;
    490         }
    491         .homepage-setup-image {
    492         width: 100%;
    493     }
    494         .homepage-setup-theme-buynow {
    495                 margin-top: 50px;
    496         }
    497     .homepage-setup-theme-bundle-two p {
    498         width: 120px;
    499         margin: 0 auto;
    500     }
    501         .homepage-setup-theme-bundle-one, .homepage-setup-theme-bundle-three {
    502         width: 100%;
    503     }
    504         .homepage-setup-theme-bundle-three {
    505         padding: 0;
    506     }
    507         .homepage-setup-theme-bundle-one {
    508                 padding-left: 5px;
    509         }
    510         .homepage-setup-theme-bundle-four p {
    511         font-size: 40px;
    512     }
    513 }
    514 .notice-content {
    515     padding: 0px 10px 20px 15px;
    516 }
    517 .welcome a{
    518     font-size: 21px;
    519     padding: 8px 17px 38px;
    520 }
    521 .notice p.dismiss-link {
    522     position: absolute;
    523     top: 10px;
    524     right: 10px;
    525     margin: 0;
    526     padding: 0;
    527 }
    528 .notice {
    529     position: relative;
    530 }
    531 .info-link a{
    532     padding: 3px 27px;
    533     font-size: 13px;
    534     background: #2271b1;
    535     border:1px solid #2271b1;
    536     color: #fff;
    537     text-decoration: none;
    538     text-shadow: none;
    539     display: inline-block;
    540     line-height: 2.15384615;
    541     border-radius: 3px;
    542     cursor: pointer;
    543 }
     1708        .omg-header__actions .omg-btn {
     1709                flex: 1;
     1710        }
     1711}
     1712@media (max-width: 360px) {
     1713        .omg-header__actions {
     1714                flex-direction: column;
     1715        }
     1716        .omg-compare__table th:not(:first-child),
     1717        .omg-compare__table td:not(:first-child) {
     1718                width: 44px;
     1719        }
     1720        .omg-pro__preview-label {
     1721                font-size: 8px;
     1722        }
     1723}
  • training-institute-academy/1.3.7/inc/homepage-setup/assets/js/homepage-setup-script.js

    r263116 r356311  
    1 var Training_Institute_Academy_Whizzie = (function($){
    2     var t;
    3         var current_step = '';
    4         var step_pointer = '';
    5 
    6     // callbacks from form button clicks.
    7     var callbacks = {
    8                 training_institute_academy_do_next_step: function( btn ) {
    9                         training_institute_academy_do_next_step( btn );
    10                 },
    11                 training_institute_academy_install_widgets: function( btn ) {
    12                         var widgets = new training_institute_academy_WidgetManager();
    13                         widgets.init( btn );
    14                 },
    15         training_institute_academy_install_content: function(btn){
    16             var content = new training_institute_academy_ContentManager();
    17             content.init( btn );
    18         }
    19     };
    20 
    21     function training_institute_academy_window_loaded() {
    22                 var maxHeight = 0;
    23                
    24                 $( '.whizzie-menu li.step' ).each( function( index ) {
    25                         $(this).attr( 'data-height', $(this).innerHeight() );
    26                         if( $(this).innerHeight() > maxHeight ) {
    27                                 maxHeight = $(this).innerHeight();
    28                         }
    29                 });
    30                
    31                 $( '.whizzie-menu li .detail' ).each( function( index ) {
    32                         $(this).attr( 'data-height', $(this).innerHeight() );
    33                         $(this).addClass( 'scale-down' );
    34                 });
    35                
    36 
    37                 $( '.whizzie-menu li.step' ).css( 'height', '100%' );
    38                 $( '.whizzie-menu li.step:first-child' ).addClass( 'active-step' );
    39                 $( '.whizzie-nav li:first-child' ).addClass( 'active-step' );
    40                
    41                 $( '.whizzie-wrap' ).addClass( 'loaded' );
    42                
    43         // init button clicks:
    44         $('.do-it').on( 'click', function(e) {
    45                         e.preventDefault();
    46                         step_pointer = $(this).data('step');
    47                         current_step = $('.step-' + $(this).data('step'));
    48                         $('.whizzie-wrap').addClass( 'spinning' );
    49             if($(this).data('callback') && typeof callbacks[$(this).data('callback')] != 'undefined'){
    50                 // we have to process a callback before continue with form submission
    51                 callbacks[$(this).data('callback')](this);
    52                 return false;
    53             } else {
    54                 training_institute_academy_loading_content();
    55                 return true;
    56             }
    57         });
    58         $('.button-upload').on( 'click', function(e) {
    59             e.preventDefault();
    60             renderMediaUploader();
    61         });
    62         $('.theme-presets a').on( 'click', function(e) {
    63             e.preventDefault();
    64             var $ul = $(this).parents('ul').first();
    65             $ul.find('.current').removeClass('current');
    66             var $li = $(this).parents('li').first();
    67             $li.addClass('current');
    68             var newcolor = $(this).data('style');
    69             $('#new_style').val(newcolor);
    70             return false;
    71         });
    72     }
    73 
    74     function training_institute_academy_loading_content(){}
    75        
    76     function training_institute_academy_do_next_step( btn ) {
    77                 current_step.removeClass( 'active-step' );
    78                 $( '.nav-step-' + step_pointer ).removeClass( 'active-step' );
    79                 current_step.addClass( 'done-step' );
    80                 $( '.nav-step-' + step_pointer ).addClass( 'done-step' );
    81                 current_step.fadeOut( 500, function() {
    82                         current_step = current_step.next();
    83                         step_pointer = current_step.data( 'step' );
    84                         current_step.fadeIn();
    85                         current_step.addClass( 'active-step' );
    86                         $( '.nav-step-' + step_pointer ).addClass( 'active-step' );
    87                         $('.whizzie-wrap').removeClass( 'spinning' );
    88                 });
    89     }
    90        
    91         function training_institute_academy_WidgetManager() {
    92                 function training_institute_academy_import_widgets(){
    93             jQuery.post(
    94                                 whizzie_params.ajaxurl,
    95                                 {
    96                                         action: 'training_institute_academy_setup_widgets',
    97                                         wpnonce: whizzie_params.wpnonce
    98                                 },
    99                                 complete
    100                         );
     1/**
     2 * Getting Started page: setup steps, plugin installer, demo import,
     3 * coupon copy buttons and the welcome notice dismiss.
     4 */
     5( function ( $ ) {
     6        'use strict';
     7
     8        var params = window.training_institute_academy_setup || {};
     9        var i18n = params.i18n || {};
     10
     11        var Setup = {
     12
     13                init: function () {
     14                        this.$root = $( '#omg-setup' );
     15                        if ( ! this.$root.length ) {
     16                                return;
     17                        }
     18                        this.total = parseInt( this.$root.data( 'total' ), 10 ) || this.$root.find( '.omg-step' ).length;
     19
     20                        this.$root.on( 'click', '.omg-step__head', this.onToggle.bind( this ) );
     21                        this.$root.on( 'click', '[data-omg-complete]', this.onComplete.bind( this ) );
     22                        this.$root.on( 'change', '.omg-plugin__check', this.updatePluginCount.bind( this ) );
     23                        this.$root.on( 'click', '.omg-install-plugins', this.installPlugins.bind( this ) );
     24                        this.$root.on( 'click', '.omg-import-demo', this.importDemo.bind( this ) );
     25
     26                        this.updatePluginCount();
     27                },
     28
     29                // Accordion: only one step open at a time.
     30                openStep: function ( $step ) {
     31                        this.$root.find( '.omg-step.is-open' ).not( $step ).removeClass( 'is-open' )
     32                                .find( '.omg-step__head' ).attr( 'aria-expanded', 'false' );
     33                        $step.addClass( 'is-open' ).find( '.omg-step__head' ).attr( 'aria-expanded', 'true' );
     34                },
     35
     36                closeStep: function ( $step ) {
     37                        $step.removeClass( 'is-open' ).find( '.omg-step__head' ).attr( 'aria-expanded', 'false' );
     38                },
     39
     40                onToggle: function ( e ) {
     41                        var $step = $( e.currentTarget ).closest( '.omg-step' );
     42                        if ( $step.hasClass( 'is-open' ) ) {
     43                                this.closeStep( $step );
     44                        } else {
     45                                this.openStep( $step );
     46                        }
     47                },
     48
     49                onComplete: function ( e ) {
     50                        var $el = $( e.currentTarget );
     51                        // Links (e.g. "View your site") keep opening normally.
     52                        if ( ! $el.is( 'a' ) ) {
     53                                e.preventDefault();
     54                        }
     55                        this.completeStep( $el.data( 'omg-complete' ), true );
     56                },
     57
     58                /**
     59                 * Mark a step done, then move on to the next unfinished one.
     60                 *
     61                 * @param {string}  id   Step id.
     62                 * @param {boolean} save Store it on the server (imports save themselves).
     63                 */
     64                completeStep: function ( id, save ) {
     65                        var self = this;
     66                        var $step = this.$root.find( '.omg-step[data-step="' + id + '"]' );
     67
     68                        if ( save ) {
     69                                $.post( params.ajaxurl, { action: 'training_institute_academy_setup_step', wpnonce: params.wpnonce, step: id } );
     70                        }
     71
     72                        $step.addClass( 'is-done' );
     73                        this.updateProgress();
     74                        $( document ).trigger( 'omg:step-complete', [ id ] );
     75
     76                        window.setTimeout( function () {
     77                                var $next = $step.nextAll( '.omg-step:not(.is-done)' ).first();
     78                                if ( ! $next.length ) {
     79                                        $next = self.$root.find( '.omg-step:not(.is-done)' ).first();
     80                                }
     81                                if ( $next.length ) {
     82                                        self.openStep( $next );
     83                                } else {
     84                                        self.closeStep( $step );
     85                                }
     86                        }, 450 );
     87                },
     88
     89                updateProgress: function () {
     90                        var done = this.$root.find( '.omg-step.is-done' ).length;
     91                        var pct = Math.max( 3, Math.round( done / this.total * 100 ) );
     92
     93                        this.$root.find( '.omg-setup__done' ).text( done );
     94                        this.$root.find( '.omg-progress' ).attr( 'aria-valuenow', done );
     95                        this.$root.find( '.omg-progress__bar' ).css( 'width', pct + '%' );
     96                        this.$root.toggleClass( 'is-complete', done >= this.total );
     97                },
     98
     99                showError: function ( $step, message ) {
     100                        $step.find( '.omg-step__error' ).text( message ).prop( 'hidden', ! message );
     101                },
     102
     103                setBusy: function ( $btn, busy, label ) {
     104                        $btn.toggleClass( 'is-busy', busy ).prop( 'disabled', busy );
     105                        if ( label ) {
     106                                $btn.find( '.omg-btn__label' ).text( label );
     107                        }
     108                },
     109
     110                /* Plugins
     111                --------------------------------------------- */
     112
     113                pendingPlugins: function () {
     114                        return this.$root.find( '.omg-plugin:not(.is-ready)' ).filter( function () {
     115                                return $( this ).find( '.omg-plugin__check' ).is( ':checked' );
     116                        } );
     117                },
     118
     119                updatePluginCount: function () {
     120                        var count = this.pendingPlugins().length;
     121                        var $btn = this.$root.find( '.omg-install-plugins' );
     122                        $btn.find( '.omg-btn__count' ).text( '(' + count + ')' );
     123                        if ( ! $btn.hasClass( 'is-busy' ) ) {
     124                                $btn.prop( 'disabled', ! count );
     125                        }
     126                },
     127
     128                setPluginStatus: function ( $item, state, text ) {
     129                        $item.find( '.omg-plugin__status' )
     130                                .attr( 'class', 'omg-plugin__status omg-plugin__status--' + state )
     131                                .text( text );
     132                },
     133
     134                /**
     135                 * Install / update / activate one plugin through TGMPA.
     136                 * Our ajax handler returns the next TGMPA action until the plugin is active.
     137                 */
     138                installPlugin: function ( $item ) {
     139                        var self = this;
     140                        var deferred = $.Deferred();
     141                        var lastHash = '';
     142
     143                        function fail() {
     144                                $item.removeClass( 'is-working' );
     145                                self.setPluginStatus( $item, 'failed', i18n.failed );
     146                                deferred.reject();
     147                        }
     148
     149                        function request() {
     150                                $.post( params.ajaxurl, {
     151                                        action: 'setup_plugins',
     152                                        wpnonce: params.wpnonce,
     153                                        slug: $item.data( 'slug' )
     154                                } ).done( handle ).fail( fail );
     155                        }
     156
     157                        function handle( response ) {
     158                                if ( ! response || 'object' !== typeof response ) {
     159                                        return fail();
     160                                }
     161                                if ( response.done ) {
     162                                        $item.removeClass( 'is-working' ).addClass( 'is-ready' );
     163                                        $item.find( '.omg-plugin__check' ).prop( 'disabled', true );
     164                                        self.setPluginStatus( $item, 'active', i18n.active );
     165                                        return deferred.resolve();
     166                                }
     167                                // Same action twice in a row means TGMPA could not finish it.
     168                                if ( ! response.url || response.hash === lastHash ) {
     169                                        return fail();
     170                                }
     171                                lastHash = response.hash;
     172                                self.setPluginStatus( $item, 'working', response.message || i18n.installing );
     173                                $.post( response.url, response ).always( request );
     174                        }
     175
     176                        $item.addClass( 'is-working' );
     177                        this.setPluginStatus( $item, 'working', i18n.installing );
     178                        request();
     179
     180                        return deferred.promise();
     181                },
     182
     183                installPlugins: function ( e ) {
     184                        var self = this;
     185                        var $btn = $( e.currentTarget );
     186                        var $step = $btn.closest( '.omg-step' );
     187                        var queue = this.pendingPlugins().toArray();
     188                        var failed = 0;
     189
     190                        if ( ! queue.length ) {
     191                                return;
     192                        }
     193
     194                        this.showError( $step, '' );
     195                        this.setBusy( $btn, true, i18n.installing );
     196                        $step.find( '.omg-plugin__check, .omg-skip' ).prop( 'disabled', true );
     197
     198                        // One plugin at a time, TGMPA does not like parallel requests.
     199                        ( function next() {
     200                                var item = queue.shift();
     201                                if ( item ) {
     202                                        self.installPlugin( $( item ) ).fail( function () {
     203                                                failed++;
     204                                        } ).always( next );
     205                                        return;
     206                                }
     207
     208                                $step.find( '.omg-skip' ).prop( 'disabled', false );
     209                                $step.find( '.omg-plugin:not(.is-ready) .omg-plugin__check' ).each( function () {
     210                                        // Required plugins stay locked.
     211                                        var required = $( this ).closest( '.omg-plugin' ).find( '.omg-plugin__status--required' ).length;
     212                                        $( this ).prop( 'disabled', !! required );
     213                                } );
     214
     215                                if ( failed ) {
     216                                        self.setBusy( $btn, false, i18n.install );
     217                                        self.updatePluginCount();
     218                                        self.showError( $step, i18n.pluginsErr );
     219                                } else {
     220                                        self.setBusy( $btn, false, i18n.installed );
     221                                        $btn.prop( 'disabled', true ).find( '.omg-btn__count' ).text( '' );
     222                                        self.completeStep( 'plugins', true );
     223                                }
     224                        }() );
     225                },
     226
     227                /* Demo import
     228                --------------------------------------------- */
     229
     230                importDemo: function ( e ) {
     231                        var self = this;
     232                        var $btn = $( e.currentTarget );
     233                        var $step = $btn.closest( '.omg-step' );
     234                        var label = $btn.find( '.omg-btn__label' ).text();
     235                        // Elementor themes queue the Easy Demo Import for Omega Themes requests instead of the theme's own import.
     236                        var queue = ( params.importSteps || [ { action: 'training_institute_academy_setup_widgets', wpnonce: params.wpnonce } ] ).slice();
     237
     238                        function fail( message ) {
     239                                self.setBusy( $btn, false, label );
     240                                self.showError( $step, message || i18n.importErr );
     241                        }
     242
     243                        this.showError( $step, '' );
     244                        this.setBusy( $btn, true, i18n.importing );
     245
     246                        ( function next() {
     247                                var data = queue.shift();
     248                                if ( ! data ) {
     249                                        self.setBusy( $btn, false, i18n.imported );
     250                                        $btn.prop( 'disabled', true );
     251                                        // The theme's own import saves the step itself.
     252                                        self.completeStep( 'demo', false === params.importSaves );
     253                                        return;
     254                                }
     255                                // Read as text: PHP notices from the import should not count as a failure.
     256                                $.ajax( {
     257                                        url: params.ajaxurl,
     258                                        type: 'POST',
     259                                        dataType: 'text',
     260                                        data: data
     261                                } ).done( function ( text ) {
     262                                        var response = parseJson( text );
     263                                        if ( response && false === response.success ) {
     264                                                return fail( 'string' === typeof response.data ? response.data : '' );
     265                                        }
     266                                        next();
     267                                } ).fail( function () {
     268                                        fail( '' );
     269                                } );
     270                        }() );
    101271                }
    102                 return {
    103                         init: function( btn ) {
    104                                 complete = function() {
    105                                         training_institute_academy_do_next_step();
    106                                 }
    107                                 training_institute_academy_import_widgets();
     272        };
     273
     274        /**
     275         * Parse a JSON reply that may have PHP notices printed before it.
     276         *
     277         * @param {string} text Raw response.
     278         * @return {Object|null}
     279         */
     280        function parseJson( text ) {
     281                try {
     282                        return JSON.parse( text );
     283                } catch ( err ) {
     284                        try {
     285                                return JSON.parse( String( text ).replace( /^[\s\S]*?(\{[\s\S]*\})\s*$/, '$1' ) );
     286                        } catch ( err2 ) {
     287                                return null;
    108288                        }
    109289                }
    110290        }
    111291
    112     function training_institute_academy_ContentManager(){
    113 
    114         var complete;
    115         var items_completed = 0;
    116         var current_item = '';
    117         var $current_node;
    118         var current_item_hash = '';
    119 
    120         function ajax_callback(response) {
    121             if(typeof response == 'object' && typeof response.message != 'undefined'){
    122                 $current_node.find('span').text(response.message);
    123                 if(typeof response.url != 'undefined'){
    124                     // we have an ajax url action to perform.
    125                     if(response.hash == current_item_hash){
    126                         $current_node.find('span').text("failed");
    127                         training_institute_academy_find_next();
    128                     }else {
    129                         current_item_hash = response.hash;
    130                         jQuery.post(response.url, response, ajax_callback).fail(ajax_callback); // recuurrssionnnnn
    131                     }
    132                 }else if(typeof response.done != 'undefined'){
    133                     // finished processing this plugin, move onto next
    134                     training_institute_academy_find_next();
    135                 }else{
    136                     // error processing this plugin
    137                     training_institute_academy_find_next();
    138                 }
    139             }else{
    140                 // error - try again with next plugin
    141                 $current_node.find('span').text("ajax error");
    142                 training_institute_academy_find_next();
    143             }
    144         }
    145 
    146         return {
    147             init: function(btn){
    148                 $('.envato-setup-pages').addClass('installing');
    149                 $('.envato-setup-pages').find('input').prop("disabled", true);
    150                 complete = function(){
    151                     training_institute_academy_loading_content();
    152                     window.location.href=btn.href;
    153                 };
    154                 training_institute_academy_find_next();
    155             }
    156         }
    157     }
    158 
    159     return {
    160         init: function(){
    161                         t = this;
    162                         $(training_institute_academy_window_loaded);
    163         },
    164         callback: function(func){
    165             console.log(func);
    166             console.log(this);
    167         }
    168     }
    169 
    170 })(jQuery);
    171 
    172 Training_Institute_Academy_Whizzie.init();
     292        /* Focus mode: only the setup card is usable until the demo is imported
     293        --------------------------------------------- */
     294
     295        var Focus = {
     296
     297                init: function () {
     298                        this.$wrap = $( '.omg-wrap.is-focus' );
     299                        if ( ! this.$wrap.length ) {
     300                                return;
     301                        }
     302                        this.$tip = this.$wrap.find( '.omg-focus-tip' );
     303                        // Keep keyboard users inside the setup card too.
     304                        this.$blurred = this.$wrap.children().not( '.omg-layout' ).add( this.$wrap.find( '.omg-main' ) );
     305                        this.$blurred.attr( 'inert', '' );
     306
     307                        this.$tip.on( 'click', '.omg-focus-ok', this.hideTip.bind( this ) );
     308                        this.$tip.on( 'click', '.omg-focus-exit', this.exit.bind( this ) );
     309                        $( document ).on( 'omg:step-complete', function ( e, id ) {
     310                                if ( 'demo' === id ) {
     311                                        Focus.exit();
     312                                }
     313                        } );
     314
     315                        $( '#omg-setup' )[0].scrollIntoView( { block: 'nearest' } );
     316                },
     317
     318                hideTip: function () {
     319                        var $tip = this.$tip;
     320                        $tip.addClass( 'is-leaving' );
     321                        window.setTimeout( function () {
     322                                $tip.remove();
     323                        }, 350 );
     324                },
     325
     326                exit: function () {
     327                        if ( ! this.$wrap.hasClass( 'is-focus' ) ) {
     328                                return;
     329                        }
     330                        this.hideTip();
     331                        this.$wrap.removeClass( 'is-focus' );
     332                        this.$blurred.removeAttr( 'inert' );
     333
     334                        // Reloading the page should not bring the blur back.
     335                        if ( window.history.replaceState ) {
     336                                window.history.replaceState( null, '', window.location.href.replace( /([?&])omg-focus=1(&|$)/, function ( m, p1, p2 ) {
     337                                        return p2 ? p1 : '';
     338                                } ) );
     339                        }
     340                }
     341        };
     342
     343        /* Coupon copy buttons
     344        --------------------------------------------- */
     345
     346        function copyText( text ) {
     347                if ( navigator.clipboard && window.isSecureContext ) {
     348                        return navigator.clipboard.writeText( text );
     349                }
     350                var $tmp = $( '<textarea readonly>' ).val( text ).css( { position: 'fixed', opacity: 0 } ).appendTo( 'body' );
     351                $tmp[0].select();
     352                try {
     353                        document.execCommand( 'copy' );
     354                } catch ( err ) {}
     355                $tmp.remove();
     356                return $.Deferred().resolve().promise();
     357        }
     358
     359        $( document ).on( 'click', '[data-omg-copy]', function () {
     360                var $btn = $( this );
     361                var original = $btn.data( 'omg-label' ) || $btn.text();
     362                $btn.data( 'omg-label', original );
     363
     364                copyText( String( $btn.data( 'omg-copy' ) ) ).then( function () {
     365                        $btn.addClass( 'is-copied' ).text( i18n.copied );
     366                        window.clearTimeout( $btn.data( 'omg-timer' ) );
     367                        $btn.data( 'omg-timer', window.setTimeout( function () {
     368                                $btn.removeClass( 'is-copied' ).text( original );
     369                        }, 1800 ) );
     370                } );
     371        } );
     372
     373        /* Welcome notice
     374        --------------------------------------------- */
     375
     376        $( document ).on( 'click', '.omg-notice__close', function ( e ) {
     377                var $notice = $( this ).closest( '.omg-notice' );
     378                e.preventDefault();
     379
     380                $.post( params.ajaxurl, { action: 'training_institute_academy_dismiss_notice', nonce: $notice.data( 'nonce' ) } );
     381                $notice.addClass( 'is-leaving' );
     382                window.setTimeout( function () {
     383                        $notice.slideUp( 200, function () {
     384                                $notice.remove();
     385                        } );
     386                }, 250 );
     387        } );
     388
     389        $( function () {
     390                Setup.init();
     391                Focus.init();
     392        } );
     393
     394}( jQuery ) );
  • training-institute-academy/1.3.7/inc/homepage-setup/homepage-setup-contents.php

    r354502 r356311  
    11<?php
    22/**
    3  * Wizard
     3 * Getting Started page and setup wizard
    44 *
    55 * @package Training_Institute_Academy_Whizzie
    6  * @author Catapult Themes
     6 * @author Omega Themes
    77 * @since 1.0.0
    88 */
    99
     10/**
     11 * Setup step ids in the order they are shown.
     12 */
     13function training_institute_academy_setup_step_ids() {
     14        return array( 'plugins', 'demo', 'customize', 'launch' );
     15}
     16
     17/**
     18 * Check whether every plugin registered with TGMPA is active and up to date.
     19 */
     20function training_institute_academy_setup_plugins_ready() {
     21        if ( ! isset( $GLOBALS['tgmpa'] ) ) {
     22                return true;
     23        }
     24        $training_institute_academy_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
     25        foreach ( $training_institute_academy_instance->plugins as $training_institute_academy_slug => $training_institute_academy_plugin ) {
     26                if ( ! $training_institute_academy_instance->is_plugin_active( $training_institute_academy_slug ) || false !== $training_institute_academy_instance->does_plugin_have_update( $training_institute_academy_slug ) ) {
     27                        return false;
     28                }
     29        }
     30        return true;
     31}
     32
     33/**
     34 * Get the completion state of each setup step.
     35 *
     36 * @return array step id => bool
     37 */
     38function training_institute_academy_get_setup_progress() {
     39        $training_institute_academy_saved = (array) get_option( 'training_institute_academy_setup_progress', array() );
     40
     41        // Demo imported before progress tracking existed. Every Omega theme uses frontpage.php, so look for
     42        // the primary menu only this theme's import creates; another theme's demo must not count.
     43        $training_institute_academy_demo_found = (bool) wp_get_nav_menu_object( 'Training Institute Academy Primary Menu' );
     44
     45        return array(
     46                'plugins'   => ! empty( $training_institute_academy_saved['plugins'] ) || training_institute_academy_setup_plugins_ready(),
     47                'demo'      => ! empty( $training_institute_academy_saved['demo'] ) || $training_institute_academy_demo_found,
     48                'customize' => ! empty( $training_institute_academy_saved['customize'] ),
     49                'launch'    => ! empty( $training_institute_academy_saved['launch'] ),
     50        );
     51}
     52
     53/**
     54 * Save a step as done.
     55 *
     56 * @param string $training_institute_academy_step Step id.
     57 */
     58function training_institute_academy_set_setup_step_done( $training_institute_academy_step ) {
     59        if ( ! in_array( $training_institute_academy_step, training_institute_academy_setup_step_ids(), true ) ) {
     60                return;
     61        }
     62        $training_institute_academy_saved = (array) get_option( 'training_institute_academy_setup_progress', array() );
     63        $training_institute_academy_saved[ $training_institute_academy_step ] = true;
     64        update_option( 'training_institute_academy_setup_progress', $training_institute_academy_saved );
     65}
     66
    1067class Training_Institute_Academy_Whizzie {
    11        
    12         protected $version = '1.1.0';
    13        
     68
     69        protected $version = '1.2.0';
     70
    1471        /** @var string Current theme name, used as namespace in actions. */
    1572        protected $training_institute_academy_theme_name = '';
    1673        protected $training_institute_academy_theme_title = '';
    17        
     74
    1875        /** @var string Wizard page slug and title. */
    1976        protected $training_institute_academy_page_slug = '';
    2077        protected $training_institute_academy_page_title = '';
    21        
     78
     79        /** @var string Hook suffix returned by add_theme_page(). */
     80        protected $page_hook = '';
     81
    2282        /** @var array Wizard steps set by user. */
    2383        protected $config_steps = array();
    24        
     84
     85        /**
     86         * Relative plugin url for this plugin folder
     87         * @since 1.0.0
     88         * @var string
     89         */
     90        protected $training_institute_academy_plugin_url = '';
     91
     92        public $training_institute_academy_plugin_path;
    2593        public $parent_slug;
    26        
     94
     95        /**
     96         * TGMPA instance storage
     97         *
     98         * @var object
     99         */
     100        protected $tgmpa_instance;
     101
     102        /**
     103         * TGMPA Menu slug
     104         *
     105         * @var string
     106         */
     107        protected $tgmpa_menu_slug = 'tgmpa-install-plugins';
     108
     109        /**
     110         * TGMPA Menu url
     111         *
     112         * @var string
     113         */
     114        protected $tgmpa_url = 'themes.php?page=tgmpa-install-plugins';
     115
    27116        /**
    28117         * Constructor
    29118         *
    30          * @param $config       Our config parameters
    31          */
    32         public function __construct( $config ) {
    33                 $this->set_vars( $config );
     119         * @param $training_institute_academy_config    Our config parameters
     120         */
     121        public function __construct( $training_institute_academy_config ) {
     122                $this->set_vars( $training_institute_academy_config );
    34123                $this->init();
    35124        }
    36        
     125
    37126        /**
    38127         * Set some settings
    39128         * @since 1.0.0
    40          * @param $config       Our config parameters
    41          */
    42         public function set_vars( $config ) {
    43 
    44                 if( isset( $config['training_institute_academy_page_slug'] ) ) {
    45                         $this->training_institute_academy_page_slug = esc_attr( $config['training_institute_academy_page_slug'] );
    46                 }
    47                 if( isset( $config['training_institute_academy_page_title'] ) ) {
    48                         $this->training_institute_academy_page_title = esc_attr( $config['training_institute_academy_page_title'] );
    49                 }
    50                 if( isset( $config['steps'] ) ) {
    51                         $this->config_steps = $config['steps'];
    52                 }
    53 
     129         * @param $training_institute_academy_config    Our config parameters
     130         */
     131        public function set_vars( $training_institute_academy_config ) {
     132
     133                require_once trailingslashit( WHIZZIE_DIR ) . 'tgm/class-tgm-plugin-activation.php';
     134                require_once trailingslashit( WHIZZIE_DIR ) . 'tgm/tgm.php';
     135
     136                if( isset( $training_institute_academy_config['training_institute_academy_page_slug'] ) ) {
     137                        $this->training_institute_academy_page_slug = esc_attr( $training_institute_academy_config['training_institute_academy_page_slug'] );
     138                }
     139                if( isset( $training_institute_academy_config['training_institute_academy_page_title'] ) ) {
     140                        $this->training_institute_academy_page_title = esc_attr( $training_institute_academy_config['training_institute_academy_page_title'] );
     141                }
     142                if( isset( $training_institute_academy_config['steps'] ) ) {
     143                        $this->config_steps = $training_institute_academy_config['steps'];
     144                }
     145
     146                $this->training_institute_academy_plugin_path = trailingslashit( dirname( __FILE__ ) );
     147                $training_institute_academy_relative_url = str_replace( get_template_directory(), '', $this->training_institute_academy_plugin_path );
     148                $this->training_institute_academy_plugin_url = trailingslashit( get_template_directory_uri() . $training_institute_academy_relative_url );
    54149                $training_institute_academy_current_theme = wp_get_theme();
    55150                $this->training_institute_academy_theme_title = $training_institute_academy_current_theme->get( 'Name' );
    … …  
    59154
    60155        }
    61        
     156
    62157        /**
    63158         * Hooks and filters
    64159         * @since 1.0.0
    65          */     
     160         */
    66161        public function init() {
    67162
     163                if ( class_exists( 'TGM_Plugin_Activation' ) && isset( $GLOBALS['tgmpa'] ) ) {
     164                        add_action( 'init', array( $this, 'get_tgmpa_instance' ), 30 );
     165                        add_action( 'init', array( $this, 'set_tgmpa_url' ), 40 );
     166                }
    68167                add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
    69168                add_action( 'admin_menu', array( $this, 'menu_page' ) );
     169                add_action( 'admin_init', array( $this, 'get_plugins' ), 30 );
     170                add_filter( 'tgmpa_load', array( $this, 'tgmpa_load' ), 10, 1 );
     171                add_action( 'wp_ajax_setup_plugins', array( $this, 'setup_plugins' ) );
    70172                add_action( 'wp_ajax_training_institute_academy_setup_widgets', array( $this, 'training_institute_academy_setup_widgets' ) );
    71                
    72         }
    73        
    74         public function enqueue_scripts() {
    75                 wp_enqueue_style( 'training-institute-academy-homepage-setup-style', get_template_directory_uri() . '/inc/homepage-setup/assets/css/homepage-setup-style.css');
    76                 wp_register_script( 'training-institute-academy-homepage-setup-script', get_template_directory_uri() . '/inc/homepage-setup/assets/js/homepage-setup-script.js', array( 'jquery' ), time() );
    77                 wp_localize_script(
     173                add_action( 'wp_ajax_training_institute_academy_setup_step', array( $this, 'training_institute_academy_setup_step' ) );
     174
     175        }
     176
     177        /**
     178         * Load assets on the Getting Started page, and wherever the welcome notice is shown.
     179         *
     180         * @param string $training_institute_academy_hook Current admin page hook suffix.
     181         */
     182        public function enqueue_scripts( $training_institute_academy_hook ) {
     183                $training_institute_academy_is_setup_page = ( $training_institute_academy_hook === $this->page_hook );
     184                $training_institute_academy_has_notice    = function_exists( 'training_institute_academy_show_admin_notice' ) && training_institute_academy_show_admin_notice();
     185
     186                if ( ! $training_institute_academy_is_setup_page && ! $training_institute_academy_has_notice ) {
     187                        return;
     188                }
     189
     190                $training_institute_academy_version = wp_get_theme()->get( 'Version' );
     191
     192                // The bundled Plus Jakarta Sans is Regular only, so load real weights through the local webfont loader.
     193                require_once get_theme_file_path( 'lib/custom/css/wptt-webfont-loader.php' );
     194                wp_enqueue_style( 'training-institute-academy-setup-fonts', training_institute_academy_wptt_get_webfont_url( 'https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap' ), array(), $training_institute_academy_version );
     195                // Version the page assets by file time so browsers and caching plugins never serve a stale copy after an update.
     196                $training_institute_academy_css = 'inc/homepage-setup/assets/css/homepage-setup-style.css';
     197                $training_institute_academy_js  = 'inc/homepage-setup/assets/js/homepage-setup-script.js';
     198                wp_enqueue_style( 'training-institute-academy-homepage-setup-style', get_theme_file_uri( $training_institute_academy_css ), array( 'training-institute-academy-setup-fonts' ), $training_institute_academy_version . '.' . filemtime( get_theme_file_path( $training_institute_academy_css ) ) );
     199                wp_register_script( 'training-institute-academy-homepage-setup-script', get_theme_file_uri( $training_institute_academy_js ), array( 'jquery' ), $training_institute_academy_version . '.' . filemtime( get_theme_file_path( $training_institute_academy_js ) ), true );
     200                wp_localize_script(
    78201                        'training-institute-academy-homepage-setup-script',
    79                         'whizzie_params',
     202                        'training_institute_academy_setup',
    80203                        array(
    81                                 'ajaxurl'               => admin_url( 'admin-ajax.php' ),
    82                                 'wpnonce'               => wp_create_nonce( 'whizzie_nonce' ),
    83                                 'verify_text'   => esc_html( 'verifying', 'training-institute-academy' )
     204                                'ajaxurl' => admin_url( 'admin-ajax.php' ),
     205                                'wpnonce' => wp_create_nonce( 'whizzie_nonce' ),
     206                                'i18n'    => array(
     207                                        'installing' => esc_html__( 'Working…', 'training-institute-academy' ),
     208                                        'active'     => esc_html__( 'Active', 'training-institute-academy' ),
     209                                        'failed'     => esc_html__( 'Failed', 'training-institute-academy' ),
     210                                        'install'    => esc_html__( 'Install & activate', 'training-institute-academy' ),
     211                                        'installed'  => esc_html__( 'Plugins ready', 'training-institute-academy' ),
     212                                        'pluginsErr' => esc_html__( 'Some plugins could not be installed. Try again, or install them from the plugins screen.', 'training-institute-academy' ),
     213                                        'importing'  => esc_html__( 'Importing demo…', 'training-institute-academy' ),
     214                                        'imported'   => esc_html__( 'Demo imported', 'training-institute-academy' ),
     215                                        'importErr'  => esc_html__( 'The import did not finish. Please try again.', 'training-institute-academy' ),
     216                                        'copied'     => esc_html__( 'Copied!', 'training-institute-academy' ),
     217                                ),
    84218                        )
    85219                );
    86220                wp_enqueue_script( 'training-institute-academy-homepage-setup-script' );
    87221        }
    88        
     222
    89223        public static function get_instance() {
    90224                if ( ! self::$instance ) {
    … …  
    93227                return self::$instance;
    94228        }
    95        
    96         /**
    97          * Make a modal screen for the wizard
     229
     230        public function tgmpa_load( $training_institute_academy_status ) {
     231                return is_admin() || current_user_can( 'install_themes' );
     232        }
     233
     234        /**
     235         * Get configured TGMPA instance
     236         *
     237         * @access public
     238         * @since 1.1.2
     239         */
     240        public function get_tgmpa_instance() {
     241                $this->tgmpa_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
     242        }
     243
     244        /**
     245         * Update $tgmpa_menu_slug and $training_institute_academy_tgmpa_parent_slug from TGMPA instance
     246         *
     247         * @access public
     248         * @since 1.1.2
     249         */
     250        public function set_tgmpa_url() {
     251                $this->tgmpa_menu_slug = ( property_exists( $this->tgmpa_instance, 'menu' ) ) ? $this->tgmpa_instance->menu : $this->tgmpa_menu_slug;
     252                $this->tgmpa_menu_slug = apply_filters( $this->training_institute_academy_theme_name . '_theme_setup_wizard_tgmpa_menu_slug', $this->tgmpa_menu_slug );
     253                $training_institute_academy_tgmpa_parent_slug = ( property_exists( $this->tgmpa_instance, 'parent_slug' ) && $this->tgmpa_instance->parent_slug !== 'themes.php' ) ? 'admin.php' : 'themes.php';
     254                $this->tgmpa_url = apply_filters( $this->training_institute_academy_theme_name . '_theme_setup_wizard_tgmpa_url', $training_institute_academy_tgmpa_parent_slug . '?page=' . $this->tgmpa_menu_slug );
     255        }
     256
     257        /**
     258         * Register the Getting Started page under Appearance
    98259         */
    99260        public function menu_page() {
    100                 add_theme_page( esc_html( $this->training_institute_academy_page_title ), esc_html( $this->training_institute_academy_page_title ), 'manage_options', $this->training_institute_academy_page_slug, array( $this, 'wizard_page' ) );
    101         }
    102        
    103         /**
    104          * Make an interface for the wizard
     261                $this->page_hook = add_theme_page( esc_html( $this->training_institute_academy_page_title ), esc_html( $this->training_institute_academy_page_title ), 'manage_options', $this->training_institute_academy_page_slug, array( $this, 'wizard_page' ) );
     262        }
     263
     264        /**
     265         * Small inline SVG icons used on the page
     266         *
     267         * @param string $training_institute_academy_name Icon name.
     268         */
     269        public function icon( $training_institute_academy_name ) {
     270                $training_institute_academy_icons = array(
     271                        'check' => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12.5l4.2 4.2L19 7" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg>',
     272                        'arrow' => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',
     273                        'close' => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',
     274                        'crown' => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 8l4.5 4L12 5l4.5 7L21 8l-2 11H5L3 8z" fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>',
     275                        'download' => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4v11M7 10l5 5 5-5M5 20h14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',
     276                        'dash'  => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 12h10" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',
     277                        'eye'   => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/><path d="M12 9.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6z" fill="none" stroke="currentColor" stroke-width="2"/></svg>',
     278                        'book'  => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 5.5A2.5 2.5 0 0 1 6.5 3H20v15H6.5A2.5 2.5 0 0 0 4 20.5v-15zM4 20.5A2.5 2.5 0 0 0 6.5 23H20v-5" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/></svg>',
     279                        'table' => '<svg class="omg-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 5h16v14H4zM4 10h16M10 10v9" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/></svg>',
     280                );
     281                return isset( $training_institute_academy_icons[ $training_institute_academy_name ] ) ? $training_institute_academy_icons[ $training_institute_academy_name ] : '';
     282        }
     283
     284        /**
     285         * Allowed tags for printing the inline icons
     286         */
     287        public function icon_kses() {
     288                return array(
     289                        'svg'  => array( 'class' => true, 'viewbox' => true, 'aria-hidden' => true ),
     290                        'path' => array( 'd' => true, 'fill' => true, 'stroke' => true, 'stroke-width' => true, 'stroke-linecap' => true, 'stroke-linejoin' => true ),
     291                );
     292        }
     293
     294        /**
     295         * Make an interface for the Getting Started page
    105296         */
    106297        public function wizard_page() {
    107 
    108                 $url = wp_nonce_url( add_query_arg( array( 'plugins' => 'go' ) ), 'whizzie-setup' );
    109                 $method = '';
    110                 $fields = array_keys( $_POST );
    111 
    112                 if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) {
     298                tgmpa_load_bulk_installer();
     299
     300                if ( ! class_exists( 'TGM_Plugin_Activation' ) || ! isset( $GLOBALS['tgmpa'] ) ) {
     301                        die( esc_html__( 'Failed to find TGM', 'training-institute-academy' ) );
     302                }
     303
     304                $training_institute_academy_url = wp_nonce_url( add_query_arg( array( 'plugins' => 'go' ) ), 'whizzie-setup' );
     305                $training_institute_academy_method = '';
     306                $training_institute_academy_fields = array_keys( $_POST );
     307
     308                if ( false === ( $training_institute_academy_creds = request_filesystem_credentials( esc_url_raw( $training_institute_academy_url ), $training_institute_academy_method, false, false, $training_institute_academy_fields ) ) ) {
    113309                        return true;
    114310                }
    115311
    116                 if ( ! WP_Filesystem( $creds ) ) {
    117                         request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields );
     312                if ( ! WP_Filesystem( $training_institute_academy_creds ) ) {
     313                        request_filesystem_credentials( esc_url_raw( $training_institute_academy_url ), $training_institute_academy_method, true, false, $training_institute_academy_fields );
    118314                        return true;
    119315                }
    … …  
    122318                $training_institute_academy_theme_title = $training_institute_academy_theme->get( 'Name' );
    123319                $training_institute_academy_theme_version = $training_institute_academy_theme->get( 'Version' );
    124 
     320                $training_institute_academy_theme_desc = wp_trim_words( $training_institute_academy_theme->get( 'Description' ), 28 );
     321
     322                $training_institute_academy_steps = $this->get_steps();
     323                $training_institute_academy_progress = training_institute_academy_get_setup_progress();
     324                $training_institute_academy_focus = ! empty( $_GET['omg-focus'] ) && empty( $training_institute_academy_progress['demo'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- display flag only.
     325                $training_institute_academy_done = count( array_filter( $training_institute_academy_progress ) );
     326                $training_institute_academy_total = count( $training_institute_academy_steps );
     327
     328                // The first unfinished step starts open.
     329                $training_institute_academy_open = '';
     330                foreach ( $training_institute_academy_steps as $training_institute_academy_id => $training_institute_academy_step ) {
     331                        if ( empty( $training_institute_academy_progress[ $training_institute_academy_id ] ) ) {
     332                                $training_institute_academy_open = $training_institute_academy_id;
     333                                break;
     334                        }
     335                }
     336
     337                $training_institute_academy_images = get_template_directory_uri() . '/inc/homepage-setup/assets/homepage-setup-images/';
     338                $training_institute_academy_check = wp_kses( $this->icon( 'check' ), $this->icon_kses() );
     339                $training_institute_academy_dash  = wp_kses( $this->icon( 'dash' ), $this->icon_kses() );
     340                $training_institute_academy_arrow = wp_kses( $this->icon( 'arrow' ), $this->icon_kses() );
     341                $training_institute_academy_crown = wp_kses( $this->icon( 'crown' ), $this->icon_kses() );
     342                $training_institute_academy_live  = '<span class="omg-live-dot" aria-hidden="true"></span>';
    125343                ?>
    126                 <div class="wrap">
    127                         <?php
    128                                 printf( '<h1>%s %s</h1>', esc_html( $training_institute_academy_theme_title ), esc_html( '(Version :- ' . $training_institute_academy_theme_version . ')' ) );
    129                         ?>
    130                         <div class="homepage-setup">
    131                                 <div class="homepage-setup-theme-bundle">
    132                                         <div class="homepage-setup-theme-bundle-one">
    133                                                 <h1><?php echo esc_html__( 'WP Theme Bundle', 'training-institute-academy' ); ?></h1>
    134                                                 <p><?php echo wp_kses_post( 'Get <span>15% OFF</span> on all WordPress themes! Use code <span>"BNDL15OFF"</span> at checkout. Limited time offer!' ); ?></p>
    135                                         </div>
    136                                         <div class="homepage-setup-theme-bundle-two">
    137                                                 <p><?php echo wp_kses_post( 'Extra <span>15%</span> OFF' ); ?></p>
    138                                         </div>
    139                                         <div class="homepage-setup-theme-bundle-three">
    140                                                 <img src="<?php echo esc_url( get_template_directory_uri() . '/inc/homepage-setup/assets/homepage-setup-images/bundle-banner.png' ); ?>" alt="<?php echo esc_attr__( 'Theme Bundle Image', 'training-institute-academy' ); ?>">
    141                                         </div>
    142                                         <div class="homepage-setup-theme-bundle-four">
    143                                                 <p><?php echo wp_kses_post( '<span>$2795</span>$69' ); ?></p>
    144                                                 <a target="_blank" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUNDLE_BUTTON ); ?>"><?php echo esc_html__( 'SHOP NOW', 'training-institute-academy' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a>
    145                                         </div>
     344                <div class="wrap omg-wrap<?php echo $training_institute_academy_focus ? ' is-focus' : ''; ?>">
     345
     346                        <div class="omg-header">
     347                                <div class="omg-header__text">
     348                                        <h1 class="omg-title">
     349                                                <?php
     350                                                /* translators: %s: theme name */
     351                                                printf( esc_html__( 'Welcome to %s', 'training-institute-academy' ), esc_html( $training_institute_academy_theme_title ) );
     352                                                ?>
     353                                        </h1>
     354                                </div>
     355                                <div class="omg-header__actions">
     356                                        <a class="omg-btn omg-btn--demo" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_DEMO_PRO ); ?>" target="_blank"><?php echo $training_institute_academy_live; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static markup. ?><?php esc_html_e( 'Live Demo', 'training-institute-academy' ); ?></a>
     357                                        <a class="omg-btn omg-btn--premium" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUY_NOW ); ?>" target="_blank"><?php echo $training_institute_academy_crown; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Go To Premium', 'training-institute-academy' ); ?></a>
    146358                                </div>
    147359                        </div>
    148                        
    149                         <div class="card whizzie-wrap">
    150                                 <div class="demo_content_image">
    151                                         <div class="demo_content">
     360                        <hr class="wp-header-end">
     361
     362                        <div class="omg-layout">
     363
     364                                <aside class="omg-card omg-setup<?php echo $training_institute_academy_done >= $training_institute_academy_total ? ' is-complete' : ''; ?>" id="omg-setup" data-total="<?php echo esc_attr( $training_institute_academy_total ); ?>">
     365                                        <div class="omg-setup__head">
     366                                                <h2 class="omg-setup__title"><?php esc_html_e( 'Site setup', 'training-institute-academy' ); ?></h2>
     367                                                <span class="omg-setup__count">
     368                                                        <?php
     369                                                        /* translators: 1: steps done, 2: total steps */
     370                                                        printf( esc_html__( '%1$s of %2$s done', 'training-institute-academy' ), '<b class="omg-setup__done">' . esc_html( $training_institute_academy_done ) . '</b>', esc_html( $training_institute_academy_total ) );
     371                                                        ?>
     372                                                </span>
     373                                        </div>
     374                                        <div class="omg-progress" role="progressbar" aria-valuemin="0" aria-valuemax="<?php echo esc_attr( $training_institute_academy_total ); ?>" aria-valuenow="<?php echo esc_attr( $training_institute_academy_done ); ?>">
     375                                                <span class="omg-progress__bar" style="width: <?php echo esc_attr( max( 3, round( $training_institute_academy_done / $training_institute_academy_total * 100 ) ) ); ?>%"></span>
     376                                        </div>
     377                                        <p class="omg-setup__intro"><?php esc_html_e( 'Finish these steps to make your website look like the demo in a few minutes.', 'training-institute-academy' ); ?></p>
     378
     379                                        <div class="omg-setup__complete">
     380                                                <span class="omg-setup__complete-icon"><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?></span>
     381                                                <div>
     382                                                        <strong><?php esc_html_e( 'Your website is ready', 'training-institute-academy' ); ?></strong>
     383                                                        <span><?php esc_html_e( 'All setup steps are done. Time to add your content.', 'training-institute-academy' ); ?></span>
     384                                                </div>
     385                                        </div>
     386
     387                                        <ol class="omg-steps">
    152388                                                <?php
    153                                                         $training_institute_academy_steps = $this->get_steps();
    154                                                         echo '<ul class="whizzie-menu">';
    155                                                         foreach ( $training_institute_academy_steps as $training_institute_academy_step ) {
    156                                                                 $class = 'step step-' . esc_attr( $training_institute_academy_step['id'] );
    157                                                                 echo '<li data-step="' . esc_attr( $training_institute_academy_step['id'] ) . '" class="' . esc_attr( $class ) . '">';
    158                                                                 printf( '<h2>%s</h2>', esc_html( $training_institute_academy_step['title'] ) );
    159 
    160                                                                 $content = call_user_func( array( $this, $training_institute_academy_step['view'] ) );
    161                                                                 if ( isset( $content['summary'] ) ) {
    162                                                                         printf(
    163                                                                                 '<div class="summary">%s</div>',
    164                                                                                 wp_kses_post( $content['summary'] )
    165                                                                         );
    166                                                                 }
    167                                                                 if ( isset( $content['detail'] ) ) {
    168                                                                         printf(
    169                                                                                 '<div class="detail">%s</div>',
    170                                                                                 wp_kses_post( $content['detail'] )
    171                                                                         );
    172                                                                 }
    173                                                                 if ( isset( $training_institute_academy_step['button_text'] ) && $training_institute_academy_step['button_text'] ) {
    174                                                                         printf(
    175                                                                                 '<div class="button-wrap"><a href="#" class="button button-primary do-it" data-callback="%s" data-step="%s">%s</a></div>',
    176                                                                                 esc_attr( $training_institute_academy_step['callback'] ),
    177                                                                                 esc_attr( $training_institute_academy_step['id'] ),
    178                                                                                 esc_html( $training_institute_academy_step['button_text'] )
    179                                                                         );
    180                                                                 }
    181                                                                 echo '</li>';
     389                                                $training_institute_academy_number = 1;
     390                                                foreach ( $training_institute_academy_steps as $training_institute_academy_id => $training_institute_academy_step ) {
     391                                                        $training_institute_academy_classes = array( 'omg-step' );
     392                                                        if ( ! empty( $training_institute_academy_progress[ $training_institute_academy_id ] ) ) {
     393                                                                $training_institute_academy_classes[] = 'is-done';
    182394                                                        }
    183                                                         echo '</ul>';
    184                                                 ?>
    185                                                
    186                                                 <ul class="whizzie-nav">
    187                                                         <?php
    188                                                         $step_number = 1;       
    189                                                         foreach ( $training_institute_academy_steps as $training_institute_academy_step ) {
    190                                                                 echo '<li class="nav-step-' . esc_attr( $training_institute_academy_step['id'] ) . '">';
    191                                                                 echo '<span class="step-number">' . esc_html( $step_number ) . '</span>';
    192                                                                 echo '</li>';
    193                                                                 $step_number++;
     395                                                        if ( $training_institute_academy_id === $training_institute_academy_open ) {
     396                                                                $training_institute_academy_classes[] = 'is-open';
    194397                                                        }
    195398                                                        ?>
    196                                                         <div class="blank-border"></div>
    197                                                 </ul>
    198 
    199                                                 <div class="homepage-setup-links">
    200                                                         <div class="homepage-setup-links buttons">
    201                                                                 <a href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_LITE_DOCS_PRO ); ?>" target="_blank" class="button button-primary"><?php echo esc_html__( 'Free Documentation', 'training-institute-academy' ); ?></a>
    202                                                                 <a href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUY_NOW ); ?>" class="button button-primary" target="_blank"><?php echo esc_html__( 'Get Premium', 'training-institute-academy' ); ?></a>
    203                                                                 <a href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_DEMO_PRO ); ?>" class="button button-primary" target="_blank"><?php echo esc_html__( 'Premium Demo', 'training-institute-academy' ); ?></a>
    204                                                                 <a href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_SUPPORT_FREE ); ?>" target="_blank" class="button button-primary"><?php echo esc_html__( 'Support Forum', 'training-institute-academy' ); ?></a>
     399                                                        <li class="<?php echo esc_attr( implode( ' ', $training_institute_academy_classes ) ); ?>" data-step="<?php echo esc_attr( $training_institute_academy_id ); ?>">
     400                                                                <button type="button" class="omg-step__head" aria-expanded="<?php echo $training_institute_academy_id === $training_institute_academy_open ? 'true' : 'false'; ?>">
     401                                                                        <span class="omg-step__num">
     402                                                                                <span class="omg-step__index"><?php echo esc_html( $training_institute_academy_number ); ?></span>
     403                                                                                <?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?>
     404                                                                        </span>
     405                                                                        <span class="omg-step__text">
     406                                                                                <span class="omg-step__title"><?php echo esc_html( $training_institute_academy_step['title'] ); ?></span>
     407                                                                                <span class="omg-step__desc"><?php echo esc_html( $training_institute_academy_step['desc'] ); ?></span>
     408                                                                        </span>
     409                                                                </button>
     410                                                                <div class="omg-step__body">
     411                                                                        <div class="omg-step__inner">
     412                                                                                <?php call_user_func( array( $this, $training_institute_academy_step['view'] ) ); ?>
     413                                                                        </div>
     414                                                                </div>
     415                                                        </li>
     416                                                        <?php
     417                                                        $training_institute_academy_number++;
     418                                                }
     419                                                ?>
     420                                        </ol>
     421
     422                                        <p class="omg-setup__help">
     423                                                <?php esc_html_e( 'Stuck on a step?', 'training-institute-academy' ); ?>
     424                                                <a href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_LITE_DOCS_PRO ); ?>" target="_blank"><?php esc_html_e( 'Read the setup guide', 'training-institute-academy' ); ?></a>
     425                                                <?php esc_html_e( 'or', 'training-institute-academy' ); ?>
     426                                                <a href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_SUPPORT_FREE ); ?>" target="_blank"><?php esc_html_e( 'ask on the forum', 'training-institute-academy' ); ?></a>.
     427                                        </p>
     428                                </aside>
     429
     430                                <?php if ( $training_institute_academy_focus ) : ?>
     431                                        <div class="omg-focus-tip" role="dialog" aria-labelledby="omg-focus-tip-title">
     432                                                <span class="omg-focus-tip__icon"><?php echo wp_kses( $this->icon( 'download' ), $this->icon_kses() ); ?></span>
     433                                                <p class="omg-kicker omg-kicker--blue"><?php esc_html_e( 'Quick setup', 'training-institute-academy' ); ?></p>
     434                                                <h3 class="omg-focus-tip__title" id="omg-focus-tip-title"><?php esc_html_e( 'Let’s import your demo', 'training-institute-academy' ); ?></h3>
     435                                                <p class="omg-focus-tip__text"><?php esc_html_e( 'Install the essential plugins, then import the demo content. The rest of this page unlocks as soon as the import finishes.', 'training-institute-academy' ); ?></p>
     436                                                <div class="omg-focus-tip__actions">
     437                                                        <button type="button" class="omg-btn omg-btn--primary omg-focus-ok"><?php esc_html_e( 'Got it', 'training-institute-academy' ); ?></button>
     438                                                        <button type="button" class="omg-skip omg-focus-exit"><?php esc_html_e( 'Skip, show everything', 'training-institute-academy' ); ?></button>
     439                                                </div>
     440                                        </div>
     441                                <?php endif; ?>
     442
     443                                <div class="omg-main">
     444
     445                                        <section class="omg-card omg-hero">
     446                                                <div class="omg-hero__content">
     447                                                        <div class="omg-badges">
     448                                                                <span class="omg-badge omg-badge--blue"><?php esc_html_e( 'Active theme', 'training-institute-academy' ); ?></span>
     449                                                                <span class="omg-badge"><?php esc_html_e( 'Free', 'training-institute-academy' ); ?></span>
    205450                                                        </div>
    206                                                 </div> <!-- .demo_image -->
    207 
    208                                                 <div class="step-loading"><span class="spinner"></span></div>
    209                                         </div> <!-- .demo_content -->
    210 
    211                                         <div class="homepage-setup-image">
    212                                                 <div class="homepage-setup-theme-buynow">
    213                                                         <div class="homepage-setup-theme-buynow-one">
    214                                                                 <h1><?php echo wp_kses_post( 'Academy<br>WordPress Theme' ); ?></h1>
    215                                                                 <p><?php echo wp_kses_post( '<span>25%<br>Off</span> SHOP NOW' ); ?></p>
    216                                                         </div>
    217                                                         <div class="homepage-setup-theme-buynow-two">
    218                                                                 <img src="<?php echo esc_url( get_template_directory_uri() . '/inc/homepage-setup/assets/homepage-setup-images/training-institute-academy.png' ); ?>" alt="<?php echo esc_attr__( 'Theme Bundle Image', 'training-institute-academy' ); ?>">
    219                                                         </div>
    220                                                         <div class="homepage-setup-theme-buynow-three">
    221                                                                 <p><?php echo wp_kses_post( 'Get <span>25% OFF</span> on Premium Academy WordPress Theme Use code <span>"NYTHEMES25"</span> at checkout.' ); ?></p>
    222                                                         </div>
    223                                                         <div class="homepage-setup-theme-buynow-four">
    224                                                                 <a target="_blank" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUY_NOW ); ?>"><?php echo esc_html__( 'Upgrade To Pro With Just $39', 'training-institute-academy' ); ?></a>
     451                                                        <h2 class="omg-hero__title"><?php echo esc_html( $training_institute_academy_theme_title ); ?></h2>
     452                                                        <p class="omg-hero__desc"><?php echo esc_html( $training_institute_academy_theme_desc ); ?></p>
     453                                                        <div class="omg-hero__actions">
     454                                                                <a class="omg-btn omg-btn--primary" href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>"><?php esc_html_e( 'Customize theme', 'training-institute-academy' ); ?></a>
     455                                                                <a class="omg-btn omg-btn--outline" href="<?php echo esc_url( home_url( '/' ) ); ?>" target="_blank"><?php esc_html_e( 'View your site', 'training-institute-academy' ); ?></a>
     456                                                                <a class="omg-btn omg-btn--pink" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUY_NOW ); ?>" target="_blank"><?php echo $training_institute_academy_crown; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Upgrade to Pro', 'training-institute-academy' ); ?></a>
     457                                                                <a class="omg-btn omg-btn--dark" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUNDLE_BUTTON ); ?>" target="_blank"><?php esc_html_e( 'Get the Bundle', 'training-institute-academy' ); ?></a>
    225458                                                        </div>
    226459                                                </div>
    227                                         </div> <!-- .demo_image -->
    228 
    229                                 </div> <!-- .demo_content_image -->
    230                         </div> <!-- .whizzie-wrap -->
    231                 </div> <!-- .wrap -->
     460                                                <div class="omg-hero__media">
     461                                                        <img src="<?php echo esc_url( get_template_directory_uri() . '/screenshot.png' ); ?>" alt="<?php echo esc_attr( $training_institute_academy_theme_title ); ?>">
     462                                                </div>
     463                                        </section>
     464
     465                                        <div class="omg-promos">
     466                                                <section class="omg-card omg-pro">
     467                                                        <span class="omg-pro__ribbon"><?php esc_html_e( '25% Off', 'training-institute-academy' ); ?></span>
     468                                                        <p class="omg-kicker omg-kicker--pink"><?php esc_html_e( 'Go Pro', 'training-institute-academy' ); ?></p>
     469                                                        <h3 class="omg-pro__title">
     470                                                                <?php
     471                                                                /* translators: %s: theme name */
     472                                                                printf( esc_html__( 'Unlock %s Pro', 'training-institute-academy' ), esc_html( $training_institute_academy_theme_title ) );
     473                                                                ?>
     474                                                        </h3>
     475                                                        <div class="omg-pro__links">
     476                                                                <?php
     477                                                                $training_institute_academy_pro_links = array(
     478                                                                        array( TRAINING_INSTITUTE_ACADEMY_DEMO_PRO, 'eye', __( 'Live demo', 'training-institute-academy' ), true ),
     479                                                                        array( TRAINING_INSTITUTE_ACADEMY_DOCS_PRO, 'book', __( 'Pro docs', 'training-institute-academy' ), true ),
     480                                                                        array( '#omg-compare', 'table', __( 'Free vs Pro', 'training-institute-academy' ), false ),
     481                                                                );
     482                                                                foreach ( $training_institute_academy_pro_links as $training_institute_academy_pro_link ) {
     483                                                                        ?>
     484                                                                        <a class="omg-pro__link" href="<?php echo esc_url( $training_institute_academy_pro_link[0] ); ?>"<?php echo $training_institute_academy_pro_link[3] ? ' target="_blank"' : ''; ?>>
     485                                                                                <?php echo wp_kses( $this->icon( $training_institute_academy_pro_link[1] ), $this->icon_kses() ); ?>
     486                                                                                <span><?php echo esc_html( $training_institute_academy_pro_link[2] ); ?></span>
     487                                                                        </a>
     488                                                                        <?php
     489                                                                }
     490                                                                ?>
     491                                                        </div>
     492                                                        <ul class="omg-checklist">
     493                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'All premium demo layouts', 'training-institute-academy' ); ?></li>
     494                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Advanced customizer controls', 'training-institute-academy' ); ?></li>
     495                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Priority support & updates', 'training-institute-academy' ); ?></li>
     496                                                        </ul>
     497                                                        <div class="omg-code">
     498                                                                <span class="omg-code__label"><?php esc_html_e( 'Code', 'training-institute-academy' ); ?></span>
     499                                                                <code class="omg-code__value">NYTHEMES25</code>
     500                                                                <button type="button" class="omg-code__copy" data-omg-copy="NYTHEMES25"><?php esc_html_e( 'Copy', 'training-institute-academy' ); ?></button>
     501                                                        </div>
     502                                                        <p class="omg-pro__price">
     503                                                                <strong>$39</strong>
     504                                                                <span><?php esc_html_e( 'Pro license · save 25% with the code above', 'training-institute-academy' ); ?></span>
     505                                                        </p>
     506                                                        <a class="omg-btn omg-btn--pink omg-btn--block" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUY_NOW ); ?>" target="_blank"><?php esc_html_e( 'Upgrade to Pro — just $39', 'training-institute-academy' ); ?></a>
     507                                                </section>
     508
     509                                                <section class="omg-card omg-bundle omg-glow-border">
     510                                                        <div class="omg-bundle__head">
     511                                                                <div>
     512                                                                        <p class="omg-kicker omg-kicker--pink"><?php esc_html_e( 'Best value', 'training-institute-academy' ); ?></p>
     513                                                                        <h3 class="omg-bundle__title"><?php esc_html_e( 'WP Theme Bundle', 'training-institute-academy' ); ?></h3>
     514                                                                </div>
     515                                                                <span class="omg-bundle__seal"><small><?php esc_html_e( 'Extra', 'training-institute-academy' ); ?></small><b>15%</b><small><?php esc_html_e( 'Off', 'training-institute-academy' ); ?></small></span>
     516                                                        </div>
     517                                                        <div class="omg-bundle__media">
     518                                                                <img src="<?php echo esc_url( $training_institute_academy_images . 'bundle-banner.png' ); ?>" alt="<?php esc_attr_e( 'Theme bundle collage', 'training-institute-academy' ); ?>">
     519                                                        </div>
     520                                                        <p class="omg-bundle__desc"><?php esc_html_e( 'Every Omega WordPress theme in one download.', 'training-institute-academy' ); ?></p>
     521                                                        <ul class="omg-checklist">
     522                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'All premium Omega themes included', 'training-institute-academy' ); ?></li>
     523                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Updates for every theme in the bundle', 'training-institute-academy' ); ?></li>
     524                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Priority support on all themes', 'training-institute-academy' ); ?></li>
     525                                                        </ul>
     526                                                        <p class="omg-price"><del>$2795</del><strong>$69</strong></p>
     527                                                        <div class="omg-code omg-code--light">
     528                                                                <span class="omg-code__label"><?php esc_html_e( 'Code', 'training-institute-academy' ); ?></span>
     529                                                                <code class="omg-code__value">BNDL15OFF</code>
     530                                                                <button type="button" class="omg-code__copy" data-omg-copy="BNDL15OFF"><?php esc_html_e( 'Copy', 'training-institute-academy' ); ?></button>
     531                                                        </div>
     532                                                        <a class="omg-btn omg-btn--dark omg-btn--block" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_BUNDLE_BUTTON ); ?>" target="_blank"><?php esc_html_e( 'Shop the bundle', 'training-institute-academy' ); ?></a>
     533                                                </section>
     534                                        </div>
     535
     536                                        <div class="omg-info">
     537                                                <section class="omg-card omg-compare" id="omg-compare">
     538                                                        <h3 class="omg-card__title"><?php esc_html_e( 'Free vs Pro', 'training-institute-academy' ); ?></h3>
     539                                                        <table class="omg-compare__table">
     540                                                                <thead>
     541                                                                        <tr>
     542                                                                                <th><?php esc_html_e( 'Feature', 'training-institute-academy' ); ?></th>
     543                                                                                <th><?php esc_html_e( 'Free', 'training-institute-academy' ); ?></th>
     544                                                                                <th class="omg-compare__pro"><?php esc_html_e( 'Pro', 'training-institute-academy' ); ?></th>
     545                                                                        </tr>
     546                                                                </thead>
     547                                                                <tbody>
     548                                                                        <?php
     549                                                                        $training_institute_academy_features = array(
     550                                                                                array( __( 'One-click demo import', 'training-institute-academy' ), true ),
     551                                                                                array( __( 'WooCommerce shop pages', 'training-institute-academy' ), true ),
     552                                                                                array( __( 'Responsive & RTL ready', 'training-institute-academy' ), true ),
     553                                                                                array( __( 'Premium demo layouts', 'training-institute-academy' ), false ),
     554                                                                                array( __( 'Advanced customizer options', 'training-institute-academy' ), false ),
     555                                                                                array( __( 'Priority support', 'training-institute-academy' ), false ),
     556                                                                        );
     557                                                                        foreach ( $training_institute_academy_features as $training_institute_academy_feature ) {
     558                                                                                ?>
     559                                                                                <tr>
     560                                                                                        <td><?php echo esc_html( $training_institute_academy_feature[0] ); ?></td>
     561                                                                                        <td class="<?php echo $training_institute_academy_feature[1] ? 'omg-yes' : 'omg-no'; ?>"><?php echo $training_institute_academy_feature[1] ? $training_institute_academy_check : $training_institute_academy_dash; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?></td>
     562                                                                                        <td class="omg-yes"><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?></td>
     563                                                                                </tr>
     564                                                                                <?php
     565                                                                        }
     566                                                                        ?>
     567                                                                </tbody>
     568                                                        </table>
     569                                                        <a class="omg-btn omg-btn--demo omg-btn--block omg-compare__demo" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_DEMO_PRO ); ?>" target="_blank"><?php echo $training_institute_academy_live; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static markup. ?><?php esc_html_e( 'See the Pro demo', 'training-institute-academy' ); ?> <?php echo $training_institute_academy_arrow; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?></a>
     570                                                </section>
     571
     572                                                <section class="omg-card omg-links">
     573                                                        <h3 class="omg-card__title"><?php esc_html_e( 'Important links', 'training-institute-academy' ); ?></h3>
     574                                                        <div class="omg-links__grid">
     575                                                                <?php
     576                                                                $training_institute_academy_links = array(
     577                                                                        array( TRAINING_INSTITUTE_ACADEMY_LITE_DOCS_PRO, __( 'Free documentation', 'training-institute-academy' ), __( 'Step-by-step setup guides', 'training-institute-academy' ), '' ),
     578                                                                        array( TRAINING_INSTITUTE_ACADEMY_SUPPORT_FREE, __( 'Support forum', 'training-institute-academy' ), __( 'Ask the community & our team', 'training-institute-academy' ), '' ),
     579                                                                        array( TRAINING_INSTITUTE_ACADEMY_DEMO_PRO, __( 'Premium demo', 'training-institute-academy' ), __( 'See every Pro layout live', 'training-institute-academy' ), 'demo' ),
     580                                                                        array( TRAINING_INSTITUTE_ACADEMY_BUY_NOW, __( 'Get Premium', 'training-institute-academy' ), __( 'Compare plans & pricing', 'training-institute-academy' ), 'premium' ),
     581                                                                );
     582                                                                foreach ( $training_institute_academy_links as $training_institute_academy_link ) {
     583                                                                        ?>
     584                                                                        <a class="omg-links__item<?php echo $training_institute_academy_link[3] ? ' omg-links__item--' . esc_attr( $training_institute_academy_link[3] ) : ''; ?>" href="<?php echo esc_url( $training_institute_academy_link[0] ); ?>" target="_blank">
     585                                                                                <strong>
     586                                                                                        <?php echo esc_html( $training_institute_academy_link[1] ); ?>
     587                                                                                        <?php if ( 'demo' === $training_institute_academy_link[3] ) : ?>
     588                                                                                                <em class="omg-tag omg-tag--live"><?php echo $training_institute_academy_live; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static markup. ?><?php esc_html_e( 'Live', 'training-institute-academy' ); ?></em>
     589                                                                                        <?php elseif ( 'premium' === $training_institute_academy_link[3] ) : ?>
     590                                                                                                <em class="omg-tag omg-tag--pro"><?php esc_html_e( 'Pro', 'training-institute-academy' ); ?></em>
     591                                                                                        <?php endif; ?>
     592                                                                                </strong>
     593                                                                                <span><?php echo esc_html( $training_institute_academy_link[2] ); ?></span>
     594                                                                        </a>
     595                                                                        <?php
     596                                                                }
     597                                                                ?>
     598                                                        </div>
     599                                                        <div class="omg-expert">
     600                                                                <div class="omg-expert__content">
     601                                                                        <h3 class="omg-expert__title"><?php esc_html_e( 'Want us to set it up for you?', 'training-institute-academy' ); ?></h3>
     602                                                                        <p class="omg-expert__desc"><?php esc_html_e( 'Our team can install the theme, add your content and match your brand.', 'training-institute-academy' ); ?></p>
     603                                                                        <ul class="omg-expert__list">
     604                                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Theme & plugin setup', 'training-institute-academy' ); ?></li>
     605                                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Demo content import', 'training-institute-academy' ); ?></li>
     606                                                                                <li><?php echo $training_institute_academy_check; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped above. ?><?php esc_html_e( 'Content upload', 'training-institute-academy' ); ?></li>
     607                                                                        </ul>
     608                                                                </div>
     609                                                                <a class="omg-btn omg-btn--primary omg-expert__btn" href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_HIRE_EXPERT ); ?>" target="_blank"><?php esc_html_e( 'Hire an expert', 'training-institute-academy' ); ?></a>
     610                                                        </div>
     611                                                </section>
     612                                        </div>
     613
     614                                </div> <!-- .omg-main -->
     615                        </div> <!-- .omg-layout -->
     616
     617                        <div class="omg-footer">
     618                                <p>
     619                                        <?php esc_html_e( 'Enjoying the theme?', 'training-institute-academy' ); ?>
     620                                        <a href="<?php echo esc_url( TRAINING_INSTITUTE_ACADEMY_REVIEW_FREE ); ?>" target="_blank"><?php esc_html_e( 'Leave a ★★★★★ review', 'training-institute-academy' ); ?></a>
     621                                </p>
     622                                <p>
     623                                        <?php
     624                                        /* translators: %s: theme version */
     625                                        printf( esc_html__( 'Version %s', 'training-institute-academy' ), esc_html( $training_institute_academy_theme_version ) );
     626                                        ?>
     627                                </p>
     628                        </div>
     629                </div> <!-- .omg-wrap -->
    232630                <?php
    233631        }
    … …  
    243641                $training_institute_academy_dev_steps = $this->config_steps;
    244642                $training_institute_academy_steps = array(
    245                         'widgets' => array(
    246                                 'id'                    => 'widgets',
    247                                 'title'                 => __( 'Setup Home Page', 'training-institute-academy' ),
    248                                 'icon'                  => 'welcome-widgets-menus',
    249                                 'view'                  => 'get_step_widgets',
    250                                 'callback'              => 'training_institute_academy_install_widgets',
    251                                 'button_text'   => __( 'Start Home Page Setup', 'training-institute-academy' ),
    252                                 'can_skip'              => false
     643                        'plugins' => array(
     644                                'id'    => 'plugins',
     645                                'title' => __( 'Install essential plugins', 'training-institute-academy' ),
     646                                'desc'  => __( 'Recommended for the demo layout and theme features', 'training-institute-academy' ),
     647                                'view'  => 'get_step_plugins',
    253648                        ),
    254                         'done' => array(
    255                                 'id'                    => 'done',
    256                                 'title'                 => __( 'Customize Your Site', 'training-institute-academy' ),
    257                                 'icon'                  => 'yes',
    258                                 'view'                  => 'get_step_done',
    259                                 'callback'              => ''
    260                         )
     649                        'demo' => array(
     650                                'id'    => 'demo',
     651                                'title' => __( 'Import demo content', 'training-institute-academy' ),
     652                                'desc'  => __( 'Pages, posts, menus and widgets', 'training-institute-academy' ),
     653                                'view'  => 'get_step_demo',
     654                        ),
     655                        'customize' => array(
     656                                'id'    => 'customize',
     657                                'title' => __( 'Make it yours', 'training-institute-academy' ),
     658                                'desc'  => __( 'Logo, colors, header and homepage', 'training-institute-academy' ),
     659                                'view'  => 'get_step_customize',
     660                        ),
     661                        'launch' => array(
     662                                'id'    => 'launch',
     663                                'title' => __( 'Launch your website', 'training-institute-academy' ),
     664                                'desc'  => __( 'Preview and go live', 'training-institute-academy' ),
     665                                'view'  => 'get_step_launch',
     666                        ),
    261667                );
    262                
     668
    263669                // Iterate through each step and replace with dev config values
    264670                if( $training_institute_academy_dev_steps ) {
    265671                        // Configurable elements - these are the only ones the dev can update from homepage-setup-settings.php
    266                         $can_config = array( 'title', 'icon', 'button_text', 'can_skip' );
     672                        $training_institute_academy_can_config = array( 'title', 'desc' );
    267673                        foreach( $training_institute_academy_dev_steps as $training_institute_academy_dev_step ) {
    268674                                // We can only proceed if an ID exists and matches one of our IDs
    269675                                if( isset( $training_institute_academy_dev_step['id'] ) ) {
    270                                         $id = $training_institute_academy_dev_step['id'];
    271                                         if( isset( $training_institute_academy_steps[$id] ) ) {
    272                                                 foreach( $can_config as $element ) {
    273                                                         if( isset( $training_institute_academy_dev_step[$element] ) ) {
    274                                                                 $training_institute_academy_steps[$id][$element] = $training_institute_academy_dev_step[$element];
     676                                        $training_institute_academy_id = $training_institute_academy_dev_step['id'];
     677                                        if( isset( $training_institute_academy_steps[$training_institute_academy_id] ) ) {
     678                                                foreach( $training_institute_academy_can_config as $training_institute_academy_element ) {
     679                                                        if( isset( $training_institute_academy_dev_step[$training_institute_academy_element] ) ) {
     680                                                                $training_institute_academy_steps[$training_institute_academy_id][$training_institute_academy_element] = $training_institute_academy_dev_step[$training_institute_academy_element];
    275681                                                        }
    276682                                                }
    … …  
    281687                return $training_institute_academy_steps;
    282688        }
    283        
    284         /**
    285          * Print the content for the widgets step
    286          * @since 1.1.0
    287          */
    288         public function get_step_widgets() { ?> <?php }
    289        
     689
     690        /**
     691         * Print the content for the plugins step
     692         */
     693        public function get_step_plugins() {
     694                $training_institute_academy_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
     695                $training_institute_academy_pending = 0;
     696
     697                // WooCommerce goes first: the other plugins need it active before they can activate.
     698                $training_institute_academy_plugins = $training_institute_academy_instance->plugins;
     699                if ( isset( $training_institute_academy_plugins['woocommerce'] ) ) {
     700                        $training_institute_academy_plugins = array( 'woocommerce' => $training_institute_academy_plugins['woocommerce'] ) + $training_institute_academy_plugins;
     701                }
     702                ?>
     703                <ul class="omg-plugins">
     704                        <?php
     705                        foreach ( $training_institute_academy_plugins as $training_institute_academy_slug => $training_institute_academy_plugin ) {
     706                                $training_institute_academy_is_ready = $training_institute_academy_instance->is_plugin_active( $training_institute_academy_slug ) && false === $training_institute_academy_instance->does_plugin_have_update( $training_institute_academy_slug );
     707                                $training_institute_academy_is_required = ! empty( $training_institute_academy_plugin['required'] );
     708                                if ( ! $training_institute_academy_is_ready ) {
     709                                        $training_institute_academy_pending++;
     710                                }
     711                                if ( $training_institute_academy_is_ready ) {
     712                                        $training_institute_academy_badge = __( 'Active', 'training-institute-academy' );
     713                                } elseif ( $training_institute_academy_is_required ) {
     714                                        $training_institute_academy_badge = __( 'Required', 'training-institute-academy' );
     715                                } else {
     716                                        $training_institute_academy_badge = __( 'Optional', 'training-institute-academy' );
     717                                }
     718                                ?>
     719                                <li class="omg-plugin<?php echo $training_institute_academy_is_ready ? ' is-ready' : ''; ?>" data-slug="<?php echo esc_attr( $training_institute_academy_slug ); ?>">
     720                                        <label class="omg-plugin__label">
     721                                                <input type="checkbox" class="omg-plugin__check" value="<?php echo esc_attr( $training_institute_academy_slug ); ?>" checked <?php disabled( $training_institute_academy_is_ready || $training_institute_academy_is_required ); ?>>
     722                                                <span class="omg-plugin__name"><?php echo esc_html( $training_institute_academy_plugin['name'] ); ?></span>
     723                                        </label>
     724                                        <span class="omg-plugin__status omg-plugin__status--<?php echo $training_institute_academy_is_ready ? 'active' : ( $training_institute_academy_is_required ? 'required' : 'optional' ); ?>"><?php echo esc_html( $training_institute_academy_badge ); ?></span>
     725                                </li>
     726                                <?php
     727                        }
     728                        ?>
     729                </ul>
     730                <p class="omg-step__error" hidden></p>
     731                <?php if ( $training_institute_academy_pending ) : ?>
     732                        <button type="button" class="omg-btn omg-btn--primary omg-btn--block omg-install-plugins">
     733                                <span class="omg-btn__label"><?php esc_html_e( 'Install & activate', 'training-institute-academy' ); ?></span>
     734                                <span class="omg-btn__count">(<?php echo esc_html( $training_institute_academy_pending ); ?>)</span>
     735                        </button>
     736                        <button type="button" class="omg-skip" data-omg-complete="plugins"><?php esc_html_e( 'Skip this step', 'training-institute-academy' ); ?></button>
     737                <?php else : ?>
     738                        <p class="omg-step__note"><?php esc_html_e( 'All recommended plugins are installed and active.', 'training-institute-academy' ); ?></p>
     739                <?php endif; ?>
     740                <?php
     741        }
     742
     743        /**
     744         * Print the content for the demo import step
     745         */
     746        public function get_step_demo() {
     747                ?>
     748                <p class="omg-step__note"><?php esc_html_e( 'Creates the homepage, inner pages, sample posts and the primary menu.', 'training-institute-academy' ); ?></p>
     749                <p class="omg-step__error" hidden></p>
     750                <button type="button" class="omg-btn omg-btn--primary omg-btn--block omg-import-demo">
     751                        <span class="omg-btn__label"><?php esc_html_e( 'Import demo content', 'training-institute-academy' ); ?></span>
     752                </button>
     753                <?php
     754        }
     755
     756        /**
     757         * Print the content for the customize step
     758         */
     759        public function get_step_customize() {
     760                $training_institute_academy_targets = array(
     761                        array( 'section', 'title_tagline', __( 'Logo & title', 'training-institute-academy' ) ),
     762                        array( 'panel', 'training_institute_academy_theme_colors_panel', __( 'Colors', 'training-institute-academy' ) ),
     763                        array( 'section', 'training_institute_academy_button_header_setting', __( 'Header', 'training-institute-academy' ) ),
     764                        array( 'panel', 'training_institute_academy_theme_home_pannel', __( 'Homepage', 'training-institute-academy' ) ),
     765                );
     766                ?>
     767                <div class="omg-chips">
     768                        <?php foreach ( $training_institute_academy_targets as $training_institute_academy_target ) : ?>
     769                                <a class="omg-chip" href="<?php echo esc_url( add_query_arg( 'autofocus[' . $training_institute_academy_target[0] . ']', $training_institute_academy_target[1], admin_url( 'customize.php' ) ) ); ?>" target="_blank"><?php echo esc_html( $training_institute_academy_target[2] ); ?></a>
     770                        <?php endforeach; ?>
     771                </div>
     772                <button type="button" class="omg-btn omg-btn--primary omg-btn--block" data-omg-complete="customize"><?php esc_html_e( 'Mark as done', 'training-institute-academy' ); ?></button>
     773                <?php
     774        }
     775
    290776        /**
    291777         * Print the content for the final step
    292778         */
    293         public function get_step_done() { ?>
    294                 <div id="training-institute-academy-demo-setup-guid">
    295                         <div class="customize_div">
    296                                 <div class="customize_div finish">
    297                                         <div class="customize_div finish btns">
    298                                                 <h3><?php echo esc_html( 'Your Site Is Ready To View' ); ?></h3>
    299                                                 <div class="btnsss">
    300                                                         <a target="_blank" href="<?php echo esc_url( get_home_url() ); ?>" class="button button-primary">
    301                                                                 <?php esc_html_e( 'View Your Site', 'training-institute-academy' ); ?>
    302                                                         </a>
    303                                                         <a target="_blank" href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>" class="button button-primary">
    304                                                                 <?php esc_html_e( 'Customize Your Site', 'training-institute-academy' ); ?>
    305                                                         </a>
    306                                                         <a href="<?php echo esc_url(admin_url()); ?>" class="button button-primary">
    307                                                                 <?php esc_html_e( 'Finsh', 'training-institute-academy' ); ?>
    308                                                         </a>
    309                                                 </div>
    310                                         </div>
    311                                         <div class="training-institute-academy-setup-finish">
    312                                                 <img src="<?php echo esc_url( get_template_directory_uri() . '/screenshot.png' ); ?>"/>
    313                                         </div>
    314                                 </div>
    315                         </div>
    316                 </div>
    317         <?php }
     779        public function get_step_launch() {
     780                ?>
     781                <p class="omg-step__note"><?php esc_html_e( 'Check your website on desktop and mobile, then share it with your visitors.', 'training-institute-academy' ); ?></p>
     782                <a class="omg-btn omg-btn--primary omg-btn--block" href="<?php echo esc_url( home_url( '/' ) ); ?>" target="_blank" data-omg-complete="launch"><?php esc_html_e( 'View your site', 'training-institute-academy' ); ?></a>
     783                <?php
     784        }
     785
     786        /**
     787         * Get the plugins registered with TGMPA
     788         */
     789        public function get_plugins() {
     790                $training_institute_academy_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
     791                $training_institute_academy_plugins = array(
     792                        'all'           => array(),
     793                        'install'       => array(),
     794                        'update'        => array(),
     795                        'activate'      => array()
     796                );
     797                foreach( $training_institute_academy_instance->plugins as $training_institute_academy_slug=>$training_institute_academy_plugin ) {
     798                        if( $training_institute_academy_instance->is_plugin_active( $training_institute_academy_slug ) && false === $training_institute_academy_instance->does_plugin_have_update( $training_institute_academy_slug ) ) {
     799                                // Plugin is installed and up to date
     800                                continue;
     801                        } else {
     802                                $training_institute_academy_plugins['all'][$training_institute_academy_slug] = $training_institute_academy_plugin;
     803                                if( ! $training_institute_academy_instance->is_plugin_installed( $training_institute_academy_slug ) ) {
     804                                        $training_institute_academy_plugins['install'][$training_institute_academy_slug] = $training_institute_academy_plugin;
     805                                } else {
     806                                        if( false !== $training_institute_academy_instance->does_plugin_have_update( $training_institute_academy_slug ) ) {
     807                                                $training_institute_academy_plugins['update'][$training_institute_academy_slug] = $training_institute_academy_plugin;
     808                                        }
     809                                        if( $training_institute_academy_instance->can_plugin_activate( $training_institute_academy_slug ) ) {
     810                                                $training_institute_academy_plugins['activate'][$training_institute_academy_slug] = $training_institute_academy_plugin;
     811                                        }
     812                                }
     813                        }
     814                }
     815                return $training_institute_academy_plugins;
     816        }
     817
     818        /**
     819         * Mark a setup step as done
     820         */
     821        public function training_institute_academy_setup_step() {
     822                check_ajax_referer( 'whizzie_nonce', 'wpnonce' );
     823                if ( ! current_user_can( 'manage_options' ) ) {
     824                        wp_send_json_error();
     825                }
     826                $training_institute_academy_step = isset( $_POST['step'] ) ? sanitize_key( wp_unslash( $_POST['step'] ) ) : '';
     827                training_institute_academy_set_setup_step_done( $training_institute_academy_step );
     828                wp_send_json_success( training_institute_academy_get_setup_progress() );
     829        }
     830
     831        public function setup_plugins() {
     832                if ( ! check_ajax_referer( 'whizzie_nonce', 'wpnonce' ) || empty( $_POST['slug'] ) || ! current_user_can( 'install_plugins' ) ) {
     833                        wp_send_json_error( array( 'error' => 1, 'message' => esc_html__( 'No Slug Found','training-institute-academy' ) ) );
     834                }
     835                $training_institute_academy_json = array();
     836                // send back some json we use to hit up TGM
     837                $training_institute_academy_plugins = $this->get_plugins();
     838
     839                // what are we doing with this plugin?
     840                foreach ( $training_institute_academy_plugins['activate'] as $training_institute_academy_slug => $training_institute_academy_plugin ) {
     841                        if ( $_POST['slug'] == $training_institute_academy_slug ) {
     842                                $training_institute_academy_json = array(
     843                                        'url'           => admin_url( $this->tgmpa_url ),
     844                                        'plugin'        => array( $training_institute_academy_slug ),
     845                                        'tgmpa-page'    => $this->tgmpa_menu_slug,
     846                                        'plugin_status' => 'all',
     847                                        '_wpnonce'      => wp_create_nonce( 'bulk-plugins' ),
     848                                        'action'        => 'tgmpa-bulk-activate',
     849                                        'action2'       => - 1,
     850                                        'message'       => esc_html__( 'Activating…','training-institute-academy' ),
     851                                );
     852                                break;
     853                        }
     854                }
     855                foreach ( $training_institute_academy_plugins['update'] as $training_institute_academy_slug => $training_institute_academy_plugin ) {
     856                        if ( $_POST['slug'] == $training_institute_academy_slug ) {
     857                                $training_institute_academy_json = array(
     858                                        'url'           => admin_url( $this->tgmpa_url ),
     859                                        'plugin'        => array( $training_institute_academy_slug ),
     860                                        'tgmpa-page'    => $this->tgmpa_menu_slug,
     861                                        'plugin_status' => 'all',
     862                                        '_wpnonce'      => wp_create_nonce( 'bulk-plugins' ),
     863                                        'action'        => 'tgmpa-bulk-update',
     864                                        'action2'       => - 1,
     865                                        'message'       => esc_html__( 'Updating…','training-institute-academy' ),
     866                                );
     867                                break;
     868                        }
     869                }
     870                foreach ( $training_institute_academy_plugins['install'] as $training_institute_academy_slug => $training_institute_academy_plugin ) {
     871                        if ( $_POST['slug'] == $training_institute_academy_slug ) {
     872                                $training_institute_academy_json = array(
     873                                        'url'           => admin_url( $this->tgmpa_url ),
     874                                        'plugin'        => array( $training_institute_academy_slug ),
     875                                        'tgmpa-page'    => $this->tgmpa_menu_slug,
     876                                        'plugin_status' => 'all',
     877                                        '_wpnonce'      => wp_create_nonce( 'bulk-plugins' ),
     878                                        'action'        => 'tgmpa-bulk-install',
     879                                        'action2'       => - 1,
     880                                        'message'       => esc_html__( 'Installing…','training-institute-academy' ),
     881                                );
     882                                break;
     883                        }
     884                }
     885                if ( $training_institute_academy_json ) {
     886                        $training_institute_academy_json['hash'] = md5( serialize( $training_institute_academy_json ) ); // used for checking if duplicates happen, move to next plugin
     887                        wp_send_json( $training_institute_academy_json );
     888                } else {
     889                        wp_send_json( array( 'done' => 1, 'message' => esc_html__( 'Active','training-institute-academy' ) ) );
     890                }
     891                exit;
     892        }
    318893
    319894
    … …  
    396971
    397972                        if (!has_nav_menu($training_institute_academy_menulocation)) {
    398                                 $training_institute_academy_locations = get_theme_mod('nav_menu_locations');
     973                                $training_institute_academy_locations = get_theme_mod( 'nav_menu_locations', array() );
    399974                                $training_institute_academy_locations[$training_institute_academy_menulocation] = $training_institute_academy_menu_id;
    400975                                set_theme_mod('nav_menu_locations', $training_institute_academy_locations);
    … …  
    409984         */
    410985        public function training_institute_academy_setup_widgets(){
     986
     987                check_ajax_referer( 'whizzie_nonce', 'wpnonce' );
     988                if ( ! current_user_can( 'manage_options' ) ) {
     989                        wp_send_json_error();
     990                }
    411991
    412992                /* -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- MENUS PAGES -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*/
    … …  
    5961176        $this->training_institute_academy_customizer_nav_menu();
    5971177
    598             exit;
     1178            training_institute_academy_set_setup_step_done( 'demo' );
     1179                wp_send_json_success( training_institute_academy_get_setup_progress() );
    5991180        }
    6001181}
  • training-institute-academy/1.3.7/inc/homepage-setup/homepage-setup-settings.php

    r263116 r356311  
    2121
    2222// Change the title and slug of your wizard page
    23 $config['training_institute_academy_page_slug']         = 'training-institute-academy';
    24 $config['training_institute_academy_page_title']        = 'Homepage Setup';
     23$training_institute_academy_config['training_institute_academy_page_slug']      = 'training-institute-academy';
     24$training_institute_academy_config['training_institute_academy_page_title']     = __( 'Getting Started', 'training-institute-academy' );
    2525
    26 $config['steps'] = array(
    27         'widgets' => array(
    28                 'id'                    => 'widgets',
    29                 'title'                 => __( 'Setup Home Page', 'training-institute-academy' ),
    30                 'icon'                  => 'welcome-widgets-menus',
    31                 'button_text'   => __( 'Start Home Page Setup', 'training-institute-academy' ),
    32                 'can_skip'              => true
     26// Only 'title' and 'desc' can be changed here
     27$training_institute_academy_config['steps'] = array(
     28        'plugins' => array(
     29                'id'    => 'plugins',
     30                'title' => __( 'Install essential plugins', 'training-institute-academy' ),
     31                'desc'  => __( 'Recommended for the demo layout and theme features', 'training-institute-academy' ),
    3332        ),
    34         'done' => array(
    35                 'id'                    => 'done',
    36                 'title'                 => __( 'Customize Your Site', 'training-institute-academy' ),
    37                 'icon'                  => 'yes',
     33        'demo' => array(
     34                'id'    => 'demo',
     35                'title' => __( 'Import demo content', 'training-institute-academy' ),
     36                'desc'  => __( 'Pages, posts, menus and widgets', 'training-institute-academy' ),
     37        ),
     38        'customize' => array(
     39                'id'    => 'customize',
     40                'title' => __( 'Make it yours', 'training-institute-academy' ),
     41                'desc'  => __( 'Logo, colors, header and homepage', 'training-institute-academy' ),
     42        ),
     43        'launch' => array(
     44                'id'    => 'launch',
     45                'title' => __( 'Launch your website', 'training-institute-academy' ),
     46                'desc'  => __( 'Preview and go live', 'training-institute-academy' ),
    3847        )
    3948);
    … …  
    4352 **/
    4453if( class_exists( 'Training_Institute_Academy_Whizzie' ) ) {
    45         $Training_Institute_Academy_Whizzie = new Training_Institute_Academy_Whizzie( $config );
     54        $Training_Institute_Academy_Whizzie = new Training_Institute_Academy_Whizzie( $training_institute_academy_config );
    4655}
  • training-institute-academy/1.3.7/languages/training-institute-academy.pot

    r354502 r356311  
    44msgstr ""
    55"Project-Id-Version: Training Institute Academy 1.2.6\n"
    6 "Report-Msgid-Bugs-To: https://wordpress.org/support/theme/training-institute-academy\n"
     6"Report-Msgid-Bugs-To: https://WordPress.org/support/theme/training-institute-academy\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    88"Language-Team: LANGUAGE <LL@li.org>\n"
    … …  
    8888
    8989#: functions.php:83
    90 msgid "https://wordpress.org/support/theme/training-institute-academy/"
     90msgid "https://WordPress.org/support/theme/training-institute-academy/"
    9191msgstr ""
    9292
    9393#: functions.php:86
    94 msgid "https://wordpress.org/support/theme/training-institute-academy/reviews/#new-post"
     94msgid "https://WordPress.org/support/theme/training-institute-academy/reviews/#new-post"
    9595msgstr ""
    9696
    … …  
    185185
    186186#: inc/custom-functions.php:378
    187 msgid "wordpress."
     187msgid "WordPress."
    188188msgstr ""
    189189
  • training-institute-academy/1.3.7/lib/breadcrumbs/breadcrumbs.php

    r354502 r356311  
    11<?php
    22/**
    3  * Breadcrumb Trail - A breadcrumb menu script for wordpress.
     3 * Breadcrumb Trail - A breadcrumb menu script for WordPress.
    44 *
    55 * Breadcrumb Trail is a script for showing a breadcrumb trail for any type of page.  It tries to
  • training-institute-academy/1.3.7/readme.txt

    r354502 r356311  
    44Tested up to: 7.1
    55Requires PHP: 7.2
    6 Stable tag: 1.3.6
     6Stable tag: 1.3.7
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    4646
    4747== Code from Twenty Nineteen ==
    48 Copyright (c) 2018-2019 wordpress.org
     48Copyright (c) 2018-2019 WordPress.org
    4949License: GPLv2
    50 Source: https://wordpress.org/themes/twentyninteen/
     50Source: https://WordPress.org/themes/twentyninteen/
    5151Included as part of the following classes and functions:
    5252- Training_Institute_Academy_SVG_Icons
    5353
    5454== Code from Multi Blog ==
    55 Copyright (c) 2020-2021 wordpress.org
     55Copyright (c) 2020-2021 WordPress.org
    5656License: GPLv2
    57 Source: https://wordpress.org/themes/multi-blog/
     57Source: https://WordPress.org/themes/multi-blog/
    5858Included as part of the following customizer code and functions
    5959
    … …  
    8080
    8181== Changelog ==
     82
     83= 1.3.7 =
     84* Responsive Design Improvements.
    8285
    8386= 1.3.6 =
  • training-institute-academy/1.3.7/style.css

    r354502 r356311  
    99Tested up to: 7.1
    1010Requires PHP: 7.2
    11 Version: 1.3.6
     11Version: 1.3.7
    1212License: GNU General Public License v2 or later
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.