Popups for Divi - Version 2.0.2

Version Description

  • Fix some typos
  • Improve code style: Apply the WordPress Coding Standards 2.0
  • Improved security check in the onboarding form
  • Improve the copy and some JS logic of the onboarding form

Plugin tested with WordPress 5.4.0 and Divi 4.4.2

Download this release

Release Info

Developer stracker.phil
Plugin Icon 128x128 Popups for Divi
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

LICENSE.txt CHANGED
@@ -1,339 +1,280 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Lesser General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
281
-
282
- How to Apply These Terms to Your New Programs
283
-
284
- If you develop a new program, and you want it to be of the greatest
285
- possible use to the public, the best way to achieve this is to make it
286
- free software which everyone can redistribute and change under these terms.
287
-
288
- To do so, attach the following notices to the program. It is safest
289
- to attach them to the start of each source file to most effectively
290
- convey the exclusion of warranty; and each file should have at least
291
- the "copyright" line and a pointer to where the full notice is found.
292
-
293
- <one line to give the program's name and a brief idea of what it does.>
294
- Copyright (C) <year> <name of author>
295
-
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
300
-
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
305
-
306
- You should have received a copy of the GNU General Public License along
307
- with this program; if not, write to the Free Software Foundation, Inc.,
308
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
-
310
- Also add information on how to contact you by electronic and paper mail.
311
-
312
- If the program is interactive, make it output a short notice like this
313
- when it starts in an interactive mode:
314
-
315
- Gnomovision version 69, Copyright (C) year name of author
316
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
- This is free software, and you are welcome to redistribute it
318
- under certain conditions; type `show c' for details.
319
-
320
- The hypothetical commands `show w' and `show c' should show the appropriate
321
- parts of the General Public License. Of course, the commands you use may
322
- be called something other than `show w' and `show c'; they could even be
323
- mouse-clicks or menu items--whatever suits your program.
324
-
325
- You should also get your employer (if you work as a programmer) or your
326
- school, if any, to sign a "copyright disclaimer" for the program, if
327
- necessary. Here is a sample; alter the names:
328
-
329
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
-
332
- <signature of Ty Coon>, 1 April 1989
333
- Ty Coon, President of Vice
334
-
335
- This General Public License does not permit incorporating your program into
336
- proprietary programs. If your program is a subroutine library, you may
337
- consider it more useful to permit linking proprietary applications with the
338
- library. If this is what you want to do, use the GNU Lesser General
339
- Public License instead of this License.
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
include/class-popups-for-divi-editor.php CHANGED
@@ -34,7 +34,8 @@ class Popups_For_Divi_Editor {
34
  add_filter(
35
  'et_builder_get_parent_modules',
36
  [ $this, 'add_toggles_to_tab' ],
37
- 10, 2
 
38
  );
39
 
40
  // Pre-processes the Divi section settings before they are actually saved.
@@ -54,7 +55,7 @@ class Popups_For_Divi_Editor {
54
  public function add_hooks() {
55
  add_filter(
56
  'et_pb_all_fields_unprocessed_et_pb_section',
57
- [ $this, 'add_section_confg' ]
58
  );
59
 
60
  // Todo: This filter is deprecated. Find a better way!
@@ -74,7 +75,7 @@ class Popups_For_Divi_Editor {
74
  * @param array $fields_unprocessed Field definitions of the module.
75
  * @return array The modified configuration fields.
76
  */
77
- public function add_section_confg( $fields_unprocessed ) {
78
  $fields = [];
79
 
80
  // "General" toggle.
@@ -87,7 +88,7 @@ class Popups_For_Divi_Editor {
87
  'on' => esc_html__( 'Yes', 'divi-popup' ),
88
  ],
89
  'default' => 'off',
90
- 'description' => esc_html__( 'Turn this section into aa Divi Popup section.', 'divi-popup' ),
91
  'tab_slug' => 'da',
92
  'toggle_slug' => 'da_general',
93
  ];
@@ -248,7 +249,6 @@ class Popups_For_Divi_Editor {
248
  /**
249
  * Register new Divi Area tab in the Visual Builder.
250
  *
251
- * @todo This filter is deprecated. What's the new way?
252
  * @filter et_builder_main_tabs
253
  *
254
  * @since 1.2.0
34
  add_filter(
35
  'et_builder_get_parent_modules',
36
  [ $this, 'add_toggles_to_tab' ],
37
+ 10,
38
+ 2
39
  );
40
 
41
  // Pre-processes the Divi section settings before they are actually saved.
55
  public function add_hooks() {
56
  add_filter(
57
  'et_pb_all_fields_unprocessed_et_pb_section',
58
+ [ $this, 'add_section_config' ]
59
  );
60
 
61
  // Todo: This filter is deprecated. Find a better way!
75
  * @param array $fields_unprocessed Field definitions of the module.
76
  * @return array The modified configuration fields.
77
  */
78
+ public function add_section_config( $fields_unprocessed ) {
79
  $fields = [];
80
 
81
  // "General" toggle.
88
  'on' => esc_html__( 'Yes', 'divi-popup' ),
89
  ],
90
  'default' => 'off',
91
+ 'description' => esc_html__( 'Turn this section into a Divi Popup section.', 'divi-popup' ),
92
  'tab_slug' => 'da',
93
  'toggle_slug' => 'da_general',
94
  ];
249
  /**
250
  * Register new Divi Area tab in the Visual Builder.
251
  *
 
252
  * @filter et_builder_main_tabs
253
  *
254
  * @since 1.2.0
include/class-popups-for-divi-onboarding.php CHANGED
@@ -3,6 +3,8 @@
3
  * Onboarding signup.
4
  *
5
  * Offers an onboarding signup form so new users for new users.
 
 
6
  *
7
  * @package Popups_For_Divi
8
  */
@@ -49,8 +51,24 @@ class Popups_For_Divi_Onboarding {
49
  * @return void
50
  */
51
  public function init_onboarding() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  if ( defined( 'DISABLE_NAG_NOTICES' ) && DISABLE_NAG_NOTICES ) {
53
- return;
54
  }
55
 
56
  if ( ! defined( 'DIVI_POPUP_ONBOARDING_CAP' ) ) {
@@ -61,19 +79,15 @@ class Popups_For_Divi_Onboarding {
61
 
62
  $user = wp_get_current_user();
63
 
64
- if ( ! $user->has_cap( DIVI_POPUP_ONBOARDING_CAP ) ) {
65
- return;
66
  }
67
 
68
  if ( 'done' === $user->get( '_pfd_onboarding' ) ) {
69
- return;
70
  }
71
 
72
- add_action(
73
- 'admin_notices',
74
- array( $this, 'onboarding_notice' ),
75
- 1
76
- );
77
  }
78
 
79
  /**
@@ -83,6 +97,15 @@ class Popups_For_Divi_Onboarding {
83
  * @return void
84
  */
85
  public function ajax_hide_onboarding() {
 
 
 
 
 
 
 
 
 
86
  // phpcs:ignore WordPress.VIP.RestrictedFunctions.user_meta_update_user_meta
87
  update_user_meta( get_current_user_id(), '_pfd_onboarding', 'done' );
88
 
@@ -92,11 +115,23 @@ class Popups_For_Divi_Onboarding {
92
  /**
93
  * Ajax handler: Subscribe the email address to our onboarding course.
94
  *
 
 
 
 
95
  * @since 1.6.0
96
  * @return void
97
  */
98
  public function ajax_start_course() {
99
- // phpcs:ignore WordPress.CSRF.NonceVerification.NoNonceVerification
 
 
 
 
 
 
 
 
100
  $form = wp_unslash( $_POST ); // input var okay.
101
 
102
  $email = sanitize_email( trim( $form['email'] ) );
@@ -142,7 +177,7 @@ class Popups_For_Divi_Onboarding {
142
  <div class="pfd-onboarding notice">
143
  <p class="title"><?php $this->say( __( 'Thanks for using Popups&nbsp;for&nbsp;Divi', 'divi-popup' ) ); ?> 😊</p>
144
  <div class="pfd-layout">
145
- <p class="msg"><?php $this->say( __( 'We have created a short email course that helps you get the most out of <a href="https://wordpress.org/plugins/popups-for-divi/" target="_blank">Popups for Divi</a>. You will receive six short emails that help you to avoid common pitfalls and teach you some advanced use cases.', 'divi-popup' ) ); ?></p>
146
  <div class="form">
147
  <input
148
  type="name"
@@ -156,7 +191,7 @@ class Popups_For_Divi_Onboarding {
156
  value="<?php echo esc_attr( $user->user_email ); ?>"
157
  />
158
  <button class="button-primary submit">
159
- <?php esc_html_e( 'Start The Course!', 'divi-popup' ); ?>
160
  </button>
161
  </div>
162
  </div>
@@ -205,57 +240,81 @@ class Popups_For_Divi_Onboarding {
205
  .pfd-onboarding .form:after{content:'';position:absolute;right:50%;width:50px;height:50px;top:50%;background:#fff;transform:translate(50%,-50%) rotate(45deg) skew(20deg,20deg)}
206
  }
207
  </style>
208
- <script>jQuery(function() {
209
- var notice = jQuery('.pfd-onboarding.notice');
210
- var msg = notice.find('.msg');
211
- notice.on('click', '.notice-dismiss, .dismiss', dismissForever);
212
- notice.find('.submit').on('click', startCourse);
213
- function dismissForever() {
 
 
 
 
 
 
214
  notice.addClass('loading');
215
- jQuery.post(ajaxurl, {
216
- action: 'pfd_hide_onboarding'
217
- }, function() {
 
218
  notice.removeClass('loading');
219
- notice.fadeOut(400, function() {
220
  notice.remove();
221
  });
222
  });
223
  }
224
- function startCourse() {
225
- var email = notice.find('input.email').val().trim();
226
- var name = notice.find('input.name').val().trim();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
 
228
- if (name.length<2) {
229
- notice.find('input.name').focus();
230
  return false;
231
  }
232
- if (email.length<5) {
233
- notice.find('input.email').focus();
234
  return false;
235
  }
236
  notice.addClass('loading');
237
- jQuery.post(ajaxurl, {
238
- action: 'pfd_start_course',
239
- name: name,
240
- email: email,
241
- }, function(res) {
 
242
  notice.removeClass('loading');
243
- state = res && res.data ? res.data : '';
244
- if ('OK'===state) {
245
- msg.html("🎉 <?php $this->say( __( 'Congratulations! Please check your inbox and look for an email with the subject &quot;<strong>Your Popups for Divi course is one click away!</strong>&quot; to confirm your registration.', 'divi-popup' ) ); ?>");
246
  msg.append("<br><a href='#' class='dismiss'><?php esc_html_e( 'Close this message', 'divi-popup' ); ?></a>");
247
- }
248
- else if ('DUPLICATE'===state) {
249
- msg.html("<?php esc_html_e( 'It looks like you already signed up for this course... Please check your inbox or use a different email address', 'divi-popup' ); ?>");
250
- }
251
- else if ('INVALID_NAME'===state) {
252
- msg.html("<?php esc_html_e( 'Our system says, your name is invalid. Please check your input', 'divi-popup' ); ?>");
253
- }
254
- else if ('INVALID_EMAIL'===state) {
255
- msg.html("<?php esc_html_e( 'Our system rejected the email address. Please check your input', 'divi-popup' ); ?>");
256
- }
257
- else {
258
- msg.html("<?php esc_html_e( 'Something went wrong, but we\'re not sure what. Please try again in a moment or contact us via the wp.org support forum', 'divi-popup' ); ?>");
259
  }
260
  });
261
  }
@@ -267,19 +326,35 @@ class Popups_For_Divi_Onboarding {
267
  * Output text with minimal allowed HTML markup.
268
  *
269
  * @since 2.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  * @param string $text The unsanitized HTML code.
271
  * @return void
272
  */
273
- protected function say( $text ) {
274
- echo wp_kses(
275
- $text,
276
- [
277
- 'strong' => [],
278
- 'a' => [
279
- 'href' => [],
280
- 'target' => [],
281
- ],
282
- ]
283
- );
284
  }
285
  }
3
  * Onboarding signup.
4
  *
5
  * Offers an onboarding signup form so new users for new users.
6
+ * The onboarding notification is displayed only on the main Dashboard page,
7
+ * i.e., on https://example.com/wp-admin/index.php
8
  *
9
  * @package Popups_For_Divi
10
  */
51
  * @return void
52
  */
53
  public function init_onboarding() {
54
+ if ( $this->show_onboarding_form() ) {
55
+ add_action(
56
+ 'admin_notices',
57
+ array( $this, 'onboarding_notice' ),
58
+ 1
59
+ );
60
+ }
61
+ }
62
+
63
+ /**
64
+ * Determine, whether to display the onboarding notice.
65
+ *
66
+ * @since 2.0.2
67
+ * @return bool
68
+ */
69
+ private function show_onboarding_form() {
70
  if ( defined( 'DISABLE_NAG_NOTICES' ) && DISABLE_NAG_NOTICES ) {
71
+ return false;
72
  }
73
 
74
  if ( ! defined( 'DIVI_POPUP_ONBOARDING_CAP' ) ) {
79
 
80
  $user = wp_get_current_user();
81
 
82
+ if ( ! $user || ! $user->has_cap( DIVI_POPUP_ONBOARDING_CAP ) ) {
83
+ return false;
84
  }
85
 
86
  if ( 'done' === $user->get( '_pfd_onboarding' ) ) {
87
+ return false;
88
  }
89
 
90
+ return true;
 
 
 
 
91
  }
92
 
93
  /**
97
  * @return void
98
  */
99
  public function ajax_hide_onboarding() {
100
+ // Make sure that the ajax request comes from the current WP admin site!
101
+ if (
102
+ ! is_user_logged_in() // better save than sorry.
103
+ || empty( $_POST['_wpnonce'] )
104
+ || ! wp_verify_nonce( $_POST['_wpnonce'], 'noonboarding' )
105
+ ) {
106
+ wp_send_json_success( 'ERROR' );
107
+ }
108
+
109
  // phpcs:ignore WordPress.VIP.RestrictedFunctions.user_meta_update_user_meta
110
  update_user_meta( get_current_user_id(), '_pfd_onboarding', 'done' );
111
 
115
  /**
116
  * Ajax handler: Subscribe the email address to our onboarding course.
117
  *
118
+ * Note that this ajax handler only fires for authenticated requests:
119
+ * We handle action `wp_ajax_pfd_start_course`.
120
+ * There is NO handler for `wp_ajax_nopriv_pfd_start_course`!
121
+ *
122
  * @since 1.6.0
123
  * @return void
124
  */
125
  public function ajax_start_course() {
126
+ // Make sure that the ajax request comes from the current WP admin site!
127
+ if (
128
+ ! is_user_logged_in() // better save than sorry.
129
+ || empty( $_POST['_wpnonce'] )
130
+ || ! wp_verify_nonce( $_POST['_wpnonce'], 'onboarding' )
131
+ ) {
132
+ wp_send_json_success( 'ERROR' );
133
+ }
134
+
135
  $form = wp_unslash( $_POST ); // input var okay.
136
 
137
  $email = sanitize_email( trim( $form['email'] ) );
177
  <div class="pfd-onboarding notice">
178
  <p class="title"><?php $this->say( __( 'Thanks for using Popups&nbsp;for&nbsp;Divi', 'divi-popup' ) ); ?> 😊</p>
179
  <div class="pfd-layout">
180
+ <p class="msg"><?php $this->say( __( 'We have created a <strong>free email course</strong> to help you get the most out of Popups for Divi. <strong>Sign up now</strong>, and you will receive six emails with easy to follow instructions, lots of examples and some pretty advanced Popup techniques.', 'divi-popup' ) ); ?></p>
181
  <div class="form">
182
  <input
183
  type="name"
191
  value="<?php echo esc_attr( $user->user_email ); ?>"
192
  />
193
  <button class="button-primary submit">
194
+ <?php esc_html_e( 'Start The Course', 'divi-popup' ); ?>
195
  </button>
196
  </div>
197
  </div>
240
  .pfd-onboarding .form:after{content:'';position:absolute;right:50%;width:50px;height:50px;top:50%;background:#fff;transform:translate(50%,-50%) rotate(45deg) skew(20deg,20deg)}
241
  }
242
  </style>
243
+ <script>jQuery(function(){
244
+ var notice=jQuery('.pfd-onboarding.notice');
245
+ var msg=notice.find('.msg');
246
+ var email=notice.find('input.email');
247
+ var name=notice.find('input.name');
248
+ var submit=notice.find('.submit');
249
+ notice.on('click','.notice-dismiss,.dismiss',dismissForever);
250
+ notice.on('click',focusForm);
251
+ submit.on('click',startCourse);
252
+ name.on('keypress',maybeSubmit);
253
+ email.on('keypress',maybeSubmit);
254
+ function dismissForever(e){
255
  notice.addClass('loading');
256
+ jQuery.post(ajaxurl,{
257
+ action: 'pfd_hide_onboarding',
258
+ _wpnonce: '<?php echo esc_js( wp_create_nonce( 'noonboarding' ) ); ?>'
259
+ },function(){
260
  notice.removeClass('loading');
261
+ notice.fadeOut(400,function(){
262
  notice.remove();
263
  });
264
  });
265
  }
266
+ function focusForm(e){
267
+ var el=jQuery(e.target);
268
+ var tag=el.prop('tagName');
269
+ if('A'===tag||'INPUT'===tag||'BUTTON'===tag||el.hasClass('dismiss')||el.hasClass('notice-dismiss')){
270
+ return;
271
+ }
272
+ if(name.val().trim().length<2){
273
+ name.focus().select();
274
+ } else if(email.val().trim().length<5){
275
+ email.focus().select();
276
+ } else {
277
+ submit.focus();
278
+ }
279
+ }
280
+ function maybeSubmit(e){
281
+ if(13===e.which){
282
+ startCourse();
283
+ return false;
284
+ }
285
+ }
286
+ function startCourse(){
287
+ var valEmail=email.val().trim();
288
+ var valName=name.val().trim();
289
 
290
+ if(valName.length<2){
291
+ name.focus().select();
292
  return false;
293
  }
294
+ if(valEmail.length<5){
295
+ email.focus().select();
296
  return false;
297
  }
298
  notice.addClass('loading');
299
+ jQuery.post(ajaxurl,{
300
+ action:'pfd_start_course',
301
+ name:valName,
302
+ email:valEmail,
303
+ _wpnonce:'<?php echo esc_js( wp_create_nonce( 'onboarding' ) ); ?>'
304
+ },function(res){
305
  notice.removeClass('loading');
306
+ state=res&&res.data?res.data:'';
307
+ if('OK'===state){
308
+ msg.html("🎉 <?php $this->say( __( 'Congratulations! Please check your inbox and look for an email with the subject &quot;<strong>Just one more click for your free content!</strong>&quot; to confirm your registration.', 'divi-popup' ) ); ?>");
309
  msg.append("<br><a href='#' class='dismiss'><?php esc_html_e( 'Close this message', 'divi-popup' ); ?></a>");
310
+ }else if('DUPLICATE'===state){
311
+ msg.html("<?php esc_html_e( 'It looks like you already signed up for this course... Please check your inbox or use a different email address.', 'divi-popup' ); ?>");
312
+ }else if('INVALID_NAME'===state){
313
+ msg.html("<?php esc_html_e( 'Our system says, your name is invalid. Please check your input.', 'divi-popup' ); ?>");
314
+ }else if('INVALID_EMAIL'===state){
315
+ msg.html("<?php esc_html_e( 'Our system rejected the email address. Please check your input.', 'divi-popup' ); ?>");
316
+ }else{
317
+ msg.html("<?php $this->say_js( __( 'Something went wrong, but we\'re not sure what. Please reload this page and try again. If that does not work, you can contact us via the <a href="https://wordpress.org/support/plugin/popups-for-divi/" target="_blank">wp.org support forum</a>.', 'divi-popup' ) ); ?>");
 
 
 
 
318
  }
319
  });
320
  }
326
  * Output text with minimal allowed HTML markup.
327
  *
328
  * @since 2.0.0
329
+ * @param string $text The unsanitized HTML code.
330
+ * @param bool $return Whether to return the text or output it.
331
+ * @return void|string
332
+ */
333
+ protected function say( $text, $return = false ) {
334
+ $kses_args = [
335
+ 'strong' => [],
336
+ 'a' => [
337
+ 'href' => [],
338
+ 'target' => [],
339
+ ],
340
+ ];
341
+
342
+ if ( $return ) {
343
+ return wp_kses( $text, $kses_args );
344
+ } else {
345
+ echo wp_kses( $text, $kses_args );
346
+ }
347
+ }
348
+
349
+ /**
350
+ * Output text inside a JS string/variabale with minimal allowed HTML markup.
351
+ *
352
+ * @since 2.0.2
353
  * @param string $text The unsanitized HTML code.
354
  * @return void
355
  */
356
+ protected function say_js( $text ) {
357
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
358
+ echo str_replace( '"', '\\"', $this->say( $text, true ) );
 
 
 
 
 
 
 
 
359
  }
360
  }
include/class-popups-for-divi.php CHANGED
@@ -28,7 +28,8 @@ class Popups_For_Divi {
28
  add_filter(
29
  'plugin_row_meta',
30
  array( $this, 'plugin_row_meta' ),
31
- 10, 4
 
32
  );
33
 
34
  // Do not load the JS library, when the Pro version is active.
@@ -101,6 +102,8 @@ class Popups_For_Divi {
101
  * @since 1.0.0
102
  */
103
  public function enqueue_js_library() {
 
 
104
  if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
105
  return;
106
  }
@@ -108,8 +111,12 @@ class Popups_For_Divi {
108
  return;
109
  }
110
 
111
- // phpcs:ignore WordPress.CSRF.NonceVerification.NoNonceVerification
112
- if ( isset( $_GET['et_pb_preview'] ) && isset( $_GET['et_pb_preview_nonce'] ) ) { // input var okay.
 
 
 
 
113
  return;
114
  }
115
 
28
  add_filter(
29
  'plugin_row_meta',
30
  array( $this, 'plugin_row_meta' ),
31
+ 10,
32
+ 4
33
  );
34
 
35
  // Do not load the JS library, when the Pro version is active.
102
  * @since 1.0.0
103
  */
104
  public function enqueue_js_library() {
105
+ global $wp_query;
106
+
107
  if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
108
  return;
109
  }
111
  return;
112
  }
113
 
114
+ /*
115
+ * Logic found in Divi/includes/builder/functions.php
116
+ * @see function et_pb_register_preview_page()
117
+ */
118
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
119
+ if ( 'true' === $wp_query->get( 'et_pb_preview' ) && isset( $_GET['et_pb_preview_nonce'] ) ) { // input var okay.
120
  return;
121
  }
122
 
plugin.php CHANGED
@@ -4,7 +4,8 @@
4
  *
5
  * @package Popups_For_Divi
6
  * @author Philipp Stracker
7
- * @license GPL2+
 
8
  *
9
  * Plugin Name: Popups for Divi
10
  * Plugin URI: https://divimode.com/divi-popup/
@@ -12,24 +13,26 @@
12
  * Author: Philipp Stracker
13
  * Author URI: https://philippstracker.com/
14
  * Created: 30.12.2017
15
- * Version: 2.0.1
16
- * License: GPLv2 or later
17
- * License URI: https://www.gnu.org/licenses/gpl-2.0.html
18
  * Text Domain: divi-popup
19
  * Domain Path: /lang
 
 
20
  *
21
- * Popups for Divi is free software: you can redistribute it and/or modify
22
- * it under the terms of the GNU General Public License as published by
23
- * the Free Software Foundation, either version 2 of the License, or
24
- * any later version.
25
  *
26
- * Popups for Divi is distributed in the hope that it will be useful,
 
 
 
 
 
27
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
  * GNU General Public License for more details.
30
  *
31
  * You should have received a copy of the GNU General Public License
32
- * along with Popups for Divi. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
33
  */
34
 
35
  defined( 'ABSPATH' ) || die();
@@ -39,7 +42,7 @@ define( 'DIVI_POPUP_PLUGIN', plugin_basename( __FILE__ ) );
39
  /**
40
  * A new version value will force refresh of CSS and JS files for all users.
41
  */
42
- define( 'DIVI_POPUP_VERSION', '2.0.1' );
43
 
44
  add_action(
45
  'plugins_loaded',
4
  *
5
  * @package Popups_For_Divi
6
  * @author Philipp Stracker
7
+ * @copyright 2020 Philipp Stracker
8
+ * @license GPL-2.0-or-later
9
  *
10
  * Plugin Name: Popups for Divi
11
  * Plugin URI: https://divimode.com/divi-popup/
13
  * Author: Philipp Stracker
14
  * Author URI: https://philippstracker.com/
15
  * Created: 30.12.2017
16
+ * Version: 2.0.2
 
 
17
  * Text Domain: divi-popup
18
  * Domain Path: /lang
19
+ * License: GPL v2 or later
20
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
21
  *
22
+ * Copyright (C) 2020 Philipp Stracker
 
 
 
23
  *
24
+ * This program is free software; you can redistribute it and/or
25
+ * modify it under the terms of the GNU General Public License
26
+ * as published by the Free Software Foundation; either version 2
27
+ * of the License, or (at your option) any later version.
28
+ *
29
+ * This program is distributed in the hope that it will be useful,
30
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
31
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32
  * GNU General Public License for more details.
33
  *
34
  * You should have received a copy of the GNU General Public License
35
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
36
  */
37
 
38
  defined( 'ABSPATH' ) || die();
42
  /**
43
  * A new version value will force refresh of CSS and JS files for all users.
44
  */
45
+ define( 'DIVI_POPUP_VERSION', '2.0.2' );
46
 
47
  add_action(
48
  'plugins_loaded',
readme.txt CHANGED
@@ -1,304 +1,310 @@
1
- === Popups for Divi ===
2
- Contributors: strackerphil-1
3
- Tags: popup, marketing, divi
4
- Requires at least: 3.0.1
5
- Tested up to: 5.3.2
6
- Stable tag: trunk
7
- Requires PHP: 5.2.4
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- A quick and easy way to create Popup layers inside the Divi Visual Builder!
12
-
13
- == Description ==
14
-
15
- After the plugin is activated, the Visual Builder displays a new tab called "Popup" in the Section Settings modal. In the "Popup" tab, you can turn a regular Section into a Popup!
16
-
17
- It's super simple, as you can see on the plugins Demo Page: [divimode.com/divi-popup/demo](https://divimode.com/divi-popup/demo/?_s=wpo)
18
-
19
- # ℹ️ How it works
20
-
21
- First, activate the plugin (no configuration needed!)
22
-
23
- 1. Open up your Visual Builder and edit a Section - you'll see a new "Popup" tab in the Section Settings.
24
- 2. Toggle the option "This is a Popup" and set the "Popup ID" to something (e.g., "`newsletter-optin`"). Close the Section Settings.
25
- 3. Add a Button Module somewhere else on the page and set the "Link URL" to your Popup ID, with a leading "#" hash (e.g. "`#newsletter-optin`")
26
- 4. **That's all**. Save the page and exit the Visual Builder! Click on the button, and you'll see your Popup. Congratulations!
27
-
28
- # ⭐️ Additional details
29
-
30
- Check out the [Plugin website](https://divimode.com/divi-popup/?_s=wpo) for more details. You'll find:
31
-
32
- * Examples
33
- * CSS class options
34
- * JS API documentation
35
- * WP filter documentation
36
-
37
- Tested in all major browsers on Windows and Mac: Chrome, Firefox, Safari, IE 11, Edge!
38
-
39
- # 🎂 Popups for Divi turns 2
40
-
41
- Wow, it's already two years since the beginning of Popups for Divi!
42
-
43
- It has been a great time and we've learned a lot. During that time we added a ton of features and have created a stable and powerful marketing plugin.
44
-
45
- To celebrate the anniversary, we have created a six-day course that teaches you everything about the plugin. It walks you through the basics of creating your first Popup, shows possible ways to customize your Popup layouts and goes into advanced techniques and usages of the plugin.
46
-
47
- > "The instruction emails really helped me to understand how to use the plugin correctly!"
48
-
49
- The course is available in your **wp-admin Dashboard** right after you install and activate the plugin. Check out the screenshots to see the form. Also, have a look in the FAQ section, if you want to disable this feature.
50
-
51
- # 🥳 Want more?
52
-
53
- If you want to get the most out of Divi, you need to have a look at **[Divi Areas Pro](https://divimode.com/divi-areas-pro/?_s=wpo)** to get additional features:
54
-
55
- > * An **admin UI** to create and configure your popups
56
- > * Choose between **4 Area Types**: Popup, Inline, Fly-in, Hover
57
- > * A **beautiful UI** that blends in perfectly with Divi
58
- > * Add **advanced triggers** to your Areas:
59
- > * On click
60
- > * On hover
61
- > * On scroll
62
- > * After delay
63
- > * On Exit
64
- > * Customize the Area **Display**
65
- > * Show on certain pages
66
- > * Show on certain devices
67
- > * Show for certain user roles or guests
68
- > * Customize Area **Behavior**
69
- > * Show/Hide the Close button
70
- > * Display the Area once per hour, day, week, ...
71
- > * Flexible **position for Inline Areas**
72
- > * Replace/extend the page header
73
- > * or Footer
74
- > * or Comment section
75
- > * or actually *any* Divi section inside the page content
76
- > * It comes with an extended version of the **JS API**
77
- > * **Great documentation** built into the plugin and an online knowledge base
78
- > * and much more...
79
- >
80
- > 👉 [Learn more about **Divi Areas Pro**](https://divimode.com/divi-areas-pro/?_s=wpo) (with screenshots!)
81
-
82
- == Installation ==
83
-
84
- Install the plugin from the WordPress admin page "Plugins > Install"
85
-
86
- or
87
-
88
- 1. Upload `popups-for-divi` directory to the `/wp-content/plugins/` directory
89
- 1. Activate the plugin through the 'Plugins' menu in WordPress
90
-
91
- == Frequently Asked Questions ==
92
-
93
- = How much performance does Popups for Divi need? =
94
-
95
- Actually none! We designed it with maximum page performance in mind. Our tests did show literally no change in page loading speed.
96
-
97
- The plugin will add a single line of CSS to the page output and load two files that currently are only about 31 kb in size (9kb gzipped). Both files are cached by the browser and used on all other pages of your website.
98
-
99
- Those two files are the JS API and the popup CSS rules that center the popup, dim the background, etc.
100
-
101
- = Is Popups for Divi compatible with Caching plugins? =
102
-
103
- Yes, absolutely! There is no dynamic logic in the PHP code like other popup plugins have. Popups for Divi is a little bit of PHP but the main logic sits inside the small javascript library it provides. It works on the client-side and therefore is not restricted by caching plugins.
104
-
105
- = Is this plugin compatible with every Divi version? =
106
-
107
- This plugin is kept compatible with the latest Divi release.
108
-
109
- We did test it with all releases since the initial Divi 3.0 release. Possibly it will also work with older versions
110
-
111
- = Does this plugin also work with other themes/site builders? =
112
-
113
- Yes, actually it will! But out of the box it is optimized to work with Divi 3.0 and later. If you use any other theme or site builder then you need to change the default options of the plugin via the `evr_divi_popup-js_data` filter.
114
-
115
- For more details visit [divimode.com/divi-popup](https://divimode.com/divi-popup/?_s=wpo)
116
-
117
- = Does this plugin display any ads? =
118
-
119
- No. This plugin is free and does not display any ads. In fact, the plugin does not have a UI at all.
120
-
121
- Popups for Divi is just that - a plain popup plugin, not our marketing strategy!
122
-
123
- Since version 1.6.0 we now offer a six-day email course that shows you how the plugin works. You will see a notification in your wp-admin dashboard right after activating the plugin.
124
-
125
- = Do you collect any details from my website? =
126
-
127
- No, we do not collect or transmit any data from your website.
128
-
129
- Since version 1.6.0 there is one exception: We now offer an email course that shows you how the plugin works. You will see a notification in your wp-admin dashboard right after activating the plugin. When you opt-in to receive the onboarding emails we will transmit the details you entered (your name and email address) to the plugin website to add you to our onboarding email-list.
130
-
131
- = Is there a way to hide the onboarding notice? =
132
-
133
- Yes, there is!
134
-
135
- Since 1.6.0 the plugin offers an onboarding course that consists of 6 emails. We offer this course right after plugin activation in your wp-admin "Dashboard" page (nowhere else).
136
-
137
- This onboarding notice is displayed to administrator users only. Once the user clicks on the "Dismiss" button, the message is never displayed again for them.
138
-
139
- You can also globally disable the onboarding notice by defining the constant [`DISABLE_NAG_NOTICES`](https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices#Disable_Nag_Notices) in your wp-config.php or themes function.php
140
-
141
- = I need to revert to an older version =
142
-
143
- When you experience any problems with the plugin, I would love you to first head over to the [support forum](https://wordpress.org/support/plugin/popups-for-divi/) and briefly share your issue with me.
144
-
145
- Here's how you can revert to an older version of the plugin:
146
-
147
- 1. Go to the [Advanced View](https://wordpress.org/plugins/popups-for-divi/advanced/) Page and scroll down to the bottom.
148
- 2. Pick your version and click "Download" (you can choose any version since 1.5.1)
149
- 3. Now go to your wp-admin Panel and open the Plugins list
150
- 4. Deactivate and Delete the Popups for Divi plugin! *Note: You will not lose any data, but while the plugin is deactivated/missing your Popups might be visible like normal page content.*
151
- 5. On the Plugins page click "Add New" button in the top and then click on "Upload Plugin"
152
- 6. Select the .zip file which you downloaded in Step 2 and upload it. Activate and you're done!
153
-
154
- Alternatively you can replace the `popups-for-divi` folder via FTP: Extract the .zip file which you downloaded in Step 2 and upload it to your `/wp-content/plugins` folder.
155
-
156
- = I have more questions or need help =
157
-
158
- Please first visit the [**plugin website**](https://divimode.com/divi-popup/?_s=wpo), as it includes examples and documentation that could answer your questions.
159
-
160
- If that does not help, then head over to the [**support forum**](https://wordpress.org/support/plugin/popups-for-divi/?_s=wpo) to see if someone else had the same problem and found a solution to it. Also, feel free to ask for help there.
161
-
162
- You can also send us a private support request via the [**support form on divimode.com**](https://divimode.com/get-support//?_s=wpo). Please note, that might need a while to answer your private support requests.
163
-
164
- When you need additional features, then please have a look at our the Premium plugin [**Divi Areas Pro**](https://diivimode.com/divi-areas-pro/?_s=wpo) which comes with a lot of cool options!
165
-
166
- == Screenshots ==
167
-
168
- 1. Step 1: Prepare your Popup inside a normal Divi Section, right on your page.
169
- 2. Step 2: Open the Section Settings, enable the "This is a Popup" flag and define a unique Popup ID.
170
- 3. Step 3: That's how the final Popup is dispayed to a visitor.
171
- 4. Check out the extensive API documentation and popup samples on divimode.com
172
- 5. Our free email course walks you through every aspect of the plugin - from the basics to advanced use-cases and techniques.
173
-
174
- == Changelog ==
175
-
176
- = 2.0.1 =
177
- * Fix urgent problem where the plugin would remove the contents of the page while saving the page in Divi! 😳
178
-
179
- Plugin tested with WordPress 5.3.2 and Divi 4.4.0
180
-
181
- = 2.0.0 =
182
- * Add a brand new Tab to the Visual Builder that allows you to configure all popup details using Divi! No more class names 🥳
183
- * Fix JS API integration for IE 11
184
-
185
- = 1.7.2 =
186
- * Fix positioning of full-height Popups for all users/devices
187
-
188
- = 1.7.1 =
189
- * Fix scroll bars in Popups that are taller than the screen height
190
- * Fix position of full-height popups that were displayed too far up on the screen
191
-
192
- = 1.7.0 =
193
- * Improve the JS API. We rewrote the API from ground up with tons of features and enhancements: Detailed debug logging, an all-new DiviArea base object with support for WordPress-like hooks, and much more!
194
- * Fix a bug where the Popup overlay was hidden too early when displaying more than one Popup at once
195
- * Fix wrong zIndex values when displaying multiple Areas at the same time
196
- * Fix some glitches in the JS script that triggers Divi Areas
197
-
198
- = 1.6.3 =
199
- * Fix animation glitch in Safari/iPhone that displayed the Popup too small when using Divis "Zoom" open animation.
200
- * Fix logic that did not recognize Popups with upper-case letters in the Popup IDs.
201
- * Fix issue with transparent Popup background.
202
- * Fix CSS rule that allows custom box-shadow styles.
203
-
204
- = 1.6.2 =
205
- * Fix JS error in front.js
206
-
207
- = 1.6.0 =
208
- * Change Popup behavior: The size now matches the width of your Divi section! 🤩
209
- * Add an dashboard notification to sign up for the six-day onboarding course.
210
- * Add popup support via Blurb "Content Link".
211
- * Add Google reCaptcha integration! Tested with CF7, but works with any plugin.
212
- * Add new WP filter options to customize dark-mode and box-shadow style.
213
- * Add new Popup Class: `no-shadow` removes the default box-shadow.
214
- * Add new Popup Class: `close-alt` removes the background color of the Close Button.
215
- * Fix Popup shadow: The box-shadow fo the Divi Section overrides the default box-shadow. *Style it your way!*
216
- * Fix select list behavior in Firefox.
217
- * Fix Popup width on iPhone 6 and earlier.
218
- * Tweak the CSS that makes the page body un-scrollable while a popup is open.
219
- * Tweak the JS library for easier maintenance and better performance.
220
-
221
- = 1.5.1 =
222
- * Fix broken exit-intent initialization (sorry for that!)
223
- * Fix bug where exit intent did trigger in some form fields, e.g. when closing auto-complete suggestions or changing an option in a select list.
224
- * Fix setting "animateSpeed" that can be set via the WP filter. It was ignored until now.
225
-
226
- = 1.5.0 =
227
- * Fixed the exit-intent behavior - now it triggers, even when you move the mouse very sloooowly
228
- * New JS API to turn literally *any* element on the page into a popup: `DiviPopup.register('#the-id')`
229
- * New JS API to configure popups after they were registered: `DiviPopup.config('#the-id', 'on-mobile', false)`
230
-
231
- = 1.4.0 =
232
- * In Divis Visual Builder you now see each popup ID right above the popup. This makes it easier for you to correctly link popups
233
- * When the class "single" is added to a popup, it will close any other popup that was currently visible
234
- * Custom styles are now applied to modules inside popups, for example, custom button styles
235
-
236
- Thanks for your feedback and all your fantastic support for the Popups for Divi plugin! Check out the webpage for documentation, e.g. for the single class.
237
-
238
- = 1.3.2 =
239
- * Update plugin icon and assets
240
- * Improved code and documentation
241
-
242
- = 1.3.1 =
243
- * Improve: Popup sections now support animations! Add those "Number Counters" and zoom-in images in your next popup.
244
- * Fix: Certain Divi settings could prevent popups from being opened, as the trigger-click-event could be intercepted by a different Divi module. Not anymore. The unstoppable Popup!
245
- * Fix: Minor javascript errors fixed, when "triggerClassPrefix" was set to false via the WP filter.
246
-
247
- = 1.3.0 =
248
- * Added trigger: Use class name "show-popup-demo" to show the popup "demo" on click. Can be used to turn any element into a popup trigger!
249
- * Improve: The default value of the popup-debug option is taken from WP_DEBUG. You can see debug output in your browser console while WP_DEBUG is enabled.
250
- * Improve: Better compatibility with Divi Child-themes (and Non-Divi themes).
251
- * Fix: Custom "close" buttons inside a popup will now close the popup before following the link or scrolling the page.
252
- * Fix: Popups will now work with themes that do not have the default "#page-container" div.
253
-
254
- = 1.2.3 =
255
- * Fix: jQuery "invalid expression" error is gone.
256
-
257
- = 1.2.2 =
258
- * Fix: Fully compatible with Divi 3.1.16 and higher.
259
- * Add: Plugin is now backward compatible until PHP 5.2.4 - before this, the plugin required PHP 5.4 or higher.
260
-
261
- = 1.2.1 =
262
- * Improve: Faster and smoother handling of popup resizing, without an interval timer!
263
- * Added Javascript event: $('.popup').on('DiviPopup:Init', ...)
264
- * Added Javascript event: $('.popup').on('DiviPopup:Show', ...)
265
- * Added Javascript event: $('.popup').on('DiviPopup:Hide', ...)
266
- * Added Javascript event: $('.popup').on('DiviPopup:Blur', ...)
267
- * Added Javascript event: $('.popup').on('DiviPopup:Focus', ...)
268
-
269
- = 1.2.0 =
270
- * Feature: Popups now support Divi loading animations!
271
- * Improve: Popups will now correctly limit the size after the contents are changed, e.g. when accordion is expanded.
272
- * Bugfix: The Popups For Divi plugin now waits until Divi could initialize all components, before creating popups.
273
-
274
- = 1.1.0 =
275
- * Feature: Yay! All Popups now have a Close button in the top-right corner by default.
276
- * Feature: Pressing the escape key will now close the currently open popup.
277
- * Improve: The active popup now has an additional CSS class `is-open` that can be used for styling inactive popups.
278
- * Improve: CSS and JS code is now minified.
279
-
280
- Thanks for your feedback and all the positive comments and reviews you posted! You are awesome :)
281
-
282
- = 1.0.3 =
283
- * Improve: Apply custom modules styles to elements inside a popup
284
- * Fix: Correct popup preview in the Visual Builder
285
-
286
- = 1.0.2.3 =
287
- * Minor: Fixes in the readme.txt and naming of assets/language files
288
-
289
- = 1.0.2 =
290
- * Minor: Added link to the plugin documentation inside the plugins list
291
- * Minor: Make plugin translatable
292
-
293
- = 1.0.1 =
294
- * Added: Support for lazy-load plugin
295
-
296
- = 1.0 =
297
- * Initial public release
298
- * Added trigger: Click
299
- * Added trigger: `on-exit`
300
- * Added JavaScript API: DiviPopup.openPopup()
301
- * Added JavaScript API: DiviPopup.closePopup()
302
- * Added JavaScript API: DiviPopup.showOverlay()
303
- * Added JavaScript API: DiviPopup.hideOverlay()
304
- * Added WordPress filter: `evr_divi_popup-js_data`
 
 
 
 
 
 
1
+ === Popups for Divi ===
2
+ Contributors: strackerphil-1
3
+ Tags: popup, marketing, divi
4
+ Requires at least: 3.0.1
5
+ Tested up to: 5.3.2
6
+ Stable tag: trunk
7
+ Requires PHP: 5.2.4
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ A quick and easy way to create Popup layers inside the Divi Visual Builder!
12
+
13
+ == Description ==
14
+
15
+ After the plugin is activated, the Visual Builder displays a new tab called "Popup" in the Section Settings modal. In the "Popup" tab, you can turn a regular Section into a Popup!
16
+
17
+ It's super simple, as you can see on the plugins Demo Page: [divimode.com/divi-popup/demo](https://divimode.com/divi-popup/demo/?_s=wpo)
18
+
19
+ # ℹ️ How it works
20
+
21
+ First, activate the plugin (no configuration needed!)
22
+
23
+ 1. Open up your Visual Builder and edit a Section - you'll see a new "Popup" tab in the Section Settings.
24
+ 2. Toggle the option "This is a Popup" and set the "Popup ID" to something (e.g., "`newsletter-optin`"). Close the Section Settings.
25
+ 3. Add a Button Module somewhere else on the page and set the "Link URL" to your Popup ID, with a leading "#" hash (e.g. "`#newsletter-optin`")
26
+ 4. **That's all**. Save the page and exit the Visual Builder! Click on the button, and you'll see your Popup. Congratulations!
27
+
28
+ # ⭐️ Additional details
29
+
30
+ Check out the [Plugin website](https://divimode.com/divi-popup/?_s=wpo) for more details. You'll find:
31
+
32
+ * Examples
33
+ * CSS class options
34
+ * JS API documentation
35
+ * WP filter documentation
36
+
37
+ Tested in all major browsers on Windows and Mac: Chrome, Firefox, Safari, IE 11, Edge!
38
+
39
+ # 🎂 Popups for Divi turns 2
40
+
41
+ Wow, it's already two years since the beginning of Popups for Divi!
42
+
43
+ It has been a great time and we've learned a lot. During that time we added a ton of features and have created a stable and powerful marketing plugin.
44
+
45
+ To celebrate the anniversary, we have created a six-day course that teaches you everything about the plugin. It walks you through the basics of creating your first Popup, shows possible ways to customize your Popup layouts and goes into advanced techniques and usages of the plugin.
46
+
47
+ > "The instruction emails really helped me to understand how to use the plugin correctly!"
48
+
49
+ The course is available in your **wp-admin Dashboard** right after you install and activate the plugin. Check out the screenshots to see the form. Also, have a look in the FAQ section, if you want to disable this feature.
50
+
51
+ # 🥳 Want more?
52
+
53
+ If you want to get the most out of Divi, you need to have a look at **[Divi Areas Pro](https://divimode.com/divi-areas-pro/?_s=wpo)** to get additional features:
54
+
55
+ > * An **admin UI** to create and configure your popups
56
+ > * Choose between **4 Area Types**: Popup, Inline, Fly-in, Hover
57
+ > * A **beautiful UI** that blends in perfectly with Divi
58
+ > * Add **advanced triggers** to your Areas:
59
+ > * On click
60
+ > * On hover
61
+ > * On scroll
62
+ > * After delay
63
+ > * On Exit
64
+ > * Customize the Area **Display**
65
+ > * Show on certain pages
66
+ > * Show on certain devices
67
+ > * Show for certain user roles or guests
68
+ > * Customize Area **Behavior**
69
+ > * Show/Hide the Close button
70
+ > * Display the Area once per hour, day, week, ...
71
+ > * Flexible **position for Inline Areas**
72
+ > * Replace/extend the page header
73
+ > * or Footer
74
+ > * or Comment section
75
+ > * or actually *any* Divi section inside the page content
76
+ > * It comes with an extended version of the **JS API**
77
+ > * **Great documentation** built into the plugin and an online knowledge base
78
+ > * and much more...
79
+ >
80
+ > 👉 [Learn more about **Divi Areas Pro**](https://divimode.com/divi-areas-pro/?_s=wpo) (with screenshots!)
81
+
82
+ == Installation ==
83
+
84
+ Install the plugin from the WordPress admin page "Plugins > Install"
85
+
86
+ or
87
+
88
+ 1. Upload `popups-for-divi` directory to the `/wp-content/plugins/` directory
89
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
90
+
91
+ == Frequently Asked Questions ==
92
+
93
+ = How much performance does Popups for Divi need? =
94
+
95
+ Actually none! We designed it with maximum page performance in mind. Our tests did show literally no change in page loading speed.
96
+
97
+ The plugin will add a single line of CSS to the page output and load two files that currently are only about 31 kb in size (9kb gzipped). Both files are cached by the browser and used on all other pages of your website.
98
+
99
+ Those two files are the JS API and the popup CSS rules that center the popup, dim the background, etc.
100
+
101
+ = Is Popups for Divi compatible with Caching plugins? =
102
+
103
+ Yes, absolutely! There is no dynamic logic in the PHP code like other popup plugins have. Popups for Divi is a little bit of PHP but the main logic sits inside the small javascript library it provides. It works on the client-side and therefore is not restricted by caching plugins.
104
+
105
+ = Is this plugin compatible with every Divi version? =
106
+
107
+ This plugin is kept compatible with the latest Divi release.
108
+
109
+ We did test it with all releases since the initial Divi 3.0 release. Possibly it will also work with older versions
110
+
111
+ = Does this plugin also work with other themes/site builders? =
112
+
113
+ Yes, actually it will! But out of the box it is optimized to work with Divi 3.0 and later. If you use any other theme or site builder then you need to change the default options of the plugin via the `evr_divi_popup-js_data` filter.
114
+
115
+ For more details visit [divimode.com/divi-popup](https://divimode.com/divi-popup/?_s=wpo)
116
+
117
+ = Does this plugin display any ads? =
118
+
119
+ No. This plugin is free and does not display any ads. In fact, the plugin does not have a UI at all.
120
+
121
+ Popups for Divi is just that - a plain popup plugin, not our marketing strategy!
122
+
123
+ Since version 1.6.0 we now offer a six-day email course that shows you how the plugin works. You will see a notification in your wp-admin dashboard right after activating the plugin.
124
+
125
+ = Do you collect any details from my website? =
126
+
127
+ No, we do not collect or transmit any data from your website.
128
+
129
+ Since version 1.6.0 there is one exception: We now offer an email course that shows you how the plugin works. You will see a notification in your wp-admin dashboard right after activating the plugin. When you opt-in to receive the onboarding emails we will transmit the details you entered (your name and email address) to the plugin website to add you to our onboarding email-list.
130
+
131
+ = Is there a way to hide the onboarding notice? =
132
+
133
+ Yes, there is!
134
+
135
+ Since 1.6.0 the plugin offers an onboarding course that consists of 6 emails. We offer this course right after plugin activation in your wp-admin "Dashboard" page (nowhere else).
136
+
137
+ This onboarding notice is displayed to administrator users only. Once the user clicks on the "Dismiss" button, the message is never displayed again for them.
138
+
139
+ You can also globally disable the onboarding notice by defining the constant [`DISABLE_NAG_NOTICES`](https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices#Disable_Nag_Notices) in your wp-config.php or themes function.php
140
+
141
+ = I need to revert to an older version =
142
+
143
+ When you experience any problems with the plugin, I would love you to first head over to the [support forum](https://wordpress.org/support/plugin/popups-for-divi/) and briefly share your issue with me.
144
+
145
+ Here's how you can revert to an older version of the plugin:
146
+
147
+ 1. Go to the [Advanced View](https://wordpress.org/plugins/popups-for-divi/advanced/) Page and scroll down to the bottom.
148
+ 2. Pick your version and click "Download" (you can choose any version since 1.5.1)
149
+ 3. Now go to your wp-admin Panel and open the Plugins list
150
+ 4. Deactivate and Delete the Popups for Divi plugin! *Note: You will not lose any data, but while the plugin is deactivated/missing your Popups might be visible like normal page content.*
151
+ 5. On the Plugins page click "Add New" button in the top and then click on "Upload Plugin"
152
+ 6. Select the .zip file which you downloaded in Step 2 and upload it. Activate and you're done!
153
+
154
+ Alternatively you can replace the `popups-for-divi` folder via FTP: Extract the .zip file which you downloaded in Step 2 and upload it to your `/wp-content/plugins` folder.
155
+
156
+ = I have more questions or need help =
157
+
158
+ Please first visit the [**plugin website**](https://divimode.com/divi-popup/?_s=wpo), as it includes examples and documentation that could answer your questions.
159
+
160
+ If that does not help, then head over to the [**support forum**](https://wordpress.org/support/plugin/popups-for-divi/?_s=wpo) to see if someone else had the same problem and found a solution to it. Also, feel free to ask for help there.
161
+
162
+ You can also send us a private support request via the [**support form on divimode.com**](https://divimode.com/get-support//?_s=wpo). Please note, that might need a while to answer your private support requests.
163
+
164
+ When you need additional features, then please have a look at our the Premium plugin [**Divi Areas Pro**](https://diivimode.com/divi-areas-pro/?_s=wpo) which comes with a lot of cool options!
165
+
166
+ == Screenshots ==
167
+
168
+ 1. Step 1: Prepare your Popup inside a normal Divi Section, right on your page.
169
+ 2. Step 2: Open the Section Settings, enable the "This is a Popup" flag and define a unique Popup ID.
170
+ 3. Step 3: That's how the final Popup is dispayed to a visitor.
171
+ 4. Check out the extensive API documentation and popup samples on divimode.com
172
+ 5. Our free email course walks you through every aspect of the plugin - from the basics to advanced use-cases and techniques.
173
+
174
+ == Changelog ==
175
+
176
+ = 2.0.2 =
177
+ * Fix some typos
178
+ * Improve code style: Apply the WordPress Coding Standards 2.0
179
+ * Improved security check in the onboarding form
180
+ * Improve the copy and some JS logic of the onboarding form
181
+
182
+ Plugin tested with WordPress 5.4.0 and Divi 4.4.2
183
+
184
+ = 2.0.1 =
185
+ * Fix urgent problem where the plugin would remove the contents of the page while saving the page in Divi! 😳
186
+
187
+ = 2.0.0 =
188
+ * Add a brand new Tab to the Visual Builder that allows you to configure all popup details using Divi! No more class names 🥳
189
+ * Fix JS API integration for IE 11
190
+
191
+ = 1.7.2 =
192
+ * Fix positioning of full-height Popups for all users/devices
193
+
194
+ = 1.7.1 =
195
+ * Fix scroll bars in Popups that are taller than the screen height
196
+ * Fix position of full-height popups that were displayed too far up on the screen
197
+
198
+ = 1.7.0 =
199
+ * Improve the JS API. We rewrote the API from ground up with tons of features and enhancements: Detailed debug logging, an all-new DiviArea base object with support for WordPress-like hooks, and much more!
200
+ * Fix a bug where the Popup overlay was hidden too early when displaying more than one Popup at once
201
+ * Fix wrong zIndex values when displaying multiple Areas at the same time
202
+ * Fix some glitches in the JS script that triggers Divi Areas
203
+
204
+ = 1.6.3 =
205
+ * Fix animation glitch in Safari/iPhone that displayed the Popup too small when using Divis "Zoom" open animation.
206
+ * Fix logic that did not recognize Popups with upper-case letters in the Popup IDs.
207
+ * Fix issue with transparent Popup background.
208
+ * Fix CSS rule that allows custom box-shadow styles.
209
+
210
+ = 1.6.2 =
211
+ * Fix JS error in front.js
212
+
213
+ = 1.6.0 =
214
+ * Change Popup behavior: The size now matches the width of your Divi section! 🤩
215
+ * Add an dashboard notification to sign up for the six-day onboarding course.
216
+ * Add popup support via Blurb "Content Link".
217
+ * Add Google reCaptcha integration! Tested with CF7, but works with any plugin.
218
+ * Add new WP filter options to customize dark-mode and box-shadow style.
219
+ * Add new Popup Class: `no-shadow` removes the default box-shadow.
220
+ * Add new Popup Class: `close-alt` removes the background color of the Close Button.
221
+ * Fix Popup shadow: The box-shadow fo the Divi Section overrides the default box-shadow. *Style it your way!*
222
+ * Fix select list behavior in Firefox.
223
+ * Fix Popup width on iPhone 6 and earlier.
224
+ * Tweak the CSS that makes the page body un-scrollable while a popup is open.
225
+ * Tweak the JS library for easier maintenance and better performance.
226
+
227
+ = 1.5.1 =
228
+ * Fix broken exit-intent initialization (sorry for that!)
229
+ * Fix bug where exit intent did trigger in some form fields, e.g. when closing auto-complete suggestions or changing an option in a select list.
230
+ * Fix setting "animateSpeed" that can be set via the WP filter. It was ignored until now.
231
+
232
+ = 1.5.0 =
233
+ * Fixed the exit-intent behavior - now it triggers, even when you move the mouse very sloooowly
234
+ * New JS API to turn literally *any* element on the page into a popup: `DiviPopup.register('#the-id')`
235
+ * New JS API to configure popups after they were registered: `DiviPopup.config('#the-id', 'on-mobile', false)`
236
+
237
+ = 1.4.0 =
238
+ * In Divis Visual Builder you now see each popup ID right above the popup. This makes it easier for you to correctly link popups
239
+ * When the class "single" is added to a popup, it will close any other popup that was currently visible
240
+ * Custom styles are now applied to modules inside popups, for example, custom button styles
241
+
242
+ Thanks for your feedback and all your fantastic support for the Popups for Divi plugin! Check out the webpage for documentation, e.g. for the single class.
243
+
244
+ = 1.3.2 =
245
+ * Update plugin icon and assets
246
+ * Improved code and documentation
247
+
248
+ = 1.3.1 =
249
+ * Improve: Popup sections now support animations! Add those "Number Counters" and zoom-in images in your next popup.
250
+ * Fix: Certain Divi settings could prevent popups from being opened, as the trigger-click-event could be intercepted by a different Divi module. Not anymore. The unstoppable Popup!
251
+ * Fix: Minor javascript errors fixed, when "triggerClassPrefix" was set to false via the WP filter.
252
+
253
+ = 1.3.0 =
254
+ * Added trigger: Use class name "show-popup-demo" to show the popup "demo" on click. Can be used to turn any element into a popup trigger!
255
+ * Improve: The default value of the popup-debug option is taken from WP_DEBUG. You can see debug output in your browser console while WP_DEBUG is enabled.
256
+ * Improve: Better compatibility with Divi Child-themes (and Non-Divi themes).
257
+ * Fix: Custom "close" buttons inside a popup will now close the popup before following the link or scrolling the page.
258
+ * Fix: Popups will now work with themes that do not have the default "#page-container" div.
259
+
260
+ = 1.2.3 =
261
+ * Fix: jQuery "invalid expression" error is gone.
262
+
263
+ = 1.2.2 =
264
+ * Fix: Fully compatible with Divi 3.1.16 and higher.
265
+ * Add: Plugin is now backward compatible until PHP 5.2.4 - before this, the plugin required PHP 5.4 or higher.
266
+
267
+ = 1.2.1 =
268
+ * Improve: Faster and smoother handling of popup resizing, without an interval timer!
269
+ * Added Javascript event: $('.popup').on('DiviPopup:Init', ...)
270
+ * Added Javascript event: $('.popup').on('DiviPopup:Show', ...)
271
+ * Added Javascript event: $('.popup').on('DiviPopup:Hide', ...)
272
+ * Added Javascript event: $('.popup').on('DiviPopup:Blur', ...)
273
+ * Added Javascript event: $('.popup').on('DiviPopup:Focus', ...)
274
+
275
+ = 1.2.0 =
276
+ * Feature: Popups now support Divi loading animations!
277
+ * Improve: Popups will now correctly limit the size after the contents are changed, e.g. when accordion is expanded.
278
+ * Bugfix: The Popups For Divi plugin now waits until Divi could initialize all components, before creating popups.
279
+
280
+ = 1.1.0 =
281
+ * Feature: Yay! All Popups now have a Close button in the top-right corner by default.
282
+ * Feature: Pressing the escape key will now close the currently open popup.
283
+ * Improve: The active popup now has an additional CSS class `is-open` that can be used for styling inactive popups.
284
+ * Improve: CSS and JS code is now minified.
285
+
286
+ Thanks for your feedback and all the positive comments and reviews you posted! You are awesome :)
287
+
288
+ = 1.0.3 =
289
+ * Improve: Apply custom modules styles to elements inside a popup
290
+ * Fix: Correct popup preview in the Visual Builder
291
+
292
+ = 1.0.2.3 =
293
+ * Minor: Fixes in the readme.txt and naming of assets/language files
294
+
295
+ = 1.0.2 =
296
+ * Minor: Added link to the plugin documentation inside the plugins list
297
+ * Minor: Make plugin translatable
298
+
299
+ = 1.0.1 =
300
+ * Added: Support for lazy-load plugin
301
+
302
+ = 1.0 =
303
+ * Initial public release
304
+ * Added trigger: Click
305
+ * Added trigger: `on-exit`
306
+ * Added JavaScript API: DiviPopup.openPopup()
307
+ * Added JavaScript API: DiviPopup.closePopup()
308
+ * Added JavaScript API: DiviPopup.showOverlay()
309
+ * Added JavaScript API: DiviPopup.hideOverlay()
310
+ * Added WordPress filter: `evr_divi_popup-js_data`