Server IP : 104.21.38.3 / Your IP : 162.158.162.37 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/coircraft.com/wp-content/plugins/wp-mail-logging/src/Renderer/Column/ |
Upload File : |
<?php namespace No3x\WPML\Renderer\Column; use No3x\WPML\Renderer\Exception\ColumnDoesntExistException; use No3x\WPML\Renderer\WPML_ColumnManager; class SubjectColumn extends GenericColumn { /** * Base64 encoding prefix. * * @since 1.12.0 * * @var string */ const EMAIL_SUBJECT_BASE64_ENCODED = '=?utf-8?B?'; /** * Quoted-printable encoding prefix. * * @since 1.12.0 * * @var string */ const EMAIL_SUBJECT_QUOTED_ENCODED = '=?utf-8?Q?'; /** * The email subject. * * @since 1.12.0 * * @var string */ protected $subject = ''; public function __construct() { parent::__construct( WPML_ColumnManager::COLUMN_SUBJECT ); } /** * @inerhitDoc * * @since 1.12.0 */ public function render( $item, $column_format ) { if ( ! array_key_exists( $this->column_name, $item ) ) { throw new ColumnDoesntExistException($this->column_name); } if ( empty( $item[ $this->column_name ] ) ) { return ''; } $this->subject = $item[ $this->column_name ]; if ( strpos( $this->subject, self::EMAIL_SUBJECT_BASE64_ENCODED ) === 0 ) { return base64_decode( $this->get_encoded_subject( self::EMAIL_SUBJECT_BASE64_ENCODED ) ); } if ( strpos( $this->subject, self::EMAIL_SUBJECT_QUOTED_ENCODED ) === 0 ) { return quoted_printable_decode( $this->get_encoded_subject( self::EMAIL_SUBJECT_QUOTED_ENCODED ) ); } return esc_html( $this->subject ); } /** * Get the encoded part from the subject string. * * @since 1.12.0 * * @param string $encode Type of encoding used in the subject. * * @return false|string */ private function get_encoded_subject( $encode ) { $encode_len = strlen( $encode ); $encoded_subject = substr( $this->subject, $encode_len, strlen( $this->subject ) - $encode_len - 1 ); return $encoded_subject; } }