summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2022-01-23 18:37:36 -0500
committerYury German <blueknight@gentoo.org>2022-01-23 18:37:36 -0500
commitf18b23a3a9378fb0a98856d436aa9ebf94e47429 (patch)
treee418433e22854ebd2d77eaa869d5d0470a973317 /plugins/jetpack/_inc/lib/class.color.php
parentAdd classic-editor 1.5 (diff)
downloadblogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.tar.gz
blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.tar.bz2
blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.zip
Updating Classic Editor, Google Authenticatior, Jetpack, Public Post Preview, Table of Contents, Wordpress Importer
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/_inc/lib/class.color.php')
-rw-r--r--plugins/jetpack/_inc/lib/class.color.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/plugins/jetpack/_inc/lib/class.color.php b/plugins/jetpack/_inc/lib/class.color.php
index e145298c..70930659 100644
--- a/plugins/jetpack/_inc/lib/class.color.php
+++ b/plugins/jetpack/_inc/lib/class.color.php
@@ -689,7 +689,11 @@ class Jetpack_Color {
public function incrementLightness( $amount ) {
$hsl = $this->toHsl();
- extract( $hsl );
+
+ $h = isset( $hsl['h'] ) ? $hsl['h'] : 0;
+ $s = isset( $hsl['s'] ) ? $hsl['s'] : 0;
+ $l = isset( $hsl['l'] ) ? $hsl['l'] : 0;
+
$l += $amount;
if ( $l < 0 ) $l = 0;
if ( $l > 100 ) $l = 100;
@@ -706,7 +710,11 @@ class Jetpack_Color {
public function incrementSaturation( $amount ) {
$hsl = $this->toHsl();
- extract( $hsl );
+
+ $h = isset( $hsl['h'] ) ? $hsl['h'] : 0;
+ $s = isset( $hsl['s'] ) ? $hsl['s'] : 0;
+ $l = isset( $hsl['l'] ) ? $hsl['l'] : 0;
+
$s += $amount;
if ( $s < 0 ) $s = 0;
if ( $s > 100 ) $s = 100;
@@ -715,8 +723,11 @@ class Jetpack_Color {
public function toGrayscale() {
$hsl = $this->toHsl();
- extract( $hsl );
+
+ $h = isset( $hsl['h'] ) ? $hsl['h'] : 0;
$s = 0;
+ $l = isset( $hsl['l'] ) ? $hsl['l'] : 0;
+
return $this->fromHsl( $h, $s, $l );
}
@@ -746,7 +757,11 @@ class Jetpack_Color {
public function incrementHue( $amount ) {
$hsl = $this->toHsl();
- extract( $hsl );
+
+ $h = isset( $hsl['h'] ) ? $hsl['h'] : 0;
+ $s = isset( $hsl['s'] ) ? $hsl['s'] : 0;
+ $l = isset( $hsl['l'] ) ? $hsl['l'] : 0;
+
$h = ( $h + $amount ) % 360;
if ( $h < 0 ) $h = 360 - $h;
return $this->fromHsl( $h, $s, $l );