You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB
PHTML

3.8.0 Release (#230) * Initial Coding Standards & Static Analysis Chanages. * Adds WordPress coding standards configuration. * Adds WordPress/PHP static analysis configuration. * Adds Git hooks to enforce checks and ensure quality on commits. * Adds initial local Docker development environment setup. * Current state of coding standards and analysis fixes. * Near Completion Update of PHP Code Sniffer Compliance Changes. * Fixes all PHP Code Sniffer WordPress Coding Standards Issues. * Updates Code Base to Pass Level 5 Baseline * Ensures PHP Code Sniffs continue to pass. * Fixes all code base issues to pass a level 5 PHP static analysis. * Updates PHPStan configurations to use a level 5 baseline. * Fixes Travis CI Configuration for Static Analysis * Fixes Plugin Pass i18n Checks * Adds i18n check to Travis CI builds. * Adds additional i18n run scripts to package.json. * Internationalization Checking & Fixes * Fixes missing i18n translation in main plugin file. * Adds update POT file. * Enforces i18n checks on commit with GrumPHP. * Adds i18n check step to Travis CI builds. * Gitattributes for export exclusions * Fixes missing loaded settings property assignment. * Adds Support for IDP Settings as Defined Constants - Reads from defined constants on plugin bootstrap. - Disabled plugin settings fields when defined constants are used. - Prevents savings plugin settings that are using defined constants. * Adds Node/NPM Environment Requirements * Fixes GrumPHP Bin Directory Configuration * Updates GrumPHP for Required Features - Bumps Composer package PHP version to 7.3. - Updates GrumPHP configuration to new format. * Plugin Settings Page Updates Using Constants - Ensures that any available defined constants are loaded in place of any database stored settings as an override. * Composer Dependency Updates & Travis CI Caching Fix * Travis CI Build Composer Update Change * NPM Updates & NVM Version Lock * Fixes NPM Package Lock File for Node v12 * Updates NPM Package Dependencies * Updates Changelog & README Files With Relevant Changes * Fixes Localizaion on Error Output * Changes GrumPHP Configuration to Provide a Full PHPCS Report * Fixes Local Dev Setup to Activate Plugin by Default * Adds Contribution Guide and Issue & PR Templates (#222) * Fixes Support GitHub Issue Template (#223) * Fixes space/typo with Wiki link (#224) * Fixes invalid wp-env plugin configuration (#225) * Improve Local Dev Setup by Reducing Setup Commands (#226) * Improve Local Dev Setup by Reducing Setup Commands * Adds Code Owners Configuration for Pull Requests * Fixes Development Dependencies and Setup Scripts (#227) * Dev release/3.8 (#229) * Adds dev Branch to Travis CI Builds * Release Preparation Enhancements & Release Changes Co-authored-by: Jonathan Daggerhart <jonathan@daggerhart.com>
4 years ago
<?php
/**
* Plugin Name: MailHog PhpMailer Setup
* Description: Establishes a connection between the PhpMailer library and the MailHog local-dev Docker container.
*
* @package OpenID_Connect_Generic_MuPlugins
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Provides the configuration for PhpMailer to use MailHog.
*
* @param PHPMailer $phpmailer The PHPMailer instance.
*
* @return void
*/
function mailhog_phpmailer_setup( PHPMailer $phpmailer ) {
defined( 'SMTP_HOST' ) || define( 'SMTP_HOST', 'mailhog' );
// PHPMailer doesn't follow WordPress naming conventions so this can be ignored.
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
$phpmailer->Host = SMTP_HOST;
defined( 'SMTP_PORT' ) || define( 'SMTP_PORT', 1025 );
// PHPMailer doesn't follow WordPress naming conventions so this can be ignored.
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
$phpmailer->Port = SMTP_PORT;
$phpmailer->IsSMTP();
}
add_action( 'phpmailer_init', 'mailhog_phpmailer_setup', 10, 2 );