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/Settings/WPDA_Settings.php +14 -17 5.5.40 → 5.5.85 View file →
@@ -4,11 +4,11 @@
4 4 * Suppress "error - 0 - No summary was found for this file" on phpdoc generation
5 5 *
6 6 * @package WPDataAccess\Settings
7 7 */
8 +// phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing -- verified on page
8 9 namespace WPDataAccess\Settings;
9 10
10 -use WPDataAccess\Utilities\WPDA_Import;
11 11 /**
12 12 * Class WPDA_Settings
13 13 *
14 14 * All tabs have the following similar structure:
@@ -25,9 +25,9 @@
25 25 *
26 26 * @author Peter Schulz
27 27 * @since 1.0.0
28 28 */
29 -class WPDA_Settings {
29 +abstract class WPDA_Settings {
30 30 /**
31 31 * Menu slug of the current page
32 32 *
33 33 * @var string
@@ -48,20 +48,13 @@
48 48 */
49 49 protected $current_tab;
50 50
51 51 /**
52 - * Reference to wpda import object
53 - *
54 - * @var WPDA_Import
55 - */
56 - protected $wpda_import;
57 -
58 - /**
59 52 * WPDA_Settings constructor
60 53 *
61 54 * Member $this->tabs is filled in the constructor to support i18n.
62 55 *
63 - * If a request was send for recreation of the repository, this is done in the constructor. This action must
56 + * If a request was sent for recreation of the repository, this is done in the constructor. This action must
64 57 * be performed before checking the user menu model, which is part of the constructor as well, necessary to
65 58 * inform the user if any errors were reported.
66 59 *
67 60 * @param $current_tab Current tab label
@@ -68,31 +61,33 @@
68 61 *
69 62 * @since 1.0.0
70 63 */
71 64 public function __construct( $current_tab ) {
72 - // Get menu slag of current page.
65 + // Get menu slug of current page.
73 66 if ( isset( $_REQUEST['page'] ) ) {
74 67 $this->page = sanitize_text_field( wp_unslash( $_REQUEST['page'] ) );
75 - // input var okay.
76 68 } else {
77 69 // In order to show a list table we need a page.
78 - wp_die( __( 'ERROR: Wrong arguments [missing page argument]', 'wp-data-access' ) );
70 + wp_die( esc_attr__( 'ERROR: Wrong arguments [missing page argument]', 'wp-data-access' ) );
79 71 }
80 72 $this->current_tab = $current_tab;
81 73 // Tabs array is filled in constructor to add i18n.
82 74 $this->tabs = array(
83 75 'plugin' => 'Plugin',
76 + 'apps' => 'Apps',
84 77 'backend' => 'Back-end',
85 78 'frontend' => 'Front-end',
86 - 'datatables' => 'Data Tables',
87 - 'databackup' => 'Data Backup',
88 79 'uninstall' => 'Uninstall',
89 80 'repository' => 'Repository',
90 - 'roles' => 'Roles',
81 + 'mail' => 'Mail',
82 + 'drives' => 'Drives',
83 + 'legacy' => 'Legacy Tools',
91 84 'system' => 'System Info',
92 85 );
93 86 }
94 87
88 + protected abstract function add_content();
89 +
95 90 /**
96 91 * Show setting page
97 92 *
98 93 * Consists of tabs {@see WPDA_Settings::add_tabs()} and the content of the selected tab
@@ -107,9 +102,9 @@
107 102 ?>
108 103 <div class="wrap">
109 104 <h1>
110 105 <?php
111 - echo __( 'WP Data Access Settings', 'wp-data-access' );
106 + esc_html_e( 'WP Data Access Settings', 'wp-data-access' );
112 107 ?>
113 108 </h1>
114 109 <?php
115 110 $this->add_tabs();
@@ -142,4 +137,6 @@
142 137 <?php
143 138 }
144 139
145 140 }
141 +
142 +// phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing