AMP for WP – Accelerated Mobile Pages - Version 0.9.97.55

Version Description

(28th May 2019) = * Improvement: Rank Math compatibility with V1.0.24 #3177 * Improvement: Related posts and Recent posts on custom posts types #2708 * Improvement: Appearance Designs for Related Posts #1545 * Improvement: Integration with EWWW IO and ExactDN. #2805 * Improvement: rel

Download this release

Release Info

Developer mohammed_kaludi
Plugin Icon 128x128 AMP for WP – Accelerated Mobile Pages
Version 0.9.97.55
Comparing to
See all releases

Code changes from version 0.9.97.54 to 0.9.97.55

LICENSE CHANGED
@@ -1,357 +1,357 @@
1
- This program is free software; you can redistribute it and/or modify
2
- it under the terms of the GNU General Public License as published by
3
- the Free Software Foundation; either version 2 of the License, or
4
- (at your option) any later version.
5
-
6
- This program is distributed in the hope that it will be useful,
7
- but WITHOUT ANY WARRANTY; without even the implied warranty of
8
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
- GNU General Public License for more details.
10
-
11
- You should have received a copy of the GNU General Public License
12
- along with this program; if not, write to the Free Software
13
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
-
15
-
16
- ===================================
17
-
18
- GNU GENERAL PUBLIC LICENSE
19
- Version 2, June 1991
20
-
21
- Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
22
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
- Everyone is permitted to copy and distribute verbatim copies
24
- of this license document, but changing it is not allowed.
25
-
26
- Preamble
27
-
28
- The licenses for most software are designed to take away your
29
- freedom to share and change it. By contrast, the GNU General Public
30
- License is intended to guarantee your freedom to share and change free
31
- software--to make sure the software is free for all its users. This
32
- General Public License applies to most of the Free Software
33
- Foundation's software and to any other program whose authors commit to
34
- using it. (Some other Free Software Foundation software is covered by
35
- the GNU Lesser General Public License instead.) You can apply it to
36
- your programs, too.
37
-
38
- When we speak of free software, we are referring to freedom, not
39
- price. Our General Public Licenses are designed to make sure that you
40
- have the freedom to distribute copies of free software (and charge for
41
- this service if you wish), that you receive source code or can get it
42
- if you want it, that you can change the software or use pieces of it
43
- in new free programs; and that you know you can do these things.
44
-
45
- To protect your rights, we need to make restrictions that forbid
46
- anyone to deny you these rights or to ask you to surrender the rights.
47
- These restrictions translate to certain responsibilities for you if you
48
- distribute copies of the software, or if you modify it.
49
-
50
- For example, if you distribute copies of such a program, whether
51
- gratis or for a fee, you must give the recipients all the rights that
52
- you have. You must make sure that they, too, receive or can get the
53
- source code. And you must show them these terms so they know their
54
- rights.
55
-
56
- We protect your rights with two steps: (1) copyright the software, and
57
- (2) offer you this license which gives you legal permission to copy,
58
- distribute and/or modify the software.
59
-
60
- Also, for each author's protection and ours, we want to make certain
61
- that everyone understands that there is no warranty for this free
62
- software. If the software is modified by someone else and passed on, we
63
- want its recipients to know that what they have is not the original, so
64
- that any problems introduced by others will not reflect on the original
65
- authors' reputations.
66
-
67
- Finally, any free program is threatened constantly by software
68
- patents. We wish to avoid the danger that redistributors of a free
69
- program will individually obtain patent licenses, in effect making the
70
- program proprietary. To prevent this, we have made it clear that any
71
- patent must be licensed for everyone's free use or not licensed at all.
72
-
73
- The precise terms and conditions for copying, distribution and
74
- modification follow.
75
-
76
- GNU GENERAL PUBLIC LICENSE
77
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
78
-
79
- 0. This License applies to any program or other work which contains
80
- a notice placed by the copyright holder saying it may be distributed
81
- under the terms of this General Public License. The "Program", below,
82
- refers to any such program or work, and a "work based on the Program"
83
- means either the Program or any derivative work under copyright law:
84
- that is to say, a work containing the Program or a portion of it,
85
- either verbatim or with modifications and/or translated into another
86
- language. (Hereinafter, translation is included without limitation in
87
- the term "modification".) Each licensee is addressed as "you".
88
-
89
- Activities other than copying, distribution and modification are not
90
- covered by this License; they are outside its scope. The act of
91
- running the Program is not restricted, and the output from the Program
92
- is covered only if its contents constitute a work based on the
93
- Program (independent of having been made by running the Program).
94
- Whether that is true depends on what the Program does.
95
-
96
- 1. You may copy and distribute verbatim copies of the Program's
97
- source code as you receive it, in any medium, provided that you
98
- conspicuously and appropriately publish on each copy an appropriate
99
- copyright notice and disclaimer of warranty; keep intact all the
100
- notices that refer to this License and to the absence of any warranty;
101
- and give any other recipients of the Program a copy of this License
102
- along with the Program.
103
-
104
- You may charge a fee for the physical act of transferring a copy, and
105
- you may at your option offer warranty protection in exchange for a fee.
106
-
107
- 2. You may modify your copy or copies of the Program or any portion
108
- of it, thus forming a work based on the Program, and copy and
109
- distribute such modifications or work under the terms of Section 1
110
- above, provided that you also meet all of these conditions:
111
-
112
- a) You must cause the modified files to carry prominent notices
113
- stating that you changed the files and the date of any change.
114
-
115
- b) You must cause any work that you distribute or publish, that in
116
- whole or in part contains or is derived from the Program or any
117
- part thereof, to be licensed as a whole at no charge to all third
118
- parties under the terms of this License.
119
-
120
- c) If the modified program normally reads commands interactively
121
- when run, you must cause it, when started running for such
122
- interactive use in the most ordinary way, to print or display an
123
- announcement including an appropriate copyright notice and a
124
- notice that there is no warranty (or else, saying that you provide
125
- a warranty) and that users may redistribute the program under
126
- these conditions, and telling the user how to view a copy of this
127
- License. (Exception: if the Program itself is interactive but
128
- does not normally print such an announcement, your work based on
129
- the Program is not required to print an announcement.)
130
-
131
- These requirements apply to the modified work as a whole. If
132
- identifiable sections of that work are not derived from the Program,
133
- and can be reasonably considered independent and separate works in
134
- themselves, then this License, and its terms, do not apply to those
135
- sections when you distribute them as separate works. But when you
136
- distribute the same sections as part of a whole which is a work based
137
- on the Program, the distribution of the whole must be on the terms of
138
- this License, whose permissions for other licensees extend to the
139
- entire whole, and thus to each and every part regardless of who wrote it.
140
-
141
- Thus, it is not the intent of this section to claim rights or contest
142
- your rights to work written entirely by you; rather, the intent is to
143
- exercise the right to control the distribution of derivative or
144
- collective works based on the Program.
145
-
146
- In addition, mere aggregation of another work not based on the Program
147
- with the Program (or with a work based on the Program) on a volume of
148
- a storage or distribution medium does not bring the other work under
149
- the scope of this License.
150
-
151
- 3. You may copy and distribute the Program (or a work based on it,
152
- under Section 2) in object code or executable form under the terms of
153
- Sections 1 and 2 above provided that you also do one of the following:
154
-
155
- a) Accompany it with the complete corresponding machine-readable
156
- source code, which must be distributed under the terms of Sections
157
- 1 and 2 above on a medium customarily used for software interchange; or,
158
-
159
- b) Accompany it with a written offer, valid for at least three
160
- years, to give any third party, for a charge no more than your
161
- cost of physically performing source distribution, a complete
162
- machine-readable copy of the corresponding source code, to be
163
- distributed under the terms of Sections 1 and 2 above on a medium
164
- customarily used for software interchange; or,
165
-
166
- c) Accompany it with the information you received as to the offer
167
- to distribute corresponding source code. (This alternative is
168
- allowed only for noncommercial distribution and only if you
169
- received the program in object code or executable form with such
170
- an offer, in accord with Subsection b above.)
171
-
172
- The source code for a work means the preferred form of the work for
173
- making modifications to it. For an executable work, complete source
174
- code means all the source code for all modules it contains, plus any
175
- associated interface definition files, plus the scripts used to
176
- control compilation and installation of the executable. However, as a
177
- special exception, the source code distributed need not include
178
- anything that is normally distributed (in either source or binary
179
- form) with the major components (compiler, kernel, and so on) of the
180
- operating system on which the executable runs, unless that component
181
- itself accompanies the executable.
182
-
183
- If distribution of executable or object code is made by offering
184
- access to copy from a designated place, then offering equivalent
185
- access to copy the source code from the same place counts as
186
- distribution of the source code, even though third parties are not
187
- compelled to copy the source along with the object code.
188
-
189
- 4. You may not copy, modify, sublicense, or distribute the Program
190
- except as expressly provided under this License. Any attempt
191
- otherwise to copy, modify, sublicense or distribute the Program is
192
- void, and will automatically terminate your rights under this License.
193
- However, parties who have received copies, or rights, from you under
194
- this License will not have their licenses terminated so long as such
195
- parties remain in full compliance.
196
-
197
- 5. You are not required to accept this License, since you have not
198
- signed it. However, nothing else grants you permission to modify or
199
- distribute the Program or its derivative works. These actions are
200
- prohibited by law if you do not accept this License. Therefore, by
201
- modifying or distributing the Program (or any work based on the
202
- Program), you indicate your acceptance of this License to do so, and
203
- all its terms and conditions for copying, distributing or modifying
204
- the Program or works based on it.
205
-
206
- 6. Each time you redistribute the Program (or any work based on the
207
- Program), the recipient automatically receives a license from the
208
- original licensor to copy, distribute or modify the Program subject to
209
- these terms and conditions. You may not impose any further
210
- restrictions on the recipients' exercise of the rights granted herein.
211
- You are not responsible for enforcing compliance by third parties to
212
- this License.
213
-
214
- 7. If, as a consequence of a court judgment or allegation of patent
215
- infringement or for any other reason (not limited to patent issues),
216
- conditions are imposed on you (whether by court order, agreement or
217
- otherwise) that contradict the conditions of this License, they do not
218
- excuse you from the conditions of this License. If you cannot
219
- distribute so as to satisfy simultaneously your obligations under this
220
- License and any other pertinent obligations, then as a consequence you
221
- may not distribute the Program at all. For example, if a patent
222
- license would not permit royalty-free redistribution of the Program by
223
- all those who receive copies directly or indirectly through you, then
224
- the only way you could satisfy both it and this License would be to
225
- refrain entirely from distribution of the Program.
226
-
227
- If any portion of this section is held invalid or unenforceable under
228
- any particular circumstance, the balance of the section is intended to
229
- apply and the section as a whole is intended to apply in other
230
- circumstances.
231
-
232
- It is not the purpose of this section to induce you to infringe any
233
- patents or other property right claims or to contest validity of any
234
- such claims; this section has the sole purpose of protecting the
235
- integrity of the free software distribution system, which is
236
- implemented by public license practices. Many people have made
237
- generous contributions to the wide range of software distributed
238
- through that system in reliance on consistent application of that
239
- system; it is up to the author/donor to decide if he or she is willing
240
- to distribute software through any other system and a licensee cannot
241
- impose that choice.
242
-
243
- This section is intended to make thoroughly clear what is believed to
244
- be a consequence of the rest of this License.
245
-
246
- 8. If the distribution and/or use of the Program is restricted in
247
- certain countries either by patents or by copyrighted interfaces, the
248
- original copyright holder who places the Program under this License
249
- may add an explicit geographical distribution limitation excluding
250
- those countries, so that distribution is permitted only in or among
251
- countries not thus excluded. In such case, this License incorporates
252
- the limitation as if written in the body of this License.
253
-
254
- 9. The Free Software Foundation may publish revised and/or new versions
255
- of the General Public License from time to time. Such new versions will
256
- be similar in spirit to the present version, but may differ in detail to
257
- address new problems or concerns.
258
-
259
- Each version is given a distinguishing version number. If the Program
260
- specifies a version number of this License which applies to it and "any
261
- later version", you have the option of following the terms and conditions
262
- either of that version or of any later version published by the Free
263
- Software Foundation. If the Program does not specify a version number of
264
- this License, you may choose any version ever published by the Free Software
265
- Foundation.
266
-
267
- 10. If you wish to incorporate parts of the Program into other free
268
- programs whose distribution conditions are different, write to the author
269
- to ask for permission. For software which is copyrighted by the Free
270
- Software Foundation, write to the Free Software Foundation; we sometimes
271
- make exceptions for this. Our decision will be guided by the two goals
272
- of preserving the free status of all derivatives of our free software and
273
- of promoting the sharing and reuse of software generally.
274
-
275
- NO WARRANTY
276
-
277
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
278
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
279
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
280
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
281
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
282
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
283
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
284
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
285
- REPAIR OR CORRECTION.
286
-
287
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
288
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
289
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
290
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
291
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
292
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
293
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
294
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
295
- POSSIBILITY OF SUCH DAMAGES.
296
-
297
- END OF TERMS AND CONDITIONS
298
-
299
- How to Apply These Terms to Your New Programs
300
-
301
- If you develop a new program, and you want it to be of the greatest
302
- possible use to the public, the best way to achieve this is to make it
303
- free software which everyone can redistribute and change under these terms.
304
-
305
- To do so, attach the following notices to the program. It is safest
306
- to attach them to the start of each source file to most effectively
307
- convey the exclusion of warranty; and each file should have at least
308
- the "copyright" line and a pointer to where the full notice is found.
309
-
310
- {description}
311
- Copyright (C) {year} {fullname}
312
-
313
- This program is free software; you can redistribute it and/or modify
314
- it under the terms of the GNU General Public License as published by
315
- the Free Software Foundation; either version 2 of the License, or
316
- (at your option) any later version.
317
-
318
- This program is distributed in the hope that it will be useful,
319
- but WITHOUT ANY WARRANTY; without even the implied warranty of
320
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
321
- GNU General Public License for more details.
322
-
323
- You should have received a copy of the GNU General Public License along
324
- with this program; if not, write to the Free Software Foundation, Inc.,
325
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
326
-
327
- Also add information on how to contact you by electronic and paper mail.
328
-
329
- If the program is interactive, make it output a short notice like this
330
- when it starts in an interactive mode:
331
-
332
- Gnomovision version 69, Copyright (C) year name of author
333
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
334
- This is free software, and you are welcome to redistribute it
335
- under certain conditions; type `show c' for details.
336
-
337
- The hypothetical commands `show w' and `show c' should show the appropriate
338
- parts of the General Public License. Of course, the commands you use may
339
- be called something other than `show w' and `show c'; they could even be
340
- mouse-clicks or menu items--whatever suits your program.
341
-
342
- You should also get your employer (if you work as a programmer) or your
343
- school, if any, to sign a "copyright disclaimer" for the program, if
344
- necessary. Here is a sample; alter the names:
345
-
346
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
347
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
348
-
349
- {signature of Ty Coon}, 1 April 1989
350
- Ty Coon, President of Vice
351
-
352
- This General Public License does not permit incorporating your program into
353
- proprietary programs. If your program is a subroutine library, you may
354
- consider it more useful to permit linking proprietary applications with the
355
- library. If this is what you want to do, use the GNU Lesser General
356
- Public License instead of this License.
357
-
1
+ This program is free software; you can redistribute it and/or modify
2
+ it under the terms of the GNU General Public License as published by
3
+ the Free Software Foundation; either version 2 of the License, or
4
+ (at your option) any later version.
5
+
6
+ This program is distributed in the hope that it will be useful,
7
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
8
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
+ GNU General Public License for more details.
10
+
11
+ You should have received a copy of the GNU General Public License
12
+ along with this program; if not, write to the Free Software
13
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
+
15
+
16
+ ===================================
17
+
18
+ GNU GENERAL PUBLIC LICENSE
19
+ Version 2, June 1991
20
+
21
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
22
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
+ Everyone is permitted to copy and distribute verbatim copies
24
+ of this license document, but changing it is not allowed.
25
+
26
+ Preamble
27
+
28
+ The licenses for most software are designed to take away your
29
+ freedom to share and change it. By contrast, the GNU General Public
30
+ License is intended to guarantee your freedom to share and change free
31
+ software--to make sure the software is free for all its users. This
32
+ General Public License applies to most of the Free Software
33
+ Foundation's software and to any other program whose authors commit to
34
+ using it. (Some other Free Software Foundation software is covered by
35
+ the GNU Lesser General Public License instead.) You can apply it to
36
+ your programs, too.
37
+
38
+ When we speak of free software, we are referring to freedom, not
39
+ price. Our General Public Licenses are designed to make sure that you
40
+ have the freedom to distribute copies of free software (and charge for
41
+ this service if you wish), that you receive source code or can get it
42
+ if you want it, that you can change the software or use pieces of it
43
+ in new free programs; and that you know you can do these things.
44
+
45
+ To protect your rights, we need to make restrictions that forbid
46
+ anyone to deny you these rights or to ask you to surrender the rights.
47
+ These restrictions translate to certain responsibilities for you if you
48
+ distribute copies of the software, or if you modify it.
49
+
50
+ For example, if you distribute copies of such a program, whether
51
+ gratis or for a fee, you must give the recipients all the rights that
52
+ you have. You must make sure that they, too, receive or can get the
53
+ source code. And you must show them these terms so they know their
54
+ rights.
55
+
56
+ We protect your rights with two steps: (1) copyright the software, and
57
+ (2) offer you this license which gives you legal permission to copy,
58
+ distribute and/or modify the software.
59
+
60
+ Also, for each author's protection and ours, we want to make certain
61
+ that everyone understands that there is no warranty for this free
62
+ software. If the software is modified by someone else and passed on, we
63
+ want its recipients to know that what they have is not the original, so
64
+ that any problems introduced by others will not reflect on the original
65
+ authors' reputations.
66
+
67
+ Finally, any free program is threatened constantly by software
68
+ patents. We wish to avoid the danger that redistributors of a free
69
+ program will individually obtain patent licenses, in effect making the
70
+ program proprietary. To prevent this, we have made it clear that any
71
+ patent must be licensed for everyone's free use or not licensed at all.
72
+
73
+ The precise terms and conditions for copying, distribution and
74
+ modification follow.
75
+
76
+ GNU GENERAL PUBLIC LICENSE
77
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
78
+
79
+ 0. This License applies to any program or other work which contains
80
+ a notice placed by the copyright holder saying it may be distributed
81
+ under the terms of this General Public License. The "Program", below,
82
+ refers to any such program or work, and a "work based on the Program"
83
+ means either the Program or any derivative work under copyright law:
84
+ that is to say, a work containing the Program or a portion of it,
85
+ either verbatim or with modifications and/or translated into another
86
+ language. (Hereinafter, translation is included without limitation in
87
+ the term "modification".) Each licensee is addressed as "you".
88
+
89
+ Activities other than copying, distribution and modification are not
90
+ covered by this License; they are outside its scope. The act of
91
+ running the Program is not restricted, and the output from the Program
92
+ is covered only if its contents constitute a work based on the
93
+ Program (independent of having been made by running the Program).
94
+ Whether that is true depends on what the Program does.
95
+
96
+ 1. You may copy and distribute verbatim copies of the Program's
97
+ source code as you receive it, in any medium, provided that you
98
+ conspicuously and appropriately publish on each copy an appropriate
99
+ copyright notice and disclaimer of warranty; keep intact all the
100
+ notices that refer to this License and to the absence of any warranty;
101
+ and give any other recipients of the Program a copy of this License
102
+ along with the Program.
103
+
104
+ You may charge a fee for the physical act of transferring a copy, and
105
+ you may at your option offer warranty protection in exchange for a fee.
106
+
107
+ 2. You may modify your copy or copies of the Program or any portion
108
+ of it, thus forming a work based on the Program, and copy and
109
+ distribute such modifications or work under the terms of Section 1
110
+ above, provided that you also meet all of these conditions:
111
+
112
+ a) You must cause the modified files to carry prominent notices
113
+ stating that you changed the files and the date of any change.
114
+
115
+ b) You must cause any work that you distribute or publish, that in
116
+ whole or in part contains or is derived from the Program or any
117
+ part thereof, to be licensed as a whole at no charge to all third
118
+ parties under the terms of this License.
119
+
120
+ c) If the modified program normally reads commands interactively
121
+ when run, you must cause it, when started running for such
122
+ interactive use in the most ordinary way, to print or display an
123
+ announcement including an appropriate copyright notice and a
124
+ notice that there is no warranty (or else, saying that you provide
125
+ a warranty) and that users may redistribute the program under
126
+ these conditions, and telling the user how to view a copy of this
127
+ License. (Exception: if the Program itself is interactive but
128
+ does not normally print such an announcement, your work based on
129
+ the Program is not required to print an announcement.)
130
+
131
+ These requirements apply to the modified work as a whole. If
132
+ identifiable sections of that work are not derived from the Program,
133
+ and can be reasonably considered independent and separate works in
134
+ themselves, then this License, and its terms, do not apply to those
135
+ sections when you distribute them as separate works. But when you
136
+ distribute the same sections as part of a whole which is a work based
137
+ on the Program, the distribution of the whole must be on the terms of
138
+ this License, whose permissions for other licensees extend to the
139
+ entire whole, and thus to each and every part regardless of who wrote it.
140
+
141
+ Thus, it is not the intent of this section to claim rights or contest
142
+ your rights to work written entirely by you; rather, the intent is to
143
+ exercise the right to control the distribution of derivative or
144
+ collective works based on the Program.
145
+
146
+ In addition, mere aggregation of another work not based on the Program
147
+ with the Program (or with a work based on the Program) on a volume of
148
+ a storage or distribution medium does not bring the other work under
149
+ the scope of this License.
150
+
151
+ 3. You may copy and distribute the Program (or a work based on it,
152
+ under Section 2) in object code or executable form under the terms of
153
+ Sections 1 and 2 above provided that you also do one of the following:
154
+
155
+ a) Accompany it with the complete corresponding machine-readable
156
+ source code, which must be distributed under the terms of Sections
157
+ 1 and 2 above on a medium customarily used for software interchange; or,
158
+
159
+ b) Accompany it with a written offer, valid for at least three
160
+ years, to give any third party, for a charge no more than your
161
+ cost of physically performing source distribution, a complete
162
+ machine-readable copy of the corresponding source code, to be
163
+ distributed under the terms of Sections 1 and 2 above on a medium
164
+ customarily used for software interchange; or,
165
+
166
+ c) Accompany it with the information you received as to the offer
167
+ to distribute corresponding source code. (This alternative is
168
+ allowed only for noncommercial distribution and only if you
169
+ received the program in object code or executable form with such
170
+ an offer, in accord with Subsection b above.)
171
+
172
+ The source code for a work means the preferred form of the work for
173
+ making modifications to it. For an executable work, complete source
174
+ code means all the source code for all modules it contains, plus any
175
+ associated interface definition files, plus the scripts used to
176
+ control compilation and installation of the executable. However, as a
177
+ special exception, the source code distributed need not include
178
+ anything that is normally distributed (in either source or binary
179
+ form) with the major components (compiler, kernel, and so on) of the
180
+ operating system on which the executable runs, unless that component
181
+ itself accompanies the executable.
182
+
183
+ If distribution of executable or object code is made by offering
184
+ access to copy from a designated place, then offering equivalent
185
+ access to copy the source code from the same place counts as
186
+ distribution of the source code, even though third parties are not
187
+ compelled to copy the source along with the object code.
188
+
189
+ 4. You may not copy, modify, sublicense, or distribute the Program
190
+ except as expressly provided under this License. Any attempt
191
+ otherwise to copy, modify, sublicense or distribute the Program is
192
+ void, and will automatically terminate your rights under this License.
193
+ However, parties who have received copies, or rights, from you under
194
+ this License will not have their licenses terminated so long as such
195
+ parties remain in full compliance.
196
+
197
+ 5. You are not required to accept this License, since you have not
198
+ signed it. However, nothing else grants you permission to modify or
199
+ distribute the Program or its derivative works. These actions are
200
+ prohibited by law if you do not accept this License. Therefore, by
201
+ modifying or distributing the Program (or any work based on the
202
+ Program), you indicate your acceptance of this License to do so, and
203
+ all its terms and conditions for copying, distributing or modifying
204
+ the Program or works based on it.
205
+
206
+ 6. Each time you redistribute the Program (or any work based on the
207
+ Program), the recipient automatically receives a license from the
208
+ original licensor to copy, distribute or modify the Program subject to
209
+ these terms and conditions. You may not impose any further
210
+ restrictions on the recipients' exercise of the rights granted herein.
211
+ You are not responsible for enforcing compliance by third parties to
212
+ this License.
213
+
214
+ 7. If, as a consequence of a court judgment or allegation of patent
215
+ infringement or for any other reason (not limited to patent issues),
216
+ conditions are imposed on you (whether by court order, agreement or
217
+ otherwise) that contradict the conditions of this License, they do not
218
+ excuse you from the conditions of this License. If you cannot
219
+ distribute so as to satisfy simultaneously your obligations under this
220
+ License and any other pertinent obligations, then as a consequence you
221
+ may not distribute the Program at all. For example, if a patent
222
+ license would not permit royalty-free redistribution of the Program by
223
+ all those who receive copies directly or indirectly through you, then
224
+ the only way you could satisfy both it and this License would be to
225
+ refrain entirely from distribution of the Program.
226
+
227
+ If any portion of this section is held invalid or unenforceable under
228
+ any particular circumstance, the balance of the section is intended to
229
+ apply and the section as a whole is intended to apply in other
230
+ circumstances.
231
+
232
+ It is not the purpose of this section to induce you to infringe any
233
+ patents or other property right claims or to contest validity of any
234
+ such claims; this section has the sole purpose of protecting the
235
+ integrity of the free software distribution system, which is
236
+ implemented by public license practices. Many people have made
237
+ generous contributions to the wide range of software distributed
238
+ through that system in reliance on consistent application of that
239
+ system; it is up to the author/donor to decide if he or she is willing
240
+ to distribute software through any other system and a licensee cannot
241
+ impose that choice.
242
+
243
+ This section is intended to make thoroughly clear what is believed to
244
+ be a consequence of the rest of this License.
245
+
246
+ 8. If the distribution and/or use of the Program is restricted in
247
+ certain countries either by patents or by copyrighted interfaces, the
248
+ original copyright holder who places the Program under this License
249
+ may add an explicit geographical distribution limitation excluding
250
+ those countries, so that distribution is permitted only in or among
251
+ countries not thus excluded. In such case, this License incorporates
252
+ the limitation as if written in the body of this License.
253
+
254
+ 9. The Free Software Foundation may publish revised and/or new versions
255
+ of the General Public License from time to time. Such new versions will
256
+ be similar in spirit to the present version, but may differ in detail to
257
+ address new problems or concerns.
258
+
259
+ Each version is given a distinguishing version number. If the Program
260
+ specifies a version number of this License which applies to it and "any
261
+ later version", you have the option of following the terms and conditions
262
+ either of that version or of any later version published by the Free
263
+ Software Foundation. If the Program does not specify a version number of
264
+ this License, you may choose any version ever published by the Free Software
265
+ Foundation.
266
+
267
+ 10. If you wish to incorporate parts of the Program into other free
268
+ programs whose distribution conditions are different, write to the author
269
+ to ask for permission. For software which is copyrighted by the Free
270
+ Software Foundation, write to the Free Software Foundation; we sometimes
271
+ make exceptions for this. Our decision will be guided by the two goals
272
+ of preserving the free status of all derivatives of our free software and
273
+ of promoting the sharing and reuse of software generally.
274
+
275
+ NO WARRANTY
276
+
277
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
278
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
279
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
280
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
281
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
282
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
283
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
284
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
285
+ REPAIR OR CORRECTION.
286
+
287
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
288
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
289
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
290
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
291
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
292
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
293
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
294
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
295
+ POSSIBILITY OF SUCH DAMAGES.
296
+
297
+ END OF TERMS AND CONDITIONS
298
+
299
+ How to Apply These Terms to Your New Programs
300
+
301
+ If you develop a new program, and you want it to be of the greatest
302
+ possible use to the public, the best way to achieve this is to make it
303
+ free software which everyone can redistribute and change under these terms.
304
+
305
+ To do so, attach the following notices to the program. It is safest
306
+ to attach them to the start of each source file to most effectively
307
+ convey the exclusion of warranty; and each file should have at least
308
+ the "copyright" line and a pointer to where the full notice is found.
309
+
310
+ {description}
311
+ Copyright (C) {year} {fullname}
312
+
313
+ This program is free software; you can redistribute it and/or modify
314
+ it under the terms of the GNU General Public License as published by
315
+ the Free Software Foundation; either version 2 of the License, or
316
+ (at your option) any later version.
317
+
318
+ This program is distributed in the hope that it will be useful,
319
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
320
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
321
+ GNU General Public License for more details.
322
+
323
+ You should have received a copy of the GNU General Public License along
324
+ with this program; if not, write to the Free Software Foundation, Inc.,
325
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
326
+
327
+ Also add information on how to contact you by electronic and paper mail.
328
+
329
+ If the program is interactive, make it output a short notice like this
330
+ when it starts in an interactive mode:
331
+
332
+ Gnomovision version 69, Copyright (C) year name of author
333
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
334
+ This is free software, and you are welcome to redistribute it
335
+ under certain conditions; type `show c' for details.
336
+
337
+ The hypothetical commands `show w' and `show c' should show the appropriate
338
+ parts of the General Public License. Of course, the commands you use may
339
+ be called something other than `show w' and `show c'; they could even be
340
+ mouse-clicks or menu items--whatever suits your program.
341
+
342
+ You should also get your employer (if you work as a programmer) or your
343
+ school, if any, to sign a "copyright disclaimer" for the program, if
344
+ necessary. Here is a sample; alter the names:
345
+
346
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
347
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
348
+
349
+ {signature of Ty Coon}, 1 April 1989
350
+ Ty Coon, President of Vice
351
+
352
+ This General Public License does not permit incorporating your program into
353
+ proprietary programs. If your program is a subroutine library, you may
354
+ consider it more useful to permit linking proprietary applications with the
355
+ library. If this is what you want to do, use the GNU Lesser General
356
+ Public License instead of this License.
357
+
README.md CHANGED
@@ -1,2479 +1,2511 @@
1
- === AMP for WP - Accelerated Mobile Pages ===
2
- Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
- Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
- Donate link: https://www.paypal.me/Kaludi/25
5
- Requires at least: 3.0
6
- Tested up to: 5.2
7
- Stable tag: 0.9.97.54
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- AMP for WP is the most recommended AMP plugin by the community. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site.
12
-
13
- == Description ==
14
- AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) functionality to your WordPress site. AMP makes your website faster for Mobile visitors.
15
-
16
- [What's New in this Version?](https://ampforwp.com/new/) | [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) | [View Demo](https://ampforwp.com/demo/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](https://ampforwp.com/help-center/)
17
-
18
- [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
19
-
20
- [youtube https://www.youtube.com/watch?v=QTbkn2rHyqM]
21
-
22
- <strong>Extensions</strong><br>
23
- Some useful extensions to extend AMP features, check [AMP Adsense Support](https://ampforwp.com/advanced-amp-ads/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Contact Form 7 Support](https://ampforwp.com/contact-form-7/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Email Opt-in Support](https://ampforwp.com/opt-in-forms/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) and [Call To Action Support](https://ampforwp.com/call-to-action/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin). To view more, go to our [Extensions page](https://ampforwp.com/extensions/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin).
24
-
25
- <strong>Support</strong><br>
26
- We try our best to provide support on WordPress.org forums. However, We have a special [community support](https://ampforwp.com/help-center/) where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.
27
-
28
- <strong>Bug Reports</strong><br>
29
- Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages). Please note GitHub is _not_ a support forum, and issues that aren't properly qualified as bugs will be closed.
30
-
31
- = Features: =
32
-
33
- * NEW - Gutenberg Support
34
- * NEW - Divi and Elementor Support [More Info](https://ampforwp.com/amp-pagebuilder-compatibility/)
35
- * NEW - Addthis Sharing Support
36
- * NEW - AMP Infinity Scroll Support
37
- * NEW - Revolution Slider plugin Support
38
- * NEW - Photo Gallery by 10Web Support
39
- * NEW - MEWE social network Support
40
- * NEW - GDPR Compliance
41
- * Introducing Page Builder 3.0 for AMP! [Learn More & Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
42
- * New Default Theme for AMP called Swift
43
- * 3 Pre-built AMP Layouts for Business websites and landing pages
44
- * Alexa Metrics Compatibility added
45
- * OneSignal Push Notifications integration
46
- * Advanced WooCommerce Support [More Info](https://ampforwp.com/woocommerce/)
47
- * Gravity Forms Support [More Info](https://ampforwp.com/gravity-forms/)
48
- * AMP Plugins Manager - Which allows you to disable a specific plugin functionality only in the AMP version
49
- * Structured Data Options
50
- * Page Break / NextPage (Pagination) Support
51
- * Contact Form 7 Support [More Info](https://ampforwp.com/contact-form-7/)
52
- * Graviry Form Support [More Info](https://ampforwp.com/gravity-forms/)
53
- * Caldera Form Support [More Info](https://ampforwp.com/caldera-forms-for-amp/)
54
- * Ninja Form Support [More Info](https://ampforwp.com/ninja-forms/)
55
- * Facebook Comments Support
56
- * Github Gist Support
57
- * Email Opt-in Subscription form support in AMP added
58
- * Call to Action boxes and notification bars
59
- * 9 Advertisement sizes - 2 More AD slots added recently
60
- * Comments Forms in AMP.
61
- * Native AMP Search functionality.
62
- * Design 3 [Watch the Video Overview](https://www.youtube.com/watch?v=ub1pwskt3Rc)
63
- * Disqus Comments Support
64
- * Google Tag Manager Support
65
- * Page, Category & Tags Support Added
66
- * Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
67
- * Mobile Redirection - More than 50% of your traffic is from mobile and you aren’t doing anything to improve their user experience, which means you are falling behind on SEO and it can result in lower SERPS. Lightning fast mobile version means faster User experience means more engagement which directly results in the lower bounce rate.
68
- * Custom Post Type Support
69
- * Star Ratings
70
- * Drag & Drop Page builder Added
71
- * 4 Designs for AMP
72
- * Yoast SEO support on AMP pages and other SEO plugins
73
- * AMP WooCommerce Support
74
- * Switch on/off Support for Pages & Posts on AMP
75
- * Translation Panel & RTL
76
- * Internal AMP linking - You can browse AMP pages internally
77
- * Related posts below the post
78
- * Recent Comments list
79
- * Automatically integrate AMP to your website.
80
- * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
81
- * Google Analytics Support.
82
- * User Friendly Theme Options Panel.
83
- * Unlimited Color Scheme.
84
- * Image Logo Upload.
85
- * Supports Posts and Pages and other custom post types.
86
- * Proper rel canonical tags which means that Google know the original page.
87
- * Overlay Navigation Menu bar.
88
- * Social Sharing in the Single.
89
- * Sexy Design.
90
- * Separate WordPress Menu for AMP version.
91
- * Page builder & Shortcodes Compatibility.
92
- * Carousel support for Gallery.
93
- * Better Image stretching and resizing.
94
- * Youtube Video Embed Support.
95
- * Vine Embed Support.
96
- * Twitter oembed Support.
97
- * Instagram Embed Support.
98
- * Facebook Video Embed Support.
99
- * RTL Support
100
- * Custom AMP FrontPage
101
- * Notifications
102
- * Chartbeat, Hi-stats, Yandex Metrika, Piwik, Segment.com, StatCounter, Effective Measure and comScore Support
103
- * Incontent & DoubleClick Support
104
- * Great Support & Active Development.
105
- * Widgets & WooCommerce
106
- * Genesis SEO Support
107
- * Breadcrumb Support added
108
- * Facebook Instant Articles Support Added
109
- * AMP Installation Wizard that makes it easy to setup for new users.
110
- * Category base remover support
111
- * Tag base remover support
112
- * 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber)
113
- * AMP Theme Framework Core Support Added. You can now create AMP templates of your own in just minutes. **[More](https://ampforwp.com/amp-theme-framework/)**
114
- * NEW - Make AMP & Non-AMP Same with just one click!
115
- * NEW - Allows you to use AMP as primary website!
116
-
117
- **[JOIN CHAT GROUP COMMUNITY](https://ampforwp.com/community/)**: Purpose of this group is to get proper suggestions and feedback from plugin users and the community so that we can make the plugin even better.
118
-
119
- = Getting Started: =
120
- **[1. User Documentation:](https://ampforwp.com/help/)** The AMP for WordPress plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.
121
-
122
- **[2. Developer Docs:](https://ampforwp.com/tutorials/article-categories/developer-documentation/)** We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.
123
-
124
- **[3. Support:](https://ampforwp.com/help-center/)** We try our best to provide support on WordPress.org forums. However, We have a special community support where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.
125
-
126
- **[4. Premium Support:](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin)** We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.
127
-
128
-
129
- == Installation ==
130
- **[Visit Help area for the Documentation:](https://ampforwp.com/help/)**
131
-
132
- [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
133
-
134
- **[Visit Help area for the Documentation:](https://ampforwp.com/help/)**
135
-
136
-
137
- == Frequently Asked Questions ==
138
-
139
- = Can I add analytics? =
140
-
141
- Yes, you easily can. In fact, we have support for 12 Analytics companies. Including Google Analytics, Facebook Pixel, StatCounter, QuantCast, Chartbeat, comScore to list a few. Also, we have Google Tag Manager (GTM) support as well.
142
-
143
- = Can I add Ads in my AMP pages? =
144
-
145
- Yes, you can. We have 6 ad placement slots that are built in and strategically placed to get maximum views. Also, we have [an extension](https://ampforwp.com/advanced-amp-ads/) from which you can insert ads between the content, will get more ad slots and also add custom banners to all the available slots.
146
-
147
-
148
- = Can I extend/Change the AMP design, so it suits my needs? =
149
-
150
- Yes, you easily can. We have created this plugin in such a way that it can easily be extended. Check out our [AMP Theme Framework](https://ampforwp.com/tutorials/article/getting-started-amp-framework/)
151
-
152
-
153
- = Do you have any prebuilt designs? =
154
-
155
- Yes, we have AMP themes section where we have free and paid designs available. We also update it regularly. You can check it out our [AMP Themes](https://ampforwp.com/themes)
156
-
157
-
158
- = I'm a developer and I want to add custom functionality for a client, can I do that? =
159
-
160
- Yes, of course. This plugin is very developer friendly, we have lots of hooks and filters that you can use to extend and customize according to the requirements. Also, we have [developer documentation](https://ampforwp.com/tutorials/article-categories/developer-documentation/) which we update regularly.
161
-
162
-
163
- = How do I report bugs and suggest new features? =
164
-
165
- You can report the bugs [here](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages/issues)
166
-
167
- = Will you Add New features to my request? =
168
-
169
- Yes, Absolutely! We would suggest you send your feature request by creating an issue in [Github](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages/issues/new/) . It helps us organize the feedback easily.
170
-
171
-
172
- = How do I get in touch? =
173
-
174
- You can contact us from [here](https://ampforwp.com/contact/)
175
-
176
-
177
- == Screenshots ==
178
- 1. AMP Homepage
179
- 2. AMP Single Post
180
- 3. Post Navigation in Single
181
- 4. Sticky Social sharing icons
182
- 5. Overlay Navigation menu sidebar.
183
- 6. Page builder of the Single article. You can drag and drop any element.
184
- 7. Single post of Design One
185
- 8. GTMetrix Performance Report
186
- 9. Google PageSpeed Insight report for AMP
187
- 10. Homepage of Design One
188
- 11. Pingdom Speed Report for AMP
189
-
190
- Device testing done through [BrowserStack](https://www.browserstack.com)
191
- ![BrowserStack](https://user-images.githubusercontent.com/16618009/53022655-a24ea780-3481-11e9-9a48-a2ca5bcd96d6.png)
192
-
193
- == Changelog ==
194
-
195
- = 0.9.97.54 (23rd May 2019) =
196
- * Fixed: HUGE PERFORMANCE Issues #3052
197
- * Fixed: Performance Issue with queries #2997
198
- * Fixed: Performance Issues with template_redirect hooks #2773 #2920
199
- * Fixed: Performance Issues with Design manager #2873
200
- * Fixed: Performance Issues with ampforwp_exclude_post option #3118
201
- * Fixed: Performance Issues with AMP Pagebuilder modules and settings which were loading By default #2323
202
- * Fixed: Performance Issues with Hide AMP Bulk Tools #2549
203
-
204
- = 0.9.97.53 (20th May 2019) =
205
- * Fixed: 500 errors on posts that don't use WP Bakery #3183
206
- * Fixed: Hyperlink in amp pages including emoji - code improved #2967
207
- * Fixed: Errors in AMP social Icons #3033
208
- * Fixed: Code improved to fetch all Categories and tags in Featured Slider [Design -3] #2590
209
- * Fixed: Fatal error on posts with comments present in latest v0.9.97.52 #3191
210
- * Fixed: "View Desktop Version" feature is not working in mobile view #3192
211
- * Fixed: Improved the Extension array code #3206
212
- * Fixed: Fatal error Uncaught TypeError Argument 1 passed to DOMNode::replaceChild() #3203
213
-
214
- = 0.9.97.52 (15th May 2019) =
215
- * Added: Gutenberg Compatibility integrated #2427
216
- * Added: Gallery Designs for Gutenberg Gallery #2868
217
- * Added: Gutenburg column support in AMP #2847
218
- * Added: Addthis Sharing option UX re-structured #3114
219
- * Added: Photo Gallery plugin compatibility integrated #1811
220
- * Added: Revolution Slider plugin compatibility integrated #1464
221
- * Added: Posts offset option on category module in AMP Page Builder #2647
222
- * Added: MEWE social network integrated #3020
223
- * Added: Font Size and Color options for Dropcap #3010
224
- * Added: Breadcrumbs feature for pages #2788
225
- * Added: More parameters for ampforwp_get_setting functions #2911
226
- * Fixed: Conditions for PageBuilder and Elementor for Page.php in Swift #3097
227
- * Fixed: Code updated of Infinite Scroll when AMP Newspaper Theme is active #3031
228
- * Fixed: Copy the Content in Custom AMP Editor is not working with Gutenberg #2824
229
- * Fixed: If GTM gets enabled after Enabling the Analytics, then both codes load in the frontend #3121
230
- * Fixed: P tag is missing when "copy the content" option is used in custom AMP editor #3122
231
- * Fixed: When AMP is disabled on Homepagepage ?nonamp=1 redirect to random pages(blog) #2904
232
- * Fixed: Issue with post title and "end point to ?amp" conflict #2991
233
- * Fixed: Unspecified Type in Structured data for catgories/tags #3071
234
- * Fixed: PHP Warning date() expects parameter 2 to be long, string given in #2959
235
- * Fixed: Disquss comment is not scrollable in IOS device #2970
236
- * Fixed: Vkontakte Share(social icon) does not open in a new tab #3089
237
- * Fixed: Condition for requiring a file improved #3080
238
- * Fixed: amp_content() used instead of AMP_Post_Template object in Design [ 1,2 and 3 ] #2700
239
- * Fixed: Hyperlink in amp pages including emoji not working #2967
240
- * Fixed: Unused amp js from amp pages removed #3086
241
- * Fixed: "WP Forms for AMP" setting link is incorrect #3060
242
- * Fixed: Navigation & alternate menu css is not loading when directory plus theme is active #2963
243
- * Fixed: link to non-amp under breadcrumbs when Archives support is off. #2885
244
- * Fixed: AddThis is causing validation error after Update - code updated #3068
245
- * Fixed: Content not rendering on AMP with the Enfold theme version 4.5.6 #3124
246
- * Fixed: Tags are also displaying in category selection in the AMP page builder's category module #3082
247
- * Fixed: Author name won´t show if you disable author bio in swift theme #3131
248
- * Fixed: Link to non amp feature not works for thumbnail in design one and two #3004
249
- * Fixed: Multibyte string links aren't working in AMP Version #2556
250
- * Fixed: Leave Comment link Not working with ?amp #3093
251
- * Fixed: When Sticky Header is enabled then Jump link's Title is getting hidden under the header #2915
252
- * Fixed: Facebook comments not displaying if we add number more than 100 in the number of comments #3032
253
- * Fixed: Featured image and link shared on twitter issues #3075
254
- * Fixed: Infinity Scroll Option is not working when ?amp option is enabled in version beta #2475
255
-
256
- = 0.9.97.51.2 (10th May 2019) =
257
- * Fixed: AddThis is causing validation error after Update #3068
258
-
259
- = 0.9.97.51.1 (7th May 2019) =
260
- * Fixed: Can’t use function return value in write context #3155
261
- * Fixed: Search results not showing for "Select Categories to Hide AMP" option inHide Amp Bulk Tool #3154
262
-
263
- = 0.9.97.51 (7th May 2019) =
264
- * Added: Yoast seo breadcrumbs Support #1473
265
- * Added: Compatibility with UseAnyFont Plugin #2774
266
- * Added: Compatibility with Slide Anything plugin. #2891
267
- * Added: Compatibility with Clyp it iframe embed. #2836
268
- * Added: Compatibility with Lazy Load of Smush and Smush Pro plugin #2990
269
- * Fixed: Logo on the top of the menu shade looks strange. #3046
270
- * Fixed: Fatal error: Class 'AMP_Base_Embed_Handler' not found(Due to mediavine plugin) #3119
271
- * Fixed: Chartbeat Tag Has Incorrect Variables #3017
272
- * Fixed: If AMP page builder is enabled then unnecessary CSS is also integrated #2470
273
- * Fixed: Sidebar Improvement and Option for Pages #2499
274
- * Fixed: “Featured Image from The Content” option should not override the default Set featured image. #2503
275
- * Fixed: Widgets going out of alignments in Design 1,2 and 3 #2553
276
- * Fixed: No message if the search didn't find anything. in Swift #2557
277
- * Fixed: Header with CTA doesn't have the right options and defaults #2567
278
- * Fixed: Need to separate categories & tags with ( / or , ) in AMP theme framework single page. #2580
279
- * Fixed: Indentations are getting removed in lists of ul & ol tags. #2781
280
- * Fixed: When the custom front page has a custom pagination then the AMP pagination returns 404 #2843
281
- * Fixed: Text widget img element are overlapping with banner ads (Below the header) in design 3 #2845
282
- * Fixed: Sidebar option is off, do not show widget area in admin panel #2856
283
- * Fixed: Update Schema for author image #2919
284
- * Fixed: Sidebar Styling is not properly appearing in the Blog Page #2938
285
- * Fixed: 404 issue on custom post type pagination #2937
286
- * Fixed: Notice errors in design-1 sidebar menu when amp menu is unchecked. #2953
287
- * Fixed: Bootstrap min overriding modal body style. #2987
288
- * Fixed: Move infinite scroll settings to a correct place #3007
289
- * Fixed: Add Extension list for the events calendar for amp #3030
290
- * Fixed: Add Extension list for table of content #3040
291
- * Fixed: Strip CSS with i-amphtml- name prefix because its causing validation errors #3009
292
- * Fixed: Need to add an option to delete the saved layouts in pagebuilder. #2801
293
- * Fixed: Category module not working with recent posts from Version 0.9.97.45 #3117
294
- * Fixed: Related posts appearing on the top #3151
295
- * Fixed: Debug error in installation process #3134
296
-
297
- = 0.9.97.50.1 (1st May 2019) =
298
- * Fixed: Alignment problem when right sidebar is enable in blog page and there is no featured image in the posts #3057
299
-
300
- = 0.9.97.50 (29th April 2019) =
301
- * Added: New Icon of Telegram in all the Designs #2448
302
- * Added: Swift icon and Font awesome icon option added in Design's global section [Swift theme] #2992
303
- * Added: Category option added in Design's single section [Swift theme] #2551
304
- * Added: Yoast author twitter handle compatibility integrated #2133
305
- * Added: New function ampforwp_get_the_ID() created #2867
306
- * Fixed: Facebook comment and Like option gives an error when the bbPress plugin is enabled #3006
307
- * Fixed: When Gutenberg active left sidebar is not visible in page builder modules #2934
308
- * Fixed: AMP preview functionality showing blank in the preview mode #3029
309
- * Fixed: Image floats CSS improved in mobile mode #2525
310
- * Fixed: Related Posts Randomly in Swift theme #2308
311
- * Fixed: Pricing module content is not center in page builder #2921
312
- * Fixed: Background image of the page builder is zooming in IOS devices when the parallax effect is enabled #2844
313
- * Fixed: Footnotes compatibility code updated #2982
314
- * Fixed: Iframe is not loading when Convert AMP to WP theme (Beta) option is enabled [Swift theme] #2628
315
- * Fixed: PHP Warning Undefined variable #3103
316
-
317
- = 0.9.97.49 (26th April 2019) =
318
- * Added: Addthis Support integrated #2416
319
- * Added: A3 Lazy Load compatibility #2872
320
- * Added: Add support for AMP Linker #2546
321
- * Fixed: Getting validation Error when using the Ivory Search Plugin #2497
322
- * Fixed: Featured images or article images not showing in latest version #3063
323
- * Fixed: Condition improved for author box hook #2608
324
- * Fixed: After Update all AMP Pages Do Not Load and are Not Validated #3062 [ WP Rocket]
325
- * Fixed: PHP notice Undefined variable wp #3085
326
- * Fixed: PHP notice Undefined variable wp_query #2803
327
- * Fixed: Warning message while on WP customizes #3070
328
- * Fixed: Tag meta name 'viewport' appear more than once when Zox news theme is activate #2971
329
- * Fixed: PHP notice errors after activating amp-woocommerce plugin #3054
330
- * Fixed: Fatal error - can't use function return value in write context #3087
331
- * Fixed: AMP Frontpage: The mandatory tag ‘link rel=canonical’ is missing or incorrect with Rank Math #3061
332
- * Fixed: Fatal error - is_amp_endpoint issue #3055
333
-
334
- = 0.9.97.48 (23th April 2019) =
335
- * Added: Meta genertor #2543
336
- * Added: Bridge Qode SEO Compatibility integrated #2538
337
- * Added: Lazy Load of Smush and Smush Pro plugin Compatibility integrated #2990
338
- * Fixed: Validation errors occur when Wordpress Comments Option is enabled #2989
339
- * Fixed: Home page displays latest posts instead of custom page when enfold theme activate #2943
340
- * Fixed: API URL conflict with Mobile redirection #2917
341
- * Fixed: Instant Article fatal error #2968
342
- * Fixed: Undefined index fb-instant-page-id PHP notice #2570
343
- * Fixed: All media queries load in single media query only code updated #2711
344
- * Fixed: Instant Article feed code updated #3018
345
- * Fixed: Space after the "data:image/png" part of the base64 encoded CSS background image #2974
346
- * Fixed: GDPR consent is not working on ios #2876
347
- * Fixed: PHP Errors in latest v0.9.97.46.1 after activation on fresh WP installation #3028
348
- * Fixed: Issue with moblie redirection with non-amp link #3021
349
- * Fixed: Cntr class automatically removed after activating elementor plugin in swift theme #3025
350
- * Fixed: Javascript Console errors after the v0.9.97.47 update #3079
351
-
352
- = 0.9.97.47 (19th April 2019) =
353
- * Added: AMP by Automattic Compatibility integrated #2287
354
- * Added: Click Mag WP Theme compatibility integrated #2796
355
- * Added: New filter in contents-module of page builder for raw html #3001
356
- * Fixed: PHP Warning illegal string offset When AMP layout plugin activate #2951
357
- * Fixed: CSS is getting breaked in GoodLife theme #2673
358
- * Fixed: PHP Debug errors in v0.9.97.46 #3011
359
- * Fixed: Fatal error call to undefined method WPSEO_Options #3008
360
- * Fixed: Proper escaping in Alexa Analytics #2984
361
-
362
- = 0.9.97.46.1 (10th April 2019) =
363
- * Fixed: Theme framework templates loading multiple times #2977
364
-
365
- = 0.9.97.46 (9th April 2019) =
366
- * Added: WP Subtitle compatibility integrated #2831
367
- * Added: New filter in page builder for Enable/disabled check #2998
368
- * Added: Additional Page Builder compatibility added #2643
369
- * Fixed: The tag 'p' is disallowed & auto added as child of tag 'amp-accordion' #2498
370
- * Fixed: Histats Not working #2909
371
- * Fixed: itemprop="image" is being removed from the AMP Pages #2585
372
- * Fixed: CSS pseudo-element not working when minify option is enabled #2907
373
- * Fixed: Directories path code improved, if the plugin is installed outside (/wp-content/plugins) #1531
374
- * Fixed: WP_debug warnings and notices #2958
375
- * Fixed: More than one canonical issue with Rank Math SEO Plugin #2975
376
- * Fixed: Background image or color in the 1st row of page builder is applied to all below row #2994
377
- * Fixed: Rare Distorted image aspect ratio issue with Gutenberg editor #2931
378
- * Fixed: Font family for Content in Single page code improved #2122
379
- * Fixed: Fatal Error due to SEO press plugin #3003
380
- * Fixed: Rare issue with Mobile redirection on Homepage after v0.9.97.32 #2972
381
- * Fixed: PageSpeed Score Improvement for all Designs #2979
382
-
383
- = 0.9.97.45 (4th April 2019) =
384
- * Added: SeoPress compatibility integrated #1589
385
- * Added: WP Appbox compatibility integrated #2791
386
- * Added: Infinite Scroll feature integrated. #2682
387
- * Added: Facebook like button added in Sticky Social Share #2186
388
- * Added: Font family for Content in Single page #2122
389
- * Fixed: Custom post type categories not showing in amp pagebuilder #1993
390
- * Fixed: Duplicate SiteNavigationElement issue #2952
391
- * Fixed: AMP Theme Framework Multisite issue #2936
392
- * Fixed: Custom AMP Editor Content is Not rendering when Elementor is activated #2901
393
- * Fixed: Title issue on Homepage with Yoast if we select custom front page #2962
394
-
395
- = 0.9.97.44.2 (1st April 2019) =
396
- * Added: Element folder files override in the Design One, Design Two and Design Three for the Child theme #2770
397
- * Added: High-resolution Images [Additional image guidelines] option added in structure data #2259
398
- * Fixed: Hide by default option from bulk tools is not working when amp takeover option is enabled #2832
399
- * Fixed: Space removed while checking in the ampforwp_onesignal_notifications_widget function #2569
400
- * Fixed: Display on User Avatar option #2942
401
- * Fixed: Edit page is getting blank when product module is used #2944
402
- * Fixed: YoastSEO post analysis broke & getting Uncaught TypeError: $ is not a function #2948
403
- * Fixed: Yoast meta data are not renderring correct content for custom homepage #2928
404
- * Fixed: Date format in Swift theme homepage/loop #2965
405
- * Fixed: Published Date Disappear When selecting Horizontal Design in Related Post [swift-theme] #2957
406
-
407
- = 0.9.97.44.1 (29th March 2019) =
408
- * Added: Advertisement AMP panel improved #2724
409
- * Fixed: Vuukle AMP integration code updated #2600
410
- * Fixed: Fatal Error with old Plugins manager v1.0 #2976
411
-
412
- = 0.9.97.44 (28th March 2019) =
413
- * Added: Captions feature in AMP page builder #2645
414
- * Added: Compatibility with the Youtube Oembed Plyr plugin #1505
415
- * Added: Caption option for gallery/slider module in pagebuilder #2790
416
- * Added: Like & share feature for every image in instant_articles #2764
417
- * Added: Genesis option in SEO settings #2386
418
- * Added: Improved the 'Setup AMP Feature' and 'Welcome to AMP' tabs & Enhance the Support button on AMP panel #2980
419
- * Fixed: AMP Theme Framework getting conflicted #2782
420
- * Fixed: Unwanted code for call-now component is being used #2652
421
- * Fixed: amphtml tag while AMP Takeover option is enabled #2550
422
- * Fixed: Debug warnings after 0.9.97.15 #2532
423
- * Fixed: 'Header design' section in "Header" tab removed when design-1,2 and 3 is active & minor improvements #2978
424
-
425
- = 0.9.97.43 (12th March 2019) =
426
- * Fixed: Fallback for Redux classes #2377
427
- * Fixed: Search widget CSS for Design-2 #1400
428
- * Fixed: Navigation Menu CSS for Swift theme #2593
429
-
430
- = 0.9.97.42 (11th March 2019) =
431
- * Fixed: Incompatibility with AMP Plugin Manager
432
-
433
- = 0.9.97.41 (11th March 2019) =
434
- * Added: Color picker for Footer Area #2320
435
- * Added: Compatibility with WP User Avatar plugin to show the gravatar #2772
436
- * Fixed: Options Panel not showing, says "You are not allowed to access this page" #2377
437
- * Fixed: faster-image libraries not being able to determine dimensions #2692
438
- * Fixed: Changes in endpoint to ?amp, Re-direct " /amp " to " ?amp " #2480
439
- * Fixed: Font style getting change on Custom Front page #2594
440
- * Fixed: When the user is directed to the AMP version of the page it changes the URL slighltly (swaps out characters) #2913
441
-
442
- = 0.9.97.40 (9th March 2019) =
443
- * Added: Smooth scrolling for anchors links and jumping links within a page #2062
444
- * Added: Option to Enable/Disable Merriweather font in Design-1
445
- * Fixed: External links are getting skipped #2862
446
- * Fixed: Social Share “LINE” does not show up in swift theme #2641
447
- * Fixed: Checkbox from menu listings in AMP theme framework #2618
448
- * Fixed: PHP Warning undefined index fb-instant-page #2610
449
- * Fixed: Instagram Posts not rendering in AMP #2629
450
- * Fixed: Instant articles Image issue #2929
451
- * Fixed: Default height & width values for amp-img when values are not set #2925
452
-
453
-
454
- = 0.9.97.39 (5th March 2019) =
455
- * Added: Compatibility with the Author Simple Box Plugin #2268
456
- * Added: Compatibility when short codes are added in AMP widgets #2552
457
- * Added: Compatibility with the footnotes plugin #2447
458
- * Added: ID Support on the AMP PageBuilder #2474
459
- * Added: embedly oembed support in wordpress #1160
460
- * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515
461
- * Fixed: Debug Errors #2627
462
- * Fixed: Custom Front page is breaking in 0.9.97.16 #2589
463
- * Fixed: Date Archive not working with Swift Design #2514
464
- * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727
465
- * Fixed: Issue with pagebuilder when yoast plugin is active. #2933
466
-
467
- = 0.9.97.38 (28th February 2019) =
468
- * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
469
- * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
470
- * Fixed: Issue with Post Pagination ( Single ) #2624
471
- * Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681
472
- * Fixed: Full excerpt length in single posts [swift] #2712
473
- * Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
474
-
475
- = 0.9.97.37 (23th February 2019) =
476
- * Added: Static page template in AMP #2614 + #2900
477
- * Fixed: Font size and other values are properly sanitizing #2898
478
- * Fixed: Failed to parse script tag contents #2884
479
- * Fixed: PHP Notices after the v0.9.97.32 #2879
480
- * Fixed: oembed wordpress post renders as a full post in AMP #2003
481
- * Fixed: Gallery/Slider of AMP pagebuilder not working
482
- * Fixed: class are repeating number of times when image (icon) added in .svg format #2893
483
- * Fixed: Debug warnings with WPML #2899
484
- * Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
485
-
486
- = 0.9.97.36 (19th February 2019) =
487
- * Added: Mobile and tablets Detects separately for 'Mobile Redirection' option #2436
488
- * Added: Scrolling bar for swift theme in chrome browser #2593
489
- * Added: CSS condition when element markup is visible #2753
490
- * Fixed: Pre tags not rendering properly on pages #2823
491
- * Fixed: Logo resize should only apply when Resize setting is enable #2544
492
- * Fixed: When /?amp is enabled "Visit AMP" is redirecting to dashboard #2363
493
- * Fixed: ampforwp_wc_shortcode_title is loading globally #2756
494
- * Fixed: Extra CSS is causing validation error of 50kb #2592
495
- * Fixed: PHP warning issue in latest version of php #2895
496
- * Fixed: Yoast analysis is giving false readings for the SEO When AMPforWP Pagebuilder is enabled #2435
497
-
498
- = 0.9.97.35 (16th February 2019) =
499
- * Added: Levelup Compatability #2718
500
- * Added: "Align Justify" Option in Page builder's text module #2665
501
- * Added: Default value for Swift Color Scheme #2793
502
- * Fixed: ampforwp prefix in the analytics function #2886 #2890
503
- * Fixed: "Below the Footer" ads option showing above and below the footer #2778
504
- * Fixed: Debug error undefined index comments #2887
505
-
506
- = 0.9.97.34 (14th February 2019) =
507
- * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
508
-
509
- = 0.9.97.33 (13th February 2019) =
510
- * Fixed: Style sanitizer code updated #2387
511
- * Fixed: UTM Parameters when Mobile Redirection is enabled #2854
512
- * Fixed: ?nonamp=1 is not working properly #1947 & #2537
513
- * Fixed: All media queries load in single media query only #2711
514
- * Fixed: 'Hide AMP option' is not working when AMP take over is enabled #2880
515
- * Fixed: Swift Hover Color Changes #2751
516
- * Fixed: Google Font is not getting saved #2839
517
- * Fixed: Sidebar CSS condition code fixed #2757
518
- * Fixed: Performance improvement for ampforwp_stylesheet_file_insertion #2873
519
-
520
- = 0.9.97.32 (8th February 2019) =
521
- * Added: Rank Math SEO compatibility integrated #2701 & #2736
522
- * Added: New filter "ampforwp_modify_thumb_url_array" to modify the thumbnail #2739
523
- * Fixed: 'Call Button Color' option not working - code updated #2820
524
- * Fixed: Validation error when uploading YouTube video in Comments #2827
525
- * Fixed: When Mobile Redirection option is enabled then, fr (language symbol) is removed from the URL. #2721
526
- * Fixed: Category Module from Page Builder not displaying #2870
527
- * Fixed: The homepage displays the title of the first post in All in one SEO #2865
528
- * Fixed: Title mismatch in some posts with Yoast #2871
529
-
530
-
531
- = 0.9.97.31 (4th February 2019) =
532
- * Added: Subtitles plugin Compatibility #2853
533
- * Added: Created an option for Id's for all the modules and column in AMP Page builder #2730
534
- * Fixed: All the Images are Adding AMP at the End of their URL #2391
535
- * Fixed: When nextpage pagination is added, URL in is rendering /2?amp=1 #2767 #2766
536
- * Fixed: Comments Issues #2755
537
- * Fixed: The gutenberg button doesn't work in amp #2707
538
- * Fixed: Button Module color is not getting changed #2745
539
- * Fixed: Issue with amp menu converting & ASCII code to X #2855
540
- * Fixed: 'Call Button Color' option not working #2820
541
- * Fixed: Error: The attribute 'alt' may not appear in tag 'a' #2837
542
- * Fixed: Captions are not working in Gallery #2576
543
-
544
- = 0.9.97.30 (2nd February 2019) =
545
- * Fixed: Wrong title on the archive pages #2864
546
- * Fixed: data-loading-strategy attribute is double quoted #2863
547
-
548
- = 0.9.97.29 (31st January 2019) =
549
- * Fixed: Validation error due to Search Widget #2858
550
- * Fixed: Issue after upgrading analytics code #2859
551
- * Fixed: amp-animation error in amp theme framework and tech blogging amp theme #2819
552
- * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast - code updated #2816
553
- * Fixed: Search Console Crawl Errors ?nonamp=1/ is listed in Access denied #2760
554
-
555
- = 0.9.97.28 (29th January 2019) =
556
- * Added: Lightbox feature for Carousel #2731
557
- * Added: Specific filters to modify the analytics code #2653
558
- * Fixed: Homepage Blog CSS is loading on the custom frontpage in swift theme #2754
559
- * Fixed: Reset all & Reset section issue for redux framework #2722
560
- * Fixed: Transable redux fields for other plugins like wpml #2737
561
- * Fixed: Proper condition for Ads css #2758
562
- * Fixed: Jetpack stats pixel inserted twice since Jetpack v6.9 #2812
563
- * Fixed: AMP pagebuilder full width for posts #2765
564
- * Fixed: Undefined “non-content” in blacklist-sanitizer #2842
565
- * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast #2816
566
-
567
- = 0.9.97.27 (23rd January 2019) =
568
- * Added: ampforwp_is_amp_endpoint_takeover filter added
569
- * Fixed: The attribute 'action' may not appear in tag 'FORM [method=POST]' #2835
570
- * Fixed: Image size smaller than recommended size Warning in Search console #2838
571
-
572
- = 0.9.97.26 (21st January 2019) =
573
- * Added: Improve the Extension array code #2822
574
- * Fixed: WP_Widget_Text conflict after v0.9.97.24 #2821
575
-
576
- = 0.9.97.25 (17th January 2019) =
577
- * Added: Help message for background video of column setting of Page Builder #2716
578
- * Added: Review option in plugins page #2715
579
- * Added: Excerpt length option in Category module of Page Builder #2733
580
- * Added: Font Performance with font-display #2743
581
- * Added: Custom template for front-page & home-page #2714
582
- * Fixed: AMP Footer sidebar is not working in master #2800
583
- * Fixed: <i> tag not working in Title #2804
584
- * Fixed: alt attribute of <img> tag is not working when the image is inside the <a> tag #2617
585
- * Fixed: Remove the unnecessary code for '404 error' text in amp translation panel #2738
586
- * Fixed: Subtitle issue using with Jannah theme #2732
587
- * Fixed: Proper names given for AMP Widgets #2797
588
- * Fixed: Notice: Undefined index: hide-amp-tags-bulk-option2 and Undefined variable: inline_related_posts in features.php on line 4698 & 5546 #2795
589
- * Fixed: Quality of 'featured image slider' in Design3 #2779
590
- * Fixed: Embed Twits with twitter links #2798
591
- * Fixed: /amp in the telephone link when 'Change Internal Links to AMP' option enabled #2742
592
- * Fixed: Position of social sharing buttons 'above content' on pages #2809
593
- * Fixed: lang attribute in HTML tag #2808
594
- * Fixed: In footer, 'View non-AMP pages' is repeated twice when 'back to top link' option is enabled #2807
595
-
596
- = 0.9.97.24 (9th January 2019) =
597
- * Added: Compatibility with new and all default WP widgets #1400
598
- * Fixed: Performance issue #2762
599
- * Fixed: Need to add amp endpoint filter #2761
600
- * Fixed: When Hide AMP Option is enabled in PageEditor with Convert AMP to WP theme (Beta) enabled it's providing output as AMP Page #2735
601
- * Fixed: Whenever an image inserted, has width="100%" and height="100%", its giving Validation error. #2748
602
- * Fixed: Custom post type is showing a blank page in the swift theme #2512
603
- * Fixed: Whenever Responsive AD is enabled then the AD should load on the screen without any effect to the normal mode AD in D1,2,3, and Swift #2531
604
- * Fixed: When Convert AMP to WP theme (Beta) is enabled GDPR popup isn't closing #2763
605
- * Fixed: If twitter embed code is added then other blockquotes tag are not working #2750
606
- * Fixed: Custom post type is showing a blank page in the swift theme #2512
607
- * Fixed: Conflict with the Schema and Structure data plugin #2777
608
- * Fixed: In the swift theme the Sticky social icons overlaps #2601
609
- * Fixed: " Top " Button functionality to be improved. #2529
610
- * Fixed: Drop down icon appearing twice #2785
611
- * Fixed: Custom front page Meta description and content are not rendering for ALL in SEO plugin. #2702
612
- * Fixed: Hover color is not appearing properly #2787
613
-
614
- = 0.9.97.23 (18th December 2018) =
615
- * Fixed: Sub menu items and arrows are not functioning in publisher theme. #2672
616
- * Fixed: Fatal error when Polylang(Core) is activated. #2657
617
- * Fixed: Improve coding in amp-page-builder.php #2725
618
- * Fixed: Escaping not done properly #2723
619
- * Fixed: Serialization problem with AMP settings data. #2717
620
- * Fixed: Whenever Convert AMP to WP theme (Beta) option is enabled Logo Image is being stretched. #2726
621
-
622
- = 0.9.97.22 (6th December 2018) =
623
- * Added: Total Plus theme compatibility #2511
624
- * Added: Allow SVG format Logo in AMP #2431
625
- * Fixed: Vuukle AMP integration #2600
626
- * Fixed: "Change Internal Links to AMP" not working properly for anchor tags (internal links) #2562
627
- * Fixed: Secondary menu color is not outputting the value in latest update #2680
628
- * Fixed: The instagram embed code is not working in facebook instant article in the AMP. #2523
629
- * Fixed: FTP Link being generated in Non-AMP but not in AMP #2477
630
- * Fixed: Videos aren't rendering whenever Convert AMP to WP theme (Beta) is enabled #2501
631
- * Fixed: More debug errors #2513
632
- * Fixed: Comments closed not looking good in Swift theme #2542
633
- * Fixed: Excerpt Option is not Working. #2509
634
- * Fixed: Image of Design 3 and Swift are same in Installation wizard #2540
635
- * Fixed: AMP renders with ?q after the /amp #2361
636
- * Fixed: Tables overflow in swift theme when adding the tables to the site [TEST + ALT solution] #2392
637
- * Fixed: Unable Access the Wp-admin page when Amp takeover option is Enabled. #2476
638
- * Fixed: Latest post title is displaying in the AMP homepage instead of site title #2419
639
- * Fixed: AMP menu is not working when Jetpack Mobile theme option is enabled #2584
640
- * Fixed: Link to Non-AMP page in Footer points to 404 #2586
641
- * Fixed: Debug warnings in error logs #2367
642
- * Fixed: The AMP for WP plugin(Version 0.9.97.20) bug are notice-error :undefine index and Unused code. #2687
643
- * Fixed: Improvements in AMP page builder code #2471
644
- * Fixed: Table class is getting removed in AMP pages. #2699
645
- * Fixed: Pagination is not working when AMP Takeover is enabled #2686
646
- * Fixed: The featured slider is not displaying properly images using the Firefox browser with the design 3 theme. #2677
647
- * Fixed: Icons for AMP Stories and Shortcode Ultimate #2598
648
- * Fixed: Images are stretched whenever Convert AMP to WP theme (Beta) Option is enabled. #2694
649
- * Fixed: Vertical words in table on mobile #2606
650
- * Fixed: PageBulider getting following notices in old module #2305
651
- * Fixed: Export option of page builder is not working in latest version #2709
652
- * Fixed: Remove the span tag in all 404.php files of the 4 designs #2704
653
- * Fixed: Wrong escaping done for default value for Google Analytics #2697
654
- * Fixed: Re-modification of single settings option panel when newspaper theme activated #2706
655
-
656
- = 0.9.97.21 (21st November 2018) =
657
- * Fixed: Sanitation of user contents before save #2679
658
- * Fixed: Menu is Not working in Minimal Blogging theme (0.9.97.20) #2667
659
- * Fixed: Author bio not showing proper link #2674
660
- * Fixed: HTML not being rendered on cookie consent notifications #2671
661
- * Fixed: Telephone link not working
662
-
663
- = 0.9.97.20 (29th October 2018) =
664
- * Fixed: Plugin Vulnerability #2650
665
-
666
- = 0.9.97.19 (4th October 2018) =
667
- * Fixed: Tables overflow not working in swift theme #2392
668
- * Fixed: Null check added to fix null reference exception #2526
669
- * Fixed: Minor Bug related with menu #2612
670
-
671
- = 0.9.97.18 (29th September 2018) =
672
- * Fixed: Minor Bug related with menu
673
-
674
- = 0.9.97.17 (28th September 2018) =
675
- * Added: Featured Slider "Tag" support #954
676
- * Added: Marfeel plugin is blocking Internal pages of AMP and rendering 503 error #2423
677
- * Fixed: Dropdown Menu arrows not working properly in Swift #2148
678
- * Fixed: Wrong implementation of load_plugin_textdomain function #2408
679
- * Fixed: Page Float to right and showing menu content when page scroll horizontally in iPhone device #2434
680
- * Fixed: Internal Link Option is not Working in beta #2443
681
- * Fixed: Missing conditional tag for get_the_tags() causing "Invalid argument supplied for foreach()" error #2456
682
- * Fixed: Need to make a space in meta information and published date is not getting translated #2411
683
- * Fixed: Meta og:title and description tag are Not completely Reflecting #2454
684
- * Fixed: Images are not aligned center when published with Gutenberg Editor #2462
685
- * Fixed: Anchor Tag is not working because there is a space in between link #2465
686
- * Fixed: Fix social shares icons #2467
687
- * Fixed: Debug errors in beta #2472
688
- * Fixed: homepage is getting blank when "Convert To WP" is enable only for posts #2493
689
- * Fixed: wrong amphtml URL generating for WPML #2573
690
-
691
- = 0.9.97.16 (19th September 2018) =
692
- * Added: 3 Types of Gallery designs #1968
693
- * Added: New Section to show 'change log' on Welcome Page #1753
694
- * Added: Allow HTML in footer section of translation panel in design 3 #1950
695
- * Added: Need to make the compatibility with The Voux theme #2263
696
- * Fixed: Special character "|" breaking the url in the twitter share #2264
697
- * Added: Read more button for post on blog page #2273
698
- * Fixed: Category Labels are Clickable on Swift Homepage even Archive support is off #2279
699
- * Fixed: Above Loop and Below Loop Sidebar Widget area is not connected with Swift theme #2280
700
- * Fixed: Aq_Resize.process() errors for images hosted on CDN #2285
701
- * Fixed: Convert to WP Option is displayed in Swift Theme, but not in Design 3. #2291
702
- * Fixed: Need to have only one text-domain in the string of the plugin #2292
703
- * Fixed: Bug in Facebook comments. #2300
704
- * Added: Beta Testing link in the Options panel #2302
705
- * Added: "X" button in the menu of D3 #2294
706
- * Fixed: AMP Take over is applying even on product when this option is enabled only for posts. #2304
707
- * Fixed: The Option Facebook App ID not necessary in the social icons of AMP panel when using Swift #2384
708
- * Fixed: Embeds not working in Archive Description #2402
709
- * Fixed: Spurious spaces in Footers #2521
710
- * Fixed: Additional spaces Pagination div on article posts #2522
711
-
712
- = 0.9.97.15 (13th September 2018) =
713
- * Fixed: Pagination is not working on date archive #2289
714
- * Added: Options to show Social Icons in different places in Swift #1722
715
- * Fixed: Localization string for "% days ago" not working for non-Latin languages #1491
716
- * Added: Social Share by Supsystic Compatibility #1509
717
- * Fixed: Duplicate h1 tags in Design One #1522
718
- * Added: 3 Appearance option for Related Posts in Swift theme #1545
719
- * Fixed: RTL not working with Footer properly #1655
720
- * Fixed: Proper implementation of the property of all in one SEO pro to avoid fatal error #2500
721
- * Fixed: Notice: Undefined index: extension in thirdparty-compatibility.php on line 401 - 406 #2496
722
- * Fixed: Wrong url in Non-Amp Version link on blog posts page and category archives #2424
723
- * Fixed: The Consent.php path is getting index in Webmaster tool #2518
724
- * Added: Option to add custom things in Instant Articles #1089
725
- * Added: Show/hide Instant Article on specific posts #1297
726
- * Added: Facebook Instant Articles (FBIA) Crawler Ingestion (ia:markup_url) tag #1474
727
- * Added: Facebook Instant Articles Meta Tag #1486
728
- * Added: Related posts for instant articles #1634
729
- * Added: Option to remove Author info from Instant Articles #1483
730
- * Added: Facebook Instant Articles in each Catagory #1524
731
- * Added: Custom Facebook Instant Articles Ad option #1475
732
- * Fixed: Pagination not working after changing the pagination base #1485
733
- * Added: Breadcrumb with tag #1305
734
- * Fixed: Enabled WordPress Comments by default #1501
735
-
736
- = 0.9.97.14 (4th September 2018) =
737
- * Added: Adobe Analytics Support #887
738
- * Fixed: Same Icons loading for some extensions #2172
739
- * Fixed: Removed extra spacing from "Back to top" text #2349
740
- * Fixed: Retina featured images support for Homepage and archive loop images #2334
741
- * Fixed: When WooCommerce Product Slider is Installed, the Picture of Icons are not loading #2325
742
- * Added: Customizr Theme Lazy Loading compatibility #2322
743
- * Fixed: "Save Module" button of AMP page Builder not displaying in OSX and in Safari #1943
744
- * Fixed: Sort Related Posts Randomly Not Working in Swift theme #2308
745
- * Added: Need to create a tutorial of How to Enter your Audience Network Placement ID of advertisement in the Instant Article #1723
746
- * Fixed: Retina Images option Improvement-II #2296
747
- * Fixed: Disable the look or check of redux framework #2293
748
- * Fixed: With Redux core plugin, AMP option panel design not loading #2258
749
- * Fixed: Issues with pagination #2253
750
- * Added: Thrive Architect Compatible #1575
751
- * Fixed: Notice Undefined variable categories_array #2486
752
- * Fixed: Need to add upscale parameter in-line related posts #2488
753
- * Fixed: Getting the warnings in error log due to global variable, not present #2395
754
- * Fixed: Google Analytic issue while setting up Run Installation wizard #2491
755
- * Added: Read more button AKA Content Sneak Peek feature for post #2246
756
- * Added: Showing related items/post in after nth paragraph #2246
757
-
758
- = 0.9.97.13 (28th August 2018) =
759
- * Fixed: Fatal error in `ampforwp_related_post_loop_query()`
760
-
761
- = 0.9.97.12 (27th August 2018) =
762
- * Fixed: Quote runs only in block post not on pages #2399
763
- * Added: Create a Sidebar option that can be used as global Sidebar #2388
764
- * Fixed: words are breaking and not readable #2441
765
- * Fixed: Text is breaking into next line while there is no space between the text in custom AMP Editor #2270
766
- * Fixed: IP Anonymization #2421
767
- * Added: Setka Editor Compatibility #2468
768
- * Fixed: In swift theme, when user ads the ad Above the Related Posts (Single Post); the content doesn't display #2311 and #2318
769
- * Added: Toggle controls are now accessible #1691
770
- * Added: Global Sidebar is now Connected with AMP Pagebuilder #2371
771
- * Fixed: #amp-user-notification1 Styling was loading even when disabled from option panel in swift #2400
772
- * Fixed: Remove the empty `@media{}` css generated by Pagebuilder #2473
773
- * Fixed: Blank Lines in HTML Source code #2445
774
- * Fixed: Optimize AMP pages on Google Lighthouse #2082
775
- * Fixed: RSS Feed is not working when AMP Takeover is enabled #2309
776
-
777
- = 0.9.97.11 (21th August 2018) =
778
- * Minor Update
779
-
780
- = 0.9.97.10 (18th August 2018) =
781
- * Fixed: Homepage build with AMP PageBuilder is displaying only when the checkbox of the Custom AMP editor is enabled #2350
782
- * Added: Created a new function to get the settings instead of calling it directly from global $redux_builder_amp everytime. `ampforwp_get_setting` created #2177
783
- * Fixed: Comments and share not loading on pages only in swift #2401
784
- * Fixed: Back to Top link not working in Swift Design #2404
785
- * Added: Ads Below the Author Area in Swift theme #2455
786
- * Fixed: AMP should remove spaces from GTM ID automatically #2413
787
- * Fixed: Some Posts are not displaying in Blog page even when AMP is enabled from Post settings #2375
788
- * Fixed: Wrong AMPHTML when using static page as blog using custom-code/pagebuilder from reading settings #2396
789
- * Added: Add paginations meta tags #2343
790
- * Fixed: Updated the code of AMP renders with ?q after the /amp #2361
791
- * Added: Add support for Relevanssi search #2307
792
- * Added: Show index/noindex label when enabling the options in SEO Settings #2290
793
- * Added: Add AMP consent in AMP Theme Framework #2440
794
- * Added: Created a component called `AMP-geo` so anyone can use it in thier AMP theme #2440
795
-
796
- = 0.9.97.9 (1st August 2018) =
797
- * Minor Improvements
798
-
799
- = 0.9.97.8 (24th July 2018) =
800
- * Fixed: AMP renders with ?q after the /amp #2361
801
- * Fixed: iThemes Sync can not connect to the site. #2380
802
- * Fixed: H1 to H6 styling is not reflecting in the Swift theme #2383
803
- * Fixed: Underline on Links function is not working. #2372
804
- * Fixed: WordPress Admin Color Scheme not applying #2390
805
- * Fixed: Breadcrumbs are not disabling when the sidebar template is selected #2376
806
- * Fixed: All the Images are Adding AMP at the End of their URL. #2391
807
-
808
- = 0.9.97.7 (18th July 2018) =
809
- * Fixed: PageBuilder not loading on frontpage #2360
810
- * Fixed: 500 error on somepages due to open wp_query by other plugins
811
- * Fixed: License key reupdating #2261
812
- * Fixed: AMP renders with ?q after the /amp #2361
813
-
814
- = 0.9.97.6 (14th July 2018) =
815
- * Fixed: Error and Warning on Structured Data for Logo. #2360
816
- * Fixed: Category Bulk tool breaking meta boxes #2335
817
-
818
- = 0.9.97.5 (11th July 2018) =
819
- * Fixed: Title disappearing in Design 1,2,3 when legacy pagebuilder is enabled #2341
820
- * Fixed: ld+json getting a broken when special characters are added in the image. #2346
821
- * Fixed: Hide by Category Breaking post metabox #2330
822
- * Fixed: Hiding excerpt when global $redux_builder_amp is empty #2330
823
- * Fixed: When Google Tag Manager is enabled, only Google Analytics should get disabled but not other analytics. #2340
824
-
825
- = 0.9.97.4 (09th July 2018) =
826
- * Fixed: Huge Performance upgrade in the way fetching the logo url #2317
827
- * Fixed: Fatal Error due to unable to modify values in Structured Data Object #2327
828
- * Fixed: Seperate option for Featured Image in pages in Swift theme #2328
829
- * Fixed: `<p>` tags disabling where not wanted #2330
830
- * Fixed: Fatal error in contact form module while ninja form or gravity form plugins are not activated #2310
831
- * Fixed: Woo Commerce Category page not working properly #2333
832
- * Fixed: Few issues related to amp-facebook-comments #2300
833
- * Fixed: Limit number of Tags and Category to 500 in Hide AMP-Bulk tools #2336
834
-
835
- = 0.9.97 (27th June 2018) =
836
- * For more details check out [the blog post](https://ampforwp.com/0-9-97-released-strengthening-of-foundation-89th-update/)
837
- * Fixed: Extraposition attribute left in CSS Design #2 #2119
838
- * Fixed: Non-AMP header link not working #2109
839
- * Added: Create an Ad Above the Post Content #2155
840
- * Fixed: "AGO" text was not translatable #2158
841
- * Added: Filter created `ampforwp_header_url` to modify logo url #2141
842
- * Fixed: Removing the text "amp" in footer view non-amp-link #2158
843
- * Added: Compatibility WP user Avatar plugin added #2011
844
- * Fixed: Design 2 - meta info producing a block of empty HTML #1969 #1954
845
- * Added: Pocket and Hatena Bookmark social share buttons Added #1652
846
- * Fixed: External Links are appended with "amp" at the end of the url in content. #2174
847
- * Fixed: Some Issues Found in Design #3 #2130
848
- * Fixed: ScoopVersion: 1.4 By boostdevelopers theme displaying the error only in the category #1683
849
- * Fixed: Page featured Image is not displaying in the Swift theme #2136
850
- * Fixed: Dropcap breaking the youtube embed code #2157
851
- * Fixed: Bulk hide by default option is requires Permalinks to be saved #2145
852
- * Fixed: Fully compatibility with muffin page builder #2180
853
- * Fixed: Incontent Related Post Issues #2078
854
- * Fixed: Search page should not have AMP version of the page and not in search result #2191
855
- * Added: Control added to modify Retina Images resolutions #2099
856
- * Added: Created an option to duplicate a page builder element #1986
857
- * Added: Image Caption is not displaying below the Image in design 1,2,3 #2101
858
- * Fixed: Post pagination not working properly in D1, D2 and D3 #2168 #2243
859
- * Fixed: Auto re-save permalink if the options in reading setting page get changed #2190
860
- * Fixed: Leave a comment not looking good in Swift theme #2150
861
- * Added: Social icons for pages. #2162
862
- * Added: Create an option to pull canonical from Yoast #2118
863
- * Added: Full Support for All in one SEO #1720
864
- * Fixed: Single with sidebar CSS should only load if that layout type is selected #2091
865
- * Fixed: Required Filed is not working in the Repeater in Page builder #2217
866
- * Fixed: alt in `<div>` causing validation errors. #2093
867
- * Added: Drop Down Menu Support in Swift Header Menu #2095
868
- * Added: Parallax Setting Added in PageBuilder #2095
869
- * Added: Multiple Layout Settings added in Feature Module in Page Builder #2095
870
- * Added: Add the option changing the sliding speed of slider in "Slider module" of AMP Page Builder #2218
871
- * Added: Created an option Related Post link in non amp #2201
872
- * Fixed: Removed Jannah LazyLoad on AMP Mode #2224
873
- * Fixed: Custom post types with custom taxonomy not working in AMP #2209
874
- * Fixed: frontpage and homepage not working properly AMP take over #2153 #2277
875
- * Added: Button field created in Feature module #2068
876
- * Added: Excerpt should also work on homepage and categories page #2176
877
- * Fixed: Options panel breaks in when RTL in WP Dashboard #2176
878
- * Fixed: Featured image from Custom fields in page builder Category module #2237
879
- * Added: Forms Module Support added in PageBuilder #2221
880
- * Fixed: Paginated AMP URL on the category are opening to 404-page #2233
881
- * Fixed: Ads not displaying properly in RTL #2227 #2138
882
- * Fixed: single quotation (') in text module breaking AMP page builder #1940
883
- * Added: Filter created to modify `ampforwp_loop_image_update` image arguments in components of AMP theme framework #2057
884
- * Added: Option to change the locale of Facebook comments #2127
885
- * Added: Search option in options panel #2088
886
- * Fixed: Accordion not working when the user enters some data in Description with HTML Tags #2088 #2097
887
- * Fixed: Internal links now working with ?amp=1 #2204
888
- * Fixed: UTM Parameters not working properly with AMP #2223
889
- * Fixed: Multiple Slider module of AMP Page builder not working #2090
890
- * Fixed: Hide AMP by categories option should hide by default in the backend of that specific post #2112
891
- * Added: IP Anonymization in Google analytics #2135
892
- * Fixed: Improvement in the styling of AMP option panel #2102
893
- * Added: Added new fonts control for Content in Single page #2122
894
- * Fixed: Legacy page builder button styling is not loading properly #2036
895
- * Added: Filter added so we can disable Comments on specific pages `ampforwp_comments_visibility` #2170
896
- * Fixed: Improvement in Excerpt on small screen option #2034
897
- * Added: Comments on Pages #2229
898
- * Fixed: Pagination not working for some websites #2241
899
- * Fixed: "Menu" option in Footer connected with Swift #2146
900
- * Added: Wistia Support #1875
901
- * Added: Add option in page builder to give the specific name to all modules #2251
902
- * Added: Compatibility with Muffin Builder #2137
903
- * Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
904
- * Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
905
- * Added: Render all the AMP Components added in Post Editor #2216 #2228
906
- * Fixed: "Gap" Module of ThemeCo breaking the AMP pages #2220
907
- * Added: Search widget compatibility #2143
908
- * Added: Advertisement Module created in AMP Pagebuilder #2131
909
- * Fixed: Performance issue with the function `ampforwp_get_comments_gravatar` #2234
910
- * Fixed: Empty the amp pages, when the Clearfy HTML compress is enabled #2110
911
- * Fixed: The attribute 'value' appearing in tag 'a' throwing the validation error #2262
912
- * Fixed: Versioning of Styles and Scripts of redux-core #2126
913
- * Added: Related Posts based on X days #2132
914
- * Fixed: Warning in custom-sanitizer.php #2173
915
- * Added: vuukle comment support #2075
916
- * Fixed: Facebook Comment should not appear on the Checkout page, Add to cart page, or shop page #2170
917
- * Added: SpotIM comment support #2075
918
- * Added: Additional Controls added in Design3 Featured slider #2222
919
- * Fixed: Username in AMP Option panel color was too light #2266
920
- * Added: Settings created to modify H1 to H6 #2059
921
- * Fixed: AMP_QUERY_VAR debug issue #2265
922
- * Added: Custom page template in AMP #1923
923
- * Fixed: Comments Button is not displaying in Design #3 #2163
924
- * Added: Ability to add Forms Shortcodes in footer Widgets #2226
925
- * Added: Option to add rel="nofollow" in AMP page builder button module #2239
926
- * Added: Background video option in amp page builder #2195
927
- * Fixed: Drop Down Menu Support in Swift Header Menu #2095
928
- * Fixed: Yoast Description not getting added in AMP #2159
929
- * Fixed: Improvement in styling of AMP option panel #2102
930
- * Fixed: Hide AMP Bulk Tools Improvements #1867
931
- * Added: Compatibility with the Relevanssi Plugin #1503
932
-
933
- = 0.9.96 (2nd June 2018) =
934
- * Added: Fully GDPR Compliance
935
- * Fixed: GTM not working
936
-
937
- = 0.9.86.1 (8th May 2018) =
938
- * A bug causing validation issues has been resolved.
939
-
940
- = 0.9.86 (3rd May 2018) =
941
- * For more detials check out [this blog post](https://ampforwp.com/0-9-86-released-getting-ready-for-future-87th-update/)
942
- * Added: GDPR Compliancy #2040
943
- * Added: Muffin Page Builder Compatibility #1455 #1893
944
- * Added: Thrive leads compatibility #2067
945
- * Fixed: Load structured markup json in Footer to improve performance #1945
946
- * Added: Font Size and Font Family Controls added in Content Presentation Module #1962
947
- * Added: Font Weight Control added in Text Module in PageBuilder #1962
948
- * Added: Other necessary controls added in Content Presentation Module #1962
949
- * Added: New Design called "Design 4" added in Content Presentation Module. #1962
950
- * Fixed: License Activation process connected with AMP extensions #1981
951
- * Added: Icon Selector control added in Button module in AMP Page Builder #1962
952
- * Added: Filter called `ampforwp_get_comments_gravatar` to modify Author Avatar Images #1949
953
- * Fixed: Validation error fixed by removing json+ld values to remove CDATA #1977
954
- * Added: Icon Adjustment Option is added in the Button Module #1962
955
- * Fixed: Debug Warnings fixed #1976
956
- * Fixed: If AMP support on post and page is disabled then mobile redirection was not working #1979
957
- * Fixed: Responsive element added in Image Module #1962
958
- * Fixed: Custom Post and Custom Taxonomies Archives not working in AMP #1957
959
- * Fixed: AMP take over is on and AMP support on the home page is disabled it was redirecting to some other pages #1994
960
- * Fixed: Design 1 and Design 2 shouldn't show 'social' tab #1996
961
- * Added: AMP WordPress Theme notice
962
- * Added: Rewrite Rules Added for WooCommerece #1957
963
- * Fixed: AMP Takeover blog search results giving blank page #1990
964
- * Fixed: Swift pagination markup is present even the page has no pagination #2000
965
- * Fixed: Pagination breaking on second page on Archives when Blog page is not set #1998
966
- * Fixed: Added proper Google API jump link #1966
967
- * Fixed: Advance Index and no-index controls did not had description #1978
968
- * Added: Filter added `amp_blacklisted_tags` in blacklist-sanitizer file
969
- * Added: Hyperlink for image module added #1989
970
- * Added: `ampforwp_get_frontpage_id` a common fucntion created to get post id for AMP frontpage #2025
971
- * Fixed: Comments controls were not working properly #1987
972
- * Fixed: Fatal Error after updating the plugin from 0.9.73 to 0.9.83 version #2017
973
- * Fixed: Filter created `ampforwp_modify_rel_url` to modify rel canonical URL #2012
974
- * Fixed: Remove structured data json if removed from AMP options panel
975
- * Fixed: amp widget appearing twice in design one #2008
976
- * Fixed: Gif in content + Lightbox feature throws validation issue. #2032
977
- * Added: New Features in the Page builder Modules #2029
978
- * Fixed: License Key was not working properly #2026
979
- * Fixed: Instagram comment view is getting cut off in Swift Theme #2002
980
- * Added: Icon module support added in Desgin 1, 2 & 3 #1997
981
- * Fixed: if GD or ImageMagick library is not present in the server then send the original image #2037 #2038
982
- * Fixed: Swift theme homepage (Non-AMP) image resizing issues in Mobile version #1992
983
- * Fixed: Header Element not working in Swift theme #1967
984
- * Fixed: Stop Loading of Latest post scripts on Homepage and Frontpage #2041
985
- * Added: Filter created `ampforwp_non_amp_links()` so users can have all the internal links non-amp #1973
986
- * Fixed: Sanitize the archive description in loop component #1974
987
- * Fixed: Double AMPHTML when FBIA Plugin is active #2043
988
- * Fixed: Image Div is loading even if the image is not present in Swift #2033
989
- * Fixed: Custom AMP editor is visible on pages (post type) even if the Page Support is off from amp options panel #2047
990
- * Fixed: When 'Structure Data for WP' plugin active, Schema type in Structure section should hide #2049
991
- * Fixed: Bugs in Video Module in AMP pagebuilder #2048
992
- * Added: Autoplay feature added in Video Module #2048
993
- * Fixed: Throwing error when Product Structured Data is selected #1975
994
- * Fixed: Advanced CSS is not loading because the files are with hosting path #2046
995
- * Fixed: Double Quotes breaking the html #2004
996
- * Removed: Blog option is removed from AMP Options panel and it is connected with Pages option Under Reading Settings #2027
997
- * Fixed: amphtml should not be created for 404 pages #2018
998
- * Added: 404 Template added, useful for AMP Takeover #2042
999
- * Fixed: Genesis meta titles are lost and not rendering correctly #2050
1000
- * Fixed: Search blank on AMP Takeover #1990
1001
- * Fixed: Remove Unused js files from Paginated Post Pages #2001
1002
- * Fixed: Extra Space adding in H1 and other SEO tags #2054
1003
- * Fixed: Undefined Index when called from robot #1960
1004
- * Fixed: amp facebook comment Js not loading to the custom front page of the swift theme. #2053
1005
- * Fixed: Tags label is not working properly when RTL Support on #1719
1006
- * Fixed: View Non-AMP Version In the footer link has an error #2066
1007
- * Fixed: Squirrly SEO is Adding the Javascript code in AMP #1696
1008
- * Fixed: Translation option issue when using POT file method #1941
1009
- * Fixed: amp-facebook-like extension is missing on Custom Frontpage #2061
1010
- * Fixed: GTM option repositioned #2056
1011
- * Fixed: Menu is appearing on left side instead of Right side when RTL support is ON for Design3 #1928
1012
- * Fixed: Sidebar Bugs #1972
1013
- * Added: Table Styling in Swift #1961
1014
- * Fixed: Genesis index, follow options not being rendered #2071
1015
- * Added: Filter created `ampforwp_robots_meta` to modify robots meta information #2071
1016
- * Fixed: PHP Notices #2065
1017
- * Added: Add a new hook `ampforwp_after_amp_menu` after the menu in all designs #2072
1018
- * Added: New Look to Options panel #1823
1019
- * Added: Retina Image Support added #1846
1020
- * Fixed: Pagebuilder hrefs were stripped in hebrew language #2089
1021
- * Fixed: Warning Fixed #2083
1022
- * Fixed: Gallery module images not loading in Firefox #1980
1023
- * Fixed: Pagebuilder Improvement #2024
1024
-
1025
- = 0.9.85.5 (21st April 2018) =
1026
- * Added: Filter added to modify frontpage post id `ampforwp_modify_frontpage_id`
1027
- * Added: Filter added to modify amp template directory `ampforwp_template_locate` #1982
1028
- * Other minor bugs fixed
1029
-
1030
- = 0.9.85.3 (12th April 2018) =
1031
- * Added: Custom Post type Archive Page support #1995
1032
- * Fixed: AMP TakeOver redirection issues #1994
1033
- * Fixed: Debug errors #1976
1034
- * Fixed: Social Profile pages were hidden for Design 1 to 3 #1996
1035
- * Fixed: Structured Data insertion was adding CData causing validation error #1999
1036
-
1037
- = 0.9.85.2 =
1038
- * Minor Bugs fixed
1039
-
1040
- = 0.9.85.1 =
1041
- * Minor Bugs fixed
1042
-
1043
- = 0.9.85 (3rd April 2018) =
1044
- * For more detials check out [this blog post](https://ampforwp.com/0-9-85-released-stability-update-86th-update/)
1045
- * Fixed: Fatal error: Allowed memory size on FrontPage #1865
1046
- * Fixed: Proper Parameters for Pinterest Sharing #1853
1047
- * Added: Extra settings added in Button Module
1048
- * Added: Extra settings added in Text Module
1049
- * Fixed: Proper Parameters for Pinterest Sharing
1050
- * Fixed: Unwanted fields are removed form the Repeater in Button module
1051
- * Added: Enable/disable option added Related Posts #1829
1052
- * Fixed: Legacy PageBuilder option Repositioned #1851
1053
- * Fixed: Display the img tag only if source is present #1869
1054
- * Fixed: Huge design improvements in Swift theme #1818
1055
- * Added: Hook for Between Related Post is Added #1874
1056
- * Added: Blurb module text size and background color added
1057
- * Fixed: Comments Pagination issues #1816
1058
- * Added: Counter Module added
1059
- * Fixed: Date 48 years ago #1864 #1876
1060
- * Added: Ability to pass post id in amp_content() #1872
1061
- * Fixed: Changed the way images we fetched in WooWidget #1847
1062
- * Fixed: Changed the position of layout in Pagebuilder #1873
1063
- * Added: Pricing Module
1064
- * Fixed: Changed the position of layout in Pagebuilder #1873
1065
- * Fixed: amp_aq_resizer was not able to process the outside url #1881
1066
- * Fixed: Advanced Google Analytics improvements #1630 #1860
1067
- * Added: Field Added For ON & OFF in Page builder #1870
1068
- * Fixed: Two paginations in search pages in Swift theme #1855
1069
- * Fixed: Extra Div if categories not available #1856
1070
- * Fixed: removed debuged tags #1870
1071
- * Fixed: Published date connected with AMP options Panel #1888
1072
- * Added: Featured Image option in Swift #1889
1073
- * Added: Separate Blog settings #1887
1074
- * Fixed: single post ads should not load on pages #1896
1075
- * Fixed: Ads should not load on FrontPage if PageBuilder is enabled #1885
1076
- * Fixed: Background Image Support for the Columns #1871
1077
- * Added: Blockquotes design for Swift #1894
1078
- * Added: Co-Authors Plus compatibility #1895
1079
- * Added: pagebuilder for custom post types #1884
1080
- * Added: Border option is connected to options panel #1818
1081
- * Added: Responsive AD unit support #1852
1082
- * Added: Sub category arrow symbol is added in Swift theme #1818
1083
- * Added: Search text color is connected to options panel #1818
1084
- * Fixed: Removed notice when no posttype selected #1884
1085
- * Added: Ability to overwrite page template the WordPress way like front-page.php and page-{id}.php #1902
1086
- * Added: Ability to overwrite author page template the WordPress way like author.php and author author-name.php #1902
1087
- * Added: Lightbox Support for the images #1892
1088
- * Fixed: No mobile redirection when Dev mode is enabled #1907
1089
- * Added: Option to hide Author name in Swift #1890
1090
- * Fixed: Script facebook-comments should not load for Frontpage #1897
1091
- * Added: amp-facebook comments for AMP2WP #1911
1092
- * Added: Alt tag in all modules #1898
1093
- * Added: Sanitizers in Footer and sidebar widget in Swift #1835
1094
- * Added: Dropcap support #1900
1095
- * Added: Proper styling for iframes and videos in Swift theme #1909
1096
- * Fixed: Non-AMP link fixed for AMP Takeover #1916
1097
- * Fixed: Swift connected with Breadcrumb option #1915
1098
- * Added: Uninstall option created to completely remove AMPforWP data #1903
1099
- * Fixed: Recipe Structured Data requires name attribute #1917
1100
- * Fixed: No amphtml when It is hidden from Categories #1919
1101
- * Fixed: Content is breaking when Inline Related Post option is enabled #1912
1102
- * Fixed: Proper redirection setup for AMP Takeover #1913
1103
- * Added: Social media profiles added in menu #1901
1104
- * Fixed: No Ads should display on Frontpage or Posts if Pagebuilder is enabled #1885
1105
- * Added: #1899 Proper conditions for amp-analytics script
1106
- * Fixed: Turn off option not working by default fixed #1537
1107
- * Fixed: BreadCrumbs Should not load when PageBuilder is enabled #1925
1108
- * Fixed: Removed unwanted elements loading while pagebuilder is enabled #1929
1109
- * Fixed: amp-web-push should not load on Homepage and Blog #1930
1110
- * Added: SmartMag theme Compatibility #1905
1111
- * Fixed: Template overriding not working in child theme #1920
1112
- * Fixed: Horizontal scrolling in Swift #1844
1113
- * Fixed: Home page title should not be visible in AMP takeover #1921
1114
- * Added: Carousel Module Added #1937
1115
- * Fixed: Comments pagination not working #1816
1116
- * Fixed: Comments pagination not working #1816
1117
- * Added: Glue html css compatibility #1932
1118
- * Added: Data Caption Support on AMP Instagram Embed #1938
1119
- * Added: Ability to pass {author_name} and {author_id} added in Advance Analytics #1936
1120
- * Fixed: Scrollbar in Header area in Swift in firefox #1818
1121
- * Added: Disqus iframe height adjustment option #1935
1122
- * Fixed: Options panel conflict fixed with Mobius theme #1942
1123
- * Fixed: Problem with Button in Mobile view in Swift #1926
1124
- * Fixed: Removed canvas tag in AMP version causing validation errors #1880
1125
- * Fixed: Getting Conflict with Facebook Button by BestWebSoft #1740
1126
- * Added: Option to enter the "ID" on CTA button module #1931
1127
- * Added: Option for open same window in CTA module of page builder #1866
1128
- * Fixed: Logo fetch causing Huge performance issue #1679
1129
- * Fixed: Blurb module's default values were not set #1952
1130
- * Fixed: Allow script with application/ld+json #1958
1131
-
1132
- = 0.9.84 (14th March 2018) =
1133
- * Added: Polylang Frontpage compatibility added #1779
1134
- * Fixed: Proper link for Linkedin added #1820
1135
- * Fixed: Incorrect function name was Added #1827
1136
- * Fixed: Thumbnail resizing issue in Swift #1828
1137
- * Fixed: Thumbnail issue in Loops of Design 3 #1714
1138
- * Fixed: Hide post builder for Swift #1824
1139
- * Fixed: To avoid warnings when there are no pages in WordPress #1810
1140
- * Fixed: Condition for the Thumbnail for Swift #1733
1141
- * Fixed: Proper Styling for footer for Swift #1733
1142
- * Fixed: Line height issue and CSS editor not working in Swift #1821
1143
- * Fixed: Renamed aq_resize to ampfrowp_aq_resize to avoid conflicts #1838
1144
- * Fixed: Add the prefix to avoid conflicts #1817
1145
- * Fixed: Added Custom format option in amp_date #1845
1146
- * Fixed: Removed amp-img tag where blank SRC in Page builder #1843
1147
- * Fixed: Pagebuilder modal max-height removed so it will become full width #1843
1148
- * Added: An option for select target type in Button Module #1822
1149
- * Fixed: Remove AMP category widget if swift is enabled #1790
1150
- * Fixed: Filter added change mode type #1833
1151
- * Added: Rewrite rule for .html blog page #1775
1152
- * Fixed: Filter added change mode type #1833
1153
- * Fixed: Swift Footer Widget Sanitizer Added #1800
1154
- * Fixed: No OneSignal widget when PageBuilder is enabled #1840
1155
- * Fixed: span tag added around the pagination text #1834
1156
- * Added: Page specific option to add script/html and styles in page builder #1831
1157
- * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
1158
- * Added: Jarida theme compatibility added #1842
1159
- * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
1160
- * Fixed: Replace value attribute only from html tags. Otherwise it is removing value from * shortcodes which is breaking the whole page. #1738
1161
- * Added: Underline option for content links added #1808
1162
- * Added: Page specific option to add RTL in page builder #1858
1163
- * Added: Converts AMP ads to normal so ads show when takeover is enabled in Normal Mode #1724
1164
- * Added: Converts AMP Analytics to normal so Analytics works when takeover is enabled in Normal Mode #1724
1165
- * Fixed: Phone icon proper alignment in Design3 #1730
1166
- * Added: ADS for WP activation box in Extensions tab
1167
- * Added: New design field added #1861
1168
-
1169
- = 0.9.83.1 (8th March 2018) =
1170
- * Fixed: Pagebuilder contents not shows on custom home page #1794
1171
- * Added: Header hook added `ampforwp_advance_header_layout_options`
1172
- * Fixed: Load admin files only in admin pages #1799
1173
- * Fixed: Conflict with WP bakery pagebuilder #1783
1174
- * Fixed: Slide in Menu break in RTL mode #1825
1175
- * Fixed: Validation issue in loops due to empty attributes #1795
1176
- * Fixed: Featrued Image connected Properly with Swift theme #1733
1177
- * Fixed: Changed the disqus.php to disqus.html to pass authentication #1788
1178
- * Added: CSS styling for Loop on shop page #1803
1179
- * Fixed: Facebook comments not work in swift #1789
1180
- * Fixed: Style AMP Category module in Footer swift #1790
1181
- * Fixed: Load aq_resizer only in AMP #1805
1182
- * Fixed: Proper markup for Pinterest in Design3 and Swift #1793
1183
- * Fixed: Proper url for vk
1184
-
1185
- = 0.9.83 (03rd March 2018) =
1186
- * Added: Ability to add amp-carousel and amp-selector directly into WYSIWYG Editor #1588
1187
- * Fixed: Debug error caused by Playbuzz Sanitizer #1674
1188
- * Added: Show default gravatar for comments #1758
1189
- * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
1190
- * Fixed: To avoid debug error in swift
1191
- * Fixed: Translation improved for some strings #1678
1192
- * Fixed: Stop AMP takeover for Feed pages #1767
1193
- * Fixed: Menu issues In Design 1 & Design 2 after changing from AMP-Sidebar #1565
1194
- * Fixed: AMP Options panel Not Working After Update (0.9.82.1) version #1761
1195
- * Fixed: Move the label to the top [UX improvement] #1746
1196
- * Fixed: Error with Vue #1745
1197
- * Added: Video Module added in AMP Page Builder #1750
1198
- * Fixed: Sidebar menu is not scrollable swift theme #1769
1199
- * Fixed: View Non-AMP should be usertrailingslashit #1772
1200
- * Fixed: Proper structured data for Blogpage #1660
1201
- * Fixed: Legacy Page Builder not working after the update #1773
1202
- * Fixed: Content blank when only image in content #1778
1203
- * Fixed: Comment ID display issue fixed #1758
1204
- * Fixed: PHP Warning: A non-numeric value encountered in components/logo/logo.php on line 52 #1764
1205
- * Fixed: Yummly support added in Swift #1708
1206
- * Fixed: Demo Link updated #1781
1207
- * Fixed: CSS is not loading in Swift Theme #1780
1208
- * Added: Ability to add Advertisement or Sponsored label under ads #1710
1209
- * Fixed: Featured images distortion in related posts #1684
1210
- * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
1211
- * Fixed: noarchive instead of nofollow in Archive pages #1693
1212
- * Fixed: Internal links of tags are showing “/amp” after changing the end point to “?amp” in design 2 #1752
1213
- * Fixed: line height is added for the logo in Swift design
1214
- * Added: Class for Custom Frontpage #1787
1215
- * Fixed: Recent post enable disable for Swift theme #1784
1216
- * Fixed: Connect Show/Hide AMP option with AMP takeover#1786
1217
- * Fixed: Added sanitizer to footer Widget #1756
1218
-
1219
- = 0.9.82.1 (18th February 2018) =
1220
- * Selector code reverted due to it's effect on carousel
1221
-
1222
- = 0.9.82 (18th February 2018) =
1223
- * View more details on https://ampforwp.com/0-9-82-released-stability-update-82nd-update/
1224
- * Logo Resizing calculation by Pixels and resizing bug solved.
1225
- * Update Notification in the Admin panel will only appear in the AMP options panel. So it will not annoy you anymore.
1226
- * Glue underline is applying for some reason
1227
- * Fatal error after 0.9.81 fixed
1228
- * Facebook comments loading twice on swift
1229
- * PHP Notice: Undefined variable: post_author_name
1230
- * Pagebuilder fix in version 0.9.81 Compatibility with Yoast and other plugins #1749
1231
- * Home loop modifier option added. Allows you to exclude the categories from the loop or include the Custom Post type in the homepage loop.
1232
- * amphtml Conflict with Instant Article for Facebook resolved
1233
- * /amp folder in the theme is applying changes in plugin, which causing a bug, but it’s been fixed
1234
- * Backward Compatibility for AMP Preview
1235
- * SEO Section Improvements
1236
- * Wrong comments count on AMP pages
1237
- * AMP Allow selector in the The Content. You can add tabs and AMP components directly into the loop.
1238
- * If we turn off the Homepage Support then Blog is turned off as well, solved.
1239
- * Post Pagination have two options like “Number of pages” and Previous & Next.
1240
- * Removed the dot from the one Signal Service worker URL if the subdomain isn’t added (Causes Validation issues.)
1241
- * Extra Space due to empty divs in Design 3
1242
- * Remove alt from a tag in the AMP version caused many validation issues.
1243
-
1244
-
1245
- = 0.9.81 (15th February 2018) =
1246
- * Edge case fatal error on features.php fixed
1247
- * Admin dashboard messup CSS fix #1731
1248
- * Custom CSS Output added in Swift
1249
-
1250
- = 0.9.80 (15th February 2018) =
1251
- * View More details on the [blog post](https://ampforwp.com/introducing-swift/)
1252
- * AMP Page Builder 3.0: The AMP Page Builder is a lightweight and much stable than ever and works flawlessly! [Read More](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
1253
- * Swift: The New Default Theme, which you can select from the design section of the Page builder.
1254
- * A way to create a Child Theme for AMP [read more](https://ampforwp.com/tutorials/article/child-theme-amp/)
1255
- * Make AMP & Non-AMP Same: We have an amazing new option called AMP to WP which will generate the WordPress version of the AMP design which will be viewed on the canonical version of the website.
1256
- * AMP Takeover: You can deliver a fully AMP compatible website with this option. It will basically take over the non-amp version and deliver an AMP version to your desktop and mobile users, on WordPress & AMP version. That’s why it was called AMP Takeover
1257
- * Logo Resizing made easy
1258
- * Typography Options
1259
- * 3 Headers design in swift theme
1260
- * Error while sharing the image on Pinterest #1699
1261
- * Homepage support was not working ( when page support is off ) #1695
1262
- * Custom Permalinks rewrite issue solved #1689
1263
- * Custom post type was appearing two types #1688
1264
- * Theia Post Slider plugin incompatibility with post pagination fixed #1677
1265
- * Link to the categories in loop of Design 3 #1632
1266
- * amphtml was not working when plain permalink selected along with static page as homepage #1614
1267
- * AFS Analytics Integration added #1605
1268
- * Removed the blank spaces from analytics id field to deliver a good UX. #1599
1269
- * ?amp endpoint feature added #1561
1270
- * Ability to remove the excerpt and image from related post #1510
1271
- * Thumbnails on-the-fly generation added for better control over the design.
1272
-
1273
-
1274
- = 0.9.74 (23rd January 2018) =
1275
- * View More details on the [blog post](https://ampforwp.com/0-9-74-released-stability-update-79th-update/)
1276
- * Fixed: Push Notifications button alligned in center #1500
1277
- * Added: Meta robots tag support from Yoast #1563
1278
- * Added: Option to Disable wptexturize/smart-quotes Support #1458
1279
- * Fixed: Changed the label id to avoid conflict with Advanced AMP Ads #1591
1280
- * Fixed: esc_attr causing validation issues with single and double quotes #1616
1281
- * Fixed: Image stretching problem resolved when "Featured Image from the content" was set #1580 #1582
1282
- * Added: Create Template by Custom taxonomy name like product-jeans.php in AMP Theme FrameWork #1594
1283
- * Added: Custom Post type support added in the Core #1612
1284
- * Fixed: custom-amp-content.php cleaned with PHPCS #1497
1285
- * Added: Basic Product(WooCommerce) support added #992 #1276 for full WooCommerce Support please check this [Extension](https://ampforwp.com/woocommerce/#utm_source=readme-log&utm_medium=0.9.74-readme&utm_campaign=AMP%20Plugin)
1286
- * Added: Proper fallback support added if the current active AMP theme is not available #1624
1287
- * Fixed: Resolved debug errors #1622
1288
- * Added: All in One SEO compatibility #1557
1289
- * Fixed: Load AMP Styling only on AMP pages #1441
1290
- * Added: 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber) #1265
1291
- * Fixed: itemprop="url" was adding in non-amp #1626
1292
- * Fixed: SiteOrigin Pagebuilder compatibility with Custom Frontpage #1592 #1593
1293
- * Added: MediaAce lazy load compatibility of Bibmer Theme #1472
1294
- * Fixed: Content Links plugin was causing validation errors #1569
1295
- * Added: Filter added called get_content_from_dom to modify the output in AMP function #1462
1296
- * Added: amp_breadcrumb component added in AMP Theme Framework #1636
1297
- * Fixed: Sidebar Styling and proper sanitizer updated
1298
- * Added: amp_author_meta component added in AMP Theme Framework #1641
1299
- * Fixed: amp_post_pagination component improvement in AMP Theme Framework
1300
- * Added: Ability to add link classes in amp_post_pagination in AMP Theme Framework
1301
- * Fixed: amp_author_meta image code improvement in AMP Theme Framework
1302
-
1303
- = 0.9.73 (15th January 2018) =
1304
- * View More details on the [blog post](https://ampforwp.com/0-9-73-released-stability-update-78th-update/)
1305
- * Added: Instagram Sanitizer added to process Instagram Embeds inside the BlockQuotes #1581
1306
- * Added: Option Created to Enable/Disable rel="nofollow" for View Non-AMP link #1572
1307
- * Fixed: Custom AMP Content was not working with Elementor Pagbuilder #1495
1308
- * Fixed: ampforwp_is_front_page() is not working in the newspaper theme #1583
1309
- * Added: Allow people to use multiple Analytics on AMP #1124
1310
- * Fixed: 'https' error with PlayBuzz Embeds #1481
1311
- * Added: Option to show last modified date instead of Published date #1496
1312
- * Fixed: Add proper permission for ampforwptourinstaller page
1313
- * Fixed: Debug warnings #1586 and #1459
1314
- * Fixed: A lot of Security Fixes has been done #1497
1315
- * Fixed: Removed lot of unused code #1497
1316
- * Added: AMP skip for checkout page #1443
1317
- * Added: Show the list of Child pages at the end in Parent Page with on/off #1551
1318
- * Fixed: Properly strip shortcodes fom Structured data description #1512
1319
-
1320
- = 0.9.72 (6th January 2018, Happy New Year) =
1321
- * View More details on https://ampforwp.com/0-9-72-released-stability-update-77th-update
1322
- * Related Posts Image stretching in Design 3 AMP theme Framework #1482
1323
- * RTL option must be integrated into AMP theme Framework #1562
1324
- * `DOMDocument::loadHTML():` Attribute itemprop redefined warning fixed #1539
1325
- * Created an option to add Author bio article in Facebook Instant Article #1521
1326
- * Options to add push notification button above and below the content #1571
1327
- * Copy the Content button for Custom Post types #1532
1328
- * Alexa Metrics Compatibility added #1536
1329
- * Logo styling added with amp_logo. So styling can work with AMP Theme Framework. #1520
1330
- * Content parsing login improved, so it will not through any warnings if the content has only 1 paragraph. #1523
1331
- * Debug Warnings removed #1564
1332
- * Caption in the Gallery creating validation errors Fixed. #1549
1333
- * Tables Link color should be as same as the link of the body #1559
1334
- * Separate options for In-Content related posts #1546
1335
- * WebPage Schema Type added in Structured Data options #1558
1336
- * Fatal Error fixed with `mb_detect_encoding()` after enabling the minify option #1494
1337
- * Content blank or fatal errors due to itemscope and itemtype, fixed. #1570
1338
- * Performance improved. Due to `_transient__redux_activation_redirect` transient. #1526
1339
-
1340
- = 0.9.71 (1st December 2017) =
1341
- * Design 2 Post Titles issue fixed
1342
- * Instant Articles validation issue fixed.
1343
-
1344
- = 0.9.70 (30th November 2017) =
1345
- * View More details on https://ampforwp.com/0-9-70-released-stability-update-76th-update/
1346
- * Image alt tags are empty which caused issues. #1154 (thanks to @liagua)
1347
- * ALT and IMG tags are in one line #1442
1348
- * Updated the permalink for post view in admin area #1318
1349
- * aria-current causing validation issues #1427
1350
- * Aligning Captions in the Bottom in Gallery #1428
1351
- * Logo’s height & width should dynamically come from the logo. This was a great UX improvement in my opinion. The logo would good regardless of the kind of image you upload. #1429
1352
- * After 0.9.69.1 update Call to undefined function mb_convert_encoding #1447
1353
- * Featured image options now also reflect the structured data #1430
1354
- * Blur & Stretching issues of Design 3 thumbnails are now fixed. They’re crisp and clear than ever! #1227
1355
- * Related posts are showing on single even when turned off #1434
1356
- * Show Related posts CSS only when it is selected #1356
1357
- * Author image now displays on author pages #1426
1358
- * Category base removal in AMP from url option is only working on the first page #1418
1359
- * Bug fixed: PHP Warning DOMDocument Empty string supplied as input #1449
1360
- * Video support added in Instant Articles #1300
1361
- * Read more tag in Instant articles issue fixed #1415
1362
- * Amp carousel issues fixed #1446 #1456
1363
- * Compatibilty with Envira Gallery Lazy Loading #1432
1364
- * Inline Related Posts in AMP Theme Framework #1457
1365
- * Different number of in-content related post and related posts at the footer #1448
1366
- * FooGallery update broke all the AMP compatibility, but we fixed it from our side so that user’s gallery work perfectly #1424
1367
- * WPBakery Page Builder Conflict solved #1419
1368
- * Goodlife theme Lazy Load compatibility added #1416
1369
- * AMP-Facebook-Like Was found but unused Validation Error fixed. #1463
1370
- * Playbuzz not displaying if added with https: #1466
1371
- * Options Panel labels renamed for better understanding.
1372
-
1373
-
1374
- = 0.9.69 (20th November 2017) =
1375
- * View More details on https://ampforwp.com/0-9-69-released-stability-update-75th-update/
1376
- * One Signal Push Notifications bug fixed! #1404
1377
- * AMP theme framework Related posts extended so that it can be used as a loop format #1406
1378
- * Facebook like Button improvements #1405
1379
- * Add layout responsive tag to image module in page builder #1373
1380
- * Strip the shortcodes from Structure data area #1389
1381
- * Test HTTP API Call From admin panel by redux #1391
1382
- * Meta description tag in normal site Unicode character is different from AMP site unicode character. #1369
1383
- * Updated the check for ampforwp_is_amp_endpoint this should fix the issue #1372
1384
- * Updated the URL for design 3 so it can work with plain permalink #1318
1385
- * Updated the option Featured Image from The Content #1367
1386
- * If “Featured Image From The Content is enabled and Duplicate Featured Image” is disable it will remove all the duplicate images from the content. #1375
1387
- * Date Format under Homepage improvements #1408
1388
- * Warnings due to inline related posts in Homepage #1413
1389
- * Plain Permalinks Support improved. #1318
1390
- * Allow Homepage title of Bread Crumbs feature to be changed from Translation Panel #1414
1391
- * Debug Errors in AMP Theme Framework #1403
1392
- * Unnecessary loading of Merriweather fixed, it will only load in the Design 1.
1393
- * Enter Phone Number is not Appearing when switch to Call now button #1425
1394
- * Need excerpt below the title, above the meta #1399
1395
- * Remove the Separator piple symbol from the footer when “Back to Top link” is off #1417
1396
- * Display Child or subcategories on Category pages. #1385
1397
- * Add Caption in the Gallery Image feature conflicting with Gallery widget #1407
1398
- * Youtube Shortcode embed with &rel=0 support #1378
1399
- * Filter for Excerpt custom text in the AMP options #1411
1400
- * WPML Multilingual CMS plugin flags compatibility #1270
1401
- * Compatibility with Tasty Recipes plugin and other page builders with amp page builder #1431
1402
-
1403
-
1404
- = 0.9.68 (12th November 2017) =
1405
- * View More details on https://ampforwp.com/0-9-68-released-stability-update-74th-update/
1406
- * ADs are Optimize For Viewability, meaning it will try to load faster than the original AMP AD loading strategy.
1407
- * Content was disappearing issue was resolved #1392
1408
- * Featured Image from The Content option is connected to related post #1339
1409
- * Fix amp-web-push helper iframe configuration URL #1387
1410
- * Facebook Like button added to AMP #1327
1411
- * WPML support for AMP Improvement #1285
1412
- * Debug Errors fixed #1366
1413
- * Setting ad density for Facebook Instant Articles ads #1287
1414
- * Showing the number of comments in Single #1341
1415
- * Styling added to the sitewide ads and made sure that they are in the center. #1343
1416
- * One Signal buttons Translation added #1383
1417
- * Article type added to Structured data #1344 #1354
1418
- * The issue with the amp-carousel when RTL was enabled #1358
1419
- * amp-carousel with images of different sizes #1358
1420
- * a bug where Img is getting converted to amp-img if there's no height or width. which causing validation issue and image is not visible fixed.
1421
- * Instant Article should have a default value for number of posts, it was causing the memory issue with alot of posts #1390
1422
- * Notice if a post has no author data #1338
1423
- * Added a new redux extension select field in redux framework #1349
1424
- * Issues with galleries as well as gallery captions #1363
1425
- * Added a hook for adding anything in between the loops #1396
1426
- * Hide meta boxes as per the user level types #1340
1427
- * A Switch between the Date formats #1384
1428
- * Fix: Jannah theme lazy load issue #1362
1429
- * Issues with galleries as well as gallery captions #1363
1430
- * Create Dynamic url of amp according to the permalink structure #1318
1431
- * Minor code performance improvement.
1432
- * Archive titles in Design 3 frontend issue
1433
-
1434
- = 0.9.67.0 (6th November 2017) =
1435
- * View more details on https://ampforwp.com/one-signal-push-notifications-for-amp/
1436
- * OneSignal Push Notifications integrated #807
1437
- * Vimeo embed support added
1438
- * SoundCloud embed support added
1439
- * Pinterest embed support added
1440
- * PlayBuzz embed support added
1441
- * DailyMotion embed support added
1442
- * Fix: Handle issues with data uri images in CSS #1033
1443
- * Fix attribute when adding AMP Mustache lib #1033
1444
- * Fix: Output CSS for feature image #1033
1445
- * An option added for users who don't want to receive update notifications #1342
1446
- * Structured data nav improvement
1447
- * Sitenavigationelement has been implemented correctly for footer menu. #1345
1448
- * Style sanitization for Menu Items #1359
1449
- * Polylang flags support for menu  #1360
1450
- * Mobile Redirection issues fixed #1173
1451
- * Jetpack fatal error fixed #1355
1452
- * AMP Page Builder requires a button to be clicked, so the scripts are not running on the runtime making it easy on the edit screen page and avoid the possible script conflict.
1453
- * Needs proper CTA Bar's styling. #1361
1454
- * Debug errors on archive pages #1353
1455
- * Preview shall only be loaded on click rather than in background #1331
1456
- * ampforwp_is_home() function code improved
1457
- * making sure scripts and styling is properly adding when sanitizing the sidebar #868
1458
- * All the backend css and js should be versioned, so it's not cached. #1335
1459
-
1460
- = 0.9.66.1 (30th October 2017) =
1461
- * Fatal error if has version less than WP 4.8 fixed
1462
- * More Minor Validation errors fixed
1463
- * Odnoklassniki sharing button is not working #1337
1464
-
1465
- = 0.9.66.0 (29th October 2017) =
1466
- * View more details on https://ampforwp.com/0-9-66-released-bug-squashing-oct-2017-72nd-update/
1467
- * Design 3 & Design 1 are optimised with 90+ Google PageSpeed Score on Mobile and 95+ in desktop performance #1273
1468
- * Featured Image from the content for blog and homepage #1295
1469
- * Category Module for AMP Page builder added #888
1470
- * Don't load unused CSS selectors. All the CSS is conditionally loading, to decrease the number of CSS loaded per page and increased in performance #1292
1471
- * Twitter Video embed code support added in AMP #1307
1472
- * Video Posting Structured data #1293
1473
- * Navigation menus are now Schema compatible for better Structured data integration #1229
1474
- * Yoast checking conditions for Structured Data Improved #1293
1475
- * Added "back to Top" in design 3 #959
1476
- * Proper blog check and author for custom frontpage #1260 (Made some changes to check the blog properly and also added the author details for Custom Frontpage)
1477
- * AMP not working on password-protected pages #1192
1478
- * Debug errors reported by the user #1284 and few more we found internally
1479
- * Inline Style Sanitizer for Comments to avoid any validation issues #1193
1480
- * Next/Previous links removed from pages #1268 props @Frenchomatic
1481
- * WPML Multilingual CMS plugin flags compatibility added #1270
1482
- * Image sanitizer added for the Sidebar #1270
1483
- * Added AMP Components the correct way. Added amp-gist, amp-social-share. #336
1484
- * amp-video script added - Which decreases the non-critical validation issues #991
1485
- * Arrows in Design 3 pagination #1000
1486
- * Author page links in Single #1282
1487
- * Added previous open state of option panel and show again when search clean #1238
1488
- * Odnoklassniki Social Sharing Support for AMP (with target blank for better bounce rate) #1230
1489
- * GIF or animated images resize problem fixed #1281
1490
- * In Design1, Header Background & Link Color have same option #1249
1491
- * FB Pixel for AMP added #1231
1492
- * Structured Data Type option for AMPed Custom Post types only #1259
1493
- * Attribute ‘readability in the tag ‘div’ removed - this decreases the validation issues #1306
1494
- * AMP Theme Framework Improvements: loop, author, related_post, Add Author support #1311
1495
- * Commentator's Avatar in the comments section #1132
1496
- * Remove 'Welcome to AMP' from Dashboard sub-menu and moved to the options area to decrease the annoyance and increase the user happiness #902
1497
- * Option to Sort the Random Order of Related Posts to increase the audience engagement (Default is 'ID', on enabling the option it will change to 'rand') #1250
1498
- *  View AMP on Admin Bar for the respected page/post If enable. #1236
1499
- * google maps iframe link to larger map #1099
1500
- * Comments now jumping due to the slash at the end #1309
1501
- * Page Builder causes Incompatibility with the Divi theme (We restructured the Text Module for Page builder for better compatibility and UX) #1162
1502
- * Inline Style Sanitizer for Comments added. Less Critical Validation issues and Better Presentation #1193
1503
- * WPML amp-html error fixed #1285
1504
- * Radio button not working for Show View more Button" #1018
1505
- * Added registered handle for tinymcePointer localize data #1301
1506
- * Date in the Design 2 should not be hidden in mobile version #1315
1507
- * Page builder not working on homepage(Selected as front page) #1316
1508
- * Instant articles number of posts option #1271 (Removed some unused code as well, it will rendered all posts if none is enter in the options)
1509
- * Auto flush on save for FBIA to improve the UX.
1510
- * Plain Permalinks Support improved. #1318
1511
- * Tables support added to FB Instant Articles #1266
1512
- * Demo link added in the Theme selector option #1248
1513
- * Remove invalid attributes from multiple tags which reduces critical validation errors and validates pages.
1514
- * AMP makes a problem in archive page label, when it is active in non-amp version #1304
1515
- * placeholder-icon.png is 404 fixed #1310
1516
- * Category & Tags switches for Single added. #1055
1517
- * Copy Content (Custom AMP Editor) Option Not showing with Page Builder of SiteOrigin issue fixed #1280
1518
- * Improving UX with: when AMP support is off for a specific post type then all the AMP related metaboxes should be removed #1289
1519
- * Options Panel Options rearranged, labels rewritten, descriptions repositioned for better User interaction [commit]
1520
-
1521
- = 0.9.65.2 (25th October 2017) =
1522
- * TypeWatch is not a function #1299
1523
- * Error with BackupBuddy fixed #1303
1524
-
1525
- = 0.9.65.1 (24th October 2017) =
1526
- * AMP Minifcation Issues fixed
1527
-
1528
- = 0.9.65 (22nd October 2017) =
1529
- * View more details on https://ampforwp.com/new/
1530
- * Favicon for AMP #1039
1531
- * AMP Minification option added with Performance Tab in Options #1286
1532
- * Post support is turned off then Meta box should also be removed #1253
1533
- * Excerpt Length feature in Design two and Three #1122
1534
- * Test Contact form plugins and their settings in the options panel #1121
1535
- * Mobile preview in Edit Screen #1082
1536
- * Search feature for Options Panel #1238
1537
- * WordPress Social Share Buttons Validation Issues #1272
1538
- * itemtype attribute is striping in the ul tag #1210
1539
- * Debug Error in Breadcrumb 0.9.64 #1267
1540
- * Disable AMP linking at Wordpress Search Page #969
1541
- * Featured Image is missing #1071
1542
- * Removed ampforwp_plugin_activation_notice #1034
1543
- * Add VK (Vkontakte) Sharing Button #1187
1544
- * Grab the first image instead of post thumbnail for featured image #1189
1545
- * AMP theme framework core changes #1274
1546
- * Grab the first image instead of post thumbnail for featured image #1189
1547
- * Create a Switch on Top of Page Builder #1279
1548
- * Inline Related Posts added that helps you with improving bounce rate #1078
1549
- * Caption Support in Image Gallery Carousel #1172 #1136
1550
- * Instant Articles feed shows sticky posts on top #945
1551
- * Added search check, to fix debug notice
1552
- * Option to hide date from Design 1 & Design 3 Homepage Loop #1264
1553
- * UI labels improvements in the Options panel
1554
- * Sorting out design #2 static front page #1175
1555
-
1556
- = 0.9.64 (15th October 2017) =
1557
- * View more details on https://ampforwp.com/new/
1558
- * Structured Data Type option added. You can now change the structured data format for Posts, Pages and Custom post types #323
1559
- * When comments plugin activate, Comments section should remove. #1093
1560
- * Notification causes a validation error. #1147
1561
- * CSS !important need sanitization #1225 - This will help us to validate tens of thousands of pages.
1562
- * Strange spaces when using Sassy Social Share #1185
1563
- * Remote CDN use? Let's host it? #549
1564
- * Typo fix for Linkedin Profile Page URL section #905 [Thanks to Prayag @pra85]
1565
- * Replace fastimage with fasterimage for PHP 5.4+ #1191
1566
- * Debug Errors Post 0.9.63 #1219
1567
- * Ad5 code injected twice #1116
1568
- * Homepage Support must be Off when we turn Off Homepage Support. #738
1569
- * Add custom class in post pagination for styling #1100
1570
- * Removed the Lazy Loading issue of Schema Theme #1170
1571
- * H1 tag for archive titles (Commit) #1155
1572
- * Alt tag for the Logo #1155
1573
- * Design 3 Menu RTL issue fixed #1106
1574
- * Ability to add dynamic classes in body tag #1237
1575
- * Warnings fixed on 404 page #1243
1576
- * Properly structured data for Homepage, Custom Frontpage and Blog #1155 #1242
1577
- * Option added to Enable/Disable categories and Tags links from Single #1155
1578
- * Fatal error after 0.9.63 fixed #1220
1579
- * Debug Error due to vendor AMP #1213
1580
- * PHP warning on line 147 after 0.9.63 #1241
1581
-
1582
- = 0.9.63 (8th October 2017) =
1583
- * View more details on https://ampforwp.com/new/
1584
- * Category and Tag Base Remover as core features #1079
1585
- * Hide AMP on Posts option added #935
1586
- * Installation Setup Screen Added for new users
1587
- * Validation for the session in PHP #1158. PR by Bryan Contreras @bryan3561
1588
- * All the amp pages should work perfect with Plain Permalink settings #488
1589
- * WYSIWYG TinyMCE editor added for the Text Module in AMP Page Builder #1205
1590
- * WPML Static Front Page Support for title and description with Yoast. #1143
1591
- * Row Settings area added for AMP Page Builder #1148
1592
- * xlink attribute causes Validation Issues #1149
1593
- * Posts with no images on Archive pages are squeezed to 65% #1058
1594
- * Body Class to target specific pages #1123
1595
- * Option to enable/disable Breadcrumb #1129
1596
- * Debug errors due to Breadcrumbs fixed #1109 #1130 #966
1597
- * Visit AMP option added below the View Site in Dashboard. #1076
1598
- * Many Debug errors fixed #1109
1599
- * Textarea for body tag which will help people add AMP Auto Ads #1064
1600
- * Structured data improvements #1048 #1044 #1085 #1118
1601
- * Twitter share URL based on users choice, you can allow people to share pretty links and short links. #1097
1602
- * Author Avatar removed code fixed which has been displayed in the div "amp-wp-meta amp-wp-byline". #1087
1603
- * Only one figure element is allowed in the article header FB Instant Articles #1127 & #1157
1604
- * Image alt tags are empty and cause issues fixed. #1154
1605
- * Button to copy the content into Custom AMP Editor #783
1606
- * Rename AMP loop widget areas or add proper descriptions #1045
1607
- * Trailing slash issue #1095
1608
- * Related Posts by Post type featured added #1141
1609
- * Ultimate Social Media Icons plugin causes validation issues fixed #1135
1610
- * Adding proper path for functions.php, it was causing strange fatal errors and irregular white screen of death fixed  #1144
1611
- * A smooth way to migrate from other AMP plugins to AMPforWP #1051
1612
- * Alert added on AMP by Automattic installation. #1180
1613
- * Insertion of strange spaces around H1 titles #1069
1614
- * AMP Page Builder and HTTPS #1164
1615
- * You can display comments from more than one vendor such as displaying WP & FB Comments #1150
1616
- * Rename AMP loop widget areas or add proper descriptions #1045
1617
- * FrontPage featured image with srcset #1063
1618
- * An option for Showing featured image from custom field #1098
1619
- * Added the Custom Front Page Title From Yoast SEO #1163
1620
- * Commenting breaks SSI directives causes to display error #1179
1621
- * rel canonical appears more than once in search pages #1195
1622
- * Dev mode in AMP #1083
1623
- * Social Sticky Icons Improvements #1061
1624
- * Grand-Child support added in Design #1152
1625
- * amp-accordion non-critical error in Design 3 & CSS improvements fixed #1152
1626
- * Incorrect @id for mainentity #1080
1627
- * Hide AMP by specific Categories tweaked for performance. Thanks to Joshua Eichorn @jeichorn CTO at Page.ly #1133 - Huge Thanks!
1628
- * amp-auto-ads for sites with RTL support ON #1176
1629
- * Redirected the Google forms to our contact page so that we can take each and every query and answer every person. #1201
1630
- * ui-state-highlight class was conflicting with ACF date picker fixed #1199
1631
- * Responsify WP Lazy loading causes blank image (Compatibility) #1131
1632
- * amp-carousel scripts loading on the second page fixed in Design 3
1633
- * Show Design screenshot while selection of design #1209
1634
- * Switches Redesigned for better UX #1211
1635
- * Welcome Page UX Improved #1214
1636
-
1637
- = 0.9.62 (25th September 2017) =
1638
- * View more details on https://ampforwp.com/new/
1639
- * INTRODUCING Page Builder 2.0 for AMP! [Learn More & Watch the Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
1640
- * Documentation & Help links improved
1641
- * Post type specific classes for targetting
1642
- * Design name restored in Options panel (It was recently renamed to Appearance)
1643
- * Minor Bug fixes as well
1644
-
1645
- = 0.9.61 (10th September 2017) =
1646
- * View more details on https://ampforwp.com/options-restructured/
1647
- * Options Panel Restructured Options were dividing into two parts: Settings and Appearance.
1648
- * AMP Theme Framework Core Support Added. You can now create themes of your own in just minutes.
1649
- * WPML Static Front Page Support #1111
1650
- * Notification message disables when CF7 & gravity form is activated. #1107
1651
- * Space after On in Design 3 #1114
1652
-
1653
- = 0.9.60 (4th September 2017) =
1654
- * View more details on https://ampforwp.com/0-9-60-released-improved-redirection-66th-update/
1655
- * Class added to View non-amp anchor tag
1656
- * Params added properly to get rid of a warning #1077
1657
- * rel=attachment noopener generating validation errors #1090
1658
- * Breadcrumbs Support Added #701
1659
- * Enable / Disable button added for Navigation Menu #735
1660
- * Move the ad code for Instant Article down after the article #964
1661
- * Add analytics code of FB instant articles properly #1096
1662
- * datetime Tag not stripping properly #1043
1663
- * Mobile redirection on custom post types #1028 #1052
1664
- * Mobile Redirection causing extra redirect #879 #933
1665
- * Proper mobile redirection on Homepage #1052
1666
- * View non-amp on blog will redirect to blog
1667
- * Blog will redirect to blog irrespective of AMP Homepage option #871
1668
- * Dont redirect if archive support is disabled #1052
1669
- * non-amp category pages should redirect to non-amp pages if turned off from Hide AMP #999
1670
- * Disable amp for forum plugin (wpforo) #592
1671
-
1672
- = 0.9.59 (23th August 2017) =
1673
- * Design 3 Images were not aligned properly. Fixed. #1040
1674
- * Caption in the design 3 improved
1675
- * Jetpack File not loading throwing fatal error #1038
1676
- * If the mobile redirection is ON and the category is excluded to display the AMP then it should redirect properly
1677
- * Custom Editor Compatibility issue with SiteOrigin PageBuilder fixed #997
1678
- * Native Twitter Embed support
1679
- * Added a hook after the body tag: ampforwp_body_beginning (commit)
1680
- * GTM in AMP Improved #958
1681
- * WP User Avatar compatibility Added #975
1682
- * Alt tag on frontpage featured image added #1050
1683
- * Blurred Images on the frontpage fixed #1050
1684
- * Need to escape alt tag #1049
1685
- * Debug errors & PHP warnings were fixed #859 #811 #830 #810
1686
- * Proper rel canonicals for inner pages #1047
1687
- * Added Video sanitizer for comments #1053
1688
- * When activating the AMP plugin, display a notification in the popup. #1036
1689
- * Video Sanitizer added for Comments
1690
-
1691
- = 0.9.58.1 (9th August 2017) =
1692
- * Jetpack conflict issue solved #1038
1693
- * Genesis SEO Support added #1013
1694
- * Fixed Wrong SEO title issue #1013 and #836
1695
- * Design 3 Carousel script loading method improved #990
1696
-
1697
- = 0.9.58 (9th August 2017) =
1698
- * View more details on https://ampforwp.com/new/
1699
- * Genesis SEO for AMP support added
1700
- * AMP 0.4.2 Vendor Bundled for making it crash proof
1701
- * Archive desc only on 1st page #1029
1702
- * Ads are not working after 0.9.6 #1030
1703
- * Fixed the Post 0.9.57 Update Bugs #1025
1704
- * All Images are aligned on left side in design 3 #1031
1705
- * Custom frontpage title issue in Design 3 fixed
1706
-
1707
- = 0.9.57 (5th August 2017) =
1708
- * See the Full changelog https://ampforwp.com/0-9-57-released-compatibility-issue-fixed-62nd-update/
1709
-
1710
- = 0.9.56 (31st July 2017) =
1711
- * View more details on https://ampforwp.com/page-break-in-amp/
1712
- * Page Break / NextPage (Pagination) Support Added #834 #857 (Improvement)
1713
- * Show/Hide AMP for Categories of Posts or All posts #872 (Improvement)
1714
- * Adding analytics capabilities to Instant Articles #978
1715
- * JetPack Plugin Conflict Solved #971
1716
- * Social sharing code improved. amp-social-share js is getting added for line and WhatsApp social share #981
1717
- * Code improvement for rel canonicals(home and archive)
1718
- * Perfect SEO URL + Yoast SEO Compatibility #982
1719
- * Some styling for tags to show up properly
1720
- * Undefined index notices #960
1721
- * Non-amp category pages should redirect to non-amp pages if turned off from Hiding AMP #999
1722
- * Page builder text and button module issues #972
1723
- * Documentation links updated in the Options panel
1724
-
1725
- = 0.9.55 (13th July 2017) =
1726
- * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
1727
- * Disqus Comments show up even when disabled per post #931
1728
- * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
1729
- * H3 inside OL in Related-Posts.php #930
1730
- * Advertisement Options in Instant Articles #943
1731
- * Incompatible with bootstrap plugin #525
1732
- * Error in tag and category links #934
1733
- * Pagebuilder Button module link had issues #951
1734
- * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
1735
- * WPtouch Pro Compatibility Issues #927
1736
- * Better scripts compatibility in Single of post types #757
1737
- * Instant Articles Error: "The HTML element does not contain any text" #949
1738
- * added a filter in all the dates so a user can change the date format and modify #962
1739
- * Design3 Menu Arrows are clickable along with the links #952
1740
-
1741
-
1742
- = 0.9.54.2 (4th July 2017) =
1743
- * Minor bug post 0.9.54 bug fixed
1744
-
1745
- = 0.9.54 (4th July 2017) =
1746
- * View more details on https://ampforwp.com/new/
1747
- * Facebook Instant Articles Support #862
1748
- * Exclude Some Pages from Mobile Redirection #914
1749
- * After 0.9.53 update amp-social-share js missing (critical issue) #924
1750
- * Hooks added in Header (above and below)
1751
- * View non AMP[Code improvement] #928
1752
- * Pages are not supposed to show meta like this, especially Categories #894
1753
- * Monarch plugin having design issues #925
1754
- * Show AMP Hide AMP Check Box Fixes #794
1755
-
1756
- = 0.9.53 (19th June 2017) =
1757
- * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
1758
- * Compatibility Issue with Rocket Lazy Load plugin #907
1759
- * Link color issue with UX of Color Pickers in Design 3 #731
1760
- * amp-analytics js appears more than once when Google tag manager is used #885
1761
- * SEO by SQUIRRLY is adding analytics twice #678
1762
- * Fatal error when WPSEO is activated #900
1763
- * Design 3 Sticky header should have an option #625
1764
- * Search form was enhanced, it can now be used on the websites without https certificate. That will certainly fix a lot of validation issues. #912
1765
- * Yandex Metrika support in AMP #585
1766
- * Histats Analytics Support #880
1767
- * Chartbeat Analytics Support #882
1768
- * Do not strip Rel from anchor tags #790
1769
- * Design close Resulting Blank Screen in AMP Site #642
1770
- * Logo size is not applying #817
1771
- * AMP Publisher logo guidelines #162
1772
- * Remove amp-social-share extension .js from Custom Frontpage #899
1773
- * Add compatibility with Sassy Social Share #679
1774
- * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
1775
-
1776
- = 0.9.51.1 (12th June 2017) =
1777
- * Redirection issue after 0.9.51 Update.
1778
- * Improved compatibility with plugins.
1779
-
1780
- = 0.9.51 (8th June 2017) =
1781
- * View more details on https://ampforwp.com/page-builder-released-in-amp/
1782
- * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
1783
- * Comments are not showing properly when words are long #861
1784
- * Remove amp-social-share extension .js from Pages #853
1785
- * The tag ‘amp-sidebar extension .js script’ appears more than once in the document #828
1786
- * Remove Advertisement tab #839
1787
- * Compatibility with Slide-in Plugin by WPMU dev #866
1788
- * Mobile redirection issue with bbpress #867
1789
- * All the data must be properly sanitize in the sidebar #849
1790
- * AMP html should not be added on the second page of comments
1791
- * Author page’s support #456
1792
- * URLs in comments should be clickable(links) #869
1793
- * Featured image should be centered in desktop mode #870
1794
- * Added More Hooks #721 (Documentation on this coming soon!)
1795
- * Page 2 goes to the wrong URL #865
1796
- * Proper Title and meta for homepage and posts #850
1797
- * Gist Support added #608 Just add a shortcode and enjoy Devs (Ex: amp-gist id="b9bb35bc68df68259af94430f012425f )
1798
- * /blog/amp pagination not working #875
1799
- * separate the Text and Date format in design 2 #876
1800
- * Comments show in AMP w/o breaks between paragraphs #873
1801
- * If no featured image below hooks are not working #877
1802
- * Change meta name Viewport and its value #878
1803
- * Bolt icon in option #474
1804
- * Code restructuring and code quality improvements.
1805
- * Create a seperate function for comment code in frontpage.php #682
1806
- * Remove all the duplicate code from frontpage.php of all the designs and use hooks to add the code instead of static code #889
1807
- * Few Debug errors removed.
1808
-
1809
- = 0.9.50 (24 May 2017) =
1810
- * View more details on https://ampforwp.com/facebook-comments-in-amp/
1811
- * Design 3 Social Icons issue #832
1812
- * View non AMP leads to /?nonamp=1 #814
1813
- * Youtube shortcode compatibility improved #557
1814
- * welcome.php should be shown only if user is “administrator” #696
1815
- * Facebook comments support added in AMP #825
1816
- * WP Like Button Compatibility #841
1817
- * Custom Taxonomy Support added with Custom Post Type Extension.
1818
- * Front page comments not found as expected #837
1819
- * Fixed xml:lang tag issue #848
1820
- * Sanitize Iframe in the archive description Fixed #845
1821
- * Compatibility with Newspaper Theme by TagDiv #842 and #796
1822
- * Some debug problems (blog page, style.php) #838
1823
- * Featured Image hooks added
1824
- * Twitter is misspelled #854
1825
- * The core concept of the AMP Content builder has been built.
1826
-
1827
-
1828
- = 0.9.49 (12 May 2017) =
1829
- * View more details on https://ampforwp.com/0-9-49-released-small-important-bugs-fixed-56th-update/
1830
- * Option added to display the excerpt in Single #806
1831
- * Ability to add new invalid tags to filter out from AMP pages #809
1832
- * In frontpage, comment button is pointing to wrong URL #812
1833
- * Call now button and search is overlapping in Design-1 #784
1834
- * Sticky Social Icons should be off if the CTA notification bar is on #788
1835
- * Author bio in Design 1 and 2 #732
1836
- * Styling in Taxonomy description causing validation issues #798
1837
- * Twitter share(handle, url positions fixed) #815
1838
- * Tables responsiveness in ALL Designs #726
1839
- * Output all the categories and tags with their own ID’s in the div classes #750
1840
- * Social Share Icons Overlap with Leave A Comment in Design 3 #716
1841
- * Effective Measure Support on AMP #297
1842
- * Custom AMP editor on pages should only be shown when page support is ON #756
1843
- * AMP on website.com/blog without need of separate installation #775
1844
- * GTranslate Compatible #819
1845
- * Images and amp-anim styling added #725
1846
- * Filter to make the title in a post to a link #727
1847
- * Author Bio and Social Share button must not come in Pages #770
1848
- * StatCounter is now compatible with AMP #361
1849
- * Line Social media support #500
1850
- * Footer menus for Design 1 & Design 2 #623
1851
- * Strip out src=”about:blank” When Gravity Forms used #804
1852
- * Add Compatibility with Crazy Lazy load plugin #751
1853
- * Meta Titles and Description issues fixed with Yoast, All in one SEO and The SEO Framework #813
1854
- * Double quotes in the Excerpt of the meta description is making AMP Invalidated #818
1855
- * Missing featured image on static front page #824
1856
- * Fatal error while activation: see the video 0.9.49 Beta #827
1857
- * Review this code in archive.php in all 3 designs. #826
1858
-
1859
-
1860
- = 0.9.48 (28 April 2017) =
1861
- * View more details on: https://ampforwp.com/0-9-48-released-step-towards-multilingual-support-55th-update/
1862
- * The default translation method of WordPress added. (Option in Translation panel to switch between * Translation panel and POT file #540)
1863
- * A new Advertisement slot added above the related posts in the Single. It not only gives better options for people to display ads but this ad slot is also very handy if you are using ad companies like Taboola and RevContent.
1864
- * Another Advertisement slot added below the post title in the Single post.
1865
- * Fatal error: require_once report-bugs.php #747 fixed
1866
- * Add / for codes in Meta Description #766 fixed
1867
- * Controls re-adjusted & Renamed title of yoast description control in Options panel
1868
- * Design-3 Slider URL redirecting to non-AMP page #758
1869
- * Added new sanitizer For HTML to AMP-HTML conversion
1870
- * Sanitized Archive descriptions so that it would convert to AMP
1871
- * Comments sanitized with new sanitizer so that HTML tags automatically become AMP compatible.
1872
- * 301 redirects on non-pretty internal links #767
1873
- * Create a filter to modify the value of rel="amphtml" #778
1874
- * Max-width added for images in comments
1875
- * If in WooCommerce ?amp endpoint set then update href.
1876
- * Undefined Variable (Debug) #733 and many other debug issues were fixed
1877
- * Show last updated Post instead of published date #575
1878
- * WooCommerce Widget added to display latest products on homepage. #763
1879
- * add amp_post_template_above_footer hook global in all the designs #779
1880
- * Excerpt on top of the content in Single #665
1881
- * Subscribe box has been improved for the UX needs #712
1882
- * Notice warnings since 0.4.2 update #740
1883
- * AMP Comments Form Integration with the extension
1884
- * Filter added on the loop in Homepage of the Design 3 so that it can be modified with an external plugin.
1885
- * 404 on paged home page #781
1886
- * Twitter handle should be at the end of the tweet not in the beginning #787
1887
- * Wrong Rel Canonical for AMP Custom Frontpage #799
1888
- * Merged a pull request #761 that will improve the title and description output that is much more stable and flexible for future enhancement and use. It was contributed by Sybre Waaijer - Thanks mate for the contribution, we (our team and users) really appreciate your hard work done on this code.
1889
- * Extension page user experienced improved.
1890
- * Removed old Youtube installation video and replaced with new one.
1891
-
1892
- = 0.9.47.2 (12 April 2017) =
1893
- * Design-3 Slider URL redirecting to non-AMP page #758
1894
- * Ads showing in comments #768
1895
-
1896
- = 0.9.47.1 (11 April 2017) =
1897
- * Meta description option improved in SEO section #766
1898
- * Fatal error: require_once report-bugs.php #747
1899
-
1900
- = 0.9.47 (10 April 2017) =
1901
- * View more details at https://ampforwp.com/0-9-47-released-54th-update/
1902
- * Meta saving method updated for customAMP content editor checkbox was causing some conflict.
1903
- * Wrong Yoast title and structured data in Custom Frontpage fixed
1904
- * CSS minification all 3 designs
1905
- * Polylang flags in menu was causing validation issue, is now resolved
1906
- * WPML flags in menu was causing validation issue, is now resolved
1907
- * Standardized function created for content sanitization.
1908
- * Archive description now displays AMP compatible markup
1909
- * Comments markup sanitized for AMP
1910
- * Design 3 images not aligned properly, fixed
1911
- * Images are aligned to center in Design 1.
1912
- * carousel ending with //amp instead of /amp fixed #753
1913
- * Title of the Post along with Post link when shared in twitter #683
1914
- * Ads were cutting in half in RTL, fixed
1915
- * Add / at the end of AMP links with in the AMP pages (Internal links) #668
1916
- * Rendering the wrong URLs in front page if paged #742
1917
- * Option to turn off AMP on all pages, so people can turn on only for specific pages #746
1918
- * Need Meta Description on amp pages #741
1919
- * Woocommerce Loop shortcode updated
1920
- * Call Now Button added in header #563
1921
- * Post images are not centered in Design 3 #695
1922
- * UX of GTM settings done, since users were getting confused #700
1923
- * Front page amphtml fixed for paginated pages
1924
-
1925
- = 0.9.45.6 (31 March 2017) =
1926
- * Installation Process from welcome page was not working after WP Plugin DIR API change was fixed.
1927
- * WP Rocket Minifcation and Concatenation was not working, its fixed now.
1928
- * WP Rocket was tested properly to make sure everything is working fine.
1929
-
1930
- = 0.9.45.5 (25 March 2017) =
1931
- * WP rocket conflict solved
1932
- * Cannot set property ‘innerHTML’ of null issue fixed
1933
-
1934
- = 0.9.45.3 (21 March 2017) =
1935
- * Post 0.9.45 bugs fixed and released as an urgent update.
1936
-
1937
- = 0.9.45.1 (19 March 2017) =
1938
- * Post 0.9.45 bugs fixed and released as an urgent update.
1939
-
1940
- = 0.9.45 (18 March 2017) =
1941
- * View more details at https://ampforwp.com/0-9-45-released-compatibility-rtl-53rd-update/
1942
- * W3Total cache compatibility added
1943
- * RTL Support added for Right-to-Left language websites.
1944
- * Comments Pagination feature added
1945
- * WP-Rocket Compatibility added
1946
- * WPML Compatibility added
1947
- * Quantcast analytics support added
1948
- * ComScore support added
1949
- * Custom Yoast title support added #685
1950
- * WooCommerce Shortcode: Allows you to display WooCommerce Products. [amp-woocommerce num=6] will display the 6 products from WooCommerce. [amp-woocommerce num=6 link=noamp] will display 6 products but they will go to non-amp website, if you want to link to AMP version of the page then use [amp-woocommerce num=6 link=amp]
1951
- * Admin area UX improvements
1952
- * Adding notifications script in the correct way
1953
- * Comments now display on frontpage as well.
1954
- * Re-positioned non-amp Header link control to the right section.
1955
- * ?nonamp=1 only displays when the Mobile redirection is on
1956
- * Properly adding iFrame js.
1957
- * Custom Post type incompatibility fixed
1958
- * Widgets added to the Custom Frontpage.
1959
- * Stripping shortcodes from excerpts.
1960
- * Custom content on static frontpage had over riding issue #687
1961
- * Option added for controlling number of comments
1962
- * Welcome page should be shown only if user is “administrator” #696
1963
- * Digg Digg social share compatibility #694
1964
- * Removed unnecessary lines from Design 3
1965
- * Sanitized Archive Description to amp Compatible #659
1966
- * Author box now displays HTML properly #645
1967
- * Date added Design-3 in meta #583
1968
- * Options link was removed from wp-admin tool bar after a feedback from a user.
1969
- * Footer sub menus layout compatibility.
1970
-
1971
-
1972
- = 0.9.44 (5 March 2017) =
1973
- * View more details at https://ampforwp.com/user-experience-52nd-update/
1974
- * Added Welcome Screen for better User experience. [Enhancement]
1975
- * Undefined Index debug error resolved [Bug fix]
1976
- * All in one SEO Support support tested [3rd party compatibility]
1977
- * Frontpage title in Design 3 is out of the container #644 [Bug fix]
1978
- * Default Table markup in AMP #643 [Enhancement]
1979
- * AMP carousel is not working on Frontpage #641 [Bug fix]
1980
- * Social share .js was getting added even when it was not required #638 [Bug fix]
1981
- * Search Feature added for Design 1 & Design 2 [Major Improvement]
1982
- * Accordion script loading issue in Design 3 #634 [Bug fix]
1983
- * ?nonamp=1 links should be nofollow #622 [Bug fix]
1984
- * Same Header and Color Scheme are making header elements invisible #629 [Enhancement]
1985
- * In Search AMP rel canonical was different #631 [Bug fix]
1986
- * Non-AMP link in Design 3 was not working when mobile redirection was enabled #632 [Bug fix]
1987
- * Search form text strings are now added in the translation panel #607 [Bug fix]
1988
- * Load AMP-ads conditionally only if ads are available #609 [Bug fix]
1989
- * Added compatibility with Custom post type extension. Option to hide/show AMP on all custom post types #587 [Bug fix]
1990
- * Report a Bug & Request feature links added [Enhancement]
1991
- * If there was no menu set in Design 3 then all pages were getting displayed. #613 [Bug fix]
1992
- * The tag Font is disallowed #616 [Validation Improved]
1993
- * index/noindex separately added for Tags and also for Categories #606 [Enhancement]
1994
- * Use of undefined constant AMP_QUERY_VAR #596 [Bug fixed]
1995
- * Logo is not centered in Design 3 #586 [Bug fixed]
1996
- * Remove defer, a very rare type of defer was getting added #589 [Validation Improved]
1997
- * Disqus comments iframe had scrolling issues #566 [Bug fixed]
1998
- * Left side blank gap in the RTL in design 2 #541 [Bug fixed]
1999
- * Inline Styles not working correctly in Custom AMP Editor #533 [Bug fixed]
2000
- * Re-save permalinks issues. Flushing rewrites with options saved. #511 [Improvement]
2001
- * Code review and cleaning of the customizer #404 [Code Cleaning]
2002
- * Google Search iframe had some header alignment issues in Design 3. #624 - Thank you Leo Osa @leoosa for the contribution! [Bug fixed]
2003
- * AMP Frontpage + Override AMP Content = Blank page #604 [Bug fixed]
2004
- * Widget area added on the homepage with an 'AMP Category Blocks' widget. It means you can display multiple category blocks the homepage. This allows you to display complex layouts, even on AMP. [Major Improvement]
2005
- * Auto-append /amp at the end of internal links in Menu with an option in the Menu section of the options panel #531 [Major Improvement]
2006
- Reformatting and Minifying of stylesheet [Code Cleaning]
2007
- * Created a new section for Homepage and moved some controls from other areas to the home section for the better user experience. [User Experience]
2008
- * Override Homepage Thumbnail size option added. It will give you more control over your thumbnails. [Major Improvement]
2009
- * New color picker added to change the color of the header elements in the Design 3 to give you better control over the design. [Enhancement]
2010
- * Extra amp-carousel script loading is now fixed. [Bug fixed]
2011
- * Crafting of layout code in design 2 and design 3, especially with social icons area. [Code Cleaning]
2012
- * Design of search form was not clickable in iOS devices #621 [Bug fixed]
2013
- * Disqus iframe was loading even when there was no disqus name was added in the option. We found that many users might be enabling it without knowing the output and then they seem to forget, which was causing them validation warnings. [Bug fixed]
2014
-
2015
- = 0.9.43.6 =
2016
- * View more details at https://ampforwp.com/stability-sprint-3-51st-update/
2017
- * Typo in the is_home() function fixed
2018
- * Option to hide/show AMP on all custom post types #587
2019
- * False detection by Windows defender tool fixed
2020
- * Conditional tags were not compatible with Advanced AMP ads which were causing some conflicts but is now fixed.
2021
-
2022
- = 0.9.43.5 =
2023
- * View more details at https://ampforwp.com/stability-sprint-2-50th-update/
2024
- * Fixed shortcodes issue in related posts #543
2025
- * Iframe Scripts Added properly
2026
- * Proper conditions added for the social section of Design 3
2027
- * Featured Image issue stretched in Design 2 & 3
2028
- * Removed extra global $redux_builder_amp;
2029
- * Custom Logo Dimensions option added #479
2030
- * Index & NoIndex options added for SEO section. #558
2031
- * Added URL for rewrite flushing rules in Options
2032
- * Option to enable and disable the Author area in Design 3#577
2033
- * Rel Nofollow added in credit link
2034
- * debug issue solved: fn_offset not defined
2035
- * debug issue solved: global $post not declared
2036
- * The word 'ago' is now translatable in design 3
2037
- * The word 'read next' is translatable now
2038
- * Tablepress compatibility added #392
2039
- * Secure API server is now serving through Google Cloud Manager.
2040
- * Thrive Content builder was displaying twice when the Custom AMP content was on. It was a complex issue which has been solved now.
2041
- * amp-ad extension.js script was loading if the Ads are not enabled. #598
2042
- * Social Share Extension Included on Homepage even if we didn't have social icons #599
2043
- * Installation UX improvement #593
2044
- * Removed duplicate global variable
2045
- * Proper OG tags added #588
2046
- * Proper instructions added for Custom AMP content #471
2047
-
2048
-
2049
- = 0.9.43.1 =
2050
- * View more details at https://ampforwp.com/0-9-43-1-released-stability-sprint-1-49th-update/
2051
- * Emoji in comments leads to AMP errors
2052
- * Design 1 showing time on archives
2053
- * Added some space between the archive label.
2054
- * Lazy loading plugins compatibility #544
2055
- * Custom header and footer areas
2056
- * Sticky posts now come on top #564
2057
- * Footer non-amplink added in design 3 #562
2058
- * HTML Paragraph tag is shown in the title in category! #518
2059
-
2060
- = 0.9.42 =
2061
- * View more details at https://ampforwp.com/design-three-update/
2062
- * Design 3 was released – Video Overview along with new options and features. View the video overview at: https://www.youtube.com/watch?v=ub1pwskt3Rc [Major Feature]
2063
- * Ticket #517 – Added Upload field into Redux core [3rd party Compatiblity]
2064
- * Ticket#529 Controls for archive titles added [Improvement]
2065
- * Ticket #548 Jetpack photon code removed
2066
-
2067
- = 0.9.41 =
2068
- * View more details at https://ampforwp.com/disqus-comments-in-amp/
2069
- * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
2070
- * AMP WooCommerce supported tag was missing after the last update. [Bug fix]
2071
- * Homepage & Related Posts was displaying private and protected posts, which is now fixed [Bug fix]
2072
- * Next previous links added in Design 1 [Enhancement]
2073
- * Invalid Post Time displaying in the homepage of Design 1 [Bug fix]
2074
- * Twitter share now includes the twitter handle of the author with setting in options [Enhancement]
2075
- * Emoji in comments leads to AMP errors was fixed [Bug fix]
2076
- * Date are now displayed on archives in Design 1 [Enhancement]
2077
- * When RTL enabled logo merges with nav bar was fixed [Bug fix]
2078
- * Jetpack Photon compatibility added [3rd Party Compatibility]
2079
-
2080
- = 0.9.40 =
2081
- * View more details at https://ampforwp.com/0-9-40-released-biggest-stability-update/
2082
- * Proper endpoints added [Improvement]
2083
- * Flush Rewrites properly [Improvement]
2084
- * REL Canonical properly getting added. [Improvement]
2085
- * Proper Frontpage Canonical added [Improvement]
2086
- * Added Base name support for categories and tags [Improvement]
2087
- * Redirection of excluded post solved. [Bug fix]
2088
- * Archives properly redirecting to the right URL [Bug fix]
2089
- * Homepage redirection solved [Bug fix]
2090
- * Plusone tag is stripped properly. [Validation Issue fixed]
2091
- * Archives are now clickable. [Improvements]
2092
- * WP_Query filter added for better customizability of Homepage loop. [Better Customizations]
2093
- * Social share boost plugin compatibility. [3rd party Customizations]
2094
- * Removed H1 from the frontpage even if it is not available. [Improvement]
2095
- * H3 instead of H1 for Site title. So there is only one H1 per page. [SEO Improvement]
2096
-
2097
- = 0.9.38 =
2098
- * View full details at https://ampforwp.com/google-tag-manager-for-amp/
2099
- * Google Tag manager included [New feature]
2100
- * Iframe max-width added [Improvement]
2101
- * Paginated pages have different titles now. [Bug fix]
2102
-
2103
- = 0.9.37 =
2104
- * View full details at https://ampforwp.com/category-tags-archive-support-added/
2105
- * Debug issues solved [Bug fix]
2106
- * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
2107
- * Category, Tags & Archive Support with titles added [Enchancement]
2108
- * Archive Title support added [Enchancement]
2109
- * There were some issues with attachments [Bug fix]
2110
- * removed ? from amp url's [Improvement]
2111
- * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
2112
- * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
2113
- * Added an option to turn off AMP support for Homepage. [Enchancement]
2114
- * Too many redirects issue on homepage is fixed #435 [Improvement]
2115
- * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
2116
- * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
2117
- * Comment anchor link changed for simplecomment button files in both designs [Improvement]
2118
- * Redirection Loop issue fixed [Bug fix]
2119
- * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
2120
- * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
2121
- * Improved Sessions [Improvement]
2122
- * Advnaced Settings panel was created for better user experience. [Improvement]
2123
- * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
2124
- * RTL issue fixed #454 [Bug fixed]
2125
-
2126
- = 0.9.36 =
2127
- * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
2128
- * Redux Core Update. Better compatibility with the Salient theme and Themeforest themes & plugins using redux framework in their core, which makes the plugin much stable. [Huge Improvements]
2129
- * Hide advertisement section if advance ads plugin is active. [Better User experience]
2130
- * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
2131
- * Launch Post Builder button added. One of the important feature called ‘Post Builder’, that is drag and drop post builder was somewhere hidden in the customizer, so positioned it for better visibility from users. [Better UX]
2132
-
2133
- = 0.9.35 =
2134
- * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
2135
- * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
2136
- * Attachment page was having the wrong endpoint. [Bug fix]
2137
- * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
2138
- * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
2139
- * Lang attributes were added [Enhancement]
2140
- * The tag like was disallowed in the AMP [Validation Improvement]
2141
- * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
2142
- * AMP on Pages option was not working in some cases. [Bug fix]
2143
- * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
2144
- * g:plusone tag was not getting removed properly. [Validation Improvement]
2145
- * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
2146
- * Structured Data Image width issue solved [Enhancement]
2147
- * BJ Lazy Load was having issues, we have added a fix which will make this plugin compatible with the AMP. [3rd party Compatibility & Validation Improvement]
2148
- * imageanchor=”1″ was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
2149
-
2150
- = 0.9.34 =
2151
- * Newspaper theme by Tagdiv was having issues, we have fixed this one.
2152
-
2153
- = 0.9.33 [15th Jan 2017] =
2154
- * Full details at https://ampforwp.com/debug-errors-shortcodes/
2155
- * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
2156
- * Debug errors fixed, Code is now much cleaner.
2157
- * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
2158
- * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
2159
- * Properly removes AMP if turned off from Post panel
2160
- * z-index position improved on Sticky Social bar
2161
- * Better compatibility with shortcodes.
2162
- * Divi Standard Layouts Compatibility
2163
- * Properly Hide AMP posts if excluded. #367
2164
- * Mobile redirection was causing loop issues which are now fixed.
2165
- * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
2166
- * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
2167
- * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
2168
- * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
2169
-
2170
- = 0.9.32 [7th Jan 2017] =
2171
- * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
2172
- * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
2173
- * Paginated pages on homepage redirect to homepage URL #335
2174
- * Title of the page should be displayed on the FrontPage #358
2175
- * Thrive Builder AMP Validation Compatibility, so it will be validated properly in AMP.
2176
- * Twitter Sharing improved so it gets the data properly #341
2177
- * Option to change the number of Related Posts #290
2178
- * Validation errors due to rel="canonical" was missing on some pages
2179
- * Comment button displays even if the comments are not available
2180
- * Threaded comments were duplicating, so that issue is solved and added proper CSS for it.
2181
- * Minor issue with Jetpack Comments fixed.
2182
- * Missing amp-social-share.js on front page fixed #372
2183
- * Minor improvements to Title and description tags.
2184
- * Analytics Script was loading twice when Glue was active.
2185
- * Page specific class added for better customization compatibility #377
2186
- * Inline Style support added Fixed #356
2187
- * Bugs fixed in Email notification pointer
2188
-
2189
- = 0.9.31 [2nd Jan 2017] =
2190
- * Proper Details at https://ampforwp.com/amp-0-9-31-released-installation-user-experience/
2191
- * Proper Condition added for the scripts to load in Frontpage.php
2192
- * Rel canonical properly added for front pages
2193
- * 404 and Archive page Mobile redirection code refined
2194
- * User Experience Improvement: Installation process was improved
2195
-
2196
- = 0.9.3 [31th December 2016] =
2197
- * Proper Details at https://ampforwp.com/custom-amp-content-editor/
2198
- * Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
2199
- * FrontPage had some validation issues. [Bug fix]
2200
- * Related posts in Design 1 we're redirecting to 404 fixed [Bug fix]
2201
-
2202
- = 0.9.2.2 [27th December 2016] =
2203
- * Proper Details at https://ampforwp.com/polishing-user-experience-improvements/
2204
- * Made the Options panel user-friendly
2205
- * Social Share on frontpage issue fixed.
2206
- * Readme.txt made user-friendly.
2207
- * Archive option removed and some UI improvements
2208
- * Single was not displaying the Title
2209
- * 'Type is not allowed' [Validation issue fixed]
2210
- * noshade tag Validation issue fixed
2211
-
2212
- = 0.9.2.1 [24th December 2016] =
2213
- * Proper Details at https://ampforwp.com/step-towards-fixing-amp-validation-errors/
2214
- * Disabled the Tags and Categories support for AMP for better validation until we find a better solution.
2215
- * Mobile redirection bug fixed, It was continuously redirecting to the same page [Bug fix]
2216
- * trailingslashit added to make sure we have proper url for Mobile redirection [Bug fix]
2217
- * In content AD overlapping the content issue fixed
2218
-
2219
- = 0.9.2 [23th December 2016] =
2220
- * Proper Details at https://ampforwp.com/mobile-redirection/
2221
- * AMP Mobile Redirection Feature added. It can be turned on from Dashboard > General and then Mobile Redirection. [New Feature]
2222
- * Archive title and description added [Improvement]
2223
- * Improved the Speed of the AMP version #321 [Improvement]
2224
- * Anchor link was not closing fixed #328 [Bug Fix]
2225
- * Typo in Trailingslashit function which resulted in some issues in the Homepage version [Bug Fix]
2226
-
2227
- = 0.9.1.2 [20th December 2016] =
2228
- * Proper Details at https://ampforwp.com/new/
2229
- * DoubleClick Support
2230
- * Custom Post Type Support
2231
- * Ratings Support
2232
- * Comments Gaping fix
2233
- * Custom Excerpt code
2234
- * Better Compatibility with Yoast SEO plugin
2235
- * AMP Validation error in Design 1 Fixed
2236
- * Proper Homepage title & Description with Yoast SEO plugin issue fixed
2237
- * Design -1 Excerpt too big for mobile devices, Fixed
2238
- * Advertisement support on Design 1
2239
- * Link to Tags & Categories were having some issues.
2240
- * AMP looking bad on big devices
2241
- * AMP validation Improvement: Lightbox plugins compatibility
2242
- * Huge Progress in AMP Validation Errors: Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
2243
- * Page Performance: Removed default Google font loading
2244
- * Page Performance: DNS Prefetch tag added for faster DNS Handshake
2245
-
2246
- = 0.9.1 [16th December 2016] =
2247
- * Proper Details at https://ampforwp.com/new/
2248
- * PHP7 Compatibility
2249
- * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
2250
- * Custom CSS not working in Design one (#249)
2251
- * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
2252
- * How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
2253
- * Non-amp Homepage support added (#267)
2254
- * using get_avatar() (#259)
2255
- * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
2256
- * Validation Issue fixed: Script Tag removed from the content.
2257
- * Featured image in Design 1 in single #261
2258
- * After Fresh installation - a save is required Fixed
2259
- * Excerpt length controlled
2260
- * Design One has thumbnails on the Homepage
2261
- * Non-AMP link goes to the wrong page, issue fixed.
2262
- * Archive pages were broken, fixed.
2263
- * Option to Enable & Disable the Next/Previous links in Single
2264
- * WhatsApp sharing not working, issue fixed.
2265
- * Category Taxonomy has extra ':' in the word.
2266
- * The word 'Ago' is now translatable.
2267
- * Yoast SEO with AMP compatibility issue fixed.
2268
- * Several Minor Polishing in the code
2269
- * Footer Ad gets covered by Sticky Social Icons (#269)
2270
- * Smaller image size when “image caption” is used in Design-2 (#263)
2271
- * Footer ad with Sticky Social bar issue fix
2272
- * Checked with WordPress 4.7
2273
- * Ad #1 was messing up with the title, issue fixed.
2274
- * Compatibility improved with AMP WooCommerce.
2275
-
2276
- = 0.9 =
2277
- * Proper Details at https://ampforwp.com/amp-pagebuilder/
2278
- * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
2279
- * 100% Yoast Compatible , Now no need to have additionally Glue Installed
2280
- * 100% completed Translation panel, Now absolutely anything on page is translated
2281
- * Added Option to turn on/off Page Support
2282
- * Styling for Tags was Corrected
2283
- * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
2284
- * Default Image alignment styling added
2285
- * Added Option to turn on/off Page Support
2286
- * Related Posts Now use Custom Excerpt if it Exists
2287
- * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
2288
- * <pre> Tag styling issue fixed for AMP pages
2289
- * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
2290
- * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
2291
- * 2 New Designs added
2292
- * SEO Panel Added
2293
-
2294
- = 0.8.8 =
2295
- * Proper Details at https://ampforwp.com/amp-0-8-8-released-translation-panel/
2296
- * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
2297
- * Badge Tag was throwing Validation error
2298
- * Plusone tag validation error was fixed
2299
- * Time tag was validation error was fixed
2300
- * User experience for Mobile devices was improved
2301
- * Meta info was messing up in smaller devices, it was fixed as well.
2302
- * Internal AMP linking added for Categories and Tags
2303
- * Future errors for AMP ads was fixed
2304
- * Blockquote styling added
2305
- * “Please Activate parent Plugin settings” added for better User Experience.
2306
- * Related Post Ux improvement
2307
- * Plugin version added in Footer source code for better debugging
2308
- * Added Support for Default WordPress Image alignment
2309
- * New action hooks added in index page
2310
- * Featured Image Size options added
2311
-
2312
- = 0.8.7 =
2313
- * Proper Details at https://ampforwp.com/amp-0-8-7/
2314
- * added option to enable/disable AMP on Archive pages (Ticket #188)
2315
- * Solved 404 on Related Posts (Ticket #178 )
2316
- * Related posts by either categories or Tags(Ticket #179)
2317
- * added a link to menu Section from the AMP Options page(Ticket #190)
2318
- * Added Support for Piwik Analytics(Ticket #163)
2319
- * Added Support for Segment.com Analytics(Ticket #50)
2320
- * Added a switch for hiding Non-Amp page link from Footer.( Ticket #189)
2321
- * Added an Option that strips Users URL from Comments Section(Ticket #180)
2322
- * Fixed stripping <date> tags from the content , Since it was preventing validation – amp-img issues fixed
2323
- * UX Improved for every section of AMP Options page
2324
- * Added Settings button on plugin page
2325
- * Related posts switch added
2326
- * Removed carousel.js
2327
-
2328
-
2329
- = 0.8.6.1 =
2330
- * Date Tag fix
2331
- * Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
2332
-
2333
- = 0.8.6 =
2334
- * Proper Details at https://ampforwp.com/amp-0-8-6-released-related-posts-comments/
2335
- * Related Posts
2336
- * Post Comments
2337
- * WhatsApp sharing button Your visitors can now easily share the content over the whatsapp.
2338
- * Validation issue fixed by All In One Schema.org Rich Snippets plugin
2339
- * Removed Google Fonts loading for Performance
2340
- * New relic Support
2341
- * Class added to ‘View Non-AMP Version’ text
2342
- * Archives Structured Data issue fixed
2343
- * Some instances img tags converted into amp-img automatically.
2344
-
2345
-
2346
- = 0.8.5.3 =
2347
- * Canonical issue fixed for Post
2348
-
2349
- = 0.8.5.2 =
2350
- * Canonical issue fixed for FrontPage
2351
-
2352
- = 0.8.5.1 =
2353
- * Proper Details at https://ampforwp.com/new/
2354
- * Validation issue fixed: 'Value' tag
2355
- * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
2356
- * Validation issue fixed: Table markup
2357
- * Validation issue fixed: nowrap and misc tags
2358
- * New Relic Support
2359
- * Tags on off option
2360
- * Canonical and correct AMP html Redirect issues Solved
2361
- * NextGEN Gallery Validation Support Added
2362
-
2363
- = 0.8.5 =
2364
- * Proper Details at https://ampforwp.com/the-0-4-compatibility/
2365
- * AMP 0.4 Compatibility Check
2366
- * Even better Structured Data Validation, Once in for all!
2367
- * Structured Data Options to eliminate Validation errors
2368
- * AMP Page Exclude option
2369
-
2370
- = 0.8.4 =
2371
- * Proper Details at https://ampforwp.com/blog/structured-data-validation/
2372
- * Structured Data Validation
2373
- * Navigation Text Change
2374
- * Inline Style Validation
2375
- * Form Validation
2376
- * Frontpage shows the amphtml rel twice fixed
2377
- * Facebook Sharing not working
2378
-
2379
- = 0.8.3 =
2380
- * Prefix added in the Content filter
2381
- * Extra space after quote in Ads
2382
-
2383
- = 0.8.2 =
2384
- * Proper Details at https://ampforwp.com/blog/the-custom-frontpage/
2385
- * Custom AMP FrontPage
2386
- * Featured Image
2387
- * New Mobile Friendly Advertisement sizes
2388
- * Single Post Pagination Option
2389
- * RTL Support
2390
- * Notifications
2391
- * Gaping if the Meta was turned off.
2392
- * Analytics was not fetching the user id properly.
2393
- * Page was not using the post template along with the AD support.
2394
- * AMP Endpoint support for Paged when the front page is active.
2395
- * UI improvement of Admin panel
2396
- * Few Validation issues fixed
2397
-
2398
- = 0.8.1 =
2399
- * Warning: Cannot modify header information error fixed
2400
- * Validation issue fixed. KK Star Plugin compatible.
2401
- * Gaping in the smaller screens fixed
2402
-
2403
- = 0.8 =
2404
- * Proper Details at https://ampforwp.com/blog/the-change/
2405
- * Plugin was re-written from scratch and is now built on top of default AMP plugin by Automattic but giving you the same features of the original plugin.
2406
- * 99.5% Validation issues were fixed.
2407
- * Page builder & Shortcodes Compatibility Support Added
2408
- * Conflict with JSON API
2409
- * Carousel support for Gallery
2410
- * Better Image stretching and resizing
2411
- * Youtube Video Embed Support
2412
- * Vine Embed Support
2413
- * Twitter oembed Support
2414
- * Instagram Embed Support
2415
- * Facebook Video Embed Support
2416
- * Better Future Compatibility
2417
-
2418
- = 0.7.7 =
2419
- * Proper Details at https://ampforwp.com/blog/amp-0-7-7/
2420
- * Big Validation Error fix Update
2421
- * Disable AMP support on specific Pages and Posts
2422
- * Option to disable the Post meta from the Single
2423
- * Footer Credits and Copyright Text Option
2424
- * New options for Social Sharing Bar in Single
2425
- * Jetpack Social & Related Sharing Issue fixed
2426
- * Gaping in footer if the Sticky bar is enabled
2427
- * Text domain added on few strings
2428
-
2429
- = 0.7.6 =
2430
- * Google Adsense Support Added with AMP-Ad
2431
- * Wrong Homepage rel amphtml bug fixed
2432
-
2433
- = 0.7.5 =
2434
- * Google Analytics Support Added
2435
- * Logo Support Added. If the logo is disabled, then the Title should be activated.
2436
- * Color Scheme Feature Added
2437
- * User friendly Options Panel Added
2438
- * iFrame support Added
2439
- * Few Minor Bugs Fixed
2440
-
2441
- = 0.7.1 =
2442
- * Bug #24 (Github) fixed
2443
- * Strip Style tags for faster & better validation
2444
- * Bug #21 (Github) fixed
2445
-
2446
- = 0.7 =
2447
- * Canonical Improved
2448
- * Navigation Validation bug fixed
2449
- * Two more validation bugs fixed ('role' and 'tabindex' attribute)
2450
- * Featured image automatically hides if it is not present
2451
- * Validation issues in the images of the post's the_content
2452
-
2453
- = 0.6 =
2454
- * Improved Navigation Menu
2455
- * Search Console errors fixed
2456
- * Social Sharing option
2457
- * Pages support
2458
- * Force redirection for mobile users removed and many other bug fixes
2459
-
2460
- = 0.5 =
2461
- * Added AMP Markup for Google Structured data. This will fix the issues in Webmaster tools.
2462
-
2463
- = 0.4 =
2464
- * Support of Custom menu added for AMP enabled sites
2465
-
2466
- = 0.3 =
2467
- * Support of amp-img added in single posts
2468
- * minor css bug fixed
2469
-
2470
- = 0.2.5 =
2471
- * Minor bugs fixed
2472
- * ?mobile & ?nomobile is now ?amp & ?noamp
2473
-
2474
- = 0.2 =
2475
- * White Screen of death issue fixed
2476
- * Plugin URI updated
2477
-
2478
- = 0.1 =
2479
- * Initial version
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === AMP for WP - Accelerated Mobile Pages ===
2
+ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
+ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
+ Donate link: https://www.paypal.me/Kaludi/25
5
+ Requires at least: 3.0
6
+ Tested up to: 5.2
7
+ Stable tag: 0.9.97.55
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ AMP for WP is the most recommended AMP plugin by the community. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site.
12
+
13
+ == Description ==
14
+ AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) functionality to your WordPress site. AMP makes your website faster for Mobile visitors.
15
+
16
+ [What's New in this Version?](https://ampforwp.com/new/) | [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) | [View Demo](https://ampforwp.com/demo/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](https://ampforwp.com/help-center/)
17
+
18
+ <strong>Extensions</strong><br>
19
+ Some useful extensions to extend AMP features, check [AMP Adsense Support](https://ampforwp.com/advanced-amp-ads/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Contact Form 7 Support](https://ampforwp.com/contact-form-7/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Email Opt-in Support](https://ampforwp.com/opt-in-forms/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) and [Call To Action Support](https://ampforwp.com/call-to-action/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin). To view more, go to our [Extensions page](https://ampforwp.com/extensions/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin).
20
+
21
+ <strong>Support</strong><br>
22
+ We try our best to provide support on WordPress.org forums. However, We have a special [community support](https://ampforwp.com/help-center/) where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.
23
+
24
+ <strong>Bug Reports</strong><br>
25
+ Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages). Please note GitHub is _not_ a support forum, and issues that aren't properly qualified as bugs will be closed.
26
+
27
+ = Features: =
28
+
29
+ * NEW - Gutenberg Support
30
+ * NEW - Divi and Elementor Support [More Info](https://ampforwp.com/amp-pagebuilder-compatibility/)
31
+ * NEW - Addthis Sharing Support
32
+ * NEW - AMP Infinity Scroll Support
33
+ * NEW - Revolution Slider plugin Support
34
+ * NEW - Photo Gallery by 10Web Support
35
+ * NEW - MEWE social network Support
36
+ * NEW - GDPR Compliance
37
+ * Introducing Page Builder 3.0 for AMP! [Learn More & Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
38
+ * New Default Theme for AMP called Swift
39
+ * 3 Pre-built AMP Layouts for Business websites and landing pages
40
+ * Alexa Metrics Compatibility added
41
+ * OneSignal Push Notifications integration
42
+ * Advanced WooCommerce Support [More Info](https://ampforwp.com/woocommerce/)
43
+ * Gravity Forms Support [More Info](https://ampforwp.com/gravity-forms/)
44
+ * AMP Plugins Manager - Which allows you to disable a specific plugin functionality only in the AMP version
45
+ * Structured Data Options
46
+ * Page Break / NextPage (Pagination) Support
47
+ * Contact Form 7 Support [More Info](https://ampforwp.com/contact-form-7/)
48
+ * Graviry Form Support [More Info](https://ampforwp.com/gravity-forms/)
49
+ * Caldera Form Support [More Info](https://ampforwp.com/caldera-forms-for-amp/)
50
+ * Ninja Form Support [More Info](https://ampforwp.com/ninja-forms/)
51
+ * Facebook Comments Support
52
+ * Github Gist Support
53
+ * Email Opt-in Subscription form support in AMP added
54
+ * Call to Action boxes and notification bars
55
+ * 9 Advertisement sizes - 2 More AD slots added recently
56
+ * Comments Forms in AMP.
57
+ * Native AMP Search functionality.
58
+ * Design 3 [Watch the Video Overview](https://www.youtube.com/watch?v=ub1pwskt3Rc)
59
+ * Disqus Comments Support
60
+ * Google Tag Manager Support
61
+ * Page, Category & Tags Support Added
62
+ * Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
63
+ * Mobile Redirection - More than 50% of your traffic is from mobile and you aren’t doing anything to improve their user experience, which means you are falling behind on SEO and it can result in lower SERPS. Lightning fast mobile version means faster User experience means more engagement which directly results in the lower bounce rate.
64
+ * Custom Post Type Support
65
+ * Star Ratings
66
+ * Drag & Drop Page builder Added
67
+ * 4 Designs for AMP
68
+ * Yoast SEO support on AMP pages and other SEO plugins
69
+ * AMP WooCommerce Support
70
+ * Switch on/off Support for Pages & Posts on AMP
71
+ * Translation Panel & RTL
72
+ * Internal AMP linking - You can browse AMP pages internally
73
+ * Related posts below the post
74
+ * Recent Comments list
75
+ * Automatically integrate AMP to your website.
76
+ * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
77
+ * Google Analytics Support.
78
+ * User Friendly Theme Options Panel.
79
+ * Unlimited Color Scheme.
80
+ * Image Logo Upload.
81
+ * Supports Posts and Pages and other custom post types.
82
+ * Proper rel canonical tags which means that Google know the original page.
83
+ * Overlay Navigation Menu bar.
84
+ * Social Sharing in the Single.
85
+ * Sexy Design.
86
+ * Separate WordPress Menu for AMP version.
87
+ * Page builder & Shortcodes Compatibility.
88
+ * Carousel support for Gallery.
89
+ * Better Image stretching and resizing.
90
+ * Youtube Video Embed Support.
91
+ * Vine Embed Support.
92
+ * Twitter oembed Support.
93
+ * Instagram Embed Support.
94
+ * Facebook Video Embed Support.
95
+ * RTL Support
96
+ * Custom AMP FrontPage
97
+ * Notifications
98
+ * Chartbeat, Hi-stats, Yandex Metrika, Piwik, Segment.com, StatCounter, Effective Measure and comScore Support
99
+ * Incontent & DoubleClick Support
100
+ * Great Support & Active Development.
101
+ * Widgets & WooCommerce
102
+ * Genesis SEO Support
103
+ * Breadcrumb Support added
104
+ * Facebook Instant Articles Support Added
105
+ * AMP Installation Wizard that makes it easy to setup for new users.
106
+ * Category base remover support
107
+ * Tag base remover support
108
+ * 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber)
109
+ * AMP Theme Framework Core Support Added. You can now create AMP templates of your own in just minutes. **[More](https://ampforwp.com/amp-theme-framework/)**
110
+ * NEW - Make AMP & Non-AMP Same with just one click!
111
+ * NEW - Allows you to use AMP as primary website!
112
+
113
+ **[JOIN CHAT GROUP COMMUNITY](https://ampforwp.com/community/)**: Purpose of this group is to get proper suggestions and feedback from plugin users and the community so that we can make the plugin even better.
114
+
115
+ = Getting Started: =
116
+ **[1. User Documentation:](https://ampforwp.com/help/)** The AMP for WordPress plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.
117
+
118
+ **[2. Developer Docs:](https://ampforwp.com/tutorials/article-categories/developer-documentation/)** We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.
119
+
120
+ **[3. Support:](https://ampforwp.com/help-center/)** We try our best to provide support on WordPress.org forums. However, We have a special community support where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.
121
+
122
+ **[4. Premium Support:](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin)** We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.
123
+
124
+
125
+ == Installation ==
126
+ **[Visit Help area for the Documentation:](https://ampforwp.com/help/)**
127
+
128
+ [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
129
+
130
+ **[Visit Help area for the Documentation:](https://ampforwp.com/help/)**
131
+
132
+
133
+ == Frequently Asked Questions ==
134
+
135
+ = Can I add analytics? =
136
+
137
+ Yes, you easily can. In fact, we have support for 12 Analytics companies. Including Google Analytics, Facebook Pixel, StatCounter, QuantCast, Chartbeat, comScore to list a few. Also, we have Google Tag Manager (GTM) support as well.
138
+
139
+ = Can I add Ads in my AMP pages? =
140
+
141
+ Yes, you can. We have 6 ad placement slots that are built in and strategically placed to get maximum views. Also, we have [an extension](https://ampforwp.com/advanced-amp-ads/) from which you can insert ads between the content, will get more ad slots and also add custom banners to all the available slots.
142
+
143
+
144
+ = Can I extend/Change the AMP design, so it suits my needs? =
145
+
146
+ Yes, you easily can. We have created this plugin in such a way that it can easily be extended. Check out our [AMP Theme Framework](https://ampforwp.com/tutorials/article/getting-started-amp-framework/)
147
+
148
+
149
+ = Do you have any prebuilt designs? =
150
+
151
+ Yes, we have AMP themes section where we have free and paid designs available. We also update it regularly. You can check it out our [AMP Themes](https://ampforwp.com/themes)
152
+
153
+
154
+ = I'm a developer and I want to add custom functionality for a client, can I do that? =
155
+
156
+ Yes, of course. This plugin is very developer friendly, we have lots of hooks and filters that you can use to extend and customize according to the requirements. Also, we have [developer documentation](https://ampforwp.com/tutorials/article-categories/developer-documentation/) which we update regularly.
157
+
158
+
159
+ = How do I report bugs and suggest new features? =
160
+
161
+ You can report the bugs [here](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages/issues)
162
+
163
+ = Will you Add New features to my request? =
164
+
165
+ Yes, Absolutely! We would suggest you send your feature request by creating an issue in [Github](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages/issues/new/) . It helps us organize the feedback easily.
166
+
167
+
168
+ = How do I get in touch? =
169
+
170
+ You can contact us from [here](https://ampforwp.com/contact/)
171
+
172
+
173
+ == Screenshots ==
174
+ 1. AMP Homepage
175
+ 2. AMP Single Post
176
+ 3. Post Navigation in Single
177
+ 4. Sticky Social sharing icons
178
+ 5. Overlay Navigation menu sidebar.
179
+ 6. Page builder of the Single article. You can drag and drop any element.
180
+ 7. Single post of Design One
181
+ 8. GTMetrix Performance Report
182
+ 9. Google PageSpeed Insight report for AMP
183
+ 10. Homepage of Design One
184
+ 11. Pingdom Speed Report for AMP
185
+
186
+ Device testing done through [BrowserStack](https://www.browserstack.com)
187
+ ![BrowserStack](https://user-images.githubusercontent.com/16618009/53022655-a24ea780-3481-11e9-9a48-a2ca5bcd96d6.png)
188
+
189
+ == Changelog ==
190
+
191
+ = 0.9.97.55 (28th May 2019) =
192
+ * Improvement: Rank Math compatibility with V1.0.24 #3177
193
+ * Improvement: Related posts and Recent posts on custom posts types #2708
194
+ * Improvement: Appearance Designs for Related Posts #1545
195
+ * Improvement: Integration with EWWW IO and ExactDN. #2805
196
+ * Improvement: rel = "nofollow" to the links of social platforms in menu and footer, in all designs #2999
197
+ * Improvement: Option to display the Post title on Breadcrumb #3019
198
+ * Improvement: Map module in AMP pagebuilder #1629
199
+ * Improvement: Pagination support in category module of AMP pagebuilder #1676
200
+ * Improvement: Time Stamp support in category module of AMP pagebuilder #2648
201
+ * Improvement: Lightbox feature for Slider module of AMP pagebuilder #2646
202
+ * Improvement: Privacy page option in Notice Bar (Cookie Consent) #2347
203
+ * Improvement: SmartMag theme's Featured video Compatibility integrated #2559
204
+ * Improvement: New filter to modify the links of breadcrumbs, comment button and the non-amp version link in footer #2664
205
+ * Improvement: New filter to modify the single featured image #2896
206
+ * Improvement: "AMPforWP PageBuilder" option added in the page builder section #2414
207
+ * Fixed: PHP debug warning #3128
208
+ * Fixed: Fatal error after update 0.9.97.51 #3156
209
+ * Fixed: Unwanted code on username of comment in Design [1, 2 & 3] #3022
210
+ * Fixed: Issues with Content Sneak Peak Feature #2504
211
+ * Fixed: In Feature module of AMP pagebuilder, Bullet points are not aligned correctly #2554
212
+ * Fixed: Image URL replacement on AMP page not correct and aq_resizer not working with cdn images #2659
213
+ * Fixed: 'Twitter' Option and 'Pretty Permalinks for Twitter Share' Option generate the same URL #2662
214
+ * Fixed: Need to align the Radio Button (Show/Hide) in the Arabic language #2818
215
+ * Fixed: In NewsArticle, the ArticleBody and Description are missing from the AMP page #3005
216
+ * Fixed: WP Subtitle Compatibility code updated #3175
217
+ * Fixed: For Menu pages where AMP support is OFF, still getting added due to Auto Add AMP in Menu URL option #2897
218
+ * Fixed: E-commerce section code updated #3012
219
+ * Fixed: Pagebuilder section code updated #3014
220
+ * Fixed: 'Fix AMP Errors' section should not be displayed if he's a premium customer #3027
221
+ * Fixed: Use Ajax to fetch all Categories and tags in Featured Slider in Design-3 #2590
222
+ * Fixed: Debug error after enabling redirection #3174
223
+ * Fixed: The tag 'amp-next-page with inline config' appears more than once in the document #3214
224
+ * Fixed: Correct conditions for PageBuilder and Elementor for Page.php in Swift #3097
225
+ * Fixed: is_amp_endpoint issue - code updated #3055
226
+
227
+ = 0.9.97.54 (23rd May 2019) =
228
+ * Fixed: HUGE PERFORMANCE Issues #3052
229
+ * Fixed: Performance Issue with queries #2997
230
+ * Fixed: Performance Issues with template_redirect hooks #2773 #2920
231
+ * Fixed: Performance Issues with Design manager #2873
232
+ * Fixed: Performance Issues with ampforwp_exclude_post option #3118
233
+ * Fixed: Performance Issues with AMP Pagebuilder modules and settings which were loading By default #2323
234
+ * Fixed: Performance Issues with Hide AMP Bulk Tools #2549
235
+
236
+ = 0.9.97.53 (20th May 2019) =
237
+ * Fixed: 500 errors on posts that don't use WP Bakery #3183
238
+ * Fixed: Hyperlink in amp pages including emoji - code improved #2967
239
+ * Fixed: Errors in AMP social Icons #3033
240
+ * Fixed: Code improved to fetch all Categories and tags in Featured Slider [Design -3] #2590
241
+ * Fixed: Fatal error on posts with comments present in latest v0.9.97.52 #3191
242
+ * Fixed: "View Desktop Version" feature is not working in mobile view #3192
243
+ * Fixed: Improved the Extension array code #3206
244
+ * Fixed: Fatal error Uncaught TypeError Argument 1 passed to DOMNode::replaceChild() #3203
245
+
246
+ = 0.9.97.52 (15th May 2019) =
247
+ * Added: Gutenberg Compatibility integrated #2427
248
+ * Added: Gallery Designs for Gutenberg Gallery #2868
249
+ * Added: Gutenburg column support in AMP #2847
250
+ * Added: Addthis Sharing option UX re-structured #3114
251
+ * Added: Photo Gallery plugin compatibility integrated #1811
252
+ * Added: Revolution Slider plugin compatibility integrated #1464
253
+ * Added: Posts offset option on category module in AMP Page Builder #2647
254
+ * Added: MEWE social network integrated #3020
255
+ * Added: Font Size and Color options for Dropcap #3010
256
+ * Added: Breadcrumbs feature for pages #2788
257
+ * Added: More parameters for ampforwp_get_setting functions #2911
258
+ * Fixed: Conditions for PageBuilder and Elementor for Page.php in Swift #3097
259
+ * Fixed: Code updated of Infinite Scroll when AMP Newspaper Theme is active #3031
260
+ * Fixed: Copy the Content in Custom AMP Editor is not working with Gutenberg #2824
261
+ * Fixed: If GTM gets enabled after Enabling the Analytics, then both codes load in the frontend #3121
262
+ * Fixed: P tag is missing when "copy the content" option is used in custom AMP editor #3122
263
+ * Fixed: When AMP is disabled on Homepagepage ?nonamp=1 redirect to random pages(blog) #2904
264
+ * Fixed: Issue with post title and "end point to ?amp" conflict #2991
265
+ * Fixed: Unspecified Type in Structured data for catgories/tags #3071
266
+ * Fixed: PHP Warning date() expects parameter 2 to be long, string given in #2959
267
+ * Fixed: Disquss comment is not scrollable in IOS device #2970
268
+ * Fixed: Vkontakte Share(social icon) does not open in a new tab #3089
269
+ * Fixed: Condition for requiring a file improved #3080
270
+ * Fixed: amp_content() used instead of AMP_Post_Template object in Design [ 1,2 and 3 ] #2700
271
+ * Fixed: Hyperlink in amp pages including emoji not working #2967
272
+ * Fixed: Unused amp js from amp pages removed #3086
273
+ * Fixed: "WP Forms for AMP" setting link is incorrect #3060
274
+ * Fixed: Navigation & alternate menu css is not loading when directory plus theme is active #2963
275
+ * Fixed: link to non-amp under breadcrumbs when Archives support is off. #2885
276
+ * Fixed: AddThis is causing validation error after Update - code updated #3068
277
+ * Fixed: Content not rendering on AMP with the Enfold theme version 4.5.6 #3124
278
+ * Fixed: Tags are also displaying in category selection in the AMP page builder's category module #3082
279
+ * Fixed: Author name won´t show if you disable author bio in swift theme #3131
280
+ * Fixed: Link to non amp feature not works for thumbnail in design one and two #3004
281
+ * Fixed: Multibyte string links aren't working in AMP Version #2556
282
+ * Fixed: Leave Comment link Not working with ?amp #3093
283
+ * Fixed: When Sticky Header is enabled then Jump link's Title is getting hidden under the header #2915
284
+ * Fixed: Facebook comments not displaying if we add number more than 100 in the number of comments #3032
285
+ * Fixed: Featured image and link shared on twitter issues #3075
286
+ * Fixed: Infinity Scroll Option is not working when ?amp option is enabled in version beta #2475
287
+
288
+ = 0.9.97.51.2 (10th May 2019) =
289
+ * Fixed: AddThis is causing validation error after Update #3068
290
+
291
+ = 0.9.97.51.1 (7th May 2019) =
292
+ * Fixed: Can’t use function return value in write context #3155
293
+ * Fixed: Search results not showing for "Select Categories to Hide AMP" option inHide Amp Bulk Tool #3154
294
+
295
+ = 0.9.97.51 (7th May 2019) =
296
+ * Added: Yoast seo breadcrumbs Support #1473
297
+ * Added: Compatibility with UseAnyFont Plugin #2774
298
+ * Added: Compatibility with Slide Anything plugin. #2891
299
+ * Added: Compatibility with Clyp it iframe embed. #2836
300
+ * Added: Compatibility with Lazy Load of Smush and Smush Pro plugin #2990
301
+ * Fixed: Logo on the top of the menu shade looks strange. #3046
302
+ * Fixed: Fatal error: Class 'AMP_Base_Embed_Handler' not found(Due to mediavine plugin) #3119
303
+ * Fixed: Chartbeat Tag Has Incorrect Variables #3017
304
+ * Fixed: If AMP page builder is enabled then unnecessary CSS is also integrated #2470
305
+ * Fixed: Sidebar Improvement and Option for Pages #2499
306
+ * Fixed: “Featured Image from The Content” option should not override the default Set featured image. #2503
307
+ * Fixed: Widgets going out of alignments in Design 1,2 and 3 #2553
308
+ * Fixed: No message if the search didn't find anything. in Swift #2557
309
+ * Fixed: Header with CTA doesn't have the right options and defaults #2567
310
+ * Fixed: Need to separate categories & tags with ( / or , ) in AMP theme framework single page. #2580
311
+ * Fixed: Indentations are getting removed in lists of ul & ol tags. #2781
312
+ * Fixed: When the custom front page has a custom pagination then the AMP pagination returns 404 #2843
313
+ * Fixed: Text widget img element are overlapping with banner ads (Below the header) in design 3 #2845
314
+ * Fixed: Sidebar option is off, do not show widget area in admin panel #2856
315
+ * Fixed: Update Schema for author image #2919
316
+ * Fixed: Sidebar Styling is not properly appearing in the Blog Page #2938
317
+ * Fixed: 404 issue on custom post type pagination #2937
318
+ * Fixed: Notice errors in design-1 sidebar menu when amp menu is unchecked. #2953
319
+ * Fixed: Bootstrap min overriding modal body style. #2987
320
+ * Fixed: Move infinite scroll settings to a correct place #3007
321
+ * Fixed: Add Extension list for the events calendar for amp #3030
322
+ * Fixed: Add Extension list for table of content #3040
323
+ * Fixed: Strip CSS with i-amphtml- name prefix because its causing validation errors #3009
324
+ * Fixed: Need to add an option to delete the saved layouts in pagebuilder. #2801
325
+ * Fixed: Category module not working with recent posts from Version 0.9.97.45 #3117
326
+ * Fixed: Related posts appearing on the top #3151
327
+ * Fixed: Debug error in installation process #3134
328
+
329
+ = 0.9.97.50.1 (1st May 2019) =
330
+ * Fixed: Alignment problem when right sidebar is enable in blog page and there is no featured image in the posts #3057
331
+
332
+ = 0.9.97.50 (29th April 2019) =
333
+ * Added: New Icon of Telegram in all the Designs #2448
334
+ * Added: Swift icon and Font awesome icon option added in Design's global section [Swift theme] #2992
335
+ * Added: Category option added in Design's single section [Swift theme] #2551
336
+ * Added: Yoast author twitter handle compatibility integrated #2133
337
+ * Added: New function ampforwp_get_the_ID() created #2867
338
+ * Fixed: Facebook comment and Like option gives an error when the bbPress plugin is enabled #3006
339
+ * Fixed: When Gutenberg active left sidebar is not visible in page builder modules #2934
340
+ * Fixed: AMP preview functionality showing blank in the preview mode #3029
341
+ * Fixed: Image floats CSS improved in mobile mode #2525
342
+ * Fixed: Related Posts Randomly in Swift theme #2308
343
+ * Fixed: Pricing module content is not center in page builder #2921
344
+ * Fixed: Background image of the page builder is zooming in IOS devices when the parallax effect is enabled #2844
345
+ * Fixed: Footnotes compatibility code updated #2982
346
+ * Fixed: Iframe is not loading when Convert AMP to WP theme (Beta) option is enabled [Swift theme] #2628
347
+ * Fixed: PHP Warning Undefined variable #3103
348
+
349
+ = 0.9.97.49 (26th April 2019) =
350
+ * Added: Addthis Support integrated #2416
351
+ * Added: A3 Lazy Load compatibility #2872
352
+ * Added: Add support for AMP Linker #2546
353
+ * Fixed: Getting validation Error when using the Ivory Search Plugin #2497
354
+ * Fixed: Featured images or article images not showing in latest version #3063
355
+ * Fixed: Condition improved for author box hook #2608
356
+ * Fixed: After Update all AMP Pages Do Not Load and are Not Validated #3062 [ WP Rocket]
357
+ * Fixed: PHP notice Undefined variable wp #3085
358
+ * Fixed: PHP notice Undefined variable wp_query #2803
359
+ * Fixed: Warning message while on WP customizes #3070
360
+ * Fixed: Tag meta name 'viewport' appear more than once when Zox news theme is activate #2971
361
+ * Fixed: PHP notice errors after activating amp-woocommerce plugin #3054
362
+ * Fixed: Fatal error - can't use function return value in write context #3087
363
+ * Fixed: AMP Frontpage: The mandatory tag ‘link rel=canonical’ is missing or incorrect with Rank Math #3061
364
+ * Fixed: Fatal error - is_amp_endpoint issue #3055
365
+
366
+ = 0.9.97.48 (23th April 2019) =
367
+ * Added: Meta genertor #2543
368
+ * Added: Bridge Qode SEO Compatibility integrated #2538
369
+ * Added: Lazy Load of Smush and Smush Pro plugin Compatibility integrated #2990
370
+ * Fixed: Validation errors occur when Wordpress Comments Option is enabled #2989
371
+ * Fixed: Home page displays latest posts instead of custom page when enfold theme activate #2943
372
+ * Fixed: API URL conflict with Mobile redirection #2917
373
+ * Fixed: Instant Article fatal error #2968
374
+ * Fixed: Undefined index fb-instant-page-id PHP notice #2570
375
+ * Fixed: All media queries load in single media query only code updated #2711
376
+ * Fixed: Instant Article feed code updated #3018
377
+ * Fixed: Space after the "data:image/png" part of the base64 encoded CSS background image #2974
378
+ * Fixed: GDPR consent is not working on ios #2876
379
+ * Fixed: PHP Errors in latest v0.9.97.46.1 after activation on fresh WP installation #3028
380
+ * Fixed: Issue with moblie redirection with non-amp link #3021
381
+ * Fixed: Cntr class automatically removed after activating elementor plugin in swift theme #3025
382
+ * Fixed: Javascript Console errors after the v0.9.97.47 update #3079
383
+
384
+ = 0.9.97.47 (19th April 2019) =
385
+ * Added: AMP by Automattic Compatibility integrated #2287
386
+ * Added: Click Mag WP Theme compatibility integrated #2796
387
+ * Added: New filter in contents-module of page builder for raw html #3001
388
+ * Fixed: PHP Warning illegal string offset When AMP layout plugin activate #2951
389
+ * Fixed: CSS is getting breaked in GoodLife theme #2673
390
+ * Fixed: PHP Debug errors in v0.9.97.46 #3011
391
+ * Fixed: Fatal error call to undefined method WPSEO_Options #3008
392
+ * Fixed: Proper escaping in Alexa Analytics #2984
393
+
394
+ = 0.9.97.46.1 (10th April 2019) =
395
+ * Fixed: Theme framework templates loading multiple times #2977
396
+
397
+ = 0.9.97.46 (9th April 2019) =
398
+ * Added: WP Subtitle compatibility integrated #2831
399
+ * Added: New filter in page builder for Enable/disabled check #2998
400
+ * Added: Additional Page Builder compatibility added #2643
401
+ * Fixed: The tag 'p' is disallowed & auto added as child of tag 'amp-accordion' #2498
402
+ * Fixed: Histats Not working #2909
403
+ * Fixed: itemprop="image" is being removed from the AMP Pages #2585
404
+ * Fixed: CSS pseudo-element not working when minify option is enabled #2907
405
+ * Fixed: Directories path code improved, if the plugin is installed outside (/wp-content/plugins) #1531
406
+ * Fixed: WP_debug warnings and notices #2958
407
+ * Fixed: More than one canonical issue with Rank Math SEO Plugin #2975
408
+ * Fixed: Background image or color in the 1st row of page builder is applied to all below row #2994
409
+ * Fixed: Rare Distorted image aspect ratio issue with Gutenberg editor #2931
410
+ * Fixed: Font family for Content in Single page code improved #2122
411
+ * Fixed: Fatal Error due to SEO press plugin #3003
412
+ * Fixed: Rare issue with Mobile redirection on Homepage after v0.9.97.32 #2972
413
+ * Fixed: PageSpeed Score Improvement for all Designs #2979
414
+
415
+ = 0.9.97.45 (4th April 2019) =
416
+ * Added: SeoPress compatibility integrated #1589
417
+ * Added: WP Appbox compatibility integrated #2791
418
+ * Added: Infinite Scroll feature integrated. #2682
419
+ * Added: Facebook like button added in Sticky Social Share #2186
420
+ * Added: Font family for Content in Single page #2122
421
+ * Fixed: Custom post type categories not showing in amp pagebuilder #1993
422
+ * Fixed: Duplicate SiteNavigationElement issue #2952
423
+ * Fixed: AMP Theme Framework Multisite issue #2936
424
+ * Fixed: Custom AMP Editor Content is Not rendering when Elementor is activated #2901
425
+ * Fixed: Title issue on Homepage with Yoast if we select custom front page #2962
426
+
427
+ = 0.9.97.44.2 (1st April 2019) =
428
+ * Added: Element folder files override in the Design One, Design Two and Design Three for the Child theme #2770
429
+ * Added: High-resolution Images [Additional image guidelines] option added in structure data #2259
430
+ * Fixed: Hide by default option from bulk tools is not working when amp takeover option is enabled #2832
431
+ * Fixed: Space removed while checking in the ampforwp_onesignal_notifications_widget function #2569
432
+ * Fixed: Display on User Avatar option #2942
433
+ * Fixed: Edit page is getting blank when product module is used #2944
434
+ * Fixed: YoastSEO post analysis broke & getting Uncaught TypeError: $ is not a function #2948
435
+ * Fixed: Yoast meta data are not renderring correct content for custom homepage #2928
436
+ * Fixed: Date format in Swift theme homepage/loop #2965
437
+ * Fixed: Published Date Disappear When selecting Horizontal Design in Related Post [swift-theme] #2957
438
+
439
+ = 0.9.97.44.1 (29th March 2019) =
440
+ * Added: Advertisement AMP panel improved #2724
441
+ * Fixed: Vuukle AMP integration code updated #2600
442
+ * Fixed: Fatal Error with old Plugins manager v1.0 #2976
443
+
444
+ = 0.9.97.44 (28th March 2019) =
445
+ * Added: Captions feature in AMP page builder #2645
446
+ * Added: Compatibility with the Youtube Oembed Plyr plugin #1505
447
+ * Added: Caption option for gallery/slider module in pagebuilder #2790
448
+ * Added: Like & share feature for every image in instant_articles #2764
449
+ * Added: Genesis option in SEO settings #2386
450
+ * Added: Improved the 'Setup AMP Feature' and 'Welcome to AMP' tabs & Enhance the Support button on AMP panel #2980
451
+ * Fixed: AMP Theme Framework getting conflicted #2782
452
+ * Fixed: Unwanted code for call-now component is being used #2652
453
+ * Fixed: amphtml tag while AMP Takeover option is enabled #2550
454
+ * Fixed: Debug warnings after 0.9.97.15 #2532
455
+ * Fixed: 'Header design' section in "Header" tab removed when design-1,2 and 3 is active & minor improvements #2978
456
+
457
+ = 0.9.97.43 (12th March 2019) =
458
+ * Fixed: Fallback for Redux classes #2377
459
+ * Fixed: Search widget CSS for Design-2 #1400
460
+ * Fixed: Navigation Menu CSS for Swift theme #2593
461
+
462
+ = 0.9.97.42 (11th March 2019) =
463
+ * Fixed: Incompatibility with AMP Plugin Manager
464
+
465
+ = 0.9.97.41 (11th March 2019) =
466
+ * Added: Color picker for Footer Area #2320
467
+ * Added: Compatibility with WP User Avatar plugin to show the gravatar #2772
468
+ * Fixed: Options Panel not showing, says "You are not allowed to access this page" #2377
469
+ * Fixed: faster-image libraries not being able to determine dimensions #2692
470
+ * Fixed: Changes in endpoint to ?amp, Re-direct " /amp " to " ?amp " #2480
471
+ * Fixed: Font style getting change on Custom Front page #2594
472
+ * Fixed: When the user is directed to the AMP version of the page it changes the URL slighltly (swaps out characters) #2913
473
+
474
+ = 0.9.97.40 (9th March 2019) =
475
+ * Added: Smooth scrolling for anchors links and jumping links within a page #2062
476
+ * Added: Option to Enable/Disable Merriweather font in Design-1
477
+ * Fixed: External links are getting skipped #2862
478
+ * Fixed: Social Share “LINE” does not show up in swift theme #2641
479
+ * Fixed: Checkbox from menu listings in AMP theme framework #2618
480
+ * Fixed: PHP Warning undefined index fb-instant-page #2610
481
+ * Fixed: Instagram Posts not rendering in AMP #2629
482
+ * Fixed: Instant articles Image issue #2929
483
+ * Fixed: Default height & width values for amp-img when values are not set #2925
484
+
485
+
486
+ = 0.9.97.39 (5th March 2019) =
487
+ * Added: Compatibility with the Author Simple Box Plugin #2268
488
+ * Added: Compatibility when short codes are added in AMP widgets #2552
489
+ * Added: Compatibility with the footnotes plugin #2447
490
+ * Added: ID Support on the AMP PageBuilder #2474
491
+ * Added: embedly oembed support in wordpress #1160
492
+ * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515
493
+ * Fixed: Debug Errors #2627
494
+ * Fixed: Custom Front page is breaking in 0.9.97.16 #2589
495
+ * Fixed: Date Archive not working with Swift Design #2514
496
+ * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727
497
+ * Fixed: Issue with pagebuilder when yoast plugin is active. #2933
498
+
499
+ = 0.9.97.38 (28th February 2019) =
500
+ * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
501
+ * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
502
+ * Fixed: Issue with Post Pagination ( Single ) #2624
503
+ * Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681
504
+ * Fixed: Full excerpt length in single posts [swift] #2712
505
+ * Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
506
+
507
+ = 0.9.97.37 (23th February 2019) =
508
+ * Added: Static page template in AMP #2614 + #2900
509
+ * Fixed: Font size and other values are properly sanitizing #2898
510
+ * Fixed: Failed to parse script tag contents #2884
511
+ * Fixed: PHP Notices after the v0.9.97.32 #2879
512
+ * Fixed: oembed wordpress post renders as a full post in AMP #2003
513
+ * Fixed: Gallery/Slider of AMP pagebuilder not working
514
+ * Fixed: class are repeating number of times when image (icon) added in .svg format #2893
515
+ * Fixed: Debug warnings with WPML #2899
516
+ * Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
517
+
518
+ = 0.9.97.36 (19th February 2019) =
519
+ * Added: Mobile and tablets Detects separately for 'Mobile Redirection' option #2436
520
+ * Added: Scrolling bar for swift theme in chrome browser #2593
521
+ * Added: CSS condition when element markup is visible #2753
522
+ * Fixed: Pre tags not rendering properly on pages #2823
523
+ * Fixed: Logo resize should only apply when Resize setting is enable #2544
524
+ * Fixed: When /?amp is enabled "Visit AMP" is redirecting to dashboard #2363
525
+ * Fixed: ampforwp_wc_shortcode_title is loading globally #2756
526
+ * Fixed: Extra CSS is causing validation error of 50kb #2592
527
+ * Fixed: PHP warning issue in latest version of php #2895
528
+ * Fixed: Yoast analysis is giving false readings for the SEO When AMPforWP Pagebuilder is enabled #2435
529
+
530
+ = 0.9.97.35 (16th February 2019) =
531
+ * Added: Levelup Compatability #2718
532
+ * Added: "Align Justify" Option in Page builder's text module #2665
533
+ * Added: Default value for Swift Color Scheme #2793
534
+ * Fixed: ampforwp prefix in the analytics function #2886 #2890
535
+ * Fixed: "Below the Footer" ads option showing above and below the footer #2778
536
+ * Fixed: Debug error undefined index comments #2887
537
+
538
+ = 0.9.97.34 (14th February 2019) =
539
+ * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
540
+
541
+ = 0.9.97.33 (13th February 2019) =
542
+ * Fixed: Style sanitizer code updated #2387
543
+ * Fixed: UTM Parameters when Mobile Redirection is enabled #2854
544
+ * Fixed: ?nonamp=1 is not working properly #1947 & #2537
545
+ * Fixed: All media queries load in single media query only #2711
546
+ * Fixed: 'Hide AMP option' is not working when AMP take over is enabled #2880
547
+ * Fixed: Swift Hover Color Changes #2751
548
+ * Fixed: Google Font is not getting saved #2839
549
+ * Fixed: Sidebar CSS condition code fixed #2757
550
+ * Fixed: Performance improvement for ampforwp_stylesheet_file_insertion #2873
551
+
552
+ = 0.9.97.32 (8th February 2019) =
553
+ * Added: Rank Math SEO compatibility integrated #2701 & #2736
554
+ * Added: New filter "ampforwp_modify_thumb_url_array" to modify the thumbnail #2739
555
+ * Fixed: 'Call Button Color' option not working - code updated #2820
556
+ * Fixed: Validation error when uploading YouTube video in Comments #2827
557
+ * Fixed: When Mobile Redirection option is enabled then, fr (language symbol) is removed from the URL. #2721
558
+ * Fixed: Category Module from Page Builder not displaying #2870
559
+ * Fixed: The homepage displays the title of the first post in All in one SEO #2865
560
+ * Fixed: Title mismatch in some posts with Yoast #2871
561
+
562
+
563
+ = 0.9.97.31 (4th February 2019) =
564
+ * Added: Subtitles plugin Compatibility #2853
565
+ * Added: Created an option for Id's for all the modules and column in AMP Page builder #2730
566
+ * Fixed: All the Images are Adding AMP at the End of their URL #2391
567
+ * Fixed: When nextpage pagination is added, URL in is rendering /2?amp=1 #2767 #2766
568
+ * Fixed: Comments Issues #2755
569
+ * Fixed: The gutenberg button doesn't work in amp #2707
570
+ * Fixed: Button Module color is not getting changed #2745
571
+ * Fixed: Issue with amp menu converting & ASCII code to X #2855
572
+ * Fixed: 'Call Button Color' option not working #2820
573
+ * Fixed: Error: The attribute 'alt' may not appear in tag 'a' #2837
574
+ * Fixed: Captions are not working in Gallery #2576
575
+
576
+ = 0.9.97.30 (2nd February 2019) =
577
+ * Fixed: Wrong title on the archive pages #2864
578
+ * Fixed: data-loading-strategy attribute is double quoted #2863
579
+
580
+ = 0.9.97.29 (31st January 2019) =
581
+ * Fixed: Validation error due to Search Widget #2858
582
+ * Fixed: Issue after upgrading analytics code #2859
583
+ * Fixed: amp-animation error in amp theme framework and tech blogging amp theme #2819
584
+ * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast - code updated #2816
585
+ * Fixed: Search Console Crawl Errors ?nonamp=1/ is listed in Access denied #2760
586
+
587
+ = 0.9.97.28 (29th January 2019) =
588
+ * Added: Lightbox feature for Carousel #2731
589
+ * Added: Specific filters to modify the analytics code #2653
590
+ * Fixed: Homepage Blog CSS is loading on the custom frontpage in swift theme #2754
591
+ * Fixed: Reset all & Reset section issue for redux framework #2722
592
+ * Fixed: Transable redux fields for other plugins like wpml #2737
593
+ * Fixed: Proper condition for Ads css #2758
594
+ * Fixed: Jetpack stats pixel inserted twice since Jetpack v6.9 #2812
595
+ * Fixed: AMP pagebuilder full width for posts #2765
596
+ * Fixed: Undefined “non-content” in blacklist-sanitizer #2842
597
+ * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast #2816
598
+
599
+ = 0.9.97.27 (23rd January 2019) =
600
+ * Added: ampforwp_is_amp_endpoint_takeover filter added
601
+ * Fixed: The attribute 'action' may not appear in tag 'FORM [method=POST]' #2835
602
+ * Fixed: Image size smaller than recommended size Warning in Search console #2838
603
+
604
+ = 0.9.97.26 (21st January 2019) =
605
+ * Added: Improve the Extension array code #2822
606
+ * Fixed: WP_Widget_Text conflict after v0.9.97.24 #2821
607
+
608
+ = 0.9.97.25 (17th January 2019) =
609
+ * Added: Help message for background video of column setting of Page Builder #2716
610
+ * Added: Review option in plugins page #2715
611
+ * Added: Excerpt length option in Category module of Page Builder #2733
612
+ * Added: Font Performance with font-display #2743
613
+ * Added: Custom template for front-page & home-page #2714
614
+ * Fixed: AMP Footer sidebar is not working in master #2800
615
+ * Fixed: <i> tag not working in Title #2804
616
+ * Fixed: alt attribute of <img> tag is not working when the image is inside the <a> tag #2617
617
+ * Fixed: Remove the unnecessary code for '404 error' text in amp translation panel #2738
618
+ * Fixed: Subtitle issue using with Jannah theme #2732
619
+ * Fixed: Proper names given for AMP Widgets #2797
620
+ * Fixed: Notice: Undefined index: hide-amp-tags-bulk-option2 and Undefined variable: inline_related_posts in features.php on line 4698 & 5546 #2795
621
+ * Fixed: Quality of 'featured image slider' in Design3 #2779
622
+ * Fixed: Embed Twits with twitter links #2798
623
+ * Fixed: /amp in the telephone link when 'Change Internal Links to AMP' option enabled #2742
624
+ * Fixed: Position of social sharing buttons 'above content' on pages #2809
625
+ * Fixed: lang attribute in HTML tag #2808
626
+ * Fixed: In footer, 'View non-AMP pages' is repeated twice when 'back to top link' option is enabled #2807
627
+
628
+ = 0.9.97.24 (9th January 2019) =
629
+ * Added: Compatibility with new and all default WP widgets #1400
630
+ * Fixed: Performance issue #2762
631
+ * Fixed: Need to add amp endpoint filter #2761
632
+ * Fixed: When Hide AMP Option is enabled in PageEditor with Convert AMP to WP theme (Beta) enabled it's providing output as AMP Page #2735
633
+ * Fixed: Whenever an image inserted, has width="100%" and height="100%", its giving Validation error. #2748
634
+ * Fixed: Custom post type is showing a blank page in the swift theme #2512
635
+ * Fixed: Whenever Responsive AD is enabled then the AD should load on the screen without any effect to the normal mode AD in D1,2,3, and Swift #2531
636
+ * Fixed: When Convert AMP to WP theme (Beta) is enabled GDPR popup isn't closing #2763
637
+ * Fixed: If twitter embed code is added then other blockquotes tag are not working #2750
638
+ * Fixed: Custom post type is showing a blank page in the swift theme #2512
639
+ * Fixed: Conflict with the Schema and Structure data plugin #2777
640
+ * Fixed: In the swift theme the Sticky social icons overlaps #2601
641
+ * Fixed: " Top " Button functionality to be improved. #2529
642
+ * Fixed: Drop down icon appearing twice #2785
643
+ * Fixed: Custom front page Meta description and content are not rendering for ALL in SEO plugin. #2702
644
+ * Fixed: Hover color is not appearing properly #2787
645
+
646
+ = 0.9.97.23 (18th December 2018) =
647
+ * Fixed: Sub menu items and arrows are not functioning in publisher theme. #2672
648
+ * Fixed: Fatal error when Polylang(Core) is activated. #2657
649
+ * Fixed: Improve coding in amp-page-builder.php #2725
650
+ * Fixed: Escaping not done properly #2723
651
+ * Fixed: Serialization problem with AMP settings data. #2717
652
+ * Fixed: Whenever Convert AMP to WP theme (Beta) option is enabled Logo Image is being stretched. #2726
653
+
654
+ = 0.9.97.22 (6th December 2018) =
655
+ * Added: Total Plus theme compatibility #2511
656
+ * Added: Allow SVG format Logo in AMP #2431
657
+ * Fixed: Vuukle AMP integration #2600
658
+ * Fixed: "Change Internal Links to AMP" not working properly for anchor tags (internal links) #2562
659
+ * Fixed: Secondary menu color is not outputting the value in latest update #2680
660
+ * Fixed: The instagram embed code is not working in facebook instant article in the AMP. #2523
661
+ * Fixed: FTP Link being generated in Non-AMP but not in AMP #2477
662
+ * Fixed: Videos aren't rendering whenever Convert AMP to WP theme (Beta) is enabled #2501
663
+ * Fixed: More debug errors #2513
664
+ * Fixed: Comments closed not looking good in Swift theme #2542
665
+ * Fixed: Excerpt Option is not Working. #2509
666
+ * Fixed: Image of Design 3 and Swift are same in Installation wizard #2540
667
+ * Fixed: AMP renders with ?q after the /amp #2361
668
+ * Fixed: Tables overflow in swift theme when adding the tables to the site [TEST + ALT solution] #2392
669
+ * Fixed: Unable Access the Wp-admin page when Amp takeover option is Enabled. #2476
670
+ * Fixed: Latest post title is displaying in the AMP homepage instead of site title #2419
671
+ * Fixed: AMP menu is not working when Jetpack Mobile theme option is enabled #2584
672
+ * Fixed: Link to Non-AMP page in Footer points to 404 #2586
673
+ * Fixed: Debug warnings in error logs #2367
674
+ * Fixed: The AMP for WP plugin(Version 0.9.97.20) bug are notice-error :undefine index and Unused code. #2687
675
+ * Fixed: Improvements in AMP page builder code #2471
676
+ * Fixed: Table class is getting removed in AMP pages. #2699
677
+ * Fixed: Pagination is not working when AMP Takeover is enabled #2686
678
+ * Fixed: The featured slider is not displaying properly images using the Firefox browser with the design 3 theme. #2677
679
+ * Fixed: Icons for AMP Stories and Shortcode Ultimate #2598
680
+ * Fixed: Images are stretched whenever Convert AMP to WP theme (Beta) Option is enabled. #2694
681
+ * Fixed: Vertical words in table on mobile #2606
682
+ * Fixed: PageBulider getting following notices in old module #2305
683
+ * Fixed: Export option of page builder is not working in latest version #2709
684
+ * Fixed: Remove the span tag in all 404.php files of the 4 designs #2704
685
+ * Fixed: Wrong escaping done for default value for Google Analytics #2697
686
+ * Fixed: Re-modification of single settings option panel when newspaper theme activated #2706
687
+
688
+ = 0.9.97.21 (21st November 2018) =
689
+ * Fixed: Sanitation of user contents before save #2679
690
+ * Fixed: Menu is Not working in Minimal Blogging theme (0.9.97.20) #2667
691
+ * Fixed: Author bio not showing proper link #2674
692
+ * Fixed: HTML not being rendered on cookie consent notifications #2671
693
+ * Fixed: Telephone link not working
694
+
695
+ = 0.9.97.20 (29th October 2018) =
696
+ * Fixed: Plugin Vulnerability #2650
697
+
698
+ = 0.9.97.19 (4th October 2018) =
699
+ * Fixed: Tables overflow not working in swift theme #2392
700
+ * Fixed: Null check added to fix null reference exception #2526
701
+ * Fixed: Minor Bug related with menu #2612
702
+
703
+ = 0.9.97.18 (29th September 2018) =
704
+ * Fixed: Minor Bug related with menu
705
+
706
+ = 0.9.97.17 (28th September 2018) =
707
+ * Added: Featured Slider "Tag" support #954
708
+ * Added: Marfeel plugin is blocking Internal pages of AMP and rendering 503 error #2423
709
+ * Fixed: Dropdown Menu arrows not working properly in Swift #2148
710
+ * Fixed: Wrong implementation of load_plugin_textdomain function #2408
711
+ * Fixed: Page Float to right and showing menu content when page scroll horizontally in iPhone device #2434
712
+ * Fixed: Internal Link Option is not Working in beta #2443
713
+ * Fixed: Missing conditional tag for get_the_tags() causing "Invalid argument supplied for foreach()" error #2456
714
+ * Fixed: Need to make a space in meta information and published date is not getting translated #2411
715
+ * Fixed: Meta og:title and description tag are Not completely Reflecting #2454
716
+ * Fixed: Images are not aligned center when published with Gutenberg Editor #2462
717
+ * Fixed: Anchor Tag is not working because there is a space in between link #2465
718
+ * Fixed: Fix social shares icons #2467
719
+ * Fixed: Debug errors in beta #2472
720
+ * Fixed: homepage is getting blank when "Convert To WP" is enable only for posts #2493
721
+ * Fixed: wrong amphtml URL generating for WPML #2573
722
+
723
+ = 0.9.97.16 (19th September 2018) =
724
+ * Added: 3 Types of Gallery designs #1968
725
+ * Added: New Section to show 'change log' on Welcome Page #1753
726
+ * Added: Allow HTML in footer section of translation panel in design 3 #1950
727
+ * Added: Need to make the compatibility with The Voux theme #2263
728
+ * Fixed: Special character "|" breaking the url in the twitter share #2264
729
+ * Added: Read more button for post on blog page #2273
730
+ * Fixed: Category Labels are Clickable on Swift Homepage even Archive support is off #2279
731
+ * Fixed: Above Loop and Below Loop Sidebar Widget area is not connected with Swift theme #2280
732
+ * Fixed: Aq_Resize.process() errors for images hosted on CDN #2285
733
+ * Fixed: Convert to WP Option is displayed in Swift Theme, but not in Design 3. #2291
734
+ * Fixed: Need to have only one text-domain in the string of the plugin #2292
735
+ * Fixed: Bug in Facebook comments. #2300
736
+ * Added: Beta Testing link in the Options panel #2302
737
+ * Added: "X" button in the menu of D3 #2294
738
+ * Fixed: AMP Take over is applying even on product when this option is enabled only for posts. #2304
739
+ * Fixed: The Option Facebook App ID not necessary in the social icons of AMP panel when using Swift #2384
740
+ * Fixed: Embeds not working in Archive Description #2402
741
+ * Fixed: Spurious spaces in Footers #2521
742
+ * Fixed: Additional spaces Pagination div on article posts #2522
743
+
744
+ = 0.9.97.15 (13th September 2018) =
745
+ * Fixed: Pagination is not working on date archive #2289
746
+ * Added: Options to show Social Icons in different places in Swift #1722
747
+ * Fixed: Localization string for "% days ago" not working for non-Latin languages #1491
748
+ * Added: Social Share by Supsystic Compatibility #1509
749
+ * Fixed: Duplicate h1 tags in Design One #1522
750
+ * Added: 3 Appearance option for Related Posts in Swift theme #1545
751
+ * Fixed: RTL not working with Footer properly #1655
752
+ * Fixed: Proper implementation of the property of all in one SEO pro to avoid fatal error #2500
753
+ * Fixed: Notice: Undefined index: extension in thirdparty-compatibility.php on line 401 - 406 #2496
754
+ * Fixed: Wrong url in Non-Amp Version link on blog posts page and category archives #2424
755
+ * Fixed: The Consent.php path is getting index in Webmaster tool #2518
756
+ * Added: Option to add custom things in Instant Articles #1089
757
+ * Added: Show/hide Instant Article on specific posts #1297
758
+ * Added: Facebook Instant Articles (FBIA) Crawler Ingestion (ia:markup_url) tag #1474
759
+ * Added: Facebook Instant Articles Meta Tag #1486
760
+ * Added: Related posts for instant articles #1634
761
+ * Added: Option to remove Author info from Instant Articles #1483
762
+ * Added: Facebook Instant Articles in each Catagory #1524
763
+ * Added: Custom Facebook Instant Articles Ad option #1475
764
+ * Fixed: Pagination not working after changing the pagination base #1485
765
+ * Added: Breadcrumb with tag #1305
766
+ * Fixed: Enabled WordPress Comments by default #1501
767
+
768
+ = 0.9.97.14 (4th September 2018) =
769
+ * Added: Adobe Analytics Support #887
770
+ * Fixed: Same Icons loading for some extensions #2172
771
+ * Fixed: Removed extra spacing from "Back to top" text #2349
772
+ * Fixed: Retina featured images support for Homepage and archive loop images #2334
773
+ * Fixed: When WooCommerce Product Slider is Installed, the Picture of Icons are not loading #2325
774
+ * Added: Customizr Theme Lazy Loading compatibility #2322
775
+ * Fixed: "Save Module" button of AMP page Builder not displaying in OSX and in Safari #1943
776
+ * Fixed: Sort Related Posts Randomly Not Working in Swift theme #2308
777
+ * Added: Need to create a tutorial of How to Enter your Audience Network Placement ID of advertisement in the Instant Article #1723
778
+ * Fixed: Retina Images option Improvement-II #2296
779
+ * Fixed: Disable the look or check of redux framework #2293
780
+ * Fixed: With Redux core plugin, AMP option panel design not loading #2258
781
+ * Fixed: Issues with pagination #2253
782
+ * Added: Thrive Architect Compatible #1575
783
+ * Fixed: Notice Undefined variable categories_array #2486
784
+ * Fixed: Need to add upscale parameter in-line related posts #2488
785
+ * Fixed: Getting the warnings in error log due to global variable, not present #2395
786
+ * Fixed: Google Analytic issue while setting up Run Installation wizard #2491
787
+ * Added: Read more button AKA Content Sneak Peek feature for post #2246
788
+ * Added: Showing related items/post in after nth paragraph #2246
789
+
790
+ = 0.9.97.13 (28th August 2018) =
791
+ * Fixed: Fatal error in `ampforwp_related_post_loop_query()`
792
+
793
+ = 0.9.97.12 (27th August 2018) =
794
+ * Fixed: Quote runs only in block post not on pages #2399
795
+ * Added: Create a Sidebar option that can be used as global Sidebar #2388
796
+ * Fixed: words are breaking and not readable #2441
797
+ * Fixed: Text is breaking into next line while there is no space between the text in custom AMP Editor #2270
798
+ * Fixed: IP Anonymization #2421
799
+ * Added: Setka Editor Compatibility #2468
800
+ * Fixed: In swift theme, when user ads the ad Above the Related Posts (Single Post); the content doesn't display #2311 and #2318
801
+ * Added: Toggle controls are now accessible #1691
802
+ * Added: Global Sidebar is now Connected with AMP Pagebuilder #2371
803
+ * Fixed: #amp-user-notification1 Styling was loading even when disabled from option panel in swift #2400
804
+ * Fixed: Remove the empty `@media{}` css generated by Pagebuilder #2473
805
+ * Fixed: Blank Lines in HTML Source code #2445
806
+ * Fixed: Optimize AMP pages on Google Lighthouse #2082
807
+ * Fixed: RSS Feed is not working when AMP Takeover is enabled #2309
808
+
809
+ = 0.9.97.11 (21th August 2018) =
810
+ * Minor Update
811
+
812
+ = 0.9.97.10 (18th August 2018) =
813
+ * Fixed: Homepage build with AMP PageBuilder is displaying only when the checkbox of the Custom AMP editor is enabled #2350
814
+ * Added: Created a new function to get the settings instead of calling it directly from global $redux_builder_amp everytime. `ampforwp_get_setting` created #2177
815
+ * Fixed: Comments and share not loading on pages only in swift #2401
816
+ * Fixed: Back to Top link not working in Swift Design #2404
817
+ * Added: Ads Below the Author Area in Swift theme #2455
818
+ * Fixed: AMP should remove spaces from GTM ID automatically #2413
819
+ * Fixed: Some Posts are not displaying in Blog page even when AMP is enabled from Post settings #2375
820
+ * Fixed: Wrong AMPHTML when using static page as blog using custom-code/pagebuilder from reading settings #2396
821
+ * Added: Add paginations meta tags #2343
822
+ * Fixed: Updated the code of AMP renders with ?q after the /amp #2361
823
+ * Added: Add support for Relevanssi search #2307
824
+ * Added: Show index/noindex label when enabling the options in SEO Settings #2290
825
+ * Added: Add AMP consent in AMP Theme Framework #2440
826
+ * Added: Created a component called `AMP-geo` so anyone can use it in thier AMP theme #2440
827
+
828
+ = 0.9.97.9 (1st August 2018) =
829
+ * Minor Improvements
830
+
831
+ = 0.9.97.8 (24th July 2018) =
832
+ * Fixed: AMP renders with ?q after the /amp #2361
833
+ * Fixed: iThemes Sync can not connect to the site. #2380
834
+ * Fixed: H1 to H6 styling is not reflecting in the Swift theme #2383
835
+ * Fixed: Underline on Links function is not working. #2372
836
+ * Fixed: WordPress Admin Color Scheme not applying #2390
837
+ * Fixed: Breadcrumbs are not disabling when the sidebar template is selected #2376
838
+ * Fixed: All the Images are Adding AMP at the End of their URL. #2391
839
+
840
+ = 0.9.97.7 (18th July 2018) =
841
+ * Fixed: PageBuilder not loading on frontpage #2360
842
+ * Fixed: 500 error on somepages due to open wp_query by other plugins
843
+ * Fixed: License key reupdating #2261
844
+ * Fixed: AMP renders with ?q after the /amp #2361
845
+
846
+ = 0.9.97.6 (14th July 2018) =
847
+ * Fixed: Error and Warning on Structured Data for Logo. #2360
848
+ * Fixed: Category Bulk tool breaking meta boxes #2335
849
+
850
+ = 0.9.97.5 (11th July 2018) =
851
+ * Fixed: Title disappearing in Design 1,2,3 when legacy pagebuilder is enabled #2341
852
+ * Fixed: ld+json getting a broken when special characters are added in the image. #2346
853
+ * Fixed: Hide by Category Breaking post metabox #2330
854
+ * Fixed: Hiding excerpt when global $redux_builder_amp is empty #2330
855
+ * Fixed: When Google Tag Manager is enabled, only Google Analytics should get disabled but not other analytics. #2340
856
+
857
+ = 0.9.97.4 (09th July 2018) =
858
+ * Fixed: Huge Performance upgrade in the way fetching the logo url #2317
859
+ * Fixed: Fatal Error due to unable to modify values in Structured Data Object #2327
860
+ * Fixed: Seperate option for Featured Image in pages in Swift theme #2328
861
+ * Fixed: `<p>` tags disabling where not wanted #2330
862
+ * Fixed: Fatal error in contact form module while ninja form or gravity form plugins are not activated #2310
863
+ * Fixed: Woo Commerce Category page not working properly #2333
864
+ * Fixed: Few issues related to amp-facebook-comments #2300
865
+ * Fixed: Limit number of Tags and Category to 500 in Hide AMP-Bulk tools #2336
866
+
867
+ = 0.9.97 (27th June 2018) =
868
+ * For more details check out [the blog post](https://ampforwp.com/0-9-97-released-strengthening-of-foundation-89th-update/)
869
+ * Fixed: Extraposition attribute left in CSS Design #2 #2119
870
+ * Fixed: Non-AMP header link not working #2109
871
+ * Added: Create an Ad Above the Post Content #2155
872
+ * Fixed: "AGO" text was not translatable #2158
873
+ * Added: Filter created `ampforwp_header_url` to modify logo url #2141
874
+ * Fixed: Removing the text "amp" in footer view non-amp-link #2158
875
+ * Added: Compatibility WP user Avatar plugin added #2011
876
+ * Fixed: Design 2 - meta info producing a block of empty HTML #1969 #1954
877
+ * Added: Pocket and Hatena Bookmark social share buttons Added #1652
878
+ * Fixed: External Links are appended with "amp" at the end of the url in content. #2174
879
+ * Fixed: Some Issues Found in Design #3 #2130
880
+ * Fixed: ScoopVersion: 1.4 By boostdevelopers theme displaying the error only in the category #1683
881
+ * Fixed: Page featured Image is not displaying in the Swift theme #2136
882
+ * Fixed: Dropcap breaking the youtube embed code #2157
883
+ * Fixed: Bulk hide by default option is requires Permalinks to be saved #2145
884
+ * Fixed: Fully compatibility with muffin page builder #2180
885
+ * Fixed: Incontent Related Post Issues #2078
886
+ * Fixed: Search page should not have AMP version of the page and not in search result #2191
887
+ * Added: Control added to modify Retina Images resolutions #2099
888
+ * Added: Created an option to duplicate a page builder element #1986
889
+ * Added: Image Caption is not displaying below the Image in design 1,2,3 #2101
890
+ * Fixed: Post pagination not working properly in D1, D2 and D3 #2168 #2243
891
+ * Fixed: Auto re-save permalink if the options in reading setting page get changed #2190
892
+ * Fixed: Leave a comment not looking good in Swift theme #2150
893
+ * Added: Social icons for pages. #2162
894
+ * Added: Create an option to pull canonical from Yoast #2118
895
+ * Added: Full Support for All in one SEO #1720
896
+ * Fixed: Single with sidebar CSS should only load if that layout type is selected #2091
897
+ * Fixed: Required Filed is not working in the Repeater in Page builder #2217
898
+ * Fixed: alt in `<div>` causing validation errors. #2093
899
+ * Added: Drop Down Menu Support in Swift Header Menu #2095
900
+ * Added: Parallax Setting Added in PageBuilder #2095
901
+ * Added: Multiple Layout Settings added in Feature Module in Page Builder #2095
902
+ * Added: Add the option changing the sliding speed of slider in "Slider module" of AMP Page Builder #2218
903
+ * Added: Created an option Related Post link in non amp #2201
904
+ * Fixed: Removed Jannah LazyLoad on AMP Mode #2224
905
+ * Fixed: Custom post types with custom taxonomy not working in AMP #2209
906
+ * Fixed: frontpage and homepage not working properly AMP take over #2153 #2277
907
+ * Added: Button field created in Feature module #2068
908
+ * Added: Excerpt should also work on homepage and categories page #2176
909
+ * Fixed: Options panel breaks in when RTL in WP Dashboard #2176
910
+ * Fixed: Featured image from Custom fields in page builder Category module #2237
911
+ * Added: Forms Module Support added in PageBuilder #2221
912
+ * Fixed: Paginated AMP URL on the category are opening to 404-page #2233
913
+ * Fixed: Ads not displaying properly in RTL #2227 #2138
914
+ * Fixed: single quotation (') in text module breaking AMP page builder #1940
915
+ * Added: Filter created to modify `ampforwp_loop_image_update` image arguments in components of AMP theme framework #2057
916
+ * Added: Option to change the locale of Facebook comments #2127
917
+ * Added: Search option in options panel #2088
918
+ * Fixed: Accordion not working when the user enters some data in Description with HTML Tags #2088 #2097
919
+ * Fixed: Internal links now working with ?amp=1 #2204
920
+ * Fixed: UTM Parameters not working properly with AMP #2223
921
+ * Fixed: Multiple Slider module of AMP Page builder not working #2090
922
+ * Fixed: Hide AMP by categories option should hide by default in the backend of that specific post #2112
923
+ * Added: IP Anonymization in Google analytics #2135
924
+ * Fixed: Improvement in the styling of AMP option panel #2102
925
+ * Added: Added new fonts control for Content in Single page #2122
926
+ * Fixed: Legacy page builder button styling is not loading properly #2036
927
+ * Added: Filter added so we can disable Comments on specific pages `ampforwp_comments_visibility` #2170
928
+ * Fixed: Improvement in Excerpt on small screen option #2034
929
+ * Added: Comments on Pages #2229
930
+ * Fixed: Pagination not working for some websites #2241
931
+ * Fixed: "Menu" option in Footer connected with Swift #2146
932
+ * Added: Wistia Support #1875
933
+ * Added: Add option in page builder to give the specific name to all modules #2251
934
+ * Added: Compatibility with Muffin Builder #2137
935
+ * Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
936
+ * Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
937
+ * Added: Render all the AMP Components added in Post Editor #2216 #2228
938
+ * Fixed: "Gap" Module of ThemeCo breaking the AMP pages #2220
939
+ * Added: Search widget compatibility #2143
940
+ * Added: Advertisement Module created in AMP Pagebuilder #2131
941
+ * Fixed: Performance issue with the function `ampforwp_get_comments_gravatar` #2234
942
+ * Fixed: Empty the amp pages, when the Clearfy HTML compress is enabled #2110
943
+ * Fixed: The attribute 'value' appearing in tag 'a' throwing the validation error #2262
944
+ * Fixed: Versioning of Styles and Scripts of redux-core #2126
945
+ * Added: Related Posts based on X days #2132
946
+ * Fixed: Warning in custom-sanitizer.php #2173
947
+ * Added: vuukle comment support #2075
948
+ * Fixed: Facebook Comment should not appear on the Checkout page, Add to cart page, or shop page #2170
949
+ * Added: SpotIM comment support #2075
950
+ * Added: Additional Controls added in Design3 Featured slider #2222
951
+ * Fixed: Username in AMP Option panel color was too light #2266
952
+ * Added: Settings created to modify H1 to H6 #2059
953
+ * Fixed: AMP_QUERY_VAR debug issue #2265
954
+ * Added: Custom page template in AMP #1923
955
+ * Fixed: Comments Button is not displaying in Design #3 #2163
956
+ * Added: Ability to add Forms Shortcodes in footer Widgets #2226
957
+ * Added: Option to add rel="nofollow" in AMP page builder button module #2239
958
+ * Added: Background video option in amp page builder #2195
959
+ * Fixed: Drop Down Menu Support in Swift Header Menu #2095
960
+ * Fixed: Yoast Description not getting added in AMP #2159
961
+ * Fixed: Improvement in styling of AMP option panel #2102
962
+ * Fixed: Hide AMP Bulk Tools Improvements #1867
963
+ * Added: Compatibility with the Relevanssi Plugin #1503
964
+
965
+ = 0.9.96 (2nd June 2018) =
966
+ * Added: Fully GDPR Compliance
967
+ * Fixed: GTM not working
968
+
969
+ = 0.9.86.1 (8th May 2018) =
970
+ * A bug causing validation issues has been resolved.
971
+
972
+ = 0.9.86 (3rd May 2018) =
973
+ * For more detials check out [this blog post](https://ampforwp.com/0-9-86-released-getting-ready-for-future-87th-update/)
974
+ * Added: GDPR Compliancy #2040
975
+ * Added: Muffin Page Builder Compatibility #1455 #1893
976
+ * Added: Thrive leads compatibility #2067
977
+ * Fixed: Load structured markup json in Footer to improve performance #1945
978
+ * Added: Font Size and Font Family Controls added in Content Presentation Module #1962
979
+ * Added: Font Weight Control added in Text Module in PageBuilder #1962
980
+ * Added: Other necessary controls added in Content Presentation Module #1962
981
+ * Added: New Design called "Design 4" added in Content Presentation Module. #1962
982
+ * Fixed: License Activation process connected with AMP extensions #1981
983
+ * Added: Icon Selector control added in Button module in AMP Page Builder #1962
984
+ * Added: Filter called `ampforwp_get_comments_gravatar` to modify Author Avatar Images #1949
985
+ * Fixed: Validation error fixed by removing json+ld values to remove CDATA #1977
986
+ * Added: Icon Adjustment Option is added in the Button Module #1962
987
+ * Fixed: Debug Warnings fixed #1976
988
+ * Fixed: If AMP support on post and page is disabled then mobile redirection was not working #1979
989
+ * Fixed: Responsive element added in Image Module #1962
990
+ * Fixed: Custom Post and Custom Taxonomies Archives not working in AMP #1957
991
+ * Fixed: AMP take over is on and AMP support on the home page is disabled it was redirecting to some other pages #1994
992
+ * Fixed: Design 1 and Design 2 shouldn't show 'social' tab #1996
993
+ * Added: AMP WordPress Theme notice
994
+ * Added: Rewrite Rules Added for WooCommerece #1957
995
+ * Fixed: AMP Takeover blog search results giving blank page #1990
996
+ * Fixed: Swift pagination markup is present even the page has no pagination #2000
997
+ * Fixed: Pagination breaking on second page on Archives when Blog page is not set #1998
998
+ * Fixed: Added proper Google API jump link #1966
999
+ * Fixed: Advance Index and no-index controls did not had description #1978
1000
+ * Added: Filter added `amp_blacklisted_tags` in blacklist-sanitizer file
1001
+ * Added: Hyperlink for image module added #1989
1002
+ * Added: `ampforwp_get_frontpage_id` a common fucntion created to get post id for AMP frontpage #2025
1003
+ * Fixed: Comments controls were not working properly #1987
1004
+ * Fixed: Fatal Error after updating the plugin from 0.9.73 to 0.9.83 version #2017
1005
+ * Fixed: Filter created `ampforwp_modify_rel_url` to modify rel canonical URL #2012
1006
+ * Fixed: Remove structured data json if removed from AMP options panel
1007
+ * Fixed: amp widget appearing twice in design one #2008
1008
+ * Fixed: Gif in content + Lightbox feature throws validation issue. #2032
1009
+ * Added: New Features in the Page builder Modules #2029
1010
+ * Fixed: License Key was not working properly #2026
1011
+ * Fixed: Instagram comment view is getting cut off in Swift Theme #2002
1012
+ * Added: Icon module support added in Desgin 1, 2 & 3 #1997
1013
+ * Fixed: if GD or ImageMagick library is not present in the server then send the original image #2037 #2038
1014
+ * Fixed: Swift theme homepage (Non-AMP) image resizing issues in Mobile version #1992
1015
+ * Fixed: Header Element not working in Swift theme #1967
1016
+ * Fixed: Stop Loading of Latest post scripts on Homepage and Frontpage #2041
1017
+ * Added: Filter created `ampforwp_non_amp_links()` so users can have all the internal links non-amp #1973
1018
+ * Fixed: Sanitize the archive description in loop component #1974
1019
+ * Fixed: Double AMPHTML when FBIA Plugin is active #2043
1020
+ * Fixed: Image Div is loading even if the image is not present in Swift #2033
1021
+ * Fixed: Custom AMP editor is visible on pages (post type) even if the Page Support is off from amp options panel #2047
1022
+ * Fixed: When 'Structure Data for WP' plugin active, Schema type in Structure section should hide #2049
1023
+ * Fixed: Bugs in Video Module in AMP pagebuilder #2048
1024
+ * Added: Autoplay feature added in Video Module #2048
1025
+ * Fixed: Throwing error when Product Structured Data is selected #1975
1026
+ * Fixed: Advanced CSS is not loading because the files are with hosting path #2046
1027
+ * Fixed: Double Quotes breaking the html #2004
1028
+ * Removed: Blog option is removed from AMP Options panel and it is connected with Pages option Under Reading Settings #2027
1029
+ * Fixed: amphtml should not be created for 404 pages #2018
1030
+ * Added: 404 Template added, useful for AMP Takeover #2042
1031
+ * Fixed: Genesis meta titles are lost and not rendering correctly #2050
1032
+ * Fixed: Search blank on AMP Takeover #1990
1033
+ * Fixed: Remove Unused js files from Paginated Post Pages #2001
1034
+ * Fixed: Extra Space adding in H1 and other SEO tags #2054
1035
+ * Fixed: Undefined Index when called from robot #1960
1036
+ * Fixed: amp facebook comment Js not loading to the custom front page of the swift theme. #2053
1037
+ * Fixed: Tags label is not working properly when RTL Support on #1719
1038
+ * Fixed: View Non-AMP Version In the footer link has an error #2066
1039
+ * Fixed: Squirrly SEO is Adding the Javascript code in AMP #1696
1040
+ * Fixed: Translation option issue when using POT file method #1941
1041
+ * Fixed: amp-facebook-like extension is missing on Custom Frontpage #2061
1042
+ * Fixed: GTM option repositioned #2056
1043
+ * Fixed: Menu is appearing on left side instead of Right side when RTL support is ON for Design3 #1928
1044
+ * Fixed: Sidebar Bugs #1972
1045
+ * Added: Table Styling in Swift #1961
1046
+ * Fixed: Genesis index, follow options not being rendered #2071
1047
+ * Added: Filter created `ampforwp_robots_meta` to modify robots meta information #2071
1048
+ * Fixed: PHP Notices #2065
1049
+ * Added: Add a new hook `ampforwp_after_amp_menu` after the menu in all designs #2072
1050
+ * Added: New Look to Options panel #1823
1051
+ * Added: Retina Image Support added #1846
1052
+ * Fixed: Pagebuilder hrefs were stripped in hebrew language #2089
1053
+ * Fixed: Warning Fixed #2083
1054
+ * Fixed: Gallery module images not loading in Firefox #1980
1055
+ * Fixed: Pagebuilder Improvement #2024
1056
+
1057
+ = 0.9.85.5 (21st April 2018) =
1058
+ * Added: Filter added to modify frontpage post id `ampforwp_modify_frontpage_id`
1059
+ * Added: Filter added to modify amp template directory `ampforwp_template_locate` #1982
1060
+ * Other minor bugs fixed
1061
+
1062
+ = 0.9.85.3 (12th April 2018) =
1063
+ * Added: Custom Post type Archive Page support #1995
1064
+ * Fixed: AMP TakeOver redirection issues #1994
1065
+ * Fixed: Debug errors #1976
1066
+ * Fixed: Social Profile pages were hidden for Design 1 to 3 #1996
1067
+ * Fixed: Structured Data insertion was adding CData causing validation error #1999
1068
+
1069
+ = 0.9.85.2 =
1070
+ * Minor Bugs fixed
1071
+
1072
+ = 0.9.85.1 =
1073
+ * Minor Bugs fixed
1074
+
1075
+ = 0.9.85 (3rd April 2018) =
1076
+ * For more detials check out [this blog post](https://ampforwp.com/0-9-85-released-stability-update-86th-update/)
1077
+ * Fixed: Fatal error: Allowed memory size on FrontPage #1865
1078
+ * Fixed: Proper Parameters for Pinterest Sharing #1853
1079
+ * Added: Extra settings added in Button Module
1080
+ * Added: Extra settings added in Text Module
1081
+ * Fixed: Proper Parameters for Pinterest Sharing
1082
+ * Fixed: Unwanted fields are removed form the Repeater in Button module
1083
+ * Added: Enable/disable option added Related Posts #1829
1084
+ * Fixed: Legacy PageBuilder option Repositioned #1851
1085
+ * Fixed: Display the img tag only if source is present #1869
1086
+ * Fixed: Huge design improvements in Swift theme #1818
1087
+ * Added: Hook for Between Related Post is Added #1874
1088
+ * Added: Blurb module text size and background color added
1089
+ * Fixed: Comments Pagination issues #1816
1090
+ * Added: Counter Module added
1091
+ * Fixed: Date 48 years ago #1864 #1876
1092
+ * Added: Ability to pass post id in amp_content() #1872
1093
+ * Fixed: Changed the way images we fetched in WooWidget #1847
1094
+ * Fixed: Changed the position of layout in Pagebuilder #1873
1095
+ * Added: Pricing Module
1096
+ * Fixed: Changed the position of layout in Pagebuilder #1873
1097
+ * Fixed: amp_aq_resizer was not able to process the outside url #1881
1098
+ * Fixed: Advanced Google Analytics improvements #1630 #1860
1099
+ * Added: Field Added For ON & OFF in Page builder #1870
1100
+ * Fixed: Two paginations in search pages in Swift theme #1855
1101
+ * Fixed: Extra Div if categories not available #1856
1102
+ * Fixed: removed debuged tags #1870
1103
+ * Fixed: Published date connected with AMP options Panel #1888
1104
+ * Added: Featured Image option in Swift #1889
1105
+ * Added: Separate Blog settings #1887
1106
+ * Fixed: single post ads should not load on pages #1896
1107
+ * Fixed: Ads should not load on FrontPage if PageBuilder is enabled #1885
1108
+ * Fixed: Background Image Support for the Columns #1871
1109
+ * Added: Blockquotes design for Swift #1894
1110
+ * Added: Co-Authors Plus compatibility #1895
1111
+ * Added: pagebuilder for custom post types #1884
1112
+ * Added: Border option is connected to options panel #1818
1113
+ * Added: Responsive AD unit support #1852
1114
+ * Added: Sub category arrow symbol is added in Swift theme #1818
1115
+ * Added: Search text color is connected to options panel #1818
1116
+ * Fixed: Removed notice when no posttype selected #1884
1117
+ * Added: Ability to overwrite page template the WordPress way like front-page.php and page-{id}.php #1902
1118
+ * Added: Ability to overwrite author page template the WordPress way like author.php and author author-name.php #1902
1119
+ * Added: Lightbox Support for the images #1892
1120
+ * Fixed: No mobile redirection when Dev mode is enabled #1907
1121
+ * Added: Option to hide Author name in Swift #1890
1122
+ * Fixed: Script facebook-comments should not load for Frontpage #1897
1123
+ * Added: amp-facebook comments for AMP2WP #1911
1124
+ * Added: Alt tag in all modules #1898
1125
+ * Added: Sanitizers in Footer and sidebar widget in Swift #1835
1126
+ * Added: Dropcap support #1900
1127
+ * Added: Proper styling for iframes and videos in Swift theme #1909
1128
+ * Fixed: Non-AMP link fixed for AMP Takeover #1916
1129
+ * Fixed: Swift connected with Breadcrumb option #1915
1130
+ * Added: Uninstall option created to completely remove AMPforWP data #1903
1131
+ * Fixed: Recipe Structured Data requires name attribute #1917
1132
+ * Fixed: No amphtml when It is hidden from Categories #1919
1133
+ * Fixed: Content is breaking when Inline Related Post option is enabled #1912
1134
+ * Fixed: Proper redirection setup for AMP Takeover #1913
1135
+ * Added: Social media profiles added in menu #1901
1136
+ * Fixed: No Ads should display on Frontpage or Posts if Pagebuilder is enabled #1885
1137
+ * Added: #1899 Proper conditions for amp-analytics script
1138
+ * Fixed: Turn off option not working by default fixed #1537
1139
+ * Fixed: BreadCrumbs Should not load when PageBuilder is enabled #1925
1140
+ * Fixed: Removed unwanted elements loading while pagebuilder is enabled #1929
1141
+ * Fixed: amp-web-push should not load on Homepage and Blog #1930
1142
+ * Added: SmartMag theme Compatibility #1905
1143
+ * Fixed: Template overriding not working in child theme #1920
1144
+ * Fixed: Horizontal scrolling in Swift #1844
1145
+ * Fixed: Home page title should not be visible in AMP takeover #1921
1146
+ * Added: Carousel Module Added #1937
1147
+ * Fixed: Comments pagination not working #1816
1148
+ * Fixed: Comments pagination not working #1816
1149
+ * Added: Glue html css compatibility #1932
1150
+ * Added: Data Caption Support on AMP Instagram Embed #1938
1151
+ * Added: Ability to pass {author_name} and {author_id} added in Advance Analytics #1936
1152
+ * Fixed: Scrollbar in Header area in Swift in firefox #1818
1153
+ * Added: Disqus iframe height adjustment option #1935
1154
+ * Fixed: Options panel conflict fixed with Mobius theme #1942
1155
+ * Fixed: Problem with Button in Mobile view in Swift #1926
1156
+ * Fixed: Removed canvas tag in AMP version causing validation errors #1880
1157
+ * Fixed: Getting Conflict with Facebook Button by BestWebSoft #1740
1158
+ * Added: Option to enter the "ID" on CTA button module #1931
1159
+ * Added: Option for open same window in CTA module of page builder #1866
1160
+ * Fixed: Logo fetch causing Huge performance issue #1679
1161
+ * Fixed: Blurb module's default values were not set #1952
1162
+ * Fixed: Allow script with application/ld+json #1958
1163
+
1164
+ = 0.9.84 (14th March 2018) =
1165
+ * Added: Polylang Frontpage compatibility added #1779
1166
+ * Fixed: Proper link for Linkedin added #1820
1167
+ * Fixed: Incorrect function name was Added #1827
1168
+ * Fixed: Thumbnail resizing issue in Swift #1828
1169
+ * Fixed: Thumbnail issue in Loops of Design 3 #1714
1170
+ * Fixed: Hide post builder for Swift #1824
1171
+ * Fixed: To avoid warnings when there are no pages in WordPress #1810
1172
+ * Fixed: Condition for the Thumbnail for Swift #1733
1173
+ * Fixed: Proper Styling for footer for Swift #1733
1174
+ * Fixed: Line height issue and CSS editor not working in Swift #1821
1175
+ * Fixed: Renamed aq_resize to ampfrowp_aq_resize to avoid conflicts #1838
1176
+ * Fixed: Add the prefix to avoid conflicts #1817
1177
+ * Fixed: Added Custom format option in amp_date #1845
1178
+ * Fixed: Removed amp-img tag where blank SRC in Page builder #1843
1179
+ * Fixed: Pagebuilder modal max-height removed so it will become full width #1843
1180
+ * Added: An option for select target type in Button Module #1822
1181
+ * Fixed: Remove AMP category widget if swift is enabled #1790
1182
+ * Fixed: Filter added change mode type #1833
1183
+ * Added: Rewrite rule for .html blog page #1775
1184
+ * Fixed: Filter added change mode type #1833
1185
+ * Fixed: Swift Footer Widget Sanitizer Added #1800
1186
+ * Fixed: No OneSignal widget when PageBuilder is enabled #1840
1187
+ * Fixed: span tag added around the pagination text #1834
1188
+ * Added: Page specific option to add script/html and styles in page builder #1831
1189
+ * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
1190
+ * Added: Jarida theme compatibility added #1842
1191
+ * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
1192
+ * Fixed: Replace value attribute only from html tags. Otherwise it is removing value from * shortcodes which is breaking the whole page. #1738
1193
+ * Added: Underline option for content links added #1808
1194
+ * Added: Page specific option to add RTL in page builder #1858
1195
+ * Added: Converts AMP ads to normal so ads show when takeover is enabled in Normal Mode #1724
1196
+ * Added: Converts AMP Analytics to normal so Analytics works when takeover is enabled in Normal Mode #1724
1197
+ * Fixed: Phone icon proper alignment in Design3 #1730
1198
+ * Added: ADS for WP activation box in Extensions tab
1199
+ * Added: New design field added #1861
1200
+
1201
+ = 0.9.83.1 (8th March 2018) =
1202
+ * Fixed: Pagebuilder contents not shows on custom home page #1794
1203
+ * Added: Header hook added `ampforwp_advance_header_layout_options`
1204
+ * Fixed: Load admin files only in admin pages #1799
1205
+ * Fixed: Conflict with WP bakery pagebuilder #1783
1206
+ * Fixed: Slide in Menu break in RTL mode #1825
1207
+ * Fixed: Validation issue in loops due to empty attributes #1795
1208
+ * Fixed: Featrued Image connected Properly with Swift theme #1733
1209
+ * Fixed: Changed the disqus.php to disqus.html to pass authentication #1788
1210
+ * Added: CSS styling for Loop on shop page #1803
1211
+ * Fixed: Facebook comments not work in swift #1789
1212
+ * Fixed: Style AMP Category module in Footer swift #1790
1213
+ * Fixed: Load aq_resizer only in AMP #1805
1214
+ * Fixed: Proper markup for Pinterest in Design3 and Swift #1793
1215
+ * Fixed: Proper url for vk
1216
+
1217
+ = 0.9.83 (03rd March 2018) =
1218
+ * Added: Ability to add amp-carousel and amp-selector directly into WYSIWYG Editor #1588
1219
+ * Fixed: Debug error caused by Playbuzz Sanitizer #1674
1220
+ * Added: Show default gravatar for comments #1758
1221
+ * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
1222
+ * Fixed: To avoid debug error in swift
1223
+ * Fixed: Translation improved for some strings #1678
1224
+ * Fixed: Stop AMP takeover for Feed pages #1767
1225
+ * Fixed: Menu issues In Design 1 & Design 2 after changing from AMP-Sidebar #1565
1226
+ * Fixed: AMP Options panel Not Working After Update (0.9.82.1) version #1761
1227
+ * Fixed: Move the label to the top [UX improvement] #1746
1228
+ * Fixed: Error with Vue #1745
1229
+ * Added: Video Module added in AMP Page Builder #1750
1230
+ * Fixed: Sidebar menu is not scrollable swift theme #1769
1231
+ * Fixed: View Non-AMP should be usertrailingslashit #1772
1232
+ * Fixed: Proper structured data for Blogpage #1660
1233
+ * Fixed: Legacy Page Builder not working after the update #1773
1234
+ * Fixed: Content blank when only image in content #1778
1235
+ * Fixed: Comment ID display issue fixed #1758
1236
+ * Fixed: PHP Warning: A non-numeric value encountered in components/logo/logo.php on line 52 #1764
1237
+ * Fixed: Yummly support added in Swift #1708
1238
+ * Fixed: Demo Link updated #1781
1239
+ * Fixed: CSS is not loading in Swift Theme #1780
1240
+ * Added: Ability to add Advertisement or Sponsored label under ads #1710
1241
+ * Fixed: Featured images distortion in related posts #1684
1242
+ * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
1243
+ * Fixed: noarchive instead of nofollow in Archive pages #1693
1244
+ * Fixed: Internal links of tags are showing “/amp” after changing the end point to “?amp” in design 2 #1752
1245
+ * Fixed: line height is added for the logo in Swift design
1246
+ * Added: Class for Custom Frontpage #1787
1247
+ * Fixed: Recent post enable disable for Swift theme #1784
1248
+ * Fixed: Connect Show/Hide AMP option with AMP takeover#1786
1249
+ * Fixed: Added sanitizer to footer Widget #1756
1250
+
1251
+ = 0.9.82.1 (18th February 2018) =
1252
+ * Selector code reverted due to it's effect on carousel
1253
+
1254
+ = 0.9.82 (18th February 2018) =
1255
+ * View more details on https://ampforwp.com/0-9-82-released-stability-update-82nd-update/
1256
+ * Logo Resizing calculation by Pixels and resizing bug solved.
1257
+ * Update Notification in the Admin panel will only appear in the AMP options panel. So it will not annoy you anymore.
1258
+ * Glue underline is applying for some reason
1259
+ * Fatal error after 0.9.81 fixed
1260
+ * Facebook comments loading twice on swift
1261
+ * PHP Notice: Undefined variable: post_author_name
1262
+ * Pagebuilder fix in version 0.9.81 Compatibility with Yoast and other plugins #1749
1263
+ * Home loop modifier option added. Allows you to exclude the categories from the loop or include the Custom Post type in the homepage loop.
1264
+ * amphtml Conflict with Instant Article for Facebook resolved
1265
+ * /amp folder in the theme is applying changes in plugin, which causing a bug, but it’s been fixed
1266
+ * Backward Compatibility for AMP Preview
1267
+ * SEO Section Improvements
1268
+ * Wrong comments count on AMP pages
1269
+ * AMP Allow selector in the The Content. You can add tabs and AMP components directly into the loop.
1270
+ * If we turn off the Homepage Support then Blog is turned off as well, solved.
1271
+ * Post Pagination have two options like “Number of pages” and Previous & Next.
1272
+ * Removed the dot from the one Signal Service worker URL if the subdomain isn’t added (Causes Validation issues.)
1273
+ * Extra Space due to empty divs in Design 3
1274
+ * Remove alt from a tag in the AMP version caused many validation issues.
1275
+
1276
+
1277
+ = 0.9.81 (15th February 2018) =
1278
+ * Edge case fatal error on features.php fixed
1279
+ * Admin dashboard messup CSS fix #1731
1280
+ * Custom CSS Output added in Swift
1281
+
1282
+ = 0.9.80 (15th February 2018) =
1283
+ * View More details on the [blog post](https://ampforwp.com/introducing-swift/)
1284
+ * AMP Page Builder 3.0: The AMP Page Builder is a lightweight and much stable than ever and works flawlessly! [Read More](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
1285
+ * Swift: The New Default Theme, which you can select from the design section of the Page builder.
1286
+ * A way to create a Child Theme for AMP [read more](https://ampforwp.com/tutorials/article/child-theme-amp/)
1287
+ * Make AMP & Non-AMP Same: We have an amazing new option called AMP to WP which will generate the WordPress version of the AMP design which will be viewed on the canonical version of the website.
1288
+ * AMP Takeover: You can deliver a fully AMP compatible website with this option. It will basically take over the non-amp version and deliver an AMP version to your desktop and mobile users, on WordPress & AMP version. That’s why it was called AMP Takeover
1289
+ * Logo Resizing made easy
1290
+ * Typography Options
1291
+ * 3 Headers design in swift theme
1292
+ * Error while sharing the image on Pinterest #1699
1293
+ * Homepage support was not working ( when page support is off ) #1695
1294
+ * Custom Permalinks rewrite issue solved #1689
1295
+ * Custom post type was appearing two types #1688
1296
+ * Theia Post Slider plugin incompatibility with post pagination fixed #1677
1297
+ * Link to the categories in loop of Design 3 #1632
1298
+ * amphtml was not working when plain permalink selected along with static page as homepage #1614
1299
+ * AFS Analytics Integration added #1605
1300
+ * Removed the blank spaces from analytics id field to deliver a good UX. #1599
1301
+ * ?amp endpoint feature added #1561
1302
+ * Ability to remove the excerpt and image from related post #1510
1303
+ * Thumbnails on-the-fly generation added for better control over the design.
1304
+
1305
+
1306
+ = 0.9.74 (23rd January 2018) =
1307
+ * View More details on the [blog post](https://ampforwp.com/0-9-74-released-stability-update-79th-update/)
1308
+ * Fixed: Push Notifications button alligned in center #1500
1309
+ * Added: Meta robots tag support from Yoast #1563
1310
+ * Added: Option to Disable wptexturize/smart-quotes Support #1458
1311
+ * Fixed: Changed the label id to avoid conflict with Advanced AMP Ads #1591
1312
+ * Fixed: esc_attr causing validation issues with single and double quotes #1616
1313
+ * Fixed: Image stretching problem resolved when "Featured Image from the content" was set #1580 #1582
1314
+ * Added: Create Template by Custom taxonomy name like product-jeans.php in AMP Theme FrameWork #1594
1315
+ * Added: Custom Post type support added in the Core #1612
1316
+ * Fixed: custom-amp-content.php cleaned with PHPCS #1497
1317
+ * Added: Basic Product(WooCommerce) support added #992 #1276 for full WooCommerce Support please check this [Extension](https://ampforwp.com/woocommerce/#utm_source=readme-log&utm_medium=0.9.74-readme&utm_campaign=AMP%20Plugin)
1318
+ * Added: Proper fallback support added if the current active AMP theme is not available #1624
1319
+ * Fixed: Resolved debug errors #1622
1320
+ * Added: All in One SEO compatibility #1557
1321
+ * Fixed: Load AMP Styling only on AMP pages #1441
1322
+ * Added: 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber) #1265
1323
+ * Fixed: itemprop="url" was adding in non-amp #1626
1324
+ * Fixed: SiteOrigin Pagebuilder compatibility with Custom Frontpage #1592 #1593
1325
+ * Added: MediaAce lazy load compatibility of Bibmer Theme #1472
1326
+ * Fixed: Content Links plugin was causing validation errors #1569
1327
+ * Added: Filter added called get_content_from_dom to modify the output in AMP function #1462
1328
+ * Added: amp_breadcrumb component added in AMP Theme Framework #1636
1329
+ * Fixed: Sidebar Styling and proper sanitizer updated
1330
+ * Added: amp_author_meta component added in AMP Theme Framework #1641
1331
+ * Fixed: amp_post_pagination component improvement in AMP Theme Framework
1332
+ * Added: Ability to add link classes in amp_post_pagination in AMP Theme Framework
1333
+ * Fixed: amp_author_meta image code improvement in AMP Theme Framework
1334
+
1335
+ = 0.9.73 (15th January 2018) =
1336
+ * View More details on the [blog post](https://ampforwp.com/0-9-73-released-stability-update-78th-update/)
1337
+ * Added: Instagram Sanitizer added to process Instagram Embeds inside the BlockQuotes #1581
1338
+ * Added: Option Created to Enable/Disable rel="nofollow" for View Non-AMP link #1572
1339
+ * Fixed: Custom AMP Content was not working with Elementor Pagbuilder #1495
1340
+ * Fixed: ampforwp_is_front_page() is not working in the newspaper theme #1583
1341
+ * Added: Allow people to use multiple Analytics on AMP #1124
1342
+ * Fixed: 'https' error with PlayBuzz Embeds #1481
1343
+ * Added: Option to show last modified date instead of Published date #1496
1344
+ * Fixed: Add proper permission for ampforwptourinstaller page
1345
+ * Fixed: Debug warnings #1586 and #1459
1346
+ * Fixed: A lot of Security Fixes has been done #1497
1347
+ * Fixed: Removed lot of unused code #1497
1348
+ * Added: AMP skip for checkout page #1443
1349
+ * Added: Show the list of Child pages at the end in Parent Page with on/off #1551
1350
+ * Fixed: Properly strip shortcodes fom Structured data description #1512
1351
+
1352
+ = 0.9.72 (6th January 2018, Happy New Year) =
1353
+ * View More details on https://ampforwp.com/0-9-72-released-stability-update-77th-update
1354
+ * Related Posts Image stretching in Design 3 AMP theme Framework #1482
1355
+ * RTL option must be integrated into AMP theme Framework #1562
1356
+ * `DOMDocument::loadHTML():` Attribute itemprop redefined warning fixed #1539
1357
+ * Created an option to add Author bio article in Facebook Instant Article #1521
1358
+ * Options to add push notification button above and below the content #1571
1359
+ * Copy the Content button for Custom Post types #1532
1360
+ * Alexa Metrics Compatibility added #1536
1361
+ * Logo styling added with amp_logo. So styling can work with AMP Theme Framework. #1520
1362
+ * Content parsing login improved, so it will not through any warnings if the content has only 1 paragraph. #1523
1363
+ * Debug Warnings removed #1564
1364
+ * Caption in the Gallery creating validation errors Fixed. #1549
1365
+ * Tables Link color should be as same as the link of the body #1559
1366
+ * Separate options for In-Content related posts #1546
1367
+ * WebPage Schema Type added in Structured Data options #1558
1368
+ * Fatal Error fixed with `mb_detect_encoding()` after enabling the minify option #1494
1369
+ * Content blank or fatal errors due to itemscope and itemtype, fixed. #1570
1370
+ * Performance improved. Due to `_transient__redux_activation_redirect` transient. #1526
1371
+
1372
+ = 0.9.71 (1st December 2017) =
1373
+ * Design 2 Post Titles issue fixed
1374
+ * Instant Articles validation issue fixed.
1375
+
1376
+ = 0.9.70 (30th November 2017) =
1377
+ * View More details on https://ampforwp.com/0-9-70-released-stability-update-76th-update/
1378
+ * Image alt tags are empty which caused issues. #1154 (thanks to @liagua)
1379
+ * ALT and IMG tags are in one line #1442
1380
+ * Updated the permalink for post view in admin area #1318
1381
+ * aria-current causing validation issues #1427
1382
+ * Aligning Captions in the Bottom in Gallery #1428
1383
+ * Logo’s height & width should dynamically come from the logo. This was a great UX improvement in my opinion. The logo would good regardless of the kind of image you upload. #1429
1384
+ * After 0.9.69.1 update Call to undefined function mb_convert_encoding #1447
1385
+ * Featured image options now also reflect the structured data #1430
1386
+ * Blur & Stretching issues of Design 3 thumbnails are now fixed. They’re crisp and clear than ever! #1227
1387
+ * Related posts are showing on single even when turned off #1434
1388
+ * Show Related posts CSS only when it is selected #1356
1389
+ * Author image now displays on author pages #1426
1390
+ * Category base removal in AMP from url option is only working on the first page #1418
1391
+ * Bug fixed: PHP Warning DOMDocument Empty string supplied as input #1449
1392
+ * Video support added in Instant Articles #1300
1393
+ * Read more tag in Instant articles issue fixed #1415
1394
+ * Amp carousel issues fixed #1446 #1456
1395
+ * Compatibilty with Envira Gallery Lazy Loading #1432
1396
+ * Inline Related Posts in AMP Theme Framework #1457
1397
+ * Different number of in-content related post and related posts at the footer #1448
1398
+ * FooGallery update broke all the AMP compatibility, but we fixed it from our side so that user’s gallery work perfectly #1424
1399
+ * WPBakery Page Builder Conflict solved #1419
1400
+ * Goodlife theme Lazy Load compatibility added #1416
1401
+ * AMP-Facebook-Like Was found but unused Validation Error fixed. #1463
1402
+ * Playbuzz not displaying if added with https: #1466
1403
+ * Options Panel labels renamed for better understanding.
1404
+
1405
+
1406
+ = 0.9.69 (20th November 2017) =
1407
+ * View More details on https://ampforwp.com/0-9-69-released-stability-update-75th-update/
1408
+ * One Signal Push Notifications bug fixed! #1404
1409
+ * AMP theme framework Related posts extended so that it can be used as a loop format #1406
1410
+ * Facebook like Button improvements #1405
1411
+ * Add layout responsive tag to image module in page builder #1373
1412
+ * Strip the shortcodes from Structure data area #1389
1413
+ * Test HTTP API Call From admin panel by redux #1391
1414
+ * Meta description tag in normal site Unicode character is different from AMP site unicode character. #1369
1415
+ * Updated the check for ampforwp_is_amp_endpoint this should fix the issue #1372
1416
+ * Updated the URL for design 3 so it can work with plain permalink #1318
1417
+ * Updated the option Featured Image from The Content #1367
1418
+ * If “Featured Image From The Content is enabled and Duplicate Featured Image” is disable it will remove all the duplicate images from the content. #1375
1419
+ * Date Format under Homepage improvements #1408
1420
+ * Warnings due to inline related posts in Homepage #1413
1421
+ * Plain Permalinks Support improved. #1318
1422
+ * Allow Homepage title of Bread Crumbs feature to be changed from Translation Panel #1414
1423
+ * Debug Errors in AMP Theme Framework #1403
1424
+ * Unnecessary loading of Merriweather fixed, it will only load in the Design 1.
1425
+ * Enter Phone Number is not Appearing when switch to Call now button #1425
1426
+ * Need excerpt below the title, above the meta #1399
1427
+ * Remove the Separator piple symbol from the footer when “Back to Top link” is off #1417
1428
+ * Display Child or subcategories on Category pages. #1385
1429
+ * Add Caption in the Gallery Image feature conflicting with Gallery widget #1407
1430
+ * Youtube Shortcode embed with &rel=0 support #1378
1431
+ * Filter for Excerpt custom text in the AMP options #1411
1432
+ * WPML Multilingual CMS plugin flags compatibility #1270
1433
+ * Compatibility with Tasty Recipes plugin and other page builders with amp page builder #1431
1434
+
1435
+
1436
+ = 0.9.68 (12th November 2017) =
1437
+ * View More details on https://ampforwp.com/0-9-68-released-stability-update-74th-update/
1438
+ * ADs are Optimize For Viewability, meaning it will try to load faster than the original AMP AD loading strategy.
1439
+ * Content was disappearing issue was resolved #1392
1440
+ * Featured Image from The Content option is connected to related post #1339
1441
+ * Fix amp-web-push helper iframe configuration URL #1387
1442
+ * Facebook Like button added to AMP #1327
1443
+ * WPML support for AMP Improvement #1285
1444
+ * Debug Errors fixed #1366
1445
+ * Setting ad density for Facebook Instant Articles ads #1287
1446
+ * Showing the number of comments in Single #1341
1447
+ * Styling added to the sitewide ads and made sure that they are in the center. #1343
1448
+ * One Signal buttons Translation added #1383
1449
+ * Article type added to Structured data #1344 #1354
1450
+ * The issue with the amp-carousel when RTL was enabled #1358
1451
+ * amp-carousel with images of different sizes #1358
1452
+ * a bug where Img is getting converted to amp-img if there's no height or width. which causing validation issue and image is not visible fixed.
1453
+ * Instant Article should have a default value for number of posts, it was causing the memory issue with alot of posts #1390
1454
+ * Notice if a post has no author data #1338
1455
+ * Added a new redux extension select field in redux framework #1349
1456
+ * Issues with galleries as well as gallery captions #1363
1457
+ * Added a hook for adding anything in between the loops #1396
1458
+ * Hide meta boxes as per the user level types #1340
1459
+ * A Switch between the Date formats #1384
1460
+ * Fix: Jannah theme lazy load issue #1362
1461
+ * Issues with galleries as well as gallery captions #1363
1462
+ * Create Dynamic url of amp according to the permalink structure #1318
1463
+ * Minor code performance improvement.
1464
+ * Archive titles in Design 3 frontend issue
1465
+
1466
+ = 0.9.67.0 (6th November 2017) =
1467
+ * View more details on https://ampforwp.com/one-signal-push-notifications-for-amp/
1468
+ * OneSignal Push Notifications integrated #807
1469
+ * Vimeo embed support added
1470
+ * SoundCloud embed support added
1471
+ * Pinterest embed support added
1472
+ * PlayBuzz embed support added
1473
+ * DailyMotion embed support added
1474
+ * Fix: Handle issues with data uri images in CSS #1033
1475
+ * Fix attribute when adding AMP Mustache lib #1033
1476
+ * Fix: Output CSS for feature image #1033
1477
+ * An option added for users who don't want to receive update notifications #1342
1478
+ * Structured data nav improvement
1479
+ * Sitenavigationelement has been implemented correctly for footer menu. #1345
1480
+ * Style sanitization for Menu Items #1359
1481
+ * Polylang flags support for menu  #1360
1482
+ * Mobile Redirection issues fixed #1173
1483
+ * Jetpack fatal error fixed #1355
1484
+ * AMP Page Builder requires a button to be clicked, so the scripts are not running on the runtime making it easy on the edit screen page and avoid the possible script conflict.
1485
+ * Needs proper CTA Bar's styling. #1361
1486
+ * Debug errors on archive pages #1353
1487
+ * Preview shall only be loaded on click rather than in background #1331
1488
+ * ampforwp_is_home() function code improved
1489
+ * making sure scripts and styling is properly adding when sanitizing the sidebar #868
1490
+ * All the backend css and js should be versioned, so it's not cached. #1335
1491
+
1492
+ = 0.9.66.1 (30th October 2017) =
1493
+ * Fatal error if has version less than WP 4.8 fixed
1494
+ * More Minor Validation errors fixed
1495
+ * Odnoklassniki sharing button is not working #1337
1496
+
1497
+ = 0.9.66.0 (29th October 2017) =
1498
+ * View more details on https://ampforwp.com/0-9-66-released-bug-squashing-oct-2017-72nd-update/
1499
+ * Design 3 & Design 1 are optimised with 90+ Google PageSpeed Score on Mobile and 95+ in desktop performance #1273
1500
+ * Featured Image from the content for blog and homepage #1295
1501
+ * Category Module for AMP Page builder added #888
1502
+ * Don't load unused CSS selectors. All the CSS is conditionally loading, to decrease the number of CSS loaded per page and increased in performance #1292
1503
+ * Twitter Video embed code support added in AMP #1307
1504
+ * Video Posting Structured data #1293
1505
+ * Navigation menus are now Schema compatible for better Structured data integration #1229
1506
+ * Yoast checking conditions for Structured Data Improved #1293
1507
+ * Added "back to Top" in design 3 #959
1508
+ * Proper blog check and author for custom frontpage #1260 (Made some changes to check the blog properly and also added the author details for Custom Frontpage)
1509
+ * AMP not working on password-protected pages #1192
1510
+ * Debug errors reported by the user #1284 and few more we found internally
1511
+ * Inline Style Sanitizer for Comments to avoid any validation issues #1193
1512
+ * Next/Previous links removed from pages #1268 props @Frenchomatic
1513
+ * WPML Multilingual CMS plugin flags compatibility added #1270
1514
+ * Image sanitizer added for the Sidebar #1270
1515
+ * Added AMP Components the correct way. Added amp-gist, amp-social-share. #336
1516
+ * amp-video script added - Which decreases the non-critical validation issues #991
1517
+ * Arrows in Design 3 pagination #1000
1518
+ * Author page links in Single #1282
1519
+ * Added previous open state of option panel and show again when search clean #1238
1520
+ * Odnoklassniki Social Sharing Support for AMP (with target blank for better bounce rate) #1230
1521
+ * GIF or animated images resize problem fixed #1281
1522
+ * In Design1, Header Background & Link Color have same option #1249
1523
+ * FB Pixel for AMP added #1231
1524
+ * Structured Data Type option for AMPed Custom Post types only #1259
1525
+ * Attribute ‘readability in the tag ‘div’ removed - this decreases the validation issues #1306
1526
+ * AMP Theme Framework Improvements: loop, author, related_post, Add Author support #1311
1527
+ * Commentator's Avatar in the comments section #1132
1528
+ * Remove 'Welcome to AMP' from Dashboard sub-menu and moved to the options area to decrease the annoyance and increase the user happiness #902
1529
+ * Option to Sort the Random Order of Related Posts to increase the audience engagement (Default is 'ID', on enabling the option it will change to 'rand') #1250
1530
+ *  View AMP on Admin Bar for the respected page/post If enable. #1236
1531
+ * google maps iframe link to larger map #1099
1532
+ * Comments now jumping due to the slash at the end #1309
1533
+ * Page Builder causes Incompatibility with the Divi theme (We restructured the Text Module for Page builder for better compatibility and UX) #1162
1534
+ * Inline Style Sanitizer for Comments added. Less Critical Validation issues and Better Presentation #1193
1535
+ * WPML amp-html error fixed #1285
1536
+ * Radio button not working for Show View more Button" #1018
1537
+ * Added registered handle for tinymcePointer localize data #1301
1538
+ * Date in the Design 2 should not be hidden in mobile version #1315
1539
+ * Page builder not working on homepage(Selected as front page) #1316
1540
+ * Instant articles number of posts option #1271 (Removed some unused code as well, it will rendered all posts if none is enter in the options)
1541
+ * Auto flush on save for FBIA to improve the UX.
1542
+ * Plain Permalinks Support improved. #1318
1543
+ * Tables support added to FB Instant Articles #1266
1544
+ * Demo link added in the Theme selector option #1248
1545
+ * Remove invalid attributes from multiple tags which reduces critical validation errors and validates pages.
1546
+ * AMP makes a problem in archive page label, when it is active in non-amp version #1304
1547
+ * placeholder-icon.png is 404 fixed #1310
1548
+ * Category & Tags switches for Single added. #1055
1549
+ * Copy Content (Custom AMP Editor) Option Not showing with Page Builder of SiteOrigin issue fixed #1280
1550
+ * Improving UX with: when AMP support is off for a specific post type then all the AMP related metaboxes should be removed #1289
1551
+ * Options Panel Options rearranged, labels rewritten, descriptions repositioned for better User interaction [commit]
1552
+
1553
+ = 0.9.65.2 (25th October 2017) =
1554
+ * TypeWatch is not a function #1299
1555
+ * Error with BackupBuddy fixed #1303
1556
+
1557
+ = 0.9.65.1 (24th October 2017) =
1558
+ * AMP Minifcation Issues fixed
1559
+
1560
+ = 0.9.65 (22nd October 2017) =
1561
+ * View more details on https://ampforwp.com/new/
1562
+ * Favicon for AMP #1039
1563
+ * AMP Minification option added with Performance Tab in Options #1286
1564
+ * Post support is turned off then Meta box should also be removed #1253
1565
+ * Excerpt Length feature in Design two and Three #1122
1566
+ * Test Contact form plugins and their settings in the options panel #1121
1567
+ * Mobile preview in Edit Screen #1082
1568
+ * Search feature for Options Panel #1238
1569
+ * WordPress Social Share Buttons Validation Issues #1272
1570
+ * itemtype attribute is striping in the ul tag #1210
1571
+ * Debug Error in Breadcrumb 0.9.64 #1267
1572
+ * Disable AMP linking at Wordpress Search Page #969
1573
+ * Featured Image is missing #1071
1574
+ * Removed ampforwp_plugin_activation_notice #1034
1575
+ * Add VK (Vkontakte) Sharing Button #1187
1576
+ * Grab the first image instead of post thumbnail for featured image #1189
1577
+ * AMP theme framework core changes #1274
1578
+ * Grab the first image instead of post thumbnail for featured image #1189
1579
+ * Create a Switch on Top of Page Builder #1279
1580
+ * Inline Related Posts added that helps you with improving bounce rate #1078
1581
+ * Caption Support in Image Gallery Carousel #1172 #1136
1582
+ * Instant Articles feed shows sticky posts on top #945
1583
+ * Added search check, to fix debug notice
1584
+ * Option to hide date from Design 1 & Design 3 Homepage Loop #1264
1585
+ * UI labels improvements in the Options panel
1586
+ * Sorting out design #2 static front page #1175
1587
+
1588
+ = 0.9.64 (15th October 2017) =
1589
+ * View more details on https://ampforwp.com/new/
1590
+ * Structured Data Type option added. You can now change the structured data format for Posts, Pages and Custom post types #323
1591
+ * When comments plugin activate, Comments section should remove. #1093
1592
+ * Notification causes a validation error. #1147
1593
+ * CSS !important need sanitization #1225 - This will help us to validate tens of thousands of pages.
1594
+ * Strange spaces when using Sassy Social Share #1185
1595
+ * Remote CDN use? Let's host it? #549
1596
+ * Typo fix for Linkedin Profile Page URL section #905 [Thanks to Prayag @pra85]
1597
+ * Replace fastimage with fasterimage for PHP 5.4+ #1191
1598
+ * Debug Errors Post 0.9.63 #1219
1599
+ * Ad5 code injected twice #1116
1600
+ * Homepage Support must be Off when we turn Off Homepage Support. #738
1601
+ * Add custom class in post pagination for styling #1100
1602
+ * Removed the Lazy Loading issue of Schema Theme #1170
1603
+ * H1 tag for archive titles (Commit) #1155
1604
+ * Alt tag for the Logo #1155
1605
+ * Design 3 Menu RTL issue fixed #1106
1606
+ * Ability to add dynamic classes in body tag #1237
1607
+ * Warnings fixed on 404 page #1243
1608
+ * Properly structured data for Homepage, Custom Frontpage and Blog #1155 #1242
1609
+ * Option added to Enable/Disable categories and Tags links from Single #1155
1610
+ * Fatal error after 0.9.63 fixed #1220
1611
+ * Debug Error due to vendor AMP #1213
1612
+ * PHP warning on line 147 after 0.9.63 #1241
1613
+
1614
+ = 0.9.63 (8th October 2017) =
1615
+ * View more details on https://ampforwp.com/new/
1616
+ * Category and Tag Base Remover as core features #1079
1617
+ * Hide AMP on Posts option added #935
1618
+ * Installation Setup Screen Added for new users
1619
+ * Validation for the session in PHP #1158. PR by Bryan Contreras @bryan3561
1620
+ * All the amp pages should work perfect with Plain Permalink settings #488
1621
+ * WYSIWYG TinyMCE editor added for the Text Module in AMP Page Builder #1205
1622
+ * WPML Static Front Page Support for title and description with Yoast. #1143
1623
+ * Row Settings area added for AMP Page Builder #1148
1624
+ * xlink attribute causes Validation Issues #1149
1625
+ * Posts with no images on Archive pages are squeezed to 65% #1058
1626
+ * Body Class to target specific pages #1123
1627
+ * Option to enable/disable Breadcrumb #1129
1628
+ * Debug errors due to Breadcrumbs fixed #1109 #1130 #966
1629
+ * Visit AMP option added below the View Site in Dashboard. #1076
1630
+ * Many Debug errors fixed #1109
1631
+ * Textarea for body tag which will help people add AMP Auto Ads #1064
1632
+ * Structured data improvements #1048 #1044 #1085 #1118
1633
+ * Twitter share URL based on users choice, you can allow people to share pretty links and short links. #1097
1634
+ * Author Avatar removed code fixed which has been displayed in the div "amp-wp-meta amp-wp-byline". #1087
1635
+ * Only one figure element is allowed in the article header FB Instant Articles #1127 & #1157
1636
+ * Image alt tags are empty and cause issues fixed. #1154
1637
+ * Button to copy the content into Custom AMP Editor #783
1638
+ * Rename AMP loop widget areas or add proper descriptions #1045
1639
+ * Trailing slash issue #1095
1640
+ * Related Posts by Post type featured added #1141
1641
+ * Ultimate Social Media Icons plugin causes validation issues fixed #1135
1642
+ * Adding proper path for functions.php, it was causing strange fatal errors and irregular white screen of death fixed  #1144
1643
+ * A smooth way to migrate from other AMP plugins to AMPforWP #1051
1644
+ * Alert added on AMP by Automattic installation. #1180
1645
+ * Insertion of strange spaces around H1 titles #1069
1646
+ * AMP Page Builder and HTTPS #1164
1647
+ * You can display comments from more than one vendor such as displaying WP & FB Comments #1150
1648
+ * Rename AMP loop widget areas or add proper descriptions #1045
1649
+ * FrontPage featured image with srcset #1063
1650
+ * An option for Showing featured image from custom field #1098
1651
+ * Added the Custom Front Page Title From Yoast SEO #1163
1652
+ * Commenting breaks SSI directives causes to display error #1179
1653
+ * rel canonical appears more than once in search pages #1195
1654
+ * Dev mode in AMP #1083
1655
+ * Social Sticky Icons Improvements #1061
1656
+ * Grand-Child support added in Design #1152
1657
+ * amp-accordion non-critical error in Design 3 & CSS improvements fixed #1152
1658
+ * Incorrect @id for mainentity #1080
1659
+ * Hide AMP by specific Categories tweaked for performance. Thanks to Joshua Eichorn @jeichorn CTO at Page.ly #1133 - Huge Thanks!
1660
+ * amp-auto-ads for sites with RTL support ON #1176
1661
+ * Redirected the Google forms to our contact page so that we can take each and every query and answer every person. #1201
1662
+ * ui-state-highlight class was conflicting with ACF date picker fixed #1199
1663
+ * Responsify WP Lazy loading causes blank image (Compatibility) #1131
1664
+ * amp-carousel scripts loading on the second page fixed in Design 3
1665
+ * Show Design screenshot while selection of design #1209
1666
+ * Switches Redesigned for better UX #1211
1667
+ * Welcome Page UX Improved #1214
1668
+
1669
+ = 0.9.62 (25th September 2017) =
1670
+ * View more details on https://ampforwp.com/new/
1671
+ * INTRODUCING Page Builder 2.0 for AMP! [Learn More & Watch the Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
1672
+ * Documentation & Help links improved
1673
+ * Post type specific classes for targetting
1674
+ * Design name restored in Options panel (It was recently renamed to Appearance)
1675
+ * Minor Bug fixes as well
1676
+
1677
+ = 0.9.61 (10th September 2017) =
1678
+ * View more details on https://ampforwp.com/options-restructured/
1679
+ * Options Panel Restructured Options were dividing into two parts: Settings and Appearance.
1680
+ * AMP Theme Framework Core Support Added. You can now create themes of your own in just minutes.
1681
+ * WPML Static Front Page Support #1111
1682
+ * Notification message disables when CF7 & gravity form is activated. #1107
1683
+ * Space after On in Design 3 #1114
1684
+
1685
+ = 0.9.60 (4th September 2017) =
1686
+ * View more details on https://ampforwp.com/0-9-60-released-improved-redirection-66th-update/
1687
+ * Class added to View non-amp anchor tag
1688
+ * Params added properly to get rid of a warning #1077
1689
+ * rel=attachment noopener generating validation errors #1090
1690
+ * Breadcrumbs Support Added #701
1691
+ * Enable / Disable button added for Navigation Menu #735
1692
+ * Move the ad code for Instant Article down after the article #964
1693
+ * Add analytics code of FB instant articles properly #1096
1694
+ * datetime Tag not stripping properly #1043
1695
+ * Mobile redirection on custom post types #1028 #1052
1696
+ * Mobile Redirection causing extra redirect #879 #933
1697
+ * Proper mobile redirection on Homepage #1052
1698
+ * View non-amp on blog will redirect to blog
1699
+ * Blog will redirect to blog irrespective of AMP Homepage option #871
1700
+ * Dont redirect if archive support is disabled #1052
1701
+ * non-amp category pages should redirect to non-amp pages if turned off from Hide AMP #999
1702
+ * Disable amp for forum plugin (wpforo) #592
1703
+
1704
+ = 0.9.59 (23th August 2017) =
1705
+ * Design 3 Images were not aligned properly. Fixed. #1040
1706
+ * Caption in the design 3 improved
1707
+ * Jetpack File not loading throwing fatal error #1038
1708
+ * If the mobile redirection is ON and the category is excluded to display the AMP then it should redirect properly
1709
+ * Custom Editor Compatibility issue with SiteOrigin PageBuilder fixed #997
1710
+ * Native Twitter Embed support
1711
+ * Added a hook after the body tag: ampforwp_body_beginning (commit)
1712
+ * GTM in AMP Improved #958
1713
+ * WP User Avatar compatibility Added #975
1714
+ * Alt tag on frontpage featured image added #1050
1715
+ * Blurred Images on the frontpage fixed #1050
1716
+ * Need to escape alt tag #1049
1717
+ * Debug errors & PHP warnings were fixed #859 #811 #830 #810
1718
+ * Proper rel canonicals for inner pages #1047
1719
+ * Added Video sanitizer for comments #1053
1720
+ * When activating the AMP plugin, display a notification in the popup. #1036
1721
+ * Video Sanitizer added for Comments
1722
+
1723
+ = 0.9.58.1 (9th August 2017) =
1724
+ * Jetpack conflict issue solved #1038
1725
+ * Genesis SEO Support added #1013
1726
+ * Fixed Wrong SEO title issue #1013 and #836
1727
+ * Design 3 Carousel script loading method improved #990
1728
+
1729
+ = 0.9.58 (9th August 2017) =
1730
+ * View more details on https://ampforwp.com/new/
1731
+ * Genesis SEO for AMP support added
1732
+ * AMP 0.4.2 Vendor Bundled for making it crash proof
1733
+ * Archive desc only on 1st page #1029
1734
+ * Ads are not working after 0.9.6 #1030
1735
+ * Fixed the Post 0.9.57 Update Bugs #1025
1736
+ * All Images are aligned on left side in design 3 #1031
1737
+ * Custom frontpage title issue in Design 3 fixed
1738
+
1739
+ = 0.9.57 (5th August 2017) =
1740
+ * See the Full changelog https://ampforwp.com/0-9-57-released-compatibility-issue-fixed-62nd-update/
1741
+
1742
+ = 0.9.56 (31st July 2017) =
1743
+ * View more details on https://ampforwp.com/page-break-in-amp/
1744
+ * Page Break / NextPage (Pagination) Support Added #834 #857 (Improvement)
1745
+ * Show/Hide AMP for Categories of Posts or All posts #872 (Improvement)
1746
+ * Adding analytics capabilities to Instant Articles #978
1747
+ * JetPack Plugin Conflict Solved #971
1748
+ * Social sharing code improved. amp-social-share js is getting added for line and WhatsApp social share #981
1749
+ * Code improvement for rel canonicals(home and archive)
1750
+ * Perfect SEO URL + Yoast SEO Compatibility #982
1751
+ * Some styling for tags to show up properly
1752
+ * Undefined index notices #960
1753
+ * Non-amp category pages should redirect to non-amp pages if turned off from Hiding AMP #999
1754
+ * Page builder text and button module issues #972
1755
+ * Documentation links updated in the Options panel
1756
+
1757
+ = 0.9.55 (13th July 2017) =
1758
+ * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
1759
+ * Disqus Comments show up even when disabled per post #931
1760
+ * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
1761
+ * H3 inside OL in Related-Posts.php #930
1762
+ * Advertisement Options in Instant Articles #943
1763
+ * Incompatible with bootstrap plugin #525
1764
+ * Error in tag and category links #934
1765
+ * Pagebuilder Button module link had issues #951
1766
+ * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
1767
+ * WPtouch Pro Compatibility Issues #927
1768
+ * Better scripts compatibility in Single of post types #757
1769
+ * Instant Articles Error: "The HTML element does not contain any text" #949
1770
+ * added a filter in all the dates so a user can change the date format and modify #962
1771
+ * Design3 Menu Arrows are clickable along with the links #952
1772
+
1773
+
1774
+ = 0.9.54.2 (4th July 2017) =
1775
+ * Minor bug post 0.9.54 bug fixed
1776
+
1777
+ = 0.9.54 (4th July 2017) =
1778
+ * View more details on https://ampforwp.com/new/
1779
+ * Facebook Instant Articles Support #862
1780
+ * Exclude Some Pages from Mobile Redirection #914
1781
+ * After 0.9.53 update amp-social-share js missing (critical issue) #924
1782
+ * Hooks added in Header (above and below)
1783
+ * View non AMP[Code improvement] #928
1784
+ * Pages are not supposed to show meta like this, especially Categories #894
1785
+ * Monarch plugin having design issues #925
1786
+ * Show AMP Hide AMP Check Box Fixes #794
1787
+
1788
+ = 0.9.53 (19th June 2017) =
1789
+ * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
1790
+ * Compatibility Issue with Rocket Lazy Load plugin #907
1791
+ * Link color issue with UX of Color Pickers in Design 3 #731
1792
+ * amp-analytics js appears more than once when Google tag manager is used #885
1793
+ * SEO by SQUIRRLY is adding analytics twice #678
1794
+ * Fatal error when WPSEO is activated #900
1795
+ * Design 3 Sticky header should have an option #625
1796
+ * Search form was enhanced, it can now be used on the websites without https certificate. That will certainly fix a lot of validation issues. #912
1797
+ * Yandex Metrika support in AMP #585
1798
+ * Histats Analytics Support #880
1799
+ * Chartbeat Analytics Support #882
1800
+ * Do not strip Rel from anchor tags #790
1801
+ * Design close Resulting Blank Screen in AMP Site #642
1802
+ * Logo size is not applying #817
1803
+ * AMP Publisher logo guidelines #162
1804
+ * Remove amp-social-share extension .js from Custom Frontpage #899
1805
+ * Add compatibility with Sassy Social Share #679
1806
+ * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
1807
+
1808
+ = 0.9.51.1 (12th June 2017) =
1809
+ * Redirection issue after 0.9.51 Update.
1810
+ * Improved compatibility with plugins.
1811
+
1812
+ = 0.9.51 (8th June 2017) =
1813
+ * View more details on https://ampforwp.com/page-builder-released-in-amp/
1814
+ * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
1815
+ * Comments are not showing properly when words are long #861
1816
+ * Remove amp-social-share extension .js from Pages #853
1817
+ * The tag ‘amp-sidebar extension .js script’ appears more than once in the document #828
1818
+ * Remove Advertisement tab #839
1819
+ * Compatibility with Slide-in Plugin by WPMU dev #866
1820
+ * Mobile redirection issue with bbpress #867
1821
+ * All the data must be properly sanitize in the sidebar #849
1822
+ * AMP html should not be added on the second page of comments
1823
+ * Author page’s support #456
1824
+ * URLs in comments should be clickable(links) #869
1825
+ * Featured image should be centered in desktop mode #870
1826
+ * Added More Hooks #721 (Documentation on this coming soon!)
1827
+ * Page 2 goes to the wrong URL #865
1828
+ * Proper Title and meta for homepage and posts #850
1829
+ * Gist Support added #608 – Just add a shortcode and enjoy Devs (Ex: amp-gist id="b9bb35bc68df68259af94430f012425f )
1830
+ * /blog/amp pagination not working #875
1831
+ * separate the Text and Date format in design 2 #876
1832
+ * Comments show in AMP w/o breaks between paragraphs #873
1833
+ * If no featured image below hooks are not working #877
1834
+ * Change meta name Viewport and its value #878
1835
+ * Bolt icon in option #474
1836
+ * Code restructuring and code quality improvements.
1837
+ * Create a seperate function for comment code in frontpage.php #682
1838
+ * Remove all the duplicate code from frontpage.php of all the designs and use hooks to add the code instead of static code #889
1839
+ * Few Debug errors removed.
1840
+
1841
+ = 0.9.50 (24 May 2017) =
1842
+ * View more details on https://ampforwp.com/facebook-comments-in-amp/
1843
+ * Design 3 Social Icons issue #832
1844
+ * View non AMP leads to /?nonamp=1 #814
1845
+ * Youtube shortcode compatibility improved #557
1846
+ * welcome.php should be shown only if user is “administrator” #696
1847
+ * Facebook comments support added in AMP #825
1848
+ * WP Like Button Compatibility #841
1849
+ * Custom Taxonomy Support added with Custom Post Type Extension.
1850
+ * Front page comments not found as expected #837
1851
+ * Fixed xml:lang tag issue #848
1852
+ * Sanitize Iframe in the archive description Fixed #845
1853
+ * Compatibility with Newspaper Theme by TagDiv #842 and #796
1854
+ * Some debug problems (blog page, style.php) #838
1855
+ * Featured Image hooks added
1856
+ * Twitter is misspelled #854
1857
+ * The core concept of the AMP Content builder has been built.
1858
+
1859
+
1860
+ = 0.9.49 (12 May 2017) =
1861
+ * View more details on https://ampforwp.com/0-9-49-released-small-important-bugs-fixed-56th-update/
1862
+ * Option added to display the excerpt in Single #806
1863
+ * Ability to add new invalid tags to filter out from AMP pages #809
1864
+ * In frontpage, comment button is pointing to wrong URL #812
1865
+ * Call now button and search is overlapping in Design-1 #784
1866
+ * Sticky Social Icons should be off if the CTA notification bar is on #788
1867
+ * Author bio in Design 1 and 2 #732
1868
+ * Styling in Taxonomy description causing validation issues #798
1869
+ * Twitter share(handle, url positions fixed) #815
1870
+ * Tables responsiveness in ALL Designs #726
1871
+ * Output all the categories and tags with their own ID’s in the div classes #750
1872
+ * Social Share Icons Overlap with Leave A Comment in Design 3 #716
1873
+ * Effective Measure Support on AMP #297
1874
+ * Custom AMP editor on pages should only be shown when page support is ON #756
1875
+ * AMP on website.com/blog without need of separate installation #775
1876
+ * GTranslate Compatible #819
1877
+ * Images and amp-anim styling added #725
1878
+ * Filter to make the title in a post to a link #727
1879
+ * Author Bio and Social Share button must not come in Pages #770
1880
+ * StatCounter is now compatible with AMP #361
1881
+ * Line Social media support #500
1882
+ * Footer menus for Design 1 & Design 2 #623
1883
+ * Strip out src=”about:blank” When Gravity Forms used #804
1884
+ * Add Compatibility with Crazy Lazy load plugin #751
1885
+ * Meta Titles and Description issues fixed with Yoast, All in one SEO and The SEO Framework #813
1886
+ * Double quotes in the Excerpt of the meta description is making AMP Invalidated #818
1887
+ * Missing featured image on static front page #824
1888
+ * Fatal error while activation: see the video 0.9.49 Beta #827
1889
+ * Review this code in archive.php in all 3 designs. #826
1890
+
1891
+
1892
+ = 0.9.48 (28 April 2017) =
1893
+ * View more details on: https://ampforwp.com/0-9-48-released-step-towards-multilingual-support-55th-update/
1894
+ * The default translation method of WordPress added. (Option in Translation panel to switch between * Translation panel and POT file #540)
1895
+ * A new Advertisement slot added above the related posts in the Single. It not only gives better options for people to display ads but this ad slot is also very handy if you are using ad companies like Taboola and RevContent.
1896
+ * Another Advertisement slot added below the post title in the Single post.
1897
+ * Fatal error: require_once report-bugs.php #747 fixed
1898
+ * Add / for codes in Meta Description #766 fixed
1899
+ * Controls re-adjusted & Renamed title of yoast description control in Options panel
1900
+ * Design-3 Slider URL redirecting to non-AMP page #758
1901
+ * Added new sanitizer For HTML to AMP-HTML conversion
1902
+ * Sanitized Archive descriptions so that it would convert to AMP
1903
+ * Comments sanitized with new sanitizer so that HTML tags automatically become AMP compatible.
1904
+ * 301 redirects on non-pretty internal links #767
1905
+ * Create a filter to modify the value of rel="amphtml" #778
1906
+ * Max-width added for images in comments
1907
+ * If in WooCommerce ?amp endpoint set then update href.
1908
+ * Undefined Variable (Debug) #733 and many other debug issues were fixed
1909
+ * Show last updated Post instead of published date #575
1910
+ * WooCommerce Widget added to display latest products on homepage. #763
1911
+ * add amp_post_template_above_footer hook global in all the designs #779
1912
+ * Excerpt on top of the content in Single #665
1913
+ * Subscribe box has been improved for the UX needs #712
1914
+ * Notice warnings since 0.4.2 update #740
1915
+ * AMP Comments Form Integration with the extension
1916
+ * Filter added on the loop in Homepage of the Design 3 so that it can be modified with an external plugin.
1917
+ * 404 on paged home page #781
1918
+ * Twitter handle should be at the end of the tweet not in the beginning #787
1919
+ * Wrong Rel Canonical for AMP Custom Frontpage #799
1920
+ * Merged a pull request #761 that will improve the title and description output that is much more stable and flexible for future enhancement and use. It was contributed by Sybre Waaijer - Thanks mate for the contribution, we (our team and users) really appreciate your hard work done on this code.
1921
+ * Extension page user experienced improved.
1922
+ * Removed old Youtube installation video and replaced with new one.
1923
+
1924
+ = 0.9.47.2 (12 April 2017) =
1925
+ * Design-3 Slider URL redirecting to non-AMP page #758
1926
+ * Ads showing in comments #768
1927
+
1928
+ = 0.9.47.1 (11 April 2017) =
1929
+ * Meta description option improved in SEO section #766
1930
+ * Fatal error: require_once report-bugs.php #747
1931
+
1932
+ = 0.9.47 (10 April 2017) =
1933
+ * View more details at https://ampforwp.com/0-9-47-released-54th-update/
1934
+ * Meta saving method updated for customAMP content editor checkbox was causing some conflict.
1935
+ * Wrong Yoast title and structured data in Custom Frontpage fixed
1936
+ * CSS minification all 3 designs
1937
+ * Polylang flags in menu was causing validation issue, is now resolved
1938
+ * WPML flags in menu was causing validation issue, is now resolved
1939
+ * Standardized function created for content sanitization.
1940
+ * Archive description now displays AMP compatible markup
1941
+ * Comments markup sanitized for AMP
1942
+ * Design 3 images not aligned properly, fixed
1943
+ * Images are aligned to center in Design 1.
1944
+ * carousel ending with //amp instead of /amp – fixed #753
1945
+ * Title of the Post along with Post link when shared in twitter #683
1946
+ * Ads were cutting in half in RTL, fixed
1947
+ * Add / at the end of AMP links with in the AMP pages (Internal links) #668
1948
+ * Rendering the wrong URLs in front page if paged #742
1949
+ * Option to turn off AMP on all pages, so people can turn on only for specific pages #746
1950
+ * Need Meta Description on amp pages #741
1951
+ * Woocommerce Loop shortcode updated
1952
+ * Call Now Button added in header #563
1953
+ * Post images are not centered in Design 3 #695
1954
+ * UX of GTM settings done, since users were getting confused #700
1955
+ * Front page amphtml fixed for paginated pages
1956
+
1957
+ = 0.9.45.6 (31 March 2017) =
1958
+ * Installation Process from welcome page was not working after WP Plugin DIR API change was fixed.
1959
+ * WP Rocket Minifcation and Concatenation was not working, its fixed now.
1960
+ * WP Rocket was tested properly to make sure everything is working fine.
1961
+
1962
+ = 0.9.45.5 (25 March 2017) =
1963
+ * WP rocket conflict solved
1964
+ * Cannot set property ‘innerHTML’ of null issue fixed
1965
+
1966
+ = 0.9.45.3 (21 March 2017) =
1967
+ * Post 0.9.45 bugs fixed and released as an urgent update.
1968
+
1969
+ = 0.9.45.1 (19 March 2017) =
1970
+ * Post 0.9.45 bugs fixed and released as an urgent update.
1971
+
1972
+ = 0.9.45 (18 March 2017) =
1973
+ * View more details at https://ampforwp.com/0-9-45-released-compatibility-rtl-53rd-update/
1974
+ * W3Total cache compatibility added
1975
+ * RTL Support added for Right-to-Left language websites.
1976
+ * Comments Pagination feature added
1977
+ * WP-Rocket Compatibility added
1978
+ * WPML Compatibility added
1979
+ * Quantcast analytics support added
1980
+ * ComScore support added
1981
+ * Custom Yoast title support added #685
1982
+ * WooCommerce Shortcode: Allows you to display WooCommerce Products. [amp-woocommerce num=6] will display the 6 products from WooCommerce. [amp-woocommerce num=6 link=noamp] will display 6 products but they will go to non-amp website, if you want to link to AMP version of the page then use [amp-woocommerce num=6 link=amp]
1983
+ * Admin area UX improvements
1984
+ * Adding notifications script in the correct way
1985
+ * Comments now display on frontpage as well.
1986
+ * Re-positioned non-amp Header link control to the right section.
1987
+ * ?nonamp=1 only displays when the Mobile redirection is on
1988
+ * Properly adding iFrame js.
1989
+ * Custom Post type incompatibility fixed
1990
+ * Widgets added to the Custom Frontpage.
1991
+ * Stripping shortcodes from excerpts.
1992
+ * Custom content on static frontpage had over riding issue #687
1993
+ * Option added for controlling number of comments
1994
+ * Welcome page should be shown only if user is “administrator” #696
1995
+ * Digg Digg social share compatibility #694
1996
+ * Removed unnecessary lines from Design 3
1997
+ * Sanitized Archive Description to amp Compatible #659
1998
+ * Author box now displays HTML properly #645
1999
+ * Date added Design-3 in meta #583
2000
+ * Options link was removed from wp-admin tool bar after a feedback from a user.
2001
+ * Footer sub menus layout compatibility.
2002
+
2003
+
2004
+ = 0.9.44 (5 March 2017) =
2005
+ * View more details at https://ampforwp.com/user-experience-52nd-update/
2006
+ * Added Welcome Screen for better User experience. [Enhancement]
2007
+ * Undefined Index debug error resolved [Bug fix]
2008
+ * All in one SEO Support support tested [3rd party compatibility]
2009
+ * Frontpage title in Design 3 is out of the container #644 [Bug fix]
2010
+ * Default Table markup in AMP #643 [Enhancement]
2011
+ * AMP carousel is not working on Frontpage #641 [Bug fix]
2012
+ * Social share .js was getting added even when it was not required #638 [Bug fix]
2013
+ * Search Feature added for Design 1 & Design 2 [Major Improvement]
2014
+ * Accordion script loading issue in Design 3 #634 [Bug fix]
2015
+ * ?nonamp=1 links should be nofollow #622 [Bug fix]
2016
+ * Same Header and Color Scheme are making header elements invisible #629 [Enhancement]
2017
+ * In Search AMP rel canonical was different #631 [Bug fix]
2018
+ * Non-AMP link in Design 3 was not working when mobile redirection was enabled #632 [Bug fix]
2019
+ * Search form text strings are now added in the translation panel #607 [Bug fix]
2020
+ * Load AMP-ads conditionally only if ads are available #609 [Bug fix]
2021
+ * Added compatibility with Custom post type extension. Option to hide/show AMP on all custom post types #587 [Bug fix]
2022
+ * Report a Bug & Request feature links added [Enhancement]
2023
+ * If there was no menu set in Design 3 then all pages were getting displayed. #613 [Bug fix]
2024
+ * The tag Font is disallowed #616 [Validation Improved]
2025
+ * index/noindex separately added for Tags and also for Categories #606 [Enhancement]
2026
+ * Use of undefined constant AMP_QUERY_VAR #596 [Bug fixed]
2027
+ * Logo is not centered in Design 3 #586 [Bug fixed]
2028
+ * Remove defer, a very rare type of defer was getting added #589 [Validation Improved]
2029
+ * Disqus comments iframe had scrolling issues #566 [Bug fixed]
2030
+ * Left side blank gap in the RTL in design 2 #541 [Bug fixed]
2031
+ * Inline Styles not working correctly in Custom AMP Editor #533 [Bug fixed]
2032
+ * Re-save permalinks issues. Flushing rewrites with options saved. #511 [Improvement]
2033
+ * Code review and cleaning of the customizer #404 [Code Cleaning]
2034
+ * Google Search iframe had some header alignment issues in Design 3. #624 - Thank you Leo Osa @leoosa for the contribution! [Bug fixed]
2035
+ * AMP Frontpage + Override AMP Content = Blank page #604 [Bug fixed]
2036
+ * Widget area added on the homepage with an 'AMP Category Blocks' widget. It means you can display multiple category blocks the homepage. This allows you to display complex layouts, even on AMP. [Major Improvement]
2037
+ * Auto-append /amp at the end of internal links in Menu with an option in the Menu section of the options panel #531 [Major Improvement]
2038
+ Reformatting and Minifying of stylesheet [Code Cleaning]
2039
+ * Created a new section for Homepage and moved some controls from other areas to the home section for the better user experience. [User Experience]
2040
+ * Override Homepage Thumbnail size option added. It will give you more control over your thumbnails. [Major Improvement]
2041
+ * New color picker added to change the color of the header elements in the Design 3 to give you better control over the design. [Enhancement]
2042
+ * Extra amp-carousel script loading is now fixed. [Bug fixed]
2043
+ * Crafting of layout code in design 2 and design 3, especially with social icons area. [Code Cleaning]
2044
+ * Design of search form was not clickable in iOS devices #621 [Bug fixed]
2045
+ * Disqus iframe was loading even when there was no disqus name was added in the option. We found that many users might be enabling it without knowing the output and then they seem to forget, which was causing them validation warnings. [Bug fixed]
2046
+
2047
+ = 0.9.43.6 =
2048
+ * View more details at https://ampforwp.com/stability-sprint-3-51st-update/
2049
+ * Typo in the is_home() function fixed
2050
+ * Option to hide/show AMP on all custom post types #587
2051
+ * False detection by Windows defender tool fixed
2052
+ * Conditional tags were not compatible with Advanced AMP ads which were causing some conflicts but is now fixed.
2053
+
2054
+ = 0.9.43.5 =
2055
+ * View more details at https://ampforwp.com/stability-sprint-2-50th-update/
2056
+ * Fixed shortcodes issue in related posts #543
2057
+ * Iframe Scripts Added properly
2058
+ * Proper conditions added for the social section of Design 3
2059
+ * Featured Image issue stretched in Design 2 & 3
2060
+ * Removed extra global $redux_builder_amp;
2061
+ * Custom Logo Dimensions option added #479
2062
+ * Index & NoIndex options added for SEO section. #558
2063
+ * Added URL for rewrite flushing rules in Options
2064
+ * Option to enable and disable the Author area in Design 3#577
2065
+ * Rel Nofollow added in credit link
2066
+ * debug issue solved: fn_offset not defined
2067
+ * debug issue solved: global $post not declared
2068
+ * The word 'ago' is now translatable in design 3
2069
+ * The word 'read next' is translatable now
2070
+ * Tablepress compatibility added #392
2071
+ * Secure API server is now serving through Google Cloud Manager.
2072
+ * Thrive Content builder was displaying twice when the Custom AMP content was on. It was a complex issue which has been solved now.
2073
+ * amp-ad extension.js script was loading if the Ads are not enabled. #598
2074
+ * Social Share Extension Included on Homepage even if we didn't have social icons #599
2075
+ * Installation UX improvement #593
2076
+ * Removed duplicate global variable
2077
+ * Proper OG tags added #588
2078
+ * Proper instructions added for Custom AMP content #471
2079
+
2080
+
2081
+ = 0.9.43.1 =
2082
+ * View more details at https://ampforwp.com/0-9-43-1-released-stability-sprint-1-49th-update/
2083
+ * Emoji in comments leads to AMP errors
2084
+ * Design 1 showing time on archives
2085
+ * Added some space between the archive label.
2086
+ * Lazy loading plugins compatibility #544
2087
+ * Custom header and footer areas
2088
+ * Sticky posts now come on top #564
2089
+ * Footer non-amplink added in design 3 #562
2090
+ * HTML Paragraph tag is shown in the title in category! #518
2091
+
2092
+ = 0.9.42 =
2093
+ * View more details at https://ampforwp.com/design-three-update/
2094
+ * Design 3 was released Video Overview along with new options and features. View the video overview at: https://www.youtube.com/watch?v=ub1pwskt3Rc [Major Feature]
2095
+ * Ticket #517 Added Upload field into Redux core [3rd party Compatiblity]
2096
+ * Ticket#529 Controls for archive titles added [Improvement]
2097
+ * Ticket #548 Jetpack photon code removed
2098
+
2099
+ = 0.9.41 =
2100
+ * View more details at https://ampforwp.com/disqus-comments-in-amp/
2101
+ * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
2102
+ * AMP WooCommerce supported tag was missing after the last update. [Bug fix]
2103
+ * Homepage & Related Posts was displaying private and protected posts, which is now fixed [Bug fix]
2104
+ * Next previous links added in Design 1 [Enhancement]
2105
+ * Invalid Post Time displaying in the homepage of Design 1 [Bug fix]
2106
+ * Twitter share now includes the twitter handle of the author with setting in options [Enhancement]
2107
+ * Emoji in comments leads to AMP errors was fixed [Bug fix]
2108
+ * Date are now displayed on archives in Design 1 [Enhancement]
2109
+ * When RTL enabled logo merges with nav bar was fixed [Bug fix]
2110
+ * Jetpack Photon compatibility added [3rd Party Compatibility]
2111
+
2112
+ = 0.9.40 =
2113
+ * View more details at https://ampforwp.com/0-9-40-released-biggest-stability-update/
2114
+ * Proper endpoints added [Improvement]
2115
+ * Flush Rewrites properly [Improvement]
2116
+ * REL Canonical properly getting added. [Improvement]
2117
+ * Proper Frontpage Canonical added [Improvement]
2118
+ * Added Base name support for categories and tags [Improvement]
2119
+ * Redirection of excluded post solved. [Bug fix]
2120
+ * Archives properly redirecting to the right URL [Bug fix]
2121
+ * Homepage redirection solved [Bug fix]
2122
+ * Plusone tag is stripped properly. [Validation Issue fixed]
2123
+ * Archives are now clickable. [Improvements]
2124
+ * WP_Query filter added for better customizability of Homepage loop. [Better Customizations]
2125
+ * Social share boost plugin compatibility. [3rd party Customizations]
2126
+ * Removed H1 from the frontpage even if it is not available. [Improvement]
2127
+ * H3 instead of H1 for Site title. So there is only one H1 per page. [SEO Improvement]
2128
+
2129
+ = 0.9.38 =
2130
+ * View full details at https://ampforwp.com/google-tag-manager-for-amp/
2131
+ * Google Tag manager included [New feature]
2132
+ * Iframe max-width added [Improvement]
2133
+ * Paginated pages have different titles now. [Bug fix]
2134
+
2135
+ = 0.9.37 =
2136
+ * View full details at https://ampforwp.com/category-tags-archive-support-added/
2137
+ * Debug issues solved [Bug fix]
2138
+ * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
2139
+ * Category, Tags & Archive Support with titles added [Enchancement]
2140
+ * Archive Title support added [Enchancement]
2141
+ * There were some issues with attachments [Bug fix]
2142
+ * removed ? from amp url's [Improvement]
2143
+ * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
2144
+ * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
2145
+ * Added an option to turn off AMP support for Homepage. [Enchancement]
2146
+ * Too many redirects issue on homepage is fixed #435 [Improvement]
2147
+ * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
2148
+ * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
2149
+ * Comment anchor link changed for simplecomment button files in both designs [Improvement]
2150
+ * Redirection Loop issue fixed [Bug fix]
2151
+ * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
2152
+ * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
2153
+ * Improved Sessions [Improvement]
2154
+ * Advnaced Settings panel was created for better user experience. [Improvement]
2155
+ * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
2156
+ * RTL issue fixed #454 [Bug fixed]
2157
+
2158
+ = 0.9.36 =
2159
+ * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
2160
+ * Redux Core Update. Better compatibility with the Salient theme and Themeforest themes & plugins using redux framework in their core, which makes the plugin much stable. [Huge Improvements]
2161
+ * Hide advertisement section if advance ads plugin is active. [Better User experience]
2162
+ * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
2163
+ * Launch Post Builder button added. One of the important feature called ‘Post Builder’, that is drag and drop post builder was somewhere hidden in the customizer, so positioned it for better visibility from users. [Better UX]
2164
+
2165
+ = 0.9.35 =
2166
+ * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
2167
+ * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
2168
+ * Attachment page was having the wrong endpoint. [Bug fix]
2169
+ * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
2170
+ * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
2171
+ * Lang attributes were added [Enhancement]
2172
+ * The tag like was disallowed in the AMP [Validation Improvement]
2173
+ * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
2174
+ * AMP on Pages option was not working in some cases. [Bug fix]
2175
+ * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
2176
+ * g:plusone tag was not getting removed properly. [Validation Improvement]
2177
+ * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
2178
+ * Structured Data Image width issue solved [Enhancement]
2179
+ * BJ Lazy Load was having issues, we have added a fix which will make this plugin compatible with the AMP. [3rd party Compatibility & Validation Improvement]
2180
+ * imageanchor=”1″ was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
2181
+
2182
+ = 0.9.34 =
2183
+ * Newspaper theme by Tagdiv was having issues, we have fixed this one.
2184
+
2185
+ = 0.9.33 [15th Jan 2017] =
2186
+ * Full details at https://ampforwp.com/debug-errors-shortcodes/
2187
+ * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
2188
+ * Debug errors fixed, Code is now much cleaner.
2189
+ * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
2190
+ * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
2191
+ * Properly removes AMP if turned off from Post panel
2192
+ * z-index position improved on Sticky Social bar
2193
+ * Better compatibility with shortcodes.
2194
+ * Divi Standard Layouts Compatibility
2195
+ * Properly Hide AMP posts if excluded. #367
2196
+ * Mobile redirection was causing loop issues which are now fixed.
2197
+ * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
2198
+ * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
2199
+ * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
2200
+ * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
2201
+
2202
+ = 0.9.32 [7th Jan 2017] =
2203
+ * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
2204
+ * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
2205
+ * Paginated pages on homepage redirect to homepage URL #335
2206
+ * Title of the page should be displayed on the FrontPage #358
2207
+ * Thrive Builder AMP Validation Compatibility, so it will be validated properly in AMP.
2208
+ * Twitter Sharing improved so it gets the data properly #341
2209
+ * Option to change the number of Related Posts #290
2210
+ * Validation errors due to rel="canonical" was missing on some pages
2211
+ * Comment button displays even if the comments are not available
2212
+ * Threaded comments were duplicating, so that issue is solved and added proper CSS for it.
2213
+ * Minor issue with Jetpack Comments fixed.
2214
+ * Missing amp-social-share.js on front page fixed #372
2215
+ * Minor improvements to Title and description tags.
2216
+ * Analytics Script was loading twice when Glue was active.
2217
+ * Page specific class added for better customization compatibility #377
2218
+ * Inline Style support added Fixed #356
2219
+ * Bugs fixed in Email notification pointer
2220
+
2221
+ = 0.9.31 [2nd Jan 2017] =
2222
+ * Proper Details at https://ampforwp.com/amp-0-9-31-released-installation-user-experience/
2223
+ * Proper Condition added for the scripts to load in Frontpage.php
2224
+ * Rel canonical properly added for front pages
2225
+ * 404 and Archive page Mobile redirection code refined
2226
+ * User Experience Improvement: Installation process was improved
2227
+
2228
+ = 0.9.3 [31th December 2016] =
2229
+ * Proper Details at https://ampforwp.com/custom-amp-content-editor/
2230
+ * Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
2231
+ * FrontPage had some validation issues. [Bug fix]
2232
+ * Related posts in Design 1 we're redirecting to 404 fixed [Bug fix]
2233
+
2234
+ = 0.9.2.2 [27th December 2016] =
2235
+ * Proper Details at https://ampforwp.com/polishing-user-experience-improvements/
2236
+ * Made the Options panel user-friendly
2237
+ * Social Share on frontpage issue fixed.
2238
+ * Readme.txt made user-friendly.
2239
+ * Archive option removed and some UI improvements
2240
+ * Single was not displaying the Title
2241
+ * 'Type is not allowed' [Validation issue fixed]
2242
+ * noshade tag Validation issue fixed
2243
+
2244
+ = 0.9.2.1 [24th December 2016] =
2245
+ * Proper Details at https://ampforwp.com/step-towards-fixing-amp-validation-errors/
2246
+ * Disabled the Tags and Categories support for AMP for better validation until we find a better solution.
2247
+ * Mobile redirection bug fixed, It was continuously redirecting to the same page [Bug fix]
2248
+ * trailingslashit added to make sure we have proper url for Mobile redirection [Bug fix]
2249
+ * In content AD overlapping the content issue fixed
2250
+
2251
+ = 0.9.2 [23th December 2016] =
2252
+ * Proper Details at https://ampforwp.com/mobile-redirection/
2253
+ * AMP Mobile Redirection Feature added. It can be turned on from Dashboard > General and then Mobile Redirection. [New Feature]
2254
+ * Archive title and description added [Improvement]
2255
+ * Improved the Speed of the AMP version #321 [Improvement]
2256
+ * Anchor link was not closing fixed #328 [Bug Fix]
2257
+ * Typo in Trailingslashit function which resulted in some issues in the Homepage version [Bug Fix]
2258
+
2259
+ = 0.9.1.2 [20th December 2016] =
2260
+ * Proper Details at https://ampforwp.com/new/
2261
+ * DoubleClick Support
2262
+ * Custom Post Type Support
2263
+ * Ratings Support
2264
+ * Comments Gaping fix
2265
+ * Custom Excerpt code
2266
+ * Better Compatibility with Yoast SEO plugin
2267
+ * AMP Validation error in Design 1 Fixed
2268
+ * Proper Homepage title & Description with Yoast SEO plugin issue fixed
2269
+ * Design -1 Excerpt too big for mobile devices, Fixed
2270
+ * Advertisement support on Design 1
2271
+ * Link to Tags & Categories were having some issues.
2272
+ * AMP looking bad on big devices
2273
+ * AMP validation Improvement: Lightbox plugins compatibility
2274
+ * Huge Progress in AMP Validation Errors: Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
2275
+ * Page Performance: Removed default Google font loading
2276
+ * Page Performance: DNS Prefetch tag added for faster DNS Handshake
2277
+
2278
+ = 0.9.1 [16th December 2016] =
2279
+ * Proper Details at https://ampforwp.com/new/
2280
+ * PHP7 Compatibility
2281
+ * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
2282
+ * Custom CSS not working in Design one (#249)
2283
+ * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
2284
+ * How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
2285
+ * Non-amp Homepage support added (#267)
2286
+ * using get_avatar() (#259)
2287
+ * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
2288
+ * Validation Issue fixed: Script Tag removed from the content.
2289
+ * Featured image in Design 1 in single #261
2290
+ * After Fresh installation - a save is required Fixed
2291
+ * Excerpt length controlled
2292
+ * Design One has thumbnails on the Homepage
2293
+ * Non-AMP link goes to the wrong page, issue fixed.
2294
+ * Archive pages were broken, fixed.
2295
+ * Option to Enable & Disable the Next/Previous links in Single
2296
+ * WhatsApp sharing not working, issue fixed.
2297
+ * Category Taxonomy has extra ':' in the word.
2298
+ * The word 'Ago' is now translatable.
2299
+ * Yoast SEO with AMP compatibility issue fixed.
2300
+ * Several Minor Polishing in the code
2301
+ * Footer Ad gets covered by Sticky Social Icons (#269)
2302
+ * Smaller image size when “image caption” is used in Design-2 (#263)
2303
+ * Footer ad with Sticky Social bar issue fix
2304
+ * Checked with WordPress 4.7
2305
+ * Ad #1 was messing up with the title, issue fixed.
2306
+ * Compatibility improved with AMP WooCommerce.
2307
+
2308
+ = 0.9 =
2309
+ * Proper Details at https://ampforwp.com/amp-pagebuilder/
2310
+ * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
2311
+ * 100% Yoast Compatible , Now no need to have additionally Glue Installed
2312
+ * 100% completed Translation panel, Now absolutely anything on page is translated
2313
+ * Added Option to turn on/off Page Support
2314
+ * Styling for Tags was Corrected
2315
+ * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
2316
+ * Default Image alignment styling added
2317
+ * Added Option to turn on/off Page Support
2318
+ * Related Posts Now use Custom Excerpt if it Exists
2319
+ * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
2320
+ * <pre> Tag styling issue fixed for AMP pages
2321
+ * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
2322
+ * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
2323
+ * 2 New Designs added
2324
+ * SEO Panel Added
2325
+
2326
+ = 0.8.8 =
2327
+ * Proper Details at https://ampforwp.com/amp-0-8-8-released-translation-panel/
2328
+ * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
2329
+ * Badge Tag was throwing Validation error
2330
+ * Plusone tag validation error was fixed
2331
+ * Time tag was validation error was fixed
2332
+ * User experience for Mobile devices was improved
2333
+ * Meta info was messing up in smaller devices, it was fixed as well.
2334
+ * Internal AMP linking added for Categories and Tags
2335
+ * Future errors for AMP ads was fixed
2336
+ * Blockquote styling added
2337
+ * “Please Activate parent Plugin settings” added for better User Experience.
2338
+ * Related Post Ux improvement
2339
+ * Plugin version added in Footer source code for better debugging
2340
+ * Added Support for Default WordPress Image alignment
2341
+ * New action hooks added in index page
2342
+ * Featured Image Size options added
2343
+
2344
+ = 0.8.7 =
2345
+ * Proper Details at https://ampforwp.com/amp-0-8-7/
2346
+ * added option to enable/disable AMP on Archive pages (Ticket #188)
2347
+ * Solved 404 on Related Posts (Ticket #178 )
2348
+ * Related posts by either categories or Tags(Ticket #179)
2349
+ * added a link to menu Section from the AMP Options page(Ticket #190)
2350
+ * Added Support for Piwik Analytics(Ticket #163)
2351
+ * Added Support for Segment.com Analytics(Ticket #50)
2352
+ * Added a switch for hiding Non-Amp page link from Footer.( Ticket #189)
2353
+ * Added an Option that strips Users URL from Comments Section(Ticket #180)
2354
+ * Fixed stripping <date> tags from the content , Since it was preventing validation – amp-img issues fixed
2355
+ * UX Improved for every section of AMP Options page
2356
+ * Added Settings button on plugin page
2357
+ * Related posts switch added
2358
+ * Removed carousel.js
2359
+
2360
+
2361
+ = 0.8.6.1 =
2362
+ * Date Tag fix
2363
+ * Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
2364
+
2365
+ = 0.8.6 =
2366
+ * Proper Details at https://ampforwp.com/amp-0-8-6-released-related-posts-comments/
2367
+ * Related Posts
2368
+ * Post Comments
2369
+ * WhatsApp sharing button – Your visitors can now easily share the content over the whatsapp.
2370
+ * Validation issue fixed by All In One Schema.org Rich Snippets plugin
2371
+ * Removed Google Fonts loading for Performance
2372
+ * New relic Support
2373
+ * Class added to ‘View Non-AMP Version’ text
2374
+ * Archives Structured Data issue fixed
2375
+ * Some instances img tags converted into amp-img automatically.
2376
+
2377
+
2378
+ = 0.8.5.3 =
2379
+ * Canonical issue fixed for Post
2380
+
2381
+ = 0.8.5.2 =
2382
+ * Canonical issue fixed for FrontPage
2383
+
2384
+ = 0.8.5.1 =
2385
+ * Proper Details at https://ampforwp.com/new/
2386
+ * Validation issue fixed: 'Value' tag
2387
+ * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
2388
+ * Validation issue fixed: Table markup
2389
+ * Validation issue fixed: nowrap and misc tags
2390
+ * New Relic Support
2391
+ * Tags on off option
2392
+ * Canonical and correct AMP html Redirect issues Solved
2393
+ * NextGEN Gallery Validation Support Added
2394
+
2395
+ = 0.8.5 =
2396
+ * Proper Details at https://ampforwp.com/the-0-4-compatibility/
2397
+ * AMP 0.4 Compatibility Check
2398
+ * Even better Structured Data Validation, Once in for all!
2399
+ * Structured Data Options to eliminate Validation errors
2400
+ * AMP Page Exclude option
2401
+
2402
+ = 0.8.4 =
2403
+ * Proper Details at https://ampforwp.com/blog/structured-data-validation/
2404
+ * Structured Data Validation
2405
+ * Navigation Text Change
2406
+ * Inline Style Validation
2407
+ * Form Validation
2408
+ * Frontpage shows the amphtml rel twice fixed
2409
+ * Facebook Sharing not working
2410
+
2411
+ = 0.8.3 =
2412
+ * Prefix added in the Content filter
2413
+ * Extra space after quote in Ads
2414
+
2415
+ = 0.8.2 =
2416
+ * Proper Details at https://ampforwp.com/blog/the-custom-frontpage/
2417
+ * Custom AMP FrontPage
2418
+ * Featured Image
2419
+ * New Mobile Friendly Advertisement sizes
2420
+ * Single Post Pagination Option
2421
+ * RTL Support
2422
+ * Notifications
2423
+ * Gaping if the Meta was turned off.
2424
+ * Analytics was not fetching the user id properly.
2425
+ * Page was not using the post template along with the AD support.
2426
+ * AMP Endpoint support for Paged when the front page is active.
2427
+ * UI improvement of Admin panel
2428
+ * Few Validation issues fixed
2429
+
2430
+ = 0.8.1 =
2431
+ * Warning: Cannot modify header information error fixed
2432
+ * Validation issue fixed. KK Star Plugin compatible.
2433
+ * Gaping in the smaller screens fixed
2434
+
2435
+ = 0.8 =
2436
+ * Proper Details at https://ampforwp.com/blog/the-change/
2437
+ * Plugin was re-written from scratch and is now built on top of default AMP plugin by Automattic but giving you the same features of the original plugin.
2438
+ * 99.5% Validation issues were fixed.
2439
+ * Page builder & Shortcodes Compatibility Support Added
2440
+ * Conflict with JSON API
2441
+ * Carousel support for Gallery
2442
+ * Better Image stretching and resizing
2443
+ * Youtube Video Embed Support
2444
+ * Vine Embed Support
2445
+ * Twitter oembed Support
2446
+ * Instagram Embed Support
2447
+ * Facebook Video Embed Support
2448
+ * Better Future Compatibility
2449
+
2450
+ = 0.7.7 =
2451
+ * Proper Details at https://ampforwp.com/blog/amp-0-7-7/
2452
+ * Big Validation Error fix Update
2453
+ * Disable AMP support on specific Pages and Posts
2454
+ * Option to disable the Post meta from the Single
2455
+ * Footer Credits and Copyright Text Option
2456
+ * New options for Social Sharing Bar in Single
2457
+ * Jetpack Social & Related Sharing Issue fixed
2458
+ * Gaping in footer if the Sticky bar is enabled
2459
+ * Text domain added on few strings
2460
+
2461
+ = 0.7.6 =
2462
+ * Google Adsense Support Added with AMP-Ad
2463
+ * Wrong Homepage rel amphtml bug fixed
2464
+
2465
+ = 0.7.5 =
2466
+ * Google Analytics Support Added
2467
+ * Logo Support Added. If the logo is disabled, then the Title should be activated.
2468
+ * Color Scheme Feature Added
2469
+ * User friendly Options Panel Added
2470
+ * iFrame support Added
2471
+ * Few Minor Bugs Fixed
2472
+
2473
+ = 0.7.1 =
2474
+ * Bug #24 (Github) fixed
2475
+ * Strip Style tags for faster & better validation
2476
+ * Bug #21 (Github) fixed
2477
+
2478
+ = 0.7 =
2479
+ * Canonical Improved
2480
+ * Navigation Validation bug fixed
2481
+ * Two more validation bugs fixed ('role' and 'tabindex' attribute)
2482
+ * Featured image automatically hides if it is not present
2483
+ * Validation issues in the images of the post's the_content
2484
+
2485
+ = 0.6 =
2486
+ * Improved Navigation Menu
2487
+ * Search Console errors fixed
2488
+ * Social Sharing option
2489
+ * Pages support
2490
+ * Force redirection for mobile users removed and many other bug fixes
2491
+
2492
+ = 0.5 =
2493
+ * Added AMP Markup for Google Structured data. This will fix the issues in Webmaster tools.
2494
+
2495
+ = 0.4 =
2496
+ * Support of Custom menu added for AMP enabled sites
2497
+
2498
+ = 0.3 =
2499
+ * Support of amp-img added in single posts
2500
+ * minor css bug fixed
2501
+
2502
+ = 0.2.5 =
2503
+ * Minor bugs fixed
2504
+ * ?mobile & ?nomobile is now ?amp & ?noamp
2505
+
2506
+ = 0.2 =
2507
+ * White Screen of death issue fixed
2508
+ * Plugin URI updated
2509
+
2510
+ = 0.1 =
2511
+ * Initial version
accelerated-moblie-pages.php CHANGED
@@ -1,1045 +1,1057 @@
1
- <?php
2
- /*
3
- Plugin Name: Accelerated Mobile Pages
4
- Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
- Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 0.9.97.54
7
- Author: Ahmed Kaludi, Mohammed Kaludi
8
- Author URI: https://ampforwp.com/
9
- Donate link: https://www.paypal.me/Kaludi/25
10
- License: GPL2+
11
- Text Domain: accelerated-mobile-pages
12
- Domain Path: /languages/
13
- */
14
-
15
- // Exit if accessed directly.
16
- if ( ! defined( 'ABSPATH' ) ) exit;
17
-
18
- define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
19
- define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
- define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
- define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
- define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','0.9.97.54');
24
- define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
- // any changes to AMP_QUERY_VAR should be refelected here
26
- function ampforwp_generate_endpoint(){
27
- $ampforwp_slug = '';
28
- $get_permalink_structure = '';
29
-
30
- $ampforwp_slug = "amp";
31
-
32
- return $ampforwp_slug;
33
- }
34
-
35
- define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', ampforwp_generate_endpoint() ) );
36
-
37
- // Rewrite the Endpoints after the plugin is activate, as priority is set to 11
38
- function ampforwp_add_custom_post_support() {
39
- global $redux_builder_amp;
40
- add_rewrite_endpoint( AMPFORWP_AMP_QUERY_VAR, EP_PAGES | EP_PERMALINK | EP_AUTHORS | EP_ALL_ARCHIVES | EP_ROOT );
41
- // Pages
42
- if ( isset($redux_builder_amp['amp-on-off-for-all-pages']) && $redux_builder_amp['amp-on-off-for-all-pages'] ) {
43
- add_post_type_support( 'page', AMPFORWP_AMP_QUERY_VAR );
44
- }
45
- // Custom Post Types
46
- if ( isset($redux_builder_amp['ampforwp-custom-type'] ) && $redux_builder_amp['ampforwp-custom-type'] ) {
47
- foreach ( $redux_builder_amp['ampforwp-custom-type'] as $custom_post ) {
48
- add_post_type_support( $custom_post, AMP_QUERY_VAR );
49
- }
50
- }
51
- }
52
- add_action( 'init', 'ampforwp_add_custom_post_support',11);
53
-
54
- // Frontpage and Blog page check from reading settings.
55
- function ampforwp_name_blog_page() {
56
- if ( ! $page_for_posts = get_option('page_for_posts')) return;
57
- $page_for_posts = get_option( 'page_for_posts' );
58
- $post = get_post($page_for_posts);
59
- if ( $post ) {
60
- $slug = $post->post_name;
61
- return $slug;
62
- }
63
- }
64
- function ampforwp_custom_post_page() {
65
- $front_page_type = get_option( 'show_on_front' );
66
- if ( $front_page_type ) {
67
- return $front_page_type;
68
- }
69
- }
70
-
71
- function ampforwp_get_the_page_id_blog_page(){
72
- $page = "";
73
- $output = "";
74
- if ( ampforwp_name_blog_page() ) {
75
- $page = get_page_by_path( ampforwp_name_blog_page() );
76
- if( $page )
77
- $output = $page->ID;
78
- }
79
-
80
- return $output;
81
- }
82
-
83
- // Add Custom Rewrite Rule to make sure pagination & redirection is working correctly
84
- function ampforwp_add_custom_rewrite_rules() {
85
- global $redux_builder_amp, $wp_rewrite;
86
- // For Homepage
87
- add_rewrite_rule(
88
- 'amp/?$',
89
- 'index.php?amp',
90
- 'top'
91
- );
92
- // For Homepage with Pagination
93
- add_rewrite_rule(
94
- 'amp/'.$wp_rewrite->pagination_base.'/([0-9]{1,})/?$',
95
- 'index.php?amp=1&paged=$matches[1]',
96
- 'top'
97
- );
98
-
99
- // For /Blog page with Pagination
100
- if( ampforwp_name_blog_page() ) {
101
- add_rewrite_rule(
102
- ampforwp_name_blog_page(). '/amp/'.$wp_rewrite->pagination_base.'/([0-9]{1,})/?$',
103
- 'index.php?amp=1&paged=$matches[1]&page_id=' .ampforwp_get_the_page_id_blog_page(),
104
- 'top'
105
- );
106
- // Pagination to work with Extensions like.hml
107
- add_rewrite_rule(
108
- ampforwp_name_blog_page(). '(.+?)/amp/'.$wp_rewrite->pagination_base.'/([0-9]{1,})/?$',
109
- 'index.php?amp=1&paged=$matches[2]&page_id=' .ampforwp_get_the_page_id_blog_page(),
110
- 'top'
111
- );
112
- }
113
-
114
- // For Author pages
115
- add_rewrite_rule(
116
- 'author\/([^/]+)\/amp\/?$',
117
- 'index.php?amp=1&author_name=$matches[1]',
118
- 'top'
119
- );
120
- add_rewrite_rule(
121
- 'author\/([^/]+)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
122
- 'index.php?amp=1&author_name=$matches[1]&paged=$matches[2]',
123
- 'top'
124
- );
125
-
126
- // For category pages
127
- $rewrite_category = get_option('category_base');
128
- if ( ! empty($rewrite_category) ) {
129
- $rewrite_category = get_option('category_base');
130
- } else {
131
- $rewrite_category = 'category';
132
- }
133
-
134
- add_rewrite_rule(
135
- $rewrite_category.'\/(.+?)\/amp/?$',
136
- 'index.php?amp=1&category_name=$matches[1]',
137
- 'top'
138
- );
139
- // For category pages with Pagination
140
- add_rewrite_rule(
141
- $rewrite_category.'/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
142
- 'index.php?amp=1&category_name=$matches[1]&paged=$matches[2]',
143
- 'top'
144
- );
145
-
146
- // For category pages with Pagination (Custom Permalink Structure)
147
- $permalink_structure = get_option('permalink_structure');
148
- $permalink_structure = preg_replace('/(%.*%)/', '', $permalink_structure);
149
- $permalink_structure = preg_replace('/\//', '', $permalink_structure);
150
- if ( $permalink_structure ) {
151
- add_rewrite_rule(
152
- $permalink_structure.'\/'.$rewrite_category.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
153
- 'index.php?amp=1&category_name=$matches[1]&paged=$matches[2]',
154
- 'top'
155
- );
156
- }
157
-
158
- // For tag pages
159
- $rewrite_tag = get_option('tag_base');
160
- if ( ! empty($rewrite_tag) ) {
161
- $rewrite_tag = get_option('tag_base');
162
- } else {
163
- $rewrite_tag = 'tag';
164
- }
165
- add_rewrite_rule(
166
- $rewrite_tag.'\/(.+?)\/amp/?$',
167
- 'index.php?amp=1&tag=$matches[1]',
168
- 'top'
169
- );
170
- // For tag pages with Pagination
171
- add_rewrite_rule(
172
- $rewrite_tag.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
173
- 'index.php?amp=1&tag=$matches[1]&paged=$matches[2]',
174
- 'top'
175
- );
176
- // For tag pages with Pagination (Custom Permalink Structure)
177
- if ( $permalink_structure ) {
178
- add_rewrite_rule(
179
- $permalink_structure.'\/'.$rewrite_tag.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
180
- 'index.php?amp=1&tag=$matches[1]&paged=$matches[2]',
181
- 'top'
182
- );
183
- }
184
- // Rewrite rule for date archive with pagination #2289
185
- add_rewrite_rule(
186
- '([0-9]{4})/([0-9]{1,2})/amp/'.$wp_rewrite->pagination_base.'/?([0-9]{1,})/?$',
187
- 'index.php?year=$matches[1]&monthnum=$matches[2]&amp=1&paged=$matches[3]',
188
- 'top'
189
- );
190
- //Rewrite rule for custom Taxonomies
191
- $args = array(
192
- 'public' => true,
193
- '_builtin' => false,
194
- );
195
- $output = 'names'; // or objects
196
- $operator = 'and'; // 'and' or 'or'
197
- $taxonomies = get_taxonomies( $args, $output, $operator );
198
-
199
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
200
- if(!is_plugin_active('amp-woocommerce-pro/amp-woocommerce.php' )) {
201
- if( class_exists( 'WooCommerce' ) ) {
202
- $wc_permalinks = get_option( 'woocommerce_permalinks' );
203
-
204
- if ( $wc_permalinks ) {
205
- $taxonomies = array_merge($taxonomies, $wc_permalinks);
206
- }
207
- }
208
- }
209
- $post_types = ampforwp_get_all_post_types();
210
- if ( $post_types ) {
211
- foreach ($post_types as $post_type ) {
212
- if ( 'post' != $post_type && 'page' != $post_type ){
213
- add_rewrite_rule(
214
- $post_type.'\/amp/?$',
215
- 'index.php?amp&post_type='.$post_type,
216
- 'top'
217
- );
218
- add_rewrite_rule(
219
- $post_type.'\/amp/'.$wp_rewrite->pagination_base.'/([0-9]{1,})/?$',
220
- 'index.php?amp=1&post_type='.$post_type.'&paged=$matches[1]',
221
- 'top'
222
- );
223
- }
224
- }
225
- }
226
- $taxonomies = apply_filters( 'ampforwp_modify_rewrite_tax', $taxonomies );
227
- if ( $taxonomies ) {
228
- foreach ( $taxonomies as $key => $taxonomy ) {
229
- if ( ! empty( $taxonomy ) ) {
230
- add_rewrite_rule(
231
- $taxonomy.'\/(.+?)\/amp/?$',
232
- 'index.php?amp&'.$key.'=$matches[1]',
233
- 'top'
234
- );
235
- // For Custom Taxonomies with pages
236
- add_rewrite_rule(
237
- $taxonomy.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
238
- 'index.php?amp&'.$taxonomy.'=$matches[1]&paged=$matches[2]',
239
- 'top'
240
- );
241
- }
242
- }
243
- }
244
- }
245
- add_action( 'init', 'ampforwp_add_custom_rewrite_rules', 25 );
246
- // add re-write rule for Products
247
- add_action( 'init', 'ampforwp_custom_rewrite_rules_for_product_category' );
248
- if ( ! function_exists('ampforwp_custom_rewrite_rules_for_product_category') ) {
249
- function ampforwp_custom_rewrite_rules_for_product_category(){
250
- if ( class_exists('WooCommerce') ) {
251
- $permalinks = wp_parse_args( (array) get_option( 'woocommerce_permalinks', array() ), array(
252
- 'product_base' => '',
253
- 'category_base' => '',
254
- 'tag_base' => '',
255
- 'attribute_base' => '',
256
- 'use_verbose_page_rules' => false,
257
- ) );
258
- // Ensure rewrite slugs are set.
259
- $permalinks['product_rewrite_slug'] = untrailingslashit( empty( $permalinks['product_base'] ) ? _x( 'product', 'slug', 'accelerated-mobile-pages' ) : $permalinks['product_base'] );
260
- $permalinks['category_rewrite_slug'] = untrailingslashit( empty( $permalinks['category_base'] ) ? _x( 'product-category', 'slug', 'accelerated-mobile-pages' ) : $permalinks['category_base'] );
261
- $permalinks['tag_rewrite_slug'] = untrailingslashit( empty( $permalinks['tag_base'] ) ? _x( 'product-tag', 'slug', 'accelerated-mobile-pages' ) : $permalinks['tag_base'] );
262
- $permalinks['attribute_rewrite_slug'] = untrailingslashit( empty( $permalinks['attribute_base'] ) ? '' : $permalinks['attribute_base'] );
263
-
264
-
265
-
266
- add_rewrite_rule(
267
- $permalinks['product_rewrite_slug']."\/amp\/page\/([0-9]{1,})/?$",
268
- 'index.php?post_type=product&paged=$matches[1]&amp=1',
269
- 'top'
270
- );
271
- add_rewrite_rule(
272
- $permalinks['category_rewrite_slug'].'\/(.+?)\/amp\/page\/?([0-9]{1,})/?$',
273
- 'index.php?product_cat=$matches[1]&paged=$matches[2]&amp=1',
274
- 'top'
275
- );
276
- add_rewrite_rule(
277
- $permalinks['category_rewrite_slug'].'\/(.+?)\/amp\/?$',
278
- 'index.php?amp&product_cat=$matches[1]',
279
- 'top'
280
- );
281
-
282
-
283
- add_rewrite_rule(
284
- $permalinks['tag_rewrite_slug'].'\/(.+?)\/amp\/page\/?([0-9]{1,})/?$',
285
- 'index.php?product_tag=$matches[1]&paged=$matches[2]&amp=1',
286
- 'top'
287
- );
288
- add_rewrite_rule(
289
- $permalinks['tag_rewrite_slug'].'\/(.+?)\/amp\/?$',
290
- 'index.php?amp&product_tag=$matches[1]',
291
- 'top'
292
- );
293
- }
294
- }
295
- }
296
-
297
- function ampforwp_plugin_info(){
298
- $data = array();
299
- $date = new DateTime();
300
- $data = array('activation_data' => $date->getTimestamp() );
301
- add_option( 'ampforwp_plugin_info', $data );
302
- }
303
- add_action('upgrader_process_complete','ampforwp_plugin_info' );
304
-
305
- register_activation_hook( __FILE__, 'ampforwp_rewrite_activation', 20 );
306
- function ampforwp_rewrite_activation() {
307
-
308
- if ( ! did_action( 'ampforwp_init' ) ) {
309
- ampforwp_init();
310
- }
311
-
312
- flush_rewrite_rules();
313
-
314
- ampforwp_add_custom_post_support();
315
- ampforwp_add_custom_rewrite_rules();
316
- ampforwp_plugin_info();
317
-
318
- // Flushing rewrite urls ONLY on activation
319
- global $wp_rewrite;
320
- $wp_rewrite->flush_rules();
321
-
322
- delete_option('ampforwp_rewrite_flush_option');
323
-
324
- // Set transient for Welcome page
325
- set_transient( 'ampforwp_welcome_screen_activation_redirect', true, 30 );
326
-
327
- }
328
-
329
- add_action( 'admin_init', 'ampforwp_flush_after_update');
330
- function ampforwp_flush_after_update() {
331
- // Flushing rewrite urls ONLY on after Update is installed
332
- $older_version = "";
333
- $older_version = get_transient('ampforwp_current_version_check');
334
- if ( empty($older_version) || ( $older_version < AMPFORWP_VERSION ) ) {
335
- flush_rewrite_rules();
336
- global $wp_rewrite;
337
- $wp_rewrite->flush_rules();
338
- set_transient('ampforwp_current_version_check', AMPFORWP_VERSION);
339
- }
340
- }
341
-
342
-
343
- add_action('init', 'ampforwp_flush_rewrite_by_option', 20);
344
-
345
- function ampforwp_flush_rewrite_by_option(){
346
-
347
- global $wp_rewrite;
348
- $get_current_permalink_settings = "";
349
-
350
- $get_current_permalink_settings = get_option('ampforwp_rewrite_flush_option');
351
-
352
- if ( $get_current_permalink_settings ) {
353
- return;
354
- }
355
- // Adding double check to make sure, we are not updating and calling database unnecessarily
356
- if ( empty( $get_current_permalink_settings ) ) {
357
- $wp_rewrite->flush_rules();
358
- update_option('ampforwp_rewrite_flush_option', 'true');
359
- }
360
-
361
- }
362
-
363
- register_deactivation_hook( __FILE__, 'ampforwp_rewrite_deactivate', 20 );
364
- function ampforwp_rewrite_deactivate() {
365
- // Flushing rewrite urls ONLY on deactivation
366
- global $wp_rewrite;
367
-
368
- foreach ( $wp_rewrite->endpoints as $index => $endpoint ) {
369
- if ( AMP_QUERY_VAR === $endpoint[1] ) {
370
- unset( $wp_rewrite->endpoints[ $index ] );
371
- break;
372
- }
373
- }
374
-
375
- flush_rewrite_rules();
376
-
377
- $wp_rewrite->flush_rules();
378
-
379
- // Remove transient for Welcome page
380
- delete_transient( 'ampforwp_welcome_screen_activation_redirect');
381
- }
382
-
383
- if( !function_exists('ampforwp_upcomming_layouts_demo') ){
384
- function ampforwp_upcomming_layouts_demo(){
385
- return array(
386
- array(
387
- "name"=>'Creative Services',
388
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-9.png',
389
- "link"=>'https://ampforwp.com/layouts-9/',
390
- ),
391
- array(
392
- "name"=>'App',
393
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-8.png',
394
- "link"=>'https://ampforwp.com/layouts-8/',
395
- ),
396
- array(
397
- "name"=>'Business Blog',
398
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-7.png',
399
- "link"=>'https://ampforwp.com/layouts-7/',
400
- ),
401
- array(
402
- "name"=>'Journal',
403
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-6.png',
404
- "link"=>'https://ampforwp.com/layouts-6/',
405
- ),
406
- array(
407
- "name"=>'Studio',
408
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-5.png',
409
- "link"=>'https://ampforwp.com/layouts-5/',
410
- ),
411
- array(
412
- "name"=>'Agency',
413
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-4.png',
414
- "link"=>'https://ampforwp.com/layouts-4/',
415
- ),
416
- array(
417
- "name"=>'Elegance',
418
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-3.png',
419
- "link"=>'https://ampforwp.com/layouts-3/',
420
- ),
421
- array(
422
- "name"=>'Weekly Magazine',
423
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-2.png',
424
- "link"=>'https://ampforwp.com/layouts-2/',
425
- ),
426
- array(
427
- "name"=>'News',
428
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-1.png',
429
- "link"=>'https://ampforwp.com/layouts-1/',
430
- ),
431
-
432
- );
433
- }
434
- }
435
-
436
- require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
437
- require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
438
- add_action('after_setup_theme', 'ampforwp_include_options_file' );
439
-
440
- function ampforwp_include_options_file(){
441
- if ( is_admin() ) {
442
- // Register all the main options
443
- require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
444
- require_once dirname( __FILE__ ).'/templates/report-bugs.php';
445
- }
446
- }
447
-
448
- // Modules
449
- add_action('after_setup_theme','ampforwp_add_module_files');
450
- function ampforwp_add_module_files() {
451
-
452
- global $redux_builder_amp;
453
- if ( isset($redux_builder_amp['ampforwp-content-builder']) && $redux_builder_amp['ampforwp-content-builder'] ) {
454
- if ( ! function_exists( 'bstw' ) ) {
455
- require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/tinymce-widget/tinymce-widget.php';
456
- }
457
- require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-blurb.php';
458
- require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-button.php';
459
- }
460
- }
461
-
462
- /*
463
- * Load Files only in the backend
464
- * As we don't need plugin activation code to run everytime the site loads
465
- */
466
- if ( is_admin() ) {
467
- add_action( 'plugins_loaded', 'amp_update_db_check' );
468
- // Include Welcome page only on Admin pages
469
- require AMPFORWP_PLUGIN_DIR .'/includes/welcome.php';
470
-
471
- // Add Settings Button in Plugin backend
472
- if ( ! function_exists( 'ampforwp_plugin_settings_link' ) ) {
473
-
474
- // Deactivate Parent Plugin notice
475
- add_filter( 'plugin_action_links', 'ampforwp_plugin_settings_link', 10, 5 );
476
-
477
- function ampforwp_plugin_settings_link( $actions, $plugin_file ) {
478
- static $plugin;
479
- if ( ! isset($plugin))
480
- $plugin = plugin_basename(__FILE__);
481
- if ( $plugin === $plugin_file ) {
482
- $amp_activate = '';
483
- if ( function_exists('amp_activate') ) {
484
- $amp_activate = ' | <span style="color:black;">Status: Addon Mode</span style=>';
485
- }
486
- $settings = array( 'settings' => '<a href="admin.php?page=amp_options&tab=8">' . esc_html__('Settings', 'accelerated-mobile-pages') . '</a> | <a href="https://ampforwp.com/extensions/#utm_source=plugin-panel&utm_medium=plugin-extension&utm_campaign=features">' . esc_html__('Premium Features', 'accelerated-mobile-pages') . '</a> | <a href="https://ampforwp.com/membership/#utm_source=plugin-panel&utm_medium=plugin-extension&utm_campaign=pro">' . esc_html__('Pro', 'accelerated-mobile-pages') . '</a>'. $amp_activate );
487
-
488
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
489
- $actions = array_merge( $actions, $settings );
490
- }
491
- return $actions;
492
- }
493
- }
494
- } // is_admin() closing
495
-
496
- // AMP endpoint Verifier
497
- function ampforwp_is_amp_endpoint() {
498
- if ( ampforwp_is_non_amp() && ! is_admin()) {
499
- return apply_filters('ampforwp_is_amp_endpoint_takeover', ampforwp_is_non_amp() );
500
- }
501
- else {
502
- return apply_filters('ampforwp_is_amp_endpoint', false !== get_query_var( 'amp', false ) );
503
- }
504
- }
505
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
506
- if ( ! class_exists( 'Ampforwp_Init', false ) ) {
507
- class Ampforwp_Init {
508
-
509
- public function __construct(){
510
-
511
- require AMPFORWP_PLUGIN_DIR .'/includes/features/functions.php';
512
- // Load Files required for the plugin to run
513
- if( function_exists('amp_activate') ){
514
- require_once AMPFORWP_PLUGIN_DIR."includes/features/amp_bridge.php";
515
- }
516
- else{
517
- require AMPFORWP_PLUGIN_DIR .'/includes/includes.php';
518
- // Redirection Code added
519
- require AMPFORWP_PLUGIN_DIR.'/includes/redirect.php';
520
-
521
- require AMPFORWP_PLUGIN_DIR .'/classes/class-init.php';
522
- new Ampforwp_Loader();
523
-
524
- }
525
- //Other Features
526
- require_once AMPFORWP_PLUGIN_DIR."includes/features/advertisement/ads-functions.php";
527
- require_once AMPFORWP_PLUGIN_DIR."includes/features/performance/performance-functions.php";
528
- require_once AMPFORWP_PLUGIN_DIR."includes/features/analytics/analytics-functions.php";
529
- require_once AMPFORWP_PLUGIN_DIR."includes/features/structure-data/structured-data-functions.php";
530
- require_once AMPFORWP_PLUGIN_DIR."includes/features/notice-bar/notice-bar-functions.php";
531
- require_once AMPFORWP_PLUGIN_DIR."includes/features/push-notification/push-notification-functions.php";
532
- }
533
- }
534
- }
535
- /*
536
- * Start the plugin.
537
- * Gentlemen start your engines
538
- */
539
- function ampforwp_plugin_init() {
540
-
541
- if ( defined( 'AMPFORWP__FILE__' ) && defined('AMPFORWP_PLUGIN_DIR') ) {
542
- new Ampforwp_Init();
543
- }
544
- }
545
- add_action('init','ampforwp_plugin_init', 9);
546
-
547
- /*
548
- * customized output widget
549
- * to be used be used in before or after Loop
550
- */
551
- require AMPFORWP_PLUGIN_DIR.'/templates/category-widget.php';
552
- require AMPFORWP_PLUGIN_DIR.'/templates/woo-widget.php';
553
-
554
-
555
- /*
556
- * Including core AMP plugin files and removing any other things if necessary
557
- */
558
- function ampforwp_bundle_core_amp_files(){
559
- // Bundling Default plugin
560
- require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/amp/amp.php';
561
-
562
- define( 'AMPFORWP__FILE__', __FILE__ );
563
- if ( ! defined('AMP__VENDOR__DIR__') ) {
564
- define( 'AMP__VENDOR__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
565
- }
566
- if ( ! defined('AMP_QUERY_VAR') ){
567
- define('AMP_QUERY_VAR', 'amp');
568
- }
569
- define( 'AMP__VENDOR__VERSION', '0.4.2' );
570
- require_once( AMP__VENDOR__DIR__ . '/back-compat/back-compat.php' );
571
- require_once( AMP__VENDOR__DIR__ . '/includes/amp-helper-functions.php' );
572
- require_once( AMP__VENDOR__DIR__ . '/includes/admin/functions.php' );
573
- require_once( AMP__VENDOR__DIR__ . '/includes/settings/class-amp-customizer-settings.php' );
574
- require_once( AMP__VENDOR__DIR__ . '/includes/settings/class-amp-customizer-design-settings.php' );
575
- // Widgets
576
- require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-categories.php' );
577
- require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-archives.php' );
578
- require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-media-video.php' );
579
- require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-recent-comments.php' );
580
- require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-text.php' );
581
-
582
- }
583
- add_action('plugins_loaded','ampforwp_bundle_core_amp_files', 8);
584
-
585
- if ( ! function_exists('ampforwp_init') ) {
586
- add_action( 'init', 'ampforwp_init' );
587
- function ampforwp_init() {
588
- if ( false === apply_filters( 'amp_is_enabled', true ) ) {
589
- return;
590
- }
591
- if( ! defined('AMP_QUERY_VAR')){
592
- define( 'AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
593
- }
594
-
595
- if ( ! defined('AMP__VENDOR__DIR__') ) {
596
- define( 'AMP__VENDOR__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
597
- }
598
-
599
- do_action( 'amp_init' );
600
-
601
- load_plugin_textdomain( 'accelerated-mobile-pages', false, trailingslashit(AMPFORWP_PLUGIN_DIR) . 'languages' );
602
-
603
- add_rewrite_endpoint( AMP_QUERY_VAR, EP_PERMALINK );
604
- add_post_type_support( 'post', AMP_QUERY_VAR );
605
-
606
- add_filter( 'request', 'AMPforWP\\AMPVendor\\amp_force_query_var_value' );
607
- add_action( 'wp', 'AMPforWP\\AMPVendor\\amp_maybe_add_actions');
608
-
609
- // Redirect the old url of amp page to the updated url. #1033 (Vendor Update)
610
- add_filter( 'old_slug_redirect_url', 'ampforwp_redirect_old_slug_to_new_url' );
611
-
612
- if ( class_exists( 'Jetpack' ) && ! (defined( 'IS_WPCOM' ) && IS_WPCOM) && ( defined('JETPACK__VERSION') && JETPACK__VERSION < 6.9 ) ) {
613
- require_once( AMP__VENDOR__DIR__ . '/jetpack-helper.php' );
614
- }
615
- // AMP by Automattic Compatibility #2287
616
- // Remove the FrontPage query added by AMP to make our FrontPage/Homepage works
617
- if ( function_exists('amp_activate') ) {
618
- remove_action( 'parse_query', 'amp_correct_query_when_is_front_page' );
619
- remove_action( 'wp', 'amp_maybe_add_actions' );
620
- }
621
- }
622
- }
623
-
624
-
625
- function amp_update_db_check() {
626
- global $redux_builder_amp;
627
- $ampforwp_current_version = AMPFORWP_VERSION;
628
- if ( isset( $_GET['ampforwp-dismiss-theme'] ) && trim( $_GET['ampforwp-dismiss-theme']) === "ampforwp_dismiss_admin_notices" && wp_verify_nonce($_GET['ampforwp_notice'], 'ampforwp_notice') ) {
629
- update_option( 'ampforwp_theme_notice', true );
630
- wp_redirect("admin.php?page=amp_options");
631
- }
632
- if ( get_option( 'AMPforwp_db_version' ) !== $ampforwp_current_version ) {
633
-
634
- if ( isset( $_GET['ampforwp-dismiss'] ) && trim( $_GET['ampforwp-dismiss']) === "ampforwp_dismiss_admin_notices" && wp_verify_nonce($_GET['ampforwp_notice'], 'ampforwp_notice') ) {
635
- update_option( 'AMPforwp_db_version', $ampforwp_current_version );
636
- wp_redirect(remove_query_arg('ampforwp-dismiss'), 301);
637
- }
638
- if ( isset($redux_builder_amp['ampforwp-update-notification-bar'] ) && $redux_builder_amp['ampforwp-update-notification-bar'] && current_user_can( 'manage_options' ) ) {
639
-
640
- add_action('admin_notices', 'ampforwp_update_notice');
641
- }
642
- }
643
- }
644
-
645
-
646
- // Admin notice for AMP WordPress Theme
647
- add_action('admin_notices', 'ampforwp_ampwptheme_notice');
648
- function ampforwp_ampwptheme_notice() {
649
- $theme = '';
650
- $theme = wp_get_theme(); // gets the current theme
651
-
652
- if ( ('AMP WordPress Theme' == $theme->name || 'AMP WordPress Theme' == $theme->parent_theme) && true != get_option('ampforwp_theme_notice') ) {
653
- add_thickbox(); ?>
654
- <div id="some" class="notice-warning settings-error notice is-dismissible">
655
- <span style="margin: 0.5em 0.5em 0 0"><?php echo esc_html__('AMP WordPress Theme is installed', 'accelerated-mobile-pages'); ?></span><br>
656
- <span style="margin: 0.5em 0.5em 0 0"><?php echo esc_html__('One Last Step Required:', 'accelerated-mobile-pages'); ?> <a href="#TB_inline?width=600&height=550&inlineId=my-content-id" class="thickbox"><?php echo esc_html__('Finish Setup', 'accelerated-mobile-pages') ?></a></span><br>
657
- </div>
658
- <div id="my-content-id" style="display:none;">
659
- <p>
660
- <iframe width="100%" height="480" src="https://www.youtube.com/embed/" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
661
- <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ampforwp-dismiss-theme', 'ampforwp_dismiss_admin_notices' ), 'ampforwp_notice', 'ampforwp_notice' ) ) ?>"><?php echo esc_html__('Take me to the Options Panel', 'accelerated-mobile-pages'); ?></a>
662
- </p>
663
- </div>
664
- <?php }
665
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
666
-
667
- $amp_plugin_manager_version = array();
668
-
669
- $plugin_manager_active = is_plugin_active('amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php');
670
- $amp_plugin_manager_active = is_plugin_active('plugin-manager/ampforwp-3rd-party-plugin-creator.php');
671
-
672
- if ( $plugin_manager_active) {
673
- $amp_plugin_manager = get_plugin_data(AMPFORWP_MAIN_PLUGIN_DIR.'/amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php');
674
- $amp_plugin_manager_version = $amp_plugin_manager['Version'];
675
- }
676
- if ( $amp_plugin_manager_active) {
677
- $plugin_manager = get_plugin_data(AMPFORWP_MAIN_PLUGIN_DIR.'/plugin-manager/ampforwp-3rd-party-plugin-creator.php');
678
- $amp_plugin_manager_version = $plugin_manager['Version'];
679
- }
680
-
681
- if ( $plugin_manager_active || $amp_plugin_manager_active ) {
682
- $screen = get_current_screen();
683
- if ( '1.0' == $amp_plugin_manager_version && 'plugins' === $screen->base) { ?>
684
- <div id="ampforwp_pluginmanager" class="notice-warning settings-error notice is-dismissible"><p><b><?php echo esc_html__(' Attention','accelerated-mobile-pages'); ?>:</b> <?php echo esc_html__(' AMPforWP Plugin Manager requires an upgrade. Please','accelerated-mobile-pages'); ?> <b><a href="https://ampforwp.com/plugins-manager/?update=plugins-manager#utm_source=plugin-page&utm_medium=plugin-manager-update&utm_campaign=update-notice" target="_blank"><?php echo esc_html__('Download &amp; install the latest version', 'accelerated-mobile-pages'); ?></a></b> <?php echo esc_html__('for free','accelerated-mobile-pages'); ?>.
685
- </p>
686
- </div>
687
- <?php }
688
- }
689
-
690
- // AMP with AMPforWP notice #2287
691
- if ( function_exists('amp_activate') ) { ?>
692
- <div class="notice-warning settings-error notice is-dismissible"><p><?php echo esc_html__('AMP by Automattic is activated so the AMPforWP is now in the "Addon Mode". ','accelerated-mobile-pages') ?><a href="https://ampforwp.com/tutorials/article/guide-to-amp-by-automattic-compatibility-in-ampforwp/" target="_blank"><?php echo esc_html__('Learn More','accelerated-mobile-pages'); ?></a></p></div>
693
- <?php }
694
- }
695
-
696
- function ampforwp_update_notice() {
697
- $screen = '';
698
- $screen = get_current_screen();
699
- $ampforwp_current_version = AMPFORWP_VERSION;
700
- if ( 'toplevel_page_amp_options' == $screen->base ) { ?>
701
- <div class="notice-success notice is-dismissible amp-update-notice">
702
- <div class="amp-update-notice-text-box">
703
- <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAn1BMVEUAAADuHCXwHiTuHSTtHST/IjjuHSXuHCTvHSXvHCXwHi3/JyfuHSTuHCTvHSTvHCTxHSb/NDTyHyj0IyruHSTvHSXvHSbuHST1ICftHCXuHCXuHSXwHiXvHyfuHSTuHSTvHSXuHCTuHCTuHCTuHCTvHSXyHibuHCTuHCXuHCXuHCXuHibwICjuHCTuHCTuHSTwHSbuHCXuHCTuHCTtHCSisK2PAAAANHRSTlMA+1T35wiIxm9kEQzu4Yx/NgQlFZV6PrAa16RpUi7MhE3y3LmYXynrz5FYSSC9q55EddGypVN9ggAABlxJREFUeNrVm+mymkAQhQfZBVQEFNz3fbtm3v/ZYqUqyWww0603Vfn+mcr1wMz06QUk/yfZIPRua79KYst2Vgd/fS9aU5f8E6JFx4+pktWPryn5VtKH51u0kXgY9Mk30cv31IhZkH1e/VJU1BzrR+uzJ2I6sigQ5yv63NoPKYa42/6M/JpiWXrvr0I7p+/gnN7U3+7pm1x3BM/Op+9je+iACO2mI+aPcq8ItmHQ7WyGVVOUHHDWFI1qN3Y0HmSiSfYX3atddxhPmNCv1As6HNdvqvuYP6mSDXgbTsq78cdt7YV3HOU2lDD9QBnVZnuZnlXOkYAOwlzjaxjv3PfMs+5dvvsiAh6hofwdD1P9GxUZlQTMeSXlyAkxQrr/6kEwuF1bDKEBav87aCfrH8SDNIWf/3hB8Lgb0cMu2vgXI/9C3uK0FArXTHN4hW27p+RNdomQHZv9vxK2Hyf6ODIfSuE7u6QBIf984fQnNuc5bSGpN4RCSDlCnH7L2ghH8cofxKx2u2z+/rH6SSTu7IyyrEkN/if2f2JROXAz3hW3NfUff/7R+iNVX+Nwm6DMa+09F/8pVn+v3OIeV7PlRAFnWvEFq09PJg7bU1wiZVmg9YekBi4/z4jEmjuAaP24rG1xOEtsNS5A5eL0m73jwdWIjQv0QOtfjX32LCQhrv5B69uNZ7dcsmFWf3HLEqtPA0CtMeB8go3SAuW/8l3JpFWdIResBURYfZvpmfRma7ELXbH5GqNv+JdpIiY7OQaXbaz+08C9x4zS8+8/s1MQD6tvmXQ+LpuUpn8Whk1Dfbg+5Mo93m9li/Kx+isz99yx/arqqsZgfS6s9bDF0UWuhOw2Uj8HNP5i0RkxLjRE6ifG5pHJnr9A70DLklKLHqZfdMgvOvQvO5g+Jn3Jcj5zSTh9B3JyFlJ5HDObgtKnLQKAPXKeeCrGEH3syZ0JZ37A5mi4vroMNCyMKrEhzAD66BayYFJyyvtgjNHfp1DzFDLPjUkEAH18ATMVStO1HAR6fZbVpvPi+CJ/sXlxPzaNdF22PeBtIAfoa0garsDmz08lhCVeX+7+1DDlR/D6mGjqYZy+U1ce8Ipd3giDt/SNu9snv+aWaM14fRNvEE6dcCQ+pT829eLj66Oj2YIP6/PHfv76uOKOBF7f/D4Svjk5mM4lBjh9mSWzVvyR2DS2Vas6Reh4VahI1oYlad9MvwCVpRP+AUnV2FXNPqAvFSBSem7AnXS9X8xfdF/kPhPCZq21VIBI6RlGeeD158CyOBbTs2yg+uUEd9Y/hALEfWc4UcL1SSIOpFfs8xQgZ4i+HE2FuCQ2dEK5BuuTUNryL/yIcgLV52tQ2pYmRHOQftuB6xNHHlnH7OAIwh124dLtdhRz4ilA/4FZuFwxLw5wg/ooAenLAzErUgyOHPM+54hxj4lyIDaTl0VPDzVbvikLp0CaIetxK4x+31IOxDJL7Cj0zIH68pOxG5cfoIOyqYXRL+2azNeiwEhMZ6jHu0da09a7DnAJCpR+adcG/BcFBULfZupfXAjYJW8qjB0bzJ19lP656eltF1LZjVH6LlvXWxcxsS3Z5WmuDS9LjD6ZNz+c9yjDoXET1rr+T99YWfItRg6lZj3SFqWfcd9/1L5BdKr/phiqLz8cd5STtStlWO6aYikE63eF29O/w5KUNfkUpR8avczkUZaqrS4DMfoLi5oEmcs3Wr4qFO4Y/YFtOEDoL/mVilRl4BauH1OWofm7dLNMKgMR+gtbM0PlCwaOlWCYR4R+yOy/8IRXfwyo0+NfBjq9GX96By8TymExf+A+wfrZWtDP9al+T3mGf/asAOsPHMpzMym3l5Qnefy+Nmj+nVOBq2vUcVma14rRLxbPItM3IqnAMkih8uWNSvoZwDlEqm0Kkj8yNyH5mp6pQyWSsWvc/2xkeXoDTV8uKyrjeDuTlmFxs6hMDg3gK+hnZPIP0iQ7QVqYzKGziGpWPhw5VEnCGCrcRWSs2Yj/gWM2CDs/WA9VexneR9XY+9XTn1VJrPlvAUGzdejbXHcf/KkZ/sdmeHozisc6RuR9Wges/L1PPsPZR8jb+YV8jsHagsnvOyX5LOXX0/zmb4uUfAPTTmKy8wY/SMNzEdxW9ulzRL6bXegpfuAY+/diAb51PGn/3AqDrpcf58V4Oxlk5H/lJxdt5e+wtfWRAAAAAElFTkSuQmCC" width="128" height="128" />
704
- <div class="amp-update-notice-text"> <?php echo esc_html__('AMP has been updated to '.$ampforwp_current_version, 'accelerated-mobile-pages' ); ?></div>
705
- <a href="https://ampforwp.com/new/" target="_blank" href="admin.php?page=acmforwp_update"><?php echo esc_html__('What\'s New ?', 'accelerated-mobile-pages');?></a>
706
- </div>
707
- <div class="amp-update-notice-dismiss">
708
- <a title="Close this Notification" href="<?php echo esc_url( wp_nonce_url(add_query_arg( 'ampforwp-dismiss', 'ampforwp_dismiss_admin_notices' ), 'ampforwp_notice', 'ampforwp_notice') ) ?>">X</a>
709
- </div>
710
- <div class="amp-update-notice-review-box">
711
- <a class="star_icon" href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages?rate=5#new-post" target="_blank"> <?php echo esc_html__('Appreciate it?','accelerated-mobile-pages')?> <br> <span title="Give Us 5 Star"><?php echo esc_html__('Leave a Review', 'accelerated-mobile-pages') ?> →</span></a>
712
- </div>
713
- </div>
714
- <?php }
715
- }
716
- if ( ! defined('AMP_FRAMEWORK_COMOPNENT_DIR_PATH') ) {
717
- define('AMP_FRAMEWORK_COMOPNENT_DIR_PATH', AMPFORWP_PLUGIN_DIR ."/components");
718
- }
719
- require_once( AMP_FRAMEWORK_COMOPNENT_DIR_PATH . '/components-core.php' );
720
- require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
721
- if ( !function_exists('amp_activate') ) {
722
- require_once( AMPFORWP_PLUGIN_DIR. 'base_remover/base_remover.php' );
723
- require_once( AMPFORWP_PLUGIN_DIR. 'includes/thirdparty-compatibility.php' );
724
- if ( ampforwp_get_setting('ampforwp-pagebuilder') ){
725
- require_once( AMPFORWP_PLUGIN_DIR. 'pagebuilder/amp-page-builder.php');
726
- }
727
- }
728
- if(is_admin()){
729
- require_once( AMPFORWP_PLUGIN_DIR. 'includes/modules-upgrade.php' );
730
- }
731
-
732
- /**
733
- * Redirects the old AMP URL to the new AMP URL.
734
- * If post slug is updated the amp page with old post slug will be redirected to the updated url.
735
- *
736
- * @param string $link New URL of the post.
737
- *
738
- * @return string $link URL to be redirected.
739
- */
740
- if ( ! function_exists( 'ampforwp_redirect_old_slug_to_new_url' ) ) {
741
- function ampforwp_redirect_old_slug_to_new_url( $link ) {
742
-
743
- if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
744
- $link = trailingslashit( trailingslashit( $link ) . AMPFORWP_AMP_QUERY_VAR );
745
- }
746
-
747
- return $link;
748
- }
749
- }
750
-
751
- // Hide Post Builder if Swift is enabled
752
- add_filter('amp_customizer_is_enabled', 'ampforwp_customizer_is_enabled');
753
- if ( ! function_exists('ampforwp_customizer_is_enabled') ) {
754
- function ampforwp_customizer_is_enabled($value){
755
- global $redux_builder_amp;
756
- if ( 4 == ampforwp_get_setting('amp-design-selector') && ! function_exists('amp_activate') ) {
757
- $value = false;
758
- }
759
- return $value;
760
- }
761
- }
762
-
763
- // Get Settings from Redux #2177 & #2911
764
- function ampforwp_get_setting( $opt_name='', $child_option='', $sanitize_method='' ){
765
- global $redux_builder_amp;
766
- if(empty($redux_builder_amp)){
767
- $redux_builder_amp = (array) get_option('redux_builder_amp');
768
- }
769
- $opt_value = '';
770
- if ( isset($redux_builder_amp[$opt_name]) ) {
771
- $opt_value = $redux_builder_amp[$opt_name];
772
- if ( '' !== $child_option && isset($redux_builder_amp[$opt_name][$child_option]) ){
773
- $opt_value = $redux_builder_amp[$opt_name][$child_option];
774
- }
775
- }
776
- if ( '' !== $sanitize_method && function_exists($sanitize_method) ){
777
- return $sanitize_method($opt_value);
778
- }
779
- return $opt_value;
780
- }
781
-
782
- // Register widgets
783
- add_action('amp_init', 'ampforwp_widgets');
784
- function ampforwp_widgets(){
785
- add_action( 'widgets_init', 'ampforwp_register_widgets' );
786
- }
787
- function ampforwp_register_widgets() {
788
- global $wp_widget_factory;
789
- foreach ( $wp_widget_factory->widgets as $registered_widget ) {
790
- $registered_widget_class_name = get_class( $registered_widget );
791
- if ( ! preg_match( '/^WP_Widget_(.+)$/', $registered_widget_class_name, $matches ) ) {
792
- continue;
793
- }
794
- $amp_class_name = 'AMP_Widget_' . $matches[1];
795
- if ( ! class_exists( $amp_class_name ) || is_a( $amp_class_name, $registered_widget_class_name ) ) {
796
- continue;
797
- }
798
-
799
- unregister_widget( $registered_widget_class_name );
800
- register_widget( $amp_class_name );
801
- }
802
- }
803
- // Post Types
804
- function ampforwp_get_all_post_types(){
805
- global $redux_builder_amp;
806
- $post_types = array();
807
- $selected_post_types = array();
808
-
809
- if( ampforwp_get_setting('amp-on-off-for-all-posts') ){
810
- $post_types['post'] = 'post';
811
- }
812
- if( ampforwp_get_setting('amp-on-off-for-all-pages') ){
813
- $post_types['page'] = 'page';
814
- }
815
-
816
- if ( ampforwp_get_setting('ampforwp-custom-type')) {
817
- foreach (ampforwp_get_setting('ampforwp-custom-type') as $key) {
818
- $selected_post_types[$key] = $key;
819
- }
820
- $post_types = array_merge($post_types, $selected_post_types);
821
- }
822
-
823
- return $post_types;
824
- }
825
-
826
- // is_search_enabled_in_ampforwp function ( Design 1,2 and 3 ) #2681
827
- if( !function_exists( 'is_search_enabled_in_ampforwp' ) ) {
828
- function is_search_enabled_in_ampforwp() {
829
- if( ( ampforwp_get_setting('amp-design-selector')==1 && ampforwp_get_setting('amp-design-1-search-feature') ) ||
830
- ( ampforwp_get_setting('amp-design-selector')==2 && ampforwp_get_setting('amp-design-2-search-feature') ) ||
831
- ( ampforwp_get_setting('amp-design-selector')==3 && ampforwp_get_setting('amp-design-3-search-feature') ) ) {
832
- return true;
833
- }
834
- return false;
835
- }
836
- }
837
- // Fallback for Redux class #2377
838
- add_action('after_setup_theme', 'ampforwp_redux_class' );
839
- function ampforwp_redux_class(){
840
- if ( !class_exists('Redux') && class_exists('ReduxCore\\ReduxFramework\\Redux') ) {
841
- class Redux extends ReduxCore\ReduxFramework\Redux
842
- {
843
- # Do nothing, it will inherit all the methods
844
- }
845
- }
846
- }
847
- add_filter('plugin_row_meta' , 'ampforwp_add_plugin_meta_links', 10, 2);
848
- if ( ! function_exists('ampforwp_add_plugin_meta_links') ) {
849
- function ampforwp_add_plugin_meta_links($meta_fields, $file) {
850
- if ( plugin_basename(__FILE__) == $file ) {
851
- $plugin_url = "https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/?rate=5#new-post";
852
- $meta_fields[] = "<a href='" . esc_url($plugin_url) ."' target='_blank' title='" . esc_html__('Rate', 'accelerated-mobile-pages') . "'>
853
- <i class='ampforwp-rate-stars'>"
854
- . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
855
- . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
856
- . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
857
- . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
858
- . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
859
- . "</i></a>";
860
-
861
- }
862
-
863
- return $meta_fields;
864
- }
865
- }
866
- // AMPforWP Global Data variable
867
- $ampforwp_data = array();
868
-
869
- // color sanitizer
870
- function ampforwp_sanitize_color( $color ) {
871
- if ( empty( $color ) || is_array( $color ) )
872
- return 'rgba(0,0,0,0)';
873
- // If string does not start with 'rgba', then treat as hex
874
- // sanitize the hex color and finally convert hex to rgba
875
- if ( false === strpos( $color, 'rgba' ) ) {
876
- return sanitize_hex_color( $color );
877
- }
878
- // By now we know the string is formatted as an rgba color so we need to further sanitize it.
879
- $color = str_replace( ' ', '', $color );
880
- sscanf( $color, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha );
881
- return 'rgba('.$red.','.$green.','.$blue.','.$alpha.')';
882
- }
883
-
884
- // AMP Plugins Manager compatibility #2976
885
- if ( false == get_transient('ampforwp-pm-disabler') ) {
886
- $ampforwp_active_plugins = array_flip(get_option('active_plugins'));
887
- if (isset($ampforwp_active_plugins['amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php'] ) ){
888
- $plugin_data = get_plugin_data(AMPFORWP_MAIN_PLUGIN_DIR . 'amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php' );
889
- if ( version_compare( floatval( $plugin_data['Version'] ), '1.1', '<' ) ){
890
- unset($ampforwp_active_plugins['amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php']);
891
- update_option('active_plugins', array_flip($ampforwp_active_plugins));
892
- set_transient('ampforwp-pm-disabler', true);
893
- include_once( ABSPATH . 'wp-includes/pluggable.php' );
894
- wp_redirect(admin_url('plugins.php'));
895
- }
896
- }
897
- elseif(isset($ampforwp_active_plugins['amp-plugin-manager-master/ampforwp-3rd-party-plugin-creator.php'] )){
898
- $plugin_data = get_plugin_data(AMPFORWP_MAIN_PLUGIN_DIR . 'amp-plugin-manager-master/ampforwp-3rd-party-plugin-creator.php' );
899
- if ( version_compare( floatval( $plugin_data['Version'] ), '1.1', '<' ) ){
900
- unset($ampforwp_active_plugins['amp-plugin-manager-master/ampforwp-3rd-party-plugin-creator.php']);
901
- update_option('active_plugins', array_flip($ampforwp_active_plugins));
902
- set_transient('ampforwp-pm-disabler', true);
903
- include_once( ABSPATH . 'wp-includes/pluggable.php' );
904
- wp_redirect(admin_url('plugins.php'));
905
- }
906
- }
907
-
908
- }
909
- add_action('admin_notices', 'ampforwp_plugins_manager_notice');
910
- function ampforwp_plugins_manager_notice(){
911
- if ( true == get_transient('ampforwp-pm-disabler') ) { ?>
912
- <div id="ampforwp_pluginmanager" class="notice-warning settings-error notice is-dismissible"><p><b><?php echo esc_html__('Attention: ','accelerated-mobile-pages');?></b><?php echo esc_html__('AMPforWP Plugin Manager has been deactivated and requires an upgrade. Please','accelerated-mobile-pages');?> <b><a target="_blank" href=<?php echo esc_url('https://ampforwp.com/plugins-manager/?update=plugins-manager#utm_source=plugin-page&utm_medium=plugin-manager-update&utm_campaign=update-notice');?>><?php echo esc_html__('Download &amp; install the latest version','accelerated-mobile-pages');?></a></b><?php echo esc_html__(' for free.','accelerated-mobile-pages');?>
913
- </p>
914
- </div>
915
- <?php
916
- }
917
- }
918
- add_action( 'activate_plugin', 'ampforwp_delete_plugins_manager_transient' );
919
- function ampforwp_delete_plugins_manager_transient($plugin){
920
- if ( strpos($plugin, 'ampforwp-3rd-party-plugin-creator.php') || strpos($plugin, 'accelerated-moblie-pages.php') ) {
921
- delete_transient( 'ampforwp-pm-disabler' );
922
- }
923
- }
924
- // Infinite scroll/ amp-next-page #2244
925
- add_action('pre_amp_render_post', 'ampforwp_initialise_classes');
926
- if ( ! function_exists('ampforwp_initialise_classes') ) {
927
- function ampforwp_initialise_classes(){
928
- if ( true == ampforwp_get_setting('ampforwp-infinite-scroll') ) {
929
- require AMPFORWP_PLUGIN_DIR .'/classes/class-ampforwp-infinite-scroll.php';
930
- }
931
- }
932
- }
933
-
934
- // Data Consent
935
- function ampforwp_get_data_consent(){
936
- global $redux_builder_amp;
937
- $dboc = false;
938
- $is_dboc = '';
939
- if(isset($redux_builder_amp['amp-gdpr-compliance-switch']) && $redux_builder_amp['amp-gdpr-compliance-switch'] ){
940
-
941
- $dboc = true;
942
- }
943
- return $dboc;
944
- }
945
-
946
- //Levelup Compatibility
947
- function ampforwp_levelup_compatibility($type='levelup_theme_and_elementor_check'){
948
- //check theme
949
- $returnVal = false;
950
- switch($type){
951
- case 'levelup_theme':
952
- if(function_exists('levelup_theme_is_active')){
953
- $returnVal = levelup_theme_is_active();
954
- }
955
- break;
956
- case 'levelup_elementor':
957
- if(function_exists('levelup_has_enable_elementor_builder')){
958
- $returnVal = levelup_has_enable_elementor_builder();
959
- }
960
- break;
961
- case 'levelup_theme_and_elementor':
962
- if(function_exists('levelup_theme_is_active') && function_exists('levelup_has_enable_elementor_builder')){
963
- $returnVal = levelup_theme_is_active() && levelup_has_enable_elementor_builder();
964
- }
965
- break;
966
- case 'hf_builder_foot':
967
- if(function_exists('levelup_check_hf_builder')){
968
- $returnVal = levelup_check_hf_builder('foot');
969
- }
970
- break;
971
- case 'hf_builder_head':
972
- if(function_exists('levelup_check_hf_builder')){
973
- $returnVal = levelup_check_hf_builder('head');
974
- }
975
- break;
976
- }
977
- return $returnVal;
978
- }
979
-
980
- function ampforwp_amp_consent_check($attrs){
981
-
982
- if( ampforwp_get_data_consent() ){
983
- $attrs['data-block-on-consent'] = '';
984
- }
985
- $attrs = apply_filters( 'ampforwp_embedd_attrs_handler', $attrs );
986
- return $attrs;
987
- }
988
-
989
- // Fallback for Class AMP_Content sanitizer #2287
990
- add_action('pre_amp_render_post', 'ampforwp_vendor_amp_fallbacks');
991
- function ampforwp_vendor_amp_fallbacks(){
992
- if ( ! class_exists('AMP_Content') ) {
993
- class AMP_Content extends AMPforWP\AMPVendor\AMP_Content{}
994
- }
995
- }
996
- // Class AMP_Blacklist_Sanitizer #2287
997
- add_action('plugins_loaded', 'ampforwp_sanitizers_loader');
998
- function ampforwp_sanitizers_loader(){
999
- if ( ! class_exists('AMP_Blacklist_Sanitizer') ) {
1000
- if(defined('AMP__VENDOR__DIR__')){
1001
- $amp_blacklist_sanitizer = realpath( AMP__VENDOR__DIR__ . 'includes/sanitizers/class-amp-blacklist-sanitizer.php') ;
1002
- require_once $amp_blacklist_sanitizer;
1003
- class AMP_Blacklist_Sanitizer extends AMPforWP\AMPVendor\AMP_Blacklist_Sanitizer{}
1004
- }
1005
- }
1006
- }
1007
- // is_amp_endpoint Fallback #2287 #3055
1008
- add_action('parse_query','ampforwp_vendor_is_amp_endpoint');
1009
- function ampforwp_vendor_is_amp_endpoint(){
1010
- if ( ! function_exists('amp_activate') && ! function_exists('is_amp_endpoint' ) ) {
1011
- function is_amp_endpoint(){
1012
- if( true == WP_DEBUG_LOG && false == WP_DEBUG_DISPLAY ){
1013
- _doing_it_wrong(
1014
- __FUNCTION__,
1015
- sprintf(
1016
- /* translators: 1: is_amp_endpoint(), 2: ampforwp_is_amp_endpoint */
1017
- esc_html__( '%1$s is deprecated from AMPforWP, please use %2$s instead. Check %3$s for more info', 'accelerated-mobile-pages' ),
1018
- 'is_amp_endpoint()',
1019
- 'ampforwp_is_amp_endpoint','https://ampforwp.com/tutorials/article/detect-amp-page-function/'
1020
- ),
1021
- '5.1.1'
1022
- );
1023
- }
1024
- return false !== get_query_var( AMP_QUERY_VAR, false );
1025
- }
1026
- }
1027
- }
1028
-
1029
- // ampforwp_exclude_posts function #3118
1030
- if ( ! function_exists('ampforwp_exclude_posts') ) {
1031
- function ampforwp_exclude_posts(){
1032
- $exclude_post_values = array();
1033
- $ampforwp_exclude_post_transient = get_transient('ampforwp_exclude_post_transient');
1034
- if ( false != $ampforwp_exclude_post_transient ) {
1035
- $exclude_post_values = $ampforwp_exclude_post_transient;
1036
- }
1037
- else{
1038
- $ampforwp_exclude_post = get_option('ampforwp_exclude_post');
1039
- if ( false != $ampforwp_exclude_post ) {
1040
- $exclude_post_values = $ampforwp_exclude_post;
1041
- }
1042
- }
1043
- return $exclude_post_values;
1044
- }
 
 
 
 
 
 
 
 
 
 
 
 
1045
  }
1
+ <?php
2
+ /*
3
+ Plugin Name: Accelerated Mobile Pages
4
+ Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
+ Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.97.55
7
+ Author: Ahmed Kaludi, Mohammed Kaludi
8
+ Author URI: https://ampforwp.com/
9
+ Donate link: https://www.paypal.me/Kaludi/25
10
+ License: GPL2+
11
+ Text Domain: accelerated-mobile-pages
12
+ Domain Path: /languages/
13
+ */
14
+
15
+ // Exit if accessed directly.
16
+ if ( ! defined( 'ABSPATH' ) ) exit;
17
+
18
+ define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
19
+ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
+ define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
+ define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
+ define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','0.9.97.55');
24
+ define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
+ // any changes to AMP_QUERY_VAR should be refelected here
26
+ function ampforwp_generate_endpoint(){
27
+ $ampforwp_slug = '';
28
+ $get_permalink_structure = '';
29
+
30
+ $ampforwp_slug = "amp";
31
+
32
+ return $ampforwp_slug;
33
+ }
34
+
35
+ define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', ampforwp_generate_endpoint() ) );
36
+
37
+ // Rewrite the Endpoints after the plugin is activate, as priority is set to 11
38
+ function ampforwp_add_custom_post_support() {
39
+ global $redux_builder_amp;
40
+ add_rewrite_endpoint( AMPFORWP_AMP_QUERY_VAR, EP_PAGES | EP_PERMALINK | EP_AUTHORS | EP_ALL_ARCHIVES | EP_ROOT );
41
+ // Pages
42
+ if ( isset($redux_builder_amp['amp-on-off-for-all-pages']) && $redux_builder_amp['amp-on-off-for-all-pages'] ) {
43
+ add_post_type_support( 'page', AMPFORWP_AMP_QUERY_VAR );
44
+ }
45
+ // Custom Post Types
46
+ if ( isset($redux_builder_amp['ampforwp-custom-type'] ) && $redux_builder_amp['ampforwp-custom-type'] ) {
47
+ foreach ( $redux_builder_amp['ampforwp-custom-type'] as $custom_post ) {
48
+ add_post_type_support( $custom_post, AMP_QUERY_VAR );
49
+ }
50
+ }
51
+ }
52
+ add_action( 'init', 'ampforwp_add_custom_post_support',11);
53
+
54
+ // Frontpage and Blog page check from reading settings.
55
+ function ampforwp_name_blog_page() {
56
+ if ( ! $page_for_posts = get_option('page_for_posts')) return;
57
+ $page_for_posts = get_option( 'page_for_posts' );
58
+ $post = get_post($page_for_posts);
59
+ if ( $post ) {
60
+ $slug = $post->post_name;
61
+ return $slug;
62
+ }
63
+ }
64
+ function ampforwp_custom_post_page() {
65
+ $front_page_type = get_option( 'show_on_front' );
66
+ if ( $front_page_type ) {
67
+ return $front_page_type;
68
+ }
69
+ }
70
+
71
+ function ampforwp_get_the_page_id_blog_page(){
72
+ $page = "";
73
+ $output = "";
74
+ if ( ampforwp_name_blog_page() ) {
75
+ $page = get_page_by_path( ampforwp_name_blog_page() );
76
+ if( $page )
77
+ $output = $page->ID;
78
+ }
79
+
80
+ return $output;
81
+ }
82
+
83
+ // Add Custom Rewrite Rule to make sure pagination & redirection is working correctly
84
+ function ampforwp_add_custom_rewrite_rules() {
85
+ global $redux_builder_amp, $wp_rewrite;
86
+ // For Homepage
87
+ add_rewrite_rule(
88
+ 'amp/?$',
89
+ 'index.php?amp',
90
+ 'top'
91
+ );
92
+ // For Homepage with Pagination
93
+ add_rewrite_rule(
94
+ 'amp/'.$wp_rewrite->pagination_base.'/([0-9]{1,})/?$',
95
+ 'index.php?amp=1&paged=$matches[1]',
96
+ 'top'
97
+ );
98
+
99
+ // For /Blog page with Pagination
100
+ if( ampforwp_name_blog_page() ) {
101
+ add_rewrite_rule(
102
+ ampforwp_name_blog_page(). '/amp/'.$wp_rewrite->pagination_base.'/([0-9]{1,})/?$',
103
+ 'index.php?amp=1&paged=$matches[1]&page_id=' .ampforwp_get_the_page_id_blog_page(),
104
+ 'top'
105
+ );
106
+ // Pagination to work with Extensions like.hml
107
+ add_rewrite_rule(
108
+ ampforwp_name_blog_page(). '(.+?)/amp/'.$wp_rewrite->pagination_base.'/([0-9]{1,})/?$',
109
+ 'index.php?amp=1&paged=$matches[2]&page_id=' .ampforwp_get_the_page_id_blog_page(),
110
+ 'top'
111
+ );
112
+ }
113
+
114
+ // For Author pages
115
+ add_rewrite_rule(
116
+ 'author\/([^/]+)\/amp\/?$',
117
+ 'index.php?amp=1&author_name=$matches[1]',
118
+ 'top'
119
+ );
120
+ add_rewrite_rule(
121
+ 'author\/([^/]+)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
122
+ 'index.php?amp=1&author_name=$matches[1]&paged=$matches[2]',
123
+ 'top'
124
+ );
125
+
126
+ // For category pages
127
+ $rewrite_category = get_option('category_base');
128
+ if ( ! empty($rewrite_category) ) {
129
+ $rewrite_category = get_option('category_base');
130
+ } else {
131
+ $rewrite_category = 'category';
132
+ }
133
+
134
+ add_rewrite_rule(
135
+ $rewrite_category.'\/(.+?)\/amp/?$',
136
+ 'index.php?amp=1&category_name=$matches[1]',
137
+ 'top'
138
+ );
139
+ // For category pages with Pagination
140
+ add_rewrite_rule(
141
+ $rewrite_category.'/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
142
+ 'index.php?amp=1&category_name=$matches[1]&paged=$matches[2]',
143
+ 'top'
144
+ );
145
+
146
+ // For category pages with Pagination (Custom Permalink Structure)
147
+ $permalink_structure = get_option('permalink_structure');
148
+ $permalink_structure = preg_replace('/(%.*%)/', '', $permalink_structure);
149
+ $permalink_structure = preg_replace('/\//', '', $permalink_structure);
150
+ if ( $permalink_structure ) {
151
+ add_rewrite_rule(
152
+ $permalink_structure.'\/'.$rewrite_category.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
153
+ 'index.php?amp=1&category_name=$matches[1]&paged=$matches[2]',
154
+ 'top'
155
+ );
156
+ }
157
+
158
+ // For tag pages
159
+ $rewrite_tag = get_option('tag_base');
160
+ if ( ! empty($rewrite_tag) ) {
161
+ $rewrite_tag = get_option('tag_base');
162
+ } else {
163
+ $rewrite_tag = 'tag';
164
+ }
165
+ add_rewrite_rule(
166
+ $rewrite_tag.'\/(.+?)\/amp/?$',
167
+ 'index.php?amp=1&tag=$matches[1]',
168
+ 'top'
169
+ );
170
+ // For tag pages with Pagination
171
+ add_rewrite_rule(
172
+ $rewrite_tag.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
173
+ 'index.php?amp=1&tag=$matches[1]&paged=$matches[2]',
174
+ 'top'
175
+ );
176
+ // For tag pages with Pagination (Custom Permalink Structure)
177
+ if ( $permalink_structure ) {
178
+ add_rewrite_rule(
179
+ $permalink_structure.'\/'.$rewrite_tag.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
180
+ 'index.php?amp=1&tag=$matches[1]&paged=$matches[2]',
181
+ 'top'
182
+ );
183
+ }
184
+ // Rewrite rule for date archive with pagination #2289
185
+ add_rewrite_rule(
186
+ '([0-9]{4})/([0-9]{1,2})/amp/'.$wp_rewrite->pagination_base.'/?([0-9]{1,})/?$',
187
+ 'index.php?year=$matches[1]&monthnum=$matches[2]&amp=1&paged=$matches[3]',
188
+ 'top'
189
+ );
190
+ //Rewrite rule for custom Taxonomies
191
+ $args = array(
192
+ 'public' => true,
193
+ '_builtin' => false,
194
+ );
195
+ $output = 'names'; // or objects
196
+ $operator = 'and'; // 'and' or 'or'
197
+ $taxonomies = get_taxonomies( $args, $output, $operator );
198
+
199
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
200
+ if(!is_plugin_active('amp-woocommerce-pro/amp-woocommerce.php' )) {
201
+ if( class_exists( 'WooCommerce' ) ) {
202
+ $wc_permalinks = get_option( 'woocommerce_permalinks' );
203
+
204
+ if ( $wc_permalinks ) {
205
+ $taxonomies = array_merge($taxonomies, $wc_permalinks);
206
+ }
207
+ }
208
+ }
209
+ $post_types = ampforwp_get_all_post_types();
210
+ if ( $post_types ) {
211
+ foreach ($post_types as $post_type ) {
212
+ if ( 'post' != $post_type && 'page' != $post_type ){
213
+ add_rewrite_rule(
214
+ $post_type.'\/amp/?$',
215
+ 'index.php?amp&post_type='.$post_type,
216
+ 'top'
217
+ );
218
+ add_rewrite_rule(
219
+ $post_type.'\/amp/'.$wp_rewrite->pagination_base.'/([0-9]{1,})/?$',
220
+ 'index.php?amp=1&post_type='.$post_type.'&paged=$matches[1]',
221
+ 'top'
222
+ );
223
+ }
224
+ }
225
+ }
226
+ $taxonomies = apply_filters( 'ampforwp_modify_rewrite_tax', $taxonomies );
227
+ if ( $taxonomies ) {
228
+ foreach ( $taxonomies as $key => $taxonomy ) {
229
+ if ( ! empty( $taxonomy ) ) {
230
+ add_rewrite_rule(
231
+ $taxonomy.'\/(.+?)\/amp/?$',
232
+ 'index.php?amp&'.$key.'=$matches[1]',
233
+ 'top'
234
+ );
235
+ // For Custom Taxonomies with pages
236
+ add_rewrite_rule(
237
+ $taxonomy.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
238
+ 'index.php?amp&'.$taxonomy.'=$matches[1]&paged=$matches[2]',
239
+ 'top'
240
+ );
241
+ }
242
+ }
243
+ }
244
+ }
245
+ add_action( 'init', 'ampforwp_add_custom_rewrite_rules', 25 );
246
+ // add re-write rule for Products
247
+ add_action( 'init', 'ampforwp_custom_rewrite_rules_for_product_category' );
248
+ if ( ! function_exists('ampforwp_custom_rewrite_rules_for_product_category') ) {
249
+ function ampforwp_custom_rewrite_rules_for_product_category(){
250
+ if ( class_exists('WooCommerce') ) {
251
+ $permalinks = wp_parse_args( (array) get_option( 'woocommerce_permalinks', array() ), array(
252
+ 'product_base' => '',
253
+ 'category_base' => '',
254
+ 'tag_base' => '',
255
+ 'attribute_base' => '',
256
+ 'use_verbose_page_rules' => false,
257
+ ) );
258
+ // Ensure rewrite slugs are set.
259
+ $permalinks['product_rewrite_slug'] = untrailingslashit( empty( $permalinks['product_base'] ) ? _x( 'product', 'slug', 'accelerated-mobile-pages' ) : $permalinks['product_base'] );
260
+ $permalinks['category_rewrite_slug'] = untrailingslashit( empty( $permalinks['category_base'] ) ? _x( 'product-category', 'slug', 'accelerated-mobile-pages' ) : $permalinks['category_base'] );
261
+ $permalinks['tag_rewrite_slug'] = untrailingslashit( empty( $permalinks['tag_base'] ) ? _x( 'product-tag', 'slug', 'accelerated-mobile-pages' ) : $permalinks['tag_base'] );
262
+ $permalinks['attribute_rewrite_slug'] = untrailingslashit( empty( $permalinks['attribute_base'] ) ? '' : $permalinks['attribute_base'] );
263
+
264
+
265
+
266
+ add_rewrite_rule(
267
+ $permalinks['product_rewrite_slug']."\/amp\/page\/([0-9]{1,})/?$",
268
+ 'index.php?post_type=product&paged=$matches[1]&amp=1',
269
+ 'top'
270
+ );
271
+ add_rewrite_rule(
272
+ $permalinks['category_rewrite_slug'].'\/(.+?)\/amp\/page\/?([0-9]{1,})/?$',
273
+ 'index.php?product_cat=$matches[1]&paged=$matches[2]&amp=1',
274
+ 'top'
275
+ );
276
+ add_rewrite_rule(
277
+ $permalinks['category_rewrite_slug'].'\/(.+?)\/amp\/?$',
278
+ 'index.php?amp&product_cat=$matches[1]',
279
+ 'top'
280
+ );
281
+
282
+
283
+ add_rewrite_rule(
284
+ $permalinks['tag_rewrite_slug'].'\/(.+?)\/amp\/page\/?([0-9]{1,})/?$',
285
+ 'index.php?product_tag=$matches[1]&paged=$matches[2]&amp=1',
286
+ 'top'
287
+ );
288
+ add_rewrite_rule(
289
+ $permalinks['tag_rewrite_slug'].'\/(.+?)\/amp\/?$',
290
+ 'index.php?amp&product_tag=$matches[1]',
291
+ 'top'
292
+ );
293
+ }
294
+ }
295
+ }
296
+
297
+ function ampforwp_plugin_info(){
298
+ $data = array();
299
+ $date = new DateTime();
300
+ $data = array('activation_data' => $date->getTimestamp() );
301
+ add_option( 'ampforwp_plugin_info', $data );
302
+ }
303
+ add_action('upgrader_process_complete','ampforwp_plugin_info' );
304
+
305
+ register_activation_hook( __FILE__, 'ampforwp_rewrite_activation', 20 );
306
+ function ampforwp_rewrite_activation() {
307
+
308
+ if ( ! did_action( 'ampforwp_init' ) ) {
309
+ ampforwp_init();
310
+ }
311
+
312
+ flush_rewrite_rules();
313
+
314
+ ampforwp_add_custom_post_support();
315
+ ampforwp_add_custom_rewrite_rules();
316
+ ampforwp_plugin_info();
317
+
318
+ // Flushing rewrite urls ONLY on activation
319
+ global $wp_rewrite;
320
+ $wp_rewrite->flush_rules();
321
+
322
+ delete_option('ampforwp_rewrite_flush_option');
323
+
324
+ // Set transient for Welcome page
325
+ set_transient( 'ampforwp_welcome_screen_activation_redirect', true, 30 );
326
+
327
+ }
328
+
329
+ add_action( 'admin_init', 'ampforwp_flush_after_update');
330
+ function ampforwp_flush_after_update() {
331
+ // Flushing rewrite urls ONLY on after Update is installed
332
+ $older_version = "";
333
+ $older_version = get_transient('ampforwp_current_version_check');
334
+ if ( empty($older_version) || ( $older_version < AMPFORWP_VERSION ) ) {
335
+ flush_rewrite_rules();
336
+ global $wp_rewrite;
337
+ $wp_rewrite->flush_rules();
338
+ set_transient('ampforwp_current_version_check', AMPFORWP_VERSION);
339
+ }
340
+ }
341
+
342
+
343
+ add_action('init', 'ampforwp_flush_rewrite_by_option', 20);
344
+
345
+ function ampforwp_flush_rewrite_by_option(){
346
+
347
+ global $wp_rewrite;
348
+ $get_current_permalink_settings = "";
349
+
350
+ $get_current_permalink_settings = get_option('ampforwp_rewrite_flush_option');
351
+
352
+ if ( $get_current_permalink_settings ) {
353
+ return;
354
+ }
355
+ // Adding double check to make sure, we are not updating and calling database unnecessarily
356
+ if ( empty( $get_current_permalink_settings ) ) {
357
+ $wp_rewrite->flush_rules();
358
+ update_option('ampforwp_rewrite_flush_option', 'true');
359
+ }
360
+
361
+ }
362
+
363
+ register_deactivation_hook( __FILE__, 'ampforwp_rewrite_deactivate', 20 );
364
+ function ampforwp_rewrite_deactivate() {
365
+ // Flushing rewrite urls ONLY on deactivation
366
+ global $wp_rewrite;
367
+
368
+ foreach ( $wp_rewrite->endpoints as $index => $endpoint ) {
369
+ if ( AMP_QUERY_VAR === $endpoint[1] ) {
370
+ unset( $wp_rewrite->endpoints[ $index ] );
371
+ break;
372
+ }
373
+ }
374
+
375
+ flush_rewrite_rules();
376
+
377
+ $wp_rewrite->flush_rules();
378
+
379
+ // Remove transient for Welcome page
380
+ delete_transient( 'ampforwp_welcome_screen_activation_redirect');
381
+ }
382
+
383
+ if( !function_exists('ampforwp_upcomming_layouts_demo') ){
384
+ function ampforwp_upcomming_layouts_demo(){
385
+ return array(
386
+ array(
387
+ "name"=>'Creative Services',
388
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-9.png',
389
+ "link"=>'https://ampforwp.com/layouts-9/',
390
+ ),
391
+ array(
392
+ "name"=>'App',
393
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-8.png',
394
+ "link"=>'https://ampforwp.com/layouts-8/',
395
+ ),
396
+ array(
397
+ "name"=>'Business Blog',
398
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-7.png',
399
+ "link"=>'https://ampforwp.com/layouts-7/',
400
+ ),
401
+ array(
402
+ "name"=>'Journal',
403
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-6.png',
404
+ "link"=>'https://ampforwp.com/layouts-6/',
405
+ ),
406
+ array(
407
+ "name"=>'Studio',
408
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-5.png',
409
+ "link"=>'https://ampforwp.com/layouts-5/',
410
+ ),
411
+ array(
412
+ "name"=>'Agency',
413
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-4.png',
414
+ "link"=>'https://ampforwp.com/layouts-4/',
415
+ ),
416
+ array(
417
+ "name"=>'Elegance',
418
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-3.png',
419
+ "link"=>'https://ampforwp.com/layouts-3/',
420
+ ),
421
+ array(
422
+ "name"=>'Weekly Magazine',
423
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-2.png',
424
+ "link"=>'https://ampforwp.com/layouts-2/',
425
+ ),
426
+ array(
427
+ "name"=>'News',
428
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-1.png',
429
+ "link"=>'https://ampforwp.com/layouts-1/',
430
+ ),
431
+
432
+ );
433
+ }
434
+ }
435
+
436
+ require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
437
+ require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
438
+ add_action('after_setup_theme', 'ampforwp_include_options_file' );
439
+
440
+ function ampforwp_include_options_file(){
441
+ if ( is_admin() ) {
442
+ // Register all the main options
443
+ require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
444
+ require_once dirname( __FILE__ ).'/templates/report-bugs.php';
445
+ }
446
+ }
447
+
448
+ // Modules
449
+ add_action('after_setup_theme','ampforwp_add_module_files');
450
+ function ampforwp_add_module_files() {
451
+
452
+ global $redux_builder_amp;
453
+ if ( isset($redux_builder_amp['ampforwp-content-builder']) && $redux_builder_amp['ampforwp-content-builder'] ) {
454
+ if ( ! function_exists( 'bstw' ) ) {
455
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/tinymce-widget/tinymce-widget.php';
456
+ }
457
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-blurb.php';
458
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-button.php';
459
+ }
460
+ }
461
+
462
+ /*
463
+ * Load Files only in the backend
464
+ * As we don't need plugin activation code to run everytime the site loads
465
+ */
466
+ if ( is_admin() ) {
467
+ add_action( 'plugins_loaded', 'amp_update_db_check' );
468
+ // Include Welcome page only on Admin pages
469
+ require AMPFORWP_PLUGIN_DIR .'/includes/welcome.php';
470
+
471
+ // Add Settings Button in Plugin backend
472
+ if ( ! function_exists( 'ampforwp_plugin_settings_link' ) ) {
473
+
474
+ // Deactivate Parent Plugin notice
475
+ add_filter( 'plugin_action_links', 'ampforwp_plugin_settings_link', 10, 5 );
476
+
477
+ function ampforwp_plugin_settings_link( $actions, $plugin_file ) {
478
+ static $plugin;
479
+ if ( ! isset($plugin))
480
+ $plugin = plugin_basename(__FILE__);
481
+ if ( $plugin === $plugin_file ) {
482
+ $amp_activate = '';
483
+ if ( function_exists('amp_activate') ) {
484
+ $amp_activate = ' | <span style="color:black;">Status: Addon Mode</span style=>';
485
+ }
486
+ $settings = array( 'settings' => '<a href="admin.php?page=amp_options&tab=8">' . esc_html__('Settings', 'accelerated-mobile-pages') . '</a> | <a href="https://ampforwp.com/extensions/#utm_source=plugin-panel&utm_medium=plugin-extension&utm_campaign=features">' . esc_html__('Premium Features', 'accelerated-mobile-pages') . '</a> | <a href="https://ampforwp.com/membership/#utm_source=plugin-panel&utm_medium=plugin-extension&utm_campaign=pro">' . esc_html__('Pro', 'accelerated-mobile-pages') . '</a>'. $amp_activate );
487
+
488
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
489
+ $actions = array_merge( $actions, $settings );
490
+ }
491
+ return $actions;
492
+ }
493
+ }
494
+ } // is_admin() closing
495
+
496
+ // Fallback for file exists #3156
497
+ if( ! function_exists('ampforwp_require_file') ){
498
+ function ampforwp_require_file($path){
499
+ if(file_exists($path)){
500
+ return require_once $path;
501
+ }
502
+ else{
503
+ return false;
504
+ }
505
+ }
506
+ }
507
+
508
+ // AMP endpoint Verifier
509
+ function ampforwp_is_amp_endpoint() {
510
+ if ( ampforwp_is_non_amp() && ! is_admin()) {
511
+ return apply_filters('ampforwp_is_amp_endpoint_takeover', ampforwp_is_non_amp() );
512
+ }
513
+ else {
514
+ return apply_filters('ampforwp_is_amp_endpoint', false !== get_query_var( 'amp', false ) );
515
+ }
516
+ }
517
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
518
+ if ( ! class_exists( 'Ampforwp_Init', false ) ) {
519
+ class Ampforwp_Init {
520
+
521
+ public function __construct(){
522
+
523
+ require AMPFORWP_PLUGIN_DIR .'/includes/features/functions.php';
524
+ // Load Files required for the plugin to run
525
+ if( function_exists('amp_activate') ){
526
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/amp_bridge.php";
527
+ }
528
+ else{
529
+ require AMPFORWP_PLUGIN_DIR .'/includes/includes.php';
530
+ // Redirection Code added
531
+ require AMPFORWP_PLUGIN_DIR.'/includes/redirect.php';
532
+
533
+ require AMPFORWP_PLUGIN_DIR .'/classes/class-init.php';
534
+ new Ampforwp_Loader();
535
+
536
+ }
537
+ //Other Features
538
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/advertisement/ads-functions.php";
539
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/performance/performance-functions.php";
540
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/analytics/analytics-functions.php";
541
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/structure-data/structured-data-functions.php";
542
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/notice-bar/notice-bar-functions.php";
543
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/push-notification/push-notification-functions.php";
544
+ }
545
+ }
546
+ }
547
+ /*
548
+ * Start the plugin.
549
+ * Gentlemen start your engines
550
+ */
551
+ function ampforwp_plugin_init() {
552
+
553
+ if ( defined( 'AMPFORWP__FILE__' ) && defined('AMPFORWP_PLUGIN_DIR') ) {
554
+ new Ampforwp_Init();
555
+ }
556
+ }
557
+ add_action('init','ampforwp_plugin_init', 9);
558
+
559
+ /*
560
+ * customized output widget
561
+ * to be used be used in before or after Loop
562
+ */
563
+ ampforwp_require_file( AMPFORWP_PLUGIN_DIR.'/templates/category-widget.php' );
564
+ ampforwp_require_file( AMPFORWP_PLUGIN_DIR.'/templates/woo-widget.php' );
565
+
566
+
567
+ /*
568
+ * Including core AMP plugin files and removing any other things if necessary
569
+ */
570
+ function ampforwp_bundle_core_amp_files(){
571
+ // Bundling Default plugin
572
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/amp/amp.php';
573
+
574
+ define( 'AMPFORWP__FILE__', __FILE__ );
575
+ if ( ! defined('AMP__VENDOR__DIR__') ) {
576
+ define( 'AMP__VENDOR__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
577
+ }
578
+ if ( ! defined('AMP_QUERY_VAR') ){
579
+ define('AMP_QUERY_VAR', 'amp');
580
+ }
581
+ define( 'AMP__VENDOR__VERSION', '0.4.2' );
582
+ require_once( AMP__VENDOR__DIR__ . '/back-compat/back-compat.php' );
583
+ require_once( AMP__VENDOR__DIR__ . '/includes/amp-helper-functions.php' );
584
+ require_once( AMP__VENDOR__DIR__ . '/includes/admin/functions.php' );
585
+ require_once( AMP__VENDOR__DIR__ . '/includes/settings/class-amp-customizer-settings.php' );
586
+ require_once( AMP__VENDOR__DIR__ . '/includes/settings/class-amp-customizer-design-settings.php' );
587
+ // Widgets
588
+ require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-categories.php' );
589
+ require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-archives.php' );
590
+ require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-media-video.php' );
591
+ require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-recent-comments.php' );
592
+ require_once ( AMP__VENDOR__DIR__ . '/includes/widgets/class-amp-widget-text.php' );
593
+
594
+ }
595
+ add_action('plugins_loaded','ampforwp_bundle_core_amp_files', 8);
596
+
597
+ if ( ! function_exists('ampforwp_init') ) {
598
+ add_action( 'init', 'ampforwp_init' );
599
+ function ampforwp_init() {
600
+ if ( false === apply_filters( 'amp_is_enabled', true ) ) {
601
+ return;
602
+ }
603
+ if( ! defined('AMP_QUERY_VAR')){
604
+ define( 'AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
605
+ }
606
+
607
+ if ( ! defined('AMP__VENDOR__DIR__') ) {
608
+ define( 'AMP__VENDOR__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
609
+ }
610
+
611
+ do_action( 'amp_init' );
612
+
613
+ load_plugin_textdomain( 'accelerated-mobile-pages', false, trailingslashit(AMPFORWP_PLUGIN_DIR) . 'languages' );
614
+
615
+ add_rewrite_endpoint( AMP_QUERY_VAR, EP_PERMALINK );
616
+ add_post_type_support( 'post', AMP_QUERY_VAR );
617
+
618
+ add_filter( 'request', 'AMPforWP\\AMPVendor\\amp_force_query_var_value' );
619
+ add_action( 'wp', 'AMPforWP\\AMPVendor\\amp_maybe_add_actions');
620
+
621
+ // Redirect the old url of amp page to the updated url. #1033 (Vendor Update)
622
+ add_filter( 'old_slug_redirect_url', 'ampforwp_redirect_old_slug_to_new_url' );
623
+
624
+ if ( class_exists( 'Jetpack' ) && ! (defined( 'IS_WPCOM' ) && IS_WPCOM) && ( defined('JETPACK__VERSION') && JETPACK__VERSION < 6.9 ) ) {
625
+ require_once( AMP__VENDOR__DIR__ . '/jetpack-helper.php' );
626
+ }
627
+ // AMP by Automattic Compatibility #2287
628
+ // Remove the FrontPage query added by AMP to make our FrontPage/Homepage works
629
+ if ( function_exists('amp_activate') ) {
630
+ remove_action( 'parse_query', 'amp_correct_query_when_is_front_page' );
631
+ remove_action( 'wp', 'amp_maybe_add_actions' );
632
+ }
633
+ }
634
+ }
635
+
636
+
637
+ function amp_update_db_check() {
638
+ global $redux_builder_amp;
639
+ $ampforwp_current_version = AMPFORWP_VERSION;
640
+ if ( isset( $_GET['ampforwp-dismiss-theme'] ) && trim( $_GET['ampforwp-dismiss-theme']) === "ampforwp_dismiss_admin_notices" && wp_verify_nonce($_GET['ampforwp_notice'], 'ampforwp_notice') ) {
641
+ update_option( 'ampforwp_theme_notice', true );
642
+ wp_redirect("admin.php?page=amp_options");
643
+ }
644
+ if ( get_option( 'AMPforwp_db_version' ) !== $ampforwp_current_version ) {
645
+
646
+ if ( isset( $_GET['ampforwp-dismiss'] ) && trim( $_GET['ampforwp-dismiss']) === "ampforwp_dismiss_admin_notices" && wp_verify_nonce($_GET['ampforwp_notice'], 'ampforwp_notice') ) {
647
+ update_option( 'AMPforwp_db_version', $ampforwp_current_version );
648
+ wp_redirect(remove_query_arg('ampforwp-dismiss'), 301);
649
+ }
650
+ if ( isset($redux_builder_amp['ampforwp-update-notification-bar'] ) && $redux_builder_amp['ampforwp-update-notification-bar'] && current_user_can( 'manage_options' ) ) {
651
+
652
+ add_action('admin_notices', 'ampforwp_update_notice');
653
+ }
654
+ }
655
+ }
656
+
657
+
658
+ // Admin notice for AMP WordPress Theme
659
+ add_action('admin_notices', 'ampforwp_ampwptheme_notice');
660
+ function ampforwp_ampwptheme_notice() {
661
+ $theme = '';
662
+ $theme = wp_get_theme(); // gets the current theme
663
+
664
+ if ( ('AMP WordPress Theme' == $theme->name || 'AMP WordPress Theme' == $theme->parent_theme) && true != get_option('ampforwp_theme_notice') ) {
665
+ add_thickbox(); ?>
666
+ <div id="some" class="notice-warning settings-error notice is-dismissible">
667
+ <span style="margin: 0.5em 0.5em 0 0"><?php echo esc_html__('AMP WordPress Theme is installed', 'accelerated-mobile-pages'); ?></span><br>
668
+ <span style="margin: 0.5em 0.5em 0 0"><?php echo esc_html__('One Last Step Required:', 'accelerated-mobile-pages'); ?> <a href="#TB_inline?width=600&height=550&inlineId=my-content-id" class="thickbox"><?php echo esc_html__('Finish Setup', 'accelerated-mobile-pages') ?></a></span><br>
669
+ </div>
670
+ <div id="my-content-id" style="display:none;">
671
+ <p>
672
+ <iframe width="100%" height="480" src="https://www.youtube.com/embed/" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
673
+ <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'ampforwp-dismiss-theme', 'ampforwp_dismiss_admin_notices' ), 'ampforwp_notice', 'ampforwp_notice' ) ) ?>"><?php echo esc_html__('Take me to the Options Panel', 'accelerated-mobile-pages'); ?></a>
674
+ </p>
675
+ </div>
676
+ <?php }
677
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
678
+
679
+ $amp_plugin_manager_version = array();
680
+
681
+ $plugin_manager_active = is_plugin_active('amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php');
682
+ $amp_plugin_manager_active = is_plugin_active('plugin-manager/ampforwp-3rd-party-plugin-creator.php');
683
+
684
+ if ( $plugin_manager_active) {
685
+ $amp_plugin_manager = get_plugin_data(AMPFORWP_MAIN_PLUGIN_DIR.'/amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php');
686
+ $amp_plugin_manager_version = $amp_plugin_manager['Version'];
687
+ }
688
+ if ( $amp_plugin_manager_active) {
689
+ $plugin_manager = get_plugin_data(AMPFORWP_MAIN_PLUGIN_DIR.'/plugin-manager/ampforwp-3rd-party-plugin-creator.php');
690
+ $amp_plugin_manager_version = $plugin_manager['Version'];
691
+ }
692
+
693
+ if ( $plugin_manager_active || $amp_plugin_manager_active ) {
694
+ $screen = get_current_screen();
695
+ if ( '1.0' == $amp_plugin_manager_version && 'plugins' === $screen->base) { ?>
696
+ <div id="ampforwp_pluginmanager" class="notice-warning settings-error notice is-dismissible"><p><b><?php echo esc_html__(' Attention','accelerated-mobile-pages'); ?>:</b> <?php echo esc_html__(' AMPforWP Plugin Manager requires an upgrade. Please','accelerated-mobile-pages'); ?> <b><a href="https://ampforwp.com/plugins-manager/?update=plugins-manager#utm_source=plugin-page&utm_medium=plugin-manager-update&utm_campaign=update-notice" target="_blank"><?php echo esc_html__('Download &amp; install the latest version', 'accelerated-mobile-pages'); ?></a></b> <?php echo esc_html__('for free','accelerated-mobile-pages'); ?>.
697
+ </p>
698
+ </div>
699
+ <?php }
700
+ }
701
+
702
+ // AMP with AMPforWP notice #2287
703
+ if ( function_exists('amp_activate') ) { ?>
704
+ <div class="notice-warning settings-error notice is-dismissible"><p><?php echo esc_html__('AMP by Automattic is activated so the AMPforWP is now in the "Addon Mode". ','accelerated-mobile-pages') ?><a href="https://ampforwp.com/tutorials/article/guide-to-amp-by-automattic-compatibility-in-ampforwp/" target="_blank"><?php echo esc_html__('Learn More','accelerated-mobile-pages'); ?></a></p></div>
705
+ <?php }
706
+ }
707
+
708
+ function ampforwp_update_notice() {
709
+ $screen = '';
710
+ $screen = get_current_screen();
711
+ $ampforwp_current_version = AMPFORWP_VERSION;
712
+ if ( 'toplevel_page_amp_options' == $screen->base ) { ?>
713
+ <div class="notice-success notice is-dismissible amp-update-notice">
714
+ <div class="amp-update-notice-text-box">
715
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAn1BMVEUAAADuHCXwHiTuHSTtHST/IjjuHSXuHCTvHSXvHCXwHi3/JyfuHSTuHCTvHSTvHCTxHSb/NDTyHyj0IyruHSTvHSXvHSbuHST1ICftHCXuHCXuHSXwHiXvHyfuHSTuHSTvHSXuHCTuHCTuHCTuHCTvHSXyHibuHCTuHCXuHCXuHCXuHibwICjuHCTuHCTuHSTwHSbuHCXuHCTuHCTtHCSisK2PAAAANHRSTlMA+1T35wiIxm9kEQzu4Yx/NgQlFZV6PrAa16RpUi7MhE3y3LmYXynrz5FYSSC9q55EddGypVN9ggAABlxJREFUeNrVm+mymkAQhQfZBVQEFNz3fbtm3v/ZYqUqyWww0603Vfn+mcr1wMz06QUk/yfZIPRua79KYst2Vgd/fS9aU5f8E6JFx4+pktWPryn5VtKH51u0kXgY9Mk30cv31IhZkH1e/VJU1BzrR+uzJ2I6sigQ5yv63NoPKYa42/6M/JpiWXrvr0I7p+/gnN7U3+7pm1x3BM/Op+9je+iACO2mI+aPcq8ItmHQ7WyGVVOUHHDWFI1qN3Y0HmSiSfYX3atddxhPmNCv1As6HNdvqvuYP6mSDXgbTsq78cdt7YV3HOU2lDD9QBnVZnuZnlXOkYAOwlzjaxjv3PfMs+5dvvsiAh6hofwdD1P9GxUZlQTMeSXlyAkxQrr/6kEwuF1bDKEBav87aCfrH8SDNIWf/3hB8Lgb0cMu2vgXI/9C3uK0FArXTHN4hW27p+RNdomQHZv9vxK2Hyf6ODIfSuE7u6QBIf984fQnNuc5bSGpN4RCSDlCnH7L2ghH8cofxKx2u2z+/rH6SSTu7IyyrEkN/if2f2JROXAz3hW3NfUff/7R+iNVX+Nwm6DMa+09F/8pVn+v3OIeV7PlRAFnWvEFq09PJg7bU1wiZVmg9YekBi4/z4jEmjuAaP24rG1xOEtsNS5A5eL0m73jwdWIjQv0QOtfjX32LCQhrv5B69uNZ7dcsmFWf3HLEqtPA0CtMeB8go3SAuW/8l3JpFWdIResBURYfZvpmfRma7ELXbH5GqNv+JdpIiY7OQaXbaz+08C9x4zS8+8/s1MQD6tvmXQ+LpuUpn8Whk1Dfbg+5Mo93m9li/Kx+isz99yx/arqqsZgfS6s9bDF0UWuhOw2Uj8HNP5i0RkxLjRE6ifG5pHJnr9A70DLklKLHqZfdMgvOvQvO5g+Jn3Jcj5zSTh9B3JyFlJ5HDObgtKnLQKAPXKeeCrGEH3syZ0JZ37A5mi4vroMNCyMKrEhzAD66BayYFJyyvtgjNHfp1DzFDLPjUkEAH18ATMVStO1HAR6fZbVpvPi+CJ/sXlxPzaNdF22PeBtIAfoa0garsDmz08lhCVeX+7+1DDlR/D6mGjqYZy+U1ce8Ipd3giDt/SNu9snv+aWaM14fRNvEE6dcCQ+pT829eLj66Oj2YIP6/PHfv76uOKOBF7f/D4Svjk5mM4lBjh9mSWzVvyR2DS2Vas6Reh4VahI1oYlad9MvwCVpRP+AUnV2FXNPqAvFSBSem7AnXS9X8xfdF/kPhPCZq21VIBI6RlGeeD158CyOBbTs2yg+uUEd9Y/hALEfWc4UcL1SSIOpFfs8xQgZ4i+HE2FuCQ2dEK5BuuTUNryL/yIcgLV52tQ2pYmRHOQftuB6xNHHlnH7OAIwh124dLtdhRz4ilA/4FZuFwxLw5wg/ooAenLAzErUgyOHPM+54hxj4lyIDaTl0VPDzVbvikLp0CaIetxK4x+31IOxDJL7Cj0zIH68pOxG5cfoIOyqYXRL+2azNeiwEhMZ6jHu0da09a7DnAJCpR+adcG/BcFBULfZupfXAjYJW8qjB0bzJ19lP656eltF1LZjVH6LlvXWxcxsS3Z5WmuDS9LjD6ZNz+c9yjDoXET1rr+T99YWfItRg6lZj3SFqWfcd9/1L5BdKr/phiqLz8cd5STtStlWO6aYikE63eF29O/w5KUNfkUpR8avczkUZaqrS4DMfoLi5oEmcs3Wr4qFO4Y/YFtOEDoL/mVilRl4BauH1OWofm7dLNMKgMR+gtbM0PlCwaOlWCYR4R+yOy/8IRXfwyo0+NfBjq9GX96By8TymExf+A+wfrZWtDP9al+T3mGf/asAOsPHMpzMym3l5Qnefy+Nmj+nVOBq2vUcVma14rRLxbPItM3IqnAMkih8uWNSvoZwDlEqm0Kkj8yNyH5mp6pQyWSsWvc/2xkeXoDTV8uKyrjeDuTlmFxs6hMDg3gK+hnZPIP0iQ7QVqYzKGziGpWPhw5VEnCGCrcRWSs2Yj/gWM2CDs/WA9VexneR9XY+9XTn1VJrPlvAUGzdejbXHcf/KkZ/sdmeHozisc6RuR9Wges/L1PPsPZR8jb+YV8jsHagsnvOyX5LOXX0/zmb4uUfAPTTmKy8wY/SMNzEdxW9ulzRL6bXegpfuAY+/diAb51PGn/3AqDrpcf58V4Oxlk5H/lJxdt5e+wtfWRAAAAAElFTkSuQmCC" width="128" height="128" />
716
+ <div class="amp-update-notice-text"> <?php echo esc_html__('AMP has been updated to '.$ampforwp_current_version, 'accelerated-mobile-pages' ); ?></div>
717
+ <a href="https://ampforwp.com/new/" target="_blank" href="admin.php?page=acmforwp_update"><?php echo esc_html__('What\'s New ?', 'accelerated-mobile-pages');?></a>
718
+ </div>
719
+ <div class="amp-update-notice-dismiss">
720
+ <a title="Close this Notification" href="<?php echo esc_url( wp_nonce_url(add_query_arg( 'ampforwp-dismiss', 'ampforwp_dismiss_admin_notices' ), 'ampforwp_notice', 'ampforwp_notice') ) ?>">X</a>
721
+ </div>
722
+ <div class="amp-update-notice-review-box">
723
+ <a class="star_icon" href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages?rate=5#new-post" target="_blank"> <?php echo esc_html__('Appreciate it?','accelerated-mobile-pages')?> <br> <span title="Give Us 5 Star"><?php echo esc_html__('Leave a Review', 'accelerated-mobile-pages') ?> →</span></a>
724
+ </div>
725
+ </div>
726
+ <?php }
727
+ }
728
+ if ( ! defined('AMP_FRAMEWORK_COMOPNENT_DIR_PATH') ) {
729
+ define('AMP_FRAMEWORK_COMOPNENT_DIR_PATH', AMPFORWP_PLUGIN_DIR ."/components");
730
+ }
731
+ require_once( AMP_FRAMEWORK_COMOPNENT_DIR_PATH . '/components-core.php' );
732
+ require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
733
+ if ( !function_exists('amp_activate') ) {
734
+ require_once( AMPFORWP_PLUGIN_DIR. 'base_remover/base_remover.php' );
735
+ require_once( AMPFORWP_PLUGIN_DIR. 'includes/thirdparty-compatibility.php' );
736
+ $enablePb = false;
737
+ if(is_admin()){
738
+ global $pagenow;
739
+ if( ('post.php' || 'post-new.php') == $pagenow ) {
740
+ $enablePb = true;
741
+ }
742
+ }else{
743
+ $enablePb = true;
744
+ }
745
+ if ($enablePb && ampforwp_get_setting('ampforwp-pagebuilder')== true ){
746
+ require_once( AMPFORWP_PLUGIN_DIR. 'pagebuilder/amp-page-builder.php');
747
+ }
748
+ }
749
+ if(is_admin()){
750
+ require_once( AMPFORWP_PLUGIN_DIR. 'includes/modules-upgrade.php' );
751
+ }
752
+
753
+ /**
754
+ * Redirects the old AMP URL to the new AMP URL.
755
+ * If post slug is updated the amp page with old post slug will be redirected to the updated url.
756
+ *
757
+ * @param string $link New URL of the post.
758
+ *
759
+ * @return string $link URL to be redirected.
760
+ */
761
+ if ( ! function_exists( 'ampforwp_redirect_old_slug_to_new_url' ) ) {
762
+ function ampforwp_redirect_old_slug_to_new_url( $link ) {
763
+
764
+ if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
765
+ $link = trailingslashit( trailingslashit( $link ) . AMPFORWP_AMP_QUERY_VAR );
766
+ }
767
+
768
+ return $link;
769
+ }
770
+ }
771
+
772
+ // Hide Post Builder if Swift is enabled
773
+ add_filter('amp_customizer_is_enabled', 'ampforwp_customizer_is_enabled');
774
+ if ( ! function_exists('ampforwp_customizer_is_enabled') ) {
775
+ function ampforwp_customizer_is_enabled($value){
776
+ global $redux_builder_amp;
777
+ if ( 4 == ampforwp_get_setting('amp-design-selector') && ! function_exists('amp_activate') ) {
778
+ $value = false;
779
+ }
780
+ return $value;
781
+ }
782
+ }
783
+
784
+ // Get Settings from Redux #2177 & #2911
785
+ function ampforwp_get_setting( $opt_name='', $child_option='', $sanitize_method='' ){
786
+ global $redux_builder_amp;
787
+ if(empty($redux_builder_amp)){
788
+ $redux_builder_amp = (array) get_option('redux_builder_amp');
789
+ }
790
+ $opt_value = '';
791
+ if ( isset($redux_builder_amp[$opt_name]) ) {
792
+ $opt_value = $redux_builder_amp[$opt_name];
793
+ if ( '' !== $child_option && isset($redux_builder_amp[$opt_name][$child_option]) ){
794
+ $opt_value = $redux_builder_amp[$opt_name][$child_option];
795
+ }
796
+ }
797
+ if ( '' !== $sanitize_method && function_exists($sanitize_method) ){
798
+ return $sanitize_method($opt_value);
799
+ }
800
+ return $opt_value;
801
+ }
802
+
803
+ // Register widgets
804
+ add_action('amp_init', 'ampforwp_widgets');
805
+ function ampforwp_widgets(){
806
+ add_action( 'widgets_init', 'ampforwp_register_widgets' );
807
+ }
808
+ function ampforwp_register_widgets() {
809
+ global $wp_widget_factory;
810
+ foreach ( $wp_widget_factory->widgets as $registered_widget ) {
811
+ $registered_widget_class_name = get_class( $registered_widget );
812
+ if ( ! preg_match( '/^WP_Widget_(.+)$/', $registered_widget_class_name, $matches ) ) {
813
+ continue;
814
+ }
815
+ $amp_class_name = 'AMP_Widget_' . $matches[1];
816
+ if ( ! class_exists( $amp_class_name ) || is_a( $amp_class_name, $registered_widget_class_name ) ) {
817
+ continue;
818
+ }
819
+
820
+ unregister_widget( $registered_widget_class_name );
821
+ register_widget( $amp_class_name );
822
+ }
823
+ }
824
+ // Post Types
825
+ function ampforwp_get_all_post_types(){
826
+ global $redux_builder_amp;
827
+ $post_types = array();
828
+ $selected_post_types = array();
829
+
830
+ if( ampforwp_get_setting('amp-on-off-for-all-posts') ){
831
+ $post_types['post'] = 'post';
832
+ }
833
+ if( ampforwp_get_setting('amp-on-off-for-all-pages') ){
834
+ $post_types['page'] = 'page';
835
+ }
836
+ if( ampforwp_get_setting('ampforwp-archive-support') && ampforwp_get_setting('ampforwp-archive-support-cat') ){
837
+ $post_types['category'] = 'category';
838
+ }
839
+
840
+ if ( ampforwp_get_setting('ampforwp-custom-type')) {
841
+ foreach (ampforwp_get_setting('ampforwp-custom-type') as $key) {
842
+ $selected_post_types[$key] = $key;
843
+ }
844
+ $post_types = array_merge($post_types, $selected_post_types);
845
+ }
846
+
847
+ return $post_types;
848
+ }
849
+
850
+ // is_search_enabled_in_ampforwp function ( Design 1,2 and 3 ) #2681
851
+ if( !function_exists( 'is_search_enabled_in_ampforwp' ) ) {
852
+ function is_search_enabled_in_ampforwp() {
853
+ if( ( ampforwp_get_setting('amp-design-selector')==1 && ampforwp_get_setting('amp-design-1-search-feature') ) ||
854
+ ( ampforwp_get_setting('amp-design-selector')==2 && ampforwp_get_setting('amp-design-2-search-feature') ) ||
855
+ ( ampforwp_get_setting('amp-design-selector')==3 && ampforwp_get_setting('amp-design-3-search-feature') ) ) {
856
+ return true;
857
+ }
858
+ return false;
859
+ }
860
+ }
861
+ // Fallback for Redux class #2377
862
+ add_action('after_setup_theme', 'ampforwp_redux_class' );
863
+ function ampforwp_redux_class(){
864
+ if ( !class_exists('Redux') && class_exists('ReduxCore\\ReduxFramework\\Redux') ) {
865
+ class Redux extends ReduxCore\ReduxFramework\Redux
866
+ {
867
+ # Do nothing, it will inherit all the methods
868
+ }
869
+ }
870
+ }
871
+ add_filter('plugin_row_meta' , 'ampforwp_add_plugin_meta_links', 10, 2);
872
+ if ( ! function_exists('ampforwp_add_plugin_meta_links') ) {
873
+ function ampforwp_add_plugin_meta_links($meta_fields, $file) {
874
+ if ( plugin_basename(__FILE__) == $file ) {
875
+ $plugin_url = "https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/?rate=5#new-post";
876
+ $meta_fields[] = "<a href='" . esc_url($plugin_url) ."' target='_blank' title='" . esc_html__('Rate', 'accelerated-mobile-pages') . "'>
877
+ <i class='ampforwp-rate-stars'>"
878
+ . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
879
+ . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
880
+ . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
881
+ . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
882
+ . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
883
+ . "</i></a>";
884
+
885
+ }
886
+
887
+ return $meta_fields;
888
+ }
889
+ }
890
+ // AMPforWP Global Data variable
891
+ $ampforwp_data = array();
892
+
893
+ // color sanitizer
894
+ function ampforwp_sanitize_color( $color ) {
895
+ if ( empty( $color ) || is_array( $color ) )
896
+ return 'rgba(0,0,0,0)';
897
+ // If string does not start with 'rgba', then treat as hex
898
+ // sanitize the hex color and finally convert hex to rgba
899
+ if ( false === strpos( $color, 'rgba' ) ) {
900
+ return sanitize_hex_color( $color );
901
+ }
902
+ // By now we know the string is formatted as an rgba color so we need to further sanitize it.
903
+ $color = str_replace( ' ', '', $color );
904
+ sscanf( $color, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha );
905
+ return 'rgba('.$red.','.$green.','.$blue.','.$alpha.')';
906
+ }
907
+
908
+ // AMP Plugins Manager compatibility #2976
909
+ if ( false == get_transient('ampforwp-pm-disabler') ) {
910
+ $ampforwp_active_plugins = array_flip(get_option('active_plugins'));
911
+ if (isset($ampforwp_active_plugins['amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php'] ) ){
912
+ $plugin_data = get_plugin_data(AMPFORWP_MAIN_PLUGIN_DIR . 'amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php' );
913
+ if ( version_compare( floatval( $plugin_data['Version'] ), '1.1', '<' ) ){
914
+ unset($ampforwp_active_plugins['amp-plugin-manager/ampforwp-3rd-party-plugin-creator.php']);
915
+ update_option('active_plugins', array_flip($ampforwp_active_plugins));
916
+ set_transient('ampforwp-pm-disabler', true);
917
+ include_once( ABSPATH . 'wp-includes/pluggable.php' );
918
+ wp_redirect(admin_url('plugins.php'));
919
+ }
920
+ }
921
+ elseif(isset($ampforwp_active_plugins['amp-plugin-manager-master/ampforwp-3rd-party-plugin-creator.php'] )){
922
+ $plugin_data = get_plugin_data(AMPFORWP_MAIN_PLUGIN_DIR . 'amp-plugin-manager-master/ampforwp-3rd-party-plugin-creator.php' );
923
+ if ( version_compare( floatval( $plugin_data['Version'] ), '1.1', '<' ) ){
924
+ unset($ampforwp_active_plugins['amp-plugin-manager-master/ampforwp-3rd-party-plugin-creator.php']);
925
+ update_option('active_plugins', array_flip($ampforwp_active_plugins));
926
+ set_transient('ampforwp-pm-disabler', true);
927
+ include_once( ABSPATH . 'wp-includes/pluggable.php' );
928
+ wp_redirect(admin_url('plugins.php'));
929
+ }
930
+ }
931
+
932
+ }
933
+ add_action('admin_notices', 'ampforwp_plugins_manager_notice');
934
+ function ampforwp_plugins_manager_notice(){
935
+ if ( true == get_transient('ampforwp-pm-disabler') ) { ?>
936
+ <div id="ampforwp_pluginmanager" class="notice-warning settings-error notice is-dismissible"><p><b><?php echo esc_html__('Attention: ','accelerated-mobile-pages');?></b><?php echo esc_html__('AMPforWP Plugin Manager has been deactivated and requires an upgrade. Please','accelerated-mobile-pages');?> <b><a target="_blank" href=<?php echo esc_url('https://ampforwp.com/plugins-manager/?update=plugins-manager#utm_source=plugin-page&utm_medium=plugin-manager-update&utm_campaign=update-notice');?>><?php echo esc_html__('Download &amp; install the latest version','accelerated-mobile-pages');?></a></b><?php echo esc_html__(' for free.','accelerated-mobile-pages');?>
937
+ </p>
938
+ </div>
939
+ <?php
940
+ }
941
+ }
942
+ add_action( 'activate_plugin', 'ampforwp_delete_plugins_manager_transient' );
943
+ function ampforwp_delete_plugins_manager_transient($plugin){
944
+ if ( strpos($plugin, 'ampforwp-3rd-party-plugin-creator.php') || strpos($plugin, 'accelerated-moblie-pages.php') ) {
945
+ delete_transient( 'ampforwp-pm-disabler' );
946
+ }
947
+ }
948
+ // Infinite scroll/ amp-next-page #2244
949
+ add_action('pre_amp_render_post', 'ampforwp_initialise_classes');
950
+ if ( ! function_exists('ampforwp_initialise_classes') ) {
951
+ function ampforwp_initialise_classes(){
952
+ if ( true == ampforwp_get_setting('ampforwp-infinite-scroll') ) {
953
+ require AMPFORWP_PLUGIN_DIR .'/classes/class-ampforwp-infinite-scroll.php';
954
+ }
955
+ }
956
+ }
957
+
958
+ // Data Consent
959
+ function ampforwp_get_data_consent(){
960
+ global $redux_builder_amp;
961
+ $dboc = false;
962
+ $is_dboc = '';
963
+ if(isset($redux_builder_amp['amp-gdpr-compliance-switch']) && $redux_builder_amp['amp-gdpr-compliance-switch'] ){
964
+
965
+ $dboc = true;
966
+ }
967
+ return $dboc;
968
+ }
969
+
970
+ //Levelup Compatibility
971
+ function ampforwp_levelup_compatibility($type='levelup_theme_and_elementor_check'){
972
+ //check theme
973
+ $returnVal = false;
974
+ switch($type){
975
+ case 'levelup_theme':
976
+ if(function_exists('levelup_theme_is_active')){
977
+ $returnVal = levelup_theme_is_active();
978
+ }
979
+ break;
980
+ case 'levelup_elementor':
981
+ if(function_exists('levelup_has_enable_elementor_builder')){
982
+ $returnVal = levelup_has_enable_elementor_builder();
983
+ }
984
+ break;
985
+ case 'levelup_theme_and_elementor':
986
+ if(function_exists('levelup_theme_is_active') && function_exists('levelup_has_enable_elementor_builder')){
987
+ $returnVal = levelup_theme_is_active() && levelup_has_enable_elementor_builder();
988
+ }
989
+ break;
990
+ case 'hf_builder_foot':
991
+ if(function_exists('levelup_check_hf_builder')){
992
+ $returnVal = levelup_check_hf_builder('foot');
993
+ }
994
+ break;
995
+ case 'hf_builder_head':
996
+ if(function_exists('levelup_check_hf_builder')){
997
+ $returnVal = levelup_check_hf_builder('head');
998
+ }
999
+ break;
1000
+ }
1001
+ return $returnVal;
1002
+ }
1003
+
1004
+ function ampforwp_amp_consent_check($attrs){
1005
+
1006
+ if( ampforwp_get_data_consent() ){
1007
+ $attrs['data-block-on-consent'] = '';
1008
+ }
1009
+ $attrs = apply_filters( 'ampforwp_embedd_attrs_handler', $attrs );
1010
+ return $attrs;
1011
+ }
1012
+
1013
+ // Fallback for Class AMP_Content sanitizer #2287
1014
+ add_action('pre_amp_render_post', 'ampforwp_vendor_amp_fallbacks');
1015
+ function ampforwp_vendor_amp_fallbacks(){
1016
+ if ( ! class_exists('AMP_Content') ) {
1017
+ class AMP_Content extends AMPforWP\AMPVendor\AMP_Content{}
1018
+ }
1019
+ }
1020
+ // Class AMP_Blacklist_Sanitizer #2287
1021
+ add_action('plugins_loaded', 'ampforwp_sanitizers_loader');
1022
+ function ampforwp_sanitizers_loader(){
1023
+ if ( ! class_exists('AMP_Blacklist_Sanitizer') ) {
1024
+ if(defined('AMP__VENDOR__DIR__')){
1025
+ $amp_blacklist_sanitizer = realpath( AMP__VENDOR__DIR__ . 'includes/sanitizers/class-amp-blacklist-sanitizer.php') ;
1026
+ require_once $amp_blacklist_sanitizer;
1027
+ class AMP_Blacklist_Sanitizer extends AMPforWP\AMPVendor\AMP_Blacklist_Sanitizer{}
1028
+ }
1029
+ }
1030
+ }
1031
+ // is_amp_endpoint Fallback #2287 #3055
1032
+ add_action('parse_query','ampforwp_vendor_is_amp_endpoint');
1033
+ function ampforwp_vendor_is_amp_endpoint(){
1034
+ if ( ! function_exists('amp_activate') && ! function_exists('is_amp_endpoint' ) ) {
1035
+ function is_amp_endpoint(){
1036
+ return false !== get_query_var( AMP_QUERY_VAR, false );
1037
+ }
1038
+ }
1039
+ }
1040
+
1041
+ // ampforwp_exclude_posts function #3118
1042
+ if ( ! function_exists('ampforwp_exclude_posts') ) {
1043
+ function ampforwp_exclude_posts(){
1044
+ $exclude_post_values = array();
1045
+ $ampforwp_exclude_post_transient = get_transient('ampforwp_exclude_post_transient');
1046
+ if ( false != $ampforwp_exclude_post_transient ) {
1047
+ $exclude_post_values = $ampforwp_exclude_post_transient;
1048
+ }
1049
+ else{
1050
+ $ampforwp_exclude_post = get_option('ampforwp_exclude_post');
1051
+ if ( false != $ampforwp_exclude_post ) {
1052
+ $exclude_post_values = $ampforwp_exclude_post;
1053
+ }
1054
+ }
1055
+ return $exclude_post_values;
1056
+ }
1057
  }
base_remover/base_remover.php CHANGED
@@ -1,111 +1,111 @@
1
- <?php
2
- // Exit if accessed directly
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
7
-
8
- // check for plugin using plugin name
9
- $old_plugin = AMPFORWP_MAIN_PLUGIN_DIR.'amp-category-base-remover/amp-category-base-remover.php';
10
- if ( is_plugin_active( $old_plugin ) ) {
11
- //plugin is activated
12
- deactivate_plugins($old_plugin);
13
- add_action( 'admin_notices', 'ampforwp_catagory_base_removal_admin_notice' );
14
- }
15
-
16
- function ampforwp_catagory_base_removal_admin_notice(){
17
- ?>
18
- <div class="notice notice-success is-dismissible">
19
- <p><?php esc_html_e( 'AMP Category Base URL Remover plugin has De-activated, <br> Category removal option is added in our core plugin <a href="#">Click here to view details</a>', 'accelerated-mobile-pages' ); ?></p>
20
- </div>
21
- <?php
22
- }
23
-
24
- add_filter( 'init', 'ampforwp_url_base_rewrite_rules', 100 );
25
- function ampforwp_url_base_rewrite_rules(){
26
- global $redux_builder_amp;
27
- global $wp_rewrite;
28
- $categoryBaseRewrite = 0;
29
- $tagBaseRewrite = 0;
30
-
31
- if( isset($redux_builder_amp['ampforwp-category-base-removel-link']) ) {
32
- $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link'];
33
- }
34
- if( isset($redux_builder_amp['ampforwp-tag-base-removal-link']) ) {
35
- $tagBaseRewrite = $redux_builder_amp['ampforwp-tag-base-removal-link'];
36
- }
37
- if($categoryBaseRewrite === '1'){
38
- add_action( 'created_category', 'amp_flush_rewrite_rules', 999 );
39
- add_action( 'edited_category', 'amp_flush_rewrite_rules', 999 );
40
- add_action( 'delete_category', 'amp_flush_rewrite_rules', 999 );
41
- add_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules');
42
- }elseif($categoryBaseRewrite === '0'){
43
- remove_action( 'created_category', 'amp_flush_rewrite_rules' , 999 );
44
- remove_action( 'edited_category', 'amp_flush_rewrite_rules' , 999 );
45
- remove_action( 'delete_category', 'amp_flush_rewrite_rules' , 999 );
46
- remove_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules');
47
-
48
- }
49
- if( $tagBaseRewrite === '1'){
50
- add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
51
- add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
52
- add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
53
- add_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
54
- }elseif( $tagBaseRewrite === '0' ) {
55
- remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
56
- remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
57
- remove_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
58
- remove_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
59
- }
60
- }
61
-
62
-
63
-
64
-
65
- function amp_flush_rewrite_rules( $hard=true ) {
66
- global $wp_rewrite;
67
- $wp_rewrite->flush_rules( $hard );
68
- }
69
-
70
- function ampforwp_category_url_rewrite_rules( $rewrite ) {
71
- global $redux_builder_amp, $wp_rewrite;
72
- $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link'];
73
- $categories = get_categories( array( 'hide_empty' => false ) );
74
- if(is_array( $categories ) && ! empty( $categories ) ) {
75
-
76
-
77
- foreach ( $categories as $category ) {
78
- $category_nicename = $category->slug;
79
- if ( $category->parent === $category->cat_ID ) {
80
- $category->parent = 0;
81
- } elseif ( 0 !== $category->parent ) {
82
- $category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename;
83
- }
84
- $category_nicename = trim($category_nicename);
85
-
86
- $rewrite[ '('.$category_nicename.')'.'/amp/?$' ] = 'index.php?amp&category_name=$matches[1]';
87
- $rewrite[ '('.$category_nicename.')'.'/amp/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?amp&category_name=$matches[1]&paged=$matches[2]';
88
-
89
- // Redirect support from Old Category Base
90
- $old_category_base = get_option( 'category_base' ) ? get_option( 'category_base' ) : 'category';
91
- $old_category_base = trim( $old_category_base, '/' );
92
- $rewrite[ $old_category_base . '/(.*)$' ] = 'index.php?category_redirect=$matches[1]';
93
-
94
- }
95
- }
96
- return $rewrite;
97
- }
98
-
99
-
100
- function ampforwp_tag_url_rewrite_rules( $rewrite ) {
101
- $terms = get_terms( 'post_tag', array( 'hide_empty' => false ) );
102
- foreach ( $terms as $term ) {
103
- $term_nicename = trim($term->slug);
104
-
105
- $rewrite[ '('.$term_nicename.')'.'/amp/?$' ] = 'index.php?amp&tag=$matches[1]';
106
- $rewrite[ '('.$term_nicename.')'.'/amp/page/?([0-9]{1,})/?$' ] =
107
- 'index.php?amp&tag=$matches[1]&paged=$matches[2]';
108
- }
109
-
110
- return $rewrite;
111
  }
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
7
+
8
+ // check for plugin using plugin name
9
+ $old_plugin = AMPFORWP_MAIN_PLUGIN_DIR.'amp-category-base-remover/amp-category-base-remover.php';
10
+ if ( is_plugin_active( $old_plugin ) ) {
11
+ //plugin is activated
12
+ deactivate_plugins($old_plugin);
13
+ add_action( 'admin_notices', 'ampforwp_catagory_base_removal_admin_notice' );
14
+ }
15
+
16
+ function ampforwp_catagory_base_removal_admin_notice(){
17
+ ?>
18
+ <div class="notice notice-success is-dismissible">
19
+ <p><?php esc_html_e( 'AMP Category Base URL Remover plugin has De-activated, <br> Category removal option is added in our core plugin <a href="#">Click here to view details</a>', 'accelerated-mobile-pages' ); ?></p>
20
+ </div>
21
+ <?php
22
+ }
23
+
24
+ add_filter( 'init', 'ampforwp_url_base_rewrite_rules', 100 );
25
+ function ampforwp_url_base_rewrite_rules(){
26
+ global $redux_builder_amp;
27
+ global $wp_rewrite;
28
+ $categoryBaseRewrite = 0;
29
+ $tagBaseRewrite = 0;
30
+
31
+ if( isset($redux_builder_amp['ampforwp-category-base-removel-link']) ) {
32
+ $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link'];
33
+ }
34
+ if( isset($redux_builder_amp['ampforwp-tag-base-removal-link']) ) {
35
+ $tagBaseRewrite = $redux_builder_amp['ampforwp-tag-base-removal-link'];
36
+ }
37
+ if($categoryBaseRewrite === '1'){
38
+ add_action( 'created_category', 'amp_flush_rewrite_rules', 999 );
39
+ add_action( 'edited_category', 'amp_flush_rewrite_rules', 999 );
40
+ add_action( 'delete_category', 'amp_flush_rewrite_rules', 999 );
41
+ add_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules');
42
+ }elseif($categoryBaseRewrite === '0'){
43
+ remove_action( 'created_category', 'amp_flush_rewrite_rules' , 999 );
44
+ remove_action( 'edited_category', 'amp_flush_rewrite_rules' , 999 );
45
+ remove_action( 'delete_category', 'amp_flush_rewrite_rules' , 999 );
46
+ remove_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules');
47
+
48
+ }
49
+ if( $tagBaseRewrite === '1'){
50
+ add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
51
+ add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
52
+ add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
53
+ add_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
54
+ }elseif( $tagBaseRewrite === '0' ) {
55
+ remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
56
+ remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
57
+ remove_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
58
+ remove_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
59
+ }
60
+ }
61
+
62
+
63
+
64
+
65
+ function amp_flush_rewrite_rules( $hard=true ) {
66
+ global $wp_rewrite;
67
+ $wp_rewrite->flush_rules( $hard );
68
+ }
69
+
70
+ function ampforwp_category_url_rewrite_rules( $rewrite ) {
71
+ global $redux_builder_amp, $wp_rewrite;
72
+ $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link'];
73
+ $categories = get_categories( array( 'hide_empty' => false ) );
74
+ if(is_array( $categories ) && ! empty( $categories ) ) {
75
+
76
+
77
+ foreach ( $categories as $category ) {
78
+ $category_nicename = $category->slug;
79
+ if ( $category->parent === $category->cat_ID ) {
80
+ $category->parent = 0;
81
+ } elseif ( 0 !== $category->parent ) {
82
+ $category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename;
83
+ }
84
+ $category_nicename = trim($category_nicename);
85
+
86
+ $rewrite[ '('.$category_nicename.')'.'/amp/?$' ] = 'index.php?amp&category_name=$matches[1]';
87
+ $rewrite[ '('.$category_nicename.')'.'/amp/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?amp&category_name=$matches[1]&paged=$matches[2]';
88
+
89
+ // Redirect support from Old Category Base
90
+ $old_category_base = get_option( 'category_base' ) ? get_option( 'category_base' ) : 'category';
91
+ $old_category_base = trim( $old_category_base, '/' );
92
+ $rewrite[ $old_category_base . '/(.*)$' ] = 'index.php?category_redirect=$matches[1]';
93
+
94
+ }
95
+ }
96
+ return $rewrite;
97
+ }
98
+
99
+
100
+ function ampforwp_tag_url_rewrite_rules( $rewrite ) {
101
+ $terms = get_terms( 'post_tag', array( 'hide_empty' => false ) );
102
+ foreach ( $terms as $term ) {
103
+ $term_nicename = trim($term->slug);
104
+
105
+ $rewrite[ '('.$term_nicename.')'.'/amp/?$' ] = 'index.php?amp&tag=$matches[1]';
106
+ $rewrite[ '('.$term_nicename.')'.'/amp/page/?([0-9]{1,})/?$' ] =
107
+ 'index.php?amp&tag=$matches[1]&paged=$matches[2]';
108
+ }
109
+
110
+ return $rewrite;
111
  }
changelog.txt CHANGED
@@ -1,2285 +1,2321 @@
1
- == Changelog ==
2
-
3
- = 0.9.97.54 (23rd May 2019) =
4
- * Fixed: HUGE PERFORMANCE Issues #3052
5
- * Fixed: Performance Issues with queries #2997
6
- * Fixed: Performance Issues with template_redirect hooks #2773 #2920
7
- * Fixed: Performance Issues with Design manager #2873
8
- * Fixed: Performance Issues with ampforwp_exclude_post option #3118
9
- * Fixed: Performance Issues with AMP Pagebuilder modules and settings which were loading By default #2323
10
- * Fixed: Performance Issues with Hide AMP Bulk Tools #2549
11
-
12
- = 0.9.97.53 (20th May 2019) =
13
- * Fixed: 500 errors on posts that don't use WP Bakery #3183
14
- * Fixed: Hyperlink in amp pages including emoji - code improved #2967
15
- * Fixed: Errors in AMP social Icons #3033
16
- * Fixed: Code improved to fetch all Categories and tags in Featured Slider [Design -3] #2590
17
- * Fixed: Fatal error on posts with comments present in latest v0.9.97.52 #3191
18
- * Fixed: "View Desktop Version" feature is not working in mobile view #3192
19
- * Fixed: Improved the Extension array code #3206
20
- * Fixed: Fatal error Uncaught TypeError Argument 1 passed to DOMNode::replaceChild() #3203
21
-
22
- = 0.9.97.52 (15th May 2019) =
23
- * Added: Gutenberg Compatibility integrated #2427
24
- * Added: Gallery Designs for Gutenberg Gallery #2868
25
- * Added: Gutenburg column support in AMP #2847
26
- * Added: Addthis Sharing option UX re-structured #3114
27
- * Added: Photo Gallery plugin compatibility integrated #1811
28
- * Added: Revolution Slider plugin compatibility integrated #1464
29
- * Added: Posts offset option on category module in AMP Page Builder #2647
30
- * Added: MEWE social network integrated #3020
31
- * Added: Font Size and Color options for Dropcap #3010
32
- * Added: Breadcrumbs feature for pages #2788
33
- * Added: More parameters for ampforwp_get_setting functions #2911
34
- * Fixed: Conditions for PageBuilder and Elementor for Page.php in Swift #3097
35
- * Fixed: Code updated of Infinite Scroll when AMP Newspaper Theme is active #3031
36
- * Fixed: Copy the Content in Custom AMP Editor is not working with Gutenberg #2824
37
- * Fixed: If GTM gets enabled after Enabling the Analytics, then both codes load in the frontend #3121
38
- * Fixed: P tag is missing when "copy the content" option is used in custom AMP editor #3122
39
- * Fixed: When AMP is disabled on Homepagepage ?nonamp=1 redirect to random pages(blog) #2904
40
- * Fixed: Issue with post title and "end point to ?amp" conflict #2991
41
- * Fixed: Unspecified Type in Structured data for catgories/tags #3071
42
- * Fixed: PHP Warning date() expects parameter 2 to be long, string given in #2959
43
- * Fixed: Disquss comment is not scrollable in IOS device #2970
44
- * Fixed: Vkontakte Share(social icon) does not open in a new tab #3089
45
- * Fixed: Condition for requiring a file improved #3080
46
- * Fixed: amp_content() used instead of AMP_Post_Template object in Design [ 1,2 and 3 ] #2700
47
- * Fixed: Hyperlink in amp pages including emoji not working #2967
48
- * Fixed: Unused amp js from amp pages removed #3086
49
- * Fixed: "WP Forms for AMP" setting link is incorrect #3060
50
- * Fixed: Navigation & alternate menu css is not loading when directory plus theme is active #2963
51
- * Fixed: link to non-amp under breadcrumbs when Archives support is off. #2885
52
- * Fixed: AddThis is causing validation error after Update - code updated #3068
53
- * Fixed: Content not rendering on AMP with the Enfold theme version 4.5.6 #3124
54
- * Fixed: Tags are also displaying in category selection in the AMP page builder's category module #3082
55
- * Fixed: Author name won´t show if you disable author bio in swift theme #3131
56
- * Fixed: Link to non amp feature not works for thumbnail in design one and two #3004
57
- * Fixed: Multibyte string links aren't working in AMP Version #2556
58
- * Fixed: Leave Comment link Not working with ?amp #3093
59
- * Fixed: When Sticky Header is enabled then Jump link's Title is getting hidden under the header #2915
60
- * Fixed: Facebook comments not displaying if we add number more than 100 in the number of comments #3032
61
- * Fixed: Featured image and link shared on twitter issues #3075
62
- * Fixed: Infinity Scroll Option is not working when ?amp option is enabled in version beta #2475
63
-
64
- = 0.9.97.51.2 (10th May 2019) =
65
- * Fixed: AddThis is causing validation error after Update #3068
66
-
67
- = 0.9.97.51.1 (7th May 2019) =
68
- * Fixed: Can’t use function return value in write context #3155
69
- * Fixed: Search results not showing for "Select Categories to Hide AMP" option inHide Amp Bulk Tool #3154
70
-
71
- = 0.9.97.51 (7th May 2019) =
72
- * Added: Yoast seo breadcrumbs Support #1473
73
- * Added: Compatibility with UseAnyFont Plugin #2774
74
- * Added: Compatibility with Slide Anything plugin. #2891
75
- * Added: Compatibility with Clyp it iframe embed. #2836
76
- * Added: Compatibility with Lazy Load of Smush and Smush Pro plugin #2990
77
- * Fixed: Logo on the top of the menu shade looks strange. #3046
78
- * Fixed: Fatal error: Class 'AMP_Base_Embed_Handler' not found(Due to mediavine plugin) #3119
79
- * Fixed: Chartbeat Tag Has Incorrect Variables #3017
80
- * Fixed: If AMP page builder is enabled then unnecessary CSS is also integrated #2470
81
- * Fixed: Sidebar Improvement and Option for Pages #2499
82
- * Fixed: “Featured Image from The Content” option should not override the default Set featured image. #2503
83
- * Fixed: Widgets going out of alignments in Design 1,2 and 3 #2553
84
- * Fixed: No message if the search didn't find anything. in Swift #2557
85
- * Fixed: Header with CTA doesn't have the right options and defaults #2567
86
- * Fixed: Need to separate categories & tags with ( / or , ) in AMP theme framework single page. #2580
87
- * Fixed: Indentations are getting removed in lists of ul & ol tags. #2781
88
- * Fixed: When the custom front page has a custom pagination then the AMP pagination returns 404 #2843
89
- * Fixed: Text widget img element are overlapping with banner ads (Below the header) in design 3 #2845
90
- * Fixed: Sidebar option is off, do not show widget area in admin panel #2856
91
- * Fixed: Update Schema for author image #2919
92
- * Fixed: Sidebar Styling is not properly appearing in the Blog Page #2938
93
- * Fixed: 404 issue on custom post type pagination #2937
94
- * Fixed: Notice errors in design-1 sidebar menu when amp menu is unchecked. #2953
95
- * Fixed: Bootstrap min overriding modal body style. #2987
96
- * Fixed: Move infinite scroll settings to a correct place #3007
97
- * Fixed: Add Extension list for the events calendar for amp #3030
98
- * Fixed: Add Extension list for table of content #3040
99
- * Fixed: Strip CSS with i-amphtml- name prefix because its causing validation errors #3009
100
- * Fixed: Need to add an option to delete the saved layouts in pagebuilder. #2801
101
- * Fixed: Category module not working with recent posts from Version 0.9.97.45 #3117
102
- * Fixed: Related posts appearing on the top #3151
103
- * Fixed: Debug error in installation process #3134
104
-
105
- = 0.9.97.50.1 (1st May 2019) =
106
- * Fixed: Alignment problem when right sidebar is enable in blog page and there is no featured image in the posts #3057
107
-
108
- = 0.9.97.50 (29th April 2019) =
109
- * Added: New Icon of Telegram in all the Designs #2448
110
- * Added: Swift icon and Font awesome icon option added in Design's global section [Swift theme] #2992
111
- * Added: Category option added in Design's single section [Swift theme] #2551
112
- * Added: Yoast author twitter handle compatibility integrated #2133
113
- * Added: New function ampforwp_get_the_ID() created #2867
114
- * Fixed: Facebook comment and Like option gives an error when the bbPress plugin is enabled #3006
115
- * Fixed: When Gutenberg active left sidebar is not visible in page builder modules #2934
116
- * Fixed: AMP preview functionality showing blank in the preview mode #3029
117
- * Fixed: Image floats CSS improved in mobile mode #2525
118
- * Fixed: Related Posts Randomly in Swift theme #2308
119
- * Fixed: Pricing module content is not center in page builder #2921
120
- * Fixed: Background image of the page builder is zooming in IOS devices when the parallax effect is enabled #2844
121
- * Fixed: Footnotes compatibility code updated #2982
122
- * Fixed: Iframe is not loading when Convert AMP to WP theme (Beta) option is enabled [Swift theme] #2628
123
- * Fixed: PHP Warning Undefined variable #3103
124
-
125
- = 0.9.97.49 (26th April 2019) =
126
- * Added: Addthis Support integrated #2416
127
- * Added: A3 Lazy Load compatibility #2872
128
- * Added: Add support for AMP Linker #2546
129
- * Fixed: Getting validation Error when using the Ivory Search Plugin #2497
130
- * Fixed: Featured images or article images not showing in latest version #3063
131
- * Fixed: Condition improved for author box hook #2608
132
- * Fixed: After Update all AMP Pages Do Not Load and are Not Validated #3062 [ WP Rocket]
133
- * Fixed: PHP notice Undefined variable wp #3085
134
- * Fixed: PHP notice Undefined variable wp_query #2803
135
- * Fixed: Warning message while on WP customizes #3070
136
- * Fixed: Tag meta name 'viewport' appear more than once when Zox news theme is activate #2971
137
- * Fixed: PHP notice errors after activating amp-woocommerce plugin #3054
138
- * Fixed: Fatal error - can't use function return value in write context #3087
139
- * Fixed: AMP Frontpage: The mandatory tag ‘link rel=canonical’ is missing or incorrect with Rank Math #3061
140
- * Fixed: Fatal error - is_amp_endpoint issue #3055
141
-
142
- = 0.9.97.48 (23th April 2019) =
143
- * Added: Meta genertor #2543
144
- * Added: Bridge Qode SEO Compatibility integrated #2538
145
- * Added: Lazy Load of Smush and Smush Pro plugin Compatibility integrated #2990
146
- * Fixed: Validation errors occur when Wordpress Comments Option is enabled #2989
147
- * Fixed: Home page displays latest posts instead of custom page when enfold theme activate #2943
148
- * Fixed: API URL conflict with Mobile redirection #2917
149
- * Fixed: Instant Article fatal error #2968
150
- * Fixed: Undefined index fb-instant-page-id PHP notice #2570
151
- * Fixed: All media queries load in single media query only code updated #2711
152
- * Fixed: Instant Article feed code updated #3018
153
- * Fixed: Space after the "data:image/png" part of the base64 encoded CSS background image #2974
154
- * Fixed: GDPR consent is not working on ios #2876
155
- * Fixed: PHP Errors in latest v0.9.97.46.1 after activation on fresh WP installation #3028
156
- * Fixed: Issue with moblie redirection with non-amp link #3021
157
- * Fixed: Cntr class automatically removed after activating elementor plugin in swift theme #3025
158
- * Fixed: Javascript Console errors after the v0.9.97.47 update #3079
159
-
160
- = 0.9.97.47 (19th April 2019) =
161
- * Added: AMP by Automattic Compatibility integrated #2287
162
- * Added: Click Mag WP Theme compatibility integrated #2796
163
- * Added: New filter in contents-module of page builder for raw html #3001
164
- * Fixed: PHP Warning illegal string offset When AMP layout plugin activate #2951
165
- * Fixed: CSS is getting breaked in GoodLife theme #2673
166
- * Fixed: PHP Debug errors in v0.9.97.46 #3011
167
- * Fixed: Fatal error call to undefined method WPSEO_Options #3008
168
- * Fixed: Proper escaping in Alexa Analytics #2984
169
-
170
- = 0.9.97.46.1 (10th April 2019) =
171
- * Fixed: Theme framework templates loading multiple times #2977
172
-
173
- = 0.9.97.46 (9th April 2019) =
174
- * Added: WP Subtitle compatibility integrated #2831
175
- * Added: New filter in page builder for Enable/disabled check #2998
176
- * Added: Additional Page Builder compatibility added #2643
177
- * Fixed: The tag 'p' is disallowed & auto added as child of tag 'amp-accordion' #2498
178
- * Fixed: Histats Not working #2909
179
- * Fixed: itemprop="image" is being removed from the AMP Pages #2585
180
- * Fixed: CSS pseudo-element not working when minify option is enabled #2907
181
- * Fixed: Directories path code improved, if the plugin is installed outside (/wp-content/plugins) #1531
182
- * Fixed: WP_debug warnings and notices #2958
183
- * Fixed: More than one canonical issue with Rank Math SEO Plugin #2975
184
- * Fixed: Background image or color in the 1st row of page builder is applied to all below row #2994
185
- * Fixed: Rare Distorted image aspect ratio issue with Gutenberg editor #2931
186
- * Fixed: Font family for Content in Single page code improved #2122
187
- * Fixed: Fatal Error due to SEO press plugin #3003
188
- * Fixed: Rare issue with Mobile redirection on Homepage after v0.9.97.32 #2972
189
- * Fixed: PageSpeed Score Improvement for all Designs #2979
190
-
191
- = 0.9.97.45 (4th April 2019) =
192
- * Added: SeoPress compatibility integrated #1589
193
- * Added: WP Appbox compatibility integrated #2791
194
- * Added: Infinite Scroll feature integrated. #2682
195
- * Added: Facebook like button added in Sticky Social Share #2186
196
- * Added: Font family for Content in Single page #2122
197
- * Fixed: Custom post type categories not showing in amp pagebuilder #1993
198
- * Fixed: Duplicate SiteNavigationElement issue #2952
199
- * Fixed: AMP Theme Framework Multisite issue #2936
200
- * Fixed: Custom AMP Editor Content is Not rendering when Elementor is activated #2901
201
- * Fixed: Title issue on Homepage with Yoast if we select custom front page #2962
202
-
203
- = 0.9.97.44.2 (1st April 2019) =
204
- * Added: Element folder files override in the Design One, Design Two and Design Three for the Child theme #2770
205
- * Added: High-resolution Images [Additional image guidelines] option added in structure data #2259
206
- * Fixed: Hide by default option from bulk tools is not working when amp takeover option is enabled #2832
207
- * Fixed: Space removed while checking in the ampforwp_onesignal_notifications_widget function #2569
208
- * Fixed: Display on User Avatar option #2942
209
- * Fixed: Edit page is getting blank when product module is used #2944
210
- * Fixed: YoastSEO post analysis broke & getting Uncaught TypeError: $ is not a function #2948
211
- * Fixed: Yoast meta data are not renderring correct content for custom homepage #2928
212
- * Fixed: Date format in Swift theme homepage/loop #2965
213
- * Fixed: Published Date Disappear When selecting Horizontal Design in Related Post [swift-theme] #2957
214
-
215
- = 0.9.97.44.1 (29th March 2019) =
216
- * Added: Advertisement AMP panel improved #2724
217
- * Fixed: Vuukle AMP integration code updated #2600
218
- * Fixed: Fatal Error with old Plugins manager v1.0 #2976
219
-
220
- = 0.9.97.44 (28th March 2019) =
221
- * Added: Captions feature in AMP page builder #2645
222
- * Added: Compatibility with the Youtube Oembed Plyr plugin #1505
223
- * Added: Caption option for gallery/slider module in pagebuilder #2790
224
- * Added: Like & share feature for every image in instant_articles #2764
225
- * Added: Genesis option in SEO settings #2386
226
- * Added: Improved the 'Setup AMP Feature' and 'Welcome to AMP' tabs & Enhance the Support button on AMP panel #2980
227
- * Fixed: AMP Theme Framework getting conflicted #2782
228
- * Fixed: Unwanted code for call-now component is being used #2652
229
- * Fixed: amphtml tag while AMP Takeover option is enabled #2550
230
- * Fixed: Debug warnings after 0.9.97.15 #2532
231
- * Fixed: 'Header design' section in "Header" tab removed when design-1,2 and 3 is active & minor improvements #2978
232
-
233
- = 0.9.97.43 (12th March 2019) =
234
- * Fixed: Fallback for Redux classes #2377
235
- * Fixed: Search widget CSS for Design-2 #1400
236
- * Fixed: Navigation Menu CSS for Swift theme #2593
237
-
238
- = 0.9.97.42 (11th March 2019) =
239
- * Fixed: Incompatibility with AMP Plugin Manager
240
-
241
- = 0.9.97.41 (11th March 2019) =
242
- * Added: Color picker for Footer Area #2320
243
- * Added: Compatibility with WP User Avatar plugin to show the gravatar #2772
244
- * Fixed: Options Panel not showing, says "You are not allowed to access this page" #2377
245
- * Fixed: faster-image libraries not being able to determine dimensions #2692
246
- * Fixed: Changes in endpoint to ?amp, Re-direct " /amp " to " ?amp " #2480
247
- * Fixed: Font style getting change on Custom Front page #2594
248
- * Fixed: When the user is directed to the AMP version of the page it changes the URL slighltly (swaps out characters) #2913
249
-
250
- = 0.9.97.40 (9th March 2019) =
251
- * Added: Smooth scrolling for anchors links and jumping links within a page #2062
252
- * Added: Option to Enable/Disable Merriweather font in Design-1
253
- * Fixed: External links are getting skipped #2862
254
- * Fixed: Social Share “LINE” does not show up in swift theme #2641
255
- * Fixed: Checkbox from menu listings in AMP theme framework #2618
256
- * Fixed: PHP Warning undefined index fb-instant-page #2610
257
- * Fixed: Instagram Posts not rendering in AMP #2629
258
- * Fixed: Instant articles Image issue #2929
259
- * Fixed: Default height & width values for amp-img when values are not set #2925
260
-
261
- = 0.9.97.39 (5th March 2019) =
262
- * Added: Compatibility with the Author Simple Box Plugin #2268
263
- * Added: Compatibility when short codes are added in AMP widgets #2552
264
- * Added: Compatibility with the footnotes plugin #2447
265
- * Added: ID Support on the AMP PageBuilder #2474
266
- * Added: embedly oembed support in wordpress #1160
267
- * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515
268
- * Fixed: Debug Errors #2627
269
- * Fixed: Custom Front page is breaking in 0.9.97.16 #2589
270
- * Fixed: Date Archive not working with Swift Design #2514
271
- * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727
272
- * Fixed: Issue with pagebuilder when yoast plugin is active. #2933
273
-
274
- = 0.9.97.38 (28th February 2019) =
275
- * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
276
- * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
277
- * Fixed: Issue with Post Pagination ( Single ) #2624
278
- * Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681
279
- * Fixed: Full excerpt length in single posts [swift] #2712
280
- * Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
281
-
282
- = 0.9.97.37 (23th February 2019) =
283
- * Added: Static page template in AMP #2614 + #2900
284
- * Fixed: Font size and other values are properly sanitizing #2898
285
- * Fixed: Failed to parse script tag contents #2884
286
- * Fixed: PHP Notices after the v0.9.97.32 #2879
287
- * Fixed: oembed wordpress post renders as a full post in AMP #2003
288
- * Fixed: Gallery/Slider of AMP pagebuilder not working
289
- * Fixed: class are repeating number of times when image (icon) added in .svg format #2893
290
- * Fixed: Debug warnings with WPML #2899
291
- * Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
292
-
293
- = 0.9.97.36 (19th February 2019) =
294
- * Added: Mobile and tablets Detects separately for 'Mobile Redirection' option #2436
295
- * Added: Scrolling bar for swift theme in chrome browser #2593
296
- * Added: CSS condition when element markup is visible #2753
297
- * Fixed: Pre tags not rendering properly on pages #2823
298
- * Fixed: Logo resize should only apply when Resize setting is enable #2544
299
- * Fixed: When /?amp is enabled "Visit AMP" is redirecting to dashboard #2363
300
- * Fixed: ampforwp_wc_shortcode_title is loading globally #2756
301
- * Fixed: Extra CSS is causing validation error of 50kb #2592
302
- * Fixed: PHP warning issue in latest version of php #2895
303
- * Fixed: Yoast analysis is giving false readings for the SEO When AMPforWP Pagebuilder is enabled #2435
304
-
305
- = 0.9.97.35 (16th February 2019) =
306
- * Added: Levelup Compatability #2718
307
- * Added: "Align Justify" Option in Page builder's text module #2665
308
- * Added: Default value for Swift Color Scheme #2793
309
- * Fixed: ampforwp prefix in the analytics function #2886 #2890
310
- * Fixed: "Below the Footer" ads option showing above and below the footer #2778
311
- * Fixed: Debug error undefined index comments #2887
312
-
313
- = 0.9.97.34 (14th February 2019) =
314
- * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
315
-
316
- = 0.9.97.33 (13th February 2019) =
317
- * Fixed: Style sanitizer code updated #2387
318
- * Fixed: UTM Parameters when Mobile Redirection is enabled #2854
319
- * Fixed: ?nonamp=1 is not working properly #1947 & #2537
320
- * Fixed: All media queries load in single media query only #2711
321
- * Fixed: 'Hide AMP option' is not working when AMP take over is enabled #2880
322
- * Fixed: Swift Hover Color Changes #2751
323
- * Fixed: Google Font is not getting saved #2839
324
- * Fixed: Sidebar CSS condition code fixed #2757
325
- * Fixed: Performance improvement for ampforwp_stylesheet_file_insertion #2873
326
-
327
- = 0.9.97.32 (8th February 2019) =
328
- * Added: Rank Math SEO compatibility integrated #2701 & #2736
329
- * Added: New filter "ampforwp_modify_thumb_url_array" to modify the thumbnail #2739
330
- * Fixed: 'Call Button Color' option not working - code updated #2820
331
- * Fixed: Validation error when uploading YouTube video in Comments #2827
332
- * Fixed: When Mobile Redirection option is enabled then, fr (language symbol) is removed from the URL. #2721
333
- * Fixed: Category Module from Page Builder not displaying #2870
334
- * Fixed: The homepage displays the title of the first post in All in one SEO #2865
335
- * Fixed: Title mismatch in some posts with Yoast #2871
336
-
337
- = 0.9.97.31 (4th February 2019) =
338
- * Added: Subtitles plugin Compatibility #2853
339
- * Added: Created an option for Id's for all the modules and column in AMP Page builder #2730
340
- * Fixed: All the Images are Adding AMP at the End of their URL #2391
341
- * Fixed: When nextpage pagination is added, URL in is rendering /2?amp=1 #2767 #2766
342
- * Fixed: Comments Issues #2755
343
- * Fixed: The gutenberg button doesn't work in amp #2707
344
- * Fixed: Button Module color is not getting changed #2745
345
- * Fixed: Issue with amp menu converting & ASCII code to X #2855
346
- * Fixed: 'Call Button Color' option not working #2820
347
- * Fixed: Error: The attribute 'alt' may not appear in tag 'a' #2837
348
- * Fixed: Captions are not working in Gallery #2576
349
-
350
- = 0.9.97.30 (2nd February 2019) =
351
- * Fixed: Wrong title on the archive pages #2864
352
- * Fixed: data-loading-strategy attribute is double quoted #2863
353
-
354
- = 0.9.97.29 (31st January 2019) =
355
- * Fixed: Validation error due to Search Widget #2858
356
- * Fixed: Issue after upgrading analytics code #2859
357
- * Fixed: amp-animation error in amp theme framework and tech blogging amp theme #2819
358
- * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast - code updated #2816
359
- * Fixed: Search Console Crawl Errors ?nonamp=1/ is listed in Access denied #2760
360
-
361
- = 0.9.97.28 (29th January 2019) =
362
- * Added: Lightbox feature for Carousel #2731
363
- * Added: Specific filters to modify the analytics code #2653
364
- * Fixed: Homepage Blog CSS is loading on the custom frontpage in swift theme #2754
365
- * Fixed: Reset all & Reset section issue for redux framework #2722
366
- * Fixed: Transable redux fields for other plugins like wpml #2737
367
- * Fixed: Proper condition for Ads css #2758
368
- * Fixed: Jetpack stats pixel inserted twice since Jetpack v6.9 #2812
369
- * Fixed: AMP pagebuilder full width for posts #2765
370
- * Fixed: Undefined “non-content” in blacklist-sanitizer #2842
371
- * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast #2816
372
-
373
- = 0.9.97.27 (23rd January 2019) =
374
- * Added: ampforwp_is_amp_endpoint_takeover filter added
375
- * Fixed: The attribute 'action' may not appear in tag 'FORM [method=POST]' #2835
376
- * Fixed: Image size smaller than recommended size Warning in Search console #2838
377
-
378
- = 0.9.97.26 (21st January 2019) =
379
- * Added: Improve the Extension array code #2822
380
- * Fixed: WP_Widget_Text conflict after v0.9.97.24 #2821
381
-
382
- = 0.9.97.25 (17th January 2019) =
383
- * Added: Help message for background video of column setting of Page Builder #2716
384
- * Added: Review option in plugins page #2715
385
- * Added: Excerpt length option in Category module of Page Builder #2733
386
- * Added: Font Performance with font-display #2743
387
- * Added: Custom template for front-page & home-page #2714
388
- * Fixed: AMP Footer sidebar is not working in master #2800
389
- * Fixed: <i> tag not working in Title #2804
390
- * Fixed: alt attribute of <img> tag is not working when the image is inside the <a> tag #2617
391
- * Fixed: Remove the unnecessary code for '404 error' text in amp translation panel #2738
392
- * Fixed: Subtitle issue using with Jannah theme #2732
393
- * Fixed: Proper names given for AMP Widgets #2797
394
- * Fixed: Notice: Undefined index: hide-amp-tags-bulk-option2 and Undefined variable: inline_related_posts in features.php on line 4698 & 5546 #2795
395
- * Fixed: Quality of 'featured image slider' in Design3 #2779
396
- * Fixed: Embed Twits with twitter links #2798
397
- * Fixed: /amp in the telephone link when 'Change Internal Links to AMP' option enabled #2742
398
- * Fixed: Position of social sharing buttons 'above content' on pages #2809
399
- * Fixed: lang attribute in HTML tag #2808
400
- * Fixed: In footer, 'View non-AMP pages' is repeated twice when 'back to top link' option is enabled #2807
401
-
402
- = 0.9.97.24 (9th January 2019) =
403
- * Added: Compatibility with new and all default WP widgets #1400
404
- * Fixed: Performance issue #2762
405
- * Fixed: Need to add amp endpoint filter #2761
406
- * Fixed: When Hide AMP Option is enabled in PageEditor with Convert AMP to WP theme (Beta) enabled it's providing output as AMP Page #2735
407
- * Fixed: Whenever an image inserted, has width="100%" and height="100%", its giving Validation error. #2748
408
- * Fixed: Custom post type is showing a blank page in the swift theme #2512
409
- * Fixed: Whenever Responsive AD is enabled then the AD should load on the screen without any effect to the normal mode AD in D1,2,3, and Swift #2531
410
- * Fixed: When Convert AMP to WP theme (Beta) is enabled GDPR popup isn't closing #2763
411
- * Fixed: If twitter embed code is added then other blockquotes tag are not working #2750
412
- * Fixed: Custom post type is showing a blank page in the swift theme #2512
413
- * Fixed: Conflict with the Schema and Structure data plugin #2777
414
- * Fixed: In the swift theme the Sticky social icons overlaps #2601
415
- * Fixed: " Top " Button functionality to be improved. #2529
416
- * Fixed: Drop down icon appearing twice #2785
417
- * Fixed: Custom front page Meta description and content are not rendering for ALL in SEO plugin. #2702
418
- * Fixed: Hover color is not appearing properly #2787
419
-
420
- = 0.9.97.23 (18th December 2018) =
421
- * Fixed: Sub menu items and arrows are not functioning in publisher theme. #2672
422
- * Fixed: Fatal error when Polylang(Core) is activated. #2657
423
- * Fixed: Improve coding in amp-page-builder.php #2725
424
- * Fixed: Escaping not done properly #2723
425
- * Fixed: Serialization problem with AMP settings data. #2717
426
- * Fixed: Whenever Convert AMP to WP theme (Beta) option is enabled Logo Image is being stretched. #2726
427
-
428
- = 0.9.97.22 (6th December 2018) =
429
- * Added: Total Plus theme compatibility #2511
430
- * Added: Allow SVG format Logo in AMP #2431
431
- * Fixed: Vuukle AMP integration #2600
432
- * Fixed: "Change Internal Links to AMP" not working properly for anchor tags (internal links) #2562
433
- * Fixed: Secondary menu color is not outputting the value in latest update #2680
434
- * Fixed: The instagram embed code is not working in facebook instant article in the AMP. #2523
435
- * Fixed: FTP Link being generated in Non-AMP but not in AMP #2477
436
- * Fixed: Videos aren't rendering whenever Convert AMP to WP theme (Beta) is enabled #2501
437
- * Fixed: More debug errors #2513
438
- * Fixed: Comments closed not looking good in Swift theme #2542
439
- * Fixed: Excerpt Option is not Working. #2509
440
- * Fixed: Image of Design 3 and Swift are same in Installation wizard #2540
441
- * Fixed: AMP renders with ?q after the /amp #2361
442
- * Fixed: Tables overflow in swift theme when adding the tables to the site [TEST + ALT solution] #2392
443
- * Fixed: Unable Access the Wp-admin page when Amp takeover option is Enabled. #2476
444
- * Fixed: Latest post title is displaying in the AMP homepage instead of site title #2419
445
- * Fixed: AMP menu is not working when Jetpack Mobile theme option is enabled #2584
446
- * Fixed: Link to Non-AMP page in Footer points to 404 #2586
447
- * Fixed: Debug warnings in error logs #2367
448
- * Fixed: The AMP for WP plugin(Version 0.9.97.20) bug are notice-error :undefine index and Unused code. #2687
449
- * Fixed: Improvements in AMP page builder code #2471
450
- * Fixed: Table class is getting removed in AMP pages. #2699
451
- * Fixed: Pagination is not working when AMP Takeover is enabled #2686
452
- * Fixed: The featured slider is not displaying properly images using the Firefox browser with the design 3 theme. #2677
453
- * Fixed: Icons for AMP Stories and Shortcode Ultimate #2598
454
- * Fixed: Images are stretched whenever Convert AMP to WP theme (Beta) Option is enabled. #2694
455
- * Fixed: Vertical words in table on mobile #2606
456
- * Fixed: PageBulider getting following notices in old module #2305
457
- * Fixed: Export option of page builder is not working in latest version #2709
458
- * Fixed: Remove the span tag in all 404.php files of the 4 designs #2704
459
- * Fixed: Wrong escaping done for default value for Google Analytics #2697
460
- * Fixed: Re-modification of single settings option panel when newspaper theme activated #2706
461
-
462
- = 0.9.97.21 (21st November 2018) =
463
- * Fixed: Sanitation of user contents before save #2679
464
- * Fixed: Menu is Not working in Minimal Blogging theme (0.9.97.20) #2667
465
- * Fixed: Author bio not showing proper link #2674
466
- * Fixed: HTML not being rendered on cookie consent notifications #2671
467
- * Fixed: Telephone link not working
468
-
469
- = 0.9.97.20 (29th October 2018) =
470
- * Fixed: Plugin Vulnerability #2650
471
-
472
- = 0.9.97.19 (4th October 2018) =
473
- * Fixed: Tables overflow not working in swift theme #2392
474
- * Fixed: Null check added to fix null reference exception #2526
475
- * Fixed: Minor Bug related with menu #2612
476
-
477
- = 0.9.97.18 (29th September 2018) =
478
- * Fixed: Minor Bug related with menu
479
-
480
- = 0.9.97.17 (28th September 2018) =
481
- * Added: Featured Slider "Tag" support #954
482
- * Added: Marfeel plugin is blocking Internal pages of AMP and rendering 503 error #2423
483
- * Fixed: Dropdown Menu arrows not working properly in Swift #2148
484
- * Fixed: Wrong implementation of load_plugin_textdomain function #2408
485
- * Fixed: Page Float to right and showing menu content when page scroll horizontally in iPhone device #2434
486
- * Fixed: Internal Link Option is not Working in beta #2443
487
- * Fixed: Missing conditional tag for get_the_tags() causing "Invalid argument supplied for foreach()" error #2456
488
- * Fixed: Need to make a space in meta information and published date is not getting translated #2411
489
- * Fixed: Meta og:title and description tag are Not completely Reflecting #2454
490
- * Fixed: Images are not aligned center when published with Gutenberg Editor #2462
491
- * Fixed: Anchor Tag is not working because there is a space in between link #2465
492
- * Fixed: Fix social shares icons #2467
493
- * Fixed: Debug errors in beta #2472
494
- * Fixed: homepage is getting blank when "Convert To WP" is enable only for posts #2493
495
- * Fixed: wrong amphtml URL generating for WPML #2573
496
-
497
- = 0.9.97.16 (19th September 2018) =
498
- * Added: 3 Types of Gallery designs #1968
499
- * Added: New Section to show 'change log' on Welcome Page #1753
500
- * Added: Allow HTML in footer section of translation panel in design 3 #1950
501
- * Added: Need to make the compatibility with The Voux theme #2263
502
- * Fixed: Special character "|" breaking the url in the twitter share #2264
503
- * Added: Read more button for post on blog page #2273
504
- * Fixed: Category Labels are Clickable on Swift Homepage even Archive support is off #2279
505
- * Fixed: Above Loop and Below Loop Sidebar Widget area is not connected with Swift theme #2280
506
- * Fixed: Aq_Resize.process() errors for images hosted on CDN #2285
507
- * Fixed: Convert to WP Option is displayed in Swift Theme, but not in Design 3. #2291
508
- * Fixed: Need to have only one text-domain in the string of the plugin #2292
509
- * Fixed: Bug in Facebook comments. #2300
510
- * Added: Beta Testing link in the Options panel #2302
511
- * Added: "X" button in the menu of D3 #2294
512
- * Fixed: AMP Take over is applying even on product when this option is enabled only for posts. #2304
513
- * Fixed: The Option Facebook App ID not necessary in the social icons of AMP panel when using Swift #2384
514
- * Fixed: Embeds not working in Archive Description #2402
515
- * Fixed: Spurious spaces in Footers #2521
516
- * Fixed: Additional spaces Pagination div on article posts #2522
517
-
518
- = 0.9.97.15 (13th September 2018) =
519
- * Fixed: Pagination is not working on date archive #2289
520
- * Added: Options to show Social Icons in different places in Swift #1722
521
- * Fixed: Localization string for "% days ago" not working for non-Latin languages #1491
522
- * Added: Social Share by Supsystic Compatibility #1509
523
- * Fixed: Duplicate h1 tags in Design One #1522
524
- * Added: 3 Appearance option for Related Posts in Swift theme #1545
525
- * Fixed: RTL not working with Footer properly #1655
526
- * Fixed: Proper implementation of the property of all in one SEO pro to avoid fatal error #2500
527
- * Fixed: Notice: Undefined index: extension in thirdparty-compatibility.php on line 401 - 406 #2496
528
- * Fixed: Wrong url in Non-Amp Version link on blog posts page and category archives #2424
529
- * Fixed: The Consent.php path is getting index in Webmaster tool #2518
530
- * Added: Option to add custom things in Instant Articles #1089
531
- * Added: Show/hide Instant Article on specific posts #1297
532
- * Added: Facebook Instant Articles (FBIA) Crawler Ingestion (ia:markup_url) tag #1474
533
- * Added: Facebook Instant Articles Meta Tag #1486
534
- * Added: Related posts for instant articles #1634
535
- * Added: Option to remove Author info from Instant Articles #1483
536
- * Added: Facebook Instant Articles in each Catagory #1524
537
- * Added: Custom Facebook Instant Articles Ad option #1475
538
- * Fixed: Pagination not working after changing the pagination base #1485
539
- * Added: Breadcrumb with tag #1305
540
- * Fixed: Enabled WordPress Comments by default #1501
541
-
542
- = 0.9.97.14 (4th September 2018) =
543
- * Added: Adobe Analytics Support #887
544
- * Fixed: Same Icons loading for some extensions #2172
545
- * Fixed: Removed extra spacing from "Back to top" text #2349
546
- * Fixed: Retina featured images support for Homepage and archive loop images #2334
547
- * Fixed: When WooCommerce Product Slider is Installed, the Picture of Icons are not loading #2325
548
- * Added: Customizr Theme Lazy Loading compatibility #2322
549
- * Fixed: "Save Module" button of AMP page Builder not displaying in OSX and in Safari #1943
550
- * Fixed: Sort Related Posts Randomly Not Working in Swift theme #2308
551
- * Added: Need to create a tutorial of How to Enter your Audience Network Placement ID of advertisement in the Instant Article #1723
552
- * Fixed: Retina Images option Improvement-II #2296
553
- * Fixed: Disable the look or check of redux framework #2293
554
- * Fixed: With Redux core plugin, AMP option panel design not loading #2258
555
- * Fixed: Issues with pagination #2253
556
- * Added: Thrive Architect Compatible #1575
557
- * Fixed: Notice Undefined variable categories_array #2486
558
- * Fixed: Need to add upscale parameter in-line related posts #2488
559
- * Fixed: Getting the warnings in error log due to global variable, not present #2395
560
- * Fixed: Google Analytic issue while setting up Run Installation wizard #2491
561
- * Added: Read more button AKA Content Sneak Peek feature for post #2246
562
- * Added: Showing related items/post in after nth paragraph #2246
563
-
564
- = 0.9.97.13 (28th August 2018) =
565
- * Fixed: Fatal error in `ampforwp_related_post_loop_query()`
566
-
567
- = 0.9.97.12 (27th August 2018) =
568
- * Fixed: Quote runs only in block post not on pages #2399
569
- * Added: Create a Sidebar option that can be used as global Sidebar #2388
570
- * Fixed: words are breaking and not readable #2441
571
- * Fixed: Text is breaking into next line while there is no space between the text in custom AMP Editor #2270
572
- * Fixed: IP Anonymization #2421
573
- * Added: Setka Editor Compatibility #2468
574
- * Fixed: In swift theme, when user ads the ad Above the Related Posts (Single Post); the content doesn't display #2311 and #2318
575
- * Added: Toggle controls are now accessible #1691
576
- * Added: Global Sidebar is now Connected with AMP Pagebuilder #2371
577
- * Fixed: #amp-user-notification1 Styling was loading even when disabled from option panel in swift #2400
578
- * Fixed: Remove the empty `@media{}` css generated by Pagebuilder #2473
579
- * Fixed: Blank Lines in HTML Source code #2445
580
- * Fixed: Optimize AMP pages on Google Lighthouse #2082
581
- * Fixed: RSS Feed is not working when AMP Takeover is enabled #2309
582
-
583
- = 0.9.97.11 (21th August 2018) =
584
- * Minor Update
585
-
586
- = 0.9.97.10 (18th August 2018) =
587
- * Fixed: Homepage build with AMP PageBuilder is displaying only when the checkbox of the Custom AMP editor is enabled #2350
588
- * Added: Created a new function to get the settings instead of calling it directly from global $redux_builder_amp everytime. `ampforwp_get_setting` created #2177
589
- * Fixed: Comments and share not loading on pages only in swift #2401
590
- * Fixed: Back to Top link not working in Swift Design #2404
591
- * Added: Ads Below the Author Area in Swift theme #2455
592
- * Fixed: AMP should remove spaces from GTM ID automatically #2413
593
- * Fixed: Some Posts are not displaying in Blog page even when AMP is enabled from Post settings #2375
594
- * Fixed: Wrong AMPHTML when using static page as blog using custom-code/pagebuilder from reading settings #2396
595
- * Added: Add paginations meta tags #2343
596
- * Fixed: Updated the code of AMP renders with ?q after the /amp #2361
597
- * Added: Add support for Relevanssi search #2307
598
- * Added: Show index/noindex label when enabling the options in SEO Settings #2290
599
- * Added: Add AMP consent in AMP Theme Framework #2440
600
- * Added: Created a component called `AMP-geo` so anyone can use it in thier AMP theme #2440
601
-
602
- = 0.9.97.9 (1st August 2018) =
603
- * Minor Improvements
604
-
605
- = 0.9.97.8 (24th July 2018) =
606
- * Fixed: AMP renders with ?q after the /amp #2361
607
- * Fixed: iThemes Sync can not connect to the site. #2380
608
- * Fixed: H1 to H6 styling is not reflecting in the Swift theme #2383
609
- * Fixed: Underline on Links function is not working. #2372
610
- * Fixed: WordPress Admin Color Scheme not applying #2390
611
- * Fixed: Breadcrumbs are not disabling when the sidebar template is selected #2376
612
- * Fixed: All the Images are Adding AMP at the End of their URL. #2391
613
-
614
- = 0.9.97.7 (18th July 2018) =
615
- * Fixed: PageBuilder not loading on frontpage #2360
616
- * Fixed: 500 error on somepages due to open wp_query by other plugins
617
- * Fixed: License key reupdating #2261
618
- * Fixed: AMP renders with ?q after the /amp #2361
619
-
620
- = 0.9.97.6 (14th July 2018) =
621
- * Fixed: Error and Warning on Structured Data for Logo. #2360
622
- * Fixed: Category Bulk tool breaking meta boxes #2335
623
-
624
- = 0.9.97.5 (11th July 2018) =
625
- * Fixed: Title disappearing in Design 1,2,3 when legacy pagebuilder is enabled #2341
626
- * Fixed: ld+json getting a broken when special characters are added in the image. #2346
627
- * Fixed: Hide by Category Breaking post metabox #2330
628
- * Fixed: Hiding excerpt when global $redux_builder_amp is empty #2330
629
- * Fixed: When Google Tag Manager is enabled, only Google Analytics should get disabled but not other analytics. #2340
630
-
631
- = 0.9.97.4 (09th July 2018) =
632
- * Fixed: Huge Performance upgrade in the way fetching the logo url #2317
633
- * Fixed: Fatal Error due to unable to modify values in Structured Data Object #2327
634
- * Fixed: Seperate option for Featured Image in pages in Swift theme #2328
635
- * Fixed: `<p>` tags disabling where not wanted #2330
636
- * Fixed: Fatal error in contact form module while ninja form or gravity form plugins are not activated #2310
637
- * Fixed: Woo Commerce Category page not working properly #2333
638
- * Fixed: Few issues related to amp-facebook-comments #2300
639
- * Fixed: Limit number of Tags and Category to 500 in Hide AMP-Bulk tools #2336
640
-
641
- = 0.9.97 (27th June 2018) =
642
- * For more details check out [the blog post](https://ampforwp.com/0-9-97-released-strengthening-of-foundation-89th-update/)
643
- * Fixed: Extraposition attribute left in CSS Design #2 #2119
644
- * Fixed: Non-AMP header link not working #2109
645
- * Added: Create an Ad Above the Post Content #2155
646
- * Fixed: "AGO" text was not translatable #2158
647
- * Added: Filter created `ampforwp_header_url` to modify logo url #2141
648
- * Fixed: Removing the text "amp" in footer view non-amp-link #2158
649
- * Added: Compatibility WP user Avatar plugin added #2011
650
- * Fixed: Design 2 - meta info producing a block of empty HTML #1969 #1954
651
- * Added: Pocket and Hatena Bookmark social share buttons Added #1652
652
- * Fixed: External Links are appended with "amp" at the end of the url in content. #2174
653
- * Fixed: Some Issues Found in Design #3 #2130
654
- * Fixed: ScoopVersion: 1.4 By boostdevelopers theme displaying the error only in the category #1683
655
- * Fixed: Page featured Image is not displaying in the Swift theme #2136
656
- * Fixed: Dropcap breaking the youtube embed code #2157
657
- * Fixed: Bulk hide by default option is requires Permalinks to be saved #2145
658
- * Fixed: Fully compatibility with muffin page builder #2180
659
- * Fixed: Incontent Related Post Issues #2078
660
- * Fixed: Search page should not have AMP version of the page and not in search result #2191
661
- * Added: Control added to modify Retina Images resolutions #2099
662
- * Added: Created an option to duplicate a page builder element #1986
663
- * Added: Image Caption is not displaying below the Image in design 1,2,3 #2101
664
- * Fixed: Post pagination not working properly in D1, D2 and D3 #2168 #2243
665
- * Fixed: Auto re-save permalink if the options in reading setting page get changed #2190
666
- * Fixed: Leave a comment not looking good in Swift theme #2150
667
- * Added: Social icons for pages. #2162
668
- * Added: Create an option to pull canonical from Yoast #2118
669
- * Added: Full Support for All in one SEO #1720
670
- * Fixed: Single with sidebar CSS should only load if that layout type is selected #2091
671
- * Fixed: Required Filed is not working in the Repeater in Page builder #2217
672
- * Fixed: alt in `<div>` causing validation errors. #2093
673
- * Added: Drop Down Menu Support in Swift Header Menu #2095
674
- * Added: Parallax Setting Added in PageBuilder #2095
675
- * Added: Multiple Layout Settings added in Feature Module in Page Builder #2095
676
- * Added: Add the option changing the sliding speed of slider in "Slider module" of AMP Page Builder #2218
677
- * Added: Created an option Related Post link in non amp #2201
678
- * Fixed: Removed Jannah LazyLoad on AMP Mode #2224
679
- * Fixed: Custom post types with custom taxonomy not working in AMP #2209
680
- * Fixed: frontpage and homepage not working properly AMP take over #2153 #2277
681
- * Added: Button field created in Feature module #2068
682
- * Added: Excerpt should also work on homepage and categories page #2176
683
- * Fixed: Options panel breaks in when RTL in WP Dashboard #2176
684
- * Fixed: Featured image from Custom fields in page builder Category module #2237
685
- * Added: Forms Module Support added in PageBuilder #2221
686
- * Fixed: Paginated AMP URL on the category are opening to 404-page #2233
687
- * Fixed: Ads not displaying properly in RTL #2227 #2138
688
- * Fixed: single quotation (') in text module breaking AMP page builder #1940
689
- * Added: Filter created to modify `ampforwp_loop_image_update` image arguments in components of AMP theme framework #2057
690
- * Added: Option to change the locale of Facebook comments #2127
691
- * Added: Search option in options panel #2088
692
- * Fixed: Accordion not working when the user enters some data in Description with HTML Tags #2088 #2097
693
- * Fixed: Internal links now working with ?amp=1 #2204
694
- * Fixed: UTM Parameters not working properly with AMP #2223
695
- * Fixed: Multiple Slider module of AMP Page builder not working #2090
696
- * Fixed: Hide AMP by categories option should hide by default in the backend of that specific post #2112
697
- * Added: IP Anonymization in Google analytics #2135
698
- * Fixed: Improvement in the styling of AMP option panel #2102
699
- * Added: Added new fonts control for Content in Single page #2122
700
- * Fixed: Legacy page builder button styling is not loading properly #2036
701
- * Added: Filter added so we can disable Comments on specific pages `ampforwp_comments_visibility` #2170
702
- * Fixed: Improvement in Excerpt on small screen option #2034
703
- * Added: Comments on Pages #2229
704
- * Fixed: Pagination not working for some websites #2241
705
- * Fixed: "Menu" option in Footer connected with Swift #2146
706
- * Added: Wistia Support #1875
707
- * Added: Add option in page builder to give the specific name to all modules #2251
708
- * Added: Compatibility with Muffin Builder #2137
709
- * Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
710
- * Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
711
- * Added: Render all the AMP Components added in Post Editor #2216 #2228
712
- * Fixed: "Gap" Module of ThemeCo breaking the AMP pages #2220
713
- * Added: Search widget compatibility #2143
714
- * Added: Advertisement Module created in AMP Pagebuilder #2131
715
- * Fixed: Performance issue with the function `ampforwp_get_comments_gravatar` #2234
716
- * Fixed: Empty the amp pages, when the Clearfy HTML compress is enabled #2110
717
- * Fixed: The attribute 'value' appearing in tag 'a' throwing the validation error #2262
718
- * Fixed: Versioning of Styles and Scripts of redux-core #2126
719
- * Added: Related Posts based on X days #2132
720
- * Fixed: Warning in custom-sanitizer.php #2173
721
- * Added: vuukle comment support #2075
722
- * Fixed: Facebook Comment should not appear on the Checkout page, Add to cart page, or shop page #2170
723
- * Added: SpotIM comment support #2075
724
- * Added: Additional Controls added in Design3 Featured slider #2222
725
- * Fixed: Username in AMP Option panel color was too light #2266
726
- * Added: Settings created to modify H1 to H6 #2059
727
- * Fixed: AMP_QUERY_VAR debug issue #2265
728
- * Added: Custom page template in AMP #1923
729
- * Fixed: Comments Button is not displaying in Design #3 #2163
730
- * Added: Ability to add Forms Shortcodes in footer Widgets #2226
731
- * Added: Option to add rel="nofollow" in AMP page builder button module #2239
732
- * Added: Background video option in amp page builder #2195
733
- * Fixed: Drop Down Menu Support in Swift Header Menu #2095
734
- * Fixed: Yoast Description not getting added in AMP #2159
735
- * Fixed: Improvement in styling of AMP option panel #2102
736
- * Fixed: Hide AMP Bulk Tools Improvements #1867
737
- * Added: Compatibility with the Relevanssi Plugin #1503
738
-
739
- = 0.9.96 (2nd June 2018) =
740
- * Added: Fully GDPR Compliance
741
- * Fixed: GTM not working
742
-
743
- = 0.9.86.1 (8th May 2018) =
744
- * A bug causing validation issues has been resolved.
745
-
746
- = 0.9.86 (3rd May 2018) =
747
- * For more detials check out [this blog post](https://ampforwp.com/0-9-86-released-getting-ready-for-future-87th-update/)
748
- * Added: GDPR Compliancy #2040
749
- * Added: Muffin Page Builder Compatibility #1455 #1893
750
- * Added: Thrive leads compatibility #2067
751
- * Fixed: Load structured markup json in Footer to improve performance #1945
752
- * Added: Font Size and Font Family Controls added in Content Presentation Module #1962
753
- * Added: Font Weight Control added in Text Module in PageBuilder #1962
754
- * Added: Other necessary controls added in Content Presentation Module #1962
755
- * Added: New Design called "Design 4" added in Content Presentation Module. #1962
756
- * Fixed: License Activation process connected with AMP extensions #1981
757
- * Added: Icon Selector control added in Button module in AMP Page Builder #1962
758
- * Added: Filter called `ampforwp_get_comments_gravatar` to modify Author Avatar Images #1949
759
- * Fixed: Validation error fixed by removing json+ld values to remove CDATA #1977
760
- * Added: Icon Adjustment Option is added in the Button Module #1962
761
- * Fixed: Debug Warnings fixed #1976
762
- * Fixed: If AMP support on post and page is disabled then mobile redirection was not working #1979
763
- * Fixed: Responsive element added in Image Module #1962
764
- * Fixed: Custom Post and Custom Taxonomies Archives not working in AMP #1957
765
- * Fixed: AMP take over is on and AMP support on the home page is disabled it was redirecting to some other pages #1994
766
- * Fixed: Design 1 and Design 2 shouldn't show 'social' tab #1996
767
- * Added: AMP WordPress Theme notice
768
- * Added: Rewrite Rules Added for WooCommerece #1957
769
- * Fixed: AMP Takeover blog search results giving blank page #1990
770
- * Fixed: Swift pagination markup is present even the page has no pagination #2000
771
- * Fixed: Pagination breaking on second page on Archives when Blog page is not set #1998
772
- * Fixed: Added proper Google API jump link #1966
773
- * Fixed: Advance Index and no-index controls did not had description #1978
774
- * Added: Filter added `amp_blacklisted_tags` in blacklist-sanitizer file
775
- * Added: Hyperlink for image module added #1989
776
- * Added: `ampforwp_get_frontpage_id` a common fucntion created to get post id for AMP frontpage #2025
777
- * Fixed: Comments controls were not working properly #1987
778
- * Fixed: Fatal Error after updating the plugin from 0.9.73 to 0.9.83 version #2017
779
- * Fixed: Filter created `ampforwp_modify_rel_url` to modify rel canonical URL #2012
780
- * Fixed: Remove structured data json if removed from AMP options panel
781
- * Fixed: amp widget appearing twice in design one #2008
782
- * Fixed: Gif in content + Lightbox feature throws validation issue. #2032
783
- * Added: New Features in the Page builder Modules #2029
784
- * Fixed: License Key was not working properly #2026
785
- * Fixed: Instagram comment view is getting cut off in Swift Theme #2002
786
- * Added: Icon module support added in Desgin 1, 2 & 3 #1997
787
- * Fixed: if GD or ImageMagick library is not present in the server then send the original image #2037 #2038
788
- * Fixed: Swift theme homepage (Non-AMP) image resizing issues in Mobile version #1992
789
- * Fixed: Header Element not working in Swift theme #1967
790
- * Fixed: Stop Loading of Latest post scripts on Homepage and Frontpage #2041
791
- * Added: Filter created `ampforwp_non_amp_links()` so users can have all the internal links non-amp #1973
792
- * Fixed: Sanitize the archive description in loop component #1974
793
- * Fixed: Double AMPHTML when FBIA Plugin is active #2043
794
- * Fixed: Image Div is loading even if the image is not present in Swift #2033
795
- * Fixed: Custom AMP editor is visible on pages (post type) even if the Page Support is off from amp options panel #2047
796
- * Fixed: When 'Structure Data for WP' plugin active, Schema type in Structure section should hide #2049
797
- * Fixed: Bugs in Video Module in AMP pagebuilder #2048
798
- * Added: Autoplay feature added in Video Module #2048
799
- * Fixed: Throwing error when Product Structured Data is selected #1975
800
- * Fixed: Advanced CSS is not loading because the files are with hosting path #2046
801
- * Fixed: Double Quotes breaking the html #2004
802
- * Removed: Blog option is removed from AMP Options panel and it is connected with Pages option Under Reading Settings #2027
803
- * Fixed: amphtml should not be created for 404 pages #2018
804
- * Added: 404 Template added, useful for AMP Takeover #2042
805
- * Fixed: Genesis meta titles are lost and not rendering correctly #2050
806
- * Fixed: Search blank on AMP Takeover #1990
807
- * Fixed: Remove Unused js files from Paginated Post Pages #2001
808
- * Fixed: Extra Space adding in H1 and other SEO tags #2054
809
- * Fixed: Undefined Index when called from robot #1960
810
- * Fixed: amp facebook comment Js not loading to the custom front page of the swift theme. #2053
811
- * Fixed: Tags label is not working properly when RTL Support on #1719
812
- * Fixed: View Non-AMP Version In the footer link has an error #2066
813
- * Fixed: Squirrly SEO is Adding the Javascript code in AMP #1696
814
- * Fixed: Translation option issue when using POT file method #1941
815
- * Fixed: amp-facebook-like extension is missing on Custom Frontpage #2061
816
- * Fixed: GTM option repositioned #2056
817
- * Fixed: Menu is appearing on left side instead of Right side when RTL support is ON for Design3 #1928
818
- * Fixed: Sidebar Bugs #1972
819
- * Added: Table Styling in Swift #1961
820
- * Fixed: Genesis index, follow options not being rendered #2071
821
- * Added: Filter created `ampforwp_robots_meta` to modify robots meta information #2071
822
- * Fixed: PHP Notices #2065
823
- * Added: Add a new hook `ampforwp_after_amp_menu` after the menu in all designs #2072
824
- * Added: New Look to Options panel #1823
825
- * Added: Retina Image Support added #1846
826
- * Fixed: Pagebuilder hrefs were stripped in hebrew language #2089
827
- * Fixed: Warning Fixed #2083
828
- * Fixed: Gallery module images not loading in Firefox #1980
829
- * Fixed: Pagebuilder Improvement #2024
830
-
831
- = 0.9.85.5 (21st April 2018) =
832
- * Added: Filter added to modify frontpage post id `ampforwp_modify_frontpage_id`
833
- * Added: Filter added to modify amp template directory `ampforwp_template_locate` #1982
834
- * Other minor bugs fixed
835
-
836
- = 0.9.85.3 (12th April 2018) =
837
- * Added: Custom Post type Archive Page support #1995
838
- * Fixed: AMP TakeOver redirection issues #1994
839
- * Fixed: Debug errors #1976
840
- * Fixed: Social Profile pages were hidden for Design 1 to 3 #1996
841
- * Fixed: Structured Data insertion was adding CData causing validation error #1999
842
-
843
- = 0.9.85.2 =
844
- * Minor Bugs fixed
845
-
846
- = 0.9.85.1 =
847
- * Minor Bugs fixed
848
-
849
- = 0.9.85 (3rd April 2018) =
850
- * For more detials check out [this blog post](https://ampforwp.com/0-9-85-released-stability-update-86th-update/)
851
- * Fixed: Fatal error: Allowed memory size on FrontPage #1865
852
- * Fixed: Proper Parameters for Pinterest Sharing #1853
853
- * Added: Extra settings added in Button Module
854
- * Added: Extra settings added in Text Module
855
- * Fixed: Proper Parameters for Pinterest Sharing
856
- * Fixed: Unwanted fields are removed form the Repeater in Button module
857
- * Added: Enable/disable option added Related Posts #1829
858
- * Fixed: Legacy PageBuilder option Repositioned #1851
859
- * Fixed: Display the img tag only if source is present #1869
860
- * Fixed: Huge design improvements in Swift theme #1818
861
- * Added: Hook for Between Related Post is Added #1874
862
- * Added: Blurb module text size and background color added
863
- * Fixed: Comments Pagination issues #1816
864
- * Added: Counter Module added
865
- * Fixed: Date 48 years ago #1864 #1876
866
- * Added: Ability to pass post id in amp_content() #1872
867
- * Fixed: Changed the way images we fetched in WooWidget #1847
868
- * Fixed: Changed the position of layout in Pagebuilder #1873
869
- * Added: Pricing Module
870
- * Fixed: Changed the position of layout in Pagebuilder #1873
871
- * Fixed: amp_aq_resizer was not able to process the outside url #1881
872
- * Fixed: Advanced Google Analytics improvements #1630 #1860
873
- * Added: Field Added For ON & OFF in Page builder #1870
874
- * Fixed: Two paginations in search pages in Swift theme #1855
875
- * Fixed: Extra Div if categories not available #1856
876
- * Fixed: removed debuged tags #1870
877
- * Fixed: Published date connected with AMP options Panel #1888
878
- * Added: Featured Image option in Swift #1889
879
- * Added: Separate Blog settings #1887
880
- * Fixed: single post ads should not load on pages #1896
881
- * Fixed: Ads should not load on FrontPage if PageBuilder is enabled #1885
882
- * Fixed: Background Image Support for the Columns #1871
883
- * Added: Blockquotes design for Swift #1894
884
- * Added: Co-Authors Plus compatibility #1895
885
- * Added: pagebuilder for custom post types #1884
886
- * Added: Border option is connected to options panel #1818
887
- * Added: Responsive AD unit support #1852
888
- * Added: Sub category arrow symbol is added in Swift theme #1818
889
- * Added: Search text color is connected to options panel #1818
890
- * Fixed: Removed notice when no posttype selected #1884
891
- * Added: Ability to overwrite page template the WordPress way like front-page.php and page-{id}.php #1902
892
- * Added: Ability to overwrite author page template the WordPress way like author.php and author author-name.php #1902
893
- * Added: Lightbox Support for the images #1892
894
- * Fixed: No mobile redirection when Dev mode is enabled #1907
895
- * Added: Option to hide Author name in Swift #1890
896
- * Fixed: Script facebook-comments should not load for Frontpage #1897
897
- * Added: amp-facebook comments for AMP2WP #1911
898
- * Added: Alt tag in all modules #1898
899
- * Added: Sanitizers in Footer and sidebar widget in Swift #1835
900
- * Added: Dropcap support #1900
901
- * Added: Proper styling for iframes and videos in Swift theme #1909
902
- * Fixed: Non-AMP link fixed for AMP Takeover #1916
903
- * Fixed: Swift connected with Breadcrumb option #1915
904
- * Added: Uninstall option created to completely remove AMPforWP data #1903
905
- * Fixed: Recipe Structured Data requires name attribute #1917
906
- * Fixed: No amphtml when It is hidden from Categories #1919
907
- * Fixed: Content is breaking when Inline Related Post option is enabled #1912
908
- * Fixed: Proper redirection setup for AMP Takeover #1913
909
- * Added: Social media profiles added in menu #1901
910
- * Fixed: No Ads should display on Frontpage or Posts if Pagebuilder is enabled #1885
911
- * Added: #1899 Proper conditions for amp-analytics script
912
- * Fixed: Turn off option not working by default fixed #1537
913
- * Fixed: BreadCrumbs Should not load when PageBuilder is enabled #1925
914
- * Fixed: Removed unwanted elements loading while pagebuilder is enabled #1929
915
- * Fixed: amp-web-push should not load on Homepage and Blog #1930
916
- * Added: SmartMag theme Compatibility #1905
917
- * Fixed: Template overriding not working in child theme #1920
918
- * Fixed: Horizontal scrolling in Swift #1844
919
- * Fixed: Home page title should not be visible in AMP takeover #1921
920
- * Added: Carousel Module Added #1937
921
- * Fixed: Comments pagination not working #1816
922
- * Fixed: Comments pagination not working #1816
923
- * Added: Glue html css compatibility #1932
924
- * Added: Data Caption Support on AMP Instagram Embed #1938
925
- * Added: Ability to pass {author_name} and {author_id} added in Advance Analytics #1936
926
- * Fixed: Scrollbar in Header area in Swift in firefox #1818
927
- * Added: Disqus iframe height adjustment option #1935
928
- * Fixed: Options panel conflict fixed with Mobius theme #1942
929
- * Fixed: Problem with Button in Mobile view in Swift #1926
930
- * Fixed: Removed canvas tag in AMP version causing validation errors #1880
931
- * Fixed: Getting Conflict with Facebook Button by BestWebSoft #1740
932
- * Added: Option to enter the "ID" on CTA button module #1931
933
- * Added: Option for open same window in CTA module of page builder #1866
934
- * Fixed: Logo fetch causing Huge performance issue #1679
935
- * Fixed: Blurb module's default values were not set #1952
936
- * Fixed: Allow script with application/ld+json #1958
937
-
938
- = 0.9.84 (14th March 2018) =
939
- * Added: Polylang Frontpage compatibility added #1779
940
- * Fixed: Proper link for Linkedin added #1820
941
- * Fixed: Incorrect function name was Added #1827
942
- * Fixed: Thumbnail resizing issue in Swift #1828
943
- * Fixed: Thumbnail issue in Loops of Design 3 #1714
944
- * Fixed: Hide post builder for Swift #1824
945
- * Fixed: To avoid warnings when there are no pages in WordPress #1810
946
- * Fixed: Condition for the Thumbnail for Swift #1733
947
- * Fixed: Proper Styling for footer for Swift #1733
948
- * Fixed: Line height issue and CSS editor not working in Swift #1821
949
- * Fixed: Renamed aq_resize to ampfrowp_aq_resize to avoid conflicts #1838
950
- * Fixed: Add the prefix to avoid conflicts #1817
951
- * Fixed: Added Custom format option in amp_date #1845
952
- * Fixed: Removed amp-img tag where blank SRC in Page builder #1843
953
- * Fixed: Pagebuilder modal max-height removed so it will become full width #1843
954
- * Added: An option for select target type in Button Module #1822
955
- * Fixed: Remove AMP category widget if swift is enabled #1790
956
- * Fixed: Filter added change mode type #1833
957
- * Added: Rewrite rule for .html blog page #1775
958
- * Fixed: Filter added change mode type #1833
959
- * Fixed: Swift Footer Widget Sanitizer Added #1800
960
- * Fixed: No OneSignal widget when PageBuilder is enabled #1840
961
- * Fixed: span tag added around the pagination text #1834
962
- * Added: Page specific option to add script/html and styles in page builder #1831
963
- * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
964
- * Added: Jarida theme compatibility added #1842
965
- * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
966
- * Fixed: Replace value attribute only from html tags. Otherwise it is removing value from * shortcodes which is breaking the whole page. #1738
967
- * Added: Underline option for content links added #1808
968
- * Added: Page specific option to add RTL in page builder #1858
969
- * Added: Converts AMP ads to normal so ads show when takeover is enabled in Normal Mode #1724
970
- * Added: Converts AMP Analytics to normal so Analytics works when takeover is enabled in Normal Mode #1724
971
- * Fixed: Phone icon proper alignment in Design3 #1730
972
- * Added: ADS for WP activation box in Extensions tab
973
- * Added: New design field added #1861
974
-
975
- = 0.9.83.1 (8th March 2018) =
976
- * Fixed: Pagebuilder contents not shows on custom home page #1794
977
- * Added: Header hook added `ampforwp_advance_header_layout_options`
978
- * Fixed: Load admin files only in admin pages #1799
979
- * Fixed: Conflict with WP bakery pagebuilder #1783
980
- * Fixed: Slide in Menu break in RTL mode #1825
981
- * Fixed: Validation issue in loops due to empty attributes #1795
982
- * Fixed: Featrued Image connected Properly with Swift theme #1733
983
- * Fixed: Changed the disqus.php to disqus.html to pass authentication #1788
984
- * Added: CSS styling for Loop on shop page #1803
985
- * Fixed: Facebook comments not work in swift #1789
986
- * Fixed: Style AMP Category module in Footer swift #1790
987
- * Fixed: Load aq_resizer only in AMP #1805
988
- * Fixed: Proper markup for Pinterest in Design3 and Swift #1793
989
- * Fixed: Proper url for vk
990
-
991
- = 0.9.83 (03rd March 2018) =
992
- * Added: Ability to add amp-carousel and amp-selector directly into WYSIWYG Editor #1588
993
- * Fixed: Debug error caused by Playbuzz Sanitizer #1674
994
- * Added: Show default gravatar for comments #1758
995
- * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
996
- * Fixed: To avoid debug error in swift
997
- * Fixed: Translation improved for some strings #1678
998
- * Fixed: Stop AMP takeover for Feed pages #1767
999
- * Fixed: Menu issues In Design 1 & Design 2 after changing from AMP-Sidebar #1565
1000
- * Fixed: AMP Options panel Not Working After Update (0.9.82.1) version #1761
1001
- * Fixed: Move the label to the top [UX improvement] #1746
1002
- * Fixed: Error with Vue #1745
1003
- * Added: Video Module added in AMP Page Builder #1750
1004
- * Fixed: Sidebar menu is not scrollable swift theme #1769
1005
- * Fixed: View Non-AMP should be usertrailingslashit #1772
1006
- * Fixed: Proper structured data for Blogpage #1660
1007
- * Fixed: Legacy Page Builder not working after the update #1773
1008
- * Fixed: Content blank when only image in content #1778
1009
- * Fixed: Comment ID display issue fixed #1758
1010
- * Fixed: PHP Warning: A non-numeric value encountered in components/logo/logo.php on line 52 #1764
1011
- * Fixed: Yummly support added in Swift #1708
1012
- * Fixed: Demo Link updated #1781
1013
- * Fixed: CSS is not loading in Swift Theme #1780
1014
- * Added: Ability to add Advertisement or Sponsored label under ads #1710
1015
- * Fixed: Featured images distortion in related posts #1684
1016
- * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
1017
- * Fixed: noarchive instead of nofollow in Archive pages #1693
1018
- * Fixed: Internal links of tags are showing “/amp” after changing the end point to “?amp” in design 2 #1752
1019
- * Fixed: line height is added for the logo in Swift design
1020
- * Added: Class for Custom Frontpage #1787
1021
- * Fixed: Recent post enable disable for Swift theme #1784
1022
- * Fixed: Connect Show/Hide AMP option with AMP takeover#1786
1023
- * Fixed: Added sanitizer to footer Widget #1756
1024
-
1025
- = 0.9.82.1 (18th February 2018) =
1026
- * Selector code reverted due to it's effect on carousel
1027
-
1028
- = 0.9.82 (18th February 2018) =
1029
- * View more details on https://ampforwp.com/0-9-82-released-stability-update-82nd-update/
1030
- * Logo Resizing calculation by Pixels and resizing bug solved.
1031
- * Update Notification in the Admin panel will only appear in the AMP options panel. So it will not annoy you anymore.
1032
- * Glue underline is applying for some reason
1033
- * Fatal error after 0.9.81 fixed
1034
- * Facebook comments loading twice on swift
1035
- * PHP Notice: Undefined variable: post_author_name
1036
- * Pagebuilder fix in version 0.9.81 Compatibility with Yoast and other plugins #1749
1037
- * Home loop modifier option added. Allows you to exclude the categories from the loop or include the Custom Post type in the homepage loop.
1038
- * amphtml Conflict with Instant Article for Facebook resolved
1039
- * /amp folder in the theme is applying changes in plugin, which causing a bug, but it’s been fixed
1040
- * Backward Compatibility for AMP Preview
1041
- * SEO Section Improvements
1042
- * Wrong comments count on AMP pages
1043
- * AMP Allow selector in the The Content. You can add tabs and AMP components directly into the loop.
1044
- * If we turn off the Homepage Support then Blog is turned off as well, solved.
1045
- * Post Pagination have two options like “Number of pages” and Previous & Next.
1046
- * Removed the dot from the one Signal Service worker URL if the subdomain isn’t added (Causes Validation issues.)
1047
- * Extra Space due to empty divs in Design 3
1048
- * Remove alt from a tag in the AMP version caused many validation issues.
1049
-
1050
-
1051
- = 0.9.81 (15th February 2018) =
1052
- * Edge case fatal error on features.php fixed
1053
- * Admin dashboard messup CSS fix #1731
1054
- * Custom CSS Output added in Swift
1055
-
1056
- = 0.9.80 (15th February 2018) =
1057
- * View More details on the [blog post](https://ampforwp.com/introducing-swift/)
1058
- * AMP Page Builder 3.0: The AMP Page Builder is a lightweight and much stable than ever and works flawlessly! [Read More](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
1059
- * Swift: The New Default Theme, which you can select from the design section of the Page builder.
1060
- * A way to create a Child Theme for AMP [read more](https://ampforwp.com/tutorials/article/child-theme-amp/)
1061
- * Make AMP & Non-AMP Same: We have an amazing new option called AMP to WP which will generate the WordPress version of the AMP design which will be viewed on the canonical version of the website.
1062
- * AMP Takeover: You can deliver a fully AMP compatible website with this option. It will basically take over the non-amp version and deliver an AMP version to your desktop and mobile users, on WordPress & AMP version. That’s why it was called AMP Takeover
1063
- * Logo Resizing made easy
1064
- * Typography Options
1065
- * 3 Headers design in swift theme
1066
- * Error while sharing the image on Pinterest #1699
1067
- * Homepage support was not working ( when page support is off ) #1695
1068
- * Custom Permalinks rewrite issue solved #1689
1069
- * Custom post type was appearing two types #1688
1070
- * Theia Post Slider plugin incompatibility with post pagination fixed #1677
1071
- * Link to the categories in loop of Design 3 #1632
1072
- * amphtml was not working when plain permalink selected along with static page as homepage #1614
1073
- * AFS Analytics Integration added #1605
1074
- * Removed the blank spaces from analytics id field to deliver a good UX. #1599
1075
- * ?amp endpoint feature added #1561
1076
- * Ability to remove the excerpt and image from related post #1510
1077
- * Thumbnails on-the-fly generation added for better control over the design.
1078
-
1079
-
1080
- = 0.9.74 (23rd January 2018) =
1081
- * View More details on the [blog post](https://ampforwp.com/0-9-74-released-stability-update-79th-update/)
1082
- * Fixed: Push Notifications button alligned in center #1500
1083
- * Added: Meta robots tag support from Yoast #1563
1084
- * Added: Option to Disable wptexturize/smart-quotes Support #1458
1085
- * Fixed: Changed the label id to avoid conflict with Advanced AMP Ads #1591
1086
- * Fixed: esc_attr causing validation issues with single and double quotes #1616
1087
- * Fixed: Image stretching problem resolved when "Featured Image from the content" was set #1580 #1582
1088
- * Added: Create Template by Custom taxonomy name like product-jeans.php in AMP Theme FrameWork #1594
1089
- * Added: Custom Post type support added in the Core #1612
1090
- * Fixed: custom-amp-content.php cleaned with PHPCS #1497
1091
- * Added: Basic Product(WooCommerce) support added #992 #1276 for full WooCommerce Support please check this [Extension](https://ampforwp.com/woocommerce/#utm_source=readme-log&utm_medium=0.9.74-readme&utm_campaign=AMP%20Plugin)
1092
- * Added: Proper fallback support added if the current active AMP theme is not available #1624
1093
- * Fixed: Resolved debug errors #1622
1094
- * Added: All in One SEO compatibility #1557
1095
- * Fixed: Load AMP Styling only on AMP pages #1441
1096
- * Added: 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber) #1265
1097
- * Fixed: itemprop="url" was adding in non-amp #1626
1098
- * Fixed: SiteOrigin Pagebuilder compatibility with Custom Frontpage #1592 #1593
1099
- * Added: MediaAce lazy load compatibility of Bibmer Theme #1472
1100
- * Fixed: Content Links plugin was causing validation errors #1569
1101
- * Added: Filter added called get_content_from_dom to modify the output in AMP function #1462
1102
- * Added: amp_breadcrumb component added in AMP Theme Framework #1636
1103
- * Fixed: Sidebar Styling and proper sanitizer updated
1104
- * Added: amp_author_meta component added in AMP Theme Framework #1641
1105
- * Fixed: amp_post_pagination component improvement in AMP Theme Framework
1106
- * Added: Ability to add link classes in amp_post_pagination in AMP Theme Framework
1107
- * Fixed: amp_author_meta image code improvement in AMP Theme Framework
1108
-
1109
- = 0.9.73 (15th January 2018) =
1110
- * View More details on the [blog post](https://ampforwp.com/0-9-73-released-stability-update-78th-update/)
1111
- * Added: Instagram Sanitizer added to process Instagram Embeds inside the BlockQuotes #1581
1112
- * Added: Option Created to Enable/Disable rel="nofollow" for View Non-AMP link #1572
1113
- * Fixed: Custom AMP Content was not working with Elementor Pagbuilder #1495
1114
- * Fixed: ampforwp_is_front_page() is not working in the newspaper theme #1583
1115
- * Added: Allow people to use multiple Analytics on AMP #1124
1116
- * Fixed: 'https' error with PlayBuzz Embeds #1481
1117
- * Added: Option to show last modified date instead of Published date #1496
1118
- * Fixed: Add proper permission for ampforwptourinstaller page
1119
- * Fixed: Debug warnings #1586 and #1459
1120
- * Fixed: A lot of Security Fixes has been done #1497
1121
- * Fixed: Removed lot of unused code #1497
1122
- * Added: AMP skip for checkout page #1443
1123
- * Added: Show the list of Child pages at the end in Parent Page with on/off #1551
1124
- * Fixed: Properly strip shortcodes fom Structured data description #1512
1125
-
1126
- = 0.9.72 (6th January 2018, Happy New Year) =
1127
- * View More details on https://ampforwp.com/0-9-72-released-stability-update-77th-update
1128
- * Related Posts Image stretching in Design 3 AMP theme Framework #1482
1129
- * RTL option must be integrated into AMP theme Framework #1562
1130
- * `DOMDocument::loadHTML():` Attribute itemprop redefined warning fixed #1539
1131
- * Created an option to add Author bio article in Facebook Instant Article #1521
1132
- * Options to add push notification button above and below the content #1571
1133
- * Copy the Content button for Custom Post types #1532
1134
- * Alexa Metrics Compatibility added #1536
1135
- * Logo styling added with amp_logo. So styling can work with AMP Theme Framework. #1520
1136
- * Content parsing login improved, so it will not through any warnings if the content has only 1 paragraph. #1523
1137
- * Debug Warnings removed #1564
1138
- * Caption in the Gallery creating validation errors Fixed. #1549
1139
- * Tables Link color should be as same as the link of the body #1559
1140
- * Separate options for In-Content related posts #1546
1141
- * WebPage Schema Type added in Structured Data options #1558
1142
- * Fatal Error fixed with `mb_detect_encoding()` after enabling the minify option #1494
1143
- * Content blank or fatal errors due to itemscope and itemtype, fixed. #1570
1144
- * Performance improved. Due to `_transient__redux_activation_redirect` transient. #1526
1145
-
1146
- = 0.9.71 (1st December 2017) =
1147
- * Design 2 Post Titles issue fixed
1148
- * Instant Articles validation issue fixed.
1149
-
1150
- = 0.9.70 (30th November 2017) =
1151
- * View More details on https://ampforwp.com/0-9-70-released-stability-update-76th-update/
1152
- * Image alt tags are empty which caused issues. #1154 (thanks to @liagua)
1153
- * ALT and IMG tags are in one line #1442
1154
- * Updated the permalink for post view in admin area #1318
1155
- * aria-current causing validation issues #1427
1156
- * Aligning Captions in the Bottom in Gallery #1428
1157
- * Logo’s height & width should dynamically come from the logo. This was a great UX improvement in my opinion. The logo would good regardless of the kind of image you upload. #1429
1158
- * After 0.9.69.1 update Call to undefined function mb_convert_encoding #1447
1159
- * Featured image options now also reflect the structured data #1430
1160
- * Blur & Stretching issues of Design 3 thumbnails are now fixed. They’re crisp and clear than ever! #1227
1161
- * Related posts are showing on single even when turned off #1434
1162
- * Show Related posts CSS only when it is selected #1356
1163
- * Author image now displays on author pages #1426
1164
- * Category base removal in AMP from url option is only working on the first page #1418
1165
- * Bug fixed: PHP Warning DOMDocument Empty string supplied as input #1449
1166
- * Video support added in Instant Articles #1300
1167
- * Read more tag in Instant articles issue fixed #1415
1168
- * Amp carousel issues fixed #1446 #1456
1169
- * Compatibilty with Envira Gallery Lazy Loading #1432
1170
- * Inline Related Posts in AMP Theme Framework #1457
1171
- * Different number of in-content related post and related posts at the footer #1448
1172
- * FooGallery update broke all the AMP compatibility, but we fixed it from our side so that user’s gallery work perfectly #1424
1173
- * WPBakery Page Builder Conflict solved #1419
1174
- * Goodlife theme Lazy Load compatibility added #1416
1175
- * AMP-Facebook-Like Was found but unused Validation Error fixed. #1463
1176
- * Playbuzz not displaying if added with https: #1466
1177
- * Options Panel labels renamed for better understanding.
1178
-
1179
-
1180
- = 0.9.69 (20th November 2017) =
1181
- * View More details on https://ampforwp.com/0-9-69-released-stability-update-75th-update/
1182
- * One Signal Push Notifications bug fixed! #1404
1183
- * AMP theme framework Related posts extended so that it can be used as a loop format #1406
1184
- * Facebook like Button improvements #1405
1185
- * Add layout responsive tag to image module in page builder #1373
1186
- * Strip the shortcodes from Structure data area #1389
1187
- * Test HTTP API Call From admin panel by redux #1391
1188
- * Meta description tag in normal site Unicode character is different from AMP site unicode character. #1369
1189
- * Updated the check for ampforwp_is_amp_endpoint this should fix the issue #1372
1190
- * Updated the URL for design 3 so it can work with plain permalink #1318
1191
- * Updated the option Featured Image from The Content #1367
1192
- * If “Featured Image From The Content is enabled and Duplicate Featured Image” is disable it will remove all the duplicate images from the content. #1375
1193
- * Date Format under Homepage improvements #1408
1194
- * Warnings due to inline related posts in Homepage #1413
1195
- * Plain Permalinks Support improved. #1318
1196
- * Allow Homepage title of Bread Crumbs feature to be changed from Translation Panel #1414
1197
- * Debug Errors in AMP Theme Framework #1403
1198
- * Unnecessary loading of Merriweather fixed, it will only load in the Design 1.
1199
- * Enter Phone Number is not Appearing when switch to Call now button #1425
1200
- * Need excerpt below the title, above the meta #1399
1201
- * Remove the Separator piple symbol from the footer when “Back to Top link” is off #1417
1202
- * Display Child or subcategories on Category pages. #1385
1203
- * Add Caption in the Gallery Image feature conflicting with Gallery widget #1407
1204
- * Youtube Shortcode embed with &rel=0 support #1378
1205
- * Filter for Excerpt custom text in the AMP options #1411
1206
- * WPML Multilingual CMS plugin flags compatibility #1270
1207
- * Compatibility with Tasty Recipes plugin and other page builders with amp page builder #1431
1208
-
1209
-
1210
- = 0.9.68 (12th November 2017) =
1211
- * View More details on https://ampforwp.com/0-9-68-released-stability-update-74th-update/
1212
- * ADs are Optimize For Viewability, meaning it will try to load faster than the original AMP AD loading strategy.
1213
- * Content was disappearing issue was resolved #1392
1214
- * Featured Image from The Content option is connected to related post #1339
1215
- * Fix amp-web-push helper iframe configuration URL #1387
1216
- * Facebook Like button added to AMP #1327
1217
- * WPML support for AMP Improvement #1285
1218
- * Debug Errors fixed #1366
1219
- * Setting ad density for Facebook Instant Articles ads #1287
1220
- * Showing the number of comments in Single #1341
1221
- * Styling added to the sitewide ads and made sure that they are in the center. #1343
1222
- * One Signal buttons Translation added #1383
1223
- * Article type added to Structured data #1344 #1354
1224
- * The issue with the amp-carousel when RTL was enabled #1358
1225
- * amp-carousel with images of different sizes #1358
1226
- * a bug where Img is getting converted to amp-img if there's no height or width. which causing validation issue and image is not visible fixed.
1227
- * Instant Article should have a default value for number of posts, it was causing the memory issue with alot of posts #1390
1228
- * Notice if a post has no author data #1338
1229
- * Added a new redux extension select field in redux framework #1349
1230
- * Issues with galleries as well as gallery captions #1363
1231
- * Added a hook for adding anything in between the loops #1396
1232
- * Hide meta boxes as per the user level types #1340
1233
- * A Switch between the Date formats #1384
1234
- * Fix: Jannah theme lazy load issue #1362
1235
- * Issues with galleries as well as gallery captions #1363
1236
- * Create Dynamic url of amp according to the permalink structure #1318
1237
- * Minor code performance improvement.
1238
- * Archive titles in Design 3 frontend issue
1239
-
1240
- = 0.9.67.0 (6th November 2017) =
1241
- * View more details on https://ampforwp.com/one-signal-push-notifications-for-amp/
1242
- * OneSignal Push Notifications integrated #807
1243
- * Vimeo embed support added
1244
- * SoundCloud embed support added
1245
- * Pinterest embed support added
1246
- * PlayBuzz embed support added
1247
- * DailyMotion embed support added
1248
- * Fix: Handle issues with data uri images in CSS #1033
1249
- * Fix attribute when adding AMP Mustache lib #1033
1250
- * Fix: Output CSS for feature image #1033
1251
- * An option added for users who don't want to receive update notifications #1342
1252
- * Structured data nav improvement
1253
- * Sitenavigationelement has been implemented correctly for footer menu. #1345
1254
- * Style sanitization for Menu Items #1359
1255
- * Polylang flags support for menu  #1360
1256
- * Mobile Redirection issues fixed #1173
1257
- * Jetpack fatal error fixed #1355
1258
- * AMP Page Builder requires a button to be clicked, so the scripts are not running on the runtime making it easy on the edit screen page and avoid the possible script conflict.
1259
- * Needs proper CTA Bar's styling. #1361
1260
- * Debug errors on archive pages #1353
1261
- * Preview shall only be loaded on click rather than in background #1331
1262
- * ampforwp_is_home() function code improved
1263
- * making sure scripts and styling is properly adding when sanitizing the sidebar #868
1264
- * All the backend css and js should be versioned, so it's not cached. #1335
1265
-
1266
- = 0.9.66.1 (30th October 2017) =
1267
- * Fatal error if has version less than WP 4.8 fixed
1268
- * More Minor Validation errors fixed
1269
- * Odnoklassniki sharing button is not working #1337
1270
-
1271
- = 0.9.66.0 (29th October 2017) =
1272
- * View more details on https://ampforwp.com/0-9-66-released-bug-squashing-oct-2017-72nd-update/
1273
- * Design 3 & Design 1 are optimised with 90+ Google PageSpeed Score on Mobile and 95+ in desktop performance #1273
1274
- * Featured Image from the content for blog and homepage #1295
1275
- * Category Module for AMP Page builder added #888
1276
- * Don't load unused CSS selectors. All the CSS is conditionally loading, to decrease the number of CSS loaded per page and increased in performance #1292
1277
- * Twitter Video embed code support added in AMP #1307
1278
- * Video Posting Structured data #1293
1279
- * Navigation menus are now Schema compatible for better Structured data integration #1229
1280
- * Yoast checking conditions for Structured Data Improved #1293
1281
- * Added "back to Top" in design 3 #959
1282
- * Proper blog check and author for custom frontpage #1260 (Made some changes to check the blog properly and also added the author details for Custom Frontpage)
1283
- * AMP not working on password-protected pages #1192
1284
- * Debug errors reported by the user #1284 and few more we found internally
1285
- * Inline Style Sanitizer for Comments to avoid any validation issues #1193
1286
- * Next/Previous links removed from pages #1268 props @Frenchomatic
1287
- * WPML Multilingual CMS plugin flags compatibility added #1270
1288
- * Image sanitizer added for the Sidebar #1270
1289
- * Added AMP Components the correct way. Added amp-gist, amp-social-share. #336
1290
- * amp-video script added - Which decreases the non-critical validation issues #991
1291
- * Arrows in Design 3 pagination #1000
1292
- * Author page links in Single #1282
1293
- * Added previous open state of option panel and show again when search clean #1238
1294
- * Odnoklassniki Social Sharing Support for AMP (with target blank for better bounce rate) #1230
1295
- * GIF or animated images resize problem fixed #1281
1296
- * In Design1, Header Background & Link Color have same option #1249
1297
- * FB Pixel for AMP added #1231
1298
- * Structured Data Type option for AMPed Custom Post types only #1259
1299
- * Attribute ‘readability in the tag ‘div’ removed - this decreases the validation issues #1306
1300
- * AMP Theme Framework Improvements: loop, author, related_post, Add Author support #1311
1301
- * Commentator's Avatar in the comments section #1132
1302
- * Remove 'Welcome to AMP' from Dashboard sub-menu and moved to the options area to decrease the annoyance and increase the user happiness #902
1303
- * Option to Sort the Random Order of Related Posts to increase the audience engagement (Default is 'ID', on enabling the option it will change to 'rand') #1250
1304
- *  View AMP on Admin Bar for the respected page/post If enable. #1236
1305
- * google maps iframe link to larger map #1099
1306
- * Comments now jumping due to the slash at the end #1309
1307
- * Page Builder causes Incompatibility with the Divi theme (We restructured the Text Module for Page builder for better compatibility and UX) #1162
1308
- * Inline Style Sanitizer for Comments added. Less Critical Validation issues and Better Presentation #1193
1309
- * WPML amp-html error fixed #1285
1310
- * Radio button not working for Show View more Button" #1018
1311
- * Added registered handle for tinymcePointer localize data #1301
1312
- * Date in the Design 2 should not be hidden in mobile version #1315
1313
- * Page builder not working on homepage(Selected as front page) #1316
1314
- * Instant articles number of posts option #1271 (Removed some unused code as well, it will rendered all posts if none is enter in the options)
1315
- * Auto flush on save for FBIA to improve the UX.
1316
- * Plain Permalinks Support improved. #1318
1317
- * Tables support added to FB Instant Articles #1266
1318
- * Demo link added in the Theme selector option #1248
1319
- * Remove invalid attributes from multiple tags which reduces critical validation errors and validates pages.
1320
- * AMP makes a problem in archive page label, when it is active in non-amp version #1304
1321
- * placeholder-icon.png is 404 fixed #1310
1322
- * Category & Tags switches for Single added. #1055
1323
- * Copy Content (Custom AMP Editor) Option Not showing with Page Builder of SiteOrigin issue fixed #1280
1324
- * Improving UX with: when AMP support is off for a specific post type then all the AMP related metaboxes should be removed #1289
1325
- * Options Panel Options rearranged, labels rewritten, descriptions repositioned for better User interaction [commit]
1326
-
1327
- = 0.9.65.2 (25th October 2017) =
1328
- * TypeWatch is not a function #1299
1329
- * Error with BackupBuddy fixed #1303
1330
-
1331
- = 0.9.65.1 (24th October 2017) =
1332
- * AMP Minifcation Issues fixed
1333
-
1334
- = 0.9.65 (22nd October 2017) =
1335
- * View more details on https://ampforwp.com/new/
1336
- * Favicon for AMP #1039
1337
- * AMP Minification option added with Performance Tab in Options #1286
1338
- * Post support is turned off then Meta box should also be removed #1253
1339
- * Excerpt Length feature in Design two and Three #1122
1340
- * Test Contact form plugins and their settings in the options panel #1121
1341
- * Mobile preview in Edit Screen #1082
1342
- * Search feature for Options Panel #1238
1343
- * WordPress Social Share Buttons Validation Issues #1272
1344
- * itemtype attribute is striping in the ul tag #1210
1345
- * Debug Error in Breadcrumb 0.9.64 #1267
1346
- * Disable AMP linking at Wordpress Search Page #969
1347
- * Featured Image is missing #1071
1348
- * Removed ampforwp_plugin_activation_notice #1034
1349
- * Add VK (Vkontakte) Sharing Button #1187
1350
- * Grab the first image instead of post thumbnail for featured image #1189
1351
- * AMP theme framework core changes #1274
1352
- * Grab the first image instead of post thumbnail for featured image #1189
1353
- * Create a Switch on Top of Page Builder #1279
1354
- * Inline Related Posts added that helps you with improving bounce rate #1078
1355
- * Caption Support in Image Gallery Carousel #1172 #1136
1356
- * Instant Articles feed shows sticky posts on top #945
1357
- * Added search check, to fix debug notice
1358
- * Option to hide date from Design 1 & Design 3 Homepage Loop #1264
1359
- * UI labels improvements in the Options panel
1360
- * Sorting out design #2 static front page #1175
1361
-
1362
- = 0.9.64 (15th October 2017) =
1363
- * View more details on https://ampforwp.com/new/
1364
- * Structured Data Type option added. You can now change the structured data format for Posts, Pages and Custom post types #323
1365
- * When comments plugin activate, Comments section should remove. #1093
1366
- * Notification causes a validation error. #1147
1367
- * CSS !important need sanitization #1225 - This will help us to validate tens of thousands of pages.
1368
- * Strange spaces when using Sassy Social Share #1185
1369
- * Remote CDN use? Let's host it? #549
1370
- * Typo fix for Linkedin Profile Page URL section #905 [Thanks to Prayag @pra85]
1371
- * Replace fastimage with fasterimage for PHP 5.4+ #1191
1372
- * Debug Errors Post 0.9.63 #1219
1373
- * Ad5 code injected twice #1116
1374
- * Homepage Support must be Off when we turn Off Homepage Support. #738
1375
- * Add custom class in post pagination for styling #1100
1376
- * Removed the Lazy Loading issue of Schema Theme #1170
1377
- * H1 tag for archive titles (Commit) #1155
1378
- * Alt tag for the Logo #1155
1379
- * Design 3 Menu RTL issue fixed #1106
1380
- * Ability to add dynamic classes in body tag #1237
1381
- * Warnings fixed on 404 page #1243
1382
- * Properly structured data for Homepage, Custom Frontpage and Blog #1155 #1242
1383
- * Option added to Enable/Disable categories and Tags links from Single #1155
1384
- * Fatal error after 0.9.63 fixed #1220
1385
- * Debug Error due to vendor AMP #1213
1386
- * PHP warning on line 147 after 0.9.63 #1241
1387
-
1388
- = 0.9.63 (8th October 2017) =
1389
- * View more details on https://ampforwp.com/new/
1390
- * Category and Tag Base Remover as core features #1079
1391
- * Hide AMP on Posts option added #935
1392
- * Installation Setup Screen Added for new users
1393
- * Validation for the session in PHP #1158. PR by Bryan Contreras @bryan3561
1394
- * All the amp pages should work perfect with Plain Permalink settings #488
1395
- * WYSIWYG TinyMCE editor added for the Text Module in AMP Page Builder #1205
1396
- * WPML Static Front Page Support for title and description with Yoast. #1143
1397
- * Row Settings area added for AMP Page Builder #1148
1398
- * xlink attribute causes Validation Issues #1149
1399
- * Posts with no images on Archive pages are squeezed to 65% #1058
1400
- * Body Class to target specific pages #1123
1401
- * Option to enable/disable Breadcrumb #1129
1402
- * Debug errors due to Breadcrumbs fixed #1109 #1130 #966
1403
- * Visit AMP option added below the View Site in Dashboard. #1076
1404
- * Many Debug errors fixed #1109
1405
- * Textarea for body tag which will help people add AMP Auto Ads #1064
1406
- * Structured data improvements #1048 #1044 #1085 #1118
1407
- * Twitter share URL based on users choice, you can allow people to share pretty links and short links. #1097
1408
- * Author Avatar removed code fixed which has been displayed in the div "amp-wp-meta amp-wp-byline". #1087
1409
- * Only one figure element is allowed in the article header FB Instant Articles #1127 & #1157
1410
- * Image alt tags are empty and cause issues fixed. #1154
1411
- * Button to copy the content into Custom AMP Editor #783
1412
- * Rename AMP loop widget areas or add proper descriptions #1045
1413
- * Trailing slash issue #1095
1414
- * Related Posts by Post type featured added #1141
1415
- * Ultimate Social Media Icons plugin causes validation issues fixed #1135
1416
- * Adding proper path for functions.php, it was causing strange fatal errors and irregular white screen of death fixed  #1144
1417
- * A smooth way to migrate from other AMP plugins to AMPforWP #1051
1418
- * Alert added on AMP by Automattic installation. #1180
1419
- * Insertion of strange spaces around H1 titles #1069
1420
- * AMP Page Builder and HTTPS #1164
1421
- * You can display comments from more than one vendor such as displaying WP & FB Comments #1150
1422
- * Rename AMP loop widget areas or add proper descriptions #1045
1423
- * FrontPage featured image with srcset #1063
1424
- * An option for Showing featured image from custom field #1098
1425
- * Added the Custom Front Page Title From Yoast SEO #1163
1426
- * Commenting breaks SSI directives causes to display error #1179
1427
- * rel canonical appears more than once in search pages #1195
1428
- * Dev mode in AMP #1083
1429
- * Social Sticky Icons Improvements #1061
1430
- * Grand-Child support added in Design #1152
1431
- * amp-accordion non-critical error in Design 3 & CSS improvements fixed #1152
1432
- * Incorrect @id for mainentity #1080
1433
- * Hide AMP by specific Categories tweaked for performance. Thanks to Joshua Eichorn @jeichorn CTO at Page.ly #1133 - Huge Thanks!
1434
- * amp-auto-ads for sites with RTL support ON #1176
1435
- * Redirected the Google forms to our contact page so that we can take each and every query and answer every person. #1201
1436
- * ui-state-highlight class was conflicting with ACF date picker fixed #1199
1437
- * Responsify WP Lazy loading causes blank image (Compatibility) #1131
1438
- * amp-carousel scripts loading on the second page fixed in Design 3
1439
- * Show Design screenshot while selection of design #1209
1440
- * Switches Redesigned for better UX #1211
1441
- * Welcome Page UX Improved #1214
1442
-
1443
- = 0.9.62 (25th September 2017) =
1444
- * View more details on https://ampforwp.com/new/
1445
- * INTRODUCING Page Builder 2.0 for AMP! [Learn More & Watch the Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
1446
- * Documentation & Help links improved
1447
- * Post type specific classes for targetting
1448
- * Design name restored in Options panel (It was recently renamed to Appearance)
1449
- * Minor Bug fixes as well
1450
-
1451
- = 0.9.61 (10th September 2017) =
1452
- * View more details on https://ampforwp.com/options-restructured/
1453
- * Options Panel Restructured Options were dividing into two parts: Settings and Appearance.
1454
- * AMP Theme Framework Core Support Added. You can now create themes of your own in just minutes.
1455
- * WPML Static Front Page Support #1111
1456
- * Notification message disables when CF7 & gravity form is activated. #1107
1457
- * Space after On in Design 3 #1114
1458
-
1459
- = 0.9.60 (4th September 2017) =
1460
- * View more details on https://ampforwp.com/0-9-60-released-improved-redirection-66th-update/
1461
- * Class added to View non-amp anchor tag
1462
- * Params added properly to get rid of a warning #1077
1463
- * rel=attachment noopener generating validation errors #1090
1464
- * Breadcrumbs Support Added #701
1465
- * Enable / Disable button added for Navigation Menu #735
1466
- * Move the ad code for Instant Article down after the article #964
1467
- * Add analytics code of FB instant articles properly #1096
1468
- * datetime Tag not stripping properly #1043
1469
- * Mobile redirection on custom post types #1028 #1052
1470
- * Mobile Redirection causing extra redirect #879 #933
1471
- * Proper mobile redirection on Homepage #1052
1472
- * View non-amp on blog will redirect to blog
1473
- * Blog will redirect to blog irrespective of AMP Homepage option #871
1474
- * Dont redirect if archive support is disabled #1052
1475
- * non-amp category pages should redirect to non-amp pages if turned off from Hide AMP #999
1476
- * Disable amp for forum plugin (wpforo) #592
1477
-
1478
- = 0.9.59 (23th August 2017) =
1479
- * Design 3 Images were not aligned properly. Fixed. #1040
1480
- * Caption in the design 3 improved
1481
- * Jetpack File not loading throwing fatal error #1038
1482
- * If the mobile redirection is ON and the category is excluded to display the AMP then it should redirect properly
1483
- * Custom Editor Compatibility issue with SiteOrigin PageBuilder fixed #997
1484
- * Native Twitter Embed support
1485
- * Added a hook after the body tag: ampforwp_body_beginning (commit)
1486
- * GTM in AMP Improved #958
1487
- * WP User Avatar compatibility Added #975
1488
- * Alt tag on frontpage featured image added #1050
1489
- * Blurred Images on the frontpage fixed #1050
1490
- * Need to escape alt tag #1049
1491
- * Debug errors & PHP warnings were fixed #859 #811 #830 #810
1492
- * Proper rel canonicals for inner pages #1047
1493
- * Added Video sanitizer for comments #1053
1494
- * When activating the AMP plugin, display a notification in the popup. #1036
1495
- * Video Sanitizer added for Comments
1496
-
1497
- = 0.9.58.1 (9th August 2017) =
1498
- * Jetpack conflict issue solved #1038
1499
- * Genesis SEO Support added #1013
1500
- * Fixed Wrong SEO title issue #1013 and #836
1501
- * Design 3 Carousel script loading method improved #990
1502
-
1503
- = 0.9.58 (9th August 2017) =
1504
- * View more details on https://ampforwp.com/new/
1505
- * Genesis SEO for AMP support added
1506
- * AMP 0.4.2 Vendor Bundled for making it crash proof
1507
- * Archive desc only on 1st page #1029
1508
- * Ads are not working after 0.9.6 #1030
1509
- * Fixed the Post 0.9.57 Update Bugs #1025
1510
- * All Images are aligned on left side in design 3 #1031
1511
- * Custom frontpage title issue in Design 3 fixed
1512
-
1513
- = 0.9.57 (5th August 2017) =
1514
- * See the Full changelog https://ampforwp.com/0-9-57-released-compatibility-issue-fixed-62nd-update/
1515
-
1516
- = 0.9.56 (31st July 2017) =
1517
- * View more details on https://ampforwp.com/page-break-in-amp/
1518
- * Page Break / NextPage (Pagination) Support Added #834 #857 (Improvement)
1519
- * Show/Hide AMP for Categories of Posts or All posts #872 (Improvement)
1520
- * Adding analytics capabilities to Instant Articles #978
1521
- * JetPack Plugin Conflict Solved #971
1522
- * Social sharing code improved. amp-social-share js is getting added for line and WhatsApp social share #981
1523
- * Code improvement for rel canonicals(home and archive)
1524
- * Perfect SEO URL + Yoast SEO Compatibility #982
1525
- * Some styling for tags to show up properly
1526
- * Undefined index notices #960
1527
- * Non-amp category pages should redirect to non-amp pages if turned off from Hiding AMP #999
1528
- * Page builder text and button module issues #972
1529
- * Documentation links updated in the Options panel
1530
-
1531
- = 0.9.55 (13th July 2017) =
1532
- * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
1533
- * Disqus Comments show up even when disabled per post #931
1534
- * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
1535
- * H3 inside OL in Related-Posts.php #930
1536
- * Advertisement Options in Instant Articles #943
1537
- * Incompatible with bootstrap plugin #525
1538
- * Error in tag and category links #934
1539
- * Pagebuilder Button module link had issues #951
1540
- * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
1541
- * WPtouch Pro Compatibility Issues #927
1542
- * Better scripts compatibility in Single of post types #757
1543
- * Instant Articles Error: "The HTML element does not contain any text" #949
1544
- * added a filter in all the dates so a user can change the date format and modify #962
1545
- * Design3 Menu Arrows are clickable along with the links #952
1546
-
1547
-
1548
- = 0.9.54.2 (4th July 2017) =
1549
- * Minor bug post 0.9.54 bug fixed
1550
-
1551
- = 0.9.54 (4th July 2017) =
1552
- * View more details on https://ampforwp.com/new/
1553
- * Facebook Instant Articles Support #862
1554
- * Exclude Some Pages from Mobile Redirection #914
1555
- * After 0.9.53 update amp-social-share js missing (critical issue) #924
1556
- * Hooks added in Header (above and below)
1557
- * View non AMP[Code improvement] #928
1558
- * Pages are not supposed to show meta like this, especially Categories #894
1559
- * Monarch plugin having design issues #925
1560
- * Show AMP Hide AMP Check Box Fixes #794
1561
-
1562
- = 0.9.53 (19th June 2017) =
1563
- * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
1564
- * Compatibility Issue with Rocket Lazy Load plugin #907
1565
- * Link color issue with UX of Color Pickers in Design 3 #731
1566
- * amp-analytics js appears more than once when Google tag manager is used #885
1567
- * SEO by SQUIRRLY is adding analytics twice #678
1568
- * Fatal error when WPSEO is activated #900
1569
- * Design 3 Sticky header should have an option #625
1570
- * Search form was enhanced, it can now be used on the websites without https certificate. That will certainly fix a lot of validation issues. #912
1571
- * Yandex Metrika support in AMP #585
1572
- * Histats Analytics Support #880
1573
- * Chartbeat Analytics Support #882
1574
- * Do not strip Rel from anchor tags #790
1575
- * Design close Resulting Blank Screen in AMP Site #642
1576
- * Logo size is not applying #817
1577
- * AMP Publisher logo guidelines #162
1578
- * Remove amp-social-share extension .js from Custom Frontpage #899
1579
- * Add compatibility with Sassy Social Share #679
1580
- * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
1581
-
1582
- = 0.9.51.1 (12th June 2017) =
1583
- * Redirection issue after 0.9.51 Update.
1584
- * Improved compatibility with plugins.
1585
-
1586
- = 0.9.51 (8th June 2017) =
1587
- * View more details on https://ampforwp.com/page-builder-released-in-amp/
1588
- * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
1589
- * Comments are not showing properly when words are long #861
1590
- * Remove amp-social-share extension .js from Pages #853
1591
- * The tag amp-sidebar extension .js script’ appears more than once in the document #828
1592
- * Remove Advertisement tab #839
1593
- * Compatibility with Slide-in Plugin by WPMU dev #866
1594
- * Mobile redirection issue with bbpress #867
1595
- * All the data must be properly sanitize in the sidebar #849
1596
- * AMP html should not be added on the second page of comments
1597
- * Author page’s support #456
1598
- * URLs in comments should be clickable(links) #869
1599
- * Featured image should be centered in desktop mode #870
1600
- * Added More Hooks #721 (Documentation on this coming soon!)
1601
- * Page 2 goes to the wrong URL #865
1602
- * Proper Title and meta for homepage and posts #850
1603
- * Gist Support added #608 Just add a shortcode and enjoy Devs (Ex: amp-gist id="b9bb35bc68df68259af94430f012425f )
1604
- * /blog/amp pagination not working #875
1605
- * separate the Text and Date format in design 2 #876
1606
- * Comments show in AMP w/o breaks between paragraphs #873
1607
- * If no featured image below hooks are not working #877
1608
- * Change meta name Viewport and its value #878
1609
- * Bolt icon in option #474
1610
- * Code restructuring and code quality improvements.
1611
- * Create a seperate function for comment code in frontpage.php #682
1612
- * Remove all the duplicate code from frontpage.php of all the designs and use hooks to add the code instead of static code #889
1613
- * Few Debug errors removed.
1614
-
1615
- = 0.9.50 (24 May 2017) =
1616
- * View more details on https://ampforwp.com/facebook-comments-in-amp/
1617
- * Design 3 Social Icons issue #832
1618
- * View non AMP leads to /?nonamp=1 #814
1619
- * Youtube shortcode compatibility improved #557
1620
- * welcome.php should be shown only if user is “administrator” #696
1621
- * Facebook comments support added in AMP #825
1622
- * WP Like Button Compatibility #841
1623
- * Custom Taxonomy Support added with Custom Post Type Extension.
1624
- * Front page comments not found as expected #837
1625
- * Fixed xml:lang tag issue #848
1626
- * Sanitize Iframe in the archive description Fixed #845
1627
- * Compatibility with Newspaper Theme by TagDiv #842 and #796
1628
- * Some debug problems (blog page, style.php) #838
1629
- * Featured Image hooks added
1630
- * Twitter is misspelled #854
1631
- * The core concept of the AMP Content builder has been built.
1632
-
1633
-
1634
- = 0.9.49 (12 May 2017) =
1635
- * View more details on https://ampforwp.com/0-9-49-released-small-important-bugs-fixed-56th-update/
1636
- * Option added to display the excerpt in Single #806
1637
- * Ability to add new invalid tags to filter out from AMP pages #809
1638
- * In frontpage, comment button is pointing to wrong URL #812
1639
- * Call now button and search is overlapping in Design-1 #784
1640
- * Sticky Social Icons should be off if the CTA notification bar is on #788
1641
- * Author bio in Design 1 and 2 #732
1642
- * Styling in Taxonomy description causing validation issues #798
1643
- * Twitter share(handle, url positions fixed) #815
1644
- * Tables responsiveness in ALL Designs #726
1645
- * Output all the categories and tags with their own ID’s in the div classes #750
1646
- * Social Share Icons Overlap with Leave A Comment in Design 3 #716
1647
- * Effective Measure Support on AMP #297
1648
- * Custom AMP editor on pages should only be shown when page support is ON #756
1649
- * AMP on website.com/blog without need of separate installation #775
1650
- * GTranslate Compatible #819
1651
- * Images and amp-anim styling added #725
1652
- * Filter to make the title in a post to a link #727
1653
- * Author Bio and Social Share button must not come in Pages #770
1654
- * StatCounter is now compatible with AMP #361
1655
- * Line Social media support #500
1656
- * Footer menus for Design 1 & Design 2 #623
1657
- * Strip out src=”about:blank” When Gravity Forms used #804
1658
- * Add Compatibility with Crazy Lazy load plugin #751
1659
- * Meta Titles and Description issues fixed with Yoast, All in one SEO and The SEO Framework #813
1660
- * Double quotes in the Excerpt of the meta description is making AMP Invalidated #818
1661
- * Missing featured image on static front page #824
1662
- * Fatal error while activation: see the video 0.9.49 Beta #827
1663
- * Review this code in archive.php in all 3 designs. #826
1664
-
1665
-
1666
- = 0.9.48 (28 April 2017) =
1667
- * View more details on: https://ampforwp.com/0-9-48-released-step-towards-multilingual-support-55th-update/
1668
- * The default translation method of WordPress added. (Option in Translation panel to switch between * Translation panel and POT file #540)
1669
- * A new Advertisement slot added above the related posts in the Single. It not only gives better options for people to display ads but this ad slot is also very handy if you are using ad companies like Taboola and RevContent.
1670
- * Another Advertisement slot added below the post title in the Single post.
1671
- * Fatal error: require_once report-bugs.php #747 fixed
1672
- * Add / for codes in Meta Description #766 fixed
1673
- * Controls re-adjusted & Renamed title of yoast description control in Options panel
1674
- * Design-3 Slider URL redirecting to non-AMP page #758
1675
- * Added new sanitizer For HTML to AMP-HTML conversion
1676
- * Sanitized Archive descriptions so that it would convert to AMP
1677
- * Comments sanitized with new sanitizer so that HTML tags automatically become AMP compatible.
1678
- * 301 redirects on non-pretty internal links #767
1679
- * Create a filter to modify the value of rel="amphtml" #778
1680
- * Max-width added for images in comments
1681
- * If in WooCommerce ?amp endpoint set then update href.
1682
- * Undefined Variable (Debug) #733 and many other debug issues were fixed
1683
- * Show last updated Post instead of published date #575
1684
- * WooCommerce Widget added to display latest products on homepage. #763
1685
- * add amp_post_template_above_footer hook global in all the designs #779
1686
- * Excerpt on top of the content in Single #665
1687
- * Subscribe box has been improved for the UX needs #712
1688
- * Notice warnings since 0.4.2 update #740
1689
- * AMP Comments Form Integration with the extension
1690
- * Filter added on the loop in Homepage of the Design 3 so that it can be modified with an external plugin.
1691
- * 404 on paged home page #781
1692
- * Twitter handle should be at the end of the tweet not in the beginning #787
1693
- * Wrong Rel Canonical for AMP Custom Frontpage #799
1694
- * Merged a pull request #761 that will improve the title and description output that is much more stable and flexible for future enhancement and use. It was contributed by Sybre Waaijer - Thanks mate for the contribution, we (our team and users) really appreciate your hard work done on this code.
1695
- * Extension page user experienced improved.
1696
- * Removed old Youtube installation video and replaced with new one.
1697
-
1698
- = 0.9.47.2 (12 April 2017) =
1699
- * Design-3 Slider URL redirecting to non-AMP page #758
1700
- * Ads showing in comments #768
1701
-
1702
- = 0.9.47.1 (11 April 2017) =
1703
- * Meta description option improved in SEO section #766
1704
- * Fatal error: require_once report-bugs.php #747
1705
-
1706
- = 0.9.47 (10 April 2017) =
1707
- * View more details at https://ampforwp.com/0-9-47-released-54th-update/
1708
- * Meta saving method updated for customAMP content editor checkbox was causing some conflict.
1709
- * Wrong Yoast title and structured data in Custom Frontpage fixed
1710
- * CSS minification all 3 designs
1711
- * Polylang flags in menu was causing validation issue, is now resolved
1712
- * WPML flags in menu was causing validation issue, is now resolved
1713
- * Standardized function created for content sanitization.
1714
- * Archive description now displays AMP compatible markup
1715
- * Comments markup sanitized for AMP
1716
- * Design 3 images not aligned properly, fixed
1717
- * Images are aligned to center in Design 1.
1718
- * carousel ending with //amp instead of /amp fixed #753
1719
- * Title of the Post along with Post link when shared in twitter #683
1720
- * Ads were cutting in half in RTL, fixed
1721
- * Add / at the end of AMP links with in the AMP pages (Internal links) #668
1722
- * Rendering the wrong URLs in front page if paged #742
1723
- * Option to turn off AMP on all pages, so people can turn on only for specific pages #746
1724
- * Need Meta Description on amp pages #741
1725
- * Woocommerce Loop shortcode updated
1726
- * Call Now Button added in header #563
1727
- * Post images are not centered in Design 3 #695
1728
- * UX of GTM settings done, since users were getting confused #700
1729
- * Front page amphtml fixed for paginated pages
1730
-
1731
- = 0.9.45.6 (31 March 2017) =
1732
- * Installation Process from welcome page was not working after WP Plugin DIR API change was fixed.
1733
- * WP Rocket Minifcation and Concatenation was not working, its fixed now.
1734
- * WP Rocket was tested properly to make sure everything is working fine.
1735
-
1736
- = 0.9.45.5 (25 March 2017) =
1737
- * WP rocket conflict solved
1738
- * Cannot set property ‘innerHTML’ of null issue fixed
1739
-
1740
- = 0.9.45.3 (21 March 2017) =
1741
- * Post 0.9.45 bugs fixed and released as an urgent update.
1742
-
1743
- = 0.9.45.1 (19 March 2017) =
1744
- * Post 0.9.45 bugs fixed and released as an urgent update.
1745
-
1746
- = 0.9.45 (18 March 2017) =
1747
- * View more details at https://ampforwp.com/0-9-45-released-compatibility-rtl-53rd-update/
1748
- * W3Total cache compatibility added
1749
- * RTL Support added for Right-to-Left language websites.
1750
- * Comments Pagination feature added
1751
- * WP-Rocket Compatibility added
1752
- * WPML Compatibility added
1753
- * Quantcast analytics support added
1754
- * ComScore support added
1755
- * Custom Yoast title support added #685
1756
- * WooCommerce Shortcode: Allows you to display WooCommerce Products. [amp-woocommerce num=6] will display the 6 products from WooCommerce. [amp-woocommerce num=6 link=noamp] will display 6 products but they will go to non-amp website, if you want to link to AMP version of the page then use [amp-woocommerce num=6 link=amp]
1757
- * Admin area UX improvements
1758
- * Adding notifications script in the correct way
1759
- * Comments now display on frontpage as well.
1760
- * Re-positioned non-amp Header link control to the right section.
1761
- * ?nonamp=1 only displays when the Mobile redirection is on
1762
- * Properly adding iFrame js.
1763
- * Custom Post type incompatibility fixed
1764
- * Widgets added to the Custom Frontpage.
1765
- * Stripping shortcodes from excerpts.
1766
- * Custom content on static frontpage had over riding issue #687
1767
- * Option added for controlling number of comments
1768
- * Welcome page should be shown only if user is “administrator” #696
1769
- * Digg Digg social share compatibility #694
1770
- * Removed unnecessary lines from Design 3
1771
- * Sanitized Archive Description to amp Compatible #659
1772
- * Author box now displays HTML properly #645
1773
- * Date added Design-3 in meta #583
1774
- * Options link was removed from wp-admin tool bar after a feedback from a user.
1775
- * Footer sub menus layout compatibility.
1776
-
1777
-
1778
- = 0.9.44 (5 March 2017) =
1779
- * View more details at https://ampforwp.com/user-experience-52nd-update/
1780
- * Added Welcome Screen for better User experience. [Enhancement]
1781
- * Undefined Index debug error resolved [Bug fix]
1782
- * All in one SEO Support support tested [3rd party compatibility]
1783
- * Frontpage title in Design 3 is out of the container #644 [Bug fix]
1784
- * Default Table markup in AMP #643 [Enhancement]
1785
- * AMP carousel is not working on Frontpage #641 [Bug fix]
1786
- * Social share .js was getting added even when it was not required #638 [Bug fix]
1787
- * Search Feature added for Design 1 & Design 2 [Major Improvement]
1788
- * Accordion script loading issue in Design 3 #634 [Bug fix]
1789
- * ?nonamp=1 links should be nofollow #622 [Bug fix]
1790
- * Same Header and Color Scheme are making header elements invisible #629 [Enhancement]
1791
- * In Search AMP rel canonical was different #631 [Bug fix]
1792
- * Non-AMP link in Design 3 was not working when mobile redirection was enabled #632 [Bug fix]
1793
- * Search form text strings are now added in the translation panel #607 [Bug fix]
1794
- * Load AMP-ads conditionally only if ads are available #609 [Bug fix]
1795
- * Added compatibility with Custom post type extension. Option to hide/show AMP on all custom post types #587 [Bug fix]
1796
- * Report a Bug & Request feature links added [Enhancement]
1797
- * If there was no menu set in Design 3 then all pages were getting displayed. #613 [Bug fix]
1798
- * The tag Font is disallowed #616 [Validation Improved]
1799
- * index/noindex separately added for Tags and also for Categories #606 [Enhancement]
1800
- * Use of undefined constant AMP_QUERY_VAR #596 [Bug fixed]
1801
- * Logo is not centered in Design 3 #586 [Bug fixed]
1802
- * Remove defer, a very rare type of defer was getting added #589 [Validation Improved]
1803
- * Disqus comments iframe had scrolling issues #566 [Bug fixed]
1804
- * Left side blank gap in the RTL in design 2 #541 [Bug fixed]
1805
- * Inline Styles not working correctly in Custom AMP Editor #533 [Bug fixed]
1806
- * Re-save permalinks issues. Flushing rewrites with options saved. #511 [Improvement]
1807
- * Code review and cleaning of the customizer #404 [Code Cleaning]
1808
- * Google Search iframe had some header alignment issues in Design 3. #624 - Thank you Leo Osa @leoosa for the contribution! [Bug fixed]
1809
- * AMP Frontpage + Override AMP Content = Blank page #604 [Bug fixed]
1810
- * Widget area added on the homepage with an 'AMP Category Blocks' widget. It means you can display multiple category blocks the homepage. This allows you to display complex layouts, even on AMP. [Major Improvement]
1811
- * Auto-append /amp at the end of internal links in Menu with an option in the Menu section of the options panel #531 [Major Improvement]
1812
- Reformatting and Minifying of stylesheet [Code Cleaning]
1813
- * Created a new section for Homepage and moved some controls from other areas to the home section for the better user experience. [User Experience]
1814
- * Override Homepage Thumbnail size option added. It will give you more control over your thumbnails. [Major Improvement]
1815
- * New color picker added to change the color of the header elements in the Design 3 to give you better control over the design. [Enhancement]
1816
- * Extra amp-carousel script loading is now fixed. [Bug fixed]
1817
- * Crafting of layout code in design 2 and design 3, especially with social icons area. [Code Cleaning]
1818
- * Design of search form was not clickable in iOS devices #621 [Bug fixed]
1819
- * Disqus iframe was loading even when there was no disqus name was added in the option. We found that many users might be enabling it without knowing the output and then they seem to forget, which was causing them validation warnings. [Bug fixed]
1820
-
1821
- = 0.9.43.6 =
1822
- * View more details at https://ampforwp.com/stability-sprint-3-51st-update/
1823
- * Typo in the is_home() function fixed
1824
- * Option to hide/show AMP on all custom post types #587
1825
- * False detection by Windows defender tool fixed
1826
- * Conditional tags were not compatible with Advanced AMP ads which were causing some conflicts but is now fixed.
1827
-
1828
- = 0.9.43.5 =
1829
- * View more details at https://ampforwp.com/stability-sprint-2-50th-update/
1830
- * Fixed shortcodes issue in related posts #543
1831
- * Iframe Scripts Added properly
1832
- * Proper conditions added for the social section of Design 3
1833
- * Featured Image issue stretched in Design 2 & 3
1834
- * Removed extra global $redux_builder_amp;
1835
- * Custom Logo Dimensions option added #479
1836
- * Index & NoIndex options added for SEO section. #558
1837
- * Added URL for rewrite flushing rules in Options
1838
- * Option to enable and disable the Author area in Design 3#577
1839
- * Rel Nofollow added in credit link
1840
- * debug issue solved: fn_offset not defined
1841
- * debug issue solved: global $post not declared
1842
- * The word 'ago' is now translatable in design 3
1843
- * The word 'read next' is translatable now
1844
- * Tablepress compatibility added #392
1845
- * Secure API server is now serving through Google Cloud Manager.
1846
- * Thrive Content builder was displaying twice when the Custom AMP content was on. It was a complex issue which has been solved now.
1847
- * amp-ad extension.js script was loading if the Ads are not enabled. #598
1848
- * Social Share Extension Included on Homepage even if we didn't have social icons #599
1849
- * Installation UX improvement #593
1850
- * Removed duplicate global variable
1851
- * Proper OG tags added #588
1852
- * Proper instructions added for Custom AMP content #471
1853
-
1854
-
1855
- = 0.9.43.1 =
1856
- * View more details at https://ampforwp.com/0-9-43-1-released-stability-sprint-1-49th-update/
1857
- * Emoji in comments leads to AMP errors
1858
- * Design 1 showing time on archives
1859
- * Added some space between the archive label.
1860
- * Lazy loading plugins compatibility #544
1861
- * Custom header and footer areas
1862
- * Sticky posts now come on top #564
1863
- * Footer non-amplink added in design 3 #562
1864
- * HTML Paragraph tag is shown in the title in category! #518
1865
-
1866
- = 0.9.42 =
1867
- * View more details at https://ampforwp.com/design-three-update/
1868
- * Design 3 was released – Video Overview along with new options and features. View the video overview at: https://www.youtube.com/watch?v=ub1pwskt3Rc [Major Feature]
1869
- * Ticket #517 Added Upload field into Redux core [3rd party Compatiblity]
1870
- * Ticket#529 Controls for archive titles added [Improvement]
1871
- * Ticket #548 Jetpack photon code removed
1872
-
1873
- = 0.9.41 =
1874
- * View more details at https://ampforwp.com/disqus-comments-in-amp/
1875
- * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
1876
- * AMP WooCommerce supported tag was missing after the last update. [Bug fix]
1877
- * Homepage & Related Posts was displaying private and protected posts, which is now fixed [Bug fix]
1878
- * Next previous links added in Design 1 [Enhancement]
1879
- * Invalid Post Time displaying in the homepage of Design 1 [Bug fix]
1880
- * Twitter share now includes the twitter handle of the author with setting in options [Enhancement]
1881
- * Emoji in comments leads to AMP errors was fixed [Bug fix]
1882
- * Date are now displayed on archives in Design 1 [Enhancement]
1883
- * When RTL enabled logo merges with nav bar was fixed [Bug fix]
1884
- * Jetpack Photon compatibility added [3rd Party Compatibility]
1885
-
1886
- = 0.9.40 =
1887
- * View more details at https://ampforwp.com/0-9-40-released-biggest-stability-update/
1888
- * Proper endpoints added [Improvement]
1889
- * Flush Rewrites properly [Improvement]
1890
- * REL Canonical properly getting added. [Improvement]
1891
- * Proper Frontpage Canonical added [Improvement]
1892
- * Added Base name support for categories and tags [Improvement]
1893
- * Redirection of excluded post solved. [Bug fix]
1894
- * Archives properly redirecting to the right URL [Bug fix]
1895
- * Homepage redirection solved [Bug fix]
1896
- * Plusone tag is stripped properly. [Validation Issue fixed]
1897
- * Archives are now clickable. [Improvements]
1898
- * WP_Query filter added for better customizability of Homepage loop. [Better Customizations]
1899
- * Social share boost plugin compatibility. [3rd party Customizations]
1900
- * Removed H1 from the frontpage even if it is not available. [Improvement]
1901
- * H3 instead of H1 for Site title. So there is only one H1 per page. [SEO Improvement]
1902
-
1903
- = 0.9.38 =
1904
- * View full details at https://ampforwp.com/google-tag-manager-for-amp/
1905
- * Google Tag manager included [New feature]
1906
- * Iframe max-width added [Improvement]
1907
- * Paginated pages have different titles now. [Bug fix]
1908
-
1909
- = 0.9.37 =
1910
- * View full details at https://ampforwp.com/category-tags-archive-support-added/
1911
- * Debug issues solved [Bug fix]
1912
- * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
1913
- * Category, Tags & Archive Support with titles added [Enchancement]
1914
- * Archive Title support added [Enchancement]
1915
- * There were some issues with attachments [Bug fix]
1916
- * removed ? from amp url's [Improvement]
1917
- * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
1918
- * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
1919
- * Added an option to turn off AMP support for Homepage. [Enchancement]
1920
- * Too many redirects issue on homepage is fixed #435 [Improvement]
1921
- * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
1922
- * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
1923
- * Comment anchor link changed for simplecomment button files in both designs [Improvement]
1924
- * Redirection Loop issue fixed [Bug fix]
1925
- * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
1926
- * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
1927
- * Improved Sessions [Improvement]
1928
- * Advnaced Settings panel was created for better user experience. [Improvement]
1929
- * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
1930
- * RTL issue fixed #454 [Bug fixed]
1931
-
1932
- = 0.9.36 =
1933
- * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
1934
- * Redux Core Update. Better compatibility with the Salient theme and Themeforest themes & plugins using redux framework in their core, which makes the plugin much stable. [Huge Improvements]
1935
- * Hide advertisement section if advance ads plugin is active. [Better User experience]
1936
- * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
1937
- * Launch Post Builder button added. One of the important feature called ‘Post Builder’, that is drag and drop post builder was somewhere hidden in the customizer, so positioned it for better visibility from users. [Better UX]
1938
-
1939
- = 0.9.35 =
1940
- * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
1941
- * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
1942
- * Attachment page was having the wrong endpoint. [Bug fix]
1943
- * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
1944
- * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
1945
- * Lang attributes were added [Enhancement]
1946
- * The tag like was disallowed in the AMP [Validation Improvement]
1947
- * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
1948
- * AMP on Pages option was not working in some cases. [Bug fix]
1949
- * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
1950
- * g:plusone tag was not getting removed properly. [Validation Improvement]
1951
- * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
1952
- * Structured Data Image width issue solved [Enhancement]
1953
- * BJ Lazy Load was having issues, we have added a fix which will make this plugin compatible with the AMP. [3rd party Compatibility & Validation Improvement]
1954
- * imageanchor=”1″ was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
1955
-
1956
- = 0.9.34 =
1957
- * Newspaper theme by Tagdiv was having issues, we have fixed this one.
1958
-
1959
- = 0.9.33 [15th Jan 2017] =
1960
- * Full details at https://ampforwp.com/debug-errors-shortcodes/
1961
- * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
1962
- * Debug errors fixed, Code is now much cleaner.
1963
- * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
1964
- * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
1965
- * Properly removes AMP if turned off from Post panel
1966
- * z-index position improved on Sticky Social bar
1967
- * Better compatibility with shortcodes.
1968
- * Divi Standard Layouts Compatibility
1969
- * Properly Hide AMP posts if excluded. #367
1970
- * Mobile redirection was causing loop issues which are now fixed.
1971
- * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
1972
- * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
1973
- * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
1974
- * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
1975
-
1976
- = 0.9.32 [7th Jan 2017] =
1977
- * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
1978
- * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
1979
- * Paginated pages on homepage redirect to homepage URL #335
1980
- * Title of the page should be displayed on the FrontPage #358
1981
- * Thrive Builder AMP Validation Compatibility, so it will be validated properly in AMP.
1982
- * Twitter Sharing improved so it gets the data properly #341
1983
- * Option to change the number of Related Posts #290
1984
- * Validation errors due to rel="canonical" was missing on some pages
1985
- * Comment button displays even if the comments are not available
1986
- * Threaded comments were duplicating, so that issue is solved and added proper CSS for it.
1987
- * Minor issue with Jetpack Comments fixed.
1988
- * Missing amp-social-share.js on front page fixed #372
1989
- * Minor improvements to Title and description tags.
1990
- * Analytics Script was loading twice when Glue was active.
1991
- * Page specific class added for better customization compatibility #377
1992
- * Inline Style support added Fixed #356
1993
- * Bugs fixed in Email notification pointer
1994
-
1995
- = 0.9.31 [2nd Jan 2017] =
1996
- * Proper Details at https://ampforwp.com/amp-0-9-31-released-installation-user-experience/
1997
- * Proper Condition added for the scripts to load in Frontpage.php
1998
- * Rel canonical properly added for front pages
1999
- * 404 and Archive page Mobile redirection code refined
2000
- * User Experience Improvement: Installation process was improved
2001
-
2002
- = 0.9.3 [31th December 2016] =
2003
- * Proper Details at https://ampforwp.com/custom-amp-content-editor/
2004
- * Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
2005
- * FrontPage had some validation issues. [Bug fix]
2006
- * Related posts in Design 1 we're redirecting to 404 fixed [Bug fix]
2007
-
2008
- = 0.9.2.2 [27th December 2016] =
2009
- * Proper Details at https://ampforwp.com/polishing-user-experience-improvements/
2010
- * Made the Options panel user-friendly
2011
- * Social Share on frontpage issue fixed.
2012
- * Readme.txt made user-friendly.
2013
- * Archive option removed and some UI improvements
2014
- * Single was not displaying the Title
2015
- * 'Type is not allowed' [Validation issue fixed]
2016
- * noshade tag Validation issue fixed
2017
-
2018
- = 0.9.2.1 [24th December 2016] =
2019
- * Proper Details at https://ampforwp.com/step-towards-fixing-amp-validation-errors/
2020
- * Disabled the Tags and Categories support for AMP for better validation until we find a better solution.
2021
- * Mobile redirection bug fixed, It was continuously redirecting to the same page [Bug fix]
2022
- * trailingslashit added to make sure we have proper url for Mobile redirection [Bug fix]
2023
- * In content AD overlapping the content issue fixed
2024
-
2025
- = 0.9.2 [23th December 2016] =
2026
- * Proper Details at https://ampforwp.com/mobile-redirection/
2027
- * AMP Mobile Redirection Feature added. It can be turned on from Dashboard > General and then Mobile Redirection. [New Feature]
2028
- * Archive title and description added [Improvement]
2029
- * Improved the Speed of the AMP version #321 [Improvement]
2030
- * Anchor link was not closing fixed #328 [Bug Fix]
2031
- * Typo in Trailingslashit function which resulted in some issues in the Homepage version [Bug Fix]
2032
-
2033
- = 0.9.1.2 [20th December 2016] =
2034
- * Proper Details at https://ampforwp.com/new/
2035
- * DoubleClick Support
2036
- * Custom Post Type Support
2037
- * Ratings Support
2038
- * Comments Gaping fix
2039
- * Custom Excerpt code
2040
- * Better Compatibility with Yoast SEO plugin
2041
- * AMP Validation error in Design 1 Fixed
2042
- * Proper Homepage title & Description with Yoast SEO plugin issue fixed
2043
- * Design -1 Excerpt too big for mobile devices, Fixed
2044
- * Advertisement support on Design 1
2045
- * Link to Tags & Categories were having some issues.
2046
- * AMP looking bad on big devices
2047
- * AMP validation Improvement: Lightbox plugins compatibility
2048
- * Huge Progress in AMP Validation Errors: Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
2049
- * Page Performance: Removed default Google font loading
2050
- * Page Performance: DNS Prefetch tag added for faster DNS Handshake
2051
-
2052
- = 0.9.1 [16th December 2016] =
2053
- * Proper Details at https://ampforwp.com/new/
2054
- * PHP7 Compatibility
2055
- * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
2056
- * Custom CSS not working in Design one (#249)
2057
- * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
2058
- * How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
2059
- * Non-amp Homepage support added (#267)
2060
- * using get_avatar() (#259)
2061
- * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
2062
- * Validation Issue fixed: Script Tag removed from the content.
2063
- * Featured image in Design 1 in single #261
2064
- * After Fresh installation - a save is required Fixed
2065
- * Excerpt length controlled
2066
- * Design One has thumbnails on the Homepage
2067
- * Non-AMP link goes to the wrong page, issue fixed.
2068
- * Archive pages were broken, fixed.
2069
- * Option to Enable & Disable the Next/Previous links in Single
2070
- * WhatsApp sharing not working, issue fixed.
2071
- * Category Taxonomy has extra ':' in the word.
2072
- * The word 'Ago' is now translatable.
2073
- * Yoast SEO with AMP compatibility issue fixed.
2074
- * Several Minor Polishing in the code
2075
- * Footer Ad gets covered by Sticky Social Icons (#269)
2076
- * Smaller image size when “image caption” is used in Design-2 (#263)
2077
- * Footer ad with Sticky Social bar issue fix
2078
- * Checked with WordPress 4.7
2079
- * Ad #1 was messing up with the title, issue fixed.
2080
- * Compatibility improved with AMP WooCommerce.
2081
-
2082
- = 0.9 =
2083
- * Proper Details at https://ampforwp.com/amp-pagebuilder/
2084
- * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
2085
- * 100% Yoast Compatible , Now no need to have additionally Glue Installed
2086
- * 100% completed Translation panel, Now absolutely anything on page is translated
2087
- * Added Option to turn on/off Page Support
2088
- * Styling for Tags was Corrected
2089
- * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
2090
- * Default Image alignment styling added
2091
- * Added Option to turn on/off Page Support
2092
- * Related Posts Now use Custom Excerpt if it Exists
2093
- * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
2094
- * <pre> Tag styling issue fixed for AMP pages
2095
- * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
2096
- * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
2097
- * 2 New Designs added
2098
- * SEO Panel Added
2099
-
2100
- = 0.8.8 =
2101
- * Proper Details at https://ampforwp.com/amp-0-8-8-released-translation-panel/
2102
- * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
2103
- * Badge Tag was throwing Validation error
2104
- * Plusone tag validation error was fixed
2105
- * Time tag was validation error was fixed
2106
- * User experience for Mobile devices was improved
2107
- * Meta info was messing up in smaller devices, it was fixed as well.
2108
- * Internal AMP linking added for Categories and Tags
2109
- * Future errors for AMP ads was fixed
2110
- * Blockquote styling added
2111
- * “Please Activate parent Plugin settings” added for better User Experience.
2112
- * Related Post Ux improvement
2113
- * Plugin version added in Footer source code for better debugging
2114
- * Added Support for Default WordPress Image alignment
2115
- * New action hooks added in index page
2116
- * Featured Image Size options added
2117
-
2118
- = 0.8.7 =
2119
- * Proper Details at https://ampforwp.com/amp-0-8-7/
2120
- * added option to enable/disable AMP on Archive pages (Ticket #188)
2121
- * Solved 404 on Related Posts (Ticket #178 )
2122
- * Related posts by either categories or Tags(Ticket #179)
2123
- * added a link to menu Section from the AMP Options page(Ticket #190)
2124
- * Added Support for Piwik Analytics(Ticket #163)
2125
- * Added Support for Segment.com Analytics(Ticket #50)
2126
- * Added a switch for hiding Non-Amp page link from Footer.( Ticket #189)
2127
- * Added an Option that strips Users URL from Comments Section(Ticket #180)
2128
- * Fixed stripping <date> tags from the content , Since it was preventing validation – amp-img issues fixed
2129
- * UX Improved for every section of AMP Options page
2130
- * Added Settings button on plugin page
2131
- * Related posts switch added
2132
- * Removed carousel.js
2133
-
2134
-
2135
- = 0.8.6.1 =
2136
- * Date Tag fix
2137
- * Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
2138
-
2139
- = 0.8.6 =
2140
- * Proper Details at https://ampforwp.com/amp-0-8-6-released-related-posts-comments/
2141
- * Related Posts
2142
- * Post Comments
2143
- * WhatsApp sharing button Your visitors can now easily share the content over the whatsapp.
2144
- * Validation issue fixed by All In One Schema.org Rich Snippets plugin
2145
- * Removed Google Fonts loading for Performance
2146
- * New relic Support
2147
- * Class added to ‘View Non-AMP Version’ text
2148
- * Archives Structured Data issue fixed
2149
- * Some instances img tags converted into amp-img automatically.
2150
-
2151
-
2152
- = 0.8.5.3 =
2153
- * Canonical issue fixed for Post
2154
-
2155
- = 0.8.5.2 =
2156
- * Canonical issue fixed for FrontPage
2157
-
2158
- = 0.8.5.1 =
2159
- * Proper Details at https://ampforwp.com/new/
2160
- * Validation issue fixed: 'Value' tag
2161
- * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
2162
- * Validation issue fixed: Table markup
2163
- * Validation issue fixed: nowrap and misc tags
2164
- * New Relic Support
2165
- * Tags on off option
2166
- * Canonical and correct AMP html Redirect issues Solved
2167
- * NextGEN Gallery Validation Support Added
2168
-
2169
- = 0.8.5 =
2170
- * Proper Details at https://ampforwp.com/the-0-4-compatibility/
2171
- * AMP 0.4 Compatibility Check
2172
- * Even better Structured Data Validation, Once in for all!
2173
- * Structured Data Options to eliminate Validation errors
2174
- * AMP Page Exclude option
2175
-
2176
- = 0.8.4 =
2177
- * Proper Details at https://ampforwp.com/blog/structured-data-validation/
2178
- * Structured Data Validation
2179
- * Navigation Text Change
2180
- * Inline Style Validation
2181
- * Form Validation
2182
- * Frontpage shows the amphtml rel twice fixed
2183
- * Facebook Sharing not working
2184
-
2185
- = 0.8.3 =
2186
- * Prefix added in the Content filter
2187
- * Extra space after quote in Ads
2188
-
2189
- = 0.8.2 =
2190
- * Proper Details at https://ampforwp.com/blog/the-custom-frontpage/
2191
- * Custom AMP FrontPage
2192
- * Featured Image
2193
- * New Mobile Friendly Advertisement sizes
2194
- * Single Post Pagination Option
2195
- * RTL Support
2196
- * Notifications
2197
- * Gaping if the Meta was turned off.
2198
- * Analytics was not fetching the user id properly.
2199
- * Page was not using the post template along with the AD support.
2200
- * AMP Endpoint support for Paged when the front page is active.
2201
- * UI improvement of Admin panel
2202
- * Few Validation issues fixed
2203
-
2204
- = 0.8.1 =
2205
- * Warning: Cannot modify header information error fixed
2206
- * Validation issue fixed. KK Star Plugin compatible.
2207
- * Gaping in the smaller screens fixed
2208
-
2209
- = 0.8 =
2210
- * Proper Details at https://ampforwp.com/blog/the-change/
2211
- * Plugin was re-written from scratch and is now built on top of default AMP plugin by Automattic but giving you the same features of the original plugin.
2212
- * 99.5% Validation issues were fixed.
2213
- * Page builder & Shortcodes Compatibility Support Added
2214
- * Conflict with JSON API
2215
- * Carousel support for Gallery
2216
- * Better Image stretching and resizing
2217
- * Youtube Video Embed Support
2218
- * Vine Embed Support
2219
- * Twitter oembed Support
2220
- * Instagram Embed Support
2221
- * Facebook Video Embed Support
2222
- * Better Future Compatibility
2223
-
2224
- = 0.7.7 =
2225
- * Proper Details at https://ampforwp.com/blog/amp-0-7-7/
2226
- * Big Validation Error fix Update
2227
- * Disable AMP support on specific Pages and Posts
2228
- * Option to disable the Post meta from the Single
2229
- * Footer Credits and Copyright Text Option
2230
- * New options for Social Sharing Bar in Single
2231
- * Jetpack Social & Related Sharing Issue fixed
2232
- * Gaping in footer if the Sticky bar is enabled
2233
- * Text domain added on few strings
2234
-
2235
- = 0.7.6 =
2236
- * Google Adsense Support Added with AMP-Ad
2237
- * Wrong Homepage rel amphtml bug fixed
2238
-
2239
- = 0.7.5 =
2240
- * Google Analytics Support Added
2241
- * Logo Support Added. If the logo is disabled, then the Title should be activated.
2242
- * Color Scheme Feature Added
2243
- * User friendly Options Panel Added
2244
- * iFrame support Added
2245
- * Few Minor Bugs Fixed
2246
-
2247
- = 0.7.1 =
2248
- * Bug #24 (Github) fixed
2249
- * Strip Style tags for faster & better validation
2250
- * Bug #21 (Github) fixed
2251
-
2252
- = 0.7 =
2253
- * Canonical Improved
2254
- * Navigation Validation bug fixed
2255
- * Two more validation bugs fixed ('role' and 'tabindex' attribute)
2256
- * Featured image automatically hides if it is not present
2257
- * Validation issues in the images of the post's the_content
2258
-
2259
- = 0.6 =
2260
- * Improved Navigation Menu
2261
- * Search Console errors fixed
2262
- * Social Sharing option
2263
- * Pages support
2264
- * Force redirection for mobile users removed and many other bug fixes
2265
-
2266
- = 0.5 =
2267
- * Added AMP Markup for Google Structured data. This will fix the issues in Webmaster tools.
2268
-
2269
- = 0.4 =
2270
- * Support of Custom menu added for AMP enabled sites
2271
-
2272
- = 0.3 =
2273
- * Support of amp-img added in single posts
2274
- * minor css bug fixed
2275
-
2276
- = 0.2.5 =
2277
- * Minor bugs fixed
2278
- * ?mobile & ?nomobile is now ?amp & ?noamp
2279
-
2280
- = 0.2 =
2281
- * White Screen of death issue fixed
2282
- * Plugin URI updated
2283
-
2284
- = 0.1 =
2285
- * Initial version
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ == Changelog ==
2
+
3
+ = 0.9.97.55 (28th May 2019) =
4
+ * Improvement: Rank Math compatibility with V1.0.24 #3177
5
+ * Improvement: Related posts and Recent posts on custom posts types #2708
6
+ * Improvement: Appearance Designs for Related Posts #1545
7
+ * Improvement: Integration with EWWW IO and ExactDN. #2805
8
+ * Improvement: rel = "nofollow" to the links of social platforms in menu and footer, in all designs #2999
9
+ * Improvement: Option to display the Post title on Breadcrumb #3019
10
+ * Improvement: Map module in AMP pagebuilder #1629
11
+ * Improvement: Pagination support in category module of AMP pagebuilder #1676
12
+ * Improvement: Time Stamp support in category module of AMP pagebuilder #2648
13
+ * Improvement: Lightbox feature for Slider module of AMP pagebuilder #2646
14
+ * Improvement: Privacy page option in Notice Bar (Cookie Consent) #2347
15
+ * Improvement: SmartMag theme's Featured video Compatibility integrated #2559
16
+ * Improvement: New filter to modify the links of breadcrumbs, comment button and the non-amp version link in footer #2664
17
+ * Improvement: New filter to modify the single featured image #2896
18
+ * Improvement: "AMPforWP PageBuilder" option added in the page builder section #2414
19
+ * Fixed: PHP debug warning #3128
20
+ * Fixed: Fatal error after update 0.9.97.51 #3156
21
+ * Fixed: Unwanted code on username of comment in Design [1, 2 & 3] #3022
22
+ * Fixed: Issues with Content Sneak Peak Feature #2504
23
+ * Fixed: In Feature module of AMP pagebuilder, Bullet points are not aligned correctly #2554
24
+ * Fixed: Image URL replacement on AMP page not correct and aq_resizer not working with cdn images #2659
25
+ * Fixed: 'Twitter' Option and 'Pretty Permalinks for Twitter Share' Option generate the same URL #2662
26
+ * Fixed: Need to align the Radio Button (Show/Hide) in the Arabic language #2818
27
+ * Fixed: In NewsArticle, the ArticleBody and Description are missing from the AMP page #3005
28
+ * Fixed: WP Subtitle Compatibility code updated #3175
29
+ * Fixed: For Menu pages where AMP support is OFF, still getting added due to Auto Add AMP in Menu URL option #2897
30
+ * Fixed: E-commerce section code updated #3012
31
+ * Fixed: Pagebuilder section code updated #3014
32
+ * Fixed: 'Fix AMP Errors' section should not be displayed if he's a premium customer #3027
33
+ * Fixed: Use Ajax to fetch all Categories and tags in Featured Slider in Design-3 #2590
34
+ * Fixed: Debug error after enabling redirection #3174
35
+ * Fixed: The tag 'amp-next-page with inline config' appears more than once in the document #3214
36
+ * Fixed: Correct conditions for PageBuilder and Elementor for Page.php in Swift #3097
37
+ * Fixed: is_amp_endpoint issue - code updated #3055
38
+
39
+ = 0.9.97.54 (23rd May 2019) =
40
+ * Fixed: HUGE PERFORMANCE Issues #3052
41
+ * Fixed: Performance Issues with queries #2997
42
+ * Fixed: Performance Issues with template_redirect hooks #2773 #2920
43
+ * Fixed: Performance Issues with Design manager #2873
44
+ * Fixed: Performance Issues with ampforwp_exclude_post option #3118
45
+ * Fixed: Performance Issues with AMP Pagebuilder modules and settings which were loading By default #2323
46
+ * Fixed: Performance Issues with Hide AMP Bulk Tools #2549
47
+
48
+ = 0.9.97.53 (20th May 2019) =
49
+ * Fixed: 500 errors on posts that don't use WP Bakery #3183
50
+ * Fixed: Hyperlink in amp pages including emoji - code improved #2967
51
+ * Fixed: Errors in AMP social Icons #3033
52
+ * Fixed: Code improved to fetch all Categories and tags in Featured Slider [Design -3] #2590
53
+ * Fixed: Fatal error on posts with comments present in latest v0.9.97.52 #3191
54
+ * Fixed: "View Desktop Version" feature is not working in mobile view #3192
55
+ * Fixed: Improved the Extension array code #3206
56
+ * Fixed: Fatal error Uncaught TypeError Argument 1 passed to DOMNode::replaceChild() #3203
57
+
58
+ = 0.9.97.52 (15th May 2019) =
59
+ * Added: Gutenberg Compatibility integrated #2427
60
+ * Added: Gallery Designs for Gutenberg Gallery #2868
61
+ * Added: Gutenburg column support in AMP #2847
62
+ * Added: Addthis Sharing option UX re-structured #3114
63
+ * Added: Photo Gallery plugin compatibility integrated #1811
64
+ * Added: Revolution Slider plugin compatibility integrated #1464
65
+ * Added: Posts offset option on category module in AMP Page Builder #2647
66
+ * Added: MEWE social network integrated #3020
67
+ * Added: Font Size and Color options for Dropcap #3010
68
+ * Added: Breadcrumbs feature for pages #2788
69
+ * Added: More parameters for ampforwp_get_setting functions #2911
70
+ * Fixed: Conditions for PageBuilder and Elementor for Page.php in Swift #3097
71
+ * Fixed: Code updated of Infinite Scroll when AMP Newspaper Theme is active #3031
72
+ * Fixed: Copy the Content in Custom AMP Editor is not working with Gutenberg #2824
73
+ * Fixed: If GTM gets enabled after Enabling the Analytics, then both codes load in the frontend #3121
74
+ * Fixed: P tag is missing when "copy the content" option is used in custom AMP editor #3122
75
+ * Fixed: When AMP is disabled on Homepagepage ?nonamp=1 redirect to random pages(blog) #2904
76
+ * Fixed: Issue with post title and "end point to ?amp" conflict #2991
77
+ * Fixed: Unspecified Type in Structured data for catgories/tags #3071
78
+ * Fixed: PHP Warning date() expects parameter 2 to be long, string given in #2959
79
+ * Fixed: Disquss comment is not scrollable in IOS device #2970
80
+ * Fixed: Vkontakte Share(social icon) does not open in a new tab #3089
81
+ * Fixed: Condition for requiring a file improved #3080
82
+ * Fixed: amp_content() used instead of AMP_Post_Template object in Design [ 1,2 and 3 ] #2700
83
+ * Fixed: Hyperlink in amp pages including emoji not working #2967
84
+ * Fixed: Unused amp js from amp pages removed #3086
85
+ * Fixed: "WP Forms for AMP" setting link is incorrect #3060
86
+ * Fixed: Navigation & alternate menu css is not loading when directory plus theme is active #2963
87
+ * Fixed: link to non-amp under breadcrumbs when Archives support is off. #2885
88
+ * Fixed: AddThis is causing validation error after Update - code updated #3068
89
+ * Fixed: Content not rendering on AMP with the Enfold theme version 4.5.6 #3124
90
+ * Fixed: Tags are also displaying in category selection in the AMP page builder's category module #3082
91
+ * Fixed: Author name won´t show if you disable author bio in swift theme #3131
92
+ * Fixed: Link to non amp feature not works for thumbnail in design one and two #3004
93
+ * Fixed: Multibyte string links aren't working in AMP Version #2556
94
+ * Fixed: Leave Comment link Not working with ?amp #3093
95
+ * Fixed: When Sticky Header is enabled then Jump link's Title is getting hidden under the header #2915
96
+ * Fixed: Facebook comments not displaying if we add number more than 100 in the number of comments #3032
97
+ * Fixed: Featured image and link shared on twitter issues #3075
98
+ * Fixed: Infinity Scroll Option is not working when ?amp option is enabled in version beta #2475
99
+
100
+ = 0.9.97.51.2 (10th May 2019) =
101
+ * Fixed: AddThis is causing validation error after Update #3068
102
+
103
+ = 0.9.97.51.1 (7th May 2019) =
104
+ * Fixed: Can’t use function return value in write context #3155
105
+ * Fixed: Search results not showing for "Select Categories to Hide AMP" option inHide Amp Bulk Tool #3154
106
+
107
+ = 0.9.97.51 (7th May 2019) =
108
+ * Added: Yoast seo breadcrumbs Support #1473
109
+ * Added: Compatibility with UseAnyFont Plugin #2774
110
+ * Added: Compatibility with Slide Anything plugin. #2891
111
+ * Added: Compatibility with Clyp it iframe embed. #2836
112
+ * Added: Compatibility with Lazy Load of Smush and Smush Pro plugin #2990
113
+ * Fixed: Logo on the top of the menu shade looks strange. #3046
114
+ * Fixed: Fatal error: Class 'AMP_Base_Embed_Handler' not found(Due to mediavine plugin) #3119
115
+ * Fixed: Chartbeat Tag Has Incorrect Variables #3017
116
+ * Fixed: If AMP page builder is enabled then unnecessary CSS is also integrated #2470
117
+ * Fixed: Sidebar Improvement and Option for Pages #2499
118
+ * Fixed: “Featured Image from The Content” option should not override the default Set featured image. #2503
119
+ * Fixed: Widgets going out of alignments in Design 1,2 and 3 #2553
120
+ * Fixed: No message if the search didn't find anything. in Swift #2557
121
+ * Fixed: Header with CTA doesn't have the right options and defaults #2567
122
+ * Fixed: Need to separate categories & tags with ( / or , ) in AMP theme framework single page. #2580
123
+ * Fixed: Indentations are getting removed in lists of ul & ol tags. #2781
124
+ * Fixed: When the custom front page has a custom pagination then the AMP pagination returns 404 #2843
125
+ * Fixed: Text widget img element are overlapping with banner ads (Below the header) in design 3 #2845
126
+ * Fixed: Sidebar option is off, do not show widget area in admin panel #2856
127
+ * Fixed: Update Schema for author image #2919
128
+ * Fixed: Sidebar Styling is not properly appearing in the Blog Page #2938
129
+ * Fixed: 404 issue on custom post type pagination #2937
130
+ * Fixed: Notice errors in design-1 sidebar menu when amp menu is unchecked. #2953
131
+ * Fixed: Bootstrap min overriding modal body style. #2987
132
+ * Fixed: Move infinite scroll settings to a correct place #3007
133
+ * Fixed: Add Extension list for the events calendar for amp #3030
134
+ * Fixed: Add Extension list for table of content #3040
135
+ * Fixed: Strip CSS with i-amphtml- name prefix because its causing validation errors #3009
136
+ * Fixed: Need to add an option to delete the saved layouts in pagebuilder. #2801
137
+ * Fixed: Category module not working with recent posts from Version 0.9.97.45 #3117
138
+ * Fixed: Related posts appearing on the top #3151
139
+ * Fixed: Debug error in installation process #3134
140
+
141
+ = 0.9.97.50.1 (1st May 2019) =
142
+ * Fixed: Alignment problem when right sidebar is enable in blog page and there is no featured image in the posts #3057
143
+
144
+ = 0.9.97.50 (29th April 2019) =
145
+ * Added: New Icon of Telegram in all the Designs #2448
146
+ * Added: Swift icon and Font awesome icon option added in Design's global section [Swift theme] #2992
147
+ * Added: Category option added in Design's single section [Swift theme] #2551
148
+ * Added: Yoast author twitter handle compatibility integrated #2133
149
+ * Added: New function ampforwp_get_the_ID() created #2867
150
+ * Fixed: Facebook comment and Like option gives an error when the bbPress plugin is enabled #3006
151
+ * Fixed: When Gutenberg active left sidebar is not visible in page builder modules #2934
152
+ * Fixed: AMP preview functionality showing blank in the preview mode #3029
153
+ * Fixed: Image floats CSS improved in mobile mode #2525
154
+ * Fixed: Related Posts Randomly in Swift theme #2308
155
+ * Fixed: Pricing module content is not center in page builder #2921
156
+ * Fixed: Background image of the page builder is zooming in IOS devices when the parallax effect is enabled #2844
157
+ * Fixed: Footnotes compatibility code updated #2982
158
+ * Fixed: Iframe is not loading when Convert AMP to WP theme (Beta) option is enabled [Swift theme] #2628
159
+ * Fixed: PHP Warning Undefined variable #3103
160
+
161
+ = 0.9.97.49 (26th April 2019) =
162
+ * Added: Addthis Support integrated #2416
163
+ * Added: A3 Lazy Load compatibility #2872
164
+ * Added: Add support for AMP Linker #2546
165
+ * Fixed: Getting validation Error when using the Ivory Search Plugin #2497
166
+ * Fixed: Featured images or article images not showing in latest version #3063
167
+ * Fixed: Condition improved for author box hook #2608
168
+ * Fixed: After Update all AMP Pages Do Not Load and are Not Validated #3062 [ WP Rocket]
169
+ * Fixed: PHP notice Undefined variable wp #3085
170
+ * Fixed: PHP notice Undefined variable wp_query #2803
171
+ * Fixed: Warning message while on WP customizes #3070
172
+ * Fixed: Tag meta name 'viewport' appear more than once when Zox news theme is activate #2971
173
+ * Fixed: PHP notice errors after activating amp-woocommerce plugin #3054
174
+ * Fixed: Fatal error - can't use function return value in write context #3087
175
+ * Fixed: AMP Frontpage: The mandatory tag ‘link rel=canonical’ is missing or incorrect with Rank Math #3061
176
+ * Fixed: Fatal error - is_amp_endpoint issue #3055
177
+
178
+ = 0.9.97.48 (23th April 2019) =
179
+ * Added: Meta genertor #2543
180
+ * Added: Bridge Qode SEO Compatibility integrated #2538
181
+ * Added: Lazy Load of Smush and Smush Pro plugin Compatibility integrated #2990
182
+ * Fixed: Validation errors occur when Wordpress Comments Option is enabled #2989
183
+ * Fixed: Home page displays latest posts instead of custom page when enfold theme activate #2943
184
+ * Fixed: API URL conflict with Mobile redirection #2917
185
+ * Fixed: Instant Article fatal error #2968
186
+ * Fixed: Undefined index fb-instant-page-id PHP notice #2570
187
+ * Fixed: All media queries load in single media query only code updated #2711
188
+ * Fixed: Instant Article feed code updated #3018
189
+ * Fixed: Space after the "data:image/png" part of the base64 encoded CSS background image #2974
190
+ * Fixed: GDPR consent is not working on ios #2876
191
+ * Fixed: PHP Errors in latest v0.9.97.46.1 after activation on fresh WP installation #3028
192
+ * Fixed: Issue with moblie redirection with non-amp link #3021
193
+ * Fixed: Cntr class automatically removed after activating elementor plugin in swift theme #3025
194
+ * Fixed: Javascript Console errors after the v0.9.97.47 update #3079
195
+
196
+ = 0.9.97.47 (19th April 2019) =
197
+ * Added: AMP by Automattic Compatibility integrated #2287
198
+ * Added: Click Mag WP Theme compatibility integrated #2796
199
+ * Added: New filter in contents-module of page builder for raw html #3001
200
+ * Fixed: PHP Warning illegal string offset When AMP layout plugin activate #2951
201
+ * Fixed: CSS is getting breaked in GoodLife theme #2673
202
+ * Fixed: PHP Debug errors in v0.9.97.46 #3011
203
+ * Fixed: Fatal error call to undefined method WPSEO_Options #3008
204
+ * Fixed: Proper escaping in Alexa Analytics #2984
205
+
206
+ = 0.9.97.46.1 (10th April 2019) =
207
+ * Fixed: Theme framework templates loading multiple times #2977
208
+
209
+ = 0.9.97.46 (9th April 2019) =
210
+ * Added: WP Subtitle compatibility integrated #2831
211
+ * Added: New filter in page builder for Enable/disabled check #2998
212
+ * Added: Additional Page Builder compatibility added #2643
213
+ * Fixed: The tag 'p' is disallowed & auto added as child of tag 'amp-accordion' #2498
214
+ * Fixed: Histats Not working #2909
215
+ * Fixed: itemprop="image" is being removed from the AMP Pages #2585
216
+ * Fixed: CSS pseudo-element not working when minify option is enabled #2907
217
+ * Fixed: Directories path code improved, if the plugin is installed outside (/wp-content/plugins) #1531
218
+ * Fixed: WP_debug warnings and notices #2958
219
+ * Fixed: More than one canonical issue with Rank Math SEO Plugin #2975
220
+ * Fixed: Background image or color in the 1st row of page builder is applied to all below row #2994
221
+ * Fixed: Rare Distorted image aspect ratio issue with Gutenberg editor #2931
222
+ * Fixed: Font family for Content in Single page code improved #2122
223
+ * Fixed: Fatal Error due to SEO press plugin #3003
224
+ * Fixed: Rare issue with Mobile redirection on Homepage after v0.9.97.32 #2972
225
+ * Fixed: PageSpeed Score Improvement for all Designs #2979
226
+
227
+ = 0.9.97.45 (4th April 2019) =
228
+ * Added: SeoPress compatibility integrated #1589
229
+ * Added: WP Appbox compatibility integrated #2791
230
+ * Added: Infinite Scroll feature integrated. #2682
231
+ * Added: Facebook like button added in Sticky Social Share #2186
232
+ * Added: Font family for Content in Single page #2122
233
+ * Fixed: Custom post type categories not showing in amp pagebuilder #1993
234
+ * Fixed: Duplicate SiteNavigationElement issue #2952
235
+ * Fixed: AMP Theme Framework Multisite issue #2936
236
+ * Fixed: Custom AMP Editor Content is Not rendering when Elementor is activated #2901
237
+ * Fixed: Title issue on Homepage with Yoast if we select custom front page #2962
238
+
239
+ = 0.9.97.44.2 (1st April 2019) =
240
+ * Added: Element folder files override in the Design One, Design Two and Design Three for the Child theme #2770
241
+ * Added: High-resolution Images [Additional image guidelines] option added in structure data #2259
242
+ * Fixed: Hide by default option from bulk tools is not working when amp takeover option is enabled #2832
243
+ * Fixed: Space removed while checking in the ampforwp_onesignal_notifications_widget function #2569
244
+ * Fixed: Display on User Avatar option #2942
245
+ * Fixed: Edit page is getting blank when product module is used #2944
246
+ * Fixed: YoastSEO post analysis broke & getting Uncaught TypeError: $ is not a function #2948
247
+ * Fixed: Yoast meta data are not renderring correct content for custom homepage #2928
248
+ * Fixed: Date format in Swift theme homepage/loop #2965
249
+ * Fixed: Published Date Disappear When selecting Horizontal Design in Related Post [swift-theme] #2957
250
+
251
+ = 0.9.97.44.1 (29th March 2019) =
252
+ * Added: Advertisement AMP panel improved #2724
253
+ * Fixed: Vuukle AMP integration code updated #2600
254
+ * Fixed: Fatal Error with old Plugins manager v1.0 #2976
255
+
256
+ = 0.9.97.44 (28th March 2019) =
257
+ * Added: Captions feature in AMP page builder #2645
258
+ * Added: Compatibility with the Youtube Oembed Plyr plugin #1505
259
+ * Added: Caption option for gallery/slider module in pagebuilder #2790
260
+ * Added: Like & share feature for every image in instant_articles #2764
261
+ * Added: Genesis option in SEO settings #2386
262
+ * Added: Improved the 'Setup AMP Feature' and 'Welcome to AMP' tabs & Enhance the Support button on AMP panel #2980
263
+ * Fixed: AMP Theme Framework getting conflicted #2782
264
+ * Fixed: Unwanted code for call-now component is being used #2652
265
+ * Fixed: amphtml tag while AMP Takeover option is enabled #2550
266
+ * Fixed: Debug warnings after 0.9.97.15 #2532
267
+ * Fixed: 'Header design' section in "Header" tab removed when design-1,2 and 3 is active & minor improvements #2978
268
+
269
+ = 0.9.97.43 (12th March 2019) =
270
+ * Fixed: Fallback for Redux classes #2377
271
+ * Fixed: Search widget CSS for Design-2 #1400
272
+ * Fixed: Navigation Menu CSS for Swift theme #2593
273
+
274
+ = 0.9.97.42 (11th March 2019) =
275
+ * Fixed: Incompatibility with AMP Plugin Manager
276
+
277
+ = 0.9.97.41 (11th March 2019) =
278
+ * Added: Color picker for Footer Area #2320
279
+ * Added: Compatibility with WP User Avatar plugin to show the gravatar #2772
280
+ * Fixed: Options Panel not showing, says "You are not allowed to access this page" #2377
281
+ * Fixed: faster-image libraries not being able to determine dimensions #2692
282
+ * Fixed: Changes in endpoint to ?amp, Re-direct " /amp " to " ?amp " #2480
283
+ * Fixed: Font style getting change on Custom Front page #2594
284
+ * Fixed: When the user is directed to the AMP version of the page it changes the URL slighltly (swaps out characters) #2913
285
+
286
+ = 0.9.97.40 (9th March 2019) =
287
+ * Added: Smooth scrolling for anchors links and jumping links within a page #2062
288
+ * Added: Option to Enable/Disable Merriweather font in Design-1
289
+ * Fixed: External links are getting skipped #2862
290
+ * Fixed: Social Share “LINE” does not show up in swift theme #2641
291
+ * Fixed: Checkbox from menu listings in AMP theme framework #2618
292
+ * Fixed: PHP Warning undefined index fb-instant-page #2610
293
+ * Fixed: Instagram Posts not rendering in AMP #2629
294
+ * Fixed: Instant articles Image issue #2929
295
+ * Fixed: Default height & width values for amp-img when values are not set #2925
296
+
297
+ = 0.9.97.39 (5th March 2019) =
298
+ * Added: Compatibility with the Author Simple Box Plugin #2268
299
+ * Added: Compatibility when short codes are added in AMP widgets #2552
300
+ * Added: Compatibility with the footnotes plugin #2447
301
+ * Added: ID Support on the AMP PageBuilder #2474
302
+ * Added: embedly oembed support in wordpress #1160
303
+ * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515
304
+ * Fixed: Debug Errors #2627
305
+ * Fixed: Custom Front page is breaking in 0.9.97.16 #2589
306
+ * Fixed: Date Archive not working with Swift Design #2514
307
+ * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727
308
+ * Fixed: Issue with pagebuilder when yoast plugin is active. #2933
309
+
310
+ = 0.9.97.38 (28th February 2019) =
311
+ * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
312
+ * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
313
+ * Fixed: Issue with Post Pagination ( Single ) #2624
314
+ * Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681
315
+ * Fixed: Full excerpt length in single posts [swift] #2712
316
+ * Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
317
+
318
+ = 0.9.97.37 (23th February 2019) =
319
+ * Added: Static page template in AMP #2614 + #2900
320
+ * Fixed: Font size and other values are properly sanitizing #2898
321
+ * Fixed: Failed to parse script tag contents #2884
322
+ * Fixed: PHP Notices after the v0.9.97.32 #2879
323
+ * Fixed: oembed wordpress post renders as a full post in AMP #2003
324
+ * Fixed: Gallery/Slider of AMP pagebuilder not working
325
+ * Fixed: class are repeating number of times when image (icon) added in .svg format #2893
326
+ * Fixed: Debug warnings with WPML #2899
327
+ * Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
328
+
329
+ = 0.9.97.36 (19th February 2019) =
330
+ * Added: Mobile and tablets Detects separately for 'Mobile Redirection' option #2436
331
+ * Added: Scrolling bar for swift theme in chrome browser #2593
332
+ * Added: CSS condition when element markup is visible #2753
333
+ * Fixed: Pre tags not rendering properly on pages #2823
334
+ * Fixed: Logo resize should only apply when Resize setting is enable #2544
335
+ * Fixed: When /?amp is enabled "Visit AMP" is redirecting to dashboard #2363
336
+ * Fixed: ampforwp_wc_shortcode_title is loading globally #2756
337
+ * Fixed: Extra CSS is causing validation error of 50kb #2592
338
+ * Fixed: PHP warning issue in latest version of php #2895
339
+ * Fixed: Yoast analysis is giving false readings for the SEO When AMPforWP Pagebuilder is enabled #2435
340
+
341
+ = 0.9.97.35 (16th February 2019) =
342
+ * Added: Levelup Compatability #2718
343
+ * Added: "Align Justify" Option in Page builder's text module #2665
344
+ * Added: Default value for Swift Color Scheme #2793
345
+ * Fixed: ampforwp prefix in the analytics function #2886 #2890
346
+ * Fixed: "Below the Footer" ads option showing above and below the footer #2778
347
+ * Fixed: Debug error undefined index comments #2887
348
+
349
+ = 0.9.97.34 (14th February 2019) =
350
+ * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
351
+
352
+ = 0.9.97.33 (13th February 2019) =
353
+ * Fixed: Style sanitizer code updated #2387
354
+ * Fixed: UTM Parameters when Mobile Redirection is enabled #2854
355
+ * Fixed: ?nonamp=1 is not working properly #1947 & #2537
356
+ * Fixed: All media queries load in single media query only #2711
357
+ * Fixed: 'Hide AMP option' is not working when AMP take over is enabled #2880
358
+ * Fixed: Swift Hover Color Changes #2751
359
+ * Fixed: Google Font is not getting saved #2839
360
+ * Fixed: Sidebar CSS condition code fixed #2757
361
+ * Fixed: Performance improvement for ampforwp_stylesheet_file_insertion #2873
362
+
363
+ = 0.9.97.32 (8th February 2019) =
364
+ * Added: Rank Math SEO compatibility integrated #2701 & #2736
365
+ * Added: New filter "ampforwp_modify_thumb_url_array" to modify the thumbnail #2739
366
+ * Fixed: 'Call Button Color' option not working - code updated #2820
367
+ * Fixed: Validation error when uploading YouTube video in Comments #2827
368
+ * Fixed: When Mobile Redirection option is enabled then, fr (language symbol) is removed from the URL. #2721
369
+ * Fixed: Category Module from Page Builder not displaying #2870
370
+ * Fixed: The homepage displays the title of the first post in All in one SEO #2865
371
+ * Fixed: Title mismatch in some posts with Yoast #2871
372
+
373
+ = 0.9.97.31 (4th February 2019) =
374
+ * Added: Subtitles plugin Compatibility #2853
375
+ * Added: Created an option for Id's for all the modules and column in AMP Page builder #2730
376
+ * Fixed: All the Images are Adding AMP at the End of their URL #2391
377
+ * Fixed: When nextpage pagination is added, URL in is rendering /2?amp=1 #2767 #2766
378
+ * Fixed: Comments Issues #2755
379
+ * Fixed: The gutenberg button doesn't work in amp #2707
380
+ * Fixed: Button Module color is not getting changed #2745
381
+ * Fixed: Issue with amp menu converting & ASCII code to X #2855
382
+ * Fixed: 'Call Button Color' option not working #2820
383
+ * Fixed: Error: The attribute 'alt' may not appear in tag 'a' #2837
384
+ * Fixed: Captions are not working in Gallery #2576
385
+
386
+ = 0.9.97.30 (2nd February 2019) =
387
+ * Fixed: Wrong title on the archive pages #2864
388
+ * Fixed: data-loading-strategy attribute is double quoted #2863
389
+
390
+ = 0.9.97.29 (31st January 2019) =
391
+ * Fixed: Validation error due to Search Widget #2858
392
+ * Fixed: Issue after upgrading analytics code #2859
393
+ * Fixed: amp-animation error in amp theme framework and tech blogging amp theme #2819
394
+ * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast - code updated #2816
395
+ * Fixed: Search Console Crawl Errors ?nonamp=1/ is listed in Access denied #2760
396
+
397
+ = 0.9.97.28 (29th January 2019) =
398
+ * Added: Lightbox feature for Carousel #2731
399
+ * Added: Specific filters to modify the analytics code #2653
400
+ * Fixed: Homepage Blog CSS is loading on the custom frontpage in swift theme #2754
401
+ * Fixed: Reset all & Reset section issue for redux framework #2722
402
+ * Fixed: Transable redux fields for other plugins like wpml #2737
403
+ * Fixed: Proper condition for Ads css #2758
404
+ * Fixed: Jetpack stats pixel inserted twice since Jetpack v6.9 #2812
405
+ * Fixed: AMP pagebuilder full width for posts #2765
406
+ * Fixed: Undefined “non-content” in blacklist-sanitizer #2842
407
+ * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast #2816
408
+
409
+ = 0.9.97.27 (23rd January 2019) =
410
+ * Added: ampforwp_is_amp_endpoint_takeover filter added
411
+ * Fixed: The attribute 'action' may not appear in tag 'FORM [method=POST]' #2835
412
+ * Fixed: Image size smaller than recommended size Warning in Search console #2838
413
+
414
+ = 0.9.97.26 (21st January 2019) =
415
+ * Added: Improve the Extension array code #2822
416
+ * Fixed: WP_Widget_Text conflict after v0.9.97.24 #2821
417
+
418
+ = 0.9.97.25 (17th January 2019) =
419
+ * Added: Help message for background video of column setting of Page Builder #2716
420
+ * Added: Review option in plugins page #2715
421
+ * Added: Excerpt length option in Category module of Page Builder #2733
422
+ * Added: Font Performance with font-display #2743
423
+ * Added: Custom template for front-page & home-page #2714
424
+ * Fixed: AMP Footer sidebar is not working in master #2800
425
+ * Fixed: <i> tag not working in Title #2804
426
+ * Fixed: alt attribute of <img> tag is not working when the image is inside the <a> tag #2617
427
+ * Fixed: Remove the unnecessary code for '404 error' text in amp translation panel #2738
428
+ * Fixed: Subtitle issue using with Jannah theme #2732
429
+ * Fixed: Proper names given for AMP Widgets #2797
430
+ * Fixed: Notice: Undefined index: hide-amp-tags-bulk-option2 and Undefined variable: inline_related_posts in features.php on line 4698 & 5546 #2795
431
+ * Fixed: Quality of 'featured image slider' in Design3 #2779
432
+ * Fixed: Embed Twits with twitter links #2798
433
+ * Fixed: /amp in the telephone link when 'Change Internal Links to AMP' option enabled #2742
434
+ * Fixed: Position of social sharing buttons 'above content' on pages #2809
435
+ * Fixed: lang attribute in HTML tag #2808
436
+ * Fixed: In footer, 'View non-AMP pages' is repeated twice when 'back to top link' option is enabled #2807
437
+
438
+ = 0.9.97.24 (9th January 2019) =
439
+ * Added: Compatibility with new and all default WP widgets #1400
440
+ * Fixed: Performance issue #2762
441
+ * Fixed: Need to add amp endpoint filter #2761
442
+ * Fixed: When Hide AMP Option is enabled in PageEditor with Convert AMP to WP theme (Beta) enabled it's providing output as AMP Page #2735
443
+ * Fixed: Whenever an image inserted, has width="100%" and height="100%", its giving Validation error. #2748
444
+ * Fixed: Custom post type is showing a blank page in the swift theme #2512
445
+ * Fixed: Whenever Responsive AD is enabled then the AD should load on the screen without any effect to the normal mode AD in D1,2,3, and Swift #2531
446
+ * Fixed: When Convert AMP to WP theme (Beta) is enabled GDPR popup isn't closing #2763
447
+ * Fixed: If twitter embed code is added then other blockquotes tag are not working #2750
448
+ * Fixed: Custom post type is showing a blank page in the swift theme #2512
449
+ * Fixed: Conflict with the Schema and Structure data plugin #2777
450
+ * Fixed: In the swift theme the Sticky social icons overlaps #2601
451
+ * Fixed: " Top " Button functionality to be improved. #2529
452
+ * Fixed: Drop down icon appearing twice #2785
453
+ * Fixed: Custom front page Meta description and content are not rendering for ALL in SEO plugin. #2702
454
+ * Fixed: Hover color is not appearing properly #2787
455
+
456
+ = 0.9.97.23 (18th December 2018) =
457
+ * Fixed: Sub menu items and arrows are not functioning in publisher theme. #2672
458
+ * Fixed: Fatal error when Polylang(Core) is activated. #2657
459
+ * Fixed: Improve coding in amp-page-builder.php #2725
460
+ * Fixed: Escaping not done properly #2723
461
+ * Fixed: Serialization problem with AMP settings data. #2717
462
+ * Fixed: Whenever Convert AMP to WP theme (Beta) option is enabled Logo Image is being stretched. #2726
463
+
464
+ = 0.9.97.22 (6th December 2018) =
465
+ * Added: Total Plus theme compatibility #2511
466
+ * Added: Allow SVG format Logo in AMP #2431
467
+ * Fixed: Vuukle AMP integration #2600
468
+ * Fixed: "Change Internal Links to AMP" not working properly for anchor tags (internal links) #2562
469
+ * Fixed: Secondary menu color is not outputting the value in latest update #2680
470
+ * Fixed: The instagram embed code is not working in facebook instant article in the AMP. #2523
471
+ * Fixed: FTP Link being generated in Non-AMP but not in AMP #2477
472
+ * Fixed: Videos aren't rendering whenever Convert AMP to WP theme (Beta) is enabled #2501
473
+ * Fixed: More debug errors #2513
474
+ * Fixed: Comments closed not looking good in Swift theme #2542
475
+ * Fixed: Excerpt Option is not Working. #2509
476
+ * Fixed: Image of Design 3 and Swift are same in Installation wizard #2540
477
+ * Fixed: AMP renders with ?q after the /amp #2361
478
+ * Fixed: Tables overflow in swift theme when adding the tables to the site [TEST + ALT solution] #2392
479
+ * Fixed: Unable Access the Wp-admin page when Amp takeover option is Enabled. #2476
480
+ * Fixed: Latest post title is displaying in the AMP homepage instead of site title #2419
481
+ * Fixed: AMP menu is not working when Jetpack Mobile theme option is enabled #2584
482
+ * Fixed: Link to Non-AMP page in Footer points to 404 #2586
483
+ * Fixed: Debug warnings in error logs #2367
484
+ * Fixed: The AMP for WP plugin(Version 0.9.97.20) bug are notice-error :undefine index and Unused code. #2687
485
+ * Fixed: Improvements in AMP page builder code #2471
486
+ * Fixed: Table class is getting removed in AMP pages. #2699
487
+ * Fixed: Pagination is not working when AMP Takeover is enabled #2686
488
+ * Fixed: The featured slider is not displaying properly images using the Firefox browser with the design 3 theme. #2677
489
+ * Fixed: Icons for AMP Stories and Shortcode Ultimate #2598
490
+ * Fixed: Images are stretched whenever Convert AMP to WP theme (Beta) Option is enabled. #2694
491
+ * Fixed: Vertical words in table on mobile #2606
492
+ * Fixed: PageBulider getting following notices in old module #2305
493
+ * Fixed: Export option of page builder is not working in latest version #2709
494
+ * Fixed: Remove the span tag in all 404.php files of the 4 designs #2704
495
+ * Fixed: Wrong escaping done for default value for Google Analytics #2697
496
+ * Fixed: Re-modification of single settings option panel when newspaper theme activated #2706
497
+
498
+ = 0.9.97.21 (21st November 2018) =
499
+ * Fixed: Sanitation of user contents before save #2679
500
+ * Fixed: Menu is Not working in Minimal Blogging theme (0.9.97.20) #2667
501
+ * Fixed: Author bio not showing proper link #2674
502
+ * Fixed: HTML not being rendered on cookie consent notifications #2671
503
+ * Fixed: Telephone link not working
504
+
505
+ = 0.9.97.20 (29th October 2018) =
506
+ * Fixed: Plugin Vulnerability #2650
507
+
508
+ = 0.9.97.19 (4th October 2018) =
509
+ * Fixed: Tables overflow not working in swift theme #2392
510
+ * Fixed: Null check added to fix null reference exception #2526
511
+ * Fixed: Minor Bug related with menu #2612
512
+
513
+ = 0.9.97.18 (29th September 2018) =
514
+ * Fixed: Minor Bug related with menu
515
+
516
+ = 0.9.97.17 (28th September 2018) =
517
+ * Added: Featured Slider "Tag" support #954
518
+ * Added: Marfeel plugin is blocking Internal pages of AMP and rendering 503 error #2423
519
+ * Fixed: Dropdown Menu arrows not working properly in Swift #2148
520
+ * Fixed: Wrong implementation of load_plugin_textdomain function #2408
521
+ * Fixed: Page Float to right and showing menu content when page scroll horizontally in iPhone device #2434
522
+ * Fixed: Internal Link Option is not Working in beta #2443
523
+ * Fixed: Missing conditional tag for get_the_tags() causing "Invalid argument supplied for foreach()" error #2456
524
+ * Fixed: Need to make a space in meta information and published date is not getting translated #2411
525
+ * Fixed: Meta og:title and description tag are Not completely Reflecting #2454
526
+ * Fixed: Images are not aligned center when published with Gutenberg Editor #2462
527
+ * Fixed: Anchor Tag is not working because there is a space in between link #2465
528
+ * Fixed: Fix social shares icons #2467
529
+ * Fixed: Debug errors in beta #2472
530
+ * Fixed: homepage is getting blank when "Convert To WP" is enable only for posts #2493
531
+ * Fixed: wrong amphtml URL generating for WPML #2573
532
+
533
+ = 0.9.97.16 (19th September 2018) =
534
+ * Added: 3 Types of Gallery designs #1968
535
+ * Added: New Section to show 'change log' on Welcome Page #1753
536
+ * Added: Allow HTML in footer section of translation panel in design 3 #1950
537
+ * Added: Need to make the compatibility with The Voux theme #2263
538
+ * Fixed: Special character "|" breaking the url in the twitter share #2264
539
+ * Added: Read more button for post on blog page #2273
540
+ * Fixed: Category Labels are Clickable on Swift Homepage even Archive support is off #2279
541
+ * Fixed: Above Loop and Below Loop Sidebar Widget area is not connected with Swift theme #2280
542
+ * Fixed: Aq_Resize.process() errors for images hosted on CDN #2285
543
+ * Fixed: Convert to WP Option is displayed in Swift Theme, but not in Design 3. #2291
544
+ * Fixed: Need to have only one text-domain in the string of the plugin #2292
545
+ * Fixed: Bug in Facebook comments. #2300
546
+ * Added: Beta Testing link in the Options panel #2302
547
+ * Added: "X" button in the menu of D3 #2294
548
+ * Fixed: AMP Take over is applying even on product when this option is enabled only for posts. #2304
549
+ * Fixed: The Option Facebook App ID not necessary in the social icons of AMP panel when using Swift #2384
550
+ * Fixed: Embeds not working in Archive Description #2402
551
+ * Fixed: Spurious spaces in Footers #2521
552
+ * Fixed: Additional spaces Pagination div on article posts #2522
553
+
554
+ = 0.9.97.15 (13th September 2018) =
555
+ * Fixed: Pagination is not working on date archive #2289
556
+ * Added: Options to show Social Icons in different places in Swift #1722
557
+ * Fixed: Localization string for "% days ago" not working for non-Latin languages #1491
558
+ * Added: Social Share by Supsystic Compatibility #1509
559
+ * Fixed: Duplicate h1 tags in Design One #1522
560
+ * Added: 3 Appearance option for Related Posts in Swift theme #1545
561
+ * Fixed: RTL not working with Footer properly #1655
562
+ * Fixed: Proper implementation of the property of all in one SEO pro to avoid fatal error #2500
563
+ * Fixed: Notice: Undefined index: extension in thirdparty-compatibility.php on line 401 - 406 #2496
564
+ * Fixed: Wrong url in Non-Amp Version link on blog posts page and category archives #2424
565
+ * Fixed: The Consent.php path is getting index in Webmaster tool #2518
566
+ * Added: Option to add custom things in Instant Articles #1089
567
+ * Added: Show/hide Instant Article on specific posts #1297
568
+ * Added: Facebook Instant Articles (FBIA) Crawler Ingestion (ia:markup_url) tag #1474
569
+ * Added: Facebook Instant Articles Meta Tag #1486
570
+ * Added: Related posts for instant articles #1634
571
+ * Added: Option to remove Author info from Instant Articles #1483
572
+ * Added: Facebook Instant Articles in each Catagory #1524
573
+ * Added: Custom Facebook Instant Articles Ad option #1475
574
+ * Fixed: Pagination not working after changing the pagination base #1485
575
+ * Added: Breadcrumb with tag #1305
576
+ * Fixed: Enabled WordPress Comments by default #1501
577
+
578
+ = 0.9.97.14 (4th September 2018) =
579
+ * Added: Adobe Analytics Support #887
580
+ * Fixed: Same Icons loading for some extensions #2172
581
+ * Fixed: Removed extra spacing from "Back to top" text #2349
582
+ * Fixed: Retina featured images support for Homepage and archive loop images #2334
583
+ * Fixed: When WooCommerce Product Slider is Installed, the Picture of Icons are not loading #2325
584
+ * Added: Customizr Theme Lazy Loading compatibility #2322
585
+ * Fixed: "Save Module" button of AMP page Builder not displaying in OSX and in Safari #1943
586
+ * Fixed: Sort Related Posts Randomly Not Working in Swift theme #2308
587
+ * Added: Need to create a tutorial of How to Enter your Audience Network Placement ID of advertisement in the Instant Article #1723
588
+ * Fixed: Retina Images option Improvement-II #2296
589
+ * Fixed: Disable the look or check of redux framework #2293
590
+ * Fixed: With Redux core plugin, AMP option panel design not loading #2258
591
+ * Fixed: Issues with pagination #2253
592
+ * Added: Thrive Architect Compatible #1575
593
+ * Fixed: Notice Undefined variable categories_array #2486
594
+ * Fixed: Need to add upscale parameter in-line related posts #2488
595
+ * Fixed: Getting the warnings in error log due to global variable, not present #2395
596
+ * Fixed: Google Analytic issue while setting up Run Installation wizard #2491
597
+ * Added: Read more button AKA Content Sneak Peek feature for post #2246
598
+ * Added: Showing related items/post in after nth paragraph #2246
599
+
600
+ = 0.9.97.13 (28th August 2018) =
601
+ * Fixed: Fatal error in `ampforwp_related_post_loop_query()`
602
+
603
+ = 0.9.97.12 (27th August 2018) =
604
+ * Fixed: Quote runs only in block post not on pages #2399
605
+ * Added: Create a Sidebar option that can be used as global Sidebar #2388
606
+ * Fixed: words are breaking and not readable #2441
607
+ * Fixed: Text is breaking into next line while there is no space between the text in custom AMP Editor #2270
608
+ * Fixed: IP Anonymization #2421
609
+ * Added: Setka Editor Compatibility #2468
610
+ * Fixed: In swift theme, when user ads the ad Above the Related Posts (Single Post); the content doesn't display #2311 and #2318
611
+ * Added: Toggle controls are now accessible #1691
612
+ * Added: Global Sidebar is now Connected with AMP Pagebuilder #2371
613
+ * Fixed: #amp-user-notification1 Styling was loading even when disabled from option panel in swift #2400
614
+ * Fixed: Remove the empty `@media{}` css generated by Pagebuilder #2473
615
+ * Fixed: Blank Lines in HTML Source code #2445
616
+ * Fixed: Optimize AMP pages on Google Lighthouse #2082
617
+ * Fixed: RSS Feed is not working when AMP Takeover is enabled #2309
618
+
619
+ = 0.9.97.11 (21th August 2018) =
620
+ * Minor Update
621
+
622
+ = 0.9.97.10 (18th August 2018) =
623
+ * Fixed: Homepage build with AMP PageBuilder is displaying only when the checkbox of the Custom AMP editor is enabled #2350
624
+ * Added: Created a new function to get the settings instead of calling it directly from global $redux_builder_amp everytime. `ampforwp_get_setting` created #2177
625
+ * Fixed: Comments and share not loading on pages only in swift #2401
626
+ * Fixed: Back to Top link not working in Swift Design #2404
627
+ * Added: Ads Below the Author Area in Swift theme #2455
628
+ * Fixed: AMP should remove spaces from GTM ID automatically #2413
629
+ * Fixed: Some Posts are not displaying in Blog page even when AMP is enabled from Post settings #2375
630
+ * Fixed: Wrong AMPHTML when using static page as blog using custom-code/pagebuilder from reading settings #2396
631
+ * Added: Add paginations meta tags #2343
632
+ * Fixed: Updated the code of AMP renders with ?q after the /amp #2361
633
+ * Added: Add support for Relevanssi search #2307
634
+ * Added: Show index/noindex label when enabling the options in SEO Settings #2290
635
+ * Added: Add AMP consent in AMP Theme Framework #2440
636
+ * Added: Created a component called `AMP-geo` so anyone can use it in thier AMP theme #2440
637
+
638
+ = 0.9.97.9 (1st August 2018) =
639
+ * Minor Improvements
640
+
641
+ = 0.9.97.8 (24th July 2018) =
642
+ * Fixed: AMP renders with ?q after the /amp #2361
643
+ * Fixed: iThemes Sync can not connect to the site. #2380
644
+ * Fixed: H1 to H6 styling is not reflecting in the Swift theme #2383
645
+ * Fixed: Underline on Links function is not working. #2372
646
+ * Fixed: WordPress Admin Color Scheme not applying #2390
647
+ * Fixed: Breadcrumbs are not disabling when the sidebar template is selected #2376
648
+ * Fixed: All the Images are Adding AMP at the End of their URL. #2391
649
+
650
+ = 0.9.97.7 (18th July 2018) =
651
+ * Fixed: PageBuilder not loading on frontpage #2360
652
+ * Fixed: 500 error on somepages due to open wp_query by other plugins
653
+ * Fixed: License key reupdating #2261
654
+ * Fixed: AMP renders with ?q after the /amp #2361
655
+
656
+ = 0.9.97.6 (14th July 2018) =
657
+ * Fixed: Error and Warning on Structured Data for Logo. #2360
658
+ * Fixed: Category Bulk tool breaking meta boxes #2335
659
+
660
+ = 0.9.97.5 (11th July 2018) =
661
+ * Fixed: Title disappearing in Design 1,2,3 when legacy pagebuilder is enabled #2341
662
+ * Fixed: ld+json getting a broken when special characters are added in the image. #2346
663
+ * Fixed: Hide by Category Breaking post metabox #2330
664
+ * Fixed: Hiding excerpt when global $redux_builder_amp is empty #2330
665
+ * Fixed: When Google Tag Manager is enabled, only Google Analytics should get disabled but not other analytics. #2340
666
+
667
+ = 0.9.97.4 (09th July 2018) =
668
+ * Fixed: Huge Performance upgrade in the way fetching the logo url #2317
669
+ * Fixed: Fatal Error due to unable to modify values in Structured Data Object #2327
670
+ * Fixed: Seperate option for Featured Image in pages in Swift theme #2328
671
+ * Fixed: `<p>` tags disabling where not wanted #2330
672
+ * Fixed: Fatal error in contact form module while ninja form or gravity form plugins are not activated #2310
673
+ * Fixed: Woo Commerce Category page not working properly #2333
674
+ * Fixed: Few issues related to amp-facebook-comments #2300
675
+ * Fixed: Limit number of Tags and Category to 500 in Hide AMP-Bulk tools #2336
676
+
677
+ = 0.9.97 (27th June 2018) =
678
+ * For more details check out [the blog post](https://ampforwp.com/0-9-97-released-strengthening-of-foundation-89th-update/)
679
+ * Fixed: Extraposition attribute left in CSS Design #2 #2119
680
+ * Fixed: Non-AMP header link not working #2109
681
+ * Added: Create an Ad Above the Post Content #2155
682
+ * Fixed: "AGO" text was not translatable #2158
683
+ * Added: Filter created `ampforwp_header_url` to modify logo url #2141
684
+ * Fixed: Removing the text "amp" in footer view non-amp-link #2158
685
+ * Added: Compatibility WP user Avatar plugin added #2011
686
+ * Fixed: Design 2 - meta info producing a block of empty HTML #1969 #1954
687
+ * Added: Pocket and Hatena Bookmark social share buttons Added #1652
688
+ * Fixed: External Links are appended with "amp" at the end of the url in content. #2174
689
+ * Fixed: Some Issues Found in Design #3 #2130
690
+ * Fixed: ScoopVersion: 1.4 By boostdevelopers theme displaying the error only in the category #1683
691
+ * Fixed: Page featured Image is not displaying in the Swift theme #2136
692
+ * Fixed: Dropcap breaking the youtube embed code #2157
693
+ * Fixed: Bulk hide by default option is requires Permalinks to be saved #2145
694
+ * Fixed: Fully compatibility with muffin page builder #2180
695
+ * Fixed: Incontent Related Post Issues #2078
696
+ * Fixed: Search page should not have AMP version of the page and not in search result #2191
697
+ * Added: Control added to modify Retina Images resolutions #2099
698
+ * Added: Created an option to duplicate a page builder element #1986
699
+ * Added: Image Caption is not displaying below the Image in design 1,2,3 #2101
700
+ * Fixed: Post pagination not working properly in D1, D2 and D3 #2168 #2243
701
+ * Fixed: Auto re-save permalink if the options in reading setting page get changed #2190
702
+ * Fixed: Leave a comment not looking good in Swift theme #2150
703
+ * Added: Social icons for pages. #2162
704
+ * Added: Create an option to pull canonical from Yoast #2118
705
+ * Added: Full Support for All in one SEO #1720
706
+ * Fixed: Single with sidebar CSS should only load if that layout type is selected #2091
707
+ * Fixed: Required Filed is not working in the Repeater in Page builder #2217
708
+ * Fixed: alt in `<div>` causing validation errors. #2093
709
+ * Added: Drop Down Menu Support in Swift Header Menu #2095
710
+ * Added: Parallax Setting Added in PageBuilder #2095
711
+ * Added: Multiple Layout Settings added in Feature Module in Page Builder #2095
712
+ * Added: Add the option changing the sliding speed of slider in "Slider module" of AMP Page Builder #2218
713
+ * Added: Created an option Related Post link in non amp #2201
714
+ * Fixed: Removed Jannah LazyLoad on AMP Mode #2224
715
+ * Fixed: Custom post types with custom taxonomy not working in AMP #2209
716
+ * Fixed: frontpage and homepage not working properly AMP take over #2153 #2277
717
+ * Added: Button field created in Feature module #2068
718
+ * Added: Excerpt should also work on homepage and categories page #2176
719
+ * Fixed: Options panel breaks in when RTL in WP Dashboard #2176
720
+ * Fixed: Featured image from Custom fields in page builder Category module #2237
721
+ * Added: Forms Module Support added in PageBuilder #2221
722
+ * Fixed: Paginated AMP URL on the category are opening to 404-page #2233
723
+ * Fixed: Ads not displaying properly in RTL #2227 #2138
724
+ * Fixed: single quotation (') in text module breaking AMP page builder #1940
725
+ * Added: Filter created to modify `ampforwp_loop_image_update` image arguments in components of AMP theme framework #2057
726
+ * Added: Option to change the locale of Facebook comments #2127
727
+ * Added: Search option in options panel #2088
728
+ * Fixed: Accordion not working when the user enters some data in Description with HTML Tags #2088 #2097
729
+ * Fixed: Internal links now working with ?amp=1 #2204
730
+ * Fixed: UTM Parameters not working properly with AMP #2223
731
+ * Fixed: Multiple Slider module of AMP Page builder not working #2090
732
+ * Fixed: Hide AMP by categories option should hide by default in the backend of that specific post #2112
733
+ * Added: IP Anonymization in Google analytics #2135
734
+ * Fixed: Improvement in the styling of AMP option panel #2102
735
+ * Added: Added new fonts control for Content in Single page #2122
736
+ * Fixed: Legacy page builder button styling is not loading properly #2036
737
+ * Added: Filter added so we can disable Comments on specific pages `ampforwp_comments_visibility` #2170
738
+ * Fixed: Improvement in Excerpt on small screen option #2034
739
+ * Added: Comments on Pages #2229
740
+ * Fixed: Pagination not working for some websites #2241
741
+ * Fixed: "Menu" option in Footer connected with Swift #2146
742
+ * Added: Wistia Support #1875
743
+ * Added: Add option in page builder to give the specific name to all modules #2251
744
+ * Added: Compatibility with Muffin Builder #2137
745
+ * Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
746
+ * Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
747
+ * Added: Render all the AMP Components added in Post Editor #2216 #2228
748
+ * Fixed: "Gap" Module of ThemeCo breaking the AMP pages #2220
749
+ * Added: Search widget compatibility #2143
750
+ * Added: Advertisement Module created in AMP Pagebuilder #2131
751
+ * Fixed: Performance issue with the function `ampforwp_get_comments_gravatar` #2234
752
+ * Fixed: Empty the amp pages, when the Clearfy HTML compress is enabled #2110
753
+ * Fixed: The attribute 'value' appearing in tag 'a' throwing the validation error #2262
754
+ * Fixed: Versioning of Styles and Scripts of redux-core #2126
755
+ * Added: Related Posts based on X days #2132
756
+ * Fixed: Warning in custom-sanitizer.php #2173
757
+ * Added: vuukle comment support #2075
758
+ * Fixed: Facebook Comment should not appear on the Checkout page, Add to cart page, or shop page #2170
759
+ * Added: SpotIM comment support #2075
760
+ * Added: Additional Controls added in Design3 Featured slider #2222
761
+ * Fixed: Username in AMP Option panel color was too light #2266
762
+ * Added: Settings created to modify H1 to H6 #2059
763
+ * Fixed: AMP_QUERY_VAR debug issue #2265
764
+ * Added: Custom page template in AMP #1923
765
+ * Fixed: Comments Button is not displaying in Design #3 #2163
766
+ * Added: Ability to add Forms Shortcodes in footer Widgets #2226
767
+ * Added: Option to add rel="nofollow" in AMP page builder button module #2239
768
+ * Added: Background video option in amp page builder #2195
769
+ * Fixed: Drop Down Menu Support in Swift Header Menu #2095
770
+ * Fixed: Yoast Description not getting added in AMP #2159
771
+ * Fixed: Improvement in styling of AMP option panel #2102
772
+ * Fixed: Hide AMP Bulk Tools Improvements #1867
773
+ * Added: Compatibility with the Relevanssi Plugin #1503
774
+
775
+ = 0.9.96 (2nd June 2018) =
776
+ * Added: Fully GDPR Compliance
777
+ * Fixed: GTM not working
778
+
779
+ = 0.9.86.1 (8th May 2018) =
780
+ * A bug causing validation issues has been resolved.
781
+
782
+ = 0.9.86 (3rd May 2018) =
783
+ * For more detials check out [this blog post](https://ampforwp.com/0-9-86-released-getting-ready-for-future-87th-update/)
784
+ * Added: GDPR Compliancy #2040
785
+ * Added: Muffin Page Builder Compatibility #1455 #1893
786
+ * Added: Thrive leads compatibility #2067
787
+ * Fixed: Load structured markup json in Footer to improve performance #1945
788
+ * Added: Font Size and Font Family Controls added in Content Presentation Module #1962
789
+ * Added: Font Weight Control added in Text Module in PageBuilder #1962
790
+ * Added: Other necessary controls added in Content Presentation Module #1962
791
+ * Added: New Design called "Design 4" added in Content Presentation Module. #1962
792
+ * Fixed: License Activation process connected with AMP extensions #1981
793
+ * Added: Icon Selector control added in Button module in AMP Page Builder #1962
794
+ * Added: Filter called `ampforwp_get_comments_gravatar` to modify Author Avatar Images #1949
795
+ * Fixed: Validation error fixed by removing json+ld values to remove CDATA #1977
796
+ * Added: Icon Adjustment Option is added in the Button Module #1962
797
+ * Fixed: Debug Warnings fixed #1976
798
+ * Fixed: If AMP support on post and page is disabled then mobile redirection was not working #1979
799
+ * Fixed: Responsive element added in Image Module #1962
800
+ * Fixed: Custom Post and Custom Taxonomies Archives not working in AMP #1957
801
+ * Fixed: AMP take over is on and AMP support on the home page is disabled it was redirecting to some other pages #1994
802
+ * Fixed: Design 1 and Design 2 shouldn't show 'social' tab #1996
803
+ * Added: AMP WordPress Theme notice
804
+ * Added: Rewrite Rules Added for WooCommerece #1957
805
+ * Fixed: AMP Takeover blog search results giving blank page #1990
806
+ * Fixed: Swift pagination markup is present even the page has no pagination #2000
807
+ * Fixed: Pagination breaking on second page on Archives when Blog page is not set #1998
808
+ * Fixed: Added proper Google API jump link #1966
809
+ * Fixed: Advance Index and no-index controls did not had description #1978
810
+ * Added: Filter added `amp_blacklisted_tags` in blacklist-sanitizer file
811
+ * Added: Hyperlink for image module added #1989
812
+ * Added: `ampforwp_get_frontpage_id` a common fucntion created to get post id for AMP frontpage #2025
813
+ * Fixed: Comments controls were not working properly #1987
814
+ * Fixed: Fatal Error after updating the plugin from 0.9.73 to 0.9.83 version #2017
815
+ * Fixed: Filter created `ampforwp_modify_rel_url` to modify rel canonical URL #2012
816
+ * Fixed: Remove structured data json if removed from AMP options panel
817
+ * Fixed: amp widget appearing twice in design one #2008
818
+ * Fixed: Gif in content + Lightbox feature throws validation issue. #2032
819
+ * Added: New Features in the Page builder Modules #2029
820
+ * Fixed: License Key was not working properly #2026
821
+ * Fixed: Instagram comment view is getting cut off in Swift Theme #2002
822
+ * Added: Icon module support added in Desgin 1, 2 & 3 #1997
823
+ * Fixed: if GD or ImageMagick library is not present in the server then send the original image #2037 #2038
824
+ * Fixed: Swift theme homepage (Non-AMP) image resizing issues in Mobile version #1992
825
+ * Fixed: Header Element not working in Swift theme #1967
826
+ * Fixed: Stop Loading of Latest post scripts on Homepage and Frontpage #2041
827
+ * Added: Filter created `ampforwp_non_amp_links()` so users can have all the internal links non-amp #1973
828
+ * Fixed: Sanitize the archive description in loop component #1974
829
+ * Fixed: Double AMPHTML when FBIA Plugin is active #2043
830
+ * Fixed: Image Div is loading even if the image is not present in Swift #2033
831
+ * Fixed: Custom AMP editor is visible on pages (post type) even if the Page Support is off from amp options panel #2047
832
+ * Fixed: When 'Structure Data for WP' plugin active, Schema type in Structure section should hide #2049
833
+ * Fixed: Bugs in Video Module in AMP pagebuilder #2048
834
+ * Added: Autoplay feature added in Video Module #2048
835
+ * Fixed: Throwing error when Product Structured Data is selected #1975
836
+ * Fixed: Advanced CSS is not loading because the files are with hosting path #2046
837
+ * Fixed: Double Quotes breaking the html #2004
838
+ * Removed: Blog option is removed from AMP Options panel and it is connected with Pages option Under Reading Settings #2027
839
+ * Fixed: amphtml should not be created for 404 pages #2018
840
+ * Added: 404 Template added, useful for AMP Takeover #2042
841
+ * Fixed: Genesis meta titles are lost and not rendering correctly #2050
842
+ * Fixed: Search blank on AMP Takeover #1990
843
+ * Fixed: Remove Unused js files from Paginated Post Pages #2001
844
+ * Fixed: Extra Space adding in H1 and other SEO tags #2054
845
+ * Fixed: Undefined Index when called from robot #1960
846
+ * Fixed: amp facebook comment Js not loading to the custom front page of the swift theme. #2053
847
+ * Fixed: Tags label is not working properly when RTL Support on #1719
848
+ * Fixed: View Non-AMP Version In the footer link has an error #2066
849
+ * Fixed: Squirrly SEO is Adding the Javascript code in AMP #1696
850
+ * Fixed: Translation option issue when using POT file method #1941
851
+ * Fixed: amp-facebook-like extension is missing on Custom Frontpage #2061
852
+ * Fixed: GTM option repositioned #2056
853
+ * Fixed: Menu is appearing on left side instead of Right side when RTL support is ON for Design3 #1928
854
+ * Fixed: Sidebar Bugs #1972
855
+ * Added: Table Styling in Swift #1961
856
+ * Fixed: Genesis index, follow options not being rendered #2071
857
+ * Added: Filter created `ampforwp_robots_meta` to modify robots meta information #2071
858
+ * Fixed: PHP Notices #2065
859
+ * Added: Add a new hook `ampforwp_after_amp_menu` after the menu in all designs #2072
860
+ * Added: New Look to Options panel #1823
861
+ * Added: Retina Image Support added #1846
862
+ * Fixed: Pagebuilder hrefs were stripped in hebrew language #2089
863
+ * Fixed: Warning Fixed #2083
864
+ * Fixed: Gallery module images not loading in Firefox #1980
865
+ * Fixed: Pagebuilder Improvement #2024
866
+
867
+ = 0.9.85.5 (21st April 2018) =
868
+ * Added: Filter added to modify frontpage post id `ampforwp_modify_frontpage_id`
869
+ * Added: Filter added to modify amp template directory `ampforwp_template_locate` #1982
870
+ * Other minor bugs fixed
871
+
872
+ = 0.9.85.3 (12th April 2018) =
873
+ * Added: Custom Post type Archive Page support #1995
874
+ * Fixed: AMP TakeOver redirection issues #1994
875
+ * Fixed: Debug errors #1976
876
+ * Fixed: Social Profile pages were hidden for Design 1 to 3 #1996
877
+ * Fixed: Structured Data insertion was adding CData causing validation error #1999
878
+
879
+ = 0.9.85.2 =
880
+ * Minor Bugs fixed
881
+
882
+ = 0.9.85.1 =
883
+ * Minor Bugs fixed
884
+
885
+ = 0.9.85 (3rd April 2018) =
886
+ * For more detials check out [this blog post](https://ampforwp.com/0-9-85-released-stability-update-86th-update/)
887
+ * Fixed: Fatal error: Allowed memory size on FrontPage #1865
888
+ * Fixed: Proper Parameters for Pinterest Sharing #1853
889
+ * Added: Extra settings added in Button Module
890
+ * Added: Extra settings added in Text Module
891
+ * Fixed: Proper Parameters for Pinterest Sharing
892
+ * Fixed: Unwanted fields are removed form the Repeater in Button module
893
+ * Added: Enable/disable option added Related Posts #1829
894
+ * Fixed: Legacy PageBuilder option Repositioned #1851
895
+ * Fixed: Display the img tag only if source is present #1869
896
+ * Fixed: Huge design improvements in Swift theme #1818
897
+ * Added: Hook for Between Related Post is Added #1874
898
+ * Added: Blurb module text size and background color added
899
+ * Fixed: Comments Pagination issues #1816
900
+ * Added: Counter Module added
901
+ * Fixed: Date 48 years ago #1864 #1876
902
+ * Added: Ability to pass post id in amp_content() #1872
903
+ * Fixed: Changed the way images we fetched in WooWidget #1847
904
+ * Fixed: Changed the position of layout in Pagebuilder #1873
905
+ * Added: Pricing Module
906
+ * Fixed: Changed the position of layout in Pagebuilder #1873
907
+ * Fixed: amp_aq_resizer was not able to process the outside url #1881
908
+ * Fixed: Advanced Google Analytics improvements #1630 #1860
909
+ * Added: Field Added For ON & OFF in Page builder #1870
910
+ * Fixed: Two paginations in search pages in Swift theme #1855
911
+ * Fixed: Extra Div if categories not available #1856
912
+ * Fixed: removed debuged tags #1870
913
+ * Fixed: Published date connected with AMP options Panel #1888
914
+ * Added: Featured Image option in Swift #1889
915
+ * Added: Separate Blog settings #1887
916
+ * Fixed: single post ads should not load on pages #1896
917
+ * Fixed: Ads should not load on FrontPage if PageBuilder is enabled #1885
918
+ * Fixed: Background Image Support for the Columns #1871
919
+ * Added: Blockquotes design for Swift #1894
920
+ * Added: Co-Authors Plus compatibility #1895
921
+ * Added: pagebuilder for custom post types #1884
922
+ * Added: Border option is connected to options panel #1818
923
+ * Added: Responsive AD unit support #1852
924
+ * Added: Sub category arrow symbol is added in Swift theme #1818
925
+ * Added: Search text color is connected to options panel #1818
926
+ * Fixed: Removed notice when no posttype selected #1884
927
+ * Added: Ability to overwrite page template the WordPress way like front-page.php and page-{id}.php #1902
928
+ * Added: Ability to overwrite author page template the WordPress way like author.php and author author-name.php #1902
929
+ * Added: Lightbox Support for the images #1892
930
+ * Fixed: No mobile redirection when Dev mode is enabled #1907
931
+ * Added: Option to hide Author name in Swift #1890
932
+ * Fixed: Script facebook-comments should not load for Frontpage #1897
933
+ * Added: amp-facebook comments for AMP2WP #1911
934
+ * Added: Alt tag in all modules #1898
935
+ * Added: Sanitizers in Footer and sidebar widget in Swift #1835
936
+ * Added: Dropcap support #1900
937
+ * Added: Proper styling for iframes and videos in Swift theme #1909
938
+ * Fixed: Non-AMP link fixed for AMP Takeover #1916
939
+ * Fixed: Swift connected with Breadcrumb option #1915
940
+ * Added: Uninstall option created to completely remove AMPforWP data #1903
941
+ * Fixed: Recipe Structured Data requires name attribute #1917
942
+ * Fixed: No amphtml when It is hidden from Categories #1919
943
+ * Fixed: Content is breaking when Inline Related Post option is enabled #1912
944
+ * Fixed: Proper redirection setup for AMP Takeover #1913
945
+ * Added: Social media profiles added in menu #1901
946
+ * Fixed: No Ads should display on Frontpage or Posts if Pagebuilder is enabled #1885
947
+ * Added: #1899 Proper conditions for amp-analytics script
948
+ * Fixed: Turn off option not working by default fixed #1537
949
+ * Fixed: BreadCrumbs Should not load when PageBuilder is enabled #1925
950
+ * Fixed: Removed unwanted elements loading while pagebuilder is enabled #1929
951
+ * Fixed: amp-web-push should not load on Homepage and Blog #1930
952
+ * Added: SmartMag theme Compatibility #1905
953
+ * Fixed: Template overriding not working in child theme #1920
954
+ * Fixed: Horizontal scrolling in Swift #1844
955
+ * Fixed: Home page title should not be visible in AMP takeover #1921
956
+ * Added: Carousel Module Added #1937
957
+ * Fixed: Comments pagination not working #1816
958
+ * Fixed: Comments pagination not working #1816
959
+ * Added: Glue html css compatibility #1932
960
+ * Added: Data Caption Support on AMP Instagram Embed #1938
961
+ * Added: Ability to pass {author_name} and {author_id} added in Advance Analytics #1936
962
+ * Fixed: Scrollbar in Header area in Swift in firefox #1818
963
+ * Added: Disqus iframe height adjustment option #1935
964
+ * Fixed: Options panel conflict fixed with Mobius theme #1942
965
+ * Fixed: Problem with Button in Mobile view in Swift #1926
966
+ * Fixed: Removed canvas tag in AMP version causing validation errors #1880
967
+ * Fixed: Getting Conflict with Facebook Button by BestWebSoft #1740
968
+ * Added: Option to enter the "ID" on CTA button module #1931
969
+ * Added: Option for open same window in CTA module of page builder #1866
970
+ * Fixed: Logo fetch causing Huge performance issue #1679
971
+ * Fixed: Blurb module's default values were not set #1952
972
+ * Fixed: Allow script with application/ld+json #1958
973
+
974
+ = 0.9.84 (14th March 2018) =
975
+ * Added: Polylang Frontpage compatibility added #1779
976
+ * Fixed: Proper link for Linkedin added #1820
977
+ * Fixed: Incorrect function name was Added #1827
978
+ * Fixed: Thumbnail resizing issue in Swift #1828
979
+ * Fixed: Thumbnail issue in Loops of Design 3 #1714
980
+ * Fixed: Hide post builder for Swift #1824
981
+ * Fixed: To avoid warnings when there are no pages in WordPress #1810
982
+ * Fixed: Condition for the Thumbnail for Swift #1733
983
+ * Fixed: Proper Styling for footer for Swift #1733
984
+ * Fixed: Line height issue and CSS editor not working in Swift #1821
985
+ * Fixed: Renamed aq_resize to ampfrowp_aq_resize to avoid conflicts #1838
986
+ * Fixed: Add the prefix to avoid conflicts #1817
987
+ * Fixed: Added Custom format option in amp_date #1845
988
+ * Fixed: Removed amp-img tag where blank SRC in Page builder #1843
989
+ * Fixed: Pagebuilder modal max-height removed so it will become full width #1843
990
+ * Added: An option for select target type in Button Module #1822
991
+ * Fixed: Remove AMP category widget if swift is enabled #1790
992
+ * Fixed: Filter added change mode type #1833
993
+ * Added: Rewrite rule for .html blog page #1775
994
+ * Fixed: Filter added change mode type #1833
995
+ * Fixed: Swift Footer Widget Sanitizer Added #1800
996
+ * Fixed: No OneSignal widget when PageBuilder is enabled #1840
997
+ * Fixed: span tag added around the pagination text #1834
998
+ * Added: Page specific option to add script/html and styles in page builder #1831
999
+ * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
1000
+ * Added: Jarida theme compatibility added #1842
1001
+ * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
1002
+ * Fixed: Replace value attribute only from html tags. Otherwise it is removing value from * shortcodes which is breaking the whole page. #1738
1003
+ * Added: Underline option for content links added #1808
1004
+ * Added: Page specific option to add RTL in page builder #1858
1005
+ * Added: Converts AMP ads to normal so ads show when takeover is enabled in Normal Mode #1724
1006
+ * Added: Converts AMP Analytics to normal so Analytics works when takeover is enabled in Normal Mode #1724
1007
+ * Fixed: Phone icon proper alignment in Design3 #1730
1008
+ * Added: ADS for WP activation box in Extensions tab
1009
+ * Added: New design field added #1861
1010
+
1011
+ = 0.9.83.1 (8th March 2018) =
1012
+ * Fixed: Pagebuilder contents not shows on custom home page #1794
1013
+ * Added: Header hook added `ampforwp_advance_header_layout_options`
1014
+ * Fixed: Load admin files only in admin pages #1799
1015
+ * Fixed: Conflict with WP bakery pagebuilder #1783
1016
+ * Fixed: Slide in Menu break in RTL mode #1825
1017
+ * Fixed: Validation issue in loops due to empty attributes #1795
1018
+ * Fixed: Featrued Image connected Properly with Swift theme #1733
1019
+ * Fixed: Changed the disqus.php to disqus.html to pass authentication #1788
1020
+ * Added: CSS styling for Loop on shop page #1803
1021
+ * Fixed: Facebook comments not work in swift #1789
1022
+ * Fixed: Style AMP Category module in Footer swift #1790
1023
+ * Fixed: Load aq_resizer only in AMP #1805
1024
+ * Fixed: Proper markup for Pinterest in Design3 and Swift #1793
1025
+ * Fixed: Proper url for vk
1026
+
1027
+ = 0.9.83 (03rd March 2018) =
1028
+ * Added: Ability to add amp-carousel and amp-selector directly into WYSIWYG Editor #1588
1029
+ * Fixed: Debug error caused by Playbuzz Sanitizer #1674
1030
+ * Added: Show default gravatar for comments #1758
1031
+ * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
1032
+ * Fixed: To avoid debug error in swift
1033
+ * Fixed: Translation improved for some strings #1678
1034
+ * Fixed: Stop AMP takeover for Feed pages #1767
1035
+ * Fixed: Menu issues In Design 1 & Design 2 after changing from AMP-Sidebar #1565
1036
+ * Fixed: AMP Options panel Not Working After Update (0.9.82.1) version #1761
1037
+ * Fixed: Move the label to the top [UX improvement] #1746
1038
+ * Fixed: Error with Vue #1745
1039
+ * Added: Video Module added in AMP Page Builder #1750
1040
+ * Fixed: Sidebar menu is not scrollable swift theme #1769
1041
+ * Fixed: View Non-AMP should be usertrailingslashit #1772
1042
+ * Fixed: Proper structured data for Blogpage #1660
1043
+ * Fixed: Legacy Page Builder not working after the update #1773
1044
+ * Fixed: Content blank when only image in content #1778
1045
+ * Fixed: Comment ID display issue fixed #1758
1046
+ * Fixed: PHP Warning: A non-numeric value encountered in components/logo/logo.php on line 52 #1764
1047
+ * Fixed: Yummly support added in Swift #1708
1048
+ * Fixed: Demo Link updated #1781
1049
+ * Fixed: CSS is not loading in Swift Theme #1780
1050
+ * Added: Ability to add Advertisement or Sponsored label under ads #1710
1051
+ * Fixed: Featured images distortion in related posts #1684
1052
+ * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
1053
+ * Fixed: noarchive instead of nofollow in Archive pages #1693
1054
+ * Fixed: Internal links of tags are showing “/amp” after changing the end point to “?amp” in design 2 #1752
1055
+ * Fixed: line height is added for the logo in Swift design
1056
+ * Added: Class for Custom Frontpage #1787
1057
+ * Fixed: Recent post enable disable for Swift theme #1784
1058
+ * Fixed: Connect Show/Hide AMP option with AMP takeover#1786
1059
+ * Fixed: Added sanitizer to footer Widget #1756
1060
+
1061
+ = 0.9.82.1 (18th February 2018) =
1062
+ * Selector code reverted due to it's effect on carousel
1063
+
1064
+ = 0.9.82 (18th February 2018) =
1065
+ * View more details on https://ampforwp.com/0-9-82-released-stability-update-82nd-update/
1066
+ * Logo Resizing calculation by Pixels and resizing bug solved.
1067
+ * Update Notification in the Admin panel will only appear in the AMP options panel. So it will not annoy you anymore.
1068
+ * Glue underline is applying for some reason
1069
+ * Fatal error after 0.9.81 fixed
1070
+ * Facebook comments loading twice on swift
1071
+ * PHP Notice: Undefined variable: post_author_name
1072
+ * Pagebuilder fix in version 0.9.81 Compatibility with Yoast and other plugins #1749
1073
+ * Home loop modifier option added. Allows you to exclude the categories from the loop or include the Custom Post type in the homepage loop.
1074
+ * amphtml Conflict with Instant Article for Facebook resolved
1075
+ * /amp folder in the theme is applying changes in plugin, which causing a bug, but it’s been fixed
1076
+ * Backward Compatibility for AMP Preview
1077
+ * SEO Section Improvements
1078
+ * Wrong comments count on AMP pages
1079
+ * AMP Allow selector in the The Content. You can add tabs and AMP components directly into the loop.
1080
+ * If we turn off the Homepage Support then Blog is turned off as well, solved.
1081
+ * Post Pagination have two options like “Number of pages” and Previous & Next.
1082
+ * Removed the dot from the one Signal Service worker URL if the subdomain isn’t added (Causes Validation issues.)
1083
+ * Extra Space due to empty divs in Design 3
1084
+ * Remove alt from a tag in the AMP version caused many validation issues.
1085
+
1086
+
1087
+ = 0.9.81 (15th February 2018) =
1088
+ * Edge case fatal error on features.php fixed
1089
+ * Admin dashboard messup CSS fix #1731
1090
+ * Custom CSS Output added in Swift
1091
+
1092
+ = 0.9.80 (15th February 2018) =
1093
+ * View More details on the [blog post](https://ampforwp.com/introducing-swift/)
1094
+ * AMP Page Builder 3.0: The AMP Page Builder is a lightweight and much stable than ever and works flawlessly! [Read More](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
1095
+ * Swift: The New Default Theme, which you can select from the design section of the Page builder.
1096
+ * A way to create a Child Theme for AMP [read more](https://ampforwp.com/tutorials/article/child-theme-amp/)
1097
+ * Make AMP & Non-AMP Same: We have an amazing new option called AMP to WP which will generate the WordPress version of the AMP design which will be viewed on the canonical version of the website.
1098
+ * AMP Takeover: You can deliver a fully AMP compatible website with this option. It will basically take over the non-amp version and deliver an AMP version to your desktop and mobile users, on WordPress & AMP version. That’s why it was called AMP Takeover
1099
+ * Logo Resizing made easy
1100
+ * Typography Options
1101
+ * 3 Headers design in swift theme
1102
+ * Error while sharing the image on Pinterest #1699
1103
+ * Homepage support was not working ( when page support is off ) #1695
1104
+ * Custom Permalinks rewrite issue solved #1689
1105
+ * Custom post type was appearing two types #1688
1106
+ * Theia Post Slider plugin incompatibility with post pagination fixed #1677
1107
+ * Link to the categories in loop of Design 3 #1632
1108
+ * amphtml was not working when plain permalink selected along with static page as homepage #1614
1109
+ * AFS Analytics Integration added #1605
1110
+ * Removed the blank spaces from analytics id field to deliver a good UX. #1599
1111
+ * ?amp endpoint feature added #1561
1112
+ * Ability to remove the excerpt and image from related post #1510
1113
+ * Thumbnails on-the-fly generation added for better control over the design.
1114
+
1115
+
1116
+ = 0.9.74 (23rd January 2018) =
1117
+ * View More details on the [blog post](https://ampforwp.com/0-9-74-released-stability-update-79th-update/)
1118
+ * Fixed: Push Notifications button alligned in center #1500
1119
+ * Added: Meta robots tag support from Yoast #1563
1120
+ * Added: Option to Disable wptexturize/smart-quotes Support #1458
1121
+ * Fixed: Changed the label id to avoid conflict with Advanced AMP Ads #1591
1122
+ * Fixed: esc_attr causing validation issues with single and double quotes #1616
1123
+ * Fixed: Image stretching problem resolved when "Featured Image from the content" was set #1580 #1582
1124
+ * Added: Create Template by Custom taxonomy name like product-jeans.php in AMP Theme FrameWork #1594
1125
+ * Added: Custom Post type support added in the Core #1612
1126
+ * Fixed: custom-amp-content.php cleaned with PHPCS #1497
1127
+ * Added: Basic Product(WooCommerce) support added #992 #1276 for full WooCommerce Support please check this [Extension](https://ampforwp.com/woocommerce/#utm_source=readme-log&utm_medium=0.9.74-readme&utm_campaign=AMP%20Plugin)
1128
+ * Added: Proper fallback support added if the current active AMP theme is not available #1624
1129
+ * Fixed: Resolved debug errors #1622
1130
+ * Added: All in One SEO compatibility #1557
1131
+ * Fixed: Load AMP Styling only on AMP pages #1441
1132
+ * Added: 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber) #1265
1133
+ * Fixed: itemprop="url" was adding in non-amp #1626
1134
+ * Fixed: SiteOrigin Pagebuilder compatibility with Custom Frontpage #1592 #1593
1135
+ * Added: MediaAce lazy load compatibility of Bibmer Theme #1472
1136
+ * Fixed: Content Links plugin was causing validation errors #1569
1137
+ * Added: Filter added called get_content_from_dom to modify the output in AMP function #1462
1138
+ * Added: amp_breadcrumb component added in AMP Theme Framework #1636
1139
+ * Fixed: Sidebar Styling and proper sanitizer updated
1140
+ * Added: amp_author_meta component added in AMP Theme Framework #1641
1141
+ * Fixed: amp_post_pagination component improvement in AMP Theme Framework
1142
+ * Added: Ability to add link classes in amp_post_pagination in AMP Theme Framework
1143
+ * Fixed: amp_author_meta image code improvement in AMP Theme Framework
1144
+
1145
+ = 0.9.73 (15th January 2018) =
1146
+ * View More details on the [blog post](https://ampforwp.com/0-9-73-released-stability-update-78th-update/)
1147
+ * Added: Instagram Sanitizer added to process Instagram Embeds inside the BlockQuotes #1581
1148
+ * Added: Option Created to Enable/Disable rel="nofollow" for View Non-AMP link #1572
1149
+ * Fixed: Custom AMP Content was not working with Elementor Pagbuilder #1495
1150
+ * Fixed: ampforwp_is_front_page() is not working in the newspaper theme #1583
1151
+ * Added: Allow people to use multiple Analytics on AMP #1124
1152
+ * Fixed: 'https' error with PlayBuzz Embeds #1481
1153
+ * Added: Option to show last modified date instead of Published date #1496
1154
+ * Fixed: Add proper permission for ampforwptourinstaller page
1155
+ * Fixed: Debug warnings #1586 and #1459
1156
+ * Fixed: A lot of Security Fixes has been done #1497
1157
+ * Fixed: Removed lot of unused code #1497
1158
+ * Added: AMP skip for checkout page #1443
1159
+ * Added: Show the list of Child pages at the end in Parent Page with on/off #1551
1160
+ * Fixed: Properly strip shortcodes fom Structured data description #1512
1161
+
1162
+ = 0.9.72 (6th January 2018, Happy New Year) =
1163
+ * View More details on https://ampforwp.com/0-9-72-released-stability-update-77th-update
1164
+ * Related Posts Image stretching in Design 3 AMP theme Framework #1482
1165
+ * RTL option must be integrated into AMP theme Framework #1562
1166
+ * `DOMDocument::loadHTML():` Attribute itemprop redefined warning fixed #1539
1167
+ * Created an option to add Author bio article in Facebook Instant Article #1521
1168
+ * Options to add push notification button above and below the content #1571
1169
+ * Copy the Content button for Custom Post types #1532
1170
+ * Alexa Metrics Compatibility added #1536
1171
+ * Logo styling added with amp_logo. So styling can work with AMP Theme Framework. #1520
1172
+ * Content parsing login improved, so it will not through any warnings if the content has only 1 paragraph. #1523
1173
+ * Debug Warnings removed #1564
1174
+ * Caption in the Gallery creating validation errors Fixed. #1549
1175
+ * Tables Link color should be as same as the link of the body #1559
1176
+ * Separate options for In-Content related posts #1546
1177
+ * WebPage Schema Type added in Structured Data options #1558
1178
+ * Fatal Error fixed with `mb_detect_encoding()` after enabling the minify option #1494
1179
+ * Content blank or fatal errors due to itemscope and itemtype, fixed. #1570
1180
+ * Performance improved. Due to `_transient__redux_activation_redirect` transient. #1526
1181
+
1182
+ = 0.9.71 (1st December 2017) =
1183
+ * Design 2 Post Titles issue fixed
1184
+ * Instant Articles validation issue fixed.
1185
+
1186
+ = 0.9.70 (30th November 2017) =
1187
+ * View More details on https://ampforwp.com/0-9-70-released-stability-update-76th-update/
1188
+ * Image alt tags are empty which caused issues. #1154 (thanks to @liagua)
1189
+ * ALT and IMG tags are in one line #1442
1190
+ * Updated the permalink for post view in admin area #1318
1191
+ * aria-current causing validation issues #1427
1192
+ * Aligning Captions in the Bottom in Gallery #1428
1193
+ * Logo’s height & width should dynamically come from the logo. This was a great UX improvement in my opinion. The logo would good regardless of the kind of image you upload. #1429
1194
+ * After 0.9.69.1 update Call to undefined function mb_convert_encoding #1447
1195
+ * Featured image options now also reflect the structured data #1430
1196
+ * Blur & Stretching issues of Design 3 thumbnails are now fixed. They’re crisp and clear than ever! #1227
1197
+ * Related posts are showing on single even when turned off #1434
1198
+ * Show Related posts CSS only when it is selected #1356
1199
+ * Author image now displays on author pages #1426
1200
+ * Category base removal in AMP from url option is only working on the first page #1418
1201
+ * Bug fixed: PHP Warning DOMDocument Empty string supplied as input #1449
1202
+ * Video support added in Instant Articles #1300
1203
+ * Read more tag in Instant articles issue fixed #1415
1204
+ * Amp carousel issues fixed #1446 #1456
1205
+ * Compatibilty with Envira Gallery Lazy Loading #1432
1206
+ * Inline Related Posts in AMP Theme Framework #1457
1207
+ * Different number of in-content related post and related posts at the footer #1448
1208
+ * FooGallery update broke all the AMP compatibility, but we fixed it from our side so that user’s gallery work perfectly #1424
1209
+ * WPBakery Page Builder Conflict solved #1419
1210
+ * Goodlife theme Lazy Load compatibility added #1416
1211
+ * AMP-Facebook-Like Was found but unused Validation Error fixed. #1463
1212
+ * Playbuzz not displaying if added with https: #1466
1213
+ * Options Panel labels renamed for better understanding.
1214
+
1215
+
1216
+ = 0.9.69 (20th November 2017) =
1217
+ * View More details on https://ampforwp.com/0-9-69-released-stability-update-75th-update/
1218
+ * One Signal Push Notifications bug fixed! #1404
1219
+ * AMP theme framework Related posts extended so that it can be used as a loop format #1406
1220
+ * Facebook like Button improvements #1405
1221
+ * Add layout responsive tag to image module in page builder #1373
1222
+ * Strip the shortcodes from Structure data area #1389
1223
+ * Test HTTP API Call From admin panel by redux #1391
1224
+ * Meta description tag in normal site Unicode character is different from AMP site unicode character. #1369
1225
+ * Updated the check for ampforwp_is_amp_endpoint this should fix the issue #1372
1226
+ * Updated the URL for design 3 so it can work with plain permalink #1318
1227
+ * Updated the option Featured Image from The Content #1367
1228
+ * If “Featured Image From The Content is enabled and Duplicate Featured Image” is disable it will remove all the duplicate images from the content. #1375
1229
+ * Date Format under Homepage improvements #1408
1230
+ * Warnings due to inline related posts in Homepage #1413
1231
+ * Plain Permalinks Support improved. #1318
1232
+ * Allow Homepage title of Bread Crumbs feature to be changed from Translation Panel #1414
1233
+ * Debug Errors in AMP Theme Framework #1403
1234
+ * Unnecessary loading of Merriweather fixed, it will only load in the Design 1.
1235
+ * Enter Phone Number is not Appearing when switch to Call now button #1425
1236
+ * Need excerpt below the title, above the meta #1399
1237
+ * Remove the Separator piple symbol from the footer when “Back to Top link” is off #1417
1238
+ * Display Child or subcategories on Category pages. #1385
1239
+ * Add Caption in the Gallery Image feature conflicting with Gallery widget #1407
1240
+ * Youtube Shortcode embed with &rel=0 support #1378
1241
+ * Filter for Excerpt custom text in the AMP options #1411
1242
+ * WPML Multilingual CMS plugin flags compatibility #1270
1243
+ * Compatibility with Tasty Recipes plugin and other page builders with amp page builder #1431
1244
+
1245
+
1246
+ = 0.9.68 (12th November 2017) =
1247
+ * View More details on https://ampforwp.com/0-9-68-released-stability-update-74th-update/
1248
+ * ADs are Optimize For Viewability, meaning it will try to load faster than the original AMP AD loading strategy.
1249
+ * Content was disappearing issue was resolved #1392
1250
+ * Featured Image from The Content option is connected to related post #1339
1251
+ * Fix amp-web-push helper iframe configuration URL #1387
1252
+ * Facebook Like button added to AMP #1327
1253
+ * WPML support for AMP Improvement #1285
1254
+ * Debug Errors fixed #1366
1255
+ * Setting ad density for Facebook Instant Articles ads #1287
1256
+ * Showing the number of comments in Single #1341
1257
+ * Styling added to the sitewide ads and made sure that they are in the center. #1343
1258
+ * One Signal buttons Translation added #1383
1259
+ * Article type added to Structured data #1344 #1354
1260
+ * The issue with the amp-carousel when RTL was enabled #1358
1261
+ * amp-carousel with images of different sizes #1358
1262
+ * a bug where Img is getting converted to amp-img if there's no height or width. which causing validation issue and image is not visible fixed.
1263
+ * Instant Article should have a default value for number of posts, it was causing the memory issue with alot of posts #1390
1264
+ * Notice if a post has no author data #1338
1265
+ * Added a new redux extension select field in redux framework #1349
1266
+ * Issues with galleries as well as gallery captions #1363
1267
+ * Added a hook for adding anything in between the loops #1396
1268
+ * Hide meta boxes as per the user level types #1340
1269
+ * A Switch between the Date formats #1384
1270
+ * Fix: Jannah theme lazy load issue #1362
1271
+ * Issues with galleries as well as gallery captions #1363
1272
+ * Create Dynamic url of amp according to the permalink structure #1318
1273
+ * Minor code performance improvement.
1274
+ * Archive titles in Design 3 frontend issue
1275
+
1276
+ = 0.9.67.0 (6th November 2017) =
1277
+ * View more details on https://ampforwp.com/one-signal-push-notifications-for-amp/
1278
+ * OneSignal Push Notifications integrated #807
1279
+ * Vimeo embed support added
1280
+ * SoundCloud embed support added
1281
+ * Pinterest embed support added
1282
+ * PlayBuzz embed support added
1283
+ * DailyMotion embed support added
1284
+ * Fix: Handle issues with data uri images in CSS #1033
1285
+ * Fix attribute when adding AMP Mustache lib #1033
1286
+ * Fix: Output CSS for feature image #1033
1287
+ * An option added for users who don't want to receive update notifications #1342
1288
+ * Structured data nav improvement
1289
+ * Sitenavigationelement has been implemented correctly for footer menu. #1345
1290
+ * Style sanitization for Menu Items #1359
1291
+ * Polylang flags support for menu  #1360
1292
+ * Mobile Redirection issues fixed #1173
1293
+ * Jetpack fatal error fixed #1355
1294
+ * AMP Page Builder requires a button to be clicked, so the scripts are not running on the runtime making it easy on the edit screen page and avoid the possible script conflict.
1295
+ * Needs proper CTA Bar's styling. #1361
1296
+ * Debug errors on archive pages #1353
1297
+ * Preview shall only be loaded on click rather than in background #1331
1298
+ * ampforwp_is_home() function code improved
1299
+ * making sure scripts and styling is properly adding when sanitizing the sidebar #868
1300
+ * All the backend css and js should be versioned, so it's not cached. #1335
1301
+
1302
+ = 0.9.66.1 (30th October 2017) =
1303
+ * Fatal error if has version less than WP 4.8 fixed
1304
+ * More Minor Validation errors fixed
1305
+ * Odnoklassniki sharing button is not working #1337
1306
+
1307
+ = 0.9.66.0 (29th October 2017) =
1308
+ * View more details on https://ampforwp.com/0-9-66-released-bug-squashing-oct-2017-72nd-update/
1309
+ * Design 3 & Design 1 are optimised with 90+ Google PageSpeed Score on Mobile and 95+ in desktop performance #1273
1310
+ * Featured Image from the content for blog and homepage #1295
1311
+ * Category Module for AMP Page builder added #888
1312
+ * Don't load unused CSS selectors. All the CSS is conditionally loading, to decrease the number of CSS loaded per page and increased in performance #1292
1313
+ * Twitter Video embed code support added in AMP #1307
1314
+ * Video Posting Structured data #1293
1315
+ * Navigation menus are now Schema compatible for better Structured data integration #1229
1316
+ * Yoast checking conditions for Structured Data Improved #1293
1317
+ * Added "back to Top" in design 3 #959
1318
+ * Proper blog check and author for custom frontpage #1260 (Made some changes to check the blog properly and also added the author details for Custom Frontpage)
1319
+ * AMP not working on password-protected pages #1192
1320
+ * Debug errors reported by the user #1284 and few more we found internally
1321
+ * Inline Style Sanitizer for Comments to avoid any validation issues #1193
1322
+ * Next/Previous links removed from pages #1268 props @Frenchomatic
1323
+ * WPML Multilingual CMS plugin flags compatibility added #1270
1324
+ * Image sanitizer added for the Sidebar #1270
1325
+ * Added AMP Components the correct way. Added amp-gist, amp-social-share. #336
1326
+ * amp-video script added - Which decreases the non-critical validation issues #991
1327
+ * Arrows in Design 3 pagination #1000
1328
+ * Author page links in Single #1282
1329
+ * Added previous open state of option panel and show again when search clean #1238
1330
+ * Odnoklassniki Social Sharing Support for AMP (with target blank for better bounce rate) #1230
1331
+ * GIF or animated images resize problem fixed #1281
1332
+ * In Design1, Header Background & Link Color have same option #1249
1333
+ * FB Pixel for AMP added #1231
1334
+ * Structured Data Type option for AMPed Custom Post types only #1259
1335
+ * Attribute ‘readability in the tag ‘div’ removed - this decreases the validation issues #1306
1336
+ * AMP Theme Framework Improvements: loop, author, related_post, Add Author support #1311
1337
+ * Commentator's Avatar in the comments section #1132
1338
+ * Remove 'Welcome to AMP' from Dashboard sub-menu and moved to the options area to decrease the annoyance and increase the user happiness #902
1339
+ * Option to Sort the Random Order of Related Posts to increase the audience engagement (Default is 'ID', on enabling the option it will change to 'rand') #1250
1340
+ *  View AMP on Admin Bar for the respected page/post If enable. #1236
1341
+ * google maps iframe link to larger map #1099
1342
+ * Comments now jumping due to the slash at the end #1309
1343
+ * Page Builder causes Incompatibility with the Divi theme (We restructured the Text Module for Page builder for better compatibility and UX) #1162
1344
+ * Inline Style Sanitizer for Comments added. Less Critical Validation issues and Better Presentation #1193
1345
+ * WPML amp-html error fixed #1285
1346
+ * Radio button not working for Show View more Button" #1018
1347
+ * Added registered handle for tinymcePointer localize data #1301
1348
+ * Date in the Design 2 should not be hidden in mobile version #1315
1349
+ * Page builder not working on homepage(Selected as front page) #1316
1350
+ * Instant articles number of posts option #1271 (Removed some unused code as well, it will rendered all posts if none is enter in the options)
1351
+ * Auto flush on save for FBIA to improve the UX.
1352
+ * Plain Permalinks Support improved. #1318
1353
+ * Tables support added to FB Instant Articles #1266
1354
+ * Demo link added in the Theme selector option #1248
1355
+ * Remove invalid attributes from multiple tags which reduces critical validation errors and validates pages.
1356
+ * AMP makes a problem in archive page label, when it is active in non-amp version #1304
1357
+ * placeholder-icon.png is 404 fixed #1310
1358
+ * Category & Tags switches for Single added. #1055
1359
+ * Copy Content (Custom AMP Editor) Option Not showing with Page Builder of SiteOrigin issue fixed #1280
1360
+ * Improving UX with: when AMP support is off for a specific post type then all the AMP related metaboxes should be removed #1289
1361
+ * Options Panel Options rearranged, labels rewritten, descriptions repositioned for better User interaction [commit]
1362
+
1363
+ = 0.9.65.2 (25th October 2017) =
1364
+ * TypeWatch is not a function #1299
1365
+ * Error with BackupBuddy fixed #1303
1366
+
1367
+ = 0.9.65.1 (24th October 2017) =
1368
+ * AMP Minifcation Issues fixed
1369
+
1370
+ = 0.9.65 (22nd October 2017) =
1371
+ * View more details on https://ampforwp.com/new/
1372
+ * Favicon for AMP #1039
1373
+ * AMP Minification option added with Performance Tab in Options #1286
1374
+ * Post support is turned off then Meta box should also be removed #1253
1375
+ * Excerpt Length feature in Design two and Three #1122
1376
+ * Test Contact form plugins and their settings in the options panel #1121
1377
+ * Mobile preview in Edit Screen #1082
1378
+ * Search feature for Options Panel #1238
1379
+ * WordPress Social Share Buttons Validation Issues #1272
1380
+ * itemtype attribute is striping in the ul tag #1210
1381
+ * Debug Error in Breadcrumb 0.9.64 #1267
1382
+ * Disable AMP linking at Wordpress Search Page #969
1383
+ * Featured Image is missing #1071
1384
+ * Removed ampforwp_plugin_activation_notice #1034
1385
+ * Add VK (Vkontakte) Sharing Button #1187
1386
+ * Grab the first image instead of post thumbnail for featured image #1189
1387
+ * AMP theme framework core changes #1274
1388
+ * Grab the first image instead of post thumbnail for featured image #1189
1389
+ * Create a Switch on Top of Page Builder #1279
1390
+ * Inline Related Posts added that helps you with improving bounce rate #1078
1391
+ * Caption Support in Image Gallery Carousel #1172 #1136
1392
+ * Instant Articles feed shows sticky posts on top #945
1393
+ * Added search check, to fix debug notice
1394
+ * Option to hide date from Design 1 & Design 3 Homepage Loop #1264
1395
+ * UI labels improvements in the Options panel
1396
+ * Sorting out design #2 static front page #1175
1397
+
1398
+ = 0.9.64 (15th October 2017) =
1399
+ * View more details on https://ampforwp.com/new/
1400
+ * Structured Data Type option added. You can now change the structured data format for Posts, Pages and Custom post types #323
1401
+ * When comments plugin activate, Comments section should remove. #1093
1402
+ * Notification causes a validation error. #1147
1403
+ * CSS !important need sanitization #1225 - This will help us to validate tens of thousands of pages.
1404
+ * Strange spaces when using Sassy Social Share #1185
1405
+ * Remote CDN use? Let's host it? #549
1406
+ * Typo fix for Linkedin Profile Page URL section #905 [Thanks to Prayag @pra85]
1407
+ * Replace fastimage with fasterimage for PHP 5.4+ #1191
1408
+ * Debug Errors Post 0.9.63 #1219
1409
+ * Ad5 code injected twice #1116
1410
+ * Homepage Support must be Off when we turn Off Homepage Support. #738
1411
+ * Add custom class in post pagination for styling #1100
1412
+ * Removed the Lazy Loading issue of Schema Theme #1170
1413
+ * H1 tag for archive titles (Commit) #1155
1414
+ * Alt tag for the Logo #1155
1415
+ * Design 3 Menu RTL issue fixed #1106
1416
+ * Ability to add dynamic classes in body tag #1237
1417
+ * Warnings fixed on 404 page #1243
1418
+ * Properly structured data for Homepage, Custom Frontpage and Blog #1155 #1242
1419
+ * Option added to Enable/Disable categories and Tags links from Single #1155
1420
+ * Fatal error after 0.9.63 fixed #1220
1421
+ * Debug Error due to vendor AMP #1213
1422
+ * PHP warning on line 147 after 0.9.63 #1241
1423
+
1424
+ = 0.9.63 (8th October 2017) =
1425
+ * View more details on https://ampforwp.com/new/
1426
+ * Category and Tag Base Remover as core features #1079
1427
+ * Hide AMP on Posts option added #935
1428
+ * Installation Setup Screen Added for new users
1429
+ * Validation for the session in PHP #1158. PR by Bryan Contreras @bryan3561
1430
+ * All the amp pages should work perfect with Plain Permalink settings #488
1431
+ * WYSIWYG TinyMCE editor added for the Text Module in AMP Page Builder #1205
1432
+ * WPML Static Front Page Support for title and description with Yoast. #1143
1433
+ * Row Settings area added for AMP Page Builder #1148
1434
+ * xlink attribute causes Validation Issues #1149
1435
+ * Posts with no images on Archive pages are squeezed to 65% #1058
1436
+ * Body Class to target specific pages #1123
1437
+ * Option to enable/disable Breadcrumb #1129
1438
+ * Debug errors due to Breadcrumbs fixed #1109 #1130 #966
1439
+ * Visit AMP option added below the View Site in Dashboard. #1076
1440
+ * Many Debug errors fixed #1109
1441
+ * Textarea for body tag which will help people add AMP Auto Ads #1064
1442
+ * Structured data improvements #1048 #1044 #1085 #1118
1443
+ * Twitter share URL based on users choice, you can allow people to share pretty links and short links. #1097
1444
+ * Author Avatar removed code fixed which has been displayed in the div "amp-wp-meta amp-wp-byline". #1087
1445
+ * Only one figure element is allowed in the article header FB Instant Articles #1127 & #1157
1446
+ * Image alt tags are empty and cause issues fixed. #1154
1447
+ * Button to copy the content into Custom AMP Editor #783
1448
+ * Rename AMP loop widget areas or add proper descriptions #1045
1449
+ * Trailing slash issue #1095
1450
+ * Related Posts by Post type featured added #1141
1451
+ * Ultimate Social Media Icons plugin causes validation issues fixed #1135
1452
+ * Adding proper path for functions.php, it was causing strange fatal errors and irregular white screen of death fixed  #1144
1453
+ * A smooth way to migrate from other AMP plugins to AMPforWP #1051
1454
+ * Alert added on AMP by Automattic installation. #1180
1455
+ * Insertion of strange spaces around H1 titles #1069
1456
+ * AMP Page Builder and HTTPS #1164
1457
+ * You can display comments from more than one vendor such as displaying WP & FB Comments #1150
1458
+ * Rename AMP loop widget areas or add proper descriptions #1045
1459
+ * FrontPage featured image with srcset #1063
1460
+ * An option for Showing featured image from custom field #1098
1461
+ * Added the Custom Front Page Title From Yoast SEO #1163
1462
+ * Commenting breaks SSI directives causes to display error #1179
1463
+ * rel canonical appears more than once in search pages #1195
1464
+ * Dev mode in AMP #1083
1465
+ * Social Sticky Icons Improvements #1061
1466
+ * Grand-Child support added in Design #1152
1467
+ * amp-accordion non-critical error in Design 3 & CSS improvements fixed #1152
1468
+ * Incorrect @id for mainentity #1080
1469
+ * Hide AMP by specific Categories tweaked for performance. Thanks to Joshua Eichorn @jeichorn CTO at Page.ly #1133 - Huge Thanks!
1470
+ * amp-auto-ads for sites with RTL support ON #1176
1471
+ * Redirected the Google forms to our contact page so that we can take each and every query and answer every person. #1201
1472
+ * ui-state-highlight class was conflicting with ACF date picker fixed #1199
1473
+ * Responsify WP Lazy loading causes blank image (Compatibility) #1131
1474
+ * amp-carousel scripts loading on the second page fixed in Design 3
1475
+ * Show Design screenshot while selection of design #1209
1476
+ * Switches Redesigned for better UX #1211
1477
+ * Welcome Page UX Improved #1214
1478
+
1479
+ = 0.9.62 (25th September 2017) =
1480
+ * View more details on https://ampforwp.com/new/
1481
+ * INTRODUCING Page Builder 2.0 for AMP! [Learn More & Watch the Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
1482
+ * Documentation & Help links improved
1483
+ * Post type specific classes for targetting
1484
+ * Design name restored in Options panel (It was recently renamed to Appearance)
1485
+ * Minor Bug fixes as well
1486
+
1487
+ = 0.9.61 (10th September 2017) =
1488
+ * View more details on https://ampforwp.com/options-restructured/
1489
+ * Options Panel Restructured Options were dividing into two parts: Settings and Appearance.
1490
+ * AMP Theme Framework Core Support Added. You can now create themes of your own in just minutes.
1491
+ * WPML Static Front Page Support #1111
1492
+ * Notification message disables when CF7 & gravity form is activated. #1107
1493
+ * Space after On in Design 3 #1114
1494
+
1495
+ = 0.9.60 (4th September 2017) =
1496
+ * View more details on https://ampforwp.com/0-9-60-released-improved-redirection-66th-update/
1497
+ * Class added to View non-amp anchor tag
1498
+ * Params added properly to get rid of a warning #1077
1499
+ * rel=attachment noopener generating validation errors #1090
1500
+ * Breadcrumbs Support Added #701
1501
+ * Enable / Disable button added for Navigation Menu #735
1502
+ * Move the ad code for Instant Article down after the article #964
1503
+ * Add analytics code of FB instant articles properly #1096
1504
+ * datetime Tag not stripping properly #1043
1505
+ * Mobile redirection on custom post types #1028 #1052
1506
+ * Mobile Redirection causing extra redirect #879 #933
1507
+ * Proper mobile redirection on Homepage #1052
1508
+ * View non-amp on blog will redirect to blog
1509
+ * Blog will redirect to blog irrespective of AMP Homepage option #871
1510
+ * Dont redirect if archive support is disabled #1052
1511
+ * non-amp category pages should redirect to non-amp pages if turned off from Hide AMP #999
1512
+ * Disable amp for forum plugin (wpforo) #592
1513
+
1514
+ = 0.9.59 (23th August 2017) =
1515
+ * Design 3 Images were not aligned properly. Fixed. #1040
1516
+ * Caption in the design 3 improved
1517
+ * Jetpack File not loading throwing fatal error #1038
1518
+ * If the mobile redirection is ON and the category is excluded to display the AMP then it should redirect properly
1519
+ * Custom Editor Compatibility issue with SiteOrigin PageBuilder fixed #997
1520
+ * Native Twitter Embed support
1521
+ * Added a hook after the body tag: ampforwp_body_beginning (commit)
1522
+ * GTM in AMP Improved #958
1523
+ * WP User Avatar compatibility Added #975
1524
+ * Alt tag on frontpage featured image added #1050
1525
+ * Blurred Images on the frontpage fixed #1050
1526
+ * Need to escape alt tag #1049
1527
+ * Debug errors & PHP warnings were fixed #859 #811 #830 #810
1528
+ * Proper rel canonicals for inner pages #1047
1529
+ * Added Video sanitizer for comments #1053
1530
+ * When activating the AMP plugin, display a notification in the popup. #1036
1531
+ * Video Sanitizer added for Comments
1532
+
1533
+ = 0.9.58.1 (9th August 2017) =
1534
+ * Jetpack conflict issue solved #1038
1535
+ * Genesis SEO Support added #1013
1536
+ * Fixed Wrong SEO title issue #1013 and #836
1537
+ * Design 3 Carousel script loading method improved #990
1538
+
1539
+ = 0.9.58 (9th August 2017) =
1540
+ * View more details on https://ampforwp.com/new/
1541
+ * Genesis SEO for AMP support added
1542
+ * AMP 0.4.2 Vendor Bundled for making it crash proof
1543
+ * Archive desc only on 1st page #1029
1544
+ * Ads are not working after 0.9.6 #1030
1545
+ * Fixed the Post 0.9.57 Update Bugs #1025
1546
+ * All Images are aligned on left side in design 3 #1031
1547
+ * Custom frontpage title issue in Design 3 fixed
1548
+
1549
+ = 0.9.57 (5th August 2017) =
1550
+ * See the Full changelog https://ampforwp.com/0-9-57-released-compatibility-issue-fixed-62nd-update/
1551
+
1552
+ = 0.9.56 (31st July 2017) =
1553
+ * View more details on https://ampforwp.com/page-break-in-amp/
1554
+ * Page Break / NextPage (Pagination) Support Added #834 #857 (Improvement)
1555
+ * Show/Hide AMP for Categories of Posts or All posts #872 (Improvement)
1556
+ * Adding analytics capabilities to Instant Articles #978
1557
+ * JetPack Plugin Conflict Solved #971
1558
+ * Social sharing code improved. amp-social-share js is getting added for line and WhatsApp social share #981
1559
+ * Code improvement for rel canonicals(home and archive)
1560
+ * Perfect SEO URL + Yoast SEO Compatibility #982
1561
+ * Some styling for tags to show up properly
1562
+ * Undefined index notices #960
1563
+ * Non-amp category pages should redirect to non-amp pages if turned off from Hiding AMP #999
1564
+ * Page builder text and button module issues #972
1565
+ * Documentation links updated in the Options panel
1566
+
1567
+ = 0.9.55 (13th July 2017) =
1568
+ * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
1569
+ * Disqus Comments show up even when disabled per post #931
1570
+ * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
1571
+ * H3 inside OL in Related-Posts.php #930
1572
+ * Advertisement Options in Instant Articles #943
1573
+ * Incompatible with bootstrap plugin #525
1574
+ * Error in tag and category links #934
1575
+ * Pagebuilder Button module link had issues #951
1576
+ * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
1577
+ * WPtouch Pro Compatibility Issues #927
1578
+ * Better scripts compatibility in Single of post types #757
1579
+ * Instant Articles Error: "The HTML element does not contain any text" #949
1580
+ * added a filter in all the dates so a user can change the date format and modify #962
1581
+ * Design3 Menu Arrows are clickable along with the links #952
1582
+
1583
+
1584
+ = 0.9.54.2 (4th July 2017) =
1585
+ * Minor bug post 0.9.54 bug fixed
1586
+
1587
+ = 0.9.54 (4th July 2017) =
1588
+ * View more details on https://ampforwp.com/new/
1589
+ * Facebook Instant Articles Support #862
1590
+ * Exclude Some Pages from Mobile Redirection #914
1591
+ * After 0.9.53 update amp-social-share js missing (critical issue) #924
1592
+ * Hooks added in Header (above and below)
1593
+ * View non AMP[Code improvement] #928
1594
+ * Pages are not supposed to show meta like this, especially Categories #894
1595
+ * Monarch plugin having design issues #925
1596
+ * Show AMP Hide AMP Check Box Fixes #794
1597
+
1598
+ = 0.9.53 (19th June 2017) =
1599
+ * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
1600
+ * Compatibility Issue with Rocket Lazy Load plugin #907
1601
+ * Link color issue with UX of Color Pickers in Design 3 #731
1602
+ * amp-analytics js appears more than once when Google tag manager is used #885
1603
+ * SEO by SQUIRRLY is adding analytics twice #678
1604
+ * Fatal error when WPSEO is activated #900
1605
+ * Design 3 Sticky header should have an option #625
1606
+ * Search form was enhanced, it can now be used on the websites without https certificate. That will certainly fix a lot of validation issues. #912
1607
+ * Yandex Metrika support in AMP #585
1608
+ * Histats Analytics Support #880
1609
+ * Chartbeat Analytics Support #882
1610
+ * Do not strip Rel from anchor tags #790
1611
+ * Design close Resulting Blank Screen in AMP Site #642
1612
+ * Logo size is not applying #817
1613
+ * AMP Publisher logo guidelines #162
1614
+ * Remove amp-social-share extension .js from Custom Frontpage #899
1615
+ * Add compatibility with Sassy Social Share #679
1616
+ * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
1617
+
1618
+ = 0.9.51.1 (12th June 2017) =
1619
+ * Redirection issue after 0.9.51 Update.
1620
+ * Improved compatibility with plugins.
1621
+
1622
+ = 0.9.51 (8th June 2017) =
1623
+ * View more details on https://ampforwp.com/page-builder-released-in-amp/
1624
+ * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
1625
+ * Comments are not showing properly when words are long #861
1626
+ * Remove amp-social-share extension .js from Pages #853
1627
+ * The tag ‘amp-sidebar extension .js script’ appears more than once in the document #828
1628
+ * Remove Advertisement tab #839
1629
+ * Compatibility with Slide-in Plugin by WPMU dev #866
1630
+ * Mobile redirection issue with bbpress #867
1631
+ * All the data must be properly sanitize in the sidebar #849
1632
+ * AMP html should not be added on the second page of comments
1633
+ * Author page’s support #456
1634
+ * URLs in comments should be clickable(links) #869
1635
+ * Featured image should be centered in desktop mode #870
1636
+ * Added More Hooks #721 (Documentation on this coming soon!)
1637
+ * Page 2 goes to the wrong URL #865
1638
+ * Proper Title and meta for homepage and posts #850
1639
+ * Gist Support added #608 – Just add a shortcode and enjoy Devs (Ex: amp-gist id="b9bb35bc68df68259af94430f012425f )
1640
+ * /blog/amp pagination not working #875
1641
+ * separate the Text and Date format in design 2 #876
1642
+ * Comments show in AMP w/o breaks between paragraphs #873
1643
+ * If no featured image below hooks are not working #877
1644
+ * Change meta name Viewport and its value #878
1645
+ * Bolt icon in option #474
1646
+ * Code restructuring and code quality improvements.
1647
+ * Create a seperate function for comment code in frontpage.php #682
1648
+ * Remove all the duplicate code from frontpage.php of all the designs and use hooks to add the code instead of static code #889
1649
+ * Few Debug errors removed.
1650
+
1651
+ = 0.9.50 (24 May 2017) =
1652
+ * View more details on https://ampforwp.com/facebook-comments-in-amp/
1653
+ * Design 3 Social Icons issue #832
1654
+ * View non AMP leads to /?nonamp=1 #814
1655
+ * Youtube shortcode compatibility improved #557
1656
+ * welcome.php should be shown only if user is “administrator” #696
1657
+ * Facebook comments support added in AMP #825
1658
+ * WP Like Button Compatibility #841
1659
+ * Custom Taxonomy Support added with Custom Post Type Extension.
1660
+ * Front page comments not found as expected #837
1661
+ * Fixed xml:lang tag issue #848
1662
+ * Sanitize Iframe in the archive description Fixed #845
1663
+ * Compatibility with Newspaper Theme by TagDiv #842 and #796
1664
+ * Some debug problems (blog page, style.php) #838
1665
+ * Featured Image hooks added
1666
+ * Twitter is misspelled #854
1667
+ * The core concept of the AMP Content builder has been built.
1668
+
1669
+
1670
+ = 0.9.49 (12 May 2017) =
1671
+ * View more details on https://ampforwp.com/0-9-49-released-small-important-bugs-fixed-56th-update/
1672
+ * Option added to display the excerpt in Single #806
1673
+ * Ability to add new invalid tags to filter out from AMP pages #809
1674
+ * In frontpage, comment button is pointing to wrong URL #812
1675
+ * Call now button and search is overlapping in Design-1 #784
1676
+ * Sticky Social Icons should be off if the CTA notification bar is on #788
1677
+ * Author bio in Design 1 and 2 #732
1678
+ * Styling in Taxonomy description causing validation issues #798
1679
+ * Twitter share(handle, url positions fixed) #815
1680
+ * Tables responsiveness in ALL Designs #726
1681
+ * Output all the categories and tags with their own ID’s in the div classes #750
1682
+ * Social Share Icons Overlap with Leave A Comment in Design 3 #716
1683
+ * Effective Measure Support on AMP #297
1684
+ * Custom AMP editor on pages should only be shown when page support is ON #756
1685
+ * AMP on website.com/blog without need of separate installation #775
1686
+ * GTranslate Compatible #819
1687
+ * Images and amp-anim styling added #725
1688
+ * Filter to make the title in a post to a link #727
1689
+ * Author Bio and Social Share button must not come in Pages #770
1690
+ * StatCounter is now compatible with AMP #361
1691
+ * Line Social media support #500
1692
+ * Footer menus for Design 1 & Design 2 #623
1693
+ * Strip out src=”about:blank” When Gravity Forms used #804
1694
+ * Add Compatibility with Crazy Lazy load plugin #751
1695
+ * Meta Titles and Description issues fixed with Yoast, All in one SEO and The SEO Framework #813
1696
+ * Double quotes in the Excerpt of the meta description is making AMP Invalidated #818
1697
+ * Missing featured image on static front page #824
1698
+ * Fatal error while activation: see the video 0.9.49 Beta #827
1699
+ * Review this code in archive.php in all 3 designs. #826
1700
+
1701
+
1702
+ = 0.9.48 (28 April 2017) =
1703
+ * View more details on: https://ampforwp.com/0-9-48-released-step-towards-multilingual-support-55th-update/
1704
+ * The default translation method of WordPress added. (Option in Translation panel to switch between * Translation panel and POT file #540)
1705
+ * A new Advertisement slot added above the related posts in the Single. It not only gives better options for people to display ads but this ad slot is also very handy if you are using ad companies like Taboola and RevContent.
1706
+ * Another Advertisement slot added below the post title in the Single post.
1707
+ * Fatal error: require_once report-bugs.php #747 fixed
1708
+ * Add / for codes in Meta Description #766 fixed
1709
+ * Controls re-adjusted & Renamed title of yoast description control in Options panel
1710
+ * Design-3 Slider URL redirecting to non-AMP page #758
1711
+ * Added new sanitizer For HTML to AMP-HTML conversion
1712
+ * Sanitized Archive descriptions so that it would convert to AMP
1713
+ * Comments sanitized with new sanitizer so that HTML tags automatically become AMP compatible.
1714
+ * 301 redirects on non-pretty internal links #767
1715
+ * Create a filter to modify the value of rel="amphtml" #778
1716
+ * Max-width added for images in comments
1717
+ * If in WooCommerce ?amp endpoint set then update href.
1718
+ * Undefined Variable (Debug) #733 and many other debug issues were fixed
1719
+ * Show last updated Post instead of published date #575
1720
+ * WooCommerce Widget added to display latest products on homepage. #763
1721
+ * add amp_post_template_above_footer hook global in all the designs #779
1722
+ * Excerpt on top of the content in Single #665
1723
+ * Subscribe box has been improved for the UX needs #712
1724
+ * Notice warnings since 0.4.2 update #740
1725
+ * AMP Comments Form Integration with the extension
1726
+ * Filter added on the loop in Homepage of the Design 3 so that it can be modified with an external plugin.
1727
+ * 404 on paged home page #781
1728
+ * Twitter handle should be at the end of the tweet not in the beginning #787
1729
+ * Wrong Rel Canonical for AMP Custom Frontpage #799
1730
+ * Merged a pull request #761 that will improve the title and description output that is much more stable and flexible for future enhancement and use. It was contributed by Sybre Waaijer - Thanks mate for the contribution, we (our team and users) really appreciate your hard work done on this code.
1731
+ * Extension page user experienced improved.
1732
+ * Removed old Youtube installation video and replaced with new one.
1733
+
1734
+ = 0.9.47.2 (12 April 2017) =
1735
+ * Design-3 Slider URL redirecting to non-AMP page #758
1736
+ * Ads showing in comments #768
1737
+
1738
+ = 0.9.47.1 (11 April 2017) =
1739
+ * Meta description option improved in SEO section #766
1740
+ * Fatal error: require_once report-bugs.php #747
1741
+
1742
+ = 0.9.47 (10 April 2017) =
1743
+ * View more details at https://ampforwp.com/0-9-47-released-54th-update/
1744
+ * Meta saving method updated for customAMP content editor checkbox was causing some conflict.
1745
+ * Wrong Yoast title and structured data in Custom Frontpage fixed
1746
+ * CSS minification all 3 designs
1747
+ * Polylang flags in menu was causing validation issue, is now resolved
1748
+ * WPML flags in menu was causing validation issue, is now resolved
1749
+ * Standardized function created for content sanitization.
1750
+ * Archive description now displays AMP compatible markup
1751
+ * Comments markup sanitized for AMP
1752
+ * Design 3 images not aligned properly, fixed
1753
+ * Images are aligned to center in Design 1.
1754
+ * carousel ending with //amp instead of /amp – fixed #753
1755
+ * Title of the Post along with Post link when shared in twitter #683
1756
+ * Ads were cutting in half in RTL, fixed
1757
+ * Add / at the end of AMP links with in the AMP pages (Internal links) #668
1758
+ * Rendering the wrong URLs in front page if paged #742
1759
+ * Option to turn off AMP on all pages, so people can turn on only for specific pages #746
1760
+ * Need Meta Description on amp pages #741
1761
+ * Woocommerce Loop shortcode updated
1762
+ * Call Now Button added in header #563
1763
+ * Post images are not centered in Design 3 #695
1764
+ * UX of GTM settings done, since users were getting confused #700
1765
+ * Front page amphtml fixed for paginated pages
1766
+
1767
+ = 0.9.45.6 (31 March 2017) =
1768
+ * Installation Process from welcome page was not working after WP Plugin DIR API change was fixed.
1769
+ * WP Rocket Minifcation and Concatenation was not working, its fixed now.
1770
+ * WP Rocket was tested properly to make sure everything is working fine.
1771
+
1772
+ = 0.9.45.5 (25 March 2017) =
1773
+ * WP rocket conflict solved
1774
+ * Cannot set property ‘innerHTML’ of null issue fixed
1775
+
1776
+ = 0.9.45.3 (21 March 2017) =
1777
+ * Post 0.9.45 bugs fixed and released as an urgent update.
1778
+
1779
+ = 0.9.45.1 (19 March 2017) =
1780
+ * Post 0.9.45 bugs fixed and released as an urgent update.
1781
+
1782
+ = 0.9.45 (18 March 2017) =
1783
+ * View more details at https://ampforwp.com/0-9-45-released-compatibility-rtl-53rd-update/
1784
+ * W3Total cache compatibility added
1785
+ * RTL Support added for Right-to-Left language websites.
1786
+ * Comments Pagination feature added
1787
+ * WP-Rocket Compatibility added
1788
+ * WPML Compatibility added
1789
+ * Quantcast analytics support added
1790
+ * ComScore support added
1791
+ * Custom Yoast title support added #685
1792
+ * WooCommerce Shortcode: Allows you to display WooCommerce Products. [amp-woocommerce num=6] will display the 6 products from WooCommerce. [amp-woocommerce num=6 link=noamp] will display 6 products but they will go to non-amp website, if you want to link to AMP version of the page then use [amp-woocommerce num=6 link=amp]
1793
+ * Admin area UX improvements
1794
+ * Adding notifications script in the correct way
1795
+ * Comments now display on frontpage as well.
1796
+ * Re-positioned non-amp Header link control to the right section.
1797
+ * ?nonamp=1 only displays when the Mobile redirection is on
1798
+ * Properly adding iFrame js.
1799
+ * Custom Post type incompatibility fixed
1800
+ * Widgets added to the Custom Frontpage.
1801
+ * Stripping shortcodes from excerpts.
1802
+ * Custom content on static frontpage had over riding issue #687
1803
+ * Option added for controlling number of comments
1804
+ * Welcome page should be shown only if user is “administrator” #696
1805
+ * Digg Digg social share compatibility #694
1806
+ * Removed unnecessary lines from Design 3
1807
+ * Sanitized Archive Description to amp Compatible #659
1808
+ * Author box now displays HTML properly #645
1809
+ * Date added Design-3 in meta #583
1810
+ * Options link was removed from wp-admin tool bar after a feedback from a user.
1811
+ * Footer sub menus layout compatibility.
1812
+
1813
+
1814
+ = 0.9.44 (5 March 2017) =
1815
+ * View more details at https://ampforwp.com/user-experience-52nd-update/
1816
+ * Added Welcome Screen for better User experience. [Enhancement]
1817
+ * Undefined Index debug error resolved [Bug fix]
1818
+ * All in one SEO Support support tested [3rd party compatibility]
1819
+ * Frontpage title in Design 3 is out of the container #644 [Bug fix]
1820
+ * Default Table markup in AMP #643 [Enhancement]
1821
+ * AMP carousel is not working on Frontpage #641 [Bug fix]
1822
+ * Social share .js was getting added even when it was not required #638 [Bug fix]
1823
+ * Search Feature added for Design 1 & Design 2 [Major Improvement]
1824
+ * Accordion script loading issue in Design 3 #634 [Bug fix]
1825
+ * ?nonamp=1 links should be nofollow #622 [Bug fix]
1826
+ * Same Header and Color Scheme are making header elements invisible #629 [Enhancement]
1827
+ * In Search AMP rel canonical was different #631 [Bug fix]
1828
+ * Non-AMP link in Design 3 was not working when mobile redirection was enabled #632 [Bug fix]
1829
+ * Search form text strings are now added in the translation panel #607 [Bug fix]
1830
+ * Load AMP-ads conditionally only if ads are available #609 [Bug fix]
1831
+ * Added compatibility with Custom post type extension. Option to hide/show AMP on all custom post types #587 [Bug fix]
1832
+ * Report a Bug & Request feature links added [Enhancement]
1833
+ * If there was no menu set in Design 3 then all pages were getting displayed. #613 [Bug fix]
1834
+ * The tag Font is disallowed #616 [Validation Improved]
1835
+ * index/noindex separately added for Tags and also for Categories #606 [Enhancement]
1836
+ * Use of undefined constant AMP_QUERY_VAR #596 [Bug fixed]
1837
+ * Logo is not centered in Design 3 #586 [Bug fixed]
1838
+ * Remove defer, a very rare type of defer was getting added #589 [Validation Improved]
1839
+ * Disqus comments iframe had scrolling issues #566 [Bug fixed]
1840
+ * Left side blank gap in the RTL in design 2 #541 [Bug fixed]
1841
+ * Inline Styles not working correctly in Custom AMP Editor #533 [Bug fixed]
1842
+ * Re-save permalinks issues. Flushing rewrites with options saved. #511 [Improvement]
1843
+ * Code review and cleaning of the customizer #404 [Code Cleaning]
1844
+ * Google Search iframe had some header alignment issues in Design 3. #624 - Thank you Leo Osa @leoosa for the contribution! [Bug fixed]
1845
+ * AMP Frontpage + Override AMP Content = Blank page #604 [Bug fixed]
1846
+ * Widget area added on the homepage with an 'AMP Category Blocks' widget. It means you can display multiple category blocks the homepage. This allows you to display complex layouts, even on AMP. [Major Improvement]
1847
+ * Auto-append /amp at the end of internal links in Menu with an option in the Menu section of the options panel #531 [Major Improvement]
1848
+ Reformatting and Minifying of stylesheet [Code Cleaning]
1849
+ * Created a new section for Homepage and moved some controls from other areas to the home section for the better user experience. [User Experience]
1850
+ * Override Homepage Thumbnail size option added. It will give you more control over your thumbnails. [Major Improvement]
1851
+ * New color picker added to change the color of the header elements in the Design 3 to give you better control over the design. [Enhancement]
1852
+ * Extra amp-carousel script loading is now fixed. [Bug fixed]
1853
+ * Crafting of layout code in design 2 and design 3, especially with social icons area. [Code Cleaning]
1854
+ * Design of search form was not clickable in iOS devices #621 [Bug fixed]
1855
+ * Disqus iframe was loading even when there was no disqus name was added in the option. We found that many users might be enabling it without knowing the output and then they seem to forget, which was causing them validation warnings. [Bug fixed]
1856
+
1857
+ = 0.9.43.6 =
1858
+ * View more details at https://ampforwp.com/stability-sprint-3-51st-update/
1859
+ * Typo in the is_home() function fixed
1860
+ * Option to hide/show AMP on all custom post types #587
1861
+ * False detection by Windows defender tool fixed
1862
+ * Conditional tags were not compatible with Advanced AMP ads which were causing some conflicts but is now fixed.
1863
+
1864
+ = 0.9.43.5 =
1865
+ * View more details at https://ampforwp.com/stability-sprint-2-50th-update/
1866
+ * Fixed shortcodes issue in related posts #543
1867
+ * Iframe Scripts Added properly
1868
+ * Proper conditions added for the social section of Design 3
1869
+ * Featured Image issue stretched in Design 2 & 3
1870
+ * Removed extra global $redux_builder_amp;
1871
+ * Custom Logo Dimensions option added #479
1872
+ * Index & NoIndex options added for SEO section. #558
1873
+ * Added URL for rewrite flushing rules in Options
1874
+ * Option to enable and disable the Author area in Design 3#577
1875
+ * Rel Nofollow added in credit link
1876
+ * debug issue solved: fn_offset not defined
1877
+ * debug issue solved: global $post not declared
1878
+ * The word 'ago' is now translatable in design 3
1879
+ * The word 'read next' is translatable now
1880
+ * Tablepress compatibility added #392
1881
+ * Secure API server is now serving through Google Cloud Manager.
1882
+ * Thrive Content builder was displaying twice when the Custom AMP content was on. It was a complex issue which has been solved now.
1883
+ * amp-ad extension.js script was loading if the Ads are not enabled. #598
1884
+ * Social Share Extension Included on Homepage even if we didn't have social icons #599
1885
+ * Installation UX improvement #593
1886
+ * Removed duplicate global variable
1887
+ * Proper OG tags added #588
1888
+ * Proper instructions added for Custom AMP content #471
1889
+
1890
+
1891
+ = 0.9.43.1 =
1892
+ * View more details at https://ampforwp.com/0-9-43-1-released-stability-sprint-1-49th-update/
1893
+ * Emoji in comments leads to AMP errors
1894
+ * Design 1 showing time on archives
1895
+ * Added some space between the archive label.
1896
+ * Lazy loading plugins compatibility #544
1897
+ * Custom header and footer areas
1898
+ * Sticky posts now come on top #564
1899
+ * Footer non-amplink added in design 3 #562
1900
+ * HTML Paragraph tag is shown in the title in category! #518
1901
+
1902
+ = 0.9.42 =
1903
+ * View more details at https://ampforwp.com/design-three-update/
1904
+ * Design 3 was released – Video Overview along with new options and features. View the video overview at: https://www.youtube.com/watch?v=ub1pwskt3Rc [Major Feature]
1905
+ * Ticket #517 Added Upload field into Redux core [3rd party Compatiblity]
1906
+ * Ticket#529 Controls for archive titles added [Improvement]
1907
+ * Ticket #548 Jetpack photon code removed
1908
+
1909
+ = 0.9.41 =
1910
+ * View more details at https://ampforwp.com/disqus-comments-in-amp/
1911
+ * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
1912
+ * AMP WooCommerce supported tag was missing after the last update. [Bug fix]
1913
+ * Homepage & Related Posts was displaying private and protected posts, which is now fixed [Bug fix]
1914
+ * Next previous links added in Design 1 [Enhancement]
1915
+ * Invalid Post Time displaying in the homepage of Design 1 [Bug fix]
1916
+ * Twitter share now includes the twitter handle of the author with setting in options [Enhancement]
1917
+ * Emoji in comments leads to AMP errors was fixed [Bug fix]
1918
+ * Date are now displayed on archives in Design 1 [Enhancement]
1919
+ * When RTL enabled logo merges with nav bar was fixed [Bug fix]
1920
+ * Jetpack Photon compatibility added [3rd Party Compatibility]
1921
+
1922
+ = 0.9.40 =
1923
+ * View more details at https://ampforwp.com/0-9-40-released-biggest-stability-update/
1924
+ * Proper endpoints added [Improvement]
1925
+ * Flush Rewrites properly [Improvement]
1926
+ * REL Canonical properly getting added. [Improvement]
1927
+ * Proper Frontpage Canonical added [Improvement]
1928
+ * Added Base name support for categories and tags [Improvement]
1929
+ * Redirection of excluded post solved. [Bug fix]
1930
+ * Archives properly redirecting to the right URL [Bug fix]
1931
+ * Homepage redirection solved [Bug fix]
1932
+ * Plusone tag is stripped properly. [Validation Issue fixed]
1933
+ * Archives are now clickable. [Improvements]
1934
+ * WP_Query filter added for better customizability of Homepage loop. [Better Customizations]
1935
+ * Social share boost plugin compatibility. [3rd party Customizations]
1936
+ * Removed H1 from the frontpage even if it is not available. [Improvement]
1937
+ * H3 instead of H1 for Site title. So there is only one H1 per page. [SEO Improvement]
1938
+
1939
+ = 0.9.38 =
1940
+ * View full details at https://ampforwp.com/google-tag-manager-for-amp/
1941
+ * Google Tag manager included [New feature]
1942
+ * Iframe max-width added [Improvement]
1943
+ * Paginated pages have different titles now. [Bug fix]
1944
+
1945
+ = 0.9.37 =
1946
+ * View full details at https://ampforwp.com/category-tags-archive-support-added/
1947
+ * Debug issues solved [Bug fix]
1948
+ * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
1949
+ * Category, Tags & Archive Support with titles added [Enchancement]
1950
+ * Archive Title support added [Enchancement]
1951
+ * There were some issues with attachments [Bug fix]
1952
+ * removed ? from amp url's [Improvement]
1953
+ * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
1954
+ * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
1955
+ * Added an option to turn off AMP support for Homepage. [Enchancement]
1956
+ * Too many redirects issue on homepage is fixed #435 [Improvement]
1957
+ * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
1958
+ * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
1959
+ * Comment anchor link changed for simplecomment button files in both designs [Improvement]
1960
+ * Redirection Loop issue fixed [Bug fix]
1961
+ * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
1962
+ * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
1963
+ * Improved Sessions [Improvement]
1964
+ * Advnaced Settings panel was created for better user experience. [Improvement]
1965
+ * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
1966
+ * RTL issue fixed #454 [Bug fixed]
1967
+
1968
+ = 0.9.36 =
1969
+ * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
1970
+ * Redux Core Update. Better compatibility with the Salient theme and Themeforest themes & plugins using redux framework in their core, which makes the plugin much stable. [Huge Improvements]
1971
+ * Hide advertisement section if advance ads plugin is active. [Better User experience]
1972
+ * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
1973
+ * Launch Post Builder button added. One of the important feature called ‘Post Builder’, that is drag and drop post builder was somewhere hidden in the customizer, so positioned it for better visibility from users. [Better UX]
1974
+
1975
+ = 0.9.35 =
1976
+ * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
1977
+ * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
1978
+ * Attachment page was having the wrong endpoint. [Bug fix]
1979
+ * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
1980
+ * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
1981
+ * Lang attributes were added [Enhancement]
1982
+ * The tag like was disallowed in the AMP [Validation Improvement]
1983
+ * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
1984
+ * AMP on Pages option was not working in some cases. [Bug fix]
1985
+ * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
1986
+ * g:plusone tag was not getting removed properly. [Validation Improvement]
1987
+ * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
1988
+ * Structured Data Image width issue solved [Enhancement]
1989
+ * BJ Lazy Load was having issues, we have added a fix which will make this plugin compatible with the AMP. [3rd party Compatibility & Validation Improvement]
1990
+ * imageanchor=”1″ was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
1991
+
1992
+ = 0.9.34 =
1993
+ * Newspaper theme by Tagdiv was having issues, we have fixed this one.
1994
+
1995
+ = 0.9.33 [15th Jan 2017] =
1996
+ * Full details at https://ampforwp.com/debug-errors-shortcodes/
1997
+ * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
1998
+ * Debug errors fixed, Code is now much cleaner.
1999
+ * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
2000
+ * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
2001
+ * Properly removes AMP if turned off from Post panel
2002
+ * z-index position improved on Sticky Social bar
2003
+ * Better compatibility with shortcodes.
2004
+ * Divi Standard Layouts Compatibility
2005
+ * Properly Hide AMP posts if excluded. #367
2006
+ * Mobile redirection was causing loop issues which are now fixed.
2007
+ * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
2008
+ * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
2009
+ * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
2010
+ * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
2011
+
2012
+ = 0.9.32 [7th Jan 2017] =
2013
+ * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
2014
+ * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
2015
+ * Paginated pages on homepage redirect to homepage URL #335
2016
+ * Title of the page should be displayed on the FrontPage #358
2017
+ * Thrive Builder AMP Validation Compatibility, so it will be validated properly in AMP.
2018
+ * Twitter Sharing improved so it gets the data properly #341
2019
+ * Option to change the number of Related Posts #290
2020
+ * Validation errors due to rel="canonical" was missing on some pages
2021
+ * Comment button displays even if the comments are not available
2022
+ * Threaded comments were duplicating, so that issue is solved and added proper CSS for it.
2023
+ * Minor issue with Jetpack Comments fixed.
2024
+ * Missing amp-social-share.js on front page fixed #372
2025
+ * Minor improvements to Title and description tags.
2026
+ * Analytics Script was loading twice when Glue was active.
2027
+ * Page specific class added for better customization compatibility #377
2028
+ * Inline Style support added Fixed #356
2029
+ * Bugs fixed in Email notification pointer
2030
+
2031
+ = 0.9.31 [2nd Jan 2017] =
2032
+ * Proper Details at https://ampforwp.com/amp-0-9-31-released-installation-user-experience/
2033
+ * Proper Condition added for the scripts to load in Frontpage.php
2034
+ * Rel canonical properly added for front pages
2035
+ * 404 and Archive page Mobile redirection code refined
2036
+ * User Experience Improvement: Installation process was improved
2037
+
2038
+ = 0.9.3 [31th December 2016] =
2039
+ * Proper Details at https://ampforwp.com/custom-amp-content-editor/
2040
+ * Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
2041
+ * FrontPage had some validation issues. [Bug fix]
2042
+ * Related posts in Design 1 we're redirecting to 404 fixed [Bug fix]
2043
+
2044
+ = 0.9.2.2 [27th December 2016] =
2045
+ * Proper Details at https://ampforwp.com/polishing-user-experience-improvements/
2046
+ * Made the Options panel user-friendly
2047
+ * Social Share on frontpage issue fixed.
2048
+ * Readme.txt made user-friendly.
2049
+ * Archive option removed and some UI improvements
2050
+ * Single was not displaying the Title
2051
+ * 'Type is not allowed' [Validation issue fixed]
2052
+ * noshade tag Validation issue fixed
2053
+
2054
+ = 0.9.2.1 [24th December 2016] =
2055
+ * Proper Details at https://ampforwp.com/step-towards-fixing-amp-validation-errors/
2056
+ * Disabled the Tags and Categories support for AMP for better validation until we find a better solution.
2057
+ * Mobile redirection bug fixed, It was continuously redirecting to the same page [Bug fix]
2058
+ * trailingslashit added to make sure we have proper url for Mobile redirection [Bug fix]
2059
+ * In content AD overlapping the content issue fixed
2060
+
2061
+ = 0.9.2 [23th December 2016] =
2062
+ * Proper Details at https://ampforwp.com/mobile-redirection/
2063
+ * AMP Mobile Redirection Feature added. It can be turned on from Dashboard > General and then Mobile Redirection. [New Feature]
2064
+ * Archive title and description added [Improvement]
2065
+ * Improved the Speed of the AMP version #321 [Improvement]
2066
+ * Anchor link was not closing fixed #328 [Bug Fix]
2067
+ * Typo in Trailingslashit function which resulted in some issues in the Homepage version [Bug Fix]
2068
+
2069
+ = 0.9.1.2 [20th December 2016] =
2070
+ * Proper Details at https://ampforwp.com/new/
2071
+ * DoubleClick Support
2072
+ * Custom Post Type Support
2073
+ * Ratings Support
2074
+ * Comments Gaping fix
2075
+ * Custom Excerpt code
2076
+ * Better Compatibility with Yoast SEO plugin
2077
+ * AMP Validation error in Design 1 Fixed
2078
+ * Proper Homepage title & Description with Yoast SEO plugin issue fixed
2079
+ * Design -1 Excerpt too big for mobile devices, Fixed
2080
+ * Advertisement support on Design 1
2081
+ * Link to Tags & Categories were having some issues.
2082
+ * AMP looking bad on big devices
2083
+ * AMP validation Improvement: Lightbox plugins compatibility
2084
+ * Huge Progress in AMP Validation Errors: Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
2085
+ * Page Performance: Removed default Google font loading
2086
+ * Page Performance: DNS Prefetch tag added for faster DNS Handshake
2087
+
2088
+ = 0.9.1 [16th December 2016] =
2089
+ * Proper Details at https://ampforwp.com/new/
2090
+ * PHP7 Compatibility
2091
+ * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
2092
+ * Custom CSS not working in Design one (#249)
2093
+ * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
2094
+ * How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
2095
+ * Non-amp Homepage support added (#267)
2096
+ * using get_avatar() (#259)
2097
+ * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
2098
+ * Validation Issue fixed: Script Tag removed from the content.
2099
+ * Featured image in Design 1 in single #261
2100
+ * After Fresh installation - a save is required Fixed
2101
+ * Excerpt length controlled
2102
+ * Design One has thumbnails on the Homepage
2103
+ * Non-AMP link goes to the wrong page, issue fixed.
2104
+ * Archive pages were broken, fixed.
2105
+ * Option to Enable & Disable the Next/Previous links in Single
2106
+ * WhatsApp sharing not working, issue fixed.
2107
+ * Category Taxonomy has extra ':' in the word.
2108
+ * The word 'Ago' is now translatable.
2109
+ * Yoast SEO with AMP compatibility issue fixed.
2110
+ * Several Minor Polishing in the code
2111
+ * Footer Ad gets covered by Sticky Social Icons (#269)
2112
+ * Smaller image size when “image caption” is used in Design-2 (#263)
2113
+ * Footer ad with Sticky Social bar issue fix
2114
+ * Checked with WordPress 4.7
2115
+ * Ad #1 was messing up with the title, issue fixed.
2116
+ * Compatibility improved with AMP WooCommerce.
2117
+
2118
+ = 0.9 =
2119
+ * Proper Details at https://ampforwp.com/amp-pagebuilder/
2120
+ * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
2121
+ * 100% Yoast Compatible , Now no need to have additionally Glue Installed
2122
+ * 100% completed Translation panel, Now absolutely anything on page is translated
2123
+ * Added Option to turn on/off Page Support
2124
+ * Styling for Tags was Corrected
2125
+ * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
2126
+ * Default Image alignment styling added
2127
+ * Added Option to turn on/off Page Support
2128
+ * Related Posts Now use Custom Excerpt if it Exists
2129
+ * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
2130
+ * <pre> Tag styling issue fixed for AMP pages
2131
+ * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
2132
+ * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
2133
+ * 2 New Designs added
2134
+ * SEO Panel Added
2135
+
2136
+ = 0.8.8 =
2137
+ * Proper Details at https://ampforwp.com/amp-0-8-8-released-translation-panel/
2138
+ * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
2139
+ * Badge Tag was throwing Validation error
2140
+ * Plusone tag validation error was fixed
2141
+ * Time tag was validation error was fixed
2142
+ * User experience for Mobile devices was improved
2143
+ * Meta info was messing up in smaller devices, it was fixed as well.
2144
+ * Internal AMP linking added for Categories and Tags
2145
+ * Future errors for AMP ads was fixed
2146
+ * Blockquote styling added
2147
+ * “Please Activate parent Plugin settings” added for better User Experience.
2148
+ * Related Post Ux improvement
2149
+ * Plugin version added in Footer source code for better debugging
2150
+ * Added Support for Default WordPress Image alignment
2151
+ * New action hooks added in index page
2152
+ * Featured Image Size options added
2153
+
2154
+ = 0.8.7 =
2155
+ * Proper Details at https://ampforwp.com/amp-0-8-7/
2156
+ * added option to enable/disable AMP on Archive pages (Ticket #188)
2157
+ * Solved 404 on Related Posts (Ticket #178 )
2158
+ * Related posts by either categories or Tags(Ticket #179)
2159
+ * added a link to menu Section from the AMP Options page(Ticket #190)
2160
+ * Added Support for Piwik Analytics(Ticket #163)
2161
+ * Added Support for Segment.com Analytics(Ticket #50)
2162
+ * Added a switch for hiding Non-Amp page link from Footer.( Ticket #189)
2163
+ * Added an Option that strips Users URL from Comments Section(Ticket #180)
2164
+ * Fixed stripping <date> tags from the content , Since it was preventing validation – amp-img issues fixed
2165
+ * UX Improved for every section of AMP Options page
2166
+ * Added Settings button on plugin page
2167
+ * Related posts switch added
2168
+ * Removed carousel.js
2169
+
2170
+
2171
+ = 0.8.6.1 =
2172
+ * Date Tag fix
2173
+ * Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
2174
+
2175
+ = 0.8.6 =
2176
+ * Proper Details at https://ampforwp.com/amp-0-8-6-released-related-posts-comments/
2177
+ * Related Posts
2178
+ * Post Comments
2179
+ * WhatsApp sharing button – Your visitors can now easily share the content over the whatsapp.
2180
+ * Validation issue fixed by All In One Schema.org Rich Snippets plugin
2181
+ * Removed Google Fonts loading for Performance
2182
+ * New relic Support
2183
+ * Class added to ‘View Non-AMP Version’ text
2184
+ * Archives Structured Data issue fixed
2185
+ * Some instances img tags converted into amp-img automatically.
2186
+
2187
+
2188
+ = 0.8.5.3 =
2189
+ * Canonical issue fixed for Post
2190
+
2191
+ = 0.8.5.2 =
2192
+ * Canonical issue fixed for FrontPage
2193
+
2194
+ = 0.8.5.1 =
2195
+ * Proper Details at https://ampforwp.com/new/
2196
+ * Validation issue fixed: 'Value' tag
2197
+ * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
2198
+ * Validation issue fixed: Table markup
2199
+ * Validation issue fixed: nowrap and misc tags
2200
+ * New Relic Support
2201
+ * Tags on off option
2202
+ * Canonical and correct AMP html Redirect issues Solved
2203
+ * NextGEN Gallery Validation Support Added
2204
+
2205
+ = 0.8.5 =
2206
+ * Proper Details at https://ampforwp.com/the-0-4-compatibility/
2207
+ * AMP 0.4 Compatibility Check
2208
+ * Even better Structured Data Validation, Once in for all!
2209
+ * Structured Data Options to eliminate Validation errors
2210
+ * AMP Page Exclude option
2211
+
2212
+ = 0.8.4 =
2213
+ * Proper Details at https://ampforwp.com/blog/structured-data-validation/
2214
+ * Structured Data Validation
2215
+ * Navigation Text Change
2216
+ * Inline Style Validation
2217
+ * Form Validation
2218
+ * Frontpage shows the amphtml rel twice fixed
2219
+ * Facebook Sharing not working
2220
+
2221
+ = 0.8.3 =
2222
+ * Prefix added in the Content filter
2223
+ * Extra space after quote in Ads
2224
+
2225
+ = 0.8.2 =
2226
+ * Proper Details at https://ampforwp.com/blog/the-custom-frontpage/
2227
+ * Custom AMP FrontPage
2228
+ * Featured Image
2229
+ * New Mobile Friendly Advertisement sizes
2230
+ * Single Post Pagination Option
2231
+ * RTL Support
2232
+ * Notifications
2233
+ * Gaping if the Meta was turned off.
2234
+ * Analytics was not fetching the user id properly.
2235
+ * Page was not using the post template along with the AD support.
2236
+ * AMP Endpoint support for Paged when the front page is active.
2237
+ * UI improvement of Admin panel
2238
+ * Few Validation issues fixed
2239
+
2240
+ = 0.8.1 =
2241
+ * Warning: Cannot modify header information error fixed
2242
+ * Validation issue fixed. KK Star Plugin compatible.
2243
+ * Gaping in the smaller screens fixed
2244
+
2245
+ = 0.8 =
2246
+ * Proper Details at https://ampforwp.com/blog/the-change/
2247
+ * Plugin was re-written from scratch and is now built on top of default AMP plugin by Automattic but giving you the same features of the original plugin.
2248
+ * 99.5% Validation issues were fixed.
2249
+ * Page builder & Shortcodes Compatibility Support Added
2250
+ * Conflict with JSON API
2251
+ * Carousel support for Gallery
2252
+ * Better Image stretching and resizing
2253
+ * Youtube Video Embed Support
2254
+ * Vine Embed Support
2255
+ * Twitter oembed Support
2256
+ * Instagram Embed Support
2257
+ * Facebook Video Embed Support
2258
+ * Better Future Compatibility
2259
+
2260
+ = 0.7.7 =
2261
+ * Proper Details at https://ampforwp.com/blog/amp-0-7-7/
2262
+ * Big Validation Error fix Update
2263
+ * Disable AMP support on specific Pages and Posts
2264
+ * Option to disable the Post meta from the Single
2265
+ * Footer Credits and Copyright Text Option
2266
+ * New options for Social Sharing Bar in Single
2267
+ * Jetpack Social & Related Sharing Issue fixed
2268
+ * Gaping in footer if the Sticky bar is enabled
2269
+ * Text domain added on few strings
2270
+
2271
+ = 0.7.6 =
2272
+ * Google Adsense Support Added with AMP-Ad
2273
+ * Wrong Homepage rel amphtml bug fixed
2274
+
2275
+ = 0.7.5 =
2276
+ * Google Analytics Support Added
2277
+ * Logo Support Added. If the logo is disabled, then the Title should be activated.
2278
+ * Color Scheme Feature Added
2279
+ * User friendly Options Panel Added
2280
+ * iFrame support Added
2281
+ * Few Minor Bugs Fixed
2282
+
2283
+ = 0.7.1 =
2284
+ * Bug #24 (Github) fixed
2285
+ * Strip Style tags for faster & better validation
2286
+ * Bug #21 (Github) fixed
2287
+
2288
+ = 0.7 =
2289
+ * Canonical Improved
2290
+ * Navigation Validation bug fixed
2291
+ * Two more validation bugs fixed ('role' and 'tabindex' attribute)
2292
+ * Featured image automatically hides if it is not present
2293
+ * Validation issues in the images of the post's the_content
2294
+
2295
+ = 0.6 =
2296
+ * Improved Navigation Menu
2297
+ * Search Console errors fixed
2298
+ * Social Sharing option
2299
+ * Pages support
2300
+ * Force redirection for mobile users removed and many other bug fixes
2301
+
2302
+ = 0.5 =
2303
+ * Added AMP Markup for Google Structured data. This will fix the issues in Webmaster tools.
2304
+
2305
+ = 0.4 =
2306
+ * Support of Custom menu added for AMP enabled sites
2307
+
2308
+ = 0.3 =
2309
+ * Support of amp-img added in single posts
2310
+ * minor css bug fixed
2311
+
2312
+ = 0.2.5 =
2313
+ * Minor bugs fixed
2314
+ * ?mobile & ?nomobile is now ?amp & ?noamp
2315
+
2316
+ = 0.2 =
2317
+ * White Screen of death issue fixed
2318
+ * Plugin URI updated
2319
+
2320
+ = 0.1 =
2321
+ * Initial version
classes/class-ampforwp-embedly-sanitizer.php CHANGED
@@ -1,49 +1,49 @@
1
- <?php
2
- use AMPforWP\AMPVendor\AMP_Base_Sanitizer;
3
- use AMPforWP\AMPVendor\AMP_DOM_Utils;
4
- /**
5
- * Converts embedly-cards to <amp-embedly-card>
6
- */
7
- class AMPforWP_Embedly_Sanitizer extends AMP_Base_Sanitizer {
8
- private $embedly_cards = array();
9
- private static $script_slug = 'amp-embedly-card';
10
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-embedly-card-0.1.js';
11
- public function sanitize() {
12
- $body = $this->get_body_node();
13
- $xpath = new DOMXPath($this->dom);
14
- $class_name = 'embedly-card';
15
- $blockquotes = $xpath->query("//*[contains(@class,'$class_name')]");
16
- foreach($blockquotes as $embedly_card){
17
- $this->replace_with_amp_embedly_card($embedly_card);
18
- }
19
- if(count($this->embedly_cards) > 0){
20
- $this->did_convert_elements = true;
21
- }
22
- }
23
- function replace_with_amp_embedly_card ($embedly_card){
24
- $medias = $embedly_card->getElementsByTagName('a');
25
- if($medias->length > 0){
26
- $media = $medias->item(0);
27
- $href = $media->getAttribute('href');
28
- $tag = $this->create_amp_embedly_card($href);
29
- $this->embedly_cards[] = $tag; // add it to array
30
- $embedly_card->parentNode->replaceChild( $tag, $embedly_card);
31
- }
32
- }
33
- function create_amp_embedly_card($href){
34
- $attrs = array(
35
- 'data-url' => $href,
36
- 'width' => 100,
37
- 'height'=> 50,
38
- 'layout' => 'responsive'
39
- );
40
- $attrs = ampforwp_amp_consent_check( $attrs );
41
- return AMP_DOM_Utils::create_node($this->dom, 'amp-embedly-card', $attrs);
42
- }
43
- public function get_scripts() {
44
- if ( ! $this->did_convert_elements ) {
45
- return array();
46
- }
47
- return array( self::$script_slug => self::$script_src );
48
- }
49
  }
1
+ <?php
2
+ use AMPforWP\AMPVendor\AMP_Base_Sanitizer;
3
+ use AMPforWP\AMPVendor\AMP_DOM_Utils;
4
+ /**
5
+ * Converts embedly-cards to <amp-embedly-card>
6
+ */
7
+ class AMPforWP_Embedly_Sanitizer extends AMP_Base_Sanitizer {
8
+ private $embedly_cards = array();
9
+ private static $script_slug = 'amp-embedly-card';
10
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-embedly-card-0.1.js';
11
+ public function sanitize() {
12
+ $body = $this->get_body_node();
13
+ $xpath = new DOMXPath($this->dom);
14
+ $class_name = 'embedly-card';
15
+ $blockquotes = $xpath->query("//*[contains(@class,'$class_name')]");
16
+ foreach($blockquotes as $embedly_card){
17
+ $this->replace_with_amp_embedly_card($embedly_card);
18
+ }
19
+ if(count($this->embedly_cards) > 0){
20
+ $this->did_convert_elements = true;
21
+ }
22
+ }
23
+ function replace_with_amp_embedly_card ($embedly_card){
24
+ $medias = $embedly_card->getElementsByTagName('a');
25
+ if($medias->length > 0){
26
+ $media = $medias->item(0);
27
+ $href = $media->getAttribute('href');
28
+ $tag = $this->create_amp_embedly_card($href);
29
+ $this->embedly_cards[] = $tag; // add it to array
30
+ $embedly_card->parentNode->replaceChild( $tag, $embedly_card);
31
+ }
32
+ }
33
+ function create_amp_embedly_card($href){
34
+ $attrs = array(
35
+ 'data-url' => $href,
36
+ 'width' => 100,
37
+ 'height'=> 50,
38
+ 'layout' => 'responsive'
39
+ );
40
+ $attrs = ampforwp_amp_consent_check( $attrs );
41
+ return AMP_DOM_Utils::create_node($this->dom, 'amp-embedly-card', $attrs);
42
+ }
43
+ public function get_scripts() {
44
+ if ( ! $this->did_convert_elements ) {
45
+ return array();
46
+ }
47
+ return array( self::$script_slug => self::$script_src );
48
+ }
49
  }
classes/class-ampforwp-infinite-scroll.php CHANGED
@@ -1,163 +1,163 @@
1
- <?php
2
- /**
3
- * Class: To enable Infinite Scroll in AMP
4
- * Note: For performance reasons the component will render a maximum of three documents (total) on screen at one time. This limit may be changed or removed in the future.
5
- * Read more about it here: https://www.ampproject.org/docs/reference/components/amp-next-page
6
- */
7
- if( ! class_exists('AMPforWP_Infinite_Scroll') ) {
8
-
9
- class AMPforWP_Infinite_Scroll
10
- {
11
- private $paged;
12
- private $is_single = false;
13
- private $is_loop = false;
14
- function __construct()
15
- {
16
- $this->is_single = true == $this->is_single() ? $this->is_single() : $this->is_single;
17
- $this->is_loop = true == $this->is_loop() ? $this->is_loop() : $this->is_loop;
18
- $this->paged = $this->paged();
19
- if ( $this->is_single ){
20
- // amp-next-page experiment meta tag
21
- add_action('amp_experiment_meta', array( $this, 'amp_experiment_meta') );
22
- // amp-next-page script
23
- add_filter('ampforwp_post_template_data', array( $this , 'amp_infinite_scroll_script') );
24
- // amp-next-page tag
25
- if ( 4 != ampforwp_get_setting('amp-design-selector') )
26
- add_action('ampforwp_above_related_post', array( $this , 'amp_next_page') );
27
- else
28
- add_action('ampforwp_single_design_type_handle', array( $this , 'amp_next_page') );
29
- }
30
- if ( $this->is_loop ) {
31
- // amp-next-page experiment meta tag
32
- add_action('amp_experiment_meta', array( $this, 'amp_experiment_meta') );
33
- // amp-next-page script
34
- add_filter('ampforwp_post_template_data', array( $this , 'amp_infinite_scroll_script') );
35
- // amp-next-page tag
36
- add_action('ampforwp_loop_before_pagination', array( $this , 'amp_next_page') );
37
- // Next Posts Link
38
- add_filter('ampforwp_next_posts_link', array( $this , 'next_posts_link') , 10 , 2 );
39
- }
40
- }
41
- public function is_single() {
42
- if ( is_single() && true == ampforwp_get_setting('ampforwp-infinite-scroll-single') ) {
43
- return true;
44
- }
45
- return false;
46
- }
47
- public function is_loop() {
48
- if ( (ampforwp_is_home() || is_archive()) && true == ampforwp_get_setting('ampforwp-infinite-scroll-home') ) {
49
- return true;
50
- }
51
- return false;
52
- }
53
- public function paged() {
54
- if ( get_query_var( 'paged' ) ) {
55
- return get_query_var('paged');
56
- } elseif ( get_query_var( 'page' ) ) {
57
- return get_query_var('page');
58
- } else {
59
- return 1;
60
- }
61
- }
62
- public function amp_experiment_meta() {
63
- echo '<meta name="amp-experiments-opt-in" content="amp-next-page">';
64
- }
65
-
66
- public function amp_infinite_scroll_script( $data ) {
67
- if ( empty( $data['amp_component_scripts']['amp-next-page'] ) ) {
68
- $data['amp_component_scripts']['amp-next-page'] = 'https://cdn.ampproject.org/v0/amp-next-page-0.1.js';
69
- }
70
- return $data;
71
- }
72
-
73
- public function amp_next_page() {
74
- $loop_link = $first_url = $first_title = $first_image = $second_url = $second_image = $second_title ='';
75
- $single_links = $single_titles = $single_images = $classes = $pages = array();
76
- if ( $this->is_loop ) {
77
- $loop_link = $this->loop_link();
78
- $loop_link1 = $loop_link2 = '';
79
- $loop_link1 = $loop_link.($this->paged+1);
80
- $loop_link2 = $loop_link.($this->paged+2);
81
- if ( true == ampforwp_get_setting('amp-core-end-point') ) {
82
- $loop_link1 = ampforwp_url_controller($loop_link1);
83
- $loop_link2 = ampforwp_url_controller($loop_link2);
84
- }
85
- $pages[] = array('title'=>'','image'=>'','ampUrl'=>$loop_link1);
86
- $pages[] = array('title'=>'','image'=>'','ampUrl'=>$loop_link2);
87
- }
88
- if ( $this->is_single ) {
89
- $pages = $this->single_post();
90
- }
91
- $classes = $this->hide();
92
- ?>
93
- <amp-next-page>
94
- <script type="application/json">
95
- {
96
- "pages": <?=json_encode($pages)?>,
97
- "hideSelectors": <?=$classes?>
98
- }
99
- </script>
100
- </amp-next-page>
101
- <?php }
102
- public function single_post() {
103
- global $post;
104
- $pages = array();
105
- $exclude_ids = ampforwp_exclude_posts();
106
- $exclude_ids[] = $post->ID;
107
- $query_args = array(
108
- 'post_type' => get_post_type(),
109
- 'orderby' => 'date',
110
- 'ignore_sticky_posts' => 1,
111
- 'paged' => esc_attr($this->paged),
112
- 'post__not_in' => $exclude_ids,
113
- 'has_password' => false ,
114
- 'post_status'=> 'publish',
115
- 'posts_per_page' => 2
116
- );
117
- $query = new WP_Query( $query_args );
118
- while ($query->have_posts()) {
119
- $query->the_post();
120
- $pages[] = array('title'=>get_the_title(),'image'=>ampforwp_get_post_thumbnail('url', 'full'),'ampUrl'=>ampforwp_url_controller( get_permalink() ));
121
- }
122
- wp_reset_postdata();
123
- return $pages;
124
- }
125
-
126
- public function loop_link() {
127
- global $wp;
128
- $amp_url = trailingslashit(home_url($wp->request));
129
- if( $this->paged < 2 ) {
130
- $amp_url = trailingslashit($amp_url.'page');
131
- }
132
- else
133
- $amp_url = str_replace('/'.$this->paged, '', $amp_url);
134
- return $amp_url;
135
- }
136
- public function hide() {
137
- $classes = array();
138
- $design = ampforwp_get_setting('amp-design-selector');
139
- if ( 1 == $design ) {
140
- $classes = array("#pagination",".related_posts", ".amp-wp-footer",".amp-wp-header",".f-w");
141
- }
142
- if ( 2 == $design ) {
143
- $classes = array("#headerwrap","#pagination","#footer",".nav_container",".related_posts",".f-w");
144
- }
145
- if ( 3 == $design ) {
146
- $classes = array("#headerwrap",".relatedpost",".footer_wrapper",".pagination-holder",".f-w");
147
- }
148
- if ( 4 == $design ) {
149
- $classes = array(".p-m-fl",".loop-pagination",".footer",".r-pf",".srp ul",".srp h3","#pagination",".h_m_w", ".f-w");
150
- }
151
-
152
- return json_encode($classes);
153
- }
154
- public function next_posts_link( $next_link , $paged ) {
155
- // Change the next link to paged+3
156
- // reason: amp-next-page will show the results for 3 pages
157
- $next_link = preg_replace('/'.($paged+1).'/', ($paged+3), $next_link);
158
- return $next_link;
159
- }
160
- }
161
- // Initiate the Class
162
- new AMPforWP_Infinite_Scroll();
163
  }
1
+ <?php
2
+ /**
3
+ * Class: To enable Infinite Scroll in AMP
4
+ * Note: For performance reasons the component will render a maximum of three documents (total) on screen at one time. This limit may be changed or removed in the future.
5
+ * Read more about it here: https://www.ampproject.org/docs/reference/components/amp-next-page
6
+ */
7
+ if( ! class_exists('AMPforWP_Infinite_Scroll') ) {
8
+
9
+ class AMPforWP_Infinite_Scroll
10
+ {
11
+ private $paged;
12
+ private $is_single = false;
13
+ private $is_loop = false;
14
+ function __construct()
15
+ {
16
+ $this->is_single = true == $this->is_single() ? $this->is_single() : $this->is_single;
17
+ $this->is_loop = true == $this->is_loop() ? $this->is_loop() : $this->is_loop;
18
+ $this->paged = $this->paged();
19
+ if ( $this->is_single ){
20
+ // amp-next-page experiment meta tag
21
+ add_action('amp_experiment_meta', array( $this, 'amp_experiment_meta') );
22
+ // amp-next-page script
23
+ add_filter('ampforwp_post_template_data', array( $this , 'amp_infinite_scroll_script') );
24
+ // amp-next-page tag
25
+ if ( 4 != ampforwp_get_setting('amp-design-selector') )
26
+ add_action('ampforwp_above_related_post', array( $this , 'amp_next_page') );
27
+ else
28
+ add_action('ampforwp_single_design_type_handle', array( $this , 'amp_next_page') );
29
+ }
30
+ if ( $this->is_loop ) {
31
+ // amp-next-page experiment meta tag
32
+ add_action('amp_experiment_meta', array( $this, 'amp_experiment_meta') );
33
+ // amp-next-page script
34
+ add_filter('ampforwp_post_template_data', array( $this , 'amp_infinite_scroll_script') );
35
+ // amp-next-page tag
36
+ add_action('ampforwp_loop_before_pagination', array( $this , 'amp_next_page') );
37
+ // Next Posts Link
38
+ add_filter('ampforwp_next_posts_link', array( $this , 'next_posts_link') , 10 , 2 );
39
+ }
40
+ }
41
+ public function is_single() {
42
+ if ( is_single() && true == ampforwp_get_setting('ampforwp-infinite-scroll-single') ) {
43
+ return true;
44
+ }
45
+ return false;
46
+ }
47
+ public function is_loop() {
48
+ if ( (ampforwp_is_home() || is_archive()) && true == ampforwp_get_setting('ampforwp-infinite-scroll-home') ) {
49
+ return true;
50
+ }
51
+ return false;
52
+ }
53
+ public function paged() {
54
+ if ( get_query_var( 'paged' ) ) {
55
+ return get_query_var('paged');
56
+ } elseif ( get_query_var( 'page' ) ) {
57
+ return get_query_var('page');
58
+ } else {
59
+ return 1;
60
+ }
61
+ }
62
+ public function amp_experiment_meta() {
63
+ echo '<meta name="amp-experiments-opt-in" content="amp-next-page">';
64
+ }
65
+
66
+ public function amp_infinite_scroll_script( $data ) {
67
+ if ( empty( $data['amp_component_scripts']['amp-next-page'] ) ) {
68
+ $data['amp_component_scripts']['amp-next-page'] = 'https://cdn.ampproject.org/v0/amp-next-page-0.1.js';
69
+ }
70
+ return $data;
71
+ }
72
+
73
+ public function amp_next_page() {
74
+ $loop_link = $first_url = $first_title = $first_image = $second_url = $second_image = $second_title ='';
75
+ $single_links = $single_titles = $single_images = $classes = $pages = array();
76
+ if ( $this->is_loop ) {
77
+ $loop_link = $this->loop_link();
78
+ $loop_link1 = $loop_link2 = '';
79
+ $loop_link1 = $loop_link.($this->paged+1);
80
+ $loop_link2 = $loop_link.($this->paged+2);
81
+ if ( true == ampforwp_get_setting('amp-core-end-point') ) {
82
+ $loop_link1 = ampforwp_url_controller($loop_link1);
83
+ $loop_link2 = ampforwp_url_controller($loop_link2);
84
+ }
85
+ $pages[] = array('title'=>'','image'=>'','ampUrl'=>$loop_link1);
86
+ $pages[] = array('title'=>'','image'=>'','ampUrl'=>$loop_link2);
87
+ }
88
+ if ( $this->is_single ) {
89
+ $pages = $this->single_post();
90
+ }
91
+ $classes = $this->hide();
92
+ ?>
93
+ <amp-next-page>
94
+ <script type="application/json">
95
+ {
96
+ "pages": <?=json_encode($pages)?>,
97
+ "hideSelectors": <?=$classes?>
98
+ }
99
+ </script>
100
+ </amp-next-page>
101
+ <?php }
102
+ public function single_post() {
103
+ global $post;
104
+ $pages = array();
105
+ $exclude_ids = ampforwp_exclude_posts();
106
+ $exclude_ids[] = $post->ID;
107
+ $query_args = array(
108
+ 'post_type' => get_post_type(),
109
+ 'orderby' => 'date',
110
+ 'ignore_sticky_posts' => 1,
111
+ 'paged' => esc_attr($this->paged),
112
+ 'post__not_in' => $exclude_ids,
113
+ 'has_password' => false ,
114
+ 'post_status'=> 'publish',
115
+ 'posts_per_page' => 2
116
+ );
117
+ $query = new WP_Query( $query_args );
118
+ while ($query->have_posts()) {
119
+ $query->the_post();
120
+ $pages[] = array('title'=>get_the_title(),'image'=>ampforwp_get_post_thumbnail('url', 'full'),'ampUrl'=>ampforwp_url_controller( get_permalink() ));
121
+ }
122
+ wp_reset_postdata();
123
+ return $pages;
124
+ }
125
+
126
+ public function loop_link() {
127
+ global $wp;
128
+ $amp_url = trailingslashit(home_url($wp->request));
129
+ if( $this->paged < 2 ) {
130
+ $amp_url = trailingslashit($amp_url.'page');
131
+ }
132
+ else
133
+ $amp_url = str_replace('/'.$this->paged, '', $amp_url);
134
+ return $amp_url;
135
+ }
136
+ public function hide() {
137
+ $classes = array();
138
+ $design = ampforwp_get_setting('amp-design-selector');
139
+ if ( 1 == $design ) {
140
+ $classes = array("#pagination",".related_posts", ".amp-wp-footer",".amp-wp-header",".f-w");
141
+ }
142
+ if ( 2 == $design ) {
143
+ $classes = array("#headerwrap","#pagination","#footer",".nav_container",".related_posts",".f-w");
144
+ }
145
+ if ( 3 == $design ) {
146
+ $classes = array("#headerwrap",".relatedpost",".footer_wrapper",".pagination-holder",".f-w");
147
+ }
148
+ if ( 4 == $design ) {
149
+ $classes = array(".p-m-fl",".loop-pagination",".footer",".r-pf",".srp ul",".srp h3","#pagination",".h_m_w", ".f-w");
150
+ }
151
+
152
+ return json_encode($classes);
153
+ }
154
+ public function next_posts_link( $next_link , $paged ) {
155
+ // Change the next link to paged+3
156
+ // reason: amp-next-page will show the results for 3 pages
157
+ $next_link = preg_replace('/'.($paged+1).'/', ($paged+3), $next_link);
158
+ return $next_link;
159
+ }
160
+ }
161
+ // Initiate the Class
162
+ new AMPforWP_Infinite_Scroll();
163
  }
classes/class-ampforwp-instagram-sanitizer.php CHANGED
@@ -1,65 +1,65 @@
1
- <?php
2
- use AMPforWP\AMPVendor\AMP_Base_Sanitizer;
3
- use AMPforWP\AMPVendor\AMP_DOM_Utils;
4
- /**
5
- * Converts Instagram embeds to <amp-instagram>
6
- */
7
- class AMPFORWP_Instagram_Embed_Sanitizer extends AMP_Base_Sanitizer {
8
- private $instagram_medias = array();
9
- const URL_PATTERN = '#http(s?)://(www\.)?instagr(\.am|am\.com)/p/([^/?]+)#i';
10
- private static $script_slug = 'amp-instagram';
11
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-instagram-0.1.js';
12
- public function sanitize() {
13
- $body = $this->get_body_node();
14
- $xpath = new \DOMXPath($this->dom);
15
- $class_name = 'instagram-media';
16
- $blockquotes = $xpath->query("//*[contains(@class,'$class_name')]");
17
- foreach($blockquotes as $instagram_media){
18
- $this->replace_with_amp_instagram($instagram_media);
19
- }
20
- if(count($this->instagram_medias) > 0){
21
- $this->did_convert_elements = true;
22
- }
23
- }
24
- function replace_with_amp_instagram ($instagram_media){
25
- $medias = $instagram_media->getElementsByTagName('a');
26
- if($medias->length > 0){
27
- $media = $medias->item(0);
28
- // Insta link
29
- $href = $media->getAttribute('href');
30
- // Get the ID from the link
31
- $sourcecode = $this->get_instagram_id_from_url($href);
32
- // Create Instagram tag from the link
33
- $tag = $this->create_instagram_tag($sourcecode);
34
- $this->instagram_medias[] = $tag; // add it to array
35
- $instagram_media->parentNode->replaceChild( $tag, $instagram_media);
36
- }
37
- }
38
- function create_instagram_tag($sourcecode){
39
- $attrs = array(
40
- 'data-shortcode' => $sourcecode,
41
- 'width' => 400,
42
- 'height'=> 400,
43
- 'layout' => 'responsive',
44
- 'data-captioned' => '',
45
- );
46
- $attrs = ampforwp_amp_consent_check( $attrs );
47
- return AMP_DOM_Utils::create_node($this->dom, 'amp-instagram', $attrs);
48
- }
49
- public function get_scripts() {
50
- if ( ! $this->did_convert_elements ) {
51
- return array();
52
- }
53
- return array( self::$script_slug => self::$script_src );
54
- }
55
-
56
- private function get_instagram_id_from_url( $url ) {
57
- $found = preg_match( self::URL_PATTERN, $url, $matches );
58
-
59
- if ( ! $found ) {
60
- return false;
61
- }
62
-
63
- return end( $matches );
64
- }
65
  }
1
+ <?php
2
+ use AMPforWP\AMPVendor\AMP_Base_Sanitizer;
3
+ use AMPforWP\AMPVendor\AMP_DOM_Utils;
4
+ /**
5
+ * Converts Instagram embeds to <amp-instagram>
6
+ */
7
+ class AMPFORWP_Instagram_Embed_Sanitizer extends AMP_Base_Sanitizer {
8
+ private $instagram_medias = array();
9
+ const URL_PATTERN = '#http(s?)://(www\.)?instagr(\.am|am\.com)/p/([^/?]+)#i';
10
+ private static $script_slug = 'amp-instagram';
11
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-instagram-0.1.js';
12
+ public function sanitize() {
13
+ $body = $this->get_body_node();
14
+ $xpath = new \DOMXPath($this->dom);
15
+ $class_name = 'instagram-media';
16
+ $blockquotes = $xpath->query("//*[contains(@class,'$class_name')]");
17
+ foreach($blockquotes as $instagram_media){
18
+ $this->replace_with_amp_instagram($instagram_media);
19
+ }
20
+ if(count($this->instagram_medias) > 0){
21
+ $this->did_convert_elements = true;
22
+ }
23
+ }
24
+ function replace_with_amp_instagram ($instagram_media){
25
+ $medias = $instagram_media->getElementsByTagName('a');
26
+ if($medias->length > 0){
27
+ $media = $medias->item(0);
28
+ // Insta link
29
+ $href = $media->getAttribute('href');
30
+ // Get the ID from the link
31
+ $sourcecode = $this->get_instagram_id_from_url($href);
32
+ // Create Instagram tag from the link
33
+ $tag = $this->create_instagram_tag($sourcecode);
34
+ $this->instagram_medias[] = $tag; // add it to array
35
+ $instagram_media->parentNode->replaceChild( $tag, $instagram_media);
36
+ }
37
+ }
38
+ function create_instagram_tag($sourcecode){
39
+ $attrs = array(
40
+ 'data-shortcode' => $sourcecode,
41
+ 'width' => 400,
42
+ 'height'=> 400,
43
+ 'layout' => 'responsive',
44
+ 'data-captioned' => '',
45
+ );
46
+ $attrs = ampforwp_amp_consent_check( $attrs );
47
+ return AMP_DOM_Utils::create_node($this->dom, 'amp-instagram', $attrs);
48
+ }
49
+ public function get_scripts() {
50
+ if ( ! $this->did_convert_elements ) {
51
+ return array();
52
+ }
53
+ return array( self::$script_slug => self::$script_src );
54
+ }
55
+
56
+ private function get_instagram_id_from_url( $url ) {
57
+ $found = preg_match( self::URL_PATTERN, $url, $matches );
58
+
59
+ if ( ! $found ) {
60
+ return false;
61
+ }
62
+
63
+ return end( $matches );
64
+ }
65
  }
classes/class-ampforwp-photo-gallery-embed.php CHANGED
@@ -1,322 +1,322 @@
1
- <?php
2
- /*
3
- Most of the code is taken from class-amp-gallery-embed.php and Photo Gallery Plugin https://wordpress.org/plugins/photo-gallery/
4
- */
5
- require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );
6
-
7
- class AMPforWP_Photo_Gallery_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
8
- private static $script_slug = 'amp-carousel';
9
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
10
-
11
- public function register_embed() {
12
- add_shortcode( 'Best_Wordpress_Gallery', array( $this, 'shortcode' ) );
13
- }
14
-
15
- public function unregister_embed() {
16
- remove_shortcode( 'Best_Wordpress_Gallery' );
17
- }
18
-
19
- public function get_scripts() {
20
- if ( ! $this->did_convert_elements ) {
21
- return array();
22
- }
23
-
24
- return array( self::$script_slug => self::$script_src );
25
- }
26
-
27
- public function shortcode( $args ) {
28
-
29
- $params = array();
30
- $params['id'] = WDWLibrary::get('shortcode_id', 0);
31
- // Get values for elementor widget.
32
- $params['gallery_type'] = WDWLibrary::get('gallery_type', 'thumbnails');
33
- $params['gallery_id'] = WDWLibrary::get('gallery_id', 0);
34
- $params['tag'] = WDWLibrary::get('tag', 0);
35
- $params['album_id'] = WDWLibrary::get('album_id', 0);
36
- $params['theme_id'] = WDWLibrary::get('theme_id', 0);
37
- $params['ajax'] = TRUE;
38
- if ( isset($params['id']) && $params['id'] ) {
39
- global $wpdb;
40
- $shortcode = $wpdb->get_var($wpdb->prepare("SELECT tagtext FROM " . $wpdb->prefix . "bwg_shortcode WHERE id='%d'", $params['id']));
41
- if ($shortcode) {
42
- $shortcode_params = explode('" ', $shortcode);
43
- foreach ($shortcode_params as $shortcode_param) {
44
- $shortcode_param = str_replace('"', '', $shortcode_param);
45
- $shortcode_elem = explode('=', $shortcode_param);
46
- $params[str_replace(' ', '', $shortcode_elem[0])] = $shortcode_elem[1];
47
- }
48
- }
49
- else {
50
- return;
51
- }
52
- }
53
-
54
- // 'gallery_type' is the only parameter not being checked.
55
- // Checking for incomplete shortcodes.
56
- if ( isset($params['gallery_type']) ) {
57
- $pairs = WDWLibrary::get_shortcode_option_params( $params );
58
- if ( isset($params['ajax']) ) {
59
- $pairs['ajax'] = $params['ajax'];
60
- }
61
- ob_start();
62
- $this->front_end( $pairs );
63
- $output = str_replace( array( "\r\n", "\n", "\r" ), '', ob_get_clean() );
64
- $dom = '';
65
- $nodes = '';
66
- $num_nodes = '';
67
- $urls = array();
68
- if( !empty( $output ) ){
69
- // Create a new document
70
- $dom = new DOMDocument();
71
- if( function_exists( 'mb_convert_encoding' ) ){
72
- $output = mb_convert_encoding($output, 'HTML-ENTITIES', 'UTF-8');
73
- }
74
- else{
75
- $output = preg_replace( '/&.*?;/', 'x', $output ); // multi-byte characters converted to X
76
- }
77
- // To Suppress Warnings
78
- libxml_use_internal_errors(true);
79
- $dom->loadHTML($output);
80
- libxml_use_internal_errors(false);
81
- // get all the img's
82
- $nodes = $dom->getElementsByTagName( 'img' );
83
- $num_nodes = $nodes->length;
84
- for ( $i = $num_nodes - 1; $i >= 0; $i-- ) {
85
- $url = $width = $height = '';
86
- $node = $nodes->item( $i );
87
- $urls[] = apply_filters('amp_photo_gallery_image_params', array(
88
- 'url' => $node->getAttribute( 'src' ),
89
- 'width' => 500,
90
- 'height' => 500,
91
- ));
92
- }
93
- }
94
- }
95
- return $this->render( array(
96
- 'images' => $urls,
97
- ) );
98
- }
99
-
100
- public function front_end($params) {
101
- require_once(BWG()->plugin_dir . '/framework/WDWLibraryEmbed.php');
102
- require_once(BWG()->plugin_dir . '/frontend/controllers/controller.php');
103
- $controller = new BWGControllerSite( ucfirst( $params[ 'gallery_type' ] ) );
104
- if ( WDWLibrary::get('shortcode_id', 0) || isset($params['ajax']) ) {
105
- $controller->execute($params, 1, WDWLibrary::get('bwg', 0));
106
- }
107
- else {
108
- $bwg = WDWLibrary::unique_number();
109
- $controller->execute($params, 1, $bwg);
110
- }
111
-
112
- return;
113
- }
114
- public function render( $args ) {
115
- global $redux_builder_amp,$carousel_markup_all;
116
- $this->did_convert_elements = true;
117
-
118
- $args = wp_parse_args( $args, array(
119
- 'images' => false,
120
- ) );
121
-
122
- if ( empty( $args['images'] ) ) {
123
- return '';
124
- }
125
-
126
- /*Filter*/
127
- $carousel_markup = $amp_image_lightbox = '';
128
-
129
- $carousel_markup_all = array(
130
- '1'=>array(
131
- 'main-html'=>'{{with_carousel}}
132
- {{amp_image_lightbox}}',
133
- 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
134
- 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
135
- 'gallery_css' => '',
136
-
137
- 'scripts' => array()
138
- ),
139
- '2' => array(
140
- 'main-html'=>'{{with_carousel}}
141
- {{with_carousel_thumbnail}}
142
- {{amp_image_lightbox}}',
143
- 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
144
- 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
145
- 'carousel_with_thumbnail_html'=>'<button on="tap:carousel-with-carousel-preview-{{unique_id}}.goToSlide(index={{unique_index}})" class="amp-carousel-slide amp-scrollable-carousel-slide">{{thumbnail}}</button>',
146
- 'gallery_css' => '
147
- .carousel-preview button{padding:0;}
148
- .carousel-preview amp-img{height:40px;width:60px;position:relative;}
149
- .carousel-preview {width: 100%;display: inline-block;text-align: center;margin: 20px 0px;}
150
- ',
151
- 'scripts' => array()
152
- ),
153
- '3' => array(
154
- 'main-html'=>'<div class="gal_w">{{with_images}}</div>
155
- {{amp_image_lightbox}}',
156
- 'image-with-caption-html'=>'',
157
- 'image-without-caption-html' =>'{{main_images}}',
158
- 'gallery_css' => '
159
- .gal_w{display:inline-block;width:100%}
160
- .gal_w amp-img{background:#f1f1f1;height:134px;width:150px;position: relative;float:left;margin:10px;}
161
- .cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}
162
- .cls-btn:after{content:"X";display:inline-block;color:#fff;font-size:20px;padding:20px;}
163
- ',
164
- 'scripts' => array()
165
- ),
166
- );
167
-
168
- $carousel_markup_all = apply_filters("ampforwp_manage_gallery_markup", $carousel_markup_all);
169
- //Default markup
170
- $markup = $carousel_markup_all[1];
171
-
172
- if( isset($redux_builder_amp['ampforwp-gallery-design-type']) && isset($carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type'] ] ) ){
173
- $markup = $carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type']];
174
- }
175
-
176
- $amp_images = array();
177
- foreach ( $args['images'] as $key => $image ) {
178
- $amp_img_arr = array(
179
- 'src' => $image['url'],
180
- 'width' => $image['width'],
181
- 'height' => $image['height'],
182
- 'layout' => 'fill',
183
- 'class' => 'amp-carousel-img',
184
- );
185
- if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
186
- $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
187
- 'tabindex'=>$key);
188
- $amp_img_arr = array_merge($amp_img_arr, $design3_additional_attr);
189
- $amp_image_lightbox = '<amp-image-lightbox id="gallery-lightbox" layout="nodisplay">
190
- <div on="tap:gallery-lightbox.close" role="button"
191
- tabindex="0">
192
- <button class="cls-btn" on="tap:gallery-lightbox.close"
193
- role="button" tabindex="0"></button>
194
- </div>
195
- </amp-image-lightbox>';
196
- }
197
- $amp_images[$key] = AMP_HTML_Utils::build_tag(
198
- 'amp-img',
199
- $amp_img_arr
200
- );
201
-
202
- //Small Thumbnail Images
203
- $thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
204
- if($thumb_url!=false){
205
- $smallimage = $thumb_url[0];
206
- $smallwidth = $thumb_url[1];
207
- $smallheight = $thumb_url[2];
208
- }else{
209
- $smallimage = $image['url'];
210
- $smallwidth = $image['width'];
211
- $smallheight = $image['height'];
212
- }
213
-
214
- $amp_images_small[$key] = AMP_HTML_Utils::build_tag(
215
- 'amp-img',
216
- array(
217
- 'src' => $smallimage,
218
- 'width' => $smallwidth,
219
- 'height' => $smallheight,
220
- 'layout' => 'fill',
221
- 'class' => 'amp-carousel-img',
222
- )
223
- );
224
-
225
- //Image markups loading
226
- $returnHtml = '';
227
- //Check if the attachment has caption or not
228
- if(isset($image['caption']) && $image['caption'] != '' && isset($markup['image-with-caption-html']) && $markup['image-with-caption-html'] != ''){
229
- // To enable the carousel magic
230
- $caption = $image['caption'];
231
- // Append the caption with image
232
- $returnHtml = isset($markup['image-with-caption-html'])? $markup['image-with-caption-html']:'';
233
- $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
234
- $returnHtml = str_replace('{{main_images_caption}}', wp_kses_data( $caption ), $returnHtml);
235
- // Replace the openbrack with [ and closebrack with ]
236
- $returnHtml = str_replace('{{openbrack}}', '[', $returnHtml);
237
- $returnHtml = str_replace('{{closebrack}}', ']', $returnHtml);
238
- }
239
- elseif( isset($markup['image-without-caption-html']) ){
240
- // If there is no caption
241
- $returnHtml = isset($markup['image-without-caption-html'])? $markup['image-without-caption-html'] :'';
242
- $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
243
- }
244
-
245
- $images[$key] = apply_filters('amp_gallery_images', $returnHtml, $image, $markup);
246
- }// foreach Closed
247
-
248
- //replacements
249
- $r = rand(1,100);
250
- $amp_carousel = AMP_HTML_Utils::build_tag(
251
- 'amp-carousel',
252
- array(
253
- 'width' => $this->args['width'],
254
- 'height' => $this->args['height'],
255
- 'type' => 'slides',
256
- 'layout' => 'responsive',
257
- 'class' => 'collapsible-captions',
258
- 'id' => 'carousel-with-carousel-preview-'.$r
259
- ),
260
- implode( PHP_EOL, $images ));
261
-
262
- $amp_carousel_with_thumbnail_nav = apply_filters('amp_thumbnail_images', $amp_images_small, $r, $markup);
263
- $amp_carousel_thumbnail ='';
264
- if(!empty($amp_carousel_with_thumbnail_nav)){
265
- $amp_carousel_thumbnail = AMP_HTML_Utils::build_tag(
266
- 'amp-carousel',
267
- array(
268
- 'width' => 'auto',
269
- 'height' => 48,
270
- 'type' => 'carousel',
271
- 'layout' => 'fixed-height',
272
- 'class' => 'carousel-preview'
273
- ),
274
- implode( PHP_EOL, $amp_carousel_with_thumbnail_nav ));
275
-
276
- }
277
- $amp_carousel_thumbnail = apply_filters('amp_gallery_markup', $amp_carousel_thumbnail);
278
-
279
- $returnCompleteHtml = $markup['main-html'];
280
- //last changes
281
- $returnCompleteHtml = str_replace('{{with_carousel}}', $amp_carousel, $returnCompleteHtml);
282
- $returnCompleteHtml = str_replace('{{with_carousel_thumbnail}}', $amp_carousel_thumbnail, $returnCompleteHtml);
283
- $returnCompleteHtml = str_replace('{{amp_image_lightbox}}', $amp_image_lightbox, $returnCompleteHtml);
284
- $returnCompleteHtml = str_replace('{{with_images}}', implode( PHP_EOL, $images ), $returnCompleteHtml);
285
- return $returnCompleteHtml;
286
- }
287
- }// Class closed
288
-
289
- // Add Caption in the Gallery Image
290
- add_filter('amp_gallery_images','AMPforWP\\AMPVendor\\ampforwp_new_gallery_images', 10, 3);
291
- function ampforwp_new_gallery_images($images_markup, $image, $markup_arr){
292
- add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_additional_gallery_style');
293
- add_filter('amp_post_template_data','ampforwp_carousel_bind_script');
294
- add_action('amp_post_template_css', 'ampforwp_additional_style_carousel_caption');
295
- return $images_markup;
296
- }
297
-
298
- if( ! function_exists( 'ampforwp_additional_gallery_style' ) ){
299
- function ampforwp_additional_gallery_style(){
300
- global $redux_builder_amp,$carousel_markup_all;
301
- $design_type = '';
302
- $design_type = $redux_builder_amp['ampforwp-gallery-design-type'];
303
-
304
- if(isset($design_type) && $design_type!==''){
305
- echo $carousel_markup_all[$design_type]['gallery_css'];
306
- }
307
- }
308
- }
309
-
310
- add_filter('amp_thumbnail_images','AMPforWP\\AMPVendor\\ampforwp_new_thumbnail_images',10,3);
311
- function ampforwp_new_thumbnail_images($amp_images, $uniqueid, $markup_arr){
312
- if(!isset($markup_arr['carousel_with_thumbnail_html'])){return '';}
313
- $amp_thumb_image_buttons = '';
314
- foreach ($amp_images as $key => $value) {
315
- $returnHtml = $markup_arr['carousel_with_thumbnail_html'];
316
- $returnHtml = str_replace('{{thumbnail}}', $value , $returnHtml);
317
- $returnHtml = str_replace('{{unique_id}}', $uniqueid , $returnHtml);
318
- $returnHtml = str_replace('{{unique_index}}', $key , $returnHtml);
319
- $amp_thumb_image_buttons[$key] = $returnHtml;
320
- }
321
- return $amp_thumb_image_buttons;
322
  }
1
+ <?php
2
+ /*
3
+ Most of the code is taken from class-amp-gallery-embed.php and Photo Gallery Plugin https://wordpress.org/plugins/photo-gallery/
4
+ */
5
+ require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );
6
+
7
+ class AMPforWP_Photo_Gallery_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
8
+ private static $script_slug = 'amp-carousel';
9
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
10
+
11
+ public function register_embed() {
12
+ add_shortcode( 'Best_Wordpress_Gallery', array( $this, 'shortcode' ) );
13
+ }
14
+
15
+ public function unregister_embed() {
16
+ remove_shortcode( 'Best_Wordpress_Gallery' );
17
+ }
18
+
19
+ public function get_scripts() {
20
+ if ( ! $this->did_convert_elements ) {
21
+ return array();
22
+ }
23
+
24
+ return array( self::$script_slug => self::$script_src );
25
+ }
26
+
27
+ public function shortcode( $args ) {
28
+
29
+ $params = array();
30
+ $params['id'] = WDWLibrary::get('shortcode_id', 0);
31
+ // Get values for elementor widget.
32
+ $params['gallery_type'] = WDWLibrary::get('gallery_type', 'thumbnails');
33
+ $params['gallery_id'] = WDWLibrary::get('gallery_id', 0);
34
+ $params['tag'] = WDWLibrary::get('tag', 0);
35
+ $params['album_id'] = WDWLibrary::get('album_id', 0);
36
+ $params['theme_id'] = WDWLibrary::get('theme_id', 0);
37
+ $params['ajax'] = TRUE;
38
+ if ( isset($params['id']) && $params['id'] ) {
39
+ global $wpdb;
40
+ $shortcode = $wpdb->get_var($wpdb->prepare("SELECT tagtext FROM " . $wpdb->prefix . "bwg_shortcode WHERE id='%d'", $params['id']));
41
+ if ($shortcode) {
42
+ $shortcode_params = explode('" ', $shortcode);
43
+ foreach ($shortcode_params as $shortcode_param) {
44
+ $shortcode_param = str_replace('"', '', $shortcode_param);
45
+ $shortcode_elem = explode('=', $shortcode_param);
46
+ $params[str_replace(' ', '', $shortcode_elem[0])] = $shortcode_elem[1];
47
+ }
48
+ }
49
+ else {
50
+ return;
51
+ }
52
+ }
53
+
54
+ // 'gallery_type' is the only parameter not being checked.
55
+ // Checking for incomplete shortcodes.
56
+ if ( isset($params['gallery_type']) ) {
57
+ $pairs = WDWLibrary::get_shortcode_option_params( $params );
58
+ if ( isset($params['ajax']) ) {
59
+ $pairs['ajax'] = $params['ajax'];
60
+ }
61
+ ob_start();
62
+ $this->front_end( $pairs );
63
+ $output = str_replace( array( "\r\n", "\n", "\r" ), '', ob_get_clean() );
64
+ $dom = '';
65
+ $nodes = '';
66
+ $num_nodes = '';
67
+ $urls = array();
68
+ if( !empty( $output ) ){
69
+ // Create a new document
70
+ $dom = new DOMDocument();
71
+ if( function_exists( 'mb_convert_encoding' ) ){
72
+ $output = mb_convert_encoding($output, 'HTML-ENTITIES', 'UTF-8');
73
+ }
74
+ else{
75
+ $output = preg_replace( '/&.*?;/', 'x', $output ); // multi-byte characters converted to X
76
+ }
77
+ // To Suppress Warnings
78
+ libxml_use_internal_errors(true);
79
+ $dom->loadHTML($output);
80
+ libxml_use_internal_errors(false);
81
+ // get all the img's
82
+ $nodes = $dom->getElementsByTagName( 'img' );
83
+ $num_nodes = $nodes->length;
84
+ for ( $i = $num_nodes - 1; $i >= 0; $i-- ) {
85
+ $url = $width = $height = '';
86
+ $node = $nodes->item( $i );
87
+ $urls[] = apply_filters('amp_photo_gallery_image_params', array(
88
+ 'url' => $node->getAttribute( 'src' ),
89
+ 'width' => 500,
90
+ 'height' => 500,
91
+ ));
92
+ }
93
+ }
94
+ }
95
+ return $this->render( array(
96
+ 'images' => $urls,
97
+ ) );
98
+ }
99
+
100
+ public function front_end($params) {
101
+ require_once(BWG()->plugin_dir . '/framework/WDWLibraryEmbed.php');
102
+ require_once(BWG()->plugin_dir . '/frontend/controllers/controller.php');
103
+ $controller = new BWGControllerSite( ucfirst( $params[ 'gallery_type' ] ) );
104
+ if ( WDWLibrary::get('shortcode_id', 0) || isset($params['ajax']) ) {
105
+ $controller->execute($params, 1, WDWLibrary::get('bwg', 0));
106
+ }
107
+ else {
108
+ $bwg = WDWLibrary::unique_number();
109
+ $controller->execute($params, 1, $bwg);
110
+ }
111
+
112
+ return;
113
+ }
114
+ public function render( $args ) {
115
+ global $redux_builder_amp,$carousel_markup_all;
116
+ $this->did_convert_elements = true;
117
+
118
+ $args = wp_parse_args( $args, array(
119
+ 'images' => false,
120
+ ) );
121
+
122
+ if ( empty( $args['images'] ) ) {
123
+ return '';
124
+ }
125
+
126
+ /*Filter*/
127
+ $carousel_markup = $amp_image_lightbox = '';
128
+
129
+ $carousel_markup_all = array(
130
+ '1'=>array(
131
+ 'main-html'=>'{{with_carousel}}
132
+ {{amp_image_lightbox}}',
133
+ 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
134
+ 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
135
+ 'gallery_css' => '',
136
+
137
+ 'scripts' => array()
138
+ ),
139
+ '2' => array(
140
+ 'main-html'=>'{{with_carousel}}
141
+ {{with_carousel_thumbnail}}
142
+ {{amp_image_lightbox}}',
143
+ 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
144
+ 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
145
+ 'carousel_with_thumbnail_html'=>'<button on="tap:carousel-with-carousel-preview-{{unique_id}}.goToSlide(index={{unique_index}})" class="amp-carousel-slide amp-scrollable-carousel-slide">{{thumbnail}}</button>',
146
+ 'gallery_css' => '
147
+ .carousel-preview button{padding:0;}
148
+ .carousel-preview amp-img{height:40px;width:60px;position:relative;}
149
+ .carousel-preview {width: 100%;display: inline-block;text-align: center;margin: 20px 0px;}
150
+ ',
151
+ 'scripts' => array()
152
+ ),
153
+ '3' => array(
154
+ 'main-html'=>'<div class="gal_w">{{with_images}}</div>
155
+ {{amp_image_lightbox}}',
156
+ 'image-with-caption-html'=>'',
157
+ 'image-without-caption-html' =>'{{main_images}}',
158
+ 'gallery_css' => '
159
+ .gal_w{display:inline-block;width:100%}
160
+ .gal_w amp-img{background:#f1f1f1;height:134px;width:150px;position: relative;float:left;margin:10px;}
161
+ .cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}
162
+ .cls-btn:after{content:"X";display:inline-block;color:#fff;font-size:20px;padding:20px;}
163
+ ',
164
+ 'scripts' => array()
165
+ ),
166
+ );
167
+
168
+ $carousel_markup_all = apply_filters("ampforwp_manage_gallery_markup", $carousel_markup_all);
169
+ //Default markup
170
+ $markup = $carousel_markup_all[1];
171
+
172
+ if( isset($redux_builder_amp['ampforwp-gallery-design-type']) && isset($carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type'] ] ) ){
173
+ $markup = $carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type']];
174
+ }
175
+
176
+ $amp_images = array();
177
+ foreach ( $args['images'] as $key => $image ) {
178
+ $amp_img_arr = array(
179
+ 'src' => $image['url'],
180
+ 'width' => $image['width'],
181
+ 'height' => $image['height'],
182
+ 'layout' => 'fill',
183
+ 'class' => 'amp-carousel-img',
184
+ );
185
+ if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
186
+ $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
187
+ 'tabindex'=>$key);
188
+ $amp_img_arr = array_merge($amp_img_arr, $design3_additional_attr);
189
+ $amp_image_lightbox = '<amp-image-lightbox id="gallery-lightbox" layout="nodisplay">
190
+ <div on="tap:gallery-lightbox.close" role="button"
191
+ tabindex="0">
192
+ <button class="cls-btn" on="tap:gallery-lightbox.close"
193
+ role="button" tabindex="0"></button>
194
+ </div>
195
+ </amp-image-lightbox>';
196
+ }
197
+ $amp_images[$key] = AMP_HTML_Utils::build_tag(
198
+ 'amp-img',
199
+ $amp_img_arr
200
+ );
201
+
202
+ //Small Thumbnail Images
203
+ $thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
204
+ if($thumb_url!=false){
205
+ $smallimage = $thumb_url[0];
206
+ $smallwidth = $thumb_url[1];
207
+ $smallheight = $thumb_url[2];
208
+ }else{
209
+ $smallimage = $image['url'];
210
+ $smallwidth = $image['width'];
211
+ $smallheight = $image['height'];
212
+ }
213
+
214
+ $amp_images_small[$key] = AMP_HTML_Utils::build_tag(
215
+ 'amp-img',
216
+ array(
217
+ 'src' => $smallimage,
218
+ 'width' => $smallwidth,
219
+ 'height' => $smallheight,
220
+ 'layout' => 'fill',
221
+ 'class' => 'amp-carousel-img',
222
+ )
223
+ );
224
+
225
+ //Image markups loading
226
+ $returnHtml = '';
227
+ //Check if the attachment has caption or not
228
+ if(isset($image['caption']) && $image['caption'] != '' && isset($markup['image-with-caption-html']) && $markup['image-with-caption-html'] != ''){
229
+ // To enable the carousel magic
230
+ $caption = $image['caption'];
231
+ // Append the caption with image
232
+ $returnHtml = isset($markup['image-with-caption-html'])? $markup['image-with-caption-html']:'';
233
+ $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
234
+ $returnHtml = str_replace('{{main_images_caption}}', wp_kses_data( $caption ), $returnHtml);
235
+ // Replace the openbrack with [ and closebrack with ]
236
+ $returnHtml = str_replace('{{openbrack}}', '[', $returnHtml);
237
+ $returnHtml = str_replace('{{closebrack}}', ']', $returnHtml);
238
+ }
239
+ elseif( isset($markup['image-without-caption-html']) ){
240
+ // If there is no caption
241
+ $returnHtml = isset($markup['image-without-caption-html'])? $markup['image-without-caption-html'] :'';
242
+ $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
243
+ }
244
+
245
+ $images[$key] = apply_filters('amp_gallery_images', $returnHtml, $image, $markup);
246
+ }// foreach Closed
247
+
248
+ //replacements
249
+ $r = rand(1,100);
250
+ $amp_carousel = AMP_HTML_Utils::build_tag(
251
+ 'amp-carousel',
252
+ array(
253
+ 'width' => $this->args['width'],
254
+ 'height' => $this->args['height'],
255
+ 'type' => 'slides',
256
+ 'layout' => 'responsive',
257
+ 'class' => 'collapsible-captions',
258
+ 'id' => 'carousel-with-carousel-preview-'.$r
259
+ ),
260
+ implode( PHP_EOL, $images ));
261
+
262
+ $amp_carousel_with_thumbnail_nav = apply_filters('amp_thumbnail_images', $amp_images_small, $r, $markup);
263
+ $amp_carousel_thumbnail ='';
264
+ if(!empty($amp_carousel_with_thumbnail_nav)){
265
+ $amp_carousel_thumbnail = AMP_HTML_Utils::build_tag(
266
+ 'amp-carousel',
267
+ array(
268
+ 'width' => 'auto',
269
+ 'height' => 48,
270
+ 'type' => 'carousel',
271
+ 'layout' => 'fixed-height',
272
+ 'class' => 'carousel-preview'
273
+ ),
274
+ implode( PHP_EOL, $amp_carousel_with_thumbnail_nav ));
275
+
276
+ }
277
+ $amp_carousel_thumbnail = apply_filters('amp_gallery_markup', $amp_carousel_thumbnail);
278
+
279
+ $returnCompleteHtml = $markup['main-html'];
280
+ //last changes
281
+ $returnCompleteHtml = str_replace('{{with_carousel}}', $amp_carousel, $returnCompleteHtml);
282
+ $returnCompleteHtml = str_replace('{{with_carousel_thumbnail}}', $amp_carousel_thumbnail, $returnCompleteHtml);
283
+ $returnCompleteHtml = str_replace('{{amp_image_lightbox}}', $amp_image_lightbox, $returnCompleteHtml);
284
+ $returnCompleteHtml = str_replace('{{with_images}}', implode( PHP_EOL, $images ), $returnCompleteHtml);
285
+ return $returnCompleteHtml;
286
+ }
287
+ }// Class closed
288
+
289
+ // Add Caption in the Gallery Image
290
+ add_filter('amp_gallery_images','AMPforWP\\AMPVendor\\ampforwp_new_gallery_images', 10, 3);
291
+ function ampforwp_new_gallery_images($images_markup, $image, $markup_arr){
292
+ add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_additional_gallery_style');
293
+ add_filter('amp_post_template_data','ampforwp_carousel_bind_script');
294
+ add_action('amp_post_template_css', 'ampforwp_additional_style_carousel_caption');
295
+ return $images_markup;
296
+ }
297
+
298
+ if( ! function_exists( 'ampforwp_additional_gallery_style' ) ){
299
+ function ampforwp_additional_gallery_style(){
300
+ global $redux_builder_amp,$carousel_markup_all;
301
+ $design_type = '';
302
+ $design_type = $redux_builder_amp['ampforwp-gallery-design-type'];
303
+
304
+ if(isset($design_type) && $design_type!==''){
305
+ echo $carousel_markup_all[$design_type]['gallery_css'];
306
+ }
307
+ }
308
+ }
309
+
310
+ add_filter('amp_thumbnail_images','AMPforWP\\AMPVendor\\ampforwp_new_thumbnail_images',10,3);
311
+ function ampforwp_new_thumbnail_images($amp_images, $uniqueid, $markup_arr){
312
+ if(!isset($markup_arr['carousel_with_thumbnail_html'])){return '';}
313
+ $amp_thumb_image_buttons = '';
314
+ foreach ($amp_images as $key => $value) {
315
+ $returnHtml = $markup_arr['carousel_with_thumbnail_html'];
316
+ $returnHtml = str_replace('{{thumbnail}}', $value , $returnHtml);
317
+ $returnHtml = str_replace('{{unique_id}}', $uniqueid , $returnHtml);
318
+ $returnHtml = str_replace('{{unique_index}}', $key , $returnHtml);
319
+ $amp_thumb_image_buttons[$key] = $returnHtml;
320
+ }
321
+ return $amp_thumb_image_buttons;
322
  }
classes/class-ampforwp-rev-slider.php CHANGED
@@ -1,341 +1,341 @@
1
- <?php
2
-
3
- /*
4
- Most of the code is taken from class-amp-gallery-embed.php and Slider Revolution https://revolution.themepunch.com/
5
- */
6
- require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );
7
-
8
- class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
9
- private static $script_slug = 'amp-carousel';
10
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
11
-
12
- public function register_embed() {
13
- add_shortcode( 'rev_slider', array( $this, 'shortcode' ) );
14
- }
15
-
16
- public function unregister_embed() {
17
- remove_shortcode( 'rev_slider' );
18
- }
19
-
20
- public function get_scripts() {
21
- if ( ! $this->did_convert_elements ) {
22
- return array();
23
- }
24
-
25
- return array( self::$script_slug => self::$script_src );
26
- }
27
-
28
- public function shortcode( $args, $mid_content = null ) {
29
- extract(shortcode_atts(array('alias' => ''), $args, 'rev_slider'));
30
- extract(shortcode_atts(array('settings' => ''), $args, 'rev_slider'));
31
- extract(shortcode_atts(array('order' => ''), $args, 'rev_slider'));
32
-
33
- if($settings !== '') $settings = json_decode(str_replace(array('({', '})', "'"), array('[', ']', '"'), $settings) ,true);
34
- if($order !== '') $order = explode(',', $order);
35
-
36
- $sliderAlias = ($alias != '') ? $alias : RevSliderFunctions::getVal($args,0);
37
-
38
- $gal_ids = RevSliderFunctionsWP::check_for_shortcodes($mid_content);
39
- ob_start();
40
- if(!empty($gal_ids)){ //add a gallery based slider
41
- $slider = RevSliderOutput::putSlider($sliderAlias, '', $gal_ids);
42
- }else{
43
- $slider = RevSliderOutput::putSlider($sliderAlias, '', array(), $settings, $order);
44
- }
45
- $content = ob_get_contents();
46
- ob_clean();
47
- ob_end_clean();
48
- $ids = array();
49
- $slides = $slider->getSlidesForOutput(true,'',$gal_ids);
50
- foreach ($slides as $slide) {
51
- $ids[] = $slide->getImageID();
52
-
53
- }
54
- $attr['ids'] = implode(',', $ids);
55
-
56
- if ( ! empty( $attr['ids'] ) ) {
57
- // 'ids' is explicitly ordered, unless you specify otherwise.
58
- if ( empty( $attr['orderby'] ) ) {
59
- $attr['orderby'] = 'post__in';
60
- }
61
- $attr['include'] = $attr['ids'];
62
- }
63
-
64
- $atts = shortcode_atts( array(
65
- 'order' => 'ASC',
66
- 'orderby' => 'menu_order ID',
67
- 'id' => $post ? $post->ID : 0,
68
- 'include' => '',
69
- 'exclude' => '',
70
- //'size' => array( $this->args['width'], $this->args['height'] ),
71
- //'size' => isset($attr['size'])? $attr['size']:'thumbnail',
72
- 'size' => 'large'
73
- ), $attr, 'gallery' );
74
-
75
- $id = intval( $atts['id'] );
76
-
77
- if ( ! empty( $atts['include'] ) ) {
78
- $attachments = get_posts( array(
79
- 'include' => $atts['include'],
80
- 'post_status' => 'inherit',
81
- 'post_type' => 'attachment',
82
- 'post_mime_type' => 'image',
83
- 'order' => $atts['order'],
84
- 'orderby' => $atts['orderby'],
85
- 'fields' => 'ids',
86
- ) );
87
- } elseif ( ! empty( $atts['exclude'] ) ) {
88
- $attachments = get_children( array(
89
- 'post_parent' => $id,
90
- 'exclude' => $atts['exclude'],
91
- 'post_status' => 'inherit',
92
- 'post_type' => 'attachment',
93
- 'post_mime_type' => 'image',
94
- 'order' => $atts['order'],
95
- 'orderby' => $atts['orderby'],
96
- 'fields' => 'ids',
97
- ) );
98
- } else {
99
- $attachments = get_children( array(
100
- 'post_parent' => $id,
101
- 'post_status' => 'inherit',
102
- 'post_type' => 'attachment',
103
- 'post_mime_type' => 'image',
104
- 'order' => $atts['order'],
105
- 'orderby' => $atts['orderby'],
106
- 'fields' => 'ids',
107
- ) );
108
- }
109
-
110
- if ( empty( $attachments ) ) {
111
- return '';
112
- }
113
-
114
- $urls = array();
115
- foreach ( $attachments as $attachment_id ) {
116
- list( $url, $width, $height ) = wp_get_attachment_image_src( $attachment_id, $atts['size'], true );
117
-
118
- if ( ! $url ) {
119
- continue;
120
- }
121
-
122
- $urls[] = apply_filters('amp_gallery_image_params', array(
123
- 'url' => $url,
124
- 'width' => $width,
125
- 'height' => $height,
126
- ),$attachment_id);
127
- }
128
- return $this->render( array(
129
- 'images' => $urls,
130
- ) );
131
- }
132
-
133
- public function render( $args ) {
134
- global $redux_builder_amp,$carousel_markup_all;
135
- $this->did_convert_elements = true;
136
-
137
- $args = wp_parse_args( $args, array(
138
- 'images' => false,
139
- ) );
140
-
141
- if ( empty( $args['images'] ) ) {
142
- return '';
143
- }
144
-
145
- /*Filter*/
146
- $carousel_markup = $amp_image_lightbox = '';
147
-
148
- $carousel_markup_all = array(
149
- '1'=>array(
150
- 'main-html'=>'{{with_carousel}}
151
- {{amp_image_lightbox}}',
152
- 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
153
- 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
154
- 'gallery_css' => '',
155
-
156
- 'scripts' => array()
157
- ),
158
- '2' => array(
159
- 'main-html'=>'{{with_carousel}}
160
- {{with_carousel_thumbnail}}
161
- {{amp_image_lightbox}}',
162
- 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
163
- 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
164
- 'carousel_with_thumbnail_html'=>'<button on="tap:carousel-with-carousel-preview-{{unique_id}}.goToSlide(index={{unique_index}})" class="amp-carousel-slide amp-scrollable-carousel-slide">{{thumbnail}}</button>',
165
- 'gallery_css' => '
166
- .carousel-preview button{padding:0;}
167
- .carousel-preview amp-img{height:40px;width:60px;position:relative;}
168
- .carousel-preview {width: 100%;display: inline-block;text-align: center;margin: 20px 0px;}
169
- ',
170
- 'scripts' => array()
171
- ),
172
- '3' => array(
173
- 'main-html'=>'<div class="gal_w">{{with_images}}</div>
174
- {{amp_image_lightbox}}',
175
- 'image-with-caption-html'=>'',
176
- 'image-without-caption-html' =>'{{main_images}}',
177
- 'gallery_css' => '
178
- .gal_w{display:inline-block;width:100%}
179
- .gal_w amp-img{background:#f1f1f1;height:134px;width:150px;position: relative;float:left;margin:10px;}
180
- .cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}
181
- .cls-btn:after{content:"X";display:inline-block;color:#fff;font-size:20px;padding:20px;}
182
- ',
183
- 'scripts' => array()
184
- ),
185
- );
186
-
187
- $carousel_markup_all = apply_filters("ampforwp_manage_gallery_markup", $carousel_markup_all);
188
- //Default markup
189
- $markup = $carousel_markup_all[1];
190
-
191
- if( isset($redux_builder_amp['ampforwp-gallery-design-type']) && isset($carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type'] ] ) ){
192
- $markup = $carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type']];
193
- }
194
-
195
- $amp_images = array();
196
- foreach ( $args['images'] as $key => $image ) {
197
- $amp_img_arr = array(
198
- 'src' => $image['url'],
199
- 'width' => $image['width'],
200
- 'height' => $image['height'],
201
- 'layout' => 'fill',
202
- 'class' => 'amp-carousel-img',
203
- );
204
- if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
205
- $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
206
- 'tabindex'=>$key);
207
- $amp_img_arr = array_merge($amp_img_arr, $design3_additional_attr);
208
- $amp_image_lightbox = '<amp-image-lightbox id="gallery-lightbox" layout="nodisplay">
209
- <div on="tap:gallery-lightbox.close" role="button"
210
- tabindex="0">
211
- <button class="cls-btn" on="tap:gallery-lightbox.close"
212
- role="button" tabindex="0"></button>
213
- </div>
214
- </amp-image-lightbox>';
215
- }
216
- $amp_images[$key] = AMP_HTML_Utils::build_tag(
217
- 'amp-img',
218
- $amp_img_arr
219
- );
220
-
221
- //Small Thumbnail Images
222
- $thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
223
- if($thumb_url!=false){
224
- $smallimage = $thumb_url[0];
225
- $smallwidth = $thumb_url[1];
226
- $smallheight = $thumb_url[2];
227
- }else{
228
- $smallimage = $image['url'];
229
- $smallwidth = $image['width'];
230
- $smallheight = $image['height'];
231
- }
232
-
233
- $amp_images_small[$key] = AMP_HTML_Utils::build_tag(
234
- 'amp-img',
235
- array(
236
- 'src' => $smallimage,
237
- 'width' => $smallwidth,
238
- 'height' => $smallheight,
239
- 'layout' => 'fill',
240
- 'class' => 'amp-carousel-img',
241
- )
242
- );
243
-
244
- //Image markups loading
245
- $returnHtml = '';
246
- //Check if the attachment has caption or not
247
- if(isset($image['caption']) && $image['caption'] != '' && isset($markup['image-with-caption-html']) && $markup['image-with-caption-html'] != ''){
248
- // To enable the carousel magic
249
- $caption = $image['caption'];
250
- // Append the caption with image
251
- $returnHtml = isset($markup['image-with-caption-html'])? $markup['image-with-caption-html']:'';
252
- $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
253
- $returnHtml = str_replace('{{main_images_caption}}', wp_kses_data( $caption ), $returnHtml);
254
- // Replace the openbrack with [ and closebrack with ]
255
- $returnHtml = str_replace('{{openbrack}}', '[', $returnHtml);
256
- $returnHtml = str_replace('{{closebrack}}', ']', $returnHtml);
257
- }
258
- elseif( isset($markup['image-without-caption-html']) ){
259
- // If there is no caption
260
- $returnHtml = isset($markup['image-without-caption-html'])? $markup['image-without-caption-html'] :'';
261
- $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
262
- }
263
-
264
- $images[$key] = apply_filters('amp_gallery_images', $returnHtml, $image, $markup);
265
- }// foreach Closed
266
-
267
- //replacements
268
- $r = rand(1,100);
269
- $amp_carousel = AMP_HTML_Utils::build_tag(
270
- 'amp-carousel',
271
- array(
272
- 'width' => $this->args['width'],
273
- 'height' => $this->args['height'],
274
- 'type' => 'slides',
275
- 'layout' => 'responsive',
276
- 'class' => 'collapsible-captions',
277
- 'id' => 'carousel-with-carousel-preview-'.$r
278
- ),
279
- implode( PHP_EOL, $images ));
280
-
281
- $amp_carousel_with_thumbnail_nav = apply_filters('amp_thumbnail_images', $amp_images_small, $r, $markup);
282
- $amp_carousel_thumbnail ='';
283
- if(!empty($amp_carousel_with_thumbnail_nav)){
284
- $amp_carousel_thumbnail = AMP_HTML_Utils::build_tag(
285
- 'amp-carousel',
286
- array(
287
- 'width' => 'auto',
288
- 'height' => 48,
289
- 'type' => 'carousel',
290
- 'layout' => 'fixed-height',
291
- 'class' => 'carousel-preview'
292
- ),
293
- implode( PHP_EOL, $amp_carousel_with_thumbnail_nav ));
294
-
295
- }
296
- $amp_carousel_thumbnail = apply_filters('amp_gallery_markup', $amp_carousel_thumbnail);
297
-
298
- $returnCompleteHtml = $markup['main-html'];
299
- //last changes
300
- $returnCompleteHtml = str_replace('{{with_carousel}}', $amp_carousel, $returnCompleteHtml);
301
- $returnCompleteHtml = str_replace('{{with_carousel_thumbnail}}', $amp_carousel_thumbnail, $returnCompleteHtml);
302
- $returnCompleteHtml = str_replace('{{amp_image_lightbox}}', $amp_image_lightbox, $returnCompleteHtml);
303
- $returnCompleteHtml = str_replace('{{with_images}}', implode( PHP_EOL, $images ), $returnCompleteHtml);
304
- return $returnCompleteHtml;
305
- }
306
- }// Class closed
307
-
308
- // Add Caption in the Gallery Image
309
- add_filter('amp_gallery_images','AMPforWP\\AMPVendor\\ampforwp_new_gallery_images', 10, 3);
310
- function ampforwp_new_gallery_images($images_markup, $image, $markup_arr){
311
- add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_additional_gallery_style');
312
- add_filter('amp_post_template_data','ampforwp_carousel_bind_script');
313
- add_action('amp_post_template_css', 'ampforwp_additional_style_carousel_caption');
314
- return $images_markup;
315
- }
316
-
317
- if( ! function_exists( 'ampforwp_additional_gallery_style' ) ){
318
- function ampforwp_additional_gallery_style(){
319
- global $redux_builder_amp,$carousel_markup_all;
320
- $design_type = '';
321
- $design_type = $redux_builder_amp['ampforwp-gallery-design-type'];
322
-
323
- if(isset($design_type) && $design_type!==''){
324
- echo $carousel_markup_all[$design_type]['gallery_css'];
325
- }
326
- }
327
- }
328
-
329
- add_filter('amp_thumbnail_images','AMPforWP\\AMPVendor\\ampforwp_new_thumbnail_images',10,3);
330
- function ampforwp_new_thumbnail_images($amp_images, $uniqueid, $markup_arr){
331
- if(!isset($markup_arr['carousel_with_thumbnail_html'])){return '';}
332
- $amp_thumb_image_buttons = '';
333
- foreach ($amp_images as $key => $value) {
334
- $returnHtml = $markup_arr['carousel_with_thumbnail_html'];
335
- $returnHtml = str_replace('{{thumbnail}}', $value , $returnHtml);
336
- $returnHtml = str_replace('{{unique_id}}', $uniqueid , $returnHtml);
337
- $returnHtml = str_replace('{{unique_index}}', $key , $returnHtml);
338
- $amp_thumb_image_buttons[$key] = $returnHtml;
339
- }
340
- return $amp_thumb_image_buttons;
341
  }
1
+ <?php
2
+
3
+ /*
4
+ Most of the code is taken from class-amp-gallery-embed.php and Slider Revolution https://revolution.themepunch.com/
5
+ */
6
+ require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );
7
+
8
+ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
9
+ private static $script_slug = 'amp-carousel';
10
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
11
+
12
+ public function register_embed() {
13
+ add_shortcode( 'rev_slider', array( $this, 'shortcode' ) );
14
+ }
15
+
16
+ public function unregister_embed() {
17
+ remove_shortcode( 'rev_slider' );
18
+ }
19
+
20
+ public function get_scripts() {
21
+ if ( ! $this->did_convert_elements ) {
22
+ return array();
23
+ }
24
+
25
+ return array( self::$script_slug => self::$script_src );
26
+ }
27
+
28
+ public function shortcode( $args, $mid_content = null ) {
29
+ extract(shortcode_atts(array('alias' => ''), $args, 'rev_slider'));
30
+ extract(shortcode_atts(array('settings' => ''), $args, 'rev_slider'));
31
+ extract(shortcode_atts(array('order' => ''), $args, 'rev_slider'));
32
+
33
+ if($settings !== '') $settings = json_decode(str_replace(array('({', '})', "'"), array('[', ']', '"'), $settings) ,true);
34
+ if($order !== '') $order = explode(',', $order);
35
+
36
+ $sliderAlias = ($alias != '') ? $alias : RevSliderFunctions::getVal($args,0);
37
+
38
+ $gal_ids = RevSliderFunctionsWP::check_for_shortcodes($mid_content);
39
+ ob_start();
40
+ if(!empty($gal_ids)){ //add a gallery based slider
41
+ $slider = RevSliderOutput::putSlider($sliderAlias, '', $gal_ids);
42
+ }else{
43
+ $slider = RevSliderOutput::putSlider($sliderAlias, '', array(), $settings, $order);
44
+ }
45
+ $content = ob_get_contents();
46
+ ob_clean();
47
+ ob_end_clean();
48
+ $ids = array();
49
+ $slides = $slider->getSlidesForOutput(true,'',$gal_ids);
50
+ foreach ($slides as $slide) {
51
+ $ids[] = $slide->getImageID();
52
+
53
+ }
54
+ $attr['ids'] = implode(',', $ids);
55
+
56
+ if ( ! empty( $attr['ids'] ) ) {
57
+ // 'ids' is explicitly ordered, unless you specify otherwise.
58
+ if ( empty( $attr['orderby'] ) ) {
59
+ $attr['orderby'] = 'post__in';
60
+ }
61
+ $attr['include'] = $attr['ids'];
62
+ }
63
+
64
+ $atts = shortcode_atts( array(
65
+ 'order' => 'ASC',
66
+ 'orderby' => 'menu_order ID',
67
+ 'id' => $post ? $post->ID : 0,
68
+ 'include' => '',
69
+ 'exclude' => '',
70
+ //'size' => array( $this->args['width'], $this->args['height'] ),
71
+ //'size' => isset($attr['size'])? $attr['size']:'thumbnail',
72
+ 'size' => 'large'
73
+ ), $attr, 'gallery' );
74
+
75
+ $id = intval( $atts['id'] );
76
+
77
+ if ( ! empty( $atts['include'] ) ) {
78
+ $attachments = get_posts( array(
79
+ 'include' => $atts['include'],
80
+ 'post_status' => 'inherit',
81
+ 'post_type' => 'attachment',
82
+ 'post_mime_type' => 'image',
83
+ 'order' => $atts['order'],
84
+ 'orderby' => $atts['orderby'],
85
+ 'fields' => 'ids',
86
+ ) );
87
+ } elseif ( ! empty( $atts['exclude'] ) ) {
88
+ $attachments = get_children( array(
89
+ 'post_parent' => $id,
90
+ 'exclude' => $atts['exclude'],
91
+ 'post_status' => 'inherit',
92
+ 'post_type' => 'attachment',
93
+ 'post_mime_type' => 'image',
94
+ 'order' => $atts['order'],
95
+ 'orderby' => $atts['orderby'],
96
+ 'fields' => 'ids',
97
+ ) );
98
+ } else {
99
+ $attachments = get_children( array(
100
+ 'post_parent' => $id,
101
+ 'post_status' => 'inherit',
102
+ 'post_type' => 'attachment',
103
+ 'post_mime_type' => 'image',
104
+ 'order' => $atts['order'],
105
+ 'orderby' => $atts['orderby'],
106
+ 'fields' => 'ids',
107
+ ) );
108
+ }
109
+
110
+ if ( empty( $attachments ) ) {
111
+ return '';
112
+ }
113
+
114
+ $urls = array();
115
+ foreach ( $attachments as $attachment_id ) {
116
+ list( $url, $width, $height ) = wp_get_attachment_image_src( $attachment_id, $atts['size'], true );
117
+
118
+ if ( ! $url ) {
119
+ continue;
120
+ }
121
+
122
+ $urls[] = apply_filters('amp_gallery_image_params', array(
123
+ 'url' => $url,
124
+ 'width' => $width,
125
+ 'height' => $height,
126
+ ),$attachment_id);
127
+ }
128
+ return $this->render( array(
129
+ 'images' => $urls,
130
+ ) );
131
+ }
132
+
133
+ public function render( $args ) {
134
+ global $redux_builder_amp,$carousel_markup_all;
135
+ $this->did_convert_elements = true;
136
+
137
+ $args = wp_parse_args( $args, array(
138
+ 'images' => false,
139
+ ) );
140
+
141
+ if ( empty( $args['images'] ) ) {
142
+ return '';
143
+ }
144
+
145
+ /*Filter*/
146
+ $carousel_markup = $amp_image_lightbox = '';
147
+
148
+ $carousel_markup_all = array(
149
+ '1'=>array(
150
+ 'main-html'=>'{{with_carousel}}
151
+ {{amp_image_lightbox}}',
152
+ 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
153
+ 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
154
+ 'gallery_css' => '',
155
+
156
+ 'scripts' => array()
157
+ ),
158
+ '2' => array(
159
+ 'main-html'=>'{{with_carousel}}
160
+ {{with_carousel_thumbnail}}
161
+ {{amp_image_lightbox}}',
162
+ 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
163
+ 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
164
+ 'carousel_with_thumbnail_html'=>'<button on="tap:carousel-with-carousel-preview-{{unique_id}}.goToSlide(index={{unique_index}})" class="amp-carousel-slide amp-scrollable-carousel-slide">{{thumbnail}}</button>',
165
+ 'gallery_css' => '
166
+ .carousel-preview button{padding:0;}
167
+ .carousel-preview amp-img{height:40px;width:60px;position:relative;}
168
+ .carousel-preview {width: 100%;display: inline-block;text-align: center;margin: 20px 0px;}
169
+ ',
170
+ 'scripts' => array()
171
+ ),
172
+ '3' => array(
173
+ 'main-html'=>'<div class="gal_w">{{with_images}}</div>
174
+ {{amp_image_lightbox}}',
175
+ 'image-with-caption-html'=>'',
176
+ 'image-without-caption-html' =>'{{main_images}}',
177
+ 'gallery_css' => '
178
+ .gal_w{display:inline-block;width:100%}
179
+ .gal_w amp-img{background:#f1f1f1;height:134px;width:150px;position: relative;float:left;margin:10px;}
180
+ .cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}
181
+ .cls-btn:after{content:"X";display:inline-block;color:#fff;font-size:20px;padding:20px;}
182
+ ',
183
+ 'scripts' => array()
184
+ ),
185
+ );
186
+
187
+ $carousel_markup_all = apply_filters("ampforwp_manage_gallery_markup", $carousel_markup_all);
188
+ //Default markup
189
+ $markup = $carousel_markup_all[1];
190
+
191
+ if( isset($redux_builder_amp['ampforwp-gallery-design-type']) && isset($carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type'] ] ) ){
192
+ $markup = $carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type']];
193
+ }
194
+
195
+ $amp_images = array();
196
+ foreach ( $args['images'] as $key => $image ) {
197
+ $amp_img_arr = array(
198
+ 'src' => $image['url'],
199
+ 'width' => $image['width'],
200
+ 'height' => $image['height'],
201
+ 'layout' => 'fill',
202
+ 'class' => 'amp-carousel-img',
203
+ );
204
+ if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
205
+ $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
206
+ 'tabindex'=>$key);
207
+ $amp_img_arr = array_merge($amp_img_arr, $design3_additional_attr);
208
+ $amp_image_lightbox = '<amp-image-lightbox id="gallery-lightbox" layout="nodisplay">
209
+ <div on="tap:gallery-lightbox.close" role="button"
210
+ tabindex="0">
211
+ <button class="cls-btn" on="tap:gallery-lightbox.close"
212
+ role="button" tabindex="0"></button>
213
+ </div>
214
+ </amp-image-lightbox>';
215
+ }
216
+ $amp_images[$key] = AMP_HTML_Utils::build_tag(
217
+ 'amp-img',
218
+ $amp_img_arr
219
+ );
220
+
221
+ //Small Thumbnail Images
222
+ $thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
223
+ if($thumb_url!=false){
224
+ $smallimage = $thumb_url[0];
225
+ $smallwidth = $thumb_url[1];
226
+ $smallheight = $thumb_url[2];
227
+ }else{
228
+ $smallimage = $image['url'];
229
+ $smallwidth = $image['width'];
230
+ $smallheight = $image['height'];
231
+ }
232
+
233
+ $amp_images_small[$key] = AMP_HTML_Utils::build_tag(
234
+ 'amp-img',
235
+ array(
236
+ 'src' => $smallimage,
237
+ 'width' => $smallwidth,
238
+ 'height' => $smallheight,
239
+ 'layout' => 'fill',
240
+ 'class' => 'amp-carousel-img',
241
+ )
242
+ );
243
+
244
+ //Image markups loading
245
+ $returnHtml = '';
246
+ //Check if the attachment has caption or not
247
+ if(isset($image['caption']) && $image['caption'] != '' && isset($markup['image-with-caption-html']) && $markup['image-with-caption-html'] != ''){
248
+ // To enable the carousel magic
249
+ $caption = $image['caption'];
250
+ // Append the caption with image
251
+ $returnHtml = isset($markup['image-with-caption-html'])? $markup['image-with-caption-html']:'';
252
+ $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
253
+ $returnHtml = str_replace('{{main_images_caption}}', wp_kses_data( $caption ), $returnHtml);
254
+ // Replace the openbrack with [ and closebrack with ]
255
+ $returnHtml = str_replace('{{openbrack}}', '[', $returnHtml);
256
+ $returnHtml = str_replace('{{closebrack}}', ']', $returnHtml);
257
+ }
258
+ elseif( isset($markup['image-without-caption-html']) ){
259
+ // If there is no caption
260
+ $returnHtml = isset($markup['image-without-caption-html'])? $markup['image-without-caption-html'] :'';
261
+ $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
262
+ }
263
+
264
+ $images[$key] = apply_filters('amp_gallery_images', $returnHtml, $image, $markup);
265
+ }// foreach Closed
266
+
267
+ //replacements
268
+ $r = rand(1,100);
269
+ $amp_carousel = AMP_HTML_Utils::build_tag(
270
+ 'amp-carousel',
271
+ array(
272
+ 'width' => $this->args['width'],
273
+ 'height' => $this->args['height'],
274
+ 'type' => 'slides',
275
+ 'layout' => 'responsive',
276
+ 'class' => 'collapsible-captions',
277
+ 'id' => 'carousel-with-carousel-preview-'.$r
278
+ ),
279
+ implode( PHP_EOL, $images ));
280
+
281
+ $amp_carousel_with_thumbnail_nav = apply_filters('amp_thumbnail_images', $amp_images_small, $r, $markup);
282
+ $amp_carousel_thumbnail ='';
283
+ if(!empty($amp_carousel_with_thumbnail_nav)){
284
+ $amp_carousel_thumbnail = AMP_HTML_Utils::build_tag(
285
+ 'amp-carousel',
286
+ array(
287
+ 'width' => 'auto',
288
+ 'height' => 48,
289
+ 'type' => 'carousel',
290
+ 'layout' => 'fixed-height',
291
+ 'class' => 'carousel-preview'
292
+ ),
293
+ implode( PHP_EOL, $amp_carousel_with_thumbnail_nav ));
294
+
295
+ }
296
+ $amp_carousel_thumbnail = apply_filters('amp_gallery_markup', $amp_carousel_thumbnail);
297
+
298
+ $returnCompleteHtml = $markup['main-html'];
299
+ //last changes
300
+ $returnCompleteHtml = str_replace('{{with_carousel}}', $amp_carousel, $returnCompleteHtml);
301
+ $returnCompleteHtml = str_replace('{{with_carousel_thumbnail}}', $amp_carousel_thumbnail, $returnCompleteHtml);
302
+ $returnCompleteHtml = str_replace('{{amp_image_lightbox}}', $amp_image_lightbox, $returnCompleteHtml);
303
+ $returnCompleteHtml = str_replace('{{with_images}}', implode( PHP_EOL, $images ), $returnCompleteHtml);
304
+ return $returnCompleteHtml;
305
+ }
306
+ }// Class closed
307
+
308
+ // Add Caption in the Gallery Image
309
+ add_filter('amp_gallery_images','AMPforWP\\AMPVendor\\ampforwp_new_gallery_images', 10, 3);
310
+ function ampforwp_new_gallery_images($images_markup, $image, $markup_arr){
311
+ add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_additional_gallery_style');
312
+ add_filter('amp_post_template_data','ampforwp_carousel_bind_script');
313
+ add_action('amp_post_template_css', 'ampforwp_additional_style_carousel_caption');
314
+ return $images_markup;
315
+ }
316
+
317
+ if( ! function_exists( 'ampforwp_additional_gallery_style' ) ){
318
+ function ampforwp_additional_gallery_style(){
319
+ global $redux_builder_amp,$carousel_markup_all;
320
+ $design_type = '';
321
+ $design_type = $redux_builder_amp['ampforwp-gallery-design-type'];
322
+
323
+ if(isset($design_type) && $design_type!==''){
324
+ echo $carousel_markup_all[$design_type]['gallery_css'];
325
+ }
326
+ }
327
+ }
328
+
329
+ add_filter('amp_thumbnail_images','AMPforWP\\AMPVendor\\ampforwp_new_thumbnail_images',10,3);
330
+ function ampforwp_new_thumbnail_images($amp_images, $uniqueid, $markup_arr){
331
+ if(!isset($markup_arr['carousel_with_thumbnail_html'])){return '';}
332
+ $amp_thumb_image_buttons = '';
333
+ foreach ($amp_images as $key => $value) {
334
+ $returnHtml = $markup_arr['carousel_with_thumbnail_html'];
335
+ $returnHtml = str_replace('{{thumbnail}}', $value , $returnHtml);
336
+ $returnHtml = str_replace('{{unique_id}}', $uniqueid , $returnHtml);
337
+ $returnHtml = str_replace('{{unique_index}}', $key , $returnHtml);
338
+ $amp_thumb_image_buttons[$key] = $returnHtml;
339
+ }
340
+ return $amp_thumb_image_buttons;
341
  }
classes/class-ampforwp-slide-anything-embed.php CHANGED
@@ -1,323 +1,323 @@
1
- <?php
2
- require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );
3
-
4
- class AMPFORWP_Slide_Anything_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
5
- private static $script_slug = 'amp-carousel';
6
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
7
-
8
- public function register_embed() {
9
- add_shortcode( 'slide-anything', array( $this, 'shortcode' ) );
10
- }
11
-
12
- public function unregister_embed() {
13
- remove_shortcode( 'slide-anything' );
14
- }
15
-
16
- public function get_scripts() {
17
- if ( ! $this->did_convert_elements ) {
18
- return array();
19
- }
20
-
21
- return array( self::$script_slug => self::$script_src );
22
- }
23
-
24
- public function shortcode( $attr ) {
25
- $post = get_post();
26
- if ( ! empty( $attr['ids'] ) ) {
27
- // 'ids' is explicitly ordered, unless you specify otherwise.
28
- if ( empty( $attr['orderby'] ) ) {
29
- $attr['orderby'] = 'post__in';
30
- }
31
- $attr['include'] = $attr['ids'];
32
- }
33
-
34
- $atts = shortcode_atts( array(
35
- 'order' => 'ASC',
36
- 'orderby' => 'menu_order ID',
37
- 'id' => $post ? $post->ID : 0,
38
- 'include' => '',
39
- 'exclude' => '',
40
- //'size' => array( $this->args['width'], $this->args['height'] ),
41
- //'size' => isset($attr['size'])? $attr['size']:'thumbnail',
42
- 'size' => 'large'
43
- ), $attr, 'slide-anything' );
44
-
45
- $id = intval( $atts['id'] );
46
- $post_status = get_post_status($id);
47
- if ($post_status == 'publish') {
48
- $metadata = get_metadata('post', $id);
49
- }
50
-
51
- $slide_data = $attachments = array();
52
- $slide_data['num_slides'] = $metadata['sa_num_slides'][0];
53
- $slide_data['shortcodes'] = $metadata['sa_shortcodes'][0];
54
- if ($slide_data['shortcodes'] == '1') {
55
- $slide_data['shortcodes'] = 'true';
56
- } else {
57
- $slide_data['shortcodes'] = 'false';
58
- }
59
- $slide_data['css_id'] = $metadata['sa_css_id'][0];
60
- for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
61
- $slide_data["slide".$i."_num"] = $i;
62
- // apply 'the_content' filter to slide content to process any shortcodes
63
- if ($slide_data['shortcodes'] == 'true') {
64
- $slide_data["slide".$i."_content"] = do_shortcode($metadata["sa_slide".$i."_content"][0]);
65
- } else {
66
- $slide_data["slide".$i."_content"] = $metadata["sa_slide".$i."_content"][0];
67
- }
68
- $slide_image_data = '';
69
- if (isset($metadata["sa_slide".$i."_image_data"])) {
70
- $slide_image_data = $metadata["sa_slide".$i."_image_data"][0];
71
- }
72
- if (isset($slide_image_data) && ($slide_image_data != '')) {
73
- $data_arr = explode("~", $slide_image_data);
74
- $slide_data["slide".$i."_image_id"] = $data_arr[0];
75
- $slide_data["slide".$i."_image_pos"] = $data_arr[1];
76
- $slide_data["slide".$i."_image_size"] = $data_arr[2];
77
- $slide_data["slide".$i."_image_repeat"] = $data_arr[3];
78
- $slide_data["slide".$i."_image_color"] = $data_arr[4];
79
- } else {
80
- $slide_data["slide".$i."_image_id"] = $metadata["sa_slide".$i."_image_id"][0];
81
- $slide_data["slide".$i."_image_pos"] = $metadata["sa_slide".$i."_image_pos"][0];
82
- $slide_data["slide".$i."_image_size"] = $metadata["sa_slide".$i."_image_size"][0];
83
- $slide_data["slide".$i."_image_repeat"] = $metadata["sa_slide".$i."_image_repeat"][0];
84
- $slide_data["slide".$i."_image_color"] = $metadata["sa_slide".$i."_image_color"][0];
85
- }
86
- $slide_data["slide".$i."_link_url"] = $metadata["sa_slide".$i."_link_url"][0];
87
- $slide_data["slide".$i."_link_target"] = $metadata["sa_slide".$i."_link_target"][0];
88
- if ($slide_data["slide".$i."_link_target"] == '') {
89
- $slide_data["slide".$i."_link_target"] = '_self';
90
- }
91
- $attachments[] = $slide_data["slide".$i."_image_id"];
92
- }
93
-
94
- if ( empty( $attachments ) ) {
95
- return '';
96
- }
97
-
98
- $urls = array();
99
- foreach ( $attachments as $attachment_id ) {
100
- list( $url, $width, $height ) = wp_get_attachment_image_src( $attachment_id, $atts['size'], true );
101
-
102
- if ( ! $url ) {
103
- continue;
104
- }
105
-
106
- $urls[] = apply_filters('amp_gallery_image_params', array(
107
- 'url' => $url,
108
- 'width' => $width,
109
- 'height' => $height,
110
- ),$attachment_id);
111
- }
112
- return $this->render( array(
113
- 'images' => $urls,
114
- ) );
115
- }
116
-
117
- public function render( $args ) {
118
- global $redux_builder_amp,$carousel_markup_all;
119
- $this->did_convert_elements = true;
120
-
121
- $args = wp_parse_args( $args, array(
122
- 'images' => false,
123
- ) );
124
-
125
- if ( empty( $args['images'] ) ) {
126
- return '';
127
- }
128
-
129
- /*Filter*/
130
- $carousel_markup = $amp_image_lightbox = '';
131
-
132
- $carousel_markup_all = array(
133
- '1'=>array(
134
- 'main-html'=>'{{with_carousel}}
135
- {{amp_image_lightbox}}',
136
- 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
137
- 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
138
- 'gallery_css' => '',
139
-
140
- 'scripts' => array()
141
- ),
142
- '2' => array(
143
- 'main-html'=>'{{with_carousel}}
144
- {{with_carousel_thumbnail}}
145
- {{amp_image_lightbox}}',
146
- 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
147
- 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
148
- 'carousel_with_thumbnail_html'=>'<button on="tap:carousel-with-carousel-preview-{{unique_id}}.goToSlide(index={{unique_index}})" class="amp-carousel-slide amp-scrollable-carousel-slide">{{thumbnail}}</button>',
149
- 'gallery_css' => '
150
- .carousel-preview button{padding:0;}
151
- .carousel-preview amp-img{height:40px;width:60px;position:relative;}
152
- .carousel-preview {width: 100%;display: inline-block;text-align: center;margin: 20px 0px;}
153
- ',
154
- 'scripts' => array()
155
- ),
156
- '3' => array(
157
- 'main-html'=>'<div class="gal_w">{{with_images}}</div>
158
- {{amp_image_lightbox}}',
159
- 'image-with-caption-html'=>'',
160
- 'image-without-caption-html' =>'{{main_images}}',
161
- 'gallery_css' => '
162
- .gal_w{display:inline-block;width:100%}
163
- .gal_w amp-img{background:#f1f1f1;height:134px;width:150px;position: relative;float:left;margin:10px;}
164
- .cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}
165
- .cls-btn:after{content:"X";display:inline-block;color:#fff;font-size:20px;padding:20px;}
166
- ',
167
- 'scripts' => array()
168
- ),
169
- );
170
-
171
- $carousel_markup_all = apply_filters("ampforwp_manage_gallery_markup", $carousel_markup_all);
172
- //Default markup
173
- $markup = $carousel_markup_all[1];
174
- if( isset($redux_builder_amp['ampforwp-gallery-design-type']) && isset($carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type'] ] ) ){
175
- $markup = $carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type']];
176
- }
177
-
178
- $amp_images = array();
179
- foreach ( $args['images'] as $key => $image ) {
180
- $amp_img_arr = array(
181
- 'src' => $image['url'],
182
- 'width' => $image['width'],
183
- 'height' => $image['height'],
184
- 'layout' => 'fill',
185
- 'class' => 'amp-carousel-img',
186
- );
187
- if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
188
- $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
189
- 'tabindex'=>$key);
190
- $amp_img_arr = array_merge($amp_img_arr, $design3_additional_attr);
191
- $amp_image_lightbox = '<amp-image-lightbox id="gallery-lightbox" layout="nodisplay">
192
- <div on="tap:gallery-lightbox.close" role="button"
193
- tabindex="0">
194
- <button class="cls-btn" on="tap:gallery-lightbox.close"
195
- role="button" tabindex="0"></button>
196
- </div>
197
- </amp-image-lightbox>';
198
- }
199
- $amp_images[$key] = AMP_HTML_Utils::build_tag(
200
- 'amp-img',
201
- $amp_img_arr
202
- );
203
-
204
- //Small Thumbnail Images
205
- $thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
206
- if($thumb_url!=false){
207
- $smallimage = $thumb_url[0];
208
- $smallwidth = $thumb_url[1];
209
- $smallheight = $thumb_url[2];
210
- }else{
211
- $smallimage = $image['url'];
212
- $smallwidth = $image['width'];
213
- $smallheight = $image['height'];
214
- }
215
-
216
- $amp_images_small[$key] = AMP_HTML_Utils::build_tag(
217
- 'amp-img',
218
- array(
219
- 'src' => $smallimage,
220
- 'width' => $smallwidth,
221
- 'height' => $smallheight,
222
- 'layout' => 'fill',
223
- 'class' => 'amp-carousel-img',
224
- )
225
- );
226
-
227
- //Image markups loading
228
- $returnHtml = '';
229
- //Check if the attachment has caption or not
230
- if(isset($image['caption']) && $image['caption'] != '' && isset($markup['image-with-caption-html']) && $markup['image-with-caption-html'] != ''){
231
- // To enable the carousel magic
232
- $caption = $image['caption'];
233
- // Append the caption with image
234
- $returnHtml = isset($markup['image-with-caption-html'])? $markup['image-with-caption-html']:'';
235
- $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
236
- $returnHtml = str_replace('{{main_images_caption}}', wp_kses_data( $caption ), $returnHtml);
237
- // Replace the openbrack with [ and closebrack with ]
238
- $returnHtml = str_replace('{{openbrack}}', '[', $returnHtml);
239
- $returnHtml = str_replace('{{closebrack}}', ']', $returnHtml);
240
- }
241
- elseif( isset($markup['image-without-caption-html']) ){
242
- // If there is no caption
243
- $returnHtml = isset($markup['image-without-caption-html'])? $markup['image-without-caption-html'] :'';
244
- $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
245
- }
246
-
247
- $images[$key] = apply_filters('amp_gallery_images', $returnHtml, $image, $markup);
248
- }// foreach Closed
249
-
250
- //replacements
251
- $r = rand(1,100);
252
- $amp_carousel = AMP_HTML_Utils::build_tag(
253
- 'amp-carousel',
254
- array(
255
- 'width' => $this->args['width'],
256
- 'height' => $this->args['height'],
257
- 'type' => 'slides',
258
- 'layout' => 'responsive',
259
- 'class' => 'collapsible-captions',
260
- 'id' => 'carousel-with-carousel-preview-'.$r
261
- ),
262
- implode( PHP_EOL, $images ));
263
-
264
- $amp_carousel_with_thumbnail_nav = apply_filters('amp_thumbnail_images', $amp_images_small, $r, $markup);
265
- $amp_carousel_thumbnail ='';
266
- if(!empty($amp_carousel_with_thumbnail_nav)){
267
- $amp_carousel_thumbnail = AMP_HTML_Utils::build_tag(
268
- 'amp-carousel',
269
- array(
270
- 'width' => 'auto',
271
- 'height' => 48,
272
- 'type' => 'carousel',
273
- 'layout' => 'fixed-height',
274
- 'class' => 'carousel-preview'
275
- ),
276
- implode( PHP_EOL, $amp_carousel_with_thumbnail_nav ));
277
-
278
- }
279
- $amp_carousel_thumbnail = apply_filters('amp_gallery_markup', $amp_carousel_thumbnail);
280
- $returnCompleteHtml = $markup['main-html'];
281
- //last changes
282
- $returnCompleteHtml = str_replace('{{with_carousel}}', $amp_carousel, $returnCompleteHtml);
283
- $returnCompleteHtml = str_replace('{{with_carousel_thumbnail}}', $amp_carousel_thumbnail, $returnCompleteHtml);
284
- $returnCompleteHtml = str_replace('{{amp_image_lightbox}}', $amp_image_lightbox, $returnCompleteHtml);
285
- $returnCompleteHtml = str_replace('{{with_images}}', implode( PHP_EOL, $images ), $returnCompleteHtml);
286
- return $returnCompleteHtml;
287
- }
288
- }// Class closed
289
-
290
- // Add Caption in the Gallery Image
291
- add_filter('amp_gallery_images','AMPforWP\\AMPVendor\\ampforwp_new_gallery_images', 10, 3);
292
- function ampforwp_new_gallery_images($images_markup, $image, $markup_arr){
293
- add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_additional_gallery_style');
294
- add_filter('amp_post_template_data','ampforwp_carousel_bind_script');
295
- add_action('amp_post_template_css', 'ampforwp_additional_style_carousel_caption');
296
- return $images_markup;
297
- }
298
-
299
- if( ! function_exists( 'ampforwp_additional_gallery_style' ) ){
300
- function ampforwp_additional_gallery_style(){
301
- global $redux_builder_amp,$carousel_markup_all;
302
- $design_type = '';
303
- $design_type = $redux_builder_amp['ampforwp-gallery-design-type'];
304
-
305
- if(isset($design_type) && $design_type!==''){
306
- echo $carousel_markup_all[$design_type]['gallery_css'];
307
- }
308
- }
309
- }
310
-
311
- add_filter('amp_thumbnail_images','AMPforWP\\AMPVendor\\ampforwp_new_thumbnail_images',10,3);
312
- function ampforwp_new_thumbnail_images($amp_images, $uniqueid, $markup_arr){
313
- if(!isset($markup_arr['carousel_with_thumbnail_html'])){return '';}
314
- $amp_thumb_image_buttons = '';
315
- foreach ($amp_images as $key => $value) {
316
- $returnHtml = $markup_arr['carousel_with_thumbnail_html'];
317
- $returnHtml = str_replace('{{thumbnail}}', $value , $returnHtml);
318
- $returnHtml = str_replace('{{unique_id}}', $uniqueid , $returnHtml);
319
- $returnHtml = str_replace('{{unique_index}}', $key , $returnHtml);
320
- $amp_thumb_image_buttons[$key] = $returnHtml;
321
- }
322
- return $amp_thumb_image_buttons;
323
  }
1
+ <?php
2
+ require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );
3
+
4
+ class AMPFORWP_Slide_Anything_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
5
+ private static $script_slug = 'amp-carousel';
6
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
7
+
8
+ public function register_embed() {
9
+ add_shortcode( 'slide-anything', array( $this, 'shortcode' ) );
10
+ }
11
+
12
+ public function unregister_embed() {
13
+ remove_shortcode( 'slide-anything' );
14
+ }
15
+
16
+ public function get_scripts() {
17
+ if ( ! $this->did_convert_elements ) {
18
+ return array();
19
+ }
20
+
21
+ return array( self::$script_slug => self::$script_src );
22
+ }
23
+
24
+ public function shortcode( $attr ) {
25
+ $post = get_post();
26
+ if ( ! empty( $attr['ids'] ) ) {
27
+ // 'ids' is explicitly ordered, unless you specify otherwise.
28
+ if ( empty( $attr['orderby'] ) ) {
29
+ $attr['orderby'] = 'post__in';
30
+ }
31
+ $attr['include'] = $attr['ids'];
32
+ }
33
+
34
+ $atts = shortcode_atts( array(
35
+ 'order' => 'ASC',
36
+ 'orderby' => 'menu_order ID',
37
+ 'id' => $post ? $post->ID : 0,
38
+ 'include' => '',
39
+ 'exclude' => '',
40
+ //'size' => array( $this->args['width'], $this->args['height'] ),
41
+ //'size' => isset($attr['size'])? $attr['size']:'thumbnail',
42
+ 'size' => 'large'
43
+ ), $attr, 'slide-anything' );
44
+
45
+ $id = intval( $atts['id'] );
46
+ $post_status = get_post_status($id);
47
+ if ($post_status == 'publish') {
48
+ $metadata = get_metadata('post', $id);
49
+ }
50
+
51
+ $slide_data = $attachments = array();
52
+ $slide_data['num_slides'] = $metadata['sa_num_slides'][0];
53
+ $slide_data['shortcodes'] = $metadata['sa_shortcodes'][0];
54
+ if ($slide_data['shortcodes'] == '1') {
55
+ $slide_data['shortcodes'] = 'true';
56
+ } else {
57
+ $slide_data['shortcodes'] = 'false';
58
+ }
59
+ $slide_data['css_id'] = $metadata['sa_css_id'][0];
60
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
61
+ $slide_data["slide".$i."_num"] = $i;
62
+ // apply 'the_content' filter to slide content to process any shortcodes
63
+ if ($slide_data['shortcodes'] == 'true') {
64
+ $slide_data["slide".$i."_content"] = do_shortcode($metadata["sa_slide".$i."_content"][0]);
65
+ } else {
66
+ $slide_data["slide".$i."_content"] = $metadata["sa_slide".$i."_content"][0];
67
+ }
68
+ $slide_image_data = '';
69
+ if (isset($metadata["sa_slide".$i."_image_data"])) {
70
+ $slide_image_data = $metadata["sa_slide".$i."_image_data"][0];
71
+ }
72
+ if (isset($slide_image_data) && ($slide_image_data != '')) {
73
+ $data_arr = explode("~", $slide_image_data);
74
+ $slide_data["slide".$i."_image_id"] = $data_arr[0];
75
+ $slide_data["slide".$i."_image_pos"] = $data_arr[1];
76
+ $slide_data["slide".$i."_image_size"] = $data_arr[2];
77
+ $slide_data["slide".$i."_image_repeat"] = $data_arr[3];
78
+ $slide_data["slide".$i."_image_color"] = $data_arr[4];
79
+ } else {
80
+ $slide_data["slide".$i."_image_id"] = $metadata["sa_slide".$i."_image_id"][0];
81
+ $slide_data["slide".$i."_image_pos"] = $metadata["sa_slide".$i."_image_pos"][0];
82
+ $slide_data["slide".$i."_image_size"] = $metadata["sa_slide".$i."_image_size"][0];
83
+ $slide_data["slide".$i."_image_repeat"] = $metadata["sa_slide".$i."_image_repeat"][0];
84
+ $slide_data["slide".$i."_image_color"] = $metadata["sa_slide".$i."_image_color"][0];
85
+ }
86
+ $slide_data["slide".$i."_link_url"] = $metadata["sa_slide".$i."_link_url"][0];
87
+ $slide_data["slide".$i."_link_target"] = $metadata["sa_slide".$i."_link_target"][0];
88
+ if ($slide_data["slide".$i."_link_target"] == '') {
89
+ $slide_data["slide".$i."_link_target"] = '_self';
90
+ }
91
+ $attachments[] = $slide_data["slide".$i."_image_id"];
92
+ }
93
+
94
+ if ( empty( $attachments ) ) {
95
+ return '';
96
+ }
97
+
98
+ $urls = array();
99
+ foreach ( $attachments as $attachment_id ) {
100
+ list( $url, $width, $height ) = wp_get_attachment_image_src( $attachment_id, $atts['size'], true );
101
+
102
+ if ( ! $url ) {
103
+ continue;
104
+ }
105
+
106
+ $urls[] = apply_filters('amp_gallery_image_params', array(
107
+ 'url' => $url,
108
+ 'width' => $width,
109
+ 'height' => $height,
110
+ ),$attachment_id);
111
+ }
112
+ return $this->render( array(
113
+ 'images' => $urls,
114
+ ) );
115
+ }
116
+
117
+ public function render( $args ) {
118
+ global $redux_builder_amp,$carousel_markup_all;
119
+ $this->did_convert_elements = true;
120
+
121
+ $args = wp_parse_args( $args, array(
122
+ 'images' => false,
123
+ ) );
124
+
125
+ if ( empty( $args['images'] ) ) {
126
+ return '';
127
+ }
128
+
129
+ /*Filter*/
130
+ $carousel_markup = $amp_image_lightbox = '';
131
+
132
+ $carousel_markup_all = array(
133
+ '1'=>array(
134
+ 'main-html'=>'{{with_carousel}}
135
+ {{amp_image_lightbox}}',
136
+ 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
137
+ 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
138
+ 'gallery_css' => '',
139
+
140
+ 'scripts' => array()
141
+ ),
142
+ '2' => array(
143
+ 'main-html'=>'{{with_carousel}}
144
+ {{with_carousel_thumbnail}}
145
+ {{amp_image_lightbox}}',
146
+ 'image-with-caption-html'=>'<figure><div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div><figcaption {{openbrack}}class{{closebrack}}="expanded? \'expanded\' : \'\'" on="tap:AMP.setState({expanded: !expanded})" tabindex="0" role="button" >{{main_images_caption}}<span {{openbrack}}text{{closebrack}}="expanded ? \'less\' : \'more\'">more</span> </figcaption></figure>',
147
+ 'image-without-caption-html' =>'<div class="ampforwp-gallery-item amp-carousel-container">{{main_images}} </div>',
148
+ 'carousel_with_thumbnail_html'=>'<button on="tap:carousel-with-carousel-preview-{{unique_id}}.goToSlide(index={{unique_index}})" class="amp-carousel-slide amp-scrollable-carousel-slide">{{thumbnail}}</button>',
149
+ 'gallery_css' => '
150
+ .carousel-preview button{padding:0;}
151
+ .carousel-preview amp-img{height:40px;width:60px;position:relative;}
152
+ .carousel-preview {width: 100%;display: inline-block;text-align: center;margin: 20px 0px;}
153
+ ',
154
+ 'scripts' => array()
155
+ ),
156
+ '3' => array(
157
+ 'main-html'=>'<div class="gal_w">{{with_images}}</div>
158
+ {{amp_image_lightbox}}',
159
+ 'image-with-caption-html'=>'',
160
+ 'image-without-caption-html' =>'{{main_images}}',
161
+ 'gallery_css' => '
162
+ .gal_w{display:inline-block;width:100%}
163
+ .gal_w amp-img{background:#f1f1f1;height:134px;width:150px;position: relative;float:left;margin:10px;}
164
+ .cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}
165
+ .cls-btn:after{content:"X";display:inline-block;color:#fff;font-size:20px;padding:20px;}
166
+ ',
167
+ 'scripts' => array()
168
+ ),
169
+ );
170
+
171
+ $carousel_markup_all = apply_filters("ampforwp_manage_gallery_markup", $carousel_markup_all);
172
+ //Default markup
173
+ $markup = $carousel_markup_all[1];
174
+ if( isset($redux_builder_amp['ampforwp-gallery-design-type']) && isset($carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type'] ] ) ){
175
+ $markup = $carousel_markup_all[$redux_builder_amp['ampforwp-gallery-design-type']];
176
+ }
177
+
178
+ $amp_images = array();
179
+ foreach ( $args['images'] as $key => $image ) {
180
+ $amp_img_arr = array(
181
+ 'src' => $image['url'],
182
+ 'width' => $image['width'],
183
+ 'height' => $image['height'],
184
+ 'layout' => 'fill',
185
+ 'class' => 'amp-carousel-img',
186
+ );
187
+ if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
188
+ $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
189
+ 'tabindex'=>$key);
190
+ $amp_img_arr = array_merge($amp_img_arr, $design3_additional_attr);
191
+ $amp_image_lightbox = '<amp-image-lightbox id="gallery-lightbox" layout="nodisplay">
192
+ <div on="tap:gallery-lightbox.close" role="button"
193
+ tabindex="0">
194
+ <button class="cls-btn" on="tap:gallery-lightbox.close"
195
+ role="button" tabindex="0"></button>
196
+ </div>
197
+ </amp-image-lightbox>';
198
+ }
199
+ $amp_images[$key] = AMP_HTML_Utils::build_tag(
200
+ 'amp-img',
201
+ $amp_img_arr
202
+ );
203
+
204
+ //Small Thumbnail Images
205
+ $thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
206
+ if($thumb_url!=false){
207
+ $smallimage = $thumb_url[0];
208
+ $smallwidth = $thumb_url[1];
209
+ $smallheight = $thumb_url[2];
210
+ }else{
211
+ $smallimage = $image['url'];
212
+ $smallwidth = $image['width'];
213
+ $smallheight = $image['height'];
214
+ }
215
+
216
+ $amp_images_small[$key] = AMP_HTML_Utils::build_tag(
217
+ 'amp-img',
218
+ array(
219
+ 'src' => $smallimage,
220
+ 'width' => $smallwidth,
221
+ 'height' => $smallheight,
222
+ 'layout' => 'fill',
223
+ 'class' => 'amp-carousel-img',
224
+ )
225
+ );
226
+
227
+ //Image markups loading
228
+ $returnHtml = '';
229
+ //Check if the attachment has caption or not
230
+ if(isset($image['caption']) && $image['caption'] != '' && isset($markup['image-with-caption-html']) && $markup['image-with-caption-html'] != ''){
231
+ // To enable the carousel magic
232
+ $caption = $image['caption'];
233
+ // Append the caption with image
234
+ $returnHtml = isset($markup['image-with-caption-html'])? $markup['image-with-caption-html']:'';
235
+ $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
236
+ $returnHtml = str_replace('{{main_images_caption}}', wp_kses_data( $caption ), $returnHtml);
237
+ // Replace the openbrack with [ and closebrack with ]
238
+ $returnHtml = str_replace('{{openbrack}}', '[', $returnHtml);
239
+ $returnHtml = str_replace('{{closebrack}}', ']', $returnHtml);
240
+ }
241
+ elseif( isset($markup['image-without-caption-html']) ){
242
+ // If there is no caption
243
+ $returnHtml = isset($markup['image-without-caption-html'])? $markup['image-without-caption-html'] :'';
244
+ $returnHtml = str_replace('{{main_images}}', $amp_images[$key] , $returnHtml);
245
+ }
246
+
247
+ $images[$key] = apply_filters('amp_gallery_images', $returnHtml, $image, $markup);
248
+ }// foreach Closed
249
+
250
+ //replacements
251
+ $r = rand(1,100);
252
+ $amp_carousel = AMP_HTML_Utils::build_tag(
253
+ 'amp-carousel',
254
+ array(
255
+ 'width' => $this->args['width'],
256
+ 'height' => $this->args['height'],
257
+ 'type' => 'slides',
258
+ 'layout' => 'responsive',
259
+ 'class' => 'collapsible-captions',
260
+ 'id' => 'carousel-with-carousel-preview-'.$r
261
+ ),
262
+ implode( PHP_EOL, $images ));
263
+
264
+ $amp_carousel_with_thumbnail_nav = apply_filters('amp_thumbnail_images', $amp_images_small, $r, $markup);
265
+ $amp_carousel_thumbnail ='';
266
+ if(!empty($amp_carousel_with_thumbnail_nav)){
267
+ $amp_carousel_thumbnail = AMP_HTML_Utils::build_tag(
268
+ 'amp-carousel',
269
+ array(
270
+ 'width' => 'auto',
271
+ 'height' => 48,
272
+ 'type' => 'carousel',
273
+ 'layout' => 'fixed-height',
274
+ 'class' => 'carousel-preview'
275
+ ),
276
+ implode( PHP_EOL, $amp_carousel_with_thumbnail_nav ));
277
+
278
+ }
279
+ $amp_carousel_thumbnail = apply_filters('amp_gallery_markup', $amp_carousel_thumbnail);
280
+ $returnCompleteHtml = $markup['main-html'];
281
+ //last changes
282
+ $returnCompleteHtml = str_replace('{{with_carousel}}', $amp_carousel, $returnCompleteHtml);
283
+ $returnCompleteHtml = str_replace('{{with_carousel_thumbnail}}', $amp_carousel_thumbnail, $returnCompleteHtml);
284
+ $returnCompleteHtml = str_replace('{{amp_image_lightbox}}', $amp_image_lightbox, $returnCompleteHtml);
285
+ $returnCompleteHtml = str_replace('{{with_images}}', implode( PHP_EOL, $images ), $returnCompleteHtml);
286
+ return $returnCompleteHtml;
287
+ }
288
+ }// Class closed
289
+
290
+ // Add Caption in the Gallery Image
291
+ add_filter('amp_gallery_images','AMPforWP\\AMPVendor\\ampforwp_new_gallery_images', 10, 3);
292
+ function ampforwp_new_gallery_images($images_markup, $image, $markup_arr){
293
+ add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_additional_gallery_style');
294
+ add_filter('amp_post_template_data','ampforwp_carousel_bind_script');
295
+ add_action('amp_post_template_css', 'ampforwp_additional_style_carousel_caption');
296
+ return $images_markup;
297
+ }
298
+
299
+ if( ! function_exists( 'ampforwp_additional_gallery_style' ) ){
300
+ function ampforwp_additional_gallery_style(){
301
+ global $redux_builder_amp,$carousel_markup_all;
302
+ $design_type = '';
303
+ $design_type = $redux_builder_amp['ampforwp-gallery-design-type'];
304
+
305
+ if(isset($design_type) && $design_type!==''){
306
+ echo $carousel_markup_all[$design_type]['gallery_css'];
307
+ }
308
+ }
309
+ }
310
+
311
+ add_filter('amp_thumbnail_images','AMPforWP\\AMPVendor\\ampforwp_new_thumbnail_images',10,3);
312
+ function ampforwp_new_thumbnail_images($amp_images, $uniqueid, $markup_arr){
313
+ if(!isset($markup_arr['carousel_with_thumbnail_html'])){return '';}
314
+ $amp_thumb_image_buttons = '';
315
+ foreach ($amp_images as $key => $value) {
316
+ $returnHtml = $markup_arr['carousel_with_thumbnail_html'];
317
+ $returnHtml = str_replace('{{thumbnail}}', $value , $returnHtml);
318
+ $returnHtml = str_replace('{{unique_id}}', $uniqueid , $returnHtml);
319
+ $returnHtml = str_replace('{{unique_index}}', $key , $returnHtml);
320
+ $amp_thumb_image_buttons[$key] = $returnHtml;
321
+ }
322
+ return $amp_thumb_image_buttons;
323
  }
classes/class-ampforwp-walker-nav-menu.php CHANGED
@@ -1,85 +1,85 @@
1
- <?php
2
- // Exit if accessed directly
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
-
7
- /*Sidebar Nav menu Walker Start*/
8
- class Ampforwp_Walker_Nav_Menu extends Walker_Nav_Menu {
9
-
10
- function start_lvl(&$output, $depth=0, $args = array(), $has_children = 0) {
11
- static $column = 1;
12
- $indent = str_repeat("\t", $depth);
13
- //$output .= "\n$indent<ul class=\"sub-menu\">\n";
14
-
15
- // Change sub-menu to dropdown menu
16
- if ($depth > 0 && $has_children > 0 )
17
- {
18
- $column += 1;
19
- $output .= "\n$indent<input type=\"checkbox\" id=\"drop-$column\"><label for=\"drop-$column\" class=\"toggle\"></label><ul class=\"sub-menu\">\n";
20
- }else{
21
- $column += 1;
22
- $output .= "\n$indent<input type=\"checkbox\" id=\"drop-$column\"><label for=\"drop-$column\" class=\"toggle\"></label><ul class=\"sub-menu\">\n";
23
-
24
- }
25
- }
26
-
27
- function start_el ( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
28
- // Most of this code is copied from original Walker_Nav_Menu
29
- global $wp_query, $wpdb;
30
- $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
31
-
32
- $class_names = $value = '';
33
-
34
- $classes = empty( $item->classes ) ? array() : (array) $item->classes;
35
- $classes[] = 'menu-item-' . $item->ID;
36
-
37
- $class_names = join( ' ', apply_filters( 'ampforwp_nav_menu_css_class', array_filter( $classes ), $item, $args ) );
38
- $class_names = ' class="' . esc_attr( $class_names ) . '"';
39
-
40
- $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
41
- $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : '';
42
-
43
- $has_children = $wpdb->get_var($wpdb->prepare("SELECT COUNT(meta_id)
44
- FROM {$wpdb->prefix}postmeta
45
- WHERE meta_key='_menu_item_menu_item_parent'
46
- AND meta_value='%d'", $item->ID) );
47
-
48
- $output .= $indent . '<li' . $id . $value . $class_names .'>';
49
-
50
- $atts = array();
51
- $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : '';
52
- $atts['target'] = ! empty( $item->target ) ? $item->target : '';
53
- $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
54
- $atts['href'] = ! empty( $item->url ) ? $item->url : '';
55
- $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args, $depth );
56
-
57
- $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $atts['title'] ) .'"' : '';
58
- $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $atts['target'] ) .'"' : '';
59
- $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $atts['rel'] ) .'"' : '';
60
- $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $atts['href'] ) .'"' : '';
61
-
62
- // Check if menu item is in main menu
63
- if ( $depth == 0 && $has_children > 0 ) {
64
- // These lines adds your custom class and attribute
65
- $attributes .= ' class="dropdown-toggle"';
66
- $attributes .= ' data-toggle="dropdown"';
67
- }
68
-
69
- $item_output = isset($args->before) ? $args->before : 1;
70
-
71
- $item_output .= '<a'. $attributes .'>';
72
- $item_output .= (isset($args->link_before) ? $args->link_before : 1 ). apply_filters( 'the_title', $item->title, $item->ID ) . (isset($args->link_after) ? $args->link_after : 1 );
73
- $item_output .= '</a>';
74
-
75
- // Add the caret if menu level is 0
76
- if ( $has_children > 0 ) {
77
- //$item_output .= '<label for="drop-"'.$depth.' class="toggle">+</label>';
78
- }
79
- $item_output .= isset($args->after) ? $args->after : 1;
80
-
81
- $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
82
- }
83
-
84
- }
85
  /*Sidebar Nav menu Walker end*/
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /*Sidebar Nav menu Walker Start*/
8
+ class Ampforwp_Walker_Nav_Menu extends Walker_Nav_Menu {
9
+
10
+ function start_lvl(&$output, $depth=0, $args = array(), $has_children = 0) {
11
+ static $column = 1;
12
+ $indent = str_repeat("\t", $depth);
13
+ //$output .= "\n$indent<ul class=\"sub-menu\">\n";
14
+
15
+ // Change sub-menu to dropdown menu
16
+ if ($depth > 0 && $has_children > 0 )
17
+ {
18
+ $column += 1;
19
+ $output .= "\n$indent<input type=\"checkbox\" id=\"drop-$column\"><label for=\"drop-$column\" class=\"toggle\"></label><ul class=\"sub-menu\">\n";
20
+ }else{
21
+ $column += 1;
22
+ $output .= "\n$indent<input type=\"checkbox\" id=\"drop-$column\"><label for=\"drop-$column\" class=\"toggle\"></label><ul class=\"sub-menu\">\n";
23
+
24
+ }
25
+ }
26
+
27
+ function start_el ( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
28
+ // Most of this code is copied from original Walker_Nav_Menu
29
+ global $wp_query, $wpdb;
30
+ $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
31
+
32
+ $class_names = $value = '';
33
+
34
+ $classes = empty( $item->classes ) ? array() : (array) $item->classes;
35
+ $classes[] = 'menu-item-' . $item->ID;
36
+
37
+ $class_names = join( ' ', apply_filters( 'ampforwp_nav_menu_css_class', array_filter( $classes ), $item, $args ) );
38
+ $class_names = ' class="' . esc_attr( $class_names ) . '"';
39
+
40
+ $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
41
+ $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : '';
42
+
43
+ $has_children = $wpdb->get_var($wpdb->prepare("SELECT COUNT(meta_id)
44
+ FROM {$wpdb->prefix}postmeta
45
+ WHERE meta_key='_menu_item_menu_item_parent'
46
+ AND meta_value='%d'", $item->ID) );
47
+
48
+ $output .= $indent . '<li' . $id . $value . $class_names .'>';
49
+
50
+ $atts = array();
51
+ $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : '';
52
+ $atts['target'] = ! empty( $item->target ) ? $item->target : '';
53
+ $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
54
+ $atts['href'] = ! empty( $item->url ) ? $item->url : '';
55
+ $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args, $depth );
56
+
57
+ $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $atts['title'] ) .'"' : '';
58
+ $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $atts['target'] ) .'"' : '';
59
+ $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $atts['rel'] ) .'"' : '';
60
+ $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $atts['href'] ) .'"' : '';
61
+
62
+ // Check if menu item is in main menu
63
+ if ( $depth == 0 && $has_children > 0 ) {
64
+ // These lines adds your custom class and attribute
65
+ $attributes .= ' class="dropdown-toggle"';
66
+ $attributes .= ' data-toggle="dropdown"';
67
+ }
68
+
69
+ $item_output = isset($args->before) ? $args->before : 1;
70
+
71
+ $item_output .= '<a'. $attributes .'>';
72
+ $item_output .= (isset($args->link_before) ? $args->link_before : 1 ). apply_filters( 'the_title', $item->title, $item->ID ) . (isset($args->link_after) ? $args->link_after : 1 );
73
+ $item_output .= '</a>';
74
+
75
+ // Add the caret if menu level is 0
76
+ if ( $has_children > 0 ) {
77
+ //$item_output .= '<label for="drop-"'.$depth.' class="toggle">+</label>';
78
+ }
79
+ $item_output .= isset($args->after) ? $args->after : 1;
80
+
81
+ $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
82
+ }
83
+
84
+ }
85
  /*Sidebar Nav menu Walker end*/
classes/class-ampforwp-youtube-embed.php CHANGED
@@ -1,143 +1,143 @@
1
- <?php
2
-
3
- // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) {
5
- exit;
6
- }
7
- use AMPforWP\AMPVendor\AMP_Base_Embed_Handler;
8
- use AMPforWP\AMPVendor\AMP_HTML_Utils;
9
- $file_path = AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php';
10
- if( file_exists($file_path) ){
11
- require_once $file_path;
12
- }
13
-
14
- // Much of this class is borrowed from Jetpack embeds
15
- class AMPforWP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
16
- const SHORT_URL_HOST = 'youtu.be';
17
- // Only handling single videos. Playlists are handled elsewhere.
18
- const URL_PATTERN = '#https?://(?:www\.)?(?:youtube.com/(?:v/|e/|embed/|watch[/\#?])|youtu\.be/).*#i';
19
- const RATIO = 0.5625;
20
-
21
- protected $DEFAULT_WIDTH = 600;
22
- protected $DEFAULT_HEIGHT = 338;
23
-
24
- private static $script_slug = 'amp-youtube';
25
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-youtube-0.1.js';
26
-
27
- function __construct( $args = array() ) {
28
- parent::__construct( $args );
29
-
30
- if ( isset( $this->args['content_max_width'] ) ) {
31
- $max_width = $this->args['content_max_width'];
32
- $this->args['width'] = $max_width;
33
- $this->args['height'] = round( $max_width * self::RATIO );
34
- }
35
- }
36
-
37
- function register_embed() {
38
- wp_embed_register_handler( 'amp-youtube', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
39
- add_shortcode( 'youtube', array( $this, 'shortcode' ) );
40
- }
41
-
42
- public function unregister_embed() {
43
- wp_embed_unregister_handler( 'amp-youtube', -1 );
44
- remove_shortcode( 'youtube' );
45
- }
46
-
47
- public function get_scripts() {
48
- if ( ! $this->did_convert_elements ) {
49
- return array();
50
- }
51
-
52
- return array( self::$script_slug => self::$script_src );
53
- }
54
-
55
- public function shortcode( $attr ) {
56
- $url = false;
57
- $video_id = false;
58
- if ( isset( $attr[0] ) ) {
59
- $url = ltrim( $attr[0] , '=' );
60
- } elseif ( function_exists ( 'ampforwp_youtube_shortcode' ) ) {
61
- $url = ampforwp_youtube_shortcode( $attr );
62
- }
63
-
64
- if ( empty( $url ) ) {
65
- return '';
66
- }
67
-
68
- $video_id = $this->get_video_id_from_url( $url );
69
-
70
- return $this->render( array(
71
- 'url' => $url,
72
- 'video_id' => $video_id,
73
- ) );
74
- }
75
-
76
-
77
- public function oembed( $matches, $attr, $url, $rawattr ) {
78
- return $this->shortcode( array( $url ) );
79
- }
80
-
81
- public function render( $args ) {
82
- $args = wp_parse_args( $args, array(
83
- 'video_id' => false,
84
- ) );
85
-
86
- if ( empty( $args['video_id'] ) ) {
87
- return AMP_HTML_Utils::build_tag( 'a', array( 'href' => esc_url( $args['url'] ), 'class' => 'amp-wp-embed-fallback' ), esc_html( $args['url'] ) );
88
- }
89
-
90
- $this->did_convert_elements = true;
91
- // Return it with a filter for the modification purpose #1378
92
- $attrs = array(
93
- 'data-videoid' => $args['video_id'],
94
- 'layout' => 'responsive',
95
- 'width' => $this->args['width'],
96
- 'height' => $this->args['height'],
97
- );
98
- $attrs = ampforwp_amp_consent_check( $attrs );
99
- return AMP_HTML_Utils::build_tag('amp-youtube',apply_filters('amp_youtube_params', $attrs) );
100
- }
101
-
102
- private function get_video_id_from_url( $url ) {
103
- $video_id = false;
104
- $parsed_url = parse_url( $url );
105
- if(!isset($parsed_url['host'])){
106
- $parsed_url['host'] = '';
107
- }
108
- if ( self::SHORT_URL_HOST === substr( $parsed_url['host'], -strlen( self::SHORT_URL_HOST ) ) ) {
109
- // youtu.be/{id}
110
- $parts = explode( '/', $parsed_url['path'] );
111
- if ( ! empty( $parts ) ) {
112
- $video_id = $parts[1];
113
- }
114
- } else {
115
- // ?v={id} or ?list={id}
116
- parse_str( $parsed_url['query'], $query_args );
117
-
118
- if ( isset( $query_args['v'] ) ) {
119
- $video_id = $this->sanitize_v_arg( $query_args['v'] );
120
- }
121
- }
122
-
123
- if ( empty( $video_id ) ) {
124
- // /(v|e|embed)/{id}
125
- $parts = explode( '/', $parsed_url['path'] );
126
-
127
- if ( in_array( $parts[1], array( 'v', 'e', 'embed' ) ) ) {
128
- $video_id = $parts[2];
129
- }
130
- }
131
-
132
- return $video_id;
133
- }
134
-
135
- private function sanitize_v_arg( $value ) {
136
- // Deal with broken params like `?v=123?rel=0`
137
- if ( false !== strpos( $value, '?' ) ) {
138
- $value = strtok( $value, '?' );
139
- }
140
-
141
- return $value;
142
- }
143
  }
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+ use AMPforWP\AMPVendor\AMP_Base_Embed_Handler;
8
+ use AMPforWP\AMPVendor\AMP_HTML_Utils;
9
+ $file_path = AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php';
10
+ if( file_exists($file_path) ){
11
+ require_once $file_path;
12
+ }
13
+
14
+ // Much of this class is borrowed from Jetpack embeds
15
+ class AMPforWP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
16
+ const SHORT_URL_HOST = 'youtu.be';
17
+ // Only handling single videos. Playlists are handled elsewhere.
18
+ const URL_PATTERN = '#https?://(?:www\.)?(?:youtube.com/(?:v/|e/|embed/|watch[/\#?])|youtu\.be/).*#i';
19
+ const RATIO = 0.5625;
20
+
21
+ protected $DEFAULT_WIDTH = 600;
22
+ protected $DEFAULT_HEIGHT = 338;
23
+
24
+ private static $script_slug = 'amp-youtube';
25
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-youtube-0.1.js';
26
+
27
+ function __construct( $args = array() ) {
28
+ parent::__construct( $args );
29
+
30
+ if ( isset( $this->args['content_max_width'] ) ) {
31
+ $max_width = $this->args['content_max_width'];
32
+ $this->args['width'] = $max_width;
33
+ $this->args['height'] = round( $max_width * self::RATIO );
34
+ }
35
+ }
36
+
37
+ function register_embed() {
38
+ wp_embed_register_handler( 'amp-youtube', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
39
+ add_shortcode( 'youtube', array( $this, 'shortcode' ) );
40
+ }
41
+
42
+ public function unregister_embed() {
43
+ wp_embed_unregister_handler( 'amp-youtube', -1 );
44
+ remove_shortcode( 'youtube' );
45
+ }
46
+
47
+ public function get_scripts() {
48
+ if ( ! $this->did_convert_elements ) {
49
+ return array();
50
+ }
51
+
52
+ return array( self::$script_slug => self::$script_src );
53
+ }
54
+
55
+ public function shortcode( $attr ) {
56
+ $url = false;
57
+ $video_id = false;
58
+ if ( isset( $attr[0] ) ) {
59
+ $url = ltrim( $attr[0] , '=' );
60
+ } elseif ( function_exists ( 'ampforwp_youtube_shortcode' ) ) {
61
+ $url = ampforwp_youtube_shortcode( $attr );
62
+ }
63
+
64
+ if ( empty( $url ) ) {
65
+ return '';
66
+ }
67
+
68
+ $video_id = $this->get_video_id_from_url( $url );
69
+
70
+ return $this->render( array(
71
+ 'url' => $url,
72
+ 'video_id' => $video_id,
73
+ ) );
74
+ }
75
+
76
+
77
+ public function oembed( $matches, $attr, $url, $rawattr ) {
78
+ return $this->shortcode( array( $url ) );
79
+ }
80
+
81
+ public function render( $args ) {
82
+ $args = wp_parse_args( $args, array(
83
+ 'video_id' => false,
84
+ ) );
85
+
86
+ if ( empty( $args['video_id'] ) ) {
87
+ return AMP_HTML_Utils::build_tag( 'a', array( 'href' => esc_url( $args['url'] ), 'class' => 'amp-wp-embed-fallback' ), esc_html( $args['url'] ) );
88
+ }
89
+
90
+ $this->did_convert_elements = true;
91
+ // Return it with a filter for the modification purpose #1378
92
+ $attrs = array(
93
+ 'data-videoid' => $args['video_id'],
94
+ 'layout' => 'responsive',
95
+ 'width' => $this->args['width'],
96
+ 'height' => $this->args['height'],
97
+ );
98
+ $attrs = ampforwp_amp_consent_check( $attrs );
99
+ return AMP_HTML_Utils::build_tag('amp-youtube',apply_filters('amp_youtube_params', $attrs) );
100
+ }
101
+
102
+ private function get_video_id_from_url( $url ) {
103
+ $video_id = false;
104
+ $parsed_url = parse_url( $url );
105
+ if(!isset($parsed_url['host'])){
106
+ $parsed_url['host'] = '';
107
+ }
108
+ if ( self::SHORT_URL_HOST === substr( $parsed_url['host'], -strlen( self::SHORT_URL_HOST ) ) ) {
109
+ // youtu.be/{id}
110
+ $parts = explode( '/', $parsed_url['path'] );
111
+ if ( ! empty( $parts ) ) {
112
+ $video_id = $parts[1];
113
+ }
114
+ } else {
115
+ // ?v={id} or ?list={id}
116
+ parse_str( $parsed_url['query'], $query_args );
117
+
118
+ if ( isset( $query_args['v'] ) ) {
119
+ $video_id = $this->sanitize_v_arg( $query_args['v'] );
120
+ }
121
+ }
122
+
123
+ if ( empty( $video_id ) ) {
124
+ // /(v|e|embed)/{id}
125
+ $parts = explode( '/', $parsed_url['path'] );
126
+
127
+ if ( in_array( $parts[1], array( 'v', 'e', 'embed' ) ) ) {
128
+ $video_id = $parts[2];
129
+ }
130
+ }
131
+
132
+ return $video_id;
133
+ }
134
+
135
+ private function sanitize_v_arg( $value ) {
136
+ // Deal with broken params like `?v=123?rel=0`
137
+ if ( false !== strpos( $value, '?' ) ) {
138
+ $value = strtok( $value, '?' );
139
+ }
140
+
141
+ return $value;
142
+ }
143
  }
classes/class-init.php CHANGED
@@ -1,16 +1,16 @@
1
- <?php
2
- // Exit if accessed directly
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
-
7
- if ( ! class_exists( 'Ampforwp_Loader', false ) ) {
8
- class Ampforwp_Loader {
9
- public function __construct() {
10
- $this->load_required_files();
11
- }
12
- public function load_required_files() {
13
- require AMPFORWP_PLUGIN_DIR . '/templates/features.php';
14
- }
15
- }
16
  } ?>
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ if ( ! class_exists( 'Ampforwp_Loader', false ) ) {
8
+ class Ampforwp_Loader {
9
+ public function __construct() {
10
+ $this->load_required_files();
11
+ }
12
+ public function load_required_files() {
13
+ require AMPFORWP_PLUGIN_DIR . '/templates/features.php';
14
+ }
15
+ }
16
  } ?>
components/author-box/author-box.php CHANGED
@@ -1,128 +1,128 @@
1
- <?php
2
- function ampforwp_framework_get_author_box( $args=array() ) {
3
- // Simple Author Box compatibility #2268
4
- if( class_exists('Simple_Author_Box') ){
5
- return;
6
- }
7
- global $post, $redux_builder_amp;
8
- $post_author = get_userdata($post->post_author);
9
- if ( ! is_array($args) ) {
10
- $args = array();
11
- }
12
-
13
- $avatar = false; //To show author Avater
14
- $author_pub_name = false; //To show author name
15
- $avatar_size = 40;
16
- $author_description = false;
17
- $class = $author_prefix = $author_wrapper_class = '';
18
- $show_date = false;
19
- $show_time = false;
20
- $author_name = $post_author->display_name;
21
- $and_text = '';
22
- $and_text = ampforwp_translation($redux_builder_amp['amp-translator-and-text'], 'and' );
23
- if ( function_exists('coauthors') ) {
24
- $author_name = coauthors($and_text,$and_text,null,null,false);
25
- }
26
- $author_link = get_author_posts_url($post_author->ID);
27
- if ( function_exists('coauthors_posts_links') ) {
28
- $author_link = coauthors_posts_links($and_text,$and_text,null,null,false);
29
- }
30
- $author_image_wrapper = '';
31
-
32
- if ( isset($args['author_pub_name']) ) {
33
- $author_pub_name = $args['author_pub_name'];
34
- }
35
-
36
- if ( isset($args['avatar']) ) {
37
- $avatar = $args['avatar'];
38
- }
39
- if ( isset($args['avatar_size']) ) {
40
- $avatar_size = $args['avatar_size'];
41
- }
42
- if ( isset($args['class']) ) {
43
- $class = $args['class'];
44
- }
45
- if ( isset($args['author_description']) ) {
46
- $author_description = $args['author_description'];
47
- }
48
-
49
-
50
- if ( isset( $args['author_prefix']) ) {
51
- $author_prefix = $args['author_prefix'];
52
- }
53
- //$author_prefix = ampforwp_translation($redux_builder_amp['amp-translator-by-text'] , $author_prefix );
54
-
55
- if ( isset( $args['author_link']) ) {
56
- $author_link = $args['author_link'];
57
- }
58
- if ( isset( $args['author_wrapper_class']) ) {
59
- $author_wrapper_class = $args['author_wrapper_class'];
60
- }
61
-
62
- if ( isset($args['author_image_wrapper']) ) {
63
- $author_image_wrapper = $args['author_image_wrapper'];
64
- }
65
- if ( isset($args['show_date']) ) {
66
- $show_date = $args['show_date'];
67
- }
68
- if ( isset($args['show_time']) ) {
69
- $show_time = $args['show_time'];
70
- }
71
-
72
- ?>
73
- <div class="amp-author <?php echo $class; ?>">
74
- <?php if ( $avatar ) {
75
- $author_avatar_url = ampforwp_get_wp_user_avatar();
76
- if( null == $author_avatar_url ){
77
- $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
78
- } ?>
79
- <div class="amp-author-image <?php echo $author_image_wrapper; ?>">
80
- <amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo esc_attr($avatar_size); ?>" height="<?php echo esc_attr($avatar_size); ?>" layout="fixed"></amp-img>
81
- </div>
82
- <?php } ?>
83
- <?php echo '<div class="author-details '. esc_attr($author_wrapper_class) .'">';
84
- if ( true == ampforwp_get_setting('ampforwp-author-page-url') ){
85
- if ( function_exists('coauthors_posts_links') ) {
86
- if( $author_pub_name ){
87
- echo '<span class="author-name">' .esc_html($author_prefix) . esc_url($author_link) . ' </span>';
88
- echo ampforwp_yoast_twitter_handle();
89
- }
90
- }
91
- else {
92
- if( $author_pub_name ){
93
- echo '<span class="author-name">' .esc_html($author_prefix) . ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $author_name ).'</a></span>';
94
- echo ampforwp_yoast_twitter_handle();
95
- }
96
- }
97
- }
98
- else{
99
- if( $author_pub_name ){
100
- echo '<span class="author-name">' . esc_html($author_prefix) . esc_html( $author_name ) . '</span>';
101
- echo ampforwp_yoast_twitter_handle();
102
- }
103
- }
104
-
105
- //to show date and time
106
- if ( $show_date || $show_time ) {
107
- echo '<span class="posted-time"> ';
108
- if ( $show_date ) {
109
- echo esc_html( get_the_date() ) . ' ';
110
- }
111
- if ( $show_time ) {
112
- echo esc_html( get_the_time());
113
- }
114
- echo '</span>';
115
- }
116
- if ( $author_description ) {
117
- if( true == ampforwp_get_setting('amp-author-box-description') ){
118
- $allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
119
- echo "<p>".strip_tags($post_author->description,$allowed_tags)."</p>";
120
- }
121
- } ?>
122
- </div>
123
- </div>
124
- <?php
125
- if(is_singular() && ( isset($args['ads_below_the_author']) && true == $args['ads_below_the_author'] )){
126
- do_action('ampforwp_below_author_box');
127
- }
128
  }
1
+ <?php
2
+ function ampforwp_framework_get_author_box( $args=array() ) {
3
+ // Simple Author Box compatibility #2268
4
+ if( class_exists('Simple_Author_Box') ){
5
+ return;
6
+ }
7
+ global $post, $redux_builder_amp;
8
+ $post_author = get_userdata($post->post_author);
9
+ if ( ! is_array($args) ) {
10
+ $args = array();
11
+ }
12
+
13
+ $avatar = false; //To show author Avater
14
+ $author_pub_name = false; //To show author name
15
+ $avatar_size = 40;
16
+ $author_description = false;
17
+ $class = $author_prefix = $author_wrapper_class = '';
18
+ $show_date = false;
19
+ $show_time = false;
20
+ $author_name = $post_author->display_name;
21
+ $and_text = '';
22
+ $and_text = ampforwp_translation($redux_builder_amp['amp-translator-and-text'], 'and' );
23
+ if ( function_exists('coauthors') ) {
24
+ $author_name = coauthors($and_text,$and_text,null,null,false);
25
+ }
26
+ $author_link = get_author_posts_url($post_author->ID);
27
+ if ( function_exists('coauthors_posts_links') ) {
28
+ $author_link = coauthors_posts_links($and_text,$and_text,null,null,false);
29
+ }
30
+ $author_image_wrapper = '';
31
+
32
+ if ( isset($args['author_pub_name']) ) {
33
+ $author_pub_name = $args['author_pub_name'];
34
+ }
35
+
36
+ if ( isset($args['avatar']) ) {
37
+ $avatar = $args['avatar'];
38
+ }
39
+ if ( isset($args['avatar_size']) ) {
40
+ $avatar_size = $args['avatar_size'];
41
+ }
42
+ if ( isset($args['class']) ) {
43
+ $class = $args['class'];
44
+ }
45
+ if ( isset($args['author_description']) ) {
46
+ $author_description = $args['author_description'];
47
+ }
48
+
49
+
50
+ if ( isset( $args['author_prefix']) ) {
51
+ $author_prefix = $args['author_prefix'];
52
+ }
53
+ //$author_prefix = ampforwp_translation($redux_builder_amp['amp-translator-by-text'] , $author_prefix );
54
+
55
+ if ( isset( $args['author_link']) ) {
56
+ $author_link = $args['author_link'];
57
+ }
58
+ if ( isset( $args['author_wrapper_class']) ) {
59
+ $author_wrapper_class = $args['author_wrapper_class'];
60
+ }
61
+
62
+ if ( isset($args['author_image_wrapper']) ) {
63
+ $author_image_wrapper = $args['author_image_wrapper'];
64
+ }
65
+ if ( isset($args['show_date']) ) {
66
+ $show_date = $args['show_date'];
67
+ }
68
+ if ( isset($args['show_time']) ) {
69
+ $show_time = $args['show_time'];
70
+ }
71
+
72
+ ?>
73
+ <div class="amp-author <?php echo $class; ?>">
74
+ <?php if ( $avatar ) {
75
+ $author_avatar_url = ampforwp_get_wp_user_avatar();
76
+ if( null == $author_avatar_url ){
77
+ $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
78
+ } ?>
79
+ <div class="amp-author-image <?php echo $author_image_wrapper; ?>">
80
+ <amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo esc_attr($avatar_size); ?>" height="<?php echo esc_attr($avatar_size); ?>" layout="fixed"></amp-img>
81
+ </div>
82
+ <?php } ?>
83
+ <?php echo '<div class="author-details '. esc_attr($author_wrapper_class) .'">';
84
+ if ( true == ampforwp_get_setting('ampforwp-author-page-url') ){
85
+ if ( function_exists('coauthors_posts_links') ) {
86
+ if( $author_pub_name ){
87
+ echo '<span class="author-name">' .esc_html($author_prefix) . esc_url($author_link) . ' </span>';
88
+ echo ampforwp_yoast_twitter_handle();
89
+ }
90
+ }
91
+ else {
92
+ if( $author_pub_name ){
93
+ echo '<span class="author-name">' .esc_html($author_prefix) . ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $author_name ).'</a></span>';
94
+ echo ampforwp_yoast_twitter_handle();
95
+ }
96
+ }
97
+ }
98
+ else{
99
+ if( $author_pub_name ){
100
+ echo '<span class="author-name">' . esc_html($author_prefix) . esc_html( $author_name ) . '</span>';
101
+ echo ampforwp_yoast_twitter_handle();
102
+ }
103
+ }
104
+
105
+ //to show date and time
106
+ if ( $show_date || $show_time ) {
107
+ echo '<span class="posted-time"> ';
108
+ if ( $show_date ) {
109
+ echo esc_html( get_the_date() ) . ' ';
110
+ }
111
+ if ( $show_time ) {
112
+ echo esc_html( get_the_time());
113
+ }
114
+ echo '</span>';
115
+ }
116
+ if ( $author_description ) {
117
+ if( true == ampforwp_get_setting('amp-author-box-description') ){
118
+ $allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
119
+ echo "<p>".strip_tags($post_author->description,$allowed_tags)."</p>";
120
+ }
121
+ } ?>
122
+ </div>
123
+ </div>
124
+ <?php
125
+ if(is_singular() && ( isset($args['ads_below_the_author']) && true == $args['ads_below_the_author'] )){
126
+ do_action('ampforwp_below_author_box');
127
+ }
128
  }
components/breadcrumb/breadcrumb.php CHANGED
@@ -1,235 +1,241 @@
1
- <?php function amp_breadcrumb_output(){
2
- global $redux_builder_amp;
3
- $home_non_amp = $archive_non_amp = '';
4
- if ( false == $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
5
- $home_non_amp = 'nonamp';
6
- }
7
- if ( false == $redux_builder_amp['ampforwp-archive-support'] ) {
8
- $archive_non_amp = 'nonamp';
9
- } ?>
10
- <div class="amp-wp-content breadcrumb"> <?php
11
- if ( ampforwp_yoast_breadcrumbs_output() ) {
12
- echo ampforwp_yoast_breadcrumbs_output();
13
- return;
14
- }
15
- // Settings
16
- $breadcrums_id = 'breadcrumbs';
17
- $breadcrums_class = 'breadcrumbs';
18
- $home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
19
-
20
- // If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
21
- $custom_taxonomy = 'product_cat';
22
-
23
- // Get the query & post information
24
- global $post,$wp_query;
25
- // Do not display on the homepage
26
- if ( !ampforwp_polylang_front_page() && !is_front_page() ) {
27
-
28
- // Build the breadcrums
29
- echo '<ul id="' . esc_attr($breadcrums_id) . '" class="' . esc_attr($breadcrums_class) . '">';
30
-
31
- // Home page
32
- echo '<li class="item-home"><a class="bread-link bread-home" href="' . ampforwp_url_controller( get_home_url('', '/'), $home_non_amp ) . '" title="' . esc_attr($home_title) . '">' . esc_html($home_title) . '</a></li>';
33
-
34
- if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
35
-
36
-
37
- echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . post_type_archive_title($prefix, false) . '</strong></li>';
38
- } else if ( is_author() ) {
39
- global $author;
40
-
41
- $userdata = get_userdata( $author );
42
- $author_url= get_author_posts_url($userdata->ID);
43
- $author_url = trailingslashit($author_url);
44
- // Display author name
45
- echo '<li class="item-current item-current-' . esc_attr($userdata->user_nicename) . '"><a class="bread-current bread-current-' . esc_attr($userdata->user_nicename) . '" title="' . esc_attr($userdata->display_name) . '" href="'. ampforwp_url_controller( $author_url, $archive_non_amp ). '">' . 'Author: ' . esc_html($userdata->display_name) . '</a></li>';
46
-
47
- } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
48
-
49
- // If post is a custom post type
50
- $post_type = get_post_type();
51
-
52
- // If it is a custom post type display name and link
53
- if($post_type != 'post') {
54
-
55
- $post_type_object = get_post_type_object($post_type);
56
- $post_type_archive = get_post_type_archive_link($post_type);
57
- if ( false != $post_type_archive){
58
- echo '<li class="item-cat item-custom-post-type-' . esc_attr($post_type) . '"><a class="bread-cat bread-custom-post-type-' . esc_attr($post_type) . '" href="' .ampforwp_url_controller( $post_type_archive, $archive_non_amp ) . '" title="' . esc_attr($post_type_object->labels->name) . '">' . esc_html($post_type_object->labels->name) . '</a></li>';
59
- }
60
- else {
61
- echo '<li class="item-cat item-custom-post-type-' . esc_attr($post_type) . '"><span class="bread-cat bread-custom-post-type-' . esc_attr($post_type) . '">' . esc_html($post_type_object->labels->name) . '</span></li>';
62
- }
63
- }
64
-
65
- $custom_tax_name = get_queried_object()->name;
66
- echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . esc_html($custom_tax_name) . '</strong></li>';
67
- } else if ( is_single() ) {
68
-
69
- // If post is a custom post type
70
- $post_type = get_post_type();
71
-
72
- // If it is a custom post type display name and link
73
- if($post_type != 'post') {
74
-
75
- $post_type_object = get_post_type_object($post_type);
76
- $post_type_archive = get_post_type_archive_link($post_type);
77
- if ( false != $post_type_archive){
78
- echo '<li class="item-cat item-custom-post-type-' . esc_attr($post_type) . '"><a class="bread-cat bread-custom-post-type-' . esc_attr($post_type) . '" href="' .ampforwp_url_controller( $post_type_archive, $archive_non_amp ) . '" title="' . esc_attr($post_type_object->labels->name) . '">' . esc_html($post_type_object->labels->name) . '</a></li>';
79
- }
80
- else {
81
- echo '<li class="item-cat item-custom-post-type-' . esc_attr($post_type) . '"><span class="bread-cat bread-custom-post-type-' . esc_attr($post_type) . '">' . esc_html($post_type_object->labels->name) . '</span></li>';
82
- }
83
- }
84
- /*Breadcrumb with tags Start*/
85
- $tags_breadcrumbs = '';
86
- if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'tags'){
87
- $post_tags = wp_get_post_tags($post->ID);
88
- if(!empty($post_tags)){
89
- foreach( $post_tags as $post_obj){
90
- $tag_name = $post_obj->name;
91
- $tag_id = $post_obj->term_id;
92
- $tag_name = $post_obj->name;
93
- $tag_link = get_tag_link($tag_id);
94
- $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . ampforwp_url_controller( $tag_link, $archive_non_amp ) . '" title="' . esc_attr($tag_name) . '">' . esc_html($tag_name) . '</a></li>';
95
- }
96
- echo $tags_breadcrumbs;
97
- }
98
- }
99
- if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
100
- // Get post category info
101
- $category = get_the_category();
102
- if(!empty($category)) {
103
-
104
- // Get last category post is in
105
- $last_category = array_values($category);
106
- $last_category = end($last_category);
107
- $category_name = get_category($last_category);
108
- // Get parent any categories and create array
109
- $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, ','),',');
110
- $cat_parents = explode(',',$get_cat_parents);
111
-
112
- // Loop through parent categories and store in variable $cat_display
113
- $cat_display = '';
114
- foreach($cat_parents as $parents) {
115
- $cat_id = get_cat_ID( $parents);
116
- $cat_link = get_category_link($cat_id);
117
- $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($parents). '" href="'. ampforwp_url_controller( $cat_link, $archive_non_amp ).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
118
- }
119
- }
120
- }
121
- /*Breadcrumb with tags End*/
122
-
123
- // If it's a custom post type within a custom taxonomy
124
- $taxonomy_exists = taxonomy_exists($custom_taxonomy);
125
- if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {
126
-
127
- $taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );
128
- if ( $taxonomy_terms ) {
129
- $cat_id = $taxonomy_terms[0]->term_id;
130
- $cat_nicename = $taxonomy_terms[0]->slug;
131
- $cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);
132
- $cat_link = trailingslashit($cat_link);
133
- $cat_name = $taxonomy_terms[0]->name;
134
- }
135
- }
136
-
137
- // Check if the post is in a category
138
- if(!empty($last_category)) {
139
- echo $cat_display;
140
-
141
- // Else if post is in a custom taxonomy
142
- } else if(!empty($cat_id)) {
143
-
144
- echo '<li class="item-cat item-cat-' . esc_attr($cat_id) . ' item-cat-' . esc_attr($cat_nicename) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($cat_nicename) . '" href="' . ampforwp_url_controller( $cat_link, $archive_non_amp ) . '" title="' . esc_attr($cat_name) . '">' . esc_html($cat_name) . '</a></li>';
145
- }
146
-
147
- } else if ( is_category() ) {
148
-
149
- // Category page
150
- echo '<li class="item-current item-cat"><strong class="bread-current bread-cat">' . single_cat_title('', false) . '</strong></li>';
151
- } else if ( is_page() ) {
152
-
153
- // Standard page
154
- if( $post->post_parent ){
155
-
156
- // If child page, get parents
157
- $anc = get_post_ancestors( $post->ID );
158
-
159
- // Get parents in the right order
160
- $anc = array_reverse($anc);
161
-
162
- // Parent page loop
163
- if ( !isset( $parents ) ) $parents = null;
164
- foreach ( $anc as $ancestor ) {
165
- $parents .= '<li class="item-parent item-parent-' . esc_attr($ancestor) . '"><a class="bread-parent bread-parent-' . esc_attr($ancestor) . '" href="' . ampforwp_url_controller( get_permalink( $ancestor ), $archive_non_amp ) . '" title="' . esc_attr(get_the_title($ancestor)) . '">' .esc_html( get_the_title($ancestor)) . '</a></li>';
166
- }
167
-
168
- // Display parent pages
169
- echo $parents;
170
-
171
- // Current page
172
-
173
- }
174
-
175
- } else if ( is_tag() ) {
176
-
177
- // Tag page
178
-
179
- // Get tag information
180
- $term_id = get_query_var('tag_id');
181
- $taxonomy = 'post_tag';
182
- $args = 'include=' . $term_id;
183
- $terms = get_terms( $taxonomy, $args );
184
- $get_term_id = $terms[0]->term_id;
185
- $get_term_slug = $terms[0]->slug;
186
- $get_term_name = $terms[0]->name;
187
-
188
- // Display the tag name
189
- echo '<li class="item-current item-tag-' . esc_attr($get_term_id) . ' item-tag-' . esc_attr($get_term_slug) . '"><strong class="bread-current bread-tag-' . esc_attr($get_term_id) . ' bread-tag-' . esc_attr($get_term_slug) . '">' . esc_html($get_term_name) . '</strong></li>';
190
- } elseif ( is_day() ) {
191
-
192
- // Day archive
193
-
194
- // Year link
195
- echo '<li class="item-year item-year-' . get_the_time('Y') . '"><a class="bread-year bread-year-' . get_the_time('Y') . '" href="' . get_year_link( get_the_time('Y') ) . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . '</a></li>';
196
-
197
- // Month link
198
- echo '<li class="item-month item-month-' . get_the_time('m') . '"><a class="bread-month bread-month-' . get_the_time('m') . '" href="' . get_month_link( get_the_time('Y'), get_the_time('m') ) . '" title="' . get_the_time('M') . '">' . get_the_time('M') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . ' </a></li>';
199
-
200
-
201
- // Day display
202
- echo '<li class="item-current item-' . get_the_time('j') . '"><strong class="bread-current bread-' . get_the_time('j') . '"> ' . get_the_time('jS') . ' ' . get_the_time('M') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . ' </strong></li>';
203
-
204
- } else if ( is_month() ) {
205
-
206
- // Month Archive
207
-
208
- // Year link
209
- echo '<li class="item-year item-year-' . get_the_time('Y') . '"><a class="bread-year bread-year-' . get_the_time('Y') . '" href="' . get_year_link( get_the_time('Y') ) . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . ' </a></li>';
210
-
211
- // Month display
212
- echo '<li class="item-month item-month-' . get_the_time('m') . '"><strong class="bread-month bread-month-' . get_the_time('m') . '" title="' . get_the_time('M') . '">' . get_the_time('M') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . ' </strong></li>';
213
-
214
- } else if ( is_year() ) {
215
-
216
- // Display year archive
217
- echo '<li class="item-current item-current-' . get_the_time('Y') . '"><strong class="bread-current bread-current-' . get_the_time('Y') . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')). ' </strong></li>';
218
-
219
- } else if ( get_query_var('paged') ) {
220
-
221
- // Paginated archives
222
- echo '<li class="item-current item-current-' . esc_attr(get_query_var('paged')) . '"><strong class="bread-current bread-current-' . esc_attr(get_query_var('paged')) . '" title="Page ' . esc_attr(get_query_var('paged')) . '">'. esc_html(ampforwp_translation($redux_builder_amp['amp-translator-page-text'], 'Page')) . ' ' . esc_html(get_query_var('paged')) . '</strong></li>';
223
-
224
- } else if ( is_search() ) {
225
-
226
- // Search results page
227
- echo '<li class="item-current item-current-' . esc_attr(get_search_query()) . '"><strong class="bread-current bread-current-' . esc_attr(get_search_query()) . '" title="Search results for: ' . esc_attr(get_search_query()) . '">
228
- ' . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-search-text'], 'Search results for')) . ': ' . esc_html(get_search_query()) . '</strong></li>';
229
-
230
- }
231
- echo '</ul>';
232
-
233
- }?>
234
- </div>
 
 
 
 
 
 
235
  <?php }
1
+ <?php function amp_breadcrumb_output(){
2
+ global $redux_builder_amp;
3
+ $home_non_amp = $archive_non_amp = '';
4
+ if ( false == $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
5
+ $home_non_amp = 'nonamp';
6
+ }
7
+ if ( false == $redux_builder_amp['ampforwp-archive-support'] ) {
8
+ $archive_non_amp = 'nonamp';
9
+ } ?>
10
+ <div class="amp-wp-content breadcrumb"> <?php
11
+ if ( ampforwp_yoast_breadcrumbs_output() ) {
12
+ echo ampforwp_yoast_breadcrumbs_output();
13
+ return;
14
+ }
15
+ // Settings
16
+ $breadcrums_id = 'breadcrumbs';
17
+ $breadcrums_class = 'breadcrumbs';
18
+ $home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
19
+
20
+ // If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
21
+ $custom_taxonomy = 'product_cat';
22
+
23
+ // Get the query & post information
24
+ global $post,$wp_query;
25
+ // Do not display on the homepage
26
+ if ( !ampforwp_polylang_front_page() && !is_front_page() ) {
27
+
28
+ // Build the breadcrums
29
+ echo '<ul id="' . esc_attr($breadcrums_id) . '" class="' . esc_attr($breadcrums_class) . '">';
30
+
31
+ // Home page
32
+ echo '<li class="item-home"><a class="bread-link bread-home" href="' . ampforwp_url_controller( get_home_url('', '/'), $home_non_amp ) . '" title="' . esc_attr($home_title) . '">' . esc_html($home_title) . '</a></li>';
33
+
34
+ if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
35
+
36
+
37
+ echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . post_type_archive_title($prefix, false) . '</strong></li>';
38
+ } else if ( is_author() ) {
39
+ global $author;
40
+
41
+ $userdata = get_userdata( $author );
42
+ $author_url= get_author_posts_url($userdata->ID);
43
+ $author_url = trailingslashit($author_url);
44
+ // Display author name
45
+ echo '<li class="item-current item-current-' . esc_attr($userdata->user_nicename) . '"><a class="bread-current bread-current-' . esc_attr($userdata->user_nicename) . '" title="' . esc_attr($userdata->display_name) . '" href="'. ampforwp_url_controller( $author_url, $archive_non_amp ). '">' . 'Author: ' . esc_html($userdata->display_name) . '</a></li>';
46
+
47
+ } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
48
+
49
+ // If post is a custom post type
50
+ $post_type = get_post_type();
51
+
52
+ // If it is a custom post type display name and link
53
+ if($post_type != 'post') {
54
+
55
+ $post_type_object = get_post_type_object($post_type);
56
+ $post_type_archive = get_post_type_archive_link($post_type);
57
+ if ( false != $post_type_archive){
58
+ echo '<li class="item-cat item-custom-post-type-' . esc_attr($post_type) . '"><a class="bread-cat bread-custom-post-type-' . esc_attr($post_type) . '" href="' .ampforwp_url_controller( $post_type_archive, $archive_non_amp ) . '" title="' . esc_attr($post_type_object->labels->name) . '">' . esc_html($post_type_object->labels->name) . '</a></li>';
59
+ }
60
+ else {
61
+ echo '<li class="item-cat item-custom-post-type-' . esc_attr($post_type) . '"><span class="bread-cat bread-custom-post-type-' . esc_attr($post_type) . '">' . esc_html($post_type_object->labels->name) . '</span></li>';
62
+ }
63
+ }
64
+
65
+ $custom_tax_name = get_queried_object()->name;
66
+ echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . esc_html($custom_tax_name) . '</strong></li>';
67
+ } else if ( is_single() ) {
68
+
69
+ // If post is a custom post type
70
+ $post_type = get_post_type();
71
+
72
+ // If it is a custom post type display name and link
73
+ if($post_type != 'post') {
74
+
75
+ $post_type_object = get_post_type_object($post_type);
76
+ $post_type_archive = get_post_type_archive_link($post_type);
77
+ if ( false != $post_type_archive){
78
+ echo '<li class="item-cat item-custom-post-type-' . esc_attr($post_type) . '"><a class="bread-cat bread-custom-post-type-' . esc_attr($post_type) . '" href="' .ampforwp_url_controller( $post_type_archive, $archive_non_amp ) . '" title="' . esc_attr($post_type_object->labels->name) . '">' . esc_html($post_type_object->labels->name) . '</a></li>';
79
+ }
80
+ else {
81
+ echo '<li class="item-cat item-custom-post-type-' . esc_attr($post_type) . '"><span class="bread-cat bread-custom-post-type-' . esc_attr($post_type) . '">' . esc_html($post_type_object->labels->name) . '</span></li>';
82
+ }
83
+ }
84
+ /*Breadcrumb with tags Start*/
85
+ $tags_breadcrumbs = '';
86
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'tags'){
87
+ $post_tags = wp_get_post_tags($post->ID);
88
+ if(!empty($post_tags)){
89
+ foreach( $post_tags as $post_obj){
90
+ $tag_name = $post_obj->name;
91
+ $tag_id = $post_obj->term_id;
92
+ $tag_name = $post_obj->name;
93
+ $tag_link = get_tag_link($tag_id);
94
+ $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . ampforwp_url_controller( $tag_link, $archive_non_amp ) . '" title="' . esc_attr($tag_name) . '">' . esc_html($tag_name) . '</a></li>';
95
+ }
96
+ if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
+ $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
98
+ }
99
+ echo $tags_breadcrumbs;
100
+ }
101
+ }
102
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
103
+ // Get post category info
104
+ $category = get_the_category();
105
+ if(!empty($category)) {
106
+
107
+ // Get last category post is in
108
+ $last_category = array_values($category);
109
+ $last_category = end($last_category);
110
+ $category_name = get_category($last_category);
111
+ // Get parent any categories and create array
112
+ $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, ','),',');
113
+ $cat_parents = explode(',',$get_cat_parents);
114
+
115
+ // Loop through parent categories and store in variable $cat_display
116
+ $cat_display = '';
117
+ foreach($cat_parents as $parents) {
118
+ $cat_id = get_cat_ID( $parents);
119
+ $cat_link = get_category_link($cat_id);
120
+ $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($parents). '" href="'. ampforwp_url_controller( $cat_link, $archive_non_amp ).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
121
+ if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
122
+ $cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
123
+ }
124
+ }
125
+ }
126
+ }
127
+ /*Breadcrumb with tags End*/
128
+
129
+ // If it's a custom post type within a custom taxonomy
130
+ $taxonomy_exists = taxonomy_exists($custom_taxonomy);
131
+ if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {
132
+
133
+ $taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );
134
+ if ( $taxonomy_terms ) {
135
+ $cat_id = $taxonomy_terms[0]->term_id;
136
+ $cat_nicename = $taxonomy_terms[0]->slug;
137
+ $cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);
138
+ $cat_link = trailingslashit($cat_link);
139
+ $cat_name = $taxonomy_terms[0]->name;
140
+ }
141
+ }
142
+
143
+ // Check if the post is in a category
144
+ if(!empty($last_category)) {
145
+ echo $cat_display;
146
+
147
+ // Else if post is in a custom taxonomy
148
+ } else if(!empty($cat_id)) {
149
+
150
+ echo '<li class="item-cat item-cat-' . esc_attr($cat_id) . ' item-cat-' . esc_attr($cat_nicename) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($cat_nicename) . '" href="' . ampforwp_url_controller( $cat_link, $archive_non_amp ) . '" title="' . esc_attr($cat_name) . '">' . esc_html($cat_name) . '</a></li>';
151
+ }
152
+
153
+ } else if ( is_category() ) {
154
+
155
+ // Category page
156
+ echo '<li class="item-current item-cat"><strong class="bread-current bread-cat">' . single_cat_title('', false) . '</strong></li>';
157
+ } else if ( is_page() ) {
158
+
159
+ // Standard page
160
+ if( $post->post_parent ){
161
+
162
+ // If child page, get parents
163
+ $anc = get_post_ancestors( $post->ID );
164
+
165
+ // Get parents in the right order
166
+ $anc = array_reverse($anc);
167
+
168
+ // Parent page loop
169
+ if ( !isset( $parents ) ) $parents = null;
170
+ foreach ( $anc as $ancestor ) {
171
+ $parents .= '<li class="item-parent item-parent-' . esc_attr($ancestor) . '"><a class="bread-parent bread-parent-' . esc_attr($ancestor) . '" href="' . ampforwp_url_controller( get_permalink( $ancestor ), $archive_non_amp ) . '" title="' . esc_attr(get_the_title($ancestor)) . '">' .esc_html( get_the_title($ancestor)) . '</a></li>';
172
+ }
173
+
174
+ // Display parent pages
175
+ echo $parents;
176
+
177
+ // Current page
178
+
179
+ }
180
+
181
+ } else if ( is_tag() ) {
182
+
183
+ // Tag page
184
+
185
+ // Get tag information
186
+ $term_id = get_query_var('tag_id');
187
+ $taxonomy = 'post_tag';
188
+ $args = 'include=' . $term_id;
189
+ $terms = get_terms( $taxonomy, $args );
190
+ $get_term_id = $terms[0]->term_id;
191
+ $get_term_slug = $terms[0]->slug;
192
+ $get_term_name = $terms[0]->name;
193
+
194
+ // Display the tag name
195
+ echo '<li class="item-current item-tag-' . esc_attr($get_term_id) . ' item-tag-' . esc_attr($get_term_slug) . '"><strong class="bread-current bread-tag-' . esc_attr($get_term_id) . ' bread-tag-' . esc_attr($get_term_slug) . '">' . esc_html($get_term_name) . '</strong></li>';
196
+ } elseif ( is_day() ) {
197
+
198
+ // Day archive
199
+
200
+ // Year link
201
+ echo '<li class="item-year item-year-' . get_the_time('Y') . '"><a class="bread-year bread-year-' . get_the_time('Y') . '" href="' . get_year_link( get_the_time('Y') ) . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . '</a></li>';
202
+
203
+ // Month link
204
+ echo '<li class="item-month item-month-' . get_the_time('m') . '"><a class="bread-month bread-month-' . get_the_time('m') . '" href="' . get_month_link( get_the_time('Y'), get_the_time('m') ) . '" title="' . get_the_time('M') . '">' . get_the_time('M') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . ' </a></li>';
205
+
206
+
207
+ // Day display
208
+ echo '<li class="item-current item-' . get_the_time('j') . '"><strong class="bread-current bread-' . get_the_time('j') . '"> ' . get_the_time('jS') . ' ' . get_the_time('M') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . ' </strong></li>';
209
+
210
+ } else if ( is_month() ) {
211
+
212
+ // Month Archive
213
+
214
+ // Year link
215
+ echo '<li class="item-year item-year-' . get_the_time('Y') . '"><a class="bread-year bread-year-' . get_the_time('Y') . '" href="' . get_year_link( get_the_time('Y') ) . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . ' </a></li>';
216
+
217
+ // Month display
218
+ echo '<li class="item-month item-month-' . get_the_time('m') . '"><strong class="bread-month bread-month-' . get_the_time('m') . '" title="' . get_the_time('M') . '">' . get_the_time('M') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')) . ' </strong></li>';
219
+
220
+ } else if ( is_year() ) {
221
+
222
+ // Display year archive
223
+ echo '<li class="item-current item-current-' . get_the_time('Y') . '"><strong class="bread-current bread-current-' . get_the_time('Y') . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-archives-text'], 'Archives')). ' </strong></li>';
224
+
225
+ } else if ( get_query_var('paged') ) {
226
+
227
+ // Paginated archives
228
+ echo '<li class="item-current item-current-' . esc_attr(get_query_var('paged')) . '"><strong class="bread-current bread-current-' . esc_attr(get_query_var('paged')) . '" title="Page ' . esc_attr(get_query_var('paged')) . '">'. esc_html(ampforwp_translation($redux_builder_amp['amp-translator-page-text'], 'Page')) . ' ' . esc_html(get_query_var('paged')) . '</strong></li>';
229
+
230
+ } else if ( is_search() ) {
231
+
232
+ // Search results page
233
+ echo '<li class="item-current item-current-' . esc_attr(get_search_query()) . '"><strong class="bread-current bread-current-' . esc_attr(get_search_query()) . '" title="Search results for: ' . esc_attr(get_search_query()) . '">
234
+ ' . esc_html(ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-search-text'], 'Search results for')) . ': ' . esc_html(get_search_query()) . '</strong></li>';
235
+
236
+ }
237
+ echo '</ul>';
238
+
239
+ }?>
240
+ </div>
241
  <?php }
components/categories-tags/categories-tags.php CHANGED
@@ -1,54 +1,54 @@
1
- <?php
2
- /*
3
- TODO: 1: Connect with options panel(archive support and translational panel)
4
- 2: Do we have to change the classes names as well?
5
- */
6
- global $post;
7
- function ampforwp_framework_get_categories_list( $separator = '' ){
8
- global $post, $redux_builder_amp;
9
- $ampforwp_categories = get_the_terms( $post->ID, 'category' );
10
- if(ampforwp_get_setting('ampforwp-cats-single') == '1'){
11
- if ( $ampforwp_categories ) : ?>
12
- <div class="amp-category">
13
- <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-categories-text'], 'Categories' )); ?></span>
14
- <?php foreach ($ampforwp_categories as $key=>$cat ) {
15
- $term_id = $cat->term_id;
16
- $term_name = $cat->name;
17
- $term_url = get_category_link( $cat->term_id );
18
- if(false == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
19
- $term_url = false;
20
- }
21
- elseif( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-cats-tags-links-single')) {
22
- // #934
23
- $term_url = ampforwp_url_controller( $term_url );
24
- }
25
- echo ('<span class="amp-cat amp-cat-'. esc_attr($term_id) . '" >
26
- '. (!empty($term_url)? ' <a href="'. esc_url( $term_url) . '" > ':''). esc_html($term_name). (!empty($term_url)? '</a> ':'').' </span>');
27
-
28
- if(!empty($separator) && count($ampforwp_categories)-1 > $key){
29
- echo esc_html($separator);
30
- }
31
- } ?>
32
- </div>
33
- <?php endif;
34
- }
35
- }
36
- function ampforwp_framework_get_tags_list($separator=''){
37
- global $post, $redux_builder_amp;
38
- $ampforwp_tags = get_the_terms( $post->ID, 'post_tag' );
39
- if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
40
- <div class="amp-tags">
41
- <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags' )); ?></span>
42
- <?php foreach ( $ampforwp_tags as $key=>$tag ) {
43
- if( true == $redux_builder_amp['ampforwp-archive-support'] && true == $redux_builder_amp['ampforwp-cats-tags-links-single'] ) {
44
- echo ('<span class="amp-tag amp-tag-'.esc_attr($tag->term_id).'"><a href="'. ampforwp_url_controller( get_tag_link( $tag->term_id ) ).'" > '.esc_html($tag->name) .'</a></span>');//#934
45
- } else {
46
- echo ('<span class="amp-tag"> '.esc_html($tag->name).'</span>');
47
- }
48
- if(!empty($separator) && count($ampforwp_tags)-1 > $key){
49
- echo $separator;
50
- }
51
- }?>
52
- </div>
53
- <?php endif;
54
  }
1
+ <?php
2
+ /*
3
+ TODO: 1: Connect with options panel(archive support and translational panel)
4
+ 2: Do we have to change the classes names as well?
5
+ */
6
+ global $post;
7
+ function ampforwp_framework_get_categories_list( $separator = '' ){
8
+ global $post, $redux_builder_amp;
9
+ $ampforwp_categories = get_the_terms( $post->ID, 'category' );
10
+ if(ampforwp_get_setting('ampforwp-cats-single') == '1'){
11
+ if ( $ampforwp_categories ) : ?>
12
+ <div class="amp-category">
13
+ <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-categories-text'], 'Categories' )); ?></span>
14
+ <?php foreach ($ampforwp_categories as $key=>$cat ) {
15
+ $term_id = $cat->term_id;
16
+ $term_name = $cat->name;
17
+ $term_url = get_category_link( $cat->term_id );
18
+ if(false == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
19
+ $term_url = false;
20
+ }
21
+ elseif( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-cats-tags-links-single')) {
22
+ // #934
23
+ $term_url = ampforwp_url_controller( $term_url );
24
+ }
25
+ echo ('<span class="amp-cat amp-cat-'. esc_attr($term_id) . '" >
26
+ '. (!empty($term_url)? ' <a href="'. esc_url( $term_url) . '" > ':''). esc_html($term_name). (!empty($term_url)? '</a> ':'').' </span>');
27
+
28
+ if(!empty($separator) && count($ampforwp_categories)-1 > $key){
29
+ echo esc_html($separator);
30
+ }
31
+ } ?>
32
+ </div>
33
+ <?php endif;
34
+ }
35
+ }
36
+ function ampforwp_framework_get_tags_list($separator=''){
37
+ global $post, $redux_builder_amp;
38
+ $ampforwp_tags = get_the_terms( $post->ID, 'post_tag' );
39
+ if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
40
+ <div class="amp-tags">
41
+ <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags' )); ?></span>
42
+ <?php foreach ( $ampforwp_tags as $key=>$tag ) {
43
+ if( true == $redux_builder_amp['ampforwp-archive-support'] && true == $redux_builder_amp['ampforwp-cats-tags-links-single'] ) {
44
+ echo ('<span class="amp-tag amp-tag-'.esc_attr($tag->term_id).'"><a href="'. ampforwp_url_controller( get_tag_link( $tag->term_id ) ).'" > '.esc_html($tag->name) .'</a></span>');//#934
45
+ } else {
46
+ echo ('<span class="amp-tag"> '.esc_html($tag->name).'</span>');
47
+ }
48
+ if(!empty($separator) && count($ampforwp_tags)-1 > $key){
49
+ echo $separator;
50
+ }
51
+ }?>
52
+ </div>
53
+ <?php endif;
54
  }
components/comments/comments.php CHANGED
@@ -1,293 +1,293 @@
1
- <?php
2
- function ampforwp_framework_get_comments(){
3
- global $redux_builder_amp;
4
- $display_comments_on = "";
5
- $display_comments_on = ampforwp_get_comments_status();
6
- if ( $display_comments_on ) {
7
- if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
8
- echo ampforwp_framework_get_facebook_comments();
9
- }
10
-
11
- if ( $redux_builder_amp['ampforwp-disqus-comments-support'] ) {
12
- ampforwp_framework_get_disqus_comments();
13
- }
14
- if ( $redux_builder_amp['ampforwp-vuukle-comments-support'] ) {
15
- ampforwp_framework_get_vuukle_comments();
16
- }
17
- if ( $redux_builder_amp['ampforwp-spotim-comments-support'] ) {
18
- ampforwp_framework_get_spotim_comments();
19
- }
20
-
21
- if ( isset($redux_builder_amp['wordpress-comments-support']) && true == $redux_builder_amp['wordpress-comments-support'] ) {
22
- do_action('ampforwp_before_comment_hook'); ?>
23
- <div class="amp-comments">
24
- <?php
25
- // Gather comments for a specific page/post
26
- $postID = $comments = $max_page = "";
27
- $postID = get_the_ID();
28
- if ( ampforwp_is_front_page() ) {
29
- $postID = ampforwp_get_frontpage_id();
30
- }
31
- $comments = get_comments(array(
32
- 'post_id' => $postID,
33
- 'status' => 'approve' //Change this to the type of comments to be displayed
34
- ));
35
-
36
- if ( $comments ) { ?>
37
- <div id="comments" class="amp-comments-wrapper">
38
- <h3><span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'], 'View Comments' ));?></span></h3>
39
- <ul><?php
40
- // Display the list of comments
41
- function ampforwp_custom_translated_comment($comment, $args, $depth){
42
- $GLOBALS['comment'] = $comment;
43
- global $redux_builder_amp;
44
- $comment_author_img_url = "";
45
- $comment_author_img_url = ampforwp_get_comments_gravatar( $comment );
46
-
47
- ?>
48
- <li id="li-comment-<?php comment_ID() ?>"
49
- <?php comment_class(); ?> >
50
- <article id="comment-<?php comment_ID(); ?>" class="comment-body">
51
- <footer class="comment-meta">
52
- <?php if($comment_author_img_url){ ?>
53
- <amp-img src="<?php echo esc_url($comment_author_img_url); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
54
- <?php } ?>
55
- <div class="comment-author vcard">
56
- <?php
57
- printf(__('<b class="fn">%s</b> <span class="says">'.esc_html( ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says')) .':</span>'), get_comment_author_link()) ?>
58
- </div>
59
- <div class="comment-metadata">
60
- <a href="<?php echo htmlspecialchars( trailingslashit( get_comment_link( $comment->comment_ID ) ) ) ?>">
61
- <?php printf( ampforwp_translation( ('%1$s '. ampforwp_translation($redux_builder_amp['amp-translator-at-text'],'at').' %2$s'), '%1$s at %2$s') , get_comment_date(), get_comment_time())?>
62
- </a>
63
- <?php edit_comment_link( ampforwp_translation( $redux_builder_amp['amp-translator-Edit-text'], 'Edit' ) ) ?>
64
- </div>
65
- </footer>
66
- <div class="comment-content">
67
- <?php
68
- $comment_content = get_comment_text();
69
- $comment_content = wpautop( $comment_content );
70
- $sanitizer = new AMPFORWP_Content( $comment_content, array(), apply_filters( 'ampforwp_content_sanitizers', array(
71
- 'AMP_Img_Sanitizer' => array(),
72
- 'AMP_Video_Sanitizer' => array(),
73
- 'AMP_Style_Sanitizer' => array(),
74
- 'AMP_Iframe_Sanitizer' =>
75
- array(
76
- 'add_placeholder' => true,
77
- ) ) ) );
78
- $sanitized_comment_content = $sanitizer->get_amp_content();
79
- echo make_clickable( $sanitized_comment_content ); ?>
80
- </div>
81
- <?php do_action('ampforwp_reply_comment_form', $comment, $args, $depth); ?>
82
- </article>
83
- </li>
84
- <?php
85
- }
86
- wp_list_comments( array(
87
- //Allow comment pagination
88
- 'per_page' => AMPFORWP_COMMENTS_PER_PAGE ,
89
- 'style' => 'li',
90
- 'type' => 'comment',
91
- 'max_depth' => 5,
92
- 'avatar_size' => 0,
93
- 'callback' => 'ampforwp_custom_translated_comment',
94
- 'reverse_top_level' => true //Show the latest comments at the top of the list
95
- ), $comments); ?>
96
- </ul> <?php
97
- $max_page = get_comment_pages_count($comments, AMPFORWP_COMMENTS_PER_PAGE);
98
- $args = array(
99
- 'base' => add_query_arg( array('cpage' => '%#%', 'amp' => '1'), get_permalink() ),
100
- 'format' => '',
101
- 'total' => $max_page,
102
- 'echo' => false,
103
- 'add_fragment' => '#comments',
104
- );
105
- if ( paginate_comments_links($args) ) { ?>
106
- <div class="cmts-wrap">
107
- <?php echo paginate_comments_links( $args ); ?>
108
- </div>
109
- <?php } ?>
110
- </div> <!-- .amp-comments-wrapper -->
111
- <?php // if amp-comments extension is enabled then hide this button
112
- } // if ( $comments )
113
- if ( ! defined( 'AMP_COMMENTS_VERSION' ) ) { ?>
114
- <div class="amp-comment-button">
115
- <?php if ( comments_open($postID) ) { ?>
116
- <a href="<?php echo ampforwp_comment_button_url(); ?>" rel="nofollow"><?php echo esc_html(ampforwp_translation( $redux_builder_amp['amp-translator-leave-a-comment-text'], 'Leave a Comment' ) ); ?></a> <?php
117
- } else {
118
- echo "<p class='nocomments'>". esc_html( ampforwp_translation( $redux_builder_amp['amp-translator-comments-closed'], 'Comments are closed' ) )." </p>";
119
- }?>
120
- </div> <?php
121
- }?>
122
- </div>
123
- <?php do_action('ampforwp_after_comment_hook');
124
- }
125
- } // end $display_comments_on
126
- }
127
-
128
- //Facebook Comments
129
- function ampforwp_framework_get_facebook_comments(){
130
- global $redux_builder_amp;
131
- $facebook_comments_markup = $lang = $locale = '';
132
- $lang = $redux_builder_amp['ampforwp-fb-comments-lang'];
133
- $locale = 'data-locale = "'.$lang.'"';
134
- if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
135
- if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) {
136
- $facebook_comments_markup = '<div class="fb-comments" data-href="' . get_permalink() . '" data-width="800px" data-numposts="'.$redux_builder_amp['ampforwp-number-of-fb-no-of-comments'].'"></div>';
137
- }
138
- else {
139
- $facebook_comments_markup = '<section class="amp-facebook-comments">';
140
- $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
141
- layout="responsive" '. esc_attr($locale) .' data-numposts=';
142
- $facebook_comments_markup .= '"'. esc_attr($redux_builder_amp['ampforwp-number-of-fb-no-of-comments']). '"';
143
- if(ampforwp_get_data_consent()){
144
- $facebook_comments_markup .= ' data-block-on-consent ';
145
- }
146
- $facebook_comments_markup .= 'data-href="' . esc_html(get_permalink()) . '"';
147
- $facebook_comments_markup .= '></amp-facebook-comments></section>';
148
- }
149
- return $facebook_comments_markup;
150
- }
151
- }
152
-
153
- //Disqus Comments
154
- function ampforwp_framework_get_disqus_comments(){
155
- global $redux_builder_amp;
156
- $width = $height = 420;
157
-
158
- $layout = "";
159
- $layout = 'responsive';
160
- if ( isset($redux_builder_amp['ampforwp-disqus-layout']) && 'fixed' == $redux_builder_amp['ampforwp-disqus-layout'] ) {
161
- $layout = 'fixed';
162
-
163
- if ( isset($redux_builder_amp['ampforwp-disqus-height']) && $redux_builder_amp['ampforwp-disqus-height'] ) {
164
- $height = $redux_builder_amp['ampforwp-disqus-height'];
165
- }
166
- }
167
-
168
- if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
169
- global $post; $post_slug=$post->post_name;
170
-
171
- $disqus_script_host_url = "https://ampforwp.appspot.com/?api=". AMPFORWP_DISQUS_URL;
172
-
173
- if( $redux_builder_amp['ampforwp-disqus-host-position'] == 0 ) {
174
- $disqus_script_host_url = esc_url( $redux_builder_amp['ampforwp-disqus-host-file'] );
175
- }
176
-
177
- $disqus_url = $disqus_script_host_url.'?disqus_title='.$post_slug.'&url='.get_permalink().'&disqus_name='. esc_url( $redux_builder_amp['ampforwp-disqus-comments-name'] ) ."/embed.js" ;
178
- ?>
179
- <section class="amp-disqus-comments">
180
- <amp-iframe
181
- height=<?php echo esc_attr($height); ?>
182
- width=<?php echo esc_attr($width); ?>
183
- layout="<?php echo esc_attr($layout); ?>"
184
- sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
185
- frameborder="0"
186
- <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>
187
- src="<?php echo esc_url($disqus_url); ?>" >
188
- <div overflow tabindex="0" role="button" aria-label="Read more"><?php echo esc_html__('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
189
- </amp-iframe>
190
- </section>
191
- <?php
192
- }
193
- }
194
-
195
- function ampforwp_framework_get_vuukle_comments(){
196
- global $post, $redux_builder_amp;
197
- $apiKey ='';
198
- $tag_name ='';
199
- $img = get_the_post_thumbnail_url();
200
- $tags = get_the_tags($post->ID);
201
- if( isset($redux_builder_amp['ampforwp-vuukle-comments-apiKey']) && $redux_builder_amp['ampforwp-vuukle-comments-apiKey'] !== ""){
202
- $apiKey = $redux_builder_amp['ampforwp-vuukle-comments-apiKey'];
203
- }
204
- $siteUrl = trim(site_url(), '/');
205
- if (!preg_match('#^http(s)?://#', $siteUrl)) {
206
- $siteUrl = 'http://' . $siteUrl;
207
- }
208
- if($img == false){
209
- $img = plugins_url('accelerated-mobile-pages/images/150x150.png');
210
- }
211
- if($tags){
212
- foreach($tags as $individual_tag) {
213
- $tag_name = $individual_tag->name;
214
- }
215
- }
216
- $urlParts = parse_url($siteUrl);
217
- $siteUrl = preg_replace('/^www\./', '', $urlParts['host']);// remove www
218
- $srcUrl = 'https://cdn.vuukle.com/amp.html?';
219
- $srcUrl = add_query_arg('url' ,get_permalink(), $srcUrl);
220
- $srcUrl = add_query_arg('host' ,$siteUrl, $srcUrl);
221
- $srcUrl = add_query_arg('id' , $post->ID, $srcUrl);
222
- $srcUrl = add_query_arg('title' , urlencode($post->post_title), $srcUrl);
223
- $srcUrl = add_query_arg('img' , esc_url($img), $srcUrl);
224
- $srcUrl = add_query_arg('tags' , urlencode($tag_name), $srcUrl);
225
-
226
- $vuukle_html = '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
227
-
228
- <div overflow tabindex="0" role="button" aria-label="Show comments">Show comments</div>';
229
- echo $vuukle_html;
230
- }
231
-
232
- function ampforwp_framework_get_spotim_comments(){
233
- global $post, $redux_builder_amp;
234
- $spotId ='';
235
- if( isset($redux_builder_amp['ampforwp-spotim-comments-apiKey']) && $redux_builder_amp['ampforwp-spotim-comments-apiKey'] !== ""){
236
- $spotId = $redux_builder_amp['ampforwp-spotim-comments-apiKey'];
237
- }
238
- $srcUrl = 'https://amp.spot.im/production.html?';
239
- $srcUrl = add_query_arg('spotId' ,get_permalink(), $srcUrl);
240
- $srcUrl = add_query_arg('postId' , $post->ID, $srcUrl);
241
- $spotim_html = '<amp-iframe width="375" height="815" resizable sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation" layout="responsive"
242
- frameborder="0" src="'.esc_url($srcUrl).'">
243
- <amp-img placeholder height="815" layout="fill" src="//amp.spot.im/loader.png"></amp-img>
244
- <div overflow class="spot-im-amp-overflow" tabindex="0" role="button" aria-label="Read more">Load more...</div>
245
- </amp-iframe>';
246
- echo $spotim_html;
247
- }
248
-
249
- // Comments Scripts
250
- add_filter( 'ampforwp_post_template_data', 'ampforwp_framework_comments_scripts' );
251
- function ampforwp_framework_comments_scripts( $data ) {
252
-
253
- $facebook_comments_check = ampforwp_framework_get_facebook_comments();
254
- global $redux_builder_amp;
255
- $is_pb_enabled = '';
256
- $is_pb_enabled = checkAMPforPageBuilderStatus(get_the_ID());
257
- $display_comments_on = "";
258
- $display_comments_on = ampforwp_get_comments_status();
259
- $isBBPress = (function_exists('is_bbpress') ? is_bbpress() : false );
260
- if ( $facebook_comments_check && true == ampforwp_get_setting('ampforwp-facebook-comments-support') && $display_comments_on && !is_front_page() && !$is_pb_enabled && !$isBBPress ) {
261
- if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
262
- $data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
263
- }
264
- }
265
- if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && $display_comments_on && comments_open() && !$is_pb_enabled ) {
266
- if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
267
- if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
268
- $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
269
- }
270
- }
271
- }
272
- if ( isset($redux_builder_amp['ampforwp-vuukle-comments-support'])
273
- && $redux_builder_amp['ampforwp-vuukle-comments-support']
274
- && $display_comments_on && comments_open() && !$is_pb_enabled
275
- ) {
276
- if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
277
- $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
278
- }
279
- if (ampforwp_get_setting('ampforwp-vuukle-Ads-before-comments') && empty( $data['amp_component_scripts']['amp-ad'] ) ) {
280
- $data['amp_component_scripts']['amp-ad'] = 'https://cdn.ampproject.org/v0/amp-ad-0.1.js';
281
- }
282
- }
283
- //spotim
284
- if ( isset($redux_builder_amp['ampforwp-spotim-comments-support'])
285
- && $redux_builder_amp['ampforwp-spotim-comments-support']
286
- && $display_comments_on && comments_open() ) {
287
- if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
288
- $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
289
- }
290
-
291
- }
292
- return $data;
293
  }
1
+ <?php
2
+ function ampforwp_framework_get_comments(){
3
+ global $redux_builder_amp;
4
+ $display_comments_on = "";
5
+ $display_comments_on = ampforwp_get_comments_status();
6
+ if ( $display_comments_on ) {
7
+ if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
8
+ echo ampforwp_framework_get_facebook_comments();
9
+ }
10
+
11
+ if ( $redux_builder_amp['ampforwp-disqus-comments-support'] ) {
12
+ ampforwp_framework_get_disqus_comments();
13
+ }
14
+ if ( $redux_builder_amp['ampforwp-vuukle-comments-support'] ) {
15
+ ampforwp_framework_get_vuukle_comments();
16
+ }
17
+ if ( $redux_builder_amp['ampforwp-spotim-comments-support'] ) {
18
+ ampforwp_framework_get_spotim_comments();
19
+ }
20
+
21
+ if ( isset($redux_builder_amp['wordpress-comments-support']) && true == $redux_builder_amp['wordpress-comments-support'] ) {
22
+ do_action('ampforwp_before_comment_hook'); ?>
23
+ <div class="amp-comments">
24
+ <?php
25
+ // Gather comments for a specific page/post
26
+ $postID = $comments = $max_page = "";
27
+ $postID = get_the_ID();
28
+ if ( ampforwp_is_front_page() ) {
29
+ $postID = ampforwp_get_frontpage_id();
30
+ }
31
+ $comments = get_comments(array(
32
+ 'post_id' => $postID,
33
+ 'status' => 'approve' //Change this to the type of comments to be displayed
34
+ ));
35
+
36
+ if ( $comments ) { ?>
37
+ <div id="comments" class="amp-comments-wrapper">
38
+ <h3><span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'], 'View Comments' ));?></span></h3>
39
+ <ul><?php
40
+ // Display the list of comments
41
+ function ampforwp_custom_translated_comment($comment, $args, $depth){
42
+ $GLOBALS['comment'] = $comment;
43
+ global $redux_builder_amp;
44
+ $comment_author_img_url = "";
45
+ $comment_author_img_url = ampforwp_get_comments_gravatar( $comment );
46
+
47
+ ?>
48
+ <li id="li-comment-<?php comment_ID() ?>"
49
+ <?php comment_class(); ?> >
50
+ <article id="comment-<?php comment_ID(); ?>" class="comment-body">
51
+ <footer class="comment-meta">
52
+ <?php if($comment_author_img_url){ ?>
53
+ <amp-img src="<?php echo esc_url($comment_author_img_url); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
54
+ <?php } ?>
55
+ <div class="comment-author vcard">
56
+ <?php
57
+ printf('<b class="fn">%s</b> <span class="says">'.esc_html(ampforwp_translation(ampforwp_get_setting('amp-translator-says-text'),'says')).':</span>', get_comment_author_link()) ?>
58
+ </div>
59
+ <div class="comment-metadata">
60
+ <a href="<?php echo htmlspecialchars( trailingslashit( get_comment_link( $comment->comment_ID ) ) ) ?>">
61
+ <?php printf( ampforwp_translation( ('%1$s '. ampforwp_translation($redux_builder_amp['amp-translator-at-text'],'at').' %2$s'), '%1$s at %2$s') , get_comment_date(), get_comment_time())?>
62
+ </a>
63
+ <?php edit_comment_link( ampforwp_translation( $redux_builder_amp['amp-translator-Edit-text'], 'Edit' ) ) ?>
64
+ </div>
65
+ </footer>
66
+ <div class="comment-content">
67
+ <?php
68
+ $comment_content = get_comment_text();
69
+ $comment_content = wpautop( $comment_content );
70
+ $sanitizer = new AMPFORWP_Content( $comment_content, array(), apply_filters( 'ampforwp_content_sanitizers', array(
71
+ 'AMP_Img_Sanitizer' => array(),
72
+ 'AMP_Video_Sanitizer' => array(),
73
+ 'AMP_Style_Sanitizer' => array(),
74
+ 'AMP_Iframe_Sanitizer' =>
75
+ array(
76
+ 'add_placeholder' => true,
77
+ ) ) ) );
78
+ $sanitized_comment_content = $sanitizer->get_amp_content();
79
+ echo make_clickable( $sanitized_comment_content ); ?>
80
+ </div>
81
+ <?php do_action('ampforwp_reply_comment_form', $comment, $args, $depth); ?>
82
+ </article>
83
+ </li>
84
+ <?php
85
+ }
86
+ wp_list_comments( array(
87
+ //Allow comment pagination
88
+ 'per_page' => AMPFORWP_COMMENTS_PER_PAGE ,
89
+ 'style' => 'li',
90
+ 'type' => 'comment',
91
+ 'max_depth' => 5,
92
+ 'avatar_size' => 0,
93
+ 'callback' => 'ampforwp_custom_translated_comment',
94
+ 'reverse_top_level' => true //Show the latest comments at the top of the list
95
+ ), $comments); ?>
96
+ </ul> <?php
97
+ $max_page = get_comment_pages_count($comments, AMPFORWP_COMMENTS_PER_PAGE);
98
+ $args = array(
99
+ 'base' => add_query_arg( array('cpage' => '%#%', 'amp' => '1'), get_permalink() ),
100
+ 'format' => '',
101
+ 'total' => $max_page,
102
+ 'echo' => false,
103
+ 'add_fragment' => '#comments',
104
+ );
105
+ if ( paginate_comments_links($args) ) { ?>
106
+ <div class="cmts-wrap">
107
+ <?php echo paginate_comments_links( $args ); ?>
108
+ </div>
109
+ <?php } ?>
110
+ </div> <!-- .amp-comments-wrapper -->
111
+ <?php // if amp-comments extension is enabled then hide this button
112
+ } // if ( $comments )
113
+ if ( ! defined( 'AMP_COMMENTS_VERSION' ) ) { ?>
114
+ <div class="amp-comment-button">
115
+ <?php if ( comments_open($postID) ) { ?>
116
+ <a href="<?php echo ampforwp_comment_button_url(); ?>" rel="nofollow"><?php echo esc_html(ampforwp_translation( $redux_builder_amp['amp-translator-leave-a-comment-text'], 'Leave a Comment' ) ); ?></a> <?php
117
+ } else {
118
+ echo "<p class='nocomments'>". esc_html( ampforwp_translation( $redux_builder_amp['amp-translator-comments-closed'], 'Comments are closed' ) )." </p>";
119
+ }?>
120
+ </div> <?php
121
+ }?>
122
+ </div>
123
+ <?php do_action('ampforwp_after_comment_hook');
124
+ }
125
+ } // end $display_comments_on
126
+ }
127
+
128
+ //Facebook Comments
129
+ function ampforwp_framework_get_facebook_comments(){
130
+ global $redux_builder_amp;
131
+ $facebook_comments_markup = $lang = $locale = '';
132
+ $lang = $redux_builder_amp['ampforwp-fb-comments-lang'];
133
+ $locale = 'data-locale = "'.$lang.'"';
134
+ if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
135
+ if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) {
136
+ $facebook_comments_markup = '<div class="fb-comments" data-href="' . get_permalink() . '" data-width="800px" data-numposts="'.$redux_builder_amp['ampforwp-number-of-fb-no-of-comments'].'"></div>';
137
+ }
138
+ else {
139
+ $facebook_comments_markup = '<section class="amp-facebook-comments">';
140
+ $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
141
+ layout="responsive" '. esc_attr($locale) .' data-numposts=';
142
+ $facebook_comments_markup .= '"'. esc_attr($redux_builder_amp['ampforwp-number-of-fb-no-of-comments']). '"';
143
+ if(ampforwp_get_data_consent()){
144
+ $facebook_comments_markup .= ' data-block-on-consent ';
145
+ }
146
+ $facebook_comments_markup .= 'data-href="' . esc_html(get_permalink()) . '"';
147
+ $facebook_comments_markup .= '></amp-facebook-comments></section>';
148
+ }
149
+ return $facebook_comments_markup;
150
+ }
151
+ }
152
+
153
+ //Disqus Comments
154
+ function ampforwp_framework_get_disqus_comments(){
155
+ global $redux_builder_amp;
156
+ $width = $height = 420;
157
+
158
+ $layout = "";
159
+ $layout = 'responsive';
160
+ if ( isset($redux_builder_amp['ampforwp-disqus-layout']) && 'fixed' == $redux_builder_amp['ampforwp-disqus-layout'] ) {
161
+ $layout = 'fixed';
162
+
163
+ if ( isset($redux_builder_amp['ampforwp-disqus-height']) && $redux_builder_amp['ampforwp-disqus-height'] ) {
164
+ $height = $redux_builder_amp['ampforwp-disqus-height'];
165
+ }
166
+ }
167
+
168
+ if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
169
+ global $post; $post_slug=$post->post_name;
170
+
171
+ $disqus_script_host_url = "https://ampforwp.appspot.com/?api=". AMPFORWP_DISQUS_URL;
172
+
173
+ if( $redux_builder_amp['ampforwp-disqus-host-position'] == 0 ) {
174
+ $disqus_script_host_url = esc_url( $redux_builder_amp['ampforwp-disqus-host-file'] );
175
+ }
176
+
177
+ $disqus_url = $disqus_script_host_url.'?disqus_title='.$post_slug.'&url='.get_permalink().'&disqus_name='. esc_url( $redux_builder_amp['ampforwp-disqus-comments-name'] ) ."/embed.js" ;
178
+ ?>
179
+ <section class="amp-disqus-comments">
180
+ <amp-iframe
181
+ height=<?php echo esc_attr($height); ?>
182
+ width=<?php echo esc_attr($width); ?>
183
+ layout="<?php echo esc_attr($layout); ?>"
184
+ sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
185
+ frameborder="0"
186
+ <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>
187
+ src="<?php echo esc_url($disqus_url); ?>" >
188
+ <div overflow tabindex="0" role="button" aria-label="Read more"><?php echo esc_html__('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
189
+ </amp-iframe>
190
+ </section>
191
+ <?php
192
+ }
193
+ }
194
+
195
+ function ampforwp_framework_get_vuukle_comments(){
196
+ global $post, $redux_builder_amp;
197
+ $apiKey ='';
198
+ $tag_name ='';
199
+ $img = get_the_post_thumbnail_url();
200
+ $tags = get_the_tags($post->ID);
201
+ if( isset($redux_builder_amp['ampforwp-vuukle-comments-apiKey']) && $redux_builder_amp['ampforwp-vuukle-comments-apiKey'] !== ""){
202
+ $apiKey = $redux_builder_amp['ampforwp-vuukle-comments-apiKey'];
203
+ }
204
+ $siteUrl = trim(site_url(), '/');
205
+ if (!preg_match('#^http(s)?://#', $siteUrl)) {
206
+ $siteUrl = 'http://' . $siteUrl;
207
+ }
208
+ if($img == false){
209
+ $img = plugins_url('accelerated-mobile-pages/images/150x150.png');
210
+ }
211
+ if($tags){
212
+ foreach($tags as $individual_tag) {
213
+ $tag_name = $individual_tag->name;
214
+ }
215
+ }
216
+ $urlParts = parse_url($siteUrl);
217
+ $siteUrl = preg_replace('/^www\./', '', $urlParts['host']);// remove www
218
+ $srcUrl = 'https://cdn.vuukle.com/amp.html?';
219
+ $srcUrl = add_query_arg('url' ,get_permalink(), $srcUrl);
220
+ $srcUrl = add_query_arg('host' ,$siteUrl, $srcUrl);
221
+ $srcUrl = add_query_arg('id' , $post->ID, $srcUrl);
222
+ $srcUrl = add_query_arg('title' , urlencode($post->post_title), $srcUrl);
223
+ $srcUrl = add_query_arg('img' , esc_url($img), $srcUrl);
224
+ $srcUrl = add_query_arg('tags' , urlencode($tag_name), $srcUrl);
225
+
226
+ $vuukle_html = '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
227
+
228
+ <div overflow tabindex="0" role="button" aria-label="Show comments">Show comments</div>';
229
+ echo $vuukle_html;
230
+ }
231
+
232
+ function ampforwp_framework_get_spotim_comments(){
233
+ global $post, $redux_builder_amp;
234
+ $spotId ='';
235
+ if( isset($redux_builder_amp['ampforwp-spotim-comments-apiKey']) && $redux_builder_amp['ampforwp-spotim-comments-apiKey'] !== ""){
236
+ $spotId = $redux_builder_amp['ampforwp-spotim-comments-apiKey'];
237
+ }
238
+ $srcUrl = 'https://amp.spot.im/production.html?';
239
+ $srcUrl = add_query_arg('spotId' ,get_permalink(), $srcUrl);
240
+ $srcUrl = add_query_arg('postId' , $post->ID, $srcUrl);
241
+ $spotim_html = '<amp-iframe width="375" height="815" resizable sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation" layout="responsive"
242
+ frameborder="0" src="'.esc_url($srcUrl).'">
243
+ <amp-img placeholder height="815" layout="fill" src="//amp.spot.im/loader.png"></amp-img>
244
+ <div overflow class="spot-im-amp-overflow" tabindex="0" role="button" aria-label="Read more">Load more...</div>
245
+ </amp-iframe>';
246
+ echo $spotim_html;
247
+ }
248
+
249
+ // Comments Scripts
250
+ add_filter( 'ampforwp_post_template_data', 'ampforwp_framework_comments_scripts' );
251
+ function ampforwp_framework_comments_scripts( $data ) {
252
+
253
+ $facebook_comments_check = ampforwp_framework_get_facebook_comments();
254
+ global $redux_builder_amp;
255
+ $is_pb_enabled = '';
256
+ $is_pb_enabled = checkAMPforPageBuilderStatus(get_the_ID());
257
+ $display_comments_on = "";
258
+ $display_comments_on = ampforwp_get_comments_status();
259
+ $isBBPress = (function_exists('is_bbpress') ? is_bbpress() : false );
260
+ if ( $facebook_comments_check && true == ampforwp_get_setting('ampforwp-facebook-comments-support') && $display_comments_on && !is_front_page() && !$is_pb_enabled && !$isBBPress ) {
261
+ if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
262
+ $data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
263
+ }
264
+ }
265
+ if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && $display_comments_on && comments_open() && !$is_pb_enabled ) {
266
+ if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
267
+ if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
268
+ $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
269
+ }
270
+ }
271
+ }
272
+ if ( isset($redux_builder_amp['ampforwp-vuukle-comments-support'])
273
+ && $redux_builder_amp['ampforwp-vuukle-comments-support']
274
+ && $display_comments_on && comments_open() && !$is_pb_enabled
275
+ ) {
276
+ if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
277
+ $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
278
+ }
279
+ if (ampforwp_get_setting('ampforwp-vuukle-Ads-before-comments') && empty( $data['amp_component_scripts']['amp-ad'] ) ) {
280
+ $data['amp_component_scripts']['amp-ad'] = 'https://cdn.ampproject.org/v0/amp-ad-0.1.js';
281
+ }
282
+ }
283
+ //spotim
284
+ if ( isset($redux_builder_amp['ampforwp-spotim-comments-support'])
285
+ && $redux_builder_amp['ampforwp-spotim-comments-support']
286
+ && $display_comments_on && comments_open() ) {
287
+ if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
288
+ $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
289
+ }
290
+
291
+ }
292
+ return $data;
293
  }
components/components-core.php CHANGED
@@ -1,708 +1,708 @@
1
- <?php
2
- use AMPforWP\AMPVendor\AMP_Post_Template;
3
- use AMPforWP\AMPVendor\AMP_HTML_Utils;
4
- global $redux_builder_amp;
5
- $ampforwpTemplate = '';
6
- $loadComponent = array();
7
- $scriptComponent = array();
8
- $supportComponent = array('AMP-search','AMP-menu','AMP-logo','AMP-social-icons','AMP-sidebar','AMP-featured-image','AMP-author-box','AMP-loop','AMP-categories-tags','AMP-comments','AMP-post-navigation','AMP-related-posts','AMP-post-pagination','AMP-call-now', 'AMP-breadcrumb','AMP-gdpr');
9
-
10
- add_filter( 'amp_post_template_data', 'ampforwp_framework_add_and_form_scripts',20);
11
- function ampforwp_framework_add_and_form_scripts($data) {
12
- global $scriptComponent, $loadComponent;
13
-
14
- if(count($scriptComponent)>0){
15
- foreach ($scriptComponent as $key => $value) {
16
- if ( empty( $data['amp_component_scripts'][$key] ) ) {
17
- $data['amp_component_scripts'][$key] = $value;
18
- }
19
- }
20
- }
21
- return $data;
22
- }
23
-
24
- //Component Loader
25
- function add_amp_theme_support($componentName){
26
- global $wpdb;
27
- global $loadComponent,$supportComponent;
28
- if($supportComponent){
29
- if(in_array($componentName, $supportComponent)){
30
- $loadComponent[$componentName] = true;
31
- ampforwp_loadComponents($componentName);
32
- return true;
33
- }
34
- }
35
- return false;
36
- }
37
- //Include the Component file
38
- function ampforwp_loadComponents($componentName){
39
- global $wpdb;
40
- if(empty($componentName)) return '';
41
- $componentName = str_replace("AMP-", "", $componentName);
42
-
43
- $file = AMP_FRAMEWORK_COMOPNENT_DIR_PATH.'/'.$componentName.'/'.$componentName.".php";
44
- if(!file_exists($file)){
45
- return '';
46
- }
47
- include_once($file);
48
- }
49
-
50
- // Icons
51
- $amp_icons_css = array();
52
- function add_amp_icon($args=array()){
53
- global $amp_icons_css, $redux_builder_amp;
54
- $amp_icons_css_array = include AMPFORWP_PLUGIN_DIR .'includes/icons/amp-icons.php';
55
- foreach ($args as $key ) {
56
- if(isset($amp_icons_css_array[$key]))
57
- $amp_icons_css[$key] = $amp_icons_css_array[$key];
58
- }
59
- // Design-1,2,3
60
- if ( 1 == $redux_builder_amp['amp-design-selector'] || 2 == $redux_builder_amp['amp-design-selector'] || 3 == $redux_builder_amp['amp-design-selector'] ) {
61
- add_action('amp_post_template_css', 'amp_icon_css',999);
62
-
63
- }
64
- else
65
- add_action('amp_css', 'amp_icon_css');
66
-
67
- }
68
- function amp_icon_css(){
69
- global $amp_icons_css, $redux_builder_amp;
70
- foreach ($amp_icons_css as $key => $value) {
71
- // TODO: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/2651
72
- echo $value;
73
- }
74
-
75
- // Add @font-face for Design-1,2,3
76
- if ( 1 == $redux_builder_amp['amp-design-selector'] || 2 == $redux_builder_amp['amp-design-selector'] || 3 == $redux_builder_amp['amp-design-selector'] ) { ?>
77
- @font-face {font-family: 'icomoon';font-style: normal;font-weight: normal;font-display: swap;src: local('icomoon'), local('icomoon'), url('<?php echo esc_url(plugin_dir_url(__FILE__)) ?>icomoon/icomoon.ttf');}
78
- [class^="icon-"], [class*=" icon-"] {font-family: 'icomoon';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
79
- <?php }
80
- }
81
-
82
- /**
83
- * Component Functions
84
- **/
85
-
86
- //Search Component Utilities
87
- function amp_search(){
88
- global $loadComponent;
89
- if(isset($loadComponent['AMP-search']) && $loadComponent['AMP-search']==true){
90
- ampforwp_framework_get_search_form();
91
- }
92
- }
93
-
94
- // Logo Component Utilitis
95
- function amp_logo(){
96
- global $loadComponent;
97
- if(isset($loadComponent['AMP-logo']) && $loadComponent['AMP-logo']==true){
98
- ampforwp_framework_get_logo();
99
- }
100
- }
101
-
102
- // Title
103
- function amp_title(){
104
- global $redux_builder_amp, $post;
105
- $ID = '';
106
- if( ampforwp_is_front_page() && ampforwp_get_frontpage_id() ){
107
- if( $redux_builder_amp['ampforwp-title-on-front-page'] ) {
108
- $ID = ampforwp_get_frontpage_id();
109
- }
110
- }
111
- elseif ( ampforwp_polylang_front_page() ) {
112
- $ID = pll_get_post(get_option('page_on_front'));
113
- }
114
- else
115
- $ID = $post->ID;
116
- if( $ID!=null ){
117
- do_action('ampforwp_above_the_title');
118
- ?><h1 class="amp-post-title"><?php
119
- $ampforwp_title = get_the_title($ID);
120
- $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
121
- echo wp_kses_data( $ampforwp_title );
122
- ?></h1><?php
123
- do_action('ampforwp_below_the_title');
124
- }
125
- }
126
-
127
- // Excerpt
128
- function amp_excerpt( $no_of_words=15 ) {
129
- global $redux_builder_amp, $post;
130
- $post_id = '';
131
- $no_of_words = (int) $no_of_words;
132
-
133
- if ( ampforwp_is_front_page() ) {
134
- $post_id = ampforwp_get_frontpage_id();
135
- }
136
- else
137
- $post_id = $post->ID;
138
- if ( $post_id != null && true == $redux_builder_amp['enable-excerpt-single'] ) { ?>
139
- <p><?php
140
- if ( has_excerpt() ) {
141
- $content = get_the_excerpt();
142
- } else {
143
- $content = get_the_content();
144
- }
145
- /* `wp_trim_words` will strip all the tags
146
- as it has `wp_strip_all_tags` inside to clean */
147
- echo wp_trim_words( strip_shortcodes( $content ) , $no_of_words );
148
- ?></p><?php
149
- }
150
- }
151
-
152
-
153
- //Menus
154
- function amp_menu($echo=true, $menu_args=array(), $type='header'){
155
- if ( ($type == 'header' && ! has_nav_menu( 'amp-menu' )) || ( 'footer' == $type && ! has_nav_menu( 'amp-footer-menu' ) ) ) {
156
- return false;
157
- }
158
- global $loadComponent;
159
- if(isset($loadComponent['AMP-menu']) && $loadComponent['AMP-menu']==true){
160
- if ( false != get_transient('ampforwp_header_menu') && 'header' == $type ){
161
- $amp_menu = get_transient('ampforwp_header_menu');
162
- }
163
- elseif (false != get_transient('ampforwp_footer_menu') && 'footer' == $type) {
164
- $amp_menu = get_transient('ampforwp_footer_menu');
165
- }
166
- else{
167
- $amp_menu = amp_menu_html($echo, $menu_args, $type);
168
- }
169
- if ( false == $echo ) {
170
- return $amp_menu;
171
- }
172
- else
173
- echo $amp_menu;
174
- }
175
- }
176
-
177
- // Social Icons component
178
- function amp_social( $social_icons="" ) {
179
- global $loadComponent;
180
- $amp_social = array();
181
- //Supported social icons
182
- $amp_social = array( 'twitter', 'facebook', 'pinterest', 'google-plus', 'linkedin', 'youtube', 'instagram', 'reddit', 'VKontakte', 'Odnoklassniki', 'snapchat', 'tumblr' );
183
- if ( isset($loadComponent['AMP-social-icons']) && true == $loadComponent['AMP-social-icons'] ) {
184
- if ( null != $social_icons ) {
185
- ampforwp_framework_get_social_icons($social_icons);
186
- }
187
- else
188
- ampforwp_framework_get_social_icons($amp_social);
189
- }
190
- }
191
-
192
- //Sidebar
193
- function amp_sidebar($tag='start',$data=array()){
194
- global $loadComponent;
195
- if(isset($loadComponent['AMP-sidebar']) && $loadComponent['AMP-sidebar']==true){
196
- ampforwp_framework_get_sideabr($tag,$data);
197
- }
198
- }
199
-
200
- //Featured Image
201
- function amp_featured_image( ){
202
- global $loadComponent;
203
- if(isset($loadComponent['AMP-featured-image']) && $loadComponent['AMP-featured-image']==true){
204
- ampforwp_framework_get_featured_image( );
205
- }
206
- }
207
-
208
- // Author Box
209
- function amp_author_box($args=array() ){
210
- global $loadComponent;
211
- if(isset($loadComponent['AMP-author-box']) && $loadComponent['AMP-author-box']==true){
212
- ampforwp_framework_get_author_box($args);
213
- }
214
- }
215
-
216
- // Categories List
217
- function amp_categories_list( $separator = '' ){
218
- global $loadComponent;
219
- if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
220
- ampforwp_framework_get_categories_list( $separator );
221
- }
222
- }
223
- // Tags List
224
- function amp_tags_list( $separator = '' ){
225
- global $loadComponent;
226
- if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
227
- ampforwp_framework_get_tags_list( $separator );
228
- }
229
- }
230
-
231
- // Comments
232
- function amp_comments( ){
233
- global $loadComponent;
234
- if(isset($loadComponent['AMP-comments']) && $loadComponent['AMP-comments']==true){
235
- ampforwp_framework_get_comments( );
236
- }
237
- }
238
-
239
- // Post Navigation
240
- function amp_post_navigation( ){
241
- global $loadComponent;
242
- if(isset($loadComponent['AMP-post-navigation']) && $loadComponent['AMP-post-navigation']==true){
243
- echo ampforwp_framework_get_post_navigation();
244
- }
245
- }
246
-
247
- // Related Posts
248
- function amp_related_posts($argsdata = array()){
249
- global $loadComponent;
250
- if(isset($loadComponent['AMP-related-posts']) && $loadComponent['AMP-related-posts']==true){
251
- echo ampforwp_framework_get_related_posts( $argsdata);
252
- }
253
- }
254
-
255
- // Post Pagination
256
- function amp_post_pagination($args='' ){
257
- global $loadComponent;
258
- if(isset($loadComponent['AMP-post-pagination']) && $loadComponent['AMP-post-pagination']==true){
259
- ampforwp_framework_get_post_pagination($args);
260
- }
261
- }
262
-
263
- // Breadcrumb
264
- function amp_breadcrumb(){
265
- global $loadComponent;
266
- if ( isset($loadComponent['AMP-breadcrumb']) && true == $loadComponent['AMP-breadcrumb'] ) {
267
- echo amp_breadcrumb_output();
268
- }
269
- }
270
-
271
- // GDPR component
272
- function amp_gdpr(){
273
- global $loadComponent;
274
- if ( isset($loadComponent['AMP-gdpr']) && true == $loadComponent['AMP-gdpr'] ) {
275
- echo amp_gdpr_output();
276
- }
277
- }
278
-
279
- //Get Core of AMP HTML
280
- function amp_header_core(){
281
- global $ampforwpTemplate;
282
- $post_id = get_queried_object_id();
283
- if ( ampforwp_polylang_front_page() ) {
284
- $post_id = pll_get_post(get_option('page_on_front'));
285
- }
286
- $thisTemplate = $ampforwpTemplate;
287
- global $redux_builder_amp;
288
- $html_tag_attributes = AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) );
289
-
290
- $bodyClass = '';
291
- if ( is_single() || is_page() ) {
292
- $bodyClass = 'single-post';
293
- $bodyClass .= ( is_page()? ' amp-single-page ' : ' amp-single ');
294
-
295
- }
296
- // Archive
297
- if ( is_archive() ) {
298
- $bodyClass = 'amp-archive';
299
- }
300
- $ampforwp_custom_post_page = ampforwp_custom_post_page();
301
-
302
- add_action('amp_post_template_head','ampforwp_sanitize_archive_desc');
303
- function ampforwp_sanitize_archive_desc(){
304
- $description = get_the_archive_description();
305
- if ($description) {
306
- $sanitizer = new AMPFORWP_Content( $description, array(),
307
- apply_filters( 'ampforwp_content_sanitizers',
308
- array(
309
- 'AMP_Style_Sanitizer' => array(),
310
- 'AMP_Blacklist_Sanitizer' => array(),
311
- 'AMP_Img_Sanitizer' => array(),
312
- 'AMP_Video_Sanitizer' => array(),
313
- 'AMP_Audio_Sanitizer' => array(),
314
- 'AMP_Iframe_Sanitizer' => array(
315
- 'add_placeholder' => true,
316
- )
317
- ) ) );
318
-
319
- $amp_component_scripts = $sanitizer->amp_scripts;
320
-
321
- if ( $sanitizer && $amp_component_scripts) {
322
- foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
323
- <script custom-element="<?php echo esc_attr($ampforwp_service); ?>" src="<?php echo esc_url($ampforwp_js_file); ?>" async></script> <?php
324
- }
325
- }
326
- }
327
- }
328
- // Homepage
329
- if ( is_home() ) {
330
-
331
- $bodyClass = 'amp-index amp-home'.esc_attr( $thisTemplate->get( 'body_class' ) );
332
- if ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
333
- $bodyClass = 'single-post design_3_wrapper';
334
- }
335
- if ( $ampforwp_custom_post_page == "page" && ampforwp_name_blog_page() ) {
336
- $current_url = home_url( $GLOBALS['wp']->request );
337
- $current_url_in_pieces = explode( '/', $current_url );
338
-
339
- if( in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) {
340
- $bodyClass = 'amp-index' .esc_attr( $thisTemplate->get( 'body_class' ) );
341
- }
342
- }
343
-
344
- }
345
- // is_search
346
- if ( is_search() ) {
347
- $bodyClass = 'amp_home_body archives_body design_3_wrapper';
348
- }
349
- if( true == $redux_builder_amp['amp-rtl-select-option'] ){
350
- $bodyClass .= ' rtl ';
351
- }
352
- ?><!doctype html>
353
- <html <?php echo esc_attr(ampforwp_amp_nonamp_convert('amp ')); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
354
- <head>
355
- <meta charset="utf-8">
356
- <?php do_action('amp_experiment_meta', $thisTemplate); ?>
357
- <link rel="dns-prefetch" href="https://cdn.ampproject.org">
358
- <?php do_action( 'amp_meta', $thisTemplate ); ?>
359
- <?php
360
- if(ampforwp_amp_nonamp_convert("", "check")){
361
- echo '<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">';
362
- wp_head();
363
-
364
- }else{
365
- if(is_search()){?>
366
- <meta name="robots" content="noindex,nofollow"/>
367
- <?php }
368
- do_action( 'amp_post_template_head', $thisTemplate );
369
- } ?>
370
- <style amp-custom>
371
- <?php $thisTemplate->load_parts( array( 'style' ) ); ?>
372
- <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
373
- <?php do_action( 'amp_css', $thisTemplate ); ?>
374
- <?php $custom_css = ampforwp_get_setting('css_editor');
375
- $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
376
- echo $sanitized_css; ?>
377
- </style>
378
- <?php do_action('ampforwp_before_head', $thisTemplate); ?>
379
- </head>
380
- <body <?php ampforwp_body_class($bodyClass); ?>>
381
- <?php do_action('amp_start', $thisTemplate); ?>
382
- <?php do_action('ampforwp_body_beginning', $thisTemplate);
383
- }
384
-
385
- function amp_header(){
386
- global $ampforwpTemplate;
387
- $post_id = get_queried_object_id();
388
- if ( ampforwp_polylang_front_page() ) {
389
- $post_id = pll_get_post(get_option('page_on_front'));
390
- }
391
- $thisTemplate = $ampforwpTemplate;
392
- $thisTemplate->load_parts( array( 'header' ) );
393
- do_action( 'amp_after_header', $thisTemplate );
394
- do_action( 'ampforwp_after_header', $thisTemplate );
395
- do_action('ampforwp_post_before_design_elements') ?>
396
- <?php }
397
-
398
- function amp_footer(){
399
- global $ampforwpTemplate;
400
- $post_id = get_queried_object_id();
401
- if ( ampforwp_polylang_front_page() ) {
402
- $post_id = pll_get_post(get_option('page_on_front'));
403
- }
404
- $thisTemplate = $ampforwpTemplate;
405
- do_action( 'amp_before_footer', $thisTemplate );
406
- do_action( 'amp_post_template_above_footer', $thisTemplate );
407
-
408
- $thisTemplate->load_parts( array( 'footer' ) );
409
-
410
- }
411
-
412
- function amp_footer_core(){
413
- global $ampforwpTemplate;
414
- $post_id = get_queried_object_id();
415
- if ( ampforwp_polylang_front_page() ) {
416
- $post_id = pll_get_post(get_option('page_on_front'));
417
- }
418
- $thisTemplate = $ampforwpTemplate;
419
- if(ampforwp_amp_nonamp_convert("", "check")){
420
- wp_footer();
421
- }
422
- else {
423
- do_action( 'amp_post_template_footer', $thisTemplate );
424
- do_action('ampforwp_global_after_footer');
425
- do_action('amp_end',$thisTemplate);
426
- }
427
- amp_back_to_top_link();
428
- // Close the body and Html tags ?>
429
- </body>
430
- </html><?php
431
- }
432
-
433
- function amp_non_amp_link(){
434
- $allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
435
- global $redux_builder_amp;
436
- echo '<span>' . strip_tags(ampforwp_translation($redux_builder_amp['amp-translator-footer-text'],'All Rights Reserved'),$allowed_tags) . '</span>' ;
437
- if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') { ampforwp_view_nonamp(); }
438
- }
439
-
440
- // Back to Top
441
- function amp_back_to_top_link(){
442
- global $redux_builder_amp;
443
- if(true == ampforwp_get_setting('ampforwp-footer-top')){?>
444
- <a id="scrollToTopButton" title="back to top" on="tap:backtotop.scrollTo(duration=500)" class="btt" ></a>
445
- <amp-animation id="showAnim"
446
- layout="nodisplay">
447
- <script type="application/json">
448
- {
449
- "duration": "400ms",
450
- "fill": "both",
451
- "iterations": "1",
452
- "direction": "alternate",
453
- "animations": [{
454
- "selector": "#scrollToTopButton",
455
- "keyframes": [{
456
- "opacity": "1",
457
- "visibility": "visible"
458
- }]
459
- }]
460
- }
461
- </script>
462
- </amp-animation>
463
- <amp-animation id="hideAnim"
464
- layout="nodisplay">
465
- <script type="application/json">
466
- {
467
- "duration": "400ms",
468
- "fill": "both",
469
- "iterations": "1",
470
- "direction": "alternate",
471
- "animations": [{
472
- "selector": "#scrollToTopButton",
473
- "keyframes": [{
474
- "opacity": "0",
475
- "visibility": "hidden"
476
- }]
477
- }]
478
- }
479
- </script>
480
- </amp-animation>
481
- <?php }
482
- }
483
-
484
- function amp_loop_template(){
485
- global $ampforwpTemplate;
486
- $post_id = get_queried_object_id();
487
- $thisTemplate = $ampforwpTemplate;
488
- do_action('amp_before_loop',$thisTemplate);
489
- $thisTemplate->load_parts( array( 'loop' ) );
490
- do_action('amp_after_loop',$thisTemplate);
491
- }
492
-
493
- // The Content
494
- function amp_content($post_id= ''){
495
- global $redux_builder_amp, $post, $ampforwpTemplate;
496
-
497
- if ( empty( $post_id )) {
498
- $post_id = get_queried_object_id();
499
- if ( ampforwp_is_front_page() ) {
500
- $post_id = ampforwp_get_frontpage_id();
501
- }
502
- elseif ( ampforwp_polylang_front_page() ) {
503
- $post_id = pll_get_post(get_option('page_on_front'));
504
- }
505
- }
506
-
507
- $thisTemplate = $ampforwpTemplate;
508
- if ( 1 == ampforwp_get_setting('amp-design-selector') ) {
509
- do_action('ampforwp_inside_post_content_before',$thisTemplate);
510
- }
511
- else{
512
- do_action('ampforwp_before_post_content',$thisTemplate);
513
- }
514
- $amp_custom_content_enable = get_post_meta( $thisTemplate->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
515
- // Normal Content
516
- if ( ! $amp_custom_content_enable ) {
517
- $ampforwp_the_content = $thisTemplate->get( 'post_amp_content' ); // amphtml content; no kses
518
- } else {
519
- // Custom/Alternative AMP content added through post meta
520
- $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
521
- }
522
- // Muffin Builder Compatibility #1455 #1893
523
- if ( function_exists('mfn_builder_print') && ! $amp_custom_content_enable ) {
524
- ob_start();
525
- mfn_builder_print( $thisTemplate->get( 'post_id' ) );
526
- $content = ob_get_contents();
527
- ob_end_clean();
528
- $sanitizer_obj = new AMPFORWP_Content( $content,
529
- array(),
530
- apply_filters( 'ampforwp_content_sanitizers',
531
- array( 'AMP_Img_Sanitizer' => array(),
532
- 'AMP_Blacklist_Sanitizer' => array(),
533
- 'AMP_Style_Sanitizer' => array(),
534
- 'AMP_Video_Sanitizer' => array(),
535
- 'AMP_Audio_Sanitizer' => array(),
536
- 'AMP_Iframe_Sanitizer' => array(
537
- 'add_placeholder' => true,
538
- ),
539
- )
540
- )
541
- );
542
- if ( ! get_post_meta( $post_id, 'mfn-post-hide-content', true ) && ampforwp_is_front_page() ) {
543
- $ampforwp_custom_amp_editor_content = '';
544
- $ampforwp_custom_amp_editor_content = $ampforwp_the_content;
545
- $ampforwp_the_content = $sanitizer_obj->get_amp_content();
546
- $ampforwp_the_content .= $ampforwp_custom_amp_editor_content;
547
- }
548
- else{
549
- $ampforwp_the_content = $sanitizer_obj->get_amp_content();
550
- }
551
- }
552
- $ampforwp_the_content = apply_filters('ampforwp_modify_the_content',$ampforwp_the_content);
553
- echo $ampforwp_the_content; // amphtml content, no kses
554
- do_action('ampforwp_after_post_content',$thisTemplate);
555
- }
556
-
557
- function amp_date( $args=array() ) {
558
-
559
- global $redux_builder_amp;
560
- if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
561
- $args = array('format' => 'traditional');
562
- }
563
- if ( (isset($args['format']) && $args['format'] == 'traditional') || 'time' == $args ) {
564
- $post_date = get_the_date() . ' '. get_the_time();
565
- } else {
566
- $post_date = human_time_diff(
567
- get_the_time('U', get_the_ID() ),
568
- current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
569
- 'ago');
570
- }
571
- $post_date = apply_filters('ampforwp_modify_post_date', $post_date);
572
- if(isset($args['custom_format']) && $args['custom_format']!=""){
573
- $post_date = date($args['custom_format'],get_the_time('U', get_the_ID() ));
574
- }
575
- if ( 'date' == $args || 'time' == $args ) {
576
- echo esc_attr($post_date) .' ';
577
- }
578
- else
579
- echo '<div class="loop-date">'.esc_attr($post_date).'</div>';
580
- }
581
-
582
- //Load font Compoment
583
- $fontComponent = array();
584
- function amp_post_load_custom_fonts(){
585
- global $fontComponent;
586
- if(count($fontComponent)){
587
- $fontComponent = array_unique($fontComponent);
588
- foreach ($fontComponent as $key => $value) {
589
- ?>
590
- <link rel="stylesheet" href="<?php echo esc_url( $value ); ?>">
591
- <?php
592
- }
593
- }
594
-
595
- }
596
- add_action( 'amp_meta', 'amp_post_load_custom_fonts');
597
- function amp_font($fontName){
598
- global $fontComponent;
599
- $fontComponent[] = $fontName;
600
- }
601
-
602
- // RTL Styling
603
- add_action('amp_css', 'amp_theme_framework_rtl_styles');
604
- if( ! function_exists('amp_theme_framework_rtl_styles') ){
605
- function amp_theme_framework_rtl_styles(){
606
- global $redux_builder_amp;
607
- if( true === $redux_builder_amp['amp-rtl-select-option'] ){ ?>
608
- body.rtl {direction: rtl;}
609
- body amp-carousel{ direction: ltr;}
610
- <?php }
611
- }
612
- }
613
-
614
- // Author Meta
615
- function amp_author_meta( $args ) {
616
- global $post;
617
- $author_name = false;
618
- $avatar = false;
619
- $avatar_size = 40;
620
- if ( isset($args['name']) ) {
621
- $author_name = $args['name'];
622
- }
623
- if ( 'name' === $args ) {
624
- $author_name = true;
625
- }
626
- if ( 'avatar' === $args || 'image' === $args ) {
627
- $avatar = true;
628
- }
629
- if ( isset($args['image']) ) {
630
- $avatar = $args['image'];
631
- }
632
- if ( isset($args['image_size']) ) {
633
- $avatar_size = $args['image_size'];
634
- }
635
- $post_author = get_userdata($post->post_author);
636
- $author_link = get_author_posts_url($post_author->ID);
637
- if ( $author_name ) {
638
- echo ' <a href="'. ampforwp_url_controller($author_link).'"> ' .esc_html( $post_author->display_name ).'</a>';
639
- }
640
- if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
641
- $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
642
- ?>
643
- <amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo esc_attr($avatar_size); ?>" height="<?php echo esc_attr($avatar_size); ?>" layout="fixed"></amp-img>
644
- <?php }
645
- elseif ( $avatar && false == ampforwp_gravatar_checker($post_author->user_email ) ) {
646
- $avatar_img = get_avatar( $post_author->user_email, $avatar_size );
647
- $amp_html_sanitizer = new AMPFORWP_Content( $avatar_img, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array() ) ) );
648
- $amp_html = $amp_html_sanitizer->get_amp_content();
649
- echo $amp_html; // amphtml content, no kses
650
- }
651
-
652
- }
653
-
654
- // amp-animation CSS #2819
655
- add_action('amp_post_template_css','ampforwp_backtotop_global_css');
656
- function ampforwp_backtotop_global_css(){
657
- if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
658
- .btt{
659
- position: fixed;
660
- <?php if( (is_single() && ampforwp_get_setting('enable-single-social-icons')) || (is_page() && true == ampforwp_get_setting('ampforwp-page-sticky-social')) ){ ?>
661
- bottom: 55px;
662
- <?php } else { ?>
663
- bottom: 20px;
664
- <?php } ?>
665
- right: 20px;
666
- background: rgba(71, 71, 71, 0.5);
667
- color: #fff;
668
- border-radius: 100%;
669
- width: 50px;
670
- height: 50px;
671
- }
672
- .btt:hover{color:#fff;background:#474747;}
673
- .btt:before{
674
- content: '\25be';
675
- display: block;
676
- font-size: 35px;
677
- font-weight: 600;
678
- color: #fff;
679
- transform: rotate(180deg);
680
- text-align: center;
681
- line-height: 1.5;
682
- }
683
- <?php } }
684
-
685
- // Fallback for amp_call_now #2782
686
- if ( !function_exists('amp_call_now') ) {
687
- function amp_call_now(){
688
- ampforwp_call_button_html_output();
689
- }
690
- }
691
- // AddThis Support #2416
692
- function ampforwp_addThis_support(){
693
- $data_pub_id = ampforwp_get_setting('add-this-pub-id');
694
- $data_widget_id = ampforwp_get_setting('add-this-widget-id');
695
- if ( is_single() || (is_page() && ampforwp_get_setting('ampforwp-page-social')) ) {
696
- if( ampforwp_get_setting('enable-add-this-option') ) {
697
- if( 4 == ampforwp_get_setting('amp-design-selector') && 'default' == ampforwp_get_setting('swift-add-this-position') ){
698
- $amp_addthis = '<amp-addthis width="290" height="92" data-pub-id="'.esc_html($data_pub_id).'" data-widget-id="'. esc_html($data_widget_id).'"></amp-addthis>';
699
- }
700
- else{
701
- $amp_addthis = '<amp-addthis width="320" height="92" data-pub-id="'.esc_html($data_pub_id).'" data-widget-id="'.esc_html($data_widget_id).'"></amp-addthis>';
702
- }
703
- do_action('ampforwp_before_social_icons_hook');
704
- return $amp_addthis;
705
- do_action('ampforwp_after_social_icons_hook');
706
- }
707
- }
708
  }
1
+ <?php
2
+ use AMPforWP\AMPVendor\AMP_Post_Template;
3
+ use AMPforWP\AMPVendor\AMP_HTML_Utils;
4
+ global $redux_builder_amp;
5
+ $ampforwpTemplate = '';
6
+ $loadComponent = array();
7
+ $scriptComponent = array();
8
+ $supportComponent = array('AMP-search','AMP-menu','AMP-logo','AMP-social-icons','AMP-sidebar','AMP-featured-image','AMP-author-box','AMP-loop','AMP-categories-tags','AMP-comments','AMP-post-navigation','AMP-related-posts','AMP-post-pagination','AMP-call-now', 'AMP-breadcrumb','AMP-gdpr');
9
+
10
+ add_filter( 'amp_post_template_data', 'ampforwp_framework_add_and_form_scripts',20);
11
+ function ampforwp_framework_add_and_form_scripts($data) {
12
+ global $scriptComponent, $loadComponent;
13
+
14
+ if(count($scriptComponent)>0){
15
+ foreach ($scriptComponent as $key => $value) {
16
+ if ( empty( $data['amp_component_scripts'][$key] ) ) {
17
+ $data['amp_component_scripts'][$key] = $value;
18
+ }
19
+ }
20
+ }
21
+ return $data;
22
+ }
23
+
24
+ //Component Loader
25
+ function add_amp_theme_support($componentName){
26
+ global $wpdb;
27
+ global $loadComponent,$supportComponent;
28
+ if($supportComponent){
29
+ if(in_array($componentName, $supportComponent)){
30
+ $loadComponent[$componentName] = true;
31
+ ampforwp_loadComponents($componentName);
32
+ return true;
33
+ }
34
+ }
35
+ return false;
36
+ }
37
+ //Include the Component file
38
+ function ampforwp_loadComponents($componentName){
39
+ global $wpdb;
40
+ if(empty($componentName)) return '';
41
+ $componentName = str_replace("AMP-", "", $componentName);
42
+
43
+ $file = AMP_FRAMEWORK_COMOPNENT_DIR_PATH.'/'.$componentName.'/'.$componentName.".php";
44
+ if(!file_exists($file)){
45
+ return '';
46
+ }
47
+ include_once($file);
48
+ }
49
+
50
+ // Icons
51
+ $amp_icons_css = array();
52
+ function add_amp_icon($args=array()){
53
+ global $amp_icons_css, $redux_builder_amp;
54
+ $amp_icons_css_array = include AMPFORWP_PLUGIN_DIR .'includes/icons/amp-icons.php';
55
+ foreach ($args as $key ) {
56
+ if(isset($amp_icons_css_array[$key]))
57
+ $amp_icons_css[$key] = $amp_icons_css_array[$key];
58
+ }
59
+ // Design-1,2,3
60
+ if ( 1 == $redux_builder_amp['amp-design-selector'] || 2 == $redux_builder_amp['amp-design-selector'] || 3 == $redux_builder_amp['amp-design-selector'] ) {
61
+ add_action('amp_post_template_css', 'amp_icon_css',999);
62
+
63
+ }
64
+ else
65
+ add_action('amp_css', 'amp_icon_css');
66
+
67
+ }
68
+ function amp_icon_css(){
69
+ global $amp_icons_css, $redux_builder_amp;
70
+ foreach ($amp_icons_css as $key => $value) {
71
+ // TODO: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/2651
72
+ echo $value;
73
+ }
74
+
75
+ // Add @font-face for Design-1,2,3
76
+ if ( 1 == $redux_builder_amp['amp-design-selector'] || 2 == $redux_builder_amp['amp-design-selector'] || 3 == $redux_builder_amp['amp-design-selector'] ) { ?>
77
+ @font-face {font-family: 'icomoon';font-style: normal;font-weight: normal;font-display: swap;src: local('icomoon'), local('icomoon'), url('<?php echo esc_url(plugin_dir_url(__FILE__)) ?>icomoon/icomoon.ttf');}
78
+ [class^="icon-"], [class*=" icon-"] {font-family: 'icomoon';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
79
+ <?php }
80
+ }
81
+
82
+ /**
83
+ * Component Functions
84
+ **/
85
+
86
+ //Search Component Utilities
87
+ function amp_search(){
88
+ global $loadComponent;
89
+ if(isset($loadComponent['AMP-search']) && $loadComponent['AMP-search']==true){
90
+ ampforwp_framework_get_search_form();
91
+ }
92
+ }
93
+
94
+ // Logo Component Utilitis
95
+ function amp_logo(){
96
+ global $loadComponent;
97
+ if(isset($loadComponent['AMP-logo']) && $loadComponent['AMP-logo']==true){
98
+ ampforwp_framework_get_logo();
99
+ }
100
+ }
101
+
102
+ // Title
103
+ function amp_title(){
104
+ global $redux_builder_amp, $post;
105
+ $ID = '';
106
+ if( ampforwp_is_front_page() && ampforwp_get_frontpage_id() ){
107
+ if( $redux_builder_amp['ampforwp-title-on-front-page'] ) {
108
+ $ID = ampforwp_get_frontpage_id();
109
+ }
110
+ }
111
+ elseif ( ampforwp_polylang_front_page() ) {
112
+ $ID = pll_get_post(get_option('page_on_front'));
113
+ }
114
+ else
115
+ $ID = $post->ID;
116
+ if( $ID!=null ){
117
+ do_action('ampforwp_above_the_title');
118
+ ?><h1 class="amp-post-title"><?php
119
+ $ampforwp_title = get_the_title($ID);
120
+ $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
121
+ echo wp_kses_data( $ampforwp_title );
122
+ ?></h1><?php
123
+ do_action('ampforwp_below_the_title');
124
+ }
125
+ }
126
+
127
+ // Excerpt
128
+ function amp_excerpt( $no_of_words=15 ) {
129
+ global $redux_builder_amp, $post;
130
+ $post_id = '';
131
+ $no_of_words = (int) $no_of_words;
132
+
133
+ if ( ampforwp_is_front_page() ) {
134
+ $post_id = ampforwp_get_frontpage_id();
135
+ }
136
+ else
137
+ $post_id = $post->ID;
138
+ if ( $post_id != null && true == $redux_builder_amp['enable-excerpt-single'] ) { ?>
139
+ <p><?php
140
+ if ( has_excerpt() ) {
141
+ $content = get_the_excerpt();
142
+ } else {
143
+ $content = get_the_content();
144
+ }
145
+ /* `wp_trim_words` will strip all the tags
146
+ as it has `wp_strip_all_tags` inside to clean */
147
+ echo wp_trim_words( strip_shortcodes( $content ) , $no_of_words );
148
+ ?></p><?php
149
+ }
150
+ }
151
+
152
+
153
+ //Menus
154
+ function amp_menu($echo=true, $menu_args=array(), $type='header'){
155
+ if ( ($type == 'header' && ! has_nav_menu( 'amp-menu' )) || ( 'footer' == $type && ! has_nav_menu( 'amp-footer-menu' ) ) ) {
156
+ return false;
157
+ }
158
+ global $loadComponent;
159
+ if(isset($loadComponent['AMP-menu']) && $loadComponent['AMP-menu']==true){
160
+ if ( false != get_transient('ampforwp_header_menu') && 'header' == $type ){
161
+ $amp_menu = get_transient('ampforwp_header_menu');
162
+ }
163
+ elseif (false != get_transient('ampforwp_footer_menu') && 'footer' == $type) {
164
+ $amp_menu = get_transient('ampforwp_footer_menu');
165
+ }
166
+ else{
167
+ $amp_menu = amp_menu_html($echo, $menu_args, $type);
168
+ }
169
+ if ( false == $echo ) {
170
+ return $amp_menu;
171
+ }
172
+ else
173
+ echo $amp_menu;
174
+ }
175
+ }
176
+
177
+ // Social Icons component
178
+ function amp_social( $social_icons="" ) {
179
+ global $loadComponent;
180
+ $amp_social = array();
181
+ //Supported social icons
182
+ $amp_social = array( 'twitter', 'facebook', 'pinterest', 'google-plus', 'linkedin', 'youtube', 'instagram', 'reddit', 'VKontakte', 'Odnoklassniki', 'snapchat', 'tumblr' );
183
+ if ( isset($loadComponent['AMP-social-icons']) && true == $loadComponent['AMP-social-icons'] ) {
184
+ if ( null != $social_icons ) {
185
+ ampforwp_framework_get_social_icons($social_icons);
186
+ }
187
+ else
188
+ ampforwp_framework_get_social_icons($amp_social);
189
+ }
190
+ }
191
+
192
+ //Sidebar
193
+ function amp_sidebar($tag='start',$data=array()){
194
+ global $loadComponent;
195
+ if(isset($loadComponent['AMP-sidebar']) && $loadComponent['AMP-sidebar']==true){
196
+ ampforwp_framework_get_sideabr($tag,$data);
197
+ }
198
+ }
199
+
200
+ //Featured Image
201
+ function amp_featured_image( ){
202
+ global $loadComponent;
203
+ if(isset($loadComponent['AMP-featured-image']) && $loadComponent['AMP-featured-image']==true){
204
+ ampforwp_framework_get_featured_image( );
205
+ }
206
+ }
207
+
208
+ // Author Box
209
+ function amp_author_box($args=array() ){
210
+ global $loadComponent;
211
+ if(isset($loadComponent['AMP-author-box']) && $loadComponent['AMP-author-box']==true){
212
+ ampforwp_framework_get_author_box($args);
213
+ }
214
+ }
215
+
216
+ // Categories List
217
+ function amp_categories_list( $separator = '' ){
218
+ global $loadComponent;
219
+ if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
220
+ ampforwp_framework_get_categories_list( $separator );
221
+ }
222
+ }
223
+ // Tags List
224
+ function amp_tags_list( $separator = '' ){
225
+ global $loadComponent;
226
+ if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
227
+ ampforwp_framework_get_tags_list( $separator );
228
+ }
229
+ }
230
+
231
+ // Comments
232
+ function amp_comments( ){
233
+ global $loadComponent;
234
+ if(isset($loadComponent['AMP-comments']) && $loadComponent['AMP-comments']==true){
235
+ ampforwp_framework_get_comments( );
236
+ }
237
+ }
238
+
239
+ // Post Navigation
240
+ function amp_post_navigation( ){
241
+ global $loadComponent;
242
+ if(isset($loadComponent['AMP-post-navigation']) && $loadComponent['AMP-post-navigation']==true){
243
+ echo ampforwp_framework_get_post_navigation();
244
+ }
245
+ }
246
+
247
+ // Related Posts
248
+ function amp_related_posts($argsdata = array()){
249
+ global $loadComponent;
250
+ if(isset($loadComponent['AMP-related-posts']) && $loadComponent['AMP-related-posts']==true){
251
+ echo ampforwp_framework_get_related_posts( $argsdata);
252
+ }
253
+ }
254
+
255
+ // Post Pagination
256
+ function amp_post_pagination($args='' ){
257
+ global $loadComponent;
258
+ if(isset($loadComponent['AMP-post-pagination']) && $loadComponent['AMP-post-pagination']==true){
259
+ ampforwp_framework_get_post_pagination($args);
260
+ }
261
+ }
262
+
263
+ // Breadcrumb
264
+ function amp_breadcrumb(){
265
+ global $loadComponent;
266
+ if ( isset($loadComponent['AMP-breadcrumb']) && true == $loadComponent['AMP-breadcrumb'] ) {
267
+ echo amp_breadcrumb_output();
268
+ }
269
+ }
270
+
271
+ // GDPR component
272
+ function amp_gdpr(){
273
+ global $loadComponent;
274
+ if ( isset($loadComponent['AMP-gdpr']) && true == $loadComponent['AMP-gdpr'] ) {
275
+ echo amp_gdpr_output();
276
+ }
277
+ }
278
+
279
+ //Get Core of AMP HTML
280
+ function amp_header_core(){
281
+ global $ampforwpTemplate;
282
+ $post_id = get_queried_object_id();
283
+ if ( ampforwp_polylang_front_page() ) {
284
+ $post_id = pll_get_post(get_option('page_on_front'));
285
+ }
286
+ $thisTemplate = $ampforwpTemplate;
287
+ global $redux_builder_amp;
288
+ $html_tag_attributes = AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) );
289
+
290
+ $bodyClass = '';
291
+ if ( is_single() || is_page() ) {
292
+ $bodyClass = 'single-post';
293
+ $bodyClass .= ( is_page()? ' amp-single-page ' : ' amp-single ');
294
+
295
+ }
296
+ // Archive
297
+ if ( is_archive() ) {
298
+ $bodyClass = 'amp-archive';
299
+ }
300
+ $ampforwp_custom_post_page = ampforwp_custom_post_page();
301
+
302
+ add_action('amp_post_template_head','ampforwp_sanitize_archive_desc');
303
+ function ampforwp_sanitize_archive_desc(){
304
+ $description = get_the_archive_description();
305
+ if ($description) {
306
+ $sanitizer = new AMPFORWP_Content( $description, array(),
307
+ apply_filters( 'ampforwp_content_sanitizers',
308
+ array(
309
+ 'AMP_Style_Sanitizer' => array(),
310
+ 'AMP_Blacklist_Sanitizer' => array(),
311
+ 'AMP_Img_Sanitizer' => array(),
312
+ 'AMP_Video_Sanitizer' => array(),
313
+ 'AMP_Audio_Sanitizer' => array(),
314
+ 'AMP_Iframe_Sanitizer' => array(
315
+ 'add_placeholder' => true,
316
+ )
317
+ ) ) );
318
+
319
+ $amp_component_scripts = $sanitizer->amp_scripts;
320
+
321
+ if ( $sanitizer && $amp_component_scripts) {
322
+ foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
323
+ <script custom-element="<?php echo esc_attr($ampforwp_service); ?>" src="<?php echo esc_url($ampforwp_js_file); ?>" async></script> <?php
324
+ }
325
+ }
326
+ }
327
+ }
328
+ // Homepage
329
+ if ( is_home() ) {
330
+
331
+ $bodyClass = 'amp-index amp-home'.esc_attr( $thisTemplate->get( 'body_class' ) );
332
+ if ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
333
+ $bodyClass = 'single-post design_3_wrapper';
334
+ }
335
+ if ( $ampforwp_custom_post_page == "page" && ampforwp_name_blog_page() ) {
336
+ $current_url = home_url( $GLOBALS['wp']->request );
337
+ $current_url_in_pieces = explode( '/', $current_url );
338
+
339
+ if( in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) {
340
+ $bodyClass = 'amp-index' .esc_attr( $thisTemplate->get( 'body_class' ) );
341
+ }
342
+ }
343
+
344
+ }
345
+ // is_search
346
+ if ( is_search() ) {
347
+ $bodyClass = 'amp_home_body archives_body design_3_wrapper';
348
+ }
349
+ if( true == $redux_builder_amp['amp-rtl-select-option'] ){
350
+ $bodyClass .= ' rtl ';
351
+ }
352
+ ?><!doctype html>
353
+ <html <?php echo esc_attr(ampforwp_amp_nonamp_convert('amp ')); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
354
+ <head>
355
+ <meta charset="utf-8">
356
+ <?php do_action('amp_experiment_meta', $thisTemplate); ?>
357
+ <link rel="dns-prefetch" href="https://cdn.ampproject.org">
358
+ <?php do_action( 'amp_meta', $thisTemplate ); ?>
359
+ <?php
360
+ if(ampforwp_amp_nonamp_convert("", "check")){
361
+ echo '<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">';
362
+ wp_head();
363
+
364
+ }else{
365
+ if(is_search()){?>
366
+ <meta name="robots" content="noindex,nofollow"/>
367
+ <?php }
368
+ do_action( 'amp_post_template_head', $thisTemplate );
369
+ } ?>
370
+ <style amp-custom>
371
+ <?php $thisTemplate->load_parts( array( 'style' ) ); ?>
372
+ <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
373
+ <?php do_action( 'amp_css', $thisTemplate ); ?>
374
+ <?php $custom_css = ampforwp_get_setting('css_editor');
375
+ $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
376
+ echo $sanitized_css; ?>
377
+ </style>
378
+ <?php do_action('ampforwp_before_head', $thisTemplate); ?>
379
+ </head>
380
+ <body <?php ampforwp_body_class($bodyClass); ?>>
381
+ <?php do_action('amp_start', $thisTemplate); ?>
382
+ <?php do_action('ampforwp_body_beginning', $thisTemplate);
383
+ }
384
+
385
+ function amp_header(){
386
+ global $ampforwpTemplate;
387
+ $post_id = get_queried_object_id();
388
+ if ( ampforwp_polylang_front_page() ) {
389
+ $post_id = pll_get_post(get_option('page_on_front'));
390
+ }
391
+ $thisTemplate = $ampforwpTemplate;
392
+ $thisTemplate->load_parts( array( 'header' ) );
393
+ do_action( 'amp_after_header', $thisTemplate );
394
+ do_action( 'ampforwp_after_header', $thisTemplate );
395
+ do_action('ampforwp_post_before_design_elements') ?>
396
+ <?php }
397
+
398
+ function amp_footer(){
399
+ global $ampforwpTemplate;
400
+ $post_id = get_queried_object_id();
401
+ if ( ampforwp_polylang_front_page() ) {
402
+ $post_id = pll_get_post(get_option('page_on_front'));
403
+ }
404
+ $thisTemplate = $ampforwpTemplate;
405
+ do_action( 'amp_before_footer', $thisTemplate );
406
+ do_action( 'amp_post_template_above_footer', $thisTemplate );
407
+
408
+ $thisTemplate->load_parts( array( 'footer' ) );
409
+
410
+ }
411
+
412
+ function amp_footer_core(){
413
+ global $ampforwpTemplate;
414
+ $post_id = get_queried_object_id();
415
+ if ( ampforwp_polylang_front_page() ) {
416
+ $post_id = pll_get_post(get_option('page_on_front'));
417
+ }
418
+ $thisTemplate = $ampforwpTemplate;
419
+ if(ampforwp_amp_nonamp_convert("", "check")){
420
+ wp_footer();
421
+ }
422
+ else {
423
+ do_action( 'amp_post_template_footer', $thisTemplate );
424
+ do_action('ampforwp_global_after_footer');
425
+ do_action('amp_end',$thisTemplate);
426
+ }
427
+ amp_back_to_top_link();
428
+ // Close the body and Html tags ?>
429
+ </body>
430
+ </html><?php
431
+ }
432
+
433
+ function amp_non_amp_link(){
434
+ $allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
435
+ global $redux_builder_amp;
436
+ echo '<span>' . strip_tags(ampforwp_translation($redux_builder_amp['amp-translator-footer-text'],'All Rights Reserved'),$allowed_tags) . '</span>' ;
437
+ if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') { ampforwp_view_nonamp(); }
438
+ }
439
+
440
+ // Back to Top
441
+ function amp_back_to_top_link(){
442
+ global $redux_builder_amp;
443
+ if(true == ampforwp_get_setting('ampforwp-footer-top')){?>
444
+ <a id="scrollToTopButton" title="back to top" on="tap:backtotop.scrollTo(duration=500)" class="btt" ></a>
445
+ <amp-animation id="showAnim"
446
+ layout="nodisplay">
447
+ <script type="application/json">
448
+ {
449
+ "duration": "400ms",
450
+ "fill": "both",
451
+ "iterations": "1",
452
+ "direction": "alternate",
453
+ "animations": [{
454
+ "selector": "#scrollToTopButton",
455
+ "keyframes": [{
456
+ "opacity": "1",
457
+ "visibility": "visible"
458
+ }]
459
+ }]
460
+ }
461
+ </script>
462
+ </amp-animation>
463
+ <amp-animation id="hideAnim"
464
+ layout="nodisplay">
465
+ <script type="application/json">
466
+ {
467
+ "duration": "400ms",
468
+ "fill": "both",
469
+ "iterations": "1",
470
+ "direction": "alternate",
471
+ "animations": [{
472
+ "selector": "#scrollToTopButton",
473
+ "keyframes": [{
474
+ "opacity": "0",
475
+ "visibility": "hidden"
476
+ }]
477
+ }]
478
+ }
479
+ </script>
480
+ </amp-animation>
481
+ <?php }
482
+ }
483
+
484
+ function amp_loop_template(){
485
+ global $ampforwpTemplate;
486
+ $post_id = get_queried_object_id();
487
+ $thisTemplate = $ampforwpTemplate;
488
+ do_action('amp_before_loop',$thisTemplate);
489
+ $thisTemplate->load_parts( array( 'loop' ) );
490
+ do_action('amp_after_loop',$thisTemplate);
491
+ }
492
+
493
+ // The Content
494
+ function amp_content($post_id= ''){
495
+ global $redux_builder_amp, $post, $ampforwpTemplate;
496
+
497
+ if ( empty( $post_id )) {
498
+ $post_id = get_queried_object_id();
499
+ if ( ampforwp_is_front_page() ) {
500
+ $post_id = ampforwp_get_frontpage_id();
501
+ }
502
+ elseif ( ampforwp_polylang_front_page() ) {
503
+ $post_id = pll_get_post(get_option('page_on_front'));
504
+ }
505
+ }
506
+
507
+ $thisTemplate = $ampforwpTemplate;
508
+ if ( 1 == ampforwp_get_setting('amp-design-selector') ) {
509
+ do_action('ampforwp_inside_post_content_before',$thisTemplate);
510
+ }
511
+ else{
512
+ do_action('ampforwp_before_post_content',$thisTemplate);
513
+ }
514
+ $amp_custom_content_enable = get_post_meta( $thisTemplate->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
515
+ // Normal Content
516
+ if ( ! $amp_custom_content_enable ) {
517
+ $ampforwp_the_content = $thisTemplate->get( 'post_amp_content' ); // amphtml content; no kses
518
+ } else {
519
+ // Custom/Alternative AMP content added through post meta
520
+ $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
521
+ }
522
+ // Muffin Builder Compatibility #1455 #1893
523
+ if ( function_exists('mfn_builder_print') && ! $amp_custom_content_enable ) {
524
+ ob_start();
525
+ mfn_builder_print( $thisTemplate->get( 'post_id' ) );
526
+ $content = ob_get_contents();
527
+ ob_end_clean();
528
+ $sanitizer_obj = new AMPFORWP_Content( $content,
529
+ array(),
530
+ apply_filters( 'ampforwp_content_sanitizers',
531
+ array( 'AMP_Img_Sanitizer' => array(),
532
+ 'AMP_Blacklist_Sanitizer' => array(),
533
+ 'AMP_Style_Sanitizer' => array(),
534
+ 'AMP_Video_Sanitizer' => array(),
535
+ 'AMP_Audio_Sanitizer' => array(),
536
+ 'AMP_Iframe_Sanitizer' => array(
537
+ 'add_placeholder' => true,
538
+ ),
539
+ )
540
+ )
541
+ );
542
+ if ( ! get_post_meta( $post_id, 'mfn-post-hide-content', true ) && ampforwp_is_front_page() ) {
543
+ $ampforwp_custom_amp_editor_content = '';
544
+ $ampforwp_custom_amp_editor_content = $ampforwp_the_content;
545
+ $ampforwp_the_content = $sanitizer_obj->get_amp_content();
546
+ $ampforwp_the_content .= $ampforwp_custom_amp_editor_content;
547
+ }
548
+ else{
549
+ $ampforwp_the_content = $sanitizer_obj->get_amp_content();
550
+ }
551
+ }
552
+ $ampforwp_the_content = apply_filters('ampforwp_modify_the_content',$ampforwp_the_content);
553
+ echo $ampforwp_the_content; // amphtml content, no kses
554
+ do_action('ampforwp_after_post_content',$thisTemplate);
555
+ }
556
+
557
+ function amp_date( $args=array() ) {
558
+
559
+ global $redux_builder_amp;
560
+ if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
561
+ $args = array('format' => 'traditional');
562
+ }
563
+ if ( (isset($args['format']) && $args['format'] == 'traditional') || 'time' == $args ) {
564
+ $post_date = get_the_date() . ' '. get_the_time();
565
+ } else {
566
+ $post_date = human_time_diff(
567
+ get_the_time('U', get_the_ID() ),
568
+ current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
569
+ 'ago');
570
+ }
571
+ $post_date = apply_filters('ampforwp_modify_post_date', $post_date);
572
+ if(isset($args['custom_format']) && $args['custom_format']!=""){
573
+ $post_date = date($args['custom_format'],get_the_time('U', get_the_ID() ));
574
+ }
575
+ if ( 'date' == $args || 'time' == $args ) {
576
+ echo esc_attr($post_date) .' ';
577
+ }
578
+ else
579
+ echo '<div class="loop-date">'.esc_attr($post_date).'</div>';
580
+ }
581
+
582
+ //Load font Compoment
583
+ $fontComponent = array();
584
+ function amp_post_load_custom_fonts(){
585
+ global $fontComponent;
586
+ if(count($fontComponent)){
587
+ $fontComponent = array_unique($fontComponent);
588
+ foreach ($fontComponent as $key => $value) {
589
+ ?>
590
+ <link rel="stylesheet" href="<?php echo esc_url( $value ); ?>">
591
+ <?php
592
+ }
593
+ }
594
+
595
+ }
596
+ add_action( 'amp_meta', 'amp_post_load_custom_fonts');
597
+ function amp_font($fontName){
598
+ global $fontComponent;
599
+ $fontComponent[] = $fontName;
600
+ }
601
+
602
+ // RTL Styling
603
+ add_action('amp_css', 'amp_theme_framework_rtl_styles');
604
+ if( ! function_exists('amp_theme_framework_rtl_styles') ){
605
+ function amp_theme_framework_rtl_styles(){
606
+ global $redux_builder_amp;
607
+ if( true === $redux_builder_amp['amp-rtl-select-option'] ){ ?>
608
+ body.rtl {direction: rtl;}
609
+ body amp-carousel{ direction: ltr;}
610
+ <?php }
611
+ }
612
+ }
613
+
614
+ // Author Meta
615
+ function amp_author_meta( $args ) {
616
+ global $post;
617
+ $author_name = false;
618
+ $avatar = false;
619
+ $avatar_size = 40;
620
+ if ( isset($args['name']) ) {
621
+ $author_name = $args['name'];
622
+ }
623
+ if ( 'name' === $args ) {
624
+ $author_name = true;
625
+ }
626
+ if ( 'avatar' === $args || 'image' === $args ) {
627
+ $avatar = true;
628
+ }
629
+ if ( isset($args['image']) ) {
630
+ $avatar = $args['image'];
631
+ }
632
+ if ( isset($args['image_size']) ) {
633
+ $avatar_size = $args['image_size'];
634
+ }
635
+ $post_author = get_userdata($post->post_author);
636
+ $author_link = get_author_posts_url($post_author->ID);
637
+ if ( $author_name ) {
638
+ echo ' <a href="'. ampforwp_url_controller($author_link).'"> ' .esc_html( $post_author->display_name ).'</a>';
639
+ }
640
+ if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
641
+ $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
642
+ ?>
643
+ <amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo esc_attr($avatar_size); ?>" height="<?php echo esc_attr($avatar_size); ?>" layout="fixed"></amp-img>
644
+ <?php }
645
+ elseif ( $avatar && false == ampforwp_gravatar_checker($post_author->user_email ) ) {
646
+ $avatar_img = get_avatar( $post_author->user_email, $avatar_size );
647
+ $amp_html_sanitizer = new AMPFORWP_Content( $avatar_img, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array() ) ) );
648
+ $amp_html = $amp_html_sanitizer->get_amp_content();
649
+ echo $amp_html; // amphtml content, no kses
650
+ }
651
+
652
+ }
653
+
654
+ // amp-animation CSS #2819
655
+ add_action('amp_post_template_css','ampforwp_backtotop_global_css');
656
+ function ampforwp_backtotop_global_css(){
657
+ if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
658
+ .btt{
659
+ position: fixed;
660
+ <?php if( (is_single() && ampforwp_get_setting('enable-single-social-icons')) || (is_page() && true == ampforwp_get_setting('ampforwp-page-sticky-social')) ){ ?>
661
+ bottom: 55px;
662
+ <?php } else { ?>
663
+ bottom: 20px;
664
+ <?php } ?>
665
+ right: 20px;
666
+ background: rgba(71, 71, 71, 0.5);
667
+ color: #fff;
668
+ border-radius: 100%;
669
+ width: 50px;
670
+ height: 50px;
671
+ }
672
+ .btt:hover{color:#fff;background:#474747;}
673
+ .btt:before{
674
+ content: '\25be';
675
+ display: block;
676
+ font-size: 35px;
677
+ font-weight: 600;
678
+ color: #fff;
679
+ transform: rotate(180deg);
680
+ text-align: center;
681
+ line-height: 1.5;
682
+ }
683
+ <?php } }
684
+
685
+ // Fallback for amp_call_now #2782
686
+ if ( !function_exists('amp_call_now') ) {
687
+ function amp_call_now(){
688
+ ampforwp_call_button_html_output();
689
+ }
690
+ }
691
+ // AddThis Support #2416
692
+ function ampforwp_addThis_support(){
693
+ $data_pub_id = ampforwp_get_setting('add-this-pub-id');
694
+ $data_widget_id = ampforwp_get_setting('add-this-widget-id');
695
+ if ( is_single() || (is_page() && ampforwp_get_setting('ampforwp-page-social')) ) {
696
+ if( ampforwp_get_setting('enable-add-this-option') ) {
697
+ if( 4 == ampforwp_get_setting('amp-design-selector') && 'default' == ampforwp_get_setting('swift-add-this-position') ){
698
+ $amp_addthis = '<amp-addthis width="290" height="92" data-pub-id="'.esc_html($data_pub_id).'" data-widget-id="'. esc_html($data_widget_id).'"></amp-addthis>';
699
+ }
700
+ else{
701
+ $amp_addthis = '<amp-addthis width="320" height="92" data-pub-id="'.esc_html($data_pub_id).'" data-widget-id="'.esc_html($data_widget_id).'"></amp-addthis>';
702
+ }
703
+ do_action('ampforwp_before_social_icons_hook');
704
+ return $amp_addthis;
705
+ do_action('ampforwp_after_social_icons_hook');
706
+ }
707
+ }
708
  }
components/featured-image/featured-image.php CHANGED
@@ -1,53 +1,62 @@
1
- <?php
2
- function ampforwp_framework_get_featured_image(){
3
- do_action('ampforwp_before_featured_image_hook');
4
- global $post, $redux_builder_amp;
5
- $post_id = $post->ID;
6
- $featured_image = "";
7
- $amp_html = "";
8
- $caption = "";
9
- if( ampforwp_is_front_page() ){
10
- $post_id = ampforwp_get_frontpage_id();
11
- }
12
- if( true == ampforwp_has_post_thumbnail() ) {
13
- if (has_post_thumbnail( $post_id ) ){
14
- $thumb_id = get_post_thumbnail_id($post_id);
15
- $image = wp_get_attachment_image_src( $thumb_id, 'full' );
16
- $caption = get_the_post_thumbnail_caption( $post_id );
17
- $thumb_alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true);
18
- if($thumb_alt){
19
- $alt = $thumb_alt;
20
- }
21
- else{
22
- $alt = get_the_title( $post_id );
23
- }
24
- $alt = esc_attr($alt);
25
- if( $image ){
26
- $amp_html = "<amp-img src='$image[0]' width='$image[1]' height='$image[2]' layout=responsive alt='$alt'></amp-img>";
27
- }
28
- }
29
- elseif ( ampforwp_is_custom_field_featured_image() ) {
30
- $amp_img_src = ampforwp_cf_featured_image_src();
31
- $amp_img_width = ampforwp_cf_featured_image_src('width');
32
- $amp_img_height = ampforwp_cf_featured_image_src('height');
33
- if( $amp_img_src ){
34
- $amp_html = "<amp-img src='$amp_img_src' width=$amp_img_width height=$amp_img_height layout=responsive ></amp-img>";
35
- }
36
- }
37
- elseif ( true == ampforwp_get_setting('ampforwp-featured-image-from-content') && ampforwp_get_featured_image_from_content() ){
38
- $amp_html = ampforwp_get_featured_image_from_content();
39
- $amp_html = preg_replace('#sizes="(.*)"#', "layout='responsive'", $amp_html);
40
- }
41
- if( $amp_html ){ ?>
42
- <figure class="amp-featured-image"> <?php
43
- echo $amp_html;
44
- if ( $caption ) : ?>
45
- <p class="wp-caption-text">
46
- <?php echo wp_kses_data( $caption ); ?>
47
- </p>
48
- <?php endif; ?>
49
- </figure>
50
- <?php do_action('ampforwp_after_featured_image_hook');
51
- }
52
- }
 
 
 
 
 
 
 
 
 
53
  }
1
+ <?php
2
+ function ampforwp_framework_get_featured_image(){
3
+ do_action('ampforwp_before_featured_image_hook');
4
+ global $post, $redux_builder_amp;
5
+ $post_id = $post->ID;
6
+ $featured_image = "";
7
+ $amp_html = "";
8
+ $caption = "";
9
+ $f_vid = "";
10
+ if( ampforwp_is_front_page() ){
11
+ $post_id = ampforwp_get_frontpage_id();
12
+ }
13
+ if( true == ampforwp_has_post_thumbnail() ) {
14
+ // Featured Video SmartMag theme Compatibility #2559
15
+ if(class_exists('Bunyad') && Bunyad::posts()->meta('featured_video') ){
16
+ global $wp_embed;
17
+ $f_vid = 'f_vid';
18
+ $videoContent = Bunyad::posts()->meta('featured_video');
19
+ $featured_video = $wp_embed->autoembed($videoContent);
20
+ $amp_html = ampforwp_content_sanitizer($featured_video);
21
+ }elseif (has_post_thumbnail( $post_id ) ){
22
+ $thumb_id = get_post_thumbnail_id($post_id);
23
+ $image_size = apply_filters( 'ampforwp_featured_image_size', 'full' );
24
+ $image = wp_get_attachment_image_src( $thumb_id, $image_size );
25
+ $caption = get_the_post_thumbnail_caption( $post_id );
26
+ $thumb_alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true);
27
+ if($thumb_alt){
28
+ $alt = $thumb_alt;
29
+ }
30
+ else{
31
+ $alt = get_the_title( $post_id );
32
+ }
33
+ $alt = esc_attr($alt);
34
+ if( $image ){
35
+ $amp_html = "<amp-img src='$image[0]' width='$image[1]' height='$image[2]' layout=responsive alt='$alt'></amp-img>";
36
+ }
37
+ }
38
+ elseif ( ampforwp_is_custom_field_featured_image() ) {
39
+ $amp_img_src = ampforwp_cf_featured_image_src();
40
+ $amp_img_width = ampforwp_cf_featured_image_src('width');
41
+ $amp_img_height = ampforwp_cf_featured_image_src('height');
42
+ if( $amp_img_src ){
43
+ $amp_html = "<amp-img src='$amp_img_src' width=$amp_img_width height=$amp_img_height layout=responsive ></amp-img>";
44
+ }
45
+ }
46
+ elseif ( true == ampforwp_get_setting('ampforwp-featured-image-from-content') && ampforwp_get_featured_image_from_content() ){
47
+ $amp_html = ampforwp_get_featured_image_from_content();
48
+ $amp_html = preg_replace('#sizes="(.*)"#', "layout='responsive'", $amp_html);
49
+ }
50
+ if( $amp_html ){ ?>
51
+ <figure class="amp-featured-image <?php echo esc_html($f_vid); ?>"> <?php
52
+ echo $amp_html;
53
+ if ( $caption ) : ?>
54
+ <p class="wp-caption-text">
55
+ <?php echo wp_kses_data( $caption ); ?>
56
+ </p>
57
+ <?php endif; ?>
58
+ </figure>
59
+ <?php do_action('ampforwp_after_featured_image_hook');
60
+ }
61
+ }
62
  }
components/gdpr/gdpr.php CHANGED
@@ -1,263 +1,263 @@
1
- <?php function amp_gdpr_output(){
2
- global $redux_builder_amp;
3
- $headline = $accept = $reject = $settings = $user_data = $form_url = '';
4
- $headline = $redux_builder_amp['amp-gdpr-compliance-headline-text'];
5
- $accept = $redux_builder_amp['amp-gdpr-compliance-accept-text'];
6
- $reject = $redux_builder_amp['amp-gdpr-compliance-reject-text'];
7
- $settings = $redux_builder_amp['amp-gdpr-compliance-settings-text'];
8
- $user_data = $redux_builder_amp['amp-gdpr-compliance-textarea'];
9
- $form_url = admin_url('admin-ajax.php?action=amp_consent_submission&verify_nonce='.wp_create_nonce('amp_consent'));
10
- $form_url = preg_replace('#^https?:#', '', $form_url);
11
- $more_info = $redux_builder_amp['amp-gdpr-compliance-for-more-privacy-info'];
12
- $privacy_page = '';
13
- $privacy_button_text = '';
14
- if(isset($redux_builder_amp['amp-gdpr-compliance-select-privacy-page']) && $redux_builder_amp['amp-gdpr-compliance-select-privacy-page']){
15
- $privacy_page = get_permalink($redux_builder_amp['amp-gdpr-compliance-select-privacy-page']);}
16
-
17
- if(isset($redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text']) && $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text']){
18
- $privacy_button_text = $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text'];
19
- }
20
- $gdpr_countries = array("AT","BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT", "LU", "MT", "NL", "NO", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "GB", "AX", "IC", "EA", "GF", "PF", "TF", "GI", "GP", "GG", "JE", "MQ", "YT", "NC", "RE", "BL", "MF", "PM", "SJ", "VA", "WF", "EZ", "CH");
21
- $gdpr_countries = apply_filters( 'ampforwp_gdpr_country_list' , $gdpr_countries ); ?>
22
- <amp-geo layout="nodisplay">
23
- <script type="application/json">
24
- {
25
- "ISOCountryGroups": {
26
- "eea":[ <?php echo '"'.implode('","', array_values($gdpr_countries)).'"';?> ]
27
- }
28
- }
29
- </script>
30
- </amp-geo>
31
- <amp-consent id="ampforwpConsent" layout="nodisplay">
32
- <script type="application/json">{
33
- "consents": {
34
- "consent1": {
35
- "promptIfUnknownForGeoGroup": "eea",
36
- "promptUI": "gdpr_c"
37
- }
38
- },
39
- "postPromptUI": "post-consent-ui"
40
- }</script>
41
- <div class="gdpr" id="gdpr_c">
42
- <div class="gdpr_w">
43
- <div class="gdpr_x" role="button" tabindex="0" on="tap:ampforwpConsent.dismiss">X</div>
44
- <div class="gdpr-l">
45
- <div class="gdpr_t">
46
- <h3><?php echo esc_attr($headline); ?></h3>
47
- <p><?php echo esc_attr($user_data); ?></p>
48
- </div><?php if(isset($redux_builder_amp['amp-gdpr-compliance-select-privacy-page']) && $redux_builder_amp['amp-gdpr-compliance-select-privacy-page']){?>
49
- <div class="gdpr_fmi">
50
- <span><?php echo esc_attr($more_info); ?></span>
51
- <a class="gdpr_fmi pri_page_link" href=<?php echo esc_attr($privacy_page); ?> target="_blank"><?php echo esc_attr($privacy_button_text); ?></a>
52
- </div><?php } ?>
53
- </div>
54
- <div id="gdpr_yn" class="gdpr_yn">
55
- <div class="gdpr-btns">
56
- <form class="acp" action-xhr="<?php echo esc_url($form_url); ?>" method="post" target="_top">
57
- <button type="submit" on="tap:ampforwpConsent.accept" class="btn gdpr_y btn"><?php echo esc_attr($accept); ?></button>
58
- </form>
59
- <form class="rej" action-xhr="<?php echo esc_url($form_url); ?>" method="post" target="_top">
60
- <button type="submit" on="tap:ampforwpConsent.reject" class="btn gdpr_n"><?php echo esc_attr($reject); ?></button>
61
- </form>
62
- </div>
63
- </div>
64
- </div>
65
- </div>
66
- <div id="post-consent-ui">
67
- <a href="#" on="tap:ampforwpConsent.prompt()" class="btn"><?php echo esc_attr($settings); ?></a>
68
- </div>
69
- </amp-consent>
70
- <?php
71
- }
72
- if (ampforwp_get_setting('amp-gdpr-compliance-switch') ) {
73
- // Scripts
74
- add_filter('amp_post_template_data' , 'ampforwp_gdpr_data', 15);
75
- // CSS
76
- add_action('amp_post_template_css' , 'ampforwp_gdpr_css');
77
- // Consent Submission
78
- add_action('wp_ajax_amp_consent_submission','amp_consent_submission');
79
- add_action('wp_ajax_nopriv_amp_consent_submission','amp_consent_submission');
80
- }
81
-
82
- function ampforwp_gdpr_data( $data ) {
83
- global $redux_builder_amp;
84
- if ( empty( $data['amp_component_scripts']['amp-consent'] ) ) {
85
- $data['amp_component_scripts']['amp-consent'] = 'https://cdn.ampproject.org/v0/amp-consent-0.1.js';
86
- }
87
- if ( empty( $data['amp_component_scripts']['amp-form'] ) ) {
88
- $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
89
- }
90
- if ( empty( $data['amp_component_scripts']['amp-geo'] ) ) {
91
- $data['amp_component_scripts']['amp-geo'] = 'https://cdn.ampproject.org/v0/amp-geo-0.1.js';
92
- }
93
-
94
- return $data;
95
- }
96
-
97
- function ampforwp_gdpr_css(){
98
- global $redux_builder_amp;
99
- // GDPR popup Design
100
- if($redux_builder_amp['gdpr-type'] == '1'){?>
101
- .gdpr{position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.7);color: #333;z-index:9999999;line-height:1.3;height: 100vh;width: 100vw}
102
- .gdpr_w{padding: 2rem;background: #fff;max-width: 700px;width: 95%;margin: 5% auto;text-align: center;position:fixed;left: 0;right: 0;margin:10% auto;}
103
- .gdpr_t{margin-bottom:15px;}
104
- .gdpr_t h3{font-size: 30px;margin:0px 0 10px 0;}
105
- .gdpr_t p{font-size: 16px;line-height: 1.45;margin:0;}
106
- .gdpr_x {position: absolute; right: 24px; top: 16px; cursor:pointer;}
107
- .gdpr_yn{margin-top:10px;}
108
- .gdpr_yn form{display: inline;}
109
- .gdpr_yn button{background: #37474F;border: none;color: #fff;padding: 8px 30px;font-size: 13px;margin: 0 3px;}
110
- .gdpr_yn .gdpr_n{background: #fff;color: #222;border: 1px solid #999;}
111
- amp-consent{margin-left: 10px;top: 2px;width: auto;background: transparent;}
112
- .gdpr_fmi{
113
- width:100%;
114
- font-size: 15px;
115
- line-height: 1.45;
116
- margin: 0;
117
- }
118
- #footer .gdpr_fmi span, .gdpr_fmi span {
119
- display: inline-block;
120
- }
121
- #footer .gdpr_fmi a{
122
- color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;
123
- }
124
- amp-consent.amp-active {
125
- top: 0;
126
- bottom: 0;
127
- left: 0;
128
- right: 0;
129
- position: fixed;
130
- }
131
- @media(max-width:768px){
132
- .gdpr_w{width: 85%;margin:0 auto;padding:1.5rem;}
133
- }
134
- @media(max-width:700px){
135
- .gdpr_w{margin:0 auto; width: 95%;}
136
-
137
- }<?php
138
- } // GDPR Type 1 End
139
- // GDPR Notice bar
140
- if($redux_builder_amp['gdpr-type'] == '2'){?>
141
- .gdpr{position: fixed; top: 0; bottom: 0; left: 0; right: 0; z-index:99999;}
142
- .gdpr_w{padding:20px 40px;background: #383B75;width: 95%;position: relative;margin: 0% auto;display: inline-flex;}
143
- .gdpr_t h3, .gdpr_fmi{
144
- font-size: 16px;
145
- color:#fff;
146
- margin: 0;
147
- font-weight: 400;
148
- }
149
- .gdpr_fmi a{
150
- text-decoration:underline;
151
- margin-left: 10px;
152
- color:#fff;
153
- opacity: .8;
154
- }
155
- .gdpr_fmi a:hover{
156
- opacity: 1;
157
- color:#fff;
158
- }
159
- .gdpr-l{
160
- display: flex;
161
- flex-direction: row;
162
- align-items: center;
163
- order: 0;
164
- }
165
- .gdpr_t, .gdpr_fmi{
166
- display:inline-block;
167
- }
168
- .gdpr_t p{display:none;}
169
- .gdpr_x {position: absolute;right: 18px;top: 6px; cursor:pointer;color: #fff;visibility: hidden;}
170
- .gdpr_yn{
171
- text-align: right;
172
- order: 0;
173
- flex-grow: 1;
174
- }
175
- .gdpr_yn form{display: inline;}
176
- .gdpr_yn button{background: #FFFC26;border: none;color: #333;padding: 8px 40px;font-size: 15px;margin: 0 3px;font-weight: 600;cursor: pointer;}
177
- .gdpr_yn .gdpr_n{background: transparent;}
178
- amp-consent{margin-left: 10px;top: 2px;width: auto;background: transparent;margin:0;width:100%;}
179
- .gdpr_fmi span, .gdpr_fmi a:before{
180
- display:none;
181
- }
182
- .gdpr-btns{
183
- display:inline-flex;
184
- align-items: center;
185
- }
186
- .gdpr_yn .acp{
187
- order: 1;
188
- }
189
- .rej button{
190
- font-size: 15px;
191
- padding: 0;
192
- font-weight: 500;
193
- margin-right: 20px;
194
- cursor: pointer;
195
- color:#fff;
196
- }
197
- .rej button:hover{
198
- text-decoration:underline;
199
- }
200
- @media(max-width:768px){
201
- .gdpr-l{display:inline-block;}
202
- .gdpr_fmi a{margin:0;}
203
- .gdpr_t, .gdpr_fmi {
204
- display: block;
205
- line-height: 1.4;
206
- }
207
- .gdpr_w{padding:10px 15px;
208
- display:inline-block;text-align:left;
209
- }
210
- .gdpr_yn {
211
- margin-top: 10px;
212
- text-align: center;
213
- }
214
- }<?php
215
- } // GDPR Type 2 End
216
-
217
- if ( '1' === $redux_builder_amp['amp-design-selector'] ) { ?>
218
- #ampforwpConsent{
219
- left: 50%;
220
- font-size: 13px;
221
- top: -15px;
222
- }
223
- #ampforwpConsent a{
224
- text-decoration:none;
225
- }
226
-
227
- <?php
228
- }
229
- if ( '3' === $redux_builder_amp['amp-design-selector'] ) {?>
230
- amp-consent{background:none}
231
- @media(max-width:425px){
232
- #footer amp-consent a{font-size:12px;margin-top:7px;display:inline-block;}
233
- }<?php
234
- }
235
- if ( '4' === $redux_builder_amp['amp-design-selector'] ) {?>
236
- .gdpr_fmi a:before{
237
- display:none;
238
- }
239
- .gdpr_w{width:100%;}
240
- .f-w-f2 {
241
- padding: 50px 0px;
242
- }
243
- <?php
244
- } ?>
245
- amp-consent.amp-active{
246
- z-index:0;
247
- position: inherit;
248
- }
249
- <?php }
250
-
251
- function amp_consent_submission(){
252
- if(!wp_verify_nonce( $_REQUEST['verify_nonce'], 'amp_consent' ) ) {
253
- echo json_encode(array("status"=>300,"message"=>'Request not valid'));
254
- die;
255
- }
256
- $current_url = $site_url = $site_host = $amp_site = '';
257
- $current_url = wp_get_referer();
258
- $site_url = parse_url( get_site_url() );
259
- $site_host = $site_url['host'];
260
- $amp_site = $site_url['scheme'] . '://' . $site_url['host'];
261
- header("AMP-Access-Control-Allow-Source-Origin: esc_url($amp_site) ");
262
- header("AMP-Redirect-To: esc_url($current_url) ");
263
  }
1
+ <?php function amp_gdpr_output(){
2
+ global $redux_builder_amp;
3
+ $headline = $accept = $reject = $settings = $user_data = $form_url = '';
4
+ $headline = $redux_builder_amp['amp-gdpr-compliance-headline-text'];
5
+ $accept = $redux_builder_amp['amp-gdpr-compliance-accept-text'];
6
+ $reject = $redux_builder_amp['amp-gdpr-compliance-reject-text'];
7
+ $settings = $redux_builder_amp['amp-gdpr-compliance-settings-text'];
8
+ $user_data = $redux_builder_amp['amp-gdpr-compliance-textarea'];
9
+ $form_url = admin_url('admin-ajax.php?action=amp_consent_submission&verify_nonce='.wp_create_nonce('amp_consent'));
10
+ $form_url = preg_replace('#^https?:#', '', $form_url);
11
+ $more_info = $redux_builder_amp['amp-gdpr-compliance-for-more-privacy-info'];
12
+ $privacy_page = '';
13
+ $privacy_button_text = '';
14
+ if(isset($redux_builder_amp['amp-gdpr-compliance-select-privacy-page']) && $redux_builder_amp['amp-gdpr-compliance-select-privacy-page']){
15
+ $privacy_page = get_permalink($redux_builder_amp['amp-gdpr-compliance-select-privacy-page']);}
16
+
17
+ if(isset($redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text']) && $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text']){
18
+ $privacy_button_text = $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text'];
19
+ }
20
+ $gdpr_countries = array("AT","BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT", "LU", "MT", "NL", "NO", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "GB", "AX", "IC", "EA", "GF", "PF", "TF", "GI", "GP", "GG", "JE", "MQ", "YT", "NC", "RE", "BL", "MF", "PM", "SJ", "VA", "WF", "EZ", "CH");
21
+ $gdpr_countries = apply_filters( 'ampforwp_gdpr_country_list' , $gdpr_countries ); ?>
22
+ <amp-geo layout="nodisplay">
23
+ <script type="application/json">
24
+ {
25
+ "ISOCountryGroups": {
26
+ "eea":[ <?php echo '"'.implode('","', array_values($gdpr_countries)).'"';?> ]
27
+ }
28
+ }
29
+ </script>
30
+ </amp-geo>
31
+ <amp-consent id="ampforwpConsent" layout="nodisplay">
32
+ <script type="application/json">{
33
+ "consents": {
34
+ "consent1": {
35
+ "promptIfUnknownForGeoGroup": "eea",
36
+ "promptUI": "gdpr_c"
37
+ }
38
+ },
39
+ "postPromptUI": "post-consent-ui"
40
+ }</script>
41
+ <div class="gdpr" id="gdpr_c">
42
+ <div class="gdpr_w">
43
+ <div class="gdpr_x" role="button" tabindex="0" on="tap:ampforwpConsent.dismiss">X</div>
44
+ <div class="gdpr-l">
45
+ <div class="gdpr_t">
46
+ <h3><?php echo esc_attr($headline); ?></h3>
47
+ <p><?php echo esc_attr($user_data); ?></p>
48
+ </div><?php if(isset($redux_builder_amp['amp-gdpr-compliance-select-privacy-page']) && $redux_builder_amp['amp-gdpr-compliance-select-privacy-page']){?>
49
+ <div class="gdpr_fmi">
50
+ <span><?php echo esc_attr($more_info); ?></span>
51
+ <a class="gdpr_fmi pri_page_link" href=<?php echo esc_attr($privacy_page); ?> target="_blank"><?php echo esc_attr($privacy_button_text); ?></a>
52
+ </div><?php } ?>
53
+ </div>
54
+ <div id="gdpr_yn" class="gdpr_yn">
55
+ <div class="gdpr-btns">
56
+ <form class="acp" action-xhr="<?php echo esc_url($form_url); ?>" method="post" target="_top">
57
+ <button type="submit" on="tap:ampforwpConsent.accept" class="btn gdpr_y btn"><?php echo esc_attr($accept); ?></button>
58
+ </form>
59
+ <form class="rej" action-xhr="<?php echo esc_url($form_url); ?>" method="post" target="_top">
60
+ <button type="submit" on="tap:ampforwpConsent.reject" class="btn gdpr_n"><?php echo esc_attr($reject); ?></button>
61
+ </form>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ <div id="post-consent-ui">
67
+ <a href="#" on="tap:ampforwpConsent.prompt()" class="btn"><?php echo esc_attr($settings); ?></a>
68
+ </div>
69
+ </amp-consent>
70
+ <?php
71
+ }
72
+ if (ampforwp_get_setting('amp-gdpr-compliance-switch') ) {
73
+ // Scripts
74
+ add_filter('amp_post_template_data' , 'ampforwp_gdpr_data', 15);
75
+ // CSS
76
+ add_action('amp_post_template_css' , 'ampforwp_gdpr_css');
77
+ // Consent Submission
78
+ add_action('wp_ajax_amp_consent_submission','amp_consent_submission');
79
+ add_action('wp_ajax_nopriv_amp_consent_submission','amp_consent_submission');
80
+ }
81
+
82
+ function ampforwp_gdpr_data( $data ) {
83
+ global $redux_builder_amp;
84
+ if ( empty( $data['amp_component_scripts']['amp-consent'] ) ) {
85
+ $data['amp_component_scripts']['amp-consent'] = 'https://cdn.ampproject.org/v0/amp-consent-0.1.js';
86
+ }
87
+ if ( empty( $data['amp_component_scripts']['amp-form'] ) ) {
88
+ $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
89
+ }
90
+ if ( empty( $data['amp_component_scripts']['amp-geo'] ) ) {
91
+ $data['amp_component_scripts']['amp-geo'] = 'https://cdn.ampproject.org/v0/amp-geo-0.1.js';
92
+ }
93
+
94
+ return $data;
95
+ }
96
+
97
+ function ampforwp_gdpr_css(){
98
+ global $redux_builder_amp;
99
+ // GDPR popup Design
100
+ if($redux_builder_amp['gdpr-type'] == '1'){?>
101
+ .gdpr{position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.7);color: #333;z-index:9999999;line-height:1.3;height: 100vh;width: 100vw}
102
+ .gdpr_w{padding: 2rem;background: #fff;max-width: 700px;width: 95%;margin: 5% auto;text-align: center;position:fixed;left: 0;right: 0;margin:10% auto;}
103
+ .gdpr_t{margin-bottom:15px;}
104
+ .gdpr_t h3{font-size: 30px;margin:0px 0 10px 0;}
105
+ .gdpr_t p{font-size: 16px;line-height: 1.45;margin:0;}
106
+ .gdpr_x {position: absolute; right: 24px; top: 16px; cursor:pointer;}
107
+ .gdpr_yn{margin-top:10px;}
108
+ .gdpr_yn form{display: inline;}
109
+ .gdpr_yn button{background: #37474F;border: none;color: #fff;padding: 8px 30px;font-size: 13px;margin: 0 3px;}
110
+ .gdpr_yn .gdpr_n{background: #fff;color: #222;border: 1px solid #999;}
111
+ amp-consent{margin-left: 10px;top: 2px;width: auto;background: transparent;}
112
+ .gdpr_fmi{
113
+ width:100%;
114
+ font-size: 15px;
115
+ line-height: 1.45;
116
+ margin: 0;
117
+ }
118
+ #footer .gdpr_fmi span, .gdpr_fmi span {
119
+ display: inline-block;
120
+ }
121
+ #footer .gdpr_fmi a{
122
+ color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;
123
+ }
124
+ amp-consent.amp-active {
125
+ top: 0;
126
+ bottom: 0;
127
+ left: 0;
128
+ right: 0;
129
+ position: fixed;
130
+ }
131
+ @media(max-width:768px){
132
+ .gdpr_w{width: 85%;margin:0 auto;padding:1.5rem;}
133
+ }
134
+ @media(max-width:700px){
135
+ .gdpr_w{margin:0 auto; width: 95%;}
136
+
137
+ }<?php
138
+ } // GDPR Type 1 End
139
+ // GDPR Notice bar
140
+ if($redux_builder_amp['gdpr-type'] == '2'){?>
141
+ .gdpr{position: fixed; top: 0; bottom: 0; left: 0; right: 0; z-index:99999;}
142
+ .gdpr_w{padding:20px 40px;background: #383B75;width: 95%;position: relative;margin: 0% auto;display: inline-flex;}
143
+ .gdpr_t h3, .gdpr_fmi{
144
+ font-size: 16px;
145
+ color:#fff;
146
+ margin: 0;
147
+ font-weight: 400;
148
+ }
149
+ .gdpr_fmi a{
150
+ text-decoration:underline;
151
+ margin-left: 10px;
152
+ color:#fff;
153
+ opacity: .8;
154
+ }
155
+ .gdpr_fmi a:hover{
156
+ opacity: 1;
157
+ color:#fff;
158
+ }
159
+ .gdpr-l{
160
+ display: flex;
161
+ flex-direction: row;
162
+ align-items: center;
163
+ order: 0;
164
+ }
165
+ .gdpr_t, .gdpr_fmi{
166
+ display:inline-block;
167
+ }
168
+ .gdpr_t p{display:none;}
169
+ .gdpr_x {position: absolute;right: 18px;top: 6px; cursor:pointer;color: #fff;visibility: hidden;}
170
+ .gdpr_yn{
171
+ text-align: right;
172
+ order: 0;
173
+ flex-grow: 1;
174
+ }
175
+ .gdpr_yn form{display: inline;}
176
+ .gdpr_yn button{background: #FFFC26;border: none;color: #333;padding: 8px 40px;font-size: 15px;margin: 0 3px;font-weight: 600;cursor: pointer;}
177
+ .gdpr_yn .gdpr_n{background: transparent;}
178
+ amp-consent{margin-left: 10px;top: 2px;width: auto;background: transparent;margin:0;width:100%;}
179
+ .gdpr_fmi span, .gdpr_fmi a:before{
180
+ display:none;
181
+ }
182
+ .gdpr-btns{
183
+ display:inline-flex;
184
+ align-items: center;
185
+ }
186
+ .gdpr_yn .acp{
187
+ order: 1;
188
+ }
189
+ .rej button{
190
+ font-size: 15px;
191
+ padding: 0;
192
+ font-weight: 500;
193
+ margin-right: 20px;
194
+ cursor: pointer;
195
+ color:#fff;
196
+ }
197
+ .rej button:hover{
198
+ text-decoration:underline;
199
+ }
200
+ @media(max-width:768px){
201
+ .gdpr-l{display:inline-block;}
202
+ .gdpr_fmi a{margin:0;}
203
+ .gdpr_t, .gdpr_fmi {
204
+ display: block;
205
+ line-height: 1.4;
206
+ }
207
+ .gdpr_w{padding:10px 15px;
208
+ display:inline-block;text-align:left;
209
+ }
210
+ .gdpr_yn {
211
+ margin-top: 10px;
212
+ text-align: center;
213
+ }
214
+ }<?php
215
+ } // GDPR Type 2 End
216
+
217
+ if ( '1' === $redux_builder_amp['amp-design-selector'] ) { ?>
218
+ #ampforwpConsent{
219
+ left: 50%;
220
+ font-size: 13px;
221
+ top: -15px;
222
+ }
223
+ #ampforwpConsent a{
224
+ text-decoration:none;
225
+ }
226
+
227
+ <?php
228
+ }
229
+ if ( '3' === $redux_builder_amp['amp-design-selector'] ) {?>
230
+ amp-consent{background:none}
231
+ @media(max-width:425px){
232
+ #footer amp-consent a{font-size:12px;margin-top:7px;display:inline-block;}
233
+ }<?php
234
+ }
235
+ if ( '4' === $redux_builder_amp['amp-design-selector'] ) {?>
236
+ .gdpr_fmi a:before{
237
+ display:none;
238
+ }
239
+ .gdpr_w{width:100%;}
240
+ .f-w-f2 {
241
+ padding: 50px 0px;
242
+ }
243
+ <?php
244
+ } ?>
245
+ amp-consent.amp-active{
246
+ z-index:0;
247
+ position: inherit;
248
+ }
249
+ <?php }
250
+
251
+ function amp_consent_submission(){
252
+ if(!wp_verify_nonce( $_REQUEST['verify_nonce'], 'amp_consent' ) ) {
253
+ echo json_encode(array("status"=>300,"message"=>'Request not valid'));
254
+ die;
255
+ }
256
+ $current_url = $site_url = $site_host = $amp_site = '';
257
+ $current_url = wp_get_referer();
258
+ $site_url = parse_url( get_site_url() );
259
+ $site_host = $site_url['host'];
260
+ $amp_site = $site_url['scheme'] . '://' . $site_url['host'];
261
+ header("AMP-Access-Control-Allow-Source-Origin: esc_url($amp_site) ");
262
+ header("AMP-Redirect-To: esc_url($current_url) ");
263
  }
components/logo/logo.php CHANGED
@@ -1,44 +1,44 @@
1
- <?php
2
- function ampforwp_framework_get_logo(){
3
- global $redux_builder_amp; ?>
4
- <div class="amp-logo">
5
- <?php
6
- do_action('amp_header_top');
7
- $set_rel_to_noamp = false;
8
- $ampforwp_home_url = user_trailingslashit( get_bloginfo('url') );
9
- if ( true == ampforwp_get_setting('ampforwp-homepage-on-off-support') && !ampforwp_get_setting('amp-on-off-support-for-non-amp-home-page') ) {
10
- $ampforwp_home_url = ampforwp_url_controller( get_bloginfo('url') );
11
- }
12
- if ( ampforwp_get_setting('amp-on-off-support-for-non-amp-home-page') && ampforwp_get_setting('amp-mobile-redirection') ) {
13
- $ampforwp_home_url = trailingslashit( get_bloginfo('url') ).'?nonamp=1';
14
- $set_rel_to_noamp = true;
15
- }
16
- $ampforwp_home_url = apply_filters('ampforwp_header_url', $ampforwp_home_url); ?>
17
- <?php if ( true == ($redux_builder_amp['opt-media']['url']) ) {
18
- $alt = ampforwp_default_logo('alt');
19
- $logo_url = __( $redux_builder_amp['opt-media']['url'], 'accelerated-mobile-pages' ); ?>
20
- <a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> >
21
- <amp-img src="<?php echo esc_url( $logo_url ); ?>" width="<?php echo esc_attr(ampforwp_default_logo('width')); ?>" height="<?php echo esc_attr(ampforwp_default_logo('height')); ?>" alt="<?php echo esc_attr($alt); ?>" class="amp-logo" layout="responsive"></amp-img></a>
22
- <?php } else { if(is_single()){ ?>
23
- <h2> <?php } else{?><h1><?php }?>
24
- <a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> ><?php bloginfo('name'); ?></a><?php if(is_single()){?></h2><?php } else{?></h1><?php }
25
- } ?>
26
- </div>
27
- <?php }
28
-
29
- add_action('amp_post_template_css','amp_framework_logo_styles',11);
30
- if( !function_exists( 'amp_framework_logo_styles' ) ){
31
- function amp_framework_logo_styles(){
32
- global $redux_builder_amp;
33
- $max_width = '190px';
34
- $width = (integer) ampforwp_default_logo('width');
35
- if ( true == ampforwp_get_setting('ampforwp-custom-logo-dimensions') && true == ampforwp_get_setting('ampforwp-custom-logo-dimensions-options') && 'flexible' == ampforwp_get_setting('ampforwp-custom-logo-dimensions-options') ) {
36
- $max_width = (integer) $redux_builder_amp['ampforwp-custom-logo-dimensions-slider'];
37
- $width = (integer) ampforwp_default_logo('width');
38
- $max_width = ceil(($width*$max_width)/100)."px";
39
- }
40
- $width .= 'px';
41
- ?>
42
- .amp-logo amp-img{width:<?php echo esc_attr($max_width); ?>}
43
- <?php }
44
- }
1
+ <?php
2
+ function ampforwp_framework_get_logo(){
3
+ global $redux_builder_amp; ?>
4
+ <div class="amp-logo">
5
+ <?php
6
+ do_action('amp_header_top');
7
+ $set_rel_to_noamp = false;
8
+ $ampforwp_home_url = user_trailingslashit( get_bloginfo('url') );
9
+ if ( true == ampforwp_get_setting('ampforwp-homepage-on-off-support') && !ampforwp_get_setting('amp-on-off-support-for-non-amp-home-page') ) {
10
+ $ampforwp_home_url = ampforwp_url_controller( get_bloginfo('url') );
11
+ }
12
+ if ( ampforwp_get_setting('amp-on-off-support-for-non-amp-home-page') && ampforwp_get_setting('amp-mobile-redirection') ) {
13
+ $ampforwp_home_url = trailingslashit( get_bloginfo('url') ).'?nonamp=1';
14
+ $set_rel_to_noamp = true;
15
+ }
16
+ $ampforwp_home_url = apply_filters('ampforwp_header_url', $ampforwp_home_url); ?>
17
+ <?php if ( true == ($redux_builder_amp['opt-media']['url']) ) {
18
+ $alt = ampforwp_default_logo('alt');
19
+ $logo_url = __( $redux_builder_amp['opt-media']['url'], 'accelerated-mobile-pages' ); ?>
20
+ <a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> >
21
+ <amp-img src="<?php echo esc_url( $logo_url ); ?>" width="<?php echo esc_attr(ampforwp_default_logo('width')); ?>" height="<?php echo esc_attr(ampforwp_default_logo('height')); ?>" alt="<?php echo esc_attr($alt); ?>" class="amp-logo" layout="responsive"></amp-img></a>
22
+ <?php } else { if(is_single()){ ?>
23
+ <h2> <?php } else{?><h1><?php }?>
24
+ <a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> ><?php bloginfo('name'); ?></a><?php if(is_single()){?></h2><?php } else{?></h1><?php }
25
+ } ?>
26
+ </div>
27
+ <?php }
28
+
29
+ add_action('amp_post_template_css','amp_framework_logo_styles',11);
30
+ if( !function_exists( 'amp_framework_logo_styles' ) ){
31
+ function amp_framework_logo_styles(){
32
+ global $redux_builder_amp;
33
+ $max_width = '190px';
34
+ $width = (integer) ampforwp_default_logo('width');
35
+ if ( true == ampforwp_get_setting('ampforwp-custom-logo-dimensions') && true == ampforwp_get_setting('ampforwp-custom-logo-dimensions-options') && 'flexible' == ampforwp_get_setting('ampforwp-custom-logo-dimensions-options') ) {
36
+ $max_width = (integer) $redux_builder_amp['ampforwp-custom-logo-dimensions-slider'];
37
+ $width = (integer) ampforwp_default_logo('width');
38
+ $max_width = ceil(($width*$max_width)/100)."px";
39
+ }
40
+ $width .= 'px';
41
+ ?>
42
+ .amp-logo amp-img{width:<?php echo esc_attr($max_width); ?>}
43
+ <?php }
44
+ }
components/loop/loop.php CHANGED
@@ -1,473 +1,473 @@
1
- <?php
2
- function amp_archive_title(){
3
- global $redux_builder_amp;
4
- if( is_author() ){
5
- $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
6
- if( true == ampforwp_gravatar_checker($curauth->user_email) ){
7
- $curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
8
- if($curauth_url){ ?>
9
- <div class="amp-wp-content author-img">
10
- <amp-img src="<?php echo esc_url($curauth_url); ?>" width="90" height="90" layout="responsive"></amp-img>
11
- </div>
12
- <?php }
13
- }
14
- }
15
- if ( is_archive() ) {
16
- $description = $sanitizer = $arch_desc = '';
17
- the_archive_title( '<h3 class="amp-archive-title">', '</h3>' );
18
- $description = get_the_archive_description();
19
- $sanitizer = new AMPFORWP_Content( $description, array(),
20
- apply_filters( 'ampforwp_content_sanitizers',
21
- array(
22
- 'AMP_Style_Sanitizer' => array(),
23
- 'AMP_Blacklist_Sanitizer' => array(),
24
- 'AMP_Img_Sanitizer' => array(),
25
- 'AMP_Video_Sanitizer' => array(),
26
- 'AMP_Audio_Sanitizer' => array(),
27
- 'AMP_Iframe_Sanitizer' => array(
28
- 'add_placeholder' => true,
29
- )
30
- ) ) );
31
- $arch_desc = $sanitizer->get_amp_content();
32
- if( $arch_desc ) {
33
- if ( get_query_var( 'paged' ) ) {
34
- $paged = get_query_var('paged');
35
- } elseif ( get_query_var( 'page' ) ) {
36
- $paged = get_query_var('page');
37
- } else {
38
- $paged = 1;
39
- }
40
- if($paged <= '1') {?>
41
- <div class="amp-archive-desc">
42
- <?php echo $arch_desc;// amphtml content, no kses ?>
43
- </div> <?php
44
- }
45
- }
46
- }
47
- if( is_category() && 1 == $redux_builder_amp['ampforwp-sub-categories-support'] ){
48
- $parent_cat_id = '';
49
- $cat_childs = array();
50
- $parent_cat_id = get_queried_object_id();
51
- $cat_childs = get_terms( array(
52
- 'taxonomy' => get_queried_object()->taxonomy,
53
- 'parent' => $parent_cat_id )
54
- );
55
- if( !empty( $cat_childs ) ){
56
- echo "<div class='amp-sub-archives'><ul>";
57
- foreach ($cat_childs as $cat_child ) {
58
- echo '<li><a href="' . esc_url(get_term_link( $cat_child )) . '">' . esc_attr($cat_child->name) . '</a></li>';
59
- }
60
- echo "</ul></div>";
61
- }
62
- }
63
- if(is_search()){
64
- $label = 'You searched for:';
65
- if(function_exists('ampforwp_translation')){
66
- $label = ampforwp_translation( $redux_builder_amp['amp-translator-search-text'], 'You searched for:');
67
- }
68
- echo '<h3 class="amp-loop-label">'.esc_attr($label) . ' ' . esc_attr(get_search_query()).'</h3>';
69
- }
70
- }
71
-
72
- $amp_q = '';
73
- $count = 1;
74
- function call_loops_standard($data=array()){
75
- global $amp_q;
76
- $post_type = get_post_type();
77
- if (get_query_var( 'paged' ) ) {
78
- $paged = get_query_var('paged');
79
- } elseif ( get_query_var( 'page' ) ) {
80
- $paged = get_query_var('page');
81
- } else {
82
- $paged = 1;
83
- }
84
-
85
- $qobj_taxonomy = $qobj_term_id = "";
86
-
87
- if ( is_archive() ) {
88
- $exclude_ids = ampforwp_exclude_posts();
89
- $qobj = get_queried_object();
90
- if( !is_date() ){
91
- $args = array(
92
- 'no_found_rows' => true,
93
- 'post_type' => $post_type,
94
- 'orderby' => 'date',
95
- 'ignore_sticky_posts' => 1,
96
- 'paged' => esc_attr($paged),
97
- 'post__not_in' => $exclude_ids,
98
- 'has_password' => false ,
99
- 'post_status'=> 'publish'
100
- );
101
- if ( is_category() || ( isset($qobj->taxonomy) && taxonomy_exists($qobj->taxonomy)) ) {
102
- $args['tax_query'] = array(
103
- array(
104
- 'taxonomy' => $qobj->taxonomy,
105
- 'field' => 'id',
106
- 'terms' => $qobj->term_id,
107
- ),
108
- );
109
- }
110
- }
111
- if(is_date()){
112
- $year = get_query_var('year');
113
- $monthnum = get_query_var('monthnum');
114
- $week = get_query_var('week');
115
- $day = get_query_var('day');
116
- $args = array( 'date_query' => array(
117
- array( 'year' => $year,
118
- 'month' => $monthnum,
119
- 'week' => $week,
120
- 'day' => $day )
121
- ),
122
- 'paged' => esc_attr($paged),
123
- 'post__not_in' => $exclude_ids,
124
- 'has_password' => false ,
125
- 'post_status'=> 'publish'
126
- );
127
- }
128
- }
129
- if ( is_home() ) {
130
- $exclude_ids = ampforwp_exclude_posts();
131
- $args = array(
132
- 'no_found_rows' => true,
133
- 'post_type' => 'post',
134
- 'orderby' => 'date',
135
- 'paged' => esc_attr($paged),
136
- 'post__not_in' => $exclude_ids,
137
- 'has_password' => false ,
138
- 'post_status' => 'publish'
139
- );
140
- }
141
-
142
- if ( is_search() ) {
143
- $exclude_ids = ampforwp_exclude_posts();
144
- $args = array(
145
- 's' => get_search_query() ,
146
- 'ignore_sticky_posts' => 1,
147
- 'paged' => esc_attr($paged),
148
- 'post__not_in' => $exclude_ids,
149
- 'has_password' => false ,
150
- 'post_status' => 'publish'
151
- );
152
- }
153
- if(is_author()){
154
- $exclude_ids = ampforwp_exclude_posts();
155
- $author = get_user_by( 'slug', get_query_var( 'author_name' ) );
156
- $args = array(
157
- 'author' => $author->ID,
158
- 'post_type' => 'post',
159
- 'orderby' => 'date',
160
- 'ignore_sticky_posts' => 1,
161
- 'paged' => esc_attr($paged),
162
- 'post__not_in' => $exclude_ids,
163
- 'has_password' => false ,
164
- 'post_status' => 'publish'
165
- );
166
- }
167
- if( is_single() ) {
168
- global $post;
169
- $exclude_ids = ampforwp_exclude_posts();
170
- $exclude_ids[] = $post->ID;
171
- $args = array(
172
- 'no_found_rows' => true,
173
- 'post_type' => 'post',
174
- 'orderby' => 'date',
175
- 'ignore_sticky_posts' => 1,
176
- 'paged' => esc_attr($paged),
177
- 'post__not_in' => $exclude_ids,
178
- 'has_password' => false ,
179
- 'post_status' => 'publish'
180
- );
181
- }
182
- if( isset( $data['post_to_show'] ) && $data['post_to_show']>0 ){
183
- $args['posts_per_page'] = $data['post_to_show'];
184
- }
185
- if( isset( $data['offset'] ) && $data['offset']>0 ){
186
- $args['offset'] = $data['offset'];
187
- }
188
- if( isset( $data['posts_per_page'] ) && $data['posts_per_page']>0 ){
189
- $args['posts_per_page'] = $data['posts_per_page'];
190
- }
191
-
192
- $filtered_args = apply_filters('ampforwp_query_args', $args);
193
- $amp_q = new WP_Query( $filtered_args );
194
-
195
- // If Relevanssi is available and this is a search, pass the query to Relevanssi
196
- // for improved search results. 2018-07-03 Mikko Saari (mikko@mikkosaari.fi)
197
- if ( is_search() && function_exists( 'relevanssi_do_query' ) ) {
198
- relevanssi_do_query( $amp_q );
199
- }
200
- }
201
- //call_loops_standered();
202
- /****
203
- * AMP Loop Functions
204
- */
205
- //add_action("init", 'call_loops_standered');
206
-
207
- function amp_loop($selection,$data=array()){
208
- global $amp_q;
209
- if(empty($amp_q) || is_null($amp_q)){
210
- call_loops_standard($data);
211
- echo "<div class='loop-wrapper'>";
212
- }
213
- if ( !isset($ampLoopData['no_data']) ) :
214
- switch($selection){
215
- case 'start':
216
- return amp_start_loop();
217
- break;
218
- case 'end':
219
- return amp_end_loop();
220
- break;
221
- }
222
- else : // If no posts exist.
223
- return false;
224
- endif; // End loop.
225
- }
226
-
227
- function amp_start_loop(){
228
- global $amp_q, $count;
229
- $post_status = $amp_q->have_posts();
230
- $amp_q->the_post();
231
- do_action('ampforwp_between_loop',$count);
232
- $count++;
233
- return $post_status;
234
- }
235
- function amp_end_loop(){
236
- global $amp_q;
237
- wp_reset_postdata();
238
- echo "</div>";
239
- }
240
-
241
- function amp_reset_loop(){
242
- global $amp_q;
243
- $amp_q = '';
244
- return "";
245
- }
246
-
247
- function amp_pagination($args =array()) {
248
- global $amp_q, $wp_query, $redux_builder_amp;
249
-
250
- if (get_query_var( 'paged' ) ) {
251
- $paged = get_query_var('paged');
252
- } elseif ( get_query_var( 'page' ) ) {
253
- $paged = get_query_var('page');
254
- } else {
255
- $paged = 1;
256
- }
257
- $pre_link = '';
258
- if(!isset($args['previous_text']) || $args['previous_text']==''){
259
- $args['previous_text'] = 'Show previous Posts';
260
- }
261
- if(!isset($args['next_text']) || $args['next_text']==''){
262
- $args['next_text'] = 'Show more Posts';
263
- }?>
264
-
265
- <div class="loop-pagination"><?php
266
- if ( get_next_posts_link( $args['next_text'], $amp_q->max_num_pages ) ) {
267
- $next_link = '<div class="right">'. apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-more-posts-text'] , $args['next_text']), $amp_q->max_num_pages ), $paged) .'</div>';
268
- echo $next_link;
269
- }
270
- if ( get_previous_posts_link() ) {
271
- $pre_link = '<div class="left">'.apply_filters('ampforwp_previous_posts_link',get_previous_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-previous-posts-text'], $args['previous_text'] ) ), $paged ) .'</div>';
272
- echo $pre_link;
273
- } ?>
274
- <div class="clearfix"></div>
275
- </div><?php
276
-
277
- }
278
-
279
- /***
280
- * Get Title of post
281
- */
282
- function amp_loop_title($data=array()){
283
- $data = array_filter($data);
284
- $tag = 'h2';
285
- if(isset($data['tag']) && $data['tag']!=""){
286
- $tag = $data['tag'];
287
- }
288
- $attributes = 'class="loop-title"';
289
- if(isset($data['attributes']) && $data['attributes']!=""){
290
- $attributes = $data['attributes'];
291
- }
292
- echo '<'.esc_attr($tag).' '.esc_attr($attributes).'>';
293
- if(!isset($data['link']) ){
294
- echo '<a href="'. esc_url(amp_loop_permalink(true)) .'">';
295
- }
296
- echo the_title('','',false);
297
-
298
- if(!isset($data['link']) ){
299
- echo '</a>';
300
- }
301
- echo '</'.$tag.'>';
302
- }
303
-
304
- function amp_loop_date($args=array()){
305
- global $redux_builder_amp;
306
- if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
307
- $args['format'] = 'traditional';
308
- }
309
- if(isset($args['format']) && $args['format']=='traditional'){
310
- $post_date = get_the_date() . ' '. get_the_time();
311
- }else{
312
- $post_date = human_time_diff(
313
- get_the_time('U', get_the_ID() ),
314
- current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
315
- 'ago');
316
- }
317
- $post_date = apply_filters('ampforwp_modify_post_date',$post_date);
318
- echo '<div class="loop-date">'.esc_html($post_date).'</div>';
319
- }
320
-
321
- function amp_loop_excerpt($excerpt_length = 15,$tag = 'p', $class = ''){
322
- //excerpt
323
- global $post,$redux_builder_amp;
324
- $excerpt_length = (int) $excerpt_length;
325
- if( has_excerpt() ) {
326
- $content = get_the_excerpt();
327
- } else {
328
- $content = get_the_content();
329
- }
330
- $content = strip_shortcodes( $content );
331
-
332
- if ( ampforwp_is_home() ){
333
- $content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
334
- } else {
335
- $content = apply_filters('ampforwp_modify_archive_content', $content, $excerpt_length );
336
- }
337
-
338
- if( ampforwp_get_setting('ampforwp-homepage-loop-readmore-link') == 1 ) {
339
- echo ('<'.$tag.' class="'.$class.'">'. wp_trim_words( $content, $excerpt_length ) .' '.'<a href="'. ampforwp_url_controller(get_permalink($post->ID)) . '">'. ampforwp_translation($redux_builder_amp['amp-translator-read-more'],'Read More') . '</a></'.$tag.'>');
340
- } else {
341
- echo ('<'.$tag.' class="'.esc_attr($class).'">'. wp_trim_words( $content, $excerpt_length ) .'</'.$tag.'>');
342
- }
343
-
344
- }
345
-
346
- function amp_loop_all_content($tag = 'p'){
347
- $fullContent = strip_shortcodes( get_the_content() );
348
- echo ('<'.$tag.'>'. $fullContent .'</'.$tag.'>');
349
- }
350
-
351
- function amp_loop_permalink($return = ''){
352
- if (is_single() && ampforwp_get_setting('ampforwp-single-related-posts-link')) {
353
- return get_permalink();
354
- }
355
- return ampforwp_url_controller( get_permalink() ) ;
356
- }
357
-
358
- if (! function_exists('amp_loop_get_permalink')){
359
- function amp_loop_get_permalink(){
360
- return amp_loop_permalink();
361
- }
362
- }
363
- if (! function_exists('amp_loop_the_permalink')){
364
- function amp_loop_the_permalink(){
365
- echo amp_loop_get_permalink();
366
- }
367
- }
368
- function amp_loop_image( $data=array() ) {
369
- global $ampLoopData, $counterOffset, $redux_builder_amp;
370
- if (ampforwp_has_post_thumbnail() ) {
371
-
372
- $tag = 'div';
373
- $tag_class = '';
374
- $layout_responsive = '';
375
- $imageClass = '';
376
- $imageSize = 'thumbnail';
377
-
378
- if ( isset($data['tag']) && $data['tag'] != "" ) {
379
- $tag = $data['tag'];
380
- }
381
-
382
- if ( isset($data['responsive']) && $data['responsive'] != "" ) {
383
- $layout_responsive = 'layout=responsive';
384
- }
385
-
386
- if ( isset($data['tag_class']) && $data['tag_class'] != "" ) {
387
- $tag_class = $data['tag_class'];
388
- }
389
- if ( isset($data['image_class']) && $data['image_class'] != "" ) {
390
- $imageClass = $data['image_class'];
391
- }
392
- if ( isset($data['image_size']) && $data['image_size'] != "" ) {
393
- $imageSize = $data['image_size'];
394
- }
395
- $thumb_url = ampforwp_get_post_thumbnail('url', $imageSize);
396
- $thumb_width = ampforwp_get_post_thumbnail('width', $imageSize);
397
- $thumb_height = ampforwp_get_post_thumbnail('height', $imageSize);
398
-
399
- if ( isset($data['image_crop']) && $data['image_crop'] != "" ) {
400
- $width = $data['image_crop_width'];
401
- if ( empty($width) ) {
402
- $width = $thumb_width;
403
- }
404
- $height = $data['image_crop_height'];
405
- if ( empty($height) ) {
406
- $height = $thumb_height;
407
- }
408
- if ( isset($redux_builder_amp['ampforwp-retina-images']) && true == $redux_builder_amp['ampforwp-retina-images'] ) {
409
- $resolution = 2;
410
- if ( isset($redux_builder_amp['ampforwp-retina-images-res']) && $redux_builder_amp['ampforwp-retina-images-res'] ) {
411
- $resolution = $redux_builder_amp['ampforwp-retina-images-res'];
412
- }
413
- $width = $width * $resolution;
414
- $height = $height * $resolution;
415
- }
416
- $thumbnail_modify = apply_filters('ampforwp_modify_thumb_url_array', array('thumb_url'=>$thumb_url,'width'=>$width,'height'=> $height));
417
- $thumb_url_array = ampforwp_aq_resize( $thumbnail_modify['thumb_url'], $thumbnail_modify['width'], $thumbnail_modify['height'], true, false, true ); //resize & crop the image
418
- $thumb_url = $thumb_url_array[0];
419
- $thumb_width = $thumb_url_array[1];
420
- $thumb_height = $thumb_url_array[2];
421
- }
422
- if ( $thumb_url ) {
423
- $imageLink = amp_loop_permalink(true);
424
- $loopImageData = array("post_id" =>get_the_ID(),
425
- "image_url" =>$thumb_url,
426
- "width" =>$thumb_width,
427
- "height" =>$thumb_height,
428
- "layout_responsive" =>$layout_responsive,
429
- "image_class" =>$imageClass,
430
- "image_link" =>$imageLink
431
- );
432
- $changesInImageData = apply_filters("ampforwp_loop_image_update",$loopImageData);
433
- if(!empty($changesInImageData) && is_array($changesInImageData)){
434
- $thumb_url = $changesInImageData["image_url"];
435
- $thumb_width = $changesInImageData["width"];
436
- $thumb_height = $changesInImageData["height"];
437
- $layout_responsive = $changesInImageData["layout_responsive"];
438
- $imageClass = $changesInImageData["image_class"];
439
- $imageLink = $changesInImageData["image_link"];
440
- }
441
- echo '<'.esc_attr($tag).' class="loop-img '.esc_attr($tag_class).'">';
442
- echo '<a href="'.esc_url($imageLink).'">';
443
- echo '<amp-img src="'. esc_url($thumb_url) .'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" '. esc_attr($layout_responsive) .' class="'.esc_attr($imageClass).'"></amp-img>';
444
- echo '</a>';
445
- echo '</'.esc_attr($tag).'>';
446
- }
447
- }
448
- }
449
-
450
- // Category
451
- function amp_loop_category(){
452
- global $redux_builder_amp;
453
- if(count(get_the_category()) > 0){
454
- echo ' <ul class="loop-category">';
455
- foreach((get_the_category()) as $category) {
456
- if ( false == $redux_builder_amp['ampforwp-archive-support'] ) {
457
- echo '<li class="amp-cat-'. esc_attr($category->term_id).'">'. esc_attr($category->cat_name).'</li>';
458
- }else{
459
- echo '<li class="amp-cat-'. esc_attr($category->term_id).'"><a href="'.ampforwp_url_controller( get_category_link( $category->term_id ) ).'">'. esc_attr($category->cat_name).'</a></li>';
460
- }
461
- }
462
- echo '</ul>';
463
- }
464
- }
465
- // author
466
- function amp_loop_author($args = array()){
467
- global $redux_builder_amp;
468
- if(function_exists('ampforwp_framework_get_author_box')){
469
- ampforwp_framework_get_author_box($args);
470
- }else{
471
- echo "";
472
- }
473
  }
1
+ <?php
2
+ function amp_archive_title(){
3
+ global $redux_builder_amp;
4
+ if( is_author() ){
5
+ $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
6
+ if( true == ampforwp_gravatar_checker($curauth->user_email) ){
7
+ $curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
8
+ if($curauth_url){ ?>
9
+ <div class="amp-wp-content author-img">
10
+ <amp-img src="<?php echo esc_url($curauth_url); ?>" width="90" height="90" layout="responsive"></amp-img>
11
+ </div>
12
+ <?php }
13
+ }
14
+ }
15
+ if ( is_archive() ) {
16
+ $description = $sanitizer = $arch_desc = '';
17
+ the_archive_title( '<h3 class="amp-archive-title">', '</h3>' );
18
+ $description = get_the_archive_description();
19
+ $sanitizer = new AMPFORWP_Content( $description, array(),
20
+ apply_filters( 'ampforwp_content_sanitizers',
21
+ array(
22
+ 'AMP_Style_Sanitizer' => array(),
23
+ 'AMP_Blacklist_Sanitizer' => array(),
24
+ 'AMP_Img_Sanitizer' => array(),
25
+ 'AMP_Video_Sanitizer' => array(),
26
+ 'AMP_Audio_Sanitizer' => array(),
27
+ 'AMP_Iframe_Sanitizer' => array(
28
+ 'add_placeholder' => true,
29
+ )
30
+ ) ) );
31
+ $arch_desc = $sanitizer->get_amp_content();
32
+ if( $arch_desc ) {
33
+ if ( get_query_var( 'paged' ) ) {
34
+ $paged = get_query_var('paged');
35
+ } elseif ( get_query_var( 'page' ) ) {
36
+ $paged = get_query_var('page');
37
+ } else {
38
+ $paged = 1;
39
+ }
40
+ if($paged <= '1') {?>
41
+ <div class="amp-archive-desc">
42
+ <?php echo $arch_desc;// amphtml content, no kses ?>
43
+ </div> <?php
44
+ }
45
+ }
46
+ }
47
+ if( is_category() && 1 == $redux_builder_amp['ampforwp-sub-categories-support'] ){
48
+ $parent_cat_id = '';
49
+ $cat_childs = array();
50
+ $parent_cat_id = get_queried_object_id();
51
+ $cat_childs = get_terms( array(
52
+ 'taxonomy' => get_queried_object()->taxonomy,
53
+ 'parent' => $parent_cat_id )
54
+ );
55
+ if( !empty( $cat_childs ) ){
56
+ echo "<div class='amp-sub-archives'><ul>";
57
+ foreach ($cat_childs as $cat_child ) {
58
+ echo '<li><a href="' . esc_url(get_term_link( $cat_child )) . '">' . esc_attr($cat_child->name) . '</a></li>';
59
+ }
60
+ echo "</ul></div>";
61
+ }
62
+ }
63
+ if(is_search()){
64
+ $label = 'You searched for:';
65
+ if(function_exists('ampforwp_translation')){
66
+ $label = ampforwp_translation( $redux_builder_amp['amp-translator-search-text'], 'You searched for:');
67
+ }
68
+ echo '<h3 class="amp-loop-label">'.esc_attr($label) . ' ' . esc_attr(get_search_query()).'</h3>';
69
+ }
70
+ }
71
+
72
+ $amp_q = '';
73
+ $count = 1;
74
+ function call_loops_standard($data=array()){
75
+ global $amp_q;
76
+ $post_type = get_post_type();
77
+ if (get_query_var( 'paged' ) ) {
78
+ $paged = get_query_var('paged');
79
+ } elseif ( get_query_var( 'page' ) ) {
80
+ $paged = get_query_var('page');
81
+ } else {
82
+ $paged = 1;
83
+ }
84
+
85
+ $qobj_taxonomy = $qobj_term_id = "";
86
+
87
+ if ( is_archive() ) {
88
+ $exclude_ids = ampforwp_exclude_posts();
89
+ $qobj = get_queried_object();
90
+ if( !is_date() ){
91
+ $args = array(
92
+ 'no_found_rows' => true,
93
+ 'post_type' => $post_type,
94
+ 'orderby' => 'date',
95
+ 'ignore_sticky_posts' => 1,
96
+ 'paged' => esc_attr($paged),
97
+ 'post__not_in' => $exclude_ids,
98
+ 'has_password' => false ,
99
+ 'post_status'=> 'publish'
100
+ );
101
+ if ( is_category() || ( isset($qobj->taxonomy) && taxonomy_exists($qobj->taxonomy)) ) {
102
+ $args['tax_query'] = array(
103
+ array(
104
+ 'taxonomy' => $qobj->taxonomy,
105
+ 'field' => 'id',
106
+ 'terms' => $qobj->term_id,
107
+ ),
108
+ );
109
+ }
110
+ }
111
+ if(is_date()){
112
+ $year = get_query_var('year');
113
+ $monthnum = get_query_var('monthnum');
114
+ $week = get_query_var('week');
115
+ $day = get_query_var('day');
116
+ $args = array( 'date_query' => array(
117
+ array( 'year' => $year,
118
+ 'month' => $monthnum,
119
+ 'week' => $week,
120
+ 'day' => $day )
121
+ ),
122
+ 'paged' => esc_attr($paged),
123
+ 'post__not_in' => $exclude_ids,
124
+ 'has_password' => false ,
125
+ 'post_status'=> 'publish'
126
+ );
127
+ }
128
+ }
129
+ if ( is_home() ) {
130
+ $exclude_ids = ampforwp_exclude_posts();
131
+ $args = array(
132
+ 'no_found_rows' => true,
133
+ 'post_type' => 'post',
134
+ 'orderby' => 'date',
135
+ 'paged' => esc_attr($paged),
136
+ 'post__not_in' => $exclude_ids,
137
+ 'has_password' => false ,
138
+ 'post_status' => 'publish'
139
+ );
140
+ }
141
+
142
+ if ( is_search() ) {
143
+ $exclude_ids = ampforwp_exclude_posts();
144
+ $args = array(
145
+ 's' => get_search_query() ,
146
+ 'ignore_sticky_posts' => 1,
147
+ 'paged' => esc_attr($paged),
148
+ 'post__not_in' => $exclude_ids,
149
+ 'has_password' => false ,
150
+ 'post_status' => 'publish'
151
+ );
152
+ }
153
+ if(is_author()){
154
+ $exclude_ids = ampforwp_exclude_posts();
155
+ $author = get_user_by( 'slug', get_query_var( 'author_name' ) );
156
+ $args = array(
157
+ 'author' => $author->ID,
158
+ 'post_type' => 'post',
159
+ 'orderby' => 'date',
160
+ 'ignore_sticky_posts' => 1,
161
+ 'paged' => esc_attr($paged),
162
+ 'post__not_in' => $exclude_ids,
163
+ 'has_password' => false ,
164
+ 'post_status' => 'publish'
165
+ );
166
+ }
167
+ if( is_single() ) {
168
+ global $post;
169
+ $exclude_ids = ampforwp_exclude_posts();
170
+ $exclude_ids[] = $post->ID;
171
+ $args = array(
172
+ 'no_found_rows' => true,
173
+ 'post_type' => get_post_type($post),
174
+ 'orderby' => 'date',
175
+ 'ignore_sticky_posts' => 1,
176
+ 'paged' => esc_attr($paged),
177
+ 'post__not_in' => $exclude_ids,
178
+ 'has_password' => false ,
179
+ 'post_status' => 'publish'
180
+ );
181
+ }
182
+ if( isset( $data['post_to_show'] ) && $data['post_to_show']>0 ){
183
+ $args['posts_per_page'] = $data['post_to_show'];
184
+ }
185
+ if( isset( $data['offset'] ) && $data['offset']>0 ){
186
+ $args['offset'] = $data['offset'];
187
+ }
188
+ if( isset( $data['posts_per_page'] ) && $data['posts_per_page']>0 ){
189
+ $args['posts_per_page'] = $data['posts_per_page'];
190
+ }
191
+
192
+ $filtered_args = apply_filters('ampforwp_query_args', $args);
193
+ $amp_q = new WP_Query( $filtered_args );
194
+
195
+ // If Relevanssi is available and this is a search, pass the query to Relevanssi
196
+ // for improved search results. 2018-07-03 Mikko Saari (mikko@mikkosaari.fi)
197
+ if ( is_search() && function_exists( 'relevanssi_do_query' ) ) {
198
+ relevanssi_do_query( $amp_q );
199
+ }
200
+ }
201
+ //call_loops_standered();
202
+ /****
203
+ * AMP Loop Functions
204
+ */
205
+ //add_action("init", 'call_loops_standered');
206
+
207
+ function amp_loop($selection,$data=array()){
208
+ global $amp_q;
209
+ if(empty($amp_q) || is_null($amp_q)){
210
+ call_loops_standard($data);
211
+ echo "<div class='loop-wrapper'>";
212
+ }
213
+ if ( !isset($ampLoopData['no_data']) ) :
214
+ switch($selection){
215
+ case 'start':
216
+ return amp_start_loop();
217
+ break;
218
+ case 'end':
219
+ return amp_end_loop();
220
+ break;
221
+ }
222
+ else : // If no posts exist.
223
+ return false;
224
+ endif; // End loop.
225
+ }
226
+
227
+ function amp_start_loop(){
228
+ global $amp_q, $count;
229
+ $post_status = $amp_q->have_posts();
230
+ $amp_q->the_post();
231
+ do_action('ampforwp_between_loop',$count);
232
+ $count++;
233
+ return $post_status;
234
+ }
235
+ function amp_end_loop(){
236
+ global $amp_q;
237
+ wp_reset_postdata();
238
+ echo "</div>";
239
+ }
240
+
241
+ function amp_reset_loop(){
242
+ global $amp_q;
243
+ $amp_q = '';
244
+ return "";
245
+ }
246
+
247
+ function amp_pagination($args =array()) {
248
+ global $amp_q, $wp_query, $redux_builder_amp;
249
+
250
+ if (get_query_var( 'paged' ) ) {
251
+ $paged = get_query_var('paged');
252
+ } elseif ( get_query_var( 'page' ) ) {
253
+ $paged = get_query_var('page');
254
+ } else {
255
+ $paged = 1;
256
+ }
257
+ $pre_link = '';
258
+ if(!isset($args['previous_text']) || $args['previous_text']==''){
259
+ $args['previous_text'] = 'Show previous Posts';
260
+ }
261
+ if(!isset($args['next_text']) || $args['next_text']==''){
262
+ $args['next_text'] = 'Show more Posts';
263
+ }?>
264
+
265
+ <div class="loop-pagination"><?php
266
+ if ( get_next_posts_link( $args['next_text'], $amp_q->max_num_pages ) ) {
267
+ $next_link = '<div class="right">'. apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-more-posts-text'] , $args['next_text']), $amp_q->max_num_pages ), $paged) .'</div>';
268
+ echo $next_link;
269
+ }
270
+ if ( get_previous_posts_link() ) {
271
+ $pre_link = '<div class="left">'.apply_filters('ampforwp_previous_posts_link',get_previous_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-previous-posts-text'], $args['previous_text'] ) ), $paged ) .'</div>';
272
+ echo $pre_link;
273
+ } ?>
274
+ <div class="clearfix"></div>
275
+ </div><?php
276
+
277
+ }
278
+
279
+ /***
280
+ * Get Title of post
281
+ */
282
+ function amp_loop_title($data=array()){
283
+ $data = array_filter($data);
284
+ $tag = 'h2';
285
+ if(isset($data['tag']) && $data['tag']!=""){
286
+ $tag = $data['tag'];
287
+ }
288
+ $attributes = 'class="loop-title"';
289
+ if(isset($data['attributes']) && $data['attributes']!=""){
290
+ $attributes = $data['attributes'];
291
+ }
292
+ echo '<'.esc_attr($tag).' '.esc_attr($attributes).'>';
293
+ if(!isset($data['link']) ){
294
+ echo '<a href="'. esc_url(amp_loop_permalink(true)) .'">';
295
+ }
296
+ echo the_title('','',false);
297
+
298
+ if(!isset($data['link']) ){
299
+ echo '</a>';
300
+ }
301
+ echo '</'.$tag.'>';
302
+ }
303
+
304
+ function amp_loop_date($args=array()){
305
+ global $redux_builder_amp;
306
+ if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
307
+ $args['format'] = 'traditional';
308
+ }
309
+ if(isset($args['format']) && $args['format']=='traditional'){
310
+ $post_date = get_the_date() . ' '. get_the_time();
311
+ }else{
312
+ $post_date = human_time_diff(
313
+ get_the_time('U', get_the_ID() ),
314
+ current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
315
+ 'ago');
316
+ }
317
+ $post_date = apply_filters('ampforwp_modify_post_date',$post_date);
318
+ echo '<div class="loop-date">'.esc_html($post_date).'</div>';
319
+ }
320
+
321
+ function amp_loop_excerpt($excerpt_length = 15,$tag = 'p', $class = ''){
322
+ //excerpt
323
+ global $post,$redux_builder_amp;
324
+ $excerpt_length = (int) $excerpt_length;
325
+ if( has_excerpt() ) {
326
+ $content = get_the_excerpt();
327
+ } else {
328
+ $content = get_the_content();
329
+ }
330
+ $content = strip_shortcodes( $content );
331
+
332
+ if ( ampforwp_is_home() ){
333
+ $content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
334
+ } else {
335
+ $content = apply_filters('ampforwp_modify_archive_content', $content, $excerpt_length );
336
+ }
337
+
338
+ if( ampforwp_get_setting('ampforwp-homepage-loop-readmore-link') == 1 ) {
339
+ echo ('<'.$tag.' class="'.$class.'">'. wp_trim_words( $content, $excerpt_length ) .' '.'<a href="'. ampforwp_url_controller(get_permalink($post->ID)) . '">'. ampforwp_translation($redux_builder_amp['amp-translator-read-more'],'Read More') . '</a></'.$tag.'>');
340
+ } else {
341
+ echo ('<'.$tag.' class="'.esc_attr($class).'">'. wp_trim_words( $content, $excerpt_length ) .'</'.$tag.'>');
342
+ }
343
+
344
+ }
345
+
346
+ function amp_loop_all_content($tag = 'p'){
347
+ $fullContent = strip_shortcodes( get_the_content() );
348
+ echo ('<'.$tag.'>'. $fullContent .'</'.$tag.'>');
349
+ }
350
+
351
+ function amp_loop_permalink($return = ''){
352
+ if (is_single() && ampforwp_get_setting('ampforwp-single-related-posts-link')) {
353
+ return get_permalink();
354
+ }
355
+ return ampforwp_url_controller( get_permalink() ) ;
356
+ }
357
+
358
+ if (! function_exists('amp_loop_get_permalink')){
359
+ function amp_loop_get_permalink(){
360
+ return amp_loop_permalink();
361
+ }
362
+ }
363
+ if (! function_exists('amp_loop_the_permalink')){
364
+ function amp_loop_the_permalink(){
365
+ echo amp_loop_get_permalink();
366
+ }
367
+ }
368
+ function amp_loop_image( $data=array() ) {
369
+ global $ampLoopData, $counterOffset, $redux_builder_amp;
370
+ if (ampforwp_has_post_thumbnail() ) {
371
+
372
+ $tag = 'div';
373
+ $tag_class = '';
374
+ $layout_responsive = '';
375
+ $imageClass = '';
376
+ $imageSize = 'thumbnail';
377
+
378
+ if ( isset($data['tag']) && $data['tag'] != "" ) {
379
+ $tag = $data['tag'];
380
+ }
381
+
382
+ if ( isset($data['responsive']) && $data['responsive'] != "" ) {
383
+ $layout_responsive = 'layout=responsive';
384
+ }
385
+
386
+ if ( isset($data['tag_class']) && $data['tag_class'] != "" ) {
387
+ $tag_class = $data['tag_class'];
388
+ }
389
+ if ( isset($data['image_class']) && $data['image_class'] != "" ) {
390
+ $imageClass = $data['image_class'];
391
+ }
392
+ if ( isset($data['image_size']) && $data['image_size'] != "" ) {
393
+ $imageSize = $data['image_size'];
394
+ }
395
+ $thumb_url = ampforwp_get_post_thumbnail('url', $imageSize);
396
+ $thumb_width = ampforwp_get_post_thumbnail('width', $imageSize);
397
+ $thumb_height = ampforwp_get_post_thumbnail('height', $imageSize);
398
+
399
+ if ( isset($data['image_crop']) && $data['image_crop'] != "" ) {
400
+ $width = $data['image_crop_width'];
401
+ if ( empty($width) ) {
402
+ $width = $thumb_width;
403
+ }
404
+ $height = $data['image_crop_height'];
405
+ if ( empty($height) ) {
406
+ $height = $thumb_height;
407
+ }
408
+ if ( isset($redux_builder_amp['ampforwp-retina-images']) && true == $redux_builder_amp['ampforwp-retina-images'] ) {
409
+ $resolution = 2;
410
+ if ( isset($redux_builder_amp['ampforwp-retina-images-res']) && $redux_builder_amp['ampforwp-retina-images-res'] ) {
411
+ $resolution = $redux_builder_amp['ampforwp-retina-images-res'];
412
+ }
413
+ $width = $width * $resolution;
414
+ $height = $height * $resolution;
415
+ }
416
+ $thumbnail_modify = apply_filters('ampforwp_modify_thumb_url_array', array('thumb_url'=>$thumb_url,'width'=>$width,'height'=> $height));
417
+ $thumb_url_array = ampforwp_aq_resize( $thumbnail_modify['thumb_url'], $thumbnail_modify['width'], $thumbnail_modify['height'], true, false, true ); //resize & crop the image
418
+ $thumb_url = $thumb_url_array[0];
419
+ $thumb_width = $thumb_url_array[1];
420
+ $thumb_height = $thumb_url_array[2];
421
+ }
422
+ if ( $thumb_url ) {
423
+ $imageLink = amp_loop_permalink(true);
424
+ $loopImageData = array("post_id" =>get_the_ID(),
425
+ "image_url" =>$thumb_url,
426
+ "width" =>$thumb_width,
427
+ "height" =>$thumb_height,
428
+ "layout_responsive" =>$layout_responsive,
429
+ "image_class" =>$imageClass,
430
+ "image_link" =>$imageLink
431
+ );
432
+ $changesInImageData = apply_filters("ampforwp_loop_image_update",$loopImageData);
433
+ if(!empty($changesInImageData) && is_array($changesInImageData)){
434
+ $thumb_url = $changesInImageData["image_url"];
435
+ $thumb_width = $changesInImageData["width"];
436
+ $thumb_height = $changesInImageData["height"];
437
+ $layout_responsive = $changesInImageData["layout_responsive"];
438
+ $imageClass = $changesInImageData["image_class"];
439
+ $imageLink = $changesInImageData["image_link"];
440
+ }
441
+ echo '<'.esc_attr($tag).' class="loop-img '.esc_attr($tag_class).'">';
442
+ echo '<a href="'.esc_url($imageLink).'">';
443
+ echo '<amp-img src="'. esc_url($thumb_url) .'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" '. esc_attr($layout_responsive) .' class="'.esc_attr($imageClass).'"></amp-img>';
444
+ echo '</a>';
445
+ echo '</'.esc_attr($tag).'>';
446
+ }
447
+ }
448
+ }
449
+
450
+ // Category
451
+ function amp_loop_category(){
452
+ global $redux_builder_amp;
453
+ if(count(get_the_category()) > 0){
454
+ echo ' <ul class="loop-category">';
455
+ foreach((get_the_category()) as $category) {
456
+ if ( false == $redux_builder_amp['ampforwp-archive-support'] ) {
457
+ echo '<li class="amp-cat-'. esc_attr($category->term_id).'">'. esc_attr($category->cat_name).'</li>';
458
+ }else{
459
+ echo '<li class="amp-cat-'. esc_attr($category->term_id).'"><a href="'.ampforwp_url_controller( get_category_link( $category->term_id ) ).'">'. esc_attr($category->cat_name).'</a></li>';
460
+ }
461
+ }
462
+ echo '</ul>';
463
+ }
464
+ }
465
+ // author
466
+ function amp_loop_author($args = array()){
467
+ global $redux_builder_amp;
468
+ if(function_exists('ampforwp_framework_get_author_box')){
469
+ ampforwp_framework_get_author_box($args);
470
+ }else{
471
+ echo "";
472
+ }
473
  }
components/menu/menu.php CHANGED
@@ -1,71 +1,71 @@
1
- <?php
2
- require_once AMPFORWP_PLUGIN_DIR .'/classes/class-ampforwp-walker-nav-menu.php';
3
-
4
- function amp_menu_html($echo, $menu_args, $type){
5
- if( has_nav_menu( 'amp-menu' ) || has_nav_menu( 'amp-footer-menu' ) ) {
6
- if ( !empty($menu_args) && isset($menu_args['walker']) ) {
7
- $menu_args['walker'] = new Ampforwp_Walker_Nav_Menu();
8
- }
9
- if (empty($menu_args)){
10
- $menu_args = array(
11
- 'theme_location' => 'amp-menu',
12
- 'container'=>'aside',
13
- 'menu'=>'ul',
14
- 'menu_class'=>'amp-menu',
15
- 'echo' => false,
16
- 'walker' => new Ampforwp_Walker_Nav_Menu()
17
- );
18
- }
19
- $menu_html_content = wp_nav_menu( $menu_args );
20
- $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
21
- $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
22
- $sanitized_menu = $sanitizer_obj->get_amp_content();
23
- if ( 'header' == $type ) {
24
- set_transient('ampforwp_header_menu', $sanitized_menu, 24*HOUR_IN_SECONDS );
25
- }
26
- elseif ('footer' == $type) {
27
- set_transient('ampforwp_footer_menu', $sanitized_menu, 24*HOUR_IN_SECONDS );
28
- }
29
- return $sanitized_menu;
30
- }
31
- }
32
-
33
- //Load styling for Menu
34
- add_action('amp_post_template_css','amp_menu_styles',11);
35
- function amp_menu_styles(){
36
- $atf = '';
37
- $design = ampforwp_get_setting('amp-design-selector');
38
- if ( $design != 1 && $design != 2 && $design != 3 ) {
39
- $atf = true;?>
40
- .amp-menu input{display:none;}
41
-
42
- <?php
43
-
44
- if ( ! defined('AMPFORWP_LAYOUTS_URL') ) { ?>
45
- /** Dropdown CSS **/
46
- amp-sidebar{padding:15px;}
47
- .amp-sidebar-close{border-radius: 100%;cursor:pointer;}
48
- .amp-search-wrapper{margin-bottom:15px;}
49
- .amp-menu li.menu-item-has-children ul{display:none;margin:0;}
50
- .amp-menu li.menu-item-has-children ul, .amp-menu li.menu-item-has-children ul ul{font-size:14px;}
51
- .amp-menu input{display:none;}
52
- .amp-menu [id^=drop]:checked + label + ul{ display: block;}
53
- .amp-menu .toggle:after{content:'\25be';position:absolute;padding: 10px 15px 10px 30px;right:0;font-size:18px;color:#ed1c24;top:0px;z-index:10000;line-height:1;cursor:pointer;}
54
- <?php
55
- } elseif( $atf && defined('AMPFORWP_LAYOUTS_URL') ){?>
56
-
57
- /** Dropdown CSS **/
58
- amp-sidebar{padding:15px;}
59
- .amp-sidebar-close{border-radius: 100%;cursor:pointer;}
60
- .amp-search-wrapper{margin-bottom:15px;}
61
- .amp-menu li.menu-item-has-children ul{display:none;margin:0;}
62
- .amp-menu li.menu-item-has-children ul, .amp-menu li.menu-item-has-children ul ul{font-size:14px;}
63
- .amp-menu input{display:none;}
64
- .amp-menu [id^=drop]:checked + label + ul{ display: block;}
65
-
66
- <?php
67
- }?>
68
- <?php /*AMP theme framework and AMP layouts and this is required*/ ?>
69
- aside{width:150px}.amp-menu{list-style-type:none;margin:0;padding:0}.amp-menu li{position:relative;display:block}.amp-menu li.menu-item-has-children ul{display:none}.amp-menu li.menu-item-has-children:hover>ul{display:}.amp-menu li.menu-item-has-children>ul>li{padding-left:10px}.amp-menu>li a{padding:7px;display:block;margin-bottom:1px}.amp-menu>li ul{list-style-type:none;margin:0;padding:0;position:relative}.amp-menu input{display:none;}<?php
70
- }
71
  }
1
+ <?php
2
+ require_once AMPFORWP_PLUGIN_DIR .'/classes/class-ampforwp-walker-nav-menu.php';
3
+
4
+ function amp_menu_html($echo, $menu_args, $type){
5
+ if( has_nav_menu( 'amp-menu' ) || has_nav_menu( 'amp-footer-menu' ) ) {
6
+ if ( !empty($menu_args) && isset($menu_args['walker']) ) {
7
+ $menu_args['walker'] = new Ampforwp_Walker_Nav_Menu();
8
+ }
9
+ if (empty($menu_args)){
10
+ $menu_args = array(
11
+ 'theme_location' => 'amp-menu',
12
+ 'container'=>'aside',
13
+ 'menu'=>'ul',
14
+ 'menu_class'=>'amp-menu',
15
+ 'echo' => false,
16
+ 'walker' => new Ampforwp_Walker_Nav_Menu()
17
+ );
18
+ }
19
+ $menu_html_content = wp_nav_menu( $menu_args );
20
+ $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
21
+ $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
22
+ $sanitized_menu = $sanitizer_obj->get_amp_content();
23
+ if ( 'header' == $type ) {
24
+ set_transient('ampforwp_header_menu', $sanitized_menu, 24*HOUR_IN_SECONDS );
25
+ }
26
+ elseif ('footer' == $type) {
27
+ set_transient('ampforwp_footer_menu', $sanitized_menu, 24*HOUR_IN_SECONDS );
28
+ }
29
+ return $sanitized_menu;
30
+ }
31
+ }
32
+
33
+ //Load styling for Menu
34
+ add_action('amp_post_template_css','amp_menu_styles',11);
35
+ function amp_menu_styles(){
36
+ $atf = '';
37
+ $design = ampforwp_get_setting('amp-design-selector');
38
+ if ( $design != 1 && $design != 2 && $design != 3 ) {
39
+ $atf = true;?>
40
+ .amp-menu input{display:none;}
41
+
42
+ <?php
43
+
44
+ if ( ! defined('AMPFORWP_LAYOUTS_URL') ) { ?>
45
+ /** Dropdown CSS **/
46
+ amp-sidebar{padding:15px;}
47
+ .amp-sidebar-close{border-radius: 100%;cursor:pointer;}
48
+ .amp-search-wrapper{margin-bottom:15px;}
49
+ .amp-menu li.menu-item-has-children ul{display:none;margin:0;}
50
+ .amp-menu li.menu-item-has-children ul, .amp-menu li.menu-item-has-children ul ul{font-size:14px;}
51
+ .amp-menu input{display:none;}
52
+ .amp-menu [id^=drop]:checked + label + ul{ display: block;}
53
+ .amp-menu .toggle:after{content:'\25be';position:absolute;padding: 10px 15px 10px 30px;right:0;font-size:18px;color:#ed1c24;top:0px;z-index:10000;line-height:1;cursor:pointer;}
54
+ <?php
55
+ } elseif( $atf && defined('AMPFORWP_LAYOUTS_URL') ){?>
56
+
57
+ /** Dropdown CSS **/
58
+ amp-sidebar{padding:15px;}
59
+ .amp-sidebar-close{border-radius: 100%;cursor:pointer;}
60
+ .amp-search-wrapper{margin-bottom:15px;}
61
+ .amp-menu li.menu-item-has-children ul{display:none;margin:0;}
62
+ .amp-menu li.menu-item-has-children ul, .amp-menu li.menu-item-has-children ul ul{font-size:14px;}
63
+ .amp-menu input{display:none;}
64
+ .amp-menu [id^=drop]:checked + label + ul{ display: block;}
65
+
66
+ <?php
67
+ }?>
68
+ <?php /*AMP theme framework and AMP layouts and this is required*/ ?>
69
+ aside{width:150px}.amp-menu{list-style-type:none;margin:0;padding:0}.amp-menu li{position:relative;display:block}.amp-menu li.menu-item-has-children ul{display:none}.amp-menu li.menu-item-has-children:hover>ul{display:}.amp-menu li.menu-item-has-children>ul>li{padding-left:10px}.amp-menu>li a{padding:7px;display:block;margin-bottom:1px}.amp-menu>li ul{list-style-type:none;margin:0;padding:0;position:relative}.amp-menu input{display:none;}<?php
70
+ }
71
  }
components/post-navigation/post-navigation.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
- function ampforwp_framework_get_post_navigation(){
3
- global $redux_builder_amp;
4
- if($redux_builder_amp['enable-single-next-prev']) { ?>
5
- <div id="pagination">
6
- <?php $next_post = get_next_post();
7
- if (!empty( $next_post )) {
8
- $next_text = $next_post->post_title; ?>
9
- <div class="next">
10
- <a href="<?php echo ampforwp_url_controller( get_permalink( $next_post->ID ) ); ?>"> <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' )); ?></span><?php echo esc_html(apply_filters('ampforwp_next_link',$next_text )); ?> &raquo;</a>
11
- </div>
12
- <?php } ?>
13
-
14
-
15
- <?php $prev_post = get_previous_post();
16
- if (!empty( $prev_post )) {
17
- $prev_text = $prev_post->post_title; ?>
18
- <div class="prev">
19
- <a href="<?php echo ampforwp_url_controller( get_permalink( $prev_post->ID ) ); ?>"> <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' )); ?></span> &laquo; <?php echo esc_html(apply_filters('ampforwp_prev_link',$prev_text )); ?></a>
20
- </div>
21
- <?php } ?>
22
- <div class="clearfix"></div>
23
- </div>
24
- <?php }
25
  }
1
+ <?php
2
+ function ampforwp_framework_get_post_navigation(){
3
+ global $redux_builder_amp;
4
+ if($redux_builder_amp['enable-single-next-prev']) { ?>
5
+ <div id="pagination">
6
+ <?php $next_post = get_next_post();
7
+ if (!empty( $next_post )) {
8
+ $next_text = $next_post->post_title; ?>
9
+ <div class="next">
10
+ <a href="<?php echo ampforwp_url_controller( get_permalink( $next_post->ID ) ); ?>"> <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' )); ?></span><?php echo esc_html(apply_filters('ampforwp_next_link',$next_text )); ?> &raquo;</a>
11
+ </div>
12
+ <?php } ?>
13
+
14
+
15
+ <?php $prev_post = get_previous_post();
16
+ if (!empty( $prev_post )) {
17
+ $prev_text = $prev_post->post_title; ?>
18
+ <div class="prev">
19
+ <a href="<?php echo ampforwp_url_controller( get_permalink( $prev_post->ID ) ); ?>"> <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' )); ?></span> &laquo; <?php echo esc_html(apply_filters('ampforwp_prev_link',$prev_text )); ?></a>
20
+ </div>
21
+ <?php } ?>
22
+ <div class="clearfix"></div>
23
+ </div>
24
+ <?php }
25
  }
components/post-pagination/post-pagination.php CHANGED
@@ -1,159 +1,159 @@
1
- <?php
2
- function ampforwp_framework_get_post_pagination( $args = '' ) {
3
-
4
- wp_reset_postdata();
5
- global $page, $numpages, $multipage, $more, $redux_builder_amp;
6
- $next_class = $previous_class = '';
7
- $defaults = array(
8
- 'before' => '<p>' . ( '<span>'. ampforwp_translation($redux_builder_amp['amp-translator-page-text'], 'Page') .':</span>' ),
9
- 'after' => '</p>',
10
- 'link_before' => '',
11
- 'link_after' => '',
12
- 'next_or_number' => 'number',
13
- 'separator' => ' ',
14
- 'nextpagelink' => ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next page'),
15
- 'previouspagelink' => ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous page'),
16
- 'pagelink' => '%',
17
- 'echo' => 1
18
- );
19
-
20
- $params = wp_parse_args( $args, $defaults );
21
-
22
- /**
23
- * Filters the arguments used in retrieving page links for paginated posts.
24
- * @param array $params An array of arguments for page links for paginated posts.
25
- */
26
- $r = apply_filters( 'ampforwp_framework_get_post_pagination_args', $params );
27
- if ( isset($params['next_class']) ) {
28
- $next_class = $params['next_class'];
29
- }
30
- if ( isset($params['previous_class']) ) {
31
- $previous_class = $params['previous_class'];
32
- }
33
- $output = '';
34
- if ( $multipage ) {
35
- if ( 'number' == $r['next_or_number'] ) {
36
- $output .= $r['before'];
37
- for ( $i = 1; $i <= $numpages; $i++ ) {
38
- $link = $r['link_before'] . str_replace( '%', '<span>'.$i.'</span>', $r['pagelink'] ) . $r['link_after'];
39
- if ( $i != $page || ! $more && 1 == $page ) {
40
- $link = ampforwp_framework_get_post_paginated_link( $i ) . $link . '</a>';
41
- }
42
- /**
43
- * Filters the HTML output of individual page number links.
44
- * @param string $link The page number HTML output.
45
- * @param int $i Page number for paginated posts' page links.
46
- */
47
- $link = apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $i );
48
-
49
- // Use the custom links separator beginning with the second link.
50
- $output .= ( 1 === $i ) ? ' ' : $r['separator'];
51
- $output .= $link;
52
- }
53
- $output .= $r['after'];
54
- } elseif ( $more ) {
55
- $output .= $r['before'];
56
- $prev = $page - 1;
57
- if ( $prev > 0 ) {
58
- $link = ampforwp_framework_get_post_paginated_link( $prev, $previous_class ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>';
59
- $output .= apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $prev );
60
- }
61
- $next = $page + 1;
62
- if ( $next <= $numpages ) {
63
- if ( $prev ) {
64
- $output .= $r['separator'];
65
- }
66
- $link = ampforwp_framework_get_post_paginated_link( $next, $next_class ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>';
67
- $output .= apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $next );
68
- }
69
- $output .= $r['after'];
70
- }
71
- }
72
-
73
- /**
74
- * Filters the HTML output of page links for paginated posts.
75
- * @param string $output HTML output of paginated posts' page links.
76
- * @param array $args An array of arguments.
77
- */
78
- $html = apply_filters( 'ampforwp_framework_get_post_pagination', $output, $args );
79
- if ( $r['echo'] ) {
80
- echo ($html);
81
- }
82
- return $html;
83
- }
84
-
85
- /**
86
- * Helper function for ampforwp_framework_get_post_pagination().
87
- * @access private
88
- *
89
- * @global WP_Rewrite $wp_rewrite
90
- *
91
- * @param int $i Page number.
92
- * @return string Link.
93
- */
94
- function ampforwp_framework_get_post_paginated_link( $i, $args = '' ) {
95
- global $wp_rewrite;
96
- $post = get_post();
97
- $query_args = array();
98
- if ( isset($args) ) {
99
- $class = "class='".esc_attr($args)."'";
100
- }
101
- if ( 1 == $i ) {
102
- $url = get_permalink();
103
- } else {
104
- if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
105
- $url = add_query_arg( 'page', $i, get_permalink() );
106
- elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') == $post->ID )
107
- $url = trailingslashit(get_permalink()) . user_trailingslashit("$wp_rewrite->pagination_base/" . $i, 'single_paged');
108
- else
109
- $url = trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged');
110
- }
111
-
112
- if ( is_preview() ) {
113
-
114
- if ( ( 'draft' !== $post->post_status ) && isset( $_GET['preview_id'], $_GET['preview_nonce'] ) ) {
115
- $query_args['preview_id'] = wp_unslash( $_GET['preview_id'] );
116
- $query_args['preview_nonce'] = wp_unslash( $_GET['preview_nonce'] );
117
- }
118
-
119
- $url = get_preview_post_link( $post, $query_args, $url );
120
- }
121
- return '<a href="' . esc_url(trailingslashit( $url) ) . '?amp" ' . $class . '>';
122
- }
123
-
124
- add_filter('ampforwp_modify_rel_canonical','amp_paginated_post_modify_amphtml');
125
- function amp_paginated_post_modify_amphtml($url) {
126
- if( is_single() && false == ampforwp_get_setting('ampforwp-amp-takeover') ){
127
- $post_paginated_page='';
128
- $post_paginated_page = get_query_var('page');
129
- if($post_paginated_page){
130
- $url = get_permalink();
131
- $new_url = $url."$post_paginated_page/?amp";
132
- return esc_url($new_url);
133
- }
134
- }
135
- return $url;
136
- }
137
-
138
- //add_action('amp_post_template_head','amp_paginated_post_modify_canonical',9);
139
- function amp_paginated_post_modify_canonical(){
140
- if(is_single()){
141
- $post_paginated_page='';
142
- $post_paginated_page = get_query_var('page');
143
- if($post_paginated_page){
144
- remove_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
145
- add_action('amp_post_template_head','amp_paginated_post_rel_canonical');
146
- }
147
- }
148
- }
149
- function amp_paginated_post_rel_canonical(){
150
- $post_paginated_page='';
151
- $new_canonical_url = '';
152
- global $post;
153
- $current_post_id = $post->ID;
154
- $new_canonical_url = get_permalink($current_post_id);
155
- $new_canonical_url = trailingslashit($new_canonical_url);
156
- $post_paginated_page = get_query_var('page');
157
- if($post_paginated_page){?>
158
- <link rel="canonical" href="<?php echo esc_url($new_canonical_url.$post_paginated_page) ?>/" /><?php }
159
- }
1
+ <?php
2
+ function ampforwp_framework_get_post_pagination( $args = '' ) {
3
+
4
+ wp_reset_postdata();
5
+ global $page, $numpages, $multipage, $more, $redux_builder_amp;
6
+ $next_class = $previous_class = '';
7
+ $defaults = array(
8
+ 'before' => '<p>' . ( '<span>'. ampforwp_translation($redux_builder_amp['amp-translator-page-text'], 'Page') .':</span>' ),
9
+ 'after' => '</p>',
10
+ 'link_before' => '',
11
+ 'link_after' => '',
12
+ 'next_or_number' => 'number',
13
+ 'separator' => ' ',
14
+ 'nextpagelink' => ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next page'),
15
+ 'previouspagelink' => ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous page'),
16
+ 'pagelink' => '%',
17
+ 'echo' => 1
18
+ );
19
+
20
+ $params = wp_parse_args( $args, $defaults );
21
+
22
+ /**
23
+ * Filters the arguments used in retrieving page links for paginated posts.
24
+ * @param array $params An array of arguments for page links for paginated posts.
25
+ */
26
+ $r = apply_filters( 'ampforwp_framework_get_post_pagination_args', $params );
27
+ if ( isset($params['next_class']) ) {
28
+ $next_class = $params['next_class'];
29
+ }
30
+ if ( isset($params['previous_class']) ) {
31
+ $previous_class = $params['previous_class'];
32
+ }
33
+ $output = '';
34
+ if ( $multipage ) {
35
+ if ( 'number' == $r['next_or_number'] ) {
36
+ $output .= $r['before'];
37
+ for ( $i = 1; $i <= $numpages; $i++ ) {
38
+ $link = $r['link_before'] . str_replace( '%', '<span>'.$i.'</span>', $r['pagelink'] ) . $r['link_after'];
39
+ if ( $i != $page || ! $more && 1 == $page ) {
40
+ $link = ampforwp_framework_get_post_paginated_link( $i ) . $link . '</a>';
41
+ }
42
+ /**
43
+ * Filters the HTML output of individual page number links.
44
+ * @param string $link The page number HTML output.
45
+ * @param int $i Page number for paginated posts' page links.
46
+ */
47
+ $link = apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $i );
48
+
49
+ // Use the custom links separator beginning with the second link.
50
+ $output .= ( 1 === $i ) ? ' ' : $r['separator'];
51
+ $output .= $link;
52
+ }
53
+ $output .= $r['after'];
54
+ } elseif ( $more ) {
55
+ $output .= $r['before'];
56
+ $prev = $page - 1;
57
+ if ( $prev > 0 ) {
58
+ $link = ampforwp_framework_get_post_paginated_link( $prev, $previous_class ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>';
59
+ $output .= apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $prev );
60
+ }
61
+ $next = $page + 1;
62
+ if ( $next <= $numpages ) {
63
+ if ( $prev ) {
64
+ $output .= $r['separator'];
65
+ }
66
+ $link = ampforwp_framework_get_post_paginated_link( $next, $next_class ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>';
67
+ $output .= apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $next );
68
+ }
69
+ $output .= $r['after'];
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Filters the HTML output of page links for paginated posts.
75
+ * @param string $output HTML output of paginated posts' page links.
76
+ * @param array $args An array of arguments.
77
+ */
78
+ $html = apply_filters( 'ampforwp_framework_get_post_pagination', $output, $args );
79
+ if ( $r['echo'] ) {
80
+ echo ($html);
81
+ }
82
+ return $html;
83
+ }
84
+
85
+ /**
86
+ * Helper function for ampforwp_framework_get_post_pagination().
87
+ * @access private
88
+ *
89
+ * @global WP_Rewrite $wp_rewrite
90
+ *
91
+ * @param int $i Page number.
92
+ * @return string Link.
93
+ */
94
+ function ampforwp_framework_get_post_paginated_link( $i, $args = '' ) {
95
+ global $wp_rewrite;
96
+ $post = get_post();
97
+ $query_args = array();
98
+ if ( isset($args) ) {
99
+ $class = "class='".esc_attr($args)."'";
100
+ }
101
+ if ( 1 == $i ) {
102
+ $url = get_permalink();
103
+ } else {
104
+ if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
105
+ $url = add_query_arg( 'page', $i, get_permalink() );
106
+ elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') == $post->ID )
107
+ $url = trailingslashit(get_permalink()) . user_trailingslashit("$wp_rewrite->pagination_base/" . $i, 'single_paged');
108
+ else
109
+ $url = trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged');
110
+ }
111
+
112
+ if ( is_preview() ) {
113
+
114
+ if ( ( 'draft' !== $post->post_status ) && isset( $_GET['preview_id'], $_GET['preview_nonce'] ) ) {
115
+ $query_args['preview_id'] = wp_unslash( $_GET['preview_id'] );
116
+ $query_args['preview_nonce'] = wp_unslash( $_GET['preview_nonce'] );
117
+ }
118
+
119
+ $url = get_preview_post_link( $post, $query_args, $url );
120
+ }
121
+ return '<a href="' . esc_url(trailingslashit( $url) ) . '?amp" ' . $class . '>';
122
+ }
123
+
124
+ add_filter('ampforwp_modify_rel_canonical','amp_paginated_post_modify_amphtml');
125
+ function amp_paginated_post_modify_amphtml($url) {
126
+ if( is_single() && false == ampforwp_get_setting('ampforwp-amp-takeover') ){
127
+ $post_paginated_page='';
128
+ $post_paginated_page = get_query_var('page');
129
+ if($post_paginated_page){
130
+ $url = get_permalink();
131
+ $new_url = $url."$post_paginated_page/?amp";
132
+ return esc_url($new_url);
133
+ }
134
+ }
135
+ return $url;
136
+ }
137
+
138
+ //add_action('amp_post_template_head','amp_paginated_post_modify_canonical',9);
139
+ function amp_paginated_post_modify_canonical(){
140
+ if(is_single()){
141
+ $post_paginated_page='';
142
+ $post_paginated_page = get_query_var('page');
143
+ if($post_paginated_page){
144
+ remove_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
145
+ add_action('amp_post_template_head','amp_paginated_post_rel_canonical');
146
+ }
147
+ }
148
+ }
149
+ function amp_paginated_post_rel_canonical(){
150
+ $post_paginated_page='';
151
+ $new_canonical_url = '';
152
+ global $post;
153
+ $current_post_id = $post->ID;
154
+ $new_canonical_url = get_permalink($current_post_id);
155
+ $new_canonical_url = trailingslashit($new_canonical_url);
156
+ $post_paginated_page = get_query_var('page');
157
+ if($post_paginated_page){?>
158
+ <link rel="canonical" href="<?php echo esc_url($new_canonical_url.$post_paginated_page) ?>/" /><?php }
159
+ }
components/related-posts/related-posts.php CHANGED
@@ -1,192 +1,185 @@
1
- <?php
2
- /*
3
- @data parameter have options for
4
- show_excerpt
5
- */
6
- function ampforwp_framework_get_related_posts($argsdata=array()){
7
- global $post, $redux_builder_amp;
8
- $show_image = (isset($argsdata['show_image']) ? $argsdata['show_image'] : true);
9
- $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
10
- $int_number_of_related_posts = (int)$string_number_of_related_posts;
11
- $my_query = ampforwp_related_post_loop_query();
12
- if ( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] ) {
13
- if( $my_query->have_posts() ) { ?>
14
- <div class="amp-related-posts">
15
- <ul class="clearfix">
16
- <?php ampforwp_related_post(); ?>
17
- <?php
18
- while( $my_query->have_posts() ) {
19
- $my_query->the_post();
20
-
21
- ?>
22
- <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
23
- <?php
24
- $related_post_permalink = ampforwp_url_controller( get_permalink() );
25
- if ( $show_image ) {
26
- if ( isset($argsdata['image_size']) && '' != $argsdata['image_size'] ) {
27
- ampforwp_get_relatedpost_image($argsdata['image_size']);
28
- }
29
- else {
30
- ampforwp_get_relatedpost_image('thumbnail');
31
- }
32
- }
33
- ampforwp_get_relatedpost_content($argsdata);
34
- ?>
35
- </li><?php
36
- }
37
-
38
- } ?>
39
- </ul>
40
- </div>
41
- <?php wp_reset_postdata(); ?>
42
- <?php do_action('ampforwp_below_related_post_hook');
43
- }
44
- }
45
-
46
- function ampforwp_related_post_loop_query(){
47
- global $post, $redux_builder_amp;
48
- $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
49
- $int_number_of_related_posts = (int)$string_number_of_related_posts;
50
- $args = null;
51
- $orderby = 'ID';
52
- if( true == ampforwp_get_setting('ampforwp-single-order-of-related-posts')){
53
- $orderby = 'rand';
54
- }
55
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
56
- $categories = get_the_category($post->ID);
57
- if ($categories) {
58
- $category_ids = array();
59
- foreach($categories as $individual_category){ $category_ids[] = $individual_category->term_id;
60
- }
61
- $args=array(
62
- 'category__in' => $category_ids,
63
- 'post__not_in' => array($post->ID),
64
- 'posts_per_page'=> $int_number_of_related_posts,
65
- 'orderby' => $orderby,
66
- 'ignore_sticky_posts'=>1,
67
- 'has_password' => false ,
68
- 'post_status'=> 'publish'
69
- );
70
- }
71
- }
72
- // tags
73
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
74
- $ampforwp_tags = get_the_tags($post->ID);
75
- if ($ampforwp_tags) {
76
- $tag_ids = array();
77
- foreach($ampforwp_tags as $individual_tag) {
78
- $tag_ids[] = $individual_tag->term_id;
79
- }
80
- $args=array(
81
- 'tag__in' => $tag_ids,
82
- 'post__not_in' => array($post->ID),
83
- 'posts_per_page'=> $int_number_of_related_posts,
84
- 'orderby' => $orderby,
85
- 'ignore_sticky_posts'=>1,
86
- 'has_password' => false ,
87
- 'post_status'=> 'publish'
88
- );
89
-
90
- }
91
- }
92
- // Related Posts Based on Past few Days #2132
93
- if ( isset($redux_builder_amp['ampforwp-related-posts-days-switch']) && true == $redux_builder_amp['ampforwp-related-posts-days-switch'] ) {
94
- $date_range = strtotime ( '-' . $redux_builder_amp['ampforwp-related-posts-days-text'] .' day' );
95
- $args['date_query'] = array(
96
- array(
97
- 'after' => array(
98
- 'year' => date('Y', $date_range ),
99
- 'month' => date('m', $date_range ),
100
- 'day' => date('d', $date_range ),
101
- ),
102
- )
103
- );
104
- }
105
- $my_query = new wp_query( $args );
106
-
107
- return $my_query;
108
- }
109
-
110
- function ampforwp_related_post(){
111
- global $redux_builder_amp;
112
- do_action('ampforwp_above_related_post'); //Above Related Posts
113
- ?>
114
- <h3 class="amp-related-posts-title"><?php echo esc_html(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )); ?></h3>
115
- <?php }
116
-
117
- function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
118
- global $redux_builder_amp;
119
- $related_post_permalink = ampforwp_url_controller( get_permalink() );
120
- if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
121
- $related_post_permalink = get_permalink();
122
- }
123
- $show_image = (isset($data['show_image']) ? $data['show_image'] : true);
124
- ?>
125
- <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
126
- <?php
127
- if (ampforwp_has_post_thumbnail() ) {
128
- $thumb_url = ampforwp_get_post_thumbnail('url', $imagetype);
129
- $thumb_width = ampforwp_get_post_thumbnail('width', $imagetype);
130
- $thumb_height = ampforwp_get_post_thumbnail('height', $imagetype);
131
- if(isset($data['image_crop']) && $data['image_crop'] != ""){
132
- $width = $data['image_crop_width'];
133
- if(empty($width)){
134
- $width = $thumb_url_array_2[1];
135
- }
136
- $height = $data['image_crop_height'];
137
- if(empty($height)){
138
- $height = $thumb_url_array_2[2];
139
- }
140
- if ( isset($redux_builder_amp['ampforwp-retina-images']) && true == $redux_builder_amp['ampforwp-retina-images'] ) {
141
- $resolution = 2;
142
- if ( isset($redux_builder_amp['ampforwp-retina-images-res']) && $redux_builder_amp['ampforwp-retina-images-res'] ) {
143
- $resolution = $redux_builder_amp['ampforwp-retina-images-res'];
144
- }
145
- $width = $width * $resolution;
146
- $height = $height * $resolution;
147
- }
148
- $thumb_url_array = ampforwp_aq_resize( $thumb_url, $width, $height, true, false, true ); //resize & crop the image
149
- $thumb_url = $thumb_url_array[0];
150
- $thumb_width = $thumb_url_array[1];
151
- $thumb_height = $thumb_url_array[2];
152
- }
153
-
154
- if ( $thumb_url && $show_image ) { ?>
155
- <amp-img src="<?php echo esc_url( $thumb_url ); ?>" width="<?php echo esc_attr($thumb_width); ?>" height="<?php echo esc_attr($thumb_height); ?>" layout="responsive"></amp-img>
156
- <?php }
157
- } ?>
158
- </a>
159
- <?php
160
- }
161
-
162
- function ampforwp_get_relatedpost_content($argsdata=array()){
163
- global $redux_builder_amp;
164
- $related_post_permalink = ampforwp_url_controller( get_permalink() );
165
- if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
166
- $related_post_permalink = get_permalink();
167
- if ( ampforwp_get_setting('amp-mobile-redirection') ) {
168
- $related_post_permalink = add_query_arg('nonamp','1',$related_post_permalink);
169
- }
170
- }
171
- ?>
172
- <div class="related_link">
173
- <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
174
- <?php
175
- $show_excerpt = (isset($argsdata['show_excerpt'])? $argsdata['show_excerpt'] : true);
176
- if($show_excerpt){
177
- if(has_excerpt()){
178
- $content = get_the_excerpt();
179
- }else{
180
- $content = get_the_content();
181
- }
182
- ?><p><?php
183
- echo (wp_trim_words( strip_shortcodes( $content ) , 15 ));
184
- ?></p><?php
185
- }
186
- $show_author = (isset($argsdata['show_author'])? $argsdata['show_author'] : true);
187
- if($show_author){
188
- $author_args = isset($argsdata['author_args'])? $argsdata['author_args'] : array();
189
- ampforwp_framework_get_author_box($author_args);
190
- } ?>
191
- </div>
1
+ <?php
2
+ /*
3
+ @data parameter have options for
4
+ show_excerpt
5
+ */
6
+ function ampforwp_framework_get_related_posts($argsdata=array()){
7
+ global $post, $redux_builder_amp;
8
+ $show_image = (isset($argsdata['show_image']) ? $argsdata['show_image'] : true);
9
+ $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
10
+ $int_number_of_related_posts = (int)$string_number_of_related_posts;
11
+ $my_query = ampforwp_related_post_loop_query();
12
+ if ( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] ) {
13
+ if( $my_query->have_posts() ) { ?>
14
+ <div class="amp-related-posts">
15
+ <ul class="clearfix">
16
+ <?php ampforwp_related_post(); ?>
17
+ <?php
18
+ while( $my_query->have_posts() ) {
19
+ $my_query->the_post();
20
+
21
+ ?>
22
+ <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
23
+ <?php
24
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
25
+ if ( $show_image ) {
26
+ if ( isset($argsdata['image_size']) && '' != $argsdata['image_size'] ) {
27
+ ampforwp_get_relatedpost_image($argsdata['image_size']);
28
+ }
29
+ else {
30
+ ampforwp_get_relatedpost_image('thumbnail');
31
+ }
32
+ }
33
+ ampforwp_get_relatedpost_content($argsdata);
34
+ ?>
35
+ </li><?php
36
+ }
37
+
38
+ } ?>
39
+ </ul>
40
+ </div>
41
+ <?php wp_reset_postdata(); ?>
42
+ <?php do_action('ampforwp_below_related_post_hook');
43
+ }
44
+ }
45
+
46
+ function ampforwp_related_post_loop_query(){
47
+ global $post, $redux_builder_amp;
48
+ $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
49
+ $int_number_of_related_posts = (int)$string_number_of_related_posts;
50
+ $args = null;
51
+ $orderby = 'ID';
52
+ if( true == ampforwp_get_setting('ampforwp-single-order-of-related-posts')){
53
+ $orderby = 'rand';
54
+ }
55
+ $args=array(
56
+ 'post_type' => get_post_type($post),
57
+ 'post__not_in' => array($post->ID),
58
+ 'posts_per_page'=> $int_number_of_related_posts,
59
+ 'orderby' => $orderby,
60
+ 'ignore_sticky_posts'=>1,
61
+ 'has_password' => false ,
62
+ 'post_status'=> 'publish'
63
+ );
64
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2 && 'post' == $post->post_type ){
65
+ $categories = get_the_category($post->ID);
66
+ if ($categories) {
67
+ $category_ids = array();
68
+ foreach($categories as $individual_category){ $category_ids[] = $individual_category->term_id;
69
+ }
70
+ $args['category__in'] = $category_ids;
71
+ }
72
+ }
73
+ // tags
74
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1 && 'post' == $post->post_type ) {
75
+ $ampforwp_tags = get_the_tags($post->ID);
76
+ if ($ampforwp_tags) {
77
+ $tag_ids = array();
78
+ foreach($ampforwp_tags as $individual_tag) {
79
+ $tag_ids[] = $individual_tag->term_id;
80
+ }
81
+ $args['tag__in'] = $tag_ids;
82
+
83
+ }
84
+ }
85
+ // Related Posts Based on Past few Days #2132
86
+ if ( isset($redux_builder_amp['ampforwp-related-posts-days-switch']) && true == $redux_builder_amp['ampforwp-related-posts-days-switch'] ) {
87
+ $date_range = strtotime ( '-' . $redux_builder_amp['ampforwp-related-posts-days-text'] .' day' );
88
+ $args['date_query'] = array(
89
+ array(
90
+ 'after' => array(
91
+ 'year' => date('Y', $date_range ),
92
+ 'month' => date('m', $date_range ),
93
+ 'day' => date('d', $date_range ),
94
+ ),
95
+ )
96
+ );
97
+ }
98
+ $my_query = new wp_query( $args );
99
+
100
+ return $my_query;
101
+ }
102
+
103
+ function ampforwp_related_post(){
104
+ global $redux_builder_amp;
105
+ do_action('ampforwp_above_related_post'); //Above Related Posts
106
+ ?>
107
+ <h3 class="amp-related-posts-title"><?php echo esc_html(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )); ?></h3>
108
+ <?php }
109
+
110
+ function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
111
+ global $redux_builder_amp;
112
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
113
+ if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
114
+ $related_post_permalink = get_permalink();
115
+ }
116
+ $show_image = (isset($data['show_image']) ? $data['show_image'] : true);
117
+ ?>
118
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
119
+ <?php
120
+ if (ampforwp_has_post_thumbnail() ) {
121
+ $thumb_url = ampforwp_get_post_thumbnail('url', $imagetype);
122
+ $thumb_width = ampforwp_get_post_thumbnail('width', $imagetype);
123
+ $thumb_height = ampforwp_get_post_thumbnail('height', $imagetype);
124
+ if(isset($data['image_crop']) && $data['image_crop'] != ""){
125
+ $width = $data['image_crop_width'];
126
+ if(empty($width)){
127
+ $width = $thumb_url_array_2[1];
128
+ }
129
+ $height = $data['image_crop_height'];
130
+ if(empty($height)){
131
+ $height = $thumb_url_array_2[2];
132
+ }
133
+ if ( isset($redux_builder_amp['ampforwp-retina-images']) && true == $redux_builder_amp['ampforwp-retina-images'] ) {
134
+ $resolution = 2;
135
+ if ( isset($redux_builder_amp['ampforwp-retina-images-res']) && $redux_builder_amp['ampforwp-retina-images-res'] ) {
136
+ $resolution = $redux_builder_amp['ampforwp-retina-images-res'];
137
+ }
138
+ $width = $width * $resolution;
139
+ $height = $height * $resolution;
140
+ }
141
+ $thumb_url_array = ampforwp_aq_resize( $thumb_url, $width, $height, true, false, true ); //resize & crop the image
142
+ $thumb_url = $thumb_url_array[0];
143
+ $thumb_width = $thumb_url_array[1];
144
+ $thumb_height = $thumb_url_array[2];
145
+ }
146
+
147
+ if ( $thumb_url && $show_image ) { ?>
148
+ <amp-img src="<?php echo esc_url( $thumb_url ); ?>" width="<?php echo esc_attr($thumb_width); ?>" height="<?php echo esc_attr($thumb_height); ?>" layout="responsive"></amp-img>
149
+ <?php }
150
+ } ?>
151
+ </a>
152
+ <?php
153
+ }
154
+
155
+ function ampforwp_get_relatedpost_content($argsdata=array()){
156
+ global $redux_builder_amp;
157
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
158
+ if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
159
+ $related_post_permalink = get_permalink();
160
+ if ( ampforwp_get_setting('amp-mobile-redirection') ) {
161
+ $related_post_permalink = add_query_arg('nonamp','1',$related_post_permalink);
162
+ }
163
+ }
164
+ ?>
165
+ <div class="related_link">
166
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
167
+ <?php
168
+ $show_excerpt = (isset($argsdata['show_excerpt'])? $argsdata['show_excerpt'] : true);
169
+ if($show_excerpt){
170
+ if(has_excerpt()){
171
+ $content = get_the_excerpt();
172
+ }else{
173
+ $content = get_the_content();
174
+ }
175
+ ?><p><?php
176
+ echo (wp_trim_words( strip_shortcodes( $content ) , 15 ));