From a8a8047853dbacf417c723f46a7a3dc0c2c71aee Mon Sep 17 00:00:00 2001 From: Norcross Date: Tue, 12 Nov 2024 10:15:38 -0500 Subject: [PATCH] whoops whoops --- airplane-mode.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/airplane-mode.php b/airplane-mode.php index 4173999..79786bf 100644 --- a/airplane-mode.php +++ b/airplane-mode.php @@ -502,20 +502,7 @@ public function replace_gravatar( $avatar, $id_or_email, $size, $default, $alt ) // Swap out the file for a base64 encoded image generated based on the $id_or_email. $image = $this->generate_color_avatar( $id_or_email ); - /* - $hash = md5( strtolower( trim( $id_or_email ) ) ); - $im = imagecreatetruecolor( 1, 1 ); - $rgb = sscanf( $hash, '%2x%2x%2x' ); - $color = imagecolorallocate( $im, $rgb[0], $rgb[1], $rgb[2] ); - imagesetpixel( $im, 0, 0, $color ); - $mem = fopen( 'php://memory', 'rb+' ); - imagepng( $im, $mem ); - rewind( $mem ); - imagedestroy( $im ); - $image = 'data:image/png;base64,' . base64_encode( stream_get_contents( $mem ) ); - fclose( $mem ); - */ - + // Build the image string. $avatar = "{$alt}"; // Return the avatar. @@ -1314,7 +1301,7 @@ public function generate_color_avatar( $id_or_email ) { $define_user_sr = is_object( $id_or_email ) ? $id_or_email->comment_author_email : $id_or_email; // Swap out the file for a base64 encoded image generated based on the $id_or_email. - $generate_hash = md5( strtolower( trim( $id_or_email ) ) ); + $generate_hash = md5( strtolower( trim( $define_user_sr ) ) ); // Set a color image. $color_image = imagecreatetruecolor( 1, 1 );