Version Description
- Fixed issue with WP auto updates overriding the default repeater. Please deactivate and then activate your plugin.
Download this release
Release Info
Developer | dcooney |
Plugin | WordPress Infinite Scroll – Ajax Load More |
Version | 2.0.3 |
Comparing to | |
See all releases |
Version 2.0.3
- LICENSE.txt +339 -0
- README.txt +150 -0
- admin/admin.php +713 -0
- admin/css/admin.css +1098 -0
- admin/editor-build.php +51 -0
- admin/editor.php +48 -0
- admin/img/add-ons/repeater-add-ons.jpg +0 -0
- admin/img/add-ons/shortcode-editor.jpg +0 -0
- admin/img/add.png +0 -0
- admin/img/alm-logo-16x16.png +0 -0
- admin/img/alm-logo-32x32.png +0 -0
- admin/img/alm-logo-48x48.png +0 -0
- admin/img/bkg-select.png +0 -0
- admin/img/loader.gif +0 -0
- admin/includes/cta/about.php +14 -0
- admin/includes/cta/config.php +15 -0
- admin/includes/cta/extend.php +1 -0
- admin/includes/cta/resources.php +9 -0
- admin/includes/cta/writeable.php +13 -0
- admin/includes/shortcode-builder.php +306 -0
- admin/includes/test-writable.txt +1 -0
- admin/index.php +3 -0
- admin/js/editor-btn.js +34 -0
- admin/js/libs/select2.min.js +5 -0
- admin/js/shortcode-builder.js +299 -0
- ajax-load-more.php +313 -0
- core/css/ajax-load-more.css +196 -0
- core/img/ajax-loader.gif +0 -0
- core/js/ajax-load-more.js +209 -0
- core/repeater/default.php +1 -0
- index.php +1 -0
- lang/ajax-load-more.pot +539 -0
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
LICENSE.txt
ADDED
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 2, June 1991
|
3 |
+
|
4 |
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
7 |
+
of this license document, but changing it is not allowed.
|
8 |
+
|
9 |
+
Preamble
|
10 |
+
|
11 |
+
The licenses for most software are designed to take away your
|
12 |
+
freedom to share and change it. By contrast, the GNU General Public
|
13 |
+
License is intended to guarantee your freedom to share and change free
|
14 |
+
software--to make sure the software is free for all its users. This
|
15 |
+
General Public License applies to most of the Free Software
|
16 |
+
Foundation's software and to any other program whose authors commit to
|
17 |
+
using it. (Some other Free Software Foundation software is covered by
|
18 |
+
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
+
your programs, too.
|
20 |
+
|
21 |
+
When we speak of free software, we are referring to freedom, not
|
22 |
+
price. Our General Public Licenses are designed to make sure that you
|
23 |
+
have the freedom to distribute copies of free software (and charge for
|
24 |
+
this service if you wish), that you receive source code or can get it
|
25 |
+
if you want it, that you can change the software or use pieces of it
|
26 |
+
in new free programs; and that you know you can do these things.
|
27 |
+
|
28 |
+
To protect your rights, we need to make restrictions that forbid
|
29 |
+
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
+
These restrictions translate to certain responsibilities for you if you
|
31 |
+
distribute copies of the software, or if you modify it.
|
32 |
+
|
33 |
+
For example, if you distribute copies of such a program, whether
|
34 |
+
gratis or for a fee, you must give the recipients all the rights that
|
35 |
+
you have. You must make sure that they, too, receive or can get the
|
36 |
+
source code. And you must show them these terms so they know their
|
37 |
+
rights.
|
38 |
+
|
39 |
+
We protect your rights with two steps: (1) copyright the software, and
|
40 |
+
(2) offer you this license which gives you legal permission to copy,
|
41 |
+
distribute and/or modify the software.
|
42 |
+
|
43 |
+
Also, for each author's protection and ours, we want to make certain
|
44 |
+
that everyone understands that there is no warranty for this free
|
45 |
+
software. If the software is modified by someone else and passed on, we
|
46 |
+
want its recipients to know that what they have is not the original, so
|
47 |
+
that any problems introduced by others will not reflect on the original
|
48 |
+
authors' reputations.
|
49 |
+
|
50 |
+
Finally, any free program is threatened constantly by software
|
51 |
+
patents. We wish to avoid the danger that redistributors of a free
|
52 |
+
program will individually obtain patent licenses, in effect making the
|
53 |
+
program proprietary. To prevent this, we have made it clear that any
|
54 |
+
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and
|
57 |
+
modification follow.
|
58 |
+
|
59 |
+
GNU GENERAL PUBLIC LICENSE
|
60 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
+
|
62 |
+
0. This License applies to any program or other work which contains
|
63 |
+
a notice placed by the copyright holder saying it may be distributed
|
64 |
+
under the terms of this General Public License. The "Program", below,
|
65 |
+
refers to any such program or work, and a "work based on the Program"
|
66 |
+
means either the Program or any derivative work under copyright law:
|
67 |
+
that is to say, a work containing the Program or a portion of it,
|
68 |
+
either verbatim or with modifications and/or translated into another
|
69 |
+
language. (Hereinafter, translation is included without limitation in
|
70 |
+
the term "modification".) Each licensee is addressed as "you".
|
71 |
+
|
72 |
+
Activities other than copying, distribution and modification are not
|
73 |
+
covered by this License; they are outside its scope. The act of
|
74 |
+
running the Program is not restricted, and the output from the Program
|
75 |
+
is covered only if its contents constitute a work based on the
|
76 |
+
Program (independent of having been made by running the Program).
|
77 |
+
Whether that is true depends on what the Program does.
|
78 |
+
|
79 |
+
1. You may copy and distribute verbatim copies of the Program's
|
80 |
+
source code as you receive it, in any medium, provided that you
|
81 |
+
conspicuously and appropriately publish on each copy an appropriate
|
82 |
+
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
+
notices that refer to this License and to the absence of any warranty;
|
84 |
+
and give any other recipients of the Program a copy of this License
|
85 |
+
along with the Program.
|
86 |
+
|
87 |
+
You may charge a fee for the physical act of transferring a copy, and
|
88 |
+
you may at your option offer warranty protection in exchange for a fee.
|
89 |
+
|
90 |
+
2. You may modify your copy or copies of the Program or any portion
|
91 |
+
of it, thus forming a work based on the Program, and copy and
|
92 |
+
distribute such modifications or work under the terms of Section 1
|
93 |
+
above, provided that you also meet all of these conditions:
|
94 |
+
|
95 |
+
a) You must cause the modified files to carry prominent notices
|
96 |
+
stating that you changed the files and the date of any change.
|
97 |
+
|
98 |
+
b) You must cause any work that you distribute or publish, that in
|
99 |
+
whole or in part contains or is derived from the Program or any
|
100 |
+
part thereof, to be licensed as a whole at no charge to all third
|
101 |
+
parties under the terms of this License.
|
102 |
+
|
103 |
+
c) If the modified program normally reads commands interactively
|
104 |
+
when run, you must cause it, when started running for such
|
105 |
+
interactive use in the most ordinary way, to print or display an
|
106 |
+
announcement including an appropriate copyright notice and a
|
107 |
+
notice that there is no warranty (or else, saying that you provide
|
108 |
+
a warranty) and that users may redistribute the program under
|
109 |
+
these conditions, and telling the user how to view a copy of this
|
110 |
+
License. (Exception: if the Program itself is interactive but
|
111 |
+
does not normally print such an announcement, your work based on
|
112 |
+
the Program is not required to print an announcement.)
|
113 |
+
|
114 |
+
These requirements apply to the modified work as a whole. If
|
115 |
+
identifiable sections of that work are not derived from the Program,
|
116 |
+
and can be reasonably considered independent and separate works in
|
117 |
+
themselves, then this License, and its terms, do not apply to those
|
118 |
+
sections when you distribute them as separate works. But when you
|
119 |
+
distribute the same sections as part of a whole which is a work based
|
120 |
+
on the Program, the distribution of the whole must be on the terms of
|
121 |
+
this License, whose permissions for other licensees extend to the
|
122 |
+
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
+
|
124 |
+
Thus, it is not the intent of this section to claim rights or contest
|
125 |
+
your rights to work written entirely by you; rather, the intent is to
|
126 |
+
exercise the right to control the distribution of derivative or
|
127 |
+
collective works based on the Program.
|
128 |
+
|
129 |
+
In addition, mere aggregation of another work not based on the Program
|
130 |
+
with the Program (or with a work based on the Program) on a volume of
|
131 |
+
a storage or distribution medium does not bring the other work under
|
132 |
+
the scope of this License.
|
133 |
+
|
134 |
+
3. You may copy and distribute the Program (or a work based on it,
|
135 |
+
under Section 2) in object code or executable form under the terms of
|
136 |
+
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
+
|
138 |
+
a) Accompany it with the complete corresponding machine-readable
|
139 |
+
source code, which must be distributed under the terms of Sections
|
140 |
+
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
+
|
142 |
+
b) Accompany it with a written offer, valid for at least three
|
143 |
+
years, to give any third party, for a charge no more than your
|
144 |
+
cost of physically performing source distribution, a complete
|
145 |
+
machine-readable copy of the corresponding source code, to be
|
146 |
+
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
+
customarily used for software interchange; or,
|
148 |
+
|
149 |
+
c) Accompany it with the information you received as to the offer
|
150 |
+
to distribute corresponding source code. (This alternative is
|
151 |
+
allowed only for noncommercial distribution and only if you
|
152 |
+
received the program in object code or executable form with such
|
153 |
+
an offer, in accord with Subsection b above.)
|
154 |
+
|
155 |
+
The source code for a work means the preferred form of the work for
|
156 |
+
making modifications to it. For an executable work, complete source
|
157 |
+
code means all the source code for all modules it contains, plus any
|
158 |
+
associated interface definition files, plus the scripts used to
|
159 |
+
control compilation and installation of the executable. However, as a
|
160 |
+
special exception, the source code distributed need not include
|
161 |
+
anything that is normally distributed (in either source or binary
|
162 |
+
form) with the major components (compiler, kernel, and so on) of the
|
163 |
+
operating system on which the executable runs, unless that component
|
164 |
+
itself accompanies the executable.
|
165 |
+
|
166 |
+
If distribution of executable or object code is made by offering
|
167 |
+
access to copy from a designated place, then offering equivalent
|
168 |
+
access to copy the source code from the same place counts as
|
169 |
+
distribution of the source code, even though third parties are not
|
170 |
+
compelled to copy the source along with the object code.
|
171 |
+
|
172 |
+
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
+
except as expressly provided under this License. Any attempt
|
174 |
+
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
+
void, and will automatically terminate your rights under this License.
|
176 |
+
However, parties who have received copies, or rights, from you under
|
177 |
+
this License will not have their licenses terminated so long as such
|
178 |
+
parties remain in full compliance.
|
179 |
+
|
180 |
+
5. You are not required to accept this License, since you have not
|
181 |
+
signed it. However, nothing else grants you permission to modify or
|
182 |
+
distribute the Program or its derivative works. These actions are
|
183 |
+
prohibited by law if you do not accept this License. Therefore, by
|
184 |
+
modifying or distributing the Program (or any work based on the
|
185 |
+
Program), you indicate your acceptance of this License to do so, and
|
186 |
+
all its terms and conditions for copying, distributing or modifying
|
187 |
+
the Program or works based on it.
|
188 |
+
|
189 |
+
6. Each time you redistribute the Program (or any work based on the
|
190 |
+
Program), the recipient automatically receives a license from the
|
191 |
+
original licensor to copy, distribute or modify the Program subject to
|
192 |
+
these terms and conditions. You may not impose any further
|
193 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
+
You are not responsible for enforcing compliance by third parties to
|
195 |
+
this License.
|
196 |
+
|
197 |
+
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
+
infringement or for any other reason (not limited to patent issues),
|
199 |
+
conditions are imposed on you (whether by court order, agreement or
|
200 |
+
otherwise) that contradict the conditions of this License, they do not
|
201 |
+
excuse you from the conditions of this License. If you cannot
|
202 |
+
distribute so as to satisfy simultaneously your obligations under this
|
203 |
+
License and any other pertinent obligations, then as a consequence you
|
204 |
+
may not distribute the Program at all. For example, if a patent
|
205 |
+
license would not permit royalty-free redistribution of the Program by
|
206 |
+
all those who receive copies directly or indirectly through you, then
|
207 |
+
the only way you could satisfy both it and this License would be to
|
208 |
+
refrain entirely from distribution of the Program.
|
209 |
+
|
210 |
+
If any portion of this section is held invalid or unenforceable under
|
211 |
+
any particular circumstance, the balance of the section is intended to
|
212 |
+
apply and the section as a whole is intended to apply in other
|
213 |
+
circumstances.
|
214 |
+
|
215 |
+
It is not the purpose of this section to induce you to infringe any
|
216 |
+
patents or other property right claims or to contest validity of any
|
217 |
+
such claims; this section has the sole purpose of protecting the
|
218 |
+
integrity of the free software distribution system, which is
|
219 |
+
implemented by public license practices. Many people have made
|
220 |
+
generous contributions to the wide range of software distributed
|
221 |
+
through that system in reliance on consistent application of that
|
222 |
+
system; it is up to the author/donor to decide if he or she is willing
|
223 |
+
to distribute software through any other system and a licensee cannot
|
224 |
+
impose that choice.
|
225 |
+
|
226 |
+
This section is intended to make thoroughly clear what is believed to
|
227 |
+
be a consequence of the rest of this License.
|
228 |
+
|
229 |
+
8. If the distribution and/or use of the Program is restricted in
|
230 |
+
certain countries either by patents or by copyrighted interfaces, the
|
231 |
+
original copyright holder who places the Program under this License
|
232 |
+
may add an explicit geographical distribution limitation excluding
|
233 |
+
those countries, so that distribution is permitted only in or among
|
234 |
+
countries not thus excluded. In such case, this License incorporates
|
235 |
+
the limitation as if written in the body of this License.
|
236 |
+
|
237 |
+
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
+
of the General Public License from time to time. Such new versions will
|
239 |
+
be similar in spirit to the present version, but may differ in detail to
|
240 |
+
address new problems or concerns.
|
241 |
+
|
242 |
+
Each version is given a distinguishing version number. If the Program
|
243 |
+
specifies a version number of this License which applies to it and "any
|
244 |
+
later version", you have the option of following the terms and conditions
|
245 |
+
either of that version or of any later version published by the Free
|
246 |
+
Software Foundation. If the Program does not specify a version number of
|
247 |
+
this License, you may choose any version ever published by the Free Software
|
248 |
+
Foundation.
|
249 |
+
|
250 |
+
10. If you wish to incorporate parts of the Program into other free
|
251 |
+
programs whose distribution conditions are different, write to the author
|
252 |
+
to ask for permission. For software which is copyrighted by the Free
|
253 |
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
+
make exceptions for this. Our decision will be guided by the two goals
|
255 |
+
of preserving the free status of all derivatives of our free software and
|
256 |
+
of promoting the sharing and reuse of software generally.
|
257 |
+
|
258 |
+
NO WARRANTY
|
259 |
+
|
260 |
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
+
REPAIR OR CORRECTION.
|
269 |
+
|
270 |
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
END OF TERMS AND CONDITIONS
|
281 |
+
|
282 |
+
How to Apply These Terms to Your New Programs
|
283 |
+
|
284 |
+
If you develop a new program, and you want it to be of the greatest
|
285 |
+
possible use to the public, the best way to achieve this is to make it
|
286 |
+
free software which everyone can redistribute and change under these terms.
|
287 |
+
|
288 |
+
To do so, attach the following notices to the program. It is safest
|
289 |
+
to attach them to the start of each source file to most effectively
|
290 |
+
convey the exclusion of warranty; and each file should have at least
|
291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
292 |
+
|
293 |
+
<one line to give the program's name and a brief idea of what it does.>
|
294 |
+
Copyright (C) <year> <name of author>
|
295 |
+
|
296 |
+
This program is free software; you can redistribute it and/or modify
|
297 |
+
it under the terms of the GNU General Public License as published by
|
298 |
+
the Free Software Foundation; either version 2 of the License, or
|
299 |
+
(at your option) any later version.
|
300 |
+
|
301 |
+
This program is distributed in the hope that it will be useful,
|
302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
+
GNU General Public License for more details.
|
305 |
+
|
306 |
+
You should have received a copy of the GNU General Public License along
|
307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
+
|
310 |
+
Also add information on how to contact you by electronic and paper mail.
|
311 |
+
|
312 |
+
If the program is interactive, make it output a short notice like this
|
313 |
+
when it starts in an interactive mode:
|
314 |
+
|
315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
+
This is free software, and you are welcome to redistribute it
|
318 |
+
under certain conditions; type `show c' for details.
|
319 |
+
|
320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
+
parts of the General Public License. Of course, the commands you use may
|
322 |
+
be called something other than `show w' and `show c'; they could even be
|
323 |
+
mouse-clicks or menu items--whatever suits your program.
|
324 |
+
|
325 |
+
You should also get your employer (if you work as a programmer) or your
|
326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
+
necessary. Here is a sample; alter the names:
|
328 |
+
|
329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
+
|
332 |
+
<signature of Ty Coon>, 1 April 1989
|
333 |
+
Ty Coon, President of Vice
|
334 |
+
|
335 |
+
This General Public License does not permit incorporating your program into
|
336 |
+
proprietary programs. If your program is a subroutine library, you may
|
337 |
+
consider it more useful to permit linking proprietary applications with the
|
338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
339 |
+
Public License instead of this License.
|
README.txt
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Ajax Load More ===
|
2 |
+
Contributors: dcooney
|
3 |
+
Donate link: http://connekthq.com/donate/
|
4 |
+
Tags: ajax, query, loop, paging, filter, jquery, shortcode builder, shortcode, search, tags, category
|
5 |
+
Requires at least: 3.6
|
6 |
+
Tested up to: 3.9.1
|
7 |
+
Stable tag: 2.0.2
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Ajax Load More is simple solution for lazy loading your WordPress posts and pages with AJAX.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
A simple yet powerful solution for loading WordPress posts and pages via AJAX requests. Build complex WP queries using our shortcode builder and let Ajax Load More handle the rest.
|
16 |
+
|
17 |
+
|
18 |
+
View live examples on the [demo site](http://connekthq.com/ajax-load-more/).
|
19 |
+
|
20 |
+
|
21 |
+
= Features include =
|
22 |
+
|
23 |
+
* **Shortcode/Query Builder** - create your own Ajax Load More shortcode by adjusting the various WordPress query parameters (see Shortcode Parameters)
|
24 |
+
* **Customizable Repeater** - edit and extend the functionality of Ajax Load More by editing the repeater (see screenshots)
|
25 |
+
* **Setting Panel** - Customize your version of Ajax Load More by updating various plugin settings (see screenshots)
|
26 |
+
|
27 |
+
|
28 |
+
= Shortcode Parameters =
|
29 |
+
|
30 |
+
Ajax Load More accepts a number of paramaters to pass to the WordPress query. These parameters are passed via shortcode. Don't worry, it's super simple with our custom Shortcode Builder.
|
31 |
+
|
32 |
+
* repeater - select from a list of customizable repeaters (Add-on available)
|
33 |
+
* post_type - comma seperated list of post types to query
|
34 |
+
* category - query by category slug
|
35 |
+
* tag - query by tag slug
|
36 |
+
* author - query by author id
|
37 |
+
* search - query search term ('s')
|
38 |
+
* exclude - comma separated list of post ID's to exclude from query.
|
39 |
+
* offset - offset the initial query (number).
|
40 |
+
* posts_per_page - number of posts to load with each request
|
41 |
+
* scroll - load more posts as the user scrolls the page (true/false)
|
42 |
+
* max_pages - maximum number of pages to load while scrolling (only if scroll == true)
|
43 |
+
* pause - do not load posts until user clicks load button (true/false)
|
44 |
+
* transition - select a loading transition from the drop menu (slide/fade)
|
45 |
+
* button_label - customize the Load More button label.
|
46 |
+
|
47 |
+
|
48 |
+
= Example Shortcode =
|
49 |
+
|
50 |
+
[ajax_load_more post_type="post, portfolio" repeater="default" posts_per_page="5" transition="fade" button_label="Older Posts"]
|
51 |
+
|
52 |
+
|
53 |
+
= Tested Browsers =
|
54 |
+
|
55 |
+
* Firefox (mac + pc)
|
56 |
+
* Safari (mac + pc)
|
57 |
+
* Chrome (mac + pc)
|
58 |
+
* IE8+
|
59 |
+
* iPhone (Safari, Chrome)
|
60 |
+
* Android (Native + Chrome)
|
61 |
+
* BB10
|
62 |
+
|
63 |
+
|
64 |
+
= Add-ons =
|
65 |
+
|
66 |
+
The following Add-ons are available to increase the functionality of Ajax Load More.
|
67 |
+
|
68 |
+
**Custom Repeaters**
|
69 |
+
The Custom Repeaters add-on will add five additional customizeable repeaters and allow you to select unique repeaters for different content types throughout your theme.
|
70 |
+
[More Information](http://connekthq.com/ajax-load-more/custom-repeaters)
|
71 |
+
|
72 |
+
= Website =
|
73 |
+
http://connekthq.com/ajax-load-more
|
74 |
+
|
75 |
+
|
76 |
+
= Please Vote =
|
77 |
+
Your votes make a big difference! If you like Ajax Load More, please vote for my plugin.
|
78 |
+
|
79 |
+
|
80 |
+
== Frequently Asked Questions ==
|
81 |
+
|
82 |
+
|
83 |
+
= What are my server requirements? =
|
84 |
+
|
85 |
+
Your server must be able to read/write/create files. Ajax Load More creates the default repeater on plugin activation and in order to modify the output you are required to write to the file as well.
|
86 |
+
|
87 |
+
= Is the ajax functionality secure? =
|
88 |
+
|
89 |
+
Yes, Ajax Load more uses admin-ajax and nonces in order to protect URLs and forms from being misused.
|
90 |
+
|
91 |
+
= Can I make modifications to the plugin code? =
|
92 |
+
|
93 |
+
Sure, but please be aware that if any modifications are made may affect future updates.
|
94 |
+
|
95 |
+
= Can I modify the repeater? =
|
96 |
+
|
97 |
+
Yes, visit the Repeaters area in the WordPress admin.
|
98 |
+
|
99 |
+
== Installation ==
|
100 |
+
|
101 |
+
How to install Ajax Load More.
|
102 |
+
|
103 |
+
= Using The WordPress Dashboard =
|
104 |
+
|
105 |
+
1. Navigate to the 'Add New' in the plugins dashboard
|
106 |
+
2. Search for 'Ajax Load More'
|
107 |
+
3. Click 'Install Now'
|
108 |
+
4. Activate the plugin on the Plugin dashboard
|
109 |
+
|
110 |
+
= Uploading in WordPress Dashboard =
|
111 |
+
|
112 |
+
1. Navigate to the 'Add New' in the plugins dashboard
|
113 |
+
2. Navigate to the 'Upload' area
|
114 |
+
3. Select `ajax-load-more.zip` from your computer
|
115 |
+
4. Click 'Install Now'
|
116 |
+
5. Activate the plugin in the Plugin dashboard
|
117 |
+
|
118 |
+
= Using FTP =
|
119 |
+
|
120 |
+
1. Download `ajax-load-more.zip`
|
121 |
+
2. Extract the `ajax-load-more` directory to your computer
|
122 |
+
3. Upload the `ajax-load-more` directory to the `/wp-content/plugins/` directory
|
123 |
+
4. Activate the plugin in the Plugin dashboard
|
124 |
+
|
125 |
+
|
126 |
+
== Screenshots ==
|
127 |
+
|
128 |
+
1. Settings screen
|
129 |
+
2. The collection of available repeaters
|
130 |
+
3. Shortcode Builder (Admin screen)
|
131 |
+
4. Shortcode Builder (Page Edit screen)
|
132 |
+
5. Content Editor shortcode icon
|
133 |
+
6. Shortcode and implementation examples
|
134 |
+
|
135 |
+
== Changelog ==
|
136 |
+
|
137 |
+
= 2.0.3 =
|
138 |
+
* Fixed issue with WP auto updates overriding the default repeater. Please deactivate and then activate your plugin.
|
139 |
+
|
140 |
+
= 2.0.2 =
|
141 |
+
* Fixed issue with tinymce conflict
|
142 |
+
|
143 |
+
= 2.0.1 =
|
144 |
+
* Ajax Load More
|
145 |
+
|
146 |
+
== Upgrade Notice ==
|
147 |
+
|
148 |
+
* None
|
149 |
+
|
150 |
+
|
admin/admin.php
ADDED
@@ -0,0 +1,713 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* Admin function */
|
4 |
+
|
5 |
+
|
6 |
+
add_action( 'admin_head', 'alm_admin_vars' );
|
7 |
+
add_action( 'wp_ajax_alm_save_repeater', 'alm_save_repeater' ); // Ajax Save Repeater
|
8 |
+
add_action( 'wp_ajax_nopriv_alm_save_repeater', 'alm_save_repeater' ); // Ajax Save Repeater
|
9 |
+
|
10 |
+
/*
|
11 |
+
* alm_admin_vars
|
12 |
+
* Create admin variables and ajax nonce
|
13 |
+
*
|
14 |
+
* @since 2.0.0
|
15 |
+
*/
|
16 |
+
function alm_admin_vars() { ?>
|
17 |
+
<script type='text/javascript'>
|
18 |
+
/* <![CDATA[ */
|
19 |
+
var alm_admin_localize = <?php echo json_encode( array(
|
20 |
+
'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
|
21 |
+
'alm_admin_nonce' => wp_create_nonce( 'alm_repeater_nonce' )
|
22 |
+
)); ?>
|
23 |
+
/* ]]> */
|
24 |
+
</script>
|
25 |
+
<?php }
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* alm_update_default
|
31 |
+
* Update default repeater if plugin versions do not match. This means the plugin has been updated.
|
32 |
+
*
|
33 |
+
* @since 2.0.0
|
34 |
+
*/
|
35 |
+
|
36 |
+
add_action( 'admin_init', 'alm_update_default' );
|
37 |
+
function alm_update_default() {
|
38 |
+
global $wpdb;
|
39 |
+
$table_name = $wpdb->prefix . "alm";
|
40 |
+
|
41 |
+
//If alm table is present
|
42 |
+
if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name) {
|
43 |
+
$version = $wpdb->get_var("SELECT pluginVersion FROM $table_name WHERE id = 1");
|
44 |
+
|
45 |
+
if($version != ALM_VERSION){
|
46 |
+
//Write to repeater file
|
47 |
+
$defaultRepeater = $wpdb->get_var("SELECT repeaterDefault FROM $table_name WHERE id = 1");
|
48 |
+
$f = ALM_PATH. '/core/repeater/default.php'; // File
|
49 |
+
$o = fopen($f, 'w+'); //Open file
|
50 |
+
$w = fwrite($o, $defaultRepeater); //Save the file
|
51 |
+
$r = fread($o, 100000); //Read it
|
52 |
+
fclose($o); //now close it
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
}
|
58 |
+
/**
|
59 |
+
* alm_admin_menu
|
60 |
+
* Create Admin Menu
|
61 |
+
*
|
62 |
+
* @since 2.0.0
|
63 |
+
*/
|
64 |
+
|
65 |
+
add_action( 'admin_menu', 'alm_admin_menu' );
|
66 |
+
function alm_admin_menu() {
|
67 |
+
$icon = 'dashicons-plus-alt';
|
68 |
+
$icon = ALM_ADMIN_URL . "/img/alm-logo-16x16.png";
|
69 |
+
add_menu_page( 'Ajax Load More', 'Ajax Load More', 'edit_theme_options', 'ajax-load-more', 'alm_settings_page', $icon, 81 );
|
70 |
+
add_submenu_page( 'ajax-load-more', 'Settings', 'Settings', 'edit_theme_options', 'ajax-load-more', 'alm_settings_page');
|
71 |
+
add_submenu_page( 'ajax-load-more', 'Repeaters', 'Repeaters', 'edit_theme_options', 'ajax-load-more-repeaters', 'alm_repeater_page');
|
72 |
+
add_submenu_page( 'ajax-load-more', 'Shortcode Builder', 'Shortcode Builder', 'edit_theme_options', 'ajax-load-more-shortcode-builder', 'alm_shortcode_builder_page');
|
73 |
+
add_submenu_page( 'ajax-load-more', 'Examples', 'Examples', 'edit_theme_options', 'ajax-load-more-examples', 'alm_example_page');
|
74 |
+
add_submenu_page( 'ajax-load-more', 'Add-ons', 'Add-ons', 'edit_theme_options', 'ajax-load-more-add-ons', 'alm_add_ons_page');
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
|
79 |
+
/*
|
80 |
+
* alm_settings_page
|
81 |
+
* Settings page
|
82 |
+
*
|
83 |
+
* @since 2.0.0
|
84 |
+
*/
|
85 |
+
|
86 |
+
function alm_settings_page(){ ?>
|
87 |
+
<div class="admin ajax-load-more settings" id="alm-settings">
|
88 |
+
<div class="wrap">
|
89 |
+
<div class="header-wrap">
|
90 |
+
<h2><?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span></h2>
|
91 |
+
<p>A simple solution for lazy loading WordPress posts and pages</p>
|
92 |
+
</div>
|
93 |
+
<div class="alm-main">
|
94 |
+
<section class="group">
|
95 |
+
<form action="options.php" method="post">
|
96 |
+
<?php
|
97 |
+
settings_fields( 'alm-setting-group' );
|
98 |
+
do_settings_sections( 'ajax-load-more' );
|
99 |
+
//get the older values, wont work the first time
|
100 |
+
$options = get_option( '_alm_settings' ); ?>
|
101 |
+
<div class="row">
|
102 |
+
<?php submit_button('Save Settings'); ?>
|
103 |
+
</div>
|
104 |
+
</form>
|
105 |
+
</section>
|
106 |
+
</div>
|
107 |
+
<aside class="alm-sidebar">
|
108 |
+
<?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/resources.php'); ?>
|
109 |
+
<?php //include( plugin_dir_path( __FILE__ ) . 'includes/cta/writeable.php'); ?>
|
110 |
+
<?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/about.php'); ?>
|
111 |
+
</aside>
|
112 |
+
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
+
<?php
|
116 |
+
}
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
/*
|
121 |
+
* alm_repeater_page
|
122 |
+
* Custom Repeaters
|
123 |
+
*
|
124 |
+
* @since 2.0.0
|
125 |
+
*/
|
126 |
+
|
127 |
+
function alm_repeater_page(){ ?>
|
128 |
+
<div class="admin ajax-load-more" id="alm-repeaters">
|
129 |
+
<div class="wrap">
|
130 |
+
<div class="header-wrap">
|
131 |
+
<h2><?php _e('Ajax load More: Repeaters', ALM_NAME); ?></h2>
|
132 |
+
<p><?php _e('The library of available repeaters', ALM_NAME); ?></p>
|
133 |
+
</div>
|
134 |
+
<div class="alm-main form-table repeaters">
|
135 |
+
<!-- Repeaters -->
|
136 |
+
<section class="group">
|
137 |
+
<!-- Default -->
|
138 |
+
<div class="row default-repeater">
|
139 |
+
<?php
|
140 |
+
$filename = ALM_PATH. 'core/repeater/default.php';
|
141 |
+
$handle = fopen ($filename, "r");
|
142 |
+
$contents = fread ($handle, filesize ($filename));
|
143 |
+
fclose ($handle);
|
144 |
+
?>
|
145 |
+
<h3 class="heading"><?php _e('Default Repeater', ALM_NAME); ?></h3>
|
146 |
+
<div class="expand-wrap">
|
147 |
+
<div class="section-title">
|
148 |
+
<p><?php _e('Enter the HTML and PHP for the default repeater.', ALM_NAME); ?></p>
|
149 |
+
</div>
|
150 |
+
<div class="wrap repeater-wrap" data-name="default">
|
151 |
+
<div class="textarea-wrap">
|
152 |
+
<textarea rows="10" class="_alm_repeater"><?php echo $contents; ?></textarea>
|
153 |
+
</div>
|
154 |
+
<input type="submit" value="Save Repeater" class="button button-primary save-repeater">
|
155 |
+
<div class="saved-response"> </div>
|
156 |
+
<!-- <div class="restore-default"><a href="javascript:void(0);"><?php _e('Restore Default', ALM_NAME); ?></a></div> -->
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
<?php
|
160 |
+
if (!has_action('alm_get_custom_repeaters')) {
|
161 |
+
echo '<div class="row">';
|
162 |
+
include( ALM_PATH. 'admin/includes/cta/extend.php');
|
163 |
+
echo '</div>';
|
164 |
+
}
|
165 |
+
?>
|
166 |
+
<div class="clear"></div>
|
167 |
+
</div>
|
168 |
+
<!-- End Default -->
|
169 |
+
<?php
|
170 |
+
if (has_action('alm_custom_repeaters'))
|
171 |
+
do_action('alm_custom_repeaters');
|
172 |
+
?>
|
173 |
+
<script>
|
174 |
+
$(document).ready(function() {
|
175 |
+
"use strict";
|
176 |
+
$(document).ready(function() {
|
177 |
+
var _alm_admin = {};
|
178 |
+
|
179 |
+
/*
|
180 |
+
* _alm_admin.saveRepeater
|
181 |
+
* Save Custom Repeater Value
|
182 |
+
*
|
183 |
+
* @since 2.0.0
|
184 |
+
*/
|
185 |
+
|
186 |
+
_alm_admin.saveRepeater = function(btn) {
|
187 |
+
var container = btn.parent('.repeater-wrap'),
|
188 |
+
el = $('textarea._alm_repeater', container),
|
189 |
+
value = el.val(),
|
190 |
+
btn = btn,
|
191 |
+
repeater = container.data('name'),
|
192 |
+
responseText = $(".saved-response", container);
|
193 |
+
|
194 |
+
//If submit button has changed class.
|
195 |
+
if (btn.hasClass('changed')) { // If repeater value has changed.
|
196 |
+
responseText.addClass('loading').html('<?php _e('Saving data...', ALM_NAME) ?>');
|
197 |
+
$.ajax({
|
198 |
+
type: 'POST',
|
199 |
+
url: alm_admin_localize.ajax_admin_url,
|
200 |
+
data: {
|
201 |
+
action: 'alm_save_repeater',
|
202 |
+
value: value,
|
203 |
+
repeater: repeater,
|
204 |
+
nonce: alm_admin_localize.alm_admin_nonce,
|
205 |
+
},
|
206 |
+
success: function(e) {
|
207 |
+
setTimeout(function(){
|
208 |
+
responseText.html('<?php _e('Custom repeater value saved.', ALM_NAME) ?>').removeClass('loading').addClass('saved');
|
209 |
+
setTimeout(function() {
|
210 |
+
responseText.html(' ').removeClass('saved');
|
211 |
+
}, 3000);
|
212 |
+
},1000);
|
213 |
+
btn.removeClass('changed');
|
214 |
+
},
|
215 |
+
error: function(xhr, status, error) {
|
216 |
+
responseText.html('<?php _e('Something went wrong and the data could not be saved.', ALM_NAME) ?>').removeClass('loading').removeClass('saved');
|
217 |
+
btn.removeClass('changed');
|
218 |
+
}
|
219 |
+
});
|
220 |
+
}
|
221 |
+
}
|
222 |
+
$('input.save-repeater').each(function(){
|
223 |
+
$(this).click(function() {
|
224 |
+
var btn = $(this);
|
225 |
+
btn.addClass('changed');
|
226 |
+
_alm_admin.saveRepeater(btn);
|
227 |
+
});
|
228 |
+
});
|
229 |
+
});
|
230 |
+
});
|
231 |
+
</script>
|
232 |
+
</section>
|
233 |
+
<!-- End Repeaters -->
|
234 |
+
</div>
|
235 |
+
<aside class="alm-sidebar">
|
236 |
+
<div class="cta">
|
237 |
+
<h3><?php _e('Repeater Help', ALM_NAME); ?></h3>
|
238 |
+
<?php
|
239 |
+
global $wpdb;
|
240 |
+
|
241 |
+
//$table_name = $wpdb->prefix . "alm";
|
242 |
+
//$value = $wpdb->get_var("SELECT repeaterDefault FROM $table_name WHERE id = 1");
|
243 |
+
|
244 |
+
?>
|
245 |
+
<div class="item">
|
246 |
+
<p><strong><?php _e('What is a repeater?', ALM_NAME); ?></strong></p>
|
247 |
+
<p><?php _e('A repeater is a snippet of code that will execute over and over within a <a href="http://codex.wordpress.org/The_Loop" target="_blank">WordPress loop</a>.</p>', ALM_NAME); ?></p>
|
248 |
+
</div>
|
249 |
+
<div class="item">
|
250 |
+
<p><strong><?php _e('Can I include PHP in the repeater?', ALM_NAME); ?></strong></p>
|
251 |
+
<p><?php _e('Yes, PHP and core WordPress functions such as, <code>the_title()</code> and <code>the_permalink()</code> are required.</p>', ALM_NAME); ?></p>
|
252 |
+
</div>
|
253 |
+
<div class="item">
|
254 |
+
<p><strong><?php _e('Tips and Tricks', ALM_NAME); ?></strong></p>
|
255 |
+
<ul>
|
256 |
+
<li><?php _e('Always open and close your repeater with an HTML element. In some rare cases data may not be displayed.<br/>e.g. <code><li> </li></code> or <code><div> </div></code>', ALM_NAME); ?><br/> </li>
|
257 |
+
</ul>
|
258 |
+
</div>
|
259 |
+
</div>
|
260 |
+
<?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/writeable.php'); ?>
|
261 |
+
</aside>
|
262 |
+
</div>
|
263 |
+
</div>
|
264 |
+
|
265 |
+
<?php
|
266 |
+
}
|
267 |
+
|
268 |
+
|
269 |
+
/*
|
270 |
+
* alm_save_repeater
|
271 |
+
* Repeater Save function
|
272 |
+
*
|
273 |
+
* @since 2.0.0
|
274 |
+
*/
|
275 |
+
|
276 |
+
function alm_save_repeater(){
|
277 |
+
$nonce = $_POST["nonce"];
|
278 |
+
// Check our nonce, if they don't match then bounce!
|
279 |
+
if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
|
280 |
+
die('Get Bounced!');
|
281 |
+
|
282 |
+
//Write to repeater file
|
283 |
+
$c = Trim(stripslashes($_POST["value"])); // Repeater Value
|
284 |
+
$n = Trim(stripslashes($_POST["repeater"])); // Repeater name
|
285 |
+
if($n === 'default')
|
286 |
+
$f = ALM_PATH. '/core/repeater/'.$n .'.php'; // File
|
287 |
+
else
|
288 |
+
$f = ALM_REPEATER_PATH. '/repeaters/'.$n .'.php'; // File
|
289 |
+
$o = fopen($f, 'w+'); //Open file
|
290 |
+
$w = fwrite($o, $c); //Save the file
|
291 |
+
$r = fread($o, 100000); //Read it
|
292 |
+
fclose($o); //now close it
|
293 |
+
|
294 |
+
|
295 |
+
//Save to database
|
296 |
+
global $wpdb;
|
297 |
+
$table_name = $wpdb->prefix . "alm";
|
298 |
+
$data_update = array('repeaterDefault' => "$c", 'pluginVersion' => ALM_VERSION);
|
299 |
+
$data_where = array('id' => "1");
|
300 |
+
$wpdb->update($table_name , $data_update, $data_where);
|
301 |
+
|
302 |
+
//Our results
|
303 |
+
if($w){
|
304 |
+
echo 'File saved';
|
305 |
+
} else {
|
306 |
+
echo 'Error saving file';
|
307 |
+
}
|
308 |
+
}
|
309 |
+
|
310 |
+
|
311 |
+
/*
|
312 |
+
* alm_shortcode_builder_page
|
313 |
+
* Shortcode Builder
|
314 |
+
*
|
315 |
+
* @since 2.0.0
|
316 |
+
*/
|
317 |
+
|
318 |
+
function alm_shortcode_builder_page(){ ?>
|
319 |
+
<div class="admin ajax-load-more" id="alm-builder">
|
320 |
+
<div class="wrap">
|
321 |
+
<div class="header-wrap">
|
322 |
+
<h2><?php _e('Ajax load More: Shortcode Builder', ALM_NAME); ?></h2>
|
323 |
+
<p><?php _e('Create your own Ajax Load More <a href="http://en.support.wordpress.com/shortcodes/" target="_blank">shortcode</a> by adjusting the values below', ALM_NAME); ?></p>
|
324 |
+
</div>
|
325 |
+
<div class="alm-main">
|
326 |
+
<section class="group">
|
327 |
+
<?php include( plugin_dir_path( __FILE__ ) . 'includes/shortcode-builder.php'); ?>
|
328 |
+
<div class="row">
|
329 |
+
<p class="back2top"><a href="#wpcontent"><i class="fa fa-chevron-up"></i> <?php _e('Back to Top', ALM_NAME); ?></a></p>
|
330 |
+
</div>
|
331 |
+
</section>
|
332 |
+
</div>
|
333 |
+
<aside class="alm-sidebar">
|
334 |
+
<div class="cta">
|
335 |
+
<h3><?php _e('Shortcode Output', ALM_NAME); ?></h3>
|
336 |
+
<p><?php _e('Copy and paste the following shortcode into the content editor or widget area of your theme.', ALM_NAME); ?></p>
|
337 |
+
<div class="output-wrap">
|
338 |
+
<div id="shortcode_output"></div>
|
339 |
+
<span class="copy"><?php _e('Copy', ALM_NAME); ?></span>
|
340 |
+
</div>
|
341 |
+
</div>
|
342 |
+
<div class="cta">
|
343 |
+
<h3><?php _e('Did you know?', ALM_NAME); ?></h3>
|
344 |
+
<img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
|
345 |
+
<?php _e('<p class="addon-intro">You can generate shortcodes while editing pages!</p><p>Look for the Ajax Load More [+] icon in the content editor toolbar and the <a href="?page=ajax-load-more-shortcode-builder">shortcode builder</a> will pop open.', ALM_NAME); ?></p>
|
346 |
+
</div>
|
347 |
+
</aside>
|
348 |
+
</div>
|
349 |
+
</div>
|
350 |
+
<?php
|
351 |
+
}
|
352 |
+
|
353 |
+
|
354 |
+
/*
|
355 |
+
* alm_example_page
|
356 |
+
* Examples Page
|
357 |
+
*
|
358 |
+
* @since 2.0.0
|
359 |
+
*/
|
360 |
+
|
361 |
+
function alm_example_page(){ ?>
|
362 |
+
<div class="admin ajax-load-more" id="alm-examples">
|
363 |
+
<div class="wrap">
|
364 |
+
<div class="header-wrap">
|
365 |
+
<h2><?php _e('Ajax load More: Examples', ALM_NAME); ?></h2>
|
366 |
+
<p><?php _e('A collection of everyday shortcode usages and implementation examples', ALM_NAME); ?></p>
|
367 |
+
</div>
|
368 |
+
<div class="alm-main forceColors">
|
369 |
+
<section class="group">
|
370 |
+
<div class="row gist">
|
371 |
+
<h3 class="heading"><?php _e('Author.php', ALM_NAME); ?></h3>
|
372 |
+
<div class="expand-wrap">
|
373 |
+
<p><?php _e('Example shortcode for use on author archive pages.', ALM_NAME); ?></p>
|
374 |
+
<div class="inner">
|
375 |
+
<script src="https://gist.github.com/dcooney/4d07ff95f7274f38fd3a.js"></script>
|
376 |
+
</div>
|
377 |
+
</div>
|
378 |
+
</div>
|
379 |
+
<div class="row gist">
|
380 |
+
<h3 class="heading"><?php _e('Category.php', ALM_NAME); ?></h3>
|
381 |
+
<div class="expand-wrap">
|
382 |
+
<p><?php _e('Example shortcode for use on category archive pages.', ALM_NAME); ?></p>
|
383 |
+
<div class="inner">
|
384 |
+
<script src="https://gist.github.com/dcooney/ae4caec3f9061dd47627.js"></script>
|
385 |
+
</div>
|
386 |
+
</div>
|
387 |
+
</div>
|
388 |
+
<div class="row gist">
|
389 |
+
<h3 class="heading"><?php _e('Excluding Posts', ALM_NAME); ?></h3>
|
390 |
+
<div class="expand-wrap">
|
391 |
+
<p><?php _e('Example shortcode for excluding an array of posts.', ALM_NAME); ?></p>
|
392 |
+
<script src="https://gist.github.com/dcooney/9b037efbd166b4dba5ae.js"></script>
|
393 |
+
</div>
|
394 |
+
</div>
|
395 |
+
|
396 |
+
<div class="row gist">
|
397 |
+
<h3 class="heading"><?php _e('Tag.php', ALM_NAME); ?></h3>
|
398 |
+
<div class="expand-wrap">
|
399 |
+
<p><?php _e('Example shortcode for use on tag archive pages.', ALM_NAME); ?></p>
|
400 |
+
<div class="inner">
|
401 |
+
<script src="https://gist.github.com/dcooney/fc4276bebbdd05af64d1.js"></script>
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
+
</div>
|
405 |
+
<div class="row">
|
406 |
+
<p class="back2top"><a href="#wpcontent"><i class="fa fa-chevron-up"></i> <?php _e('Back to Top', ALM_NAME); ?></a></p>
|
407 |
+
</div>
|
408 |
+
</section>
|
409 |
+
</div>
|
410 |
+
<aside class="alm-sidebar">
|
411 |
+
<div class="cta">
|
412 |
+
<h3><?php _e('Request Examples', ALM_NAME); ?></h3>
|
413 |
+
<p><?php _e('If you\'re having issue\'s with functionality, please submit example requests through the <a href="https://github.com/dcooney/wordpress-ajax-load-more" target="_blank">GitHub repository</a>. ', ALM_NAME); ?></p>
|
414 |
+
</div>
|
415 |
+
<?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/about.php'); ?>
|
416 |
+
</aside>
|
417 |
+
|
418 |
+
|
419 |
+
</div>
|
420 |
+
</div>
|
421 |
+
<?php
|
422 |
+
}
|
423 |
+
|
424 |
+
|
425 |
+
|
426 |
+
/*
|
427 |
+
* alm_add_ons_page
|
428 |
+
* Ajax Load More Add-ons
|
429 |
+
*
|
430 |
+
* @since 2.0.0
|
431 |
+
*/
|
432 |
+
|
433 |
+
function alm_add_ons_page(){ ?>
|
434 |
+
<div class="admin ajax-load-more" id="alm-add-ons">
|
435 |
+
<div class="wrap">
|
436 |
+
<div class="header-wrap">
|
437 |
+
<h2><?php _e('Ajax load More: Add-ons', ALM_NAME); ?></h2>
|
438 |
+
<p><?php _e('The following Add-ons are available to increase the functionality of Ajax Load More.', ALM_NAME); ?></p>
|
439 |
+
</div>
|
440 |
+
<div class="alm-main forceColors">
|
441 |
+
<!-- Custom Repeater -->
|
442 |
+
<section class="group">
|
443 |
+
<div class="row">
|
444 |
+
<h3 class="add-on-title"><?php _e('Custom Repeaters', ALM_NAME); ?></h3>
|
445 |
+
<div class="expand-wrap">
|
446 |
+
<div class="section-title">
|
447 |
+
<img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/repeater-add-ons.jpg">
|
448 |
+
</div>
|
449 |
+
<div class="wrap">
|
450 |
+
<p class="addon-intro"><?php _e('Unlock additional repeaters and keep your site looking fresh!', ALM_NAME); ?></p>
|
451 |
+
<p><?php _e('The Custom Repeaters add-on will add <strong>five</strong> additional <a href="?page=ajax-load-more-repeaters">repeaters</a> and allow you to select unique repeaters for different content types throughout your theme.</p>
|
452 |
+
<p>It\'s easy! Just build each <a href="?page=ajax-load-more-repeaters">repeater</a> and then choose from the list of repeaters while building your <a href="?page=ajax-load-more-shortcode-builder">shortcode</a>.</p><p><strong>Read/Write Access is required!</strong></p>', ALM_NAME); ?>
|
453 |
+
</div>
|
454 |
+
</div>
|
455 |
+
</div>
|
456 |
+
<?php
|
457 |
+
if (has_action('alm_repeater_installed')){
|
458 |
+
echo '<a class="btn installed" href="#"><i class="fa fa-check-square"></i> Installed</a> ';
|
459 |
+
}else{
|
460 |
+
echo '<a class="btn" href="http://connekthq.com/ajax-load-more/custom-repeaters" target="_blank"><i class="fa fa-download"></i> Purchase & Install</a>';
|
461 |
+
}
|
462 |
+
?>
|
463 |
+
</section>
|
464 |
+
<!-- End Custom Repeater -->
|
465 |
+
</div>
|
466 |
+
|
467 |
+
<aside class="alm-sidebar">
|
468 |
+
<div class="cta">
|
469 |
+
<h3><?php _e('About Add-ons', ALM_NAME); ?></h3>
|
470 |
+
<p><?php _e('Add-ons are installed as a separate plugin and will receive plug-in update notifications. ', ALM_NAME); ?></p>
|
471 |
+
</div>
|
472 |
+
<?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/writeable.php'); ?>
|
473 |
+
</aside>
|
474 |
+
|
475 |
+
</div>
|
476 |
+
</div>
|
477 |
+
<?php
|
478 |
+
}
|
479 |
+
|
480 |
+
/*
|
481 |
+
* adminHeader
|
482 |
+
* Admin CSS and JS
|
483 |
+
*
|
484 |
+
* @since 2.0.0
|
485 |
+
*/
|
486 |
+
|
487 |
+
add_action('admin_head', 'alm_adminHeader');
|
488 |
+
add_action('admin_footer', 'alm_adminFooter');
|
489 |
+
function alm_adminHeader() {
|
490 |
+
$url = plugins_url( 'css/admin.css', __FILE__ );
|
491 |
+
echo '<link rel="stylesheet" type="text/css" href="' . $url . '" />';
|
492 |
+
echo '<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">';
|
493 |
+
echo '<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js"></script>';
|
494 |
+
}
|
495 |
+
function alm_adminFooter() {
|
496 |
+
echo '<script type="text/javascript" src="'.plugins_url( 'js/libs/select2.min.js', __FILE__ ).'"></script>';
|
497 |
+
echo '<script type="text/javascript" src="'.plugins_url( 'js/shortcode-builder.js', __FILE__ ).'"></script>';
|
498 |
+
}
|
499 |
+
|
500 |
+
|
501 |
+
|
502 |
+
/*
|
503 |
+
* admin_init
|
504 |
+
* Initiate the plugin, create our setting variables.
|
505 |
+
*
|
506 |
+
* @since 2.0.0
|
507 |
+
*/
|
508 |
+
|
509 |
+
add_action( 'admin_init', 'alm_admin_init');
|
510 |
+
function alm_admin_init(){
|
511 |
+
register_setting(
|
512 |
+
'alm-setting-group',
|
513 |
+
'alm_settings',
|
514 |
+
'alm_sanitize_settings'
|
515 |
+
);
|
516 |
+
add_settings_section(
|
517 |
+
'alm_general_settings',
|
518 |
+
'General Settings',
|
519 |
+
'alm_general_settings_callback',
|
520 |
+
'ajax-load-more'
|
521 |
+
);
|
522 |
+
add_settings_field(
|
523 |
+
'_alm_disable_css',
|
524 |
+
__('Disable CSS', ALM_NAME ),
|
525 |
+
'alm_disable_css_callback',
|
526 |
+
'ajax-load-more',
|
527 |
+
'alm_general_settings'
|
528 |
+
);
|
529 |
+
add_settings_field(
|
530 |
+
'_alm_html5',
|
531 |
+
__('HTML5 Elements', ALM_NAME ),
|
532 |
+
'alm_html5_callback',
|
533 |
+
'ajax-load-more',
|
534 |
+
'alm_general_settings'
|
535 |
+
);
|
536 |
+
add_settings_field(
|
537 |
+
'_alm_container_type',
|
538 |
+
__('Container Type', ALM_NAME ),
|
539 |
+
'alm_container_type_callback',
|
540 |
+
'ajax-load-more',
|
541 |
+
'alm_general_settings'
|
542 |
+
);
|
543 |
+
add_settings_field(
|
544 |
+
'_alm_classname',
|
545 |
+
__('Container Class', ALM_NAME ),
|
546 |
+
'alm_class_callback',
|
547 |
+
'ajax-load-more',
|
548 |
+
'alm_general_settings'
|
549 |
+
);
|
550 |
+
add_settings_field(
|
551 |
+
'_alm_btn_color',
|
552 |
+
__('Button Color', ALM_NAME ),
|
553 |
+
'alm_btn_color_callback',
|
554 |
+
'ajax-load-more',
|
555 |
+
'alm_general_settings'
|
556 |
+
);
|
557 |
+
}
|
558 |
+
|
559 |
+
|
560 |
+
|
561 |
+
/*
|
562 |
+
* alm_general_settings_callback
|
563 |
+
* Some general settings text
|
564 |
+
*
|
565 |
+
* @since 2.0.0
|
566 |
+
*/
|
567 |
+
|
568 |
+
function alm_general_settings_callback() {
|
569 |
+
echo '<p>' . __('Customize your version of Ajax Load More by updating the fields below.</p><p class="small">All changes will be applied globally accross your theme.', ALM_NAME) . '</p>';
|
570 |
+
}
|
571 |
+
|
572 |
+
|
573 |
+
/*
|
574 |
+
* alm_sanitize_settings
|
575 |
+
* Sanitize our form fields
|
576 |
+
*
|
577 |
+
* @since 2.0.0
|
578 |
+
*/
|
579 |
+
|
580 |
+
function alm_sanitize_settings( $input ) {
|
581 |
+
return $input;
|
582 |
+
}
|
583 |
+
|
584 |
+
|
585 |
+
/*
|
586 |
+
* alm_disable_css_callback
|
587 |
+
* Diabale Ajax Load More CSS.
|
588 |
+
*
|
589 |
+
* @since 2.0.0
|
590 |
+
*/
|
591 |
+
|
592 |
+
function alm_disable_css_callback(){
|
593 |
+
$options = get_option( 'alm_settings' );
|
594 |
+
if(!isset($options['_alm_disable_css']))
|
595 |
+
$options['_alm_disable_css'] = '0';
|
596 |
+
|
597 |
+
echo '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />
|
598 |
+
<label><input type="checkbox" name="alm_settings[_alm_disable_css]" value="1"'. (($options['_alm_disable_css']) ? ' checked="checked"' : '') .' /> I want to use my own CSS styles</label>';
|
599 |
+
echo '<p class="desc"><i class="fa fa-file-text-o"></i> <a href="'.ALM_URL.'/css/ajax-load-more.css" target="blank">View Ajax Load More CSS</a></p>';
|
600 |
+
}
|
601 |
+
|
602 |
+
|
603 |
+
/*
|
604 |
+
* alm_html5_callback
|
605 |
+
* Enable HTML5 elements within AjaxLoadMore.
|
606 |
+
*
|
607 |
+
* @since 2.0.0
|
608 |
+
*/
|
609 |
+
|
610 |
+
function alm_html5_callback(){
|
611 |
+
$options = get_option( 'alm_settings' );
|
612 |
+
if(!isset($options['_alm_html5']))
|
613 |
+
$options['_alm_html5'] = '1';
|
614 |
+
|
615 |
+
echo '<input type="hidden" name="alm_settings[_alm_html5]" value="0" />
|
616 |
+
<label><input type="checkbox" name="alm_settings[_alm_html5]" value="1"'. (($options['_alm_html5']) ? ' checked="checked"' : '') .' /> Enable HTML5 elements within Ajax Load More\'s output.</label>';
|
617 |
+
}
|
618 |
+
|
619 |
+
|
620 |
+
/*
|
621 |
+
* alm_class_callback
|
622 |
+
* Enable HTML5 elements within AjaxLoadMore.
|
623 |
+
*
|
624 |
+
* @since 2.0.0
|
625 |
+
*/
|
626 |
+
|
627 |
+
function alm_class_callback(){
|
628 |
+
$options = get_option( 'alm_settings' );
|
629 |
+
|
630 |
+
echo '<label for="alm_settings[_alm_classname]">Add classes to Ajax Load More container.</label><br/><input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" /> ';
|
631 |
+
}
|
632 |
+
|
633 |
+
|
634 |
+
/*
|
635 |
+
* alm_container_type_callback
|
636 |
+
* The type of container ul or div
|
637 |
+
*
|
638 |
+
* @since 2.0.0
|
639 |
+
*/
|
640 |
+
|
641 |
+
function alm_container_type_callback() {
|
642 |
+
|
643 |
+
$options = get_option( 'alm_settings' );
|
644 |
+
|
645 |
+
if(!isset($options['_alm_container_type']))
|
646 |
+
$options['_alm_container_type'] = '1';
|
647 |
+
|
648 |
+
$html = '<input type="radio" id="_alm_container_type_one" name="alm_settings[_alm_container_type]" value="1"' . checked( 1, $options['_alm_container_type'], false ) . '/>';
|
649 |
+
$html .= '<label for="_alm_container_type_one"><ul> <span><!-- Ajax Posts Here --></span> </ul></label><br/>';
|
650 |
+
|
651 |
+
$html .= '<input type="radio" id="_alm_container_type_two" name="alm_settings[_alm_container_type]" value="2"' . checked( 2, $options['_alm_container_type'], false ) . '/>';
|
652 |
+
$html .= '<label for="_alm_container_type_two"><div> <span><!-- Ajax Posts Here --></span> </div></label>';
|
653 |
+
|
654 |
+
echo $html;
|
655 |
+
|
656 |
+
}
|
657 |
+
|
658 |
+
|
659 |
+
|
660 |
+
/*
|
661 |
+
* alm_btn_color_callback
|
662 |
+
* Get button color
|
663 |
+
*
|
664 |
+
* @since 2.0.0
|
665 |
+
*/
|
666 |
+
|
667 |
+
function alm_btn_color_callback() {
|
668 |
+
|
669 |
+
$options = get_option( 'alm_settings' );
|
670 |
+
$color = $options['_alm_btn_color'];
|
671 |
+
|
672 |
+
if(!isset($color))
|
673 |
+
$options['_alm_btn_color'] = '0';
|
674 |
+
|
675 |
+
$selected0 = '';
|
676 |
+
if($color == 'default')
|
677 |
+
$selected0 = 'selected="selected"';
|
678 |
+
|
679 |
+
$selected1 = '';
|
680 |
+
if($color == 'blue')
|
681 |
+
$selected1 = 'selected="selected"';
|
682 |
+
|
683 |
+
$selected2 = '';
|
684 |
+
if($color == 'green')
|
685 |
+
$selected2 = 'selected="selected"';
|
686 |
+
|
687 |
+
$selected3 = '';
|
688 |
+
if($color == 'red')
|
689 |
+
$selected3 = 'selected="selected"';
|
690 |
+
|
691 |
+
$selected4 = '';
|
692 |
+
if($color == 'purple')
|
693 |
+
$selected4 = 'selected="selected"';
|
694 |
+
|
695 |
+
$selected5 = '';
|
696 |
+
if($color == 'grey')
|
697 |
+
$selected5 = 'selected="selected"';
|
698 |
+
|
699 |
+
|
700 |
+
$html = '<select id="name="alm_settings[_alm_btn_color]" name="alm_settings[_alm_btn_color]">';
|
701 |
+
$html .= '<option value="default" ' . $selected0 .'>Default (Orange)</option>';
|
702 |
+
$html .= '<option value="blue" ' . $selected1 .'>Blue</option>';
|
703 |
+
$html .= '<option value="green" ' . $selected2 .'>Green</option>';
|
704 |
+
$html .= '<option value="red" ' . $selected3 .'>Red</option>';
|
705 |
+
$html .= '<option value="purple" ' . $selected4 .'>Purple</option>';
|
706 |
+
$html .= '<option value="grey" ' . $selected5 .'>Grey</option>';
|
707 |
+
$html .= '</select>';
|
708 |
+
|
709 |
+
echo $html;
|
710 |
+
|
711 |
+
}
|
712 |
+
|
713 |
+
|
admin/css/admin.css
ADDED
@@ -0,0 +1,1098 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700,600);
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Admin - Popup Generator
|
5 |
+
*
|
6 |
+
* @since 1.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
.ajax-load-more{
|
10 |
+
font-size: 14px;
|
11 |
+
color:#666;
|
12 |
+
position: relative;
|
13 |
+
overflow-x: hidden;
|
14 |
+
font-family: 'Open Sans', sans-serif;
|
15 |
+
}
|
16 |
+
|
17 |
+
.ajax-load-more *{
|
18 |
+
-webkit-box-sizing: border-box;
|
19 |
+
-moz-box-sizing: border-box;
|
20 |
+
box-sizing: border-box;
|
21 |
+
}
|
22 |
+
|
23 |
+
.ajax-load-more img{
|
24 |
+
max-width: 100%;
|
25 |
+
}
|
26 |
+
|
27 |
+
#alm-container{
|
28 |
+
overflow: hidden;
|
29 |
+
padding: 15px 10px 140px !important;
|
30 |
+
}
|
31 |
+
|
32 |
+
.ajax-load-more code{
|
33 |
+
background: #fcf3d0;
|
34 |
+
}
|
35 |
+
.ajax-load-more p{
|
36 |
+
display: block;
|
37 |
+
color:#666;
|
38 |
+
width: 100%;
|
39 |
+
display: block;
|
40 |
+
clear: both;
|
41 |
+
text-transform: none;
|
42 |
+
padding: 0;
|
43 |
+
margin:0 0 15px;
|
44 |
+
}
|
45 |
+
|
46 |
+
.ajax-load-more p,
|
47 |
+
.ajax-load-more li,
|
48 |
+
.ajax-load-more input,
|
49 |
+
.ajax-load-more textarea,
|
50 |
+
.ajax-load-more label{
|
51 |
+
font-size: 14px;
|
52 |
+
}
|
53 |
+
|
54 |
+
.ajax-load-more p.highlight{
|
55 |
+
background-color: #fffbd4;
|
56 |
+
color: #333;
|
57 |
+
padding: 5px 10px;
|
58 |
+
border-radius: 3px;
|
59 |
+
margin: -5px 0 10px;
|
60 |
+
}
|
61 |
+
|
62 |
+
.ajax-load-more h1{
|
63 |
+
font-weight: 400;
|
64 |
+
}
|
65 |
+
.ajax-load-more h1,
|
66 |
+
.ajax-load-more h3,
|
67 |
+
.ajax-load-more h4{
|
68 |
+
color:#444;
|
69 |
+
margin-top: 0;
|
70 |
+
}
|
71 |
+
.ajax-load-more h4 + p{
|
72 |
+
margin-top: -6px;
|
73 |
+
}
|
74 |
+
.ajax-load-more p.small{
|
75 |
+
font-size: 12px;
|
76 |
+
margin-top: -10px;
|
77 |
+
opacity: 0.7;
|
78 |
+
}
|
79 |
+
|
80 |
+
/* Expand Collapse Headings */
|
81 |
+
.ajax-load-more h3.heading{
|
82 |
+
font-weight: 600;
|
83 |
+
padding: 0 0 0 25px !important;
|
84 |
+
line-height: normal !important;
|
85 |
+
margin: 0 0 5px !important;
|
86 |
+
color: #444;
|
87 |
+
cursor: pointer;
|
88 |
+
width: 100%;
|
89 |
+
position: relative;
|
90 |
+
font-size: 16px;
|
91 |
+
}
|
92 |
+
.ajax-load-more h3.heading:hover:after{
|
93 |
+
color: #f05452;
|
94 |
+
}
|
95 |
+
|
96 |
+
.ajax-load-more h3.heading:after{
|
97 |
+
font-family: 'FontAwesome';
|
98 |
+
content: '\f056';
|
99 |
+
color:#e1e1e1;
|
100 |
+
font-size: 16px;
|
101 |
+
position: absolute;
|
102 |
+
left: 0;
|
103 |
+
top: 3px;
|
104 |
+
height: 20px;
|
105 |
+
width: 20px;
|
106 |
+
}
|
107 |
+
.ajax-load-more h3.heading.open:after{
|
108 |
+
content:'\f055';
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
+
.ajax-load-more ul{
|
113 |
+
padding: 0;
|
114 |
+
margin: 0;
|
115 |
+
list-style: none;
|
116 |
+
}
|
117 |
+
#alm-builder li,
|
118 |
+
.forceColors li{
|
119 |
+
padding: 0 5% 0 0;
|
120 |
+
margin: 0 0 5px;
|
121 |
+
width: 50%;
|
122 |
+
clear: both;
|
123 |
+
display: inline-block;
|
124 |
+
overflow: visible;
|
125 |
+
}
|
126 |
+
|
127 |
+
|
128 |
+
.ajax-load-more label,
|
129 |
+
.ajax-load-more input,
|
130 |
+
.ajax-load-more select,
|
131 |
+
.ajax-load-more textarea{
|
132 |
+
font-size: 14px;
|
133 |
+
padding: 5px 8px;
|
134 |
+
width: auto;
|
135 |
+
display: inline-block;
|
136 |
+
clear: both;
|
137 |
+
border-radius: 3px;
|
138 |
+
color: #666;
|
139 |
+
}
|
140 |
+
.ajax-load-more label{
|
141 |
+
padding: 5px 0;
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
.row.checkboxes{}
|
146 |
+
.row.checkboxes input,
|
147 |
+
.row.checkboxes label{
|
148 |
+
float: left;
|
149 |
+
width: auto;
|
150 |
+
margin-right: 10px;
|
151 |
+
padding: 0;
|
152 |
+
clear: none;
|
153 |
+
}
|
154 |
+
.ajax-load-more input[type=text]{
|
155 |
+
padding: 10px;
|
156 |
+
border: 1px solid #ccc;
|
157 |
+
width: 50%;
|
158 |
+
}
|
159 |
+
.ajax-load-more input[type=text]:focus{
|
160 |
+
border-color: #999;
|
161 |
+
box-shadow: 0 0 3px #ccc;
|
162 |
+
}
|
163 |
+
|
164 |
+
.row.checkboxes label{
|
165 |
+
margin-right: 5px;
|
166 |
+
}
|
167 |
+
|
168 |
+
|
169 |
+
/* --------------------------------------------------------------------------- */
|
170 |
+
/* Row */
|
171 |
+
/* --------------------------------------------------------------------------- */
|
172 |
+
|
173 |
+
.ajax-load-more .row{
|
174 |
+
padding: 15px 0 0;
|
175 |
+
margin: 15px 0 0;
|
176 |
+
height: auto;
|
177 |
+
width: 100%;
|
178 |
+
display: block;
|
179 |
+
overflow: visible;
|
180 |
+
clear: both;
|
181 |
+
border-top: 1px solid #efefef;
|
182 |
+
}
|
183 |
+
|
184 |
+
.admin.ajax-load-more .row{
|
185 |
+
border-color: #efefef;
|
186 |
+
}
|
187 |
+
.admin.ajax-load-more .row:first-child{
|
188 |
+
margin: 0;
|
189 |
+
padding-top: 0;
|
190 |
+
border-top: none;
|
191 |
+
}
|
192 |
+
|
193 |
+
.ajax-load-more .intro{
|
194 |
+
height: auto;
|
195 |
+
width: 100%;
|
196 |
+
display: block;
|
197 |
+
overflow: hidden;
|
198 |
+
}
|
199 |
+
|
200 |
+
.jump-menu{
|
201 |
+
position: absolute;
|
202 |
+
top: 5px;
|
203 |
+
right: 10px;
|
204 |
+
z-index: 2;
|
205 |
+
}
|
206 |
+
.admin.ajax-load-more .jump-menu{
|
207 |
+
display: none;
|
208 |
+
}
|
209 |
+
|
210 |
+
.ajax-load-more .expand-wrap{
|
211 |
+
display: block;
|
212 |
+
}
|
213 |
+
|
214 |
+
.ajax-load-more .section-title{
|
215 |
+
width: 35%;
|
216 |
+
float: left;
|
217 |
+
}
|
218 |
+
.ajax-load-more .section-title p{
|
219 |
+
font-size: 13px !important;
|
220 |
+
padding-left: 25px !important;
|
221 |
+
color: #999;
|
222 |
+
}
|
223 |
+
|
224 |
+
.ajax-load-more .repeaters .section-title,
|
225 |
+
.ajax-load-more .repeaters .row .wrap{
|
226 |
+
width: 100%;
|
227 |
+
float: none;
|
228 |
+
padding: 0;
|
229 |
+
}
|
230 |
+
.ajax-load-more .repeaters .section-title p{
|
231 |
+
padding-left: 0 !important;
|
232 |
+
}
|
233 |
+
|
234 |
+
|
235 |
+
|
236 |
+
.ajax-load-more .row .wrap{
|
237 |
+
padding: 0;
|
238 |
+
margin: 0;
|
239 |
+
border: none;
|
240 |
+
width: 65%;
|
241 |
+
padding-left: 5%;
|
242 |
+
float: left;
|
243 |
+
position: relative;
|
244 |
+
}
|
245 |
+
|
246 |
+
|
247 |
+
/* Shortcode Output */
|
248 |
+
.ajax-load-more .output-wrap{
|
249 |
+
padding: 0 50px 0 15px;
|
250 |
+
margin: 0;
|
251 |
+
position: fixed;
|
252 |
+
bottom: 0;
|
253 |
+
left: 0;
|
254 |
+
background: #FF5A58;
|
255 |
+
border-top: 1px solid #ca5252;
|
256 |
+
-webkit-box-shadow: 0 -5px 5px #efefef;
|
257 |
+
-moz-box-shadow: 0 -5px 5px #efefef;
|
258 |
+
box-shadow: 0 -5px 5px #efefef;
|
259 |
+
width: 100%;
|
260 |
+
display: block;
|
261 |
+
z-index: 1;
|
262 |
+
}
|
263 |
+
.admin.ajax-load-more .output-wrap{
|
264 |
+
position: static;
|
265 |
+
overflow: hidden;
|
266 |
+
margin-top: 20px;
|
267 |
+
border-radius: 2px;
|
268 |
+
border: none;
|
269 |
+
padding: 0;
|
270 |
+
-webkit-box-shadow: none;
|
271 |
+
-moz-box-shadow: none;
|
272 |
+
box-shadow: none;
|
273 |
+
}
|
274 |
+
.ajax-load-more .row .wrap.output{
|
275 |
+
display: block !important;
|
276 |
+
}
|
277 |
+
.ajax-load-more .row .wrap .inner{
|
278 |
+
padding:0 0 20px;
|
279 |
+
}
|
280 |
+
|
281 |
+
.output-wrap .copy{
|
282 |
+
background: #fff;
|
283 |
+
color: #FF5A58;
|
284 |
+
margin: 0;
|
285 |
+
display: inline-block;
|
286 |
+
z-index: 9;
|
287 |
+
padding: 3px 8px;
|
288 |
+
cursor: pointer;
|
289 |
+
border-radius: 2px;
|
290 |
+
position: fixed;
|
291 |
+
right: 10px;
|
292 |
+
bottom: 10px;
|
293 |
+
font-size: 11px;
|
294 |
+
font-weight: 600;
|
295 |
+
text-transform: uppercase;
|
296 |
+
opacity: 0.6;
|
297 |
+
filter: alpha(opacity = 60);
|
298 |
+
}
|
299 |
+
.admin.ajax-load-more .output-wrap .copy{
|
300 |
+
float: right;
|
301 |
+
position: relative;
|
302 |
+
top: -10px;
|
303 |
+
}
|
304 |
+
.output-wrap .copy:hover,
|
305 |
+
.output-wrap .copy:active{
|
306 |
+
opacity: 1;
|
307 |
+
filter: alpha(opacity = 100);
|
308 |
+
}
|
309 |
+
.output-wrap .copy:active{
|
310 |
+
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
|
311 |
+
}
|
312 |
+
|
313 |
+
|
314 |
+
.shortcode-display{
|
315 |
+
float: right;
|
316 |
+
width: 75%;
|
317 |
+
}
|
318 |
+
.admin.ajax-load-more .shortcode-display{
|
319 |
+
float: none;
|
320 |
+
width: 100%;
|
321 |
+
}
|
322 |
+
|
323 |
+
#shortcode_output{
|
324 |
+
border-left: 1px solid #ca5252;
|
325 |
+
padding: 26px 10px 26px 30px;
|
326 |
+
font-family: monospace;
|
327 |
+
font-size: 13px;
|
328 |
+
color: #fff;
|
329 |
+
cursor: pointer;
|
330 |
+
}
|
331 |
+
|
332 |
+
.admin.ajax-load-more #shortcode_output{
|
333 |
+
border: none;
|
334 |
+
padding: 24px;
|
335 |
+
}
|
336 |
+
|
337 |
+
|
338 |
+
#shortcode_output::-moz-selection{
|
339 |
+
background:#fff;
|
340 |
+
color:#ca5252;
|
341 |
+
text-shadow: none;
|
342 |
+
}
|
343 |
+
#shortcode_output::selection {
|
344 |
+
background:#fff;
|
345 |
+
color:#ca5252;
|
346 |
+
text-shadow: none;
|
347 |
+
}
|
348 |
+
|
349 |
+
|
350 |
+
|
351 |
+
/*
|
352 |
+
* Insert Shortcode Button
|
353 |
+
*
|
354 |
+
* @since 1.0
|
355 |
+
*/
|
356 |
+
|
357 |
+
#insert.insert_alm{
|
358 |
+
background: #fff !important;
|
359 |
+
color: #ca5252 !important;
|
360 |
+
border: none;
|
361 |
+
font-size: 13px !important;
|
362 |
+
font-weight: 600;
|
363 |
+
font-family: 'Open Sans', sans-serif;
|
364 |
+
padding: 8px 13px;
|
365 |
+
display: inline-block;
|
366 |
+
text-align: center;
|
367 |
+
margin: 15px 0;
|
368 |
+
float: left;
|
369 |
+
line-height: normal !important;
|
370 |
+
height: auto !important;
|
371 |
+
box-shadow: inset 0 -15px 15px rgba(0, 0, 0, 0.1), 0 1px 0px #ca5252;
|
372 |
+
text-shadow: none !important;
|
373 |
+
max-width: 20%;
|
374 |
+
border-radius: 2px;
|
375 |
+
}
|
376 |
+
.admin.ajax-load-more #insert.insert_alm{
|
377 |
+
display: none;
|
378 |
+
}
|
379 |
+
|
380 |
+
#insert.insert_alm:hover{
|
381 |
+
box-shadow: inset 0 -15px 15px rgba(0, 0, 0, 0.1), 0 0 3px rgba(255, 255, 255, 1);
|
382 |
+
}
|
383 |
+
#insert.insert_alm:active{
|
384 |
+
background: #d0413f !important;
|
385 |
+
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
|
386 |
+
color:#fff !important;
|
387 |
+
}
|
388 |
+
|
389 |
+
.ajax-load-more .clear{
|
390 |
+
clear:both;
|
391 |
+
height:auto;
|
392 |
+
overflow:hidden;
|
393 |
+
width:100%;
|
394 |
+
padding:0;
|
395 |
+
margin:0
|
396 |
+
}
|
397 |
+
|
398 |
+
|
399 |
+
/*
|
400 |
+
* Admin Screens - Setting pages
|
401 |
+
*
|
402 |
+
* @since 1.0
|
403 |
+
*/
|
404 |
+
|
405 |
+
|
406 |
+
|
407 |
+
.form-table label{
|
408 |
+
display: inline-block;
|
409 |
+
clear: both;
|
410 |
+
float: none;
|
411 |
+
}
|
412 |
+
.form-table label + textarea{
|
413 |
+
margin-top: 10px;
|
414 |
+
}
|
415 |
+
.form-table label span{
|
416 |
+
opacity: 0.5;
|
417 |
+
font-size: 13px;
|
418 |
+
font-style: italic;
|
419 |
+
}
|
420 |
+
|
421 |
+
.admin.ajax-load-more .form-table textarea{
|
422 |
+
clear: both;
|
423 |
+
display: inline-block;
|
424 |
+
float: none;
|
425 |
+
width: 100%;
|
426 |
+
}
|
427 |
+
.admin.ajax-load-more textarea.disabled,
|
428 |
+
.admin.ajax-load-more input.disabled{
|
429 |
+
opacity: 0.9;
|
430 |
+
filter: alpha(opacity=90);
|
431 |
+
cursor: default;
|
432 |
+
border:1px solid #ccc;
|
433 |
+
background: #efefef;
|
434 |
+
color: #666;
|
435 |
+
text-shadow: 1px 1px 0 #fff;
|
436 |
+
resize: none;
|
437 |
+
}
|
438 |
+
|
439 |
+
.admin.ajax-load-more input[type=radio],
|
440 |
+
.admin.ajax-load-more input[type=checkbox]{
|
441 |
+
margin-top: 0 !important;
|
442 |
+
}
|
443 |
+
.admin.ajax-load-more .form-table input[type=radio],
|
444 |
+
.admin.ajax-load-more .form-table input[type=checkbox]{
|
445 |
+
margin-top: -4px !important;
|
446 |
+
margin-right: 10px;
|
447 |
+
}
|
448 |
+
|
449 |
+
.admin.ajax-load-more.settings input[type=text]{
|
450 |
+
width: 100%;
|
451 |
+
margin-top:10px;
|
452 |
+
}
|
453 |
+
|
454 |
+
/* Table Overrides */
|
455 |
+
.admin.ajax-load-more.settings .form-table td,
|
456 |
+
.admin.ajax-load-more.settings .form-table th{
|
457 |
+
padding: 20px 0;
|
458 |
+
}
|
459 |
+
|
460 |
+
.admin.ajax-load-more.settings .form-table th{
|
461 |
+
padding-top: 25px;
|
462 |
+
}
|
463 |
+
|
464 |
+
.header-wrap{
|
465 |
+
background: url(../img/alm-logo-48x48.png) no-repeat left 12px;
|
466 |
+
padding-left: 56px;
|
467 |
+
min-height: 48px;
|
468 |
+
overflow: hidden;
|
469 |
+
padding-top: 10px;
|
470 |
+
}
|
471 |
+
.ajax-load-more .header-wrap h2{
|
472 |
+
padding-top: 0;
|
473 |
+
font-size: 26px;
|
474 |
+
}
|
475 |
+
.ajax-load-more .header-wrap h2 + p{
|
476 |
+
margin-top: -2px;
|
477 |
+
opacity: 0.8;
|
478 |
+
}
|
479 |
+
|
480 |
+
.ajax-load-more h2 span{
|
481 |
+
color: #999;
|
482 |
+
background: #fff;
|
483 |
+
padding: 0 5px;
|
484 |
+
border-radius: 2px;
|
485 |
+
font-size: 0.8em;
|
486 |
+
position: relative;
|
487 |
+
top: -2px;
|
488 |
+
}
|
489 |
+
.ajax-load-more p.addon-intro{
|
490 |
+
font-size: 20px !important;
|
491 |
+
line-height: 28px !important;
|
492 |
+
}
|
493 |
+
|
494 |
+
.ajax-load-more h3.add-on-title,
|
495 |
+
.ajax-load-more .alm-sidebar h3{
|
496 |
+
padding: 0 0 10px;
|
497 |
+
margin: 0 0 20px;
|
498 |
+
border-bottom: 1px solid #efefef;
|
499 |
+
}
|
500 |
+
.ajax-load-more h3{
|
501 |
+
margin-bottom: 10px;
|
502 |
+
}
|
503 |
+
.ajax-load-more h3.add-on-title,
|
504 |
+
.ajax-load-more .alm-sidebar h3{
|
505 |
+
padding: 0 0 10px;
|
506 |
+
margin: 0 0 20px;
|
507 |
+
border-bottom: 1px solid #efefef;
|
508 |
+
}
|
509 |
+
.ajax-load-more p.desc{
|
510 |
+
font-size: 12px;
|
511 |
+
padding: 5px 0 8px 24px;
|
512 |
+
}
|
513 |
+
|
514 |
+
.ajax-load-more p.back2top{
|
515 |
+
font-size: 12px;
|
516 |
+
margin:0;
|
517 |
+
padding: 5px 2px 5px 0;
|
518 |
+
text-align: right;
|
519 |
+
}
|
520 |
+
.ajax-load-more p.back2top a{
|
521 |
+
text-decoration: none;
|
522 |
+
}
|
523 |
+
|
524 |
+
.saved-response{
|
525 |
+
font-size: 12px;
|
526 |
+
padding: 8px 0;
|
527 |
+
color:#999;
|
528 |
+
background: none;
|
529 |
+
transition: padding 0.2s ease;
|
530 |
+
float: left;
|
531 |
+
position: relative;
|
532 |
+
top: 12px;
|
533 |
+
left: 15px;
|
534 |
+
}
|
535 |
+
.saved-response.loading{
|
536 |
+
background: url(../img/loader.gif) no-repeat left center;
|
537 |
+
padding-left: 24px;
|
538 |
+
}
|
539 |
+
.saved-response.saved{
|
540 |
+
color: #90be59;
|
541 |
+
}
|
542 |
+
|
543 |
+
input.save-repeater{
|
544 |
+
margin-bottom: 10px !important;
|
545 |
+
}
|
546 |
+
.restore-default{
|
547 |
+
float: right;
|
548 |
+
margin: 19px 20px 0 0;
|
549 |
+
font-size: 12px;
|
550 |
+
}
|
551 |
+
.restore-default a{
|
552 |
+
text-decoration: none;
|
553 |
+
}
|
554 |
+
|
555 |
+
|
556 |
+
table.highlight{
|
557 |
+
background: #fff !important;
|
558 |
+
}
|
559 |
+
|
560 |
+
|
561 |
+
/* Columns */
|
562 |
+
.ajax-load-more .alm-main{
|
563 |
+
width: 67%;
|
564 |
+
float: left;
|
565 |
+
margin-top: 10px;
|
566 |
+
}
|
567 |
+
.ajax-load-more .alm-main .group{
|
568 |
+
background: #fff;
|
569 |
+
padding: 20px;
|
570 |
+
margin: 0 0 20px;
|
571 |
+
border-radius: 3px;
|
572 |
+
border: 1px solid #ccc;
|
573 |
+
-webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
574 |
+
-moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
575 |
+
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
576 |
+
position: relative;
|
577 |
+
display: block;
|
578 |
+
clear: both;
|
579 |
+
}
|
580 |
+
.ajax-load-more .alm-main.full{
|
581 |
+
width: 100%;
|
582 |
+
float: none;
|
583 |
+
}
|
584 |
+
.ajax-load-more .alm-main h2,
|
585 |
+
.ajax-load-more .alm-main h3,
|
586 |
+
.ajax-load-more .alm-main h4{
|
587 |
+
margin-top: 0;
|
588 |
+
}
|
589 |
+
.form-table tr{
|
590 |
+
border-top: 1px solid #efefef;
|
591 |
+
}
|
592 |
+
|
593 |
+
|
594 |
+
/* Repeaters */
|
595 |
+
.repeaters {}
|
596 |
+
|
597 |
+
.repeaters input.save-repeater{
|
598 |
+
float: left;
|
599 |
+
margin: 15px 0 0;
|
600 |
+
clear: none;
|
601 |
+
}
|
602 |
+
.default-repeater textarea{
|
603 |
+
width: 100%;
|
604 |
+
}
|
605 |
+
.repeater-wrap textarea{
|
606 |
+
background: #efefef;
|
607 |
+
}
|
608 |
+
|
609 |
+
|
610 |
+
|
611 |
+
/* Add-ons */
|
612 |
+
#alm-add-ons {}
|
613 |
+
#alm-add-ons .group{
|
614 |
+
overflow: hidden;
|
615 |
+
}
|
616 |
+
#alm-add-ons .wrap{
|
617 |
+
padding-bottom: 60px;
|
618 |
+
}
|
619 |
+
#alm-add-ons .group .section-title p{
|
620 |
+
padding-left: 0 !important;
|
621 |
+
}
|
622 |
+
#alm-add-ons .group a.btn{
|
623 |
+
position: absolute;
|
624 |
+
bottom: 20px;
|
625 |
+
right: 20px;
|
626 |
+
}
|
627 |
+
|
628 |
+
|
629 |
+
/* Add-on Callout! */
|
630 |
+
.call-out{
|
631 |
+
background: #4DD5B0;
|
632 |
+
padding: 13px 100px 13px 12px;
|
633 |
+
border-radius: 3px;
|
634 |
+
margin: 0 0 20px 20px;
|
635 |
+
width: 95%;
|
636 |
+
width: calc(100% - 20px);
|
637 |
+
display: block;
|
638 |
+
color: #fff;
|
639 |
+
font-size: 13px;
|
640 |
+
position: relative;
|
641 |
+
}
|
642 |
+
.default-repeater .call-out{
|
643 |
+
width: 100%;
|
644 |
+
margin: 0 0 0;
|
645 |
+
}
|
646 |
+
.call-out .btn{
|
647 |
+
padding: 5px 8px;
|
648 |
+
display: inline-block;
|
649 |
+
background: #fff;
|
650 |
+
border: 1px solid #5da592;
|
651 |
+
border-radius: 3px;
|
652 |
+
position: absolute;
|
653 |
+
right: 7px;
|
654 |
+
top:7px;
|
655 |
+
color: #387061 !important;
|
656 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
657 |
+
}
|
658 |
+
.call-out a{
|
659 |
+
color: #387061 !important;
|
660 |
+
text-decoration: none;
|
661 |
+
font-weight: 600;
|
662 |
+
}
|
663 |
+
.call-out a:hover{
|
664 |
+
color: #222 !important;
|
665 |
+
}
|
666 |
+
|
667 |
+
|
668 |
+
a.btn{
|
669 |
+
padding: 6px 10px;
|
670 |
+
display: inline-block;
|
671 |
+
background: #4DD5B0;
|
672 |
+
border: 1px solid #5da592;
|
673 |
+
border-radius: 3px;
|
674 |
+
position: static;
|
675 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
676 |
+
text-decoration: none !important;
|
677 |
+
color: #fff !important;
|
678 |
+
font-size: 13px;
|
679 |
+
font-weight: 600;
|
680 |
+
}
|
681 |
+
a.btn:hover,
|
682 |
+
a.btn:hover i{
|
683 |
+
background-color: #935eaf;
|
684 |
+
border-color: #935eaf;
|
685 |
+
color:#fff !important;
|
686 |
+
box-shadow: none;
|
687 |
+
}
|
688 |
+
a.btn:active{
|
689 |
+
background-color: #83519d;
|
690 |
+
border-color: #935eaf;
|
691 |
+
color:#fff !important;
|
692 |
+
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.1);
|
693 |
+
outline: none;
|
694 |
+
}
|
695 |
+
a.btn i{
|
696 |
+
color: #397666;
|
697 |
+
margin-right: 3px;
|
698 |
+
position: relative;
|
699 |
+
top:1px;
|
700 |
+
background: none !important;
|
701 |
+
}
|
702 |
+
|
703 |
+
a.btn.installed{
|
704 |
+
background: #efefef !important;
|
705 |
+
border-color: #ccc !important;
|
706 |
+
color:#666 !important;
|
707 |
+
cursor: default;
|
708 |
+
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.1) !important;
|
709 |
+
}
|
710 |
+
a.btn.installed i,
|
711 |
+
a.btn.installed:hover i{
|
712 |
+
background: none !important;
|
713 |
+
color: #5da592 !important;
|
714 |
+
top: 0;
|
715 |
+
}
|
716 |
+
|
717 |
+
|
718 |
+
|
719 |
+
/* Plugin Sidebar */
|
720 |
+
.ajax-load-more .alm-sidebar{
|
721 |
+
width: 30%;
|
722 |
+
float: right;
|
723 |
+
margin-top: 10px;
|
724 |
+
}
|
725 |
+
.ajax-load-more .alm-sidebar .cta{
|
726 |
+
background: #fff;
|
727 |
+
padding: 20px;
|
728 |
+
border: 1px solid #ccc;
|
729 |
+
border-radius: 3px;
|
730 |
+
-webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
731 |
+
-moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
732 |
+
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
733 |
+
margin: 0 0 20px;
|
734 |
+
overflow: hidden;
|
735 |
+
position: relative;
|
736 |
+
}
|
737 |
+
.ajax-load-more .alm-sidebar .cta.padding-bottom{
|
738 |
+
padding-bottom: 70px;
|
739 |
+
}
|
740 |
+
.ajax-load-more .alm-sidebar h3,
|
741 |
+
.ajax-load-more .alm-sidebar h4{
|
742 |
+
margin-top: 0;
|
743 |
+
}
|
744 |
+
|
745 |
+
.ajax-load-more .alm-sidebar .item{
|
746 |
+
overflow: hidden;
|
747 |
+
padding: 0 0 10px;
|
748 |
+
}
|
749 |
+
.ajax-load-more .alm-sidebar .item h4{
|
750 |
+
margin: 0 0 5px;
|
751 |
+
font-size: 0.9em;
|
752 |
+
text-transform: uppercase;
|
753 |
+
opacity: 0.5;
|
754 |
+
}
|
755 |
+
.ajax-load-more .alm-sidebar h4{
|
756 |
+
margin-bottom: 5px;
|
757 |
+
}
|
758 |
+
.ajax-load-more .alm-sidebar p{
|
759 |
+
line-height: 20px;
|
760 |
+
margin: 0 0 5px;
|
761 |
+
font-size: 13px;
|
762 |
+
}
|
763 |
+
.ajax-load-more .alm-sidebar ul{
|
764 |
+
margin: 0 0 10px;
|
765 |
+
overflow: hidden;
|
766 |
+
}
|
767 |
+
.ajax-load-more .alm-sidebar li{
|
768 |
+
font-size: 13px;
|
769 |
+
margin: 0 0 10px;
|
770 |
+
}
|
771 |
+
.ajax-load-more .alm-sidebar .item i{
|
772 |
+
font-size: 12px;
|
773 |
+
float: left;
|
774 |
+
width: 18px;
|
775 |
+
height: 18px;
|
776 |
+
border-radius: 100%;
|
777 |
+
background: #efefef;
|
778 |
+
line-height: 18px;
|
779 |
+
text-align: center;
|
780 |
+
margin:0 7px 0 0;
|
781 |
+
}
|
782 |
+
|
783 |
+
.ajax-load-more .alm-sidebar .item i.fa-check{
|
784 |
+
background: #90be59;
|
785 |
+
color: #fff;
|
786 |
+
}
|
787 |
+
.ajax-load-more .alm-sidebar .item i.fa-exclamation{
|
788 |
+
background: #c43a3a;
|
789 |
+
color: #fff;
|
790 |
+
}
|
791 |
+
|
792 |
+
|
793 |
+
.ajax-load-more .alm-sidebar a.visit{
|
794 |
+
background: #FF5A58;
|
795 |
+
padding: 12px 20px 16px;
|
796 |
+
position: absolute;
|
797 |
+
bottom: 0;
|
798 |
+
left: 0;
|
799 |
+
width: 100%;
|
800 |
+
display: block;
|
801 |
+
color: #fff !important;
|
802 |
+
z-index: 2;
|
803 |
+
text-decoration: none;
|
804 |
+
}
|
805 |
+
.ajax-load-more .alm-sidebar a.visit i{
|
806 |
+
font-size: 24px;
|
807 |
+
opacity: 0.7;
|
808 |
+
margin: 0 5px 0 0;
|
809 |
+
position: relative;
|
810 |
+
top:3px;
|
811 |
+
}
|
812 |
+
.ajax-load-more .alm-sidebar a.visit:hover{
|
813 |
+
background: #ec4745;
|
814 |
+
}
|
815 |
+
.ajax-load-more .alm-sidebar a.visit:active{
|
816 |
+
background: #db403e;
|
817 |
+
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
|
818 |
+
}
|
819 |
+
|
820 |
+
|
821 |
+
/*
|
822 |
+
* Admin screen media queries
|
823 |
+
*
|
824 |
+
* @since 1.0
|
825 |
+
*/
|
826 |
+
|
827 |
+
@media screen and (max-width: 900px){
|
828 |
+
.ajax-load-more .alm-main,
|
829 |
+
.ajax-load-more .alm-sidebar,
|
830 |
+
.ajax-load-more .alm-main.full {
|
831 |
+
float: none;
|
832 |
+
clear: both;
|
833 |
+
margin: 10px 0 20px;
|
834 |
+
width: 100%;
|
835 |
+
}
|
836 |
+
}
|
837 |
+
|
838 |
+
|
839 |
+
|
840 |
+
|
841 |
+
|
842 |
+
/*
|
843 |
+
* Select2 - form replacement - http://ivaynberg.github.io/select2/
|
844 |
+
*
|
845 |
+
* @since 1.0
|
846 |
+
*/
|
847 |
+
|
848 |
+
.select2-container {
|
849 |
+
position: relative;
|
850 |
+
display: inline-block;
|
851 |
+
zoom: 1;
|
852 |
+
*display: inline;
|
853 |
+
vertical-align: middle;
|
854 |
+
min-width: 50%;
|
855 |
+
}
|
856 |
+
.select2-container a.select2-choice {
|
857 |
+
display: block;
|
858 |
+
height: 40px;
|
859 |
+
padding: 0 10px;
|
860 |
+
overflow: hidden;
|
861 |
+
position: relative;
|
862 |
+
border: 1px solid #ccc;
|
863 |
+
white-space: nowrap;
|
864 |
+
line-height: 40px;
|
865 |
+
color: #444;
|
866 |
+
text-decoration: none;
|
867 |
+
background: #fff;
|
868 |
+
border-radius:2px;
|
869 |
+
-webkit-background-clip: padding-box;
|
870 |
+
-moz-background-clip: padding;
|
871 |
+
background-clip: padding-box;
|
872 |
+
-webkit-touch-callout: none;
|
873 |
+
-webkit-user-select: none;
|
874 |
+
-khtml-user-select: none;
|
875 |
+
-moz-user-select: none;
|
876 |
+
-ms-user-select: none;
|
877 |
+
user-select: none;
|
878 |
+
font-size: 14px;
|
879 |
+
}
|
880 |
+
|
881 |
+
.select2-dropdown-open.select2-container-active .select2-choice {
|
882 |
+
-webkit-border-radius: 4px 4px 0 0;
|
883 |
+
-moz-border-radius: 4px 4px 0 0;
|
884 |
+
border-radius: 4px 4px 0 0;
|
885 |
+
}
|
886 |
+
|
887 |
+
.select2-container.select2-drop-above .select2-choice {
|
888 |
+
background: #fff;
|
889 |
+
-webkit-border-radius: 0 0 4px 4px;
|
890 |
+
-moz-border-radius: 0px 0px 4px 4px;
|
891 |
+
border-radius: 0 0 4px 4px;
|
892 |
+
}
|
893 |
+
|
894 |
+
.select2-container .select2-choice span {
|
895 |
+
margin-right: 30px;
|
896 |
+
margin-left: 2px;
|
897 |
+
display: block;
|
898 |
+
overflow: hidden;
|
899 |
+
white-space: nowrap;
|
900 |
+
color: #666;
|
901 |
+
-ms-text-overflow: ellipsis;
|
902 |
+
-o-text-overflow: ellipsis;
|
903 |
+
text-overflow: ellipsis;
|
904 |
+
}
|
905 |
+
|
906 |
+
.select2-container .select2-choice abbr:hover {
|
907 |
+
background-position: right -11px;
|
908 |
+
cursor: pointer;
|
909 |
+
}
|
910 |
+
|
911 |
+
.select2-drop-mask {
|
912 |
+
position: absolute;
|
913 |
+
left: 0;
|
914 |
+
top: 0;
|
915 |
+
z-index: 8;
|
916 |
+
background-color: #fff;
|
917 |
+
opacity: 0;
|
918 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
919 |
+
/* works in IE 8 */
|
920 |
+
filter: "alpha(opacity=0)";
|
921 |
+
/* expected to work in IE 8 */
|
922 |
+
filter: alpha(opacity = 0);
|
923 |
+
/* IE 4-7 */
|
924 |
+
}
|
925 |
+
|
926 |
+
.select2-drop {
|
927 |
+
overflow: hidden;
|
928 |
+
width: 100%;
|
929 |
+
margin-top: -1px;
|
930 |
+
position: absolute;
|
931 |
+
z-index: 9;
|
932 |
+
top: 100%;
|
933 |
+
background: #fff;
|
934 |
+
color: #000;
|
935 |
+
border: 1px solid #ccc;
|
936 |
+
border-top: 0;
|
937 |
+
border-radius: 0 0 2px 2px;
|
938 |
+
box-shadow: 0 2px 1px rgba(0, 0, 0, 0.1);
|
939 |
+
font-size: 14px;
|
940 |
+
}
|
941 |
+
|
942 |
+
.select2-drop.select2-drop-above {
|
943 |
+
margin-top: 1px;
|
944 |
+
border-top: 1px solid #ccc;
|
945 |
+
border-bottom: 0;
|
946 |
+
border-radius: 2px 2px 0 0;
|
947 |
+
box-shadow: 0 -2px -1px rgba(0, 0, 0, 0.1);
|
948 |
+
}
|
949 |
+
|
950 |
+
.select2-container .select2-choice div {
|
951 |
+
display: block;
|
952 |
+
width: 30px;
|
953 |
+
height: 100%;
|
954 |
+
position: absolute;
|
955 |
+
right: 0;
|
956 |
+
top: 0;
|
957 |
+
}
|
958 |
+
|
959 |
+
.select2-container .select2-choice div b {
|
960 |
+
display: block;
|
961 |
+
width: 100%;
|
962 |
+
height: 100%;
|
963 |
+
background: #fff url(../img/bkg-select.png) no-repeat center center;
|
964 |
+
}
|
965 |
+
|
966 |
+
.select2-dropdown-open.select2-container-active div b {
|
967 |
+
display: block;
|
968 |
+
width: 100%;
|
969 |
+
height: 100%;
|
970 |
+
background-color: #fff;
|
971 |
+
}
|
972 |
+
|
973 |
+
.select2-search {
|
974 |
+
display: none;
|
975 |
+
}
|
976 |
+
|
977 |
+
/* results UL */
|
978 |
+
.select2-results {
|
979 |
+
max-height: 200px;
|
980 |
+
padding: 0 0 0 0;
|
981 |
+
margin: 0 0 0 0;
|
982 |
+
position: relative;
|
983 |
+
overflow-x: hidden;
|
984 |
+
overflow-y: auto;
|
985 |
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
986 |
+
}
|
987 |
+
|
988 |
+
.select2-results li {
|
989 |
+
list-style: none;
|
990 |
+
display: block;
|
991 |
+
background-image: none;
|
992 |
+
padding: 6px 10px;
|
993 |
+
margin: 0;
|
994 |
+
border-top: 1px solid #efefef;
|
995 |
+
color: #666;
|
996 |
+
width: auto;
|
997 |
+
}
|
998 |
+
|
999 |
+
.select2-results li.select2-result-with-children > .select2-result-label {
|
1000 |
+
font-weight: bold;
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
.select2-results .select2-result-label {
|
1004 |
+
margin: 0;
|
1005 |
+
cursor: pointer;
|
1006 |
+
min-height: 1em;
|
1007 |
+
-webkit-touch-callout: none;
|
1008 |
+
-webkit-user-select: none;
|
1009 |
+
-khtml-user-select: none;
|
1010 |
+
-moz-user-select: none;
|
1011 |
+
-ms-user-select: none;
|
1012 |
+
user-select: none;
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
.select2-results .select2-highlighted {
|
1016 |
+
background: #efefef;
|
1017 |
+
color:#ca5252;
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
.select2-results .select2-highlighted:active {
|
1021 |
+
background: #fff;
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
.select2-results li em {
|
1025 |
+
background: #feffde;
|
1026 |
+
font-style: normal;
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
.select2-results .select2-highlighted em {
|
1030 |
+
background: transparent;
|
1031 |
+
}
|
1032 |
+
|
1033 |
+
.select2-results .select2-highlighted ul {
|
1034 |
+
background: white;
|
1035 |
+
color: #000;
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
.select2-results .select2-no-results,
|
1039 |
+
.select2-results .select2-searching,
|
1040 |
+
.select2-results .select2-selection-limit {
|
1041 |
+
background: #f4f4f4;
|
1042 |
+
display: list-item;
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
/*
|
1046 |
+
disabled look for disabled choices in the results dropdown
|
1047 |
+
*/
|
1048 |
+
.select2-results .select2-disabled.select2-highlighted {
|
1049 |
+
color: #666;
|
1050 |
+
background: #f4f4f4;
|
1051 |
+
display: list-item;
|
1052 |
+
cursor: default;
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
.select2-results .select2-disabled {
|
1056 |
+
background: #f4f4f4;
|
1057 |
+
display: list-item;
|
1058 |
+
cursor: default;
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
.select2-results .select2-selected {
|
1062 |
+
display: none;
|
1063 |
+
}
|
1064 |
+
|
1065 |
+
.select2-more-results {
|
1066 |
+
background: #f4f4f4;
|
1067 |
+
display: list-item;
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
/* disabled styles */
|
1071 |
+
.select2-container.select2-container-disabled .select2-choice {
|
1072 |
+
background-color: #f4f4f4;
|
1073 |
+
background-image: none;
|
1074 |
+
border: 1px solid #ddd;
|
1075 |
+
cursor: default;
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
.select2-container.select2-container-disabled .select2-choice div {
|
1079 |
+
background-color: #f4f4f4;
|
1080 |
+
background-image: none;
|
1081 |
+
border-left: 0;
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
.select2-container.select2-container-disabled .select2-choice abbr {
|
1085 |
+
display: none;
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
.select2-offscreen {
|
1089 |
+
border: 0;
|
1090 |
+
clip: rect(0 0 0 0);
|
1091 |
+
height: 1px;
|
1092 |
+
margin: -1px;
|
1093 |
+
overflow: hidden;
|
1094 |
+
padding: 0;
|
1095 |
+
position: absolute;
|
1096 |
+
width: 1px;
|
1097 |
+
}
|
1098 |
+
|
admin/editor-build.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Ajax Load More Shortcode Builder</title>
|
5 |
+
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
|
6 |
+
<link rel="stylesheet" src="<?php echo includes_url($path); ?>js/tinymce/themes/advanced/skins/wp_theme/dialog.css"></link>
|
7 |
+
<link rel="stylesheet" href="<?php echo ALM_ADMIN_URL; ?>css/admin.css" />
|
8 |
+
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js"></script>
|
9 |
+
<script type="text/javascript" src="<?php echo includes_url('/js/tinymce/tiny_mce_popup.js'); ?>"></script>
|
10 |
+
<script type="text/javascript">
|
11 |
+
// ****** Build Button Shortcode ****** //
|
12 |
+
var AjaxLoadMoreModal = {
|
13 |
+
local_ed : 'ed',
|
14 |
+
init : function(ed) {
|
15 |
+
AjaxLoadMoreModal.local_ed = ed;
|
16 |
+
tinyMCEPopup.resizeToInnerSize();
|
17 |
+
},
|
18 |
+
insert : function insertButton(ed) {
|
19 |
+
// Try and remove existing style / blockquote
|
20 |
+
tinyMCEPopup.execCommand('mceRemoveNode', false, null);
|
21 |
+
|
22 |
+
// setup the output of our shortcode to show in the wp editor
|
23 |
+
output = $('#shortcode_output').text();
|
24 |
+
|
25 |
+
tinyMCEPopup.execCommand('mceInsertContent', false, output);
|
26 |
+
// Return
|
27 |
+
tinyMCEPopup.close();
|
28 |
+
}
|
29 |
+
};
|
30 |
+
tinyMCEPopup.onInit.add(AjaxLoadMoreModal.init, AjaxLoadMoreModal);
|
31 |
+
</script>
|
32 |
+
</head>
|
33 |
+
<body>
|
34 |
+
<div id="alm-container" class="ajax-load-more">
|
35 |
+
<select class="jump-menu">
|
36 |
+
<option value="null" selected="selected">-- <?php _e('Jump to section', ALM_NAME); ?> --</option>
|
37 |
+
</select>
|
38 |
+
<p class="intro"><?php _e('Create your own Ajax Load More shortcode by adjusting the values below:', ALM_NAME); ?></p>
|
39 |
+
<?php include (ALM_PATH . '/admin/includes/shortcode-builder.php'); ?>
|
40 |
+
<div class="output-wrap">
|
41 |
+
<a href="javascript:AjaxLoadMoreModal.insert(AjaxLoadMoreModal.local_ed)" id="insert" class="insert_alm"><i class="fa fa-chevron-circle-right"></i> <?php _e('Insert Shortcode', ALM_NAME); ?></a>
|
42 |
+
<div class="shortcode-display">
|
43 |
+
<div id="shortcode_output"></div>
|
44 |
+
<span class="copy"><?php _e('Copy', ALM_NAME); ?></span>
|
45 |
+
</div>
|
46 |
+
</div
|
47 |
+
</div>
|
48 |
+
<script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/select2.min.js"></script>
|
49 |
+
<script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/shortcode-builder.js"></script>
|
50 |
+
</body>
|
51 |
+
</html>
|
admin/editor.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* Create shortcode builder button */
|
3 |
+
|
4 |
+
add_action('init','alm_editor_init');
|
5 |
+
|
6 |
+
function alm_editor_init() {
|
7 |
+
wp_enqueue_script( 'jquery' );
|
8 |
+
}
|
9 |
+
|
10 |
+
|
11 |
+
add_action('wp_ajax_fscb', 'alm_ajax_tinymce' );
|
12 |
+
function alm_ajax_tinymce(){
|
13 |
+
// check for rights
|
14 |
+
if ( ! current_user_can('edit_pages') && ! current_user_can('edit_posts') )
|
15 |
+
die( __("You are not allowed to be here", ALM_NAME) );
|
16 |
+
|
17 |
+
$window = dirname(__FILE__) . '/editor-build.php';
|
18 |
+
include_once( $window );
|
19 |
+
|
20 |
+
die();
|
21 |
+
}
|
22 |
+
|
23 |
+
// registers the buttons for use
|
24 |
+
function alm_friendly_buttons($buttons) {
|
25 |
+
array_push($buttons, 'alm_shortcode_button');
|
26 |
+
return $buttons;
|
27 |
+
}
|
28 |
+
|
29 |
+
// filters the tinyMCE buttons and adds our custom buttons
|
30 |
+
function alm_shortcode_buttons() {
|
31 |
+
// Don't bother doing this stuff if the current user lacks permissions
|
32 |
+
if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
|
33 |
+
return;
|
34 |
+
// Add only in Rich Editor mode
|
35 |
+
if ( get_user_option('rich_editing') == 'true') {
|
36 |
+
// filter the tinyMCE buttons and add our own
|
37 |
+
add_filter("mce_external_plugins", "alm_tinymce_plugin");
|
38 |
+
add_filter('mce_buttons', 'alm_friendly_buttons');
|
39 |
+
}
|
40 |
+
}
|
41 |
+
// init process for button control
|
42 |
+
add_action('admin_head', 'alm_shortcode_buttons');
|
43 |
+
|
44 |
+
// add the button to the tinyMCE bar
|
45 |
+
function alm_tinymce_plugin($plugin_array) {
|
46 |
+
$plugin_array['alm_shortcode_button'] = plugins_url( '/js/editor-btn.js' , __FILE__ );
|
47 |
+
return $plugin_array;
|
48 |
+
}
|
admin/img/add-ons/repeater-add-ons.jpg
ADDED
Binary file
|
admin/img/add-ons/shortcode-editor.jpg
ADDED
Binary file
|
admin/img/add.png
ADDED
Binary file
|
admin/img/alm-logo-16x16.png
ADDED
Binary file
|
admin/img/alm-logo-32x32.png
ADDED
Binary file
|
admin/img/alm-logo-48x48.png
ADDED
Binary file
|
admin/img/bkg-select.png
ADDED
Binary file
|
admin/img/loader.gif
ADDED
Binary file
|
admin/includes/cta/about.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="cta padding-bottom">
|
2 |
+
<h3>About the plugin</h3>
|
3 |
+
<p>Ajax Load More is a simple yet very powerful solution for loading WordPress posts and page via AJAX requests.</p>
|
4 |
+
<br/>
|
5 |
+
<p><strong>View my other projects:</strong></p>
|
6 |
+
<ul>
|
7 |
+
<li><strong><a href="https://github.com/dcooney/flexpanel" target="blank">FlexPanel</a></strong><br/>A responsive scrolling panel navigation for mobile and desktop</li>
|
8 |
+
<li><strong><a href="https://github.com/dcooney/wordpress-ajax-login" target="blank">WordPress Ajax Login</a></strong><br/>A simple solution for WordPress logins</li>
|
9 |
+
<li><strong><a href="http://connekthq.com" target="blank">Connekt Media</a></strong><br/>A digital creation company</li>
|
10 |
+
</ul>
|
11 |
+
<br/>
|
12 |
+
<p>Developed by Darren Cooney</p>
|
13 |
+
<a href="http://twitter.com/kaptonkaos" target="blank" class="visit"><i class="fa fa-twitter"></i> Follow on Twitter</a>
|
14 |
+
</div>
|
admin/includes/cta/config.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="cta">
|
2 |
+
<h3><?php _e('Plugin Configurations', ALM_NAME); ?></h3>
|
3 |
+
<div class="item">
|
4 |
+
<h4><?php _e('Plugin Version', ALM_NAME); ?></h4>
|
5 |
+
<?php
|
6 |
+
echo '<p>'. ALM_VERSION .'</p>';
|
7 |
+
?>
|
8 |
+
</div>
|
9 |
+
<div class="item">
|
10 |
+
<h4><?php _e('Release Date', ALM_NAME); ?></h4>
|
11 |
+
<?php
|
12 |
+
echo '<p>'. ALM_RELEASE .'</p>';
|
13 |
+
?>
|
14 |
+
</div>
|
15 |
+
</div>
|
admin/includes/cta/extend.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<div class="clear"></div><div class="call-out"><?php _e('Unlock additional repeaters with the <a href="?page=ajax-load-more-add-ons" target="_parent">Custom Repeaters add-on</a>', ALM_NAME); ?> <a class="btn" href="http://connekthq.com/ajax-load-more/custom-repeaters" target="_blank"><?php _e('More Info', ALM_NAME); ?></a></div>
|
admin/includes/cta/resources.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="cta padding-bottom">
|
2 |
+
<h3><?php _e('Help/Resources', ALM_NAME); ?></h3>
|
3 |
+
<ul>
|
4 |
+
<li><a target="_blank" href="http://cnkt.ca/ajax-load-more/">Ajax Load More Demo</a></li>
|
5 |
+
<li><a target="_blank" href="https://github.com/dcooney/wordpress-ajax-load-more/blob/master/README.md">Readme</a></li>
|
6 |
+
<li><a target="_blank" href="https://github.com/dcooney/wordpress-ajax-load-more/issues?state=open">Report Issue</a></li>
|
7 |
+
</ul>
|
8 |
+
<?php _e('<a href="https://github.com/dcooney/wordpress-ajax-load-more" target="blank" class="visit"><i class="fa fa-github"></i> Latest build on Github</a>', ALM_NAME); ?>
|
9 |
+
</div>
|
admin/includes/cta/writeable.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="cta">
|
2 |
+
<h3><?php _e('Read/Write Access', ALM_NAME); ?></h3>
|
3 |
+
<div class="item">
|
4 |
+
<?php
|
5 |
+
//Test server for write capabilities
|
6 |
+
$filename = ALM_PATH .'admin/includes/test-writable.txt';
|
7 |
+
if (is_writable($filename))
|
8 |
+
echo '<p><i class="fa fa-check"></i><strong>'.__('Write Access Enabled!').'</strong></p><p class="desc">Good news! Your server is configured to read and write files within the plugin directory.';
|
9 |
+
else
|
10 |
+
echo '<p><i class="fa fa-exclamation"></i><strong>'.__('Write Access Denied!').'</strong></p><p class="desc">Write access on your server is required in order to save repeater data. Please contact your hosting provider or site administrator for more information.';
|
11 |
+
?>
|
12 |
+
</div>
|
13 |
+
</div>
|
admin/includes/shortcode-builder.php
ADDED
@@ -0,0 +1,306 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
<?php
|
4 |
+
// List available repeaters
|
5 |
+
echo '<div class="row repeater" id="alm-repeaters">';
|
6 |
+
echo '<h3 class="heading">'.__('Repeater', ALM_NAME). '</h3>';
|
7 |
+
echo '<div class="expand-wrap">';
|
8 |
+
echo '<div class="section-title">';
|
9 |
+
echo '<p>'.__('Select a <a href="?page=ajax-load-more-repeaters">repeater</a> from drop menu.', ALM_NAME). '</p>';
|
10 |
+
echo '</div>';
|
11 |
+
echo '<div class="wrap"><div class="inner">';
|
12 |
+
echo '<select name="repeater-select" id="repeater-select">';
|
13 |
+
echo '<option name="default" id="chk-default" value="default" selected="selected">Default</option>';
|
14 |
+
if (has_action('alm_get_custom_repeaters')) {
|
15 |
+
do_action('alm_get_custom_repeaters');
|
16 |
+
}
|
17 |
+
echo '</select>';
|
18 |
+
|
19 |
+
echo '</div></div>';
|
20 |
+
if (!has_action('alm_get_custom_repeaters')) {
|
21 |
+
include( 'cta/extend.php');
|
22 |
+
}
|
23 |
+
echo '</div>';
|
24 |
+
echo '</div>';
|
25 |
+
|
26 |
+
|
27 |
+
// List registered post_types
|
28 |
+
$types = get_post_types();
|
29 |
+
if($types){
|
30 |
+
echo '<div class="row checkboxes post_types" id="alm-post-types">';
|
31 |
+
echo '<h3 class="heading">'.__('Post Types', ALM_NAME). '</h3>';
|
32 |
+
echo '<div class="expand-wrap">';
|
33 |
+
echo '<div class="section-title">';
|
34 |
+
echo '<p>'.__('Select Post Types to query.', ALM_NAME). '</p>';
|
35 |
+
echo '</div>';
|
36 |
+
echo '<div class="wrap"><div class="inner"><ul>';
|
37 |
+
foreach( $types as $type ){
|
38 |
+
$typeobj = get_post_type_object( $type );
|
39 |
+
$name = $typeobj->name;
|
40 |
+
if( $name != 'revision' && $name != 'attachment' && $name != 'nav_menu_item' && $name != 'acf'){
|
41 |
+
echo '<li><input type="checkbox" name="chk-'.$typeobj->name.'" id="chk-'.$typeobj->name.'" data-type="'.$typeobj->name.'"><label for="chk-'.$typeobj->name.'">'.$typeobj->labels->singular_name.'</label></li>';
|
42 |
+
}
|
43 |
+
}
|
44 |
+
echo '</ul></div></div>';
|
45 |
+
echo '</div>';
|
46 |
+
echo '</div>';
|
47 |
+
}
|
48 |
+
|
49 |
+
// List Categories
|
50 |
+
$cats = get_categories();
|
51 |
+
if($cats){
|
52 |
+
echo '<div class="row checkboxes categories" id="alm-categories">';
|
53 |
+
echo '<h3 class="heading">' . __('Category', ALM_NAME) . '</h3>';
|
54 |
+
echo '<div class="expand-wrap">';
|
55 |
+
echo '<div class="section-title">';
|
56 |
+
echo '<p>' . __('Select a Category to query(by slug) from the drop menu.', ALM_NAME) . '</p>';
|
57 |
+
echo '</div>';
|
58 |
+
echo '<div class="wrap"><div class="inner"><select name="category-select" id="category-select">';
|
59 |
+
echo '<option value="" selected="selected">-- ' . __('Select Category', ALM_NAME) . ' --</option>';
|
60 |
+
foreach( $cats as $cat ){
|
61 |
+
echo '<option name="chk-'.$cat->slug.'" id="chk-'.$cat->slug.'" value="'.$cat->slug.'">'.$cat->name.'</option>';
|
62 |
+
}
|
63 |
+
echo '</select></div></div>';
|
64 |
+
echo '</div>';
|
65 |
+
echo '</div>';
|
66 |
+
}
|
67 |
+
|
68 |
+
// List Categories
|
69 |
+
$tags = get_tags();
|
70 |
+
if($tags){
|
71 |
+
echo '<div class="row checkboxes tags" id="alm-tags">';
|
72 |
+
echo '<h3 class="heading">' . __('Tag', ALM_NAME) . '</h3>';
|
73 |
+
echo '<div class="expand-wrap">';
|
74 |
+
echo '<div class="section-title">';
|
75 |
+
echo '<p>' . __('Select a Tag to query(by slug) from the drop menu.', ALM_NAME) . '</p>';
|
76 |
+
echo '</div>';
|
77 |
+
echo '<div class="wrap"><div class="inner"><select name="tag-select" id="tag-select">';
|
78 |
+
echo '<option value="" selected="selected">-- ' . __('Select Tag', ALM_NAME) . ' --</option>';
|
79 |
+
foreach( $tags as $tag ){
|
80 |
+
echo '<option name="chk-'.$tag->slug.'" id="chk-'.$tag->slug.'" value="'.$tag->slug.'">'.$tag->name.'</option>';
|
81 |
+
}
|
82 |
+
echo '</select></div></div>';
|
83 |
+
echo '</div>';
|
84 |
+
echo '</div>';
|
85 |
+
}
|
86 |
+
|
87 |
+
// List Authors
|
88 |
+
$authors = get_users();
|
89 |
+
if($authors){
|
90 |
+
echo '<div class="row checkboxes authors" id="alm-tags">';
|
91 |
+
echo '<h3 class="heading">' . __('Author', ALM_NAME) . '</h3>';
|
92 |
+
echo '<div class="expand-wrap">';
|
93 |
+
echo '<div class="section-title">';
|
94 |
+
echo '<p>' . __('Select an Author to query(by ID) from the drop menu.', ALM_NAME) . '</p>';
|
95 |
+
echo '</div>';
|
96 |
+
echo '<div class="wrap"><div class="inner"><select name="author-select" id="author-select">';
|
97 |
+
echo '<option value="" selected="selected">-- ' . __('Select Author', ALM_NAME) . ' --</option>';
|
98 |
+
foreach( $authors as $author ){
|
99 |
+
echo '<option name="chk-'.$author->user_login.'" id="chk-'.$author->user_login.'" value="'.$author->user_login.'">'.$author->display_name.'</option>';
|
100 |
+
}
|
101 |
+
echo '</select></div></div>';
|
102 |
+
echo '</div>';
|
103 |
+
echo '</div>';
|
104 |
+
}
|
105 |
+
?>
|
106 |
+
|
107 |
+
<!-- Search term -->
|
108 |
+
<div class="row input search-term" id="alm-search">
|
109 |
+
<h3 class="heading"><?php _e('Search Term', ALM_NAME); ?></h3>
|
110 |
+
<div class="expand-wrap">
|
111 |
+
<div class="section-title">
|
112 |
+
<p><?php _e('Enter a search term to query.', ALM_NAME); ?></p>
|
113 |
+
</div>
|
114 |
+
<div class="wrap">
|
115 |
+
<div class="inner">
|
116 |
+
<input name="search-term" type="text" id="search-term" value="" placeholder="<?php _e('Enter search term', ALM_NAME); ?>">
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
|
122 |
+
<!-- Exclude posts -->
|
123 |
+
<div class="row input exclude" id="alm-exclude-posts">
|
124 |
+
<h3 class="heading"><?php _e('Exclude Posts', ALM_NAME); ?></h3>
|
125 |
+
<div class="expand-wrap">
|
126 |
+
<div class="section-title">
|
127 |
+
<p><?php _e('A comma separated list of post ID\'s to exclude from query.', ALM_NAME); ?></p>
|
128 |
+
</div>
|
129 |
+
<div class="wrap">
|
130 |
+
<div class="inner">
|
131 |
+
<input name="exclude-posts" type="text" id="exclude-posts" value="" placeholder="199, 216, 345, 565">
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<!-- Offset -->
|
138 |
+
<div class="row input offset" id="alm-offset">
|
139 |
+
<h3 class="heading"><?php _e('Post Offset', ALM_NAME); ?></h3>
|
140 |
+
<div class="expand-wrap">
|
141 |
+
<div class="section-title">
|
142 |
+
<p><?php _e('Offset the initial query by selecting a value from the drop menu.', ALM_NAME); ?></p>
|
143 |
+
</div>
|
144 |
+
<div class="wrap">
|
145 |
+
<div class="inner">
|
146 |
+
<select name="offset-select" id="offset-select">
|
147 |
+
<script>
|
148 |
+
var length = 10,
|
149 |
+
value = '';
|
150 |
+
for(var i = 0; i < length; i++){
|
151 |
+
value += '<option value="'+i+'">'+i+'</option>';
|
152 |
+
}
|
153 |
+
$('#offset-select').append(value);
|
154 |
+
</script>
|
155 |
+
</select>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
|
161 |
+
<!-- Display posts -->
|
162 |
+
<div class="row input posts_per_page" id="alm-post-page">
|
163 |
+
<h3 class="heading"><?php _e('Posts Per Page', ALM_NAME); ?></h3>
|
164 |
+
<div class="expand-wrap">
|
165 |
+
<div class="section-title">
|
166 |
+
<p><?php _e('Select the number of posts to load with each request.', ALM_NAME); ?></p>
|
167 |
+
</div>
|
168 |
+
<div class="wrap">
|
169 |
+
<div class="inner">
|
170 |
+
<select name="display_posts-select" id="display_posts-select">
|
171 |
+
<script>
|
172 |
+
var length = 22,
|
173 |
+
value = '';
|
174 |
+
for(var i = 1; i < length; i++){
|
175 |
+
if(i == 5){
|
176 |
+
value += '<option value="'+i+'" selected="selected">'+i+'</option>';
|
177 |
+
}else{
|
178 |
+
value += '<option value="'+i+'">'+i+'</option>';
|
179 |
+
}
|
180 |
+
}
|
181 |
+
$('#display_posts-select').append(value);
|
182 |
+
</script>
|
183 |
+
</select>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
|
189 |
+
|
190 |
+
<!-- Allow Scrolling Load -->
|
191 |
+
<div class="row checkbox scroll_load" id="alm-scroll">
|
192 |
+
<h3 class="heading"><?php _e('Load Posts on Scroll', ALM_NAME); ?></h3>
|
193 |
+
<div class="expand-wrap">
|
194 |
+
<div class="section-title">
|
195 |
+
<p><?php _e('Load more posts as the user scrolls the page.', ALM_NAME); ?></p>
|
196 |
+
</div>
|
197 |
+
<div class="wrap">
|
198 |
+
<div class="inner">
|
199 |
+
<ul>
|
200 |
+
<li>
|
201 |
+
<input type="radio" name="scroll" value="t" id="scroll_t" checked>
|
202 |
+
<label for="scroll_t"><?php _e('True', ALM_NAME); ?></label>
|
203 |
+
</li>
|
204 |
+
<li>
|
205 |
+
<input type="radio" name="scroll" value="f" id="scroll_f">
|
206 |
+
<label for="scroll_f"><?php _e('False', ALM_NAME); ?></label>
|
207 |
+
</li>
|
208 |
+
</select>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
</div>
|
213 |
+
|
214 |
+
|
215 |
+
<!-- Max Pages -->
|
216 |
+
<div class="row input max_pages" id="alm-max-pages">
|
217 |
+
<h3 class="heading"><?php _e('Max Pages', ALM_NAME); ?></h3>
|
218 |
+
<div class="expand-wrap">
|
219 |
+
<div class="section-title">
|
220 |
+
<p><?php _e('Maximum number of pages to load while scrolling.', ALM_NAME); ?></p>
|
221 |
+
</div>
|
222 |
+
<div class="wrap">
|
223 |
+
<div class="inner">
|
224 |
+
<select name="max-select" id="max-select">
|
225 |
+
<script>
|
226 |
+
var length = 11,
|
227 |
+
value = '';
|
228 |
+
for(var i = 1; i < length; i++){
|
229 |
+
if(i == 5){
|
230 |
+
value += '<option value="'+i+'" selected="selected">'+i+'</option>';
|
231 |
+
}else{
|
232 |
+
value += '<option value="'+i+'">'+i+'</option>';
|
233 |
+
}
|
234 |
+
}
|
235 |
+
value += '<option value="none"><?php _e('Unlimited', ALM_NAME); ?></option>';
|
236 |
+
$('#max-select').append(value);
|
237 |
+
</script>
|
238 |
+
</select>
|
239 |
+
</div>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
</div>
|
243 |
+
|
244 |
+
|
245 |
+
<!-- Pause Post Loading -->
|
246 |
+
<div class="row checkbox pause_load" id="alm-pause">
|
247 |
+
<h3 class="heading"><?php _e('Pause Loading of Posts', ALM_NAME); ?></h3>
|
248 |
+
<div class="expand-wrap">
|
249 |
+
<div class="section-title">
|
250 |
+
<p><?php _e('Do not load posts until user clicks <em>load</em> button.', ALM_NAME); ?></p>
|
251 |
+
</div>
|
252 |
+
<div class="wrap">
|
253 |
+
<div class="inner">
|
254 |
+
<ul>
|
255 |
+
<li>
|
256 |
+
<input type="radio" name="pause" value="t" id="pause_t">
|
257 |
+
<label for="pause_t"><?php _e('True', ALM_NAME); ?></label>
|
258 |
+
</li>
|
259 |
+
<li>
|
260 |
+
<input type="radio" name="pause" value="f" id="pause_f" checked>
|
261 |
+
<label for="pause_f"><?php _e('False', ALM_NAME); ?></label>
|
262 |
+
</li>
|
263 |
+
</select>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
</div>
|
267 |
+
</div>
|
268 |
+
|
269 |
+
|
270 |
+
<!-- Transition -->
|
271 |
+
<div class="row input transition" id="alm-transition">
|
272 |
+
<h3 class="heading"><?php _e('Transition', ALM_NAME); ?></h3>
|
273 |
+
<div class="expand-wrap">
|
274 |
+
<div class="section-title">
|
275 |
+
<p><?php _e('Select a loading transition from the drop menu.', ALM_NAME); ?></p>
|
276 |
+
</div>
|
277 |
+
<div class="wrap">
|
278 |
+
<div class="inner">
|
279 |
+
<select name="transition-select" id="transition-select">
|
280 |
+
<option value="slide" selected="selected"><?php _e('Slide', ALM_NAME); ?></option>
|
281 |
+
<option value="fade"><?php _e('Fade', ALM_NAME); ?></option>
|
282 |
+
</select>
|
283 |
+
</div>
|
284 |
+
</div>
|
285 |
+
</div>
|
286 |
+
</div>
|
287 |
+
|
288 |
+
|
289 |
+
<!-- Button Text -->
|
290 |
+
<div class="row input btn-label" id="alm-btn-label">
|
291 |
+
<h3 class="heading"><?php _e('Button Label', ALM_NAME); ?></h3>
|
292 |
+
<div class="expand-wrap">
|
293 |
+
<div class="section-title">
|
294 |
+
<p><?php _e('Customize the <em>Load More</em> button label.', ALM_NAME); ?></p>
|
295 |
+
</div>
|
296 |
+
<div class="wrap">
|
297 |
+
<div class="inner">
|
298 |
+
<input name="button-label" type="text" id="button-label" value="<?php _e('Older Posts', ALM_NAME); ?>">
|
299 |
+
</div>
|
300 |
+
</div>
|
301 |
+
</div>
|
302 |
+
</div>
|
303 |
+
<div class="clear"></div>
|
304 |
+
|
305 |
+
|
306 |
+
|
admin/includes/test-writable.txt
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
test.txt
|
admin/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
?>
|
admin/js/editor-btn.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function () {
|
2 |
+
tinymce.create('tinymce.plugins.ajaxloadmore', {
|
3 |
+
init: function (editor, url) {
|
4 |
+
// Register commands
|
5 |
+
var w = document.body.clientWidth / 1.3,
|
6 |
+
h = document.body.clientHeight / 1.3;
|
7 |
+
if(w > 900) w = 900;
|
8 |
+
if(h > 600) h = 600;
|
9 |
+
editor.addCommand('mcebutton', function () {
|
10 |
+
editor.windowManager.open({
|
11 |
+
title: "Ajax load More: Shortcode Builder",
|
12 |
+
file: ajaxurl + '?action=fscb', // file that contains HTML for our modal window
|
13 |
+
width: w, // size of our window
|
14 |
+
height: h , // size of our window
|
15 |
+
inline: 1
|
16 |
+
},
|
17 |
+
{
|
18 |
+
plugin_url: url
|
19 |
+
});
|
20 |
+
});
|
21 |
+
// Register Shortcode Button
|
22 |
+
editor.addButton('alm_shortcode_button', {
|
23 |
+
title: 'Insert Ajax load More',
|
24 |
+
cmd: 'mcebutton',
|
25 |
+
image: url + '/../img/add.png'
|
26 |
+
});
|
27 |
+
|
28 |
+
}
|
29 |
+
});
|
30 |
+
|
31 |
+
// Register plugin
|
32 |
+
tinymce.PluginManager.add('alm_shortcode_button', tinymce.plugins.ajaxloadmore);
|
33 |
+
|
34 |
+
})();
|
admin/js/libs/select2.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
SELECT 2 FORM REPLACEMNT
|
3 |
+
*/
|
4 |
+
(function(a){a.fn.each2===void 0&&a.fn.extend({each2:function(b){for(var c=a([0]),d=-1,e=this.length;e>++d&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})})(jQuery),function(a,b){"use strict";function k(a,b){for(var c=0,d=b.length;d>c;c+=1)if(l(a,b[c]))return c;return-1}function l(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function m(b,c){var d,e,f;if(null===b||1>b.length)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function n(a){return a.outerWidth(!1)-a.width()}function o(c){var d="keyup-change-value";c.bind("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.bind("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function p(c){c.bind("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function q(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function r(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function s(a,b){var c=q(a,function(a){b.trigger("scroll-debounced",a)});b.bind("scroll",function(a){k(a.target,b.get())>=0&&c(a)})}function t(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus(),a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function u(a){a.preventDefault(),a.stopPropagation()}function v(a){a.preventDefault(),a.stopImmediatePropagation()}function w(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function x(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(this))})),b.attr("class",f.join(" "))}function y(a,c,d,e){var f=a.toUpperCase().indexOf(c.toUpperCase()),g=c.length;return 0>f?(d.push(e(a)),b):(d.push(e(a.substring(0,f))),d.push("<span class='select2-match'>"),d.push(e(a.substring(f,f+g))),d.push("</span>"),d.push(e(a.substring(f+g,a.length))),b)}function z(b){var c,d=0,e=null,f=b.quietMillis||100,g=b.url,h=this;return function(i){window.clearTimeout(c),c=window.setTimeout(function(){d+=1;var c=d,f=b.data,j=g,k=b.transport||a.ajax,l=b.type||"GET",m={};f=f?f.call(h,i.term,i.page,i.context):null,j="function"==typeof j?j.call(h,i.term,i.page,i.context):j,null!==e&&e.abort(),b.params&&(a.isFunction(b.params)?a.extend(m,b.params.call(h)):a.extend(m,b.params)),a.extend(m,{url:j,dataType:b.dataType,data:f,type:l,cache:!1,success:function(a){if(!(d>c)){var e=b.results(a,i.page);i.callback(e)}}}),e=k.call(h,m)},f)}}function A(c){var e,f,d=c,g=function(a){return""+a.text};a.isArray(d)&&(f=d,d={results:f}),a.isFunction(d)===!1&&(f=d,d=function(){return f});var h=d();return h.text&&(g=h.text,a.isFunction(g)||(e=d.text,g=function(a){return a[e]})),function(c){var h,e=c.term,f={results:[]};return""===e?(c.callback(d()),b):(h=function(b,d){var f,i;if(b=b[0],b.children){f={};for(i in b)b.hasOwnProperty(i)&&(f[i]=b[i]);f.children=[],a(b.children).each2(function(a,b){h(b,f.children)}),(f.children.length||c.matcher(e,g(f),b))&&d.push(f)}else c.matcher(e,g(b),b)&&d.push(b)},a(d().results).each2(function(a,b){h(b,f.results)}),c.callback(f),b)}}function B(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function C(b){if(a.isFunction(b))return!0;if(!b)return!1;throw Error("formatterName must be a function or a falsy value")}function D(b){return a.isFunction(b)?b():b}function E(b){var c=0;return a.each(b,function(a,b){b.children?c+=E(b.children):c++}),c}function F(a,c,d,e){var h,i,j,k,m,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||1>e.tokenSeparators.length)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(m=e.tokenSeparators[j],i=a.indexOf(m),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+m.length),h.length>0&&(h=e.createSearchChoice(h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(l(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:b}function G(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,i,j;c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},j=a(document),g=function(){var a=1;return function(){return a++}}(),j.bind("mousemove",function(a){i={x:a.pageX,y:a.pageY}}),d=G(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=r(function(){return c.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(D(c.containerCss)),this.container.addClass(D(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){a(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(D(c.dropdownCssClass)),this.dropdown.data("select2",this),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),e.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),p(this.results),this.dropdown.delegate(f,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),s(80,this.results),this.dropdown.delegate(f,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),u(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),u(a))}),o(e),e.bind("keyup-change input paste",this.bind(this.updateResults)),e.bind("focus",function(){e.addClass("select2-focused")}),e.bind("blur",function(){e.removeClass("select2-focused")}),this.dropdown.delegate(f,"mouseup",this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.bind("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(c.element.is(":disabled")||c.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var a=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),a!==b&&(a.container.remove(),a.dropdown.remove(),a.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(c){var d,e,f,g;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,k=this.opts.id,l=this;g=function(d,e,h){var i,j,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),i=0,j=d.length;j>i;i+=1)m=d[i],o=m.disabled===!0,n=!o&&k(m)!==b,p=m.children&&m.children.length>0,q=a("<li></li>"),q.addClass("select2-results-dept-"+h),q.addClass("select2-result"),q.addClass(n?"select2-result-selectable":"select2-result-unselectable"),o&&q.addClass("select2-disabled"),p&&q.addClass("select2-result-with-children"),q.addClass(l.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,l.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a("<ul></ul>"),s.addClass("select2-result-sub"),g(m.children,s,h+1),q.append(s)),q.data("select2-data",m),e.append(q)},g(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(f=c.id,c.id=function(a){return a[f]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(c){var g,h,i,e={results:[],more:!1},f=c.term;i=function(a,b){var d;a.is("option")?c.matcher(f,a.text(),a)&&b.push({id:a.attr("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:l(a.attr("disabled"),"disabled")}):a.is("optgroup")&&(d={text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")},a.children().each2(function(a,b){i(b,d.children)}),d.children.length>0&&b.push(d))},g=d.children(),this.getPlaceholder()!==b&&g.length>0&&(h=g[0],""===a(h).text()&&(g=g.not(h))),g.each2(function(a,b){i(b,e.results)}),c.callback(e)}),c.id=function(a){return a.id},c.formatResultCssClass=function(a){return a.css}):"query"in c||("ajax"in c?(g=c.element.data("ajax-url"),g&&g.length>0&&(c.ajax.url=g),c.query=z.call(c.element,c.ajax)):"data"in c?c.query=A(c.data):"tags"in c&&(c.query=B(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(a){return{id:a,text:a}}),c.initSelection===b&&(c.initSelection=function(d,e){var f=[];a(m(d.val(),c.separator)).each(function(){var d=this,e=this,g=c.tags;a.isFunction(g)&&(g=g()),a(g).each(function(){return l(this.id,d)?(e=this.text,!1):b}),f.push({id:d,text:e})}),e(f)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var b,a=this.opts.element;a.bind("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),b=this.bind(function(){var a,b;a="disabled"!==this.opts.element.attr("disabled"),b="readonly"===this.opts.element.attr("readonly"),a=a&&!b,this.enabled!==a&&(a?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(D(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(D(this.opts.dropdownCssClass))}),a.bind("propertychange.select2 DOMAttrModified.select2",b),"undefined"!=typeof WebKitMutationObserver&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(a){a.forEach(b)}),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){this.enabled||(this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled"))},disable:function(){this.enabled&&(this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled"))},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var o,p,q,b=this.container.offset(),c=this.container.outerHeight(!1),d=this.container.outerWidth(!1),e=this.dropdown.outerHeight(!1),f=a(window).scrollLeft()+a(window).width(),g=a(window).scrollTop()+a(window).height(),h=b.top+c,i=b.left,j=g>=h+e,k=b.top-e>=this.body().scrollTop(),l=this.dropdown.outerWidth(!1),m=f>=i+l,n=this.dropdown.hasClass("select2-drop-above");"static"!==this.body().css("position")&&(o=this.body().offset(),h-=o.top,i-=o.left),n?(p=!0,!k&&j&&(p=!1)):(p=!1,!j&&k&&(p=!0)),m||(i=b.left+d-l),p?(h=b.top-e,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),q=a.extend({top:h,left:i,width:d},D(this.opts.dropdownCss)),this.dropdown.css(q)},shouldOpen:function(){var b;return this.opened()?!1:(b=a.Event("opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){function h(){return{width:Math.max(document.documentElement.scrollWidth,a(window).width()),height:Math.max(document.documentElement.scrollHeight,a(window).height())}}var f,b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body()),f.bind("mousedown touchstart",function(){var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.css(h()),f.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var g=this;this.container.parents().add(window).each(function(){a(this).bind(d+" "+c+" "+e,function(){a("#select2-drop-mask").css(h()),g.positionDropdown()})}),this.focusSearch()},close:function(){if(this.opened()){var b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).unbind(c).unbind(d).unbind(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("close"))}},clearSearch:function(){},getMaximumSelectionSize:function(){return D(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var d,e,f,g,h,i,j,c=this.results;if(e=this.highlight(),!(0>e)){if(0==e)return c.scrollTop(0),b;d=this.findHighlightableChoices(),f=a(d[e]),g=f.offset().top+f.outerHeight(!0),e===d.length-1&&(j=c.find("li.select2-more-results"),j.length>0&&(g=j.offset().top+j.outerHeight(!0))),h=c.offset().top+c.outerHeight(!0),g>h&&c.scrollTop(c.scrollTop()+(g-h)),i=f.offset().top-c.offset().top,0>i&&"none"!=f.css("display")&&c.scrollTop(c.scrollTop()+i)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)"),this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&c.length>d;){d+=b;var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(c){var e,f,d=this.findHighlightableChoices();return 0===arguments.length?k(d.filter(".select2-highlighted")[0],d.get()):(c>=d.length&&(c=d.length-1),0>c&&(c=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),e=a(d[c]),e.addClass("select2-highlighted"),this.ensureHighlightVisible(),f=e.data("select2-data"),f&&this.opts.element.trigger({type:"highlight",val:this.id(f),choice:f}),b)},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),e=this.resultsPage+1,f=this,g=this.search.val(),h=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),this.opts.loadMorePadding>=c&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:g,page:e,context:h,matcher:this.opts.matcher,callback:this.bind(function(c){f.opened()&&(f.opts.populateResults.call(this,a,c.results,{term:g,page:e,context:h}),f.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(f.opts.formatLoadMore(e+1)),window.setTimeout(function(){f.loadMoreIfNeeded()},10)):b.remove(),f.positionDropdown(),f.resultsPage=e,f.context=c.context)})})))},tokenize:function(){},updateResults:function(c){function m(){e.scrollTop(0),d.removeClass("select2-active"),h.positionDropdown()}function n(a){e.html(a),m()}var g,i,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!l(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&C(f.formatSelectionTooBig,"formatSelectionTooBig")))return n("<li class='select2-selection-limit'>"+f.formatSelectionTooBig(o)+"</li>"),b;if(d.val().length<f.minimumInputLength)return C(f.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+f.formatInputTooShort(d.val(),f.minimumInputLength)+"</li>"):n(""),b;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return C(f.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+f.formatInputTooLong(d.val(),f.maximumInputLength)+"</li>"):n(""),b;f.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+f.formatSearching()+"</li>"),d.addClass("select2-active"),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;return this.opened()?(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(null,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return l(h.id(this),h.id(i))}).length&&g.results.unshift(i)),0===g.results.length&&C(f.formatNoMatches,"formatNoMatches")?(n("<li class='select2-no-results'>"+f.formatNoMatches(d.val())+"</li>"),b):(e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&C(f.formatLoadMore,"formatLoadMore")&&(e.append("<li class='select2-more-results'>"+h.opts.escapeMarkup(f.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),m(),this.opts.element.trigger({type:"loaded",data:g}),b)):(this.search.removeClass("select2-active"),b)})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){t(this.search)},selectHighlighted:function(a){var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d&&(this.highlight(b),this.onSelect(d,a))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function c(){var c,d,e,f,g;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(e=d[f].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),e=G(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},disable:function(){this.enabled&&(this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled"))},enable:function(){this.enabled||(this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled"))},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(a.Event("open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),t(this.focusser))},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var d,e=this.container,f=this.dropdown,h=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=d=e.find(".select2-choice"),this.focusser=e.find(".select2-focusser"),this.focusser.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id")),this.search.bind("keydown",this.bind(function(a){if(this.enabled){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return u(a),b;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),u(a),b;case c.TAB:case c.ENTER:return this.selectHighlighted(),u(a),b;case c.ESC:return this.cancel(a),u(a),b}}})),this.search.bind("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.bind("keydown",this.bind(function(a){return!this.enabled||a.which===c.TAB||c.isControl(a)||c.isFunctionKey(a)||a.which===c.ESC?b:this.opts.openOnEnter===!1&&a.which===c.ENTER?(u(a),b):a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter?(this.open(),u(a),b):a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),u(a),b):b})),o(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(a){this.opened()||(this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),u(a))})),d.delegate("abbr","mousedown",this.bind(function(a){this.enabled&&(this.clear(),v(a),this.close(),this.selection.focus())})),d.bind("mousedown",this.bind(function(a){h=!0,this.opened()?this.close():this.enabled&&this.open(),u(a),h=!1})),f.bind("mousedown",this.bind(function(){this.search.focus()})),d.bind("focus",this.bind(function(a){u(a)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(a){var b=this.selection.data("select2-data");b&&(this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),a!==!1&&(this.opts.element.trigger({type:"removed",val:this.id(b),choice:b}),this.triggerChange({removed:b})))},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text())this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder())})}},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments);return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(b,c){var d=b.find(":selected");a.isFunction(c)&&c({id:d.attr("value"),text:d.text(),element:d})}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=l(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&""!==this.select.find("option").first().text()?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(""===this.opts.element.val()&&a!==b){if(this.select&&""!==this.select.find("option:first").text())return;this.selection.find("span").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(a,c,d){var e=0,f=this,g=!0;if(this.findHighlightableChoices().each2(function(a,c){return l(f.id(c.data("select2-data")),f.opts.element.val())?(e=a,!1):b}),d!==!1&&this.highlight(e),c===!0){var h=this.opts.minimumResultsForSearch;g=0>h?!1:E(a.results)>=h,this.showSearch(g)}},showSearch:function(b){this.showSearchInput=b,this.dropdown.find(".select2-search")[b?"removeClass":"addClass"]("select2-search-hidden"),a(this.dropdown,this.container)[b?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(a,b){var c=this.opts.element.val();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),this.close(),b&&b.noFocus||this.selection.focus(),l(c,this.id(a))||this.triggerChange()},updateSelection:function(a){var d,c=this.selection.find("span");this.selection.data("select2-data",a),c.empty(),d=this.opts.formatSelection(a,c),d!==b&&c.append(this.opts.escapeMarkup(d)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.selection.find("abbr").show()},val:function(){var a,c=!1,d=null,e=this;if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find(":selected").each2(function(a,b){return d={id:b.attr("value"),text:b.text(),element:b.get(0)},!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange();else{if(this.opts.initSelection===b)throw Error("cannot call val() if initSelection() is not defined");if(!a&&0!==a)return this.clear(c),c&&this.triggerChange(),b;this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(a&&""!==a?(this.opts.element.val(a?this.id(a):""),this.updateSelection(a)):this.clear(),b)}}),f=G(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments);return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var c=[];a.find(":selected").each2(function(a,b){c.push({id:b.attr("value"),text:b.text(),element:b[0]})}),b(c)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=m(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return l(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},initContainer:function(){var e,d=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(d),this.search.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id")),this.search.bind("input paste",this.bind(function(){this.enabled&&(this.opened()||this.open())})),this.search.bind("keydown",this.bind(function(a){if(this.enabled){if(a.which===c.BACKSPACE&&""===this.search.val()){this.close();var d,f=e.find(".select2-search-choice-focus");if(f.length>0)return this.unselect(f.first()),this.search.width(10),u(a),b;d=e.find(".select2-search-choice:not(.select2-locked)"),d.length>0&&d.last().addClass("select2-search-choice-focus")}else e.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),u(a),b;case c.ENTER:case c.TAB:return this.selectHighlighted(),u(a),b;case c.ESC:return this.cancel(a),u(a),b}if(a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.BACKSPACE&&a.which!==c.ESC){if(a.which===c.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)&&u(a),a.which===c.ENTER&&u(a)}}})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(a){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),a.stopImmediatePropagation()})),this.container.delegate(d,"mousedown",this.bind(function(b){this.enabled&&(a(b.target).closest(".select2-search-choice").length>0||(this.clearPlaceholder(),this.open(),this.focusSearch(),b.preventDefault()))
|
5 |
+
})),this.container.delegate(d,"focus",this.bind(function(){this.enabled&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.clearSearch()},enable:function(){this.enabled||(this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled"))},disable:function(){this.enabled&&(this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0))},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(this.getMaxSearchWidth())):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.opts.element.trigger(a.Event("open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){0>k(e.id(this),c)&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer(a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,d=!c.locked,e=a("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),f=a("<li class='select2-search-choice select2-locked'><div></div></li>"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div")),j!=b&&g.find("div").replaceWith("<div>"+this.opts.escapeMarkup(j)+"</div>"),d&&g.find(".select2-search-choice-close").bind("mousedown",u).bind("click dblclick",this.bind(function(b){this.enabled&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),u(b))})).bind("focus",this.bind(function(){this.enabled&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(a){var c,d,b=this.getVal();if(a=a.closest(".select2-search-choice"),0===a.length)throw"Invalid argument: "+a+". Must be .select2-search-choice";c=a.data("select2-data"),c&&(d=k(this.id(c),b),d>=0&&(b.splice(d,1),this.setVal(b),this.select&&this.postprocessResults()),a.remove(),this.opts.element.trigger({type:"removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))},postprocessResults:function(){var a=this.getVal(),b=this.results.find(".select2-result"),c=this.results.find(".select2-result-with-children"),d=this;b.each2(function(b,c){var e=d.id(c.data("select2-data"));k(e,a)>=0&&(c.addClass("select2-selected"),c.find(".select2-result-selectable").addClass("select2-selected"))}),c.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&d.highlight(0)},getMaxSearchWidth:function(){return this.selection.width()-n(this.search)},resizeSearch:function(){var a,b,c,d,e,f=n(this.search);a=w(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(e)},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),m(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){0>k(this,c)&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},val:function(){var c,d=!1,f=this;if(0===arguments.length)return this.getVal();if(c=arguments[0],arguments.length>1&&(d=arguments[1]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange(),b;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange();else{if(this.opts.initSelection===b)throw Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a(b).map(f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(c){var e,d=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(c||(c=[]),e=a.map(c,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(c),this.clearSearch(),b)}}),a.fn.select2=function(){var d,g,h,i,c=Array.prototype.slice.call(arguments,0),j=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?i=d.element.attr("multiple"):(i=d.multiple||!1,"tags"in d&&(d.multiple=i=!0)),g=i?new f:new e,g.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(0>k(c[0],j))throw"Unknown method: "+c[0];if(h=b,g=a(this).data("select2"),g===b)return;if(h="container"===c[0]?g.container:g[c[0]].apply(g,c.slice(1)),h!==b)return!1}}),h===b?this:h},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return y(a.text,c.term,e,d),e.join("")},formatSelection:function(a){return a?a.text:b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return(""+b).toUpperCase().indexOf((""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:F,escapeMarkup:function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return(a+"").replace(/[&<>"'\/\\]/g,function(a){return b[a[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null}},window.Select2={query:{ajax:z,local:A,tags:B},util:{debounce:q,markMatch:y},"class":{"abstract":d,single:e,multi:f}}}}(jQuery);
|
admin/js/shortcode-builder.js
ADDED
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$(document).ready(function() {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$(".row select").select2({
|
5 |
+
minimumResultsForSearch: '100'
|
6 |
+
});
|
7 |
+
|
8 |
+
var _alm = {},
|
9 |
+
output_div = $('#shortcode_output'),
|
10 |
+
output = '[ajax_load_more]';
|
11 |
+
|
12 |
+
output_div.text(output); //Init the shortcode output
|
13 |
+
|
14 |
+
|
15 |
+
/*
|
16 |
+
* _alm.buildShortcode
|
17 |
+
* Loop sections and build the shortcode
|
18 |
+
*
|
19 |
+
* @since 1.0
|
20 |
+
*/
|
21 |
+
|
22 |
+
_alm.buildShortcode = function(){
|
23 |
+
output = '[ajax_load_more';
|
24 |
+
|
25 |
+
// ---------------------------
|
26 |
+
// - Repeater
|
27 |
+
// ---------------------------
|
28 |
+
|
29 |
+
var repeater = $('.repeater select').val();
|
30 |
+
if(repeater != '' && repeater != undefined && repeater != 'default')
|
31 |
+
output += ' repeater="'+repeater+'"';
|
32 |
+
|
33 |
+
|
34 |
+
// ---------------------------
|
35 |
+
// - Post Types
|
36 |
+
// ---------------------------
|
37 |
+
|
38 |
+
var post_type_count = 0;
|
39 |
+
$('.post_types input[type=checkbox]').each(function(e){
|
40 |
+
if($(this).is(":checked")) {
|
41 |
+
post_type_count++;
|
42 |
+
if(post_type_count>1){
|
43 |
+
output += ', ' + $(this).data('type');
|
44 |
+
}else{
|
45 |
+
if($('.post_types input').hasClass('changed'))
|
46 |
+
output += ' post_type="'+$(this).data('type')+'';
|
47 |
+
}
|
48 |
+
}
|
49 |
+
});
|
50 |
+
if(post_type_count>0)
|
51 |
+
output += '"';
|
52 |
+
// ---------------------------
|
53 |
+
// - Categories
|
54 |
+
// ---------------------------
|
55 |
+
|
56 |
+
var cat = $('.categories select').val();
|
57 |
+
if(cat != '' && cat != undefined)
|
58 |
+
output += ' category="'+cat+'"';
|
59 |
+
|
60 |
+
// ---------------------------
|
61 |
+
// - Tags
|
62 |
+
// ---------------------------
|
63 |
+
|
64 |
+
var tag = $('.tags select').val();
|
65 |
+
if(tag != '' && tag != undefined)
|
66 |
+
output += ' tag="'+tag+'"';
|
67 |
+
|
68 |
+
// ---------------------------
|
69 |
+
// - Authors
|
70 |
+
// ---------------------------
|
71 |
+
|
72 |
+
var author = $('.authors select').val();
|
73 |
+
if(author != '' && author != undefined)
|
74 |
+
output += ' author="'+author+'"';
|
75 |
+
|
76 |
+
|
77 |
+
// ---------------------------
|
78 |
+
// - Search
|
79 |
+
// ---------------------------
|
80 |
+
|
81 |
+
var search = $('.search-term input').val();
|
82 |
+
search = $.trim(search);
|
83 |
+
if(search != '')
|
84 |
+
output += ' search="'+search+'"';
|
85 |
+
|
86 |
+
|
87 |
+
// ---------------------------
|
88 |
+
// - Exclude posts
|
89 |
+
// ---------------------------
|
90 |
+
|
91 |
+
var exclude = $('.exclude input').val();
|
92 |
+
exclude = $.trim(exclude);
|
93 |
+
if(exclude != '')
|
94 |
+
output += ' exclude="'+exclude+'"';
|
95 |
+
|
96 |
+
|
97 |
+
// ---------------------------
|
98 |
+
// - Post Offset
|
99 |
+
// ---------------------------
|
100 |
+
|
101 |
+
var offset = $('.offset select').val();
|
102 |
+
if(offset > 0)
|
103 |
+
output += ' offset="'+offset+'"';
|
104 |
+
|
105 |
+
|
106 |
+
// ---------------------------
|
107 |
+
// - Posts Per Page
|
108 |
+
// ---------------------------
|
109 |
+
|
110 |
+
var posts_per_page = $('.posts_per_page select').val();
|
111 |
+
if(posts_per_page > 0 && posts_per_page != 5 && $('.posts_per_page select').hasClass('changed'))
|
112 |
+
output += ' posts_per_page="'+posts_per_page+'"';
|
113 |
+
|
114 |
+
|
115 |
+
// ---------------------------
|
116 |
+
// - Scrolling
|
117 |
+
// ---------------------------
|
118 |
+
|
119 |
+
var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
|
120 |
+
if(scroll_load == 'f'){
|
121 |
+
$('.row.max_pages').slideUp(100, 'alm_easeInOutQuad');
|
122 |
+
if($('.scroll_load input').hasClass('changed'))
|
123 |
+
output += ' scroll="false"';
|
124 |
+
}else{
|
125 |
+
$('.row.max_pages').slideDown(100, 'alm_easeInOutQuad');
|
126 |
+
if($('.max_pages select').hasClass('changed'))
|
127 |
+
output += ' max_pages="'+$('.max_pages select').val()+'"';
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
|
132 |
+
// ---------------------------
|
133 |
+
// - Pause Loading
|
134 |
+
// ---------------------------
|
135 |
+
|
136 |
+
var pause_load = $('.pause_load input[name=pause]:checked').val();
|
137 |
+
if(pause_load == 't')
|
138 |
+
output += ' pause="true"';
|
139 |
+
|
140 |
+
|
141 |
+
// ---------------------------
|
142 |
+
// - transition
|
143 |
+
// ---------------------------
|
144 |
+
|
145 |
+
var transition = $('.transition select').val();
|
146 |
+
if($('.transition select').hasClass('changed'))
|
147 |
+
output += ' transition="'+transition+'"';
|
148 |
+
|
149 |
+
|
150 |
+
// ---------------------------
|
151 |
+
// - Button Label
|
152 |
+
// ---------------------------
|
153 |
+
|
154 |
+
var btn_lbl = $('.btn-label input').val();
|
155 |
+
btn_lbl = $.trim(btn_lbl);
|
156 |
+
if(btn_lbl != '' && $('.btn-label input').hasClass('changed'))
|
157 |
+
output += ' button_label="'+btn_lbl+'"';
|
158 |
+
|
159 |
+
|
160 |
+
output += ']'; //Close shortcode
|
161 |
+
output_div.text(output);
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
/*
|
166 |
+
* On change events
|
167 |
+
*
|
168 |
+
* @since 1.0
|
169 |
+
*/
|
170 |
+
|
171 |
+
$('.post_types input[type=checkbox]#chk-post').prop('checked', true).addClass('changed'); //Select post by default
|
172 |
+
|
173 |
+
$('.repeater select, .post_types input[type=checkbox], .categories select, .tags select, .authors select, .offset select, .posts_per_page select, .scroll_load input[type=radio], .pause_load input[type=radio], .max_pages select, .transition select').change(function() {
|
174 |
+
$(this).addClass('changed');
|
175 |
+
|
176 |
+
// If post type is not selected, select post.
|
177 |
+
if(!$('.post_types input[type=checkbox]:checked').length > 0){
|
178 |
+
$('.post_types input[type=checkbox]#chk-post').prop('checked', true);
|
179 |
+
}
|
180 |
+
|
181 |
+
_alm.buildShortcode();
|
182 |
+
});
|
183 |
+
$('.search-term input, .exclude input, .btn-label input').keyup(function() {
|
184 |
+
$(this).addClass('changed');
|
185 |
+
_alm.buildShortcode();
|
186 |
+
});
|
187 |
+
|
188 |
+
|
189 |
+
|
190 |
+
/*
|
191 |
+
* Jump to section
|
192 |
+
*
|
193 |
+
* @since 1.0
|
194 |
+
*/
|
195 |
+
|
196 |
+
var jumpOptions = '';
|
197 |
+
$('.row').each(function(){
|
198 |
+
var id = $(this).attr('id');
|
199 |
+
var title = $(this).find('h3.heading').text();
|
200 |
+
jumpOptions += '<option value="'+id+'">'+title+'</option>';
|
201 |
+
});
|
202 |
+
|
203 |
+
$('select.jump-menu').append(jumpOptions);
|
204 |
+
|
205 |
+
$('select.jump-menu').change(function() {
|
206 |
+
var pos = $(this).val();
|
207 |
+
if(pos!= 'null'){
|
208 |
+
$('html,body').animate({
|
209 |
+
scrollTop: $('#'+pos).offset().top - ($('.intro').height() - 20)
|
210 |
+
}, 200, 'alm_easeInOutQuad');
|
211 |
+
}
|
212 |
+
});
|
213 |
+
|
214 |
+
|
215 |
+
/*
|
216 |
+
* Expand/Collapse shortcode headings
|
217 |
+
*
|
218 |
+
* @since 1.0
|
219 |
+
*/
|
220 |
+
|
221 |
+
$('h3.heading').click(function(){
|
222 |
+
var el = $(this);
|
223 |
+
if($(el).hasClass('open')){
|
224 |
+
$(el).next('.expand-wrap').slideDown(100, 'alm_easeInOutQuad', function(){
|
225 |
+
$(el).removeClass('open');
|
226 |
+
});
|
227 |
+
}else{
|
228 |
+
$(el).next('.expand-wrap').slideUp(100, 'alm_easeInOutQuad', function(){
|
229 |
+
$(el).addClass('open');
|
230 |
+
});
|
231 |
+
}
|
232 |
+
});
|
233 |
+
|
234 |
+
|
235 |
+
|
236 |
+
/*
|
237 |
+
* _alm.alm_easeInOutQuad
|
238 |
+
* Ajax Load More easing
|
239 |
+
*
|
240 |
+
* @since 1.0
|
241 |
+
*/
|
242 |
+
|
243 |
+
$.easing.alm_easeInOutQuad = function (x, t, b, c, d) {
|
244 |
+
if ((t/=d/2) < 1) return c/2*t*t + b;
|
245 |
+
return -c/2 * ((--t)*(t-2) - 1) + b;
|
246 |
+
}
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
+
/*
|
251 |
+
* _alm.SelectText
|
252 |
+
* Click to select text
|
253 |
+
*
|
254 |
+
* @since 1.0
|
255 |
+
*/
|
256 |
+
|
257 |
+
_alm.SelectText = function(element) {
|
258 |
+
var doc = document,
|
259 |
+
text = doc.getElementById(element),
|
260 |
+
range,
|
261 |
+
selection;
|
262 |
+
if (doc.body.createTextRange) {
|
263 |
+
range = document.body.createTextRange();
|
264 |
+
range.moveToElementText(text);
|
265 |
+
range.select();
|
266 |
+
} else if (window.getSelection) {
|
267 |
+
selection = window.getSelection();
|
268 |
+
range = document.createRange();
|
269 |
+
range.selectNodeContents(text);
|
270 |
+
selection.removeAllRanges();
|
271 |
+
selection.addRange(range);
|
272 |
+
}
|
273 |
+
}
|
274 |
+
$('#shortcode_output').click(function() {
|
275 |
+
_alm.SelectText('shortcode_output');
|
276 |
+
});
|
277 |
+
|
278 |
+
|
279 |
+
|
280 |
+
/*
|
281 |
+
* _alm.copyToClipboard
|
282 |
+
* Copy shortcode to clipboard
|
283 |
+
*
|
284 |
+
* @since 1.0
|
285 |
+
*/
|
286 |
+
|
287 |
+
_alm.copyToClipboard = function(text) {
|
288 |
+
window.prompt ("Copy link to your clipboard: Press Ctrl + C then hit Enter to copy.", text);
|
289 |
+
}
|
290 |
+
|
291 |
+
$('.output-wrap .copy').click(function(){
|
292 |
+
var c = $('#shortcode_output').html();
|
293 |
+
_alm.copyToClipboard(c);
|
294 |
+
});
|
295 |
+
|
296 |
+
|
297 |
+
|
298 |
+
|
299 |
+
});
|
ajax-load-more.php
ADDED
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Ajax Load More
|
4 |
+
Plugin URI: http://connekthq.com/ajax-load-more
|
5 |
+
Description: A simple solution for Ajax loading of WordPress Posts and Pages.
|
6 |
+
Author: Darren Cooney
|
7 |
+
Twitter: @KaptonKaos
|
8 |
+
Author URI: http://connekthq.com
|
9 |
+
Version: 2.0.3
|
10 |
+
License: GPL
|
11 |
+
Copyright: Darren Cooney & Connekt Media
|
12 |
+
*/
|
13 |
+
|
14 |
+
|
15 |
+
define('ALM_VERSION', '2.0.3');
|
16 |
+
define('ALM_RELEASE', 'June 12, 2014');
|
17 |
+
|
18 |
+
/*
|
19 |
+
* alm_install
|
20 |
+
* Activation hook - Create Default repeater and directory dynamically.
|
21 |
+
* This is so we can provide updates without overriding the current repeaters.
|
22 |
+
*
|
23 |
+
* @since 2.0.0
|
24 |
+
*/
|
25 |
+
|
26 |
+
register_activation_hook( __FILE__, 'alm_install' );
|
27 |
+
function alm_install() {
|
28 |
+
|
29 |
+
//Removed creation of core repeater file, it is now included directly in the /repeater/ dir.
|
30 |
+
/*
|
31 |
+
$alm_path = plugin_dir_path(__FILE__);
|
32 |
+
//Create direcotry if it doesn't exist
|
33 |
+
if (!file_exists($alm_path.'core/repeater')) {
|
34 |
+
mkdir($alm_path.'core/repeater', 0777, true);
|
35 |
+
}
|
36 |
+
|
37 |
+
//Check for default.php, if null create it
|
38 |
+
$filename = plugin_dir_path(__FILE__).'core/repeater/default.php';
|
39 |
+
$defaultContent = '<li><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(100,100));}?><h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3><p class="entry-meta"><?php the_time("F d, Y"); ?></p><?php the_excerpt(); ?></li>';
|
40 |
+
if (!file_exists($filename)) {
|
41 |
+
$handle = fopen($filename, 'w') or die('Cannot open file: '.$my_file); //implicitly creates file
|
42 |
+
fwrite($handle, $defaultContent);
|
43 |
+
fclose($handle);
|
44 |
+
}
|
45 |
+
*/
|
46 |
+
|
47 |
+
global $wpdb;
|
48 |
+
$table_name = $wpdb->prefix . "alm";
|
49 |
+
$defaultRepeater = '<li><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(100,100));}?><h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3><p class="entry-meta"><?php the_time("F d, Y"); ?></p><?php the_excerpt(); ?></li>';
|
50 |
+
|
51 |
+
//Create table, if it doesn't exist.
|
52 |
+
if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
|
53 |
+
$sql = "CREATE TABLE $table_name (
|
54 |
+
id mediumint(9) NOT NULL AUTO_INCREMENT,
|
55 |
+
repeaterDefault longtext NOT NULL,
|
56 |
+
pluginVersion text NOT NULL,
|
57 |
+
UNIQUE KEY id (id)
|
58 |
+
);";
|
59 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
60 |
+
dbDelta( $sql );
|
61 |
+
//Insert default data
|
62 |
+
$wpdb->insert($table_name , array('repeaterDefault' => $defaultRepeater, 'pluginVersion' => ALM_VERSION));
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
if( !class_exists('AjaxLoadMore') ):
|
69 |
+
|
70 |
+
class AjaxLoadMore {
|
71 |
+
|
72 |
+
function __construct(){
|
73 |
+
|
74 |
+
define('ALM_PATH', plugin_dir_path(__FILE__));
|
75 |
+
define('ALM_URL', plugins_url('', __FILE__));
|
76 |
+
define('ALM_ADMIN_URL', plugins_url('admin/', __FILE__));
|
77 |
+
define('ALM_NAME', '_ajax_load_more');
|
78 |
+
define('ALM_TITLE', 'Ajax Load More');
|
79 |
+
|
80 |
+
|
81 |
+
add_action('wp_ajax_ajax_load_more_init', array(&$this, 'alm_query_posts'));
|
82 |
+
add_action('wp_ajax_nopriv_ajax_load_more_init', array(&$this, 'alm_query_posts'));
|
83 |
+
add_action('wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts'));
|
84 |
+
add_action('alm_get_repeater', array(&$this, 'alm_get_current_repeater'));
|
85 |
+
add_shortcode('ajax_load_more', array(&$this, 'alm_shortcode'));
|
86 |
+
|
87 |
+
// Allow shortcodes in widget areas
|
88 |
+
add_filter('widget_text', array(&$this, 'shortcode_unautop'));
|
89 |
+
add_filter('widget_text', array(&$this, 'do_shortcode'));
|
90 |
+
|
91 |
+
// load text domain
|
92 |
+
load_plugin_textdomain( 'ajax-load-more', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
93 |
+
|
94 |
+
// includes Admin core
|
95 |
+
$this->alm_before_theme();
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
/*
|
101 |
+
* alm_before_theme
|
102 |
+
* Load these files before the theme loads
|
103 |
+
*
|
104 |
+
* @since 2.0.0
|
105 |
+
*/
|
106 |
+
|
107 |
+
function alm_before_theme(){
|
108 |
+
if( is_admin()){
|
109 |
+
include_once('admin/editor.php');
|
110 |
+
include_once('admin/admin.php');
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
/*
|
115 |
+
* alm_enqueue_scripts
|
116 |
+
* Enqueue our scripts and create our localize variables
|
117 |
+
*
|
118 |
+
* @since 2.0.0
|
119 |
+
*/
|
120 |
+
|
121 |
+
function alm_enqueue_scripts(){
|
122 |
+
$options = get_option( 'alm_settings' );
|
123 |
+
wp_enqueue_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.js', __FILE__ ), array('jquery'), '1.1', true );
|
124 |
+
wp_localize_script(
|
125 |
+
'ajax-load-more',
|
126 |
+
'alm_localize',
|
127 |
+
array(
|
128 |
+
'ajaxurl' => admin_url('admin-ajax.php'),
|
129 |
+
'alm_nonce' => wp_create_nonce( "ajax_load_more_nonce" ),
|
130 |
+
'pluginurl' => ALM_URL
|
131 |
+
)
|
132 |
+
);
|
133 |
+
if(!isset($options['_alm_disable_css']) || $options['_alm_disable_css'] != '1'){
|
134 |
+
wp_enqueue_style( 'ajax-load-more-css', plugins_url('/core/css/ajax-load-more.css', __FILE__ ));
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
/*
|
140 |
+
* alm_shortcode
|
141 |
+
* The AjaxLoadMore shortcode
|
142 |
+
*
|
143 |
+
* @since 2.0.0
|
144 |
+
*/
|
145 |
+
|
146 |
+
function alm_shortcode( $atts, $content = null ) {
|
147 |
+
$options = get_option( 'alm_settings' ); //Get plugin options
|
148 |
+
extract(shortcode_atts(array(
|
149 |
+
'repeater' => 'default',
|
150 |
+
'post_type' => 'post',
|
151 |
+
'category' => '',
|
152 |
+
'taxonomy' => '',
|
153 |
+
'tag' => '',
|
154 |
+
'author' => '',
|
155 |
+
'search' => '',
|
156 |
+
'exclude' => '',
|
157 |
+
'offset' => '0',
|
158 |
+
'posts_per_page' => '5',
|
159 |
+
'scroll' => 'true',
|
160 |
+
'max_pages' => '5',
|
161 |
+
'pause' => 'false',
|
162 |
+
'transition' => 'slide',
|
163 |
+
'button_label' => 'Older Posts'
|
164 |
+
),
|
165 |
+
$atts));
|
166 |
+
|
167 |
+
// Use HTML5 elements?
|
168 |
+
$wrap_element = 'div';
|
169 |
+
if(isset($options['_alm_html5']) || $options['_alm_html5'] == '1'){
|
170 |
+
$wrap_element = 'section';
|
171 |
+
}
|
172 |
+
$container_element = 'ul';
|
173 |
+
if($options['_alm_container_type'] == '2'){
|
174 |
+
$container_element = 'div';
|
175 |
+
}
|
176 |
+
$classname = '';
|
177 |
+
if(isset($options['_alm_classname'])){
|
178 |
+
$classname = ' '.$options['_alm_classname'];
|
179 |
+
}
|
180 |
+
|
181 |
+
$btn_color = '';
|
182 |
+
if(isset($options['_alm_btn_color'])){
|
183 |
+
$btn_color = ' '.$options['_alm_btn_color'];
|
184 |
+
}
|
185 |
+
|
186 |
+
return '<'.$wrap_element.' id="ajax-load-more" class="'. $btn_color .'"><'.$container_element.' class="alm-listing'. $classname . '" data-repeater="'.$repeater.'" data-post-type="'.$post_type.'" data-category="'.$category.'" data-taxonomy="'.$taxonomy.'" data-tag="'.$tag.'" data-author="'.$author.'" data-exclude="'.$exclude.'" data-offset="'.$offset.'" data-posts-per-page="'.$posts_per_page.'" data-search="'.$search.'" data-scroll="'.$scroll.'" data-max-pages="'.$max_pages.'" data-pause="'. $pause .'" data-button-label="'.$button_label.'" data-transition="'.$transition.'"></'.$container_element.'></'.$wrap_element.'>';
|
187 |
+
}
|
188 |
+
|
189 |
+
|
190 |
+
/*
|
191 |
+
* alm_query_posts
|
192 |
+
* Ajax Load More Public Query
|
193 |
+
*
|
194 |
+
* @since 2.0.0
|
195 |
+
*/
|
196 |
+
|
197 |
+
function alm_query_posts() {
|
198 |
+
|
199 |
+
$nonce = $_GET['nonce'];
|
200 |
+
|
201 |
+
// Check our nonce, if they don't match then bounce!
|
202 |
+
if (! wp_verify_nonce( $nonce, 'ajax_load_more_nonce' ))
|
203 |
+
die('Get Bounced!');
|
204 |
+
|
205 |
+
$repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
|
206 |
+
$postType = (isset($_GET['postType'])) ? $_GET['postType'] : 'post';
|
207 |
+
$category = (isset($_GET['category'])) ? $_GET['category'] : '';
|
208 |
+
$author_id = (isset($_GET['author'])) ? $_GET['author'] : '';
|
209 |
+
$taxonomy = (isset($_GET['taxonomy'])) ? $_GET['taxonomy'] : '';
|
210 |
+
$tag = (isset($_GET['tag'])) ? $_GET['tag'] : '';
|
211 |
+
$s = (isset($_GET['search'])) ? $_GET['search'] : '';
|
212 |
+
$exclude = (isset($_GET['exclude'])) ? $_GET['exclude'] : '';
|
213 |
+
$numPosts = (isset($_GET['numPosts'])) ? $_GET['numPosts'] : 6;
|
214 |
+
$page = (isset($_GET['pageNumber'])) ? $_GET['pageNumber'] : 0;
|
215 |
+
$offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
|
216 |
+
|
217 |
+
|
218 |
+
// Set up initial args
|
219 |
+
|
220 |
+
$args = array(
|
221 |
+
'post_type' => $postType,
|
222 |
+
'category_name' => $category,
|
223 |
+
'author' => $author_id,
|
224 |
+
'posts_per_page' => $numPosts,
|
225 |
+
'offset' => $offset + ($numPosts*$page),
|
226 |
+
's' => $s,
|
227 |
+
'orderby' => 'date',
|
228 |
+
'order' => 'DESC',
|
229 |
+
'post_status' => 'publish',
|
230 |
+
'ignore_sticky_posts' => true,
|
231 |
+
);
|
232 |
+
|
233 |
+
|
234 |
+
// Exclude posts if needed - See plugin examples for more info on excluding posts
|
235 |
+
|
236 |
+
if(!empty($exclude)){
|
237 |
+
$exclude=explode(",",$exclude);
|
238 |
+
$args['post__not_in'] = $exclude;
|
239 |
+
}
|
240 |
+
|
241 |
+
|
242 |
+
// Query by Taxonomy/Tag - Taxonomy is deprecated for now
|
243 |
+
|
244 |
+
if(empty($taxonomy)){
|
245 |
+
$args['tag'] = $tag;
|
246 |
+
}else{
|
247 |
+
$args[$taxonomy] = $tag;
|
248 |
+
}
|
249 |
+
|
250 |
+
|
251 |
+
// Query by $args
|
252 |
+
|
253 |
+
$alm_query = new WP_Query( $args );
|
254 |
+
|
255 |
+
|
256 |
+
// the WP loop
|
257 |
+
|
258 |
+
if ($alm_query->have_posts()) :
|
259 |
+
while ($alm_query->have_posts()): $alm_query->the_post();
|
260 |
+
|
261 |
+
$file = $repeater;
|
262 |
+
$include = '';
|
263 |
+
if (has_action('alm_repeater_installed')){ // If Custom Repeaters is installed
|
264 |
+
if($file == 'repeater1'){
|
265 |
+
$include = ALM_REPEATER_PATH . 'repeaters/repeater1.php';
|
266 |
+
}elseif($file == 'repeater2'){
|
267 |
+
$include = ALM_REPEATER_PATH . 'repeaters/repeater2.php';
|
268 |
+
}elseif($file == 'repeater3'){
|
269 |
+
$include = ALM_REPEATER_PATH . 'repeaters/repeater3.php';
|
270 |
+
}elseif($file == 'repeater4'){
|
271 |
+
$include = ALM_REPEATER_PATH . 'repeaters/repeater4.php';
|
272 |
+
}elseif($file == 'repeater5'){
|
273 |
+
$include = ALM_REPEATER_PATH . 'repeaters/repeater5.php';
|
274 |
+
}else{
|
275 |
+
$include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
|
276 |
+
}
|
277 |
+
}else{
|
278 |
+
$include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
|
279 |
+
}
|
280 |
+
|
281 |
+
include( $include );
|
282 |
+
|
283 |
+
endwhile;
|
284 |
+
endif;
|
285 |
+
wp_reset_query();
|
286 |
+
exit;
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
|
291 |
+
/*
|
292 |
+
* AjaxLoadMore
|
293 |
+
* The main function responsible for returning the one true AjaxLoadMore Instance to functions everywhere.
|
294 |
+
*
|
295 |
+
* @since 2.0.0
|
296 |
+
*/
|
297 |
+
|
298 |
+
function AjaxLoadMore(){
|
299 |
+
global $ajax_load_more;
|
300 |
+
|
301 |
+
if( !isset($ajax_load_more) )
|
302 |
+
{
|
303 |
+
$ajax_load_more = new AjaxLoadMore();
|
304 |
+
}
|
305 |
+
|
306 |
+
return $ajax_load_more;
|
307 |
+
}
|
308 |
+
|
309 |
+
|
310 |
+
// initialize
|
311 |
+
AjaxLoadMore();
|
312 |
+
|
313 |
+
endif; // class_exists check
|
core/css/ajax-load-more.css
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* WordPress Ajax Load More
|
3 |
+
* https://github.com/dcooney/wordpress-ajax-load-more
|
4 |
+
*
|
5 |
+
* Copyright 2014 Connekt Media - http://cnkt.ca/ajax-load-more/
|
6 |
+
* Free to use under the GPLv2 license.
|
7 |
+
* http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
+
*
|
9 |
+
* Author: Darren Cooney
|
10 |
+
* Twitter: @KaptonKaos
|
11 |
+
*/
|
12 |
+
|
13 |
+
button#load-more{
|
14 |
+
font-family: Helvetica, Arial, sans-serif;
|
15 |
+
font-size:16px;
|
16 |
+
font-weight: 600;
|
17 |
+
width:auto;
|
18 |
+
height: 42px;
|
19 |
+
line-height: 42px;
|
20 |
+
background: #FF5A58;
|
21 |
+
color:#fff;
|
22 |
+
border: none;
|
23 |
+
-webkit-border-radius:3px;
|
24 |
+
-moz-border-radius:3px;
|
25 |
+
border-radius:3px;
|
26 |
+
margin: 0 0 4px;
|
27 |
+
padding:0 20px;
|
28 |
+
display: inline-block;
|
29 |
+
position: relative;
|
30 |
+
-webkit-transition: padding 0.25s ease-in-out;
|
31 |
+
-moz-transition: padding 0.25s ease-in-out;
|
32 |
+
transition: padding 0.25s ease-in-out;
|
33 |
+
text-align: center;
|
34 |
+
text-decoration: none;
|
35 |
+
-webkit-appearance: none;
|
36 |
+
-moz-appearance: none;
|
37 |
+
appearance: none;
|
38 |
+
/* Prevents text selection */
|
39 |
+
-webkit-touch-callout: none;
|
40 |
+
-webkit-user-select: none;
|
41 |
+
-khtml-user-select: none;
|
42 |
+
-moz-user-select: -moz-none;
|
43 |
+
-ms-user-select: none;
|
44 |
+
-o-user-select: none;
|
45 |
+
user-select: none;
|
46 |
+
cursor: pointer;
|
47 |
+
}
|
48 |
+
button#load-more:hover{
|
49 |
+
background-color: #ec4745;
|
50 |
+
color: #fff;
|
51 |
+
text-decoration: none;
|
52 |
+
}
|
53 |
+
button#load-more:active{
|
54 |
+
-webkit-box-shadow: inset 0 4px 3px rgba(0, 0, 0, 0.15);
|
55 |
+
-moz-box-shadow: inset 0 4px 3px rgba(0, 0, 0, 0.15);
|
56 |
+
box-shadow: inset 0 4px 3px rgba(0, 0, 0, 0.15);
|
57 |
+
text-decoration: none;
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
/* Loading */
|
62 |
+
button#load-more.loading{
|
63 |
+
padding-left: 42px;
|
64 |
+
}
|
65 |
+
|
66 |
+
/* Loaded / Done */
|
67 |
+
button#load-more.done{
|
68 |
+
cursor: default;
|
69 |
+
opacity: 0.2;
|
70 |
+
filter: alpha(opacity=20);
|
71 |
+
background-color: #FF5A58;
|
72 |
+
-webkit-box-shadow: none !important;
|
73 |
+
-moz-box-shadow: none !important;
|
74 |
+
box-shadow: none !important;
|
75 |
+
}
|
76 |
+
|
77 |
+
/* Loading Icon */
|
78 |
+
button #load-more:before,
|
79 |
+
button#load-more.done:before{
|
80 |
+
background: none;
|
81 |
+
width: 0;
|
82 |
+
}
|
83 |
+
|
84 |
+
/* Loading :before */
|
85 |
+
button#load-more.loading:before {
|
86 |
+
background: #fff url(../../core/img/ajax-loader.gif) no-repeat center center;
|
87 |
+
width: 30px;
|
88 |
+
height: 30px;
|
89 |
+
margin: 5px;
|
90 |
+
-webkit-border-radius:3px;
|
91 |
+
-moz-border-radius:3px;
|
92 |
+
border-radius:3px;
|
93 |
+
display: inline-block;
|
94 |
+
z-index: 100;
|
95 |
+
content: '';
|
96 |
+
position: absolute;
|
97 |
+
left: 0;
|
98 |
+
overflow: hidden;
|
99 |
+
-webkit-transition: width 0.5s ease-in-out;
|
100 |
+
-moz-transition: width 0.5s ease-in-out;
|
101 |
+
transition: width 0.5s ease-in-out;
|
102 |
+
}
|
103 |
+
|
104 |
+
.alm-btn-wrap{
|
105 |
+
text-align:center;
|
106 |
+
padding:10px 10px 30px;
|
107 |
+
overflow: hidden;
|
108 |
+
display: block;
|
109 |
+
}
|
110 |
+
|
111 |
+
/* Blue */
|
112 |
+
#ajax-load-more.blue button#load-more{
|
113 |
+
background-color: #529ecf;
|
114 |
+
}
|
115 |
+
#ajax-load-more.blue button#load-more:hover,
|
116 |
+
#ajax-load-more.blue button#load-more.done{
|
117 |
+
background-color: #468ebb;
|
118 |
+
}
|
119 |
+
|
120 |
+
/* green */
|
121 |
+
#ajax-load-more.green button#load-more{
|
122 |
+
background-color: #80bb46;
|
123 |
+
}
|
124 |
+
#ajax-load-more.green button#load-more:hover,
|
125 |
+
#ajax-load-more.green button#load-more.done{
|
126 |
+
background-color: #6fa43c;
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
/* red */
|
131 |
+
#ajax-load-more.red button#load-more{
|
132 |
+
background-color: #ca4b4b;
|
133 |
+
}
|
134 |
+
#ajax-load-more.red button#load-more:hover,
|
135 |
+
#ajax-load-more.red button#load-more.done{
|
136 |
+
background-color: #b13b3b;
|
137 |
+
}
|
138 |
+
|
139 |
+
|
140 |
+
/* purple */
|
141 |
+
#ajax-load-more.purple button#load-more{
|
142 |
+
background-color: #b14fae;
|
143 |
+
}
|
144 |
+
#ajax-load-more.purple button#load-more:hover,
|
145 |
+
#ajax-load-more.purple button#load-more.done{
|
146 |
+
background-color: #9c4399;
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
/* grey */
|
151 |
+
#ajax-load-more.grey button#load-more{
|
152 |
+
background-color: #999;
|
153 |
+
}
|
154 |
+
#ajax-load-more.grey button#load-more:hover,
|
155 |
+
#ajax-load-more.grey button#load-more.done{
|
156 |
+
background-color: #666;
|
157 |
+
}
|
158 |
+
|
159 |
+
|
160 |
+
|
161 |
+
/*
|
162 |
+
* Generic alm-listing Styles
|
163 |
+
*
|
164 |
+
* @since 1.0.0
|
165 |
+
*/
|
166 |
+
|
167 |
+
.alm-listing{
|
168 |
+
margin: 0 0 10px 0;
|
169 |
+
padding: 0;
|
170 |
+
}
|
171 |
+
.alm-listing li{
|
172 |
+
margin: 0 50px 10px;
|
173 |
+
overflow: hidden;
|
174 |
+
padding: 20px 20px 20px 190px;
|
175 |
+
position: relative;
|
176 |
+
}
|
177 |
+
|
178 |
+
.alm-listing li a{
|
179 |
+
color: #34383D;
|
180 |
+
}
|
181 |
+
.alm-listing li p{
|
182 |
+
margin: 0;
|
183 |
+
}
|
184 |
+
.alm-listing li h3{
|
185 |
+
margin: 0 0 10px;
|
186 |
+
}
|
187 |
+
.alm-listing li img{
|
188 |
+
position: absolute;
|
189 |
+
left: 20px;
|
190 |
+
top: 20px;
|
191 |
+
-webkit-border-radius:3px;
|
192 |
+
-moz-border-radius:3px;
|
193 |
+
border-radius:3px;
|
194 |
+
}
|
195 |
+
|
196 |
+
|
core/img/ajax-loader.gif
ADDED
Binary file
|
core/js/ajax-load-more.js
ADDED
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* WordPress Ajax Load More
|
3 |
+
* https://github.com/dcooney/wordpress-ajax-load-more
|
4 |
+
*
|
5 |
+
* Copyright 2014 Connekt Media - http://cnkt.ca/ajax-load-more/
|
6 |
+
* Free to use under the GPLv2 license.
|
7 |
+
* http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
+
*
|
9 |
+
* Author: Darren Cooney
|
10 |
+
* Twitter: @KaptonKaos
|
11 |
+
*/
|
12 |
+
(function($) {
|
13 |
+
"use strict";
|
14 |
+
var AjaxLoadMore = {};
|
15 |
+
//Set vars
|
16 |
+
var page = 0,
|
17 |
+
speed = 300,
|
18 |
+
proceed = false,
|
19 |
+
$init = true,
|
20 |
+
$loading = true,
|
21 |
+
$finished = false,
|
22 |
+
$window = $(window),
|
23 |
+
$button_label = '',
|
24 |
+
$data,
|
25 |
+
$el = $('#ajax-load-more'),
|
26 |
+
$content = $('.alm-listing', $el),
|
27 |
+
$scroll = true,
|
28 |
+
$prefix = 'alm-',
|
29 |
+
$repeater = $content.data('repeater'),
|
30 |
+
$max_pages = $content.data('max-pages'),
|
31 |
+
$pause = $content.data('pause'),
|
32 |
+
$offset = $content.data('offset'),
|
33 |
+
$transition = $content.data('transition');
|
34 |
+
|
35 |
+
AjaxLoadMore.init = function() {
|
36 |
+
|
37 |
+
$(window).scrollTop(0); //Prevent loading of unnessasry posts - move user to top of page
|
38 |
+
// Check for pause on init
|
39 |
+
// Pause could be used to hold the loading of posts for a button click.
|
40 |
+
if ($pause === undefined) {
|
41 |
+
$pause = false;
|
42 |
+
}
|
43 |
+
|
44 |
+
// Max number of pages to load while scrolling
|
45 |
+
if ($repeater === undefined) {
|
46 |
+
$repeater = 'default';
|
47 |
+
}
|
48 |
+
|
49 |
+
// Max number of pages to load while scrolling
|
50 |
+
if ($max_pages === undefined) {
|
51 |
+
$max_pages = 5;
|
52 |
+
}
|
53 |
+
if ($max_pages === 'none') {
|
54 |
+
$max_pages = 100000;
|
55 |
+
}
|
56 |
+
// Max number of pages to load while scrolling
|
57 |
+
if ($transition === undefined) {
|
58 |
+
$transition = 'slide';
|
59 |
+
} else if ($transition === "fade") {
|
60 |
+
$transition = 'fade';
|
61 |
+
} else {
|
62 |
+
$transition = 'slide';
|
63 |
+
}
|
64 |
+
// Define offset
|
65 |
+
if ($content.data('offset') === undefined) {
|
66 |
+
$offset = 0;
|
67 |
+
} else {
|
68 |
+
$offset = $content.data('offset');
|
69 |
+
}
|
70 |
+
// Define button text
|
71 |
+
if ($content.data('button-label') === undefined) {
|
72 |
+
$button_label = 'Older Posts';
|
73 |
+
} else {
|
74 |
+
$button_label = $content.data('button-label');
|
75 |
+
}
|
76 |
+
// Define on Scroll event
|
77 |
+
if ($content.data('scroll') === undefined) {
|
78 |
+
$scroll = true;
|
79 |
+
} else if ($content.data('scroll') === "false") {
|
80 |
+
$scroll = false;
|
81 |
+
} else {
|
82 |
+
$scroll = true;
|
83 |
+
}
|
84 |
+
// Add load more button
|
85 |
+
$el.append('<div class="alm-btn-wrap"><button id="load-more" class="more">' + $button_label + '</button></div>');
|
86 |
+
var $button = $('#load-more');
|
87 |
+
//Parse Post Type for multiples
|
88 |
+
var $post_type = $content.data('post-type');
|
89 |
+
$post_type = $post_type.split(",");
|
90 |
+
$('#load-more').text("Loading...");
|
91 |
+
// Load posts function
|
92 |
+
AjaxLoadMore.loadPosts = function() {
|
93 |
+
$button.addClass('loading');
|
94 |
+
$.ajax({
|
95 |
+
type: "GET",
|
96 |
+
url: alm_localize.ajaxurl,
|
97 |
+
data: {
|
98 |
+
action: 'ajax_load_more_init',
|
99 |
+
nonce: alm_localize.alm_nonce,
|
100 |
+
postType: $post_type,
|
101 |
+
repeater: $repeater,
|
102 |
+
category: $content.data('category'),
|
103 |
+
author: $content.data('author'),
|
104 |
+
taxonomy: $content.data('taxonomy'),
|
105 |
+
tag: $content.data('tag'),
|
106 |
+
search: $content.data('search'),
|
107 |
+
exclude: $content.data('exclude'),
|
108 |
+
numPosts: $content.data('posts-per-page'),
|
109 |
+
pageNumber: page,
|
110 |
+
offset: $offset
|
111 |
+
},
|
112 |
+
dataType: "html",
|
113 |
+
// parse the data as html
|
114 |
+
beforeSend: function() {
|
115 |
+
if (page != 1) {
|
116 |
+
$button.addClass('loading');
|
117 |
+
}
|
118 |
+
},
|
119 |
+
success: function(data) {
|
120 |
+
$data = $(data); // Convert data to an object
|
121 |
+
if ($init) {
|
122 |
+
$button.text($button_label);
|
123 |
+
$init = false;
|
124 |
+
}
|
125 |
+
if ($data.length > 0) {
|
126 |
+
var $el = $('<div class="' + $prefix + 'reveal"/>');
|
127 |
+
$el.append($data);
|
128 |
+
$el.hide();
|
129 |
+
$content.append($el);
|
130 |
+
if ($transition === 'fade') { // Fade transition
|
131 |
+
$el.fadeIn(speed, 'alm_easeInOutQuad', function() {
|
132 |
+
$loading = false;
|
133 |
+
$button.delay(speed).removeClass('loading');
|
134 |
+
if ($data.length < $content.data('display-posts')) {
|
135 |
+
$finished = true;
|
136 |
+
$button.addClass('done');
|
137 |
+
}
|
138 |
+
});
|
139 |
+
} else { // Slide transition
|
140 |
+
$el.slideDown(speed, 'alm_easeInOutQuad', function() {
|
141 |
+
$loading = false;
|
142 |
+
$button.delay(speed).removeClass('loading');
|
143 |
+
if ($data.length < $content.data('display-posts')) {
|
144 |
+
$finished = true;
|
145 |
+
$button.addClass('done');
|
146 |
+
}
|
147 |
+
});
|
148 |
+
}
|
149 |
+
} else {
|
150 |
+
$button.delay(speed).removeClass('loading').addClass('done');
|
151 |
+
$loading = false;
|
152 |
+
$finished = true;
|
153 |
+
}
|
154 |
+
},
|
155 |
+
error: function(jqXHR, textStatus, errorThrown) {
|
156 |
+
$button.removeClass('loading');
|
157 |
+
//alert(jqXHR + " :: " + textStatus + " :: " + errorThrown);
|
158 |
+
}
|
159 |
+
});
|
160 |
+
};
|
161 |
+
|
162 |
+
// Button click event
|
163 |
+
$button.click(function() {
|
164 |
+
if($pause === true){
|
165 |
+
$pause = false;
|
166 |
+
AjaxLoadMore.loadPosts();
|
167 |
+
}
|
168 |
+
if (!$loading && !$finished && !$(this).hasClass('done')) {
|
169 |
+
$loading = true;
|
170 |
+
page++;
|
171 |
+
AjaxLoadMore.loadPosts();
|
172 |
+
}
|
173 |
+
});
|
174 |
+
|
175 |
+
// Window scroll event
|
176 |
+
if ($scroll) {
|
177 |
+
$window.scroll(function() {
|
178 |
+
var content_offset = $button.offset();
|
179 |
+
if (!$loading && !$finished && $window.scrollTop() >= Math.round(content_offset.top - ($window.height() - 150)) && page < ($max_pages - 1) && proceed) {
|
180 |
+
$loading = true;
|
181 |
+
page++;
|
182 |
+
AjaxLoadMore.loadPosts();
|
183 |
+
}
|
184 |
+
});
|
185 |
+
}
|
186 |
+
|
187 |
+
//Check for pause variable
|
188 |
+
if($pause === true){
|
189 |
+
$button.text($button_label);
|
190 |
+
}else{
|
191 |
+
AjaxLoadMore.loadPosts();
|
192 |
+
}
|
193 |
+
|
194 |
+
|
195 |
+
//flag to prevent unnecessary loading of post on init. Hold for 2 seconds.
|
196 |
+
setTimeout(function() {
|
197 |
+
proceed = true;
|
198 |
+
}, 2000);
|
199 |
+
};
|
200 |
+
//Init Ajax load More
|
201 |
+
if ($("#ajax-load-more").length) {
|
202 |
+
AjaxLoadMore.init();
|
203 |
+
}
|
204 |
+
//Custom easing function
|
205 |
+
$.easing.alm_easeInOutQuad = function(x, t, b, c, d) {
|
206 |
+
if ((t /= d / 2) < 1) return c / 2 * t * t + b;
|
207 |
+
return -c / 2 * ((--t) * (t - 2) - 1) + b;
|
208 |
+
};
|
209 |
+
})(jQuery);
|
core/repeater/default.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<li><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(100,100));}?><h3><a href="#" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3><p class="entry-meta"><?php the_time("F d, Y"); ?></p><?php the_excerpt(); ?></li>
|
index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
lang/ajax-load-more.pot
ADDED
@@ -0,0 +1,539 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Ajax Load More\n"
|
4 |
+
"POT-Creation-Date: 2014-06-09 10:53-0500\n"
|
5 |
+
"PO-Revision-Date: 2014-06-09 10:53-0500\n"
|
6 |
+
"Last-Translator: Darren Cooney <darren.cooney@gmail.com>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: en_CA\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.3\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
#: ../admin/admin.php:102
|
19 |
+
msgid "Ajax load More: Repeaters"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: ../admin/admin.php:103
|
23 |
+
msgid "The library of available repeaters"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: ../admin/admin.php:116
|
27 |
+
msgid "Default Repeater"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: ../admin/admin.php:119
|
31 |
+
msgid "Enter the HTML and PHP for the default repeater."
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: ../admin/admin.php:127
|
35 |
+
msgid "Restore Default"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: ../admin/admin.php:167
|
39 |
+
msgid "Saving data..."
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: ../admin/admin.php:179
|
43 |
+
msgid "Custom repeater value saved."
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: ../admin/admin.php:187
|
47 |
+
msgid "Something went wrong and the data could not be saved."
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: ../admin/admin.php:208
|
51 |
+
msgid "Repeater Help"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: ../admin/admin.php:210
|
55 |
+
msgid "What is a repeater?"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: ../admin/admin.php:211
|
59 |
+
msgid ""
|
60 |
+
"A repeater is a snippet of code that will execute over and over within a <a "
|
61 |
+
"href=\"http://codex.wordpress.org/The_Loop\" target=\"_blank\">WordPress "
|
62 |
+
"loop</a>.</p>"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: ../admin/admin.php:214
|
66 |
+
msgid "Can I include PHP in the repeater?"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: ../admin/admin.php:215
|
70 |
+
msgid ""
|
71 |
+
"Yes, PHP and core WordPress functions such as, <code>the_title()</code> and "
|
72 |
+
"<code>the_permalink()</code> are required.</p>"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../admin/admin.php:218
|
76 |
+
msgid "Tips and Tricks"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: ../admin/admin.php:220
|
80 |
+
msgid ""
|
81 |
+
"Always open and close your repeater with an HTML element. In some rare cases "
|
82 |
+
"data may not be displayed.<br/>e.g. <code><li> </li></code> or "
|
83 |
+
"<code><div> </div></code>"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: ../admin/admin.php:277
|
87 |
+
msgid "Ajax load More: Shortcode Builder"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: ../admin/admin.php:278
|
91 |
+
msgid ""
|
92 |
+
"Create your own Ajax Load More <a href=\"http://en.support.wordpress.com/"
|
93 |
+
"shortcodes/\" target=\"_blank\">shortcode</a> by adjusting the values below"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: ../admin/admin.php:284 ../admin/admin.php:361
|
97 |
+
msgid "Back to Top"
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: ../admin/admin.php:290
|
101 |
+
msgid "Shortcode Output"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: ../admin/admin.php:291
|
105 |
+
msgid ""
|
106 |
+
"Copy and paste the following shortcode into the content editor or widget "
|
107 |
+
"area of your theme."
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: ../admin/admin.php:294 ../admin/editor-build.php:44
|
111 |
+
msgid "Copy"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: ../admin/admin.php:298
|
115 |
+
msgid "Did you know?"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: ../admin/admin.php:300
|
119 |
+
msgid ""
|
120 |
+
"<p class=\"addon-intro\">You can generate shortcodes while editing pages!</"
|
121 |
+
"p><p>Look for the Ajax Load More [+] icon in the content editor toolbar and "
|
122 |
+
"the <a href=\"?page=ajax-load-more-shortcode-builder\">shortcode builder</a> "
|
123 |
+
"will pop open."
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: ../admin/admin.php:320
|
127 |
+
msgid "Ajax load More: Examples"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: ../admin/admin.php:321
|
131 |
+
msgid "A collection of everyday shortcode usages and implementation examples"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: ../admin/admin.php:326
|
135 |
+
msgid "Author.php"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: ../admin/admin.php:328
|
139 |
+
msgid "Example shortcode for use on author archive pages."
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: ../admin/admin.php:335
|
143 |
+
msgid "Category.php"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: ../admin/admin.php:337
|
147 |
+
msgid "Example shortcode for use on category archive pages."
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: ../admin/admin.php:344
|
151 |
+
msgid "Excluding Posts"
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
#: ../admin/admin.php:346
|
155 |
+
msgid "Example shortcode for excluding an array of posts."
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: ../admin/admin.php:352
|
159 |
+
msgid "Tag.php"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: ../admin/admin.php:354
|
163 |
+
msgid "Example shortcode for use on tag archive pages."
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: ../admin/admin.php:367
|
167 |
+
msgid "Request Examples"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: ../admin/admin.php:368
|
171 |
+
msgid ""
|
172 |
+
"If you're having issue's with functionality, please submit example requests "
|
173 |
+
"through the <a href=\"https://github.com/dcooney/wordpress-ajax-load-more\" "
|
174 |
+
"target=\"_blank\">GitHub repository</a>. "
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../admin/admin.php:392
|
178 |
+
msgid "Ajax load More: Add-ons"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../admin/admin.php:393
|
182 |
+
msgid ""
|
183 |
+
"The following Add-ons are available to increase the functionality of Ajax "
|
184 |
+
"Load More."
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: ../admin/admin.php:399
|
188 |
+
msgid "Custom Repeaters"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: ../admin/admin.php:405
|
192 |
+
msgid "Unlock additional repeaters and keep your site looking fresh!"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: ../admin/admin.php:406
|
196 |
+
msgid ""
|
197 |
+
"The Custom Repeaters add-on will add <strong>five</strong> additional <a "
|
198 |
+
"href=\"?page=ajax-load-more-repeaters\">repeaters</a> and allow you to "
|
199 |
+
"select unique repeaters for different content types throughout your theme.</"
|
200 |
+
"p> \n"
|
201 |
+
" <p>It's easy! Just build each <a href=\"?page=ajax-load-"
|
202 |
+
"more-repeaters\">repeater</a> and then choose from the list of repeaters "
|
203 |
+
"while building your <a href=\"?page=ajax-load-more-shortcode-builder"
|
204 |
+
"\">shortcode</a>.</p><p><strong>Read/Write Access is required!</strong></p>"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: ../admin/admin.php:424
|
208 |
+
msgid "About Add-ons"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: ../admin/admin.php:425
|
212 |
+
msgid ""
|
213 |
+
"Add-ons are installed as a separate plugin and will receive plug-in update "
|
214 |
+
"notifications. "
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: ../admin/admin.php:479
|
218 |
+
msgid "Disable CSS"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: ../admin/admin.php:486
|
222 |
+
msgid "HTML5 Elements"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: ../admin/admin.php:493
|
226 |
+
msgid "Container Type"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: ../admin/admin.php:500
|
230 |
+
msgid "Container Class"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: ../admin/admin.php:507
|
234 |
+
msgid "Button Color"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: ../admin/admin.php:524
|
238 |
+
msgid ""
|
239 |
+
"Customize your version of Ajax Load More by updating the fields below.</p><p "
|
240 |
+
"class=\"small\">All changes will be applied globally accross your theme."
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: ../admin/editor-build.php:36
|
244 |
+
msgid "Jump to section"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: ../admin/editor-build.php:38
|
248 |
+
msgid "Create your own Ajax Load More shortcode by adjusting the values below:"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: ../admin/editor-build.php:41
|
252 |
+
msgid "Insert Shortcode"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: ../admin/editor.php:15
|
256 |
+
msgid "You are not allowed to be here"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: ../admin/includes/shortcode-builder.php:6
|
260 |
+
msgid "Repeater"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: ../admin/includes/shortcode-builder.php:9
|
264 |
+
msgid ""
|
265 |
+
"Select a <a href=\"?page=ajax-load-more-repeaters\">repeater</a> from drop "
|
266 |
+
"menu."
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: ../admin/includes/shortcode-builder.php:31
|
270 |
+
msgid "Post Types"
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: ../admin/includes/shortcode-builder.php:34
|
274 |
+
msgid "Select Post Types to query."
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: ../admin/includes/shortcode-builder.php:53
|
278 |
+
msgid "Category"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: ../admin/includes/shortcode-builder.php:56
|
282 |
+
msgid "Select a Category to query(by slug) from the drop menu."
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: ../admin/includes/shortcode-builder.php:59
|
286 |
+
msgid "Select Category"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: ../admin/includes/shortcode-builder.php:72
|
290 |
+
msgid "Tag"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: ../admin/includes/shortcode-builder.php:75
|
294 |
+
msgid "Select a Tag to query(by slug) from the drop menu."
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: ../admin/includes/shortcode-builder.php:78
|
298 |
+
msgid "Select Tag"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: ../admin/includes/shortcode-builder.php:91
|
302 |
+
msgid "Author"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: ../admin/includes/shortcode-builder.php:94
|
306 |
+
msgid "Select an Author to query(by ID) from the drop menu."
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: ../admin/includes/shortcode-builder.php:97
|
310 |
+
msgid "Select Author"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: ../admin/includes/shortcode-builder.php:109
|
314 |
+
msgid "Search Term"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: ../admin/includes/shortcode-builder.php:112
|
318 |
+
msgid "Enter a search term to query."
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: ../admin/includes/shortcode-builder.php:116
|
322 |
+
msgid "Enter search term"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: ../admin/includes/shortcode-builder.php:124
|
326 |
+
msgid "Exclude Posts"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: ../admin/includes/shortcode-builder.php:127
|
330 |
+
msgid "A comma separated list of post ID's to exclude from query."
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: ../admin/includes/shortcode-builder.php:139
|
334 |
+
msgid "Post Offset"
|
335 |
+
msgstr ""
|
336 |
+
|
337 |
+
#: ../admin/includes/shortcode-builder.php:142
|
338 |
+
msgid "Offset the initial query by selecting a value from the drop menu."
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: ../admin/includes/shortcode-builder.php:163
|
342 |
+
msgid "Posts Per Page"
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: ../admin/includes/shortcode-builder.php:166
|
346 |
+
msgid "Select the number of posts to load with each request."
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: ../admin/includes/shortcode-builder.php:192
|
350 |
+
msgid "Load Posts on Scroll"
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: ../admin/includes/shortcode-builder.php:195
|
354 |
+
msgid "Load more posts as the user scrolls the page."
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: ../admin/includes/shortcode-builder.php:202
|
358 |
+
#: ../admin/includes/shortcode-builder.php:257
|
359 |
+
msgid "True"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: ../admin/includes/shortcode-builder.php:206
|
363 |
+
#: ../admin/includes/shortcode-builder.php:261
|
364 |
+
msgid "False"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: ../admin/includes/shortcode-builder.php:217
|
368 |
+
msgid "Max Pages"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: ../admin/includes/shortcode-builder.php:220
|
372 |
+
msgid "Maximum number of pages to load while scrolling."
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: ../admin/includes/shortcode-builder.php:235
|
376 |
+
msgid "Unlimited"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: ../admin/includes/shortcode-builder.php:247
|
380 |
+
msgid "Pause Loading of Posts"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: ../admin/includes/shortcode-builder.php:250
|
384 |
+
msgid "Do not load posts until user clicks <em>load</em> button."
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: ../admin/includes/shortcode-builder.php:272
|
388 |
+
msgid "Transition"
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: ../admin/includes/shortcode-builder.php:275
|
392 |
+
msgid "Select a loading transition from the drop menu."
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: ../admin/includes/shortcode-builder.php:280
|
396 |
+
msgid "Slide"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: ../admin/includes/shortcode-builder.php:281
|
400 |
+
msgid "Fade"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: ../admin/includes/shortcode-builder.php:291
|
404 |
+
msgid "Button Label"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: ../admin/includes/shortcode-builder.php:294
|
408 |
+
msgid "Customize the <em>Load More</em> button label."
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: ../admin/includes/shortcode-builder.php:298
|
412 |
+
msgid "Older Posts"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: ../admin/includes/cta/about.php:13
|
416 |
+
msgid ""
|
417 |
+
"<a href=\"http://twitter.com/kaptonkaos\" target=\"blank\" class=\"visit"
|
418 |
+
"\"><i class=\"fa fa-twitter\"></i> Follow on Twitter</a>"
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: ../admin/includes/cta/config.php:2
|
422 |
+
msgid "Plugin Configurations"
|
423 |
+
msgstr ""
|
424 |
+
|
425 |
+
#: ../admin/includes/cta/config.php:4
|
426 |
+
msgid "Plugin Version"
|
427 |
+
msgstr ""
|
428 |
+
|
429 |
+
#: ../admin/includes/cta/config.php:10
|
430 |
+
msgid "Release Date"
|
431 |
+
msgstr ""
|
432 |
+
|
433 |
+
#: ../admin/includes/cta/extend.php:1
|
434 |
+
msgid ""
|
435 |
+
"Unlock additional repeaters with the <a href=\"?page=ajax-load-more-add-ons"
|
436 |
+
"\" target=\"_parent\">Custom Repeaters add-on</a>"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: ../admin/includes/cta/extend.php:1
|
440 |
+
msgid "More Info"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: ../admin/includes/cta/resources.php:2
|
444 |
+
msgid "Help/Resources"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: ../admin/includes/cta/resources.php:8
|
448 |
+
msgid ""
|
449 |
+
"<a href=\"https://github.com/dcooney/wordpress-ajax-load-more\" target="
|
450 |
+
"\"blank\" class=\"visit\"><i class=\"fa fa-github\"></i> Latest build on "
|
451 |
+
"Github</a>"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: ../admin/includes/cta/writeable.php:2
|
455 |
+
msgid "Read/Write Access"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: ../admin/includes/cta/writeable.php:8
|
459 |
+
msgid "Write Access Enabled!"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: ../admin/includes/cta/writeable.php:10
|
463 |
+
msgid "Write Access Denied!"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#~ msgid "404 Error"
|
467 |
+
#~ msgstr "Erreur 404 "
|
468 |
+
|
469 |
+
#~ msgid "Sorry, the page you have requested cannot be found."
|
470 |
+
#~ msgstr "Désolé, la page que vous demandez est introuvable."
|
471 |
+
|
472 |
+
#~ msgid ""
|
473 |
+
#~ "Be sure to check your spelling. If all else fails, you can go back to the "
|
474 |
+
#~ "page you came from, return to the <a href=\"/\">homepage</a>, or try "
|
475 |
+
#~ "searching."
|
476 |
+
#~ msgstr ""
|
477 |
+
#~ "Veuillez vérifier l'orthographe. Si tout échoue, retournez à la page "
|
478 |
+
#~ "précédente, retournez à la <a href=\"/\">page d'accueil</a>, ou essayez "
|
479 |
+
#~ "une recherche."
|
480 |
+
|
481 |
+
#~ msgid "Connect with Willow"
|
482 |
+
#~ msgstr "Connectez-vous avec Willow"
|
483 |
+
|
484 |
+
#~ msgid ""
|
485 |
+
#~ "Sign up to stay in touch and receive Willow news, updates and event "
|
486 |
+
#~ "information."
|
487 |
+
#~ msgstr ""
|
488 |
+
#~ "Inscrivez-vous pour rester en contact avec nous et recevoir des nouvelles "
|
489 |
+
#~ "de Willow (Disponibles en anglais seulement)"
|
490 |
+
|
491 |
+
#~ msgid "all our funders"
|
492 |
+
#~ msgstr "tous nos donateurs"
|
493 |
+
|
494 |
+
#~ msgid "call our helpline"
|
495 |
+
#~ msgstr "Appelez notre ligne de soutien"
|
496 |
+
|
497 |
+
#~ msgid "share"
|
498 |
+
#~ msgstr "Partager"
|
499 |
+
|
500 |
+
#~ msgid "Share on Twitter"
|
501 |
+
#~ msgstr "Partager sur Twitter"
|
502 |
+
|
503 |
+
#~ msgid "Share on Facebook"
|
504 |
+
#~ msgstr "Partager sur Facebook"
|
505 |
+
|
506 |
+
#~ msgid "Share via Email"
|
507 |
+
#~ msgstr "Partager par courriel"
|
508 |
+
|
509 |
+
#~ msgid "Print Page"
|
510 |
+
#~ msgstr "Imprimer cette page"
|
511 |
+
|
512 |
+
#~ msgid "Your search returned <strong>%s</strong> result%s"
|
513 |
+
#~ msgstr "Votre recherche a généré <strong>%s</strong> résultat%s "
|
514 |
+
|
515 |
+
#~ msgid "search"
|
516 |
+
#~ msgstr "Recherche"
|
517 |
+
|
518 |
+
#~ msgid "Showing"
|
519 |
+
#~ msgstr "Montrant"
|
520 |
+
|
521 |
+
#~ msgid "result(s) in"
|
522 |
+
#~ msgstr "résultat(s) dans"
|
523 |
+
|
524 |
+
#~ msgid "For more information please contact:"
|
525 |
+
#~ msgstr "Pour de plus amples renseignements, veuillez contacter : "
|
526 |
+
|
527 |
+
#~ msgid "filter support groups"
|
528 |
+
#~ msgstr "Filtrer les groupes de soutien"
|
529 |
+
|
530 |
+
#~ msgid "select a province and city to find a support group"
|
531 |
+
#~ msgstr ""
|
532 |
+
#~ "Sélectionnez votre province et votre ville pour trouver un groupe de "
|
533 |
+
#~ "soutien"
|
534 |
+
|
535 |
+
#~ msgid "-- Select Province --"
|
536 |
+
#~ msgstr "Sélectionnez province"
|
537 |
+
|
538 |
+
#~ msgid "Filter"
|
539 |
+
#~ msgstr "Filtrer"
|
screenshot-1.png
ADDED
Binary file
|
screenshot-2.png
ADDED
Binary file
|
screenshot-3.png
ADDED
Binary file
|
screenshot-4.png
ADDED
Binary file
|
screenshot-5.png
ADDED
Binary file
|
screenshot-6.png
ADDED
Binary file
|