PluginProbe
WP Directory Kit / 1.5.5
WP Directory Kit v1.5.5
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
wpdirectorykit / application / views / wdk_install / index.php

index.php in WP Directory Kit 1.5.5, at application/views/wdk_install/index.php

106 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Demo Import.
4 *
5 * This is the template that edit form
6 *
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13
14 <!-- This file should primarily consist of HTML with a little bit of PHP. -->
15
16 <div class="wrap wdk-wrap">
17
18 <h1 class="wp-heading-inline"><?php echo __('Demo Import', 'wpdirectorykit'); ?></h1>
19 <div class="wdk-body">
20 <?php if($installed):?>
21 <div class="notice notice-success">
22 <p>
23 <?php echo __('Some data already exists, please remove all data if you want to full import again','wpdirectorykit'); ?>
24 <a href="<?php echo esc_url(admin_url("admin.php?page=wdk_settings&function=remove&redirect_url=on_install&multipurpose=".wmvc_show_data('multipurpose', $_GET, '')."&_wpnonce=".wp_create_nonce( 'remove-data' ))); ?>" onclick="return (prompt('<?php echo __('Are you sure? All Listings, fields, categories, locations will be completely removed, check url and type remove if you are sure', 'wpdirectorykit')?>', '') == '<?php echo __('remove', 'wpdirectorykit')?>');" class="button button-primary" id="reset_data_field_button">
25 <?php echo __('Remove all data','wpdirectorykit'); ?>
26 </a>
27 </p>
28 </div>
29 <?php endif;?>
30 <?php if($required_plugins):?>
31 <?php
32 $tgma_link = '';
33 if(file_exists(get_template_directory().'/includes/tgm_pa/class-tgm-plugin-activation.php') || file_exists(get_template_directory().'/tgm_pa/class-tgm-plugin-activation.php')) {
34 $tgma_link = get_admin_url() . "themes.php?page=tgmpa-install-plugins";
35 } else {
36 $tgma_link = get_admin_url() . "plugins.php?page=tgmpa-install-plugins";
37 }
38 ?>
39 <div class="notice notice-error">
40 <p>
41 <?php echo __('You don\'t have required plugins installed, do you want to install it first?','wpdirectorykit'); ?>
42 <a href="<?php echo esc_url($tgma_link); ?>" class="button button-primary">
43 <?php echo __('Begin to install / activate','wpdirectorykit'); ?>
44 </a>
45 </p>
46 </div>
47
48
49 <?php endif;?>
50 <form method="post" action="" novalidate="novalidate">
51 <?php wp_nonce_field( 'wdk-settings_import', '_wpnonce'); ?>
52 <div class="postbox" style="display: block;">
53 <div class="postbox-header">
54 <h3><?php echo __('Demo Data Importer Tool', 'wpdirectorykit'); ?></h3>
55 </div>
56 <div class="inside">
57 <div class="">
58 <?php
59 $max_time = ini_get("max_execution_time");
60 if($max_time < 120):?>
61 <div class="alert alert-danger" role="alert"><?php echo __('For import max_execution_time should be more then 120s, please contact with admin host to increase','wpdirectorykit'); ?></div>
62 <?php endif;?>
63 </div>
64 <?php echo wmvc_xss_clean($info_log_message);?>
65 <?php echo wmvc_xss_clean($import_log);?>
66 <?php echo wdk_generate_fields($fields, $db_data); ?>
67 </div>
68 </div>
69 <?php if(!$installed || true):?>
70
71 <?php if(!function_exists('eli_installer') || !function_exists('run_elementinvader') || !is_plugin_active('elementor/elementor.php')):?>
72 <?php
73 $tgma_link = '';
74 if(file_exists(get_template_directory().'/includes/tgm_pa/class-tgm-plugin-activation.php') || file_exists(get_template_directory().'/tgm_pa/class-tgm-plugin-activation.php')) {
75 $tgma_link = get_admin_url() . "themes.php?page=tgmpa-install-plugins";
76 } else {
77 $tgma_link = get_admin_url() . "plugins.php?page=tgmpa-install-plugins";
78 }
79 ?>
80 <a href="<?php echo esc_url($tgma_link); ?>" class="button button-primary">
81 <?php echo __('Begin to install / activate','wpdirectorykit'); ?>
82 </a>
83 <?php else:?>
84 <input type="submit" name="submit" id="submit" class="button button-primary event-ajax-indicator" value="<?php echo __('Import demo data', 'wpdirectorykit'); ?>"> <span class="wdk-ajax-indicator wdk-infinity-load color-primary dashicons dashicons-update-alt hidden" style="margin-left: 4px;"></span>
85 <?php endif;?>
86
87 <?php endif;?>
88 <?php if(!empty($import_log) && stripos($import_log,'alert-succes') !== FALSE && stripos($import_log,'alert-danger') === FALSE):?>
89 <a href="<?php echo esc_url(home_url());?>" class="button button-secondary" target="_blank"><?php echo __('Check your results page now', 'wpdirectorykit'); ?></a>
90 <?php endif;?>
91 </form>
92 </div>
93 </div>
94
95 <script>
96 jQuery(document).ready(function($) {
97 $('form input[type="submit"]').on('click', function(){
98 var self = $(this);
99 setTimeout(function(){
100 self.delay(2000).attr("disabled", true)
101 },0)
102 })
103 })
104 </script>
105
106 <?php $this->view('general/footer', $data); ?>