PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.84
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.84
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 5.5.42 All 160 releases
← All changes | WPDataProjects/Project/WPDP_Project_Project_Form.php +10 -10 5.5.235.5.84 View file →
@@ -45,9 +45,9 @@
45 45
46 46 if ( isset( $args['mode'] ) ) {
47 47 $mode = $args['mode'];
48 48 } else {
49 - wp_die( __( 'ERROR: Wrong arguments [missing mode]', 'wp-data-access' ) );
49 + wp_die( esc_attr__( 'ERROR: Wrong arguments [missing mode]', 'wp-data-access' ) );
50 50 }
51 51
52 52 if ( 'view' === $mode ) {
53 53 $args['list_form_class'] = 'WPDataProjects\\Project\\WPDP_Project_Page_List_View';
@@ -68,13 +68,13 @@
68 68 * @param bool $allow_save
69 69 * @param string $add_param
70 70 */
71 71 public function show( $allow_save = true, $add_param = '' ) {
72 - if ( 'on' === WPDA::get_option( WPDA::OPTION_PLUGIN_DEBUG ) && isset( $_REQUEST['project_id'] ) ) {
73 - $project_id = sanitize_text_field( wp_unslash( $_REQUEST['project_id'] ) ); // input var okay.
72 + if ( 'on' === WPDA::get_option( WPDA::OPTION_PLUGIN_DEBUG ) && isset( $_REQUEST['project_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- verified in parent class
73 + $project_id = sanitize_text_field( wp_unslash( $_REQUEST['project_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- verified in parent class
74 74 global $wpdb;
75 75 $project_page_table_name = $wpdb->prefix . 'wpda_project_page';
76 - $pages = $wpdb->get_results(
76 + $pages = $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- plugin table
77 77 $wpdb->prepare(
78 78 " select * from `%1s` where project_id = %d and add_to_menu = 'Yes' order by page_sequence", // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders
79 79 array(
80 80 WPDA::remove_backticks( $project_page_table_name ),
@@ -81,9 +81,9 @@
81 81 $project_id,
82 82 )
83 83 ),
84 84 'ARRAY_A'
85 - ); // phpcs:ignore Standard.Category.SniffName.ErrorCode
85 + );
86 86
87 87 $project_info = '';
88 88 $first_page = true;
89 89 foreach ( $pages as $page ) {
@@ -88,9 +88,9 @@
88 88 $first_page = true;
89 89 foreach ( $pages as $page ) {
90 90 $wpdp = new WPDP_Project( $project_id, $page['page_id'] );
91 91 if ( null === $wpdp->get_project() ) {
92 - wp_die( __( 'Data Project page not found [need a valid project_id and page_id]', 'wp-data-access' ) );
92 + wp_die( esc_attr__( 'Data Project page not found [need a valid project_id and page_id]', 'wp-data-access' ) );
93 93 }
94 94 if ( ! $first_page ) {
95 95 $project_info .= '<br/><br/>';
96 96 }
@@ -141,9 +141,9 @@
141 141 <a id="button-copy-clipboard" href="javascript:void(0)" class="button button-secondary"
142 142 style="text-align:center;width:145px;"
143 143 data-clipboard-text="<?php echo str_replace( '<br/>', "\n", str_replace( '"', '&quot;', $project_info ) ); // phpcs:ignore WordPress.Security.EscapeOutput ?>">
144 144 <i class="fas fa-clipboard wpda_icon_on_button"></i>
145 - <?php echo __( 'Copy to clipboard', 'wp-data-access' ); ?>
145 + <?php esc_html_e( 'Copy to clipboard', 'wp-data-access' ); ?>
146 146 </a>
147 147 <br/>
148 148 <div style="height: 5px;"></div>
149 149 <a href="javascript:void(0)" class="button button-secondary"
@@ -149,9 +149,9 @@
149 149 <a href="javascript:void(0)" class="button button-secondary"
150 150 style="text-align:center;width:145px;"
151 151 onclick="jQuery('#overlay_project').hide()">
152 152 <i class="fas fa-times-circle wpda_icon_on_button"></i>
153 - <?php echo __( 'Close', 'wp-data-access' ); ?>
153 + <?php esc_html_e( 'Close', 'wp-data-access' ); ?>
154 154 </a>
155 155 </div>
156 156 </div>
157 157 <div style="float:right;text-align:right;">
@@ -160,12 +160,12 @@
160 160 <script type='text/javascript'>
161 161 jQuery(function () {
162 162 var sql_to_clipboard = new ClipboardJS('#button-copy-clipboard');
163 163 sql_to_clipboard.on('success', function (e) {
164 - jQuery.notify('<?php echo __( 'Info copied to clipboard!', 'wp-data-access' ); ?>','info');
164 + jQuery.notify('<?php esc_html_e( 'Info copied to clipboard!', 'wp-data-access' ); ?>','info');
165 165 });
166 166 sql_to_clipboard.on('error', function (e) {
167 - jQuery.notify('<?php echo __( 'Could not copy info to clipboard!', 'wp-data-access' ); ?>','error');
167 + jQuery.notify('<?php esc_html_e( 'Could not copy info to clipboard!', 'wp-data-access' ); ?>','error');
168 168 });
169 169 });
170 170 </script>
171 171 <?php