-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
139 changed files
with
12,352 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
* | ||
* @package Mailtpl | ||
* @subpackage Mailtpl/admin | ||
* @author Damian Logghe <[email protected]> | ||
* @author wpexperts | ||
*/ | ||
class Mailtpl_Admin { | ||
|
||
|
@@ -43,15 +43,133 @@ public function __construct( $plugin_name, $version ) { | |
$this->version = $version; | ||
|
||
} | ||
|
||
public function email_template() { | ||
$link = $this->get_customizer_link(); | ||
?> | ||
<style> | ||
.emailtemplate .container{ | ||
display: flex; | ||
} | ||
.emailtemplate .col-md-6 .boxcustom { | ||
background-color: white; | ||
margin-right: 20px; | ||
padding: 10px; | ||
border-radius: 4px; | ||
border: solid #d1d1ff 1px; | ||
transition: box-shadow 0.6s ease-in-out; | ||
-webkit-box-shadow: 2px 3px 9px -2px rgb(126 126 126 / 75%); | ||
-moz-box-shadow: 2px 3px 9px -2px rgb(126 126 126 / 75%); | ||
box-shadow: 2px 3px 9px -2px rgb(126 126 126 / 75%); | ||
text-align: center; | ||
} | ||
.emailtemplate button { | ||
margin-top: 15px; | ||
width: 97%; | ||
height: 45px; | ||
margin-top: 15px; | ||
width: 97%; | ||
height: 45px; | ||
border-radius: 7px; | ||
color: white; | ||
font-weight: 600; | ||
font-size: 18px; | ||
transition: box-shadow 0.6s ease-in-out; | ||
-webkit-box-shadow: 7px 7px 4px -4px rgb(122 122 122 / 75%); | ||
-moz-box-shadow: 7px 7px 4px -4px rgb(122 122 122 / 75%); | ||
box-shadow: 7px 7px 4px -4px rgb(122 122 122 / 75%); | ||
} | ||
.emailtemplate button.wordpress-btn { | ||
background-color: #0073aa; | ||
border: solid #6c6c6c 1px; | ||
} | ||
.emailtemplate button.woocommerce-btn { | ||
background-color: #8053b4; | ||
border: solid #6c6c6c 1px; | ||
} | ||
.boxcustom img { | ||
max-width: 100%; | ||
} | ||
.emailtemplate h2 { | ||
text-align: center; | ||
font-weight: 300; | ||
font-size: 23px; | ||
line-height: 46px; | ||
margin-top: 0px; | ||
} | ||
.headdingemailtemplate { | ||
text-align: center; | ||
margin-top: -10px; | ||
margin-bottom: 8px; | ||
} | ||
.headdingemailtemplate img { | ||
vertical-align:middle; | ||
max-width: 78px; | ||
} | ||
.emailtemplate .col-md-6:hover .boxcustom { | ||
transition: box-shadow 0.6s ease-in-out; | ||
box-shadow: 5px 3px 13px 0px rgb(126 126 126 / 75%); | ||
} | ||
.emailtemplate .col-md-6:hover button { | ||
transition: box-shadow 0.6s ease-in-out; | ||
box-shadow: 6px 5px 7px -1px rgb(126 126 126 / 75%); | ||
} | ||
</style> | ||
|
||
<div class="wrap emailtemplate"> | ||
<div class="headdingemailtemplate"> | ||
<h1> | ||
<img src="<?php echo esc_attr( MAILTPL_WOOMAIL_URL . 'assets/images/icon-128x128.png' ) ?>"> | ||
Email Templates | ||
</h1> | ||
</div> | ||
<div class="container"> | ||
<div class="col-md-6"> | ||
<div class="boxcustom"> | ||
<img src="<?php echo esc_attr( MAILTPL_WOOMAIL_URL . 'assets/images/WooCommerce-wordpress-02.png' ) ?>"> | ||
<h2 style="border-bottom: solid #54b0d1 1px;">WordPress Email Templates</h2> | ||
<p>Live preview your WordPress emails.</p> | ||
<p>Customize emails to match your brand colors.</p> | ||
<p>Customize heading, subtitle, and body text.</p> | ||
<p>Design and send custom-built emails with WordPress Email Templates.</p> | ||
<p>Choose your template style, add a logo or some text, change colors, edit footer and start sending nice emails in WordPress.</p> | ||
</div> | ||
<a target="_blank" href="<?php echo $link; ?>"> | ||
<button class="wordpress-btn">Open WordPress Email Editor</button> | ||
</a> | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="boxcustom"> | ||
<img src="<?php echo esc_attr( MAILTPL_WOOMAIL_URL . 'assets/images/WooCommerce-wordpress-01.png' ) ?>"> | ||
<h2 style="border-bottom: solid #7f54b3 1px;">WooCommerce Email Templates</h2> | ||
<p>Customize the default transactional emails.</p> | ||
<p>Live preview your WooCommerce emails.</p> | ||
<p>Export and import your plugin settings.</p> | ||
<p>Design and customize WooCommerce's default transactional email templates.</p> | ||
<p>Use WordPress's native customizer for visual edits and customize the text (including body text) in WooCommerce without editing code.</p> | ||
</div> | ||
<a target="_blank" href="customize.php?mailtpl-woomail-customize=1&url=<?php echo urlencode( add_query_arg( array( 'mailtpl-woomail-preview' => '1' ), home_url( '/' ) ) ); ?>" > | ||
<button class="woocommerce-btn">Open Woocommerce Email Editor</button> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
<?php | ||
} | ||
|
||
/** | ||
* Create the wp-admin menu link | ||
*/ | ||
public function add_menu_link() { | ||
$link = $this->get_customizer_link(); | ||
add_submenu_page( 'themes.php', 'Email Templates', 'Email Templates', apply_filters( 'mailtpl/roles', 'edit_theme_options'), $link , null ); | ||
|
||
public function add_menu_link() { | ||
|
||
add_menu_page( | ||
esc_html__( 'Email Templates', 'mailtpl-woocommerce-email-composer' ), | ||
esc_html__( 'Email Templates', 'mailtpl-woocommerce-email-composer' ), | ||
'manage_woocommerce', | ||
'email-Template', | ||
array( $this,'email_template' ), | ||
'dashicons-email', | ||
52 | ||
); | ||
} | ||
/** | ||
* If we are in our template strip everything out and leave it clean | ||
|
@@ -142,7 +260,7 @@ public function wp_pointers() { | |
wp_enqueue_style( 'wp-pointer' ); | ||
|
||
// Add pointers script to queue. Add custom script. | ||
wp_enqueue_script( 'mailtpl-pointer', MAILTPL_PLUGIN_URL . '/admin/js/mailtpl-pointer.js', array( 'wp-pointer' ) ); | ||
wp_enqueue_script( 'mailtpl-pointer', MAILTPL_WOOMAIL_URL . '/admin/js/mailtpl-pointer.js', array( 'wp-pointer' ) ); | ||
|
||
// Add pointer options to script. | ||
wp_localize_script( 'mailtpl-pointer', 'mailtpl_pointer', $valid_pointers ); | ||
|
@@ -204,7 +322,7 @@ function woocommerce_integration( $WC_Emails ) { | |
remove_filter( 'mailtpl/email_content', 'convert_chars' ); | ||
remove_filter( 'mailtpl/email_content', 'wpautop' ); | ||
remove_action('woocommerce_email_header', array($WC_Emails , 'email_header')); | ||
remove_action('woocommerce_email_footer', array($WC_Emails , 'email_footer')); | ||
//remove_action('woocommerce_email_footer', array($WC_Emails , 'email_footer')); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.