| @@ -12,8 +12,9 @@ | ||
| 12 | 12 | * A PHP 7.0 compatible version of the array argument version of PHP 7.3's setcookie(). |
| 13 | 13 | * |
| 14 | 14 | * Useful for setting SameSite cookies in PHP 7.2 or earlier. |
| 15 | 15 | * |
| 16 | + * @deprecated since 16.2. Use `setcookie()` instead now that we've dropped PHP 7.2 support. | |
| 16 | 17 | * @param string $name Name of the cookie. |
| 17 | 18 | * @param string $value Value of the cookie. |
| 18 | 19 | * @param array $options Options to include with the cookie. |
| 19 | 20 | * @return bool False when error happens, other wise true. |
| @@ -18,8 +19,10 @@ | ||
| 18 | 19 | * @param array $options Options to include with the cookie. |
| 19 | 20 | * @return bool False when error happens, other wise true. |
| 20 | 21 | */ |
| 21 | 22 | function jetpack_shim_setcookie( $name, $value, $options ) { |
| 23 | + _deprecated_function( __FUNCTION__, 'jetpack-16.2', 'setcookie' ); | |
| 24 | + | |
| 22 | 25 | $not_allowed_chars = ",; \t\r\n\013\014"; |
| 23 | 26 | |
| 24 | 27 | if ( false !== strpbrk( $name, $not_allowed_chars ) ) { |
| 25 | 28 | return false; |