Plugin Directory

Changeset 3433413


Ignore:
Timestamp:
01/06/2026 09:39:11 AM (3 months ago)
Author:
Mailjet
Message:

Updating trunk

Location:
mailjet-for-wordpress/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • mailjet-for-wordpress/trunk/README.md

    r3396790 r3433413  
    33- Contributors: Mailjet
    44- Tags: email, marketing, signup, newsletter, widget, smtp, woocommerce, contact form 7
    5 - Requires at least: 4.4
    6 - Tested up to: 6.8.1
    7 - Stable tag: 6.1.6
     5- Requires at least: 5.6
     6- Tested up to: 6.8.3
     7- Stable tag: 6.1.7
    88- Requires PHP: 7.4
    99- License: GPLv2 or later
  • mailjet-for-wordpress/trunk/readme.txt

    r3396790 r3433413  
    33- Contributors: Mailjet
    44- Tags: email, marketing, signup, newsletter, widget, smtp, woocommerce, contact form 7
    5 - Requires at least: 4.4
    6 - Tested up to: 6.8.1
    7 - Stable tag: 6.1.6
     5- Requires at least: 5.6
     6- Tested up to: 6.8.3
     7- Stable tag: 6.1.7
    88- Requires PHP: 7.4
    99- License: GPLv2 or later
  • mailjet-for-wordpress/trunk/src/includes/Mailjet.php

    r3292624 r3433413  
    3131     * @since    5.0.0
    3232     * @access   protected
    33      * @var      Mailjet_Loader    $loader    Maintains and registers all hooks for the plugin.
     33     * @var      Mailjet_Loader $loader Maintains and registers all hooks for the plugin.
    3434     */
    3535    protected $loader;
     
    3939     * @since    5.0.0
    4040     * @access   protected
    41      * @var      string    $plugin_name    The string used to uniquely identify this plugin.
     41     * @var      string $plugin_name The string used to uniquely identify this plugin.
    4242     */
    4343    protected $plugin_name;
     
    4747     * @since    1.0.0
    4848     * @access   protected
    49      * @var      string    $version    The current version of the plugin.
     49     * @var      string $version The current version of the plugin.
    5050     */
    5151    protected $version;
     52
    5253    /**
    5354     * Define the core functionality of the plugin.
     
    5960     * @since    5.0.0
    6061     */
    61     public function __construct() {
     62    public function __construct()
     63    {
    6264        if (\defined('MAILJET_VERSION')) {
    6365            $this->version = MAILJET_VERSION;
     
    7577        $this->registerMailjetWidget();
    7678
    77         add_shortcode('mailjet_form_builder', array( $this, 'display_mailjet_form_builder_widget' ));
    78     }
    79 
    80     /**
    81      * @param array  $attr
     79        add_shortcode('mailjet_form_builder', array($this, 'display_mailjet_form_builder_widget'));
     80    }
     81
     82    /**
     83     * @param array $attr
    8284     * @param string $tag
    8385     * @return false|string
    8486     */
    85     public static function display_mailjet_form_builder_widget( array $attr = array(), string $tag = '' ) {
    86         \extract(shortcode_atts(array( 'widget_id' => null ), $attr, $tag));
     87    public static function display_mailjet_form_builder_widget(array $attr = array(), string $tag = '')
     88    {
     89        \extract(shortcode_atts(array('widget_id' => null), $attr, $tag));
    8790        // GET All Mailjet widgets - to find the one that user actually configured with the shortcode
    8891        $instance = self::getOption('mailjet_form_builder_widget_options');
     
    98101            $widget_id = min($widgetIds);
    99102        }
    100         if (isset($instance[ (int) $widget_id ])) {
     103        if (isset($instance[(int)$widget_id])) {
    101104            ob_start();
    102             the_widget('MailjetWp\\MailjetPlugin\\WidgetFormBuilder\\WP_Mailjet_FormBuilder_Widget', $instance[ (int) $widget_id ]);
     105            the_widget('MailjetWp\\MailjetPlugin\\WidgetFormBuilder\\WP_Mailjet_FormBuilder_Widget', $instance[(int)$widget_id]);
    103106            return ob_get_clean();
    104107        }
     
    123126     * @access   private
    124127     */
    125     private function load_dependencies() {
     128    private function load_dependencies()
     129    {
    126130        $this->loader = new MailjetLoader();
    127131    }
     132
    128133    /**
    129134     * Define the locale for this plugin for internationalization.
     
    135140     * @access   private
    136141     */
    137     private function set_locale() {
     142    private function set_locale()
     143    {
    138144        $plugin_i18n = new Mailjeti18n();
    139145        $this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
    140146    }
     147
    141148    /**
    142149     * Register all of the hooks related to the admin area functionality
     
    146153     * @access   private
    147154     */
    148     private function define_admin_hooks() {
     155    private function define_admin_hooks()
     156    {
    149157        $plugin_admin = new MailjetAdmin($this->get_plugin_name(), $this->get_version());
    150158        $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
     
    164172     * @access   private
    165173     */
    166     private function define_public_hooks() {
     174    private function define_public_hooks()
     175    {
    167176        $plugin_public = new MailjetPublic($this->get_plugin_name(), $this->get_version());
    168177        $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
     
    173182     * @return void
    174183     */
    175     private function addMailjetMenu(): void {
     184    private function addMailjetMenu(): void
     185    {
    176186        $plugin_menu = new MailjetMenu();
    177187        $this->loader->add_action('admin_menu', $plugin_menu, 'display_menu');
     
    181191     * @return void
    182192     */
    183     private function addMailjetSettings(): void {
     193    private function addMailjetSettings(): void
     194    {
    184195        $plugin_settings = new MailjetSettings();
    185196        $this->loader->add_action('admin_init', $plugin_settings, 'mailjet_settings_admin_init');
     
    190201     * @return void
    191202     */
    192     private function addMailjetPHPMailer(): void {
     203    private function addMailjetPHPMailer(): void
     204    {
    193205        $plugin_mails = new MailjetMail();
    194206        $this->loader->add_action('phpmailer_init', $plugin_mails, 'phpmailer_init_smtp');
     
    199211     * @return void
    200212     */
    201     private function registerMailjetWidget(): void {
     213    private function registerMailjetWidget(): void
     214    {
    202215        $this->loader->add_action('widgets_init', $this, 'wp_mailjet_register_widgets');
    203216    }
     
    206219     * @return void
    207220     */
    208     public function wp_mailjet_register_widgets() {
     221    public function wp_mailjet_register_widgets()
     222    {
    209223        $widgetFormBuilder = 'MailjetWp\\MailjetPlugin\\WidgetFormBuilder\\WP_Mailjet_FormBuilder_Widget';
    210224        register_widget($widgetFormBuilder);
    211225    }
     226
    212227    /**
    213228     * Run the loader to execute all of the hooks with WordPress.
     
    215230     * @since    5.0.0
    216231     */
    217     public function run(): void {
     232    public function run(): void
     233    {
    218234        $this->loader->run();
    219235    }
     236
    220237    /**
    221238     * The name of the plugin used to uniquely identify it within the context of
    222239     * WordPress and to define internationalization functionality.
    223240     *
     241     * @return    string    The name of the plugin.
    224242     * @since     1.0.0
    225      * @return    string    The name of the plugin.
    226      */
    227     public function get_plugin_name(): string {
     243     */
     244    public function get_plugin_name(): string
     245    {
    228246        return $this->plugin_name;
    229247    }
     248
    230249    /**
    231250     * The reference to the class that orchestrates the hooks with the plugin.
    232251     *
     252     * @return    Mailjet_Loader    Orchestrates the hooks of the plugin.
    233253     * @since     5.0.0
    234      * @return    Mailjet_Loader    Orchestrates the hooks of the plugin.
    235      */
    236     public function get_loader() {
     254     */
     255    public function get_loader()
     256    {
    237257        return $this->loader;
    238258    }
     259
    239260    /**
    240261     * Retrieve the version number of the plugin.
    241262     *
     263     * @return    string    The version number of the plugin.
    242264     * @since     5.0.0
    243      * @return    string    The version number of the plugin.
    244      */
    245     public function get_version(): string {
     265     */
     266    public function get_version(): string
     267    {
    246268        return $this->version;
    247269    }
     
    250272     * @return void
    251273     */
    252     private function addWoocommerceActions(): void {
     274    private function addWoocommerceActions(): void
     275    {
    253276        $wooCommerceSettings = WooCommerceSettings::getInstance();
    254277        if (isset($_POST['action']) && $_POST['action'] === 'order_notification_settings_custom_hook') {
     
    260283            $this->loader->add_action('woocommerce_cheque_process_payment_order_status', $wooCommerceSettings, 'paid_by_cheque_order_edata_sync', 10, 2);
    261284        }
    262         $activeActions              = self::getOption('mailjet_wc_active_hooks');
     285        $activeActions = self::getOption('mailjet_wc_active_hooks');
    263286        $abandonedCartActiveActions = self::getOption('mailjet_wc_abandoned_cart_active_hooks');
    264         if ($activeActions && ! empty($activeActions)) {
     287        if ($activeActions && !empty($activeActions)) {
    265288            foreach ($activeActions as $action) {
    266289                $this->loader->add_action($action['hook'], $wooCommerceSettings, $action['callable'], 10, 2);
    267290            }
    268291        }
    269         if ($abandonedCartActiveActions && ! empty($abandonedCartActiveActions)) {
     292        if ($abandonedCartActiveActions && !empty($abandonedCartActiveActions)) {
    270293            foreach ($abandonedCartActiveActions as $action) {
    271294                $this->loader->add_action($action['hook'], $wooCommerceSettings, $action['callable'], 10, 2);
     
    278301     * @return mixed
    279302     */
    280     public static function getOption( string $key ) {
    281         if ( ! is_multisite()) {
     303    public static function getOption(string $key)
     304    {
     305        if (!is_multisite()) {
    282306            return get_option($key);
    283307        }
  • mailjet-for-wordpress/trunk/wp-mailjet.php

    r3396790 r3433413  
    1515 * Plugin URI:        https://www.mailjet.com/partners/wordpress/
    1616 * Description:       The Best WordPress Plugin For Email Newsletters.
    17  * Version:           6.1.6
    18  * Tested up to:      6.8.1
     17 * Version:           6.1.7
     18 * Tested up to:      6.8.3
    1919 * Author:            Mailjet SAS
    2020 * Author URI:        http://mailjet.com
Note: See TracChangeset for help on using the changeset viewer.