Plugin Directory

Changeset 2502724


Ignore:
Timestamp:
03/24/2021 04:41:50 PM (5 years ago)
Author:
hqtheme
Message:

Added Import demo directly form setup wizard

Location:
hqtheme-extra
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • hqtheme-extra/tags/1.0.15/assets/css/admin/import.css

    r2387081 r2502724  
    189189    min-height: 400px;
    190190}
     191#hqt-templates-results {
     192    display: flex;
     193    flex-wrap: wrap;
     194}
    191195#hqt-templates-results .theme {
    192196    border-radius: 4px;
  • hqtheme-extra/tags/1.0.15/assets/js/admin/templates-install.js

    r2387081 r2502724  
    6666            // Finish
    6767            $(document).on('hqt/demo/import/done', HQTemplatesInstall.importDone);
     68            $(document).on('hqt/demo/import/close_after_import', HQTemplatesInstall.refreshSetupWizardPage);
    6869            $(document).on('click', '#btn-import-close', HQTemplatesInstall.dismissPopup);
    6970            // Fail
     
    271272            $('.install-theme-info').removeClass('loading');
    272273        },
     274       
     275        refreshSetupWizardPage: function () {
     276            if ($('.marmot-theme_page_marmot-theme-setup .step-current .step-3').length) {
     277                location.reload();
     278            }
     279        },
    273280
    274281        importFail: function () {
     
    279286
    280287        dismissPopup: function () {
     288            $(document).trigger('hqt/demo/import/close_after_import');
    281289            // Reset popup
    282290            HQTemplatesInstall.setProgress(0);
  • hqtheme-extra/tags/1.0.15/hqtheme-extra.php

    r2499477 r2502724  
    55 * Plugin URI:        https://marmot.hqwebs.net/marmot/?utm_source=wp-admin&utm_medium=link&utm_campaign=default&utm_term=hqtheme-extra&utm_content=plugin-uri
    66 * Description:       HQTheme Extra adds extras for Marmot Theme - Ready sites one click import
    7  * Version:           1.0.14
     7 * Version:           1.0.15
    88 * Requires at least: 5.3
    99 * Requires PHP:      7.2
     
    5757 * @var string
    5858 */
    59 const VERSION = '1.0.14';
     59const VERSION = '1.0.15';
    6060
    6161// Load Autoloader
  • hqtheme-extra/tags/1.0.15/inc/admin/page/theme-setup-wizzard.php

    r2499477 r2502724  
    137137    private function plugins($step) {
    138138        ?>
    139         <h3><?php _ex('Installing Highly Recommended Plugins', 'admin', 'hqtheme-extra'); ?><br></h3>
     139        <h2><?php _ex('Installing Highly Recommended Plugins', 'admin', 'hqtheme-extra'); ?></h2>
    140140        <p class="m-0"><?php _ex('Marmot theme works with Elementor templates, it also can be used without Elementor, but design and features will be very poor.', 'admin', 'hqtheme-extra'); ?></p>
    141141        <p class="mt-0 mb-4"><?php _ex('The theme also needs our free plugin called HQTheme Extra (available in official WordPress repository). It includes library and some features like one-click demo import. ', 'admin', 'hqtheme-extra'); ?></p>
     
    207207    private function license($step) {
    208208        ?>
    209         <h3><?php _ex('Marmot License', 'admin', 'hqtheme-extra'); ?><br></h3>
     209        <h2><?php _ex('Marmot License', 'admin', 'hqtheme-extra'); ?></h2>
    210210        <p><?php _ex('License activation will enable more features, more pre-made websites and access to all premium plugins.', 'admin', 'hqtheme-extra'); ?></p>
    211211        <?php
     
    262262        }
    263263        ?>
    264         <h3><?php _ex('Import Pre-made Demo Website', 'admin', 'hqtheme-extra'); ?><br></h3>
     264        <h2><?php _ex('Import Pre-made Demo Website', 'admin', 'hqtheme-extra'); ?></h2>
    265265        <p>
    266266            <?php _ex('Importing pre-made demo is best and easiest way to build your website.', 'admin', 'hqtheme-extra'); ?>
    267267        </p>
    268         <p>
    269             <?php _ex('Choose and import demo that fits your needs.', 'admin', 'hqtheme-extra'); ?>
    270         </p>
    271268        <?php
    272269        if ($step < 3 || !defined('\HQExtra\VERSION')) {
     
    281278            return;
    282279        }
    283         ?>
    284         <a href="<?php echo esc_url(admin_url('admin.php?page=marmot-ready-sites')); ?>" class="btn btn-primary mr-1">
    285             <?php _ex('Ready Sites', 'admin', 'hqtheme-extra'); ?>
    286         </a>
    287         <a href="<?php echo esc_url(admin_url('admin.php?page=marmot-theme-setup&wizzard-page=4&skip-demo=1')); ?>" class="">
    288             <?php _ex('Skip this step', 'admin', 'hqtheme-extra'); ?>
    289         </a>
     280        if (get_theme_mod('marmot_demo_imported', 0)) {
     281            ?>
     282            <p>
     283                <?php _ex('Demo is already imported you can  go to next step or choose and import another demo below.', 'admin', 'hqtheme-extra'); ?> <a href="#hqt-import-demo"><i class="dashicons dashicons-arrow-down-alt2"></i></a>
     284            </p>
     285            <a href="<?php echo esc_url(admin_url('admin.php?page=marmot-theme-setup&wizzard-page=4')); ?>" class="btn btn-primary">
     286                <?php _ex('Next step', 'admin', 'hqtheme-extra'); ?>
     287            </a>
     288            <?php
     289        } else {
     290            ?>
     291            <p>
     292                <?php _ex('Choose and import demo that fits your needs below.', 'admin', 'hqtheme-extra'); ?>
     293            </p>
     294            <p>
     295                <a href="#hqt-import-demo" class="btn btn-primary">
     296                    <?php _ex('Choose Demo Website', 'admin', 'hqtheme-extra'); ?>
     297                </a>
     298                <a href="<?php echo esc_url(admin_url('admin.php?page=marmot-theme-setup&wizzard-page=4&skip-demo=1')); ?>" class="ml-2">
     299                    <?php _ex('Skip this step', 'admin', 'hqtheme-extra'); ?>
     300                </a>
     301            </p>
     302            <?php
     303        }
     304        ?>
     305        <div class="wrap hqt-templates-import-screen" id="hqt-import-demo" data-template-type="sites">
     306            <?php
     307            \HQExtra\Demos\Ui::instance()->ready_sites_page();
     308            ?>
     309        </div>
    290310        <?php
    291311    }
  • hqtheme-extra/tags/1.0.15/inc/demos/import.php

    r2486990 r2502724  
    487487        delete_transient('hqt_installing_demo');
    488488
     489        set_theme_mod('marmot_demo_imported', 1);
     490
    489491        wp_send_json_success([$from, $to]);
    490492    }
  • hqtheme-extra/tags/1.0.15/inc/hqlib/utils.php

    r2481596 r2502724  
    313313    }
    314314
     315    /**
     316     * Generate menus description text
     317     *
     318     * @since 1.0.15
     319     *
     320     * @return string
     321     */
     322    public static function get_menu_howto() {
     323        /* translators: %1$s is replaced with "one <a> tag" %2$s is replaced with "close </a> tag" */
     324        return sprintf(_x('Before choosing menu, you have to create it %1$shere%2$s. (New menus will appear after refresh.)',
     325                        'settings',
     326                        'hqtheme-extra'),
     327                '<a target="_blank" href="' . esc_url(admin_url('nav-menus.php')) . '">',
     328                '</a>'
     329        );
     330    }
     331
     332    /**
     333     * Generate Contact From 7 description text
     334     *
     335     * @since 1.0.15
     336     *
     337     * @return string
     338     */
     339    public static function get_cf7_howto() {
     340        /* translators: %1$s is replaced with "one <a> tag" %2$s is replaced with "close </a> tag" */
     341        return sprintf(_x('Before choosing form, you have to create it %1$shere%2$s. (New forms will appear after refresh.)',
     342                        'settings',
     343                        'hqtheme-extra'),
     344                '<a target="_blank" href="' . esc_url(admin_url('admin.php?page=wpcf7')) . '">',
     345                '</a>'
     346        );
     347    }
     348
    315349}
  • hqtheme-extra/tags/1.0.15/readme.txt

    r2499477 r2502724  
    55Tested up to: 5.7
    66Requires PHP: 7.2
    7 Stable tag: 1.0.14
     7Stable tag: 1.0.15
    88License: GPL v2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4848
    4949== Changelog ==
     50
     51= 1.0.15 - 2021-03-24 =
     52* Added help for Navigation Menu
     53* Added help for Contact Form 7
     54* Added Import demo directly form setup wizard
    5055
    5156= 1.0.14 - 2021-03-19 =
  • hqtheme-extra/trunk/assets/css/admin/import.css

    r2387081 r2502724  
    189189    min-height: 400px;
    190190}
     191#hqt-templates-results {
     192    display: flex;
     193    flex-wrap: wrap;
     194}
    191195#hqt-templates-results .theme {
    192196    border-radius: 4px;
  • hqtheme-extra/trunk/assets/js/admin/templates-install.js

    r2387081 r2502724  
    6666            // Finish
    6767            $(document).on('hqt/demo/import/done', HQTemplatesInstall.importDone);
     68            $(document).on('hqt/demo/import/close_after_import', HQTemplatesInstall.refreshSetupWizardPage);
    6869            $(document).on('click', '#btn-import-close', HQTemplatesInstall.dismissPopup);
    6970            // Fail
     
    271272            $('.install-theme-info').removeClass('loading');
    272273        },
     274       
     275        refreshSetupWizardPage: function () {
     276            if ($('.marmot-theme_page_marmot-theme-setup .step-current .step-3').length) {
     277                location.reload();
     278            }
     279        },
    273280
    274281        importFail: function () {
     
    279286
    280287        dismissPopup: function () {
     288            $(document).trigger('hqt/demo/import/close_after_import');
    281289            // Reset popup
    282290            HQTemplatesInstall.setProgress(0);
  • hqtheme-extra/trunk/hqtheme-extra.php

    r2499477 r2502724  
    55 * Plugin URI:        https://marmot.hqwebs.net/marmot/?utm_source=wp-admin&utm_medium=link&utm_campaign=default&utm_term=hqtheme-extra&utm_content=plugin-uri
    66 * Description:       HQTheme Extra adds extras for Marmot Theme - Ready sites one click import
    7  * Version:           1.0.14
     7 * Version:           1.0.15
    88 * Requires at least: 5.3
    99 * Requires PHP:      7.2
     
    5757 * @var string
    5858 */
    59 const VERSION = '1.0.14';
     59const VERSION = '1.0.15';
    6060
    6161// Load Autoloader
  • hqtheme-extra/trunk/inc/admin/page/theme-setup-wizzard.php

    r2499477 r2502724  
    137137    private function plugins($step) {
    138138        ?>
    139         <h3><?php _ex('Installing Highly Recommended Plugins', 'admin', 'hqtheme-extra'); ?><br></h3>
     139        <h2><?php _ex('Installing Highly Recommended Plugins', 'admin', 'hqtheme-extra'); ?></h2>
    140140        <p class="m-0"><?php _ex('Marmot theme works with Elementor templates, it also can be used without Elementor, but design and features will be very poor.', 'admin', 'hqtheme-extra'); ?></p>
    141141        <p class="mt-0 mb-4"><?php _ex('The theme also needs our free plugin called HQTheme Extra (available in official WordPress repository). It includes library and some features like one-click demo import. ', 'admin', 'hqtheme-extra'); ?></p>
     
    207207    private function license($step) {
    208208        ?>
    209         <h3><?php _ex('Marmot License', 'admin', 'hqtheme-extra'); ?><br></h3>
     209        <h2><?php _ex('Marmot License', 'admin', 'hqtheme-extra'); ?></h2>
    210210        <p><?php _ex('License activation will enable more features, more pre-made websites and access to all premium plugins.', 'admin', 'hqtheme-extra'); ?></p>
    211211        <?php
     
    262262        }
    263263        ?>
    264         <h3><?php _ex('Import Pre-made Demo Website', 'admin', 'hqtheme-extra'); ?><br></h3>
     264        <h2><?php _ex('Import Pre-made Demo Website', 'admin', 'hqtheme-extra'); ?></h2>
    265265        <p>
    266266            <?php _ex('Importing pre-made demo is best and easiest way to build your website.', 'admin', 'hqtheme-extra'); ?>
    267267        </p>
    268         <p>
    269             <?php _ex('Choose and import demo that fits your needs.', 'admin', 'hqtheme-extra'); ?>
    270         </p>
    271268        <?php
    272269        if ($step < 3 || !defined('\HQExtra\VERSION')) {
     
    281278            return;
    282279        }
    283         ?>
    284         <a href="<?php echo esc_url(admin_url('admin.php?page=marmot-ready-sites')); ?>" class="btn btn-primary mr-1">
    285             <?php _ex('Ready Sites', 'admin', 'hqtheme-extra'); ?>
    286         </a>
    287         <a href="<?php echo esc_url(admin_url('admin.php?page=marmot-theme-setup&wizzard-page=4&skip-demo=1')); ?>" class="">
    288             <?php _ex('Skip this step', 'admin', 'hqtheme-extra'); ?>
    289         </a>
     280        if (get_theme_mod('marmot_demo_imported', 0)) {
     281            ?>
     282            <p>
     283                <?php _ex('Demo is already imported you can  go to next step or choose and import another demo below.', 'admin', 'hqtheme-extra'); ?> <a href="#hqt-import-demo"><i class="dashicons dashicons-arrow-down-alt2"></i></a>
     284            </p>
     285            <a href="<?php echo esc_url(admin_url('admin.php?page=marmot-theme-setup&wizzard-page=4')); ?>" class="btn btn-primary">
     286                <?php _ex('Next step', 'admin', 'hqtheme-extra'); ?>
     287            </a>
     288            <?php
     289        } else {
     290            ?>
     291            <p>
     292                <?php _ex('Choose and import demo that fits your needs below.', 'admin', 'hqtheme-extra'); ?>
     293            </p>
     294            <p>
     295                <a href="#hqt-import-demo" class="btn btn-primary">
     296                    <?php _ex('Choose Demo Website', 'admin', 'hqtheme-extra'); ?>
     297                </a>
     298                <a href="<?php echo esc_url(admin_url('admin.php?page=marmot-theme-setup&wizzard-page=4&skip-demo=1')); ?>" class="ml-2">
     299                    <?php _ex('Skip this step', 'admin', 'hqtheme-extra'); ?>
     300                </a>
     301            </p>
     302            <?php
     303        }
     304        ?>
     305        <div class="wrap hqt-templates-import-screen" id="hqt-import-demo" data-template-type="sites">
     306            <?php
     307            \HQExtra\Demos\Ui::instance()->ready_sites_page();
     308            ?>
     309        </div>
    290310        <?php
    291311    }
  • hqtheme-extra/trunk/inc/demos/import.php

    r2486990 r2502724  
    487487        delete_transient('hqt_installing_demo');
    488488
     489        set_theme_mod('marmot_demo_imported', 1);
     490
    489491        wp_send_json_success([$from, $to]);
    490492    }
  • hqtheme-extra/trunk/inc/hqlib/utils.php

    r2481596 r2502724  
    313313    }
    314314
     315    /**
     316     * Generate menus description text
     317     *
     318     * @since 1.0.15
     319     *
     320     * @return string
     321     */
     322    public static function get_menu_howto() {
     323        /* translators: %1$s is replaced with "one <a> tag" %2$s is replaced with "close </a> tag" */
     324        return sprintf(_x('Before choosing menu, you have to create it %1$shere%2$s. (New menus will appear after refresh.)',
     325                        'settings',
     326                        'hqtheme-extra'),
     327                '<a target="_blank" href="' . esc_url(admin_url('nav-menus.php')) . '">',
     328                '</a>'
     329        );
     330    }
     331
     332    /**
     333     * Generate Contact From 7 description text
     334     *
     335     * @since 1.0.15
     336     *
     337     * @return string
     338     */
     339    public static function get_cf7_howto() {
     340        /* translators: %1$s is replaced with "one <a> tag" %2$s is replaced with "close </a> tag" */
     341        return sprintf(_x('Before choosing form, you have to create it %1$shere%2$s. (New forms will appear after refresh.)',
     342                        'settings',
     343                        'hqtheme-extra'),
     344                '<a target="_blank" href="' . esc_url(admin_url('admin.php?page=wpcf7')) . '">',
     345                '</a>'
     346        );
     347    }
     348
    315349}
  • hqtheme-extra/trunk/readme.txt

    r2499477 r2502724  
    55Tested up to: 5.7
    66Requires PHP: 7.2
    7 Stable tag: 1.0.14
     7Stable tag: 1.0.15
    88License: GPL v2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4848
    4949== Changelog ==
     50
     51= 1.0.15 - 2021-03-24 =
     52* Added help for Navigation Menu
     53* Added help for Contact Form 7
     54* Added Import demo directly form setup wizard
    5055
    5156= 1.0.14 - 2021-03-19 =
Note: See TracChangeset for help on using the changeset viewer.