/var/www/leolaart.com/www/wp-content/plugins/polylang/include
NameSizeModeActions
api.php177630666editdlrm
base.php59320666editdlrm
cache.php25030666editdlrm
class-polylang.php87590666editdlrm
cookie.php34330666editdlrm
crud-posts.php155110666editdlrm
crud-terms.php101050666editdlrm
db-tools.php10380666editdlrm
filter-rest-routes.php49880666editdlrm
filters-links.php56860666editdlrm
filters-sanitization.php33110666editdlrm
filters-widgets-options.php26340666editdlrm
filters.php157520666editdlrm
functions.php71730666editdlrm
language-deprecated.php73550666editdlrm
language-factory.php95350666editdlrm
language.php184700666editdlrm
license.php94150666editdlrm
links-abstract-domain.php32400666editdlrm
links-default.php31000666editdlrm
links-directory.php97210666editdlrm
links-domain.php31360666editdlrm
links-model.php66390666editdlrm
links-permalinks.php57530666editdlrm
links-subdomain.php22160666editdlrm
links.php13310666editdlrm
mo.php20200666editdlrm
model.php346510666editdlrm
nav-menu.php45330666editdlrm
olt-manager.php85670666editdlrm
query.php65440666editdlrm
rest-request.php31940666editdlrm
static-pages.php64150666editdlrm
switcher.php111510666editdlrm
translatable-object-with-types-interface.php11270666editdlrm
translatable-object-with-types-trait.php19360666editdlrm
translatable-object.php135930666editdlrm
translatable-objects.php35690666editdlrm
translate-option.php127590666editdlrm
translated-object.php167860666editdlrm
translated-post.php119640666editdlrm
translated-term.php100080666editdlrm
walker-dropdown.php35380666editdlrm
walker-list.php23080666editdlrm
walker.php23360666editdlrm
widget-calendar.php96670666editdlrm
widget-languages.php46780666editdlrm
Edit: /var/www/leolaart.com/www/wp-content/plugins/polylang/include/cookie.php (3433B)
0 !== $expiration ? time() + $expiration : 0, 'path' => COOKIEPATH, 'domain' => COOKIE_DOMAIN, // Cookie domain must be set to false for localhost (default value for `COOKIE_DOMAIN`) thanks to Stephen Harris. 'secure' => is_ssl(), 'httponly' => false, 'samesite' => 'Lax', ); $args = wp_parse_args( $args, $defaults ); /** * Filters the Polylang cookie arguments. * /!\ This filter may be fired *before* the theme is loaded. * * @since 3.6 * * @param array $args { * Optional. Array of arguments for setting the cookie. * * @type int $expires Cookie duration. * If a cookie duration of 0 is specified, a session cookie will be set. * If a negative cookie duration is specified, the cookie is removed. * @type string $path Cookie path. * @type string $domain Cookie domain. Must be set to false for localhost (default value for `COOKIE_DOMAIN`). * @type bool $secure Should the cookie be sent only over https? * @type bool $httponly Should the cookie be accessed only over http protocol?. * @type string $samesite Either 'Strict', 'Lax' or 'None'. * } */ return (array) apply_filters( 'pll_cookie_args', $args ); } /** * Sets the cookie. * * @since 2.9 * * @param string $lang Language cookie value. * @param array $args { * Optional. Array of arguments for setting the cookie. * * @type string $path Cookie path, defaults to COOKIEPATH. * @type string $domain Cookie domain, defaults to COOKIE_DOMAIN * @type bool $secure Should the cookie be sent only over https? * @type bool $httponly Should the cookie accessed only over http protocol? Defaults to false. * @type string $samesite Either 'Strict', 'Lax' or 'None', defaults to 'Lax'. * } * @return void */ public static function set( $lang, $args = array() ) { $args = self::parse_args( $args ); if ( ! headers_sent() && PLL_COOKIE !== false && self::get() !== $lang ) { if ( version_compare( PHP_VERSION, '7.3', '<' ) ) { $args['path'] .= '; SameSite=' . $args['samesite']; // Hack to set SameSite value in PHP < 7.3. Doesn't work with newer versions. setcookie( PLL_COOKIE, $lang, $args['expires'], $args['path'], $args['domain'], $args['secure'], $args['httponly'] ); } else { setcookie( PLL_COOKIE, $lang, $args ); } } } /** * Returns the language cookie value. * * @since 2.9 * * @return string */ public static function get() { return isset( $_COOKIE[ PLL_COOKIE ] ) ? sanitize_key( $_COOKIE[ PLL_COOKIE ] ) : ''; } }