AMP for WP – Accelerated Mobile Pages - Version 0.9.85

Version Description

(3rd April 2018) = * For more detials check out this blog post * Fixed: Fatal error: Allowed memory size on FrontPage #1865 * Fixed: Proper Parameters for Pinterest Sharing #1853 * Added: Extra settings added in Button Module * Added: Extra settings added in Text Module * Fixed: Proper Parameters for Pinterest Sharing * Fixed: Unwanted fields are removed form the Repeater in Button module * Added: Enable/disable option added Related Posts #1829 * Fixed: Legacy PageBuilder option Repositioned #1851 * Fixed: Display the img tag only if source is present #1869 * Fixed: Huge design improvements in Swift theme #1818 * Added: Hook for Between Related Post is Added #1874 * Added: Blurb module text size and background color added * Fixed: Comments Pagination issues #1816 * Added: Counter Module added * Fixed: Date 48 years ago #1864 #1876 * Added: Ability to pass post id in amp_content() #1872 * Fixed: Changed the way images we fetched in WooWidget #1847 * Fixed: Changed the position of layout in Pagebuilder #1873 * Added: Pricing Module * Fixed: Changed the position of layout in Pagebuilder #1873 * Fixed: amp_aq_resizer was not able to process the outside url #1881 * Fixed: Advanced Google Analytics improvements #1630 #1860 * Added: Field Added For ON & OFF in Page builder #1870 * Fixed: Two paginations in search pages in Swift theme #1855 * Fixed: Extra Div if categories not available #1856 * Fixed: removed debuged tags #1870 * Fixed: Published date connected with AMP options Panel #1888 * Added: Featured Image option in Swift #1889 * Added: Separate Blog settings #1887 * Fixed: single post ads should not load on pages #1896 * Fixed: Ads should not load on FrontPage if PageBuilder is enabled #1885 * Fixed: Background Image Support for the Columns #1871 * Added: Blockquotes design for Swift #1894 * Added: Co-Authors Plus compatibility #1895 * Added: pagebuilder for custom post types #1884 * Added: Border option is connected to options panel #1818 * Added: Responsive AD unit support #1852 * Added: Sub category arrow symbol is added in Swift theme #1818 * Added: Search text color is connected to options panel #1818 * Fixed: Removed notice when no posttype selected #1884 * Added: Ability to overwrite page template the WordPress way like front-page.php and page-{id}.php #1902 * Added: Ability to overwrite author page template the WordPress way like author.php and author author-name.php #1902 * Added: Lightbox Support for the images #1892 * Fixed: No mobile redirection when Dev mode is enabled #1907 * Added: Option to hide Author name in Swift #1890 * Fixed: Script facebook-comments should not load for Frontpage #1897 * Added: amp-facebook comments for AMP2WP #1911 * Added: Alt tag in all modules #1898 * Added: Sanitizers in Footer and sidebar widget in Swift #1835 * Added: Dropcap support #1900 * Added: Proper styling for iframes and videos in Swift theme #1909 * Fixed: Non-AMP link fixed for AMP Takeover #1916 * Fixed: Swift connected with Breadcrumb option #1915 * Added: Uninstall option created to completely remove AMPforWP data #1903 * Fixed: Recipe Structured Data requires name attribute #1917 * Fixed: No amphtml when It is hidden from Categories #1919 * Fixed: Content is breaking when Inline Related Post option is enabled #1912 * Fixed: Proper redirection setup for AMP Takeover #1913 * Added: Social media profiles added in menu #1901 * Fixed: No Ads should display on Frontpage or Posts if Pagebuilder is enabled #1885 * Added: #1899 Proper conditions for amp-analytics script * Fixed: Turn off option not working by default fixed #1537 * Fixed: BreadCrumbs Should not load when PageBuilder is enabled #1925 * Fixed: Removed unwanted elements loading while pagebuilder is enabled #1929 * Fixed: amp-web-push should not load on Homepage and Blog #1930 * Added: SmartMag theme Compatibility #1905 * Fixed: Template overriding not working in child theme #1920 * Fixed: Horizontal scrolling in Swift #1844 * Fixed: Home page title should not be visible in AMP takeover #1921 * Added: Carousel Module Added #1937 * Fixed: Comments pagination not working #1816 * Fixed: Comments pagination not working #1816 * Added: Glue html css compatibility #1932 * Added: Data Caption Support on AMP Instagram Embed #1938 * Added: Ability to pass {author_name} and {author_id} added in Advance Analytics #1936 * Fixed: Scrollbar in Header area in Swift in firefox #1818 * Added: Disqus iframe height adjustment option #1935 * Fixed: Options panel conflict fixed with Mobius theme #1942 * Fixed: Problem with Button in Mobile view in Swift #1926 * Fixed: Removed canvas tag in AMP version causing validation errors #1880 * Fixed: Getting Conflict with Facebook Button by BestWebSoft #1740 * Added: Option to enter the "ID" on CTA button module #1931 * Added: Option for open same window in CTA module of page builder #1866 * Fixed: Logo fetch causing Huge performance issue #1679 * Fixed: Blurb module's default values were not set #1952 * Fixed: Allow script with application/ld+json #1958

Download this release

Release Info

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

Code changes from version 0.9.84.1 to 0.9.85

Files changed (47) hide show
  1. LICENSE +357 -357
  2. README.md +1616 -1527
  3. accelerated-moblie-pages.php +561 -554
  4. base_remover/base_remover.php +126 -126
  5. base_remover/dependencyScript.js +20 -20
  6. classes/class-ampforwp-instagram-sanitizer.php +48 -47
  7. classes/class-ampforwp-youtube-embed.php +132 -132
  8. classes/class-init.php +10 -10
  9. components/author-box/author-box.php +100 -85
  10. components/breadcrumb/breadcrumb.php +217 -217
  11. components/call-now/call-now.php +15 -15
  12. components/categories-tags/categories-tags.php +44 -44
  13. components/comments/comments.php +198 -171
  14. components/components-core.php +517 -511
  15. components/featured-image/featured-image.php +51 -51
  16. components/logo/logo.php +58 -58
  17. components/loop/loop.php +351 -348
  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 +160 -155
  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 +228 -230
  26. components/theme-loader.php +272 -221
  27. feeds/instant-article-feed.php +55 -55
  28. images/blur-mod-1.png +0 -0
  29. images/layouts-1.png +0 -0
  30. images/layouts-2.png +0 -0
  31. images/pricing-mod-1.png +0 -0
  32. images/single-2.png +0 -0
  33. images/single-3.png +0 -0
  34. images/slider-1.png +0 -0
  35. images/slider-2.png +0 -0
  36. includes/admin-script.js +388 -388
  37. includes/admin-style.css +458 -455
  38. includes/disqus.html +91 -91
  39. includes/icons/amp-icons.php +778 -778
  40. includes/includes.php +52 -52
  41. includes/modules/ampforwp-blurb.php +195 -195
  42. includes/modules/ampforwp-button.php +251 -251
  43. includes/modules/js/amp.js +158 -158
  44. includes/newsletter.php +131 -131
  45. includes/onesignal-integration/amp-helper-frame.html +6 -6
  46. includes/onesignal-integration/amp-permission-dialog.html +6 -6
  47. includes/options/admin-config.php +0 -4299
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,1527 +1,1616 @@
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.84.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://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.84 (14th March 2018) =
182
- * Added: Polylang Frontpage compatibility added #1779
183
- * Fixed: Proper link for Linkedin added #1820
184
- * Fixed: Incorrect function name was Added #1827
185
- * Fixed: Thumbnail resizing issue in Swift #1828
186
- * Fixed: Thumbnail issue in Loops of Design 3 #1714
187
- * Fixed: Hide post builder for Swift #1824
188
- * Fixed: To avoid warnings when there are no pages in WordPress #1810
189
- * Fixed: Condition for the Thumbnail for Swift #1733
190
- * Fixed: Proper Styling for footer for Swift #1733
191
- * Fixed: Line height issue and CSS editor not working in Swift #1821
192
- * Fixed: Renamed aq_resize to ampfrowp_aq_resize to avoid conflicts #1838
193
- * Fixed: Add the prefix to avoid conflicts #1817
194
- * Fixed: Added Custom format option in amp_date #1845
195
- * Fixed: Removed amp-img tag where blank SRC in Page builder #1843
196
- * Fixed: Pagebuilder modal max-height removed so it will become full width #1843
197
- * Added: An option for select target type in Button Module #1822
198
- * Fixed: Remove AMP category widget if swift is enabled #1790
199
- * Fixed: Filter added change mode type #1833
200
- * Added: Rewrite rule for .html blog page #1775
201
- * Fixed: Filter added change mode type #1833
202
- * Fixed: Swift Footer Widget Sanitizer Added #1800
203
- * Fixed: No OneSignal widget when PageBuilder is enabled #1840
204
- * Fixed: span tag added around the pagination text #1834
205
- * Added: Page specific option to add script/html and styles in page builder #1831
206
- * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
207
- * Added: Jarida theme compatibility added #1842
208
- * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
209
- * Fixed: Replace value attribute only from html tags. Otherwise it is removing value from * shortcodes which is breaking the whole page. #1738
210
- * Added: Underline option for content links added #1808
211
- * Added: Page specific option to add RTL in page builder #1858
212
- * Added: Converts AMP ads to normal so ads show when takeover is enabled in Normal Mode #1724
213
- * Added: Converts AMP Analytics to normal so Analytics works when takeover is enabled in Normal Mode #1724
214
- * Fixed: Phone icon proper alignment in Design3 #1730
215
- * Added: ADS for WP activation box in Extensions tab
216
- * Added: New design field added #1861
217
-
218
- = 0.9.83.1 (8th March 2018) =
219
- * Fixed: Pagebuilder contents not shows on custom home page #1794
220
- * Added: Header hook added `ampforwp_advance_header_layout_options`
221
- * Fixed: Load admin files only in admin pages #1799
222
- * Fixed: Conflict with WP bakery pagebuilder #1783
223
- * Fixed: Slide in Menu break in RTL mode #1825
224
- * Fixed: Validation issue in loops due to empty attributes #1795
225
- * Fixed: Featrued Image connected Properly with Swift theme #1733
226
- * Fixed: Changed the disqus.php to disqus.html to pass authentication #1788
227
- * Added: CSS styling for Loop on shop page #1803
228
- * Fixed: Facebook comments not work in swift #1789
229
- * Fixed: Style AMP Category module in Footer swift #1790
230
- * Fixed: Load aq_resizer only in AMP #1805
231
- * Fixed: Proper markup for Pinterest in Design3 and Swift #1793
232
- * Fixed: Proper url for vk
233
-
234
- = 0.9.83 (03rd March 2018) =
235
- * Added: Ability to add amp-carousel and amp-selector directly into WYSIWYG Editor #1588
236
- * Fixed: Debug error caused by Playbuzz Sanitizer #1674
237
- * Added: Show default gravatar for comments #1758
238
- * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
239
- * Fixed: To avoid debug error in swift
240
- * Fixed: Translation improved for some strings #1678
241
- * Fixed: Stop AMP takeover for Feed pages #1767
242
- * Fixed: Menu issues In Design 1 & Design 2 after changing from AMP-Sidebar #1565
243
- * Fixed: AMP Options panel Not Working After Update (0.9.82.1) version #1761
244
- * Fixed: Move the label to the top [UX improvement] #1746
245
- * Fixed: Error with Vue #1745
246
- * Added: Video Module added in AMP Page Builder #1750
247
- * Fixed: Sidebar menu is not scrollable swift theme #1769
248
- * Fixed: View Non-AMP should be usertrailingslashit #1772
249
- * Fixed: Proper structured data for Blogpage #1660
250
- * Fixed: Legacy Page Builder not working after the update #1773
251
- * Fixed: Content blank when only image in content #1778
252
- * Fixed: Comment ID display issue fixed #1758
253
- * Fixed: PHP Warning: A non-numeric value encountered in components/logo/logo.php on line 52 #1764
254
- * Fixed: Yummly support added in Swift #1708
255
- * Fixed: Demo Link updated #1781
256
- * Fixed: CSS is not loading in Swift Theme #1780
257
- * Added: Ability to add Advertisement or Sponsored label under ads #1710
258
- * Fixed: Featured images distortion in related posts #1684
259
- * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
260
- * Fixed: noarchive instead of nofollow in Archive pages #1693
261
- * Fixed: Internal links of tags are showing “/amp” after changing the end point to “?amp” in design 2 #1752
262
- * Fixed: line height is added for the logo in Swift design
263
- * Added: Class for Custom Frontpage #1787
264
- * Fixed: Recent post enable disable for Swift theme #1784
265
- * Fixed: Connect Show/Hide AMP option with AMP takeover#1786
266
- * Fixed: Added sanitizer to footer Widget #1756
267
-
268
- = 0.9.82.1 (18th February 2018) =
269
- * Selector code reverted due to it's effect on carousel
270
-
271
- = 0.9.82 (18th February 2018) =
272
- * View more details on https://ampforwp.com/0-9-82-released-stability-update-82nd-update/
273
- * Logo Resizing calculation by Pixels and resizing bug solved.
274
- * Update Notification in the Admin panel will only appear in the AMP options panel. So it will not annoy you anymore.
275
- * Glue underline is applying for some reason
276
- * Fatal error after 0.9.81 fixed
277
- * Facebook comments loading twice on swift
278
- * PHP Notice: Undefined variable: post_author_name
279
- * Pagebuilder fix in version 0.9.81 Compatibility with Yoast and other plugins #1749
280
- * Home loop modifier option added. Allows you to exclude the categories from the loop or include the Custom Post type in the homepage loop.
281
- * amphtml Conflict with Instant Article for Facebook resolved
282
- * /amp folder in the theme is applying changes in plugin, which causing a bug, but it’s been fixed
283
- * Backward Compatibility for AMP Preview
284
- * SEO Section Improvements
285
- * Wrong comments count on AMP pages
286
- * AMP Allow selector in the The Content. You can add tabs and AMP components directly into the loop.
287
- * If we turn off the Homepage Support then Blog is turned off as well, solved.
288
- * Post Pagination have two options like “Number of pages” and Previous & Next.
289
- * Removed the dot from the one Signal Service worker URL if the subdomain isn’t added (Causes Validation issues.)
290
- * Extra Space due to empty divs in Design 3
291
- * Remove alt from a tag in the AMP version caused many validation issues.
292
-
293
-
294
- = 0.9.81 (15th February 2018) =
295
- * Edge case fatal error on features.php fixed
296
- * Admin dashboard messup CSS fix #1731
297
- * Custom CSS Output added in Swift
298
-
299
- = 0.9.80 (15th February 2018) =
300
- * View More details on the [blog post](https://ampforwp.com/introducing-swift/)
301
- * 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/)
302
- * Swift: The New Default Theme, which you can select from the design section of the Page builder.
303
- * A way to create a Child Theme for AMP [read more](https://ampforwp.com/tutorials/article/child-theme-amp/)
304
- * 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.
305
- * 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
306
- * Logo Resizing made easy
307
- * Typography Options
308
- * 3 Headers design in swift theme
309
- * Error while sharing the image on Pinterest #1699
310
- * Homepage support was not working ( when page support is off ) #1695
311
- * Custom Permalinks rewrite issue solved #1689
312
- * Custom post type was appearing two types #1688
313
- * Theia Post Slider plugin incompatibility with post pagination fixed #1677
314
- * Link to the categories in loop of Design 3 #1632
315
- * amphtml was not working when plain permalink selected along with static page as homepage #1614
316
- * AFS Analytics Integration added #1605
317
- * Removed the blank spaces from analytics id field to deliver a good UX. #1599
318
- * ?amp endpoint feature added #1561
319
- * Ability to remove the excerpt and image from related post #1510
320
- * Thumbnails on-the-fly generation added for better control over the design.
321
-
322
- = 0.9.74 (23rd January 2018) =
323
- * View More details on the [blog post](https://ampforwp.com/0-9-74-released-stability-update-79th-update/)
324
- * Fixed: Push Notifications button alligned in center #1500
325
- * Added: Meta robots tag support from Yoast #1563
326
- * Added: Option to Disable wptexturize/smart-quotes Support #1458
327
- * Fixed: Changed the label id to avoid conflict with Advanced AMP Ads #1591
328
- * Fixed: esc_attr causing validation issues with single and double quotes #1616
329
- * Fixed: Image stretching problem resolved when "Featured Image from the content" was set #1580 #1582
330
- * Added: Create Template by Custom taxonomy name like product-jeans.php in AMP Theme FrameWork #1594
331
- * Added: Custom Post type support added in the Core #1612
332
- * Fixed: custom-amp-content.php cleaned with PHPCS #1497
333
- * 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)
334
- * Added: Proper fallback support added if the current active AMP theme is not available #1624
335
- * Fixed: Resolved debug errors #1622
336
- * Added: All in One SEO compatibility #1557
337
- * Fixed: Load AMP Styling only on AMP pages #1441
338
- * Added: 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber) #1265
339
- * Fixed: itemprop="url" was adding in non-amp #1626
340
- * Fixed: SiteOrigin Pagebuilder compatibility with Custom Frontpage #1592 #1593
341
- * Added: MediaAce lazy load compatibility of Bibmer Theme #1472
342
- * Fixed: Content Links plugin was causing validation errors #1569
343
- * Added: Filter added called get_content_from_dom to modify the output in AMP function #1462
344
- * Added: amp_breadcrumb component added in AMP Theme Framework #1636
345
- * Fixed: Sidebar Styling and proper sanitizer updated
346
- * Added: amp_author_meta component added in AMP Theme Framework #1641
347
- * Fixed: amp_post_pagination component improvement in AMP Theme Framework
348
- * Added: Ability to add link classes in amp_post_pagination in AMP Theme Framework
349
- * Fixed: amp_author_meta image code improvement in AMP Theme Framework
350
-
351
- = 0.9.73 (15th January 2018) =
352
- * View More details on the [blog post](https://ampforwp.com/0-9-73-released-stability-update-78th-update/)
353
- * Added: Instagram Sanitizer added to process Instagram Embeds inside the BlockQuotes #1581
354
- * Added: Option Created to Enable/Disable rel="nofollow" for View Non-AMP link #1572
355
- * Fixed: Custom AMP Content was not working with Elementor Pagbuilder #1495
356
- * Fixed: ampforwp_is_front_page() is not working in the newspaper theme #1583
357
- * Added: Allow people to use multiple Analytics on AMP #1124
358
- * Fixed: 'https' error with PlayBuzz Embeds #1481
359
- * Added: Option to show last modified date instead of Published date #1496
360
- * Fixed: Add proper permission for ampforwptourinstaller page
361
- * Fixed: Debug warnings #1586 and #1459
362
- * Fixed: A lot of Security Fixes has been done #1497
363
- * Fixed: Removed lot of unused code #1497
364
- * Added: AMP skip for checkout page #1443
365
- * Added: Show the list of Child pages at the end in Parent Page with on/off #1551
366
- * Fixed: Properly strip shortcodes fom Structured data description #1512
367
-
368
- = 0.9.72 (6th January 2018, Happy New Year) =
369
- * View More details on https://ampforwp.com/0-9-72-released-stability-update-77th-update
370
- * Related Posts Image stretching in Design 3 AMP theme Framework #1482
371
- * RTL option must be integrated into AMP theme Framework #1562
372
- * `DOMDocument::loadHTML():` Attribute itemprop redefined warning fixed #1539
373
- * Created an option to add Author bio article in Facebook Instant Article #1521
374
- * Options to add push notification button above and below the content #1571
375
- * Copy the Content button for Custom Post types #1532
376
- * Alexa Metrics Compatibility added #1536
377
- * Logo styling added with amp_logo. So styling can work with AMP Theme Framework. #1520
378
- * Content parsing login improved, so it will not through any warnings if the content has only 1 paragraph. #1523
379
- * Debug Warnings removed #1564
380
- * Caption in the Gallery creating validation errors Fixed. #1549
381
- * Tables Link color should be as same as the link of the body #1559
382
- * Separate options for In-Content related posts #1546
383
- * WebPage Schema Type added in Structured Data options #1558
384
- * Fatal Error fixed with `mb_detect_encoding()` after enabling the minify option #1494
385
- * Content blank or fatal errors due to itemscope and itemtype, fixed. #1570
386
- * Performance improved. Due to `_transient__redux_activation_redirect` transient. #1526
387
-
388
- = 0.9.71 (1st December 2017) =
389
- * Design 2 Post Titles issue fixed
390
- * Instant Articles validation issue fixed.
391
-
392
- = 0.9.70 (30th November 2017) =
393
- * View More details on https://ampforwp.com/0-9-70-released-stability-update-76th-update/
394
- * Image alt tags are empty which caused issues. #1154 (thanks to @liagua)
395
- * ALT and IMG tags are in one line #1442
396
- * Updated the permalink for post view in admin area #1318
397
- * aria-current causing validation issues #1427
398
- * Aligning Captions in the Bottom in Gallery #1428
399
- * 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
400
- * After 0.9.69.1 update Call to undefined function mb_convert_encoding #1447
401
- * Featured image options now also reflect the structured data #1430
402
- * Blur & Stretching issues of Design 3 thumbnails are now fixed. They’re crisp and clear than ever! #1227
403
- * Related posts are showing on single even when turned off #1434
404
- * Show Related posts CSS only when it is selected #1356
405
- * Author image now displays on author pages #1426
406
- * Category base removal in AMP from url option is only working on the first page #1418
407
- * Bug fixed: PHP Warning DOMDocument Empty string supplied as input #1449
408
- * Video support added in Instant Articles #1300
409
- * Read more tag in Instant articles issue fixed #1415
410
- * Amp carousel issues fixed #1446 #1456
411
- * Compatibilty with Envira Gallery Lazy Loading #1432
412
- * Inline Related Posts in AMP Theme Framework #1457
413
- * Different number of in-content related post and related posts at the footer #1448
414
- * FooGallery update broke all the AMP compatibility, but we fixed it from our side so that user’s gallery work perfectly #1424
415
- * WPBakery Page Builder Conflict solved #1419
416
- * Goodlife theme Lazy Load compatibility added #1416
417
- * AMP-Facebook-Like Was found but unused Validation Error fixed. #1463
418
- * Playbuzz not displaying if added with https: #1466
419
- * Options Panel labels renamed for better understanding.
420
-
421
-
422
- = 0.9.69 (20th November 2017) =
423
- * View More details on https://ampforwp.com/0-9-69-released-stability-update-75th-update/
424
- * One Signal Push Notifications bug fixed! #1404
425
- * AMP theme framework Related posts extended so that it can be used as a loop format #1406
426
- * Facebook like Button improvements #1405
427
- * Add layout responsive tag to image module in page builder #1373
428
- * Strip the shortcodes from Structure data area #1389
429
- * Test HTTP API Call From admin panel by redux #1391
430
- * Meta description tag in normal site Unicode character is different from AMP site unicode character. #1369
431
- * Updated the check for ampforwp_is_amp_endpoint this should fix the issue #1372
432
- * Updated the URL for design 3 so it can work with plain permalink #1318
433
- * Updated the option Featured Image from The Content #1367
434
- * 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
435
- * Date Format under Homepage improvements #1408
436
- * Warnings due to inline related posts in Homepage #1413
437
- * Plain Permalinks Support improved. #1318
438
- * Allow Homepage title of Bread Crumbs feature to be changed from Translation Panel #1414
439
- * Debug Errors in AMP Theme Framework #1403
440
- * Unnecessary loading of Merriweather fixed, it will only load in the Design 1.
441
- * Enter Phone Number is not Appearing when switch to Call now button #1425
442
- * Need excerpt below the title, above the meta #1399
443
- * Remove the Separator piple symbol from the footer when “Back to Top link is off #1417
444
- * Display Child or subcategories on Category pages. #1385
445
- * Add Caption in the Gallery Image feature conflicting with Gallery widget #1407
446
- * Youtube Shortcode embed with &rel=0 support #1378
447
- * Filter for Excerpt custom text in the AMP options #1411
448
- * WPML Multilingual CMS plugin flags compatibility #1270
449
- * Compatibility with Tasty Recipes plugin and other page builders with amp page builder #1431
450
-
451
-
452
- = 0.9.68 (12th November 2017) =
453
- * View More details on https://ampforwp.com/0-9-68-released-stability-update-74th-update/
454
- * ADs are Optimize For Viewability, meaning it will try to load faster than the original AMP AD loading strategy.
455
- * Content was disappearing issue was resolved #1392
456
- * Featured Image from The Content option is connected to related post #1339
457
- * Fix amp-web-push helper iframe configuration URL #1387
458
- * Facebook Like button added to AMP #1327
459
- * WPML support for AMP Improvement #1285
460
- * Debug Errors fixed #1366
461
- * Setting ad density for Facebook Instant Articles ads #1287
462
- * Showing the number of comments in Single #1341
463
- * Styling added to the sitewide ads and made sure that they are in the center. #1343
464
- * One Signal buttons Translation added #1383
465
- * Article type added to Structured data #1344 #1354
466
- * The issue with the amp-carousel when RTL was enabled #1358
467
- * amp-carousel with images of different sizes #1358
468
- * 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.
469
- * Instant Article should have a default value for number of posts, it was causing the memory issue with alot of posts #1390
470
- * Notice if a post has no author data #1338
471
- * Added a new redux extension select field in redux framework #1349
472
- * Issues with galleries as well as gallery captions #1363
473
- * Added a hook for adding anything in between the loops #1396
474
- * Hide meta boxes as per the user level types #1340
475
- * A Switch between the Date formats #1384
476
- * Fix: Jannah theme lazy load issue #1362
477
- * Issues with galleries as well as gallery captions #1363
478
- * Create Dynamic url of amp according to the permalink structure #1318
479
- * Minor code performance improvement.
480
- * Archive titles in Design 3 frontend issue
481
-
482
- = 0.9.67.0 (6th November 2017) =
483
- * View more details on https://ampforwp.com/one-signal-push-notifications-for-amp/
484
- * OneSignal Push Notifications integrated #807
485
- * Vimeo embed support added
486
- * SoundCloud embed support added
487
- * Pinterest embed support added
488
- * PlayBuzz embed support added
489
- * DailyMotion embed support added
490
- * Fix: Handle issues with data uri images in CSS #1033
491
- * Fix attribute when adding AMP Mustache lib #1033
492
- * Fix: Output CSS for feature image #1033
493
- * An option added for users who don't want to receive update notifications #1342
494
- * Structured data nav improvement
495
- * Sitenavigationelement has been implemented correctly for footer menu. #1345
496
- * Style sanitization for Menu Items #1359
497
- * Polylang flags support for menu  #1360
498
- * Mobile Redirection issues fixed #1173
499
- * Jetpack fatal error fixed #1355
500
- * 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.
501
- * Needs proper CTA Bar's styling. #1361
502
- * Debug errors on archive pages #1353
503
- * Preview shall only be loaded on click rather than in background #1331
504
- * ampforwp_is_home() function code improved
505
- * making sure scripts and styling is properly adding when sanitizing the sidebar #868
506
- * All the backend css and js should be versioned, so it's not cached. #1335
507
-
508
- = 0.9.66.1 (30th October 2017) =
509
- * Fatal error if has version less than WP 4.8 fixed
510
- * More Minor Validation errors fixed
511
- * Odnoklassniki sharing button is not working #1337
512
-
513
- = 0.9.66.0 (29th October 2017) =
514
- * View more details on https://ampforwp.com/0-9-66-released-bug-squashing-oct-2017-72nd-update/
515
- * Design 3 & Design 1 are optimised with 90+ Google PageSpeed Score on Mobile and 95+ in desktop performance #1273
516
- * Featured Image from the content for blog and homepage #1295
517
- * Category Module for AMP Page builder added #888
518
- * 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
519
- * Twitter Video embed code support added in AMP #1307
520
- * Video Posting Structured data #1293
521
- * Navigation menus are now Schema compatible for better Structured data integration #1229
522
- * Yoast checking conditions for Structured Data Improved #1293
523
- * Added "back to Top" in design 3 #959
524
- * 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)
525
- * AMP not working on password-protected pages #1192
526
- * Debug errors reported by the user #1284 and few more we found internally
527
- * Inline Style Sanitizer for Comments to avoid any validation issues #1193
528
- * Next/Previous links removed from pages #1268 props @Frenchomatic
529
- * WPML Multilingual CMS plugin flags compatibility added #1270
530
- * Image sanitizer added for the Sidebar #1270
531
- * Added AMP Components the correct way. Added amp-gist, amp-social-share. #336
532
- * amp-video script added - Which decreases the non-critical validation issues #991
533
- * Arrows in Design 3 pagination #1000
534
- * Author page links in Single #1282
535
- * Added previous open state of option panel and show again when search clean #1238
536
- * Odnoklassniki Social Sharing Support for AMP (with target blank for better bounce rate) #1230
537
- * GIF or animated images resize problem fixed #1281
538
- * In Design1, Header Background & Link Color have same option #1249
539
- * FB Pixel for AMP added #1231
540
- * Structured Data Type option for AMPed Custom Post types only #1259
541
- * Attribute ‘readability in the tag ‘div’ removed - this decreases the validation issues #1306
542
- * AMP Theme Framework Improvements: loop, author, related_post, Add Author support #1311
543
- * Commentator's Avatar in the comments section #1132
544
- * Remove 'Welcome to AMP' from Dashboard sub-menu and moved to the options area to decrease the annoyance and increase the user happiness #902
545
- * 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
546
- *  View AMP on Admin Bar for the respected page/post If enable. #1236
547
- * google maps iframe link to larger map #1099
548
- * Comments now jumping due to the slash at the end #1309
549
- * Page Builder causes Incompatibility with the Divi theme (We restructured the Text Module for Page builder for better compatibility and UX) #1162
550
- * Inline Style Sanitizer for Comments added. Less Critical Validation issues and Better Presentation #1193
551
- * WPML amp-html error fixed #1285
552
- * Radio button not working for Show View more Button" #1018
553
- * Added registered handle for tinymcePointer localize data #1301
554
- * Date in the Design 2 should not be hidden in mobile version #1315
555
- * Page builder not working on homepage(Selected as front page) #1316
556
- * 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)
557
- * Auto flush on save for FBIA to improve the UX.
558
- * Plain Permalinks Support improved. #1318
559
- * Tables support added to FB Instant Articles #1266
560
- * Demo link added in the Theme selector option #1248
561
- * Remove invalid attributes from multiple tags which reduces critical validation errors and validates pages.
562
- * AMP makes a problem in archive page label, when it is active in non-amp version #1304
563
- * placeholder-icon.png is 404 fixed #1310
564
- * Category & Tags switches for Single added. #1055
565
- * Copy Content (Custom AMP Editor) Option Not showing with Page Builder of SiteOrigin issue fixed #1280
566
- * Improving UX with: when AMP support is off for a specific post type then all the AMP related metaboxes should be removed #1289
567
- * Options Panel Options rearranged, labels rewritten, descriptions repositioned for better User interaction [commit]
568
-
569
- = 0.9.65.2 (25th October 2017) =
570
- * TypeWatch is not a function #1299
571
- * Error with BackupBuddy fixed #1303
572
-
573
- = 0.9.65.1 (24th October 2017) =
574
- * AMP Minifcation Issues fixed
575
-
576
- = 0.9.65 (22nd October 2017) =
577
- * View more details on https://ampforwp.com/new/
578
- * Favicon for AMP #1039
579
- * AMP Minification option added with Performance Tab in Options #1286
580
- * Post support is turned off then Meta box should also be removed #1253
581
- * Excerpt Length feature in Design two and Three #1122
582
- * Test Contact form plugins and their settings in the options panel #1121
583
- * Mobile preview in Edit Screen #1082
584
- * Search feature for Options Panel #1238
585
- * WordPress Social Share Buttons Validation Issues #1272
586
- * itemtype attribute is striping in the ul tag #1210
587
- * Debug Error in Breadcrumb 0.9.64 #1267
588
- * Disable AMP linking at Wordpress Search Page #969
589
- * Featured Image is missing #1071
590
- * Removed ampforwp_plugin_activation_notice #1034
591
- * Add VK (Vkontakte) Sharing Button #1187
592
- * Grab the first image instead of post thumbnail for featured image #1189
593
- * AMP theme framework core changes #1274
594
- * Grab the first image instead of post thumbnail for featured image #1189
595
- * Create a Switch on Top of Page Builder #1279
596
- * Inline Related Posts added that helps you with improving bounce rate #1078
597
- * Caption Support in Image Gallery Carousel #1172 #1136
598
- * Instant Articles feed shows sticky posts on top #945
599
- * Added search check, to fix debug notice
600
- * Option to hide date from Design 1 & Design 3 Homepage Loop #1264
601
- * UI labels improvements in the Options panel
602
- * Sorting out design #2 – static front page #1175
603
-
604
- = 0.9.64 (15th October 2017) =
605
- * View more details on https://ampforwp.com/new/
606
- * Structured Data Type option added. You can now change the structured data format for Posts, Pages and Custom post types #323
607
- * When comments plugin activate, Comments section should remove. #1093
608
- * Notification causes a validation error. #1147
609
- * CSS !important need sanitization #1225 - This will help us to validate tens of thousands of pages.
610
- * Strange spaces when using Sassy Social Share #1185
611
- * Remote CDN use? Let's host it? #549
612
- * Typo fix for Linkedin Profile Page URL section #905 [Thanks to Prayag @pra85]
613
- * Replace fastimage with fasterimage for PHP 5.4+ #1191
614
- * Debug Errors Post 0.9.63 #1219
615
- * Ad5 code injected twice #1116
616
- * Homepage Support must be Off when we turn Off Homepage Support. #738
617
- * Add custom class in post pagination for styling #1100
618
- * Removed the Lazy Loading issue of Schema Theme #1170
619
- * H1 tag for archive titles (Commit) #1155
620
- * Alt tag for the Logo #1155
621
- * Design 3 Menu RTL issue fixed #1106
622
- * Ability to add dynamic classes in body tag #1237
623
- * Warnings fixed on 404 page #1243
624
- * Properly structured data for Homepage, Custom Frontpage and Blog #1155 #1242
625
- * Option added to Enable/Disable categories and Tags links from Single #1155
626
- * Fatal error after 0.9.63 fixed #1220
627
- * Debug Error due to vendor AMP #1213
628
- * PHP warning on line 147 after 0.9.63 #1241
629
-
630
- = 0.9.63 (8th October 2017) =
631
- * View more details on https://ampforwp.com/new/
632
- * Category and Tag Base Remover as core features #1079
633
- * Hide AMP on Posts option added #935
634
- * Installation Setup Screen Added for new users
635
- * Validation for the session in PHP #1158. PR by Bryan Contreras @bryan3561
636
- * All the amp pages should work perfect with Plain Permalink settings #488
637
- * WYSIWYG TinyMCE editor added for the Text Module in AMP Page Builder #1205
638
- * WPML Static Front Page Support for title and description with Yoast. #1143
639
- * Row Settings area added for AMP Page Builder #1148
640
- * xlink attribute causes Validation Issues #1149
641
- * Posts with no images on Archive pages are squeezed to 65% #1058
642
- * Body Class to target specific pages #1123
643
- * Option to enable/disable Breadcrumb #1129
644
- * Debug errors due to Breadcrumbs fixed #1109 #1130 #966
645
- * Visit AMP option added below the View Site in Dashboard. #1076
646
- * Many Debug errors fixed #1109
647
- * Textarea for body tag which will help people add AMP Auto Ads #1064
648
- * Structured data improvements #1048 #1044 #1085 #1118
649
- * Twitter share URL based on users choice, you can allow people to share pretty links and short links. #1097
650
- * Author Avatar removed code fixed which has been displayed in the div "amp-wp-meta amp-wp-byline". #1087
651
- * Only one figure element is allowed in the article header FB Instant Articles #1127 & #1157
652
- * Image alt tags are empty and cause issues fixed. #1154
653
- * Button to copy the content into Custom AMP Editor #783
654
- * Rename AMP loop widget areas or add proper descriptions #1045
655
- * Trailing slash issue #1095
656
- * Related Posts by Post type featured added #1141
657
- * Ultimate Social Media Icons plugin causes validation issues fixed #1135
658
- * Adding proper path for functions.php, it was causing strange fatal errors and irregular white screen of death fixed  #1144
659
- * A smooth way to migrate from other AMP plugins to AMPforWP #1051
660
- * Alert added on AMP by Automattic installation. #1180
661
- * Insertion of strange spaces around H1 titles #1069
662
- * AMP Page Builder and HTTPS #1164
663
- * You can display comments from more than one vendor such as displaying WP & FB Comments #1150
664
- * Rename AMP loop widget areas or add proper descriptions #1045
665
- * FrontPage featured image with srcset #1063
666
- * An option for Showing featured image from custom field #1098
667
- * Added the Custom Front Page Title From Yoast SEO #1163
668
- * Commenting breaks SSI directives causes to display error #1179
669
- * rel canonical appears more than once in search pages #1195
670
- * Dev mode in AMP #1083
671
- * Social Sticky Icons Improvements #1061
672
- * Grand-Child support added in Design #1152
673
- * amp-accordion non-critical error in Design 3 & CSS improvements fixed #1152
674
- * Incorrect @id for mainentity #1080
675
- * Hide AMP by specific Categories tweaked for performance. Thanks to Joshua Eichorn @jeichorn CTO at Page.ly #1133 - Huge Thanks!
676
- * amp-auto-ads for sites with RTL support ON #1176
677
- * Redirected the Google forms to our contact page so that we can take each and every query and answer every person. #1201
678
- * ui-state-highlight class was conflicting with ACF date picker fixed #1199
679
- * Responsify WP Lazy loading causes blank image (Compatibility) #1131
680
- * amp-carousel scripts loading on the second page fixed in Design 3
681
- * Show Design screenshot while selection of design #1209
682
- * Switches Redesigned for better UX #1211
683
- * Welcome Page UX Improved #1214
684
-
685
- = 0.9.62 (25th September 2017) =
686
- * View more details on https://ampforwp.com/new/
687
- * INTRODUCING Page Builder 2.0 for AMP! [Learn More & Watch the Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
688
- * Documentation & Help links improved
689
- * Post type specific classes for targetting
690
- * Design name restored in Options panel (It was recently renamed to Appearance)
691
- * Minor Bug fixes as well
692
-
693
- = 0.9.61 (10th September 2017) =
694
- * View more details on https://ampforwp.com/options-restructured/
695
- * Options Panel Restructured Options were dividing into two parts: Settings and Appearance.
696
- * AMP Theme Framework Core Support Added. You can now create themes of your own in just minutes.
697
- * WPML Static Front Page Support #1111
698
- * Notification message disables when CF7 & gravity form is activated. #1107
699
- * Space after On in Design 3 #1114
700
-
701
- = 0.9.60 (4th September 2017) =
702
- * View more details on https://ampforwp.com/0-9-60-released-improved-redirection-66th-update/
703
- * Class added to View non-amp anchor tag
704
- * Params added properly to get rid of a warning #1077
705
- * rel=attachment noopener generating validation errors #1090
706
- * Breadcrumbs Support Added #701
707
- * Enable / Disable button added for Navigation Menu #735
708
- * Move the ad code for Instant Article down after the article #964
709
- * Add analytics code of FB instant articles properly #1096
710
- * datetime Tag not stripping properly #1043
711
- * Mobile redirection on custom post types #1028 #1052
712
- * Mobile Redirection causing extra redirect #879 #933
713
- * Proper mobile redirection on Homepage #1052
714
- * View non-amp on blog will redirect to blog
715
- * Blog will redirect to blog irrespective of AMP Homepage option #871
716
- * Dont redirect if archive support is disabled #1052
717
- * non-amp category pages should redirect to non-amp pages if turned off from Hide AMP #999
718
- * Disable amp for forum plugin (wpforo) #592
719
-
720
- = 0.9.59 (23th August 2017) =
721
- * Design 3 Images were not aligned properly. Fixed. #1040
722
- * Caption in the design 3 improved
723
- * Jetpack File not loading throwing fatal error #1038
724
- * If the mobile redirection is ON and the category is excluded to display the AMP then it should redirect properly
725
- * Custom Editor Compatibility issue with SiteOrigin PageBuilder fixed #997
726
- * Native Twitter Embed support
727
- * Added a hook after the body tag: ampforwp_body_beginning (commit)
728
- * GTM in AMP Improved #958
729
- * WP User Avatar compatibility Added #975
730
- * Alt tag on frontpage featured image added #1050
731
- * Blurred Images on the frontpage fixed #1050
732
- * Need to escape alt tag #1049
733
- * Debug errors & PHP warnings were fixed #859 #811 #830 #810
734
- * Proper rel canonicals for inner pages #1047
735
- * Added Video sanitizer for comments #1053
736
- * When activating the AMP plugin, display a notification in the popup. #1036
737
- * Video Sanitizer added for Comments
738
-
739
- = 0.9.58.1 (9th August 2017) =
740
- * Jetpack conflict issue solved #1038
741
- * Genesis SEO Support added #1013
742
- * Fixed Wrong SEO title issue #1013 and #836
743
- * Design 3 Carousel script loading method improved #990
744
-
745
- = 0.9.58 (9th August 2017) =
746
- * View more details on https://ampforwp.com/new/
747
- * Genesis SEO for AMP support added
748
- * AMP 0.4.2 Vendor Bundled for making it crash proof
749
- * Archive desc only on 1st page #1029
750
- * Ads are not working after 0.9.6 #1030
751
- * Fixed the Post 0.9.57 Update Bugs #1025
752
- * All Images are aligned on left side in design 3 #1031
753
- * Custom frontpage title issue in Design 3 fixed
754
-
755
- = 0.9.57 (5th August 2017) =
756
- * See the Full changelog https://ampforwp.com/0-9-57-released-compatibility-issue-fixed-62nd-update/
757
-
758
- = 0.9.56 (31st July 2017) =
759
- * View more details on https://ampforwp.com/page-break-in-amp/
760
- * Page Break / NextPage (Pagination) Support Added #834 #857 (Improvement)
761
- * Show/Hide AMP for Categories of Posts or All posts #872 (Improvement)
762
- * Adding analytics capabilities to Instant Articles #978
763
- * JetPack Plugin Conflict Solved #971
764
- * Social sharing code improved. amp-social-share js is getting added for line and WhatsApp social share #981
765
- * Code improvement for rel canonicals(home and archive)
766
- * Perfect SEO URL + Yoast SEO Compatibility #982
767
- * Some styling for tags to show up properly
768
- * Undefined index notices #960
769
- * Non-amp category pages should redirect to non-amp pages if turned off from Hiding AMP #999
770
- * Page builder text and button module issues #972
771
- * Documentation links updated in the Options panel
772
-
773
- = 0.9.55 (13th July 2017) =
774
- * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
775
- * Disqus Comments show up even when disabled per post #931
776
- * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
777
- * H3 inside OL in Related-Posts.php #930
778
- * Advertisement Options in Instant Articles #943
779
- * Incompatible with bootstrap plugin #525
780
- * Error in tag and category links #934
781
- * Pagebuilder Button module link had issues #951
782
- * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
783
- * WPtouch Pro Compatibility Issues #927
784
- * Better scripts compatibility in Single of post types #757
785
- * Instant Articles Error: "The HTML element does not contain any text" #949
786
- * added a filter in all the dates so a user can change the date format and modify #962
787
- * Design3 Menu Arrows are clickable along with the links #952
788
-
789
-
790
- = 0.9.54.2 (4th July 2017) =
791
- * Minor bug post 0.9.54 bug fixed
792
-
793
- = 0.9.54 (4th July 2017) =
794
- * View more details on https://ampforwp.com/new/
795
- * Facebook Instant Articles Support #862
796
- * Exclude Some Pages from Mobile Redirection #914
797
- * After 0.9.53 update amp-social-share js missing (critical issue) #924
798
- * Hooks added in Header (above and below)
799
- * View non AMP[Code improvement] #928
800
- * Pages are not supposed to show meta like this, especially Categories #894
801
- * Monarch plugin having design issues #925
802
- * Show AMP Hide AMP Check Box Fixes #794
803
-
804
- = 0.9.53 (19th June 2017) =
805
- * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
806
- * Compatibility Issue with Rocket Lazy Load plugin #907
807
- * Link color issue with UX of Color Pickers in Design 3 #731
808
- * amp-analytics js appears more than once when Google tag manager is used #885
809
- * SEO by SQUIRRLY is adding analytics twice #678
810
- * Fatal error when WPSEO is activated #900
811
- * Design 3 Sticky header should have an option #625
812
- * 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
813
- * Yandex Metrika support in AMP #585
814
- * Histats Analytics Support #880
815
- * Chartbeat Analytics Support #882
816
- * Do not strip Rel from anchor tags #790
817
- * Design close Resulting Blank Screen in AMP Site #642
818
- * Logo size is not applying #817
819
- * AMP Publisher logo guidelines #162
820
- * Remove amp-social-share extension .js from Custom Frontpage #899
821
- * Add compatibility with Sassy Social Share #679
822
- * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
823
-
824
- = 0.9.51.1 (12th June 2017) =
825
- * Redirection issue after 0.9.51 Update.
826
- * Improved compatibility with plugins.
827
-
828
- = 0.9.51 (8th June 2017) =
829
- * View more details on https://ampforwp.com/page-builder-released-in-amp/
830
- * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
831
- * Comments are not showing properly when words are long #861
832
- * Remove amp-social-share extension .js from Pages #853
833
- * The tag ‘amp-sidebar extension .js script’ appears more than once in the document #828
834
- * Remove Advertisement tab #839
835
- * Compatibility with Slide-in Plugin by WPMU dev #866
836
- * Mobile redirection issue with bbpress #867
837
- * All the data must be properly sanitize in the sidebar #849
838
- * AMP html should not be added on the second page of comments
839
- * Author page’s support #456
840
- * URLs in comments should be clickable(links) #869
841
- * Featured image should be centered in desktop mode #870
842
- * Added More Hooks #721 (Documentation on this coming soon!)
843
- * Page 2 goes to the wrong URL #865
844
- * Proper Title and meta for homepage and posts #850
845
- * Gist Support added #608 – Just add a shortcode and enjoy Devs (Ex: amp-gist id="b9bb35bc68df68259af94430f012425f )
846
- * /blog/amp pagination not working #875
847
- * separate the Text and Date format in design 2 #876
848
- * Comments show in AMP w/o breaks between paragraphs #873
849
- * If no featured image below hooks are not working #877
850
- * Change meta name Viewport and its value #878
851
- * Bolt icon in option #474
852
- * Code restructuring and code quality improvements.
853
- * Create a seperate function for comment code in frontpage.php #682
854
- * Remove all the duplicate code from frontpage.php of all the designs and use hooks to add the code instead of static code #889
855
- * Few Debug errors removed.
856
-
857
- = 0.9.50 (24 May 2017) =
858
- * View more details on https://ampforwp.com/facebook-comments-in-amp/
859
- * Design 3 Social Icons issue #832
860
- * View non AMP leads to /?nonamp=1 #814
861
- * Youtube shortcode compatibility improved #557
862
- * welcome.php should be shown only if user is “administrator” #696
863
- * Facebook comments support added in AMP #825
864
- * WP Like Button Compatibility #841
865
- * Custom Taxonomy Support added with Custom Post Type Extension.
866
- * Front page comments not found as expected #837
867
- * Fixed xml:lang tag issue #848
868
- * Sanitize Iframe in the archive description Fixed #845
869
- * Compatibility with Newspaper Theme by TagDiv #842 and #796
870
- * Some debug problems (blog page, style.php) #838
871
- * Featured Image hooks added
872
- * Twitter is misspelled #854
873
- * The core concept of the AMP Content builder has been built.
874
-
875
-
876
- = 0.9.49 (12 May 2017) =
877
- * View more details on https://ampforwp.com/0-9-49-released-small-important-bugs-fixed-56th-update/
878
- * Option added to display the excerpt in Single #806
879
- * Ability to add new invalid tags to filter out from AMP pages #809
880
- * In frontpage, comment button is pointing to wrong URL #812
881
- * Call now button and search is overlapping in Design-1 #784
882
- * Sticky Social Icons should be off if the CTA notification bar is on #788
883
- * Author bio in Design 1 and 2 #732
884
- * Styling in Taxonomy description causing validation issues #798
885
- * Twitter share(handle, url positions fixed) #815
886
- * Tables responsiveness in ALL Designs #726
887
- * Output all the categories and tags with their own ID’s in the div classes #750
888
- * Social Share Icons Overlap with Leave A Comment in Design 3 #716
889
- * Effective Measure Support on AMP #297
890
- * Custom AMP editor on pages should only be shown when page support is ON #756
891
- * AMP on website.com/blog without need of separate installation #775
892
- * GTranslate Compatible #819
893
- * Images and amp-anim styling added #725
894
- * Filter to make the title in a post to a link #727
895
- * Author Bio and Social Share button must not come in Pages #770
896
- * StatCounter is now compatible with AMP #361
897
- * Line Social media support #500
898
- * Footer menus for Design 1 & Design 2 #623
899
- * Strip out src=”about:blank” When Gravity Forms used #804
900
- * Add Compatibility with Crazy Lazy load plugin #751
901
- * Meta Titles and Description issues fixed with Yoast, All in one SEO and The SEO Framework #813
902
- * Double quotes in the Excerpt of the meta description is making AMP Invalidated #818
903
- * Missing featured image on static front page #824
904
- * Fatal error while activation: see the video 0.9.49 Beta #827
905
- * Review this code in archive.php in all 3 designs. #826
906
-
907
-
908
- = 0.9.48 (28 April 2017) =
909
- * View more details on: https://ampforwp.com/0-9-48-released-step-towards-multilingual-support-55th-update/
910
- * The default translation method of WordPress added. (Option in Translation panel to switch between * Translation panel and POT file #540)
911
- * 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.
912
- * Another Advertisement slot added below the post title in the Single post.
913
- * Fatal error: require_once report-bugs.php #747 fixed
914
- * Add / for codes in Meta Description #766 fixed
915
- * Controls re-adjusted & Renamed title of yoast description control in Options panel
916
- * Design-3 Slider URL redirecting to non-AMP page #758
917
- * Added new sanitizer For HTML to AMP-HTML conversion
918
- * Sanitized Archive descriptions so that it would convert to AMP
919
- * Comments sanitized with new sanitizer so that HTML tags automatically become AMP compatible.
920
- * 301 redirects on non-pretty internal links #767
921
- * Create a filter to modify the value of rel="amphtml" #778
922
- * Max-width added for images in comments
923
- * If in WooCommerce ?amp endpoint set then update href.
924
- * Undefined Variable (Debug) #733 and many other debug issues were fixed
925
- * Show last updated Post instead of published date #575
926
- * WooCommerce Widget added to display latest products on homepage. #763
927
- * add amp_post_template_above_footer hook global in all the designs #779
928
- * Excerpt on top of the content in Single #665
929
- * Subscribe box has been improved for the UX needs #712
930
- * Notice warnings since 0.4.2 update #740
931
- * AMP Comments Form Integration with the extension
932
- * Filter added on the loop in Homepage of the Design 3 so that it can be modified with an external plugin.
933
- * 404 on paged home page #781
934
- * Twitter handle should be at the end of the tweet not in the beginning #787
935
- * Wrong Rel Canonical for AMP Custom Frontpage #799
936
- * 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.
937
- * Extension page user experienced improved.
938
- * Removed old Youtube installation video and replaced with new one.
939
-
940
- = 0.9.47.2 (12 April 2017) =
941
- * Design-3 Slider URL redirecting to non-AMP page #758
942
- * Ads showing in comments #768
943
-
944
- = 0.9.47.1 (11 April 2017) =
945
- * Meta description option improved in SEO section #766
946
- * Fatal error: require_once report-bugs.php #747
947
-
948
- = 0.9.47 (10 April 2017) =
949
- * View more details at https://ampforwp.com/0-9-47-released-54th-update/
950
- * Meta saving method updated for customAMP content editor checkbox was causing some conflict.
951
- * Wrong Yoast title and structured data in Custom Frontpage fixed
952
- * CSS minification all 3 designs
953
- * Polylang flags in menu was causing validation issue, is now resolved
954
- * WPML flags in menu was causing validation issue, is now resolved
955
- * Standardized function created for content sanitization.
956
- * Archive description now displays AMP compatible markup
957
- * Comments markup sanitized for AMP
958
- * Design 3 images not aligned properly, fixed
959
- * Images are aligned to center in Design 1.
960
- * carousel ending with //amp instead of /amp – fixed #753
961
- * Title of the Post along with Post link when shared in twitter #683
962
- * Ads were cutting in half in RTL, fixed
963
- * Add / at the end of AMP links with in the AMP pages (Internal links) #668
964
- * Rendering the wrong URLs in front page if paged #742
965
- * Option to turn off AMP on all pages, so people can turn on only for specific pages #746
966
- * Need Meta Description on amp pages #741
967
- * Woocommerce Loop shortcode updated
968
- * Call Now Button added in header #563
969
- * Post images are not centered in Design 3 #695
970
- * UX of GTM settings done, since users were getting confused #700
971
- * Front page amphtml fixed for paginated pages
972
-
973
- = 0.9.45.6 (31 March 2017) =
974
- * Installation Process from welcome page was not working after WP Plugin DIR API change was fixed.
975
- * WP Rocket Minifcation and Concatenation was not working, its fixed now.
976
- * WP Rocket was tested properly to make sure everything is working fine.
977
-
978
- = 0.9.45.5 (25 March 2017) =
979
- * WP rocket conflict solved
980
- * Cannot set property ‘innerHTML’ of null issue fixed
981
-
982
- = 0.9.45.3 (21 March 2017) =
983
- * Post 0.9.45 bugs fixed and released as an urgent update.
984
-
985
- = 0.9.45.1 (19 March 2017) =
986
- * Post 0.9.45 bugs fixed and released as an urgent update.
987
-
988
- = 0.9.45 (18 March 2017) =
989
- * View more details at https://ampforwp.com/0-9-45-released-compatibility-rtl-53rd-update/
990
- * W3Total cache compatibility added
991
- * RTL Support added for Right-to-Left language websites.
992
- * Comments Pagination feature added
993
- * WP-Rocket Compatibility added
994
- * WPML Compatibility added
995
- * Quantcast analytics support added
996
- * ComScore support added
997
- * Custom Yoast title support added #685
998
- * 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]
999
- * Admin area UX improvements
1000
- * Adding notifications script in the correct way
1001
- * Comments now display on frontpage as well.
1002
- * Re-positioned non-amp Header link control to the right section.
1003
- * ?nonamp=1 only displays when the Mobile redirection is on
1004
- * Properly adding iFrame js.
1005
- * Custom Post type incompatibility fixed
1006
- * Widgets added to the Custom Frontpage.
1007
- * Stripping shortcodes from excerpts.
1008
- * Custom content on static frontpage had over riding issue #687
1009
- * Option added for controlling number of comments
1010
- * Welcome page should be shown only if user is “administrator” #696
1011
- * Digg Digg social share compatibility #694
1012
- * Removed unnecessary lines from Design 3
1013
- * Sanitized Archive Description to amp Compatible #659
1014
- * Author box now displays HTML properly #645
1015
- * Date added Design-3 in meta #583
1016
- * Options link was removed from wp-admin tool bar after a feedback from a user.
1017
- * Footer sub menus layout compatibility.
1018
-
1019
-
1020
- = 0.9.44 (5 March 2017) =
1021
- * View more details at https://ampforwp.com/user-experience-52nd-update/
1022
- * Added Welcome Screen for better User experience. [Enhancement]
1023
- * Undefined Index debug error resolved [Bug fix]
1024
- * All in one SEO Support support tested [3rd party compatibility]
1025
- * Frontpage title in Design 3 is out of the container #644 [Bug fix]
1026
- * Default Table markup in AMP #643 [Enhancement]
1027
- * AMP carousel is not working on Frontpage #641 [Bug fix]
1028
- * Social share .js was getting added even when it was not required #638 [Bug fix]
1029
- * Search Feature added for Design 1 & Design 2 [Major Improvement]
1030
- * Accordion script loading issue in Design 3 #634 [Bug fix]
1031
- * ?nonamp=1 links should be nofollow #622 [Bug fix]
1032
- * Same Header and Color Scheme are making header elements invisible #629 [Enhancement]
1033
- * In Search AMP rel canonical was different #631 [Bug fix]
1034
- * Non-AMP link in Design 3 was not working when mobile redirection was enabled #632 [Bug fix]
1035
- * Search form text strings are now added in the translation panel #607 [Bug fix]
1036
- * Load AMP-ads conditionally only if ads are available #609 [Bug fix]
1037
- * Added compatibility with Custom post type extension. Option to hide/show AMP on all custom post types #587 [Bug fix]
1038
- * Report a Bug & Request feature links added [Enhancement]
1039
- * If there was no menu set in Design 3 then all pages were getting displayed. #613 [Bug fix]
1040
- * The tag Font is disallowed #616 [Validation Improved]
1041
- * index/noindex separately added for Tags and also for Categories #606 [Enhancement]
1042
- * Use of undefined constant AMP_QUERY_VAR #596 [Bug fixed]
1043
- * Logo is not centered in Design 3 #586 [Bug fixed]
1044
- * Remove defer, a very rare type of defer was getting added #589 [Validation Improved]
1045
- * Disqus comments iframe had scrolling issues #566 [Bug fixed]
1046
- * Left side blank gap in the RTL in design 2 #541 [Bug fixed]
1047
- * Inline Styles not working correctly in Custom AMP Editor #533 [Bug fixed]
1048
- * Re-save permalinks issues. Flushing rewrites with options saved. #511 [Improvement]
1049
- * Code review and cleaning of the customizer #404 [Code Cleaning]
1050
- * Google Search iframe had some header alignment issues in Design 3. #624 - Thank you Leo Osa @leoosa for the contribution! [Bug fixed]
1051
- * AMP Frontpage + Override AMP Content = Blank page #604 [Bug fixed]
1052
- * 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]
1053
- * 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]
1054
- Reformatting and Minifying of stylesheet [Code Cleaning]
1055
- * Created a new section for Homepage and moved some controls from other areas to the home section for the better user experience. [User Experience]
1056
- * Override Homepage Thumbnail size option added. It will give you more control over your thumbnails. [Major Improvement]
1057
- * 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]
1058
- * Extra amp-carousel script loading is now fixed. [Bug fixed]
1059
- * Crafting of layout code in design 2 and design 3, especially with social icons area. [Code Cleaning]
1060
- * Design of search form was not clickable in iOS devices #621 [Bug fixed]
1061
- * 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]
1062
-
1063
- = 0.9.43.6 =
1064
- * View more details at https://ampforwp.com/stability-sprint-3-51st-update/
1065
- * Typo in the is_home() function fixed
1066
- * Option to hide/show AMP on all custom post types #587
1067
- * False detection by Windows defender tool fixed
1068
- * Conditional tags were not compatible with Advanced AMP ads which were causing some conflicts but is now fixed.
1069
-
1070
- = 0.9.43.5 =
1071
- * View more details at https://ampforwp.com/stability-sprint-2-50th-update/
1072
- * Fixed shortcodes issue in related posts #543
1073
- * Iframe Scripts Added properly
1074
- * Proper conditions added for the social section of Design 3
1075
- * Featured Image issue stretched in Design 2 & 3
1076
- * Removed extra global $redux_builder_amp;
1077
- * Custom Logo Dimensions option added #479
1078
- * Index & NoIndex options added for SEO section. #558
1079
- * Added URL for rewrite flushing rules in Options
1080
- * Option to enable and disable the Author area in Design 3#577
1081
- * Rel Nofollow added in credit link
1082
- * debug issue solved: fn_offset not defined
1083
- * debug issue solved: global $post not declared
1084
- * The word 'ago' is now translatable in design 3
1085
- * The word 'read next' is translatable now
1086
- * Tablepress compatibility added #392
1087
- * Secure API server is now serving through Google Cloud Manager.
1088
- * Thrive Content builder was displaying twice when the Custom AMP content was on. It was a complex issue which has been solved now.
1089
- * amp-ad extension.js script was loading if the Ads are not enabled. #598
1090
- * Social Share Extension Included on Homepage even if we didn't have social icons #599
1091
- * Installation UX improvement #593
1092
- * Removed duplicate global variable
1093
- * Proper OG tags added #588
1094
- * Proper instructions added for Custom AMP content #471
1095
-
1096
-
1097
- = 0.9.43.1 =
1098
- * View more details at https://ampforwp.com/0-9-43-1-released-stability-sprint-1-49th-update/
1099
- * Emoji in comments leads to AMP errors
1100
- * Design 1 showing time on archives
1101
- * Added some space between the archive label.
1102
- * Lazy loading plugins compatibility #544
1103
- * Custom header and footer areas
1104
- * Sticky posts now come on top #564
1105
- * Footer non-amplink added in design 3 #562
1106
- * HTML Paragraph tag is shown in the title in category! #518
1107
-
1108
- = 0.9.42 =
1109
- * View more details at https://ampforwp.com/design-three-update/
1110
- * 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]
1111
- * Ticket #517 Added Upload field into Redux core [3rd party Compatiblity]
1112
- * Ticket#529 Controls for archive titles added [Improvement]
1113
- * Ticket #548 Jetpack photon code removed
1114
-
1115
- = 0.9.41 =
1116
- * View more details at https://ampforwp.com/disqus-comments-in-amp/
1117
- * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
1118
- * AMP WooCommerce supported tag was missing after the last update. [Bug fix]
1119
- * Homepage & Related Posts was displaying private and protected posts, which is now fixed [Bug fix]
1120
- * Next previous links added in Design 1 [Enhancement]
1121
- * Invalid Post Time displaying in the homepage of Design 1 [Bug fix]
1122
- * Twitter share now includes the twitter handle of the author with setting in options [Enhancement]
1123
- * Emoji in comments leads to AMP errors was fixed [Bug fix]
1124
- * Date are now displayed on archives in Design 1 [Enhancement]
1125
- * When RTL enabled logo merges with nav bar was fixed [Bug fix]
1126
- * Jetpack Photon compatibility added [3rd Party Compatibility]
1127
-
1128
- = 0.9.40 =
1129
- * View more details at https://ampforwp.com/0-9-40-released-biggest-stability-update/
1130
- * Proper endpoints added [Improvement]
1131
- * Flush Rewrites properly [Improvement]
1132
- * REL Canonical properly getting added. [Improvement]
1133
- * Proper Frontpage Canonical added [Improvement]
1134
- * Added Base name support for categories and tags [Improvement]
1135
- * Redirection of excluded post solved. [Bug fix]
1136
- * Archives properly redirecting to the right URL [Bug fix]
1137
- * Homepage redirection solved [Bug fix]
1138
- * Plusone tag is stripped properly. [Validation Issue fixed]
1139
- * Archives are now clickable. [Improvements]
1140
- * WP_Query filter added for better customizability of Homepage loop. [Better Customizations]
1141
- * Social share boost plugin compatibility. [3rd party Customizations]
1142
- * Removed H1 from the frontpage even if it is not available. [Improvement]
1143
- * H3 instead of H1 for Site title. So there is only one H1 per page. [SEO Improvement]
1144
-
1145
- = 0.9.38 =
1146
- * View full details at https://ampforwp.com/google-tag-manager-for-amp/
1147
- * Google Tag manager included [New feature]
1148
- * Iframe max-width added [Improvement]
1149
- * Paginated pages have different titles now. [Bug fix]
1150
-
1151
- = 0.9.37 =
1152
- * View full details at https://ampforwp.com/category-tags-archive-support-added/
1153
- * Debug issues solved [Bug fix]
1154
- * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
1155
- * Category, Tags & Archive Support with titles added [Enchancement]
1156
- * Archive Title support added [Enchancement]
1157
- * There were some issues with attachments [Bug fix]
1158
- * removed ? from amp url's [Improvement]
1159
- * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
1160
- * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
1161
- * Added an option to turn off AMP support for Homepage. [Enchancement]
1162
- * Too many redirects issue on homepage is fixed #435 [Improvement]
1163
- * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
1164
- * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
1165
- * Comment anchor link changed for simplecomment button files in both designs [Improvement]
1166
- * Redirection Loop issue fixed [Bug fix]
1167
- * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
1168
- * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
1169
- * Improved Sessions [Improvement]
1170
- * Advnaced Settings panel was created for better user experience. [Improvement]
1171
- * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
1172
- * RTL issue fixed #454 [Bug fixed]
1173
-
1174
- = 0.9.36 =
1175
- * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
1176
- * 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]
1177
- * Hide advertisement section if advance ads plugin is active. [Better User experience]
1178
- * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
1179
- * 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]
1180
-
1181
- = 0.9.35 =
1182
- * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
1183
- * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
1184
- * Attachment page was having the wrong endpoint. [Bug fix]
1185
- * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
1186
- * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
1187
- * Lang attributes were added [Enhancement]
1188
- * The tag like was disallowed in the AMP [Validation Improvement]
1189
- * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
1190
- * AMP on Pages option was not working in some cases. [Bug fix]
1191
- * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
1192
- * g:plusone tag was not getting removed properly. [Validation Improvement]
1193
- * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
1194
- * Structured Data Image width issue solved [Enhancement]
1195
- * 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]
1196
- * imageanchor=”1″ was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
1197
-
1198
- = 0.9.34 =
1199
- * Newspaper theme by Tagdiv was having issues, we have fixed this one.
1200
-
1201
- = 0.9.33 [15th Jan 2017] =
1202
- * Full details at https://ampforwp.com/debug-errors-shortcodes/
1203
- * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
1204
- * Debug errors fixed, Code is now much cleaner.
1205
- * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
1206
- * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
1207
- * Properly removes AMP if turned off from Post panel
1208
- * z-index position improved on Sticky Social bar
1209
- * Better compatibility with shortcodes.
1210
- * Divi Standard Layouts Compatibility
1211
- * Properly Hide AMP posts if excluded. #367
1212
- * Mobile redirection was causing loop issues which are now fixed.
1213
- * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
1214
- * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
1215
- * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
1216
- * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
1217
-
1218
- = 0.9.32 [7th Jan 2017] =
1219
- * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
1220
- * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
1221
- * Paginated pages on homepage redirect to homepage URL #335
1222
- * Title of the page should be displayed on the FrontPage #358
1223
- * Thrive Builder AMP Validation Compatibility, so it will be validated properly in AMP.
1224
- * Twitter Sharing improved so it gets the data properly #341
1225
- * Option to change the number of Related Posts #290
1226
- * Validation errors due to rel="canonical" was missing on some pages
1227
- * Comment button displays even if the comments are not available
1228
- * Threaded comments were duplicating, so that issue is solved and added proper CSS for it.
1229
- * Minor issue with Jetpack Comments fixed.
1230
- * Missing amp-social-share.js on front page fixed #372
1231
- * Minor improvements to Title and description tags.
1232
- * Analytics Script was loading twice when Glue was active.
1233
- * Page specific class added for better customization compatibility #377
1234
- * Inline Style support added Fixed #356
1235
- * Bugs fixed in Email notification pointer
1236
-
1237
- = 0.9.31 [2nd Jan 2017] =
1238
- * Proper Details at https://ampforwp.com/amp-0-9-31-released-installation-user-experience/
1239
- * Proper Condition added for the scripts to load in Frontpage.php
1240
- * Rel canonical properly added for front pages
1241
- * 404 and Archive page Mobile redirection code refined
1242
- * User Experience Improvement: Installation process was improved
1243
-
1244
- = 0.9.3 [31th December 2016] =
1245
- * Proper Details at https://ampforwp.com/custom-amp-content-editor/
1246
- * 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.
1247
- * FrontPage had some validation issues. [Bug fix]
1248
- * Related posts in Design 1 we're redirecting to 404 fixed [Bug fix]
1249
-
1250
- = 0.9.2.2 [27th December 2016] =
1251
- * Proper Details at https://ampforwp.com/polishing-user-experience-improvements/
1252
- * Made the Options panel user-friendly
1253
- * Social Share on frontpage issue fixed.
1254
- * Readme.txt made user-friendly.
1255
- * Archive option removed and some UI improvements
1256
- * Single was not displaying the Title
1257
- * 'Type is not allowed' [Validation issue fixed]
1258
- * noshade tag Validation issue fixed
1259
-
1260
- = 0.9.2.1 [24th December 2016] =
1261
- * Proper Details at https://ampforwp.com/step-towards-fixing-amp-validation-errors/
1262
- * Disabled the Tags and Categories support for AMP for better validation until we find a better solution.
1263
- * Mobile redirection bug fixed, It was continuously redirecting to the same page [Bug fix]
1264
- * trailingslashit added to make sure we have proper url for Mobile redirection [Bug fix]
1265
- * In content AD overlapping the content issue fixed
1266
-
1267
- = 0.9.2 [23th December 2016] =
1268
- * Proper Details at https://ampforwp.com/mobile-redirection/
1269
- * AMP Mobile Redirection Feature added. It can be turned on from Dashboard > General and then Mobile Redirection. [New Feature]
1270
- * Archive title and description added [Improvement]
1271
- * Improved the Speed of the AMP version #321 [Improvement]
1272
- * Anchor link was not closing fixed #328 [Bug Fix]
1273
- * Typo in Trailingslashit function which resulted in some issues in the Homepage version [Bug Fix]
1274
-
1275
- = 0.9.1.2 [20th December 2016] =
1276
- * Proper Details at http://ampforwp.com/new/
1277
- * DoubleClick Support
1278
- * Custom Post Type Support
1279
- * Ratings Support
1280
- * Comments Gaping fix
1281
- * Custom Excerpt code
1282
- * Better Compatibility with Yoast SEO plugin
1283
- * AMP Validation error in Design 1 Fixed
1284
- * Proper Homepage title & Description with Yoast SEO plugin issue fixed
1285
- * Design -1 Excerpt too big for mobile devices, Fixed
1286
- * Advertisement support on Design 1
1287
- * Link to Tags & Categories were having some issues.
1288
- * AMP looking bad on big devices
1289
- * AMP validation Improvement: Lightbox plugins compatibility
1290
- * Huge Progress in AMP Validation Errors: Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
1291
- * Page Performance: Removed default Google font loading
1292
- * Page Performance: DNS Prefetch tag added for faster DNS Handshake
1293
-
1294
- = 0.9.1 [16th December 2016] =
1295
- * Proper Details at http://ampforwp.com/new/
1296
- * PHP7 Compatibility
1297
- * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
1298
- * Custom CSS not working in Design one (#249)
1299
- * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
1300
- * How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
1301
- * Non-amp Homepage support added (#267)
1302
- * using get_avatar() (#259)
1303
- * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
1304
- * Validation Issue fixed: Script Tag removed from the content.
1305
- * Featured image in Design 1 in single #261
1306
- * After Fresh installation - a save is required Fixed
1307
- * Excerpt length controlled
1308
- * Design One has thumbnails on the Homepage
1309
- * Non-AMP link goes to the wrong page, issue fixed.
1310
- * Archive pages were broken, fixed.
1311
- * Option to Enable & Disable the Next/Previous links in Single
1312
- * WhatsApp sharing not working, issue fixed.
1313
- * Category Taxonomy has extra ':' in the word.
1314
- * The word 'Ago' is now translatable.
1315
- * Yoast SEO with AMP compatibility issue fixed.
1316
- * Several Minor Polishing in the code
1317
- * Footer Ad gets covered by Sticky Social Icons (#269)
1318
- * Smaller image size when “image caption” is used in Design-2 (#263)
1319
- * Footer ad with Sticky Social bar issue fix
1320
- * Checked with WordPress 4.7
1321
- * Ad #1 was messing up with the title, issue fixed.
1322
- * Compatibility improved with AMP WooCommerce.
1323
-
1324
- = 0.9 =
1325
- * Proper Details at http://ampforwp.com/amp-pagebuilder/
1326
- * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
1327
- * 100% Yoast Compatible , Now no need to have additionally Glue Installed
1328
- * 100% completed Translation panel, Now absolutely anything on page is translated
1329
- * Added Option to turn on/off Page Support
1330
- * Styling for Tags was Corrected
1331
- * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
1332
- * Default Image alignment styling added
1333
- * Added Option to turn on/off Page Support
1334
- * Related Posts Now use Custom Excerpt if it Exists
1335
- * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
1336
- * <pre> Tag styling issue fixed for AMP pages
1337
- * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
1338
- * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
1339
- * 2 New Designs added
1340
- * SEO Panel Added
1341
-
1342
- = 0.8.8 =
1343
- * Proper Details at http://ampforwp.com/amp-0-8-8-released-translation-panel/
1344
- * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
1345
- * Badge Tag was throwing Validation error
1346
- * Plusone tag validation error was fixed
1347
- * Time tag was validation error was fixed
1348
- * User experience for Mobile devices was improved
1349
- * Meta info was messing up in smaller devices, it was fixed as well.
1350
- * Internal AMP linking added for Categories and Tags
1351
- * Future errors for AMP ads was fixed
1352
- * Blockquote styling added
1353
- * “Please Activate parent Plugin settings” added for better User Experience.
1354
- * Related Post Ux improvement
1355
- * Plugin version added in Footer source code for better debugging
1356
- * Added Support for Default WordPress Image alignment
1357
- * New action hooks added in index page
1358
- * Featured Image Size options added
1359
-
1360
- = 0.8.7 =
1361
- * Proper Details at http://ampforwp.com/amp-0-8-7/
1362
- * added option to enable/disable AMP on Archive pages (Ticket #188)
1363
- * Solved 404 on Related Posts (Ticket #178 )
1364
- * Related posts by either categories or Tags(Ticket #179)
1365
- * added a link to menu Section from the AMP Options page(Ticket #190)
1366
- * Added Support for Piwik Analytics(Ticket #163)
1367
- * Added Support for Segment.com Analytics(Ticket #50)
1368
- * Added a switch for hiding Non-Amp page link from Footer.( Ticket #189)
1369
- * Added an Option that strips Users URL from Comments Section(Ticket #180)
1370
- * Fixed stripping <date> tags from the content , Since it was preventing validation – amp-img issues fixed
1371
- * UX Improved for every section of AMP Options page
1372
- * Added Settings button on plugin page
1373
- * Related posts switch added
1374
- * Removed carousel.js
1375
-
1376
-
1377
- = 0.8.6.1 =
1378
- * Date Tag fix
1379
- * Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
1380
-
1381
- = 0.8.6 =
1382
- * Proper Details at http://ampforwp.com/amp-0-8-6-released-related-posts-comments/
1383
- * Related Posts
1384
- * Post Comments
1385
- * WhatsApp sharing button – Your visitors can now easily share the content over the whatsapp.
1386
- * Validation issue fixed by All In One Schema.org Rich Snippets plugin
1387
- * Removed Google Fonts loading for Performance
1388
- * New relic Support
1389
- * Class added to ‘View Non-AMP Version’ text
1390
- * Archives Structured Data issue fixed
1391
- * Some instances img tags converted into amp-img automatically.
1392
-
1393
-
1394
- = 0.8.5.3 =
1395
- * Canonical issue fixed for Post
1396
-
1397
- = 0.8.5.2 =
1398
- * Canonical issue fixed for FrontPage
1399
-
1400
- = 0.8.5.1 =
1401
- * Proper Details at http://ampforwp.com/new/
1402
- * Validation issue fixed: 'Value' tag
1403
- * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
1404
- * Validation issue fixed: Table markup
1405
- * Validation issue fixed: nowrap and misc tags
1406
- * New Relic Support
1407
- * Tags on off option
1408
- * Canonical and correct AMP html Redirect issues Solved
1409
- * NextGEN Gallery Validation Support Added
1410
-
1411
- = 0.8.5 =
1412
- * Proper Details at http://ampforwp.com/the-0-4-compatibility/
1413
- * AMP 0.4 Compatibility Check
1414
- * Even better Structured Data Validation, Once in for all!
1415
- * Structured Data Options to eliminate Validation errors
1416
- * AMP Page Exclude option
1417
-
1418
- = 0.8.4 =
1419
- * Proper Details at http://ampforwp.com/blog/structured-data-validation/
1420
- * Structured Data Validation
1421
- * Navigation Text Change
1422
- * Inline Style Validation
1423
- * Form Validation
1424
- * Frontpage shows the amphtml rel twice fixed
1425
- * Facebook Sharing not working
1426
-
1427
- = 0.8.3 =
1428
- * Prefix added in the Content filter
1429
- * Extra space after quote in Ads
1430
-
1431
- = 0.8.2 =
1432
- * Proper Details at http://ampforwp.com/blog/the-custom-frontpage/
1433
- * Custom AMP FrontPage
1434
- * Featured Image
1435
- * New Mobile Friendly Advertisement sizes
1436
- * Single Post Pagination Option
1437
- * RTL Support
1438
- * Notifications
1439
- * Gaping if the Meta was turned off.
1440
- * Analytics was not fetching the user id properly.
1441
- * Page was not using the post template along with the AD support.
1442
- * AMP Endpoint support for Paged when the front page is active.
1443
- * UI improvement of Admin panel
1444
- * Few Validation issues fixed
1445
-
1446
- = 0.8.1 =
1447
- * Warning: Cannot modify header information error fixed
1448
- * Validation issue fixed. KK Star Plugin compatible.
1449
- * Gaping in the smaller screens fixed
1450
-
1451
- = 0.8 =
1452
- * Proper Details at http://ampforwp.com/blog/the-change/
1453
- * 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.
1454
- * 99.5% Validation issues were fixed.
1455
- * Page builder & Shortcodes Compatibility Support Added
1456
- * Conflict with JSON API
1457
- * Carousel support for Gallery
1458
- * Better Image stretching and resizing
1459
- * Youtube Video Embed Support
1460
- * Vine Embed Support
1461
- * Twitter oembed Support
1462
- * Instagram Embed Support
1463
- * Facebook Video Embed Support
1464
- * Better Future Compatibility
1465
-
1466
- = 0.7.7 =
1467
- * Proper Details at http://ampforwp.com/blog/amp-0-7-7/
1468
- * Big Validation Error fix Update
1469
- * Disable AMP support on specific Pages and Posts
1470
- * Option to disable the Post meta from the Single
1471
- * Footer Credits and Copyright Text Option
1472
- * New options for Social Sharing Bar in Single
1473
- * Jetpack Social & Related Sharing Issue fixed
1474
- * Gaping in footer if the Sticky bar is enabled
1475
- * Text domain added on few strings
1476
-
1477
- = 0.7.6 =
1478
- * Google Adsense Support Added with AMP-Ad
1479
- * Wrong Homepage rel amphtml bug fixed
1480
-
1481
- = 0.7.5 =
1482
- * Google Analytics Support Added
1483
- * Logo Support Added. If the logo is disabled, then the Title should be activated.
1484
- * Color Scheme Feature Added
1485
- * User friendly Options Panel Added
1486
- * iFrame support Added
1487
- * Few Minor Bugs Fixed
1488
-
1489
- = 0.7.1 =
1490
- * Bug #24 (Github) fixed
1491
- * Strip Style tags for faster & better validation
1492
- * Bug #21 (Github) fixed
1493
-
1494
- = 0.7 =
1495
- * Canonical Improved
1496
- * Navigation Validation bug fixed
1497
- * Two more validation bugs fixed ('role' and 'tabindex' attribute)
1498
- * Featured image automatically hides if it is not present
1499
- * Validation issues in the images of the post's the_content
1500
-
1501
- = 0.6 =
1502
- * Improved Navigation Menu
1503
- * Search Console errors fixed
1504
- * Social Sharing option
1505
- * Pages support
1506
- * Force redirection for mobile users removed and many other bug fixes
1507
-
1508
- = 0.5 =
1509
- * Added AMP Markup for Google Structured data. This will fix the issues in Webmaster tools.
1510
-
1511
- = 0.4 =
1512
- * Support of Custom menu added for AMP enabled sites
1513
-
1514
- = 0.3 =
1515
- * Support of amp-img added in single posts
1516
- * minor css bug fixed
1517
-
1518
- = 0.2.5 =
1519
- * Minor bugs fixed
1520
- * ?mobile & ?nomobile is now ?amp & ?noamp
1521
-
1522
- = 0.2 =
1523
- * White Screen of death issue fixed
1524
- * Plugin URI updated
1525
-
1526
- = 0.1 =
1527
- * 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.85
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.85 (3rd April 2018) =
182
+ * For more detials check out [this blog post](https://ampforwp.com/0-9-85-released-stability-update-86th-update/)
183
+ * Fixed: Fatal error: Allowed memory size on FrontPage #1865
184
+ * Fixed: Proper Parameters for Pinterest Sharing #1853
185
+ * Added: Extra settings added in Button Module
186
+ * Added: Extra settings added in Text Module
187
+ * Fixed: Proper Parameters for Pinterest Sharing
188
+ * Fixed: Unwanted fields are removed form the Repeater in Button module
189
+ * Added: Enable/disable option added Related Posts #1829
190
+ * Fixed: Legacy PageBuilder option Repositioned #1851
191
+ * Fixed: Display the img tag only if source is present #1869
192
+ * Fixed: Huge design improvements in Swift theme #1818
193
+ * Added: Hook for Between Related Post is Added #1874
194
+ * Added: Blurb module text size and background color added
195
+ * Fixed: Comments Pagination issues #1816
196
+ * Added: Counter Module added
197
+ * Fixed: Date 48 years ago #1864 #1876
198
+ * Added: Ability to pass post id in amp_content() #1872
199
+ * Fixed: Changed the way images we fetched in WooWidget #1847
200
+ * Fixed: Changed the position of layout in Pagebuilder #1873
201
+ * Added: Pricing Module
202
+ * Fixed: Changed the position of layout in Pagebuilder #1873
203
+ * Fixed: amp_aq_resizer was not able to process the outside url #1881
204
+ * Fixed: Advanced Google Analytics improvements #1630 #1860
205
+ * Added: Field Added For ON & OFF in Page builder #1870
206
+ * Fixed: Two paginations in search pages in Swift theme #1855
207
+ * Fixed: Extra Div if categories not available #1856
208
+ * Fixed: removed debuged tags #1870
209
+ * Fixed: Published date connected with AMP options Panel #1888
210
+ * Added: Featured Image option in Swift #1889
211
+ * Added: Separate Blog settings #1887
212
+ * Fixed: single post ads should not load on pages #1896
213
+ * Fixed: Ads should not load on FrontPage if PageBuilder is enabled #1885
214
+ * Fixed: Background Image Support for the Columns #1871
215
+ * Added: Blockquotes design for Swift #1894
216
+ * Added: Co-Authors Plus compatibility #1895
217
+ * Added: pagebuilder for custom post types #1884
218
+ * Added: Border option is connected to options panel #1818
219
+ * Added: Responsive AD unit support #1852
220
+ * Added: Sub category arrow symbol is added in Swift theme #1818
221
+ * Added: Search text color is connected to options panel #1818
222
+ * Fixed: Removed notice when no posttype selected #1884
223
+ * Added: Ability to overwrite page template the WordPress way like front-page.php and page-{id}.php #1902
224
+ * Added: Ability to overwrite author page template the WordPress way like author.php and author author-name.php #1902
225
+ * Added: Lightbox Support for the images #1892
226
+ * Fixed: No mobile redirection when Dev mode is enabled #1907
227
+ * Added: Option to hide Author name in Swift #1890
228
+ * Fixed: Script facebook-comments should not load for Frontpage #1897
229
+ * Added: amp-facebook comments for AMP2WP #1911
230
+ * Added: Alt tag in all modules #1898
231
+ * Added: Sanitizers in Footer and sidebar widget in Swift #1835
232
+ * Added: Dropcap support #1900
233
+ * Added: Proper styling for iframes and videos in Swift theme #1909
234
+ * Fixed: Non-AMP link fixed for AMP Takeover #1916
235
+ * Fixed: Swift connected with Breadcrumb option #1915
236
+ * Added: Uninstall option created to completely remove AMPforWP data #1903
237
+ * Fixed: Recipe Structured Data requires name attribute #1917
238
+ * Fixed: No amphtml when It is hidden from Categories #1919
239
+ * Fixed: Content is breaking when Inline Related Post option is enabled #1912
240
+ * Fixed: Proper redirection setup for AMP Takeover #1913
241
+ * Added: Social media profiles added in menu #1901
242
+ * Fixed: No Ads should display on Frontpage or Posts if Pagebuilder is enabled #1885
243
+ * Added: #1899 Proper conditions for amp-analytics script
244
+ * Fixed: Turn off option not working by default fixed #1537
245
+ * Fixed: BreadCrumbs Should not load when PageBuilder is enabled #1925
246
+ * Fixed: Removed unwanted elements loading while pagebuilder is enabled #1929
247
+ * Fixed: amp-web-push should not load on Homepage and Blog #1930
248
+ * Added: SmartMag theme Compatibility #1905
249
+ * Fixed: Template overriding not working in child theme #1920
250
+ * Fixed: Horizontal scrolling in Swift #1844
251
+ * Fixed: Home page title should not be visible in AMP takeover #1921
252
+ * Added: Carousel Module Added #1937
253
+ * Fixed: Comments pagination not working #1816
254
+ * Fixed: Comments pagination not working #1816
255
+ * Added: Glue html css compatibility #1932
256
+ * Added: Data Caption Support on AMP Instagram Embed #1938
257
+ * Added: Ability to pass {author_name} and {author_id} added in Advance Analytics #1936
258
+ * Fixed: Scrollbar in Header area in Swift in firefox #1818
259
+ * Added: Disqus iframe height adjustment option #1935
260
+ * Fixed: Options panel conflict fixed with Mobius theme #1942
261
+ * Fixed: Problem with Button in Mobile view in Swift #1926
262
+ * Fixed: Removed canvas tag in AMP version causing validation errors #1880
263
+ * Fixed: Getting Conflict with Facebook Button by BestWebSoft #1740
264
+ * Added: Option to enter the "ID" on CTA button module #1931
265
+ * Added: Option for open same window in CTA module of page builder #1866
266
+ * Fixed: Logo fetch causing Huge performance issue #1679
267
+ * Fixed: Blurb module's default values were not set #1952
268
+ * Fixed: Allow script with application/ld+json #1958
269
+
270
+ = 0.9.84 (14th March 2018) =
271
+ * Added: Polylang Frontpage compatibility added #1779
272
+ * Fixed: Proper link for Linkedin added #1820
273
+ * Fixed: Incorrect function name was Added #1827
274
+ * Fixed: Thumbnail resizing issue in Swift #1828
275
+ * Fixed: Thumbnail issue in Loops of Design 3 #1714
276
+ * Fixed: Hide post builder for Swift #1824
277
+ * Fixed: To avoid warnings when there are no pages in WordPress #1810
278
+ * Fixed: Condition for the Thumbnail for Swift #1733
279
+ * Fixed: Proper Styling for footer for Swift #1733
280
+ * Fixed: Line height issue and CSS editor not working in Swift #1821
281
+ * Fixed: Renamed aq_resize to ampfrowp_aq_resize to avoid conflicts #1838
282
+ * Fixed: Add the prefix to avoid conflicts #1817
283
+ * Fixed: Added Custom format option in amp_date #1845
284
+ * Fixed: Removed amp-img tag where blank SRC in Page builder #1843
285
+ * Fixed: Pagebuilder modal max-height removed so it will become full width #1843
286
+ * Added: An option for select target type in Button Module #1822
287
+ * Fixed: Remove AMP category widget if swift is enabled #1790
288
+ * Fixed: Filter added change mode type #1833
289
+ * Added: Rewrite rule for .html blog page #1775
290
+ * Fixed: Filter added change mode type #1833
291
+ * Fixed: Swift Footer Widget Sanitizer Added #1800
292
+ * Fixed: No OneSignal widget when PageBuilder is enabled #1840
293
+ * Fixed: span tag added around the pagination text #1834
294
+ * Added: Page specific option to add script/html and styles in page builder #1831
295
+ * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
296
+ * Added: Jarida theme compatibility added #1842
297
+ * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
298
+ * Fixed: Replace value attribute only from html tags. Otherwise it is removing value from * shortcodes which is breaking the whole page. #1738
299
+ * Added: Underline option for content links added #1808
300
+ * Added: Page specific option to add RTL in page builder #1858
301
+ * Added: Converts AMP ads to normal so ads show when takeover is enabled in Normal Mode #1724
302
+ * Added: Converts AMP Analytics to normal so Analytics works when takeover is enabled in Normal Mode #1724
303
+ * Fixed: Phone icon proper alignment in Design3 #1730
304
+ * Added: ADS for WP activation box in Extensions tab
305
+ * Added: New design field added #1861
306
+
307
+ = 0.9.83.1 (8th March 2018) =
308
+ * Fixed: Pagebuilder contents not shows on custom home page #1794
309
+ * Added: Header hook added `ampforwp_advance_header_layout_options`
310
+ * Fixed: Load admin files only in admin pages #1799
311
+ * Fixed: Conflict with WP bakery pagebuilder #1783
312
+ * Fixed: Slide in Menu break in RTL mode #1825
313
+ * Fixed: Validation issue in loops due to empty attributes #1795
314
+ * Fixed: Featrued Image connected Properly with Swift theme #1733
315
+ * Fixed: Changed the disqus.php to disqus.html to pass authentication #1788
316
+ * Added: CSS styling for Loop on shop page #1803
317
+ * Fixed: Facebook comments not work in swift #1789
318
+ * Fixed: Style AMP Category module in Footer swift #1790
319
+ * Fixed: Load aq_resizer only in AMP #1805
320
+ * Fixed: Proper markup for Pinterest in Design3 and Swift #1793
321
+ * Fixed: Proper url for vk
322
+
323
+ = 0.9.83 (03rd March 2018) =
324
+ * Added: Ability to add amp-carousel and amp-selector directly into WYSIWYG Editor #1588
325
+ * Fixed: Debug error caused by Playbuzz Sanitizer #1674
326
+ * Added: Show default gravatar for comments #1758
327
+ * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
328
+ * Fixed: To avoid debug error in swift
329
+ * Fixed: Translation improved for some strings #1678
330
+ * Fixed: Stop AMP takeover for Feed pages #1767
331
+ * Fixed: Menu issues In Design 1 & Design 2 after changing from AMP-Sidebar #1565
332
+ * Fixed: AMP Options panel Not Working After Update (0.9.82.1) version #1761
333
+ * Fixed: Move the label to the top [UX improvement] #1746
334
+ * Fixed: Error with Vue #1745
335
+ * Added: Video Module added in AMP Page Builder #1750
336
+ * Fixed: Sidebar menu is not scrollable swift theme #1769
337
+ * Fixed: View Non-AMP should be usertrailingslashit #1772
338
+ * Fixed: Proper structured data for Blogpage #1660
339
+ * Fixed: Legacy Page Builder not working after the update #1773
340
+ * Fixed: Content blank when only image in content #1778
341
+ * Fixed: Comment ID display issue fixed #1758
342
+ * Fixed: PHP Warning: A non-numeric value encountered in components/logo/logo.php on line 52 #1764
343
+ * Fixed: Yummly support added in Swift #1708
344
+ * Fixed: Demo Link updated #1781
345
+ * Fixed: CSS is not loading in Swift Theme #1780
346
+ * Added: Ability to add Advertisement or Sponsored label under ads #1710
347
+ * Fixed: Featured images distortion in related posts #1684
348
+ * Fixed: Implement Swift Thumbnail Regeneration in all the designs #1709
349
+ * Fixed: noarchive instead of nofollow in Archive pages #1693
350
+ * Fixed: Internal links of tags are showing “/amp” after changing the end point to “?amp” in design 2 #1752
351
+ * Fixed: line height is added for the logo in Swift design
352
+ * Added: Class for Custom Frontpage #1787
353
+ * Fixed: Recent post enable disable for Swift theme #1784
354
+ * Fixed: Connect Show/Hide AMP option with AMP takeover#1786
355
+ * Fixed: Added sanitizer to footer Widget #1756
356
+
357
+ = 0.9.82.1 (18th February 2018) =
358
+ * Selector code reverted due to it's effect on carousel
359
+
360
+ = 0.9.82 (18th February 2018) =
361
+ * View more details on https://ampforwp.com/0-9-82-released-stability-update-82nd-update/
362
+ * Logo Resizing calculation by Pixels and resizing bug solved.
363
+ * Update Notification in the Admin panel will only appear in the AMP options panel. So it will not annoy you anymore.
364
+ * Glue underline is applying for some reason
365
+ * Fatal error after 0.9.81 fixed
366
+ * Facebook comments loading twice on swift
367
+ * PHP Notice: Undefined variable: post_author_name
368
+ * Pagebuilder fix in version 0.9.81 Compatibility with Yoast and other plugins #1749
369
+ * Home loop modifier option added. Allows you to exclude the categories from the loop or include the Custom Post type in the homepage loop.
370
+ * amphtml Conflict with Instant Article for Facebook resolved
371
+ * /amp folder in the theme is applying changes in plugin, which causing a bug, but it’s been fixed
372
+ * Backward Compatibility for AMP Preview
373
+ * SEO Section Improvements
374
+ * Wrong comments count on AMP pages
375
+ * AMP Allow selector in the The Content. You can add tabs and AMP components directly into the loop.
376
+ * If we turn off the Homepage Support then Blog is turned off as well, solved.
377
+ * Post Pagination have two options like “Number of pages” and Previous & Next.
378
+ * Removed the dot from the one Signal Service worker URL if the subdomain isn’t added (Causes Validation issues.)
379
+ * Extra Space due to empty divs in Design 3
380
+ * Remove alt from a tag in the AMP version caused many validation issues.
381
+
382
+
383
+ = 0.9.81 (15th February 2018) =
384
+ * Edge case fatal error on features.php fixed
385
+ * Admin dashboard messup CSS fix #1731
386
+ * Custom CSS Output added in Swift
387
+
388
+ = 0.9.80 (15th February 2018) =
389
+ * View More details on the [blog post](https://ampforwp.com/introducing-swift/)
390
+ * 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/)
391
+ * Swift: The New Default Theme, which you can select from the design section of the Page builder.
392
+ * A way to create a Child Theme for AMP [read more](https://ampforwp.com/tutorials/article/child-theme-amp/)
393
+ * 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.
394
+ * 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
395
+ * Logo Resizing made easy
396
+ * Typography Options
397
+ * 3 Headers design in swift theme
398
+ * Error while sharing the image on Pinterest #1699
399
+ * Homepage support was not working ( when page support is off ) #1695
400
+ * Custom Permalinks rewrite issue solved #1689
401
+ * Custom post type was appearing two types #1688
402
+ * Theia Post Slider plugin incompatibility with post pagination fixed #1677
403
+ * Link to the categories in loop of Design 3 #1632
404
+ * amphtml was not working when plain permalink selected along with static page as homepage #1614
405
+ * AFS Analytics Integration added #1605
406
+ * Removed the blank spaces from analytics id field to deliver a good UX. #1599
407
+ * ?amp endpoint feature added #1561
408
+ * Ability to remove the excerpt and image from related post #1510
409
+ * Thumbnails on-the-fly generation added for better control over the design.
410
+
411
+ = 0.9.74 (23rd January 2018) =
412
+ * View More details on the [blog post](https://ampforwp.com/0-9-74-released-stability-update-79th-update/)
413
+ * Fixed: Push Notifications button alligned in center #1500
414
+ * Added: Meta robots tag support from Yoast #1563
415
+ * Added: Option to Disable wptexturize/smart-quotes Support #1458
416
+ * Fixed: Changed the label id to avoid conflict with Advanced AMP Ads #1591
417
+ * Fixed: esc_attr causing validation issues with single and double quotes #1616
418
+ * Fixed: Image stretching problem resolved when "Featured Image from the content" was set #1580 #1582
419
+ * Added: Create Template by Custom taxonomy name like product-jeans.php in AMP Theme FrameWork #1594
420
+ * Added: Custom Post type support added in the Core #1612
421
+ * Fixed: custom-amp-content.php cleaned with PHPCS #1497
422
+ * 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)
423
+ * Added: Proper fallback support added if the current active AMP theme is not available #1624
424
+ * Fixed: Resolved debug errors #1622
425
+ * Added: All in One SEO compatibility #1557
426
+ * Fixed: Load AMP Styling only on AMP pages #1441
427
+ * Added: 7 New Social Media Integrations added (Reddit, Tumblr, Telegram, Digg, StumbleUpon, Wechat, Viber) #1265
428
+ * Fixed: itemprop="url" was adding in non-amp #1626
429
+ * Fixed: SiteOrigin Pagebuilder compatibility with Custom Frontpage #1592 #1593
430
+ * Added: MediaAce lazy load compatibility of Bibmer Theme #1472
431
+ * Fixed: Content Links plugin was causing validation errors #1569
432
+ * Added: Filter added called get_content_from_dom to modify the output in AMP function #1462
433
+ * Added: amp_breadcrumb component added in AMP Theme Framework #1636
434
+ * Fixed: Sidebar Styling and proper sanitizer updated
435
+ * Added: amp_author_meta component added in AMP Theme Framework #1641
436
+ * Fixed: amp_post_pagination component improvement in AMP Theme Framework
437
+ * Added: Ability to add link classes in amp_post_pagination in AMP Theme Framework
438
+ * Fixed: amp_author_meta image code improvement in AMP Theme Framework
439
+
440
+ = 0.9.73 (15th January 2018) =
441
+ * View More details on the [blog post](https://ampforwp.com/0-9-73-released-stability-update-78th-update/)
442
+ * Added: Instagram Sanitizer added to process Instagram Embeds inside the BlockQuotes #1581
443
+ * Added: Option Created to Enable/Disable rel="nofollow" for View Non-AMP link #1572
444
+ * Fixed: Custom AMP Content was not working with Elementor Pagbuilder #1495
445
+ * Fixed: ampforwp_is_front_page() is not working in the newspaper theme #1583
446
+ * Added: Allow people to use multiple Analytics on AMP #1124
447
+ * Fixed: 'https' error with PlayBuzz Embeds #1481
448
+ * Added: Option to show last modified date instead of Published date #1496
449
+ * Fixed: Add proper permission for ampforwptourinstaller page
450
+ * Fixed: Debug warnings #1586 and #1459
451
+ * Fixed: A lot of Security Fixes has been done #1497
452
+ * Fixed: Removed lot of unused code #1497
453
+ * Added: AMP skip for checkout page #1443
454
+ * Added: Show the list of Child pages at the end in Parent Page with on/off #1551
455
+ * Fixed: Properly strip shortcodes fom Structured data description #1512
456
+
457
+ = 0.9.72 (6th January 2018, Happy New Year) =
458
+ * View More details on https://ampforwp.com/0-9-72-released-stability-update-77th-update
459
+ * Related Posts Image stretching in Design 3 AMP theme Framework #1482
460
+ * RTL option must be integrated into AMP theme Framework #1562
461
+ * `DOMDocument::loadHTML():` Attribute itemprop redefined warning fixed #1539
462
+ * Created an option to add Author bio article in Facebook Instant Article #1521
463
+ * Options to add push notification button above and below the content #1571
464
+ * Copy the Content button for Custom Post types #1532
465
+ * Alexa Metrics Compatibility added #1536
466
+ * Logo styling added with amp_logo. So styling can work with AMP Theme Framework. #1520
467
+ * Content parsing login improved, so it will not through any warnings if the content has only 1 paragraph. #1523
468
+ * Debug Warnings removed #1564
469
+ * Caption in the Gallery creating validation errors Fixed. #1549
470
+ * Tables Link color should be as same as the link of the body #1559
471
+ * Separate options for In-Content related posts #1546
472
+ * WebPage Schema Type added in Structured Data options #1558
473
+ * Fatal Error fixed with `mb_detect_encoding()` after enabling the minify option #1494
474
+ * Content blank or fatal errors due to itemscope and itemtype, fixed. #1570
475
+ * Performance improved. Due to `_transient__redux_activation_redirect` transient. #1526
476
+
477
+ = 0.9.71 (1st December 2017) =
478
+ * Design 2 Post Titles issue fixed
479
+ * Instant Articles validation issue fixed.
480
+
481
+ = 0.9.70 (30th November 2017) =
482
+ * View More details on https://ampforwp.com/0-9-70-released-stability-update-76th-update/
483
+ * Image alt tags are empty which caused issues. #1154 (thanks to @liagua)
484
+ * ALT and IMG tags are in one line #1442
485
+ * Updated the permalink for post view in admin area #1318
486
+ * aria-current causing validation issues #1427
487
+ * Aligning Captions in the Bottom in Gallery #1428
488
+ * 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
489
+ * After 0.9.69.1 update – Call to undefined function mb_convert_encoding #1447
490
+ * Featured image options now also reflect the structured data #1430
491
+ * Blur & Stretching issues of Design 3 thumbnails are now fixed. They’re crisp and clear than ever! #1227
492
+ * Related posts are showing on single even when turned off #1434
493
+ * Show Related posts CSS only when it is selected #1356
494
+ * Author image now displays on author pages #1426
495
+ * Category base removal in AMP from url option is only working on the first page #1418
496
+ * Bug fixed: PHP Warning DOMDocument Empty string supplied as input #1449
497
+ * Video support added in Instant Articles #1300
498
+ * Read more tag in Instant articles issue fixed #1415
499
+ * Amp carousel issues fixed #1446 #1456
500
+ * Compatibilty with Envira Gallery Lazy Loading #1432
501
+ * Inline Related Posts in AMP Theme Framework #1457
502
+ * Different number of in-content related post and related posts at the footer #1448
503
+ * FooGallery update broke all the AMP compatibility, but we fixed it from our side so that user’s gallery work perfectly #1424
504
+ * WPBakery Page Builder Conflict solved #1419
505
+ * Goodlife theme Lazy Load compatibility added #1416
506
+ * AMP-Facebook-Like Was found but unused Validation Error fixed. #1463
507
+ * Playbuzz not displaying if added with https: #1466
508
+ * Options Panel labels renamed for better understanding.
509
+
510
+
511
+ = 0.9.69 (20th November 2017) =
512
+ * View More details on https://ampforwp.com/0-9-69-released-stability-update-75th-update/
513
+ * One Signal Push Notifications bug fixed! #1404
514
+ * AMP theme framework Related posts extended so that it can be used as a loop format #1406
515
+ * Facebook like Button improvements #1405
516
+ * Add layout responsive tag to image module in page builder #1373
517
+ * Strip the shortcodes from Structure data area #1389
518
+ * Test HTTP API Call From admin panel by redux #1391
519
+ * Meta description tag in normal site Unicode character is different from AMP site unicode character. #1369
520
+ * Updated the check for ampforwp_is_amp_endpoint this should fix the issue #1372
521
+ * Updated the URL for design 3 so it can work with plain permalink #1318
522
+ * Updated the option Featured Image from The Content #1367
523
+ * 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
524
+ * Date Format under Homepage improvements #1408
525
+ * Warnings due to inline related posts in Homepage #1413
526
+ * Plain Permalinks Support improved. #1318
527
+ * Allow Homepage title of Bread Crumbs feature to be changed from Translation Panel #1414
528
+ * Debug Errors in AMP Theme Framework #1403
529
+ * Unnecessary loading of Merriweather fixed, it will only load in the Design 1.
530
+ * Enter Phone Number is not Appearing when switch to Call now button #1425
531
+ * Need excerpt below the title, above the meta #1399
532
+ * Remove the Separator piple symbol from the footer when “Back to Top link” is off #1417
533
+ * Display Child or subcategories on Category pages. #1385
534
+ * Add Caption in the Gallery Image feature conflicting with Gallery widget #1407
535
+ * Youtube Shortcode embed with &rel=0 support #1378
536
+ * Filter for Excerpt custom text in the AMP options #1411
537
+ * WPML Multilingual CMS plugin flags compatibility #1270
538
+ * Compatibility with Tasty Recipes plugin and other page builders with amp page builder #1431
539
+
540
+
541
+ = 0.9.68 (12th November 2017) =
542
+ * View More details on https://ampforwp.com/0-9-68-released-stability-update-74th-update/
543
+ * ADs are Optimize For Viewability, meaning it will try to load faster than the original AMP AD loading strategy.
544
+ * Content was disappearing issue was resolved #1392
545
+ * Featured Image from The Content option is connected to related post #1339
546
+ * Fix amp-web-push helper iframe configuration URL #1387
547
+ * Facebook Like button added to AMP #1327
548
+ * WPML support for AMP Improvement #1285
549
+ * Debug Errors fixed #1366
550
+ * Setting ad density for Facebook Instant Articles ads #1287
551
+ * Showing the number of comments in Single #1341
552
+ * Styling added to the sitewide ads and made sure that they are in the center. #1343
553
+ * One Signal buttons Translation added #1383
554
+ * Article type added to Structured data #1344 #1354
555
+ * The issue with the amp-carousel when RTL was enabled #1358
556
+ * amp-carousel with images of different sizes #1358
557
+ * 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.
558
+ * Instant Article should have a default value for number of posts, it was causing the memory issue with alot of posts #1390
559
+ * Notice if a post has no author data #1338
560
+ * Added a new redux extension select field in redux framework #1349
561
+ * Issues with galleries as well as gallery captions #1363
562
+ * Added a hook for adding anything in between the loops #1396
563
+ * Hide meta boxes as per the user level types #1340
564
+ * A Switch between the Date formats #1384
565
+ * Fix: Jannah theme lazy load issue #1362
566
+ * Issues with galleries as well as gallery captions #1363
567
+ * Create Dynamic url of amp according to the permalink structure #1318
568
+ * Minor code performance improvement.
569
+ * Archive titles in Design 3 frontend issue
570
+
571
+ = 0.9.67.0 (6th November 2017) =
572
+ * View more details on https://ampforwp.com/one-signal-push-notifications-for-amp/
573
+ * OneSignal Push Notifications integrated #807
574
+ * Vimeo embed support added
575
+ * SoundCloud embed support added
576
+ * Pinterest embed support added
577
+ * PlayBuzz embed support added
578
+ * DailyMotion embed support added
579
+ * Fix: Handle issues with data uri images in CSS #1033
580
+ * Fix attribute when adding AMP Mustache lib #1033
581
+ * Fix: Output CSS for feature image #1033
582
+ * An option added for users who don't want to receive update notifications #1342
583
+ * Structured data nav improvement
584
+ * Sitenavigationelement has been implemented correctly for footer menu. #1345
585
+ * Style sanitization for Menu Items #1359
586
+ * Polylang flags support for menu  #1360
587
+ * Mobile Redirection issues fixed #1173
588
+ * Jetpack fatal error fixed #1355
589
+ * 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.
590
+ * Needs proper CTA Bar's styling. #1361
591
+ * Debug errors on archive pages #1353
592
+ * Preview shall only be loaded on click rather than in background #1331
593
+ * ampforwp_is_home() function code improved
594
+ * making sure scripts and styling is properly adding when sanitizing the sidebar #868
595
+ * All the backend css and js should be versioned, so it's not cached. #1335
596
+
597
+ = 0.9.66.1 (30th October 2017) =
598
+ * Fatal error if has version less than WP 4.8 fixed
599
+ * More Minor Validation errors fixed
600
+ * Odnoklassniki sharing button is not working #1337
601
+
602
+ = 0.9.66.0 (29th October 2017) =
603
+ * View more details on https://ampforwp.com/0-9-66-released-bug-squashing-oct-2017-72nd-update/
604
+ * Design 3 & Design 1 are optimised with 90+ Google PageSpeed Score on Mobile and 95+ in desktop performance #1273
605
+ * Featured Image from the content for blog and homepage #1295
606
+ * Category Module for AMP Page builder added #888
607
+ * 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
608
+ * Twitter Video embed code support added in AMP #1307
609
+ * Video Posting Structured data #1293
610
+ * Navigation menus are now Schema compatible for better Structured data integration #1229
611
+ * Yoast checking conditions for Structured Data Improved #1293
612
+ * Added "back to Top" in design 3 #959
613
+ * 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)
614
+ * AMP not working on password-protected pages #1192
615
+ * Debug errors reported by the user #1284 and few more we found internally
616
+ * Inline Style Sanitizer for Comments to avoid any validation issues #1193
617
+ * Next/Previous links removed from pages #1268 props @Frenchomatic
618
+ * WPML Multilingual CMS plugin flags compatibility added #1270
619
+ * Image sanitizer added for the Sidebar #1270
620
+ * Added AMP Components the correct way. Added amp-gist, amp-social-share. #336
621
+ * amp-video script added - Which decreases the non-critical validation issues #991
622
+ * Arrows in Design 3 pagination #1000
623
+ * Author page links in Single #1282
624
+ * Added previous open state of option panel and show again when search clean #1238
625
+ * Odnoklassniki Social Sharing Support for AMP (with target blank for better bounce rate) #1230
626
+ * GIF or animated images resize problem fixed #1281
627
+ * In Design1, Header Background & Link Color have same option #1249
628
+ * FB Pixel for AMP added #1231
629
+ * Structured Data Type option for AMPed Custom Post types only #1259
630
+ * Attribute ‘readability in the tag ‘div’ removed - this decreases the validation issues #1306
631
+ * AMP Theme Framework Improvements: loop, author, related_post, Add Author support #1311
632
+ * Commentator's Avatar in the comments section #1132
633
+ * Remove 'Welcome to AMP' from Dashboard sub-menu and moved to the options area to decrease the annoyance and increase the user happiness #902
634
+ * 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
635
+ *  View AMP on Admin Bar for the respected page/post If enable. #1236
636
+ * google maps iframe link to larger map #1099
637
+ * Comments now jumping due to the slash at the end #1309
638
+ * Page Builder causes Incompatibility with the Divi theme (We restructured the Text Module for Page builder for better compatibility and UX) #1162
639
+ * Inline Style Sanitizer for Comments added. Less Critical Validation issues and Better Presentation #1193
640
+ * WPML amp-html error fixed #1285
641
+ * Radio button not working for Show View more Button" #1018
642
+ * Added registered handle for tinymcePointer localize data #1301
643
+ * Date in the Design 2 should not be hidden in mobile version #1315
644
+ * Page builder not working on homepage(Selected as front page) #1316
645
+ * 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)
646
+ * Auto flush on save for FBIA to improve the UX.
647
+ * Plain Permalinks Support improved. #1318
648
+ * Tables support added to FB Instant Articles #1266
649
+ * Demo link added in the Theme selector option #1248
650
+ * Remove invalid attributes from multiple tags which reduces critical validation errors and validates pages.
651
+ * AMP makes a problem in archive page label, when it is active in non-amp version #1304
652
+ * placeholder-icon.png is 404 fixed #1310
653
+ * Category & Tags switches for Single added. #1055
654
+ * Copy Content (Custom AMP Editor) Option Not showing with Page Builder of SiteOrigin issue fixed #1280
655
+ * Improving UX with: when AMP support is off for a specific post type then all the AMP related metaboxes should be removed #1289
656
+ * Options Panel Options rearranged, labels rewritten, descriptions repositioned for better User interaction [commit]
657
+
658
+ = 0.9.65.2 (25th October 2017) =
659
+ * TypeWatch is not a function #1299
660
+ * Error with BackupBuddy fixed #1303
661
+
662
+ = 0.9.65.1 (24th October 2017) =
663
+ * AMP Minifcation Issues fixed
664
+
665
+ = 0.9.65 (22nd October 2017) =
666
+ * View more details on https://ampforwp.com/new/
667
+ * Favicon for AMP #1039
668
+ * AMP Minification option added with Performance Tab in Options #1286
669
+ * Post support is turned off then Meta box should also be removed #1253
670
+ * Excerpt Length feature in Design two and Three #1122
671
+ * Test Contact form plugins and their settings in the options panel #1121
672
+ * Mobile preview in Edit Screen #1082
673
+ * Search feature for Options Panel #1238
674
+ * WordPress Social Share Buttons Validation Issues #1272
675
+ * itemtype attribute is striping in the ul tag #1210
676
+ * Debug Error in Breadcrumb 0.9.64 #1267
677
+ * Disable AMP linking at Wordpress Search Page #969
678
+ * Featured Image is missing #1071
679
+ * Removed ampforwp_plugin_activation_notice #1034
680
+ * Add VK (Vkontakte) Sharing Button #1187
681
+ * Grab the first image instead of post thumbnail for featured image #1189
682
+ * AMP theme framework core changes #1274
683
+ * Grab the first image instead of post thumbnail for featured image #1189
684
+ * Create a Switch on Top of Page Builder #1279
685
+ * Inline Related Posts added that helps you with improving bounce rate #1078
686
+ * Caption Support in Image Gallery Carousel #1172 #1136
687
+ * Instant Articles feed shows sticky posts on top #945
688
+ * Added search check, to fix debug notice
689
+ * Option to hide date from Design 1 & Design 3 Homepage Loop #1264
690
+ * UI labels improvements in the Options panel
691
+ * Sorting out design #2 – static front page #1175
692
+
693
+ = 0.9.64 (15th October 2017) =
694
+ * View more details on https://ampforwp.com/new/
695
+ * Structured Data Type option added. You can now change the structured data format for Posts, Pages and Custom post types #323
696
+ * When comments plugin activate, Comments section should remove. #1093
697
+ * Notification causes a validation error. #1147
698
+ * CSS !important need sanitization #1225 - This will help us to validate tens of thousands of pages.
699
+ * Strange spaces when using Sassy Social Share #1185
700
+ * Remote CDN use? Let's host it? #549
701
+ * Typo fix for Linkedin Profile Page URL section #905 [Thanks to Prayag @pra85]
702
+ * Replace fastimage with fasterimage for PHP 5.4+ #1191
703
+ * Debug Errors Post 0.9.63 #1219
704
+ * Ad5 code injected twice #1116
705
+ * Homepage Support must be Off when we turn Off Homepage Support. #738
706
+ * Add custom class in post pagination for styling #1100
707
+ * Removed the Lazy Loading issue of Schema Theme #1170
708
+ * H1 tag for archive titles (Commit) #1155
709
+ * Alt tag for the Logo #1155
710
+ * Design 3 Menu RTL issue fixed #1106
711
+ * Ability to add dynamic classes in body tag #1237
712
+ * Warnings fixed on 404 page #1243
713
+ * Properly structured data for Homepage, Custom Frontpage and Blog #1155 #1242
714
+ * Option added to Enable/Disable categories and Tags links from Single #1155
715
+ * Fatal error after 0.9.63 fixed #1220
716
+ * Debug Error due to vendor AMP #1213
717
+ * PHP warning on line 147 after 0.9.63 #1241
718
+
719
+ = 0.9.63 (8th October 2017) =
720
+ * View more details on https://ampforwp.com/new/
721
+ * Category and Tag Base Remover as core features #1079
722
+ * Hide AMP on Posts option added #935
723
+ * Installation Setup Screen Added for new users
724
+ * Validation for the session in PHP #1158. PR by Bryan Contreras @bryan3561
725
+ * All the amp pages should work perfect with Plain Permalink settings #488
726
+ * WYSIWYG TinyMCE editor added for the Text Module in AMP Page Builder #1205
727
+ * WPML Static Front Page Support for title and description with Yoast. #1143
728
+ * Row Settings area added for AMP Page Builder #1148
729
+ * xlink attribute causes Validation Issues #1149
730
+ * Posts with no images on Archive pages are squeezed to 65% #1058
731
+ * Body Class to target specific pages #1123
732
+ * Option to enable/disable Breadcrumb #1129
733
+ * Debug errors due to Breadcrumbs fixed #1109 #1130 #966
734
+ * Visit AMP option added below the View Site in Dashboard. #1076
735
+ * Many Debug errors fixed #1109
736
+ * Textarea for body tag which will help people add AMP Auto Ads #1064
737
+ * Structured data improvements #1048 #1044 #1085 #1118
738
+ * Twitter share URL based on users choice, you can allow people to share pretty links and short links. #1097
739
+ * Author Avatar removed code fixed which has been displayed in the div "amp-wp-meta amp-wp-byline". #1087
740
+ * Only one figure element is allowed in the article header FB Instant Articles #1127 & #1157
741
+ * Image alt tags are empty and cause issues fixed. #1154
742
+ * Button to copy the content into Custom AMP Editor #783
743
+ * Rename AMP loop widget areas or add proper descriptions #1045
744
+ * Trailing slash issue #1095
745
+ * Related Posts by Post type featured added #1141
746
+ * Ultimate Social Media Icons plugin causes validation issues fixed #1135
747
+ * Adding proper path for functions.php, it was causing strange fatal errors and irregular white screen of death fixed  #1144
748
+ * A smooth way to migrate from other AMP plugins to AMPforWP #1051
749
+ * Alert added on AMP by Automattic installation. #1180
750
+ * Insertion of strange spaces around H1 titles #1069
751
+ * AMP Page Builder and HTTPS #1164
752
+ * You can display comments from more than one vendor such as displaying WP & FB Comments #1150
753
+ * Rename AMP loop widget areas or add proper descriptions #1045
754
+ * FrontPage featured image with srcset #1063
755
+ * An option for Showing featured image from custom field #1098
756
+ * Added the Custom Front Page Title From Yoast SEO #1163
757
+ * Commenting breaks SSI directives causes to display error #1179
758
+ * rel canonical appears more than once in search pages #1195
759
+ * Dev mode in AMP #1083
760
+ * Social Sticky Icons Improvements #1061
761
+ * Grand-Child support added in Design #1152
762
+ * amp-accordion non-critical error in Design 3 & CSS improvements fixed #1152
763
+ * Incorrect @id for mainentity #1080
764
+ * Hide AMP by specific Categories tweaked for performance. Thanks to Joshua Eichorn @jeichorn CTO at Page.ly #1133 - Huge Thanks!
765
+ * amp-auto-ads for sites with RTL support ON #1176
766
+ * Redirected the Google forms to our contact page so that we can take each and every query and answer every person. #1201
767
+ * ui-state-highlight class was conflicting with ACF date picker fixed #1199
768
+ * Responsify WP Lazy loading causes blank image (Compatibility) #1131
769
+ * amp-carousel scripts loading on the second page fixed in Design 3
770
+ * Show Design screenshot while selection of design #1209
771
+ * Switches Redesigned for better UX #1211
772
+ * Welcome Page UX Improved #1214
773
+
774
+ = 0.9.62 (25th September 2017) =
775
+ * View more details on https://ampforwp.com/new/
776
+ * INTRODUCING Page Builder 2.0 for AMP! [Learn More & Watch the Video](https://ampforwp.com/tutorials/article/amp-page-builder-installation/)
777
+ * Documentation & Help links improved
778
+ * Post type specific classes for targetting
779
+ * Design name restored in Options panel (It was recently renamed to Appearance)
780
+ * Minor Bug fixes as well
781
+
782
+ = 0.9.61 (10th September 2017) =
783
+ * View more details on https://ampforwp.com/options-restructured/
784
+ * Options Panel Restructured Options were dividing into two parts: Settings and Appearance.
785
+ * AMP Theme Framework Core Support Added. You can now create themes of your own in just minutes.
786
+ * WPML Static Front Page Support #1111
787
+ * Notification message disables when CF7 & gravity form is activated. #1107
788
+ * Space after On in Design 3 #1114
789
+
790
+ = 0.9.60 (4th September 2017) =
791
+ * View more details on https://ampforwp.com/0-9-60-released-improved-redirection-66th-update/
792
+ * Class added to View non-amp anchor tag
793
+ * Params added properly to get rid of a warning #1077
794
+ * rel=attachment noopener generating validation errors #1090
795
+ * Breadcrumbs Support Added #701
796
+ * Enable / Disable button added for Navigation Menu #735
797
+ * Move the ad code for Instant Article down after the article #964
798
+ * Add analytics code of FB instant articles properly #1096
799
+ * datetime Tag not stripping properly #1043
800
+ * Mobile redirection on custom post types #1028 #1052
801
+ * Mobile Redirection causing extra redirect #879 #933
802
+ * Proper mobile redirection on Homepage #1052
803
+ * View non-amp on blog will redirect to blog
804
+ * Blog will redirect to blog irrespective of AMP Homepage option #871
805
+ * Dont redirect if archive support is disabled #1052
806
+ * non-amp category pages should redirect to non-amp pages if turned off from Hide AMP #999
807
+ * Disable amp for forum plugin (wpforo) #592
808
+
809
+ = 0.9.59 (23th August 2017) =
810
+ * Design 3 Images were not aligned properly. Fixed. #1040
811
+ * Caption in the design 3 improved
812
+ * Jetpack File not loading throwing fatal error #1038
813
+ * If the mobile redirection is ON and the category is excluded to display the AMP then it should redirect properly
814
+ * Custom Editor Compatibility issue with SiteOrigin PageBuilder fixed #997
815
+ * Native Twitter Embed support
816
+ * Added a hook after the body tag: ampforwp_body_beginning (commit)
817
+ * GTM in AMP Improved #958
818
+ * WP User Avatar compatibility Added #975
819
+ * Alt tag on frontpage featured image added #1050
820
+ * Blurred Images on the frontpage fixed #1050
821
+ * Need to escape alt tag #1049
822
+ * Debug errors & PHP warnings were fixed #859 #811 #830 #810
823
+ * Proper rel canonicals for inner pages #1047
824
+ * Added Video sanitizer for comments #1053
825
+ * When activating the AMP plugin, display a notification in the popup. #1036
826
+ * Video Sanitizer added for Comments
827
+
828
+ = 0.9.58.1 (9th August 2017) =
829
+ * Jetpack conflict issue solved #1038
830
+ * Genesis SEO Support added #1013
831
+ * Fixed Wrong SEO title issue #1013 and #836
832
+ * Design 3 Carousel script loading method improved #990
833
+
834
+ = 0.9.58 (9th August 2017) =
835
+ * View more details on https://ampforwp.com/new/
836
+ * Genesis SEO for AMP support added
837
+ * AMP 0.4.2 Vendor Bundled for making it crash proof
838
+ * Archive desc only on 1st page #1029
839
+ * Ads are not working after 0.9.6 #1030
840
+ * Fixed the Post 0.9.57 Update Bugs #1025
841
+ * All Images are aligned on left side in design 3 #1031
842
+ * Custom frontpage title issue in Design 3 fixed
843
+
844
+ = 0.9.57 (5th August 2017) =
845
+ * See the Full changelog https://ampforwp.com/0-9-57-released-compatibility-issue-fixed-62nd-update/
846
+
847
+ = 0.9.56 (31st July 2017) =
848
+ * View more details on https://ampforwp.com/page-break-in-amp/
849
+ * Page Break / NextPage (Pagination) Support Added #834 #857 (Improvement)
850
+ * Show/Hide AMP for Categories of Posts or All posts #872 (Improvement)
851
+ * Adding analytics capabilities to Instant Articles #978
852
+ * JetPack Plugin Conflict Solved #971
853
+ * Social sharing code improved. amp-social-share js is getting added for line and WhatsApp social share #981
854
+ * Code improvement for rel canonicals(home and archive)
855
+ * Perfect SEO URL + Yoast SEO Compatibility #982
856
+ * Some styling for tags to show up properly
857
+ * Undefined index notices #960
858
+ * Non-amp category pages should redirect to non-amp pages if turned off from Hiding AMP #999
859
+ * Page builder text and button module issues #972
860
+ * Documentation links updated in the Options panel
861
+
862
+ = 0.9.55 (13th July 2017) =
863
+ * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
864
+ * Disqus Comments show up even when disabled per post #931
865
+ * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
866
+ * H3 inside OL in Related-Posts.php #930
867
+ * Advertisement Options in Instant Articles #943
868
+ * Incompatible with bootstrap plugin #525
869
+ * Error in tag and category links #934
870
+ * Pagebuilder Button module link had issues #951
871
+ * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
872
+ * WPtouch Pro Compatibility Issues #927
873
+ * Better scripts compatibility in Single of post types #757
874
+ * Instant Articles Error: "The HTML element does not contain any text" #949
875
+ * added a filter in all the dates so a user can change the date format and modify #962
876
+ * Design3 Menu Arrows are clickable along with the links #952
877
+
878
+
879
+ = 0.9.54.2 (4th July 2017) =
880
+ * Minor bug post 0.9.54 bug fixed
881
+
882
+ = 0.9.54 (4th July 2017) =
883
+ * View more details on https://ampforwp.com/new/
884
+ * Facebook Instant Articles Support #862
885
+ * Exclude Some Pages from Mobile Redirection #914
886
+ * After 0.9.53 update amp-social-share js missing (critical issue) #924
887
+ * Hooks added in Header (above and below)
888
+ * View non AMP[Code improvement] #928
889
+ * Pages are not supposed to show meta like this, especially Categories #894
890
+ * Monarch plugin having design issues #925
891
+ * Show AMP Hide AMP Check Box Fixes #794
892
+
893
+ = 0.9.53 (19th June 2017) =
894
+ * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
895
+ * Compatibility Issue with Rocket Lazy Load plugin #907
896
+ * Link color issue with UX of Color Pickers in Design 3 #731
897
+ * amp-analytics js appears more than once when Google tag manager is used #885
898
+ * SEO by SQUIRRLY is adding analytics twice #678
899
+ * Fatal error when WPSEO is activated #900
900
+ * Design 3 Sticky header should have an option #625
901
+ * 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
902
+ * Yandex Metrika support in AMP #585
903
+ * Histats Analytics Support #880
904
+ * Chartbeat Analytics Support #882
905
+ * Do not strip Rel from anchor tags #790
906
+ * Design close Resulting Blank Screen in AMP Site #642
907
+ * Logo size is not applying #817
908
+ * AMP Publisher logo guidelines #162
909
+ * Remove amp-social-share extension .js from Custom Frontpage #899
910
+ * Add compatibility with Sassy Social Share #679
911
+ * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
912
+
913
+ = 0.9.51.1 (12th June 2017) =
914
+ * Redirection issue after 0.9.51 Update.
915
+ * Improved compatibility with plugins.
916
+
917
+ = 0.9.51 (8th June 2017) =
918
+ * View more details on https://ampforwp.com/page-builder-released-in-amp/
919
+ * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
920
+ * Comments are not showing properly when words are long #861
921
+ * Remove amp-social-share extension .js from Pages #853
922
+ * The tag ‘amp-sidebar extension .js script’ appears more than once in the document #828
923
+ * Remove Advertisement tab #839
924
+ * Compatibility with Slide-in Plugin by WPMU dev #866
925
+ * Mobile redirection issue with bbpress #867
926
+ * All the data must be properly sanitize in the sidebar #849
927
+ * AMP html should not be added on the second page of comments
928
+ * Author page’s support #456
929
+ * URLs in comments should be clickable(links) #869
930
+ * Featured image should be centered in desktop mode #870
931
+ * Added More Hooks #721 (Documentation on this coming soon!)
932
+ * Page 2 goes to the wrong URL #865
933
+ * Proper Title and meta for homepage and posts #850
934
+ * Gist Support added #608 Just add a shortcode and enjoy Devs (Ex: amp-gist id="b9bb35bc68df68259af94430f012425f )
935
+ * /blog/amp pagination not working #875
936
+ * separate the Text and Date format in design 2 #876
937
+ * Comments show in AMP w/o breaks between paragraphs #873
938
+ * If no featured image below hooks are not working #877
939
+ * Change meta name Viewport and its value #878
940
+ * Bolt icon in option #474
941
+ * Code restructuring and code quality improvements.
942
+ * Create a seperate function for comment code in frontpage.php #682
943
+ * Remove all the duplicate code from frontpage.php of all the designs and use hooks to add the code instead of static code #889
944
+ * Few Debug errors removed.
945
+
946
+ = 0.9.50 (24 May 2017) =
947
+ * View more details on https://ampforwp.com/facebook-comments-in-amp/
948
+ * Design 3 Social Icons issue #832
949
+ * View non AMP leads to /?nonamp=1 #814
950
+ * Youtube shortcode compatibility improved #557
951
+ * welcome.php should be shown only if user is “administrator” #696
952
+ * Facebook comments support added in AMP #825
953
+ * WP Like Button Compatibility #841
954
+ * Custom Taxonomy Support added with Custom Post Type Extension.
955
+ * Front page comments not found as expected #837
956
+ * Fixed xml:lang tag issue #848
957
+ * Sanitize Iframe in the archive description Fixed #845
958
+ * Compatibility with Newspaper Theme by TagDiv #842 and #796
959
+ * Some debug problems (blog page, style.php) #838
960
+ * Featured Image hooks added
961
+ * Twitter is misspelled #854
962
+ * The core concept of the AMP Content builder has been built.
963
+
964
+
965
+ = 0.9.49 (12 May 2017) =
966
+ * View more details on https://ampforwp.com/0-9-49-released-small-important-bugs-fixed-56th-update/
967
+ * Option added to display the excerpt in Single #806
968
+ * Ability to add new invalid tags to filter out from AMP pages #809
969
+ * In frontpage, comment button is pointing to wrong URL #812
970
+ * Call now button and search is overlapping in Design-1 #784
971
+ * Sticky Social Icons should be off if the CTA notification bar is on #788
972
+ * Author bio in Design 1 and 2 #732
973
+ * Styling in Taxonomy description causing validation issues #798
974
+ * Twitter share(handle, url positions fixed) #815
975
+ * Tables responsiveness in ALL Designs #726
976
+ * Output all the categories and tags with their own ID’s in the div classes #750
977
+ * Social Share Icons Overlap with Leave A Comment in Design 3 #716
978
+ * Effective Measure Support on AMP #297
979
+ * Custom AMP editor on pages should only be shown when page support is ON #756
980
+ * AMP on website.com/blog without need of separate installation #775
981
+ * GTranslate Compatible #819
982
+ * Images and amp-anim styling added #725
983
+ * Filter to make the title in a post to a link #727
984
+ * Author Bio and Social Share button must not come in Pages #770
985
+ * StatCounter is now compatible with AMP #361
986
+ * Line Social media support #500
987
+ * Footer menus for Design 1 & Design 2 #623
988
+ * Strip out src=”about:blank” When Gravity Forms used #804
989
+ * Add Compatibility with Crazy Lazy load plugin #751
990
+ * Meta Titles and Description issues fixed with Yoast, All in one SEO and The SEO Framework #813
991
+ * Double quotes in the Excerpt of the meta description is making AMP Invalidated #818
992
+ * Missing featured image on static front page #824
993
+ * Fatal error while activation: see the video 0.9.49 Beta #827
994
+ * Review this code in archive.php in all 3 designs. #826
995
+
996
+
997
+ = 0.9.48 (28 April 2017) =
998
+ * View more details on: https://ampforwp.com/0-9-48-released-step-towards-multilingual-support-55th-update/
999
+ * The default translation method of WordPress added. (Option in Translation panel to switch between * Translation panel and POT file #540)
1000
+ * 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.
1001
+ * Another Advertisement slot added below the post title in the Single post.
1002
+ * Fatal error: require_once report-bugs.php #747 fixed
1003
+ * Add / for codes in Meta Description #766 fixed
1004
+ * Controls re-adjusted & Renamed title of yoast description control in Options panel
1005
+ * Design-3 Slider URL redirecting to non-AMP page #758
1006
+ * Added new sanitizer For HTML to AMP-HTML conversion
1007
+ * Sanitized Archive descriptions so that it would convert to AMP
1008
+ * Comments sanitized with new sanitizer so that HTML tags automatically become AMP compatible.
1009
+ * 301 redirects on non-pretty internal links #767
1010
+ * Create a filter to modify the value of rel="amphtml" #778
1011
+ * Max-width added for images in comments
1012
+ * If in WooCommerce ?amp endpoint set then update href.
1013
+ * Undefined Variable (Debug) #733 and many other debug issues were fixed
1014
+ * Show last updated Post instead of published date #575
1015
+ * WooCommerce Widget added to display latest products on homepage. #763
1016
+ * add amp_post_template_above_footer hook global in all the designs #779
1017
+ * Excerpt on top of the content in Single #665
1018
+ * Subscribe box has been improved for the UX needs #712
1019
+ * Notice warnings since 0.4.2 update #740
1020
+ * AMP Comments Form Integration with the extension
1021
+ * Filter added on the loop in Homepage of the Design 3 so that it can be modified with an external plugin.
1022
+ * 404 on paged home page #781
1023
+ * Twitter handle should be at the end of the tweet not in the beginning #787
1024
+ * Wrong Rel Canonical for AMP Custom Frontpage #799
1025
+ * 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.
1026
+ * Extension page user experienced improved.
1027
+ * Removed old Youtube installation video and replaced with new one.
1028
+
1029
+ = 0.9.47.2 (12 April 2017) =
1030
+ * Design-3 Slider URL redirecting to non-AMP page #758
1031
+ * Ads showing in comments #768
1032
+
1033
+ = 0.9.47.1 (11 April 2017) =
1034
+ * Meta description option improved in SEO section #766
1035
+ * Fatal error: require_once report-bugs.php #747
1036
+
1037
+ = 0.9.47 (10 April 2017) =
1038
+ * View more details at https://ampforwp.com/0-9-47-released-54th-update/
1039
+ * Meta saving method updated for customAMP content editor checkbox was causing some conflict.
1040
+ * Wrong Yoast title and structured data in Custom Frontpage fixed
1041
+ * CSS minification all 3 designs
1042
+ * Polylang flags in menu was causing validation issue, is now resolved
1043
+ * WPML flags in menu was causing validation issue, is now resolved
1044
+ * Standardized function created for content sanitization.
1045
+ * Archive description now displays AMP compatible markup
1046
+ * Comments markup sanitized for AMP
1047
+ * Design 3 images not aligned properly, fixed
1048
+ * Images are aligned to center in Design 1.
1049
+ * carousel ending with //amp instead of /amp fixed #753
1050
+ * Title of the Post along with Post link when shared in twitter #683
1051
+ * Ads were cutting in half in RTL, fixed
1052
+ * Add / at the end of AMP links with in the AMP pages (Internal links) #668
1053
+ * Rendering the wrong URLs in front page if paged #742
1054
+ * Option to turn off AMP on all pages, so people can turn on only for specific pages #746
1055
+ * Need Meta Description on amp pages #741
1056
+ * Woocommerce Loop shortcode updated
1057
+ * Call Now Button added in header #563
1058
+ * Post images are not centered in Design 3 #695
1059
+ * UX of GTM settings done, since users were getting confused #700
1060
+ * Front page amphtml fixed for paginated pages
1061
+
1062
+ = 0.9.45.6 (31 March 2017) =
1063
+ * Installation Process from welcome page was not working after WP Plugin DIR API change was fixed.
1064
+ * WP Rocket Minifcation and Concatenation was not working, its fixed now.
1065
+ * WP Rocket was tested properly to make sure everything is working fine.
1066
+
1067
+ = 0.9.45.5 (25 March 2017) =
1068
+ * WP rocket conflict solved
1069
+ * Cannot set property ‘innerHTML’ of null issue fixed
1070
+
1071
+ = 0.9.45.3 (21 March 2017) =
1072
+ * Post 0.9.45 bugs fixed and released as an urgent update.
1073
+
1074
+ = 0.9.45.1 (19 March 2017) =
1075
+ * Post 0.9.45 bugs fixed and released as an urgent update.
1076
+
1077
+ = 0.9.45 (18 March 2017) =
1078
+ * View more details at https://ampforwp.com/0-9-45-released-compatibility-rtl-53rd-update/
1079
+ * W3Total cache compatibility added
1080
+ * RTL Support added for Right-to-Left language websites.
1081
+ * Comments Pagination feature added
1082
+ * WP-Rocket Compatibility added
1083
+ * WPML Compatibility added
1084
+ * Quantcast analytics support added
1085
+ * ComScore support added
1086
+ * Custom Yoast title support added #685
1087
+ * 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]
1088
+ * Admin area UX improvements
1089
+ * Adding notifications script in the correct way
1090
+ * Comments now display on frontpage as well.
1091
+ * Re-positioned non-amp Header link control to the right section.
1092
+ * ?nonamp=1 only displays when the Mobile redirection is on
1093
+ * Properly adding iFrame js.
1094
+ * Custom Post type incompatibility fixed
1095
+ * Widgets added to the Custom Frontpage.
1096
+ * Stripping shortcodes from excerpts.
1097
+ * Custom content on static frontpage had over riding issue #687
1098
+ * Option added for controlling number of comments
1099
+ * Welcome page should be shown only if user is “administrator” #696
1100
+ * Digg Digg social share compatibility #694
1101
+ * Removed unnecessary lines from Design 3
1102
+ * Sanitized Archive Description to amp Compatible #659
1103
+ * Author box now displays HTML properly #645
1104
+ * Date added Design-3 in meta #583
1105
+ * Options link was removed from wp-admin tool bar after a feedback from a user.
1106
+ * Footer sub menus layout compatibility.
1107
+
1108
+
1109
+ = 0.9.44 (5 March 2017) =
1110
+ * View more details at https://ampforwp.com/user-experience-52nd-update/
1111
+ * Added Welcome Screen for better User experience. [Enhancement]
1112
+ * Undefined Index debug error resolved [Bug fix]
1113
+ * All in one SEO Support support tested [3rd party compatibility]
1114
+ * Frontpage title in Design 3 is out of the container #644 [Bug fix]
1115
+ * Default Table markup in AMP #643 [Enhancement]
1116
+ * AMP carousel is not working on Frontpage #641 [Bug fix]
1117
+ * Social share .js was getting added even when it was not required #638 [Bug fix]
1118
+ * Search Feature added for Design 1 & Design 2 [Major Improvement]
1119
+ * Accordion script loading issue in Design 3 #634 [Bug fix]
1120
+ * ?nonamp=1 links should be nofollow #622 [Bug fix]
1121
+ * Same Header and Color Scheme are making header elements invisible #629 [Enhancement]
1122
+ * In Search AMP rel canonical was different #631 [Bug fix]
1123
+ * Non-AMP link in Design 3 was not working when mobile redirection was enabled #632 [Bug fix]
1124
+ * Search form text strings are now added in the translation panel #607 [Bug fix]
1125
+ * Load AMP-ads conditionally only if ads are available #609 [Bug fix]
1126
+ * Added compatibility with Custom post type extension. Option to hide/show AMP on all custom post types #587 [Bug fix]
1127
+ * Report a Bug & Request feature links added [Enhancement]
1128
+ * If there was no menu set in Design 3 then all pages were getting displayed. #613 [Bug fix]
1129
+ * The tag Font is disallowed #616 [Validation Improved]
1130
+ * index/noindex separately added for Tags and also for Categories #606 [Enhancement]
1131
+ * Use of undefined constant AMP_QUERY_VAR #596 [Bug fixed]
1132
+ * Logo is not centered in Design 3 #586 [Bug fixed]
1133
+ * Remove defer, a very rare type of defer was getting added #589 [Validation Improved]
1134
+ * Disqus comments iframe had scrolling issues #566 [Bug fixed]
1135
+ * Left side blank gap in the RTL in design 2 #541 [Bug fixed]
1136
+ * Inline Styles not working correctly in Custom AMP Editor #533 [Bug fixed]
1137
+ * Re-save permalinks issues. Flushing rewrites with options saved. #511 [Improvement]
1138
+ * Code review and cleaning of the customizer #404 [Code Cleaning]
1139
+ * Google Search iframe had some header alignment issues in Design 3. #624 - Thank you Leo Osa @leoosa for the contribution! [Bug fixed]
1140
+ * AMP Frontpage + Override AMP Content = Blank page #604 [Bug fixed]
1141
+ * 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]
1142
+ * 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]
1143
+ Reformatting and Minifying of stylesheet [Code Cleaning]
1144
+ * Created a new section for Homepage and moved some controls from other areas to the home section for the better user experience. [User Experience]
1145
+ * Override Homepage Thumbnail size option added. It will give you more control over your thumbnails. [Major Improvement]
1146
+ * 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]
1147
+ * Extra amp-carousel script loading is now fixed. [Bug fixed]
1148
+ * Crafting of layout code in design 2 and design 3, especially with social icons area. [Code Cleaning]
1149
+ * Design of search form was not clickable in iOS devices #621 [Bug fixed]
1150
+ * 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]
1151
+
1152
+ = 0.9.43.6 =
1153
+ * View more details at https://ampforwp.com/stability-sprint-3-51st-update/
1154
+ * Typo in the is_home() function fixed
1155
+ * Option to hide/show AMP on all custom post types #587
1156
+ * False detection by Windows defender tool fixed
1157
+ * Conditional tags were not compatible with Advanced AMP ads which were causing some conflicts but is now fixed.
1158
+
1159
+ = 0.9.43.5 =
1160
+ * View more details at https://ampforwp.com/stability-sprint-2-50th-update/
1161
+ * Fixed shortcodes issue in related posts #543
1162
+ * Iframe Scripts Added properly
1163
+ * Proper conditions added for the social section of Design 3
1164
+ * Featured Image issue stretched in Design 2 & 3
1165
+ * Removed extra global $redux_builder_amp;
1166
+ * Custom Logo Dimensions option added #479
1167
+ * Index & NoIndex options added for SEO section. #558
1168
+ * Added URL for rewrite flushing rules in Options
1169
+ * Option to enable and disable the Author area in Design 3#577
1170
+ * Rel Nofollow added in credit link
1171
+ * debug issue solved: fn_offset not defined
1172
+ * debug issue solved: global $post not declared
1173
+ * The word 'ago' is now translatable in design 3
1174
+ * The word 'read next' is translatable now
1175
+ * Tablepress compatibility added #392
1176
+ * Secure API server is now serving through Google Cloud Manager.
1177
+ * Thrive Content builder was displaying twice when the Custom AMP content was on. It was a complex issue which has been solved now.
1178
+ * amp-ad extension.js script was loading if the Ads are not enabled. #598
1179
+ * Social Share Extension Included on Homepage even if we didn't have social icons #599
1180
+ * Installation UX improvement #593
1181
+ * Removed duplicate global variable
1182
+ * Proper OG tags added #588
1183
+ * Proper instructions added for Custom AMP content #471
1184
+
1185
+
1186
+ = 0.9.43.1 =
1187
+ * View more details at https://ampforwp.com/0-9-43-1-released-stability-sprint-1-49th-update/
1188
+ * Emoji in comments leads to AMP errors
1189
+ * Design 1 showing time on archives
1190
+ * Added some space between the archive label.
1191
+ * Lazy loading plugins compatibility #544
1192
+ * Custom header and footer areas
1193
+ * Sticky posts now come on top #564
1194
+ * Footer non-amplink added in design 3 #562
1195
+ * HTML Paragraph tag is shown in the title in category! #518
1196
+
1197
+ = 0.9.42 =
1198
+ * View more details at https://ampforwp.com/design-three-update/
1199
+ * 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]
1200
+ * Ticket #517 – Added Upload field into Redux core [3rd party Compatiblity]
1201
+ * Ticket#529 Controls for archive titles added [Improvement]
1202
+ * Ticket #548 Jetpack photon code removed
1203
+
1204
+ = 0.9.41 =
1205
+ * View more details at https://ampforwp.com/disqus-comments-in-amp/
1206
+ * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
1207
+ * AMP WooCommerce supported tag was missing after the last update. [Bug fix]
1208
+ * Homepage & Related Posts was displaying private and protected posts, which is now fixed [Bug fix]
1209
+ * Next previous links added in Design 1 [Enhancement]
1210
+ * Invalid Post Time displaying in the homepage of Design 1 [Bug fix]
1211
+ * Twitter share now includes the twitter handle of the author with setting in options [Enhancement]
1212
+ * Emoji in comments leads to AMP errors was fixed [Bug fix]
1213
+ * Date are now displayed on archives in Design 1 [Enhancement]
1214
+ * When RTL enabled logo merges with nav bar was fixed [Bug fix]
1215
+ * Jetpack Photon compatibility added [3rd Party Compatibility]
1216
+
1217
+ = 0.9.40 =
1218
+ * View more details at https://ampforwp.com/0-9-40-released-biggest-stability-update/
1219
+ * Proper endpoints added [Improvement]
1220
+ * Flush Rewrites properly [Improvement]
1221
+ * REL Canonical properly getting added. [Improvement]
1222
+ * Proper Frontpage Canonical added [Improvement]
1223
+ * Added Base name support for categories and tags [Improvement]
1224
+ * Redirection of excluded post solved. [Bug fix]
1225
+ * Archives properly redirecting to the right URL [Bug fix]
1226
+ * Homepage redirection solved [Bug fix]
1227
+ * Plusone tag is stripped properly. [Validation Issue fixed]
1228
+ * Archives are now clickable. [Improvements]
1229
+ * WP_Query filter added for better customizability of Homepage loop. [Better Customizations]
1230
+ * Social share boost plugin compatibility. [3rd party Customizations]
1231
+ * Removed H1 from the frontpage even if it is not available. [Improvement]
1232
+ * H3 instead of H1 for Site title. So there is only one H1 per page. [SEO Improvement]
1233
+
1234
+ = 0.9.38 =
1235
+ * View full details at https://ampforwp.com/google-tag-manager-for-amp/
1236
+ * Google Tag manager included [New feature]
1237
+ * Iframe max-width added [Improvement]
1238
+ * Paginated pages have different titles now. [Bug fix]
1239
+
1240
+ = 0.9.37 =
1241
+ * View full details at https://ampforwp.com/category-tags-archive-support-added/
1242
+ * Debug issues solved [Bug fix]
1243
+ * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
1244
+ * Category, Tags & Archive Support with titles added [Enchancement]
1245
+ * Archive Title support added [Enchancement]
1246
+ * There were some issues with attachments [Bug fix]
1247
+ * removed ? from amp url's [Improvement]
1248
+ * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
1249
+ * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
1250
+ * Added an option to turn off AMP support for Homepage. [Enchancement]
1251
+ * Too many redirects issue on homepage is fixed #435 [Improvement]
1252
+ * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
1253
+ * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
1254
+ * Comment anchor link changed for simplecomment button files in both designs [Improvement]
1255
+ * Redirection Loop issue fixed [Bug fix]
1256
+ * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
1257
+ * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
1258
+ * Improved Sessions [Improvement]
1259
+ * Advnaced Settings panel was created for better user experience. [Improvement]
1260
+ * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
1261
+ * RTL issue fixed #454 [Bug fixed]
1262
+
1263
+ = 0.9.36 =
1264
+ * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
1265
+ * 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]
1266
+ * Hide advertisement section if advance ads plugin is active. [Better User experience]
1267
+ * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
1268
+ * 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]
1269
+
1270
+ = 0.9.35 =
1271
+ * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
1272
+ * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
1273
+ * Attachment page was having the wrong endpoint. [Bug fix]
1274
+ * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
1275
+ * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
1276
+ * Lang attributes were added [Enhancement]
1277
+ * The tag like was disallowed in the AMP [Validation Improvement]
1278
+ * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
1279
+ * AMP on Pages option was not working in some cases. [Bug fix]
1280
+ * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
1281
+ * g:plusone tag was not getting removed properly. [Validation Improvement]
1282
+ * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
1283
+ * Structured Data Image width issue solved [Enhancement]
1284
+ * 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]
1285
+ * imageanchor=”1 was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
1286
+
1287
+ = 0.9.34 =
1288
+ * Newspaper theme by Tagdiv was having issues, we have fixed this one.
1289
+
1290
+ = 0.9.33 [15th Jan 2017] =
1291
+ * Full details at https://ampforwp.com/debug-errors-shortcodes/
1292
+ * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
1293
+ * Debug errors fixed, Code is now much cleaner.
1294
+ * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
1295
+ * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
1296
+ * Properly removes AMP if turned off from Post panel
1297
+ * z-index position improved on Sticky Social bar
1298
+ * Better compatibility with shortcodes.
1299
+ * Divi Standard Layouts Compatibility
1300
+ * Properly Hide AMP posts if excluded. #367
1301
+ * Mobile redirection was causing loop issues which are now fixed.
1302
+ * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
1303
+ * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
1304
+ * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
1305
+ * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
1306
+
1307
+ = 0.9.32 [7th Jan 2017] =
1308
+ * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
1309
+ * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
1310
+ * Paginated pages on homepage redirect to homepage URL #335
1311
+ * Title of the page should be displayed on the FrontPage #358
1312
+ * Thrive Builder AMP Validation Compatibility, so it will be validated properly in AMP.
1313
+ * Twitter Sharing improved so it gets the data properly #341
1314
+ * Option to change the number of Related Posts #290
1315
+ * Validation errors due to rel="canonical" was missing on some pages
1316
+ * Comment button displays even if the comments are not available
1317
+ * Threaded comments were duplicating, so that issue is solved and added proper CSS for it.
1318
+ * Minor issue with Jetpack Comments fixed.
1319
+ * Missing amp-social-share.js on front page fixed #372
1320
+ * Minor improvements to Title and description tags.
1321
+ * Analytics Script was loading twice when Glue was active.
1322
+ * Page specific class added for better customization compatibility #377
1323
+ * Inline Style support added Fixed #356
1324
+ * Bugs fixed in Email notification pointer
1325
+
1326
+ = 0.9.31 [2nd Jan 2017] =
1327
+ * Proper Details at https://ampforwp.com/amp-0-9-31-released-installation-user-experience/
1328
+ * Proper Condition added for the scripts to load in Frontpage.php
1329
+ * Rel canonical properly added for front pages
1330
+ * 404 and Archive page Mobile redirection code refined
1331
+ * User Experience Improvement: Installation process was improved
1332
+
1333
+ = 0.9.3 [31th December 2016] =
1334
+ * Proper Details at https://ampforwp.com/custom-amp-content-editor/
1335
+ * 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.
1336
+ * FrontPage had some validation issues. [Bug fix]
1337
+ * Related posts in Design 1 we're redirecting to 404 fixed [Bug fix]
1338
+
1339
+ = 0.9.2.2 [27th December 2016] =
1340
+ * Proper Details at https://ampforwp.com/polishing-user-experience-improvements/
1341
+ * Made the Options panel user-friendly
1342
+ * Social Share on frontpage issue fixed.
1343
+ * Readme.txt made user-friendly.
1344
+ * Archive option removed and some UI improvements
1345
+ * Single was not displaying the Title
1346
+ * 'Type is not allowed' [Validation issue fixed]
1347
+ * noshade tag Validation issue fixed
1348
+
1349
+ = 0.9.2.1 [24th December 2016] =
1350
+ * Proper Details at https://ampforwp.com/step-towards-fixing-amp-validation-errors/
1351
+ * Disabled the Tags and Categories support for AMP for better validation until we find a better solution.
1352
+ * Mobile redirection bug fixed, It was continuously redirecting to the same page [Bug fix]
1353
+ * trailingslashit added to make sure we have proper url for Mobile redirection [Bug fix]
1354
+ * In content AD overlapping the content issue fixed
1355
+
1356
+ = 0.9.2 [23th December 2016] =
1357
+ * Proper Details at https://ampforwp.com/mobile-redirection/
1358
+ * AMP Mobile Redirection Feature added. It can be turned on from Dashboard > General and then Mobile Redirection. [New Feature]
1359
+ * Archive title and description added [Improvement]
1360
+ * Improved the Speed of the AMP version #321 [Improvement]
1361
+ * Anchor link was not closing fixed #328 [Bug Fix]
1362
+ * Typo in Trailingslashit function which resulted in some issues in the Homepage version [Bug Fix]
1363
+
1364
+ = 0.9.1.2 [20th December 2016] =
1365
+ * Proper Details at http://ampforwp.com/new/
1366
+ * DoubleClick Support
1367
+ * Custom Post Type Support
1368
+ * Ratings Support
1369
+ * Comments Gaping fix
1370
+ * Custom Excerpt code
1371
+ * Better Compatibility with Yoast SEO plugin
1372
+ * AMP Validation error in Design 1 Fixed
1373
+ * Proper Homepage title & Description with Yoast SEO plugin issue fixed
1374
+ * Design -1 Excerpt too big for mobile devices, Fixed
1375
+ * Advertisement support on Design 1
1376
+ * Link to Tags & Categories were having some issues.
1377
+ * AMP looking bad on big devices
1378
+ * AMP validation Improvement: Lightbox plugins compatibility
1379
+ * Huge Progress in AMP Validation Errors: Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
1380
+ * Page Performance: Removed default Google font loading
1381
+ * Page Performance: DNS Prefetch tag added for faster DNS Handshake
1382
+
1383
+ = 0.9.1 [16th December 2016] =
1384
+ * Proper Details at http://ampforwp.com/new/
1385
+ * PHP7 Compatibility
1386
+ * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
1387
+ * Custom CSS not working in Design one (#249)
1388
+ * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
1389
+ * How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
1390
+ * Non-amp Homepage support added (#267)
1391
+ * using get_avatar() (#259)
1392
+ * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
1393
+ * Validation Issue fixed: Script Tag removed from the content.
1394
+ * Featured image in Design 1 in single #261
1395
+ * After Fresh installation - a save is required Fixed
1396
+ * Excerpt length controlled
1397
+ * Design One has thumbnails on the Homepage
1398
+ * Non-AMP link goes to the wrong page, issue fixed.
1399
+ * Archive pages were broken, fixed.
1400
+ * Option to Enable & Disable the Next/Previous links in Single
1401
+ * WhatsApp sharing not working, issue fixed.
1402
+ * Category Taxonomy has extra ':' in the word.
1403
+ * The word 'Ago' is now translatable.
1404
+ * Yoast SEO with AMP compatibility issue fixed.
1405
+ * Several Minor Polishing in the code
1406
+ * Footer Ad gets covered by Sticky Social Icons (#269)
1407
+ * Smaller image size when “image caption” is used in Design-2 (#263)
1408
+ * Footer ad with Sticky Social bar issue fix
1409
+ * Checked with WordPress 4.7
1410
+ * Ad #1 was messing up with the title, issue fixed.
1411
+ * Compatibility improved with AMP WooCommerce.
1412
+
1413
+ = 0.9 =
1414
+ * Proper Details at http://ampforwp.com/amp-pagebuilder/
1415
+ * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
1416
+ * 100% Yoast Compatible , Now no need to have additionally Glue Installed
1417
+ * 100% completed Translation panel, Now absolutely anything on page is translated
1418
+ * Added Option to turn on/off Page Support
1419
+ * Styling for Tags was Corrected
1420
+ * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
1421
+ * Default Image alignment styling added
1422
+ * Added Option to turn on/off Page Support
1423
+ * Related Posts Now use Custom Excerpt if it Exists
1424
+ * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
1425
+ * <pre> Tag styling issue fixed for AMP pages
1426
+ * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
1427
+ * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
1428
+ * 2 New Designs added
1429
+ * SEO Panel Added
1430
+
1431
+ = 0.8.8 =
1432
+ * Proper Details at http://ampforwp.com/amp-0-8-8-released-translation-panel/
1433
+ * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
1434
+ * Badge Tag was throwing Validation error
1435
+ * Plusone tag validation error was fixed
1436
+ * Time tag was validation error was fixed
1437
+ * User experience for Mobile devices was improved
1438
+ * Meta info was messing up in smaller devices, it was fixed as well.
1439
+ * Internal AMP linking added for Categories and Tags
1440
+ * Future errors for AMP ads was fixed
1441
+ * Blockquote styling added
1442
+ * “Please Activate parent Plugin settings” added for better User Experience.
1443
+ * Related Post Ux improvement
1444
+ * Plugin version added in Footer source code for better debugging
1445
+ * Added Support for Default WordPress Image alignment
1446
+ * New action hooks added in index page
1447
+ * Featured Image Size options added
1448
+
1449
+ = 0.8.7 =
1450
+ * Proper Details at http://ampforwp.com/amp-0-8-7/
1451
+ * added option to enable/disable AMP on Archive pages (Ticket #188)
1452
+ * Solved 404 on Related Posts (Ticket #178 )
1453
+ * Related posts by either categories or Tags(Ticket #179)
1454
+ * added a link to menu Section from the AMP Options page(Ticket #190)
1455
+ * Added Support for Piwik Analytics(Ticket #163)
1456
+ * Added Support for Segment.com Analytics(Ticket #50)
1457
+ * Added a switch for hiding Non-Amp page link from Footer.( Ticket #189)
1458
+ * Added an Option that strips Users URL from Comments Section(Ticket #180)
1459
+ * Fixed stripping <date> tags from the content , Since it was preventing validation – amp-img issues fixed
1460
+ * UX Improved for every section of AMP Options page
1461
+ * Added Settings button on plugin page
1462
+ * Related posts switch added
1463
+ * Removed carousel.js
1464
+
1465
+
1466
+ = 0.8.6.1 =
1467
+ * Date Tag fix
1468
+ * Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
1469
+
1470
+ = 0.8.6 =
1471
+ * Proper Details at http://ampforwp.com/amp-0-8-6-released-related-posts-comments/
1472
+ * Related Posts
1473
+ * Post Comments
1474
+ * WhatsApp sharing button Your visitors can now easily share the content over the whatsapp.
1475
+ * Validation issue fixed by All In One Schema.org Rich Snippets plugin
1476
+ * Removed Google Fonts loading for Performance
1477
+ * New relic Support
1478
+ * Class added to ‘View Non-AMP Version’ text
1479
+ * Archives Structured Data issue fixed
1480
+ * Some instances img tags converted into amp-img automatically.
1481
+
1482
+
1483
+ = 0.8.5.3 =
1484
+ * Canonical issue fixed for Post
1485
+
1486
+ = 0.8.5.2 =
1487
+ * Canonical issue fixed for FrontPage
1488
+
1489
+ = 0.8.5.1 =
1490
+ * Proper Details at http://ampforwp.com/new/
1491
+ * Validation issue fixed: 'Value' tag
1492
+ * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
1493
+ * Validation issue fixed: Table markup
1494
+ * Validation issue fixed: nowrap and misc tags
1495
+ * New Relic Support
1496
+ * Tags on off option
1497
+ * Canonical and correct AMP html Redirect issues Solved
1498
+ * NextGEN Gallery Validation Support Added
1499
+
1500
+ = 0.8.5 =
1501
+ * Proper Details at http://ampforwp.com/the-0-4-compatibility/
1502
+ * AMP 0.4 Compatibility Check
1503
+ * Even better Structured Data Validation, Once in for all!
1504
+ * Structured Data Options to eliminate Validation errors
1505
+ * AMP Page Exclude option
1506
+
1507
+ = 0.8.4 =
1508
+ * Proper Details at http://ampforwp.com/blog/structured-data-validation/
1509
+ * Structured Data Validation
1510
+ * Navigation Text Change
1511
+ * Inline Style Validation
1512
+ * Form Validation
1513
+ * Frontpage shows the amphtml rel twice fixed
1514
+ * Facebook Sharing not working
1515
+
1516
+ = 0.8.3 =
1517
+ * Prefix added in the Content filter
1518
+ * Extra space after quote in Ads
1519
+
1520
+ = 0.8.2 =
1521
+ * Proper Details at http://ampforwp.com/blog/the-custom-frontpage/
1522
+ * Custom AMP FrontPage
1523
+ * Featured Image
1524
+ * New Mobile Friendly Advertisement sizes
1525
+ * Single Post Pagination Option
1526
+ * RTL Support
1527
+ * Notifications
1528
+ * Gaping if the Meta was turned off.
1529
+ * Analytics was not fetching the user id properly.
1530
+ * Page was not using the post template along with the AD support.
1531
+ * AMP Endpoint support for Paged when the front page is active.
1532
+ * UI improvement of Admin panel
1533
+ * Few Validation issues fixed
1534
+
1535
+ = 0.8.1 =
1536
+ * Warning: Cannot modify header information error fixed
1537
+ * Validation issue fixed. KK Star Plugin compatible.
1538
+ * Gaping in the smaller screens fixed
1539
+
1540
+ = 0.8 =
1541
+ * Proper Details at http://ampforwp.com/blog/the-change/
1542
+ * 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.
1543
+ * 99.5% Validation issues were fixed.
1544
+ * Page builder & Shortcodes Compatibility Support Added
1545
+ * Conflict with JSON API
1546
+ * Carousel support for Gallery
1547
+ * Better Image stretching and resizing
1548
+ * Youtube Video Embed Support
1549
+ * Vine Embed Support
1550
+ * Twitter oembed Support
1551
+ * Instagram Embed Support
1552
+ * Facebook Video Embed Support
1553
+ * Better Future Compatibility
1554
+
1555
+ = 0.7.7 =
1556
+ * Proper Details at http://ampforwp.com/blog/amp-0-7-7/
1557
+ * Big Validation Error fix Update
1558
+ * Disable AMP support on specific Pages and Posts
1559
+ * Option to disable the Post meta from the Single
1560
+ * Footer Credits and Copyright Text Option
1561
+ * New options for Social Sharing Bar in Single
1562
+ * Jetpack Social & Related Sharing Issue fixed
1563
+ * Gaping in footer if the Sticky bar is enabled
1564
+ * Text domain added on few strings
1565
+
1566
+ = 0.7.6 =
1567
+ * Google Adsense Support Added with AMP-Ad
1568
+ * Wrong Homepage rel amphtml bug fixed
1569
+
1570
+ = 0.7.5 =
1571
+ * Google Analytics Support Added
1572
+ * Logo Support Added. If the logo is disabled, then the Title should be activated.
1573
+ * Color Scheme Feature Added
1574
+ * User friendly Options Panel Added
1575
+ * iFrame support Added
1576
+ * Few Minor Bugs Fixed
1577
+
1578
+ = 0.7.1 =
1579
+ * Bug #24 (Github) fixed
1580
+ * Strip Style tags for faster & better validation
1581
+ * Bug #21 (Github) fixed
1582
+
1583
+ = 0.7 =
1584
+ * Canonical Improved
1585
+ * Navigation Validation bug fixed
1586
+ * Two more validation bugs fixed ('role' and 'tabindex' attribute)
1587
+ * Featured image automatically hides if it is not present
1588
+ * Validation issues in the images of the post's the_content
1589
+
1590
+ = 0.6 =
1591
+ * Improved Navigation Menu
1592
+ * Search Console errors fixed
1593
+ * Social Sharing option
1594
+ * Pages support
1595
+ * Force redirection for mobile users removed and many other bug fixes
1596
+
1597
+ = 0.5 =
1598
+ * Added AMP Markup for Google Structured data. This will fix the issues in Webmaster tools.
1599
+
1600
+ = 0.4 =
1601
+ * Support of Custom menu added for AMP enabled sites
1602
+
1603
+ = 0.3 =
1604
+ * Support of amp-img added in single posts
1605
+ * minor css bug fixed
1606
+
1607
+ = 0.2.5 =
1608
+ * Minor bugs fixed
1609
+ * ?mobile & ?nomobile is now ?amp & ?noamp
1610
+
1611
+ = 0.2 =
1612
+ * White Screen of death issue fixed
1613
+ * Plugin URI updated
1614
+
1615
+ = 0.1 =
1616
+ * Initial version
accelerated-moblie-pages.php CHANGED
@@ -1,555 +1,562 @@
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.84.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.html');
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.84.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
- // Pagination to work with Extensions like.hml
105
- add_rewrite_rule(
106
- ampforwp_name_blog_page(). '(.+?)/amp/page/([0-9]{1,})/?$',
107
- 'index.php?amp&paged=$matches[2]&page_id=' .ampforwp_get_the_page_id_blog_page(),
108
- 'top'
109
- );
110
-
111
- // For Author pages
112
- add_rewrite_rule(
113
- 'author\/([^/]+)\/amp\/?$',
114
- 'index.php?amp&author_name=$matches[1]',
115
- 'top'
116
- );
117
-
118
- add_rewrite_rule(
119
- 'author\/([^/]+)\/amp\/page\/?([0-9]{1,})\/?$',
120
- 'index.php?amp=1&author_name=$matches[1]&paged=$matches[2]',
121
- 'top'
122
- );
123
-
124
- // For category pages
125
- $rewrite_category = get_option('category_base');
126
- if ( ! empty($rewrite_category) ) {
127
- $rewrite_category = get_option('category_base');
128
- } else {
129
- $rewrite_category = 'category';
130
- }
131
-
132
- add_rewrite_rule(
133
- $rewrite_category.'\/(.+?)\/amp/?$',
134
- 'index.php?amp&category_name=$matches[1]',
135
- 'top'
136
- );
137
- // For category pages with Pagination
138
- add_rewrite_rule(
139
- $rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
140
- 'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
141
- 'top'
142
- );
143
-
144
- // For category pages with Pagination (Custom Permalink Structure)
145
- $permalink_structure = get_option('permalink_structure');
146
- $permalink_structure = preg_replace('/(%.*%)/', '', $permalink_structure);
147
- $permalink_structure = preg_replace('/\//', '', $permalink_structure);
148
- if ( $permalink_structure ) {
149
- add_rewrite_rule(
150
- $permalink_structure.'\/'.$rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
151
- 'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
152
- 'top'
153
- );
154
- }
155
-
156
- // For tag pages
157
- $rewrite_tag = get_option('tag_base');
158
- if ( ! empty($rewrite_tag) ) {
159
- $rewrite_tag = get_option('tag_base');
160
- } else {
161
- $rewrite_tag = 'tag';
162
- }
163
- add_rewrite_rule(
164
- $rewrite_tag.'\/(.+?)\/amp/?$',
165
- 'index.php?amp&tag=$matches[1]',
166
- 'top'
167
- );
168
- // For tag pages with Pagination
169
- add_rewrite_rule(
170
- $rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
171
- 'index.php?amp&tag=$matches[1]&paged=$matches[2]',
172
- 'top'
173
- );
174
- // For tag pages with Pagination (Custom Permalink Structure)
175
- if ( $permalink_structure ) {
176
- add_rewrite_rule(
177
- $permalink_structure.'\/'.$rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
178
- 'index.php?amp&tag=$matches[1]&paged=$matches[2]',
179
- 'top'
180
- );
181
- }
182
-
183
- //Rewrite rule for custom Taxonomies
184
- $args = array(
185
- 'public' => true,
186
- '_builtin' => false,
187
- );
188
- $output = 'names'; // or objects
189
- $operator = 'and'; // 'and' or 'or'
190
- $taxonomies = get_taxonomies( $args, $output, $operator );
191
- if ( $taxonomies ) {
192
- foreach ( $taxonomies as $taxonomy ) {
193
- add_rewrite_rule(
194
- $taxonomy.'\/(.+?)\/amp/?$',
195
- 'index.php?amp&'.$taxonomy.'=$matches[1]',
196
- 'top'
197
- );
198
- // For Custom Taxonomies with pages
199
- add_rewrite_rule(
200
- $taxonomy.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
201
- 'index.php?amp&'.$taxonomy.'=$matches[1]&paged=$matches[2]',
202
- 'top'
203
- );
204
- }
205
- }
206
- }
207
- add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
208
-
209
- register_activation_hook( __FILE__, 'ampforwp_rewrite_activation', 20 );
210
- function ampforwp_rewrite_activation() {
211
-
212
- // Run AMP deactivation code while activation
213
- ampforwp_deactivate_amp_plugin();
214
-
215
- if ( ! did_action( 'ampforwp_init' ) ) {
216
- ampforwp_init();
217
- }
218
-
219
- flush_rewrite_rules();
220
-
221
- ampforwp_add_custom_post_support();
222
- ampforwp_add_custom_rewrite_rules();
223
-
224
- // Flushing rewrite urls ONLY on activation
225
- global $wp_rewrite;
226
- $wp_rewrite->flush_rules();
227
-
228
- delete_option('ampforwp_rewrite_flush_option');
229
-
230
- // Set transient for Welcome page
231
- set_transient( 'ampforwp_welcome_screen_activation_redirect', true, 30 );
232
-
233
- }
234
-
235
- add_action('init', 'ampforwp_flush_rewrite_by_option', 20);
236
-
237
- function ampforwp_flush_rewrite_by_option(){
238
-
239
- global $wp_rewrite;
240
- $get_current_permalink_settings = "";
241
-
242
- $get_current_permalink_settings = get_option('ampforwp_rewrite_flush_option');
243
-
244
- if ( $get_current_permalink_settings ) {
245
- return;
246
- }
247
- // Adding double check to make sure, we are not updating and calling database unnecessarily
248
- if ( empty( $get_current_permalink_settings ) ) {
249
- $wp_rewrite->flush_rules();
250
- update_option('ampforwp_rewrite_flush_option', 'true');
251
- }
252
-
253
- }
254
-
255
- register_deactivation_hook( __FILE__, 'ampforwp_rewrite_deactivate', 20 );
256
- function ampforwp_rewrite_deactivate() {
257
- // Flushing rewrite urls ONLY on deactivation
258
- global $wp_rewrite;
259
-
260
- foreach ( $wp_rewrite->endpoints as $index => $endpoint ) {
261
- if ( AMP_QUERY_VAR === $endpoint[1] ) {
262
- unset( $wp_rewrite->endpoints[ $index ] );
263
- break;
264
- }
265
- }
266
-
267
- flush_rewrite_rules();
268
-
269
- $wp_rewrite->flush_rules();
270
-
271
- // Remove transient for Welcome page
272
- delete_transient( 'ampforwp_welcome_screen_activation_redirect');
273
- }
274
-
275
- add_action( 'admin_init','ampforwp_parent_plugin_check');
276
- function ampforwp_parent_plugin_check() {
277
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
278
- $amp_plugin_activation_check = is_plugin_active( 'amp/amp.php' );
279
- if ( $amp_plugin_activation_check ) {
280
- // set_transient( 'ampforwp_parent_plugin_check', true, 30 );
281
- } else {
282
- delete_option( 'ampforwp_parent_plugin_check');
283
- }
284
- }
285
- if(!function_exists('ampforwp_upcomming_layouts_demo') && is_admin()){
286
- function ampforwp_upcomming_layouts_demo(){
287
- return array(array(
288
- "name"=>'News',
289
- "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-1.png',
290
- "link"=>'https://ampforwp.com/amp-layouts/',
291
- )
292
- );
293
- }
294
- }
295
- // Redux panel inclusion code
296
- if ( ! class_exists( 'ReduxFramework' ) ) {
297
- require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
298
- require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
299
- }
300
- if ( is_admin() ) {
301
- // Register all the main options
302
- require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
303
- require_once dirname( __FILE__ ).'/templates/report-bugs.php';
304
- }
305
- // Modules
306
- add_action('after_setup_theme','ampforwp_add_module_files');
307
- function ampforwp_add_module_files() {
308
-
309
- global $redux_builder_amp;
310
- if ( isset($redux_builder_amp['ampforwp-content-builder']) && $redux_builder_amp['ampforwp-content-builder'] ) {
311
- if ( ! function_exists( 'bstw' ) ) {
312
- require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/tinymce-widget/tinymce-widget.php';
313
- }
314
- require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-blurb.php';
315
- require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-button.php';
316
- }
317
- }
318
-
319
- /*
320
- * Load Files only in the backend
321
- * As we don't need plugin activation code to run everytime the site loads
322
- */
323
- if ( is_admin() ) {
324
-
325
- // Include Welcome page only on Admin pages
326
- require AMPFORWP_PLUGIN_DIR .'/includes/welcome.php';
327
-
328
- // Add Settings Button in Plugin backend
329
- if ( ! function_exists( 'ampforwp_plugin_settings_link' ) ) {
330
-
331
- // Deactivate Parent Plugin notice
332
- add_filter( 'plugin_action_links', 'ampforwp_plugin_settings_link', 10, 5 );
333
-
334
- function ampforwp_plugin_settings_link( $actions, $plugin_file ) {
335
- static $plugin;
336
- if ( ! isset($plugin))
337
- $plugin = plugin_basename(__FILE__);
338
- if ( $plugin === $plugin_file ) {
339
- $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>' );
340
-
341
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
342
- $actions = array_merge( $actions, $settings );
343
- }
344
- return $actions;
345
- }
346
- }
347
- } // is_admin() closing
348
-
349
- // AMP endpoint Verifier
350
- function ampforwp_is_amp_endpoint() {
351
- if ( ampforwp_is_non_amp() && ! is_admin()) {
352
- return ampforwp_is_non_amp();
353
- }
354
- else {
355
- return false !== get_query_var( 'amp', false );
356
- }
357
- }
358
-
359
- if ( ! class_exists( 'Ampforwp_Init', false ) ) {
360
- class Ampforwp_Init {
361
-
362
- public function __construct(){
363
-
364
- // Load Files required for the plugin to run
365
- require AMPFORWP_PLUGIN_DIR .'/includes/includes.php';
366
-
367
- // Redirection Code added
368
- require AMPFORWP_PLUGIN_DIR.'/includes/redirect.php';
369
-
370
- require AMPFORWP_PLUGIN_DIR .'/classes/class-init.php';
371
- new Ampforwp_Loader();
372
-
373
- }
374
- }
375
- }
376
- /*
377
- * Start the plugin.
378
- * Gentlemen start your engines
379
- */
380
- function ampforwp_plugin_init() {
381
-
382
- if ( defined( 'AMP__FILE__' ) && defined('AMPFORWP_PLUGIN_DIR') ) {
383
- new Ampforwp_Init();
384
- }
385
- }
386
- add_action('init','ampforwp_plugin_init',9);
387
-
388
- /*
389
- * customized output widget
390
- * to be used be used in before or after Loop
391
- */
392
- require AMPFORWP_PLUGIN_DIR.'/templates/category-widget.php';
393
- require AMPFORWP_PLUGIN_DIR.'/templates/woo-widget.php';
394
-
395
-
396
- /*
397
- * Including core AMP plugin files and removing any other things if necessary
398
- */
399
- function ampforwp_bundle_core_amp_files(){
400
- // Bundling Default plugin
401
- require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/amp/amp.php';
402
-
403
- define( 'AMP__FILE__', __FILE__ );
404
- if ( ! defined('AMP__DIR__') ) {
405
- define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
406
- }
407
- define( 'AMP__VERSION', '0.4.2' );
408
-
409
- require_once( AMP__DIR__ . '/back-compat/back-compat.php' );
410
- require_once( AMP__DIR__ . '/includes/amp-helper-functions.php' );
411
- require_once( AMP__DIR__ . '/includes/admin/functions.php' );
412
- require_once( AMP__DIR__ . '/includes/settings/class-amp-customizer-settings.php' );
413
- require_once( AMP__DIR__ . '/includes/settings/class-amp-customizer-design-settings.php' );
414
- }
415
- add_action('plugins_loaded','ampforwp_bundle_core_amp_files', 8);
416
-
417
- function ampforwp_deactivate_amp_plugin() {
418
-
419
- if ( version_compare( floatval( get_bloginfo( 'version' ) ), '3.5', '>=' ) ) {
420
-
421
- if ( current_user_can( 'activate_plugins' ) ) {
422
-
423
- add_action( 'admin_init', 'ampforwp_deactivate_amp' );
424
-
425
- function ampforwp_deactivate_amp() {
426
- deactivate_plugins( AMPFORWP_MAIN_PLUGIN_DIR . 'amp/amp.php' );
427
- }
428
- }
429
- }
430
- }
431
- add_action( 'plugins_loaded', 'ampforwp_deactivate_amp_plugin' );
432
-
433
- function ampforwp_modify_amp_activatation_link( $actions, $plugin_file ) {
434
- $plugin = '';
435
-
436
- $plugin = 'amp/amp.php';
437
- if ( $plugin == $plugin_file ) {
438
- add_thickbox();
439
- unset($actions['activate']);
440
- $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>';
441
- array_unshift ($actions,$a);
442
- }
443
- return $actions;
444
- }
445
- add_filter( 'plugin_action_links', 'ampforwp_modify_amp_activatation_link', 10, 2 );
446
-
447
- if ( ! function_exists('ampforwp_init') ) {
448
- add_action( 'init', 'ampforwp_init' );
449
- function ampforwp_init() {
450
- if ( false === apply_filters( 'amp_is_enabled', true ) ) {
451
- return;
452
- }
453
-
454
- define( 'AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
455
-
456
- if ( ! defined('AMP__DIR__') ) {
457
- define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
458
- }
459
-
460
- do_action( 'amp_init' );
461
-
462
- load_plugin_textdomain( 'amp', false, plugin_basename( AMP__DIR__ ) . '/languages' );
463
-
464
- add_rewrite_endpoint( AMP_QUERY_VAR, EP_PERMALINK );
465
- add_post_type_support( 'post', AMP_QUERY_VAR );
466
-
467
- add_filter( 'request', 'amp_force_query_var_value' );
468
- add_action( 'wp', 'amp_maybe_add_actions' );
469
-
470
- // Redirect the old url of amp page to the updated url. #1033 (Vendor Update)
471
- add_filter( 'old_slug_redirect_url', 'ampforwp_redirect_old_slug_to_new_url' );
472
-
473
- if ( class_exists( 'Jetpack' ) && ! (defined( 'IS_WPCOM' ) && IS_WPCOM) ) {
474
- require_once( AMP__DIR__ . '/jetpack-helper.php' );
475
- }
476
- }
477
- }
478
-
479
-
480
- function amp_update_db_check() {
481
- global $redux_builder_amp;
482
- $ampforwp_current_version = AMPFORWP_VERSION;
483
- if ( get_option( 'AMPforwp_db_version' ) !== $ampforwp_current_version ) {
484
-
485
- if ( isset( $_GET['ampforwp-dismiss'] ) && trim( $_GET['ampforwp-dismiss']) === "ampforwp_dismiss_admin_notices" ) {
486
- update_option( 'AMPforwp_db_version', $ampforwp_current_version );
487
- wp_redirect(remove_query_arg('ampforwp-dismiss'), 301);
488
- }
489
- if ( isset($redux_builder_amp['ampforwp-update-notification-bar'] ) && $redux_builder_amp['ampforwp-update-notification-bar'] && current_user_can( 'manage_options' ) ) {
490
-
491
- add_action('admin_notices', 'ampforwp_update_notice');
492
- }
493
- }
494
- }
495
- add_action( 'plugins_loaded', 'amp_update_db_check' );
496
-
497
- function ampforwp_update_notice() {
498
- $screen = '';
499
- $screen = get_current_screen();
500
- $ampforwp_current_version = AMPFORWP_VERSION;
501
- if ( 'toplevel_page_amp_options' == $screen->base ) { ?>
502
- <div class="notice-success notice is-dismissible amp-update-notice">
503
- <div class="amp-update-notice-text-box">
504
- <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" />
505
- <div class="amp-update-notice-text"> <?php echo esc_attr('AMP has been updated to '.$ampforwp_current_version, 'accelerated-mobile-pages' ); ?></div>
506
- <a href="https://ampforwp.com/new/" target="_blank" href="admin.php?page=acmforwp_update">What's New?</a>
507
- </div>
508
- <div class="amp-update-notice-dismiss">
509
- <a title="Close this Notification" href="<?php echo esc_url(add_query_arg( 'ampforwp-dismiss', 'ampforwp_dismiss_admin_notices' )) ?>">X</a>
510
- </div>
511
- <div class="amp-update-notice-review-box">
512
- <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>
513
- </div>
514
- </div>
515
- <?php }
516
- }
517
- if ( ! defined('AMP_FRAMEWORK_COMOPNENT_DIR_PATH') ) {
518
- define('AMP_FRAMEWORK_COMOPNENT_DIR_PATH', plugin_dir_path( __FILE__ )."/components");
519
- }
520
- require_once( AMP_FRAMEWORK_COMOPNENT_DIR_PATH . '/components-core.php' );
521
- require_once( AMPFORWP_PLUGIN_DIR. 'pagebuilder/amp-page-builder.php' );
522
- require_once( AMPFORWP_PLUGIN_DIR. 'base_remover/base_remover.php' );
523
- require_once( AMPFORWP_PLUGIN_DIR. 'includes/thirdparty-compatibility.php' );
524
- require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
525
-
526
- /**
527
- * Redirects the old AMP URL to the new AMP URL.
528
- * If post slug is updated the amp page with old post slug will be redirected to the updated url.
529
- *
530
- * @param string $link New URL of the post.
531
- *
532
- * @return string $link URL to be redirected.
533
- */
534
- if ( ! function_exists( 'ampforwp_redirect_old_slug_to_new_url' ) ) {
535
- function ampforwp_redirect_old_slug_to_new_url( $link ) {
536
-
537
- if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
538
- $link = trailingslashit( trailingslashit( $link ) . AMPFORWP_AMP_QUERY_VAR );
539
- }
540
-
541
- return $link;
542
- }
543
- }
544
-
545
- // Hide Post Builder if Swift is enabled
546
- add_filter('amp_customizer_is_enabled', 'ampforwp_customizer_is_enabled');
547
- if ( ! function_exists('ampforwp_customizer_is_enabled') ) {
548
- function ampforwp_customizer_is_enabled($value){
549
- global $redux_builder_amp;
550
- if ( 4 == $redux_builder_amp['amp-design-selector'] ) {
551
- $value = false;
552
- }
553
- return $value;
554
- }
 
 
 
 
 
 
 
555
  }
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.85
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.html');
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.85');
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
+ // Pagination to work with Extensions like.hml
105
+ add_rewrite_rule(
106
+ ampforwp_name_blog_page(). '(.+?)/amp/page/([0-9]{1,})/?$',
107
+ 'index.php?amp&paged=$matches[2]&page_id=' .ampforwp_get_the_page_id_blog_page(),
108
+ 'top'
109
+ );
110
+
111
+ // For Author pages
112
+ add_rewrite_rule(
113
+ 'author\/([^/]+)\/amp\/?$',
114
+ 'index.php?amp&author_name=$matches[1]',
115
+ 'top'
116
+ );
117
+
118
+ add_rewrite_rule(
119
+ 'author\/([^/]+)\/amp\/page\/?([0-9]{1,})\/?$',
120
+ 'index.php?amp=1&author_name=$matches[1]&paged=$matches[2]',
121
+ 'top'
122
+ );
123
+
124
+ // For category pages
125
+ $rewrite_category = get_option('category_base');
126
+ if ( ! empty($rewrite_category) ) {
127
+ $rewrite_category = get_option('category_base');
128
+ } else {
129
+ $rewrite_category = 'category';
130
+ }
131
+
132
+ add_rewrite_rule(
133
+ $rewrite_category.'\/(.+?)\/amp/?$',
134
+ 'index.php?amp&category_name=$matches[1]',
135
+ 'top'
136
+ );
137
+ // For category pages with Pagination
138
+ add_rewrite_rule(
139
+ $rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
140
+ 'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
141
+ 'top'
142
+ );
143
+
144
+ // For category pages with Pagination (Custom Permalink Structure)
145
+ $permalink_structure = get_option('permalink_structure');
146
+ $permalink_structure = preg_replace('/(%.*%)/', '', $permalink_structure);
147
+ $permalink_structure = preg_replace('/\//', '', $permalink_structure);
148
+ if ( $permalink_structure ) {
149
+ add_rewrite_rule(
150
+ $permalink_structure.'\/'.$rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
151
+ 'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
152
+ 'top'
153
+ );
154
+ }
155
+
156
+ // For tag pages
157
+ $rewrite_tag = get_option('tag_base');
158
+ if ( ! empty($rewrite_tag) ) {
159
+ $rewrite_tag = get_option('tag_base');
160
+ } else {
161
+ $rewrite_tag = 'tag';
162
+ }
163
+ add_rewrite_rule(
164
+ $rewrite_tag.'\/(.+?)\/amp/?$',
165
+ 'index.php?amp&tag=$matches[1]',
166
+ 'top'
167
+ );
168
+ // For tag pages with Pagination
169
+ add_rewrite_rule(
170
+ $rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
171
+ 'index.php?amp&tag=$matches[1]&paged=$matches[2]',
172
+ 'top'
173
+ );
174
+ // For tag pages with Pagination (Custom Permalink Structure)
175
+ if ( $permalink_structure ) {
176
+ add_rewrite_rule(
177
+ $permalink_structure.'\/'.$rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
178
+ 'index.php?amp&tag=$matches[1]&paged=$matches[2]',
179
+ 'top'
180
+ );
181
+ }
182
+
183
+ //Rewrite rule for custom Taxonomies
184
+ $args = array(
185
+ 'public' => true,
186
+ '_builtin' => false,
187
+ );
188
+ $output = 'names'; // or objects
189
+ $operator = 'and'; // 'and' or 'or'
190
+ $taxonomies = get_taxonomies( $args, $output, $operator );
191
+ if ( $taxonomies ) {
192
+ foreach ( $taxonomies as $taxonomy ) {
193
+ add_rewrite_rule(
194
+ $taxonomy.'\/(.+?)\/amp/?$',
195
+ 'index.php?amp&'.$taxonomy.'=$matches[1]',
196
+ 'top'
197
+ );
198
+ // For Custom Taxonomies with pages
199
+ add_rewrite_rule(
200
+ $taxonomy.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
201
+ 'index.php?amp&'.$taxonomy.'=$matches[1]&paged=$matches[2]',
202
+ 'top'
203
+ );
204
+ }
205
+ }
206
+ }
207
+ add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
208
+
209
+ register_activation_hook( __FILE__, 'ampforwp_rewrite_activation', 20 );
210
+ function ampforwp_rewrite_activation() {
211
+
212
+ // Run AMP deactivation code while activation
213
+ ampforwp_deactivate_amp_plugin();
214
+
215
+ if ( ! did_action( 'ampforwp_init' ) ) {
216
+ ampforwp_init();
217
+ }
218
+
219
+ flush_rewrite_rules();
220
+
221
+ ampforwp_add_custom_post_support();
222
+ ampforwp_add_custom_rewrite_rules();
223
+
224
+ // Flushing rewrite urls ONLY on activation
225
+ global $wp_rewrite;
226
+ $wp_rewrite->flush_rules();
227
+
228
+ delete_option('ampforwp_rewrite_flush_option');
229
+
230
+ // Set transient for Welcome page
231
+ set_transient( 'ampforwp_welcome_screen_activation_redirect', true, 30 );
232
+
233
+ }
234
+
235
+ add_action('init', 'ampforwp_flush_rewrite_by_option', 20);
236
+
237
+ function ampforwp_flush_rewrite_by_option(){
238
+
239
+ global $wp_rewrite;
240
+ $get_current_permalink_settings = "";
241
+
242
+ $get_current_permalink_settings = get_option('ampforwp_rewrite_flush_option');
243
+
244
+ if ( $get_current_permalink_settings ) {
245
+ return;
246
+ }
247
+ // Adding double check to make sure, we are not updating and calling database unnecessarily
248
+ if ( empty( $get_current_permalink_settings ) ) {
249
+ $wp_rewrite->flush_rules();
250
+ update_option('ampforwp_rewrite_flush_option', 'true');
251
+ }
252
+
253
+ }
254
+
255
+ register_deactivation_hook( __FILE__, 'ampforwp_rewrite_deactivate', 20 );
256
+ function ampforwp_rewrite_deactivate() {
257
+ // Flushing rewrite urls ONLY on deactivation
258
+ global $wp_rewrite;
259
+
260
+ foreach ( $wp_rewrite->endpoints as $index => $endpoint ) {
261
+ if ( AMP_QUERY_VAR === $endpoint[1] ) {
262
+ unset( $wp_rewrite->endpoints[ $index ] );
263
+ break;
264
+ }
265
+ }
266
+
267
+ flush_rewrite_rules();
268
+
269
+ $wp_rewrite->flush_rules();
270
+
271
+ // Remove transient for Welcome page
272
+ delete_transient( 'ampforwp_welcome_screen_activation_redirect');
273
+ }
274
+
275
+ add_action( 'admin_init','ampforwp_parent_plugin_check');
276
+ function ampforwp_parent_plugin_check() {
277
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
278
+ $amp_plugin_activation_check = is_plugin_active( 'amp/amp.php' );
279
+ if ( $amp_plugin_activation_check ) {
280
+ // set_transient( 'ampforwp_parent_plugin_check', true, 30 );
281
+ } else {
282
+ delete_option( 'ampforwp_parent_plugin_check');
283
+ }
284
+ }
285
+ if(!function_exists('ampforwp_upcomming_layouts_demo') && is_admin()){
286
+ function ampforwp_upcomming_layouts_demo(){
287
+ return array(
288
+ array(
289
+ "name"=>'News',
290
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-1.png',
291
+ "link"=>'https://ampforwp.com/layouts-1/',
292
+ ),
293
+ array(
294
+ "name"=>'Weekly Magazine',
295
+ "image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-2.png',
296
+ "link"=>'https://ampforwp.com/layouts-2/',
297
+ )
298
+
299
+ );
300
+ }
301
+ }
302
+ // Redux panel inclusion code
303
+ if ( ! class_exists( 'ReduxFramework' ) ) {
304
+ require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
305
+ require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
306
+ }
307
+ if ( is_admin() ) {
308
+ // Register all the main options
309
+ require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
310
+ require_once dirname( __FILE__ ).'/templates/report-bugs.php';
311
+ }
312
+ // Modules
313
+ add_action('after_setup_theme','ampforwp_add_module_files');
314
+ function ampforwp_add_module_files() {
315
+
316
+ global $redux_builder_amp;
317
+ if ( isset($redux_builder_amp['ampforwp-content-builder']) && $redux_builder_amp['ampforwp-content-builder'] ) {
318
+ if ( ! function_exists( 'bstw' ) ) {
319
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/tinymce-widget/tinymce-widget.php';
320
+ }
321
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-blurb.php';
322
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/modules/ampforwp-button.php';
323
+ }
324
+ }
325
+
326
+ /*
327
+ * Load Files only in the backend
328
+ * As we don't need plugin activation code to run everytime the site loads
329
+ */
330
+ if ( is_admin() ) {
331
+
332
+ // Include Welcome page only on Admin pages
333
+ require AMPFORWP_PLUGIN_DIR .'/includes/welcome.php';
334
+
335
+ // Add Settings Button in Plugin backend
336
+ if ( ! function_exists( 'ampforwp_plugin_settings_link' ) ) {
337
+
338
+ // Deactivate Parent Plugin notice
339
+ add_filter( 'plugin_action_links', 'ampforwp_plugin_settings_link', 10, 5 );
340
+
341
+ function ampforwp_plugin_settings_link( $actions, $plugin_file ) {
342
+ static $plugin;
343
+ if ( ! isset($plugin))
344
+ $plugin = plugin_basename(__FILE__);
345
+ if ( $plugin === $plugin_file ) {
346
+ $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>' );
347
+
348
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
349
+ $actions = array_merge( $actions, $settings );
350
+ }
351
+ return $actions;
352
+ }
353
+ }
354
+ } // is_admin() closing
355
+
356
+ // AMP endpoint Verifier
357
+ function ampforwp_is_amp_endpoint() {
358
+ if ( ampforwp_is_non_amp() && ! is_admin()) {
359
+ return ampforwp_is_non_amp();
360
+ }
361
+ else {
362
+ return false !== get_query_var( 'amp', false );
363
+ }
364
+ }
365
+
366
+ if ( ! class_exists( 'Ampforwp_Init', false ) ) {
367
+ class Ampforwp_Init {
368
+
369
+ public function __construct(){
370
+
371
+ // Load Files required for the plugin to run
372
+ require AMPFORWP_PLUGIN_DIR .'/includes/includes.php';
373
+
374
+ // Redirection Code added
375
+ require AMPFORWP_PLUGIN_DIR.'/includes/redirect.php';
376
+
377
+ require AMPFORWP_PLUGIN_DIR .'/classes/class-init.php';
378
+ new Ampforwp_Loader();
379
+
380
+ }
381
+ }
382
+ }
383
+ /*
384
+ * Start the plugin.
385
+ * Gentlemen start your engines
386
+ */
387
+ function ampforwp_plugin_init() {
388
+
389
+ if ( defined( 'AMP__FILE__' ) && defined('AMPFORWP_PLUGIN_DIR') ) {
390
+ new Ampforwp_Init();
391
+ }
392
+ }
393
+ add_action('init','ampforwp_plugin_init',9);
394
+
395
+ /*
396
+ * customized output widget
397
+ * to be used be used in before or after Loop
398
+ */
399
+ require AMPFORWP_PLUGIN_DIR.'/templates/category-widget.php';
400
+ require AMPFORWP_PLUGIN_DIR.'/templates/woo-widget.php';
401
+
402
+
403
+ /*
404
+ * Including core AMP plugin files and removing any other things if necessary
405
+ */
406
+ function ampforwp_bundle_core_amp_files(){
407
+ // Bundling Default plugin
408
+ require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/amp/amp.php';
409
+
410
+ define( 'AMP__FILE__', __FILE__ );
411
+ if ( ! defined('AMP__DIR__') ) {
412
+ define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
413
+ }
414
+ define( 'AMP__VERSION', '0.4.2' );
415
+
416
+ require_once( AMP__DIR__ . '/back-compat/back-compat.php' );
417
+ require_once( AMP__DIR__ . '/includes/amp-helper-functions.php' );
418
+ require_once( AMP__DIR__ . '/includes/admin/functions.php' );
419
+ require_once( AMP__DIR__ . '/includes/settings/class-amp-customizer-settings.php' );
420
+ require_once( AMP__DIR__ . '/includes/settings/class-amp-customizer-design-settings.php' );
421
+ }
422
+ add_action('plugins_loaded','ampforwp_bundle_core_amp_files', 8);
423
+
424
+ function ampforwp_deactivate_amp_plugin() {
425
+
426
+ if ( version_compare( floatval( get_bloginfo( 'version' ) ), '3.5', '>=' ) ) {
427
+
428
+ if ( current_user_can( 'activate_plugins' ) ) {
429
+
430
+ add_action( 'admin_init', 'ampforwp_deactivate_amp' );
431
+
432
+ function ampforwp_deactivate_amp() {
433
+ deactivate_plugins( AMPFORWP_MAIN_PLUGIN_DIR . 'amp/amp.php' );
434
+ }
435
+ }
436
+ }
437
+ }
438
+ add_action( 'plugins_loaded', 'ampforwp_deactivate_amp_plugin' );
439
+
440
+ function ampforwp_modify_amp_activatation_link( $actions, $plugin_file ) {
441
+ $plugin = '';
442
+
443
+ $plugin = 'amp/amp.php';
444
+ if ( $plugin == $plugin_file ) {
445
+ add_thickbox();
446
+ unset($actions['activate']);
447
+ $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>';
448
+ array_unshift ($actions,$a);
449
+ }
450
+ return $actions;
451
+ }
452
+ add_filter( 'plugin_action_links', 'ampforwp_modify_amp_activatation_link', 10, 2 );
453
+
454
+ if ( ! function_exists('ampforwp_init') ) {
455
+ add_action( 'init', 'ampforwp_init' );
456
+ function ampforwp_init() {
457
+ if ( false === apply_filters( 'amp_is_enabled', true ) ) {
458
+ return;
459
+ }
460
+
461
+ define( 'AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
462
+
463
+ if ( ! defined('AMP__DIR__') ) {
464
+ define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
465
+ }
466
+
467
+ do_action( 'amp_init' );
468
+
469
+ load_plugin_textdomain( 'amp', false, plugin_basename( AMP__DIR__ ) . '/languages' );
470
+
471
+ add_rewrite_endpoint( AMP_QUERY_VAR, EP_PERMALINK );
472
+ add_post_type_support( 'post', AMP_QUERY_VAR );
473
+
474
+ add_filter( 'request', 'amp_force_query_var_value' );
475
+ add_action( 'wp', 'amp_maybe_add_actions' );
476
+
477
+ // Redirect the old url of amp page to the updated url. #1033 (Vendor Update)
478
+ add_filter( 'old_slug_redirect_url', 'ampforwp_redirect_old_slug_to_new_url' );
479
+
480
+ if ( class_exists( 'Jetpack' ) && ! (defined( 'IS_WPCOM' ) && IS_WPCOM) ) {
481
+ require_once( AMP__DIR__ . '/jetpack-helper.php' );
482
+ }
483
+ }
484
+ }
485
+
486
+
487
+ function amp_update_db_check() {
488
+ global $redux_builder_amp;
489
+ $ampforwp_current_version = AMPFORWP_VERSION;
490
+ if ( get_option( 'AMPforwp_db_version' ) !== $ampforwp_current_version ) {
491
+
492
+ if ( isset( $_GET['ampforwp-dismiss'] ) && trim( $_GET['ampforwp-dismiss']) === "ampforwp_dismiss_admin_notices" ) {
493
+ update_option( 'AMPforwp_db_version', $ampforwp_current_version );
494
+ wp_redirect(remove_query_arg('ampforwp-dismiss'), 301);
495
+ }
496
+ if ( isset($redux_builder_amp['ampforwp-update-notification-bar'] ) && $redux_builder_amp['ampforwp-update-notification-bar'] && current_user_can( 'manage_options' ) ) {
497
+
498
+ add_action('admin_notices', 'ampforwp_update_notice');
499
+ }
500
+ }
501
+ }
502
+ add_action( 'plugins_loaded', 'amp_update_db_check' );
503
+
504
+ function ampforwp_update_notice() {
505
+ $screen = '';
506
+ $screen = get_current_screen();
507
+ $ampforwp_current_version = AMPFORWP_VERSION;
508
+ if ( 'toplevel_page_amp_options' == $screen->base ) { ?>
509
+ <div class="notice-success notice is-dismissible amp-update-notice">
510
+ <div class="amp-update-notice-text-box">
511
+ <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" />
512
+ <div class="amp-update-notice-text"> <?php echo esc_attr('AMP has been updated to '.$ampforwp_current_version, 'accelerated-mobile-pages' ); ?></div>
513
+ <a href="https://ampforwp.com/new/" target="_blank" href="admin.php?page=acmforwp_update">What's New?</a>
514
+ </div>
515
+ <div class="amp-update-notice-dismiss">
516
+ <a title="Close this Notification" href="<?php echo esc_url(add_query_arg( 'ampforwp-dismiss', 'ampforwp_dismiss_admin_notices' )) ?>">X</a>
517
+ </div>
518
+ <div class="amp-update-notice-review-box">
519
+ <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>
520
+ </div>
521
+ </div>
522
+ <?php }
523
+ }
524
+ if ( ! defined('AMP_FRAMEWORK_COMOPNENT_DIR_PATH') ) {
525
+ define('AMP_FRAMEWORK_COMOPNENT_DIR_PATH', plugin_dir_path( __FILE__ )."/components");
526
+ }
527
+ require_once( AMP_FRAMEWORK_COMOPNENT_DIR_PATH . '/components-core.php' );
528
+ require_once( AMPFORWP_PLUGIN_DIR. 'pagebuilder/amp-page-builder.php' );
529
+ require_once( AMPFORWP_PLUGIN_DIR. 'base_remover/base_remover.php' );
530
+ require_once( AMPFORWP_PLUGIN_DIR. 'includes/thirdparty-compatibility.php' );
531
+ require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
532
+
533
+ /**
534
+ * Redirects the old AMP URL to the new AMP URL.
535
+ * If post slug is updated the amp page with old post slug will be redirected to the updated url.
536
+ *
537
+ * @param string $link New URL of the post.
538
+ *
539
+ * @return string $link URL to be redirected.
540
+ */
541
+ if ( ! function_exists( 'ampforwp_redirect_old_slug_to_new_url' ) ) {
542
+ function ampforwp_redirect_old_slug_to_new_url( $link ) {
543
+
544
+ if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
545
+ $link = trailingslashit( trailingslashit( $link ) . AMPFORWP_AMP_QUERY_VAR );
546
+ }
547
+
548
+ return $link;
549
+ }
550
+ }
551
+
552
+ // Hide Post Builder if Swift is enabled
553
+ add_filter('amp_customizer_is_enabled', 'ampforwp_customizer_is_enabled');
554
+ if ( ! function_exists('ampforwp_customizer_is_enabled') ) {
555
+ function ampforwp_customizer_is_enabled($value){
556
+ global $redux_builder_amp;
557
+ if ( 4 == $redux_builder_amp['amp-design-selector'] ) {
558
+ $value = false;
559
+ }
560
+ return $value;
561
+ }
562
  }
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,49 @@
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
+ 'data-captioned' => '',
40
+ );
41
+ return AMP_DOM_Utils::create_node($this->dom, 'amp-instagram', $attrs);
42
+ }
43
+ public function get_scripts() {
44
+ if ( ! $this->did_convert_elements ) {
45
+ return array();
46
+ }
47
+ return array( self::$script_slug => self::$script_src );
48
+ }
49
  }
classes/class-ampforwp-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,101 @@
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_name = $post_author->display_name;
16
+ $and_text = '';
17
+ $and_text = ampforwp_translation($redux_builder_amp['amp-translator-and-text'], 'and' );
18
+ if ( function_exists('coauthors') ) {
19
+ $author_name = coauthors($and_text,$and_text,null,null,false);
20
+ }
21
+ $author_link = get_author_posts_url($post_author->ID);
22
+ if ( function_exists('coauthors_posts_links') ) {
23
+ $author_link = coauthors_posts_links($and_text,$and_text,null,null,false);
24
+ }
25
+ //var_dump($and);die;
26
+ $author_image_wrapper = '';
27
+
28
+ if ( isset($args['avatar']) ) {
29
+ $avatar = $args['avatar'];
30
+ }
31
+ if ( isset($args['avatar_size']) ) {
32
+ $avatar_size = $args['avatar_size'];
33
+ }
34
+ if ( isset($args['class']) ) {
35
+ $class = $args['class'];
36
+ }
37
+ if ( isset($args['author_description']) ) {
38
+ $author_description = $args['author_description'];
39
+ }
40
+
41
+
42
+ if ( isset( $args['author_prefix']) ) {
43
+ $author_prefix = $args['author_prefix'];
44
+ }
45
+ //$author_prefix = ampforwp_translation($redux_builder_amp['amp-translator-by-text'] , $author_prefix );
46
+
47
+ if ( isset( $args['author_link']) ) {
48
+ $author_link = $args['author_link'];
49
+ }
50
+ if ( isset( $args['author_wrapper_class']) ) {
51
+ $author_wrapper_class = $args['author_wrapper_class'];
52
+ }
53
+
54
+ if ( isset($args['author_image_wrapper']) ) {
55
+ $author_image_wrapper = $args['author_image_wrapper'];
56
+ }
57
+ if ( isset($args['show_date']) ) {
58
+ $show_date = $args['show_date'];
59
+ }
60
+ if ( isset($args['show_time']) ) {
61
+ $show_time = $args['show_time'];
62
+ }
63
+
64
+ ?>
65
+ <div class="amp-author <?php echo $class; ?>">
66
+ <?php if ( $avatar ) {
67
+ $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
68
+ ?>
69
+ <div class="amp-author-image <?php echo $author_image_wrapper; ?>">
70
+ <amp-img src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
71
+ </div>
72
+ <?php } ?>
73
+ <?php echo '<div class="author-details '. $author_wrapper_class .'">';
74
+ if ( true == $redux_builder_amp['ampforwp-author-page-url'] ){
75
+ if ( function_exists('coauthors_posts_links') ) {
76
+ echo '<span class="author-name">' .$author_prefix . $author_link . ' </span>';
77
+ }
78
+ else {
79
+ echo '<span class="author-name">' .$author_prefix . ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $author_name ).'</a></span>';
80
+ }
81
+ }
82
+ else
83
+ echo '<span class="author-name">' . $author_prefix . esc_html( $author_name ) . '</span>';
84
+
85
+ //to show date and time
86
+ if ( $show_date || $show_time ) {
87
+ echo '<span class="posted-time"> ';
88
+ if ( $show_date ) {
89
+ echo esc_html( get_the_date() ) . ' ';
90
+ }
91
+ if ( $show_time ) {
92
+ echo esc_html( get_the_time());
93
+ }
94
+ echo '</span>';
95
+ }
96
+ if ( $author_description ) {
97
+ echo "<p>".$post_author->description."</p>";
98
+ } ?>
99
+ </div>
100
+ </div>
101
  <?php }
components/breadcrumb/breadcrumb.php CHANGED
@@ -1,218 +1,218 @@
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
- // Do not display on the homepage
22
- if ( !ampforwp_polylang_front_page() && !is_front_page() ) {
23
-
24
- // Build the breadcrums
25
- echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
26
-
27
- // Home page
28
- 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>';
29
-
30
- if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
31
-
32
-
33
- echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . post_type_archive_title($prefix, false) . '</strong></li>';
34
- } else if ( is_author() ) {
35
- global $author;
36
-
37
- $userdata = get_userdata( $author );
38
- $author_url= get_author_posts_url($userdata->ID);
39
- $author_url = trailingslashit($author_url);
40
- // Display author name
41
- 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>';
42
-
43
- } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
44
-
45
- // If post is a custom post type
46
- $post_type = get_post_type();
47
-
48
- // If it is a custom post type display name and link
49
- if($post_type != 'post') {
50
-
51
- $post_type_object = get_post_type_object($post_type);
52
- $post_type_archive = get_post_type_archive_link($post_type);
53
- if ( false != $post_type_archive){
54
- 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>';
55
- }
56
- else {
57
- 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>';
58
- }
59
- }
60
-
61
- $custom_tax_name = get_queried_object()->name;
62
- echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . $custom_tax_name . '</strong></li>';
63
- } else if ( is_single() ) {
64
-
65
- // If post is a custom post type
66
- $post_type = get_post_type();
67
-
68
- // If it is a custom post type display name and link
69
- if($post_type != 'post') {
70
-
71
- $post_type_object = get_post_type_object($post_type);
72
- $post_type_archive = get_post_type_archive_link($post_type);
73
- if ( false != $post_type_archive){
74
- 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>';
75
- }
76
- else {
77
- 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>';
78
- }
79
- }
80
-
81
- // Get post category info
82
- $category = get_the_category();
83
-
84
- if(!empty($category)) {
85
-
86
- // Get last category post is in
87
- $last_category = array_values($category);
88
- $last_category = end($last_category);
89
- $category_name = get_category($last_category);
90
- // Get parent any categories and create array
91
- $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, ','),',');
92
- $cat_parents = explode(',',$get_cat_parents);
93
-
94
- // Loop through parent categories and store in variable $cat_display
95
- $cat_display = '';
96
- foreach($cat_parents as $parents) {
97
- $cat_id = get_cat_ID( $parents);
98
- $cat_link = get_category_link($cat_id);
99
- $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>';
100
- }
101
- }
102
-
103
- // If it's a custom post type within a custom taxonomy
104
- $taxonomy_exists = taxonomy_exists($custom_taxonomy);
105
- if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {
106
-
107
- $taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );
108
- if ( $taxonomy_terms ) {
109
- $cat_id = $taxonomy_terms[0]->term_id;
110
- $cat_nicename = $taxonomy_terms[0]->slug;
111
- $cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);
112
- $cat_link = trailingslashit($cat_link);
113
- $cat_name = $taxonomy_terms[0]->name;
114
- }
115
- }
116
-
117
- // Check if the post is in a category
118
- if(!empty($last_category)) {
119
- echo $cat_display;
120
-
121
- // Else if post is in a custom taxonomy
122
- } else if(!empty($cat_id)) {
123
-
124
- 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>';
125
- }
126
-
127
- } else if ( is_category() ) {
128
-
129
- // Category page
130
- echo '<li class="item-current item-cat"><strong class="bread-current bread-cat">' . single_cat_title('', false) . '</strong></li>';
131
- } else if ( is_page() ) {
132
-
133
- // Standard page
134
- if( $post->post_parent ){
135
-
136
- // If child page, get parents
137
- $anc = get_post_ancestors( $post->ID );
138
-
139
- // Get parents in the right order
140
- $anc = array_reverse($anc);
141
-
142
- // Parent page loop
143
- if ( !isset( $parents ) ) $parents = null;
144
- foreach ( $anc as $ancestor ) {
145
- $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>';
146
- }
147
-
148
- // Display parent pages
149
- echo $parents;
150
-
151
- // Current page
152
-
153
- }
154
-
155
- } else if ( is_tag() ) {
156
-
157
- // Tag page
158
-
159
- // Get tag information
160
- $term_id = get_query_var('tag_id');
161
- $taxonomy = 'post_tag';
162
- $args = 'include=' . $term_id;
163
- $terms = get_terms( $taxonomy, $args );
164
- $get_term_id = $terms[0]->term_id;
165
- $get_term_slug = $terms[0]->slug;
166
- $get_term_name = $terms[0]->name;
167
-
168
- // Display the tag name
169
- 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>';
170
- } elseif ( is_day() ) {
171
-
172
- // Day archive
173
-
174
- // Year link
175
- 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>';
176
-
177
- // Month link
178
- 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>';
179
-
180
-
181
- // Day display
182
- 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>';
183
-
184
- } else if ( is_month() ) {
185
-
186
- // Month Archive
187
-
188
- // Year link
189
- 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>';
190
-
191
- // Month display
192
- 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>';
193
-
194
- } else if ( is_year() ) {
195
-
196
- // Display year archive
197
- 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>';
198
-
199
- } else if ( get_query_var('paged') ) {
200
-
201
- // Paginated archives
202
- 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>';
203
-
204
- } else if ( is_search() ) {
205
-
206
- // Search results page
207
- 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>';
208
-
209
- } elseif ( is_404() ) {
210
-
211
- // 404 page
212
- echo '<li>' . 'Error 404' . '</li>';
213
- }
214
- echo '</ul>';
215
-
216
- }?>
217
- </div>
218
  <?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
+ // Do not display on the homepage
22
+ if ( !ampforwp_polylang_front_page() && !is_front_page() ) {
23
+
24
+ // Build the breadcrums
25
+ echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
26
+
27
+ // Home page
28
+ 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>';
29
+
30
+ if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
31
+
32
+
33
+ echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . post_type_archive_title($prefix, false) . '</strong></li>';
34
+ } else if ( is_author() ) {
35
+ global $author;
36
+
37
+ $userdata = get_userdata( $author );
38
+ $author_url= get_author_posts_url($userdata->ID);
39
+ $author_url = trailingslashit($author_url);
40
+ // Display author name
41
+ 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>';
42
+
43
+ } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
44
+
45
+ // If post is a custom post type
46
+ $post_type = get_post_type();
47
+
48
+ // If it is a custom post type display name and link
49
+ if($post_type != 'post') {
50
+
51
+ $post_type_object = get_post_type_object($post_type);
52
+ $post_type_archive = get_post_type_archive_link($post_type);
53
+ if ( false != $post_type_archive){
54
+ 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>';
55
+ }
56
+ else {
57
+ 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>';
58
+ }
59
+ }
60
+
61
+ $custom_tax_name = get_queried_object()->name;
62
+ echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . $custom_tax_name . '</strong></li>';
63
+ } else if ( is_single() ) {
64
+
65
+ // If post is a custom post type
66
+ $post_type = get_post_type();
67
+
68
+ // If it is a custom post type display name and link
69
+ if($post_type != 'post') {
70
+
71
+ $post_type_object = get_post_type_object($post_type);
72
+ $post_type_archive = get_post_type_archive_link($post_type);
73
+ if ( false != $post_type_archive){
74
+ 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>';
75
+ }
76
+ else {
77
+ 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>';
78
+ }
79
+ }
80
+
81
+ // Get post category info
82
+ $category = get_the_category();
83
+
84
+ if(!empty($category)) {
85
+
86
+ // Get last category post is in
87
+ $last_category = array_values($category);
88
+ $last_category = end($last_category);
89
+ $category_name = get_category($last_category);
90
+ // Get parent any categories and create array
91
+ $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, ','),',');
92
+ $cat_parents = explode(',',$get_cat_parents);
93
+
94
+ // Loop through parent categories and store in variable $cat_display
95
+ $cat_display = '';
96
+ foreach($cat_parents as $parents) {
97
+ $cat_id = get_cat_ID( $parents);
98
+ $cat_link = get_category_link($cat_id);
99
+ $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>';
100
+ }
101
+ }
102
+
103
+ // If it's a custom post type within a custom taxonomy
104
+ $taxonomy_exists = taxonomy_exists($custom_taxonomy);
105
+ if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {
106
+
107
+ $taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );
108
+ if ( $taxonomy_terms ) {
109
+ $cat_id = $taxonomy_terms[0]->term_id;
110
+ $cat_nicename = $taxonomy_terms[0]->slug;
111
+ $cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);
112
+ $cat_link = trailingslashit($cat_link);
113
+ $cat_name = $taxonomy_terms[0]->name;
114
+ }
115
+ }
116
+
117
+ // Check if the post is in a category
118
+ if(!empty($last_category)) {
119
+ echo $cat_display;
120
+
121
+ // Else if post is in a custom taxonomy
122
+ } else if(!empty($cat_id)) {
123
+
124
+ 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>';
125
+ }
126
+
127
+ } else if ( is_category() ) {
128
+
129
+ // Category page
130
+ echo '<li class="item-current item-cat"><strong class="bread-current bread-cat">' . single_cat_title('', false) . '</strong></li>';
131
+ } else if ( is_page() ) {
132
+
133
+ // Standard page
134
+ if( $post->post_parent ){
135
+
136
+ // If child page, get parents
137
+ $anc = get_post_ancestors( $post->ID );
138
+
139
+ // Get parents in the right order
140
+ $anc = array_reverse($anc);
141
+
142
+ // Parent page loop
143
+ if ( !isset( $parents ) ) $parents = null;
144
+ foreach ( $anc as $ancestor ) {
145
+ $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>';
146
+ }
147
+
148
+ // Display parent pages
149
+ echo $parents;
150
+
151
+ // Current page
152
+
153
+ }
154
+
155
+ } else if ( is_tag() ) {
156
+
157
+ // Tag page
158
+
159
+ // Get tag information
160
+ $term_id = get_query_var('tag_id');
161
+ $taxonomy = 'post_tag';
162
+ $args = 'include=' . $term_id;
163
+ $terms = get_terms( $taxonomy, $args );
164
+ $get_term_id = $terms[0]->term_id;
165
+ $get_term_slug = $terms[0]->slug;
166
+ $get_term_name = $terms[0]->name;
167
+
168
+ // Display the tag name
169
+ 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>';
170
+ } elseif ( is_day() ) {
171
+
172
+ // Day archive
173
+
174
+ // Year link
175
+ 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>';
176
+
177
+ // Month link
178
+ 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>';
179
+
180
+
181
+ // Day display
182
+ 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>';
183
+
184
+ } else if ( is_month() ) {
185
+
186
+ // Month Archive
187
+
188
+ // Year link
189
+ 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>';
190
+
191
+ // Month display
192
+ 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>';
193
+
194
+ } else if ( is_year() ) {
195
+
196
+ // Display year archive
197
+ 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>';
198
+
199
+ } else if ( get_query_var('paged') ) {
200
+
201
+ // Paginated archives
202
+ 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>';
203
+
204
+ } else if ( is_search() ) {
205
+
206
+ // Search results page
207
+ 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>';
208
+
209
+ } elseif ( is_404() ) {
210
+
211
+ // 404 page
212
+ echo '<li>' . 'Error 404' . '</li>';
213
+ }
214
+ echo '</ul>';
215
+
216
+ }?>
217
+ </div>
218
  <?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,199 @@
1
- <?php
2
- function ampforwp_framework_get_comments(){
3
- global $redux_builder_amp;
4
- /*if ( ! comments_open() ) {
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 ( comments_open() && 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() ) {
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 ( comments_open() && true == $redux_builder_amp['wordpress-comments-support'] ) { ?>
14
+ <div class="amp-comments">
15
+ <?php
16
+ global $redux_builder_amp;
17
+ $max_page = '';
18
+ // Gather comments for a specific page/post
19
+ $postID = get_the_ID();
20
+ $comments = get_comments(array(
21
+ 'post_id' => $postID,
22
+ 'status' => 'approve' //Change this to the type of comments to be displayed
23
+ ));
24
+ if ( $comments ) { ?>
25
+ <div class="amp-comments-wrapper">
26
+ <h3><span><?php global $redux_builder_amp; echo ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'], 'View Comments' )?></span></h3>
27
+ <ul>
28
+ <?php
29
+ // Display the list of comments
30
+ function ampforwp_custom_translated_comment($comment, $args, $depth){
31
+ $GLOBALS['comment'] = $comment;
32
+ global $redux_builder_amp;
33
+ $comment_author_img_url = "";
34
+ $comment_author_img_url = ampforwp_get_comments_gravatar( $comment );
35
+
36
+ ?>
37
+ <li id="li-comment-<?php comment_ID() ?>"
38
+ <?php comment_class(); ?> >
39
+ <article id="comment-<?php comment_ID(); ?>" class="comment-body">
40
+ <footer class="comment-meta">
41
+ <?php if($comment_author_img_url){ ?>
42
+ <amp-img src="<?php echo esc_url($comment_author_img_url); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
43
+ <?php } ?>
44
+ <div class="comment-author vcard">
45
+ <?php
46
+ printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
47
+ </div>
48
+ <div class="comment-metadata">
49
+ <a href="<?php echo htmlspecialchars( trailingslashit( get_comment_link( $comment->comment_ID ) ) ) ?>">
50
+ <?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())?>
51
+ </a>
52
+ <?php edit_comment_link( ampforwp_translation( $redux_builder_amp['amp-translator-Edit-text'], 'Edit' ) ) ?>
53
+ </div>
54
+ </footer>
55
+ <div class="comment-content">
56
+ <?php
57
+ $comment_content = get_comment_text();
58
+ $comment_content = wpautop( $comment_content );
59
+ $sanitizer = new AMPFORWP_Content( $comment_content, array(), apply_filters( 'ampforwp_content_sanitizers', array(
60
+ 'AMP_Img_Sanitizer' => array(),
61
+ 'AMP_Video_Sanitizer' => array(),
62
+ 'AMP_Style_Sanitizer' => array() ) ) );
63
+ $sanitized_comment_content = $sanitizer->get_amp_content();
64
+ echo make_clickable( $sanitized_comment_content ); ?>
65
+ </div>
66
+ <?php do_action('ampforwp_reply_comment_form', $comment, $args, $depth); ?>
67
+ </article>
68
+ </li>
69
+ <?php }
70
+ wp_list_comments( array(
71
+ //Allow comment pagination
72
+ 'per_page' => AMPFORWP_COMMENTS_PER_PAGE ,
73
+ 'style' => 'li',
74
+ 'type' => 'comment',
75
+ 'max_depth' => 5,
76
+ 'avatar_size' => 0,
77
+ 'callback' => 'ampforwp_custom_translated_comment',
78
+ 'reverse_top_level' => true //Show the latest comments at the top of the list
79
+ ), $comments); ?>
80
+ </ul>
81
+ <?php
82
+ $max_page = get_comment_pages_count($comments, AMPFORWP_COMMENTS_PER_PAGE);
83
+ $args = array(
84
+ 'base' => add_query_arg( array('cpage' => '%#%', 'amp' => '1'), get_permalink() ),
85
+ 'format' => '',
86
+ 'total' => $max_page,
87
+ //'current' => 0,
88
+ 'echo' => false,
89
+ 'add_fragment' => '#comments',
90
+ 'show_all' => true
91
+ );
92
+ if ( paginate_comments_links($args) ) { ?>
93
+ <div class="cmts-wrap">
94
+ <?php echo paginate_comments_links( $args ); ?>
95
+ </div>
96
+ <?php } ?>
97
+ </div>
98
+ <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
99
+ if( ! is_plugin_active( 'amp-comments/amp-comments.php' ) ) { ?>
100
+ <div class="amp-comment-button">
101
+ <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>
102
+ </div>
103
+ <?php } ?>
104
+ <?php
105
+ } else {
106
+ global $redux_builder_amp ;
107
+ if (!comments_open()) {
108
+ return;
109
+ } ?>
110
+ <?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
111
+ if( ! is_plugin_active( 'amp-comments/amp-comments.php' ) ) { ?>
112
+ <div class="amp-comment-button">
113
+ <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>
114
+ </div>
115
+ <?php } ?>
116
+ <?php } ?>
117
+ </div>
118
+ <?php do_action('ampforwp_after_comment_hook');
119
+
120
+ }
121
+
122
+ }
123
+
124
+ //Facebook Comments
125
+ function ampforwp_framework_get_facebook_comments(){
126
+ global $redux_builder_amp;
127
+ $facebook_comments_markup = '';
128
+ if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
129
+ if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) {
130
+ $facebook_comments_markup = '<div class="fb-comments" data-href="' . get_permalink() . '" data-width="800px" data-numposts="'.$redux_builder_amp['ampforwp-number-of-fb-no-of-comments'].'"></div>';
131
+ }
132
+ else {
133
+ $facebook_comments_markup = '<section class="amp-facebook-comments">';
134
+ $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
135
+ layout="responsive" data-numposts=';
136
+ $facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '" ';
137
+
138
+ $facebook_comments_markup .= 'data-href=" ' . get_permalink() . ' "';
139
+ $facebook_comments_markup .= '></amp-facebook-comments></section>';
140
+ }
141
+ return $facebook_comments_markup;
142
+ }
143
+ }
144
+
145
+ //Disqus Comments
146
+ function ampforwp_framework_get_disqus_comments(){
147
+ global $redux_builder_amp;
148
+ $width = $height = 420;
149
+
150
+ if ( isset($redux_builder_amp['ampforwp-disqus-height']) && $redux_builder_amp['ampforwp-disqus-height'] ) {
151
+ $height = $redux_builder_amp['ampforwp-disqus-height'];
152
+ }
153
+
154
+ if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
155
+ global $post; $post_slug=$post->post_name;
156
+
157
+ $disqus_script_host_url = "https://ampforwp.appspot.com/?api=". AMPFORWP_DISQUS_URL;
158
+
159
+ if( $redux_builder_amp['ampforwp-disqus-host-position'] == 0 ) {
160
+ $disqus_script_host_url = esc_url( $redux_builder_amp['ampforwp-disqus-host-file'] );
161
+ }
162
+
163
+ $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" ;
164
+ ?>
165
+ <section class="amp-disqus-comments">
166
+ <amp-iframe
167
+ height=<?php echo $height ?>
168
+ width=<?php echo $width ?>
169
+ layout="responsive"
170
+ sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
171
+ frameborder="0"
172
+ src="<?php echo $disqus_url ?>" >
173
+ <div overflow tabindex="0" role="button" aria-label="Read more"><?php echo __('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
174
+ </amp-iframe>
175
+ </section>
176
+ <?php
177
+ }
178
+ }
179
+
180
+ // Comments Scripts
181
+ add_filter( 'amp_post_template_data', 'ampforwp_framework_comments_scripts' );
182
+ function ampforwp_framework_comments_scripts( $data ) {
183
+
184
+ $facebook_comments_check = ampforwp_framework_get_facebook_comments();
185
+ global $redux_builder_amp;
186
+ if ( $facebook_comments_check && $redux_builder_amp['ampforwp-facebook-comments-support'] && is_singular() && !is_front_page()) {
187
+ if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
188
+ $data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
189
+ }
190
+ }
191
+ if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && is_singular() && comments_open() ) {
192
+ if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
193
+ if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
194
+ $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
195
+ }
196
+ }
197
+ }
198
+ return $data;
199
  }
components/components-core.php CHANGED
@@ -1,512 +1,518 @@
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
- elseif ( ampforwp_polylang_front_page() ) {
103
- $ID = pll_get_post(get_option('page_on_front'));
104
- }
105
- else
106
- $ID = $post->ID;
107
- if( $ID!=null ){
108
- do_action('ampforwp_above_the_title'); ?>
109
- <h1 class="amp-post-title"> <?php
110
- $ampforwp_title = get_the_title($ID);
111
- $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
112
- echo wp_kses_data( $ampforwp_title ); ?>
113
- </h1>
114
- <?php do_action('ampforwp_below_the_title'); ?>
115
- <?php
116
- }
117
- }
118
-
119
- // Excerpt
120
- function amp_excerpt( $no_of_words=15 ) {
121
- global $redux_builder_amp, $post;
122
- $post_id = '';
123
- if ( ampforwp_is_front_page() ) {
124
- $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
125
- }
126
- else
127
- $post_id = $post->ID;
128
- if ( $post_id != null && true == $redux_builder_amp['enable-excerpt-single'] ) { ?>
129
- <p><?php
130
- if ( has_excerpt() ) {
131
- $content = get_the_excerpt();
132
- } else {
133
- $content = get_the_content();
134
- }
135
- echo wp_trim_words( strip_shortcodes( $content ) , $no_of_words );
136
- ?></p>
137
- <?php
138
- }
139
- }
140
-
141
-
142
- //Menus
143
- function amp_menu(){
144
- global $loadComponent;
145
- if(isset($loadComponent['AMP-menu']) && $loadComponent['AMP-menu']==true){
146
- amp_menu_html();
147
- }
148
- }
149
-
150
- // Social Icons component
151
- function amp_social( $social_icons="" ) {
152
- global $loadComponent;
153
- $amp_social = array();
154
- //Supported social icons
155
- $amp_social = array( 'twitter', 'facebook', 'pinterest', 'google-plus', 'linkedin', 'youtube', 'instagram', 'reddit', 'VKontakte', 'Odnoklassniki', 'snapchat', 'tumblr' );
156
- if ( isset($loadComponent['AMP-social-icons']) && true == $loadComponent['AMP-social-icons'] ) {
157
- if ( null != $social_icons ) {
158
- ampforwp_framework_get_social_icons($social_icons);
159
- }
160
- else
161
- ampforwp_framework_get_social_icons($amp_social);
162
- }
163
- }
164
-
165
- //Sidebar
166
- function amp_sidebar($tag='start',$data=array()){
167
- global $loadComponent;
168
- if(isset($loadComponent['AMP-sidebar']) && $loadComponent['AMP-sidebar']==true){
169
- ampforwp_framework_get_sideabr($tag,$data);
170
- }
171
- }
172
-
173
- //Featured Image
174
- function amp_featured_image( ){
175
- global $loadComponent;
176
- if(isset($loadComponent['AMP-featured-image']) && $loadComponent['AMP-featured-image']==true){
177
- ampforwp_framework_get_featured_image( );
178
- }
179
- }
180
-
181
- // Author Box
182
- function amp_author_box($args=array() ){
183
- global $loadComponent;
184
- if(isset($loadComponent['AMP-author-box']) && $loadComponent['AMP-author-box']==true){
185
- ampforwp_framework_get_author_box($args);
186
- }
187
- }
188
-
189
- // Categories List
190
- function amp_categories_list( ){
191
- global $loadComponent;
192
- if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
193
- ampforwp_framework_get_categories_list( );
194
- }
195
- }
196
- // Tags List
197
- function amp_tags_list( ){
198
- global $loadComponent;
199
- if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
200
- ampforwp_framework_get_tags_list( );
201
- }
202
- }
203
-
204
- // Comments
205
- function amp_comments( ){
206
- global $loadComponent;
207
- if(isset($loadComponent['AMP-comments']) && $loadComponent['AMP-comments']==true){
208
- ampforwp_framework_get_comments( );
209
- }
210
- }
211
-
212
- // Post Navigation
213
- function amp_post_navigation( ){
214
- global $loadComponent;
215
- if(isset($loadComponent['AMP-post-navigation']) && $loadComponent['AMP-post-navigation']==true){
216
- echo ampforwp_framework_get_post_navigation( );
217
- }
218
- }
219
-
220
- // Related Posts
221
- function amp_related_posts($argsdata = array()){
222
- global $loadComponent;
223
- if(isset($loadComponent['AMP-related-posts']) && $loadComponent['AMP-related-posts']==true){
224
- echo ampforwp_framework_get_related_posts( $argsdata);
225
- }
226
- }
227
-
228
- // Post Pagination
229
- function amp_post_pagination($args='' ){
230
- global $loadComponent;
231
- if(isset($loadComponent['AMP-post-pagination']) && $loadComponent['AMP-post-pagination']==true){
232
- ampforwp_framework_get_post_pagination($args);
233
- }
234
- }
235
-
236
- // Call Now
237
- function amp_call_now(){
238
- global $loadComponent;
239
- if(isset($loadComponent['AMP-call-now']) && $loadComponent['AMP-call-now']==true){
240
- amp_call_button_html_output();
241
- }
242
- }
243
-
244
- // Breadcrumb
245
- function amp_breadcrumb(){
246
- global $loadComponent;
247
- if ( isset($loadComponent['AMP-breadcrumb']) && true == $loadComponent['AMP-breadcrumb'] ) {
248
- echo amp_breadcrumb_output();
249
- }
250
- }
251
-
252
- //Get Core of AMP HTML
253
- function amp_header_core(){
254
- $post_id = get_queried_object_id();
255
- if ( ampforwp_polylang_front_page() ) {
256
- $post_id = pll_get_post(get_option('page_on_front'));
257
- }
258
- $thisTemplate = new AMP_Post_Template($post_id);
259
- global $redux_builder_amp;
260
- $html_tag_attributes = AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) );
261
-
262
- $bodyClass = '';
263
- if ( is_single() || is_page() ) {
264
- $bodyClass = 'single-post';
265
- $bodyClass .= ( is_page()? ' amp-single-page ' : ' amp-single ');
266
-
267
- }
268
- // Archive
269
- if ( is_archive() ) {
270
- $bodyClass = 'amp-archive';
271
- }
272
- $ampforwp_custom_post_page = ampforwp_custom_post_page();
273
- // Homepage
274
- if ( is_home() ) {
275
-
276
- $bodyClass = 'amp-index amp-home'.esc_attr( $thisTemplate->get( 'body_class' ) );
277
- if ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
278
- $bodyClass = 'single-post design_3_wrapper';
279
- }
280
- if ( $ampforwp_custom_post_page == "page" && ampforwp_name_blog_page() ) {
281
- $current_url = home_url( $GLOBALS['wp']->request );
282
- $current_url_in_pieces = explode( '/', $current_url );
283
-
284
- if( in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) {
285
- $bodyClass = 'amp-index' .esc_attr( $thisTemplate->get( 'body_class' ) );
286
- }
287
- }
288
-
289
- }
290
- // is_search
291
- if ( is_search() ) {
292
- $bodyClass = 'amp_home_body archives_body design_3_wrapper';
293
- }
294
- if( true == $redux_builder_amp['amp-rtl-select-option'] ){
295
- $bodyClass .= ' rtl ';
296
- }
297
- ?><!doctype html>
298
- <html <?php echo ampforwp_amp_nonamp_convert('amp '); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
299
- <head>
300
- <meta charset="utf-8">
301
-
302
- <link rel="dns-prefetch" href="https://cdn.ampproject.org">
303
- <?php do_action( 'amp_meta', $thisTemplate ); ?>
304
- <?php
305
- if(ampforwp_amp_nonamp_convert("", "check")){
306
- echo '<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">';
307
- wp_head();
308
-
309
- }else{
310
- do_action( 'amp_post_template_head', $thisTemplate );
311
- } ?>
312
- <style amp-custom>
313
- <?php $thisTemplate->load_parts( array( 'style' ) ); ?>
314
- <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
315
- <?php do_action( 'amp_css', $thisTemplate ); ?>
316
- <?php echo $redux_builder_amp['css_editor']; ?>
317
- </style>
318
-
319
- </head>
320
- <body <?php ampforwp_body_class($bodyClass); ?>>
321
- <?php do_action('amp_start', $thisTemplate); ?>
322
- <?php do_action('ampforwp_body_beginning', $thisTemplate);
323
- }
324
-
325
- function amp_header(){
326
- $post_id = get_queried_object_id();
327
- if ( ampforwp_polylang_front_page() ) {
328
- $post_id = pll_get_post(get_option('page_on_front'));
329
- }
330
- $thisTemplate = new AMP_Post_Template($post_id);
331
- $thisTemplate->load_parts( array( 'header' ) );
332
- do_action( 'amp_after_header', $thisTemplate );
333
- do_action( 'ampforwp_after_header', $thisTemplate );
334
- do_action('ampforwp_post_before_design_elements') ?>
335
- <?php }
336
-
337
- function amp_footer(){
338
- $post_id = get_queried_object_id();
339
- if ( ampforwp_polylang_front_page() ) {
340
- $post_id = pll_get_post(get_option('page_on_front'));
341
- }
342
- $thisTemplate = new AMP_Post_Template($post_id);
343
- do_action( 'amp_before_footer', $thisTemplate );
344
- do_action( 'amp_post_template_above_footer', $thisTemplate );
345
-
346
- $thisTemplate->load_parts( array( 'footer' ) );
347
-
348
- }
349
-
350
- function amp_footer_core(){
351
- $post_id = get_queried_object_id();
352
- if ( ampforwp_polylang_front_page() ) {
353
- $post_id = pll_get_post(get_option('page_on_front'));
354
- }
355
- $thisTemplate = new AMP_Post_Template($post_id);
356
- if(ampforwp_amp_nonamp_convert("", "check")){
357
- wp_footer();
358
- }
359
- else {
360
- do_action( 'amp_post_template_footer', $thisTemplate );
361
- do_action('ampforwp_global_after_footer');
362
- do_action('amp_end',$thisTemplate);
363
- }
364
- // Close the body and Html tags ?>
365
- </body>
366
- </html><?php
367
- }
368
-
369
- function amp_non_amp_link(){
370
- global $allowed_html;
371
- global $redux_builder_amp;
372
- echo wp_kses($redux_builder_amp['amp-translator-footer-text'],$allowed_html) ;
373
- if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') { ampforwp_view_nonamp(); }
374
- }
375
-
376
- // Back to Top
377
- function amp_back_to_top_link(){
378
- global $redux_builder_amp;
379
- if( '1' == $redux_builder_amp['ampforwp-footer-top'] ) { ?>
380
- <a href="#top"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-top-text'], 'Top'); ?> </a>
381
- <?php }
382
- }
383
-
384
- function amp_loop_template(){
385
- $post_id = get_queried_object_id();
386
- $thisTemplate = new AMP_Post_Template($post_id);
387
- do_action('amp_before_loop',$thisTemplate);
388
- $thisTemplate->load_parts( array( 'loop' ) );
389
- do_action('amp_after_loop',$thisTemplate);
390
- }
391
-
392
- // The Content
393
- function amp_content(){
394
- global $redux_builder_amp, $post;
395
- $post_id = get_queried_object_id();
396
- if ( ampforwp_is_front_page() ) {
397
- $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
398
- }
399
- elseif ( ampforwp_polylang_front_page() ) {
400
- $post_id = pll_get_post(get_option('page_on_front'));
401
- }
402
- $thisTemplate = new AMP_Post_Template($post_id); ?>
403
- <?php do_action('ampforwp_before_post_content',$thisTemplate);
404
- $amp_custom_content_enable = get_post_meta( $thisTemplate->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
405
- // Normal Content
406
- if ( ! $amp_custom_content_enable ) {
407
- $ampforwp_the_content = $thisTemplate->get( 'post_amp_content' ); // amphtml content; no kses
408
- } else {
409
- // Custom/Alternative AMP content added through post meta
410
- $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
411
- }
412
- $ampforwp_the_content = apply_filters('ampforwp_modify_the_content',$ampforwp_the_content);
413
- echo $ampforwp_the_content;
414
- do_action('ampforwp_after_post_content',$thisTemplate); ?>
415
- <?php }
416
-
417
- function amp_date( $args=array() ) {
418
-
419
- global $redux_builder_amp;
420
- if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
421
- $args['format'] = 'traditional';
422
- }
423
- if ( (isset($args['format']) && $args['format'] == 'traditional') || 'time' == $args ) {
424
- $post_date = esc_html( get_the_date() ) . ' '.esc_html( get_the_time());
425
- } else {
426
- $post_date = human_time_diff(
427
- get_the_time('U', get_the_ID() ),
428
- current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
429
- 'ago');
430
- }
431
- $post_date = apply_filters('ampforwp_modify_post_date', $post_date);
432
- if(isset($args['custom_format']) && $args['custom_format']!=""){
433
- $post_date = date($args['custom_format'],get_the_time('U', get_the_ID() ));
434
- }
435
- if ( 'date' == $args || 'time' == $args ) {
436
- echo $post_date .' ';
437
- }
438
- else
439
- echo '<div class="loop-date">'.$post_date.'</div>';
440
- }
441
-
442
- //Load font Compoment
443
- $fontComponent = array();
444
- function amp_post_load_custom_fonts(){
445
- global $fontComponent;
446
- if(count($fontComponent)){
447
- $fontComponent = array_unique($fontComponent);
448
- foreach ($fontComponent as $key => $value) {
449
- ?>
450
- <link rel="stylesheet" href="<?php echo esc_url( $value ); ?>">
451
- <?php
452
- }
453
- }
454
-
455
- }
456
- add_action( 'amp_meta', 'amp_post_load_custom_fonts');
457
- function amp_font($fontName){
458
- global $fontComponent;
459
- $fontComponent[] = $fontName;
460
- }
461
-
462
- // RTL Styling
463
- add_action('amp_css', 'amp_theme_framework_rtl_styles');
464
- if( ! function_exists('amp_theme_framework_rtl_styles') ){
465
- function amp_theme_framework_rtl_styles(){
466
- global $redux_builder_amp;
467
- if( true === $redux_builder_amp['amp-rtl-select-option'] ){ ?>
468
- body.rtl {direction: rtl;}
469
- body amp-carousel{ direction: ltr;}
470
- <?php }
471
- }
472
- }
473
-
474
- // Author Meta
475
- function amp_author_meta( $args ) {
476
- global $post;
477
- $author_name = false;
478
- $avatar = false;
479
- $avatar_size = 40;
480
- if ( isset($args['name']) ) {
481
- $author_name = $args['name'];
482
- }
483
- if ( 'name' === $args ) {
484
- $author_name = true;
485
- }
486
- if ( 'avatar' === $args || 'image' === $args ) {
487
- $avatar = true;
488
- }
489
- if ( isset($args['image']) ) {
490
- $avatar = $args['image'];
491
- }
492
- if ( isset($args['image_size']) ) {
493
- $avatar_size = $args['image_size'];
494
- }
495
- $post_author = get_userdata($post->post_author);
496
- $author_link = get_author_posts_url($post_author->ID);
497
- if ( $author_name ) {
498
- echo ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $post_author->display_name ).'</a>';
499
- }
500
- if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
501
- $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
502
- ?>
503
- <amp-img src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
504
- <?php }
505
- elseif ( $avatar && false == ampforwp_gravatar_checker($post_author->user_email ) ) {
506
- $avatar_img = get_avatar( $post_author->user_email, $avatar_size );
507
- $amp_html_sanitizer = new AMPFORWP_Content( $avatar_img, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array() ) ) );
508
- $amp_html = $amp_html_sanitizer->get_amp_content();
509
- echo $amp_html;
510
- }
511
-
 
 
 
 
 
 
512
  }
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
+ elseif ( ampforwp_polylang_front_page() ) {
103
+ $ID = pll_get_post(get_option('page_on_front'));
104
+ }
105
+ else
106
+ $ID = $post->ID;
107
+ if( $ID!=null ){
108
+ do_action('ampforwp_above_the_title'); ?>
109
+ <h1 class="amp-post-title"> <?php
110
+ $ampforwp_title = get_the_title($ID);
111
+ $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
112
+ echo wp_kses_data( $ampforwp_title ); ?>
113
+ </h1>
114
+ <?php do_action('ampforwp_below_the_title'); ?>
115
+ <?php
116
+ }
117
+ }
118
+
119
+ // Excerpt
120
+ function amp_excerpt( $no_of_words=15 ) {
121
+ global $redux_builder_amp, $post;
122
+ $post_id = '';
123
+ if ( ampforwp_is_front_page() ) {
124
+ $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
125
+ }
126
+ else
127
+ $post_id = $post->ID;
128
+ if ( $post_id != null && true == $redux_builder_amp['enable-excerpt-single'] ) { ?>
129
+ <p><?php
130
+ if ( has_excerpt() ) {
131
+ $content = get_the_excerpt();
132
+ } else {
133
+ $content = get_the_content();
134
+ }
135
+ echo wp_trim_words( strip_shortcodes( $content ) , $no_of_words );
136
+ ?></p>
137
+ <?php
138
+ }
139
+ }
140
+
141
+
142
+ //Menus
143
+ function amp_menu(){
144
+ global $loadComponent;
145
+ if(isset($loadComponent['AMP-menu']) && $loadComponent['AMP-menu']==true){
146
+ amp_menu_html();
147
+ }
148
+ }
149
+
150
+ // Social Icons component
151
+ function amp_social( $social_icons="" ) {
152
+ global $loadComponent;
153
+ $amp_social = array();
154
+ //Supported social icons
155
+ $amp_social = array( 'twitter', 'facebook', 'pinterest', 'google-plus', 'linkedin', 'youtube', 'instagram', 'reddit', 'VKontakte', 'Odnoklassniki', 'snapchat', 'tumblr' );
156
+ if ( isset($loadComponent['AMP-social-icons']) && true == $loadComponent['AMP-social-icons'] ) {
157
+ if ( null != $social_icons ) {
158
+ ampforwp_framework_get_social_icons($social_icons);
159
+ }
160
+ else
161
+ ampforwp_framework_get_social_icons($amp_social);
162
+ }
163
+ }
164
+
165
+ //Sidebar
166
+ function amp_sidebar($tag='start',$data=array()){
167
+ global $loadComponent;
168
+ if(isset($loadComponent['AMP-sidebar']) && $loadComponent['AMP-sidebar']==true){
169
+ ampforwp_framework_get_sideabr($tag,$data);
170
+ }
171
+ }
172
+
173
+ //Featured Image
174
+ function amp_featured_image( ){
175
+ global $loadComponent;
176
+ if(isset($loadComponent['AMP-featured-image']) && $loadComponent['AMP-featured-image']==true){
177
+ ampforwp_framework_get_featured_image( );
178
+ }
179
+ }
180
+
181
+ // Author Box
182
+ function amp_author_box($args=array() ){
183
+ global $loadComponent;
184
+ if(isset($loadComponent['AMP-author-box']) && $loadComponent['AMP-author-box']==true){
185
+ ampforwp_framework_get_author_box($args);
186
+ }
187
+ }
188
+
189
+ // Categories List
190
+ function amp_categories_list( ){
191
+ global $loadComponent;
192
+ if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
193
+ ampforwp_framework_get_categories_list( );
194
+ }
195
+ }
196
+ // Tags List
197
+ function amp_tags_list( ){
198
+ global $loadComponent;
199
+ if(isset($loadComponent['AMP-categories-tags']) && $loadComponent['AMP-categories-tags']==true){
200
+ ampforwp_framework_get_tags_list( );
201
+ }
202
+ }
203
+
204
+ // Comments
205
+ function amp_comments( ){
206
+ global $loadComponent;
207
+ if(isset($loadComponent['AMP-comments']) && $loadComponent['AMP-comments']==true){
208
+ ampforwp_framework_get_comments( );
209
+ }
210
+ }
211
+
212
+ // Post Navigation
213
+ function amp_post_navigation( ){
214
+ global $loadComponent;
215
+ if(isset($loadComponent['AMP-post-navigation']) && $loadComponent['AMP-post-navigation']==true){
216
+ echo ampforwp_framework_get_post_navigation( );
217
+ }
218
+ }
219
+
220
+ // Related Posts
221
+ function amp_related_posts($argsdata = array()){
222
+ global $loadComponent;
223
+ if(isset($loadComponent['AMP-related-posts']) && $loadComponent['AMP-related-posts']==true){
224
+ echo ampforwp_framework_get_related_posts( $argsdata);
225
+ }
226
+ }
227
+
228
+ // Post Pagination
229
+ function amp_post_pagination($args='' ){
230
+ global $loadComponent;
231
+ if(isset($loadComponent['AMP-post-pagination']) && $loadComponent['AMP-post-pagination']==true){
232
+ ampforwp_framework_get_post_pagination($args);
233
+ }
234
+ }
235
+
236
+ // Call Now
237
+ function amp_call_now(){
238
+ global $loadComponent;
239
+ if(isset($loadComponent['AMP-call-now']) && $loadComponent['AMP-call-now']==true){
240
+ amp_call_button_html_output();
241
+ }
242
+ }
243
+
244
+ // Breadcrumb
245
+ function amp_breadcrumb(){
246
+ global $loadComponent;
247
+ if ( isset($loadComponent['AMP-breadcrumb']) && true == $loadComponent['AMP-breadcrumb'] ) {
248
+ echo amp_breadcrumb_output();
249
+ }
250
+ }
251
+
252
+ //Get Core of AMP HTML
253
+ function amp_header_core(){
254
+ $post_id = get_queried_object_id();
255
+ if ( ampforwp_polylang_front_page() ) {
256
+ $post_id = pll_get_post(get_option('page_on_front'));
257
+ }
258
+ $thisTemplate = new AMP_Post_Template($post_id);
259
+ global $redux_builder_amp;
260
+ $html_tag_attributes = AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) );
261
+
262
+ $bodyClass = '';
263
+ if ( is_single() || is_page() ) {
264
+ $bodyClass = 'single-post';
265
+ $bodyClass .= ( is_page()? ' amp-single-page ' : ' amp-single ');
266
+
267
+ }
268
+ // Archive
269
+ if ( is_archive() ) {
270
+ $bodyClass = 'amp-archive';
271
+ }
272
+ $ampforwp_custom_post_page = ampforwp_custom_post_page();
273
+ // Homepage
274
+ if ( is_home() ) {
275
+
276
+ $bodyClass = 'amp-index amp-home'.esc_attr( $thisTemplate->get( 'body_class' ) );
277
+ if ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
278
+ $bodyClass = 'single-post design_3_wrapper';
279
+ }
280
+ if ( $ampforwp_custom_post_page == "page" && ampforwp_name_blog_page() ) {
281
+ $current_url = home_url( $GLOBALS['wp']->request );
282
+ $current_url_in_pieces = explode( '/', $current_url );
283
+
284
+ if( in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) {
285
+ $bodyClass = 'amp-index' .esc_attr( $thisTemplate->get( 'body_class' ) );
286
+ }
287
+ }
288
+
289
+ }
290
+ // is_search
291
+ if ( is_search() ) {
292
+ $bodyClass = 'amp_home_body archives_body design_3_wrapper';
293
+ }
294
+ if( true == $redux_builder_amp['amp-rtl-select-option'] ){
295
+ $bodyClass .= ' rtl ';
296
+ }
297
+ ?><!doctype html>
298
+ <html <?php echo ampforwp_amp_nonamp_convert('amp '); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
299
+ <head>
300
+ <meta charset="utf-8">
301
+
302
+ <link rel="dns-prefetch" href="https://cdn.ampproject.org">
303
+ <?php do_action( 'amp_meta', $thisTemplate ); ?>
304
+ <?php
305
+ if(ampforwp_amp_nonamp_convert("", "check")){
306
+ echo '<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">';
307
+ wp_head();
308
+
309
+ }else{
310
+ do_action( 'amp_post_template_head', $thisTemplate );
311
+ } ?>
312
+ <style amp-custom>
313
+ <?php $thisTemplate->load_parts( array( 'style' ) ); ?>
314
+ <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
315
+ <?php do_action( 'amp_css', $thisTemplate ); ?>
316
+ <?php echo $redux_builder_amp['css_editor']; ?>
317
+ </style>
318
+
319
+ </head>
320
+ <body <?php ampforwp_body_class($bodyClass); ?>>
321
+ <?php do_action('amp_start', $thisTemplate); ?>
322
+ <?php do_action('ampforwp_body_beginning', $thisTemplate);
323
+ }
324
+
325
+ function amp_header(){
326
+ $post_id = get_queried_object_id();
327
+ if ( ampforwp_polylang_front_page() ) {
328
+ $post_id = pll_get_post(get_option('page_on_front'));
329
+ }
330
+ $thisTemplate = new AMP_Post_Template($post_id);
331
+ $thisTemplate->load_parts( array( 'header' ) );
332
+ do_action( 'amp_after_header', $thisTemplate );
333
+ do_action( 'ampforwp_after_header', $thisTemplate );
334
+ do_action('ampforwp_post_before_design_elements') ?>
335
+ <?php }
336
+
337
+ function amp_footer(){
338
+ $post_id = get_queried_object_id();
339
+ if ( ampforwp_polylang_front_page() ) {
340
+ $post_id = pll_get_post(get_option('page_on_front'));
341
+ }
342
+ $thisTemplate = new AMP_Post_Template($post_id);
343
+ do_action( 'amp_before_footer', $thisTemplate );
344
+ do_action( 'amp_post_template_above_footer', $thisTemplate );
345
+
346
+ $thisTemplate->load_parts( array( 'footer' ) );
347
+
348
+ }
349
+
350
+ function amp_footer_core(){
351
+ $post_id = get_queried_object_id();
352
+ if ( ampforwp_polylang_front_page() ) {
353
+ $post_id = pll_get_post(get_option('page_on_front'));
354
+ }
355
+ $thisTemplate = new AMP_Post_Template($post_id);
356
+ if(ampforwp_amp_nonamp_convert("", "check")){
357
+ wp_footer();
358
+ }
359
+ else {
360
+ do_action( 'amp_post_template_footer', $thisTemplate );
361
+ do_action('ampforwp_global_after_footer');
362
+ do_action('amp_end',$thisTemplate);
363
+ }
364
+ // Close the body and Html tags ?>
365
+ </body>
366
+ </html><?php
367
+ }
368
+
369
+ function amp_non_amp_link(){
370
+ global $allowed_html;
371
+ global $redux_builder_amp;
372
+ echo wp_kses($redux_builder_amp['amp-translator-footer-text'],$allowed_html) ;
373
+ if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') { ampforwp_view_nonamp(); }
374
+ }
375
+
376
+ // Back to Top
377
+ function amp_back_to_top_link(){
378
+ global $redux_builder_amp;
379
+ if( '1' == $redux_builder_amp['ampforwp-footer-top'] ) { ?>
380
+ <a href="#top"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-top-text'], 'Top'); ?> </a>
381
+ <?php }
382
+ }
383
+
384
+ function amp_loop_template(){
385
+ $post_id = get_queried_object_id();
386
+ $thisTemplate = new AMP_Post_Template($post_id);
387
+ do_action('amp_before_loop',$thisTemplate);
388
+ $thisTemplate->load_parts( array( 'loop' ) );
389
+ do_action('amp_after_loop',$thisTemplate);
390
+ }
391
+
392
+ // The Content
393
+ function amp_content($post_id= ''){
394
+ global $redux_builder_amp, $post;
395
+
396
+
397
+ if ( empty( $post_id )) {
398
+
399
+ $post_id = get_queried_object_id();
400
+ if ( ampforwp_is_front_page() ) {
401
+ $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
402
+ }
403
+ elseif ( ampforwp_polylang_front_page() ) {
404
+ $post_id = pll_get_post(get_option('page_on_front'));
405
+ }
406
+ }
407
+
408
+ $thisTemplate = new AMP_Post_Template($post_id); ?>
409
+ <?php do_action('ampforwp_before_post_content',$thisTemplate);
410
+ $amp_custom_content_enable = get_post_meta( $thisTemplate->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
411
+ // Normal Content
412
+ if ( ! $amp_custom_content_enable ) {
413
+ $ampforwp_the_content = $thisTemplate->get( 'post_amp_content' ); // amphtml content; no kses
414
+ } else {
415
+ // Custom/Alternative AMP content added through post meta
416
+ $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
417
+ }
418
+ $ampforwp_the_content = apply_filters('ampforwp_modify_the_content',$ampforwp_the_content);
419
+ echo $ampforwp_the_content;
420
+ do_action('ampforwp_after_post_content',$thisTemplate); ?>
421
+ <?php }
422
+
423
+ function amp_date( $args=array() ) {
424
+
425
+ global $redux_builder_amp;
426
+ if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
427
+ $args['format'] = 'traditional';
428
+ }
429
+ if ( (isset($args['format']) && $args['format'] == 'traditional') || 'time' == $args ) {
430
+ $post_date = esc_html( get_the_date() ) . ' '.esc_html( get_the_time());
431
+ } else {
432
+ $post_date = human_time_diff(
433
+ get_the_time('U', get_the_ID() ),
434
+ current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
435
+ 'ago');
436
+ }
437
+ $post_date = apply_filters('ampforwp_modify_post_date', $post_date);
438
+ if(isset($args['custom_format']) && $args['custom_format']!=""){
439
+ $post_date = date($args['custom_format'],get_the_time('U', get_the_ID() ));
440
+ }
441
+ if ( 'date' == $args || 'time' == $args ) {
442
+ echo $post_date .' ';
443
+ }
444
+ else
445
+ echo '<div class="loop-date">'.$post_date.'</div>';
446
+ }
447
+
448
+ //Load font Compoment
449
+ $fontComponent = array();
450
+ function amp_post_load_custom_fonts(){
451
+ global $fontComponent;
452
+ if(count($fontComponent)){
453
+ $fontComponent = array_unique($fontComponent);
454
+ foreach ($fontComponent as $key => $value) {
455
+ ?>
456
+ <link rel="stylesheet" href="<?php echo esc_url( $value ); ?>">
457
+ <?php
458
+ }
459
+ }
460
+
461
+ }
462
+ add_action( 'amp_meta', 'amp_post_load_custom_fonts');
463
+ function amp_font($fontName){
464
+ global $fontComponent;
465
+ $fontComponent[] = $fontName;
466
+ }
467
+
468
+ // RTL Styling
469
+ add_action('amp_css', 'amp_theme_framework_rtl_styles');
470
+ if( ! function_exists('amp_theme_framework_rtl_styles') ){
471
+ function amp_theme_framework_rtl_styles(){
472
+ global $redux_builder_amp;
473
+ if( true === $redux_builder_amp['amp-rtl-select-option'] ){ ?>
474
+ body.rtl {direction: rtl;}
475
+ body amp-carousel{ direction: ltr;}
476
+ <?php }
477
+ }
478
+ }
479
+
480
+ // Author Meta
481
+ function amp_author_meta( $args ) {
482
+ global $post;
483
+ $author_name = false;
484
+ $avatar = false;
485
+ $avatar_size = 40;
486
+ if ( isset($args['name']) ) {
487
+ $author_name = $args['name'];
488
+ }
489
+ if ( 'name' === $args ) {
490
+ $author_name = true;
491
+ }
492
+ if ( 'avatar' === $args || 'image' === $args ) {
493
+ $avatar = true;
494
+ }
495
+ if ( isset($args['image']) ) {
496
+ $avatar = $args['image'];
497
+ }
498
+ if ( isset($args['image_size']) ) {
499
+ $avatar_size = $args['image_size'];
500
+ }
501
+ $post_author = get_userdata($post->post_author);
502
+ $author_link = get_author_posts_url($post_author->ID);
503
+ if ( $author_name ) {
504
+ echo ' <a href="'. esc_url(ampforwp_url_controller($author_link)).'"> ' .esc_html( $post_author->display_name ).'</a>';
505
+ }
506
+ if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
507
+ $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
508
+ ?>
509
+ <amp-img src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
510
+ <?php }
511
+ elseif ( $avatar && false == ampforwp_gravatar_checker($post_author->user_email ) ) {
512
+ $avatar_img = get_avatar( $post_author->user_email, $avatar_size );
513
+ $amp_html_sanitizer = new AMPFORWP_Content( $avatar_img, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array() ) ) );
514
+ $amp_html = $amp_html_sanitizer->get_amp_content();
515
+ echo $amp_html;
516
+ }
517
+
518
  }
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 = (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
- }
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,349 +1,352 @@
1
- <?php
2
- function amp_archive_title(){
3
- global $redux_builder_amp;
4
- if( is_author() ){
5
- $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
6
- if( true == ampforwp_gravatar_checker($curauth->user_email) ){
7
- $curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
8
- if($curauth_url){ ?>
9
- <div class="amp-wp-content author-img">
10
- <amp-img src="<?php echo esc_url($curauth_url); ?>" width="90" height="90" layout="responsive"></amp-img>
11
- </div>
12
- <?php }
13
- }
14
- }
15
- if ( is_archive() ) {
16
- 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 = ampforwp_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
- if ( $thumb_url ) {
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
-
331
- // Category
332
- function amp_loop_category(){
333
- echo ' <ul class="loop-category">';
334
- if(count(get_the_category()) > 0){
335
- foreach((get_the_category()) as $category) {
336
- echo '<li class="amp-cat-'. $category->term_id.'"><a href="'.ampforwp_url_controller( get_category_link( $category->term_id ) ).'">'. $category->cat_name.'</a></li>';
337
- }
338
- }
339
- echo '</ul>';
340
- }
341
- // author
342
- function amp_loop_author($args = array()){
343
- global $redux_builder_amp;
344
- if(function_exists('ampforwp_framework_get_author_box')){
345
- ampforwp_framework_get_author_box($args);
346
- }else{
347
- echo "";
348
- }
 
 
 
349
  }
1
+ <?php
2
+ function amp_archive_title(){
3
+ global $redux_builder_amp;
4
+ if( is_author() ){
5
+ $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
6
+ if( true == ampforwp_gravatar_checker($curauth->user_email) ){
7
+ $curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
8
+ if($curauth_url){ ?>
9
+ <div class="amp-wp-content author-img">
10
+ <amp-img src="<?php echo esc_url($curauth_url); ?>" width="90" height="90" layout="responsive"></amp-img>
11
+ </div>
12
+ <?php }
13
+ }
14
+ }
15
+ if ( is_archive() ) {
16
+ 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 ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
245
+ $args['format'] = 'traditional';
246
+ }
247
+ if(isset($args['format']) && $args['format']=='traditional'){
248
+ $post_date = esc_html( get_the_date() ) . ' '.esc_html( get_the_time());
249
+ }else{
250
+ $post_date = human_time_diff(
251
+ get_the_time('U', get_the_ID() ),
252
+ current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
253
+ 'ago');
254
+ }
255
+ echo '<div class="loop-date">'.$post_date.'</div>';
256
+ }
257
+
258
+ function amp_loop_excerpt($no_of_words=15,$tag = 'p'){
259
+ //excerpt
260
+ if(has_excerpt()){
261
+ $content = get_the_excerpt();
262
+ }else{
263
+ $content = get_the_content();
264
+ }
265
+ $content = strip_shortcodes( $content );
266
+ echo '<'.$tag.'>'. wp_trim_words( $content, $no_of_words ) .'</'.$tag.'>';
267
+ }
268
+ function amp_loop_all_content($tag = 'p'){
269
+ $fullContent = strip_shortcodes( get_the_content() );
270
+ echo '<'.$tag.'>'. $fullContent .'</'.$tag.'>';
271
+ }
272
+
273
+ function amp_loop_permalink($return,$amp_query_var ='amp'){
274
+ if( $return ){
275
+ return ampforwp_url_controller( get_permalink() ) ;
276
+ }
277
+ echo ampforwp_url_controller( get_permalink() );
278
+ }
279
+ function amp_loop_image( $data=array() ) {
280
+ global $ampLoopData,$counterOffset;
281
+ if (ampforwp_has_post_thumbnail() ) {
282
+
283
+ $tag = 'div';
284
+ $tag_class = '';
285
+ $layout_responsive = '';
286
+ $imageClass = '';
287
+ $imageSize = 'thumbnail';
288
+
289
+ if ( isset($data['tag']) && $data['tag'] != "" ) {
290
+ $tag = $data['tag'];
291
+ }
292
+
293
+ if ( isset($data['responsive']) && $data['responsive'] != "" ) {
294
+ $layout_responsive = 'layout=responsive';
295
+ }
296
+
297
+ if ( isset($data['tag_class']) && $data['tag_class'] != "" ) {
298
+ $tag_class = $data['tag_class'];
299
+ }
300
+ if ( isset($data['image_class']) && $data['image_class'] != "" ) {
301
+ $imageClass = $data['image_class'];
302
+ }
303
+ if ( isset($data['image_size']) && $data['image_size'] != "" ) {
304
+ $imageSize = $data['image_size'];
305
+ }
306
+ $thumb_url = ampforwp_get_post_thumbnail('url', $imageSize);
307
+ $thumb_width = ampforwp_get_post_thumbnail('width', $imageSize);
308
+ $thumb_height = ampforwp_get_post_thumbnail('height', $imageSize);
309
+
310
+ if ( isset($data['image_crop']) && $data['image_crop'] != "" ) {
311
+ $width = $data['image_crop_width'];
312
+ if ( empty($width) ) {
313
+ $width = $thumb_width;
314
+ }
315
+ $height = $data['image_crop_height'];
316
+ if ( empty($height) ) {
317
+ $height = $thumb_height;
318
+ }
319
+ $thumb_url_array = ampforwp_aq_resize( $thumb_url, $width, $height, true, false, true ); //resize & crop the image
320
+ $thumb_url = $thumb_url_array[0];
321
+ $thumb_width = $thumb_url_array[1];
322
+ $thumb_height = $thumb_url_array[2];
323
+ }
324
+ if ( $thumb_url ) {
325
+ echo '<'.$tag.' class="loop-img '.$tag_class.'">';
326
+ echo '<a href="'.amp_loop_permalink(true).'">';
327
+ echo '<amp-img src="'. $thumb_url .'" width="'.$thumb_width.'" height="'.$thumb_height.'" '. $layout_responsive .' class="'.$imageClass.'"></amp-img>';
328
+ echo '</a>';
329
+ echo '</'.$tag.'>';
330
+ }
331
+ }
332
+ }
333
+
334
+ // Category
335
+ function amp_loop_category(){
336
+ if(count(get_the_category()) > 0){
337
+ echo ' <ul class="loop-category">';
338
+ foreach((get_the_category()) as $category) {
339
+ echo '<li class="amp-cat-'. $category->term_id.'"><a href="'.ampforwp_url_controller( get_category_link( $category->term_id ) ).'">'. $category->cat_name.'</a></li>';
340
+ }
341
+ echo '</ul>';
342
+ }
343
+ }
344
+ // author
345
+ function amp_loop_author($args = array()){
346
+ global $redux_builder_amp;
347
+ if(function_exists('ampforwp_framework_get_author_box')){
348
+ ampforwp_framework_get_author_box($args);
349
+ }else{
350
+ echo "";
351
+ }
352
  }
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>' . __( '<span>Page:</span>' ),
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( '%', '<span>'.$i.'</span>', $r['pagelink'] ) . $r['link_after'];
39
- if ( $i != $page || ! $more && 1 == $page ) {
40
- $link = ampforwp_framework_get_post_paginated_link( $i ) . $link . '</a>';
41
- }
42
- /**
43
- * Filters the HTML output of individual page number links.
44
- * @param string $link The page number HTML output.
45
- * @param int $i Page number for paginated posts' page links.
46
- */
47
- $link = apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $i );
48
-
49
- // Use the custom links separator beginning with the second link.
50
- $output .= ( 1 === $i ) ? ' ' : $r['separator'];
51
- $output .= $link;
52
- }
53
- $output .= $r['after'];
54
- } elseif ( $more ) {
55
- $output .= $r['before'];
56
- $prev = $page - 1;
57
- if ( $prev > 0 ) {
58
- $link = ampforwp_framework_get_post_paginated_link( $prev, $previous_class ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>';
59
- $output .= apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $prev );
60
- }
61
- $next = $page + 1;
62
- if ( $next <= $numpages ) {
63
- if ( $prev ) {
64
- $output .= $r['separator'];
65
- }
66
- $link = ampforwp_framework_get_post_paginated_link( $next, $next_class ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>';
67
- $output .= apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $next );
68
- }
69
- $output .= $r['after'];
70
- }
71
- }
72
-
73
- /**
74
- * Filters the HTML output of page links for paginated posts.
75
- * @param string $output HTML output of paginated posts' page links.
76
- * @param array $args An array of arguments.
77
- */
78
- $html = apply_filters( 'ampforwp_framework_get_post_pagination', $output, $args );
79
- if ( $r['echo'] ) {
80
- echo $html;
81
- }
82
- return $html;
83
- }
84
-
85
- /**
86
- * Helper function for ampforwp_framework_get_post_pagination().
87
- * @access private
88
- *
89
- * @global WP_Rewrite $wp_rewrite
90
- *
91
- * @param int $i Page number.
92
- * @return string Link.
93
- */
94
- function ampforwp_framework_get_post_paginated_link( $i, $args = '' ) {
95
- global $wp_rewrite;
96
- $post = get_post();
97
- $query_args = array();
98
- if ( isset($args) ) {
99
- $class = "class='$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>' . __( '<span>Page:</span>' ),
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( '%', '<span>'.$i.'</span>', $r['pagelink'] ) . $r['link_after'];
39
+ if ( $i != $page || ! $more && 1 == $page ) {
40
+ $link = ampforwp_framework_get_post_paginated_link( $i ) . $link . '</a>';
41
+ }
42
+ /**
43
+ * Filters the HTML output of individual page number links.
44
+ * @param string $link The page number HTML output.
45
+ * @param int $i Page number for paginated posts' page links.
46
+ */
47
+ $link = apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $i );
48
+
49
+ // Use the custom links separator beginning with the second link.
50
+ $output .= ( 1 === $i ) ? ' ' : $r['separator'];
51
+ $output .= $link;
52
+ }
53
+ $output .= $r['after'];
54
+ } elseif ( $more ) {
55
+ $output .= $r['before'];
56
+ $prev = $page - 1;
57
+ if ( $prev > 0 ) {
58
+ $link = ampforwp_framework_get_post_paginated_link( $prev, $previous_class ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>';
59
+ $output .= apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $prev );
60
+ }
61
+ $next = $page + 1;
62
+ if ( $next <= $numpages ) {
63
+ if ( $prev ) {
64
+ $output .= $r['separator'];
65
+ }
66
+ $link = ampforwp_framework_get_post_paginated_link( $next, $next_class ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>';
67
+ $output .= apply_filters( 'ampforwp_framework_get_post_pagination_link', $link, $next );
68
+ }
69
+ $output .= $r['after'];
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Filters the HTML output of page links for paginated posts.
75
+ * @param string $output HTML output of paginated posts' page links.
76
+ * @param array $args An array of arguments.
77
+ */
78
+ $html = apply_filters( 'ampforwp_framework_get_post_pagination', $output, $args );
79
+ if ( $r['echo'] ) {
80
+ echo $html;
81
+ }
82
+ return $html;
83
+ }
84
+
85
+ /**
86
+ * Helper function for ampforwp_framework_get_post_pagination().
87
+ * @access private
88
+ *
89
+ * @global WP_Rewrite $wp_rewrite
90
+ *
91
+ * @param int $i Page number.
92
+ * @return string Link.
93
+ */
94
+ function ampforwp_framework_get_post_paginated_link( $i, $args = '' ) {
95
+ global $wp_rewrite;
96
+ $post = get_post();
97
+ $query_args = array();
98
+ if ( isset($args) ) {
99
+ $class = "class='$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,156 +1,161 @@
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
- if (ampforwp_has_post_thumbnail() ) {
104
- $thumb_url = ampforwp_get_post_thumbnail('url', $imagetype);
105
- $thumb_width = ampforwp_get_post_thumbnail('width', $imagetype);
106
- $thumb_height = ampforwp_get_post_thumbnail('height', $imagetype);
107
- if(isset($data['image_crop']) && $data['image_crop'] != ""){
108
- $width = $data['image_crop_width'];
109
- if(empty($width)){
110
- $width = $thumb_url_array_2[1];
111
- }
112
- $height = $data['image_crop_height'];
113
- if(empty($height)){
114
- $height = $thumb_url_array_2[2];
115
- }
116
- $thumb_url_array = ampforwp_aq_resize( $thumb_url, $width, $height, true, false, true ); //resize & crop the image
117
- $thumb_url = $thumb_url_array[0];
118
- $thumb_width = $thumb_url_array[1];
119
- $thumb_height = $thumb_url_array[2];
120
- }
121
-
122
- if ( $thumb_url && $show_image ) { ?>
123
- <amp-img src="<?php echo esc_url( $thumb_url ); ?>" width="<?php echo $thumb_width; ?>" height="<?php echo $thumb_height; ?>" layout="responsive"></amp-img>
124
- <?php }
125
- } ?>
126
- </a>
127
- <?php
128
- }
129
-
130
- function ampforwp_get_relatedpost_content($argsdata=array()){
131
- $related_post_permalink = ampforwp_url_controller( get_permalink() );
132
- ?>
133
- <div class="related_link">
134
- <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
135
-
136
- <?php
137
- $show_excerpt = (isset($argsdata['show_excerpt'])? $argsdata['show_excerpt'] : true);
138
- if($show_excerpt){
139
- if(has_excerpt()){
140
- $content = get_the_excerpt();
141
- }else{
142
- $content = get_the_content();
143
- }
144
- ?><p><?php
145
- echo wp_trim_words( strip_shortcodes( $content ) , '15' );
146
- ?></p><?php
147
- }
148
- $show_author = (isset($argsdata['show_author'])? $argsdata['show_author'] : true);
149
- if($show_author){
150
- $author_args = isset($argsdata['author_args'])? $argsdata['author_args'] : array();
151
- ampforwp_framework_get_author_box($author_args);
152
- }
153
- ?>
154
- </div>
155
- <?php
 
 
 
 
 
156
  }
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 ( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] ) {
13
+ if( $my_query->have_posts() ) { ?>
14
+ <div class="amp-related-posts">
15
+ <ul class="clearfix">
16
+ <?php ampforwp_related_post(); ?>
17
+ <?php
18
+ while( $my_query->have_posts() ) {
19
+ $my_query->the_post();
20
+
21
+ ?>
22
+ <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
23
+ <?php
24
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
25
+ if ( $show_image ) {
26
+ if ( isset($argsdata['image_size']) && '' != $argsdata['image_size'] ) {
27
+ ampforwp_get_relatedpost_image($argsdata['image_size']);
28
+ }
29
+ else {
30
+ ampforwp_get_relatedpost_image('thumbnail');
31
+ }
32
+ }
33
+ ampforwp_get_relatedpost_content($argsdata);
34
+ ?>
35
+ </li><?php
36
+ }
37
+
38
+ } ?>
39
+ </ul>
40
+ </div>
41
+ <?php wp_reset_postdata(); ?>
42
+ <?php do_action('ampforwp_below_related_post_hook');
43
+ }
44
+ }
45
+
46
+
47
+ function related_post_loop_query(){
48
+ global $post, $redux_builder_amp;
49
+ $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
50
+ $int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
51
+ $args = null;
52
+
53
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
54
+ $categories = get_the_category($post->ID);
55
+ if ($categories) {
56
+ $category_ids = array();
57
+ foreach($categories as $individual_category){ $category_ids[] = $individual_category->term_id;
58
+ }
59
+ $args=array(
60
+ 'category__in' => $category_ids,
61
+ 'post__not_in' => array($post->ID),
62
+ 'posts_per_page'=> $int_number_of_related_posts,
63
+ 'ignore_sticky_posts'=>1,
64
+ 'has_password' => false ,
65
+ 'post_status'=> 'publish'
66
+ );
67
+ }
68
+ }
69
+ // tags
70
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
71
+ $ampforwp_tags = get_the_tags($post->ID);
72
+ if ($ampforwp_tags) {
73
+ $tag_ids = array();
74
+ foreach($ampforwp_tags as $individual_tag) {
75
+ $tag_ids[] = $individual_tag->term_id;
76
+ }
77
+ $args=array(
78
+ 'tag__in' => $tag_ids,
79
+ 'post__not_in' => array($post->ID),
80
+ 'posts_per_page'=> $int_number_of_related_posts,
81
+ 'ignore_sticky_posts'=>1,
82
+ 'has_password' => false ,
83
+ 'post_status'=> 'publish'
84
+ );
85
+ }
86
+ }
87
+ if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
88
+
89
+ }
90
+ $my_query = new wp_query( $args );
91
+ return $my_query;
92
+ }
93
+
94
+ function ampforwp_related_post(){
95
+ global $redux_builder_amp;
96
+ do_action('ampforwp_above_related_post'); //Above Related Posts
97
+ ?>
98
+ <h3 class="amp-related-posts-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></h3>
99
+ <?php }
100
+
101
+
102
+ function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
103
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
104
+ $show_image = (isset($data['show_image']) ? $data['show_image'] : true);
105
+ ?>
106
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
107
+ <?php
108
+ if (ampforwp_has_post_thumbnail() ) {
109
+ $thumb_url = ampforwp_get_post_thumbnail('url', $imagetype);
110
+ $thumb_width = ampforwp_get_post_thumbnail('width', $imagetype);
111
+ $thumb_height = ampforwp_get_post_thumbnail('height', $imagetype);
112
+ if(isset($data['image_crop']) && $data['image_crop'] != ""){
113
+ $width = $data['image_crop_width'];
114
+ if(empty($width)){
115
+ $width = $thumb_url_array_2[1];
116
+ }
117
+ $height = $data['image_crop_height'];
118
+ if(empty($height)){
119
+ $height = $thumb_url_array_2[2];
120
+ }
121
+ $thumb_url_array = ampforwp_aq_resize( $thumb_url, $width, $height, true, false, true ); //resize & crop the image
122
+ $thumb_url = $thumb_url_array[0];
123
+ $thumb_width = $thumb_url_array[1];
124
+ $thumb_height = $thumb_url_array[2];
125
+ }
126
+
127
+ if ( $thumb_url && $show_image ) { ?>
128
+ <amp-img src="<?php echo esc_url( $thumb_url ); ?>" width="<?php echo $thumb_width; ?>" height="<?php echo $thumb_height; ?>" layout="responsive"></amp-img>
129
+ <?php }
130
+ } ?>
131
+ </a>
132
+ <?php
133
+ }
134
+
135
+ function ampforwp_get_relatedpost_content($argsdata=array()){
136
+ $related_post_permalink = ampforwp_url_controller( get_permalink() );
137
+ ?>
138
+ <div class="related_link">
139
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
140
+
141
+ <?php
142
+ $show_excerpt = (isset($argsdata['show_excerpt'])? $argsdata['show_excerpt'] : true);
143
+ if($show_excerpt){
144
+ if(has_excerpt()){
145
+ $content = get_the_excerpt();
146
+ }else{
147
+ $content = get_the_content();
148
+ }
149
+ ?><p><?php
150
+ echo wp_trim_words( strip_shortcodes( $content ) , '15' );
151
+ ?></p><?php
152
+ }
153
+ $show_author = (isset($argsdata['show_author'])? $argsdata['show_author'] : true);
154
+ if($show_author){
155
+ $author_args = isset($argsdata['author_args'])? $argsdata['author_args'] : array();
156
+ ampforwp_framework_get_author_box($author_args);
157
+ }
158
+ ?>
159
+ </div>
160
+ <?php
161
  }
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,229 @@
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'] = 'https://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 (ampforwp_has_post_thumbnail( $post_id ) ){
16
+ $image = ampforwp_get_post_thumbnail( 'url', 'full' );
17
+ }
18
+
19
+ if(!ampforwp_is_associative($selected_social_icons)){
20
+ $icons_list_temp = array();
21
+ foreach ($selected_social_icons as $key => $icons) {
22
+ $icons_list_temp[$icons] = '';
23
+ }
24
+ $selected_social_icons = $icons_list_temp;
25
+ }
26
+
27
+ $social_icons_names = array();
28
+ $url = get_the_permalink();
29
+ $title = esc_attr(get_the_title());
30
+ if(isset($redux_builder_amp['enable-single-twitter-share-link']) && $redux_builder_amp['enable-single-twitter-share-link']){
31
+ $twitter_url = get_the_permalink();
32
+ }
33
+ else
34
+ $twitter_url = wp_get_shortlink();
35
+ foreach ($selected_social_icons as $key => $value) {
36
+ $social_icons_names[] = $key;
37
+ }
38
+
39
+
40
+ if( isset($selected_social_icons['twitter'] ) && null == $selected_social_icons['twitter'] ){
41
+ $selected_social_icons['twitter'] = 'https://twitter.com/intent/tweet?url='. $twitter_url.'&text='. $title .' ';
42
+ //https://twitter.com/intent/tweet?url={url}&text={title}&via={via}&hashtags={hashtags}
43
+ }
44
+
45
+ if( isset($selected_social_icons['facebook'] ) && null == $selected_social_icons['facebook'] ){
46
+ $selected_social_icons['facebook'] = 'https://www.facebook.com/sharer.php?u='. $url. '';
47
+ //or https://www.facebook.com/dialog/share?app_id={app_id}&display=page&href={url}&redirect_uri={redirect_url}
48
+ }
49
+ if( isset($selected_social_icons['pinterest'] ) && null == $selected_social_icons['pinterest'] ){
50
+ $selected_social_icons['pinterest'] = 'https://pinterest.com/pin/create/bookmarklet/?media='.$image.'&url='.$url.'&description='.$title.'';
51
+ //https://pinterest.com/pin/create/bookmarklet/?media={img}&url={url}&is_video={is_video}&description={title}
52
+ }
53
+ if( isset($selected_social_icons['google-plus']) && $selected_social_icons['google-plus'] == null){
54
+ $selected_social_icons['google-plus'] = 'https://plus.google.com/share?url='. $url. '';
55
+ //https://plus.google.com/share?url={url}
56
+ }
57
+ if( isset($selected_social_icons['linkedin']) && $selected_social_icons['linkedin'] == null){
58
+ $selected_social_icons['linkedin'] = 'https://www.linkedin.com/shareArticle?url='. $url. '&title='. $title .'';
59
+ //https://www.linkedin.com/shareArticle?url={url}&title={title}
60
+ }
61
+
62
+ if( isset($selected_social_icons['reddit']) && $selected_social_icons['reddit'] == null){
63
+ $selected_social_icons['reddit'] = 'https://reddit.com/submit?url='. $url. '&title='. $title .'';
64
+ //https://reddit.com/submit?url={url}&title={title}
65
+ }
66
+ if( isset($selected_social_icons['VKontakte']) && $selected_social_icons['VKontakte'] == null){
67
+ $selected_social_icons['VKontakte'] = 'https://vk.com/share.php?url='. $url. '';
68
+ //http://vk.com/share.php?url={url}
69
+ }
70
+ if( isset($selected_social_icons['Odnoklassniki']) && $selected_social_icons['Odnoklassniki'] == null){
71
+ $selected_social_icons['Odnoklassniki'] = 'https://ok.ru/dk?st.cmd=addShare&st._surl='. $url. '';
72
+ }
73
+
74
+ if( isset($selected_social_icons['tumblr']) && $selected_social_icons['tumblr'] == null){
75
+ $selected_social_icons['tumblr'] = 'https://www.tumblr.com/widgets/share/tool?canonicalUrl='. $url. '&title='. $title .'&caption='.$desc.'';
76
+ //https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={desc}
77
+ }
78
+ if ( isset($selected_social_icons['telegram']) && null == $selected_social_icons['telegram'] ) {
79
+ $selected_social_icons['telegram'] = 'https://telegram.me/share/url?url='. $url. '&text='. $title .'';
80
+ //https://telegram.me/share/url?url={url}&text={title}
81
+ }
82
+ if ( isset($selected_social_icons['digg']) && null == $selected_social_icons['digg'] ) {
83
+ $selected_social_icons['digg'] = 'http://digg.com/submit?url='. $url. '&title='. $title .'';
84
+ //http://digg.com/submit?url={url}&title={title}
85
+ }
86
+ if ( isset($selected_social_icons['StumbleUpon']) && null == $selected_social_icons['StumbleUpon'] ) {
87
+ $selected_social_icons['StumbleUpon'] = 'http://www.stumbleupon.com/submit?url='. $url. '&title='. $title .'';
88
+ //http://www.stumbleupon.com/submit?url={url}&title={title}
89
+ }
90
+ if ( isset($selected_social_icons['Wechat']) && null == $selected_social_icons['Wechat'] ) {
91
+ $selected_social_icons['Wechat'] = 'http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url='. $url. '';
92
+ // http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url={url}
93
+ }
94
+ if ( isset($selected_social_icons['Viber']) && null == $selected_social_icons['Viber'] ) {
95
+ $selected_social_icons['Viber'] = 'viber://forward?text='. $url. '';
96
+ //viber://forward?text={url}
97
+ }
98
+
99
+ ?>
100
+ <div class="amp-social">
101
+ <ul>
102
+ <?php if( ( in_array( 'twitter' , $selected_social_icons,true) || in_array('twitter', $social_icons_names,true) ) && !empty($selected_social_icons['twitter']) ) { ?>
103
+ <a href="<?php echo $selected_social_icons['twitter'] ?>" target ="_blank"><li class="icon-twitter"></li></a>
104
+ <?php } ?>
105
+
106
+ <?php if( (in_array('facebook', $selected_social_icons,true) || in_array('facebook', $social_icons_names,true)) && !empty($selected_social_icons['facebook']) ) { ?>
107
+ <a href="<?php echo $selected_social_icons['facebook'] ?>" target ="_blank"><li class="icon-facebook"></li></a>
108
+ <?php } ?>
109
+
110
+ <?php if( ( in_array( 'pinterest' , $selected_social_icons,true ) || in_array( 'pinterest', $social_icons_names,true )) && !empty($selected_social_icons['pinterest']) ) { ?>
111
+ <a href="<?php echo $selected_social_icons['pinterest'] ?>" target ="_blank"><li class="icon-pinterest"></li></a>
112
+ <?php } ?>
113
+
114
+ <?php if( (in_array( 'google-plus' , $selected_social_icons,true ) || in_array( 'google-plus' , $social_icons_names,true )) && !empty($selected_social_icons['google-plus']) ) { ?>
115
+ <a href="<?php echo $selected_social_icons['google-plus'] ?>" target ="_blank"><li class="icon-google-plus"></li></a>
116
+ <?php } ?>
117
+
118
+ <?php if( (in_array( 'linkedin' , $selected_social_icons,true ) || in_array( 'linkedin' , $social_icons_names,true )) && !empty($selected_social_icons['linkedin']) ) { ?>
119
+ <a href="<?php echo $selected_social_icons['linkedin'] ?>" target ="_blank"><li class="icon-linkedin"></li></a>
120
+ <?php } ?>
121
+
122
+ <?php if( (in_array( 'youtube' , $selected_social_icons,true ) || in_array( 'youtube' , $social_icons_names,true )) && !empty($selected_social_icons['youtube']) ) { ?>
123
+ <a href="<?php echo $selected_social_icons['youtube'] ?>" target ="_blank"><li class="icon-youtube-play"></li></a>
124
+ <?php } ?>
125
+
126
+ <?php if( (in_array( 'instagram' , $selected_social_icons,true ) || in_array( 'instagram' , $social_icons_names,true )) && !empty($selected_social_icons['instagram']) ) { ?>
127
+ <a href="<?php echo $selected_social_icons['instagram'] ?>" target ="_blank"> <li class="icon-instagram"></li></a>
128
+ <?php } ?>
129
+
130
+ <?php if( ( in_array( 'reddit' , $selected_social_icons,true ) || in_array( 'reddit' , $social_icons_names,true )) && !empty($selected_social_icons['reddit']) ) { ?>
131
+ <a href="<?php echo $selected_social_icons['reddit'] ?>" target ="_blank"><li class="icon-reddit-alien"></li></a>
132
+ <?php } ?>
133
+
134
+ <?php if( ( in_array( 'VKontakte' , $selected_social_icons,true ) || in_array( 'VKontakte' , $social_icons_names,true ) ) && !empty($selected_social_icons['VKontakte']) ) { ?>
135
+ <a href="<?php echo $selected_social_icons['VKontakte'] ?>" target ="_blank"><li class="icon-vk"></li></a>
136
+ <?php } ?>
137
+
138
+ <?php if( ( in_array( 'Odnoklassniki' , $selected_social_icons,true ) || in_array( 'Odnoklassniki' , $social_icons_names,true ) ) && !empty($selected_social_icons['Odnoklassniki']) ) { ?>
139
+ <a href="<?php echo esc_url($selected_social_icons['Odnoklassniki']) ?>" target ="_blank"><li class="icon-Odnoklassniki"></li></a>
140
+ <?php } ?>
141
+
142
+ <?php if( (in_array( 'snapchat' , $selected_social_icons,true ) || in_array( 'snapchat' , $social_icons_names,true ) ) && !empty($selected_social_icons['snapchat']) ) { ?>
143
+ <a href="<?php echo $selected_social_icons['snapchat'] ?>" target ="_blank"><li class="icon-snapchat-ghost"></li></a>
144
+ <?php } ?>
145
+
146
+ <?php if( (in_array( 'tumblr' , $selected_social_icons,true ) || in_array( 'tumblr' , $social_icons_names,true )) && !empty($selected_social_icons['tumblr']) ) { ?>
147
+ <a href="<?php echo $selected_social_icons['tumblr'] ?>" target ="_blank"><li class="icon-tumblr"></li></a>
148
+ <?php } ?>
149
+
150
+ <?php if ( (in_array( 'telegram' , $selected_social_icons,true ) || in_array( 'telegram' , $social_icons_names,true )) && ! empty($selected_social_icons['telegram']) ) { ?>
151
+ <a href="<?php echo esc_url($selected_social_icons['telegram']); ?>" target ="_blank"><li class="icon-telegram"></li></a>
152
+ <?php } ?>
153
+
154
+ <?php if ( (in_array( 'digg' , $selected_social_icons,true ) || in_array( 'digg' , $social_icons_names,true )) && ! empty($selected_social_icons['digg']) ) { ?>
155
+ <a href="<?php echo esc_url($selected_social_icons['digg']); ?>" target ="_blank"><li class="icon-digg"></li></a>
156
+ <?php } ?>
157
+
158
+ <?php if ( (in_array( 'StumbleUpon' , $selected_social_icons,true ) || in_array( 'StumbleUpon' , $social_icons_names,true )) && ! empty($selected_social_icons['StumbleUpon']) ) { ?>
159
+ <a href="<?php echo esc_url($selected_social_icons['StumbleUpon']); ?>" target ="_blank"><li class="icon-StumbleUpon"></li></a>
160
+ <?php } ?>
161
+
162
+ <?php if ( (in_array( 'Wechat' , $selected_social_icons,true ) || in_array( 'Wechat' , $social_icons_names,true )) && !empty($selected_social_icons['Wechat']) ) { ?>
163
+ <a href="<?php echo esc_url($selected_social_icons['Wechat']); ?>" target ="_blank"><li class="icon-Wechat"></li></a>
164
+ <?php } ?>
165
+
166
+ <?php if ( (in_array( 'Viber' , $selected_social_icons,true ) || in_array( 'Viber' , $social_icons_names,true )) && ! empty($selected_social_icons['Viber']) ) { ?>
167
+ <a href="<?php echo ($selected_social_icons['Viber']); ?>" target ="_blank"><li class="icon-Viber"></li></a>
168
+ <?php } ?>
169
+
170
+ <?php if( (in_array( 'facebook-like' , $selected_social_icons,true ) || in_array( 'facebook-like' , $social_icons_names,true )) ) { ?>
171
+ <amp-facebook-like width=90 height=28
172
+ layout="fixed"
173
+ data-size="large"
174
+ data-layout="button_count"
175
+ data-href="<?php echo esc_url(get_the_permalink()); ?>">
176
+ </amp-facebook-like>
177
+ <?php } ?>
178
+ </ul>
179
+ </div>
180
+ <?php
181
+ }
182
+
183
+ function ampforwp_is_associative(array $arr)
184
+ {
185
+ if (array() === $arr) return false;
186
+ return array_keys($arr) !== range(0, count($arr) - 1);
187
+ }
188
+ //Load styling for social icons
189
+
190
+ add_action('amp_post_template_css','amp_social_styles',11);
191
+
192
+
193
+ function amp_social_styles(){ ?>
194
+ @font-face {
195
+ font-family: 'icomoon';
196
+ src: url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.eot');
197
+ src: url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.eot') format('embedded-opentype'),
198
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf') format('truetype'),
199
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.woff') format('woff'),
200
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.svg') format('svg');
201
+ font-weight: normal;
202
+ font-style: normal;
203
+ }
204
+
205
+ [class^="icon-"], [class*=" icon-"]{ font-family: 'icomoon'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1;
206
+ -webkit-font-smoothing: antialiased;
207
+ -moz-osx-font-smoothing: grayscale;
208
+ }
209
+
210
+ .icon-twitter:before{ content: "\f099";background:#1da1f2 }
211
+ .icon-facebook:before{ content: "\f09a";background:#3b5998 }
212
+ .icon-facebook-f:before{ content: "\f09a";background:#3b5998 }
213
+ .icon-pinterest:before{ content: "\f0d2";background:#bd081c }
214
+ .icon-google-plus:before{ content: "\f0d5";background:#dd4b39 }
215
+ .icon-linkedin:before{ content: "\f0e1";background:#0077b5 }
216
+ .icon-youtube-play:before{ content: "\f16a";background:#cd201f }
217
+ .icon-instagram:before{ content: "\f16d";background:#c13584 }
218
+ .icon-tumblr:before{ content: "\f173";background:#35465c }
219
+ .icon-vk:before{ content: "\f189";background:#45668e }
220
+ .icon-whatsapp:before{ content: "\f232";background:#075e54 }
221
+ .icon-reddit-alien:before{ content: "\f281";background:#ff4500 }
222
+ .icon-snapchat-ghost:before{ content: "\f2ac"; background:#fffc00 }
223
+ .amp-social{ font-size: 15px; display: inline-block; }
224
+ .amp-social ul{ list-style-type:none; padding:0;margin:0; text-align:center }
225
+ .amp-social li{ box-sizing: initial; display:inline-block; }
226
+ .amp-social li:before{box-sizing: initial;color: #fff;display: inline-block;width: 18px;height: 18px;line-height: 18px;}
227
+ amp-facebook-like{top:8px;}
228
+
 
 
229
  <?php }
components/theme-loader.php CHANGED
@@ -1,221 +1,272 @@
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
- // Polylang Frontpage #1779
200
- if ( 'single' === $type && ampforwp_polylang_front_page() && true == $redux_builder_amp['amp-frontpage-select-option'] ) {
201
- $file = AMPFORWP_CUSTOM_THEME . '/page.php';
202
- }
203
- return $file;
204
- }
205
-
206
- // Custom Footer
207
- function ampforwp_custom_footer_file( $file, $type ) {
208
- if ( 'footer' === $type ) {
209
- $file = AMPFORWP_CUSTOM_THEME . '/footer.php';
210
- }
211
- return $file;
212
- }
213
- // Load the Core Styles of Custom Theme
214
- //add_action('amp_css', 'ampforwp_custom_style');
215
- function ampforwp_custom_style() {
216
- global $redux_builder_amp;
217
- require_once( AMPFORWP_CUSTOM_THEME . '/style.php' );
218
- // Custom CSS
219
- echo $redux_builder_amp['css_editor'];
220
- }
221
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_author():
128
+ $author = get_queried_object();
129
+
130
+ $templates = array();
131
+
132
+ if ( $author instanceof WP_User ) {
133
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/author-{$author->user_nicename}.php";
134
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/author-{$author->ID}.php";
135
+ }
136
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/author.php";
137
+
138
+ foreach ( $templates as $key => $value ) {
139
+ if ( 'single' === $type && file_exists($value) ) {
140
+ $file = $value;
141
+ break;
142
+ }
143
+ }
144
+ break;
145
+ case (is_archive()):
146
+ $post_types = array_filter( (array) get_query_var( 'post_type' ) );
147
+ $templates = array();
148
+ if ( count( $post_types ) == 1 ) {
149
+ $post_type = reset( $post_types );
150
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/archive-{$post_type}.php";
151
+ }
152
+ $templates[] = AMPFORWP_CUSTOM_THEME . '/archive.php';
153
+ foreach ( $templates as $key => $value ) {
154
+ if ( 'single' === $type && file_exists($value) ) {
155
+ $file = $value;
156
+ break;
157
+ }
158
+ }
159
+ break;
160
+ case (is_post_type_archive()):
161
+ $post_type = get_query_var( 'post_type' );
162
+ if ( is_array( $post_type ) )
163
+ $post_type = reset( $post_type );
164
+
165
+ $obj = get_post_type_object( $post_type );
166
+ if ( ! ($obj instanceof WP_Post_Type) || ! $obj->has_archive ) {
167
+ //return '';
168
+ break;
169
+ }
170
+
171
+ $post_types = array_filter( (array) get_query_var( 'post_type' ) );
172
+
173
+ $templates = array();
174
+
175
+ if ( count( $post_types ) == 1 ) {
176
+ $post_type = reset( $post_types );
177
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/archive-{$post_type}.php";
178
+ }
179
+ $templates[] = AMPFORWP_CUSTOM_THEME . '/archive.php';
180
+ foreach ( $templates as $key => $value ) {
181
+ if ( 'single' === $type && file_exists($value) ) {
182
+ $file = $value;
183
+ break;
184
+ }
185
+ }
186
+ break;
187
+ case is_single():
188
+ $object = get_queried_object();
189
+
190
+ $templates = array();
191
+
192
+ if ( ! empty( $object->post_type ) ) {
193
+ $template = get_page_template_slug( $object );
194
+ if ( $template && 0 === validate_file( $template ) ) {
195
+ $templates[] = $template;
196
+ }
197
+
198
+ $name_decoded = urldecode( $object->post_name );
199
+ if ( $name_decoded !== $object->post_name ) {
200
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}-{$name_decoded}.php";
201
+ }
202
+
203
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}-{$object->post_name}.php";
204
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/single-{$object->post_type}.php";
205
+ }
206
+
207
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/single.php";
208
+
209
+ foreach ( $templates as $key => $value ) {
210
+ if ( 'single' === $type && file_exists($value) ) {
211
+ $file = $value;
212
+ break;
213
+ }
214
+ }
215
+ break;
216
+ case is_page():
217
+ $id = get_queried_object_id();
218
+ $template = get_page_template_slug();
219
+ $pagename = get_query_var('pagename');
220
+
221
+ if ( ! $pagename && $id ) {
222
+ // If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object
223
+ $post = get_queried_object();
224
+ if ( $post )
225
+ $pagename = $post->post_name;
226
+ }
227
+
228
+ $templates = array();
229
+ if ( $template && 0 === validate_file( $template ) )
230
+ $templates[] = $template;
231
+ if ( $pagename ) {
232
+ $pagename_decoded = urldecode( $pagename );
233
+ if ( $pagename_decoded !== $pagename ) {
234
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/page-{$pagename_decoded}.php";
235
+ }
236
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/page-{$pagename}.php";
237
+ }
238
+ if ( $id )
239
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/page-{$id}.php";
240
+ $templates[] = AMPFORWP_CUSTOM_THEME . "/page.php";
241
+
242
+ foreach ( $templates as $key => $value ) {
243
+ if ( 'single' === $type && file_exists($value) ) {
244
+ $file = $value;
245
+ break;
246
+ }
247
+ }
248
+ break;
249
+ }
250
+ // Polylang Frontpage #1779
251
+ if ( 'single' === $type && ampforwp_polylang_front_page() && true == $redux_builder_amp['amp-frontpage-select-option'] ) {
252
+ $file = AMPFORWP_CUSTOM_THEME . '/page.php';
253
+ }
254
+ return $file;
255
+ }
256
+
257
+ // Custom Footer
258
+ function ampforwp_custom_footer_file( $file, $type ) {
259
+ if ( 'footer' === $type ) {
260
+ $file = AMPFORWP_CUSTOM_THEME . '/footer.php';
261
+ }
262
+ return $file;
263
+ }
264
+ // Load the Core Styles of Custom Theme
265
+ //add_action('amp_css', 'ampforwp_custom_style');
266
+ function ampforwp_custom_style() {
267
+ global $redux_builder_amp;
268
+ require_once( AMPFORWP_CUSTOM_THEME . '/style.php' );
269
+ // Custom CSS
270
+ echo $redux_builder_amp['css_editor'];
271
+ }
272
+
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/blur-mod-1.png ADDED
Binary file
images/layouts-1.png CHANGED
Binary file
images/layouts-2.png ADDED
Binary file
images/pricing-mod-1.png ADDED
Binary file
images/single-2.png ADDED
Binary file
images/single-3.png ADDED
Binary file
images/slider-1.png ADDED
Binary file
images/slider-2.png ADDED
Binary file
includes/admin-script.js CHANGED
@@ -1,388 +1,388 @@
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>")).trigger('change');;
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>")).trigger('change');
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
- $('#amp_font_type-select option[value='+redux_data.amp_font_type[i]+']').attr('selected','selected').trigger('change');
226
- }
227
- //$('#amp_font_type-select').select2('val',redux_data.amp_font_type)
228
- }
229
- }
230
- });
231
-
232
- /*---------Google Fonts Ends -------*/
233
-
234
-
235
- $('.redux-container').each(function() {
236
- if (!$(this).hasClass('redux-no-sections')) {
237
- $(this).find('.redux-main').prepend('<input style="float:right" class="redux_field_search" name="" type="text" placeholder="Search the controls"/>');
238
- reduxOptionSearch();
239
- }
240
- });
241
-
242
- $(".redux_field_search").keypress(function (evt) {
243
- //Deterime where our character code is coming from within the event
244
- var charCode = evt.charCode || evt.keyCode;
245
- if (charCode == 13) { //Enter key's keycode
246
- return false;
247
- }
248
- });
249
-
250
- if($(".amp-preview-button").length>0){
251
- $(".amp-preview-button").click(function(){
252
- var srcLink = $("#amp-preview-iframe").attr('data-src');
253
- $("#amp-preview-iframe").html("<iframe src='"+srcLink+"'></iframe>");
254
- });
255
- }
256
-
257
- });
258
- var dataTabRequired = function(){
259
- $('[data-tab-required]').each(function(){
260
- var tabRequired = $(this).attr('data-tab-required');
261
- var currentThis = $(this);
262
- tabRequired = JSON.parse(tabRequired);
263
- var showLi = true;
264
- $.each(tabRequired,function(k, value){
265
- var currentValue = jQuery('[name="redux_builder_amp['+value[0]+']"]').val();;
266
- if(currentValue!=value[2]){
267
- showLi = false;
268
- return false;
269
- }
270
- });
271
- if(showLi==false){
272
- currentThis.hide();
273
- }else{
274
- currentThis.show();
275
- }
276
-
277
- });
278
- }
279
- var reduxOptionTab = function(){
280
- $('.redux-tab-selector').click(function(){
281
- var tabId = $(this).attr('data-tab');
282
- var tabRequired = $(this).attr('data-tab-required');
283
- $(this).parents().find('.custom-tab-container').hide();
284
- $('#parent-section-'+ tabId ).show();
285
- });
286
- $('.redux-tabs-ul').each(function(){
287
- $(this).find('.redux-tab-selector:first').click();
288
- });
289
- dataTabRequired();
290
- $('select').change(function(){
291
- dataTabRequired();
292
- });
293
- }
294
- //reduxOptionTab();
295
-
296
- $(".redux-ampforwp-ext-deactivate").click(function(){
297
- var currentThis = $(this);
298
- var plugin_id = currentThis.attr("id");
299
- currentThis.val("Please Wait...");
300
- $deactivateConfirm = confirm("Are you sure you want to Deactivate ?");
301
- if($deactivateConfirm){
302
- $.ajax({
303
- url: ajaxurl,
304
- method: 'post',
305
- data: {action: 'ampforwp_deactivate_license', ampforwp_license_deactivate:plugin_id},
306
- dataType: 'json',
307
- success: function(response){
308
- if(response.status=='200'){
309
- currentThis.parents(".extension_desc").find("input[name='redux_builder_amp[amp-license][amp-ads-google-adsense][license]']").val("");
310
- window.location.href = window.location.href;
311
- }else{
312
- alert(response.message);
313
- }
314
- }
315
- })
316
- }
317
- });
318
-
319
- /*var hideReduxFields = function(){
320
- $("#redux_builder_amp-single-design-type").parents("tr").hide();
321
- }
322
- hideReduxFields();*/
323
-
324
-
325
- var helpSection = function(){
326
- var open;
327
-
328
- open = true;
329
-
330
- $('.a-f-wp-help-tear').click(function() {
331
- if (open) {
332
- $('.a-f-wp-help-tear').addClass('active');
333
- $('.a-f-wp-help-message').addClass('active');
334
- $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
335
- return open = !open;
336
- } else {
337
- $('.a-f-wp-help-tear').removeClass('active green');
338
- $('.a-f-wp-help-message').removeClass('active');
339
- $('.a-f-wp-help-message').val('');
340
- $('.a-f-wp-help-tear').html("<span><i class='dashicons-sos'></i></span>");
341
- return open = !open;
342
- }
343
- });
344
-
345
- $('input').on('input', function(e) {
346
- var value;
347
- value = $("input").val();
348
- if (value.length >= 2) {
349
- $('.a-f-wp-help-tear').addClass('green');
350
- $('.a-f-wp-help-tear').removeClass('active');
351
- return $('.a-f-wp-help-tear').html("<span><i class='dashicons-sos'></i></span>");
352
- } else {
353
- $('.a-f-wp-help-tear').removeClass('green');
354
- $('.a-f-wp-help-tear').addClass('active');
355
- return $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
356
- }
357
- });
358
- }
359
- helpSection();
360
-
361
- var redux_title_modify = function(){
362
- $( '.redux-group-tab-link-a' ).click(function(){
363
- var link = $( this );
364
- if ( link.parent().hasClass( 'empty_section' ) && link.parent().hasClass( 'hasSubSections' ) ) {
365
- var elements = $( this ).closest( 'ul' ).find( '.redux-group-tab-link-a' );
366
- var index = elements.index( this );
367
- link = elements.slice( index + 1, index + 2 );
368
- }
369
-
370
- var el = link.parents( '.redux-container:first' );
371
- var relid = link.data( 'rel' ); // The group ID of interest
372
- var oldid = el.find( '.redux-group-tab-link-li.active:first .redux-group-tab-link-a' ).data( 'rel' );
373
-
374
- var panelTitle = el.find( '#' + relid + '_section_group' ).find("h2:first").hide().html();
375
- $('.redux-main').find("#info_bar h2#newTitle").remove();
376
- if (typeof panelTitle !== 'undefined' || panelTitle){
377
- $('.redux-main').find("#info_bar a.expand_options").after('<h2 id="newTitle" style="float: left;margin: 0px;padding-left: 10px;">'+panelTitle+'</h2>');
378
- }
379
-
380
- });
381
- }
382
- if($( '.redux-group-tab-link-a' ).length){
383
- redux_title_modify();
384
- }
385
-
386
-
387
- });
388
-
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>")).trigger('change');;
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>")).trigger('change');
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
+ $('#amp_font_type-select option[value='+redux_data.amp_font_type[i]+']').attr('selected','selected').trigger('change');
226
+ }
227
+ //$('#amp_font_type-select').select2('val',redux_data.amp_font_type)
228
+ }
229
+ }
230
+ });
231
+
232
+ /*---------Google Fonts Ends -------*/
233
+
234
+
235
+ $('.redux-container').each(function() {
236
+ if (!$(this).hasClass('redux-no-sections')) {
237
+ $(this).find('.redux-main').prepend('<input style="float:right" class="redux_field_search" name="" type="text" placeholder="Search the controls"/>');
238
+ reduxOptionSearch();
239
+ }
240
+ });
241
+
242
+ $(".redux_field_search").keypress(function (evt) {
243
+ //Deterime where our character code is coming from within the event
244
+ var charCode = evt.charCode || evt.keyCode;
245
+ if (charCode == 13) { //Enter key's keycode
246
+ return false;
247
+ }
248
+ });
249
+
250
+ if($(".amp-preview-button").length>0){
251
+ $(".amp-preview-button").click(function(){
252
+ var srcLink = $("#amp-preview-iframe").attr('data-src');
253
+ $("#amp-preview-iframe").html("<iframe src='"+srcLink+"'></iframe>");
254
+ });
255
+ }
256
+
257
+ });
258
+ var dataTabRequired = function(){
259
+ $('[data-tab-required]').each(function(){
260
+ var tabRequired = $(this).attr('data-tab-required');
261
+ var currentThis = $(this);
262
+ tabRequired = JSON.parse(tabRequired);
263
+ var showLi = true;
264
+ $.each(tabRequired,function(k, value){
265
+ var currentValue = jQuery('[name="redux_builder_amp['+value[0]+']"]').val();;
266
+ if(currentValue!=value[2]){
267
+ showLi = false;
268
+ return false;
269
+ }
270
+ });
271
+ if(showLi==false){
272
+ currentThis.hide();
273
+ }else{
274
+ currentThis.show();
275
+ }
276
+
277
+ });
278
+ }
279
+ var reduxOptionTab = function(){
280
+ $('.redux-tab-selector').click(function(){
281
+ var tabId = $(this).attr('data-tab');
282
+ var tabRequired = $(this).attr('data-tab-required');
283
+ $(this).parents().find('.custom-tab-container').hide();
284
+ $('#parent-section-'+ tabId ).show();
285
+ });
286
+ $('.redux-tabs-ul').each(function(){
287
+ $(this).find('.redux-tab-selector:first').click();
288
+ });
289
+ dataTabRequired();
290
+ $('select').change(function(){
291
+ dataTabRequired();
292
+ });
293
+ }
294
+ //reduxOptionTab();
295
+
296
+ $(".redux-ampforwp-ext-deactivate").click(function(){
297
+ var currentThis = $(this);
298
+ var plugin_id = currentThis.attr("id");
299
+ currentThis.val("Please Wait...");
300
+ $deactivateConfirm = confirm("Are you sure you want to Deactivate ?");
301
+ if($deactivateConfirm){
302
+ $.ajax({
303
+ url: ajaxurl,
304
+ method: 'post',
305
+ data: {action: 'ampforwp_deactivate_license', ampforwp_license_deactivate:plugin_id},
306
+ dataType: 'json',
307
+ success: function(response){
308
+ if(response.status=='200'){
309
+ currentThis.parents(".extension_desc").find("input[name='redux_builder_amp[amp-license][amp-ads-google-adsense][license]']").val("");
310
+ window.location.href = window.location.href;
311
+ }else{
312
+ alert(response.message);
313
+ }
314
+ }
315
+ })
316
+ }
317
+ });
318
+
319
+ /*var hideReduxFields = function(){
320
+ $("#redux_builder_amp-single-design-type").parents("tr").hide();
321
+ }
322
+ hideReduxFields();*/
323
+
324
+
325
+ var helpSection = function(){
326
+ var open;
327
+
328
+ open = true;
329
+
330
+ $('.a-f-wp-help-tear').click(function() {
331
+ if (open) {
332
+ $('.a-f-wp-help-tear').addClass('active');
333
+ $('.a-f-wp-help-message').addClass('active');
334
+ $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
335
+ return open = !open;
336
+ } else {
337
+ $('.a-f-wp-help-tear').removeClass('active green');
338
+ $('.a-f-wp-help-message').removeClass('active');
339
+ $('.a-f-wp-help-message').val('');
340
+ $('.a-f-wp-help-tear').html("<span><i class='dashicons-sos'></i></span>");
341
+ return open = !open;
342
+ }
343
+ });
344
+
345
+ $('input').on('input', function(e) {
346
+ var value;
347
+ value = $("input").val();
348
+ if (value.length >= 2) {
349
+ $('.a-f-wp-help-tear').addClass('green');
350
+ $('.a-f-wp-help-tear').removeClass('active');
351
+ return $('.a-f-wp-help-tear').html("<span><i class='dashicons-sos'></i></span>");
352
+ } else {
353
+ $('.a-f-wp-help-tear').removeClass('green');
354
+ $('.a-f-wp-help-tear').addClass('active');
355
+ return $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
356
+ }
357
+ });
358
+ }
359
+ helpSection();
360
+
361
+ var redux_title_modify = function(){
362
+ $( '.redux-group-tab-link-a' ).click(function(){
363
+ var link = $( this );
364
+ if ( link.parent().hasClass( 'empty_section' ) && link.parent().hasClass( 'hasSubSections' ) ) {
365
+ var elements = $( this ).closest( 'ul' ).find( '.redux-group-tab-link-a' );
366
+ var index = elements.index( this );
367
+ link = elements.slice( index + 1, index + 2 );
368
+ }
369
+
370
+ var el = link.parents( '.redux-container:first' );
371
+ var relid = link.data( 'rel' ); // The group ID of interest
372
+ var oldid = el.find( '.redux-group-tab-link-li.active:first .redux-group-tab-link-a' ).data( 'rel' );
373
+
374
+ var panelTitle = el.find( '#' + relid + '_section_group' ).find("h2:first").hide().html();
375
+ $('.redux-main').find("#info_bar h2#newTitle").remove();
376
+ if (typeof panelTitle !== 'undefined' || panelTitle){
377
+ $('.redux-main').find("#info_bar a.expand_options").after('<h2 id="newTitle" style="float: left;margin: 0px;padding-left: 10px;">'+panelTitle+'</h2>');
378
+ }
379
+
380
+ });
381
+ }
382
+ if($( '.redux-group-tab-link-a' ).length){
383
+ redux_title_modify();
384
+ }
385
+
386
+
387
+ });
388
+
includes/admin-style.css CHANGED
@@ -1,456 +1,459 @@
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
- }
334
- .amp_layout_upcomming .amppb-layout-button .button{
335
- background: #455A64;
336
- color: #fff;
337
- width: 100%;
338
- text-align: center;
339
- padding: 5px 3px;
340
- height: 37px;
341
- border-radius: 0;
342
- color: #fff;
343
- border: 0;
344
- }
345
- #redux_builder_amp-ampforwp_layouts_core {
346
- position: relative
347
- }
348
- #redux_builder_amp-ampforwp_layouts_core .redux_field_th{
349
- text-transform: uppercase;
350
- line-height: 0;
351
- border-bottom: 1px solid #E7E7E7;
352
- margin-bottom: 10px;
353
- }
354
- .amp-layouts-desc{
355
- position: absolute;
356
- font-size: 13px;
357
- top: 22px;
358
- right: 0;
359
- text-transform: none;
360
- }
361
- .ampforwp-new-element .form-table tr{
362
- border-bottom: 0px;
363
- }
364
-
365
- .amppb_ad-layout-layout .amppb_ad-layout-wrapper{
366
- padding: 0px;
367
- background: #F7F7F7;
368
- position: relative;
369
- -webkit-transition: .3s ease-in-out;
370
- transition: .3s ease-in-out;
371
- }
372
- .amppb_ad-layout-library-wrapper .amppb_ad-layout-layout:hover .amppb_ad-layout-title{
373
- color:#000;
374
-
375
- }
376
- .amppb_ad-layout-layout .amppb_ad-layout-wrapper .amppb_ad-layout-screenshot{
377
- background: #ffffff;
378
- }
379
- .amppb_ad-layout-screenshot img{
380
- display: block;
381
- width: 100%;
382
- height: auto;
383
- cursor:pointer;
384
- }
385
- .amppb_ad-layout-bottom{
386
- position: relative;
387
- margin: 10px 0px 0px 0px;
388
- text-align: center
389
- }
390
- .amppb_ad-layout-button .button {
391
- width: 100%;
392
- text-align: center;
393
- padding: 5px 3px;
394
- height: 37px;
395
- border-radius: 0;
396
- background: #455A64;
397
- color: #fff;
398
- border: 0;
399
- }
400
- .amppb_ad-layout-title {
401
- margin: 0;
402
- padding: 10px 0px 10px 0px;
403
- text-align: center;
404
- border-bottom: 1px solid #eee;
405
- font-size: 16px;
406
- background: #fcfcfc;
407
- }
408
- .amppb_ad-layout-button{
409
- z-index: 2;
410
- top: 0;
411
- bottom: 0;
412
- right: 0;
413
- height: 100%;
414
- visibility: visible;
415
- -ms-box-sizing: border-box;
416
- -moz-box-sizing: border-box;
417
- -webkit-box-sizing: border-box;
418
- box-sizing: border-box;
419
- padding: 0;
420
- background: #f6f6f6;
421
- -webkit-box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
422
- -moz-box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
423
- box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
424
- }
425
- .amppb_ad-layout-wrapper:hover{
426
- box-shadow: 0 0px 30px 0px rgba(0, 0, 0, 0.30);
427
- }
428
- .amppb_ad-layout-layout .amppb_ad-layout-button .button:hover{
429
- background: #455A64;
430
- color:#fff;
431
- }
432
- .amppb_ad-layout-layout {
433
- -ms-box-sizing: border-box;
434
- -moz-box-sizing: border-box;
435
- -webkit-box-sizing: border-box;
436
- box-sizing: border-box;
437
- float: left;
438
- padding: 0;
439
- width: 30%;
440
- margin-right: 30px;
441
- }
442
- .layouts_pro_lbl, .amppb_ad-layout_pro a{
443
- position: absolute;
444
- right: -3px;
445
- color: #fff;
446
- text-decoration: none;
447
- text-align: center;
448
- font-size: 12px;
449
- font-weight: normal;
450
- background: #43A047;
451
- border-radius: 40px;
452
- top: 28px;
453
- line-height: 3.3;
454
- height: 40px;
455
- width: 40px;
 
 
 
456
  }
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
+ }
334
+ .amp_layout_upcomming .amppb-layout-button .button{
335
+ background: #455A64;
336
+ color: #fff;
337
+ width: 100%;
338
+ text-align: center;
339
+ padding: 5px 3px;
340
+ height: 37px;
341
+ border-radius: 0;
342
+ color: #fff;
343
+ border: 0;
344
+ }
345
+ #redux_builder_amp-ampforwp_layouts_core {
346
+ position: relative
347
+ }
348
+ #redux_builder_amp-ampforwp_layouts_core .redux_field_th{
349
+ text-transform: uppercase;
350
+ line-height: 0;
351
+ border-bottom: 1px solid #E7E7E7;
352
+ margin-bottom: 10px;
353
+ }
354
+ .amp-layouts-desc{
355
+ position: absolute;
356
+ font-size: 13px;
357
+ top: 22px;
358
+ right: 0;
359
+ text-transform: none;
360
+ }
361
+ .ampforwp-new-element .form-table tr{
362
+ border-bottom: 0px;
363
+ }
364
+
365
+ .amppb_ad-layout-layout .amppb_ad-layout-wrapper{
366
+ padding: 0px;
367
+ background: #F7F7F7;
368
+ position: relative;
369
+ -webkit-transition: .3s ease-in-out;
370
+ transition: .3s ease-in-out;
371
+ }
372
+ .amppb_ad-layout-library-wrapper .amppb_ad-layout-layout:hover .amppb_ad-layout-title{
373
+ color:#000;
374
+
375
+ }
376
+ .amppb_ad-layout-layout .amppb_ad-layout-wrapper .amppb_ad-layout-screenshot{
377
+ background: #ffffff;
378
+ }
379
+ .amppb_ad-layout-screenshot img{
380
+ display: block;
381
+ width: 100%;
382
+ height: auto;
383
+ cursor:pointer;
384
+ }
385
+ .amppb_ad-layout-bottom{
386
+ position: relative;
387
+ margin: 10px 0px 0px 0px;
388
+ text-align: center
389
+ }
390
+ .amppb_ad-layout-button .button {
391
+ width: 100%;
392
+ text-align: center;
393
+ padding: 5px 3px;
394
+ height: 37px;
395
+ border-radius: 0;
396
+ background: #455A64;
397
+ color: #fff;
398
+ border: 0;
399
+ }
400
+ .amppb_ad-layout-title {
401
+ margin: 0;
402
+ padding: 10px 0px 10px 0px;
403
+ text-align: center;
404
+ border-bottom: 1px solid #eee;
405
+ font-size: 16px;
406
+ background: #fcfcfc;
407
+ }
408
+ .amppb_ad-layout-button{
409
+ z-index: 2;
410
+ top: 0;
411
+ bottom: 0;
412
+ right: 0;
413
+ height: 100%;
414
+ visibility: visible;
415
+ -ms-box-sizing: border-box;
416
+ -moz-box-sizing: border-box;
417
+ -webkit-box-sizing: border-box;
418
+ box-sizing: border-box;
419
+ padding: 0;
420
+ background: #f6f6f6;
421
+ -webkit-box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
422
+ -moz-box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
423
+ box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
424
+ }
425
+ .amppb_ad-layout-wrapper:hover{
426
+ box-shadow: 0 0px 30px 0px rgba(0, 0, 0, 0.30);
427
+ }
428
+ .amppb_ad-layout-layout .amppb_ad-layout-button .button:hover{
429
+ background: #455A64;
430
+ color:#fff;
431
+ }
432
+ .amppb_ad-layout-layout {
433
+ -ms-box-sizing: border-box;
434
+ -moz-box-sizing: border-box;
435
+ -webkit-box-sizing: border-box;
436
+ box-sizing: border-box;
437
+ float: left;
438
+ padding: 0;
439
+ width: 30%;
440
+ margin-right: 30px;
441
+ }
442
+ .layouts_pro_lbl, .amppb_ad-layout_pro a{
443
+ position: absolute;
444
+ right: -3px;
445
+ color: #fff;
446
+ text-decoration: none;
447
+ text-align: center;
448
+ font-size: 12px;
449
+ font-weight: normal;
450
+ background: #43A047;
451
+ border-radius: 40px;
452
+ top: 28px;
453
+ line-height: 3.3;
454
+ height: 40px;
455
+ width: 40px;
456
+ }
457
+ .extension-menu-call .dashicons-admin-generic:before{
458
+ font-size: 18px;
459
  }
includes/disqus.html 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,4647 +1,5237 @@
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/ads-for-wp/#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'=>'https://accounts.ampforwp.com',
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>
308
- <p>See all the extensions available for AMP</p>
309
- <div class="extension_btn">View All</div> </div>
310
- </a></li>
311
-
312
-
313
- </ul>
314
- </div>
315
- ';
316
-
317
-
318
- $single_extension_listing = '
319
- <div class="extension_listing single_ex_listing">
320
- <h3>Increase the Revenue, Leads and Conversation with these Handpicked extensions</h3>
321
- <ul>
322
- <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">
323
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/click.png" /></div>
324
- <div class="extension_desc">
325
- <h2>Advanced AMP ADS</h2>
326
- <p>Add Advertisement directly in the content</p>
327
- <div class="extension_btn">View Details</div>
328
- </div>
329
- </a></li>
330
- <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">
331
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/email.png" /></div>
332
- <div class="extension_desc">
333
- <h2>Email Opt-in Forms</h2>
334
- <p>Capture Leads with Email Subscription.</p>
335
- <div class="extension_btn">View Details</div>
336
- </div>
337
- </a></li>
338
- <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">
339
- <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/mac-click.png" /></div>
340
- <div class="extension_desc">
341
- <h2>Call To Action (CTA)</h2>
342
- <p>Higher Visibility & More Conversions</p>
343
- <div class="extension_btn">View Details</div>
344
- </div>
345
- </a></li>
346
- </ul>
347
- </div>
348
- ';
349
-
350
- $upcomingLayoutsDesign = '';
351
- $layouts = ampforwp_upcomming_layouts_demo();
352
- if(is_array($layouts)){
353
- foreach($layouts as $k=>$val){
354
- $upcomingLayoutsDesign .= '<div class="amp_layout_upcomming">
355
- <div class="amppb_ad-layout-layout">
356
- <div class="amppb_ad-layout-wrapper">
357
- <div class="amppb_ad-layout_pro"><a href="https://ampforwp.com/amp-layouts/" target="_blank">PRO</a></div>
358
- <h4 class="amppb_ad-layout-title">'.$val['name'].'</h4>
359
- <div class="amppb_ad-layout-screenshot"> <img src="'.$val['image'].'" onclick="window.open(\''.$val['link'].'\')"> </div>
360
- <div class="amppb_ad-layout-button">
361
- <a target="_blank" href="'.$val['link'].'" class="button">View Theme</a>
362
- </div>
363
- </div>
364
- </div>
365
- </div>';
366
- }
367
- }
368
-
369
- // All the possible arguments for Redux.
370
- //$amp_redux_header = '<span id="name"><span style="color: #4dbefa;">U</span>ltimate <span style="color: #4dbefa;">W</span>idgets</span>';
371
-
372
- $args = array(
373
- // TYPICAL -> Change these values as you need/desire
374
- 'opt_name' => 'redux_builder_amp', // This is where your data is stored in the database and also becomes your global variable name.
375
- 'display_name' => __( 'AMPforWP Options','accelerated-mobile-pages' ), // Name that appears at the top of your panel
376
- 'menu_type' => 'menu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
377
- 'allow_sub_menu' => true, // Show the sections below the admin menu item or not
378
- 'menu_title' => __( 'AMP', 'accelerated-mobile-pages' ),
379
- 'page_title' => __('Accelerated Mobile Pages Options','accelerated-mobile-pages'),
380
- 'display_version' => AMPFORWP_VERSION,
381
- 'update_notice' => false,
382
- '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> ',
383
- 'global_variable' => '', // Set a different name for your global variable other than the opt_name
384
- 'dev_mode' => false, // Show the time the page took to load, etc
385
- 'customizer' => false, // Enable basic customizer support,
386
- 'async_typography' => false, // Enable async for fonts,
387
- 'disable_save_warn' => true,
388
- 'open_expanded' => false,
389
- // OPTIONAL -> Give you extra features
390
- 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
391
- 'page_parent' => 'themes.php', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
392
- 'page_permissions' => 'manage_options', // Permissions needed to access the options panel.
393
- 'last_tab' => '', // Force your panel to always open to a specific tab (by id)
394
- 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title
395
- 'page_slug' => 'amp_options', // Page slug used to denote the panel
396
- 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not
397
- 'default_show' => false, // If true, shows the default value next to each field that is not the default value.
398
- 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: *
399
- 'admin_bar' => false,
400
- 'admin_bar_icon' => 'dashicons-admin-generic',
401
- // CAREFUL -> These options are for advanced use only
402
- 'output' => false, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output
403
- 'output_tag' => false, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head
404
- //'domain' => 'redux-framework', // Translation domain key. Don't change this unless you want to retranslate all of Redux.
405
- 'footer_credit' => false, // Disable the footer credit of Redux. Please leave if you can help it.
406
- 'footer_text' => "",
407
- 'show_import_export' => true,
408
- 'system_info' => true,
409
-
410
- );
411
-
412
- $args['share_icons'][] = array(
413
- 'url' => 'https://github.com/ahmedkaludi/Accelerated-Mobile-Pages',
414
- 'title' => __('Visit us on GitHub','accelerated-mobile-pages'),
415
- 'icon' => 'el el-github'
416
- //'img' => '', // You can use icon OR img. IMG needs to be a full URL.
417
- );
418
-
419
-
420
- Redux::setArgs( "redux_builder_amp", $args );
421
-
422
-
423
-
424
-
425
- $tabs = array(
426
- array(
427
- 'id' => 'redux-help-tab-1',
428
- 'title' => __( 'Theme Information 1', 'accelerated-mobile-pages' ),
429
- 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'accelerated-mobile-pages' )
430
- ),
431
- array(
432
- 'id' => 'redux-help-tab-2',
433
- 'title' => __( 'Theme Information 2', 'accelerated-mobile-pages' ),
434
- 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'accelerated-mobile-pages' )
435
- )
436
- );
437
- Redux::setHelpTab( $opt_name, $tabs );
438
-
439
- // Set the help sidebar
440
- $content = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'admin_folder' );
441
- Redux::setHelpSidebar( $opt_name, $content );
442
-
443
-
444
- /*
445
- * <--- END HELP TABS
446
- */
447
-
448
- /*
449
- *
450
- * ---> START SECTIONS
451
- *
452
- */
453
-
454
- Redux::setSection( $opt_name, array(
455
- 'title' => __( 'Basic Field', 'accelerated-mobile-pages' ),
456
- 'id' => 'basic',
457
- 'desc' => __( 'Basic field with no subsections.', 'accelerated-mobile-pages' ),
458
- 'icon' => 'el el-home',
459
- 'fields' => array(
460
- array(
461
- 'id' => 'opt-blank',
462
- 'title' => __( 'Example Text', 'accelerated-mobile-pages' ),
463
- 'desc' => __( 'Example description.', 'accelerated-mobile-pages' ),
464
- 'subtitle' => __( 'Example subtitle.', 'accelerated-mobile-pages' ),
465
- )
466
- )
467
- ) );
468
-
469
- Redux::setSection( $opt_name, array(
470
- 'title' => __( 'Settings', 'accelerated-mobile-pages' ),
471
- 'id' => 'basic',
472
- 'desc' => __( '<div class="amp-faq">Thank you for using Accelerated Mobile Pages plugin. '. ' ' .
473
-
474
- sprintf( __( ' <h2 style="width: 150px;float: right;
475
- padding: 8px 11px;background: #4CAF50;
476
- font-size: 13px;margin: -24px 0 0 10px;
477
- 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' )
478
- . '<div style="width:100%;margin:20px 0px 10px 0px" class="getstarted_wrapper">
479
- <div class="getstarted_options">
480
- <p><b>Getting Started</b></p>
481
- <ul class="getstarted_ul">
482
- <li><a href="https://ampforwp.com/tutorials/article-categories/installation-updating/" target="_blank">Installation & Setup</a></li>
483
- <li><a href="https://ampforwp.com/tutorials/article-categories/settings-options/" target="_blank">Settings & Options</a></li>
484
- <li><a href="https://ampforwp.com/tutorials/article-categories/setup-amp/" target="_blank">Setup AMP</a></li>
485
- <li><a href="https://ampforwp.com/tutorials/article-categories/page-builder/" target="_blank">Page Builder</a></li>
486
- </ul>
487
- </div>
488
- <div class="getstarted_options">
489
- <p><b>Useful Links</b></p>
490
- <ul class="getstarted_ul">
491
- <li><a href="https://ampforwp.com/tutorials/article-categories/extension/" target="_blank">Extensions & Themes Docs</a></li>
492
- <li><a href="https://ampforwp.com/tutorials/article-categories/extending/" target="_blank">Developers Docs</a></li>
493
- <li><a href="https://ampforwp.com/amp-theme-framework/" target="_blank">Create a Custom Theme for AMP</a></li>
494
- <li><a href="https://ampforwp.com/tutorials/article-categories/how-to/" target="_blank">General How To\'s</a></li>
495
- </ul>
496
- </div>
497
- <div class="clear"></div>
498
- </div>'
499
- . '<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>'
500
- . '<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>'
501
- . '<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>'
502
- . '<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>'
503
-
504
- . '</p></div>
505
- <br /><p><h3>Take AMP to the Next Level with Premium Extensions</h3></p>
506
- ' .$gettingstarted_extension_listing
507
-
508
- , 'accelerated-mobile-pages' ),
509
- 'icon' => 'el el-cogs'
510
- ) );
511
-
512
- function ampforwp_default_logo_settings($param=""){
513
- $custom_logo_id = '';
514
- $image = '';
515
- $value = '';
516
- $custom_logo_id = get_theme_mod( 'custom_logo' );
517
- $image = wp_get_attachment_image_src( $custom_logo_id , 'full');
518
- if( $image ){
519
- return $image[0];
520
- }
521
- return $value;
522
- }
523
- function ampforwp_custom_logo_dimensions_options(){
524
- $selectedOption = get_option('redux_builder_amp',true);
525
- $opCheck = $selectedOption['ampforwp-custom-logo-dimensions'];
526
- if($opCheck==1){
527
- return 'prescribed';
528
- }else{
529
- return 'flexible';
530
- }
531
- }
532
- function ampforwp_get_cpt_generated_post_types() {
533
- $options = '';
534
- $options = get_option('ampforwp_cpt_generated_post_types');
535
- return $options;
536
- }
537
- $amp_cpt_option = array();
538
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
539
- $ampforwp_cpt_plugin_check = is_plugin_active( 'amp-custom-post-type/amp-custom-post-type.php' );
540
- if ( false == $ampforwp_cpt_plugin_check ) {
541
- $amp_cpt_option = array(
542
- 'id' => 'ampforwp-custom-type',
543
- 'type' => 'select',
544
- 'title' => __('Custom Post Types', 'accelerated-mobile-pages'),
545
- 'subtitle' => __('Enable AMP Support on Custom Post Types', 'accelerated-mobile-pages'),
546
- 'multi' => true,
547
- //'data' => 'post_type',
548
- 'options' => ampforwp_get_cpt_generated_post_types(),
549
- );
550
- }
551
- Redux::setSection( $opt_name, array(
552
- 'title' => __( 'General', 'accelerated-mobile-pages' ),
553
- // '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>',
554
- 'id' => 'opt-text-subsection',
555
- 'subsection' => true,
556
- 'fields' => array(
557
-
558
- array(
559
- 'id' => 'opt-media',
560
- 'type' => 'media',
561
- 'url' => true,
562
- 'title' => __('Logo', 'accelerated-mobile-pages'),
563
- 'subtitle' => __('Upload a logo for the AMP version.', 'accelerated-mobile-pages'),
564
- 'desc' => __('Recommend logo size is: 190x36', 'accelerated-mobile-pages'),
565
- 'default' => array('url' => ampforwp_default_logo_settings() ),
566
- ),
567
- array(
568
- 'id' => 'ampforwp-custom-logo-dimensions',
569
- 'title' => __('Custom Logo Re-Size', 'accelerated-mobile-pages'),
570
- 'type' => 'switch',
571
- 'default' => 0,
572
- ),
573
- array(
574
- 'id' => 'ampforwp-custom-logo-dimensions-options',
575
- 'title' => __('Resize Method', 'accelerated-mobile-pages'),
576
- 'type' => 'select',
577
- 'default' => '100',
578
- 'options' => array(
579
- 'flexible' => 'Flexible Width',
580
- 'prescribed' => 'Fixed Width'
581
- ),
582
- 'default' => ampforwp_custom_logo_dimensions_options(),
583
- 'required'=>array('ampforwp-custom-logo-dimensions','=','1'),
584
- ),
585
- array(
586
- 'id' => 'ampforwp-custom-logo-dimensions-slider',
587
- 'title' => __('Resize Your Logo', 'accelerated-mobile-pages'),
588
- 'type' => 'amp_slider',
589
- 'default' => '100',
590
- 'min' => 0,
591
- 'max' => 100,
592
- 'subtitle' => '',
593
- 'required'=>array('ampforwp-custom-logo-dimensions-options','=','flexible'),
594
- ),
595
- array(
596
- 'id' => 'opt-media-width',
597
- 'type' => 'text',
598
- 'title' => __('Logo Width', 'accelerated-mobile-pages'),
599
- 'desc' => __('Default width is 190 pixels', 'accelerated-mobile-pages'),
600
- 'default' => '190',
601
- 'required'=>array('ampforwp-custom-logo-dimensions-options','=','prescribed'),
602
- ),
603
- array(
604
- 'id' => 'opt-media-height',
605
- 'type' => 'text',
606
- 'title' => __('Logo Height', 'accelerated-mobile-pages'),
607
- 'desc' => __('Default height is 36 pixels', 'accelerated-mobile-pages'),
608
- 'default' => '36',
609
- 'required'=>array('ampforwp-custom-logo-dimensions-options','=','prescribed'),
610
-
611
- ),
612
- array(
613
- 'id' => 'amp-support',
614
- 'type' => 'section',
615
- 'title' => __('AMP Support', 'accelerated-mobile-pages'),
616
- 'indent' => true,
617
- ),
618
- array(
619
- 'id' =>'amp-on-off-for-all-posts',
620
- 'type' => 'switch',
621
- 'title' => __('Posts', 'accelerated-mobile-pages'),
622
- 'subtitle' => __('Enable AMP Support on Posts', 'accelerated-mobile-pages'),
623
- 'default' => 1,
624
- // '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' ),
625
- ),
626
- array(
627
- 'id' =>'amp-on-off-for-all-pages',
628
- 'type' => 'switch',
629
- 'title' => __('Pages', 'accelerated-mobile-pages'),
630
- 'subtitle' => __('Enable AMP Support on Pages.', 'accelerated-mobile-pages'),
631
- 'default' => 1,
632
- // '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' ),
633
- ),
634
- array(
635
- 'id' => 'ampforwp-homepage-on-off-support',
636
- 'type' => 'switch',
637
- 'title' => __('Homepage', 'accelerated-mobile-pages'),
638
- 'subtitle' => __('Enable AMP Support on Homepage.', 'accelerated-mobile-pages'),
639
- 'default' => '1'
640
- ),
641
- array(
642
- 'id' =>'amp-frontpage-select-option',
643
- 'type' => 'switch',
644
- 'title' => __('Custom Front Page', 'accelerated-mobile-pages'),
645
- 'default' => 0,
646
- 'subtitle' => __('Set Custom Front Page as Homepage', 'accelerated-mobile-pages'),
647
- 'true' => 'true',
648
- 'false' => 'false',
649
- 'required' => array('ampforwp-homepage-on-off-support','=','1'),
650
- // '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' ),
651
- ),
652
- array(
653
- 'id' => 'amp-frontpage-select-option-pages',
654
- 'type' => 'select',
655
- 'title' => __('Select Page as Front Page', 'accelerated-mobile-pages'),
656
- 'required' => array('amp-frontpage-select-option', '=' , '1'),
657
- // Must provide key => value pairs for select options
658
- 'data' => 'page',
659
- 'args' => array(
660
- 'post_type' => 'page',
661
- 'posts_per_page' => 500
662
- ),
663
- 'default' => '2',
664
- ),
665
- array(
666
- 'id' => 'ampforwp-title-on-front-page',
667
- 'type' => 'switch',
668
- 'url' => true,
669
- 'title' => __('Title on Static Front Page', 'accelerated-mobile-pages'),
670
- 'subtitle' => __('Enable/Disable display of title on the Static Front Page.', 'accelerated-mobile-pages'),
671
- 'default' => 0,
672
- 'required' => array('amp-frontpage-select-option', '=' , '1'),
673
- ),
674
- array(
675
- 'id' => 'ampforwp-archive-support',
676
- 'type' => 'switch',
677
- 'title' => __('Archives [Category & Tags]', 'accelerated-mobile-pages'),
678
- 'subtitle' => __('Enable AMP Support on Archives.', 'accelerated-mobile-pages'),
679
- 'default' => '0'
680
- ),
681
- $amp_cpt_option,
682
- array(
683
- 'id' => 'ampforwp-amp-convert-to-wp',
684
- 'type' => 'switch',
685
- 'title' => __('Convert AMP to WP theme', 'accelerated-mobile-pages'),
686
- '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'),
687
- 'default' => '0',
688
- 'required' => array('amp-design-selector', '=' , '4'),
689
- ),
690
- array(
691
- 'id' => 'ampforwp-amp-takeover',
692
- 'type' => 'switch',
693
- 'title' => __('AMP Takeover', 'accelerated-mobile-pages'),
694
- 'subtitle' => __('Make your non-amp to load the AMP (AMP & NON-AMP both will be AMP with same design)', 'accelerated-mobile-pages'),
695
- 'default' => '0'
696
- ),
697
-
698
- // array(
699
- // 'id' => 'amp-ad-places',
700
- // 'type' => 'select',
701
- // 'title' => __( 'Ads on Page', 'accelerated-mobile-pages' ),
702
- // 'subtitle' => __( 'select your preferece for Ads on Post Types', 'accelerated-mobile-pages' ),
703
- // 'options' => array(
704
- // '1' => __('Only on Posts', 'accelerated-mobile-pages' ),
705
- // '2' => __('Only on Pages', 'accelerated-mobile-pages' ),
706
- // '3' => __('on Both', 'accelerated-mobile-pages' ),
707
- // ),
708
- // 'default' => '3'
709
- // ),
710
-
711
- )
712
- ) );//END
713
-
714
- // AMP Content Page Builder SECTION
715
- Redux::setSection( $opt_name, array(
716
- 'title' => __( 'Page Builder', 'accelerated-mobile-pages' ),
717
- 'class' =>'',
718
- 'id' => 'amp-content-builder',
719
- 'class' => 'amp_content_builder ampforwp-new-element',
720
- 'subsection' => true,
721
- 'fields' => array(
722
-
723
- array(
724
- 'id' => 'ampforwp-content-builder',
725
- 'type' => 'switch',
726
- 'title' => __('Legacy Page Builder (widgets)', 'accelerated-mobile-pages'),
727
- 'subtitle' => __('Build AMP Landing pages in minutes.', 'accelerated-mobile-pages'),
728
- 'true' => 'true',
729
- 'class' =>(is_plugin_active('amp-newspaper-theme/ampforwp-custom-theme.php')? '': 'hide'),//,
730
- 'desc' => '<div style=" background: #FFF9C4;
731
- display: none;
732
- padding: 10px 20px;
733
- margin-top: 15px;
734
- left: 0;
735
- line-height: 1.6;
736
- position: absolute;
737
- left: 20px;
738
- 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>
739
-
740
- <iframe class="hide" style=" position: absolute;
741
- left: 20px;
742
- margin-top: 100px;" width="600" height="400" src="https://www.youtube.com/embed/vAGPFKKm5G4" frameborder="0" allowfullscreen></iframe>
743
-
744
- ',
745
- 'false' => 'false',
746
- 'default' => 0
747
- ),
748
- array(
749
- 'id' => 'ampforwp-page-builder-info',
750
- 'type' => 'raw',
751
- 'desc' => '<div style="background: #FFF9C4;
752
- display: inline-block;
753
- padding: 10px 20px;
754
- margin-top: 0px;
755
- left: 0;
756
- line-height: 1.6;
757
- position: absolute;
758
- left: 0px;
759
- top: 65%;
760
- 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>
761
-
762
- <iframe style="position: absolute;left: 0px;margin-top: 67px;" width="600" height="400" src="https://www.youtube.com/embed/QTbkn2rHyqM" frameborder="0" allowfullscreen></iframe>
763
-
764
- ',
765
- ),
766
- )
767
- )
768
-
769
- ) ;
770
-
771
- $AD_URL = "http://ampforwp.com/advanced-amp-ads/#utm_source=options-panel&utm_medium=advertisement-tab&utm_campaign=AMP%20Plugin";
772
- $desc = '';
773
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
774
- if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
775
-
776
- $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>';
777
- }
778
-
779
- // ADS SECTION
780
- Redux::setSection( $opt_name, array(
781
- 'title' => __( 'Advertisement', 'accelerated-mobile-pages' ),
782
- 'desc' => $desc,
783
- 'id' => 'amp-ads',
784
- 'subsection' => true,
785
- 'fields' => array(
786
- // Ad 1 Starts
787
- array(
788
- 'id' =>'ampforwp-ads-data-loading-strategy',
789
- 'type' => 'switch',
790
- 'title' => __('Optimize For Viewability', 'accelerated-mobile-pages'),
791
- 'default' => 0,
792
- 'subtitle' => __('This will increase the loading speed of the Ads', 'accelerated-mobile-pages'),
793
- 'true' => 'Enabled',
794
- 'false' => 'Disabled',
795
- ),
796
- array(
797
- 'id' =>'ampforwp-ads-sponsorship',
798
- 'type' => 'switch',
799
- 'title' => __('Sponsorship Label', 'accelerated-mobile-pages'),
800
- 'default' => 0,
801
- 'true' => 'Enabled',
802
- 'false' => 'Disabled',
803
- ),
804
- array(
805
- 'id' =>'ampforwp-ads-sponsorship-label',
806
- 'type' => 'text',
807
- 'required' => array('ampforwp-ads-sponsorship', '=' , '1'),
808
- 'title' => __('Sponsorship Label Text', 'accelerated-mobile-pages'),
809
- 'default' => '',
810
- 'placeholder'=> 'Sponsored'
811
- ),
812
- array(
813
- 'id' =>'enable-amp-ads-1',
814
- 'type' => 'switch',
815
- 'title' => __('AD #1', 'accelerated-mobile-pages'),
816
- 'default' => 0,
817
- 'subtitle' => __('Below the Header (SiteWide)', 'accelerated-mobile-pages'),
818
- 'true' => 'Enabled',
819
- 'false' => 'Disabled',
820
- ),
821
- array(
822
- 'id' => 'enable-amp-ads-select-1',
823
- 'type' => 'select',
824
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
825
- 'required' => array('enable-amp-ads-1', '=' , '1'),
826
- // Must provide key => value pairs for select options
827
- 'options' => array(
828
- '1' => __('300x250','accelerated-mobile-pages'),
829
- '2' => __('336x280','accelerated-mobile-pages'),
830
- '3' => __('728x90','accelerated-mobile-pages'),
831
- '4' => __('300x600','accelerated-mobile-pages'),
832
- '5' => __('320x100','accelerated-mobile-pages'),
833
- '6' => __('200x50','accelerated-mobile-pages'),
834
- '7' => __('320x50','accelerated-mobile-pages'), ),
835
- 'default' => '2',
836
- ),
837
- array(
838
- 'id' =>'enable-amp-ads-text-feild-client-1',
839
- 'type' => 'text',
840
- 'required' => array('enable-amp-ads-1', '=' , '1'),
841
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
842
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
843
- 'default' => '',
844
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
845
- ),
846
- array(
847
- 'id' => 'enable-amp-ads-text-feild-slot-1',
848
- 'type' => 'text',
849
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
850
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
851
- 'default' => '',
852
- 'required' => array('enable-amp-ads-1', '=' , '1'),
853
- 'placeholder'=> '70XXXXXX12'
854
- ),
855
- // Ad 1 ends
856
-
857
- // Ad 2 Starts
858
- array(
859
- 'id'=>'enable-amp-ads-2',
860
- 'type' => 'switch',
861
- 'title' => __('AD #2', 'accelerated-mobile-pages'),
862
- 'default' => 0,
863
- 'subtitle' => __('Below the Footer (SiteWide)', 'accelerated-mobile-pages'),
864
- 'true' => 'Enabled',
865
- 'false' => 'Disabled',
866
- ),
867
- array(
868
- 'id' => 'enable-amp-ads-select-2',
869
- 'type' => 'select',
870
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
871
- 'required' => array('enable-amp-ads-2', '=' , '1'),
872
- // Must provide key => value pairs for select options
873
- 'options' => array(
874
- '1' => '300x250',
875
- '2' => '336x280',
876
- '3' => '728x90',
877
- '4' => '300x600',
878
- '5' => '320x100',
879
- '6' => '200x50',
880
- '7' => '320x50'
881
- ),
882
- 'default' => '2',
883
- ),
884
- array(
885
- 'id' =>'enable-amp-ads-text-feild-client-2',
886
- 'type' => 'text',
887
- 'required' => array('enable-amp-ads-2', '=' , '1'),
888
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
889
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
890
- 'default' => '',
891
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
892
- ),
893
- array(
894
- 'id' => 'enable-amp-ads-text-feild-slot-2',
895
- 'type' => 'text',
896
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
897
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
898
- 'default' => '',
899
- 'required' => array('enable-amp-ads-2', '=' , '1'),
900
- 'placeholder'=> '70XXXXXX12'
901
- ),
902
- // Ad 2 ends
903
-
904
- // Ad 3 starts
905
- array(
906
- 'id' => 'enable-amp-ads-3',
907
- 'type' => 'switch',
908
- 'title' => __('AD #3', 'accelerated-mobile-pages'),
909
- 'default' => 0,
910
- 'subtitle' => __('Above the Post Content (Single Post)', 'accelerated-mobile-pages'),
911
- 'true' => 'Enabled',
912
- 'false' => 'Disabled',
913
- ),
914
- array(
915
- 'id' => 'enable-amp-ads-select-3',
916
- 'type' => 'select',
917
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
918
- 'required' => array('enable-amp-ads-3', '=' , '1'),
919
- // Must provide key => value pairs for select options
920
- 'options' => array(
921
- '1' => '300x250',
922
- '2' => '336x280',
923
- '3' => '728x90',
924
- '4' => '300x600',
925
- '5' => '320x100',
926
- '6' => '200x50',
927
- '7' => '320x50'
928
- ),
929
- 'default' => '2',
930
- ),
931
- array(
932
- 'id' =>'enable-amp-ads-text-feild-client-3',
933
- 'type' => 'text',
934
- 'required' => array('enable-amp-ads-3', '=' , '1'),
935
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
936
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
937
- 'default' => '',
938
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
939
- ),
940
- array(
941
- 'id' => 'enable-amp-ads-text-feild-slot-3',
942
- 'type' => 'text',
943
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
944
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code.', 'accelerated-mobile-pages'),
945
- 'default' => '',
946
- 'required' => array('enable-amp-ads-3', '=' , '1'),
947
- 'placeholder'=> '70XXXXXX12'
948
- ),
949
- // Ad 3 ends
950
-
951
- // Ad 4 Starts
952
- array(
953
- 'id' => 'enable-amp-ads-4',
954
- 'type' => 'switch',
955
- 'title' => __('AD #4', 'accelerated-mobile-pages'),
956
- 'default' => 0,
957
- 'subtitle' => __('Below the Post Content (Single Post)', 'accelerated-mobile-pages'),
958
- 'true' => 'Enabled',
959
- 'false' => 'Disabled',
960
- ),
961
- array(
962
- 'id' => 'enable-amp-ads-select-4',
963
- 'type' => 'select',
964
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
965
- 'required' => array('enable-amp-ads-4', '=' , '1'),
966
- // Must provide key => value pairs for select options
967
- 'options' => array(
968
- '1' => __('300x250','accelerated-mobile-pages'),
969
- '2' => __('336x280','accelerated-mobile-pages'),
970
- '3' => __('728x90','accelerated-mobile-pages'),
971
- '4' => __('300x600','accelerated-mobile-pages'),
972
- '5' => __('320x100','accelerated-mobile-pages'),
973
- '6' => __('200x50','accelerated-mobile-pages'),
974
- '7' => __('320x50','accelerated-mobile-pages')
975
- ),
976
- 'default' => '2',
977
- ),
978
- array(
979
- 'id' =>'enable-amp-ads-text-feild-client-4',
980
- 'type' => 'text',
981
- 'required' => array('enable-amp-ads-4', '=' , '1'),
982
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
983
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
984
- 'default' => '',
985
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
986
- ),
987
- array(
988
- 'id' => 'enable-amp-ads-text-feild-slot-4',
989
- 'type' => 'text',
990
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
991
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
992
- 'default' => '',
993
- 'required' => array('enable-amp-ads-4', '=' , '1'),
994
- 'placeholder'=> '70XXXXXX12'
995
- ),
996
- // Ad 4 ends
997
-
998
- //Ad 5 Starts
999
- array(
1000
- 'id' => 'enable-amp-ads-5',
1001
- 'type' => 'switch',
1002
- 'title' => __('AD #5', 'accelerated-mobile-pages'),
1003
- 'default' => 0,
1004
- 'subtitle' => __('Below The Title (Single Post)', 'accelerated-mobile-pages'),
1005
- 'true' => 'Enabled',
1006
- 'false' => 'Disabled',
1007
- ),
1008
- array(
1009
- 'id' => 'enable-amp-ads-select-5',
1010
- 'type' => 'select',
1011
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
1012
- 'required' => array('enable-amp-ads-5', '=' , '1'),
1013
- // Must provide key => value pairs for select options
1014
- 'options' => array(
1015
- '1' => __('300x250','accelerated-mobile-pages'),
1016
- '2' => __('336x280','accelerated-mobile-pages'),
1017
- '3' => __('728x90','accelerated-mobile-pages'),
1018
- '4' => __('300x600','accelerated-mobile-pages'),
1019
- '5' => __('320x100','accelerated-mobile-pages'),
1020
- '6' => __('200x50','accelerated-mobile-pages'),
1021
- '7' => __('320x50','accelerated-mobile-pages')
1022
- ),
1023
- 'default' => '2',
1024
- ),
1025
- array(
1026
- 'id' =>'enable-amp-ads-text-feild-client-5',
1027
- 'type' => 'text',
1028
- 'required' => array('enable-amp-ads-5', '=' , '1'),
1029
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
1030
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
1031
- 'default' => '',
1032
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
1033
- ),
1034
- array(
1035
- 'id' => 'enable-amp-ads-text-feild-slot-5',
1036
- 'type' => 'text',
1037
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
1038
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
1039
- 'default' => '',
1040
- 'required' => array('enable-amp-ads-5', '=' , '1'),
1041
- 'placeholder'=> '70XXXXXX12'
1042
- ),
1043
-
1044
- //Ad 6 Starts
1045
- array(
1046
- 'id' => 'enable-amp-ads-6',
1047
- 'type' => 'switch',
1048
- 'title' => __('AD #6', 'accelerated-mobile-pages'),
1049
- 'default' => 0,
1050
- 'subtitle' => __('Above the Related Posts (Single Post)', 'accelerated-mobile-pages'),
1051
- 'true' => 'Enabled',
1052
- 'false' => 'Disabled',
1053
- ),
1054
- array(
1055
- 'id' => 'enable-amp-ads-select-6',
1056
- 'type' => 'select',
1057
- 'title' => __('AD Size', 'accelerated-mobile-pages'),
1058
- 'required' => array('enable-amp-ads-6', '=' , '1'),
1059
- // Must provide key => value pairs for select options
1060
- 'options' => array(
1061
- '1' => __('300x250','accelerated-mobile-pages'),
1062
- '2' => __('336x280','accelerated-mobile-pages'),
1063
- '3' => __('728x90','accelerated-mobile-pages'),
1064
- '4' => __('300x600','accelerated-mobile-pages'),
1065
- '5' => __('320x100','accelerated-mobile-pages'),
1066
- '6' => __('200x50','accelerated-mobile-pages'),
1067
- '7' => __('320x50','accelerated-mobile-pages')
1068
- ),
1069
- 'default' => '2',
1070
- ),
1071
- array(
1072
- 'id' =>'enable-amp-ads-text-feild-client-6',
1073
- 'type' => 'text',
1074
- 'required' => array('enable-amp-ads-6', '=' , '1'),
1075
- 'title' => __('Data AD Client', 'accelerated-mobile-pages'),
1076
- 'subtitle' => __('Enter the Data Ad Client (data-ad-client) from the adsense ad code.', 'accelerated-mobile-pages'),
1077
- 'default' => '',
1078
- 'placeholder'=> 'ca-pub-2005XXXXXXXXX342'
1079
- ),
1080
- array(
1081
- 'id' => 'enable-amp-ads-text-feild-slot-6',
1082
- 'type' => 'text',
1083
- 'title' => __('Data AD Slot', 'accelerated-mobile-pages'),
1084
- 'subtitle' => __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. ', 'accelerated-mobile-pages'),
1085
- 'default' => '',
1086
- 'required' => array('enable-amp-ads-6', '=' , '1'),
1087
- 'placeholder'=> '70XXXXXX12'
1088
- )
1089
-
1090
-
1091
- ),
1092
- ) );
1093
-
1094
- if ( ! function_exists('ampforwp_seo_default') ) {
1095
- function ampforwp_seo_default() {
1096
- $default = '';
1097
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1098
- if ( is_plugin_active('wordpress-seo/wp-seo.php') ) {
1099
- $default = 1;
1100
- }
1101
- elseif ( is_plugin_active('all-in-one-seo-pack/all_in_one_seo_pack.php') ) {
1102
- $default = 2;
1103
- }
1104
- return $default;
1105
- }
1106
- }
1107
- // SEO SECTION
1108
- Redux::setSection( $opt_name, array(
1109
- 'title' => __( 'SEO', 'accelerated-mobile-pages' ),
1110
- 'id' => 'amp-seo',
1111
- 'subsection' => true,
1112
- 'fields' => array(
1113
- array(
1114
- 'id' => 'ampforwp-seo-general-section',
1115
- 'type' => 'section',
1116
- 'title' => __('General', 'accelerated-mobile-pages'),
1117
- 'indent' => true,
1118
- ),
1119
- array(
1120
- 'id' => 'ampforwp-seo-meta-description',
1121
- 'type' => 'switch',
1122
- 'title' => __('Meta Description', 'accelerated-mobile-pages'),
1123
- 'subtitle' => __('The meta tag that displays in head', 'accelerated-mobile-pages'),
1124
- 'default' => 0
1125
- ),
1126
-
1127
- array(
1128
- 'id' => 'ampforwp-seo-custom-additional-meta',
1129
- 'type' => 'textarea',
1130
- 'title' => __('Additional tags for Head section AMP page', 'accelerated-mobile-pages'),
1131
- 'subtitle' => __('Adds additional Meta to the head section', 'accelerated-mobile-pages', 'accelerated-mobile-pages'),
1132
- 'desc' => __('Only link and meta tags allowed', 'accelerated-mobile-pages'),
1133
- 'placeholder' => __('<!-- Paste your Additional HTML , that goes between <head> </head> tags -->','accelerated-mobile-pages')
1134
- ),
1135
- array(
1136
- 'id' => 'ampforwp-seo-plugins-section',
1137
- 'type' => 'section',
1138
- 'title' => __('SEO Plugin Integration', 'accelerated-mobile-pages'),
1139
- 'indent' => true,
1140
- ),
1141
- array(
1142
- 'id' => 'ampforwp-seo-selection',
1143
- 'type' => 'select',
1144
- 'title' => __('Select SEO Plugin', 'accelerated-mobile-pages'),
1145
- 'options' => array(
1146
- '1' => 'Yoast',
1147
- '2' => 'All in One SEO'
1148
- ),
1149
- 'default' => ampforwp_seo_default(),
1150
- ),
1151
- array(
1152
- 'id' => 'ampforwp-seo-yoast-meta',
1153
- 'type' => 'switch',
1154
- 'subtitle' => __('Adds Social and Open Graph Meta Tags from Yoast', 'accelerated-mobile-pages'),
1155
- 'title' => __( 'Meta Tags from Yoast', 'accelerated-mobile-pages' ),
1156
- 'default' => '1',
1157
- 'required' => array('ampforwp-seo-selection', '=' , '1'),
1158
- ),
1159
- array(
1160
- 'id' => 'ampforwp-seo-yoast-description',
1161
- 'type' => 'switch',
1162
- 'subtitle' => __('Adds Yoast Custom description to ld+json for AMP page', 'accelerated-mobile-pages'),
1163
- 'title' => __( 'Yoast Description in ld+json', 'accelerated-mobile-pages' ),
1164
- 'default' => 0,
1165
- 'required' => array('ampforwp-seo-selection', '=' , '1'),
1166
- ),
1167
- array(
1168
- 'id' => 'ampforwp-seo-aioseo',
1169
- 'type' => 'info',
1170
- 'style' => 'success',
1171
- 'desc' => __("All in One SEO works out of the Box with our plugin. It deosn't requires any extra config.", 'accelerated-mobile-pages'),
1172
- 'required' => array('ampforwp-seo-selection', '=', '2')
1173
- ),
1174
- array(
1175
- 'id' => 'ampforwp-seo-index-noindex-sub-section',
1176
- 'type' => 'section',
1177
- 'title' => __('Advanced Index & No Index Options', 'accelerated-mobile-pages'),
1178
- 'indent' => true
1179
- ),
1180
- array(
1181
- 'id' => 'ampforwp-robots-archive-sub-pages-sitewide',
1182
- 'type' => 'switch',
1183
- 'title' => __('Archive subpages (sitewide)', 'accelerated-mobile-pages'),
1184
- 'subtitle' => __("Such as /page/2 so on and so forth",'accelerated-mobile-pages'),
1185
- 'default' => 0,
1186
- 'on' => 'index',
1187
- 'off' => 'noindex'
1188
- ),
1189
- array(
1190
- 'id' => 'ampforwp-robots-archive-author-pages',
1191
- 'type' => 'switch',
1192
- 'title' => __('Author Archives', 'accelerated-mobile-pages'),
1193
- 'default' => 1,
1194
- 'on' => 'index',
1195
- 'off' => 'noindex'
1196
-
1197
- ),
1198
- array(
1199
- 'id' => 'ampforwp-robots-archive-date-pages',
1200
- 'type' => 'switch',
1201
- 'title' => __('Date Archives', 'accelerated-mobile-pages'),
1202
- 'default' => 1,
1203
- 'on' => 'index',
1204
- 'off' => 'noindex'
1205
-
1206
- ),
1207
- array(
1208
- 'id' => 'ampforwp-robots-archive-category-pages',
1209
- 'type' => 'switch',
1210
- 'title' => __('Categories', 'accelerated-mobile-pages'),
1211
- 'default' => 1,
1212
- 'on' => 'index',
1213
- 'off' => 'noindex'
1214
- ),
1215
- array(
1216
- 'id' => 'ampforwp-robots-archive-tag-pages',
1217
- 'type' => 'switch',
1218
- 'title' => __('Tags', 'accelerated-mobile-pages'),
1219
- 'default' => 1,
1220
- 'on' => 'index',
1221
- 'off' => 'noindex'
1222
- ),
1223
-
1224
-
1225
- )
1226
-
1227
- )
1228
-
1229
- );
1230
-
1231
- // Performance SECTION
1232
- Redux::setSection( $opt_name, array(
1233
- 'title' => __( 'Performance', 'accelerated-mobile-pages' ),
1234
- 'id' => 'amp-performance',
1235
- 'desc' => $cache_desc,
1236
- 'subsection' => true,
1237
- 'fields' => array(
1238
-
1239
- array(
1240
- 'id' => 'ampforwp_cache_minimize_mode',
1241
- 'type' => 'switch',
1242
- 'title' => __('Minify AMP Page', 'accelerated-mobile-pages'),
1243
- 'subtitle' => __('Improve the Page Speed and Loading time with Minification option', 'accelerated-mobile-pages'),
1244
- 'default' => 0
1245
- ),
1246
-
1247
- )
1248
-
1249
- )
1250
-
1251
- );
1252
-
1253
- function ampforwp_get_default_analytics($param=""){
1254
- $options = $default = '';
1255
- $options = get_option('redux_builder_amp', true);
1256
- $default = $options['amp-analytics-select-option'];
1257
- if($param == $default){
1258
- return true;
1259
- }
1260
- else
1261
- return false;
1262
- }
1263
-
1264
- // Analytics SECTION
1265
- Redux::setSection( $opt_name, array(
1266
- 'title' => __('Analytics'),
1267
- // 'icon' => 'el el-th-large',
1268
- 'desc' => __('You can either use Google Tag Manager or Other Analytics Providers','accelerated-mobile-pages'),
1269
- 'subsection' => true,
1270
- 'fields' =>
1271
- array(
1272
- array(
1273
- 'id' => 'amp-analytics-select-option',
1274
- 'type' => 'select',
1275
- 'title' => __( 'Analytics Type', 'accelerated-mobile-pages' ),
1276
- 'class' => 'hide',
1277
- 'subtitle' => __( 'Select your Analytics provider.', 'accelerated-mobile-pages' ),
1278
- 'options' => array(
1279
- '1' => __('Google Analytics', 'accelerated-mobile-pages' ),
1280
- '2' => __('Segment Analytics', 'accelerated-mobile-pages' ),
1281
- '3' => __('Piwik Analytics', 'accelerated-mobile-pages' ),
1282
- '4' => __('Quantcast Measurement', 'accelerated-mobile-pages' ),
1283
- '5' => __('comScore', 'accelerated-mobile-pages' ),
1284
- '6' => __('Effective Measure', 'accelerated-mobile-pages' ),
1285
- '7' => __('StatCounter', 'accelerated-mobile-pages' ),
1286
- '8' => __('Histats Analytics', 'accelerated-mobile-pages'),
1287
- '9' => __('Yandex Metrika', 'accelerated-mobile-pages'),
1288
- '10' => __('Chartbeat Analytics', 'accelerated-mobile-pages'),
1289
- '11' => __('Alexa Metrics', 'accelerated-mobile-pages'),
1290
- '12' => __('AFS Analytics', 'accelerated-mobile-pages'),
1291
- ),
1292
- 'required' => array(
1293
- array('amp-use-gtm-option', '=' , '0'),
1294
- ),
1295
- 'default' => '1',
1296
- ),
1297
- // Google Analytics
1298
- array(
1299
- 'id' => 'ampforwp-ga-switch',
1300
- 'type' => 'switch',
1301
- 'title' => 'Google Analytics',
1302
- 'default' => ampforwp_get_default_analytics('1'),
1303
- 'required' => array(
1304
- array('amp-use-gtm-option', '=' , '0'),
1305
- ),
1306
- ),
1307
- array(
1308
- 'id' => 'ga-feild',
1309
- 'type' => 'text',
1310
- 'title' => __( 'Google Analytics', 'accelerated-mobile-pages' ),
1311
- 'required' => array(
1312
- array('amp-use-gtm-option', '=' , '0'),
1313
- array('ampforwp-ga-switch', '=' , '1')
1314
- ),
1315
- 'subtitle' => __( 'Enter your Google Analytics ID.', 'accelerated-mobile-pages' ),
1316
- 'desc' => __('Example: UA-XXXXX-Y', 'accelerated-mobile-pages' ),
1317
- 'default' => 'UA-XXXXX-Y',
1318
- ),
1319
-
1320
- // Advance Tracking options for Google Analytics
1321
- array(
1322
- 'id' => 'ampforwp-ga-field-advance-switch',
1323
- 'type' => 'switch',
1324
- 'title' => __( 'Advanced Analytics Tracking Event Options', 'accelerated-mobile-pages' ),
1325
- 'required' => array(
1326
- array('amp-use-gtm-option', '=' , '0'),
1327
- array('ampforwp-ga-switch', '=' , '1')
1328
- ),
1329
- 'subtitle' => __( 'Enable the Advance Tracking options', 'accelerated-mobile-pages' ),
1330
- 'default' => 0,
1331
- ),
1332
- array(
1333
- 'id' => 'ampforwp-ga-field-advance',
1334
- 'type' => 'ace_editor',
1335
- 'title' => __('Advance Google Analytics', 'accelerated-mobile-pages'),
1336
- 'required' => array(
1337
- array('amp-use-gtm-option', '=' , '0'),
1338
- array('ampforwp-ga-switch', '=' , '1'),
1339
- array('ampforwp-ga-field-advance-switch', '=' , '1')
1340
- ),
1341
- 'subtitle' => __('Enter the Advance Tracking options', 'accelerated-mobile-pages'),
1342
- 'mode' => 'javascript',
1343
- 'theme' => 'monokai',
1344
- 'desc' => '',
1345
- 'default' => __('','accelerated-mobile-pages')
1346
- ),
1347
- // Segment Analytics
1348
- array(
1349
- 'id' => 'ampforwp-Segment-switch',
1350
- 'type' => 'switch',
1351
- 'title' => 'Segment Analytics',
1352
- 'default' => ampforwp_get_default_analytics('2'),
1353
- 'required' => array(
1354
- array('amp-use-gtm-option', '=' , '0'),
1355
- ),
1356
- ),
1357
- array(
1358
- 'id' => 'sa-feild',
1359
- 'type' => 'text',
1360
- 'title' => __( 'Segment Analytics', 'accelerated-mobile-pages' ),
1361
- 'subtitle' => __( 'Enter your Segment Analytics Key.', 'accelerated-mobile-pages' ),
1362
- 'required' => array(
1363
- array('amp-use-gtm-option', '=' , '0'),
1364
- array('ampforwp-Segment-switch', '=' , '1')
1365
- ),
1366
- 'default' => 'SEGMENT-WRITE-KEY',
1367
- ),
1368
- // Piwik Analytics
1369
- array(
1370
- 'id' => 'ampforwp-Piwik-switch',
1371
- 'type' => 'switch',
1372
- 'title' => 'Piwik Analytics',
1373
- 'default' => ampforwp_get_default_analytics('3'),
1374
- 'required' => array(
1375
- array('amp-use-gtm-option', '=' , '0'),
1376
- ),
1377
- ),
1378
- array(
1379
- 'id' => 'pa-feild',
1380
- 'type' => 'text',
1381
- 'title' => __( 'Piwik Analytics', 'accelerated-mobile-pages' ),
1382
- 'required' => array(
1383
- array('amp-use-gtm-option', '=' , '0'),
1384
- array('ampforwp-Piwik-switch', '=' , '1')
1385
- ),
1386
- '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' ),
1387
- 'subtitle' => __('Enter your Piwik Analytics URL.', 'accelerated-mobile-pages' ),
1388
- 'default' => '#',
1389
- ),
1390
- // Quantcast
1391
- array(
1392
- 'id' => 'ampforwp-Quantcast-switch',
1393
- 'type' => 'switch',
1394
- 'title' => 'Quantcast Measurement',
1395
- 'default' => ampforwp_get_default_analytics('4'),
1396
- 'required' => array(
1397
- array('amp-use-gtm-option', '=' , '0'),
1398
- ),
1399
- ),
1400
- array(
1401
- 'id' =>'amp-quantcast-analytics-code',
1402
- 'type' => 'text',
1403
- 'title' => __('p-code','accelerated-mobile-pages'),
1404
- 'default' => '',
1405
- 'required' => array(
1406
- array('ampforwp-Quantcast-switch', '=' , '1')),
1407
- ),
1408
- // comScore
1409
- array(
1410
- 'id' => 'ampforwp-comScore-switch',
1411
- 'type' => 'switch',
1412
- 'title' => 'comScore',
1413
- 'default' => ampforwp_get_default_analytics('5'),
1414
- 'required' => array(
1415
- array('amp-use-gtm-option', '=' , '0'),
1416
- ),
1417
- ),
1418
- array(
1419
- 'id' =>'amp-comscore-analytics-code-c1',
1420
- 'type' => 'text',
1421
- 'title' => __('C1','accelerated-mobile-pages'),
1422
- 'default' => 1,
1423
- 'required' => array(
1424
- array('ampforwp-comScore-switch', '=' , '1')),
1425
- ),
1426
- array(
1427
- 'id' =>'amp-comscore-analytics-code-c2',
1428
- 'type' => 'text',
1429
- 'title' => __('C2','accelerated-mobile-pages'),
1430
- 'default' => '',
1431
- 'required' => array(
1432
- array('ampforwp-comScore-switch', '=' , '1')),
1433
- ),
1434
- // Effective Measure
1435
- array(
1436
- 'id' => 'ampforwp-Effective-switch',
1437
- 'type' => 'switch',
1438
- 'title' => 'Effective Measure',
1439
- 'default' => ampforwp_get_default_analytics('6'),
1440
- 'required' => array(
1441
- array('amp-use-gtm-option', '=' , '0'),
1442
- ),
1443
- ),
1444
- array(
1445
- 'id' => 'eam-feild',
1446
- 'type' => 'text',
1447
- 'title' => __( 'Effective Measure Analytics', 'accelerated-mobile-pages' ),
1448
- 'required' => array(
1449
- array('amp-use-gtm-option', '=' , '0'),
1450
- array('ampforwp-Effective-switch', '=' , '1')
1451
- ),
1452
- 'desc' => __( 'Example: https://s.effectivemeasure.net/d/6/i?pu=CANONICAL_URL&ru=DOCUMENT_REFERRER&rnd=RANDOM', 'accelerated-mobile-pages' ),
1453
- 'subtitle' => __('Enter your Effective Measure URL.', 'accelerated-mobile-pages' ),
1454
- 'default' => '#',
1455
- ),
1456
- // StatCounter
1457
- array(
1458
- 'id' => 'ampforwp-StatCounter-switch',
1459
- 'type' => 'switch',
1460
- 'title' => 'StatCounter',
1461
- 'default' => ampforwp_get_default_analytics('7'),
1462
- 'required' => array(
1463
- array('amp-use-gtm-option', '=' , '0'),
1464
- ),
1465
- ),
1466
- array(
1467
- 'id' => 'sc-feild',
1468
- 'type' => 'text',
1469
- 'title' => __( 'StatCounter', 'accelerated-mobile-pages' ),
1470
- 'required' => array(
1471
- array('amp-use-gtm-option', '=' , '0'),
1472
- array('ampforwp-StatCounter-switch', '=' , '1')
1473
- ),
1474
- 'desc' => __( 'Example: https://c.statcounter.com/PROJECT_ID/0/SECURITY_CODE/1/', 'accelerated-mobile-pages' ),
1475
- 'subtitle' => __('Enter your StatCounter URL.', 'accelerated-mobile-pages' ),
1476
- 'default' => '#',
1477
- ),
1478
- // Histats Analytics
1479
- array(
1480
- 'id' => 'ampforwp-Histats-switch',
1481
- 'type' => 'switch',
1482
- 'title' => 'Histats Analytics',
1483
- 'default' => ampforwp_get_default_analytics('8'),
1484
- 'required' => array(
1485
- array('amp-use-gtm-option', '=' , '0'),
1486
- ),
1487
- ),
1488
- array(
1489
- 'id' => 'histats-feild',
1490
- 'type' => 'text',
1491
- 'title' => __( 'Histats Analytics', 'accelerated-mobile-pages' ),
1492
- 'required' => array(
1493
- array('amp-use-gtm-option', '=' , '0'),
1494
- array('ampforwp-Histats-switch', '=' , '1')
1495
- ),
1496
- 'subtitle' => __( 'Enter your Histats Analytics ID.', 'accelerated-mobile-pages' ),
1497
- 'desc' => 'Tutorial: <a href="https://ampforwp.com/tutorials/how-to-get-histats-analytics-id/">How to get Histats Analytics ID for AMP?</a>',
1498
- 'default' => '',
1499
- ),
1500
- // Yandex Metrika
1501
- array(
1502
- 'id' => 'ampforwp-Yandex-switch',
1503
- 'type' => 'switch',
1504
- 'title' => 'Yandex Metrika',
1505
- 'default' => ampforwp_get_default_analytics('9'),
1506
- 'required' => array(
1507
- array('amp-use-gtm-option', '=' , '0'),
1508
- ),
1509
- ),
1510
- array(
1511
- 'id' =>'amp-Yandex-Metrika-analytics-code',
1512
- 'type' => 'text',
1513
- 'title' => __('Yandex Metrika Analytics ID','accelerated-mobile-pages'),
1514
- 'default' => '',
1515
- 'required' => array(
1516
- array('amp-use-gtm-option', '=' , '0'),
1517
- array('ampforwp-Yandex-switch', '=' , '1')),
1518
- 'subtitle' => __( 'Enter your Counter ID.', 'accelerated-mobile-pages' ),
1519
- ),
1520
- // Chartbeat Analytics
1521
- array(
1522
- 'id' => 'ampforwp-Chartbeat-switch',
1523
- 'type' => 'switch',
1524
- 'title' => 'Chartbeat Analytics',
1525
- 'default' => ampforwp_get_default_analytics('10'),
1526
- 'required' => array(
1527
- array('amp-use-gtm-option', '=' , '0'),
1528
- ),
1529
- ),
1530
-
1531
- array(
1532
- 'id' =>'amp-Chartbeat-analytics-code',
1533
- 'type' => 'text',
1534
- 'title' => __('Chartbeat Analytics ID','accelerated-mobile-pages'),
1535
- 'default' => '',
1536
- 'required' => array(
1537
- array('amp-use-gtm-option', '=' , '0'),
1538
- array('ampforwp-Chartbeat-switch', '=' , '1')),
1539
- 'subtitle' => __( 'Enter your Account ID.', 'accelerated-mobile-pages' ),
1540
- ),
1541
- // Alexa Metrics
1542
- array(
1543
- 'id' => 'ampforwp-Alexa-switch',
1544
- 'type' => 'switch',
1545
- 'title' => 'Alexa Metrics',
1546
- 'default' => ampforwp_get_default_analytics('11'),
1547
- 'required' => array(
1548
- array('amp-use-gtm-option', '=' , '0'),
1549
- ),
1550
- ),
1551
- array(
1552
- 'id' => 'ampforwp-alexa-account',
1553
- 'type' => 'text',
1554
- 'title' => __( 'Alexa Metrics Account', 'accelerated-mobile-pages' ),
1555
- 'required' => array(
1556
- array('amp-use-gtm-option', '=' , '0'),
1557
- array('ampforwp-Alexa-switch', '=' , '1')
1558
- ),
1559
- 'subtitle' => __( 'Enter Account Number given by Alexa Metrics', 'accelerated-mobile-pages' ),
1560
- 'default' => '',
1561
- ),
1562
- array(
1563
- 'id' => 'ampforwp-alexa-domain',
1564
- 'type' => 'text',
1565
- 'title' => __( 'Alexa Metrics Domain', 'accelerated-mobile-pages' ),
1566
- 'required' => array(
1567
- array('amp-use-gtm-option', '=' , '0'),
1568
- array('ampforwp-Alexa-switch', '=' , '1')
1569
- ),
1570
- 'subtitle' => __( 'Enter the domain', 'accelerated-mobile-pages' ),
1571
- 'default' => '',
1572
- ),
1573
- // AFS Analytics
1574
- array(
1575
- 'id' => 'ampforwp-afs-analytics-switch',
1576
- 'type' => 'switch',
1577
- 'title' => 'AFS Analytics',
1578
- 'default' => ampforwp_get_default_analytics('12'),
1579
- 'required' => array(
1580
- array('amp-use-gtm-option', '=' , '0'),
1581
- ),
1582
- ),
1583
- array(
1584
- 'id' => 'ampforwp-afs-siteid',
1585
- 'type' => 'text',
1586
- 'title' => __( 'Website ID', 'accelerated-mobile-pages' ),
1587
- 'required' => array(
1588
- array('amp-use-gtm-option', '=' , '0'),
1589
- array('ampforwp-afs-analytics-switch', '=' , '1')
1590
- ),
1591
- 'subtitle' => __( 'Enter the Website ID', 'accelerated-mobile-pages' ),
1592
- 'default' => '',
1593
- 'desc' => 'example: 00000003',
1594
- ),
1595
-
1596
- //GTM
1597
- array(
1598
- 'id' => 'amp-use-gtm-option',
1599
- 'type' => 'switch',
1600
- 'title' => __( 'Google Tag Manager', 'accelerated-mobile-pages' ),
1601
- 'subtitle' => __( 'Select your Analytics provider.', 'accelerated-mobile-pages' ),
1602
- 'default' => 0,
1603
- ),
1604
- array(
1605
- 'id' =>'amp-gtm-id',
1606
- 'type' => 'text',
1607
- 'title' => __('Tag Manager ID (Container ID)','accelerated-mobile-pages'),
1608
- 'default' => '',
1609
- 'desc' => __('Eg: GTM-5XXXXXP (<a href="https://ampforwp.com/tutorials/article/gtm-in-amp/">Getting Started?</a>)','accelerated-mobile-pages'),
1610
- // 'validate' => 'not_empty',
1611
- 'required' => array(
1612
- array('amp-use-gtm-option', '=' , '1')
1613
- ),
1614
- ),
1615
- array(
1616
- 'id' =>'amp-gtm-analytics-type',
1617
- 'type' => 'text',
1618
- 'title' => __('Analytics Type','accelerated-mobile-pages'),
1619
- 'default' => '',
1620
- 'desc' => __('Eg: googleanalytics','accelerated-mobile-pages'),
1621
- // 'validate' => 'not_empty',
1622
- 'required' => array(
1623
- array('amp-use-gtm-option', '=' , '1')
1624
- ),
1625
- ),
1626
- array(
1627
- 'id' =>'amp-gtm-analytics-code',
1628
- 'type' => 'text',
1629
- 'title' => __('Analytics ID','accelerated-mobile-pages'),
1630
- 'default' => '',
1631
- 'desc' => 'Eg: UA-XXXXXX-Y',
1632
- // 'validate' => 'not_empty',
1633
- 'required' => array(
1634
- array('amp-use-gtm-option', '=' , '1')),
1635
- ),
1636
- // Google Cliend ID API
1637
- array(
1638
- 'id' => 'ampforwp-ga-clientid-api-gtm',
1639
- 'type' => 'info',
1640
- 'style' => 'info',
1641
- 'desc' => '<a href="https://ampforwp.com/tutorials/article/set-google-amp-client-id-api/" target="_blank">Check this Tutorial to set it up</a>',
1642
- 'title' => __('Set up Google AMP Client ID API', 'accelerated-mobile-pages'),
1643
- 'required' => array(
1644
- array('amp-use-gtm-option', '=' , '1'),
1645
- ),
1646
- ),
1647
- array(
1648
- 'id' =>'amp-fb-pixel',
1649
- 'type' => 'switch',
1650
- 'title' => __('Facebook Pixel','accelerated-mobile-pages'),
1651
- 'default' => 0,
1652
- ),
1653
- array(
1654
- 'id' =>'amp-fb-pixel-id',
1655
- 'type' => 'text',
1656
- 'title' => __('Facebook Pixel ID','accelerated-mobile-pages'),
1657
- 'default' => '',
1658
- 'desc' => 'Example: 153246987501548',
1659
- 'required' => array(
1660
- array('amp-fb-pixel', '=' , '1')),
1661
- ),
1662
-
1663
- )
1664
- )
1665
- );
1666
- //Get options for Structured Data Type
1667
- if( !function_exists('ampforwp_get_sd_types') ){
1668
- function ampforwp_get_sd_types(){
1669
- $options = array();
1670
- $options = array(
1671
- 'BlogPosting' => 'BlogPosting',
1672
- 'NewsArticle' => 'NewsArticle',
1673
- 'Recipe' => 'Recipe',
1674
- 'Product' => 'Product',
1675
- 'VideoObject' => 'VideoObject',
1676
- 'Article' => 'Article',
1677
- 'WebPage' => 'WebPage'
1678
- );
1679
- return $options;
1680
- }
1681
- }
1682
-
1683
- add_filter('ampforwp_sd_custom_fields', 'ampforwp_add_extra_fields');
1684
- function ampforwp_add_extra_fields($fields){
1685
- $post_types = '';
1686
- $custom_fields = array();
1687
- $extra_fields = array();
1688
- $post_types = get_option('ampforwp_custom_post_types');
1689
- if($post_types){
1690
- foreach ($post_types as $post_type) {
1691
- if( $post_type == 'post' || $post_type == 'page' ) {
1692
- continue;
1693
- }
1694
- $custom_fields[] = array(
1695
- 'id' => 'ampforwp-sd-type-'. $post_type,
1696
- 'type' => 'select',
1697
- 'title' => __($post_type, 'accelerated-mobile-pages'),
1698
- 'subtitle' => __('Select the Structured Data Type for '.$post_type, 'accelerated-mobile-pages'),
1699
- 'options' => ampforwp_get_sd_types(),
1700
- 'default' => 'BlogPosting',
1701
- );
1702
- $extra_fields = array_merge($extra_fields, $custom_fields);
1703
- }
1704
- }
1705
- array_splice($fields, 2, 0, $extra_fields);
1706
- return $fields;
1707
-
1708
- }
1709
- // Structured Data
1710
- Redux::setSection( $opt_name, array(
1711
- 'title' => __( 'Structured Data', 'accelerated-mobile-pages' ),
1712
- 'id' => 'opt-structured-data',
1713
- 'subsection' => true,
1714
- 'fields' => apply_filters('ampforwp_sd_custom_fields', $fields = array(
1715
- array(
1716
- 'id' => 'ampforwp-sd-type-posts',
1717
- 'type' => 'select',
1718
- 'title' => __('Posts', 'accelerated-mobile-pages'),
1719
- 'subtitle' => __('Select the Structured Data Type for Posts', 'accelerated-mobile-pages'),
1720
- 'options' => ampforwp_get_sd_types(),
1721
- 'default' => 'BlogPosting',
1722
- ),
1723
- array(
1724
- 'id' => 'ampforwp-sd-type-pages',
1725
- 'type' => 'select',
1726
- 'title' => __('Pages', 'accelerated-mobile-pages'),
1727
- 'subtitle' => __('Select the Structured Data Type for Pages', 'accelerated-mobile-pages'),
1728
- 'options' => ampforwp_get_sd_types(),
1729
- 'default' => 'BlogPosting',
1730
- ),
1731
- array(
1732
- 'id' => 'amp-structured-data-logo',
1733
- 'type' => 'media',
1734
- 'url' => true,
1735
- 'title' => __('Default Structured Data Logo', 'accelerated-mobile-pages'),
1736
- 'subtitle' => __('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
1737
- ),
1738
- array(
1739
- 'id' => 'ampforwp-sd-logo-dimensions',
1740
- 'title' => __('Custom Logo Size', 'accelerated-mobile-pages'),
1741
- 'type' => 'switch',
1742
- 'default' => 0,
1743
- ),
1744
- array(
1745
- 'id' => 'ampforwp-sd-logo-width',
1746
- 'type' => 'text',
1747
- 'title' => __('Logo Width', 'accelerated-mobile-pages'),
1748
- 'desc' => __('Default width is 600 pixels', 'accelerated-mobile-pages'),
1749
- 'default' => '600',
1750
- 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
1751
- ),
1752
- array(
1753
- 'id' => 'ampforwp-sd-logo-height',
1754
- 'type' => 'text',
1755
- 'title' => __('Logo Height', 'accelerated-mobile-pages'),
1756
- 'desc' => __('Default height is 60 pixels', 'accelerated-mobile-pages'),
1757
- 'default' => '60',
1758
- 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
1759
-
1760
- ),
1761
- array(
1762
- 'id' => 'amp-structured-data-placeholder-image',
1763
- 'type' => 'media',
1764
- 'url' => true,
1765
- 'title' => __('Default Post Image', 'accelerated-mobile-pages'),
1766
- 'subtitle' => __('Upload the Image you want to show as Placeholder Image.', 'accelerated-mobile-pages'),
1767
- 'placeholder' => __('when there is no featured image set in the post','accelerated-mobile-pages'),
1768
- ),
1769
- array(
1770
- 'id' => 'amp-structured-data-placeholder-image-width',
1771
- 'title' => __('Default Post Image Width', 'accelerated-mobile-pages'),
1772
- 'type' => 'text',
1773
- 'placeholder' => '550',
1774
- 'subtitle' => __('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
1775
- 'default' => '700'
1776
- ),
1777
- array(
1778
- 'id' => 'amp-structured-data-placeholder-image-height',
1779
- 'title' => __('Default Post Image Height', 'accelerated-mobile-pages'),
1780
- 'type' => 'text',
1781
- 'placeholder' => '350',
1782
- 'subtitle' => __('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
1783
- 'default' => '550'
1784
- ),
1785
- array(
1786
- 'id' => 'amporwp-structured-data-video-thumb-url',
1787
- 'type' => 'media',
1788
- 'url' => true,
1789
- 'title' => __('Default Thumbnail for VideoObject', 'accelerated-mobile-pages'),
1790
- 'subtitle' => __('Upload the Thumbnail you want to show as Video Thumbnail.', 'accelerated-mobile-pages'),
1791
- 'placeholder' => __('When there is no thumbnail set for the video','accelerated-mobile-pages'),
1792
- ),
1793
- )
1794
- )
1795
- ) );
1796
-
1797
- // Notifications SECTION
1798
- Redux::setSection( $opt_name, array(
1799
- 'title' => __( 'Notice Bar', 'accelerated-mobile-pages' ),
1800
- 'desc' => $cta_desc ,
1801
- 'id' => 'amp-notifications',
1802
- 'subsection' => true,
1803
- 'fields' => array(
1804
- array(
1805
- 'id' =>'amp-enable-notifications',
1806
- 'type' => 'switch',
1807
- 'title' => __('Enable Notifications', 'accelerated-mobile-pages'),
1808
- 'default' => '',
1809
- 'subtitle' => __('Show notifications on all of your AMP pages for cookie purposes, or anything else.', 'accelerated-mobile-pages'),
1810
- 'true' => 'Enabled',
1811
- 'false' => 'Disabled',
1812
- ),
1813
- array(
1814
- 'id' => 'amp-notification-text',
1815
- 'title' => __('Notification text', 'accelerated-mobile-pages'),
1816
- 'type' => 'text',
1817
- 'required' => array('amp-enable-notifications', '=' , '1'),
1818
- 'default' => __('This website uses cookies.','accelerated-mobile-pages'),
1819
- 'placeholder' => __('Enter Text here','accelerated-mobile-pages'),
1820
- ),
1821
- array(
1822
- 'id' => 'amp-accept-button-text',
1823
- 'title' => __('Notification accept button text', 'accelerated-mobile-pages'),
1824
- 'type' => 'text',
1825
- 'required' => array('amp-enable-notifications', '=' , '1'),
1826
- 'default' => __('Accept','accelerated-mobile-pages'),
1827
- 'placeholder' => __('Enter Text here','accelerated-mobile-pages'),
1828
- ),
1829
-
1830
- ),
1831
-
1832
- ) );
1833
-
1834
- // Push Notifications section
1835
- Redux::setSection( $opt_name, array(
1836
- 'title' => __( 'Push Notifications', 'accelerated-mobile-pages' ),
1837
- // 'icon' => 'el el-podcast',
1838
- 'id' => 'ampforwp-push-notifications',
1839
- 'desc' => " ",
1840
- 'subsection' => true,
1841
- 'fields' => array(
1842
- array(
1843
- 'id' => 'ampforwp-web-push-onesignal',
1844
- 'type' => 'switch',
1845
- 'title' => 'OneSignal Push Notifications',
1846
- 'subtitle' => '<a href="https://ampforwp.com/tutorials/one-signal-in-amp/" target="_blank">View Integration Tutorial</a> (HTTPS is required)',
1847
- 'true' => 'true',
1848
- 'false' => 'false',
1849
- 'default' => 0,
1850
- ),
1851
- array(
1852
- 'id' => 'ampforwp-one-signal-app-id',
1853
- 'type' => 'text',
1854
- 'title' => 'APP ID',
1855
- 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
1856
- ),
1857
- array(
1858
- 'id' => 'ampforwp-onesignal-positioning',
1859
- 'type' => 'section',
1860
- 'title' => __('Positioning', 'accelerated-mobile-pages'),
1861
- 'required' => array(
1862
- array( 'ampforwp-web-push-onesignal', '=' , 1 ),
1863
- array( 'amp-use-pot', '=' , 0 )
1864
- ),
1865
- 'indent' => true,
1866
- ),
1867
- array(
1868
- 'id' => 'ampforwp-web-push-onesignal-below-content',
1869
- 'type' => 'switch',
1870
- 'title' => 'Below the Content',
1871
- 'true' => 'true',
1872
- 'false' => 'false',
1873
- 'default' => 1,
1874
- 'subtitle' => 'Show Subscribe Button Below the Content',
1875
- 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
1876
- ),
1877
- array(
1878
- 'id' => 'ampforwp-web-push-onesignal-above-content',
1879
- 'type' => 'switch',
1880
- 'title' => 'Above the Content',
1881
- 'true' => 'true',
1882
- 'false' => 'false',
1883
- 'default' => 0,
1884
- 'subtitle' => 'Show Subscribe Button Above the Content',
1885
- 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
1886
- ),
1887
- array(
1888
- 'id' => 'translation',
1889
- 'type' => 'section',
1890
- 'title' => __('Translation', 'accelerated-mobile-pages'),
1891
- 'required' => array(
1892
- array( 'ampforwp-web-push-onesignal', '=' , 1 ),
1893
- array( 'amp-use-pot', '=' , 0 )
1894
- ),
1895
- 'indent' => true,
1896
- ),
1897
- array(
1898
- 'id' => 'ampforwp-onesignal-translator-subscribe',
1899
- 'type' => 'text',
1900
- 'title' => __('Subscribe', 'accelerated-mobile-pages'),
1901
- 'default' => __('Subscribe to updates','accelerated-mobile-pages'),
1902
- 'placeholder'=>__('Add some text','accelerated-mobile-pages'),
1903
- ),
1904
- array(
1905
- 'id' => 'ampforwp-onesignal-translator-unsubscribe',
1906
- 'type' => 'text',
1907
- 'title' => __('Unsubsribe', 'accelerated-mobile-pages'),
1908
- 'default' => __('Unsubscribe from updates','accelerated-mobile-pages'),
1909
- 'placeholder'=>__('Add some text','accelerated-mobile-pages'),
1910
- ),
1911
- array(
1912
- 'id' => 'ampforwp-onesignal-exper',
1913
- 'type' => 'section',
1914
- 'title' => __('Experimental', 'accelerated-mobile-pages'),
1915
- 'required' => array(
1916
- array( 'ampforwp-web-push-onesignal', '=' , 1 ),
1917
- array( 'amp-use-pot', '=' , 0 )
1918
- ),
1919
- 'indent' => true,
1920
- ),
1921
- array(
1922
- 'id' => 'ampforwp-onesignal-http-site',
1923
- 'type' => 'switch',
1924
- 'title' => 'HTTP Site',
1925
- 'subtitle' => 'For HTTP Sites Only',
1926
- 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
1927
- 'true' => 'true',
1928
- 'false' => 'false',
1929
- 'default' => 0
1930
- ),
1931
- array(
1932
- 'id' => 'ampforwp-onesignal-subdomain',
1933
- 'type' => 'text',
1934
- 'title' => 'Subdomain',
1935
- 'desc' => __('Example: ampforwp', 'accelerated-mobile-pages'),
1936
- 'required' => array(
1937
- array('ampforwp-web-push-onesignal', '=' , '1'),
1938
- array('ampforwp-onesignal-http-site', '=','1')),
1939
- ),
1940
- )
1941
- )
1942
- );
1943
- // contact form 7
1944
- $forms_support[] = array(
1945
- 'id' =>'amp-enable-contactform',
1946
- 'type' => 'switch',
1947
- 'title' => __('Contact Form 7 Support', 'accelerated-mobile-pages'),
1948
- 'default' => '',
1949
- 'true' => 'Enabled',
1950
- 'false' => 'Disabled',
1951
- );
1952
-
1953
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1954
- if(!is_plugin_active( 'amp-cf7/amp-cf7.php' ) ){
1955
- $forms_support[]= array(
1956
- 'id' => 'info_normal_cf7',
1957
- 'type' => 'info',
1958
- 'required' => array('amp-enable-contactform', '=' , '1'),
1959
- '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>',
1960
- );
1961
- }
1962
- // gravity form
1963
- $forms_support[]= array(
1964
- 'id' =>'amp-enable-gravityforms_support',
1965
- 'type' => 'switch',
1966
- 'title' => __('Gravity Forms Support', 'accelerated-mobile-pages'),
1967
- 'default' => '',
1968
- 'true' => 'Enabled',
1969
- 'false' => 'Disabled',
1970
- );
1971
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1972
- if(!is_plugin_active( 'amp-gravity-forms/amp-gravity-forms.php' ) ){
1973
- $forms_support[]= array(
1974
- 'id' => 'info_normal_2',
1975
- 'type' => 'info',
1976
- 'required' => array('amp-enable-gravityforms_support', '=' , '1'),
1977
- '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>',
1978
- );}
1979
-
1980
- // Contact Form SECTION
1981
- Redux::setSection( $opt_name, array(
1982
- 'title' => __( 'Contact Form', 'accelerated-mobile-pages' ),
1983
- 'desc' => 'Contact forms will automatically be converted into AMP compatible.',
1984
- 'id' => 'amp-contact',
1985
- 'subsection' => true,
1986
- 'fields' => $forms_support
1987
-
1988
- ) );
1989
-
1990
- // comments
1991
- Redux::setSection( $opt_name, array(
1992
- 'title' => __( 'Comments', 'accelerated-mobile-pages' ),
1993
- 'desc' => $comment_desc,
1994
- 'id' => 'disqus-comments',
1995
- 'subsection' => true,
1996
- 'fields' => array(
1997
- array(
1998
- 'title' =>__('WordPress Comments','accelerated-mobile-pages'),
1999
- 'id' => 'wordpress-comments-support',
2000
- 'subtitle' => __('Enable/Disable WordPress comments using this switch.', 'accelerated-mobile-pages'),
2001
- 'type' => 'switch',
2002
-
2003
- ),
2004
- array(
2005
- 'id' => 'ampforwp-number-of-comments',
2006
- 'type' => 'text',
2007
- 'subtitle' => __('This refers to the normal comments','accelerated-mobile-pages'),
2008
- 'title' => __('No of Comments', 'accelerated-mobile-pages'),
2009
- 'default' => 10,
2010
- 'required' => array('wordpress-comments-support' , '=' , 1
2011
- ),
2012
- ),
2013
- array(
2014
- 'id' => 'ampforwp-disqus-comments-support',
2015
- 'type' => 'switch',
2016
- 'title' => __('Disqus comments', 'accelerated-mobile-pages'),
2017
- 'subtitle' => __('Enable/Disable Disqus comments using this switch.', 'accelerated-mobile-pages'),
2018
- 'default' => 0
2019
- ),
2020
- array(
2021
- 'id' => 'ampforwp-disqus-comments-name',
2022
- 'type' => 'text',
2023
- 'title' => __('Disqus Name', 'accelerated-mobile-pages'),
2024
- 'subtitle' => __('Eg: https://xyz.disqus.com', 'accelerated-mobile-pages'),
2025
- 'required' => array('ampforwp-disqus-comments-support', '=' , '1'),
2026
- 'default' => ''
2027
- ),
2028
-
2029
- array(
2030
- 'id' => 'ampforwp-disqus-host-position',
2031
- 'type' => 'switch',
2032
- 'title' => __('Host Disqus Comments through AMPforWP Servers', 'accelerated-mobile-pages'),
2033
- 'subtitle' => __('Use AMPforWP secure servers to serve Comments file. Recommended if your site is non HTTPS', 'accelerated-mobile-pages'),
2034
- 'default' => 1,
2035
- 'required' => array('ampforwp-disqus-comments-support', '=' , '1'),
2036
- ),
2037
-
2038
- array(
2039
- 'id' => 'ampforwp-disqus-host-file',
2040
- 'type' => 'text',
2041
- 'title' => __('Disqus Host File', 'accelerated-mobile-pages'),
2042
- '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'),
2043
- 'placeholder' => 'https://comments.example.com/disqus.php',
2044
- 'required' => array('ampforwp-disqus-host-position', '=' , '0'),
2045
- ),
2046
- array(
2047
- 'id' => 'ampforwp-facebook-comments-support',
2048
- 'type' => 'switch',
2049
- 'title' => __('Facebook Comments', 'accelerated-mobile-pages'),
2050
- 'subtitle' => __('Enable/Disable Facebook comments using this switch.', 'accelerated-mobile-pages'),
2051
- 'default' => 0,
2052
- ),
2053
- array(
2054
- 'id' => 'ampforwp-number-of-fb-no-of-comments',
2055
- 'type' => 'text',
2056
- 'subtitle' => __('Enter the number of comments','accelerated-mobile-pages'),
2057
- 'title' => __('No of Comments', 'accelerated-mobile-pages'),
2058
- 'default' => 10,
2059
- 'required' => array(
2060
- array('ampforwp-facebook-comments-support', '=' , 1),
2061
-
2062
-
2063
- ),
2064
- )
2065
- )
2066
- ) );
2067
-
2068
- function fb_instant_article() {
2069
- $feedname = '';
2070
- $fb_instant_article_feed = '';
2071
- $input = '';
2072
-
2073
- $feedname = 'instant_articles';
2074
- $fb_instant_article_feed = trailingslashit( site_url() ).$feedname ;
2075
- $input = '<a href=" '. $fb_instant_article_feed . '" target="_blank">' . esc_url( $fb_instant_article_feed ). '</a>' ;
2076
-
2077
- return strip_tags($input, '<a>');
2078
- }
2079
-
2080
- // Facebook Instant Articles
2081
- Redux::setSection( $opt_name, array(
2082
- 'title' => __( 'Instant Articles', 'accelerated-mobile-pages' ),
2083
- 'id' => 'fb-instant-article',
2084
- 'subsection' => true,
2085
- 'fields' => array(
2086
- array(
2087
- 'id' =>'fb-instant-article-switch',
2088
- 'type' => 'switch',
2089
- 'title' => __('Facebook Instant Articles Support', 'accelerated-mobile-pages'),
2090
- 'default' => 0,
2091
- 'true' => 'true',
2092
- 'false' => 'false',
2093
- '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'),
2094
- ),
2095
- array(
2096
- 'id' => 'fb-instant-article-feed-url',
2097
- 'type' => 'info',
2098
- 'style' => 'critical',
2099
- 'desc' => fb_instant_article(),
2100
- 'title' => __('Facebook Instant Articles Feed URL', 'accelerated-mobile-pages'),
2101
- 'required' => array('fb-instant-article-switch', '=', 1)
2102
- ),
2103
- array(
2104
- 'id' => 'ampforwp-fb-instant-article-posts',
2105
- 'type' => 'text',
2106
- 'title' => __('Number of Posts', 'accelerated-mobile-pages'),
2107
- 'subtitle' => __('Enter the number of posts to generate for Instant Articles.', 'accelerated-mobile-pages'),
2108
- 'desc' => __('Leave this empty to generate All Posts.', 'accelerated-mobile-pages'),
2109
- 'required' => array('fb-instant-article-switch', '=', 1),
2110
- 'default' => '50'
2111
- ),
2112
- array(
2113
- 'id' => 'ampforwp-instant-article-author-bio',
2114
- 'type' => 'switch',
2115
- 'title' => __('Author Bio', 'accelerated-mobile-pages'),
2116
- 'default' => 0,
2117
- 'true' => 'true',
2118
- 'false' => 'false',
2119
- 'subtitle' => __('Enable/Disable Author Bio', 'accelerated-mobile-pages'),
2120
- 'required' => array('fb-instant-article-switch', '=', 1)
2121
- ),
2122
- array(
2123
- 'id' => 'fb-instant-article-ads',
2124
- 'type' => 'switch',
2125
- 'title' => __('Advertisement', 'accelerated-mobile-pages'),
2126
- 'default' => 0,
2127
- 'true' => 'true',
2128
- 'false' => 'false',
2129
- 'desc' => __('Switch this on to enable advertising on Instant Article pages.', 'accelerated-mobile-pages'),
2130
- 'required' => array('fb-instant-article-switch', '=', 1)
2131
- ),
2132
- array(
2133
- 'id' => 'fb-instant-article-ad-id',
2134
- 'type' => 'text',
2135
- 'title' => __('Enter your Audience Network Placement ID', 'accelerated-mobile-pages'),
2136
- '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'),
2137
- 'required' => array('fb-instant-article-ads', '=', 1)
2138
- ),
2139
- array(
2140
- 'id' => 'fb-instant-article-ad-density-setup',
2141
- 'type' => 'select',
2142
- 'title' => __('How often should ads show in Instant Article pages', 'accelerated-mobile-pages'),
2143
- 'options' => array(
2144
- 'default' => __('Every 250 words', 'accelerated-mobile-pages' ),
2145
- 'medium' => __('Every 350 words', 'accelerated-mobile-pages' ),
2146
- 'low' => __('Every 500 words', 'accelerated-mobile-pages' ),
2147
- ),
2148
- 'required' => array('fb-instant-article-ads', '=', 1),
2149
- 'default' => 'default',
2150
- ),
2151
- array(
2152
- 'id' => 'fb-instant-article-analytics',
2153
- 'type' => 'switch',
2154
- 'title' => __('Analytics', 'accelerated-mobile-pages'),
2155
- 'default' => 0,
2156
- 'true' => 'true',
2157
- 'false' => 'false',
2158
- 'desc' => __('Switch this on to enable analytics on Instant Article pages.', 'accelerated-mobile-pages'),
2159
- 'required' => array('fb-instant-article-switch', '=', 1)
2160
- ),
2161
- array(
2162
- 'id' => 'fb-instant-article-analytics-code',
2163
- 'type' => 'textarea',
2164
- 'title' => __('Enter your Analytics script code', 'accelerated-mobile-pages'),
2165
- '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'),
2166
- 'required' => array('fb-instant-article-analytics', '=', 1)
2167
- ),
2168
- ),
2169
- )
2170
- );
2171
-
2172
- // Hide AMP Bulk Tools
2173
- Redux::setSection( $opt_name, array(
2174
- 'title' => __( 'Hide AMP Bulk Tools', 'accelerated-mobile-pages' ),
2175
- 'id' => 'hide-amp-section',
2176
- 'subsection' => true,
2177
- 'desc' => 'Here are some Advanced options to help you exclude AMP from your prefered pages',
2178
- 'fields' => array(
2179
-
2180
- array(
2181
- 'id' => 'amp-pages-meta-default',
2182
- 'type' => 'select',
2183
- 'title' => __( 'Individual AMP Page (Bulk Edit)', 'accelerated-mobile-pages' ),
2184
- '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' ),
2185
- 'desc' => __( 'NOTE: Changes will overwrite the previous settings.', 'accelerated-mobile-pages' ),
2186
- 'options' => array(
2187
- 'show' => __('Show by Default', 'accelerated-mobile-pages' ),
2188
- 'hide' => __('Hide by default', 'accelerated-mobile-pages' ),
2189
- ),
2190
- 'default' => 'show',
2191
- 'required'=>array('amp-on-off-for-all-pages','=','1'),
2192
- ),
2193
- array(
2194
- 'id' =>'hide-amp-categories',
2195
- 'type' => 'checkbox',
2196
- 'title' => __('Select Categories to Hide AMP'),
2197
- 'subtitle' => __( 'Hide AMP from all the posts of a selected category.', 'accelerated-mobile-pages' ),
2198
- 'default' => 0,
2199
- 'data' => 'categories',
2200
- ),
2201
- )
2202
- )
2203
- );
2204
-
2205
- // Advance Settings SECTION
2206
- Redux::setSection( $opt_name, array(
2207
- 'title' => __( 'Advance Settings', 'accelerated-mobile-pages' ),
2208
- 'desc' => __( 'This section has some advanced settings, please use it with care','accelerated-mobile-pages'),
2209
- 'id' => 'amp-advance',
2210
- 'subsection' => true,
2211
- 'fields' => array(
2212
-
2213
- /* array(
2214
- 'id' => 'ampforwp-homepage-on-off-support',
2215
- 'type' => 'switch',
2216
- 'title' => __('Homepage Support', 'accelerated-mobile-pages'),
2217
- 'subtitle' => __('Enable/Disable Home page using this switch.', 'accelerated-mobile-pages'),
2218
- 'default' => '1'
2219
- ),*/
2220
-
2221
- array(
2222
- 'id' => 'amp-mobile-redirection',
2223
- 'type' => 'switch',
2224
- 'title' => __('Mobile Redirection', 'accelerated-mobile-pages'),
2225
- 'subtitle' => __('
2226
- Enable AMP for your mobile users. Give your visitors a Faster mobile User Experience.','accelerated-mobile-pages'),
2227
- 'default' => 0,
2228
-
2229
- ),
2230
- // End-point option
2231
- array(
2232
- 'id' => 'amp-core-end-point',
2233
- 'type' => 'switch',
2234
- 'title' => ('Change End Point to ?amp'),
2235
- 'default' => 0,
2236
- 'subtitle' => 'Enable this option when /amp/ is giving 404 after resaving the permalink settings.',
2237
- '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.' ),
2238
- ),
2239
- array(
2240
- 'id' => 'amp-header-text-area-for-html',
2241
- 'type' => 'textarea',
2242
- 'title' => __('Enter HTML in Head', 'accelerated-mobile-pages'),
2243
- 'subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
2244
- 'desc' => __('check your markup here (enter markup between HEAD tag) : https://validator.ampproject.org/', 'accelerated-mobile-pages'),
2245
- 'default' => ''
2246
- ),
2247
- array(
2248
- 'id' => 'amp-body-text-area',
2249
- 'type' => 'textarea',
2250
- 'title' => __('Enter HTML in Body (beginning of body tag) ', 'accelerated-mobile-pages'),
2251
- 'subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
2252
- 'desc' => __('check your markup here (enter markup in the beginning of body tag) : https://validator.ampproject.org/', 'accelerated-mobile-pages'),
2253
- 'default' => ''
2254
- ),
2255
- array(
2256
- 'id' => 'amp-footer-text-area-for-html',
2257
- 'type' => 'textarea',
2258
- 'title' => __('Enter HTML in Footer', 'accelerated-mobile-pages'),
2259
- 'subtitle' => __('please enter markup that is AMP validated', 'accelerated-mobile-pages'),
2260
- 'desc' => __('check your markup here (enter markup between BODY tag) : https://validator.ampproject.org/',
2261
- 'accelerated-mobile-pages'),
2262
- 'default' => ''
2263
- ),
2264
- array(
2265
- 'id' => 'ampforwp-auto-amp-menu-link',
2266
- 'type' => 'switch',
2267
- 'title' => __('Auto Add AMP in Menu URL', 'accelerated-mobile-pages'),
2268
- 'subtitle' => __('Automatically add <code>AMP</code> at the end of menu url', 'accelerated-mobile-pages'),
2269
- 'true' => 'true',
2270
- 'false' => 'false',
2271
- 'default' => 0,
2272
- //'required' => array('ampforwp-amp-menu', '=' , '1')
2273
- ),
2274
- //Category Base Removal in AMP
2275
- array(
2276
- 'id' => 'ampforwp-category-base-removel-link',
2277
- 'type' => 'switch',
2278
- 'title' => __('Category base remove in AMP', 'accelerated-mobile-pages'),
2279
- 'subtitle' => __('Category base removal in <code>AMP</code> from url', 'accelerated-mobile-pages'),
2280
- 'true' => 'true',
2281
- 'false' => 'false',
2282
- 'default' => 0,
2283
-
2284
- ),
2285
- //Tag base Removal in AMP
2286
- array(
2287
- 'id' => 'ampforwp-tag-base-removal-link',
2288
- 'type' => 'switch',
2289
- 'title' => __('Tag base remove in AMP', 'accelerated-mobile-pages'),
2290
- 'subtitle' => __('Tag base remove in <code>AMP</code> from url', 'accelerated-mobile-pages'),
2291
- 'true' => 'true',
2292
- 'false' => 'false',
2293
- 'default' => 0,
2294
-
2295
- ),
2296
- // Featured Image from Custom Fields
2297
- array(
2298
- 'id' => 'ampforwp-custom-fields-featured-image-switch',
2299
- 'type' => 'switch',
2300
- 'title' => __('Featured Image from Custom Fields', 'accelerated-mobile-pages'),
2301
- 'subtitle' => __('This will allow you to add Featured Image from Custom Fields', 'accelerated-mobile-pages'),
2302
- 'true' => 'true',
2303
- 'false' => 'false',
2304
- 'default' => 0,
2305
- ),
2306
- array(
2307
- 'id' => 'ampforwp-custom-fields-featured-image',
2308
- 'type' => 'text',
2309
- 'title' => __('Custom Field For Featured Image', 'accelerated-mobile-pages'),
2310
- 'default' => __ ('','accelerated-mobile-pages'),
2311
- 'placeholder'=>__('Write the Custom Field of Featured Image','accelerated-mobile-pages'),
2312
- 'required' => array( 'ampforwp-custom-fields-featured-image-switch', '=' , 1 )
2313
- ),
2314
- // Grab the First Image for Featured Image if there is none
2315
- array(
2316
- 'id' => 'ampforwp-featured-image-from-content',
2317
- 'type' => 'switch',
2318
- 'title' => __('Featured Image from The Content', 'accelerated-mobile-pages'),
2319
- 'subtitle' => __('Show the first image of the content as Featured Image if there is no featured image', 'accelerated-mobile-pages'),
2320
- 'true' => 'true',
2321
- 'false' => 'false',
2322
- 'default' => 0,
2323
- ),
2324
- // Duplicate Featured Image
2325
- array(
2326
- 'id' => 'ampforwp-duplicate-featured-image',
2327
- 'type' => 'switch',
2328
- 'title' => __('Duplicate Featured Image', 'accelerated-mobile-pages'),
2329
- 'subtitle' => __('Turn On the support if you want to show the Featured Image if it already exists in post content.', 'accelerated-mobile-pages'),
2330
- 'true' => 'true',
2331
- 'false' => 'false',
2332
- 'default' => 0,
2333
- ),
2334
- array(
2335
- 'id' => 'amp-meta-permissions',
2336
- 'type' => 'select',
2337
- 'title' => __('Show Metabox in Post Editor to', 'accelerated-mobile-pages'),
2338
- 'options' => array(
2339
- 'all' => 'All users who can post',
2340
- 'admin' => 'Only to Admin'
2341
- ),
2342
- 'default' => 'all',
2343
- ),
2344
- array(
2345
- 'id' => 'ampforwp-development-mode',
2346
- 'type' => 'switch',
2347
- 'title' => __('Dev Mode in AMP'),
2348
- 'subtitle' => __('This will enable the Development mode in AMP', 'accelerated-mobile-pages'),
2349
- 'true' => 'true',
2350
- 'false' => 'false',
2351
- 'default' => 0,
2352
- ),
2353
- array(
2354
- 'id' => 'ampforwp-development-mode-notice',
2355
- 'type' => 'info',
2356
- 'style' => 'info',
2357
- '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'),
2358
- 'title' => __('Dev Mode', 'accelerated-mobile-pages'),
2359
- 'required' => array('ampforwp-development-mode', '=', 1)
2360
- ),
2361
- array(
2362
- 'id' => 'ampforwp-update-notification-bar',
2363
- 'type' => 'switch',
2364
- 'title' => __('Plugin Update Notification Bar'),
2365
- 'subtitle' => __('Enable/Disable the Plugin Update Notification Bar', 'accelerated-mobile-pages'),
2366
- 'true' => 'true',
2367
- 'false' => 'false',
2368
- 'default' => 1,
2369
- ),
2370
- array(
2371
- 'id' => 'ampforwp-wptexturize',
2372
- 'type' => 'switch',
2373
- 'title' => __('Disable wptexturize'),
2374
- 'subtitle' => __('Enable this option to Disable wptexturize Globally', 'accelerated-mobile-pages'),
2375
- 'true' => 'true',
2376
- 'false' => 'false',
2377
- 'default' => 0,
2378
- ),
2379
-
2380
-
2381
- ),
2382
-
2383
- ) );
2384
-
2385
-
2386
- // Translation Panel
2387
- Redux::setSection( $opt_name, array(
2388
- 'title' => __( 'Translation Panel', 'accelerated-mobile-pages' ),
2389
- 'desc' => __( 'Please translate the following words of page accordingly else default content is in English Language', 'accelerated-mobile-pages' ),
2390
- 'id' => 'amp-translator',
2391
- 'subsection' => true,
2392
- 'fields' => array(
2393
- array(
2394
- 'id' => 'amp-use-pot',
2395
- 'type' => 'switch',
2396
- 'title' => __('Use POT file method of Translation', 'accelerated-mobile-pages'),
2397
- 'subtitle' => __('Else you can use normal translation method', 'accelerated-mobile-pages'),
2398
- 'desc' => __('Use this if you want Multilingual Translations', 'accelerated-mobile-pages'),
2399
- 'default' => 0
2400
- ),
2401
- array(
2402
- 'id' => 'amp-translator-breadcrumbs-homepage-text',
2403
- 'type' => 'text',
2404
- 'title' => __('Breadcrumbs Homepage Title', 'accelerated-mobile-pages'),
2405
- 'default' => __('Homepage','accelerated-mobile-pages'),
2406
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2407
- 'required' => array( 'amp-use-pot', '=' , 0 )
2408
- ),
2409
- array(
2410
- 'id' => 'amp-translator-show-more-posts-text',
2411
- 'type' => 'text',
2412
- 'title' => __('Show more Posts', 'accelerated-mobile-pages'),
2413
- 'default' => __('Show more Posts','accelerated-mobile-pages'),
2414
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2415
- 'required' => array( 'amp-use-pot', '=' , 0 )
2416
- ),
2417
- array(
2418
- 'id' => 'amp-translator-show-previous-posts-text',
2419
- 'type' => 'text',
2420
- 'title' => __('Show previous Posts', 'accelerated-mobile-pages'),
2421
- 'default' => __('Show previous Posts','accelerated-mobile-pages'),
2422
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2423
- 'required' => array( 'amp-use-pot', '=' , 0 )
2424
- ),
2425
- array(
2426
- 'id' => 'amp-translator-top-text',
2427
- 'type' => 'text',
2428
- 'title' => __('Top', 'accelerated-mobile-pages'),
2429
- 'default' => __('Top','accelerated-mobile-pages'),
2430
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2431
- 'required' => array( 'amp-use-pot', '=' , 0 )
2432
- ),
2433
- array(
2434
- 'id' => 'amp-translator-non-amp-page-text',
2435
- 'type' => 'text',
2436
- 'title' => __('View Non-AMP Version', 'accelerated-mobile-pages'),
2437
- 'default' => __('View Non-AMP Version','accelerated-mobile-pages'),
2438
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2439
- 'required' => array( 'amp-use-pot', '=' , 0 )
2440
- ),
2441
- array(
2442
- 'id' => 'amp-translator-related-text',
2443
- 'type' => 'text',
2444
- 'title' => __('Related Post', 'accelerated-mobile-pages'),
2445
- 'default' => __('Related Post','accelerated-mobile-pages'),
2446
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2447
- 'required' => array( 'amp-use-pot', '=' , 0 )
2448
- ),
2449
- array(
2450
- 'id' => 'amp-translator-recent-text',
2451
- 'type' => 'text',
2452
- 'title' => __('Recent Posts', 'accelerated-mobile-pages'),
2453
- 'default' => __('Recent Posts','accelerated-mobile-pages'),
2454
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2455
- 'required' => array( 'amp-use-pot', '=' , 0 )
2456
- ),
2457
- array(
2458
- 'id' => 'amp-translator-navigate-text',
2459
- 'type' => 'text',
2460
- 'title' => __('Navigate', 'accelerated-mobile-pages'),
2461
- 'default' => __('Navigate','accelerated-mobile-pages'),
2462
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2463
- 'required' => array( 'amp-use-pot', '=' , 0 )
2464
- ),
2465
- array(
2466
- 'id' => 'amp-translator-on-text',
2467
- 'type' => 'text',
2468
- 'title' => __('On', 'accelerated-mobile-pages'),
2469
- 'default' => __('On','accelerated-mobile-pages'),
2470
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2471
- 'required' => array( 'amp-use-pot', '=' , 0 )
2472
- ),
2473
- array(
2474
- 'id' => 'amp-translator-next-text',
2475
- 'type' => 'text',
2476
- 'title' => __('Next', 'accelerated-mobile-pages'),
2477
- 'default' => __('Next','accelerated-mobile-pages'),
2478
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2479
- 'required' => array( 'amp-use-pot', '=' , 0 )
2480
- ),
2481
- array(
2482
- 'id' => 'amp-translator-previous-text',
2483
- 'type' => 'text',
2484
- 'title' => __('Previous', 'accelerated-mobile-pages'),
2485
- 'default' => __('Previous','accelerated-mobile-pages'),
2486
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2487
- 'required' => array( 'amp-use-pot', '=' , 0 )
2488
- ),
2489
- array(
2490
- 'id' => 'amp-translator-footer-text',
2491
- 'type' => 'textarea',
2492
- 'title' => __('Footer', 'accelerated-mobile-pages'),
2493
- 'default' => __('All Rights Reserved','accelerated-mobile-pages'),
2494
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2495
- 'required' => array( 'amp-use-pot', '=' , 0 )
2496
- ),
2497
- array(
2498
- 'id' => 'amp-translator-categories-text',
2499
- 'type' => 'text',
2500
- 'title' => __('Categories', 'accelerated-mobile-pages'),
2501
- 'default' => __('Categories: ','accelerated-mobile-pages'),
2502
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2503
- 'required' => array( 'amp-use-pot', '=' , 0 )
2504
- ),
2505
- array(
2506
- 'id' => 'amp-translator-tags-text',
2507
- 'type' => 'text',
2508
- 'title' => __('Tags', 'accelerated-mobile-pages'),
2509
- 'default' => __('Tags: ','accelerated-mobile-pages'),
2510
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2511
- 'required' => array( 'amp-use-pot', '=' , 0 )
2512
- ),
2513
- array(
2514
- 'id' => 'amp-translator-by-text',
2515
- 'type' => 'text',
2516
- 'title' => __('By', 'accelerated-mobile-pages'),
2517
- 'default' => __('By','accelerated-mobile-pages'),
2518
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2519
- 'required' => array( 'amp-use-pot', '=' , 0 )
2520
- ),
2521
- array(
2522
- 'id' => 'amp-translator-published-by',
2523
- 'type' => 'text',
2524
- 'title' => __('Published by', 'accelerated-mobile-pages'),
2525
- 'default' => __('Published by','accelerated-mobile-pages'),
2526
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2527
- 'required' => array( 'amp-use-pot', '=' , 0 )
2528
- ),
2529
- array(
2530
- 'id' => 'amp-translator-in-designthree',
2531
- 'type' => 'text',
2532
- 'title' => __('in', 'accelerated-mobile-pages'),
2533
- 'default' =>__( 'in','accelerated-mobile-pages'),
2534
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2535
- 'required' => array( 'amp-use-pot', '=' , 0 )
2536
- ),
2537
- array(
2538
- 'id' => 'amp-translator-view-comments-text',
2539
- 'type' => 'text',
2540
- 'title' => __('View Comments', 'accelerated-mobile-pages'),
2541
- 'default' => __('View Comments','accelerated-mobile-pages'),
2542
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2543
- 'required' => array( 'amp-use-pot', '=' , 0 )
2544
- ),
2545
- array(
2546
- 'id' => 'amp-translator-leave-a-comment-text',
2547
- 'type' => 'text',
2548
- 'title' => __('Leave a Comment', 'accelerated-mobile-pages'),
2549
- 'default' => __('Leave a Comment','accelerated-mobile-pages'),
2550
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2551
- 'required' => array( 'amp-use-pot', '=' , 0 )
2552
- ),
2553
- array(
2554
- 'id' => 'amp-translator-at-text',
2555
- 'type' => 'text',
2556
- 'title' => __('at', 'accelerated-mobile-pages'),
2557
- 'default' => __('at','accelerated-mobile-pages'),
2558
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2559
- 'required' => array( 'amp-use-pot', '=' , 0 )
2560
- ),
2561
- array(
2562
- 'id' => 'amp-translator-says-text',
2563
- 'type' => 'text',
2564
- 'title' => __('says', 'accelerated-mobile-pages'),
2565
- 'default' =>__( 'says','accelerated-mobile-pages'),
2566
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2567
- 'required' => array( 'amp-use-pot', '=' , 0 )
2568
- ),
2569
- array(
2570
- 'id' => 'amp-translator-Edit-text',
2571
- 'type' => 'text',
2572
- 'title' => __('Edit', 'accelerated-mobile-pages'),
2573
- 'default' => __('Edit','accelerated-mobile-pages'),
2574
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2575
- 'required' => array( 'amp-use-pot', '=' , 0 )
2576
- ),
2577
- array(
2578
- 'id' => 'amp-translator-ago-date-text',
2579
- 'type' => 'text',
2580
- 'title' => __('ago', 'accelerated-mobile-pages'),
2581
- 'default' => __('ago','accelerated-mobile-pages'),
2582
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2583
- 'required' => array( 'amp-use-pot', '=' , 0 )
2584
- ),
2585
- array(
2586
- 'id' => 'amp-translator-modified-date-text',
2587
- 'type' => 'text',
2588
- 'title' => __('This post was last modified on ', 'accelerated-mobile-pages'),
2589
- 'default' => __('This post was last modified on ','accelerated-mobile-pages'),
2590
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2591
- 'required' => array( 'amp-use-pot', '=' , 0 )
2592
- ),
2593
- array(
2594
- 'id' => 'amp-translator-archive-cat-text',
2595
- 'type' => 'text',
2596
- 'title' => __('Category (archive title)', 'accelerated-mobile-pages'),
2597
- 'default' => __('Category: ','accelerated-mobile-pages'),
2598
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2599
- 'required' => array( 'amp-use-pot', '=' , 0 )
2600
- ),
2601
- array(
2602
- 'id' => 'amp-translator-archive-tag-text',
2603
- 'type' => 'text',
2604
- 'title' => __('Tag (archive title)', 'accelerated-mobile-pages'),
2605
- 'default' => __('Tag: ','accelerated-mobile-pages'),
2606
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2607
- 'required' => array( 'amp-use-pot', '=' , 0 )
2608
- ),
2609
- array(
2610
- 'id' => 'amp-translator-show-more-text',
2611
- 'type' => 'text',
2612
- 'title' => __('View More Posts (Widget Button)', 'accelerated-mobile-pages'),
2613
- 'default' => __('View More Posts','accelerated-mobile-pages'),
2614
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2615
- 'required' => array( 'amp-use-pot', '=' , 0 )
2616
- ),
2617
- array(
2618
- 'id' => 'amp-translator-next-read-text',
2619
- 'type' => 'text',
2620
- 'title' => __('Next Read', 'accelerated-mobile-pages'),
2621
- 'default' => __('Next Read: ','accelerated-mobile-pages'),
2622
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2623
- 'required' => array( 'amp-use-pot', '=' , 0 )
2624
- ),
2625
- array(
2626
- 'id' => 'amp-translator-via-text',
2627
- 'type' => 'text',
2628
- 'title' => __('via', 'accelerated-mobile-pages'),
2629
- 'default' => __('via','accelerated-mobile-pages'),
2630
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2631
- 'required' => array( 'amp-use-pot', '=' , 0 )
2632
- ),
2633
- array(
2634
- 'id' => 'amp-translator-share-text',
2635
- 'type' => 'text',
2636
- 'title' => __('Share', 'accelerated-mobile-pages'),
2637
- 'default' => __('Share','accelerated-mobile-pages'),
2638
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2639
- 'required' => array( 'amp-use-pot', '=' , 0 )
2640
- ),
2641
- array(
2642
- 'id' => 'amp-translator-search-text',
2643
- 'type' => 'text',
2644
- 'title' => __(' You searched for: ', 'accelerated-mobile-pages'),
2645
- 'default' => __(' You searched for: ','accelerated-mobile-pages'),
2646
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2647
- 'required' => array( 'amp-use-pot', '=' , 0 )
2648
- ),
2649
- array(
2650
- 'id' => 'amp-translator-search-no-found',
2651
- 'type' => 'text',
2652
- 'title' => __(' It seems we can\'t find what you\'re looking for. ', 'accelerated-mobile-pages'),
2653
- 'default' => __(' It seems we can\'t find what you\'re looking for. ','accelerated-mobile-pages'),
2654
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2655
- 'required' => array( 'amp-use-pot', '=' , 0 )
2656
- ),
2657
- array(
2658
- 'id' => 'design-3-search-subsection',
2659
- 'type' => 'section',
2660
- 'title' => __('Search bar Translation Text', 'accelerated-mobile-pages'),
2661
- 'indent' => true,
2662
- 'required' => array( 'amp-use-pot', '=' , 0 )
2663
- ),
2664
- array(
2665
- 'id' => 'ampforwp-search-placeholder',
2666
- 'type' => 'text',
2667
- 'title' => __('Type Here', 'accelerated-mobile-pages'),
2668
- 'default' => 'Type Here','accelerated-mobile-pages'),
2669
- 'desc' => __('This is the text that gets shown in for Search Box','accelerated-mobile-pages'),
2670
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2671
- 'required' => array( 'amp-use-pot', '=' , 0 )
2672
-
2673
- ),
2674
- array(
2675
- 'id' => 'ampforwp-search-label',
2676
- 'type' => 'text',
2677
- 'title' => __('Type your search query and hit enter', 'accelerated-mobile-pages'),
2678
- 'desc' => __('This is the text that gets shown above Search Box','accelerated-mobile-pages'),
2679
- 'default' => __('Type your search query and hit enter: ','accelerated-mobile-pages'),
2680
- 'placeholder'=>__('write here','accelerated-mobile-pages'),
2681
- 'required' => array( 'amp-use-pot', '=' , 0 )
2682
-
2683
- )
2684
- ) );
2685
-
2686
-
2687
- // Appearance Section
2688
- Redux::setSection( $opt_name, array(
2689
- 'title' => __( 'Design', 'accelerated-mobile-pages' ),
2690
- 'icon' => 'el el-adjust-alt',
2691
- 'desc' => ''
2692
-
2693
- ));
2694
-
2695
- //get All design
2696
- function amp_extra_plugin_theme_header($headers){
2697
- $headers['AMP Theme Name'] = "AMP";
2698
- $headers['AMP Theme Demo'] = "AMP Demo";
2699
- return $headers;
2700
- }
2701
- add_filter("extra_plugin_headers","amp_extra_plugin_theme_header");
2702
- $themeDesign = array(
2703
- array(
2704
- 'demo_link' => 'https://ampforwp.com/demo/#one',
2705
- 'upgrade'=>true,
2706
- 'title'=>__('Design One', 'accelerated-mobile-pages' ),
2707
- 'value'=>1,
2708
- 'alt'=>__('Design One', 'accelerated-mobile-pages' ),
2709
- 'img'=>AMPFORWP_PLUGIN_DIR_URI.'/images/design-1.png',
2710
- ),
2711
- array(
2712
- 'demo_link' => 'https://ampforwp.com/demo/#two',
2713
- 'upgrade'=>true,
2714
- 'title'=>__('Design Two', 'accelerated-mobile-pages' ),
2715
- 'value'=>2,
2716
- 'alt'=>__('Design Two', 'accelerated-mobile-pages' ),
2717
- 'img'=>AMPFORWP_PLUGIN_DIR_URI.'/images/design-2.png',
2718
- ),
2719
- array(
2720
- 'demo_link' => 'https://ampforwp.com/demo/#three',
2721
- 'upgrade'=>true,
2722
- 'title'=>__('Design Three', 'accelerated-mobile-pages' ),
2723
- 'value'=>3,
2724
- 'alt'=>__('Design Three', 'accelerated-mobile-pages' ),
2725
- 'img'=>AMPFORWP_PLUGIN_DIR_URI.'/images/design-3.png',
2726
- ),
2727
- array(
2728
- 'demo_link' => 'https://ampforwp.com/demo/amp-pagebuilder/amp/',
2729
- 'upgrade' => true,
2730
- 'title' => __('Swift', 'accelerated-mobile-pages' ),
2731
- 'value' => 4,
2732
- 'alt' => __('Swift', 'accelerated-mobile-pages' ),
2733
- 'img' => AMPFORWP_PLUGIN_DIR_URI.'/images/swift.png',
2734
- ),
2735
- );
2736
- if(count(get_plugins())>0){
2737
- foreach (get_plugins() as $key => $value) {
2738
- $plugin = get_plugin_data(WP_PLUGIN_DIR.'/'.$key);
2739
- if(!empty($plugin['AMP'])){//$plugin['AMP']
2740
- $imageUrl = '';
2741
- if(file_exists(AMPFORWP_MAIN_PLUGIN_DIR.$value['TextDomain'].'/screenshot.png')){
2742
- $imageUrl = plugins_url($value['TextDomain'].'/screenshot.png');
2743
- }
2744
- $themeDesign[] = array(
2745
- 'demo_link' => $plugin['AMP Demo'],
2746
- 'upgrade'=>true,
2747
- 'title'=>$plugin['AMP'],
2748
- 'value'=>$value['TextDomain'],
2749
- 'alt'=>$plugin['AMP'],
2750
- 'img'=>$imageUrl,
2751
- );
2752
- }
2753
- }
2754
- }
2755
- // Themes Section
2756
- Redux::setSection( $opt_name, array(
2757
- 'title' => __( 'Themes', 'accelerated-mobile-pages' ), 'class' => 'ampforwp-new-element',
2758
-
2759
- 'id' => 'amp-theme-settings',
2760
- 'subsection' => true,
2761
- 'fields' => array(
2762
-
2763
- array(
2764
- 'id' => 'amp-design-selector',
2765
- 'type' => 'demolink_image_select',
2766
- 'title' => __( 'Themes Selector', 'accelerated-mobile-pages' ),
2767
- 'subtitle' => __( 'Select your design from dropdown or <br /><a href="https://ampforwp.com/themes/" style="position: relative;
2768
- top: 20px;text-decoration: none;
2769
- background: #eee;padding: 5px 8px 5px 9px;
2770
- border-radius: 30px;" target="_blank">View More AMP Themes →</a>', 'accelerated-mobile-pages' ),
2771
- 'options' => $themeDesign,
2772
- 'default' => '4'
2773
- ),
2774
- array(
2775
- 'id' => 'ampforwp_layouts_core',
2776
- 'type' => 'raw',
2777
- 'subtitle' => '<a class="amp-layouts-desc" href="https://ampforwp.com/tutorials/article/setup-use-amp-layouts/" target="_blank">How to use Layouts?</a>',
2778
- 'title' => __('AMP Layouts', 'accelerated-mobile-pages'),
2779
- 'full_width'=>true,
2780
- 'class' =>(!is_plugin_active('amp-layouts/amp-layouts.php')? '': 'hide'),//,
2781
- 'markdown'=> true,
2782
- 'desc' => '<div class="amp-layout-class">
2783
- <div class="amp_layouts_container">
2784
- '.$upcomingLayoutsDesign.'
2785
- </div>
2786
- </div>',
2787
-
2788
-
2789
- ),
2790
- array(
2791
- 'id' => 'info_theme_framework',
2792
- 'type' => 'info',
2793
- 'style' => 'success',
2794
- 'desc' => $amptfad
2795
- ),
2796
-
2797
-
2798
- )
2799
- ) );
2800
- /*---------------------*/
2801
-
2802
- // Global Theme Settings
2803
- Redux::setSection($opt_name, array(
2804
- 'title' => __( 'Global', 'accelerated-mobile-pages' ),
2805
- 'id' => 'amp-theme-global-subsection',
2806
- 'subsection' => true,
2807
- 'fields' => array(
2808
- array(
2809
- 'id' => 'colorscheme-section',
2810
- 'type' => 'section',
2811
- 'title' => __('Color Scheme', 'accelerated-mobile-pages'),
2812
- 'indent' => true,
2813
- ),
2814
- // Swift
2815
- array(
2816
- 'id' => 'swift-color-scheme',
2817
- 'title' => __('Global Color Scheme', 'accelerated-mobile-pages'),
2818
- 'subtitle' => __('Choose the color for title, anchor link','accelerated-mobile-pages'),
2819
- 'type' => 'color_rgba',
2820
- 'default' => array(
2821
- 'color' => '#005be2',
2822
- ),
2823
- 'required' => array(
2824
- array('amp-design-selector', '=' , '4')
2825
- )
2826
- ),
2827
- array(
2828
- 'id' => 'amp-opt-color-rgba-colorscheme',
2829
- 'type' => 'color_rgba',
2830
- 'title' => __('Color Scheme','accelerated-mobile-pages'),
2831
- 'default' => array(
2832
- 'color' => '#F42F42',
2833
- ),
2834
- 'required' => array(
2835
- array('amp-design-selector', '=' , '3')
2836
- )
2837
- ),
2838
- array(
2839
- 'id' => 'amp-opt-color-rgba-font',
2840
- 'type' => 'color_rgba',
2841
- 'title' => __('Color Scheme Font Color','accelerated-mobile-pages'),
2842
- 'default' => array(
2843
- 'color' => '#fff',
2844
- ),
2845
- 'required' => array(
2846
- array('amp-design-selector', '=' , '3')
2847
- )
2848
- ),
2849
- // Design 3
2850
- array(
2851
- 'id' => 'amp-opt-color-rgba-link',
2852
- 'type' => 'color_rgba',
2853
- 'title' => __('Anchor Link Color','accelerated-mobile-pages'),
2854
- 'default' => array(
2855
- 'color' => '#f42f42',
2856
- ),
2857
- 'required' => array(
2858
- array('amp-design-selector', '=' , '3')
2859
- )
2860
- ),
2861
- // Design 2
2862
- array(
2863
- 'id' => 'amp-opt-color-rgba-link-design2',
2864
- 'type' => 'color_rgba',
2865
- 'title' => __('Anchor Link Color','accelerated-mobile-pages'),
2866
- 'default' => array(
2867
- 'color' => '#0a89c0',
2868
- ),
2869
- 'required' => array(
2870
- array('amp-design-selector', '=' , '2')
2871
- )
2872
- ),
2873
- // Design 1
2874
- array(
2875
- 'id' => 'amp-opt-color-rgba-link-design1',
2876
- 'type' => 'color_rgba',
2877
- 'title' => __('Anchor Link Color','accelerated-mobile-pages'),
2878
- 'default' => array(
2879
- 'color' => '#0a89c0',
2880
- ),
2881
- 'required' => array(
2882
- array('amp-design-selector', '=' , '1')
2883
- )
2884
- ),
2885
- array(
2886
- 'id' => 'amp-opt-color-rgba-colorscheme-call',
2887
- 'type' => 'color_rgba',
2888
- 'title' => __('Call Button Color','accelerated-mobile-pages'),
2889
- 'default' => array(
2890
- 'color' => '#0a89c0',
2891
- ),
2892
- 'required' => array(
2893
- array('ampforwp-callnow-button', '=' , '1')
2894
- )
2895
- ),
2896
-
2897
- array(
2898
- 'id' => 'typography-section',
2899
- 'type' => 'section',
2900
- 'title' => __('Typography', 'accelerated-mobile-pages'),
2901
- 'indent' => true,
2902
- 'required' => array(
2903
- array('amp-design-selector', '=' , '4')
2904
- )
2905
- ),
2906
- array(
2907
- 'id' =>'google_font_api_key',
2908
- 'type' =>'text',
2909
- 'title' =>__('Google Font API key','accelerated-mobile-pages'),
2910
- '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'),
2911
- 'default' =>'',
2912
- 'required' => array(
2913
- array('amp-design-selector', '=' , '4')
2914
- )
2915
-
2916
- ),
2917
-
2918
- array(
2919
- 'id' => 'amp_font_selector',
2920
- 'type' => 'select',
2921
- 'class' => 'ampforwp-google-font-class',
2922
- 'title' => __( 'Font Selector', 'accelerated-mobile-pages' ),
2923
- 'subtitle' => __( 'Select your design from dropdown or ', 'accelerated-mobile-pages' ),
2924
- 'options' => array(
2925
- '1' => 'None',
2926
- ),
2927
- 'default' => '',
2928
- 'required' => array(
2929
- array('amp-design-selector', '=' , '4')
2930
- )
2931
-
2932
- ),
2933
-
2934
- array(
2935
- 'id' => 'amp_font_type',
2936
- 'type' => 'select',
2937
- 'class' => 'ampforwp-google-font-class',
2938
- 'multi' => true,
2939
- 'title' => __( 'Font Selector', 'accelerated-mobile-pages' ),
2940
- 'subtitle' => __( 'Select your design from dropdown', 'accelerated-mobile-pages' ),
2941
- 'options' => array(
2942
- '1' => 'none',
2943
- ),
2944
- 'default' => '',
2945
- 'required' => array(
2946
- array('amp-design-selector', '=' , '4')
2947
- )
2948
-
2949
- ),
2950
-
2951
- array(
2952
- 'id' =>'google_current_font_data',
2953
- 'type' =>'text',
2954
- 'class' => 'hide',
2955
- 'title' =>__('Google Font Current Font','accelerated-mobile-pages'),
2956
- 'default' =>'',
2957
- 'required' => array(
2958
- array('amp-design-selector', '=' , '4')
2959
- )
2960
- ),
2961
-
2962
- array(
2963
- 'id' => 'design-advanced',
2964
- 'type' => 'section',
2965
- 'title' => __('Advanced', 'accelerated-mobile-pages'),
2966
- 'indent' => true,
2967
- ),
2968
-
2969
- array(
2970
- 'id' => 'css_editor',
2971
- 'type' => 'ace_editor',
2972
- 'title' => __('Custom CSS', 'accelerated-mobile-pages'),
2973
- 'subtitle' => __('You can customize the Stylesheet of the AMP version by using this option.', 'accelerated-mobile-pages'),
2974
- 'mode' => 'css',
2975
- 'theme' => 'monokai',
2976
- 'desc' => '',
2977
- 'default' => __('/******* Paste your Custom CSS in this Editor *******/','accelerated-mobile-pages')
2978
- ),
2979
- )
2980
- ));
2981
-
2982
- // Header Elements default Color
2983
- function ampforwp_get_element_default_color() {
2984
- $default_value = get_option('redux_builder_amp', true);
2985
- $default_value = $default_value['amp-opt-color-rgba-colorscheme']['color'];
2986
- if ( empty( $default_value ) ) {
2987
- $default_value = '#333';
2988
- }
2989
- return $default_value;
2990
- }
2991
-
2992
- // Header Section
2993
- Redux::setSection( $opt_name, array(
2994
- 'title' => __( 'Header', 'accelerated-mobile-pages' ),
2995
- 'id' => 'amp-theme-header-settings',
2996
- 'subsection' => true,
2997
- 'tab' => true,
2998
- 'fields' => array(
2999
- // Swift
3000
- // Tab 1
3001
- array(
3002
- 'id' => 'header-tab-1',
3003
- 'type' => 'section',
3004
- 'title' => __('', 'accelerated-mobile-pages'),
3005
- //'label' => 'Tab 1',
3006
- 'indent' => true,
3007
- //'start' => true,
3008
- /*'required' => array(
3009
- array('amp-design-selector', '=' , '4')
3010
- ),*/
3011
- ),
3012
- array(
3013
- 'id' => 'header-type',
3014
- 'title' => __('Header Type', 'accelerated-mobile-pages'),
3015
- 'type' => 'image_select',
3016
- 'options'=> array(
3017
- '1' => array(
3018
- 'alt'=>' Header 1 ',
3019
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/head-1.png'
3020
- ),
3021
- '2' => array(
3022
- 'alt'=>' Header 2 ',
3023
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/head-2.png'
3024
- ),
3025
- '3' => array(
3026
- 'alt'=>' Header 3 ',
3027
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/head-3.png',
3028
- ),
3029
- ),
3030
- 'default'=> '1',
3031
- // 'max-width' => 200,
3032
- // 'max-height'=> 60,
3033
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3034
- ),
3035
- array(
3036
- 'id' => 'menu-type',
3037
- 'title' => __('Menu Type', 'accelerated-mobile-pages'),
3038
- 'type' => 'image_select',
3039
- 'options'=> array(
3040
- '1' => array(
3041
- 'alt'=>' Menu overlay 1 ',
3042
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/menu-1.png'
3043
- ),
3044
- ),
3045
- 'default'=> '1',
3046
- // 'max-width' => 200,
3047
- // 'max-height'=> 60,
3048
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3049
- ),
3050
-
3051
- array(
3052
- 'id' => 'primary-menu',
3053
- 'type' => 'switch',
3054
- 'title' => __('Alternative Menu', 'accelerated-mobile-pages'),
3055
- 'true' => 'true',
3056
- 'false' => 'false',
3057
- 'default' => '1',
3058
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3059
- ),
3060
- array(
3061
- 'id' => 'primary-menu-padding-control',
3062
- 'type' => 'spacing',
3063
- 'output' => array('.p-menu'),
3064
- 'mode' => 'padding',
3065
- 'units' => array('px'),
3066
- 'units_extended' => 'false',
3067
- 'title' => __('Alt Menu Padding', 'accelerated-mobile-pages'),
3068
- 'default' => array(
3069
- 'padding-top' => '12px',
3070
- 'padding-right' => '25px',
3071
- 'padding-bottom' => '12px',
3072
- 'padding-left' => '25px',
3073
- 'units' => 'px',
3074
- ),
3075
- 'required' => array(
3076
- array('primary-menu','=',1)
3077
- )
3078
- ),
3079
- array(
3080
- 'id' => 'primary-menu-text-scheme',
3081
- 'title' => __('Alt Menu Text', 'accelerated-mobile-pages'),
3082
- 'type' => 'color_rgba',
3083
- 'default' => array(
3084
- 'rgba' => 'rgb(53, 53, 53)',
3085
- ),
3086
- 'required' => array(
3087
- array('primary-menu','=',1)
3088
- )
3089
- ),
3090
- array(
3091
- 'id' => 'primary-menu-background-scheme',
3092
- 'title' => __('Alt Menu Background', 'accelerated-mobile-pages'),
3093
- 'type' => 'color_rgba',
3094
- 'default' => array(
3095
- 'rgba' => 'rgb(239, 239, 239)',
3096
- ),
3097
- 'required' => array(
3098
- array('primary-menu','=',1)
3099
- )
3100
- ),
3101
- array(
3102
- 'id' => 'signin-button',
3103
- 'title' => __('Button Customize', 'accelerated-mobile-pages'),
3104
- 'subtitle' => __('You can do the customization here ','accelerated-mobile-pages'),
3105
- 'type' => 'switch',
3106
- 'default' => '0',
3107
- 'required' => array(
3108
- array('header-type','=',2)
3109
- )
3110
- ),
3111
- array(
3112
- 'id' => 'signin-button-text',
3113
- 'title' => __('Button Text', 'accelerated-mobile-pages'),
3114
- 'subtitle' => __('You can write your required text ','accelerated-mobile-pages'),
3115
- 'type' => 'text',
3116
- 'default' => 'Sign up free',
3117
- 'required' => array(
3118
- array('signin-button','=',1)
3119
- )
3120
- ),
3121
- array(
3122
- 'id' => 'signin-button-link',
3123
- 'title' => __('Button Link', 'accelerated-mobile-pages'),
3124
- 'subtitle' => __('You can add the Link here ','accelerated-mobile-pages'),
3125
- 'type' => 'text',
3126
- 'default' => '#',
3127
- 'required' => array(
3128
- array('signin-button','=',1)
3129
- )
3130
- ),
3131
- array(
3132
- 'id' => 'signin-button-style',
3133
- 'title' => __('Button Styles', 'accelerated-mobile-pages'),
3134
- 'subtitle' => __('You can change the button here','accelerated-mobile-pages'),
3135
- 'type' => 'switch',
3136
- 'default' => '0',
3137
- 'required' => array(
3138
- array('signin-button','=',1)
3139
- )
3140
- ),
3141
- array(
3142
- 'id' => 'signin-button-border-line',
3143
- 'title' => __('Button Border Line', 'accelerated-mobile-pages'),
3144
- 'subtitle' => __('You can change the button border line','accelerated-mobile-pages'),
3145
- 'type' => 'text',
3146
- 'default' => '2',
3147
- 'required' => array(
3148
- array('signin-button-style','=',1)
3149
- )
3150
- ),
3151
- array(
3152
- 'id' => 'signin-button-text-color',
3153
- 'title' => __('Button Text Color', 'accelerated-mobile-pages'),
3154
- 'subtitle' => __('Choose the color for Button Texxt','accelerated-mobile-pages'),
3155
- 'type' => 'color_rgba',
3156
- 'default' => array(
3157
- 'rgba' => 'rgb(0, 0, 0)',
3158
- ),
3159
- 'required' => array(
3160
- array('signin-button-style','=',1)
3161
- )
3162
- ),
3163
- array(
3164
- 'id' => 'signin-button-border-color',
3165
- 'title' => __('Button Border Line Color', 'accelerated-mobile-pages'),
3166
- 'subtitle' => __('Choose the color for Button Border Line','accelerated-mobile-pages'),
3167
- 'type' => 'color_rgba',
3168
- 'default' => array(
3169
- 'rgba' => 'rgb(0, 0, 0)',
3170
- ),
3171
- 'required' => array(
3172
- array('signin-button-style','=',1)
3173
- )
3174
- ),
3175
- array(
3176
- 'id' => 'border-type',
3177
- 'title' => __('Border Type', 'amptechtheme'),
3178
- 'type' => 'select',
3179
- 'options'=> array(
3180
- '1' => 'Square',
3181
- '2' => 'Round',
3182
- '3' => 'Custom'
3183
- ),
3184
- 'default'=> '1',
3185
- 'required' => array( array('signin-button', '=' ,1) ),
3186
- ),
3187
- array(
3188
- 'id' => 'border-radius',
3189
- 'title' => __('Customize Border Radius', 'accelerated-mobile-pages'),
3190
- 'subtitle' => __('You can change the border radius','accelerated-mobile-pages'),
3191
- 'type' => 'text',
3192
- 'default' => '10',
3193
- 'required' => array(
3194
- array('border-type','=',3)
3195
- )
3196
- ),
3197
- array(
3198
- 'id' => 'ampforwp-amp-menu',
3199
- 'type' => 'switch',
3200
- 'title' => __('Navigation Menu', 'accelerated-mobile-pages'),
3201
- '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'),
3202
- 'subtitle' => __('Enable/Disable Menu from header', 'accelerated-mobile-pages'),
3203
- 'true' => 'true',
3204
- 'false' => 'false',
3205
- 'default' => 1,
3206
- 'required' => array(array('amp-design-selector', '!=' , '4')),
3207
-
3208
- ),
3209
- // Call Now button
3210
- array(
3211
- 'id' => 'ampforwp-callnow-button',
3212
- 'type' => 'switch',
3213
- 'title' => __('Call Now Button', 'accelerated-mobile-pages'),
3214
- 'true' => 'true',
3215
- 'false' => 'false',
3216
- 'required' => array(
3217
- array('amp-design-selector', '!=' , '1')
3218
- ),
3219
- 'default' => 0
3220
- ),
3221
- array(
3222
- 'id' =>'enable-amp-call-numberfield',
3223
- 'type' => 'text',
3224
- 'required' => array(
3225
- array('ampforwp-callnow-button', '=' , '1'),
3226
- array('amp-design-selector', '!=' , '1')
3227
- ),
3228
- 'title' => __('Enter Phone Number', 'accelerated-mobile-pages'),
3229
- 'default' => '',
3230
- ),
3231
- array(
3232
- 'id' =>'amp-on-off-support-for-non-amp-home-page',
3233
- 'type' => 'switch',
3234
- 'title' => __('Non-AMP HomePage link in Header and Logo', 'accelerated-mobile-pages'),
3235
- 'subtitle' => __('If you want users in header to go to non-AMP website from the Header', 'accelerated-mobile-pages'),
3236
- 'default' => 0,
3237
- ),
3238
- array(
3239
- 'id' => 'amp-opt-sticky-head',
3240
- 'type' => 'switch',
3241
- 'title' => __('Make Header UnSticky','accelerated-mobile-pages'),
3242
- 'required' => array(
3243
- array('amp-design-selector', '=' , '3')
3244
- ),
3245
- 'subtitle' => __('Turning it ON will remove the sticky head from the design.', 'accelerated-mobile-pages' ),
3246
- 'default' => '0'
3247
- ),
3248
- array(
3249
- 'id' => 'amp-design-3-search-feature',
3250
- 'type' => 'switch',
3251
- 'title' => __( 'Search', 'accelerated-mobile-pages' ),
3252
- 'required' => array(
3253
- array('amp-design-selector', '=' , '3')
3254
- ),
3255
- 'default' => '0'
3256
- ),
3257
-
3258
- array(
3259
- 'id' => 'amp-design-2-search-feature',
3260
- 'type' => 'switch',
3261
- 'title' => __( 'Search', 'accelerated-mobile-pages' ),
3262
- 'required' => array(
3263
- array('amp-design-selector', '=' , '2')
3264
- ),
3265
- 'default' => '0'
3266
- ),
3267
-
3268
- array(
3269
- 'id' => 'amp-design-1-search-feature',
3270
- 'type' => 'switch',
3271
- 'title' => __( 'Search', 'accelerated-mobile-pages' ),
3272
- 'required' => array(
3273
- array('amp-design-selector', '=' , '1')
3274
- ),
3275
- 'default' => '0'
3276
- ),
3277
- array(
3278
- 'id' => 'amp-swift-search-feature',
3279
- 'type' => 'switch',
3280
- 'title' => __( 'Search', 'accelerated-mobile-pages' ),
3281
- 'required' => array(
3282
- array('amp-design-selector', '=' , '4')
3283
- ),
3284
- 'default' => '1'
3285
- ),
3286
-
3287
- array(
3288
- 'id' => 'amp-opt-color-rgba-headercolor',
3289
- 'type' => 'color_rgba',
3290
- 'title' => __('Header Background','accelerated-mobile-pages'),
3291
- 'default' => array(
3292
- 'color' => '#FFFFFF',
3293
- ),
3294
- 'required' => array(
3295
- array('amp-design-selector', '=' , '3')
3296
- )
3297
- ),
3298
- array(
3299
- 'id' => 'amp-opt-color-rgba-headerelements',
3300
- 'type' => 'color_rgba',
3301
- 'title' => __('Header Elements','accelerated-mobile-pages'),
3302
- 'default' => array(
3303
- 'color' => ampforwp_get_element_default_color(),
3304
- ),
3305
- 'required' => array(
3306
- array('amp-design-selector', '=' , '3')
3307
- )
3308
- ),
3309
- // Tab 1 end
3310
- /* array(
3311
- 'id' => 'header-tab-1-end',
3312
- 'type' => 'section',
3313
- 'title' => __('Tab 1', 'accelerated-mobile-pages'),
3314
- 'end' => true,
3315
- /*'required' => array(
3316
- array('amp-design-selector', '=' , '4')
3317
- ),
3318
- ),*/
3319
- // Tab 2
3320
- array(
3321
- 'id' => 'header-tab-2',
3322
- 'type' => 'section',
3323
- 'title' => __('Advanced Header Options', 'accelerated-mobile-pages'),
3324
- 'indent' => true,
3325
- //'start' => true,
3326
- //'label' => 'Tab 2',
3327
- 'required' => array(
3328
- array('amp-design-selector', '=' , '4')
3329
- ),
3330
- ),
3331
- array(
3332
- 'id' => 'customize-options',
3333
- 'type' => 'switch',
3334
- 'title' => __('Advanced Header Design', 'accelerated-mobile-pages'),
3335
- 'default' => 0,
3336
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3337
- ),
3338
- array(
3339
- 'id' => 'swift-height-control',
3340
- 'type' => 'text',
3341
- 'title' => __('Header Height', 'accelerated-mobile-pages'),
3342
- 'default' => '60px',
3343
- 'required' => array(
3344
- array('customize-options','=',1)
3345
- )
3346
- ),
3347
- array(
3348
- 'id' => 'margin-padding-options',
3349
- 'type' => 'switch',
3350
- 'title' => __('Margin / Padding ', 'accelerated-mobile-pages'),
3351
- 'default' => 0,
3352
- 'required' => array(
3353
- array('customize-options','=',1)
3354
- )
3355
- ),
3356
- array(
3357
- 'id' => 'swift-padding-control',
3358
- 'type' => 'spacing',
3359
- 'output' => array('.header'),
3360
- 'mode' => 'padding',
3361
- 'units' => array('px'),
3362
- 'units_extended' => 'false',
3363
- 'title' => __('Padding', 'accelerated-mobile-pages'),
3364
- 'default' => array(
3365
- 'padding-top' => '0px',
3366
- 'padding-right' => '0px',
3367
- 'padding-bottom' => '0px',
3368
- 'padding-left' => '0px',
3369
- 'units' => 'px',
3370
- ),
3371
- 'required' => array(
3372
- array('margin-padding-options','=',1)
3373
- )
3374
- ),
3375
- array(
3376
- 'id' => 'swift-margin-control',
3377
- 'type' => 'spacing',
3378
- 'output' => array('.header'),
3379
- 'mode' => 'margin',
3380
- 'units' => array('px'),
3381
- 'units_extended' => 'false',
3382
- 'title' => __('Margin', 'accelerated-mobile-pages'),
3383
- 'default' => array(
3384
- 'margin-top' => '0px',
3385
- 'margin-right' => '0px',
3386
- 'margin-bottom' => '0px',
3387
- 'margin-left' => '0px',
3388
- 'units' => 'px',
3389
- ),
3390
- 'required' => array(
3391
- array('margin-padding-options','=',1)
3392
- )
3393
- ),
3394
- array(
3395
- 'id' => 'border-line',
3396
- 'type' => 'switch',
3397
- 'title' => __('Border and Boxshadow', 'accelerated-mobile-pages'),
3398
- 'default' => 0,
3399
- 'required' => array(
3400
- array('customize-options','=',1)
3401
- )
3402
- ),
3403
-
3404
- array(
3405
- 'id' => 'swift-border-line-control',
3406
- 'type' => 'text',
3407
- 'title' => __('Border', 'accelerated-mobile-pages'),
3408
- 'subtitle' => __('Border at the bottom', 'accelerated-mobile-pages'),
3409
- 'default' => '1',
3410
- 'required' => array(
3411
- array('border-line','=',1)
3412
- )
3413
- ),
3414
- array(
3415
- 'id' => 'swift-border-color-control',
3416
- 'type' => 'color_rgba',
3417
- 'title' => __('Border Color', 'accelerated-mobile-pages'),
3418
- 'default' => array(
3419
- 'rgba' => 'rgba(0,0,0,0.12)',
3420
- ),
3421
- 'required' => array(
3422
- array('border-line','=',1)
3423
- )
3424
- ),
3425
- array(
3426
- 'id' => 'swift-boxshadow-checkbox-control',
3427
- 'type' => 'switch',
3428
- 'title' => __('Box Shadow', 'accelerated-mobile-pages'),
3429
- 'default' => 0,
3430
- 'required' => array(
3431
- array('border-line','=',1)
3432
- )
3433
- ),
3434
-
3435
-
3436
- array(
3437
- 'id' => 'swift-background-scheme',
3438
- 'title' => __('Header Background', 'accelerated-mobile-pages'),
3439
- 'type' => 'color_rgba',
3440
- 'default' => array(
3441
- 'rgba' => 'rgba(255, 255, 255, 255)',
3442
- ),
3443
- 'required' => array(
3444
- array('customize-options','=',1)
3445
- )
3446
- ),
3447
- array(
3448
- 'id' => 'swift-header-overlay',
3449
- 'title' => __('Menu Background', 'accelerated-mobile-pages'),
3450
- 'type' => 'color_rgba',
3451
- 'default' => array(
3452
- 'rgba' => 'rgba(20, 20, 22, 0.9)',
3453
- ),
3454
- 'required' => array(
3455
- array('customize-options','=',1)
3456
- )
3457
- ),
3458
- array(
3459
- 'id' => 'swift-element-color-control',
3460
- 'title' => __('Header Elements', 'accelerated-mobile-pages'),
3461
- 'subtitle' => __('Color of the Text and Icons on top of Header','accelerated-mobile-pages'),
3462
- 'type' => 'color_rgba',
3463
- 'default' => array(
3464
- 'color' => '#333',
3465
- ),
3466
- 'required' => array(
3467
- array('customize-options','=',1)
3468
- )
3469
- ),
3470
- array(
3471
- 'id' => 'swift-element-overlay-color-control',
3472
- 'title' => __('Menu Elements', 'accelerated-mobile-pages'),
3473
- 'type' => 'color_rgba',
3474
- 'default' => array(
3475
- 'rgba' => 'rgba(255, 255, 255, 0.8)',
3476
- ),
3477
- 'required' => array(
3478
- array('customize-options','=',1)
3479
- )
3480
- ),
3481
-
3482
-
3483
- array(
3484
- 'id' => 'header-position-type',
3485
- 'title' => __('Menu Overlay Position', 'accelerated-mobile-pages'),
3486
- 'type' => 'select',
3487
- 'options'=> array(
3488
- '1' => 'Left',
3489
- '2' => 'Right'
3490
- ),
3491
- 'default'=> '1',
3492
- 'required' => array(
3493
- array('customize-options','=',1)
3494
- )
3495
- ),
3496
- array(
3497
- 'id' => 'header-overlay-width',
3498
- 'type' => 'text',
3499
- 'title' => __('Menu Overlay Width', 'accelerated-mobile-pages'),
3500
- 'default' => '90%',
3501
- 'required' => array(
3502
- array('customize-options','=',1)
3503
- )
3504
- ),
3505
- // Tab 2 end
3506
- /*array(
3507
- 'id' => 'header-tab-2-end',
3508
- 'type' => 'section',
3509
- 'title' => __('Tab 2', 'accelerated-mobile-pages'),
3510
- 'end' => true,
3511
- 'required' => array(
3512
- array('amp-design-selector', '=' , '4')
3513
- ),
3514
- ),*/
3515
-
3516
- )
3517
- )
3518
- );
3519
-
3520
-
3521
- //code for fetching ctegories to show as a list in redux settings
3522
- $categories = get_categories( array(
3523
- 'orderby' => 'name',
3524
- 'order' => 'ASC'
3525
- ) );
3526
- $categories_array = array();
3527
- if ( $categories ) :
3528
- foreach ($categories as $cat ) {
3529
- $cat_id = $cat->cat_ID;
3530
- $key = "".$cat_id;
3531
- //building assosiative array of ID-cat_name
3532
- $categories_array[ $key ] = $cat->name;
3533
- }
3534
- endif;
3535
- //End of code for fetching ctegories to show as a list in redux settings
3536
- $ampforwp_home_loop = array();
3537
- $ampforwp_home_loop = get_option('ampforwp_custom_post_types');
3538
- $ampforwp_home_loop['post'] = 'Posts';
3539
- unset($ampforwp_home_loop['page']);
3540
-
3541
- // HomePage Section
3542
- Redux::setSection( $opt_name, array(
3543
- 'title' => __( 'HomePage', 'accelerated-mobile-pages' ),
3544
- 'id' => 'amp-theme-homepage-settings',
3545
- 'subsection' => true,
3546
- 'fields' => array(
3547
- array(
3548
- 'id' => 'ampforwp-homepage-section-general',
3549
- 'type' => 'section',
3550
- 'title' => __('General', 'accelerated-mobile-pages'),
3551
- 'indent' => true,
3552
- ),
3553
- array(
3554
- 'id' => 'amp-design-3-featured-slider',
3555
- 'type' => 'switch',
3556
- 'title' => __( 'Featured Slider', 'accelerated-mobile-pages' ),
3557
- 'required' => array(
3558
- array('amp-design-selector', '=' , '3')
3559
- ),
3560
- 'default' => '1'
3561
- ),
3562
- array(
3563
- 'id' => 'amp-design-3-category-selector',
3564
- 'type' => 'select',
3565
- 'title' => __( 'Featured Slider Category', 'accelerated-mobile-pages' ),
3566
- 'options' => $categories_array,
3567
- 'required' => array(
3568
- array('amp-design-selector', '=' , '3'),
3569
- array('amp-design-3-featured-slider', '=' , '1')
3570
- ),
3571
- ),
3572
- // Excerpt Length for design1 #1013
3573
- array(
3574
-
3575
- 'id' => 'excerpt-option-design-1',
3576
- 'type' => 'switch',
3577
- 'title' => __('Excerpt', 'accelerated-mobile-pages'),
3578
- 'default' => '1',
3579
- 'required' => array(
3580
- array('amp-design-selector', '=' , '1'),
3581
- )
3582
- ),
3583
- array(
3584
- 'id' =>'amp-design-1-excerpt',
3585
- 'type' =>'text',
3586
- 'subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
3587
- 'title' =>__('Excerpt Length','accelerated-mobile-pages'),
3588
- 'required' => array(
3589
- array('amp-design-selector', '=' , '1'),
3590
- array('excerpt-option-design-1', '=' , '1'),
3591
- ),
3592
- 'validate' =>'numeric',
3593
- 'default' =>'20',
3594
- ),
3595
- array(
3596
- 'id' => 'ampforwp-design1-cats-home',
3597
- 'type' => 'switch',
3598
- 'title' => __('Category label', 'accelerated-mobile-pages'),
3599
- 'default' => '0',
3600
- 'required' => array(
3601
- array('amp-design-selector', '=' , '1'),
3602
- )
3603
- ),
3604
-
3605
- // Excerpt Length for design2 #1122
3606
- array(
3607
-
3608
- 'id' => 'excerpt-option-design-2',
3609
- 'type' => 'switch',
3610
- 'title' => __('Excerpt on Small Screens', 'accelerated-mobile-pages'),
3611
- 'default' => '0',
3612
- 'required' => array(
3613
- array('amp-design-selector', '=' , '2'),
3614
- )
3615
- ),
3616
- array(
3617
- 'id' =>'amp-design-2-excerpt',
3618
- 'type' =>'text',
3619
- 'subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
3620
- 'title' =>__('Excerpt Length','accelerated-mobile-pages'),
3621
- 'required' => array(
3622
- array('amp-design-selector', '=' , '2'),
3623
- array('excerpt-option-design-2', '=' , '1'),
3624
- ),
3625
- 'validate' =>'numeric',
3626
- 'default' =>'20',
3627
- ),
3628
-
3629
- // Excerpt Length for design3 #1122
3630
- array(
3631
- 'id' => 'excerpt-option-design-3',
3632
- 'type' => 'switch',
3633
- 'title' => __('Excerpt on Small Screens', 'accelerated-mobile-pages'),
3634
- 'default' => '0',
3635
- 'required' => array(
3636
- array('amp-design-selector', '=' , '3'),
3637
- )
3638
- ),
3639
- array(
3640
- 'id' =>'amp-design-3-excerpt',
3641
- 'type' =>'text',
3642
- 'subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
3643
- 'title' =>__('Excerpt Length','accelerated-mobile-pages'),
3644
- 'required' => array(
3645
- array('amp-design-selector', '=' , '3'),
3646
- array('excerpt-option-design-3', '=' , '1'),
3647
- ),
3648
- 'validate' =>'numeric',
3649
- 'default' =>'20',
3650
- ),
3651
-
3652
- // Featured Time
3653
- array(
3654
- 'id' =>'amp-design-1-featured-time',
3655
- 'type' =>'switch',
3656
- 'title' =>__('Published Time','accelerated-mobile-pages'),
3657
- 'subtitle' => __('Display published time of the post on homepage', 'accelerated-mobile-pages'),
3658
- 'required' => array(array('amp-design-selector', '=' , '1') ),
3659
- 'default' =>'1',
3660
- ),
3661
-
3662
- array(
3663
- 'id' =>'amp-design-3-featured-time',
3664
- 'type' =>'switch',
3665
- 'title' =>__('Published Time','accelerated-mobile-pages'),
3666
- 'subtitle' => __('Display published time of the post on homepage', 'accelerated-mobile-pages'),
3667
- 'required' => array(array('amp-design-selector', '=' , '3') ),
3668
- 'default' =>'1',
3669
- ),
3670
-
3671
- // Homepage thumbnail
3672
- array(
3673
- 'id' => 'ampforwp-homepage-posts-image-modify-size',
3674
- 'type' => 'switch',
3675
- 'title' => __('Override Homepage Thumbnail Size', 'accelerated-mobile-pages'),
3676
- 'required' => array( array( 'amp-design-selector','!=',3 ) ),
3677
- 'default' => 0,
3678
- ),
3679
- array(
3680
- 'id' => 'ampforwp-homepage-posts-design-1-2-width',
3681
- 'type' => 'text',
3682
- 'title' => __('Image Width', 'accelerated-mobile-pages'),
3683
- 'subtitle' => __('Defaults to 100', 'accelerated-mobile-pages'),
3684
- 'default' => 100,
3685
- 'required' => array(
3686
- array('amp-design-selector','!=',3),
3687
- array('amp-design-selector','!=',4),
3688
- array('ampforwp-homepage-posts-image-modify-size','=',1)
3689
- )
3690
- ),
3691
- array(
3692
- 'id' => 'ampforwp-homepage-posts-design-1-2-height',
3693
- 'type' => 'text',
3694
- 'title' => __('Image Height', 'accelerated-mobile-pages'),
3695
- 'subtitle' => __('Defaults to 75', 'accelerated-mobile-pages'),
3696
- 'default' => 75,
3697
- 'required' => array(
3698
- array('amp-design-selector','!=',3),
3699
- array('amp-design-selector','!=',4),
3700
- array('ampforwp-homepage-posts-image-modify-size','=',1)
3701
- )
3702
- ),
3703
- array(
3704
- 'id' => 'ampforwp-swift-homepage-posts-width',
3705
- 'type' => 'text',
3706
- 'title' => __('Image Width', 'accelerated-mobile-pages'),
3707
- 'subtitle' => __('Defaults to 346', 'accelerated-mobile-pages'),
3708
- 'default' => 346,
3709
- 'required' => array(
3710
- array('amp-design-selector','=',4),
3711
- array('ampforwp-homepage-posts-image-modify-size','=',1)
3712
- )
3713
- ),
3714
- array(
3715
- 'id' => 'ampforwp-swift-homepage-posts-height',
3716
- 'type' => 'text',
3717
- 'title' => __('Image Height', 'accelerated-mobile-pages'),
3718
- 'subtitle' => __('Defaults to 188', 'accelerated-mobile-pages'),
3719
- 'default' => 188,
3720
- 'required' => array(
3721
- array('amp-design-selector','=',4),
3722
- array('ampforwp-homepage-posts-image-modify-size','=',1)
3723
- )
3724
- ),
3725
- array(
3726
- 'id' => 'ampforwp-homepage-section-loop',
3727
- 'type' => 'section',
3728
- 'title' => __('Loop Display Controls', 'accelerated-mobile-pages'),
3729
- 'indent' => true,
3730
- ),
3731
- array(
3732
- 'id' => 'ampforwp-homepage-loop-type',
3733
- 'type' => 'select',
3734
- 'title' => __( 'Post Type in Loop', 'accelerated-mobile-pages' ),
3735
- 'options' => $ampforwp_home_loop,
3736
- 'default' => 'post',
3737
- ),
3738
- array(
3739
- 'id' => 'ampforwp-homepage-loop-cats',
3740
- 'type' => 'select',
3741
- 'title' => __( 'Exclude Categories', 'accelerated-mobile-pages' ),
3742
- 'data' => 'categories',
3743
- 'multi' => true
3744
- ),
3745
-
3746
- )
3747
- ));
3748
-
3749
- // Single Section
3750
- Redux::setSection( $opt_name, array(
3751
- 'title' => __( 'Single', 'accelerated-mobile-pages' ),
3752
- // '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' ),
3753
- 'id' => 'amp-single',
3754
- 'subsection' => true,
3755
- 'fields' => array(
3756
- // Swift
3757
- array(
3758
- 'id' => 'single-design-type',
3759
- 'title' => __('Single Design', 'accelerated-mobile-pages'),
3760
- 'type' => 'image_select',
3761
- 'options'=> array(
3762
- '1' => array(
3763
- 'alt'=>' Single Design 1 ',
3764
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/single-1.png'
3765
- ),
3766
-
3767
- ),
3768
- 'default'=> '1',
3769
- // 'max-width' => 200,
3770
- // 'max-height'=> 60,
3771
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3772
- ),
3773
- array(
3774
- 'id' => 'swift-date',
3775
- 'type' => 'switch',
3776
- 'title' => __('Published Date', 'accelerated-mobile-pages'),
3777
- 'default' => 1,
3778
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3779
- ),
3780
- //Breadcrumb ON/OFF
3781
- array(
3782
- 'id' => 'ampforwp-bread-crumb',
3783
- 'type' => 'switch',
3784
- 'default' => '1',
3785
- 'title' => __('Breadcrumbs', 'accelerated-mobile-pages'),
3786
- ),
3787
- //Categories ON/OFF
3788
- array(
3789
- 'id' => 'ampforwp-cats-single',
3790
- 'type' => 'switch',
3791
- 'default' => '1',
3792
- 'title' => __('Categories', 'accelerated-mobile-pages'),
3793
- 'subtitle' => __('Enable or Disable Categories in Single', 'accelerated-mobile-pages'),
3794
- 'required' => array( array('amp-design-selector', '!=' , '4') )
3795
- ),
3796
- //Tags ON/OFF
3797
- array(
3798
- 'id' => 'ampforwp-tags-single',
3799
- 'type' => 'switch',
3800
- 'default' => '1',
3801
- 'title' => __('Tags', 'accelerated-mobile-pages'),
3802
- ),
3803
- //Categories and Tags Links
3804
- array(
3805
- 'id' => 'ampforwp-cats-tags-links-single',
3806
- 'type' => 'switch',
3807
- 'default' => '1',
3808
- 'title' => __('Categories & Tags Links', 'accelerated-mobile-pages'),
3809
- 'required' => array('ampforwp-archive-support', '=' , '1'),
3810
- ),
3811
- // Social Icons ON/OFF
3812
- array(
3813
- 'id' => 'enable-single-social-icons',
3814
- 'type' => 'switch',
3815
- 'title' => __('Sticky Social Icons', 'accelerated-mobile-pages'),
3816
- 'default' => 1,
3817
- ),
3818
- // Excerpt ON/OFF
3819
- array(
3820
- 'id' => 'enable-excerpt-single',
3821
- 'type' => 'switch',
3822
- 'title' => __('Excerpt', 'accelerated-mobile-pages'),
3823
- 'default' => 0,
3824
- 'subtitle' => __('Excerpt will be displayed above content', 'accelerated-mobile-pages'),
3825
- ),
3826
- //deselectable next previous links
3827
- array(
3828
- 'id' => 'enable-single-next-prev',
3829
- 'type' => 'switch',
3830
- 'title' => __('Next-Previous Links', 'accelerated-mobile-pages'),
3831
- 'default' => 1,
3832
- ),
3833
- // Author Bio
3834
- array(
3835
- 'id' => 'amp-author-description',
3836
- 'type' => 'switch',
3837
- 'title' => __( 'Author Bio', 'accelerated-mobile-pages' ),
3838
- 'default' => '1',
3839
- ),
3840
- // Author Pages
3841
- array(
3842
- 'id' => 'ampforwp-author-page-url',
3843
- 'type' => 'switch',
3844
- 'title' => __( 'Link to Author Pages', 'accelerated-mobile-pages' ),
3845
- 'default' => '0',
3846
- ),
3847
- // Pagination //#1015
3848
- array(
3849
- 'id' => 'amp-pagination',
3850
- 'type' => 'switch',
3851
- 'title' => __( 'Post Pagination', 'accelerated-mobile-pages' ),
3852
- 'default' => 1,
3853
- 'subtitle' => __('Enable the feature to add Pagination in single', 'accelerated-mobile-pages'),
3854
- ),
3855
- array(
3856
- 'id' => 'ampforwp-pagination-select',
3857
- 'type' => 'select',
3858
- 'title' => __('Post Pagination Type', 'accelerated-mobile-pages'),
3859
- 'options' => array(
3860
- '1' => 'Numbering',
3861
- '2' => 'Next-Previous',
3862
- ),
3863
- 'default' => '1',
3864
- 'required' => array('amp-pagination' , '=' , '1'),
3865
- ),
3866
- // Related Post
3867
- array(
3868
- 'id' => 'ampforwp-single-select-type-of-related',
3869
- 'type' => 'select',
3870
- 'title' => __('Related Post by', 'accelerated-mobile-pages'),
3871
- 'data' => 'page',
3872
- 'subtitle' => __('select the type of related posts', 'accelerated-mobile-pages'),
3873
- 'options' => array(
3874
- '1' => 'Tags',
3875
- '2' => 'Categories',
3876
- ),
3877
- 'default' => '2',
3878
- ),
3879
- array(
3880
- 'id' => 'ampforwp-single-related-posts-image',
3881
- 'type' => 'switch',
3882
- 'title' => __('Image in Related Post', 'accelerated-mobile-pages'),
3883
- 'default' => 1,
3884
- ),
3885
- array(
3886
- 'id' => 'ampforwp-single-related-posts-excerpt',
3887
- 'type' => 'switch',
3888
- 'title' => __('Excerpt in Related Post', 'accelerated-mobile-pages'),
3889
- 'default' => 1,
3890
- ),
3891
- array(
3892
- 'id' => 'ampforwp-single-order-of-related-posts',
3893
- 'type' => 'switch',
3894
- 'title' => __('Sort Related Posts Randomly', 'accelerated-mobile-pages'),
3895
- 'default' => 0,
3896
- ),
3897
- array(
3898
- 'id' => 'ampforwp-number-of-related-posts',
3899
- 'type' => 'text',
3900
- 'title' => __('Number of Related Post', 'accelerated-mobile-pages'),
3901
- 'validate' => 'numeric',
3902
- 'default' => '3',
3903
- ),
3904
- array(
3905
- 'id' => 'ampforwp-inline-related-posts',
3906
- 'type' => 'switch',
3907
- 'title' => __('In-Content Related Post', 'accelerated-mobile-pages'),
3908
- 'subtitle' => __('Insert Related Posts between the content', 'accelerated-mobile-pages'),
3909
- 'default' => 0,
3910
- ),
3911
- array(
3912
- 'id' => 'ampforwp-swift-recent-posts',
3913
- 'type' => 'switch',
3914
- 'title' => __('Enable Recent Posts', 'accelerated-mobile-pages'),
3915
- 'subtitle' => __('To enable & disable recent posts', 'accelerated-mobile-pages'),
3916
- 'default' => 1,
3917
- ),
3918
- array(
3919
- 'id' => 'ampforwp-inline-related-posts-type',
3920
- 'type' => 'select',
3921
- 'title' => __('In-content Related Post by', 'accelerated-mobile-pages'),
3922
- 'data' => 'page',
3923
- 'options' => array(
3924
- '1' => 'Tags',
3925
- '2' => 'Categories',
3926
- ),
3927
- 'default' => '2',
3928
- 'required' => array( array('ampforwp-inline-related-posts', '=' , '1') ),
3929
-
3930
- ),
3931
- array(
3932
- 'id' => 'ampforwp-inline-related-posts-order',
3933
- 'type' => 'switch',
3934
- 'title' => __('Sort Related Posts Randomly', 'accelerated-mobile-pages'),
3935
- 'default' => 0,
3936
- 'required' => array( array('ampforwp-inline-related-posts', '=' , '1') ),
3937
- ),
3938
- array(
3939
- 'id' => 'ampforwp-number-of-inline-related-posts',
3940
- 'type' => 'text',
3941
- 'title' => __('Number of In-Content Related Post', 'accelerated-mobile-pages'),
3942
- 'validate' => 'numeric',
3943
- 'default' => '3',
3944
- 'required' => array( array('ampforwp-inline-related-posts', '=' , '1') ),
3945
- ),
3946
- array(
3947
- 'id' => 'ampforwp-underline-content-links',
3948
- 'type' => 'switch',
3949
- 'title' => __('Underline on Links', 'accelerated-mobile-pages'),
3950
- 'default' => 0,
3951
- ),
3952
-
3953
- // array(
3954
- // 'id' => 'ampforwp-comments-banner',
3955
- // 'type' => 'select',
3956
- // 'desc' => $comment_desc,
3957
- // 'title' => __(' df', 'accelerated-mobile-pages'),
3958
- // 'class' => 'new-class',
3959
- //
3960
- // // '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>',
3961
- // ),
3962
- //
3963
- $fields = array(
3964
- 'id' => 'info_normal',
3965
- 'type' => 'info',
3966
- 'class' => 'extension_banner_bg',
3967
- 'desc' => $single_extension_listing )
3968
-
3969
- ),
3970
-
3971
- ) );
3972
-
3973
- // Footer Section
3974
- Redux::setSection( $opt_name, array(
3975
- 'title' => __( 'Footer', 'accelerated-mobile-pages' ),
3976
- 'id' => 'amp-theme-footer-settings',
3977
- 'subsection' => true,
3978
- 'fields' => array(
3979
- // Swift
3980
- array(
3981
- 'id' => 'swift-menu',
3982
- 'type' => 'switch',
3983
- 'title' => __('Menu', 'accelerated-mobile-pages'),
3984
- 'default' => 1,
3985
- 'required' => array( array('amp-design-selector', '=' , '4') ),
3986
- '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'),
3987
- ),
3988
- array(
3989
- 'id' => 'amp-footer-link-non-amp-page',
3990
- 'type' => 'switch',
3991
- 'title' => __('Link to Non-AMP page in Footer', 'accelerated-mobile-pages'),
3992
- 'true' => 'true',
3993
- 'false' => 'false',
3994
- 'default' => 1
3995
- ),
3996
-
3997
- array(
3998
- 'id' => 'ampforwp-footer-top',
3999
- 'type' => 'switch',
4000
- 'title' => __('Back to Top link', 'accelerated-mobile-pages'),
4001
- 'true' => 'true',
4002
- 'false' => 'false',
4003
- 'default' => 1,
4004
- 'required' => array(
4005
- array('amp-design-selector', '!=' , '3')
4006
- )
4007
- ),
4008
- array(
4009
- 'id' => 'footer-type',
4010
- 'title' => __('Footer Type', 'accelerated-mobile-pages'),
4011
- 'type' => 'image_select',
4012
- 'options'=> array(
4013
- '1' => array(
4014
- 'alt'=>' Footer Design 1 ',
4015
- 'img' =>AMPFORWP_PLUGIN_DIR_URI.'/images/footer-1.png'
4016
- ),
4017
- ),
4018
- 'default'=> '1',
4019
- // 'max-width' => 200,
4020
- // 'max-height'=> 60,
4021
- 'required' => array( array('amp-design-selector', '=' , '4') ),
4022
- ),
4023
- array(
4024
- 'id' => 'ampforwp-footer-top-design3',
4025
- 'type' => 'switch',
4026
- 'title' => __('Back to Top link', 'accelerated-mobile-pages'),
4027
- 'subtitle' => __('Enable / Disable Link to top of the page in the footer', 'accelerated-mobile-pages'),
4028
- 'true' => 'true',
4029
- 'false' => 'false',
4030
- 'default' => 0,
4031
- 'required' => array( array( 'amp-design-selector', '=' , '3' ) )
4032
- ),
4033
-
4034
- array(
4035
- 'id' => 'amp-design-3-credit-link',
4036
- 'type' => 'switch',
4037
- 'title' => __( 'Credit link', 'accelerated-mobile-pages' ),
4038
- 'required' => array(
4039
- array('amp-design-selector', '=' , '3')
4040
- ),
4041
- 'default' => '1'
4042
- ),
4043
- array(
4044
- 'id' => 'ampforwp-nofollow-view-nonamp',
4045
- 'type' => 'switch',
4046
- 'title' => __('Make "View Non-AMP" link nofollow', 'accelerated-mobile-pages'),
4047
- 'default' => 0
4048
- ),
4049
- )
4050
- ));
4051
-
4052
- // Page Section
4053
- Redux::setSection( $opt_name, array(
4054
- 'title' => __( 'Page', 'accelerated-mobile-pages' ),
4055
- 'id' => 'amp-theme-page-settings',
4056
- 'subsection' => true,
4057
- 'fields' => array(
4058
- /* // Pages Separator
4059
- array(
4060
- 'id' => 'Page',
4061
- 'type' => 'section',
4062
- 'title' => __('Pages', 'accelerated-mobile-pages'),
4063
- 'indent' => true,
4064
- ),*/
4065
- // Meta ON/OFF Pages
4066
- array(
4067
- 'id' => 'meta_page',
4068
- 'type' => 'switch',
4069
- 'default' => '0',
4070
- 'title' => __('Meta Information', 'accelerated-mobile-pages'),
4071
- ),
4072
- array(
4073
- 'id' => 'ampforwp_subpages_list',
4074
- 'type' => 'switch',
4075
- 'default' => '0',
4076
- 'title' => __('Subpages/ChildPages', 'accelerated-mobile-pages'),
4077
- 'subtitle' => __('Shows a List of Subpages'),
4078
- ),
4079
- )
4080
- ));
4081
-
4082
- // Social Section
4083
- Redux::setSection( $opt_name, array(
4084
- 'title' => __( 'Social', 'accelerated-mobile-pages' ),
4085
- 'id' => 'amp-social',
4086
- 'desc' => __('All the Social sharing and the social profile related settings are here','accelerated-mobile-pages'),
4087
- 'subsection' => true,
4088
- 'fields' => array(
4089
- // Facebook Like
4090
- array(
4091
- 'id' => 'ampforwp-facebook-like-button',
4092
- 'type' => 'switch',
4093
- 'title' => __('Facebook Like Button', 'accelerated-mobile-pages'),
4094
- 'default' => 0,
4095
- ),
4096
- // Facebook ON/OFF
4097
- array(
4098
- 'id' => 'enable-single-facebook-share',
4099
- 'type' => 'switch',
4100
- //'required' => array('enable-single-social-icons', '=' , '1'),
4101
- 'title' => __('Facebook', 'accelerated-mobile-pages'),
4102
- 'default' => 0,
4103
- ),
4104
- // Facebook app ID
4105
- array(
4106
- 'id' => 'amp-facebook-app-id',
4107
- 'title' => __('Facebook App ID', 'accelerated-mobile-pages'),
4108
- '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'),
4109
- 'type' => 'text',
4110
- 'required' => array('enable-single-facebook-share', '=' , '1'),
4111
- 'placeholder' => __('Enter your facebook app id','accelerated-mobile-pages'),
4112
- 'default' => ''
4113
- ),
4114
- // Twitter ON/OFF
4115
- array(
4116
- 'id' => 'enable-single-twitter-share',
4117
- 'type' => 'switch',
4118
- 'title' => __('Twitter', 'accelerated-mobile-pages'),
4119
- 'default' => 1,
4120
- ),
4121
- array(
4122
- 'id' => 'enable-single-twitter-share-handle',
4123
- 'type' => 'text',
4124
- 'title' => __('Twitter Handle', 'accelerated-mobile-pages'),
4125
- 'required' => array('enable-single-twitter-share', '=' , '1'),
4126
- 'placeholder' => __('Eg: @xyx','accelerated-mobile-pages'),
4127
- 'default' => '',
4128
- ),
4129
- array(
4130
- 'id' => 'enable-single-twitter-share-link',
4131
- 'type' => 'switch',
4132
- 'title' => __('Pretty Permalinks for Twitter Share?', 'accelerated-mobile-pages'),
4133
- 'subtitle' => __('Enable this to have pretty links for twitter sharing'),
4134
- 'default' => 0,
4135
- 'required' => array('enable-single-twitter-share', '=' , '1'),
4136
- ),
4137
- // GooglePlus ON/OFF
4138
- array(
4139
- 'id' => 'enable-single-gplus-share',
4140
- 'type' => 'switch',
4141
- 'title' => __('GooglePlus', 'accelerated-mobile-pages'),
4142
- 'default' => 1,
4143
- ),
4144
- // Email ON/OFF
4145
- array(
4146
- 'id' => 'enable-single-email-share',
4147
- 'type' => 'switch',
4148
- 'title' => __('Email', 'accelerated-mobile-pages'),
4149
- 'default' => 1,
4150
- ),
4151
- // Pinterest ON/OFF
4152
- array(
4153
- 'id' => 'enable-single-pinterest-share',
4154
- 'type' => 'switch',
4155
- 'title' => __('Pinterest', 'accelerated-mobile-pages'),
4156
- 'default' => 1,
4157
- ),
4158
- // LinkedIn ON/OFF
4159
- array(
4160
- 'id' => 'enable-single-linkedin-share',
4161
- 'type' => 'switch',
4162
- 'title' => __('LinkedIn', 'accelerated-mobile-pages'),
4163
- 'default' => 1,
4164
- ),
4165
- // WhatsApp
4166
- array(
4167
- 'id' => 'enable-single-whatsapp-share',
4168
- 'type' => 'switch',
4169
- 'title' => __('WhatsApp', 'accelerated-mobile-pages'),
4170
- 'default' => 1,
4171
- ),
4172
- // LINE
4173
- array(
4174
- 'id' => 'enable-single-line-share',
4175
- 'type' => 'switch',
4176
- 'title' => __('Line', 'accelerated-mobile-pages'),
4177
- 'default' => 1,
4178
- ),
4179
- // VKontakte
4180
- array(
4181
- 'id' => 'enable-single-vk-share',
4182
- 'type' => 'switch',
4183
- 'title' => __('VKontakte', 'accelerated-mobile-pages'),
4184
- 'default' => 0,
4185
- ),
4186
- // Odnoklassniki
4187
- array(
4188
- 'id' => 'enable-single-odnoklassniki-share',
4189
- 'type' => 'switch',
4190
- 'title' => __('Odnoklassniki', 'accelerated-mobile-pages'),
4191
- 'default' => 0,
4192
- ),
4193
- // Reddit
4194
- array(
4195
- 'id' => 'enable-single-reddit-share',
4196
- 'type' => 'switch',
4197
- 'title' => __('Reddit', 'accelerated-mobile-pages'),
4198
- 'default' => 0,
4199
- ),
4200
- // Tumblr
4201
- array(
4202
- 'id' => 'enable-single-tumblr-share',
4203
- 'type' => 'switch',
4204
- 'title' => __('Tumblr', 'accelerated-mobile-pages'),
4205
- 'default' => 0,
4206
- ),
4207
- // Telegram
4208
- array(
4209
- 'id' => 'enable-single-telegram-share',
4210
- 'type' => 'switch',
4211
- 'title' => __('Telegram', 'accelerated-mobile-pages'),
4212
- 'default' => 0,
4213
- ),
4214
- // Digg
4215
- array(
4216
- 'id' => 'enable-single-digg-share',
4217
- 'type' => 'switch',
4218
- 'title' => __('Digg', 'accelerated-mobile-pages'),
4219
- 'default' => 0,
4220
- ),
4221
- // StumbleUpon
4222
- array(
4223
- 'id' => 'enable-single-stumbleupon-share',
4224
- 'type' => 'switch',
4225
- 'title' => __('StumbleUpon', 'accelerated-mobile-pages'),
4226
- 'default' => 0,
4227
- ),
4228
- // Wechat
4229
- array(
4230
- 'id' => 'enable-single-wechat-share',
4231
- 'type' => 'switch',
4232
- 'title' => __('Wechat', 'accelerated-mobile-pages'),
4233
- 'default' => 0,
4234
- ),
4235
- // Viber
4236
- array(
4237
- 'id' => 'enable-single-viber-share',
4238
- 'type' => 'switch',
4239
- 'title' => __('Viber', 'accelerated-mobile-pages'),
4240
- 'default' => 0,
4241
- ),
4242
- // Yummly
4243
- array(
4244
- 'id' => 'enable-single-yummly-share',
4245
- 'type' => 'switch',
4246
- 'title' => __('Yummly', 'accelerated-mobile-pages'),
4247
- 'default' => 0,
4248
- 'required' => array(
4249
- array('amp-design-selector', '=' , '4')
4250
- ),
4251
- ),
4252
- array(
4253
- 'id' => 'social-media-profiles-subsection',
4254
- 'type' => 'section',
4255
- 'title' => __('Social Media Profiles (Design #3)', 'accelerated-mobile-pages'),
4256
- 'subtitle' => __('Please enter your personal/organizational social media profiles here', 'accelerated-mobile-pages'),
4257
- 'indent' => true,
4258
- 'required' => array(
4259
- array('amp-design-selector', '=' , '3')
4260
- ),
4261
- ),
4262
- //#1
4263
- array(
4264
- 'id' => 'enable-single-twittter-profile',
4265
- 'type' => 'switch',
4266
- 'title' => __('Twitter ', 'accelerated-mobile-pages'),
4267
- 'default' => 1,
4268
- 'required' => array(
4269
- array('amp-design-selector', '=' , '3')
4270
- ),
4271
- ),
4272
- array(
4273
- 'id' => 'enable-single-twittter-profile-url',
4274
- 'type' => 'text',
4275
- 'title' => __('Twitter URL', 'accelerated-mobile-pages'),
4276
- 'default' => '#',
4277
- 'required' => array(
4278
- array('amp-design-selector', '=' , '3'),
4279
- array('enable-single-twittter-profile', '=' , '1')
4280
- ),
4281
- ),
4282
- //#2
4283
- array(
4284
- 'id' => 'enable-single-facebook-profile',
4285
- 'type' => 'switch',
4286
- 'title' => __('Facebook ', 'accelerated-mobile-pages'),
4287
- 'default' => 1,
4288
- 'required' => array(
4289
- array('amp-design-selector', '=' , '3')
4290
- ),
4291
- ),
4292
- array(
4293
- 'id' => 'enable-single-facebook-profile-url',
4294
- 'type' => 'text',
4295
- 'title' => __('Facebook URL', 'accelerated-mobile-pages'),
4296
- 'default' => '#',
4297
- 'required' => array(
4298
- array('amp-design-selector', '=' , '3'),
4299
- array('enable-single-facebook-profile', '=