PluginProbe
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings / 6.0.4
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings v6.0.4
7.2.2 7.2.1 7.2 7.1.2 7.1.1 7.1 7.0.4 7.0.6 7.0.7 6.3.8 6.3.7 6.3.6 6.3.5 6.3.4 6.3.3 6.3.1 trunk 5.7.3 5.7.5 5.8.1 5.8.2 5.8.3 5.8.4 5.8.6 6.0.4 All 37 releases
mlsimport / admin / partials / mlsimport-administrative-options.php

mlsimport-administrative-options.php in MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings 6.0.4, at admin/partials/mlsimport-administrative-options.php

138 lines 5.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 if (isset($_POST['mlsimport_tool_actions']) &&
7 wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['mlsimport_tool_actions'] ) ), 'mlsimport_tool_actions')) {
8
9 if ( isset( $_POST['mlsimport-disable-logs'] ) ) {
10 $disable_logs = intval( $_POST['mlsimport-disable-logs'] );
11 update_option( 'mlsimport_disable_logs', $disable_logs );
12 }
13 if ( isset( $_POST['mlsimport-disable-history'] ) ) {
14 $disable_history = intval( $_POST['mlsimport-disable-history'] );
15 update_option( 'mlsimport-disable-history', $disable_history );
16 }
17
18 }
19 ?>
20
21 <form method="post" name="cleanup_options" action="">
22 <?php
23 global $mlsimport;
24 settings_fields( $this->plugin_name . '_administrative_options' );
25 do_settings_sections( $this->plugin_name . '_administrative_options' );
26 $options = get_option( $this->plugin_name . '_administrative_options' );
27 $mlsimport->admin->mlsimport_saas_setting_up();
28 //mlsimport_saas_event_mls_import_auto_function();
29 //mlsimport_saas_reconciliation_event_function();
30 ?>
31
32 <h1> Administrative Tools</h1>
33
34
35 <?php
36
37
38
39 $disable_logs = intval( get_option( 'mlsimport_disable_logs' ) );
40 $selected_no = $selected_yes = '';
41
42 if ( 0 === intval($disable_logs) ) {
43 $selected_no = ' selected ';
44 } else {
45 $selected_yes = ' selected ';
46 }
47
48
49 $disable_history = intval( get_option( 'mlsimport-disable-history', 1 ) );
50 $selected_history_no = $selected_history_yes = '';
51
52 if ( 0 === intval($disable_history) ) {
53 $selected_history_no = ' selected ';
54 } else {
55 $selected_history_yes = ' selected ';
56 }
57 ?>
58
59 <div class="mlsimport_tool_field_item_wrapper">
60 <h4 style="margin-bottom:0px;"> Disable System Logs (logs should only be enabled during debug process) </h4>
61 <select name="mlsimport-disable-logs" class="mlsimport-2025-select" id="mlsimport-disable-logs">
62 <option value="0" <?php echo esc_html( $selected_no ); ?> >logs disabled</option>
63 <option value="1" <?php echo esc_html( $selected_yes ); ?>>logs enabled</option>
64
65 </select>
66 </div>
67
68
69 <div class="mlsimport_tool_field_item_wrapper">
70 <h4 style="margin-bottom:0px;"> Disable Property History (can be seen by editing a property in WordPress admin) </h4>
71 <select name="mlsimport-disable-history" class="mlsimport-2025-select" id="mlsimport-disable-history">
72
73 <option value="1" <?php echo esc_html( $selected_history_yes ); ?>>history enabled</option>
74 <option value="0" <?php echo esc_html( $selected_history_no ); ?> >history disabled</option>
75
76 </select>
77 </div>
78
79
80
81 <?php submit_button( __( 'Save Changes', 'mlsimport' ), 'mlsimport_button button save_data', 'submit', true ); ?>
82
83 <div class="mlsimport_tool_field_item_wrapper" style="background-color: #eee;padding: 10px;border-radius: 5px;">
84 <h3 style="margin-bottom:20px;"> Clear cached data </h3>
85 <input class="button mlsimport_button " type="button" id="mlsimport-clear-cache" value="Clear Plugin Cached Data" />
86 </div>
87
88 <div class="mlsimport_tool_field_item_wrapper" style="background-color: #eee;padding: 10px;border-radius: 5px;">
89 <h3 style="margin-bottom:20px;"> Clear fields data </h3>
90 <input class="button mlsimport_button " type="button" id="mlsimport-clear-fields-data" value="Clear Field Data" />
91 </div>
92
93
94 <div class="mlsimport_tool_field_item_wrapper">
95 <h3 style="margin-bottom:0px;">Cron Jobs </h3>
96 <div class="cron_job_explainin">
97 By default a syncronization event runs every hour. The action will be triggered when someone visits your site if the scheduled time has passed. This is the default, "out of the box" way to do things in WordPress and it works very well in 99% of the cases.
98
99 </br></br>If, for some reason, you want to force the syncronization event to run every two hours(minimum time frame permitted by this plugin) you can set a cron job on your server enviroment and call this url : http://yourwebsite.com/?mlsimport_cron=yes.
100 </br></br><strong>Example : 0 */2 * * * wget https://yourwebsite.com/?mlsimport_cron=yes</strong> .
101 </div>
102 <div>
103
104 <fieldset class="mlsimport-fieldset" style="background-color: #eee;padding: 10px;border-radius: 5px;">
105
106 <h3><?php esc_html__('Delete Properties','mlsimport'); ?></h3>
107
108 <div id="mlsimport-delete-notification" ><?php esc_html_e('Please fill all the forms','mlsimport');?></div>
109
110
111 <label class="mlsimport-label" for="<?php echo esc_attr($this->plugin_name) . '_administrative_options'; ?>-import" >
112 <?php echo esc_html__( 'Delete from Category', 'mlsimport' ); ?>
113 </label></br>
114 <input type="text" class="mlsimport-input mlsimport-2025-input" id="mlsimport_delete_category"></br>
115 </br>
116 <label class="mlsimport-label" for="<?php echo esc_attr($this->plugin_name) . '_administrative_options'; ?>-import" >
117 <?php echo esc_html__( 'Delete the term from category(use term slug)', 'mlsimport' ); ?>
118 </label></br>
119 <input type="text" class="mlsimport-input mlsimport-2025-input" id="mlsimport_delete_category_term"></br>
120 </br>
121 <label class="mlsimport-label" for="<?php echo esc_attr($this->plugin_name) . '_administrative_options'; ?>-import" >
122 <?php esc_html_e('Pause the script between property delete processes (1=1 sec . For slow hosting use a number between 1 and 5)','mlsimport'); ?>
123 </label>
124
125 <input type="text" class="mlsimport-input mlsimport-2025-input" id="mlsimport_delete_timeout" value="0">
126
127 </br>
128 <input class="button mlsimport_button error_action" type="button" id="mlsimport-delete-prop" value="Delete" />
129 </fieldset>
130 <?php
131 $ajax_nonce = wp_create_nonce( "mlsimport_tool_actions" );
132 ?>
133
134 <input type="hidden" id="mlsimport_tool_actions" name="mlsimport_tool_actions" value="<?php echo esc_attr($ajax_nonce); ?>" />
135
136 <input type="hidden" name="action" value="mlsimport_form_action">
137 </form>
138