| @@ -90,8 +90,10 @@ | ||
| 90 | 90 | '_pll' => true, // Polylang taxonomy. |
| 91 | 91 | ) |
| 92 | 92 | ); |
| 93 | 93 | |
| 94 | + $this->add_sanitization_hooks( $this->tax_language ); | |
| 95 | + | |
| 94 | 96 | add_action( 'setup_theme', array( $this, 'add_language_taxonomy_query_var' ) ); |
| 95 | 97 | } |
| 96 | 98 | |
| 97 | 99 | /** |
| @@ -130,9 +132,9 @@ | ||
| 130 | 132 | * @param int $id Post ID. |
| 131 | 133 | * @return void |
| 132 | 134 | */ |
| 133 | 135 | public function delete_translation( $id ) { |
| 134 | - $id = $this->sanitize_int_id( $id ); | |
| 136 | + $id = pll_sanitize_id( $id ); | |
| 135 | 137 | |
| 136 | 138 | if ( empty( $id ) ) { |
| 137 | 139 | return; |
| 138 | 140 | } |
| @@ -248,9 +250,9 @@ | ||
| 248 | 250 | * |
| 249 | 251 | * @phpstan-param non-empty-string $context |
| 250 | 252 | */ |
| 251 | 253 | public function current_user_can_read( $id, $context = 'view' ) { |
| 252 | - $id = $this->sanitize_int_id( $id ); | |
| 254 | + $id = pll_sanitize_id( $id ); | |
| 253 | 255 | |
| 254 | 256 | if ( empty( $id ) ) { |
| 255 | 257 | return false; |
| 256 | 258 | } |