Version Description
Download this release
Release Info
Developer | cbaldelomar |
Plugin | Shortcodes by Angie Makes |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- LICENSE +339 -0
- README.md +49 -0
- includes/css/admin.css +207 -0
- includes/css/style.css +953 -0
- includes/functions.php +20 -0
- includes/img/blogger.png +0 -0
- includes/img/bloglovin.png +0 -0
- includes/img/circle-border.png +0 -0
- includes/img/email.png +0 -0
- includes/img/etsy.png +0 -0
- includes/img/facebook.png +0 -0
- includes/img/flickr.png +0 -0
- includes/img/flower.png +0 -0
- includes/img/google.png +0 -0
- includes/img/instagram.png +0 -0
- includes/img/picasa.png +0 -0
- includes/img/pinterest.png +0 -0
- includes/img/rss.png +0 -0
- includes/img/shopping.png +0 -0
- includes/img/tumblr.png +0 -0
- includes/img/twitter.png +0 -0
- includes/img/vimeo.png +0 -0
- includes/img/youtube.png +0 -0
- includes/js/accordion.js +1 -0
- includes/js/admin.js +183 -0
- includes/js/fullwidth.js +44 -0
- includes/js/googlemap.js +62 -0
- includes/js/pre.js +5 -0
- includes/js/prettify.js +30 -0
- includes/js/skillbar.js +7 -0
- includes/js/tabs.js +1 -0
- includes/js/toggle.js +1 -0
- includes/mce/js/images/shortcodes.png +0 -0
- includes/mce/js/shortcodes_tinymce.js +357 -0
- includes/mce/shortcodes_tinymce.php +36 -0
- includes/options.php +307 -0
- includes/scripts.php +31 -0
- includes/settings.php +228 -0
- includes/shortcode-functions.php +844 -0
- includes/widgets.php +148 -0
- readme.txt +49 -0
- wc-shortcodes.php +37 -0
LICENSE
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., <http://fsf.org/>
|
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 |
+
{description}
|
294 |
+
Copyright (C) {year} {fullname}
|
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.md
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WordPress Canvas Shortcodes #
|
2 |
+
|
3 |
+
**Contributors:** cbaldelomar
|
4 |
+
**Donate link:** http://webplantmedia.com/pay-now/
|
5 |
+
**Tags:** shortcode, shortcodes
|
6 |
+
**Requires at least:** 3.7
|
7 |
+
**Tested up to:** 3.7.1
|
8 |
+
**Stable tag:** trunk
|
9 |
+
**License:** GPLv2 or later
|
10 |
+
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
|
12 |
+
A family of shortcodes to enhance site functionality.
|
13 |
+
|
14 |
+
## Description ##
|
15 |
+
|
16 |
+
Enhance Pages with the following features. Accordion, Tabs, Toggle, Columns, Testimonials, Borders, Buttons, Full Width, Notifications, Google Maps, Social Icons, Progress Bars, Pricing, Highlights, Custom HTML, Code.
|
17 |
+
|
18 |
+
See the shortcodes in action at [WordPress Canvas Shortcodes](http://wordpresscanvas.com/features/shortcodes/).
|
19 |
+
|
20 |
+
### Professional Support
|
21 |
+
|
22 |
+
If you need professional plugin support from me, the plugin author, you can contact me at [WordPress Canvas](http://wordpresscanvas.com/).
|
23 |
+
|
24 |
+
### Plugin Development
|
25 |
+
|
26 |
+
If you're a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it's [GitHub repository](https://github.com/webplantmedia/wc-shortcodes).
|
27 |
+
|
28 |
+
### Donations
|
29 |
+
|
30 |
+
Yes, I do accept donations. If you want to buy me a sandwich or whatever, you can do so from my [payment page](http://webplantmedia.com/pay-now/). I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are always a nice incentive.
|
31 |
+
|
32 |
+
## Installation ##
|
33 |
+
|
34 |
+
1. Uzip the `wc-shortcodes.zip` folder.
|
35 |
+
2. Upload the `wc-shortcodes` folder to your `/wp-content/plugins` directory.
|
36 |
+
3. In your WordPress dashboard, head over to the *Plugins* section.
|
37 |
+
4. Activate *WordPress Canvas Shortcodes*.
|
38 |
+
|
39 |
+
## Frequently Asked Questions ##
|
40 |
+
|
41 |
+
### How do I use the shortcodes?
|
42 |
+
|
43 |
+
Use the shortcode manager in the TinyMCE text editor
|
44 |
+
|
45 |
+
## Changelog ##
|
46 |
+
|
47 |
+
### Version 0.1.0
|
48 |
+
|
49 |
+
* Plugin released. Everything is new!
|
includes/css/admin.css
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* CSS Hacks
|
3 |
+
*
|
4 |
+
* Needed common CSS trick
|
5 |
+
*/
|
6 |
+
|
7 |
+
.wc-shortcodes-clearfix:after {
|
8 |
+
visibility: hidden;
|
9 |
+
display: block;
|
10 |
+
font-size: 0;
|
11 |
+
content: " ";
|
12 |
+
clear: both;
|
13 |
+
height: 0;
|
14 |
+
}
|
15 |
+
|
16 |
+
.wc-shortcodes-clearfix { display: inline-block; }
|
17 |
+
|
18 |
+
* html .wc-shortcodes-clearfix {
|
19 |
+
height: 1%;
|
20 |
+
}
|
21 |
+
|
22 |
+
.wc-shortcodes-clearfix { display: block; }
|
23 |
+
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Google Fonts
|
27 |
+
*
|
28 |
+
* Styles for Fonts subpage in Wordpress dashboard
|
29 |
+
*/
|
30 |
+
|
31 |
+
.wc-shortcodes-font-table {
|
32 |
+
height: 300px;
|
33 |
+
width: 450px;
|
34 |
+
overflow-y: scroll;
|
35 |
+
overflow-x: hidden;
|
36 |
+
border: 1px solid #e5e5e5;
|
37 |
+
}
|
38 |
+
|
39 |
+
.wc-shortcodes-font-row {
|
40 |
+
clear: both;
|
41 |
+
}
|
42 |
+
|
43 |
+
.wc-shortcodes-font-row:nth-child(even) {
|
44 |
+
background-color: #e5e5e5;
|
45 |
+
}
|
46 |
+
|
47 |
+
.wc-shortcodes-font-title {
|
48 |
+
width: 200px;
|
49 |
+
float: left;
|
50 |
+
padding-right: 10px;
|
51 |
+
text-align: right;
|
52 |
+
white-space: nowrap;
|
53 |
+
}
|
54 |
+
|
55 |
+
.wc-shortcodes-font-variants {
|
56 |
+
width: 200px;
|
57 |
+
float: left;
|
58 |
+
}
|
59 |
+
|
60 |
+
#wc-shortcodes-font-preview {
|
61 |
+
font-size: 28px;
|
62 |
+
line-height: 1.5;
|
63 |
+
}
|
64 |
+
|
65 |
+
.wc-shortcodes-font-preview-text {
|
66 |
+
margin-right: 10px;
|
67 |
+
}
|
68 |
+
|
69 |
+
.wc-shortcodes-font-row-remove {
|
70 |
+
vertical-align: middle;
|
71 |
+
}
|
72 |
+
|
73 |
+
.wc-shortcodes-font-preview-row {
|
74 |
+
margin-bottom: 15px;
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Less Variables
|
80 |
+
*/
|
81 |
+
|
82 |
+
.wc-shortcodes-variables-preview {
|
83 |
+
margin-right: 190px;
|
84 |
+
}
|
85 |
+
|
86 |
+
.wc-shortcodes-variables-table {
|
87 |
+
border: 1px solid #e5e5e5;
|
88 |
+
width: 97%;
|
89 |
+
}
|
90 |
+
|
91 |
+
.wc-shortcodes-variables-table tr:nth-child(even) {
|
92 |
+
background-color: #e5e5e5;
|
93 |
+
}
|
94 |
+
|
95 |
+
.wc-shortcodes-variables-table td {
|
96 |
+
padding: 3px;
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Border Fields
|
102 |
+
*/
|
103 |
+
|
104 |
+
.wc-shortcodes-font-hover-fields .wc-shortcodes-text-decoration,
|
105 |
+
.wc-shortcodes-border-fields .wc-shortcodes-border-style,
|
106 |
+
.wc-shortcodes-border-fields .wp-border-width,
|
107 |
+
.wc-shortcodes-border-fields .wp-picker-container {
|
108 |
+
margin-bottom: 7px;
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Font Fields
|
114 |
+
*/
|
115 |
+
|
116 |
+
.wc-shortcodes-font-fields .wc-shortcodes-font-teaser,
|
117 |
+
.wc-shortcodes-font-fields .wp-picker-container,
|
118 |
+
.wc-shortcodes-font-fields select,
|
119 |
+
.wc-shortcodes-font-fields input {
|
120 |
+
margin-bottom: 7px;
|
121 |
+
}
|
122 |
+
|
123 |
+
.wc-shortcodes-font-teaser {
|
124 |
+
display: block;
|
125 |
+
line-height: 1.5;
|
126 |
+
}
|
127 |
+
|
128 |
+
.wc-shortcodes-font-appearance-fields select,
|
129 |
+
.wc-shortcodes-font-appearance-fields .wp-picker-container {
|
130 |
+
margin-bottom: 7px;
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Media Gallery
|
136 |
+
*
|
137 |
+
* Styles for media gallery
|
138 |
+
*/
|
139 |
+
|
140 |
+
.wp-media-buttons-icon {
|
141 |
+
background: url('../../../../../../../wp-admin/images/media-button.png') no-repeat top left;
|
142 |
+
display: inline-block;
|
143 |
+
width: 16px;
|
144 |
+
height: 16px;
|
145 |
+
vertical-align: text-top;
|
146 |
+
margin: 0 2px;
|
147 |
+
}
|
148 |
+
|
149 |
+
.wc-shortcodes-preview-image img {
|
150 |
+
max-width: 700px;
|
151 |
+
max-height: 200px;
|
152 |
+
background: #FAFAFA;
|
153 |
+
border-color: #ccc #eee #eee #ccc;
|
154 |
+
border-style: solid;
|
155 |
+
border-width: 1px;
|
156 |
+
padding: 5px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.widget .wc-shortcodes-preview-image img {
|
160 |
+
padding: 0;
|
161 |
+
border-width: 0;
|
162 |
+
max-width: 100%;
|
163 |
+
}
|
164 |
+
|
165 |
+
.wc-shortcodes-preview-image {
|
166 |
+
margin-bottom: 5px;
|
167 |
+
}
|
168 |
+
|
169 |
+
.wc-shortcodes-upload-font-textarea {
|
170 |
+
max-width: 900px;
|
171 |
+
height: 210px;
|
172 |
+
width: 97%;
|
173 |
+
}
|
174 |
+
|
175 |
+
.wc-shortcodes-social-media-field .button,
|
176 |
+
.wc-shortcodes-social-media-field input,
|
177 |
+
.wc-shortcodes-image-field .button,
|
178 |
+
.wc-shortcodes-image-field input,
|
179 |
+
.wc-shortcodes-background-options .button,
|
180 |
+
.wc-shortcodes-background-options select,
|
181 |
+
.wc-shortcodes-background-options input {
|
182 |
+
margin-bottom: 7px;
|
183 |
+
}
|
184 |
+
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Theme Options Display
|
188 |
+
*
|
189 |
+
* Specific style for theme options pages
|
190 |
+
*/
|
191 |
+
|
192 |
+
.wc-shortcodes-theme-options-display .form-table tr:nth-child(odd) {
|
193 |
+
background-color: #f2f2f2;
|
194 |
+
}
|
195 |
+
|
196 |
+
.wc-shortcodes-textarea {
|
197 |
+
max-width: 900px;
|
198 |
+
height: 150px;
|
199 |
+
width: 97%;
|
200 |
+
}
|
201 |
+
|
202 |
+
.wc-shortcodes-ajax-submit-button #submit {
|
203 |
+
outline: 0;
|
204 |
+
}
|
205 |
+
.wc-shortcodes-ajax-submit-button #compile-status {
|
206 |
+
margin-left: 5px;
|
207 |
+
}
|
includes/css/style.css
ADDED
@@ -0,0 +1,953 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wc-shortcodes-clearfix:before,
|
2 |
+
.wc-shortcodes-clearfix:after {
|
3 |
+
content: "";
|
4 |
+
display: table;
|
5 |
+
}
|
6 |
+
|
7 |
+
.wc-shortcodes-clearfix:after {
|
8 |
+
clear: both;
|
9 |
+
}
|
10 |
+
|
11 |
+
.wc-shortcodes-clearfix {
|
12 |
+
zoom: 1; /* For IE 6/7 (trigger hasLayout) */
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* [wc_accordion]
|
18 |
+
* ----------------------------------------------------------------------------
|
19 |
+
*/
|
20 |
+
.wc-shortcodes-accordion {
|
21 |
+
margin-bottom: 20px;
|
22 |
+
}
|
23 |
+
.wc-shortcodes-accordion .wc-shortcodes-accordion-trigger {
|
24 |
+
display: block;
|
25 |
+
position: relative;
|
26 |
+
padding: 0;
|
27 |
+
border: 1px solid #cccccc;
|
28 |
+
outline: 0;
|
29 |
+
margin: 3px 0 0 0;
|
30 |
+
}
|
31 |
+
.wc-shortcodes-accordion .wc-shortcodes-accordion-trigger a {
|
32 |
+
display: block;
|
33 |
+
padding: 10px 20px;
|
34 |
+
cursor: pointer;
|
35 |
+
}
|
36 |
+
.wc-shortcodes-accordion .wc-shortcodes-accordion-trigger:first-child {
|
37 |
+
margin-top: 0;
|
38 |
+
}
|
39 |
+
.wc-shortcodes-accordion .ui-state-focus {
|
40 |
+
outline: none
|
41 |
+
}
|
42 |
+
.wc-shortcodes-accordion .wc-shortcodes-accordion-trigger.ui-state-hover { }
|
43 |
+
.wc-shortcodes-accordion .wc-shortcodes-accordion-trigger.ui-state-active { }
|
44 |
+
.wc-shortcodes-accordion .wc-shortcodes-accordion-trigger.ui-state-active a { }
|
45 |
+
.wc-shortcodes-accordion .ui-accordion-content {
|
46 |
+
padding: 20px;
|
47 |
+
border: 1px solid #cccccc;
|
48 |
+
border-top: 0px;
|
49 |
+
}
|
50 |
+
.wc-shortcodes-accordion .ui-accordion-content *:last-child {
|
51 |
+
margin-bottom: 0
|
52 |
+
}
|
53 |
+
.wc-shortcodes-accordion .ui-icon {
|
54 |
+
position: absolute;
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
+
/**
|
59 |
+
* [wc_toggle]
|
60 |
+
* ----------------------------------------------------------------------------
|
61 |
+
*/
|
62 |
+
.wc-shortcodes-toggle {
|
63 |
+
margin-bottom: 20px;
|
64 |
+
}
|
65 |
+
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger {
|
66 |
+
display: block;
|
67 |
+
position: relative;
|
68 |
+
padding: 0;
|
69 |
+
border: 1px solid #cccccc;
|
70 |
+
outline: 0;
|
71 |
+
margin: 3px 0 0 0;
|
72 |
+
}
|
73 |
+
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger a {
|
74 |
+
display: block;
|
75 |
+
padding: 10px 20px;
|
76 |
+
cursor: pointer;
|
77 |
+
}
|
78 |
+
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger.active a {
|
79 |
+
}
|
80 |
+
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger:first-child {
|
81 |
+
margin-top: 0;
|
82 |
+
}
|
83 |
+
.wc-shortcodes-toggle .wc-shortcodes-toggle-container {
|
84 |
+
display: none;
|
85 |
+
overflow: hidden;
|
86 |
+
padding: 20px;
|
87 |
+
border: 1px solid #cccccc;
|
88 |
+
border-top: 0px;
|
89 |
+
}
|
90 |
+
.wc-shortcodes-toggle .wc-shortcodes-toggle-container *:last-child {
|
91 |
+
margin-bottom: 0
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
/**
|
96 |
+
* [wc_tabs]
|
97 |
+
* ----------------------------------------------------------------------------
|
98 |
+
*/
|
99 |
+
.wc-shortcodes-tabs {
|
100 |
+
margin-bottom: 20px;
|
101 |
+
}
|
102 |
+
.wc-shortcodes-tabs ul.ui-tabs-nav {
|
103 |
+
display: block;
|
104 |
+
margin: 0;
|
105 |
+
padding: 0;
|
106 |
+
border-bottom: solid 1px #cccccc;
|
107 |
+
}
|
108 |
+
.wc-shortcodes-tabs ul.ui-tabs-nav li {
|
109 |
+
display: block;
|
110 |
+
width: auto;
|
111 |
+
padding: 0;
|
112 |
+
float: left;
|
113 |
+
margin: 0 0 -1px 0;
|
114 |
+
outline: none;
|
115 |
+
}
|
116 |
+
.wc-shortcodes-tabs ul.ui-tabs-nav li a {
|
117 |
+
display: block;
|
118 |
+
width: auto;
|
119 |
+
padding: 10px 20px;
|
120 |
+
border: 1px solid #cccccc;
|
121 |
+
border-width: 1px 1px 0 1px;
|
122 |
+
margin-right: 3px;
|
123 |
+
outline: none;
|
124 |
+
}
|
125 |
+
.wc-shortcodes-tabs ul.ui-tabs-nav li a:hover { }
|
126 |
+
.wc-shortcodes-tabs ul.ui-tabs-nav .ui-state-active a {
|
127 |
+
background-color: #ffffff;
|
128 |
+
border-bottom-width: 0;
|
129 |
+
border-bottom-color: transparent;
|
130 |
+
}
|
131 |
+
.wc-shortcodes-tabs ul.ui-tabs-nav .ui-state-active a:hover { }
|
132 |
+
.wc-shortcodes-tabs .tab-content {
|
133 |
+
background: #ffffff;
|
134 |
+
padding: 20px;
|
135 |
+
border-left: solid 1px #cccccc;
|
136 |
+
border-right: solid 1px #cccccc;
|
137 |
+
border-bottom: solid 1px #cccccc;
|
138 |
+
}
|
139 |
+
.wc-shortcodes-tabs .tab-content *:last-child {
|
140 |
+
margin-bottom: 0
|
141 |
+
}
|
142 |
+
.wc-shortcodes-tabs .ui-tabs-hide {
|
143 |
+
display: none
|
144 |
+
}
|
145 |
+
|
146 |
+
|
147 |
+
/**
|
148 |
+
* [wc_row]
|
149 |
+
* ----------------------------------------------------------------------------
|
150 |
+
*/
|
151 |
+
.wc-shortcodes-row {
|
152 |
+
display: block;
|
153 |
+
width: 100%;
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
/**
|
158 |
+
* [wc_column]
|
159 |
+
* ----------------------------------------------------------------------------
|
160 |
+
*/
|
161 |
+
.wc-shortcodes-one-half { width: 48% }
|
162 |
+
.wc-shortcodes-one-third { width: 30.66% }
|
163 |
+
.wc-shortcodes-two-third { width: 65.33% }
|
164 |
+
.wc-shortcodes-one-fourth { width: 22% }
|
165 |
+
.wc-shortcodes-three-fourth { width: 74% }
|
166 |
+
.wc-shortcodes-one-fifth { width: 16.8% }
|
167 |
+
.wc-shortcodes-two-fifth { width: 37.6% }
|
168 |
+
.wc-shortcodes-three-fifth { width: 58.4% }
|
169 |
+
.wc-shortcodes-four-fifth { width: 67.2% }
|
170 |
+
.wc-shortcodes-one-sixth { width: 13.33% }
|
171 |
+
.wc-shortcodes-five-sixth { width: 82.67% }
|
172 |
+
|
173 |
+
.wc-shortcodes-one-half,
|
174 |
+
.wc-shortcodes-one-third,
|
175 |
+
.wc-shortcodes-two-third,
|
176 |
+
.wc-shortcodes-three-fourth,
|
177 |
+
.wc-shortcodes-one-fourth,
|
178 |
+
.wc-shortcodes-one-fifth,
|
179 |
+
.wc-shortcodes-two-fifth,
|
180 |
+
.wc-shortcodes-three-fifth,
|
181 |
+
.wc-shortcodes-four-fifth,
|
182 |
+
.wc-shortcodes-one-sixth,
|
183 |
+
.wc-shortcodes-five-sixth {
|
184 |
+
position: relative;
|
185 |
+
margin-left: 4%;
|
186 |
+
margin-bottom: 0;
|
187 |
+
float: left;
|
188 |
+
-webkit-box-sizing: border-box;
|
189 |
+
-moz-box-sizing: border-box;
|
190 |
+
box-sizing: border-box;
|
191 |
+
}
|
192 |
+
.wc-shortcodes-column-first {
|
193 |
+
margin-left: 0!important;
|
194 |
+
clear: left;
|
195 |
+
}
|
196 |
+
|
197 |
+
@media (max-width: 480px) {
|
198 |
+
body {
|
199 |
+
.wc-shortcodes-one-half,
|
200 |
+
.wc-shortcodes-one-third,
|
201 |
+
.wc-shortcodes-two-third,
|
202 |
+
.wc-shortcodes-three-fourth,
|
203 |
+
.wc-shortcodes-one-fourth,
|
204 |
+
.wc-shortcodes-one-fifth,
|
205 |
+
.wc-shortcodes-two-fifth,
|
206 |
+
.wc-shortcodes-three-fifth,
|
207 |
+
.wc-shortcodes-four-fifth,
|
208 |
+
.wc-shortcodes-one-sixth,
|
209 |
+
.wc-shortcodes-five-sixth {
|
210 |
+
width: 100%;
|
211 |
+
float: none;
|
212 |
+
margin-left: 0;
|
213 |
+
margin-bottom: 0;
|
214 |
+
}
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
|
219 |
+
/**
|
220 |
+
* [wc_testimonials]
|
221 |
+
* ----------------------------------------------------------------------------
|
222 |
+
*/
|
223 |
+
.wc-shortcodes-testimonial {
|
224 |
+
margin-bottom: 20px;
|
225 |
+
}
|
226 |
+
.wc-shortcodes-testimonial-content {
|
227 |
+
position: relative;
|
228 |
+
float: left;
|
229 |
+
background: #eeeeee;;
|
230 |
+
padding: 20px;
|
231 |
+
}
|
232 |
+
.wc-shortcodes-testimonial-content:after {
|
233 |
+
content: "";
|
234 |
+
position: absolute;
|
235 |
+
left: 12px;
|
236 |
+
bottom: -15px;
|
237 |
+
width: 0px;
|
238 |
+
height: 0px;
|
239 |
+
border-bottom: 15px solid rgba(255,255,255,0);
|
240 |
+
border-top: 15px solid rgba(255,255,255,0);
|
241 |
+
border-right: 15px solid #eeeeee;
|
242 |
+
font-size: 0px;
|
243 |
+
line-height: 0px;
|
244 |
+
}
|
245 |
+
.wc-shortcodes-testimonial-content *:last-child {
|
246 |
+
margin-bottom: 0;
|
247 |
+
clear: both;
|
248 |
+
}
|
249 |
+
.wc-shortcodes-testimonial-author {
|
250 |
+
float: left;
|
251 |
+
margin-top: 20px;
|
252 |
+
margin-left: 15px;
|
253 |
+
}
|
254 |
+
.wc-shortcodes-testimonial-right .wc-shortcodes-testimonial-content:after {
|
255 |
+
right: 12px;
|
256 |
+
left: auto;
|
257 |
+
bottom: -15px;
|
258 |
+
border-left: 15px solid #eeeeee;
|
259 |
+
border-right-width: 0;
|
260 |
+
}
|
261 |
+
.wc-shortcodes-testimonial-right .wc-shortcodes-testimonial-author {
|
262 |
+
float: right;
|
263 |
+
margin-right: 15px;
|
264 |
+
margin-left: 0;
|
265 |
+
text-align: right;
|
266 |
+
}
|
267 |
+
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Border
|
271 |
+
* ----------------------------------------------------------------------------
|
272 |
+
*/
|
273 |
+
.wc-shortcodes-divider {
|
274 |
+
display: block;
|
275 |
+
width: 100%;
|
276 |
+
background: none;
|
277 |
+
}
|
278 |
+
|
279 |
+
/* Image Line */
|
280 |
+
.wc-shortcodes-divider.wc-shortcodes-divider-style-image {
|
281 |
+
border: 0;
|
282 |
+
height: 10px;
|
283 |
+
background: url("../img/circle-border.png") repeat-x center left scroll;
|
284 |
+
}
|
285 |
+
|
286 |
+
/* Single Solid Line */
|
287 |
+
.wc-shortcodes-divider.wc-shortcodes-divider-style-solid {
|
288 |
+
border: 0;
|
289 |
+
height: auto;
|
290 |
+
background: none;
|
291 |
+
border-bottom: 1px solid #cccccc;
|
292 |
+
}
|
293 |
+
|
294 |
+
/* Single Dotted Line */
|
295 |
+
.wc-shortcodes-divider.wc-shortcodes-divider-style-dotted {
|
296 |
+
border: 0;
|
297 |
+
height: auto;
|
298 |
+
background: none;
|
299 |
+
border-bottom: 1px dotted #cccccc;
|
300 |
+
}
|
301 |
+
|
302 |
+
/* Single Dashed Line */
|
303 |
+
.wc-shortcodes-divider.wc-shortcodes-divider-style-dashed {
|
304 |
+
border: 0;
|
305 |
+
height: auto;
|
306 |
+
background: none;
|
307 |
+
border-bottom: 1px dashed #cccccc;
|
308 |
+
}
|
309 |
+
|
310 |
+
/* Double Solid Line */
|
311 |
+
.wc-shortcodes-divider.wc-shortcodes-divider-line-double.wc-shortcodes-divider-style-solid {
|
312 |
+
border: 0;
|
313 |
+
background: none;
|
314 |
+
height: 5px;
|
315 |
+
border-top: 1px solid #cccccc;
|
316 |
+
border-bottom: 1px solid #cccccc;
|
317 |
+
}
|
318 |
+
|
319 |
+
/* Double Dotted Line */
|
320 |
+
.wc-shortcodes-divider.wc-shortcodes-divider-line-double.wc-shortcodes-divider-style-dotted {
|
321 |
+
border: 0;
|
322 |
+
background: none;
|
323 |
+
height: 5px;
|
324 |
+
border-top: 1px dotted #cccccc;
|
325 |
+
border-bottom: 1px dotted #cccccc;
|
326 |
+
}
|
327 |
+
|
328 |
+
/* Double Dashed Line */
|
329 |
+
.wc-shortcodes-divider.wc-shortcodes-divider-line-double.wc-shortcodes-divider-style-dashed {
|
330 |
+
border: 0;
|
331 |
+
background: none;
|
332 |
+
height: 5px;
|
333 |
+
border-top: 1px dashed #cccccc;
|
334 |
+
border-bottom: 1px dashed #cccccc;
|
335 |
+
}
|
336 |
+
|
337 |
+
|
338 |
+
/**
|
339 |
+
* [wc_spacing]
|
340 |
+
* ----------------------------------------------------------------------------
|
341 |
+
*/
|
342 |
+
.wc-shortcodes-spacing {
|
343 |
+
display: block !important;
|
344 |
+
height: auto;
|
345 |
+
margin: 0 !important;
|
346 |
+
padding: 0 !important;
|
347 |
+
border: none !important;
|
348 |
+
outline: none !important;
|
349 |
+
background: none !important;
|
350 |
+
}
|
351 |
+
|
352 |
+
|
353 |
+
/**
|
354 |
+
* [wc_button]
|
355 |
+
* ----------------------------------------------------------------------------
|
356 |
+
*/
|
357 |
+
.wc-shortcodes-button {
|
358 |
+
line-height: 1.3;
|
359 |
+
margin-right: 10px;
|
360 |
+
margin-bottom: 20px;
|
361 |
+
}
|
362 |
+
.wc-shortcodes-button:visited,
|
363 |
+
.wc-shortcodes-button {
|
364 |
+
border: none;
|
365 |
+
text-decoration: none;
|
366 |
+
color: #ffffff;
|
367 |
+
background-color: #428bca;
|
368 |
+
border: 1px solid #357ebd;
|
369 |
+
display: inline-block;
|
370 |
+
padding: 6px 20px;
|
371 |
+
}
|
372 |
+
|
373 |
+
.wc-shortcodes-button:hover,
|
374 |
+
.wc-shortcodes-button:focus {
|
375 |
+
color: #ffffff;
|
376 |
+
background-color: #3276b1;
|
377 |
+
border-color: #285e8e;
|
378 |
+
text-decoration: none;
|
379 |
+
outline: none;
|
380 |
+
}
|
381 |
+
|
382 |
+
.wc-shortcodes-button:active {}
|
383 |
+
|
384 |
+
/* Secondary */
|
385 |
+
.wc-shortcodes-button.wc-shortcodes-button-secondary:visited,
|
386 |
+
.wc-shortcodes-button.wc-shortcodes-button-secondary {
|
387 |
+
color: #333333;
|
388 |
+
background-color: #ffffff;
|
389 |
+
border: 1px solid #cccccc;
|
390 |
+
}
|
391 |
+
|
392 |
+
.wc-shortcodes-button.wc-shortcodes-button-secondary:hover,
|
393 |
+
.wc-shortcodes-button.wc-shortcodes-button-secondary:focus {
|
394 |
+
color: #333333;
|
395 |
+
background-color: #ebebeb;
|
396 |
+
border-color: #adadad;
|
397 |
+
}
|
398 |
+
|
399 |
+
/* Inverse */
|
400 |
+
.wc-shortcodes-button.wc-shortcodes-button-inverse:visited,
|
401 |
+
.wc-shortcodes-button.wc-shortcodes-button-inverse {
|
402 |
+
color: #357ebd;
|
403 |
+
background-color: #e4ecf3;
|
404 |
+
border: 1px solid #428bca;
|
405 |
+
}
|
406 |
+
|
407 |
+
.wc-shortcodes-button.wc-shortcodes-button-inverse:hover,
|
408 |
+
.wc-shortcodes-button.wc-shortcodes-button-inverse:focus {
|
409 |
+
color: #ffffff;
|
410 |
+
background-color: #428bca;
|
411 |
+
border-color: #357ebd;
|
412 |
+
}
|
413 |
+
|
414 |
+
/* Success */
|
415 |
+
.wc-shortcodes-button.wc-shortcodes-button-success:visited,
|
416 |
+
.wc-shortcodes-button.wc-shortcodes-button-success {
|
417 |
+
color: #ffffff;
|
418 |
+
background-color: #5cb85c;
|
419 |
+
border: 1px solid #4cae4c;
|
420 |
+
}
|
421 |
+
|
422 |
+
.wc-shortcodes-button.wc-shortcodes-button-success:hover,
|
423 |
+
.wc-shortcodes-button.wc-shortcodes-button-success:focus {
|
424 |
+
color: #ffffff;
|
425 |
+
background-color: #47a447;
|
426 |
+
border-color: #398439;
|
427 |
+
}
|
428 |
+
|
429 |
+
/* Warning */
|
430 |
+
.wc-shortcodes-button.wc-shortcodes-button-warning:visited,
|
431 |
+
.wc-shortcodes-button.wc-shortcodes-button-warning {
|
432 |
+
color: #ffffff;
|
433 |
+
background-color: #f0ad4e;
|
434 |
+
border: 1px solid #eea236;
|
435 |
+
}
|
436 |
+
|
437 |
+
.wc-shortcodes-button.wc-shortcodes-button-warning:hover,
|
438 |
+
.wc-shortcodes-button.wc-shortcodes-button-warning:focus {
|
439 |
+
color: #ffffff;
|
440 |
+
background-color: #ed9c28;
|
441 |
+
border-color: #d58512;
|
442 |
+
}
|
443 |
+
|
444 |
+
/* Danger */
|
445 |
+
.wc-shortcodes-button.wc-shortcodes-button-danger:visited,
|
446 |
+
.wc-shortcodes-button.wc-shortcodes-button-danger {
|
447 |
+
color: #ffffff;
|
448 |
+
background-color: #d9534f;
|
449 |
+
border: 1px solid #d43f3a;
|
450 |
+
}
|
451 |
+
|
452 |
+
.wc-shortcodes-button.wc-shortcodes-button-danger:hover,
|
453 |
+
.wc-shortcodes-button.wc-shortcodes-button-danger:focus {
|
454 |
+
color: #ffffff;
|
455 |
+
background-color: #d2322d;
|
456 |
+
border-color: #ac2925;
|
457 |
+
}
|
458 |
+
|
459 |
+
/* Info */
|
460 |
+
.wc-shortcodes-button.wc-shortcodes-button-info:visited,
|
461 |
+
.wc-shortcodes-button.wc-shortcodes-button-info {
|
462 |
+
color: #ffffff;
|
463 |
+
background-color: #5bc0de;
|
464 |
+
border: 1px solid #46b8da;
|
465 |
+
}
|
466 |
+
|
467 |
+
.wc-shortcodes-button.wc-shortcodes-button-info:hover,
|
468 |
+
.wc-shortcodes-button.wc-shortcodes-button-info:focus {
|
469 |
+
color: #ffffff;
|
470 |
+
background-color: #39b3d7;
|
471 |
+
border-color: #269abc;
|
472 |
+
}
|
473 |
+
|
474 |
+
|
475 |
+
/**
|
476 |
+
* [wc_box]
|
477 |
+
* ----------------------------------------------------------------------------
|
478 |
+
*/
|
479 |
+
.wc-shortcodes-box {
|
480 |
+
display: block;
|
481 |
+
padding: 20px;
|
482 |
+
-webkit-box-sizing: border-box;
|
483 |
+
-moz-box-sizing: border-box;
|
484 |
+
box-sizing: border-box;
|
485 |
+
margin-bottom: 20px;
|
486 |
+
}
|
487 |
+
.wc-shortcodes-box *:last-child {
|
488 |
+
margin: 0;
|
489 |
+
}
|
490 |
+
.wc-shortcodes-box *:first-child {
|
491 |
+
margin-top: 0;
|
492 |
+
}
|
493 |
+
|
494 |
+
/* Primary Box */
|
495 |
+
.wc-shortcodes-box.wc-shortcodes-box-primary {
|
496 |
+
background-color: #428bca;
|
497 |
+
border: 1px solid #358ebd;
|
498 |
+
}
|
499 |
+
.wc-shortcodes-box.wc-shortcodes-box-primary * {
|
500 |
+
color: #ffffff;
|
501 |
+
}
|
502 |
+
|
503 |
+
/* Secondary Box */
|
504 |
+
.wc-shortcodes-box.wc-shortcodes-box-secondary {
|
505 |
+
background-color: #ffffff;
|
506 |
+
border: 1px solid #cccccc;
|
507 |
+
}
|
508 |
+
.wc-shortcodes-box.wc-shortcodes-box-secondary * {
|
509 |
+
color: #333333;
|
510 |
+
}
|
511 |
+
|
512 |
+
/* Inverse Box */
|
513 |
+
.wc-shortcodes-box.wc-shortcodes-box-inverse {
|
514 |
+
background-color: #e4ecf3;
|
515 |
+
border: 1px solid #428bca;
|
516 |
+
}
|
517 |
+
.wc-shortcodes-box.wc-shortcodes-box-inverse * {
|
518 |
+
color: #357ebd;
|
519 |
+
}
|
520 |
+
|
521 |
+
/* Success Box */
|
522 |
+
.wc-shortcodes-box.wc-shortcodes-box-success {
|
523 |
+
background-color: #5cb85c;
|
524 |
+
border: 1px solid #4cae4c;
|
525 |
+
}
|
526 |
+
.wc-shortcodes-box.wc-shortcodes-box-success * {
|
527 |
+
color: #ffffff;
|
528 |
+
}
|
529 |
+
|
530 |
+
/* Warning Box */
|
531 |
+
.wc-shortcodes-box.wc-shortcodes-box-warning {
|
532 |
+
background-color: #f0ad4e;
|
533 |
+
border: 1px solid #eea236;
|
534 |
+
}
|
535 |
+
.wc-shortcodes-box.wc-shortcodes-box-warning * {
|
536 |
+
color: #ffffff;
|
537 |
+
}
|
538 |
+
|
539 |
+
/* Danger Box */
|
540 |
+
.wc-shortcodes-box.wc-shortcodes-box-danger {
|
541 |
+
background-color: #d9534f;
|
542 |
+
border: 1px solid #d43f3a;
|
543 |
+
}
|
544 |
+
.wc-shortcodes-box.wc-shortcodes-box-danger * {
|
545 |
+
color: #ffffff;
|
546 |
+
}
|
547 |
+
|
548 |
+
/* Info */
|
549 |
+
.wc-shortcodes-box.wc-shortcodes-box-info {
|
550 |
+
background-color: #5bc0de;
|
551 |
+
border: 1px solid #46b8da;
|
552 |
+
}
|
553 |
+
.wc-shortcodes-box.wc-shortcodes-box-info * {
|
554 |
+
color: #ffffff;
|
555 |
+
}
|
556 |
+
|
557 |
+
|
558 |
+
/**
|
559 |
+
* [wc_googlemap]
|
560 |
+
* ----------------------------------------------------------------------------
|
561 |
+
*/
|
562 |
+
.googlemap {
|
563 |
+
position: relative;
|
564 |
+
max-width: inherit;
|
565 |
+
margin-bottom: 20px;
|
566 |
+
}
|
567 |
+
.googlemap .map_canvas {
|
568 |
+
width: 100%; height: 100%;
|
569 |
+
}
|
570 |
+
.googlemap .map_canvas h3 {
|
571 |
+
margin: 0 0 10px; font-size: 14px;
|
572 |
+
}
|
573 |
+
#page .map_canvas img {
|
574 |
+
max-width: none;
|
575 |
+
}
|
576 |
+
|
577 |
+
|
578 |
+
/**
|
579 |
+
* [wc_social_icons]
|
580 |
+
* ----------------------------------------------------------------------------
|
581 |
+
*/
|
582 |
+
.wc-shortcodes-social-icons-wrapper {
|
583 |
+
width: 100%;
|
584 |
+
margin-bottom: 14px;
|
585 |
+
}
|
586 |
+
.wc-shortcodes-social-icons {
|
587 |
+
list-style: none;
|
588 |
+
margin: 0;
|
589 |
+
padding: 0;
|
590 |
+
text-align: left;
|
591 |
+
}
|
592 |
+
.wc-shortcodes-social-icons.wc-shortcodes-social-icons-align-center {
|
593 |
+
text-align: center;
|
594 |
+
}
|
595 |
+
.wc-shortcodes-social-icons.wc-shortcodes-social-icons-align-center li {
|
596 |
+
margin-right: 3px;
|
597 |
+
margin-left: 3px;
|
598 |
+
}
|
599 |
+
.wc-shortcodes-social-icons.wc-shortcodes-social-icons-align-right {
|
600 |
+
text-align: right;
|
601 |
+
}
|
602 |
+
.wc-shortcodes-social-icons.wc-shortcodes-social-icons-align-right li {
|
603 |
+
margin-right: 0;
|
604 |
+
margin-left: 6px;
|
605 |
+
}
|
606 |
+
.wc-shortcodes-social-icons.wc-shortcodes-social-icons-size-medium img {
|
607 |
+
max-height: 24px;
|
608 |
+
}
|
609 |
+
.wc-shortcodes-social-icons.wc-shortcodes-social-icons-size-small img {
|
610 |
+
max-height: 16px;
|
611 |
+
}
|
612 |
+
.wc-shortcodes-social-icons li {
|
613 |
+
display: inline-block;
|
614 |
+
margin-right: 6px;
|
615 |
+
margin-bottom: 6px;
|
616 |
+
}
|
617 |
+
.wc-shortcodes-social-icons li img {
|
618 |
+
max-height: 48px;
|
619 |
+
}
|
620 |
+
.wc-shortcodes-social-icons li:last-child {
|
621 |
+
margin-right: 0;
|
622 |
+
}
|
623 |
+
|
624 |
+
|
625 |
+
/**
|
626 |
+
* [wc_skillbar]
|
627 |
+
* ----------------------------------------------------------------------------
|
628 |
+
*/
|
629 |
+
.wc-shortcodes-skillbar {
|
630 |
+
position: relative;
|
631 |
+
display: block;
|
632 |
+
margin-bottom: 15px;
|
633 |
+
width: 100%;
|
634 |
+
background: #eee;
|
635 |
+
height: 35px;
|
636 |
+
border-radius: 3px;
|
637 |
+
-moz-border-radius: 3px;
|
638 |
+
-webkit-border-radius: 3px;
|
639 |
+
-webkit-transition: 0.4s linear;
|
640 |
+
-moz-transition: 0.4s linear;
|
641 |
+
-ms-transition: 0.4s linear;
|
642 |
+
-o-transition: 0.4s linear;
|
643 |
+
transition: 0.4s linear;
|
644 |
+
-webkit-transition-property: width, background-color;
|
645 |
+
-moz-transition-property: width, background-color;
|
646 |
+
-ms-transition-property: width, background-color;
|
647 |
+
-o-transition-property: width, background-color;
|
648 |
+
transition-property: width, background-color;
|
649 |
+
}
|
650 |
+
.wc-shortcodes-skillbar-title {
|
651 |
+
position: absolute;
|
652 |
+
top: 0;
|
653 |
+
left: 0;
|
654 |
+
font-weight: bold;
|
655 |
+
font-size: 13px;
|
656 |
+
color: #fff;
|
657 |
+
background: #6adcfa;
|
658 |
+
-webkit-border-top-left-radius: 3px;
|
659 |
+
-webkit-border-bottom-left-radius: 4px;
|
660 |
+
-moz-border-radius-topleft: 3px;
|
661 |
+
-moz-border-radius-bottomleft: 3px;
|
662 |
+
border-top-left-radius: 3px;
|
663 |
+
border-bottom-left-radius: 3px;
|
664 |
+
}
|
665 |
+
.wc-shortcodes-skillbar-title span {
|
666 |
+
display: block;
|
667 |
+
background: rgba(0,0,0,0.1);
|
668 |
+
padding: 0 20px;
|
669 |
+
height: 35px;
|
670 |
+
line-height: 35px;
|
671 |
+
-webkit-border-top-left-radius: 3px;
|
672 |
+
-webkit-border-bottom-left-radius: 3px;
|
673 |
+
-moz-border-radius-topleft: 3px;
|
674 |
+
-moz-border-radius-bottomleft: 3px;
|
675 |
+
border-top-left-radius: 3px;
|
676 |
+
border-bottom-left-radius: 3px;
|
677 |
+
}
|
678 |
+
.wc-shortcodes-skillbar-bar {
|
679 |
+
height: 35px;
|
680 |
+
width: 0px;
|
681 |
+
background: #6adcfa;
|
682 |
+
border-radius: 3px;
|
683 |
+
-moz-border-radius: 3px;
|
684 |
+
-webkit-border-radius: 3px;
|
685 |
+
}
|
686 |
+
.wc-shortcodes-skill-bar-percent {
|
687 |
+
position: absolute;
|
688 |
+
right: 10px;
|
689 |
+
top: 0;
|
690 |
+
font-size: 11px;
|
691 |
+
height: 35px;
|
692 |
+
line-height: 35px;
|
693 |
+
color: #444;
|
694 |
+
color: rgba(0,0,0,0.4);
|
695 |
+
}
|
696 |
+
|
697 |
+
|
698 |
+
/**
|
699 |
+
* [wc_pricing]
|
700 |
+
* ----------------------------------------------------------------------------
|
701 |
+
*/
|
702 |
+
.wc-shortcodes-pricing {
|
703 |
+
margin-bottom: 20px;
|
704 |
+
}
|
705 |
+
.wc-shortcodes-pricing div {
|
706 |
+
list-style: none;
|
707 |
+
}
|
708 |
+
.wc-shortcodes-pricing > div {
|
709 |
+
list-style: none;
|
710 |
+
text-shadow: none;
|
711 |
+
margin-bottom: 0;
|
712 |
+
}
|
713 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-header {
|
714 |
+
background: #428bca;
|
715 |
+
color: #ffffff;
|
716 |
+
text-align: center;
|
717 |
+
padding: 20px 0;
|
718 |
+
border: 1px solid #357ebd;
|
719 |
+
}
|
720 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-header h5 {
|
721 |
+
color: #ffffff;
|
722 |
+
font-size: 130%;
|
723 |
+
margin: 0;
|
724 |
+
padding: 0 20px 10px;
|
725 |
+
}
|
726 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-cost {
|
727 |
+
font-size: 170%;
|
728 |
+
padding-top: 20px;
|
729 |
+
border-top: 1px solid #357ebd;
|
730 |
+
}
|
731 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-per {
|
732 |
+
font-size: 80%;
|
733 |
+
}
|
734 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-content {
|
735 |
+
background: #ffffff;
|
736 |
+
text-align: center;
|
737 |
+
border-left: 1px solid #eeeeee;
|
738 |
+
border-right: 1px solid #eeeeee;
|
739 |
+
}
|
740 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-content ul {
|
741 |
+
margin: 0;
|
742 |
+
padding: 0;
|
743 |
+
list-style: none;
|
744 |
+
}
|
745 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-content ul li {
|
746 |
+
margin: 0;
|
747 |
+
padding: 10px 20px;
|
748 |
+
border-bottom: 1px solid #eeeeee;
|
749 |
+
list-style: none;
|
750 |
+
}
|
751 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-content ul li:nth-child(2n+2) {
|
752 |
+
background: #f7f7f7;
|
753 |
+
}
|
754 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-button {
|
755 |
+
text-align: center;
|
756 |
+
padding: 20px;
|
757 |
+
border: 1px solid #eeeeee;
|
758 |
+
border-top-width: 0;
|
759 |
+
}
|
760 |
+
.wc-shortcodes-pricing .wc-shortcodes-pricing-button .wc-shortcodes-button {
|
761 |
+
float: none;
|
762 |
+
margin: 0;
|
763 |
+
}
|
764 |
+
|
765 |
+
/* Secondary */
|
766 |
+
.wc-shortcodes-pricing.wc-shortcodes-pricing-type-secondary .wc-shortcodes-pricing-header {
|
767 |
+
background: #333333;
|
768 |
+
color: #ffffff;
|
769 |
+
border: 1px solid #cccccc;
|
770 |
+
}
|
771 |
+
.wc-shortcodes-pricing.wc-shortcodes-pricing-type-secondary .wc-shortcodes-pricing-header h5 {
|
772 |
+
color: #ffffff;
|
773 |
+
}
|
774 |
+
.wc-shortcodes-pricing.wc-shortcodes-pricing-type-secondary .wc-shortcodes-pricing-cost {
|
775 |
+
border-top: 1px solid #000000;
|
776 |
+
}
|
777 |
+
|
778 |
+
/* Inverse */
|
779 |
+
.wc-shortcodes-pricing.wc-shortcodes-pricing-type-inverse .wc-shortcodes-pricing-header {
|
780 |
+
background: #e4ecf3;
|
781 |
+
color: #357ebd;
|
782 |
+
border: 1px solid #cccccc;
|
783 |
+
}
|
784 |
+
.wc-shortcodes-pricing.wc-shortcodes-pricing-type-inverse .wc-shortcodes-pricing-header h5 {
|
785 |
+
color: #357ebd;
|
786 |
+
}
|
787 |
+
.wc-shortcodes-pricing.wc-shortcodes-pricing-type-inverse .wc-shortcodes-pricing-cost {
|
788 |
+
border-top: 1px solid #cccccc;
|
789 |
+
}
|
790 |
+
|
791 |
+
|
792 |
+
/**
|
793 |
+
* [wc_highlight]
|
794 |
+
* ----------------------------------------------------------------------------
|
795 |
+
*/
|
796 |
+
.wc-shortcodes-highlight-yellow, .wc-shortcodes-highlight-yellow a {
|
797 |
+
background-color: #fff7a8;
|
798 |
+
color: #695d43;
|
799 |
+
}
|
800 |
+
.wc-shortcodes-highlight-blue, .wc-shortcodes-highlight-blue a {
|
801 |
+
color: #5091b2;
|
802 |
+
background: #e9f7fe;
|
803 |
+
}
|
804 |
+
.wc-shortcodes-highlight-green, .wc-shortcodes-highlight-green a {
|
805 |
+
color: #5f9025;
|
806 |
+
background: #d3e8da;
|
807 |
+
}
|
808 |
+
.wc-shortcodes-highlight-red, .wc-shortcodes-highlight-red a {
|
809 |
+
color: #de5959;
|
810 |
+
background: #ffe9e9;
|
811 |
+
}
|
812 |
+
.wc-shortcodes-highlight-gray, .wc-shortcodes-highlight-gray a {
|
813 |
+
color: #555555;
|
814 |
+
background: #f7f7f7;
|
815 |
+
}
|
816 |
+
|
817 |
+
|
818 |
+
/**
|
819 |
+
* [wc_html]
|
820 |
+
* ----------------------------------------------------------------------------
|
821 |
+
*/
|
822 |
+
.wc-shortcodes-html-wrapper {
|
823 |
+
margin-bottom: 20px;
|
824 |
+
}
|
825 |
+
|
826 |
+
|
827 |
+
/**
|
828 |
+
* [wc_pre]
|
829 |
+
* ----------------------------------------------------------------------------
|
830 |
+
*/
|
831 |
+
/* desert scheme ported from vim to google prettify */
|
832 |
+
pre.prettyprint { display: block; background-color: #333 }
|
833 |
+
pre .nocode { background-color: transparent; color: #000 }
|
834 |
+
pre .str { color: #ffa0a0 } /* string - pink */
|
835 |
+
pre .kwd { color: #f0e68c; font-weight: bold }
|
836 |
+
pre .com { color: #87ceeb } /* comment - skyblue */
|
837 |
+
pre .typ { color: #98fb98 } /* type - lightgreen */
|
838 |
+
pre .lit { color: #cd5c5c } /* literal - darkred */
|
839 |
+
pre .pun { color: #fff } /* punctuation */
|
840 |
+
pre .pln { color: #fff } /* plaintext */
|
841 |
+
pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */
|
842 |
+
pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */
|
843 |
+
pre .atv { color: #ffa0a0 } /* attribute value - pink */
|
844 |
+
pre .dec { color: #98fb98 } /* decimal - lightgreen */
|
845 |
+
|
846 |
+
/* Specify class=linenums on a pre to get line numbering */
|
847 |
+
ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */
|
848 |
+
/* li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } */
|
849 |
+
/* Alternate shading for lines */
|
850 |
+
li.L1,li.L3,li.L5,li.L7,li.L9 { }
|
851 |
+
|
852 |
+
@media print {
|
853 |
+
pre.prettyprint { background-color: transparent; }
|
854 |
+
pre .str, code .str { color: #060 }
|
855 |
+
pre .kwd, code .kwd { color: #006; font-weight: bold }
|
856 |
+
pre .com, code .com { color: #600; font-style: italic }
|
857 |
+
pre .typ, code .typ { color: #404; font-weight: bold }
|
858 |
+
pre .lit, code .lit { color: #044 }
|
859 |
+
pre .pun, code .pun { color: #440 }
|
860 |
+
pre .pln, code .pln { color: #000 }
|
861 |
+
pre .tag, code .tag { color: #006; font-weight: bold }
|
862 |
+
pre .atn, code .atn { color: #404 }
|
863 |
+
pre .atv, code .atv { color: #060 }
|
864 |
+
}
|
865 |
+
|
866 |
+
pre.pre-scrollable {
|
867 |
+
max-height: 600px;
|
868 |
+
}
|
869 |
+
pre.pre-wrap {
|
870 |
+
white-space: pre-wrap; /* css-3 */
|
871 |
+
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
872 |
+
white-space: -pre-wrap; /* Opera 4-6 */
|
873 |
+
white-space: -o-pre-wrap; /* Opera 7 */
|
874 |
+
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
875 |
+
}
|
876 |
+
|
877 |
+
/**
|
878 |
+
* [wc_center]
|
879 |
+
* ----------------------------------------------------------------------------
|
880 |
+
*/
|
881 |
+
.wc-shortcodes-center {
|
882 |
+
margin: 0 auto;
|
883 |
+
width: 100%;
|
884 |
+
}
|
885 |
+
.wc-shortcodes-center.wc-shortcodes-center-inner-align-center {
|
886 |
+
text-align: center;
|
887 |
+
}
|
888 |
+
.wc-shortcodes-center.wc-shortcodes-center-inner-align-left {
|
889 |
+
text-align: left;
|
890 |
+
}
|
891 |
+
.wc-shortcodes-center.wc-shortcodes-center-inner-align-right {
|
892 |
+
text-align: right;
|
893 |
+
}
|
894 |
+
|
895 |
+
|
896 |
+
/**
|
897 |
+
* [wc_heading]
|
898 |
+
* ----------------------------------------------------------------------------
|
899 |
+
*/
|
900 |
+
.wc-shortcodes-heading .wc-shortcodes-heading-style1 {
|
901 |
+
padding-bottom: 20px;
|
902 |
+
border-bottom: 1px solid #cccccc;
|
903 |
+
}
|
904 |
+
.wc-shortcodes-heading.text-align-center {
|
905 |
+
text-align: center;
|
906 |
+
}
|
907 |
+
.wc-shortcodes-heading.text-align-left {
|
908 |
+
text-align: left;
|
909 |
+
}
|
910 |
+
.wc-shortcodes-heading.text-align-right {
|
911 |
+
text-align: right;
|
912 |
+
}
|
913 |
+
|
914 |
+
|
915 |
+
/**
|
916 |
+
* Social Media Widget
|
917 |
+
* ----------------------------------------------------------------------------
|
918 |
+
*/
|
919 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons {
|
920 |
+
text-align: center;
|
921 |
+
}
|
922 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons li {
|
923 |
+
display: inline-block;
|
924 |
+
padding: 3px;
|
925 |
+
margin: 0;
|
926 |
+
-webkit-box-sizing: border-box;
|
927 |
+
-moz-box-sizing: border-box;
|
928 |
+
box-sizing: border-box;
|
929 |
+
}
|
930 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons.wc-shortcodes-columns-8 li {
|
931 |
+
width: 12.5%;
|
932 |
+
}
|
933 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons.wc-shortcodes-columns-7 li {
|
934 |
+
width: 14.28571428%;
|
935 |
+
}
|
936 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons.wc-shortcodes-columns-6 li {
|
937 |
+
width: 16.66666666%;
|
938 |
+
}
|
939 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons.wc-shortcodes-columns-5 li {
|
940 |
+
width: 20%;
|
941 |
+
}
|
942 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons.wc-shortcodes-columns-4 li {
|
943 |
+
width: 25%;
|
944 |
+
}
|
945 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons.wc-shortcodes-columns-3 li {
|
946 |
+
width: 33.33333333%;
|
947 |
+
}
|
948 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons.wc-shortcodes-columns-2 li {
|
949 |
+
width: 50%;
|
950 |
+
}
|
951 |
+
.widget_wc_shortcodes_social_icons .wc-shortcodes-social-icons.wc-shortcodes-columns-1 li {
|
952 |
+
width: 100%;
|
953 |
+
}
|
includes/functions.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* filter social url. For example, we want to add
|
4 |
+
* mailto: to an email address.
|
5 |
+
*
|
6 |
+
* @access public
|
7 |
+
* @return void
|
8 |
+
*/
|
9 |
+
function wc_shortcodes_smart_social_link( $social_link, $name ) {
|
10 |
+
switch ( $name ) {
|
11 |
+
case 'email' :
|
12 |
+
// some users may have already inserted mailto:, so let's remove it.
|
13 |
+
$social_link = str_replace( 'mailto:', '', $social_link );
|
14 |
+
$social_link = 'mailto:'.$social_link;
|
15 |
+
break;
|
16 |
+
}
|
17 |
+
|
18 |
+
return $social_link;
|
19 |
+
}
|
20 |
+
add_filter( 'wc_shortcodes_social_link' , 'wc_shortcodes_smart_social_link', 10, 2 );
|
includes/img/blogger.png
ADDED
Binary file
|
includes/img/bloglovin.png
ADDED
Binary file
|
includes/img/circle-border.png
ADDED
Binary file
|
includes/img/email.png
ADDED
Binary file
|
includes/img/etsy.png
ADDED
Binary file
|
includes/img/facebook.png
ADDED
Binary file
|
includes/img/flickr.png
ADDED
Binary file
|
includes/img/flower.png
ADDED
Binary file
|
includes/img/google.png
ADDED
Binary file
|
includes/img/instagram.png
ADDED
Binary file
|
includes/img/picasa.png
ADDED
Binary file
|
includes/img/pinterest.png
ADDED
Binary file
|
includes/img/rss.png
ADDED
Binary file
|
includes/img/shopping.png
ADDED
Binary file
|
includes/img/tumblr.png
ADDED
Binary file
|
includes/img/twitter.png
ADDED
Binary file
|
includes/img/vimeo.png
ADDED
Binary file
|
includes/img/youtube.png
ADDED
Binary file
|
includes/js/accordion.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
( function( $ ) {
|
includes/js/admin.js
ADDED
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WC Shortcodes Gallery Settings
|
3 |
+
*/
|
4 |
+
(function($) {
|
5 |
+
var $body = $("body"), file_frame = [], media = wp.media, custom_uploader;
|
6 |
+
|
7 |
+
//fetch preExisting selection of galleries. change the gallery state based on wheter we got a selection or not to "Edit gallery" or "AAdd gallery"
|
8 |
+
fetchSelection = function(ids, options) {
|
9 |
+
if(typeof ids == 'undefined') return; //<--happens on multi_image insert for modal group
|
10 |
+
|
11 |
+
var id_array = ids.split(','),
|
12 |
+
args = {orderby: "post__in", order: "ASC", type: "image", perPage: -1, post__in:id_array},
|
13 |
+
attachments = wp.media.query( args ),
|
14 |
+
selection = new wp.media.model.Selection( attachments.models,
|
15 |
+
{
|
16 |
+
props: attachments.props.toJSON(),
|
17 |
+
multiple: true
|
18 |
+
});
|
19 |
+
|
20 |
+
|
21 |
+
if(options.state == 'gallery-library' && id_array.length && !isNaN(parseInt(id_array[0],10)))
|
22 |
+
{
|
23 |
+
options.state = 'gallery-edit';
|
24 |
+
}
|
25 |
+
return selection;
|
26 |
+
};
|
27 |
+
|
28 |
+
$body.on('click', '.wc-shortcodes-image-upload', function( event ) {
|
29 |
+
event.preventDefault();
|
30 |
+
|
31 |
+
var clicked = $(this),
|
32 |
+
options = clicked.data(),
|
33 |
+
parent = clicked.parent(),
|
34 |
+
target = parent.find(options.target),
|
35 |
+
preview = parent.find(options.preview), // will not find <div> tag inside of <p>
|
36 |
+
prefill = fetchSelection(target.val(), options),
|
37 |
+
frame_key = _.random(0, 999999999999999999);
|
38 |
+
//set vars so we know that an editor is open
|
39 |
+
|
40 |
+
// If the media frame already exists, reopen it.
|
41 |
+
if ( file_frame[frame_key] ) {
|
42 |
+
file_frame[frame_key].open();
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
// Create the media frame.
|
47 |
+
file_frame[frame_key] = wp.media({
|
48 |
+
frame: options.frame,
|
49 |
+
state: options.state,
|
50 |
+
library: { type: 'image' },
|
51 |
+
button: { text: options.button },
|
52 |
+
className: options['class'],
|
53 |
+
selection: prefill
|
54 |
+
});
|
55 |
+
|
56 |
+
if ( 'wordpresscanvas_insert_single' == options.state ) {
|
57 |
+
// add the single insert state
|
58 |
+
file_frame[frame_key].states.add([
|
59 |
+
// Main states.
|
60 |
+
new media.controller.Library({
|
61 |
+
id: 'wordpresscanvas_insert_single',
|
62 |
+
title: clicked.data( 'title' ),
|
63 |
+
priority: 20,
|
64 |
+
toolbar: 'select',
|
65 |
+
filterable: 'uploaded',
|
66 |
+
library: media.query( file_frame[frame_key].options.library ),
|
67 |
+
multiple: false,
|
68 |
+
editable: true,
|
69 |
+
displayUserSettings: false,
|
70 |
+
displaySettings: true,
|
71 |
+
allowLocalEdits: true
|
72 |
+
// AttachmentView: media.view.Attachment.Library
|
73 |
+
})
|
74 |
+
]);
|
75 |
+
}
|
76 |
+
else if ( 'wordpresscanvas_insert_multi' == options.state ) {
|
77 |
+
// add the single insert state
|
78 |
+
file_frame[frame_key].states.add([
|
79 |
+
new media.controller.Library({
|
80 |
+
id: 'wordpresscanvas_insert_multi',
|
81 |
+
title: clicked.data( 'title' ),
|
82 |
+
priority: 20,
|
83 |
+
toolbar: 'select',
|
84 |
+
filterable: 'uploaded',
|
85 |
+
library: media.query( file_frame[frame_key].options.library ),
|
86 |
+
multiple: 'add',
|
87 |
+
editable: true,
|
88 |
+
displayUserSettings: false,
|
89 |
+
displaySettings: false,
|
90 |
+
allowLocalEdits: true
|
91 |
+
// AttachmentView: media.view.Attachment.Library
|
92 |
+
})
|
93 |
+
]);
|
94 |
+
}
|
95 |
+
|
96 |
+
// When an image is selected, run a callback.
|
97 |
+
// Bind to various events since single insert and multiple trigger on different events and work with different data
|
98 |
+
file_frame[frame_key].on( 'select update insert', function(e) {
|
99 |
+
var selection, state = file_frame[frame_key].state();
|
100 |
+
|
101 |
+
// multiple items
|
102 |
+
if(typeof e !== 'undefined') {
|
103 |
+
selection = e;
|
104 |
+
}
|
105 |
+
// single item
|
106 |
+
else {
|
107 |
+
selection = state.get('selection');
|
108 |
+
}
|
109 |
+
|
110 |
+
var values , display, element, preview_html= "", preview_img;
|
111 |
+
|
112 |
+
values = selection.map( function( attachment ) {
|
113 |
+
element = attachment.toJSON();
|
114 |
+
|
115 |
+
if ( 'url' == options.fetch ) {
|
116 |
+
display = state.display( attachment ).toJSON();
|
117 |
+
|
118 |
+
if ( 'undefined' == typeof element.sizes ) {
|
119 |
+
preview_img = element.url;
|
120 |
+
preview_html = "";
|
121 |
+
}
|
122 |
+
else if ( ( 'string' == typeof options.imgsize ) && ( 'object' == typeof element.sizes[ options.imgsize ] ) ) {
|
123 |
+
preview_img = element.sizes[ options.imgsize ].url;
|
124 |
+
preview_html += "<img src='"+preview_img+"' />";
|
125 |
+
}
|
126 |
+
else {
|
127 |
+
preview_img = element.sizes[display.size].url;
|
128 |
+
preview_html += "<img src='"+preview_img+"' />";
|
129 |
+
}
|
130 |
+
|
131 |
+
return preview_img;
|
132 |
+
}
|
133 |
+
else if(options.fetch == 'id') {
|
134 |
+
preview_img = typeof element.sizes['thumbnail'] != 'undefined' ? element.sizes['thumbnail'].url : element.url ;
|
135 |
+
preview_html += "<img src='"+preview_img+"' />";
|
136 |
+
|
137 |
+
return element[options.fetch];
|
138 |
+
}
|
139 |
+
else {
|
140 |
+
return element.url;
|
141 |
+
}
|
142 |
+
});
|
143 |
+
|
144 |
+
if ( target.length ) {
|
145 |
+
target.val( values.join(',') ).trigger('change');
|
146 |
+
}
|
147 |
+
|
148 |
+
if ( preview.length )
|
149 |
+
preview.html( preview_html ).show();
|
150 |
+
});
|
151 |
+
|
152 |
+
// Finally, open the modal
|
153 |
+
file_frame[frame_key].open();
|
154 |
+
})
|
155 |
+
.on('click', '.wc-shortcodes-restore-image', function( e ) {
|
156 |
+
e.preventDefault();
|
157 |
+
|
158 |
+
var clicked = $(this),
|
159 |
+
options = clicked.data(),
|
160 |
+
parent = clicked.parent(),
|
161 |
+
target = parent.find(options.target),
|
162 |
+
preview = parent.find(options.preview);
|
163 |
+
|
164 |
+
$(target).val(options.restore);
|
165 |
+
|
166 |
+
if ( preview.length && options.restore.length )
|
167 |
+
$(preview).html('<img src="'+options.restore+'" />').show();
|
168 |
+
})
|
169 |
+
.on('click', '.wc-shortcodes-delete-image', function( e ) {
|
170 |
+
e.preventDefault();
|
171 |
+
|
172 |
+
var clicked = $(this),
|
173 |
+
options = clicked.data(),
|
174 |
+
parent = clicked.parent(),
|
175 |
+
target = parent.find(options.target),
|
176 |
+
preview = parent.find(options.preview);
|
177 |
+
|
178 |
+
$(target).val('');
|
179 |
+
|
180 |
+
if ( preview.length )
|
181 |
+
$(preview).html("").hide();
|
182 |
+
})
|
183 |
+
})(jQuery);
|
includes/js/fullwidth.js
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ) {
|
2 |
+
var fullWidthSite = function() {
|
3 |
+
$('.wc-shortcodes-full-width').each( function() {
|
4 |
+
var $this,
|
5 |
+
siteWidthId, contentWidthId,
|
6 |
+
$siteWidth, $contentWidth,
|
7 |
+
siteWidth, contentWidth,
|
8 |
+
sitePos, contentPos,
|
9 |
+
marginLeft, marginRight;
|
10 |
+
|
11 |
+
$this = $(this);
|
12 |
+
|
13 |
+
// get selector names
|
14 |
+
siteWidthId = $(this).data('selector');
|
15 |
+
|
16 |
+
// save elements
|
17 |
+
$siteWidth = $( siteWidthId );
|
18 |
+
$contentWidth = $this.parent();
|
19 |
+
if ( $siteWidth.length && $contentWidth.length ) {
|
20 |
+
// get width
|
21 |
+
siteWidth = $siteWidth.outerWidth( false );
|
22 |
+
contentWidth = $contentWidth.width();
|
23 |
+
|
24 |
+
// get position
|
25 |
+
// sitePos = $( siteWidthId ).offset();
|
26 |
+
// contentPos = $contentWidth.offset();
|
27 |
+
|
28 |
+
// calculate margin
|
29 |
+
// marginLeft = Math.floor( contentPos.left - sitePos.left ) * -1;
|
30 |
+
// marginRight = Math.floor( siteWidth - contentWidth + sitePos.left - contentPos.left ) * -1;
|
31 |
+
|
32 |
+
// used for centering.
|
33 |
+
marginLeft = marginRight = Math.floor( ( siteWidth - contentWidth ) / 2 ) * -1;
|
34 |
+
|
35 |
+
// apply margin offset
|
36 |
+
$this.css( {'margin-left': marginLeft+'px', 'margin-right': marginRight+'px'} );
|
37 |
+
}
|
38 |
+
});
|
39 |
+
}
|
40 |
+
fullWidthSite();
|
41 |
+
|
42 |
+
$(window).resize( fullWidthSite );
|
43 |
+
|
44 |
+
} )( jQuery );
|
includes/js/googlemap.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*-----------------------------------------------------------------------------------*/
|
2 |
+
/* Googlemap - code from http://aquagraphite.com/
|
3 |
+
/*===================================================================================*/
|
4 |
+
jQuery(function($){
|
5 |
+
$(document).ready(function(){
|
6 |
+
$('.googlemap').each( function() {
|
7 |
+
|
8 |
+
var $map_id = $(this).attr('id'),
|
9 |
+
$title = $(this).find('.title').val(),
|
10 |
+
$location = $(this).find('.location').val(),
|
11 |
+
$zoom = parseInt( $(this).find('.zoom').val() ),
|
12 |
+
geocoder, map;
|
13 |
+
|
14 |
+
var mapOptions = {
|
15 |
+
zoom: $zoom,
|
16 |
+
mapTypeId: google.maps.MapTypeId.ROADMAP
|
17 |
+
};
|
18 |
+
|
19 |
+
geocoder = new google.maps.Geocoder();
|
20 |
+
|
21 |
+
geocoder.geocode( { 'address': $location}, function(results, status) {
|
22 |
+
|
23 |
+
if (status == google.maps.GeocoderStatus.OK) {
|
24 |
+
|
25 |
+
var mapOptions = {
|
26 |
+
scrollwheel: false,
|
27 |
+
zoom: $zoom,
|
28 |
+
mapTypeId: google.maps.MapTypeId.ROADMAP
|
29 |
+
};
|
30 |
+
|
31 |
+
map = new google.maps.Map($('#'+ $map_id + ' .map_canvas')[0], mapOptions);
|
32 |
+
|
33 |
+
map.setCenter(results[0].geometry.location);
|
34 |
+
|
35 |
+
var marker = new google.maps.Marker({
|
36 |
+
map: map,
|
37 |
+
position: results[0].geometry.location,
|
38 |
+
title : $location
|
39 |
+
});
|
40 |
+
|
41 |
+
var contentString = '<div class="map-infowindow">'+
|
42 |
+
( ($title) ? '<h3>' + $title + '</h3>' : '' ) +
|
43 |
+
$location + '<br/>' +
|
44 |
+
'<a href="https://maps.google.com/?q='+ $location +'" target="_blank">View on Google Map</a>' +
|
45 |
+
'</div>';
|
46 |
+
|
47 |
+
var infowindow = new google.maps.InfoWindow({
|
48 |
+
content: contentString
|
49 |
+
});
|
50 |
+
|
51 |
+
google.maps.event.addListener(marker, 'click', function() {
|
52 |
+
infowindow.open(map,marker);
|
53 |
+
});
|
54 |
+
|
55 |
+
} else {
|
56 |
+
$('#'+ $map_id).html("Geocode was not successful for the following reason: " + status);
|
57 |
+
}
|
58 |
+
});
|
59 |
+
|
60 |
+
});
|
61 |
+
});
|
62 |
+
});
|
includes/js/pre.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ) {
|
2 |
+
$(document).ready(function(){
|
3 |
+
prettyPrint();
|
4 |
+
});
|
5 |
+
} )( jQuery );
|
includes/js/prettify.js
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
2 |
+
(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
|
3 |
+
b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
|
4 |
+
h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
|
5 |
+
(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
|
6 |
+
f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
|
7 |
+
a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
|
8 |
+
if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
|
9 |
+
g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
10 |
+
q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
|
11 |
+
/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
|
12 |
+
s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
|
13 |
+
q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
|
14 |
+
c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
|
15 |
+
r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
|
16 |
+
a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
|
17 |
+
t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
18 |
+
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
|
19 |
+
O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
20 |
+
Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
|
21 |
+
V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
|
22 |
+
/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
|
23 |
+
["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
|
24 |
+
["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
|
25 |
+
hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
|
26 |
+
p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
|
27 |
+
return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
|
28 |
+
o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
|
29 |
+
{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
|
30 |
+
h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}()
|
includes/js/skillbar.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function($){
|
2 |
+
$(document).ready(function(){
|
3 |
+
$('.wc-shortcodes-skillbar').each(function(){
|
4 |
+
$(this).find('.wc-shortcodes-skillbar-bar').animate({ width: $(this).attr('data-percent') }, 1500 );
|
5 |
+
});
|
6 |
+
});
|
7 |
+
});
|
includes/js/tabs.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(function($){
|
includes/js/toggle.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(function($){
|
includes/mce/js/images/shortcodes.png
ADDED
Binary file
|
includes/mce/js/shortcodes_tinymce.js
ADDED
@@ -0,0 +1,357 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.wcShortcodeMce', {
|
3 |
+
init : function(ed, url){
|
4 |
+
tinymce.plugins.wcShortcodeMce.theurl = url;
|
5 |
+
},
|
6 |
+
createControl : function(btn, e) {
|
7 |
+
if ( btn == "wc_shortcodes_button" ) {
|
8 |
+
var a = this;
|
9 |
+
var btn = e.createSplitButton('wc_shortcodes_button', {
|
10 |
+
title: "Insert Shortcode",
|
11 |
+
image: tinymce.plugins.wcShortcodeMce.theurl +"/images/shortcodes.png",
|
12 |
+
icons: false,
|
13 |
+
});
|
14 |
+
btn.onRenderMenu.add(function (c, b) {
|
15 |
+
|
16 |
+
b.add({title : 'WC Shortcodes', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
17 |
+
|
18 |
+
|
19 |
+
// Columns
|
20 |
+
c = b.addMenu({title:"Columns"});
|
21 |
+
|
22 |
+
a.render( c, "1/2 + 1/2", "half-half" );
|
23 |
+
a.render( c, "1/3 + 1/3 + 1/3", "third-third-third" );
|
24 |
+
a.render( c, "1/3 + 2/3", "third-twothird" );
|
25 |
+
a.render( c, "2/3 + 1/3", "twothird-third" );
|
26 |
+
a.render( c, "1/4 + 1/4 + 1/4 + 1/4", "fourth-fourth-fourth-fourth" );
|
27 |
+
a.render( c, "1/4 + 1/2 + 1/4", "fourth-half-fourth" );
|
28 |
+
a.render( c, "1/2 + 1/4 + 1/4", "half-fourth-fourth" );
|
29 |
+
a.render( c, "1/4 + 1/4 + 1/2", "fourth-fourth-half" );
|
30 |
+
a.render( c, "1/4 + 3/4", "fourth-three-fourth" );
|
31 |
+
a.render( c, "3/4 + 1/4", "three-fourth-fourth" );
|
32 |
+
|
33 |
+
b.addSeparator();
|
34 |
+
|
35 |
+
|
36 |
+
// Elements
|
37 |
+
c = b.addMenu({title:"Elements"});
|
38 |
+
|
39 |
+
a.render( c, "Button", "button" );
|
40 |
+
a.render( c, "Google Map", "googlemap" );
|
41 |
+
a.render( c, "Heading", "heading" );
|
42 |
+
a.render( c, "Pricing Table", "pricing" );
|
43 |
+
a.render( c, "Skillbar", "skillbar" );
|
44 |
+
a.render( c, "Social Icon", "social" );
|
45 |
+
a.render( c, "Testimonial", "testimonial" );
|
46 |
+
a.render( c, "HTML", "html" );
|
47 |
+
|
48 |
+
b.addSeparator();
|
49 |
+
|
50 |
+
// Boxes
|
51 |
+
c = b.addMenu({title:"Boxes"});
|
52 |
+
|
53 |
+
a.render( c, "Primary", "primaryBox" );
|
54 |
+
a.render( c, "Secondary", "secondaryBox" );
|
55 |
+
a.render( c, "Inverse", "inverseBox" );
|
56 |
+
a.render( c, "Success", "successBox" );
|
57 |
+
a.render( c, "Warning", "warningBox" );
|
58 |
+
a.render( c, "Danger", "dangerBox" );
|
59 |
+
a.render( c, "Info", "infoBox" );
|
60 |
+
|
61 |
+
b.addSeparator();
|
62 |
+
|
63 |
+
// Highlights
|
64 |
+
c = b.addMenu({title:"Highlights"});
|
65 |
+
|
66 |
+
a.render( c, "Blue", "blueHighlight" );
|
67 |
+
a.render( c, "Gray", "grayHighlight" );
|
68 |
+
a.render( c, "Green", "greenHighlight" );
|
69 |
+
a.render( c, "Red", "redHighlight" );
|
70 |
+
a.render( c, "Yellow", "yellowHighlight" );
|
71 |
+
|
72 |
+
b.addSeparator();
|
73 |
+
|
74 |
+
|
75 |
+
// Dividers
|
76 |
+
c = b.addMenu({title:"Dividers"});
|
77 |
+
|
78 |
+
a.render( c, "Solid", "solidDivider" );
|
79 |
+
a.render( c, "Dashed", "dashedDivider" );
|
80 |
+
a.render( c, "Dotted", "dottedDivider" );
|
81 |
+
a.render( c, "Double", "doubleDivider" );
|
82 |
+
a.render( c, "Triple", "tripleDivider" );
|
83 |
+
a.render( c, "Image", "imageDivider" );
|
84 |
+
|
85 |
+
b.addSeparator();
|
86 |
+
|
87 |
+
|
88 |
+
// jQuery
|
89 |
+
c = b.addMenu({title:"jQuery"});
|
90 |
+
|
91 |
+
a.render( c, "Accordion", "accordion" );
|
92 |
+
a.render( c, "Tabs", "tabs" );
|
93 |
+
a.render( c, "Toggle", "toggle" );
|
94 |
+
|
95 |
+
b.addSeparator();
|
96 |
+
|
97 |
+
|
98 |
+
// Helpers
|
99 |
+
c = b.addMenu({title:"Other"});
|
100 |
+
|
101 |
+
a.render( c, "Spacing", "spacing" );
|
102 |
+
a.render( c, "Clear Floats", "clear" );
|
103 |
+
a.render( c, "Center Content", "center" );
|
104 |
+
a.render( c, "Full Width", "fullwidth" );
|
105 |
+
a.render( c, "Code", "code" );
|
106 |
+
a.render( c, "Pre", "pre" );
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
});
|
111 |
+
|
112 |
+
return btn;
|
113 |
+
}
|
114 |
+
return null;
|
115 |
+
},
|
116 |
+
render : function(ed, title, id) {
|
117 |
+
ed.add({
|
118 |
+
title: title,
|
119 |
+
onclick: function () {
|
120 |
+
|
121 |
+
// Selected content
|
122 |
+
var mceSelected = tinyMCE.activeEditor.selection.getContent();
|
123 |
+
|
124 |
+
// Add highlighted content inside the shortcode when possible - yay!
|
125 |
+
if ( mceSelected ) {
|
126 |
+
var wcDummyContent = mceSelected;
|
127 |
+
} else {
|
128 |
+
var wcDummyContent = 'Sample Content';
|
129 |
+
}
|
130 |
+
var wcParagraphContent = '<p>Sample Content</p>';
|
131 |
+
|
132 |
+
// Accordion
|
133 |
+
if(id == "accordion") {
|
134 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_accordion collapse="0"][wc_accordion_section title="Section 1"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section][wc_accordion_section title="Section 2"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section][/wc_accordion]</p>');
|
135 |
+
}
|
136 |
+
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
// Boxes
|
141 |
+
if(id == "primaryBox") {
|
142 |
+
tinyMCE.activeEditor.selection.setContent('[wc_box color="primary" text_align="left"]' + wcDummyContent + '[/wc_box]');
|
143 |
+
}
|
144 |
+
if(id == "secondaryBox") {
|
145 |
+
tinyMCE.activeEditor.selection.setContent('[wc_box color="secondary" text_align="left"]' + wcDummyContent + '[/wc_box]');
|
146 |
+
}
|
147 |
+
if(id == "inverseBox") {
|
148 |
+
tinyMCE.activeEditor.selection.setContent('[wc_box color="inverse" text_align="left"]' + wcDummyContent + '[/wc_box]');
|
149 |
+
}
|
150 |
+
if(id == "successBox") {
|
151 |
+
tinyMCE.activeEditor.selection.setContent('[wc_box color="success" text_align="left"]' + wcDummyContent + '[/wc_box]');
|
152 |
+
}
|
153 |
+
if(id == "warningBox") {
|
154 |
+
tinyMCE.activeEditor.selection.setContent('[wc_box color="warning" text_align="left"]' + wcDummyContent + '[/wc_box]');
|
155 |
+
}
|
156 |
+
if(id == "dangerBox") {
|
157 |
+
tinyMCE.activeEditor.selection.setContent('[wc_box color="danger" text_align="left"]' + wcDummyContent + '[/wc_box]');
|
158 |
+
}
|
159 |
+
if(id == "infoBox") {
|
160 |
+
tinyMCE.activeEditor.selection.setContent('[wc_box color="info" text_align="left"]' + wcDummyContent + '[/wc_box]');
|
161 |
+
}
|
162 |
+
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
// Button
|
167 |
+
if(id == "button") {
|
168 |
+
tinyMCE.activeEditor.selection.setContent('[wc_button type="primary" url="http://www.wordpresscanvas.com" title="Visit Site" target="self"]' + wcDummyContent + '[/wc_button]');
|
169 |
+
}
|
170 |
+
|
171 |
+
|
172 |
+
|
173 |
+
|
174 |
+
// Clear Floats
|
175 |
+
if(id == "clear") {
|
176 |
+
tinyMCE.activeEditor.selection.setContent('[wc_clear_floats]');
|
177 |
+
}
|
178 |
+
|
179 |
+
|
180 |
+
|
181 |
+
|
182 |
+
// Columns
|
183 |
+
if(id == "half-half") {
|
184 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-half" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
185 |
+
}
|
186 |
+
if(id == "third-third-third") {
|
187 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-third" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
188 |
+
}
|
189 |
+
if(id == "third-twothird") {
|
190 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-third" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="two-third" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
191 |
+
}
|
192 |
+
if(id == "twothird-third") {
|
193 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="two-third" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
194 |
+
}
|
195 |
+
if(id == "fourth-fourth-fourth-fourth") {
|
196 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
197 |
+
}
|
198 |
+
if(id == "fourth-half-fourth") {
|
199 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
200 |
+
}
|
201 |
+
if(id == "half-fourth-fourth") {
|
202 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-half" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
203 |
+
}
|
204 |
+
if(id == "fourth-fourth-half") {
|
205 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
206 |
+
}
|
207 |
+
if(id == "fourth-three-fourth") {
|
208 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="three-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
209 |
+
}
|
210 |
+
if(id == "three-fourth-fourth") {
|
211 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="three-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
|
212 |
+
}
|
213 |
+
|
214 |
+
|
215 |
+
|
216 |
+
// Divider
|
217 |
+
if(id == "solidDivider") {
|
218 |
+
tinyMCE.activeEditor.selection.setContent('[wc_divider style="solid" line="single" margin_top="" margin_bottom=""]');
|
219 |
+
}
|
220 |
+
if(id == "dashedDivider") {
|
221 |
+
tinyMCE.activeEditor.selection.setContent('[wc_divider style="dashed" line="single" margin_top="" margin_bottom=""]');
|
222 |
+
}
|
223 |
+
if(id == "dottedDivider") {
|
224 |
+
tinyMCE.activeEditor.selection.setContent('[wc_divider style="dotted" line="single" margin_top="" margin_bottom=""]');
|
225 |
+
}
|
226 |
+
if(id == "doubleDivider") {
|
227 |
+
tinyMCE.activeEditor.selection.setContent('[wc_divider style="solid" line="double" margin_top="" margin_bottom=""]');
|
228 |
+
}
|
229 |
+
if(id == "tripleDivider") {
|
230 |
+
tinyMCE.activeEditor.selection.setContent('[wc_divider style="solid" line="triple" margin_top="" margin_bottom=""]');
|
231 |
+
}
|
232 |
+
if(id == "imageDivider") {
|
233 |
+
tinyMCE.activeEditor.selection.setContent('[wc_divider style="image" margin_top="" margin_bottom=""]');
|
234 |
+
}
|
235 |
+
|
236 |
+
|
237 |
+
|
238 |
+
|
239 |
+
// Google Map
|
240 |
+
if(id == "googlemap") {
|
241 |
+
tinyMCE.activeEditor.selection.setContent('[wc_googlemap title="St. Paul\'s Chapel" location="209 Broadway, New York, NY 10007" zoom="10" height="250"]');
|
242 |
+
}
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
|
247 |
+
// Heading
|
248 |
+
if(id == "heading") {
|
249 |
+
tinyMCE.activeEditor.selection.setContent('[wc_heading type="h1" title="' + wcDummyContent + '" text_align="left"]');
|
250 |
+
}
|
251 |
+
|
252 |
+
|
253 |
+
|
254 |
+
|
255 |
+
// Highlight
|
256 |
+
if(id == "blueHighlight") {
|
257 |
+
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="blue"]' + wcDummyContent + '[/wc_highlight]');
|
258 |
+
}
|
259 |
+
if(id == "grayHighlight") {
|
260 |
+
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="gray"]' + wcDummyContent + '[/wc_highlight]');
|
261 |
+
}
|
262 |
+
if(id == "greenHighlight") {
|
263 |
+
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="green"]' + wcDummyContent + '[/wc_highlight]');
|
264 |
+
}
|
265 |
+
if(id == "redHighlight") {
|
266 |
+
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="red"]' + wcDummyContent + '[/wc_highlight]');
|
267 |
+
}
|
268 |
+
if(id == "yellowHighlight") {
|
269 |
+
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="yellow"]' + wcDummyContent + '[/wc_highlight]');
|
270 |
+
}
|
271 |
+
|
272 |
+
|
273 |
+
|
274 |
+
// Pricing
|
275 |
+
if(id == "pricing") {
|
276 |
+
tinyMCE.activeEditor.selection.setContent('[wc_pricing featured="yes" plan="Basic" cost="$19.99" per="per month" button_url="#" button_text="Sign Up" button_target="self" button_rel="nofollow"]<ul><li>30GB Storage</li><li>512MB Ram</li><li>10 databases</li><li>1,000 Emails</li><li>25GB Bandwidth</li></ul>[/wc_pricing]');
|
277 |
+
}
|
278 |
+
|
279 |
+
|
280 |
+
|
281 |
+
|
282 |
+
//Spacing
|
283 |
+
if(id == "spacing") {
|
284 |
+
tinyMCE.activeEditor.selection.setContent('[wc_spacing size="40px"]');
|
285 |
+
}
|
286 |
+
|
287 |
+
|
288 |
+
|
289 |
+
|
290 |
+
//Social
|
291 |
+
if(id == "social") {
|
292 |
+
tinyMCE.activeEditor.selection.setContent('[wc_social_icons align="left" size="large" display="facebook,google,twitter,pinterest,instagram,bloglovin,flickr,rss,email,custom1,custom2,custom3,custom4,custom5"]');
|
293 |
+
}
|
294 |
+
|
295 |
+
|
296 |
+
|
297 |
+
|
298 |
+
//Skillbar
|
299 |
+
if(id == "skillbar") {
|
300 |
+
tinyMCE.activeEditor.selection.setContent('[wc_skillbar title="' + wcDummyContent + '" percentage="100" color="#6adcfa"]');
|
301 |
+
}
|
302 |
+
|
303 |
+
|
304 |
+
|
305 |
+
|
306 |
+
//Tabs
|
307 |
+
if(id == "tabs") {
|
308 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_tabgroup][wc_tab title="First Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab][wc_tab title="Second Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab][/wc_tabgroup]</p>');
|
309 |
+
}
|
310 |
+
|
311 |
+
|
312 |
+
|
313 |
+
//Testimonial
|
314 |
+
if(id == "testimonial") {
|
315 |
+
tinyMCE.activeEditor.selection.setContent('[wc_testimonial by="Wordpress Canvas" position="left"]' + wcDummyContent + '[/wc_testimonial]');
|
316 |
+
}
|
317 |
+
|
318 |
+
|
319 |
+
|
320 |
+
//Toggle
|
321 |
+
if(id == "toggle") {
|
322 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_toggle title="This Is Your Toggle Title" padding="" border_width=""]</p>' + wcParagraphContent + '<p>[/wc_toggle]</p>');
|
323 |
+
}
|
324 |
+
|
325 |
+
if(id == "center") {
|
326 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_center max_width="500px" text_align="left"]</p>' + wcParagraphContent + '<p>[/wc_center]</p>');
|
327 |
+
}
|
328 |
+
|
329 |
+
|
330 |
+
if(id == "fullwidth") {
|
331 |
+
tinyMCE.activeEditor.selection.setContent('[wc_fullwidth selector="#main"]' + wcDummyContent + '[/wc_fullwidth]');
|
332 |
+
}
|
333 |
+
|
334 |
+
|
335 |
+
if(id == "html") {
|
336 |
+
tinyMCE.activeEditor.selection.setContent('[wc_html name="Custom Field Name"]');
|
337 |
+
}
|
338 |
+
|
339 |
+
|
340 |
+
if(id == "code") {
|
341 |
+
tinyMCE.activeEditor.selection.setContent('[wc_code]' + wcDummyContent + '[/wc_code]');
|
342 |
+
}
|
343 |
+
|
344 |
+
|
345 |
+
if(id == "pre") {
|
346 |
+
tinyMCE.activeEditor.selection.setContent('[wc_pre color="1" wrap="0" scrollable="1" linenums="0" name="Custom Field Name"]');
|
347 |
+
}
|
348 |
+
|
349 |
+
|
350 |
+
return false;
|
351 |
+
}
|
352 |
+
})
|
353 |
+
}
|
354 |
+
|
355 |
+
});
|
356 |
+
tinymce.PluginManager.add("wc_shortcodes", tinymce.plugins.wcShortcodeMce);
|
357 |
+
})();
|
includes/mce/shortcodes_tinymce.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file has all the main shortcode functions
|
4 |
+
* @package wc Shortcodes Plugin
|
5 |
+
* @since 1.0
|
6 |
+
* @author AJ Clarke : http://wpexplorer.com
|
7 |
+
* @copyright Copyright (c) 2012, AJ Clarke
|
8 |
+
* @link http://wpexplorer.com
|
9 |
+
* @License: GNU General Public License version 3.0
|
10 |
+
* @License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* Special thank you to my buddy Syamil @ http://aquagraphite.com/
|
14 |
+
*/
|
15 |
+
class WC_Shortcodes_TinyMCE_Buttons {
|
16 |
+
function __construct() {
|
17 |
+
add_action( 'init', array(&$this,'init') );
|
18 |
+
}
|
19 |
+
function init() {
|
20 |
+
if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
|
21 |
+
return;
|
22 |
+
if ( get_user_option('rich_editing') == 'true' ) {
|
23 |
+
add_filter( 'mce_external_plugins', array(&$this, 'add_plugin') );
|
24 |
+
add_filter( 'mce_buttons', array(&$this,'register_button') );
|
25 |
+
}
|
26 |
+
}
|
27 |
+
function add_plugin($plugin_array) {
|
28 |
+
$plugin_array['wc_shortcodes'] = plugin_dir_url( __FILE__ ) .'js/shortcodes_tinymce.js';
|
29 |
+
return $plugin_array;
|
30 |
+
}
|
31 |
+
function register_button($buttons) {
|
32 |
+
array_push($buttons, "wc_shortcodes_button");
|
33 |
+
return $buttons;
|
34 |
+
}
|
35 |
+
}
|
36 |
+
$wcshortcode = new WC_Shortcodes_TinyMCE_Buttons;
|
includes/options.php
ADDED
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$wc_shortcodes_options = array(
|
3 |
+
'social-media' => array(
|
4 |
+
'title' => 'Social Media',
|
5 |
+
'sections' => array(
|
6 |
+
array(
|
7 |
+
'section' => 'wc-shortcodes-options-facebook-section',
|
8 |
+
'title' => 'Facebook',
|
9 |
+
'options' => array(
|
10 |
+
array(
|
11 |
+
'id' => 'facebook_link',
|
12 |
+
'title' => 'Link',
|
13 |
+
'default' => '',
|
14 |
+
'description' => '',
|
15 |
+
'type' => 'input',
|
16 |
+
),
|
17 |
+
array(
|
18 |
+
'id' => 'facebook_icon',
|
19 |
+
'title' => 'Icon',
|
20 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/facebook.png',
|
21 |
+
'description' => '',
|
22 |
+
'type' => 'image',
|
23 |
+
),
|
24 |
+
),
|
25 |
+
),
|
26 |
+
array(
|
27 |
+
'section' => 'wc-shortcodes-options-twitter-section',
|
28 |
+
'title' => 'Twitter',
|
29 |
+
'options' => array(
|
30 |
+
array(
|
31 |
+
'id' => 'twitter_link',
|
32 |
+
'title' => 'Link',
|
33 |
+
'default' => '',
|
34 |
+
'description' => '',
|
35 |
+
'type' => 'input',
|
36 |
+
),
|
37 |
+
array(
|
38 |
+
'id' => 'twitter_icon',
|
39 |
+
'title' => 'Icon',
|
40 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/twitter.png',
|
41 |
+
'description' => '',
|
42 |
+
'type' => 'image',
|
43 |
+
),
|
44 |
+
),
|
45 |
+
),
|
46 |
+
array(
|
47 |
+
'section' => 'wc-shortcodes-options-pinterest-section',
|
48 |
+
'title' => 'Pinterest',
|
49 |
+
'options' => array(
|
50 |
+
array(
|
51 |
+
'id' => 'pinterest_link',
|
52 |
+
'title' => 'Link',
|
53 |
+
'default' => '',
|
54 |
+
'description' => '',
|
55 |
+
'type' => 'input',
|
56 |
+
),
|
57 |
+
array(
|
58 |
+
'id' => 'pinterest_icon',
|
59 |
+
'title' => 'Icon',
|
60 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/pinterest.png',
|
61 |
+
'description' => '',
|
62 |
+
'type' => 'image',
|
63 |
+
),
|
64 |
+
),
|
65 |
+
),
|
66 |
+
array(
|
67 |
+
'section' => 'wc-shortcodes-options-google-section',
|
68 |
+
'title' => 'Google',
|
69 |
+
'options' => array(
|
70 |
+
array(
|
71 |
+
'id' => 'google_link',
|
72 |
+
'title' => 'Link',
|
73 |
+
'default' => '',
|
74 |
+
'description' => '',
|
75 |
+
'type' => 'input',
|
76 |
+
),
|
77 |
+
array(
|
78 |
+
'id' => 'google_icon',
|
79 |
+
'title' => 'Icon',
|
80 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/google.png',
|
81 |
+
'description' => '',
|
82 |
+
'type' => 'image',
|
83 |
+
),
|
84 |
+
),
|
85 |
+
),
|
86 |
+
array(
|
87 |
+
'section' => 'wc-shortcodes-options-bloglovin-section',
|
88 |
+
'title' => 'BlogLovin',
|
89 |
+
'options' => array(
|
90 |
+
array(
|
91 |
+
'id' => 'bloglovin_link',
|
92 |
+
'title' => 'Link',
|
93 |
+
'default' => '',
|
94 |
+
'description' => '',
|
95 |
+
'type' => 'input',
|
96 |
+
),
|
97 |
+
array(
|
98 |
+
'id' => 'bloglovin_icon',
|
99 |
+
'title' => 'Icon',
|
100 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/bloglovin.png',
|
101 |
+
'description' => '',
|
102 |
+
'type' => 'image',
|
103 |
+
),
|
104 |
+
),
|
105 |
+
),
|
106 |
+
array(
|
107 |
+
'section' => 'wc-shortcodes-options-email-section',
|
108 |
+
'title' => 'Email',
|
109 |
+
'options' => array(
|
110 |
+
array(
|
111 |
+
'id' => 'email_link',
|
112 |
+
'title' => 'Link',
|
113 |
+
'default' => '',
|
114 |
+
'description' => '',
|
115 |
+
'type' => 'input',
|
116 |
+
),
|
117 |
+
array(
|
118 |
+
'id' => 'email_icon',
|
119 |
+
'title' => 'Icon',
|
120 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/email.png',
|
121 |
+
'description' => '',
|
122 |
+
'type' => 'image',
|
123 |
+
),
|
124 |
+
),
|
125 |
+
),
|
126 |
+
array(
|
127 |
+
'section' => 'wc-shortcodes-options-flickr-section',
|
128 |
+
'title' => 'Flickr',
|
129 |
+
'options' => array(
|
130 |
+
array(
|
131 |
+
'id' => 'flickr_link',
|
132 |
+
'title' => 'Link',
|
133 |
+
'default' => '',
|
134 |
+
'description' => '',
|
135 |
+
'type' => 'input',
|
136 |
+
),
|
137 |
+
array(
|
138 |
+
'id' => 'flickr_icon',
|
139 |
+
'title' => 'Icon',
|
140 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/flickr.png',
|
141 |
+
'description' => '',
|
142 |
+
'type' => 'image',
|
143 |
+
),
|
144 |
+
),
|
145 |
+
),
|
146 |
+
array(
|
147 |
+
'section' => 'wc-shortcodes-options-instagram-section',
|
148 |
+
'title' => 'Instagram',
|
149 |
+
'options' => array(
|
150 |
+
array(
|
151 |
+
'id' => 'instagram_link',
|
152 |
+
'title' => 'Link',
|
153 |
+
'default' => '',
|
154 |
+
'description' => '',
|
155 |
+
'type' => 'input',
|
156 |
+
),
|
157 |
+
array(
|
158 |
+
'id' => 'instagram_icon',
|
159 |
+
'title' => 'Icon',
|
160 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/instagram.png',
|
161 |
+
'description' => '',
|
162 |
+
'type' => 'image',
|
163 |
+
),
|
164 |
+
),
|
165 |
+
),
|
166 |
+
array(
|
167 |
+
'section' => 'wc-shortcodes-options-rss-section',
|
168 |
+
'title' => 'Rss',
|
169 |
+
'options' => array(
|
170 |
+
array(
|
171 |
+
'id' => 'rss_link',
|
172 |
+
'title' => 'Link',
|
173 |
+
'default' => '',
|
174 |
+
'description' => '',
|
175 |
+
'type' => 'input',
|
176 |
+
),
|
177 |
+
array(
|
178 |
+
'id' => 'rss_icon',
|
179 |
+
'title' => 'Icon',
|
180 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/rss.png',
|
181 |
+
'description' => '',
|
182 |
+
'type' => 'image',
|
183 |
+
),
|
184 |
+
),
|
185 |
+
),
|
186 |
+
array(
|
187 |
+
'section' => 'wc-shortcodes-options-custom1-section',
|
188 |
+
'title' => 'Custom 1',
|
189 |
+
'options' => array(
|
190 |
+
array(
|
191 |
+
'id' => 'custom1_link',
|
192 |
+
'title' => 'Link',
|
193 |
+
'default' => '',
|
194 |
+
'description' => '',
|
195 |
+
'type' => 'input',
|
196 |
+
),
|
197 |
+
array(
|
198 |
+
'id' => 'custom1_icon',
|
199 |
+
'title' => 'Icon',
|
200 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/picasa.png',
|
201 |
+
'description' => '',
|
202 |
+
'type' => 'image',
|
203 |
+
),
|
204 |
+
),
|
205 |
+
),
|
206 |
+
array(
|
207 |
+
'section' => 'wc-shortcodes-options-custom2-section',
|
208 |
+
'title' => 'Custom 2',
|
209 |
+
'options' => array(
|
210 |
+
array(
|
211 |
+
'id' => 'custom2_link',
|
212 |
+
'title' => 'Link',
|
213 |
+
'default' => '',
|
214 |
+
'description' => '',
|
215 |
+
'type' => 'input',
|
216 |
+
),
|
217 |
+
array(
|
218 |
+
'id' => 'custom2_icon',
|
219 |
+
'title' => 'Icon',
|
220 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/shopping.png',
|
221 |
+
'description' => '',
|
222 |
+
'type' => 'image',
|
223 |
+
),
|
224 |
+
),
|
225 |
+
),
|
226 |
+
array(
|
227 |
+
'section' => 'wc-shortcodes-options-custom3-section',
|
228 |
+
'title' => 'Custom 3',
|
229 |
+
'options' => array(
|
230 |
+
array(
|
231 |
+
'id' => 'custom3_link',
|
232 |
+
'title' => 'Link',
|
233 |
+
'default' => '',
|
234 |
+
'description' => '',
|
235 |
+
'type' => 'input',
|
236 |
+
),
|
237 |
+
array(
|
238 |
+
'id' => 'custom3_icon',
|
239 |
+
'title' => 'Icon',
|
240 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/youtube.png',
|
241 |
+
'description' => '',
|
242 |
+
'type' => 'image',
|
243 |
+
),
|
244 |
+
),
|
245 |
+
),
|
246 |
+
array(
|
247 |
+
'section' => 'wc-shortcodes-options-custom4-section',
|
248 |
+
'title' => 'Custom 4',
|
249 |
+
'options' => array(
|
250 |
+
array(
|
251 |
+
'id' => 'custom4_link',
|
252 |
+
'title' => 'Link',
|
253 |
+
'default' => '',
|
254 |
+
'description' => '',
|
255 |
+
'type' => 'input',
|
256 |
+
),
|
257 |
+
array(
|
258 |
+
'id' => 'custom4_icon',
|
259 |
+
'title' => 'Icon',
|
260 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/etsy.png',
|
261 |
+
'description' => '',
|
262 |
+
'type' => 'image',
|
263 |
+
),
|
264 |
+
),
|
265 |
+
),
|
266 |
+
array(
|
267 |
+
'section' => 'wc-shortcodes-options-custom5-section',
|
268 |
+
'title' => 'Custom 5',
|
269 |
+
'options' => array(
|
270 |
+
array(
|
271 |
+
'id' => 'custom5_link',
|
272 |
+
'title' => 'Link',
|
273 |
+
'default' => '',
|
274 |
+
'description' => '',
|
275 |
+
'type' => 'input',
|
276 |
+
),
|
277 |
+
array(
|
278 |
+
'id' => 'custom5_icon',
|
279 |
+
'title' => 'Icon',
|
280 |
+
'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/tumblr.png',
|
281 |
+
'description' => '',
|
282 |
+
'type' => 'image',
|
283 |
+
),
|
284 |
+
),
|
285 |
+
),
|
286 |
+
),
|
287 |
+
),
|
288 |
+
'misc' => array(
|
289 |
+
'title' => 'Misc',
|
290 |
+
'sections' => array(
|
291 |
+
array(
|
292 |
+
'section' => 'wc-shortcodes-options-facebook-section',
|
293 |
+
'title' => 'Miscellaneous Options',
|
294 |
+
'options' => array(
|
295 |
+
array(
|
296 |
+
'id' => 'enable_shortcode_css',
|
297 |
+
'title' => 'Shortcode CSS',
|
298 |
+
'default' => '1',
|
299 |
+
'description' => '',
|
300 |
+
'label' => 'Use shortcode CSS provided by plugin',
|
301 |
+
'type' => 'checkbox',
|
302 |
+
),
|
303 |
+
),
|
304 |
+
),
|
305 |
+
),
|
306 |
+
),
|
307 |
+
);
|
includes/scripts.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file loads the CSS and JS necessary for your shortcodes display
|
4 |
+
* @package wc Shortcodes Plugin
|
5 |
+
* @since 1.0
|
6 |
+
* @author AJ Clarke : http://wpexplorer.com
|
7 |
+
* @copyright Copyright (c) 2012, AJ Clarke
|
8 |
+
* @link http://wpexplorer.com
|
9 |
+
* @License: GNU General Public License version 2.0
|
10 |
+
* @License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
*/
|
12 |
+
if( !function_exists ('wc_shortcodes_scripts') ) :
|
13 |
+
function wc_shortcodes_scripts() {
|
14 |
+
$ver = WC_SHORTCODES_VERSION;
|
15 |
+
|
16 |
+
if ( get_option( WC_SHORTCODES_PREFIX . 'enable_shortcode_css', true ) )
|
17 |
+
wp_enqueue_style( 'wc_shortcodes_style', plugin_dir_url( __FILE__ ) . 'css/style.css', array( ), $ver );
|
18 |
+
|
19 |
+
wp_enqueue_script('jquery');
|
20 |
+
wp_register_script( 'wc_shortcodes_tabs', plugin_dir_url( __FILE__ ) . 'js/tabs.js', array ( 'jquery', 'jquery-ui-tabs'), $ver, true );
|
21 |
+
wp_register_script( 'wc_shortcodes_toggle', plugin_dir_url( __FILE__ ) . 'js/toggle.js', 'jquery', $ver, true );
|
22 |
+
wp_register_script( 'wc_shortcodes_accordion', plugin_dir_url( __FILE__ ) . 'js/accordion.js', array ( 'jquery', 'jquery-ui-accordion'), $ver, true );
|
23 |
+
wp_register_script( 'wc_shortcodes_prettify', plugin_dir_url( __FILE__ ) . 'js/prettify.js', array ( ), $ver, true );
|
24 |
+
wp_register_script( 'wc_shortcodes_pre', plugin_dir_url( __FILE__ ) . 'js/pre.js', array ( 'jquery' ), $ver, true );
|
25 |
+
wp_register_script( 'wc_shortcodes_googlemap', plugin_dir_url( __FILE__ ) . 'js/googlemap.js', array('jquery'), $ver, true);
|
26 |
+
wp_register_script( 'wc_shortcodes_googlemap_api', 'https://maps.googleapis.com/maps/api/js?sensor=false', array('jquery'), $ver, true);
|
27 |
+
wp_register_script( 'wc_shortcodes_skillbar', plugin_dir_url( __FILE__ ) . 'js/skillbar.js', array ( 'jquery' ), $ver, true );
|
28 |
+
wp_register_script( 'wc_shortcodes_fullwidth', plugin_dir_url( __FILE__ ) . 'js/fullwidth.js', array ( 'jquery' ), $ver, true );
|
29 |
+
}
|
30 |
+
add_action('wp_enqueue_scripts', 'wc_shortcodes_scripts');
|
31 |
+
endif;
|
includes/settings.php
ADDED
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function wc_shortcodes_options_enqueue_scripts() {
|
3 |
+
wp_register_style( 'wc-shortcodes-options', WC_SHORTCODES_PLUGIN_URL . 'includes/css/admin.css', array(), WC_SHORTCODES_VERSION, 'all' );
|
4 |
+
wp_enqueue_style( 'wc-shortcodes-options' );
|
5 |
+
|
6 |
+
wp_register_script( 'wc-shortcodes-options-js', WC_SHORTCODES_PLUGIN_URL . 'includes/js/admin.js', array('jquery'), WC_SHORTCODES_VERSION, true );
|
7 |
+
wp_enqueue_script( 'wc-shortcodes-options-js' );
|
8 |
+
}
|
9 |
+
add_action('admin_enqueue_scripts', 'wc_shortcodes_options_enqueue_scripts' );
|
10 |
+
|
11 |
+
function wc_shortcodes_options_init() {
|
12 |
+
global $wc_shortcodes_options;
|
13 |
+
|
14 |
+
foreach ( $wc_shortcodes_options as $tab => $o ) {
|
15 |
+
foreach ( $o['sections'] as $oo ) {
|
16 |
+
add_settings_section( $oo['section'], $oo['title'], '', 'wc-shortcodes-options' . $tab );
|
17 |
+
foreach ( $oo['options'] as $ooo ) {
|
18 |
+
$ooo['option_name'] = WC_SHORTCODES_PREFIX . $ooo['id'];
|
19 |
+
$callback = wc_shortcodes_options_find_sanitize_callback( $ooo['type'] );
|
20 |
+
register_setting( 'wc-shortcodes-options-'.$tab.'group', WC_SHORTCODES_PREFIX . $ooo['id'], $callback );
|
21 |
+
add_settings_field('wc_shortcodes_'.$ooo['id'].'', '<label for="wc_shortcodes_'.$ooo['id'].'">'.__($ooo['title'] , 'wc_shortcodes' ).'</label>' , 'wc_shortcodes_options_display_setting', 'wc-shortcodes-options'.$tab, $oo['section'], $ooo );
|
22 |
+
}
|
23 |
+
}
|
24 |
+
}
|
25 |
+
}
|
26 |
+
add_action( 'admin_init', 'wc_shortcodes_options_init' );
|
27 |
+
|
28 |
+
function wc_shortcodes_options_admin_menu() {
|
29 |
+
global $wc_shortcodes_options;
|
30 |
+
|
31 |
+
foreach ( $wc_shortcodes_options as $tab => $o ) {
|
32 |
+
$view_hook_name = add_submenu_page( 'options.php', $o['title'], $o['title'], 'read', 'wc-shortcodes-options-' . $tab, 'wc_shortcodes_options_display_page' );
|
33 |
+
}
|
34 |
+
|
35 |
+
// add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );
|
36 |
+
$view_hook_name = add_submenu_page( 'themes.php', 'WC Shortcodes', 'WC Shortcodes', 'read', 'wc-shortcodes-options', 'wc_shortcodes_options_display_page' );
|
37 |
+
}
|
38 |
+
add_action( 'admin_menu', 'wc_shortcodes_options_admin_menu' );
|
39 |
+
|
40 |
+
function wc_shortcodes_options_display_page() {
|
41 |
+
global $wc_shortcodes_options, $tab;
|
42 |
+
wp_reset_vars( array( 'tab' ) );
|
43 |
+
|
44 |
+
// restore last tab visited
|
45 |
+
if ( empty( $tab ) && isset( $_COOKIE[ WC_SHORTCODES_PREFIX . 'last_tab_visited'] ) ) {
|
46 |
+
$last_tab = $_COOKIE[ WC_SHORTCODES_PREFIX . 'last_tab_visited'];
|
47 |
+
if ( isset( $wc_shortcodes_options[ $last_tab ] ) ) {
|
48 |
+
$tab = $last_tab;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
?>
|
53 |
+
<div class="wrap">
|
54 |
+
<?php screen_icon(); ?>
|
55 |
+
<?php
|
56 |
+
$links = array();
|
57 |
+
foreach( $wc_shortcodes_options as $id => $page ) :
|
58 |
+
if ( empty( $tab ) || $id == $tab ) {
|
59 |
+
$tab = $id;
|
60 |
+
$links[] = "<a class='nav-tab nav-tab-active' href='themes.php?page=wc-shortcodes-options&tab=".$tab."'>".$page['title']."</a>";
|
61 |
+
}
|
62 |
+
else {
|
63 |
+
$links[] = "<a class='nav-tab' href='themes.php?page=wc-shortcodes-options&tab=".$id."'>".$page['title']."</a>";
|
64 |
+
}
|
65 |
+
endforeach;
|
66 |
+
?>
|
67 |
+
<h2 class="nav-tab-wrapper">
|
68 |
+
<?php echo implode( '', $links ); ?>
|
69 |
+
</h2>
|
70 |
+
|
71 |
+
<?php if ( isset( $_GET['settings-updated'] ) ) : ?>
|
72 |
+
<div id="message" class="updated"><p><strong><?php _e( 'Settings saved.' ) ?></strong></p></div>
|
73 |
+
<?php endif; ?>
|
74 |
+
|
75 |
+
<form id="compile-less-css" method="post" action="options.php">
|
76 |
+
<?php
|
77 |
+
// settings_fields( $option_group )
|
78 |
+
// @option_group A settings group name. This should match the group name used in register_setting()
|
79 |
+
settings_fields( 'wc-shortcodes-options-'.$tab.'group' );
|
80 |
+
|
81 |
+
// do_settings_sections( $page )
|
82 |
+
// The slug name of the page whose settings sections you want to output. This should match the page name used in add_settings_section()
|
83 |
+
do_settings_sections( 'wc-shortcodes-options'.$tab );
|
84 |
+
?>
|
85 |
+
|
86 |
+
<p class="submit">
|
87 |
+
<?php submit_button( null, 'primary', 'submit', false ); ?>
|
88 |
+
</p>
|
89 |
+
</form>
|
90 |
+
</div>
|
91 |
+
<?php
|
92 |
+
}
|
93 |
+
|
94 |
+
/*
|
95 |
+
* Display Options
|
96 |
+
*/
|
97 |
+
function wc_shortcodes_options_display_setting( $args ) {
|
98 |
+
if ( !isset( $args['type'] ) )
|
99 |
+
return;
|
100 |
+
|
101 |
+
if ( !isset( $args['option_name'] ) )
|
102 |
+
return;
|
103 |
+
|
104 |
+
if ( !isset( $args['default'] ) )
|
105 |
+
return;
|
106 |
+
|
107 |
+
switch ( $args['type'] ) {
|
108 |
+
case 'image' :
|
109 |
+
wc_shortcodes_options_display_image_field( $args );
|
110 |
+
break;
|
111 |
+
case 'checkbox' :
|
112 |
+
wc_shortcodes_options_display_checkbox_field( $args );
|
113 |
+
break;
|
114 |
+
default :
|
115 |
+
wc_shortcodes_options_input_field( $args );
|
116 |
+
break;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
function wc_shortcodes_options_input_field( $args ) {
|
121 |
+
extract( $args );
|
122 |
+
|
123 |
+
$val = get_option( $option_name, $default );
|
124 |
+
?>
|
125 |
+
|
126 |
+
<?php if ( isset( $label ) ) : ?>
|
127 |
+
<label for="<?php echo esc_attr($option_name); ?>"><?php echo $label; ?></label>
|
128 |
+
<?php endif; ?>
|
129 |
+
|
130 |
+
<input name="<?php echo $option_name; ?>" id="<?php echo $option_name; ?>" type="text" value="<?php echo esc_attr($val); ?>" class="regular-text" />
|
131 |
+
<?php if ( isset( $description ) && !empty( $description ) ) : ?>
|
132 |
+
<p class="description"><?php echo $description; ?></p>
|
133 |
+
<?php endif; ?>
|
134 |
+
<?php
|
135 |
+
}
|
136 |
+
function wc_shortcodes_options_display_image_field( $args ) {
|
137 |
+
extract( $args );
|
138 |
+
|
139 |
+
$val = get_option( $option_name, $default );
|
140 |
+
|
141 |
+
// preview image default style
|
142 |
+
$style = '';
|
143 |
+
if ( empty( $val['image'] ) )
|
144 |
+
$style = ' style="display:none"';
|
145 |
+
?>
|
146 |
+
|
147 |
+
<div class="wc-shortcodes-image-field">
|
148 |
+
<input name="<?php echo $option_name; ?>" id="<?php echo $option_name; ?>" class="regular-text ltr upload-input" type="text" value="<?php echo esc_attr($val); ?>" />
|
149 |
+
<br />
|
150 |
+
<a class="button wc-shortcodes-image-upload" data-target="#<?php echo $option_name; ?>" data-preview=".wc-shortcodes-preview-image" data-frame="select" data-state="wordpresscanvas_insert_single" data-fetch="url" data-title="Insert Image" data-button="Insert" data-class="media-frame wc-shortcodes-custom-uploader" title="Add Media"><span class="wp-media-buttons-icon"></span> Add Media</a>
|
151 |
+
<a class="button wc-shortcodes-restore-image" data-restore="<?php echo $default; ?>" data-target="#<?php echo $option_name; ?>" data-preview=".wc-shortcodes-preview-image">Default</a>
|
152 |
+
<a class="button wc-shortcodes-delete-image" data-target="#<?php echo $option_name; ?>" data-preview=".wc-shortcodes-preview-image">Delete</a>
|
153 |
+
<p class="wc-shortcodes-preview-image"<?php echo $style; ?>><img src="<?php echo esc_attr($val); ?>" /></p>
|
154 |
+
<?php if ( isset( $description ) && !empty( $description ) ) : ?>
|
155 |
+
<p class="description"><?php echo $description; ?></p>
|
156 |
+
<?php endif; ?>
|
157 |
+
</div>
|
158 |
+
<?php
|
159 |
+
}
|
160 |
+
|
161 |
+
function wc_shortcodes_options_display_checkbox_field( $args ) {
|
162 |
+
extract( $args );
|
163 |
+
|
164 |
+
$val = get_option( $option_name, $default );
|
165 |
+
?>
|
166 |
+
|
167 |
+
<?php if ( isset( $label ) ) : ?>
|
168 |
+
<label for="<?php echo esc_attr($option_name); ?>">
|
169 |
+
<?php endif; ?>
|
170 |
+
|
171 |
+
<input name="<?php echo $option_name; ?>" id="<?php echo $option_name; ?>" type="checkbox" value="1" <?php checked( true, $val ); ?> />
|
172 |
+
|
173 |
+
<?php if ( isset( $label ) ) : ?>
|
174 |
+
<?php echo $label; ?></label>
|
175 |
+
<?php endif; ?>
|
176 |
+
|
177 |
+
<?php if ( isset( $description ) && !empty( $description ) ) : ?>
|
178 |
+
<p class="description"><?php echo $description; ?></p>
|
179 |
+
<?php endif; ?>
|
180 |
+
<?php
|
181 |
+
}
|
182 |
+
|
183 |
+
/*
|
184 |
+
* Sanitize Options
|
185 |
+
*/
|
186 |
+
function wc_shortcodes_options_find_sanitize_callback( $type ) {
|
187 |
+
switch ( $type ) {
|
188 |
+
case 'color' :
|
189 |
+
return 'wc_shortcodes_options_sanitize_hex_color';
|
190 |
+
case 'image' :
|
191 |
+
return 'esc_url_raw';
|
192 |
+
case 'checkbox' :
|
193 |
+
return 'wc_shortcodes_options_sanitize_checkbox';
|
194 |
+
}
|
195 |
+
|
196 |
+
return '';
|
197 |
+
}
|
198 |
+
|
199 |
+
function wc_shortcodes_options_sanitize_checkbox( $val ) {
|
200 |
+
if ( $val )
|
201 |
+
return 1;
|
202 |
+
else
|
203 |
+
return 0;
|
204 |
+
}
|
205 |
+
|
206 |
+
function wc_shortcodes_options_sanitize_hex_color( $color ) {
|
207 |
+
if ( '' === $color )
|
208 |
+
return '';
|
209 |
+
|
210 |
+
if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) )
|
211 |
+
return $color;
|
212 |
+
|
213 |
+
return null;
|
214 |
+
}
|
215 |
+
|
216 |
+
/*
|
217 |
+
* Misc
|
218 |
+
*/
|
219 |
+
function wc_shortcodes_remember_last_options_tab() {
|
220 |
+
global $page;
|
221 |
+
|
222 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wc-shortcodes-options' ) {
|
223 |
+
if ( isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ) {
|
224 |
+
setcookie(WC_SHORTCODES_PREFIX . 'last_tab_visited', $_GET['tab'], time() + ( 2 * DAY_IN_SECONDS ) );
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
add_action( 'admin_init', 'wc_shortcodes_remember_last_options_tab' );
|
includes/shortcode-functions.php
ADDED
@@ -0,0 +1,844 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Allow shortcodes to be executed before they go
|
4 |
+
* go through all of Wordpress' filters.
|
5 |
+
*
|
6 |
+
* @since 3.6.1
|
7 |
+
* @access public
|
8 |
+
*
|
9 |
+
* @param mixed $content
|
10 |
+
* @return void
|
11 |
+
*/
|
12 |
+
function wc_shortcodes_pre_process($content) {
|
13 |
+
global $shortcode_tags;
|
14 |
+
|
15 |
+
// Backup current registered shortcodes and clear them all out
|
16 |
+
$orig_shortcode_tags = $shortcode_tags;
|
17 |
+
$shortcode_tags = array();
|
18 |
+
|
19 |
+
do_action( 'wc_shortcodes_add_preprocess' );
|
20 |
+
|
21 |
+
// Do the shortcode (only the one above is registered)
|
22 |
+
$content = do_shortcode($content);
|
23 |
+
|
24 |
+
// Put the original shortcodes back
|
25 |
+
$shortcode_tags = $orig_shortcode_tags;
|
26 |
+
|
27 |
+
return $content;
|
28 |
+
}
|
29 |
+
add_filter('the_content', 'wc_shortcodes_pre_process', 7);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Add all preprocessed shortcodes here
|
33 |
+
*
|
34 |
+
* @since 3.6.1
|
35 |
+
* @access public
|
36 |
+
*
|
37 |
+
* @return void
|
38 |
+
*/
|
39 |
+
function wc_shortcodes_add_preprocess() {
|
40 |
+
add_shortcode( 'wc_fullwidth' , 'wc_shortcodes_fullwidth' );
|
41 |
+
add_shortcode( 'wc_column', 'wc_shortcodes_column' );
|
42 |
+
add_shortcode( 'wc_row', 'wc_shortcodes_row' );
|
43 |
+
add_shortcode( 'wc_center', 'wc_shortcodes_center' );
|
44 |
+
add_shortcode( 'wc_toggle', 'wc_shortcodes_toggle' );
|
45 |
+
add_shortcode( 'wc_accordion', 'wc_shortcodes_accordion_main' );
|
46 |
+
add_shortcode( 'wc_accordion_section', 'wc_shortcodes_accordion_section' );
|
47 |
+
add_shortcode( 'wc_tabgroup', 'wc_shortcodes_tabgroup' );
|
48 |
+
add_shortcode( 'wc_tab', 'wc_shortcodes_tab' );
|
49 |
+
add_shortcode( 'wc_testimonial', 'wc_shortcodes_testimonial' );
|
50 |
+
add_shortcode( 'wc_box', 'wc_shortcodes_box' );
|
51 |
+
add_shortcode( 'wc_pricing', 'wc_shortcodes_pricing' );
|
52 |
+
add_shortcode( 'wc_code' , 'wc_shortcodes_displaycode' );
|
53 |
+
}
|
54 |
+
add_action( 'wc_shortcodes_add_preprocess', 'wc_shortcodes_add_preprocess' );
|
55 |
+
|
56 |
+
|
57 |
+
/*
|
58 |
+
* Allow shortcodes in widgets
|
59 |
+
* @since v1.0
|
60 |
+
*/
|
61 |
+
add_filter('widget_text', 'do_shortcode');
|
62 |
+
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @since 3.6
|
66 |
+
* @access public
|
67 |
+
*
|
68 |
+
* @param array $atts
|
69 |
+
* @param string $content
|
70 |
+
* @return void
|
71 |
+
*/
|
72 |
+
function wc_shortcodes_fullwidth( $atts, $content = null ) {
|
73 |
+
extract(shortcode_atts(array(
|
74 |
+
'selector' => '#main',
|
75 |
+
), $atts));
|
76 |
+
|
77 |
+
wp_enqueue_script('wc_shortcodes_fullwidth');
|
78 |
+
|
79 |
+
return '<div class="wc-shortcodes-full-width" data-selector="' . esc_attr($selector) . '">' . do_shortcode( $content ) . '</div>';
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
// /*
|
84 |
+
// * Fix Shortcodes
|
85 |
+
// * @since v1.0
|
86 |
+
// */
|
87 |
+
// if( !function_exists('wc_shortcodes_fix') ) {
|
88 |
+
// function wc_shortcodes_fix($content){
|
89 |
+
// $array = array (
|
90 |
+
// '<p>[' => '[',
|
91 |
+
// ']</p>' => ']',
|
92 |
+
// ']<br />' => ']'
|
93 |
+
// );
|
94 |
+
// $content = strtr($content, $array);
|
95 |
+
// return $content;
|
96 |
+
// }
|
97 |
+
// add_filter('the_content', 'wc_shortcodes_fix');
|
98 |
+
// }
|
99 |
+
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Easily Display HTML in post
|
103 |
+
*
|
104 |
+
* @param mixed $atts
|
105 |
+
* @param mixed $content
|
106 |
+
* @access public
|
107 |
+
* @return void
|
108 |
+
*/
|
109 |
+
function wc_shortcodes_displayhtml( $atts, $content = null ) {
|
110 |
+
global $post;
|
111 |
+
$html = '';
|
112 |
+
|
113 |
+
if ( $content != null )
|
114 |
+
return $content;
|
115 |
+
|
116 |
+
extract(shortcode_atts(array(
|
117 |
+
'name' => ''
|
118 |
+
), $atts));
|
119 |
+
|
120 |
+
|
121 |
+
$name = trim( $name );
|
122 |
+
$name = preg_replace( '/^_/', '', $name );
|
123 |
+
|
124 |
+
if ( empty( $name ) )
|
125 |
+
return null;
|
126 |
+
|
127 |
+
if ( $snippet = get_post_meta($post->ID, $name, true ) ) {
|
128 |
+
$html = '<div class="wc-shortcodes-html-wrapper">' . $snippet . '</div>';
|
129 |
+
}
|
130 |
+
|
131 |
+
return $html;
|
132 |
+
}
|
133 |
+
add_shortcode( 'wc_html', 'wc_shortcodes_displayhtml' );
|
134 |
+
|
135 |
+
|
136 |
+
/**
|
137 |
+
* @param mixed $atts
|
138 |
+
* @param mixed $content
|
139 |
+
* @access public
|
140 |
+
* @return void
|
141 |
+
*/
|
142 |
+
function wc_shortcodes_displaycode( $atts, $content = null ) {
|
143 |
+
return '<code>'.$content.'</code>';
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* @param mixed $atts
|
148 |
+
* @param mixed $content
|
149 |
+
* @access public
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
function wc_shortcodes_displaypre( $atts, $content = null ) {
|
153 |
+
global $post;
|
154 |
+
$html = '';
|
155 |
+
static $instance = 0;
|
156 |
+
$instance++;
|
157 |
+
|
158 |
+
if ( $content != null )
|
159 |
+
return $content;
|
160 |
+
|
161 |
+
extract(shortcode_atts(array(
|
162 |
+
'name' => '',
|
163 |
+
'scrollable' => 1,
|
164 |
+
'color' => 1,
|
165 |
+
'lang' => '',
|
166 |
+
'linenums' => 0,
|
167 |
+
'wrap' => 0,
|
168 |
+
), $atts));
|
169 |
+
|
170 |
+
$name = trim( $name );
|
171 |
+
$class = array();
|
172 |
+
if ( (int) $color ) {
|
173 |
+
$class[] = 'prettyprint';
|
174 |
+
if ( (int) $linenums )
|
175 |
+
$class[] = 'linenums';
|
176 |
+
if ( ! empty( $lang ) )
|
177 |
+
$class[] = 'lang-' . $lang;
|
178 |
+
}
|
179 |
+
if ( (int) $scrollable )
|
180 |
+
$class[] = 'pre-scrollable';
|
181 |
+
if ( (int) $wrap )
|
182 |
+
$class[] = 'pre-wrap';
|
183 |
+
|
184 |
+
$class = implode( ' ', $class );
|
185 |
+
|
186 |
+
$name = preg_replace( '/^_/', '', $name );
|
187 |
+
|
188 |
+
if ( empty( $name ) )
|
189 |
+
return null;
|
190 |
+
|
191 |
+
if ( $code = get_post_meta($post->ID, $name, true ) ) {
|
192 |
+
wp_enqueue_script('wc_shortcodes_prettify');
|
193 |
+
wp_enqueue_script('wc_shortcodes_pre');
|
194 |
+
//$code = preg_replace( '/[ ]{4,}|[\t]/', ' ', $code );
|
195 |
+
$html .= '<pre id="prettycode-'.$instance.'" class="'.$class.'">';
|
196 |
+
$html .= htmlspecialchars( $code );
|
197 |
+
$html .= '</pre>';
|
198 |
+
}
|
199 |
+
|
200 |
+
return $html;
|
201 |
+
}
|
202 |
+
add_shortcode( 'wc_pre' , 'wc_shortcodes_displaypre' );
|
203 |
+
|
204 |
+
|
205 |
+
/*
|
206 |
+
* Clear Floats
|
207 |
+
* @since v1.0
|
208 |
+
*/
|
209 |
+
if( !function_exists('wc_shortcodes_clear_floats') ) {
|
210 |
+
function wc_shortcodes_clear_floats() {
|
211 |
+
return '<div class="wc-shortcodes-clear-floats"></div>';
|
212 |
+
}
|
213 |
+
add_shortcode( 'wc_clear_floats', 'wc_shortcodes_clear_floats' );
|
214 |
+
}
|
215 |
+
|
216 |
+
|
217 |
+
/*
|
218 |
+
* Skillbars
|
219 |
+
* @since v1.4
|
220 |
+
*/
|
221 |
+
if( !function_exists('wc_shortcodes_callout') ) {
|
222 |
+
function wc_shortcodes_callout( $atts, $content = NULL ) {
|
223 |
+
extract( shortcode_atts( array(
|
224 |
+
'caption' => '',
|
225 |
+
'button_text' => '',
|
226 |
+
'button_color' => 'blue',
|
227 |
+
'button_url' => 'http://www.wpexplorer.com',
|
228 |
+
'button_rel' => 'nofollow',
|
229 |
+
'button_target' => 'blank',
|
230 |
+
'button_border_radius' => '',
|
231 |
+
'class' => '',
|
232 |
+
'icon_left' => '',
|
233 |
+
'icon_right' => ''
|
234 |
+
), $atts ) );
|
235 |
+
|
236 |
+
$border_radius_style = ( $button_border_radius ) ? 'style="border-radius:'. $button_border_radius .'"' : NULL;
|
237 |
+
$output = '<div class="wc-shortcodes-callout wc-shortcodes-clearfix '. $class .'">';
|
238 |
+
$output .= '<div class="wc-shortcodes-callout-caption">';
|
239 |
+
if ( $icon_left ) $output .= '<span class="wc-shortcodes-callout-icon-left icon-'. $icon_left .'"></span>';
|
240 |
+
$output .= do_shortcode ( $content );
|
241 |
+
if ( $icon_right ) $output .= '<span class="wc-shortcodes-callout-icon-right icon-'. $icon_right .'"></span>';
|
242 |
+
$output .= '</div>';
|
243 |
+
if ( $button_text !== '' ) {
|
244 |
+
$output .= '<div class="wc-shortcodes-callout-button">';
|
245 |
+
$output .='<a href="'. $button_url .'" title="'. $button_text .'" target="_'. $button_target .'" class="wc-shortcodes-button '.$button_color .'" '. $border_radius_style .'><span class="wc-shortcodes-button-inner">'. $button_text .'</span></a>';
|
246 |
+
$output .='</div>';
|
247 |
+
}
|
248 |
+
$output .= '</div>';
|
249 |
+
|
250 |
+
return $output;
|
251 |
+
}
|
252 |
+
add_shortcode( 'wc_callout', 'wc_shortcodes_callout' );
|
253 |
+
}
|
254 |
+
|
255 |
+
|
256 |
+
/*
|
257 |
+
* Skillbars
|
258 |
+
* @since v1.3
|
259 |
+
*/
|
260 |
+
if( !function_exists('wc_shortcodes_skillbar') ) {
|
261 |
+
function wc_shortcodes_skillbar( $atts ) {
|
262 |
+
extract( shortcode_atts( array(
|
263 |
+
'title' => '',
|
264 |
+
'percentage' => '100',
|
265 |
+
'color' => '#6adcfa',
|
266 |
+
'class' => '',
|
267 |
+
'show_percent' => 'true'
|
268 |
+
), $atts ) );
|
269 |
+
|
270 |
+
// Enque scripts
|
271 |
+
wp_enqueue_script('wc_shortcodes_skillbar');
|
272 |
+
|
273 |
+
// Display the accordion ';
|
274 |
+
$output = '<div class="wc-shortcodes-skillbar wc-shortcodes-clearfix '. $class .'" data-percent="'. $percentage .'%">';
|
275 |
+
if ( $title !== '' ) $output .= '<div class="wc-shortcodes-skillbar-title" style="background: '. $color .';"><span>'. $title .'</span></div>';
|
276 |
+
$output .= '<div class="wc-shortcodes-skillbar-bar" style="background: '. $color .';"></div>';
|
277 |
+
if ( $show_percent == 'true' ) {
|
278 |
+
$output .= '<div class="wc-shortcodes-skill-bar-percent">'.$percentage.'%</div>';
|
279 |
+
}
|
280 |
+
$output .= '</div>';
|
281 |
+
|
282 |
+
return $output;
|
283 |
+
}
|
284 |
+
add_shortcode( 'wc_skillbar', 'wc_shortcodes_skillbar' );
|
285 |
+
}
|
286 |
+
|
287 |
+
|
288 |
+
/*
|
289 |
+
* Spacing
|
290 |
+
* @since v1.0
|
291 |
+
*/
|
292 |
+
if( !function_exists('wc_shortcodes_spacing') ) {
|
293 |
+
function wc_shortcodes_spacing( $atts ) {
|
294 |
+
extract( shortcode_atts( array(
|
295 |
+
'size' => '20px',
|
296 |
+
'class' => '',
|
297 |
+
),
|
298 |
+
$atts ) );
|
299 |
+
return '<hr class="wc-shortcodes-spacing '. $class .'" style="height: '. $size .'" />';
|
300 |
+
}
|
301 |
+
add_shortcode( 'wc_spacing', 'wc_shortcodes_spacing' );
|
302 |
+
}
|
303 |
+
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Social Icons
|
307 |
+
* @since 1.0
|
308 |
+
*/
|
309 |
+
if( !function_exists('wc_shortcodes_social_icons') ) {
|
310 |
+
function wc_shortcodes_social_icons( $atts ){
|
311 |
+
$social = array(
|
312 |
+
'facebook' => 'Facebook',
|
313 |
+
'google' => 'Google',
|
314 |
+
'twitter' => 'Twitter',
|
315 |
+
'pinterest' => 'Pinterest',
|
316 |
+
'instagram' => 'Instagram',
|
317 |
+
'bloglovin' => 'BlogLovin',
|
318 |
+
'flickr' => 'Flickr',
|
319 |
+
'rss' => 'RSS',
|
320 |
+
'email' => 'Email',
|
321 |
+
'custom1' => 'Custom 1',
|
322 |
+
'custom2' => 'Custom 2',
|
323 |
+
'custom3' => 'Custom 3',
|
324 |
+
'custom4' => 'Custom 4',
|
325 |
+
'custom5' => 'Custom 5',
|
326 |
+
);
|
327 |
+
|
328 |
+
extract(shortcode_atts(array(
|
329 |
+
'class' => '',
|
330 |
+
'size' => 'large',
|
331 |
+
'align' => 'left',
|
332 |
+
'display' => 'facebook,google,twitter,pinterest,instagram,bloglovin,flickr,rss,email,custom1,custom2,custom3,custom4,custom5',
|
333 |
+
), $atts));
|
334 |
+
|
335 |
+
$class = trim( 'wc-shortcodes-social-icons-wrapper ' . $class );
|
336 |
+
|
337 |
+
$order = explode( ',', $display );
|
338 |
+
$first = true;
|
339 |
+
|
340 |
+
$html = '<div class="' . $class . '">';
|
341 |
+
$html .= '<ul class="wc-shortcodes-social-icons wc-shortcodes-clearfix wc-shortcodes-social-icons-align-'.$align.' wc-shortcodes-social-icons-size-'.$size.'">';
|
342 |
+
foreach ( $order as $key ) {
|
343 |
+
if ( ! array_key_exists( $key, $social ) )
|
344 |
+
continue;
|
345 |
+
|
346 |
+
$link_option_name = WC_SHORTCODES_PREFIX . $key . '_link';
|
347 |
+
$icon_option_name = WC_SHORTCODES_PREFIX . $key . '_icon';
|
348 |
+
|
349 |
+
if ( $icon_url = get_option( $icon_option_name ) ) {
|
350 |
+
$social_link = get_option( $link_option_name );
|
351 |
+
$social_link = apply_filters( 'wc_shortcodes_social_link', $social_link, $key );
|
352 |
+
$first_class = $first ? ' first-icon' : '';
|
353 |
+
$first = false;
|
354 |
+
|
355 |
+
$html .= '<li class="wc-shortcodes-social-icon wc-shortcode-social-icon-' . $key . $first_class . '">';
|
356 |
+
$html .='<a href="'.$social_link.'">';
|
357 |
+
$html .= '<img src="'.$icon_url.'">';
|
358 |
+
$html .= '</a>';
|
359 |
+
$html .= '</li>';
|
360 |
+
}
|
361 |
+
}
|
362 |
+
$html .= '</ul>';
|
363 |
+
$html .= '</div>';
|
364 |
+
|
365 |
+
return $html;
|
366 |
+
}
|
367 |
+
add_shortcode( 'wc_social_icons', 'wc_shortcodes_social_icons' );
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Highlights
|
372 |
+
* @since 1.0
|
373 |
+
*/
|
374 |
+
if ( !function_exists( 'wc_shortcodes_highlight' ) ) {
|
375 |
+
function wc_shortcodes_highlight( $atts, $content = null ) {
|
376 |
+
extract( shortcode_atts( array(
|
377 |
+
'color' => 'yellow',
|
378 |
+
'class' => '',
|
379 |
+
),
|
380 |
+
$atts ) );
|
381 |
+
return '<span class="wc-shortcodes-highlight wc-shortcodes-highlight-'. $color .' '. $class .'">' . do_shortcode( $content ) . '</span>';
|
382 |
+
|
383 |
+
}
|
384 |
+
add_shortcode( 'wc_highlight', 'wc_shortcodes_highlight' );
|
385 |
+
}
|
386 |
+
|
387 |
+
|
388 |
+
/*
|
389 |
+
* Buttons
|
390 |
+
* @since v1.0
|
391 |
+
*/
|
392 |
+
if( !function_exists('wc_shortcodes_button') ) {
|
393 |
+
function wc_shortcodes_button( $atts, $content = null ) {
|
394 |
+
extract( shortcode_atts( array(
|
395 |
+
'type' => 'primary', // or inverse
|
396 |
+
'url' => 'http://www.wordpresscanvas.com',
|
397 |
+
'title' => 'Visit Site',
|
398 |
+
'target' => 'self',
|
399 |
+
'rel' => '',
|
400 |
+
'border_radius' => '',
|
401 |
+
'class' => '',
|
402 |
+
'icon_left' => '',
|
403 |
+
'icon_right' => ''
|
404 |
+
), $atts ) );
|
405 |
+
|
406 |
+
|
407 |
+
// $border_radius_style = ( $border_radius ) ? 'style="border-radius:'. $border_radius .'"' : NULL;
|
408 |
+
$rel = ( $rel ) ? 'rel="'.$rel.'"' : NULL;
|
409 |
+
$type = 'wc-shortcodes-button-' . $type;
|
410 |
+
|
411 |
+
$button = NULL;
|
412 |
+
$button .= '<a href="' . $url . '" class="wc-shortcodes-button ' . $type . ' '. $class .'" target="_'.$target.'" title="'. $title .'" '. $rel .'>';
|
413 |
+
$button .= '<span class="wc-shortcodes-button-inner">';
|
414 |
+
if ( $icon_left ) $button .= '<span class="wc-shortcodes-button-icon-left icon-'. $icon_left .'"></span>';
|
415 |
+
$button .= $content;
|
416 |
+
if ( $icon_right ) $button .= '<span class="wc-shortcodes-button-icon-right icon-'. $icon_right .'"></span>';
|
417 |
+
$button .= '</span>';
|
418 |
+
$button .= '</a>';
|
419 |
+
return $button;
|
420 |
+
}
|
421 |
+
add_shortcode( 'wc_button', 'wc_shortcodes_button' );
|
422 |
+
}
|
423 |
+
|
424 |
+
|
425 |
+
|
426 |
+
/*
|
427 |
+
* Boxes
|
428 |
+
* @since v1.0
|
429 |
+
*
|
430 |
+
*/
|
431 |
+
if( !function_exists('wc_shortcodes_box') ) {
|
432 |
+
function wc_shortcodes_box( $atts, $content = null ) {
|
433 |
+
extract( shortcode_atts( array(
|
434 |
+
'color' => 'primary',
|
435 |
+
'text_align' => 'left',
|
436 |
+
'margin_top' => '',
|
437 |
+
'margin_bottom' => '',
|
438 |
+
'class' => '',
|
439 |
+
), $atts ) );
|
440 |
+
|
441 |
+
$style_attr = '';
|
442 |
+
if( $margin_bottom ) {
|
443 |
+
$style_attr .= 'margin-bottom: '. $margin_bottom .';';
|
444 |
+
}
|
445 |
+
if ( $margin_top ) {
|
446 |
+
$style_attr .= 'margin-top: '. $margin_top .';';
|
447 |
+
}
|
448 |
+
|
449 |
+
$alert_content = '';
|
450 |
+
$alert_content .= '<div class="wc-shortcodes-box wc-shortcodes-clearfix wc-shortcodes-box-' . $color . ' '. $class .'" style="text-align:'. $text_align .';'. $style_attr .'">';
|
451 |
+
$alert_content .= ' '. do_shortcode($content) .'</div>';
|
452 |
+
return $alert_content;
|
453 |
+
}
|
454 |
+
}
|
455 |
+
|
456 |
+
|
457 |
+
|
458 |
+
/*
|
459 |
+
* Testimonial
|
460 |
+
* @since v1.0
|
461 |
+
*
|
462 |
+
*/
|
463 |
+
if( !function_exists('wc_shortcodes_testimonial') ) {
|
464 |
+
function wc_shortcodes_testimonial( $atts, $content = null ) {
|
465 |
+
extract( shortcode_atts( array(
|
466 |
+
'by' => '',
|
467 |
+
'position' => 'left',
|
468 |
+
'class' => '',
|
469 |
+
), $atts ) );
|
470 |
+
$testimonial_content = '';
|
471 |
+
$testimonial_content .= '<div class="wc-shortcodes-testimonial wc-shortcodes-clearfix wc-shortcodes-testimonial-'.$position.' '. $class .'"><div class="wc-shortcodes-testimonial-content">';
|
472 |
+
$testimonial_content .= $content;
|
473 |
+
$testimonial_content .= '</div><div class="wc-shortcodes-testimonial-author">';
|
474 |
+
$testimonial_content .= $by .'</div></div>';
|
475 |
+
return $testimonial_content;
|
476 |
+
}
|
477 |
+
}
|
478 |
+
|
479 |
+
|
480 |
+
|
481 |
+
/*
|
482 |
+
* Center
|
483 |
+
* @since v1.0
|
484 |
+
*
|
485 |
+
*/
|
486 |
+
if( !function_exists('wc_shortcodes_center') ) {
|
487 |
+
function wc_shortcodes_center( $atts, $content = null ){
|
488 |
+
extract( shortcode_atts( array(
|
489 |
+
'max_width' => '500px',
|
490 |
+
'text_align' => 'center',
|
491 |
+
'class' => '',
|
492 |
+
), $atts ) );
|
493 |
+
|
494 |
+
// $append_clearfix = '<div class="wc-shortcodes-clear-floats"></div>';
|
495 |
+
$style = empty( $max_width ) ? '' : ' style="max-width:'.$max_width.';"';
|
496 |
+
|
497 |
+
return '<div class="wc-shortcodes-center wc-shortcodes-clearfix wc-shortcodes-center-inner-align-'. $text_align .' '. $class .'"' . $style . '>' . do_shortcode($content) . '</div>';
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
|
502 |
+
|
503 |
+
/*
|
504 |
+
* Columns
|
505 |
+
* @since v1.0
|
506 |
+
*
|
507 |
+
*/
|
508 |
+
if( !function_exists('wc_shortcodes_column') ) {
|
509 |
+
function wc_shortcodes_column( $atts, $content = null ){
|
510 |
+
extract( shortcode_atts( array(
|
511 |
+
'size' => 'one-third',
|
512 |
+
'position' =>'',
|
513 |
+
'class' => '',
|
514 |
+
'text_align'=> '',
|
515 |
+
), $atts ) );
|
516 |
+
|
517 |
+
$style = '';
|
518 |
+
if ( $text_align ) {
|
519 |
+
if ( 'left' == $text_align )
|
520 |
+
$style = ' style="text-align: '.$text_align.';"';
|
521 |
+
if ( 'center' == $text_align )
|
522 |
+
$style = ' style="text-align: '.$text_align.';"';
|
523 |
+
if ( 'right' == $text_align )
|
524 |
+
$style = ' style="text-align: '.$text_align.';"';
|
525 |
+
}
|
526 |
+
|
527 |
+
$append_clearfix = 'last' == $position ? '<div class="wc-shortcodes-clear-floats"></div>' : '';
|
528 |
+
|
529 |
+
return '<div'.$style.' class="wc-shortcodes-column wc-shortcodes-' . $size . ' wc-shortcodes-column-'.$position.' '. $class .'">' . do_shortcode($content) . '</div>';
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
|
534 |
+
|
535 |
+
|
536 |
+
/*
|
537 |
+
* Rows
|
538 |
+
* @since v1.0
|
539 |
+
*
|
540 |
+
*/
|
541 |
+
if( !function_exists('wc_shortcodes_row') ) {
|
542 |
+
function wc_shortcodes_row( $atts, $content = null ){
|
543 |
+
return '<div class="wc-shortcodes-row wc-shortcodes-clearfix">' . do_shortcode($content) . '</div>';
|
544 |
+
}
|
545 |
+
}
|
546 |
+
|
547 |
+
|
548 |
+
|
549 |
+
/*
|
550 |
+
* Toggle
|
551 |
+
* @since v1.0
|
552 |
+
*/
|
553 |
+
if( !function_exists('wc_shortcodes_toggle') ) {
|
554 |
+
function wc_shortcodes_toggle( $atts, $content = null ) {
|
555 |
+
extract( shortcode_atts( array(
|
556 |
+
'title' => 'Toggle Title',
|
557 |
+
'class' => '',
|
558 |
+
'padding' => '',
|
559 |
+
'border_width' => '',
|
560 |
+
), $atts ) );
|
561 |
+
|
562 |
+
$style = array();
|
563 |
+
|
564 |
+
if ( ! empty( $padding ) || '0' === $padding )
|
565 |
+
$style[] = 'padding:'.$padding;
|
566 |
+
if ( ! empty( $border_width ) || '0' === $border_width )
|
567 |
+
$style[] = 'border-width:'.$border_width;
|
568 |
+
|
569 |
+
$style = implode( ';', $style );
|
570 |
+
|
571 |
+
// Enque scripts
|
572 |
+
wp_enqueue_script('wc_shortcodes_toggle');
|
573 |
+
|
574 |
+
// Display the Toggle
|
575 |
+
return '<div class="wc-shortcodes-toggle '. $class .'"><div class="wc-shortcodes-toggle-trigger"><a href="#">'. $title .'</a></div><div style="'.$style.'" class="wc-shortcodes-toggle-container">' . do_shortcode($content) . '</div></div>';
|
576 |
+
}
|
577 |
+
}
|
578 |
+
|
579 |
+
|
580 |
+
/*
|
581 |
+
* Accordion
|
582 |
+
* @since v1.0
|
583 |
+
*
|
584 |
+
*/
|
585 |
+
|
586 |
+
// Main
|
587 |
+
if( !function_exists('wc_shortcodes_accordion_main') ) {
|
588 |
+
function wc_shortcodes_accordion_main( $atts, $content = null ) {
|
589 |
+
|
590 |
+
extract( shortcode_atts( array(
|
591 |
+
'class' => '',
|
592 |
+
'collapse' => 0,
|
593 |
+
), $atts ) );
|
594 |
+
|
595 |
+
$type = 'wc-shortcodes-accordion-default';
|
596 |
+
|
597 |
+
if ( (int) $collapse )
|
598 |
+
$type = 'wc-shortcodes-accordion-collapse';
|
599 |
+
|
600 |
+
// Enque scripts
|
601 |
+
wp_enqueue_script('wc_shortcodes_accordion');
|
602 |
+
|
603 |
+
// Display the accordion
|
604 |
+
return '<div class="wc-shortcodes-accordion '.$type.' '. $class .'">' . do_shortcode($content) . '</div>';
|
605 |
+
}
|
606 |
+
}
|
607 |
+
|
608 |
+
|
609 |
+
// Section
|
610 |
+
if( !function_exists('wc_shortcodes_accordion_section') ) {
|
611 |
+
function wc_shortcodes_accordion_section( $atts, $content = null ) {
|
612 |
+
extract( shortcode_atts( array(
|
613 |
+
'title' => 'Title',
|
614 |
+
'class' => '',
|
615 |
+
'padding' => '',
|
616 |
+
'border_width' => '',
|
617 |
+
), $atts ) );
|
618 |
+
|
619 |
+
$style = array();
|
620 |
+
|
621 |
+
if ( ! empty( $padding ) || '0' === $padding )
|
622 |
+
$style[] = 'padding:'.$padding;
|
623 |
+
if ( ! empty( $border_width ) || '0' === $border_width )
|
624 |
+
$style[] = 'border-width:'.$border_width;
|
625 |
+
|
626 |
+
$style = implode( ';', $style );
|
627 |
+
|
628 |
+
return '<div class="wc-shortcodes-accordion-trigger '. $class .'"><a href="#">'. $title .'</a></div><div style="'.$style.'" class="wc-shortcodes-accordion-content">' . do_shortcode($content) . '</div>';
|
629 |
+
}
|
630 |
+
|
631 |
+
}
|
632 |
+
|
633 |
+
|
634 |
+
/*
|
635 |
+
* Tabs
|
636 |
+
* @since v1.0
|
637 |
+
*
|
638 |
+
*/
|
639 |
+
if (!function_exists('wc_shortcodes_tabgroup')) {
|
640 |
+
function wc_shortcodes_tabgroup( $atts, $content = null ) {
|
641 |
+
|
642 |
+
//Enque scripts
|
643 |
+
wp_enqueue_script('wc_shortcodes_tabs');
|
644 |
+
|
645 |
+
// Display Tabs
|
646 |
+
$defaults = array();
|
647 |
+
extract( shortcode_atts( $defaults, $atts ) );
|
648 |
+
preg_match_all( '/tab title="([^\"]+)"/i', $content, $matches, PREG_OFFSET_CAPTURE );
|
649 |
+
$tab_titles = array();
|
650 |
+
if( isset($matches[1]) ){ $tab_titles = $matches[1]; }
|
651 |
+
$output = '';
|
652 |
+
if( count($tab_titles) ){
|
653 |
+
$output .= '<div id="wc-shortcodes-tab-'. rand(1, 100) .'" class="wc-shortcodes-tabs">';
|
654 |
+
$output .= '<ul class="ui-tabs-nav wc-shortcodes-clearfix">';
|
655 |
+
foreach( $tab_titles as $tab ){
|
656 |
+
$output .= '<li><a href="#wc-shortcodes-tab-'. sanitize_title( $tab[0] ) .'">' . $tab[0] . '</a></li>';
|
657 |
+
}
|
658 |
+
$output .= '</ul>';
|
659 |
+
$output .= do_shortcode( $content );
|
660 |
+
$output .= '</div>';
|
661 |
+
} else {
|
662 |
+
$output .= do_shortcode( $content );
|
663 |
+
}
|
664 |
+
return $output;
|
665 |
+
}
|
666 |
+
}
|
667 |
+
if (!function_exists('wc_shortcodes_tab')) {
|
668 |
+
function wc_shortcodes_tab( $atts, $content = null ) {
|
669 |
+
$defaults = array(
|
670 |
+
'title' => 'Tab',
|
671 |
+
'class' => ''
|
672 |
+
);
|
673 |
+
extract( shortcode_atts( $defaults, $atts ) );
|
674 |
+
return '<div id="wc-shortcodes-tab-'. sanitize_title( $title ) .'" class="tab-content '. $class .'">'. do_shortcode( $content ) .'</div>';
|
675 |
+
}
|
676 |
+
}
|
677 |
+
|
678 |
+
|
679 |
+
|
680 |
+
|
681 |
+
/*
|
682 |
+
* Pricing Table
|
683 |
+
* @since v1.0
|
684 |
+
*
|
685 |
+
*/
|
686 |
+
|
687 |
+
/*section*/
|
688 |
+
if( !function_exists('wc_shortcodes_pricing') ) {
|
689 |
+
function wc_shortcodes_pricing( $atts, $content = null ) {
|
690 |
+
|
691 |
+
extract( shortcode_atts( array(
|
692 |
+
'type' => 'primary',
|
693 |
+
'plan' => 'Basic',
|
694 |
+
'cost' => '$20',
|
695 |
+
'per' => 'month',
|
696 |
+
'button_url' => '',
|
697 |
+
'button_text' => 'Purchase',
|
698 |
+
'button_target' => 'self',
|
699 |
+
'button_rel' => 'nofollow',
|
700 |
+
'class' => '',
|
701 |
+
), $atts ) );
|
702 |
+
|
703 |
+
//start content
|
704 |
+
$pricing_content ='';
|
705 |
+
$pricing_content .= '<div class="wc-shortcodes-pricing wc-shortcodes-pricing-type-'. $type .' '. $class .'">';
|
706 |
+
$pricing_content .= '<div class="wc-shortcodes-pricing-header">';
|
707 |
+
$pricing_content .= '<h5>'. $plan. '</h5>';
|
708 |
+
$pricing_content .= '<div class="wc-shortcodes-pricing-cost">'. $cost .'</div><div class="wc-shortcodes-pricing-per">'. $per .'</div>';
|
709 |
+
$pricing_content .= '</div>';
|
710 |
+
$pricing_content .= '<div class="wc-shortcodes-pricing-content">';
|
711 |
+
$pricing_content .= ''. $content. '';
|
712 |
+
$pricing_content .= '</div>';
|
713 |
+
if( $button_url ) {
|
714 |
+
$pricing_content .= '<div class="wc-shortcodes-pricing-button"><a href="'. $button_url .'" class="wc-shortcodes-button wc-shortcodes-button-'.$type.'" target="_'. $button_target .'" rel="'. $button_rel .'"><span class="wc-shortcodes-button-inner">'. $button_text .'</span></a></div>';
|
715 |
+
}
|
716 |
+
$pricing_content .= '</div>';
|
717 |
+
return $pricing_content;
|
718 |
+
}
|
719 |
+
|
720 |
+
}
|
721 |
+
|
722 |
+
|
723 |
+
/*
|
724 |
+
* Heading
|
725 |
+
* @since v1.1
|
726 |
+
*/
|
727 |
+
if( !function_exists('wc_shortcodes_heading') ) {
|
728 |
+
function wc_shortcodes_heading( $atts ) {
|
729 |
+
extract( shortcode_atts( array(
|
730 |
+
'title' => __('Sample Heading', 'wc'),
|
731 |
+
'type' => 'h2',
|
732 |
+
'margin_top' => '',
|
733 |
+
'margin_bottom' => '',
|
734 |
+
'text_align' => '',
|
735 |
+
'font_size' => '',
|
736 |
+
'color' => '',
|
737 |
+
'class' => '',
|
738 |
+
'icon_left' => '',
|
739 |
+
'icon_right' => ''
|
740 |
+
),
|
741 |
+
$atts ) );
|
742 |
+
|
743 |
+
$style_attr = '';
|
744 |
+
if ( $font_size ) {
|
745 |
+
$style_attr .= 'font-size: '. $font_size .';';
|
746 |
+
}
|
747 |
+
if ( $color ) {
|
748 |
+
$style_attr .= 'color: '. $color .';';
|
749 |
+
}
|
750 |
+
if( $margin_bottom ) {
|
751 |
+
$style_attr .= 'margin-bottom: '. $margin_bottom .';';
|
752 |
+
}
|
753 |
+
if ( $margin_top ) {
|
754 |
+
$style_attr .= 'margin-top: '. $margin_top .';';
|
755 |
+
}
|
756 |
+
|
757 |
+
if ( $text_align ) {
|
758 |
+
$text_align = 'text-align-'. $text_align;
|
759 |
+
} else {
|
760 |
+
$text_align = 'text-align-left';
|
761 |
+
}
|
762 |
+
|
763 |
+
if ( 'h1' == $type )
|
764 |
+
$class = trim( 'entry-title ' . $class );
|
765 |
+
|
766 |
+
$output = '<'.$type.' class="wc-shortcodes-heading '. $text_align .' '. $class .'" style="'.$style_attr.'"><span>';
|
767 |
+
if ( $icon_left ) $output .= '<i class="wc-shortcodes-button-icon-left icon-'. $icon_left .'"></i>';
|
768 |
+
$output .= $title;
|
769 |
+
if ( $icon_right ) $output .= '<i class="wc-shortcodes-button-icon-right icon-'. $icon_right .'"></i>';
|
770 |
+
$output .= '</'.$type.'></span>';
|
771 |
+
|
772 |
+
if ( 'h1' == $type )
|
773 |
+
$output = '<header class="entry-header">'. $output . '</header>';
|
774 |
+
|
775 |
+
return $output;
|
776 |
+
}
|
777 |
+
add_shortcode( 'wc_heading', 'wc_shortcodes_heading' );
|
778 |
+
}
|
779 |
+
|
780 |
+
|
781 |
+
/*
|
782 |
+
* Google Maps
|
783 |
+
* @since v1.1
|
784 |
+
*/
|
785 |
+
if (! function_exists( 'wc_shortcodes_googlemaps' ) ) :
|
786 |
+
function wc_shortcodes_googlemaps($atts, $content = null) {
|
787 |
+
|
788 |
+
extract(shortcode_atts(array(
|
789 |
+
'title' => '',
|
790 |
+
'location' => '',
|
791 |
+
'width' => '',
|
792 |
+
'height' => '300',
|
793 |
+
'zoom' => 8,
|
794 |
+
'align' => '',
|
795 |
+
'class' => '',
|
796 |
+
), $atts));
|
797 |
+
|
798 |
+
// load scripts
|
799 |
+
wp_enqueue_script('wc_shortcodes_googlemap');
|
800 |
+
wp_enqueue_script('wc_shortcodes_googlemap_api');
|
801 |
+
|
802 |
+
|
803 |
+
$output = '<div id="map_canvas_'.rand(1, 100).'" class="googlemap '. $class .'" style="height:'.$height.'px;width:100%">';
|
804 |
+
$output .= (!empty($title)) ? '<input class="title" type="hidden" value="'.$title.'" />' : '';
|
805 |
+
$output .= '<input class="location" type="hidden" value="'.$location.'" />';
|
806 |
+
$output .= '<input class="zoom" type="hidden" value="'.$zoom.'" />';
|
807 |
+
$output .= '<div class="map_canvas"></div>';
|
808 |
+
$output .= '</div>';
|
809 |
+
|
810 |
+
return $output;
|
811 |
+
|
812 |
+
}
|
813 |
+
add_shortcode( 'wc_googlemap', 'wc_shortcodes_googlemaps' );
|
814 |
+
endif;
|
815 |
+
|
816 |
+
|
817 |
+
/*
|
818 |
+
* Divider
|
819 |
+
* @since v1.1
|
820 |
+
*/
|
821 |
+
if( !function_exists('wc_shortcodes_divider') ) {
|
822 |
+
function wc_shortcodes_divider( $atts ) {
|
823 |
+
extract( shortcode_atts( array(
|
824 |
+
'style' => 'solid',
|
825 |
+
'line' => 'single',
|
826 |
+
'margin_top' => '',
|
827 |
+
'margin_bottom' => '',
|
828 |
+
'class' => '',
|
829 |
+
),
|
830 |
+
$atts ) );
|
831 |
+
$style_attr = '';
|
832 |
+
if ( $margin_top && $margin_bottom ) {
|
833 |
+
$style_attr = 'style="margin-top: '. $margin_top .';margin-bottom: '. $margin_bottom .';"';
|
834 |
+
} elseif( $margin_bottom ) {
|
835 |
+
$style_attr = 'style="margin-bottom: '. $margin_bottom .';"';
|
836 |
+
} elseif ( $margin_top ) {
|
837 |
+
$style_attr = 'style="margin-top: '. $margin_top .';"';
|
838 |
+
} else {
|
839 |
+
$style_attr = NULL;
|
840 |
+
}
|
841 |
+
return '<hr class="wc-shortcodes-divider wc-shortcodes-divider-line-'.$line.' wc-shortcodes-divider-style-'. $style .' '. $class .'" '.$style_attr.' />';
|
842 |
+
}
|
843 |
+
add_shortcode( 'wc_divider', 'wc_shortcodes_divider' );
|
844 |
+
}
|
includes/widgets.php
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/******************************************************************
|
3 |
+
Author: Chris Baldelomar
|
4 |
+
URL: http://webplantmedia.com
|
5 |
+
|
6 |
+
All widget code should go here.
|
7 |
+
******************************************************************/
|
8 |
+
|
9 |
+
function wc_shortcodes_register_widgets() {
|
10 |
+
// Register social icons widget version 2
|
11 |
+
register_widget('WC_Shortcodes_Social_Icons_Widget');
|
12 |
+
}
|
13 |
+
add_action('widgets_init', 'wc_shortcodes_register_widgets');
|
14 |
+
|
15 |
+
/**
|
16 |
+
* WC_Shortcodes_Social_Icons_Widget
|
17 |
+
*
|
18 |
+
* This displays a sidebar widget of social media icons.
|
19 |
+
*
|
20 |
+
* @uses WP
|
21 |
+
* @uses _Widget
|
22 |
+
*/
|
23 |
+
class WC_Shortcodes_Social_Icons_Widget extends WP_Widget {
|
24 |
+
function __construct() {
|
25 |
+
$widget_ops = array( 'description' => __('Add your social icons to your sidebar.') );
|
26 |
+
parent::__construct( 'wc_shortcodes_social_icons', __('Social Icons'), $widget_ops );
|
27 |
+
}
|
28 |
+
|
29 |
+
function widget($args, $instance) {
|
30 |
+
|
31 |
+
$instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
|
32 |
+
|
33 |
+
echo $args['before_widget'];
|
34 |
+
|
35 |
+
if ( !empty($instance['title']) )
|
36 |
+
echo $args['before_title'] . $instance['title'] . $args['after_title'];
|
37 |
+
|
38 |
+
// set class with the number of columns the user selected
|
39 |
+
$columns = (int) $instance['columns'];
|
40 |
+
if ( empty($columns) ) {
|
41 |
+
$columns = 3;
|
42 |
+
}
|
43 |
+
|
44 |
+
$order = $instance['order'];
|
45 |
+
$first = true;
|
46 |
+
|
47 |
+
$class = ' wc-shortcodes-columns-'.$columns;
|
48 |
+
|
49 |
+
$html = '<ul class="wc-shortcodes-social-icons wc-shortcodes-clearfix'.$class.'">';
|
50 |
+
$i = 0;
|
51 |
+
foreach ($order as $key => $name) {
|
52 |
+
$li_class = array();
|
53 |
+
$li_class[] = 'wc-shortcodes-social-icon';
|
54 |
+
$li_class[] = 'wc-shortcode-social-icon-' . $key;
|
55 |
+
|
56 |
+
if ( $i % $columns == 0 )
|
57 |
+
$li_class[] = 'clear-left';
|
58 |
+
|
59 |
+
$link_option_name = WC_SHORTCODES_PREFIX . $key . '_link';
|
60 |
+
$icon_option_name = WC_SHORTCODES_PREFIX . $key . '_icon';
|
61 |
+
|
62 |
+
if ( $icon_url = get_option( $icon_option_name ) ) {
|
63 |
+
$social_link = get_option( $link_option_name );
|
64 |
+
$social_link = apply_filters( 'wc_shortcodes_social_link', $social_link, $key );
|
65 |
+
|
66 |
+
if ( $first )
|
67 |
+
$li_class[] = 'first-icon';
|
68 |
+
|
69 |
+
$first = false;
|
70 |
+
|
71 |
+
$html .= '<li class="'.implode( ' ', $li_class ).'">';
|
72 |
+
$html .='<a href="'.$social_link.'">';
|
73 |
+
$html .= '<img src="'.$icon_url.'">';
|
74 |
+
$html .= '</a>';
|
75 |
+
$html .= '</li>';
|
76 |
+
}
|
77 |
+
}
|
78 |
+
$html .= '</ul>';
|
79 |
+
|
80 |
+
echo $html;
|
81 |
+
|
82 |
+
echo $args['after_widget'];
|
83 |
+
}
|
84 |
+
|
85 |
+
function update( $new_instance, $old_instance ) {
|
86 |
+
$instance['title'] = strip_tags( stripslashes($new_instance['title']) );
|
87 |
+
$instance['columns'] = (int) $new_instance['columns'];
|
88 |
+
$instance['order'] = $new_instance['order'];
|
89 |
+
return $instance;
|
90 |
+
}
|
91 |
+
|
92 |
+
function form( $instance ) {
|
93 |
+
$default_order = array(
|
94 |
+
'facebook' => 'Facebook',
|
95 |
+
'google' => 'Google',
|
96 |
+
'twitter' => 'Twitter',
|
97 |
+
'pinterest' => 'Pinterest',
|
98 |
+
'instagram' => 'Instagram',
|
99 |
+
'bloglovin' => 'BlogLovin',
|
100 |
+
'flickr' => 'Flickr',
|
101 |
+
'rss' => 'RSS',
|
102 |
+
'email' => 'Email',
|
103 |
+
'custom1' => 'Custom 1',
|
104 |
+
'custom2' => 'Custom 2',
|
105 |
+
'custom3' => 'Custom 3',
|
106 |
+
'custom4' => 'Custom 4',
|
107 |
+
'custom5' => 'Custom 5',
|
108 |
+
);
|
109 |
+
$order = isset( $instance['order'] ) ? $instance['order'] : $default_order;
|
110 |
+
$title = isset( $instance['title'] ) ? $instance['title'] : 'Follow Me!';
|
111 |
+
$columns = isset( $instance['columns'] ) ? (int) $instance['columns'] : 6;
|
112 |
+
?>
|
113 |
+
<label><?php _e('Order:'); ?></label>
|
114 |
+
<ul class="wc-shortcodes-clearfix wc-shortcodes-social-icons">
|
115 |
+
<?php foreach ( $order as $key => $name ) : ?>
|
116 |
+
<li>
|
117 |
+
<p style="background-color:#f7f7f7;border:1px solid #dfdfdf;padding:2px;margin:0;text-align:center;cursor:move;"><?php echo $name; ?></p>
|
118 |
+
<input type="hidden" name="<?php echo $this->get_field_name('order'); ?>[<?php echo $key; ?>]" value="<?php echo $name; ?>" />
|
119 |
+
</li>
|
120 |
+
<?php endforeach; ?>
|
121 |
+
</ul>
|
122 |
+
<p>
|
123 |
+
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:') ?></label>
|
124 |
+
<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" />
|
125 |
+
</p>
|
126 |
+
<p>
|
127 |
+
<label for="<?php echo $this->get_field_id('columns'); ?>"><?php _e('Number of Columns:'); ?></label>
|
128 |
+
<select id="<?php echo $this->get_field_id('columns'); ?>" name="<?php echo $this->get_field_name('columns'); ?>">
|
129 |
+
<option value="1"<?php selected( $columns, '1' ); ?>>1</option>';
|
130 |
+
<option value="2"<?php selected( $columns, '2' ); ?>>2</option>';
|
131 |
+
<option value="3"<?php selected( $columns, '3' ); ?>>3</option>';
|
132 |
+
<option value="4"<?php selected( $columns, '4' ); ?>>4</option>';
|
133 |
+
<option value="5"<?php selected( $columns, '5' ); ?>>5</option>';
|
134 |
+
<option value="6"<?php selected( $columns, '6' ); ?>>6</option>';
|
135 |
+
<option value="7"<?php selected( $columns, '7' ); ?>>7</option>';
|
136 |
+
<option value="8"<?php selected( $columns, '8' ); ?>>8</option>';
|
137 |
+
</select>
|
138 |
+
</p>
|
139 |
+
<script type="text/javascript">
|
140 |
+
/* <![CDATA[ */
|
141 |
+
jQuery(document).ready(function($){
|
142 |
+
$('.wc-shortcodes-social-icons').sortable({ axis: "y" });
|
143 |
+
});
|
144 |
+
/* ]]> */
|
145 |
+
</script>
|
146 |
+
<?php
|
147 |
+
}
|
148 |
+
}
|
readme.txt
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WordPress Canvas Shortcodes ===
|
2 |
+
|
3 |
+
Contributors: cbaldelomar
|
4 |
+
Donate link: http://webplantmedia.com/pay-now/
|
5 |
+
Tags: shortcode, shortcodes
|
6 |
+
Requires at least: 3.7
|
7 |
+
Tested up to: 3.7.1
|
8 |
+
Stable tag: trunk
|
9 |
+
License: GPLv2 or later
|
10 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
|
12 |
+
A family of shortcodes to enhance site functionality.
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
Enhance Pages with the following features. Accordion, Tabs, Toggle, Columns, Testimonials, Borders, Buttons, Full Width, Notifications, Google Maps, Social Icons, Progress Bars, Pricing, Highlights, Custom HTML, Code.
|
17 |
+
|
18 |
+
See the shortcodes in action at [WordPress Canvas Shortcodes](http://wordpresscanvas.com/features/shortcodes/).
|
19 |
+
|
20 |
+
### Professional Support
|
21 |
+
|
22 |
+
If you need professional plugin support from me, the plugin author, you can contact me at [WordPress Canvas](http://wordpresscanvas.com/).
|
23 |
+
|
24 |
+
### Plugin Development
|
25 |
+
|
26 |
+
If you're a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it's [GitHub repository](https://github.com/webplantmedia/wc-shortcodes).
|
27 |
+
|
28 |
+
### Donations
|
29 |
+
|
30 |
+
Yes, I do accept donations. If you want to buy me a sandwich or whatever, you can do so from my [payment page](http://webplantmedia.com/pay-now/). I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are always a nice incentive.
|
31 |
+
|
32 |
+
== Installation ==
|
33 |
+
|
34 |
+
1. Uzip the `wc-shortcodes.zip` folder.
|
35 |
+
2. Upload the `wc-shortcodes` folder to your `/wp-content/plugins` directory.
|
36 |
+
3. In your WordPress dashboard, head over to the *Plugins* section.
|
37 |
+
4. Activate *WordPress Canvas Shortcodes*.
|
38 |
+
|
39 |
+
== Frequently Asked Questions ==
|
40 |
+
|
41 |
+
### How do I use the shortcodes?
|
42 |
+
|
43 |
+
Use the shortcode manager in the TinyMCE text editor
|
44 |
+
|
45 |
+
== Changelog ==
|
46 |
+
|
47 |
+
### Version 0.1.0
|
48 |
+
|
49 |
+
* Plugin released. Everything is new!
|
wc-shortcodes.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: WordPress Canvas Shortcodes
|
4 |
+
Plugin URI: http://wordpresscanvas.com/features/shortcodes/
|
5 |
+
Description: A family of shortcodes to enhance site functionality.
|
6 |
+
Author: Chris Baldelomar
|
7 |
+
Author URI: http://webplantmedia.com/
|
8 |
+
Version: 1.0
|
9 |
+
License: GPLv2 or later
|
10 |
+
*/
|
11 |
+
|
12 |
+
define( 'WC_SHORTCODES_VERSION', '1.0' );
|
13 |
+
define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
|
14 |
+
define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
15 |
+
|
16 |
+
global $wc_shortcodes_options;
|
17 |
+
|
18 |
+
require_once( dirname(__FILE__) . '/includes/options.php' ); // define options array
|
19 |
+
require_once( dirname(__FILE__) . '/includes/settings.php' ); // Adds settings
|
20 |
+
require_once( dirname(__FILE__) . '/includes/scripts.php' ); // Adds plugin JS and CSS
|
21 |
+
require_once( dirname(__FILE__) . '/includes/shortcode-functions.php'); // Main shortcode functions
|
22 |
+
require_once( dirname(__FILE__) . '/includes/mce/shortcodes_tinymce.php'); // Add mce buttons to post editor
|
23 |
+
require_once( dirname(__FILE__) . '/includes/widgets.php' ); // include any widgets
|
24 |
+
|
25 |
+
function wc_shortcodes_options_activation_hook() {
|
26 |
+
global $wc_shortcodes_options;
|
27 |
+
|
28 |
+
foreach ( $wc_shortcodes_options as $o ) {
|
29 |
+
foreach ( $o['sections'] as $oo ) {
|
30 |
+
foreach ( $oo['options'] as $ooo ) {
|
31 |
+
$option_name = WC_SHORTCODES_PREFIX . $ooo['id'];
|
32 |
+
add_option( $option_name, $ooo['default'] );
|
33 |
+
}
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
37 |
+
register_activation_hook( __FILE__, 'wc_shortcodes_options_activation_hook' );
|