| 1 |
<?php |
| 2 |
/** |
| 3 |
* Email template for the Auto Updates Notification. |
| 4 |
* |
| 5 |
* To overwrite this template, make a new template with the same filename and place it in the ../wp-content/uploads/mainwp/templates/email/ directory. |
| 6 |
* |
| 7 |
* @package MainWP/Dashboard |
| 8 |
*/ |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit; |
| 11 |
|
| 12 |
$child_site_tokens = false; |
| 13 |
|
| 14 |
if ( empty( $heading ) ) { |
| 15 |
$heading = 'Auto Updates Notification'; |
| 16 |
} |
| 17 |
|
| 18 |
$auto_updated_items = isset( $auto_updated_items ) && is_array( $auto_updated_items ) ? $auto_updated_items : array(); |
| 19 |
|
| 20 |
?> |
| 21 |
|
| 22 |
<!DOCTYPE html> |
| 23 |
<html lang="en"> |
| 24 |
<head> |
| 25 |
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" /> |
| 26 |
<title><?php echo esc_html( get_bloginfo( 'name', 'display' ) ); ?></title> |
| 27 |
</head> |
| 28 |
<body offset="0" style="margin:0;background-color:#f7f7f7;font-family:'Lato',sans-serif;"> |
| 29 |
<div id="mainwp-email-wrapper" style="padding: 30px 0;"> |
| 30 |
<?php |
| 31 |
/** |
| 32 |
* Auto Updates Email Header |
| 33 |
* |
| 34 |
* Fires at the top of the auto updates email template. |
| 35 |
* |
| 36 |
* @since 6.3 |
| 37 |
*/ |
| 38 |
do_action( 'mainwp_auto_updates_email_header' ); |
| 39 |
// old html style for email clients display. |
| 40 |
?> |
| 41 |
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style="margin-top:30px;margin-bottom:30px;" aria-hidden="true"> |
| 42 |
<tr> |
| 43 |
<td align="center" valign="top"> |
| 44 |
<table border="0" cellpadding="0" cellspacing="0" width="600" style="background-color:#ffffff;border:1px solid #dedede;box-shadow: 0 1px 4px rgba(0,0,0,0.1);border-radius:3px;padding-bottom:30px;" aria-hidden="true"> |
| 45 |
<!-- Header --> |
| 46 |
<tr> |
| 47 |
<td style="vertical-align:top;text-align:center;"> |
| 48 |
<table style="border:0;width:600px;padding:0;border-spacing:0;"> |
| 49 |
<tr> |
| 50 |
<td id="header_wrapper" style="padding: 36px 48px; display: block; background: #1c1d1b;"> |
| 51 |
<h1 style="text-align:center;color:#fff;"><?php echo esc_html( $heading ); ?></h1> |
| 52 |
</td> |
| 53 |
</tr> |
| 54 |
</table> |
| 55 |
</td> |
| 56 |
</tr> |
| 57 |
<!-- End Header --> |
| 58 |
<!-- Body --> |
| 59 |
<tr> |
| 60 |
<td style="vertical-align:top;text-align:left;padding:30px 30px 0 30px;"> |
| 61 |
<strong><?php esc_html_e( 'Hi there', 'mainwp' ); ?>,</strong> |
| 62 |
<p><?php esc_html_e( 'Please take a few minutes to review the items that were automatically updated via your MainWP Dashboard.', 'mainwp' ); ?></p> |
| 63 |
</td> |
| 64 |
</tr> |
| 65 |
<tr> |
| 66 |
<td style="vertical-align:top;text-align:left;padding:30px 30px 0 30px;"> |
| 67 |
<?php if ( ! empty( $auto_updated_items ) && is_array( $auto_updated_items ) ) : ?> |
| 68 |
<h3 style="color:#7fb100;"><?php esc_html_e( 'Auto Updated', 'mainwp' ); ?></h3> |
| 69 |
<p><?php esc_html_e( 'The following updates were automatically completed via your MainWP Dashboard.', 'mainwp' ); ?></p> |
| 70 |
<?php foreach ( $auto_updated_items as $wpid => $updated_items ) : ?> |
| 71 |
<p><a href="<?php echo esc_url( admin_url( 'admin.php?page=managesites&dashboard=' . $updated_items['site_id'] ) ); ?>" style="color:#7fb100;"><?php echo esc_html( $updated_items['site_name'] ); ?></a></p> |
| 72 |
<?php if ( ! empty( $updated_items['core'] ) && ! is_array( $updated_items['core'] ) ) : ?> |
| 73 |
<h4 style="color:#444;"><?php esc_html_e( 'WordPress Core', 'mainwp' ); ?></h4> |
| 74 |
<table style="border:0;width:100%;text-align:left;padding:0;border-spacing:0;font-size:11px; margin-bottom:30px;"> |
| 75 |
<thead style="background: #eee"> |
| 76 |
<tr> |
| 77 |
<th style="padding:5px;"><?php esc_html_e( 'Old Version', 'mainwp' ); ?></th> |
| 78 |
<th style="padding:5px;"><?php esc_html_e( 'Latest Version', 'mainwp' ); ?></th> |
| 79 |
<th style="padding:5px;"><?php esc_html_e( 'Status', 'mainwp' ); ?></th> |
| 80 |
</tr> |
| 81 |
</thead> |
| 82 |
<tbody> |
| 83 |
<?php |
| 84 |
foreach ( $updated_items['core'] as $wpid => $item ) : |
| 85 |
if ( empty( $item['success'] ) ) { |
| 86 |
continue; |
| 87 |
} |
| 88 |
?> |
| 89 |
<tr> |
| 90 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><?php echo esc_html( $item['old_version'] ); ?></td> |
| 91 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><a href="#" style="color:#7fb100;"><?php echo esc_html( $item['version'] ); ?></a></td> |
| 92 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><?php echo $item['success'] ? '<span style="background:#7fb100;padding:3px 7px;color:#fff;">Success</span>' : '<span style="background:#444;padding:3px 7px;color:#fff;">Failed</span>'; ?></td> |
| 93 |
</tr> |
| 94 |
<?php endforeach; ?> |
| 95 |
</tbody> |
| 96 |
</table> |
| 97 |
<?php endif; ?> |
| 98 |
<?php if ( is_array( $updated_items['plugins'] ) && ! empty( $updated_items['plugins'] ) ) : ?> |
| 99 |
<h4 style="color:#444;"><?php esc_html_e( 'Plugin Updates', 'mainwp' ); ?></h4> |
| 100 |
<table style="border:0;width:100%;text-align:left;padding:0;border-spacing:0;font-size:11px; margin-bottom:30px;"> |
| 101 |
<thead style="background: #eee"> |
| 102 |
<tr> |
| 103 |
<th style="padding:5px;text-align:left;"><?php esc_html_e( 'Plugin', 'mainwp' ); ?></th> |
| 104 |
<th style="padding:5px;"><?php esc_html_e( 'Old Version', 'mainwp' ); ?></th> |
| 105 |
<th style="padding:5px;"><?php esc_html_e( 'Latest Version', 'mainwp' ); ?></th> |
| 106 |
<th style="padding:5px;"><?php esc_html_e( 'Status', 'mainwp' ); ?></th> |
| 107 |
</tr> |
| 108 |
</thead> |
| 109 |
<tbody> |
| 110 |
<?php |
| 111 |
foreach ( $updated_items['plugins'] as $wpid => $item ) : |
| 112 |
if ( empty( $item['success'] ) ) { |
| 113 |
continue; |
| 114 |
} |
| 115 |
?> |
| 116 |
<tr> |
| 117 |
<td style="padding:10px;border-bottom: 1px solid #eee;"><?php echo esc_html( $item['name'] ); ?></td> |
| 118 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><?php echo esc_html( $item['old_version'] ); ?></td> |
| 119 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><a href="<?php echo ! empty( $item['change_log'] ) ? esc_url_raw( $item['change_log'] ) : ''; ?>" style="color:#7fb100;"><?php echo esc_html( $item['version'] ); ?></a></td> |
| 120 |
</tr> |
| 121 |
<?php endforeach; ?> |
| 122 |
</tbody> |
| 123 |
</table> |
| 124 |
<?php endif; ?> |
| 125 |
<?php if ( is_array( $updated_items['themes'] ) && ! empty( $updated_items['themes'] ) ) : ?> |
| 126 |
<h4 style="color:#444;"><?php esc_html_e( 'Theme Updates', 'mainwp' ); ?></h4> |
| 127 |
<table style="border:0;width:100%;text-align:left;padding:0;border-spacing:0;font-size:11px; margin-bottom:30px;"> |
| 128 |
<thead style="background: #eee"> |
| 129 |
<tr> |
| 130 |
<th style="padding:5px;text-align:left;"><?php esc_html_e( 'Theme', 'mainwp' ); ?></th> |
| 131 |
<th style="padding:5px;"><?php esc_html_e( 'Old Version', 'mainwp' ); ?></th> |
| 132 |
<th style="padding:5px;"><?php esc_html_e( 'Latest Version', 'mainwp' ); ?></th> |
| 133 |
</tr> |
| 134 |
</thead> |
| 135 |
<tbody> |
| 136 |
<?php |
| 137 |
foreach ( $updated_items['themes'] as $item ) : |
| 138 |
if ( empty( $item['success'] ) ) { |
| 139 |
continue; |
| 140 |
} |
| 141 |
?> |
| 142 |
<tr> |
| 143 |
<td style="padding:10px;border-bottom: 1px solid #eee;"><?php echo esc_html( $item['name'] ); ?></td> |
| 144 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><?php echo esc_html( $item['old_version'] ); ?></td> |
| 145 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><a href="#" style="color:#7fb100;"><?php echo esc_html( $item['version'] ); ?></a></td> |
| 146 |
</tr> |
| 147 |
<?php endforeach; ?> |
| 148 |
</tbody> |
| 149 |
</table> |
| 150 |
<?php endif; ?> |
| 151 |
|
| 152 |
<?php if ( is_array( $updated_items['translations'] ) && ! empty( $updated_items['translations'] ) ) : ?> |
| 153 |
<h4 style="color:#444;"><?php esc_html_e( 'Translation Updates', 'mainwp' ); ?></h4> |
| 154 |
<table style="border:0;width:100%;text-align:left;padding:0;border-spacing:0;font-size:11px; margin-bottom:30px;"> |
| 155 |
<thead style="background: #eee"> |
| 156 |
<tr> |
| 157 |
<th style="padding:5px;text-align:left;"><?php esc_html_e( 'Translation', 'mainwp' ); ?></th> |
| 158 |
<th style="padding:5px;"><?php esc_html_e( 'Type', 'mainwp' ); ?></th> |
| 159 |
<th style="padding:5px;"><?php esc_html_e( 'Latest Version', 'mainwp' ); ?></th> |
| 160 |
</tr> |
| 161 |
</thead> |
| 162 |
<tbody> |
| 163 |
<?php |
| 164 |
foreach ( $updated_items['translations'] as $item ) : |
| 165 |
if ( empty( $item['success'] ) ) { |
| 166 |
continue; |
| 167 |
} |
| 168 |
?> |
| 169 |
<tr> |
| 170 |
<td style="padding:10px;border-bottom: 1px solid #eee;"><?php echo esc_html( $item['name'] ); ?></td> |
| 171 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><?php echo esc_html( $item['type'] ); ?></td> |
| 172 |
<td style="padding:10px;border-bottom: 1px solid #eee;text-align:center;"><a href="#" style="color:#7fb100;"><?php echo esc_html( $item['version'] ); ?></a></td> |
| 173 |
</tr> |
| 174 |
<?php endforeach; ?> |
| 175 |
</tbody> |
| 176 |
</table> |
| 177 |
<?php endif; ?> |
| 178 |
|
| 179 |
<?php endforeach; ?> |
| 180 |
<?php endif; ?> |
| 181 |
</td> |
| 182 |
</tr> |
| 183 |
<!-- End Body --> |
| 184 |
</table> |
| 185 |
</td> |
| 186 |
</tr> |
| 187 |
</table> |
| 188 |
<div style="text-align:center;font-size:11px;margin-bottom:30px;"> |
| 189 |
<?php esc_html_e( 'Developed by ', 'mainwp' ); ?> <a href="https://mainwp.com/" style="color:#7fb100;"><?php esc_html_e( 'MainWP', 'mainwp' ); ?></a>. <?php esc_html_e( 'Sent from your Dashboard.', 'mainwp' ); // NOSONAR - noopener - open safe. ?> |
| 190 |
</div> |
| 191 |
<?php |
| 192 |
/** |
| 193 |
* Auto Updates Email Footer |
| 194 |
* |
| 195 |
* Fires at the bottom of the auto updates email template. |
| 196 |
* |
| 197 |
* @since 6.3 |
| 198 |
*/ |
| 199 |
do_action( 'mainwp_auto_updates_email_footer' ); |
| 200 |
?> |
| 201 |
</div> |
| 202 |
</body> |
| 203 |
</html> |
| 204 |
<?php |
| 205 |
|