PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.1
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | WpInit/Beaver.php +0 -54 11.0.3 → 11.1.1 View file →
@@ -1,54 +1,0 @@
1 -<?php
2 -
3 -namespace AcyMailing\WpInit;
4 -
5 -defined('ABSPATH') || die('Restricted Access');
6 -
7 -class Beaver
8 -{
9 - public function __construct()
10 - {
11 - add_action('fl_builder_after_render_module', [$this, 'beaverBuilderInit'], 10, 1);
12 - add_action('fl_builder_after_render_ajax_layout_html', [$this, 'addAcyscriptBeaver']);
13 - }
14 -
15 - public function beaverBuilderInit($widget)
16 - {
17 - if (empty($widget->settings->widget) || $widget->settings->widget !== 'acym_subscriptionform_widget') return;
18 -
19 - $this->addAcyscriptBeaver();
20 - }
21 -
22 - public function addAcyscriptBeaver()
23 - {
24 - wp_enqueue_script(
25 - 'select2lib',
26 - ACYM_JS.'libraries/select2-full.min.js?v='.filemtime(ACYM_MEDIA.'js'.DS.'libraries'.DS.'select2-full.min.js'),
27 - [
28 - 'jquery',
29 - ],
30 - '11.0.3',
31 - [
32 - 'in_footer' => false,
33 - ]
34 - );
35 - wp_enqueue_script(
36 - 'acym_script_widget_article_beaver',
37 - ACYM_JS.'widget.min.js?v='.time(),
38 - [
39 - 'jquery',
40 - 'select2lib',
41 - ],
42 - '11.0.3',
43 - [
44 - 'in_footer' => true,
45 - ]
46 - );
47 - // CSRF token for the article-search AJAX (dynamics/trigger requires acym_checkToken)
48 - wp_add_inline_script(
49 - 'acym_script_widget_article_beaver',
50 - 'var acym_widget_nonce = '.json_encode(wp_create_nonce('acymnonce')).';',
51 - 'before'
52 - );
53 - }
54 -}