AMP for WP – Accelerated Mobile Pages - Version 0.9.83

Version Description

(03rd March 2018) = * Added: Ability to add amp-carousel and amp-selector directly into WYSIWYG Editor #1588 * Fixed: Debug error caused by Playbuzz Sanitizer #1674 * Added: Show default gravatar for comments #1758 * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709 * Fixed: To avoid debug error in swift * Fixed: Translation improved for some strings #1678 * Fixed: Stop AMP takeover for Feed pages #1767 * Fixed: Menu issues In Design 1 & Design 2 after changing from AMP-Sidebar #1565 * Fixed: AMP Options panel Not Working After Update (0.9.82.1) version #1761 * Fixed: Move the label to the top [UX improvement] #1746 * Fixed: Error with Vue #1745 * Added: Video Module added in AMP Page Builder #1750 * Fixed: Sidebar menu is not scrollable swift theme #1769 * Fixed: View Non-AMP should be usertrailingslashit #1772 * Fixed: Proper structured data for Blogpage #1660 * Fixed: Legacy Page Builder not working after the update #1773 * Fixed: Content blank when only image in content #1778 * Fixed: Comment ID display issue fixed #1758 * Fixed: PHP Warning: A non-numeric value encountered in components/logo/logo.php on line 52 #1764 * Fixed: Yummly support added in Swift #1708 * Fixed: Demo Link updated #1781 * Fixed: CSS is not loading in Swift Theme #1780 * Added: Ability to add Advertisement or Sponsored label under ads #1710 * Fixed: Featured images distortion in related posts #1684 * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709 * Fixed: noarchive instead of nofollow in Archive pages #1693 * Fixed: Internal links of tags are showing /amp after changing the end point to ?amp in design 2 #1752 * Fixed: line height is added for the logo in Swift design * Added: Class for Custom Frontpage #1787 * Fixed: Recent post enable disable for Swift theme #1784 * Fixed: Connect Show/Hide AMP option with AMP takeover#1786 * Fixed: Added sanitizer to footer Widget #1756

Download this release

Release Info

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

Code changes from version 0.9.82.1 to 0.9.83

Files changed (41) hide show
  1. LICENSE +357 -357
  2. README.md +1474 -1386
  3. accelerated-moblie-pages.php +527 -527
  4. base_remover/base_remover.php +126 -126
  5. base_remover/dependencyScript.js +20 -20
  6. classes/class-ampforwp-instagram-sanitizer.php +47 -47
  7. classes/class-ampforwp-youtube-embed.php +132 -132
  8. classes/class-init.php +10 -10
  9. components/author-box/author-box.php +85 -85
  10. components/breadcrumb/breadcrumb.php +218 -218
  11. components/call-now/call-now.php +15 -15
  12. components/categories-tags/categories-tags.php +44 -44
  13. components/comments/comments.php +171 -171
  14. components/components-core.php +483 -485
  15. components/featured-image/featured-image.php +51 -51
  16. components/logo/logo.php +58 -58
  17. components/loop/loop.php +347 -345
  18. components/menu/menu.php +21 -21
  19. components/post-navigation/post-navigation.php +25 -25
  20. components/post-pagination/post-pagination.php +180 -180
  21. components/related-posts/related-posts.php +149 -149
  22. components/search/search.php +28 -28
  23. components/sidebar/sidebar.php +79 -79
  24. components/social-icons/fonts/icomoon.svg +21 -21
  25. components/social-icons/social-icons.php +230 -230
  26. components/theme-loader.php +217 -217
  27. feeds/instant-article-feed.php +55 -55
  28. images/menu-2.png +0 -0
  29. images/single-1.png +0 -0
  30. includes/admin-script.js +387 -361
  31. includes/admin-style.css +333 -333
  32. includes/disqus.php +91 -91
  33. includes/icons/amp-icons.php +778 -778
  34. includes/includes.php +52 -52
  35. includes/modules/ampforwp-blurb.php +195 -195
  36. includes/modules/ampforwp-button.php +251 -251
  37. includes/modules/js/amp.js +158 -158
  38. includes/newsletter.php +131 -131
  39. includes/onesignal-integration/amp-helper-frame.html +6 -6
  40. includes/onesignal-integration/amp-permission-dialog.html +6 -6
  41. includes/options/admin-config.php +307 -4557
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,1386 +1,1474 @@
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: 4.9.1
7
- Stable tag: 0.9.74.1
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?](http://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://demo.ampforwp.com/amp/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
17
-
18
- [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
19
-
20
- [youtube https://www.youtube.com/watch?v=vAGPFKKm5G4]
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>Premium Support</strong><br>
26
- We try our best to provide support on WordPress.org forums. However, One-on-one email support is available to people who bought the [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) only.
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
-
32
- = Features: =
33
-
34
- * NEW - Alexa Metrics Compatibility added
35
- * NEW - OneSignal Push Notifications integration
36
- * NEW - Structured Data Options
37
- * NEW - Page Builder 2.0 for AMP! [Learn More & Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
38
- * NEW - Advanced WooCommerce Support [More Info](https://ampforwp.com/woocommerce/)
39
- * NEW - Gravity Forms Support [More Info](https://ampforwp.com/gravity-forms/)
40
- * AMP Plugins Manager - Which allows you to disable a specific plugin functionality only in the AMP version
41
- * Page Break / NextPage (Pagination) Support
42
- * Contact Form 7 Support [More Info](https://ampforwp.com/contact-form-7/)
43
- * Facebook Comments Support
44
- * Github Gist Support
45
- * Email Opt-in Subscription form support in AMP added
46
- * Call to Action boxes and notification bars
47
- * 9 Advertisement sizes - 2 More AD slots added recently
48
- * Comments Forms in AMP.
49
- * Native AMP Search functionality.
50
- * Design 3 [Watch the Video Overview](https://www.youtube.com/watch?v=ub1pwskt3Rc)
51
- * Disqus Comments Support
52
- * Google Tag Manager Support
53
- * Page, Category & Tags Support Added
54
- * 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.
55
- * 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.
56
- * Custom Post Type Support
57
- * Star Ratings
58
- * Drag & Drop Page builder Added
59
- * 2 Designs Added
60
- * Yoast SEO support on AMP pages and other SEO plugins
61
- * AMP WooCommerce Support
62
- * Switch on/off Support for Pages & Posts on AMP
63
- * Translation Panel & RTL
64
- * Internal AMP linking - You can browse AMP pages internally
65
- * Related posts below the post
66
- * Recent Comments list
67
- * Automatically integrate AMP to your website.
68
- * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
69
- * Google Analytics Support.
70
- * User Friendly Theme Options Panel.
71
- * Unlimited Color Scheme.
72
- * Image Logo Upload.
73
- * Supports Posts and Pages.
74
- * Proper rel canonical tags which means that Google know the original page.
75
- * Overlay Navigation Menu bar.
76
- * Social Sharing in the Single.
77
- * Sexy Design.
78
- * Separate WordPress Menu for AMP version.
79
- * Page builder & Shortcodes Compatibility.
80
- * Carousel support for Gallery.
81
- * Better Image stretching and resizing.
82
- * Youtube Video Embed Support.
83
- * Vine Embed Support.
84
- * Twitter oembed Support.
85
- * Instagram Embed Support.
86
- * Facebook Video Embed Support.
87
- * RTL Support
88
- * Custom AMP FrontPage
89
- * Notifications
90
- * Chartbeat, Hi-stats, Yandex Metrika, Piwik, Segment.com, StatCounter, Effective Measure and comScore Support
91
- * Incontent & DoubleClick Support
92
- * Great Support & Active Development.
93
- * Widgets & WooCommerce
94
- * Genesis SEO Support
95
- * Breadcrumb Support added
96
- * Facebook Instant Articles Support Added
97
- * NEW - AMP Installation Wizard that makes it easy to setup for new users.
98
- * NEW - Category base remover support
99
- * NEW - Tag base remover support
100
- * NEW - 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber)
101
- * NEW - 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/)**
102
-
103
- **[JOIN CHAT GROUP COMMUNITY](http://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.
104
-
105
- = Getting Started: =
106
- **[1. User Documentation:](http://ampforwp.com/help/)** The AMP for WP plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.
107
-
108
- **[2. Developer Docs:](https://ampforwp.com/help/#extend)** We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.
109
-
110
- **[3. Fixing AMP Validation Errors:](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.
111
-
112
- **[4. Community Support Forum:](https://ampforwp.com/help/#support-forum)** We have a special community support forum where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means alot to us and so we try our best to reply each and every question that gets asked.
113
-
114
- **[5. Frequently Asked Questions:](http://ampforwp.com/faq/)** Some of the Frequently Asked questions.
115
-
116
-
117
- == Installation ==
118
- **[Visit Help area for the Documentation:](http://ampforwp.com/help/)**
119
-
120
- [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
121
-
122
- **[Visit Help area for the Documentation:](http://ampforwp.com/help/)**
123
-
124
-
125
- == Frequently Asked Questions ==
126
-
127
- = Can I add analytics? =
128
-
129
- 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.
130
-
131
- = Can I add Ads in my AMP pages? =
132
-
133
- 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.
134
-
135
-
136
- = Can I extend/Change the AMP design, so it suits my needs? =
137
-
138
- 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/)
139
-
140
-
141
- = Do you have any prebuilt designs? =
142
-
143
- 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)
144
-
145
-
146
- = I'm a developer and I want to add custom functionality for a client, can I do that? =
147
-
148
- 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.
149
-
150
-
151
- = How do I report bugs and suggest new features? =
152
-
153
- You can report the bugs [here](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages/issues)
154
-
155
- = Will you Add New features to my request? =
156
-
157
- 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.
158
-
159
-
160
- = How do I get in touch? =
161
-
162
- You can contact us from [here](http://ampforwp.com/contact/)
163
-
164
-
165
- == Screenshots ==
166
- 1. AMP Homepage
167
- 2. AMP Single Post
168
- 3. Post Navigation in Single
169
- 4. Sticky Social sharing icons
170
- 5. Overlay Navigation menu sidebar.
171
- 6. Page builder of the Single article. You can drag and drop any element.
172
- 7. Single post of Design One
173
- 8. GTMetrix Performance Report
174
- 9. Google PageSpeed Insight report for AMP
175
- 10. Homepage of Design One
176
- 11. Pingdom Speed Report for AMP
177
-
178
-
179
- == Changelog ==
180
-
181
- = 0.9.74 (23rd January 2018) =
182
- * View More details on the [blog post](https://ampforwp.com/0-9-74-released-stability-update-79th-update/)
183
- * Fixed: Push Notifications button alligned in center #1500
184
- * Added: Meta robots tag support from Yoast #1563
185
- * Added: Option to Disable wptexturize/smart-quotes Support #1458
186
- * Fixed: Changed the label id to avoid conflict with Advanced AMP Ads #1591
187
- * Fixed: esc_attr causing validation issues with single and double quotes #1616
188
- * Fixed: Image stretching problem resolved when "Featured Image from the content" was set #1580 #1582
189
- * Added: Create Template by Custom taxonomy name like product-jeans.php in AMP Theme FrameWork #1594
190
- * Added: Custom Post type support added in the Core #1612
191
- * Fixed: custom-amp-content.php cleaned with PHPCS #1497
192
- * 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)
193
- * Added: Proper fallback support added if the current active AMP theme is not available #1624
194
- * Fixed: Resolved debug errors #1622
195
- * Added: All in One SEO compatibility #1557
196
- * Fixed: Load AMP Styling only on AMP pages #1441
197
- * Added: 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber) #1265
198
- * Fixed: itemprop="url" was adding in non-amp #1626
199
- * Fixed: SiteOrigin Pagebuilder compatibility with Custom Frontpage #1592 #1593
200
- * Added: MediaAce lazy load compatibility of Bibmer Theme #1472
201
- * Fixed: Content Links plugin was causing validation errors #1569
202
- * Added: Filter added called get_content_from_dom to modify the output in AMP function #1462
203
- * Added: amp_breadcrumb component added in AMP Theme Framework #1636
204
- * Fixed: Sidebar Styling and proper sanitizer updated
205
- * Added: amp_author_meta component added in AMP Theme Framework #1641
206
- * Fixed: amp_post_pagination component improvement in AMP Theme Framework
207
- * Added: Ability to add link classes in amp_post_pagination in AMP Theme Framework
208
- * Fixed: amp_author_meta image code improvement in AMP Theme Framework
209
-
210
- = 0.9.73 (15th January 2018) =
211
- * View More details on the [blog post](https://ampforwp.com/0-9-73-released-stability-update-78th-update/)
212
- * Added: Instagram Sanitizer added to process Instagram Embeds inside the BlockQuotes #1581
213
- * Added: Option Created to Enable/Disable rel="nofollow" for View Non-AMP link #1572
214
- * Fixed: Custom AMP Content was not working with Elementor Pagbuilder #1495
215
- * Fixed: ampforwp_is_front_page() is not working in the newspaper theme #1583
216
- * Added: Allow people to use multiple Analytics on AMP #1124
217
- * Fixed: 'https' error with PlayBuzz Embeds #1481
218
- * Added: Option to show last modified date instead of Published date #1496
219
- * Fixed: Add proper permission for ampforwptourinstaller page
220
- * Fixed: Debug warnings #1586 and #1459
221
- * Fixed: A lot of Security Fixes has been done #1497
222
- * Fixed: Removed lot of unused code #1497
223
- * Added: AMP skip for checkout page #1443
224
- * Added: Show the list of Child pages at the end in Parent Page with on/off #1551
225
- * Fixed: Properly strip shortcodes fom Structured data description #1512
226
-
227
- = 0.9.72 (6th January 2018, Happy New Year) =
228
- * View More details on https://ampforwp.com/0-9-72-released-stability-update-77th-update
229
- * Related Posts Image stretching in Design 3 AMP theme Framework #1482
230
- * RTL option must be integrated into AMP theme Framework #1562
231
- * `DOMDocument::loadHTML():` Attribute itemprop redefined warning fixed #1539
232
- * Created an option to add Author bio article in Facebook Instant Article #1521
233
- * Options to add push notification button above and below the content #1571
234
- * Copy the Content button for Custom Post types #1532
235
- * Alexa Metrics Compatibility added #1536
236
- * Logo styling added with amp_logo. So styling can work with AMP Theme Framework. #1520
237
- * Content parsing login improved, so it will not through any warnings if the content has only 1 paragraph. #1523
238
- * Debug Warnings removed #1564
239
- * Caption in the Gallery creating validation errors Fixed. #1549
240
- * Tables Link color should be as same as the link of the body #1559
241
- * Separate options for In-Content related posts #1546
242
- * WebPage Schema Type added in Structured Data options #1558
243
- * Fatal Error fixed with `mb_detect_encoding()` after enabling the minify option #1494
244
- * Content blank or fatal errors due to itemscope and itemtype, fixed. #1570
245
- * Performance improved. Due to `_transient__redux_activation_redirect` transient. #1526
246
-
247
- = 0.9.71 (1st December 2017) =
248
- * Design 2 Post Titles issue fixed
249
- * Instant Articles validation issue fixed.
250
-
251
- = 0.9.70 (30th November 2017) =
252
- * View More details on https://ampforwp.com/0-9-70-released-stability-update-76th-update/
253
- * Image alt tags are empty which caused issues. #1154 (thanks to @liagua)
254
- * ALT and IMG tags are in one line #1442
255
- * Updated the permalink for post view in admin area #1318
256
- * aria-current causing validation issues #1427
257
- * Aligning Captions in the Bottom in Gallery #1428
258
- * 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
259
- * After 0.9.69.1 update Call to undefined function mb_convert_encoding #1447
260
- * Featured image options now also reflect the structured data #1430
261
- * Blur & Stretching issues of Design 3 thumbnails are now fixed. They’re crisp and clear than ever! #1227
262
- * Related posts are showing on single even when turned off #1434
263
- * Show Related posts CSS only when it is selected #1356
264
- * Author image now displays on author pages #1426
265
- * Category base removal in AMP from url option is only working on the first page #1418
266
- * Bug fixed: PHP Warning DOMDocument Empty string supplied as input #1449
267
- * Video support added in Instant Articles #1300
268
- * Read more tag in Instant articles issue fixed #1415
269
- * Amp carousel issues fixed #1446 #1456
270
- * Compatibilty with Envira Gallery Lazy Loading #1432
271
- * Inline Related Posts in AMP Theme Framework #1457
272
- * Different number of in-content related post and related posts at the footer #1448
273
- * FooGallery update broke all the AMP compatibility, but we fixed it from our side so that user’s gallery work perfectly #1424
274
- * WPBakery Page Builder Conflict solved #1419
275
- * Goodlife theme Lazy Load compatibility added #1416
276
- * AMP-Facebook-Like Was found but unused Validation Error fixed. #1463
277
- * Playbuzz not displaying if added with https: #1466
278
- * Options Panel labels renamed for better understanding.
279
-
280
-
281
- = 0.9.69 (20th November 2017) =
282
- * View More details on https://ampforwp.com/0-9-69-released-stability-update-75th-update/
283
- * One Signal Push Notifications bug fixed! #1404
284
- * AMP theme framework Related posts extended so that it can be used as a loop format #1406
285
- * Facebook like Button improvements #1405
286
- * Add layout responsive tag to image module in page builder #1373
287
- * Strip the shortcodes from Structure data area #1389
288
- * Test HTTP API Call From admin panel by redux #1391
289
- * Meta description tag in normal site Unicode character is different from AMP site unicode character. #1369
290
- * Updated the check for ampforwp_is_amp_endpoint this should fix the issue #1372
291
- * Updated the URL for design 3 so it can work with plain permalink #1318
292
- * Updated the option Featured Image from The Content #1367
293
- * 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
294
- * Date Format under Homepage improvements #1408
295
- * Warnings due to inline related posts in Homepage #1413
296
- * Plain Permalinks Support improved. #1318
297
- * Allow Homepage title of Bread Crumbs feature to be changed from Translation Panel #1414
298
- * Debug Errors in AMP Theme Framework #1403
299
- * Unnecessary loading of Merriweather fixed, it will only load in the Design 1.
300
- * Enter Phone Number is not Appearing when switch to Call now button #1425
301
- * Need excerpt below the title, above the meta #1399
302
- * Remove the Separator piple symbol from the footer when “Back to Top link” is off #1417
303
- * Display Child or subcategories on Category pages. #1385
304
- * Add Caption in the Gallery Image feature conflicting with Gallery widget #1407
305
- * Youtube Shortcode embed with &rel=0 support #1378
306
- * Filter for Excerpt custom text in the AMP options #1411
307
- * WPML Multilingual CMS plugin flags compatibility #1270
308
- * Compatibility with Tasty Recipes plugin and other page builders with amp page builder #1431
309
-
310
-
311
- = 0.9.68 (12th November 2017) =
312
- * View More details on https://ampforwp.com/0-9-68-released-stability-update-74th-update/
313
- * ADs are Optimize For Viewability, meaning it will try to load faster than the original AMP AD loading strategy.
314
- * Content was disappearing issue was resolved #1392
315
- * Featured Image from The Content option is connected to related post #1339
316
- * Fix amp-web-push helper iframe configuration URL #1387
317
- * Facebook Like button added to AMP #1327
318
- * WPML support for AMP Improvement #1285
319
- * Debug Errors fixed #1366
320
- * Setting ad density for Facebook Instant Articles ads #1287
321
- * Showing the number of comments in Single #1341
322
- * Styling added to the sitewide ads and made sure that they are in the center. #1343
323
- * One Signal buttons Translation added #1383
324
- * Article type added to Structured data #1344 #1354
325
- * The issue with the amp-carousel when RTL was enabled #1358
326
- * amp-carousel with images of different sizes #1358
327
- * 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.
328
- * Instant Article should have a default value for number of posts, it was causing the memory issue with alot of posts #1390
329
- * Notice if a post has no author data #1338
330
- * Added a new redux extension select field in redux framework #1349
331
- * Issues with galleries as well as gallery captions #1363
332
- * Added a hook for adding anything in between the loops #1396
333
- * Hide meta boxes as per the user level types #1340
334
- * A Switch between the Date formats #1384
335
- * Fix: Jannah theme lazy load issue #1362
336
- * Issues with galleries as well as gallery captions #1363
337
- * Create Dynamic url of amp according to the permalink structure #1318
338
- * Minor code performance improvement.
339
- * Archive titles in Design 3 frontend issue
340
-
341
- = 0.9.67.0 (6th November 2017) =
342
- * View more details on https://ampforwp.com/one-signal-push-notifications-for-amp/
343
- * OneSignal Push Notifications integrated #807
344
- * Vimeo embed support added
345
- * SoundCloud embed support added
346
- * Pinterest embed support added
347
- * PlayBuzz embed support added
348
- * DailyMotion embed support added
349
- * Fix: Handle issues with data uri images in CSS #1033
350
- * Fix attribute when adding AMP Mustache lib #1033
351
- * Fix: Output CSS for feature image #1033
352
- * An option added for users who don't want to receive update notifications #1342
353
- * Structured data nav improvement
354
- * Sitenavigationelement has been implemented correctly for footer menu. #1345
355
- * Style sanitization for Menu Items #1359
356
- * Polylang flags support for menu  #1360
357
- * Mobile Redirection issues fixed #1173
358
- * Jetpack fatal error fixed #1355
359
- * 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.
360
- * Needs proper CTA Bar's styling. #1361
361
- * Debug errors on archive pages #1353
362
- * Preview shall only be loaded on click rather than in background #1331
363
- * ampforwp_is_home() function code improved
364
- * making sure scripts and styling is properly adding when sanitizing the sidebar #868
365
- * All the backend css and js should be versioned, so it's not cached. #1335
366
-
367
- = 0.9.66.1 (30th October 2017) =
368
- * Fatal error if has version less than WP 4.8 fixed
369
- * More Minor Validation errors fixed
370
- * Odnoklassniki sharing button is not working #1337
371
-
372
- = 0.9.66.0 (29th October 2017) =
373
- * View more details on https://ampforwp.com/0-9-66-released-bug-squashing-oct-2017-72nd-update/
374
- * Design 3 & Design 1 are optimised with 90+ Google PageSpeed Score on Mobile and 95+ in desktop performance #1273
375
- * Featured Image from the content for blog and homepage #1295
376
- * Category Module for AMP Page builder added #888
377
- * 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
378
- * Twitter Video embed code support added in AMP #1307
379
- * Video Posting Structured data #1293
380
- * Navigation menus are now Schema compatible for better Structured data integration #1229
381
- * Yoast checking conditions for Structured Data Improved #1293
382
- * Added "back to Top" in design 3 #959
383
- * 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)
384
- * AMP not working on password-protected pages #1192
385
- * Debug errors reported by the user #1284 and few more we found internally
386
- * Inline Style Sanitizer for Comments to avoid any validation issues #1193
387
- * Next/Previous links removed from pages #1268 props @Frenchomatic
388
- * WPML Multilingual CMS plugin flags compatibility added #1270
389
- * Image sanitizer added for the Sidebar #1270
390
- * Added AMP Components the correct way. Added amp-gist, amp-social-share. #336
391
- * amp-video script added - Which decreases the non-critical validation issues #991
392
- * Arrows in Design 3 pagination #1000
393
- * Author page links in Single #1282
394
- * Added previous open state of option panel and show again when search clean #1238
395
- * Odnoklassniki Social Sharing Support for AMP (with target blank for better bounce rate) #1230
396
- * GIF or animated images resize problem fixed #1281
397
- * In Design1, Header Background & Link Color have same option #1249
398
- * FB Pixel for AMP added #1231
399
- * Structured Data Type option for AMPed Custom Post types only #1259
400
- * Attribute ‘readability in the tag ‘div’ removed - this decreases the validation issues #1306
401
- * AMP Theme Framework Improvements: loop, author, related_post, Add Author support #1311
402
- * Commentator's Avatar in the comments section #1132
403
- * Remove 'Welcome to AMP' from Dashboard sub-menu and moved to the options area to decrease the annoyance and increase the user happiness #902
404
- * 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
405
- *  View AMP on Admin Bar for the respected page/post If enable. #1236
406
- * google maps iframe link to larger map #1099
407
- * Comments now jumping due to the slash at the end #1309
408
- * Page Builder causes Incompatibility with the Divi theme (We restructured the Text Module for Page builder for better compatibility and UX) #1162
409
- * Inline Style Sanitizer for Comments added. Less Critical Validation issues and Better Presentation #1193
410
- * WPML amp-html error fixed #1285
411
- * Radio button not working for Show View more Button" #1018
412
- * Added registered handle for tinymcePointer localize data #1301
413
- * Date in the Design 2 should not be hidden in mobile version #1315
414
- * Page builder not working on homepage(Selected as front page) #1316
415
- * 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)
416
- * Auto flush on save for FBIA to improve the UX.
417
- * Plain Permalinks Support improved. #1318
418
- * Tables support added to FB Instant Articles #1266
419
- * Demo link added in the Theme selector option #1248
420
- * Remove invalid attributes from multiple tags which reduces critical validation errors and validates pages.
421
- * AMP makes a problem in archive page label, when it is active in non-amp version #1304
422
- * placeholder-icon.png is 404 fixed #1310
423
- * Category & Tags switches for Single added. #1055
424
- * Copy Content (Custom AMP Editor) Option Not showing with Page Builder of SiteOrigin issue fixed #1280
425
- * Improving UX with: when AMP support is off for a specific post type then all the AMP related metaboxes should be removed #1289
426
- * Options Panel Options rearranged, labels rewritten, descriptions repositioned for better User interaction [commit]
427
-
428
- = 0.9.65.2 (25th October 2017) =
429
- * TypeWatch is not a function #1299
430
- * Error with BackupBuddy fixed #1303
431
-
432
- = 0.9.65.1 (24th October 2017) =
433
- * AMP Minifcation Issues fixed
434
-
435
- = 0.9.65 (22nd October 2017) =
436
- * View more details on https://ampforwp.com/new/
437
- * Favicon for AMP #1039
438
- * AMP Minification option added with Performance Tab in Options #1286
439
- * Post support is turned off then Meta box should also be removed #1253
440
- * Excerpt Length feature in Design two and Three #1122
441
- * Test Contact form plugins and their settings in the options panel #1121
442
- * Mobile preview in Edit Screen #1082
443
- * Search feature for Options Panel #1238
444
- * WordPress Social Share Buttons Validation Issues #1272
445
- * itemtype attribute is striping in the ul tag #1210
446
- * Debug Error in Breadcrumb 0.9.64 #1267
447
- * Disable AMP linking at Wordpress Search Page #969
448
- * Featured Image is missing #1071
449
- * Removed ampforwp_plugin_activation_notice #1034
450
- * Add VK (Vkontakte) Sharing Button #1187
451
- * Grab the first image instead of post thumbnail for featured image #1189
452
- * AMP theme framework core changes #1274
453
- * Grab the first image instead of post thumbnail for featured image #1189
454
- * Create a Switch on Top of Page Builder #1279
455
- * Inline Related Posts added that helps you with improving bounce rate #1078
456
- * Caption Support in Image Gallery Carousel #1172 #1136
457
- * Instant Articles feed shows sticky posts on top #945
458
- * Added search check, to fix debug notice
459
- * Option to hide date from Design 1 & Design 3 Homepage Loop #1264
460
- * UI labels improvements in the Options panel
461
- * Sorting out design #2 – static front page #1175
462
-
463
- = 0.9.64 (15th October 2017) =
464
- * View more details on https://ampforwp.com/new/
465
- * Structured Data Type option added. You can now change the structured data format for Posts, Pages and Custom post types #323
466
- * When comments plugin activate, Comments section should remove. #1093
467
- * Notification causes a validation error. #1147
468
- * CSS !important need sanitization #1225 - This will help us to validate tens of thousands of pages.
469
- * Strange spaces when using Sassy Social Share #1185
470
- * Remote CDN use? Let's host it? #549
471
- * Typo fix for Linkedin Profile Page URL section #905 [Thanks to Prayag @pra85]
472
- * Replace fastimage with fasterimage for PHP 5.4+ #1191
473
- * Debug Errors Post 0.9.63 #1219
474
- * Ad5 code injected twice #1116
475
- * Homepage Support must be Off when we turn Off Homepage Support. #738
476
- * Add custom class in post pagination for styling #1100
477
- * Removed the Lazy Loading issue of Schema Theme #1170
478
- * H1 tag for archive titles (Commit) #1155
479
- * Alt tag for the Logo #1155
480
- * Design 3 Menu RTL issue fixed #1106
481
- * Ability to add dynamic classes in body tag #1237
482
- * Warnings fixed on 404 page #1243
483
- * Properly structured data for Homepage, Custom Frontpage and Blog #1155 #1242
484
- * Option added to Enable/Disable categories and Tags links from Single #1155
485
- * Fatal error after 0.9.63 fixed #1220
486
- * Debug Error due to vendor AMP #1213
487
- * PHP warning on line 147 after 0.9.63 #1241
488
-
489
- = 0.9.63 (8th October 2017) =
490
- * View more details on https://ampforwp.com/new/
491
- * Category and Tag Base Remover as core features #1079
492
- * Hide AMP on Posts option added #935
493
- * Installation Setup Screen Added for new users
494
- * Validation for the session in PHP #1158. PR by Bryan Contreras @bryan3561
495
- * All the amp pages should work perfect with Plain Permalink settings #488
496
- * WYSIWYG TinyMCE editor added for the Text Module in AMP Page Builder #1205
497
- * WPML Static Front Page Support for title and description with Yoast. #1143
498
- * Row Settings area added for AMP Page Builder #1148
499
- * xlink attribute causes Validation Issues #1149
500
- * Posts with no images on Archive pages are squeezed to 65% #1058
501
- * Body Class to target specific pages #1123
502
- * Option to enable/disable Breadcrumb #1129
503
- * Debug errors due to Breadcrumbs fixed #1109 #1130 #966
504
- * Visit AMP option added below the View Site in Dashboard. #1076
505
- * Many Debug errors fixed #1109
506
- * Textarea for body tag which will help people add AMP Auto Ads #1064
507
- * Structured data improvements #1048 #1044 #1085 #1118
508
- * Twitter share URL based on users choice, you can allow people to share pretty links and short links. #1097
509
- * Author Avatar removed code fixed which has been displayed in the div "amp-wp-meta amp-wp-byline". #1087
510
- * Only one figure element is allowed in the article header FB Instant Articles #1127 & #1157
511
- * Image alt tags are empty and cause issues fixed. #1154
512
- * Button to copy the content into Custom AMP Editor #783
513
- * Rename AMP loop widget areas or add proper descriptions #1045
514
- * Trailing slash issue #1095
515
- * Related Posts by Post type featured added #1141
516
- * Ultimate Social Media Icons plugin causes validation issues fixed #1135
517
- * Adding proper path for functions.php, it was causing strange fatal errors and irregular white screen of death fixed  #1144
518
- * A smooth way to migrate from other AMP plugins to AMPforWP #1051
519
- * Alert added on AMP by Automattic installation. #1180
520
- * Insertion of strange spaces around H1 titles #1069
521
- * AMP Page Builder and HTTPS #1164
522
- * You can display comments from more than one vendor such as displaying WP & FB Comments #1150
523
- * Rename AMP loop widget areas or add proper descriptions #1045
524
- * FrontPage featured image with srcset #1063
525
- * An option for Showing featured image from custom field #1098
526
- * Added the Custom Front Page Title From Yoast SEO #1163
527
- * Commenting breaks SSI directives causes to display error #1179
528
- * rel canonical appears more than once in search pages #1195
529
- * Dev mode in AMP #1083
530
- * Social Sticky Icons Improvements #1061
531
- * Grand-Child support added in Design #1152
532
- * amp-accordion non-critical error in Design 3 & CSS improvements fixed #1152
533
- * Incorrect @id for mainentity #1080
534
- * Hide AMP by specific Categories tweaked for performance. Thanks to Joshua Eichorn @jeichorn CTO at Page.ly #1133 - Huge Thanks!
535
- * amp-auto-ads for sites with RTL support ON #1176
536
- * Redirected the Google forms to our contact page so that we can take each and every query and answer every person. #1201
537
- * ui-state-highlight class was conflicting with ACF date picker fixed #1199
538
- * Responsify WP Lazy loading causes blank image (Compatibility) #1131
539
- * amp-carousel scripts loading on the second page fixed in Design 3
540
- * Show Design screenshot while selection of design #1209
541
- * Switches Redesigned for better UX #1211
542
- * Welcome Page UX Improved #1214
543
-
544
- = 0.9.62 (25th September 2017) =
545
- * View more details on https://ampforwp.com/new/
546
- * INTRODUCING Page Builder 2.0 for AMP! [Learn More & Watch the Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
547
- * Documentation & Help links improved
548
- * Post type specific classes for targetting
549
- * Design name restored in Options panel (It was recently renamed to Appearance)
550
- * Minor Bug fixes as well
551
-
552
- = 0.9.61 (10th September 2017) =
553
- * View more details on https://ampforwp.com/options-restructured/
554
- * Options Panel Restructured Options were dividing into two parts: Settings and Appearance.
555
- * AMP Theme Framework Core Support Added. You can now create themes of your own in just minutes.
556
- * WPML Static Front Page Support #1111
557
- * Notification message disables when CF7 & gravity form is activated. #1107
558
- * Space after On in Design 3 #1114
559
-
560
- = 0.9.60 (4th September 2017) =
561
- * View more details on https://ampforwp.com/0-9-60-released-improved-redirection-66th-update/
562
- * Class added to View non-amp anchor tag
563
- * Params added properly to get rid of a warning #1077
564
- * rel=attachment noopener generating validation errors #1090
565
- * Breadcrumbs Support Added #701
566
- * Enable / Disable button added for Navigation Menu #735
567
- * Move the ad code for Instant Article down after the article #964
568
- * Add analytics code of FB instant articles properly #1096
569
- * datetime Tag not stripping properly #1043
570
- * Mobile redirection on custom post types #1028 #1052
571
- * Mobile Redirection causing extra redirect #879 #933
572
- * Proper mobile redirection on Homepage #1052
573
- * View non-amp on blog will redirect to blog
574
- * Blog will redirect to blog irrespective of AMP Homepage option #871
575
- * Dont redirect if archive support is disabled #1052
576
- * non-amp category pages should redirect to non-amp pages if turned off from Hide AMP #999
577
- * Disable amp for forum plugin (wpforo) #592
578
-
579
- = 0.9.59 (23th August 2017) =
580
- * Design 3 Images were not aligned properly. Fixed. #1040
581
- * Caption in the design 3 improved
582
- * Jetpack File not loading throwing fatal error #1038
583
- * If the mobile redirection is ON and the category is excluded to display the AMP then it should redirect properly
584
- * Custom Editor Compatibility issue with SiteOrigin PageBuilder fixed #997
585
- * Native Twitter Embed support
586
- * Added a hook after the body tag: ampforwp_body_beginning (commit)
587
- * GTM in AMP Improved #958
588
- * WP User Avatar compatibility Added #975
589
- * Alt tag on frontpage featured image added #1050
590
- * Blurred Images on the frontpage fixed #1050
591
- * Need to escape alt tag #1049
592
- * Debug errors & PHP warnings were fixed #859 #811 #830 #810
593
- * Proper rel canonicals for inner pages #1047
594
- * Added Video sanitizer for comments #1053
595
- * When activating the AMP plugin, display a notification in the popup. #1036
596
- * Video Sanitizer added for Comments
597
-
598
- = 0.9.58.1 (9th August 2017) =
599
- * Jetpack conflict issue solved #1038
600
- * Genesis SEO Support added #1013
601
- * Fixed Wrong SEO title issue #1013 and #836
602
- * Design 3 Carousel script loading method improved #990
603
-
604
- = 0.9.58 (9th August 2017) =
605
- * View more details on https://ampforwp.com/new/
606
- * Genesis SEO for AMP support added
607
- * AMP 0.4.2 Vendor Bundled for making it crash proof
608
- * Archive desc only on 1st page #1029
609
- * Ads are not working after 0.9.6 #1030
610
- * Fixed the Post 0.9.57 Update Bugs #1025
611
- * All Images are aligned on left side in design 3 #1031
612
- * Custom frontpage title issue in Design 3 fixed
613
-
614
- = 0.9.57 (5th August 2017) =
615
- * See the Full changelog https://ampforwp.com/0-9-57-released-compatibility-issue-fixed-62nd-update/
616
-
617
- = 0.9.56 (31st July 2017) =
618
- * View more details on https://ampforwp.com/page-break-in-amp/
619
- * Page Break / NextPage (Pagination) Support Added #834 #857 (Improvement)
620
- * Show/Hide AMP for Categories of Posts or All posts #872 (Improvement)
621
- * Adding analytics capabilities to Instant Articles #978
622
- * JetPack Plugin Conflict Solved #971
623
- * Social sharing code improved. amp-social-share js is getting added for line and WhatsApp social share #981
624
- * Code improvement for rel canonicals(home and archive)
625
- * Perfect SEO URL + Yoast SEO Compatibility #982
626
- * Some styling for tags to show up properly
627
- * Undefined index notices #960
628
- * Non-amp category pages should redirect to non-amp pages if turned off from Hiding AMP #999
629
- * Page builder text and button module issues #972
630
- * Documentation links updated in the Options panel
631
-
632
- = 0.9.55 (13th July 2017) =
633
- * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
634
- * Disqus Comments show up even when disabled per post #931
635
- * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
636
- * H3 inside OL in Related-Posts.php #930
637
- * Advertisement Options in Instant Articles #943
638
- * Incompatible with bootstrap plugin #525
639
- * Error in tag and category links #934
640
- * Pagebuilder Button module link had issues #951
641
- * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
642
- * WPtouch Pro Compatibility Issues #927
643
- * Better scripts compatibility in Single of post types #757
644
- * Instant Articles Error: "The HTML element does not contain any text" #949
645
- * added a filter in all the dates so a user can change the date format and modify #962
646
- * Design3 Menu Arrows are clickable along with the links #952
647
-
648
-
649
- = 0.9.54.2 (4th July 2017) =
650
- * Minor bug post 0.9.54 bug fixed
651
-
652
- = 0.9.54 (4th July 2017) =
653
- * View more details on https://ampforwp.com/new/
654
- * Facebook Instant Articles Support #862
655
- * Exclude Some Pages from Mobile Redirection #914
656
- * After 0.9.53 update amp-social-share js missing (critical issue) #924
657
- * Hooks added in Header (above and below)
658
- * View non AMP[Code improvement] #928
659
- * Pages are not supposed to show meta like this, especially Categories #894
660
- * Monarch plugin having design issues #925
661
- * Show AMP Hide AMP Check Box Fixes #794
662
-
663
- = 0.9.53 (19th June 2017) =
664
- * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
665
- * Compatibility Issue with Rocket Lazy Load plugin #907
666
- * Link color issue with UX of Color Pickers in Design 3 #731
667
- * amp-analytics js appears more than once when Google tag manager is used #885
668
- * SEO by SQUIRRLY is adding analytics twice #678
669
- * Fatal error when WPSEO is activated #900
670
- * Design 3 Sticky header should have an option #625
671
- * 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
672
- * Yandex Metrika support in AMP #585
673
- * Histats Analytics Support #880
674
- * Chartbeat Analytics Support #882
675
- * Do not strip Rel from anchor tags #790
676
- * Design close Resulting Blank Screen in AMP Site #642
677
- * Logo size is not applying #817
678
- * AMP Publisher logo guidelines #162
679
- * Remove amp-social-share extension .js from Custom Frontpage #899
680
- * Add compatibility with Sassy Social Share #679
681
- * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
682
-
683
- = 0.9.51.1 (12th June 2017) =
684
- * Redirection issue after 0.9.51 Update.
685
- * Improved compatibility with plugins.
686
-
687
- = 0.9.51 (8th June 2017) =
688
- * View more details on https://ampforwp.com/page-builder-released-in-amp/
689
- * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
690
- * Comments are not showing properly when words are long #861
691
- * Remove amp-social-share extension .js from Pages #853
692
- * The tag ‘amp-sidebar extension .js script’ appears more than once in the document #828
693
- * Remove Advertisement tab #839
694
- * Compatibility with Slide-in Plugin by WPMU dev #866
695
- * Mobile redirection issue with bbpress #867
696
- * All the data must be properly sanitize in the sidebar #849
697
- * AMP html should not be added on the second page of comments
698
- * Author page’s support #456
699
- * URLs in comments should be clickable(links) #869
700
- * Featured image should be centered in desktop mode #870
701
- * Added More Hooks #721 (Documentation on this coming soon!)
702
- * Page 2 goes to the wrong URL #865
703
- * Proper Title and meta for homepage and posts #850
704
- * Gist Support added #608 – Just add a shortcode and enjoy Devs (Ex: amp-gist id="b9bb35bc68df68259af94430f012425f )
705
- * /blog/amp pagination not working #875
706
- * separate the Text and Date format in design 2 #876
707
- * Comments show in AMP w/o breaks between paragraphs #873
708
- * If no featured image below hooks are not working #877
709
- * Change meta name Viewport and its value #878
710
- * Bolt icon in option #474
711
- * Code restructuring and code quality improvements.
712
- * Create a seperate function for comment code in frontpage.php #682
713
- * Remove all the duplicate code from frontpage.php of all the designs and use hooks to add the code instead of static code #889
714
- * Few Debug errors removed.
715
-
716
- = 0.9.50 (24 May 2017) =
717
- * View more details on https://ampforwp.com/facebook-comments-in-amp/
718
- * Design 3 Social Icons issue #832
719
- * View non AMP leads to /?nonamp=1 #814
720
- * Youtube shortcode compatibility improved #557
721
- * welcome.php should be shown only if user is “administrator” #696
722
- * Facebook comments support added in AMP #825
723
- * WP Like Button Compatibility #841
724
- * Custom Taxonomy Support added with Custom Post Type Extension.
725
- * Front page comments not found as expected #837
726
- * Fixed xml:lang tag issue #848
727
- * Sanitize Iframe in the archive description Fixed #845
728
- * Compatibility with Newspaper Theme by TagDiv #842 and #796
729
- * Some debug problems (blog page, style.php) #838
730
- * Featured Image hooks added
731
- * Twitter is misspelled #854
732
- * The core concept of the AMP Content builder has been built.
733
-
734
-
735
- = 0.9.49 (12 May 2017) =
736
- * View more details on https://ampforwp.com/0-9-49-released-small-important-bugs-fixed-56th-update/
737
- * Option added to display the excerpt in Single #806
738
- * Ability to add new invalid tags to filter out from AMP pages #809
739
- * In frontpage, comment button is pointing to wrong URL #812
740
- * Call now button and search is overlapping in Design-1 #784
741
- * Sticky Social Icons should be off if the CTA notification bar is on #788
742
- * Author bio in Design 1 and 2 #732
743
- * Styling in Taxonomy description causing validation issues #798
744
- * Twitter share(handle, url positions fixed) #815
745
- * Tables responsiveness in ALL Designs #726
746
- * Output all the categories and tags with their own ID’s in the div classes #750
747
- * Social Share Icons Overlap with Leave A Comment in Design 3 #716
748
- * Effective Measure Support on AMP #297
749
- * Custom AMP editor on pages should only be shown when page support is ON #756
750
- * AMP on website.com/blog without need of separate installation #775
751
- * GTranslate Compatible #819
752
- * Images and amp-anim styling added #725
753
- * Filter to make the title in a post to a link #727
754
- * Author Bio and Social Share button must not come in Pages #770
755
- * StatCounter is now compatible with AMP #361
756
- * Line Social media support #500
757
- * Footer menus for Design 1 & Design 2 #623
758
- * Strip out src=”about:blank” When Gravity Forms used #804
759
- * Add Compatibility with Crazy Lazy load plugin #751
760
- * Meta Titles and Description issues fixed with Yoast, All in one SEO and The SEO Framework #813
761
- * Double quotes in the Excerpt of the meta description is making AMP Invalidated #818
762
- * Missing featured image on static front page #824
763
- * Fatal error while activation: see the video 0.9.49 Beta #827
764
- * Review this code in archive.php in all 3 designs. #826
765
-
766
-
767
- = 0.9.48 (28 April 2017) =
768
- * View more details on: https://ampforwp.com/0-9-48-released-step-towards-multilingual-support-55th-update/
769
- * The default translation method of WordPress added. (Option in Translation panel to switch between * Translation panel and POT file #540)
770
- * 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.
771
- * Another Advertisement slot added below the post title in the Single post.
772
- * Fatal error: require_once report-bugs.php #747 fixed
773
- * Add / for codes in Meta Description #766 fixed
774
- * Controls re-adjusted & Renamed title of yoast description control in Options panel
775
- * Design-3 Slider URL redirecting to non-AMP page #758
776
- * Added new sanitizer For HTML to AMP-HTML conversion
777
- * Sanitized Archive descriptions so that it would convert to AMP
778
- * Comments sanitized with new sanitizer so that HTML tags automatically become AMP compatible.
779
- * 301 redirects on non-pretty internal links #767
780
- * Create a filter to modify the value of rel="amphtml" #778
781
- * Max-width added for images in comments
782
- * If in WooCommerce ?amp endpoint set then update href.
783
- * Undefined Variable (Debug) #733 and many other debug issues were fixed
784
- * Show last updated Post instead of published date #575
785
- * WooCommerce Widget added to display latest products on homepage. #763
786
- * add amp_post_template_above_footer hook global in all the designs #779
787
- * Excerpt on top of the content in Single #665
788
- * Subscribe box has been improved for the UX needs #712
789
- * Notice warnings since 0.4.2 update #740
790
- * AMP Comments Form Integration with the extension
791
- * Filter added on the loop in Homepage of the Design 3 so that it can be modified with an external plugin.
792
- * 404 on paged home page #781
793
- * Twitter handle should be at the end of the tweet not in the beginning #787
794
- * Wrong Rel Canonical for AMP Custom Frontpage #799
795
- * 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.
796
- * Extension page user experienced improved.
797
- * Removed old Youtube installation video and replaced with new one.
798
-
799
- = 0.9.47.2 (12 April 2017) =
800
- * Design-3 Slider URL redirecting to non-AMP page #758
801
- * Ads showing in comments #768
802
-
803
- = 0.9.47.1 (11 April 2017) =
804
- * Meta description option improved in SEO section #766
805
- * Fatal error: require_once report-bugs.php #747
806
-
807
- = 0.9.47 (10 April 2017) =
808
- * View more details at https://ampforwp.com/0-9-47-released-54th-update/
809
- * Meta saving method updated for customAMP content editor checkbox was causing some conflict.
810
- * Wrong Yoast title and structured data in Custom Frontpage fixed
811
- * CSS minification all 3 designs
812
- * Polylang flags in menu was causing validation issue, is now resolved
813
- * WPML flags in menu was causing validation issue, is now resolved
814
- * Standardized function created for content sanitization.
815
- * Archive description now displays AMP compatible markup
816
- * Comments markup sanitized for AMP
817
- * Design 3 images not aligned properly, fixed
818
- * Images are aligned to center in Design 1.
819
- * carousel ending with //amp instead of /amp – fixed #753
820
- * Title of the Post along with Post link when shared in twitter #683
821
- * Ads were cutting in half in RTL, fixed
822
- * Add / at the end of AMP links with in the AMP pages (Internal links) #668
823
- * Rendering the wrong URLs in front page if paged #742
824
- * Option to turn off AMP on all pages, so people can turn on only for specific pages #746
825
- * Need Meta Description on amp pages #741
826
- * Woocommerce Loop shortcode updated
827
- * Call Now Button added in header #563
828
- * Post images are not centered in Design 3 #695
829
- * UX of GTM settings done, since users were getting confused #700
830
- * Front page amphtml fixed for paginated pages
831
-
832
- = 0.9.45.6 (31 March 2017) =
833
- * Installation Process from welcome page was not working after WP Plugin DIR API change was fixed.
834
- * WP Rocket Minifcation and Concatenation was not working, its fixed now.
835
- * WP Rocket was tested properly to make sure everything is working fine.
836
-
837
- = 0.9.45.5 (25 March 2017) =
838
- * WP rocket conflict solved
839
- * Cannot set property ‘innerHTML’ of null issue fixed
840
-
841
- = 0.9.45.3 (21 March 2017) =
842
- * Post 0.9.45 bugs fixed and released as an urgent update.
843
-
844
- = 0.9.45.1 (19 March 2017) =
845
- * Post 0.9.45 bugs fixed and released as an urgent update.
846
-
847
- = 0.9.45 (18 March 2017) =
848
- * View more details at https://ampforwp.com/0-9-45-released-compatibility-rtl-53rd-update/
849
- * W3Total cache compatibility added
850
- * RTL Support added for Right-to-Left language websites.
851
- * Comments Pagination feature added
852
- * WP-Rocket Compatibility added
853
- * WPML Compatibility added
854
- * Quantcast analytics support added
855
- * ComScore support added
856
- * Custom Yoast title support added #685
857
- * 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]
858
- * Admin area UX improvements
859
- * Adding notifications script in the correct way
860
- * Comments now display on frontpage as well.
861
- * Re-positioned non-amp Header link control to the right section.
862
- * ?nonamp=1 only displays when the Mobile redirection is on
863
- * Properly adding iFrame js.
864
- * Custom Post type incompatibility fixed
865
- * Widgets added to the Custom Frontpage.
866
- * Stripping shortcodes from excerpts.
867
- * Custom content on static frontpage had over riding issue #687
868
- * Option added for controlling number of comments
869
- * Welcome page should be shown only if user is “administrator” #696
870
- * Digg Digg social share compatibility #694
871
- * Removed unnecessary lines from Design 3
872
- * Sanitized Archive Description to amp Compatible #659
873
- * Author box now displays HTML properly #645
874
- * Date added Design-3 in meta #583
875
- * Options link was removed from wp-admin tool bar after a feedback from a user.
876
- * Footer sub menus layout compatibility.
877
-
878
-
879
- = 0.9.44 (5 March 2017) =
880
- * View more details at https://ampforwp.com/user-experience-52nd-update/
881
- * Added Welcome Screen for better User experience. [Enhancement]
882
- * Undefined Index debug error resolved [Bug fix]
883
- * All in one SEO Support support tested [3rd party compatibility]
884
- * Frontpage title in Design 3 is out of the container #644 [Bug fix]
885
- * Default Table markup in AMP #643 [Enhancement]
886
- * AMP carousel is not working on Frontpage #641 [Bug fix]
887
- * Social share .js was getting added even when it was not required #638 [Bug fix]
888
- * Search Feature added for Design 1 & Design 2 [Major Improvement]
889
- * Accordion script loading issue in Design 3 #634 [Bug fix]
890
- * ?nonamp=1 links should be nofollow #622 [Bug fix]
891
- * Same Header and Color Scheme are making header elements invisible #629 [Enhancement]
892
- * In Search AMP rel canonical was different #631 [Bug fix]
893
- * Non-AMP link in Design 3 was not working when mobile redirection was enabled #632 [Bug fix]
894
- * Search form text strings are now added in the translation panel #607 [Bug fix]
895
- * Load AMP-ads conditionally only if ads are available #609 [Bug fix]
896
- * Added compatibility with Custom post type extension. Option to hide/show AMP on all custom post types #587 [Bug fix]
897
- * Report a Bug & Request feature links added [Enhancement]
898
- * If there was no menu set in Design 3 then all pages were getting displayed. #613 [Bug fix]
899
- * The tag Font is disallowed #616 [Validation Improved]
900
- * index/noindex separately added for Tags and also for Categories #606 [Enhancement]
901
- * Use of undefined constant AMP_QUERY_VAR #596 [Bug fixed]
902
- * Logo is not centered in Design 3 #586 [Bug fixed]
903
- * Remove defer, a very rare type of defer was getting added #589 [Validation Improved]
904
- * Disqus comments iframe had scrolling issues #566 [Bug fixed]
905
- * Left side blank gap in the RTL in design 2 #541 [Bug fixed]
906
- * Inline Styles not working correctly in Custom AMP Editor #533 [Bug fixed]
907
- * Re-save permalinks issues. Flushing rewrites with options saved. #511 [Improvement]
908
- * Code review and cleaning of the customizer #404 [Code Cleaning]
909
- * Google Search iframe had some header alignment issues in Design 3. #624 - Thank you Leo Osa @leoosa for the contribution! [Bug fixed]
910
- * AMP Frontpage + Override AMP Content = Blank page #604 [Bug fixed]
911
- * 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]
912
- * 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]
913
- Reformatting and Minifying of stylesheet [Code Cleaning]
914
- * Created a new section for Homepage and moved some controls from other areas to the home section for the better user experience. [User Experience]
915
- * Override Homepage Thumbnail size option added. It will give you more control over your thumbnails. [Major Improvement]
916
- * 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]
917
- * Extra amp-carousel script loading is now fixed. [Bug fixed]
918
- * Crafting of layout code in design 2 and design 3, especially with social icons area. [Code Cleaning]
919
- * Design of search form was not clickable in iOS devices #621 [Bug fixed]
920
- * 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]
921
-
922
- = 0.9.43.6 =
923
- * View more details at https://ampforwp.com/stability-sprint-3-51st-update/
924
- * Typo in the is_home() function fixed
925
- * Option to hide/show AMP on all custom post types #587
926
- * False detection by Windows defender tool fixed
927
- * Conditional tags were not compatible with Advanced AMP ads which were causing some conflicts but is now fixed.
928
-
929
- = 0.9.43.5 =
930
- * View more details at https://ampforwp.com/stability-sprint-2-50th-update/
931
- * Fixed shortcodes issue in related posts #543
932
- * Iframe Scripts Added properly
933
- * Proper conditions added for the social section of Design 3
934
- * Featured Image issue stretched in Design 2 & 3
935
- * Removed extra global $redux_builder_amp;
936
- * Custom Logo Dimensions option added #479
937
- * Index & NoIndex options added for SEO section. #558
938
- * Added URL for rewrite flushing rules in Options
939
- * Option to enable and disable the Author area in Design 3#577
940
- * Rel Nofollow added in credit link
941
- * debug issue solved: fn_offset not defined
942
- * debug issue solved: global $post not declared
943
- * The word 'ago' is now translatable in design 3
944
- * The word 'read next' is translatable now
945
- * Tablepress compatibility added #392
946
- * Secure API server is now serving through Google Cloud Manager.
947
- * Thrive Content builder was displaying twice when the Custom AMP content was on. It was a complex issue which has been solved now.
948
- * amp-ad extension.js script was loading if the Ads are not enabled. #598
949
- * Social Share Extension Included on Homepage even if we didn't have social icons #599
950
- * Installation UX improvement #593
951
- * Removed duplicate global variable
952
- * Proper OG tags added #588
953
- * Proper instructions added for Custom AMP content #471
954
-
955
-
956
- = 0.9.43.1 =
957
- * View more details at https://ampforwp.com/0-9-43-1-released-stability-sprint-1-49th-update/
958
- * Emoji in comments leads to AMP errors
959
- * Design 1 showing time on archives
960
- * Added some space between the archive label.
961
- * Lazy loading plugins compatibility #544
962
- * Custom header and footer areas
963
- * Sticky posts now come on top #564
964
- * Footer non-amplink added in design 3 #562
965
- * HTML Paragraph tag is shown in the title in category! #518
966
-
967
- = 0.9.42 =
968
- * View more details at https://ampforwp.com/design-three-update/
969
- * 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]
970
- * Ticket #517 Added Upload field into Redux core [3rd party Compatiblity]
971
- * Ticket#529 Controls for archive titles added [Improvement]
972
- * Ticket #548 Jetpack photon code removed
973
-
974
- = 0.9.41 =
975
- * View more details at https://ampforwp.com/disqus-comments-in-amp/
976
- * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
977
- * AMP WooCommerce supported tag was missing after the last update. [Bug fix]
978
- * Homepage & Related Posts was displaying private and protected posts, which is now fixed [Bug fix]
979
- * Next previous links added in Design 1 [Enhancement]
980
- * Invalid Post Time displaying in the homepage of Design 1 [Bug fix]
981
- * Twitter share now includes the twitter handle of the author with setting in options [Enhancement]
982
- * Emoji in comments leads to AMP errors was fixed [Bug fix]
983
- * Date are now displayed on archives in Design 1 [Enhancement]
984
- * When RTL enabled logo merges with nav bar was fixed [Bug fix]
985
- * Jetpack Photon compatibility added [3rd Party Compatibility]
986
-
987
- = 0.9.40 =
988
- * View more details at https://ampforwp.com/0-9-40-released-biggest-stability-update/
989
- * Proper endpoints added [Improvement]
990
- * Flush Rewrites properly [Improvement]
991
- * REL Canonical properly getting added. [Improvement]
992
- * Proper Frontpage Canonical added [Improvement]
993
- * Added Base name support for categories and tags [Improvement]
994
- * Redirection of excluded post solved. [Bug fix]
995
- * Archives properly redirecting to the right URL [Bug fix]
996
- * Homepage redirection solved [Bug fix]
997
- * Plusone tag is stripped properly. [Validation Issue fixed]
998
- * Archives are now clickable. [Improvements]
999
- * WP_Query filter added for better customizability of Homepage loop. [Better Customizations]
1000
- * Social share boost plugin compatibility. [3rd party Customizations]
1001
- * Removed H1 from the frontpage even if it is not available. [Improvement]
1002
- * H3 instead of H1 for Site title. So there is only one H1 per page. [SEO Improvement]
1003
-
1004
- = 0.9.38 =
1005
- * View full details at https://ampforwp.com/google-tag-manager-for-amp/
1006
- * Google Tag manager included [New feature]
1007
- * Iframe max-width added [Improvement]
1008
- * Paginated pages have different titles now. [Bug fix]
1009
-
1010
- = 0.9.37 =
1011
- * View full details at https://ampforwp.com/category-tags-archive-support-added/
1012
- * Debug issues solved [Bug fix]
1013
- * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
1014
- * Category, Tags & Archive Support with titles added [Enchancement]
1015
- * Archive Title support added [Enchancement]
1016
- * There were some issues with attachments [Bug fix]
1017
- * removed ? from amp url's [Improvement]
1018
- * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
1019
- * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
1020
- * Added an option to turn off AMP support for Homepage. [Enchancement]
1021
- * Too many redirects issue on homepage is fixed #435 [Improvement]
1022
- * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
1023
- * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
1024
- * Comment anchor link changed for simplecomment button files in both designs [Improvement]
1025
- * Redirection Loop issue fixed [Bug fix]
1026
- * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
1027
- * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
1028
- * Improved Sessions [Improvement]
1029
- * Advnaced Settings panel was created for better user experience. [Improvement]
1030
- * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
1031
- * RTL issue fixed #454 [Bug fixed]
1032
-
1033
- = 0.9.36 =
1034
- * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
1035
- * 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]
1036
- * Hide advertisement section if advance ads plugin is active. [Better User experience]
1037
- * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
1038
- * 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]
1039
-
1040
- = 0.9.35 =
1041
- * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
1042
- * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
1043
- * Attachment page was having the wrong endpoint. [Bug fix]
1044
- * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
1045
- * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
1046
- * Lang attributes were added [Enhancement]
1047
- * The tag like was disallowed in the AMP [Validation Improvement]
1048
- * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
1049
- * AMP on Pages option was not working in some cases. [Bug fix]
1050
- * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
1051
- * g:plusone tag was not getting removed properly. [Validation Improvement]
1052
- * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
1053
- * Structured Data Image width issue solved [Enhancement]
1054
- * 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]
1055
- * imageanchor=”1″ was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
1056
-
1057
- = 0.9.34 =
1058
- * Newspaper theme by Tagdiv was having issues, we have fixed this one.
1059
-
1060
- = 0.9.33 [15th Jan 2017] =
1061
- * Full details at https://ampforwp.com/debug-errors-shortcodes/
1062
- * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
1063
- * Debug errors fixed, Code is now much cleaner.
1064
- * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
1065
- * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
1066
- * Properly removes AMP if turned off from Post panel
1067
- * z-index position improved on Sticky Social bar
1068
- * Better compatibility with shortcodes.
1069
- * Divi Standard Layouts Compatibility
1070
- * Properly Hide AMP posts if excluded. #367
1071
- * Mobile redirection was causing loop issues which are now fixed.
1072
- * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
1073
- * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
1074
- * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
1075
- * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
1076
-
1077
- = 0.9.32 [7th Jan 2017] =
1078
- * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
1079
- * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
1080
- * Paginated pages on homepage redirect to homepage URL #335
1081
- * Title of the page should be displayed on the FrontPage #358
1082
- * Thrive Builder AMP Validation Compatibility, so it will be validated properly in AMP.
1083
- * Twitter Sharing improved so it gets the data properly #341
1084
- * Option to change the number of Related Posts #290
1085
- * Validation errors due to rel="canonical" was missing on some pages
1086
- * Comment button displays even if the comments are not available
1087
- * Threaded comments were duplicating, so that issue is solved and added proper CSS for it.
1088
- * Minor issue with Jetpack Comments fixed.
1089
- * Missing amp-social-share.js on front page fixed #372
1090
- * Minor improvements to Title and description tags.
1091
- * Analytics Script was loading twice when Glue was active.
1092
- * Page specific class added for better customization compatibility #377
1093
- * Inline Style support added Fixed #356
1094
- * Bugs fixed in Email notification pointer
1095
-
1096
- = 0.9.31 [2nd Jan 2017] =
1097
- * Proper Details at https://ampforwp.com/amp-0-9-31-released-installation-user-experience/
1098
- * Proper Condition added for the scripts to load in Frontpage.php
1099
- * Rel canonical properly added for front pages
1100
- * 404 and Archive page Mobile redirection code refined
1101
- * User Experience Improvement: Installation process was improved
1102
-
1103
- = 0.9.3 [31th December 2016] =
1104
- * Proper Details at https://ampforwp.com/custom-amp-content-editor/
1105
- * 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.
1106
- * FrontPage had some validation issues. [Bug fix]
1107
- * Related posts in Design 1 we're redirecting to 404 fixed [Bug fix]
1108
-
1109
- = 0.9.2.2 [27th December 2016] =
1110
- * Proper Details at https://ampforwp.com/polishing-user-experience-improvements/
1111
- * Made the Options panel user-friendly
1112
- * Social Share on frontpage issue fixed.
1113
- * Readme.txt made user-friendly.
1114
- * Archive option removed and some UI improvements
1115
- * Single was not displaying the Title
1116
- * 'Type is not allowed' [Validation issue fixed]
1117
- * noshade tag Validation issue fixed
1118
-
1119
- = 0.9.2.1 [24th December 2016] =
1120
- * Proper Details at https://ampforwp.com/step-towards-fixing-amp-validation-errors/
1121
- * Disabled the Tags and Categories support for AMP for better validation until we find a better solution.
1122
- * Mobile redirection bug fixed, It was continuously redirecting to the same page [Bug fix]
1123
- * trailingslashit added to make sure we have proper url for Mobile redirection [Bug fix]
1124
- * In content AD overlapping the content issue fixed
1125
-
1126
- = 0.9.2 [23th December 2016] =
1127
- * Proper Details at https://ampforwp.com/mobile-redirection/
1128
- * AMP Mobile Redirection Feature added. It can be turned on from Dashboard > General and then Mobile Redirection. [New Feature]
1129
- * Archive title and description added [Improvement]
1130
- * Improved the Speed of the AMP version #321 [Improvement]
1131
- * Anchor link was not closing fixed #328 [Bug Fix]
1132
- * Typo in Trailingslashit function which resulted in some issues in the Homepage version [Bug Fix]
1133
-
1134
- = 0.9.1.2 [20th December 2016] =
1135
- * Proper Details at http://ampforwp.com/new/
1136
- * DoubleClick Support
1137
- * Custom Post Type Support
1138
- * Ratings Support
1139
- * Comments Gaping fix
1140
- * Custom Excerpt code
1141
- * Better Compatibility with Yoast SEO plugin
1142
- * AMP Validation error in Design 1 Fixed
1143
- * Proper Homepage title & Description with Yoast SEO plugin issue fixed
1144
- * Design -1 Excerpt too big for mobile devices, Fixed
1145
- * Advertisement support on Design 1
1146
- * Link to Tags & Categories were having some issues.
1147
- * AMP looking bad on big devices
1148
- * AMP validation Improvement: Lightbox plugins compatibility
1149
- * Huge Progress in AMP Validation Errors: Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
1150
- * Page Performance: Removed default Google font loading
1151
- * Page Performance: DNS Prefetch tag added for faster DNS Handshake
1152
-
1153
- = 0.9.1 [16th December 2016] =
1154
- * Proper Details at http://ampforwp.com/new/
1155
- * PHP7 Compatibility
1156
- * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
1157
- * Custom CSS not working in Design one (#249)
1158
- * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
1159
- * How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
1160
- * Non-amp Homepage support added (#267)
1161
- * using get_avatar() (#259)
1162
- * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
1163
- * Validation Issue fixed: Script Tag removed from the content.
1164
- * Featured image in Design 1 in single #261
1165
- * After Fresh installation - a save is required Fixed
1166
- * Excerpt length controlled
1167
- * Design One has thumbnails on the Homepage
1168
- * Non-AMP link goes to the wrong page, issue fixed.
1169
- * Archive pages were broken, fixed.
1170
- * Option to Enable & Disable the Next/Previous links in Single
1171
- * WhatsApp sharing not working, issue fixed.
1172
- * Category Taxonomy has extra ':' in the word.
1173
- * The word 'Ago' is now translatable.
1174
- * Yoast SEO with AMP compatibility issue fixed.
1175
- * Several Minor Polishing in the code
1176
- * Footer Ad gets covered by Sticky Social Icons (#269)
1177
- * Smaller image size when “image caption” is used in Design-2 (#263)
1178
- * Footer ad with Sticky Social bar issue fix
1179
- * Checked with WordPress 4.7
1180
- * Ad #1 was messing up with the title, issue fixed.
1181
- * Compatibility improved with AMP WooCommerce.
1182
-
1183
- = 0.9 =
1184
- * Proper Details at http://ampforwp.com/amp-pagebuilder/
1185
- * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
1186
- * 100% Yoast Compatible , Now no need to have additionally Glue Installed
1187
- * 100% completed Translation panel, Now absolutely anything on page is translated
1188
- * Added Option to turn on/off Page Support
1189
- * Styling for Tags was Corrected
1190
- * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
1191
- * Default Image alignment styling added
1192
- * Added Option to turn on/off Page Support
1193
- * Related Posts Now use Custom Excerpt if it Exists
1194
- * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
1195
- * <pre> Tag styling issue fixed for AMP pages
1196
- * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
1197
- * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
1198
- * 2 New Designs added
1199
- * SEO Panel Added
1200
-
1201
- = 0.8.8 =
1202
- * Proper Details at http://ampforwp.com/amp-0-8-8-released-translation-panel/
1203
- * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
1204
- * Badge Tag was throwing Validation error
1205
- * Plusone tag validation error was fixed
1206
- * Time tag was validation error was fixed
1207
- * User experience for Mobile devices was improved
1208
- * Meta info was messing up in smaller devices, it was fixed as well.
1209
- * Internal AMP linking added for Categories and Tags
1210
- * Future errors for AMP ads was fixed
1211
- * Blockquote styling added
1212
- * “Please Activate parent Plugin settings” added for better User Experience.
1213
- * Related Post Ux improvement
1214
- * Plugin version added in Footer source code for better debugging
1215
- * Added Support for Default WordPress Image alignment
1216
- * New action hooks added in index page
1217
- * Featured Image Size options added
1218
-
1219
- = 0.8.7 =
1220
- * Proper Details at http://ampforwp.com/amp-0-8-7/
1221
- * added option to enable/disable AMP on Archive pages (Ticket #188)
1222
- * Solved 404 on Related Posts (Ticket #178 )
1223
- * Related posts by either categories or Tags(Ticket #179)
1224
- * added a link to menu Section from the AMP Options page(Ticket #190)
1225
- * Added Support for Piwik Analytics(Ticket #163)
1226
- * Added Support for Segment.com Analytics(Ticket #50)
1227
- * Added a switch for hiding Non-Amp page link from Footer.( Ticket #189)
1228
- * Added an Option that strips Users URL from Comments Section(Ticket #180)
1229
- * Fixed stripping <date> tags from the content , Since it was preventing validation – amp-img issues fixed
1230
- * UX Improved for every section of AMP Options page
1231
- * Added Settings button on plugin page
1232
- * Related posts switch added
1233
- * Removed carousel.js
1234
-
1235
-
1236
- = 0.8.6.1 =
1237
- * Date Tag fix
1238
- * Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
1239
-
1240
- = 0.8.6 =
1241
- * Proper Details at http://ampforwp.com/amp-0-8-6-released-related-posts-comments/
1242
- * Related Posts
1243
- * Post Comments
1244
- * WhatsApp sharing button Your visitors can now easily share the content over the whatsapp.
1245
- * Validation issue fixed by All In One Schema.org Rich Snippets plugin
1246
- * Removed Google Fonts loading for Performance
1247
- * New relic Support
1248
- * Class added to ‘View Non-AMP Version’ text
1249
- * Archives Structured Data issue fixed
1250
- * Some instances img tags converted into amp-img automatically.
1251
-
1252
-
1253
- = 0.8.5.3 =
1254
- * Canonical issue fixed for Post
1255
-
1256
- = 0.8.5.2 =
1257
- * Canonical issue fixed for FrontPage
1258
-
1259
- = 0.8.5.1 =
1260
- * Proper Details at http://ampforwp.com/new/
1261
- * Validation issue fixed: 'Value' tag
1262
- * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
1263
- * Validation issue fixed: Table markup
1264
- * Validation issue fixed: nowrap and misc tags
1265
- * New Relic Support
1266
- * Tags on off option
1267
- * Canonical and correct AMP html Redirect issues Solved
1268
- * NextGEN Gallery Validation Support Added
1269
-
1270
- = 0.8.5 =
1271
- * Proper Details at http://ampforwp.com/the-0-4-compatibility/
1272
- * AMP 0.4 Compatibility Check
1273
- * Even better Structured Data Validation, Once in for all!
1274
- * Structured Data Options to eliminate Validation errors
1275
- * AMP Page Exclude option
1276
-
1277
- = 0.8.4 =
1278
- * Proper Details at http://ampforwp.com/blog/structured-data-validation/
1279
- * Structured Data Validation
1280
- * Navigation Text Change
1281
- * Inline Style Validation
1282
- * Form Validation
1283
- * Frontpage shows the amphtml rel twice fixed
1284
- * Facebook Sharing not working
1285
-
1286
- = 0.8.3 =
1287
- * Prefix added in the Content filter
1288
- * Extra space after quote in Ads
1289
-
1290
- = 0.8.2 =
1291
- * Proper Details at http://ampforwp.com/blog/the-custom-frontpage/
1292
- * Custom AMP FrontPage
1293
- * Featured Image
1294
- * New Mobile Friendly Advertisement sizes
1295
- * Single Post Pagination Option
1296
- * RTL Support
1297
- * Notifications
1298
- * Gaping if the Meta was turned off.
1299
- * Analytics was not fetching the user id properly.
1300
- * Page was not using the post template along with the AD support.
1301
- * AMP Endpoint support for Paged when the front page is active.
1302
- * UI improvement of Admin panel
1303
- * Few Validation issues fixed
1304
-
1305
- = 0.8.1 =
1306
- * Warning: Cannot modify header information error fixed
1307
- * Validation issue fixed. KK Star Plugin compatible.
1308
- * Gaping in the smaller screens fixed
1309
-
1310
- = 0.8 =
1311
- * Proper Details at http://ampforwp.com/blog/the-change/
1312
- * 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.
1313
- * 99.5% Validation issues were fixed.
1314
- * Page builder & Shortcodes Compatibility Support Added
1315
- * Conflict with JSON API
1316
- * Carousel support for Gallery
1317
- * Better Image stretching and resizing
1318
- * Youtube Video Embed Support
1319
- * Vine Embed Support
1320
- * Twitter oembed Support
1321
- * Instagram Embed Support
1322
- * Facebook Video Embed Support
1323
- * Better Future Compatibility
1324
-
1325
- = 0.7.7 =
1326
- * Proper Details at http://ampforwp.com/blog/amp-0-7-7/
1327
- * Big Validation Error fix Update
1328
- * Disable AMP support on specific Pages and Posts
1329
- * Option to disable the Post meta from the Single
1330
- * Footer Credits and Copyright Text Option
1331
- * New options for Social Sharing Bar in Single
1332
- * Jetpack Social & Related Sharing Issue fixed
1333
- * Gaping in footer if the Sticky bar is enabled
1334
- * Text domain added on few strings
1335
-
1336
- = 0.7.6 =
1337
- * Google Adsense Support Added with AMP-Ad
1338
- * Wrong Homepage rel amphtml bug fixed
1339
-
1340
- = 0.7.5 =
1341
- * Google Analytics Support Added
1342
- * Logo Support Added. If the logo is disabled, then the Title should be activated.
1343
- * Color Scheme Feature Added
1344
- * User friendly Options Panel Added
1345
- * iFrame support Added
1346
- * Few Minor Bugs Fixed
1347
-
1348
- = 0.7.1 =
1349
- * Bug #24 (Github) fixed
1350
- * Strip Style tags for faster & better validation
1351
- * Bug #21 (Github) fixed
1352
-
1353
- = 0.7 =
1354
- * Canonical Improved
1355
- * Navigation Validation bug fixed
1356
- * Two more validation bugs fixed ('role' and 'tabindex' attribute)
1357
- * Featured image automatically hides if it is not present
1358
- * Validation issues in the images of the post's the_content
1359
-
1360
- = 0.6 =
1361
- * Improved Navigation Menu
1362
- * Search Console errors fixed
1363
- * Social Sharing option
1364
- * Pages support
1365
- * Force redirection for mobile users removed and many other bug fixes
1366
-
1367
- = 0.5 =
1368
- * Added AMP Markup for Google Structured data. This will fix the issues in Webmaster tools.
1369
-
1370
- = 0.4 =
1371
- * Support of Custom menu added for AMP enabled sites
1372
-
1373
- = 0.3 =
1374
- * Support of amp-img added in single posts
1375
- * minor css bug fixed
1376
-
1377
- = 0.2.5 =
1378
- * Minor bugs fixed
1379
- * ?mobile & ?nomobile is now ?amp & ?noamp
1380
-
1381
- = 0.2 =
1382
- * White Screen of death issue fixed
1383
- * Plugin URI updated
1384
-
1385
- = 0.1 =
1386
- * 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: 4.9.4
7
+ Stable tag: 0.9.83
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?](http://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](http://ampforwp.com/community/)
17
+
18
+ [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
19
+
20
+ [youtube https://www.youtube.com/watch?v=vAGPFKKm5G4]
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>Premium Support</strong><br>
26
+ We try our best to provide support on WordPress.org forums. However, One-on-one email support is available to people who bought the [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) only.
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
+
32
+ = Features: =
33
+
34
+ * NEW - Alexa Metrics Compatibility added
35
+ * NEW - OneSignal Push Notifications integration
36
+ * NEW - Structured Data Options
37
+ * NEW - Page Builder 2.0 for AMP! [Learn More & Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
38
+ * NEW - Advanced WooCommerce Support [More Info](https://ampforwp.com/woocommerce/)
39
+ * NEW - Gravity Forms Support [More Info](https://ampforwp.com/gravity-forms/)
40
+ * AMP Plugins Manager - Which allows you to disable a specific plugin functionality only in the AMP version
41
+ * Page Break / NextPage (Pagination) Support
42
+ * Contact Form 7 Support [More Info](https://ampforwp.com/contact-form-7/)
43
+ * Facebook Comments Support
44
+ * Github Gist Support
45
+ * Email Opt-in Subscription form support in AMP added
46
+ * Call to Action boxes and notification bars
47
+ * 9 Advertisement sizes - 2 More AD slots added recently
48
+ * Comments Forms in AMP.
49
+ * Native AMP Search functionality.
50
+ * Design 3 [Watch the Video Overview](https://www.youtube.com/watch?v=ub1pwskt3Rc)
51
+ * Disqus Comments Support
52
+ * Google Tag Manager Support
53
+ * Page, Category & Tags Support Added
54
+ * 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.
55
+ * 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.
56
+ * Custom Post Type Support
57
+ * Star Ratings
58
+ * Drag & Drop Page builder Added
59
+ * 2 Designs Added
60
+ * Yoast SEO support on AMP pages and other SEO plugins
61
+ * AMP WooCommerce Support
62
+ * Switch on/off Support for Pages & Posts on AMP
63
+ * Translation Panel & RTL
64
+ * Internal AMP linking - You can browse AMP pages internally
65
+ * Related posts below the post
66
+ * Recent Comments list
67
+ * Automatically integrate AMP to your website.
68
+ * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
69
+ * Google Analytics Support.
70
+ * User Friendly Theme Options Panel.
71
+ * Unlimited Color Scheme.
72
+ * Image Logo Upload.
73
+ * Supports Posts and Pages.
74
+ * Proper rel canonical tags which means that Google know the original page.
75
+ * Overlay Navigation Menu bar.
76
+ * Social Sharing in the Single.
77
+ * Sexy Design.
78
+ * Separate WordPress Menu for AMP version.
79
+ * Page builder & Shortcodes Compatibility.
80
+ * Carousel support for Gallery.
81
+ * Better Image stretching and resizing.
82
+ * Youtube Video Embed Support.
83
+ * Vine Embed Support.
84
+ * Twitter oembed Support.
85
+ * Instagram Embed Support.
86
+ * Facebook Video Embed Support.
87
+ * RTL Support
88
+ * Custom AMP FrontPage
89
+ * Notifications
90
+ * Chartbeat, Hi-stats, Yandex Metrika, Piwik, Segment.com, StatCounter, Effective Measure and comScore Support
91
+ * Incontent & DoubleClick Support
92
+ * Great Support & Active Development.
93
+ * Widgets & WooCommerce
94
+ * Genesis SEO Support
95
+ * Breadcrumb Support added
96
+ * Facebook Instant Articles Support Added
97
+ * NEW - AMP Installation Wizard that makes it easy to setup for new users.
98
+ * NEW - Category base remover support
99
+ * NEW - Tag base remover support
100
+ * NEW - 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber)
101
+ * NEW - 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/)**
102
+
103
+ **[JOIN CHAT GROUP COMMUNITY](http://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.
104
+
105
+ = Getting Started: =
106
+ **[1. User Documentation:](http://ampforwp.com/help/)** The AMP for WP plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.
107
+
108
+ **[2. Developer Docs:](https://ampforwp.com/help/#extend)** We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.
109
+
110
+ **[3. Fixing AMP Validation Errors:](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.
111
+
112
+ **[4. Community Support Forum:](https://ampforwp.com/help/#support-forum)** We have a special community support forum where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means alot to us and so we try our best to reply each and every question that gets asked.
113
+
114
+ **[5. Frequently Asked Questions:](http://ampforwp.com/faq/)** Some of the Frequently Asked questions.
115
+
116
+
117
+ == Installation ==
118
+ **[Visit Help area for the Documentation:](http://ampforwp.com/help/)**
119
+
120
+ [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
121
+
122
+ **[Visit Help area for the Documentation:](http://ampforwp.com/help/)**
123
+
124
+
125
+ == Frequently Asked Questions ==
126
+
127
+ = Can I add analytics? =
128
+
129
+ 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.
130
+
131
+ = Can I add Ads in my AMP pages? =
132
+
133
+ 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.
134
+
135
+
136
+ = Can I extend/Change the AMP design, so it suits my needs? =
137
+
138
+ 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/)
139
+
140
+
141
+ = Do you have any prebuilt designs? =
142
+
143
+ 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)
144
+
145
+
146
+ = I'm a developer and I want to add custom functionality for a client, can I do that? =
147
+
148
+ 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.
149
+
150
+
151
+ = How do I report bugs and suggest new features? =
152
+
153
+ You can report the bugs [here](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages/issues)
154
+
155
+ = Will you Add New features to my request? =
156
+
157
+ 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.
158
+
159
+
160
+ = How do I get in touch? =
161
+
162
+ You can contact us from [here](http://ampforwp.com/contact/)
163
+
164
+
165
+ == Screenshots ==
166
+ 1. AMP Homepage
167
+ 2. AMP Single Post
168
+ 3. Post Navigation in Single
169
+ 4. Sticky Social sharing icons
170
+ 5. Overlay Navigation menu sidebar.
171
+ 6. Page builder of the Single article. You can drag and drop any element.
172
+ 7. Single post of Design One
173
+ 8. GTMetrix Performance Report
174
+ 9. Google PageSpeed Insight report for AMP
175
+ 10. Homepage of Design One
176
+ 11. Pingdom Speed Report for AMP
177
+
178
+
179
+ == Changelog ==
180
+
181
+ = 0.9.83 (03rd March 2018) =
182
+ * Added: Ability to add amp-carousel and amp-selector directly into WYSIWYG Editor #1588
183
+ * Fixed: Debug error caused by Playbuzz Sanitizer #1674
184
+ * Added: Show default gravatar for comments #1758
185
+ * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
186
+ * Fixed: To avoid debug error in swift
187
+ * Fixed: Translation improved for some strings #1678
188
+ * Fixed: Stop AMP takeover for Feed pages #1767
189
+ * Fixed: Menu issues In Design 1 & Design 2 after changing from AMP-Sidebar #1565
190
+ * Fixed: AMP Options panel Not Working After Update (0.9.82.1) version #1761
191
+ * Fixed: Move the label to the top [UX improvement] #1746
192
+ * Fixed: Error with Vue #1745
193
+ * Added: Video Module added in AMP Page Builder #1750
194
+ * Fixed: Sidebar menu is not scrollable swift theme #1769
195
+ * Fixed: View Non-AMP should be usertrailingslashit #1772
196
+ * Fixed: Proper structured data for Blogpage #1660
197
+ * Fixed: Legacy Page Builder not working after the update #1773
198
+ * Fixed: Content blank when only image in content #1778
199
+ * Fixed: Comment ID display issue fixed #1758
200
+ * Fixed: PHP Warning: A non-numeric value encountered in components/logo/logo.php on line 52 #1764
201
+ * Fixed: Yummly support added in Swift #1708
202
+ * Fixed: Demo Link updated #1781
203
+ * Fixed: CSS is not loading in Swift Theme #1780
204
+ * Added: Ability to add Advertisement or Sponsored label under ads #1710
205
+ * Fixed: Featured images distortion in related posts #1684
206
+ * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
207
+ * Fixed: noarchive instead of nofollow in Archive pages #1693
208
+ * Fixed: Internal links of tags are showing “/amp” after changing the end point to “?amp” in design 2 #1752
209
+ * Fixed: line height is added for the logo in Swift design
210
+ * Added: Class for Custom Frontpage #1787
211
+ * Fixed: Recent post enable disable for Swift theme #1784
212
+ * Fixed: Connect Show/Hide AMP option with AMP takeover#1786
213
+ * Fixed: Added sanitizer to footer Widget #1756
214
+
215
+ = 0.9.82.1 (18th February 2018) =
216
+ * Selector code reverted due to it's effect on carousel
217
+
218
+ = 0.9.82 (18th February 2018) =
219
+ * View more details on https://ampforwp.com/0-9-82-released-stability-update-82nd-update/
220
+ * Logo Resizing calculation by Pixels and resizing bug solved.
221
+ * Update Notification in the Admin panel will only appear in the AMP options panel. So it will not annoy you anymore.
222
+ * Glue underline is applying for some reason
223
+ * Fatal error after 0.9.81 fixed
224
+ * Facebook comments loading twice on swift
225
+ * PHP Notice: Undefined variable: post_author_name
226
+ * Pagebuilder fix in version 0.9.81 Compatibility with Yoast and other plugins #1749
227
+ * Home loop modifier option added. Allows you to exclude the categories from the loop or include the Custom Post type in the homepage loop.
228
+ * amphtml Conflict with Instant Article for Facebook resolved
229
+ * /amp folder in the theme is applying changes in plugin, which causing a bug, but it’s been fixed
230
+ * Backward Compatibility for AMP Preview
231
+ * SEO Section Improvements
232
+ * Wrong comments count on AMP pages
233
+ * AMP Allow selector in the The Content. You can add tabs and AMP components directly into the loop.
234
+ * If we turn off the Homepage Support then Blog is turned off as well, solved.
235
+ * Post Pagination have two options like “Number of pages” and Previous & Next.
236
+ * Removed the dot from the one Signal Service worker URL if the subdomain isn’t added (Causes Validation issues.)
237
+ * Extra Space due to empty divs in Design 3
238
+ * Remove alt from a tag in the AMP version caused many validation issues.
239
+
240
+
241
+ = 0.9.81 (15th February 2018) =
242
+ * Edge case fatal error on features.php fixed
243
+ * Admin dashboard messup CSS fix #1731
244
+ * Custom CSS Output added in Swift
245
+
246
+ = 0.9.80 (15th February 2018) =
247
+ * View More details on the [blog post](https://ampforwp.com/introducing-swift/)
248
+ * 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/)
249
+ * Swift: The New Default Theme, which you can select from the design section of the Page builder.
250
+ * A way to create a Child Theme for AMP [read more](https://ampforwp.com/tutorials/article/child-theme-amp/)
251
+ * 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.
252
+ * 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
253
+ * Logo Resizing made easy
254
+ * Typography Options
255
+ * 3 Headers design in swift theme
256
+ * Error while sharing the image on Pinterest #1699
257
+ * Homepage support was not working ( when page support is off ) #1695
258
+ * Custom Permalinks rewrite issue solved #1689
259
+ * Custom post type was appearing two types #1688
260
+ * Theia Post Slider plugin incompatibility with post pagination fixed #1677
261
+ * Link to the categories in loop of Design 3 #1632
262
+ * amphtml was not working when plain permalink selected along with static page as homepage #1614
263
+ * AFS Analytics Integration added #1605
264
+ * Removed the blank spaces from analytics id field to deliver a good UX. #1599
265
+ * ?amp endpoint feature added #1561
266
+ * Ability to remove the excerpt and image from related post #1510
267
+ * Thumbnails on-the-fly generation added for better control over the design.
268
+
269
+ = 0.9.74 (23rd January 2018) =
270
+ * View More details on the [blog post](https://ampforwp.com/0-9-74-released-stability-update-79th-update/)
271
+ * Fixed: Push Notifications button alligned in center #1500
272
+ * Added: Meta robots tag support from Yoast #1563
273
+ * Added: Option to Disable wptexturize/smart-quotes Support #1458
274
+ * Fixed: Changed the label id to avoid conflict with Advanced AMP Ads #1591
275
+ * Fixed: esc_attr causing validation issues with single and double quotes #1616
276
+ * Fixed: Image stretching problem resolved when "Featured Image from the content" was set #1580 #1582
277
+ * Added: Create Template by Custom taxonomy name like product-jeans.php in AMP Theme FrameWork #1594
278
+ * Added: Custom Post type support added in the Core #1612
279
+ * Fixed: custom-amp-content.php cleaned with PHPCS #1497
280
+ * 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)
281
+ * Added: Proper fallback support added if the current active AMP theme is not available #1624
282
+ * Fixed: Resolved debug errors #1622
283
+ * Added: All in One SEO compatibility #1557
284
+ * Fixed: Load AMP Styling only on AMP pages #1441
285
+ * Added: 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber) #1265
286
+ * Fixed: itemprop="url" was adding in non-amp #1626
287
+ * Fixed: SiteOrigin Pagebuilder compatibility with Custom Frontpage #1592 #1593
288
+ * Added: MediaAce lazy load compatibility of Bibmer Theme #1472
289
+ * Fixed: Content Links plugin was causing validation errors #1569
290
+ * Added: Filter added called get_content_from_dom to modify the output in AMP function #1462
291
+ * Added: amp_breadcrumb component added in AMP Theme Framework #1636
292
+ * Fixed: Sidebar Styling and proper sanitizer updated
293
+ * Added: amp_author_meta component added in AMP Theme Framework #1641
294
+ * Fixed: amp_post_pagination component improvement in AMP Theme Framework
295
+ * Added: Ability to add link classes in amp_post_pagination in AMP Theme Framework
296
+ * Fixed: amp_author_meta image code improvement in AMP Theme Framework
297
+
298
+ = 0.9.73 (15th January 2018) =
299
+ * View More details on the [blog post](https://ampforwp.com/0-9-73-released-stability-update-78th-update/)
300
+ * Added: Instagram Sanitizer added to process Instagram Embeds inside the BlockQuotes #1581
301
+ * Added: Option Created to Enable/Disable rel="nofollow" for View Non-AMP link #1572
302
+ * Fixed: Custom AMP Content was not working with Elementor Pagbuilder #1495
303
+ * Fixed: ampforwp_is_front_page() is not working in the newspaper theme #1583
304
+ * Added: Allow people to use multiple Analytics on AMP #1124
305
+ * Fixed: 'https' error with PlayBuzz Embeds #1481
306
+ * Added: Option to show last modified date instead of Published date #1496
307
+ * Fixed: Add proper permission for ampforwptourinstaller page
308
+ * Fixed: Debug warnings #1586 and #1459
309
+ * Fixed: A lot of Security Fixes has been done #1497
310
+ * Fixed: Removed lot of unused code #1497
311
+ * Added: AMP skip for checkout page #1443
312
+ * Added: Show the list of Child pages at the end in Parent Page with on/off #1551
313
+ * Fixed: Properly strip shortcodes fom Structured data description #1512
314
+
315
+ = 0.9.72 (6th January 2018, Happy New Year) =
316
+ * View More details on https://ampforwp.com/0-9-72-released-stability-update-77th-update
317
+ * Related Posts Image stretching in Design 3 AMP theme Framework #1482
318
+ * RTL option must be integrated into AMP theme Framework #1562
319
+ * `DOMDocument::loadHTML():` Attribute itemprop redefined warning fixed #1539
320
+ * Created an option to add Author bio article in Facebook Instant Article #1521
321
+ * Options to add push notification button above and below the content #1571
322
+ * Copy the Content button for Custom Post types #1532
323
+ * Alexa Metrics Compatibility added #1536
324
+ * Logo styling added with amp_logo. So styling can work with AMP Theme Framework. #1520
325
+ * Content parsing login improved, so it will not through any warnings if the content has only 1 paragraph. #1523
326
+ * Debug Warnings removed #1564
327
+ * Caption in the Gallery creating validation errors Fixed. #1549
328
+ * Tables Link color should be as same as the link of the body #1559
329
+ * Separate options for In-Content related posts #1546
330
+ * WebPage Schema Type added in Structured Data options #1558
331
+ * Fatal Error fixed with `mb_detect_encoding()` after enabling the minify option #1494
332
+ * Content blank or fatal errors due to itemscope and itemtype, fixed. #1570
333
+ * Performance improved. Due to `_transient__redux_activation_redirect` transient. #1526
334
+
335
+ = 0.9.71 (1st December 2017) =
336
+ * Design 2 Post Titles issue fixed
337
+ * Instant Articles validation issue fixed.
338
+
339
+ = 0.9.70 (30th November 2017) =
340
+ * View More details on https://ampforwp.com/0-9-70-released-stability-update-76th-update/
341
+ * Image alt tags are empty which caused issues. #1154 (thanks to @liagua)
342
+ * ALT and IMG tags are in one line #1442
343
+ * Updated the permalink for post view in admin area #1318
344
+ * aria-current causing validation issues #1427
345
+ * Aligning Captions in the Bottom in Gallery #1428
346
+ * 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
347
+ * After 0.9.69.1 update – Call to undefined function mb_convert_encoding #1447
348
+ * Featured image options now also reflect the structured data #1430
349
+ * Blur & Stretching issues of Design 3 thumbnails are now fixed. They’re crisp and clear than ever! #1227
350
+ * Related posts are showing on single even when turned off #1434
351
+ * Show Related posts CSS only when it is selected #1356
352
+ * Author image now displays on author pages #1426
353
+ * Category base removal in AMP from url option is only working on the first page #1418
354
+ * Bug fixed: PHP Warning DOMDocument Empty string supplied as input #1449
355
+ * Video support added in Instant Articles #1300
356
+ * Read more tag in Instant articles issue fixed #1415
357
+ * Amp carousel issues fixed #1446 #1456
358
+ * Compatibilty with Envira Gallery Lazy Loading #1432
359
+ * Inline Related Posts in AMP Theme Framework #1457
360
+ * Different number of in-content related post and related posts at the footer #1448
361
+ * FooGallery update broke all the AMP compatibility, but we fixed it from our side so that user’s gallery work perfectly #1424
362
+ * WPBakery Page Builder Conflict solved #1419
363
+ * Goodlife theme Lazy Load compatibility added #1416
364
+ * AMP-Facebook-Like Was found but unused Validation Error fixed. #1463
365
+ * Playbuzz not displaying if added with https: #1466
366
+ * Options Panel labels renamed for better understanding.
367
+
368
+
369
+ = 0.9.69 (20th November 2017) =
370
+ * View More details on https://ampforwp.com/0-9-69-released-stability-update-75th-update/
371
+ * One Signal Push Notifications bug fixed! #1404
372
+ * AMP theme framework Related posts extended so that it can be used as a loop format #1406
373
+ * Facebook like Button improvements #1405
374
+ * Add layout responsive tag to image module in page builder #1373
375
+ * Strip the shortcodes from Structure data area #1389
376
+ * Test HTTP API Call From admin panel by redux #1391
377
+ * Meta description tag in normal site Unicode character is different from AMP site unicode character. #1369
378
+ * Updated the check for ampforwp_is_amp_endpoint this should fix the issue #1372
379
+ * Updated the URL for design 3 so it can work with plain permalink #1318
380
+ * Updated the option Featured Image from The Content #1367
381
+ * 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
382
+ * Date Format under Homepage improvements #1408
383
+ * Warnings due to inline related posts in Homepage #1413
384
+ * Plain Permalinks Support improved. #1318
385
+ * Allow Homepage title of Bread Crumbs feature to be changed from Translation Panel #1414
386
+ * Debug Errors in AMP Theme Framework #1403
387
+ * Unnecessary loading of Merriweather fixed, it will only load in the Design 1.
388
+ * Enter Phone Number is not Appearing when switch to Call now button #1425
389
+ * Need excerpt below the title, above the meta #1399
390
+ * Remove the Separator piple symbol from the footer when “Back to Top link” is off #1417
391
+ * Display Child or subcategories on Category pages. #1385
392
+ * Add Caption in the Gallery Image feature conflicting with Gallery widget #1407
393
+ * Youtube Shortcode embed with &rel=0 support #1378
394
+ * Filter for Excerpt custom text in the AMP options #1411
395
+ * WPML Multilingual CMS plugin flags compatibility #1270
396
+ * Compatibility with Tasty Recipes plugin and other page builders with amp page builder #1431
397
+
398
+
399
+ = 0.9.68 (12th November 2017) =
400
+ * View More details on https://ampforwp.com/0-9-68-released-stability-update-74th-update/
401
+ * ADs are Optimize For Viewability, meaning it will try to load faster than the original AMP AD loading strategy.
402
+ * Content was disappearing issue was resolved #1392
403
+ * Featured Image from The Content option is connected to related post #1339
404
+ * Fix amp-web-push helper iframe configuration URL #1387
405
+ * Facebook Like button added to AMP #1327
406
+ * WPML support for AMP Improvement #1285
407
+ * Debug Errors fixed #1366
408
+ * Setting ad density for Facebook Instant Articles ads #1287
409
+ * Showing the number of comments in Single #1341
410
+ * Styling added to the sitewide ads and made sure that they are in the center. #1343
411
+ * One Signal buttons Translation added #1383
412
+ * Article type added to Structured data #1344 #1354
413
+ * The issue with the amp-carousel when RTL was enabled #1358
414
+ * amp-carousel with images of different sizes #1358
415
+ * 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.
416
+ * Instant Article should have a default value for number of posts, it was causing the memory issue with alot of posts #1390
417
+ * Notice if a post has no author data #1338
418
+ * Added a new redux extension select field in redux framework #1349
419
+ * Issues with galleries as well as gallery captions #1363
420
+ * Added a hook for adding anything in between the loops #1396
421
+ * Hide meta boxes as per the user level types #1340
422
+ * A Switch between the Date formats #1384
423
+ * Fix: Jannah theme lazy load issue #1362
424
+ * Issues with galleries as well as gallery captions #1363
425
+ * Create Dynamic url of amp according to the permalink structure #1318
426
+ * Minor code performance improvement.
427
+ * Archive titles in Design 3 frontend issue
428
+
429
+ = 0.9.67.0 (6th November 2017) =
430
+ * View more details on https://ampforwp.com/one-signal-push-notifications-for-amp/
431
+ * OneSignal Push Notifications integrated #807
432
+ * Vimeo embed support added
433
+ * SoundCloud embed support added
434
+ * Pinterest embed support added
435
+ * PlayBuzz embed support added
436
+ * DailyMotion embed support added
437
+ * Fix: Handle issues with data uri images in CSS #1033
438
+ * Fix attribute when adding AMP Mustache lib #1033
439
+ * Fix: Output CSS for feature image #1033
440
+ * An option added for users who don't want to receive update notifications #1342
441
+ * Structured data nav improvement
442
+ * Sitenavigationelement has been implemented correctly for footer menu. #1345
443
+ * Style sanitization for Menu Items #1359
444
+ * Polylang flags support for menu  #1360
445
+ * Mobile Redirection issues fixed #1173
446
+ * Jetpack fatal error fixed #1355
447
+ * 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.
448
+ * Needs proper CTA Bar's styling. #1361
449
+ * Debug errors on archive pages #1353
450
+ * Preview shall only be loaded on click rather than in background #1331
451
+ * ampforwp_is_home() function code improved
452
+ * making sure scripts and styling is properly adding when sanitizing the sidebar #868
453
+ * All the backend css and js should be versioned, so it's not cached. #1335
454
+
455
+ = 0.9.66.1 (30th October 2017) =
456
+ * Fatal error if has version less than WP 4.8 fixed
457
+ * More Minor Validation errors fixed
458
+ * Odnoklassniki sharing button is not working #1337
459
+
460
+ = 0.9.66.0 (29th October 2017) =
461
+ * View more details on https://ampforwp.com/0-9-66-released-bug-squashing-oct-2017-72nd-update/
462
+ * Design 3 & Design 1 are optimised with 90+ Google PageSpeed Score on Mobile and 95+ in desktop performance #1273
463
+ * Featured Image from the content for blog and homepage #1295
464
+ * Category Module for AMP Page builder added #888
465
+ * 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
466
+ * Twitter Video embed code support added in AMP #1307
467
+ * Video Posting Structured data #1293
468
+ * Navigation menus are now Schema compatible for better Structured data integration #1229
469
+ * Yoast checking conditions for Structured Data Improved #1293
470
+ * Added "back to Top" in design 3 #959
471
+ * 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)
472
+ * AMP not working on password-protected pages #1192
473
+ * Debug errors reported by the user #1284 and few more we found internally
474
+ * Inline Style Sanitizer for Comments to avoid any validation issues #1193
475
+ * Next/Previous links removed from pages #1268 props @Frenchomatic
476
+ * WPML Multilingual CMS plugin flags compatibility added #1270
477
+ * Image sanitizer added for the Sidebar #1270
478
+ * Added AMP Components the correct way. Added amp-gist, amp-social-share. #336
479
+ * amp-video script added - Which decreases the non-critical validation issues #991
480
+ * Arrows in Design 3 pagination #1000
481
+ * Author page links in Single #1282
482
+ * Added previous open state of option panel and show again when search clean #1238
483
+ * Odnoklassniki Social Sharing Support for AMP (with target blank for better bounce rate) #1230
484
+ * GIF or animated images resize problem fixed #1281
485
+ * In Design1, Header Background & Link Color have same option #1249
486
+ * FB Pixel for AMP added #1231
487
+ * Structured Data Type option for AMPed Custom Post types only #1259
488
+ * Attribute ‘readability in the tag ‘div’ removed - this decreases the validation issues #1306
489
+ * AMP Theme Framework Improvements: loop, author, related_post, Add Author support #1311
490
+ * Commentator's Avatar in the comments section #1132
491
+ * Remove 'Welcome to AMP' from Dashboard sub-menu and moved to the options area to decrease the annoyance and increase the user happiness #902
492
+ * 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
493
+ *  View AMP on Admin Bar for the respected page/post If enable. #1236
494
+ * google maps iframe link to larger map #1099
495
+ * Comments now jumping due to the slash at the end #1309
496
+ * Page Builder causes Incompatibility with the Divi theme (We restructured the Text Module for Page builder for better compatibility and UX) #1162
497
+ * Inline Style Sanitizer for Comments added. Less Critical Validation issues and Better Presentation #1193
498
+ * WPML amp-html error fixed #1285
499
+ * Radio button not working for Show View more Button" #1018
500
+ * Added registered handle for tinymcePointer localize data #1301
501
+ * Date in the Design 2 should not be hidden in mobile version #1315
502
+ * Page builder not working on homepage(Selected as front page) #1316
503
+ * 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)
504
+ * Auto flush on save for FBIA to improve the UX.
505
+ * Plain Permalinks Support improved. #1318
506
+ * Tables support added to FB Instant Articles #1266
507
+ * Demo link added in the Theme selector option #1248
508
+ * Remove invalid attributes from multiple tags which reduces critical validation errors and validates pages.
509
+ * AMP makes a problem in archive page label, when it is active in non-amp version #1304
510
+ * placeholder-icon.png is 404 fixed #1310
511
+ * Category & Tags switches for Single added. #1055
512
+ * Copy Content (Custom AMP Editor) Option Not showing with Page Builder of SiteOrigin issue fixed #1280
513
+ * Improving UX with: when AMP support is off for a specific post type then all the AMP related metaboxes should be removed #1289
514
+ * Options Panel Options rearranged, labels rewritten, descriptions repositioned for better User interaction [commit]
515
+
516
+ = 0.9.65.2 (25th October 2017) =
517
+ * TypeWatch is not a function #1299
518
+ * Error with BackupBuddy fixed #1303
519
+
520
+ = 0.9.65.1 (24th October 2017) =
521
+ * AMP Minifcation Issues fixed
522
+
523
+ = 0.9.65 (22nd October 2017) =
524
+ * View more details on https://ampforwp.com/new/
525
+ * Favicon for AMP #1039
526
+ * AMP Minification option added with Performance Tab in Options #1286
527
+ * Post support is turned off then Meta box should also be removed #1253
528
+ * Excerpt Length feature in Design two and Three #1122
529
+ * Test Contact form plugins and their settings in the options panel #1121
530
+ * Mobile preview in Edit Screen #1082
531
+ * Search feature for Options Panel #1238
532
+ * WordPress Social Share Buttons Validation Issues #1272
533
+ * itemtype attribute is striping in the ul tag #1210
534
+ * Debug Error in Breadcrumb 0.9.64 #1267
535
+ * Disable AMP linking at Wordpress Search Page #969
536
+ * Featured Image is missing #1071
537
+ * Removed ampforwp_plugin_activation_notice #1034
538
+ * Add VK (Vkontakte) Sharing Button #1187
539
+ * Grab the first image instead of post thumbnail for featured image #1189
540
+ * AMP theme framework core changes #1274
541
+ * Grab the first image instead of post thumbnail for featured image #1189
542
+ * Create a Switch on Top of Page Builder #1279
543
+ * Inline Related Posts added that helps you with improving bounce rate #1078
544
+ * Caption Support in Image Gallery Carousel #1172 #1136
545
+ * Instant Articles feed shows sticky posts on top #945
546
+ * Added search check, to fix debug notice
547
+ * Option to hide date from Design 1 & Design 3 Homepage Loop #1264
548
+ * UI labels improvements in the Options panel
549
+ * Sorting out design #2 static front page #1175
550
+
551
+ = 0.9.64 (15th October 2017) =
552
+ * View more details on https://ampforwp.com/new/
553
+ * Structured Data Type option added. You can now change the structured data format for Posts, Pages and Custom post types #323
554
+ * When comments plugin activate, Comments section should remove. #1093
555
+ * Notification causes a validation error. #1147
556
+ * CSS !important need sanitization #1225 - This will help us to validate tens of thousands of pages.
557
+ * Strange spaces when using Sassy Social Share #1185
558
+ * Remote CDN use? Let's host it? #549
559
+ * Typo fix for Linkedin Profile Page URL section #905 [Thanks to Prayag @pra85]
560
+ * Replace fastimage with fasterimage for PHP 5.4+ #1191
561
+ * Debug Errors Post 0.9.63 #1219
562
+ * Ad5 code injected twice #1116
563
+ * Homepage Support must be Off when we turn Off Homepage Support. #738
564
+ * Add custom class in post pagination for styling #1100
565
+ * Removed the Lazy Loading issue of Schema Theme #1170
566
+ * H1 tag for archive titles (Commit) #1155
567
+ * Alt tag for the Logo #1155
568
+ * Design 3 Menu RTL issue fixed #1106
569
+ * Ability to add dynamic classes in body tag #1237
570
+ * Warnings fixed on 404 page #1243
571
+ * Properly structured data for Homepage, Custom Frontpage and Blog #1155 #1242
572
+ * Option added to Enable/Disable categories and Tags links from Single #1155
573
+ * Fatal error after 0.9.63 fixed #1220
574
+ * Debug Error due to vendor AMP #1213
575
+ * PHP warning on line 147 after 0.9.63 #1241
576
+
577
+ = 0.9.63 (8th October 2017) =
578
+ * View more details on https://ampforwp.com/new/
579
+ * Category and Tag Base Remover as core features #1079
580
+ * Hide AMP on Posts option added #935
581
+ * Installation Setup Screen Added for new users
582
+ * Validation for the session in PHP #1158. PR by Bryan Contreras @bryan3561
583
+ * All the amp pages should work perfect with Plain Permalink settings #488
584
+ * WYSIWYG TinyMCE editor added for the Text Module in AMP Page Builder #1205
585
+ * WPML Static Front Page Support for title and description with Yoast. #1143
586
+ * Row Settings area added for AMP Page Builder #1148
587
+ * xlink attribute causes Validation Issues #1149
588
+ * Posts with no images on Archive pages are squeezed to 65% #1058
589
+ * Body Class to target specific pages #1123
590
+ * Option to enable/disable Breadcrumb #1129
591
+ * Debug errors due to Breadcrumbs fixed #1109 #1130 #966
592
+ * Visit AMP option added below the View Site in Dashboard. #1076
593
+ * Many Debug errors fixed #1109
594
+ * Textarea for body tag which will help people add AMP Auto Ads #1064
595
+ * Structured data improvements #1048 #1044 #1085 #1118
596
+ * Twitter share URL based on users choice, you can allow people to share pretty links and short links. #1097
597
+ * Author Avatar removed code fixed which has been displayed in the div "amp-wp-meta amp-wp-byline". #1087
598
+ * Only one figure element is allowed in the article header FB Instant Articles #1127 & #1157
599
+ * Image alt tags are empty and cause issues fixed. #1154
600
+ * Button to copy the content into Custom AMP Editor #783
601
+ * Rename AMP loop widget areas or add proper descriptions #1045
602
+ * Trailing slash issue #1095
603
+ * Related Posts by Post type featured added #1141
604
+ * Ultimate Social Media Icons plugin causes validation issues fixed #1135
605
+ * Adding proper path for functions.php, it was causing strange fatal errors and irregular white screen of death fixed  #1144
606
+ * A smooth way to migrate from other AMP plugins to AMPforWP #1051
607
+ * Alert added on AMP by Automattic installation. #1180
608
+ * Insertion of strange spaces around H1 titles #1069
609
+ * AMP Page Builder and HTTPS #1164
610
+ * You can display comments from more than one vendor such as displaying WP & FB Comments #1150
611
+ * Rename AMP loop widget areas or add proper descriptions #1045
612
+ * FrontPage featured image with srcset #1063
613
+ * An option for Showing featured image from custom field #1098
614
+ * Added the Custom Front Page Title From Yoast SEO #1163
615
+ * Commenting breaks SSI directives causes to display error #1179
616
+ * rel canonical appears more than once in search pages #1195
617
+ * Dev mode in AMP #1083
618
+ * Social Sticky Icons Improvements #1061
619
+ * Grand-Child support added in Design #1152
620
+ * amp-accordion non-critical error in Design 3 & CSS improvements fixed #1152
621
+ * Incorrect @id for mainentity #1080
622
+ * Hide AMP by specific Categories tweaked for performance. Thanks to Joshua Eichorn @jeichorn CTO at Page.ly #1133 - Huge Thanks!
623
+ * amp-auto-ads for sites with RTL support ON #1176
624
+ * Redirected the Google forms to our contact page so that we can take each and every query and answer every person. #1201
625
+ * ui-state-highlight class was conflicting with ACF date picker fixed #1199
626
+ * Responsify WP Lazy loading causes blank image (Compatibility) #1131
627
+ * amp-carousel scripts loading on the second page fixed in Design 3
628
+ * Show Design screenshot while selection of design #1209
629
+ * Switches Redesigned for better UX #1211
630
+ * Welcome Page UX Improved #1214
631
+
632
+ = 0.9.62 (25th September 2017) =
633
+ * View more details on https://ampforwp.com/new/
634
+ * INTRODUCING Page Builder 2.0 for AMP! [Learn More & Watch the Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
635
+ * Documentation & Help links improved
636
+ * Post type specific classes for targetting
637
+ * Design name restored in Options panel (It was recently renamed to Appearance)
638
+ * Minor Bug fixes as well
639
+
640
+ = 0.9.61 (10th September 2017) =
641
+ * View more details on https://ampforwp.com/options-restructured/
642
+ * Options Panel Restructured Options were dividing into two parts: Settings and Appearance.
643
+ * AMP Theme Framework Core Support Added. You can now create themes of your own in just minutes.
644
+ * WPML Static Front Page Support #1111
645
+ * Notification message disables when CF7 & gravity form is activated. #1107
646
+ * Space after On in Design 3 #1114
647
+
648
+ = 0.9.60 (4th September 2017) =
649
+ * View more details on https://ampforwp.com/0-9-60-released-improved-redirection-66th-update/
650
+ * Class added to View non-amp anchor tag
651
+ * Params added properly to get rid of a warning #1077
652
+ * rel=attachment noopener generating validation errors #1090
653
+ * Breadcrumbs Support Added #701
654
+ * Enable / Disable button added for Navigation Menu #735
655
+ * Move the ad code for Instant Article down after the article #964
656
+ * Add analytics code of FB instant articles properly #1096
657
+ * datetime Tag not stripping properly #1043
658
+ * Mobile redirection on custom post types #1028 #1052
659
+ * Mobile Redirection causing extra redirect #879 #933
660
+ * Proper mobile redirection on Homepage #1052
661
+ * View non-amp on blog will redirect to blog
662
+ * Blog will redirect to blog irrespective of AMP Homepage option #871
663
+ * Dont redirect if archive support is disabled #1052
664
+ * non-amp category pages should redirect to non-amp pages if turned off from Hide AMP #999
665
+ * Disable amp for forum plugin (wpforo) #592
666
+
667
+ = 0.9.59 (23th August 2017) =
668
+ * Design 3 Images were not aligned properly. Fixed. #1040
669
+ * Caption in the design 3 improved
670
+ * Jetpack File not loading throwing fatal error #1038
671
+ * If the mobile redirection is ON and the category is excluded to display the AMP then it should redirect properly
672
+ * Custom Editor Compatibility issue with SiteOrigin PageBuilder fixed #997
673
+ * Native Twitter Embed support
674
+ * Added a hook after the body tag: ampforwp_body_beginning (commit)
675
+ * GTM in AMP Improved #958
676
+ * WP User Avatar compatibility Added #975
677
+ * Alt tag on frontpage featured image added #1050
678
+ * Blurred Images on the frontpage fixed #1050
679
+ * Need to escape alt tag #1049
680
+ * Debug errors & PHP warnings were fixed #859 #811 #830 #810
681
+ * Proper rel canonicals for inner pages #1047
682
+ * Added Video sanitizer for comments #1053
683
+ * When activating the AMP plugin, display a notification in the popup. #1036
684
+ * Video Sanitizer added for Comments
685
+
686
+ = 0.9.58.1 (9th August 2017) =
687
+ * Jetpack conflict issue solved #1038
688
+ * Genesis SEO Support added #1013
689
+ * Fixed Wrong SEO title issue #1013 and #836
690
+ * Design 3 Carousel script loading method improved #990
691
+
692
+ = 0.9.58 (9th August 2017) =
693
+ * View more details on https://ampforwp.com/new/
694
+ * Genesis SEO for AMP support added
695
+ * AMP 0.4.2 Vendor Bundled for making it crash proof
696
+ * Archive desc only on 1st page #1029
697
+ * Ads are not working after 0.9.6 #1030
698
+ * Fixed the Post 0.9.57 Update Bugs #1025
699
+ * All Images are aligned on left side in design 3 #1031
700
+ * Custom frontpage title issue in Design 3 fixed
701
+
702
+ = 0.9.57 (5th August 2017) =
703
+ * See the Full changelog https://ampforwp.com/0-9-57-released-compatibility-issue-fixed-62nd-update/
704
+
705
+ = 0.9.56 (31st July 2017) =
706
+ * View more details on https://ampforwp.com/page-break-in-amp/
707
+ * Page Break / NextPage (Pagination) Support Added #834 #857 (Improvement)
708
+ * Show/Hide AMP for Categories of Posts or All posts #872 (Improvement)
709
+ * Adding analytics capabilities to Instant Articles #978
710
+ * JetPack Plugin Conflict Solved #971
711
+ * Social sharing code improved. amp-social-share js is getting added for line and WhatsApp social share #981
712
+ * Code improvement for rel canonicals(home and archive)
713
+ * Perfect SEO URL + Yoast SEO Compatibility #982
714
+ * Some styling for tags to show up properly
715
+ * Undefined index notices #960
716
+ * Non-amp category pages should redirect to non-amp pages if turned off from Hiding AMP #999
717
+ * Page builder text and button module issues #972
718
+ * Documentation links updated in the Options panel
719
+
720
+ = 0.9.55 (13th July 2017) =
721
+ * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
722
+ * Disqus Comments show up even when disabled per post #931
723
+ * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
724
+ * H3 inside OL in Related-Posts.php #930
725
+ * Advertisement Options in Instant Articles #943
726
+ * Incompatible with bootstrap plugin #525
727
+ * Error in tag and category links #934
728
+ * Pagebuilder Button module link had issues #951
729
+ * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
730
+ * WPtouch Pro Compatibility Issues #927
731
+ * Better scripts compatibility in Single of post types #757
732
+ * Instant Articles Error: "The HTML element does not contain any text" #949
733
+ * added a filter in all the dates so a user can change the date format and modify #962
734
+ * Design3 Menu Arrows are clickable along with the links #952
735
+
736
+
737
+ = 0.9.54.2 (4th July 2017) =
738
+ * Minor bug post 0.9.54 bug fixed
739
+
740
+ = 0.9.54 (4th July 2017) =
741
+ * View more details on https://ampforwp.com/new/
742
+ * Facebook Instant Articles Support #862
743
+ * Exclude Some Pages from Mobile Redirection #914
744
+ * After 0.9.53 update amp-social-share js missing (critical issue) #924
745
+ * Hooks added in Header (above and below)
746
+ * View non AMP[Code improvement] #928
747
+ * Pages are not supposed to show meta like this, especially Categories #894
748
+ * Monarch plugin having design issues #925
749
+ * Show AMP Hide AMP Check Box Fixes #794
750
+
751
+ = 0.9.53 (19th June 2017) =
752
+ * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
753
+ * Compatibility Issue with Rocket Lazy Load plugin #907
754
+ * Link color issue with UX of Color Pickers in Design 3 #731
755
+ * amp-analytics js appears more than once when Google tag manager is used #885
756
+ * SEO by SQUIRRLY is adding analytics twice #678
757
+ * Fatal error when WPSEO is activated #900
758
+ * Design 3 Sticky header should have an option #625
759
+ * 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
760
+ * Yandex Metrika support in AMP #585
761
+ * Histats Analytics Support #880
762
+ * Chartbeat Analytics Support #882
763
+ * Do not strip Rel from anchor tags #790
764
+ * Design close Resulting Blank Screen in AMP Site #642
765
+ * Logo size is not applying #817
766
+ * AMP Publisher logo guidelines #162
767
+ * Remove amp-social-share extension .js from Custom Frontpage #899
768
+ * Add compatibility with Sassy Social Share #679
769
+ * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
770
+
771
+ = 0.9.51.1 (12th June 2017) =
772
+ * Redirection issue after 0.9.51 Update.
773
+ * Improved compatibility with plugins.
774
+
775
+ = 0.9.51 (8th June 2017) =
776
+ * View more details on https://ampforwp.com/page-builder-released-in-amp/
777
+ * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
778
+ * Comments are not showing properly when words are long #861
779
+ * Remove amp-social-share extension .js from Pages #853
780
+ * The tag ‘amp-sidebar extension .js script’ appears more than once in the document #828
781
+ * Remove Advertisement tab #839
782
+ * Compatibility with Slide-in Plugin by WPMU dev #866
783
+ * Mobile redirection issue with bbpress #867
784
+ * All the data must be properly sanitize in the sidebar #849
785
+ * AMP html should not be added on the second page of comments
786
+ * Author page’s support #456
787
+ * URLs in comments should be clickable(links) #869
788
+ * Featured image should be centered in desktop mode #870
789
+ * Added More Hooks #721 (Documentation on this coming soon!)
790
+ * Page 2 goes to the wrong URL #865
791
+ * Proper Title and meta for homepage and posts #850
792
+ * Gist Support added #608 Just add a shortcode and enjoy Devs (Ex: amp-gist id="b9bb35bc68df68259af94430f012425f )
793
+ * /blog/amp pagination not working #875
794
+ * separate the Text and Date format in design 2 #876
795
+ * Comments show in AMP w/o breaks between paragraphs #873
796
+ * If no featured image below hooks are not working #877
797
+ * Change meta name Viewport and its value #878
798
+ * Bolt icon in option #474
799
+ * Code restructuring and code quality improvements.
800
+ * Create a seperate function for comment code in frontpage.php #682
801
+ * Remove all the duplicate code from frontpage.php of all the designs and use hooks to add the code instead of static code #889
802
+ * Few Debug errors removed.
803
+
804
+ = 0.9.50 (24 May 2017) =
805
+ * View more details on https://ampforwp.com/facebook-comments-in-amp/
806
+ * Design 3 Social Icons issue #832
807
+ * View non AMP leads to /?nonamp=1 #814
808
+ * Youtube shortcode compatibility improved #557
809
+ * welcome.php should be shown only if user is “administrator” #696
810
+ * Facebook comments support added in AMP #825
811
+ * WP Like Button Compatibility #841
812
+ * Custom Taxonomy Support added with Custom Post Type Extension.
813
+ * Front page comments not found as expected #837
814
+ * Fixed xml:lang tag issue #848
815
+ * Sanitize Iframe in the archive description Fixed #845
816
+ * Compatibility with Newspaper Theme by TagDiv #842 and #796
817
+ * Some debug problems (blog page, style.php) #838
818
+ * Featured Image hooks added
819
+ * Twitter is misspelled #854
820
+ * The core concept of the AMP Content builder has been built.
821
+
822
+
823
+ = 0.9.49 (12 May 2017) =
824
+ * View more details on https://ampforwp.com/0-9-49-released-small-important-bugs-fixed-56th-update/
825
+ * Option added to display the excerpt in Single #806
826
+ * Ability to add new invalid tags to filter out from AMP pages #809
827
+ * In frontpage, comment button is pointing to wrong URL #812
828
+ * Call now button and search is overlapping in Design-1 #784
829
+ * Sticky Social Icons should be off if the CTA notification bar is on #788
830
+ * Author bio in Design 1 and 2 #732
831
+ * Styling in Taxonomy description causing validation issues #798
832
+ * Twitter share(handle, url positions fixed) #815
833
+ * Tables responsiveness in ALL Designs #726
834
+ * Output all the categories and tags with their own ID’s in the div classes #750
835
+ * Social Share Icons Overlap with Leave A Comment in Design 3 #716
836
+ * Effective Measure Support on AMP #297
837
+ * Custom AMP editor on pages should only be shown when page support is ON #756
838
+ * AMP on website.com/blog without need of separate installation #775
839
+ * GTranslate Compatible #819
840
+ * Images and amp-anim styling added #725
841
+ * Filter to make the title in a post to a link #727
842
+ * Author Bio and Social Share button must not come in Pages #770
843
+ * StatCounter is now compatible with AMP #361
844
+ * Line Social media support #500
845
+ * Footer menus for Design 1 & Design 2 #623
846
+ * Strip out src=”about:blank” When Gravity Forms used #804
847
+ * Add Compatibility with Crazy Lazy load plugin #751
848
+ * Meta Titles and Description issues fixed with Yoast, All in one SEO and The SEO Framework #813
849
+ * Double quotes in the Excerpt of the meta description is making AMP Invalidated #818
850
+ * Missing featured image on static front page #824
851
+ * Fatal error while activation: see the video 0.9.49 Beta #827
852
+ * Review this code in archive.php in all 3 designs. #826
853
+
854
+
855
+ = 0.9.48 (28 April 2017) =
856
+ * View more details on: https://ampforwp.com/0-9-48-released-step-towards-multilingual-support-55th-update/
857
+ * The default translation method of WordPress added. (Option in Translation panel to switch between * Translation panel and POT file #540)
858
+ * 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.
859
+ * Another Advertisement slot added below the post title in the Single post.
860
+ * Fatal error: require_once report-bugs.php #747 fixed
861
+ * Add / for codes in Meta Description #766 fixed
862
+ * Controls re-adjusted & Renamed title of yoast description control in Options panel
863
+ * Design-3 Slider URL redirecting to non-AMP page #758
864
+ * Added new sanitizer For HTML to AMP-HTML conversion
865
+ * Sanitized Archive descriptions so that it would convert to AMP
866
+ * Comments sanitized with new sanitizer so that HTML tags automatically become AMP compatible.
867
+ * 301 redirects on non-pretty internal links #767
868
+ * Create a filter to modify the value of rel="amphtml" #778
869
+ * Max-width added for images in comments
870
+ * If in WooCommerce ?amp endpoint set then update href.
871
+ * Undefined Variable (Debug) #733 and many other debug issues were fixed
872
+ * Show last updated Post instead of published date #575
873
+ * WooCommerce Widget added to display latest products on homepage. #763
874
+ * add amp_post_template_above_footer hook global in all the designs #779
875
+ * Excerpt on top of the content in Single #665
876
+ * Subscribe box has been improved for the UX needs #712
877
+ * Notice warnings since 0.4.2 update #740
878
+ * AMP Comments Form Integration with the extension
879
+ * Filter added on the loop in Homepage of the Design 3 so that it can be modified with an external plugin.
880
+ * 404 on paged home page #781
881
+ * Twitter handle should be at the end of the tweet not in the beginning #787
882
+ * Wrong Rel Canonical for AMP Custom Frontpage #799
883
+ * 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.
884
+ * Extension page user experienced improved.
885
+ * Removed old Youtube installation video and replaced with new one.
886
+
887
+ = 0.9.47.2 (12 April 2017) =
888
+ * Design-3 Slider URL redirecting to non-AMP page #758
889
+ * Ads showing in comments #768
890
+
891
+ = 0.9.47.1 (11 April 2017) =
892
+ * Meta description option improved in SEO section #766
893
+ * Fatal error: require_once report-bugs.php #747
894
+
895
+ = 0.9.47 (10 April 2017) =
896
+ * View more details at https://ampforwp.com/0-9-47-released-54th-update/
897
+ * Meta saving method updated for customAMP content editor checkbox was causing some conflict.
898
+ * Wrong Yoast title and structured data in Custom Frontpage fixed
899
+ * CSS minification all 3 designs
900
+ * Polylang flags in menu was causing validation issue, is now resolved
901
+ * WPML flags in menu was causing validation issue, is now resolved
902
+ * Standardized function created for content sanitization.
903
+ * Archive description now displays AMP compatible markup
904
+ * Comments markup sanitized for AMP
905
+ * Design 3 images not aligned properly, fixed
906
+ * Images are aligned to center in Design 1.
907
+ * carousel ending with //amp instead of /amp fixed #753
908
+ * Title of the Post along with Post link when shared in twitter #683
909
+ * Ads were cutting in half in RTL, fixed
910
+ * Add / at the end of AMP links with in the AMP pages (Internal links) #668
911
+ * Rendering the wrong URLs in front page if paged #742
912
+ * Option to turn off AMP on all pages, so people can turn on only for specific pages #746
913
+ * Need Meta Description on amp pages #741
914
+ * Woocommerce Loop shortcode updated
915
+ * Call Now Button added in header #563
916
+ * Post images are not centered in Design 3 #695
917
+ * UX of GTM settings done, since users were getting confused #700
918
+ * Front page amphtml fixed for paginated pages
919
+
920
+ = 0.9.45.6 (31 March 2017) =
921
+ * Installation Process from welcome page was not working after WP Plugin DIR API change was fixed.
922
+ * WP Rocket Minifcation and Concatenation was not working, its fixed now.
923
+ * WP Rocket was tested properly to make sure everything is working fine.
924
+
925
+ = 0.9.45.5 (25 March 2017) =
926
+ * WP rocket conflict solved
927
+ * Cannot set property ‘innerHTML’ of null issue fixed
928
+
929
+ = 0.9.45.3 (21 March 2017) =
930
+ * Post 0.9.45 bugs fixed and released as an urgent update.
931
+
932
+ = 0.9.45.1 (19 March 2017) =
933
+ * Post 0.9.45 bugs fixed and released as an urgent update.
934
+
935
+ = 0.9.45 (18 March 2017) =
936
+ * View more details at https://ampforwp.com/0-9-45-released-compatibility-rtl-53rd-update/
937
+ * W3Total cache compatibility added
938
+ * RTL Support added for Right-to-Left language websites.
939
+ * Comments Pagination feature added
940
+ * WP-Rocket Compatibility added
941
+ * WPML Compatibility added
942
+ * Quantcast analytics support added
943
+ * ComScore support added
944
+ * Custom Yoast title support added #685
945
+ * 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]
946
+ * Admin area UX improvements
947
+ * Adding notifications script in the correct way
948
+ * Comments now display on frontpage as well.
949
+ * Re-positioned non-amp Header link control to the right section.
950
+ * ?nonamp=1 only displays when the Mobile redirection is on
951
+ * Properly adding iFrame js.
952
+ * Custom Post type incompatibility fixed
953
+ * Widgets added to the Custom Frontpage.
954
+ * Stripping shortcodes from excerpts.
955
+ * Custom content on static frontpage had over riding issue #687
956
+ * Option added for controlling number of comments
957
+ * Welcome page should be shown only if user is “administrator” #696
958
+ * Digg Digg social share compatibility #694
959
+ * Removed unnecessary lines from Design 3
960
+ * Sanitized Archive Description to amp Compatible #659
961
+ * Author box now displays HTML properly #645
962
+ * Date added Design-3 in meta #583
963
+ * Options link was removed from wp-admin tool bar after a feedback from a user.
964
+ * Footer sub menus layout compatibility.
965
+
966
+
967
+ = 0.9.44 (5 March 2017) =
968
+ * View more details at https://ampforwp.com/user-experience-52nd-update/
969
+ * Added Welcome Screen for better User experience. [Enhancement]
970
+ * Undefined Index debug error resolved [Bug fix]
971
+ * All in one SEO Support support tested [3rd party compatibility]
972
+ * Frontpage title in Design 3 is out of the container #644 [Bug fix]
973
+ * Default Table markup in AMP #643 [Enhancement]
974
+ * AMP carousel is not working on Frontpage #641 [Bug fix]
975
+ * Social share .js was getting added even when it was not required #638 [Bug fix]
976
+ * Search Feature added for Design 1 & Design 2 [Major Improvement]
977
+ * Accordion script loading issue in Design 3 #634 [Bug fix]
978
+ * ?nonamp=1 links should be nofollow #622 [Bug fix]
979
+ * Same Header and Color Scheme are making header elements invisible #629 [Enhancement]
980
+ * In Search AMP rel canonical was different #631 [Bug fix]
981
+ * Non-AMP link in Design 3 was not working when mobile redirection was enabled #632 [Bug fix]
982
+ * Search form text strings are now added in the translation panel #607 [Bug fix]
983
+ * Load AMP-ads conditionally only if ads are available #609 [Bug fix]
984
+ * Added compatibility with Custom post type extension. Option to hide/show AMP on all custom post types #587 [Bug fix]
985
+ * Report a Bug & Request feature links added [Enhancement]
986
+ * If there was no menu set in Design 3 then all pages were getting displayed. #613 [Bug fix]
987
+ * The tag Font is disallowed #616 [Validation Improved]
988
+ * index/noindex separately added for Tags and also for Categories #606 [Enhancement]
989
+ * Use of undefined constant AMP_QUERY_VAR #596 [Bug fixed]
990
+ * Logo is not centered in Design 3 #586 [Bug fixed]
991
+ * Remove defer, a very rare type of defer was getting added #589 [Validation Improved]
992
+ * Disqus comments iframe had scrolling issues #566 [Bug fixed]
993
+ * Left side blank gap in the RTL in design 2 #541 [Bug fixed]
994
+ * Inline Styles not working correctly in Custom AMP Editor #533 [Bug fixed]
995
+ * Re-save permalinks issues. Flushing rewrites with options saved. #511 [Improvement]
996
+ * Code review and cleaning of the customizer #404 [Code Cleaning]
997
+ * Google Search iframe had some header alignment issues in Design 3. #624 - Thank you Leo Osa @leoosa for the contribution! [Bug fixed]
998
+ * AMP Frontpage + Override AMP Content = Blank page #604 [Bug fixed]
999
+ * 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]
1000
+ * 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]
1001
+ Reformatting and Minifying of stylesheet [Code Cleaning]
1002
+ * Created a new section for Homepage and moved some controls from other areas to the home section for the better user experience. [User Experience]
1003
+ * Override Homepage Thumbnail size option added. It will give you more control over your thumbnails. [Major Improvement]
1004
+ * 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]
1005
+ * Extra amp-carousel script loading is now fixed. [Bug fixed]
1006
+ * Crafting of layout code in design 2 and design 3, especially with social icons area. [Code Cleaning]
1007
+ * Design of search form was not clickable in iOS devices #621 [Bug fixed]
1008
+ * 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]
1009
+
1010
+ = 0.9.43.6 =
1011
+ * View more details at https://ampforwp.com/stability-sprint-3-51st-update/
1012
+ * Typo in the is_home() function fixed
1013
+ * Option to hide/show AMP on all custom post types #587
1014
+ * False detection by Windows defender tool fixed
1015
+ * Conditional tags were not compatible with Advanced AMP ads which were causing some conflicts but is now fixed.
1016
+
1017
+ = 0.9.43.5 =
1018
+ * View more details at https://ampforwp.com/stability-sprint-2-50th-update/
1019
+ * Fixed shortcodes issue in related posts #543
1020
+ * Iframe Scripts Added properly
1021
+ * Proper conditions added for the social section of Design 3
1022
+ * Featured Image issue stretched in Design 2 & 3
1023
+ * Removed extra global $redux_builder_amp;
1024
+ * Custom Logo Dimensions option added #479
1025
+ * Index & NoIndex options added for SEO section. #558
1026
+ * Added URL for rewrite flushing rules in Options
1027
+ * Option to enable and disable the Author area in Design 3#577
1028
+ * Rel Nofollow added in credit link
1029
+ * debug issue solved: fn_offset not defined
1030
+ * debug issue solved: global $post not declared
1031
+ * The word 'ago' is now translatable in design 3
1032
+ * The word 'read next' is translatable now
1033
+ * Tablepress compatibility added #392
1034
+ * Secure API server is now serving through Google Cloud Manager.
1035
+ * Thrive Content builder was displaying twice when the Custom AMP content was on. It was a complex issue which has been solved now.
1036
+ * amp-ad extension.js script was loading if the Ads are not enabled. #598
1037
+ * Social Share Extension Included on Homepage even if we didn't have social icons #599
1038
+ * Installation UX improvement #593
1039
+ * Removed duplicate global variable
1040
+ * Proper OG tags added #588
1041
+ * Proper instructions added for Custom AMP content #471
1042
+
1043
+
1044
+ = 0.9.43.1 =
1045
+ * View more details at https://ampforwp.com/0-9-43-1-released-stability-sprint-1-49th-update/
1046
+ * Emoji in comments leads to AMP errors
1047
+ * Design 1 showing time on archives
1048
+ * Added some space between the archive label.
1049
+ * Lazy loading plugins compatibility #544
1050
+ * Custom header and footer areas
1051
+ * Sticky posts now come on top #564
1052
+ * Footer non-amplink added in design 3 #562
1053
+ * HTML Paragraph tag is shown in the title in category! #518
1054
+
1055
+ = 0.9.42 =
1056
+ * View more details at https://ampforwp.com/design-three-update/
1057
+ * 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]
1058
+ * Ticket #517 Added Upload field into Redux core [3rd party Compatiblity]
1059
+ * Ticket#529 Controls for archive titles added [Improvement]
1060
+ * Ticket #548 Jetpack photon code removed
1061
+
1062
+ = 0.9.41 =
1063
+ * View more details at https://ampforwp.com/disqus-comments-in-amp/
1064
+ * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
1065
+ * AMP WooCommerce supported tag was missing after the last update. [Bug fix]
1066
+ * Homepage & Related Posts was displaying private and protected posts, which is now fixed [Bug fix]
1067
+ * Next previous links added in Design 1 [Enhancement]
1068
+ * Invalid Post Time displaying in the homepage of Design 1 [Bug fix]
1069
+ * Twitter share now includes the twitter handle of the author with setting in options [Enhancement]
1070
+ * Emoji in comments leads to AMP errors was fixed [Bug fix]
1071
+ * Date are now displayed on archives in Design 1 [Enhancement]
1072
+ * When RTL enabled logo merges with nav bar was fixed [Bug fix]
1073
+ * Jetpack Photon compatibility added [3rd Party Compatibility]
1074
+
1075
+ = 0.9.40 =
1076
+ * View more details at https://ampforwp.com/0-9-40-released-biggest-stability-update/
1077
+ * Proper endpoints added [Improvement]
1078
+ * Flush Rewrites properly [Improvement]
1079
+ * REL Canonical properly getting added. [Improvement]
1080
+ * Proper Frontpage Canonical added [Improvement]
1081
+ * Added Base name support for categories and tags [Improvement]
1082
+ * Redirection of excluded post solved. [Bug fix]
1083
+ * Archives properly redirecting to the right URL [Bug fix]
1084
+ * Homepage redirection solved [Bug fix]
1085
+ * Plusone tag is stripped properly. [Validation Issue fixed]
1086
+ * Archives are now clickable. [Improvements]
1087
+ * WP_Query filter added for better customizability of Homepage loop. [Better Customizations]
1088
+ * Social share boost plugin compatibility. [3rd party Customizations]
1089
+ * Removed H1 from the frontpage even if it is not available. [Improvement]
1090
+ * H3 instead of H1 for Site title. So there is only one H1 per page. [SEO Improvement]
1091
+
1092
+ = 0.9.38 =
1093
+ * View full details at https://ampforwp.com/google-tag-manager-for-amp/
1094
+ * Google Tag manager included [New feature]
1095
+ * Iframe max-width added [Improvement]
1096
+ * Paginated pages have different titles now. [Bug fix]
1097
+
1098
+ = 0.9.37 =
1099
+ * View full details at https://ampforwp.com/category-tags-archive-support-added/
1100
+ * Debug issues solved [Bug fix]
1101
+ * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
1102
+ * Category, Tags & Archive Support with titles added [Enchancement]
1103
+ * Archive Title support added [Enchancement]
1104
+ * There were some issues with attachments [Bug fix]
1105
+ * removed ? from amp url's [Improvement]
1106
+ * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
1107
+ * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
1108
+ * Added an option to turn off AMP support for Homepage. [Enchancement]
1109
+ * Too many redirects issue on homepage is fixed #435 [Improvement]
1110
+ * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
1111
+ * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
1112
+ * Comment anchor link changed for simplecomment button files in both designs [Improvement]
1113
+ * Redirection Loop issue fixed [Bug fix]
1114
+ * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
1115
+ * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
1116
+ * Improved Sessions [Improvement]
1117
+ * Advnaced Settings panel was created for better user experience. [Improvement]
1118
+ * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
1119
+ * RTL issue fixed #454 [Bug fixed]
1120
+
1121
+ = 0.9.36 =
1122
+ * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
1123
+ * 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]
1124
+ * Hide advertisement section if advance ads plugin is active. [Better User experience]
1125
+ * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
1126
+ * 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]
1127
+
1128
+ = 0.9.35 =
1129
+ * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
1130
+ * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
1131
+ * Attachment page was having the wrong endpoint. [Bug fix]
1132
+ * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
1133
+ * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
1134
+ * Lang attributes were added [Enhancement]
1135
+ * The tag like was disallowed in the AMP [Validation Improvement]
1136
+ * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
1137
+ * AMP on Pages option was not working in some cases. [Bug fix]
1138
+ * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
1139
+ * g:plusone tag was not getting removed properly. [Validation Improvement]
1140
+ * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
1141
+ * Structured Data Image width issue solved [Enhancement]
1142
+ * 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]
1143
+ * imageanchor=”1″ was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
1144
+
1145
+ = 0.9.34 =
1146
+ * Newspaper theme by Tagdiv was having issues, we have fixed this one.
1147
+
1148
+ = 0.9.33 [15th Jan 2017] =
1149
+ * Full details at https://ampforwp.com/debug-errors-shortcodes/
1150
+ * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
1151
+ * Debug errors fixed, Code is now much cleaner.
1152
+ * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
1153
+ * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
1154
+ * Properly removes AMP if turned off from Post panel
1155
+ * z-index position improved on Sticky Social bar
1156
+ * Better compatibility with shortcodes.
1157
+ * Divi Standard Layouts Compatibility
1158
+ * Properly Hide AMP posts if excluded. #367
1159
+ * Mobile redirection was causing loop issues which are now fixed.
1160
+ * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
1161
+ * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
1162
+ * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
1163
+ * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
1164
+
1165
+ = 0.9.32 [7th Jan 2017] =
1166
+ * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
1167
+ * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
1168
+ * Paginated pages on homepage redirect to homepage URL #335
1169
+ * Title of the page should be displayed on the FrontPage #358
1170
+ * Thrive Builder AMP Validation Compatibility, so it will be validated properly in AMP.
1171
+ * Twitter Sharing improved so it gets the data properly #341
1172
+ * Option to change the number of Related Posts #290
1173
+ * Validation errors due to rel="canonical" was missing on some pages
1174
+ * Comment button displays even if the comments are not available
1175
+ * Threaded comments were duplicating, so that issue is solved and added proper CSS for it.
1176
+ * Minor issue with Jetpack Comments fixed.
1177
+ * Missing amp-social-share.js on front page fixed #372
1178
+ * Minor improvements to Title and description tags.
1179
+ * Analytics Script was loading twice when Glue was active.
1180
+ * Page specific class added for better customization compatibility #377
1181
+ * Inline Style support added Fixed #356
1182
+ * Bugs fixed in Email notification pointer
1183
+
1184
+ = 0.9.31 [2nd Jan 2017] =
1185
+ * Proper Details at https://ampforwp.com/amp-0-9-31-released-installation-user-experience/
1186
+ * Proper Condition added for the scripts to load in Frontpage.php
1187
+ * Rel canonical properly added for front pages
1188
+ * 404 and Archive page Mobile redirection code refined
1189
+ * User Experience Improvement: Installation process was improved
1190
+
1191
+ = 0.9.3 [31th December 2016] =
1192
+ * Proper Details at https://ampforwp.com/custom-amp-content-editor/
1193
+ * 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.
1194
+ * FrontPage had some validation issues. [Bug fix]
1195
+ * Related posts in Design 1 we're redirecting to 404 fixed [Bug fix]
1196
+
1197
+ = 0.9.2.2 [27th December 2016] =
1198
+ * Proper Details at https://ampforwp.com/polishing-user-experience-improvements/
1199
+ * Made the Options panel user-friendly
1200
+ * Social Share on frontpage issue fixed.
1201
+ * Readme.txt made user-friendly.
1202
+ * Archive option removed and some UI improvements
1203
+ * Single was not displaying the Title
1204
+ * 'Type is not allowed' [Validation issue fixed]
1205
+ * noshade tag Validation issue fixed
1206
+
1207
+ = 0.9.2.1 [24th December 2016] =
1208
+ * Proper Details at https://ampforwp.com/step-towards-fixing-amp-validation-errors/
1209
+ * Disabled the Tags and Categories support for AMP for better validation until we find a better solution.
1210
+ * Mobile redirection bug fixed, It was continuously redirecting to the same page [Bug fix]
1211
+ * trailingslashit added to make sure we have proper url for Mobile redirection [Bug fix]
1212
+ * In content AD overlapping the content issue fixed
1213
+
1214
+ = 0.9.2 [23th December 2016] =
1215
+ * Proper Details at https://ampforwp.com/mobile-redirection/
1216
+ * AMP Mobile Redirection Feature added. It can be turned on from Dashboard > General and then Mobile Redirection. [New Feature]
1217
+ * Archive title and description added [Improvement]
1218
+ * Improved the Speed of the AMP version #321 [Improvement]
1219
+ * Anchor link was not closing fixed #328 [Bug Fix]
1220
+ * Typo in Trailingslashit function which resulted in some issues in the Homepage version [Bug Fix]
1221
+
1222
+ = 0.9.1.2 [20th December 2016] =
1223
+ * Proper Details at http://ampforwp.com/new/
1224
+ * DoubleClick Support
1225
+ * Custom Post Type Support
1226
+ * Ratings Support
1227
+ * Comments Gaping fix
1228
+ * Custom Excerpt code
1229
+ * Better Compatibility with Yoast SEO plugin
1230
+ * AMP Validation error in Design 1 Fixed
1231
+ * Proper Homepage title & Description with Yoast SEO plugin issue fixed
1232
+ * Design -1 Excerpt too big for mobile devices, Fixed
1233
+ * Advertisement support on Design 1
1234
+ * Link to Tags & Categories were having some issues.
1235
+ * AMP looking bad on big devices
1236
+ * AMP validation Improvement: Lightbox plugins compatibility
1237
+ * Huge Progress in AMP Validation Errors: Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
1238
+ * Page Performance: Removed default Google font loading
1239
+ * Page Performance: DNS Prefetch tag added for faster DNS Handshake
1240
+
1241
+ = 0.9.1 [16th December 2016] =
1242
+ * Proper Details at http://ampforwp.com/new/
1243
+ * PHP7 Compatibility
1244
+ * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
1245
+ * Custom CSS not working in Design one (#249)
1246
+ * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
1247
+ * How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
1248
+ * Non-amp Homepage support added (#267)
1249
+ * using get_avatar() (#259)
1250
+ * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
1251
+ * Validation Issue fixed: Script Tag removed from the content.
1252
+ * Featured image in Design 1 in single #261
1253
+ * After Fresh installation - a save is required Fixed
1254
+ * Excerpt length controlled
1255
+ * Design One has thumbnails on the Homepage
1256
+ * Non-AMP link goes to the wrong page, issue fixed.
1257
+ * Archive pages were broken, fixed.
1258
+ * Option to Enable & Disable the Next/Previous links in Single
1259
+ * WhatsApp sharing not working, issue fixed.
1260
+ * Category Taxonomy has extra ':' in the word.
1261
+ * The word 'Ago' is now translatable.
1262
+ * Yoast SEO with AMP compatibility issue fixed.
1263
+ * Several Minor Polishing in the code
1264
+ * Footer Ad gets covered by Sticky Social Icons (#269)
1265
+ * Smaller image size when “image caption” is used in Design-2 (#263)
1266
+ * Footer ad with Sticky Social bar issue fix
1267
+ * Checked with WordPress 4.7
1268
+ * Ad #1 was messing up with the title, issue fixed.
1269
+ * Compatibility improved with AMP WooCommerce.
1270
+
1271
+ = 0.9 =
1272
+ * Proper Details at http://ampforwp.com/amp-pagebuilder/
1273
+ * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
1274
+ * 100% Yoast Compatible , Now no need to have additionally Glue Installed
1275
+ * 100% completed Translation panel, Now absolutely anything on page is translated
1276
+ * Added Option to turn on/off Page Support
1277
+ * Styling for Tags was Corrected
1278
+ * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
1279
+ * Default Image alignment styling added
1280
+ * Added Option to turn on/off Page Support
1281
+ * Related Posts Now use Custom Excerpt if it Exists
1282
+ * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
1283
+ * <pre> Tag styling issue fixed for AMP pages
1284
+ * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
1285
+ * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
1286
+ * 2 New Designs added
1287
+ * SEO Panel Added
1288
+
1289
+ = 0.8.8 =
1290
+ * Proper Details at http://ampforwp.com/amp-0-8-8-released-translation-panel/
1291
+ * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
1292
+ * Badge Tag was throwing Validation error
1293
+ * Plusone tag validation error was fixed
1294
+ * Time tag was validation error was fixed
1295
+ * User experience for Mobile devices was improved
1296
+ * Meta info was messing up in smaller devices, it was fixed as well.
1297
+ * Internal AMP linking added for Categories and Tags
1298
+ * Future errors for AMP ads was fixed
1299
+ * Blockquote styling added
1300
+ * “Please Activate parent Plugin settings” added for better User Experience.
1301
+ * Related Post Ux improvement
1302
+ * Plugin version added in Footer source code for better debugging
1303
+ * Added Support for Default WordPress Image alignment
1304
+ * New action hooks added in index page
1305
+ * Featured Image Size options added
1306
+
1307
+ = 0.8.7 =
1308
+ * Proper Details at http://ampforwp.com/amp-0-8-7/
1309
+ * added option to enable/disable AMP on Archive pages (Ticket #188)
1310
+ * Solved 404 on Related Posts (Ticket #178 )
1311
+ * Related posts by either categories or Tags(Ticket #179)
1312
+ * added a link to menu Section from the AMP Options page(Ticket #190)
1313
+ * Added Support for Piwik Analytics(Ticket #163)
1314
+ * Added Support for Segment.com Analytics(Ticket #50)
1315
+ * Added a switch for hiding Non-Amp page link from Footer.( Ticket #189)
1316
+ * Added an Option that strips Users URL from Comments Section(Ticket #180)
1317
+ * Fixed stripping <date> tags from the content , Since it was preventing validation – amp-img issues fixed
1318
+ * UX Improved for every section of AMP Options page
1319
+ * Added Settings button on plugin page
1320
+ * Related posts switch added
1321
+ * Removed carousel.js
1322
+
1323
+
1324
+ = 0.8.6.1 =
1325
+ * Date Tag fix
1326
+ * Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
1327
+
1328
+ = 0.8.6 =
1329
+ * Proper Details at http://ampforwp.com/amp-0-8-6-released-related-posts-comments/
1330
+ * Related Posts
1331
+ * Post Comments
1332
+ * WhatsApp sharing button Your visitors can now easily share the content over the whatsapp.
1333
+ * Validation issue fixed by All In One Schema.org Rich Snippets plugin
1334
+ * Removed Google Fonts loading for Performance
1335
+ * New relic Support
1336
+ * Class added to ‘View Non-AMP Version’ text
1337
+ * Archives Structured Data issue fixed
1338
+ * Some instances img tags converted into amp-img automatically.
1339
+
1340
+
1341
+ = 0.8.5.3 =
1342
+ * Canonical issue fixed for Post
1343
+
1344
+ = 0.8.5.2 =
1345
+ * Canonical issue fixed for FrontPage
1346
+
1347
+ = 0.8.5.1 =
1348
+ * Proper Details at http://ampforwp.com/new/
1349
+ * Validation issue fixed: 'Value' tag
1350
+ * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
1351
+ * Validation issue fixed: Table markup
1352
+ * Validation issue fixed: nowrap and misc tags
1353
+ * New Relic Support
1354
+ * Tags on off option
1355
+ * Canonical and correct AMP html Redirect issues Solved
1356
+ * NextGEN Gallery Validation Support Added
1357
+
1358
+ = 0.8.5 =
1359
+ * Proper Details at http://ampforwp.com/the-0-4-compatibility/
1360
+ * AMP 0.4 Compatibility Check
1361
+ * Even better Structured Data Validation, Once in for all!
1362
+ * Structured Data Options to eliminate Validation errors
1363
+ * AMP Page Exclude option
1364
+
1365
+ = 0.8.4 =
1366
+ * Proper Details at http://ampforwp.com/blog/structured-data-validation/
1367
+ * Structured Data Validation
1368
+ * Navigation Text Change
1369
+ * Inline Style Validation
1370
+ * Form Validation
1371
+ * Frontpage shows the amphtml rel twice fixed
1372
+ * Facebook Sharing not working
1373
+
1374
+ = 0.8.3 =
1375
+ * Prefix added in the Content filter
1376
+ * Extra space after quote in Ads
1377
+
1378
+ = 0.8.2 =
1379
+ * Proper Details at http://ampforwp.com/blog/the-custom-frontpage/
1380
+ * Custom AMP FrontPage
1381
+ * Featured Image
1382
+ * New Mobile Friendly Advertisement sizes
1383
+ * Single Post Pagination Option
1384
+ * RTL Support
1385
+ * Notifications
1386
+ * Gaping if the Meta was turned off.
1387
+ * Analytics was not fetching the user id properly.
1388
+ * Page was not using the post template along with the AD support.
1389
+ * AMP Endpoint support for Paged when the front page is active.
1390
+ * UI improvement of Admin panel
1391
+ * Few Validation issues fixed
1392
+
1393
+ = 0.8.1 =
1394
+ * Warning: Cannot modify header information error fixed
1395
+ * Validation issue fixed. KK Star Plugin compatible.
1396
+ * Gaping in the smaller screens fixed
1397
+
1398
+ = 0.8 =
1399
+ * Proper Details at http://ampforwp.com/blog/the-change/
1400
+ * 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.
1401
+ * 99.5% Validation issues were fixed.
1402
+ * Page builder & Shortcodes Compatibility Support Added
1403
+ * Conflict with JSON API
1404
+ * Carousel support for Gallery
1405
+ * Better Image stretching and resizing
1406
+ * Youtube Video Embed Support
1407
+ * Vine Embed Support
1408
+ * Twitter oembed Support
1409
+ * Instagram Embed Support
1410
+ * Facebook Video Embed Support
1411
+ * Better Future Compatibility
1412
+
1413
+ = 0.7.7 =
1414
+ * Proper Details at http://ampforwp.com/blog/amp-0-7-7/
1415
+ * Big Validation Error fix Update
1416
+ * Disable AMP support on specific Pages and Posts
1417
+ * Option to disable the Post meta from the Single
1418
+ * Footer Credits and Copyright Text Option
1419
+ * New options for Social Sharing Bar in Single
1420
+ * Jetpack Social & Related Sharing Issue fixed
1421
+ * Gaping in footer if the Sticky bar is enabled
1422
+ * Text domain added on few strings
1423
+
1424
+ = 0.7.6 =
1425
+ * Google Adsense Support Added with AMP-Ad
1426
+ * Wrong Homepage rel amphtml bug fixed
1427
+
1428
+ = 0.7.5 =
1429
+ * Google Analytics Support Added
1430
+ * Logo Support Added. If the logo is disabled, then the Title should be activated.
1431
+ * Color Scheme Feature Added
1432
+ * User friendly Options Panel Added
1433
+ * iFrame support Added
1434
+ * Few Minor Bugs Fixed
1435
+
1436
+ = 0.7.1 =
1437
+ * Bug #24 (Github) fixed
1438
+ * Strip Style tags for faster & better validation
1439
+ * Bug #21 (Github) fixed
1440
+
1441
+ = 0.7 =
1442
+ * Canonical Improved
1443
+ * Navigation Validation bug fixed
1444
+ * Two more validation bugs fixed ('role' and 'tabindex' attribute)
1445
+ * Featured image automatically hides if it is not present
1446
+ * Validation issues in the images of the post's the_content
1447
+
1448
+ = 0.6 =
1449
+ * Improved Navigation Menu
1450
+ * Search Console errors fixed
1451
+ * Social Sharing option
1452
+ * Pages support
1453
+ * Force redirection for mobile users removed and many other bug fixes
1454
+
1455
+ = 0.5 =
1456
+ * Added AMP Markup for Google Structured data. This will fix the issues in Webmaster tools.
1457
+
1458
+ = 0.4 =
1459
+ * Support of Custom menu added for AMP enabled sites
1460
+
1461
+ = 0.3 =
1462
+ * Support of amp-img added in single posts
1463
+ * minor css bug fixed
1464
+
1465
+ = 0.2.5 =
1466
+ * Minor bugs fixed
1467
+ * ?mobile & ?nomobile is now ?amp & ?noamp
1468
+
1469
+ = 0.2 =
1470
+ * White Screen of death issue fixed
1471
+ * Plugin URI updated
1472
+
1473
+ = 0.1 =
1474
+ * Initial version
accelerated-moblie-pages.php CHANGED
@@ -1,528 +1,528 @@
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.82.1
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
- */
13
-
14
- // Exit if accessed directly.
15
- if ( ! defined( 'ABSPATH' ) ) exit;
16
-
17
- define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
18
- define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
19
- define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
20
- define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
21
- define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
22
- define('AMPFORWP_VERSION','0.9.82.1');
23
-
24
- // any changes to AMP_QUERY_VAR should be refelected here
25
- function ampforwp_generate_endpoint(){
26
- $ampforwp_slug = '';
27
- $get_permalink_structure = '';
28
-
29
- $ampforwp_slug = "amp";
30
-
31
- return $ampforwp_slug;
32
- }
33
-
34
- define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', ampforwp_generate_endpoint() ) );
35
-
36
- load_plugin_textdomain( 'accelerated-mobile-pages', false, trailingslashit(AMPFORWP_PLUGIN_DIR) . 'languages' );
37
-
38
- // Rewrite the Endpoints after the plugin is activate, as priority is set to 11
39
- function ampforwp_add_custom_post_support() {
40
- global $redux_builder_amp;
41
- add_rewrite_endpoint( AMPFORWP_AMP_QUERY_VAR, EP_PAGES | EP_PERMALINK | EP_AUTHORS | EP_ALL_ARCHIVES | EP_ROOT );
42
- // Pages
43
- if ( isset($redux_builder_amp['amp-on-off-for-all-pages']) && $redux_builder_amp['amp-on-off-for-all-pages'] ) {
44
- add_post_type_support( 'page', AMPFORWP_AMP_QUERY_VAR );
45
- }
46
- // Custom Post Types
47
- if ( isset($redux_builder_amp['ampforwp-custom-type'] ) && $redux_builder_amp['ampforwp-custom-type'] ) {
48
- foreach ( $redux_builder_amp['ampforwp-custom-type'] as $custom_post ) {
49
- add_post_type_support( $custom_post, AMP_QUERY_VAR );
50
- }
51
- }
52
- }
53
- add_action( 'init', 'ampforwp_add_custom_post_support',11);
54
-
55
- // Frontpage and Blog page check from reading settings.
56
- function ampforwp_name_blog_page() {
57
- if ( ! $page_for_posts = get_option('page_for_posts')) return;
58
- $page_for_posts = get_option( 'page_for_posts' );
59
- $post = get_post($page_for_posts);
60
- if ( $post ) {
61
- $slug = $post->post_name;
62
- return $slug;
63
- }
64
- }
65
- function ampforwp_custom_post_page() {
66
- $front_page_type = get_option( 'show_on_front' );
67
- if ( $front_page_type ) {
68
- return $front_page_type;
69
- }
70
- }
71
-
72
- function ampforwp_get_the_page_id_blog_page(){
73
- $page = "";
74
- $output = "";
75
- if ( ampforwp_name_blog_page() ) {
76
- $page = get_page_by_path( ampforwp_name_blog_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;
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/page/([0-9]{1,})/?$',
95
- 'index.php?amp&paged=$matches[1]',
96
- 'top'
97
- );
98
- // For /Blog page with Pagination
99
- add_rewrite_rule(
100
- ampforwp_name_blog_page(). '/amp/page/([0-9]{1,})/?$',
101
- 'index.php?amp&paged=$matches[1]&page_id=' .ampforwp_get_the_page_id_blog_page(),
102
- 'top'
103
- );
104
-
105
- // For Author pages
106
- add_rewrite_rule(
107
- 'author\/([^/]+)\/amp\/?$',
108
- 'index.php?amp&author_name=$matches[1]',
109
- 'top'
110
- );
111
-
112
- add_rewrite_rule(
113
- 'author\/([^/]+)\/amp\/page\/?([0-9]{1,})\/?$',
114
- 'index.php?amp=1&author_name=$matches[1]&paged=$matches[2]',
115
- 'top'
116
- );
117
-
118
- // For category pages
119
- $rewrite_category = get_option('category_base');
120
- if ( ! empty($rewrite_category) ) {
121
- $rewrite_category = get_option('category_base');
122
- } else {
123
- $rewrite_category = 'category';
124
- }
125
-
126
- add_rewrite_rule(
127
- $rewrite_category.'\/(.+?)\/amp/?$',
128
- 'index.php?amp&category_name=$matches[1]',
129
- 'top'
130
- );
131
- // For category pages with Pagination
132
- add_rewrite_rule(
133
- $rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
134
- 'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
135
- 'top'
136
- );
137
-
138
- // For category pages with Pagination (Custom Permalink Structure)
139
- $permalink_structure = get_option('permalink_structure');
140
- $permalink_structure = preg_replace('/(%.*%)/', '', $permalink_structure);
141
- $permalink_structure = preg_replace('/\//', '', $permalink_structure);
142
- if ( $permalink_structure ) {
143
- add_rewrite_rule(
144
- $permalink_structure.'\/'.$rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
145
- 'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
146
- 'top'
147
- );
148
- }
149
-
150
- // For tag pages
151
- $rewrite_tag = get_option('tag_base');
152
- if ( ! empty($rewrite_tag) ) {
153
- $rewrite_tag = get_option('tag_base');
154
- } else {
155
- $rewrite_tag = 'tag';
156
- }
157
- add_rewrite_rule(
158
- $rewrite_tag.'\/(.+?)\/amp/?$',
159
- 'index.php?amp&tag=$matches[1]',
160
- 'top'
161
- );
162
- // For tag pages with Pagination
163
- add_rewrite_rule(
164
- $rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
165
- 'index.php?amp&tag=$matches[1]&paged=$matches[2]',
166
- 'top'
167
- );
168
- // For tag pages with Pagination (Custom Permalink Structure)
169
- if ( $permalink_structure ) {
170
- add_rewrite_rule(
171
- $permalink_structure.'\/'.$rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
172
- 'index.php?amp&tag=$matches[1]&paged=$matches[2]',
173
- 'top'
174
- );
175
- }
176
-
177
- //Rewrite rule for custom Taxonomies
178
- $args = array(
179
- 'public' => true,
180
- '_builtin' => false,
181
- );
182
- $output = 'names'; // or objects
183
- $operator = 'and'; // 'and' or 'or'
184
- $taxonomies = get_taxonomies( $args, $output, $operator );
185
- if ( $taxonomies ) {
186
- foreach ( $taxonomies as $taxonomy ) {
187
- add_rewrite_rule(
188
- $taxonomy.'\/(.+?)\/amp/?$',
189
- 'index.php?amp&'.$taxonomy.'=$matches[1]',
190
- 'top'
191
- );
192
- // For Custom Taxonomies with pages
193
- add_rewrite_rule(
194
- $taxonomy.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
195
- 'index.php?amp&'.$taxonomy.'=$matches[1]&paged=$matches[2]',
196
- 'top'
197
- );
198
- }
199
- }
200
- }
201
- add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
202
-
203
- register_activation_hook( __FILE__, 'ampforwp_rewrite_activation', 20 );
204
- function ampforwp_rewrite_activation() {
205
-
206
- // Run AMP deactivation code while activation
207
- ampforwp_deactivate_amp_plugin();
208
-
209
- if ( ! did_action( 'ampforwp_init' ) ) {
210
- ampforwp_init();
211
- }
212
-
213
- flush_rewrite_rules();
214
-
215
- ampforwp_add_custom_post_support();
216
- ampforwp_add_custom_rewrite_rules();
217
-
218
- // Flushing rewrite urls ONLY on activation
219
- global $wp_rewrite;
220
- $wp_rewrite->flush_rules();
221
-
222
- delete_option('ampforwp_rewrite_flush_option');
223
-
224
- // Set transient for Welcome page
225
- set_transient( 'ampforwp_welcome_screen_activation_redirect', true, 30 );
226
-
227
- }
228
-
229
- add_action('init', 'ampforwp_flush_rewrite_by_option', 20);
230
-
231
- function ampforwp_flush_rewrite_by_option(){
232
-
233
- global $wp_rewrite;
234
- $get_current_permalink_settings = "";
235
-
236
- $get_current_permalink_settings = get_option('ampforwp_rewrite_flush_option');
237
-
238
- if ( $get_current_permalink_settings ) {
239
- return;
240
- }
241
- // Adding double check to make sure, we are not updating and calling database unnecessarily
242
- if ( empty( $get_current_permalink_settings ) ) {
243
- $wp_rewrite->flush_rules();
244
- update_option('ampforwp_rewrite_flush_option', 'true');
245
- }
246
-
247
- }
248
-
249
- register_deactivation_hook( __FILE__, 'ampforwp_rewrite_deactivate', 20 );
250
- function ampforwp_rewrite_deactivate() {
251
- // Flushing rewrite urls ONLY on deactivation
252
- global $wp_rewrite;
253
-
254
- foreach ( $wp_rewrite->endpoints as $index => $endpoint ) {
255
- if ( AMP_QUERY_VAR === $endpoint[1] ) {
256
- unset( $wp_rewrite->endpoints[ $index ] );
257
- break;
258
- }
259
- }
260
-
261
- flush_rewrite_rules();
262
-
263
- $wp_rewrite->flush_rules();
264
-
265
- // Remove transient for Welcome page
266
- delete_transient( 'ampforwp_welcome_screen_activation_redirect');
267
- }
268
-
269
- add_action( 'admin_init','ampforwp_parent_plugin_check');
270
- function ampforwp_parent_plugin_check() {
271
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
272
- $amp_plugin_activation_check = is_plugin_active( 'amp/amp.php' );
273
- if ( $amp_plugin_activation_check ) {
274
- // set_transient( 'ampforwp_parent_plugin_check', true, 30 );
275
- } else {
276
- delete_option( 'ampforwp_parent_plugin_check');
277
- }
278
- }
279
-
280
- // Redux panel inclusion code
281
- if ( ! class_exists( 'ReduxFramework' ) ) {
282
- require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
283
- require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
284
- }
285
- // Register all the main options
286
- require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
287
- require_once dirname( __FILE__ ).'/templates/report-bugs.php';
288
-
289
-
290
- // Modules
291
- add_action('after_setup_theme','ampforwp_add_module_files');
292
- function ampforwp_add_module_files() {
293
-
294
- global $redux_builder_amp;
295
- if ( isset($redux_builder_amp['ampforwp-content-builder']) && $redux_builder_amp['ampforwp-content-builder'] ) {
296
- if ( ! function_exists( 'bstw' ) ) {
297
- require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/tinymce-widget/tinymce-widget.php';
298
- }
299
- require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-blurb.php';
300
- require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-button.php';
301
- }
302
- }
303
-
304
- /*
305
- * Load Files only in the backend
306
- * As we don't need plugin activation code to run everytime the site loads
307
- */
308
- if ( is_admin() ) {
309
-
310
- // Include Welcome page only on Admin pages
311
- require AMPFORWP_PLUGIN_DIR .'/includes/welcome.php';
312
-
313
- // Add Settings Button in Plugin backend
314
- if ( ! function_exists( 'ampforwp_plugin_settings_link' ) ) {
315
-
316
- // Deactivate Parent Plugin notice
317
- add_filter( 'plugin_action_links', 'ampforwp_plugin_settings_link', 10, 5 );
318
-
319
- function ampforwp_plugin_settings_link( $actions, $plugin_file ) {
320
- static $plugin;
321
- if ( ! isset($plugin))
322
- $plugin = plugin_basename(__FILE__);
323
- if ( $plugin === $plugin_file ) {
324
- $settings = array( 'settings' => '<a href="admin.php?page=amp_options&tab=8">' . __('Settings', 'accelerated-mobile-pages') . '</a> | <a href="https://ampforwp.com/extensions/#utm_source=plugin-panel&utm_medium=plugin-extension&utm_campaign=features">' . __('Premium Features', 'accelerated-mobile-pages') . '</a> | <a href="https://ampforwp.com/membership/#utm_source=plugin-panel&utm_medium=plugin-extension&utm_campaign=pro">' . __('Pro', 'accelerated-mobile-pages') . '</a>' );
325
-
326
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
327
- $actions = array_merge( $actions, $settings );
328
- }
329
- return $actions;
330
- }
331
- }
332
- } // is_admin() closing
333
-
334
- // AMP endpoint Verifier
335
- function ampforwp_is_amp_endpoint() {
336
- if ( ampforwp_is_non_amp() ) {
337
- return ampforwp_is_non_amp();
338
- }
339
- else {
340
- return false !== get_query_var( 'amp', false );
341
- }
342
- }
343
-
344
- if ( ! class_exists( 'Ampforwp_Init', false ) ) {
345
- class Ampforwp_Init {
346
-
347
- public function __construct(){
348
-
349
- // Load Files required for the plugin to run
350
- require AMPFORWP_PLUGIN_DIR .'/includes/includes.php';
351
-
352
- // Redirection Code added
353
- require AMPFORWP_PLUGIN_DIR.'/includes/redirect.php';
354
-
355
- require AMPFORWP_PLUGIN_DIR .'/classes/class-init.php';
356
- new Ampforwp_Loader();
357
-
358
- }
359
- }
360
- }
361
- /*
362
- * Start the plugin.
363
- * Gentlemen start your engines
364
- */
365
- function ampforwp_plugin_init() {
366
-
367
- if ( defined( 'AMP__FILE__' ) && defined('AMPFORWP_PLUGIN_DIR') ) {
368
- new Ampforwp_Init();
369
- }
370
- }
371
- add_action('init','ampforwp_plugin_init',9);
372
-
373
- /*
374
- * customized output widget
375
- * to be used be used in before or after Loop
376
- */
377
- require AMPFORWP_PLUGIN_DIR.'/templates/category-widget.php';
378
- require AMPFORWP_PLUGIN_DIR.'/templates/woo-widget.php';
379
-
380
-
381
- /*
382
- * Including core AMP plugin files and removing any other things if necessary
383
- */
384
- function ampforwp_bundle_core_amp_files(){
385
- // Bundling Default plugin
386
- require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/amp/amp.php';
387
-
388
- define( 'AMP__FILE__', __FILE__ );
389
- if ( ! defined('AMP__DIR__') ) {
390
- define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
391
- }
392
- define( 'AMP__VERSION', '0.4.2' );
393
-
394
- require_once( AMP__DIR__ . '/back-compat/back-compat.php' );
395
- require_once( AMP__DIR__ . '/includes/amp-helper-functions.php' );
396
- require_once( AMP__DIR__ . '/includes/admin/functions.php' );
397
- require_once( AMP__DIR__ . '/includes/settings/class-amp-customizer-settings.php' );
398
- require_once( AMP__DIR__ . '/includes/settings/class-amp-customizer-design-settings.php' );
399
- }
400
- add_action('plugins_loaded','ampforwp_bundle_core_amp_files', 8);
401
-
402
- function ampforwp_deactivate_amp_plugin() {
403
-
404
- if ( version_compare( floatval( get_bloginfo( 'version' ) ), '3.5', '>=' ) ) {
405
-
406
- if ( current_user_can( 'activate_plugins' ) ) {
407
-
408
- add_action( 'admin_init', 'ampforwp_deactivate_amp' );
409
-
410
- function ampforwp_deactivate_amp() {
411
- deactivate_plugins( AMPFORWP_MAIN_PLUGIN_DIR . 'amp/amp.php' );
412
- }
413
- }
414
- }
415
- }
416
- add_action( 'plugins_loaded', 'ampforwp_deactivate_amp_plugin' );
417
-
418
- function ampforwp_modify_amp_activatation_link( $actions, $plugin_file ) {
419
- $plugin = '';
420
-
421
- $plugin = 'amp/amp.php';
422
- if ( $plugin == $plugin_file ) {
423
- add_thickbox();
424
- unset($actions['activate']);
425
- $a = '<span style="cursor:pointer;color:#0089c8" class="warning_activate_amp" onclick="alert(\'AMP is already bundled with AMPforWP. Please do not install this plugin with AMPforWP to avoid conflicts. \')">Activate</span>';
426
- array_unshift ($actions,$a);
427
- }
428
- return $actions;
429
- }
430
- add_filter( 'plugin_action_links', 'ampforwp_modify_amp_activatation_link', 10, 2 );
431
-
432
- if ( ! function_exists('ampforwp_init') ) {
433
- add_action( 'init', 'ampforwp_init' );
434
- function ampforwp_init() {
435
- if ( false === apply_filters( 'amp_is_enabled', true ) ) {
436
- return;
437
- }
438
-
439
- define( 'AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
440
-
441
- if ( ! defined('AMP__DIR__') ) {
442
- define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
443
- }
444
-
445
- do_action( 'amp_init' );
446
-
447
- load_plugin_textdomain( 'amp', false, plugin_basename( AMP__DIR__ ) . '/languages' );
448
-
449
- add_rewrite_endpoint( AMP_QUERY_VAR, EP_PERMALINK );
450
- add_post_type_support( 'post', AMP_QUERY_VAR );
451
-
452
- add_filter( 'request', 'amp_force_query_var_value' );
453
- add_action( 'wp', 'amp_maybe_add_actions' );
454
-
455
- // Redirect the old url of amp page to the updated url. #1033 (Vendor Update)
456
- add_filter( 'old_slug_redirect_url', 'ampforwp_redirect_old_slug_to_new_url' );
457
-
458
- if ( class_exists( 'Jetpack' ) && ! (defined( 'IS_WPCOM' ) && IS_WPCOM) ) {
459
- require_once( AMP__DIR__ . '/jetpack-helper.php' );
460
- }
461
- }
462
- }
463
-
464
-
465
- function amp_update_db_check() {
466
- global $redux_builder_amp;
467
- $ampforwp_current_version = AMPFORWP_VERSION;
468
- if ( get_option( 'AMPforwp_db_version' ) !== $ampforwp_current_version ) {
469
-
470
- if ( isset( $_GET['ampforwp-dismiss'] ) && trim( $_GET['ampforwp-dismiss']) === "ampforwp_dismiss_admin_notices" ) {
471
- update_option( 'AMPforwp_db_version', $ampforwp_current_version );
472
- wp_redirect(remove_query_arg('ampforwp-dismiss'), 301);
473
- }
474
- if ( isset($redux_builder_amp['ampforwp-update-notification-bar'] ) && $redux_builder_amp['ampforwp-update-notification-bar'] && current_user_can( 'manage_options' ) ) {
475
-
476
- add_action('admin_notices', 'ampforwp_update_notice');
477
- }
478
- }
479
- }
480
- add_action( 'plugins_loaded', 'amp_update_db_check' );
481
-
482
- function ampforwp_update_notice() {
483
- $screen = '';
484
- $screen = get_current_screen();
485
- $ampforwp_current_version = AMPFORWP_VERSION;
486
- if ( 'toplevel_page_amp_options' == $screen->base ) { ?>
487
- <div class="notice-success notice is-dismissible amp-update-notice">
488
- <div class="amp-update-notice-text-box">
489
- <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" />
490
- <div class="amp-update-notice-text"> <?php echo esc_attr('AMP has been updated to '.$ampforwp_current_version, 'accelerated-mobile-pages' ); ?></div>
491
- <a href="https://ampforwp.com/new/" target="_blank" href="admin.php?page=acmforwp_update">What's New?</a>
492
- </div>
493
- <div class="amp-update-notice-dismiss">
494
- <a title="Close this Notification" href="<?php echo esc_url(add_query_arg( 'ampforwp-dismiss', 'ampforwp_dismiss_admin_notices' )) ?>">X</a>
495
- </div>
496
- <div class="amp-update-notice-review-box">
497
- <a class="star_icon" href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages?rate=5#new-post" target="_blank"> Appreciate it? <br> <span title="Give Us 5 Star">Leave a Review →</span></a>
498
- </div>
499
- </div>
500
- <?php }
501
- }
502
- if ( ! defined('AMP_FRAMEWORK_COMOPNENT_DIR_PATH') ) {
503
- define('AMP_FRAMEWORK_COMOPNENT_DIR_PATH', plugin_dir_path( __FILE__ )."/components");
504
- }
505
- require_once( AMP_FRAMEWORK_COMOPNENT_DIR_PATH . '/components-core.php' );
506
- require_once( AMPFORWP_PLUGIN_DIR. 'pagebuilder/amp-page-builder.php' );
507
- require_once( AMPFORWP_PLUGIN_DIR. 'base_remover/base_remover.php' );
508
- require_once( AMPFORWP_PLUGIN_DIR. 'includes/thirdparty-compatibility.php' );
509
- require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
510
-
511
- /**
512
- * Redirects the old AMP URL to the new AMP URL.
513
- * If post slug is updated the amp page with old post slug will be redirected to the updated url.
514
- *
515
- * @param string $link New URL of the post.
516
- *
517
- * @return string $link URL to be redirected.
518
- */
519
- if ( ! function_exists( 'ampforwp_redirect_old_slug_to_new_url' ) ) {
520
- function ampforwp_redirect_old_slug_to_new_url( $link ) {
521
-
522
- if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
523
- $link = trailingslashit( trailingslashit( $link ) . AMPFORWP_AMP_QUERY_VAR );
524
- }
525
-
526
- return $link;
527
- }
528
  }
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.83
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
+ */
13
+
14
+ // Exit if accessed directly.
15
+ if ( ! defined( 'ABSPATH' ) ) exit;
16
+
17
+ define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
18
+ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
19
+ define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
20
+ define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
21
+ define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
22
+ define('AMPFORWP_VERSION','0.9.83');
23
+
24
+ // any changes to AMP_QUERY_VAR should be refelected here
25
+ function ampforwp_generate_endpoint(){
26
+ $ampforwp_slug = '';
27
+ $get_permalink_structure = '';
28
+
29
+ $ampforwp_slug = "amp";
30
+
31
+ return $ampforwp_slug;
32
+ }
33
+
34
+ define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', ampforwp_generate_endpoint() ) );
35
+
36
+ load_plugin_textdomain( 'accelerated-mobile-pages', false, trailingslashit(AMPFORWP_PLUGIN_DIR) . 'languages' );
37
+
38
+ // Rewrite the Endpoints after the plugin is activate, as priority is set to 11
39
+ function ampforwp_add_custom_post_support() {
40
+ global $redux_builder_amp;
41
+ add_rewrite_endpoint( AMPFORWP_AMP_QUERY_VAR, EP_PAGES | EP_PERMALINK | EP_AUTHORS | EP_ALL_ARCHIVES | EP_ROOT );
42
+ // Pages
43
+ if ( isset($redux_builder_amp['amp-on-off-for-all-pages']) && $redux_builder_amp['amp-on-off-for-all-pages'] ) {
44
+ add_post_type_support( 'page', AMPFORWP_AMP_QUERY_VAR );
45
+ }
46
+ // Custom Post Types
47
+ if ( isset($redux_builder_amp['ampforwp-custom-type'] ) && $redux_builder_amp['ampforwp-custom-type'] ) {
48
+ foreach ( $redux_builder_amp['ampforwp-custom-type'] as $custom_post ) {
49
+ add_post_type_support( $custom_post, AMP_QUERY_VAR );
50
+ }
51
+ }
52
+ }
53
+ add_action( 'init', 'ampforwp_add_custom_post_support',11);
54
+
55
+ // Frontpage and Blog page check from reading settings.
56
+ function ampforwp_name_blog_page() {
57
+ if ( ! $page_for_posts = get_option('page_for_posts')) return;
58
+ $page_for_posts = get_option( 'page_for_posts' );
59
+ $post = get_post($page_for_posts);
60
+ if ( $post ) {
61
+ $slug = $post->post_name;
62
+ return $slug;
63
+ }
64
+ }
65
+ function ampforwp_custom_post_page() {
66
+ $front_page_type = get_option( 'show_on_front' );
67
+ if ( $front_page_type ) {
68
+ return $front_page_type;
69
+ }
70
+ }
71
+
72
+ function ampforwp_get_the_page_id_blog_page(){
73
+ $page = "";
74
+ $output = "";
75
+ if ( ampforwp_name_blog_page() ) {
76
+ $page = get_page_by_path( ampforwp_name_blog_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;
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/page/([0-9]{1,})/?$',
95
+ 'index.php?amp&paged=$matches[1]',
96
+ 'top'
97
+ );
98
+ // For /Blog page with Pagination
99
+ add_rewrite_rule(
100
+ ampforwp_name_blog_page(). '/amp/page/([0-9]{1,})/?$',
101
+ 'index.php?amp&paged=$matches[1]&page_id=' .ampforwp_get_the_page_id_blog_page(),
102
+ 'top'
103
+ );
104
+
105
+ // For Author pages
106
+ add_rewrite_rule(
107
+ 'author\/([^/]+)\/amp\/?$',
108
+ 'index.php?amp&author_name=$matches[1]',
109
+ 'top'
110
+ );
111
+
112
+ add_rewrite_rule(
113
+ 'author\/([^/]+)\/amp\/page\/?([0-9]{1,})\/?$',
114
+ 'index.php?amp=1&author_name=$matches[1]&paged=$matches[2]',
115
+ 'top'
116
+ );
117
+
118
+ // For category pages
119
+ $rewrite_category = get_option('category_base');
120
+ if ( ! empty($rewrite_category) ) {
121
+ $rewrite_category = get_option('category_base');
122
+ } else {
123
+ $rewrite_category = 'category';
124
+ }
125
+
126
+ add_rewrite_rule(
127
+ $rewrite_category.'\/(.+?)\/amp/?$',
128
+ 'index.php?amp&category_name=$matches[1]',
129
+ 'top'
130
+ );
131
+ // For category pages with Pagination
132
+ add_rewrite_rule(
133
+ $rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
134
+ 'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
135
+ 'top'
136
+ );
137
+
138
+ // For category pages with Pagination (Custom Permalink Structure)
139
+ $permalink_structure = get_option('permalink_structure');
140
+ $permalink_structure = preg_replace('/(%.*%)/', '', $permalink_structure);
141
+ $permalink_structure = preg_replace('/\//', '', $permalink_structure);
142
+ if ( $permalink_structure ) {
143
+ add_rewrite_rule(
144
+ $permalink_structure.'\/'.$rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
145
+ 'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
146
+ 'top'
147
+ );
148
+ }
149
+
150
+ // For tag pages
151
+ $rewrite_tag = get_option('tag_base');
152
+ if ( ! empty($rewrite_tag) ) {
153
+ $rewrite_tag = get_option('tag_base');
154
+ } else {
155
+ $rewrite_tag = 'tag';
156
+ }
157
+ add_rewrite_rule(
158
+ $rewrite_tag.'\/(.+?)\/amp/?$',
159
+ 'index.php?amp&tag=$matches[1]',
160
+ 'top'
161
+ );
162
+ // For tag pages with Pagination
163
+ add_rewrite_rule(
164
+ $rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
165
+ 'index.php?amp&tag=$matches[1]&paged=$matches[2]',
166
+ 'top'
167
+ );
168
+ // For tag pages with Pagination (Custom Permalink Structure)
169
+ if ( $permalink_structure ) {
170
+ add_rewrite_rule(
171
+ $permalink_structure.'\/'.$rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
172
+ 'index.php?amp&tag=$matches[1]&paged=$matches[2]',
173
+ 'top'
174
+ );
175
+ }
176
+
177
+ //Rewrite rule for custom Taxonomies
178
+ $args = array(
179
+ 'public' => true,
180
+ '_builtin' => false,
181
+ );
182
+ $output = 'names'; // or objects
183
+ $operator = 'and'; // 'and' or 'or'
184
+ $taxonomies = get_taxonomies( $args, $output, $operator );
185
+ if ( $taxonomies ) {
186
+ foreach ( $taxonomies as $taxonomy ) {
187
+ add_rewrite_rule(
188
+ $taxonomy.'\/(.+?)\/amp/?$',
189
+ 'index.php?amp&'.$taxonomy.'=$matches[1]',
190
+ 'top'
191
+ );
192
+ // For Custom Taxonomies with pages
193
+ add_rewrite_rule(
194
+ $taxonomy.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
195
+ 'index.php?amp&'.$taxonomy.'=$matches[1]&paged=$matches[2]',
196
+ 'top'
197
+ );
198
+ }
199
+ }
200
+ }
201
+ add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
202
+
203
+ register_activation_hook( __FILE__, 'ampforwp_rewrite_activation', 20 );
204
+ function ampforwp_rewrite_activation() {
205
+
206
+ // Run AMP deactivation code while activation
207
+ ampforwp_deactivate_amp_plugin();
208
+
209
+ if ( ! did_action( 'ampforwp_init' ) ) {
210
+ ampforwp_init();
211
+ }
212
+
213
+ flush_rewrite_rules();
214
+
215
+ ampforwp_add_custom_post_support();
216
+ ampforwp_add_custom_rewrite_rules();
217
+
218
+ // Flushing rewrite urls ONLY on activation
219
+ global $wp_rewrite;
220
+ $wp_rewrite->flush_rules();
221
+
222
+ delete_option('ampforwp_rewrite_flush_option');
223
+
224
+ // Set transient for Welcome page
225
+ set_transient( 'ampforwp_welcome_screen_activation_redirect', true, 30 );
226
+
227
+ }
228
+
229
+ add_action('init', 'ampforwp_flush_rewrite_by_option', 20);
230
+
231
+ function ampforwp_flush_rewrite_by_option(){
232
+
233
+ global $wp_rewrite;
234
+ $get_current_permalink_settings = "";
235
+
236
+ $get_current_permalink_settings = get_option('ampforwp_rewrite_flush_option');
237
+
238
+ if ( $get_current_permalink_settings ) {
239
+ return;
240
+ }
241
+ // Adding double check to make sure, we are not updating and calling database unnecessarily
242
+ if ( empty( $get_current_permalink_settings ) ) {
243
+ $wp_rewrite->flush_rules();
244
+ update_option('ampforwp_rewrite_flush_option', 'true');
245
+ }
246
+
247
+ }
248
+
249
+ register_deactivation_hook( __FILE__, 'ampforwp_rewrite_deactivate', 20 );
250
+ function ampforwp_rewrite_deactivate() {
251
+ // Flushing rewrite urls ONLY on deactivation
252
+ global $wp_rewrite;
253
+
254
+ foreach ( $wp_rewrite->endpoints as $index => $endpoint ) {
255
+ if ( AMP_QUERY_VAR === $endpoint[1] ) {
256
+ unset( $wp_rewrite->endpoints[ $index ] );
257
+ break;
258
+ }
259
+ }
260
+
261
+ flush_rewrite_rules();
262
+
263
+ $wp_rewrite->flush_rules();
264
+
265
+ // Remove transient for Welcome page
266
+ delete_transient( 'ampforwp_welcome_screen_activation_redirect');
267
+ }
268
+
269
+ add_action( 'admin_init','ampforwp_parent_plugin_check');
270
+ function ampforwp_parent_plugin_check() {
271
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
272
+ $amp_plugin_activation_check = is_plugin_active( 'amp/amp.php' );
273
+ if ( $amp_plugin_activation_check ) {
274
+ // set_transient( 'ampforwp_parent_plugin_check', true, 30 );
275
+ } else {
276
+ delete_option( 'ampforwp_parent_plugin_check');
277
+ }
278
+ }
279
+
280
+ // Redux panel inclusion code
281
+ if ( ! class_exists( 'ReduxFramework' ) ) {
282
+ require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
283
+ require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
284
+ }
285
+ // Register all the main options
286
+ require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
287
+ require_once dirname( __FILE__ ).'/templates/report-bugs.php';
288
+
289
+
290
+ // Modules
291
+ add_action('after_setup_theme','ampforwp_add_module_files');
292
+ function ampforwp_add_module_files() {
293
+
294
+ global $redux_builder_amp;
295
+ if ( isset($redux_builder_amp['ampforwp-content-builder']) && $redux_builder_amp['ampforwp-content-builder'] ) {
296
+ if ( ! function_exists( 'bstw' ) ) {
297
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/tinymce-widget/tinymce-widget.php';
298
+ }
299
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-blurb.php';
300
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-button.php';
301
+ }
302
+ }
303
+
304
+ /*
305
+ * Load Files only in the backend
306
+ * As we don't need plugin activation code to run everytime the site loads
307
+ */
308
+ if ( is_admin() ) {
309
+
310
+ // Include Welcome page only on Admin pages
311
+ require AMPFORWP_PLUGIN_DIR .'/includes/welcome.php';
312
+
313
+ // Add Settings Button in Plugin backend
314
+ if ( ! function_exists( 'ampforwp_plugin_settings_link' ) ) {
315
+
316
+ // Deactivate Parent Plugin notice
317
+ add_filter( 'plugin_action_links', 'ampforwp_plugin_settings_link', 10, 5 );
318
+
319
+ function ampforwp_plugin_settings_link( $actions, $plugin_file ) {
320
+ static $plugin;
321
+ if ( ! isset($plugin))
322
+ $plugin = plugin_basename(__FILE__);
323
+ if ( $plugin === $plugin_file ) {
324
+ $settings = array( 'settings' => '<a href="admin.php?page=amp_options&tab=8">' . __('Settings', 'accelerated-mobile-pages') . '</a> | <a href="https://ampforwp.com/extensions/#utm_source=plugin-panel&utm_medium=plugin-extension&utm_campaign=features">' . __('Premium Features', 'accelerated-mobile-pages') . '</a> | <a href="https://ampforwp.com/membership/#utm_source=plugin-panel&utm_medium=plugin-extension&utm_campaign=pro">' . __('Pro', 'accelerated-mobile-pages') . '</a>' );
325
+
326
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
327
+ $actions = array_merge( $actions, $settings );
328
+ }
329
+ return $actions;
330
+ }
331
+ }
332
+ } // is_admin() closing
333
+
334
+ // AMP endpoint Verifier
335
+ function ampforwp_is_amp_endpoint() {
336
+ if ( ampforwp_is_non_amp() && ! is_admin()) {
337
+ return ampforwp_is_non_amp();
338
+ }
339
+ else {
340
+ return false !== get_query_var( 'amp', false );
341
+ }
342
+ }
343
+
344
+ if ( ! class_exists( 'Ampforwp_Init', false ) ) {
345
+ class Ampforwp_Init {
346
+
347
+ public function __construct(){
348
+
349
+ // Load Files required for the plugin to run
350
+ require AMPFORWP_PLUGIN_DIR .'/includes/includes.php';
351
+
352
+ // Redirection Code added
353
+ require AMPFORWP_PLUGIN_DIR.'/includes/redirect.php';
354
+
355
+ require AMPFORWP_PLUGIN_DIR .'/classes/class-init.php';
356
+ new Ampforwp_Loader();
357
+
358
+ }
359
+ }
360
+ }
361
+ /*
362
+ * Start the plugin.
363
+ * Gentlemen start your engines
364
+ */
365
+ function ampforwp_plugin_init() {
366
+
367
+ if ( defined( 'AMP__FILE__' ) && defined('AMPFORWP_PLUGIN_DIR') ) {
368
+ new Ampforwp_Init();
369
+ }
370
+ }
371
+ add_action('init','ampforwp_plugin_init',9);
372
+
373
+ /*
374
+ * customized output widget
375
+ * to be used be used in before or after Loop
376
+ */
377
+ require AMPFORWP_PLUGIN_DIR.'/templates/category-widget.php';
378
+ require AMPFORWP_PLUGIN_DIR.'/templates/woo-widget.php';
379
+
380
+
381
+ /*
382
+ * Including core AMP plugin files and removing any other things if necessary
383
+ */
384
+ function ampforwp_bundle_core_amp_files(){
385
+ // Bundling Default plugin
386
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/amp/amp.php';
387
+
388
+ define( 'AMP__FILE__', __FILE__ );
389
+ if ( ! defined('AMP__DIR__') ) {
390
+ define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
391
+ }
392
+ define( 'AMP__VERSION', '0.4.2' );
393
+
394
+ require_once( AMP__DIR__ . '/back-compat/back-compat.php' );
395
+ require_once( AMP__DIR__ . '/includes/amp-helper-functions.php' );
396
+ require_once( AMP__DIR__ . '/includes/admin/functions.php' );
397
+ require_once( AMP__DIR__ . '/includes/settings/class-amp-customizer-settings.php' );
398
+ require_once( AMP__DIR__ . '/includes/settings/class-amp-customizer-design-settings.php' );
399
+ }
400
+ add_action('plugins_loaded','ampforwp_bundle_core_amp_files', 8);
401
+
402
+ function ampforwp_deactivate_amp_plugin() {
403
+
404
+ if ( version_compare( floatval( get_bloginfo( 'version' ) ), '3.5', '>=' ) ) {
405
+
406
+ if ( current_user_can( 'activate_plugins' ) ) {
407
+
408
+ add_action( 'admin_init', 'ampforwp_deactivate_amp' );
409
+
410
+ function ampforwp_deactivate_amp() {
411
+ deactivate_plugins( AMPFORWP_MAIN_PLUGIN_DIR . 'amp/amp.php' );
412
+ }
413
+ }
414
+ }
415
+ }
416
+ add_action( 'plugins_loaded', 'ampforwp_deactivate_amp_plugin' );
417
+
418
+ function ampforwp_modify_amp_activatation_link( $actions, $plugin_file ) {
419
+ $plugin = '';
420
+
421
+ $plugin = 'amp/amp.php';
422
+ if ( $plugin == $plugin_file ) {
423
+ add_thickbox();
424
+ unset($actions['activate']);
425
+ $a = '<span style="cursor:pointer;color:#0089c8" class="warning_activate_amp" onclick="alert(\'AMP is already bundled with AMPforWP. Please do not install this plugin with AMPforWP to avoid conflicts. \')">Activate</span>';
426
+ array_unshift ($actions,$a);
427
+ }
428
+ return $actions;
429
+ }
430
+ add_filter( 'plugin_action_links', 'ampforwp_modify_amp_activatation_link', 10, 2 );
431
+
432
+ if ( ! function_exists('ampforwp_init') ) {
433
+ add_action( 'init', 'ampforwp_init' );
434
+ function ampforwp_init() {
435
+ if ( false === apply_filters( 'amp_is_enabled', true ) ) {
436
+ return;
437
+ }
438
+
439
+ define( 'AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
440
+
441
+ if ( ! defined('AMP__DIR__') ) {
442
+ define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
443
+ }
444
+
445
+ do_action( 'amp_init' );
446
+
447
+ load_plugin_textdomain( 'amp', false, plugin_basename( AMP__DIR__ ) . '/languages' );
448
+
449
+ add_rewrite_endpoint( AMP_QUERY_VAR, EP_PERMALINK );
450
+ add_post_type_support( 'post', AMP_QUERY_VAR );
451
+
452
+ add_filter( 'request', 'amp_force_query_var_value' );
453
+ add_action( 'wp', 'amp_maybe_add_actions' );
454
+
455
+ // Redirect the old url of amp page to the updated url. #1033 (Vendor Update)
456
+ add_filter( 'old_slug_redirect_url', 'ampforwp_redirect_old_slug_to_new_url' );
457
+
458
+ if ( class_exists( 'Jetpack' ) && ! (defined( 'IS_WPCOM' ) && IS_WPCOM) ) {
459
+ require_once( AMP__DIR__ . '/jetpack-helper.php' );
460
+ }
461
+ }
462
+ }
463
+
464
+
465
+ function amp_update_db_check() {
466
+ global $redux_builder_amp;
467
+ $ampforwp_current_version = AMPFORWP_VERSION;
468
+ if ( get_option( 'AMPforwp_db_version' ) !== $ampforwp_current_version ) {
469
+
470
+ if ( isset( $_GET['ampforwp-dismiss'] ) && trim( $_GET['ampforwp-dismiss']) === "ampforwp_dismiss_admin_notices" ) {
471
+ update_option( 'AMPforwp_db_version', $ampforwp_current_version );
472
+ wp_redirect(remove_query_arg('ampforwp-dismiss'), 301);
473
+ }
474
+ if ( isset($redux_builder_amp['ampforwp-update-notification-bar'] ) && $redux_builder_amp['ampforwp-update-notification-bar'] && current_user_can( 'manage_options' ) ) {
475
+
476
+ add_action('admin_notices', 'ampforwp_update_notice');
477
+ }
478
+ }
479
+ }
480
+ add_action( 'plugins_loaded', 'amp_update_db_check' );
481
+
482
+ function ampforwp_update_notice() {
483
+ $screen = '';
484
+ $screen = get_current_screen();
485
+ $ampforwp_current_version = AMPFORWP_VERSION;
486
+ if ( 'toplevel_page_amp_options' == $screen->base ) { ?>
487
+ <div class="notice-success notice is-dismissible amp-update-notice">
488
+ <div class="amp-update-notice-text-box">
489
+ <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" />
490
+ <div class="amp-update-notice-text"> <?php echo esc_attr('AMP has been updated to '.$ampforwp_current_version, 'accelerated-mobile-pages' ); ?></div>
491
+ <a href="https://ampforwp.com/new/" target="_blank" href="admin.php?page=acmforwp_update">What's New?</a>
492
+ </div>
493
+ <div class="amp-update-notice-dismiss">
494
+ <a title="Close this Notification" href="<?php echo esc_url(add_query_arg( 'ampforwp-dismiss', 'ampforwp_dismiss_admin_notices' )) ?>">X</a>
495
+ </div>
496
+ <div class="amp-update-notice-review-box">
497
+ <a class="star_icon" href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages?rate=5#new-post" target="_blank"> Appreciate it? <br> <span title="Give Us 5 Star">Leave a Review →</span></a>
498
+ </div>
499
+ </div>
500
+ <?php }
501
+ }
502
+ if ( ! defined('AMP_FRAMEWORK_COMOPNENT_DIR_PATH') ) {
503
+ define('AMP_FRAMEWORK_COMOPNENT_DIR_PATH', plugin_dir_path( __FILE__ )."/components");
504
+ }
505
+ require_once( AMP_FRAMEWORK_COMOPNENT_DIR_PATH . '/components-core.php' );
506
+ require_once( AMPFORWP_PLUGIN_DIR. 'pagebuilder/amp-page-builder.php' );
507
+ require_once( AMPFORWP_PLUGIN_DIR. 'base_remover/base_remover.php' );
508
+ require_once( AMPFORWP_PLUGIN_DIR. 'includes/thirdparty-compatibility.php' );
509
+ require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
510
+
511
+ /**
512
+ * Redirects the old AMP URL to the new AMP URL.
513
+ * If post slug is updated the amp page with old post slug will be redirected to the updated url.
514
+ *
515
+ * @param string $link New URL of the post.
516
+ *
517
+ * @return string $link URL to be redirected.
518
+ */
519
+ if ( ! function_exists( 'ampforwp_redirect_old_slug_to_new_url' ) ) {
520
+ function ampforwp_redirect_old_slug_to_new_url( $link ) {
521
+
522
+ if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
523
+ $link = trailingslashit( trailingslashit( $link ) . AMPFORWP_AMP_QUERY_VAR );
524
+ }
525
+
526
+ return $link;
527
+ }
528
  }
base_remover/base_remover.php CHANGED
@@ -1,127 +1,127 @@
1
- <?php
2
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
3
-
4
- // check for plugin using plugin name
5
- $old_plugin = AMPFORWP_MAIN_PLUGIN_DIR.'amp-category-base-remover/amp-category-base-remover.php';
6
- if ( is_plugin_active( $old_plugin ) ) {
7
- //plugin is activated
8
- deactivate_plugins($old_plugin);
9
- add_action( 'admin_notices', 'plugin_catagory_base_removed_admin_notice__success' );
10
- }
11
-
12
- function plugin_catagory_base_removed_admin_notice__success(){
13
- ?>
14
- <div class="notice notice-success is-dismissible">
15
- <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>', 'amp-for-plugin' ); ?></p>
16
- </div>
17
- <?php
18
- }
19
-
20
-
21
- add_action( 'current_screen', 'this_screen_own' );
22
- function this_screen_own(){
23
- $current_screen = get_current_screen();
24
- if( $current_screen->id === "plugin-install" ) {
25
-
26
- function amp_enqueue_function_dependancies( $hook ) {
27
- wp_enqueue_script( 'AMPScriptDependanciesremove', plugins_url('dependencyScript.js', __FILE__), array( 'jquery' ) );
28
- }
29
- add_action( 'admin_enqueue_scripts', 'amp_enqueue_function_dependancies' );
30
- }
31
- }
32
-
33
-
34
-
35
- add_filter( 'init', 'ampforwp_url_base_rewrite_rules', 100 );
36
- function ampforwp_url_base_rewrite_rules(){
37
- global $redux_builder_amp;
38
- global $wp_rewrite;
39
- $categoryBaseRewrite = 0;
40
- $tagBaseRewrite = 0;
41
-
42
- if( isset($redux_builder_amp['ampforwp-category-base-removel-link']) ) {
43
- $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link'];
44
- }
45
- if( isset($redux_builder_amp['ampforwp-tag-base-removal-link']) ) {
46
- $tagBaseRewrite = $redux_builder_amp['ampforwp-tag-base-removal-link'];
47
- }
48
- /* $catagoryStatusChanges = get_option('AMP-category-base-removal-status');
49
- if($catagoryStatusChanges==$categoryBaseRewrite){
50
- update_option('AMP-category-base-removal-status',$categoryBaseRewrite);
51
- $wp_rerite->flush_rules( $hard );
52
- } */
53
- if($categoryBaseRewrite === '1'){
54
- add_action( 'created_category', 'amp_flush_rewrite_rules', 999 );
55
- add_action( 'edited_category', 'amp_flush_rewrite_rules', 999 );
56
- add_action( 'delete_category', 'amp_flush_rewrite_rules', 999 );
57
- add_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules');
58
- }elseif($categoryBaseRewrite === '0'){
59
- remove_action( 'created_category', 'amp_flush_rewrite_rules' , 999 );
60
- remove_action( 'edited_category', 'amp_flush_rewrite_rules' , 999 );
61
- remove_action( 'delete_category', 'amp_flush_rewrite_rules' , 999 );
62
- remove_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules');
63
-
64
- }
65
- if( $tagBaseRewrite === '1'){
66
- add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
67
- add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
68
- add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
69
- add_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
70
- }elseif( $tagBaseRewrite === '0' ) {
71
- remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
72
- remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
73
- remove_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
74
- remove_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
75
- }
76
- }
77
-
78
-
79
-
80
-
81
- function amp_flush_rewrite_rules( $hard=true ) {
82
- global $wp_rewrite;
83
- $wp_rewrite->flush_rules( $hard );
84
- }
85
-
86
- function ampforwp_category_url_rewrite_rules( $rewrite ) {
87
- global $redux_builder_amp, $wp_rewrite;
88
- $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link'];
89
- $categories = get_categories( array( 'hide_empty' => false ) );
90
- if(is_array( $categories ) && ! empty( $categories ) ) {
91
-
92
-
93
- foreach ( $categories as $category ) {
94
- $category_nicename = $category->slug;
95
- if ( $category->parent === $category->cat_ID ) {
96
- $category->parent = 0;
97
- } elseif ( 0 !== $category->parent ) {
98
- $category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename;
99
- }
100
- $category_nicename = trim($category_nicename);
101
-
102
- $rewrite[ '('.$category_nicename.')'.'/amp/?$' ] = 'index.php?amp&category_name=$matches[1]';
103
- $rewrite[ '('.$category_nicename.')'.'/amp/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?amp&category_name=$matches[1]&paged=$matches[2]';
104
-
105
- // Redirect support from Old Category Base
106
- $old_category_base = get_option( 'category_base' ) ? get_option( 'category_base' ) : 'category';
107
- $old_category_base = trim( $old_category_base, '/' );
108
- $rewrite[ $old_category_base . '/(.*)$' ] = 'index.php?category_redirect=$matches[1]';
109
-
110
- }
111
- }
112
- return $rewrite;
113
- }
114
-
115
-
116
- function ampforwp_tag_url_rewrite_rules( $rewrite ) {
117
- $terms = get_terms( 'post_tag', array( 'hide_empty' => false ) );
118
- foreach ( $terms as $term ) {
119
- $term_nicename = trim($term->slug);
120
-
121
- $rewrite[ '('.$term_nicename.')'.'/amp/?$' ] = 'index.php?amp&tag=$matches[1]';
122
- $rewrite[ '('.$term_nicename.')'.'/amp/page/?([0-9]{1,})/?$' ] =
123
- 'index.php?amp&tag=$matches[1]&paged=$matches[2]';
124
- }
125
-
126
- return $rewrite;
127
  }
1
+ <?php
2
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
3
+
4
+ // check for plugin using plugin name
5
+ $old_plugin = AMPFORWP_MAIN_PLUGIN_DIR.'amp-category-base-remover/amp-category-base-remover.php';
6
+ if ( is_plugin_active( $old_plugin ) ) {
7
+ //plugin is activated
8
+ deactivate_plugins($old_plugin);
9
+ add_action( 'admin_notices', 'plugin_catagory_base_removed_admin_notice__success' );
10
+ }
11
+
12
+ function plugin_catagory_base_removed_admin_notice__success(){
13
+ ?>
14
+ <div class="notice notice-success is-dismissible">
15
+ <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>', 'amp-for-plugin' ); ?></p>
16
+ </div>
17
+ <?php
18
+ }
19
+
20
+
21
+ add_action( 'current_screen', 'this_screen_own' );
22
+ function this_screen_own(){
23
+ $current_screen = get_current_screen();
24
+ if( $current_screen->id === "plugin-install" ) {
25
+
26
+ function amp_enqueue_function_dependancies( $hook ) {
27
+ wp_enqueue_script( 'AMPScriptDependanciesremove', plugins_url('dependencyScript.js', __FILE__), array( 'jquery' ) );
28
+ }
29
+ add_action( 'admin_enqueue_scripts', 'amp_enqueue_function_dependancies' );
30
+ }
31
+ }
32
+
33
+
34
+
35
+ add_filter( 'init', 'ampforwp_url_base_rewrite_rules', 100 );
36
+ function ampforwp_url_base_rewrite_rules(){
37
+ global $redux_builder_amp;
38
+ global $wp_rewrite;
39
+ $categoryBaseRewrite = 0;
40
+ $tagBaseRewrite = 0;
41
+
42
+ if( isset($redux_builder_amp['ampforwp-category-base-removel-link']) ) {
43
+ $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link'];
44
+ }
45
+ if( isset($redux_builder_amp['ampforwp-tag-base-removal-link']) ) {
46
+ $tagBaseRewrite = $redux_builder_amp['ampforwp-tag-base-removal-link'];
47
+ }
48
+ /* $catagoryStatusChanges = get_option('AMP-category-base-removal-status');
49
+ if($catagoryStatusChanges==$categoryBaseRewrite){
50
+ update_option('AMP-category-base-removal-status',$categoryBaseRewrite);
51
+ $wp_rerite->flush_rules( $hard );
52
+ } */
53
+ if($categoryBaseRewrite === '1'){
54
+ add_action( 'created_category', 'amp_flush_rewrite_rules', 999 );
55
+ add_action( 'edited_category', 'amp_flush_rewrite_rules', 999 );
56
+ add_action( 'delete_category', 'amp_flush_rewrite_rules', 999 );
57
+ add_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules');
58
+ }elseif($categoryBaseRewrite === '0'){
59
+ remove_action( 'created_category', 'amp_flush_rewrite_rules' , 999 );
60
+ remove_action( 'edited_category', 'amp_flush_rewrite_rules' , 999 );
61
+ remove_action( 'delete_category', 'amp_flush_rewrite_rules' , 999 );
62
+ remove_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules');
63
+
64
+ }
65
+ if( $tagBaseRewrite === '1'){
66
+ add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
67
+ add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
68
+ add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
69
+ add_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
70
+ }elseif( $tagBaseRewrite === '0' ) {
71
+ remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
72
+ remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
73
+ remove_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
74
+ remove_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
75
+ }
76
+ }
77
+
78
+
79
+
80
+
81
+ function amp_flush_rewrite_rules( $hard=true ) {
82
+ global $wp_rewrite;
83
+ $wp_rewrite->flush_rules( $hard );
84
+ }
85
+
86
+ function ampforwp_category_url_rewrite_rules( $rewrite ) {
87
+ global $redux_builder_amp, $wp_rewrite;
88
+ $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link'];
89
+ $categories = get_categories( array( 'hide_empty' => false ) );
90
+ if(is_array( $categories ) && ! empty( $categories ) ) {
91
+
92
+
93
+ foreach ( $categories as $category ) {
94
+ $category_nicename = $category->slug;
95
+ if ( $category->parent === $category->cat_ID ) {
96
+ $category->parent = 0;
97
+ } elseif ( 0 !== $category->parent ) {
98
+ $category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename;
99
+ }
100
+ $category_nicename = trim($category_nicename);
101
+
102
+ $rewrite[ '('.$category_nicename.')'.'/amp/?$' ] = 'index.php?amp&category_name=$matches[1]';
103
+ $rewrite[ '('.$category_nicename.')'.'/amp/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?amp&category_name=$matches[1]&paged=$matches[2]';
104
+
105
+ // Redirect support from Old Category Base
106
+ $old_category_base = get_option( 'category_base' ) ? get_option( 'category_base' ) : 'category';
107
+ $old_category_base = trim( $old_category_base, '/' );
108
+ $rewrite[ $old_category_base . '/(.*)$' ] = 'index.php?category_redirect=$matches[1]';
109
+
110
+ }
111
+ }
112
+ return $rewrite;
113
+ }
114
+
115
+
116
+ function ampforwp_tag_url_rewrite_rules( $rewrite ) {
117
+ $terms = get_terms( 'post_tag', array( 'hide_empty' => false ) );
118
+ foreach ( $terms as $term ) {
119
+ $term_nicename = trim($term->slug);
120
+
121
+ $rewrite[ '('.$term_nicename.')'.'/amp/?$' ] = 'index.php?amp&tag=$matches[1]';
122
+ $rewrite[ '('.$term_nicename.')'.'/amp/page/?([0-9]{1,})/?$' ] =
123
+ 'index.php?amp&tag=$matches[1]&paged=$matches[2]';
124
+ }
125
+
126
+ return $rewrite;
127
  }
base_remover/dependencyScript.js CHANGED
@@ -1,21 +1,21 @@
1
- jQuery(document).ready(function($){
2
-
3
- var myElement = document.getElementById('plugin-filter');
4
- //if( myElement.innerHtml!=''){
5
- if(window.addEventListener) {
6
- // Normal browsers
7
- myElement.addEventListener('DOMSubtreeModified', contentChanged, false);
8
- } else
9
- if(window.attachEvent) {
10
- myElement.attachEvent('DOMSubtreeModified', contentChanged,false);
11
- }
12
- //}
13
-
14
-
15
- function contentChanged() {
16
- if($('.plugin-card-amp').length>0){
17
- $('.plugin-card-amp').find('.plugin-action-buttons').find('li:first a').attr("href","#").attr('onclick','alert(\'AMP is already bundled with AMPforWP. Please do not install this plugin with AMPforWP to avoid conflicts.\')');
18
- }
19
- }
20
- contentChanged();
21
  });
1
+ jQuery(document).ready(function($){
2
+
3
+ var myElement = document.getElementById('plugin-filter');
4
+ //if( myElement.innerHtml!=''){
5
+ if(window.addEventListener) {
6
+ // Normal browsers
7
+ myElement.addEventListener('DOMSubtreeModified', contentChanged, false);
8
+ } else
9
+ if(window.attachEvent) {
10
+ myElement.attachEvent('DOMSubtreeModified', contentChanged,false);
11
+ }
12
+ //}
13
+
14
+
15
+ function contentChanged() {
16
+ if($('.plugin-card-amp').length>0){
17
+ $('.plugin-card-amp').find('.plugin-action-buttons').find('li:first a').attr("href","#").attr('onclick','alert(\'AMP is already bundled with AMPforWP. Please do not install this plugin with AMPforWP to avoid conflicts.\')');
18
+ }
19
+ }
20
+ contentChanged();
21
  });
classes/class-ampforwp-instagram-sanitizer.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- /**
3
- * Converts Instagram embeds to <amp-instagram>
4
- */
5
- class AMPFORWP_Instagram_Embed_Sanitizer extends AMP_Base_Sanitizer {
6
- private $instagram_medias = array();
7
- private static $script_slug = 'amp-instagram';
8
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-instagram-0.1.js';
9
- public function sanitize() {
10
- $body = $this->get_body_node();
11
- $xpath = new \DOMXPath($this->dom);
12
- $class_name = 'instagram-media';
13
- $blockquotes = $xpath->query("//*[contains(@class,'$class_name')]");
14
- foreach($blockquotes as $instagram_media){
15
- $this->replace_with_amp_instagram($instagram_media);
16
- }
17
- if(count($this->instagram_medias) > 0){
18
- $this->did_convert_elements = true;
19
- }
20
- }
21
- function replace_with_amp_instagram ($instagram_media){
22
- $medias = $instagram_media->getElementsByTagName('a');
23
- if($medias->length > 0){
24
- $media = $medias->item(0);
25
- $href = $media->getAttribute('href');
26
- $explode = explode('/', rtrim($href, '/'));
27
- $sourcecode = end($explode);
28
- $tag = $this->create_instagram_tag($sourcecode);
29
- $this->instagram_medias[] = $tag; // add it to array
30
- $instagram_media->parentNode->replaceChild( $tag, $instagram_media);
31
- }
32
- }
33
- function create_instagram_tag($sourcecode){
34
- $attrs = array(
35
- 'data-shortcode' => $sourcecode,
36
- 'width' => 400,
37
- 'height'=> 400,
38
- 'layout' => 'responsive'
39
- );
40
- return AMP_DOM_Utils::create_node($this->dom, 'amp-instagram', $attrs);
41
- }
42
- public function get_scripts() {
43
- if ( ! $this->did_convert_elements ) {
44
- return array();
45
- }
46
- return array( self::$script_slug => self::$script_src );
47
- }
48
  }
1
+ <?php
2
+ /**
3
+ * Converts Instagram embeds to <amp-instagram>
4
+ */
5
+ class AMPFORWP_Instagram_Embed_Sanitizer extends AMP_Base_Sanitizer {
6
+ private $instagram_medias = array();
7
+ private static $script_slug = 'amp-instagram';
8
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-instagram-0.1.js';
9
+ public function sanitize() {
10
+ $body = $this->get_body_node();
11
+ $xpath = new \DOMXPath($this->dom);
12
+ $class_name = 'instagram-media';
13
+ $blockquotes = $xpath->query("//*[contains(@class,'$class_name')]");
14
+ foreach($blockquotes as $instagram_media){
15
+ $this->replace_with_amp_instagram($instagram_media);
16
+ }
17
+ if(count($this->instagram_medias) > 0){
18
+ $this->did_convert_elements = true;
19
+ }
20
+ }
21
+ function replace_with_amp_instagram ($instagram_media){
22
+ $medias = $instagram_media->getElementsByTagName('a');
23
+ if($medias->length > 0){
24
+ $media = $medias->item(0);
25
+ $href = $media->getAttribute('href');
26
+ $explode = explode('/', rtrim($href, '/'));
27
+ $sourcecode = end($explode);
28
+ $tag = $this->create_instagram_tag($sourcecode);
29
+ $this->instagram_medias[] = $tag; // add it to array
30
+ $instagram_media->parentNode->replaceChild( $tag, $instagram_media);
31
+ }
32
+ }
33
+ function create_instagram_tag($sourcecode){
34
+ $attrs = array(
35
+ 'data-shortcode' => $sourcecode,
36
+ 'width' => 400,
37
+ 'height'=> 400,
38
+ 'layout' => 'responsive'
39
+ );
40
+ return AMP_DOM_Utils::create_node($this->dom, 'amp-instagram', $attrs);
41
+ }
42
+ public function get_scripts() {
43
+ if ( ! $this->did_convert_elements ) {
44
+ return array();
45
+ }
46
+ return array( self::$script_slug => self::$script_src );
47
+ }
48
  }
classes/class-ampforwp-youtube-embed.php CHANGED
@@ -1,133 +1,133 @@
1
- <?php require_once AMP__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php';
2
-
3
- // Much of this class is borrowed from Jetpack embeds
4
- class AMPforWP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
5
- const SHORT_URL_HOST = 'youtu.be';
6
- // Only handling single videos. Playlists are handled elsewhere.
7
- const URL_PATTERN = '#https?://(?:www\.)?(?:youtube.com/(?:v/|e/|embed/|watch[/\#?])|youtu\.be/).*#i';
8
- const RATIO = 0.5625;
9
-
10
- protected $DEFAULT_WIDTH = 600;
11
- protected $DEFAULT_HEIGHT = 338;
12
-
13
- private static $script_slug = 'amp-youtube';
14
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-youtube-0.1.js';
15
-
16
- function __construct( $args = array() ) {
17
- parent::__construct( $args );
18
-
19
- if ( isset( $this->args['content_max_width'] ) ) {
20
- $max_width = $this->args['content_max_width'];
21
- $this->args['width'] = $max_width;
22
- $this->args['height'] = round( $max_width * self::RATIO );
23
- }
24
- }
25
-
26
- function register_embed() {
27
- wp_embed_register_handler( 'amp-youtube', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
28
- add_shortcode( 'youtube', array( $this, 'shortcode' ) );
29
- }
30
-
31
- public function unregister_embed() {
32
- wp_embed_unregister_handler( 'amp-youtube', -1 );
33
- remove_shortcode( 'youtube' );
34
- }
35
-
36
- public function get_scripts() {
37
- if ( ! $this->did_convert_elements ) {
38
- return array();
39
- }
40
-
41
- return array( self::$script_slug => self::$script_src );
42
- }
43
-
44
- public function shortcode( $attr ) {
45
- $url = false;
46
- $video_id = false;
47
- if ( isset( $attr[0] ) ) {
48
- $url = ltrim( $attr[0] , '=' );
49
- } elseif ( function_exists ( 'ampforwp_youtube_shortcode' ) ) {
50
- $url = ampforwp_youtube_shortcode( $attr );
51
- }
52
-
53
- if ( empty( $url ) ) {
54
- return '';
55
- }
56
-
57
- $video_id = $this->get_video_id_from_url( $url );
58
-
59
- return $this->render( array(
60
- 'url' => $url,
61
- 'video_id' => $video_id,
62
- ) );
63
- }
64
-
65
-
66
- public function oembed( $matches, $attr, $url, $rawattr ) {
67
- return $this->shortcode( array( $url ) );
68
- }
69
-
70
- public function render( $args ) {
71
- $args = wp_parse_args( $args, array(
72
- 'video_id' => false,
73
- ) );
74
-
75
- if ( empty( $args['video_id'] ) ) {
76
- return AMP_HTML_Utils::build_tag( 'a', array( 'href' => esc_url( $args['url'] ), 'class' => 'amp-wp-embed-fallback' ), esc_html( $args['url'] ) );
77
- }
78
-
79
- $this->did_convert_elements = true;
80
- // Return it with a filter for the modification purpose #1378
81
- return AMP_HTML_Utils::build_tag(
82
- 'amp-youtube',apply_filters('amp_youtube_params',
83
- array(
84
- 'data-videoid' => $args['video_id'],
85
- 'layout' => 'responsive',
86
- 'width' => $this->args['width'],
87
- 'height' => $this->args['height'],
88
- ) )
89
- );
90
- }
91
-
92
- private function get_video_id_from_url( $url ) {
93
- $video_id = false;
94
- $parsed_url = parse_url( $url );
95
- if(!isset($parsed_url['host'])){
96
- $parsed_url['host'] = '';
97
- }
98
- if ( self::SHORT_URL_HOST === substr( $parsed_url['host'], -strlen( self::SHORT_URL_HOST ) ) ) {
99
- // youtu.be/{id}
100
- $parts = explode( '/', $parsed_url['path'] );
101
- if ( ! empty( $parts ) ) {
102
- $video_id = $parts[1];
103
- }
104
- } else {
105
- // ?v={id} or ?list={id}
106
- parse_str( $parsed_url['query'], $query_args );
107
-
108
- if ( isset( $query_args['v'] ) ) {
109
- $video_id = $this->sanitize_v_arg( $query_args['v'] );
110
- }
111
- }
112
-
113
- if ( empty( $video_id ) ) {
114
- // /(v|e|embed)/{id}
115
- $parts = explode( '/', $parsed_url['path'] );
116
-
117
- if ( in_array( $parts[1], array( 'v', 'e', 'embed' ) ) ) {
118
- $video_id = $parts[2];
119
- }
120
- }
121
-
122
- return $video_id;
123
- }
124
-
125
- private function sanitize_v_arg( $value ) {
126
- // Deal with broken params like `?v=123?rel=0`
127
- if ( false !== strpos( $value, '?' ) ) {
128
- $value = strtok( $value, '?' );
129
- }
130
-
131
- return $value;
132
- }
133
  }
1
+ <?php require_once AMP__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php';
2
+
3
+ // Much of this class is borrowed from Jetpack embeds
4
+ class AMPforWP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
5
+ const SHORT_URL_HOST = 'youtu.be';
6
+ // Only handling single videos. Playlists are handled elsewhere.
7
+ const URL_PATTERN = '#https?://(?:www\.)?(?:youtube.com/(?:v/|e/|embed/|watch[/\#?])|youtu\.be/).*#i';
8
+ const RATIO = 0.5625;
9
+
10
+ protected $DEFAULT_WIDTH = 600;
11
+ protected $DEFAULT_HEIGHT = 338;
12
+
13
+ private static $script_slug = 'amp-youtube';
14
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-youtube-0.1.js';
15
+
16
+ function __construct( $args = array() ) {
17
+ parent::__construct( $args );
18
+
19
+ if ( isset( $this->args['content_max_width'] ) ) {
20
+ $max_width = $this->args['content_max_width'];
21
+ $this->args['width'] = $max_width;
22
+ $this->args['height'] = round( $max_width * self::RATIO );
23
+ }
24
+ }
25
+
26
+ function register_embed() {
27
+ wp_embed_register_handler( 'amp-youtube', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
28
+ add_shortcode( 'youtube', array( $this, 'shortcode' ) );
29
+ }
30
+
31
+ public function unregister_embed() {
32
+ wp_embed_unregister_handler( 'amp-youtube', -1 );
33
+ remove_shortcode( 'youtube' );
34
+ }
35
+
36
+ public function get_scripts() {
37
+ if ( ! $this->did_convert_elements ) {
38
+ return array();
39
+ }
40
+
41
+ return array( self::$script_slug => self::$script_src );
42
+ }
43
+
44
+ public function shortcode( $attr ) {
45
+ $url = false;
46
+ $video_id = false;
47
+ if ( isset( $attr[0] ) ) {
48
+ $url = ltrim( $attr[0] , '=' );
49
+ } elseif ( function_exists ( 'ampforwp_youtube_shortcode' ) ) {
50
+ $url = ampforwp_youtube_shortcode( $attr );
51
+ }
52
+
53
+ if ( empty( $url ) ) {
54
+ return '';
55
+ }
56
+
57
+ $video_id = $this->get_video_id_from_url( $url );
58
+
59
+ return $this->render( array(
60
+ 'url' => $url,
61
+ 'video_id' => $video_id,
62
+ ) );
63
+ }
64
+
65
+
66
+ public function oembed( $matches, $attr, $url, $rawattr ) {
67
+ return $this->shortcode( array( $url ) );
68
+ }
69
+
70
+ public function render( $args ) {
71
+ $args = wp_parse_args( $args, array(
72
+ 'video_id' => false,
73
+ ) );
74
+
75
+ if ( empty( $args['video_id'] ) ) {
76
+ return AMP_HTML_Utils::build_tag( 'a', array( 'href' => esc_url( $args['url'] ), 'class' => 'amp-wp-embed-fallback' ), esc_html( $args['url'] ) );
77
+ }
78
+
79
+ $this->did_convert_elements = true;
80
+ // Return it with a filter for the modification purpose #1378
81
+ return AMP_HTML_Utils::build_tag(
82
+ 'amp-youtube',apply_filters('amp_youtube_params',
83
+ array(
84
+ 'data-videoid' => $args['video_id'],
85
+ 'layout' => 'responsive',
86
+ 'width' => $this->args['width'],
87
+ 'height' => $this->args['height'],
88
+ ) )
89
+ );
90
+ }
91
+
92
+ private function get_video_id_from_url( $url ) {
93
+ $video_id = false;
94
+ $parsed_url = parse_url( $url );
95
+ if(!isset($parsed_url['host'])){
96
+ $parsed_url['host'] = '';
97
+ }
98
+ if ( self::SHORT_URL_HOST === substr( $parsed_url['host'], -strlen( self::SHORT_URL_HOST ) ) ) {
99
+ // youtu.be/{id}
100
+ $parts = explode( '/', $parsed_url['path'] );
101
+ if ( ! empty( $parts ) ) {
102
+ $video_id = $parts[1];
103
+ }
104
+ } else {
105
+ // ?v={id} or ?list={id}
106
+ parse_str( $parsed_url['query'], $query_args );
107
+
108
+ if ( isset( $query_args['v'] ) ) {
109
+ $video_id = $this->sanitize_v_arg( $query_args['v'] );
110
+ }
111
+ }
112
+
113
+ if ( empty( $video_id ) ) {
114
+ // /(v|e|embed)/{id}
115
+ $parts = explode( '/', $parsed_url['path'] );
116
+
117
+ if ( in_array( $parts[1], array( 'v', 'e', 'embed' ) ) ) {
118
+ $video_id = $parts[2];
119
+ }
120
+ }
121
+
122
+ return $video_id;
123
+ }
124
+
125
+ private function sanitize_v_arg( $value ) {
126
+ // Deal with broken params like `?v=123?rel=0`
127
+ if ( false !== strpos( $value, '?' ) ) {
128
+ $value = strtok( $value, '?' );
129
+ }
130
+
131
+ return $value;
132
+ }
133
  }
classes/class-init.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php if ( ! class_exists( 'Ampforwp_Loader', false ) ) {
2
- class Ampforwp_Loader {
3
- public function __construct() {
4
- $this->load_required_files();
5
- }
6
- public function load_required_files() {
7
- require AMPFORWP_PLUGIN_DIR . '/templates/features.php';
8
- require AMPFORWP_PLUGIN_DIR . '/templates/instant-articles/instant-article-sanitizer.php';
9
- }
10
- }
11
  } ?>
1
+ <?php if ( ! class_exists( 'Ampforwp_Loader', false ) ) {
2
+ class Ampforwp_Loader {
3
+ public function __construct() {
4
+ $this->load_required_files();
5
+ }
6
+ public function load_required_files() {
7
+ require AMPFORWP_PLUGIN_DIR . '/templates/features.php';
8
+ require AMPFORWP_PLUGIN_DIR . '/templates/instant-articles/instant-article-sanitizer.php';
9
+ }
10
+ }
11
  } ?>
components/author-box/author-box.php CHANGED
@@ -1,86 +1,86 @@
1
- <?php
2
- function ampforwp_framework_get_author_box( $args=array() ) {
3
- global $post, $redux_builder_amp;
4
- $post_author = get_userdata($post->post_author);
5
- if ( ! is_array($args) ) {
6
- $args = array();
7
- }
8
-
9
- $avatar = false; //To show author Avater
10
- $avatar_size = 40;
11
- $author_description = false;
12
- $class = $author_prefix = $author_wrapper_class = '';
13
- $show_date = false;
14
- $show_time = false;
15
- $author_link = get_author_posts_url($post_author->ID);
16
- $author_image_wrapper = '';
17
-
18
- if ( isset($args['avatar']) ) {
19
- $avatar = $args['avatar'];
20
- }
21
- if ( isset($args['avatar_size']) ) {
22
- $avatar_size = $args['avatar_size'];
23
- }
24
- if ( isset($args['class']) ) {
25
- $class = $args['class'];
26
- }
27
- if ( isset($args['author_description']) ) {
28
- $author_description = $args['author_description'];
29
- }
30
-
31
-
32
- if ( isset( $args['author_prefix']) ) {
33
- $author_prefix = $args['author_prefix'];
34
- }
35
- //$author_prefix = ampforwp_translation($redux_builder_amp['amp-translator-by-text'] , $author_prefix );
36
-
37
- if ( isset( $args['author_link']) ) {
38
- $author_link = $args['author_link'];
39
- }
40
- if ( isset( $args['author_wrapper_class']) ) {
41
- $author_wrapper_class = $args['author_wrapper_class'];
42
- }
43
-
44
- if ( isset($args['author_image_wrapper']) ) {
45
- $author_image_wrapper = $args['author_image_wrapper'];
46
- }
47
- if ( isset($args['show_date']) ) {
48
- $show_date = $args['show_date'];
49
- }
50
- if ( isset($args['show_time']) ) {
51
- $show_time = $args['show_time'];
52
- }
53
-
54
- ?>
55
- <div class="amp-author <?php echo $class; ?>">
56
- <?php if ( $avatar ) {
57
- $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
58
- ?>
59
- <div class="amp-author-image <?php echo $author_image_wrapper; ?>">
60
- <amp-img src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
61
- </div>
62
- <?php } ?>
63
- <?php echo '<div class="author-details '. $author_wrapper_class .'">';
64
- if ( true == $redux_builder_amp['ampforwp-author-page-url'] ){
65
- echo '<span class="author-name">' .$author_prefix . ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $post_author->display_name ).'</a></span>';
66
- }
67
- else
68
- echo '<span class="author-name">' . $author_prefix . esc_html( $post_author->display_name ) . '</span>';
69
-
70
- //to show date and time
71
- if ( $show_date || $show_time ) {
72
- echo '<span class="posted-time"> ';
73
- if ( $show_date ) {
74
- echo esc_html( get_the_date() ) . ' ';
75
- }
76
- if ( $show_time ) {
77
- echo esc_html( get_the_time());
78
- }
79
- echo '</span>';
80
- }
81
- if ( $author_description ) {
82
- echo "<p>".$post_author->description."</p>";
83
- } ?>
84
- </div>
85
- </div>
86
  <?php }
1
+ <?php
2
+ function ampforwp_framework_get_author_box( $args=array() ) {
3
+ global $post, $redux_builder_amp;
4
+ $post_author = get_userdata($post->post_author);
5
+ if ( ! is_array($args) ) {
6
+ $args = array();
7
+ }
8
+
9
+ $avatar = false; //To show author Avater
10
+ $avatar_size = 40;
11
+ $author_description = false;
12
+ $class = $author_prefix = $author_wrapper_class = '';
13
+ $show_date = false;
14
+ $show_time = false;
15
+ $author_link = get_author_posts_url($post_author->ID);
16
+ $author_image_wrapper = '';
17
+
18
+ if ( isset($args['avatar']) ) {
19
+ $avatar = $args['avatar'];
20
+ }
21
+ if ( isset($args['avatar_size']) ) {
22
+ $avatar_size = $args['avatar_size'];
23
+ }
24
+ if ( isset($args['class']) ) {
25
+ $class = $args['class'];
26
+ }
27
+ if ( isset($args['author_description']) ) {
28
+ $author_description = $args['author_description'];
29
+ }
30
+
31
+
32
+ if ( isset( $args['author_prefix']) ) {
33
+ $author_prefix = $args['author_prefix'];
34
+ }
35
+ //$author_prefix = ampforwp_translation($redux_builder_amp['amp-translator-by-text'] , $author_prefix );
36
+
37
+ if ( isset( $args['author_link']) ) {
38
+ $author_link = $args['author_link'];
39
+ }
40
+ if ( isset( $args['author_wrapper_class']) ) {
41
+ $author_wrapper_class = $args['author_wrapper_class'];
42
+ }
43
+
44
+ if ( isset($args['author_image_wrapper']) ) {
45
+ $author_image_wrapper = $args['author_image_wrapper'];
46
+ }
47
+ if ( isset($args['show_date']) ) {
48
+ $show_date = $args['show_date'];
49
+ }
50
+ if ( isset($args['show_time']) ) {
51
+ $show_time = $args['show_time'];
52
+ }
53
+
54
+ ?>
55
+ <div class="amp-author <?php echo $class; ?>">
56
+ <?php if ( $avatar ) {
57
+ $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
58
+ ?>
59
+ <div class="amp-author-image <?php echo $author_image_wrapper; ?>">
60
+ <amp-img src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
61
+ </div>
62
+ <?php } ?>
63
+ <?php echo '<div class="author-details '. $author_wrapper_class .'">';
64
+ if ( true == $redux_builder_amp['ampforwp-author-page-url'] ){
65
+ echo '<span class="author-name">' .$author_prefix . ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $post_author->display_name ).'</a></span>';
66
+ }
67
+ else
68
+ echo '<span class="author-name">' . $author_prefix . esc_html( $post_author->display_name ) . '</span>';
69
+
70
+ //to show date and time
71
+ if ( $show_date || $show_time ) {
72
+ echo '<span class="posted-time"> ';
73
+ if ( $show_date ) {
74
+ echo esc_html( get_the_date() ) . ' ';
75
+ }
76
+ if ( $show_time ) {
77
+ echo esc_html( get_the_time());
78
+ }
79
+ echo '</span>';
80
+ }
81
+ if ( $author_description ) {
82
+ echo "<p>".$post_author->description."</p>";
83
+ } ?>
84
+ </div>
85
+ </div>
86
  <?php }
components/breadcrumb/breadcrumb.php CHANGED
@@ -1,219 +1,219 @@
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
- // Settings
12
- $breadcrums_id = 'breadcrumbs';
13
- $breadcrums_class = 'breadcrumbs';
14
- $home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
15
-
16
- // If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
17
- $custom_taxonomy = 'product_cat';
18
-
19
- // Get the query & post information
20
- global $post,$wp_query;
21
-
22
- // Do not display on the homepage
23
- if ( !is_front_page() ) {
24
-
25
- // Build the breadcrums
26
- echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
27
-
28
- // Home page
29
- echo '<li class="item-home"><a class="bread-link bread-home" href="' . esc_url(ampforwp_url_controller( get_home_url('', '/'), $home_non_amp )) . '" title="' . $home_title . '">' . $home_title . '</a></li>';
30
-
31
- if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
32
-
33
-
34
- echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . post_type_archive_title($prefix, false) . '</strong></li>';
35
- } else if ( is_author() ) {
36
- global $author;
37
-
38
- $userdata = get_userdata( $author );
39
- $author_url= get_author_posts_url($userdata->ID);
40
- $author_url = trailingslashit($author_url);
41
- // Display author name
42
- echo '<li class="item-current item-current-' . $userdata->user_nicename . '"><a class="bread-current bread-current-' . $userdata->user_nicename . '" title="' . $userdata->display_name . '" href="'. esc_url(ampforwp_url_controller( $author_url, $archive_non_amp )). '">' . 'Author: ' . $userdata->display_name . '</a></li>';
43
-
44
- } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
45
-
46
- // If post is a custom post type
47
- $post_type = get_post_type();
48
-
49
- // If it is a custom post type display name and link
50
- if($post_type != 'post') {
51
-
52
- $post_type_object = get_post_type_object($post_type);
53
- $post_type_archive = get_post_type_archive_link($post_type);
54
- if ( false != $post_type_archive){
55
- echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><a class="bread-cat bread-custom-post-type-' . $post_type . '" href="' .esc_url(ampforwp_url_controller( $post_type_archive, $archive_non_amp )) . '" title="' . $post_type_object->labels->name . '">' . $post_type_object->labels->name . '</a></li>';
56
- }
57
- else {
58
- echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><span class="bread-cat bread-custom-post-type-' . $post_type . '">' . $post_type_object->labels->name . '</span></li>';
59
- }
60
- }
61
-
62
- $custom_tax_name = get_queried_object()->name;
63
- echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . $custom_tax_name . '</strong></li>';
64
- } else if ( is_single() ) {
65
-
66
- // If post is a custom post type
67
- $post_type = get_post_type();
68
-
69
- // If it is a custom post type display name and link
70
- if($post_type != 'post') {
71
-
72
- $post_type_object = get_post_type_object($post_type);
73
- $post_type_archive = get_post_type_archive_link($post_type);
74
- if ( false != $post_type_archive){
75
- echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><a class="bread-cat bread-custom-post-type-' . $post_type . '" href="' .esc_url(ampforwp_url_controller( $post_type_archive, $archive_non_amp )) . '" title="' . $post_type_object->labels->name . '">' . $post_type_object->labels->name . '</a></li>';
76
- }
77
- else {
78
- echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><span class="bread-cat bread-custom-post-type-' . $post_type . '">' . $post_type_object->labels->name . '</span></li>';
79
- }
80
- }
81
-
82
- // Get post category info
83
- $category = get_the_category();
84
-
85
- if(!empty($category)) {
86
-
87
- // Get last category post is in
88
- $last_category = array_values($category);
89
- $last_category = end($last_category);
90
- $category_name = get_category($last_category);
91
- // Get parent any categories and create array
92
- $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, ','),',');
93
- $cat_parents = explode(',',$get_cat_parents);
94
-
95
- // Loop through parent categories and store in variable $cat_display
96
- $cat_display = '';
97
- foreach($cat_parents as $parents) {
98
- $cat_id = get_cat_ID( $parents);
99
- $cat_link = get_category_link($cat_id);
100
- $cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url(ampforwp_url_controller( $cat_link, $archive_non_amp )).'" title="' . $parents . '">' . $parents . '</a></li>';
101
- }
102
- }
103
-
104
- // If it's a custom post type within a custom taxonomy
105
- $taxonomy_exists = taxonomy_exists($custom_taxonomy);
106
- if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {
107
-
108
- $taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );
109
- if ( $taxonomy_terms ) {
110
- $cat_id = $taxonomy_terms[0]->term_id;
111
- $cat_nicename = $taxonomy_terms[0]->slug;
112
- $cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);
113
- $cat_link = trailingslashit($cat_link);
114
- $cat_name = $taxonomy_terms[0]->name;
115
- }
116
- }
117
-
118
- // Check if the post is in a category
119
- if(!empty($last_category)) {
120
- echo $cat_display;
121
-
122
- // Else if post is in a custom taxonomy
123
- } else if(!empty($cat_id)) {
124
-
125
- echo '<li class="item-cat item-cat-' . $cat_id . ' item-cat-' . $cat_nicename . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $cat_nicename . '" href="' . esc_url(ampforwp_url_controller( $cat_link, $archive_non_amp )) . '" title="' . $cat_name . '">' . $cat_name . '</a></li>';
126
- }
127
-
128
- } else if ( is_category() ) {
129
-
130
- // Category page
131
- echo '<li class="item-current item-cat"><strong class="bread-current bread-cat">' . single_cat_title('', false) . '</strong></li>';
132
- } else if ( is_page() ) {
133
-
134
- // Standard page
135
- if( $post->post_parent ){
136
-
137
- // If child page, get parents
138
- $anc = get_post_ancestors( $post->ID );
139
-
140
- // Get parents in the right order
141
- $anc = array_reverse($anc);
142
-
143
- // Parent page loop
144
- if ( !isset( $parents ) ) $parents = null;
145
- foreach ( $anc as $ancestor ) {
146
- $parents .= '<li class="item-parent item-parent-' . $ancestor . '"><a class="bread-parent bread-parent-' . $ancestor . '" href="' . esc_url(ampforwp_url_controller( get_permalink( $ancestor ), $archive_non_amp )) . '" title="' . get_the_title($ancestor) . '">' . get_the_title($ancestor) . '</a></li>';
147
- }
148
-
149
- // Display parent pages
150
- echo $parents;
151
-
152
- // Current page
153
-
154
- }
155
-
156
- } else if ( is_tag() ) {
157
-
158
- // Tag page
159
-
160
- // Get tag information
161
- $term_id = get_query_var('tag_id');
162
- $taxonomy = 'post_tag';
163
- $args = 'include=' . $term_id;
164
- $terms = get_terms( $taxonomy, $args );
165
- $get_term_id = $terms[0]->term_id;
166
- $get_term_slug = $terms[0]->slug;
167
- $get_term_name = $terms[0]->name;
168
-
169
- // Display the tag name
170
- echo '<li class="item-current item-tag-' . $get_term_id . ' item-tag-' . $get_term_slug . '"><strong class="bread-current bread-tag-' . $get_term_id . ' bread-tag-' . $get_term_slug . '">' . $get_term_name . '</strong></li>';
171
- } elseif ( is_day() ) {
172
-
173
- // Day archive
174
-
175
- // Year link
176
- 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') . ' Archives</a></li>';
177
-
178
- // Month link
179
- 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') . ' Archives</a></li>';
180
-
181
-
182
- // Day display
183
- 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') . ' Archives</strong></li>';
184
-
185
- } else if ( is_month() ) {
186
-
187
- // Month Archive
188
-
189
- // Year link
190
- 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') . ' Archives</a></li>';
191
-
192
- // Month display
193
- 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') . ' Archives</strong></li>';
194
-
195
- } else if ( is_year() ) {
196
-
197
- // Display year archive
198
- 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') . ' Archives</strong></li>';
199
-
200
- } else if ( get_query_var('paged') ) {
201
-
202
- // Paginated archives
203
- echo '<li class="item-current item-current-' . get_query_var('paged') . '"><strong class="bread-current bread-current-' . get_query_var('paged') . '" title="Page ' . get_query_var('paged') . '">'.__('Page') . ' ' . get_query_var('paged') . '</strong></li>';
204
-
205
- } else if ( is_search() ) {
206
-
207
- // Search results page
208
- echo '<li class="item-current item-current-' . get_search_query() . '"><strong class="bread-current bread-current-' . get_search_query() . '" title="Search results for: ' . get_search_query() . '">Search results for: ' . get_search_query() . '</strong></li>';
209
-
210
- } elseif ( is_404() ) {
211
-
212
- // 404 page
213
- echo '<li>' . 'Error 404' . '</li>';
214
- }
215
- echo '</ul>';
216
-
217
- }?>
218
- </div>
219
  <?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
+ // Settings
12
+ $breadcrums_id = 'breadcrumbs';
13
+ $breadcrums_class = 'breadcrumbs';
14
+ $home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
15
+
16
+ // If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
17
+ $custom_taxonomy = 'product_cat';
18
+
19
+ // Get the query & post information
20
+ global $post,$wp_query;
21
+
22
+ // Do not display on the homepage
23
+ if ( !is_front_page() ) {
24
+
25
+ // Build the breadcrums
26
+ echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
27
+
28
+ // Home page
29
+ echo '<li class="item-home"><a class="bread-link bread-home" href="' . esc_url(ampforwp_url_controller( get_home_url('', '/'), $home_non_amp )) . '" title="' . $home_title . '">' . $home_title . '</a></li>';
30
+
31
+ if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
32
+
33
+
34
+ echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . post_type_archive_title($prefix, false) . '</strong></li>';
35
+ } else if ( is_author() ) {
36
+ global $author;
37
+
38
+ $userdata = get_userdata( $author );
39
+ $author_url= get_author_posts_url($userdata->ID);
40
+ $author_url = trailingslashit($author_url);
41
+ // Display author name
42
+ echo '<li class="item-current item-current-' . $userdata->user_nicename . '"><a class="bread-current bread-current-' . $userdata->user_nicename . '" title="' . $userdata->display_name . '" href="'. esc_url(ampforwp_url_controller( $author_url, $archive_non_amp )). '">' . 'Author: ' . $userdata->display_name . '</a></li>';
43
+
44
+ } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
45
+
46
+ // If post is a custom post type
47
+ $post_type = get_post_type();
48
+
49
+ // If it is a custom post type display name and link
50
+ if($post_type != 'post') {
51
+
52
+ $post_type_object = get_post_type_object($post_type);
53
+ $post_type_archive = get_post_type_archive_link($post_type);
54
+ if ( false != $post_type_archive){
55
+ echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><a class="bread-cat bread-custom-post-type-' . $post_type . '" href="' .esc_url(ampforwp_url_controller( $post_type_archive, $archive_non_amp )) . '" title="' . $post_type_object->labels->name . '">' . $post_type_object->labels->name . '</a></li>';
56
+ }
57
+ else {
58
+ echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><span class="bread-cat bread-custom-post-type-' . $post_type . '">' . $post_type_object->labels->name . '</span></li>';
59
+ }
60
+ }
61
+
62
+ $custom_tax_name = get_queried_object()->name;
63
+ echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . $custom_tax_name . '</strong></li>';
64
+ } else if ( is_single() ) {
65
+
66
+ // If post is a custom post type
67
+ $post_type = get_post_type();
68
+
69
+ // If it is a custom post type display name and link
70
+ if($post_type != 'post') {
71
+
72
+ $post_type_object = get_post_type_object($post_type);
73
+ $post_type_archive = get_post_type_archive_link($post_type);
74
+ if ( false != $post_type_archive){
75
+ echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><a class="bread-cat bread-custom-post-type-' . $post_type . '" href="' .esc_url(ampforwp_url_controller( $post_type_archive, $archive_non_amp )) . '" title="' . $post_type_object->labels->name . '">' . $post_type_object->labels->name . '</a></li>';
76
+ }
77
+ else {
78
+ echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><span class="bread-cat bread-custom-post-type-' . $post_type . '">' . $post_type_object->labels->name . '</span></li>';
79
+ }
80
+ }
81
+
82
+ // Get post category info
83
+ $category = get_the_category();
84
+
85
+ if(!empty($category)) {
86
+
87
+ // Get last category post is in
88
+ $last_category = array_values($category);
89
+ $last_category = end($last_category);
90
+ $category_name = get_category($last_category);
91
+ // Get parent any categories and create array
92
+ $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, ','),',');
93
+ $cat_parents = explode(',',$get_cat_parents);
94
+
95
+ // Loop through parent categories and store in variable $cat_display
96
+ $cat_display = '';
97
+ foreach($cat_parents as $parents) {
98
+ $cat_id = get_cat_ID( $parents);
99
+ $cat_link = get_category_link($cat_id);
100
+ $cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url(ampforwp_url_controller( $cat_link, $archive_non_amp )).'" title="' . $parents . '">' . $parents . '</a></li>';
101
+ }
102
+ }
103
+
104
+ // If it's a custom post type within a custom taxonomy
105
+ $taxonomy_exists = taxonomy_exists($custom_taxonomy);
106
+ if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {
107
+
108
+ $taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );
109
+ if ( $taxonomy_terms ) {
110
+ $cat_id = $taxonomy_terms[0]->term_id;
111
+ $cat_nicename = $taxonomy_terms[0]->slug;
112
+ $cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);
113
+ $cat_link = trailingslashit($cat_link);
114
+ $cat_name = $taxonomy_terms[0]->name;
115
+ }
116
+ }
117
+
118
+ // Check if the post is in a category
119
+ if(!empty($last_category)) {
120
+ echo $cat_display;
121
+
122
+ // Else if post is in a custom taxonomy
123
+ } else if(!empty($cat_id)) {
124
+
125
+ echo '<li class="item-cat item-cat-' . $cat_id . ' item-cat-' . $cat_nicename . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $cat_nicename . '" href="' . esc_url(ampforwp_url_controller( $cat_link, $archive_non_amp )) . '" title="' . $cat_name . '">' . $cat_name . '</a></li>';
126
+ }
127
+
128
+ } else if ( is_category() ) {
129
+
130
+ // Category page
131
+ echo '<li class="item-current item-cat"><strong class="bread-current bread-cat">' . single_cat_title('', false) . '</strong></li>';
132
+ } else if ( is_page() ) {
133
+
134
+ // Standard page
135
+ if( $post->post_parent ){
136
+
137
+ // If child page, get parents
138
+ $anc = get_post_ancestors( $post->ID );
139
+
140
+ // Get parents in the right order
141
+ $anc = array_reverse($anc);
142
+
143
+ // Parent page loop
144
+ if ( !isset( $parents ) ) $parents = null;
145
+ foreach ( $anc as $ancestor ) {
146
+ $parents .= '<li class="item-parent item-parent-' . $ancestor . '"><a class="bread-parent bread-parent-' . $ancestor . '" href="' . esc_url(ampforwp_url_controller( get_permalink( $ancestor ), $archive_non_amp )) . '" title="' . get_the_title($ancestor) . '">' . get_the_title($ancestor) . '</a></li>';
147
+ }
148
+
149
+ // Display parent pages
150
+ echo $parents;
151
+
152
+ // Current page
153
+
154
+ }
155
+
156
+ } else if ( is_tag() ) {
157
+
158
+ // Tag page
159
+
160
+ // Get tag information
161
+ $term_id = get_query_var('tag_id');
162
+ $taxonomy = 'post_tag';
163
+ $args = 'include=' . $term_id;
164
+ $terms = get_terms( $taxonomy, $args );
165
+ $get_term_id = $terms[0]->term_id;
166
+ $get_term_slug = $terms[0]->slug;
167
+ $get_term_name = $terms[0]->name;
168
+
169
+ // Display the tag name
170
+ echo '<li class="item-current item-tag-' . $get_term_id . ' item-tag-' . $get_term_slug . '"><strong class="bread-current bread-tag-' . $get_term_id . ' bread-tag-' . $get_term_slug . '">' . $get_term_name . '</strong></li>';
171
+ } elseif ( is_day() ) {
172
+
173
+ // Day archive
174
+
175
+ // Year link
176
+ 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') . ' Archives</a></li>';
177
+
178
+ // Month link
179
+ 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') . ' Archives</a></li>';
180
+
181
+
182
+ // Day display
183
+ 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') . ' Archives</strong></li>';
184
+
185
+ } else if ( is_month() ) {
186
+
187
+ // Month Archive
188
+
189
+ // Year link
190
+ 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') . ' Archives</a></li>';
191
+
192
+ // Month display
193
+ 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') . ' Archives</strong></li>';
194
+
195
+ } else if ( is_year() ) {
196
+
197
+ // Display year archive
198
+ 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') . ' Archives</strong></li>';
199
+
200
+ } else if ( get_query_var('paged') ) {
201
+
202
+ // Paginated archives
203
+ echo '<li class="item-current item-current-' . get_query_var('paged') . '"><strong class="bread-current bread-current-' . get_query_var('paged') . '" title="Page ' . get_query_var('paged') . '">'.__('Page') . ' ' . get_query_var('paged') . '</strong></li>';
204
+
205
+ } else if ( is_search() ) {
206
+
207
+ // Search results page
208
+ echo '<li class="item-current item-current-' . get_search_query() . '"><strong class="bread-current bread-current-' . get_search_query() . '" title="Search results for: ' . get_search_query() . '">Search results for: ' . get_search_query() . '</strong></li>';
209
+
210
+ } elseif ( is_404() ) {
211
+
212
+ // 404 page
213
+ echo '<li>' . 'Error 404' . '</li>';
214
+ }
215
+ echo '</ul>';
216
+
217
+ }?>
218
+ </div>
219
  <?php }
components/call-now/call-now.php CHANGED
@@ -1,16 +1,16 @@
1
- <?php
2
- add_action('amp_call_button','amp_call_button_html_output');
3
- function amp_call_button_html_output(){
4
- global $redux_builder_amp;
5
- if ( $redux_builder_amp['ampforwp-callnow-button'] ) { ?>
6
- <div class="amp-phone">
7
- <a href="tel:<?php echo $redux_builder_amp['enable-amp-call-numberfield']; ?>"></a>
8
- </div> <?php
9
- }
10
- }
11
- add_action('amp_post_template_css','amp_callnow_styles',11);
12
- function amp_callnow_styles(){
13
- global $redux_builder_amp; if ($redux_builder_amp['ampforwp-callnow-button']) { ?>
14
- .amp-phone{ position:relative }
15
- .amp-phone a:before { content: ""; display:inline-block; width: 4px; height: 8px; border-width: 6px 0 6px 3px; border-style: solid; border-color:<?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme-call']['color']; ?>; background: transparent; transform: rotate(-30deg); box-sizing: initial; border-top-left-radius: 3px 5px; border-bottom-left-radius: 3px 5px; }
16
  <?php }} ?>
1
+ <?php
2
+ add_action('amp_call_button','amp_call_button_html_output');
3
+ function amp_call_button_html_output(){
4
+ global $redux_builder_amp;
5
+ if ( $redux_builder_amp['ampforwp-callnow-button'] ) { ?>
6
+ <div class="amp-phone">
7
+ <a href="tel:<?php echo $redux_builder_amp['enable-amp-call-numberfield']; ?>"></a>
8
+ </div> <?php
9
+ }
10
+ }
11
+ add_action('amp_post_template_css','amp_callnow_styles',11);
12
+ function amp_callnow_styles(){
13
+ global $redux_builder_amp; if ($redux_builder_amp['ampforwp-callnow-button']) { ?>
14
+ .amp-phone{ position:relative }
15
+ .amp-phone a:before { content: ""; display:inline-block; width: 4px; height: 8px; border-width: 6px 0 6px 3px; border-style: solid; border-color:<?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme-call']['color']; ?>; background: transparent; transform: rotate(-30deg); box-sizing: initial; border-top-left-radius: 3px 5px; border-bottom-left-radius: 3px 5px; }
16
  <?php }} ?>
components/categories-tags/categories-tags.php CHANGED
@@ -1,45 +1,45 @@
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(){
8
- global $post, $redux_builder_amp;
9
- $ampforwp_categories = get_the_terms( $post->ID, 'category' );
10
- if ( $ampforwp_categories ) : ?>
11
- <div class="amp-category">
12
- <span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-categories-text'], 'Categories' ); ?></span>
13
- <?php foreach ($ampforwp_categories as $cat ) {
14
- if( true == $redux_builder_amp['ampforwp-archive-support'] && true == $redux_builder_amp['ampforwp-cats-tags-links-single']) {
15
- echo ('<span class="amp-cat amp-cat-'.$cat->term_id.'"><a href="'. ampforwp_url_controller( get_category_link( $cat->term_id ) ) .'" > '. $cat->name .'</a></span>');//#934
16
- } else {
17
- echo '<span class="amp-cat">'. $cat->name .'</span>';
18
- }
19
- } ?>
20
- </div>
21
- <?php endif;
22
- }
23
- function ampforwp_framework_get_tags_list(){
24
- global $post, $redux_builder_amp;
25
- $ampforwp_tags = get_the_terms( $post->ID, 'post_tag' );
26
- if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
27
- <div class="amp-tags">
28
- <?php /* if($redux_builder_amp['amp-rtl-select-option']==0) {
29
- global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'] .' ', 'accelerated-mobile-pages' ));
30
- }*/
31
- ?>
32
- <span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags' ); ?></span>
33
- <?php foreach ( $ampforwp_tags as $tag ) {
34
- if( true == $redux_builder_amp['ampforwp-archive-support'] && true == $redux_builder_amp['ampforwp-cats-tags-links-single'] ) {
35
- echo ('<span class="amp-tag amp-tag-'.$tag->term_id.'"><a href="'. ampforwp_url_controller( get_tag_link( $tag->term_id ) ).'" >'.$tag->name .'</a></span>');//#934
36
- } else {
37
- echo ('<span class="amp-tag">'.$tag->name.'</span>');
38
- }
39
- }
40
- /* if($redux_builder_amp['amp-rtl-select-option']) {
41
- global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'] .' ', 'accelerated-mobile-pages' ));
42
- }*/ ?>
43
- </div>
44
- <?php endif;
45
  }
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(){
8
+ global $post, $redux_builder_amp;
9
+ $ampforwp_categories = get_the_terms( $post->ID, 'category' );
10
+ if ( $ampforwp_categories ) : ?>
11
+ <div class="amp-category">
12
+ <span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-categories-text'], 'Categories' ); ?></span>
13
+ <?php foreach ($ampforwp_categories as $cat ) {
14
+ if( true == $redux_builder_amp['ampforwp-archive-support'] && true == $redux_builder_amp['ampforwp-cats-tags-links-single']) {
15
+ echo ('<span class="amp-cat amp-cat-'.$cat->term_id.'"><a href="'. ampforwp_url_controller( get_category_link( $cat->term_id ) ) .'" > '. $cat->name .'</a></span>');//#934
16
+ } else {
17
+ echo '<span class="amp-cat">'. $cat->name .'</span>';
18
+ }
19
+ } ?>
20
+ </div>
21
+ <?php endif;
22
+ }
23
+ function ampforwp_framework_get_tags_list(){
24
+ global $post, $redux_builder_amp;
25
+ $ampforwp_tags = get_the_terms( $post->ID, 'post_tag' );
26
+ if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
27
+ <div class="amp-tags">
28
+ <?php /* if($redux_builder_amp['amp-rtl-select-option']==0) {
29
+ global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'] .' ', 'accelerated-mobile-pages' ));
30
+ }*/
31
+ ?>
32
+ <span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags' ); ?></span>
33
+ <?php foreach ( $ampforwp_tags as $tag ) {
34
+ if( true == $redux_builder_amp['ampforwp-archive-support'] && true == $redux_builder_amp['ampforwp-cats-tags-links-single'] ) {
35
+ echo ('<span class="amp-tag amp-tag-'.$tag->term_id.'"><a href="'. ampforwp_url_controller( get_tag_link( $tag->term_id ) ).'" >'.$tag->name .'</a></span>');//#934
36
+ } else {
37
+ echo ('<span class="amp-tag">'.$tag->name.'</span>');
38
+ }
39
+ }
40
+ /* if($redux_builder_amp['amp-rtl-select-option']) {
41
+ global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'] .' ', 'accelerated-mobile-pages' ));
42
+ }*/ ?>
43
+ </div>
44
+ <?php endif;
45
  }
components/comments/comments.php CHANGED
@@ -1,172 +1,172 @@
1
- <?php
2
- function ampforwp_framework_get_comments(){
3
- global $redux_builder_amp;
4
- if ( ! comments_open() || false == $redux_builder_amp['wordpress-comments-support'] ) {
5
- return;
6
- }
7
- if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
8
- echo ampforwp_framework_get_facebook_comments();
9
- }
10
- if ( $redux_builder_amp['ampforwp-disqus-comments-support'] ) {
11
- ampforwp_framework_get_disqus_comments();
12
- }
13
- if ( true == $redux_builder_amp['wordpress-comments-support'] ) { ?>
14
- <div class="amp-comments">
15
- <?php
16
- global $redux_builder_amp;
17
- // Gather comments for a specific page/post
18
- $postID = get_the_ID();
19
- $comments = get_comments(array(
20
- 'post_id' => $postID,
21
- 'status' => 'approve' //Change this to the type of comments to be displayed
22
- ));
23
- if ( $comments ) { ?>
24
- <div class="amp-comments-wrapper">
25
- <h3><span><?php global $redux_builder_amp; echo ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'], 'View Comments' )?></span></h3>
26
- <ul>
27
- <?php
28
- // Display the list of comments
29
- function ampforwp_custom_translated_comment($comment, $args, $depth){
30
- $GLOBALS['comment'] = $comment;
31
- global $redux_builder_amp;
32
- $comment_author_img_url = "";
33
- $comment_author_img_url = ampforwp_get_comments_gravatar( $comment );
34
-
35
- ?>
36
- <li id="li-comment-<?php comment_ID() ?>"
37
- <?php comment_class(); ?> >
38
- <article id="comment-<?php comment_ID(); ?>" class="comment-body">
39
- <footer class="comment-meta">
40
- <?php if($comment_author_img_url){ ?>
41
- <amp-img src="<?php echo esc_url($comment_author_img_url); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
42
- <?php } ?>
43
- <div class="comment-author vcard">
44
- <?php
45
- printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
46
- </div>
47
- <div class="comment-metadata">
48
- <a href="<?php echo htmlspecialchars( trailingslashit( get_comment_link( $comment->comment_ID ) ) ) ?>">
49
- <?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())?>
50
- </a>
51
- <?php edit_comment_link( ampforwp_translation( $redux_builder_amp['amp-translator-Edit-text'], 'Edit' ) ) ?>
52
- </div>
53
- </footer>
54
- <div class="comment-content">
55
- <?php
56
- $comment_content = get_comment_text();
57
- $comment_content = wpautop( $comment_content );
58
- $sanitizer = new AMPFORWP_Content( $comment_content, array(), apply_filters( 'ampforwp_content_sanitizers', array(
59
- 'AMP_Img_Sanitizer' => array(),
60
- 'AMP_Video_Sanitizer' => array(),
61
- 'AMP_Style_Sanitizer' => array() ) ) );
62
- $sanitized_comment_content = $sanitizer->get_amp_content();
63
- echo make_clickable( $sanitized_comment_content ); ?>
64
- </div>
65
- <?php do_action('ampforwp_reply_comment_form', $comment, $args, $depth); ?>
66
- </article>
67
- </li>
68
- <?php }
69
- wp_list_comments( array(
70
- //Allow comment pagination
71
- 'per_page' => AMPFORWP_COMMENTS_PER_PAGE ,
72
- 'style' => 'li',
73
- 'type' => 'comment',
74
- 'max_depth' => 5,
75
- 'avatar_size' => 0,
76
- 'callback' => 'ampforwp_custom_translated_comment',
77
- 'reverse_top_level' => true //Show the latest comments at the top of the list
78
- ), $comments); ?>
79
- </ul>
80
- </div>
81
- <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
82
- if( ! is_plugin_active( 'amp-comments/amp-comments.php' ) ) { ?>
83
- <div class="amp-comment-button">
84
- <a href="<?php echo ampforwp_comment_button_url(); ?>" rel="nofollow"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-leave-a-comment-text'], 'Leave a Comment' ); ?></a>
85
- </div>
86
- <?php } ?>
87
- <?php
88
- } else {
89
- global $redux_builder_amp ;
90
- if (!comments_open()) {
91
- return;
92
- } ?>
93
- <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
94
- if( ! is_plugin_active( 'amp-comments/amp-comments.php' ) ) { ?>
95
- <div class="amp-comment-button">
96
- <a href="<?php echo ampforwp_comment_button_url(); ?>" rel="nofollow"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-leave-a-comment-text'], 'Leave a Comment' ); ?></a>
97
- </div>
98
- <?php } ?>
99
- <?php } ?>
100
- </div>
101
- <?php do_action('ampforwp_after_comment_hook');
102
-
103
- }
104
-
105
- }
106
-
107
- //Facebook Comments
108
- function ampforwp_framework_get_facebook_comments(){
109
- global $redux_builder_amp;
110
- $facebook_comments_markup = '';
111
- if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
112
- $facebook_comments_markup = '<section class="amp-facebook-comments">';
113
- $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
114
- layout="responsive" data-numposts=';
115
- $facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '" ';
116
-
117
- $facebook_comments_markup .= 'data-href=" ' . get_permalink() . ' "';
118
- $facebook_comments_markup .= '></amp-facebook-comments>';
119
-
120
- return $facebook_comments_markup;
121
- }
122
- }
123
-
124
- //Disqus Comments
125
- function ampforwp_framework_get_disqus_comments(){
126
- global $redux_builder_amp;
127
- if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
128
- global $post; $post_slug=$post->post_name;
129
-
130
- $disqus_script_host_url = "https://ampforwp.appspot.com/?api=". AMPFORWP_DISQUS_URL;
131
-
132
- if( $redux_builder_amp['ampforwp-disqus-host-position'] == 0 ) {
133
- $disqus_script_host_url = esc_url( $redux_builder_amp['ampforwp-disqus-host-file'] );
134
- }
135
-
136
- $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" ;
137
- ?>
138
- <section class="amp-disqus-comments">
139
- <amp-iframe
140
- height=200
141
- width=300
142
- layout="responsive"
143
- sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
144
- frameborder="0"
145
- src="<?php echo $disqus_url ?>" >
146
- <div overflow tabindex="0" role="button" aria-label="Read more"><?php echo __('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
147
- </amp-iframe>
148
- </section>
149
- <?php
150
- }
151
- }
152
-
153
- // Comments Scripts
154
- add_filter( 'amp_post_template_data', 'ampforwp_framework_comments_scripts' );
155
- function ampforwp_framework_comments_scripts( $data ) {
156
-
157
- $facebook_comments_check = ampforwp_framework_get_facebook_comments();
158
- global $redux_builder_amp;
159
- if ( $facebook_comments_check && $redux_builder_amp['ampforwp-facebook-comments-support'] && is_singular() ) {
160
- if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
161
- $data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
162
- }
163
- }
164
- if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && is_singular() && comments_open() ) {
165
- if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
166
- if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
167
- $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
168
- }
169
- }
170
- }
171
- return $data;
172
  }
1
+ <?php
2
+ function ampforwp_framework_get_comments(){
3
+ global $redux_builder_amp;
4
+ if ( ! comments_open() || false == $redux_builder_amp['wordpress-comments-support'] ) {
5
+ return;
6
+ }
7
+ if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
8
+ echo ampforwp_framework_get_facebook_comments();
9
+ }
10
+ if ( $redux_builder_amp['ampforwp-disqus-comments-support'] ) {
11
+ ampforwp_framework_get_disqus_comments();
12
+ }
13
+ if ( true == $redux_builder_amp['wordpress-comments-support'] ) { ?>
14
+ <div class="amp-comments">
15
+ <?php
16
+ global $redux_builder_amp;
17
+ // Gather comments for a specific page/post
18
+ $postID = get_the_ID();
19
+ $comments = get_comments(array(
20
+ 'post_id' => $postID,
21
+ 'status' => 'approve' //Change this to the type of comments to be displayed
22
+ ));
23
+ if ( $comments ) { ?>
24
+ <div class="amp-comments-wrapper">
25
+ <h3><span><?php global $redux_builder_amp; echo ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'], 'View Comments' )?></span></h3>
26
+ <ul>
27
+ <?php
28
+ // Display the list of comments
29
+ function ampforwp_custom_translated_comment($comment, $args, $depth){
30
+ $GLOBALS['comment'] = $comment;
31
+ global $redux_builder_amp;
32
+ $comment_author_img_url = "";
33
+ $comment_author_img_url = ampforwp_get_comments_gravatar( $comment );
34
+
35
+ ?>
36
+ <li id="li-comment-<?php comment_ID() ?>"
37
+ <?php comment_class(); ?> >
38
+ <article id="comment-<?php comment_ID(); ?>" class="comment-body">
39
+ <footer class="comment-meta">
40
+ <?php if($comment_author_img_url){ ?>
41
+ <amp-img src="<?php echo esc_url($comment_author_img_url); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
42
+ <?php } ?>
43
+ <div class="comment-author vcard">
44
+ <?php
45
+ printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
46
+ </div>
47
+ <div class="comment-metadata">
48
+ <a href="<?php echo htmlspecialchars( trailingslashit( get_comment_link( $comment->comment_ID ) ) ) ?>">
49
+ <?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())?>
50
+ </a>
51
+ <?php edit_comment_link( ampforwp_translation( $redux_builder_amp['amp-translator-Edit-text'], 'Edit' ) ) ?>
52
+ </div>
53
+ </footer>
54
+ <div class="comment-content">
55
+ <?php
56
+ $comment_content = get_comment_text();
57
+ $comment_content = wpautop( $comment_content );
58
+ $sanitizer = new AMPFORWP_Content( $comment_content, array(), apply_filters( 'ampforwp_content_sanitizers', array(
59
+ 'AMP_Img_Sanitizer' => array(),
60
+ 'AMP_Video_Sanitizer' => array(),
61
+ 'AMP_Style_Sanitizer' => array() ) ) );
62
+ $sanitized_comment_content = $sanitizer->get_amp_content();
63
+ echo make_clickable( $sanitized_comment_content ); ?>
64
+ </div>
65
+ <?php do_action('ampforwp_reply_comment_form', $comment, $args, $depth); ?>
66
+ </article>
67
+ </li>
68
+ <?php }
69
+ wp_list_comments( array(
70
+ //Allow comment pagination
71
+ 'per_page' => AMPFORWP_COMMENTS_PER_PAGE ,
72
+ 'style' => 'li',
73
+ 'type' => 'comment',
74
+ 'max_depth' => 5,
75
+ 'avatar_size' => 0,
76
+ 'callback' => 'ampforwp_custom_translated_comment',
77
+ 'reverse_top_level' => true //Show the latest comments at the top of the list
78
+ ), $comments); ?>
79
+ </ul>
80
+ </div>
81
+ <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
82
+ if( ! is_plugin_active( 'amp-comments/amp-comments.php' ) ) { ?>
83
+ <div class="amp-comment-button">
84
+ <a href="<?php echo ampforwp_comment_button_url(); ?>" rel="nofollow"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-leave-a-comment-text'], 'Leave a Comment' ); ?></a>
85
+ </div>
86
+ <?php } ?>
87
+ <?php
88
+ } else {
89
+ global $redux_builder_amp ;
90
+ if (!comments_open()) {
91
+ return;
92
+ } ?>
93
+ <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
94
+ if( ! is_plugin_active( 'amp-comments/amp-comments.php' ) ) { ?>
95
+ <div class="amp-comment-button">
96
+ <a href="<?php echo ampforwp_comment_button_url(); ?>" rel="nofollow"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-leave-a-comment-text'], 'Leave a Comment' ); ?></a>
97
+ </div>
98
+ <?php } ?>
99
+ <?php } ?>
100
+ </div>
101
+ <?php do_action('ampforwp_after_comment_hook');
102
+
103
+ }
104
+
105
+ }
106
+
107
+ //Facebook Comments
108
+ function ampforwp_framework_get_facebook_comments(){
109
+ global $redux_builder_amp;
110
+ $facebook_comments_markup = '';
111
+ if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
112
+ $facebook_comments_markup = '<section class="amp-facebook-comments">';
113
+ $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
114
+ layout="responsive" data-numposts=';
115
+ $facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '" ';
116
+
117
+ $facebook_comments_markup .= 'data-href=" ' . get_permalink() . ' "';
118
+ $facebook_comments_markup .= '></amp-facebook-comments>';
119
+
120
+ return $facebook_comments_markup;
121
+ }
122
+ }
123
+
124
+ //Disqus Comments
125
+ function ampforwp_framework_get_disqus_comments(){
126
+ global $redux_builder_amp;
127
+ if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
128
+ global $post; $post_slug=$post->post_name;
129
+
130
+ $disqus_script_host_url = "https://ampforwp.appspot.com/?api=". AMPFORWP_DISQUS_URL;
131
+
132
+ if( $redux_builder_amp['ampforwp-disqus-host-position'] == 0 ) {
133
+ $disqus_script_host_url = esc_url( $redux_builder_amp['ampforwp-disqus-host-file'] );
134
+ }
135
+
136
+ $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" ;
137
+ ?>
138
+ <section class="amp-disqus-comments">
139
+ <amp-iframe
140
+ height=200
141
+ width=300
142
+ layout="responsive"
143
+ sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
144
+ frameborder="0"
145
+ src="<?php echo $disqus_url ?>" >
146
+ <div overflow tabindex="0" role="button" aria-label="Read more"><?php echo __('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
147
+ </amp-iframe>
148
+ </section>
149
+ <?php
150
+ }
151
+ }
152
+
153
+ // Comments Scripts
154
+ add_filter( 'amp_post_template_data', 'ampforwp_framework_comments_scripts' );
155
+ function ampforwp_framework_comments_scripts( $data ) {
156
+
157
+ $facebook_comments_check = ampforwp_framework_get_facebook_comments();
158
+ global $redux_builder_amp;
159
+ if ( $facebook_comments_check && $redux_builder_amp['ampforwp-facebook-comments-support'] && is_singular() ) {
160
+ if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
161
+ $data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
162
+ }
163
+ }
164
+ if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && is_singular() && comments_open() ) {
165
+ if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
166
+ if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
167
+ $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
168
+ }
169
+ }
170
+ }
171
+ return $data;
172
  }
components/components-core.php CHANGED
@@ -1,486 +1,484 @@
1
- <?php
2
- global $redux_builder_amp;
3
- $loadComponent = array();
4
- $scriptComponent = array();
5
- $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');
6
- //$removeScriptComponent = array('amp-carousel');'
7
- add_filter( 'amp_post_template_data', 'ampforwp_framework_add_and_form_scripts',20);
8
- function ampforwp_framework_add_and_form_scripts($data) {
9
- global $scriptComponent, $loadComponent; //$removeScriptComponent;
10
-
11
- if(count($scriptComponent)>0){
12
- foreach ($scriptComponent as $key => $value) {
13
- if ( empty( $data['amp_component_scripts'][$key] ) ) {
14
- $data['amp_component_scripts'][$key] = $value;
15
- }
16
- }
17
- }
18
- /*if(count($removeScriptComponent)>0){
19
- foreach ($removeScriptComponent as $key => $value) {
20
- if ( empty( $data['amp_component_scripts'][$key] ) ) {
21
- unset($data['amp_component_scripts']['$key']);
22
- }
23
- }
24
- }*/
25
- return $data;
26
- }
27
-
28
- //Component Loader
29
- function add_amp_theme_support($componentName){
30
- global $wpdb;
31
- global $loadComponent,$supportComponent;
32
- if($supportComponent){
33
- if(in_array($componentName, $supportComponent)){
34
- $loadComponent[$componentName] = true;
35
- loadComponents($componentName);
36
- return true;
37
- }
38
- }
39
- return false;
40
- }
41
- //Include the Component file
42
- function loadComponents($componentName){
43
- global $wpdb;
44
- if(empty($componentName)) return '';
45
- $componentName = str_replace("AMP-", "", $componentName);
46
-
47
- $file = AMP_FRAMEWORK_COMOPNENT_DIR_PATH.'/'.$componentName.'/'.$componentName.".php";
48
- if(!file_exists($file)){
49
- return '';
50
- }
51
- include_once($file);
52
- }
53
-
54
- // Icons
55
- $amp_icons_css = array();
56
- function add_amp_icon($args=array()){
57
- global $amp_icons_css;
58
- $amp_icons_css_array = include AMPFORWP_PLUGIN_DIR .'includes/icons/amp-icons.php';
59
- foreach ($args as $key ) {
60
- if(isset($amp_icons_css_array[$key]))
61
- $amp_icons_css[$key] = $amp_icons_css_array[$key];
62
- }
63
- add_action('amp_css', 'amp_icon_css');
64
-
65
- }
66
- function amp_icon_css(){
67
- global $amp_icons_css;
68
- foreach ($amp_icons_css as $key => $value) {
69
- echo $value;
70
- }
71
- }
72
-
73
- /**
74
- * Component Functions
75
- **/
76
-
77
- //Search Component Utilities
78
- function amp_search(){
79
- global $loadComponent;
80
- if(isset($loadComponent['AMP-search']) && $loadComponent['AMP-search']==true){
81
- ampforwp_framework_get_search_form();
82
- }
83
- }
84
-
85
- // Logo Component Utilitis
86
- function amp_logo(){
87
- global $loadComponent;
88
- if(isset($loadComponent['AMP-logo']) && $loadComponent['AMP-logo']==true){
89
- ampforwp_framework_get_logo();
90
- }
91
- }
92
-
93
- // Title
94
- function amp_title(){
95
- global $redux_builder_amp, $post;
96
- $ID = '';
97
- if(is_home() && $redux_builder_amp['amp-frontpage-select-option'] == 1){
98
- if( $redux_builder_amp['ampforwp-title-on-front-page'] ) {
99
- $ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
100
- }
101
- }
102
- else
103
- $ID = $post->ID;
104
- if( $ID!=null ){
105
- do_action('ampforwp_above_the_title'); ?>
106
- <h1 class="amp-post-title"> <?php
107
- $ampforwp_title = get_the_title($ID);
108
- $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
109
- echo wp_kses_data( $ampforwp_title ); ?>
110
- </h1>
111
- <?php do_action('ampforwp_below_the_title'); ?>
112
- <?php
113
- }
114
- }
115
-
116
- // Excerpt
117
- function amp_excerpt( $no_of_words=15 ) {
118
- global $redux_builder_amp, $post;
119
- $post_id = '';
120
- if ( ampforwp_is_front_page() ) {
121
- $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
122
- }
123
- else
124
- $post_id = $post->ID;
125
- if ( $post_id != null && true == $redux_builder_amp['enable-excerpt-single'] ) { ?>
126
- <p><?php
127
- if ( has_excerpt() ) {
128
- $content = get_the_excerpt();
129
- } else {
130
- $content = get_the_content();
131
- }
132
- echo wp_trim_words( strip_shortcodes( $content ) , $no_of_words );
133
- ?></p>
134
- <?php
135
- }
136
- }
137
-
138
-
139
- //Menus
140
- function amp_menu(){
141
- global $loadComponent;
142
- if(isset($loadComponent['AMP-menu']) && $loadComponent['AMP-menu']==true){
143
- amp_menu_html();
144
- }
145
- }
146
-
147
- // Social Icons component
148
- function amp_social( $social_icons="" ) {
149
- global $loadComponent;
150
- $amp_social = array();
151
- //Supported social icons
152
- $amp_social = array( 'twitter', 'facebook', 'pinterest', 'google-plus', 'linkedin', 'youtube', 'instagram', 'reddit', 'VKontakte', 'Odnoklassniki', 'snapchat', 'tumblr' );
153
- if ( isset($loadComponent['AMP-social-icons']) && true == $loadComponent['AMP-social-icons'] ) {
154
- if ( null != $social_icons ) {
155
- ampforwp_framework_get_social_icons($social_icons);
156
- }
157
- else
158
- ampforwp_framework_get_social_icons($amp_social);
159
- }
160
- }
161
-
162
- //Sidebar
163
- function amp_sidebar($tag='start',$data=array()){
164
- global $loadComponent;
165
- if(isset($loadComponent['AMP-sidebar']) && $loadComponent['AMP-sidebar']==true){
166
- ampforwp_framework_get_sideabr($tag,$data);
167
- }
168
- }
169
-
170
- //Featured Image
171
- function amp_featured_image( ){
172
- global $loadComponent;
173
- if(isset($loadComponent['AMP-featured-image']) && $loadComponent['AMP-featured-image']==true){
174
- ampforwp_framework_get_featured_image( );
175
- }
176
- }
177
-
178
- // Author Box
179
- function amp_author_box($args=array() ){
180
- global $loadComponent;
181
- if(isset($loadComponent['AMP-author-box']) && $loadComponent['AMP-author-box']==true){
182
- ampforwp_framework_get_author_box($args);
183
- }
184
- }
185
-
186
- // Categories List
187
- function amp_categories_list( ){
188
- global $loadComponent;
189
- if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
190
- ampforwp_framework_get_categories_list( );
191
- }
192
- }
193
- // Tags List
194
- function amp_tags_list( ){
195
- global $loadComponent;
196
- if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
197
- ampforwp_framework_get_tags_list( );
198
- }
199
- }
200
-
201
- // Comments
202
- function amp_comments( ){
203
- global $loadComponent;
204
- if(isset($loadComponent['AMP-comments']) && $loadComponent['AMP-comments']==true){
205
- ampforwp_framework_get_comments( );
206
- }
207
- }
208
-
209
- // Post Navigation
210
- function amp_post_navigation( ){
211
- global $loadComponent;
212
- if(isset($loadComponent['AMP-post-navigation']) && $loadComponent['AMP-post-navigation']==true){
213
- echo ampforwp_framework_get_post_navigation( );
214
- }
215
- }
216
-
217
- // Related Posts
218
- function amp_related_posts($argsdata = array()){
219
- global $loadComponent;
220
- if(isset($loadComponent['AMP-related-posts']) && $loadComponent['AMP-related-posts']==true){
221
- echo ampforwp_framework_get_related_posts( $argsdata);
222
- }
223
- }
224
-
225
- // Post Pagination
226
- function amp_post_pagination($args='' ){
227
- global $loadComponent;
228
- if(isset($loadComponent['AMP-post-pagination']) && $loadComponent['AMP-post-pagination']==true){
229
- ampforwp_framework_get_post_pagination($args);
230
- }
231
- }
232
-
233
- // Call Now
234
- function amp_call_now(){
235
- global $loadComponent;
236
- if(isset($loadComponent['AMP-call-now']) && $loadComponent['AMP-call-now']==true){
237
- amp_call_button_html_output();
238
- }
239
- }
240
-
241
- // Breadcrumb
242
- function amp_breadcrumb(){
243
- global $loadComponent;
244
- if ( isset($loadComponent['AMP-breadcrumb']) && true == $loadComponent['AMP-breadcrumb'] ) {
245
- echo amp_breadcrumb_output();
246
- }
247
- }
248
-
249
- //Get Core of AMP HTML
250
- function amp_header_core(){
251
- $post_id = get_queried_object_id();
252
- $thisTemplate = new AMP_Post_Template($post_id);
253
- global $redux_builder_amp;
254
- $html_tag_attributes = AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) );
255
-
256
- $bodyClass = '';
257
- if ( is_single() || is_page() ) {
258
- $bodyClass = 'single-post';
259
- $bodyClass .= ( is_page()? ' amp-single-page ' : ' amp-single ');
260
-
261
- }
262
- // Archive
263
- if ( is_archive() ) {
264
- $bodyClass = 'amp-archive';
265
- }
266
- $ampforwp_custom_post_page = ampforwp_custom_post_page();
267
- // Homepage
268
- if ( is_home() ) {
269
-
270
- $bodyClass = 'amp-index amp-home'.esc_attr( $thisTemplate->get( 'body_class' ) );
271
- if ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
272
- $bodyClass = 'single-post design_3_wrapper';
273
- }
274
- if ( $ampforwp_custom_post_page == "page" && ampforwp_name_blog_page() ) {
275
- $current_url = home_url( $GLOBALS['wp']->request );
276
- $current_url_in_pieces = explode( '/', $current_url );
277
-
278
- if( in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) {
279
- $bodyClass = 'amp-index' .esc_attr( $thisTemplate->get( 'body_class' ) );
280
- }
281
- }
282
-
283
- }
284
- // is_search
285
- if ( is_search() ) {
286
- if ( 'single' === $type ) {
287
- $bodyClass = 'amp_home_body archives_body design_3_wrapper';
288
- }
289
- }
290
- if( true == $redux_builder_amp['amp-rtl-select-option'] ){
291
- $bodyClass .= ' rtl ';
292
- }
293
- ?><!doctype html>
294
- <html <?php echo ampforwp_amp_nonamp_convert('amp '); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
295
- <head>
296
- <meta charset="utf-8">
297
- <link rel="dns-prefetch" href="https://cdn.ampproject.org">
298
- <?php do_action( 'amp_meta', $thisTemplate ); ?>
299
- <?php
300
- if(ampforwp_amp_nonamp_convert("", "check")){
301
- wp_head();
302
- }else{
303
- do_action( 'amp_post_template_head', $thisTemplate );
304
- } ?>
305
- <style amp-custom>
306
- <?php $thisTemplate->load_parts( array( 'style' ) ); ?>
307
- <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
308
- <?php do_action( 'amp_css', $thisTemplate ); ?>
309
- </style>
310
-
311
- </head>
312
- <body <?php ampforwp_body_class($bodyClass); ?>>
313
- <?php do_action('amp_start', $thisTemplate); ?>
314
- <?php do_action('ampforwp_body_beginning', $thisTemplate);
315
- }
316
-
317
- function amp_header(){
318
- $post_id = get_queried_object_id();
319
- $thisTemplate = new AMP_Post_Template($post_id);
320
- $thisTemplate->load_parts( array( 'header' ) );
321
- do_action( 'amp_after_header', $thisTemplate );
322
- do_action( 'ampforwp_after_header', $thisTemplate );
323
- do_action('ampforwp_post_before_design_elements') ?>
324
- <?php }
325
-
326
- function amp_footer(){
327
- $post_id = get_queried_object_id();
328
- $thisTemplate = new AMP_Post_Template($post_id);
329
- do_action( 'amp_before_footer', $thisTemplate );
330
- do_action( 'amp_post_template_above_footer', $thisTemplate );
331
- $thisTemplate->load_parts( array( 'footer' ) );
332
-
333
- if(ampforwp_amp_nonamp_convert("", "check")){
334
- wp_footer();
335
- }
336
- }
337
-
338
- function amp_footer_core(){
339
- $post_id = get_queried_object_id();
340
- $thisTemplate = new AMP_Post_Template($post_id);
341
- do_action( 'amp_post_template_footer', $thisTemplate );
342
- do_action('ampforwp_global_after_footer');
343
- do_action('amp_end',$thisTemplate);
344
- // Close the body and Html tags ?>
345
- </body>
346
- </html><?php
347
- }
348
-
349
- function amp_non_amp_link(){
350
- global $allowed_html;
351
- global $redux_builder_amp;
352
- echo wp_kses($redux_builder_amp['amp-translator-footer-text'],$allowed_html) ;
353
- if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') { ampforwp_view_nonamp(); }
354
- }
355
-
356
- // Back to Top
357
- function amp_back_to_top_link(){
358
- global $redux_builder_amp;
359
- if( '1' == $redux_builder_amp['ampforwp-footer-top'] ) { ?>
360
- <a href="#top"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-top-text'], 'Top'); ?> </a>
361
- <?php }
362
- }
363
-
364
- function amp_loop_template(){
365
- $post_id = get_queried_object_id();
366
- $thisTemplate = new AMP_Post_Template($post_id);
367
- do_action('amp_before_loop',$thisTemplate);
368
- $thisTemplate->load_parts( array( 'loop' ) );
369
- do_action('amp_after_loop',$thisTemplate);
370
- }
371
-
372
- // The Content
373
- function amp_content(){
374
- global $redux_builder_amp, $post;
375
- $post_id = get_queried_object_id();
376
- if ( ampforwp_is_front_page() ) {
377
- $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
378
- }
379
- $thisTemplate = new AMP_Post_Template($post_id); ?>
380
- <?php do_action('ampforwp_before_post_content',$thisTemplate);
381
- $amp_custom_content_enable = get_post_meta( $thisTemplate->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
382
- // Normal Content
383
- if ( ! $amp_custom_content_enable ) {
384
- $ampforwp_the_content = $thisTemplate->get( 'post_amp_content' ); // amphtml content; no kses
385
- } else {
386
- // Custom/Alternative AMP content added through post meta
387
- $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
388
- }
389
- $ampforwp_the_content = apply_filters('ampforwp_modify_the_content',$ampforwp_the_content);
390
- echo $ampforwp_the_content;
391
- do_action('ampforwp_after_post_content',$thisTemplate); ?>
392
- <?php }
393
-
394
- function amp_date( $args=array() ) {
395
-
396
- global $redux_builder_amp;
397
- if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
398
- $args['format'] = 'traditional';
399
- }
400
- if ( (isset($args['format']) && $args['format'] == 'traditional') || 'time' == $args ) {
401
- $post_date = esc_html( get_the_date() ) . ' '.esc_html( get_the_time());
402
- } else {
403
- $post_date = human_time_diff(
404
- get_the_time('U', get_the_ID() ),
405
- current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
406
- 'ago');
407
- }
408
- $post_date = apply_filters('ampforwp_modify_post_date', $post_date);
409
- if ( 'date' == $args || 'time' == $args ) {
410
- echo $post_date .' ';
411
- }
412
- else
413
- echo '<div class="loop-date">'.$post_date.'</div>';
414
- }
415
-
416
- //Load font Compoment
417
- $fontComponent = array();
418
- function amp_post_load_custom_fonts(){
419
- global $fontComponent;
420
- if(count($fontComponent)){
421
- $fontComponent = array_unique($fontComponent);
422
- foreach ($fontComponent as $key => $value) {
423
- ?>
424
- <link rel="stylesheet" href="<?php echo esc_url( $value ); ?>">
425
- <?php
426
- }
427
- }
428
-
429
- }
430
- add_action( 'amp_meta', 'amp_post_load_custom_fonts');
431
- function amp_font($fontName){
432
- global $fontComponent;
433
- $fontComponent[] = $fontName;
434
- }
435
-
436
- // RTL Styling
437
- add_action('amp_css', 'amp_theme_framework_rtl_styles');
438
- if( ! function_exists('amp_theme_framework_rtl_styles') ){
439
- function amp_theme_framework_rtl_styles(){
440
- global $redux_builder_amp;
441
- if( true === $redux_builder_amp['amp-rtl-select-option'] ){ ?>
442
- body.rtl {direction: rtl;}
443
- body amp-carousel{ direction: ltr;}
444
- <?php }
445
- }
446
- }
447
-
448
- // Author Meta
449
- function amp_author_meta( $args ) {
450
- global $post;
451
- $author_name = false;
452
- $avatar = false;
453
- $avatar_size = 40;
454
- if ( isset($args['name']) ) {
455
- $author_name = $args['name'];
456
- }
457
- if ( 'name' === $args ) {
458
- $author_name = true;
459
- }
460
- if ( 'avatar' === $args || 'image' === $args ) {
461
- $avatar = true;
462
- }
463
- if ( isset($args['image']) ) {
464
- $avatar = $args['image'];
465
- }
466
- if ( isset($args['image_size']) ) {
467
- $avatar_size = $args['image_size'];
468
- }
469
- $post_author = get_userdata($post->post_author);
470
- $author_link = get_author_posts_url($post_author->ID);
471
- if ( $author_name ) {
472
- echo ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $post_author->display_name ).'</a>';
473
- }
474
- if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
475
- $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
476
- ?>
477
- <amp-img src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
478
- <?php }
479
- elseif ( $avatar && false == ampforwp_gravatar_checker($post_author->user_email ) ) {
480
- $avatar_img = get_avatar( $post_author->user_email, $avatar_size );
481
- $amp_html_sanitizer = new AMPFORWP_Content( $avatar_img, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array() ) ) );
482
- $amp_html = $amp_html_sanitizer->get_amp_content();
483
- echo $amp_html;
484
- }
485
-
486
  }
1
+ <?php
2
+ global $redux_builder_amp;
3
+ $loadComponent = array();
4
+ $scriptComponent = array();
5
+ $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');
6
+ //$removeScriptComponent = array('amp-carousel');'
7
+ add_filter( 'amp_post_template_data', 'ampforwp_framework_add_and_form_scripts',20);
8
+ function ampforwp_framework_add_and_form_scripts($data) {
9
+ global $scriptComponent, $loadComponent; //$removeScriptComponent;
10
+
11
+ if(count($scriptComponent)>0){
12
+ foreach ($scriptComponent as $key => $value) {
13
+ if ( empty( $data['amp_component_scripts'][$key] ) ) {
14
+ $data['amp_component_scripts'][$key] = $value;
15
+ }
16
+ }
17
+ }
18
+ /*if(count($removeScriptComponent)>0){
19
+ foreach ($removeScriptComponent as $key => $value) {
20
+ if ( empty( $data['amp_component_scripts'][$key] ) ) {
21
+ unset($data['amp_component_scripts']['$key']);
22
+ }
23
+ }
24
+ }*/
25
+ return $data;
26
+ }
27
+
28
+ //Component Loader
29
+ function add_amp_theme_support($componentName){
30
+ global $wpdb;
31
+ global $loadComponent,$supportComponent;
32
+ if($supportComponent){
33
+ if(in_array($componentName, $supportComponent)){
34
+ $loadComponent[$componentName] = true;
35
+ loadComponents($componentName);
36
+ return true;
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+ //Include the Component file
42
+ function loadComponents($componentName){
43
+ global $wpdb;
44
+ if(empty($componentName)) return '';
45
+ $componentName = str_replace("AMP-", "", $componentName);
46
+
47
+ $file = AMP_FRAMEWORK_COMOPNENT_DIR_PATH.'/'.$componentName.'/'.$componentName.".php";
48
+ if(!file_exists($file)){
49
+ return '';
50
+ }
51
+ include_once($file);
52
+ }
53
+
54
+ // Icons
55
+ $amp_icons_css = array();
56
+ function add_amp_icon($args=array()){
57
+ global $amp_icons_css;
58
+ $amp_icons_css_array = include AMPFORWP_PLUGIN_DIR .'includes/icons/amp-icons.php';
59
+ foreach ($args as $key ) {
60
+ if(isset($amp_icons_css_array[$key]))
61
+ $amp_icons_css[$key] = $amp_icons_css_array[$key];
62
+ }
63
+ add_action('amp_css', 'amp_icon_css');
64
+
65
+ }
66
+ function amp_icon_css(){
67
+ global $amp_icons_css;
68
+ foreach ($amp_icons_css as $key => $value) {
69
+ echo $value;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Component Functions
75
+ **/
76
+
77
+ //Search Component Utilities
78
+ function amp_search(){
79
+ global $loadComponent;
80
+ if(isset($loadComponent['AMP-search']) && $loadComponent['AMP-search']==true){
81
+ ampforwp_framework_get_search_form();
82
+ }
83
+ }
84
+
85
+ // Logo Component Utilitis
86
+ function amp_logo(){
87
+ global $loadComponent;
88
+ if(isset($loadComponent['AMP-logo']) && $loadComponent['AMP-logo']==true){
89
+ ampforwp_framework_get_logo();
90
+ }
91
+ }
92
+
93
+ // Title
94
+ function amp_title(){
95
+ global $redux_builder_amp, $post;
96
+ $ID = '';
97
+ if(is_home() && $redux_builder_amp['amp-frontpage-select-option'] == 1){
98
+ if( $redux_builder_amp['ampforwp-title-on-front-page'] ) {
99
+ $ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
100
+ }
101
+ }
102
+ else
103
+ $ID = $post->ID;
104
+ if( $ID!=null ){
105
+ do_action('ampforwp_above_the_title'); ?>
106
+ <h1 class="amp-post-title"> <?php
107
+ $ampforwp_title = get_the_title($ID);
108
+ $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
109
+ echo wp_kses_data( $ampforwp_title ); ?>
110
+ </h1>
111
+ <?php do_action('ampforwp_below_the_title'); ?>
112
+ <?php
113
+ }
114
+ }
115
+
116
+ // Excerpt
117
+ function amp_excerpt( $no_of_words=15 ) {
118
+ global $redux_builder_amp, $post;
119
+ $post_id = '';
120
+ if ( ampforwp_is_front_page() ) {
121
+ $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
122
+ }
123
+ else
124
+ $post_id = $post->ID;
125
+ if ( $post_id != null && true == $redux_builder_amp['enable-excerpt-single'] ) { ?>
126
+ <p><?php
127
+ if ( has_excerpt() ) {
128
+ $content = get_the_excerpt();
129
+ } else {
130
+ $content = get_the_content();
131
+ }
132
+ echo wp_trim_words( strip_shortcodes( $content ) , $no_of_words );
133
+ ?></p>
134
+ <?php
135
+ }
136
+ }
137
+
138
+
139
+ //Menus
140
+ function amp_menu(){
141
+ global $loadComponent;
142
+ if(isset($loadComponent['AMP-menu']) && $loadComponent['AMP-menu']==true){
143
+ amp_menu_html();
144
+ }
145
+ }
146
+
147
+ // Social Icons component
148
+ function amp_social( $social_icons="" ) {
149
+ global $loadComponent;
150
+ $amp_social = array();
151
+ //Supported social icons
152
+ $amp_social = array( 'twitter', 'facebook', 'pinterest', 'google-plus', 'linkedin', 'youtube', 'instagram', 'reddit', 'VKontakte', 'Odnoklassniki', 'snapchat', 'tumblr' );
153
+ if ( isset($loadComponent['AMP-social-icons']) && true == $loadComponent['AMP-social-icons'] ) {
154
+ if ( null != $social_icons ) {
155
+ ampforwp_framework_get_social_icons($social_icons);
156
+ }
157
+ else
158
+ ampforwp_framework_get_social_icons($amp_social);
159
+ }
160
+ }
161
+
162
+ //Sidebar
163
+ function amp_sidebar($tag='start',$data=array()){
164
+ global $loadComponent;
165
+ if(isset($loadComponent['AMP-sidebar']) && $loadComponent['AMP-sidebar']==true){
166
+ ampforwp_framework_get_sideabr($tag,$data);
167
+ }
168
+ }
169
+
170
+ //Featured Image
171
+ function amp_featured_image( ){
172
+ global $loadComponent;
173
+ if(isset($loadComponent['AMP-featured-image']) && $loadComponent['AMP-featured-image']==true){
174
+ ampforwp_framework_get_featured_image( );
175
+ }
176
+ }
177
+
178
+ // Author Box
179
+ function amp_author_box($args=array() ){
180
+ global $loadComponent;
181
+ if(isset($loadComponent['AMP-author-box']) && $loadComponent['AMP-author-box']==true){
182
+ ampforwp_framework_get_author_box($args);
183
+ }
184
+ }
185
+
186
+ // Categories List
187
+ function amp_categories_list( ){
188
+ global $loadComponent;
189
+ if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
190
+ ampforwp_framework_get_categories_list( );
191
+ }
192
+ }
193
+ // Tags List
194
+ function amp_tags_list( ){
195
+ global $loadComponent;
196
+ if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
197
+ ampforwp_framework_get_tags_list( );
198
+ }
199
+ }
200
+
201
+ // Comments
202
+ function amp_comments( ){
203
+ global $loadComponent;
204
+ if(isset($loadComponent['AMP-comments']) && $loadComponent['AMP-comments']==true){
205
+ ampforwp_framework_get_comments( );
206
+ }
207
+ }
208
+
209
+ // Post Navigation
210
+ function amp_post_navigation( ){
211
+ global $loadComponent;
212
+ if(isset($loadComponent['AMP-post-navigation']) && $loadComponent['AMP-post-navigation']==true){
213
+ echo ampforwp_framework_get_post_navigation( );
214
+ }
215
+ }
216
+
217
+ // Related Posts
218
+ function amp_related_posts($argsdata = array()){
219
+ global $loadComponent;
220
+ if(isset($loadComponent['AMP-related-posts']) && $loadComponent['AMP-related-posts']==true){
221
+ echo ampforwp_framework_get_related_posts( $argsdata);
222
+ }
223
+ }
224
+
225
+ // Post Pagination
226
+ function amp_post_pagination($args='' ){
227
+ global $loadComponent;
228
+ if(isset($loadComponent['AMP-post-pagination']) && $loadComponent['AMP-post-pagination']==true){
229
+ ampforwp_framework_get_post_pagination($args);
230
+ }
231
+ }
232
+
233
+ // Call Now
234
+ function amp_call_now(){
235
+ global $loadComponent;
236
+ if(isset($loadComponent['AMP-call-now']) && $loadComponent['AMP-call-now']==true){
237
+ amp_call_button_html_output();
238
+ }
239
+ }
240
+
241
+ // Breadcrumb
242
+ function amp_breadcrumb(){
243
+ global $loadComponent;
244
+ if ( isset($loadComponent['AMP-breadcrumb']) && true == $loadComponent['AMP-breadcrumb'] ) {
245
+ echo amp_breadcrumb_output();
246
+ }
247
+ }
248
+
249
+ //Get Core of AMP HTML
250
+ function amp_header_core(){
251
+ $post_id = get_queried_object_id();
252
+ $thisTemplate = new AMP_Post_Template($post_id);
253
+ global $redux_builder_amp;
254
+ $html_tag_attributes = AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) );
255
+
256
+ $bodyClass = '';
257
+ if ( is_single() || is_page() ) {
258
+ $bodyClass = 'single-post';
259
+ $bodyClass .= ( is_page()? ' amp-single-page ' : ' amp-single ');
260
+
261
+ }
262
+ // Archive
263
+ if ( is_archive() ) {
264
+ $bodyClass = 'amp-archive';
265
+ }
266
+ $ampforwp_custom_post_page = ampforwp_custom_post_page();
267
+ // Homepage
268
+ if ( is_home() ) {
269
+
270
+ $bodyClass = 'amp-index amp-home'.esc_attr( $thisTemplate->get( 'body_class' ) );
271
+ if ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
272
+ $bodyClass = 'single-post design_3_wrapper';
273
+ }
274
+ if ( $ampforwp_custom_post_page == "page" && ampforwp_name_blog_page() ) {
275
+ $current_url = home_url( $GLOBALS['wp']->request );
276
+ $current_url_in_pieces = explode( '/', $current_url );
277
+
278
+ if( in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) {
279
+ $bodyClass = 'amp-index' .esc_attr( $thisTemplate->get( 'body_class' ) );
280
+ }
281
+ }
282
+
283
+ }
284
+ // is_search
285
+ if ( is_search() ) {
286
+ $bodyClass = 'amp_home_body archives_body design_3_wrapper';
287
+ }
288
+ if( true == $redux_builder_amp['amp-rtl-select-option'] ){
289
+ $bodyClass .= ' rtl ';
290
+ }
291
+ ?><!doctype html>
292
+ <html <?php echo ampforwp_amp_nonamp_convert('amp '); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
293
+ <head>
294
+ <meta charset="utf-8">
295
+ <link rel="dns-prefetch" href="https://cdn.ampproject.org">
296
+ <?php do_action( 'amp_meta', $thisTemplate ); ?>
297
+ <?php
298
+ if(ampforwp_amp_nonamp_convert("", "check")){
299
+ wp_head();
300
+ }else{
301
+ do_action( 'amp_post_template_head', $thisTemplate );
302
+ } ?>
303
+ <style amp-custom>
304
+ <?php $thisTemplate->load_parts( array( 'style' ) ); ?>
305
+ <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
306
+ <?php do_action( 'amp_css', $thisTemplate ); ?>
307
+ </style>
308
+
309
+ </head>
310
+ <body <?php ampforwp_body_class($bodyClass); ?>>
311
+ <?php do_action('amp_start', $thisTemplate); ?>
312
+ <?php do_action('ampforwp_body_beginning', $thisTemplate);
313
+ }
314
+
315
+ function amp_header(){
316
+ $post_id = get_queried_object_id();
317
+ $thisTemplate = new AMP_Post_Template($post_id);
318
+ $thisTemplate->load_parts( array( 'header' ) );
319
+ do_action( 'amp_after_header', $thisTemplate );
320
+ do_action( 'ampforwp_after_header', $thisTemplate );
321
+ do_action('ampforwp_post_before_design_elements') ?>
322
+ <?php }
323
+
324
+ function amp_footer(){
325
+ $post_id = get_queried_object_id();
326
+ $thisTemplate = new AMP_Post_Template($post_id);
327
+ do_action( 'amp_before_footer', $thisTemplate );
328
+ do_action( 'amp_post_template_above_footer', $thisTemplate );
329
+ $thisTemplate->load_parts( array( 'footer' ) );
330
+
331
+ if(ampforwp_amp_nonamp_convert("", "check")){
332
+ wp_footer();
333
+ }
334
+ }
335
+
336
+ function amp_footer_core(){
337
+ $post_id = get_queried_object_id();
338
+ $thisTemplate = new AMP_Post_Template($post_id);
339
+ do_action( 'amp_post_template_footer', $thisTemplate );
340
+ do_action('ampforwp_global_after_footer');
341
+ do_action('amp_end',$thisTemplate);
342
+ // Close the body and Html tags ?>
343
+ </body>
344
+ </html><?php
345
+ }
346
+
347
+ function amp_non_amp_link(){
348
+ global $allowed_html;
349
+ global $redux_builder_amp;
350
+ echo wp_kses($redux_builder_amp['amp-translator-footer-text'],$allowed_html) ;
351
+ if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') { ampforwp_view_nonamp(); }
352
+ }
353
+
354
+ // Back to Top
355
+ function amp_back_to_top_link(){
356
+ global $redux_builder_amp;
357
+ if( '1' == $redux_builder_amp['ampforwp-footer-top'] ) { ?>
358
+ <a href="#top"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-top-text'], 'Top'); ?> </a>
359
+ <?php }
360
+ }
361
+
362
+ function amp_loop_template(){
363
+ $post_id = get_queried_object_id();
364
+ $thisTemplate = new AMP_Post_Template($post_id);
365
+ do_action('amp_before_loop',$thisTemplate);
366
+ $thisTemplate->load_parts( array( 'loop' ) );
367
+ do_action('amp_after_loop',$thisTemplate);
368
+ }
369
+
370
+ // The Content
371
+ function amp_content(){
372
+ global $redux_builder_amp, $post;
373
+ $post_id = get_queried_object_id();
374
+ if ( ampforwp_is_front_page() ) {
375
+ $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
376
+ }
377
+ $thisTemplate = new AMP_Post_Template($post_id); ?>
378
+ <?php do_action('ampforwp_before_post_content',$thisTemplate);
379
+ $amp_custom_content_enable = get_post_meta( $thisTemplate->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
380
+ // Normal Content
381
+ if ( ! $amp_custom_content_enable ) {
382
+ $ampforwp_the_content = $thisTemplate->get( 'post_amp_content' ); // amphtml content; no kses
383
+ } else {
384
+ // Custom/Alternative AMP content added through post meta
385
+ $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
386
+ }
387
+ $ampforwp_the_content = apply_filters('ampforwp_modify_the_content',$ampforwp_the_content);
388
+ echo $ampforwp_the_content;
389
+ do_action('ampforwp_after_post_content',$thisTemplate); ?>
390
+ <?php }
391
+
392
+ function amp_date( $args=array() ) {
393
+
394
+ global $redux_builder_amp;
395
+ if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
396
+ $args['format'] = 'traditional';
397
+ }
398
+ if ( (isset($args['format']) && $args['format'] == 'traditional') || 'time' == $args ) {
399
+ $post_date = esc_html( get_the_date() ) . ' '.esc_html( get_the_time());
400
+ } else {
401
+ $post_date = human_time_diff(
402
+ get_the_time('U', get_the_ID() ),
403
+ current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
404
+ 'ago');
405
+ }
406
+ $post_date = apply_filters('ampforwp_modify_post_date', $post_date);
407
+ if ( 'date' == $args || 'time' == $args ) {
408
+ echo $post_date .' ';
409
+ }
410
+ else
411
+ echo '<div class="loop-date">'.$post_date.'</div>';
412
+ }
413
+
414
+ //Load font Compoment
415
+ $fontComponent = array();
416
+ function amp_post_load_custom_fonts(){
417
+ global $fontComponent;
418
+ if(count($fontComponent)){
419
+ $fontComponent = array_unique($fontComponent);
420
+ foreach ($fontComponent as $key => $value) {
421
+ ?>
422
+ <link rel="stylesheet" href="<?php echo esc_url( $value ); ?>">
423
+ <?php
424
+ }
425
+ }
426
+
427
+ }
428
+ add_action( 'amp_meta', 'amp_post_load_custom_fonts');
429
+ function amp_font($fontName){
430
+ global $fontComponent;
431
+ $fontComponent[] = $fontName;
432
+ }
433
+
434
+ // RTL Styling
435
+ add_action('amp_css', 'amp_theme_framework_rtl_styles');
436
+ if( ! function_exists('amp_theme_framework_rtl_styles') ){
437
+ function amp_theme_framework_rtl_styles(){
438
+ global $redux_builder_amp;
439
+ if( true === $redux_builder_amp['amp-rtl-select-option'] ){ ?>
440
+ body.rtl {direction: rtl;}
441
+ body amp-carousel{ direction: ltr;}
442
+ <?php }
443
+ }
444
+ }
445
+
446
+ // Author Meta
447
+ function amp_author_meta( $args ) {
448
+ global $post;
449
+ $author_name = false;
450
+ $avatar = false;
451
+ $avatar_size = 40;
452
+ if ( isset($args['name']) ) {
453
+ $author_name = $args['name'];
454
+ }
455
+ if ( 'name' === $args ) {
456
+ $author_name = true;
457
+ }
458
+ if ( 'avatar' === $args || 'image' === $args ) {
459
+ $avatar = true;
460
+ }
461
+ if ( isset($args['image']) ) {
462
+ $avatar = $args['image'];
463
+ }
464
+ if ( isset($args['image_size']) ) {
465
+ $avatar_size = $args['image_size'];
466
+ }
467
+ $post_author = get_userdata($post->post_author);
468
+ $author_link = get_author_posts_url($post_author->ID);
469
+ if ( $author_name ) {
470
+ echo ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $post_author->display_name ).'</a>';
471
+ }
472
+ if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
473
+ $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
474
+ ?>
475
+ <amp-img src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
476
+ <?php }
477
+ elseif ( $avatar && false == ampforwp_gravatar_checker($post_author->user_email ) ) {
478
+ $avatar_img = get_avatar( $post_author->user_email, $avatar_size );
479
+ $amp_html_sanitizer = new AMPFORWP_Content( $avatar_img, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array() ) ) );
480
+ $amp_html = $amp_html_sanitizer->get_amp_content();
481
+ echo $amp_html;
482
+ }
483
+
 
 
484
  }
components/featured-image/featured-image.php CHANGED
@@ -1,52 +1,52 @@
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 = $redux_builder_amp['amp-frontpage-select-option-pages'];
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
- if ( 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
- if( true == $redux_builder_amp['ampforwp-featured-image-from-content'] && ampforwp_get_featured_image_from_content() ){
38
- $amp_html = ampforwp_get_featured_image_from_content();
39
- }
40
- if( $amp_html ){ ?>
41
- <figure class="amp-featured-image"> <?php
42
- echo $amp_html;
43
- if ( $caption ) : ?>
44
- <p class="wp-caption-text">
45
- <?php echo wp_kses_data( $caption ); ?>
46
- </p>
47
- <?php endif; ?>
48
- </figure>
49
- <?php do_action('ampforwp_after_featured_image_hook');
50
- }
51
- }
52
  }
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 = $redux_builder_amp['amp-frontpage-select-option-pages'];
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
+ if ( 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
+ if( true == $redux_builder_amp['ampforwp-featured-image-from-content'] && ampforwp_get_featured_image_from_content() ){
38
+ $amp_html = ampforwp_get_featured_image_from_content();
39
+ }
40
+ if( $amp_html ){ ?>
41
+ <figure class="amp-featured-image"> <?php
42
+ echo $amp_html;
43
+ if ( $caption ) : ?>
44
+ <p class="wp-caption-text">
45
+ <?php echo wp_kses_data( $caption ); ?>
46
+ </p>
47
+ <?php endif; ?>
48
+ </figure>
49
+ <?php do_action('ampforwp_after_featured_image_hook');
50
+ }
51
+ }
52
  }
components/logo/logo.php CHANGED
@@ -1,58 +1,58 @@
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
-
9
- if( $redux_builder_amp['amp-on-off-support-for-non-amp-home-page'] ) {
10
- if( $redux_builder_amp['amp-mobile-redirection'] ) {
11
- $ampforwp_home_url = trailingslashit( get_bloginfo('url') ).'?nonamp=1';
12
- $set_rel_to_noamp = true;
13
- } else {
14
- $ampforwp_home_url = ampforwp_url_controller( get_bloginfo('url') );
15
- }
16
- } else {
17
- if($redux_builder_amp['ampforwp-homepage-on-off-support']) {
18
- $ampforwp_home_url = ampforwp_url_controller( get_bloginfo('url') );
19
- //$ampforwp_home_url = user_trailingslashit( trailingslashit( get_bloginfo('url') ) . AMPFORWP_AMP_QUERY_VAR );
20
- } else {
21
- if( $redux_builder_amp['amp-mobile-redirection'] ) {
22
- $ampforwp_home_url = trailingslashit( get_bloginfo('url') ).'?nonamp=1';
23
- $set_rel_to_noamp = true;
24
- } else {
25
- $ampforwp_home_url = trailingslashit( get_bloginfo('url') );
26
- }
27
- }
28
- }?>
29
-
30
- <?php if ( true == ($redux_builder_amp['opt-media']['url']) ) {
31
- $alt = ampforwp_default_logo('alt') ?>
32
- <a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> >
33
-
34
- <amp-img src="<?php echo $redux_builder_amp['opt-media']['url']; ?>" width="<?php echo ampforwp_default_logo('width'); ?>" height="<?php echo ampforwp_default_logo('height'); ?>" alt="<?php echo $alt; ?>" class="amp-logo" layout="responsive"></amp-img>
35
-
36
- </a>
37
- <?php } else { ?>
38
- <h1><a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> ><?php bloginfo('name'); ?></a></h1>
39
- <?php } ?>
40
- </div>
41
- <?php }
42
-
43
- add_action('amp_post_template_css','amp_framework_logo_styles',11);
44
- if( !function_exists( 'amp_framework_logo_styles' ) ){
45
- function amp_framework_logo_styles(){
46
- global $redux_builder_amp;
47
- $max_width = '190px';
48
- $width = ampforwp_default_logo('width');
49
- if ( true == $redux_builder_amp['ampforwp-custom-logo-dimensions-options'] && isset($redux_builder_amp['ampforwp-custom-logo-dimensions-options']) && 'flexible' == $redux_builder_amp['ampforwp-custom-logo-dimensions-options'] ) {
50
- $max_width = $redux_builder_amp['ampforwp-custom-logo-dimensions-slider'];
51
- $logoWidth = ampforwp_default_logo('width');
52
- $max_width = ceil(($width*$max_width)/100)."px";
53
- }
54
- $width .= 'px';
55
- ?>
56
- .amp-logo amp-img{width:<?php echo $max_width; ?>}
57
- <?php }
58
- }
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
+
9
+ if( $redux_builder_amp['amp-on-off-support-for-non-amp-home-page'] ) {
10
+ if( $redux_builder_amp['amp-mobile-redirection'] ) {
11
+ $ampforwp_home_url = trailingslashit( get_bloginfo('url') ).'?nonamp=1';
12
+ $set_rel_to_noamp = true;
13
+ } else {
14
+ $ampforwp_home_url = ampforwp_url_controller( get_bloginfo('url') );
15
+ }
16
+ } else {
17
+ if($redux_builder_amp['ampforwp-homepage-on-off-support']) {
18
+ $ampforwp_home_url = ampforwp_url_controller( get_bloginfo('url') );
19
+ //$ampforwp_home_url = user_trailingslashit( trailingslashit( get_bloginfo('url') ) . AMPFORWP_AMP_QUERY_VAR );
20
+ } else {
21
+ if( $redux_builder_amp['amp-mobile-redirection'] ) {
22
+ $ampforwp_home_url = trailingslashit( get_bloginfo('url') ).'?nonamp=1';
23
+ $set_rel_to_noamp = true;
24
+ } else {
25
+ $ampforwp_home_url = trailingslashit( get_bloginfo('url') );
26
+ }
27
+ }
28
+ }?>
29
+
30
+ <?php if ( true == ($redux_builder_amp['opt-media']['url']) ) {
31
+ $alt = ampforwp_default_logo('alt') ?>
32
+ <a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> >
33
+
34
+ <amp-img src="<?php echo $redux_builder_amp['opt-media']['url']; ?>" width="<?php echo ampforwp_default_logo('width'); ?>" height="<?php echo ampforwp_default_logo('height'); ?>" alt="<?php echo $alt; ?>" class="amp-logo" layout="responsive"></amp-img>
35
+
36
+ </a>
37
+ <?php } else { ?>
38
+ <h1><a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> ><?php bloginfo('name'); ?></a></h1>
39
+ <?php } ?>
40
+ </div>
41
+ <?php }
42
+
43
+ add_action('amp_post_template_css','amp_framework_logo_styles',11);
44
+ if( !function_exists( 'amp_framework_logo_styles' ) ){
45
+ function amp_framework_logo_styles(){
46
+ global $redux_builder_amp;
47
+ $max_width = '190px';
48
+ $width = (integer) ampforwp_default_logo('width');
49
+ if ( true == $redux_builder_amp['ampforwp-custom-logo-dimensions-options'] && isset($redux_builder_amp['ampforwp-custom-logo-dimensions-options']) && 'flexible' == $redux_builder_amp['ampforwp-custom-logo-dimensions-options'] ) {
50
+ $max_width = (integer) $redux_builder_amp['ampforwp-custom-logo-dimensions-slider'];
51
+ $width = (integer) ampforwp_default_logo('width');
52
+ $max_width = ceil(($width*$max_width)/100)."px";
53
+ }
54
+ $width .= 'px';
55
+ ?>
56
+ .amp-logo amp-img{width:<?php echo $max_width; ?>}
57
+ <?php }
58
+ }
components/loop/loop.php CHANGED
@@ -1,346 +1,348 @@
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_comment_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
- the_archive_title( '<h3 class="amp-archive-title">', '</h3>' );
17
- the_archive_description( '<div class="amp-archive-desc">', '</div>' );
18
- }
19
- if( is_category() && 1 == $redux_builder_amp['ampforwp-sub-categories-support'] ){
20
- $parent_cat_id = '';
21
- $cat_childs = array();
22
- $parent_cat_id = get_queried_object_id();
23
- $cat_childs = get_terms( array(
24
- 'taxonomy' => get_queried_object()->taxonomy,
25
- 'parent' => $parent_cat_id )
26
- );
27
- if( !empty( $cat_childs ) ){
28
- echo "<div class='amp-sub-archives'><ul>";
29
- foreach ($cat_childs as $cat_child ) {
30
- echo '<li><a href="' . get_term_link( $cat_child ) . '">' . $cat_child->name . '</a></li>';
31
- }
32
- echo "</ul></div>";
33
- }
34
- }
35
- if(is_search()){
36
- $label = 'You searched for:';
37
- if(function_exists('ampforwp_translation')){
38
- $label = ampforwp_translation( $redux_builder_amp['amp-translator-search-text'], 'You searched for:');
39
- }
40
- echo '<h3 class="amp-loop-label">'.$label . ' ' . get_search_query().'</h3>';
41
- }
42
- }
43
-
44
- $amp_q = '';
45
- $count = 1;
46
- function call_loops_standard($data=array()){
47
- global $amp_q;
48
- if (get_query_var( 'paged' ) ) {
49
- $paged = get_query_var('paged');
50
- } elseif ( get_query_var( 'page' ) ) {
51
- $paged = get_query_var('page');
52
- } else {
53
- $paged = 1;
54
- }
55
-
56
- if ( is_archive() ) {
57
- $exclude_ids = get_option('ampforwp_exclude_post');
58
- $qobj = get_queried_object();
59
- $args = array(
60
- 'post_type' => 'post',
61
- 'orderby' => 'date',
62
- 'ignore_sticky_posts' => 1,
63
- 'tax_query' => array(
64
- array(
65
- 'taxonomy' => $qobj->taxonomy,
66
- 'field' => 'id',
67
- 'terms' => $qobj->term_id,
68
- // using a slug is also possible
69
- // 'field' => 'slug',
70
- // 'terms' => $qobj->name
71
- )
72
- ),
73
- 'paged' => esc_attr($paged),
74
- 'post__not_in' => $exclude_ids,
75
- 'has_password' => false ,
76
- 'post_status'=> 'publish'
77
- );
78
- }
79
- if ( is_home() ) {
80
- $exclude_ids = get_option('ampforwp_exclude_post');
81
-
82
- $args = array(
83
- 'post_type' => 'post',
84
- 'orderby' => 'date',
85
- 'paged' => esc_attr($paged),
86
- 'post__not_in' => $exclude_ids,
87
- 'has_password' => false ,
88
- 'post_status' => 'publish'
89
- );
90
- }
91
-
92
- if ( is_search() ) {
93
- $exclude_ids = get_option('ampforwp_exclude_post');
94
- $args = array(
95
- 's' => get_search_query() ,
96
- 'ignore_sticky_posts' => 1,
97
- 'paged' => esc_attr($paged),
98
- 'post__not_in' => $exclude_ids,
99
- 'has_password' => false ,
100
- 'post_status' => 'publish'
101
- );
102
- }
103
- if(is_author()){
104
- $exclude_ids = get_option('ampforwp_exclude_post');
105
- $author = get_user_by( 'slug', get_query_var( 'author_name' ) );
106
- $args = array(
107
- 'author' => $author->ID,
108
- 'post_type' => 'post',
109
- 'orderby' => 'date',
110
- 'ignore_sticky_posts' => 1,
111
- 'paged' => esc_attr($paged),
112
- 'post__not_in' => $exclude_ids,
113
- 'has_password' => false ,
114
- 'post_status'=> 'publish'
115
- );
116
- }
117
- if( is_single() ) {
118
- global $post;
119
- $exclude_ids = get_option('ampforwp_exclude_post');
120
- $exclude_ids[] = $post->ID;
121
- $args = array(
122
- 'post_type' => 'post',
123
- 'orderby' => 'date',
124
- 'ignore_sticky_posts' => 1,
125
- 'paged' => esc_attr($paged),
126
- 'post__not_in' => $exclude_ids,
127
- 'has_password' => false ,
128
- 'post_status'=> 'publish'
129
- );
130
- }
131
- if( isset( $data['post_to_show'] ) && $data['post_to_show']>0 ){
132
- $args['posts_per_page'] = $data['post_to_show'];
133
- }
134
- if( isset( $data['offset'] ) && $data['offset']>0 ){
135
- $args['offset'] = $data['offset'];
136
- }
137
- if( isset( $data['posts_per_page'] ) && $data['posts_per_page']>0 ){
138
- $args['posts_per_page'] = $data['posts_per_page'];
139
- }
140
-
141
- $filtered_args = apply_filters('ampforwp_query_args', $args);
142
- $amp_q = new WP_Query( $filtered_args );
143
- }
144
- //call_loops_standered();
145
- /****
146
- * AMP Loop Functions
147
- */
148
- //add_action("init", 'call_loops_standered');
149
-
150
- function amp_loop($selection,$data=array()){
151
- global $amp_q;
152
- if(empty($amp_q) || is_null($amp_q)){
153
- call_loops_standard($data);
154
- echo "<div class='loop-wrapper'>";
155
- }
156
- if ( !isset($ampLoopData['no_data']) ) :
157
- switch($selection){
158
- case 'start':
159
- return amp_start_loop();
160
- break;
161
- case 'end':
162
- return amp_end_loop();
163
- break;
164
- }
165
- else : // If no posts exist.
166
- return false;
167
- endif; // End loop.
168
- }
169
-
170
- function amp_start_loop(){
171
- global $amp_q, $count;
172
- $post_status = $amp_q->have_posts();
173
- $amp_q->the_post();
174
- do_action('ampforwp_between_loop',$count);
175
- $count++;
176
- return $post_status;
177
- }
178
- function amp_end_loop(){
179
- global $amp_q;
180
- wp_reset_postdata();
181
- echo "</div>";
182
- }
183
-
184
- function amp_reset_loop(){
185
- global $amp_q;
186
- $amp_q = '';
187
- return "";
188
- }
189
-
190
- function amp_pagination($args =array()) {
191
- global $amp_q, $redux_builder_amp;
192
- if (get_query_var( 'paged' ) ) {
193
- $paged = get_query_var('paged');
194
- } elseif ( get_query_var( 'page' ) ) {
195
- $paged = get_query_var('page');
196
- } else {
197
- $paged = 1;
198
- }
199
- $pre_link = '';
200
- if(!isset($args['previous_text']) || $args['previous_text']==''){
201
- $args['previous_text'] = 'Show previous Posts';
202
- }
203
- if(!isset($args['next_text']) || $args['next_text']==''){
204
- $args['next_text'] = 'Show more Posts';
205
- }
206
- if ( $paged > 1 ) {
207
- $pre_link = '<div class="left">'.get_previous_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-previous-posts-text'], $args['previous_text'] ) ) .'</div>';
208
- }
209
-
210
- echo '<div class="loop-pagination">
211
- <div class="right">'. get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-more-posts-text'] , $args['next_text']), $amp_q->max_num_pages ) .'</div>
212
- '.$pre_link.'
213
- <div class="clearfix"></div>
214
- </div>';
215
- }
216
-
217
- /***
218
- * Get Title of post
219
- */
220
- function amp_loop_title($data=array()){
221
- $data = array_filter($data);
222
- $tag = 'h2';
223
- if(isset($data['tag']) && $data['tag']!=""){
224
- $tag = $data['tag'];
225
- }
226
- $attributes = 'class="loop-title"';
227
- if(isset($data['attributes']) && $data['attributes']!=""){
228
- $attributes = $data['attributes'];
229
- }
230
- echo '<'.$tag.' '.$attributes.'>';
231
- if(!isset($data['link']) ){
232
- echo '<a href="'. amp_loop_permalink(true) .'">';
233
- }
234
- echo the_title('','',false);
235
-
236
- if(!isset($data['link']) ){
237
- echo '</a>';
238
- }
239
- echo '</'.$tag.'>';
240
- }
241
-
242
- function amp_loop_date($args=array()){
243
- global $redux_builder_amp;
244
- if(isset($args['format']) && $args['format']=='traditional'){
245
- $post_date = esc_html( get_the_date() ) . ' '.esc_html( get_the_time());
246
- }else{
247
- $post_date = human_time_diff(
248
- get_the_time('U', get_the_ID() ),
249
- current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
250
- 'ago');
251
- }
252
- echo '<div class="loop-date">'.$post_date.'</div>';
253
- }
254
-
255
- function amp_loop_excerpt($no_of_words=15,$tag = 'p'){
256
- //excerpt
257
- if(has_excerpt()){
258
- $content = get_the_excerpt();
259
- }else{
260
- $content = get_the_content();
261
- }
262
- $content = strip_shortcodes( $content );
263
- echo '<'.$tag.'>'. wp_trim_words( $content, $no_of_words ) .'</'.$tag.'>';
264
- }
265
- function amp_loop_all_content($tag = 'p'){
266
- $fullContent = strip_shortcodes( get_the_content() );
267
- echo '<'.$tag.'>'. $fullContent .'</'.$tag.'>';
268
- }
269
-
270
- function amp_loop_permalink($return,$amp_query_var ='amp'){
271
- if( $return ){
272
- return ampforwp_url_controller( get_permalink() ) ;
273
- }
274
- echo ampforwp_url_controller( get_permalink() );
275
- }
276
- function amp_loop_image( $data=array() ){
277
- global $ampLoopData,$counterOffset;
278
- if (has_post_thumbnail() ) {
279
-
280
- $tag = 'div';
281
- $tag_class = '';
282
- $layout_responsive = '';
283
- $imageClass = '';
284
- $imageSize = 'thumbnail';
285
-
286
- if(isset($data['tag']) && $data['tag']!=""){
287
- $tag = $data['tag'];
288
- }
289
-
290
- if(isset($data['responsive']) && $data['responsive']!=""){
291
- $layout_responsive = 'layout=responsive';
292
- }
293
-
294
- if(isset($data['tag_class']) && $data['tag_class']!=""){
295
- $tag_class = $data['tag_class'];
296
- }
297
- if(isset($data['image_class']) && $data['image_class']!=""){
298
- $imageClass = $data['image_class'];
299
- }
300
- if(isset($data['image_size']) && $data['image_size']!=""){
301
- $imageSize = $data['image_size'];
302
- }
303
-
304
- $thumb_id = get_post_thumbnail_id();
305
- $thumb_url_array = wp_get_attachment_image_src($thumb_id, $imageSize, true);
306
-
307
- if(isset($data['image_crop']) && $data['image_crop'] != ""){
308
- $width = $data['image_crop_width'];
309
- if(empty($width)){
310
- $width = $thumb_url_array[1];
311
- }
312
- $height = $data['image_crop_height'];
313
- if(empty($height)){
314
- $height = $thumb_url_array[2];
315
- }
316
- $thumb_url_array = aq_resize( $thumb_url_array[0], $width, $height, true, false, true ); //resize & crop the image
317
- }
318
- $thumb_url = $thumb_url_array[0];
319
-
320
- echo '<'.$tag.' class="loop-img '.$tag_class.'">';
321
- echo '<a href="'.amp_loop_permalink(true).'">';
322
- echo '<amp-img src="'. $thumb_url .'" width="'.$thumb_url_array[1].'" height="'.$thumb_url_array[2].'" '. $layout_responsive .' class="'.$imageClass.'"></amp-img>';
323
- echo '</a>';
324
- echo '</'.$tag.'>';
325
- }
326
- }
327
-
328
- // Category
329
- function amp_loop_category(){
330
- echo ' <ul class="loop-category">';
331
- if(count(get_the_category()) > 0){
332
- foreach((get_the_category()) as $category) {
333
- echo '<li class="amp-cat-'. $category->term_id.'"><a href="'.ampforwp_url_controller( get_category_link( $category->term_id ) ).'">'. $category->cat_name.'</a></li>';
334
- }
335
- }
336
- echo '</ul>';
337
- }
338
- // author
339
- function amp_loop_author($args = array()){
340
- global $redux_builder_amp;
341
- if(function_exists('ampforwp_framework_get_author_box')){
342
- ampforwp_framework_get_author_box($args);
343
- }else{
344
- echo "";
345
- }
 
 
346
  }
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_comment_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
+ the_archive_title( '<h3 class="amp-archive-title">', '</h3>' );
17
+ the_archive_description( '<div class="amp-archive-desc">', '</div>' );
18
+ }
19
+ if( is_category() && 1 == $redux_builder_amp['ampforwp-sub-categories-support'] ){
20
+ $parent_cat_id = '';
21
+ $cat_childs = array();
22
+ $parent_cat_id = get_queried_object_id();
23
+ $cat_childs = get_terms( array(
24
+ 'taxonomy' => get_queried_object()->taxonomy,
25
+ 'parent' => $parent_cat_id )
26
+ );
27
+ if( !empty( $cat_childs ) ){
28
+ echo "<div class='amp-sub-archives'><ul>";
29
+ foreach ($cat_childs as $cat_child ) {
30
+ echo '<li><a href="' . get_term_link( $cat_child ) . '">' . $cat_child->name . '</a></li>';
31
+ }
32
+ echo "</ul></div>";
33
+ }
34
+ }
35
+ if(is_search()){
36
+ $label = 'You searched for:';
37
+ if(function_exists('ampforwp_translation')){
38
+ $label = ampforwp_translation( $redux_builder_amp['amp-translator-search-text'], 'You searched for:');
39
+ }
40
+ echo '<h3 class="amp-loop-label">'.$label . ' ' . get_search_query().'</h3>';
41
+ }
42
+ }
43
+
44
+ $amp_q = '';
45
+ $count = 1;
46
+ function call_loops_standard($data=array()){
47
+ global $amp_q;
48
+ if (get_query_var( 'paged' ) ) {
49
+ $paged = get_query_var('paged');
50
+ } elseif ( get_query_var( 'page' ) ) {
51
+ $paged = get_query_var('page');
52
+ } else {
53
+ $paged = 1;
54
+ }
55
+
56
+ if ( is_archive() ) {
57
+ $exclude_ids = get_option('ampforwp_exclude_post');
58
+ $qobj = get_queried_object();
59
+ $args = array(
60
+ 'post_type' => 'post',
61
+ 'orderby' => 'date',
62
+ 'ignore_sticky_posts' => 1,
63
+ 'tax_query' => array(
64
+ array(
65
+ 'taxonomy' => $qobj->taxonomy,
66
+ 'field' => 'id',
67
+ 'terms' => $qobj->term_id,
68
+ // using a slug is also possible
69
+ // 'field' => 'slug',
70
+ // 'terms' => $qobj->name
71
+ )
72
+ ),
73
+ 'paged' => esc_attr($paged),
74
+ 'post__not_in' => $exclude_ids,
75
+ 'has_password' => false ,
76
+ 'post_status'=> 'publish'
77
+ );
78
+ }
79
+ if ( is_home() ) {
80
+ $exclude_ids = get_option('ampforwp_exclude_post');
81
+
82
+ $args = array(
83
+ 'post_type' => 'post',
84
+ 'orderby' => 'date',
85
+ 'paged' => esc_attr($paged),
86
+ 'post__not_in' => $exclude_ids,
87
+ 'has_password' => false ,
88
+ 'post_status' => 'publish'
89
+ );
90
+ }
91
+
92
+ if ( is_search() ) {
93
+ $exclude_ids = get_option('ampforwp_exclude_post');
94
+ $args = array(
95
+ 's' => get_search_query() ,
96
+ 'ignore_sticky_posts' => 1,
97
+ 'paged' => esc_attr($paged),
98
+ 'post__not_in' => $exclude_ids,
99
+ 'has_password' => false ,
100
+ 'post_status' => 'publish'
101
+ );
102
+ }
103
+ if(is_author()){
104
+ $exclude_ids = get_option('ampforwp_exclude_post');
105
+ $author = get_user_by( 'slug', get_query_var( 'author_name' ) );
106
+ $args = array(
107
+ 'author' => $author->ID,
108
+ 'post_type' => 'post',
109
+ 'orderby' => 'date',
110
+ 'ignore_sticky_posts' => 1,
111
+ 'paged' => esc_attr($paged),
112
+ 'post__not_in' => $exclude_ids,
113
+ 'has_password' => false ,
114
+ 'post_status'=> 'publish'
115
+ );
116
+ }
117
+ if( is_single() ) {
118
+ global $post;
119
+ $exclude_ids = get_option('ampforwp_exclude_post');
120
+ $exclude_ids[] = $post->ID;
121
+ $args = array(
122
+ 'post_type' => 'post',
123
+ 'orderby' => 'date',
124
+ 'ignore_sticky_posts' => 1,
125
+ 'paged' => esc_attr($paged),
126
+ 'post__not_in' => $exclude_ids,
127
+ 'has_password' => false ,
128
+ 'post_status'=> 'publish'
129
+ );
130
+ }
131
+ if( isset( $data['post_to_show'] ) && $data['post_to_show']>0 ){
132
+ $args['posts_per_page'] = $data['post_to_show'];
133
+ }
134
+ if( isset( $data['offset'] ) && $data['offset']>0 ){
135
+ $args['offset'] = $data['offset'];
136
+ }
137
+ if( isset( $data['posts_per_page'] ) && $data['posts_per_page']>0 ){
138
+ $args['posts_per_page'] = $data['posts_per_page'];
139
+ }
140
+
141
+ $filtered_args = apply_filters('ampforwp_query_args', $args);
142
+ $amp_q = new WP_Query( $filtered_args );
143
+ }
144
+ //call_loops_standered();
145
+ /****
146
+ * AMP Loop Functions
147
+ */
148
+ //add_action("init", 'call_loops_standered');
149
+
150
+ function amp_loop($selection,$data=array()){
151
+ global $amp_q;
152
+ if(empty($amp_q) || is_null($amp_q)){
153
+ call_loops_standard($data);
154
+ echo "<div class='loop-wrapper'>";
155
+ }
156
+ if ( !isset($ampLoopData['no_data']) ) :
157
+ switch($selection){
158
+ case 'start':
159
+ return amp_start_loop();
160
+ break;
161
+ case 'end':
162
+ return amp_end_loop();
163
+ break;
164
+ }
165
+ else : // If no posts exist.
166
+ return false;
167
+ endif; // End loop.
168
+ }
169
+
170
+ function amp_start_loop(){
171
+ global $amp_q, $count;
172
+ $post_status = $amp_q->have_posts();
173
+ $amp_q->the_post();
174
+ do_action('ampforwp_between_loop',$count);
175
+ $count++;
176
+ return $post_status;
177
+ }
178
+ function amp_end_loop(){
179
+ global $amp_q;
180
+ wp_reset_postdata();
181
+ echo "</div>";
182
+ }
183
+
184
+ function amp_reset_loop(){
185
+ global $amp_q;
186
+ $amp_q = '';
187
+ return "";
188
+ }
189
+
190
+ function amp_pagination($args =array()) {
191
+ global $amp_q, $redux_builder_amp;
192
+ if (get_query_var( 'paged' ) ) {
193
+ $paged = get_query_var('paged');
194
+ } elseif ( get_query_var( 'page' ) ) {
195
+ $paged = get_query_var('page');
196
+ } else {
197
+ $paged = 1;
198
+ }
199
+ $pre_link = '';
200
+ if(!isset($args['previous_text']) || $args['previous_text']==''){
201
+ $args['previous_text'] = 'Show previous Posts';
202
+ }
203
+ if(!isset($args['next_text']) || $args['next_text']==''){
204
+ $args['next_text'] = 'Show more Posts';
205
+ }
206
+ if ( $paged > 1 ) {
207
+ $pre_link = '<div class="left">'.get_previous_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-previous-posts-text'], $args['previous_text'] ) ) .'</div>';
208
+ }
209
+
210
+ echo '<div class="loop-pagination">
211
+ <div class="right">'. get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-more-posts-text'] , $args['next_text']), $amp_q->max_num_pages ) .'</div>
212
+ '.$pre_link.'
213
+ <div class="clearfix"></div>
214
+ </div>';
215
+ }
216
+
217
+ /***
218
+ * Get Title of post
219
+ */
220
+ function amp_loop_title($data=array()){
221
+ $data = array_filter($data);
222
+ $tag = 'h2';
223
+ if(isset($data['tag']) && $data['tag']!=""){
224
+ $tag = $data['tag'];
225
+ }
226
+ $attributes = 'class="loop-title"';
227
+ if(isset($data['attributes']) && $data['attributes']!=""){
228
+ $attributes = $data['attributes'];
229
+ }
230
+ echo '<'.$tag.' '.$attributes.'>';
231
+ if(!isset($data['link']) ){
232
+ echo '<a href="'. amp_loop_permalink(true) .'">';
233
+ }
234
+ echo the_title('','',false);
235
+
236
+ if(!isset($data['link']) ){
237
+ echo '</a>';
238
+ }
239
+ echo '</'.$tag.'>';
240
+ }
241
+
242
+ function amp_loop_date($args=array()){
243
+ global $redux_builder_amp;
244
+ if(isset($args['format']) && $args['format']=='traditional'){
245
+ $post_date = esc_html( get_the_date() ) . ' '.esc_html( get_the_time());
246
+ }else{
247
+ $post_date = human_time_diff(
248
+ get_the_time('U', get_the_ID() ),
249
+ current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
250
+ 'ago');
251
+ }
252
+ echo '<div class="loop-date">'.$post_date.'</div>';
253
+ }
254
+
255
+ function amp_loop_excerpt($no_of_words=15,$tag = 'p'){
256
+ //excerpt
257
+ if(has_excerpt()){
258
+ $content = get_the_excerpt();
259
+ }else{
260
+ $content = get_the_content();
261
+ }
262
+ $content = strip_shortcodes( $content );
263
+ echo '<'.$tag.'>'. wp_trim_words( $content, $no_of_words ) .'</'.$tag.'>';
264
+ }
265
+ function amp_loop_all_content($tag = 'p'){
266
+ $fullContent = strip_shortcodes( get_the_content() );
267
+ echo '<'.$tag.'>'. $fullContent .'</'.$tag.'>';
268
+ }
269
+
270
+ function amp_loop_permalink($return,$amp_query_var ='amp'){
271
+ if( $return ){
272
+ return ampforwp_url_controller( get_permalink() ) ;
273
+ }
274
+ echo ampforwp_url_controller( get_permalink() );
275
+ }
276
+ function amp_loop_image( $data=array() ) {
277
+ global $ampLoopData,$counterOffset;
278
+ if (ampforwp_has_post_thumbnail() ) {
279
+
280
+ $tag = 'div';
281
+ $tag_class = '';
282
+ $layout_responsive = '';
283
+ $imageClass = '';
284
+ $imageSize = 'thumbnail';
285
+
286
+ if ( isset($data['tag']) && $data['tag'] != "" ) {
287
+ $tag = $data['tag'];
288
+ }
289
+
290
+ if ( isset($data['responsive']) && $data['responsive'] != "" ) {
291
+ $layout_responsive = 'layout=responsive';
292
+ }
293
+
294
+ if ( isset($data['tag_class']) && $data['tag_class'] != "" ) {
295
+ $tag_class = $data['tag_class'];
296
+ }
297
+ if ( isset($data['image_class']) && $data['image_class'] != "" ) {
298
+ $imageClass = $data['image_class'];
299
+ }
300
+ if ( isset($data['image_size']) && $data['image_size'] != "" ) {
301
+ $imageSize = $data['image_size'];
302
+ }
303
+ $thumb_url = ampforwp_get_post_thumbnail('url', $imageSize);
304
+ $thumb_width = ampforwp_get_post_thumbnail('width', $imageSize);
305
+ $thumb_height = ampforwp_get_post_thumbnail('height', $imageSize);
306
+
307
+ if ( isset($data['image_crop']) && $data['image_crop'] != "" ) {
308
+ $width = $data['image_crop_width'];
309
+ if ( empty($width) ) {
310
+ $width = $thumb_width;
311
+ }
312
+ $height = $data['image_crop_height'];
313
+ if ( empty($height) ) {
314
+ $height = $thumb_height;
315
+ }
316
+ $thumb_url_array = aq_resize( $thumb_url, $width, $height, true, false, true ); //resize & crop the image
317
+ $thumb_url = $thumb_url_array[0];
318
+ $thumb_width = $thumb_url_array[1];
319
+ $thumb_height = $thumb_url_array[2];
320
+ }
321
+
322
+ echo '<'.$tag.' class="loop-img '.$tag_class.'">';
323
+ echo '<a href="'.amp_loop_permalink(true).'">';
324
+ echo '<amp-img src="'. $thumb_url .'" width="'.$thumb_width.'" height="'.$thumb_height.'" '. $layout_responsive .' class="'.$imageClass.'"></amp-img>';
325
+ echo '</a>';
326
+ echo '</'.$tag.'>';
327
+ }
328
+ }
329
+
330
+ // Category
331
+ function amp_loop_category(){
332
+ echo ' <ul class="loop-category">';
333
+ if(count(get_the_category()) > 0){
334
+ foreach((get_the_category()) as $category) {
335
+ echo '<li class="amp-cat-'. $category->term_id.'"><a href="'.ampforwp_url_controller( get_category_link( $category->term_id ) ).'">'. $category->cat_name.'</a></li>';
336
+ }
337
+ }
338
+ echo '</ul>';
339
+ }
340
+ // author
341
+ function amp_loop_author($args = array()){
342
+ global $redux_builder_amp;
343
+ if(function_exists('ampforwp_framework_get_author_box')){
344
+ ampforwp_framework_get_author_box($args);
345
+ }else{
346
+ echo "";
347
+ }
348
  }
components/menu/menu.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- function amp_menu_html(){
3
- if( has_nav_menu( 'amp-menu' ) ) {
4
- $menu_html_content = wp_nav_menu( array(
5
- 'theme_location' => 'amp-menu',
6
- 'container'=>'aside',
7
- 'menu'=>'ul',
8
- 'menu_class'=>'amp-menu',
9
- 'echo' => false,
10
- ) );
11
- $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
12
- $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
13
- $sanitized_menu = $sanitizer_obj->get_amp_content();
14
- echo $sanitized_menu;
15
- }
16
- }
17
-
18
- //Load styling for Menu
19
- add_action('amp_post_template_css','amp_menu_styles',11);
20
- function amp_menu_styles(){ ?>
21
- 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:block}.amp-menu li.menu-item-has-children>ul>li{padding-left:10px}.amp-menu li.menu-item-has-children:after{content:" > ";position:absolute;padding:10px;right:0;top:0;z-index:10000;line-height:1;}.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}
22
  <?php }
1
+ <?php
2
+ function amp_menu_html(){
3
+ if( has_nav_menu( 'amp-menu' ) ) {
4
+ $menu_html_content = wp_nav_menu( array(
5
+ 'theme_location' => 'amp-menu',
6
+ 'container'=>'aside',
7
+ 'menu'=>'ul',
8
+ 'menu_class'=>'amp-menu',
9
+ 'echo' => false,
10
+ ) );
11
+ $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
12
+ $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
13
+ $sanitized_menu = $sanitizer_obj->get_amp_content();
14
+ echo $sanitized_menu;
15
+ }
16
+ }
17
+
18
+ //Load styling for Menu
19
+ add_action('amp_post_template_css','amp_menu_styles',11);
20
+ function amp_menu_styles(){ ?>
21
+ 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:block}.amp-menu li.menu-item-has-children>ul>li{padding-left:10px}.amp-menu li.menu-item-has-children:after{content:" > ";position:absolute;padding:10px;right:0;top:0;z-index:10000;line-height:1;}.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}
22
  <?php }
components/post-navigation/post-navigation.php CHANGED
@@ -1,26 +1,26 @@
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
- <div class="next">
7
- <?php $next_post = get_next_post();
8
- if (!empty( $next_post )) {
9
- $next_text = $next_post->post_title; ?>
10
- <a href="<?php echo ampforwp_url_controller( get_permalink( $next_post->ID ) ); ?>"><span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' ); ?></span><?php echo apply_filters('ampforwp_next_link',$next_text ); ?> &raquo;</a> <?php
11
- } ?>
12
- </div>
13
-
14
- <div class="prev">
15
- <?php $prev_post = get_previous_post();
16
- if (!empty( $prev_post )) {
17
- $prev_text = $prev_post->post_title;
18
- ?>
19
- <a href="<?php echo ampforwp_url_controller( get_permalink( $prev_post->ID ) ); ?>"><span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' ); ?></span> &laquo; <?php echo apply_filters('ampforwp_prev_link',$prev_text ); ?></a> <?php
20
- } ?>
21
- </div>
22
-
23
- <div class="clearfix"></div>
24
- </div>
25
- <?php }
26
  }
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
+ <div class="next">
7
+ <?php $next_post = get_next_post();
8
+ if (!empty( $next_post )) {
9
+ $next_text = $next_post->post_title; ?>
10
+ <a href="<?php echo ampforwp_url_controller( get_permalink( $next_post->ID ) ); ?>"><span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' ); ?></span><?php echo apply_filters('ampforwp_next_link',$next_text ); ?> &raquo;</a> <?php
11
+ } ?>
12
+ </div>
13
+
14
+ <div class="prev">
15
+ <?php $prev_post = get_previous_post();
16
+ if (!empty( $prev_post )) {
17
+ $prev_text = $prev_post->post_title;
18
+ ?>
19
+ <a href="<?php echo ampforwp_url_controller( get_permalink( $prev_post->ID ) ); ?>"><span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' ); ?></span> &laquo; <?php echo apply_filters('ampforwp_prev_link',$prev_text ); ?></a> <?php
20
+ } ?>
21
+ </div>
22
+
23
+ <div class="clearfix"></div>
24
+ </div>
25
+ <?php }
26
  }
components/post-pagination/post-pagination.php CHANGED
@@ -1,181 +1,181 @@
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>' . __( 'Page:' ),
9
- 'after' => '</p>',
10
- 'link_before' => '',
11
- 'link_after' => '',
12
- 'next_or_number' => 'number',
13
- 'separator' => ' ',
14
- 'nextpagelink' => __( 'Next page' ),
15
- 'previouspagelink' => __( '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( '%', $i, $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='$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()){
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 $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', '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 $new_canonical_url.$post_paginated_page ?>/" /><?php }
159
- }
160
-
161
- add_filter('ampforwp_modify_the_content','ampforwp_post_paginated_content');
162
- function ampforwp_post_paginated_content($content){
163
- global $redux_builder_amp;
164
- $ampforwp_new_content = $ampforwp_the_content = $checker = '';
165
- $ampforwp_the_content = $content;
166
- $checker = preg_match('/<!--nextpage-->/', $ampforwp_the_content);
167
- if ( 1 === $checker ) {
168
- $ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
169
- $queried_var = get_query_var('page');
170
- if ( $queried_var > 1 ) {
171
- $queried_var = $queried_var -1 ;
172
- }
173
- else {
174
- $queried_var = 0;
175
- }
176
- return $ampforwp_new_content[$queried_var];
177
- }
178
- else {
179
- return $ampforwp_the_content;
180
- }
181
  }
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>' . __( 'Page:' ),
9
+ 'after' => '</p>',
10
+ 'link_before' => '',
11
+ 'link_after' => '',
12
+ 'next_or_number' => 'number',
13
+ 'separator' => ' ',
14
+ 'nextpagelink' => __( 'Next page' ),
15
+ 'previouspagelink' => __( '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( '%', $i, $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='$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()){
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 $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', '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 $new_canonical_url.$post_paginated_page ?>/" /><?php }
159
+ }
160
+
161
+ add_filter('ampforwp_modify_the_content','ampforwp_post_paginated_content');
162
+ function ampforwp_post_paginated_content($content){
163
+ global $redux_builder_amp;
164
+ $ampforwp_new_content = $ampforwp_the_content = $checker = '';
165
+ $ampforwp_the_content = $content;
166
+ $checker = preg_match('/<!--nextpage-->/', $ampforwp_the_content);
167
+ if ( 1 === $checker ) {
168
+ $ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
169
+ $queried_var = get_query_var('page');
170
+ if ( $queried_var > 1 ) {
171
+ $queried_var = $queried_var -1 ;
172
+ }
173
+ else {
174
+ $queried_var = 0;
175
+ }
176
+ return $ampforwp_new_content[$queried_var];
177
+ }
178
+ else {
179
+ return $ampforwp_the_content;
180
+ }
181
  }
components/related-posts/related-posts.php CHANGED
@@ -1,150 +1,150 @@
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 = round(abs(floatval($string_number_of_related_posts)));
11
- $my_query = related_post_loop_query();
12
- if( $my_query->have_posts() ) { ?>
13
- <div class="amp-related-posts">
14
- <ul class="clearfix">
15
- <?php ampforwp_related_post(); ?>
16
- <?php
17
- while( $my_query->have_posts() ) {
18
- $my_query->the_post();
19
-
20
- ?>
21
- <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
22
- <?php
23
- $related_post_permalink = ampforwp_url_controller( get_permalink() );
24
- if ( $show_image ) {
25
- if ( isset($argsdata['image_size']) && '' != $argsdata['image_size'] ) {
26
- ampforwp_get_relatedpost_image($argsdata['image_size']);
27
- }
28
- else {
29
- ampforwp_get_relatedpost_image('thumbnail');
30
- }
31
- }
32
- ampforwp_get_relatedpost_content($argsdata);
33
- ?>
34
- </li><?php
35
- }
36
-
37
- } ?>
38
- </ul>
39
- </div>
40
- <?php wp_reset_postdata(); ?>
41
- <?php do_action('ampforwp_below_related_post_hook');
42
- }
43
-
44
-
45
- function related_post_loop_query(){
46
- global $post, $redux_builder_amp;
47
- $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
48
- $int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
49
- $args = null;
50
-
51
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
52
- $categories = get_the_category($post->ID);
53
- if ($categories) {
54
- $category_ids = array();
55
- foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
56
- $args=array(
57
- 'category__in' => $category_ids,
58
- 'post__not_in' => array($post->ID),
59
- 'posts_per_page'=> $int_number_of_related_posts,
60
- 'ignore_sticky_posts'=>1,
61
- 'has_password' => false ,
62
- 'post_status'=> 'publish'
63
- );
64
- }
65
- }
66
- // tags
67
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
68
- $ampforwp_tags = get_the_tags($post->ID);
69
- if ($ampforwp_tags) {
70
- $tag_ids = array();
71
- foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
72
- $args=array(
73
- 'tag__in' => $tag_ids,
74
- 'post__not_in' => array($post->ID),
75
- 'posts_per_page'=> $int_number_of_related_posts,
76
- 'ignore_sticky_posts'=>1,
77
- 'has_password' => false ,
78
- 'post_status'=> 'publish'
79
- );
80
- }
81
- }
82
- if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
83
-
84
- }
85
- $my_query = new wp_query( $args );
86
- return $my_query;
87
- }
88
-
89
- function ampforwp_related_post(){
90
- global $redux_builder_amp;
91
- do_action('ampforwp_above_related_post'); //Above Related Posts
92
- ?>
93
- <h3 class="amp-related-posts-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></h3>
94
- <?php }
95
-
96
-
97
- function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
98
- $related_post_permalink = ampforwp_url_controller( get_permalink() );
99
- $show_image = (isset($data['show_image']) ? $data['show_image'] : true);
100
- ?>
101
- <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
102
- <?php
103
- $thumb_id_2 = get_post_thumbnail_id();
104
- $thumb_url_array_2 = wp_get_attachment_image_src($thumb_id_2, $imagetype, true);
105
- if(isset($data['image_crop']) && $data['image_crop'] != ""){
106
- $width = $data['image_crop_width'];
107
- if(empty($width)){
108
- $width = $thumb_url_array_2[1];
109
- }
110
- $height = $data['image_crop_height'];
111
- if(empty($height)){
112
- $height = $thumb_url_array_2[2];
113
- }
114
- $thumb_url_array_2 = aq_resize( $thumb_url_array_2[0], $width, $height, true, false ); //resize & crop the image
115
- }
116
- $thumb_url_2 = $thumb_url_array_2[0];
117
-
118
- if ( has_post_thumbnail() && $show_image ) { ?>
119
- <amp-img src="<?php echo esc_url( $thumb_url_2 ); ?>" width="<?php echo $thumb_url_array_2[1]; ?>" height="<?php echo $thumb_url_array_2[2]; ?>" layout="responsive"></amp-img>
120
- <?php } ?>
121
- </a>
122
- <?php
123
- }
124
- function ampforwp_get_relatedpost_content($argsdata=array()){
125
- $related_post_permalink = ampforwp_url_controller( get_permalink() );
126
- ?>
127
- <div class="related_link">
128
- <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
129
-
130
- <?php
131
- $show_excerpt = (isset($argsdata['show_excerpt'])? $argsdata['show_excerpt'] : true);
132
- if($show_excerpt){
133
- if(has_excerpt()){
134
- $content = get_the_excerpt();
135
- }else{
136
- $content = get_the_content();
137
- }
138
- ?><p><?php
139
- echo wp_trim_words( strip_shortcodes( $content ) , '15' );
140
- ?></p><?php
141
- }
142
- $show_author = (isset($argsdata['show_author'])? $argsdata['show_author'] : true);
143
- if($show_author){
144
- $author_args = isset($argsdata['author_args'])? $argsdata['author_args'] : array();
145
- ampforwp_framework_get_author_box($author_args);
146
- }
147
- ?>
148
- </div>
149
- <?php
150
  }
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 = round(abs(floatval($string_number_of_related_posts)));
11
+ $my_query = related_post_loop_query();
12
+ if( $my_query->have_posts() ) { ?>
13
+ <div class="amp-related-posts">
14
+ <ul class="clearfix">
15
+ <?php ampforwp_related_post(); ?>
16
+ <?php
17
+ while( $my_query->have_posts() ) {
18
+ $my_query->the_post();
19
+
20
+ ?>
21
+ <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
22
+ <?php
23
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
24
+ if ( $show_image ) {
25
+ if ( isset($argsdata['image_size']) && '' != $argsdata['image_size'] ) {
26
+ ampforwp_get_relatedpost_image($argsdata['image_size']);
27
+ }
28
+ else {
29
+ ampforwp_get_relatedpost_image('thumbnail');
30
+ }
31
+ }
32
+ ampforwp_get_relatedpost_content($argsdata);
33
+ ?>
34
+ </li><?php
35
+ }
36
+
37
+ } ?>
38
+ </ul>
39
+ </div>
40
+ <?php wp_reset_postdata(); ?>
41
+ <?php do_action('ampforwp_below_related_post_hook');
42
+ }
43
+
44
+
45
+ function related_post_loop_query(){
46
+ global $post, $redux_builder_amp;
47
+ $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
48
+ $int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
49
+ $args = null;
50
+
51
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
52
+ $categories = get_the_category($post->ID);
53
+ if ($categories) {
54
+ $category_ids = array();
55
+ foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
56
+ $args=array(
57
+ 'category__in' => $category_ids,
58
+ 'post__not_in' => array($post->ID),
59
+ 'posts_per_page'=> $int_number_of_related_posts,
60
+ 'ignore_sticky_posts'=>1,
61
+ 'has_password' => false ,
62
+ 'post_status'=> 'publish'
63
+ );
64
+ }
65
+ }
66
+ // tags
67
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
68
+ $ampforwp_tags = get_the_tags($post->ID);
69
+ if ($ampforwp_tags) {
70
+ $tag_ids = array();
71
+ foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
72
+ $args=array(
73
+ 'tag__in' => $tag_ids,
74
+ 'post__not_in' => array($post->ID),
75
+ 'posts_per_page'=> $int_number_of_related_posts,
76
+ 'ignore_sticky_posts'=>1,
77
+ 'has_password' => false ,
78
+ 'post_status'=> 'publish'
79
+ );
80
+ }
81
+ }
82
+ if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
83
+
84
+ }
85
+ $my_query = new wp_query( $args );
86
+ return $my_query;
87
+ }
88
+
89
+ function ampforwp_related_post(){
90
+ global $redux_builder_amp;
91
+ do_action('ampforwp_above_related_post'); //Above Related Posts
92
+ ?>
93
+ <h3 class="amp-related-posts-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></h3>
94
+ <?php }
95
+
96
+
97
+ function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
98
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
99
+ $show_image = (isset($data['show_image']) ? $data['show_image'] : true);
100
+ ?>
101
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
102
+ <?php
103
+ $thumb_id_2 = get_post_thumbnail_id();
104
+ $thumb_url_array_2 = wp_get_attachment_image_src($thumb_id_2, $imagetype, true);
105
+ if(isset($data['image_crop']) && $data['image_crop'] != ""){
106
+ $width = $data['image_crop_width'];
107
+ if(empty($width)){
108
+ $width = $thumb_url_array_2[1];
109
+ }
110
+ $height = $data['image_crop_height'];
111
+ if(empty($height)){
112
+ $height = $thumb_url_array_2[2];
113
+ }
114
+ $thumb_url_array_2 = aq_resize( $thumb_url_array_2[0], $width, $height, true, false ); //resize & crop the image
115
+ }
116
+ $thumb_url_2 = $thumb_url_array_2[0];
117
+
118
+ if ( has_post_thumbnail() && $show_image ) { ?>
119
+ <amp-img src="<?php echo esc_url( $thumb_url_2 ); ?>" width="<?php echo $thumb_url_array_2[1]; ?>" height="<?php echo $thumb_url_array_2[2]; ?>" layout="responsive"></amp-img>
120
+ <?php } ?>
121
+ </a>
122
+ <?php
123
+ }
124
+ function ampforwp_get_relatedpost_content($argsdata=array()){
125
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
126
+ ?>
127
+ <div class="related_link">
128
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
129
+
130
+ <?php
131
+ $show_excerpt = (isset($argsdata['show_excerpt'])? $argsdata['show_excerpt'] : true);
132
+ if($show_excerpt){
133
+ if(has_excerpt()){
134
+ $content = get_the_excerpt();
135
+ }else{
136
+ $content = get_the_content();
137
+ }
138
+ ?><p><?php
139
+ echo wp_trim_words( strip_shortcodes( $content ) , '15' );
140
+ ?></p><?php
141
+ }
142
+ $show_author = (isset($argsdata['show_author'])? $argsdata['show_author'] : true);
143
+ if($show_author){
144
+ $author_args = isset($argsdata['author_args'])? $argsdata['author_args'] : array();
145
+ ampforwp_framework_get_author_box($author_args);
146
+ }
147
+ ?>
148
+ </div>
149
+ <?php
150
  }
components/search/search.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php
2
- //main output function
3
- function ampforwp_framework_get_search_form() {
4
- global $redux_builder_amp;
5
- $action_url = '';
6
- $label = ampforwp_translation(isset($redux_builder_amp['ampforwp-search-label']) && $redux_builder_amp['ampforwp-search-label'], 'Type your search query and hit enter');
7
- $action_url = esc_url( get_bloginfo('url') );
8
- $action_url = preg_replace('#^http?:#', '', $action_url);
9
- $placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
10
- $form = '<form role="search" method="get" id="amp-search" class="amp-search" target="_top" action="' . $action_url .'">
11
- <div class="amp-search-wrapper">
12
- <label class="screen-reader-text" for="s">' . $label . '</label>
13
- <input type="text" placeholder="AMP" value="1" name="amp" class="hidden"/>
14
- <input type="text" placeholder="'.$placeholder.'" value="' . get_search_query() . '" name="s" id="s" />
15
- <input type="submit" class="icon-search" id="amp-search-submit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
16
- <div class="overlay-search">
17
- </div>
18
- </div>
19
- </form>';
20
- echo $form;
21
-
22
- }
23
- ampforwp_add_scripts();
24
- function ampforwp_add_scripts(){
25
- global $scriptComponent;
26
- if ( empty( $scriptComponent['amp-form'] ) ) {
27
- $scriptComponent['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
28
- }
29
  }
1
+ <?php
2
+ //main output function
3
+ function ampforwp_framework_get_search_form() {
4
+ global $redux_builder_amp;
5
+ $action_url = '';
6
+ $label = ampforwp_translation(isset($redux_builder_amp['ampforwp-search-label']) && $redux_builder_amp['ampforwp-search-label'], 'Type your search query and hit enter');
7
+ $action_url = esc_url( get_bloginfo('url') );
8
+ $action_url = preg_replace('#^http?:#', '', $action_url);
9
+ $placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
10
+ $form = '<form role="search" method="get" id="amp-search" class="amp-search" target="_top" action="' . $action_url .'">
11
+ <div class="amp-search-wrapper">
12
+ <label class="screen-reader-text" for="s">' . $label . '</label>
13
+ <input type="text" placeholder="AMP" value="1" name="amp" class="hidden"/>
14
+ <input type="text" placeholder="'.$placeholder.'" value="' . get_search_query() . '" name="s" id="s" />
15
+ <input type="submit" class="icon-search" id="amp-search-submit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
16
+ <div class="overlay-search">
17
+ </div>
18
+ </div>
19
+ </form>';
20
+ echo $form;
21
+
22
+ }
23
+ ampforwp_add_scripts();
24
+ function ampforwp_add_scripts(){
25
+ global $scriptComponent;
26
+ if ( empty( $scriptComponent['amp-form'] ) ) {
27
+ $scriptComponent['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
28
+ }
29
  }
components/sidebar/sidebar.php CHANGED
@@ -1,80 +1,80 @@
1
- <?php
2
- if(!function_exists('ampforwp_framework_get_sideabr')){
3
- function ampforwp_framework_get_sideabr($data=array()){
4
- if(!isset($data['action'])){
5
- echo esc_attr('action not found');
6
- }
7
- $action = $data['action'];
8
- unset($data['action']);
9
- switch(strtolower($action)) {
10
- case 'start':
11
- echo sideber_begin($data);
12
- do_action('amp_sidebar_start');
13
- break;
14
- case 'end':
15
- do_action('amp_sidebar_end');
16
- echo sideber_end();
17
- break;
18
- case 'open-button':
19
- echo sidebar_opening_button($data);
20
- break;
21
- case 'close-button':
22
- echo sidebar_close_button($data);
23
- break;
24
- default:
25
- echo esc_html('action not found');
26
- break;
27
- }
28
- }
29
- }
30
- function sidebar_close_button($data=array() ){
31
- $id = 'sidebar';
32
- $class = 'amp-sidebar-close';
33
- if(isset($data['id'])){
34
- $id = $data['id'];
35
- }
36
- if(isset($data['class'])){
37
- $class .= $data['class'];
38
- }
39
- return '<div role="button" tabindex="0" on="tap:'.esc_attr( $id ).'.close" class="'.esc_attr( $class ).'">X</div>';
40
- }
41
- function sidebar_opening_button($data=array()){
42
- $id = 'sidebar';
43
- $class = 'amp-sidebar-button';
44
- if(isset($data['id'])){
45
- $id = $data['id'];
46
- }
47
- if(isset($data['class'])){
48
- $class = $data['class'];
49
- }
50
- return '<div on="tap:'.esc_attr( $id ).'.toggle" role="button" tabindex="0" class="'. esc_attr( $class ) .'">
51
- <a href="#" class="amp-sidebar-toggle">
52
- <span></span>
53
- <span></span>
54
- <span></span>
55
- </a>
56
- </div>';
57
- }
58
- function sideber_begin($data=array()){
59
- $attribute = '';
60
- if(count($data)>0){
61
- foreach ($data as $key => $value) {
62
- $attribute .= esc_attr($key).'="'.esc_attr($value).'" ';
63
- }
64
- }else{
65
- $attribute = "id='sidebar' layout='nodisplay' side='right'";
66
- }
67
- return '<amp-sidebar '. $attribute .'>';
68
- }
69
-
70
- function sideber_end(){
71
- return '</amp-sidebar>';
72
- }
73
-
74
- ampforwp_add_sidebar_scripts();
75
- function ampforwp_add_sidebar_scripts(){
76
- global $scriptComponent;
77
- if ( empty( $scriptComponent['amp-sidebar'] ) ) {
78
- $scriptComponent['amp-sidebar'] = 'https://cdn.ampproject.org/v0/amp-sidebar-0.1.js';
79
- }
80
  }
1
+ <?php
2
+ if(!function_exists('ampforwp_framework_get_sideabr')){
3
+ function ampforwp_framework_get_sideabr($data=array()){
4
+ if(!isset($data['action'])){
5
+ echo esc_attr('action not found');
6
+ }
7
+ $action = $data['action'];
8
+ unset($data['action']);
9
+ switch(strtolower($action)) {
10
+ case 'start':
11
+ echo sideber_begin($data);
12
+ do_action('amp_sidebar_start');
13
+ break;
14
+ case 'end':
15
+ do_action('amp_sidebar_end');
16
+ echo sideber_end();
17
+ break;
18
+ case 'open-button':
19
+ echo sidebar_opening_button($data);
20
+ break;
21
+ case 'close-button':
22
+ echo sidebar_close_button($data);
23
+ break;
24
+ default:
25
+ echo esc_html('action not found');
26
+ break;
27
+ }
28
+ }
29
+ }
30
+ function sidebar_close_button($data=array() ){
31
+ $id = 'sidebar';
32
+ $class = 'amp-sidebar-close';
33
+ if(isset($data['id'])){
34
+ $id = $data['id'];
35
+ }
36
+ if(isset($data['class'])){
37
+ $class .= $data['class'];
38
+ }
39
+ return '<div role="button" tabindex="0" on="tap:'.esc_attr( $id ).'.close" class="'.esc_attr( $class ).'">X</div>';
40
+ }
41
+ function sidebar_opening_button($data=array()){
42
+ $id = 'sidebar';
43
+ $class = 'amp-sidebar-button';
44
+ if(isset($data['id'])){
45
+ $id = $data['id'];
46
+ }
47
+ if(isset($data['class'])){
48
+ $class = $data['class'];
49
+ }
50
+ return '<div on="tap:'.esc_attr( $id ).'.toggle" role="button" tabindex="0" class="'. esc_attr( $class ) .'">
51
+ <a href="#" class="amp-sidebar-toggle">
52
+ <span></span>
53
+ <span></span>
54
+ <span></span>
55
+ </a>
56
+ </div>';
57
+ }
58
+ function sideber_begin($data=array()){
59
+ $attribute = '';
60
+ if(count($data)>0){
61
+ foreach ($data as $key => $value) {
62
+ $attribute .= esc_attr($key).'="'.esc_attr($value).'" ';
63
+ }
64
+ }else{
65
+ $attribute = "id='sidebar' layout='nodisplay' side='right'";
66
+ }
67
+ return '<amp-sidebar '. $attribute .'>';
68
+ }
69
+
70
+ function sideber_end(){
71
+ return '</amp-sidebar>';
72
+ }
73
+
74
+ ampforwp_add_sidebar_scripts();
75
+ function ampforwp_add_sidebar_scripts(){
76
+ global $scriptComponent;
77
+ if ( empty( $scriptComponent['amp-sidebar'] ) ) {
78
+ $scriptComponent['amp-sidebar'] = 'https://cdn.ampproject.org/v0/amp-sidebar-0.1.js';
79
+ }
80
  }
components/social-icons/fonts/icomoon.svg CHANGED
@@ -1,22 +1,22 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by IcoMoon</metadata>
5
- <defs>
6
- <font id="icomoon" horiz-adv-x="1024">
7
- <font-face units-per-em="1024" ascent="960" descent="-64" />
8
- <missing-glyph horiz-adv-x="1024" />
9
- <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
- <glyph unicode="&#xf099;" glyph-name="twitter" horiz-adv-x="951" d="M925.714 717.714c-25.143-36.571-56.571-69.143-92.571-95.429 0.571-8 0.571-16 0.571-24 0-244-185.714-525.143-525.143-525.143-104.571 0-201.714 30.286-283.429 82.857 14.857-1.714 29.143-2.286 44.571-2.286 86.286 0 165.714 29.143 229.143 78.857-81.143 1.714-149.143 54.857-172.571 128 11.429-1.714 22.857-2.857 34.857-2.857 16.571 0 33.143 2.286 48.571 6.286-84.571 17.143-148 91.429-148 181.143v2.286c24.571-13.714 53.143-22.286 83.429-23.429-49.714 33.143-82.286 89.714-82.286 153.714 0 34.286 9.143 65.714 25.143 93.143 90.857-112 227.429-185.143 380.571-193.143-2.857 13.714-4.571 28-4.571 42.286 0 101.714 82.286 184.571 184.571 184.571 53.143 0 101.143-22.286 134.857-58.286 41.714 8 81.714 23.429 117.143 44.571-13.714-42.857-42.857-78.857-81.143-101.714 37.143 4 73.143 14.286 106.286 28.571z" />
11
- <glyph unicode="&#xf09a;" glyph-name="facebook, facebook-f" horiz-adv-x="602" d="M548 944v-150.857h-89.714c-70.286 0-83.429-33.714-83.429-82.286v-108h167.429l-22.286-169.143h-145.143v-433.714h-174.857v433.714h-145.714v169.143h145.714v124.571c0 144.571 88.571 223.429 217.714 223.429 61.714 0 114.857-4.571 130.286-6.857z" />
12
- <glyph unicode="&#xf0d2;" glyph-name="pinterest" horiz-adv-x="878" d="M877.714 438.857c0-242.286-196.571-438.857-438.857-438.857-43.429 0-84.571 6.286-124.571 18.286 16.571 26.286 35.429 60 44.571 93.714 0 0 5.143 19.429 30.857 120.571 14.857-29.143 59.429-54.857 106.857-54.857 141.143 0 237.143 128.571 237.143 301.143 0 129.714-110.286 251.429-278.286 251.429-208 0-313.143-149.714-313.143-274.286 0-75.429 28.571-142.857 89.714-168 9.714-4 18.857 0 21.714 11.429 2.286 7.429 6.857 26.857 9.143 34.857 2.857 11.429 1.714 14.857-6.286 24.571-17.714 21.143-29.143 48-29.143 86.286 0 110.857 82.857 210.286 216 210.286 117.714 0 182.857-72 182.857-168.571 0-126.286-56-233.143-139.429-233.143-45.714 0-80 37.714-69.143 84.571 13.143 55.429 38.857 115.429 38.857 155.429 0 36-19.429 66.286-59.429 66.286-46.857 0-84.571-48.571-84.571-113.714 0 0 0-41.714 14.286-69.714-48-203.429-56.571-238.857-56.571-238.857-8-33.143-8.571-70.286-7.429-101.143-154.857 68-262.857 222.286-262.857 402.286 0 242.286 196.571 438.857 438.857 438.857s438.857-196.571 438.857-438.857z" />
13
- <glyph unicode="&#xf0d5;" glyph-name="google-plus" horiz-adv-x="1317" d="M821.143 429.143c0-239.429-160.571-409.143-402.286-409.143-231.429 0-418.857 187.429-418.857 418.857s187.429 418.857 418.857 418.857c113.143 0 207.429-41.143 280.571-109.714l-113.714-109.143c-30.857 29.714-85.143 64.571-166.857 64.571-142.857 0-259.429-118.286-259.429-264.571s116.571-264.571 259.429-264.571c165.714 0 228 119.429 237.714 180.571h-237.714v144h395.429c4-21.143 6.857-42.286 6.857-69.714zM1316.571 498.857v-120h-119.429v-119.429h-120v119.429h-119.429v120h119.429v119.429h120v-119.429h119.429z" />
14
- <glyph unicode="&#xf0e1;" glyph-name="linkedin" horiz-adv-x="878" d="M199.429 593.714v-566.286h-188.571v566.286h188.571zM211.429 768.571c0.571-54.286-40.571-97.714-106.286-97.714v0h-1.143c-63.429 0-104 43.429-104 97.714 0 55.429 42.286 97.714 106.286 97.714 64.571 0 104.571-42.286 105.143-97.714zM877.714 352v-324.571h-188v302.857c0 76-27.429 128-95.429 128-52 0-82.857-34.857-96.571-68.571-4.571-12.571-6.286-29.143-6.286-46.286v-316h-188c2.286 513.143 0 566.286 0 566.286h188v-82.286h-1.143c24.571 38.857 69.143 95.429 170.857 95.429 124 0 216.571-81.143 216.571-254.857z" />
15
- <glyph unicode="&#xf16a;" glyph-name="youtube-play" d="M406.286 306.286l276.571 142.857-276.571 144.571v-287.429zM512 798.857c215.429 0 358.286-10.286 358.286-10.286 20-2.286 64-2.286 102.857-43.429 0 0 31.429-30.857 40.571-101.714 10.857-82.857 10.286-165.714 10.286-165.714v-77.714s0.571-82.857-10.286-165.714c-9.143-70.286-40.571-101.714-40.571-101.714-38.857-40.571-82.857-40.571-102.857-42.857 0 0-142.857-10.857-358.286-10.857v0c-266.286 2.286-348 10.286-348 10.286-22.857 4-74.286 2.857-113.143 43.429 0 0-31.429 31.429-40.571 101.714-10.857 82.857-10.286 165.714-10.286 165.714v77.714s-0.571 82.857 10.286 165.714c9.143 70.857 40.571 101.714 40.571 101.714 38.857 41.143 82.857 41.143 102.857 43.429 0 0 142.857 10.286 358.286 10.286v0z" />
16
- <glyph unicode="&#xf16d;" glyph-name="instagram" horiz-adv-x="878" d="M585.143 438.857c0 80.571-65.714 146.286-146.286 146.286s-146.286-65.714-146.286-146.286 65.714-146.286 146.286-146.286 146.286 65.714 146.286 146.286zM664 438.857c0-124.571-100.571-225.143-225.143-225.143s-225.143 100.571-225.143 225.143 100.571 225.143 225.143 225.143 225.143-100.571 225.143-225.143zM725.714 673.143c0-29.143-23.429-52.571-52.571-52.571s-52.571 23.429-52.571 52.571 23.429 52.571 52.571 52.571 52.571-23.429 52.571-52.571zM438.857 798.857c-64 0-201.143 5.143-258.857-17.714-20-8-34.857-17.714-50.286-33.143s-25.143-30.286-33.143-50.286c-22.857-57.714-17.714-194.857-17.714-258.857s-5.143-201.143 17.714-258.857c8-20 17.714-34.857 33.143-50.286s30.286-25.143 50.286-33.143c57.714-22.857 194.857-17.714 258.857-17.714s201.143-5.143 258.857 17.714c20 8 34.857 17.714 50.286 33.143s25.143 30.286 33.143 50.286c22.857 57.714 17.714 194.857 17.714 258.857s5.143 201.143-17.714 258.857c-8 20-17.714 34.857-33.143 50.286s-30.286 25.143-50.286 33.143c-57.714 22.857-194.857 17.714-258.857 17.714zM877.714 438.857c0-60.571 0.571-120.571-2.857-181.143-3.429-70.286-19.429-132.571-70.857-184s-113.714-67.429-184-70.857c-60.571-3.429-120.571-2.857-181.143-2.857s-120.571-0.571-181.143 2.857c-70.286 3.429-132.571 19.429-184 70.857s-67.429 113.714-70.857 184c-3.429 60.571-2.857 120.571-2.857 181.143s-0.571 120.571 2.857 181.143c3.429 70.286 19.429 132.571 70.857 184s113.714 67.429 184 70.857c60.571 3.429 120.571 2.857 181.143 2.857s120.571 0.571 181.143-2.857c70.286-3.429 132.571-19.429 184-70.857s67.429-113.714 70.857-184c3.429-60.571 2.857-120.571 2.857-181.143z" />
17
- <glyph unicode="&#xf173;" glyph-name="tumblr" horiz-adv-x="624" d="M539.429 191.428l45.714-135.429c-17.143-25.714-94.857-54.857-164.571-56-207.429-3.429-285.714 147.429-285.714 253.714v310.857h-96v122.857c144 52 178.857 182.286 186.857 256.571 0.571 4.571 4.571 6.857 6.857 6.857h139.429v-242.286h190.286v-144h-190.857v-296c0-40 14.857-95.429 91.429-93.714 25.143 0.571 58.857 8 76.571 16.571z" />
18
- <glyph unicode="&#xf189;" glyph-name="vk" horiz-adv-x="1119" d="M1095.429 653.714c8.571-23.429-18.286-78.286-85.714-168-110.857-147.429-122.857-133.714-31.429-218.857 88-81.714 106.286-121.143 109.143-126.286 0 0 36.571-64-40.571-64.571l-146.286-2.286c-31.429-6.286-73.143 22.286-73.143 22.286-54.857 37.714-106.286 135.429-146.286 122.857 0 0-41.143-13.143-40-101.143 0.571-18.857-8.571-29.143-8.571-29.143s-10.286-10.857-30.286-12.571h-65.714c-144.571-9.143-272 124-272 124s-139.429 144-261.714 431.429c-8 18.857 0.571 28 0.571 28s8.571 10.857 32.571 10.857l156.571 1.143c14.857-2.286 25.143-10.286 25.143-10.286s9.143-6.286 13.714-18.286c25.714-64 58.857-122.286 58.857-122.286 57.143-117.714 96-137.714 118.286-125.714 0 0 29.143 17.714 22.857 160-2.286 51.429-16.571 74.857-16.571 74.857-13.143 17.714-37.714 22.857-48.571 24.571-8.571 1.143 5.714 21.714 24.571 30.857 28 13.714 77.714 14.286 136.571 13.714 46.286-0.571 59.429-3.429 77.143-7.429 54.286-13.143 36-63.429 36-184.571 0-38.857-7.429-93.143 20.571-110.857 12-8 41.714-1.143 114.857 123.429 0 0 34.286 59.429 61.143 128.571 4.571 12.571 14.286 17.714 14.286 17.714s9.143 5.143 21.714 3.429l164.571 1.143c49.714 6.286 57.714-16.571 57.714-16.571z" />
19
- <glyph unicode="&#xf232;" glyph-name="whatsapp" horiz-adv-x="878" d="M562.857 394.286c9.714 0 102.857-48.571 106.857-55.429 1.143-2.857 1.143-6.286 1.143-8.571 0-14.286-4.571-30.286-9.714-43.429-13.143-32-66.286-52.571-98.857-52.571-27.429 0-84 24-108.571 35.429-81.714 37.143-132.571 100.571-181.714 173.143-21.714 32-41.143 71.429-40.571 110.857v4.571c1.143 37.714 14.857 64.571 42.286 90.286 8.571 8 17.714 12.571 29.714 12.571 6.857 0 13.714-1.714 21.143-1.714 15.429 0 18.286-4.571 24-19.429 4-9.714 33.143-87.429 33.143-93.143 0-21.714-39.429-46.286-39.429-59.429 0-2.857 1.143-5.714 2.857-8.571 12.571-26.857 36.571-57.714 58.286-78.286 26.286-25.143 54.286-41.714 86.286-57.714 4-2.286 8-4 12.571-4 17.143 0 45.714 55.429 60.571 55.429zM446.857 91.428c197.714 0 358.857 161.143 358.857 358.857s-161.143 358.857-358.857 358.857-358.857-161.143-358.857-358.857c0-75.429 24-149.143 68.571-210.286l-45.143-133.143 138.286 44c58.286-38.286 127.429-59.429 197.143-59.429zM446.857 881.143c237.714 0 430.857-193.143 430.857-430.857s-193.143-430.857-430.857-430.857c-72.571 0-144.571 18.286-208.571 53.714l-238.286-76.571 77.714 231.429c-40.571 66.857-61.714 144-61.714 222.286 0 237.714 193.143 430.857 430.857 430.857z" />
20
- <glyph unicode="&#xf281;" glyph-name="reddit-alien" d="M1024 467.428c0-44.571-25.143-82.857-62.286-101.714 4.571-17.714 6.857-36 6.857-54.857 0-180.571-204-326.857-455.429-326.857-250.857 0-454.857 146.286-454.857 326.857 0 18.286 2.286 36.571 6.286 53.714-38.286 18.857-64.571 57.714-64.571 102.857 0 62.857 50.857 113.714 113.714 113.714 32.571 0 61.714-13.714 82.857-36 77.143 53.714 180 88.571 294.286 92.571l66.286 297.714c2.286 10.286 13.143 17.143 23.429 14.857l210.857-46.286c13.714 27.429 42.857 46.857 76 46.857 47.429 0 85.714-38.286 85.714-85.143 0-47.429-38.286-85.714-85.714-85.714-46.857 0-85.143 38.286-85.143 85.143l-190.857 42.286-59.429-269.714c114.857-3.429 218.857-37.714 296.571-91.429 20.571 21.714 49.714 34.857 81.714 34.857 62.857 0 113.714-50.857 113.714-113.714zM238.857 353.714c0-47.429 38.286-85.714 85.143-85.714 47.429 0 85.714 38.286 85.714 85.714 0 46.857-38.286 85.143-85.714 85.143-46.857 0-85.143-38.286-85.143-85.143zM701.714 150.857c8.571 8.571 8.571 21.143 0 29.714-8 8-21.143 8-29.143 0-34.286-34.857-108-46.857-160.571-46.857s-126.286 12-160.571 46.857c-8 8-21.143 8-29.143 0-8.571-8-8.571-21.143 0-29.714 54.286-54.286 158.857-58.286 189.714-58.286s135.429 4 189.714 58.286zM700 268c46.857 0 85.143 38.286 85.143 85.714 0 46.857-38.286 85.143-85.143 85.143-47.429 0-85.714-38.286-85.714-85.143 0-47.429 38.286-85.714 85.714-85.714z" />
21
- <glyph unicode="&#xf2ac;" glyph-name="snapchat-ghost" horiz-adv-x="951" d="M484.571 877.714c102.857 1.143 188-56.571 230.857-149.143 13.143-28 15.429-71.429 15.429-102.286 0-36.571-2.857-72.571-5.143-109.143 4.571-2.286 10.857-4 16-4 20.571 0 37.714 15.429 58.286 15.429 19.429 0 47.429-13.714 47.429-36.571 0-54.857-114.857-44.571-114.857-92.571 0-8.571 3.429-16.571 6.857-24.571 27.429-60 79.429-117.714 141.143-143.429 14.857-6.286 29.714-9.714 45.714-13.143 10.286-2.286 16-9.714 16-20 0-38.857-98.857-54.857-125.143-58.857-11.429-17.714-2.857-59.429-33.143-59.429-23.429 0-46.857 7.429-72 7.429-12 0-24-0.571-35.429-2.857-68-11.429-90.857-84.571-202.286-84.571-107.429 0-133.143 73.143-199.429 84.571-12 2.286-24 2.857-36 2.857-25.714 0-50.286-8.571-70.857-8.571-32 0-22.286 42.286-34.286 60.571-26.286 4-125.143 20-125.143 58.857 0 10.286 5.714 17.714 16 20 16 3.429 30.857 6.857 45.714 13.143 61.143 25.143 114.286 83.429 141.143 143.429 3.429 8 6.857 16 6.857 24.571 0 48-115.429 38.857-115.429 92 0 22.286 26.286 36.571 46.286 36.571 17.714 0 35.429-14.857 57.714-14.857 6.286 0 12.571 1.143 18.286 4-2.286 36-5.143 72-5.143 108.571 0 30.857 2.286 74.857 15.429 102.857 50.286 108.571 135.429 148 249.143 149.143z" />
22
  </font></defs></svg>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="icomoon" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xf099;" glyph-name="twitter" horiz-adv-x="951" d="M925.714 717.714c-25.143-36.571-56.571-69.143-92.571-95.429 0.571-8 0.571-16 0.571-24 0-244-185.714-525.143-525.143-525.143-104.571 0-201.714 30.286-283.429 82.857 14.857-1.714 29.143-2.286 44.571-2.286 86.286 0 165.714 29.143 229.143 78.857-81.143 1.714-149.143 54.857-172.571 128 11.429-1.714 22.857-2.857 34.857-2.857 16.571 0 33.143 2.286 48.571 6.286-84.571 17.143-148 91.429-148 181.143v2.286c24.571-13.714 53.143-22.286 83.429-23.429-49.714 33.143-82.286 89.714-82.286 153.714 0 34.286 9.143 65.714 25.143 93.143 90.857-112 227.429-185.143 380.571-193.143-2.857 13.714-4.571 28-4.571 42.286 0 101.714 82.286 184.571 184.571 184.571 53.143 0 101.143-22.286 134.857-58.286 41.714 8 81.714 23.429 117.143 44.571-13.714-42.857-42.857-78.857-81.143-101.714 37.143 4 73.143 14.286 106.286 28.571z" />
11
+ <glyph unicode="&#xf09a;" glyph-name="facebook, facebook-f" horiz-adv-x="602" d="M548 944v-150.857h-89.714c-70.286 0-83.429-33.714-83.429-82.286v-108h167.429l-22.286-169.143h-145.143v-433.714h-174.857v433.714h-145.714v169.143h145.714v124.571c0 144.571 88.571 223.429 217.714 223.429 61.714 0 114.857-4.571 130.286-6.857z" />
12
+ <glyph unicode="&#xf0d2;" glyph-name="pinterest" horiz-adv-x="878" d="M877.714 438.857c0-242.286-196.571-438.857-438.857-438.857-43.429 0-84.571 6.286-124.571 18.286 16.571 26.286 35.429 60 44.571 93.714 0 0 5.143 19.429 30.857 120.571 14.857-29.143 59.429-54.857 106.857-54.857 141.143 0 237.143 128.571 237.143 301.143 0 129.714-110.286 251.429-278.286 251.429-208 0-313.143-149.714-313.143-274.286 0-75.429 28.571-142.857 89.714-168 9.714-4 18.857 0 21.714 11.429 2.286 7.429 6.857 26.857 9.143 34.857 2.857 11.429 1.714 14.857-6.286 24.571-17.714 21.143-29.143 48-29.143 86.286 0 110.857 82.857 210.286 216 210.286 117.714 0 182.857-72 182.857-168.571 0-126.286-56-233.143-139.429-233.143-45.714 0-80 37.714-69.143 84.571 13.143 55.429 38.857 115.429 38.857 155.429 0 36-19.429 66.286-59.429 66.286-46.857 0-84.571-48.571-84.571-113.714 0 0 0-41.714 14.286-69.714-48-203.429-56.571-238.857-56.571-238.857-8-33.143-8.571-70.286-7.429-101.143-154.857 68-262.857 222.286-262.857 402.286 0 242.286 196.571 438.857 438.857 438.857s438.857-196.571 438.857-438.857z" />
13
+ <glyph unicode="&#xf0d5;" glyph-name="google-plus" horiz-adv-x="1317" d="M821.143 429.143c0-239.429-160.571-409.143-402.286-409.143-231.429 0-418.857 187.429-418.857 418.857s187.429 418.857 418.857 418.857c113.143 0 207.429-41.143 280.571-109.714l-113.714-109.143c-30.857 29.714-85.143 64.571-166.857 64.571-142.857 0-259.429-118.286-259.429-264.571s116.571-264.571 259.429-264.571c165.714 0 228 119.429 237.714 180.571h-237.714v144h395.429c4-21.143 6.857-42.286 6.857-69.714zM1316.571 498.857v-120h-119.429v-119.429h-120v119.429h-119.429v120h119.429v119.429h120v-119.429h119.429z" />
14
+ <glyph unicode="&#xf0e1;" glyph-name="linkedin" horiz-adv-x="878" d="M199.429 593.714v-566.286h-188.571v566.286h188.571zM211.429 768.571c0.571-54.286-40.571-97.714-106.286-97.714v0h-1.143c-63.429 0-104 43.429-104 97.714 0 55.429 42.286 97.714 106.286 97.714 64.571 0 104.571-42.286 105.143-97.714zM877.714 352v-324.571h-188v302.857c0 76-27.429 128-95.429 128-52 0-82.857-34.857-96.571-68.571-4.571-12.571-6.286-29.143-6.286-46.286v-316h-188c2.286 513.143 0 566.286 0 566.286h188v-82.286h-1.143c24.571 38.857 69.143 95.429 170.857 95.429 124 0 216.571-81.143 216.571-254.857z" />
15
+ <glyph unicode="&#xf16a;" glyph-name="youtube-play" d="M406.286 306.286l276.571 142.857-276.571 144.571v-287.429zM512 798.857c215.429 0 358.286-10.286 358.286-10.286 20-2.286 64-2.286 102.857-43.429 0 0 31.429-30.857 40.571-101.714 10.857-82.857 10.286-165.714 10.286-165.714v-77.714s0.571-82.857-10.286-165.714c-9.143-70.286-40.571-101.714-40.571-101.714-38.857-40.571-82.857-40.571-102.857-42.857 0 0-142.857-10.857-358.286-10.857v0c-266.286 2.286-348 10.286-348 10.286-22.857 4-74.286 2.857-113.143 43.429 0 0-31.429 31.429-40.571 101.714-10.857 82.857-10.286 165.714-10.286 165.714v77.714s-0.571 82.857 10.286 165.714c9.143 70.857 40.571 101.714 40.571 101.714 38.857 41.143 82.857 41.143 102.857 43.429 0 0 142.857 10.286 358.286 10.286v0z" />
16
+ <glyph unicode="&#xf16d;" glyph-name="instagram" horiz-adv-x="878" d="M585.143 438.857c0 80.571-65.714 146.286-146.286 146.286s-146.286-65.714-146.286-146.286 65.714-146.286 146.286-146.286 146.286 65.714 146.286 146.286zM664 438.857c0-124.571-100.571-225.143-225.143-225.143s-225.143 100.571-225.143 225.143 100.571 225.143 225.143 225.143 225.143-100.571 225.143-225.143zM725.714 673.143c0-29.143-23.429-52.571-52.571-52.571s-52.571 23.429-52.571 52.571 23.429 52.571 52.571 52.571 52.571-23.429 52.571-52.571zM438.857 798.857c-64 0-201.143 5.143-258.857-17.714-20-8-34.857-17.714-50.286-33.143s-25.143-30.286-33.143-50.286c-22.857-57.714-17.714-194.857-17.714-258.857s-5.143-201.143 17.714-258.857c8-20 17.714-34.857 33.143-50.286s30.286-25.143 50.286-33.143c57.714-22.857 194.857-17.714 258.857-17.714s201.143-5.143 258.857 17.714c20 8 34.857 17.714 50.286 33.143s25.143 30.286 33.143 50.286c22.857 57.714 17.714 194.857 17.714 258.857s5.143 201.143-17.714 258.857c-8 20-17.714 34.857-33.143 50.286s-30.286 25.143-50.286 33.143c-57.714 22.857-194.857 17.714-258.857 17.714zM877.714 438.857c0-60.571 0.571-120.571-2.857-181.143-3.429-70.286-19.429-132.571-70.857-184s-113.714-67.429-184-70.857c-60.571-3.429-120.571-2.857-181.143-2.857s-120.571-0.571-181.143 2.857c-70.286 3.429-132.571 19.429-184 70.857s-67.429 113.714-70.857 184c-3.429 60.571-2.857 120.571-2.857 181.143s-0.571 120.571 2.857 181.143c3.429 70.286 19.429 132.571 70.857 184s113.714 67.429 184 70.857c60.571 3.429 120.571 2.857 181.143 2.857s120.571 0.571 181.143-2.857c70.286-3.429 132.571-19.429 184-70.857s67.429-113.714 70.857-184c3.429-60.571 2.857-120.571 2.857-181.143z" />
17
+ <glyph unicode="&#xf173;" glyph-name="tumblr" horiz-adv-x="624" d="M539.429 191.428l45.714-135.429c-17.143-25.714-94.857-54.857-164.571-56-207.429-3.429-285.714 147.429-285.714 253.714v310.857h-96v122.857c144 52 178.857 182.286 186.857 256.571 0.571 4.571 4.571 6.857 6.857 6.857h139.429v-242.286h190.286v-144h-190.857v-296c0-40 14.857-95.429 91.429-93.714 25.143 0.571 58.857 8 76.571 16.571z" />
18
+ <glyph unicode="&#xf189;" glyph-name="vk" horiz-adv-x="1119" d="M1095.429 653.714c8.571-23.429-18.286-78.286-85.714-168-110.857-147.429-122.857-133.714-31.429-218.857 88-81.714 106.286-121.143 109.143-126.286 0 0 36.571-64-40.571-64.571l-146.286-2.286c-31.429-6.286-73.143 22.286-73.143 22.286-54.857 37.714-106.286 135.429-146.286 122.857 0 0-41.143-13.143-40-101.143 0.571-18.857-8.571-29.143-8.571-29.143s-10.286-10.857-30.286-12.571h-65.714c-144.571-9.143-272 124-272 124s-139.429 144-261.714 431.429c-8 18.857 0.571 28 0.571 28s8.571 10.857 32.571 10.857l156.571 1.143c14.857-2.286 25.143-10.286 25.143-10.286s9.143-6.286 13.714-18.286c25.714-64 58.857-122.286 58.857-122.286 57.143-117.714 96-137.714 118.286-125.714 0 0 29.143 17.714 22.857 160-2.286 51.429-16.571 74.857-16.571 74.857-13.143 17.714-37.714 22.857-48.571 24.571-8.571 1.143 5.714 21.714 24.571 30.857 28 13.714 77.714 14.286 136.571 13.714 46.286-0.571 59.429-3.429 77.143-7.429 54.286-13.143 36-63.429 36-184.571 0-38.857-7.429-93.143 20.571-110.857 12-8 41.714-1.143 114.857 123.429 0 0 34.286 59.429 61.143 128.571 4.571 12.571 14.286 17.714 14.286 17.714s9.143 5.143 21.714 3.429l164.571 1.143c49.714 6.286 57.714-16.571 57.714-16.571z" />
19
+ <glyph unicode="&#xf232;" glyph-name="whatsapp" horiz-adv-x="878" d="M562.857 394.286c9.714 0 102.857-48.571 106.857-55.429 1.143-2.857 1.143-6.286 1.143-8.571 0-14.286-4.571-30.286-9.714-43.429-13.143-32-66.286-52.571-98.857-52.571-27.429 0-84 24-108.571 35.429-81.714 37.143-132.571 100.571-181.714 173.143-21.714 32-41.143 71.429-40.571 110.857v4.571c1.143 37.714 14.857 64.571 42.286 90.286 8.571 8 17.714 12.571 29.714 12.571 6.857 0 13.714-1.714 21.143-1.714 15.429 0 18.286-4.571 24-19.429 4-9.714 33.143-87.429 33.143-93.143 0-21.714-39.429-46.286-39.429-59.429 0-2.857 1.143-5.714 2.857-8.571 12.571-26.857 36.571-57.714 58.286-78.286 26.286-25.143 54.286-41.714 86.286-57.714 4-2.286 8-4 12.571-4 17.143 0 45.714 55.429 60.571 55.429zM446.857 91.428c197.714 0 358.857 161.143 358.857 358.857s-161.143 358.857-358.857 358.857-358.857-161.143-358.857-358.857c0-75.429 24-149.143 68.571-210.286l-45.143-133.143 138.286 44c58.286-38.286 127.429-59.429 197.143-59.429zM446.857 881.143c237.714 0 430.857-193.143 430.857-430.857s-193.143-430.857-430.857-430.857c-72.571 0-144.571 18.286-208.571 53.714l-238.286-76.571 77.714 231.429c-40.571 66.857-61.714 144-61.714 222.286 0 237.714 193.143 430.857 430.857 430.857z" />
20
+ <glyph unicode="&#xf281;" glyph-name="reddit-alien" d="M1024 467.428c0-44.571-25.143-82.857-62.286-101.714 4.571-17.714 6.857-36 6.857-54.857 0-180.571-204-326.857-455.429-326.857-250.857 0-454.857 146.286-454.857 326.857 0 18.286 2.286 36.571 6.286 53.714-38.286 18.857-64.571 57.714-64.571 102.857 0 62.857 50.857 113.714 113.714 113.714 32.571 0 61.714-13.714 82.857-36 77.143 53.714 180 88.571 294.286 92.571l66.286 297.714c2.286 10.286 13.143 17.143 23.429 14.857l210.857-46.286c13.714 27.429 42.857 46.857 76 46.857 47.429 0 85.714-38.286 85.714-85.143 0-47.429-38.286-85.714-85.714-85.714-46.857 0-85.143 38.286-85.143 85.143l-190.857 42.286-59.429-269.714c114.857-3.429 218.857-37.714 296.571-91.429 20.571 21.714 49.714 34.857 81.714 34.857 62.857 0 113.714-50.857 113.714-113.714zM238.857 353.714c0-47.429 38.286-85.714 85.143-85.714 47.429 0 85.714 38.286 85.714 85.714 0 46.857-38.286 85.143-85.714 85.143-46.857 0-85.143-38.286-85.143-85.143zM701.714 150.857c8.571 8.571 8.571 21.143 0 29.714-8 8-21.143 8-29.143 0-34.286-34.857-108-46.857-160.571-46.857s-126.286 12-160.571 46.857c-8 8-21.143 8-29.143 0-8.571-8-8.571-21.143 0-29.714 54.286-54.286 158.857-58.286 189.714-58.286s135.429 4 189.714 58.286zM700 268c46.857 0 85.143 38.286 85.143 85.714 0 46.857-38.286 85.143-85.143 85.143-47.429 0-85.714-38.286-85.714-85.143 0-47.429 38.286-85.714 85.714-85.714z" />
21
+ <glyph unicode="&#xf2ac;" glyph-name="snapchat-ghost" horiz-adv-x="951" d="M484.571 877.714c102.857 1.143 188-56.571 230.857-149.143 13.143-28 15.429-71.429 15.429-102.286 0-36.571-2.857-72.571-5.143-109.143 4.571-2.286 10.857-4 16-4 20.571 0 37.714 15.429 58.286 15.429 19.429 0 47.429-13.714 47.429-36.571 0-54.857-114.857-44.571-114.857-92.571 0-8.571 3.429-16.571 6.857-24.571 27.429-60 79.429-117.714 141.143-143.429 14.857-6.286 29.714-9.714 45.714-13.143 10.286-2.286 16-9.714 16-20 0-38.857-98.857-54.857-125.143-58.857-11.429-17.714-2.857-59.429-33.143-59.429-23.429 0-46.857 7.429-72 7.429-12 0-24-0.571-35.429-2.857-68-11.429-90.857-84.571-202.286-84.571-107.429 0-133.143 73.143-199.429 84.571-12 2.286-24 2.857-36 2.857-25.714 0-50.286-8.571-70.857-8.571-32 0-22.286 42.286-34.286 60.571-26.286 4-125.143 20-125.143 58.857 0 10.286 5.714 17.714 16 20 16 3.429 30.857 6.857 45.714 13.143 61.143 25.143 114.286 83.429 141.143 143.429 3.429 8 6.857 16 6.857 24.571 0 48-115.429 38.857-115.429 92 0 22.286 26.286 36.571 46.286 36.571 17.714 0 35.429-14.857 57.714-14.857 6.286 0 12.571 1.143 18.286 4-2.286 36-5.143 72-5.143 108.571 0 30.857 2.286 74.857 15.429 102.857 50.286 108.571 135.429 148 249.143 149.143z" />
22
  </font></defs></svg>
components/social-icons/social-icons.php CHANGED
@@ -1,231 +1,231 @@
1
- <?php
2
-
3
- function ampforwp_framework_get_social_icons($selected_social_icons){
4
-
5
- /* TODO:
6
- 1: Connect with options panel
7
- 2: Add icons for email, line and whatsapp
8
- */
9
- global $post, $redux_builder_amp;
10
- $twitter_url = '';
11
- $thumb_id = '';
12
- $image = '';
13
- $post_id = $post->ID;
14
- $desc = $post->post_excerpt;
15
- if (has_post_thumbnail( $post_id ) ){
16
- $thumb_id = get_post_thumbnail_id($post_id);
17
- $image = wp_get_attachment_image_src( $thumb_id, 'full' );
18
- $image = $image[0];
19
- }
20
-
21
- if(!ampforwp_is_associative($selected_social_icons)){
22
- $icons_list_temp = array();
23
- foreach ($selected_social_icons as $key => $icons) {
24
- $icons_list_temp[$icons] = '';
25
- }
26
- $selected_social_icons = $icons_list_temp;
27
- }
28
-
29
- $social_icons_names = array();
30
- $url = get_the_permalink();
31
- $title = esc_attr(get_the_title());
32
- if(isset($redux_builder_amp['enable-single-twitter-share-link']) && $redux_builder_amp['enable-single-twitter-share-link']){
33
- $twitter_url = get_the_permalink();
34
- }
35
- else
36
- $twitter_url = wp_get_shortlink();
37
- foreach ($selected_social_icons as $key => $value) {
38
- $social_icons_names[] = $key;
39
- }
40
-
41
-
42
- if( isset($selected_social_icons['twitter'] ) && null == $selected_social_icons['twitter'] ){
43
- $selected_social_icons['twitter'] = 'https://twitter.com/intent/tweet?url='. $twitter_url.'&text='. $title .' ';
44
- //https://twitter.com/intent/tweet?url={url}&text={title}&via={via}&hashtags={hashtags}
45
- }
46
-
47
- if( isset($selected_social_icons['facebook'] ) && null == $selected_social_icons['facebook'] ){
48
- $selected_social_icons['facebook'] = 'https://www.facebook.com/sharer.php?u='. $url. '';
49
- //or https://www.facebook.com/dialog/share?app_id={app_id}&display=page&href={url}&redirect_uri={redirect_url}
50
- }
51
- if( isset($selected_social_icons['pinterest'] ) && null == $selected_social_icons['pinterest'] ){
52
- $selected_social_icons['pinterest'] = 'https://pinterest.com/pin/create/bookmarklet/?media='.$image.'&url='.$url.'&description='.$title.'';
53
- //https://pinterest.com/pin/create/bookmarklet/?media={img}&url={url}&is_video={is_video}&description={title}
54
- }
55
- if( isset($selected_social_icons['google-plus']) && $selected_social_icons['google-plus'] == null){
56
- $selected_social_icons['google-plus'] = 'https://plus.google.com/share?url='. $url. '';
57
- //https://plus.google.com/share?url={url}
58
- }
59
- if( isset($selected_social_icons['linkedin']) && $selected_social_icons['linkedin'] == null){
60
- $selected_social_icons['linkedin'] = 'https://www.linkedin.com/shareArticle?url='. $url. '&title='. $title .'';
61
- //https://www.linkedin.com/shareArticle?url={url}&title={title}
62
- }
63
-
64
- if( isset($selected_social_icons['reddit']) && $selected_social_icons['reddit'] == null){
65
- $selected_social_icons['reddit'] = 'https://reddit.com/submit?url='. $url. '&title='. $title .'';
66
- //https://reddit.com/submit?url={url}&title={title}
67
- }
68
- if( isset($selected_social_icons['VKontakte']) && $selected_social_icons['VKontakte'] == null){
69
- $selected_social_icons['VKontakte'] = 'http://vk.com/share.php?url='. $url. '';
70
- //http://vk.com/share.php?url={url}
71
- }
72
- if( isset($selected_social_icons['Odnoklassniki']) && $selected_social_icons['Odnoklassniki'] == null){
73
- $selected_social_icons['Odnoklassniki'] = 'https://ok.ru/dk?st.cmd=addShare&st._surl='. $url. '';
74
- }
75
-
76
- if( isset($selected_social_icons['tumblr']) && $selected_social_icons['tumblr'] == null){
77
- $selected_social_icons['tumblr'] = 'https://www.tumblr.com/widgets/share/tool?canonicalUrl='. $url. '&title='. $title .'&caption='.$desc.'';
78
- //https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={desc}
79
- }
80
- if ( isset($selected_social_icons['telegram']) && null == $selected_social_icons['telegram'] ) {
81
- $selected_social_icons['telegram'] = 'https://telegram.me/share/url?url='. $url. '&text='. $title .'';
82
- //https://telegram.me/share/url?url={url}&text={title}
83
- }
84
- if ( isset($selected_social_icons['digg']) && null == $selected_social_icons['digg'] ) {
85
- $selected_social_icons['digg'] = 'http://digg.com/submit?url='. $url. '&title='. $title .'';
86
- //http://digg.com/submit?url={url}&title={title}
87
- }
88
- if ( isset($selected_social_icons['StumbleUpon']) && null == $selected_social_icons['StumbleUpon'] ) {
89
- $selected_social_icons['StumbleUpon'] = 'http://www.stumbleupon.com/submit?url='. $url. '&title='. $title .'';
90
- //http://www.stumbleupon.com/submit?url={url}&title={title}
91
- }
92
- if ( isset($selected_social_icons['Wechat']) && null == $selected_social_icons['Wechat'] ) {
93
- $selected_social_icons['Wechat'] = 'http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url='. $url. '';
94
- // http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url={url}
95
- }
96
- if ( isset($selected_social_icons['Viber']) && null == $selected_social_icons['Viber'] ) {
97
- $selected_social_icons['Viber'] = 'viber://forward?text='. $url. '';
98
- //viber://forward?text={url}
99
- }
100
-
101
- ?>
102
- <div class="amp-social">
103
- <ul>
104
- <?php if( ( in_array( 'twitter' , $selected_social_icons,true) || in_array('twitter', $social_icons_names,true) ) && !empty($selected_social_icons['twitter']) ) { ?>
105
- <a href="<?php echo $selected_social_icons['twitter'] ?>" target ="_blank"><li class="icon-twitter"></li></a>
106
- <?php } ?>
107
-
108
- <?php if( (in_array('facebook', $selected_social_icons,true) || in_array('facebook', $social_icons_names,true)) && !empty($selected_social_icons['facebook']) ) { ?>
109
- <a href="<?php echo $selected_social_icons['facebook'] ?>" target ="_blank"><li class="icon-facebook"></li></a>
110
- <?php } ?>
111
-
112
- <?php if( ( in_array( 'pinterest' , $selected_social_icons,true ) || in_array( 'pinterest', $social_icons_names,true )) && !empty($selected_social_icons['pinterest']) ) { ?>
113
- <a href="<?php echo $selected_social_icons['pinterest'] ?>" target ="_blank"><li class="icon-pinterest"></li></a>
114
- <?php } ?>
115
-
116
- <?php if( (in_array( 'google-plus' , $selected_social_icons,true ) || in_array( 'google-plus' , $social_icons_names,true )) && !empty($selected_social_icons['google-plus']) ) { ?>
117
- <a href="<?php echo $selected_social_icons['google-plus'] ?>" target ="_blank"><li class="icon-google-plus"></li></a>
118
- <?php } ?>
119
-
120
- <?php if( (in_array( 'linkedin' , $selected_social_icons,true ) || in_array( 'linkedin' , $social_icons_names,true )) && !empty($selected_social_icons['linkedin']) ) { ?>
121
- <a href="<?php echo $selected_social_icons['linkedin'] ?>" target ="_blank"><li class="icon-linkedin"></li></a>
122
- <?php } ?>
123
-
124
- <?php if( (in_array( 'youtube' , $selected_social_icons,true ) || in_array( 'youtube' , $social_icons_names,true )) && !empty($selected_social_icons['youtube']) ) { ?>
125
- <a href="<?php echo $selected_social_icons['youtube'] ?>" target ="_blank"><li class="icon-youtube-play"></li></a>
126
- <?php } ?>
127
-
128
- <?php if( (in_array( 'instagram' , $selected_social_icons,true ) || in_array( 'instagram' , $social_icons_names,true )) && !empty($selected_social_icons['instagram']) ) { ?>
129
- <a href="<?php echo $selected_social_icons['instagram'] ?>" target ="_blank"> <li class="icon-instagram"></li></a>
130
- <?php } ?>
131
-
132
- <?php if( ( in_array( 'reddit' , $selected_social_icons,true ) || in_array( 'reddit' , $social_icons_names,true )) && !empty($selected_social_icons['reddit']) ) { ?>
133
- <a href="<?php echo $selected_social_icons['reddit'] ?>" target ="_blank"><li class="icon-reddit-alien"></li></a>
134
- <?php } ?>
135
-
136
- <?php if( ( in_array( 'VKontakte' , $selected_social_icons,true ) || in_array( 'VKontakte' , $social_icons_names,true ) ) && !empty($selected_social_icons['VKontakte']) ) { ?>
137
- <a href="<?php echo $selected_social_icons['VKontakte'] ?>" target ="_blank"><li class="icon-vk"></li></a>
138
- <?php } ?>
139
-
140
- <?php if( ( in_array( 'Odnoklassniki' , $selected_social_icons,true ) || in_array( 'Odnoklassniki' , $social_icons_names,true ) ) && !empty($selected_social_icons['Odnoklassniki']) ) { ?>
141
- <a href="<?php echo esc_url($selected_social_icons['Odnoklassniki']) ?>" target ="_blank"><li class="icon-Odnoklassniki"></li></a>
142
- <?php } ?>
143
-
144
- <?php if( (in_array( 'snapchat' , $selected_social_icons,true ) || in_array( 'snapchat' , $social_icons_names,true ) ) && !empty($selected_social_icons['snapchat']) ) { ?>
145
- <a href="<?php echo $selected_social_icons['snapchat'] ?>" target ="_blank"><li class="icon-snapchat-ghost"></li></a>
146
- <?php } ?>
147
-
148
- <?php if( (in_array( 'tumblr' , $selected_social_icons,true ) || in_array( 'tumblr' , $social_icons_names,true )) && !empty($selected_social_icons['tumblr']) ) { ?>
149
- <a href="<?php echo $selected_social_icons['tumblr'] ?>" target ="_blank"><li class="icon-tumblr"></li></a>
150
- <?php } ?>
151
-
152
- <?php if ( (in_array( 'telegram' , $selected_social_icons,true ) || in_array( 'telegram' , $social_icons_names,true )) && ! empty($selected_social_icons['telegram']) ) { ?>
153
- <a href="<?php echo esc_url($selected_social_icons['telegram']); ?>" target ="_blank"><li class="icon-telegram"></li></a>
154
- <?php } ?>
155
-
156
- <?php if ( (in_array( 'digg' , $selected_social_icons,true ) || in_array( 'digg' , $social_icons_names,true )) && ! empty($selected_social_icons['digg']) ) { ?>
157
- <a href="<?php echo esc_url($selected_social_icons['digg']); ?>" target ="_blank"><li class="icon-digg"></li></a>
158
- <?php } ?>
159
-
160
- <?php if ( (in_array( 'StumbleUpon' , $selected_social_icons,true ) || in_array( 'StumbleUpon' , $social_icons_names,true )) && ! empty($selected_social_icons['StumbleUpon']) ) { ?>
161
- <a href="<?php echo esc_url($selected_social_icons['StumbleUpon']); ?>" target ="_blank"><li class="icon-StumbleUpon"></li></a>
162
- <?php } ?>
163
-
164
- <?php if ( (in_array( 'Wechat' , $selected_social_icons,true ) || in_array( 'Wechat' , $social_icons_names,true )) && !empty($selected_social_icons['Wechat']) ) { ?>
165
- <a href="<?php echo esc_url($selected_social_icons['Wechat']); ?>" target ="_blank"><li class="icon-Wechat"></li></a>
166
- <?php } ?>
167
-
168
- <?php if ( (in_array( 'Viber' , $selected_social_icons,true ) || in_array( 'Viber' , $social_icons_names,true )) && ! empty($selected_social_icons['Viber']) ) { ?>
169
- <a href="<?php echo ($selected_social_icons['Viber']); ?>" target ="_blank"><li class="icon-Viber"></li></a>
170
- <?php } ?>
171
-
172
- <?php if( (in_array( 'facebook-like' , $selected_social_icons,true ) || in_array( 'facebook-like' , $social_icons_names,true )) ) { ?>
173
- <amp-facebook-like width=90 height=28
174
- layout="fixed"
175
- data-size="large"
176
- data-layout="button_count"
177
- data-href="<?php echo esc_url(get_the_permalink()); ?>">
178
- </amp-facebook-like>
179
- <?php } ?>
180
- </ul>
181
- </div>
182
- <?php
183
- }
184
-
185
- function ampforwp_is_associative(array $arr)
186
- {
187
- if (array() === $arr) return false;
188
- return array_keys($arr) !== range(0, count($arr) - 1);
189
- }
190
- //Load styling for social icons
191
-
192
- add_action('amp_post_template_css','amp_social_styles',11);
193
-
194
-
195
- function amp_social_styles(){ ?>
196
- @font-face {
197
- font-family: 'icomoon';
198
- src: url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.eot');
199
- src: url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.eot') format('embedded-opentype'),
200
- url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf') format('truetype'),
201
- url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.woff') format('woff'),
202
- url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.svg') format('svg');
203
- font-weight: normal;
204
- font-style: normal;
205
- }
206
-
207
- [class^="icon-"], [class*=" icon-"]{ font-family: 'icomoon'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1;
208
- -webkit-font-smoothing: antialiased;
209
- -moz-osx-font-smoothing: grayscale;
210
- }
211
-
212
- .icon-twitter:before{ content: "\f099";background:#1da1f2 }
213
- .icon-facebook:before{ content: "\f09a";background:#3b5998 }
214
- .icon-facebook-f:before{ content: "\f09a";background:#3b5998 }
215
- .icon-pinterest:before{ content: "\f0d2";background:#bd081c }
216
- .icon-google-plus:before{ content: "\f0d5";background:#dd4b39 }
217
- .icon-linkedin:before{ content: "\f0e1";background:#0077b5 }
218
- .icon-youtube-play:before{ content: "\f16a";background:#cd201f }
219
- .icon-instagram:before{ content: "\f16d";background:#c13584 }
220
- .icon-tumblr:before{ content: "\f173";background:#35465c }
221
- .icon-vk:before{ content: "\f189";background:#45668e }
222
- .icon-whatsapp:before{ content: "\f232";background:#075e54 }
223
- .icon-reddit-alien:before{ content: "\f281";background:#ff4500 }
224
- .icon-snapchat-ghost:before{ content: "\f2ac"; background:#fffc00 }
225
- .amp-social{ font-size: 15px; display: inline-block; }
226
- .amp-social ul{ list-style-type:none; padding:0;margin:0; text-align:center }
227
- .amp-social li{ box-sizing: initial; display:inline-block; }
228
- .amp-social li:before{box-sizing: initial;color: #fff;display: inline-block;width: 18px;height: 18px;line-height: 18px;}
229
- amp-facebook-like{top:8px;}
230
-
231
  <?php }
1
+ <?php
2
+
3
+ function ampforwp_framework_get_social_icons($selected_social_icons){
4
+
5
+ /* TODO:
6
+ 1: Connect with options panel
7
+ 2: Add icons for email, line and whatsapp
8
+ */
9
+ global $post, $redux_builder_amp;
10
+ $twitter_url = '';
11
+ $thumb_id = '';
12
+ $image = '';
13
+ $post_id = $post->ID;
14
+ $desc = $post->post_excerpt;
15
+ if (has_post_thumbnail( $post_id ) ){
16
+ $thumb_id = get_post_thumbnail_id($post_id);
17
+ $image = wp_get_attachment_image_src( $thumb_id, 'full' );
18
+ $image = $image[0];
19
+ }
20
+
21
+ if(!ampforwp_is_associative($selected_social_icons)){
22
+ $icons_list_temp = array();
23
+ foreach ($selected_social_icons as $key => $icons) {
24
+ $icons_list_temp[$icons] = '';
25
+ }
26
+ $selected_social_icons = $icons_list_temp;
27
+ }
28
+
29
+ $social_icons_names = array();
30
+ $url = get_the_permalink();
31
+ $title = esc_attr(get_the_title());
32
+ if(isset($redux_builder_amp['enable-single-twitter-share-link']) && $redux_builder_amp['enable-single-twitter-share-link']){
33
+ $twitter_url = get_the_permalink();
34
+ }
35
+ else
36
+ $twitter_url = wp_get_shortlink();
37
+ foreach ($selected_social_icons as $key => $value) {
38
+ $social_icons_names[] = $key;
39
+ }
40
+
41
+
42
+ if( isset($selected_social_icons['twitter'] ) && null == $selected_social_icons['twitter'] ){
43
+ $selected_social_icons['twitter'] = 'https://twitter.com/intent/tweet?url='. $twitter_url.'&text='. $title .' ';
44
+ //https://twitter.com/intent/tweet?url={url}&text={title}&via={via}&hashtags={hashtags}
45
+ }
46
+
47
+ if( isset($selected_social_icons['facebook'] ) && null == $selected_social_icons['facebook'] ){
48
+ $selected_social_icons['facebook'] = 'https://www.facebook.com/sharer.php?u='. $url. '';
49
+ //or https://www.facebook.com/dialog/share?app_id={app_id}&display=page&href={url}&redirect_uri={redirect_url}
50
+ }
51
+ if( isset($selected_social_icons['pinterest'] ) && null == $selected_social_icons['pinterest'] ){
52
+ $selected_social_icons['pinterest'] = 'https://pinterest.com/pin/create/bookmarklet/?media='.$image.'&url='.$url.'&description='.$title.'';
53
+ //https://pinterest.com/pin/create/bookmarklet/?media={img}&url={url}&is_video={is_video}&description={title}
54
+ }
55
+ if( isset($selected_social_icons['google-plus']) && $selected_social_icons['google-plus'] == null){
56
+ $selected_social_icons['google-plus'] = 'https://plus.google.com/share?url='. $url. '';
57
+ //https://plus.google.com/share?url={url}
58
+ }
59
+ if( isset($selected_social_icons['linkedin']) && $selected_social_icons['linkedin'] == null){
60
+ $selected_social_icons['linkedin'] = 'https://www.linkedin.com/shareArticle?url='. $url. '&title='. $title .'';
61
+ //https://www.linkedin.com/shareArticle?url={url}&title={title}
62
+ }
63
+
64
+ if( isset($selected_social_icons['reddit']) && $selected_social_icons['reddit'] == null){
65
+ $selected_social_icons['reddit'] = 'https://reddit.com/submit?url='. $url. '&title='. $title .'';
66
+ //https://reddit.com/submit?url={url}&title={title}
67
+ }
68
+ if( isset($selected_social_icons['VKontakte']) && $selected_social_icons['VKontakte'] == null){
69
+ $selected_social_icons['VKontakte'] = 'http://vk.com/share.php?url='. $url. '';
70
+ //http://vk.com/share.php?url={url}
71
+ }
72
+ if( isset($selected_social_icons['Odnoklassniki']) && $selected_social_icons['Odnoklassniki'] == null){
73
+ $selected_social_icons['Odnoklassniki'] = 'https://ok.ru/dk?st.cmd=addShare&st._surl='. $url. '';
74
+ }
75
+
76
+ if( isset($selected_social_icons['tumblr']) && $selected_social_icons['tumblr'] == null){
77
+ $selected_social_icons['tumblr'] = 'https://www.tumblr.com/widgets/share/tool?canonicalUrl='. $url. '&title='. $title .'&caption='.$desc.'';
78
+ //https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={desc}
79
+ }
80
+ if ( isset($selected_social_icons['telegram']) && null == $selected_social_icons['telegram'] ) {
81
+ $selected_social_icons['telegram'] = 'https://telegram.me/share/url?url='. $url. '&text='. $title .'';
82
+ //https://telegram.me/share/url?url={url}&text={title}
83
+ }
84
+ if ( isset($selected_social_icons['digg']) && null == $selected_social_icons['digg'] ) {
85
+ $selected_social_icons['digg'] = 'http://digg.com/submit?url='. $url. '&title='. $title .'';
86
+ //http://digg.com/submit?url={url}&title={title}
87
+ }
88
+ if ( isset($selected_social_icons['StumbleUpon']) && null == $selected_social_icons['StumbleUpon'] ) {
89
+ $selected_social_icons['StumbleUpon'] = 'http://www.stumbleupon.com/submit?url='. $url. '&title='. $title .'';
90
+ //http://www.stumbleupon.com/submit?url={url}&title={title}
91
+ }
92
+ if ( isset($selected_social_icons['Wechat']) && null == $selected_social_icons['Wechat'] ) {
93
+ $selected_social_icons['Wechat'] = 'http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url='. $url. '';
94
+ // http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url={url}
95
+ }
96
+ if ( isset($selected_social_icons['Viber']) && null == $selected_social_icons['Viber'] ) {
97
+ $selected_social_icons['Viber'] = 'viber://forward?text='. $url. '';
98
+ //viber://forward?text={url}
99
+ }
100
+
101
+ ?>
102
+ <div class="amp-social">
103
+ <ul>
104
+ <?php if( ( in_array( 'twitter' , $selected_social_icons,true) || in_array('twitter', $social_icons_names,true) ) && !empty($selected_social_icons['twitter']) ) { ?>
105
+ <a href="<?php echo $selected_social_icons['twitter'] ?>" target ="_blank"><li class="icon-twitter"></li></a>
106
+ <?php } ?>
107
+
108
+ <?php if( (in_array('facebook', $selected_social_icons,true) || in_array('facebook', $social_icons_names,true)) && !empty($selected_social_icons['facebook']) ) { ?>
109
+ <a href="<?php echo $selected_social_icons['facebook'] ?>" target ="_blank"><li class="icon-facebook"></li></a>
110
+ <?php } ?>
111
+
112
+ <?php if( ( in_array( 'pinterest' , $selected_social_icons,true ) || in_array( 'pinterest', $social_icons_names,true )) && !empty($selected_social_icons['pinterest']) ) { ?>
113
+ <a href="<?php echo $selected_social_icons['pinterest'] ?>" target ="_blank"><li class="icon-pinterest"></li></a>
114
+ <?php } ?>
115
+
116
+ <?php if( (in_array( 'google-plus' , $selected_social_icons,true ) || in_array( 'google-plus' , $social_icons_names,true )) && !empty($selected_social_icons['google-plus']) ) { ?>
117
+ <a href="<?php echo $selected_social_icons['google-plus'] ?>" target ="_blank"><li class="icon-google-plus"></li></a>
118
+ <?php } ?>
119
+
120
+ <?php if( (in_array( 'linkedin' , $selected_social_icons,true ) || in_array( 'linkedin' , $social_icons_names,true )) && !empty($selected_social_icons['linkedin']) ) { ?>
121
+ <a href="<?php echo $selected_social_icons['linkedin'] ?>" target ="_blank"><li class="icon-linkedin"></li></a>
122
+ <?php } ?>
123
+
124
+ <?php if( (in_array( 'youtube' , $selected_social_icons,true ) || in_array( 'youtube' , $social_icons_names,true )) && !empty($selected_social_icons['youtube']) ) { ?>
125
+ <a href="<?php echo $selected_social_icons['youtube'] ?>" target ="_blank"><li class="icon-youtube-play"></li></a>
126
+ <?php } ?>
127
+
128
+ <?php if( (in_array( 'instagram' , $selected_social_icons,true ) || in_array( 'instagram' , $social_icons_names,true )) && !empty($selected_social_icons['instagram']) ) { ?>
129
+ <a href="<?php echo $selected_social_icons['instagram'] ?>" target ="_blank"> <li class="icon-instagram"></li></a>
130
+ <?php } ?>
131
+
132
+ <?php if( ( in_array( 'reddit' , $selected_social_icons,true ) || in_array( 'reddit' , $social_icons_names,true )) && !empty($selected_social_icons['reddit']) ) { ?>
133
+ <a href="<?php echo $selected_social_icons['reddit'] ?>" target ="_blank"><li class="icon-reddit-alien"></li></a>
134
+ <?php } ?>
135
+
136
+ <?php if( ( in_array( 'VKontakte' , $selected_social_icons,true ) || in_array( 'VKontakte' , $social_icons_names,true ) ) && !empty($selected_social_icons['VKontakte']) ) { ?>
137
+ <a href="<?php echo $selected_social_icons['VKontakte'] ?>" target ="_blank"><li class="icon-vk"></li></a>
138
+ <?php } ?>
139
+
140
+ <?php if( ( in_array( 'Odnoklassniki' , $selected_social_icons,true ) || in_array( 'Odnoklassniki' , $social_icons_names,true ) ) && !empty($selected_social_icons['Odnoklassniki']) ) { ?>
141
+ <a href="<?php echo esc_url($selected_social_icons['Odnoklassniki']) ?>" target ="_blank"><li class="icon-Odnoklassniki"></li></a>
142
+ <?php } ?>
143
+
144
+ <?php if( (in_array( 'snapchat' , $selected_social_icons,true ) || in_array( 'snapchat' , $social_icons_names,true ) ) && !empty($selected_social_icons['snapchat']) ) { ?>
145
+ <a href="<?php echo $selected_social_icons['snapchat'] ?>" target ="_blank"><li class="icon-snapchat-ghost"></li></a>
146
+ <?php } ?>
147
+
148
+ <?php if( (in_array( 'tumblr' , $selected_social_icons,true ) || in_array( 'tumblr' , $social_icons_names,true )) && !empty($selected_social_icons['tumblr']) ) { ?>
149
+ <a href="<?php echo $selected_social_icons['tumblr'] ?>" target ="_blank"><li class="icon-tumblr"></li></a>
150
+ <?php } ?>
151
+
152
+ <?php if ( (in_array( 'telegram' , $selected_social_icons,true ) || in_array( 'telegram' , $social_icons_names,true )) && ! empty($selected_social_icons['telegram']) ) { ?>
153
+ <a href="<?php echo esc_url($selected_social_icons['telegram']); ?>" target ="_blank"><li class="icon-telegram"></li></a>
154
+ <?php } ?>
155
+
156
+ <?php if ( (in_array( 'digg' , $selected_social_icons,true ) || in_array( 'digg' , $social_icons_names,true )) && ! empty($selected_social_icons['digg']) ) { ?>
157
+ <a href="<?php echo esc_url($selected_social_icons['digg']); ?>" target ="_blank"><li class="icon-digg"></li></a>
158
+ <?php } ?>
159
+
160
+ <?php if ( (in_array( 'StumbleUpon' , $selected_social_icons,true ) || in_array( 'StumbleUpon' , $social_icons_names,true )) && ! empty($selected_social_icons['StumbleUpon']) ) { ?>
161
+ <a href="<?php echo esc_url($selected_social_icons['StumbleUpon']); ?>" target ="_blank"><li class="icon-StumbleUpon"></li></a>
162
+ <?php } ?>
163
+
164
+ <?php if ( (in_array( 'Wechat' , $selected_social_icons,true ) || in_array( 'Wechat' , $social_icons_names,true )) && !empty($selected_social_icons['Wechat']) ) { ?>
165
+ <a href="<?php echo esc_url($selected_social_icons['Wechat']); ?>" target ="_blank"><li class="icon-Wechat"></li></a>
166
+ <?php } ?>
167
+
168
+ <?php if ( (in_array( 'Viber' , $selected_social_icons,true ) || in_array( 'Viber' , $social_icons_names,true )) && ! empty($selected_social_icons['Viber']) ) { ?>
169
+ <a href="<?php echo ($selected_social_icons['Viber']); ?>" target ="_blank"><li class="icon-Viber"></li></a>
170
+ <?php } ?>
171
+
172
+ <?php if( (in_array( 'facebook-like' , $selected_social_icons,true ) || in_array( 'facebook-like' , $social_icons_names,true )) ) { ?>
173
+ <amp-facebook-like width=90 height=28
174
+ layout="fixed"
175
+ data-size="large"
176
+ data-layout="button_count"
177
+ data-href="<?php echo esc_url(get_the_permalink()); ?>">
178
+ </amp-facebook-like>
179
+ <?php } ?>
180
+ </ul>
181
+ </div>
182
+ <?php
183
+ }
184
+
185
+ function ampforwp_is_associative(array $arr)
186
+ {
187
+ if (array() === $arr) return false;
188
+ return array_keys($arr) !== range(0, count($arr) - 1);
189
+ }
190
+ //Load styling for social icons
191
+
192
+ add_action('amp_post_template_css','amp_social_styles',11);
193
+
194
+
195
+ function amp_social_styles(){ ?>
196
+ @font-face {
197
+ font-family: 'icomoon';
198
+ src: url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.eot');
199
+ src: url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.eot') format('embedded-opentype'),
200
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf') format('truetype'),
201
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.woff') format('woff'),
202
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.svg') format('svg');
203
+ font-weight: normal;
204
+ font-style: normal;
205
+ }
206
+
207
+ [class^="icon-"], [class*=" icon-"]{ font-family: 'icomoon'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1;
208
+ -webkit-font-smoothing: antialiased;
209
+ -moz-osx-font-smoothing: grayscale;
210
+ }
211
+
212
+ .icon-twitter:before{ content: "\f099";background:#1da1f2 }
213
+ .icon-facebook:before{ content: "\f09a";background:#3b5998 }
214
+ .icon-facebook-f:before{ content: "\f09a";background:#3b5998 }
215
+ .icon-pinterest:before{ content: "\f0d2";background:#bd081c }
216
+ .icon-google-plus:before{ content: "\f0d5";background:#dd4b39 }
217
+ .icon-linkedin:before{ content: "\f0e1";background:#0077b5 }
218
+ .icon-youtube-play:before{ content: "\f16a";background:#cd201f }
219
+ .icon-instagram:before{ content: "\f16d";background:#c13584 }
220
+ .icon-tumblr:before{ content: "\f173";background:#35465c }
221
+ .icon-vk:before{ content: "\f189";background:#45668e }
222
+ .icon-whatsapp:before{ content: "\f232";background:#075e54 }
223
+ .icon-reddit-alien:before{ content: "\f281";background:#ff4500 }
224
+ .icon-snapchat-ghost:before{ content: "\f2ac"; background:#fffc00 }
225
+ .amp-social{ font-size: 15px; display: inline-block; }
226
+ .amp-social ul{ list-style-type:none; padding:0;margin:0; text-align:center }
227
+ .amp-social li{ box-sizing: initial; display:inline-block; }
228
+ .amp-social li:before{box-sizing: initial;color: #fff;display: inline-block;width: 18px;height: 18px;line-height: 18px;}
229
+ amp-facebook-like{top:8px;}
230
+
231
  <?php }
components/theme-loader.php CHANGED
@@ -1,217 +1,217 @@
1
- <?php
2
- if ( 4 == $ampforwp_design_selector ) {
3
- define('AMPFORWP_CUSTOM_THEME', AMPFORWP_PLUGIN_DIR . 'templates/design-manager/swift' );
4
- }
5
- elseif ( ! defined('AMPFORWP_CUSTOM_THEME') ) {
6
- define('AMPFORWP_CUSTOM_THEME', AMPFORWP_MAIN_PLUGIN_DIR."/".$ampforwp_design_selector);
7
- }
8
-
9
- require_once( AMPFORWP_CUSTOM_THEME . '/functions.php' );
10
- //Filter the Template files to override previous ones
11
- //add_filter( 'amp_post_template_file', 'ampforwp_custom_header_file', 10, 2 );
12
- add_filter( 'amp_post_template_file', 'ampforwp_designing_custom_template', 10, 3 );
13
- //add_filter( 'amp_post_template_file', 'ampforwp_custom_footer_file', 10, 2 );
14
-
15
- // Custom Header
16
- function ampforwp_custom_header_file( $file, $type ) {
17
- if ( 'header' === $type ) {
18
- $file = AMPFORWP_CUSTOM_THEME . '/header.php';
19
- }
20
- return $file;
21
- }
22
-
23
- // Custom Template Files
24
- function ampforwp_designing_custom_template( $file, $type, $post ) {
25
- global $redux_builder_amp;
26
- // Single file
27
- /*if ( is_single() ) {
28
- if( 'single' === $type && ! ('product' === $post->post_type) ) {
29
- $file = AMPFORWP_CUSTOM_THEME . '/single.php';
30
- }
31
- }*/
32
- if ( is_page() ) {
33
- if( 'single' === $type && ! ('product' === $post->post_type) ) {
34
- $file = AMPFORWP_CUSTOM_THEME . '/page.php';
35
- }
36
- }
37
- // Loop Template
38
- if ( 'loop' === $type ) {
39
- $file = AMPFORWP_CUSTOM_THEME . '/loop.php';
40
- }
41
- // Archive
42
- if ( is_archive() ) {
43
- if ( 'single' === $type ) {
44
- $file = AMPFORWP_CUSTOM_THEME . '/archive.php';
45
- }
46
- }
47
- $ampforwp_custom_post_page = ampforwp_custom_post_page();
48
- // Homepage
49
- if ( is_home() ) {
50
- if ( 'single' === $type ) {
51
- $file = AMPFORWP_CUSTOM_THEME . '/index.php';
52
-
53
- if ( $redux_builder_amp['amp-frontpage-select-option'] == 1 ) {
54
- $file = AMPFORWP_CUSTOM_THEME . '/page.php';
55
- }
56
- if ( ampforwp_is_blog() ) {
57
- $file = AMPFORWP_CUSTOM_THEME . '/index.php';
58
- }
59
- }
60
- }
61
- // is_search
62
- if ( is_search() ) {
63
- if ( 'single' === $type ) {
64
- $file = AMPFORWP_CUSTOM_THEME . '/search.php';
65
- }
66
- }
67
- //For template pages
68
- switch ( true ) {
69
- case (is_tax()):
70
- $term = get_queried_object();
71
- $templates = array();
72
- if ( ! empty( $term->slug ) ) {
73
- $taxonomy = $term->taxonomy;
74
- $slug_decoded = urldecode( $term->slug );
75
- if ( $slug_decoded !== $term->slug ) {
76
- $templates[] = AMPFORWP_CUSTOM_THEME . "/taxonomy-$taxonomy-{$slug_decoded}.php";
77
- }
78
- $templates[] = AMPFORWP_CUSTOM_THEME . "/taxonomy-$taxonomy-{$term->slug}.php";
79
- $templates[] = AMPFORWP_CUSTOM_THEME . "/taxonomy-$taxonomy.php";
80
- }
81
- $templates[] = AMPFORWP_CUSTOM_THEME . "/taxonomy.php";
82
- foreach ( $templates as $key => $value ) {
83
- if ( 'single' === $type && file_exists($value) ) {
84
- $file = $value;
85
- break;
86
- }
87
- }
88
- break;
89
- case (is_category()):
90
- $category = get_queried_object();
91
- $templates = array();
92
- if ( ! empty( $category->slug ) ) {
93
- $slug_decoded = urldecode( $category->slug );
94
- if ( $slug_decoded !== $category->slug ) {
95
- $templates[] = AMPFORWP_CUSTOM_THEME . "/category-{$slug_decoded}.php";
96
- }
97
- $templates[] = AMPFORWP_CUSTOM_THEME . "/category-{$category->slug}.php";
98
- $templates[] = AMPFORWP_CUSTOM_THEME . "/category-{$category->term_id}.php";
99
- }
100
- $templates[] = AMPFORWP_CUSTOM_THEME . '/category.php';
101
- foreach ( $templates as $key => $value ) {
102
- if ( 'single' === $type && file_exists($value) ) {
103
- $file = $value;
104
- break;
105
- }
106
- }
107
- break;
108
- case (is_tag()):
109
- $tag = get_queried_object();
110
- $templates = array();
111
- if ( ! empty( $tag->slug ) ) {
112
- $slug_decoded = urldecode( $tag->slug );
113
- if ( $slug_decoded !== $tag->slug ) {
114
- $templates[] = AMPFORWP_CUSTOM_THEME . "/tag-{$slug_decoded}.php";
115
- }
116
- $templates[] = AMPFORWP_CUSTOM_THEME . "/tag-{$tag->slug}.php";
117
- $templates[] = AMPFORWP_CUSTOM_THEME . "/tag-{$tag->term_id}.php";
118
- }
119
- $templates[] = AMPFORWP_CUSTOM_THEME . '/tag.php';
120
- foreach ( $templates as $key => $value ) {
121
- if ( 'single' === $type && file_exists($value) ) {
122
- $file = $value;
123
- break;
124
- }
125
- }
126
- break;
127
- case (is_archive()):
128
- $post_types = array_filter( (array) get_query_var( 'post_type' ) );
129
- $templates = array();
130
- if ( count( $post_types ) == 1 ) {
131
- $post_type = reset( $post_types );
132
- $templates[] = AMPFORWP_CUSTOM_THEME . "/archive-{$post_type}.php";
133
- }
134
- $templates[] = AMPFORWP_CUSTOM_THEME . '/archive.php';
135
- foreach ( $templates as $key => $value ) {
136
- if ( 'single' === $type && file_exists($value) ) {
137
- $file = $value;
138
- break;
139
- }
140
- }
141
- break;
142
- case (is_post_type_archive()):
143
- $post_type = get_query_var( 'post_type' );
144
- if ( is_array( $post_type ) )
145
- $post_type = reset( $post_type );
146
-
147
- $obj = get_post_type_object( $post_type );
148
- if ( ! ($obj instanceof WP_Post_Type) || ! $obj->has_archive ) {
149
- //return '';
150
- break;
151
- }
152
-
153
- $post_types = array_filter( (array) get_query_var( 'post_type' ) );
154
-
155
- $templates = array();
156
-
157
- if ( count( $post_types ) == 1 ) {
158
- $post_type = reset( $post_types );
159
- $templates[] = AMPFORWP_CUSTOM_THEME . "/archive-{$post_type}.php";
160
- }
161
- $templates[] = AMPFORWP_CUSTOM_THEME . '/archive.php';
162
- foreach ( $templates as $key => $value ) {
163
- if ( 'single' === $type && file_exists($value) ) {
164
- $file = $value;
165
- break;
166
- }
167
- }
168
- break;
169
- case is_single():
170
- $object = get_queried_object();
171
-
172
- $templates = array();
173
-
174
- if ( ! empty( $object->post_type ) ) {
175
- $template = get_page_template_slug( $object );
176
- if ( $template && 0 === validate_file( $template ) ) {
177
- $templates[] = $template;
178
- }
179
-
180
- $name_decoded = urldecode( $object->post_name );
181
- if ( $name_decoded !== $object->post_name ) {
182
- $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}-{$name_decoded}.php";
183
- }
184
-
185
- $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}-{$object->post_name}.php";
186
- $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}.php";
187
- }
188
-
189
- $templates[] = AMPFORWP_CUSTOM_THEME . "/single.php";
190
-
191
- foreach ( $templates as $key => $value ) {
192
- if ( 'single' === $type && file_exists($value) ) {
193
- $file = $value;
194
- break;
195
- }
196
- }
197
- break;
198
- }
199
- return $file;
200
- }
201
-
202
- // Custom Footer
203
- function ampforwp_custom_footer_file( $file, $type ) {
204
- if ( 'footer' === $type ) {
205
- $file = AMPFORWP_CUSTOM_THEME . '/footer.php';
206
- }
207
- return $file;
208
- }
209
- // Load the Core Styles of Custom Theme
210
- //add_action('amp_css', 'ampforwp_custom_style');
211
- function ampforwp_custom_style() {
212
- global $redux_builder_amp;
213
- require_once( AMPFORWP_CUSTOM_THEME . '/style.php' );
214
- // Custom CSS
215
- echo $redux_builder_amp['css_editor'];
216
- }
217
-
1
+ <?php
2
+ if ( 4 == $ampforwp_design_selector ) {
3
+ define('AMPFORWP_CUSTOM_THEME', AMPFORWP_PLUGIN_DIR . 'templates/design-manager/swift' );
4
+ }
5
+ elseif ( ! defined('AMPFORWP_CUSTOM_THEME') ) {
6
+ define('AMPFORWP_CUSTOM_THEME', AMPFORWP_MAIN_PLUGIN_DIR."/".$ampforwp_design_selector);
7
+ }
8
+
9
+ require_once( AMPFORWP_CUSTOM_THEME . '/functions.php' );
10
+ //Filter the Template files to override previous ones
11
+ //add_filter( 'amp_post_template_file', 'ampforwp_custom_header_file', 10, 2 );
12
+ add_filter( 'amp_post_template_file', 'ampforwp_designing_custom_template', 10, 3 );
13
+ //add_filter( 'amp_post_template_file', 'ampforwp_custom_footer_file', 10, 2 );
14
+
15
+ // Custom Header
16
+ function ampforwp_custom_header_file( $file, $type ) {
17
+ if ( 'header' === $type ) {
18
+ $file = AMPFORWP_CUSTOM_THEME . '/header.php';
19
+ }
20
+ return $file;
21
+ }
22
+
23
+ // Custom Template Files
24
+ function ampforwp_designing_custom_template( $file, $type, $post ) {
25
+ global $redux_builder_amp;
26
+ // Single file
27
+ /*if ( is_single() ) {
28
+ if( 'single' === $type && ! ('product' === $post->post_type) ) {
29
+ $file = AMPFORWP_CUSTOM_THEME . '/single.php';
30
+ }
31
+ }*/
32
+ if ( is_page() ) {
33
+ if( 'single' === $type && ! ('product' === $post->post_type) ) {
34
+ $file = AMPFORWP_CUSTOM_THEME . '/page.php';
35
+ }
36
+ }
37
+ // Loop Template
38
+ if ( 'loop' === $type ) {
39
+ $file = AMPFORWP_CUSTOM_THEME . '/loop.php';
40
+ }
41
+ // Archive
42
+ if ( is_archive() ) {
43
+ if ( 'single' === $type ) {
44
+ $file = AMPFORWP_CUSTOM_THEME . '/archive.php';
45
+ }
46
+ }
47
+ $ampforwp_custom_post_page = ampforwp_custom_post_page();
48
+ // Homepage
49
+ if ( is_home() ) {
50
+ if ( 'single' === $type ) {
51
+ $file = AMPFORWP_CUSTOM_THEME . '/index.php';
52
+
53
+ if ( $redux_builder_amp['amp-frontpage-select-option'] == 1 ) {
54
+ $file = AMPFORWP_CUSTOM_THEME . '/page.php';
55
+ }
56
+ if ( ampforwp_is_blog() ) {
57
+ $file = AMPFORWP_CUSTOM_THEME . '/index.php';
58
+ }
59
+ }
60
+ }
61
+ // is_search
62
+ if ( is_search() ) {
63
+ if ( 'single' === $type ) {
64
+ $file = AMPFORWP_CUSTOM_THEME . '/search.php';
65
+ }
66
+ }
67
+ //For template pages
68
+ switch ( true ) {
69
+ case (is_tax()):
70
+ $term = get_queried_object();
71
+ $templates = array();
72
+ if ( ! empty( $term->slug ) ) {
73
+ $taxonomy = $term->taxonomy;
74
+ $slug_decoded = urldecode( $term->slug );
75
+ if ( $slug_decoded !== $term->slug ) {
76
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/taxonomy-$taxonomy-{$slug_decoded}.php";
77
+ }
78
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/taxonomy-$taxonomy-{$term->slug}.php";
79
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/taxonomy-$taxonomy.php";
80
+ }
81
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/taxonomy.php";
82
+ foreach ( $templates as $key => $value ) {
83
+ if ( 'single' === $type && file_exists($value) ) {
84
+ $file = $value;
85
+ break;
86
+ }
87
+ }
88
+ break;
89
+ case (is_category()):
90
+ $category = get_queried_object();
91
+ $templates = array();
92
+ if ( ! empty( $category->slug ) ) {
93
+ $slug_decoded = urldecode( $category->slug );
94
+ if ( $slug_decoded !== $category->slug ) {
95
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/category-{$slug_decoded}.php";
96
+ }
97
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/category-{$category->slug}.php";
98
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/category-{$category->term_id}.php";
99
+ }
100
+ $templates[] = AMPFORWP_CUSTOM_THEME . '/category.php';
101
+ foreach ( $templates as $key => $value ) {
102
+ if ( 'single' === $type && file_exists($value) ) {
103
+ $file = $value;
104
+ break;
105
+ }
106
+ }
107
+ break;
108
+ case (is_tag()):
109
+ $tag = get_queried_object();
110
+ $templates = array();
111
+ if ( ! empty( $tag->slug ) ) {
112
+ $slug_decoded = urldecode( $tag->slug );
113
+ if ( $slug_decoded !== $tag->slug ) {
114
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/tag-{$slug_decoded}.php";
115
+ }
116
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/tag-{$tag->slug}.php";
117
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/tag-{$tag->term_id}.php";
118
+ }
119
+ $templates[] = AMPFORWP_CUSTOM_THEME . '/tag.php';
120
+ foreach ( $templates as $key => $value ) {
121
+ if ( 'single' === $type && file_exists($value) ) {
122
+ $file = $value;
123
+ break;
124
+ }
125
+ }
126
+ break;
127
+ case (is_archive()):
128
+ $post_types = array_filter( (array) get_query_var( 'post_type' ) );
129
+ $templates = array();
130
+ if ( count( $post_types ) == 1 ) {
131
+ $post_type = reset( $post_types );
132
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/archive-{$post_type}.php";
133
+ }
134
+ $templates[] = AMPFORWP_CUSTOM_THEME . '/archive.php';
135
+ foreach ( $templates as $key => $value ) {
136
+ if ( 'single' === $type && file_exists($value) ) {
137
+ $file = $value;
138
+ break;
139
+ }
140
+ }
141
+ break;
142
+ case (is_post_type_archive()):
143
+ $post_type = get_query_var( 'post_type' );
144
+ if ( is_array( $post_type ) )
145
+ $post_type = reset( $post_type );
146
+
147
+ $obj = get_post_type_object( $post_type );
148
+ if ( ! ($obj instanceof WP_Post_Type) || ! $obj->has_archive ) {
149
+ //return '';
150
+ break;
151
+ }
152
+
153
+ $post_types = array_filter( (array) get_query_var( 'post_type' ) );
154
+
155
+ $templates = array();
156
+
157
+ if ( count( $post_types ) == 1 ) {
158
+ $post_type = reset( $post_types );
159
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/archive-{$post_type}.php";
160
+ }
161
+ $templates[] = AMPFORWP_CUSTOM_THEME . '/archive.php';
162
+ foreach ( $templates as $key => $value ) {
163
+ if ( 'single' === $type && file_exists($value) ) {
164
+ $file = $value;
165
+ break;
166
+ }
167
+ }
168
+ break;
169
+ case is_single():
170
+ $object = get_queried_object();
171
+
172
+ $templates = array();
173
+
174
+ if ( ! empty( $object->post_type ) ) {
175
+ $template = get_page_template_slug( $object );
176
+ if ( $template && 0 === validate_file( $template ) ) {
177
+ $templates[] = $template;
178
+ }
179
+
180
+ $name_decoded = urldecode( $object->post_name );
181
+ if ( $name_decoded !== $object->post_name ) {
182
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}-{$name_decoded}.php";
183
+ }
184
+
185
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}-{$object->post_name}.php";
186
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}.php";
187
+ }
188
+
189
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/single.php";
190
+
191
+ foreach ( $templates as $key => $value ) {
192
+ if ( 'single' === $type && file_exists($value) ) {
193
+ $file = $value;
194
+ break;
195
+ }
196
+ }
197
+ break;
198
+ }
199
+ return $file;
200
+ }
201
+
202
+ // Custom Footer
203
+ function ampforwp_custom_footer_file( $file, $type ) {
204
+ if ( 'footer' === $type ) {
205
+ $file = AMPFORWP_CUSTOM_THEME . '/footer.php';
206
+ }
207
+ return $file;
208
+ }
209
+ // Load the Core Styles of Custom Theme
210
+ //add_action('amp_css', 'ampforwp_custom_style');
211
+ function ampforwp_custom_style() {
212
+ global $redux_builder_amp;
213
+ require_once( AMPFORWP_CUSTOM_THEME . '/style.php' );
214
+ // Custom CSS
215
+ echo $redux_builder_amp['css_editor'];
216
+ }
217
+
feeds/instant-article-feed.php CHANGED
@@ -1,56 +1,56 @@
1
- <?php header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
2
- $more = 1;
3
-
4
- echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
5
- ?>
6
-
7
- <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
8
-
9
- <channel>
10
- <title><?php bloginfo_rss('name'); ?></title>
11
- <link><?php bloginfo_rss('url') ?></link>
12
- <description><?php bloginfo_rss("description") ?></description>
13
- <lastBuildDate><?php echo mysql2date('c', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
14
- <language><?php bloginfo_rss( 'language' ); ?></language>
15
-
16
- <?php
17
- global $redux_builder_amp;
18
- $number_of_articles = '';
19
- if( isset( $redux_builder_amp['ampforwp-fb-instant-article-posts'] ) && $redux_builder_amp['ampforwp-fb-instant-article-posts'] ){
20
- $number_of_articles = $redux_builder_amp['ampforwp-fb-instant-article-posts'];
21
- $number_of_articles = round( abs( floatval( $number_of_articles ) ) );
22
- }
23
- else{
24
- $number_of_articles = -1;
25
- }
26
- $args = array(
27
- 'post_status' => 'publish',
28
- 'ignore_sticky_posts' => 1,
29
- 'posts_per_page' => $number_of_articles
30
- );
31
- $query = new WP_Query( $args );
32
- while( $query->have_posts() ) :
33
-
34
- $query->the_post();
35
- ?>
36
-
37
- <item>
38
- <title><?php the_title_rss() ?></title>
39
- <link><?php the_permalink_rss() ?></link>
40
- <guid><?php the_guid(); ?></guid>
41
- <pubDate><?php echo mysql2date('c', get_post_time('c', true), false); ?></pubDate>
42
- <author><?php the_author() ?></author>
43
- <description><?php the_excerpt_rss(); ?></description>
44
- <content:encoded>
45
- <![CDATA[
46
- <?php
47
- $template_file = AMPFORWP_PLUGIN_DIR . 'templates/instant-articles/instant-article.php';
48
- load_template($template_file, false);
49
- ?>
50
- ]]>
51
- </content:encoded>
52
- </item>
53
-
54
- <?php endwhile; ?>
55
- </channel>
56
  </rss>
1
+ <?php header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
2
+ $more = 1;
3
+
4
+ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
5
+ ?>
6
+
7
+ <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
8
+
9
+ <channel>
10
+ <title><?php bloginfo_rss('name'); ?></title>
11
+ <link><?php bloginfo_rss('url') ?></link>
12
+ <description><?php bloginfo_rss("description") ?></description>
13
+ <lastBuildDate><?php echo mysql2date('c', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
14
+ <language><?php bloginfo_rss( 'language' ); ?></language>
15
+
16
+ <?php
17
+ global $redux_builder_amp;
18
+ $number_of_articles = '';
19
+ if( isset( $redux_builder_amp['ampforwp-fb-instant-article-posts'] ) && $redux_builder_amp['ampforwp-fb-instant-article-posts'] ){
20
+ $number_of_articles = $redux_builder_amp['ampforwp-fb-instant-article-posts'];
21
+ $number_of_articles = round( abs( floatval( $number_of_articles ) ) );
22
+ }
23
+ else{
24
+ $number_of_articles = -1;
25
+ }
26
+ $args = array(
27
+ 'post_status' => 'publish',
28
+ 'ignore_sticky_posts' => 1,
29
+ 'posts_per_page' => $number_of_articles
30
+ );
31
+ $query = new WP_Query( $args );
32
+ while( $query->have_posts() ) :
33
+
34
+ $query->the_post();
35
+ ?>
36
+
37
+ <item>
38
+ <title><?php the_title_rss() ?></title>
39
+ <link><?php the_permalink_rss() ?></link>
40
+ <guid><?php the_guid(); ?></guid>
41
+ <pubDate><?php echo mysql2date('c', get_post_time('c', true), false); ?></pubDate>
42
+ <author><?php the_author() ?></author>
43
+ <description><?php the_excerpt_rss(); ?></description>
44
+ <content:encoded>
45
+ <![CDATA[
46
+ <?php
47
+ $template_file = AMPFORWP_PLUGIN_DIR . 'templates/instant-articles/instant-article.php';
48
+ load_template($template_file, false);
49
+ ?>
50
+ ]]>
51
+ </content:encoded>
52
+ </item>
53
+
54
+ <?php endwhile; ?>
55
+ </channel>
56
  </rss>
images/menu-2.png DELETED
Binary file
images/single-1.png ADDED
Binary file
includes/admin-script.js CHANGED
@@ -1,361 +1,387 @@
1
- jQuery(function($) {
2
- var reduxOptionSearch = function(){
3
- jQuery('.redux_field_search').typeWatch({
4
- callback:function( searchString ){
5
- searchString = searchString.toLowerCase();
6
- var searchArray = searchString.split(' ');
7
- var parent = $(this).parents('.redux-container:first');
8
- var expanded_options = parent.find('.expand_options');
9
- if (searchString != "") {
10
- $('.redux-tab-container').hide();
11
- if (!expanded_options.hasClass('expanded')) {
12
- expanded_options.click();
13
- parent.find('.redux-main').addClass('redux-search');
14
- }
15
- } else {
16
- if (expanded_options.hasClass('expanded')) {
17
- expanded_options.click();
18
- parent.find('.redux-main').removeClass('redux-search');
19
- }
20
- parent.find('.redux-section-field, .redux-info-field, .redux-notice-field, .redux-container-group, .redux-section-desc, .redux-group-tab h3').show();
21
-
22
- if($('.redux-group-tab-link-li.active').length>0){
23
- var rel = $('.redux-group-tab-link-li.active a').attr('data-rel');
24
- var selector = 'div#'+rel+'_section_group';
25
- jQuery(selector).show();
26
- jQuery(selector).css('display','block');
27
-
28
- }else{
29
- $('.redux-group-tab-link-li.activeChild').click();
30
- $('div#'+rel+'_section_group').show();
31
- $('#'+rel+'_section_group').css('display','block');
32
- }
33
-
34
- }
35
- parent.find('.redux-field-container').each(function() {
36
- if (searchString != "") {
37
- parent.find('div.redux-group-tab').css('display','none');
38
- $(this).parents('tr:first').hide();
39
- } else {
40
- $(this).parents('tr:first').show();
41
- }
42
- });
43
- parent.find('.form-table tr').filter(function () {
44
- if(searchString==''){
45
- $('.redux-tab-container').show();
46
- $('.redux-tab-container').each(function(){
47
- $(this).find('.redux-tab-selector:first').click();
48
- });
49
- hideReduxFields();
50
- return false;
51
- }
52
- var item = $(this);
53
- var isMatch = true,
54
- text = $(this).find('.redux_field_th').text().toLowerCase();
55
- if ( !text || text == "" ) {
56
- return false;
57
- }
58
- $.each(searchArray, function (i, searchStr) {
59
- if (text.indexOf(searchStr) == -1) {
60
- isMatch = false;
61
- }
62
- });
63
- if (isMatch) {
64
- $(this).show();
65
- $(this).parents('div.redux-group-tab').css('display','block');
66
- }
67
- return isMatch;
68
- }).show( function() {
69
-
70
-
71
- });
72
- },
73
- wait:400,
74
- highlight:false,
75
- captureLength:0
76
- });
77
- }
78
- $(document).ready(function() {
79
-
80
- /*---------Google Fonts ------------*/
81
- // Google Font details
82
-
83
-
84
-
85
- var gURL, gAPIkey;
86
-
87
-
88
- gAPIkey = redux_data.google_font_api_key;
89
-
90
- // Append data into selects
91
- ampforwp_font_generator();
92
- function ampforwp_font_generator() {
93
-
94
- if ( ! gAPIkey){
95
- gAPIkey = $('#google_font_api_key').val();
96
- }
97
- if(gAPIkey=='' || typeof gAPIkey == 'undefined'){
98
- $('#redux_builder_amp-google_font_api_key').append('<p style="color:red"> Could not connect to API, please double check your API key. </p> ');
99
- $('.ampforwp-google-font-class').css({'display':'none'});
100
- return ;
101
- }
102
-
103
- gURL = "https://www.googleapis.com/webfonts/v1/webfonts?key=" + gAPIkey;
104
-
105
- var gfontData = $.get( gURL );
106
-
107
- gfontData.done(function( data ) {
108
- var values = Object.values(data.items);
109
- var allFonts = [];
110
-
111
- for (var i = 0; i < values.length; i++) {
112
- allFonts.push({fontFamily: values[i].family });
113
- }
114
-
115
-
116
- // var output = data.items.find('Basic');
117
- // console.log ( output );
118
-
119
-
120
- // let selectedFontDetails = data.items.find((o, i) => {
121
-
122
- // if (o.family === 'Keania One') {
123
- // //arr[i] = { name: 'new string', value: 'this', other: 'that' };
124
- // return data.items[i]; // stop searching
125
- // }
126
- // });
127
-
128
- // We have all the Font details from Google API in object selectedFontDetails
129
- //console.log(selectedFontDetails);
130
-
131
-
132
- // We have all the font names in the an array allFonts
133
- //console.log( allFonts );
134
-
135
-
136
- // Creating a select
137
- var s = $('<select/>');
138
-
139
- for (var i in allFonts) {
140
-
141
- var fontDetail = allFonts[i].fontFamily;
142
-
143
- $('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
144
- }
145
-
146
- //console.log( values.length);
147
- //console.log( values[0].family );
148
- //console.table( values);
149
-
150
- $('#amp_font_selector-select').on('change', function() {
151
- var select = $('option:selected', this).attr('data-font-number');
152
- var fontVariants = data.items[select].variants ;
153
- var fontFile = data.items[select].files ;
154
-
155
- if ( fontVariants) {
156
- $('.select2-search-choice').remove();
157
- $('#amp_font_type-select').html('<option></option>');
158
- }
159
-
160
- // console.log( data.items[select] );
161
-
162
- //if ( data.items[select] ) {
163
- $('#google_current_font_data').val( JSON.stringify(data.items[select]) );
164
- //}
165
-
166
- for (var i in fontVariants) {
167
- // var fontArray = {};
168
- // fontArray[fontVariants[i]] = fontFile[fontVariants[i]] ;
169
- $('#amp_font_type-select').append($("<option value='"+ fontVariants[i] +"' > "+fontVariants[i]+"</option>"));
170
- }
171
-
172
- });
173
- });
174
-
175
- gfontData.fail(function(data) {
176
- $('#redux_builder_amp-google_font_api_key').append('<p style="color:red"> Cound not connect to API, please double check your API key. </p> ');
177
- $('.ampforwp-google-font-class').css({'display':'none'});
178
- });
179
-
180
- }
181
-
182
- function amp_font_selector_select_change(){
183
-
184
-
185
- }
186
-
187
- $(window).load(function() {
188
- if($("#google_font_api_key").length>0){
189
- $("#google_font_api_key").after("<input type='submit' value='Verify'>");
190
- }
191
- if($('#amp_font_selector-select').length>0){
192
- // Adding Default Font Family
193
- $('#s2id_amp_font_selector-select a').removeClass('select2-default');
194
-
195
- $('#select2-chosen-3').html(redux_data.amp_font_selector);
196
- if(redux_data.amp_font_selector==''){
197
- redux_data.amp_font_selector = 'Poppins'
198
- }
199
-
200
- $('#amp_font_selector-select option[value="'+redux_data.amp_font_selector+'"]').attr("selected", "selected");
201
- $('#amp_font_selector-select').select2('val',redux_data.amp_font_selector).trigger("change");
202
-
203
- // Build select data
204
- let fontData = redux_data.google_current_font_data;
205
- // fontData = JSON.parse(fontData);
206
- console.log(fontData);
207
- if (! fontData.variants) {
208
- //$('.select2-search-choice').remove();
209
- //$('#amp_font_type-select').html('<option></option>');
210
-
211
- for (var i in fontData.variants) {
212
- $('#amp_font_type-select').append($("<option value='"+ fontData.variants[i] +"' > "+fontData.variants[i]+"</option>"));
213
- }
214
- }
215
-
216
- if(redux_data.amp_font_type==''){
217
- redux_data.amp_font_type = ['regular','500','700'];
218
- }
219
- // Add Default selected
220
- if ( redux_data.amp_font_type ) {
221
- $('#s2id_autogen4').remove();
222
- for (var i in redux_data.amp_font_type) {
223
- $('#s2id_amp_font_type-select ul').append('<li class="select2-search-choice"> <div> '+redux_data.amp_font_type[i]+'</div> <a href="#" class="select2-search-choice-close" tabindex="-1"></a></li>');
224
- //s2.append($('<option>').text(e));
225
- }
226
- $('#amp_font_type-select').select2('val',redux_data.amp_font_type)
227
- }
228
- }
229
- });
230
-
231
- /*---------Google Fonts Ends -------*/
232
-
233
-
234
- $('.redux-container').each(function() {
235
- if (!$(this).hasClass('redux-no-sections')) {
236
- $(this).find('.redux-main').prepend('<input style="float:right" class="redux_field_search" name="" type="text" placeholder="Search the controls"/>');
237
- reduxOptionSearch();
238
- }
239
- });
240
-
241
- $(".redux_field_search").keypress(function (evt) {
242
- //Deterime where our character code is coming from within the event
243
- var charCode = evt.charCode || evt.keyCode;
244
- if (charCode == 13) { //Enter key's keycode
245
- return false;
246
- }
247
- });
248
-
249
- if($(".amp-preview-button").length>0){
250
- $(".amp-preview-button").click(function(){
251
- var srcLink = $("#amp-preview-iframe").attr('data-src');
252
- $("#amp-preview-iframe").html("<iframe src='"+srcLink+"'></iframe>");
253
- });
254
- }
255
-
256
- });
257
- var dataTabRequired = function(){
258
- $('[data-tab-required]').each(function(){
259
- var tabRequired = $(this).attr('data-tab-required');
260
- var currentThis = $(this);
261
- tabRequired = JSON.parse(tabRequired);
262
- var showLi = true;
263
- $.each(tabRequired,function(k, value){
264
- var currentValue = jQuery('[name="redux_builder_amp['+value[0]+']"]').val();;
265
- if(currentValue!=value[2]){
266
- showLi = false;
267
- return false;
268
- }
269
- });
270
- if(showLi==false){
271
- currentThis.hide();
272
- }else{
273
- currentThis.show();
274
- }
275
-
276
- });
277
- }
278
- var reduxOptionTab = function(){
279
- $('.redux-tab-selector').click(function(){
280
- var tabId = $(this).attr('data-tab');
281
- var tabRequired = $(this).attr('data-tab-required');
282
- $(this).parents().find('.custom-tab-container').hide();
283
- $('#parent-section-'+ tabId ).show();
284
- });
285
- $('.redux-tabs-ul').each(function(){
286
- $(this).find('.redux-tab-selector:first').click();
287
- });
288
- dataTabRequired();
289
- $('select').change(function(){
290
- dataTabRequired();
291
- });
292
- }
293
- //reduxOptionTab();
294
-
295
- $(".redux-ampforwp-ext-deactivate").click(function(){
296
- var currentThis = $(this);
297
- var plugin_id = currentThis.attr("id");
298
- currentThis.val("Please Wait...");
299
- $deactivateConfirm = confirm("Are you sure you want to Deactivate ?");
300
- if($deactivateConfirm){
301
- $.ajax({
302
- url: ajaxurl,
303
- method: 'post',
304
- data: {action: 'ampforwp_deactivate_license', ampforwp_license_deactivate:plugin_id},
305
- dataType: 'json',
306
- success: function(response){
307
- if(response.status=='200'){
308
- currentThis.parents(".extension_desc").find("input[name='redux_builder_amp[amp-license][amp-ads-google-adsense][license]']").val("");
309
- window.location.href = window.location.href;
310
- }else{
311
- alert(response.message);
312
- }
313
- }
314
- })
315
- }
316
- });
317
-
318
- var hideReduxFields = function(){
319
- $("#redux_builder_amp-single-design-type").parents("tr").hide();
320
- }
321
- hideReduxFields();
322
-
323
-
324
- var helpSection = function(){
325
- var open;
326
-
327
- open = true;
328
-
329
- $('.a-f-wp-help-tear').click(function() {
330
- if (open) {
331
- $('.a-f-wp-help-tear').addClass('active');
332
- $('.a-f-wp-help-message').addClass('active');
333
- $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
334
- return open = !open;
335
- } else {
336
- $('.a-f-wp-help-tear').removeClass('active green');
337
- $('.a-f-wp-help-message').removeClass('active');
338
- $('.a-f-wp-help-message').val('');
339
- $('.a-f-wp-help-tear').html("<span><i class='dashicons-sos'></i></span>");
340
- return open = !open;
341
- }
342
- });
343
-
344
- $('input').on('input', function(e) {
345
- var value;
346
- value = $("input").val();
347
- if (value.length >= 2) {
348
- $('.a-f-wp-help-tear').addClass('green');
349
- $('.a-f-wp-help-tear').removeClass('active');
350
- return $('.a-f-wp-help-tear').html("<span><i class='dashicons-sos'></i></span>");
351
- } else {
352
- $('.a-f-wp-help-tear').removeClass('green');
353
- $('.a-f-wp-help-tear').addClass('active');
354
- return $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
355
- }
356
- });
357
- }
358
- helpSection();
359
-
360
- });
361
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($) {
2
+ var reduxOptionSearch = function(){
3
+ jQuery('.redux_field_search').typeWatch({
4
+ callback:function( searchString ){
5
+ searchString = searchString.toLowerCase();
6
+ var searchArray = searchString.split(' ');
7
+ var parent = $(this).parents('.redux-container:first');
8
+ var expanded_options = parent.find('.expand_options');
9
+ if (searchString != "") {
10
+ $('.redux-tab-container').hide();
11
+ if (!expanded_options.hasClass('expanded')) {
12
+ expanded_options.click();
13
+ parent.find('.redux-main').addClass('redux-search');
14
+ }
15
+ } else {
16
+ if (expanded_options.hasClass('expanded')) {
17
+ expanded_options.click();
18
+ parent.find('.redux-main').removeClass('redux-search');
19
+ }
20
+ parent.find('.redux-section-field, .redux-info-field, .redux-notice-field, .redux-container-group, .redux-section-desc, .redux-group-tab h3').show();
21
+
22
+ if($('.redux-group-tab-link-li.active').length>0){
23
+ var rel = $('.redux-group-tab-link-li.active a').attr('data-rel');
24
+ var selector = 'div#'+rel+'_section_group';
25
+ jQuery(selector).show();
26
+ jQuery(selector).css('display','block');
27
+
28
+ }else{
29
+ $('.redux-group-tab-link-li.activeChild').click();
30
+ $('div#'+rel+'_section_group').show();
31
+ $('#'+rel+'_section_group').css('display','block');
32
+ }
33
+
34
+ }
35
+ parent.find('.redux-field-container').each(function() {
36
+ if (searchString != "") {
37
+ parent.find('div.redux-group-tab').css('display','none');
38
+ $(this).parents('tr:first').hide();
39
+ } else {
40
+ $(this).parents('tr:first').show();
41
+ }
42
+ });
43
+ parent.find('.form-table tr').filter(function () {
44
+ if(searchString==''){
45
+ $('.redux-tab-container').show();
46
+ $('.redux-tab-container').each(function(){
47
+ $(this).find('.redux-tab-selector:first').click();
48
+ });
49
+ hideReduxFields();
50
+ return false;
51
+ }
52
+ var item = $(this);
53
+ var isMatch = true,
54
+ text = $(this).find('.redux_field_th').text().toLowerCase();
55
+ if ( !text || text == "" ) {
56
+ return false;
57
+ }
58
+ $.each(searchArray, function (i, searchStr) {
59
+ if (text.indexOf(searchStr) == -1) {
60
+ isMatch = false;
61
+ }
62
+ });
63
+ if (isMatch) {
64
+ $(this).show();
65
+ $(this).parents('div.redux-group-tab').css('display','block');
66
+ }
67
+ return isMatch;
68
+ }).show( function() {
69
+
70
+
71
+ });
72
+ },
73
+ wait:400,
74
+ highlight:false,
75
+ captureLength:0
76
+ });
77
+ }
78
+ $(document).ready(function() {
79
+
80
+ /*---------Google Fonts ------------*/
81
+ // Google Font details
82
+
83
+
84
+
85
+ var gURL, gAPIkey;
86
+
87
+
88
+ gAPIkey = redux_data.google_font_api_key;
89
+
90
+ // Append data into selects
91
+ ampforwp_font_generator();
92
+ function ampforwp_font_generator() {
93
+
94
+ if ( ! gAPIkey){
95
+ gAPIkey = $('#google_font_api_key').val();
96
+ }
97
+ if(gAPIkey=='' || typeof gAPIkey == 'undefined'){
98
+ $('#redux_builder_amp-google_font_api_key').append('<p style="color:red"> Could not connect to API, please double check your API key. </p> ');
99
+ $('.ampforwp-google-font-class').css({'display':'none'});
100
+ return ;
101
+ }
102
+
103
+ gURL = "https://www.googleapis.com/webfonts/v1/webfonts?key=" + gAPIkey;
104
+
105
+ var gfontData = $.get( gURL );
106
+
107
+ gfontData.done(function( data ) {
108
+ var values = Object.values(data.items);
109
+ var allFonts = [];
110
+
111
+ for (var i = 0; i < values.length; i++) {
112
+ allFonts.push({fontFamily: values[i].family });
113
+ }
114
+
115
+
116
+ // var output = data.items.find('Basic');
117
+ // console.log ( output );
118
+
119
+
120
+ // let selectedFontDetails = data.items.find((o, i) => {
121
+
122
+ // if (o.family === 'Keania One') {
123
+ // //arr[i] = { name: 'new string', value: 'this', other: 'that' };
124
+ // return data.items[i]; // stop searching
125
+ // }
126
+ // });
127
+
128
+ // We have all the Font details from Google API in object selectedFontDetails
129
+ //console.log(selectedFontDetails);
130
+
131
+
132
+ // We have all the font names in the an array allFonts
133
+ //console.log( allFonts );
134
+
135
+
136
+ // Creating a select
137
+ var s = $('<select/>');
138
+
139
+ for (var i in allFonts) {
140
+
141
+ var fontDetail = allFonts[i].fontFamily;
142
+
143
+ $('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
144
+ }
145
+
146
+ //console.log( values.length);
147
+ //console.log( values[0].family );
148
+ //console.table( values);
149
+
150
+ $('#amp_font_selector-select').on('change', function() {
151
+ var select = $('option:selected', this).attr('data-font-number');
152
+ var fontVariants = data.items[select].variants ;
153
+ var fontFile = data.items[select].files ;
154
+
155
+ if ( fontVariants) {
156
+ $('.select2-search-choice').remove();
157
+ $('#amp_font_type-select').html('<option></option>');
158
+ }
159
+
160
+ // console.log( data.items[select] );
161
+
162
+ //if ( data.items[select] ) {
163
+ $('#google_current_font_data').val( JSON.stringify(data.items[select]) );
164
+ //}
165
+
166
+ for (var i in fontVariants) {
167
+ // var fontArray = {};
168
+ // fontArray[fontVariants[i]] = fontFile[fontVariants[i]] ;
169
+ $('#amp_font_type-select').append($("<option value='"+ fontVariants[i] +"' > "+fontVariants[i]+"</option>"));
170
+ }
171
+
172
+ });
173
+ });
174
+
175
+ gfontData.fail(function(data) {
176
+ $('#redux_builder_amp-google_font_api_key').append('<p style="color:red"> Cound not connect to API, please double check your API key. </p> ');
177
+ $('.ampforwp-google-font-class').css({'display':'none'});
178
+ });
179
+
180
+ }
181
+
182
+ function amp_font_selector_select_change(){
183
+
184
+
185
+ }
186
+
187
+ $(window).load(function() {
188
+ if($("#google_font_api_key").length>0){
189
+ $("#google_font_api_key").after("<input type='submit' value='Verify'>");
190
+ }
191
+ if($('#amp_font_selector-select').length>0){
192
+ // Adding Default Font Family
193
+ $('#s2id_amp_font_selector-select a').removeClass('select2-default');
194
+
195
+ $('#select2-chosen-3').html(redux_data.amp_font_selector);
196
+ if(redux_data.amp_font_selector==''){
197
+ redux_data.amp_font_selector = 'Poppins'
198
+ }
199
+
200
+ $('#amp_font_selector-select option[value="'+redux_data.amp_font_selector+'"]').attr("selected", "selected");
201
+ $('#amp_font_selector-select').select2('val',redux_data.amp_font_selector).trigger("change");
202
+
203
+ // Build select data
204
+ let fontData = redux_data.google_current_font_data;
205
+ // fontData = JSON.parse(fontData);
206
+ console.log(fontData);
207
+ if (! fontData.variants) {
208
+ //$('.select2-search-choice').remove();
209
+ //$('#amp_font_type-select').html('<option></option>');
210
+
211
+ for (var i in fontData.variants) {
212
+ $('#amp_font_type-select').append($("<option value='"+ fontData.variants[i] +"' > "+fontData.variants[i]+"</option>"));
213
+ }
214
+ }
215
+
216
+ if(redux_data.amp_font_type==''){
217
+ redux_data.amp_font_type = ['regular','500','700'];
218
+ }
219
+ // Add Default selected
220
+ if ( redux_data.amp_font_type ) {
221
+ $('#s2id_autogen4').remove();
222
+ for (var i in redux_data.amp_font_type) {
223
+ $('#s2id_amp_font_type-select ul').append('<li class="select2-search-choice"> <div> '+redux_data.amp_font_type[i]+'</div> <a href="#" class="select2-search-choice-close" tabindex="-1"></a></li>');
224
+ //s2.append($('<option>').text(e));
225
+ }
226
+ $('#amp_font_type-select').select2('val',redux_data.amp_font_type)
227
+ }
228
+ }
229
+ });
230
+
231
+ /*---------Google Fonts Ends -------*/
232
+
233
+
234
+ $('.redux-container').each(function() {
235
+ if (!$(this).hasClass('redux-no-sections')) {
236
+ $(this).find('.redux-main').prepend('<input style="float:right" class="redux_field_search" name="" type="text" placeholder="Search the controls"/>');
237
+ reduxOptionSearch();
238
+ }
239
+ });
240
+
241
+ $(".redux_field_search").keypress(function (evt) {
242
+ //Deterime where our character code is coming from within the event
243
+ var charCode = evt.charCode || evt.keyCode;
244
+ if (charCode == 13) { //Enter key's keycode
245
+ return false;
246
+ }
247
+ });
248
+
249
+ if($(".amp-preview-button").length>0){
250
+ $(".amp-preview-button").click(function(){
251
+ var srcLink = $("#amp-preview-iframe").attr('data-src');
252
+ $("#amp-preview-iframe").html("<iframe src='"+srcLink+"'></iframe>");
253
+ });
254
+ }
255
+
256
+ });
257
+ var dataTabRequired = function(){
258
+ $('[data-tab-required]').each(function(){
259
+ var tabRequired = $(this).attr('data-tab-required');
260
+ var currentThis = $(this);
261
+ tabRequired = JSON.parse(tabRequired);
262
+ var showLi = true;
263
+ $.each(tabRequired,function(k, value){
264
+ var currentValue = jQuery('[name="redux_builder_amp['+value[0]+']"]').val();;
265
+ if(currentValue!=value[2]){
266
+ showLi = false;
267
+ return false;
268
+ }
269
+ });
270
+ if(showLi==false){
271
+ currentThis.hide();
272
+ }else{
273
+ currentThis.show();
274
+ }
275
+
276
+ });
277
+ }
278
+ var reduxOptionTab = function(){
279
+ $('.redux-tab-selector').click(function(){
280
+ var tabId = $(this).attr('data-tab');
281
+ var tabRequired = $(this).attr('data-tab-required');
282
+ $(this).parents().find('.custom-tab-container').hide();
283
+ $('#parent-section-'+ tabId ).show();
284
+ });
285
+ $('.redux-tabs-ul').each(function(){
286
+ $(this).find('.redux-tab-selector:first').click();
287
+ });
288
+ dataTabRequired();
289
+ $('select').change(function(){
290
+ dataTabRequired();
291
+ });
292
+ }
293
+ //reduxOptionTab();
294
+
295
+ $(".redux-ampforwp-ext-deactivate").click(function(){
296
+ var currentThis = $(this);
297
+ var plugin_id = currentThis.attr("id");
298
+ currentThis.val("Please Wait...");
299
+ $deactivateConfirm = confirm("Are you sure you want to Deactivate ?");
300
+ if($deactivateConfirm){
301
+ $.ajax({
302
+ url: ajaxurl,
303
+ method: 'post',
304
+ data: {action: 'ampforwp_deactivate_license', ampforwp_license_deactivate:plugin_id},
305
+ dataType: 'json',
306
+ success: function(response){
307
+ if(response.status=='200'){
308
+ currentThis.parents(".extension_desc").find("input[name='redux_builder_amp[amp-license][amp-ads-google-adsense][license]']").val("");
309
+ window.location.href = window.location.href;
310
+ }else{
311
+ alert(response.message);
312
+ }
313
+ }
314
+ })
315
+ }
316
+ });
317
+
318
+ /*var hideReduxFields = function(){
319
+ $("#redux_builder_amp-single-design-type").parents("tr").hide();
320
+ }
321
+ hideReduxFields();*/
322
+
323
+
324
+ var helpSection = function(){
325
+ var open;
326
+
327
+ open = true;
328
+
329
+ $('.a-f-wp-help-tear').click(function() {
330
+ if (open) {
331
+ $('.a-f-wp-help-tear').addClass('active');
332
+ $('.a-f-wp-help-message').addClass('active');
333
+ $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
334
+ return open = !open;
335
+ } else {
336
+ $('.a-f-wp-help-tear').removeClass('active green');
337
+ $('.a-f-wp-help-message').removeClass('active');
338
+ $('.a-f-wp-help-message').val('');
339
+ $('.a-f-wp-help-tear').html("<span><i class='dashicons-sos'></i></span>");
340
+ return open = !open;
341
+ }
342
+ });
343
+
344
+ $('input').on('input', function(e) {
345
+ var value;
346
+ value = $("input").val();
347
+ if (value.length >= 2) {
348
+ $('.a-f-wp-help-tear').addClass('green');
349
+ $('.a-f-wp-help-tear').removeClass('active');
350
+ return $('.a-f-wp-help-tear').html("<span><i class='dashicons-sos'></i></span>");
351
+ } else {
352
+ $('.a-f-wp-help-tear').removeClass('green');
353
+ $('.a-f-wp-help-tear').addClass('active');
354
+ return $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
355
+ }
356
+ });
357
+ }
358
+ helpSection();
359
+
360
+ var redux_title_modify = function(){
361
+ $( '.redux-group-tab-link-a' ).click(function(){
362
+ var link = $( this );
363
+ if ( link.parent().hasClass( 'empty_section' ) && link.parent().hasClass( 'hasSubSections' ) ) {
364
+ var elements = $( this ).closest( 'ul' ).find( '.redux-group-tab-link-a' );
365
+ var index = elements.index( this );
366
+ link = elements.slice( index + 1, index + 2 );
367
+ }
368
+
369
+ var el = link.parents( '.redux-container:first' );
370
+ var relid = link.data( 'rel' ); // The group ID of interest
371
+ var oldid = el.find( '.redux-group-tab-link-li.active:first .redux-group-tab-link-a' ).data( 'rel' );
372
+
373
+ var panelTitle = el.find( '#' + relid + '_section_group' ).find("h2:first").hide().html();
374
+ $('.redux-main').find("#info_bar h2#newTitle").remove();
375
+ if (typeof panelTitle !== 'undefined' || panelTitle){
376
+ $('.redux-main').find("#info_bar a.expand_options").after('<h2 id="newTitle" style="float: left;margin: 0px;padding-left: 10px;">'+panelTitle+'</h2>');
377
+ }
378
+
379
+ });
380
+ }
381
+ if($( '.redux-group-tab-link-a' ).length){
382
+ redux_title_modify();
383
+ }
384
+
385
+
386
+ });
387
+
includes/admin-style.css CHANGED
@@ -1,333 +1,333 @@
1
- /*Bolt Icon*/
2
- .ampforwp-blurb-add:hover{
3
- cursor: pointer;
4
- }
5
- .ampforwp-blurb-add.button {
6
- margin-bottom: 10px;
7
- }
8
- .ampforwp-blurb-additional .preview-image {
9
- max-width:100%;
10
- width : 70px;
11
- height : 70px;
12
- }
13
- #toplevel_page_amp_options a .wp-menu-image:before{display: none}
14
-
15
- body #toplevel_page_amp_options .wp-menu-image{
16
- background-image:
17
- url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjMxNHB4IiBoZWlnaHQ9IjMxNXB4IiB2aWV3Qm94PSIwIDAgMzE0IDMxNSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDEgKDM1MzI2KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSIyNjA3MSIgZmlsbD0iI0ZGNEM0QyI+CiAgICAgICAgICAgIDxnIGlkPSJDYXBhXzEiPgogICAgICAgICAgICAgICAgPGcgaWQ9Il94MzJfNDAuX1Bvd2VyIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTU3LjAwNywwIEM3MC4yOTIsMCAwLDcwLjI5MiAwLDE1Ny4wMDcgQzAsMjQzLjcxNSA3MC4yOTIsMzE0LjAxNCAxNTcuMDA3LDMxNC4wMTQgQzI0My43MTYsMzE0LjAxNCAzMTQuMDE0LDI0My43MTUgMzE0LjAxNCwxNTcuMDA3IEMzMTQuMDE0LDcwLjI5MiAyNDMuNzE2LDAgMTU3LjAwNywwIFogTTE1Ny4wMDcsMjgyLjYxMiBDODcuNjM0LDI4Mi42MTIgMzEuNDAyLDIyNi4zNzIgMzEuNDAyLDE1Ny4wMDcgQzMxLjQwMiw4Ny42MzQgODcuNjM0LDMxLjQwMiAxNTcuMDA3LDMxLjQwMiBDMjI2LjM3MSwzMS40MDIgMjgyLjYxMSw4Ny42MzQgMjgyLjYxMSwxNTcuMDA3IEMyODIuNjEyLDIyNi4zNzIgMjI2LjM3MiwyODIuNjEyIDE1Ny4wMDcsMjgyLjYxMiBaIE0yMDQuMTExLDE0MS4zNjggTDE2My40NzksMTQxLjUzMyBDMTU5LjEzOSwxNDEuNTUzIDE1Ny41NDQsMTM4LjYyMyAxNTkuOTA1LDEzNC45NzkgTDIwMy4zOTcsNjguMTA5IEMyMDguMTI2LDYwLjg0MSAyMDYuOTg0LDU5LjkyMiAyMDAuODYxLDY2LjA1MyBMMTA1LjMwNSwxNjEuNiBDOTkuMTcyLDE2Ny43MzIgMTAxLjIzMiwxNzIuNjc2IDEwOS45MDYsMTcyLjY0MSBMMTQyLjY3OSwxNzIuNTA4IEMxNTEuMzQ3LDE3Mi40NzIgMTU0LjU1MiwxNzguMzM1IDE0OS44MjQsMTg1LjYwNSBMMTA2LjMzNCwyNTIuNDc3IEMxMDMuOTcyLDI1Ni4xMTIgMTA0LjU0MiwyNTYuNTgxIDEwNy42MiwyNTMuNTI3IEwxNzUuOTE1LDE4NS43MTcgQzE3OC45ODgsMTgyLjY1OSAxODMuOTUsMTc3LjY4NiAxODYuOTgzLDE3NC41OTYgTDIwOC43ODgsMTUyLjQ4NSBDMjE0Ljg3NSwxNDYuMzE3IDIxMi43NzUsMTQxLjMzIDIwNC4xMTEsMTQxLjM2OCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) !important;
18
- background-repeat: no-repeat;
19
- background-position: center;
20
- -webkit-background-size: 20px auto;
21
- background-size: 20px auto;
22
- }
23
- .amp_content_builder .redux-group-tab-link-a span:after {
24
- /* content: "NEW";*/
25
- color: #fff;
26
- font-size: 10px;
27
- background: #4452a7;
28
- padding: 4px 7px;
29
- border-radius: 30px;
30
- font-weight: normal;
31
- position: relative;
32
- top: -1px;
33
- left: 5px;
34
- }
35
- .redux-container #redux-header .display_header h2{
36
- background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjMxNHB4IiBoZWlnaHQ9IjMxNXB4IiB2aWV3Qm94PSIwIDAgMzE0IDMxNSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDEgKDM1MzI2KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSIyNjA3MSIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgIDxnIGlkPSJDYXBhXzEiPgogICAgICAgICAgICAgICAgPGcgaWQ9Il94MzJfNDAuX1Bvd2VyIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTU3LjAwNywwIEM3MC4yOTIsMCAwLDcwLjI5MiAwLDE1Ny4wMDcgQzAsMjQzLjcxNSA3MC4yOTIsMzE0LjAxNCAxNTcuMDA3LDMxNC4wMTQgQzI0My43MTYsMzE0LjAxNCAzMTQuMDE0LDI0My43MTUgMzE0LjAxNCwxNTcuMDA3IEMzMTQuMDE0LDcwLjI5MiAyNDMuNzE2LDAgMTU3LjAwNywwIFogTTE1Ny4wMDcsMjgyLjYxMiBDODcuNjM0LDI4Mi42MTIgMzEuNDAyLDIyNi4zNzIgMzEuNDAyLDE1Ny4wMDcgQzMxLjQwMiw4Ny42MzQgODcuNjM0LDMxLjQwMiAxNTcuMDA3LDMxLjQwMiBDMjI2LjM3MSwzMS40MDIgMjgyLjYxMSw4Ny42MzQgMjgyLjYxMSwxNTcuMDA3IEMyODIuNjEyLDIyNi4zNzIgMjI2LjM3MiwyODIuNjEyIDE1Ny4wMDcsMjgyLjYxMiBaIE0yMDQuMTExLDE0MS4zNjggTDE2My40NzksMTQxLjUzMyBDMTU5LjEzOSwxNDEuNTUzIDE1Ny41NDQsMTM4LjYyMyAxNTkuOTA1LDEzNC45NzkgTDIwMy4zOTcsNjguMTA5IEMyMDguMTI2LDYwLjg0MSAyMDYuOTg0LDU5LjkyMiAyMDAuODYxLDY2LjA1MyBMMTA1LjMwNSwxNjEuNiBDOTkuMTcyLDE2Ny43MzIgMTAxLjIzMiwxNzIuNjc2IDEwOS45MDYsMTcyLjY0MSBMMTQyLjY3OSwxNzIuNTA4IEMxNTEuMzQ3LDE3Mi40NzIgMTU0LjU1MiwxNzguMzM1IDE0OS44MjQsMTg1LjYwNSBMMTA2LjMzNCwyNTIuNDc3IEMxMDMuOTcyLDI1Ni4xMTIgMTA0LjU0MiwyNTYuNTgxIDEwNy42MiwyNTMuNTI3IEwxNzUuOTE1LDE4NS43MTcgQzE3OC45ODgsMTgyLjY1OSAxODMuOTUsMTc3LjY4NiAxODYuOTgzLDE3NC41OTYgTDIwOC43ODgsMTUyLjQ4NSBDMjE0Ljg3NSwxNDYuMzE3IDIxMi43NzUsMTQxLjMzIDIwNC4xMTEsMTQxLjM2OCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+") !important;
37
- background-size: 18px;
38
- background-repeat: no-repeat;
39
- padding-left: 26px;
40
- background-position: 0px 0;
41
- }
42
- .amp-update-notice .notice-dismiss{
43
- display: none
44
- }
45
-
46
- /* Mobile preview button and preview Iframe Styling #1082 */
47
- .col-sm-12 {
48
- width: 100%;
49
- }
50
- .margin-top-bottom {
51
- margin-top: 9px;
52
- margin-bottom: 10px;
53
- }
54
- .text-center {
55
- text-align: center;
56
- }
57
- #ampforwp-preview-format {
58
- margin-bottom: 0px;
59
- line-height: 0.5em;
60
- }
61
- .ampforwp-preview-phone-frame-wrapper {
62
- width:110%;
63
- display:inline-block;
64
- position: relative;
65
- max-width: 300px;
66
- text-align: center;
67
- margin-left: -12px;
68
- }
69
- .ampforwp-preview-phone-frame-wrapper:after {
70
- padding-top: 180%;
71
- display:block;
72
- content: '';
73
- }
74
- .ampforwp-preview-phone-frame {
75
- position: absolute;
76
- top: 0;
77
- bottom: 0;
78
- right: 0;
79
- left: 0;
80
- border: 1px solid #e5e5e5;
81
- border-radius: 40px;
82
- padding-top:50px;
83
- padding-bottom: 35px;
84
- background: #f1f1f1;
85
-
86
- }
87
- .ampforwp-preview-container {
88
- height: 100%;
89
- position: relative;
90
- width: 100%;
91
- border: 1px solid #e5e5e5;
92
- overflow: hidden;
93
- }
94
- .ampforwp-preview-container > iframe {
95
- height: 100%;
96
- width: 100%;
97
- transform: scale(1, 1);
98
- transform-origin: top left;
99
- }
100
- #TB_window #TB_ajaxContent{
101
- width: 100%;
102
- height: 100%;
103
- }
104
- .ampforwp-preview-button-container{
105
- float: right;
106
- margin-top: 0px;
107
- }
108
- .meta-radio-two{margin-right: 8px; top: 3px; position: relative;}
109
- #wp-admin-bar-ampforwp-view-amp a, #wp-admin-bar-ampforwp-view-amp:hover a{
110
- background-size: 18px !important;background-repeat: no-repeat !important;background-position: 4px 7px !important;text-indent: -99999px;width: 12px; background:
111
- url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjMxNHB4IiBoZWlnaHQ9IjMxNXB4IiB2aWV3Qm94PSIwIDAgMzE0IDMxNSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDEgKDM1MzI2KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSIjODI4NzhjIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSIyNjA3MSIgZmlsbD0iIzgyODc4YyI+CiAgICAgICAgICAgIDxnIGlkPSJDYXBhXzEiPgogICAgICAgICAgICAgICAgPGcgaWQ9Il94MzJfNDAuX1Bvd2VyIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTU3LjAwNywwIEM3MC4yOTIsMCAwLDcwLjI5MiAwLDE1Ny4wMDcgQzAsMjQzLjcxNSA3MC4yOTIsMzE0LjAxNCAxNTcuMDA3LDMxNC4wMTQgQzI0My43MTYsMzE0LjAxNCAzMTQuMDE0LDI0My43MTUgMzE0LjAxNCwxNTcuMDA3IEMzMTQuMDE0LDcwLjI5MiAyNDMuNzE2LDAgMTU3LjAwNywwIFogTTE1Ny4wMDcsMjgyLjYxMiBDODcuNjM0LDI4Mi42MTIgMzEuNDAyLDIyNi4zNzIgMzEuNDAyLDE1Ny4wMDcgQzMxLjQwMiw4Ny42MzQgODcuNjM0LDMxLjQwMiAxNTcuMDA3LDMxLjQwMiBDMjI2LjM3MSwzMS40MDIgMjgyLjYxMSw4Ny42MzQgMjgyLjYxMSwxNTcuMDA3IEMyODIuNjEyLDIyNi4zNzIgMjI2LjM3MiwyODIuNjEyIDE1Ny4wMDcsMjgyLjYxMiBaIE0yMDQuMTExLDE0MS4zNjggTDE2My40NzksMTQxLjUzMyBDMTU5LjEzOSwxNDEuNTUzIDE1Ny41NDQsMTM4LjYyMyAxNTkuOTA1LDEzNC45NzkgTDIwMy4zOTcsNjguMTA5IEMyMDguMTI2LDYwLjg0MSAyMDYuOTg0LDU5LjkyMiAyMDAuODYxLDY2LjA1MyBMMTA1LjMwNSwxNjEuNiBDOTkuMTcyLDE2Ny43MzIgMTAxLjIzMiwxNzIuNjc2IDEwOS45MDYsMTcyLjY0MSBMMTQyLjY3OSwxNzIuNTA4IEMxNTEuMzQ3LDE3Mi40NzIgMTU0LjU1MiwxNzguMzM1IDE0OS44MjQsMTg1LjYwNSBMMTA2LjMzNCwyNTIuNDc3IEMxMDMuOTcyLDI1Ni4xMTIgMTA0LjU0MiwyNTYuNTgxIDEwNy42MiwyNTMuNTI3IEwxNzUuOTE1LDE4NS43MTcgQzE3OC45ODgsMTgyLjY1OSAxODMuOTUsMTc3LjY4NiAxODYuOTgzLDE3NC41OTYgTDIwOC43ODgsMTUyLjQ4NSBDMjE0Ljg3NSwxNDYuMzE3IDIxMi43NzUsMTQxLjMzIDIwNC4xMTEsMTQxLjM2OCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+)
112
- no-repeat
113
- 4px 7px;
114
-
115
- }
116
- .amp-theme-selector-img a{
117
- background: rgba(0, 0, 0, 0.7);
118
- text-decoration: none;
119
- padding: 3px 8px 4px 7px;
120
- bottom: 16px;
121
- font-size: 12px;
122
- border-radius: 100px;
123
- color: #fff;
124
- position: relative;
125
- right: 62px;
126
- }
127
- .amp-theme-selector-img:hover a {
128
- background: #4452a7;
129
- }
130
- .amp-theme-selector-img img{
131
- position: relative;
132
- visibility: visible;
133
- cursor:pointer;
134
- }
135
- .hidetab{
136
- display: none !important;
137
- }
138
- .activetab{
139
- display: block !important;
140
- }
141
- #wpbody-content .wrap .amp-update-notice{
142
- display: table;
143
- position: relative;
144
- height: 70px;
145
- padding: 0;
146
- border: 0;
147
- overflow: hidden;
148
- margin-bottom: 10px;
149
- }
150
- .amp-update-notice-text-box{
151
- padding: 15px 15px 10px 15px;
152
- display: inline-block;
153
- }
154
-
155
- .amp-update-notice-text-box img{
156
- width: 40px;
157
- display: inline;
158
- height: 40px;
159
- }
160
- .amp-update-notice-text{
161
- display: inline;
162
- position: relative;
163
- margin-left: 5px;
164
- font-weight: 300;
165
- top: -14px;
166
- font-size: 20px;
167
- }
168
- .amp-update-notice-text-box a{
169
- position: relative;
170
- top: -17px;
171
- background: #ECEFF1;
172
- text-decoration: none;
173
- color: #111;
174
- font-size: 10px;
175
- padding: 4px 6px 5px 5px;
176
- border-radius: 4px;
177
- margin-left: 5px;
178
- text-transform: uppercase;
179
- border: 1px solid rgba(207, 216, 220, 0.9);
180
- }
181
- .amp-update-notice-dismiss{
182
- display:inline-block;float:right;height: 70px;background: #333;width: 50px;text-align: center;
183
- }
184
- .amp-update-notice-dismiss a{
185
- color: #fff;
186
- text-decoration: none;
187
- top: 26px;
188
- position: relative;
189
- padding: 24px 18px;
190
- font-size: 17px;
191
- font-weight: 300;
192
- background: #333;
193
- z-index: 100;
194
- }
195
- .amp-update-notice-review-box{
196
- float: right;display: inline-block;/* height: 55px; */background: #4CAF50;padding: 12px 20px 11px 60px;background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA1MTIuMDAxIDUxMi4wMDEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMi4wMDEgNTEyLjAwMTsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxMjhweCIgaGVpZ2h0PSIxMjhweCI+CjxnPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGQ9Ik0zNjYuOTA1LDM2NS4wNzFsODcuOTAyLTg1LjY4M2M2LjA4Ny01LjkzNSw4LjIzNi0xNC42NDMsNS42MS0yMi43MjljLTIuNjI5LTguMDg1LTkuNDg2LTEzLjg2Ni0xNy44OTgtMTUuMDg3ICAgICBsLTU1Ljg3OS04LjEyYy00LjQxMy0wLjY0Ny04LjUyMSwyLjQxOS05LjE2MSw2LjgzN2MtMC42NDMsNC40MTksMi40MTgsOC41MjEsNi44MzcsOS4xNjNsNTUuODc5LDguMTIgICAgIGMyLjI3OCwwLjMzLDQuMTM1LDEuODk2LDQuODQ3LDQuMDgzYzAuNzExLDIuMTksMC4xMjksNC41NDgtMS41MTksNi4xNTRsLTkwLjk0Nyw4OC42NWMtMS45MDUsMS44NTgtMi43NzMsNC41MzMtMi4zMjMsNy4xNTUgICAgIGwyMS40NjksMTI1LjE3OGMwLjM4OSwyLjI2OC0wLjUyNyw0LjUxOC0yLjM4Nyw1Ljg2OWMtMS44MTYsMS4zMTgtNC4zMzksMS41MDItNi4zMjIsMC40NTlsLTExMi40MTQtNTkuMTAxICAgICBjLTIuMzU1LTEuMjM3LTUuMTY5LTEuMjM3LTcuNTI0LDBsLTExMi40MTQsNTkuMTAxYy0yLjAzOCwxLjA3LTQuNDYsMC44OTMtNi4zMjItMC40NThjLTEuODYxLTEuMzUzLTIuNzc1LTMuNjAyLTIuMzg4LTUuODcgICAgIGwyMS40Ny0xMjUuMTc3YzAuNDUtMi42MjItMC40Mi01LjI5Ny0yLjMyNC03LjE1NWwtOTAuOTQ2LTg4LjY0OWMtMS42NDgtMS42MDctMi4yMjktMy45NjYtMS41Mi02LjE1NSAgICAgYzAuNzEyLTIuMTg4LDIuNTY3LTMuNzUzLDQuODQ2LTQuMDgzbDEyNS42ODQtMTguMjYzYzIuNjMzLTAuMzgyLDQuOTEtMi4wMzYsNi4wODctNC40MjJsNTYuMjA5LTExMy44OTEgICAgIGMxLjAxOS0yLjA2MywzLjA4LTMuMzQ1LDUuMzgyLTMuMzQ1czQuMzY0LDEuMjgxLDUuMzgzLDMuMzQ1bDU2LjIwNywxMTMuODljMS4xNzgsMi4zODUsMy40NTMsNC4wMzksNi4wODgsNC40MjJsNDIuMzk1LDYuMTYgICAgIGM0LjQwNSwwLjY0MSw4LjUyLTIuNDE4LDkuMTYxLTYuODM3YzAuNjQzLTQuNDE4LTIuNDE4LTguNTIxLTYuODM3LTkuMTYybC0zOC4xOS01LjU0OWwtNTQuMzI2LTExMC4wNzcgICAgIGMtMy43NjEtNy42MjQtMTEuMzc5LTEyLjM1OS0xOS44OC0xMi4zNTljLTguNTAxLDAtMTYuMTE5LDQuNzM2LTE5Ljg3OSwxMi4zNThsLTU0LjMyOCwxMTAuMDc4TDUxLjE0OSwyNDEuNTcyICAgICBjLTguNDEyLDEuMjIyLTE1LjI3LDcuMDAzLTE3Ljg5NywxNS4wODljLTIuNjI2LDguMDg0LTAuNDc4LDE2Ljc5Miw1LjYxLDIyLjcyOGw4Ny45MDIsODUuNjgybC0yMC43NSwxMjAuOTg5ICAgICBjLTEuNDM4LDguMzc3LDEuOTQsMTYuNjg1LDguODE4LDIxLjY4M2MzLjg4OCwyLjgyMyw4LjQzNCw0LjI1OCwxMy4wMTEsNC4yNThjMy41MjMsMCw3LjA2NS0wLjg1LDEwLjMzNy0yLjU2OWwxMDguNjU0LTU3LjEyMiAgICAgbDEwOC42NTcsNTcuMTI0YzMuMTcsMS42NjMsNi43MzUsMi41NDMsMTAuMzEyLDIuNTQzYzQuNzE0LDAsOS4yMTktMS40NjQsMTMuMDM0LTQuMjM0YzYuODc2LTQuOTk4LDEwLjI1Ni0xMy4zMDcsOC44MTctMjEuNjgzICAgICBMMzY2LjkwNSwzNjUuMDcxeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNMzg5LjQyOCwyMDIuMzEzYzAuNzA2LTUuMTc5LDcuNzgtMTMuNTY1LDI5LjgxNi0xMi4xNjVjMS4zNTUsMC4wODYsMi42NTEsMC4xMjgsMy45MDEsMC4xMjggICAgIGMyNy42OTktMC4wMDIsMzAuMDU0LTIwLjYzOSwzMS42My0zNC40OThjMC44NzQtNy42NzcsMS42OTktMTQuOTI4LDUuMjc1LTIwLjA1M2MyLjU1My0zLjY2MiwxLjY1My04LjcwMS0yLjAwNy0xMS4yNTQgICAgIGMtMy42NjItMi41NTItOC43MDEtMS42NTUtMTEuMjU1LDIuMDA2Yy01LjkxNCw4LjQ4MS03LjA2MywxOC41Ny04LjA3NiwyNy40NzNjLTEuNzQ2LDE1LjM0My0yLjQxLDIxLjA4Ny0xOC40MzgsMjAuMDYzICAgICBjLTE3LjY2NC0xLjEyNy0zMC44NiwyLjY1Ni0zOS4yMzIsMTEuMjQyYy02Ljg1NCw3LjAyOS03LjY0NCwxNC43MjItNy43MTEsMTUuNTc2bDE2LjExNywxLjI3NSAgICAgQzM4OS40NDksMjAyLjEwNiwzODkuNDQ3LDIwMi4xNzksMzg5LjQyOCwyMDIuMzEzeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNMjg2Ljc3NSw5MS4xN2MwLjE2LTAuMDg2LDAuMjU0LTAuMTE5LDAuMjU0LTAuMTE5bDYuNTIxLDE0Ljc5NWM3LjkzNC0zLjQ5NiwxOS45NDUtMTcuMTkyLDguNjE3LTQzLjk5OSAgICAgYy00LjEzNS05Ljc4OS0yLjEyNS0xMS4xMzEsOS4yNS0xNi42MThjMTEuMTEtNS4zNjEsMjcuOTAyLTEzLjQ2MiwyMy40NzEtMzguNTUxYy0wLjc3NS00LjM5Ny00Ljk2Mi03LjMyNy05LjM2Ny02LjU1NSAgICAgYy00LjM5NywwLjc3Ny03LjMzLDQuOTcxLTYuNTU0LDkuMzY3YzIuMjA1LDEyLjQ4LTMuMTc3LDE1LjY3OC0xNC41NzYsMjEuMTc3Yy0xMC4yMzcsNC45MzktMjcuMzcsMTMuMjA1LTE3LjExNiwzNy40NzQgICAgIEMyOTMuNDU5LDgyLjc3OSwyODkuODcxLDg5LjUwNSwyODYuNzc1LDkxLjE3eiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNODAuMjY4LDg0Ljc0OWMxMi4zMTQsMi43OTYsMTQuNTc2LDMuNjUzLDEyLjc0LDE0LjEyYy01LjAyOCwyOC42NjUsOS43NSwzOS4zMTksMTguMjY2LDQwLjk0NiAgICAgYzAuNTEzLDAuMDk5LDEuMDIzLDAuMTQ2LDEuNTI3LDAuMTQ2YzMuODAyLDAsNy4xOS0yLjY5NSw3LjkzMS02LjU2N2MwLjgzOC00LjM4Ni0yLjAzNy04LjYyLTYuNDIzLTkuNDU4ICAgICBjLTAuMDg5LTAuMDE3LTguODI3LTIuNi01LjM3Ni0yMi4yNzNjNC41NDktMjUuOTUtMTQuMDAxLTMwLjE2My0yNS4wODUtMzIuNjhjLTEyLjM0MS0yLjgwMy0xOC4zMDMtNC43MTItMTguOTUzLTE3LjM2OSAgICAgYy0wLjIyOS00LjQ1OC00LjAwNi03Ljg5NC04LjQ4OC03LjY1OWMtNC40NTgsMC4yMjktNy44ODgsNC4wMjktNy42NTgsOC40ODhDNTAuMDU2LDc3Ljg4OCw2OC4yMzcsODIuMDE2LDgwLjI2OCw4NC43NDl6IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik0xMDUuMjM5LDE4MS4xMTNjMCw2LjEyMSwyLjM4MiwxMS44NzQsNi43MSwxNi4yMDFjNC4zMjgsNC4zMjgsMTAuMDgxLDYuNzExLDE2LjIwMSw2LjcxMSAgICAgYzYuMTIsMCwxMS44NzQtMi4zODMsMTYuMjAyLTYuNzFjNC4zMjgtNC4zMjgsNi43MTItMTAuMDgxLDYuNzEyLTE2LjIwMnMtMi4zODQtMTEuODc0LTYuNzExLTE2LjIwMiAgICAgYy00LjMyOS00LjMyOC0xMC4wODItNi43MTEtMTYuMjAzLTYuNzExcy0xMS44NzMsMi4zODMtMTYuMjAxLDYuNzExQzEwNy42MjEsMTY5LjIzOSwxMDUuMjM5LDE3NC45OTIsMTA1LjIzOSwxODEuMTEzeiAgICAgIE0xMjMuMzgyLDE3Ni4zNDJjMS4yNzMtMS4yNzMsMi45NjgtMS45NzUsNC43NjktMS45NzVjMS44MDIsMCwzLjQ5NSwwLjcwMiw0Ljc3LDEuOTc2YzEuMjc1LDEuMjc0LDEuOTc4LDIuOTY4LDEuOTc4LDQuNzcgICAgIHMtMC43MDIsMy40OTQtMS45NzYsNC43NjljLTEuMjc1LDEuMjc0LTIuOTY5LDEuOTc2LTQuNzcyLDEuOTc2Yy0xLjgsMC0zLjQ5NC0wLjcwMi00Ljc3LTEuOTc2ICAgICBjLTEuMjczLTEuMjczLTEuOTc1LTIuOTY3LTEuOTc1LTQuNzY5QzEyMS40MDUsMTc5LjMxMiwxMjIuMTA2LDE3Ny42MTgsMTIzLjM4MiwxNzYuMzQyeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNMzE1LjI4NSwxMjkuMTg5Yy04LjkzMyw4LjkzNC04LjkzMywyMy40NywwLjAwMSwzMi40MDRjNC4zMjgsNC4zMjgsMTAuMDgyLDYuNzEsMTYuMjAxLDYuNzEgICAgIGM2LjExOSwwLDExLjg3NC0yLjM4MiwxNi4yMDItNi43MWM4LjkzMy04LjkzNCw4LjkzMy0yMy40NywwLTMyLjQwM2MtNC4zMjctNC4zMjgtMTAuMDgzLTYuNzExLTE2LjIwMi02LjcxMSAgICAgQzMyNS4zNjgsMTIyLjQ3OSwzMTkuNjEzLDEyNC44NiwzMTUuMjg1LDEyOS4xODl6IE0zMzYuMjU0LDE1MC4xNmMtMS4yNzMsMS4yNzMtMi45NjcsMS45NzQtNC43NjksMS45NzQgICAgIGMtMS44MDIsMC0zLjQ5NS0wLjcwMS00Ljc3LTEuOTc0Yy0yLjYzLTIuNjMtMi42My02LjkxLTAuMDAxLTkuNTM5YzEuMjc0LTEuMjc0LDIuOTY4LTEuOTc1LDQuNzcxLTEuOTc1ICAgICBjMS44MDEsMCwzLjQ5NCwwLjcwMSw0Ljc2OSwxLjk3NEMzMzguODg0LDE0My4yNSwzMzguODg0LDE0Ny41MywzMzYuMjU0LDE1MC4xNnoiIGZpbGw9IiNGRkZGRkYiLz4KCQkJPHBhdGggZD0iTTc1LjY5NSwzMzYuOTI2Yy00LjMyOS00LjMyNi0xMC4wODItNi43MDktMTYuMjAyLTYuNzA5Yy02LjEyLDAtMTEuODczLDIuMzgzLTE2LjIwMSw2LjcxICAgICBjLTguOTM0LDguOTM1LTguOTM0LDIzLjQ3LDAsMzIuNDA0YzQuMzI3LDQuMzI4LDEwLjA4LDYuNzEyLDE2LjIwMSw2LjcxMnMxMS44NzQtMi4zODQsMTYuMjAzLTYuNzExICAgICBDODQuNjI5LDM2MC4zOTYsODQuNjI5LDM0NS44NjIsNzUuNjk1LDMzNi45MjZ6IE02NC4yNjIsMzU3Ljg5OGMtMS4yNzMsMS4yNzQtMi45NjcsMS45NzctNC43NywxLjk3NyAgICAgYy0xLjgsMC0zLjQ5NC0wLjcwMi00Ljc2OS0xLjk3N2MtMi42MzEtMi42MjktMi42MzEtNi45MDktMC4wMDEtOS41MzhjMS4yNzMtMS4yNzMsMi45NjctMS45NzUsNC43Ny0xLjk3NSAgICAgczMuNDk2LDAuNzAxLDQuNzcsMS45NzVDNjYuODkzLDM1MC45ODksNjYuODkzLDM1NS4yNjksNjQuMjYyLDM1Ny44OTh6IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik00NzMuMTUsMzM2LjkyNmMtNC4zMjktNC4zMjYtMTAuMDgyLTYuNzA5LTE2LjIwMS02LjcwOWMtNi4xMjEsMC0xMS44NzMsMi4zODMtMTYuMjAyLDYuNzEgICAgIGMtOC45MzMsOC45MzUtOC45MzMsMjMuNDcsMCwzMi40MDRjNC4zMjgsNC4zMjgsMTAuMDgxLDYuNzEyLDE2LjIwMiw2LjcxMmM2LjEyLDAsMTEuODczLTIuMzg0LDE2LjIwMi02LjcxMSAgICAgQzQ4Mi4wODQsMzYwLjM5Niw0ODIuMDg0LDM0NS44NjIsNDczLjE1LDMzNi45MjZ6IE00NjEuNzE5LDM1Ny44OThjLTEuMjc0LDEuMjc0LTIuOTY4LDEuOTc3LTQuNzcsMS45NzcgICAgIGMtMS44MDEsMC0zLjQ5NS0wLjcwMi00Ljc2OS0xLjk3N2MtMi42MzEtMi42MjktMi42MzEtNi45MDktMC4wMDItOS41MzhjMS4yNzQtMS4yNzMsMi45NjgtMS45NzUsNC43NzEtMS45NzUgICAgIGMxLjgwMSwwLDMuNDk2LDAuNzAxLDQuNzcsMS45NzVDNDY0LjM0OSwzNTAuOTg5LDQ2NC4zNDksMzU1LjI2OSw0NjEuNzE5LDM1Ny44OTh6IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik0xODYuODkyLDkzLjI0NWM2LjEyLDAsMTEuODczLTIuMzgzLDE2LjIwMS02LjcxMWM0LjMyNy00LjMyOCw2LjcxMS0xMC4wODIsNi43MTEtMTYuMjAyICAgICBjMC02LjEyMS0yLjM4NC0xMS44NzQtNi43MTEtMTYuMmMtNC4zMjgtNC4zMjktMTAuMDgxLTYuNzEyLTE2LjIwMS02LjcxMmMtNi4xMjIsMC0xMS44NzQsMi4zODMtMTYuMjAyLDYuNzExICAgICBjLTQuMzI4LDQuMzI3LTYuNzEyLDEwLjA4LTYuNzEyLDE2LjIwMXMyLjM4NCwxMS44NzQsNi43MTEsMTYuMjAyQzE3NS4wMTgsOTAuODYxLDE4MC43Nyw5My4yNDUsMTg2Ljg5Miw5My4yNDV6ICAgICAgTTE4Mi4xMjIsNjUuNTYyYzEuMjczLTEuMjc0LDIuOTY4LTEuOTc1LDQuNzcxLTEuOTc1YzEuOCwwLDMuNDkzLDAuNzAxLDQuNzY5LDEuOTc2YzEuMjczLDEuMjczLDEuOTc3LDIuOTY3LDEuOTc3LDQuNzY5ICAgICBjMCwxLjgwMi0wLjcwMywzLjQ5NS0xLjk3Nyw0Ljc3MWMtMS4yNzQsMS4yNzMtMi45NjgsMS45NzUtNC43NjksMS45NzVjLTEuODAyLDAtMy40OTYtMC43MDItNC43NzEtMS45NzYgICAgIGMtMS4yNzQtMS4yNzQtMS45NzYtMi45NjctMS45NzYtNC43N0MxODAuMTQ2LDY4LjUzMSwxODAuODQ4LDY2LjgzNiwxODIuMTIyLDY1LjU2MnoiIGZpbGw9IiNGRkZGRkYiLz4KCQkJPGNpcmNsZSBjeD0iNjQuNDA5IiBjeT0iMTYwLjIyIiByPSIxMC40OTYiIGZpbGw9IiNGRkZGRkYiLz4KCQkJPGNpcmNsZSBjeD0iNDExLjM5IiBjeT0iMzc0LjExNSIgcj0iMTAuNDk2IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxjaXJjbGUgY3g9IjczLjc1IiBjeT0iNDM5LjM0MyIgcj0iMTAuNDk3IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik0zODcuOTI5LDE0OC45NTFjMi4xMDcsMCw0LjIxMy0wLjgxOSw1Ljc5OS0yLjQ0OGwxMS4yMy0xMS41NTNjMy4xMTEtMy4yMDEsMy4wMzktOC4zMTktMC4xNjItMTEuNDMxICAgICBjLTMuMTk5LTMuMTEyLTguMzE4LTMuMDM5LTExLjQzMSwwLjE2MmwtMTEuMjMsMTEuNTUyYy0zLjExMSwzLjIwMS0zLjA0LDguMzE5LDAuMTYyLDExLjQzMSAgICAgQzM4My44NjgsMTQ4LjE5MiwzODUuODk5LDE0OC45NTEsMzg3LjkyOSwxNDguOTUxeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNMTQ4LjgyMiwxMzYuMTgybDE0LjkzNyw2LjA0YzAuOTkzLDAuNDAxLDIuMDIsMC41OTEsMy4wMjcsMC41OTFjMy4xOTcsMCw2LjIyNy0xLjkwOSw3LjQ5Ny01LjA1NiAgICAgYzEuNjc0LTQuMTM5LTAuMzI1LTguODUxLTQuNDY0LTEwLjUyNGwtMTQuOTM4LTYuMDRjLTQuMTQ2LTEuNjc2LTguODUxLDAuMzI2LTEwLjUyNCw0LjQ2NCAgICAgQzE0Mi42ODQsMTI5Ljc5NywxNDQuNjgzLDEzNC41MDgsMTQ4LjgyMiwxMzYuMTgyeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNOTYuMDMzLDM5Mi42NzNsLTE0LjkzOC02LjA0Yy00LjE0Ni0xLjY3NC04Ljg1MSwwLjMyNS0xMC41MjQsNC40NjRjLTEuNjczLDQuMTQsMC4zMjYsOC44NTIsNC40NjUsMTAuNTI0bDE0LjkzOCw2LjA0MSAgICAgYzAuOTkzLDAuNCwyLjAxOSwwLjU5MSwzLjAyNiwwLjU5MWMzLjE5NywwLDYuMjI3LTEuOTA4LDcuNDk3LTUuMDU2QzEwMi4xNzEsMzk5LjA1OSwxMDAuMTcyLDM5NC4zNDcsOTYuMDMzLDM5Mi42NzN6IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik00MzYuOTQ1LDQyMC4yODRsLTE0LjkzNy02LjA0Yy00LjE0Ni0xLjY3My04Ljg1MiwwLjMyNi0xMC41MjQsNC40NjVjLTEuNjc0LDQuMTQsMC4zMjUsOC44NTIsNC40NjQsMTAuNTI0bDE0LjkzOCw2LjA0ICAgICBjMC45OTMsMC40LDIuMDE5LDAuNTkyLDMuMDI3LDAuNTkyYzMuMTk2LDAsNi4yMjYtMS45MSw3LjQ5Ny01LjA1N0M0NDMuMDgzLDQyNi42NjksNDQxLjA4NSw0MjEuOTU3LDQzNi45NDUsNDIwLjI4NHoiIGZpbGw9IiNGRkZGRkYiLz4KCQk8L2c+Cgk8L2c+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==);url(data: image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA1MTIuMDAxIDUxMi4wMDEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMi4wMDEgNTEyLjAwMTsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiPgo8Zz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBkPSJNMzY2LjkwNSwzNjUuMDcxbDg3LjkwMi04NS42ODNjNi4wODctNS45MzUsOC4yMzYtMTQuNjQzLDUuNjEtMjIuNzI5Yy0yLjYyOS04LjA4NS05LjQ4Ni0xMy44NjYtMTcuODk4LTE1LjA4NyAgICAgbC01NS44NzktOC4xMmMtNC40MTMtMC42NDctOC41MjEsMi40MTktOS4xNjEsNi44MzdjLTAuNjQzLDQuNDE5LDIuNDE4LDguNTIxLDYuODM3LDkuMTYzbDU1Ljg3OSw4LjEyICAgICBjMi4yNzgsMC4zMyw0LjEzNSwxLjg5Niw0Ljg0Nyw0LjA4M2MwLjcxMSwyLjE5LDAuMTI5LDQuNTQ4LTEuNTE5LDYuMTU0bC05MC45NDcsODguNjVjLTEuOTA1LDEuODU4LTIuNzczLDQuNTMzLTIuMzIzLDcuMTU1ICAgICBsMjEuNDY5LDEyNS4xNzhjMC4zODksMi4yNjgtMC41MjcsNC41MTgtMi4zODcsNS44NjljLTEuODE2LDEuMzE4LTQuMzM5LDEuNTAyLTYuMzIyLDAuNDU5bC0xMTIuNDE0LTU5LjEwMSAgICAgYy0yLjM1NS0xLjIzNy01LjE2OS0xLjIzNy03LjUyNCwwbC0xMTIuNDE0LDU5LjEwMWMtMi4wMzgsMS4wNy00LjQ2LDAuODkzLTYuMzIyLTAuNDU4Yy0xLjg2MS0xLjM1My0yLjc3NS0zLjYwMi0yLjM4OC01Ljg3ICAgICBsMjEuNDctMTI1LjE3N2MwLjQ1LTIuNjIyLTAuNDItNS4yOTctMi4zMjQtNy4xNTVsLTkwLjk0Ni04OC42NDljLTEuNjQ4LTEuNjA3LTIuMjI5LTMuOTY2LTEuNTItNi4xNTUgICAgIGMwLjcxMi0yLjE4OCwyLjU2Ny0zLjc1Myw0Ljg0Ni00LjA4M2wxMjUuNjg0LTE4LjI2M2MyLjYzMy0wLjM4Miw0LjkxLTIuMDM2LDYuMDg3LTQuNDIybDU2LjIwOS0xMTMuODkxICAgICBjMS4wMTktMi4wNjMsMy4wOC0zLjM0NSw1LjM4Mi0zLjM0NXM0LjM2NCwxLjI4MSw1LjM4MywzLjM0NWw1Ni4yMDcsMTEzLjg5YzEuMTc4LDIuMzg1LDMuNDUzLDQuMDM5LDYuMDg4LDQuNDIybDQyLjM5NSw2LjE2ICAgICBjNC40MDUsMC42NDEsOC41Mi0yLjQxOCw5LjE2MS02LjgzN2MwLjY0My00LjQxOC0yLjQxOC04LjUyMS02LjgzNy05LjE2MmwtMzguMTktNS41NDlsLTU0LjMyNi0xMTAuMDc3ICAgICBjLTMuNzYxLTcuNjI0LTExLjM3OS0xMi4zNTktMTkuODgtMTIuMzU5Yy04LjUwMSwwLTE2LjExOSw0LjczNi0xOS44NzksMTIuMzU4bC01NC4zMjgsMTEwLjA3OEw1MS4xNDksMjQxLjU3MiAgICAgYy04LjQxMiwxLjIyMi0xNS4yNyw3LjAwMy0xNy44OTcsMTUuMDg5Yy0yLjYyNiw4LjA4NC0wLjQ3OCwxNi43OTIsNS42MSwyMi43MjhsODcuOTAyLDg1LjY4MmwtMjAuNzUsMTIwLjk4OSAgICAgYy0xLjQzOCw4LjM3NywxLjk0LDE2LjY4NSw4LjgxOCwyMS42ODNjMy44ODgsMi44MjMsOC40MzQsNC4yNTgsMTMuMDExLDQuMjU4YzMuNTIzLDAsNy4wNjUtMC44NSwxMC4zMzctMi41NjlsMTA4LjY1NC01Ny4xMjIgICAgIGwxMDguNjU3LDU3LjEyNGMzLjE3LDEuNjYzLDYuNzM1LDIuNTQzLDEwLjMxMiwyLjU0M2M0LjcxNCwwLDkuMjE5LTEuNDY0LDEzLjAzNC00LjIzNGM2Ljg3Ni00Ljk5OCwxMC4yNTYtMTMuMzA3LDguODE3LTIxLjY4MyAgICAgTDM2Ni45MDUsMzY1LjA3MXoiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTM4OS40MjgsMjAyLjMxM2MwLjcwNi01LjE3OSw3Ljc4LTEzLjU2NSwyOS44MTYtMTIuMTY1YzEuMzU1LDAuMDg2LDIuNjUxLDAuMTI4LDMuOTAxLDAuMTI4ICAgICBjMjcuNjk5LTAuMDAyLDMwLjA1NC0yMC42MzksMzEuNjMtMzQuNDk4YzAuODc0LTcuNjc3LDEuNjk5LTE0LjkyOCw1LjI3NS0yMC4wNTNjMi41NTMtMy42NjIsMS42NTMtOC43MDEtMi4wMDctMTEuMjU0ICAgICBjLTMuNjYyLTIuNTUyLTguNzAxLTEuNjU1LTExLjI1NSwyLjAwNmMtNS45MTQsOC40ODEtNy4wNjMsMTguNTctOC4wNzYsMjcuNDczYy0xLjc0NiwxNS4zNDMtMi40MSwyMS4wODctMTguNDM4LDIwLjA2MyAgICAgYy0xNy42NjQtMS4xMjctMzAuODYsMi42NTYtMzkuMjMyLDExLjI0MmMtNi44NTQsNy4wMjktNy42NDQsMTQuNzIyLTcuNzExLDE1LjU3NmwxNi4xMTcsMS4yNzUgICAgIEMzODkuNDQ5LDIwMi4xMDYsMzg5LjQ0NywyMDIuMTc5LDM4OS40MjgsMjAyLjMxM3oiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTI4Ni43NzUsOTEuMTdjMC4xNi0wLjA4NiwwLjI1NC0wLjExOSwwLjI1NC0wLjExOWw2LjUyMSwxNC43OTVjNy45MzQtMy40OTYsMTkuOTQ1LTE3LjE5Miw4LjYxNy00My45OTkgICAgIGMtNC4xMzUtOS43ODktMi4xMjUtMTEuMTMxLDkuMjUtMTYuNjE4YzExLjExLTUuMzYxLDI3LjkwMi0xMy40NjIsMjMuNDcxLTM4LjU1MWMtMC43NzUtNC4zOTctNC45NjItNy4zMjctOS4zNjctNi41NTUgICAgIGMtNC4zOTcsMC43NzctNy4zMyw0Ljk3MS02LjU1NCw5LjM2N2MyLjIwNSwxMi40OC0zLjE3NywxNS42NzgtMTQuNTc2LDIxLjE3N2MtMTAuMjM3LDQuOTM5LTI3LjM3LDEzLjIwNS0xNy4xMTYsMzcuNDc0ICAgICBDMjkzLjQ1OSw4Mi43NzksMjg5Ljg3MSw4OS41MDUsMjg2Ljc3NSw5MS4xN3oiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTgwLjI2OCw4NC43NDljMTIuMzE0LDIuNzk2LDE0LjU3NiwzLjY1MywxMi43NCwxNC4xMmMtNS4wMjgsMjguNjY1LDkuNzUsMzkuMzE5LDE4LjI2Niw0MC45NDYgICAgIGMwLjUxMywwLjA5OSwxLjAyMywwLjE0NiwxLjUyNywwLjE0NmMzLjgwMiwwLDcuMTktMi42OTUsNy45MzEtNi41NjdjMC44MzgtNC4zODYtMi4wMzctOC42Mi02LjQyMy05LjQ1OCAgICAgYy0wLjA4OS0wLjAxNy04LjgyNy0yLjYtNS4zNzYtMjIuMjczYzQuNTQ5LTI1Ljk1LTE0LjAwMS0zMC4xNjMtMjUuMDg1LTMyLjY4Yy0xMi4zNDEtMi44MDMtMTguMzAzLTQuNzEyLTE4Ljk1My0xNy4zNjkgICAgIGMtMC4yMjktNC40NTgtNC4wMDYtNy44OTQtOC40ODgtNy42NTljLTQuNDU4LDAuMjI5LTcuODg4LDQuMDI5LTcuNjU4LDguNDg4QzUwLjA1Niw3Ny44ODgsNjguMjM3LDgyLjAxNiw4MC4yNjgsODQuNzQ5eiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNMTA1LjIzOSwxODEuMTEzYzAsNi4xMjEsMi4zODIsMTEuODc0LDYuNzEsMTYuMjAxYzQuMzI4LDQuMzI4LDEwLjA4MSw2LjcxMSwxNi4yMDEsNi43MTEgICAgIGM2LjEyLDAsMTEuODc0LTIuMzgzLDE2LjIwMi02LjcxYzQuMzI4LTQuMzI4LDYuNzEyLTEwLjA4MSw2LjcxMi0xNi4yMDJzLTIuMzg0LTExLjg3NC02LjcxMS0xNi4yMDIgICAgIGMtNC4zMjktNC4zMjgtMTAuMDgyLTYuNzExLTE2LjIwMy02LjcxMXMtMTEuODczLDIuMzgzLTE2LjIwMSw2LjcxMUMxMDcuNjIxLDE2OS4yMzksMTA1LjIzOSwxNzQuOTkyLDEwNS4yMzksMTgxLjExM3ogICAgICBNMTIzLjM4MiwxNzYuMzQyYzEuMjczLTEuMjczLDIuOTY4LTEuOTc1LDQuNzY5LTEuOTc1YzEuODAyLDAsMy40OTUsMC43MDIsNC43NywxLjk3NmMxLjI3NSwxLjI3NCwxLjk3OCwyLjk2OCwxLjk3OCw0Ljc3ICAgICBzLTAuNzAyLDMuNDk0LTEuOTc2LDQuNzY5Yy0xLjI3NSwxLjI3NC0yLjk2OSwxLjk3Ni00Ljc3MiwxLjk3NmMtMS44LDAtMy40OTQtMC43MDItNC43Ny0xLjk3NiAgICAgYy0xLjI3My0xLjI3My0xLjk3NS0yLjk2Ny0xLjk3NS00Ljc2OUMxMjEuNDA1LDE3OS4zMTIsMTIyLjEwNiwxNzcuNjE4LDEyMy4zODIsMTc2LjM0MnoiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTMxNS4yODUsMTI5LjE4OWMtOC45MzMsOC45MzQtOC45MzMsMjMuNDcsMC4wMDEsMzIuNDA0YzQuMzI4LDQuMzI4LDEwLjA4Miw2LjcxLDE2LjIwMSw2LjcxICAgICBjNi4xMTksMCwxMS44NzQtMi4zODIsMTYuMjAyLTYuNzFjOC45MzMtOC45MzQsOC45MzMtMjMuNDcsMC0zMi40MDNjLTQuMzI3LTQuMzI4LTEwLjA4My02LjcxMS0xNi4yMDItNi43MTEgICAgIEMzMjUuMzY4LDEyMi40NzksMzE5LjYxMywxMjQuODYsMzE1LjI4NSwxMjkuMTg5eiBNMzM2LjI1NCwxNTAuMTZjLTEuMjczLDEuMjczLTIuOTY3LDEuOTc0LTQuNzY5LDEuOTc0ICAgICBjLTEuODAyLDAtMy40OTUtMC43MDEtNC43Ny0xLjk3NGMtMi42My0yLjYzLTIuNjMtNi45MS0wLjAwMS05LjUzOWMxLjI3NC0xLjI3NCwyLjk2OC0xLjk3NSw0Ljc3MS0xLjk3NSAgICAgYzEuODAxLDAsMy40OTQsMC43MDEsNC43NjksMS45NzRDMzM4Ljg4NCwxNDMuMjUsMzM4Ljg4NCwxNDcuNTMsMzM2LjI1NCwxNTAuMTZ6IiBmaWxsPSIjY2NjY2NjIi8+CgkJCTxwYXRoIGQ9Ik03NS42OTUsMzM2LjkyNmMtNC4zMjktNC4zMjYtMTAuMDgyLTYuNzA5LTE2LjIwMi02LjcwOWMtNi4xMiwwLTExLjg3MywyLjM4My0xNi4yMDEsNi43MSAgICAgYy04LjkzNCw4LjkzNS04LjkzNCwyMy40NywwLDMyLjQwNGM0LjMyNyw0LjMyOCwxMC4wOCw2LjcxMiwxNi4yMDEsNi43MTJzMTEuODc0LTIuMzg0LDE2LjIwMy02LjcxMSAgICAgQzg0LjYyOSwzNjAuMzk2LDg0LjYyOSwzNDUuODYyLDc1LjY5NSwzMzYuOTI2eiBNNjQuMjYyLDM1Ny44OThjLTEuMjczLDEuMjc0LTIuOTY3LDEuOTc3LTQuNzcsMS45NzcgICAgIGMtMS44LDAtMy40OTQtMC43MDItNC43NjktMS45NzdjLTIuNjMxLTIuNjI5LTIuNjMxLTYuOTA5LTAuMDAxLTkuNTM4YzEuMjczLTEuMjczLDIuOTY3LTEuOTc1LDQuNzctMS45NzUgICAgIHMzLjQ5NiwwLjcwMSw0Ljc3LDEuOTc1QzY2Ljg5MywzNTAuOTg5LDY2Ljg5MywzNTUuMjY5LDY0LjI2MiwzNTcuODk4eiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNNDczLjE1LDMzNi45MjZjLTQuMzI5LTQuMzI2LTEwLjA4Mi02LjcwOS0xNi4yMDEtNi43MDljLTYuMTIxLDAtMTEuODczLDIuMzgzLTE2LjIwMiw2LjcxICAgICBjLTguOTMzLDguOTM1LTguOTMzLDIzLjQ3LDAsMzIuNDA0YzQuMzI4LDQuMzI4LDEwLjA4MSw2LjcxMiwxNi4yMDIsNi43MTJjNi4xMiwwLDExLjg3My0yLjM4NCwxNi4yMDItNi43MTEgICAgIEM0ODIuMDg0LDM2MC4zOTYsNDgyLjA4NCwzNDUuODYyLDQ3My4xNSwzMzYuOTI2eiBNNDYxLjcxOSwzNTcuODk4Yy0xLjI3NCwxLjI3NC0yLjk2OCwxLjk3Ny00Ljc3LDEuOTc3ICAgICBjLTEuODAxLDAtMy40OTUtMC43MDItNC43NjktMS45NzdjLTIuNjMxLTIuNjI5LTIuNjMxLTYuOTA5LTAuMDAyLTkuNTM4YzEuMjc0LTEuMjczLDIuOTY4LTEuOTc1LDQuNzcxLTEuOTc1ICAgICBjMS44MDEsMCwzLjQ5NiwwLjcwMSw0Ljc3LDEuOTc1QzQ2NC4zNDksMzUwLjk4OSw0NjQuMzQ5LDM1NS4yNjksNDYxLjcxOSwzNTcuODk4eiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNMTg2Ljg5Miw5My4yNDVjNi4xMiwwLDExLjg3My0yLjM4MywxNi4yMDEtNi43MTFjNC4zMjctNC4zMjgsNi43MTEtMTAuMDgyLDYuNzExLTE2LjIwMiAgICAgYzAtNi4xMjEtMi4zODQtMTEuODc0LTYuNzExLTE2LjJjLTQuMzI4LTQuMzI5LTEwLjA4MS02LjcxMi0xNi4yMDEtNi43MTJjLTYuMTIyLDAtMTEuODc0LDIuMzgzLTE2LjIwMiw2LjcxMSAgICAgYy00LjMyOCw0LjMyNy02LjcxMiwxMC4wOC02LjcxMiwxNi4yMDFzMi4zODQsMTEuODc0LDYuNzExLDE2LjIwMkMxNzUuMDE4LDkwLjg2MSwxODAuNzcsOTMuMjQ1LDE4Ni44OTIsOTMuMjQ1eiAgICAgIE0xODIuMTIyLDY1LjU2MmMxLjI3My0xLjI3NCwyLjk2OC0xLjk3NSw0Ljc3MS0xLjk3NWMxLjgsMCwzLjQ5MywwLjcwMSw0Ljc2OSwxLjk3NmMxLjI3MywxLjI3MywxLjk3NywyLjk2NywxLjk3Nyw0Ljc2OSAgICAgYzAsMS44MDItMC43MDMsMy40OTUtMS45NzcsNC43NzFjLTEuMjc0LDEuMjczLTIuOTY4LDEuOTc1LTQuNzY5LDEuOTc1Yy0xLjgwMiwwLTMuNDk2LTAuNzAyLTQuNzcxLTEuOTc2ICAgICBjLTEuMjc0LTEuMjc0LTEuOTc2LTIuOTY3LTEuOTc2LTQuNzdDMTgwLjE0Niw2OC41MzEsMTgwLjg0OCw2Ni44MzYsMTgyLjEyMiw2NS41NjJ6IiBmaWxsPSIjY2NjY2NjIi8+CgkJCTxjaXJjbGUgY3g9IjY0LjQwOSIgY3k9IjE2MC4yMiIgcj0iMTAuNDk2IiBmaWxsPSIjY2NjY2NjIi8+CgkJCTxjaXJjbGUgY3g9IjQxMS4zOSIgY3k9IjM3NC4xMTUiIHI9IjEwLjQ5NiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8Y2lyY2xlIGN4PSI3My43NSIgY3k9IjQzOS4zNDMiIHI9IjEwLjQ5NyIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNMzg3LjkyOSwxNDguOTUxYzIuMTA3LDAsNC4yMTMtMC44MTksNS43OTktMi40NDhsMTEuMjMtMTEuNTUzYzMuMTExLTMuMjAxLDMuMDM5LTguMzE5LTAuMTYyLTExLjQzMSAgICAgYy0zLjE5OS0zLjExMi04LjMxOC0zLjAzOS0xMS40MzEsMC4xNjJsLTExLjIzLDExLjU1MmMtMy4xMTEsMy4yMDEtMy4wNCw4LjMxOSwwLjE2MiwxMS40MzEgICAgIEMzODMuODY4LDE0OC4xOTIsMzg1Ljg5OSwxNDguOTUxLDM4Ny45MjksMTQ4Ljk1MXoiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTE0OC44MjIsMTM2LjE4MmwxNC45MzcsNi4wNGMwLjk5MywwLjQwMSwyLjAyLDAuNTkxLDMuMDI3LDAuNTkxYzMuMTk3LDAsNi4yMjctMS45MDksNy40OTctNS4wNTYgICAgIGMxLjY3NC00LjEzOS0wLjMyNS04Ljg1MS00LjQ2NC0xMC41MjRsLTE0LjkzOC02LjA0Yy00LjE0Ni0xLjY3Ni04Ljg1MSwwLjMyNi0xMC41MjQsNC40NjQgICAgIEMxNDIuNjg0LDEyOS43OTcsMTQ0LjY4MywxMzQuNTA4LDE0OC44MjIsMTM2LjE4MnoiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTk2LjAzMywzOTIuNjczbC0xNC45MzgtNi4wNGMtNC4xNDYtMS42NzQtOC44NTEsMC4zMjUtMTAuNTI0LDQuNDY0Yy0xLjY3Myw0LjE0LDAuMzI2LDguODUyLDQuNDY1LDEwLjUyNGwxNC45MzgsNi4wNDEgICAgIGMwLjk5MywwLjQsMi4wMTksMC41OTEsMy4wMjYsMC41OTFjMy4xOTcsMCw2LjIyNy0xLjkwOCw3LjQ5Ny01LjA1NkMxMDIuMTcxLDM5OS4wNTksMTAwLjE3MiwzOTQuMzQ3LDk2LjAzMywzOTIuNjczeiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNNDM2Ljk0NSw0MjAuMjg0bC0xNC45MzctNi4wNGMtNC4xNDYtMS42NzMtOC44NTIsMC4zMjYtMTAuNTI0LDQuNDY1Yy0xLjY3NCw0LjE0LDAuMzI1LDguODUyLDQuNDY0LDEwLjUyNGwxNC45MzgsNi4wNCAgICAgYzAuOTkzLDAuNCwyLjAxOSwwLjU5MiwzLjAyNywwLjU5MmMzLjE5NiwwLDYuMjI2LTEuOTEsNy40OTctNS4wNTdDNDQzLjA4Myw0MjYuNjY5LDQ0MS4wODUsNDIxLjk1Nyw0MzYuOTQ1LDQyMC4yODR6IiBmaWxsPSIjY2NjY2NjIi8+CgkJPC9nPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=);background-size: 34px;background-repeat: no-repeat;text-align: right;background-position: 16px 17px;
197
- }
198
- .amp-update-notice-review-box a{
199
- color: #fff;
200
- text-decoration: none;
201
- font-size: 16px;
202
- line-height: 23px; font-weight: 300;
203
- }
204
- .amp-update-notice-review-box span{
205
- font-size: 11px;text-transform: uppercase;
206
- }
207
- li.first{
208
- position: relative;
209
- }
210
- .active.valid:before{
211
- content: "✓";
212
- display: inline-block;
213
- position: absolute;
214
- color: #fff;
215
- left: 20px;
216
- background: green;
217
- top: 15px;
218
- padding: 4px 7px;
219
- border-radius: 100%;
220
- }
221
- .not-active.invalid:before{
222
- content: "X";
223
- display: inline-block;
224
- position: absolute;
225
- color: #fff;
226
- left: 20px;
227
- background: #f32a56;
228
- top: 15px;
229
- padding: 4px 7px;
230
- border-radius: 100%;
231
- }
232
-
233
-
234
-
235
-
236
-
237
-
238
- .a-f-wp-help-message {
239
- width: 0em;
240
- position: fixed;
241
- right:0; z-index: 99999;
242
- border: 0;
243
- -webkit-transform: translateX(-50%);
244
- -moz-transform: translateX(-50%);
245
- -ms-transform: translateX(-50%);
246
- -o-transform: translateX(-50%);
247
- transform: translateX(-50%);
248
- padding: 0;
249
- color: #333;
250
- opacity: 0;
251
- -webkit-transition: 0.5s;
252
- -moz-transition: 0.5s;
253
- transition: 0.5s;
254
- bottom: 85px;
255
- }
256
- .a-f-wp-help-message img{
257
- width: 250px;
258
- }
259
-
260
- .a-f-wp-help-message:focus {
261
- outline: none;
262
- }
263
- .a-f-wp-help-message.active {
264
- opacity: 1;
265
- -webkit-transition: 1s;
266
- -moz-transition: 1s;
267
- transition: 1s;
268
- width: 170px;
269
- }
270
-
271
- .a-f-wp-help-container {
272
- display: flex;
273
- align-items: center;
274
- justify-content: center;
275
- position: fixed;
276
- z-index: 9999;
277
- bottom: 0px;
278
- right: 0pc;
279
- }
280
- .dashicons-sos:before, .dashicons-no-alt{
281
- font-family: dashicons;
282
- font-style: normal;
283
- }
284
- .a-f-wp-help-container .a-f-wp-help-tear {
285
- width: 4em;
286
- height: 4em;
287
- right: 26px;
288
- bottom: 27px;
289
- border-radius: 0 50% 50% 50%;
290
- border-radius: 50%;
291
- cursor: pointer;
292
- transform: rotate(0deg);
293
- -webkit-transition: 0.5s;
294
- -moz-transition: 0.5s;
295
- transition: 0.5s;
296
- background: dodgerblue;
297
- box-shadow: 4px 4px 10px #b3b3b3;
298
- position: relative;
299
- }
300
- .a-f-wp-help-container .a-f-wp-help-tear.active {
301
- border-radius: 0 50% 50% 50%;
302
- transform: rotate(45deg);
303
- background: black;
304
- }
305
- .a-f-wp-help-container .a-f-wp-help-tear.active span {
306
- position: absolute;
307
- left: 12px;
308
- top: 17px;
309
- font-size: 2em;
310
- color: white;
311
- -webkit-transform: rotate(45deg);
312
- -moz-transform: rotate(45deg);
313
- -ms-transform: rotate(45deg);
314
- -o-transform: rotate(45deg);
315
- transform: rotate(45deg);
316
- }
317
- .a-f-wp-help-container .a-f-wp-help-tear.green {
318
- background: green;
319
- transform: rotate(0deg);
320
- border-radius: 5px;
321
- }
322
- .a-f-wp-help-container span {
323
- position: absolute;
324
- left: 26px;
325
- top: 28px;
326
- -webkit-transform: translateX(-50%) translateY(-50%);
327
- -moz-transform: translateX(-50%) translateY(-50%);
328
- -ms-transform: translateX(-50%) translateY(-50%);
329
- -o-transform: translateX(-50%) translateY(-50%);
330
- transform: translateX(-50%) translateY(-50%);
331
- font-size: 2em;
332
- color: white;
333
- }
1
+ /*Bolt Icon*/
2
+ .ampforwp-blurb-add:hover{
3
+ cursor: pointer;
4
+ }
5
+ .ampforwp-blurb-add.button {
6
+ margin-bottom: 10px;
7
+ }
8
+ .ampforwp-blurb-additional .preview-image {
9
+ max-width:100%;
10
+ width : 70px;
11
+ height : 70px;
12
+ }
13
+ #toplevel_page_amp_options a .wp-menu-image:before{display: none}
14
+
15
+ body #toplevel_page_amp_options .wp-menu-image{
16
+ background-image:
17
+ url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjMxNHB4IiBoZWlnaHQ9IjMxNXB4IiB2aWV3Qm94PSIwIDAgMzE0IDMxNSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDEgKDM1MzI2KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSIyNjA3MSIgZmlsbD0iI0ZGNEM0QyI+CiAgICAgICAgICAgIDxnIGlkPSJDYXBhXzEiPgogICAgICAgICAgICAgICAgPGcgaWQ9Il94MzJfNDAuX1Bvd2VyIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTU3LjAwNywwIEM3MC4yOTIsMCAwLDcwLjI5MiAwLDE1Ny4wMDcgQzAsMjQzLjcxNSA3MC4yOTIsMzE0LjAxNCAxNTcuMDA3LDMxNC4wMTQgQzI0My43MTYsMzE0LjAxNCAzMTQuMDE0LDI0My43MTUgMzE0LjAxNCwxNTcuMDA3IEMzMTQuMDE0LDcwLjI5MiAyNDMuNzE2LDAgMTU3LjAwNywwIFogTTE1Ny4wMDcsMjgyLjYxMiBDODcuNjM0LDI4Mi42MTIgMzEuNDAyLDIyNi4zNzIgMzEuNDAyLDE1Ny4wMDcgQzMxLjQwMiw4Ny42MzQgODcuNjM0LDMxLjQwMiAxNTcuMDA3LDMxLjQwMiBDMjI2LjM3MSwzMS40MDIgMjgyLjYxMSw4Ny42MzQgMjgyLjYxMSwxNTcuMDA3IEMyODIuNjEyLDIyNi4zNzIgMjI2LjM3MiwyODIuNjEyIDE1Ny4wMDcsMjgyLjYxMiBaIE0yMDQuMTExLDE0MS4zNjggTDE2My40NzksMTQxLjUzMyBDMTU5LjEzOSwxNDEuNTUzIDE1Ny41NDQsMTM4LjYyMyAxNTkuOTA1LDEzNC45NzkgTDIwMy4zOTcsNjguMTA5IEMyMDguMTI2LDYwLjg0MSAyMDYuOTg0LDU5LjkyMiAyMDAuODYxLDY2LjA1MyBMMTA1LjMwNSwxNjEuNiBDOTkuMTcyLDE2Ny43MzIgMTAxLjIzMiwxNzIuNjc2IDEwOS45MDYsMTcyLjY0MSBMMTQyLjY3OSwxNzIuNTA4IEMxNTEuMzQ3LDE3Mi40NzIgMTU0LjU1MiwxNzguMzM1IDE0OS44MjQsMTg1LjYwNSBMMTA2LjMzNCwyNTIuNDc3IEMxMDMuOTcyLDI1Ni4xMTIgMTA0LjU0MiwyNTYuNTgxIDEwNy42MiwyNTMuNTI3IEwxNzUuOTE1LDE4NS43MTcgQzE3OC45ODgsMTgyLjY1OSAxODMuOTUsMTc3LjY4NiAxODYuOTgzLDE3NC41OTYgTDIwOC43ODgsMTUyLjQ4NSBDMjE0Ljg3NSwxNDYuMzE3IDIxMi43NzUsMTQxLjMzIDIwNC4xMTEsMTQxLjM2OCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) !important;
18
+ background-repeat: no-repeat;
19
+ background-position: center;
20
+ -webkit-background-size: 20px auto;
21
+ background-size: 20px auto;
22
+ }
23
+ .amp_content_builder .redux-group-tab-link-a span:after {
24
+ /* content: "NEW";*/
25
+ color: #fff;
26
+ font-size: 10px;
27
+ background: #4452a7;
28
+ padding: 4px 7px;
29
+ border-radius: 30px;
30
+ font-weight: normal;
31
+ position: relative;
32
+ top: -1px;
33
+ left: 5px;
34
+ }
35
+ .redux-container #redux-header .display_header h2{
36
+ background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjMxNHB4IiBoZWlnaHQ9IjMxNXB4IiB2aWV3Qm94PSIwIDAgMzE0IDMxNSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDEgKDM1MzI2KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSIyNjA3MSIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgIDxnIGlkPSJDYXBhXzEiPgogICAgICAgICAgICAgICAgPGcgaWQ9Il94MzJfNDAuX1Bvd2VyIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTU3LjAwNywwIEM3MC4yOTIsMCAwLDcwLjI5MiAwLDE1Ny4wMDcgQzAsMjQzLjcxNSA3MC4yOTIsMzE0LjAxNCAxNTcuMDA3LDMxNC4wMTQgQzI0My43MTYsMzE0LjAxNCAzMTQuMDE0LDI0My43MTUgMzE0LjAxNCwxNTcuMDA3IEMzMTQuMDE0LDcwLjI5MiAyNDMuNzE2LDAgMTU3LjAwNywwIFogTTE1Ny4wMDcsMjgyLjYxMiBDODcuNjM0LDI4Mi42MTIgMzEuNDAyLDIyNi4zNzIgMzEuNDAyLDE1Ny4wMDcgQzMxLjQwMiw4Ny42MzQgODcuNjM0LDMxLjQwMiAxNTcuMDA3LDMxLjQwMiBDMjI2LjM3MSwzMS40MDIgMjgyLjYxMSw4Ny42MzQgMjgyLjYxMSwxNTcuMDA3IEMyODIuNjEyLDIyNi4zNzIgMjI2LjM3MiwyODIuNjEyIDE1Ny4wMDcsMjgyLjYxMiBaIE0yMDQuMTExLDE0MS4zNjggTDE2My40NzksMTQxLjUzMyBDMTU5LjEzOSwxNDEuNTUzIDE1Ny41NDQsMTM4LjYyMyAxNTkuOTA1LDEzNC45NzkgTDIwMy4zOTcsNjguMTA5IEMyMDguMTI2LDYwLjg0MSAyMDYuOTg0LDU5LjkyMiAyMDAuODYxLDY2LjA1MyBMMTA1LjMwNSwxNjEuNiBDOTkuMTcyLDE2Ny43MzIgMTAxLjIzMiwxNzIuNjc2IDEwOS45MDYsMTcyLjY0MSBMMTQyLjY3OSwxNzIuNTA4IEMxNTEuMzQ3LDE3Mi40NzIgMTU0LjU1MiwxNzguMzM1IDE0OS44MjQsMTg1LjYwNSBMMTA2LjMzNCwyNTIuNDc3IEMxMDMuOTcyLDI1Ni4xMTIgMTA0LjU0MiwyNTYuNTgxIDEwNy42MiwyNTMuNTI3IEwxNzUuOTE1LDE4NS43MTcgQzE3OC45ODgsMTgyLjY1OSAxODMuOTUsMTc3LjY4NiAxODYuOTgzLDE3NC41OTYgTDIwOC43ODgsMTUyLjQ4NSBDMjE0Ljg3NSwxNDYuMzE3IDIxMi43NzUsMTQxLjMzIDIwNC4xMTEsMTQxLjM2OCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+") !important;
37
+ background-size: 18px;
38
+ background-repeat: no-repeat;
39
+ padding-left: 26px;
40
+ background-position: 0px 0;
41
+ }
42
+ .amp-update-notice .notice-dismiss{
43
+ display: none
44
+ }
45
+
46
+ /* Mobile preview button and preview Iframe Styling #1082 */
47
+ .col-sm-12 {
48
+ width: 100%;
49
+ }
50
+ .margin-top-bottom {
51
+ margin-top: 9px;
52
+ margin-bottom: 10px;
53
+ }
54
+ .text-center {
55
+ text-align: center;
56
+ }
57
+ #ampforwp-preview-format {
58
+ margin-bottom: 0px;
59
+ line-height: 0.5em;
60
+ }
61
+ .ampforwp-preview-phone-frame-wrapper {
62
+ width:110%;
63
+ display:inline-block;
64
+ position: relative;
65
+ max-width: 300px;
66
+ text-align: center;
67
+ margin-left: -12px;
68
+ }
69
+ .ampforwp-preview-phone-frame-wrapper:after {
70
+ padding-top: 180%;
71
+ display:block;
72
+ content: '';
73
+ }
74
+ .ampforwp-preview-phone-frame {
75
+ position: absolute;
76
+ top: 0;
77
+ bottom: 0;
78
+ right: 0;
79
+ left: 0;
80
+ border: 1px solid #e5e5e5;
81
+ border-radius: 40px;
82
+ padding-top:50px;
83
+ padding-bottom: 35px;
84
+ background: #f1f1f1;
85
+
86
+ }
87
+ .ampforwp-preview-container {
88
+ height: 100%;
89
+ position: relative;
90
+ width: 100%;
91
+ border: 1px solid #e5e5e5;
92
+ overflow: hidden;
93
+ }
94
+ .ampforwp-preview-container > iframe {
95
+ height: 100%;
96
+ width: 100%;
97
+ transform: scale(1, 1);
98
+ transform-origin: top left;
99
+ }
100
+ #TB_window #TB_ajaxContent{
101
+ width: 100%;
102
+ height: 100%;
103
+ }
104
+ .ampforwp-preview-button-container{
105
+ float: right;
106
+ margin-top: 0px;
107
+ }
108
+ .meta-radio-two{margin-right: 8px; top: 3px; position: relative;}
109
+ #wp-admin-bar-ampforwp-view-amp a, #wp-admin-bar-ampforwp-view-amp:hover a{
110
+ background-size: 18px !important;background-repeat: no-repeat !important;background-position: 4px 7px !important;text-indent: -99999px;width: 12px; background:
111
+ url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjMxNHB4IiBoZWlnaHQ9IjMxNXB4IiB2aWV3Qm94PSIwIDAgMzE0IDMxNSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDEgKDM1MzI2KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSIjODI4NzhjIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSIyNjA3MSIgZmlsbD0iIzgyODc4YyI+CiAgICAgICAgICAgIDxnIGlkPSJDYXBhXzEiPgogICAgICAgICAgICAgICAgPGcgaWQ9Il94MzJfNDAuX1Bvd2VyIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTU3LjAwNywwIEM3MC4yOTIsMCAwLDcwLjI5MiAwLDE1Ny4wMDcgQzAsMjQzLjcxNSA3MC4yOTIsMzE0LjAxNCAxNTcuMDA3LDMxNC4wMTQgQzI0My43MTYsMzE0LjAxNCAzMTQuMDE0LDI0My43MTUgMzE0LjAxNCwxNTcuMDA3IEMzMTQuMDE0LDcwLjI5MiAyNDMuNzE2LDAgMTU3LjAwNywwIFogTTE1Ny4wMDcsMjgyLjYxMiBDODcuNjM0LDI4Mi42MTIgMzEuNDAyLDIyNi4zNzIgMzEuNDAyLDE1Ny4wMDcgQzMxLjQwMiw4Ny42MzQgODcuNjM0LDMxLjQwMiAxNTcuMDA3LDMxLjQwMiBDMjI2LjM3MSwzMS40MDIgMjgyLjYxMSw4Ny42MzQgMjgyLjYxMSwxNTcuMDA3IEMyODIuNjEyLDIyNi4zNzIgMjI2LjM3MiwyODIuNjEyIDE1Ny4wMDcsMjgyLjYxMiBaIE0yMDQuMTExLDE0MS4zNjggTDE2My40NzksMTQxLjUzMyBDMTU5LjEzOSwxNDEuNTUzIDE1Ny41NDQsMTM4LjYyMyAxNTkuOTA1LDEzNC45NzkgTDIwMy4zOTcsNjguMTA5IEMyMDguMTI2LDYwLjg0MSAyMDYuOTg0LDU5LjkyMiAyMDAuODYxLDY2LjA1MyBMMTA1LjMwNSwxNjEuNiBDOTkuMTcyLDE2Ny43MzIgMTAxLjIzMiwxNzIuNjc2IDEwOS45MDYsMTcyLjY0MSBMMTQyLjY3OSwxNzIuNTA4IEMxNTEuMzQ3LDE3Mi40NzIgMTU0LjU1MiwxNzguMzM1IDE0OS44MjQsMTg1LjYwNSBMMTA2LjMzNCwyNTIuNDc3IEMxMDMuOTcyLDI1Ni4xMTIgMTA0LjU0MiwyNTYuNTgxIDEwNy42MiwyNTMuNTI3IEwxNzUuOTE1LDE4NS43MTcgQzE3OC45ODgsMTgyLjY1OSAxODMuOTUsMTc3LjY4NiAxODYuOTgzLDE3NC41OTYgTDIwOC43ODgsMTUyLjQ4NSBDMjE0Ljg3NSwxNDYuMzE3IDIxMi43NzUsMTQxLjMzIDIwNC4xMTEsMTQxLjM2OCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+)
112
+ no-repeat
113
+ 4px 7px;
114
+
115
+ }
116
+ .amp-theme-selector-img a{
117
+ background: rgba(0, 0, 0, 0.7);
118
+ text-decoration: none;
119
+ padding: 3px 8px 4px 7px;
120
+ bottom: 16px;
121
+ font-size: 12px;
122
+ border-radius: 100px;
123
+ color: #fff;
124
+ position: relative;
125
+ right: 62px;
126
+ }
127
+ .amp-theme-selector-img:hover a {
128
+ background: #4452a7;
129
+ }
130
+ .amp-theme-selector-img img{
131
+ position: relative;
132
+ visibility: visible;
133
+ cursor:pointer;
134
+ }
135
+ .hidetab{
136
+ display: none !important;
137
+ }
138
+ .activetab{
139
+ display: block !important;
140
+ }
141
+ #wpbody-content .wrap .amp-update-notice{
142
+ display: table;
143
+ position: relative;
144
+ height: 70px;
145
+ padding: 0;
146
+ border: 0;
147
+ overflow: hidden;
148
+ margin-bottom: 10px;
149
+ }
150
+ .amp-update-notice-text-box{
151
+ padding: 15px 15px 10px 15px;
152
+ display: inline-block;
153
+ }
154
+
155
+ .amp-update-notice-text-box img{
156
+ width: 40px;
157
+ display: inline;
158
+ height: 40px;
159
+ }
160
+ .amp-update-notice-text{
161
+ display: inline;
162
+ position: relative;
163
+ margin-left: 5px;
164
+ font-weight: 300;
165
+ top: -14px;
166
+ font-size: 20px;
167
+ }
168
+ .amp-update-notice-text-box a{
169
+ position: relative;
170
+ top: -17px;
171
+ background: #ECEFF1;
172
+ text-decoration: none;
173
+ color: #111;
174
+ font-size: 10px;
175
+ padding: 4px 6px 5px 5px;
176
+ border-radius: 4px;
177
+ margin-left: 5px;
178
+ text-transform: uppercase;
179
+ border: 1px solid rgba(207, 216, 220, 0.9);
180
+ }
181
+ .amp-update-notice-dismiss{
182
+ display:inline-block;float:right;height: 70px;background: #333;width: 50px;text-align: center;
183
+ }
184
+ .amp-update-notice-dismiss a{
185
+ color: #fff;
186
+ text-decoration: none;
187
+ top: 26px;
188
+ position: relative;
189
+ padding: 24px 18px;
190
+ font-size: 17px;
191
+ font-weight: 300;
192
+ background: #333;
193
+ z-index: 100;
194
+ }
195
+ .amp-update-notice-review-box{
196
+ float: right;display: inline-block;/* height: 55px; */background: #4CAF50;padding: 12px 20px 11px 60px;background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA1MTIuMDAxIDUxMi4wMDEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMi4wMDEgNTEyLjAwMTsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxMjhweCIgaGVpZ2h0PSIxMjhweCI+CjxnPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGQ9Ik0zNjYuOTA1LDM2NS4wNzFsODcuOTAyLTg1LjY4M2M2LjA4Ny01LjkzNSw4LjIzNi0xNC42NDMsNS42MS0yMi43MjljLTIuNjI5LTguMDg1LTkuNDg2LTEzLjg2Ni0xNy44OTgtMTUuMDg3ICAgICBsLTU1Ljg3OS04LjEyYy00LjQxMy0wLjY0Ny04LjUyMSwyLjQxOS05LjE2MSw2LjgzN2MtMC42NDMsNC40MTksMi40MTgsOC41MjEsNi44MzcsOS4xNjNsNTUuODc5LDguMTIgICAgIGMyLjI3OCwwLjMzLDQuMTM1LDEuODk2LDQuODQ3LDQuMDgzYzAuNzExLDIuMTksMC4xMjksNC41NDgtMS41MTksNi4xNTRsLTkwLjk0Nyw4OC42NWMtMS45MDUsMS44NTgtMi43NzMsNC41MzMtMi4zMjMsNy4xNTUgICAgIGwyMS40NjksMTI1LjE3OGMwLjM4OSwyLjI2OC0wLjUyNyw0LjUxOC0yLjM4Nyw1Ljg2OWMtMS44MTYsMS4zMTgtNC4zMzksMS41MDItNi4zMjIsMC40NTlsLTExMi40MTQtNTkuMTAxICAgICBjLTIuMzU1LTEuMjM3LTUuMTY5LTEuMjM3LTcuNTI0LDBsLTExMi40MTQsNTkuMTAxYy0yLjAzOCwxLjA3LTQuNDYsMC44OTMtNi4zMjItMC40NThjLTEuODYxLTEuMzUzLTIuNzc1LTMuNjAyLTIuMzg4LTUuODcgICAgIGwyMS40Ny0xMjUuMTc3YzAuNDUtMi42MjItMC40Mi01LjI5Ny0yLjMyNC03LjE1NWwtOTAuOTQ2LTg4LjY0OWMtMS42NDgtMS42MDctMi4yMjktMy45NjYtMS41Mi02LjE1NSAgICAgYzAuNzEyLTIuMTg4LDIuNTY3LTMuNzUzLDQuODQ2LTQuMDgzbDEyNS42ODQtMTguMjYzYzIuNjMzLTAuMzgyLDQuOTEtMi4wMzYsNi4wODctNC40MjJsNTYuMjA5LTExMy44OTEgICAgIGMxLjAxOS0yLjA2MywzLjA4LTMuMzQ1LDUuMzgyLTMuMzQ1czQuMzY0LDEuMjgxLDUuMzgzLDMuMzQ1bDU2LjIwNywxMTMuODljMS4xNzgsMi4zODUsMy40NTMsNC4wMzksNi4wODgsNC40MjJsNDIuMzk1LDYuMTYgICAgIGM0LjQwNSwwLjY0MSw4LjUyLTIuNDE4LDkuMTYxLTYuODM3YzAuNjQzLTQuNDE4LTIuNDE4LTguNTIxLTYuODM3LTkuMTYybC0zOC4xOS01LjU0OWwtNTQuMzI2LTExMC4wNzcgICAgIGMtMy43NjEtNy42MjQtMTEuMzc5LTEyLjM1OS0xOS44OC0xMi4zNTljLTguNTAxLDAtMTYuMTE5LDQuNzM2LTE5Ljg3OSwxMi4zNThsLTU0LjMyOCwxMTAuMDc4TDUxLjE0OSwyNDEuNTcyICAgICBjLTguNDEyLDEuMjIyLTE1LjI3LDcuMDAzLTE3Ljg5NywxNS4wODljLTIuNjI2LDguMDg0LTAuNDc4LDE2Ljc5Miw1LjYxLDIyLjcyOGw4Ny45MDIsODUuNjgybC0yMC43NSwxMjAuOTg5ICAgICBjLTEuNDM4LDguMzc3LDEuOTQsMTYuNjg1LDguODE4LDIxLjY4M2MzLjg4OCwyLjgyMyw4LjQzNCw0LjI1OCwxMy4wMTEsNC4yNThjMy41MjMsMCw3LjA2NS0wLjg1LDEwLjMzNy0yLjU2OWwxMDguNjU0LTU3LjEyMiAgICAgbDEwOC42NTcsNTcuMTI0YzMuMTcsMS42NjMsNi43MzUsMi41NDMsMTAuMzEyLDIuNTQzYzQuNzE0LDAsOS4yMTktMS40NjQsMTMuMDM0LTQuMjM0YzYuODc2LTQuOTk4LDEwLjI1Ni0xMy4zMDcsOC44MTctMjEuNjgzICAgICBMMzY2LjkwNSwzNjUuMDcxeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNMzg5LjQyOCwyMDIuMzEzYzAuNzA2LTUuMTc5LDcuNzgtMTMuNTY1LDI5LjgxNi0xMi4xNjVjMS4zNTUsMC4wODYsMi42NTEsMC4xMjgsMy45MDEsMC4xMjggICAgIGMyNy42OTktMC4wMDIsMzAuMDU0LTIwLjYzOSwzMS42My0zNC40OThjMC44NzQtNy42NzcsMS42OTktMTQuOTI4LDUuMjc1LTIwLjA1M2MyLjU1My0zLjY2MiwxLjY1My04LjcwMS0yLjAwNy0xMS4yNTQgICAgIGMtMy42NjItMi41NTItOC43MDEtMS42NTUtMTEuMjU1LDIuMDA2Yy01LjkxNCw4LjQ4MS03LjA2MywxOC41Ny04LjA3NiwyNy40NzNjLTEuNzQ2LDE1LjM0My0yLjQxLDIxLjA4Ny0xOC40MzgsMjAuMDYzICAgICBjLTE3LjY2NC0xLjEyNy0zMC44NiwyLjY1Ni0zOS4yMzIsMTEuMjQyYy02Ljg1NCw3LjAyOS03LjY0NCwxNC43MjItNy43MTEsMTUuNTc2bDE2LjExNywxLjI3NSAgICAgQzM4OS40NDksMjAyLjEwNiwzODkuNDQ3LDIwMi4xNzksMzg5LjQyOCwyMDIuMzEzeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNMjg2Ljc3NSw5MS4xN2MwLjE2LTAuMDg2LDAuMjU0LTAuMTE5LDAuMjU0LTAuMTE5bDYuNTIxLDE0Ljc5NWM3LjkzNC0zLjQ5NiwxOS45NDUtMTcuMTkyLDguNjE3LTQzLjk5OSAgICAgYy00LjEzNS05Ljc4OS0yLjEyNS0xMS4xMzEsOS4yNS0xNi42MThjMTEuMTEtNS4zNjEsMjcuOTAyLTEzLjQ2MiwyMy40NzEtMzguNTUxYy0wLjc3NS00LjM5Ny00Ljk2Mi03LjMyNy05LjM2Ny02LjU1NSAgICAgYy00LjM5NywwLjc3Ny03LjMzLDQuOTcxLTYuNTU0LDkuMzY3YzIuMjA1LDEyLjQ4LTMuMTc3LDE1LjY3OC0xNC41NzYsMjEuMTc3Yy0xMC4yMzcsNC45MzktMjcuMzcsMTMuMjA1LTE3LjExNiwzNy40NzQgICAgIEMyOTMuNDU5LDgyLjc3OSwyODkuODcxLDg5LjUwNSwyODYuNzc1LDkxLjE3eiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNODAuMjY4LDg0Ljc0OWMxMi4zMTQsMi43OTYsMTQuNTc2LDMuNjUzLDEyLjc0LDE0LjEyYy01LjAyOCwyOC42NjUsOS43NSwzOS4zMTksMTguMjY2LDQwLjk0NiAgICAgYzAuNTEzLDAuMDk5LDEuMDIzLDAuMTQ2LDEuNTI3LDAuMTQ2YzMuODAyLDAsNy4xOS0yLjY5NSw3LjkzMS02LjU2N2MwLjgzOC00LjM4Ni0yLjAzNy04LjYyLTYuNDIzLTkuNDU4ICAgICBjLTAuMDg5LTAuMDE3LTguODI3LTIuNi01LjM3Ni0yMi4yNzNjNC41NDktMjUuOTUtMTQuMDAxLTMwLjE2My0yNS4wODUtMzIuNjhjLTEyLjM0MS0yLjgwMy0xOC4zMDMtNC43MTItMTguOTUzLTE3LjM2OSAgICAgYy0wLjIyOS00LjQ1OC00LjAwNi03Ljg5NC04LjQ4OC03LjY1OWMtNC40NTgsMC4yMjktNy44ODgsNC4wMjktNy42NTgsOC40ODhDNTAuMDU2LDc3Ljg4OCw2OC4yMzcsODIuMDE2LDgwLjI2OCw4NC43NDl6IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik0xMDUuMjM5LDE4MS4xMTNjMCw2LjEyMSwyLjM4MiwxMS44NzQsNi43MSwxNi4yMDFjNC4zMjgsNC4zMjgsMTAuMDgxLDYuNzExLDE2LjIwMSw2LjcxMSAgICAgYzYuMTIsMCwxMS44NzQtMi4zODMsMTYuMjAyLTYuNzFjNC4zMjgtNC4zMjgsNi43MTItMTAuMDgxLDYuNzEyLTE2LjIwMnMtMi4zODQtMTEuODc0LTYuNzExLTE2LjIwMiAgICAgYy00LjMyOS00LjMyOC0xMC4wODItNi43MTEtMTYuMjAzLTYuNzExcy0xMS44NzMsMi4zODMtMTYuMjAxLDYuNzExQzEwNy42MjEsMTY5LjIzOSwxMDUuMjM5LDE3NC45OTIsMTA1LjIzOSwxODEuMTEzeiAgICAgIE0xMjMuMzgyLDE3Ni4zNDJjMS4yNzMtMS4yNzMsMi45NjgtMS45NzUsNC43NjktMS45NzVjMS44MDIsMCwzLjQ5NSwwLjcwMiw0Ljc3LDEuOTc2YzEuMjc1LDEuMjc0LDEuOTc4LDIuOTY4LDEuOTc4LDQuNzcgICAgIHMtMC43MDIsMy40OTQtMS45NzYsNC43NjljLTEuMjc1LDEuMjc0LTIuOTY5LDEuOTc2LTQuNzcyLDEuOTc2Yy0xLjgsMC0zLjQ5NC0wLjcwMi00Ljc3LTEuOTc2ICAgICBjLTEuMjczLTEuMjczLTEuOTc1LTIuOTY3LTEuOTc1LTQuNzY5QzEyMS40MDUsMTc5LjMxMiwxMjIuMTA2LDE3Ny42MTgsMTIzLjM4MiwxNzYuMzQyeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNMzE1LjI4NSwxMjkuMTg5Yy04LjkzMyw4LjkzNC04LjkzMywyMy40NywwLjAwMSwzMi40MDRjNC4zMjgsNC4zMjgsMTAuMDgyLDYuNzEsMTYuMjAxLDYuNzEgICAgIGM2LjExOSwwLDExLjg3NC0yLjM4MiwxNi4yMDItNi43MWM4LjkzMy04LjkzNCw4LjkzMy0yMy40NywwLTMyLjQwM2MtNC4zMjctNC4zMjgtMTAuMDgzLTYuNzExLTE2LjIwMi02LjcxMSAgICAgQzMyNS4zNjgsMTIyLjQ3OSwzMTkuNjEzLDEyNC44NiwzMTUuMjg1LDEyOS4xODl6IE0zMzYuMjU0LDE1MC4xNmMtMS4yNzMsMS4yNzMtMi45NjcsMS45NzQtNC43NjksMS45NzQgICAgIGMtMS44MDIsMC0zLjQ5NS0wLjcwMS00Ljc3LTEuOTc0Yy0yLjYzLTIuNjMtMi42My02LjkxLTAuMDAxLTkuNTM5YzEuMjc0LTEuMjc0LDIuOTY4LTEuOTc1LDQuNzcxLTEuOTc1ICAgICBjMS44MDEsMCwzLjQ5NCwwLjcwMSw0Ljc2OSwxLjk3NEMzMzguODg0LDE0My4yNSwzMzguODg0LDE0Ny41MywzMzYuMjU0LDE1MC4xNnoiIGZpbGw9IiNGRkZGRkYiLz4KCQkJPHBhdGggZD0iTTc1LjY5NSwzMzYuOTI2Yy00LjMyOS00LjMyNi0xMC4wODItNi43MDktMTYuMjAyLTYuNzA5Yy02LjEyLDAtMTEuODczLDIuMzgzLTE2LjIwMSw2LjcxICAgICBjLTguOTM0LDguOTM1LTguOTM0LDIzLjQ3LDAsMzIuNDA0YzQuMzI3LDQuMzI4LDEwLjA4LDYuNzEyLDE2LjIwMSw2LjcxMnMxMS44NzQtMi4zODQsMTYuMjAzLTYuNzExICAgICBDODQuNjI5LDM2MC4zOTYsODQuNjI5LDM0NS44NjIsNzUuNjk1LDMzNi45MjZ6IE02NC4yNjIsMzU3Ljg5OGMtMS4yNzMsMS4yNzQtMi45NjcsMS45NzctNC43NywxLjk3NyAgICAgYy0xLjgsMC0zLjQ5NC0wLjcwMi00Ljc2OS0xLjk3N2MtMi42MzEtMi42MjktMi42MzEtNi45MDktMC4wMDEtOS41MzhjMS4yNzMtMS4yNzMsMi45NjctMS45NzUsNC43Ny0xLjk3NSAgICAgczMuNDk2LDAuNzAxLDQuNzcsMS45NzVDNjYuODkzLDM1MC45ODksNjYuODkzLDM1NS4yNjksNjQuMjYyLDM1Ny44OTh6IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik00NzMuMTUsMzM2LjkyNmMtNC4zMjktNC4zMjYtMTAuMDgyLTYuNzA5LTE2LjIwMS02LjcwOWMtNi4xMjEsMC0xMS44NzMsMi4zODMtMTYuMjAyLDYuNzEgICAgIGMtOC45MzMsOC45MzUtOC45MzMsMjMuNDcsMCwzMi40MDRjNC4zMjgsNC4zMjgsMTAuMDgxLDYuNzEyLDE2LjIwMiw2LjcxMmM2LjEyLDAsMTEuODczLTIuMzg0LDE2LjIwMi02LjcxMSAgICAgQzQ4Mi4wODQsMzYwLjM5Niw0ODIuMDg0LDM0NS44NjIsNDczLjE1LDMzNi45MjZ6IE00NjEuNzE5LDM1Ny44OThjLTEuMjc0LDEuMjc0LTIuOTY4LDEuOTc3LTQuNzcsMS45NzcgICAgIGMtMS44MDEsMC0zLjQ5NS0wLjcwMi00Ljc2OS0xLjk3N2MtMi42MzEtMi42MjktMi42MzEtNi45MDktMC4wMDItOS41MzhjMS4yNzQtMS4yNzMsMi45NjgtMS45NzUsNC43NzEtMS45NzUgICAgIGMxLjgwMSwwLDMuNDk2LDAuNzAxLDQuNzcsMS45NzVDNDY0LjM0OSwzNTAuOTg5LDQ2NC4zNDksMzU1LjI2OSw0NjEuNzE5LDM1Ny44OTh6IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik0xODYuODkyLDkzLjI0NWM2LjEyLDAsMTEuODczLTIuMzgzLDE2LjIwMS02LjcxMWM0LjMyNy00LjMyOCw2LjcxMS0xMC4wODIsNi43MTEtMTYuMjAyICAgICBjMC02LjEyMS0yLjM4NC0xMS44NzQtNi43MTEtMTYuMmMtNC4zMjgtNC4zMjktMTAuMDgxLTYuNzEyLTE2LjIwMS02LjcxMmMtNi4xMjIsMC0xMS44NzQsMi4zODMtMTYuMjAyLDYuNzExICAgICBjLTQuMzI4LDQuMzI3LTYuNzEyLDEwLjA4LTYuNzEyLDE2LjIwMXMyLjM4NCwxMS44NzQsNi43MTEsMTYuMjAyQzE3NS4wMTgsOTAuODYxLDE4MC43Nyw5My4yNDUsMTg2Ljg5Miw5My4yNDV6ICAgICAgTTE4Mi4xMjIsNjUuNTYyYzEuMjczLTEuMjc0LDIuOTY4LTEuOTc1LDQuNzcxLTEuOTc1YzEuOCwwLDMuNDkzLDAuNzAxLDQuNzY5LDEuOTc2YzEuMjczLDEuMjczLDEuOTc3LDIuOTY3LDEuOTc3LDQuNzY5ICAgICBjMCwxLjgwMi0wLjcwMywzLjQ5NS0xLjk3Nyw0Ljc3MWMtMS4yNzQsMS4yNzMtMi45NjgsMS45NzUtNC43NjksMS45NzVjLTEuODAyLDAtMy40OTYtMC43MDItNC43NzEtMS45NzYgICAgIGMtMS4yNzQtMS4yNzQtMS45NzYtMi45NjctMS45NzYtNC43N0MxODAuMTQ2LDY4LjUzMSwxODAuODQ4LDY2LjgzNiwxODIuMTIyLDY1LjU2MnoiIGZpbGw9IiNGRkZGRkYiLz4KCQkJPGNpcmNsZSBjeD0iNjQuNDA5IiBjeT0iMTYwLjIyIiByPSIxMC40OTYiIGZpbGw9IiNGRkZGRkYiLz4KCQkJPGNpcmNsZSBjeD0iNDExLjM5IiBjeT0iMzc0LjExNSIgcj0iMTAuNDk2IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxjaXJjbGUgY3g9IjczLjc1IiBjeT0iNDM5LjM0MyIgcj0iMTAuNDk3IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik0zODcuOTI5LDE0OC45NTFjMi4xMDcsMCw0LjIxMy0wLjgxOSw1Ljc5OS0yLjQ0OGwxMS4yMy0xMS41NTNjMy4xMTEtMy4yMDEsMy4wMzktOC4zMTktMC4xNjItMTEuNDMxICAgICBjLTMuMTk5LTMuMTEyLTguMzE4LTMuMDM5LTExLjQzMSwwLjE2MmwtMTEuMjMsMTEuNTUyYy0zLjExMSwzLjIwMS0zLjA0LDguMzE5LDAuMTYyLDExLjQzMSAgICAgQzM4My44NjgsMTQ4LjE5MiwzODUuODk5LDE0OC45NTEsMzg3LjkyOSwxNDguOTUxeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNMTQ4LjgyMiwxMzYuMTgybDE0LjkzNyw2LjA0YzAuOTkzLDAuNDAxLDIuMDIsMC41OTEsMy4wMjcsMC41OTFjMy4xOTcsMCw2LjIyNy0xLjkwOSw3LjQ5Ny01LjA1NiAgICAgYzEuNjc0LTQuMTM5LTAuMzI1LTguODUxLTQuNDY0LTEwLjUyNGwtMTQuOTM4LTYuMDRjLTQuMTQ2LTEuNjc2LTguODUxLDAuMzI2LTEwLjUyNCw0LjQ2NCAgICAgQzE0Mi42ODQsMTI5Ljc5NywxNDQuNjgzLDEzNC41MDgsMTQ4LjgyMiwxMzYuMTgyeiIgZmlsbD0iI0ZGRkZGRiIvPgoJCQk8cGF0aCBkPSJNOTYuMDMzLDM5Mi42NzNsLTE0LjkzOC02LjA0Yy00LjE0Ni0xLjY3NC04Ljg1MSwwLjMyNS0xMC41MjQsNC40NjRjLTEuNjczLDQuMTQsMC4zMjYsOC44NTIsNC40NjUsMTAuNTI0bDE0LjkzOCw2LjA0MSAgICAgYzAuOTkzLDAuNCwyLjAxOSwwLjU5MSwzLjAyNiwwLjU5MWMzLjE5NywwLDYuMjI3LTEuOTA4LDcuNDk3LTUuMDU2QzEwMi4xNzEsMzk5LjA1OSwxMDAuMTcyLDM5NC4zNDcsOTYuMDMzLDM5Mi42NzN6IiBmaWxsPSIjRkZGRkZGIi8+CgkJCTxwYXRoIGQ9Ik00MzYuOTQ1LDQyMC4yODRsLTE0LjkzNy02LjA0Yy00LjE0Ni0xLjY3My04Ljg1MiwwLjMyNi0xMC41MjQsNC40NjVjLTEuNjc0LDQuMTQsMC4zMjUsOC44NTIsNC40NjQsMTAuNTI0bDE0LjkzOCw2LjA0ICAgICBjMC45OTMsMC40LDIuMDE5LDAuNTkyLDMuMDI3LDAuNTkyYzMuMTk2LDAsNi4yMjYtMS45MSw3LjQ5Ny01LjA1N0M0NDMuMDgzLDQyNi42NjksNDQxLjA4NSw0MjEuOTU3LDQzNi45NDUsNDIwLjI4NHoiIGZpbGw9IiNGRkZGRkYiLz4KCQk8L2c+Cgk8L2c+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==);url(data: image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA1MTIuMDAxIDUxMi4wMDEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMi4wMDEgNTEyLjAwMTsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiPgo8Zz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBkPSJNMzY2LjkwNSwzNjUuMDcxbDg3LjkwMi04NS42ODNjNi4wODctNS45MzUsOC4yMzYtMTQuNjQzLDUuNjEtMjIuNzI5Yy0yLjYyOS04LjA4NS05LjQ4Ni0xMy44NjYtMTcuODk4LTE1LjA4NyAgICAgbC01NS44NzktOC4xMmMtNC40MTMtMC42NDctOC41MjEsMi40MTktOS4xNjEsNi44MzdjLTAuNjQzLDQuNDE5LDIuNDE4LDguNTIxLDYuODM3LDkuMTYzbDU1Ljg3OSw4LjEyICAgICBjMi4yNzgsMC4zMyw0LjEzNSwxLjg5Niw0Ljg0Nyw0LjA4M2MwLjcxMSwyLjE5LDAuMTI5LDQuNTQ4LTEuNTE5LDYuMTU0bC05MC45NDcsODguNjVjLTEuOTA1LDEuODU4LTIuNzczLDQuNTMzLTIuMzIzLDcuMTU1ICAgICBsMjEuNDY5LDEyNS4xNzhjMC4zODksMi4yNjgtMC41MjcsNC41MTgtMi4zODcsNS44NjljLTEuODE2LDEuMzE4LTQuMzM5LDEuNTAyLTYuMzIyLDAuNDU5bC0xMTIuNDE0LTU5LjEwMSAgICAgYy0yLjM1NS0xLjIzNy01LjE2OS0xLjIzNy03LjUyNCwwbC0xMTIuNDE0LDU5LjEwMWMtMi4wMzgsMS4wNy00LjQ2LDAuODkzLTYuMzIyLTAuNDU4Yy0xLjg2MS0xLjM1My0yLjc3NS0zLjYwMi0yLjM4OC01Ljg3ICAgICBsMjEuNDctMTI1LjE3N2MwLjQ1LTIuNjIyLTAuNDItNS4yOTctMi4zMjQtNy4xNTVsLTkwLjk0Ni04OC42NDljLTEuNjQ4LTEuNjA3LTIuMjI5LTMuOTY2LTEuNTItNi4xNTUgICAgIGMwLjcxMi0yLjE4OCwyLjU2Ny0zLjc1Myw0Ljg0Ni00LjA4M2wxMjUuNjg0LTE4LjI2M2MyLjYzMy0wLjM4Miw0LjkxLTIuMDM2LDYuMDg3LTQuNDIybDU2LjIwOS0xMTMuODkxICAgICBjMS4wMTktMi4wNjMsMy4wOC0zLjM0NSw1LjM4Mi0zLjM0NXM0LjM2NCwxLjI4MSw1LjM4MywzLjM0NWw1Ni4yMDcsMTEzLjg5YzEuMTc4LDIuMzg1LDMuNDUzLDQuMDM5LDYuMDg4LDQuNDIybDQyLjM5NSw2LjE2ICAgICBjNC40MDUsMC42NDEsOC41Mi0yLjQxOCw5LjE2MS02LjgzN2MwLjY0My00LjQxOC0yLjQxOC04LjUyMS02LjgzNy05LjE2MmwtMzguMTktNS41NDlsLTU0LjMyNi0xMTAuMDc3ICAgICBjLTMuNzYxLTcuNjI0LTExLjM3OS0xMi4zNTktMTkuODgtMTIuMzU5Yy04LjUwMSwwLTE2LjExOSw0LjczNi0xOS44NzksMTIuMzU4bC01NC4zMjgsMTEwLjA3OEw1MS4xNDksMjQxLjU3MiAgICAgYy04LjQxMiwxLjIyMi0xNS4yNyw3LjAwMy0xNy44OTcsMTUuMDg5Yy0yLjYyNiw4LjA4NC0wLjQ3OCwxNi43OTIsNS42MSwyMi43MjhsODcuOTAyLDg1LjY4MmwtMjAuNzUsMTIwLjk4OSAgICAgYy0xLjQzOCw4LjM3NywxLjk0LDE2LjY4NSw4LjgxOCwyMS42ODNjMy44ODgsMi44MjMsOC40MzQsNC4yNTgsMTMuMDExLDQuMjU4YzMuNTIzLDAsNy4wNjUtMC44NSwxMC4zMzctMi41NjlsMTA4LjY1NC01Ny4xMjIgICAgIGwxMDguNjU3LDU3LjEyNGMzLjE3LDEuNjYzLDYuNzM1LDIuNTQzLDEwLjMxMiwyLjU0M2M0LjcxNCwwLDkuMjE5LTEuNDY0LDEzLjAzNC00LjIzNGM2Ljg3Ni00Ljk5OCwxMC4yNTYtMTMuMzA3LDguODE3LTIxLjY4MyAgICAgTDM2Ni45MDUsMzY1LjA3MXoiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTM4OS40MjgsMjAyLjMxM2MwLjcwNi01LjE3OSw3Ljc4LTEzLjU2NSwyOS44MTYtMTIuMTY1YzEuMzU1LDAuMDg2LDIuNjUxLDAuMTI4LDMuOTAxLDAuMTI4ICAgICBjMjcuNjk5LTAuMDAyLDMwLjA1NC0yMC42MzksMzEuNjMtMzQuNDk4YzAuODc0LTcuNjc3LDEuNjk5LTE0LjkyOCw1LjI3NS0yMC4wNTNjMi41NTMtMy42NjIsMS42NTMtOC43MDEtMi4wMDctMTEuMjU0ICAgICBjLTMuNjYyLTIuNTUyLTguNzAxLTEuNjU1LTExLjI1NSwyLjAwNmMtNS45MTQsOC40ODEtNy4wNjMsMTguNTctOC4wNzYsMjcuNDczYy0xLjc0NiwxNS4zNDMtMi40MSwyMS4wODctMTguNDM4LDIwLjA2MyAgICAgYy0xNy42NjQtMS4xMjctMzAuODYsMi42NTYtMzkuMjMyLDExLjI0MmMtNi44NTQsNy4wMjktNy42NDQsMTQuNzIyLTcuNzExLDE1LjU3NmwxNi4xMTcsMS4yNzUgICAgIEMzODkuNDQ5LDIwMi4xMDYsMzg5LjQ0NywyMDIuMTc5LDM4OS40MjgsMjAyLjMxM3oiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTI4Ni43NzUsOTEuMTdjMC4xNi0wLjA4NiwwLjI1NC0wLjExOSwwLjI1NC0wLjExOWw2LjUyMSwxNC43OTVjNy45MzQtMy40OTYsMTkuOTQ1LTE3LjE5Miw4LjYxNy00My45OTkgICAgIGMtNC4xMzUtOS43ODktMi4xMjUtMTEuMTMxLDkuMjUtMTYuNjE4YzExLjExLTUuMzYxLDI3LjkwMi0xMy40NjIsMjMuNDcxLTM4LjU1MWMtMC43NzUtNC4zOTctNC45NjItNy4zMjctOS4zNjctNi41NTUgICAgIGMtNC4zOTcsMC43NzctNy4zMyw0Ljk3MS02LjU1NCw5LjM2N2MyLjIwNSwxMi40OC0zLjE3NywxNS42NzgtMTQuNTc2LDIxLjE3N2MtMTAuMjM3LDQuOTM5LTI3LjM3LDEzLjIwNS0xNy4xMTYsMzcuNDc0ICAgICBDMjkzLjQ1OSw4Mi43NzksMjg5Ljg3MSw4OS41MDUsMjg2Ljc3NSw5MS4xN3oiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTgwLjI2OCw4NC43NDljMTIuMzE0LDIuNzk2LDE0LjU3NiwzLjY1MywxMi43NCwxNC4xMmMtNS4wMjgsMjguNjY1LDkuNzUsMzkuMzE5LDE4LjI2Niw0MC45NDYgICAgIGMwLjUxMywwLjA5OSwxLjAyMywwLjE0NiwxLjUyNywwLjE0NmMzLjgwMiwwLDcuMTktMi42OTUsNy45MzEtNi41NjdjMC44MzgtNC4zODYtMi4wMzctOC42Mi02LjQyMy05LjQ1OCAgICAgYy0wLjA4OS0wLjAxNy04LjgyNy0yLjYtNS4zNzYtMjIuMjczYzQuNTQ5LTI1Ljk1LTE0LjAwMS0zMC4xNjMtMjUuMDg1LTMyLjY4Yy0xMi4zNDEtMi44MDMtMTguMzAzLTQuNzEyLTE4Ljk1My0xNy4zNjkgICAgIGMtMC4yMjktNC40NTgtNC4wMDYtNy44OTQtOC40ODgtNy42NTljLTQuNDU4LDAuMjI5LTcuODg4LDQuMDI5LTcuNjU4LDguNDg4QzUwLjA1Niw3Ny44ODgsNjguMjM3LDgyLjAxNiw4MC4yNjgsODQuNzQ5eiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNMTA1LjIzOSwxODEuMTEzYzAsNi4xMjEsMi4zODIsMTEuODc0LDYuNzEsMTYuMjAxYzQuMzI4LDQuMzI4LDEwLjA4MSw2LjcxMSwxNi4yMDEsNi43MTEgICAgIGM2LjEyLDAsMTEuODc0LTIuMzgzLDE2LjIwMi02LjcxYzQuMzI4LTQuMzI4LDYuNzEyLTEwLjA4MSw2LjcxMi0xNi4yMDJzLTIuMzg0LTExLjg3NC02LjcxMS0xNi4yMDIgICAgIGMtNC4zMjktNC4zMjgtMTAuMDgyLTYuNzExLTE2LjIwMy02LjcxMXMtMTEuODczLDIuMzgzLTE2LjIwMSw2LjcxMUMxMDcuNjIxLDE2OS4yMzksMTA1LjIzOSwxNzQuOTkyLDEwNS4yMzksMTgxLjExM3ogICAgICBNMTIzLjM4MiwxNzYuMzQyYzEuMjczLTEuMjczLDIuOTY4LTEuOTc1LDQuNzY5LTEuOTc1YzEuODAyLDAsMy40OTUsMC43MDIsNC43NywxLjk3NmMxLjI3NSwxLjI3NCwxLjk3OCwyLjk2OCwxLjk3OCw0Ljc3ICAgICBzLTAuNzAyLDMuNDk0LTEuOTc2LDQuNzY5Yy0xLjI3NSwxLjI3NC0yLjk2OSwxLjk3Ni00Ljc3MiwxLjk3NmMtMS44LDAtMy40OTQtMC43MDItNC43Ny0xLjk3NiAgICAgYy0xLjI3My0xLjI3My0xLjk3NS0yLjk2Ny0xLjk3NS00Ljc2OUMxMjEuNDA1LDE3OS4zMTIsMTIyLjEwNiwxNzcuNjE4LDEyMy4zODIsMTc2LjM0MnoiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTMxNS4yODUsMTI5LjE4OWMtOC45MzMsOC45MzQtOC45MzMsMjMuNDcsMC4wMDEsMzIuNDA0YzQuMzI4LDQuMzI4LDEwLjA4Miw2LjcxLDE2LjIwMSw2LjcxICAgICBjNi4xMTksMCwxMS44NzQtMi4zODIsMTYuMjAyLTYuNzFjOC45MzMtOC45MzQsOC45MzMtMjMuNDcsMC0zMi40MDNjLTQuMzI3LTQuMzI4LTEwLjA4My02LjcxMS0xNi4yMDItNi43MTEgICAgIEMzMjUuMzY4LDEyMi40NzksMzE5LjYxMywxMjQuODYsMzE1LjI4NSwxMjkuMTg5eiBNMzM2LjI1NCwxNTAuMTZjLTEuMjczLDEuMjczLTIuOTY3LDEuOTc0LTQuNzY5LDEuOTc0ICAgICBjLTEuODAyLDAtMy40OTUtMC43MDEtNC43Ny0xLjk3NGMtMi42My0yLjYzLTIuNjMtNi45MS0wLjAwMS05LjUzOWMxLjI3NC0xLjI3NCwyLjk2OC0xLjk3NSw0Ljc3MS0xLjk3NSAgICAgYzEuODAxLDAsMy40OTQsMC43MDEsNC43NjksMS45NzRDMzM4Ljg4NCwxNDMuMjUsMzM4Ljg4NCwxNDcuNTMsMzM2LjI1NCwxNTAuMTZ6IiBmaWxsPSIjY2NjY2NjIi8+CgkJCTxwYXRoIGQ9Ik03NS42OTUsMzM2LjkyNmMtNC4zMjktNC4zMjYtMTAuMDgyLTYuNzA5LTE2LjIwMi02LjcwOWMtNi4xMiwwLTExLjg3MywyLjM4My0xNi4yMDEsNi43MSAgICAgYy04LjkzNCw4LjkzNS04LjkzNCwyMy40NywwLDMyLjQwNGM0LjMyNyw0LjMyOCwxMC4wOCw2LjcxMiwxNi4yMDEsNi43MTJzMTEuODc0LTIuMzg0LDE2LjIwMy02LjcxMSAgICAgQzg0LjYyOSwzNjAuMzk2LDg0LjYyOSwzNDUuODYyLDc1LjY5NSwzMzYuOTI2eiBNNjQuMjYyLDM1Ny44OThjLTEuMjczLDEuMjc0LTIuOTY3LDEuOTc3LTQuNzcsMS45NzcgICAgIGMtMS44LDAtMy40OTQtMC43MDItNC43NjktMS45NzdjLTIuNjMxLTIuNjI5LTIuNjMxLTYuOTA5LTAuMDAxLTkuNTM4YzEuMjczLTEuMjczLDIuOTY3LTEuOTc1LDQuNzctMS45NzUgICAgIHMzLjQ5NiwwLjcwMSw0Ljc3LDEuOTc1QzY2Ljg5MywzNTAuOTg5LDY2Ljg5MywzNTUuMjY5LDY0LjI2MiwzNTcuODk4eiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNNDczLjE1LDMzNi45MjZjLTQuMzI5LTQuMzI2LTEwLjA4Mi02LjcwOS0xNi4yMDEtNi43MDljLTYuMTIxLDAtMTEuODczLDIuMzgzLTE2LjIwMiw2LjcxICAgICBjLTguOTMzLDguOTM1LTguOTMzLDIzLjQ3LDAsMzIuNDA0YzQuMzI4LDQuMzI4LDEwLjA4MSw2LjcxMiwxNi4yMDIsNi43MTJjNi4xMiwwLDExLjg3My0yLjM4NCwxNi4yMDItNi43MTEgICAgIEM0ODIuMDg0LDM2MC4zOTYsNDgyLjA4NCwzNDUuODYyLDQ3My4xNSwzMzYuOTI2eiBNNDYxLjcxOSwzNTcuODk4Yy0xLjI3NCwxLjI3NC0yLjk2OCwxLjk3Ny00Ljc3LDEuOTc3ICAgICBjLTEuODAxLDAtMy40OTUtMC43MDItNC43NjktMS45NzdjLTIuNjMxLTIuNjI5LTIuNjMxLTYuOTA5LTAuMDAyLTkuNTM4YzEuMjc0LTEuMjczLDIuOTY4LTEuOTc1LDQuNzcxLTEuOTc1ICAgICBjMS44MDEsMCwzLjQ5NiwwLjcwMSw0Ljc3LDEuOTc1QzQ2NC4zNDksMzUwLjk4OSw0NjQuMzQ5LDM1NS4yNjksNDYxLjcxOSwzNTcuODk4eiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNMTg2Ljg5Miw5My4yNDVjNi4xMiwwLDExLjg3My0yLjM4MywxNi4yMDEtNi43MTFjNC4zMjctNC4zMjgsNi43MTEtMTAuMDgyLDYuNzExLTE2LjIwMiAgICAgYzAtNi4xMjEtMi4zODQtMTEuODc0LTYuNzExLTE2LjJjLTQuMzI4LTQuMzI5LTEwLjA4MS02LjcxMi0xNi4yMDEtNi43MTJjLTYuMTIyLDAtMTEuODc0LDIuMzgzLTE2LjIwMiw2LjcxMSAgICAgYy00LjMyOCw0LjMyNy02LjcxMiwxMC4wOC02LjcxMiwxNi4yMDFzMi4zODQsMTEuODc0LDYuNzExLDE2LjIwMkMxNzUuMDE4LDkwLjg2MSwxODAuNzcsOTMuMjQ1LDE4Ni44OTIsOTMuMjQ1eiAgICAgIE0xODIuMTIyLDY1LjU2MmMxLjI3My0xLjI3NCwyLjk2OC0xLjk3NSw0Ljc3MS0xLjk3NWMxLjgsMCwzLjQ5MywwLjcwMSw0Ljc2OSwxLjk3NmMxLjI3MywxLjI3MywxLjk3NywyLjk2NywxLjk3Nyw0Ljc2OSAgICAgYzAsMS44MDItMC43MDMsMy40OTUtMS45NzcsNC43NzFjLTEuMjc0LDEuMjczLTIuOTY4LDEuOTc1LTQuNzY5LDEuOTc1Yy0xLjgwMiwwLTMuNDk2LTAuNzAyLTQuNzcxLTEuOTc2ICAgICBjLTEuMjc0LTEuMjc0LTEuOTc2LTIuOTY3LTEuOTc2LTQuNzdDMTgwLjE0Niw2OC41MzEsMTgwLjg0OCw2Ni44MzYsMTgyLjEyMiw2NS41NjJ6IiBmaWxsPSIjY2NjY2NjIi8+CgkJCTxjaXJjbGUgY3g9IjY0LjQwOSIgY3k9IjE2MC4yMiIgcj0iMTAuNDk2IiBmaWxsPSIjY2NjY2NjIi8+CgkJCTxjaXJjbGUgY3g9IjQxMS4zOSIgY3k9IjM3NC4xMTUiIHI9IjEwLjQ5NiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8Y2lyY2xlIGN4PSI3My43NSIgY3k9IjQzOS4zNDMiIHI9IjEwLjQ5NyIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNMzg3LjkyOSwxNDguOTUxYzIuMTA3LDAsNC4yMTMtMC44MTksNS43OTktMi40NDhsMTEuMjMtMTEuNTUzYzMuMTExLTMuMjAxLDMuMDM5LTguMzE5LTAuMTYyLTExLjQzMSAgICAgYy0zLjE5OS0zLjExMi04LjMxOC0zLjAzOS0xMS40MzEsMC4xNjJsLTExLjIzLDExLjU1MmMtMy4xMTEsMy4yMDEtMy4wNCw4LjMxOSwwLjE2MiwxMS40MzEgICAgIEMzODMuODY4LDE0OC4xOTIsMzg1Ljg5OSwxNDguOTUxLDM4Ny45MjksMTQ4Ljk1MXoiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTE0OC44MjIsMTM2LjE4MmwxNC45MzcsNi4wNGMwLjk5MywwLjQwMSwyLjAyLDAuNTkxLDMuMDI3LDAuNTkxYzMuMTk3LDAsNi4yMjctMS45MDksNy40OTctNS4wNTYgICAgIGMxLjY3NC00LjEzOS0wLjMyNS04Ljg1MS00LjQ2NC0xMC41MjRsLTE0LjkzOC02LjA0Yy00LjE0Ni0xLjY3Ni04Ljg1MSwwLjMyNi0xMC41MjQsNC40NjQgICAgIEMxNDIuNjg0LDEyOS43OTcsMTQ0LjY4MywxMzQuNTA4LDE0OC44MjIsMTM2LjE4MnoiIGZpbGw9IiNjY2NjY2MiLz4KCQkJPHBhdGggZD0iTTk2LjAzMywzOTIuNjczbC0xNC45MzgtNi4wNGMtNC4xNDYtMS42NzQtOC44NTEsMC4zMjUtMTAuNTI0LDQuNDY0Yy0xLjY3Myw0LjE0LDAuMzI2LDguODUyLDQuNDY1LDEwLjUyNGwxNC45MzgsNi4wNDEgICAgIGMwLjk5MywwLjQsMi4wMTksMC41OTEsMy4wMjYsMC41OTFjMy4xOTcsMCw2LjIyNy0xLjkwOCw3LjQ5Ny01LjA1NkMxMDIuMTcxLDM5OS4wNTksMTAwLjE3MiwzOTQuMzQ3LDk2LjAzMywzOTIuNjczeiIgZmlsbD0iI2NjY2NjYyIvPgoJCQk8cGF0aCBkPSJNNDM2Ljk0NSw0MjAuMjg0bC0xNC45MzctNi4wNGMtNC4xNDYtMS42NzMtOC44NTIsMC4zMjYtMTAuNTI0LDQuNDY1Yy0xLjY3NCw0LjE0LDAuMzI1LDguODUyLDQuNDY0LDEwLjUyNGwxNC45MzgsNi4wNCAgICAgYzAuOTkzLDAuNCwyLjAxOSwwLjU5MiwzLjAyNywwLjU5MmMzLjE5NiwwLDYuMjI2LTEuOTEsNy40OTctNS4wNTdDNDQzLjA4Myw0MjYuNjY5LDQ0MS4wODUsNDIxLjk1Nyw0MzYuOTQ1LDQyMC4yODR6IiBmaWxsPSIjY2NjY2NjIi8+CgkJPC9nPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=);background-size: 34px;background-repeat: no-repeat;text-align: right;background-position: 16px 17px;
197
+ }
198
+ .amp-update-notice-review-box a{
199
+ color: #fff;
200
+ text-decoration: none;
201
+ font-size: 16px;
202
+ line-height: 23px; font-weight: 300;
203
+ }
204
+ .amp-update-notice-review-box span{
205
+ font-size: 11px;text-transform: uppercase;
206
+ }
207
+ li.first{
208
+ position: relative;
209
+ }
210
+ .active.valid:before{
211
+ content: "✓";
212
+ display: inline-block;
213
+ position: absolute;
214
+ color: #fff;
215
+ left: 20px;
216
+ background: green;
217
+ top: 15px;
218
+ padding: 4px 7px;
219
+ border-radius: 100%;
220
+ }
221
+ .not-active.invalid:before{
222
+ content: "X";
223
+ display: inline-block;
224
+ position: absolute;
225
+ color: #fff;
226
+ left: 20px;
227
+ background: #f32a56;
228
+ top: 15px;
229
+ padding: 4px 7px;
230
+ border-radius: 100%;
231
+ }
232
+
233
+
234
+
235
+
236
+
237
+
238
+ .a-f-wp-help-message {
239
+ width: 0em;
240
+ position: fixed;
241
+ right:0; z-index: 99999;
242
+ border: 0;
243
+ -webkit-transform: translateX(-50%);
244
+ -moz-transform: translateX(-50%);
245
+ -ms-transform: translateX(-50%);
246
+ -o-transform: translateX(-50%);
247
+ transform: translateX(-50%);
248
+ padding: 0;
249
+ color: #333;
250
+ opacity: 0;
251
+ -webkit-transition: 0.5s;
252
+ -moz-transition: 0.5s;
253
+ transition: 0.5s;
254
+ bottom: 85px;
255
+ }
256
+ .a-f-wp-help-message img{
257
+ width: 250px;
258
+ }
259
+
260
+ .a-f-wp-help-message:focus {
261
+ outline: none;
262
+ }
263
+ .a-f-wp-help-message.active {
264
+ opacity: 1;
265
+ -webkit-transition: 1s;
266
+ -moz-transition: 1s;
267
+ transition: 1s;
268
+ width: 170px;
269
+ }
270
+
271
+ .a-f-wp-help-container {
272
+ display: flex;
273
+ align-items: center;
274
+ justify-content: center;
275
+ position: fixed;
276
+ z-index: 9999;
277
+ bottom: 0px;
278
+ right: 0pc;
279
+ }
280
+ .dashicons-sos:before, .dashicons-no-alt{
281
+ font-family: dashicons;
282
+ font-style: normal;
283
+ }
284
+ .a-f-wp-help-container .a-f-wp-help-tear {
285
+ width: 4em;
286
+ height: 4em;
287
+ right: 26px;
288
+ bottom: 27px;
289
+ border-radius: 0 50% 50% 50%;
290
+ border-radius: 50%;
291
+ cursor: pointer;
292
+ transform: rotate(0deg);
293
+ -webkit-transition: 0.5s;
294
+ -moz-transition: 0.5s;
295
+ transition: 0.5s;
296
+ background: dodgerblue;
297
+ box-shadow: 4px 4px 10px #b3b3b3;
298
+ position: relative;
299
+ }
300
+ .a-f-wp-help-container .a-f-wp-help-tear.active {
301
+ border-radius: 0 50% 50% 50%;
302
+ transform: rotate(45deg);
303
+ background: black;
304
+ }
305
+ .a-f-wp-help-container .a-f-wp-help-tear.active span {
306
+ position: absolute;
307
+ left: 12px;
308
+ top: 17px;
309
+ font-size: 2em;
310
+ color: white;
311
+ -webkit-transform: rotate(45deg);
312
+ -moz-transform: rotate(45deg);
313
+ -ms-transform: rotate(45deg);
314
+ -o-transform: rotate(45deg);
315
+ transform: rotate(45deg);
316
+ }
317
+ .a-f-wp-help-container .a-f-wp-help-tear.green {
318
+ background: green;
319
+ transform: rotate(0deg);
320
+ border-radius: 5px;
321
+ }
322
+ .a-f-wp-help-container span {
323
+ position: absolute;
324
+ left: 26px;
325
+ top: 28px;
326
+ -webkit-transform: translateX(-50%) translateY(-50%);
327
+ -moz-transform: translateX(-50%) translateY(-50%);
328
+ -ms-transform: translateX(-50%) translateY(-50%);
329
+ -o-transform: translateX(-50%) translateY(-50%);
330
+ transform: translateX(-50%) translateY(-50%);
331
+ font-size: 2em;
332
+ color: white;
333
+ }
includes/disqus.php CHANGED
@@ -1,92 +1,92 @@
1
- <div id="disqus_thread"></div>
2
- <script>
3
-
4
- var QueryString = function () {
5
- var query_string = {};
6
- var query = window.location.search.substring(1);
7
- var vars = query.split("&");
8
- for (var i=0;i<vars.length;i++) {
9
- var pair = vars[i].split("=");
10
- if (typeof query_string[pair[0]] === "undefined") {
11
- query_string[pair[0]] = decodeURIComponent(pair[1]);
12
- } else if (typeof query_string[pair[0]] === "string") {
13
- var arr = [ query_string[pair[0]],decodeURIComponent(pair[1]) ];
14
- query_string[pair[0]] = arr;
15
- } else {
16
- query_string[pair[0]].push(decodeURIComponent(pair[1]));
17
- }
18
- }
19
- return query_string;
20
- }();
21
-
22
- var url = QueryString.url;
23
- var identifier = QueryString.identifier;
24
- var disqus_name = QueryString.disqus_name;
25
- var disqus_title = QueryString.disqus_title;
26
-
27
- var disqus_config = function () {
28
- this.page.url = url;
29
- this.page.title = disqus_title;
30
- this.page.identifier = identifier || url;
31
- };
32
-
33
- (function () {
34
- var d = document, s = d.createElement('script');
35
- s.src = disqus_name;
36
- s.setAttribute('data-timestamp', +new Date());
37
- (d.head || d.body).appendChild(s);
38
- })();
39
-
40
- (function () {
41
- function checkSizeChange() {
42
- var viewportHeight = window.innerHeight;
43
- var contentHeight = document.getElementById('disqus_thread').clientHeight;
44
- if (viewportHeight !== contentHeight && contentHeight > 100) {
45
- window.parent.postMessage({
46
- sentinel: 'amp',
47
- type: 'embed-size',
48
- height: contentHeight
49
- }, '*')
50
- }
51
- }
52
-
53
- var mutationObserverAvailable = typeof window.MutationObserver === 'function';
54
-
55
- function bindObserver() {
56
- var foundframe = false,
57
- frame, framename,
58
- frames = document.getElementsByTagName('iframe');
59
-
60
- for (var i=0; i < frames.length; ++i) {
61
- frame = frames[i];
62
- framename = frame.getAttribute("name");
63
- if ( framename && /dsq/.test(framename) ) {
64
- // check the size now since the frame is now available
65
- checkSizeChange();
66
-
67
- var resizeObserver = new MutationObserver(checkSizeChange);
68
- resizeObserver.observe(frame, {
69
- attributes: true,
70
- attributeFilter: ['style']
71
- });
72
- foundframe = true;
73
- break;
74
- }
75
- }
76
-
77
- // if the frame is not available yet try again later
78
- if (foundframe === false) {
79
- setTimeout(bindObserver, 200);
80
- return;
81
- }
82
- }
83
-
84
- // use mutation observers to quickly change the size of the iframe
85
- if (mutationObserverAvailable) {
86
- bindObserver();
87
- }
88
-
89
- // also check periodically for the size of the frame
90
- setInterval(checkSizeChange, mutationObserverAvailable ? 5000 : 500);
91
- })();
92
  </script>
1
+ <div id="disqus_thread"></div>
2
+ <script>
3
+
4
+ var QueryString = function () {
5
+ var query_string = {};
6
+ var query = window.location.search.substring(1);
7
+ var vars = query.split("&");
8
+ for (var i=0;i<vars.length;i++) {
9
+ var pair = vars[i].split("=");
10
+ if (typeof query_string[pair[0]] === "undefined") {
11
+ query_string[pair[0]] = decodeURIComponent(pair[1]);
12
+ } else if (typeof query_string[pair[0]] === "string") {
13
+ var arr = [ query_string[pair[0]],decodeURIComponent(pair[1]) ];
14
+ query_string[pair[0]] = arr;
15
+ } else {
16
+ query_string[pair[0]].push(decodeURIComponent(pair[1]));
17
+ }
18
+ }
19
+ return query_string;
20
+ }();
21
+
22
+ var url = QueryString.url;
23
+ var identifier = QueryString.identifier;
24
+ var disqus_name = QueryString.disqus_name;
25
+ var disqus_title = QueryString.disqus_title;
26
+
27
+ var disqus_config = function () {
28
+ this.page.url = url;
29
+ this.page.title = disqus_title;
30
+ this.page.identifier = identifier || url;
31
+ };
32
+
33
+ (function () {
34
+ var d = document, s = d.createElement('script');
35
+ s.src = disqus_name;
36
+ s.setAttribute('data-timestamp', +new Date());
37
+ (d.head || d.body).appendChild(s);
38
+ })();
39
+
40
+ (function () {
41
+ function checkSizeChange() {
42
+ var viewportHeight = window.innerHeight;
43
+ var contentHeight = document.getElementById('disqus_thread').clientHeight;
44
+ if (viewportHeight !== contentHeight && contentHeight > 100) {
45
+ window.parent.postMessage({
46
+ sentinel: 'amp',
47
+ type: 'embed-size',
48
+ height: contentHeight
49
+ }, '*')
50
+ }
51
+ }
52
+
53
+ var mutationObserverAvailable = typeof window.MutationObserver === 'function';
54
+
55
+ function bindObserver() {
56
+ var foundframe = false,
57
+ frame, framename,
58
+ frames = document.getElementsByTagName('iframe');
59
+
60
+ for (var i=0; i < frames.length; ++i) {
61
+ frame = frames[i];
62
+ framename = frame.getAttribute("name");
63
+ if ( framename && /dsq/.test(framename) ) {
64
+ // check the size now since the frame is now available
65
+ checkSizeChange();
66
+
67
+ var resizeObserver = new MutationObserver(checkSizeChange);
68
+ resizeObserver.observe(frame, {
69
+ attributes: true,
70
+ attributeFilter: ['style']
71
+ });
72
+ foundframe = true;
73
+ break;
74
+ }
75
+ }
76
+
77
+ // if the frame is not available yet try again later
78
+ if (foundframe === false) {
79
+ setTimeout(bindObserver, 200);
80
+ return;
81
+ }
82
+ }
83
+
84
+ // use mutation observers to quickly change the size of the iframe
85
+ if (mutationObserverAvailable) {
86
+ bindObserver();
87
+ }
88
+
89
+ // also check periodically for the size of the frame
90
+ setInterval(checkSizeChange, mutationObserverAvailable ? 5000 : 500);
91
+ })();
92
  </script>
includes/icons/amp-icons.php CHANGED
@@ -1,779 +1,779 @@
1
- <?php
2
- return array( 'widgets' => '.icon-widgets:before { content: "\e1bd";}',
3
- 'search' => '.icon-search:after{ content: "\e8b6"; }',
4
- 'shopping-cart' => '.icon-shopping-cart:after {content: "\e8cc";}',
5
- '3d_rotation' => '.icon-3d_rotation:before {content: "\e84d";}',
6
- 'ac_unit' => '.icon-ac_unit:before {content: "\eb3b";}',
7
- 'alarm' => '.icon-alarm:before {content: "\e855";}',
8
- 'access_alarms' => '.icon-access_alarms:before {content: "\e191";}',
9
- 'schedule' => '.icon-schedule:before {content: "\e8b5";}',
10
- 'accessibility' => '.icon-accessibility:before {content: "\e84e";}',
11
- 'accessible' => '.icon-accessible:before {content: "\e914";}',
12
- 'account_balance' => '.icon-account_balance:before {content: "\e84f";}',
13
- 'account_balance_wallet' => '.icon-account_balance_wallet:before {content: "\e850";}',
14
- 'account_box' => '.icon-account_box:before {content: "\e851";}',
15
- 'account_circle' => '.icon-account_circle:before {content: "\e853";}',
16
- 'add' => '.icon-add:before {content: "\e145";}',
17
- 'add_a_photo' => '.icon-add_a_photo:before {content: "\e439";}',
18
- 'alarm_add' => '.icon-alarm_add:before {content: "\e856";}',
19
- 'add_alert' => '.icon-add_alert:before {content: "\e003";}',
20
- 'add_box' => '.icon-add_box:before {content: "\e146";}',
21
- 'add_circle' => '.icon-add_circle:before {content: "\e147";}',
22
- 'control_point ' => '.icon-control_point:before {content: "\e3ba";}',
23
- 'add_location ' => '.icon-add_location:before {content: "\e567";}',
24
- 'add_shopping_cart ' => '.icon-add_shopping_cart:before {content: "\e854";}',
25
- 'queue ' => '.icon-queue:before {content: "\e03c";}',
26
- 'add_to_queue ' => '.icon-add_to_queue:before {content: "\e05c";}',
27
- 'adjust ' => '.icon-adjust:before {content: "\e39e";}',
28
- 'flight ' => '.icon-flight:before {content: "\e539";}',
29
- 'airplay ' => '.icon-airplay:before {content: "\e055";}',
30
- 'airport_shuttle ' => '.icon-airport_shuttle:before {content: "\eb3c";}',
31
- 'alarm_off ' => '.icon-alarm_off:before {content: "\e857";}',
32
- 'alarm_on ' => '.icon-alarm_on:before {content: "\e858";}',
33
- 'album ' => '.icon-album:before {content: "\e019";}',
34
- 'all_inclusive ' => '.icon-all_inclusive:before {content: "\eb3d";}',
35
- 'all_out' => '.icon-all_out:before {content: "\e90b";}',
36
- 'android' => '.icon-android:before {content: "\e859";}',
37
- 'announcement' => '.icon-announcement:before {content: "\e85a";}',
38
- 'apps' => '.icon-apps:before {content: "\e5c3";}',
39
- 'archive' => '.icon-archive:before {content: "\e149";}',
40
- 'arrow_back' => '.icon-arrow_back:before {content: "\e5c4";}',
41
- 'arrow_downward' => '.icon-arrow_downward:before {content: "\e5db";}',
42
- 'arrow_drop_down' => '.icon-arrow_drop_down:before {content: "\e5c5";}',
43
- 'arrow_drop_down_circle' => '.icon-arrow_drop_down_circle:before {content: "\e5c6";}',
44
- 'arrow_drop_up' => '.icon-arrow_drop_up:before {content: "\e5c7";}',
45
- 'arrow_forward' => '.icon-arrow_forward:before {content: "\e5c8";}',
46
- 'arrow_upward' => '.icon-arrow_upward:before {content: "\e5d8";}',
47
- 'art_track' => '.icon-art_track:before {content: "\e060";}',
48
- 'aspect_ratio' => '.icon-aspect_ratio:before {content: "\e85b";}',
49
- 'poll' => '.icon-poll:before {content: "\e801";}',
50
- 'assignment' => '.icon-assignment:before {content: "\e85d";}',
51
- 'assignment_ind' => '.icon-assignment_ind:before {content: "\e85e";}',
52
- 'assignment_late' => '.icon-assignment_late:before {content: "\e85f";}',
53
- 'assignment_return' => '.icon-assignment_return:before {content: "\e860";}',
54
- 'assignment_returned' => '.icon-assignment_returned:before {content: "\e861";}',
55
- 'assignment_turned_in' => '.icon-assignment_turned_in:before {content: "\e862";}',
56
- 'assistant' => '.icon-assistant:before {content: "\e39f";}',
57
- 'flag' => '.icon-flag:before {content: "\e153";}',
58
- 'attach_file' => '.icon-attach_file:before {content: "\e226";}',
59
- 'attach_money' => '.icon-attach_money:before {content: "\e227";}',
60
- 'attachment' => '.icon-attachment:before {content: "\e2bc";}',
61
- 'audiotrack' => '.icon-audiotrack:before {content: "\e3a1";}',
62
- 'autorenew' => '.icon-autorenew:before {content: "\e863";}',
63
- 'av_timer' => '.icon-av_timer:before {content: "\e01b";}',
64
- 'backspace' => '.icon-backspace:before {content: "\e14a";}',
65
- 'cloud_upload' => '.icon-cloud_upload:before {content: "\e2c3";}',
66
- 'battery_alert' => '.icon-battery_alert:before {content: "\e19c";}',
67
- 'battery_charging_full' => '.icon-battery_charging_full:before {content: "\e1a3";}',
68
- 'battery_std' => '.icon-battery_std:before {content: "\e1a5";}',
69
- 'battery_unknown' => '.icon-battery_unknown:before {content: "\e1a6";}',
70
- 'beach_access' => '.icon-beach_access:before {content: "\eb3e";}',
71
- 'beenhere' => '.icon-beenhere:before {content: "\e52d";}',
72
- 'block' => '.icon-block:before {content: "\e14b";}',
73
- 'bluetooth' => '.icon-bluetooth:before {content: "\e1a7";}',
74
- 'blur_circular' => '.icon-blur_circular:before {content: "\e3a2";}',
75
- 'blur_linear' => '.icon-blur_linear:before {content: "\e3a3";}',
76
- 'blur_on' => '.icon-blur_on:before {content: "\e3a5";}',
77
- 'class' => '.icon-class:before {content: "\e86e";}',
78
- 'turned_in' => '.icon-turned_in:before {content: "\e8e6";}',
79
- 'turned_in_not' => '.icon-turned_in_not:before {content: "\e8e7";}',
80
- 'border_color' => '.icon-border_color:before {content: "\e22b";}',
81
- 'branding_watermark' => '.icon-branding_watermark:before {content: "\e06b";}',
82
- 'brightness_1' => '.icon-brightness_1:before {content: "\e3a6";}',
83
- 'brightness_2' => '.icon-brightness_2:before {content: "\e3a7";}',
84
- 'brightness_3' => '.icon-brightness_3:before {content: "\e3a8";}',
85
- 'brightness_4' => '.icon-brightness_4:before {content: "\e3a9";}',
86
- 'brightness_low' => '.icon-brightness_low:before {content: "\e1ad";}',
87
- 'brightness_high' => '.icon-brightness_high:before {content: "\e1ac";}',
88
- 'brightness_auto' => '.icon-brightness_auto:before {content: "\e1ab";}',
89
- 'broken_image' => '.icon-broken_image:before {content: "\e3ad";}',
90
- 'brush' => '.icon-brush:before {content: "\e3ae";}',
91
- 'bubble_chart' => '.icon-bubble_chart:before {content: "\e6dd";}',
92
- 'bug_report' => '.icon-bug_report:before {content: "\e868";}',
93
- 'build' => '.icon-build:before {content: "\e869";}',
94
- 'burst_mode' => '.icon-burst_mode:before {content: "\e43c";}',
95
- 'domain' => '.icon-domain:before {content: "\e7ee";}',
96
- 'business_center' => '.icon-business_center:before {content: "\eb3f";}',
97
- 'cached' => '.icon-cached:before {content: "\e86a";}',
98
- 'cake' => '.icon-cake:before {content: "\e7e9";}',
99
- 'phone' => '.icon-phone:before {content: "\e0cd";}',
100
- 'call_end' => '.icon-call_end:before {content: "\e0b1";}',
101
- 'call_made' => '.icon-call_made:before {content: "\e0b2";}',
102
- 'merge_type' => '.icon-merge_type:before {content: "\e252";}',
103
- 'call_missed' => '.icon-call_missed:before {content: "\e0b4";}',
104
- 'call_missed_outgoing' => '.icon-call_missed_outgoing:before {content: "\e0e4";}',
105
- 'call_received' => '.icon-call_received:before {content: "\e0b5";}',
106
- 'call_split' => '.icon-call_split:before {content: "\e0b6";}',
107
- 'call_to_action' => '.icon-call_to_action:before {content: "\e06c";}',
108
- 'camera' => '.icon-camera:before {content: "\e3af";}',
109
- 'photo_camera' => '.icon-photo_camera:before {content: "\e412";}',
110
- 'camera_enhance' => '.icon-camera_enhance:before {content: "\e8fc";}',
111
- 'camera_front' => '.icon-camera_front:before {content: "\e3b1";}',
112
- 'camera_roll' => '.icon-camera_roll:before {content: "\e3b3";}',
113
- 'cancel' => '.icon-cancel:before {content: "\e5c9";}',
114
- 'redeem' => '.icon-redeem:before {content: "\e8b1";}',
115
- 'card_membership' => '.icon-card_membership:before {content: "\e8f7";}',
116
- 'card_travel' => '.icon-card_travel:before {content: "\e8f8";}',
117
- 'casino' => '.icon-casino:before {content: "\eb40";}',
118
- 'center_focus_strong' => '.icon-center_focus_strong:before {content: "\e3b4";}',
119
- 'center_focus_weak' => '.icon-center_focus_weak:before {content: "\e3b5";}',
120
- 'change_history' => '.icon-change_history:before {content: "\e86b";}',
121
- 'chat' => '.icon-chat:before {content: "\e0b7";}',
122
- 'chat_bubble' => '.icon-chat_bubble:before {content: "\e0ca";}',
123
- 'check' => '.icon-check:before {content: "\e5ca";}',
124
- 'check_box' => '.icon-check_box:before {content: "\e834";}',
125
- 'check_box_outline_blank' => '.icon-check_box_outline_blank:before {content:"\e835";}',
126
- 'check_circle' => '.icon-check_circle:before {content: "\e86c";}',
127
- 'navigate_before' => '.icon-navigate_before:before {content: "\e408";}',
128
- 'navigate_next' => '.icon-navigate_next:before {content: "\e409";}',
129
- 'child_care' => '.icon-child_care:before {content: "\eb41";}',
130
- 'child_friendly' => '.icon-child_friendly:before {content: "\eb42";}',
131
- 'chrome_reader_mode' => '.icon-chrome_reader_mode:before {content: "\e86d";}',
132
- 'close' => '.icon-close:before {content: "\e5cd";}',
133
- 'clear_all' => '.icon-clear_all:before {content: "\e0b8";}',
134
- 'closed_caption' => '.icon-closed_caption:before {content: "\e01c";}',
135
- 'wb_cloudy' => '.icon-wb_cloudy:before {content: "\e42d";}',
136
- 'cloud_circle' => '.icon-cloud_circle:before {content: "\e2be";}',
137
- 'cloud_done' => '.icon-cloud_done:before {content: "\e2bf";}',
138
- 'cloud_download' => '.icon-cloud_download:before {content: "\e2c0";}',
139
- 'cloud_off' => '.icon-cloud_off:before {content: "\e2c1";}',
140
- 'cloud_queue' => '.icon-cloud_queue:before {content: "\e2c2";}',
141
- 'code' => '.icon-code:before {content: "\e86f";}',
142
- 'photo_library' => '.icon-photo_library:before {content: "\e413";}',
143
- 'collections_bookmark' => '.icon-collections_bookmark:before {content: "\e431";}',
144
- 'palette' => '.icon-palette:before {content: "\e40a";}',
145
- 'colorize' => '.icon-colorize:before {content: "\e3b8";}',
146
- 'comment' => '.icon-comment:before {content: "\e0b9";}',
147
- 'compare' => '.icon-compare:before {content: "\e3b9";}',
148
- 'compare_arrows' => '.icon-compare_arrows:before {content: "\e915";}',
149
- 'laptop' => '.icon-laptop:before {content: "\e31e";}',
150
- 'confirmation_number' => '.icon-confirmation_number:before {content: "\e638";}',
151
- 'contact_email' => '.icon-contact_email:before {content: "\e0d0";}',
152
- 'contact_phone' => '.icon-contact_phone:before {content: "\e0cf";}',
153
- 'contacts' => '.icon-contacts:before {content: "\e0ba";}',
154
- 'content_copy' => '.icon-content_copy:before {content: "\e14d";}',
155
- 'content_cut' => '.icon-content_cut:before {content: "\e14e";}',
156
- 'content_paste' => '.icon-content_paste:before {content: "\e14f";}',
157
- 'control_point' => '.icon-control_point:before {content: "\e3bb";}',
158
- 'copyright' => '.icon-copyright:before {content: "\e90c";}',
159
- 'mode_edit' => '.icon-mode_edit:before {content: "\e254";}',
160
- 'create_new_folder' => '.icon-create_new_folder:before {content: "\e2cc";}',
161
- 'payment' => '.icon-payment:before {content: "\e8a1";}',
162
- 'crop' => '.icon-crop:before {content: "\e3be";}',
163
- 'crop_16_9' => '.icon-crop_16_9:before {content: "\e3bc";}',
164
- 'crop_3_2' => '.icon-crop_3_2:before {content: "\e3bd";}',
165
- 'crop_landscape' => '.icon-crop_landscape:before {content: "\e3c3";}',
166
- 'crop_7_5' => '.icon-crop_7_5:before {content: "\e3c0";}',
167
- 'crop_din' => '.icon-crop_din:before {content: "\e3c1";}',
168
- 'crop_free' => '.icon-crop_free:before {content: "\e3c2";}',
169
- 'crop_original' => '.icon-crop_original:before {content: "\e3c4";}',
170
- 'crop_portrait' => '.icon-crop_portrait:before {content: "\e3c5";}',
171
- 'crop_rotate' => '.icon-crop_rotate:before {content: "\e437";}',
172
- 'crop_square' => '.icon-crop_square:before {content: "\e3c6";}',
173
- 'dashboard' => '.icon-dashboard:before {content: "\e871";}',
174
- 'data_usage' => '.icon-data_usage:before {content: "\e1af";}',
175
- 'data_range' => '.icon-data_range:before {content: "\e916";}',
176
- 'dehaze' => '.icon-dehaze:before {content: "\e3c7";}',
177
- 'delete' => '.icon-delete:before {content: "\e872";}',
178
- 'delete_forever' => '.icon-delete_forever:before {content: "\e92b";}',
179
- 'delete_sweep' => '.icon-delete_sweep:before {content: "\e16c";}',
180
- 'description' => '.icon-description:before {content: "\e873";}',
181
- 'desktop_mac' => '.icon-desktop_mac:before {content: "\e30b";}',
182
- 'desktop_windows' => '.icon-desktop_windows:before {content: "\e30c";}',
183
- 'details' => '.icon-details:before {content: "\e3c8";}',
184
- 'developer_board' => '.icon-developer_board:before {content: "\e30d";}',
185
- 'developer_mode' => '.icon-developer_mode:before {content: "\e1b0";}',
186
- 'device_hub' => '.icon-device_hub:before {content: "\e335";}',
187
- 'phonelink' => '.icon-phonelink:before {content: "\e326";}',
188
- 'devices_other' => '.icon-devices_other:before {content: "\e337";}',
189
- 'dialer_sip' => '.icon-dialer_sip:before {content: "\e0bb";}',
190
- 'dialerpad' => '.icon-dialerpad:before {content: "\e0bc";}',
191
- 'directions' => '.icon-directions:before {content: "\e52e";}',
192
- 'directions_bike' => '.icon-directions_bike:before {content: "\e52f";}',
193
- 'directions_boat' => '.icon-directions_boat:before {content: "\e532";}',
194
- 'directions_bus' => '.icon-directions_bus:before {content: "\e530";}',
195
- 'directions_car' => '.icon-directions_car:before {content: "\e531";}',
196
- 'directions_run' => '.icon-directions_run:before {content: "\e566";}',
197
- 'directions_transit' => '.icon-directions_transit:before {content: "\e535";}',
198
- 'directions_walk' => '.icon-directions_walk:before {content: "\e536";}',
199
- 'disc_full' => '.icon-disc_full:before {content: "\e610";}',
200
- 'dns' => '.icon-dns:before {content: "\e875";}',
201
- 'not_interested' => '.icon-not_interested:before {content: "\e033";}',
202
- 'do_not_disturb_alt' => '.icon-do_not_disturb_alt:before {content: "\e611";}',
203
- 'do_not_disturb_off' => '.icon-do_not_disturb_off:before {content: "\e643";}',
204
- 'remove_circle' => '.icon-remove_circle:before {content: "\e15c";}',
205
- 'dock' => '.icon-dock:before {content: "\e30c";}',
206
- 'done' => '.icon-done:before {content: "\e876";}',
207
- 'done_all' => '.icon-done_all:before {content: "\e877";}',
208
- 'donut_large' => '.icon-donut_large:before {content: "\e917";}',
209
- 'donut_small' => '.icon-donut_small:before {content: "\e918";}',
210
- 'drafts' => '.icon-drafts:before {content: "\e151";}',
211
- 'drag_handle' => '.icon-drag_handle:before {content: "\e25d";}',
212
- 'time_to_leave' => '.icon-time_to_leave:before {content: "\e62c";}',
213
- 'dvr' => '.icon-dvr:before {content: "\e1b2";}',
214
- 'edit_location' => '.icon-edit_location:before {content: "\e568";}',
215
- 'eject' => '.icon-eject:before {content: "\e8fb";}',
216
- 'markunread' => '.icon-markunread:before {content: "\e159";}',
217
- 'enhanced_encryption' => '.icon-enhanced_encryption:before {content: "\e63f";}',
218
- 'equalizer' => '.icon-equalizer:before {content: "\e01d";}',
219
- 'error '=> '.icon-error:before {content: "\e000";}',
220
- 'error_outline '=> '.icon-error_outline:before {content: "\e001";}',
221
- 'euro_symbol '=> '.icon-euro_symbol:before {content: "\e926";}',
222
- 'ev_station '=> '.icon-ev_station:before {content: "\e56d";}',
223
- 'insert_invitation '=> '.icon-insert_invitation:before {content: "\e24f";}',
224
- 'event_available '=> '.icon-event_available:before {content: "\e614";}',
225
- 'event_busy '=> '.icon-event_busy:before {content: "\e615";}',
226
- 'event_note '=> '.icon-event_note:before {content: "\e616";}',
227
- 'event_seat '=> '.icon-event_seat:before {content: "\e903";}',
228
- 'exit_to_app '=> '.icon-exit_to_app:before {content: "\e879";}',
229
- 'expand_less '=> '.icon-expand_less:before {content: "\e5ce";}',
230
- 'expand_more '=> '.icon-expand_more:before {content: "\e5cf";}',
231
- 'explicit '=> '.icon-explicit:before {content: "\e01e";}',
232
- 'explore '=> '.icon-explore:before {content: "\e87a";}',
233
- 'exposure '=> '.icon-exposure:before {content: "\e3ca";}',
234
- 'exposure_zero '=> '.icon-exposure_zero:before {content: "\e3cf";}',
235
- 'extension '=> '.icon-extension:before {content: "\e87b";}',
236
- 'face '=> '.icon-face:before {content: "\e87c";}',
237
- 'fast_forward '=> '.icon-fast_forward:before {content: "\e01f";}',
238
- 'fast_rewind '=> '.icon-fast_rewind:before {content: "\e020";}',
239
- 'favorite '=> '.icon-favorite:before {content: "\e87d";}',
240
- 'favorite_border '=> '.icon-favorite_border:before {content: "\e87e";}',
241
- 'featured_play_list '=> '.icon-featured_play_list:before {content: "\e06d";}',
242
- 'featured_video '=> '.icon-featured_video:before {content: "\e06e";}',
243
- 'sms_failed '=> '.icon-sms_failed:before {content: "\e626";}',
244
- 'fiber_manual_record '=> '.icon-fiber_manual_record:before {content: "\e061";}',
245
- 'fiber_new '=> '.icon-fiber_new:before {content: "\e05e";}',
246
- 'fiber_smart_record '=> '.icon-fiber_smart_record:before {content: "\e062";}',
247
- 'get_app '=> '.icon-get_app:before {content: "\e884";}',
248
- 'file_upload'=> '.icon-file_upload:before {content: "\e2c6";}',
249
- 'filter'=> '.icon-filter:before {content: "\e3d3";}',
250
- 'filter_9_plus'=> '.icon-filter_9_plus:before {content: "\e3da";}',
251
- 'filter_b_and_w'=> '.icon-filter_b_and_w:before {content: "\e3db";}',
252
- 'filter_center_focus'=> '.icon-filter_center_focus:before {content: "\e3dc";}',
253
- 'filter_drama'=> '.icon-filter_drama:before {content: "\e3dd";}',
254
- 'filter_frames'=> '.icon-filter_frames:before {content: "\e3de";}',
255
- 'terrain'=> '.icon-terrain:before {content: "\e564";}',
256
- 'filter_list'=> '.icon-filter_list:before {content: "\e152";}',
257
- 'filter_none'=> '.icon-filter_none:before {content: "\e3e0";}',
258
- 'filter_tilt_shift'=> '.icon-filter_tilt_shift:before {content: "\e3e2";}',
259
- 'filter_vintage'=> '.icon-filter_vintage:before {content: "\e3e3";}',
260
- 'find_in_page'=> '.icon-find_in_page:before {content: "\e880";}',
261
- 'find_replace'=> '.icon-find_replace:before {content: "\e881";}',
262
- 'fingerprint'=> '.icon-fingerprint:before {content: "\e3e3";}',
263
- 'first_page'=> '.icon-first_page:before {content: "\e5dc";}',
264
- 'fitness_center'=> '.icon-fitness_center:before {content: "\eb43";}',
265
- 'flare'=> '.icon-flare:before {content: "\e3e4";}',
266
- 'flash_on'=> '.icon-flash_on:before {content: "\e3e7";}',
267
- 'flight_land'=> '.icon-flight_land:before {content: "\e904";}',
268
- 'flight_takeoff'=> '.icon-flight_takeoff:before {content: "\e905";}',
269
- 'folder'=> '.icon-folder:before {content: "\e2c7";}',
270
- 'folder_open'=> '.icon-folder_open:before {content: "\e2c8";}',
271
- 'folder_shared'=> '.icon-folder_shared:before {content: "\e2c9";}',
272
- 'folder_special'=> '.icon-folder_special:before {content: "\e617";}',
273
- 'font_download'=> '.icon-font_download:before {content: "\e167";}',
274
- 'format_align_center'=> '.icon-format_align_center:before {content: "\e234";}',
275
- 'format_align_justify'=> '.icon-format_align_justify:before {content: "\e235";}',
276
- 'format_align_left'=> '.icon-format_align_left:before {content: "\e236";}',
277
- 'format_align_right'=> '.icon-format_align_right:before {content: "\e237";}',
278
- 'format_bold'=> '.icon-format_bold:before {content: "\e238";}',
279
- 'format_clear'=> '.icon-format_clear:before {content: "\e239";}',
280
- 'format_color_fill'=> '.icon-format_color_fill:before {content: "\e23a";}',
281
- 'format_color_reset'=> '.icon-format_color_reset:before {content: "\e23b";}',
282
- 'format_color_text'=> '.icon-format_color_text:before {content: "\e23c";}',
283
- 'format_indent_decrease'=> '.icon-format_indent_decrease:before {content: "\e23d";}',
284
- 'format_indent_increase'=> '.icon-format_indent_increase:before {content: "\e23e";}',
285
- 'format_italic'=> '.icon-format_italic:before {content: "\e23f";}',
286
- 'format_line_spacing'=> '.icon-format_line_spacing:before {content: "\e240";}',
287
- 'format_line_bulleted'=> '.icon-format_line_bulleted:before {content: "\e241";}',
288
- 'format_list_numbered'=> '.icon-format_list_numbered:before {content: "\e242";}',
289
- 'format_paint'=> '.icon-format_paint:before {content: "\e243";}',
290
- 'format_quote'=> '.icon-format_quote:before {content: "\e244";}',
291
- 'format_shapes'=> '.icon-format_shapes:before {content: "\e25e";}',
292
- 'format_size'=> '.icon-format_size:before {content: "\e245";}',
293
- 'format_strikethrough'=> '.icon-format_strikethrough:before {content: "\e246";}',
294
- 'format_textdirection_l_to_r'=> '.icon-format_textdirection_l_to_r:before {content: "\e247";}',
295
- 'format_textdirection_r_to_l'=> '.icon-format_textdirection_r_to_l:before {content: "\e248";}',
296
- 'format_underlined'=> '.icon-format_underlined:before {content: "\e249";}',
297
- 'question_answer'=> '.icon-question_answer:before {content: "\e8af";}',
298
- 'forward'=> '.icon-forward:before {content: "\e154";}',
299
- 'forward_10'=> '.icon-forward_10:before {content: "\e056";}',
300
- 'forward_30'=> '.icon-forward_30:before {content: "\e057";}',
301
- 'forward_5'=> '.icon-forward_5:before {content: "\e058";}',
302
- 'free_breakfast'=> '.icon-free_breakfast:before {content: "\eb44";}',
303
- 'full_screen'=> '.icon-full_screen:before {content: "\e5d0";}',
304
- 'full_screen_exit'=> '.icon-full_screen_exit:before {content: "\e5d1";}',
305
- 'functions'=> '.icon-functions:before {content: "\e24a";}',
306
- 'g_translate'=> '.icon-g_translate:before {content: "\e927";}',
307
- 'games'=> '.icon-games:before {content: "\e021";}',
308
- 'gavel'=> '.icon-gavel:before {content: "\e90e";}',
309
- 'gesture'=> '.icon-gesture:before {content: "\e155";}',
310
- 'gif'=> '.icon-gif:before {content: "\e908";}',
311
- 'goat'=> '.icon-goat:before {content: "\e900";}',
312
- 'golf_course'=> '.icon-golf_course:before {content: "\eb45";}',
313
- 'my_location'=> '.icon-my_location:before {content: "\e55c";}',
314
- 'location_searching'=> '.icon-location_searching:before {content: "\e1b7";}',
315
- 'location_disabled'=> '.icon-location_disabled:before {content: "\e1b6";}',
316
- 'star'=> '.icon-star:before {content: "\e838";}',
317
- 'gradient'=> '.icon-gradient:before {content: "\e3e9";}',
318
- 'grain'=> '.icon-grain:before {content: "\e3ea";}',
319
- 'graphic_eq'=> '.icon-graphic_eq:before {content: "\e1b8";}',
320
- 'grid_off'=> '.icon-grid_off:before {content: "\e3eb";}',
321
- 'grid_on'=> '.icon-grid_on:before {content: "\e3ec";}',
322
- 'people'=> '.icon-people:before {content: "\e7fb";}',
323
- 'group_add'=> '.icon-group_add:before {content: "\e7f0";}',
324
- 'group_work'=> '.icon-group_work:before {content: "\e886";}',
325
- 'hd'=> '.icon-hd:before {content: "\e052";}',
326
- 'hdr_strong'=> '.icon-hdr_strong:before {content: "\e3f1";}',
327
- 'hdr_weak'=> '.icon-hdr_weak:before {content: "\e3f2";}',
328
- 'headset'=> '.icon-headset:before {content: "\e310";}',
329
- 'healing'=> '.icon-healing:before {content: "\e3f3";}',
330
- 'hearing'=> '.icon-hearing:before {content: "\e023";}',
331
- 'help'=> '.icon-help:before {content: "\e887";}',
332
- 'help_outline'=> '.icon-help_outline:before {content: "\e8fd";}',
333
- 'high_quality'=> '.icon-high_quality:before {content: "\e024";}',
334
- 'highlight'=> '.icon-highlight:before {content: "\e25f";}',
335
- 'highlight_off'=> '.icon-highlight_off:before {content: "\e888";}',
336
- 'restore'=> '.icon-restore:before {content: "\e8b3";}',
337
- 'home'=> '.icon-home:before {content: "\e88a";}',
338
- 'hot_tub'=> '.icon-hot_tub:before {content: "\eb46";}',
339
- 'local_hotel'=> '.icon-local_hotel:before {content: "\e549";}',
340
- 'hourglass_empty'=> '.icon-hourglass_empty:before {content: "\e88b";}',
341
- 'hourglass_full'=> '.icon-hourglass_full:before {content: "\e88c";}',
342
- 'lock'=> '.icon-lock:before {content: "\e897";}',
343
- 'photo'=> '.icon-photo:before {content: "\e410";}',
344
- 'image_aspect_ratio'=> '.icon-image_aspect_ratio:before {content: "\e3f5";}',
345
- 'import_contact'=> '.icon-import_contact:before {content: "\e0e0";}',
346
- 'import_export'=> '.icon-import_export:before {content: "\e0c3";}',
347
- 'important_device'=> '.icon-important_device:before {content: "\e912";}',
348
- 'inbox'=> '.icon-inbox:before {content: "\e156";}',
349
- 'indeterminate_check_box'=> '.icon-indeterminate_check_box:before {content: "\e909";}',
350
- 'info'=> '.icon-info:before {content: "\e88e";}',
351
- 'info_outline'=> '.icon-info_outline:before {content: "\e88f";}',
352
- 'input'=> '.icon-input:before {content: "\e890";}',
353
- 'insert_comment'=> '.icon-insert_comment:before {content: "\e24c";}',
354
- 'insert_drive_file'=> '.icon-insert_drive_file:before {content: "\e24d";}',
355
- 'tag_faces'=> '.icon-tag_faces:before {content: "\e420";}',
356
- 'link'=> '.icon-link:before {content: "\e157";}',
357
- 'invert_colors'=> '.icon-invert_colors:before {content: "\e891";}',
358
- 'invert_colors_off'=> '.icon-invert_colors_off:before {content: "\e0c4";}',
359
- 'iso'=> '.icon-iso:before {content: "\e3f6";}',
360
- 'keyboard'=> '.icon-keyboard:before {content: "\e312";}',
361
- 'keyboard_arrow_down'=> '.icon-keyboard_arrow_down:before {content: "\e313";}',
362
- 'keyboard_arrow_left'=> '.icon-keyboard_arrow_left:before {content: "\e314";}',
363
- 'keyboard_arrow_right'=> '.icon-keyboard_arrow_right:before {content: "\e315";}',
364
- 'keyboard_arrow_up'=> '.icon-keyboard_arrow_up:before {content: "\e316";}',
365
- 'keyboard_backspace'=> '.icon-keyboard_backspace:before {content: "\e317";}',
366
- 'keyboard_capslock'=> '.icon-keyboard_capslock:before {content: "\e318";}',
367
- 'keyboard_return'=> '.icon-keyboard_return:before {content: "\e31b";}',
368
- 'keyboard_tab'=> '.icon-keyboard_tab:before {content: "\e31c";}',
369
- 'keyboard_voice'=> '.icon-keyboard_voice:before {content: "\e31d";}',
370
- 'kitchen'=> '.icon-kitchen:before {content: "\eb47";}',
371
- 'lable'=> '.icon-lable:before {content: "\e892";}',
372
- 'lable_outline'=> '.icon-lable_outline:before {content: "\e893";}',
373
- 'language'=> '.icon-language:before {content: "\e894";}',
374
- 'laptop_chromebook'=> '.icon-laptop_chromebook:before {content: "\e31f";}',
375
- 'laptop_mac'=> '.icon-laptop_mac:before {content: "\e320";}',
376
- 'last_page'=> '.icon-last_page:before {content: "\e5dd";}',
377
- 'open_in_new'=> '.icon-open_in_new:before {content: "\e89e";}',
378
- 'layers'=> '.icon-layers:before {content: "\e53b";}',
379
- 'layers_clear'=> '.icon-layers_clear:before {content: "\e53c";}',
380
- 'leak_add'=> '.icon-leak_add:before {content: "\e3f8";}',
381
- 'lens'=> '.icon-lens:before {content: "\e3fa";}',
382
- 'library_books'=> '.icon-library_books:before {content: "\e02f";}',
383
- 'library_music'=> '.icon-library_music:before {content: "\e030";}',
384
- 'lightbulb_outline'=> '.icon-lightbulb_outline:before {content: "\e90f";}',
385
- 'line_weight'=> '.icon-line_weight:before {content: "\e91a";}',
386
- 'linear_scale'=> '.icon-linear_scale:before {content: "\e260";}',
387
- 'linked_camera'=> '.icon-linked_camera:before {content: "\e438";}',
388
- 'list'=> '.icon-list:before {content: "\e896";}',
389
- 'live_help'=> '.icon-live_help:before {content: "\e0c6";}',
390
- 'live_tv'=> '.icon-live_tv:before {content: "\e639";}',
391
- 'local_play'=> '.icon-local_play:before {content: "\e553";}',
392
- 'local_airport'=> '.icon-local_airport:before {content: "\e55d";}',
393
- 'local_atm'=> '.icon-local_atm:before {content: "\e53e";}',
394
- 'local_bar'=> '.icon-local_bar:before {content: "\e540";}',
395
- 'local_cafe'=> '.icon-local_cafe:before {content: "\e541";}',
396
- 'local_car_wash'=> '.icon-local_car_wash:before {content: "\e542";}',
397
- 'local_convenience_store'=> '.icon-local_convenience_store:before {content: "\e543";}',
398
- 'restaurant_menu'=> '.icon-restaurant_menu:before {content: "\e561";}',
399
- 'local_drink'=> '.icon-local_drink:before {content: "\e544";}',
400
- 'local_florist'=> '.icon-local_florist:before {content: "\e545";}',
401
- 'local_gas_station'=> '.icon-local_gas_station:before {content: "\e546";}',
402
- 'shopping_cart'=> '.icon-shopping_cart:before {content: "\e8cc";}',
403
- 'local_hospital'=> '.icon-local_hospital:before {content: "\e548";}',
404
- 'local_laundry_service'=> '.icon-local_laundry_service:before {content: "\e54a";}',
405
- 'local_library'=> '.icon-local_library:before {content: "\e54b";}',
406
- 'local_mall'=> '.icon-local_mall:before {content: "\e54c";}',
407
- 'theaters'=> '.icon-theaters:before {content: "\e8da";}',
408
- 'local_offer'=> '.icon-local_offer:before {content: "\e54e";}',
409
- 'local_parking'=> '.icon-local_parking:before {content: "\e54f";}',
410
- 'local_pharmacy'=> '.icon-local_pharmacy:before {content: "\e550";}',
411
- 'local_pizza'=> '.icon-local_pizza:before {content: "\e552";}',
412
- 'print'=> '.icon-print:before {content: "\e8ad";}',
413
- 'local_shipping'=> '.icon-local_shipping:before {content: "\e558";}',
414
- 'local_taxi'=> '.icon-local_taxi:before {content: "\e559";}',
415
- 'local_city'=> '.icon-local_city:before {content: "\e7f1";}',
416
- 'location_off'=> '.icon-location_off:before {content: "\e0c7";}',
417
- 'room'=> '.icon-room:before {content: "\e8b4";}',
418
- 'lock_open'=> '.icon-lock_open:before {content: "\e898";}',
419
- 'lock_outline'=> '.icon-lock_outline:before {content: "\e899";}',
420
- 'looks'=> '.icon-looks:before {content: "\e3fc";}',
421
- 'sync'=> '.icon-sync:before {content: "\e627";}',
422
- 'loupe'=> '.icon-loupe:before {content: "\e402";}',
423
- 'low_priority'=> '.icon-low_priority:before {content: "\e16d";}',
424
- 'loyalty'=> '.icon-loyalty:before {content: "\e89a";}',
425
- 'mail_outline'=> '.icon-mail_outline:before {content: "\e0e1";}',
426
- 'map'=> '.icon-map:before {content: "\e55b";}',
427
- 'markunread_mailbox'=> '.icon-markunread_mailbox:before {content: "\e89b";}',
428
- 'memory'=> '.icon-memory:before {content: "\e322";}',
429
- 'menu'=> '.icon-menu:before {content: "\e5d2";}',
430
- 'message'=> '.icon-message:before {content: "\e0c9";}',
431
- 'mic'=> '.icon-mic:before {content: "\e029";}',
432
- 'mic_none'=> '.icon-mic_none:before {content: "\e02a";}',
433
- 'mic_off'=> '.icon-mic_off:before {content: "\e02b";}',
434
- 'mms'=> '.icon-mms:before {content: "\e618";}',
435
- 'mode_comment'=> '.icon-mode_comment:before {content: "\e253";}',
436
- 'monetization_on'=> '.icon-monetization_on:before {content: "\e263";}',
437
- 'money_off'=> '.icon-money_off:before {content: "\e25c";}',
438
- 'monochrome_photos'=> '.icon-monochrome_photos:before {content: "\e403";}',
439
- 'mood_bad'=> '.icon-mood_bad:before {content: "\e7f3";}',
440
- 'more'=> '.icon-more:before {content: "\e619";}',
441
- 'more_horiz'=> '.icon-more_horiz:before {content: "\e5d3";}',
442
- 'more_vert'=> '.icon-more_vert:before {content: "\e5d4";}',
443
- 'motorcycle'=> '.icon-motorcycle:before {content: "\e91b";}',
444
- 'mouse'=> '.icon-mouse:before {content: "\e323";}',
445
- 'move_to_inbox'=> '.icon-move_to_inbox:before {content: "\e168";}',
446
- 'movie_creation'=> '.icon-movie_creation:before {content: "\e404";}',
447
- 'movie_filter'=> '.icon-movie_filter:before {content: "\e43a";}',
448
- 'multiline_chart'=> '.icon-multiline_chart:before {content: "\e6df";}',
449
- 'music_note'=> '.icon-music_note:before {content: "\e405";}',
450
- 'music_video'=> '.icon-music_video:before {content: "\e063";}',
451
- 'nature'=> '.icon-nature:before {content: "\e406";}',
452
- 'nature_people'=> '.icon-nature_people:before {content: "\e407";}',
453
- 'navigation'=> '.icon-navigation:before {content: "\e55d";}',
454
- 'near_me'=> '.icon-near_me:before {content: "\e569";}',
455
- 'network_cell'=> '.icon-network_cell:before {content: "\e1b9";}',
456
- 'network_check'=> '.icon-network_check:before {content: "\e640";}',
457
- 'new_releases'=> '.icon-new_releases:before {content: "\e031";}',
458
- 'next_week'=> '.icon-next_week:before {content: "\e16a";}',
459
- 'nfc'=> '.icon-nfc:before {content: "\e1bb";}',
460
- 'no_encryption'=> '.icon-no_encryption:before {content: "\e641";}',
461
- 'note'=> '.icon-note:before {content: "\e06f";}',
462
- 'note_add'=> '.icon-note_add:before {content: "\e89c";}',
463
- 'notifications'=> '.icon-notifications:before {content: "\e7f4";}',
464
- 'notifications_active'=> '.icon-notifications_active:before {content: "\e7f7";}',
465
- 'notifications_none'=> '.icon-notifications_none:before {content: "\e7f5";}',
466
- 'notifications_off'=> '.icon-notifications_off:before {content: "\e7f6";}',
467
- 'notifications_paused'=> '.icon-notifications_paused:before {content: "\e7f8";}',
468
- 'offline_pin'=> '.icon-offline_pin:before {content: "\e90a";}',
469
- 'ondemand_video'=> '.icon-ondemand_video:before {content: "\e63a";}',
470
- 'opacity'=> '.icon-opacity:before {content: "\e91c";}',
471
- 'open_in_browser'=> '.icon-open_in_browser:before {content: "\e89d";}',
472
- 'open_with'=> '.icon-open_with:before {content: "\e89f";}',
473
- 'pages'=> '.icon-pages:before {content: "\e7f9";}',
474
- 'pageview'=> '.icon-pageview:before {content: "\e8a0";}',
475
- 'pan_tool'=> '.icon-pan_tool:before {content: "\e925";}',
476
- 'panorama'=> '.icon-panorama:before {content: "\e40b";}',
477
- 'radio_button_unchecked'=> '.icon-radio_button_unchecked:before {content: "\e836";}',
478
- 'panorama_horizontal'=> '.icon-panorama_horizontal:before {content: "\e40d";}',
479
- 'panorama_vertical'=> '.icon-panorama_vertical:before {content: "\e40e";}',
480
- 'panorama_wide_angle'=> '.icon-panorama_wide_angle:before {content: "\e40f";}',
481
- 'party_mode'=> '.icon-party_mode:before {content: "\e7fa";}',
482
- 'pause'=> '.icon-pause:before {content: "\e034";}',
483
- 'pause_circle_filled'=> '.icon-pause_circle_filled:before {content: "\e035";}',
484
- 'pause_circle_outline'=> '.icon-pause_circle_outline:before {content: "\e036";}',
485
- 'people_outline'=> '.icon-people_outline:before {content: "\e7fc";}',
486
- 'perm_camera_mic'=> '.icon-perm_camera_mic:before {content: "\e8a2";}',
487
- 'perm_contact_calendar'=> '.icon-perm_contact_calendar:before {content: "\e8a3";}',
488
- 'perm_device_information'=> '.icon-perm_device_information:before {content: "\e8a5";}',
489
- 'person_outline'=> '.icon-person_outline:before {content: "\e7ff";}',
490
- 'perm_media'=> '.icon-perm_media:before {content: "\e8a7";}',
491
- 'person'=> '.icon-person:before {content: "\e7fd";}',
492
- 'person_add'=> '.icon-person_add:before {content: "\e7fe";}',
493
- 'person_pin'=> '.icon-person_pin:before {content: "\e55a";}',
494
- 'person_pin_circle'=> '.icon-person_pin_circle:before {content: "\e56a";}',
495
- 'personal_video'=> '.icon-personal_video:before {content: "\e63b";}',
496
- 'pets'=> '.icon-pets:before {content: "\e91d";}',
497
- 'phone_android'=> '.icon-phone_android:before {content: "\e324";}',
498
- 'phone_bluetooth_speaker'=> '.icon-phone_bluetooth_speaker:before {content: "\e61b";}',
499
- 'phone_forwarded'=> '.icon-phone_forwarded:before {content: "\e61c";}',
500
- 'phone_in_talk'=> '.icon-phone_in_talk:before {content: "\e61d";}',
501
- 'phone_iphone'=> '.icon-phone_iphone:before {content: "\e325";}',
502
- 'phone_locked'=> '.icon-phone_locked:before {content: "\e61e";}',
503
- 'phone_missed'=> '.icon-phone_missed:before {content: "\e61f";}',
504
- 'phone_paused'=> '.icon-phone_paused:before {content: "\e620";}',
505
- 'phonelink_erase'=> '.icon-phonelink_erase:before {content: "\e0db";}',
506
- 'phonelink_lock'=> '.icon-phonelink_lock:before {content: "\e0dc";}',
507
- 'phonelink_off'=> '.icon-phonelink_off:before {content: "\e327";}',
508
- 'phonelink_ring'=> '.icon-phonelink_ring:before {content: "\e0dd";}',
509
- 'phonelink_setup'=> '.icon-phonelink_setup:before {content: "\e0de";}',
510
- 'photo_album'=> '.icon-photo_album:before {content: "\e411";}',
511
- 'photo_size_select_actual'=> '.icon-photo_size_select_actual:before {content: "\e432";}',
512
- 'picture_in_picture'=> '.icon-picture_in_picture:before {content: "\e8aa";}',
513
- 'picture_in_picture_alt'=> '.icon-picture_in_picture_alt:before {content: "\e911";}',
514
- 'pie_chart'=> '.icon-pie_chart:before {content: "\e6c4";}',
515
- 'pie_chart_outlined'=> '.icon-pie_chart_outlined:before {content: "\e6c5";}',
516
- 'pin_drop'=> '.icon-pin_drop:before {content: "\e55e";}',
517
- 'play_arrow'=> '.icon-play_arrow:before {content: "\e037";}',
518
- 'play_circle_filled'=> '.icon-play_circle_filled:before {content: "\e038";}',
519
- 'play_circle_outline'=> '.icon-play_circle_outline:before {content: "\e039";}',
520
- 'play_for_work'=> '.icon-play_for_work:before {content: "\e906";}',
521
- 'playlist_add'=> '.icon-playlist_add:before {content: "\e03b";}',
522
- 'playlist_add_check'=> '.icon-playlist_add_check:before {content: "\e065";}',
523
- 'playlist_play'=> '.icon-playlist_play:before {content: "\e05f";}',
524
- 'polymer'=> '.icon-polymer:before {content: "\e8ab";}',
525
- 'pool'=> '.icon-pool:before {content: "\eb48";}',
526
- 'portable_wifi_off'=> '.icon-portable_wifi_off:before {content: "\e0ce";}',
527
- 'portrait'=> '.icon-portrait:before {content: "\e416";}',
528
- 'power'=> '.icon-power:before {content: "\e63c";}',
529
- 'power_input'=> '.icon-power_input:before {content: "\e336";}',
530
- 'power_settings_new'=> '.icon-power_settings_new:before {content: "\e8ac";}',
531
- 'pregnant_woman'=> '.icon-pregnant_woman:before {content: "\e91e";}',
532
- 'present_to_all'=> '.icon-present_to_all:before {content: "\e0df";}',
533
- 'priority_high'=> '.icon-priority_high:before {content: "\e645";}',
534
- 'public'=> '.icon-public:before {content: "\e80b";}',
535
- 'publish'=> '.icon-publish:before {content: "\e255";}',
536
- 'queue_music'=> '.icon-queue_music:before {content: "\e03d";}',
537
- 'queue_play_next'=> '.icon-queue_play_next:before {content: "\e066";}',
538
- 'radio'=> '.icon-radio:before {content: "\e03e";}',
539
- 'radio_button_checked'=> '.icon-radio_button_checked:before {content: "\e837";}',
540
- 'rate_review'=> '.icon-rate_review:before {content: "\e560";}',
541
- 'receipt'=> '.icon-receipt:before {content: "\e8b0";}',
542
- 'recent_actors'=> '.icon-recent_actors:before {content: "\e03f";}',
543
- 'record_voice_over'=> '.icon-record_voice_over:before {content: "\e91f";}',
544
- 'redo'=> '.icon-redo:before {content: "\e15a";}',
545
- 'refresh'=> '.icon-refresh:before {content: "\e5d5";}',
546
- 'remove'=> '.icon-remove:before {content: "\e15b";}',
547
- 'remove_circle_outline'=> '.icon-remove_circle_outline:before {content: "\e15d";}',
548
- 'remove_from_queue'=> '.icon-remove_from_queue:before {content: "\e067";}',
549
- 'visibility'=> '.icon-visibility:before {content: "\e8f4";}',
550
- 'remove_shopping_cart'=> '.icon-remove_shopping_cart:before {content: "\e928";}',
551
- 'reorder'=> '.icon-reorder:before {content: "\e8fe";}',
552
- 'repeat'=> '.icon-repeat:before {content: "\e040";}',
553
- 'replay'=> '.icon-replay:before {content: "\e042";}',
554
- 'replay_30'=> '.icon-replay_30:before {content: "\e05a";}',
555
- 'reply'=> '.icon-reply:before {content: "\e15e";}',
556
- 'reply_all'=> '.icon-reply_all:before {content: "\e15f";}',
557
- 'report'=> '.icon-report:before {content: "\e160";}',
558
- 'warning'=> '.icon-warning:before {content: "\e002";}',
559
- 'restaurant'=> '.icon-restaurant:before {content: "\e56c";}',
560
- 'restore_page'=> '.icon-restore_page:before {content: "\e929";}',
561
- 'ring_volume'=> '.icon-ring_volume:before {content: "\e0d1";}',
562
- 'room_service'=> '.icon-room_service:before {content: "\eb49";}',
563
- 'rotate_90_degrees_ccw'=> '.icon-rotate_90_degrees_ccw:before {content: "\e418";}',
564
- 'rotate_left'=> '.icon-rotate_left:before {content: "\e419";}',
565
- 'rotate_right'=> '.icon-rotate_right:before {content: "\e41a";}',
566
- 'router'=> '.icon-router:before {content: "\e328";}',
567
- 'rowing'=> '.icon-rowing:before {content: "\e921";}',
568
- 'rss_feed'=> '.icon-rss_feed:before {content: "\e0e5";}',
569
- 'rv_hookup'=> '.icon-rv_hookup:before {content: "\e642";}',
570
- 'satellite'=> '.icon-satellite:before {content: "\e562";}',
571
- 'save'=> '.icon-save:before {content: "\e161";}',
572
- 'scanner'=> '.icon-scanner:before {content: "\e329";}',
573
- 'school'=> '.icon-school:before {content: "\e80c";}',
574
- 'screen_lock_landscape'=> '.icon-screen_lock_landscape:before {content: "\e1be";}',
575
- 'screen_lock_portrait'=> '.icon-screen_lock_portrait:before {content: "\e1bf";}',
576
- 'screen_share'=> '.icon-screen_share:before {content: "\e0e2";}',
577
- 'search'=> '.icon-search:before {content: "\e8b6";}',
578
- 'security'=> '.icon-security:before {content: "\e32a";}',
579
- 'select_all'=> '.icon-select_all:before {content: "\e162";}',
580
- 'send'=> '.icon-send:before {content: "\e163";}',
581
- 'sentiment_dissatisfied'=> '.icon-sentiment_dissatisfied:before {content: "\e811";}',
582
- 'sentiment_neutral'=> '.icon-sentiment_neutral:before {content: "\e812";}',
583
- 'sentiment_satisfied'=> '.icon-sentiment_satisfied:before {content: "\e813";}',
584
- 'sentiment_very_dissatisfied'=> '.icon-sentiment_very_dissatisfied:before {content: "\e814";}',
585
- 'sentiment_very_satisfied'=> '.icon-sentiment_very_satisfied:before {content: "\e815";}',
586
- 'settings'=> '.icon-settings:before {content: "\e8b8";}',
587
- 'settings_applications'=> '.icon-settings_applications:before {content: "\e8b9";}',
588
- 'settings_backup_restore'=> '.icon-settings_backup_restore:before {content: "\e8ba";}',
589
- 'settings_brightness'=> '.icon-settings_brightness:before {content: "\e8bd";}',
590
- 'settings_cell'=> '.icon-settings_cell:before {content: "\e8bc";}',
591
- 'settings_ethernet'=> '.icon-settings_ethernet:before {content: "\e8be";}',
592
- 'settings_input_antenna'=> '.icon-settings_input_antenna:before {content: "\e8bf";}',
593
- 'settings_input_composite'=> '.icon-settings_input_composite:before {content: "\e8c1";}',
594
- 'settings_input_hdmi'=> '.icon-settings_input_hdmi:before {content: "\e8c2";}',
595
- 'settings_input_svideo'=> '.icon-settings_input_svideo:before {content: "\e8c3";}',
596
- 'settings_overscan'=> '.icon-settings_overscan:before {content: "\e8c4";}',
597
- 'settings_phone'=> '.icon-settings_phone:before {content: "\e8c5";}',
598
- 'settings_power'=> '.icon-settings_power:before {content: "\e8c6";}',
599
- 'settings_remote'=> '.icon-settings_remote:before {content: "\e8c7";}',
600
- 'settings_system_daydream'=> '.icon-settings_system_daydream:before {content: "\e8c8";}',
601
- 'share'=> '.icon-share:before {content: "\e80d";}',
602
- 'shop'=> '.icon-shop:before {content: "\e8c9";}',
603
- 'shop_two'=> '.icon-shop_two:before {content: "\e8ca";}',
604
- 'shopping_basket'=> '.icon-shopping_basket:before {content: "\e8cb";}',
605
- 'short_text'=> '.icon-short_text:before {content: "\e261";}',
606
- 'show_chart'=> '.icon-show_chart:before {content: "\e6e1";}',
607
- 'shuffle'=> '.icon-shuffle:before {content: "\e043";}',
608
- 'signal_cellular_4_bar'=> '.icon-signal_cellular_4_bar:before {content: "\e1c8";}',
609
- 'signal_wifi_4_bar'=> '.icon-signal_wifi_4_bar:before {content: "\e1d8";}',
610
- 'skip_next'=> '.icon-skip_next:before {content: "\e044";}',
611
- 'skip_previous'=> '.icon-skip_previous:before {content: "\e045";}',
612
- 'slideshow'=> '.icon-slideshow:before {content: "\e41b";}',
613
- 'slow_motion_video'=> '.icon-slow_motion_video:before {content: "\e068";}',
614
- 'stay_primary_portrait'=> '.icon-stay_primary_portrait:before {content: "\e0d6";}',
615
- 'smoke_free'=> '.icon-smoke_free:before {content: "\eb4a";}',
616
- 'smoking_rooms'=> '.icon-smoking_rooms:before {content: "\eb4b";}',
617
- 'textsms'=> '.icon-textsms:before {content: "\e0d8";}',
618
- 'snooze'=> '.icon-snooze:before {content: "\e046";}',
619
- 'sort'=> '.icon-sort:before {content: "\e164";}',
620
- 'sort_by_alpha'=> '.icon-sort_by_alpha:before {content: "\e053";}',
621
- 'spa'=> '.icon-spa:before {content: "\eb4c";}',
622
- 'space_bar'=> '.icon-space_bar:before {content: "\e256";}',
623
- 'speaker'=> '.icon-speaker:before {content: "\e32d";}',
624
- 'speaker_group'=> '.icon-speaker_group:before {content: "\e32e";}',
625
- 'speaker_notes'=> '.icon-speaker_notes:before {content: "\e8cd";}',
626
- 'speaker_phone'=> '.icon-speaker_phone:before {content: "\e0d2";}',
627
- 'spellcheck'=> '.icon-spellcheck:before {content: "\e8ce";}',
628
- 'star_border'=> '.icon-star_border:before {content: "\e83a";}',
629
- 'star_half'=> '.icon-star_half:before {content: "\e839";}',
630
- 'stars'=> '.icon-stars:before {content: "\e8d0";}',
631
- 'stay_primary_landscape'=> '.icon-stay_primary_landscape:before {content: "\e0d5";}',
632
- 'stop'=> '.icon-stop:before {content: "\e047";}',
633
- 'stop_screen_share'=> '.icon-stop_screen_share:before {content: "\e0e3";}',
634
- 'storage'=> '.icon-storage:before {content: "\e1db";}',
635
- 'store_mall_directory'=> '.icon-store_mall_directory:before {content: "\e563";}',
636
- 'straighten'=> '.icon-straighten:before {content: "\e41c";}',
637
- 'streetview'=> '.icon-streetview:before {content: "\e56e";}',
638
- 'format_strikethrough_s'=> '.icon-format_strikethrough_s:before {content: "\e257";}',
639
- 'style'=> '.icon-style:before {content: "\e41d";}',
640
- 'subdirectory_arrow_left'=> '.icon-subdirectory_arrow_left:before {content: "\e5d9";}',
641
- 'subdirectory_arrow_right'=> '.icon-subdirectory_arrow_right:before {content: "\e5da";}',
642
- 'subject'=> '.icon-subject:before {content: "\e8d2";}',
643
- 'subscriptions'=> '.icon-subscriptions:before {content: "\e064";}',
644
- 'subtitles'=> '.icon-subtitles:before {content: "\e048";}',
645
- 'subway'=> '.icon-subway:before {content: "\e56f";}',
646
- 'supervisor_account'=> '.icon-supervisor_account:before {content: "\e8d3";}',
647
- 'surround_sound'=> '.icon-surround_sound:before {content: "\e049";}',
648
- 'swap_calls'=> '.icon-swap_calls:before {content: "\e0d7";}',
649
- 'swap_horiz'=> '.icon-swap_horiz:before {content: "\e8d4";}',
650
- 'swap_vert'=> '.icon-swap_vert:before {content: "\e8d5";}',
651
- 'swap_vertical_circle'=> '.icon-swap_vertical_circle:before {content: "\e8d6";}',
652
- 'switch_camera'=> '.icon-switch_camera:before {content: "\e41e";}',
653
- 'switch_video'=> '.icon-switch_video:before {content: "\e41f";}',
654
- 'sync_problem'=> '.icon-sync_problem:before {content: "\e629";}',
655
- 'system_update'=> '.icon-system_update:before {content: "\e62a";}',
656
- 'system_update_alt'=> '.icon-system_update_alt:before {content: "\e8d7";}',
657
- 'tab'=> '.icon-tab:before {content: "\e8d8";}',
658
- 'tablet'=> '.icon-tablet:before {content: "\e32f";}',
659
- 'tablet_android'=> '.icon-tablet_android:before {content: "\e330";}',
660
- 'tablet_mac'=> '.icon-tablet_mac:before {content: "\e331";}',
661
- 'text_fields'=> '.icon-text_fields:before {content: "\e262";}',
662
- 'text_format'=> '.icon-text_format:before {content: "\e165";}',
663
- 'texture'=> '.icon-texture:before {content: "\e421";}',
664
- 'thumb_down'=> '.icon-thumb_down:before {content: "\e8db";}',
665
- 'thumb_up'=> '.icon-thumb_up:before {content: "\e8dc";}',
666
- 'thumb_up_down'=> '.icon-thumb_up_down:before {content: "\e8dd";}',
667
- 'timelapse'=> '.icon-timelapse:before {content: "\e422";}',
668
- 'timeline'=> '.icon-timeline:before {content: "\e922";}',
669
- 'timer'=> '.icon-timer:before {content: "\e425";}',
670
- 'timer_off'=> '.icon-timer_off:before {content: "\e426";}',
671
- 'title'=> '.icon-title:before {content: "\e264";}',
672
- 'toc'=> '.icon-toc:before {content: "\e8de";}',
673
- 'today'=> '.icon-today:before {content: "\e8df";}',
674
- 'toll'=> '.icon-toll:before {content: "\e8e0";}',
675
- 'tonality'=> '.icon-tonality:before {content: "\e427";}',
676
- 'touch_app'=> '.icon-touch_app:before {content: "\e913";}',
677
- 'toys'=> '.icon-toys:before {content: "\e332";}',
678
- 'track'=> '.icon-track:before {content: "\e8e1";}',
679
- 'traffic'=> '.icon-traffic:before {content: "\e565";}',
680
- 'train'=> '.icon-train:before {content: "\e570";}',
681
- 'tram'=> '.icon-tram:before {content: "\e571";}',
682
- 'transfer_within_a_station'=> '.icon-transfer_within_a_station:before {content: "\e572";}',
683
- 'transform'=> '.icon-transform:before {content: "\e428";}',
684
- 'translate'=> '.icon-translate:before {content: "\e8e2";}',
685
- 'trending_down'=> '.icon-trending_down:before {content: "\e8e3";}',
686
- 'trending_flat'=> '.icon-trending_flat:before {content: "\e8e4";}',
687
- 'trending_up'=> '.icon-trending_up:before {content: "\e8e5";}',
688
- 'tune'=> '.icon-tune:before {content: "\e429";}',
689
- 'tv'=> '.icon-tv:before {content: "\e333";}',
690
- 'unarchive'=> '.icon-unarchive:before {content: "\e169";}',
691
- 'undo'=> '.icon-undo:before {content: "\e166";}',
692
- 'unfold_less'=> '.icon-unfold_less:before {content: "\e5d6";}',
693
- 'unfold_more'=> '.icon-unfold_more:before {content: "\e5d7";}',
694
- 'update'=> '.icon-update:before {content: "\e923";}',
695
- 'usb'=> '.icon-usb:before {content: "\e1e0";}',
696
- 'verified_user'=> '.icon-verified_user:before {content: "\e8e8";}',
697
- 'vertical_align_center'=> '.icon-vertical_align_center:before {content: "\e259";}',
698
- 'vertical_align_top'=> '.icon-vertical_align_top:before {content: "\e25a";}',
699
- 'vibration'=> '.icon-vibration:before {content: "\e52d";}',
700
- 'video_call'=> '.icon-video_call:before {content: "\e070";}',
701
- 'video_label'=> '.icon-video_label:before {content: "\e071";}',
702
- 'video_library'=> '.icon-video_library:before {content: "\e04a";}',
703
- 'videocam'=> '.icon-videocam:before {content: "\e04b";}',
704
- 'videocam_off'=> '.icon-videocam_off:before {content: "\e04c";}',
705
- 'videogame_asset'=> '.icon-videogame_asset:before {content: "\e338";}',
706
- 'view_agenda'=> '.icon-view_agenda:before {content: "\e8e9";}',
707
- 'view_array'=> '.icon-view_array:before {content: "\e8ea";}',
708
- 'view_carousel'=> '.icon-view_carousel:before {content: "\e8eb";}',
709
- 'view_column'=> '.icon-view_column:before {content: "\e8ec";}',
710
- 'view_comfy'=> '.icon-view_comfy:before {content: "\e42a";}',
711
- 'view_compact'=> '.icon-view_compact:before {content: "\e42b";}',
712
- 'view_day'=> '.icon-view_day:before {content: "\e8ed";}',
713
- 'view_headline'=> '.icon-view_headline:before {content: "\e8ee";}',
714
- 'view_list'=> '.icon-view_list:before {content: "\e8ef";}',
715
- 'view_module'=> '.icon-view_module:before {content: "\e8f0";}',
716
- 'view_quilt'=> '.icon-view_quilt:before {content: "\e8f1";}',
717
- 'view_stream'=> '.icon-view_stream:before {content: "\e8f2";}',
718
- 'view_week'=> '.icon-view_week:before {content: "\e8f3";}',
719
- 'vignette'=> '.icon-vignette:before {content: "\e435";}',
720
- 'visibility_off'=> '.icon-visibility_off:before {content: "\e8f5";}',
721
- 'voice_chat'=> '.icon-voice_chat:before {content: "\e62e";}',
722
- 'voicemail'=> '.icon-voicemail:before {content: "\e0d9";}',
723
- 'vpn_key'=> '.icon-vpn_key:before {content: "\e0da";}',
724
- 'vpn_lock'=> '.icon-vpn_lock:before {content: "\e62f";}',
725
- 'wallpaper'=> '.icon-wallpaper:before {content: "\e1bc";}',
726
- 'watch'=> '.icon-watch:before {content: "\e334";}',
727
- 'watch_later'=> '.icon-watch_later:before {content: "\e924";}',
728
- 'wb_iridescent'=> '.icon-wb_iridescent:before {content: "\e436";}',
729
- 'wb_sunny'=> '.icon-wb_sunny:before {content: "\e430";}',
730
- 'wc'=> '.icon-wc:before {content: "\e63d";}',
731
- 'web'=> '.icon-web:before {content: "\e051";}',
732
- 'web_asset'=> '.icon-web_asset:before {content: "\e069";}',
733
- 'weekend'=> '.icon-weekend:before {content: "\e16b";}',
734
- 'whatshot'=> '.icon-whatshot:before {content: "\e80e";}',
735
- 'widgets'=> '.icon-widgets:before {content: "\e1bd";}',
736
- 'wifi'=> '.icon-wifi:before {content: "\e63e";}',
737
- 'work'=> '.icon-work:before {content: "\e8f9";}',
738
- 'wrap_text'=> '.icon-wrap_text:before {content: "\e25b";}',
739
- 'youtube_searched_for'=> '.icon-youtube_searched_for:before {content: "\e8fa";}',
740
- 'zoom_in'=> '.icon-zoom_in:before {content: "\e8ff";}',
741
- 'zoom_out'=> '.icon-zoom_out:before {content: "\e901";}',
742
- 'zoom_out_map'=> '.icon-zoom_out_map:before {content: "\e56b";}',
743
- 'apple'=> '.icon-apple:before {content: "\e902";}',
744
- 'bitcoin'=> '.icon-bitcoin:before {content: "\e907";}',
745
- 'buffer'=> '.icon-buffer:before {content: "\e910";}',
746
- 'digg'=> '.icon-digg:before {content: "\e919";}',
747
- 'dribbble'=> '.icon-dribbble:before {content: "\e920";}',
748
- 'dropbox'=> '.icon-dropbox:before {content: "\e92a";}',
749
- 'evernote'=> '.icon-evernote:before {content: "\e92c";}',
750
- 'facebook'=> '.icon-facebook:before {content: "\e92d";}',
751
- 'feedly'=> '.icon-feedly:before {content: "\e92e";}',
752
- 'github'=> '.icon-github:before {content: "\e92f";}',
753
- 'gmail'=> '.icon-gmail:before {content: "\e930";}',
754
- 'gplus'=> '.icon-gplus:before {content: "\e931";}',
755
- 'instagram'=> '.icon-instagram:before {content: "\e932";}',
756
- 'sharing-line'=> '.icon-sharing-line:before {content: "\e933";}',
757
- 'linkedin'=> '.icon-linkedin:before {content: "\e934";}',
758
- 'messanger'=> '.icon-messanger:before {content: "\e935";}',
759
- 'odnoklassniki'=> '.icon-odnoklassniki:before {content: "\e936";}',
760
- 'pinterest'=> '.icon-pinterest:before {content: "\e937";}',
761
- 'reddit'=> '.icon-reddit:before {content: "\e938";}',
762
- 'shopify'=> '.icon-shopify:before {content: "\e93a";}',
763
- 'weibo'=> '.icon-weibo:before {content: "\e93a";}',
764
- 'skype'=> '.icon-skype:before {content: "\e93b";}',
765
- 'slack'=> '.icon-slack:before {content: "\e93c";}',
766
- 'soundcloud'=> '.icon-soundcloud:before {content: "\e93d";}',
767
- 'stumbleupon'=> '.icon-stumbleupon:before {content: "\e93e";}',
768
- 'telegram'=> '.icon-telegram:before {content: "\e93f";}',
769
- 'tumblr'=> '.icon-tumblr:before {content: "\e940";}',
770
- 'twitch'=> '.icon-twitch:before {content: "\e941";}',
771
- 'twitter'=> '.icon-twitter:before {content: "\e942";}',
772
- 'viber'=> '.icon-viber:before {content: "\e943";}',
773
- 'vk'=> '.icon-vk:before {content: "\e944";}',
774
- 'wechat'=> '.icon-wechat:before {content: "\e945";}',
775
- 'whatsapp'=> '.icon-whatsapp:before {content: "\e946";}',
776
- 'youtube'=> '.icon-youtube:before {content: "\e947";}'
777
- );
778
-
779
  ?>
1
+ <?php
2
+ return array( 'widgets' => '.icon-widgets:before { content: "\e1bd";}',
3
+ 'search' => '.icon-search:after{ content: "\e8b6"; }',
4
+ 'shopping-cart' => '.icon-shopping-cart:after {content: "\e8cc";}',
5
+ '3d_rotation' => '.icon-3d_rotation:before {content: "\e84d";}',
6
+ 'ac_unit' => '.icon-ac_unit:before {content: "\eb3b";}',
7
+ 'alarm' => '.icon-alarm:before {content: "\e855";}',
8
+ 'access_alarms' => '.icon-access_alarms:before {content: "\e191";}',
9
+ 'schedule' => '.icon-schedule:before {content: "\e8b5";}',
10
+ 'accessibility' => '.icon-accessibility:before {content: "\e84e";}',
11
+ 'accessible' => '.icon-accessible:before {content: "\e914";}',
12
+ 'account_balance' => '.icon-account_balance:before {content: "\e84f";}',
13
+ 'account_balance_wallet' => '.icon-account_balance_wallet:before {content: "\e850";}',
14
+ 'account_box' => '.icon-account_box:before {content: "\e851";}',
15
+ 'account_circle' => '.icon-account_circle:before {content: "\e853";}',
16
+ 'add' => '.icon-add:before {content: "\e145";}',
17
+ 'add_a_photo' => '.icon-add_a_photo:before {content: "\e439";}',
18
+ 'alarm_add' => '.icon-alarm_add:before {content: "\e856";}',
19
+ 'add_alert' => '.icon-add_alert:before {content: "\e003";}',
20
+ 'add_box' => '.icon-add_box:before {content: "\e146";}',
21
+ 'add_circle' => '.icon-add_circle:before {content: "\e147";}',
22
+ 'control_point ' => '.icon-control_point:before {content: "\e3ba";}',
23
+ 'add_location ' => '.icon-add_location:before {content: "\e567";}',
24
+ 'add_shopping_cart ' => '.icon-add_shopping_cart:before {content: "\e854";}',
25
+ 'queue ' => '.icon-queue:before {content: "\e03c";}',
26
+ 'add_to_queue ' => '.icon-add_to_queue:before {content: "\e05c";}',
27
+ 'adjust ' => '.icon-adjust:before {content: "\e39e";}',
28
+ 'flight ' => '.icon-flight:before {content: "\e539";}',
29
+ 'airplay ' => '.icon-airplay:before {content: "\e055";}',
30
+ 'airport_shuttle ' => '.icon-airport_shuttle:before {content: "\eb3c";}',
31
+ 'alarm_off ' => '.icon-alarm_off:before {content: "\e857";}',
32
+ 'alarm_on ' => '.icon-alarm_on:before {content: "\e858";}',
33
+ 'album ' => '.icon-album:before {content: "\e019";}',
34
+ 'all_inclusive ' => '.icon-all_inclusive:before {content: "\eb3d";}',
35
+ 'all_out' => '.icon-all_out:before {content: "\e90b";}',
36
+ 'android' => '.icon-android:before {content: "\e859";}',
37
+ 'announcement' => '.icon-announcement:before {content: "\e85a";}',
38
+ 'apps' => '.icon-apps:before {content: "\e5c3";}',
39
+ 'archive' => '.icon-archive:before {content: "\e149";}',
40
+ 'arrow_back' => '.icon-arrow_back:before {content: "\e5c4";}',
41
+ 'arrow_downward' => '.icon-arrow_downward:before {content: "\e5db";}',
42
+ 'arrow_drop_down' => '.icon-arrow_drop_down:before {content: "\e5c5";}',
43
+ 'arrow_drop_down_circle' => '.icon-arrow_drop_down_circle:before {content: "\e5c6";}',
44
+ 'arrow_drop_up' => '.icon-arrow_drop_up:before {content: "\e5c7";}',
45
+ 'arrow_forward' => '.icon-arrow_forward:before {content: "\e5c8";}',
46
+ 'arrow_upward' => '.icon-arrow_upward:before {content: "\e5d8";}',
47
+ 'art_track' => '.icon-art_track:before {content: "\e060";}',
48
+ 'aspect_ratio' => '.icon-aspect_ratio:before {content: "\e85b";}',
49
+ 'poll' => '.icon-poll:before {content: "\e801";}',
50
+ 'assignment' => '.icon-assignment:before {content: "\e85d";}',
51
+ 'assignment_ind' => '.icon-assignment_ind:before {content: "\e85e";}',
52
+ 'assignment_late' => '.icon-assignment_late:before {content: "\e85f";}',
53
+ 'assignment_return' => '.icon-assignment_return:before {content: "\e860";}',
54
+ 'assignment_returned' => '.icon-assignment_returned:before {content: "\e861";}',
55
+ 'assignment_turned_in' => '.icon-assignment_turned_in:before {content: "\e862";}',
56
+ 'assistant' => '.icon-assistant:before {content: "\e39f";}',
57
+ 'flag' => '.icon-flag:before {content: "\e153";}',
58
+ 'attach_file' => '.icon-attach_file:before {content: "\e226";}',
59
+ 'attach_money' => '.icon-attach_money:before {content: "\e227";}',
60
+ 'attachment' => '.icon-attachment:before {content: "\e2bc";}',
61
+ 'audiotrack' => '.icon-audiotrack:before {content: "\e3a1";}',
62
+ 'autorenew' => '.icon-autorenew:before {content: "\e863";}',
63
+ 'av_timer' => '.icon-av_timer:before {content: "\e01b";}',
64
+ 'backspace' => '.icon-backspace:before {content: "\e14a";}',
65
+ 'cloud_upload' => '.icon-cloud_upload:before {content: "\e2c3";}',
66
+ 'battery_alert' => '.icon-battery_alert:before {content: "\e19c";}',
67
+ 'battery_charging_full' => '.icon-battery_charging_full:before {content: "\e1a3";}',
68
+ 'battery_std' => '.icon-battery_std:before {content: "\e1a5";}',
69
+ 'battery_unknown' => '.icon-battery_unknown:before {content: "\e1a6";}',
70
+ 'beach_access' => '.icon-beach_access:before {content: "\eb3e";}',
71
+ 'beenhere' => '.icon-beenhere:before {content: "\e52d";}',
72
+ 'block' => '.icon-block:before {content: "\e14b";}',
73
+ 'bluetooth' => '.icon-bluetooth:before {content: "\e1a7";}',
74
+ 'blur_circular' => '.icon-blur_circular:before {content: "\e3a2";}',
75
+ 'blur_linear' => '.icon-blur_linear:before {content: "\e3a3";}',
76
+ 'blur_on' => '.icon-blur_on:before {content: "\e3a5";}',
77
+ 'class' => '.icon-class:before {content: "\e86e";}',
78
+ 'turned_in' => '.icon-turned_in:before {content: "\e8e6";}',
79
+ 'turned_in_not' => '.icon-turned_in_not:before {content: "\e8e7";}',
80
+ 'border_color' => '.icon-border_color:before {content: "\e22b";}',
81
+ 'branding_watermark' => '.icon-branding_watermark:before {content: "\e06b";}',
82
+ 'brightness_1' => '.icon-brightness_1:before {content: "\e3a6";}',
83
+ 'brightness_2' => '.icon-brightness_2:before {content: "\e3a7";}',
84
+ 'brightness_3' => '.icon-brightness_3:before {content: "\e3a8";}',
85
+ 'brightness_4' => '.icon-brightness_4:before {content: "\e3a9";}',
86
+ 'brightness_low' => '.icon-brightness_low:before {content: "\e1ad";}',
87
+ 'brightness_high' => '.icon-brightness_high:before {content: "\e1ac";}',
88
+ 'brightness_auto' => '.icon-brightness_auto:before {content: "\e1ab";}',
89
+ 'broken_image' => '.icon-broken_image:before {content: "\e3ad";}',
90
+ 'brush' => '.icon-brush:before {content: "\e3ae";}',
91
+ 'bubble_chart' => '.icon-bubble_chart:before {content: "\e6dd";}',
92
+ 'bug_report' => '.icon-bug_report:before {content: "\e868";}',
93
+ 'build' => '.icon-build:before {content: "\e869";}',
94
+ 'burst_mode' => '.icon-burst_mode:before {content: "\e43c";}',
95
+ 'domain' => '.icon-domain:before {content: "\e7ee";}',
96
+ 'business_center' => '.icon-business_center:before {content: "\eb3f";}',
97
+ 'cached' => '.icon-cached:before {content: "\e86a";}',
98
+ 'cake' => '.icon-cake:before {content: "\e7e9";}',
99
+ 'phone' => '.icon-phone:before {content: "\e0cd";}',
100
+ 'call_end' => '.icon-call_end:before {content: "\e0b1";}',
101
+ 'call_made' => '.icon-call_made:before {content: "\e0b2";}',
102
+ 'merge_type' => '.icon-merge_type:before {content: "\e252";}',
103
+ 'call_missed' => '.icon-call_missed:before {content: "\e0b4";}',
104
+ 'call_missed_outgoing' => '.icon-call_missed_outgoing:before {content: "\e0e4";}',
105
+ 'call_received' => '.icon-call_received:before {content: "\e0b5";}',
106
+ 'call_split' => '.icon-call_split:before {content: "\e0b6";}',
107
+ 'call_to_action' => '.icon-call_to_action:before {content: "\e06c";}',
108
+ 'camera' => '.icon-camera:before {content: "\e3af";}',
109
+ 'photo_camera' => '.icon-photo_camera:before {content: "\e412";}',
110
+ 'camera_enhance' => '.icon-camera_enhance:before {content: "\e8fc";}',
111
+ 'camera_front' => '.icon-camera_front:before {content: "\e3b1";}',
112
+ 'camera_roll' => '.icon-camera_roll:before {content: "\e3b3";}',
113
+ 'cancel' => '.icon-cancel:before {content: "\e5c9";}',
114
+ 'redeem' => '.icon-redeem:before {content: "\e8b1";}',
115
+ 'card_membership' => '.icon-card_membership:before {content: "\e8f7";}',
116
+ 'card_travel' => '.icon-card_travel:before {content: "\e8f8";}',
117
+ 'casino' => '.icon-casino:before {content: "\eb40";}',
118
+ 'center_focus_strong' => '.icon-center_focus_strong:before {content: "\e3b4";}',
119
+ 'center_focus_weak' => '.icon-center_focus_weak:before {content: "\e3b5";}',
120
+ 'change_history' => '.icon-change_history:before {content: "\e86b";}',
121
+ 'chat' => '.icon-chat:before {content: "\e0b7";}',
122
+ 'chat_bubble' => '.icon-chat_bubble:before {content: "\e0ca";}',
123
+ 'check' => '.icon-check:before {content: "\e5ca";}',
124
+ 'check_box' => '.icon-check_box:before {content: "\e834";}',
125
+ 'check_box_outline_blank' => '.icon-check_box_outline_blank:before {content:"\e835";}',
126
+ 'check_circle' => '.icon-check_circle:before {content: "\e86c";}',
127
+ 'navigate_before' => '.icon-navigate_before:before {content: "\e408";}',
128
+ 'navigate_next' => '.icon-navigate_next:before {content: "\e409";}',
129
+ 'child_care' => '.icon-child_care:before {content: "\eb41";}',
130
+ 'child_friendly' => '.icon-child_friendly:before {content: "\eb42";}',
131
+ 'chrome_reader_mode' => '.icon-chrome_reader_mode:before {content: "\e86d";}',
132
+ 'close' => '.icon-close:before {content: "\e5cd";}',
133
+ 'clear_all' => '.icon-clear_all:before {content: "\e0b8";}',
134
+ 'closed_caption' => '.icon-closed_caption:before {content: "\e01c";}',
135
+ 'wb_cloudy' => '.icon-wb_cloudy:before {content: "\e42d";}',
136
+ 'cloud_circle' => '.icon-cloud_circle:before {content: "\e2be";}',
137
+ 'cloud_done' => '.icon-cloud_done:before {content: "\e2bf";}',
138
+ 'cloud_download' => '.icon-cloud_download:before {content: "\e2c0";}',
139
+ 'cloud_off' => '.icon-cloud_off:before {content: "\e2c1";}',
140
+ 'cloud_queue' => '.icon-cloud_queue:before {content: "\e2c2";}',
141
+ 'code' => '.icon-code:before {content: "\e86f";}',
142
+ 'photo_library' => '.icon-photo_library:before {content: "\e413";}',
143
+ 'collections_bookmark' => '.icon-collections_bookmark:before {content: "\e431";}',
144
+ 'palette' => '.icon-palette:before {content: "\e40a";}',
145
+ 'colorize' => '.icon-colorize:before {content: "\e3b8";}',
146
+ 'comment' => '.icon-comment:before {content: "\e0b9";}',
147
+ 'compare' => '.icon-compare:before {content: "\e3b9";}',
148
+ 'compare_arrows' => '.icon-compare_arrows:before {content: "\e915";}',
149
+ 'laptop' => '.icon-laptop:before {content: "\e31e";}',
150
+ 'confirmation_number' => '.icon-confirmation_number:before {content: "\e638";}',
151
+ 'contact_email' => '.icon-contact_email:before {content: "\e0d0";}',
152
+ 'contact_phone' => '.icon-contact_phone:before {content: "\e0cf";}',
153
+ 'contacts' => '.icon-contacts:before {content: "\e0ba";}',
154
+ 'content_copy' => '.icon-content_copy:before {content: "\e14d";}',
155
+ 'content_cut' => '.icon-content_cut:before {content: "\e14e";}',
156
+ 'content_paste' => '.icon-content_paste:before {content: "\e14f";}',
157
+ 'control_point' => '.icon-control_point:before {content: "\e3bb";}',
158
+ 'copyright' => '.icon-copyright:before {content: "\e90c";}',
159
+ 'mode_edit' => '.icon-mode_edit:before {content: "\e254";}',
160
+ 'create_new_folder' => '.icon-create_new_folder:before {content: "\e2cc";}',
161
+ 'payment' => '.icon-payment:before {content: "\e8a1";}',
162
+ 'crop' => '.icon-crop:before {content: "\e3be";}',
163
+ 'crop_16_9' => '.icon-crop_16_9:before {content: "\e3bc";}',
164
+ 'crop_3_2' => '.icon-crop_3_2:before {content: "\e3bd";}',
165
+ 'crop_landscape' => '.icon-crop_landscape:before {content: "\e3c3";}',
166
+ 'crop_7_5' => '.icon-crop_7_5:before {content: "\e3c0";}',
167
+ 'crop_din' => '.icon-crop_din:before {content: "\e3c1";}',
168
+ 'crop_free' => '.icon-crop_free:before {content: "\e3c2";}',
169
+ 'crop_original' => '.icon-crop_original:before {content: "\e3c4";}',
170
+ 'crop_portrait' => '.icon-crop_portrait:before {content: "\e3c5";}',
171
+ 'crop_rotate' => '.icon-crop_rotate:before {content: "\e437";}',
172
+ 'crop_square' => '.icon-crop_square:before {content: "\e3c6";}',
173
+ 'dashboard' => '.icon-dashboard:before {content: "\e871";}',
174
+ 'data_usage' => '.icon-data_usage:before {content: "\e1af";}',
175
+ 'data_range' => '.icon-data_range:before {content: "\e916";}',
176
+ 'dehaze' => '.icon-dehaze:before {content: "\e3c7";}',
177
+ 'delete' => '.icon-delete:before {content: "\e872";}',
178
+ 'delete_forever' => '.icon-delete_forever:before {content: "\e92b";}',
179
+ 'delete_sweep' => '.icon-delete_sweep:before {content: "\e16c";}',
180
+ 'description' => '.icon-description:before {content: "\e873";}',
181
+ 'desktop_mac' => '.icon-desktop_mac:before {content: "\e30b";}',
182
+ 'desktop_windows' => '.icon-desktop_windows:before {content: "\e30c";}',
183
+ 'details' => '.icon-details:before {content: "\e3c8";}',
184
+ 'developer_board' => '.icon-developer_board:before {content: "\e30d";}',
185
+ 'developer_mode' => '.icon-developer_mode:before {content: "\e1b0";}',
186
+ 'device_hub' => '.icon-device_hub:before {content: "\e335";}',
187
+ 'phonelink' => '.icon-phonelink:before {content: "\e326";}',
188
+ 'devices_other' => '.icon-devices_other:before {content: "\e337";}',
189
+ 'dialer_sip' => '.icon-dialer_sip:before {content: "\e0bb";}',
190
+ 'dialerpad' => '.icon-dialerpad:before {content: "\e0bc";}',
191
+ 'directions' => '.icon-directions:before {content: "\e52e";}',
192
+ 'directions_bike' => '.icon-directions_bike:before {content: "\e52f";}',
193
+ 'directions_boat' => '.icon-directions_boat:before {content: "\e532";}',
194
+ 'directions_bus' => '.icon-directions_bus:before {content: "\e530";}',
195
+ 'directions_car' => '.icon-directions_car:before {content: "\e531";}',
196
+ 'directions_run' => '.icon-directions_run:before {content: "\e566";}',
197
+ 'directions_transit' => '.icon-directions_transit:before {content: "\e535";}',
198
+ 'directions_walk' => '.icon-directions_walk:before {content: "\e536";}',
199
+ 'disc_full' => '.icon-disc_full:before {content: "\e610";}',
200
+ 'dns' => '.icon-dns:before {content: "\e875";}',
201
+ 'not_interested' => '.icon-not_interested:before {content: "\e033";}',
202
+ 'do_not_disturb_alt' => '.icon-do_not_disturb_alt:before {content: "\e611";}',
203
+ 'do_not_disturb_off' => '.icon-do_not_disturb_off:before {content: "\e643";}',
204
+ 'remove_circle' => '.icon-remove_circle:before {content: "\e15c";}',
205
+ 'dock' => '.icon-dock:before {content: "\e30c";}',
206
+ 'done' => '.icon-done:before {content: "\e876";}',
207
+ 'done_all' => '.icon-done_all:before {content: "\e877";}',
208
+ 'donut_large' => '.icon-donut_large:before {content: "\e917";}',
209
+ 'donut_small' => '.icon-donut_small:before {content: "\e918";}',
210
+ 'drafts' => '.icon-drafts:before {content: "\e151";}',
211
+ 'drag_handle' => '.icon-drag_handle:before {content: "\e25d";}',
212
+ 'time_to_leave' => '.icon-time_to_leave:before {content: "\e62c";}',
213
+ 'dvr' => '.icon-dvr:before {content: "\e1b2";}',
214
+ 'edit_location' => '.icon-edit_location:before {content: "\e568";}',
215
+ 'eject' => '.icon-eject:before {content: "\e8fb";}',
216
+ 'markunread' => '.icon-markunread:before {content: "\e159";}',
217
+ 'enhanced_encryption' => '.icon-enhanced_encryption:before {content: "\e63f";}',
218
+ 'equalizer' => '.icon-equalizer:before {content: "\e01d";}',
219
+ 'error '=> '.icon-error:before {content: "\e000";}',
220
+ 'error_outline '=> '.icon-error_outline:before {content: "\e001";}',
221
+ 'euro_symbol '=> '.icon-euro_symbol:before {content: "\e926";}',
222
+ 'ev_station '=> '.icon-ev_station:before {content: "\e56d";}',
223
+ 'insert_invitation '=> '.icon-insert_invitation:before {content: "\e24f";}',
224
+ 'event_available '=> '.icon-event_available:before {content: "\e614";}',
225
+ 'event_busy '=> '.icon-event_busy:before {content: "\e615";}',
226
+ 'event_note '=> '.icon-event_note:before {content: "\e616";}',
227
+ 'event_seat '=> '.icon-event_seat:before {content: "\e903";}',
228
+ 'exit_to_app '=> '.icon-exit_to_app:before {content: "\e879";}',
229
+ 'expand_less '=> '.icon-expand_less:before {content: "\e5ce";}',
230
+ 'expand_more '=> '.icon-expand_more:before {content: "\e5cf";}',
231
+ 'explicit '=> '.icon-explicit:before {content: "\e01e";}',
232
+ 'explore '=> '.icon-explore:before {content: "\e87a";}',
233
+ 'exposure '=> '.icon-exposure:before {content: "\e3ca";}',
234
+ 'exposure_zero '=> '.icon-exposure_zero:before {content: "\e3cf";}',
235
+ 'extension '=> '.icon-extension:before {content: "\e87b";}',
236
+ 'face '=> '.icon-face:before {content: "\e87c";}',
237
+ 'fast_forward '=> '.icon-fast_forward:before {content: "\e01f";}',
238
+ 'fast_rewind '=> '.icon-fast_rewind:before {content: "\e020";}',
239
+ 'favorite '=> '.icon-favorite:before {content: "\e87d";}',
240
+ 'favorite_border '=> '.icon-favorite_border:before {content: "\e87e";}',
241
+ 'featured_play_list '=> '.icon-featured_play_list:before {content: "\e06d";}',
242
+ 'featured_video '=> '.icon-featured_video:before {content: "\e06e";}',
243
+ 'sms_failed '=> '.icon-sms_failed:before {content: "\e626";}',
244
+ 'fiber_manual_record '=> '.icon-fiber_manual_record:before {content: "\e061";}',
245
+ 'fiber_new '=> '.icon-fiber_new:before {content: "\e05e";}',
246
+ 'fiber_smart_record '=> '.icon-fiber_smart_record:before {content: "\e062";}',
247
+ 'get_app '=> '.icon-get_app:before {content: "\e884";}',
248
+ 'file_upload'=> '.icon-file_upload:before {content: "\e2c6";}',
249
+ 'filter'=> '.icon-filter:before {content: "\e3d3";}',
250
+ 'filter_9_plus'=> '.icon-filter_9_plus:before {content: "\e3da";}',
251
+ 'filter_b_and_w'=> '.icon-filter_b_and_w:before {content: "\e3db";}',
252
+ 'filter_center_focus'=> '.icon-filter_center_focus:before {content: "\e3dc";}',
253
+ 'filter_drama'=> '.icon-filter_drama:before {content: "\e3dd";}',
254
+ 'filter_frames'=> '.icon-filter_frames:before {content: "\e3de";}',
255
+ 'terrain'=> '.icon-terrain:before {content: "\e564";}',
256
+ 'filter_list'=> '.icon-filter_list:before {content: "\e152";}',
257
+ 'filter_none'=> '.icon-filter_none:before {content: "\e3e0";}',
258
+ 'filter_tilt_shift'=> '.icon-filter_tilt_shift:before {content: "\e3e2";}',
259
+ 'filter_vintage'=> '.icon-filter_vintage:before {content: "\e3e3";}',
260
+ 'find_in_page'=> '.icon-find_in_page:before {content: "\e880";}',
261
+ 'find_replace'=> '.icon-find_replace:before {content: "\e881";}',
262
+ 'fingerprint'=> '.icon-fingerprint:before {content: "\e3e3";}',
263
+ 'first_page'=> '.icon-first_page:before {content: "\e5dc";}',
264
+ 'fitness_center'=> '.icon-fitness_center:before {content: "\eb43";}',
265
+ 'flare'=> '.icon-flare:before {content: "\e3e4";}',
266
+ 'flash_on'=> '.icon-flash_on:before {content: "\e3e7";}',
267
+ 'flight_land'=> '.icon-flight_land:before {content: "\e904";}',
268
+ 'flight_takeoff'=> '.icon-flight_takeoff:before {content: "\e905";}',
269
+ 'folder'=> '.icon-folder:before {content: "\e2c7";}',
270
+ 'folder_open'=> '.icon-folder_open:before {content: "\e2c8";}',
271
+ 'folder_shared'=> '.icon-folder_shared:before {content: "\e2c9";}',
272
+ 'folder_special'=> '.icon-folder_special:before {content: "\e617";}',
273
+ 'font_download'=> '.icon-font_download:before {content: "\e167";}',
274
+ 'format_align_center'=> '.icon-format_align_center:before {content: "\e234";}',
275
+ 'format_align_justify'=> '.icon-format_align_justify:before {content: "\e235";}',
276
+ 'format_align_left'=> '.icon-format_align_left:before {content: "\e236";}',
277
+ 'format_align_right'=> '.icon-format_align_right:before {content: "\e237";}',
278
+ 'format_bold'=> '.icon-format_bold:before {content: "\e238";}',
279
+ 'format_clear'=> '.icon-format_clear:before {content: "\e239";}',
280
+ 'format_color_fill'=> '.icon-format_color_fill:before {content: "\e23a";}',
281
+ 'format_color_reset'=> '.icon-format_color_reset:before {content: "\e23b";}',
282
+ 'format_color_text'=> '.icon-format_color_text:before {content: "\e23c";}',
283
+ 'format_indent_decrease'=> '.icon-format_indent_decrease:before {content: "\e23d";}',
284
+ 'format_indent_increase'=> '.icon-format_indent_increase:before {content: "\e23e";}',
285
+ 'format_italic'=> '.icon-format_italic:before {content: "\e23f";}',
286
+ 'format_line_spacing'=> '.icon-format_line_spacing:before {content: "\e240";}',
287
+ 'format_line_bulleted'=> '.icon-format_line_bulleted:before {content: "\e241";}',
288
+ 'format_list_numbered'=> '.icon-format_list_numbered:before {content: "\e242";}',
289
+ 'format_paint'=> '.icon-format_paint:before {content: "\e243";}',
290
+ 'format_quote'=> '.icon-format_quote:before {content: "\e244";}',
291
+ 'format_shapes'=> '.icon-format_shapes:before {content: "\e25e";}',
292
+ 'format_size'=> '.icon-format_size:before {content: "\e245";}',
293
+ 'format_strikethrough'=> '.icon-format_strikethrough:before {content: "\e246";}',
294
+ 'format_textdirection_l_to_r'=> '.icon-format_textdirection_l_to_r:before {content: "\e247";}',
295
+ 'format_textdirection_r_to_l'=> '.icon-format_textdirection_r_to_l:before {content: "\e248";}',
296
+ 'format_underlined'=> '.icon-format_underlined:before {content: "\e249";}',
297
+ 'question_answer'=> '.icon-question_answer:before {content: "\e8af";}',
298
+ 'forward'=> '.icon-forward:before {content: "\e154";}',
299
+ 'forward_10'=> '.icon-forward_10:before {content: "\e056";}',
300
+ 'forward_30'=> '.icon-forward_30:before {content: "\e057";}',
301
+ 'forward_5'=> '.icon-forward_5:before {content: "\e058";}',
302
+ 'free_breakfast'=> '.icon-free_breakfast:before {content: "\eb44";}',
303
+ 'full_screen'=> '.icon-full_screen:before {content: "\e5d0";}',
304
+ 'full_screen_exit'=> '.icon-full_screen_exit:before {content: "\e5d1";}',
305
+ 'functions'=> '.icon-functions:before {content: "\e24a";}',
306
+ 'g_translate'=> '.icon-g_translate:before {content: "\e927";}',
307
+ 'games'=> '.icon-games:before {content: "\e021";}',
308
+ 'gavel'=> '.icon-gavel:before {content: "\e90e";}',
309
+ 'gesture'=> '.icon-gesture:before {content: "\e155";}',
310
+ 'gif'=> '.icon-gif:before {content: "\e908";}',
311
+ 'goat'=> '.icon-goat:before {content: "\e900";}',
312
+ 'golf_course'=> '.icon-golf_course:before {content: "\eb45";}',
313
+ 'my_location'=> '.icon-my_location:before {content: "\e55c";}',
314
+ 'location_searching'=> '.icon-location_searching:before {content: "\e1b7";}',
315
+ 'location_disabled'=> '.icon-location_disabled:before {content: "\e1b6";}',
316
+ 'star'=> '.icon-star:before {content: "\e838";}',
317
+ 'gradient'=> '.icon-gradient:before {content: "\e3e9";}',
318
+ 'grain'=> '.icon-grain:before {content: "\e3ea";}',
319
+ 'graphic_eq'=> '.icon-graphic_eq:before {content: "\e1b8";}',
320
+ 'grid_off'=> '.icon-grid_off:before {content: "\e3eb";}',
321
+ 'grid_on'=> '.icon-grid_on:before {content: "\e3ec";}',
322
+ 'people'=> '.icon-people:before {content: "\e7fb";}',
323
+ 'group_add'=> '.icon-group_add:before {content: "\e7f0";}',
324
+ 'group_work'=> '.icon-group_work:before {content: "\e886";}',
325
+ 'hd'=> '.icon-hd:before {content: "\e052";}',
326
+ 'hdr_strong'=> '.icon-hdr_strong:before {content: "\e3f1";}',
327
+ 'hdr_weak'=> '.icon-hdr_weak:before {content: "\e3f2";}',
328
+ 'headset'=> '.icon-headset:before {content: "\e310";}',
329
+ 'healing'=> '.icon-healing:before {content: "\e3f3";}',
330
+ 'hearing'=> '.icon-hearing:before {content: "\e023";}',
331
+ 'help'=> '.icon-help:before {content: "\e887";}',
332
+ 'help_outline'=> '.icon-help_outline:before {content: "\e8fd";}',
333
+ 'high_quality'=> '.icon-high_quality:before {content: "\e024";}',
334
+ 'highlight'=> '.icon-highlight:before {content: "\e25f";}',
335
+ 'highlight_off'=> '.icon-highlight_off:before {content: "\e888";}',
336
+ 'restore'=> '.icon-restore:before {content: "\e8b3";}',
337
+ 'home'=> '.icon-home:before {content: "\e88a";}',
338
+ 'hot_tub'=> '.icon-hot_tub:before {content: "\eb46";}',
339
+ 'local_hotel'=> '.icon-local_hotel:before {content: "\e549";}',
340
+ 'hourglass_empty'=> '.icon-hourglass_empty:before {content: "\e88b";}',
341
+ 'hourglass_full'=> '.icon-hourglass_full:before {content: "\e88c";}',
342
+ 'lock'=> '.icon-lock:before {content: "\e897";}',
343
+ 'photo'=> '.icon-photo:before {content: "\e410";}',
344
+ 'image_aspect_ratio'=> '.icon-image_aspect_ratio:before {content: "\e3f5";}',
345
+ 'import_contact'=> '.icon-import_contact:before {content: "\e0e0";}',
346
+ 'import_export'=> '.icon-import_export:before {content: "\e0c3";}',
347
+ 'important_device'=> '.icon-important_device:before {content: "\e912";}',
348
+ 'inbox'=> '.icon-inbox:before {content: "\e156";}',
349
+ 'indeterminate_check_box'=> '.icon-indeterminate_check_box:before {content: "\e909";}',
350
+ 'info'=> '.icon-info:before {content: "\e88e";}',
351
+ 'info_outline'=> '.icon-info_outline:before {content: "\e88f";}',
352
+ 'input'=> '.icon-input:before {content: "\e890";}',
353
+ 'insert_comment'=> '.icon-insert_comment:before {content: "\e24c";}',
354
+ 'insert_drive_file'=> '.icon-insert_drive_file:before {content: "\e24d";}',
355
+ 'tag_faces'=> '.icon-tag_faces:before {content: "\e420";}',
356
+ 'link'=> '.icon-link:before {content: "\e157";}',
357
+ 'invert_colors'=> '.icon-invert_colors:before {content: "\e891";}',
358
+ 'invert_colors_off'=> '.icon-invert_colors_off:before {content: "\e0c4";}',
359
+ 'iso'=> '.icon-iso:before {content: "\e3f6";}',
360
+ 'keyboard'=> '.icon-keyboard:before {content: "\e312";}',
361
+ 'keyboard_arrow_down'=> '.icon-keyboard_arrow_down:before {content: "\e313";}',
362
+ 'keyboard_arrow_left'=> '.icon-keyboard_arrow_left:before {content: "\e314";}',
363
+ 'keyboard_arrow_right'=> '.icon-keyboard_arrow_right:before {content: "\e315";}',
364
+ 'keyboard_arrow_up'=> '.icon-keyboard_arrow_up:before {content: "\e316";}',
365
+ 'keyboard_backspace'=> '.icon-keyboard_backspace:before {content: "\e317";}',
366
+ 'keyboard_capslock'=> '.icon-keyboard_capslock:before {content: "\e318";}',
367
+ 'keyboard_return'=> '.icon-keyboard_return:before {content: "\e31b";}',
368
+ 'keyboard_tab'=> '.icon-keyboard_tab:before {content: "\e31c";}',
369
+ 'keyboard_voice'=> '.icon-keyboard_voice:before {content: "\e31d";}',
370
+ 'kitchen'=> '.icon-kitchen:before {content: "\eb47";}',
371
+ 'lable'=> '.icon-lable:before {content: "\e892";}',
372
+ 'lable_outline'=> '.icon-lable_outline:before {content: "\e893";}',
373
+ 'language'=> '.icon-language:before {content: "\e894";}',
374
+ 'laptop_chromebook'=> '.icon-laptop_chromebook:before {content: "\e31f";}',
375
+ 'laptop_mac'=> '.icon-laptop_mac:before {content: "\e320";}',
376
+ 'last_page'=> '.icon-last_page:before {content: "\e5dd";}',
377
+ 'open_in_new'=> '.icon-open_in_new:before {content: "\e89e";}',
378
+ 'layers'=> '.icon-layers:before {content: "\e53b";}',
379
+ 'layers_clear'=> '.icon-layers_clear:before {content: "\e53c";}',
380
+ 'leak_add'=> '.icon-leak_add:before {content: "\e3f8";}',
381
+ 'lens'=> '.icon-lens:before {content: "\e3fa";}',
382
+ 'library_books'=> '.icon-library_books:before {content: "\e02f";}',
383
+ 'library_music'=> '.icon-library_music:before {content: "\e030";}',
384
+ 'lightbulb_outline'=> '.icon-lightbulb_outline:before {content: "\e90f";}',
385
+ 'line_weight'=> '.icon-line_weight:before {content: "\e91a";}',
386
+ 'linear_scale'=> '.icon-linear_scale:before {content: "\e260";}',
387
+ 'linked_camera'=> '.icon-linked_camera:before {content: "\e438";}',
388
+ 'list'=> '.icon-list:before {content: "\e896";}',
389
+ 'live_help'=> '.icon-live_help:before {content: "\e0c6";}',
390
+ 'live_tv'=> '.icon-live_tv:before {content: "\e639";}',
391
+ 'local_play'=> '.icon-local_play:before {content: "\e553";}',
392
+ 'local_airport'=> '.icon-local_airport:before {content: "\e55d";}',
393
+ 'local_atm'=> '.icon-local_atm:before {content: "\e53e";}',
394
+ 'local_bar'=> '.icon-local_bar:before {content: "\e540";}',
395
+ 'local_cafe'=> '.icon-local_cafe:before {content: "\e541";}',
396
+ 'local_car_wash'=> '.icon-local_car_wash:before {content: "\e542";}',
397
+ 'local_convenience_store'=> '.icon-local_convenience_store:before {content: "\e543";}',
398
+ 'restaurant_menu'=> '.icon-restaurant_menu:before {content: "\e561";}',
399
+ 'local_drink'=> '.icon-local_drink:before {content: "\e544";}',
400
+ 'local_florist'=> '.icon-local_florist:before {content: "\e545";}',
401
+ 'local_gas_station'=> '.icon-local_gas_station:before {content: "\e546";}',
402
+ 'shopping_cart'=> '.icon-shopping_cart:before {content: "\e8cc";}',
403
+ 'local_hospital'=> '.icon-local_hospital:before {content: "\e548";}',
404
+ 'local_laundry_service'=> '.icon-local_laundry_service:before {content: "\e54a";}',
405
+ 'local_library'=> '.icon-local_library:before {content: "\e54b";}',
406
+ 'local_mall'=> '.icon-local_mall:before {content: "\e54c";}',
407
+ 'theaters'=> '.icon-theaters:before {content: "\e8da";}',
408
+ 'local_offer'=> '.icon-local_offer:before {content: "\e54e";}',
409
+ 'local_parking'=> '.icon-local_parking:before {content: "\e54f";}',
410
+ 'local_pharmacy'=> '.icon-local_pharmacy:before {content: "\e550";}',
411
+ 'local_pizza'=> '.icon-local_pizza:before {content: "\e552";}',
412
+ 'print'=> '.icon-print:before {content: "\e8ad";}',
413
+ 'local_shipping'=> '.icon-local_shipping:before {content: "\e558";}',
414
+ 'local_taxi'=> '.icon-local_taxi:before {content: "\e559";}',
415
+ 'local_city'=> '.icon-local_city:before {content: "\e7f1";}',
416
+ 'location_off'=> '.icon-location_off:before {content: "\e0c7";}',
417
+ 'room'=> '.icon-room:before {content: "\e8b4";}',
418
+ 'lock_open'=> '.icon-lock_open:before {content: "\e898";}',
419
+ 'lock_outline'=> '.icon-lock_outline:before {content: "\e899";}',
420
+ 'looks'=> '.icon-looks:before {content: "\e3fc";}',
421
+ 'sync'=> '.icon-sync:before {content: "\e627";}',
422
+ 'loupe'=> '.icon-loupe:before {content: "\e402";}',
423
+ 'low_priority'=> '.icon-low_priority:before {content: "\e16d";}',
424
+ 'loyalty'=> '.icon-loyalty:before {content: "\e89a";}',
425
+ 'mail_outline'=> '.icon-mail_outline:before {content: "\e0e1";}',
426
+ 'map'=> '.icon-map:before {content: "\e55b";}',
427
+ 'markunread_mailbox'=> '.icon-markunread_mailbox:before {content: "\e89b";}',
428
+ 'memory'=> '.icon-memory:before {content: "\e322";}',
429
+ 'menu'=> '.icon-menu:before {content: "\e5d2";}',
430
+ 'message'=> '.icon-message:before {content: "\e0c9";}',
431
+ 'mic'=> '.icon-mic:before {content: "\e029";}',
432
+ 'mic_none'=> '.icon-mic_none:before {content: "\e02a";}',
433
+ 'mic_off'=> '.icon-mic_off:before {content: "\e02b";}',
434
+ 'mms'=> '.icon-mms:before {content: "\e618";}',
435
+ 'mode_comment'=> '.icon-mode_comment:before {content: "\e253";}',
436
+ 'monetization_on'=> '.icon-monetization_on:before {content: "\e263";}',
437
+ 'money_off'=> '.icon-money_off:before {content: "\e25c";}',
438
+ 'monochrome_photos'=> '.icon-monochrome_photos:before {content: "\e403";}',
439
+ 'mood_bad'=> '.icon-mood_bad:before {content: "\e7f3";}',
440
+ 'more'=> '.icon-more:before {content: "\e619";}',
441
+ 'more_horiz'=> '.icon-more_horiz:before {content: "\e5d3";}',
442
+ 'more_vert'=> '.icon-more_vert:before {content: "\e5d4";}',
443
+ 'motorcycle'=> '.icon-motorcycle:before {content: "\e91b";}',
444
+ 'mouse'=> '.icon-mouse:before {content: "\e323";}',
445
+ 'move_to_inbox'=> '.icon-move_to_inbox:before {content: "\e168";}',
446
+ 'movie_creation'=> '.icon-movie_creation:before {content: "\e404";}',
447
+ 'movie_filter'=> '.icon-movie_filter:before {content: "\e43a";}',
448
+ 'multiline_chart'=> '.icon-multiline_chart:before {content: "\e6df";}',
449
+ 'music_note'=> '.icon-music_note:before {content: "\e405";}',
450
+ 'music_video'=> '.icon-music_video:before {content: "\e063";}',
451
+ 'nature'=> '.icon-nature:before {content: "\e406";}',
452
+ 'nature_people'=> '.icon-nature_people:before {content: "\e407";}',
453
+ 'navigation'=> '.icon-navigation:before {content: "\e55d";}',
454
+ 'near_me'=> '.icon-near_me:before {content: "\e569";}',
455
+ 'network_cell'=> '.icon-network_cell:before {content: "\e1b9";}',
456
+ 'network_check'=> '.icon-network_check:before {content: "\e640";}',
457
+ 'new_releases'=> '.icon-new_releases:before {content: "\e031";}',
458
+ 'next_week'=> '.icon-next_week:before {content: "\e16a";}',
459
+ 'nfc'=> '.icon-nfc:before {content: "\e1bb";}',
460
+ 'no_encryption'=> '.icon-no_encryption:before {content: "\e641";}',
461
+ 'note'=> '.icon-note:before {content: "\e06f";}',
462
+ 'note_add'=> '.icon-note_add:before {content: "\e89c";}',
463
+ 'notifications'=> '.icon-notifications:before {content: "\e7f4";}',
464
+ 'notifications_active'=> '.icon-notifications_active:before {content: "\e7f7";}',
465
+ 'notifications_none'=> '.icon-notifications_none:before {content: "\e7f5";}',
466
+ 'notifications_off'=> '.icon-notifications_off:before {content: "\e7f6";}',
467
+ 'notifications_paused'=> '.icon-notifications_paused:before {content: "\e7f8";}',
468
+ 'offline_pin'=> '.icon-offline_pin:before {content: "\e90a";}',
469
+ 'ondemand_video'=> '.icon-ondemand_video:before {content: "\e63a";}',
470
+ 'opacity'=> '.icon-opacity:before {content: "\e91c";}',
471
+ 'open_in_browser'=> '.icon-open_in_browser:before {content: "\e89d";}',
472
+ 'open_with'=> '.icon-open_with:before {content: "\e89f";}',
473
+ 'pages'=> '.icon-pages:before {content: "\e7f9";}',
474
+ 'pageview'=> '.icon-pageview:before {content: "\e8a0";}',
475
+ 'pan_tool'=> '.icon-pan_tool:before {content: "\e925";}',
476
+ 'panorama'=> '.icon-panorama:before {content: "\e40b";}',
477
+ 'radio_button_unchecked'=> '.icon-radio_button_unchecked:before {content: "\e836";}',
478
+ 'panorama_horizontal'=> '.icon-panorama_horizontal:before {content: "\e40d";}',
479
+ 'panorama_vertical'=> '.icon-panorama_vertical:before {content: "\e40e";}',
480
+ 'panorama_wide_angle'=> '.icon-panorama_wide_angle:before {content: "\e40f";}',
481
+ 'party_mode'=> '.icon-party_mode:before {content: "\e7fa";}',
482
+ 'pause'=> '.icon-pause:before {content: "\e034";}',
483
+ 'pause_circle_filled'=> '.icon-pause_circle_filled:before {content: "\e035";}',
484
+ 'pause_circle_outline'=> '.icon-pause_circle_outline:before {content: "\e036";}',
485
+ 'people_outline'=> '.icon-people_outline:before {content: "\e7fc";}',
486
+ 'perm_camera_mic'=> '.icon-perm_camera_mic:before {content: "\e8a2";}',
487
+ 'perm_contact_calendar'=> '.icon-perm_contact_calendar:before {content: "\e8a3";}',
488
+ 'perm_device_information'=> '.icon-perm_device_information:before {content: "\e8a5";}',
489
+ 'person_outline'=> '.icon-person_outline:before {content: "\e7ff";}',
490
+ 'perm_media'=> '.icon-perm_media:before {content: "\e8a7";}',
491
+ 'person'=> '.icon-person:before {content: "\e7fd";}',
492
+ 'person_add'=> '.icon-person_add:before {content: "\e7fe";}',
493
+ 'person_pin'=> '.icon-person_pin:before {content: "\e55a";}',
494
+ 'person_pin_circle'=> '.icon-person_pin_circle:before {content: "\e56a";}',
495
+ 'personal_video'=> '.icon-personal_video:before {content: "\e63b";}',
496
+ 'pets'=> '.icon-pets:before {content: "\e91d";}',
497
+ 'phone_android'=> '.icon-phone_android:before {content: "\e324";}',
498
+ 'phone_bluetooth_speaker'=> '.icon-phone_bluetooth_speaker:before {content: "\e61b";}',
499
+ 'phone_forwarded'=> '.icon-phone_forwarded:before {content: "\e61c";}',
500
+ 'phone_in_talk'=> '.icon-phone_in_talk:before {content: "\e61d";}',
501
+ 'phone_iphone'=> '.icon-phone_iphone:before {content: "\e325";}',
502
+ 'phone_locked'=> '.icon-phone_locked:before {content: "\e61e";}',
503
+ 'phone_missed'=> '.icon-phone_missed:before {content: "\e61f";}',
504
+ 'phone_paused'=> '.icon-phone_paused:before {content: "\e620";}',
505
+ 'phonelink_erase'=> '.icon-phonelink_erase:before {content: "\e0db";}',
506
+ 'phonelink_lock'=> '.icon-phonelink_lock:before {content: "\e0dc";}',
507
+ 'phonelink_off'=> '.icon-phonelink_off:before {content: "\e327";}',
508
+ 'phonelink_ring'=> '.icon-phonelink_ring:before {content: "\e0dd";}',
509
+ 'phonelink_setup'=> '.icon-phonelink_setup:before {content: "\e0de";}',
510
+ 'photo_album'=> '.icon-photo_album:before {content: "\e411";}',
511
+ 'photo_size_select_actual'=> '.icon-photo_size_select_actual:before {content: "\e432";}',
512
+ 'picture_in_picture'=> '.icon-picture_in_picture:before {content: "\e8aa";}',
513
+ 'picture_in_picture_alt'=> '.icon-picture_in_picture_alt:before {content: "\e911";}',
514
+ 'pie_chart'=> '.icon-pie_chart:before {content: "\e6c4";}',
515
+ 'pie_chart_outlined'=> '.icon-pie_chart_outlined:before {content: "\e6c5";}',
516
+ 'pin_drop'=> '.icon-pin_drop:before {content: "\e55e";}',
517
+ 'play_arrow'=> '.icon-play_arrow:before {content: "\e037";}',
518
+ 'play_circle_filled'=> '.icon-play_circle_filled:before {content: "\e038";}',
519
+ 'play_circle_outline'=> '.icon-play_circle_outline:before {content: "\e039";}',
520
+ 'play_for_work'=> '.icon-play_for_work:before {content: "\e906";}',
521
+ 'playlist_add'=> '.icon-playlist_add:before {content: "\e03b";}',
522
+ 'playlist_add_check'=> '.icon-playlist_add_check:before {content: "\e065";}',
523
+ 'playlist_play'=> '.icon-playlist_play:before {content: "\e05f";}',
524
+ 'polymer'=> '.icon-polymer:before {content: "\e8ab";}',
525
+ 'pool'=> '.icon-pool:before {content: "\eb48";}',
526
+ 'portable_wifi_off'=> '.icon-portable_wifi_off:before {content: "\e0ce";}',
527
+ 'portrait'=> '.icon-portrait:before {content: "\e416";}',
528
+ 'power'=> '.icon-power:before {content: "\e63c";}',
529
+ 'power_input'=> '.icon-power_input:before {content: "\e336";}',
530
+ 'power_settings_new'=> '.icon-power_settings_new:before {content: "\e8ac";}',
531
+ 'pregnant_woman'=> '.icon-pregnant_woman:before {content: "\e91e";}',
532
+ 'present_to_all'=> '.icon-present_to_all:before {content: "\e0df";}',
533
+ 'priority_high'=> '.icon-priority_high:before {content: "\e645";}',
534
+ 'public'=> '.icon-public:before {content: "\e80b";}',
535
+ 'publish'=> '.icon-publish:before {content: "\e255";}',
536
+ 'queue_music'=> '.icon-queue_music:before {content: "\e03d";}',
537
+ 'queue_play_next'=> '.icon-queue_play_next:before {content: "\e066";}',
538
+ 'radio'=> '.icon-radio:before {content: "\e03e";}',
539
+ 'radio_button_checked'=> '.icon-radio_button_checked:before {content: "\e837";}',
540
+ 'rate_review'=> '.icon-rate_review:before {content: "\e560";}',
541
+ 'receipt'=> '.icon-receipt:before {content: "\e8b0";}',
542
+ 'recent_actors'=> '.icon-recent_actors:before {content: "\e03f";}',
543
+ 'record_voice_over'=> '.icon-record_voice_over:before {content: "\e91f";}',
544
+ 'redo'=> '.icon-redo:before {content: "\e15a";}',
545
+ 'refresh'=> '.icon-refresh:before {content: "\e5d5";}',
546
+ 'remove'=> '.icon-remove:before {content: "\e15b";}',
547
+ 'remove_circle_outline'=> '.icon-remove_circle_outline:before {content: "\e15d";}',
548
+ 'remove_from_queue'=> '.icon-remove_from_queue:before {content: "\e067";}',
549
+ 'visibility'=> '.icon-visibility:before {content: "\e8f4";}',
550
+ 'remove_shopping_cart'=> '.icon-remove_shopping_cart:before {content: "\e928";}',
551
+ 'reorder'=> '.icon-reorder:before {content: "\e8fe";}',
552
+ 'repeat'=> '.icon-repeat:before {content: "\e040";}',
553
+ 'replay'=> '.icon-replay:before {content: "\e042";}',
554
+ 'replay_30'=> '.icon-replay_30:before {content: "\e05a";}',
555
+ 'reply'=> '.icon-reply:before {content: "\e15e";}',
556
+ 'reply_all'=> '.icon-reply_all:before {content: "\e15f";}',
557
+ 'report'=> '.icon-report:before {content: "\e160";}',
558
+ 'warning'=> '.icon-warning:before {content: "\e002";}',
559
+ 'restaurant'=> '.icon-restaurant:before {content: "\e56c";}',
560
+ 'restore_page'=> '.icon-restore_page:before {content: "\e929";}',
561
+ 'ring_volume'=> '.icon-ring_volume:before {content: "\e0d1";}',
562
+ 'room_service'=> '.icon-room_service:before {content: "\eb49";}',
563
+ 'rotate_90_degrees_ccw'=> '.icon-rotate_90_degrees_ccw:before {content: "\e418";}',
564
+ 'rotate_left'=> '.icon-rotate_left:before {content: "\e419";}',
565
+ 'rotate_right'=> '.icon-rotate_right:before {content: "\e41a";}',
566
+ 'router'=> '.icon-router:before {content: "\e328";}',
567
+ 'rowing'=> '.icon-rowing:before {content: "\e921";}',
568
+ 'rss_feed'=> '.icon-rss_feed:before {content: "\e0e5";}',
569
+ 'rv_hookup'=> '.icon-rv_hookup:before {content: "\e642";}',
570
+ 'satellite'=> '.icon-satellite:before {content: "\e562";}',
571
+ 'save'=> '.icon-save:before {content: "\e161";}',
572
+ 'scanner'=> '.icon-scanner:before {content: "\e329";}',
573
+ 'school'=> '.icon-school:before {content: "\e80c";}',
574
+ 'screen_lock_landscape'=> '.icon-screen_lock_landscape:before {content: "\e1be";}',
575
+ 'screen_lock_portrait'=> '.icon-screen_lock_portrait:before {content: "\e1bf";}',
576
+ 'screen_share'=> '.icon-screen_share:before {content: "\e0e2";}',
577
+ 'search'=> '.icon-search:before {content: "\e8b6";}',
578
+ 'security'=> '.icon-security:before {content: "\e32a";}',
579
+ 'select_all'=> '.icon-select_all:before {content: "\e162";}',
580
+ 'send'=> '.icon-send:before {content: "\e163";}',
581
+ 'sentiment_dissatisfied'=> '.icon-sentiment_dissatisfied:before {content: "\e811";}',
582
+ 'sentiment_neutral'=> '.icon-sentiment_neutral:before {content: "\e812";}',
583
+ 'sentiment_satisfied'=> '.icon-sentiment_satisfied:before {content: "\e813";}',
584
+ 'sentiment_very_dissatisfied'=> '.icon-sentiment_very_dissatisfied:before {content: "\e814";}',
585
+ 'sentiment_very_satisfied'=> '.icon-sentiment_very_satisfied:before {content: "\e815";}',
586
+ 'settings'=> '.icon-settings:before {content: "\e8b8";}',
587
+ 'settings_applications'=> '.icon-settings_applications:before {content: "\e8b9";}',
588
+ 'settings_backup_restore'=> '.icon-settings_backup_restore:before {content: "\e8ba";}',
589
+ 'settings_brightness'=> '.icon-settings_brightness:before {content: "\e8bd";}',
590
+ 'settings_cell'=> '.icon-settings_cell:before {content: "\e8bc";}',
591
+ 'settings_ethernet'=> '.icon-settings_ethernet:before {content: "\e8be";}',
592
+ 'settings_input_antenna'=> '.icon-settings_input_antenna:before {content: "\e8bf";}',
593
+ 'settings_input_composite'=> '.icon-settings_input_composite:before {content: "\e8c1";}',
594
+ 'settings_input_hdmi'=> '.icon-settings_input_hdmi:before {content: "\e8c2";}',
595
+ 'settings_input_svideo'=> '.icon-settings_input_svideo:before {content: "\e8c3";}',
596
+ 'settings_overscan'=> '.icon-settings_overscan:before {content: "\e8c4";}',
597
+ 'settings_phone'=> '.icon-settings_phone:before {content: "\e8c5";}',
598
+ 'settings_power'=> '.icon-settings_power:before {content: "\e8c6";}',
599
+ 'settings_remote'=> '.icon-settings_remote:before {content: "\e8c7";}',
600
+ 'settings_system_daydream'=> '.icon-settings_system_daydream:before {content: "\e8c8";}',
601
+ 'share'=> '.icon-share:before {content: "\e80d";}',
602
+ 'shop'=> '.icon-shop:before {content: "\e8c9";}',
603
+ 'shop_two'=> '.icon-shop_two:before {content: "\e8ca";}',
604
+ 'shopping_basket'=> '.icon-shopping_basket:before {content: "\e8cb";}',
605
+ 'short_text'=> '.icon-short_text:before {content: "\e261";}',
606
+ 'show_chart'=> '.icon-show_chart:before {content: "\e6e1";}',
607
+ 'shuffle'=> '.icon-shuffle:before {content: "\e043";}',
608
+ 'signal_cellular_4_bar'=> '.icon-signal_cellular_4_bar:before {content: "\e1c8";}',
609
+ 'signal_wifi_4_bar'=> '.icon-signal_wifi_4_bar:before {content: "\e1d8";}',
610
+ 'skip_next'=> '.icon-skip_next:before {content: "\e044";}',
611
+ 'skip_previous'=> '.icon-skip_previous:before {content: "\e045";}',
612
+ 'slideshow'=> '.icon-slideshow:before {content: "\e41b";}',
613
+ 'slow_motion_video'=> '.icon-slow_motion_video:before {content: "\e068";}',
614
+ 'stay_primary_portrait'=> '.icon-stay_primary_portrait:before {content: "\e0d6";}',
615
+ 'smoke_free'=> '.icon-smoke_free:before {content: "\eb4a";}',
616
+ 'smoking_rooms'=> '.icon-smoking_rooms:before {content: "\eb4b";}',
617
+ 'textsms'=> '.icon-textsms:before {content: "\e0d8";}',
618
+ 'snooze'=> '.icon-snooze:before {content: "\e046";}',
619
+ 'sort'=> '.icon-sort:before {content: "\e164";}',
620
+ 'sort_by_alpha'=> '.icon-sort_by_alpha:before {content: "\e053";}',
621
+ 'spa'=> '.icon-spa:before {content: "\eb4c";}',
622
+ 'space_bar'=> '.icon-space_bar:before {content: "\e256";}',
623
+ 'speaker'=> '.icon-speaker:before {content: "\e32d";}',
624
+ 'speaker_group'=> '.icon-speaker_group:before {content: "\e32e";}',
625
+ 'speaker_notes'=> '.icon-speaker_notes:before {content: "\e8cd";}',
626
+ 'speaker_phone'=> '.icon-speaker_phone:before {content: "\e0d2";}',
627
+ 'spellcheck'=> '.icon-spellcheck:before {content: "\e8ce";}',
628
+ 'star_border'=> '.icon-star_border:before {content: "\e83a";}',
629
+ 'star_half'=> '.icon-star_half:before {content: "\e839";}',
630
+ 'stars'=> '.icon-stars:before {content: "\e8d0";}',
631
+ 'stay_primary_landscape'=> '.icon-stay_primary_landscape:before {content: "\e0d5";}',
632
+ 'stop'=> '.icon-stop:before {content: "\e047";}',
633
+ 'stop_screen_share'=> '.icon-stop_screen_share:before {content: "\e0e3";}',
634
+ 'storage'=> '.icon-storage:before {content: "\e1db";}',
635
+ 'store_mall_directory'=> '.icon-store_mall_directory:before {content: "\e563";}',
636
+ 'straighten'=> '.icon-straighten:before {content: "\e41c";}',
637
+ 'streetview'=> '.icon-streetview:before {content: "\e56e";}',
638
+ 'format_strikethrough_s'=> '.icon-format_strikethrough_s:before {content: "\e257";}',
639
+ 'style'=> '.icon-style:before {content: "\e41d";}',
640
+ 'subdirectory_arrow_left'=> '.icon-subdirectory_arrow_left:before {content: "\e5d9";}',
641
+ 'subdirectory_arrow_right'=> '.icon-subdirectory_arrow_right:before {content: "\e5da";}',
642
+ 'subject'=> '.icon-subject:before {content: "\e8d2";}',
643
+ 'subscriptions'=> '.icon-subscriptions:before {content: "\e064";}',
644
+ 'subtitles'=> '.icon-subtitles:before {content: "\e048";}',
645
+ 'subway'=> '.icon-subway:before {content: "\e56f";}',
646
+ 'supervisor_account'=> '.icon-supervisor_account:before {content: "\e8d3";}',
647
+ 'surround_sound'=> '.icon-surround_sound:before {content: "\e049";}',
648
+ 'swap_calls'=> '.icon-swap_calls:before {content: "\e0d7";}',
649
+ 'swap_horiz'=> '.icon-swap_horiz:before {content: "\e8d4";}',
650
+ 'swap_vert'=> '.icon-swap_vert:before {content: "\e8d5";}',
651
+ 'swap_vertical_circle'=> '.icon-swap_vertical_circle:before {content: "\e8d6";}',
652
+ 'switch_camera'=> '.icon-switch_camera:before {content: "\e41e";}',
653
+ 'switch_video'=> '.icon-switch_video:before {content: "\e41f";}',
654
+ 'sync_problem'=> '.icon-sync_problem:before {content: "\e629";}',
655
+ 'system_update'=> '.icon-system_update:before {content: "\e62a";}',
656
+ 'system_update_alt'=> '.icon-system_update_alt:before {content: "\e8d7";}',
657
+ 'tab'=> '.icon-tab:before {content: "\e8d8";}',
658
+ 'tablet'=> '.icon-tablet:before {content: "\e32f";}',
659
+ 'tablet_android'=> '.icon-tablet_android:before {content: "\e330";}',
660
+ 'tablet_mac'=> '.icon-tablet_mac:before {content: "\e331";}',
661
+ 'text_fields'=> '.icon-text_fields:before {content: "\e262";}',
662
+ 'text_format'=> '.icon-text_format:before {content: "\e165";}',
663
+ 'texture'=> '.icon-texture:before {content: "\e421";}',
664
+ 'thumb_down'=> '.icon-thumb_down:before {content: "\e8db";}',
665
+ 'thumb_up'=> '.icon-thumb_up:before {content: "\e8dc";}',
666
+ 'thumb_up_down'=> '.icon-thumb_up_down:before {content: "\e8dd";}',
667
+ 'timelapse'=> '.icon-timelapse:before {content: "\e422";}',
668
+ 'timeline'=> '.icon-timeline:before {content: "\e922";}',
669
+ 'timer'=> '.icon-timer:before {content: "\e425";}',
670
+ 'timer_off'=> '.icon-timer_off:before {content: "\e426";}',
671
+ 'title'=> '.icon-title:before {content: "\e264";}',
672
+ 'toc'=> '.icon-toc:before {content: "\e8de";}',
673
+ 'today'=> '.icon-today:before {content: "\e8df";}',
674
+ 'toll'=> '.icon-toll:before {content: "\e8e0";}',
675
+ 'tonality'=> '.icon-tonality:before {content: "\e427";}',
676
+ 'touch_app'=> '.icon-touch_app:before {content: "\e913";}',
677
+ 'toys'=> '.icon-toys:before {content: "\e332";}',
678
+ 'track'=> '.icon-track:before {content: "\e8e1";}',
679
+ 'traffic'=> '.icon-traffic:before {content: "\e565";}',
680
+ 'train'=> '.icon-train:before {content: "\e570";}',
681
+ 'tram'=> '.icon-tram:before {content: "\e571";}',
682
+ 'transfer_within_a_station'=> '.icon-transfer_within_a_station:before {content: "\e572";}',
683
+ 'transform'=> '.icon-transform:before {content: "\e428";}',
684
+ 'translate'=> '.icon-translate:before {content: "\e8e2";}',
685
+ 'trending_down'=> '.icon-trending_down:before {content: "\e8e3";}',
686
+ 'trending_flat'=> '.icon-trending_flat:before {content: "\e8e4";}',
687
+ 'trending_up'=> '.icon-trending_up:before {content: "\e8e5";}',
688
+ 'tune'=> '.icon-tune:before {content: "\e429";}',
689
+ 'tv'=> '.icon-tv:before {content: "\e333";}',
690
+ 'unarchive'=> '.icon-unarchive:before {content: "\e169";}',
691
+ 'undo'=> '.icon-undo:before {content: "\e166";}',
692
+ 'unfold_less'=> '.icon-unfold_less:before {content: "\e5d6";}',
693
+ 'unfold_more'=> '.icon-unfold_more:before {content: "\e5d7";}',
694
+ 'update'=> '.icon-update:before {content: "\e923";}',
695
+ 'usb'=> '.icon-usb:before {content: "\e1e0";}',
696
+ 'verified_user'=> '.icon-verified_user:before {content: "\e8e8";}',
697
+ 'vertical_align_center'=> '.icon-vertical_align_center:before {content: "\e259";}',
698
+ 'vertical_align_top'=> '.icon-vertical_align_top:before {content: "\e25a";}',
699
+ 'vibration'=> '.icon-vibration:before {content: "\e52d";}',
700
+ 'video_call'=> '.icon-video_call:before {content: "\e070";}',
701
+ 'video_label'=> '.icon-video_label:before {content: "\e071";}',
702
+ 'video_library'=> '.icon-video_library:before {content: "\e04a";}',
703
+ 'videocam'=> '.icon-videocam:before {content: "\e04b";}',
704
+ 'videocam_off'=> '.icon-videocam_off:before {content: "\e04c";}',
705
+ 'videogame_asset'=> '.icon-videogame_asset:before {content: "\e338";}',
706
+ 'view_agenda'=> '.icon-view_agenda:before {content: "\e8e9";}',
707
+ 'view_array'=> '.icon-view_array:before {content: "\e8ea";}',
708
+ 'view_carousel'=> '.icon-view_carousel:before {content: "\e8eb";}',
709
+ 'view_column'=> '.icon-view_column:before {content: "\e8ec";}',
710
+ 'view_comfy'=> '.icon-view_comfy:before {content: "\e42a";}',
711
+ 'view_compact'=> '.icon-view_compact:before {content: "\e42b";}',
712
+ 'view_day'=> '.icon-view_day:before {content: "\e8ed";}',
713
+ 'view_headline'=> '.icon-view_headline:before {content: "\e8ee";}',
714
+ 'view_list'=> '.icon-view_list:before {content: "\e8ef";}',
715
+ 'view_module'=> '.icon-view_module:before {content: "\e8f0";}',
716
+ 'view_quilt'=> '.icon-view_quilt:before {content: "\e8f1";}',
717
+ 'view_stream'=> '.icon-view_stream:before {content: "\e8f2";}',
718
+ 'view_week'=> '.icon-view_week:before {content: "\e8f3";}',
719
+ 'vignette'=> '.icon-vignette:before {content: "\e435";}',
720
+ 'visibility_off'=> '.icon-visibility_off:before {content: "\e8f5";}',
721
+ 'voice_chat'=> '.icon-voice_chat:before {content: "\e62e";}',
722
+ 'voicemail'=> '.icon-voicemail:before {content: "\e0d9";}',
723
+ 'vpn_key'=> '.icon-vpn_key:before {content: "\e0da";}',
724
+ 'vpn_lock'=> '.icon-vpn_lock:before {content: "\e62f";}',
725
+ 'wallpaper'=> '.icon-wallpaper:before {content: "\e1bc";}',
726
+ 'watch'=> '.icon-watch:before {content: "\e334";}',
727
+ 'watch_later'=> '.icon-watch_later:before {content: "\e924";}',
728
+ 'wb_iridescent'=> '.icon-wb_iridescent:before {content: "\e436";}',
729
+ 'wb_sunny'=> '.icon-wb_sunny:before {content: "\e430";}',
730
+ 'wc'=> '.icon-wc:before {content: "\e63d";}',
731
+ 'web'=> '.icon-web:before {content: "\e051";}',
732
+ 'web_asset'=> '.icon-web_asset:before {content: "\e069";}',
733
+ 'weekend'=> '.icon-weekend:before {content: "\e16b";}',
734
+ 'whatshot'=> '.icon-whatshot:before {content: "\e80e";}',
735
+ 'widgets'=> '.icon-widgets:before {content: "\e1bd";}',
736
+ 'wifi'=> '.icon-wifi:before {content: "\e63e";}',
737
+ 'work'=> '.icon-work:before {content: "\e8f9";}',
738
+ 'wrap_text'=> '.icon-wrap_text:before {content: "\e25b";}',
739
+ 'youtube_searched_for'=> '.icon-youtube_searched_for:before {content: "\e8fa";}',
740
+ 'zoom_in'=> '.icon-zoom_in:before {content: "\e8ff";}',
741
+ 'zoom_out'=> '.icon-zoom_out:before {content: "\e901";}',
742
+ 'zoom_out_map'=> '.icon-zoom_out_map:before {content: "\e56b";}',
743
+ 'apple'=> '.icon-apple:before {content: "\e902";}',
744
+ 'bitcoin'=> '.icon-bitcoin:before {content: "\e907";}',
745
+ 'buffer'=> '.icon-buffer:before {content: "\e910";}',
746
+ 'digg'=> '.icon-digg:before {content: "\e919";}',
747
+ 'dribbble'=> '.icon-dribbble:before {content: "\e920";}',
748
+ 'dropbox'=> '.icon-dropbox:before {content: "\e92a";}',
749
+ 'evernote'=> '.icon-evernote:before {content: "\e92c";}',
750
+ 'facebook'=> '.icon-facebook:before {content: "\e92d";}',
751
+ 'feedly'=> '.icon-feedly:before {content: "\e92e";}',
752
+ 'github'=> '.icon-github:before {content: "\e92f";}',
753
+ 'gmail'=> '.icon-gmail:before {content: "\e930";}',
754
+ 'gplus'=> '.icon-gplus:before {content: "\e931";}',
755
+ 'instagram'=> '.icon-instagram:before {content: "\e932";}',
756
+ 'sharing-line'=> '.icon-sharing-line:before {content: "\e933";}',
757
+ 'linkedin'=> '.icon-linkedin:before {content: "\e934";}',
758
+ 'messanger'=> '.icon-messanger:before {content: "\e935";}',
759
+ 'odnoklassniki'=> '.icon-odnoklassniki:before {content: "\e936";}',
760
+ 'pinterest'=> '.icon-pinterest:before {content: "\e937";}',
761
+ 'reddit'=> '.icon-reddit:before {content: "\e938";}',
762
+ 'shopify'=> '.icon-shopify:before {content: "\e93a";}',
763
+ 'weibo'=> '.icon-weibo:before {content: "\e93a";}',
764
+ 'skype'=> '.icon-skype:before {content: "\e93b";}',
765
+ 'slack'=> '.icon-slack:before {content: "\e93c";}',
766
+ 'soundcloud'=> '.icon-soundcloud:before {content: "\e93d";}',
767
+ 'stumbleupon'=> '.icon-stumbleupon:before {content: "\e93e";}',
768
+ 'telegram'=> '.icon-telegram:before {content: "\e93f";}',
769
+ 'tumblr'=> '.icon-tumblr:before {content: "\e940";}',
770
+ 'twitch'=> '.icon-twitch:before {content: "\e941";}',
771
+ 'twitter'=> '.icon-twitter:before {content: "\e942";}',
772
+ 'viber'=> '.icon-viber:before {content: "\e943";}',
773
+ 'vk'=> '.icon-vk:before {content: "\e944";}',
774
+ 'wechat'=> '.icon-wechat:before {content: "\e945";}',
775
+ 'whatsapp'=> '.icon-whatsapp:before {content: "\e946";}',
776
+ 'youtube'=> '.icon-youtube:before {content: "\e947";}'
777
+ );
778
+
779
  ?>
includes/includes.php CHANGED
@@ -1,53 +1,53 @@
1
- <?php
2
- /* This file will contain all the extra code that works like a supporting.
3
- 1. Register AMP menu
4
- 1.1 AMP Header menu
5
- 1.2 Footer Menu
6
- 2. Newsletter code
7
- */
8
- // 1. AMP menu code
9
- // Registering Custom AMP menu for this plugin
10
- // 1.1 AMP Header menu
11
- if (! function_exists( 'ampforwp_menu') ) {
12
- function ampforwp_menu() {
13
- register_nav_menus(
14
- array(
15
- 'amp-menu' => __( 'AMP Menu','accelerated-mobile-pages' ),
16
- )
17
- );
18
- }
19
- add_action( 'init', 'ampforwp_menu' );
20
- }
21
-
22
- // 1.2 Footer Menu
23
- add_action( 'init', 'ampforwp_footermenu' );
24
- if ( ! function_exists( 'ampforwp_footermenu') ) {
25
- function ampforwp_footermenu() {
26
- register_nav_menus(
27
- array(
28
- 'amp-footer-menu' => __( 'AMP Footer Menu','accelerated-mobile-pages' ),
29
- )
30
- );
31
- }
32
- }
33
-
34
-
35
- // 2. Newsletter code
36
- require_once( AMPFORWP_PLUGIN_DIR . '/includes/newsletter.php' );
37
-
38
- // 3. Some Extra Styling for Admin area
39
- add_action( 'admin_enqueue_scripts', 'ampforwp_add_admin_styling' );
40
- function ampforwp_add_admin_styling(){
41
- global $redux_builder_amp;
42
- // Style file to add or modify css inside admin area
43
- wp_register_style( 'ampforwp_admin_css', untrailingslashit(AMPFORWP_PLUGIN_DIR_URI) . '/includes/admin-style.css', false, AMPFORWP_VERSION );
44
- wp_enqueue_style( 'ampforwp_admin_css' );
45
-
46
- // Admin area scripts file
47
- wp_register_script( 'ampforwp_admin_js', untrailingslashit(AMPFORWP_PLUGIN_DIR_URI) . '/includes/admin-script.js', false, AMPFORWP_VERSION );
48
-
49
- // Localize the script with new data
50
- wp_localize_script( 'ampforwp_admin_js', 'redux_data', $redux_builder_amp );
51
-
52
- wp_enqueue_script( 'ampforwp_admin_js' );
53
  } ?>
1
+ <?php
2
+ /* This file will contain all the extra code that works like a supporting.
3
+ 1. Register AMP menu
4
+ 1.1 AMP Header menu
5
+ 1.2 Footer Menu
6
+ 2. Newsletter code
7
+ */
8
+ // 1. AMP menu code
9
+ // Registering Custom AMP menu for this plugin
10
+ // 1.1 AMP Header menu
11
+ if (! function_exists( 'ampforwp_menu') ) {
12
+ function ampforwp_menu() {
13
+ register_nav_menus(
14
+ array(
15
+ 'amp-menu' => __( 'AMP Menu','accelerated-mobile-pages' ),
16
+ )
17
+ );
18
+ }
19
+ add_action( 'init', 'ampforwp_menu' );
20
+ }
21
+
22
+ // 1.2 Footer Menu
23
+ add_action( 'init', 'ampforwp_footermenu' );
24
+ if ( ! function_exists( 'ampforwp_footermenu') ) {
25
+ function ampforwp_footermenu() {
26
+ register_nav_menus(
27
+ array(
28
+ 'amp-footer-menu' => __( 'AMP Footer Menu','accelerated-mobile-pages' ),
29
+ )
30
+ );
31
+ }
32
+ }
33
+
34
+
35
+ // 2. Newsletter code
36
+ require_once( AMPFORWP_PLUGIN_DIR . '/includes/newsletter.php' );
37
+
38
+ // 3. Some Extra Styling for Admin area
39
+ add_action( 'admin_enqueue_scripts', 'ampforwp_add_admin_styling' );
40
+ function ampforwp_add_admin_styling(){
41
+ global $redux_builder_amp;
42
+ // Style file to add or modify css inside admin area
43
+ wp_register_style( 'ampforwp_admin_css', untrailingslashit(AMPFORWP_PLUGIN_DIR_URI) . '/includes/admin-style.css', false, AMPFORWP_VERSION );
44
+ wp_enqueue_style( 'ampforwp_admin_css' );
45
+
46
+ // Admin area scripts file
47
+ wp_register_script( 'ampforwp_admin_js', untrailingslashit(AMPFORWP_PLUGIN_DIR_URI) . '/includes/admin-script.js', false, AMPFORWP_VERSION );
48
+
49
+ // Localize the script with new data
50
+ wp_localize_script( 'ampforwp_admin_js', 'redux_data', $redux_builder_amp );
51
+
52
+ wp_enqueue_script( 'ampforwp_admin_js' );
53
  } ?>
includes/modules/ampforwp-blurb.php CHANGED
@@ -1,196 +1,196 @@
1
- <?php class AMPFORWP_Blurb_Widget extends WP_Widget {
2
- /*--------------------------------------------------*/
3
- /* Constructor
4
- /*--------------------------------------------------*/
5
-
6
- /**
7
- * Specifies the classname and description, instantiates the widget,
8
- * loads localization files, and includes necessary stylesheets and JavaScript.
9
- */
10
- public function __construct() {
11
-
12
- // Hooks fired when the Widget is activated and deactivated
13
- register_activation_hook( __FILE__, array( $this, 'activate' ) );
14
- register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
15
-
16
- parent::__construct(
17
- 'ampforwp-blurb',
18
- __( 'AMP Blurb Module', 'accelerated-mobile-pages' ),
19
- array( //
20
- 'classname' => 'ampforwp-blurb',
21
- 'description' => __( 'Displays Icon, headline and description. Best for showing features.', 'accelerated-mobile-pages' )
22
- )
23
- );
24
-
25
- add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
26
-
27
- // Add static written Jquery
28
- // add_action( 'admin_footer', array( $this, 'footer_scritps') );
29
-
30
-
31
- } // end constructor
32
-
33
- /*--------------------------------------------------*/
34
- /* Widget API Functions
35
- /*--------------------------------------------------*/
36
-
37
- /**
38
- * Outputs the content of the widget.
39
- *
40
- * @param array args The array of form elements
41
- * @param array instance The current instance of the widget
42
- */
43
- public function widget( $args, $instance ) {
44
- $output = "";
45
-
46
- extract( $args, EXTR_SKIP );
47
-
48
- $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
49
- $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
50
-
51
- $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array();
52
-
53
-
54
- echo $before_widget;
55
-
56
- $output .= '<div class="amp-wp-content amp_cb_module amp_cb_blurb">';
57
-
58
- if ( $title ) {
59
- $output .= '<div class="amp_module_title"><span>';
60
- $output .= $title;
61
- $output .= '</span></div>';
62
- }
63
-
64
- $output .= '<div class="flex-grid">';
65
-
66
- foreach( $features as $feature ) {
67
- $output .= '<div class="clmn">';
68
- if ( $feature['image'] ) {
69
- $output .= '<img src="'. $feature['image'] .'" height="80" width="80" alt="" />';
70
- }
71
- $output .= '<div class="amp_cb_content">';
72
- $output .= '<h4>'.$feature['title'].'</h4>';
73
- $output .= '<p>'.$feature['description'].'</p>';
74
- $output .= '</div>';
75
- $output .= '</div>';
76
- }
77
- $output .= '</div></div>'; // flex-grid & amp_cb_module
78
- $sanitizer = new AMPFORWP_Content( $output, array(),
79
- apply_filters( 'ampforwp_content_sanitizers',array( 'AMP_Img_Sanitizer' => array(),'AMP_Style_Sanitizer' => array() ) ) );
80
- $sanitized_output = $sanitizer->get_amp_content();
81
-
82
- if( $sanitized_output ) {
83
- echo $sanitized_output;
84
- }
85
-
86
- echo $after_widget;
87
-
88
- } // end widget
89
-
90
- /**
91
- * Processes the widget's options to be saved.
92
- *
93
- * @param array new_instance The new instance of values to be generated via the update.
94
- * @param array old_instance The previous instance of values before the update.
95
- */
96
- public function update( $new_instance, $old_instance ) {
97
-
98
- $instance = $old_instance;
99
-
100
- $instance['title'] = strip_tags($new_instance['title']);
101
-
102
- foreach($new_instance['features'] as $feature){
103
- $feature['title'] = strip_tags($feature['title']);
104
- $feature['description'] = strip_tags($feature['description']);
105
- $feature['image'] = strip_tags($feature['image']);
106
- }
107
- $instance['features'] = $new_instance['features'];
108
-
109
- return $instance;
110
-
111
- } // end widget
112
-
113
- /**
114
- * Generates the administration form for the widget.
115
- *
116
- * @param array instance The array of keys and values for the widget.
117
- */
118
- public function form( $instance ) {
119
-
120
- $instance = wp_parse_args(
121
- (array) $instance
122
- );
123
-
124
- $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; ?>
125
- <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
126
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></p>
127
-
128
-
129
- <?php
130
-
131
- $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array(); ?>
132
- <span class="ampforwp-blurb-additional">
133
- <?php
134
- $c = 0;
135
- if ( count( $features ) > 0 ) {
136
- foreach( $features as $feature ) {
137
- if ( isset( $feature['title'] ) || isset( $feature['description'] ) ) { ?>
138
- <div class="widget">
139
- <div class="widget-top"><div class="widget-title"><h3><?php echo $feature['title'];?><span class="in-widget-title"></span></h3></div>
140
- </div>
141
-
142
- <div class="widget-inside">
143
- <p>
144
- <label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][title]'; ?>"><?php _e( 'Title:' ); ?></label>
145
- <input class="widefat" id="<?php echo $this->get_field_id( 'features' ) .'-'. $c.'-title'; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][title]'; ?>" type="text" value="<?php echo $feature['title']; ?>" />
146
- <label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][description]'; ?>"><?php _e( 'Description:' ); ?></label>
147
-
148
- <textarea class="widefat" id="<?php echo $this->get_field_id( 'features' ) .'-'. $c.'-description'; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][description]'; ?>" rows="6" cols="50"><?php echo $feature['description']; ?></textarea> <span class="clear"></span>
149
- </p>
150
- <p>
151
- <label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][image]'; ?>"><?php _e( 'Image:' ); ?></label>
152
- <input type="button" class="select-img-<?php echo $c;?> button left" style="width:auto;" value="Select Image" onclick="ampSelectImage('<?php echo $c;?>');"/>
153
- <input type="button" style="display:none" name="removeimg" id="remove-img-<?php echo $c;?>" class="button button-secondary remove-img-button" data-count-type="<?php echo $c;?>" value="Remove Image" onclick="removeImage('<?php echo $c;?>')">
154
- <img src="<?php echo $instance['features']["$c"]['image'] ?>" class="preview-image block-image-<?php echo $c;?>" >
155
- <input type="hidden" id="amp-img-field-<?php echo $c;?>" class="img<?php echo $c;?>" style="width:auto;" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][image]'; ?>" id="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][image]';?>'" value="<?php echo $instance['features']["$c"]['image'] ?>" />
156
- </p>
157
- <p> <a class="ampforwp-blurb-remove delete button left"><?php _e('Remove Feature','accelerated-mobile-pages')?></a> </p>
158
- </div>
159
- </div>
160
- <?php
161
- $c = $c +1;
162
- }
163
- }
164
- } ?>
165
- </span>
166
-
167
- <a class="ampforwp-blurb-add button left"> <?php _e('Add Feature','accelerated-mobile-pages'); ?> </a>
168
-
169
- <?php
170
-
171
- } // end form
172
-
173
- /*--------------------------------------------------*/
174
- /* Public Functions
175
- /*--------------------------------------------------*/
176
-
177
- /**
178
- * Registers and enqueues admin-specific JavaScript.
179
- */
180
- public function register_admin_scripts() {
181
-
182
- wp_enqueue_script('media-upload');
183
- wp_enqueue_script('thickbox');
184
- wp_enqueue_style('thickbox');
185
-
186
- wp_enqueue_script( 'ampforwp-builder-script', plugins_url('/modules/js/amp.js' , dirname(__FILE__) ) , array( 'jquery' ), false, true );
187
-
188
- } // end register_admin_scripts
189
-
190
-
191
- } // end class
192
-
193
-
194
- add_action( 'widgets_init', function(){
195
- register_widget( 'AMPFORWP_Blurb_Widget' );
196
  });
1
+ <?php class AMPFORWP_Blurb_Widget extends WP_Widget {
2
+ /*--------------------------------------------------*/
3
+ /* Constructor
4
+ /*--------------------------------------------------*/
5
+
6
+ /**
7
+ * Specifies the classname and description, instantiates the widget,
8
+ * loads localization files, and includes necessary stylesheets and JavaScript.
9
+ */
10
+ public function __construct() {
11
+
12
+ // Hooks fired when the Widget is activated and deactivated
13
+ register_activation_hook( __FILE__, array( $this, 'activate' ) );
14
+ register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
15
+
16
+ parent::__construct(
17
+ 'ampforwp-blurb',
18
+ __( 'AMP Blurb Module', 'accelerated-mobile-pages' ),
19
+ array( //
20
+ 'classname' => 'ampforwp-blurb',
21
+ 'description' => __( 'Displays Icon, headline and description. Best for showing features.', 'accelerated-mobile-pages' )
22
+ )
23
+ );
24
+
25
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
26
+
27
+ // Add static written Jquery
28
+ // add_action( 'admin_footer', array( $this, 'footer_scritps') );
29
+
30
+
31
+ } // end constructor
32
+
33
+ /*--------------------------------------------------*/
34
+ /* Widget API Functions
35
+ /*--------------------------------------------------*/
36
+
37
+ /**
38
+ * Outputs the content of the widget.
39
+ *
40
+ * @param array args The array of form elements
41
+ * @param array instance The current instance of the widget
42
+ */
43
+ public function widget( $args, $instance ) {
44
+ $output = "";
45
+
46
+ extract( $args, EXTR_SKIP );
47
+
48
+ $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
49
+ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
50
+
51
+ $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array();
52
+
53
+
54
+ echo $before_widget;
55
+
56
+ $output .= '<div class="amp-wp-content amp_cb_module amp_cb_blurb">';
57
+
58
+ if ( $title ) {
59
+ $output .= '<div class="amp_module_title"><span>';
60
+ $output .= $title;
61
+ $output .= '</span></div>';
62
+ }
63
+
64
+ $output .= '<div class="flex-grid">';
65
+
66
+ foreach( $features as $feature ) {
67
+ $output .= '<div class="clmn">';
68
+ if ( $feature['image'] ) {
69
+ $output .= '<img src="'. $feature['image'] .'" height="80" width="80" alt="" />';
70
+ }
71
+ $output .= '<div class="amp_cb_content">';
72
+ $output .= '<h4>'.$feature['title'].'</h4>';
73
+ $output .= '<p>'.$feature['description'].'</p>';
74
+ $output .= '</div>';
75
+ $output .= '</div>';
76
+ }
77
+ $output .= '</div></div>'; // flex-grid & amp_cb_module
78
+ $sanitizer = new AMPFORWP_Content( $output, array(),
79
+ apply_filters( 'ampforwp_content_sanitizers',array( 'AMP_Img_Sanitizer' => array(),'AMP_Style_Sanitizer' => array() ) ) );
80
+ $sanitized_output = $sanitizer->get_amp_content();
81
+
82
+ if( $sanitized_output ) {
83
+ echo $sanitized_output;
84
+ }
85
+
86
+ echo $after_widget;
87
+
88
+ } // end widget
89
+
90
+ /**
91
+ * Processes the widget's options to be saved.
92
+ *
93
+ * @param array new_instance The new instance of values to be generated via the update.
94
+ * @param array old_instance The previous instance of values before the update.
95
+ */
96
+ public function update( $new_instance, $old_instance ) {
97
+
98
+ $instance = $old_instance;
99
+
100
+ $instance['title'] = strip_tags($new_instance['title']);
101
+
102
+ foreach($new_instance['features'] as $feature){
103
+ $feature['title'] = strip_tags($feature['title']);
104
+ $feature['description'] = strip_tags($feature['description']);
105
+ $feature['image'] = strip_tags($feature['image']);
106
+ }
107
+ $instance['features'] = $new_instance['features'];
108
+
109
+ return $instance;
110
+
111
+ } // end widget
112
+
113
+ /**
114
+ * Generates the administration form for the widget.
115
+ *
116
+ * @param array instance The array of keys and values for the widget.
117
+ */
118
+ public function form( $instance ) {
119
+
120
+ $instance = wp_parse_args(
121
+ (array) $instance
122
+ );
123
+
124
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; ?>
125
+ <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
126
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></p>
127
+
128
+
129
+ <?php
130
+
131
+ $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array(); ?>
132
+ <span class="ampforwp-blurb-additional">
133
+ <?php
134
+ $c = 0;
135
+ if ( count( $features ) > 0 ) {
136
+ foreach( $features as $feature ) {
137
+ if ( isset( $feature['title'] ) || isset( $feature['description'] ) ) { ?>
138
+ <div class="widget">
139
+ <div class="widget-top"><div class="widget-title"><h3><?php echo $feature['title'];?><span class="in-widget-title"></span></h3></div>
140
+ </div>
141
+
142
+ <div class="widget-inside">
143
+ <p>
144
+ <label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][title]'; ?>"><?php _e( 'Title:' ); ?></label>
145
+ <input class="widefat" id="<?php echo $this->get_field_id( 'features' ) .'-'. $c.'-title'; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][title]'; ?>" type="text" value="<?php echo $feature['title']; ?>" />
146
+ <label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][description]'; ?>"><?php _e( 'Description:' ); ?></label>
147
+
148
+ <textarea class="widefat" id="<?php echo $this->get_field_id( 'features' ) .'-'. $c.'-description'; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][description]'; ?>" rows="6" cols="50"><?php echo $feature['description']; ?></textarea> <span class="clear"></span>
149
+ </p>
150
+ <p>
151
+ <label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][image]'; ?>"><?php _e( 'Image:' ); ?></label>
152
+ <input type="button" class="select-img-<?php echo $c;?> button left" style="width:auto;" value="Select Image" onclick="ampSelectImage('<?php echo $c;?>');"/>
153
+ <input type="button" style="display:none" name="removeimg" id="remove-img-<?php echo $c;?>" class="button button-secondary remove-img-button" data-count-type="<?php echo $c;?>" value="Remove Image" onclick="removeImage('<?php echo $c;?>')">
154
+ <img src="<?php echo $instance['features']["$c"]['image'] ?>" class="preview-image block-image-<?php echo $c;?>" >
155
+ <input type="hidden" id="amp-img-field-<?php echo $c;?>" class="img<?php echo $c;?>" style="width:auto;" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][image]'; ?>" id="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][image]';?>'" value="<?php echo $instance['features']["$c"]['image'] ?>" />
156
+ </p>
157
+ <p> <a class="ampforwp-blurb-remove delete button left"><?php _e('Remove Feature','accelerated-mobile-pages')?></a> </p>
158
+ </div>
159
+ </div>
160
+ <?php
161
+ $c = $c +1;
162
+ }
163
+ }
164
+ } ?>
165
+ </span>
166
+
167
+ <a class="ampforwp-blurb-add button left"> <?php _e('Add Feature','accelerated-mobile-pages'); ?> </a>
168
+
169
+ <?php
170
+
171
+ } // end form
172
+
173
+ /*--------------------------------------------------*/
174
+ /* Public Functions
175
+ /*--------------------------------------------------*/
176
+
177
+ /**
178
+ * Registers and enqueues admin-specific JavaScript.
179
+ */
180
+ public function register_admin_scripts() {
181
+
182
+ wp_enqueue_script('media-upload');
183
+ wp_enqueue_script('thickbox');
184
+ wp_enqueue_style('thickbox');
185
+
186
+ wp_enqueue_script( 'ampforwp-builder-script', plugins_url('/modules/js/amp.js' , dirname(__FILE__) ) , array( 'jquery' ), false, true );
187
+
188
+ } // end register_admin_scripts
189
+
190
+
191
+ } // end class
192
+
193
+
194
+ add_action( 'widgets_init', function(){
195
+ register_widget( 'AMPFORWP_Blurb_Widget' );
196
  });
includes/modules/ampforwp-button.php CHANGED
@@ -1,252 +1,252 @@
1
- <?php class AMPFORWP_Button_Widget extends WP_Widget {
2
-
3
- /*--------------------------------------------------*/
4
- /* Constructor
5
- /*--------------------------------------------------*/
6
-
7
- /**
8
- * Specifies the classname and description, instantiates the widget,
9
- * loads localization files, and includes necessary stylesheets and JavaScript.
10
- */
11
- public function __construct() {
12
-
13
- // Hooks fired when the Widget is activated and deactivated
14
- register_activation_hook( __FILE__, array( $this, 'activate' ) );
15
- register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
16
-
17
- parent::__construct(
18
- 'ampforwp-button',
19
- __( 'AMP Button Module', 'accelerated-mobile-pages' ),
20
- array(
21
- 'classname' => 'ampforwp-button',
22
- 'description' => __( 'Displays Button with text and link options.', 'accelerated-mobile-pages' )
23
- )
24
- );
25
-
26
- add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
27
-
28
- // Add static written Jquery
29
- add_action( 'admin_footer', array( $this, 'footer_scritps') );
30
-
31
-
32
- } // end constructor
33
-
34
- /*--------------------------------------------------*/
35
- /* Widget API Functions
36
- /*--------------------------------------------------*/
37
-
38
- /**
39
- * Outputs the content of the widget.
40
- *
41
- * @param array args The array of form elements
42
- * @param array instance The current instance of the widget
43
- */
44
- public function widget( $args, $instance ) {
45
- $target = "";
46
- $output = "";
47
-
48
- extract( $args, EXTR_SKIP );
49
-
50
- $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Classes' );
51
- $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
52
-
53
- $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array();
54
-
55
-
56
-
57
- echo $before_widget;
58
- $output .= '<div class="amp-wp-content amp_cb_module amp_cb_btn">';
59
-
60
- foreach( $features as $feature ) {
61
-
62
- if ( $feature['radio'] == 'radio-off'){
63
- $target = "_self";
64
- } elseif( $feature['radio'] == 'radio-on' ){
65
- $target = "_blank";
66
- }
67
-
68
- if ( $feature['size'] == '1'){
69
- $size = "s_btn";
70
- } elseif( $feature['size'] == '2' ){
71
- $size = "m_btn";
72
- } elseif( $feature['size'] == '3' ){
73
- $size = "l_btn";
74
- }
75
- //Corrected the URL in button module and breaking of desing and link issue #951 & #972
76
- $output .= '<a href="'.esc_url($feature['url']).'" class="' . $size . '" target="' . $target . '" >'. $feature['title'] .'</a>';
77
- }
78
- $output .= '</div>';
79
-
80
- $sanitizer = new AMPFORWP_Content( $output, array(),
81
- apply_filters( 'ampforwp_content_sanitizers',array( 'AMP_Img_Sanitizer' => array(),'AMP_Style_Sanitizer' => array() ) ) );
82
- $sanitized_output = $sanitizer->get_amp_content();
83
-
84
- if( $sanitized_output ) {
85
- echo $sanitized_output;
86
- }
87
-
88
- echo $after_widget;
89
-
90
- } // end widget
91
-
92
- /**
93
- * Processes the widget's options to be saved.
94
- *
95
- * @param array new_instance The new instance of values to be generated via the update.
96
- * @param array old_instance The previous instance of values before the update.
97
- */
98
- public function update( $new_instance, $old_instance ) {
99
-
100
- $instance = $old_instance;
101
-
102
- $instance['title'] = strip_tags($new_instance['title']);
103
-
104
- foreach($new_instance['features'] as $feature){
105
- $feature['title'] = strip_tags($feature['title']);
106
- $feature['description'] = strip_tags($feature['description']);
107
- $feature['image'] = strip_tags($feature['image']);
108
- }
109
- $instance['features'] = $new_instance['features'];
110
-
111
- return $instance;
112
-
113
- } // end widget
114
-
115
- /**
116
- * Generates the administration form for the widget.
117
- *
118
- * @param array instance The array of keys and values for the widget.
119
- */
120
- public function form( $instance ) {
121
-
122
- $instance = wp_parse_args(
123
- (array) $instance
124
- );
125
-
126
- $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; ?>
127
- <p> </p>
128
-
129
-
130
- <?php
131
-
132
- $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array(); ?>
133
- <span class="ampforwp-button-additional"> <?php
134
- $c = 0; ?>
135
-
136
- <?php
137
-
138
- if ( count( $features ) > 0 ) {
139
- foreach( $features as $feature ) {
140
- if ( isset( $feature['title'] ) || isset( $feature['description'] ) ) { ?>
141
- <div class="widget">
142
- <div class="widget-top"><div class="widget-title"><h3><?php echo $feature['title'];?><span class="in-widget-title"></span></h3></div>
143
- </div>
144
-
145
- <div class="widget-inside">
146
- <div class="widget-content">
147
- <p>
148
- <label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][title]'; ?>"><?php _e( 'Button Text:' ); ?></label>
149
- <input class="widefat" id="<?php echo $this->get_field_id( 'features' ) .'-'. $c.'-title'; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][title]'; ?>" type="text" value="<?php echo $feature['title']; ?>" /> </p>
150
-
151
- <p><label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][url]'; ?>"><?php _e( 'Url:' ); ?></label>
152
- <input class="widefat" id="<?php echo $this->get_field_id( 'features' ) .'-'. $c.'-url'; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][url]'; ?>" type="text" value="<?php echo $feature['url']; ?>" />
153
- </p>
154
-
155
-
156
- <p><label><?php _e('URL Target:'); ?> </label><br />
157
- <label class="radio_label" for="<?php echo $this->get_field_id('id') . "-on"; ?>"><?php _e('New Tab'); ?> </label>
158
- <input class="widefat" id="<?php echo $this->get_field_id('id') . "-on"; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][radio]'; ?>" type="radio" value="radio-on" <?php if ( $feature['radio'] == 'radio-on'): ?> checked <?php endif ?> />
159
-
160
- <label class="radio_label" for="<?php echo $this->get_field_id('id') . "-off"; ?>"> <?php _e('Current'); ?> </label>
161
-
162
- <input class="widefat" id="<?php echo $this->get_field_id('id') . "-off"; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][radio]'; ?>" type="radio" value="radio-off" <?php if ( $feature['radio'] == 'radio-off' || $feature['radio'] == ''): ?> checked <?php endif ?> />
163
- </p>
164
- <!-- done -->
165
- <p>
166
- <label for="<?php echo $this->get_field_id('id') . "-size"; ?>"> <?php _e('Select Size:'); ?> </label>
167
- <select id="<?php echo $this->get_field_id('id') . "-size"; ?>" class="widefat" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][size]'; ?>">
168
- <option value="1" <?php selected( $feature['size'], 1 ); ?>>Small</option>
169
- <option value="2" <?php selected( $feature['size'], 2 ); ?>>Medium</option>
170
- <option value="3" <?php selected( $feature['size'], 3 ); ?>>Large</option>
171
- </select>
172
- </p>
173
-
174
- <p> <a class="ampforwp-button-remove delete button left"><?php _e('Remove Feature','accelerated-mobile-pages')?></a> </p>
175
- </div>
176
- </div>
177
- </div>
178
- <?php
179
- $c = $c +1;
180
- }
181
- }
182
- } ?>
183
- </span>
184
-
185
- <a class="ampforwp-button-add button left"> <?php _e('Add Feature','accelerated-mobile-pages'); ?> </a>
186
- <p> </p>
187
- <?php
188
-
189
- } // end form
190
-
191
- /*--------------------------------------------------*/
192
- /* Public Functions
193
- /*--------------------------------------------------*/
194
-
195
- /**
196
- * Fired when the plugin is activated.
197
- *
198
- * @param boolean $network_wide True if WPMU superadmin uses "Network Activate" action, false if WPMU is disabled or plugin is activated on an individual blog.
199
- */
200
- public function activate( $network_wide ) {
201
-
202
- } // end activate
203
-
204
- /**
205
- * Fired when the plugin is deactivated.
206
- *
207
- * @param boolean $network_wide True if WPMU superadmin uses "Network Activate" action, false if WPMU is disabled or plugin is activated on an individual blog
208
- */
209
- public function deactivate( $network_wide ) {
210
-
211
- } // end deactivate
212
-
213
- /**
214
- * Registers and enqueues admin-specific styles.
215
- */
216
- public function register_admin_styles() {
217
-
218
- } // end register_admin_styles
219
-
220
- /**
221
- * Registers and enqueues admin-specific JavaScript.
222
- */
223
- public function register_admin_scripts() {
224
-
225
- wp_enqueue_script( 'ampforwp-builder-script', plugins_url('/modules/js/amp.js' , dirname(__FILE__) ) , array( 'jquery' ), false, true );
226
-
227
- } // end register_admin_scripts
228
-
229
- public function footer_scritps() { ?>
230
- <style>.radio_label{}</style>
231
- <?php }
232
-
233
- /**
234
- * Registers and enqueues widget-specific styles.
235
- */
236
- public function register_widget_styles() {
237
-
238
- } // end register_widget_styles
239
-
240
- /**
241
- * Registers and enqueues widget-specific scripts.
242
- */
243
- public function register_widget_scripts() {
244
-
245
- } // end register_widget_scripts
246
-
247
- } // end class
248
-
249
-
250
- add_action( 'widgets_init', function(){
251
- register_widget( 'AMPFORWP_Button_Widget' );
252
  });
1
+ <?php class AMPFORWP_Button_Widget extends WP_Widget {
2
+
3
+ /*--------------------------------------------------*/
4
+ /* Constructor
5
+ /*--------------------------------------------------*/
6
+
7
+ /**
8
+ * Specifies the classname and description, instantiates the widget,
9
+ * loads localization files, and includes necessary stylesheets and JavaScript.
10
+ */
11
+ public function __construct() {
12
+
13
+ // Hooks fired when the Widget is activated and deactivated
14
+ register_activation_hook( __FILE__, array( $this, 'activate' ) );
15
+ register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
16
+
17
+ parent::__construct(
18
+ 'ampforwp-button',
19
+ __( 'AMP Button Module', 'accelerated-mobile-pages' ),
20
+ array(
21
+ 'classname' => 'ampforwp-button',
22
+ 'description' => __( 'Displays Button with text and link options.', 'accelerated-mobile-pages' )
23
+ )
24
+ );
25
+
26
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
27
+
28
+ // Add static written Jquery
29
+ add_action( 'admin_footer', array( $this, 'footer_scritps') );
30
+
31
+
32
+ } // end constructor
33
+
34
+ /*--------------------------------------------------*/
35
+ /* Widget API Functions
36
+ /*--------------------------------------------------*/
37
+
38
+ /**
39
+ * Outputs the content of the widget.
40
+ *
41
+ * @param array args The array of form elements
42
+ * @param array instance The current instance of the widget
43
+ */
44
+ public function widget( $args, $instance ) {
45
+ $target = "";
46
+ $output = "";
47
+
48
+ extract( $args, EXTR_SKIP );
49
+
50
+ $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Classes' );
51
+ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
52
+
53
+ $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array();
54
+
55
+
56
+
57
+ echo $before_widget;
58
+ $output .= '<div class="amp-wp-content amp_cb_module amp_cb_btn">';
59
+
60
+ foreach( $features as $feature ) {
61
+
62
+ if ( $feature['radio'] == 'radio-off'){
63
+ $target = "_self";
64
+ } elseif( $feature['radio'] == 'radio-on' ){
65
+ $target = "_blank";
66
+ }
67
+
68
+ if ( $feature['size'] == '1'){
69
+ $size = "s_btn";
70
+ } elseif( $feature['size'] == '2' ){
71
+ $size = "m_btn";
72
+ } elseif( $feature['size'] == '3' ){
73
+ $size = "l_btn";
74
+ }
75
+ //Corrected the URL in button module and breaking of desing and link issue #951 & #972
76
+ $output .= '<a href="'.esc_url($feature['url']).'" class="' . $size . '" target="' . $target . '" >'. $feature['title'] .'</a>';
77
+ }
78
+ $output .= '</div>';
79
+
80
+ $sanitizer = new AMPFORWP_Content( $output, array(),
81
+ apply_filters( 'ampforwp_content_sanitizers',array( 'AMP_Img_Sanitizer' => array(),'AMP_Style_Sanitizer' => array() ) ) );
82
+ $sanitized_output = $sanitizer->get_amp_content();
83
+
84
+ if( $sanitized_output ) {
85
+ echo $sanitized_output;
86
+ }
87
+
88
+ echo $after_widget;
89
+
90
+ } // end widget
91
+
92
+ /**
93
+ * Processes the widget's options to be saved.
94
+ *
95
+ * @param array new_instance The new instance of values to be generated via the update.
96
+ * @param array old_instance The previous instance of values before the update.
97
+ */
98
+ public function update( $new_instance, $old_instance ) {
99
+
100
+ $instance = $old_instance;
101
+
102
+ $instance['title'] = strip_tags($new_instance['title']);
103
+
104
+ foreach($new_instance['features'] as $feature){
105
+ $feature['title'] = strip_tags($feature['title']);
106
+ $feature['description'] = strip_tags($feature['description']);
107
+ $feature['image'] = strip_tags($feature['image']);
108
+ }
109
+ $instance['features'] = $new_instance['features'];
110
+
111
+ return $instance;
112
+
113
+ } // end widget
114
+
115
+ /**
116
+ * Generates the administration form for the widget.
117
+ *
118
+ * @param array instance The array of keys and values for the widget.
119
+ */
120
+ public function form( $instance ) {
121
+
122
+ $instance = wp_parse_args(
123
+ (array) $instance
124
+ );
125
+
126
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; ?>
127
+ <p> </p>
128
+
129
+
130
+ <?php
131
+
132
+ $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array(); ?>
133
+ <span class="ampforwp-button-additional"> <?php
134
+ $c = 0; ?>
135
+
136
+ <?php
137
+
138
+ if ( count( $features ) > 0 ) {
139
+ foreach( $features as $feature ) {
140
+ if ( isset( $feature['title'] ) || isset( $feature['description'] ) ) { ?>
141
+ <div class="widget">
142
+ <div class="widget-top"><div class="widget-title"><h3><?php echo $feature['title'];?><span class="in-widget-title"></span></h3></div>
143
+ </div>
144
+
145
+ <div class="widget-inside">
146
+ <div class="widget-content">
147
+ <p>
148
+ <label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][title]'; ?>"><?php _e( 'Button Text:' ); ?></label>
149
+ <input class="widefat" id="<?php echo $this->get_field_id( 'features' ) .'-'. $c.'-title'; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][title]'; ?>" type="text" value="<?php echo $feature['title']; ?>" /> </p>
150
+
151
+ <p><label for="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][url]'; ?>"><?php _e( 'Url:' ); ?></label>
152
+ <input class="widefat" id="<?php echo $this->get_field_id( 'features' ) .'-'. $c.'-url'; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][url]'; ?>" type="text" value="<?php echo $feature['url']; ?>" />
153
+ </p>
154
+
155
+
156
+ <p><label><?php _e('URL Target:'); ?> </label><br />
157
+ <label class="radio_label" for="<?php echo $this->get_field_id('id') . "-on"; ?>"><?php _e('New Tab'); ?> </label>
158
+ <input class="widefat" id="<?php echo $this->get_field_id('id') . "-on"; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][radio]'; ?>" type="radio" value="radio-on" <?php if ( $feature['radio'] == 'radio-on'): ?> checked <?php endif ?> />
159
+
160
+ <label class="radio_label" for="<?php echo $this->get_field_id('id') . "-off"; ?>"> <?php _e('Current'); ?> </label>
161
+
162
+ <input class="widefat" id="<?php echo $this->get_field_id('id') . "-off"; ?>" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][radio]'; ?>" type="radio" value="radio-off" <?php if ( $feature['radio'] == 'radio-off' || $feature['radio'] == ''): ?> checked <?php endif ?> />
163
+ </p>
164
+ <!-- done -->
165
+ <p>
166
+ <label for="<?php echo $this->get_field_id('id') . "-size"; ?>"> <?php _e('Select Size:'); ?> </label>
167
+ <select id="<?php echo $this->get_field_id('id') . "-size"; ?>" class="widefat" name="<?php echo $this->get_field_name( 'features' ) . '['.$c.'][size]'; ?>">
168
+ <option value="1" <?php selected( $feature['size'], 1 ); ?>>Small</option>
169
+ <option value="2" <?php selected( $feature['size'], 2 ); ?>>Medium</option>
170
+ <option value="3" <?php selected( $feature['size'], 3 ); ?>>Large</option>
171
+ </select>
172
+ </p>
173
+
174
+ <p> <a class="ampforwp-button-remove delete button left"><?php _e('Remove Feature','accelerated-mobile-pages')?></a> </p>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ <?php
179
+ $c = $c +1;
180
+ }
181
+ }
182
+ } ?>
183
+ </span>
184
+
185
+ <a class="ampforwp-button-add button left"> <?php _e('Add Feature','accelerated-mobile-pages'); ?> </a>
186
+ <p> </p>
187
+ <?php
188
+
189
+ } // end form
190
+
191
+ /*--------------------------------------------------*/
192
+ /* Public Functions
193
+ /*--------------------------------------------------*/
194
+
195
+ /**
196
+ * Fired when the plugin is activated.
197
+ *
198
+ * @param boolean $network_wide True if WPMU superadmin uses "Network Activate" action, false if WPMU is disabled or plugin is activated on an individual blog.
199
+ */
200
+ public function activate( $network_wide ) {
201
+
202
+ } // end activate
203
+
204
+ /**
205
+ * Fired when the plugin is deactivated.
206
+ *
207
+ * @param boolean $network_wide True if WPMU superadmin uses "Network Activate" action, false if WPMU is disabled or plugin is activated on an individual blog
208
+ */
209
+ public function deactivate( $network_wide ) {
210
+
211
+ } // end deactivate
212
+
213
+ /**
214
+ * Registers and enqueues admin-specific styles.
215
+ */
216
+ public function register_admin_styles() {
217
+
218
+ } // end register_admin_styles
219
+
220
+ /**
221
+ * Registers and enqueues admin-specific JavaScript.
222
+ */
223
+ public function register_admin_scripts() {
224
+
225
+ wp_enqueue_script( 'ampforwp-builder-script', plugins_url('/modules/js/amp.js' , dirname(__FILE__) ) , array( 'jquery' ), false, true );
226
+
227
+ } // end register_admin_scripts
228
+
229
+ public function footer_scritps() { ?>
230
+ <style>.radio_label{}</style>
231
+ <?php }
232
+
233
+ /**
234
+ * Registers and enqueues widget-specific styles.
235
+ */
236
+ public function register_widget_styles() {
237
+
238
+ } // end register_widget_styles
239
+
240
+ /**
241
+ * Registers and enqueues widget-specific scripts.
242
+ */
243
+ public function register_widget_scripts() {
244
+
245
+ } // end register_widget_scripts
246
+
247
+ } // end class
248
+
249
+
250
+ add_action( 'widgets_init', function(){
251
+ register_widget( 'AMPFORWP_Button_Widget' );
252
  });
includes/modules/js/amp.js CHANGED
@@ -1,158 +1,158 @@
1
- jQuery(document).ready(function($) {
2
- var count = 0;
3
-
4
- //For Blurb Module
5
- jQuery(".ampforwp-blurb-add").live('click', function(e) {
6
- console.log('click');
7
-
8
- event.preventDefault();
9
- var additional = $(this).parent().parent().find('.ampforwp-blurb-additional');
10
- var container = $(this).parent().parent().parent().parent();
11
- var container_class = container.attr('id');
12
- var container_class_array = container_class.split("ampforwp-blurb-").reverse();
13
- var instance = container_class_array[0];
14
- var add = $(this).parent().parent().find('.ampforwp-blurb-add');
15
- count = additional.find('.widget-top').length;
16
-
17
- additional.append('<div class="widget"><div class="widget-top"><div class="widget-title-action"> </div> <div class="widget-title"><h3> New Module<span class="in-widget-title"></span></h3></div></div><div class="widget-inside"><p><label for="widget-ampforwp-blurb['+instance+'][features]['+count+'][title]">Title</label>'+
18
- '<input class="widefat" id="widget-ampforwp-blurb-'+instance+'-features-'+count+'-title" name="widget-ampforwp-blurb['+instance+'][features]['+count+'][title]" type="text" value="Heart Of The Landing Page" />'+
19
- '<label for="widget-ampforwp-blurb['+instance+'][features]['+count+'][description]">Description</label>'+
20
- '<textarea class="widefat" id="widget-ampforwp-blurb-'+instance+'-features-'+count+'-description" name="widget-ampforwp-blurb['+instance+'][features]['+count+'][description]" rows=\'6\' cols=\'50\'>This is a sample text which is being used for the dummy purpose to avoid confusion.</textarea> <span class="clear"></span></p>' + '<p> <label for=""> Image: </label><input type="button" class="select-img-'+count+' button left" style="width:auto;" value="Select Image" onclick="ampSelectImage('+count+');"/><input type="button" style="display:none" name="removeimg" id="remove-img-'+count+'" class="button button-secondary remove-img-button" data-count-type="'+count+'" value="Remove Image" onclick="removeImage('+count+')"><img src="http://i.imgur.com/5nPXqZG.png" class="preview-image block-image-'+count+'" >' + '<input type="hidden" id="amp-img-field-'+count+'" class="img'+count+'" style="width:auto;" name="widget-ampforwp-blurb['+instance+'][features]['+count+'][image]" id="'+instance+'-features-'+count+'" value="http://i.imgur.com/5nPXqZG.png" /></p>' + ' <p> <a class="ampforwp-blurb-remove delete button left">Remove Feature</a></p></div></div>');
21
- });
22
- jQuery(".ampforwp-blurb-remove").live('click', function() {
23
- jQuery(this).parent().parent().parent().remove();
24
- });
25
-
26
- //For Text Module
27
- jQuery(".ampforwp-text-add").live('click', function(e) {
28
- console.log('click');
29
-
30
- event.preventDefault();
31
- var additional = $(this).parent().parent().find('.ampforwp-text-additional');
32
- var container = $(this).parent().parent().parent().parent();
33
- var container_class = container.attr('id');
34
- var container_class_array = container_class.split("ampforwp-text-").reverse();
35
- var instance = container_class_array[0];
36
- var add = $(this).parent().parent().find('.ampforwp-text-add');
37
- count = additional.find('.widget-top').length;
38
-
39
- additional.append('<div class="widget"><div class="widget-top"><div class="widget-title-action"> </div> <div class="widget-title"><h3> New Module<span class="in-widget-title"></span></h3></div></div><div class="widget-inside"><p><label for="widget-ampforwp-text['+instance+'][features]['+count+'][title]">Title</label>'+
40
- '<input class="widefat" id="widget-ampforwp-text-'+instance+'-features-'+count+'-title" name="widget-ampforwp-text['+instance+'][features]['+count+'][title]" type="text" value="This is the default title" />'+
41
- '<label for="widget-ampforwp-text['+instance+'][features]['+count+'][description]">Description</label>'+
42
- '<textarea class="widefat" id="widget-ampforwp-text-'+instance+'-features-'+count+'-description" name="widget-ampforwp-text['+instance+'][features]['+count+'][description]" rows=\'6\' cols=\'50\'>This is the description added by default </textarea> <span class="clear"></span></p>' + ' <p> <a class="ampforwp-text-remove delete button left">Remove Feature</a></p></div></div>' );
43
- });
44
- jQuery(".ampforwp-text-remove").live('click', function() {
45
- jQuery(this).parent().parent().parent().remove();
46
- });
47
-
48
- //For Button Module
49
- jQuery(".ampforwp-button-add").live('click', function(e) {
50
- console.log('click');
51
-
52
- event.preventDefault();
53
- var additional = $(this).parent().parent().find('.ampforwp-button-additional');
54
- var container = $(this).parent().parent().parent().parent();
55
- var container_class = container.attr('id');
56
- var container_class_array = container_class.split("ampforwp-button-").reverse();
57
- var instance = container_class_array[0];
58
- var add = $(this).parent().parent().find('.ampforwp-button-add');
59
- count = additional.find('.widget-top').length;
60
-
61
- additional.append('<div class="widget"><div class="widget-top"><div class="widget-title-action"> </div> <div class="widget-title"><h3> New Module<span class="in-widget-title"></span></h3></div></div><div class="widget-inside"><p><label for="widget-ampforwp-button['+instance+'][features]['+count+'][title]">Button Text</label>'+
62
-
63
- //Text Fields
64
- '<input class="widefat" id="widget-ampforwp-button-'+instance+'-features-'+count+'-title" name="widget-ampforwp-button['+instance+'][features]['+count+'][title]" type="text" value="Click Here" /></p>'+
65
-
66
- '<p><label for="widget-ampforwp-button['+instance+'][features]['+count+'][url]">Url:</label>'+
67
- '<input class="widefat" id="widget-ampforwp-button-'+instance+'-features-'+count+'-url" name="widget-ampforwp-button['+instance+'][features]['+count+'][url]" type="text" value="#" /></p>' +
68
- // Radio
69
- '<p> <label>URL Target:</label> <br />'+
70
-
71
- '<label for="widget-ampforwp-button['+instance+'][features]['+count+']'+"-on"+'">New Tab </label>'+
72
- '<input class="widefat" id="widget-ampforwp-button['+instance+'][features]['+count+']'+"-on"+'" name="widget-ampforwp-button['+instance+'][features]['+count+']'+'[radio]" type="radio" value="radio-on" />'+
73
- '<label for="widget-ampforwp-button['+instance+'][features]['+count+']'+"-off"+'">Current </label>'+
74
- '<input class="widefat" id="widget-ampforwp-button['+instance+'][features]['+count+']'+"-off"+'" name="widget-ampforwp-button['+instance+'][features]['+count+']'+'[radio]" type="radio" checked value="radio-off" /></p>'+
75
- // Select
76
- '<p> <label for="widget-ampforwp-button['+instance+']'+"-id-size"+'">Select Size:</label>'+
77
- '<select id="widget-ampforwp-button-'+instance+'-id-size" class="widefat" name="widget-ampforwp-button['+instance+'][features]['+count+'][size]"> <option value="1">Small</option> <option value="2">Medium</option> <option value="3">Large</option> </select> </p>'+
78
-
79
- '<p> <a class="ampforwp-button-remove delete button left">Remove Feature</a></p></div></div>' );
80
- });
81
-
82
-
83
- jQuery(".ampforwp-button-remove").live('click', function() {
84
- jQuery(this).parent().parent().parent().remove();
85
- });
86
-
87
- // Tiny Mce code
88
- // $(document).on('widget-updated', function(event, widget){
89
- // var widget_id = $(widget).attr('id');
90
- // $('#'+widget_id + ' .switch-tmce').hide();
91
- // });
92
-
93
- remove_button = jQuery('.remove-img-button');
94
-
95
- remove_button.on('click', function(e) {
96
-
97
- id = jQuery(this).attr('data-count-type')
98
-
99
- imageToRemove = jQuery('.block-image-'+ id);
100
-
101
- imageToRemove.attr('src','');
102
-
103
- // remove_image_button_activation( id );
104
-
105
- });
106
-
107
-
108
- function remove_image_button_activation( id ) {
109
-
110
- var currentImage = jQuery('.block-image-'+id).attr('src');
111
-
112
-
113
- console.log(id );
114
-
115
- if ( currentImage == undefined ) {
116
- jQuery('#remove-img-'+id).hide();
117
- } else {
118
- jQuery('#remove-img-'+id).show();
119
- }
120
- }
121
-
122
-
123
-
124
-
125
- });
126
-
127
- var image_field1, image_field2, image_field3;
128
-
129
- function ampSelectImage(count){
130
-
131
- image_field1 = jQuery('#amp-img-field-'+count);
132
- image_field2 = jQuery('.block-image-'+count);
133
- image_field3 = jQuery('#remove-img-'+count);
134
-
135
-
136
- imageSource = image_field2.attr('src');
137
-
138
- if ( imageSource ) {
139
- image_field3.show();
140
- }
141
-
142
- tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
143
- window.send_to_editor = function(html) {
144
-
145
-
146
- if(image_field1 != undefined){
147
- imgurl = jQuery("<div>" + html + "</div>").find('img').attr('src');
148
-
149
-
150
- image_field1.val(imgurl);
151
- image_field2.attr('src',imgurl);
152
- image_field2.show();
153
- image_field3.show();
154
- tb_remove();
155
- }
156
- }
157
- return false;
158
- }
1
+ jQuery(document).ready(function($) {
2
+ var count = 0;
3
+
4
+ //For Blurb Module
5
+ jQuery(".ampforwp-blurb-add").live('click', function(e) {
6
+ console.log('click');
7
+
8
+ event.preventDefault();
9
+ var additional = $(this).parent().parent().find('.ampforwp-blurb-additional');
10
+ var container = $(this).parent().parent().parent().parent();
11
+ var container_class = container.attr('id');
12
+ var container_class_array = container_class.split("ampforwp-blurb-").reverse();
13
+ var instance = container_class_array[0];
14
+ var add = $(this).parent().parent().find('.ampforwp-blurb-add');
15
+ count = additional.find('.widget-top').length;
16
+
17
+ additional.append('<div class="widget"><div class="widget-top"><div class="widget-title-action"> </div> <div class="widget-title"><h3> New Module<span class="in-widget-title"></span></h3></div></div><div class="widget-inside"><p><label for="widget-ampforwp-blurb['+instance+'][features]['+count+'][title]">Title</label>'+
18
+ '<input class="widefat" id="widget-ampforwp-blurb-'+instance+'-features-'+count+'-title" name="widget-ampforwp-blurb['+instance+'][features]['+count+'][title]" type="text" value="Heart Of The Landing Page" />'+
19
+ '<label for="widget-ampforwp-blurb['+instance+'][features]['+count+'][description]">Description</label>'+
20
+ '<textarea class="widefat" id="widget-ampforwp-blurb-'+instance+'-features-'+count+'-description" name="widget-ampforwp-blurb['+instance+'][features]['+count+'][description]" rows=\'6\' cols=\'50\'>This is a sample text which is being used for the dummy purpose to avoid confusion.</textarea> <span class="clear"></span></p>' + '<p> <label for=""> Image: </label><input type="button" class="select-img-'+count+' button left" style="width:auto;" value="Select Image" onclick="ampSelectImage('+count+');"/><input type="button" style="display:none" name="removeimg" id="remove-img-'+count+'" class="button button-secondary remove-img-button" data-count-type="'+count+'" value="Remove Image" onclick="removeImage('+count+')"><img src="http://i.imgur.com/5nPXqZG.png" class="preview-image block-image-'+count+'" >' + '<input type="hidden" id="amp-img-field-'+count+'" class="img'+count+'" style="width:auto;" name="widget-ampforwp-blurb['+instance+'][features]['+count+'][image]" id="'+instance+'-features-'+count+'" value="http://i.imgur.com/5nPXqZG.png" /></p>' + ' <p> <a class="ampforwp-blurb-remove delete button left">Remove Feature</a></p></div></div>');
21
+ });
22
+ jQuery(".ampforwp-blurb-remove").live('click', function() {
23
+ jQuery(this).parent().parent().parent().remove();
24
+ });
25
+
26
+ //For Text Module
27
+ jQuery(".ampforwp-text-add").live('click', function(e) {
28
+ console.log('click');
29
+
30
+ event.preventDefault();
31
+ var additional = $(this).parent().parent().find('.ampforwp-text-additional');
32
+ var container = $(this).parent().parent().parent().parent();
33
+ var container_class = container.attr('id');
34
+ var container_class_array = container_class.split("ampforwp-text-").reverse();
35
+ var instance = container_class_array[0];
36
+ var add = $(this).parent().parent().find('.ampforwp-text-add');
37
+ count = additional.find('.widget-top').length;
38
+
39
+ additional.append('<div class="widget"><div class="widget-top"><div class="widget-title-action"> </div> <div class="widget-title"><h3> New Module<span class="in-widget-title"></span></h3></div></div><div class="widget-inside"><p><label for="widget-ampforwp-text['+instance+'][features]['+count+'][title]">Title</label>'+
40
+ '<input class="widefat" id="widget-ampforwp-text-'+instance+'-features-'+count+'-title" name="widget-ampforwp-text['+instance+'][features]['+count+'][title]" type="text" value="This is the default title" />'+
41
+ '<label for="widget-ampforwp-text['+instance+'][features]['+count+'][description]">Description</label>'+
42
+ '<textarea class="widefat" id="widget-ampforwp-text-'+instance+'-features-'+count+'-description" name="widget-ampforwp-text['+instance+'][features]['+count+'][description]" rows=\'6\' cols=\'50\'>This is the description added by default </textarea> <span class="clear"></span></p>' + ' <p> <a class="ampforwp-text-remove delete button left">Remove Feature</a></p></div></div>' );
43
+ });
44
+ jQuery(".ampforwp-text-remove").live('click', function() {
45
+ jQuery(this).parent().parent().parent().remove();
46
+ });
47
+
48
+ //For Button Module
49
+ jQuery(".ampforwp-button-add").live('click', function(e) {
50
+ console.log('click');
51
+
52
+ event.preventDefault();
53
+ var additional = $(this).parent().parent().find('.ampforwp-button-additional');
54
+ var container = $(this).parent().parent().parent().parent();
55
+ var container_class = container.attr('id');
56
+ var container_class_array = container_class.split("ampforwp-button-").reverse();
57
+ var instance = container_class_array[0];
58
+ var add = $(this).parent().parent().find('.ampforwp-button-add');
59
+ count = additional.find('.widget-top').length;
60
+
61
+ additional.append('<div class="widget"><div class="widget-top"><div class="widget-title-action"> </div> <div class="widget-title"><h3> New Module<span class="in-widget-title"></span></h3></div></div><div class="widget-inside"><p><label for="widget-ampforwp-button['+instance+'][features]['+count+'][title]">Button Text</label>'+
62
+
63
+ //Text Fields
64
+ '<input class="widefat" id="widget-ampforwp-button-'+instance+'-features-'+count+'-title" name="widget-ampforwp-button['+instance+'][features]['+count+'][title]" type="text" value="Click Here" /></p>'+
65
+
66
+ '<p><label for="widget-ampforwp-button['+instance+'][features]['+count+'][url]">Url:</label>'+
67
+ '<input class="widefat" id="widget-ampforwp-button-'+instance+'-features-'+count+'-url" name="widget-ampforwp-button['+instance+'][features]['+count+'][url]" type="text" value="#" /></p>' +
68
+ // Radio
69
+ '<p> <label>URL Target:</label> <br />'+
70
+
71
+ '<label for="widget-ampforwp-button['+instance+'][features]['+count+']'+"-on"+'">New Tab </label>'+
72
+ '<input class="widefat" id="widget-ampforwp-button['+instance+'][features]['+count+']'+"-on"+'" name="widget-ampforwp-button['+instance+'][features]['+count+']'+'[radio]" type="radio" value="radio-on" />'+
73
+ '<label for="widget-ampforwp-button['+instance+'][features]['+count+']'+"-off"+'">Current </label>'+
74
+ '<input class="widefat" id="widget-ampforwp-button['+instance+'][features]['+count+']'+"-off"+'" name="widget-ampforwp-button['+instance+'][features]['+count+']'+'[radio]" type="radio" checked value="radio-off" /></p>'+
75
+ // Select
76
+ '<p> <label for="widget-ampforwp-button['+instance+']'+"-id-size"+'">Select Size:</label>'+
77
+ '<select id="widget-ampforwp-button-'+instance+'-id-size" class="widefat" name="widget-ampforwp-button['+instance+'][features]['+count+'][size]"> <option value="1">Small</option> <option value="2">Medium</option> <option value="3">Large</option> </select> </p>'+
78
+
79
+ '<p> <a class="ampforwp-button-remove delete button left">Remove Feature</a></p></div></div>' );
80
+ });
81
+
82
+
83
+ jQuery(".ampforwp-button-remove").live('click', function() {
84
+ jQuery(this).parent().parent().parent().remove();
85
+ });
86
+
87
+ // Tiny Mce code
88
+ // $(document).on('widget-updated', function(event, widget){
89
+ // var widget_id = $(widget).attr('id');
90
+ // $('#'+widget_id + ' .switch-tmce').hide();
91
+ // });
92
+
93
+ remove_button = jQuery('.remove-img-button');
94
+
95
+ remove_button.on('click', function(e) {
96
+
97
+ id = jQuery(this).attr('data-count-type')
98
+
99
+ imageToRemove = jQuery('.block-image-'+ id);
100
+
101
+ imageToRemove.attr('src','');
102
+
103
+ // remove_image_button_activation( id );
104
+
105
+ });
106
+
107
+
108
+ function remove_image_button_activation( id ) {
109
+
110
+ var currentImage = jQuery('.block-image-'+id).attr('src');
111
+
112
+
113
+ console.log(id );
114
+
115
+ if ( currentImage == undefined ) {
116
+ jQuery('#remove-img-'+id).hide();
117
+ } else {
118
+ jQuery('#remove-img-'+id).show();
119
+ }
120
+ }
121
+
122
+
123
+
124
+
125
+ });
126
+
127
+ var image_field1, image_field2, image_field3;
128
+
129
+ function ampSelectImage(count){
130
+
131
+ image_field1 = jQuery('#amp-img-field-'+count);
132
+ image_field2 = jQuery('.block-image-'+count);
133
+ image_field3 = jQuery('#remove-img-'+count);
134
+
135
+
136
+ imageSource = image_field2.attr('src');
137
+
138
+ if ( imageSource ) {
139
+ image_field3.show();
140
+ }
141
+
142
+ tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
143
+ window.send_to_editor = function(html) {
144
+
145
+
146
+ if(image_field1 != undefined){
147
+ imgurl = jQuery("<div>" + html + "</div>").find('img').attr('src');
148
+
149
+
150
+ image_field1.val(imgurl);
151
+ image_field2.attr('src',imgurl);
152
+ image_field2.show();
153
+ image_field3.show();
154
+ tb_remove();
155
+ }
156
+ }
157
+ return false;
158
+ }
includes/newsletter.php CHANGED
@@ -1,132 +1,132 @@
1
- <?php class ampforwp_pointers {
2
- const DISPLAY_VERSION = 'v1.0';
3
- function __construct () {
4
- add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
5
- }
6
- function admin_enqueue_scripts () {
7
- $dismissed = explode (',', get_user_meta (wp_get_current_user ()->ID, 'dismissed_wp_pointers', true));
8
- $do_tour = !in_array ('ampforwp_subscribe_pointer', $dismissed);
9
- if ($do_tour) {
10
- wp_enqueue_style ('wp-pointer');
11
- wp_enqueue_script ('wp-pointer');
12
-
13
- add_action('admin_print_footer_scripts', array($this, 'admin_print_footer_scripts'));
14
- add_action('admin_head', array($this, 'admin_head')); // Hook to admin head
15
- }
16
- }
17
- function admin_head () {
18
- ?>
19
- <style type="text/css" media="screen"> #pointer-primary { margin: 0 5px 0 0; } </style>
20
- <?php }
21
- function admin_print_footer_scripts () {
22
- global $pagenow;
23
- global $current_user;
24
- $tour = array ();
25
- $tab = isset($_GET['tab']) ? $_GET['tab'] : '';
26
- $function = '';
27
- $button2 = '';
28
- $options = array ();
29
- $show_pointer = false;
30
-
31
- if (!array_key_exists($tab, $tour)) {
32
-
33
- $show_pointer = true;
34
- $file_error = true;
35
-
36
- $id = '#toplevel_page_amp_options'; // Define ID used on page html element where we want to display pointer
37
- $content = '<h3>' . sprintf (__('You are awesome for using AMP!', 'accelerated-mobile-pages'), self::DISPLAY_VERSION) . '</h3>';
38
- $content .= __('<p>Do you want the latest on <b>AMP update</b> before others and some best resources on AMP in a single email? - Free just for users of AMP!</p>', 'accelerated-mobile-pages');
39
- $content .= __('
40
- <!-- Begin MailChimp Signup Form -->
41
- <style type="text/css">
42
- .wp-pointer-buttons{ padding:0; overflow: hidden; }
43
- .wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
44
- </style>
45
- <div id="mc_embed_signup">
46
- <form action="//app.mailerlite.com/webforms/submit/d3w0e1" data-id="258182" data-code="d3w0e1" method="POST" target="_blank">
47
- <div id="mc_embed_signup_scroll">
48
- <div class="mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">
49
- <input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="' . esc_attr( $current_user->display_name ) . '" style="display:none">
50
-
51
- <input type="text" value="' . esc_attr( $current_user->user_email ) . '" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">
52
-
53
- <input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="' . esc_attr( get_home_url() ) . '">
54
-
55
- <input type="hidden" name="ml-submit" value="1" />
56
- </div>
57
- <div id="mce-responses">
58
- <div class="response" id="mce-error-response" style="display:none"></div>
59
- <div class="response" id="mce-success-response" style="display:none"></div>
60
- </div>
61
- <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
62
- <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>
63
- <input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">
64
- </div>
65
- </form>
66
- </div>','accelerated-mobile-pages');
67
- $options = array (
68
- 'content' => $content,
69
- 'position' => array ('edge' => 'left', 'align' => 'left')
70
- );
71
- }
72
- if ($show_pointer) {
73
- $this->ampforwp_pointer_script ($id, $options, __('No Thanks', 'accelerated-mobile-pages'), $button2, $function);
74
- }
75
- }
76
- function get_admin_url($page, $tab) {
77
- $url = admin_url();
78
- $url .= $page.'?tab='.$tab;
79
- return $url;
80
- }
81
- function ampforwp_pointer_script ($id, $options, $button1, $button2=false, $function='') {
82
- ?>
83
- <script type="text/javascript">
84
- (function ($) {
85
- var wp_pointers_tour_opts = <?php echo json_encode ($options); ?>, setup;
86
- wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, {
87
- buttons: function (event, t) {
88
- button= jQuery ('<a id="pointer-close" class="button-secondary">' + '<?php echo $button1; ?>' + '</a>');
89
- button_2= jQuery ('#pointer-close.button');
90
- button.bind ('click.pointer', function () {
91
- t.element.pointer ('close');
92
- });
93
- button_2.on('click', function() {
94
- t.element.pointer ('close');
95
- } );
96
- return button;
97
- },
98
- close: function () {
99
- $.post (ajaxurl, {
100
- pointer: 'ampforwp_subscribe_pointer',
101
- action: 'dismiss-wp-pointer'
102
- });
103
- }
104
- });
105
- setup = function () {
106
- $('<?php echo $id; ?>').pointer(wp_pointers_tour_opts).pointer('open');
107
- <?php if ($button2) { ?>
108
- jQuery ('#pointer-close').after ('<a id="pointer-primary" class="button-primary">' + '<?php echo $button2; ?>' + '</a>');
109
- jQuery ('#pointer-primary').click (function () {
110
- <?php echo $function; ?>
111
- });
112
- jQuery ('#pointer-close').click (function () {
113
- $.post (ajaxurl, {
114
- pointer: 'ampforwp_subscribe_pointer',
115
- action: 'dismiss-wp-pointer'
116
- });
117
- })
118
- <?php } ?>
119
- };
120
- if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) {
121
- $(window).bind('load.wp-pointers', setup);
122
- }
123
- else {
124
- setup ();
125
- }
126
- }) (jQuery);
127
- </script>
128
- <?php
129
- }
130
- }
131
- $ampforwp_pointers = new ampforwp_pointers();
132
  ?>
1
+ <?php class ampforwp_pointers {
2
+ const DISPLAY_VERSION = 'v1.0';
3
+ function __construct () {
4
+ add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
5
+ }
6
+ function admin_enqueue_scripts () {
7
+ $dismissed = explode (',', get_user_meta (wp_get_current_user ()->ID, 'dismissed_wp_pointers', true));
8
+ $do_tour = !in_array ('ampforwp_subscribe_pointer', $dismissed);
9
+ if ($do_tour) {
10
+ wp_enqueue_style ('wp-pointer');
11
+ wp_enqueue_script ('wp-pointer');
12
+
13
+ add_action('admin_print_footer_scripts', array($this, 'admin_print_footer_scripts'));
14
+ add_action('admin_head', array($this, 'admin_head')); // Hook to admin head
15
+ }
16
+ }
17
+ function admin_head () {
18
+ ?>
19
+ <style type="text/css" media="screen"> #pointer-primary { margin: 0 5px 0 0; } </style>
20
+ <?php }
21
+ function admin_print_footer_scripts () {
22
+ global $pagenow;
23
+ global $current_user;
24
+ $tour = array ();
25
+ $tab = isset($_GET['tab']) ? $_GET['tab'] : '';
26
+ $function = '';
27
+ $button2 = '';
28
+ $options = array ();
29
+ $show_pointer = false;
30
+
31
+ if (!array_key_exists($tab, $tour)) {
32
+
33
+ $show_pointer = true;
34
+ $file_error = true;
35
+
36
+ $id = '#toplevel_page_amp_options'; // Define ID used on page html element where we want to display pointer
37
+ $content = '<h3>' . sprintf (__('You are awesome for using AMP!', 'accelerated-mobile-pages'), self::DISPLAY_VERSION) . '</h3>';
38
+ $content .= __('<p>Do you want the latest on <b>AMP update</b> before others and some best resources on AMP in a single email? - Free just for users of AMP!</p>', 'accelerated-mobile-pages');
39
+ $content .= __('
40
+ <!-- Begin MailChimp Signup Form -->
41
+ <style type="text/css">
42
+ .wp-pointer-buttons{ padding:0; overflow: hidden; }
43
+ .wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
44
+ </style>
45
+ <div id="mc_embed_signup">
46
+ <form action="//app.mailerlite.com/webforms/submit/d3w0e1" data-id="258182" data-code="d3w0e1" method="POST" target="_blank">
47
+ <div id="mc_embed_signup_scroll">
48
+ <div class="mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">
49
+ <input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="' . esc_attr( $current_user->display_name ) . '" style="display:none">
50
+
51
+ <input type="text" value="' . esc_attr( $current_user->user_email ) . '" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">
52
+
53
+ <input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="' . esc_attr( get_home_url() ) . '">
54
+
55
+ <input type="hidden" name="ml-submit" value="1" />
56
+ </div>
57
+ <div id="mce-responses">
58
+ <div class="response" id="mce-error-response" style="display:none"></div>
59
+ <div class="response" id="mce-success-response" style="display:none"></div>
60
+ </div>
61
+ <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
62
+ <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>
63
+ <input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">
64
+ </div>
65
+ </form>
66
+ </div>','accelerated-mobile-pages');
67
+ $options = array (
68
+ 'content' => $content,
69
+ 'position' => array ('edge' => 'left', 'align' => 'left')
70
+ );
71
+ }
72
+ if ($show_pointer) {
73
+ $this->ampforwp_pointer_script ($id, $options, __('No Thanks', 'accelerated-mobile-pages'), $button2, $function);
74
+ }
75
+ }
76
+ function get_admin_url($page, $tab) {
77
+ $url = admin_url();
78
+ $url .= $page.'?tab='.$tab;
79
+ return $url;
80
+ }
81
+ function ampforwp_pointer_script ($id, $options, $button1, $button2=false, $function='') {
82
+ ?>
83
+ <script type="text/javascript">
84
+ (function ($) {
85
+ var wp_pointers_tour_opts = <?php echo json_encode ($options); ?>, setup;
86
+ wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, {
87
+ buttons: function (event, t) {
88
+ button= jQuery ('<a id="pointer-close" class="button-secondary">' + '<?php echo $button1; ?>' + '</a>');
89
+ button_2= jQuery ('#pointer-close.button');
90
+ button.bind ('click.pointer', function () {
91
+ t.element.pointer ('close');
92
+ });
93
+ button_2.on('click', function() {
94
+ t.element.pointer ('close');
95
+ } );
96
+ return button;
97
+ },
98
+ close: function () {
99
+ $.post (ajaxurl, {
100
+ pointer: 'ampforwp_subscribe_pointer',
101
+ action: 'dismiss-wp-pointer'
102
+ });
103
+ }
104
+ });
105
+ setup = function () {
106
+ $('<?php echo $id; ?>').pointer(wp_pointers_tour_opts).pointer('open');
107
+ <?php if ($button2) { ?>
108
+ jQuery ('#pointer-close').after ('<a id="pointer-primary" class="button-primary">' + '<?php echo $button2; ?>' + '</a>');
109
+ jQuery ('#pointer-primary').click (function () {
110
+ <?php echo $function; ?>
111
+ });
112
+ jQuery ('#pointer-close').click (function () {
113
+ $.post (ajaxurl, {
114
+ pointer: 'ampforwp_subscribe_pointer',
115
+ action: 'dismiss-wp-pointer'
116
+ });
117
+ })
118
+ <?php } ?>
119
+ };
120
+ if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) {
121
+ $(window).bind('load.wp-pointers', setup);
122
+ }
123
+ else {
124
+ setup ();
125
+ }
126
+ }) (jQuery);
127
+ </script>
128
+ <?php
129
+ }
130
+ }
131
+ $ampforwp_pointers = new ampforwp_pointers();
132
  ?>
includes/onesignal-integration/amp-helper-frame.html CHANGED
@@ -1,6 +1,6 @@
1
- <html>
2
- <head></head>
3
- <body>
4
- <script src="https://cdn.onesignal.com/sdks/amp/amp-helper-frame.js"></script>
5
- </body>
6
- </html>
1
+ <html>
2
+ <head></head>
3
+ <body>
4
+ <script src="https://cdn.onesignal.com/sdks/amp/amp-helper-frame.js"></script>
5
+ </body>
6
+ </html>
includes/onesignal-integration/amp-permission-dialog.html CHANGED
@@ -1,6 +1,6 @@
1
- <html>
2
- <head></head>
3
- <body>
4
- <script src="https://cdn.onesignal.com/sdks/amp/amp-permission-dialog.js"></script>
5
- </body>
6
- </html>
1
+ <html>
2
+ <head></head>
3
+ <body>
4
+ <script src="https://cdn.onesignal.com/sdks/amp/amp-permission-dialog.js"></script>
5
+ </body>
6
+ </html>
includes/options/admin-config.php CHANGED
@@ -1,4558 +1,4601 @@
1
- <?php
2
- //Admin Panel Options
3
- if ( ! class_exists( 'Redux' ) ) {
4
- return;
5
- }
6
- // Option name where all the Redux data is stored.
7
- $opt_name = "redux_builder_amp";
8
- $amptfad = '<strong>DID YOU KNOW?</strong></br ><a href="https://ampforwp.com/amp-theme-framework/" target="_blank">You can create your own <strong>Custom theme with AMP Theme Framework</strong></a>';
9
- // #1093 Display only If AMP Comments is Not Installed
10
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
11
- if(!is_plugin_active( 'amp-comments/amp-comments.php' )){
12
- $comment_AD_URL = "http://ampforwp.com/amp-comments/#utm_source=options-panel&utm_medium=comments-tab&utm_campaign=AMP%20Plugin";
13
- $comment_desc = '<a href="'.$comment_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/comments-banner.png" width="560" height="85" /></a>';
14
- }
15
- // Display only If AMP Cache is Not Installed
16
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
17
- if(!is_plugin_active( 'amp-cache/ampforwp-cache.php' )){
18
- $cache_AD_URL = "http://ampforwp.com/amp-cache/#utm_source=options-panel&utm_medium=performance-tab&utm_campaign=AMP%20Plugin";
19
- $cache_desc = '<a href="'.$cache_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp_cache_b.png" width="560" height="85" /></a>';
20
- }
21
- // If CTA is not Activated
22
- $cta_desc = "";
23
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
24
- if(!is_plugin_active( 'AMP-cta/amp-cta.php' )){
25
- $cta_AD_URL = "http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=call-to-action_banner_in_notification_bar&utm_campaign=AMP%20Plugin";
26
- $cta_desc = '<a href="'.$cta_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/cta-banner.png" width="560" height="85" /></a>';
27
- }
28
-
29
- $extension_listing_array = array(
30
- array(
31
- 'name'=>'Advanced AMP ADS',
32
- 'desc'=>'Add Advertisement directly in the content',
33
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
34
- 'price'=>'$29',
35
- 'url_link'=>'http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin',
36
- 'plugin_active_path'=> 'amp-ads-google-adsense/amptoolkit-incontent-ads.php',
37
- 'item_name'=>'advanced-amp-ads',
38
- 'store_url'=>'',
39
- ),
40
- array(
41
- 'name'=>'Contact Form 7',
42
- 'desc'=>'Add Contact Us Form in AMP.',
43
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/cf7.png',
44
- 'price'=>'$39',
45
- 'url_link'=>'http://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=extension-tab_cf7&utm_campaign=AMP%20Plugin',
46
- 'plugin_active_path'=> 'amp-cf7/amp-cf7.php',
47
- 'item_name'=>'contact-form-7',
48
- 'store_url'=>'',
49
- ),
50
- array(
51
- 'name'=>'Gravity Forms',
52
- 'desc'=>'Add Gravity Forms Support in AMP.',
53
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/gf.png',
54
- 'price'=>'$79',
55
- 'url_link'=>'http://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=extension-tab_gf&utm_campaign=AMP%20Plugin',
56
- 'plugin_active_path'=> 'amp-gravity-forms/amp-gravity-forms.php',
57
- 'item_name'=>'Gravity Forms',
58
- 'store_url'=>'',
59
- ),
60
- array(
61
- 'name'=>'Email Opt-in Forms',
62
- 'desc'=>'Capture Leads with Email Subscription.',
63
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/email.png',
64
- 'price'=>'$79',
65
- 'url_link'=>'http://ampforwp.com/opt-in-forms/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin',
66
- 'plugin_active_path'=> 'amp-optin/amp-optin.php',
67
- 'item_name'=>'Email Opt-in Forms',
68
- 'store_url'=>'',
69
- ),
70
- array(
71
- 'name'=>'AMP Cache',
72
- 'desc'=>'AMP Cache is a Revolutionary Cache System for AMP',
73
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/cache-icon.png',
74
- 'price'=>'$89',
75
- 'url_link'=>'http://ampforwp.com/amp-cache/#utm_source=options-panel&utm_medium=extension-tab_cache&utm_campaign=AMP%20Plugin',
76
- 'plugin_active_path'=> 'amp-cache/ampforwp-cache.php',
77
- 'item_name'=>'AMP Cache',
78
- 'store_url'=>'',
79
- ),
80
- array(
81
- 'name'=>'Call To Action (CTA)',
82
- 'desc'=>'Higher Visibility & More Conversions',
83
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/mac-click.png',
84
- 'price'=>'$29',
85
- 'url_link'=>'http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=extension-tab_amp-cta&utm_campaign=AMP%20Plugin',
86
- 'plugin_active_path'=> 'AMP-cta/amp-cta.php',
87
- 'item_name'=>'Call To Action (CTA)',
88
- 'store_url'=>'',
89
- ),
90
- array(
91
- 'name'=>'AMP WooCommerce Pro',
92
- 'desc'=>'Advanced WooCommerce in AMP in two clicks.',
93
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/woo.png',
94
- 'price'=>'$79',
95
- 'url_link'=>'https://ampforwp.com/woocommerce/',
96
- 'plugin_active_path'=> 'amp-woocommerce-pro/amp-woocommerce.php',
97
- 'item_name'=>'AMP WooCommerce Pro',
98
- 'store_url'=>'',
99
- ),
100
-
101
- array(
102
- 'name'=>'Advanced Custom Fields',
103
- 'desc'=>'Easily add ACF support in AMP.',
104
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/acf.png',
105
- 'price'=>'$29',
106
- 'url_link'=>'http://ampforwp.com/acf-amp/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin',
107
- 'plugin_active_path'=> 'advanced-custom-fields/acf.php',
108
- 'item_name'=>'Advanced Custom Fields',
109
- 'store_url'=>'',
110
- ),
111
- array(
112
- 'name'=>'Star Ratings',
113
- 'desc'=>'Star Review Ratings for AMP.',
114
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/star.png',
115
- 'price'=>'$19',
116
- 'url_link'=>'http://ampforwp.com/amp-ratings/#utm_source=options-panel&utm_medium=extension-tab_amp-ratings&utm_campaign=AMP%20Plugin',
117
- 'plugin_active_path'=> 'amp-rating/amp-rating.php',
118
- 'item_name'=>'Star Ratings',
119
- 'store_url'=>'',
120
- ),
121
- array(
122
- 'name'=>'Category Base Removal',
123
- 'desc'=>'Remove Category Base Support in AMP',
124
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/puzzel.png',
125
- 'price'=>'FREE',
126
- 'url_link'=>'http://ampforwp.com/amp-category-base-remove-support/#utm_source=options-panel&utm_medium=extension-tab_amp-category-base-remove-support&utm_campaign=AMP%20Plugin',
127
- 'plugin_active_path'=> '',
128
- 'item_name'=>'Category Base Removal',
129
- 'store_url'=>'',
130
- ),
131
- array(
132
- 'name'=>'Custom Post Type',
133
- 'desc'=>'Enable Custom Post type support in AMP.',
134
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/comments.png',
135
- 'price'=>'$19',
136
- 'url_link'=>'http://ampforwp.com/custom-post-type/#utm_source=options-panel&utm_medium=extension-tab_custom-post-type&utm_campaign=AMP%20Plugin',
137
- 'plugin_active_path'=> 'amp-custom-post-type/amp-custom-post-type.php',
138
- 'item_name'=>'Custom Post Type',
139
- 'store_url'=>'',
140
- ), array(
141
- 'name'=>'View All Extensions',
142
- 'desc'=>'See all the extensions available for AMP',
143
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/comments.png',
144
- 'price'=>'FREE',
145
- 'url_link'=>'https://ampforwp.com/extensions/#utm_source=options-panel&utm_medium=extension-tab_amp-more-comingsoon&utm_campaign=AMP%20Plugin',
146
- 'plugin_active_path'=> '',
147
- 'item_name'=>'',
148
- 'store_url'=>'',
149
- ),
150
- );
151
- $extension_listing_array = apply_filters( 'ampforwp_extension_lists_filter', $extension_listing_array );
152
- $ampforwp_extension_list_html = '';
153
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
154
- foreach ($extension_listing_array as $key => $extension) {
155
- $currentStatus = "";
156
-
157
- $onclickUrl = '<a href="'.$extension['url_link'].'" target="_blank">';
158
- $onclickUrlclose = '</a>';
159
- $pluginReview = '<div class="extension_btn">From: '.$extension['price'].'</div>';
160
- if($extension['plugin_active_path'] != "" && is_plugin_active($extension['plugin_active_path']) ){
161
- $currentStatus = "not-active invalid";
162
- $pathExploded = explode("/", $extension['plugin_active_path']);
163
- $pathExploded = $pathExploded[0];
164
-
165
- $amplicense = '';
166
- $onclickUrl = $onclickUrlclose= '';
167
- $selectedOption = get_option('redux_builder_amp',true);
168
- if(isset($selectedOption['amp-license'][$pathExploded])){
169
- $amplicense = $selectedOption['amp-license'][$pathExploded]['license'];
170
- }
171
- $verify = '<button type="submit" id="'.$pathExploded.'">Activate</button>';
172
- if(isset($selectedOption['amp-license'][$pathExploded]['status']) && $selectedOption['amp-license'][$pathExploded]['status']==='valid'){
173
- $currentStatus = 'active valid';
174
- $verify = '<button type="button" id="'.$pathExploded.'" class="redux-ampforwp-ext-deactivate">DeActivate</button>';
175
- }
176
-
177
- $pluginReview = '<input name="redux_builder_amp[amp-license]['.$pathExploded.'][license]" type="text" value="'.$amplicense.'" onclick="return false;">
178
- <input name="redux_builder_amp[amp-license]['.$pathExploded.'][item_name]" type="hidden" value="'.$extension['item_name'].'">
179
- <input name="redux_builder_amp[amp-license]['.$pathExploded.'][store_url]" type="hidden" value="'.$extension['store_url'].'">
180
- <input name="redux_builder_amp[amp-license]['.$pathExploded.'][plugin_active_path]" type="hidden" value="'.$extension['plugin_active_path'].'">
181
- <input name="redux_builder_amp[amp-license]['.$pathExploded.'][name]" type="hidden" value="'.$extension['name'].'">
182
- ';
183
-
184
- $pluginReview .= $verify;
185
- if(isset($selectedOption['amp-license'][$pathExploded]['message']) && $selectedOption['amp-license'][$pathExploded]['message']!=""){
186
- $pluginReview .= "<br/>".$selectedOption['amp-license'][$pathExploded]['message'];
187
- }
188
-
189
-
190
- }
191
- $ampforwp_extension_list_html .= '<li class="first '.$currentStatus.'">'.$onclickUrl.'
192
- <div class="align_left"><img src="'.$extension['img_src'].'" /></div>
193
- <div class="extension_desc">
194
- <h2>'.$extension['name'].'</h2>
195
- <p>'.$extension['desc'].'</p>
196
- '.$pluginReview.'
197
- </div>
198
- '.$onclickUrlclose.'</li>';
199
- }
200
-
201
- $extension_listing = '
202
- <div class="extension_listing">
203
- <p style="font-size:13px">Take your AMP to the next level with these premium extensions which gives you advanced features.</p>
204
- <ul>
205
-
206
- '.$ampforwp_extension_list_html.'
207
-
208
- </ul>
209
- </div>
210
- ';
211
-
212
-
213
-
214
- $gettingstarted_extension_listing = '
215
- <div class="extension_listing getting_started_listing">
216
- <p style="font-size:13px">Take your AMP to the next level with these premium extensions which gives you advanced features.</p>
217
- <ul>
218
- <li class="first"><a href="http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=gettingstarted-amp-ads&utm_campaign=AMP%20Plugin" target="_blank">
219
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/click.png" /></div>
220
- <div class="extension_desc">
221
- <h2>Advanced AMP ADS</h2>
222
- <p>Add Advertisement directly in the content</p>
223
- <div class="extension_btn">From: $29</div>
224
- </div>
225
- </a></li>
226
- <li class="second"><a href="http://ampforwp.com/opt-in-forms/#utm_source=options-panel&utm_medium=gettingstarted_opt-in-forms&utm_campaign=AMP%20Plugin" target="_blank">
227
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/email.png" /></div>
228
- <div class="extension_desc">
229
- <h2>Email Opt-in Forms</h2>
230
- <p>Capture Leads with Email Subscription.</p>
231
- <div class="extension_btn">From: $79</div>
232
- </div>
233
- </a></li>
234
- <li class="first"><a href="http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=gettingstarted_amp-cta&utm_campaign=AMP%20Plugin" target="_blank">
235
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/mac-click.png" /></div>
236
- <div class="extension_desc">
237
- <h2>Call To Action (CTA)</h2>
238
- <p>Higher Visibility & More Conversions</p>
239
- <div class="extension_btn">From: $29</div>
240
- </div>
241
- </a></li>
242
- <li class="second"><a href="http://ampforwp.com/custom-post-type/#utm_source=options-panel&utm_medium=gettingstarted_custom-post-type&utm_campaign=AMP%20Plugin" target="_blank">
243
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/comments.png" /></div>
244
- <div class="extension_desc">
245
- <h2>Custom Post Type</h2>
246
- <p>Enable Custom Post type support in AMP.</p>
247
- <div class="extension_btn">From: $19</div>
248
- </div>
249
- </a></li>
250
-
251
- <li class="first"><a href="http://ampforwp.com/acf-amp/#utm_source=options-panel&utm_medium=gettingstarted_acf&utm_campaign=AMP%20Plugin" target="_blank">
252
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/acf.png" /></div>
253
- <div class="extension_desc">
254
- <h2>Advanced Custom Fields</h2>
255
- <p>Easily add ACF support in AMP.</p>
256
- <div class="extension_btn">From: $29</div>
257
- </div>
258
- </a></li>
259
- <li class="second"><a href="http://ampforwp.com/doubleclick-for-publishers/#utm_source=options-panel&utm_medium=gettingstarted_doubleclick&utm_campaign=AMP%20Plugin" target="_blank">
260
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/dfp.png" /></div>
261
- <div class="extension_desc">
262
- <h2>DoubleClick For Publishers</h2>
263
- <p>Enable DFP Support for AMP.</p>
264
- <div class="extension_btn">From: $19</div>
265
- </div>
266
- </a></li>
267
-
268
-
269
- <li class="first"><a href="http://ampforwp.com/amp-ratings/#utm_source=options-panel&utm_medium=gettingstarted_amp-ratings&utm_campaign=AMP%20Plugin" target="_blank">
270
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/star.png" /></div>
271
- <div class="extension_desc">
272
- <h2>Star Ratings</h2>
273
- <p>Star Review Ratings for AMP.</p>
274
- <div class="extension_btn">From: $19</div>
275
- </div>
276
- </a></li>
277
- <li class="second"><a href="https://ampforwp.com/woocommerce/" target="_blank">
278
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/woo.png" /></div>
279
- <div class="extension_desc">
280
- <h2>AMP WooCommerce Pro</h2>
281
- <p>Advanced WooCommerce in AMP in two clicks.</p>
282
- <div class="extension_btn">From: $79</div>
283
- </div>
284
- </a></li>
285
-
286
- <li class="first"><a href="http://ampforwp.com/amp-category-base-remove-support/#utm_source=options-panel&utm_medium=gettingstarted_amp-category-base-remove-support&utm_campaign=AMP%20Plugin" target="_blank">
287
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/puzzel.png" /></div>
288
- <div class="extension_desc">
289
- <h2>Category Base Removal</h2>
290
- <p>Remove Category Base Support in AMP</p>
291
- <div class="extension_btn">FREE</div>
292
- </div>
293
- </a></li>
294
- <li class="second"><a href="https://ampforwp.com/extensions/#utm_source=options-panel&utm_medium=gettingstarted_amp-more-comingsoon&utm_campaign=AMP%20Plugin" target="_blank">
295
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/comments.png" /></div>
296
- <div class="extension_desc">
297
- <h2>View All Extensions</h2>
298
- <p>See all the extensions available for AMP</p>
299
- <div class="extension_btn">View All</div> </div>
300
- </a></li>
301
-
302
-
303
- </ul>
304
- </div>
305
- ';
306
-
307
-
308
- $single_extension_listing = '
309
- <div class="extension_listing single_ex_listing">
310
- <h3>Increase the Revenue, Leads and Conversation with these Handpicked extensions</h3>
311
- <ul>
312
- <li class="first"><a href="http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=gettingstarted-amp-ads&utm_campaign=AMP%20Plugin" target="_blank">
313
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/click.png" /></div>
314
- <div class="extension_desc">
315
- <h2>Advanced AMP ADS</h2>
316
- <p>Add Advertisement directly in the content</p>
317
- <div class="extension_btn">View Details</div>
318
- </div>
319
- </a></li>
320
- <li class="second"><a href="http://ampforwp.com/opt-in-forms/#utm_source=options-panel&utm_medium=gettingstarted_opt-in-forms&utm_campaign=AMP%20Plugin" target="_blank">
321
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/email.png" /></div>
322
- <div class="extension_desc">
323
- <h2>Email Opt-in Forms</h2>
324
- <p>Capture Leads with Email Subscription.</p>
325
- <div class="extension_btn">View Details</div>
326
- </div>
327
- </a></li>
328
- <li class="first"><a href="http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=gettingstarted_amp-cta&utm_campaign=AMP%20Plugin" target="_blank">
329
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/mac-click.png" /></div>
330
- <div class="extension_desc">
331
- <h2>Call To Action (CTA)</h2>
332
- <p>Higher Visibility & More Conversions</p>
333
- <div class="extension_btn">View Details</div>
334
- </div>
335
- </a></li>
336
- </ul>
337
- </div>
338
- ';
339
-
340
- // All the possible arguments for Redux.
341
- //$amp_redux_header = '<span id="name"><span style="color: #4dbefa;">U</span>ltimate <span style="color: #4dbefa;">W</span>idgets</span>';
342
-
343
- $args = array(
344
- // TYPICAL -> Change these values as you need/desire
345
- 'opt_name' => 'redux_builder_amp', // This is where your data is stored in the database and also becomes your global variable name.
346
- 'display_name' => __( 'AMPforWP Options','accelerated-mobile-pages' ), // Name that appears at the top of your panel
347
- 'menu_type' => 'menu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
348
- 'allow_sub_menu' => true, // Show the sections below the admin menu item or not
349
- 'menu_title' => __( 'AMP', 'accelerated-mobile-pages' ),
350
- 'page_title' => __('Accelerated Mobile Pages Options','accelerated-mobile-pages'),
351
- 'display_version' => AMPFORWP_VERSION,
352
- 'update_notice' => false,
353
- 'intro_text' => '<a class="premium_features_btn_txt" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">'.__('Get more out of AMP','accelerated-mobile-pages').'</a> <a class="premium_features_btn" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">Get PRO Version</a> ',
354
- 'global_variable' => '', // Set a different name for your global variable other than the opt_name
355
- 'dev_mode' => false, // Show the time the page took to load, etc
356
- 'customizer' => false, // Enable basic customizer support,
357
- 'async_typography' => false, // Enable async for fonts,
358
- 'disable_save_warn' => true,
359
- 'open_expanded' => false,
360
- // OPTIONAL -> Give you extra features
361
- 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
362
- 'page_parent' => 'themes.php', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
363
- 'page_permissions' => 'manage_options', // Permissions needed to access the options panel.
364
- 'last_tab' => '', // Force your panel to always open to a specific tab (by id)
365
- 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title
366
- 'page_slug' => 'amp_options', // Page slug used to denote the panel
367
- 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not
368
- 'default_show' => false, // If true, shows the default value next to each field that is not the default value.
369
- 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: *
370
- 'admin_bar' => false,
371
- 'admin_bar_icon' => 'dashicons-admin-generic',
372
- // CAREFUL -> These options are for advanced use only
373
- 'output' => false, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output
374
- 'output_tag' => false, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head
375
- //'domain' => 'redux-framework', // Translation domain key. Don't change this unless you want to retranslate all of Redux.
376
- 'footer_credit' => false, // Disable the footer credit of Redux. Please leave if you can help it.
377
- 'footer_text' => "",
378
- 'show_import_export' => true,
379
- 'system_info' => true,
380
-
381
- );
382
-
383
- $args['share_icons'][] = array(
384
- 'url' => 'https://github.com/ahmedkaludi/Accelerated-Mobile-Pages',
385
- 'title' => __('Visit us on GitHub','accelerated-mobile-pages'),
386
- 'icon' => 'el el-github'
387
- //'img' => '', // You can use icon OR img. IMG needs to be a full URL.
388
- );
389
-
390
-
391
- Redux::setArgs( "redux_builder_amp", $args );
392
-
393
-
394
-
395
-
396
- $tabs = array(
397
- array(
398
- 'id' => 'redux-help-tab-1',
399
- 'title' => __( 'Theme Information 1', 'accelerated-mobile-pages' ),
400
- 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'accelerated-mobile-pages' )
401
- ),
402
- array(
403
- 'id' => 'redux-help-tab-2',
404
- 'title' => __( 'Theme Information 2', 'accelerated-mobile-pages' ),
405
- 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'accelerated-mobile-pages' )
406
- )
407
- );
408
- Redux::setHelpTab( $opt_name, $tabs );
409
-
410
- // Set the help sidebar
411
- $content = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'admin_folder' );
412
- Redux::setHelpSidebar( $opt_name, $content );
413
-
414
-
415
- /*
416
- * <--- END HELP TABS
417
- */
418
-
419
- /*
420
- *
421
- * ---> START SECTIONS
422
- *
423
- */
424
-
425
- Redux::setSection( $opt_name, array(
426
- 'title' => __( 'Basic Field', 'accelerated-mobile-pages' ),
427
- 'id' => 'basic',
428
- 'desc' => __( 'Basic field with no subsections.', 'accelerated-mobile-pages' ),
429
- 'icon' => 'el el-home',
430
- 'fields' => array(
431
- array(
432
- 'id' => 'opt-blank',
433
- 'title' => __( 'Example Text', 'accelerated-mobile-pages' ),
434
- 'desc' => __( 'Example description.', 'accelerated-mobile-pages' ),
435
- 'subtitle' => __( 'Example subtitle.', 'accelerated-mobile-pages' ),
436
- )
437
- )
438
- ) );
439
-
440
- Redux::setSection( $opt_name, array(
441
- 'title' => __( 'Settings', 'accelerated-mobile-pages' ),
442
- 'id' => 'basic',
443
- 'desc' => __( '<div class="amp-faq">Thank you for using Accelerated Mobile Pages plugin. '. ' ' .
444
-
445
- sprintf( __( ' <h2 style="width: 150px;float: right;
446
- padding: 8px 11px;background: #4CAF50;
447
- font-size: 13px;margin: -24px 0 0 10px;
448
- border-radius: 5px;line-height: 22px;"><a style="color: #fff;text-decoration: none;" href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages?rate=5#postform">Like this plugin? <br /> Leave a 5 Star Rating</a></h2>We are actively working on updating the plugin. We have built user friendly options which allows you to make changes on your AMP version.', 'accelerated-mobile-pages' ), 'accelerated-mobile-pages' )
449
- . '<div style="width:100%;margin:20px 0px 10px 0px" class="getstarted_wrapper">
450
- <div class="getstarted_options">
451
- <p><b>Getting Started</b></p>
452
- <ul class="getstarted_ul">
453
- <li><a href="https://ampforwp.com/tutorials/article-categories/installation-updating/" target="_blank">Installation & Setup</a></li>
454
- <li><a href="https://ampforwp.com/tutorials/article-categories/settings-options/" target="_blank">Settings & Options</a></li>
455
- <li><a href="https://ampforwp.com/tutorials/article-categories/setup-amp/" target="_blank">Setup AMP</a></li>
456
- <li><a href="https://ampforwp.com/tutorials/article-categories/page-builder/" target="_blank">Page Builder</a></li>
457
- </ul>
458
- </div>
459
- <div class="getstarted_options">
460
- <p><b>Useful Links</b></p>
461
- <ul class="getstarted_ul">
462
- <li><a href="https://ampforwp.com/tutorials/article-categories/extension/" target="_blank">Extensions & Themes Docs</a></li>
463
- <li><a href="https://ampforwp.com/tutorials/article-categories/extending/" target="_blank">Developers Docs</a></li>
464
- <li><a href="https://ampforwp.com/amp-theme-framework/" target="_blank">Create a Custom Theme for AMP</a></li>
465
- <li><a href="https://ampforwp.com/tutorials/article-categories/how-to/" target="_blank">General How To\'s</a></li>
466
- </ul>
467
- </div>
468
- <div class="clear"></div>
469
- </div>'
470
- . '<p><strong>' . __( '1. <a href="https://ampforwp.com/priority-support/" target="_blank">Fixing AMP Validation Errors</a>: ', 'accelerated-mobile-pages' ) . '</strong>' . __( '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.' ) . '</p>'
471
- . '<p><strong>' . __( '2. <a href="https://ampforwp.com/help/#support-forum" target="_blank">Community Support Forum</a>: ', 'accelerated-mobile-pages' ) . '</strong>' . __( 'We have a special community support forum where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means alot to us and so we try our best to reply each and every question that gets asked.' ) . '</p>'
472
- . '<p><strong>' . __( '3. <a href="https://ampforwp.com/help/#contact" target="_blank">Hire Us / Other queries</a>: ', 'accelerated-mobile-pages' ) . '</strong>' . __( 'We try to answer each and every email, so remember to give us some time. For any other queries, please use the contact form. Please be descriptive as possible.' ) . '</p>'
473
- . '<p><strong>' . __( '4. <a href="http://ampforwp.com/new/" target="_blank"> What\'s New in this Version?</a>: ', 'accelerated-mobile-pages' ) . '</strong>' . __( 'If you want to know whats new in the latest version of the plugin, then please use this link. ') . '</p>'
474
-
475
- . '</p></div>
476
- <br /><p><h3>Take AMP to the Next Level with Premium Extensions</h3></p>
477
- ' .$gettingstarted_extension_listing
478
-
479
- , 'accelerated-mobile-pages' ),
480
- 'icon' => 'el el-cogs'
481
- ) );
482
-
483
- function ampforwp_default_logo_settings($param=""){
484
- $custom_logo_id = '';
485
- $image = '';
486
- $value = '';
487
- $custom_logo_id = get_theme_mod( 'custom_logo' );
488
- $image = wp_get_attachment_image_src( $custom_logo_id , 'full');
489
- if( $image ){
490
- return $image[0];
491
- }
492
- return $value;
493
- }
494
- function ampforwp_custom_logo_dimensions_options(){
495
- $selectedOption = get_option('redux_builder_amp',true);
496
- $opCheck = $selectedOption['ampforwp-custom-logo-dimensions'];
497
- if($opCheck==1){
498
- return 'prescribed';
499
- }else{
500
- return 'flexible';
501
- }
502
- }
503
- function ampforwp_get_cpt_generated_post_types() {
504
- $options = '';
505
- $options = get_option('ampforwp_cpt_generated_post_types');
506
- return $options;
507
- }
508
- $amp_cpt_option = array();
509
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
510
- $ampforwp_cpt_plugin_check = is_plugin_active( 'amp-custom-post-type/amp-custom-post-type.php' );
511
- if ( false == $ampforwp_cpt_plugin_check ) {
512
- $amp_cpt_option = array(
513
- 'id' => 'ampforwp-custom-type',
514
- 'type' => 'select',
515
- 'title' => __('Custom Post Types', 'accelerated-mobile-pages'),
516
- 'subtitle' => __('Enable AMP Support on Custom Post Types', 'accelerated-mobile-pages'),
517
- 'multi' => true,
518
- //'data' => 'post_type',
519
- 'options' => ampforwp_get_cpt_generated_post_types(),
520
- );
521
- }
522
- Redux::setSection( $opt_name, array(
523
- 'title' => __( 'General', 'accelerated-mobile-pages' ),
524
- // 'desc' => __( 'For full documentation on this field, visit: ', 'accelerated-mobile-pages' ) . '<a href="http://docs.reduxframework.com/core/fields/text/" target="_blank">http://docs.reduxframework.com/core/fields/text/</a>',
525
- 'id' => 'opt-text-subsection',
526
- 'subsection' => true,
527
- 'fields' => array(
528
-
529
- array(
530
- 'id' => 'opt-media',
531
- 'type' => 'media',
532
- 'url' => true,
533
- 'title' => __('Logo', 'accelerated-mobile-pages'),
534
- 'subtitle' => __('Upload a logo for the AMP version.', 'accelerated-mobile-pages'),
535
- 'desc' => __('Recommend logo size is: 190x36', 'accelerated-mobile-pages'),
536
- 'default' => array('url' => ampforwp_default_logo_settings() ),
537
- ),
538
- array(
539
- 'id' => 'ampforwp-custom-logo-dimensions',
540
- 'title' => __('Custom Logo Re-Size', 'accelerated-mobile-pages'),
541
- 'type' => 'switch',
542
- 'default' => 0,
543
- ),
544
- array(
545
- 'id' => 'ampforwp-custom-logo-dimensions-options',
546
- 'title' => __('Resize Method', 'accelerated-mobile-pages'),
547
- 'type' => 'select',
548
- 'default' => '100',
549
- 'options' => array(
550
- 'flexible' => 'Flexible Width',
551
- 'prescribed' => 'Fixed Width'
552
- ),
553
- 'default' => ampforwp_custom_logo_dimensions_options(),
554
- 'required'=>array('ampforwp-custom-logo-dimensions','=','1'),
555
- ),
556
- array(
557
- 'id' => 'ampforwp-custom-logo-dimensions-slider',
558
- 'title' => __('Resize Your Logo', 'accelerated-mobile-pages'),
559
- 'type' => 'amp_slider',
560
- 'default' => '100',
561
- 'min' => 0,
562
- 'max' => 100,
563
- 'subtitle' => '',
564
- 'required'=>array('ampforwp-custom-logo-dimensions-options','=','flexible'),
565
- ),
566
- array(
567
- 'id' => 'opt-media-width',
568
- 'type' => 'text',
569
- 'title' => __('Logo Width', 'accelerated-mobile-pages'),
570
- 'desc' => __('Default width is 190 pixels', 'accelerated-mobile-pages'),
571
- 'default' => '190',
572
- 'required'=>array('ampforwp-custom-logo-dimensions-options','=','prescribed'),
573
- ),
574
- array(
575
- 'id' => 'opt-media-height',
576
- 'type' => 'text',
577
- 'title' => __('Logo Height', 'accelerated-mobile-pages'),
578
- 'desc' => __('Default height is 36 pixels', 'accelerated-mobile-pages'),
579
- 'default' => '36',
580
- 'required'=>array('ampforwp-custom-logo-dimensions-options','=','prescribed'),
581
-
582
- ),
583
- array(
584
- 'id' => 'amp-support',
585
- 'type' => 'section',
586
- 'title' => __('AMP Support', 'accelerated-mobile-pages'),
587
- 'indent' => true,
588
- ),
589
- array(
590
- 'id' =>'amp-on-off-for-all-posts',
591
- 'type' => 'switch',
592
- 'title' => __('Posts', 'accelerated-mobile-pages'),
593
- 'subtitle' => __('Enable AMP Support on Posts', 'accelerated-mobile-pages'),
594
- 'default' => 1,
595
- // 'desc' => __( 'Re-Save permalink if you make changes in this option, please have a look <a href="https://ampforwp.com/flush-rewrite-urls/">here</a> on how to do it', 'accelerated-mobile-pages' ),
596
- ),
597
- array(
598
- 'id' =>'amp-on-off-for-all-pages',
599
- 'type' => 'switch',
600
- 'title' => __('Pages', 'accelerated-mobile-pages'),
601
- 'subtitle' => __('Enable AMP Support on Pages.', 'accelerated-mobile-pages'),
602
- 'default' => 1,
603
- // 'subtitle' => __( '<a href="https://ampforwp.com/flush-rewrite-urls/">Re-Save permalink</a> if you make changes in this option, please have a look here on how to do it', 'accelerated-mobile-pages' ),
604
- ),
605
- array(
606
- 'id' => 'ampforwp-homepage-on-off-support',
607
- 'type' => 'switch',
608
- 'title' => __('Homepage', 'accelerated-mobile-pages'),
609
- 'subtitle' => __('Enable AMP Support on Homepage.', 'accelerated-mobile-pages'),
610
- 'default' => '1'
611
- ),
612
- array(
613
- 'id' =>'amp-frontpage-select-option',
614
- 'type' => 'switch',
615
- 'title' => __('Custom Front Page', 'accelerated-mobile-pages'),
616
- 'default' => 0,
617
- 'subtitle' => __('Set Custom Front Page as Homepage', 'accelerated-mobile-pages'),
618
- 'true' => 'true',
619
- 'false' => 'false',
620
- 'required' => array('ampforwp-homepage-on-off-support','=','1'),
621
- // 'desc' => __( 'Re-Save permalink if front page or custom post page\'s pagination is not working. Please have a look <a href="https://ampforwp.com/flush-rewrite-urls/">here</a> on how to do it', 'accelerated-mobile-pages' ),
622
- ),
623
- array(
624
- 'id' => 'amp-frontpage-select-option-pages',
625
- 'type' => 'select',
626
- 'title' => __('Select Page as Front Page', 'accelerated-mobile-pages'),
627
- 'required' => array('amp-frontpage-select-option', '=' , '1'),
628
- // Must provide key => value pairs for select options
629
- 'data' => 'page',
630
- 'args' => array(
631
- 'post_type' => 'page',
632
- 'posts_per_page' => 500
633
- ),
634
- 'default' => '2',
635
- ),
636
- array(
637
- 'id' => 'ampforwp-title-on-front-page',
638
- 'type' => 'switch',
639
- 'url' => true,
640
- 'title' => __('Title on Static Front Page', 'accelerated-mobile-pages'),
641
- 'subtitle' => __('Enable/Disable display of title on the Static Front Page.', 'accelerated-mobile-pages'),
642
- 'default' => 0,
643
- 'required' => array('amp-frontpage-select-option', '=' , '1'),
644
- ),
645
- array(
646
- 'id' => 'ampforwp-archive-support',
647
- 'type' => 'switch',
648
- 'title' => __('Archives [Category & Tags]', 'accelerated-mobile-pages'),
649
- 'subtitle' => __('Enable AMP Support on Archives.', 'accelerated-mobile-pages'),
650
- 'default' => '0'
651
- ),
652
- $amp_cpt_option,
653
- array(
654
- 'id' => 'ampforwp-amp-convert-to-wp',
655
- 'type' => 'switch',
656
- 'title' => __('Convert AMP to WP theme', 'accelerated-mobile-pages'),
657
- 'subtitle' => __('It makes your AMP & Non-AMP Same! (AMP will output AMP Compatible code, while WordPress will have the WP code but with the same design)', 'accelerated-mobile-pages'),
658
- 'default' => '0',
659
- 'required' => array('amp-design-selector', '=' , '4'),
660
- ),
661
- array(
662
- 'id' => 'ampforwp-amp-takeover',
663
- 'type' => 'switch',
664
- 'title' => __('AMP Takeover', 'accelerated-mobile-pages'),
665
- 'subtitle' => __('Make your non-amp to load the AMP (AMP & NON-AMP both will be AMP with same design)', 'accelerated-mobile-pages'),
666
- 'default' => '0'
667
- ),
668
-
669
- // array(
670
- // 'id' => 'amp-ad-places',
671
- // 'type' => 'select',
672
- // 'title' => __( 'Ads on Page', 'accelerated-mobile-pages' ),
673
- // 'subtitle' => __( 'select your preferece for Ads on Post Types', 'accelerated-mobile-pages' ),
674
- // 'options' => array(
675
- // '1' => __('Only on Posts', 'accelerated-mobile-pages' ),
676
- // '2' => __('Only on Pages', 'accelerated-mobile-pages' ),
677
- // '3' => __('on Both', 'accelerated-mobile-pages' ),
678
- // ),
679
- // 'default' => '3'
680
- // ),
681
-
682
- )
683
- ) );//END
684
-
685
- // AMP Content Page Builder SECTION
686
- Redux::setSection( $opt_name, array(
687
- 'title' => __( 'Page Builder', 'accelerated-mobile-pages' ),
688
- 'class' =>'',
689
- 'id' => 'amp-content-builder',
690
- 'class' => 'amp_content_builder ampforwp-new-element',
691
- 'subsection' => true,
692
- 'fields' => array(
693
-
694
- array(
695
- 'id' => 'ampforwp-content-builder',
696
- 'type' => 'switch',
697
- 'title' => __('Legacy Page Builder (widgets)', 'accelerated-mobile-pages'),
698
- 'subtitle' => __('Build AMP Landing pages in minutes.', 'accelerated-mobile-pages'),
699
- 'true' => 'true',
700
- 'class' =>'hide',
701
- 'desc' => '<div style=" background: #FFF9C4;
702
- display: inline-block;
703
- padding: 10px 20px;
704
- margin-top: 15px;
705
- left: 0;
706
- line-height: 1.6;
707
- position: absolute;
708
- left: 20px;
709
- font-size: 15px;"><b>Introducing AMP Page Builder 3.0</b>, Re-Engineered in Vue.js! <br /> <a href="https://ampforwp.com/tutorials/article/amp-page-builder-installation/" target="_blank">Learn how to use this Feature</a></div>
710
-
711
- <iframe style=" position: absolute;
712
- left: 20px;
713
- margin-top: 100px;" width="600" height="400" src="https://www.youtube.com/embed/vAGPFKKm5G4" frameborder="0" allowfullscreen></iframe>
714
-
715
- ',
716
- 'false' => 'false',
717
- 'default' => 0
718
- ),
719
- array(
720
- 'id' => 'ampforwp-page-builder-info',
721
- 'type' => 'raw',
722
- 'desc' => '<div style="background: #FFF9C4;
723
- display: inline-block;
724
- padding: 10px 20px;
725
- margin-top: 0px;
726
- left: 0;
727
- line-height: 1.6;
728
- position: absolute;
729
- left: 0px;
730
- top: 40px;
731
- font-size: 15px;"><b>Introducing AMP Page Builder 3.0</b>, Re-Engineered in Vue.js! <br /> <a href="https://ampforwp.com/tutorials/article/amp-page-builder-installation/" target="_blank">Learn how to use this Feature</a></div>
732
-
733
- <iframe style="position: absolute;left: 0px;margin-top: 67px;" width="600" height="400" src="https://www.youtube.com/embed/QTbkn2rHyqM" frameborder="0" allowfullscreen></iframe>
734
-
735
- ',
736
- ),
737
- )
738
- )
739
-
740
- ) ;
741
-
742
- $AD_URL = "http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=advertisement-tab&utm_campaign=AMP%20Plugin";
743
- $desc = '';
744
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
745
- if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
746
-
747
- $desc = '<a href="'.$AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp-ads-retina.png" width="560" height="85" /></a>';
748
- }
749
-
750
- // ADS SECTION
751
- Redux::setSection( $opt_name, array(
752
- 'title' => __( 'Advertisement', 'accelerated-mobile-pages' ),
753
- 'desc' => $desc,
754
- 'id' => 'amp-ads',
755
- 'subsection' => true,
756
- 'fields' => array(
757
- // Ad 1 Starts
758
- array(
759
- 'id' =>'ampforwp-ads-data-loading-strategy',
760
- 'type' => 'switch',
761
- 'title' => __('Optimize For Viewability', 'accelerated-mobile-pages'),
762
- 'default' => 0,
763
- 'subtitle' => __('This will increase the loading speed of the Ads', 'accelerated-mobile-pages'),
764
- 'true' => 'Enabled',
765
- 'false' => 'Disabled',
766
- ),
767
- array(
768
- 'id' =>'enable-amp-ads-1',
769
- 'type' => 'switch',
770
- 'title' => __('AD #1', 'accelerated-mobile-pages'),
771
- 'default' => 0,
772
- 'subtitle' => __('Below the Header (SiteWide)', 'accelerated-mobile-pages'),
773
- 'true' => 'Enabled',
774
- 'false' => 'Disabled',
775
- ),
776
- array(
777
- 'id' => 'enable-amp-ads-select-1',
778
- 'type' => 'select',
779
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
780
- 'required' => array('enable-amp-ads-1', '=' , '1'),
781
- // Must provide key => value pairs for select options
782
- 'options' => array(
783
- '1' => __('300x250','accelerated-mobile-pages'),
784
- '2' => __('336x280','accelerated-mobile-pages'),
785
- '3' => __('728x90','accelerated-mobile-pages'),
786
- '4' => __('300x600','accelerated-mobile-pages'),
787
- '5' => __('320x100','accelerated-mobile-pages'),
788
- '6' => __('200x50','accelerated-mobile-pages'),
789
- '7' => __('320x50','accelerated-mobile-pages'), ),
790
- 'default' => '2',
791
- ),
792
- array(
793
- 'id' =>'enable-amp-ads-text-feild-client-1',
794
- 'type' => 'text',
795
- 'required' => array('enable-amp-ads-1', '=' , '1'),
796
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
797
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
798
- 'default' => '',
799
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
800
- ),
801
- array(
802
- 'id' => 'enable-amp-ads-text-feild-slot-1',
803
- 'type' => 'text',
804
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
805
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
806
- 'default' => '',
807
- 'required' => array('enable-amp-ads-1', '=' , '1'),
808
- 'placeholder'=> '70XXXXXX12'
809
- ),
810
- // Ad 1 ends
811
-
812
- // Ad 2 Starts
813
- array(
814
- 'id'=>'enable-amp-ads-2',
815
- 'type' => 'switch',
816
- 'title' => __('AD #2', 'accelerated-mobile-pages'),
817
- 'default' => 0,
818
- 'subtitle' => __('Below the Footer (SiteWide)', 'accelerated-mobile-pages'),
819
- 'true' => 'Enabled',
820
- 'false' => 'Disabled',
821
- ),
822
- array(
823
- 'id' => 'enable-amp-ads-select-2',
824
- 'type' => 'select',
825
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
826
- 'required' => array('enable-amp-ads-2', '=' , '1'),
827
- // Must provide key => value pairs for select options
828
- 'options' => array(
829
- '1' => '300x250',
830
- '2' => '336x280',
831
- '3' => '728x90',
832
- '4' => '300x600',
833
- '5' => '320x100',
834
- '6' => '200x50',
835
- '7' => '320x50'
836
- ),
837
- 'default' => '2',
838
- ),
839
- array(
840
- 'id' =>'enable-amp-ads-text-feild-client-2',
841
- 'type' => 'text',
842
- 'required' => array('enable-amp-ads-2', '=' , '1'),
843
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
844
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
845
- 'default' => '',
846
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
847
- ),
848
- array(
849
- 'id' => 'enable-amp-ads-text-feild-slot-2',
850
- 'type' => 'text',
851
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
852
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
853
- 'default' => '',
854
- 'required' => array('enable-amp-ads-2', '=' , '1'),
855
- 'placeholder'=> '70XXXXXX12'
856
- ),
857
- // Ad 2 ends
858
-
859
- // Ad 3 starts
860
- array(
861
- 'id' => 'enable-amp-ads-3',
862
- 'type' => 'switch',
863
- 'title' => __('AD #3', 'accelerated-mobile-pages'),
864
- 'default' => 0,
865
- 'subtitle' => __('Above the Post Content (Single Post)', 'accelerated-mobile-pages'),
866
- 'true' => 'Enabled',
867
- 'false' => 'Disabled',
868
- ),
869
- array(
870
- 'id' => 'enable-amp-ads-select-3',
871
- 'type' => 'select',
872
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
873
- 'required' => array('enable-amp-ads-3', '=' , '1'),
874
- // Must provide key => value pairs for select options
875
- 'options' => array(
876
- '1' => '300x250',
877
- '2' => '336x280',
878
- '3' => '728x90',
879
- '4' => '300x600',
880
- '5' => '320x100',
881
- '6' => '200x50',
882
- '7' => '320x50'
883
- ),
884
- 'default' => '2',
885
- ),
886
- array(
887
- 'id' =>'enable-amp-ads-text-feild-client-3',
888
- 'type' => 'text',
889
- 'required' => array('enable-amp-ads-3', '=' , '1'),
890
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
891
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
892
- 'default' => '',
893
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
894
- ),
895
- array(
896
- 'id' => 'enable-amp-ads-text-feild-slot-3',
897
- 'type' => 'text',
898
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
899
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
900
- 'default' => '',
901
- 'required' => array('enable-amp-ads-3', '=' , '1'),
902
- 'placeholder'=> '70XXXXXX12'
903
- ),
904
- // Ad 3 ends
905
-
906
- // Ad 4 Starts
907
- array(
908
- 'id' => 'enable-amp-ads-4',
909
- 'type' => 'switch',
910
- 'title' => __('AD #4', 'accelerated-mobile-pages'),
911
- 'default' => 0,
912
- 'subtitle' => __('Below the Post Content (Single Post)', 'accelerated-mobile-pages'),
913
- 'true' => 'Enabled',
914
- 'false' => 'Disabled',
915
- ),
916
- array(
917
- 'id' => 'enable-amp-ads-select-4',
918
- 'type' => 'select',
919
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
920
- 'required' => array('enable-amp-ads-4', '=' , '1'),
921
- // Must provide key => value pairs for select options
922
- 'options' => array(
923
- '1' => __('300x250','accelerated-mobile-pages'),
924
- '2' => __('336x280','accelerated-mobile-pages'),
925
- '3' => __('728x90','accelerated-mobile-pages'),
926
- '4' => __('300x600','accelerated-mobile-pages'),
927
- '5' => __('320x100','accelerated-mobile-pages'),
928
- '6' => __('200x50','accelerated-mobile-pages'),
929
- '7' => __('320x50','accelerated-mobile-pages')
930
- ),
931
- 'default' => '2',
932
- ),
933
- array(
934
- 'id' =>'enable-amp-ads-text-feild-client-4',
935
- 'type' => 'text',
936
- 'required' => array('enable-amp-ads-4', '=' , '1'),
937
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
938
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
939
- 'default' => '',
940
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
941
- ),
942
- array(
943
- 'id' => 'enable-amp-ads-text-feild-slot-4',
944
- 'type' => 'text',
945
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
946
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
947
- 'default' => '',
948
- 'required' => array('enable-amp-ads-4', '=' , '1'),
949
- 'placeholder'=> '70XXXXXX12'
950
- ),
951
- // Ad 4 ends
952
-
953
- //Ad 5 Starts
954
- array(
955
- 'id' => 'enable-amp-ads-5',
956
- 'type' => 'switch',
957
- 'title' => __('AD #5', 'accelerated-mobile-pages'),
958
- 'default' => 0,
959
- 'subtitle' => __('Below The Title (Single Post)', 'accelerated-mobile-pages'),
960
- 'true' => 'Enabled',
961
- 'false' => 'Disabled',
962
- ),
963
- array(
964
- 'id' => 'enable-amp-ads-select-5',
965
- 'type' => 'select',
966
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
967
- 'required' => array('enable-amp-ads-5', '=' , '1'),
968
- // Must provide key => value pairs for select options
969
- 'options' => array(
970
- '1' => __('300x250','accelerated-mobile-pages'),
971
- '2' => __('336x280','accelerated-mobile-pages'),
972
- '3' => __('728x90','accelerated-mobile-pages'),
973
- '4' => __('300x600','accelerated-mobile-pages'),
974
- '5' => __('320x100','accelerated-mobile-pages'),
975
- '6' => __('200x50','accelerated-mobile-pages'),
976
- '7' => __('320x50','accelerated-mobile-pages')
977
- ),
978
- 'default' => '2',
979
- ),
980
- array(
981
- 'id' =>'enable-amp-ads-text-feild-client-5',
982
- 'type' => 'text',
983
- 'required' => array('enable-amp-ads-5', '=' , '1'),
984
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
985
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
986
- 'default' => '',
987
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
988
- ),
989
- array(
990
- 'id' => 'enable-amp-ads-text-feild-slot-5',
991
- 'type' => 'text',
992
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
993
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
994
- 'default' => '',
995
- 'required' => array('enable-amp-ads-5', '=' , '1'),
996
- 'placeholder'=> '70XXXXXX12'
997
- ),
998
-
999
- //Ad 6 Starts
1000
- array(
1001
- 'id' => 'enable-amp-ads-6',
1002
- 'type' => 'switch',
1003
- 'title' => __('AD #6', 'accelerated-mobile-pages'),
1004
- 'default' => 0,
1005
- 'subtitle' => __('Above the Related Posts (Single Post)', 'accelerated-mobile-pages'),
1006
- 'true' => 'Enabled',
1007
- 'false' => 'Disabled',
1008
- ),
1009
- array(
1010
- 'id' => 'enable-amp-ads-select-6',
1011
- 'type' => 'select',
1012
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
1013
- 'required' => array('enable-amp-ads-6', '=' , '1'),
1014
- // Must provide key => value pairs for select options
1015
- 'options' => array(
1016
- '1' => __('300x250','accelerated-mobile-pages'),
1017
- '2' => __('336x280','accelerated-mobile-pages'),
1018
- '3' => __('728x90','accelerated-mobile-pages'),
1019
- '4' => __('300x600','accelerated-mobile-pages'),
1020
- '5' => __('320x100','accelerated-mobile-pages'),
1021
- '6' => __('200x50','accelerated-mobile-pages'),
1022
- '7' => __('320x50','accelerated-mobile-pages')
1023
- ),
1024
- 'default' => '2',
1025
- ),
1026
- array(
1027
- 'id' =>'enable-amp-ads-text-feild-client-6',
1028
- 'type' => 'text',
1029
- 'required' => array('enable-amp-ads-6', '=' , '1'),
1030
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
1031
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
1032
- 'default' => '',
1033
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
1034
- ),
1035
- array(
1036
- 'id' => 'enable-amp-ads-text-feild-slot-6',
1037
- 'type' => 'text',
1038
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
1039
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
1040
- 'default' => '',
1041
- 'required' => array('enable-amp-ads-6', '=' , '1'),
1042
- 'placeholder'=> '70XXXXXX12'
1043
- )
1044
-
1045
-
1046
- ),
1047
- ) );
1048
-
1049
- if ( ! function_exists('ampforwp_seo_default') ) {
1050
- function ampforwp_seo_default() {
1051
- $default = '';
1052
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1053
- if ( is_plugin_active('wordpress-seo/wp-seo.php') ) {
1054
- $default = 1;
1055
- }
1056
- elseif ( is_plugin_active('all-in-one-seo-pack/all_in_one_seo_pack.php') ) {
1057
- $default = 2;
1058
- }
1059
- return $default;
1060
- }
1061
- }
1062
- // SEO SECTION
1063
- Redux::setSection( $opt_name, array(
1064
- 'title' => __( 'SEO', 'accelerated-mobile-pages' ),
1065
- 'id' => 'amp-seo',
1066
- 'subsection' => true,
1067
- 'fields' => array(
1068
- array(
1069
- 'id' => 'ampforwp-seo-general-section',
1070
- 'type' => 'section',
1071
- 'title' => __('General', 'accelerated-mobile-pages'),
1072
- 'indent' => true,
1073
- ),
1074
- array(
1075
- 'id' => 'ampforwp-seo-meta-description',
1076
- 'type' => 'switch',
1077
- 'title' => __('Meta Description', 'accelerated-mobile-pages'),
1078
- 'subtitle' => __('The meta tag that displays in head', 'accelerated-mobile-pages'),
1079
- 'default' => 0
1080
- ),
1081
-
1082
- array(
1083
- 'id' => 'ampforwp-seo-custom-additional-meta',
1084
- 'type' => 'textarea',
1085
- 'title' => __('Additional tags for Head section AMP page', 'accelerated-mobile-pages'),
1086
- 'subtitle' => __('Adds additional Meta to the head section', 'accelerated-mobile-pages', 'accelerated-mobile-pages'),
1087
- 'desc' => __('Only link and meta tags allowed', 'accelerated-mobile-pages'),
1088
- 'placeholder' => __('<!-- Paste your Additional HTML , that goes between <head> </head> tags -->','accelerated-mobile-pages')
1089
- ),
1090
- array(
1091
- 'id' => 'ampforwp-seo-plugins-section',
1092
- 'type' => 'section',
1093
- 'title' => __('SEO Plugin Integration', 'accelerated-mobile-pages'),
1094
- 'indent' => true,
1095
- ),
1096
- array(
1097
- 'id' => 'ampforwp-seo-selection',
1098
- 'type' => 'select',
1099
- 'title' => __('Select SEO Plugin', 'accelerated-mobile-pages'),
1100
- 'options' => array(
1101
- '1' => 'Yoast',
1102
- '2' => 'All in One SEO'
1103
- ),
1104
- 'default' => ampforwp_seo_default(),
1105
- ),
1106
- array(
1107
- 'id' => 'ampforwp-seo-yoast-meta',
1108
- 'type' => 'switch',
1109
- 'subtitle' => __('Adds Social and Open Graph Meta Tags from Yoast', 'accelerated-mobile-pages'),
1110
- 'title' => __( 'Meta Tags from Yoast', 'accelerated-mobile-pages' ),
1111
- 'default' => '1',
1112
- 'required' => array('ampforwp-seo-selection', '=' , '1'),
1113
- ),
1114
- array(
1115
- 'id' => 'ampforwp-seo-yoast-description',
1116
- 'type' => 'switch',
1117
- 'subtitle' => __('Adds Yoast Custom description to ld+json for AMP page', 'accelerated-mobile-pages'),
1118
- 'title' => __( 'Yoast Description in ld+json', 'accelerated-mobile-pages' ),
1119
- 'default' => 0,
1120
- 'required' => array('ampforwp-seo-selection', '=' , '1'),
1121
- ),
1122
- array(
1123
- 'id' => 'ampforwp-seo-aioseo',
1124
- 'type' => 'info',
1125
- 'style' => 'success',
1126
- 'desc' => __("All in One SEO works out of the Box with our plugin. It deosn't requires any extra config.", 'accelerated-mobile-pages'),
1127
- 'required' => array('ampforwp-seo-selection', '=', '2')
1128
- ),
1129
- array(
1130
- 'id' => 'ampforwp-seo-index-noindex-sub-section',
1131
- 'type' => 'section',
1132
- 'title' => __('Advanced Index & No Index Options', 'accelerated-mobile-pages'),
1133
- 'indent' => true
1134
- ),
1135
- array(
1136
- 'id' => 'ampforwp-robots-archive-sub-pages-sitewide',
1137
- 'type' => 'switch',
1138
- 'title' => __('Archive subpages (sitewide)', 'accelerated-mobile-pages'),
1139
- 'subtitle' => __("Such as /page/2 so on and so forth",'accelerated-mobile-pages'),
1140
- 'default' => 0,
1141
- 'on' => 'index',
1142
- 'off' => 'noindex'
1143
- ),
1144
- array(
1145
- 'id' => 'ampforwp-robots-archive-author-pages',
1146
- 'type' => 'switch',
1147
- 'title' => __('Author Archives', 'accelerated-mobile-pages'),
1148
- 'default' => 1,
1149
- 'on' => 'index',
1150
- 'off' => 'noindex'
1151
-
1152
- ),
1153
- array(
1154
- 'id' => 'ampforwp-robots-archive-date-pages',
1155
- 'type' => 'switch',
1156
- 'title' => __('Date Archives', 'accelerated-mobile-pages'),
1157
- 'default' => 1,
1158
- 'on' => 'index',
1159
- 'off' => 'noindex'
1160
-
1161
- ),
1162
- array(
1163
- 'id' => 'ampforwp-robots-archive-category-pages',
1164
- 'type' => 'switch',
1165
- 'title' => __('Categories', 'accelerated-mobile-pages'),
1166
- 'default' => 1,
1167
- 'on' => 'index',
1168
- 'off' => 'noindex'
1169
- ),
1170
- array(
1171
- 'id' => 'ampforwp-robots-archive-tag-pages',
1172
- 'type' => 'switch',
1173
- 'title' => __('Tags', 'accelerated-mobile-pages'),
1174
- 'default' => 1,
1175
- 'on' => 'index',
1176
- 'off' => 'noindex'
1177
- ),
1178
-
1179
-
1180
- )
1181
-
1182
- )
1183
-
1184
- );
1185
-
1186
- // Performance SECTION
1187
- Redux::setSection( $opt_name, array(
1188
- 'title' => __( 'Performance', 'accelerated-mobile-pages' ),
1189
- 'id' => 'amp-performance',
1190
- 'desc' => $cache_desc,
1191
- 'subsection' => true,
1192
- 'fields' => array(
1193
-
1194
- array(
1195
- 'id' => 'ampforwp_cache_minimize_mode',
1196
- 'type' => 'switch',
1197
- 'title' => __('Minify AMP Page', 'accelerated-mobile-pages'),
1198
- 'subtitle' => __('Improve the Page Speed and Loading time with Minification option', 'accelerated-mobile-pages'),
1199
- 'default' => 0
1200
- ),
1201
-
1202
- )
1203
-
1204
- )
1205
-
1206
- );
1207
-
1208
- function ampforwp_get_default_analytics($param=""){
1209
- $options = $default = '';
1210
- $options = get_option('redux_builder_amp', true);
1211
- $default = $options['amp-analytics-select-option'];
1212
- if($param == $default){
1213
- return true;
1214
- }
1215
- else
1216
- return false;
1217
- }
1218
-
1219
- // Analytics SECTION
1220
- Redux::setSection( $opt_name, array(
1221
- 'title' => __('Analytics'),
1222
- // 'icon' => 'el el-th-large',
1223
- 'desc' => __('You can either use Google Tag Manager or Other Analytics Providers','accelerated-mobile-pages'),
1224
- 'subsection' => true,
1225
- 'fields' =>
1226
- array(
1227
- array(
1228
- 'id' => 'amp-analytics-select-option',
1229
- 'type' => 'select',
1230
- 'title' => __( 'Analytics Type', 'accelerated-mobile-pages' ),
1231
- 'class' => 'hide',
1232
- 'subtitle' => __( 'Select your Analytics provider.', 'accelerated-mobile-pages' ),
1233
- 'options' => array(
1234
- '1' => __('Google Analytics', 'accelerated-mobile-pages' ),
1235
- '2' => __('Segment Analytics', 'accelerated-mobile-pages' ),
1236
- '3' => __('Piwik Analytics', 'accelerated-mobile-pages' ),
1237
- '4' => __('Quantcast Measurement', 'accelerated-mobile-pages' ),
1238
- '5' => __('comScore', 'accelerated-mobile-pages' ),
1239
- '6' => __('Effective Measure', 'accelerated-mobile-pages' ),
1240
- '7' => __('StatCounter', 'accelerated-mobile-pages' ),
1241
- '8' => __('Histats Analytics', 'accelerated-mobile-pages'),
1242
- '9' => __('Yandex Metrika', 'accelerated-mobile-pages'),
1243
- '10' => __('Chartbeat Analytics', 'accelerated-mobile-pages'),
1244
- '11' => __('Alexa Metrics', 'accelerated-mobile-pages'),
1245
- '12' => __('AFS Analytics', 'accelerated-mobile-pages'),
1246
- ),
1247
- 'required' => array(
1248
- array('amp-use-gtm-option', '=' , '0'),
1249
- ),
1250
- 'default' => '1',
1251
- ),
1252
- // Google Analytics
1253
- array(
1254
- 'id' => 'ampforwp-ga-switch',
1255
- 'type' => 'switch',
1256
- 'title' => 'Google Analytics',
1257
- 'default' => ampforwp_get_default_analytics('1'),
1258
- 'required' => array(
1259
- array('amp-use-gtm-option', '=' , '0'),
1260
- ),
1261
- ),
1262
- array(
1263
- 'id' => 'ga-feild',
1264
- 'type' => 'text',
1265
- 'title' => __( 'Google Analytics', 'accelerated-mobile-pages' ),
1266
- 'required' => array(
1267
- array('amp-use-gtm-option', '=' , '0'),
1268
- array('ampforwp-ga-switch', '=' , '1')
1269
- ),
1270
- 'subtitle' => __( 'Enter your Google Analytics ID.', 'accelerated-mobile-pages' ),
1271
- 'desc' => __('Example: UA-XXXXX-Y', 'accelerated-mobile-pages' ),
1272
- 'default' => 'UA-XXXXX-Y',
1273
- ),
1274
-
1275
- // Advance Tracking options for Google Analytics
1276
- array(
1277
- 'id' => 'ampforwp-ga-field-advance-switch',
1278
- 'type' => 'switch',
1279
- 'title' => __( 'Advanced Analytics Tracking Event Options', 'accelerated-mobile-pages' ),
1280
- 'required' => array(
1281
- array('amp-use-gtm-option', '=' , '0'),
1282
- array('ampforwp-ga-switch', '=' , '1')
1283
- ),
1284
- 'subtitle' => __( 'Enable the Advance Tracking options', 'accelerated-mobile-pages' ),
1285
- 'default' => 0,
1286
- ),
1287
- array(
1288
- 'id' => 'ampforwp-ga-field-advance',
1289
- 'type' => 'ace_editor',
1290
- 'title' => __('Advance Google Analytics', 'accelerated-mobile-pages'),
1291
- 'required' => array(
1292
- array('amp-use-gtm-option', '=' , '0'),
1293
- array('ampforwp-ga-switch', '=' , '1'),
1294
- array('ampforwp-ga-field-advance-switch', '=' , '1')
1295
- ),
1296
- 'subtitle' => __('Enter the Advance Tracking options', 'accelerated-mobile-pages'),
1297
- 'mode' => 'javascript',
1298
- 'theme' => 'monokai',
1299
- 'desc' => '',
1300
- 'default' => __('','accelerated-mobile-pages')
1301
- ),
1302
- // Segment Analytics
1303
- array(
1304
- 'id' => 'ampforwp-Segment-switch',
1305
- 'type' => 'switch',
1306
- 'title' => 'Segment Analytics',
1307
- 'default' => ampforwp_get_default_analytics('2'),
1308
- 'required' => array(
1309
- array('amp-use-gtm-option', '=' , '0'),
1310
- ),
1311
- ),
1312
- array(
1313
- 'id' => 'sa-feild',
1314
- 'type' => 'text',
1315
- 'title' => __( 'Segment Analytics', 'accelerated-mobile-pages' ),
1316
- 'subtitle' => __( 'Enter your Segment Analytics Key.', 'accelerated-mobile-pages' ),
1317
- 'required' => array(
1318
- array('amp-use-gtm-option', '=' , '0'),
1319
- array('ampforwp-Segment-switch', '=' , '1')
1320
- ),
1321
- 'default' => 'SEGMENT-WRITE-KEY',
1322
- ),
1323
- // Piwik Analytics
1324
- array(
1325
- 'id' => 'ampforwp-Piwik-switch',
1326
- 'type' => 'switch',
1327
- 'title' => 'Piwik Analytics',
1328
- 'default' => ampforwp_get_default_analytics('3'),
1329
- 'required' => array(
1330
- array('amp-use-gtm-option', '=' , '0'),
1331
- ),
1332
- ),
1333
- array(
1334
- 'id' => 'pa-feild',
1335
- 'type' => 'text',
1336
- 'title' => __( 'Piwik Analytics', 'accelerated-mobile-pages' ),
1337
- 'required' => array(
1338
- array('amp-use-gtm-option', '=' , '0'),
1339
- array('ampforwp-Piwik-switch', '=' , '1')
1340
- ),
1341
- 'desc' => __( 'Example: https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM', 'accelerated-mobile-pages' ),
1342
- 'subtitle' => __('Enter your Piwik Analytics URL.', 'accelerated-mobile-pages' ),
1343
- 'default' => '#',
1344
- ),
1345
- // Quantcast
1346
- array(
1347
- 'id' => 'ampforwp-Quantcast-switch',
1348
- 'type' => 'switch',
1349
- 'title' => 'Quantcast Measurement',
1350
- 'default' => ampforwp_get_default_analytics('4'),
1351
- 'required' => array(
1352
- array('amp-use-gtm-option', '=' , '0'),
1353
- ),
1354
- ),
1355
- array(
1356
- 'id' =>'amp-quantcast-analytics-code',
1357
- 'type' => 'text',
1358
- 'title' => __('p-code','accelerated-mobile-pages'),
1359
- 'default' => '',
1360
- 'required' => array(
1361
- array('ampforwp-Quantcast-switch', '=' , '1')),
1362
- ),
1363
- // comScore
1364
- array(
1365
- 'id' => 'ampforwp-comScore-switch',
1366
- 'type' => 'switch',
1367
- 'title' => 'comScore',
1368
- 'default' => ampforwp_get_default_analytics('5'),
1369
- 'required' => array(
1370
- array('amp-use-gtm-option', '=' , '0'),
1371
- ),
1372
- ),
1373
- array(
1374
- 'id' =>'amp-comscore-analytics-code-c1',
1375
- 'type' => 'text',
1376
- 'title' => __('C1','accelerated-mobile-pages'),
1377
- 'default' => 1,
1378
- 'required' => array(
1379
- array('ampforwp-comScore-switch', '=' , '1')),
1380
- ),
1381
- array(
1382
- 'id' =>'amp-comscore-analytics-code-c2',
1383
- 'type' => 'text',
1384
- 'title' => __('C2','accelerated-mobile-pages'),
1385
- 'default' => '',
1386
- 'required' => array(
1387
- array('ampforwp-comScore-switch', '=' , '1')),
1388
- ),
1389
- // Effective Measure
1390
- array(
1391
- 'id' => 'ampforwp-Effective-switch',
1392
- 'type' => 'switch',
1393
- 'title' => 'Effective Measure',
1394
- 'default' => ampforwp_get_default_analytics('6'),
1395
- 'required' => array(
1396
- array('amp-use-gtm-option', '=' , '0'),
1397
- ),
1398
- ),
1399
- array(
1400
- 'id' => 'eam-feild',
1401
- 'type' => 'text',
1402
- 'title' => __( 'Effective Measure Analytics', 'accelerated-mobile-pages' ),
1403
- 'required' => array(
1404
- array('amp-use-gtm-option', '=' , '0'),
1405
- array('ampforwp-Effective-switch', '=' , '1')
1406
- ),
1407
- 'desc' => __( 'Example: https://s.effectivemeasure.net/d/6/i?pu=CANONICAL_URL&ru=DOCUMENT_REFERRER&rnd=RANDOM', 'accelerated-mobile-pages' ),
1408
- 'subtitle' => __('Enter your Effective Measure URL.', 'accelerated-mobile-pages' ),
1409
- 'default' => '#',
1410
- ),
1411
- // StatCounter
1412
- array(
1413
- 'id' => 'ampforwp-StatCounter-switch',
1414
- 'type' => 'switch',
1415
- 'title' => 'StatCounter',
1416
- 'default' => ampforwp_get_default_analytics('7'),
1417
- 'required' => array(
1418
- array('amp-use-gtm-option', '=' , '0'),
1419
- ),
1420
- ),
1421
- array(
1422
- 'id' => 'sc-feild',
1423
- 'type' => 'text',
1424
- 'title' => __( 'StatCounter', 'accelerated-mobile-pages' ),
1425
- 'required' => array(
1426
- array('amp-use-gtm-option', '=' , '0'),
1427
- array('ampforwp-StatCounter-switch', '=' , '1')
1428
- ),
1429
- 'desc' => __( 'Example: https://c.statcounter.com/PROJECT_ID/0/SECURITY_CODE/1/', 'accelerated-mobile-pages' ),
1430
- 'subtitle' => __('Enter your StatCounter URL.', 'accelerated-mobile-pages' ),
1431
- 'default' => '#',
1432
- ),
1433
- // Histats Analytics
1434
- array(
1435
- 'id' => 'ampforwp-Histats-switch',
1436
- 'type' => 'switch',
1437
- 'title' => 'Histats Analytics',
1438
- 'default' => ampforwp_get_default_analytics('8'),
1439
- 'required' => array(
1440
- array('amp-use-gtm-option', '=' , '0'),
1441
- ),
1442
- ),
1443
- array(
1444
- 'id' => 'histats-feild',
1445
- 'type' => 'text',
1446
- 'title' => __( 'Histats Analytics', 'accelerated-mobile-pages' ),
1447
- 'required' => array(
1448
- array('amp-use-gtm-option', '=' , '0'),
1449
- array('ampforwp-Histats-switch', '=' , '1')
1450
- ),
1451
- 'subtitle' => __( 'Enter your Histats Analytics ID.', 'accelerated-mobile-pages' ),
1452
- 'desc' => 'Tutorial: <a href="https://ampforwp.com/tutorials/how-to-get-histats-analytics-id/">How to get Histats Analytics ID for AMP?</a>',
1453
- 'default' => '',
1454
- ),
1455
- // Yandex Metrika
1456
- array(
1457
- 'id' => 'ampforwp-Yandex-switch',
1458
- 'type' => 'switch',
1459
- 'title' => 'Yandex Metrika',
1460
- 'default' => ampforwp_get_default_analytics('9'),
1461
- 'required' => array(
1462
- array('amp-use-gtm-option', '=' , '0'),
1463
- ),
1464
- ),
1465
- array(
1466
- 'id' =>'amp-Yandex-Metrika-analytics-code',
1467
- 'type' => 'text',
1468
- 'title' => __('Yandex Metrika Analytics ID','accelerated-mobile-pages'),
1469
- 'default' => '',
1470
- 'required' => array(
1471
- array('amp-use-gtm-option', '=' , '0'),
1472
- array('ampforwp-Yandex-switch', '=' , '1')),
1473
- 'subtitle' => __( 'Enter your Counter ID.', 'accelerated-mobile-pages' ),
1474
- ),
1475
- // Chartbeat Analytics
1476
- array(
1477
- 'id' => 'ampforwp-Chartbeat-switch',
1478
- 'type' => 'switch',
1479
- 'title' => 'Chartbeat Analytics',
1480
- 'default' => ampforwp_get_default_analytics('10'),
1481
- 'required' => array(
1482
- array('amp-use-gtm-option', '=' , '0'),
1483
- ),
1484
- ),
1485
-
1486
- array(
1487
- 'id' =>'amp-Chartbeat-analytics-code',
1488
- 'type' => 'text',
1489
- 'title' => __('Chartbeat Analytics ID','accelerated-mobile-pages'),
1490
- 'default' => '',
1491
- 'required' => array(
1492
- array('amp-use-gtm-option', '=' , '0'),
1493
- array('ampforwp-Chartbeat-switch', '=' , '1')),
1494
- 'subtitle' => __( 'Enter your Account ID.', 'accelerated-mobile-pages' ),
1495
- ),
1496
- // Alexa Metrics
1497
- array(
1498
- 'id' => 'ampforwp-Alexa-switch',
1499
- 'type' => 'switch',
1500
- 'title' => 'Alexa Metrics',
1501
- 'default' => ampforwp_get_default_analytics('11'),
1502
- 'required' => array(
1503
- array('amp-use-gtm-option', '=' , '0'),
1504
- ),
1505
- ),
1506
- array(
1507
- 'id' => 'ampforwp-alexa-account',
1508
- 'type' => 'text',
1509
- 'title' => __( 'Alexa Metrics Account', 'accelerated-mobile-pages' ),
1510
- 'required' => array(
1511
- array('amp-use-gtm-option', '=' , '0'),
1512
- array('ampforwp-Alexa-switch', '=' , '1')
1513
- ),
1514
- 'subtitle' => __( 'Enter Account Number given by Alexa Metrics', 'accelerated-mobile-pages' ),
1515
- 'default' => '',
1516
- ),
1517
- array(
1518
- 'id' => 'ampforwp-alexa-domain',
1519
- 'type' => 'text',
1520
- 'title' => __( 'Alexa Metrics Domain', 'accelerated-mobile-pages' ),
1521
- 'required' => array(
1522
- array('amp-use-gtm-option', '=' , '0'),
1523
- array('ampforwp-Alexa-switch', '=' , '1')
1524
- ),
1525
- 'subtitle' => __( 'Enter the domain', 'accelerated-mobile-pages' ),
1526
- 'default' => '',
1527
- ),
1528
- // AFS Analytics
1529
- array(
1530
- 'id' => 'ampforwp-afs-analytics-switch',
1531
- 'type' => 'switch',
1532
- 'title' => 'AFS Analytics',
1533
- 'default' => ampforwp_get_default_analytics('12'),
1534
- 'required' => array(
1535
- array('amp-use-gtm-option', '=' , '0'),
1536
- ),
1537
- ),
1538
- array(
1539
- 'id' => 'ampforwp-afs-siteid',
1540
- 'type' => 'text',
1541
- 'title' => __( 'Website ID', 'accelerated-mobile-pages' ),
1542
- 'required' => array(
1543
- array('amp-use-gtm-option', '=' , '0'),
1544
- array('ampforwp-afs-analytics-switch', '=' , '1')
1545
- ),
1546
- 'subtitle' => __( 'Enter the Website ID', 'accelerated-mobile-pages' ),
1547
- 'default' => '',
1548
- 'desc' => 'example: 00000003',
1549
- ),
1550
-
1551
- //GTM
1552
- array(
1553
- 'id' => 'amp-use-gtm-option',
1554
- 'type' => 'switch',
1555
- 'title' => __( 'Google Tag Manager', 'accelerated-mobile-pages' ),
1556
- 'subtitle' => __( 'Select your Analytics provider.', 'accelerated-mobile-pages' ),
1557
- 'default' => 0,
1558
- ),
1559
- array(
1560
- 'id' =>'amp-gtm-id',
1561
- 'type' => 'text',
1562
- 'title' => __('Tag Manager ID (Container ID)','accelerated-mobile-pages'),
1563
- 'default' => '',
1564
- 'desc' => __('Eg: GTM-5XXXXXP (<a href="https://ampforwp.com/tutorials/article/gtm-in-amp/">Getting Started?</a>)','accelerated-mobile-pages'),
1565
- // 'validate' => 'not_empty',
1566
- 'required' => array(
1567
- array('amp-use-gtm-option', '=' , '1')
1568
- ),
1569
- ),
1570
- array(
1571
- 'id' =>'amp-gtm-analytics-type',
1572
- 'type' => 'text',
1573
- 'title' => __('Analytics Type','accelerated-mobile-pages'),
1574
- 'default' => '',
1575
- 'desc' => __('Eg: googleanalytics','accelerated-mobile-pages'),
1576
- // 'validate' => 'not_empty',
1577
- 'required' => array(
1578
- array('amp-use-gtm-option', '=' , '1')
1579
- ),
1580
- ),
1581
- array(
1582
- 'id' =>'amp-gtm-analytics-code',
1583
- 'type' => 'text',
1584
- 'title' => __('Analytics ID','accelerated-mobile-pages'),
1585
- 'default' => '',
1586
- 'desc' => 'Eg: UA-XXXXXX-Y',
1587
- // 'validate' => 'not_empty',
1588
- 'required' => array(
1589
- array('amp-use-gtm-option', '=' , '1')),
1590
- ),
1591
- // Google Cliend ID API
1592
- array(
1593
- 'id' => 'ampforwp-ga-clientid-api-gtm',
1594
- 'type' => 'info',
1595
- 'style' => 'info',
1596
- 'desc' => '<a href="https://ampforwp.com/tutorials/article/set-google-amp-client-id-api/" target="_blank">Check this Tutorial to set it up</a>',
1597
- 'title' => __('Set up Google AMP Client ID API', 'accelerated-mobile-pages'),
1598
- 'required' => array(
1599
- array('amp-use-gtm-option', '=' , '1'),
1600
- ),
1601
- ),
1602
- array(
1603
- 'id' =>'amp-fb-pixel',
1604
- 'type' => 'switch',
1605
- 'title' => __('Facebook Pixel','accelerated-mobile-pages'),
1606
- 'default' => 0,
1607
- ),
1608
- array(
1609
- 'id' =>'amp-fb-pixel-id',
1610
- 'type' => 'text',
1611
- 'title' => __('Facebook Pixel ID','accelerated-mobile-pages'),
1612
- 'default' => '',
1613
- 'desc' => 'Example: 153246987501548',
1614
- 'required' => array(
1615
- array('amp-fb-pixel', '=' , '1')),
1616
- ),
1617
-
1618
- )
1619
- )
1620
- );
1621
- //Get options for Structured Data Type
1622
- if( !function_exists('ampforwp_get_sd_types') ){
1623
- function ampforwp_get_sd_types(){
1624
- $options = array();
1625
- $options = array(
1626
- 'BlogPosting' => 'BlogPosting',
1627
- 'NewsArticle' => 'NewsArticle',
1628
- 'Recipe' => 'Recipe',
1629
- 'Product' => 'Product',
1630
- 'VideoObject' => 'VideoObject',
1631
- 'Article' => 'Article',
1632
- 'WebPage' => 'WebPage'
1633
- );
1634
- return $options;
1635
- }
1636
- }
1637
-
1638
- add_filter('ampforwp_sd_custom_fields', 'ampforwp_add_extra_fields');
1639
- function ampforwp_add_extra_fields($fields){
1640
- $post_types = '';
1641
- $custom_fields = array();
1642
- $extra_fields = array();
1643
- $post_types = get_option('ampforwp_custom_post_types');
1644
- if($post_types){
1645
- foreach ($post_types as $post_type) {
1646
- if( $post_type == 'post' || $post_type == 'page' ) {
1647
- continue;
1648
- }
1649
- $custom_fields[] = array(
1650
- 'id' => 'ampforwp-sd-type-'. $post_type,
1651
- 'type' => 'select',
1652
- 'title' => __($post_type, 'accelerated-mobile-pages'),
1653
- 'subtitle' => __('Select the Structured Data Type for '.$post_type, 'accelerated-mobile-pages'),
1654
- 'options' => ampforwp_get_sd_types(),
1655
- 'default' => 'BlogPosting',
1656
- );
1657
- $extra_fields = array_merge($extra_fields, $custom_fields);
1658
- }
1659
- }
1660
- array_splice($fields, 2, 0, $extra_fields);
1661
- return $fields;
1662
-
1663
- }
1664
- // Structured Data
1665
- Redux::setSection( $opt_name, array(
1666
- 'title' => __( 'Structured Data', 'accelerated-mobile-pages' ),
1667
- 'id' => 'opt-structured-data',
1668
- 'subsection' => true,
1669
- 'fields' => apply_filters('ampforwp_sd_custom_fields', $fields = array(
1670
- array(
1671
- 'id' => 'ampforwp-sd-type-posts',
1672
- 'type' => 'select',
1673
- 'title' => __('Posts', 'accelerated-mobile-pages'),
1674
- 'subtitle' => __('Select the Structured Data Type for Posts', 'accelerated-mobile-pages'),
1675
- 'options' => ampforwp_get_sd_types(),
1676
- 'default' => 'BlogPosting',
1677
- ),
1678
- array(
1679
- 'id' => 'ampforwp-sd-type-pages',
1680
- 'type' => 'select',
1681
- 'title' => __('Pages', 'accelerated-mobile-pages'),
1682
- 'subtitle' => __('Select the Structured Data Type for Pages', 'accelerated-mobile-pages'),
1683
- 'options' => ampforwp_get_sd_types(),
1684
- 'default' => 'BlogPosting',
1685
- ),
1686
- array(
1687
- 'id' => 'amp-structured-data-logo',
1688
- 'type' => 'media',
1689
- 'url' => true,
1690
- 'title' => __('Default Structured Data Logo', 'accelerated-mobile-pages'),
1691
- 'subtitle' => __('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
1692
- ),
1693
- array(
1694
- 'id' => 'ampforwp-sd-logo-dimensions',
1695
- 'title' => __('Custom Logo Size', 'accelerated-mobile-pages'),
1696
- 'type' => 'switch',
1697
- 'default' => 0,
1698
- ),
1699
- array(
1700
- 'id' => 'ampforwp-sd-logo-width',
1701
- 'type' => 'text',
1702
- 'title' => __('Logo Width', 'accelerated-mobile-pages'),
1703
- 'desc' => __('Default width is 600 pixels', 'accelerated-mobile-pages'),
1704
- 'default' => '600',
1705
- 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
1706
- ),
1707
- array(
1708
- 'id' => 'ampforwp-sd-logo-height',
1709
- 'type' => 'text',
1710
- 'title' => __('Logo Height', 'accelerated-mobile-pages'),
1711
- 'desc' => __('Default height is 60 pixels', 'accelerated-mobile-pages'),
1712
- 'default' => '60',
1713
- 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
1714
-
1715
- ),
1716
- array(
1717
- 'id' => 'amp-structured-data-placeholder-image',
1718
- 'type' => 'media',
1719
- 'url' => true,
1720
- 'title' => __('Default Post Image', 'accelerated-mobile-pages'),
1721
- 'subtitle' => __('Upload the Image you want to show as Placeholder Image.', 'accelerated-mobile-pages'),
1722
- 'placeholder' => __('when there is no featured image set in the post','accelerated-mobile-pages'),
1723
- ),
1724
- array(
1725
- 'id' => 'amp-structured-data-placeholder-image-width',
1726
- 'title' => __('Default Post Image Width', 'accelerated-mobile-pages'),
1727
- 'type' => 'text',
1728
- 'placeholder' => '550',
1729
- 'subtitle' => __('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
1730
- 'default' => '700'
1731
- ),
1732
- array(
1733
- 'id' => 'amp-structured-data-placeholder-image-height',
1734
- 'title' => __('Default Post Image Height', 'accelerated-mobile-pages'),
1735
- 'type' => 'text',
1736
- 'placeholder' => '350',
1737
- 'subtitle' => __('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
1738
- 'default' => '550'
1739
- ),
1740
- array(
1741
- 'id' => 'amporwp-structured-data-video-thumb-url',
1742
- 'type' => 'media',
1743
- 'url' => true,
1744
- 'title' => __('Default Thumbnail for VideoObject', 'accelerated-mobile-pages'),
1745
- 'subtitle' => __('Upload the Thumbnail you want to show as Video Thumbnail.', 'accelerated-mobile-pages'),
1746
- 'placeholder' => __('When there is no thumbnail set for the video','accelerated-mobile-pages'),
1747
- ),
1748
- )
1749
- )
1750
- ) );
1751
-
1752
- // Notifications SECTION
1753
- Redux::setSection( $opt_name, array(
1754
- 'title' => __( 'Notice Bar', 'accelerated-mobile-pages' ),
1755
- 'desc' => $cta_desc ,
1756
- 'id' => 'amp-notifications',
1757
- 'subsection' => true,
1758
- 'fields' => array(
1759
- array(
1760
- 'id' =>'amp-enable-notifications',
1761
- 'type' => 'switch',
1762
- 'title' => __('Enable Notifications', 'accelerated-mobile-pages'),
1763
- 'default' => '',
1764
- 'subtitle' => __('Show notifications on all of your AMP pages for cookie purposes, or anything else.', 'accelerated-mobile-pages'),
1765
- 'true' => 'Enabled',
1766
- 'false' => 'Disabled',
1767
- ),
1768
- array(
1769
- 'id' => 'amp-notification-text',
1770
- 'title' => __('Notification text', 'accelerated-mobile-pages'),
1771
- 'type' => 'text',
1772
- 'required' => array('amp-enable-notifications', '=' , '1'),
1773
- 'default' => __('This website uses cookies.','accelerated-mobile-pages'),
1774
- 'placeholder' => __('Enter Text here','accelerated-mobile-pages'),
1775
- ),
1776
- array(
1777
- 'id' => 'amp-accept-button-text',
1778
- 'title' => __('Notification accept button text', 'accelerated-mobile-pages'),
1779
- 'type' => 'text',
1780
- 'required' => array('amp-enable-notifications', '=' , '1'),
1781
- 'default' => __('Accept','accelerated-mobile-pages'),
1782
- 'placeholder' => __('Enter Text here','accelerated-mobile-pages'),
1783
- ),
1784
-
1785
- ),
1786
-
1787
- ) );
1788
-
1789
- // Push Notifications section
1790
- Redux::setSection( $opt_name, array(
1791
- 'title' => __( 'Push Notifications', 'accelerated-mobile-pages' ),
1792
- // 'icon' => 'el el-podcast',
1793
- 'id' => 'ampforwp-push-notifications',
1794
- 'desc' => " ",
1795
- 'subsection' => true,
1796
- 'fields' => array(
1797
- array(
1798
- 'id' => 'ampforwp-web-push-onesignal',
1799
- 'type' => 'switch',
1800
- 'title' => 'OneSignal Push Notifications',
1801
- 'subtitle' => '<a href="https://ampforwp.com/tutorials/one-signal-in-amp/" target="_blank">View Integration Tutorial</a> (HTTPS is required)',
1802
- 'true' => 'true',
1803
- 'false' => 'false',
1804
- 'default' => 0,
1805
- ),
1806
- array(
1807
- 'id' => 'ampforwp-one-signal-app-id',
1808
- 'type' => 'text',
1809
- 'title' => 'APP ID',
1810
- 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
1811
- ),
1812
- array(
1813
- 'id' => 'ampforwp-onesignal-positioning',
1814
- 'type' => 'section',
1815
- 'title' => __('Positioning', 'accelerated-mobile-pages'),
1816
- 'required' => array(
1817
- array( 'ampforwp-web-push-onesignal', '=' , 1 ),
1818
- array( 'amp-use-pot', '=' , 0 )
1819
- ),
1820
- 'indent' => true,
1821
- ),
1822
- array(
1823
- 'id' => 'ampforwp-web-push-onesignal-below-content',
1824
- 'type' => 'switch',
1825
- 'title' => 'Below the Content',
1826
- 'true' => 'true',
1827
- 'false' => 'false',
1828
- 'default' => 1,
1829
- 'subtitle' => 'Show Subscribe Button Below the Content',
1830
- 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
1831
- ),
1832
- array(
1833
- 'id' => 'ampforwp-web-push-onesignal-above-content',
1834
- 'type' => 'switch',
1835
- 'title' => 'Above the Content',
1836
- 'true' => 'true',
1837
- 'false' => 'false',
1838
- 'default' => 0,
1839
- 'subtitle' => 'Show Subscribe Button Above the Content',
1840
- 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
1841
- ),
1842
- array(
1843
- 'id' => 'translation',
1844
- 'type' => 'section',
1845
- 'title' => __('Translation', 'accelerated-mobile-pages'),
1846
- 'required' => array(
1847
- array( 'ampforwp-web-push-onesignal', '=' , 1 ),
1848
- array( 'amp-use-pot', '=' , 0 )
1849
- ),
1850
- 'indent' => true,
1851
- ),
1852
- array(
1853
- 'id' => 'ampforwp-onesignal-translator-subscribe',
1854
- 'type' => 'text',
1855
- 'title' => __('Subscribe', 'accelerated-mobile-pages'),
1856
- 'default' => __('Subscribe to updates','accelerated-mobile-pages'),
1857
- 'placeholder'=>__('Add some text','accelerated-mobile-pages'),
1858
- ),
1859
- array(
1860
- 'id' => 'ampforwp-onesignal-translator-unsubscribe',
1861
- 'type' => 'text',
1862
- 'title' => __('Unsubsribe', 'accelerated-mobile-pages'),
1863
- 'default' => __('Unsubscribe from updates','accelerated-mobile-pages'),
1864
- 'placeholder'=>__('Add some text','accelerated-mobile-pages'),
1865
- ),
1866
- array(
1867
- 'id' => 'ampforwp-onesignal-exper',
1868
- 'type' => 'section',
1869
- 'title' => __('Experimental', 'accelerated-mobile-pages'),
1870
- 'required' => array(
1871
- array( 'ampforwp-web-push-onesignal', '=' , 1 ),
1872
- array( 'amp-use-pot', '=' , 0 )
1873
- ),
1874
- 'indent' => true,
1875
- ),
1876
- array(
1877
- 'id' => 'ampforwp-onesignal-http-site',
1878
- 'type' => 'switch',
1879
- 'title' => 'HTTP Site',
1880
- 'subtitle' => 'For HTTP Sites Only',
1881
- 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
1882
- 'true' => 'true',
1883
- 'false' => 'false',
1884
- 'default' => 0
1885
- ),
1886
- array(
1887
- 'id' => 'ampforwp-onesignal-subdomain',
1888
- 'type' => 'text',
1889
- 'title' => 'Subdomain',
1890
- 'desc' => __('Example: ampforwp', 'accelerated-mobile-pages'),
1891
- 'required' => array(
1892
- array('ampforwp-web-push-onesignal', '=' , '1'),
1893
- array('ampforwp-onesignal-http-site', '=','1')),
1894
- ),
1895
- )
1896
- )
1897
- );
1898
- // contact form 7
1899
- $forms_support[] = array(
1900
- 'id' =>'amp-enable-contactform',
1901
- 'type' => 'switch',
1902
- 'title' => __('Contact Form 7 Support', 'accelerated-mobile-pages'),
1903
- 'default' => '',
1904
- 'true' => 'Enabled',
1905
- 'false' => 'Disabled',
1906
- );
1907
-
1908
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1909
- if(!is_plugin_active( 'amp-cf7/amp-cf7.php' ) ){
1910
- $forms_support[]= array(
1911
- 'id' => 'info_normal_cf7',
1912
- 'type' => 'info',
1913
- 'required' => array('amp-enable-contactform', '=' , '1'),
1914
- 'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin:-45px -14px -18px -17px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=cf7-tab_cf7_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Contact Form 7 extension</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=cf7-tab_cf7_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Click here for more info</a>)</div></div>',
1915
- );
1916
- }
1917
- // gravity form
1918
- $forms_support[]= array(
1919
- 'id' =>'amp-enable-gravityforms_support',
1920
- 'type' => 'switch',
1921
- 'title' => __('Gravity Forms Support', 'accelerated-mobile-pages'),
1922
- 'default' => '',
1923
- 'true' => 'Enabled',
1924
- 'false' => 'Disabled',
1925
- );
1926
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1927
- if(!is_plugin_active( 'amp-gravity-forms/amp-gravity-forms.php' ) ){
1928
- $forms_support[]= array(
1929
- 'id' => 'info_normal_2',
1930
- 'type' => 'info',
1931
- 'required' => array('amp-enable-gravityforms_support', '=' , '1'),
1932
- 'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin:-45px -14px -18px -17px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=gf-tab_gf_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Gravity Forms extension</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=gf-tab_gf_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Click here for more info</a>)</div></div>',
1933
- );}
1934
-
1935
- // Contact Form SECTION
1936
- Redux::setSection( $opt_name, array(
1937
- 'title' => __( 'Contact Form', 'accelerated-mobile-pages' ),
1938
- 'desc' => 'Contact forms will automatically be converted into AMP compatible.',
1939
- 'id' => 'amp-contact',
1940
- 'subsection' => true,
1941
- 'fields' => $forms_support
1942
-
1943
- ) );
1944
-
1945
- // comments
1946
- Redux::setSection( $opt_name, array(
1947
- 'title' => __( 'Comments', 'accelerated-mobile-pages' ),
1948
- 'desc' => $comment_desc,
1949
- 'id' => 'disqus-comments',
1950
- 'subsection' => true,
1951
- 'fields' => array(
1952
- array(
1953
- 'title' =>__('WordPress Comments','accelerated-mobile-pages'),
1954
- 'id' => 'wordpress-comments-support',
1955
- 'subtitle' => __('Enable/Disable WordPress comments using this switch.', 'accelerated-mobile-pages'),
1956
- 'type' => 'switch',
1957
-
1958
- ),
1959
- array(
1960
- 'id' => 'ampforwp-number-of-comments',
1961
- 'type' => 'text',
1962
- 'subtitle' => __('This refers to the normal comments','accelerated-mobile-pages'),
1963
- 'title' => __('No of Comments', 'accelerated-mobile-pages'),
1964
- 'default' => 10,
1965
- 'required' => array('wordpress-comments-support' , '=' , 1
1966
- ),
1967
- ),
1968
- array(
1969
- 'id' => 'ampforwp-disqus-comments-support',
1970
- 'type' => 'switch',
1971
- 'title' => __('Disqus comments', 'accelerated-mobile-pages'),
1972
- 'subtitle' => __('Enable/Disable Disqus comments using this switch.', 'accelerated-mobile-pages'),
1973
- 'default' => 0
1974
- ),
1975
- array(
1976
- 'id' => 'ampforwp-disqus-comments-name',
1977
- 'type' => 'text',
1978
- 'title' => __('Disqus Name', 'accelerated-mobile-pages'),
1979
- 'subtitle' => __('Eg: https://xyz.disqus.com', 'accelerated-mobile-pages'),
1980
- 'required' => array('ampforwp-disqus-comments-support', '=' , '1'),
1981
- 'default' => ''
1982
- ),
1983
-
1984
- array(
1985
- 'id' => 'ampforwp-disqus-host-position',
1986
- 'type' => 'switch',
1987
- 'title' => __('Host Disqus Comments through AMPforWP Servers', 'accelerated-mobile-pages'),
1988
- 'subtitle' => __('Use AMPforWP secure servers to serve Comments file. Recommended if your site is non HTTPS', 'accelerated-mobile-pages'),
1989
- 'default' => 1,
1990
- 'required' => array('ampforwp-disqus-comments-support', '=' , '1'),
1991
- ),
1992
-
1993
- array(
1994
- 'id' => 'ampforwp-disqus-host-file',
1995
- 'type' => 'text',
1996
- 'title' => __('Disqus Host File', 'accelerated-mobile-pages'),
1997
- 'subtitle' => __('<a href="https://ampforwp.com/host-disqus-comments/"> Click here to know, How to Setup Disqus Host file on your servers </a>', 'accelerated-mobile-pages'),
1998
- 'placeholder' => 'https://comments.example.com/disqus.php',
1999
- 'required' => array('ampforwp-disqus-host-position', '=' , '0'),
2000
- ),
2001
- array(
2002
- 'id' => 'ampforwp-facebook-comments-support',
2003
- 'type' => 'switch',
2004
- 'title' => __('Facebook Comments', 'accelerated-mobile-pages'),
2005
- 'subtitle' => __('Enable/Disable Facebook comments using this switch.', 'accelerated-mobile-pages'),
2006
- 'default' => 0,
2007
- ),
2008
- array(
2009
- 'id' => 'ampforwp-number-of-fb-no-of-comments',
2010
- 'type' => 'text',
2011
- 'subtitle' => __('Enter the number of comments','accelerated-mobile-pages'),
2012
- 'title' => __('No of Comments', 'accelerated-mobile-pages'),
2013
- 'default' => 10,
2014
- 'required' => array(
2015
- array('ampforwp-facebook-comments-support', '=' , 1),
2016
-
2017
-
2018
- ),
2019
- )
2020
- )
2021
- ) );
2022
-
2023
- function fb_instant_article() {
2024
- $feedname = '';
2025
- $fb_instant_article_feed = '';
2026
- $input = '';
2027
-
2028
- $feedname = 'instant_articles';
2029
- $fb_instant_article_feed = trailingslashit( site_url() ).$feedname ;
2030
- $input = '<a href=" '. $fb_instant_article_feed . '" target="_blank">' . esc_url( $fb_instant_article_feed ). '</a>' ;
2031
-
2032
- return strip_tags($input, '<a>');
2033
- }
2034
-
2035
- // Facebook Instant Articles
2036
- Redux::setSection( $opt_name, array(
2037
- 'title' => __( 'Instant Articles', 'accelerated-mobile-pages' ),
2038
- 'id' => 'fb-instant-article',
2039
- 'subsection' => true,
2040
- 'fields' => array(
2041
- array(
2042
- 'id' =>'fb-instant-article-switch',
2043
- 'type' => 'switch',
2044
- 'title' => __('Facebook Instant Articles Support', 'accelerated-mobile-pages'),
2045
- 'default' => 0,
2046
- 'true' => 'true',
2047
- 'false' => 'false',
2048
- 'desc' => __('Re-Save permalink when you enable this option, please have a look <a href="https://ampforwp.com/flush-rewrite-urls/">here</a> on how to do it', 'accelerated-mobile-pages'),
2049
- ),
2050
- array(
2051
- 'id' => 'fb-instant-article-feed-url',
2052
- 'type' => 'info',
2053
- 'style' => 'critical',
2054
- 'desc' => fb_instant_article(),
2055
- 'title' => __('Facebook Instant Articles Feed URL', 'accelerated-mobile-pages'),
2056
- 'required' => array('fb-instant-article-switch', '=', 1)
2057
- ),
2058
- array(
2059
- 'id' => 'ampforwp-fb-instant-article-posts',
2060
- 'type' => 'text',
2061
- 'title' => __('Number of Posts', 'accelerated-mobile-pages'),
2062
- 'subtitle' => __('Enter the number of posts to generate for Instant Articles.', 'accelerated-mobile-pages'),
2063
- 'desc' => __('Leave this empty to generate All Posts.', 'accelerated-mobile-pages'),
2064
- 'required' => array('fb-instant-article-switch', '=', 1),
2065
- 'default' => '50'
2066
- ),
2067
- array(
2068
- 'id' => 'ampforwp-instant-article-author-bio',
2069
- 'type' => 'switch',
2070
- 'title' => __('Author Bio', 'accelerated-mobile-pages'),
2071
- 'default' => 0,
2072
- 'true' => 'true',
2073
- 'false' => 'false',
2074
- 'subtitle' => __('Enable/Disable Author Bio', 'accelerated-mobile-pages'),
2075
- 'required' => array('fb-instant-article-switch', '=', 1)
2076
- ),
2077
- array(
2078
- 'id' => 'fb-instant-article-ads',
2079
- 'type' => 'switch',
2080
- 'title' => __('Advertisement', 'accelerated-mobile-pages'),
2081
- 'default' => 0,
2082
- 'true' => 'true',
2083
- 'false' => 'false',
2084
- 'desc' => __('Switch this on to enable advertising on Instant Article pages.', 'accelerated-mobile-pages'),
2085
- 'required' => array('fb-instant-article-switch', '=', 1)
2086
- ),
2087
- array(
2088
- 'id' => 'fb-instant-article-ad-id',
2089
- 'type' => 'text',
2090
- 'title' => __('Enter your Audience Network Placement ID', 'accelerated-mobile-pages'),
2091
- 'subtitle' => __('You can find out more about this <a href="https://developers.facebook.com/docs/instant-articles/monetization/audience-network">here</a>. ', 'accelerated-mobile-pages'),
2092
- 'required' => array('fb-instant-article-ads', '=', 1)
2093
- ),
2094
- array(
2095
- 'id' => 'fb-instant-article-ad-density-setup',
2096
- 'type' => 'select',
2097
- 'title' => __('How often should ads show in Instant Article pages', 'accelerated-mobile-pages'),
2098
- 'options' => array(
2099
- 'default' => __('Every 250 words', 'accelerated-mobile-pages' ),
2100
- 'medium' => __('Every 350 words', 'accelerated-mobile-pages' ),
2101
- 'low' => __('Every 500 words', 'accelerated-mobile-pages' ),
2102
- ),
2103
- 'required' => array('fb-instant-article-ads', '=', 1),
2104
- 'default' => 'default',
2105
- ),
2106
- array(
2107
- 'id' => 'fb-instant-article-analytics',
2108
- 'type' => 'switch',
2109
- 'title' => __('Analytics', 'accelerated-mobile-pages'),
2110
- 'default' => 0,
2111
- 'true' => 'true',
2112
- 'false' => 'false',
2113
- 'desc' => __('Switch this on to enable analytics on Instant Article pages.', 'accelerated-mobile-pages'),
2114
- 'required' => array('fb-instant-article-switch', '=', 1)
2115
- ),
2116
- array(
2117
- 'id' => 'fb-instant-article-analytics-code',
2118
- 'type' => 'textarea',
2119
- 'title' => __('Enter your Analytics script code', 'accelerated-mobile-pages'),
2120
- 'subtitle' => __('Do not enter iframe tag. Find out more about support <a href="https://developers.facebook.com/docs/instant-articles/analytics">here</a> ', 'accelerated-mobile-pages'),
2121
- 'required' => array('fb-instant-article-analytics', '=', 1)
2122
- ),
2123
- ),
2124
- )
2125
- );
2126
-
2127
- // Hide AMP Bulk Tools
2128
- Redux::setSection( $opt_name, array(
2129
- 'title' => __( 'Hide AMP Bulk Tools', 'accelerated-mobile-pages' ),
2130
- 'id' => 'hide-amp-section',
2131
- 'subsection' => true,
2132
- 'desc' => 'Here are some Advanced options to help you exclude AMP from your prefered pages',
2133
- 'fields' => array(
2134
-
2135
- array(
2136
- 'id' => 'amp-pages-meta-default',
2137
- 'type' => 'select',
2138
- 'title' => __( 'Individual AMP Page (Bulk Edit)', 'accelerated-mobile-pages' ),
2139
- 'subtitle' => __( 'Allows you to Show or Hide AMP from All pages, so it can be changed individually later. This option will change the Default value of AMP metabox in Pages', 'accelerated-mobile-pages' ),
2140
- 'desc' => __( 'NOTE: Changes will overwrite the previous settings.', 'accelerated-mobile-pages' ),
2141
- 'options' => array(
2142
- 'show' => __('Show by Default', 'accelerated-mobile-pages' ),
2143
- 'hide' => __('Hide by default', 'accelerated-mobile-pages' ),
2144
- ),
2145
- 'default' => 'show',
2146
- 'required'=>array('amp-on-off-for-all-pages','=','1'),
2147
- ),
2148
- array(
2149
- 'id' =>'hide-amp-categories',
2150
- 'type' => 'checkbox',
2151
- 'title' => __('Select Categories to Hide AMP'),
2152
- 'subtitle' => __( 'Hide AMP from all the posts of a selected category.', 'accelerated-mobile-pages' ),
2153
- 'default' => 0,
2154
- 'data' => 'categories',
2155
- ),
2156
- )
2157
- )
2158
- );
2159
-
2160
- // Advance Settings SECTION
2161
- Redux::setSection( $opt_name, array(
2162
- 'title' => __( 'Advance Settings', 'accelerated-mobile-pages' ),
2163
- 'desc' => __( 'This section has some advanced settings, please use it with care','accelerated-mobile-pages'),
2164
- 'id' => 'amp-advance',
2165
- 'subsection' => true,
2166
- 'fields' => array(
2167
-
2168
- /* array(
2169
- 'id' => 'ampforwp-homepage-on-off-support',
2170
- 'type' => 'switch',
2171
- 'title' => __('Homepage Support', 'accelerated-mobile-pages'),
2172
- 'subtitle' => __('Enable/Disable Home page using this switch.', 'accelerated-mobile-pages'),
2173
- 'default' => '1'
2174
- ),*/
2175
-
2176
- array(
2177
- 'id' => 'amp-mobile-redirection',
2178
- 'type' => 'switch',
2179
- 'title' => __('Mobile Redirection', 'accelerated-mobile-pages'),
2180
- 'subtitle' => __('
2181
- Enable AMP for your mobile users. Give your visitors a Faster mobile User Experience.','accelerated-mobile-pages'),
2182
- 'default' => 0,
2183
-
2184
- ),
2185
- // End-point option
2186
- array(
2187
- 'id' => 'amp-core-end-point',
2188
- 'type' => 'switch',
2189
- 'title' => ('Change End Point to ?amp'),
2190
- 'default' => 0,
2191
- 'subtitle' => 'Enable this option when /amp/ is giving 404 after resaving the permalink settings.',
2192
- 'desc' => __( 'Making endpoints to ?amp will help you get the amp in tricky setups with taxonomies & post typs. Question mark in the url will not make any difference in the SEO.' ),
2193
- ),
2194
- array(
2195
- 'id' => 'amp-header-text-area-for-html',
2196
- 'type' => 'textarea',
2197
- 'title' => __('Enter HTML in Head', 'accelerated-mobile-pages'),
2198
- 'subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
2199
- 'desc' => __('check your markup here (enter markup between HEAD tag) : https://validator.ampproject.org/', 'accelerated-mobile-pages'),
2200
- 'default' => ''
2201
- ),
2202
- array(
2203
- 'id' => 'amp-body-text-area',
2204
- 'type' => 'textarea',
2205
- 'title' => __('Enter HTML in Body (beginning of body tag) ', 'accelerated-mobile-pages'),
2206
- 'subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
2207
- 'desc' => __('check your markup here (enter markup in the beginning of body tag) : https://validator.ampproject.org/', 'accelerated-mobile-pages'),
2208
- 'default' => ''
2209
- ),
2210
- array(
2211
- 'id' => 'amp-footer-text-area-for-html',
2212
- 'type' => 'textarea',
2213
- 'title' => __('Enter HTML in Footer', 'accelerated-mobile-pages'),
2214
- 'subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
2215
- 'desc' => __('check your markup here (enter markup between BODY tag) : https://validator.ampproject.org/',
2216
- 'accelerated-mobile-pages'),
2217
- 'default' => ''
2218
- ),
2219
- array(
2220
- 'id' => 'ampforwp-auto-amp-menu-link',
2221
- 'type' => 'switch',
2222
- 'title' => __('Auto Add AMP in Menu URL', 'accelerated-mobile-pages'),
2223
- 'subtitle' => __('Automatically add <code>AMP</code> at the end of menu url', 'accelerated-mobile-pages'),
2224
- 'true' => 'true',
2225
- 'false' => 'false',
2226
- 'default' => 0,
2227
- //'required' => array('ampforwp-amp-menu', '=' , '1')
2228
- ),
2229
- //Category Base Removal in AMP
2230
- array(
2231
- 'id' => 'ampforwp-category-base-removel-link',
2232
- 'type' => 'switch',
2233
- 'title' => __('Category base remove in AMP', 'accelerated-mobile-pages'),
2234
- 'subtitle' => __('Category base removal in <code>AMP</code> from url', 'accelerated-mobile-pages'),
2235
- 'true' => 'true',
2236
- 'false' => 'false',
2237
- 'default' => 0,
2238
-
2239
- ),
2240
- //Tag base Removal in AMP
2241
- array(
2242
- 'id' => 'ampforwp-tag-base-removal-link',
2243
- 'type' => 'switch',
2244
- 'title' => __('Tag base remove in AMP', 'accelerated-mobile-pages'),
2245
- 'subtitle' => __('Tag base remove in <code>AMP</code> from url', 'accelerated-mobile-pages'),
2246
- 'true' => 'true',
2247
- 'false' => 'false',
2248
- 'default' => 0,
2249
-
2250
- ),
2251
- // Featured Image from Custom Fields
2252
- array(
2253
- 'id' => 'ampforwp-custom-fields-featured-image-switch',
2254
- 'type' => 'switch',
2255
- 'title' => __('Featured Image from Custom Fields', 'accelerated-mobile-pages'),
2256
- 'subtitle' => __('This will allow you to add Featured Image from Custom Fields', 'accelerated-mobile-pages'),
2257
- 'true' => 'true',
2258
- 'false' => 'false',
2259
- 'default' => 0,
2260
- ),
2261
- array(
2262
- 'id' => 'ampforwp-custom-fields-featured-image',
2263
- 'type' => 'text',
2264
- 'title' => __('Custom Field For Featured Image', 'accelerated-mobile-pages'),
2265
- 'default' => __ ('','accelerated-mobile-pages'),
2266
- 'placeholder'=>__('Write the Custom Field of Featured Image','accelerated-mobile-pages'),
2267
- 'required' => array( 'ampforwp-custom-fields-featured-image-switch', '=' , 1 )
2268
- ),
2269
- // Grab the First Image for Featured Image if there is none
2270
- array(
2271
- 'id' => 'ampforwp-featured-image-from-content',
2272
- 'type' => 'switch',
2273
- 'title' => __('Featured Image from The Content', 'accelerated-mobile-pages'),
2274
- 'subtitle' => __('Show the first image of the content as Featured Image if there is no featured image', 'accelerated-mobile-pages'),
2275
- 'true' => 'true',
2276
- 'false' => 'false',
2277
- 'default' => 0,
2278
- ),
2279
- // Duplicate Featured Image
2280
- array(
2281
- 'id' => 'ampforwp-duplicate-featured-image',
2282
- 'type' => 'switch',
2283
- 'title' => __('Duplicate Featured Image', 'accelerated-mobile-pages'),
2284
- 'subtitle' => __('Turn On the support if you want to show the Featured Image if it already exists in post content.', 'accelerated-mobile-pages'),
2285
- 'true' => 'true',
2286
- 'false' => 'false',
2287
- 'default' => 0,
2288
- ),
2289
- array(
2290
- 'id' => 'amp-meta-permissions',
2291
- 'type' => 'select',
2292
- 'title' => __('Show Metabox in Post Editor to', 'accelerated-mobile-pages'),
2293
- 'options' => array(
2294
- 'all' => 'All users who can post',
2295
- 'admin' => 'Only to Admin'
2296
- ),
2297
- 'default' => 'all',
2298
- ),
2299
- array(
2300
- 'id' => 'ampforwp-development-mode',
2301
- 'type' => 'switch',
2302
- 'title' => __('Dev Mode in AMP'),
2303
- 'subtitle' => __('This will enable the Development mode in AMP', 'accelerated-mobile-pages'),
2304
- 'true' => 'true',
2305
- 'false' => 'false',
2306
- 'default' => 0,
2307
- ),
2308
- array(
2309
- 'id' => 'ampforwp-development-mode-notice',
2310
- 'type' => 'info',
2311
- 'style' => 'info',
2312
- 'desc' => __('Add /amp at the end of url to view the AMP version of the site. Search Engines will not be able to Crawl the AMP site when in Dev Mode.', 'accelerated-mobile-pages'),
2313
- 'title' => __('Dev Mode', 'accelerated-mobile-pages'),
2314
- 'required' => array('ampforwp-development-mode', '=', 1)
2315
- ),
2316
- array(
2317
- 'id' => 'ampforwp-update-notification-bar',
2318
- 'type' => 'switch',
2319
- 'title' => __('Plugin Update Notification Bar'),
2320
- 'subtitle' => __('Enable/Disable the Plugin Update Notification Bar', 'accelerated-mobile-pages'),
2321
- 'true' => 'true',
2322
- 'false' => 'false',
2323
- 'default' => 1,
2324
- ),
2325
- array(
2326
- 'id' => 'ampforwp-wptexturize',
2327
- 'type' => 'switch',
2328
- 'title' => __('Disable wptexturize'),
2329
- 'subtitle' => __('Enable this option to Disable wptexturize Globally', 'accelerated-mobile-pages'),
2330
- 'true' => 'true',
2331
- 'false' => 'false',
2332
- 'default' => 0,
2333
- ),
2334
-
2335
-
2336
- ),
2337
-
2338
- ) );
2339
-
2340
-
2341
- // Translation Panel
2342
- Redux::setSection( $opt_name, array(
2343
- 'title' => __( 'Translation Panel', 'accelerated-mobile-pages' ),
2344
- 'desc' => __( 'Please translate the following words of page accordingly else default content is in English Language', 'accelerated-mobile-pages' ),
2345
- 'id' => 'amp-translator',
2346
- 'subsection' => true,
2347
- 'fields' => array(
2348
- array(
2349
- 'id' => 'amp-use-pot',
2350
- 'type' => 'switch',
2351
- 'title' => __('Use POT file method of Translation', 'accelerated-mobile-pages'),
2352
- 'subtitle' => __('Else you can use normal translation method', 'accelerated-mobile-pages'),
2353
- 'desc' => __('Use this if you want Multilingual Translations', 'accelerated-mobile-pages'),
2354
- 'default' => 0
2355
- ),
2356
- array(
2357
- 'id' => 'amp-translator-breadcrumbs-homepage-text',
2358
- 'type' => 'text',
2359
- 'title' => __('Breadcrumbs Homepage Title', 'accelerated-mobile-pages'),
2360
- 'default' => __('Homepage','accelerated-mobile-pages'),
2361
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2362
- 'required' => array( 'amp-use-pot', '=' , 0 )
2363
- ),
2364
- array(
2365
- 'id' => 'amp-translator-show-more-posts-text',
2366
- 'type' => 'text',
2367
- 'title' => __('Show more Posts', 'accelerated-mobile-pages'),
2368
- 'default' => __('Show more Posts','accelerated-mobile-pages'),
2369
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2370
- 'required' => array( 'amp-use-pot', '=' , 0 )
2371
- ),
2372
- array(
2373
- 'id' => 'amp-translator-show-previous-posts-text',
2374
- 'type' => 'text',
2375
- 'title' => __('Show previous Posts', 'accelerated-mobile-pages'),
2376
- 'default' => __('Show previous Posts','accelerated-mobile-pages'),
2377
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2378
- 'required' => array( 'amp-use-pot', '=' , 0 )
2379
- ),
2380
- array(
2381
- 'id' => 'amp-translator-top-text',
2382
- 'type' => 'text',
2383
- 'title' => __('Top', 'accelerated-mobile-pages'),
2384
- 'default' => __('Top','accelerated-mobile-pages'),
2385
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2386
- 'required' => array( 'amp-use-pot', '=' , 0 )
2387
- ),
2388
- array(
2389
- 'id' => 'amp-translator-non-amp-page-text',
2390
- 'type' => 'text',
2391
- 'title' => __('View Non-AMP Version', 'accelerated-mobile-pages'),
2392
- 'default' => __('View Non-AMP Version','accelerated-mobile-pages'),
2393
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2394
- 'required' => array( 'amp-use-pot', '=' , 0 )
2395
- ),
2396
- array(
2397
- 'id' => 'amp-translator-related-text',
2398
- 'type' => 'text',
2399
- 'title' => __('Related Post', 'accelerated-mobile-pages'),
2400
- 'default' => __('Related Post','accelerated-mobile-pages'),
2401
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2402
- 'required' => array( 'amp-use-pot', '=' , 0 )
2403
- ),
2404
- array(
2405
- 'id' => 'amp-translator-recent-text',
2406
- 'type' => 'text',
2407
- 'title' => __('Recent Posts', 'accelerated-mobile-pages'),
2408
- 'default' => __('Recent Posts','accelerated-mobile-pages'),
2409
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2410
- 'required' => array( 'amp-use-pot', '=' , 0 )
2411
- ),
2412
- array(
2413
- 'id' => 'amp-translator-navigate-text',
2414
- 'type' => 'text',
2415
- 'title' => __('Navigate', 'accelerated-mobile-pages'),
2416
- 'default' => __('Navigate','accelerated-mobile-pages'),
2417
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2418
- 'required' => array( 'amp-use-pot', '=' , 0 )
2419
- ),
2420
- array(
2421
- 'id' => 'amp-translator-on-text',
2422
- 'type' => 'text',
2423
- 'title' => __('On', 'accelerated-mobile-pages'),
2424
- 'default' => __('On','accelerated-mobile-pages'),
2425
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2426
- 'required' => array( 'amp-use-pot', '=' , 0 )
2427
- ),
2428
- array(
2429
- 'id' => 'amp-translator-next-text',
2430
- 'type' => 'text',
2431
- 'title' => __('Next', 'accelerated-mobile-pages'),
2432
- 'default' => __('Next','accelerated-mobile-pages'),
2433
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2434
- 'required' => array( 'amp-use-pot', '=' , 0 )
2435
- ),
2436
- array(
2437
- 'id' => 'amp-translator-previous-text',
2438
- 'type' => 'text',
2439
- 'title' => __('Previous', 'accelerated-mobile-pages'),
2440
- 'default' => __('Previous','accelerated-mobile-pages'),
2441
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2442
- 'required' => array( 'amp-use-pot', '=' , 0 )
2443
- ),
2444
- array(
2445
- 'id' => 'amp-translator-footer-text',
2446
- 'type' => 'textarea',
2447
- 'title' => __('Footer', 'accelerated-mobile-pages'),
2448
- 'default' => __('All Rights Reserved','accelerated-mobile-pages'),
2449
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2450
- 'required' => array( 'amp-use-pot', '=' , 0 )
2451
- ),
2452
- array(
2453
- 'id' => 'amp-translator-categories-text',
2454
- 'type' => 'text',
2455
- 'title' => __('Categories', 'accelerated-mobile-pages'),
2456
- 'default' => __('Categories: ','accelerated-mobile-pages'),
2457
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2458
- 'required' => array( 'amp-use-pot', '=' , 0 )
2459
- ),
2460
- array(
2461
- 'id' => 'amp-translator-tags-text',
2462
- 'type' => 'text',
2463
- 'title' => __('Tags', 'accelerated-mobile-pages'),
2464
- 'default' => __('Tags: ','accelerated-mobile-pages'),
2465
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2466
- 'required' => array( 'amp-use-pot', '=' , 0 )
2467
- ),
2468
- array(
2469
- 'id' => 'amp-translator-by-text',
2470
- 'type' => 'text',
2471
- 'title' => __('By', 'accelerated-mobile-pages'),
2472
- 'default' => __('By','accelerated-mobile-pages'),
2473
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2474
- 'required' => array( 'amp-use-pot', '=' , 0 )
2475
- ),
2476
- array(
2477
- 'id' => 'amp-translator-published-by',
2478
- 'type' => 'text',
2479
- 'title' => __('Published by', 'accelerated-mobile-pages'),
2480
- 'default' => __('Published by','accelerated-mobile-pages'),
2481
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2482
- 'required' => array( 'amp-use-pot', '=' , 0 )
2483
- ),
2484
- array(
2485
- 'id' => 'amp-translator-in-designthree',
2486
- 'type' => 'text',
2487
- 'title' => __('in', 'accelerated-mobile-pages'),
2488
- 'default' =>__( 'in','accelerated-mobile-pages'),
2489
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2490
- 'required' => array( 'amp-use-pot', '=' , 0 )
2491
- ),
2492
- array(
2493
- 'id' => 'amp-translator-view-comments-text',
2494
- 'type' => 'text',
2495
- 'title' => __('View Comments', 'accelerated-mobile-pages'),
2496
- 'default' => __('View Comments','accelerated-mobile-pages'),
2497
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2498
- 'required' => array( 'amp-use-pot', '=' , 0 )
2499
- ),
2500
- array(
2501
- 'id' => 'amp-translator-leave-a-comment-text',
2502
- 'type' => 'text',
2503
- 'title' => __('Leave a Comment', 'accelerated-mobile-pages'),
2504
- 'default' => __('Leave a Comment','accelerated-mobile-pages'),
2505
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2506
- 'required' => array( 'amp-use-pot', '=' , 0 )
2507
- ),
2508
- array(
2509
- 'id' => 'amp-translator-at-text',
2510
- 'type' => 'text',
2511
- 'title' => __('at', 'accelerated-mobile-pages'),
2512
- 'default' => __('at','accelerated-mobile-pages'),
2513
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2514
- 'required' => array( 'amp-use-pot', '=' , 0 )
2515
- ),
2516
- array(
2517
- 'id' => 'amp-translator-says-text',
2518
- 'type' => 'text',
2519
- 'title' => __('says', 'accelerated-mobile-pages'),
2520
- 'default' =>__( 'says','accelerated-mobile-pages'),
2521
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2522
- 'required' => array( 'amp-use-pot', '=' , 0 )
2523
- ),
2524
- array(
2525
- 'id' => 'amp-translator-Edit-text',
2526
- 'type' => 'text',
2527
- 'title' => __('Edit', 'accelerated-mobile-pages'),
2528
- 'default' => __('Edit','accelerated-mobile-pages'),
2529
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2530
- 'required' => array( 'amp-use-pot', '=' , 0 )
2531
- ),
2532
- array(
2533
- 'id' => 'amp-translator-ago-date-text',
2534
- 'type' => 'text',
2535
- 'title' => __('ago', 'accelerated-mobile-pages'),
2536
- 'default' => __('ago','accelerated-mobile-pages'),
2537
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2538
- 'required' => array( 'amp-use-pot', '=' , 0 )
2539
- ),
2540
- array(
2541
- 'id' => 'amp-translator-modified-date-text',
2542
- 'type' => 'text',
2543
- 'title' => __('This post was last modified on ', 'accelerated-mobile-pages'),
2544
- 'default' => __('This post was last modified on ','accelerated-mobile-pages'),
2545
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2546
- 'required' => array( 'amp-use-pot', '=' , 0 )
2547
- ),
2548
- array(
2549
- 'id' => 'amp-translator-archive-cat-text',
2550
- 'type' => 'text',
2551
- 'title' => __('Category (archive title)', 'accelerated-mobile-pages'),
2552
- 'default' => __('Category: ','accelerated-mobile-pages'),
2553
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2554
- 'required' => array( 'amp-use-pot', '=' , 0 )
2555
- ),
2556
- array(
2557
- 'id' => 'amp-translator-archive-tag-text',
2558
- 'type' => 'text',
2559
- 'title' => __('Tag (archive title)', 'accelerated-mobile-pages'),
2560
- 'default' => __('Tag: ','accelerated-mobile-pages'),
2561
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2562
- 'required' => array( 'amp-use-pot', '=' , 0 )
2563
- ),
2564
- array(
2565
- 'id' => 'amp-translator-show-more-text',
2566
- 'type' => 'text',
2567
- 'title' => __('View More Posts (Widget Button)', 'accelerated-mobile-pages'),
2568
- 'default' => __('View More Posts','accelerated-mobile-pages'),
2569
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2570
- 'required' => array( 'amp-use-pot', '=' , 0 )
2571
- ),
2572
- array(
2573
- 'id' => 'amp-translator-next-read-text',
2574
- 'type' => 'text',
2575
- 'title' => __('Next Read', 'accelerated-mobile-pages'),
2576
- 'default' => __('Next Read: ','accelerated-mobile-pages'),
2577
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2578
- 'required' => array( 'amp-use-pot', '=' , 0 )
2579
- ),
2580
- array(
2581
- 'id' => 'amp-translator-via-text',
2582
- 'type' => 'text',
2583
- 'title' => __('via', 'accelerated-mobile-pages'),
2584
- 'default' => __('via','accelerated-mobile-pages'),
2585
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2586
- 'required' => array( 'amp-use-pot', '=' , 0 )
2587
- ),
2588
- array(
2589
- 'id' => 'amp-translator-share-text',
2590
- 'type' => 'text',
2591
- 'title' => __('Share', 'accelerated-mobile-pages'),
2592
- 'default' => __('Share','accelerated-mobile-pages'),
2593
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2594
- 'required' => array( 'amp-use-pot', '=' , 0 )
2595
- ),
2596
- array(
2597
- 'id' => 'amp-translator-search-text',
2598
- 'type' => 'text',
2599
- 'title' => __(' You searched for: ', 'accelerated-mobile-pages'),
2600
- 'default' => __(' You searched for: ','accelerated-mobile-pages'),
2601
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2602
- 'required' => array( 'amp-use-pot', '=' , 0 )
2603
- ),
2604
- array(
2605
- 'id' => 'amp-translator-search-no-found',
2606
- 'type' => 'text',
2607
- 'title' => __(' It seems we can\'t find what you\'re looking for. ', 'accelerated-mobile-pages'),
2608
- 'default' => __(' It seems we can\'t find what you\'re looking for. ','accelerated-mobile-pages'),
2609
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2610
- 'required' => array( 'amp-use-pot', '=' , 0 )
2611
- ),
2612
- array(
2613
- 'id' => 'design-3-search-subsection',
2614
- 'type' => 'section',
2615
- 'title' => __('Search bar Translation Text', 'accelerated-mobile-pages'),
2616
- 'indent' => true,
2617
- 'required' => array( 'amp-use-pot', '=' , 0 )
2618
- ),
2619
- array(
2620
- 'id' => 'ampforwp-search-placeholder',
2621
- 'type' => 'text',
2622
- 'title' => __('Type Here', 'accelerated-mobile-pages'),
2623
- 'default' => 'Type Here','accelerated-mobile-pages'),
2624
- 'desc' => __('This is the text that gets shown in for Search Box','accelerated-mobile-pages'),
2625
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2626
- 'required' => array( 'amp-use-pot', '=' , 0 )
2627
-
2628
- ),
2629
- array(
2630
- 'id' => 'ampforwp-search-label',
2631
- 'type' => 'text',
2632
- 'title' => __('Type your search query and hit enter', 'accelerated-mobile-pages'),
2633
- 'desc' => __('This is the text that gets shown above Search Box','accelerated-mobile-pages'),
2634
- 'default' => __('Type your search query and hit enter: ','accelerated-mobile-pages'),
2635
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2636
- 'required' => array( 'amp-use-pot', '=' , 0 )
2637
-
2638
- )
2639
- ) );
2640
-
2641
-
2642
- // Appearance Section
2643
- Redux::setSection( $opt_name, array(
2644
- 'title' => __( 'Design', 'accelerated-mobile-pages' ),
2645
- 'icon' => 'el el-adjust-alt',
2646
- 'desc' => ''
2647
-
2648
- ));
2649
-
2650
- //get All design
2651
- function amp_extra_plugin_theme_header($headers){
2652
- $headers['AMP Theme Name'] = "AMP";
2653
- $headers['AMP Theme Demo'] = "AMP Demo";
2654
- return $headers;
2655
- }
2656
- add_filter("extra_plugin_headers","amp_extra_plugin_theme_header");
2657
- $themeDesign = array(
2658
- array(
2659
- 'demo_link' => 'https://ampforwp.com/demo/#one',
2660
- 'upgrade'=>true,
2661
- 'title'=>__('Design One', 'accelerated-mobile-pages' ),
2662
- 'value'=>1,
2663
- 'alt'=>__('Design One', 'accelerated-mobile-pages' ),
2664
- 'img'=>AMPFORWP_PLUGIN_DIR_URI.'/images/design-1.png',
2665
- ),
2666
- array(
2667
- 'demo_link' => 'https://ampforwp.com/demo/#two',
2668
- 'upgrade'=>true,
2669
- 'title'=>__('Design Two', 'accelerated-mobile-pages' ),
2670
- 'value'=>2,
2671
- 'alt'=>__('Design Two', 'accelerated-mobile-pages' ),
2672
- 'img'=>AMPFORWP_PLUGIN_DIR_URI.'/images/design-2.png',
2673
- ),
2674
- array(
2675
- 'demo_link' => 'https://ampforwp.com/demo/#three',
2676
- 'upgrade'=>true,
2677
- 'title'=>__('Design Three', 'accelerated-mobile-pages' ),
2678
- 'value'=>3,
2679
- 'alt'=>__('Design Three', 'accelerated-mobile-pages' ),
2680
- 'img'=>AMPFORWP_PLUGIN_DIR_URI.'/images/design-3.png',
2681
- ),
2682
- array(
2683
- 'demo_link' => 'https://ampforwp.com/demo/amp-pagebuilder/amp/',
2684
- 'upgrade' => true,
2685
- 'title' => __('Swift', 'accelerated-mobile-pages' ),
2686
- 'value' => 4,
2687
- 'alt' => __('Swift', 'accelerated-mobile-pages' ),
2688
- 'img' => AMPFORWP_PLUGIN_DIR_URI.'/images/swift.png',
2689
- ),
2690
- );
2691
- if(count(get_plugins())>0){
2692
- foreach (get_plugins() as $key => $value) {
2693
- $plugin = get_plugin_data(WP_PLUGIN_DIR.'/'.$key);
2694
- if(!empty($plugin['AMP'])){//$plugin['AMP']
2695
- $imageUrl = '';
2696
- if(file_exists(AMPFORWP_MAIN_PLUGIN_DIR.$value['TextDomain'].'/screenshot.png')){
2697
- $imageUrl = plugins_url($value['TextDomain'].'/screenshot.png');
2698
- }
2699
- $themeDesign[] = array(
2700
- 'demo_link' => $plugin['AMP Demo'],
2701
- 'upgrade'=>true,
2702
- 'title'=>$plugin['AMP'],
2703
- 'value'=>$value['TextDomain'],
2704
- 'alt'=>$plugin['AMP'],
2705
- 'img'=>$imageUrl,
2706
- );
2707
- }
2708
- }
2709
- }
2710
- // Themes Section
2711
- Redux::setSection( $opt_name, array(
2712
- 'title' => __( 'Themes', 'accelerated-mobile-pages' ), 'class' => 'ampforwp-new-element',
2713
-
2714
- 'id' => 'amp-theme-settings',
2715
- 'subsection' => true,
2716
- 'fields' => array(
2717
-
2718
- $fields = array(
2719
- 'id' => 'amp-design-selector',
2720
- 'type' => 'demolink_image_select',
2721
- 'title' => __( 'Themes Selector', 'accelerated-mobile-pages' ),
2722
- 'subtitle' => __( 'Select your design from dropdown or <br /><a href="https://ampforwp.com/themes/" style="position: relative;
2723
- top: 20px;text-decoration: none;
2724
- background: #eee;padding: 5px 8px 5px 9px;
2725
- border-radius: 30px;" target="_blank">View More AMP Themes →</a>', 'accelerated-mobile-pages' ),
2726
- 'options' => $themeDesign,
2727
- 'default' => '4'
2728
- ),
2729
-
2730
- $fields = array(
2731
- 'id' => 'info_theme_framework',
2732
- 'type' => 'info',
2733
- 'style' => 'success',
2734
- 'desc' => $amptfad
2735
- )
2736
-
2737
- )
2738
- ) );
2739
- /*---------------------*/
2740
-
2741
- // Global Theme Settings
2742
- Redux::setSection($opt_name, array(
2743
- 'title' => __( 'Global', 'accelerated-mobile-pages' ),
2744
- 'id' => 'amp-theme-global-subsection',
2745
- 'subsection' => true,
2746
- 'fields' => array(
2747
- array(
2748
- 'id' => 'colorscheme-section',
2749
- 'type' => 'section',
2750
- 'title' => __('Color Scheme', 'accelerated-mobile-pages'),
2751
- 'indent' => true,
2752
- ),
2753
- // Swift
2754
- array(
2755
- 'id' => 'swift-color-scheme',
2756
- 'title' => __('Global Color Scheme', 'accelerated-mobile-pages'),
2757
- 'subtitle' => __('Choose the color for title, anchor link','accelerated-mobile-pages'),
2758
- 'type' => 'color_rgba',
2759
- 'default' => array(
2760
- 'color' => '#005be2',
2761
- ),
2762
- 'required' => array(
2763
- array('amp-design-selector', '=' , '4')
2764
- )
2765
- ),
2766
- array(
2767
- 'id' => 'amp-opt-color-rgba-colorscheme',
2768
- 'type' => 'color_rgba',
2769
- 'title' => __('Color Scheme','accelerated-mobile-pages'),
2770
- 'default' => array(
2771
- 'color' => '#F42F42',
2772
- ),
2773
- 'required' => array(
2774
- array('amp-design-selector', '=' , '3')
2775
- )
2776
- ),
2777
- array(
2778
- 'id' => 'amp-opt-color-rgba-font',
2779
- 'type' => 'color_rgba',
2780
- 'title' => __('Color Scheme Font Color','accelerated-mobile-pages'),
2781
- 'default' => array(
2782
- 'color' => '#fff',
2783
- ),
2784
- 'required' => array(
2785
- array('amp-design-selector', '=' , '3')
2786
- )
2787
- ),
2788
- // Design 3
2789
- array(
2790
- 'id' => 'amp-opt-color-rgba-link',
2791
- 'type' => 'color_rgba',
2792
- 'title' => __('Anchor Link Color','accelerated-mobile-pages'),
2793
- 'default' => array(
2794
- 'color' => '#f42f42',
2795
- ),
2796
- 'required' => array(
2797
- array('amp-design-selector', '=' , '3')
2798
- )
2799
- ),
2800
- // Design 2
2801
- array(
2802
- 'id' => 'amp-opt-color-rgba-link-design2',
2803
- 'type' => 'color_rgba',
2804
- 'title' => __('Anchor Link Color','accelerated-mobile-pages'),
2805
- 'default' => array(
2806
- 'color' => '#0a89c0',
2807
- ),
2808
- 'required' => array(
2809
- array('amp-design-selector', '=' , '2')
2810
- )
2811
- ),
2812
- // Design 1
2813
- array(
2814
- 'id' => 'amp-opt-color-rgba-link-design1',
2815
- 'type' => 'color_rgba',
2816
- 'title' => __('Anchor Link Color','accelerated-mobile-pages'),
2817
- 'default' => array(
2818
- 'color' => '#0a89c0',
2819
- ),
2820
- 'required' => array(
2821
- array('amp-design-selector', '=' , '1')
2822
- )
2823
- ),
2824
- array(
2825
- 'id' => 'amp-opt-color-rgba-colorscheme-call',
2826
- 'type' => 'color_rgba',
2827
- 'title' => __('Call Button Color','accelerated-mobile-pages'),
2828
- 'default' => array(
2829
- 'color' => '#0a89c0',
2830
- ),
2831
- 'required' => array(
2832
- array('ampforwp-callnow-button', '=' , '1')
2833
- )
2834
- ),
2835
-
2836
- array(
2837
- 'id' => 'typography-section',
2838
- 'type' => 'section',
2839
- 'title' => __('Typography', 'accelerated-mobile-pages'),
2840
- 'indent' => true,
2841
- 'required' => array(
2842
- array('amp-design-selector', '=' , '4')
2843
- )
2844
- ),
2845
- array(
2846
- 'id' =>'google_font_api_key',
2847
- 'type' =>'text',
2848
- 'title' =>__('Google Font API key','accelerated-mobile-pages'),
2849
- 'subtitle' => __('You can get the Link <a target="_blank" href="https://developers.google.com/fonts/docs/developer_api?refresh=1&pli=1">form here</a>','accelerated-mobile-pages'),
2850
- 'default' =>'',
2851
- 'required' => array(
2852
- array('amp-design-selector', '=' , '4')
2853
- )
2854
-
2855
- ),
2856
-
2857
- array(
2858
- 'id' => 'amp_font_selector',
2859
- 'type' => 'select',
2860
- 'class' => 'ampforwp-google-font-class',
2861
- 'title' => __( 'Font Selector', 'accelerated-mobile-pages' ),
2862
- 'subtitle' => __( 'Select your design from dropdown or ', 'accelerated-mobile-pages' ),
2863
- 'options' => array(
2864
- '1' => 'None',
2865
- ),
2866
- 'default' => '',
2867
- 'required' => array(
2868
- array('amp-design-selector', '=' , '4')
2869
- )
2870
-
2871
- ),
2872
-
2873
- array(
2874
- 'id' => 'amp_font_type',
2875
- 'type' => 'select',
2876
- 'class' => 'ampforwp-google-font-class',
2877
- 'multi' => true,
2878
- 'title' => __( 'Font Selector', 'accelerated-mobile-pages' ),
2879
- 'subtitle' => __( 'Select your design from dropdown', 'accelerated-mobile-pages' ),
2880
- 'options' => array(
2881
- '1' => 'none',
2882
- ),
2883
- 'default' => '',
2884
- 'required' => array(
2885
- array('amp-design-selector', '=' , '4')
2886
- )
2887
-
2888
- ),
2889
-
2890
- array(
2891
- 'id' =>'google_current_font_data',
2892
- 'type' =>'text',
2893
- 'class' => 'hide',
2894
- 'title' =>__('Google Font Current Font','accelerated-mobile-pages'),
2895
- 'default' =>'',
2896
- 'required' => array(
2897
- array('amp-design-selector', '=' , '4')
2898
- )
2899
- ),
2900
-
2901
- array(
2902
- 'id' => 'design-advanced',
2903
- 'type' => 'section',
2904
- 'title' => __('Advanced', 'accelerated-mobile-pages'),
2905
- 'indent' => true,
2906
- ),
2907
-
2908
- array(
2909
- 'id' => 'css_editor',
2910
- 'type' => 'ace_editor',
2911
- 'title' => __('Custom CSS', 'accelerated-mobile-pages'),
2912
- 'subtitle' => __('You can customize the Stylesheet of the AMP version by using this option.', 'accelerated-mobile-pages'),
2913
- 'mode' => 'css',
2914
- 'theme' => 'monokai',
2915
- 'desc' => '',
2916
- 'default' => __('/******* Paste your Custom CSS in this Editor *******/','accelerated-mobile-pages')
2917
- ),
2918
- )
2919
- ));
2920
-
2921
- // Header Elements default Color
2922
- function ampforwp_get_element_default_color() {
2923
- $default_value = get_option('redux_builder_amp', true);
2924
- $default_value = $default_value['amp-opt-color-rgba-colorscheme']['color'];
2925
- if ( empty( $default_value ) ) {
2926
- $default_value = '#333';
2927
- }
2928
- return $default_value;
2929
- }
2930
-
2931
- // Header Section
2932
- Redux::setSection( $opt_name, array(
2933
- 'title' => __( 'Header', 'accelerated-mobile-pages' ),
2934
- 'id' => 'amp-theme-header-settings',
2935
- 'subsection' => true,
2936
- 'tab' => true,
2937
- 'fields' => array(
2938
- // Swift
2939
- // Tab 1
2940
- array(
2941
- 'id' => 'header-tab-1',
2942
- 'type' => 'section',
2943
- 'title' => __('', 'accelerated-mobile-pages'),
2944
- //'label' => 'Tab 1',
2945
- 'indent' => true,
2946
- //'start' => true,
2947
- /*'required' => array(
2948
- array('amp-design-selector', '=' , '4')
2949
- ),*/
2950
- ),
2951
- array(
2952
- 'id' => 'header-type',
2953
- 'title' => __('Header Type', 'accelerated-mobile-pages'),
2954
- 'type' => 'image_select',
2955
- 'options'=> array(
2956
- '1' => array(
2957
- 'alt'=>' Header 1 ',
2958
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/head-1.png'
2959
- ),
2960
- '2' => array(
2961
- 'alt'=>' Header 2 ',
2962
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/head-2.png'
2963
- ),
2964
- '3' => array(
2965
- 'alt'=>' Header 3 ',
2966
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/head-3.png',
2967
- ),
2968
- ),
2969
- 'default'=> '1',
2970
- // 'max-width' => 200,
2971
- // 'max-height'=> 60,
2972
- 'required' => array( array('amp-design-selector', '=' , '4') ),
2973
- ),
2974
- array(
2975
- 'id' => 'menu-type',
2976
- 'title' => __('Menu Type', 'accelerated-mobile-pages'),
2977
- 'type' => 'image_select',
2978
- 'options'=> array(
2979
- '1' => array(
2980
- 'alt'=>' Menu overlay 1 ',
2981
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/menu-1.png'
2982
- ),
2983
- ),
2984
- 'default'=> '1',
2985
- // 'max-width' => 200,
2986
- // 'max-height'=> 60,
2987
- 'required' => array( array('amp-design-selector', '=' , '4') ),
2988
- ),
2989
-
2990
- array(
2991
- 'id' => 'primary-menu',
2992
- 'type' => 'switch',
2993
- 'title' => __('Alternative Menu', 'accelerated-mobile-pages'),
2994
- 'true' => 'true',
2995
- 'false' => 'false',
2996
- 'default' => '1',
2997
- 'required' => array( array('amp-design-selector', '=' , '4') ),
2998
- ),
2999
- array(
3000
- 'id' => 'primary-menu-padding-control',
3001
- 'type' => 'spacing',
3002
- 'output' => array('.p-menu'),
3003
- 'mode' => 'padding',
3004
- 'units' => array('px'),
3005
- 'units_extended' => 'false',
3006
- 'title' => __('Alt Menu Padding', 'accelerated-mobile-pages'),
3007
- 'default' => array(
3008
- 'padding-top' => '12px',
3009
- 'padding-right' => '25px',
3010
- 'padding-bottom' => '12px',
3011
- 'padding-left' => '25px',
3012
- 'units' => 'px',
3013
- ),
3014
- 'required' => array(
3015
- array('primary-menu','=',1)
3016
- )
3017
- ),
3018
- array(
3019
- 'id' => 'primary-menu-text-scheme',
3020
- 'title' => __('Alt Menu Text', 'accelerated-mobile-pages'),
3021
- 'type' => 'color_rgba',
3022
- 'default' => array(
3023
- 'rgba' => 'rgb(53, 53, 53)',
3024
- ),
3025
- 'required' => array(
3026
- array('primary-menu','=',1)
3027
- )
3028
- ),
3029
- array(
3030
- 'id' => 'primary-menu-background-scheme',
3031
- 'title' => __('Alt Menu Background', 'accelerated-mobile-pages'),
3032
- 'type' => 'color_rgba',
3033
- 'default' => array(
3034
- 'rgba' => 'rgb(239, 239, 239)',
3035
- ),
3036
- 'required' => array(
3037
- array('primary-menu','=',1)
3038
- )
3039
- ),
3040
- array(
3041
- 'id' => 'signin-button',
3042
- 'title' => __('Button Customize', 'accelerated-mobile-pages'),
3043
- 'subtitle' => __('You can do the customization here ','accelerated-mobile-pages'),
3044
- 'type' => 'switch',
3045
- 'default' => '0',
3046
- 'required' => array(
3047
- array('header-type','=',2)
3048
- )
3049
- ),
3050
- array(
3051
- 'id' => 'signin-button-text',
3052
- 'title' => __('Button Text', 'accelerated-mobile-pages'),
3053
- 'subtitle' => __('You can write your required text ','accelerated-mobile-pages'),
3054
- 'type' => 'text',
3055
- 'default' => 'Sign up free',
3056
- 'required' => array(
3057
- array('signin-button','=',1)
3058
- )
3059
- ),
3060
- array(
3061
- 'id' => 'signin-button-link',
3062
- 'title' => __('Button Link', 'accelerated-mobile-pages'),
3063
- 'subtitle' => __('You can add the Link here ','accelerated-mobile-pages'),
3064
- 'type' => 'text',
3065
- 'default' => '#',
3066
- 'required' => array(
3067
- array('signin-button','=',1)
3068
- )
3069
- ),
3070
- array(
3071
- 'id' => 'signin-button-style',
3072
- 'title' => __('Button Styles', 'accelerated-mobile-pages'),
3073
- 'subtitle' => __('You can change the button here','accelerated-mobile-pages'),
3074
- 'type' => 'switch',
3075
- 'default' => '0',
3076
- 'required' => array(
3077
- array('signin-button','=',1)
3078
- )
3079
- ),
3080
- array(
3081
- 'id' => 'signin-button-border-line',
3082
- 'title' => __('Button Border Line', 'accelerated-mobile-pages'),
3083
- 'subtitle' => __('You can change the button border line','accelerated-mobile-pages'),
3084
- 'type' => 'text',
3085
- 'default' => '2',
3086
- 'required' => array(
3087
- array('signin-button-style','=',1)
3088
- )
3089
- ),
3090
- array(
3091
- 'id' => 'signin-button-text-color',
3092
- 'title' => __('Button Text Color', 'accelerated-mobile-pages'),
3093
- 'subtitle' => __('Choose the color for Button Texxt','accelerated-mobile-pages'),
3094
- 'type' => 'color_rgba',
3095
- 'default' => array(
3096
- 'rgba' => 'rgb(0, 0, 0)',
3097
- ),
3098
- 'required' => array(
3099
- array('signin-button-style','=',1)
3100
- )
3101
- ),
3102
- array(
3103
- 'id' => 'signin-button-border-color',
3104
- 'title' => __('Button Border Line Color', 'accelerated-mobile-pages'),
3105
- 'subtitle' => __('Choose the color for Button Border Line','accelerated-mobile-pages'),
3106
- 'type' => 'color_rgba',
3107
- 'default' => array(
3108
- 'rgba' => 'rgb(0, 0, 0)',
3109
- ),
3110
- 'required' => array(
3111
- array('signin-button-style','=',1)
3112
- )
3113
- ),
3114
- array(
3115
- 'id' => 'border-type',
3116
- 'title' => __('Border Type', 'amptechtheme'),
3117
- 'type' => 'select',
3118
- 'options'=> array(
3119
- '1' => 'Square',
3120
- '2' => 'Round',
3121
- '3' => 'Custom'
3122
- ),
3123
- 'default'=> '1',
3124
- 'required' => array( array('signin-button', '=' ,1) ),
3125
- ),
3126
- array(
3127
- 'id' => 'border-radius',
3128
- 'title' => __('Customize Border Radius', 'accelerated-mobile-pages'),
3129
- 'subtitle' => __('You can change the border radius','accelerated-mobile-pages'),
3130
- 'type' => 'text',
3131
- 'default' => '10',
3132
- 'required' => array(
3133
- array('border-type','=',3)
3134
- )
3135
- ),
3136
- array(
3137
- 'id' => 'ampforwp-amp-menu',
3138
- 'type' => 'switch',
3139
- 'title' => __('Navigation Menu', 'accelerated-mobile-pages'),
3140
- 'desc' => __( 'Add Menus to your AMP pages by clicking on this <a href="'.trailingslashit(get_admin_url()).'nav-menus.php?action=locations">link</a>' , 'accelerated-mobile-pages'),
3141
- 'subtitle' => __('Enable/Disable Menu from header', 'accelerated-mobile-pages'),
3142
- 'true' => 'true',
3143
- 'false' => 'false',
3144
- 'default' => 1,
3145
- 'required' => array(array('amp-design-selector', '!=' , '4')),
3146
-
3147
- ),
3148
- // Call Now button
3149
- array(
3150
- 'id' => 'ampforwp-callnow-button',
3151
- 'type' => 'switch',
3152
- 'title' => __('Call Now Button', 'accelerated-mobile-pages'),
3153
- 'true' => 'true',
3154
- 'false' => 'false',
3155
- 'required' => array(
3156
- array('amp-design-selector', '!=' , '1')
3157
- ),
3158
- 'default' => 0
3159
- ),
3160
- array(
3161
- 'id' =>'enable-amp-call-numberfield',
3162
- 'type' => 'text',
3163
- 'required' => array(
3164
- array('ampforwp-callnow-button', '=' , '1'),
3165
- array('amp-design-selector', '!=' , '1')
3166
- ),
3167
- 'title' => __('Enter Phone Number', 'accelerated-mobile-pages'),
3168
- 'default' => '',
3169
- ),
3170
- array(
3171
- 'id' =>'amp-on-off-support-for-non-amp-home-page',
3172
- 'type' => 'switch',
3173
- 'title' => __('Non-AMP HomePage link in Header and Logo', 'accelerated-mobile-pages'),
3174
- 'subtitle' => __('If you want users in header to go to non-AMP website from the Header', 'accelerated-mobile-pages'),
3175
- 'default' => 0,
3176
- ),
3177
- array(
3178
- 'id' => 'amp-opt-sticky-head',
3179
- 'type' => 'switch',
3180
- 'title' => __('Make Header UnSticky','accelerated-mobile-pages'),
3181
- 'required' => array(
3182
- array('amp-design-selector', '=' , '3')
3183
- ),
3184
- 'subtitle' => __('Turning it ON will remove the sticky head from the design.', 'accelerated-mobile-pages' ),
3185
- 'default' => '0'
3186
- ),
3187
- array(
3188
- 'id' => 'amp-design-3-search-feature',
3189
- 'type' => 'switch',
3190
- 'title' => __( 'Search', 'accelerated-mobile-pages' ),
3191
- 'required' => array(
3192
- array('amp-design-selector', '=' , '3')
3193
- ),
3194
- 'default' => '0'
3195
- ),
3196
-
3197
- array(
3198
- 'id' => 'amp-design-2-search-feature',
3199
- 'type' => 'switch',
3200
- 'title' => __( 'Search', 'accelerated-mobile-pages' ),
3201
- 'required' => array(
3202
- array('amp-design-selector', '=' , '2')
3203
- ),
3204
- 'default' => '0'
3205
- ),
3206
-
3207
- array(
3208
- 'id' => 'amp-design-1-search-feature',
3209
- 'type' => 'switch',
3210
- 'title' => __( 'Search', 'accelerated-mobile-pages' ),
3211
- 'required' => array(
3212
- array('amp-design-selector', '=' , '1')
3213
- ),
3214
- 'default' => '0'
3215
- ),
3216
- array(
3217
- 'id' => 'amp-swift-search-feature',
3218
- 'type' => 'switch',
3219
- 'title' => __( 'Search', 'accelerated-mobile-pages' ),
3220
- 'required' => array(
3221
- array('amp-design-selector', '=' , '4')
3222
- ),
3223
- 'default' => '1'
3224
- ),
3225
-
3226
- array(
3227
- 'id' => 'amp-opt-color-rgba-headercolor',
3228
- 'type' => 'color_rgba',
3229
- 'title' => __('Header Background','accelerated-mobile-pages'),
3230
- 'default' => array(
3231
- 'color' => '#FFFFFF',
3232
- ),
3233
- 'required' => array(
3234
- array('amp-design-selector', '=' , '3')
3235
- )
3236
- ),
3237
- array(
3238
- 'id' => 'amp-opt-color-rgba-headerelements',
3239
- 'type' => 'color_rgba',
3240
- 'title' => __('Header Elements','accelerated-mobile-pages'),
3241
- 'default' => array(
3242
- 'color' => ampforwp_get_element_default_color(),
3243
- ),
3244
- 'required' => array(
3245
- array('amp-design-selector', '=' , '3')
3246
- )
3247
- ),
3248
- // Tab 1 end
3249
- /* array(
3250
- 'id' => 'header-tab-1-end',
3251
- 'type' => 'section',
3252
- 'title' => __('Tab 1', 'accelerated-mobile-pages'),
3253
- 'end' => true,
3254
- /*'required' => array(
3255
- array('amp-design-selector', '=' , '4')
3256
- ),
3257
- ),*/
3258
- // Tab 2
3259
- array(
3260
- 'id' => 'header-tab-2',
3261
- 'type' => 'section',
3262
- 'title' => __('Advanced Header Options', 'accelerated-mobile-pages'),
3263
- 'indent' => true,
3264
- //'start' => true,
3265
- //'label' => 'Tab 2',
3266
- 'required' => array(
3267
- array('amp-design-selector', '=' , '4')
3268
- ),
3269
- ),
3270
- array(
3271
- 'id' => 'customize-options',
3272
- 'type' => 'switch',
3273
- 'title' => __('Advanced Header Design', 'accelerated-mobile-pages'),
3274
- 'default' => 0,
3275
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3276
- ),
3277
- array(
3278
- 'id' => 'swift-height-control',
3279
- 'type' => 'text',
3280
- 'title' => __('Header Height', 'accelerated-mobile-pages'),
3281
- 'default' => '60px',
3282
- 'required' => array(
3283
- array('customize-options','=',1)
3284
- )
3285
- ),
3286
- array(
3287
- 'id' => 'margin-padding-options',
3288
- 'type' => 'switch',
3289
- 'title' => __('Margin / Padding ', 'accelerated-mobile-pages'),
3290
- 'default' => 0,
3291
- 'required' => array(
3292
- array('customize-options','=',1)
3293
- )
3294
- ),
3295
- array(
3296
- 'id' => 'swift-padding-control',
3297
- 'type' => 'spacing',
3298
- 'output' => array('.header'),
3299
- 'mode' => 'padding',
3300
- 'units' => array('px'),
3301
- 'units_extended' => 'false',
3302
- 'title' => __('Padding', 'accelerated-mobile-pages'),
3303
- 'default' => array(
3304
- 'padding-top' => '0px',
3305
- 'padding-right' => '0px',
3306
- 'padding-bottom' => '0px',
3307
- 'padding-left' => '0px',
3308
- 'units' => 'px',
3309
- ),
3310
- 'required' => array(
3311
- array('margin-padding-options','=',1)
3312
- )
3313
- ),
3314
- array(
3315
- 'id' => 'swift-margin-control',
3316
- 'type' => 'spacing',
3317
- 'output' => array('.header'),
3318
- 'mode' => 'margin',
3319
- 'units' => array('px'),
3320
- 'units_extended' => 'false',
3321
- 'title' => __('Margin', 'accelerated-mobile-pages'),
3322
- 'default' => array(
3323
- 'margin-top' => '0px',
3324
- 'margin-right' => '0px',
3325
- 'margin-bottom' => '0px',
3326
- 'margin-left' => '0px',
3327
- 'units' => 'px',
3328
- ),
3329
- 'required' => array(
3330
- array('margin-padding-options','=',1)
3331
- )
3332
- ),
3333
- array(
3334
- 'id' => 'border-line',
3335
- 'type' => 'switch',
3336
- 'title' => __('Border and Boxshadow', 'accelerated-mobile-pages'),
3337
- 'default' => 0,
3338
- 'required' => array(
3339
- array('customize-options','=',1)
3340
- )
3341
- ),
3342
-
3343
- array(
3344
- 'id' => 'swift-border-line-control',
3345
- 'type' => 'text',
3346
- 'title' => __('Border', 'accelerated-mobile-pages'),
3347
- 'subtitle' => __('Border at the bottom', 'accelerated-mobile-pages'),
3348
- 'default' => '1',
3349
- 'required' => array(
3350
- array('border-line','=',1)
3351
- )
3352
- ),
3353
- array(
3354
- 'id' => 'swift-border-color-control',
3355
- 'type' => 'color_rgba',
3356
- 'title' => __('Border Color', 'accelerated-mobile-pages'),
3357
- 'default' => array(
3358
- 'rgba' => 'rgba(0,0,0,0.12)',
3359
- ),
3360
- 'required' => array(
3361
- array('border-line','=',1)
3362
- )
3363
- ),
3364
- array(
3365
- 'id' => 'swift-boxshadow-checkbox-control',
3366
- 'type' => 'switch',
3367
- 'title' => __('Box Shadow', 'accelerated-mobile-pages'),
3368
- 'default' => 0,
3369
- 'required' => array(
3370
- array('border-line','=',1)
3371
- )
3372
- ),
3373
-
3374
-
3375
- array(
3376
- 'id' => 'swift-background-scheme',
3377
- 'title' => __('Header Background', 'accelerated-mobile-pages'),
3378
- 'type' => 'color_rgba',
3379
- 'default' => array(
3380
- 'rgba' => 'rgba(255, 255, 255, 255)',
3381
- ),
3382
- 'required' => array(
3383
- array('customize-options','=',1)
3384
- )
3385
- ),
3386
- array(
3387
- 'id' => 'swift-header-overlay',
3388
- 'title' => __('Menu Background', 'accelerated-mobile-pages'),
3389
- 'type' => 'color_rgba',
3390
- 'default' => array(
3391
- 'rgba' => 'rgba(20, 20, 22, 0.9)',
3392
- ),
3393
- 'required' => array(
3394
- array('customize-options','=',1)
3395
- )
3396
- ),
3397
- array(
3398
- 'id' => 'swift-element-color-control',
3399
- 'title' => __('Header Elements', 'accelerated-mobile-pages'),
3400
- 'subtitle' => __('Color of the Text and Icons on top of Header','accelerated-mobile-pages'),
3401
- 'type' => 'color_rgba',
3402
- 'default' => array(
3403
- 'color' => '#333',
3404
- ),
3405
- 'required' => array(
3406
- array('customize-options','=',1)
3407
- )
3408
- ),
3409
- array(
3410
- 'id' => 'swift-element-overlay-color-control',
3411
- 'title' => __('Menu Elements', 'accelerated-mobile-pages'),
3412
- 'type' => 'color_rgba',
3413
- 'default' => array(
3414
- 'rgba' => 'rgba(255, 255, 255, 0.8)',
3415
- ),
3416
- 'required' => array(
3417
- array('customize-options','=',1)
3418
- )
3419
- ),
3420
-
3421
-
3422
- array(
3423
- 'id' => 'header-position-type',
3424
- 'title' => __('Menu Overlay Position', 'accelerated-mobile-pages'),
3425
- 'type' => 'select',
3426
- 'options'=> array(
3427
- '1' => 'Left',
3428
- '2' => 'Right'
3429
- ),
3430
- 'default'=> '1',
3431
- 'required' => array(
3432
- array('customize-options','=',1)
3433
- )
3434
- ),
3435
- array(
3436
- 'id' => 'header-overlay-width',
3437
- 'type' => 'text',
3438
- 'title' => __('Menu Overlay Width', 'accelerated-mobile-pages'),
3439
- 'default' => '90%',
3440
- 'required' => array(
3441
- array('customize-options','=',1)
3442
- )
3443
- ),
3444
- // Tab 2 end
3445
- /*array(
3446
- 'id' => 'header-tab-2-end',
3447
- 'type' => 'section',
3448
- 'title' => __('Tab 2', 'accelerated-mobile-pages'),
3449
- 'end' => true,
3450
- 'required' => array(
3451
- array('amp-design-selector', '=' , '4')
3452
- ),
3453
- ),*/
3454
-
3455
- )
3456
- )
3457
- );
3458
-
3459
-
3460
- //code for fetching ctegories to show as a list in redux settings
3461
- $categories = get_categories( array(
3462
- 'orderby' => 'name',
3463
- 'order' => 'ASC'
3464
- ) );
3465
- $categories_array = array();
3466
- if ( $categories ) :
3467
- foreach ($categories as $cat ) {
3468
- $cat_id = $cat->cat_ID;
3469
- $key = "".$cat_id;
3470
- //building assosiative array of ID-cat_name
3471
- $categories_array[ $key ] = $cat->name;
3472
- }
3473
- endif;
3474
- //End of code for fetching ctegories to show as a list in redux settings
3475
- $ampforwp_home_loop = array();
3476
- $ampforwp_home_loop = get_option('ampforwp_custom_post_types');
3477
- $ampforwp_home_loop['post'] = 'Posts';
3478
- unset($ampforwp_home_loop['page']);
3479
-
3480
- // HomePage Section
3481
- Redux::setSection( $opt_name, array(
3482
- 'title' => __( 'HomePage', 'accelerated-mobile-pages' ),
3483
- 'id' => 'amp-theme-homepage-settings',
3484
- 'subsection' => true,
3485
- 'fields' => array(
3486
- array(
3487
- 'id' => 'ampforwp-homepage-section-general',
3488
- 'type' => 'section',
3489
- 'title' => __('General', 'accelerated-mobile-pages'),
3490
- 'indent' => true,
3491
- ),
3492
- array(
3493
- 'id' => 'amp-design-3-featured-slider',
3494
- 'type' => 'switch',
3495
- 'title' => __( 'Featured Slider', 'accelerated-mobile-pages' ),
3496
- 'required' => array(
3497
- array('amp-design-selector', '=' , '3')
3498
- ),
3499
- 'default' => '1'
3500
- ),
3501
- array(
3502
- 'id' => 'amp-design-3-category-selector',
3503
- 'type' => 'select',
3504
- 'title' => __( 'Featured Slider Category', 'accelerated-mobile-pages' ),
3505
- 'options' => $categories_array,
3506
- 'required' => array(
3507
- array('amp-design-selector', '=' , '3'),
3508
- array('amp-design-3-featured-slider', '=' , '1')
3509
- ),
3510
- ),
3511
- // Excerpt Length for design1 #1013
3512
- array(
3513
-
3514
- 'id' => 'excerpt-option-design-1',
3515
- 'type' => 'switch',
3516
- 'title' => __('Excerpt', 'accelerated-mobile-pages'),
3517
- 'default' => '1',
3518
- 'required' => array(
3519
- array('amp-design-selector', '=' , '1'),
3520
- )
3521
- ),
3522
- array(
3523
- 'id' =>'amp-design-1-excerpt',
3524
- 'type' =>'text',
3525
- 'subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
3526
- 'title' =>__('Excerpt Length','accelerated-mobile-pages'),
3527
- 'required' => array(
3528
- array('amp-design-selector', '=' , '1'),
3529
- array('excerpt-option-design-1', '=' , '1'),
3530
- ),
3531
- 'validate' =>'numeric',
3532
- 'default' =>'20',
3533
- ),
3534
- array(
3535
- 'id' => 'ampforwp-design1-cats-home',
3536
- 'type' => 'switch',
3537
- 'title' => __('Category label', 'accelerated-mobile-pages'),
3538
- 'default' => '0',
3539
- 'required' => array(
3540
- array('amp-design-selector', '=' , '1'),
3541
- )
3542
- ),
3543
-
3544
- // Excerpt Length for design2 #1122
3545
- array(
3546
-
3547
- 'id' => 'excerpt-option-design-2',
3548
- 'type' => 'switch',
3549
- 'title' => __('Excerpt on Small Screens', 'accelerated-mobile-pages'),
3550
- 'default' => '0',
3551
- 'required' => array(
3552
- array('amp-design-selector', '=' , '2'),
3553
- )
3554
- ),
3555
- array(
3556
- 'id' =>'amp-design-2-excerpt',
3557
- 'type' =>'text',
3558
- 'subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
3559
- 'title' =>__('Excerpt Length','accelerated-mobile-pages'),
3560
- 'required' => array(
3561
- array('amp-design-selector', '=' , '2'),
3562
- array('excerpt-option-design-2', '=' , '1'),
3563
- ),
3564
- 'validate' =>'numeric',
3565
- 'default' =>'20',
3566
- ),
3567
-
3568
- // Excerpt Length for design3 #1122
3569
- array(
3570
- 'id' => 'excerpt-option-design-3',
3571
- 'type' => 'switch',
3572
- 'title' => __('Excerpt on Small Screens', 'accelerated-mobile-pages'),
3573
- 'default' => '0',
3574
- 'required' => array(
3575
- array('amp-design-selector', '=' , '3'),
3576
- )
3577
- ),
3578
- array(
3579
- 'id' =>'amp-design-3-excerpt',
3580
- 'type' =>'text',
3581
- 'subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
3582
- 'title' =>__('Excerpt Length','accelerated-mobile-pages'),
3583
- 'required' => array(
3584
- array('amp-design-selector', '=' , '3'),
3585
- array('excerpt-option-design-3', '=' , '1'),
3586
- ),
3587
- 'validate' =>'numeric',
3588
- 'default' =>'20',
3589
- ),
3590
-
3591
- // Featured Time
3592
- array(
3593
- 'id' =>'amp-design-1-featured-time',
3594
- 'type' =>'switch',
3595
- 'title' =>__('Published Time','accelerated-mobile-pages'),
3596
- 'subtitle' => __('Display published time of the post on homepage', 'accelerated-mobile-pages'),
3597
- 'required' => array(array('amp-design-selector', '=' , '1') ),
3598
- 'default' =>'1',
3599
- ),
3600
-
3601
- array(
3602
- 'id' =>'amp-design-3-featured-time',
3603
- 'type' =>'switch',
3604
- 'title' =>__('Published Time','accelerated-mobile-pages'),
3605
- 'subtitle' => __('Display published time of the post on homepage', 'accelerated-mobile-pages'),
3606
- 'required' => array(array('amp-design-selector', '=' , '3') ),
3607
- 'default' =>'1',
3608
- ),
3609
-
3610
- // Homepage thumbnail
3611
- array(
3612
- 'id' => 'ampforwp-homepage-posts-image-modify-size',
3613
- 'type' => 'switch',
3614
- 'title' => __('Override Homepage Thumbnail Size', 'accelerated-mobile-pages'),
3615
- 'required' => array( array( 'amp-design-selector','!=',3 ) ),
3616
- 'default' => 0,
3617
- ),
3618
- array(
3619
- 'id' => 'ampforwp-homepage-posts-design-1-2-width',
3620
- 'type' => 'text',
3621
- 'title' => __('Image Width', 'accelerated-mobile-pages'),
3622
- 'subtitle' => __('Defaults to 100', 'accelerated-mobile-pages'),
3623
- 'default' => 100,
3624
- 'required' => array(
3625
- array('amp-design-selector','!=',3),
3626
- array('amp-design-selector','!=',4),
3627
- array('ampforwp-homepage-posts-image-modify-size','=',1)
3628
- )
3629
- ),
3630
- array(
3631
- 'id' => 'ampforwp-homepage-posts-design-1-2-height',
3632
- 'type' => 'text',
3633
- 'title' => __('Image Height', 'accelerated-mobile-pages'),
3634
- 'subtitle' => __('Defaults to 75', 'accelerated-mobile-pages'),
3635
- 'default' => 75,
3636
- 'required' => array(
3637
- array('amp-design-selector','!=',3),
3638
- array('amp-design-selector','!=',4),
3639
- array('ampforwp-homepage-posts-image-modify-size','=',1)
3640
- )
3641
- ),
3642
- array(
3643
- 'id' => 'ampforwp-swift-homepage-posts-width',
3644
- 'type' => 'text',
3645
- 'title' => __('Image Width', 'accelerated-mobile-pages'),
3646
- 'subtitle' => __('Defaults to 346', 'accelerated-mobile-pages'),
3647
- 'default' => 346,
3648
- 'required' => array(
3649
- array('amp-design-selector','=',4),
3650
- array('ampforwp-homepage-posts-image-modify-size','=',1)
3651
- )
3652
- ),
3653
- array(
3654
- 'id' => 'ampforwp-swift-homepage-posts-height',
3655
- 'type' => 'text',
3656
- 'title' => __('Image Height', 'accelerated-mobile-pages'),
3657
- 'subtitle' => __('Defaults to 188', 'accelerated-mobile-pages'),
3658
- 'default' => 188,
3659
- 'required' => array(
3660
- array('amp-design-selector','=',4),
3661
- array('ampforwp-homepage-posts-image-modify-size','=',1)
3662
- )
3663
- ),
3664
- array(
3665
- 'id' => 'ampforwp-homepage-section-loop',
3666
- 'type' => 'section',
3667
- 'title' => __('Loop Display Controls', 'accelerated-mobile-pages'),
3668
- 'indent' => true,
3669
- ),
3670
- array(
3671
- 'id' => 'ampforwp-homepage-loop-type',
3672
- 'type' => 'select',
3673
- 'title' => __( 'Post Type in Loop', 'accelerated-mobile-pages' ),
3674
- 'options' => $ampforwp_home_loop,
3675
- 'default' => 'post',
3676
- ),
3677
- array(
3678
- 'id' => 'ampforwp-homepage-loop-cats',
3679
- 'type' => 'select',
3680
- 'title' => __( 'Exclude Categories', 'accelerated-mobile-pages' ),
3681
- 'data' => 'categories',
3682
- 'multi' => true
3683
- ),
3684
-
3685
- )
3686
- ));
3687
-
3688
- // Single Section
3689
- Redux::setSection( $opt_name, array(
3690
- 'title' => __( 'Single', 'accelerated-mobile-pages' ),
3691
- // 'desc' => __( 'Additional Options to control the look of Single <a href="' . esc_url(admin_url('customize.php?autofocus[section]=amp_design&customize_amp=1')) .'"> Click here </a> ', 'accelerated-mobile-pages' ),
3692
- 'id' => 'amp-single',
3693
- 'subsection' => true,
3694
- 'fields' => array(
3695
- // Swift
3696
- array(
3697
- 'id' => 'single-design-type',
3698
- 'title' => __('Single Design', 'accelerated-mobile-pages'),
3699
- 'type' => 'image_select',
3700
- 'options'=> array(
3701
- '1' => array(
3702
- 'alt'=>' Single Design 1 ',
3703
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/head-1.png'
3704
- ),
3705
-
3706
- ),
3707
- 'default'=> '1',
3708
- // 'max-width' => 200,
3709
- // 'max-height'=> 60,
3710
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3711
- ),
3712
- array(
3713
- 'id' => 'swift-date',
3714
- 'type' => 'switch',
3715
- 'title' => __('Published Date', 'accelerated-mobile-pages'),
3716
- 'default' => 1,
3717
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3718
- ),
3719
- //Breadcrumb ON/OFF
3720
- array(
3721
- 'id' => 'ampforwp-bread-crumb',
3722
- 'type' => 'switch',
3723
- 'default' => '1',
3724
- 'title' => __('Breadcrumbs', 'accelerated-mobile-pages'),
3725
- ),
3726
- //Categories ON/OFF
3727
- array(
3728
- 'id' => 'ampforwp-cats-single',
3729
- 'type' => 'switch',
3730
- 'default' => '1',
3731
- 'title' => __('Categories', 'accelerated-mobile-pages'),
3732
- 'subtitle' => __('Enable or Disable Categories in Single', 'accelerated-mobile-pages'),
3733
- 'required' => array( array('amp-design-selector', '!=' , '4') )
3734
- ),
3735
- //Tags ON/OFF
3736
- array(
3737
- 'id' => 'ampforwp-tags-single',
3738
- 'type' => 'switch',
3739
- 'default' => '1',
3740
- 'title' => __('Tags', 'accelerated-mobile-pages'),
3741
- ),
3742
- //Categories and Tags Links
3743
- array(
3744
- 'id' => 'ampforwp-cats-tags-links-single',
3745
- 'type' => 'switch',
3746
- 'default' => '1',
3747
- 'title' => __('Categories & Tags Links', 'accelerated-mobile-pages'),
3748
- 'required' => array('ampforwp-archive-support', '=' , '1'),
3749
- ),
3750
- // Social Icons ON/OFF
3751
- array(
3752
- 'id' => 'enable-single-social-icons',
3753
- 'type' => 'switch',
3754
- 'title' => __('Sticky Social Icons', 'accelerated-mobile-pages'),
3755
- 'default' => 1,
3756
- ),
3757
- // Excerpt ON/OFF
3758
- array(
3759
- 'id' => 'enable-excerpt-single',
3760
- 'type' => 'switch',
3761
- 'title' => __('Excerpt', 'accelerated-mobile-pages'),
3762
- 'default' => 0,
3763
- 'subtitle' => __('Excerpt will be displayed above content', 'accelerated-mobile-pages'),
3764
- ),
3765
- //deselectable next previous links
3766
- array(
3767
- 'id' => 'enable-single-next-prev',
3768
- 'type' => 'switch',
3769
- 'title' => __('Next-Previous Links', 'accelerated-mobile-pages'),
3770
- 'default' => 1,
3771
- ),
3772
- // Author Bio
3773
- array(
3774
- 'id' => 'amp-author-description',
3775
- 'type' => 'switch',
3776
- 'title' => __( 'Author Bio', 'accelerated-mobile-pages' ),
3777
- 'default' => '1',
3778
- ),
3779
- // Author Pages
3780
- array(
3781
- 'id' => 'ampforwp-author-page-url',
3782
- 'type' => 'switch',
3783
- 'title' => __( 'Link to Author Pages', 'accelerated-mobile-pages' ),
3784
- 'default' => '0',
3785
- ),
3786
- // Pagination //#1015
3787
- array(
3788
- 'id' => 'amp-pagination',
3789
- 'type' => 'switch',
3790
- 'title' => __( 'Post Pagination', 'accelerated-mobile-pages' ),
3791
- 'default' => 1,
3792
- 'subtitle' => __('Enable the feature to add Pagination in single', 'accelerated-mobile-pages'),
3793
- ),
3794
- array(
3795
- 'id' => 'ampforwp-pagination-select',
3796
- 'type' => 'select',
3797
- 'title' => __('Post Pagination Type', 'accelerated-mobile-pages'),
3798
- 'options' => array(
3799
- '1' => 'Numbering',
3800
- '2' => 'Next-Previous',
3801
- ),
3802
- 'default' => '1',
3803
- 'required' => array('amp-pagination' , '=' , '1'),
3804
- ),
3805
- // Related Post
3806
- array(
3807
- 'id' => 'ampforwp-single-select-type-of-related',
3808
- 'type' => 'select',
3809
- 'title' => __('Related Post by', 'accelerated-mobile-pages'),
3810
- 'data' => 'page',
3811
- 'subtitle' => __('select the type of related posts', 'accelerated-mobile-pages'),
3812
- 'options' => array(
3813
- '1' => 'Tags',
3814
- '2' => 'Categories',
3815
- ),
3816
- 'default' => '2',
3817
- ),
3818
- array(
3819
- 'id' => 'ampforwp-single-related-posts-image',
3820
- 'type' => 'switch',
3821
- 'title' => __('Image in Related Post', 'accelerated-mobile-pages'),
3822
- 'default' => 1,
3823
- ),
3824
- array(
3825
- 'id' => 'ampforwp-single-related-posts-excerpt',
3826
- 'type' => 'switch',
3827
- 'title' => __('Excerpt in Related Post', 'accelerated-mobile-pages'),
3828
- 'default' => 1,
3829
- ),
3830
- array(
3831
- 'id' => 'ampforwp-single-order-of-related-posts',
3832
- 'type' => 'switch',
3833
- 'title' => __('Sort Related Posts Randomly', 'accelerated-mobile-pages'),
3834
- 'default' => 0,
3835
- ),
3836
- array(
3837
- 'id' => 'ampforwp-number-of-related-posts',
3838
- 'type' => 'text',
3839
- 'title' => __('Number of Related Post', 'accelerated-mobile-pages'),
3840
- 'validate' => 'numeric',
3841
- 'default' => '3',
3842
- ),
3843
- array(
3844
- 'id' => 'ampforwp-inline-related-posts',
3845
- 'type' => 'switch',
3846
- 'title' => __('In-Content Related Post', 'accelerated-mobile-pages'),
3847
- 'subtitle' => __('Insert Related Posts between the content', 'accelerated-mobile-pages'),
3848
- 'default' => 0,
3849
- ),
3850
- array(
3851
- 'id' => 'ampforwp-inline-related-posts-type',
3852
- 'type' => 'select',
3853
- 'title' => __('In-content Related Post by', 'accelerated-mobile-pages'),
3854
- 'data' => 'page',
3855
- 'options' => array(
3856
- '1' => 'Tags',
3857
- '2' => 'Categories',
3858
- ),
3859
- 'default' => '2',
3860
- 'required' => array( array('ampforwp-inline-related-posts', '=' , '1') ),
3861
-
3862
- ),
3863
- array(
3864
- 'id' => 'ampforwp-inline-related-posts-order',
3865
- 'type' => 'switch',
3866
- 'title' => __('Sort Related Posts Randomly', 'accelerated-mobile-pages'),
3867
- 'default' => 0,
3868
- 'required' => array( array('ampforwp-inline-related-posts', '=' , '1') ),
3869
- ),
3870
- array(
3871
- 'id' => 'ampforwp-number-of-inline-related-posts',
3872
- 'type' => 'text',
3873
- 'title' => __('Number of In-Content Related Post', 'accelerated-mobile-pages'),
3874
- 'validate' => 'numeric',
3875
- 'default' => '3',
3876
- 'required' => array( array('ampforwp-inline-related-posts', '=' , '1') ),
3877
- ),
3878
-
3879
- // array(
3880
- // 'id' => 'ampforwp-comments-banner',
3881
- // 'type' => 'select',
3882
- // 'desc' => $comment_desc,
3883
- // 'title' => __(' df', 'accelerated-mobile-pages'),
3884
- // 'class' => 'new-class',
3885
- //
3886
- // // 'desc' => ' <br /><a href="' . esc_url(admin_url('customize.php?autofocus[section]=amp_design&customize_amp=1')) .'" target="_blank"><img class="ampforwp-post-builder-img" src="'.AMPFORWP_IMAGE_DIR . '/amp-post-builder.png" width="489" height="72" /></a>',
3887
- // ),
3888
- //
3889
- $fields = array(
3890
- 'id' => 'info_normal',
3891
- 'type' => 'info',
3892
- 'class' => 'extension_banner_bg',
3893
- 'desc' => $single_extension_listing )
3894
-
3895
- ),
3896
-
3897
- ) );
3898
-
3899
- // Footer Section
3900
- Redux::setSection( $opt_name, array(
3901
- 'title' => __( 'Footer', 'accelerated-mobile-pages' ),
3902
- 'id' => 'amp-theme-footer-settings',
3903
- 'subsection' => true,
3904
- 'fields' => array(
3905
- // Swift
3906
- array(
3907
- 'id' => 'swift-menu',
3908
- 'type' => 'switch',
3909
- 'title' => __('Menu', 'accelerated-mobile-pages'),
3910
- 'default' => 1,
3911
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3912
- 'desc' => __( 'Add Menus to your AMP pages by clicking on this <a href="'.trailingslashit(get_admin_url()).'nav-menus.php?action=locations">link</a>' , 'accelerated-mobile-pages'),
3913
- ),
3914
- array(
3915
- 'id' => 'amp-footer-link-non-amp-page',
3916
- 'type' => 'switch',
3917
- 'title' => __('Link to Non-AMP page in Footer', 'accelerated-mobile-pages'),
3918
- 'true' => 'true',
3919
- 'false' => 'false',
3920
- 'default' => 1
3921
- ),
3922
-
3923
- array(
3924
- 'id' => 'ampforwp-footer-top',
3925
- 'type' => 'switch',
3926
- 'title' => __('Back to Top link', 'accelerated-mobile-pages'),
3927
- 'true' => 'true',
3928
- 'false' => 'false',
3929
- 'default' => 1,
3930
- 'required' => array(
3931
- array('amp-design-selector', '!=' , '3')
3932
- )
3933
- ),
3934
- array(
3935
- 'id' => 'footer-type',
3936
- 'title' => __('Footer Type', 'accelerated-mobile-pages'),
3937
- 'type' => 'image_select',
3938
- 'options'=> array(
3939
- '1' => array(
3940
- 'alt'=>' Footer Design 1 ',
3941
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/footer-1.png'
3942
- ),
3943
- ),
3944
- 'default'=> '1',
3945
- // 'max-width' => 200,
3946
- // 'max-height'=> 60,
3947
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3948
- ),
3949
- array(
3950
- 'id' => 'ampforwp-footer-top-design3',
3951
- 'type' => 'switch',
3952
- 'title' => __('Back to Top link', 'accelerated-mobile-pages'),
3953
- 'subtitle' => __('Enable / Disable Link to top of the page in the footer', 'accelerated-mobile-pages'),
3954
- 'true' => 'true',
3955
- 'false' => 'false',
3956
- 'default' => 0,
3957
- 'required' => array( array( 'amp-design-selector', '=' , '3' ) )
3958
- ),
3959
-
3960
- array(
3961
- 'id' => 'amp-design-3-credit-link',
3962
- 'type' => 'switch',
3963
- 'title' => __( 'Credit link', 'accelerated-mobile-pages' ),
3964
- 'required' => array(
3965
- array('amp-design-selector', '=' , '3')
3966
- ),
3967
- 'default' => '1'
3968
- ),
3969
- array(
3970
- 'id' => 'ampforwp-nofollow-view-nonamp',
3971
- 'type' => 'switch',
3972
- 'title' => __('Make "View Non-AMP" link nofollow', 'accelerated-mobile-pages'),
3973
- 'default' => 0
3974
- ),
3975
- )
3976
- ));
3977
-
3978
- // Page Section
3979
- Redux::setSection( $opt_name, array(
3980
- 'title' => __( 'Page', 'accelerated-mobile-pages' ),
3981
- 'id' => 'amp-theme-page-settings',
3982
- 'subsection' => true,
3983
- 'fields' => array(
3984
- /* // Pages Separator
3985
- array(
3986
- 'id' => 'Page',
3987
- 'type' => 'section',
3988
- 'title' => __('Pages', 'accelerated-mobile-pages'),
3989
- 'indent' => true,
3990
- ),*/
3991
- // Meta ON/OFF Pages
3992
- array(
3993
- 'id' => 'meta_page',
3994
- 'type' => 'switch',
3995
- 'default' => '0',
3996
- 'title' => __('Meta Information', 'accelerated-mobile-pages'),
3997
- ),
3998
- array(
3999
- 'id' => 'ampforwp_subpages_list',
4000
- 'type' => 'switch',
4001
- 'default' => '0',
4002
- 'title' => __('Subpages/ChildPages', 'accelerated-mobile-pages'),
4003
- 'subtitle' => __('Shows a List of Subpages'),
4004
- ),
4005
- )
4006
- ));
4007
-
4008
- // Social Section
4009
- Redux::setSection( $opt_name, array(
4010
- 'title' => __( 'Social', 'accelerated-mobile-pages' ),
4011
- 'id' => 'amp-social',
4012
- 'desc' => __('All the Social sharing and the social profile related settings are here','accelerated-mobile-pages'),
4013
- 'subsection' => true,
4014
- 'fields' => array(
4015
- // Facebook Like
4016
- array(
4017
- 'id' => 'ampforwp-facebook-like-button',
4018
- 'type' => 'switch',
4019
- 'title' => __('Facebook Like Button', 'accelerated-mobile-pages'),
4020
- 'default' => 0,
4021
- ),
4022
- // Facebook ON/OFF
4023
- array(
4024
- 'id' => 'enable-single-facebook-share',
4025
- 'type' => 'switch',
4026
- //'required' => array('enable-single-social-icons', '=' , '1'),
4027
- 'title' => __('Facebook', 'accelerated-mobile-pages'),
4028
- 'default' => 0,
4029
- ),
4030
- // Facebook app ID
4031
- array(
4032
- 'id' => 'amp-facebook-app-id',
4033
- 'title' => __('Facebook App ID', 'accelerated-mobile-pages'),
4034
- 'subtitle' => __('In order to use Facebook share you need to register an app ID, you can register one here: https://developers.facebook.com/apps.', 'accelerated-mobile-pages'),
4035
- 'type' => 'text',
4036
- 'required' => array('enable-single-facebook-share', '=' , '1'),
4037
- 'placeholder' => __('Enter your facebook app id','accelerated-mobile-pages'),
4038
- 'default' => ''
4039
- ),
4040
- // Twitter ON/OFF
4041
- array(
4042
- 'id' => 'enable-single-twitter-share',
4043
- 'type' => 'switch',
4044
- 'title' => __('Twitter', 'accelerated-mobile-pages'),
4045
- 'default' => 1,
4046
- ),
4047
- array(
4048
- 'id' => 'enable-single-twitter-share-handle',
4049
- 'type' => 'text',
4050
- 'title' => __('Twitter Handle', 'accelerated-mobile-pages'),
4051
- 'required' => array('enable-single-twitter-share', '=' , '1'),
4052
- 'placeholder' => __('Eg: @xyx','accelerated-mobile-pages'),
4053
- 'default' => '',
4054
- ),
4055
- array(
4056
- 'id' => 'enable-single-twitter-share-link',
4057
- 'type' => 'switch',
4058
- 'title' => __('Pretty Permalinks for Twitter Share?', 'accelerated-mobile-pages'),
4059
- 'subtitle' => __('Enable this to have pretty links for twitter sharing'),
4060
- 'default' => 0,
4061
- 'required' => array('enable-single-twitter-share', '=' , '1'),
4062
- ),
4063
- // GooglePlus ON/OFF
4064
- array(
4065
- 'id' => 'enable-single-gplus-share',
4066
- 'type' => 'switch',
4067
- 'title' => __('GooglePlus', 'accelerated-mobile-pages'),
4068
- 'default' => 1,
4069
- ),
4070
- // Email ON/OFF
4071
- array(
4072
- 'id' => 'enable-single-email-share',
4073
- 'type' => 'switch',
4074
- 'title' => __('Email', 'accelerated-mobile-pages'),
4075
- 'default' => 1,
4076
- ),
4077
- // Pinterest ON/OFF
4078
- array(
4079
- 'id' => 'enable-single-pinterest-share',
4080
- 'type' => 'switch',
4081
- 'title' => __('Pinterest', 'accelerated-mobile-pages'),
4082
- 'default' => 1,
4083
- ),
4084
- // LinkedIn ON/OFF
4085
- array(
4086
- 'id' => 'enable-single-linkedin-share',
4087
- 'type' => 'switch',
4088
- 'title' => __('LinkedIn', 'accelerated-mobile-pages'),
4089
- 'default' => 1,
4090
- ),
4091
- // WhatsApp
4092
- array(
4093
- 'id' => 'enable-single-whatsapp-share',
4094
- 'type' => 'switch',
4095
- 'title' => __('WhatsApp', 'accelerated-mobile-pages'),
4096
- 'default' => 1,
4097
- ),
4098
- // LINE
4099
- array(
4100
- 'id' => 'enable-single-line-share',
4101
- 'type' => 'switch',
4102
- 'title' => __('Line', 'accelerated-mobile-pages'),
4103
- 'default' => 1,
4104
- ),
4105
- // VKontakte
4106
- array(
4107
- 'id' => 'enable-single-vk-share',
4108
- 'type' => 'switch',
4109
- 'title' => __('VKontakte', 'accelerated-mobile-pages'),
4110
- 'default' => 0,
4111
- ),
4112
- // Odnoklassniki
4113
- array(
4114
- 'id' => 'enable-single-odnoklassniki-share',
4115
- 'type' => 'switch',
4116
- 'title' => __('Odnoklassniki', 'accelerated-mobile-pages'),
4117
- 'default' => 0,
4118
- ),
4119
- // Reddit
4120
- array(
4121
- 'id' => 'enable-single-reddit-share',
4122
- 'type' => 'switch',
4123
- 'title' => __('Reddit', 'accelerated-mobile-pages'),
4124
- 'default' => 0,
4125
- ),
4126
- // Tumblr
4127
- array(
4128
- 'id' => 'enable-single-tumblr-share',
4129
- 'type' => 'switch',
4130
- 'title' => __('Tumblr', 'accelerated-mobile-pages'),
4131
- 'default' => 0,
4132
- ),
4133
- // Telegram
4134
- array(
4135
- 'id' => 'enable-single-telegram-share',
4136
- 'type' => 'switch',
4137
- 'title' => __('Telegram', 'accelerated-mobile-pages'),
4138
- 'default' => 0,
4139
- ),
4140
- // Digg
4141
- array(
4142
- 'id' => 'enable-single-digg-share',
4143
- 'type' => 'switch',
4144
- 'title' => __('Digg', 'accelerated-mobile-pages'),
4145
- 'default' => 0,
4146
- ),
4147
- // StumbleUpon
4148
- array(
4149
- 'id' => 'enable-single-stumbleupon-share',
4150
- 'type' => 'switch',
4151
- 'title' => __('StumbleUpon', 'accelerated-mobile-pages'),
4152
- 'default' => 0,
4153
- ),
4154
- // Wechat
4155
- array(
4156
- 'id' => 'enable-single-wechat-share',
4157
- 'type' => 'switch',
4158
- 'title' => __('Wechat', 'accelerated-mobile-pages'),
4159
- 'default' => 0,
4160
- ),
4161
- // Viber
4162
- array(
4163
- 'id' => 'enable-single-viber-share',
4164
- 'type' => 'switch',
4165
- 'title' => __('Viber', 'accelerated-mobile-pages'),
4166
- 'default' => 0,
4167
- ),
4168
- array(
4169
- 'id' => 'social-media-profiles-subsection',
4170
- 'type' => 'section',
4171
- 'title' => __('Social Media Profiles (Design #3)', 'accelerated-mobile-pages'),
4172
- 'subtitle' => __('Please enter your personal/organizational social media profiles here', 'accelerated-mobile-pages'),
4173
- 'indent' => true,
4174
- 'required' => array(
4175
- array('amp-design-selector', '=' , '3')
4176
- ),
4177
- ),
4178
- //#1
4179
- array(
4180
- 'id' => 'enable-single-twittter-profile',
4181
- 'type' => 'switch',
4182
- 'title' => __('Twitter ', 'accelerated-mobile-pages'),
4183
- 'default' => 1,
4184
- 'required' => array(
4185
- array('amp-design-selector', '=' , '3')
4186
- ),
4187
- ),
4188
- array(
4189
- 'id' => 'enable-single-twittter-profile-url',
4190
- 'type' => 'text',
4191
- 'title' => __('Twitter URL', 'accelerated-mobile-pages'),
4192
- 'default' => '#',
4193
- 'required' => array(
4194
- array('amp-design-selector', '=' , '3'),
4195
- array('enable-single-twittter-profile', '=' , '1')
4196
- ),
4197
- ),
4198
- //#2
4199
- array(
4200
- 'id' => 'enable-single-facebook-profile',
4201
- 'type' => 'switch',
4202
- 'title' => __('Facebook ', 'accelerated-mobile-pages'),
4203
- 'default' => 1,
4204
- 'required' => array(
4205
- array('amp-design-selector', '=' , '3')
4206
- ),
4207
- ),
4208
- array(
4209
- 'id' => 'enable-single-facebook-profile-url',
4210
- 'type' => 'text',
4211
- 'title' => __('Facebook URL', 'accelerated-mobile-pages'),
4212
- 'default' => '#',
4213
- 'required' => array(
4214
- array('amp-design-selector', '=' , '3'),
4215
- array('enable-single-facebook-profile', '=' , '1')
4216
- ),
4217
- ),
4218
- //#3
4219
- array(
4220
- 'id' => 'enable-single-pintrest-profile',
4221
- 'type' => 'switch',
4222
- 'title' => __('Pintrest ', 'accelerated-mobile-pages'),
4223
- 'default' => 1,
4224
- 'required' => array(
4225
- array('amp-design-selector', '=' , '3')
4226
- ),
4227
- ),
4228
- array(
4229
- 'id' => 'enable-single-pintrest-profile-url',
4230
- 'type' => 'text',
4231
- 'title' => __('Pintrest URL', 'accelerated-mobile-pages'),
4232
- 'default' => '#',
4233
- 'required' => array(
4234
- array('amp-design-selector', '=' , '3'),
4235
- array('enable-single-pintrest-profile', '=' , '1')
4236
- ),
4237
- ),
4238
- //#4
4239
- array(
4240
- 'id' => 'enable-single-google-plus-profile',
4241
- 'type' => 'switch',
4242
- 'title' => __('Google Plus ', 'accelerated-mobile-pages'),
4243
- 'default' => 0,
4244
- 'required' => array(
4245
- array('amp-design-selector', '=' , '3')
4246
- ),
4247
- ),
4248
- array(
4249
- 'id' => 'enable-single-google-plus-profile-url',
4250
- 'type' => 'text',
4251
- 'title' => __('Google Plus URL', 'accelerated-mobile-pages'),
4252
- 'default' => '',
4253
- 'required' => array(
4254
- array('amp-design-selector', '=' , '3'),
4255
- array('enable-single-google-plus-profile', '=' , '1')
4256
- ),
4257
- ),
4258
- //#5
4259
- array(
4260
- 'id' => 'enable-single-linkdin-profile',
4261
- 'type' => 'switch',
4262
- 'title' => __('LinkedIn', 'accelerated-mobile-pages'),
4263
- 'default' => 0,
4264
- 'required' => array(
4265
- array('amp-design-selector', '=' , '3')
4266
- ),
4267
- ),
4268
- array(
4269
- 'id' => 'enable-single-linkdin-profile-url',
4270
- 'type' => 'text',
4271
- 'title' => __('LinkedIn URL', 'accelerated-mobile-pages'),
4272
- 'default' => '',
4273
- 'required' => array(
4274
- array('amp-design-selector', '=' , '3'),
4275
- array('enable-single-linkdin-profile', '=' , '1')
4276
- ),
4277
- ),
4278
- //#6
4279
- array(
4280
- 'id' => 'enable-single-youtube-profile',
4281
- 'type' => 'switch',
4282
- 'title' => __('Youtube ', 'accelerated-mobile-pages'),
4283
- 'default' => 1,
4284
- 'required' => array(
4285
- array('amp-design-selector', '=' , '3')
4286
- ),
4287
- ),
4288
- array(
4289
- 'id' => 'enable-single-youtube-profile-url',
4290
- 'type' => 'text',
4291
- 'default' => '#',
4292
- 'title' => __('Youtube URL', 'accelerated-mobile-pages'),
4293
- 'required' => array(
4294
- array('amp-design-selector', '=' , '3'),
4295
- array('enable-single-youtube-profile', '=' , '1')
4296
- ),
4297
- ),
4298
- //#7
4299
- array(
4300
- 'id' => 'enable-single-instagram-profile',
4301
- 'type' => 'switch',
4302
- 'title' => __('Instagram ', 'accelerated-mobile-pages'),
4303
- 'default' => 0,
4304
- 'required' => array(
4305
- array('amp-design-selector', '=' , '3')
4306
- ),
4307
- ),
4308
- array(
4309
- 'id' => 'enable-single-instagram-profile-url',
4310
- 'type' => 'text',
4311
- 'default' => '',
4312
- 'title' => __('Instagram URL', 'accelerated-mobile-pages'),
4313
- 'required' => array(
4314
- array('amp-design-selector', '=' , '3'),
4315
- array('enable-single-instagram-profile', '=' , '1')
4316
- ),
4317
- ),
4318
- //#8
4319
- array(
4320
- 'id' => 'enable-single-VKontakte-profile',
4321
- 'type' => 'switch',
4322
- 'title' => __('VKontakte ', 'accelerated-mobile-pages'),
4323
- 'default' => 0,
4324
- 'required' => array(
4325
- array('amp-design-selector', '=' , '3')
4326
- ),
4327
- ),
4328
- array(
4329
- 'id' => 'enable-single-VKontakte-profile-url',
4330
- 'type' => 'text',
4331
- 'default' => '',
4332
- 'title' => __('VKontakte URL', 'accelerated-mobile-pages'),
4333
- 'required' => array(
4334
- array('amp-design-selector', '=' , '3'),
4335
- array('enable-single-VKontakte-profile', '=' , '1')
4336
- ),
4337
- ),
4338
- //#9
4339
- //removed whatsapp
4340
- //#10
4341
- array(
4342
- 'id' => 'enable-single-reddit-profile',
4343
- 'type' => 'switch',
4344
- 'title' => __('Reddit', 'accelerated-mobile-pages'),
4345
- 'default' => 0,
4346
- 'required' => array(
4347
- array('amp-design-selector', '=' , '3')
4348
- ),
4349
- ),
4350
- array(
4351
- 'id' => 'enable-single-reddit-profile-url',
4352
- 'type' => 'text',
4353
- 'title' => __('Reddit URL', 'accelerated-mobile-pages'),
4354
- 'default' => '',
4355
- 'required' => array(
4356
- array('amp-design-selector', '=' , '3'),
4357
- array('enable-single-reddit-profile', '=' , '1')
4358
- ),
4359
- ),
4360
- //#11
4361
- array(
4362
- 'id' => 'enable-single-snapchat-profile',
4363
- 'type' => 'switch',
4364
- 'title' => __('Snapchat ', 'accelerated-mobile-pages'),
4365
- 'default' => 0,
4366
- 'required' => array(
4367
- array('amp-design-selector', '=' , '3')
4368
- ),
4369
- ),
4370
- array(
4371
- 'id' => 'enable-single-snapchat-profile-url',
4372
- 'type' => 'text',
4373
- 'title' => __('Snapchat URL', 'accelerated-mobile-pages'),
4374
- 'default' => '',
4375
- 'required' => array(
4376
- array('amp-design-selector', '=' , '3'),
4377
- array('enable-single-snapchat-profile', '=' , '1')
4378
- ),
4379
- ),
4380
- //#12
4381
- array(
4382
- 'id' => 'enable-single-Tumblr-profile',
4383
- 'type' => 'switch',
4384
- 'title' => __('Tumblr', 'accelerated-mobile-pages'),
4385
- 'default' => 0,
4386
- 'required' => array(
4387
- array('amp-design-selector', '=' , '3')
4388
- ),
4389
- ),
4390
- array(
4391
- 'id' => 'enable-single-Tumblr-profile-url',
4392
- 'type' => 'text',
4393
- 'title' => __('Tumblr URL', 'accelerated-mobile-pages'),
4394
- 'default' => '',
4395
- 'required' => array(
4396
- array('amp-design-selector', '=' , '3'),
4397
- array('enable-single-Tumblr-profile', '=' , '1')
4398
- ),
4399
- ),
4400
- )
4401
- ) );
4402
-
4403
-
4404
- // Date SECTION
4405
- Redux::setSection( $opt_name, array(
4406
- 'title' => __( 'Date', 'accelerated-mobile-pages' ),
4407
- 'id' => 'ampforwp-date-section',
4408
- 'subsection' => true,
4409
- 'fields' => array(
4410
- // Date on Single Design 3
4411
- array(
4412
- 'id' => 'amp-design-3-date-feature',
4413
- 'type' => 'switch',
4414
- 'title' => __( 'Date in Posts', 'accelerated-mobile-pages' ),
4415
- 'required' => array(
4416
- array('amp-design-selector', '=' , '3')
4417
- ),
4418
- 'subtitle' => __('Display date along with author and category in posts', 'accelerated-mobile-pages' ),
4419
- 'default' => '0'
4420
- ),
4421
- // Show Date As
4422
- array(
4423
- 'id' => 'ampforwp-post-date-global',
4424
- 'type' => 'select',
4425
- 'title' => __( 'Show Date As', 'accelerated-mobile-pages' ),
4426
- 'options' => array(
4427
- '1' => 'Published Date',
4428
- '2' => 'Modified Date'
4429
- ),
4430
- 'default' => '1',
4431
- ),
4432
- // Date Format
4433
- array(
4434
- 'id' =>'ampforwp-post-date-format',
4435
- 'type' =>'select',
4436
- 'title' =>__('Date Format','accelerated-mobile-pages'),
4437
- 'subtitle' => __('Select the Date Format of Posts', 'accelerated-mobile-pages'),
4438
- 'options' => array(
4439
- '1' => 'Ago',
4440
- '2' => 'Traditional view'
4441
- ),
4442
- 'default' =>'1',
4443
- ),
4444
- array(
4445
- 'id' =>'ampforwp-post-date-format-text',
4446
- 'type' =>'text',
4447
- 'title' =>__('Text for the Date Format','accelerated-mobile-pages'),
4448
- 'desc' =>__('Example: English - % days ago, Spain - ago % days','accelerated-mobile-pages'),
4449
- 'required' => array( array('ampforwp-post-date-format', '=', '1') ),
4450
- 'default' =>'% days ago',
4451
- ),
4452
- // Post Modified Date
4453
- array(
4454
- 'id' => 'post-modified-date',
4455
- 'type' => 'switch',
4456
- 'title' => __('Modified Date Notice', 'accelerated-mobile-pages'),
4457
- 'default' => 0,
4458
- 'subtitle' => __('Show Modified date of an article at the end of the post.', 'accelerated-mobile-pages'),
4459
- ),
4460
- )
4461
-
4462
- ) );
4463
-
4464
- // Misc SECTION
4465
- Redux::setSection( $opt_name, array(
4466
- 'title' => __( 'Misc', 'accelerated-mobile-pages' ),
4467
- 'desc' => '
4468
- <br /><a href="' . esc_url(admin_url('customize.php?autofocus[section]=amp_design&customize_amp=1')) .'" target="_blank"><img class="ampforwp-post-builder-img" src="'.AMPFORWP_IMAGE_DIR . '/amp-post-builder.png" width="489" height="72" /></a>',
4469
- 'id' => 'amp-design',
4470
- 'subsection' => true,
4471
- 'fields' => array(
4472
-
4473
- // RTL
4474
- array(
4475
- 'id' =>'amp-rtl-select-option',
4476
- 'type' => 'switch',
4477
- 'title' => __('RTL Support', 'accelerated-mobile-pages'),
4478
- 'default' => 0,
4479
- 'subtitle' => __('Enable Right to Left language support', 'accelerated-mobile-pages'),
4480
- 'true' => 'true',
4481
- 'false' => 'false',
4482
- ),
4483
- array(
4484
- 'id' => 'ampforwp-sub-categories-support',
4485
- 'type' => 'switch',
4486
- 'title' => __('Sub-Categories under Category', 'accelerated-mobile-pages'),
4487
- 'subtitle' => __('Display sub-categories on category pages', 'accelerated-mobile-pages'),
4488
- 'default' => '0'
4489
- ),
4490
- )
4491
-
4492
- ) );
4493
-
4494
- // Extension Section
4495
- Redux::setSection( $opt_name, array(
4496
- 'title' => __( 'Extensions', 'accelerated-mobile-pages' ),
4497
- // 'desc' => __( 'For full documentation on this field, visit: ', 'accelerated-mobile-pages' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
4498
- 'id' => 'opt-go-premium',
4499
- 'subsection' => false,
4500
- 'desc' => $extension_listing,
4501
- 'icon' => 'el el-puzzle',
4502
- // 'desc' => '<a href="http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin" target="_blank"><img class="ampforwp-extension-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp-ads-extension.png" width="345" height="500" /></a>
4503
- //
4504
- // <a href="http://ampforwp.com/custom-post-type/#utm_source=options-panel&utm_medium=extension-tab_custom-post-type&utm_campaign=AMP%20Plugin" target="_blank"><img class="ampforwp-extension-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp-custom-post-type-extension.png" width="345" height="500" /></a>
4505
- //
4506
- // <a href="http://ampforwp.com/doubleclick-for-publishers/#utm_source=options-panel&utm_medium=extension-tab_doubleclick&utm_campaign=AMP%20Plugin" target="_blank"><img class="ampforwp-extension-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp-DoubleClick-extensions.png" width="345" height="500" /></a>
4507
- //
4508
- // <a href="http://ampforwp.com/amp-ratings/#utm_source=options-panel&utm_medium=extension-tab_amp-ratings&utm_campaign=AMP%20Plugin" target="_blank"><img class="ampforwp-extension-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp-rating-extension.png" width="345" height="500" /></a>
4509
- //
4510
- //
4511
- // <a href="http://ampforwp.com/extensions/#utm_source=options-panel&utm_medium=extension-tab_coming-soon&utm_campaign=AMP%20Plugin" target="_blank"><img class="ampforwp-extension-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/extension-coming-soon.png" width="345" height="500" /></a>',
4512
- // 'icon' => 'el el-puzzle',
4513
- ) );
4514
-
4515
-
4516
-
4517
- // Priority Support
4518
- Redux::setSection( $opt_name, array(
4519
- 'title' => __( 'Fix AMP Errors', 'accelerated-mobile-pages' ),
4520
- // 'desc' => __( 'For full documentation on this field, visit: ', 'accelerated-mobile-pages' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
4521
- 'id' => 'opt-go-premium-support',
4522
- 'subsection' => false,
4523
- 'desc' => ' <a href="http://ampforwp.com/priority-support/#utm_source=options-panel&utm_medium=extension-tab_priority_support&utm_campaign=AMP%20Plugin" target="_blank"><img class="ampforwp-support-banner" src="'.AMPFORWP_IMAGE_DIR . '/priority-support-banner.png" width="345" height="500" /></a>',
4524
- 'icon' => 'el el-hand-right',
4525
- ) );
4526
-
4527
-
4528
-
4529
- // Plugin Manager
4530
- Redux::setSection( $opt_name, array(
4531
- 'title' => __( 'Plugins Manager', 'accelerated-mobile-pages' ),
4532
- 'id' => 'opt-plugins-manager',
4533
- 'subsection' => false,
4534
- 'desc' => 'You can Disable Plugins only in AMP which are causing AMP validation errors. <a href="http://ampforwp.com/plugins-manager" target="_blank">More Information.</a>',
4535
- 'icon' => 'el el-magic',
4536
- 'fields' => array(
4537
-
4538
- array(
4539
- 'id' => 'ampforwp-plugin-manager-core',
4540
- 'type' => 'switch',
4541
- 'title' => __('Enable Plugin Manager', 'accelerated-mobile-pages'),
4542
- 'default' => 0
4543
- ),
4544
- array(
4545
- // 'title' => __('Notification text', 'accelerated-mobile-pages'),
4546
- 'id' => 'info_normal',
4547
- 'type' => 'info',
4548
- 'required' => array('ampforwp-plugin-manager-core', '=' , '1'),
4549
- 'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/plugins-manager" target="_blank">AMP Plugin Manager</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/plugins-manager" target="_blank">Click here for more info</a>)</div></div>',
4550
- ),
4551
- )
4552
- ) );
4553
-
4554
-
4555
- Redux::setExtensions( $opt_name, AMPFORWP_PLUGIN_DIR.'includes/options/extensions/demolink_image_select' );
4556
- /*
4557
- * <--- END SECTIONS
1
+ <?php
2
+ //Admin Panel Options
3
+ if ( ! class_exists( 'Redux' ) ) {
4
+ return;
5
+ }
6
+ // Option name where all the Redux data is stored.
7
+ $opt_name = "redux_builder_amp";
8
+ $amptfad = '<strong>DID YOU KNOW?</strong></br ><a href="https://ampforwp.com/amp-theme-framework/" target="_blank">You can create your own <strong>Custom theme with AMP Theme Framework</strong></a>';
9
+ // #1093 Display only If AMP Comments is Not Installed
10
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
11
+ if(!is_plugin_active( 'amp-comments/amp-comments.php' )){
12
+ $comment_AD_URL = "http://ampforwp.com/amp-comments/#utm_source=options-panel&utm_medium=comments-tab&utm_campaign=AMP%20Plugin";
13
+ $comment_desc = '<a href="'.$comment_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/comments-banner.png" width="560" height="85" /></a>';
14
+ }
15
+ // Display only If AMP Cache is Not Installed
16
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
17
+ if(!is_plugin_active( 'amp-cache/ampforwp-cache.php' )){
18
+ $cache_AD_URL = "http://ampforwp.com/amp-cache/#utm_source=options-panel&utm_medium=performance-tab&utm_campaign=AMP%20Plugin";
19
+ $cache_desc = '<a href="'.$cache_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp_cache_b.png" width="560" height="85" /></a>';
20
+ }
21
+ // If CTA is not Activated
22
+ $cta_desc = "";
23
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
24
+ if(!is_plugin_active( 'AMP-cta/amp-cta.php' )){
25
+ $cta_AD_URL = "http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=call-to-action_banner_in_notification_bar&utm_campaign=AMP%20Plugin";
26
+ $cta_desc = '<a href="'.$cta_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/cta-banner.png" width="560" height="85" /></a>';
27
+ }
28
+
29
+ $extension_listing_array = array(
30
+ array(
31
+ 'name'=>'ADS for WP',
32
+ 'desc'=>'A Revolutionary way of adding ADS in your WordPress',
33
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
34
+ 'price'=>'$29',
35
+ 'url_link'=>'http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin',
36
+ 'plugin_active_path'=> 'ads-for-wp/ads-for-wp.php',
37
+ 'item_name'=>'ads-for-wp',
38
+ 'store_url'=>'',
39
+ ),
40
+ array(
41
+ 'name'=>'Advanced AMP ADS',
42
+ 'desc'=>'Add Advertisement directly in the content',
43
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
44
+ 'price'=>'$29',
45
+ 'url_link'=>'http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin',
46
+ 'plugin_active_path'=> 'amp-ads-google-adsense/amptoolkit-incontent-ads.php',
47
+ 'item_name'=>'advanced-amp-ads',
48
+ 'store_url'=>'',
49
+ ),
50
+ array(
51
+ 'name'=>'Contact Form 7',
52
+ 'desc'=>'Add Contact Us Form in AMP.',
53
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/cf7.png',
54
+ 'price'=>'$39',
55
+ 'url_link'=>'http://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=extension-tab_cf7&utm_campaign=AMP%20Plugin',
56
+ 'plugin_active_path'=> 'amp-cf7/amp-cf7.php',
57
+ 'item_name'=>'contact-form-7',
58
+ 'store_url'=>'',
59
+ ),
60
+ array(
61
+ 'name'=>'Gravity Forms',
62
+ 'desc'=>'Add Gravity Forms Support in AMP.',
63
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/gf.png',
64
+ 'price'=>'$79',
65
+ 'url_link'=>'http://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=extension-tab_gf&utm_campaign=AMP%20Plugin',
66
+ 'plugin_active_path'=> 'amp-gravity-forms/amp-gravity-forms.php',
67
+ 'item_name'=>'Gravity Forms',
68
+ 'store_url'=>'',
69
+ ),
70
+ array(
71
+ 'name'=>'Email Opt-in Forms',
72
+ 'desc'=>'Capture Leads with Email Subscription.',
73
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/email.png',
74
+ 'price'=>'$79',
75
+ 'url_link'=>'http://ampforwp.com/opt-in-forms/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin',
76
+ 'plugin_active_path'=> 'amp-optin/amp-optin.php',
77
+ 'item_name'=>'Email Opt-in Forms',
78
+ 'store_url'=>'',
79
+ ),
80
+ array(
81
+ 'name'=>'AMP Cache',
82
+ 'desc'=>'AMP Cache is a Revolutionary Cache System for AMP',
83
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/cache-icon.png',
84
+ 'price'=>'$89',
85
+ 'url_link'=>'http://ampforwp.com/amp-cache/#utm_source=options-panel&utm_medium=extension-tab_cache&utm_campaign=AMP%20Plugin',
86
+ 'plugin_active_path'=> 'amp-cache/ampforwp-cache.php',
87
+ 'item_name'=>'AMP Cache',
88
+ 'store_url'=>'',
89
+ ),
90
+ array(
91
+ 'name'=>'Call To Action (CTA)',
92
+ 'desc'=>'Higher Visibility & More Conversions',
93
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/mac-click.png',
94
+ 'price'=>'$29',
95
+ 'url_link'=>'http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=extension-tab_amp-cta&utm_campaign=AMP%20Plugin',
96
+ 'plugin_active_path'=> 'AMP-cta/amp-cta.php',
97
+ 'item_name'=>'Call To Action (CTA)',
98
+ 'store_url'=>'',
99
+ ),
100
+ array(
101
+ 'name'=>'AMP WooCommerce Pro',
102
+ 'desc'=>'Advanced WooCommerce in AMP in two clicks.',
103
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/woo.png',
104
+ 'price'=>'$79',
105
+ 'url_link'=>'https://ampforwp.com/woocommerce/',
106
+ 'plugin_active_path'=> 'amp-woocommerce-pro/amp-woocommerce.php',
107
+ 'item_name'=>'AMP WooCommerce Pro',
108
+ 'store_url'=>'',
109
+ ),
110
+
111
+ array(
112
+ 'name'=>'Advanced Custom Fields',
113
+ 'desc'=>'Easily add ACF support in AMP.',
114
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/acf.png',
115
+ 'price'=>'$29',
116
+ 'url_link'=>'http://ampforwp.com/acf-amp/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin',
117
+ 'plugin_active_path'=> 'advanced-custom-fields/acf.php',
118
+ 'item_name'=>'Advanced Custom Fields',
119
+ 'store_url'=>'',
120
+ ),
121
+ array(
122
+ 'name'=>'Star Ratings',
123
+ 'desc'=>'Star Review Ratings for AMP.',
124
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/star.png',
125
+ 'price'=>'$19',
126
+ 'url_link'=>'http://ampforwp.com/amp-ratings/#utm_source=options-panel&utm_medium=extension-tab_amp-ratings&utm_campaign=AMP%20Plugin',
127
+ 'plugin_active_path'=> 'amp-rating/amp-rating.php',
128
+ 'item_name'=>'Star Ratings',
129
+ 'store_url'=>'',
130
+ ),
131
+ array(
132
+ 'name'=>'Category Base Removal',
133
+ 'desc'=>'Remove Category Base Support in AMP',
134
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/puzzel.png',
135
+ 'price'=>'FREE',
136
+ 'url_link'=>'http://ampforwp.com/amp-category-base-remove-support/#utm_source=options-panel&utm_medium=extension-tab_amp-category-base-remove-support&utm_campaign=AMP%20Plugin',
137
+ 'plugin_active_path'=> '',
138
+ 'item_name'=>'Category Base Removal',
139
+ 'store_url'=>'',
140
+ ),
141
+ array(
142
+ 'name'=>'Custom Post Type',
143
+ 'desc'=>'Enable Custom Post type support in AMP.',
144
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/comments.png',
145
+ 'price'=>'$19',
146
+ 'url_link'=>'http://ampforwp.com/custom-post-type/#utm_source=options-panel&utm_medium=extension-tab_custom-post-type&utm_campaign=AMP%20Plugin',
147
+ 'plugin_active_path'=> 'amp-custom-post-type/amp-custom-post-type.php',
148
+ 'item_name'=>'Custom Post Type',
149
+ 'store_url'=>'',
150
+ ), array(
151
+ 'name'=>'View All Extensions',
152
+ 'desc'=>'See all the extensions available for AMP',
153
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/comments.png',
154
+ 'price'=>'FREE',
155
+ 'url_link'=>'https://ampforwp.com/extensions/#utm_source=options-panel&utm_medium=extension-tab_amp-more-comingsoon&utm_campaign=AMP%20Plugin',
156
+ 'plugin_active_path'=> '',
157
+ 'item_name'=>'',
158
+ 'store_url'=>'',
159
+ ),
160
+ );
161
+ $extension_listing_array = apply_filters( 'ampforwp_extension_lists_filter', $extension_listing_array );
162
+ $ampforwp_extension_list_html = '';
163
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
164
+ foreach ($extension_listing_array as $key => $extension) {
165
+ $currentStatus = "";
166
+
167
+ $onclickUrl = '<a href="'.$extension['url_link'].'" target="_blank">';
168
+ $onclickUrlclose = '</a>';
169
+ $pluginReview = '<div class="extension_btn">From: '.$extension['price'].'</div>';
170
+ if($extension['plugin_active_path'] != "" && is_plugin_active($extension['plugin_active_path']) ){
171
+ $currentStatus = "not-active invalid";
172
+ $pathExploded = explode("/", $extension['plugin_active_path']);
173
+ $pathExploded = $pathExploded[0];
174
+
175
+ $amplicense = '';
176
+ $onclickUrl = $onclickUrlclose= '';
177
+ $selectedOption = get_option('redux_builder_amp',true);
178
+ if(isset($selectedOption['amp-license'][$pathExploded])){
179
+ $amplicense = $selectedOption['amp-license'][$pathExploded]['license'];
180
+ }
181
+ $verify = '<button type="submit" id="'.$pathExploded.'">Activate</button>';
182
+ if(isset($selectedOption['amp-license'][$pathExploded]['status']) && $selectedOption['amp-license'][$pathExploded]['status']==='valid'){
183
+ $currentStatus = 'active valid';
184
+ $verify = '<button type="button" id="'.$pathExploded.'" class="redux-ampforwp-ext-deactivate">DeActivate</button>';
185
+ }
186
+
187
+ $pluginReview = '<input name="redux_builder_amp[amp-license]['.$pathExploded.'][license]" type="text" value="'.$amplicense.'" onclick="return false;">
188
+ <input name="redux_builder_amp[amp-license]['.$pathExploded.'][item_name]" type="hidden" value="'.$extension['item_name'].'">
189
+ <input name="redux_builder_amp[amp-license]['.$pathExploded.'][store_url]" type="hidden" value="'.$extension['store_url'].'">
190
+ <input name="redux_builder_amp[amp-license]['.$pathExploded.'][plugin_active_path]" type="hidden" value="'.$extension['plugin_active_path'].'">
191
+ <input name="redux_builder_amp[amp-license]['.$pathExploded.'][name]" type="hidden" value="'.$extension['name'].'">
192
+ ';
193
+
194
+ $pluginReview .= $verify;
195
+ if(isset($selectedOption['amp-license'][$pathExploded]['message']) && $selectedOption['amp-license'][$pathExploded]['message']!=""){
196
+ $pluginReview .= "<br/>".$selectedOption['amp-license'][$pathExploded]['message'];
197
+ }
198
+
199
+
200
+ }
201
+ $ampforwp_extension_list_html .= '<li class="first '.$currentStatus.'">'.$onclickUrl.'
202
+ <div class="align_left"><img src="'.$extension['img_src'].'" /></div>
203
+ <div class="extension_desc">
204
+ <h2>'.$extension['name'].'</h2>
205
+ <p>'.$extension['desc'].'</p>
206
+ '.$pluginReview.'
207
+ </div>
208
+ '.$onclickUrlclose.'</li>';
209
+ }
210
+
211
+ $extension_listing = '
212
+ <div class="extension_listing">
213
+ <p style="font-size:13px">Take your AMP to the next level with these premium extensions which gives you advanced features.</p>
214
+ <ul>
215
+
216
+ '.$ampforwp_extension_list_html.'
217
+
218
+ </ul>
219
+ </div>
220
+ ';
221
+
222
+
223
+
224
+ $gettingstarted_extension_listing = '
225
+ <div class="extension_listing getting_started_listing">
226
+ <p style="font-size:13px">Take your AMP to the next level with these premium extensions which gives you advanced features.</p>
227
+ <ul>
228
+ <li class="first"><a href="http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=gettingstarted-amp-ads&utm_campaign=AMP%20Plugin" target="_blank">
229
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/click.png" /></div>
230
+ <div class="extension_desc">
231
+ <h2>Advanced AMP ADS</h2>
232
+ <p>Add Advertisement directly in the content</p>
233
+ <div class="extension_btn">From: $29</div>
234
+ </div>
235
+ </a></li>
236
+ <li class="second"><a href="http://ampforwp.com/opt-in-forms/#utm_source=options-panel&utm_medium=gettingstarted_opt-in-forms&utm_campaign=AMP%20Plugin" target="_blank">
237
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/email.png" /></div>
238
+ <div class="extension_desc">
239
+ <h2>Email Opt-in Forms</h2>
240
+ <p>Capture Leads with Email Subscription.</p>
241
+ <div class="extension_btn">From: $79</div>
242
+ </div>
243
+ </a></li>
244
+ <li class="first"><a href="http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=gettingstarted_amp-cta&utm_campaign=AMP%20Plugin" target="_blank">
245
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/mac-click.png" /></div>
246
+ <div class="extension_desc">
247
+ <h2>Call To Action (CTA)</h2>
248
+ <p>Higher Visibility & More Conversions</p>
249
+ <div class="extension_btn">From: $29</div>
250
+ </div>
251
+ </a></li>
252
+ <li class="second"><a href="http://ampforwp.com/custom-post-type/#utm_source=options-panel&utm_medium=gettingstarted_custom-post-type&utm_campaign=AMP%20Plugin" target="_blank">
253
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/comments.png" /></div>
254
+ <div class="extension_desc">
255
+ <h2>Custom Post Type</h2>
256
+ <p>Enable Custom Post type support in AMP.</p>
257
+ <div class="extension_btn">From: $19</div>
258
+ </div>
259
+ </a></li>
260
+
261
+ <li class="first"><a href="http://ampforwp.com/acf-amp/#utm_source=options-panel&utm_medium=gettingstarted_acf&utm_campaign=AMP%20Plugin" target="_blank">
262
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/acf.png" /></div>
263
+ <div class="extension_desc">
264
+ <h2>Advanced Custom Fields</h2>
265
+ <p>Easily add ACF support in AMP.</p>
266
+ <div class="extension_btn">From: $29</div>
267
+ </div>
268
+ </a></li>
269
+ <li class="second"><a href="http://ampforwp.com/doubleclick-for-publishers/#utm_source=options-panel&utm_medium=gettingstarted_doubleclick&utm_campaign=AMP%20Plugin" target="_blank">
270
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/dfp.png" /></div>
271
+ <div class="extension_desc">
272
+ <h2>DoubleClick For Publishers</h2>
273
+ <p>Enable DFP Support for AMP.</p>
274
+ <div class="extension_btn">From: $19</div>
275
+ </div>
276
+ </a></li>
277
+
278
+
279
+ <li class="first"><a href="http://ampforwp.com/amp-ratings/#utm_source=options-panel&utm_medium=gettingstarted_amp-ratings&utm_campaign=AMP%20Plugin" target="_blank">
280
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/star.png" /></div>
281
+ <div class="extension_desc">
282
+ <h2>Star Ratings</h2>
283
+ <p>Star Review Ratings for AMP.</p>
284
+ <div class="extension_btn">From: $19</div>
285
+ </div>
286
+ </a></li>
287
+ <li class="second"><a href="https://ampforwp.com/woocommerce/" target="_blank">
288
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/woo.png" /></div>
289
+ <div class="extension_desc">
290
+ <h2>AMP WooCommerce Pro</h2>
291
+ <p>Advanced WooCommerce in AMP in two clicks.</p>
292
+ <div class="extension_btn">From: $79</div>
293
+ </div>
294
+ </a></li>
295
+
296
+ <li class="first"><a href="http://ampforwp.com/amp-category-base-remove-support/#utm_source=options-panel&utm_medium=gettingstarted_amp-category-base-remove-support&utm_campaign=AMP%20Plugin" target="_blank">
297
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/puzzel.png" /></div>
298
+ <div class="extension_desc">
299
+ <h2>Category Base Removal</h2>
300
+ <p>Remove Category Base Support in AMP</p>
301
+ <div class="extension_btn">FREE</div>
302
+ </div>
303
+ </a></li>
304
+ <li class="second"><a href="https://ampforwp.com/extensions/#utm_source=options-panel&utm_medium=gettingstarted_amp-more-comingsoon&utm_campaign=AMP%20Plugin" target="_blank">
305
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/comments.png" /></div>
306
+ <div class="extension_desc">
307
+ <h2>View All Extensions</h2