PluginProbe
WPCasa – Real Estate for WordPress / trunk
WPCasa – Real Estate for WordPress vtrunk
1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.1.1 trunk 1.2.0 1.2.1 1.2.10 1.2.10.1 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.2.9.1 1.2.9.2 1.3.0 All 31 releases
wpcasa / includes / admin / views / page-tools.php

page-tools.php in WPCasa – Real Estate for WordPress trunk, at includes/admin/views/page-tools.php

142 lines 7.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2 <div id="settings-tools" class="settings_panel">
3 <?php
4 $tools_message_array = [
5 'reset_settings' => esc_html__( 'Settings reset.', 'wpcasa' ),
6 // 'migrate_data' => __( 'Migrate map data completed successfully.' ),
7 'delete_all_transients' => esc_html__( 'All transients removed.', 'wpcasa' ),
8 'delete_all_data' => esc_html__( 'All data deleted.', 'wpcasa' )
9 ];
10
11 foreach ( $tools_message_array as $key => $message ) {
12 if ( filter_input( INPUT_GET, $key, FILTER_SANITIZE_ENCODED ) === 'success' ) {
13 flush_rewrite_rules();
14 echo '<div class="fade notice notice-success"><p>' . esc_html( $message ) . '</p></div>'; ?>
15 <script>
16 if (typeof window.history.pushState == 'function') {
17 window.history.pushState({}, "Hide", "<?php echo esc_url( sanitize_url( $_SERVER['PHP_SELF'] ) ) . '?page=wpsight-settings'; ?>")
18 }
19 </script>
20 <?php
21 }
22 }
23 ?>
24 <div class="wpsight-admin-ui-container">
25
26 <div class="wpsight-admin-ui-grid">
27
28 <div class="wpsight-admin-ui-grid-col wpsight-admin-ui-grid-1-1">
29
30 <div class="wpsight-admin-ui-panel wpsight-admin-ui-panel-large">
31
32 <table class="form-table">
33
34 <tr valign="top">
35
36 <th scope="row" colspan="2">
37
38 <div class="wpsight-admin-ui-heading">
39
40 <div class="wpsight-admin-ui-heading-title">
41
42 <span class="wpsight-admin-ui-icon"><span class="dashicons dashicons-admin-tools"></span></span>
43 <h3><?php echo esc_html__( 'Tools', 'wpcasa' ); ?></h3>
44 <small> - <?php echo esc_html__( 'A collection of WPCasa tools', 'wpcasa' ); ?></small>
45
46 </div>
47
48 <div class="wpsight-admin-ui-heading-actions">
49 <a href="https://docs.wpcasa.com/" class="button button-primary" target="_blank"><?php echo esc_html__( 'View Documentation', 'wpcasa' ); ?></a>
50 </div>
51
52 </div>
53
54 </th>
55
56 </tr>
57
58 <tr valign="top">
59
60 <th scope="row">
61 <label><?php echo esc_html__( 'Restore Defaults', 'wpcasa' ); ?></label>
62 <p class="description"><?php echo esc_html__( 'This will restore all the settings to the defaults. Use this if you want to start over again.', 'wpcasa' ); ?></p>
63 </th>
64
65 <td>
66 <div class="wpsight-settings-field-wrap wpsight-settings-field-reset-wrap">
67 <div class="wpsight-settings-field wpsight-settings-field-reset">
68 <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
69 <input type="hidden" name="action" value="reset_settings">
70 <?php wp_nonce_field("reset", "reset_settings"); ?>
71 <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( 'Reset Settings', 'wpcasa' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'Are you sure?', 'wpcasa' ) ); ?>' );" />
72 </form>
73 </div>
74 </div>
75 </td>
76
77 <!-- </tr>-->
78
79 <!-- <tr valign="top">-->
80
81 <!-- <th scope="row">-->
82 <!-- <label>--><?php //_e( 'Delete all Transients', 'wpcasa' ); ?><!--</label>-->
83 <!-- <p class="description">--><?php //_e( 'Transients are used in order to store specific kind of data. For example it stores currency exchange rates but also license information. You can safely delete all transients in order to see if it helps fixing an issue you came across.', 'wpcasa' ); ?><!--</p>-->
84 <!-- </th>-->
85
86 <!-- <td>-->
87
88 <!-- <div class="wpsight-settings-field-wrap wpsight-settings-field-reset-wrap">-->
89 <!-- <div class="wpsight-settings-field wpsight-settings-field-reset">-->
90 <!-- <form method="post" action="--><?php //echo admin_url( 'admin-post.php' ); ?><!--">-->
91 <!-- <input type="hidden" name="action" value="delete_all_transients">-->
92 <!-- --><?php //wp_nonce_field("delete_transients", "delete_all_transients"); ?>
93 <!-- <input type="submit" class="reset-button button-secondary" name="delete_transients" value="--><?php //esc_attr_e( 'Delete Data', 'wpcasa' ); ?><!--" -->
94 <!-- onclick="return confirm( '--><?php //print esc_js( __( 'Do you really want to perform the migration?', 'wpcasa' ) ); ?><!--' );" />-->
95 <!-- </form>-->
96 <!-- </div>-->
97 <!-- </div>-->
98 <!---->
99 <!-- </td>-->
100
101 <!-- </tr>-->
102
103 <tr valign="top">
104
105 <th scope="row">
106 <label><?php echo esc_html__( 'Delete all Data', 'wpcasa' ); ?></label>
107 <p class="description"><?php echo esc_html__( 'This will erase all data completely. Use this if you want to start over. Keep in mind that this does only erase WPCasa-related data and dont touch data from any other plugins. If you want to completely reset your site we would recommend to have a look at WP Reset.', 'wpcasa' ); ?></p>
108 </th>
109
110 <td>
111
112 <div class="wpsight-settings-field-wrap wpsight-settings-field-reset-wrap">
113 <div class="wpsight-settings-field wpsight-settings-field-reset">
114 <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
115 <input type="hidden" name="action" value="delete_all_data">
116 <?php wp_nonce_field("delete_data", "delete_all_data"); ?>
117 <input type="submit" class="reset-button button-secondary" name="delete_data" value="<?php esc_attr_e( 'Delete Data', 'wpcasa' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'Do you really want to perform the migration?', 'wpcasa' ) ); ?>' );" />
118 </form>
119 </div>
120 </div>
121
122 </td>
123
124 </tr>
125
126 </table>
127
128 </div>
129
130 </div>
131 </div>
132
133 </div>
134
135 </div>
136
137 </div>
138
139
140
141
142