Version Description
(14th March 2018) = * Added: Polylang Frontpage compatibility added #1779 * Fixed: Proper link for Linkedin added #1820 * Fixed: Incorrect function name was Added #1827 * Fixed: Thumbnail resizing issue in Swift #1828 * Fixed: Thumbnail issue in Loops of Design 3 #1714 * Fixed: Hide post builder for Swift #1824 * Fixed: To avoid warnings when there are no pages in WordPress #1810 * Fixed: Condition for the Thumbnail for Swift #1733 * Fixed: Proper Styling for footer for Swift #1733 * Fixed: Line height issue and CSS editor not working in Swift #1821 * Fixed: Renamed aq_resize to ampfrowp_aq_resize to avoid conflicts #1838 * Fixed: Add the prefix to avoid conflicts #1817 * Fixed: Added Custom format option in amp_date #1845 * Fixed: Removed amp-img tag where blank SRC in Page builder #1843 * Fixed: Pagebuilder modal max-height removed so it will become full width #1843 * Added: An option for select target type in Button Module #1822 * Fixed: Remove AMP category widget if swift is enabled #1790 * Fixed: Filter added change mode type #1833 * Added: Rewrite rule for .html blog page #1775 * Fixed: Filter added change mode type #1833 * Fixed: Swift Footer Widget Sanitizer Added #1800 * Fixed: No OneSignal widget when PageBuilder is enabled #1840 * Fixed: span tag added around the pagination text #1834 * Added: Page specific option to add script/html and styles in page builder #1831 * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839 * Added: Jarida theme compatibility added #1842 * Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839 * Fixed: Replace value attribute only from html tags. Otherwise it is removing value from * shortcodes which is breaking the whole page. #1738 * Added: Underline option for content links added #1808 * Added: Page specific option to add RTL in page builder #1858 * Added: Converts AMP ads to normal so ads show when takeover is enabled in Normal Mode #1724 * Added: Converts AMP Analytics to normal so Analytics works when takeover is enabled in Normal Mode #1724 * Fixed: Phone icon proper alignment in Design3 #1730 * Added: ADS for WP activation box in Extensions tab * Added: New design field added #1861
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.84 |
Comparing to | |
See all releases |
Code changes from version 0.9.83.1 to 0.9.84
- LICENSE +357 -357
- README.md +38 -1
- accelerated-moblie-pages.php +30 -2
- components/breadcrumb/breadcrumb.php +1 -2
- components/components-core.php +35 -7
- components/loop/loop.php +2 -2
- components/post-pagination/post-pagination.php +2 -2
- components/related-posts/related-posts.php +1 -1
- components/theme-loader.php +5 -1
- images/layouts-1.png +0 -0
- includes/admin-style.css +123 -0
- includes/options/admin-config.php +63 -17
- includes/thirdparty-compatibility.php +23 -1
- includes/vendor/amp/includes/utils/class-amp-image-dimension-extractor.php +4 -1
- includes/vendor/aq_resizer.php +2 -2
- pagebuilder/components/fieldsTemplate.php +17 -17
- pagebuilder/components/pbSettingTemplates.php +37 -6
- pagebuilder/functions.php +1 -4
- pagebuilder/inc/admin-amp-page-builder.css +6 -3
- pagebuilder/inc/admin-amp-page-builder.js +25 -96
- pagebuilder/inc/adminAjaxContents.php +7 -7
- pagebuilder/inc/viewShowFrontData.php +51 -12
- pagebuilder/modules/button-mod-module.php +14 -2
- pagebuilder/modules/contents-module.php +12 -3
- pagebuilder/modules/pricing-mod-module.php +13 -2
- readme.txt +38 -1
- templates/category-widget.php +4 -1
- templates/custom-amp-content.php +5 -1
- templates/design-manager/design-1/elements/bread-crumbs.php +1 -1
- templates/design-manager/design-1/elements/content.php +2 -0
- templates/design-manager/design-1/frontpage.php +5 -7
- templates/design-manager/design-2/elements/bread-crumbs.php +1 -1
- templates/design-manager/design-2/frontpage.php +5 -7
- templates/design-manager/design-3/archive.php +4 -2
- templates/design-manager/design-3/elements/bread-crumbs.php +1 -1
- templates/design-manager/design-3/elements/social-icons.php +1 -1
- templates/design-manager/design-3/frontpage.php +6 -10
- templates/design-manager/design-3/search.php +3 -1
- templates/design-manager/design-3/style.php +1 -1
- templates/design-manager/swift/footer.php +5 -1
- templates/design-manager/swift/index.php +6 -4
- templates/design-manager/swift/single.php +3 -4
- templates/design-manager/swift/style.php +12 -13
- templates/features.php +165 -45
@@ -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 |
+
|
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -178,6 +178,43 @@ You can contact us from [here](http://ampforwp.com/contact/)
|
|
178 |
|
179 |
== Changelog ==
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
= 0.9.83.1 (8th March 2018) =
|
182 |
* Fixed: Pagebuilder contents not shows on custom home page #1794
|
183 |
* Added: Header hook added `ampforwp_advance_header_layout_options`
|
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
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
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`
|
@@ -3,7 +3,7 @@
|
|
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.
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
@@ -19,7 +19,7 @@ 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.
|
23 |
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
@@ -101,6 +101,12 @@ function ampforwp_add_custom_rewrite_rules() {
|
|
101 |
'index.php?amp&paged=$matches[1]&page_id=' .ampforwp_get_the_page_id_blog_page(),
|
102 |
'top'
|
103 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
// For Author pages
|
106 |
add_rewrite_rule(
|
@@ -276,6 +282,16 @@ function ampforwp_parent_plugin_check() {
|
|
276 |
delete_option( 'ampforwp_parent_plugin_check');
|
277 |
}
|
278 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
// Redux panel inclusion code
|
280 |
if ( ! class_exists( 'ReduxFramework' ) ) {
|
281 |
require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
|
@@ -524,4 +540,16 @@ require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
|
|
524 |
|
525 |
return $link;
|
526 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
}
|
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
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
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');
|
23 |
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
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(
|
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';
|
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 |
}
|
@@ -18,9 +18,8 @@
|
|
18 |
|
19 |
// Get the query & post information
|
20 |
global $post,$wp_query;
|
21 |
-
|
22 |
// Do not display on the homepage
|
23 |
-
if ( !is_front_page() ) {
|
24 |
|
25 |
// Build the breadcrums
|
26 |
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
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 . '">';
|
@@ -99,6 +99,9 @@ function amp_title(){
|
|
99 |
$ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
100 |
}
|
101 |
}
|
|
|
|
|
|
|
102 |
else
|
103 |
$ID = $post->ID;
|
104 |
if( $ID!=null ){
|
@@ -249,6 +252,9 @@ function amp_breadcrumb(){
|
|
249 |
//Get Core of AMP HTML
|
250 |
function amp_header_core(){
|
251 |
$post_id = get_queried_object_id();
|
|
|
|
|
|
|
252 |
$thisTemplate = new AMP_Post_Template($post_id);
|
253 |
global $redux_builder_amp;
|
254 |
$html_tag_attributes = AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) );
|
@@ -291,12 +297,15 @@ function amp_header_core(){
|
|
291 |
?><!doctype html>
|
292 |
<html <?php echo ampforwp_amp_nonamp_convert('amp '); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
|
293 |
<head>
|
294 |
-
<meta charset="utf-8">
|
|
|
295 |
<link rel="dns-prefetch" href="https://cdn.ampproject.org">
|
296 |
<?php do_action( 'amp_meta', $thisTemplate ); ?>
|
297 |
<?php
|
298 |
if(ampforwp_amp_nonamp_convert("", "check")){
|
|
|
299 |
wp_head();
|
|
|
300 |
}else{
|
301 |
do_action( 'amp_post_template_head', $thisTemplate );
|
302 |
} ?>
|
@@ -304,6 +313,7 @@ function amp_header_core(){
|
|
304 |
<?php $thisTemplate->load_parts( array( 'style' ) ); ?>
|
305 |
<?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
|
306 |
<?php do_action( 'amp_css', $thisTemplate ); ?>
|
|
|
307 |
</style>
|
308 |
|
309 |
</head>
|
@@ -314,6 +324,9 @@ function amp_header_core(){
|
|
314 |
|
315 |
function amp_header(){
|
316 |
$post_id = get_queried_object_id();
|
|
|
|
|
|
|
317 |
$thisTemplate = new AMP_Post_Template($post_id);
|
318 |
$thisTemplate->load_parts( array( 'header' ) );
|
319 |
do_action( 'amp_after_header', $thisTemplate );
|
@@ -323,22 +336,31 @@ function amp_header(){
|
|
323 |
|
324 |
function amp_footer(){
|
325 |
$post_id = get_queried_object_id();
|
|
|
|
|
|
|
326 |
$thisTemplate = new AMP_Post_Template($post_id);
|
327 |
do_action( 'amp_before_footer', $thisTemplate );
|
328 |
do_action( 'amp_post_template_above_footer', $thisTemplate );
|
|
|
329 |
$thisTemplate->load_parts( array( 'footer' ) );
|
330 |
|
331 |
-
if(ampforwp_amp_nonamp_convert("", "check")){
|
332 |
-
wp_footer();
|
333 |
-
}
|
334 |
}
|
335 |
|
336 |
function amp_footer_core(){
|
337 |
$post_id = get_queried_object_id();
|
|
|
|
|
|
|
338 |
$thisTemplate = new AMP_Post_Template($post_id);
|
339 |
-
|
340 |
-
|
341 |
-
|
|
|
|
|
|
|
|
|
|
|
342 |
// Close the body and Html tags ?>
|
343 |
</body>
|
344 |
</html><?php
|
@@ -374,6 +396,9 @@ $post_id = get_queried_object_id();
|
|
374 |
if ( ampforwp_is_front_page() ) {
|
375 |
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
376 |
}
|
|
|
|
|
|
|
377 |
$thisTemplate = new AMP_Post_Template($post_id); ?>
|
378 |
<?php do_action('ampforwp_before_post_content',$thisTemplate);
|
379 |
$amp_custom_content_enable = get_post_meta( $thisTemplate->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
|
@@ -404,6 +429,9 @@ function amp_date( $args=array() ) {
|
|
404 |
'ago');
|
405 |
}
|
406 |
$post_date = apply_filters('ampforwp_modify_post_date', $post_date);
|
|
|
|
|
|
|
407 |
if ( 'date' == $args || 'time' == $args ) {
|
408 |
echo $post_date .' ';
|
409 |
}
|
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 ){
|
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' ) );
|
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 |
} ?>
|
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>
|
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 );
|
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
|
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);
|
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 |
}
|
@@ -3,7 +3,7 @@ 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 ==
|
7 |
$curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
|
8 |
if($curauth_url){ ?>
|
9 |
<div class="amp-wp-content author-img">
|
@@ -313,7 +313,7 @@ function amp_loop_image( $data=array() ) {
|
|
313 |
if ( empty($height) ) {
|
314 |
$height = $thumb_height;
|
315 |
}
|
316 |
-
$thumb_url_array =
|
317 |
$thumb_url = $thumb_url_array[0];
|
318 |
$thumb_width = $thumb_url_array[1];
|
319 |
$thumb_height = $thumb_url_array[2];
|
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">
|
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];
|
@@ -5,7 +5,7 @@ function ampforwp_framework_get_post_pagination( $args = '' ) {
|
|
5 |
global $page, $numpages, $multipage, $more, $redux_builder_amp;
|
6 |
$next_class = $previous_class = '';
|
7 |
$defaults = array(
|
8 |
-
'before' => '<p>' . __( 'Page
|
9 |
'after' => '</p>',
|
10 |
'link_before' => '',
|
11 |
'link_after' => '',
|
@@ -35,7 +35,7 @@ function ampforwp_framework_get_post_pagination( $args = '' ) {
|
|
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( '%',
|
39 |
if ( $i != $page || ! $more && 1 == $page ) {
|
40 |
$link = ampforwp_framework_get_post_paginated_link( $i ) . $link . '</a>';
|
41 |
}
|
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' => '',
|
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 |
}
|
@@ -111,7 +111,7 @@ function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array()
|
|
111 |
if(empty($height)){
|
112 |
$height = $thumb_url_array_2[2];
|
113 |
}
|
114 |
-
$thumb_url_array_2 =
|
115 |
}
|
116 |
$thumb_url_2 = $thumb_url_array_2[0];
|
117 |
|
111 |
if(empty($height)){
|
112 |
$height = $thumb_url_array_2[2];
|
113 |
}
|
114 |
+
$thumb_url_array_2 = ampforwp_aq_resize( $thumb_url_array_2[0], $width, $height, true, false ); //resize & crop the image
|
115 |
}
|
116 |
$thumb_url_2 = $thumb_url_array_2[0];
|
117 |
|
@@ -21,7 +21,7 @@ elseif ( ! defined('AMPFORWP_CUSTOM_THEME') ) {
|
|
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() ) {
|
@@ -196,6 +196,10 @@ elseif ( ! defined('AMPFORWP_CUSTOM_THEME') ) {
|
|
196 |
}
|
197 |
break;
|
198 |
}
|
|
|
|
|
|
|
|
|
199 |
return $file;
|
200 |
}
|
201 |
|
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() ) {
|
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 |
|
Binary file
|
@@ -331,3 +331,126 @@ right:0; z-index: 99999;
|
|
331 |
font-size: 2em;
|
332 |
color: white;
|
333 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
}
|
@@ -27,16 +27,16 @@ $cta_desc = '<a href="'.$cta_AD_URL.'" target="_blank"><img class="ampforwp-ad-
|
|
27 |
}
|
28 |
|
29 |
$extension_listing_array = array(
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
array(
|
41 |
'name'=>'Advanced AMP ADS',
|
42 |
'desc'=>'Add Advertisement directly in the content',
|
@@ -347,6 +347,25 @@ $single_extension_listing = '
|
|
347 |
</div>
|
348 |
';
|
349 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
// All the possible arguments for Redux.
|
351 |
//$amp_redux_header = '<span id="name"><span style="color: #4dbefa;">U</span>ltimate <span style="color: #4dbefa;">W</span>idgets</span>';
|
352 |
|
@@ -2741,7 +2760,7 @@ Redux::setSection( $opt_name, array(
|
|
2741 |
'subsection' => true,
|
2742 |
'fields' => array(
|
2743 |
|
2744 |
-
|
2745 |
'id' => 'amp-design-selector',
|
2746 |
'type' => 'demolink_image_select',
|
2747 |
'title' => __( 'Themes Selector', 'accelerated-mobile-pages' ),
|
@@ -2752,13 +2771,29 @@ Redux::setSection( $opt_name, array(
|
|
2752 |
'options' => $themeDesign,
|
2753 |
'default' => '4'
|
2754 |
),
|
2755 |
-
|
2756 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2757 |
'id' => 'info_theme_framework',
|
2758 |
'type' => 'info',
|
2759 |
'style' => 'success',
|
2760 |
'desc' => $amptfad
|
2761 |
-
)
|
|
|
2762 |
|
2763 |
)
|
2764 |
) );
|
@@ -3908,6 +3943,12 @@ Redux::setSection( $opt_name, array(
|
|
3908 |
'default' => '3',
|
3909 |
'required' => array( array('ampforwp-inline-related-posts', '=' , '1') ),
|
3910 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3911 |
|
3912 |
// array(
|
3913 |
// 'id' => 'ampforwp-comments-banner',
|
@@ -4503,12 +4544,17 @@ Redux::setSection( $opt_name, array(
|
|
4503 |
)
|
4504 |
|
4505 |
) );
|
4506 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4507 |
// Misc SECTION
|
4508 |
Redux::setSection( $opt_name, array(
|
4509 |
'title' => __( 'Misc', 'accelerated-mobile-pages' ),
|
4510 |
-
'desc' =>
|
4511 |
-
<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>',
|
4512 |
'id' => 'amp-design',
|
4513 |
'subsection' => true,
|
4514 |
'fields' => array(
|
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',
|
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 |
|
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' ),
|
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 |
) );
|
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',
|
4544 |
)
|
4545 |
|
4546 |
) );
|
4547 |
+
$redux_option = get_option('redux_builder_amp',true);
|
4548 |
+
if ( 4 == $redux_option['amp-design-selector'] ) {
|
4549 |
+
$post_builder = '';
|
4550 |
+
}
|
4551 |
+
else{
|
4552 |
+
$post_builder = '<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>';
|
4553 |
+
}
|
4554 |
// Misc SECTION
|
4555 |
Redux::setSection( $opt_name, array(
|
4556 |
'title' => __( 'Misc', 'accelerated-mobile-pages' ),
|
4557 |
+
'desc' => $post_builder,
|
|
|
4558 |
'id' => 'amp-design',
|
4559 |
'subsection' => true,
|
4560 |
'fields' => array(
|
@@ -292,4 +292,26 @@ if(!function_exists('ampforwp_amp_nonamp_convert')){
|
|
292 |
$file = $currentFile;
|
293 |
}
|
294 |
return $file;
|
295 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
$file = $currentFile;
|
293 |
}
|
294 |
return $file;
|
295 |
+
}
|
296 |
+
|
297 |
+
add_action("ampforwp_pagebuilder_layout_filter","ampforwp_add_upcomminglayouts");
|
298 |
+
function ampforwp_add_upcomminglayouts($layoutTemplate){
|
299 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
300 |
+
if(function_exists('ampforwp_upcomming_layouts_demo') && !is_plugin_active('amp-layouts/amp-layouts.php') ){
|
301 |
+
$layouts_demo = ampforwp_upcomming_layouts_demo();
|
302 |
+
if(is_array($layouts_demo)){
|
303 |
+
foreach($layouts_demo as $k=>$val){
|
304 |
+
$layoutTemplate['upcoming'] = array(
|
305 |
+
'Upcoming'=>array(
|
306 |
+
'name'=> $val['name'],
|
307 |
+
'preview_demo'=>$val['link'],
|
308 |
+
'preview_img'=>$val['image'],
|
309 |
+
'layout_json'=>'{"rows":[],"totalrows":"23","totalmodules":"94",}',
|
310 |
+
)
|
311 |
+
);
|
312 |
+
}
|
313 |
+
}
|
314 |
+
}
|
315 |
+
return $layoutTemplate;
|
316 |
+
|
317 |
+
}
|
@@ -154,7 +154,10 @@ class AMP_Image_Dimension_Extractor {
|
|
154 |
*/
|
155 |
private static function fetch_images( $urls_to_fetch, &$images, $mode ) {
|
156 |
// Use FasterImage when for compatible PHP versions
|
157 |
-
|
|
|
|
|
|
|
158 |
false === function_exists( 'curl_multi_exec' ) ||
|
159 |
version_compare( PHP_VERSION, '5.4.0' ) < 0
|
160 |
) {
|
154 |
*/
|
155 |
private static function fetch_images( $urls_to_fetch, &$images, $mode ) {
|
156 |
// Use FasterImage when for compatible PHP versions
|
157 |
+
$mode_type = '';
|
158 |
+
$mode_type = 'synchronous';
|
159 |
+
$mode_type = apply_filters('amp_fetch_image_mode_type',$mode_type);
|
160 |
+
if ( $mode_type === $mode ||
|
161 |
false === function_exists( 'curl_multi_exec' ) ||
|
162 |
version_compare( PHP_VERSION, '5.4.0' ) < 0
|
163 |
) {
|
@@ -226,13 +226,13 @@ if(!class_exists('Aq_Resize')) {
|
|
226 |
|
227 |
|
228 |
|
229 |
-
if(!function_exists('
|
230 |
|
231 |
/**
|
232 |
* This is just a tiny wrapper function for the class above so that there is no
|
233 |
* need to change any code in your own WP themes. Usage is still the same :)
|
234 |
*/
|
235 |
-
function
|
236 |
/* WPML Fix */
|
237 |
if ( defined( 'ICL_SITEPRESS_VERSION' ) ){
|
238 |
global $sitepress;
|
226 |
|
227 |
|
228 |
|
229 |
+
if(!function_exists('ampforwp_aq_resize')) {
|
230 |
|
231 |
/**
|
232 |
* This is just a tiny wrapper function for the class above so that there is no
|
233 |
* need to change any code in your own WP themes. Usage is still the same :)
|
234 |
*/
|
235 |
+
function ampforwp_aq_resize( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false ) {
|
236 |
/* WPML Fix */
|
237 |
if ( defined( 'ICL_SITEPRESS_VERSION' ) ){
|
238 |
global $sitepress;
|
@@ -1,38 +1,38 @@
|
|
1 |
<script type="text/x-template" id="fields-data-template">
|
2 |
-
<div class="amp-form-control" :id="field.name" data-type="text" v-if="field.type=='text' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
3 |
|
4 |
<div class="form-label">{{field.label}}</div>
|
5 |
<div class="form-field"><input type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
6 |
<div class="clearfix"></div>
|
7 |
</div>
|
8 |
-
<div class="amp-form-control" :id="field.name" data-type="hidden" v-else-if="field.type=='hidden' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
9 |
<div class="form-label">{{field.label}}</div>
|
10 |
<div class="form-field"><input type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
11 |
<div class="clearfix"></div>
|
12 |
</div>
|
13 |
|
14 |
-
<div class="amp-form-control" :id="field.name" data-type="number" v-else-if="field.type=='number' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
15 |
<div class="form-label">{{field.label}}</div>
|
16 |
<div class="form-field"><input type="number" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
17 |
<div class="clearfix"></div>
|
18 |
</div>
|
19 |
|
20 |
<?php /*Normal Textarea*/?>
|
21 |
-
<div class="amp-form-control" :id="field.name" data-type='textarea' v-else-if="field.type=='textarea' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
22 |
<div class="form-label">{{field.label}}</div>
|
23 |
<div class="form-field"><textarea class="full textarea" :id="field.id" :name="field.name" v-model="field.default"></textarea></div>
|
24 |
<div class="clearfix"></div>
|
25 |
</div>
|
26 |
|
27 |
-
<div class="amp-form-control" :id="field.name" data-type="text-editor" v-else-if="field.type=='text-editor' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
28 |
<div class="form-label" style="position: absolute;margin-top: 10px;">{{field.label}}</div>
|
29 |
<div class="form-field"><textarea-wysiwyg :default-text="field" :fieldindex="fieldkey"></textarea-wysiwyg></div>
|
30 |
<div class="clearfix"></div>
|
31 |
</div>
|
32 |
|
33 |
-
<div class="amp-form-control" :id="field.name" data-type="select" v-else-if="field.type=='select' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
34 |
<div class="form-label">{{field.label}}</div>
|
35 |
-
<div class="form-field"><select type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default"
|
36 |
<option value="">Select option</option>
|
37 |
<option
|
38 |
v-for="(option, key, index) in field.options_details"
|
@@ -46,29 +46,29 @@
|
|
46 |
<div class="clearfix"></div>
|
47 |
</div>
|
48 |
|
49 |
-
<div class="amp-form-control" :id="field.name" data-type="checkbox" v-else-if="field.type=='checkbox' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
50 |
<div class="form-label">{{field.label}}</div>
|
51 |
<div class="form-field">
|
52 |
<label class="form-label-checkbox" v-for="(val,index) in field.options" >
|
53 |
-
<input type="checkbox" :value="val.value" v-model="field.default"
|
54 |
{{val.label}}
|
55 |
</label>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
</div>
|
59 |
|
60 |
-
<div class="amp-form-control" :id="field.name" data-type="radio" v-else-if="field.type=='radio' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
61 |
<div class="form-label">{{field.label}}</div>
|
62 |
<div class="form-field">
|
63 |
<label class="form-label-radio" v-for="(val,index) in field.options" >
|
64 |
-
<input type="radio" :value="val.value" v-model="field.default"
|
65 |
{{val.label}}
|
66 |
</label>
|
67 |
</div>
|
68 |
<div class="clearfix"></div>
|
69 |
</div>
|
70 |
|
71 |
-
<div class="amp-form-control" :id="field.name" data-type="spacing" v-else-if="field.type=='spacing' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" style="clearfix">
|
72 |
<div class="form-label">{{field.label}}</div>
|
73 |
<div class="form-field">
|
74 |
<label class="amppb-mar-padd">
|
@@ -95,7 +95,7 @@
|
|
95 |
|
96 |
|
97 |
|
98 |
-
<div class="amppb-ftype-upload amp-form-control" :id="field.name" data-type="upload" v-else-if="field.type=='upload' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
99 |
|
100 |
<div class="form-label" style="position: relative;display: inline-block; width: 30%;">{{field.label}}</div>
|
101 |
<div class="form-field">
|
@@ -112,7 +112,7 @@
|
|
112 |
|
113 |
|
114 |
|
115 |
-
<div class="amp-form-control" :id="field.name" data-type="icon-selector" v-else-if="field.type=='icon-selector' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
116 |
<div class="form-label">{{field.label}}</div>
|
117 |
<div class="form-field">
|
118 |
<span class="button" @click="openIconOptions=!openIconOptions;">Select Icon</span>
|
@@ -131,7 +131,7 @@
|
|
131 |
<div class="clearfix"></div>
|
132 |
</div>
|
133 |
|
134 |
-
<div class="amp-form-control" :id="field.name" data-type="gradient-selector" v-else-if="field.type=='gradient-selector' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
135 |
<div class="form-label">{{field.label}}</div>
|
136 |
<div class="form-field">
|
137 |
<div style="width:40px;height:20px;display: inline-block;" :style="field.default"></div>
|
@@ -363,7 +363,7 @@
|
|
363 |
<div class="clearfix"></div>
|
364 |
</div>
|
365 |
|
366 |
-
<div class="amp-form-control" :id="field.name" data-type="color-picker" v-else-if="field.type=='color-picker' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
367 |
<div class="form-label label_txt">{{field.label}}</div>
|
368 |
<div class="form-field color-wrapper" style="line-height: 35px" >
|
369 |
<color-picker :colorfield="field"></color-picker>
|
@@ -371,7 +371,7 @@
|
|
371 |
|
372 |
<div class="clearfix"></div>
|
373 |
</div>
|
374 |
-
<div class="amp-form-control" :id="field.name" data-type="layout-image-picker" v-else-if="field.type=='layout-image-picker' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)">
|
375 |
<div class="form-label label_txt">{{field.label}}</div>
|
376 |
<div class="form-field color-wrapper" style="line-height: 35px" >
|
377 |
<div class="layout-image-picker" v-for="(option, key, index) in field.options_details"
|
1 |
<script type="text/x-template" id="fields-data-template">
|
2 |
+
<div class="amp-form-control" :id="field.name" data-type="text" v-if="field.type=='text' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
3 |
|
4 |
<div class="form-label">{{field.label}}</div>
|
5 |
<div class="form-field"><input type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
6 |
<div class="clearfix"></div>
|
7 |
</div>
|
8 |
+
<div class="amp-form-control" :id="field.name" data-type="hidden" v-else-if="field.type=='hidden' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
9 |
<div class="form-label">{{field.label}}</div>
|
10 |
<div class="form-field"><input type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
11 |
<div class="clearfix"></div>
|
12 |
</div>
|
13 |
|
14 |
+
<div class="amp-form-control" :id="field.name" data-type="number" v-else-if="field.type=='number' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
15 |
<div class="form-label">{{field.label}}</div>
|
16 |
<div class="form-field"><input type="number" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
17 |
<div class="clearfix"></div>
|
18 |
</div>
|
19 |
|
20 |
<?php /*Normal Textarea*/?>
|
21 |
+
<div class="amp-form-control" :id="field.name" data-type='textarea' v-else-if="field.type=='textarea' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
22 |
<div class="form-label">{{field.label}}</div>
|
23 |
<div class="form-field"><textarea class="full textarea" :id="field.id" :name="field.name" v-model="field.default"></textarea></div>
|
24 |
<div class="clearfix"></div>
|
25 |
</div>
|
26 |
|
27 |
+
<div class="amp-form-control" :id="field.name" data-type="text-editor" v-else-if="field.type=='text-editor' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
28 |
<div class="form-label" style="position: absolute;margin-top: 10px;">{{field.label}}</div>
|
29 |
<div class="form-field"><textarea-wysiwyg :default-text="field" :fieldindex="fieldkey"></textarea-wysiwyg></div>
|
30 |
<div class="clearfix"></div>
|
31 |
</div>
|
32 |
|
33 |
+
<div class="amp-form-control" :id="field.name" data-type="select" v-else-if="field.type=='select' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
34 |
<div class="form-label">{{field.label}}</div>
|
35 |
+
<div class="form-field"><select type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default">
|
36 |
<option value="">Select option</option>
|
37 |
<option
|
38 |
v-for="(option, key, index) in field.options_details"
|
46 |
<div class="clearfix"></div>
|
47 |
</div>
|
48 |
|
49 |
+
<div class="amp-form-control" :id="field.name" data-type="checkbox" v-else-if="field.type=='checkbox' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
50 |
<div class="form-label">{{field.label}}</div>
|
51 |
<div class="form-field">
|
52 |
<label class="form-label-checkbox" v-for="(val,index) in field.options" >
|
53 |
+
<input type="checkbox" :value="val.value" v-model="field.default">
|
54 |
{{val.label}}
|
55 |
</label>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
</div>
|
59 |
|
60 |
+
<div class="amp-form-control" :id="field.name" data-type="radio" v-else-if="field.type=='radio' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
61 |
<div class="form-label">{{field.label}}</div>
|
62 |
<div class="form-field">
|
63 |
<label class="form-label-radio" v-for="(val,index) in field.options" >
|
64 |
+
<input type="radio" :value="val.value" v-model="field.default" >
|
65 |
{{val.label}}
|
66 |
</label>
|
67 |
</div>
|
68 |
<div class="clearfix"></div>
|
69 |
</div>
|
70 |
|
71 |
+
<div class="amp-form-control" :id="field.name" data-type="spacing" v-else-if="field.type=='spacing' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" style="clearfix" v-show="fieldShowHideCheck(field)">
|
72 |
<div class="form-label">{{field.label}}</div>
|
73 |
<div class="form-field">
|
74 |
<label class="amppb-mar-padd">
|
95 |
|
96 |
|
97 |
|
98 |
+
<div class="amppb-ftype-upload amp-form-control" :id="field.name" data-type="upload" v-else-if="field.type=='upload' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
99 |
|
100 |
<div class="form-label" style="position: relative;display: inline-block; width: 30%;">{{field.label}}</div>
|
101 |
<div class="form-field">
|
112 |
|
113 |
|
114 |
|
115 |
+
<div class="amp-form-control" :id="field.name" data-type="icon-selector" v-else-if="field.type=='icon-selector' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
116 |
<div class="form-label">{{field.label}}</div>
|
117 |
<div class="form-field">
|
118 |
<span class="button" @click="openIconOptions=!openIconOptions;">Select Icon</span>
|
131 |
<div class="clearfix"></div>
|
132 |
</div>
|
133 |
|
134 |
+
<div class="amp-form-control" :id="field.name" data-type="gradient-selector" v-else-if="field.type=='gradient-selector' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
135 |
<div class="form-label">{{field.label}}</div>
|
136 |
<div class="form-field">
|
137 |
<div style="width:40px;height:20px;display: inline-block;" :style="field.default"></div>
|
363 |
<div class="clearfix"></div>
|
364 |
</div>
|
365 |
|
366 |
+
<div class="amp-form-control" :id="field.name" data-type="color-picker" v-else-if="field.type=='color-picker' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
367 |
<div class="form-label label_txt">{{field.label}}</div>
|
368 |
<div class="form-field color-wrapper" style="line-height: 35px" >
|
369 |
<color-picker :colorfield="field"></color-picker>
|
371 |
|
372 |
<div class="clearfix"></div>
|
373 |
</div>
|
374 |
+
<div class="amp-form-control" :id="field.name" data-type="layout-image-picker" v-else-if="field.type=='layout-image-picker' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
375 |
<div class="form-label label_txt">{{field.label}}</div>
|
376 |
<div class="form-field color-wrapper" style="line-height: 35px" >
|
377 |
<div class="layout-image-picker" v-for="(option, key, index) in field.options_details"
|
@@ -4,6 +4,7 @@ $arraySetting = array(
|
|
4 |
'layout'=>'Layout Directory',
|
5 |
'save_layout'=>'Save layout',
|
6 |
'export'=>'Import / Export',
|
|
|
7 |
),
|
8 |
);
|
9 |
global $layoutTemplate;
|
@@ -37,9 +38,18 @@ global $savedlayoutTemplate;
|
|
37 |
<h3>Layout Directory</h3>
|
38 |
</div>
|
39 |
<div class="modal-body">
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
<div v-else-if="modalCrrentTab=='save_layout'">
|
45 |
<div class="amppb-layout-library-wrapper" style="margin: 40px 15px 10px 20px;">
|
@@ -91,21 +101,42 @@ global $savedlayoutTemplate;
|
|
91 |
?>
|
92 |
<div class="amppb-layout-layout">
|
93 |
<div class="amppb-layout-wrapper">
|
94 |
-
<h4 class="amppb-layout-title"><?php
|
|
|
|
|
|
|
|
|
|
|
95 |
<div class="amppb-layout-screenshot">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
<img src="<?php echo $lay[$firstLayout]['preview_img']; ?>" @click="viewSpacialLayouts($event);"
|
97 |
data-info='<?php echo json_encode($lay); ?>'
|
98 |
data-heading="<?php echo ucfirst($layoutName); ?>">
|
|
|
99 |
</div>
|
100 |
<div class="amppb-layout-bottom">
|
101 |
<div class="amppb-layout-button">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
<button type="button" class="button button-lg"@click="viewSpacialLayouts($event);" data-info='<?php echo json_encode($lay); ?>'
|
103 |
data-heading="<?php echo ucfirst($layoutName); ?>">View Layout</button>
|
|
|
104 |
</div>
|
105 |
</div>
|
106 |
</div>
|
107 |
</div>
|
108 |
-
<?php }
|
109 |
} ?>
|
110 |
</div>
|
111 |
<div v-if="innerLayouts!=''">
|
@@ -162,7 +193,7 @@ global $savedlayoutTemplate;
|
|
162 |
<span class="button button-primary button-large del-btn-modal" @click="loadLayOutFolder()" v-if="innerLayouts!=''">
|
163 |
Back
|
164 |
</span>
|
165 |
-
<button type="button" class="button modal-default-button" v-if="modalCrrentTab=='
|
166 |
Save
|
167 |
</button>
|
168 |
<button type="button" class="button modal-default-button preview button" @click="hidePageBuilderPopUp()">
|
4 |
'layout'=>'Layout Directory',
|
5 |
'save_layout'=>'Save layout',
|
6 |
'export'=>'Import / Export',
|
7 |
+
'advance'=>'Advance',
|
8 |
),
|
9 |
);
|
10 |
global $layoutTemplate;
|
38 |
<h3>Layout Directory</h3>
|
39 |
</div>
|
40 |
<div class="modal-body">
|
41 |
+
<div v-if="modalCrrentTab=='advance'" class="modal-settings">
|
42 |
+
<div class="amp-form-control" id="ampb_script_handler" data-type='textarea' >
|
43 |
+
<div class="form-label">Enter HTML in Head</div>
|
44 |
+
<div class="form-field"><textarea class="full textarea" id="ampb_script_textarea" name="ampb_script_handler" v-model="ampb_script_textarea"></textarea></div>
|
45 |
+
<div class="clearfix"></div>
|
46 |
+
</div>
|
47 |
+
<div class="amp-form-control" id="ampb_style_handler" data-type='textarea' >
|
48 |
+
<div class="form-label">Enter Style in Head</div>
|
49 |
+
<div class="form-field"><textarea class="full textarea" id="ampb_style_textarea" name="ampb_style_handler" v-model="ampb_style_textarea"></textarea></div>
|
50 |
+
<div class="clearfix"></div>
|
51 |
+
</div>
|
52 |
+
</div><!-- Advance closed -->
|
53 |
|
54 |
<div v-else-if="modalCrrentTab=='save_layout'">
|
55 |
<div class="amppb-layout-library-wrapper" style="margin: 40px 15px 10px 20px;">
|
101 |
?>
|
102 |
<div class="amppb-layout-layout">
|
103 |
<div class="amppb-layout-wrapper">
|
104 |
+
<h4 class="amppb-layout-title"><?php
|
105 |
+
if(strtolower($layoutName)=='upcoming'){
|
106 |
+
echo "<a class='layouts_pro_lbl' href='https://ampforwp.com/amp-layouts' target='_blank'>PRO</a>".$lay[$firstLayout]['name'];
|
107 |
+
}else{
|
108 |
+
echo ucfirst($layoutName);
|
109 |
+
} ?></h4>
|
110 |
<div class="amppb-layout-screenshot">
|
111 |
+
<?php
|
112 |
+
if(strtolower($layoutName)=='upcoming'){
|
113 |
+
?>
|
114 |
+
<a href="<?php echo $lay[$firstLayout]["preview_demo"]; ?>" target="_blank"><img src="<?php echo $lay[$firstLayout]['preview_img']; ?>"></a>
|
115 |
+
<?php
|
116 |
+
}else{
|
117 |
+
?>
|
118 |
<img src="<?php echo $lay[$firstLayout]['preview_img']; ?>" @click="viewSpacialLayouts($event);"
|
119 |
data-info='<?php echo json_encode($lay); ?>'
|
120 |
data-heading="<?php echo ucfirst($layoutName); ?>">
|
121 |
+
<?php } ?>
|
122 |
</div>
|
123 |
<div class="amppb-layout-bottom">
|
124 |
<div class="amppb-layout-button">
|
125 |
+
<?php
|
126 |
+
if(strtolower($layoutName)=='upcoming'){
|
127 |
+
?>
|
128 |
+
<a target="_blank" class="button button-lg" href="<?php echo $lay[$firstLayout]["preview_demo"]; ?>">View Layout</a>
|
129 |
+
<?php
|
130 |
+
}else{
|
131 |
+
?>
|
132 |
<button type="button" class="button button-lg"@click="viewSpacialLayouts($event);" data-info='<?php echo json_encode($lay); ?>'
|
133 |
data-heading="<?php echo ucfirst($layoutName); ?>">View Layout</button>
|
134 |
+
<?php } ?>
|
135 |
</div>
|
136 |
</div>
|
137 |
</div>
|
138 |
</div>
|
139 |
+
<?php }
|
140 |
} ?>
|
141 |
</div>
|
142 |
<div v-if="innerLayouts!=''">
|
193 |
<span class="button button-primary button-large del-btn-modal" @click="loadLayOutFolder()" v-if="innerLayouts!=''">
|
194 |
Back
|
195 |
</span>
|
196 |
+
<button type="button" class="button modal-default-button" v-if="modalCrrentTab=='advance'" @click="savePagebuilderSettings(currentLayoutData)">
|
197 |
Save
|
198 |
</button>
|
199 |
<button type="button" class="button modal-default-button preview button" @click="hidePageBuilderPopUp()">
|
@@ -109,10 +109,7 @@ function js_templates() {
|
|
109 |
function checkAMPforPageBuilderStatus($postId){
|
110 |
global $post, $redux_builder_amp;
|
111 |
$postId = $post->ID;
|
112 |
-
if(
|
113 |
-
$redux_builder_amp['ampforwp-homepage-on-off-support']==1 &&
|
114 |
-
ampforwp_get_blog_details() == false
|
115 |
-
){
|
116 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
117 |
}
|
118 |
|
109 |
function checkAMPforPageBuilderStatus($postId){
|
110 |
global $post, $redux_builder_amp;
|
111 |
$postId = $post->ID;
|
112 |
+
if( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ){
|
|
|
|
|
|
|
113 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
114 |
}
|
115 |
|
@@ -733,7 +733,7 @@ position: fixed;
|
|
733 |
}
|
734 |
.modal-content{
|
735 |
height: 100vh;
|
736 |
-
|
737 |
overflow-y: hidden;
|
738 |
padding: 0px 20px 0px 0px;
|
739 |
overflow-x: hidden;
|
@@ -856,6 +856,9 @@ position: fixed;
|
|
856 |
border-bottom: 1px solid #f1f1f1;
|
857 |
padding: 15px 10px 15px 15px;
|
858 |
}
|
|
|
|
|
|
|
859 |
.amp-form-control:hover {
|
860 |
background: #f3f3f3;
|
861 |
}
|
@@ -921,6 +924,7 @@ Layout css
|
|
921 |
}
|
922 |
.amppb-layout-layout .amppb-layout-wrapper{
|
923 |
padding: 0px;
|
|
|
924 |
background: #F7F7F7;
|
925 |
-webkit-transition: .3s ease-in-out;
|
926 |
transition: .3s ease-in-out;
|
@@ -931,7 +935,6 @@ Layout css
|
|
931 |
}
|
932 |
.amppb-layout-layout .amppb-layout-wrapper .amppb-layout-screenshot{
|
933 |
background: #ffffff;
|
934 |
-
margin-bottom: 10px;
|
935 |
}
|
936 |
.amppb-layout-screenshot img{
|
937 |
display: block;
|
@@ -941,7 +944,7 @@ Layout css
|
|
941 |
}
|
942 |
.amppb-layout-bottom{
|
943 |
position: relative;
|
944 |
-
margin:
|
945 |
}
|
946 |
.amppb-layout-button .button {
|
947 |
width: 100%;
|
733 |
}
|
734 |
.modal-content{
|
735 |
height: 100vh;
|
736 |
+
/* max-height: 660px;*/
|
737 |
overflow-y: hidden;
|
738 |
padding: 0px 20px 0px 0px;
|
739 |
overflow-x: hidden;
|
856 |
border-bottom: 1px solid #f1f1f1;
|
857 |
padding: 15px 10px 15px 15px;
|
858 |
}
|
859 |
+
.meta-box-sortables .amp-form-control select {
|
860 |
+
max-width: 95%;
|
861 |
+
}
|
862 |
.amp-form-control:hover {
|
863 |
background: #f3f3f3;
|
864 |
}
|
924 |
}
|
925 |
.amppb-layout-layout .amppb-layout-wrapper{
|
926 |
padding: 0px;
|
927 |
+
position: relative;
|
928 |
background: #F7F7F7;
|
929 |
-webkit-transition: .3s ease-in-out;
|
930 |
transition: .3s ease-in-out;
|
935 |
}
|
936 |
.amppb-layout-layout .amppb-layout-wrapper .amppb-layout-screenshot{
|
937 |
background: #ffffff;
|
|
|
938 |
}
|
939 |
.amppb-layout-screenshot img{
|
940 |
display: block;
|
944 |
}
|
945 |
.amppb-layout-bottom{
|
946 |
position: relative;
|
947 |
+
margin: 0px 0px 0px 0px;
|
948 |
}
|
949 |
.amppb-layout-button .button {
|
950 |
width: 100%;
|
@@ -20,6 +20,8 @@ Vue.component('amp-pagebuilder-modal', {
|
|
20 |
importLayoutfromFile: '',
|
21 |
innerLayouts: '',
|
22 |
innerLayoutsHeading: '',
|
|
|
|
|
23 |
}
|
24 |
},
|
25 |
methods:{
|
@@ -30,7 +32,9 @@ Vue.component('amp-pagebuilder-modal', {
|
|
30 |
this.modalCrrentTab=key;
|
31 |
},
|
32 |
savePagebuilderSettings:function(currentLayoutData){
|
33 |
-
app.mainContent = currentLayoutData;
|
|
|
|
|
34 |
this.hidePageBuilderPopUp();
|
35 |
},
|
36 |
savePagebuildercustomLayout: function(event){
|
@@ -378,7 +382,7 @@ Vue.component('fields-data',{
|
|
378 |
mounted: function () {//On ready State for component
|
379 |
this.$nextTick(function () {
|
380 |
var self = this;
|
381 |
-
this.callChangeEnvent();
|
382 |
})
|
383 |
},
|
384 |
computed: {
|
@@ -392,7 +396,8 @@ Vue.component('fields-data',{
|
|
392 |
var currentSelectfield = event.target;
|
393 |
selectedValue = currentSelectfield.getAttribute("data-value");
|
394 |
field.default = selectedValue;
|
395 |
-
this.
|
|
|
396 |
},
|
397 |
selectimages:function(field,event){
|
398 |
app.stopModuleModalClose = true;
|
@@ -510,102 +515,26 @@ Vue.component('fields-data',{
|
|
510 |
field.default = icon.name;
|
511 |
this.$forceUpdate();
|
512 |
},
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
var
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
var currentValue = jQuery('#'+key).find('input[type=text]').val();
|
527 |
-
if(currentValue==selectedValue){
|
528 |
-
fieldPointer.show();
|
529 |
-
}else{
|
530 |
-
fieldPointer.hide();
|
531 |
-
}
|
532 |
-
break;
|
533 |
-
case 'number':
|
534 |
-
var currentValue = jQuery('#'+key).find('input[type=number]').val();
|
535 |
-
if(currentValue==selectedValue){
|
536 |
-
fieldPointer.show();
|
537 |
-
}else{
|
538 |
-
fieldPointer.hide();
|
539 |
-
}
|
540 |
-
break;
|
541 |
-
case 'textarea':
|
542 |
-
var currentValue = jQuery('#'+key).find('textarea').val();
|
543 |
-
if(currentValue==selectedValue){
|
544 |
-
fieldPointer.show();
|
545 |
-
}else{
|
546 |
-
fieldPointer.hide();
|
547 |
-
}
|
548 |
-
break;
|
549 |
-
case 'text-editor':
|
550 |
-
var currentValue = jQuery('#'+key).find('textarea').val();
|
551 |
-
if(currentValue==selectedValue){
|
552 |
-
fieldPointer.show();
|
553 |
-
}else{
|
554 |
-
fieldPointer.hide();
|
555 |
-
}
|
556 |
-
break;
|
557 |
-
case 'select':
|
558 |
-
var currentValue = jQuery('#'+key).find('select').val();
|
559 |
-
if(currentValue==selectedValue){
|
560 |
-
fieldPointer.show();
|
561 |
-
}else{
|
562 |
-
fieldPointer.hide();
|
563 |
-
}
|
564 |
-
break;
|
565 |
-
case 'checkbox':
|
566 |
-
var allCheckbox = jQuery('#'+key).find('input[type=checkbox]');
|
567 |
-
allCheckbox.each(function(k,v){
|
568 |
-
if(jQuery(this).is(":checked") && jQuery(this).val()==selectedValue){
|
569 |
-
fieldPointer.show();
|
570 |
-
return false;
|
571 |
-
}else{
|
572 |
-
fieldPointer.hide();
|
573 |
-
}
|
574 |
-
});
|
575 |
-
|
576 |
-
break;
|
577 |
-
/*case 'radio':
|
578 |
-
var currentValue = jQuery('#'+key).find('input[type=radio]:checked').val();
|
579 |
-
if(currentValue==selectedValue){
|
580 |
-
fieldPointer.show();
|
581 |
-
}else{
|
582 |
-
fieldPointer.hide();
|
583 |
-
}
|
584 |
-
break;*/
|
585 |
-
case 'spacing':
|
586 |
-
break;
|
587 |
-
case 'upload':
|
588 |
-
break;
|
589 |
-
case 'color-picker':
|
590 |
-
break;
|
591 |
-
case 'icon-selector':
|
592 |
-
break;
|
593 |
-
case 'gradient-selector':
|
594 |
-
break;
|
595 |
-
default:
|
596 |
-
app.modalcontent.fields.forEach(function(maindata){
|
597 |
-
if(maindata.name==key && maindata.default==selectedValue){
|
598 |
-
fieldPointer.show();
|
599 |
-
}else if(maindata.name==key){
|
600 |
-
fieldPointer.hide();
|
601 |
-
}
|
602 |
-
});
|
603 |
-
break;
|
604 |
}
|
605 |
});
|
606 |
-
}
|
607 |
-
}
|
|
|
608 |
}
|
|
|
609 |
|
610 |
}
|
611 |
});
|
20 |
importLayoutfromFile: '',
|
21 |
innerLayouts: '',
|
22 |
innerLayoutsHeading: '',
|
23 |
+
ampb_script_textarea: (app.mainContent.settingdata['scripts_data']? app.mainContent.settingdata['scripts_data']: ''),
|
24 |
+
ampb_style_textarea: (app.mainContent.settingdata['style_data']? app.mainContent.settingdata['style_data']:'')
|
25 |
}
|
26 |
},
|
27 |
methods:{
|
32 |
this.modalCrrentTab=key;
|
33 |
},
|
34 |
savePagebuilderSettings:function(currentLayoutData){
|
35 |
+
//app.mainContent = currentLayoutData;
|
36 |
+
app.mainContent.settingdata['scripts_data'] = this.ampb_script_textarea;
|
37 |
+
app.mainContent.settingdata['style_data'] = this.ampb_style_textarea;
|
38 |
this.hidePageBuilderPopUp();
|
39 |
},
|
40 |
savePagebuildercustomLayout: function(event){
|
382 |
mounted: function () {//On ready State for component
|
383 |
this.$nextTick(function () {
|
384 |
var self = this;
|
385 |
+
//this.callChangeEnvent();
|
386 |
})
|
387 |
},
|
388 |
computed: {
|
396 |
var currentSelectfield = event.target;
|
397 |
selectedValue = currentSelectfield.getAttribute("data-value");
|
398 |
field.default = selectedValue;
|
399 |
+
this.fieldShowHideCheck(field);
|
400 |
+
//this.callChangeEnvent();
|
401 |
},
|
402 |
selectimages:function(field,event){
|
403 |
app.stopModuleModalClose = true;
|
515 |
field.default = icon.name;
|
516 |
this.$forceUpdate();
|
517 |
},
|
518 |
+
fieldShowHideCheck: function(field){
|
519 |
+
var returnOpt = true;
|
520 |
+
if(field.required){
|
521 |
+
var requiredCondition = field.required;
|
522 |
+
//requiredCondition.forEach(function(conditionval,conditionKey){
|
523 |
+
//console.log(conditionval+' => '+conditionKey);
|
524 |
+
app.modalcontent.fields.forEach(function(maindata, key){
|
525 |
+
if(requiredCondition[maindata.name]){
|
526 |
+
if( maindata.default==requiredCondition[maindata.name]){
|
527 |
+
returnOpt = true;
|
528 |
+
}else{
|
529 |
+
returnOpt = false;
|
530 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
}
|
532 |
});
|
533 |
+
//})
|
534 |
+
}
|
535 |
+
return returnOpt;
|
536 |
}
|
537 |
+
|
538 |
|
539 |
}
|
540 |
});
|
@@ -119,22 +119,22 @@ function ampforwp_icons_list_format(){
|
|
119 |
exit;
|
120 |
}
|
121 |
|
122 |
-
add_action( 'admin_enqueue_scripts', '
|
123 |
-
add_action( '
|
124 |
-
add_action( '
|
125 |
|
126 |
-
function
|
127 |
|
128 |
-
wp_enqueue_style('dynamic-css', admin_url('admin-ajax.php?action=
|
129 |
|
130 |
}
|
131 |
|
132 |
|
133 |
-
function
|
134 |
$amp_icons_css_array = include AMPFORWP_PLUGIN_DIR .'includes/icons/amp-icons.php';
|
135 |
header("Content-type: text/css; charset: UTF-8");
|
136 |
foreach ($amp_icons_css_array as $key=>$value ) {
|
137 |
echo $value;
|
138 |
}
|
139 |
exit;
|
140 |
-
}
|
119 |
exit;
|
120 |
}
|
121 |
|
122 |
+
add_action( 'admin_enqueue_scripts', 'ampforwp_dynamic_css_enqueue' );
|
123 |
+
add_action( 'wp_ajax_ampforwp_dynaminc_css', 'ampforwp_dynaminc_css' );
|
124 |
+
add_action( 'wp_ajax_nopriv_ampforwp_dynaminc_css', 'ampforwp_dynaminc_css' );
|
125 |
|
126 |
+
function ampforwp_dynamic_css_enqueue(){
|
127 |
|
128 |
+
wp_enqueue_style('ampforwp-dynamic-css', admin_url('admin-ajax.php?action=ampforwp_dynaminc_css'), array(), null, 'all' );
|
129 |
|
130 |
}
|
131 |
|
132 |
|
133 |
+
function ampforwp_dynaminc_css() {
|
134 |
$amp_icons_css_array = include AMPFORWP_PLUGIN_DIR .'includes/icons/amp-icons.php';
|
135 |
header("Content-type: text/css; charset: UTF-8");
|
136 |
foreach ($amp_icons_css_array as $key=>$value ) {
|
137 |
echo $value;
|
138 |
}
|
139 |
exit;
|
140 |
+
}
|
@@ -7,12 +7,15 @@ add_action('pre_amp_render_post','amp_pagebuilder_content');
|
|
7 |
function amp_pagebuilder_content(){
|
8 |
global $post, $redux_builder_amp;
|
9 |
$postId = $post->ID;
|
10 |
-
if(
|
11 |
-
$redux_builder_amp['ampforwp-homepage-on-off-support']==1 &&
|
12 |
-
ampforwp_get_blog_details() == false
|
13 |
-
){
|
14 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
15 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
18 |
|
@@ -36,13 +39,31 @@ function ampforwp_insert_pb_content( $content ){
|
|
36 |
return $content;
|
37 |
}
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
add_action('amp_post_template_data','amp_pagebuilder_script_loader',100);
|
41 |
function amp_pagebuilder_script_loader($scriptData){
|
42 |
//To load css of modules which are in use
|
43 |
global $redux_builder_amp, $moduleTemplate, $post, $containerCommonSettings;
|
44 |
$postId = $post->ID;
|
45 |
-
if(
|
46 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
47 |
}
|
48 |
$previousData = get_post_meta($postId,'amp-page-builder');
|
@@ -102,9 +123,15 @@ function amp_pagebuilder_content_styles(){
|
|
102 |
//To load css of modules which are in use
|
103 |
global $redux_builder_amp, $moduleTemplate, $post, $containerCommonSettings;
|
104 |
$postId = $post->ID;
|
105 |
-
if(
|
106 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
107 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
$previousData = get_post_meta($postId,'amp-page-builder');
|
109 |
$previousData = isset($previousData[0])? $previousData[0]: null;
|
110 |
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
@@ -136,6 +163,9 @@ function amp_pagebuilder_content_styles(){
|
|
136 |
|
137 |
if(isset($containerCommonSettings['front_css'])){
|
138 |
$rowCss = $containerCommonSettings['front_css'];
|
|
|
|
|
|
|
139 |
$rowCss = str_replace('{{row-class}}', '.ap_r_'.$rowsData['id'], $rowCss);
|
140 |
foreach($containerCommonSettings['fields'] as $rowfield){
|
141 |
$replaceRow = '';
|
@@ -206,6 +236,9 @@ function amp_pagebuilder_content_styles(){
|
|
206 |
|
207 |
if(isset($moduleTemplate[$contentArray['type']]['front_css'])){
|
208 |
$completeCss = $moduleTemplate[$contentArray['type']]['front_css'];
|
|
|
|
|
|
|
209 |
$completeCss = str_replace("{{module-class}}", '.ap_m_'.$contentArray['cell_id'], $completeCss );
|
210 |
}
|
211 |
if(isset($moduleTemplate[$contentArray['type']]['front_common_css'])){
|
@@ -342,6 +375,10 @@ function amp_pagebuilder_content_styles(){
|
|
342 |
|
343 |
}//foreach closed complete data
|
344 |
}//if closed count($previousData['rows'])>0
|
|
|
|
|
|
|
|
|
345 |
}//If Closed $previousData!="" && $ampforwp_pagebuilder_enable=='yes'
|
346 |
}
|
347 |
function amppb_validateCss($css){
|
@@ -355,13 +392,15 @@ function amppb_post_content($content){
|
|
355 |
global $post, $redux_builder_amp;
|
356 |
global $moduleTemplate, $layoutTemplate, $containerCommonSettings;
|
357 |
$postId = $post->ID;
|
358 |
-
if(
|
359 |
-
$redux_builder_amp['ampforwp-homepage-on-off-support']==1 &&
|
360 |
-
ampforwp_get_blog_details() == false
|
361 |
-
){
|
362 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
363 |
}
|
364 |
-
|
|
|
|
|
|
|
|
|
|
|
365 |
$previousData = get_post_meta($postId,'amp-page-builder');
|
366 |
$previousData = isset($previousData[0])? $previousData[0]: null;
|
367 |
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
7 |
function amp_pagebuilder_content(){
|
8 |
global $post, $redux_builder_amp;
|
9 |
$postId = $post->ID;
|
10 |
+
if( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ){
|
|
|
|
|
|
|
11 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
12 |
}
|
13 |
+
if ( ampforwp_polylang_front_page() ) {
|
14 |
+
$front_page_id = get_option('page_on_front');
|
15 |
+
if($front_page_id){
|
16 |
+
$postId = pll_get_post($front_page_id);
|
17 |
+
}
|
18 |
+
}
|
19 |
|
20 |
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
21 |
|
39 |
return $content;
|
40 |
}
|
41 |
|
42 |
+
add_action('amp_post_template_head','ampforwp_pagebuilder_header_html_output',11);
|
43 |
+
function ampforwp_pagebuilder_header_html_output(){
|
44 |
+
//To load css of modules which are in use
|
45 |
+
global $redux_builder_amp, $moduleTemplate, $post, $containerCommonSettings;
|
46 |
+
$postId = $post->ID;
|
47 |
+
if( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ){
|
48 |
+
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
49 |
+
}
|
50 |
+
$previousData = get_post_meta($postId,'amp-page-builder');
|
51 |
+
$previousData = isset($previousData[0])? $previousData[0]: null;
|
52 |
+
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
53 |
+
if($previousData!="" && $ampforwp_pagebuilder_enable=='yes'){
|
54 |
+
$previousData = (str_replace("'", "", $previousData));
|
55 |
+
$previousData = json_decode($previousData,true);
|
56 |
+
if(isset($previousData['settingdata']['scripts_data']) && $previousData['settingdata']['scripts_data']!=""){
|
57 |
+
echo $previousData['settingdata']['scripts_data'];
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
add_action('amp_post_template_data','amp_pagebuilder_script_loader',100);
|
62 |
function amp_pagebuilder_script_loader($scriptData){
|
63 |
//To load css of modules which are in use
|
64 |
global $redux_builder_amp, $moduleTemplate, $post, $containerCommonSettings;
|
65 |
$postId = $post->ID;
|
66 |
+
if( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ){
|
67 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
68 |
}
|
69 |
$previousData = get_post_meta($postId,'amp-page-builder');
|
123 |
//To load css of modules which are in use
|
124 |
global $redux_builder_amp, $moduleTemplate, $post, $containerCommonSettings;
|
125 |
$postId = $post->ID;
|
126 |
+
if( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
127 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
128 |
}
|
129 |
+
if ( ampforwp_polylang_front_page() ) {
|
130 |
+
$front_page_id = get_option('page_on_front');
|
131 |
+
if($front_page_id){
|
132 |
+
$postId = pll_get_post($front_page_id);
|
133 |
+
}
|
134 |
+
}
|
135 |
$previousData = get_post_meta($postId,'amp-page-builder');
|
136 |
$previousData = isset($previousData[0])? $previousData[0]: null;
|
137 |
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
163 |
|
164 |
if(isset($containerCommonSettings['front_css'])){
|
165 |
$rowCss = $containerCommonSettings['front_css'];
|
166 |
+
if( true == $redux_builder_amp['amp-rtl-select-option'] && isset($containerCommonSettings['front_rtl_css'])) {
|
167 |
+
$rowCss .= $containerCommonSettings['front_rtl_css'];
|
168 |
+
}
|
169 |
$rowCss = str_replace('{{row-class}}', '.ap_r_'.$rowsData['id'], $rowCss);
|
170 |
foreach($containerCommonSettings['fields'] as $rowfield){
|
171 |
$replaceRow = '';
|
236 |
|
237 |
if(isset($moduleTemplate[$contentArray['type']]['front_css'])){
|
238 |
$completeCss = $moduleTemplate[$contentArray['type']]['front_css'];
|
239 |
+
if( true == $redux_builder_amp['amp-rtl-select-option'] && isset($moduleTemplate[$contentArray['type']]['front_rtl_css'])) {
|
240 |
+
$completeCss .= $moduleTemplate[$contentArray['type']]['front_rtl_css'];
|
241 |
+
}
|
242 |
$completeCss = str_replace("{{module-class}}", '.ap_m_'.$contentArray['cell_id'], $completeCss );
|
243 |
}
|
244 |
if(isset($moduleTemplate[$contentArray['type']]['front_common_css'])){
|
375 |
|
376 |
}//foreach closed complete data
|
377 |
}//if closed count($previousData['rows'])>0
|
378 |
+
|
379 |
+
if(isset($previousData['settingdata']['style_data']) && $previousData['settingdata']['style_data']!=""){
|
380 |
+
echo amppb_validateCss($previousData['settingdata']['style_data']);
|
381 |
+
}
|
382 |
}//If Closed $previousData!="" && $ampforwp_pagebuilder_enable=='yes'
|
383 |
}
|
384 |
function amppb_validateCss($css){
|
392 |
global $post, $redux_builder_amp;
|
393 |
global $moduleTemplate, $layoutTemplate, $containerCommonSettings;
|
394 |
$postId = $post->ID;
|
395 |
+
if( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ){
|
|
|
|
|
|
|
396 |
$postId = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
397 |
}
|
398 |
+
if ( ampforwp_polylang_front_page() ) {
|
399 |
+
$front_page_id = get_option('page_on_front');
|
400 |
+
if($front_page_id){
|
401 |
+
$postId = pll_get_post($front_page_id);
|
402 |
+
}
|
403 |
+
}
|
404 |
$previousData = get_post_meta($postId,'amp-page-builder');
|
405 |
$previousData = isset($previousData[0])? $previousData[0]: null;
|
406 |
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
$output = '
|
3 |
-
<a href="{{btn_link}}" target="_blank" class="btn-txt">{{content_title}}</a>
|
4 |
{{if_sub_heading}}<span>{{sub_heading}}</span> {{ifend_sub_heading}}
|
5 |
';
|
6 |
$css = '
|
@@ -34,10 +34,22 @@ return array(
|
|
34 |
'type' =>'text',
|
35 |
'name' =>"btn_link",
|
36 |
'label' =>'URL',
|
37 |
-
|
38 |
'default' =>'#',
|
39 |
'content_type'=>'html',
|
40 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
array(
|
43 |
'type' =>'text',
|
1 |
<?php
|
2 |
$output = '
|
3 |
+
<a href="{{btn_link}}" {{if_condition_page_link_open==new_page}}target="_blank"{{ifend_condition_page_link_open_new_page}} class="btn-txt">{{content_title}}</a>
|
4 |
{{if_sub_heading}}<span>{{sub_heading}}</span> {{ifend_sub_heading}}
|
5 |
';
|
6 |
$css = '
|
34 |
'type' =>'text',
|
35 |
'name' =>"btn_link",
|
36 |
'label' =>'URL',
|
37 |
+
'tab' =>'customizer',
|
38 |
'default' =>'#',
|
39 |
'content_type'=>'html',
|
40 |
),
|
41 |
+
array(
|
42 |
+
'type' =>'select',
|
43 |
+
'name' =>'page_link_open',
|
44 |
+
'label' =>"Open link in",
|
45 |
+
'tab' =>'customizer',
|
46 |
+
'default' =>'new_page',
|
47 |
+
'options_details'=>array(
|
48 |
+
'new_page' =>'New tab',
|
49 |
+
'same_page' =>'Same page'
|
50 |
+
),
|
51 |
+
'content_type'=>'html',
|
52 |
+
),
|
53 |
|
54 |
array(
|
55 |
'type' =>'text',
|
@@ -165,7 +165,7 @@ require_once ABSPATH . WPINC . '/category.php';
|
|
165 |
|
166 |
<div class="cat_mod_l">
|
167 |
<a href="{{ampforwp_post_url}}">
|
168 |
-
<amp-img class="ampforwp_wc_shortcode_img" src="{{image}}" width="{{width}}" height="{{height}}" layout="responsive"> </amp-img
|
169 |
</div>
|
170 |
<div class="cat_mod_r">
|
171 |
<a href="{{ampforwp_post_url}}">{{title}}</a>
|
@@ -219,7 +219,7 @@ require_once ABSPATH . WPINC . '/category.php';
|
|
219 |
break;
|
220 |
}
|
221 |
try{
|
222 |
-
$thumb_url =
|
223 |
if($thumb_url!=false){
|
224 |
$image = $thumb_url[0];
|
225 |
$width = $thumb_url[1];
|
@@ -245,7 +245,7 @@ require_once ABSPATH . WPINC . '/category.php';
|
|
245 |
$author = get_the_author();
|
246 |
// get_the_author_meta( string $field = '', int $user_id = false );
|
247 |
$postdate = get_the_date( ' F j, Y', $postid );
|
248 |
-
|
249 |
"{{ampforwp_post_url}}",
|
250 |
"{{image}}",
|
251 |
"{{width}}",
|
@@ -266,6 +266,15 @@ require_once ABSPATH . WPINC . '/category.php';
|
|
266 |
$postdate
|
267 |
),
|
268 |
$loopHtml);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
/* $contenthtml.='<li>
|
270 |
<div class="cat_mod_l">
|
271 |
<a href="'. $ampforwp_post_url .'"><amp-img class="ampforwp_wc_shortcode_img" src="'. $image.'" width="'. $width . '" height="' . $height . '" layout="fixed"></amp-img></a>
|
165 |
|
166 |
<div class="cat_mod_l">
|
167 |
<a href="{{ampforwp_post_url}}">
|
168 |
+
{{if_image}}<amp-img class="ampforwp_wc_shortcode_img" src="{{image}}" width="{{width}}" height="{{height}}" layout="responsive"> </amp-img>{{ifend_image}}</a>
|
169 |
</div>
|
170 |
<div class="cat_mod_r">
|
171 |
<a href="{{ampforwp_post_url}}">{{title}}</a>
|
219 |
break;
|
220 |
}
|
221 |
try{
|
222 |
+
$thumb_url = ampforwp_aq_resize( $image, $width, $height, true, false ); //resize & crop the image
|
223 |
if($thumb_url!=false){
|
224 |
$image = $thumb_url[0];
|
225 |
$width = $thumb_url[1];
|
245 |
$author = get_the_author();
|
246 |
// get_the_author_meta( string $field = '', int $user_id = false );
|
247 |
$postdate = get_the_date( ' F j, Y', $postid );
|
248 |
+
$rawhtml = str_replace(array(
|
249 |
"{{ampforwp_post_url}}",
|
250 |
"{{image}}",
|
251 |
"{{width}}",
|
266 |
$postdate
|
267 |
),
|
268 |
$loopHtml);
|
269 |
+
$rawhtml = ampforwp_replaceIfContentConditional("ampforwp_post_url", $ampforwp_post_url, $rawhtml);
|
270 |
+
$rawhtml = ampforwp_replaceIfContentConditional("image", $image, $rawhtml);
|
271 |
+
$rawhtml = ampforwp_replaceIfContentConditional("width", $width, $rawhtml);
|
272 |
+
$rawhtml = ampforwp_replaceIfContentConditional("height", $height, $rawhtml);
|
273 |
+
$rawhtml = ampforwp_replaceIfContentConditional("title", $title, $rawhtml);
|
274 |
+
$rawhtml = ampforwp_replaceIfContentConditional("excerptContent", $excerptContent, $rawhtml);
|
275 |
+
$rawhtml = ampforwp_replaceIfContentConditional("authorname", $author, $rawhtml);
|
276 |
+
$rawhtml = ampforwp_replaceIfContentConditional("postdate", $postdate, $rawhtml);
|
277 |
+
$contenthtml .= $rawhtml;
|
278 |
/* $contenthtml.='<li>
|
279 |
<div class="cat_mod_l">
|
280 |
<a href="'. $ampforwp_post_url .'"><amp-img class="ampforwp_wc_shortcode_img" src="'. $image.'" width="'. $width . '" height="' . $height . '" layout="fixed"></amp-img></a>
|
@@ -122,7 +122,18 @@ return array(
|
|
122 |
'default' =>'#',
|
123 |
'content_type'=>'html',
|
124 |
),
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
array(
|
127 |
'type' =>'text-editor',
|
128 |
'name' =>"text_desc",
|
@@ -147,7 +158,7 @@ return array(
|
|
147 |
{{if_recommended_text}}<span class="pri-recom">{{recommended_text}}</span>{{ifend_recommended_text}}
|
148 |
<span class="pri-lbl">{{price_label}}</span>
|
149 |
<span class="pri-desc">{{price_desc}}</span>
|
150 |
-
<a href="{{btn_link}}" target="_blank" class="btn-txt">{{btn_title}}</a>
|
151 |
<div class="pri-cnt">
|
152 |
{{text_desc}}
|
153 |
</div>
|
122 |
'default' =>'#',
|
123 |
'content_type'=>'html',
|
124 |
),
|
125 |
+
array(
|
126 |
+
'type' =>'select',
|
127 |
+
'name' =>'page_link_open_price',
|
128 |
+
'label' =>"Open link in",
|
129 |
+
'tab' =>'customizer',
|
130 |
+
'default' =>'new_page',
|
131 |
+
'options_details'=>array(
|
132 |
+
'new_page' =>'New tab',
|
133 |
+
'same_page' =>'Same page'
|
134 |
+
),
|
135 |
+
'content_type'=>'html',
|
136 |
+
),
|
137 |
array(
|
138 |
'type' =>'text-editor',
|
139 |
'name' =>"text_desc",
|
158 |
{{if_recommended_text}}<span class="pri-recom">{{recommended_text}}</span>{{ifend_recommended_text}}
|
159 |
<span class="pri-lbl">{{price_label}}</span>
|
160 |
<span class="pri-desc">{{price_desc}}</span>
|
161 |
+
<a href="{{btn_link}}" {{if_condition_page_link_open_price==new_page}}target="_blank"{{ifend_condition_page_link_open_price_new_page}} class="btn-txt">{{btn_title}}</a>
|
162 |
<div class="pri-cnt">
|
163 |
{{text_desc}}
|
164 |
</div>
|
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -182,6 +182,43 @@ You can contact us from [here](http://ampforwp.com/contact/)
|
|
182 |
|
183 |
== Changelog ==
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
= 0.9.83.1 (8th March 2018) =
|
186 |
* Fixed: Pagebuilder contents not shows on custom home page #1794
|
187 |
* Added: Header hook added `ampforwp_advance_header_layout_options`
|
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
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
182 |
|
183 |
== Changelog ==
|
184 |
|
185 |
+
= 0.9.84 (14th March 2018) =
|
186 |
+
* Added: Polylang Frontpage compatibility added #1779
|
187 |
+
* Fixed: Proper link for Linkedin added #1820
|
188 |
+
* Fixed: Incorrect function name was Added #1827
|
189 |
+
* Fixed: Thumbnail resizing issue in Swift #1828
|
190 |
+
* Fixed: Thumbnail issue in Loops of Design 3 #1714
|
191 |
+
* Fixed: Hide post builder for Swift #1824
|
192 |
+
* Fixed: To avoid warnings when there are no pages in WordPress #1810
|
193 |
+
* Fixed: Condition for the Thumbnail for Swift #1733
|
194 |
+
* Fixed: Proper Styling for footer for Swift #1733
|
195 |
+
* Fixed: Line height issue and CSS editor not working in Swift #1821
|
196 |
+
* Fixed: Renamed aq_resize to ampfrowp_aq_resize to avoid conflicts #1838
|
197 |
+
* Fixed: Add the prefix to avoid conflicts #1817
|
198 |
+
* Fixed: Added Custom format option in amp_date #1845
|
199 |
+
* Fixed: Removed amp-img tag where blank SRC in Page builder #1843
|
200 |
+
* Fixed: Pagebuilder modal max-height removed so it will become full width #1843
|
201 |
+
* Added: An option for select target type in Button Module #1822
|
202 |
+
* Fixed: Remove AMP category widget if swift is enabled #1790
|
203 |
+
* Fixed: Filter added change mode type #1833
|
204 |
+
* Added: Rewrite rule for .html blog page #1775
|
205 |
+
* Fixed: Filter added change mode type #1833
|
206 |
+
* Fixed: Swift Footer Widget Sanitizer Added #1800
|
207 |
+
* Fixed: No OneSignal widget when PageBuilder is enabled #1840
|
208 |
+
* Fixed: span tag added around the pagination text #1834
|
209 |
+
* Added: Page specific option to add script/html and styles in page builder #1831
|
210 |
+
* Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
|
211 |
+
* Added: Jarida theme compatibility added #1842
|
212 |
+
* Fixed: noindex,nofollow in AMP when Dev mode is enabled #1839
|
213 |
+
* Fixed: Replace value attribute only from html tags. Otherwise it is removing value from * shortcodes which is breaking the whole page. #1738
|
214 |
+
* Added: Underline option for content links added #1808
|
215 |
+
* Added: Page specific option to add RTL in page builder #1858
|
216 |
+
* Added: Converts AMP ads to normal so ads show when takeover is enabled in Normal Mode #1724
|
217 |
+
* Added: Converts AMP Analytics to normal so Analytics works when takeover is enabled in Normal Mode #1724
|
218 |
+
* Fixed: Phone icon proper alignment in Design3 #1730
|
219 |
+
* Added: ADS for WP activation box in Extensions tab
|
220 |
+
* Added: New design field added #1861
|
221 |
+
|
222 |
= 0.9.83.1 (8th March 2018) =
|
223 |
* Fixed: Pagebuilder contents not shows on custom home page #1794
|
224 |
* Added: Header hook added `ampforwp_advance_header_layout_options`
|
@@ -201,7 +201,10 @@ class AMPFORWP_Categories_Widget extends WP_Widget {
|
|
201 |
|
202 |
// Register the widget.
|
203 |
function ampforwp_register_categories_widget() {
|
204 |
-
|
|
|
|
|
|
|
205 |
}
|
206 |
add_action( 'widgets_init', 'ampforwp_register_categories_widget' );
|
207 |
|
201 |
|
202 |
// Register the widget.
|
203 |
function ampforwp_register_categories_widget() {
|
204 |
+
global $redux_builder_amp;
|
205 |
+
if ( isset($redux_builder_amp['amp-design-selector']) && 4 != $redux_builder_amp['amp-design-selector'] ) {
|
206 |
+
register_widget( 'AMPFORWP_Categories_Widget' );
|
207 |
+
}
|
208 |
}
|
209 |
add_action( 'widgets_init', 'ampforwp_register_categories_widget' );
|
210 |
|
@@ -11,7 +11,7 @@ function ampforwp_custom_post_content_sanitizer( $data, $post ) {
|
|
11 |
|
12 |
global $post;
|
13 |
$amp_current_post_id = get_the_ID();
|
14 |
-
if (
|
15 |
//Custom AMP Editor Support for WPML #1138
|
16 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
17 |
if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
|
@@ -21,6 +21,10 @@ function ampforwp_custom_post_content_sanitizer( $data, $post ) {
|
|
21 |
else {
|
22 |
$amp_current_post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
23 |
}
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
$amp_custom_post_content_input = get_post_meta($amp_current_post_id, 'ampforwp_custom_content_editor', true);
|
26 |
$amp_custom_post_content_check = get_post_meta($amp_current_post_id, 'ampforwp_custom_content_editor_checkbox', true);
|
11 |
|
12 |
global $post;
|
13 |
$amp_current_post_id = get_the_ID();
|
14 |
+
if ( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
15 |
//Custom AMP Editor Support for WPML #1138
|
16 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
17 |
if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
|
21 |
else {
|
22 |
$amp_current_post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
23 |
}
|
24 |
+
}
|
25 |
+
// Custom AMP Editor Support for Polylang #1779
|
26 |
+
if ( ampforwp_polylang_front_page() ) {
|
27 |
+
$amp_current_post_id = pll_get_post(get_option('page_on_front'));
|
28 |
}
|
29 |
$amp_custom_post_content_input = get_post_meta($amp_current_post_id, 'ampforwp_custom_content_editor', true);
|
30 |
$amp_custom_post_content_check = get_post_meta($amp_current_post_id, 'ampforwp_custom_content_editor_checkbox', true);
|
@@ -20,7 +20,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
|
|
20 |
global $post,$wp_query;
|
21 |
|
22 |
// Do not display on the homepage
|
23 |
-
if ( !is_front_page() ) {
|
24 |
|
25 |
// Build the breadcrums
|
26 |
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
20 |
global $post,$wp_query;
|
21 |
|
22 |
// Do not display on the homepage
|
23 |
+
if ( !is_front_page() && !ampforwp_polylang_front_page() ) {
|
24 |
|
25 |
// Build the breadcrums
|
26 |
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
@@ -2,6 +2,7 @@
|
|
2 |
<?php do_action('ampforwp_before_content_hook',$this); ?>
|
3 |
|
4 |
<div class="amp-wp-article-content">
|
|
|
5 |
<?php
|
6 |
do_action('ampforwp_inside_post_content_before',$this);
|
7 |
$amp_custom_content_enable = get_post_meta( $this->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
|
@@ -30,6 +31,7 @@
|
|
30 |
}//#1015 Pegazee
|
31 |
|
32 |
do_action('ampforwp_after_post_content',$this) ; ?>
|
|
|
33 |
<!--Post Next-Previous Links-->
|
34 |
<?php
|
35 |
if($redux_builder_amp['enable-single-next-prev'] && !is_page() ) { ?>
|
2 |
<?php do_action('ampforwp_before_content_hook',$this); ?>
|
3 |
|
4 |
<div class="amp-wp-article-content">
|
5 |
+
<div class="amp-wp-content the_content">
|
6 |
<?php
|
7 |
do_action('ampforwp_inside_post_content_before',$this);
|
8 |
$amp_custom_content_enable = get_post_meta( $this->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
|
31 |
}//#1015 Pegazee
|
32 |
|
33 |
do_action('ampforwp_after_post_content',$this) ; ?>
|
34 |
+
</div>
|
35 |
<!--Post Next-Previous Links-->
|
36 |
<?php
|
37 |
if($redux_builder_amp['enable-single-next-prev'] && !is_page() ) { ?>
|
@@ -1,11 +1,9 @@
|
|
1 |
<?php global $redux_builder_amp,$wp;
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
8 |
-
}
|
9 |
$template = new AMP_Post_Template( $post_id );?>
|
10 |
<!doctype html>
|
11 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $template->get( 'html_tag_attributes' ) ); ?>>
|
1 |
<?php global $redux_builder_amp,$wp;
|
2 |
+
$post_id = '';
|
3 |
+
if ( isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
4 |
+
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
5 |
+
}
|
6 |
+
$post_id = apply_filters('ampforwp_frontpage_id', $post_id);
|
|
|
|
|
7 |
$template = new AMP_Post_Template( $post_id );?>
|
8 |
<!doctype html>
|
9 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $template->get( 'html_tag_attributes' ) ); ?>>
|
@@ -20,7 +20,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
|
|
20 |
global $post,$wp_query;
|
21 |
|
22 |
// Do not display on the homepage
|
23 |
-
if ( !is_front_page() ) {
|
24 |
|
25 |
// Build the breadcrums
|
26 |
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
20 |
global $post,$wp_query;
|
21 |
|
22 |
// Do not display on the homepage
|
23 |
+
if ( !is_front_page() && !ampforwp_polylang_front_page() ) {
|
24 |
|
25 |
// Build the breadcrums
|
26 |
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
@@ -1,11 +1,9 @@
|
|
1 |
<?php global $redux_builder_amp , $wp;
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
8 |
-
}
|
9 |
$template = new AMP_Post_Template( $post_id );?>
|
10 |
<!doctype html>
|
11 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $template->get( 'html_tag_attributes' ) ); ?>>
|
1 |
<?php global $redux_builder_amp , $wp;
|
2 |
+
$post_id = '';
|
3 |
+
if ( isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
4 |
+
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
5 |
+
}
|
6 |
+
$post_id = apply_filters('ampforwp_frontpage_id', $post_id);
|
|
|
|
|
7 |
$template = new AMP_Post_Template( $post_id );?>
|
8 |
<!doctype html>
|
9 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $template->get( 'html_tag_attributes' ) ); ?>>
|
@@ -121,6 +121,8 @@ if ( get_query_var( 'paged' ) ) {
|
|
121 |
<div class="amp-wp-content amp-loop-list <?php if ( ! ampforwp_has_post_thumbnail() ) { ?>amp-loop-list-noimg<?php } ?>">
|
122 |
<?php if ( ampforwp_has_post_thumbnail() ) {
|
123 |
$thumb_url = ampforwp_get_post_thumbnail();
|
|
|
|
|
124 |
if($thumb_url){
|
125 |
?>
|
126 |
<div class="home-post_image">
|
@@ -129,8 +131,8 @@ if ( get_query_var( 'paged' ) ) {
|
|
129 |
layout="responsive"
|
130 |
src=<?php echo esc_url($thumb_url); ?>
|
131 |
<?php ampforwp_thumbnail_alt(); ?>
|
132 |
-
width
|
133 |
-
height
|
134 |
></amp-img>
|
135 |
</a>
|
136 |
</div>
|
121 |
<div class="amp-wp-content amp-loop-list <?php if ( ! ampforwp_has_post_thumbnail() ) { ?>amp-loop-list-noimg<?php } ?>">
|
122 |
<?php if ( ampforwp_has_post_thumbnail() ) {
|
123 |
$thumb_url = ampforwp_get_post_thumbnail();
|
124 |
+
$thumb_width = ampforwp_get_post_thumbnail('width');
|
125 |
+
$thumb_height = ampforwp_get_post_thumbnail('height');
|
126 |
if($thumb_url){
|
127 |
?>
|
128 |
<div class="home-post_image">
|
131 |
layout="responsive"
|
132 |
src=<?php echo esc_url($thumb_url); ?>
|
133 |
<?php ampforwp_thumbnail_alt(); ?>
|
134 |
+
width=<?php echo $thumb_width; ?>
|
135 |
+
height=<?php echo $thumb_height; ?>
|
136 |
></amp-img>
|
137 |
</a>
|
138 |
</div>
|
@@ -20,7 +20,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
|
|
20 |
global $post,$wp_query;
|
21 |
|
22 |
// Do not display on the homepage
|
23 |
-
if ( !is_front_page() ) {
|
24 |
|
25 |
// Build the breadcrums
|
26 |
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
20 |
global $post,$wp_query;
|
21 |
|
22 |
// Do not display on the homepage
|
23 |
+
if ( !is_front_page() && !ampforwp_polylang_front_page() ) {
|
24 |
|
25 |
// Build the breadcrums
|
26 |
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
@@ -66,7 +66,7 @@ $image = ''; ?>
|
|
66 |
<?php } ?>
|
67 |
<?php if ( true == $redux_builder_amp['enable-single-linkedin-share'] ) { ?>
|
68 |
<div class="ampforwp-custom-social">
|
69 |
-
<a href="
|
70 |
<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTA0NiAxMDA3IiBmaWxsPSIjZmZmZmZmIiA+PHBhdGggZD0iTTIzNyAxMDA1VjMzMEgxM3Y2NzVoMjI0ek0xMjUgMjM4Yzc4IDAgMTI3LTUyIDEyNy0xMTdDMjUxIDU1IDIwMyA0IDEyNyA0IDUwIDQgMCA1NCAwIDEyMWMwIDY1IDQ5IDExNyAxMjQgMTE3aDF6bTIzNiA3NjdoMjI0VjYyOGMwLTIwIDEtNDAgNy01NSAxNi00MCA1My04MiAxMTUtODIgODEgMCAxMTQgNjIgMTE0IDE1M3YzNjFoMjI0VjYxOGMwLTIwNy0xMTEtMzA0LTI1OC0zMDQtMTIxIDAtMTc0IDY4LTIwNCAxMTRoMXYtOThIMzYwYzMgNjMgMCA2NzUgMCA2NzV6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" />
|
71 |
</a>
|
72 |
</div>
|
66 |
<?php } ?>
|
67 |
<?php if ( true == $redux_builder_amp['enable-single-linkedin-share'] ) { ?>
|
68 |
<div class="ampforwp-custom-social">
|
69 |
+
<a href="https://www.linkedin.com/shareArticle?url=<?php esc_url(the_permalink()); ?>&title=<?php the_title(); ?>" class="amp-social-icon-rounded amp-social-linkedin" target="_blank">
|
70 |
<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTA0NiAxMDA3IiBmaWxsPSIjZmZmZmZmIiA+PHBhdGggZD0iTTIzNyAxMDA1VjMzMEgxM3Y2NzVoMjI0ek0xMjUgMjM4Yzc4IDAgMTI3LTUyIDEyNy0xMTdDMjUxIDU1IDIwMyA0IDEyNyA0IDUwIDQgMCA1NCAwIDEyMWMwIDY1IDQ5IDExNyAxMjQgMTE3aDF6bTIzNiA3NjdoMjI0VjYyOGMwLTIwIDEtNDAgNy01NSAxNi00MCA1My04MiAxMTUtODIgODEgMCAxMTQgNjIgMTE0IDE1M3YzNjFoMjI0VjYxOGMwLTIwNy0xMTEtMzA0LTI1OC0zMDQtMTIxIDAtMTc0IDY4LTIwNCAxMTRoMXYtOThIMzYwYzMgNjMgMCA2NzUgMCA2NzV6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" />
|
71 |
</a>
|
72 |
</div>
|
@@ -1,13 +1,9 @@
|
|
1 |
-
<?php global $redux_builder_amp;
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
}
|
8 |
-
else{
|
9 |
-
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
10 |
-
}
|
11 |
$template = new AMP_Post_Template( $post_id );?>
|
12 |
<!doctype html>
|
13 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $template->get( 'html_tag_attributes' ) ); ?>>
|
1 |
+
<?php global $redux_builder_amp,$wp;
|
2 |
+
$post_id = '';
|
3 |
+
if ( isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
4 |
+
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
5 |
+
}
|
6 |
+
$post_id = apply_filters('ampforwp_frontpage_id', $post_id);
|
|
|
|
|
|
|
|
|
7 |
$template = new AMP_Post_Template( $post_id );?>
|
8 |
<!doctype html>
|
9 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $template->get( 'html_tag_attributes' ) ); ?>>
|
@@ -63,9 +63,11 @@
|
|
63 |
<div class="amp-wp-content amp-loop-list">
|
64 |
<?php if ( ampforwp_has_post_thumbnail() ) {
|
65 |
$thumb_url = ampforwp_get_post_thumbnail();
|
|
|
|
|
66 |
if($thumb_url){
|
67 |
?>
|
68 |
-
<div class="home-post_image"><a href="<?php echo ampforwp_url_controller( get_permalink() ); ?>"><amp-img layout="responsive" src=<?php echo esc_url($thumb_url); ?> width
|
69 |
<?php }
|
70 |
} ?>
|
71 |
|
63 |
<div class="amp-wp-content amp-loop-list">
|
64 |
<?php if ( ampforwp_has_post_thumbnail() ) {
|
65 |
$thumb_url = ampforwp_get_post_thumbnail();
|
66 |
+
$thumb_width = ampforwp_get_post_thumbnail('width');
|
67 |
+
$thumb_height = ampforwp_get_post_thumbnail('height');
|
68 |
if($thumb_url){
|
69 |
?>
|
70 |
+
<div class="home-post_image"><a href="<?php echo ampforwp_url_controller( get_permalink() ); ?>"><amp-img layout="responsive" src=<?php echo esc_url($thumb_url); ?> width=<?php echo $thumb_width; ?> height=<?php echo $thumb_height; ?> ></amp-img></a></div>
|
71 |
<?php }
|
72 |
} ?>
|
73 |
|
@@ -422,7 +422,7 @@ amp-user-notification button { background-color: <?php echo esc_attr($redux_bui
|
|
422 |
.toggle-navigationv2 a { color:#fff; }
|
423 |
<?php } ?>
|
424 |
<?php if ( $redux_builder_amp['ampforwp-callnow-button'] ) { ?>
|
425 |
-
.callnow{ position:
|
426 |
.callnow a:before { content: ""; position: absolute; right: 23px; width: 4px; height: 8px; border-width: 6px 0 6px 3px; border-style: solid; border-color:<?php echo esc_attr($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; }
|
427 |
<?php } ?>
|
428 |
<?php
|
422 |
.toggle-navigationv2 a { color:#fff; }
|
423 |
<?php } ?>
|
424 |
<?php if ( $redux_builder_amp['ampforwp-callnow-button'] ) { ?>
|
425 |
+
.callnow{ position: absolute; top: 15px; right: 20px }
|
426 |
.callnow a:before { content: ""; position: absolute; right: 23px; width: 4px; height: 8px; border-width: 6px 0 6px 3px; border-style: solid; border-color:<?php echo esc_attr($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; }
|
427 |
<?php } ?>
|
428 |
<?php
|
@@ -7,8 +7,12 @@
|
|
7 |
<div class="cntr">
|
8 |
<div class="f-w">
|
9 |
<?php
|
|
|
|
|
|
|
|
|
10 |
$sanitizer_obj = new AMPFORWP_Content(
|
11 |
-
|
12 |
array(),
|
13 |
apply_filters( 'ampforwp_content_sanitizers',
|
14 |
array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(),
|
7 |
<div class="cntr">
|
8 |
<div class="f-w">
|
9 |
<?php
|
10 |
+
ob_start();
|
11 |
+
dynamic_sidebar('swift-footer-widget-area');
|
12 |
+
$swift_footer_widget = ob_get_contents();
|
13 |
+
ob_end_clean();
|
14 |
$sanitizer_obj = new AMPFORWP_Content(
|
15 |
+
$swift_footer_widget,
|
16 |
array(),
|
17 |
apply_filters( 'ampforwp_content_sanitizers',
|
18 |
array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(),
|
@@ -41,10 +41,12 @@
|
|
41 |
$height = $redux_builder_amp['ampforwp-swift-homepage-posts-height'];
|
42 |
} ?>
|
43 |
<div class="fsp">
|
44 |
-
<?php $args = array("tag"=>'div',"tag_class"=>'image-container','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height, 'responsive'=> true);
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
48 |
<div class="fsp-cnt">
|
49 |
<?php amp_loop_category(); ?>
|
50 |
<?php amp_loop_title(); ?>
|
41 |
$height = $redux_builder_amp['ampforwp-swift-homepage-posts-height'];
|
42 |
} ?>
|
43 |
<div class="fsp">
|
44 |
+
<?php $args = array("tag"=>'div',"tag_class"=>'image-container','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height, 'responsive'=> true);
|
45 |
+
if ( ampforwp_has_post_thumbnail() ) {?>
|
46 |
+
<div class="fsp-img">
|
47 |
+
<?php amp_loop_image($args); ?>
|
48 |
+
</div>
|
49 |
+
<?php } ?>
|
50 |
<div class="fsp-cnt">
|
51 |
<?php amp_loop_category(); ?>
|
52 |
<?php amp_loop_title(); ?>
|
@@ -67,8 +67,8 @@
|
|
67 |
<?php } ?>
|
68 |
<?php if($redux_builder_amp['enable-single-pinterest-share']){
|
69 |
$thumb_id = $image = '';
|
70 |
-
if (has_post_thumbnail(
|
71 |
-
$thumb_id = get_post_thumbnail_id(
|
72 |
$image = wp_get_attachment_image_src( $thumb_id, 'full' );
|
73 |
$image = $image[0];
|
74 |
}?>
|
@@ -194,7 +194,6 @@
|
|
194 |
</div>
|
195 |
</div>
|
196 |
</div>
|
197 |
-
</div>
|
198 |
<?php }
|
199 |
do_action("ampforwp_single_design_type_handle");
|
200 |
?>
|
@@ -227,6 +226,6 @@ do_action("ampforwp_single_design_type_handle");
|
|
227 |
<?php endwhile; amp_loop('end'); ?>
|
228 |
</div>
|
229 |
</div>
|
|
|
230 |
<?php } ?>
|
231 |
<?php amp_footer()?>
|
232 |
-
</div>
|
67 |
<?php } ?>
|
68 |
<?php if($redux_builder_amp['enable-single-pinterest-share']){
|
69 |
$thumb_id = $image = '';
|
70 |
+
if (has_post_thumbnail( ) ){
|
71 |
+
$thumb_id = get_post_thumbnail_id(get_the_ID());
|
72 |
$image = wp_get_attachment_image_src( $thumb_id, 'full' );
|
73 |
$image = $image[0];
|
74 |
}?>
|
194 |
</div>
|
195 |
</div>
|
196 |
</div>
|
|
|
197 |
<?php }
|
198 |
do_action("ampforwp_single_design_type_handle");
|
199 |
?>
|
226 |
<?php endwhile; amp_loop('end'); ?>
|
227 |
</div>
|
228 |
</div>
|
229 |
+
</div>
|
230 |
<?php } ?>
|
231 |
<?php amp_footer()?>
|
|
@@ -245,7 +245,7 @@ if( is_home() || is_archive() || is_search() || (function_exists('is_shop') && i
|
|
245 |
<?php }?>
|
246 |
<?php //page and frontpage
|
247 |
|
248 |
-
if( is_page() || ampforwp_is_front_page() ){?>
|
249 |
<?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
|
250 |
.sp {width: 100%;margin-top: 20px;display: inline-block;}
|
251 |
.breadcrumbs {padding-bottom: 10px;border-bottom: 1px solid #eee;display: inline-block;width: 100%;font-size: 10px;text-transform: uppercase;}
|
@@ -436,9 +436,6 @@ if( 1 == $redux_builder_amp['ampforwp-bread-crumb'] ) {?>
|
|
436 |
if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['footer-type'] ) { ?>
|
437 |
.footer{font-size: 12px;margin-top: 80px;}
|
438 |
.f-menu ul li .sub-menu{display:none;}
|
439 |
-
<?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
|
440 |
-
.footer{margin-top: 0px;}
|
441 |
-
<?php } ?>
|
442 |
.f-menu ul li{display:inline-block;margin-right:20px;}
|
443 |
.f-menu ul li a {padding:0;font-size:14px;color:#7a7a7a;}
|
444 |
.f-menu ul > li:hover a{color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;}
|
@@ -451,16 +448,12 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
|
|
451 |
<?php endif; ?>
|
452 |
.f-w{display: inline-flex;width: 100%;}
|
453 |
.f-w-f2{text-align: center;border-top: 1px solid #eee;padding:50px 0px;}
|
454 |
-
.w-bl
|
455 |
-
.w-bl h4
|
456 |
.w-bl ul li, .ampforwp_wc_shortcode_title{list-style-type: none;font-size: 14px;line-height:1.5;margin-bottom: 15px;}
|
457 |
.w-bl ul li:last-child{margin-bottom:0;}
|
458 |
.w-bl ul li a{text-decoration: none;}
|
459 |
.w-bl .menu li .sub-menu{display:none;}
|
460 |
-
.amp_cb_module ul li{
|
461 |
-
list-style-type:none;
|
462 |
-
margin-bottom:20px;
|
463 |
-
}
|
464 |
.ampforwp_wc_shortcode_title{
|
465 |
margin-top: 12px;
|
466 |
display: inline-block;
|
@@ -494,6 +487,12 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
|
|
494 |
<?php endif; ?>
|
495 |
.w-bl h4 {margin-bottom: 15px;}
|
496 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
<?php } ?>
|
498 |
<?php
|
499 |
|
@@ -612,7 +611,7 @@ if( true == $redux_builder_amp['amp-rtl-select-option'] ) {?>
|
|
612 |
.item-home:after {padding-right: 5px;}
|
613 |
.amp-post-title{text-align: right;}
|
614 |
.post-date .post-edit-link {float: left;}
|
615 |
-
.sp-rt{
|
616 |
.sp-rt .amp-author .amp-author-image {float: right;}
|
617 |
.amp-author-image amp-img {margin: 0px 0px 5px 12px;}
|
618 |
.prev {float: right;}
|
@@ -633,6 +632,7 @@ if( true == $redux_builder_amp['amp-rtl-select-option'] ) {?>
|
|
633 |
.fbp-cnt {width:100%;float:none;margin-right:0;}
|
634 |
.fsp-img {float: right;margin-right: 0;margin-left:20px;}
|
635 |
.rlp-image {float: right;margin-left: 15px;margin-right: 0;}
|
|
|
636 |
}
|
637 |
@media(max-width:480px){
|
638 |
.fbp-cnt{width:100%;margin-right:0;}
|
@@ -686,5 +686,4 @@ a.lb-x{
|
|
686 |
right: auto;
|
687 |
left:0;
|
688 |
}
|
689 |
-
<?php } //RTL End ?>
|
690 |
-
<?php echo $redux_builder_amp['css_editor']; ?>
|
245 |
<?php }?>
|
246 |
<?php //page and frontpage
|
247 |
|
248 |
+
if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
|
249 |
<?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
|
250 |
.sp {width: 100%;margin-top: 20px;display: inline-block;}
|
251 |
.breadcrumbs {padding-bottom: 10px;border-bottom: 1px solid #eee;display: inline-block;width: 100%;font-size: 10px;text-transform: uppercase;}
|
436 |
if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['footer-type'] ) { ?>
|
437 |
.footer{font-size: 12px;margin-top: 80px;}
|
438 |
.f-menu ul li .sub-menu{display:none;}
|
|
|
|
|
|
|
439 |
.f-menu ul li{display:inline-block;margin-right:20px;}
|
440 |
.f-menu ul li a {padding:0;font-size:14px;color:#7a7a7a;}
|
441 |
.f-menu ul > li:hover a{color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;}
|
448 |
<?php endif; ?>
|
449 |
.f-w{display: inline-flex;width: 100%;}
|
450 |
.f-w-f2{text-align: center;border-top: 1px solid #eee;padding:50px 0px;}
|
451 |
+
.w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px;}
|
452 |
+
.w-bl h4{color: #999;font-size: 12px;font-weight: 500;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
|
453 |
.w-bl ul li, .ampforwp_wc_shortcode_title{list-style-type: none;font-size: 14px;line-height:1.5;margin-bottom: 15px;}
|
454 |
.w-bl ul li:last-child{margin-bottom:0;}
|
455 |
.w-bl ul li a{text-decoration: none;}
|
456 |
.w-bl .menu li .sub-menu{display:none;}
|
|
|
|
|
|
|
|
|
457 |
.ampforwp_wc_shortcode_title{
|
458 |
margin-top: 12px;
|
459 |
display: inline-block;
|
487 |
<?php endif; ?>
|
488 |
.w-bl h4 {margin-bottom: 15px;}
|
489 |
}
|
490 |
+
<?php if( checkAMPforPageBuilderStatus(get_the_ID()) && (ampforwp_is_front_page() || is_page()) ) { ?>
|
491 |
+
.footer{margin-top: 0px;}
|
492 |
+
<?php } ?>
|
493 |
+
<?php if( ampforwp_is_home() || ampforwp_is_blog() ) { ?>
|
494 |
+
.footer{margin-top: 40px;}
|
495 |
+
<?php } ?>
|
496 |
<?php } ?>
|
497 |
<?php
|
498 |
|
611 |
.item-home:after {padding-right: 5px;}
|
612 |
.amp-post-title{text-align: right;}
|
613 |
.post-date .post-edit-link {float: left;}
|
614 |
+
.sp-rt{direction: rtl;margin-right: 50px;margin-left:0;}
|
615 |
.sp-rt .amp-author .amp-author-image {float: right;}
|
616 |
.amp-author-image amp-img {margin: 0px 0px 5px 12px;}
|
617 |
.prev {float: right;}
|
632 |
.fbp-cnt {width:100%;float:none;margin-right:0;}
|
633 |
.fsp-img {float: right;margin-right: 0;margin-left:20px;}
|
634 |
.rlp-image {float: right;margin-left: 15px;margin-right: 0;}
|
635 |
+
.sp-rt{margin-right:0}
|
636 |
}
|
637 |
@media(max-width:480px){
|
638 |
.fbp-cnt{width:100%;margin-right:0;}
|
686 |
right: auto;
|
687 |
left:0;
|
688 |
}
|
689 |
+
<?php } //RTL End ?>
|
|
@@ -145,21 +145,23 @@ add_amp_theme_support('AMP-loop');
|
|
145 |
}
|
146 |
// TODO: Update this function
|
147 |
function ampforwp_include_customizer_files(){
|
|
|
148 |
$amp_plugin_data;
|
149 |
$amp_plugin_activation_check;
|
150 |
|
151 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
152 |
$amp_plugin_activation_check = is_plugin_active( 'amp/amp.php' );
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
163 |
}
|
164 |
}
|
165 |
ampforwp_include_customizer_files();
|
@@ -374,9 +376,8 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
374 |
// Add Homepage AMP file code
|
375 |
add_filter( 'amp_post_template_file', 'ampforwp_custom_template', 10, 3 );
|
376 |
function ampforwp_custom_template( $file, $type, $post ) {
|
377 |
-
// Custom Homepage and Archive file
|
378 |
-
|
379 |
global $redux_builder_amp;
|
|
|
380 |
$slug = array();
|
381 |
$current_url_in_pieces = array();
|
382 |
$ampforwp_custom_post_page = ampforwp_custom_post_page();
|
@@ -387,7 +388,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
387 |
|
388 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/index.php';
|
389 |
|
390 |
-
if ( ampforwp_is_front_page()
|
391 |
|
392 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
393 |
}
|
@@ -418,6 +419,12 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
418 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/single.php';
|
419 |
}
|
420 |
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
return $file;
|
422 |
}
|
423 |
|
@@ -574,6 +581,8 @@ function ampforwp_new_dir( $dir ) {
|
|
574 |
function ampforwp_header_advert() {
|
575 |
global $redux_builder_amp;
|
576 |
$optimize = '';
|
|
|
|
|
577 |
$optimize = ampforwp_ad_optimize();
|
578 |
if ( isset($redux_builder_amp['enable-amp-ads-1']) && true == $redux_builder_amp['enable-amp-ads-1'] ) {
|
579 |
if ( 1 == $redux_builder_amp['enable-amp-ads-select-1'] ) {
|
@@ -607,6 +616,7 @@ function ampforwp_new_dir( $dir ) {
|
|
607 |
$output .= '</amp-ad>';
|
608 |
$output .= ampforwp_ads_sponsorship();
|
609 |
$output .= ' </div>';
|
|
|
610 |
echo $output;
|
611 |
}
|
612 |
}
|
@@ -617,6 +627,8 @@ function ampforwp_new_dir( $dir ) {
|
|
617 |
function ampforwp_footer_advert() {
|
618 |
global $redux_builder_amp;
|
619 |
$optimize = '';
|
|
|
|
|
620 |
$optimize = ampforwp_ad_optimize();
|
621 |
if ( isset($redux_builder_amp['enable-amp-ads-2']) && true == $redux_builder_amp['enable-amp-ads-2'] ) {
|
622 |
if($redux_builder_amp['enable-amp-ads-select-2'] == 1) {
|
@@ -650,6 +662,7 @@ function ampforwp_new_dir( $dir ) {
|
|
650 |
$output .= '</amp-ad>';
|
651 |
$output .= ampforwp_ads_sponsorship();
|
652 |
$output .= ' </div>';
|
|
|
653 |
echo $output;
|
654 |
}
|
655 |
}
|
@@ -661,6 +674,8 @@ function ampforwp_new_dir( $dir ) {
|
|
661 |
function ampforwp_before_post_content_advert() {
|
662 |
global $redux_builder_amp;
|
663 |
$optimize = '';
|
|
|
|
|
664 |
$optimize = ampforwp_ad_optimize();
|
665 |
if ( isset($redux_builder_amp['enable-amp-ads-3']) && true == $redux_builder_amp['enable-amp-ads-3'] ) {
|
666 |
if($redux_builder_amp['enable-amp-ads-select-3'] == 1) {
|
@@ -694,6 +709,7 @@ function ampforwp_new_dir( $dir ) {
|
|
694 |
$output .= '</amp-ad>';
|
695 |
$output .= ampforwp_ads_sponsorship();
|
696 |
$output .= ' </div>';
|
|
|
697 |
echo $output;
|
698 |
}
|
699 |
}
|
@@ -705,6 +721,8 @@ function ampforwp_new_dir( $dir ) {
|
|
705 |
function ampforwp_after_post_content_advert() {
|
706 |
global $redux_builder_amp;
|
707 |
$optimize = '';
|
|
|
|
|
708 |
$optimize = ampforwp_ad_optimize();
|
709 |
if ( isset($redux_builder_amp['enable-amp-ads-4']) && true == $redux_builder_amp['enable-amp-ads-4'] ) {
|
710 |
if($redux_builder_amp['enable-amp-ads-select-4'] == 1) {
|
@@ -738,6 +756,7 @@ function ampforwp_new_dir( $dir ) {
|
|
738 |
$output .= '</amp-ad>';
|
739 |
$output .= ampforwp_ads_sponsorship();
|
740 |
$output .= ' </div>';
|
|
|
741 |
echo $output;
|
742 |
}
|
743 |
}
|
@@ -750,6 +769,8 @@ function ampforwp_new_dir( $dir ) {
|
|
750 |
function ampforwp_below_the_title_advert() {
|
751 |
global $redux_builder_amp;
|
752 |
$optimize = '';
|
|
|
|
|
753 |
$optimize = ampforwp_ad_optimize();
|
754 |
if ( isset($redux_builder_amp['enable-amp-ads-5']) && true == $redux_builder_amp['enable-amp-ads-5'] ) {
|
755 |
if($redux_builder_amp['enable-amp-ads-select-5'] == 1) {
|
@@ -783,6 +804,7 @@ function ampforwp_new_dir( $dir ) {
|
|
783 |
$output .= '</amp-ad>';
|
784 |
$output .= ampforwp_ads_sponsorship();
|
785 |
$output .= ' </div>';
|
|
|
786 |
echo $output;
|
787 |
}
|
788 |
}
|
@@ -796,6 +818,8 @@ function ampforwp_new_dir( $dir ) {
|
|
796 |
function ampforwp_above_related_post_advert() {
|
797 |
global $redux_builder_amp;
|
798 |
$optimize = '';
|
|
|
|
|
799 |
$optimize = ampforwp_ad_optimize();
|
800 |
if( isset($redux_builder_amp['enable-amp-ads-6']) && true == $redux_builder_amp['enable-amp-ads-6'] ) {
|
801 |
if($redux_builder_amp['enable-amp-ads-select-6'] == 1) {
|
@@ -829,6 +853,7 @@ function ampforwp_new_dir( $dir ) {
|
|
829 |
$output .= '</amp-ad>';
|
830 |
$output .= ampforwp_ads_sponsorship();
|
831 |
$output .= ' </div>';
|
|
|
832 |
echo $output;
|
833 |
}
|
834 |
}
|
@@ -1078,7 +1103,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1078 |
$content = preg_replace('/property=[^>]*/', '', $content);
|
1079 |
$content = preg_replace('/vocab=[^>]*/', '', $content);
|
1080 |
// $content = preg_replace('/type=[^>]*/', '', $content);
|
1081 |
-
$content = preg_replace('/value=[^>]*/', '', $content);
|
1082 |
// $content = preg_replace('/date=[^>]*/', '', $content);
|
1083 |
$content = preg_replace('/noshade=[^>]*/', '', $content);
|
1084 |
$content = preg_replace('/contenteditable=[^>]*/', '', $content);
|
@@ -1170,7 +1195,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1170 |
|
1171 |
|
1172 |
// 11.1 Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
|
1173 |
-
if ( ! is_customize_preview() ) {
|
1174 |
add_action( 'pre_amp_render_post','ampforwp_strip_invalid_content_footer');
|
1175 |
}
|
1176 |
function ampforwp_strip_invalid_content_footer() {
|
@@ -1792,6 +1817,8 @@ function ampforwp_remove_schema_data() {
|
|
1792 |
if ( class_exists('TpsContent') ) {
|
1793 |
remove_action('the_post', 'TpsContent::the_post', 999999);
|
1794 |
}
|
|
|
|
|
1795 |
}
|
1796 |
|
1797 |
// 22. Removing author links from comments Issue #180
|
@@ -2087,8 +2114,10 @@ function ampforwp_replace_title_tags() {
|
|
2087 |
}
|
2088 |
|
2089 |
else {
|
2090 |
-
$
|
2091 |
-
|
|
|
|
|
2092 |
}
|
2093 |
}
|
2094 |
// Blog page
|
@@ -2939,7 +2968,7 @@ function ampforwp_search_or_homepage_or_staticpage_metadata( $metadata, $post )
|
|
2939 |
$structured_data_height = intval($redux_builder_amp['amp-structured-data-placeholder-image-height']); // Placeholder Image width
|
2940 |
$structured_data_width = intval($redux_builder_amp['amp-structured-data-placeholder-image-width']); // Placeholder Image height
|
2941 |
$current_url_in_pieces = explode( '/', $current_url );
|
2942 |
-
if(
|
2943 |
// ID of slected front page
|
2944 |
$ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
2945 |
$headline = get_the_title( $ID ) . ' | ' . get_option('blogname');
|
@@ -3380,8 +3409,9 @@ function ampforwp_frontpage_comments() {
|
|
3380 |
$enable_comments = false;
|
3381 |
$post_id = "";
|
3382 |
|
3383 |
-
|
3384 |
-
|
|
|
3385 |
|
3386 |
if ($data['elements'] == '') {
|
3387 |
$data['elements'] = "meta_info:1,title:1,featured_image:1,content:1,meta_taxonomy:1,social_icons:1,comments:1,related_posts:1";
|
@@ -3400,8 +3430,10 @@ function ampforwp_frontpage_comments() {
|
|
3400 |
<div class="ampforwp-comment-wrapper">
|
3401 |
<?php
|
3402 |
$comment_button_url = "";
|
|
|
3403 |
// Gather comments for a Front from post id
|
3404 |
-
|
|
|
3405 |
$comments = get_comments(array(
|
3406 |
'post_id' => $postID,
|
3407 |
'status' => 'approve' //Change this to the type of comments to be displayed
|
@@ -3509,7 +3541,7 @@ add_action('pre_amp_render_post','ampforwp_apply_layout_builder_on_pages',20);
|
|
3509 |
function ampforwp_apply_layout_builder_on_pages($post_id) {
|
3510 |
global $redux_builder_amp;
|
3511 |
|
3512 |
-
if (
|
3513 |
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
3514 |
}
|
3515 |
$sidebar_check = get_post_meta( $post_id,'ampforwp_custom_sidebar_select',true);
|
@@ -3594,7 +3626,7 @@ function ampforwp_builder_checker() {
|
|
3594 |
if ( $post ) {
|
3595 |
$post_id = $post->ID;
|
3596 |
}
|
3597 |
-
if (
|
3598 |
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
3599 |
}
|
3600 |
if ( $post_id ) {
|
@@ -3772,7 +3804,7 @@ function ampforwp_post_pagination( $args = '' ) {
|
|
3772 |
global $page, $numpages, $multipage, $more, $redux_builder_amp;
|
3773 |
|
3774 |
$defaults = array(
|
3775 |
-
'before' => '<div class="ampforwp_post_pagination" ><p>' . __( 'Page
|
3776 |
'after' => '</p></div>',
|
3777 |
'link_before' => '',
|
3778 |
'link_after' => '',
|
@@ -3801,7 +3833,7 @@ function ampforwp_post_pagination( $args = '' ) {
|
|
3801 |
if ( 'number' == $r['next_or_number'] ) {
|
3802 |
$output .= $r['before'];
|
3803 |
for ( $i = 1; $i <= $numpages; $i++ ) {
|
3804 |
-
$link = $r['link_before'] . str_replace( '%',
|
3805 |
if ( $i != $page || ! $more && 1 == $page ) {
|
3806 |
$link = ampforwp_post_paginated_link_generator( $i ) . $link . '</a>';
|
3807 |
}
|
@@ -4113,7 +4145,7 @@ function ampforwp_generate_meta_desc(){
|
|
4113 |
$desc = addslashes( ampforwp_translation($redux_builder_amp['amp-translator-search-text'], 'You searched for:') . ' ' . get_search_query() );
|
4114 |
}
|
4115 |
|
4116 |
-
if (
|
4117 |
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
4118 |
$desc = addslashes( wp_trim_words( strip_tags( get_post_field('post_content', $post_id) ) , '15' ) );
|
4119 |
}
|
@@ -4310,11 +4342,19 @@ function ampforwp_dev_mode(){
|
|
4310 |
global $redux_builder_amp;
|
4311 |
if(isset($redux_builder_amp['ampforwp-development-mode']) && $redux_builder_amp['ampforwp-development-mode']){
|
4312 |
add_action( 'wp', 'ampforwp_dev_mode_remove_amphtml' );
|
|
|
4313 |
}
|
4314 |
}
|
|
|
4315 |
function ampforwp_dev_mode_remove_amphtml(){
|
4316 |
remove_action( 'wp_head', 'ampforwp_home_archive_rel_canonical' );
|
4317 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
4318 |
// Notice for Dev Mode
|
4319 |
add_action('admin_notices', 'ampforwp_dev_mode_notice');
|
4320 |
function ampforwp_dev_mode_notice(){
|
@@ -4354,12 +4394,8 @@ if (! function_exists( 'ampforwp_get_body_class' ) ) {
|
|
4354 |
$classes[] = 'single-post';
|
4355 |
}
|
4356 |
|
4357 |
-
if ( $redux_builder_amp['amp-frontpage-select-option']) {
|
4358 |
-
|
4359 |
-
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
4360 |
-
} elseif ( is_home() ){
|
4361 |
-
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
4362 |
-
}
|
4363 |
}
|
4364 |
|
4365 |
if ( ampforwp_is_front_page() ) {
|
@@ -4609,7 +4645,7 @@ function ampforwp_add_advance_ga_fields($ga_fields){
|
|
4609 |
$ampforwp_adv_ga_fields = $redux_builder_amp['ampforwp-ga-field-advance'];
|
4610 |
if($ampforwp_adv_ga_fields && $redux_builder_amp['ampforwp-ga-field-advance-switch']) {
|
4611 |
return $ampforwp_adv_ga_fields;
|
4612 |
-
}
|
4613 |
return $ga_fields;
|
4614 |
}
|
4615 |
|
@@ -4701,7 +4737,7 @@ function ampforwp_inline_related_posts(){
|
|
4701 |
|
4702 |
if ( ampforwp_has_post_thumbnail() ) {
|
4703 |
if( 4 == $redux_builder_amp['amp-design-selector'] ){
|
4704 |
-
$thumb_url_2 =
|
4705 |
$inline_related_posts .= '<amp-img src="'.esc_url( $thumb_url_2[0] ).'" width="' . $thumb_url_2[1] . '" height="' . $thumb_url_2[2] . '" layout="responsive"></amp-img>';
|
4706 |
}
|
4707 |
else{
|
@@ -4961,9 +4997,12 @@ if( !function_exists('ampforwp_get_post_thumbnail')){
|
|
4961 |
$thumb_width = '';
|
4962 |
$thumb_height = '';
|
4963 |
$output = '';
|
4964 |
-
if ( has_post_thumbnail()) {
|
|
|
|
|
|
|
4965 |
$thumb_id = get_post_thumbnail_id();
|
4966 |
-
$thumb_url_array = wp_get_attachment_image_src($thumb_id,
|
4967 |
$thumb_url = $thumb_url_array[0];
|
4968 |
$thumb_width = $thumb_url_array[1];
|
4969 |
$thumb_height = $thumb_url_array[2];
|
@@ -5215,7 +5254,7 @@ add_action( 'ampforwp_body_beginning' , 'ampforwp_onesignal_notifications' , 11
|
|
5215 |
if( ! function_exists( ' ampforwp_onesignal_notifications ' ) ){
|
5216 |
function ampforwp_onesignal_notifications(){
|
5217 |
global $redux_builder_amp;
|
5218 |
-
if(isset($redux_builder_amp['ampforwp-web-push-onesignal']) && $redux_builder_amp['ampforwp-web-push-onesignal'] ){
|
5219 |
$onesignal_domain = '';
|
5220 |
$onesignal_domain_sw = '';
|
5221 |
$onesignal_subdomain = '';
|
@@ -5258,11 +5297,11 @@ add_action('pre_amp_render_post', 'ampforwp_onesignal_notifications_widget_posit
|
|
5258 |
if( ! function_exists( 'ampforwp_onesignal_notifications_widget_position' ) ){
|
5259 |
function ampforwp_onesignal_notifications_widget_position(){
|
5260 |
global $redux_builder_amp;
|
5261 |
-
if( isset( $redux_builder_amp['ampforwp-web-push-onesignal-below-content'] ) && true == $redux_builder_amp['ampforwp-web-push-onesignal-below-content'] ){
|
5262 |
add_action('ampforwp_after_post_content', 'ampforwp_onesignal_notifications_widget');
|
5263 |
}
|
5264 |
|
5265 |
-
if( isset( $redux_builder_amp['ampforwp-web-push-onesignal-above-content'] ) && true == $redux_builder_amp['ampforwp-web-push-onesignal-above-content'] ){
|
5266 |
add_action('ampforwp_inside_post_content_before', 'ampforwp_onesignal_notifications_widget');
|
5267 |
add_action('ampforwp_before_post_content', 'ampforwp_onesignal_notifications_widget');
|
5268 |
}
|
@@ -5271,7 +5310,7 @@ if( ! function_exists( 'ampforwp_onesignal_notifications_widget_position' ) ){
|
|
5271 |
if( ! function_exists(' ampforwp_onesignal_notifications_widget') ){
|
5272 |
function ampforwp_onesignal_notifications_widget(){
|
5273 |
global $redux_builder_amp;
|
5274 |
-
if(isset($redux_builder_amp['ampforwp-web-push-onesignal']) && $redux_builder_amp['ampforwp-web-push-onesignal'] ){ ?>
|
5275 |
<!-- A subscription widget -->
|
5276 |
<div class="amp-web-push-container">
|
5277 |
<amp-web-push-widget visibility="unsubscribed" layout="fixed" width="245" height="45">
|
@@ -5301,7 +5340,7 @@ add_filter('amp_post_template_data', 'ampforwp_onesignal_notifications_script');
|
|
5301 |
if(!function_exists('ampforwp_onesignal_notifications_script')){
|
5302 |
function ampforwp_onesignal_notifications_script( $data ){
|
5303 |
global $redux_builder_amp;
|
5304 |
-
if(isset($redux_builder_amp['ampforwp-web-push-onesignal']) && $redux_builder_amp['ampforwp-web-push-onesignal'] ){
|
5305 |
if ( empty( $data['amp_component_scripts']['amp-web-push'] ) ) {
|
5306 |
$data['amp_component_scripts']['amp-web-push'] = 'https://cdn.ampproject.org/v0/amp-web-push-0.1.js';
|
5307 |
}
|
@@ -5314,7 +5353,7 @@ add_action('amp_post_template_css' , 'ampforwp_onesignal_notifications_styling'
|
|
5314 |
if(!function_exists('ampforwp_onesignal_notifications_styling')){
|
5315 |
function ampforwp_onesignal_notifications_styling(){
|
5316 |
global $redux_builder_amp;
|
5317 |
-
if(isset($redux_builder_amp['ampforwp-web-push-onesignal']) && $redux_builder_amp['ampforwp-web-push-onesignal'] ){ ?>
|
5318 |
amp-web-push-widget button.subscribe { display: inline-flex; align-items: center; border-radius: 2px; border: 0; box-sizing: border-box; margin: 0; padding: 10px 15px; cursor: pointer; outline: none; font-size: 15px; font-weight: 400; background: #4A90E2; color: white; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.5); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}
|
5319 |
amp-web-push-widget button.subscribe .subscribe-icon {margin-right: 10px;}
|
5320 |
amp-web-push-widget button.subscribe:active {transform: scale(0.99);}
|
@@ -5350,7 +5389,9 @@ function ampforwp_is_front_page(){
|
|
5350 |
$get_custom_frontpage_settings = $redux_builder_amp['amp-frontpage-select-option'];
|
5351 |
|
5352 |
// Frontpage id should be assigned
|
5353 |
-
$
|
|
|
|
|
5354 |
|
5355 |
// TRUE: When we have "Your latest posts" in reading settings and custom frontpage in amp
|
5356 |
if ( 'posts' == get_option( 'show_on_front') && is_home() && $get_amp_homepage_settings && $get_custom_frontpage_settings)
|
@@ -5389,6 +5430,21 @@ function ampforwp_is_blog(){
|
|
5389 |
|
5390 |
return $get_blog_details ;
|
5391 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5392 |
// 97. Change the format of the post date on Loops #1384
|
5393 |
add_filter('ampforwp_modify_post_date', 'ampforwp_full_post_date_loops');
|
5394 |
if( ! function_exists( 'ampforwp_full_post_date_loops' ) ){
|
@@ -5965,7 +6021,71 @@ function ampforwp_comment_count( $count ) {
|
|
5965 |
// Glue underline css compatibility #1743
|
5966 |
add_action('amp_post_template_css', 'ampforwp_glue_css_comp', PHP_INT_MAX );
|
5967 |
if ( ! function_exists('ampforwp_glue_css_comp') ) {
|
5968 |
-
function ampforwp_glue_css_comp() {
|
|
|
5969 |
a {text-decoration:none;}
|
5970 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5971 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
}
|
146 |
// TODO: Update this function
|
147 |
function ampforwp_include_customizer_files(){
|
148 |
+
global $redux_builder_amp;
|
149 |
$amp_plugin_data;
|
150 |
$amp_plugin_activation_check;
|
151 |
|
152 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
153 |
$amp_plugin_activation_check = is_plugin_active( 'amp/amp.php' );
|
154 |
+
if ( 4 != $redux_builder_amp['amp-design-selector'] ) {
|
155 |
+
if ( $amp_plugin_activation_check ) {
|
156 |
+
$amp_plugin_data = get_plugin_data( AMPFORWP_MAIN_PLUGIN_DIR. 'amp/amp.php' );
|
157 |
+
if ( $amp_plugin_data['Version'] > '0.4.2' ) {
|
158 |
+
return require AMPFORWP_PLUGIN_DIR .'templates/customizer/customizer-new.php' ;
|
159 |
+
} else {
|
160 |
+
return require AMPFORWP_PLUGIN_DIR .'templates/customizer/customizer.php' ;
|
161 |
+
}
|
162 |
+
} else {
|
163 |
+
return require AMPFORWP_PLUGIN_DIR .'templates/customizer/customizer.php' ;
|
164 |
+
}
|
165 |
}
|
166 |
}
|
167 |
ampforwp_include_customizer_files();
|
376 |
// Add Homepage AMP file code
|
377 |
add_filter( 'amp_post_template_file', 'ampforwp_custom_template', 10, 3 );
|
378 |
function ampforwp_custom_template( $file, $type, $post ) {
|
|
|
|
|
379 |
global $redux_builder_amp;
|
380 |
+
// Custom Homepage and Archive file
|
381 |
$slug = array();
|
382 |
$current_url_in_pieces = array();
|
383 |
$ampforwp_custom_post_page = ampforwp_custom_post_page();
|
388 |
|
389 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/index.php';
|
390 |
|
391 |
+
if ( ampforwp_is_front_page() ) {
|
392 |
|
393 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
394 |
}
|
419 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/single.php';
|
420 |
}
|
421 |
}*/
|
422 |
+
// Polylang compatibility
|
423 |
+
// For Frontpage
|
424 |
+
if ( 'single' === $type && ampforwp_polylang_front_page() && true == $redux_builder_amp['amp-frontpage-select-option'] ) {
|
425 |
+
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
426 |
+
}
|
427 |
+
|
428 |
return $file;
|
429 |
}
|
430 |
|
581 |
function ampforwp_header_advert() {
|
582 |
global $redux_builder_amp;
|
583 |
$optimize = '';
|
584 |
+
$client_id = $redux_builder_amp['enable-amp-ads-text-feild-client-1'];
|
585 |
+
$data_slot = $redux_builder_amp['enable-amp-ads-text-feild-slot-1'];
|
586 |
$optimize = ampforwp_ad_optimize();
|
587 |
if ( isset($redux_builder_amp['enable-amp-ads-1']) && true == $redux_builder_amp['enable-amp-ads-1'] ) {
|
588 |
if ( 1 == $redux_builder_amp['enable-amp-ads-select-1'] ) {
|
616 |
$output .= '</amp-ad>';
|
617 |
$output .= ampforwp_ads_sponsorship();
|
618 |
$output .= ' </div>';
|
619 |
+
$output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
|
620 |
echo $output;
|
621 |
}
|
622 |
}
|
627 |
function ampforwp_footer_advert() {
|
628 |
global $redux_builder_amp;
|
629 |
$optimize = '';
|
630 |
+
$client_id = $redux_builder_amp['enable-amp-ads-text-feild-client-2'];
|
631 |
+
$data_slot = $redux_builder_amp['enable-amp-ads-text-feild-slot-2'];
|
632 |
$optimize = ampforwp_ad_optimize();
|
633 |
if ( isset($redux_builder_amp['enable-amp-ads-2']) && true == $redux_builder_amp['enable-amp-ads-2'] ) {
|
634 |
if($redux_builder_amp['enable-amp-ads-select-2'] == 1) {
|
662 |
$output .= '</amp-ad>';
|
663 |
$output .= ampforwp_ads_sponsorship();
|
664 |
$output .= ' </div>';
|
665 |
+
$output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
|
666 |
echo $output;
|
667 |
}
|
668 |
}
|
674 |
function ampforwp_before_post_content_advert() {
|
675 |
global $redux_builder_amp;
|
676 |
$optimize = '';
|
677 |
+
$client_id = $redux_builder_amp['enable-amp-ads-text-feild-client-3'];
|
678 |
+
$data_slot = $redux_builder_amp['enable-amp-ads-text-feild-slot-3'];
|
679 |
$optimize = ampforwp_ad_optimize();
|
680 |
if ( isset($redux_builder_amp['enable-amp-ads-3']) && true == $redux_builder_amp['enable-amp-ads-3'] ) {
|
681 |
if($redux_builder_amp['enable-amp-ads-select-3'] == 1) {
|
709 |
$output .= '</amp-ad>';
|
710 |
$output .= ampforwp_ads_sponsorship();
|
711 |
$output .= ' </div>';
|
712 |
+
$output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
|
713 |
echo $output;
|
714 |
}
|
715 |
}
|
721 |
function ampforwp_after_post_content_advert() {
|
722 |
global $redux_builder_amp;
|
723 |
$optimize = '';
|
724 |
+
$client_id = $redux_builder_amp['enable-amp-ads-text-feild-client-4'];
|
725 |
+
$data_slot = $redux_builder_amp['enable-amp-ads-text-feild-slot-4'];
|
726 |
$optimize = ampforwp_ad_optimize();
|
727 |
if ( isset($redux_builder_amp['enable-amp-ads-4']) && true == $redux_builder_amp['enable-amp-ads-4'] ) {
|
728 |
if($redux_builder_amp['enable-amp-ads-select-4'] == 1) {
|
756 |
$output .= '</amp-ad>';
|
757 |
$output .= ampforwp_ads_sponsorship();
|
758 |
$output .= ' </div>';
|
759 |
+
$output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
|
760 |
echo $output;
|
761 |
}
|
762 |
}
|
769 |
function ampforwp_below_the_title_advert() {
|
770 |
global $redux_builder_amp;
|
771 |
$optimize = '';
|
772 |
+
$client_id = $redux_builder_amp['enable-amp-ads-text-feild-client-5'];
|
773 |
+
$data_slot = $redux_builder_amp['enable-amp-ads-text-feild-slot-5'];
|
774 |
$optimize = ampforwp_ad_optimize();
|
775 |
if ( isset($redux_builder_amp['enable-amp-ads-5']) && true == $redux_builder_amp['enable-amp-ads-5'] ) {
|
776 |
if($redux_builder_amp['enable-amp-ads-select-5'] == 1) {
|
804 |
$output .= '</amp-ad>';
|
805 |
$output .= ampforwp_ads_sponsorship();
|
806 |
$output .= ' </div>';
|
807 |
+
$output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
|
808 |
echo $output;
|
809 |
}
|
810 |
}
|
818 |
function ampforwp_above_related_post_advert() {
|
819 |
global $redux_builder_amp;
|
820 |
$optimize = '';
|
821 |
+
$client_id = $redux_builder_amp['enable-amp-ads-text-feild-client-6'];
|
822 |
+
$data_slot = $redux_builder_amp['enable-amp-ads-text-feild-slot-6'];
|
823 |
$optimize = ampforwp_ad_optimize();
|
824 |
if( isset($redux_builder_amp['enable-amp-ads-6']) && true == $redux_builder_amp['enable-amp-ads-6'] ) {
|
825 |
if($redux_builder_amp['enable-amp-ads-select-6'] == 1) {
|
853 |
$output .= '</amp-ad>';
|
854 |
$output .= ampforwp_ads_sponsorship();
|
855 |
$output .= ' </div>';
|
856 |
+
$output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
|
857 |
echo $output;
|
858 |
}
|
859 |
}
|
1103 |
$content = preg_replace('/property=[^>]*/', '', $content);
|
1104 |
$content = preg_replace('/vocab=[^>]*/', '', $content);
|
1105 |
// $content = preg_replace('/type=[^>]*/', '', $content);
|
1106 |
+
$content = preg_replace('/(<[^>]+) value=[^>]*/', '$1', $content);
|
1107 |
// $content = preg_replace('/date=[^>]*/', '', $content);
|
1108 |
$content = preg_replace('/noshade=[^>]*/', '', $content);
|
1109 |
$content = preg_replace('/contenteditable=[^>]*/', '', $content);
|
1195 |
|
1196 |
|
1197 |
// 11.1 Strip unwanted codes and tags from wp_footer for better compatibility with Plugins
|
1198 |
+
if ( ! is_customize_preview() && ! ampforwp_is_non_amp("non_amp_check_convert") ) {
|
1199 |
add_action( 'pre_amp_render_post','ampforwp_strip_invalid_content_footer');
|
1200 |
}
|
1201 |
function ampforwp_strip_invalid_content_footer() {
|
1817 |
if ( class_exists('TpsContent') ) {
|
1818 |
remove_action('the_post', 'TpsContent::the_post', 999999);
|
1819 |
}
|
1820 |
+
// Jarida Theme Compatibility #1842
|
1821 |
+
remove_filter( 'option_posts_per_page', 'tie_option_posts_per_page' );
|
1822 |
}
|
1823 |
|
1824 |
// 22. Removing author links from comments Issue #180
|
2114 |
}
|
2115 |
|
2116 |
else {
|
2117 |
+
if(isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
2118 |
+
$ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
2119 |
+
$site_title = get_the_title( $ID ) . $sep . get_option( 'blogname' );
|
2120 |
+
}
|
2121 |
}
|
2122 |
}
|
2123 |
// Blog page
|
2968 |
$structured_data_height = intval($redux_builder_amp['amp-structured-data-placeholder-image-height']); // Placeholder Image width
|
2969 |
$structured_data_width = intval($redux_builder_amp['amp-structured-data-placeholder-image-width']); // Placeholder Image height
|
2970 |
$current_url_in_pieces = explode( '/', $current_url );
|
2971 |
+
if( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
2972 |
// ID of slected front page
|
2973 |
$ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
2974 |
$headline = get_the_title( $ID ) . ' | ' . get_option('blogname');
|
3409 |
$enable_comments = false;
|
3410 |
$post_id = "";
|
3411 |
|
3412 |
+
if (isset($redux_builder_amp['amp-frontpage-select-option-pages']) ){
|
3413 |
+
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
3414 |
+
}
|
3415 |
|
3416 |
if ($data['elements'] == '') {
|
3417 |
$data['elements'] = "meta_info:1,title:1,featured_image:1,content:1,meta_taxonomy:1,social_icons:1,comments:1,related_posts:1";
|
3430 |
<div class="ampforwp-comment-wrapper">
|
3431 |
<?php
|
3432 |
$comment_button_url = "";
|
3433 |
+
$postID = '';
|
3434 |
// Gather comments for a Front from post id
|
3435 |
+
if ( isset($redux_builder_amp['amp-frontpage-select-option-pages']) )
|
3436 |
+
$postID = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
3437 |
$comments = get_comments(array(
|
3438 |
'post_id' => $postID,
|
3439 |
'status' => 'approve' //Change this to the type of comments to be displayed
|
3541 |
function ampforwp_apply_layout_builder_on_pages($post_id) {
|
3542 |
global $redux_builder_amp;
|
3543 |
|
3544 |
+
if ( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
3545 |
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
3546 |
}
|
3547 |
$sidebar_check = get_post_meta( $post_id,'ampforwp_custom_sidebar_select',true);
|
3626 |
if ( $post ) {
|
3627 |
$post_id = $post->ID;
|
3628 |
}
|
3629 |
+
if ( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
3630 |
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
3631 |
}
|
3632 |
if ( $post_id ) {
|
3804 |
global $page, $numpages, $multipage, $more, $redux_builder_amp;
|
3805 |
|
3806 |
$defaults = array(
|
3807 |
+
'before' => '<div class="ampforwp_post_pagination" ><p>' . __( '<span>Page:</span>' ),
|
3808 |
'after' => '</p></div>',
|
3809 |
'link_before' => '',
|
3810 |
'link_after' => '',
|
3833 |
if ( 'number' == $r['next_or_number'] ) {
|
3834 |
$output .= $r['before'];
|
3835 |
for ( $i = 1; $i <= $numpages; $i++ ) {
|
3836 |
+
$link = $r['link_before'] . str_replace( '%', '<span>'.$i.'</span>', $r['pagelink'] ) . $r['link_after'];
|
3837 |
if ( $i != $page || ! $more && 1 == $page ) {
|
3838 |
$link = ampforwp_post_paginated_link_generator( $i ) . $link . '</a>';
|
3839 |
}
|
4145 |
$desc = addslashes( ampforwp_translation($redux_builder_amp['amp-translator-search-text'], 'You searched for:') . ' ' . get_search_query() );
|
4146 |
}
|
4147 |
|
4148 |
+
if ( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
4149 |
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
4150 |
$desc = addslashes( wp_trim_words( strip_tags( get_post_field('post_content', $post_id) ) , '15' ) );
|
4151 |
}
|
4342 |
global $redux_builder_amp;
|
4343 |
if(isset($redux_builder_amp['ampforwp-development-mode']) && $redux_builder_amp['ampforwp-development-mode']){
|
4344 |
add_action( 'wp', 'ampforwp_dev_mode_remove_amphtml' );
|
4345 |
+
add_action( 'amp_post_template_head', 'ampforwp_dev_mode_add_noindex' );
|
4346 |
}
|
4347 |
}
|
4348 |
+
// Remove amphtml from non-AMP
|
4349 |
function ampforwp_dev_mode_remove_amphtml(){
|
4350 |
remove_action( 'wp_head', 'ampforwp_home_archive_rel_canonical' );
|
4351 |
}
|
4352 |
+
// Add noindex,nofollow in the AMP
|
4353 |
+
if ( ! function_exists('ampforwp_dev_mode_add_noindex') ) {
|
4354 |
+
function ampforwp_dev_mode_add_noindex() {
|
4355 |
+
echo '<meta name="robots" content="noindex,nofollow"/>';
|
4356 |
+
}
|
4357 |
+
}
|
4358 |
// Notice for Dev Mode
|
4359 |
add_action('admin_notices', 'ampforwp_dev_mode_notice');
|
4360 |
function ampforwp_dev_mode_notice(){
|
4394 |
$classes[] = 'single-post';
|
4395 |
}
|
4396 |
|
4397 |
+
if ( ampforwp_is_front_page() && isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
4398 |
+
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
|
|
|
|
|
|
|
|
4399 |
}
|
4400 |
|
4401 |
if ( ampforwp_is_front_page() ) {
|
4645 |
$ampforwp_adv_ga_fields = $redux_builder_amp['ampforwp-ga-field-advance'];
|
4646 |
if($ampforwp_adv_ga_fields && $redux_builder_amp['ampforwp-ga-field-advance-switch']) {
|
4647 |
return $ampforwp_adv_ga_fields;
|
4648 |
+
}
|
4649 |
return $ga_fields;
|
4650 |
}
|
4651 |
|
4737 |
|
4738 |
if ( ampforwp_has_post_thumbnail() ) {
|
4739 |
if( 4 == $redux_builder_amp['amp-design-selector'] ){
|
4740 |
+
$thumb_url_2 = ampforwp_aq_resize( $thumb_url_2, 220 , 134 , true, false );
|
4741 |
$inline_related_posts .= '<amp-img src="'.esc_url( $thumb_url_2[0] ).'" width="' . $thumb_url_2[1] . '" height="' . $thumb_url_2[2] . '" layout="responsive"></amp-img>';
|
4742 |
}
|
4743 |
else{
|
4997 |
$thumb_width = '';
|
4998 |
$thumb_height = '';
|
4999 |
$output = '';
|
5000 |
+
if ( has_post_thumbnail()) {
|
5001 |
+
if( empty($size) ) {
|
5002 |
+
$size = 'medium';
|
5003 |
+
}
|
5004 |
$thumb_id = get_post_thumbnail_id();
|
5005 |
+
$thumb_url_array = wp_get_attachment_image_src($thumb_id, $size , true);
|
5006 |
$thumb_url = $thumb_url_array[0];
|
5007 |
$thumb_width = $thumb_url_array[1];
|
5008 |
$thumb_height = $thumb_url_array[2];
|
5254 |
if( ! function_exists( ' ampforwp_onesignal_notifications ' ) ){
|
5255 |
function ampforwp_onesignal_notifications(){
|
5256 |
global $redux_builder_amp;
|
5257 |
+
if(isset($redux_builder_amp['ampforwp-web-push-onesignal']) && $redux_builder_amp['ampforwp-web-push-onesignal'] && !checkAMPforPageBuilderStatus(get_the_ID()) ){
|
5258 |
$onesignal_domain = '';
|
5259 |
$onesignal_domain_sw = '';
|
5260 |
$onesignal_subdomain = '';
|
5297 |
if( ! function_exists( 'ampforwp_onesignal_notifications_widget_position' ) ){
|
5298 |
function ampforwp_onesignal_notifications_widget_position(){
|
5299 |
global $redux_builder_amp;
|
5300 |
+
if( isset( $redux_builder_amp['ampforwp-web-push-onesignal-below-content'] ) && true == $redux_builder_amp['ampforwp-web-push-onesignal-below-content'] && !checkAMPforPageBuilderStatus(get_the_ID()) ){
|
5301 |
add_action('ampforwp_after_post_content', 'ampforwp_onesignal_notifications_widget');
|
5302 |
}
|
5303 |
|
5304 |
+
if( isset( $redux_builder_amp['ampforwp-web-push-onesignal-above-content'] ) && true == $redux_builder_amp['ampforwp-web-push-onesignal-above-content'] && !checkAMPforPageBuilderStatus(get_the_ID()) ){
|
5305 |
add_action('ampforwp_inside_post_content_before', 'ampforwp_onesignal_notifications_widget');
|
5306 |
add_action('ampforwp_before_post_content', 'ampforwp_onesignal_notifications_widget');
|
5307 |
}
|
5310 |
if( ! function_exists(' ampforwp_onesignal_notifications_widget') ){
|
5311 |
function ampforwp_onesignal_notifications_widget(){
|
5312 |
global $redux_builder_amp;
|
5313 |
+
if(isset($redux_builder_amp['ampforwp-web-push-onesignal']) && $redux_builder_amp['ampforwp-web-push-onesignal'] && !checkAMPforPageBuilderStatus(get_the_ID()) ){ ?>
|
5314 |
<!-- A subscription widget -->
|
5315 |
<div class="amp-web-push-container">
|
5316 |
<amp-web-push-widget visibility="unsubscribed" layout="fixed" width="245" height="45">
|
5340 |
if(!function_exists('ampforwp_onesignal_notifications_script')){
|
5341 |
function ampforwp_onesignal_notifications_script( $data ){
|
5342 |
global $redux_builder_amp;
|
5343 |
+
if(isset($redux_builder_amp['ampforwp-web-push-onesignal']) && $redux_builder_amp['ampforwp-web-push-onesignal'] && !checkAMPforPageBuilderStatus(get_the_ID()) ){
|
5344 |
if ( empty( $data['amp_component_scripts']['amp-web-push'] ) ) {
|
5345 |
$data['amp_component_scripts']['amp-web-push'] = 'https://cdn.ampproject.org/v0/amp-web-push-0.1.js';
|
5346 |
}
|
5353 |
if(!function_exists('ampforwp_onesignal_notifications_styling')){
|
5354 |
function ampforwp_onesignal_notifications_styling(){
|
5355 |
global $redux_builder_amp;
|
5356 |
+
if(isset($redux_builder_amp['ampforwp-web-push-onesignal']) && $redux_builder_amp['ampforwp-web-push-onesignal'] && !checkAMPforPageBuilderStatus(get_the_ID()) ){ ?>
|
5357 |
amp-web-push-widget button.subscribe { display: inline-flex; align-items: center; border-radius: 2px; border: 0; box-sizing: border-box; margin: 0; padding: 10px 15px; cursor: pointer; outline: none; font-size: 15px; font-weight: 400; background: #4A90E2; color: white; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.5); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}
|
5358 |
amp-web-push-widget button.subscribe .subscribe-icon {margin-right: 10px;}
|
5359 |
amp-web-push-widget button.subscribe:active {transform: scale(0.99);}
|
5389 |
$get_custom_frontpage_settings = $redux_builder_amp['amp-frontpage-select-option'];
|
5390 |
|
5391 |
// Frontpage id should be assigned
|
5392 |
+
if ( isset($redux_builder_amp['amp-frontpage-select-option-pages']) ) {
|
5393 |
+
$get_amp_custom_frontpage_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
5394 |
+
}
|
5395 |
|
5396 |
// TRUE: When we have "Your latest posts" in reading settings and custom frontpage in amp
|
5397 |
if ( 'posts' == get_option( 'show_on_front') && is_home() && $get_amp_homepage_settings && $get_custom_frontpage_settings)
|
5430 |
|
5431 |
return $get_blog_details ;
|
5432 |
}
|
5433 |
+
// Polylang frontpage
|
5434 |
+
function ampforwp_polylang_front_page() {
|
5435 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
5436 |
+
if( is_plugin_active( 'polylang/polylang.php' )){
|
5437 |
+
global $polylang;
|
5438 |
+
$page_id = $polylang->curlang->page_on_front;
|
5439 |
+
$frontpage_id = get_option('page_on_front');
|
5440 |
+
// is_front_page is not working here so had to do this way
|
5441 |
+
// Check current page id with translated page id
|
5442 |
+
if ( $page_id == pll_get_post($frontpage_id) && ! is_page() && ! is_single() && ! is_archive() && ! is_search() && ! ampforwp_is_blog() ){
|
5443 |
+
return true;
|
5444 |
+
}
|
5445 |
+
}
|
5446 |
+
return false;
|
5447 |
+
}
|
5448 |
// 97. Change the format of the post date on Loops #1384
|
5449 |
add_filter('ampforwp_modify_post_date', 'ampforwp_full_post_date_loops');
|
5450 |
if( ! function_exists( 'ampforwp_full_post_date_loops' ) ){
|
6021 |
// Glue underline css compatibility #1743
|
6022 |
add_action('amp_post_template_css', 'ampforwp_glue_css_comp', PHP_INT_MAX );
|
6023 |
if ( ! function_exists('ampforwp_glue_css_comp') ) {
|
6024 |
+
function ampforwp_glue_css_comp() {
|
6025 |
+
global $redux_builder_amp; ?>
|
6026 |
a {text-decoration:none;}
|
6027 |
+
<?php if ( isset($redux_builder_amp['ampforwp-underline-content-links']) && $redux_builder_amp['ampforwp-underline-content-links'] ) { ?>
|
6028 |
+
.cntn-wrp a, .the_content a {text-decoration:underline;}
|
6029 |
+
<?php }
|
6030 |
+
}
|
6031 |
+
}
|
6032 |
+
|
6033 |
+
// Filter for Frontpage id
|
6034 |
+
add_filter('ampforwp_frontpage_id', 'ampforwp_modified_frontpage_id');
|
6035 |
+
if( ! function_exists('ampforwp_modified_frontpage_id') ) {
|
6036 |
+
function ampforwp_modified_frontpage_id($page_id){
|
6037 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
6038 |
+
// WPML Compatibility #1111
|
6039 |
+
if( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' )){
|
6040 |
+
$page_id = get_option('page_on_front');
|
6041 |
+
}
|
6042 |
+
// Polylang Compatibility #1779
|
6043 |
+
elseif( ampforwp_polylang_front_page() ){
|
6044 |
+
$frontpage_id = get_option('page_on_front');
|
6045 |
+
if($frontpage_id){
|
6046 |
+
$page_id = pll_get_post($frontpage_id);
|
6047 |
+
}
|
6048 |
+
}
|
6049 |
+
return $page_id;
|
6050 |
+
}
|
6051 |
}
|
6052 |
+
|
6053 |
+
// AMP to WP Theme Ads
|
6054 |
+
add_filter('ampforwp_modify_ads', 'ampforwp_nonamp_ads',10, 5);
|
6055 |
+
if ( ! function_exists('ampforwp_nonamp_ads') ) {
|
6056 |
+
function ampforwp_nonamp_ads($output, $width, $height, $client_id, $data_slot) {
|
6057 |
+
if ( ampforwp_is_non_amp('non_amp_check_convert') ) {
|
6058 |
+
|
6059 |
+
$output = ' <div class="add-wrapper" style="text-align:center;">
|
6060 |
+
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
|
6061 |
+
</script>
|
6062 |
+
<ins class="adsbygoogle" style="display:inline-block;width:'.$width.';height:'.$height.'" data-ad-client="'.$client_id.'" data-ad-slot="'.$data_slot.'">
|
6063 |
+
</ins>
|
6064 |
+
<script>
|
6065 |
+
(adsbygoogle = window.adsbygoogle || []).push({});
|
6066 |
+
</script>
|
6067 |
+
</div>';
|
6068 |
+
}
|
6069 |
+
return $output;
|
6070 |
+
}
|
6071 |
+
}
|
6072 |
+
//AMP to WP Theme Analytics
|
6073 |
+
add_action('wp_footer','ampforwp_nonamp_analytics');
|
6074 |
+
if ( ! function_exists('ampforwp_nonamp_analytics') ) {
|
6075 |
+
function ampforwp_nonamp_analytics() {
|
6076 |
+
global $redux_builder_amp;
|
6077 |
+
$ga_account = $redux_builder_amp['ga-feild'];
|
6078 |
+
if ( ampforwp_is_non_amp("non_amp_check_convert") ) {
|
6079 |
+
echo "
|
6080 |
+
<script>
|
6081 |
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
6082 |
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
6083 |
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
6084 |
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
6085 |
+
|
6086 |
+
ga('create', '$ga_account', 'auto');
|
6087 |
+
ga('send', 'pageview');
|
6088 |
+
</script>";
|
6089 |
+
}
|
6090 |
+
}
|
6091 |
+
}
|