PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.85
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.85
5.5.85 5.5.84 5.5.83 5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 All 161 releases
← All changes | WPDataAccess/Dashboard/WPDA_Dashboard.php +28 -314 5.5.79 → 5.5.85 View file →
@@ -175,10 +175,8 @@
175 175 * @var string|null
176 176 */
177 177 protected $message_type = null;
178 178
179 - private $current_version;
180 -
181 179 private $option_legacy_tools;
182 180
183 181 /**
184 182 * Constructor
@@ -192,9 +190,8 @@
192 190 $this->wp_nonce_save = wp_create_nonce( static::DASHBOARD_SAVE . WPDA::get_current_user_login() );
193 191 // Load Data Tables resources.
194 192 \WPDataAccess\Data_Tables\WPDA_Data_Tables::enqueue_styles_and_script();
195 193 }
196 - $this->current_version = get_user_meta( WPDA::get_current_user_id(), 'wpda_data_explorer', true );
197 194 // Start with empty array.
198 195 if ( $widget_mode ) {
199 196 update_user_meta( WPDA::get_current_user_id(), self::USER_DASHBOARD, array() );
200 197 }
@@ -236,17 +233,9 @@
236 233 $this->dashboard_js();
237 234 break;
238 235 case WP_Data_Access_Admin::PAGE_MAIN:
239 236 if ( !isset( $_REQUEST['page_action'] ) ) {
240 - if ( !isset( $_REQUEST['table_name'] ) ) {
241 - $this->toolbar_wpda();
242 - } else {
243 - if ( !isset( $_REQUEST['action'] ) || 'new' !== $_REQUEST['action'] && 'edit' !== $_REQUEST['action'] ) {
244 - $this->toolbar_wpda_table();
245 - } else {
246 - $this->toolbar_wpda_row();
247 - }
248 - }
237 + $this->toolbar_wpda();
249 238 } elseif ( 'wpda_backup' === $_REQUEST['page_action'] && (!isset( $_REQUEST['action'] ) || 'remove' === $_REQUEST['action'] || 'update' === $_REQUEST['action'] || 'add' === $_REQUEST['action']) ) {
250 239 $this->toolbar_backup();
251 240 } elseif ( 'wpda_import_csv' === $_REQUEST['page_action'] ) {
252 241 $this->toolbar_import_csv();
@@ -254,11 +243,8 @@
254 243 break;
255 244 case WP_Data_Access_Admin::PAGE_APPS:
256 245 $this->toolbar_apps();
257 246 break;
258 - case WP_Data_Access_Admin::PAGE_QUERY_BUILDER:
259 - $this->toolbar_sql();
260 - break;
261 247 case WP_Data_Access_Admin::PAGE_DESIGNER:
262 248 if ( !isset( $_REQUEST['action'] ) || 'new' !== $_REQUEST['action'] && 'edit' !== $_REQUEST['action'] ) {
263 249 $this->toolbar_designer();
264 250 }
@@ -332,9 +318,9 @@
332 318 $help_url = 'https://docs.wpdataaccess.com/';
333 319 if ( isset( $_REQUEST['page'] ) ) {
334 320 switch ( $_REQUEST['page'] ) {
335 321 case \WP_Data_Access_Admin::PAGE_MAIN:
336 - $help_url = 'https://docs.legacy.wpdataaccess.com/docs/data-explorer-getting-started/';
322 + $help_url = 'https://docs.explorer.wpdataaccess.com/';
337 323 break;
338 324 case \WP_Data_Access_Admin::PAGE_APPS:
339 325 $help_url = 'https://docs.rad.wpdataaccess.com/';
340 326 break;
@@ -934,37 +920,18 @@
934 920 </a>
935 921 </div>
936 922 </div><div>
937 923 <div>
938 - <?php
939 - if ( 'new' !== $this->current_version && '' !== $this->current_version ) {
940 - ?>
941 - <a onclick="jQuery('#upload_file_container_multi').show();"
942 - href="javascript:void(0)"
943 - class="wpda-dashboard-item wpda_tooltip"
944 - title="Import and execute SQL script files"
945 - >
946 - <i class="fas fa-file-code"></i>
947 - <div>
948 - Import SQL files
949 - </div>
950 - </a>
951 - <?php
952 - } else {
953 - ?>
954 - <a onClick="window.ppActionEnableImport();"
955 - href="javascript:void(0)"
956 - class="wpda-dashboard-item wpda_tooltip"
957 - title="Import and execute SQL script files"
958 - >
959 - <i class="fas fa-file-code"></i>
960 - <div>
961 - Import SQL files
962 - </div>
963 - </a>
964 - <?php
965 - }
966 - ?>
924 + <a onClick="window.ppActionEnableImport();"
925 + href="javascript:void(0)"
926 + class="wpda-dashboard-item wpda_tooltip"
927 + title="Import and execute SQL script files"
928 + >
929 + <i class="fas fa-file-code"></i>
930 + <div>
931 + Import SQL files
932 + </div>
933 + </a>
967 934 </div><div>
968 935 <a href="<?php
969 936 echo esc_url( admin_url( 'admin.php' ) );
970 937 ?>?page=<?php
@@ -1007,75 +974,24 @@
1007 974 </div><?php
1008 975 }
1009 976 ?>
1010 977 </div><div>
1011 - <?php
1012 - if ( 'new' !== $this->current_version && '' !== $this->current_version ) {
1013 - ?>
1014 - <div>
1015 - <a onclick="jQuery('#wpda_db_container').show(); jQuery('#local_database').focus();"
1016 - href="javascript:void(0)"
1017 - class="wpda-dashboard-item wpda_tooltip"
1018 - title="Add remote database or create local database"
1019 - >
1020 - <i id="wpda_toolbar_icon_add_database" class="fas fa-database"></i>
1021 - <div>
1022 - Add database
1023 - </div>
1024 - </a>
1025 - </div>
1026 - <?php
1027 - } else {
1028 - ?>
1029 - <div>
1030 - <a onclick="jQuery('#wpda_manage_databases').show(); jQuery('#local_database').focus();"
1031 - href="javascript:void(0)"
1032 - class="wpda-dashboard-item wpda_tooltip"
1033 - title="Manage remote database connections and local databases"
1034 - >
1035 - <i id="wpda_toolbar_icon_add_database" class="fas fa-server"></i>
1036 - <div>
1037 - Databases
1038 - </div>
1039 - </a>
1040 - </div><?php
1041 - }
978 + <div>
979 + <a onclick="jQuery('#wpda_manage_databases').show(); jQuery('#local_database').focus();"
980 + href="javascript:void(0)"
981 + class="wpda-dashboard-item wpda_tooltip"
982 + title="Manage remote database connections and local databases"
983 + >
984 + <i id="wpda_toolbar_icon_add_database" class="fas fa-server"></i>
985 + <div>
986 + Databases
987 + </div>
988 + </a>
989 + </div><?php
1042 990 ?>
1043 - <?php
1044 - ?>
1045 991 </div>
1046 992 </div>
1047 - <div class="wpda-promotion" style="font-size: 16px">
1048 - <?php
1049 - if ( 'new' !== $this->current_version && '' !== $this->current_version ) {
1050 - ?>
1051 - <a href="?page=<?php
1052 - echo esc_attr( WP_Data_Access_Admin::PAGE_MAIN );
1053 - ?>&de=new"
1054 - style="display: flex; align-items: center; gap: 5px;"
1055 - >
1056 - <i class="fas fa-toggle-off"></i>
1057 - <span>Switch to new Data Explorer</span>
1058 - </a>
1059 - <?php
1060 - } else {
1061 - ?>
1062 - <span
1063 - style="display: flex; align-items: center; gap: 5px; white-space: nowrap;"
1064 - >
1065 - <a href="?page=<?php
1066 - echo esc_attr( WP_Data_Access_Admin::PAGE_MAIN );
1067 - ?>&de=old"
1068 - style="display: flex; align-items: center; gap: 5px; white-space: nowrap;"
1069 - >
1070 - <i class="fas fa-toggle-on"></i>
1071 - <span>Switch to old Data Explorer</span>
1072 - </a>
1073 - </span>
1074 - <?php
1075 - }
1076 - ?>
1077 - </div>
993 + <div></div>
1078 994 <?php
1079 995 //$this->get_promotions('wpda');
1080 996 ?>
1081 997 </div>
@@ -1082,109 +998,8 @@
1082 998 <?php
1083 999 }
1084 1000
1085 1001 /**
1086 - * Data Explorer table page toolbar
1087 - *
1088 - * @return void
1089 - */
1090 - protected function toolbar_wpda_table() {
1091 - ?>
1092 - <form id="wpda_new_row" style="display: none" method="post" action="?page=<?php
1093 - echo esc_attr( WP_Data_Access_Admin::PAGE_MAIN );
1094 - ?>">
1095 - <?php
1096 - if ( isset( $_REQUEST['wpdaschema_name'] ) ) {
1097 - $schema_name = esc_attr( sanitize_text_field( wp_unslash( $_REQUEST['wpdaschema_name'] ) ) );
1098 - // phpcs:disable WordPress.Security.EscapeOutput
1099 - echo "<input type='hidden' name='wpdaschema_name' value='{$schema_name}'>";
1100 - // phpcs:enable WordPress.Security.EscapeOutput
1101 - }
1102 - ?>
1103 - <input type="hidden" id="wpda_new_row_table_name" name="table_name" value="">
1104 - <input type="hidden" name="action" value="new">
1105 - </form>
1106 - <div id="wpda-dashboard-toolbar" class="wpda-dashboard-toolbar" style="display:none">
1107 - <div class="wpda-nowrap">
1108 - <div>
1109 - <div>
1110 - <a href="javascript:void(0)"
1111 - id="wpda_toolbar_icon_add_row"
1112 - class="wpda-dashboard-item wpda_tooltip"
1113 - title="Add new row to table"
1114 - >
1115 - <i class="fas fa-plus-circle"></i>
1116 - <div>
1117 - Add row
1118 - </div>
1119 - </a>
1120 - </div><div>
1121 - <a onclick="jQuery('#upload_file_container').show()"
1122 - href="javascript:void(0)"
1123 - class="wpda-dashboard-item wpda_tooltip"
1124 - title="Allows only imports into table authors"
1125 - >
1126 - <i class="fas fa-code"></i>
1127 - <div>
1128 - Import rows
1129 - </div>
1130 - </a>
1131 - </div>
1132 - </div>
1133 - </div>
1134 - <?php
1135 - $this->get_promotions( 'table' );
1136 - ?>
1137 - </div>
1138 - <?php
1139 - }
1140 -
1141 - /**
1142 - * Data Explorer data entry form toolbar
1143 - *
1144 - * @return void
1145 - */
1146 - protected function toolbar_wpda_row() {
1147 - ?>
1148 - <form id="wpda_new_row" style="display: none" method="post" action="?page=<?php
1149 - echo esc_attr( WP_Data_Access_Admin::PAGE_MAIN );
1150 - ?>">
1151 - <?php
1152 - if ( isset( $_REQUEST['wpdaschema_name'] ) ) {
1153 - $schema_name = esc_attr( sanitize_text_field( wp_unslash( $_REQUEST['wpdaschema_name'] ) ) );
1154 - // phpcs:disable WordPress.Security.EscapeOutput
1155 - echo "<input type='hidden' name='wpdaschema_name' value='{$schema_name}'>";
1156 - // phpcs:enable WordPress.Security.EscapeOutput
1157 - }
1158 - ?>
1159 - <input type="hidden" id="wpda_new_row_table_name" name="table_name" value="">
1160 - <input type="hidden" name="action" value="new">
1161 - </form>
1162 - <div id="wpda-dashboard-toolbar" class="wpda-dashboard-toolbar" style="display:none">
1163 - <div class="wpda-nowrap">
1164 - <div>
1165 - <div>
1166 - <a href="javascript:void(0)"
1167 - id="wpda_toolbar_icon_add_row"
1168 - class="wpda-dashboard-item wpda_tooltip"
1169 - title="Add new row to table"
1170 - >
1171 - <i class="fas fa-plus-circle"></i>
1172 - <div>
1173 - Add row
1174 - </div>
1175 - </a>
1176 - </div>
1177 - </div>
1178 - </div>
1179 - <?php
1180 - $this->get_promotions( 'row' );
1181 - ?>
1182 - </div>
1183 - <?php
1184 - }
1185 -
1186 - /**
1187 1002 * Data Backup toolbar
1188 1003 *
1189 1004 * @return void
1190 1005 */
@@ -1335,109 +1150,8 @@
1335 1150 <?php
1336 1151 }
1337 1152
1338 1153 /**
1339 - * Query Builder toolbar
1340 - *
1341 - * @return void
1342 - */
1343 - protected function toolbar_sql() {
1344 - $current_query_builder_version = get_user_meta( WPDA::get_current_user_id(), 'wpda_query_builder_version', true );
1345 - ?>
1346 - <div id="wpda-dashboard-toolbar" class="wpda-dashboard-toolbar" style="display:none">
1347 - <div class="wpda-nowrap">
1348 - <div>
1349 - <?php
1350 - if ( 'old' === $current_query_builder_version ) {
1351 - ?>
1352 - <div>
1353 - <a href="javascript:tabNew()"
1354 - class="wpda-dashboard-item wpda_tooltip"
1355 - title="Create new query"
1356 - >
1357 - <i class="fas fa-plus-circle"></i>
1358 - <div>
1359 - Create new query
1360 - </div>
1361 - </a>
1362 - </div><div>
1363 - <a href="javascript:openQuery()"
1364 - class="wpda-dashboard-item wpda_tooltip"
1365 - title="Open existing query"
1366 - >
1367 - <i class="fas fa-folder-open"></i>
1368 - <div>
1369 - Open existing query
1370 - </div>
1371 - </a>
1372 - </div>
1373 - <?php
1374 - } else {
1375 - ?>
1376 - <div>
1377 - <a href="javascript:void(0)"
1378 - onclick="ppActionOpenQueriesMenu(event)"
1379 - class="wpda-dashboard-item wpda_tooltip"
1380 - title="Create new query"
1381 - >
1382 - <i class="fas fa-bars"></i>
1383 - <div>
1384 - Menu
1385 - </div>
1386 - </a>
1387 - </div><div>
1388 - <a href="javascript:void(0)"
1389 - onclick="ppActionFullScreen()"
1390 - class="wpda-dashboard-item wpda_tooltip"
1391 - title="Switch to full screen mode"
1392 - >
1393 - <i class="fas fa-expand"></i>
1394 - <div>
1395 - Full Screen
1396 - </div>
1397 - </a>
1398 - </div>
1399 - <?php
1400 - }
1401 - ?>
1402 - </div>
1403 - </div>
1404 - <div class="wpda-promotion" style="font-size: 16px">
1405 - <?php
1406 - if ( 'old' !== $current_query_builder_version ) {
1407 - ?>
1408 - <span
1409 - style="display: flex; align-items: center; gap: 5px; white-space: nowrap;"
1410 - >
1411 - <a href="?page=<?php
1412 - echo esc_attr( WP_Data_Access_Admin::PAGE_QUERY_BUILDER );
1413 - ?>&qb=old"
1414 - style="display: flex; align-items: center; gap: 5px; white-space: nowrap;"
1415 - >
1416 - <i class="fas fa-toggle-on"></i>
1417 - <span>Switch to old Query Builder</span>
1418 - </a>
1419 - </span>
1420 - <?php
1421 - } else {
1422 - ?>
1423 - <a href="?page=<?php
1424 - echo esc_attr( WP_Data_Access_Admin::PAGE_QUERY_BUILDER );
1425 - ?>&qb=new"
1426 - style="display: flex; align-items: center; gap: 5px;"
1427 - >
1428 - <i class="fas fa-toggle-off"></i>
1429 - <span>Switch to new Query Builder</span>
1430 - </a>
1431 - <?php
1432 - }
1433 - ?>
1434 - </div>
1435 - </div>
1436 - <?php
1437 - }
1438 -
1439 - /**
1440 1154 * Data Designer toolbar
1441 1155 *
1442 1156 * @return void
1443 1157 */
@@ -1467,9 +1181,9 @@
1467 1181 Create table design
1468 1182 </div>
1469 1183 </a>
1470 1184 </div><div>
1471 - <a onclick="jQuery('#upload_file_container').show()"
1185 + <a onclick="alert('This feature has been removed. Please use the Data Explorer import feature.')"
1472 1186 href="javascript:void(0)"
1473 1187 class="wpda-dashboard-item wpda_tooltip"
1474 1188 title="Import table designs"
1475 1189 >
@@ -1515,9 +1229,9 @@
1515 1229 Create data table
1516 1230 </div>
1517 1231 </a>
1518 1232 </div><div>
1519 - <a onclick="jQuery('#upload_file_container').show()"
1233 + <a onclick="alert('This feature has been removed. Please use the Data Explorer import feature.')"
1520 1234 href="javascript:void(0)"
1521 1235 class="wpda-dashboard-item wpda_tooltip"
1522 1236 title="Import data tables"
1523 1237 >
@@ -1574,9 +1288,9 @@
1574 1288 Create project
1575 1289 </div>
1576 1290 </a>
1577 1291 </div><div>
1578 - <a onclick="jQuery('#upload_file_container_multi').show()"
1292 + <a onclick="jQuery(alert('This feature has been removed. Please use the Data Explorer import feature.')).show()"
1579 1293 href="javascript:void(0)"
1580 1294 class="wpda-dashboard-item wpda_tooltip"
1581 1295 title="Import projects"
1582 1296 >