Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WP Mail
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
Library
WP Mail
Merge requests
!3
feat: email styles
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
feat: email styles
refactor/templates
into
devel
Overview
0
Commits
3
Pipelines
3
Changes
6
Merged
Piotr Potrebka
requested to merge
refactor/templates
into
devel
10 months ago
Overview
0
Commits
3
Pipelines
3
Changes
6
0
0
Merge request reports
Viewing commit
44881e2d
Prev
Next
Show latest version
6 files
+
78
−
27
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
44881e2d
feat: email styles
· 44881e2d
Piotr Potrebka
authored
10 months ago
src/Abstracts/Email.php
+
16
−
2
View file @ 44881e2d
Edit in single-file editor
Open in Web IDE
Show full file
@@ -41,6 +41,11 @@ class Email {
*/
private
$from_name
;
/**
* @var array
*/
private
$template_attributes
;
/**
* @param string $from_email
*
@@ -56,7 +61,7 @@ class Email {
* @return string
*/
public
function
get_from
():
string
{
return
sanitize_email
(
$this
->
from_email
)
;
return
$this
->
from_email
;
}
/**
@@ -134,7 +139,6 @@ class Email {
return
$this
->
headers
[
$header
]
??
''
;
}
/**
* @param array $attachments
*
@@ -196,4 +200,14 @@ class Email {
return
$this
->
content
;
}
public
function
set_template_attributes
(
string
$name
,
string
$value
):
self
{
$this
->
template_attributes
[
$name
]
=
$value
;
return
$this
;
}
public
function
get_template_attributes
():
array
{
return
$this
->
template_attributes
;
}
}
Loading