first_name ) ) { $firstName = $adminUser->first_name; } $greeting = ! empty( $firstName ) ? sprintf( 'Hi %s,', $firstName ) : 'Hi there,'; $message = sprintf( // Translators: 1 - The greeting, 2 - The site name. __( '%1$s I noticed you still have not connected your account to Broken Link Checker on %2$s, so I just wanted to give you a friendly reminder. Connecting your account takes just a minute and unlocks powerful features such as automatic broken link detection, actionable reports, link highlighting, and more. Creating an account is completely free! If you\'re ready for more, you can go premium today. As a special offer just for you, purchase a subscription and your first month is on me. Use coupon code BLC1MONTHFREE during checkout. P.S. Please don\'t share this coupon code with anyone else. It\'s exclusive to you. Benjamin Rojas, President of AIOSEO', 'broken-link-checker-seo' ), esc_html( $greeting ), esc_html( $siteName ) ); // Convert line breaks to HTML paragraphs and escape content. $paragraphs = explode( "\n\n", $message ); $couponCode = 'BLC1MONTHFREE'; $buttonAdded = false; foreach ( $paragraphs as $paragraph ) { $paragraph = trim( $paragraph ); if ( empty( $paragraph ) ) { continue; } // Convert URLs to links, then escape for safe output. $paragraph = make_clickable( $paragraph ); // Highlight the coupon code with bold and blue color. $hasCoupon = strpos( $paragraph, $couponCode ) !== false; if ( $hasCoupon ) { $paragraph = str_replace( $couponCode, '' . esc_html( $couponCode ) . '', $paragraph ); } echo '
' . wp_kses_post( $paragraph ) . '
'; // Add the button after the paragraph containing the coupon code. if ( $hasCoupon && ! $buttonAdded ) { ?>