PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
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.9, at application/views/wdk_install/index.php

145 lines 7.0 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 esc_html__('Demo Import', 'wpdirectorykit'); ?></h1>
19 <div class="wdk-body">
20 <?php if($installed):?>
21 <div class="notice notice-success">
22 <p>
23 <?php echo esc_html__('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 esc_html__('Are you sure? All Listings, fields, categories, locations will be completely removed, check url and type remove if you are sure', 'wpdirectorykit')?>', '') == '<?php echo esc_html__('remove', 'wpdirectorykit')?>');" class="button button-primary" id="reset_data_field_button">
25 <?php echo esc_html__('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 esc_html__('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 esc_html__('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 esc_html__('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 esc_html__('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
65 // Allow <div> tags with certain classes through wp_kses
66 $allowed_html = array(
67 'div' => array(
68 'class' => array(),
69 'role' => array(),
70 'style' => array(),
71 'id' => array()
72 ),
73 'p' => array(
74 'class' => array(),
75 'style' => array(),
76 ),
77 'span' => array(
78 'class' => array(),
79 'style' => array(),
80 ),
81 'a' => array(
82 'href' => array(),
83 'class' => array(),
84 'id' => array(),
85 'style' => array(),
86 'target' => array(),
87 'data-function' => array(),
88 'data-arg' => array(),
89 ),
90 'strong' => array(),
91 'b' => array(),
92 'em' => array(),
93 'br' => array(),
94 // Add other tags and attributes as necessary
95 );
96
97 if (isset($info_log_message)) {
98 echo wp_kses($info_log_message, $allowed_html);
99 }
100 if (isset($import_log)) {
101 echo wp_kses($import_log, $allowed_html);
102 }
103 ?>
104
105 <?php wdk_generate_fields($fields, $db_data); ?>
106 </div>
107 </div>
108 <?php if(!$installed || true):?>
109
110 <?php if(!function_exists('eli_installer') || !function_exists('run_elementinvader') || !is_plugin_active('elementor/elementor.php')):?>
111 <?php
112 $tgma_link = '';
113 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')) {
114 $tgma_link = get_admin_url() . "themes.php?page=tgmpa-install-plugins";
115 } else {
116 $tgma_link = get_admin_url() . "plugins.php?page=tgmpa-install-plugins";
117 }
118 ?>
119 <a href="<?php echo esc_url($tgma_link); ?>" class="button button-primary">
120 <?php echo esc_html__('Begin to install / activate','wpdirectorykit'); ?>
121 </a>
122 <?php else:?>
123 <input type="submit" name="submit" id="submit" class="button button-primary event-ajax-indicator" value="<?php echo esc_html__('Import demo data', 'wpdirectorykit'); ?>"> <span class="wdk-ajax-indicator wdk-infinity-load color-primary dashicons dashicons-update-alt hidden" style="margin-left: 4px;"></span>
124 <?php endif;?>
125
126 <?php endif;?>
127 <?php if(!empty($import_log) && stripos($import_log,'alert-succes') !== FALSE && stripos($import_log,'alert-danger') === FALSE):?>
128 <a href="<?php echo esc_url(home_url());?>" class="button button-secondary" target="_blank"><?php echo esc_html__('Check your results page now', 'wpdirectorykit'); ?></a>
129 <?php endif;?>
130 </form>
131 </div>
132 </div>
133
134 <script>
135 jQuery(document).ready(function($) {
136 $('form input[type="submit"]').on('click', function(){
137 var self = $(this);
138 setTimeout(function(){
139 self.delay(2000).attr("disabled", true)
140 },0)
141 })
142 })
143 </script>
144
145 <?php $this->view('general/footer', $data); ?>