Plugin Directory

Changeset 2735764


Ignore:
Timestamp:
06/01/2022 03:31:00 PM (4 years ago)
Author:
wprj
Message:

version 1.0.1

Location:
emlg-tfa
Files:
20 added
3 edited

Legend:

Unmodified
Added
Removed
  • emlg-tfa/trunk/emlg-tfa.php

    r2735692 r2735764  
    55 * Plugin Name:  EMLG TFA
    66 * Description:  Two-Factor Authentication via out of band email
    7  * Version:      1.0
    8  * Contributors: wprj,kamiwdp6
     7 * Version:      1.0.1
     8 * Author:       wprj, Lalaina Rajaonah
    99 * Author URI:   https://codecanyon.net/user/wprj
    1010 * Text Domain:  emlg-tfa
     
    1414 */
    1515
    16 const EMLG_VERSION = '1.0';
     16const EMLG_VERSION = '1.0.1';
    1717define( 'EMLG_BASE', plugin_basename( __FILE__ ) );
    1818define( 'EMLG_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
  • emlg-tfa/trunk/includes/class-emlg-email.php

    r2735692 r2735764  
    7171
    7272    /**
     73     * Change `wp_mail` content type to HTML
     74     *
     75     * @return string
     76     */
     77    public function content_type() {
     78        return 'text/html';
     79    }
     80
     81    /**
    7382     * Try to send the email
    7483     *
     
    7786    public function send() {
    7887        add_action( 'wp_mail_failed', [ $this, 'mail_failed' ] );
    79         $success = wp_mail( $this->to, $this->subject, $this->message, [ 'From: ' . $this->sender_name . '<' . $this->sender_email . '>' ] );
     88        add_filter( 'wp_mail_content_type', [ $this, 'content_type' ] );
     89        $success = wp_mail( $this->to, $this->subject, $this->message, [ 'From: ' . $this->sender_name . ' <' . $this->sender_email . '>' ] );
     90        remove_filter( 'wp_mail_content_type', [ $this, 'content_type' ] );
    8091        remove_action( 'wp_mail_failed', [ $this, 'mail_failed' ] );
    8192
  • emlg-tfa/trunk/readme.txt

    r2735692 r2735764  
    55Tested up to: 6.0
    66Requires PHP: 5.6.20
    7 Stable tag: 1.0
     7Stable tag: 1.0.1
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
     
    5656== Changelog ==
    5757
     58= 1.0.1 =
     59
     60Fix: allow `wp_mail` to send formatted HTML
     61
    5862= 1.0 =
    5963
Note: See TracChangeset for help on using the changeset viewer.