| @@ -1,5 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | +defined( 'ABSPATH' ) || exit; | |
| 3 | + | |
| 2 | 4 | /** |
| 3 | 5 | * Get value from $_POST. |
| 4 | 6 | * |
| 5 | 7 | * @since 1.1.0 |
| @@ -9,9 +11,10 @@ | ||
| 9 | 11 | * |
| 10 | 12 | * @return string Returns the value if found; else $default is returned. |
| 11 | 13 | */ |
| 12 | 14 | function sellkit_post( $needle, $default = null ) { |
| 13 | - return sellkit_get( $needle, $_POST, $default ); // phpcs:ignore WordPress.CSRF.NonceVerification.NoNonceVerification | |
| 15 | + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.CSRF.NonceVerification.NoNonceVerification -- Generic accessor; callers verify nonces when required. | |
| 16 | + return sellkit_get( $needle, $_POST, $default ); | |
| 14 | 17 | } |
| 15 | 18 | |
| 16 | 19 | |
| 17 | 20 | /** |
| @@ -27,9 +30,10 @@ | ||
| 27 | 30 | */ |
| 28 | 31 | function sellkit_get( $needle, $haystack = false, $default = null ) { |
| 29 | 32 | |
| 30 | 33 | if ( false === $haystack ) { |
| 31 | - $haystack = $_GET; // phpcs:ignore WordPress.CSRF.NonceVerification.NoNonceVerification | |
| 34 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.CSRF.NonceVerification.NoNonceVerification -- Generic read helper; callers verify nonces when required. | |
| 35 | + $haystack = $_GET; | |
| 32 | 36 | } |
| 33 | 37 | |
| 34 | 38 | $haystack = (array) $haystack; |
| 35 | 39 | |