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
2
Merged
Piotr Potrebka
requested to merge
refactor/templates
into
devel
10 months ago
Overview
0
Commits
3
Pipelines
3
Changes
2
0
0
Merge request reports
Viewing commit
bf1b3c6f
Prev
Next
Show latest version
2 files
+
4
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
bf1b3c6f
feat: email styles
· bf1b3c6f
Piotr Potrebka
authored
10 months ago
src/
Email
Template.php
→
src/Template.php
+
2
−
2
View file @ bf1b3c6f
Edit in single-file editor
Open in Web IDE
Show full file
@@ -5,7 +5,7 @@ namespace WPDesk\Library\WPEmail;
use
WPDesk\Library\WPEmail\Helpers\StyleInliner
;
use
WPDesk\View\Renderer\Renderer
;
class
Email
Template
{
class
Template
{
/**
* @var Renderer
@@ -22,7 +22,7 @@ class EmailTemplate {
$this
->
template_attributes
=
wp_parse_args
(
$template_attributes
,
$this
->
get_default_template_attributes
()
);
}
public
function
get_
email_template
(
string
$content
):
string
{
public
function
get_
body
(
string
$content
):
string
{
$output
=
$this
->
renderer
->
render
(
'html/email-header'
,
$this
->
template_attributes
);
$output
.
=
$this
->
renderer
->
render
(
'html/email-content'
,
[
'content'
=>
$content
]
);
$output
.
=
$this
->
renderer
->
render
(
'html/email-footer'
,
[
'footer'
=>
$this
->
template_attributes
[
'footer'
]
]
);
Loading