PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 All 504 releases
← All changes | functions.cookies.php +5 -2 12.0.3 → 16.3-a.1 View file →
@@ -1,5 +1,5 @@
1 -<?php
1 +<?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
2 2 /**
3 3 * This file is meant to be the home for any function handling cookies that can
4 4 * be accessed anywhere within Jetpack.
5 5 *
@@ -8,12 +8,13 @@
8 8 * @package automattic/jetpack
9 9 */
10 10
11 11 /**
12 - * A PHP 5.X compatible version of the array argument version of PHP 7.3's setcookie().
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;