From 3ed6c8bdbedf081ead7598fe5b8963cbe4c3d980 Mon Sep 17 00:00:00 2001 From: David Madl Date: Sun, 1 Mar 2026 21:48:15 +0100 Subject: [PATCH] re-laayout and show site headline in social media share text --- ruady-og-head.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ruady-og-head.php b/ruady-og-head.php index ea8bc69..9ecc842 100644 --- a/ruady-og-head.php +++ b/ruady-og-head.php @@ -105,6 +105,7 @@ final class Ruady_OG_Head { $og_image_url = user_trailingslashit( trailingslashit( $post_url ) . 'og-image' ); $description = self::make_description(wp_strip_all_tags( $excerpt )); + $og_description = "Da Ruady. Hansdampf in allen Gassen."; // Example business logic: // - add a meta tag for every post @@ -119,7 +120,7 @@ final class Ruady_OG_Head { - + @@ -127,7 +128,7 @@ final class Ruady_OG_Head { - + @@ -198,10 +199,10 @@ final class Ruady_OG_Head { $bg = imagecolorallocate( $image, 224, 241, 212 ); // theme background (light green) $fg = imagecolorallocate( $image, 0, 0, 0 ); // theme foreground (black) $tt = imagecolorallocate( $image, 72, 119, 40 ); // theme primary (dark green) - //$accent = imagecolorallocate( $image, 204, 235, 235 ); // theme tertiary (light blue) + $accent = imagecolorallocate( $image, 204, 235, 235 ); // theme tertiary (light blue) imagefilledrectangle( $image, 0, 0, $width, $height, $bg ); - //imagefilledrectangle( $image, 0, 0, $width, 12, $accent ); + imagefilledrectangle( $image, 0, $height-30, $width, $height, $accent ); $title = wp_strip_all_tags( get_the_title( $post ) ); $site = wp_strip_all_tags( get_bloginfo( 'name' ) ); @@ -225,12 +226,10 @@ final class Ruady_OG_Head { $fontFile = __DIR__ . '/fonts/EBGaramond-VariableFont_wght.ttf'; //$size = 28; $size = 36; -//$x = 60; -$x = (int) (($width - $height) / 2 + 30); +$x = 60; $y = 120; $lineHeight = (int) ($size * 1.9); -//$maxWidth = 1080; -$maxWidth = $height - 2*60; // prepare text for 1:1 ratio cropping +$maxWidth = 1080; $maxHeight = $height - 60; // wrap_text_ttf(string $text, int $maxWidth, string $fontFile, float $size)