| @@ -63,21 +63,21 @@ | ||
| 63 | 63 | public function __construct( $schema_name, $table_name, $wpda_list_columns, $args = array() ) { |
| 64 | 64 | if ( isset( $args['mode'] ) ) { |
| 65 | 65 | $this->mode = $args['mode']; |
| 66 | 66 | } else { |
| 67 | - wp_die( __( 'ERROR: Wrong arguments [missing mode]', 'wp-data-access' ) ); | |
| 67 | + wp_die( esc_attr__( 'ERROR: Wrong arguments [missing mode]', 'wp-data-access' ) ); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | if ( isset( $args['parent'] ) ) { |
| 71 | 71 | $this->parent = $args['parent']; |
| 72 | 72 | } else { |
| 73 | - wp_die( __( 'ERROR: Wrong arguments [missing parent]', 'wp-data-access' ) ); | |
| 73 | + wp_die( esc_attr__( 'ERROR: Wrong arguments [missing parent]', 'wp-data-access' ) ); | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | if ( isset( $args['child'] ) ) { |
| 77 | 77 | $this->child = $args['child']; |
| 78 | 78 | } else { |
| 79 | - wp_die( __( 'ERROR: Wrong arguments [missing child]', 'wp-data-access' ) ); | |
| 79 | + wp_die( esc_attr__( 'ERROR: Wrong arguments [missing child]', 'wp-data-access' ) ); | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | $this->page_number_item_name = 'child_page_number'; |
| 83 | 83 | |
| @@ -111,10 +111,10 @@ | ||
| 111 | 111 | * |
| 112 | 112 | * @return string |
| 113 | 113 | */ |
| 114 | 114 | protected function get_child_tab() { |
| 115 | - if ( isset( $_REQUEST['child_tab'] ) ) { | |
| 116 | - return sanitize_text_field( wp_unslash( $_REQUEST['child_tab'] ) ); // input var okay. | |
| 115 | + if ( isset( $_REQUEST['child_tab'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- already verified | |
| 116 | + return sanitize_text_field( wp_unslash( $_REQUEST['child_tab'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- already verified | |
| 117 | 117 | } else { |
| 118 | 118 | return ''; |
| 119 | 119 | } |
| 120 | 120 | } |
| @@ -164,9 +164,10 @@ | ||
| 164 | 164 | |
| 165 | 165 | // Perform insert. |
| 166 | 166 | $wpdadb = WPDADB::get_db_connection( $this->schema_name ); |
| 167 | 167 | if ( null === $wpdadb ) { |
| 168 | - wp_die( sprintf( __( 'ERROR - Remote database %s not available', 'wp-data-access' ), esc_attr( $this->schema_name ) ) ); | |
| 168 | + /* translators: %s = database name */ | |
| 169 | + wp_die( sprintf( esc_attr__( 'ERROR - Remote database %s not available', 'wp-data-access' ), esc_attr( $this->schema_name ) ) ); | |
| 169 | 170 | } |
| 170 | 171 | $result = $wpdadb->insert( $this->child['relation_nm']['child_table'], $child_columns ); |
| 171 | 172 | |
| 172 | 173 | // Error handling. |