$email Core's email array (to/subject/message/headers). * @param array $values Variable values. * @param array $context Extra context. * @param bool $sprintf Whether core runs the subject through sprintf(). * @return array */ protected function rewrite( array $email, array $values, array $context, bool $sprintf = true ): array { $content = $this->compose( $values, $context ); $email['subject'] = $sprintf ? str_replace( '%', '%%', $content['subject'] ) : $content['subject']; $email['message'] = $content['message']; $email['headers'] = $content['headers']; return $email; } /** * The site name, decoded. * * @return string */ protected static function site_name(): string { return wp_specialchars_decode( (string) get_option( 'blogname' ), ENT_QUOTES ); } }