Changeset 2792855
- Timestamp:
- 10/01/2022 01:03:54 PM (3 years ago)
- Location:
- simple-smtp
- Files:
-
- 2 added
- 2 deleted
- 26 edited
- 1 copied
-
tags/1.3.2 (copied) (copied from simple-smtp/trunk)
-
tags/1.3.2/assets/smtp-config.js (modified) (1 diff)
-
tags/1.3.2/readme.txt (modified) (2 diffs)
-
tags/1.3.2/src/log/class-log.php (modified) (3 diffs)
-
tags/1.3.2/src/log/class-logservice.php (modified) (2 diffs)
-
tags/1.3.2/src/log/class-logtable.php (modified) (4 diffs)
-
tags/1.3.2/src/mail/class-mailview.php (added)
-
tags/1.3.2/src/settings/class-mailview.php (deleted)
-
tags/1.3.2/src/settings/class-quickconfig.php (modified) (1 diff)
-
tags/1.3.2/vendor/autoload.php (modified) (1 diff)
-
tags/1.3.2/vendor/composer/InstalledVersions.php (modified) (7 diffs)
-
tags/1.3.2/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/1.3.2/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/1.3.2/vendor/composer/autoload_static.php (modified) (3 diffs)
-
tags/1.3.2/vendor/composer/installed.php (modified) (2 diffs)
-
tags/1.3.2/wp-simple-smtp.php (modified) (2 diffs)
-
trunk/assets/smtp-config.js (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/log/class-log.php (modified) (3 diffs)
-
trunk/src/log/class-logservice.php (modified) (2 diffs)
-
trunk/src/log/class-logtable.php (modified) (4 diffs)
-
trunk/src/mail/class-mailview.php (added)
-
trunk/src/settings/class-mailview.php (deleted)
-
trunk/src/settings/class-quickconfig.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (7 diffs)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/wp-simple-smtp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-smtp/tags/1.3.2/assets/smtp-config.js
r2662417 r2792855 7 7 */ 8 8 9 const { __ , _x, _n, _nx} = wp.i18n;9 const { __ } = wp.i18n; 10 10 11 11 /** -
simple-smtp/tags/1.3.2/readme.txt
r2728126 r2792855 5 5 Tested up to: 6.0 6 6 Requires PHP: 7.0 7 Stable tag: 1.3. 1.17 Stable tag: 1.3.2 8 8 License: MIT 9 9 … … 96 96 Yes! [Please see our GitHub repository here](https://github.com/soup-bowl/wp-simple-smtp) for writing issues and/or making pull requests. 97 97 98 One of the easiest aspects to contribute to is the SMTP quick configuration segment. If you wish to maintain this aspect, suggest a new setting, or report broken entries, see the [SMTP quick config wiki page](https://github.com/soup-bowl/wp-simple-smtp/wiki/SMTP-Quick-Config). 99 98 100 == Changelog == 101 = 1.3.2 = 102 * Added: Mail view now displays from, cc, bcc & the headers stored when logging is enabled. 103 * Fix: Infinite loop when a plugin hooks into the mail routine functions and sends an email ([#116](https://github.com/soup-bowl/wp-simple-smtp/pull/116)). 104 99 105 = 1.3.1.1 = 100 106 * Verified working with WordPress 6.0. -
simple-smtp/tags/1.3.2/src/log/class-log.php
r2467283 r2792855 123 123 124 124 /** 125 * Gets the from details. 126 * 127 * @return string|null 128 */ 129 public function get_from() { 130 return $this->find_in_headers( 'from' ); 131 } 132 133 /** 134 * Gets the cc recipients. 135 * 136 * @return string|null 137 */ 138 public function get_cc() { 139 return $this->find_in_headers( 'cc' ); 140 } 141 142 /** 143 * Gets the bcc recipients. 144 * 145 * @return string|null 146 */ 147 public function get_bcc() { 148 return $this->find_in_headers( 'bcc' ); 149 } 150 151 /** 125 152 * Gets the server dispatch headers. 126 153 * … … 132 159 133 160 /** 161 * Same as get_headers, but the header strings are split. 162 * 163 * @param bool $exclude_recipients Remove CC from the list. 164 * @return array[] 165 */ 166 public function get_headers_as_array( $exclude_recipients = true ) { 167 $collection = []; 168 if ( ! empty( $this->get_headers() ) ) { 169 foreach ( $this->get_headers() as $header ) { 170 $expd = explode( ':', $header ); 171 if ( $exclude_recipients && in_array( strtolower( $expd[0] ), [ 'cc', 'bcc', 'from' ], true ) ) { 172 continue; 173 } else { 174 $collection[] = $expd; 175 } 176 } 177 } 178 179 return $collection; 180 } 181 182 /** 134 183 * The dispatch headers, unsplit. 135 184 * … … 274 323 return $this; 275 324 } 325 326 /** 327 * Searches the header array for a particular header. 328 * 329 * @param string $needle Header to look for. 330 * @return string[] 331 */ 332 private function find_in_headers( $needle ) { 333 $collection = []; 334 foreach ( $this->get_headers_as_array( false ) as $header ) { 335 if ( strtolower( $header[0] ) === strtolower( $needle ) ) { 336 $collection[] = $header[1]; 337 } 338 } 339 340 return $collection; 341 } 342 343 /** 344 * Extracts the email from angled brackets, if the syntax is so. 345 * 346 * @param string $input The subject to be inspected. 347 * @return string Either the extracted email address, or the input is returned untouched. 348 */ 349 private function strip_email( $input ) { 350 $stripped = ''; 351 $rc = preg_match( '/(?<=\<).+?(?=\>)/', $input, $stripped ); 352 353 if ( 1 === $rc ) { 354 return $stripped; 355 } else { 356 return $input; 357 } 358 } 276 359 } -
simple-smtp/tags/1.3.2/src/log/class-logservice.php
r2662417 r2792855 50 50 'read_post' => 'manage_options', 51 51 ], 52 'label' => _x( 'E-mail log entries', 'Post Type General Name', 'simple-smtp' ), 52 53 ] 53 54 ); … … 61 62 */ 62 63 public function new_log_entry( $log ) { 64 // Patch fix to stop Sucuri from spamming the log. Should be investigated more. 65 $dup_check = post_exists( $log->get_subject(), '', current_time( 'mysql' ), $this->post_type ); 66 if ( 0 !== $dup_check ) { 67 return $dup_check; 68 } 69 63 70 $post_id = wp_insert_post( 64 71 [ -
simple-smtp/tags/1.3.2/src/log/class-logtable.php
r2707522 r2792855 10 10 namespace wpsimplesmtp; 11 11 12 use wpsimplesmtp\Log; 12 13 use wpsimplesmtp\LogService; 13 14 … … 69 70 if ( ! empty( $entries ) ) { 70 71 foreach ( $entries as $entry ) { 71 $recipients = implode( ', ', $entry->get_recipients() );72 72 $actions = $this->render_log_entry_buttons( $entry ); 73 73 $date = gmdate( get_option( 'time_format' ) . ', ' . get_option( 'date_format' ), strtotime( $entry->get_timestamp() ) ); … … 75 75 echo wp_kses( 76 76 '<tr class="' . esc_attr( $row_classes ) . '"> 77 <td data-colname="' . $labels[0] . '" class="has-row-actions">' . $ recipients. $actions . '</td>77 <td data-colname="' . $labels[0] . '" class="has-row-actions">' . $this->display_recipients( $entry ) . $actions . '</td> 78 78 <td data-colname="' . $labels[1] . '">' . $entry->get_subject() . '</td> 79 79 <td data-colname="' . $labels[2] . '"><abbr title="' . $entry->get_timestamp() . '">' . $date . '</abbr></td> … … 223 223 224 224 /** 225 * Compiles a list of recipients (to and cc) into a single string. 226 * 227 * @param Log $log_item Log entry item. 228 * @return string 229 */ 230 private function display_recipients( $log_item ) { 231 $recipients = []; 232 233 if ( ! empty( $log_item->get_recipients() ) ) { 234 $recipients[] = esc_html__( 'To', 'simple-smtp' ) . ': ' . implode( ', ', $log_item->get_recipients() ); 235 } 236 237 if ( ! empty( $log_item->get_cc() ) ) { 238 $recipients[] = esc_html__( 'CC', 'simple-smtp' ) . ': ' . implode( ', ', $log_item->get_cc() ); 239 } 240 241 if ( ! empty( $log_item->get_bcc() ) ) { 242 $recipients[] = esc_html__( 'BCC', 'simple-smtp' ) . ': ' . implode( ', ', $log_item->get_bcc() ); 243 } 244 245 return wp_kses( 246 implode( ', ', $recipients ), 247 $this->allowed_table_html() 248 ); 249 } 250 251 /** 225 252 * Array for kses that allows table-related HTML only. 226 253 * -
simple-smtp/tags/1.3.2/src/settings/class-quickconfig.php
r2662417 r2792855 16 16 /** 17 17 * Returns an array of possible SMTP configuration options. 18 * Before contributing, please read the wiki page in the link below. 19 * 20 * @link https://github.com/soup-bowl/wp-simple-smtp/wiki/SMTP-Quick-Config The resources for the SMTP entries. 18 21 * 19 22 * @return array -
simple-smtp/tags/1.3.2/vendor/autoload.php
r2728126 r2792855 10 10 require_once __DIR__ . '/composer/autoload_real.php'; 11 11 12 return ComposerAutoloaderInit fd95603baaa8a9dc86f48b57448493de::getLoader();12 return ComposerAutoloaderInit15d01ae0d3417ce6d3202b3025ab51cd::getLoader(); -
simple-smtp/tags/1.3.2/vendor/composer/InstalledVersions.php
r2707522 r2792855 29 29 /** 30 30 * @var mixed[]|null 31 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 32 */ 33 33 private static $installed; … … 40 40 /** 41 41 * @var array[] 42 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 43 43 */ 44 44 private static $installedByVendor = array(); … … 244 244 /** 245 245 * @return array 246 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 247 247 */ 248 248 public static function getRootPackage() … … 258 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 259 259 * @return array[] 260 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 261 261 */ 262 262 public static function getRawData() … … 281 281 * 282 282 * @return array[] 283 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 284 284 */ 285 285 public static function getAllRawData() … … 304 304 * @return void 305 305 * 306 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 307 307 */ 308 308 public static function reload($data) … … 314 314 /** 315 315 * @return array[] 316 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 317 317 */ 318 318 private static function getInstalled() -
simple-smtp/tags/1.3.2/vendor/composer/autoload_classmap.php
r2707522 r2792855 15 15 'wpsimplesmtp\\Mail' => $baseDir . '/src/mail/class-mail.php', 16 16 'wpsimplesmtp\\MailDisable' => $baseDir . '/src/mail/class-maildisable.php', 17 'wpsimplesmtp\\MailView' => $baseDir . '/src/ settings/class-mailview.php',17 'wpsimplesmtp\\MailView' => $baseDir . '/src/mail/class-mailview.php', 18 18 'wpsimplesmtp\\Mailtest' => $baseDir . '/src/mail/class-mailtest.php', 19 19 'wpsimplesmtp\\Multisite' => $baseDir . '/src/settings/class-multisite.php', -
simple-smtp/tags/1.3.2/vendor/composer/autoload_real.php
r2728126 r2792855 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit fd95603baaa8a9dc86f48b57448493de5 class ComposerAutoloaderInit15d01ae0d3417ce6d3202b3025ab51cd 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit fd95603baaa8a9dc86f48b57448493de', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit15d01ae0d3417ce6d3202b3025ab51cd', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit fd95603baaa8a9dc86f48b57448493de', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit15d01ae0d3417ce6d3202b3025ab51cd', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit fd95603baaa8a9dc86f48b57448493de::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit15d01ae0d3417ce6d3202b3025ab51cd::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
simple-smtp/tags/1.3.2/vendor/composer/autoload_static.php
r2728126 r2792855 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit fd95603baaa8a9dc86f48b57448493de7 class ComposerStaticInit15d01ae0d3417ce6d3202b3025ab51cd 8 8 { 9 9 public static $classMap = array ( … … 16 16 'wpsimplesmtp\\Mail' => __DIR__ . '/../..' . '/src/mail/class-mail.php', 17 17 'wpsimplesmtp\\MailDisable' => __DIR__ . '/../..' . '/src/mail/class-maildisable.php', 18 'wpsimplesmtp\\MailView' => __DIR__ . '/../..' . '/src/ settings/class-mailview.php',18 'wpsimplesmtp\\MailView' => __DIR__ . '/../..' . '/src/mail/class-mailview.php', 19 19 'wpsimplesmtp\\Mailtest' => __DIR__ . '/../..' . '/src/mail/class-mailtest.php', 20 20 'wpsimplesmtp\\Multisite' => __DIR__ . '/../..' . '/src/settings/class-multisite.php', … … 31 31 { 32 32 return \Closure::bind(function () use ($loader) { 33 $loader->classMap = ComposerStaticInit fd95603baaa8a9dc86f48b57448493de::$classMap;33 $loader->classMap = ComposerStaticInit15d01ae0d3417ce6d3202b3025ab51cd::$classMap; 34 34 35 35 }, null, ClassLoader::class); -
simple-smtp/tags/1.3.2/vendor/composer/installed.php
r2728126 r2792855 1 1 <?php return array( 2 2 'root' => array( 3 'name' => 'soup-bowl/wpsimplesmtp', 3 4 'pretty_version' => '1.0.0+no-version-set', 4 5 'version' => '1.0.0.0', 6 'reference' => NULL, 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => NULL,9 'name' => 'soup-bowl/wpsimplesmtp',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => '1.0.0+no-version-set', 15 15 'version' => '1.0.0.0', 16 'reference' => NULL, 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => NULL,20 20 'dev_requirement' => false, 21 21 ), -
simple-smtp/tags/1.3.2/wp-simple-smtp.php
r2728126 r2792855 11 11 * Description: Adds mail configuration to WordPress in a simple, standardised plugin. 12 12 * Plugin URI: https://github.com/soup-bowl/wp-simple-smtp 13 * Version: 1.3. 1.113 * Version: 1.3.2 14 14 * Author: soup-bowl & Contributors 15 15 * Author URI: https://github.com/soup-bowl/wp-simple-smtp … … 93 93 94 94 if ( 'index.php' !== $page ) { 95 wp_enqueue_script( 'wpss_config', plugin_dir_url( __FILE__ ) . 'assets/smtp-config.js', [ 'jquery', 'wp-i18n' ], '1. 3', true );95 wp_enqueue_script( 'wpss_config', plugin_dir_url( __FILE__ ) . 'assets/smtp-config.js', [ 'jquery', 'wp-i18n' ], '1.4', true ); 96 96 wp_set_script_translations( 'wpss_config', 'simple-smtp' ); 97 97 -
simple-smtp/trunk/assets/smtp-config.js
r2662417 r2792855 7 7 */ 8 8 9 const { __ , _x, _n, _nx} = wp.i18n;9 const { __ } = wp.i18n; 10 10 11 11 /** -
simple-smtp/trunk/readme.txt
r2728126 r2792855 5 5 Tested up to: 6.0 6 6 Requires PHP: 7.0 7 Stable tag: 1.3. 1.17 Stable tag: 1.3.2 8 8 License: MIT 9 9 … … 96 96 Yes! [Please see our GitHub repository here](https://github.com/soup-bowl/wp-simple-smtp) for writing issues and/or making pull requests. 97 97 98 One of the easiest aspects to contribute to is the SMTP quick configuration segment. If you wish to maintain this aspect, suggest a new setting, or report broken entries, see the [SMTP quick config wiki page](https://github.com/soup-bowl/wp-simple-smtp/wiki/SMTP-Quick-Config). 99 98 100 == Changelog == 101 = 1.3.2 = 102 * Added: Mail view now displays from, cc, bcc & the headers stored when logging is enabled. 103 * Fix: Infinite loop when a plugin hooks into the mail routine functions and sends an email ([#116](https://github.com/soup-bowl/wp-simple-smtp/pull/116)). 104 99 105 = 1.3.1.1 = 100 106 * Verified working with WordPress 6.0. -
simple-smtp/trunk/src/log/class-log.php
r2467283 r2792855 123 123 124 124 /** 125 * Gets the from details. 126 * 127 * @return string|null 128 */ 129 public function get_from() { 130 return $this->find_in_headers( 'from' ); 131 } 132 133 /** 134 * Gets the cc recipients. 135 * 136 * @return string|null 137 */ 138 public function get_cc() { 139 return $this->find_in_headers( 'cc' ); 140 } 141 142 /** 143 * Gets the bcc recipients. 144 * 145 * @return string|null 146 */ 147 public function get_bcc() { 148 return $this->find_in_headers( 'bcc' ); 149 } 150 151 /** 125 152 * Gets the server dispatch headers. 126 153 * … … 132 159 133 160 /** 161 * Same as get_headers, but the header strings are split. 162 * 163 * @param bool $exclude_recipients Remove CC from the list. 164 * @return array[] 165 */ 166 public function get_headers_as_array( $exclude_recipients = true ) { 167 $collection = []; 168 if ( ! empty( $this->get_headers() ) ) { 169 foreach ( $this->get_headers() as $header ) { 170 $expd = explode( ':', $header ); 171 if ( $exclude_recipients && in_array( strtolower( $expd[0] ), [ 'cc', 'bcc', 'from' ], true ) ) { 172 continue; 173 } else { 174 $collection[] = $expd; 175 } 176 } 177 } 178 179 return $collection; 180 } 181 182 /** 134 183 * The dispatch headers, unsplit. 135 184 * … … 274 323 return $this; 275 324 } 325 326 /** 327 * Searches the header array for a particular header. 328 * 329 * @param string $needle Header to look for. 330 * @return string[] 331 */ 332 private function find_in_headers( $needle ) { 333 $collection = []; 334 foreach ( $this->get_headers_as_array( false ) as $header ) { 335 if ( strtolower( $header[0] ) === strtolower( $needle ) ) { 336 $collection[] = $header[1]; 337 } 338 } 339 340 return $collection; 341 } 342 343 /** 344 * Extracts the email from angled brackets, if the syntax is so. 345 * 346 * @param string $input The subject to be inspected. 347 * @return string Either the extracted email address, or the input is returned untouched. 348 */ 349 private function strip_email( $input ) { 350 $stripped = ''; 351 $rc = preg_match( '/(?<=\<).+?(?=\>)/', $input, $stripped ); 352 353 if ( 1 === $rc ) { 354 return $stripped; 355 } else { 356 return $input; 357 } 358 } 276 359 } -
simple-smtp/trunk/src/log/class-logservice.php
r2662417 r2792855 50 50 'read_post' => 'manage_options', 51 51 ], 52 'label' => _x( 'E-mail log entries', 'Post Type General Name', 'simple-smtp' ), 52 53 ] 53 54 ); … … 61 62 */ 62 63 public function new_log_entry( $log ) { 64 // Patch fix to stop Sucuri from spamming the log. Should be investigated more. 65 $dup_check = post_exists( $log->get_subject(), '', current_time( 'mysql' ), $this->post_type ); 66 if ( 0 !== $dup_check ) { 67 return $dup_check; 68 } 69 63 70 $post_id = wp_insert_post( 64 71 [ -
simple-smtp/trunk/src/log/class-logtable.php
r2707522 r2792855 10 10 namespace wpsimplesmtp; 11 11 12 use wpsimplesmtp\Log; 12 13 use wpsimplesmtp\LogService; 13 14 … … 69 70 if ( ! empty( $entries ) ) { 70 71 foreach ( $entries as $entry ) { 71 $recipients = implode( ', ', $entry->get_recipients() );72 72 $actions = $this->render_log_entry_buttons( $entry ); 73 73 $date = gmdate( get_option( 'time_format' ) . ', ' . get_option( 'date_format' ), strtotime( $entry->get_timestamp() ) ); … … 75 75 echo wp_kses( 76 76 '<tr class="' . esc_attr( $row_classes ) . '"> 77 <td data-colname="' . $labels[0] . '" class="has-row-actions">' . $ recipients. $actions . '</td>77 <td data-colname="' . $labels[0] . '" class="has-row-actions">' . $this->display_recipients( $entry ) . $actions . '</td> 78 78 <td data-colname="' . $labels[1] . '">' . $entry->get_subject() . '</td> 79 79 <td data-colname="' . $labels[2] . '"><abbr title="' . $entry->get_timestamp() . '">' . $date . '</abbr></td> … … 223 223 224 224 /** 225 * Compiles a list of recipients (to and cc) into a single string. 226 * 227 * @param Log $log_item Log entry item. 228 * @return string 229 */ 230 private function display_recipients( $log_item ) { 231 $recipients = []; 232 233 if ( ! empty( $log_item->get_recipients() ) ) { 234 $recipients[] = esc_html__( 'To', 'simple-smtp' ) . ': ' . implode( ', ', $log_item->get_recipients() ); 235 } 236 237 if ( ! empty( $log_item->get_cc() ) ) { 238 $recipients[] = esc_html__( 'CC', 'simple-smtp' ) . ': ' . implode( ', ', $log_item->get_cc() ); 239 } 240 241 if ( ! empty( $log_item->get_bcc() ) ) { 242 $recipients[] = esc_html__( 'BCC', 'simple-smtp' ) . ': ' . implode( ', ', $log_item->get_bcc() ); 243 } 244 245 return wp_kses( 246 implode( ', ', $recipients ), 247 $this->allowed_table_html() 248 ); 249 } 250 251 /** 225 252 * Array for kses that allows table-related HTML only. 226 253 * -
simple-smtp/trunk/src/settings/class-quickconfig.php
r2662417 r2792855 16 16 /** 17 17 * Returns an array of possible SMTP configuration options. 18 * Before contributing, please read the wiki page in the link below. 19 * 20 * @link https://github.com/soup-bowl/wp-simple-smtp/wiki/SMTP-Quick-Config The resources for the SMTP entries. 18 21 * 19 22 * @return array -
simple-smtp/trunk/vendor/autoload.php
r2728126 r2792855 10 10 require_once __DIR__ . '/composer/autoload_real.php'; 11 11 12 return ComposerAutoloaderInit fd95603baaa8a9dc86f48b57448493de::getLoader();12 return ComposerAutoloaderInit15d01ae0d3417ce6d3202b3025ab51cd::getLoader(); -
simple-smtp/trunk/vendor/composer/InstalledVersions.php
r2707522 r2792855 29 29 /** 30 30 * @var mixed[]|null 31 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 32 */ 33 33 private static $installed; … … 40 40 /** 41 41 * @var array[] 42 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 43 43 */ 44 44 private static $installedByVendor = array(); … … 244 244 /** 245 245 * @return array 246 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 247 247 */ 248 248 public static function getRootPackage() … … 258 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 259 259 * @return array[] 260 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 261 261 */ 262 262 public static function getRawData() … … 281 281 * 282 282 * @return array[] 283 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 284 284 */ 285 285 public static function getAllRawData() … … 304 304 * @return void 305 305 * 306 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 307 307 */ 308 308 public static function reload($data) … … 314 314 /** 315 315 * @return array[] 316 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 317 317 */ 318 318 private static function getInstalled() -
simple-smtp/trunk/vendor/composer/autoload_classmap.php
r2707522 r2792855 15 15 'wpsimplesmtp\\Mail' => $baseDir . '/src/mail/class-mail.php', 16 16 'wpsimplesmtp\\MailDisable' => $baseDir . '/src/mail/class-maildisable.php', 17 'wpsimplesmtp\\MailView' => $baseDir . '/src/ settings/class-mailview.php',17 'wpsimplesmtp\\MailView' => $baseDir . '/src/mail/class-mailview.php', 18 18 'wpsimplesmtp\\Mailtest' => $baseDir . '/src/mail/class-mailtest.php', 19 19 'wpsimplesmtp\\Multisite' => $baseDir . '/src/settings/class-multisite.php', -
simple-smtp/trunk/vendor/composer/autoload_real.php
r2728126 r2792855 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit fd95603baaa8a9dc86f48b57448493de5 class ComposerAutoloaderInit15d01ae0d3417ce6d3202b3025ab51cd 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit fd95603baaa8a9dc86f48b57448493de', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit15d01ae0d3417ce6d3202b3025ab51cd', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit fd95603baaa8a9dc86f48b57448493de', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit15d01ae0d3417ce6d3202b3025ab51cd', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit fd95603baaa8a9dc86f48b57448493de::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit15d01ae0d3417ce6d3202b3025ab51cd::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
simple-smtp/trunk/vendor/composer/autoload_static.php
r2728126 r2792855 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit fd95603baaa8a9dc86f48b57448493de7 class ComposerStaticInit15d01ae0d3417ce6d3202b3025ab51cd 8 8 { 9 9 public static $classMap = array ( … … 16 16 'wpsimplesmtp\\Mail' => __DIR__ . '/../..' . '/src/mail/class-mail.php', 17 17 'wpsimplesmtp\\MailDisable' => __DIR__ . '/../..' . '/src/mail/class-maildisable.php', 18 'wpsimplesmtp\\MailView' => __DIR__ . '/../..' . '/src/ settings/class-mailview.php',18 'wpsimplesmtp\\MailView' => __DIR__ . '/../..' . '/src/mail/class-mailview.php', 19 19 'wpsimplesmtp\\Mailtest' => __DIR__ . '/../..' . '/src/mail/class-mailtest.php', 20 20 'wpsimplesmtp\\Multisite' => __DIR__ . '/../..' . '/src/settings/class-multisite.php', … … 31 31 { 32 32 return \Closure::bind(function () use ($loader) { 33 $loader->classMap = ComposerStaticInit fd95603baaa8a9dc86f48b57448493de::$classMap;33 $loader->classMap = ComposerStaticInit15d01ae0d3417ce6d3202b3025ab51cd::$classMap; 34 34 35 35 }, null, ClassLoader::class); -
simple-smtp/trunk/vendor/composer/installed.php
r2728126 r2792855 1 1 <?php return array( 2 2 'root' => array( 3 'name' => 'soup-bowl/wpsimplesmtp', 3 4 'pretty_version' => '1.0.0+no-version-set', 4 5 'version' => '1.0.0.0', 6 'reference' => NULL, 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => NULL,9 'name' => 'soup-bowl/wpsimplesmtp',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => '1.0.0+no-version-set', 15 15 'version' => '1.0.0.0', 16 'reference' => NULL, 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => NULL,20 20 'dev_requirement' => false, 21 21 ), -
simple-smtp/trunk/wp-simple-smtp.php
r2728126 r2792855 11 11 * Description: Adds mail configuration to WordPress in a simple, standardised plugin. 12 12 * Plugin URI: https://github.com/soup-bowl/wp-simple-smtp 13 * Version: 1.3. 1.113 * Version: 1.3.2 14 14 * Author: soup-bowl & Contributors 15 15 * Author URI: https://github.com/soup-bowl/wp-simple-smtp … … 93 93 94 94 if ( 'index.php' !== $page ) { 95 wp_enqueue_script( 'wpss_config', plugin_dir_url( __FILE__ ) . 'assets/smtp-config.js', [ 'jquery', 'wp-i18n' ], '1. 3', true );95 wp_enqueue_script( 'wpss_config', plugin_dir_url( __FILE__ ) . 'assets/smtp-config.js', [ 'jquery', 'wp-i18n' ], '1.4', true ); 96 96 wp_set_script_translations( 'wpss_config', 'simple-smtp' ); 97 97
Note: See TracChangeset
for help on using the changeset viewer.