PluginProbe
WP Data Access – App Builder for Tables, Forms, Dashboards, Charts & Maps / 5.5.84
WP Data Access – App Builder for Tables, Forms, Dashboards, Charts & Maps v5.5.84
5.5.87 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 All 162 releases
← All changes | WPDataAccess/Utilities/WPDA_Add_App_To_Menu.php +23 -5 5.5.36 → 5.5.84 View file →
@@ -13,9 +13,8 @@
13 13 public function add_apps_to_menu() {
14 14
15 15 $apps = WPDA_App_Model::add_to_dashboard_menu();
16 16 foreach ( $apps as $app ) {
17 -
18 17 $settings = json_decode( $app['app_settings'], true );
19 18 if (
20 19 ! isset(
21 20 $settings['rest_api']['authorization'],
@@ -38,9 +37,26 @@
38 37 }
39 38 }
40 39
41 40 $title = $settings['settings']['app_menu_title'];
42 - if ( is_admin() ) {
41 + $icon = 'dashicons-database-view';
42 + switch ($app['app_type']) {
43 + case 1:
44 + case 3:
45 + case 4:
46 + $icon = 'dashicons-edit';
47 + break;
48 + case 2:
49 + $icon = 'dashicons-location';
50 + break;
51 + case 6:
52 + $icon = 'dashicons-chart-bar';
53 + break;
54 + case 7:
55 + $icon = 'dashicons-dashboard';
56 + break;
57 + }
58 + if ( is_admin() ) {
43 59 // Add app to dashboard menu
44 60 add_menu_page(
45 61 $title,
46 62 $title,
@@ -46,9 +62,9 @@
46 62 $title,
47 63 WPDA::get_current_user_capability(),
48 64 $title,
49 65 null,
50 - 'dashicons-database-view'
66 + $icon
51 67 );
52 68
53 69 add_submenu_page(
54 70 $title,
@@ -55,14 +71,16 @@
55 71 $title,
56 72 $title,
57 73 WPDA::get_current_user_capability(),
58 74 $title,
59 - function() use ( $app, $title ) {
75 + function() use ( $app, $title, $settings ) {
60 76 // Style not enqueued from container class.
61 77 // Adding container style manually.
62 - $args = array(
78 + $fullscreen = isset( $settings['settings']['app_start_full_screen'] ) ? $settings['settings']['app_start_full_screen'] : false;
79 + $args = array(
63 80 'app_id' => $app['app_id'],
64 81 'feedback' => true,
82 + 'fullscreen' => $fullscreen,
65 83 );
66 84 $app_container = new WPDA_App_Container( $args );
67 85 ?>
68 86 <div class="wrap wpda-dashboard-app">