Changeset 2597607
- Timestamp:
- 09/12/2021 03:54:51 PM (5 years ago)
- Location:
- htp-smtp/trunk
- Files:
-
- 5 edited
-
htp-smtp.php (modified) (1 diff)
-
inc/Admin_Menus.php (modified) (2 diffs)
-
inc/Main.php (modified) (4 diffs)
-
inc/Network_Admin_Menus.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
htp-smtp/trunk/htp-smtp.php
r2575192 r2597607 4 4 * Plugin URI: https://hutanatu.com/plugin/htp-smtp/ 5 5 * Description: HTP SMTP can help us to send emails via SMTP instead of the PHP mail() function and email logger built-in. 6 * Version: 1. 0.06 * Version: 1.1.0 7 7 * Author: HuTaNaTu 8 8 * Author URI: https://hutanatu.com/ -
htp-smtp/trunk/inc/Admin_Menus.php
r2575192 r2597607 182 182 ); 183 183 } 184 if ( ! defined( 'HTP_SMTP_HTML' ) ) { 185 add_settings_field( 186 'html', 187 __( 'HTML', 'htp-smtp' ), 188 [ $this, 'render_fields' ], 189 self::HTP_SMTP_PAGE, 190 $section_id, 191 [ 192 'label_for' => 'html', 193 'type' => 'checkbox', 194 'desc' => __( 'Send this email in HTML or in plain text format.', 'htp-smtp' ) 195 ] 196 ); 197 } 184 198 add_settings_field( 185 199 'delete_options', … … 216 230 $fields['username'] = sanitize_text_field( trim( $fields['username'] ) ); 217 231 $fields['password'] = sanitize_text_field( trim( $fields['password'] ) ); 232 $fields['html'] = sanitize_text_field( trim( $fields['html'] ) ); 218 233 $fields['delete_options'] = sanitize_text_field( trim( $fields['delete_options'] ) ); 219 234 -
htp-smtp/trunk/inc/Main.php
r2575192 r2597607 64 64 echo '<input type="hidden" name="htp_smtp_test" value="test" />'; 65 65 echo '<input type="hidden" name="htp_smtp_test_nonce" value="' . wp_create_nonce( 'htp_smtp_test' ) . '" />'; 66 submit_button( );66 submit_button( __( 'Send Email', 'htp-smtp' ) ); 67 67 echo '</form>'; 68 68 echo '</div>'; … … 206 206 $smtp_auth = defined( 'HTP_SMTP_AUTH' ) ? HTP_SMTP_AUTH : self::$options['smtp_auth']; 207 207 $username = defined( 'HTP_SMTP_USER' ) ? HTP_SMTP_USER : self::$options['username']; 208 $html = defined( 'HTP_SMTP_HTML' ) ? HTP_SMTP_HTML : self::$options['html']; 208 209 $password = defined( 'HTP_SMTP_PASS' ) ? HTP_SMTP_PASS : self::$options['password']; 209 210 if ( … … 219 220 $smtp_auth = defined( 'HTP_SMTP_AUTH' ) ? HTP_SMTP_AUTH : $network_options['smtp_auth']; 220 221 $username = defined( 'HTP_SMTP_USER' ) ? HTP_SMTP_USER : $network_options['username']; 222 $html = defined( 'HTP_SMTP_HTML' ) ? HTP_SMTP_HTML : $network_options['html']; 221 223 $password = defined( 'HTP_SMTP_PASS' ) ? HTP_SMTP_PASS : $network_options['password']; 222 224 … … 235 237 $phpmailer->Port = $smtp_port; 236 238 $phpmailer->SMTPAuth = $smtp_auth == 'yes'; 239 if ( $html === 'yes' ) { 240 $phpmailer->ContentType = 'text/html'; 241 } 237 242 238 243 if ( $phpmailer->SMTPAuth ) { -
htp-smtp/trunk/inc/Network_Admin_Menus.php
r2575192 r2597607 164 164 'label_for' => 'password', 165 165 'type' => 'password', 166 ] 167 ); 168 } 169 if ( ! defined( 'HTP_SMTP_HTML' ) ) { 170 add_settings_field( 171 'html', 172 __( 'HTML', 'htp-smtp' ), 173 [ $this, 'render_fields' ], 174 self::HTP_SMTP_PAGE, 175 $section_id, 176 [ 177 'label_for' => 'html', 178 'type' => 'checkbox', 179 'desc' => __( 'Send this email in HTML or in plain text format.', 'htp-smtp' ) 166 180 ] 167 181 ); … … 211 225 $options['username'] = sanitize_text_field( trim( $_POST['username'] ) ); 212 226 $options['password'] = sanitize_text_field( trim( $_POST['password'] ) ); 227 $options['html'] = sanitize_text_field( trim( $_POST['html'] ) ); 213 228 $options['delete_options'] = sanitize_text_field( trim( $_POST['delete_options'] ) ); 214 229 -
htp-smtp/trunk/readme.txt
r2575194 r2597607 3 3 License: GPLv3 4 4 Tested up to: 5.8 5 Stable tag: 1. 0.05 Stable tag: 1.1.0 6 6 7 7 HTP SMTP can help us to send emails via SMTP instead of the PHP mail() function.
Note: See TracChangeset
for help on using the changeset viewer.