PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
ultimate-post-kit / includes / live-copy / assets / bdt-live-copy.js

bdt-live-copy.js in Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets 4.5.6, at includes/live-copy/assets/bdt-live-copy.js

72 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function (window, document, $) {
2 "use strict";
3 var ElementPackLiveCopy = {
4 //Initializing properties and methods
5 init: function (e) {
6 ElementPackLiveCopy.loadContextMenuGroupsHooks();
7 },
8 loadContextMenuGroupsHooks: function () {
9 elementor.hooks.addFilter(
10 "elements/container/contextMenuGroups",
11 function (groups, element) {
12 return ElementPackLiveCopy.prepareMenuItem(groups, element);
13 }
14 );
15
16 elementor.hooks.addFilter(
17 "elements/section/contextMenuGroups",
18 function (groups, element) {
19 return ElementPackLiveCopy.prepareMenuItem(groups, element);
20 }
21 );
22
23 elementor.hooks.addFilter(
24 "elements/widget/contextMenuGroups",
25 function (groups, element) {
26 return ElementPackLiveCopy.prepareMenuItem(groups, element);
27 }
28 );
29
30 elementor.hooks.addFilter(
31 "elements/column/contextMenuGroups",
32 function (groups, element) {
33 return ElementPackLiveCopy.prepareMenuItem(groups, element);
34 }
35 );
36 },
37 prepareMenuItem: function (groups, element) {
38 var index = _.findIndex(groups, function (element) {
39 return "clipboard" === element.name;
40 });
41 groups.splice(index + 1, 0, {
42 name: "bdt-ep-live-copy-paste",
43 actions: [
44 {
45 name: "ep-live-copy",
46 title: "Live Copy",
47 icon: "bdt-wi-element-pack",
48 callback: function () {
49 alert(
50 "Oops! The 'Live Copy' button has been deprecated. You can now use Elementor's built-in 'Copy' feature instead. Enjoy the improved functionality!"
51 );
52 },
53 },
54 {
55 name: "ep-live-paste",
56 title: "Live Paste",
57 icon: "bdt-wi-element-pack",
58 callback: function () {
59 alert(
60 "Oops! The 'Live Paste' button has been deprecated. You can now use Elementor's built-in 'Paste from other site' feature instead. Enjoy the improved functionality!"
61 );
62 },
63 },
64 ],
65 });
66
67 return groups;
68 },
69 };
70 ElementPackLiveCopy.init();
71 })(window, document, jQuery);
72