HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/delta/wp-content/plugins/sitepress-multilingual-cms/classes/emails/wpml-tm-email-view.php
<?php

abstract class WPML_TM_Email_View {

	const FOOTER_TEMPLATE = 'email-footer.twig';
	const HEADER_TEMPLATE = 'email-header.twig';

	/** @var WPML_Twig_Template $template_service */
	protected $template_service;

	public function __construct( WPML_Twig_Template $template_service ) {
		$this->template_service = $template_service;
	}

	/**
	 * @param string $username
	 *
	 * @return string
	 */
	public function render_header( $username = '' ) {
		$model = array(
			'greetings' => sprintf( __( 'Dear %s,', 'wpml-translation-management' ), $username ),
		);

		return $this->template_service->show( $model, self::HEADER_TEMPLATE );
	}

	/**
	 * @param string $username
	 *
	 * @return string
	 */
	public function render_casual_header( $first_name = '' ) {
		$model = array(
			'greetings' => sprintf( __( 'Hi %s,', 'wpml-translation-management' ), $first_name ),
		);

		return $this->template_service->show( $model, self::HEADER_TEMPLATE );
	}

	/**
	 * @param string $bottom_text
	 *
	 * @return string
	 */
	protected function render_email_footer( $bottom_text = '' ) {
		$site_url = get_bloginfo( 'url' );

		$model = array(
			'bottom_text' => $bottom_text,
			'wpml_footer' => sprintf(
				esc_html__( 'Generated by WPML plugin, running on %s.', 'wpml-translation-management' ),
				'<a href="' . $site_url . '" style="color: #ffffff;">' . $site_url . '</a>'
			),
		);

		return $this->template_service->show( $model, self::FOOTER_TEMPLATE );
	}
}