| @@ -135,12 +135,10 @@ | ||
| 135 | 135 | $post_id = null; |
| 136 | 136 | |
| 137 | 137 | if ( ! empty( $post ) && is_object( $post ) && isset( $post->ID ) ) { |
| 138 | 138 | $post_id = $post->ID; |
| 139 | - } elseif ( ! empty( $_GET['post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 140 | - $post_id = absint( $_GET['post'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 141 | 139 | } else { |
| 142 | - $post_id = WINP_HTTP::get( 'post', null ); | |
| 140 | + $post_id = WINP_HTTP::get( 'post', null, 'absint' ); | |
| 143 | 141 | } |
| 144 | 142 | |
| 145 | 143 | $type = WINP_Helper::get_snippet_type( $post_id ); |
| 146 | 144 | |
| @@ -196,12 +194,10 @@ | ||
| 196 | 194 | $post_id = null; |
| 197 | 195 | |
| 198 | 196 | if ( ! empty( $post ) && is_object( $post ) && isset( $post->ID ) ) { |
| 199 | 197 | $post_id = $post->ID; |
| 200 | - } elseif ( ! empty( $_GET['post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 201 | - $post_id = absint( $_GET['post'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 202 | 198 | } else { |
| 203 | - $post_id = WINP_HTTP::get( 'post', null ); | |
| 199 | + $post_id = WINP_HTTP::get( 'post', null, 'absint' ); | |
| 204 | 200 | } |
| 205 | 201 | |
| 206 | 202 | if ( ! empty( $post_id ) ) { |
| 207 | 203 | $type = WINP_Helper::get_snippet_type( $post_id ); |
| @@ -886,5 +882,5 @@ | ||
| 886 | 882 | } |
| 887 | 883 | |
| 888 | 884 | return $src; |
| 889 | 885 | } |
| 890 | -} | |
| 886 | +} | |