# acymailing/11.0.2/WpInit/Message.php

AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress, version 11.0.2. 44 lines.

- Page: https://pluginprobe.com/plugins/acymailing/11.0.2/code/WpInit/Message.php
- Raw: https://pluginprobe.com/plugins/acymailing/11.0.2/raw/WpInit/Message.php
- Modified: 2026-08-06T15:10:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/acymailing/11.0.2/code/WpInit/Message.php#L10-L20`.

```php
<?php

namespace AcyMailing\WpInit;

defined('ABSPATH') || die('Restricted Access');

class Message
{
    public function __construct()
    {
        // This is the frontend message system, don't load on the backend
        if (defined('WP_ADMIN') && WP_ADMIN) return;

        if (defined('DOING_AJAX') && DOING_AJAX) return;

        // When calling acym_getFormToken() while _locale is set, it breaks the backend widget edition for some reason
        $locale = acym_getVar('string', '_locale', '');
        if (!empty($locale)) return;

        wp_enqueue_style(
            'acy_front_messages_css',
            ACYM_CSS.'front/messages.min.css?v='.filemtime(ACYM_MEDIA.'css'.DS.'front'.DS.'messages.min.css'),
            [],
            '11.0.2'
        );
        wp_enqueue_script(
            'acy_front_messages_js',
            ACYM_JS.'front/messages.min.js?v='.filemtime(ACYM_MEDIA.'js'.DS.'front'.DS.'messages.min.js'),
            [],
            '11.0.2',
            [
                'in_footer' => false,
            ]
        );
        wp_add_inline_script(
            'acy_front_messages_js',
            'var ACYM_AJAX_START = "'.admin_url('admin-ajax.php').'";
            var ACYM_AJAX_PARAMS = "?action='.ACYM_COMPONENT.'_router&'.acym_noTemplate().'&nocache='.time().'";
            var ACYM_AJAX = ACYM_AJAX_START + ACYM_AJAX_PARAMS;',
            'before'
        );
    }
}

```
