Weaver Xtreme Theme Support - Version 3.2.3

Version Description

  • Fix: deleted some unused files
Download this release

Release Info

Developer wpweaver
Plugin Icon 128x128 Weaver Xtreme Theme Support
Version 3.2.3
Comparing to
See all releases

Code changes from version 3.2.2 to 3.2.3

Files changed (96) hide show
  1. 3.2.1/.10/help/help.html +0 -579
  2. 3.2.1/.10/includes/wvrx-ts-admin-page-posts.php +0 -609
  3. 3.2.1/.10/includes/wvrx-ts-runtime-lib.php +0 -107
  4. 3.2.1/.10/includes/wvrx-ts-shortcodes.php +0 -632
  5. 3.2.1/.10/includes/wvrx-ts-widgets.php +0 -169
  6. 3.2.1/.10/js/wvrx-ts-jslib.js +0 -27
  7. 3.2.1/.10/js/wvrx-ts-jslib.min.js +0 -1
  8. 3.2.1/.10/readme.txt +0 -108
  9. 3.2.1/.10/weaverx-ts-admin-style.css +0 -133
  10. 3.2.1/.10/weaverx-ts-admin-style.min.css +0 -4
  11. 3.2.1/.10/weaverx-ts-style.css +0 -97
  12. 3.2.1/.10/weaverx-ts-style.min.css +0 -2
  13. 3.2.1/.10/weaverx-ts.php +0 -299
  14. 3.2.1/1.0.1/help/help.html +0 -584
  15. 3.2.1/1.0.1/includes/wvrx-ts-admin-page-posts.php +0 -594
  16. 3.2.1/1.0.1/includes/wvrx-ts-runtime-lib.php +0 -153
  17. 3.2.1/1.0.1/includes/wvrx-ts-shortcodes.php +0 -661
  18. 3.2.1/1.0.1/includes/wvrx-ts-widgets.php +0 -169
  19. 3.2.1/1.0.1/js/wvrx-ts-jslib.js +0 -27
  20. 3.2.1/1.0.1/js/wvrx-ts-jslib.min.js +0 -1
  21. 3.2.1/1.0.1/readme.txt +0 -127
  22. 3.2.1/1.0.1/weaverx-ts-admin-style.css +0 -133
  23. 3.2.1/1.0.1/weaverx-ts-admin-style.min.css +0 -4
  24. 3.2.1/1.0.1/weaverx-ts-style.css +0 -106
  25. 3.2.1/1.0.1/weaverx-ts-style.min.css +0 -2
  26. 3.2.1/1.0.1/weaverx-ts.php +0 -396
  27. 3.2.1/1.0.3/help/help.html +0 -584
  28. 3.2.1/1.0.3/includes/wvrx-ts-admin-page-posts.php +0 -594
  29. 3.2.1/1.0.3/includes/wvrx-ts-runtime-lib.php +0 -153
  30. 3.2.1/1.0.3/includes/wvrx-ts-shortcodes.php +0 -661
  31. 3.2.1/1.0.3/includes/wvrx-ts-widgets.php +0 -169
  32. 3.2.1/1.0.3/js/wvrx-ts-jslib.js +0 -27
  33. 3.2.1/1.0.3/js/wvrx-ts-jslib.min.js +0 -1
  34. 3.2.1/1.0.3/readme.txt +0 -132
  35. 3.2.1/1.0.3/weaverx-ts-admin-style.css +0 -133
  36. 3.2.1/1.0.3/weaverx-ts-admin-style.min.css +0 -4
  37. 3.2.1/1.0.3/weaverx-ts-style.css +0 -110
  38. 3.2.1/1.0.3/weaverx-ts-style.min.css +0 -2
  39. 3.2.1/1.0.3/weaverx-ts.php +0 -396
  40. 3.2.1/1.0/help/help.html +0 -584
  41. 3.2.1/1.0/includes/wvrx-ts-admin-page-posts.php +0 -592
  42. 3.2.1/1.0/includes/wvrx-ts-runtime-lib.php +0 -143
  43. 3.2.1/1.0/includes/wvrx-ts-shortcodes.php +0 -661
  44. 3.2.1/1.0/includes/wvrx-ts-widgets.php +0 -169
  45. 3.2.1/1.0/js/wvrx-ts-jslib.js +0 -27
  46. 3.2.1/1.0/js/wvrx-ts-jslib.min.js +0 -1
  47. 3.2.1/1.0/readme.txt +0 -122
  48. 3.2.1/1.0/weaverx-ts-admin-style.css +0 -133
  49. 3.2.1/1.0/weaverx-ts-admin-style.min.css +0 -4
  50. 3.2.1/1.0/weaverx-ts-style.css +0 -106
  51. 3.2.1/1.0/weaverx-ts-style.min.css +0 -2
  52. 3.2.1/1.0/weaverx-ts.php +0 -336
  53. 3.2.1/1.1/help/help.html +0 -584
  54. 3.2.1/1.1/includes/wvrx-ts-admin-page-posts.php +0 -616
  55. 3.2.1/1.1/includes/wvrx-ts-runtime-lib.php +0 -153
  56. 3.2.1/1.1/includes/wvrx-ts-shortcodes.php +0 -661
  57. 3.2.1/1.1/includes/wvrx-ts-widgets.php +0 -169
  58. 3.2.1/1.1/js/wvrx-ts-jslib.js +0 -27
  59. 3.2.1/1.1/js/wvrx-ts-jslib.min.js +0 -1
  60. 3.2.1/1.1/readme.txt +0 -140
  61. 3.2.1/1.1/weaverx-ts-admin-style.css +0 -133
  62. 3.2.1/1.1/weaverx-ts-admin-style.min.css +0 -4
  63. 3.2.1/1.1/weaverx-ts-style.css +0 -108
  64. 3.2.1/1.1/weaverx-ts-style.min.css +0 -2
  65. 3.2.1/1.1/weaverx-ts.php +0 -396
  66. 3.2.1/1.2.1/help/help.html +0 -584
  67. 3.2.1/1.2.1/includes/wvrx-ts-admin-page-posts.php +0 -613
  68. 3.2.1/1.2.1/includes/wvrx-ts-runtime-lib.php +0 -153
  69. 3.2.1/1.2.1/includes/wvrx-ts-shortcodes.php +0 -661
  70. 3.2.1/1.2.1/includes/wvrx-ts-widgets.php +0 -169
  71. 3.2.1/1.2.1/js/wvrx-ts-jslib.js +0 -27
  72. 3.2.1/1.2.1/js/wvrx-ts-jslib.min.js +0 -1
  73. 3.2.1/1.2.1/readme.txt +0 -148
  74. 3.2.1/1.2.1/weaverx-ts-admin-style.css +0 -133
  75. 3.2.1/1.2.1/weaverx-ts-admin-style.min.css +0 -4
  76. 3.2.1/1.2.1/weaverx-ts-style.css +0 -110
  77. 3.2.1/1.2.1/weaverx-ts-style.min.css +0 -2
  78. 3.2.1/1.2.1/weaverx-ts.php +0 -404
  79. 3.2.1/1.2.1/wp-updates-theme-1411.php +0 -68
  80. 3.2.1/1.2/help/help.html +0 -584
  81. 3.2.1/1.2/includes/wvrx-ts-admin-page-posts.php +0 -617
  82. 3.2.1/1.2/includes/wvrx-ts-runtime-lib.php +0 -153
  83. 3.2.1/1.2/includes/wvrx-ts-shortcodes.php +0 -661
  84. 3.2.1/1.2/includes/wvrx-ts-widgets.php +0 -169
  85. 3.2.1/1.2/js/wvrx-ts-jslib.js +0 -27
  86. 3.2.1/1.2/js/wvrx-ts-jslib.min.js +0 -1
  87. 3.2.1/1.2/readme.txt +0 -145
  88. 3.2.1/1.2/weaverx-ts-admin-style.css +0 -133
  89. 3.2.1/1.2/weaverx-ts-admin-style.min.css +0 -4
  90. 3.2.1/1.2/weaverx-ts-style.css +0 -110
  91. 3.2.1/1.2/weaverx-ts-style.min.css +0 -2
  92. 3.2.1/1.2/weaverx-ts.php +0 -404
  93. 3.2.1/1.2/wp-updates-theme-1411.php +0 -68
  94. 3.2.1/1.3/help/help.html +0 -584
  95. 3.2.1/1.3/includes/wvrx-ts-admin-page-posts.php +0 -613
  96. 3.2.1/1.3/includes/wvrx-ts-runtime-lib.php +0 -91
3.2.1/.10/help/help.html DELETED
@@ -1,579 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <title>Weaver X Theme Support</title>
6
- <style type="text/css">
7
- body {
8
- background: #eeeeee;
9
- margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
10
- padding: 10px; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
11
- color: #000000;
12
- text-align: left;
13
- font-family: Verdana, Arial, Helvetica, sans-serif;
14
- font-size: 10pt;
15
- background-color: #ffd;
16
- }
17
-
18
- /* everything about each major block on the site - may be mods in some places */
19
-
20
- #container {
21
- max-width:800px;
22
- background-color: #00CC00;
23
- }
24
- #mainContent {
25
- background-color: #ffc;
26
- }
27
- .oneColFixCtr #container {
28
- max-width: 750px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
29
- background: #FFFFCD;
30
- margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
31
- border: 1px solid #000000;
32
- text-align: left; /* this overrides the text-align: center on the body element. */
33
- }
34
- .oneColFixCtr #mainContent {
35
- padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
36
- font-size:12px;
37
- }
38
- /* layouts for layout boxes */
39
- .layoutbox {
40
- width:700px;
41
- text-align:center;
42
- margin:0 25px;
43
- }
44
- .l_layout {
45
- display:block;
46
- width:140px;
47
- height:110px;
48
- float:left;
49
- margin-right:10px;
50
- margin-bottom:10px;
51
- display:inline;
52
- border:1px solid #888;
53
- color:black;
54
- text-align:center;
55
- font:15px arial, sans-serif;
56
- }
57
- .l_layout span {
58
- display:block;
59
- }
60
- .l_header {
61
- width:140px;
62
- height:20px;
63
- background:#CCF;
64
- line-height:20px;
65
- }
66
- .l_content {
67
- width:100px;
68
- height:70px;
69
- background:beige;
70
- float:left;
71
- display:inline;
72
- line-height:70px;
73
- }
74
- .l_contentcenter {
75
- width:60px;
76
- height:70px;
77
- background:beige;
78
- float:left;
79
- display:inline;
80
- line-height:70px;
81
- }
82
- .l_content2 {
83
- width:80px;
84
- height:70px;
85
- background:beige;
86
- float:left;
87
- display:inline;
88
- line-height:70px;
89
- }
90
- .l_contentw {
91
- width:140px;
92
- height:70px;
93
- background:beige;
94
- float:left;
95
- display:inline;
96
- line-height:70px;
97
- }
98
- .l_stdbar {
99
- width:40px;
100
- height:70px;
101
- float:left;
102
- display:inline;
103
- }
104
- .l_widebar {
105
- width:60px;
106
- height:70px;
107
- float:left;
108
- display:inline;
109
- }
110
- .l_righttop {
111
- width:40px;
112
- height:20px;
113
- background:#FE8;
114
- float:left;
115
- display:inline;
116
- line-height:20px;
117
- }
118
- .l_righttopwide {
119
- width:60px;
120
- height:20px;
121
- background:#FE8;
122
- float:left;
123
- display:inline;
124
- line-height:20px;
125
- }
126
- .l_rightup {
127
- width:40px;
128
- height:25px;
129
- margin:0;
130
- background:#FAA;
131
- float:left;
132
- display:inline;
133
- line-height:25px;
134
- }
135
- .l_rightright {
136
- width:40px;
137
- height:50px;
138
- margin:0;
139
- background:#FAA;
140
- float:left;
141
- display:inline;
142
- line-height:50px;
143
- }
144
- .l_rightdown {
145
- width:40px;
146
- height:25px;
147
- margin:0;
148
- background:#AFA;
149
- float:left;
150
- display:inline;
151
- line-height:25px;
152
- }
153
- .l_leftleft {
154
- width:40px;
155
- height:70px;
156
- margin:0;
157
- background:#AFA;
158
- float:left;
159
- display:inline;
160
- line-height:70px;
161
- }
162
- .l_leftshort {
163
- width:30px;
164
- height:50px;
165
- margin:0;
166
- background:#AFA;
167
- float:left;
168
- display:inline;
169
- line-height:50px;
170
- }
171
- .l_skinny {
172
- width:30px;
173
- height:50px;
174
- margin:0;
175
- background:#FAA;
176
- float:left;
177
- display:inline;
178
- line-height:50px;
179
- }
180
- .l_footer {
181
- clear:left;
182
- width:140px;
183
- height:20px;
184
- background:#DDF;
185
- color:#000;
186
- line-height:20px;
187
- }
188
- h4 {
189
- font-weight: bold;
190
- font-style:italic;
191
- color: #000066;
192
- text-decoration: underline;
193
- }
194
- h3 {
195
- font-size: medium;
196
- font-weight: bold;
197
- color: #000066;
198
- text-decoration: underline;
199
- }
200
- h2 {
201
- font-size: large;
202
- font-weight: bold;
203
- color: #000066;
204
- text-decoration: underline;
205
- margin-top: 40pt;
206
- }
207
- h1 {
208
- font-size: x-large;
209
- font-weight: bold;
210
- color: #000066;
211
- text-decoration: underline;
212
- }
213
- .codebox {
214
- font-family: "Courier New", Courier, monospace;
215
- font-size: 10px;
216
- font-style: normal;
217
- background-color: #E8E8E8;
218
- margin: 10px;
219
- padding: 4px;
220
- border: 1px solid #333333;
221
- color: #000000;
222
- width: 80%;
223
- }
224
- .attrs {
225
- font-family: Arial, Helvetica, sans-serif;
226
- font-size: 10pt;
227
- color:#000000;
228
- text-decoration: none;
229
- }
230
- .css {
231
- font-family: "Courier New", Courier, monospace;
232
- font-size: 9pt;
233
- font-style: normal;
234
- }
235
- .box {
236
- color: #000000;
237
- text-decoration: none;
238
- margin: 5px;
239
- padding: 5px;
240
- border: thin solid #000000;
241
- }
242
- .nospace {
243
- margin-top: 5px;
244
- margin-bottom: 5px;
245
- }
246
- .style3 {
247
- font-family: "Courier New", Courier, monospace
248
- }
249
- .style4 {
250
- font-family: monospace
251
- }
252
- .style6 {
253
- color: #990000;
254
- font-style: italic;
255
- }
256
- .style7 {
257
- color: #CC3300;
258
- font-weight: bold;
259
- }
260
- .code1 {
261
- font-family: "Courier New", Courier, monospace;
262
- font-size: 14px;
263
- font-style: italic;
264
- }
265
- .red-highlight {
266
- color: #CC3300;
267
- }
268
- </style>
269
- </head>
270
- <body class="oneColFixCtr">
271
- <div id="container">
272
- <div id="mainContent"> <a name="top" id="top"></a>
273
- <h2><b>Weaver X Theme Support Plugin Documentation -- Version 1.0</b></h2>
274
- <h4>Table of Contents</h4>
275
- <ul style="line-height:1.7em;">
276
- <li><a href="#summary"><strong>Plugin Summary</strong></a></li>
277
- <li><strong><a href="#admin_page">Weaver X Theme Extras Admin Page</a> </strong></li>
278
- <li><a href="#sc_summary"><strong>Shortcode Summary</strong></a></li>
279
- <ul>
280
- <li><strong><a href="#bloginfo">[bloginfo arg='name' style='your css']</a></strong></li>
281
- <li><strong><a href="#box">[box]text[/box]</a></strong></li>
282
- <li><a href="#tab_group"><strong>[tab_group] - content in tabs</strong></a></li>
283
- <li><strong><a href="#headerimage">[header_image] Shortcode</a></strong></li>
284
- <li><strong><a href="#schtml">[html]</a></strong></li>
285
- <li><strong><a href="#scdiv">[div]text[/div]</a>, <a href="#schtml">[span]text[/span]</a></strong></li>
286
- <li><strong><a href="#sciframe"> [iframe]</a></strong></li>
287
- <li><strong><a href="#scshowif">[show/hide_if]</a></strong></li>
288
- <li><strong><a href="#sitetitlesc">[site_title], [site_tagline]</a></strong></li>
289
-
290
- <li><strong><a href="#video">Video - [vimeo], [youtube]</a></strong></li>
291
- </ul>
292
- <li><a href="#widg-sum"><strong>Widget Summary</strong></a>
293
- <ul>
294
- <li><strong><a href="#widg-login">Weaver X Login Widget</a></strong></li>
295
- <li><strong><a href="#widg_pp_text">Weaver X Per Page Text</a></strong></li>
296
- <li><strong><a href="#widg_text_2">Weaver X Text 2</a></strong></li>
297
- </ul>
298
- </li>
299
- </ul>
300
- <h3><a name="summary" id="summary"></a>Plugin Summary </h3>
301
- <p>The Weaver X Theme Support Plugin provides a collection of shortcodes to allow you to easily add extra content and features to your regular content. These shortcodes will work with almost any WordPress theme. </p>
302
- <p>While these shortcodes should prove useful with most any theme, one of the goals of these shortcodes is to provide an alternative to users of the Weaver X theme.</p>
303
- <h2><a name="admin_page" id="admin_page"></a>Weaver Xtreme Theme Extras Admin Page</h2>
304
- <p>This plugin has just a few options, all found on the Weaver X Theme Support admin page under the WordPress dashboard Appearance section.</p>
305
- <h2><a name="sc_summary" id="sc_summary"></a>Shortcode Summary</h2>
306
- <h3><a name="tab_group" id="tab_group"></a>[tab_group] - content in tabs </h3>
307
- <p>Show content displayed on tabbed pages.</p>
308
- <p><strong>Shortcode usage:</strong><br />
309
- <pre>
310
- [tab_group border_color=black page_min_height=200px]
311
- [tab title='tab one']This is the content found on first tab.[/tab]
312
- [tab title='tab two']And we have more content for the second tab.[/tab]
313
- [tab title='last tab']And this is the last tab. There could be more.[/tab]
314
- [/tab_group]
315
- </pre>
316
- <h4>Short code parameters</h4>
317
- You can supply values for these parameters to control the look of the tabbed section.
318
- <br />
319
- <ul>
320
- <li><b>border_color:</b> tab and pane border color - default #888</li>
321
- <li><b>tab_bg</b>: normal bg color of tab (default #CCC)</li>
322
- <li><b>tab_selected_color</b>: color of tab when selected (default #EEE)</li>
323
- <li><b>pane_min_height</b>: min height of a pane to help make all even if needed</li>
324
- <li><b>pane_bg</b>: bg color of pane</li>
325
- </ul>
326
- </p>
327
- <h3><a name="headerimage" id="headerimage"></a><strong>[header_image]</strong></h3>
328
- <p>The <code>[header_image]</code> shortcode allows you display the current header image wherever you want.
329
- For example, you can get the header image into the Header Widget Area by using this shortcode in a text widget.
330
- The current standard or mobile header image will be displayed. Only the <code>&lt;img ... &gt;</code> is displayed --
331
- the image will not be wrapped in a link to the site.</p>
332
-
333
- <p><strong>Shortcode usage:</strong> <code>[header_image h='size' w='size' style='inline-style']</code>
334
- <br />
335
- <ol>
336
- <li><strong>w='size' h='size'</strong> - By default, no height or image properties are included with the
337
- header <code>&lt;img ... &gt;</code>, which will result in an image scaled to fit into whatever the natural
338
- width of the enclosing HTML container is (the content area, a text widget, etc.). You may specify an explicit
339
- value (usually in px) for the height and width of the image.
340
- </li>
341
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
342
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
343
- <code>style="your-rules;"</code> - using double quotation marks.
344
- </li>
345
- </ol>
346
- <h3><a name="schtml" id="schtml"></a><strong>[html]</strong></h3>
347
-
348
- <p>The Weaver X Theme Support <code>[html]</code> shortcode allows you to add arbitrary HTML to your post and page content. The
349
- main purpose of this shortcode is to get around the auto paragraph and line break and other HTML stripping functionality
350
- of the WordPress editor.</p>
351
-
352
- <p><strong>Shortcode usage:</strong> <code>[html html-tag args='parameters']</code>
353
- <br />
354
- <ol>
355
- <li><strong>html-tag</strong> - The first parameter to the shortcode must be present, and must be a standard
356
- HTML tag - <code>p</code>, <code>br</code>, or <code>span</code>, for example. You just supply the tag - no quotation
357
- marks, no '=', just the tag. The shortcode provides the &lt; and &gt;. If you need a wrapping HTML tag (e.g., <code>span</code> and <code>/span</code>), use
358
- two shortcodes:<br />
359
- <code>[html span args='style="color:red"']content to make red[html /span]</code>
360
- </li>
361
- <li><strong>args='parameters'</strong> - Allows you to specify arbitrary parameters for your HTML tag. See the example above.
362
- </li>
363
- </ol>
364
- </p>
365
-
366
- <h3><a name="scdiv" id="scdiv"></a><strong>[div]text[/div]</strong>, [span]text[/span]</h3>
367
-
368
- <p>The Weaver X Theme Support <code>[div]</code> and [span] shortcodes allow you to easily add HTML &lt;div&gt; or &lt;span&gt; tags to your post and page content. The
369
- main purpose of these shortcodes is to get around need to switch to the HTML editor view when you need to
370
- wrap your content in a &lt;div&gt; or &lt;span&gt;.</p>
371
- <p>
372
- This will work exactly like a standard HMTL &lt;div&gt;and &lt;span&gt; tags. It supports 'id', 'class',
373
- and 'style' parameters, which are the most useful. Instead of wrapping your text in &lt;div&gt; or &lt;span&gt; tags, wrap them like
374
- this (the Visual view will work just fine):<br />
375
- <code>[div style="font-size:20px;']This content will be large.[/div]</code><br />
376
- <code>[span style=&quot;font-size:20px;']This content will be large.[/span]</code></p>
377
- <p><strong>Shortcode usage:</strong> <code>[div id='class_id' class='class_name' style='style_values']text[/div]</code>
378
- <br />
379
- <code>[span id='class_id' class='class_name' style='style_values']text[/span]</code> <br />
380
- <ol>
381
- <li><strong>id='class_id' class='class_name' style='style_values'</strong> - Allows you to specify id, class, and style for the &lt;div&gt;. See the example above.
382
- </li>
383
- </ol>
384
- </p>
385
-
386
- <h3><a name="sciframe" id="sciframe"></a><strong>iframe - [iframe]</strong></h3>
387
-
388
- <p>The <code>[iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
389
- the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>
390
-
391
- <p><strong>Shortcode usage:</strong> <code>[iframe src='http://example.com' height=600 percent=100 style="style"]</code>
392
- <br />
393
- <ol>
394
- <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
395
- </li>
396
- <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
397
- </li>
398
- <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
399
- </li>
400
- <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values".
401
- </li>
402
- </ol>
403
- </p>
404
-
405
- <h3><a name="scshowif" id="scshowif"></a><strong>[show_if]content[/show_if], [hide_if]</strong>content [/hide_if]</h3>
406
- <p>The <code>[show_if]</code> and <code>[hide_if]</code> shortcodes allow you to selectively
407
- display or hide content depending if any of several conditions are met.</p>
408
-
409
- <p><strong>Shortcode usage:</strong> <code>[hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]</code>
410
- </p>
411
- <p>You bracket the content you want to selectively display with <code>[show/hide_if]</code> and closing
412
- <code>[/show/hide_if]</code> tags. That content can contain other shortcodes as needed. If you specify more than one parameter to the short code, then all the conditions must be met (logical AND). Any paramaters you don't include are considered true.</p>
413
- <h4>Parameters</h4>
414
- <p>'device' =&gt; 'default', // desktop, mobile, smalltablet, phone, all<br />
415
- 'logged_in' =&gt; 'default', // true or false<br />
416
- 'not_post_id' =&gt; 'default', // comma separated list of post IDs (includes pages, too)<br />
417
- 'post_id' =&gt; 'default', // comma separated list<br />
418
- 'user_can' =&gt; 'default' // http://codex.wordpress.org/Function_Reference/current_user_can</p>
419
- <p>
420
- <strong>device=desktop | mobile | smalltablet | phone </strong> - The device parameter for <code>[show/hide_if]</code> is designed to allow you to hide <em>or</em> show any content on any of the
421
- device sizes recognized by Weaver Xtreme (or any theme, actually): 'phone', 'smalltablet', and 'desktop', or 'mobile' for non-desktop devices. If you want to show or hide content on
422
- a specific device, you give the <span class="code1">device</span> parameter a value of desktop, mobile, smalltablet, phone, or none (e.g., <code>[show_if device=mobile]</code>). </p>
423
- <p><strong>logged_in=true | false</strong> - This will hide or display content depending if the visitor is logged into the site or not. </p>
424
- <p><strong>post_id=34,875</strong> / <strong>not_post_id=1,2,3 </strong>- This will display (or not display) the content depending if the current page or single post view is included in the comma separated list of WordPress page/post IDs. You can use both to refine a list of pages or posts to display or not display. Note that even though the parameter is called 'post_id', it applies equally to pages and posts. Depending on where you use the shortcode, it will apply to a post differently depending if it is on a blog or single page view of a post. Note that the default WordPress blog (as opposed to the Weaver Xtreme Page with Posts template) does not have a post_ID.</p>
425
- <p><strong>user_can=user-capability</strong> - This will show or hide depending if the current visitor has certain WordPress user capabilities. There are many capabilities which are defined in the <a href="http://codex.wordpress.org/Function_Reference/current_user_can" target="_blank">WordPress Codex</a>. This shortcode supports any of the listed capabilities for maximum flexibility. If you don't want to learn about all the capabilities listed in the Codex, you can use the following capability values to determine if the visitor has a specific role (as defined on the Dashboard Users admin pages). For example:<br />
426
- <br />
427
- <span class="code1">[show_if user_can=publish_pages]content for Editors and above[/show_if]</span><br />
428
- <br />
429
- Note that the higher roles have all the capabilities of the lower roles - an Editor can do everything a Contributor can.</p>
430
- <table width="80%" border="1">
431
- <caption>
432
- Capabilities to Specify Role
433
- </caption>
434
- <tr>
435
- <th scope="col">Role</th>
436
- <th scope="col">Capability</th>
437
- </tr>
438
- <tr>
439
- <td>Subscriber</td>
440
- <td>read</td>
441
- </tr>
442
- <tr>
443
- <td>Contributor</td>
444
- <td>edit_posts</td>
445
- </tr>
446
- <tr>
447
- <td>Author</td>
448
- <td>publish_posts</td>
449
- </tr>
450
- <tr>
451
- <td>Editor</td>
452
- <td>publish_pages</td>
453
- </tr>
454
- <tr>
455
- <td>Administrator</td>
456
- <td>manage_options</td>
457
- </tr>
458
- <tr>
459
- <td>Super Administrator (MultiSite)</td>
460
- <td>manage_network</td>
461
- </tr>
462
- </table>
463
- <p>&nbsp;</p>
464
- <h3><a name="sitetitlesc" id="sitetitlesc"></a><strong>[site_title], [site_tagline]</strong></h3>
465
-
466
- <p>The <code>[site_title]</code> and <code>[site_tagline]</code> shortcodes allow you display the current
467
- site title and site tagline. (The site tagline was formerly called the site description, thus the name of the shortcode.) This can be useful in a text widget in the Header Widget Area, for example.</p>
468
- <p><em>Note:</em> If you want to position the content of a text widget within the a cell of the Header Widget Area, you could use the following
469
- example:</p>
470
- <p><code>[site_title style='font-size:150%;position:absolute;padding-left:20px;padding-top:30px;']</code></p>
471
-
472
- <p><strong>Shortcode usage:</strong> <code>[site_title style='inline-style'] [site_tagline style='inline-style']</code>
473
- <br />
474
- <ol>
475
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
476
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
477
- <code>style="your-rules;"</code> - using double quotation marks.
478
- </li>
479
- </ol>
480
-
481
- <h3><a name="bloginfo" id="bloginfo"></a><strong>[bloginfo arg='name' style='your css']</strong></h3>
482
-
483
- <p>This shortcode can be used to access the WordPress function 'get_bloginfo($arg)'. This will return a number of useful
484
- strings depending on the value. All the supported values are listed at http://codex.wordpress.org/Function_Reference/get_bloginfo.
485
- Some useful values include 'stylesheet_directory' and 'template_directory'. You can wrap the bloginfo output with css added to a &lt;span style=&quot;your css&quot;&gt;.
486
- </p>
487
-
488
- <h3><a name="box" id="box"></a><strong>[box]text[/box]</strong></h3>
489
-
490
- <p>
491
- Wrap content in a box.</p>
492
- <p><strong>Shortcode Usage:</strong> <code>[box align=left background=#fff border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules']text[/box]</code></p>
493
- <ol>
494
- <li><strong>align=align</strong>: Leave blank, or specify left, center, or right for alignment of box within surrounding text.</li>
495
- <li><strong>border=true</strong>: True is default. Specify false or 0 for no borders.</li>
496
- <li><strong>border_rule='1px solid black</strong>': Specify a compound border CSS value to replace the default '1px solid black'.</li>
497
- <li><strong>border_radius=4</strong>: Default is none - specify a px value for the corner radius if you want rounded corners.</li>
498
- <li><strong>color=#000</strong>: Default is inherit - specify a valid color for the color of the text in the box.</li>
499
- <li><strong>background=#fff</strong>: Default is inherit - specify color for box background color.</li>
500
- <li><strong>margin=1</strong>: Default is 0 - specify an 'em' value for margin around the box. Using a margin overrides align parameter.</li>
501
- <li><strong>padding=1</strong>: Default 1 - specify an 'em' value for padding inside box.</li>
502
- <li><strong>shadow=0</strong>: Default 0 - specify a value from 1 to 5 for a border around the box.</li>
503
- <li><strong>style=inline-style</strong>: any additional custom styling for the box</li>
504
- <li><strong>width=100</strong>: A percentage width for the box within its surrounding container.</li>
505
- </ol>
506
- <h3><a name="video" id="video"></a><strong>Video - [vimeo], [youtube]</strong></h3>
507
- <p>Weaver X Theme Support supports specialized shortcodes to display video. While there are other ways to embed video, the Weaver X Theme Support versions have two important features. First, they will auto adjust to the width of your content, <em><strong>including</strong></em> the mobile view. Second, they use the latest iframe/HTML5 interface provided by YouTube and Vimeo.</p>
508
- <p><strong>Specifying Video Display Size for both shortcodes</strong></p>
509
- <p>Weaver X Theme Support supports a common set of options for both the YouTube and Vimeo shortcodes to support displaying your videos with a specific width and correct height. By default, your videos will be displayed using the full width of the content area being used (percent=100). The percent= parameter is used to specify the width you want.</p>
510
- <p>The height of the video is automatically determined based on the width and the display ratio of the particular video. </p>
511
- <p>Finally, you may specify if the video should be centered or no within the display area using &quot;center=0&quot; to not center (centering is on by default).</p>
512
- <p>Note - if you want to display more than one video horizontally, use &quot;center=0&quot; and specify an appropriate percentage to fit all the videos.</p>
513
- <p>Parameters in Common</p>
514
- <ul>
515
- <li>percent=100 - By default, the video will be sized to fill the full content space. You can use the percent value to make
516
- the video use a percentage of the content space (but mobile will always use full width).</li>
517
- <li>center=1 - Specify 'center=0' to disable centering of the video.</li>
518
- <li>sd=0 - By default, Weaver X Theme Support will generate sizes for HD/widescreen videos. To display old 4:3 standard definition videos, include 'sd=1' in the shortcode.</li>
519
- </ul>
520
- <h4>Vimeo</h4>
521
- <pre><strong>[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex
522
- autoplay=0 loop=0 portrait=1 title=1 byline=1]
523
- </strong></pre>
524
- <p>This will display Vimeo videos. At the minimum, you can provide the standard http://vimeo.com/nnnnn link, or just the video ID number (which is part of the Vimeo Link). The other Vimeo specific options include:</p>
525
- <ul>
526
- <li>color - You can optionally specify a Vimeo color theme using 6 hex digits for a color value.</li>
527
- <li>autoplay - Add 'autoplay=1' to have the video autoplay.</li>
528
- <li>loop - Add 'loop=1' to have the video loop.</li>
529
- <li>portrait, title, byline - You can specify a value '=0' for these to hide the display of the corresponding element on the Vimeo player.
530
- Portrait is the avatar/icon, title is the video title, and byline is source attribution.<br />
531
- </li>
532
- </ul>
533
- <h4>YouTube</h4>
534
- <code><strong>[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=1 https=0 privacy=0 {youtube options}]
535
- </strong></code>
536
- <p>This will display YouTube videos. At the minimum, you can provide the standard http://youtu.be/xxxxxx share link (including the options YouTube lets you specify), the long format share link, or just the video ID number using the id=videoid parameter (which is part of the YouTube Link). The other YouTube specific options include:</p>
537
- <ul>
538
- <li>rel - If you specify 'rel=0', YouTube won't show related videos after the video plays.</li>
539
- <li>https - If you specify 'https=1', YouTube will use the https protocol.</li>
540
- <li>privacy - If you specify 'privacy=1', YouTube won't used cookies to track your viewing.</li>
541
- </ul>
542
- <p>In addition to the above [youtube] options, the shortcode also supports most standard YouTube options. These are more fully described on the <a href="http://code.google.com/apis/youtube/player_parameters.html" target="_blank">YouTube Embedded Player Parameters</a> page.</p>
543
- <p>The supported options, with Weaver X Theme Support's default values include:</p>
544
- <p>'autohide' = '1' . . . . . . 0: always show controls; 1: autohide controls; 2: autohide progress bar<br />
545
- 'autoplay' = '0' . . . . . . 1: auto play; 0: don't<br />
546
- 'border' = '0' . . . . . . . . 0: no border; 1: border using color1 and color2 (don't seem to work)<br />
547
- 'color' = not set . . . . . . progress bar color - red or white<br />
548
- 'color1' = not set . . . . . RGB hex value for border color<br />
549
- 'color2' = not set . . . . . RGB hex value for control bar bg<br />
550
- 'controls' = '1' . . . . . . . 0: hide player controls<br />
551
- 'disablekb' = '0' . . . . . . 1: disable keyboard controls<br />
552
- 'egm' ='0' . . . . . . . . . . . 1: enable &quot;Enhanced Genie Menu&quot;<br />
553
- 'hd' = '0' . . . . . . . . . . . . 1: enable HD playback by default<br />
554
- 'iv_load_policy' = '1' . . . 1: show annotations; 3: don't show; 2: discontinued support<br />
555
- 'loop' = '0' . . . . . . . . . . . 1: loop video<br />
556
- 'modestbranding' = '0' . .1: hide YouTube logo - will still show label in upper right corner<br />
557
- 'origin' = not set . . . . . . . See YouTube docs<br />
558
- 'playlist' = not set . . . . . . Comma separated list of videoIDs to play (id/url video played 1st)<br />
559
- 'showinfo' = '1' . . . . . . . 0: hide video title<br />
560
- 'showsearch' = '1' . . . . . 0: hide video searchbox<br />
561
- 'start' = not set . . . . . . . start vide this number of seconds from start<br />
562
- 'theme' = 'dark' . . . . . . . dark or light - display theme for player<br />
563
- 'wmode' = 'transparent' . Keeps video behind menu bars, etc. Other values available - see YouTube</p>
564
- <h2><a name="widg-sum" id="widg-sum"></a>Widget Summary</h2>
565
- <h3><a name="widg-login" id="widg-login"></a>Weaver X Login Widget</h3>
566
- <p>This simple widget shows a login in link, or a welcome, Site Admin, and Log out choice if the user is logged in.</p>
567
- <h3><a name="widg_pp_text" id="widg_pp_text"></a>Weaver X Per Page Text</h3>
568
- <p>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>if you want a title, and define Custom Field<em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text, HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)</p>
569
- <h3><a name="widg_text_2" id="widg_text_2"></a>Weaver X Text 2</h3>
570
- <p>This widget lets you add two columns of text. It is most useful in wide widget areas such as a content top or bottom widget area, or a wide footer widget area.</p>
571
- <p>&nbsp;</p>
572
- <h2><br />
573
- </h2>
574
- <p>The Weaver X Theme Support Plugin and this document are &copy; 2014, Bruce E. Wampler. <a ref="http://weavertheme.com">Web Site - WeaverTheme.com</a></p>
575
-
576
- </div>
577
- </div>
578
- </body>
579
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,609 +0,0 @@
1
- <?php
2
- /* Display per page and per post options.
3
- *
4
- * __ added - 12/10/14
5
- *
6
- * IMPORTANT! - this code and the Weaver Plus plugin need to be maintained in parallel!
7
- */
8
-
9
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
10
- // Admin panel that gets added to the page edit page for per page options
11
-
12
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
13
-
14
- add_action('admin_menu', 'wvrx_ts_add_page_fields');
15
-
16
- function wvrx_ts_add_page_fields() {
17
- add_meta_box('page-box', __('Weaver Xtreme Options For This Page (Theme Support Per Page Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_page_extras', 'page', 'normal', 'high');
18
- add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras', 'post', 'normal', 'high');
19
- global $post;
20
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
21
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) {
22
- $i = 1;
23
- $args=array( 'public' => true, '_builtin' => false );
24
- $post_types=get_post_types($args,'names','and');
25
- foreach ($post_types as $post_type ) {
26
- add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras', $post_type, 'normal', 'high');
27
- $i++;
28
- }
29
- }
30
- }
31
-
32
- function wvrx_ts_isp_true($val) {
33
- if ($val) return true;
34
- return false;
35
- }
36
-
37
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
38
- global $post;
39
- ?>
40
- <div style="float:left;width:<?php echo $width; ?>%"><label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
41
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> />
42
- <?php echo($msg . '</label></div>');
43
- for ($i = 0 ; $i < $br ; $i++)
44
- echo '<br class="page_checkbox" style="clear:both;" />';
45
- }
46
-
47
- function wvrx_ts_page_layout( $page = 'page' ) {
48
-
49
- if ( $page == 'page')
50
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaver-xtreme' /*adm*/);
51
- else
52
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaver-xtreme' /*adm*/);
53
-
54
- $opts = array( 'id' => '_pp_page_layout',
55
- 'info' => $msg,
56
- 'value' => array(
57
- array('val' => '', 'desc' => __('Use Default','weaver-xtreme' /*adm*/) ),
58
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaver-xtreme' /*adm*/) ),
59
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaver-xtreme' /*adm*/) ),
60
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaver-xtreme' /*adm*/) ),
61
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaver-xtreme' /*adm*/) ),
62
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaver-xtreme' /*adm*/) ),
63
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaver-xtreme' /*adm*/) ),
64
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaver-xtreme' /*adm*/) )
65
- ));
66
- wvrx_ts_pp_select_id($opts);
67
- }
68
- //--
69
-
70
-
71
-
72
- function wvrx_ts_pp_replacement( $desc, $id ) {
73
- global $post;
74
- global $wp_registered_sidebars;
75
-
76
- $id = '_' . $id;
77
-
78
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
79
-
80
-
81
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
82
- $area_name = $value['id']; //sanitize_title($value['name']);
83
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
84
- echo ' <option value="' . $area_name . '"';
85
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
86
- echo '>' . substr($area_name,9) . "</option>\n";
87
-
88
- }
89
- }
90
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
91
- }
92
- //--
93
-
94
-
95
- function wvrx_ts_pp_select_id( $value ) {
96
- global $post;
97
-
98
- if ( isset( $value['name'] ) && $value['name'] != '' )
99
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
100
-
101
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
102
-
103
- foreach ($value['value'] as $option) {
104
- if ( $option['val'] == '' ) {
105
- echo '<option value="">';
106
- } else {
107
- echo ' <option value="' . $option['val'] . '"';
108
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
109
- echo ">";
110
- }
111
- echo $option['desc'] . "</option>\n";
112
- }
113
- echo '</select>&nbsp;' . $value['info'] . "\n";
114
- }
115
- //--
116
-
117
-
118
-
119
- function wvrx_ts_pwp_atw_show_post_filter() {
120
- // use plugin options...
121
- global $post;
122
-
123
- if ( function_exists( 'atw_showposts_installed' ) ) {
124
- $filters = atw_posts_getopt('filters');
125
-
126
- $first = true;
127
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
128
- foreach ($filters as $filter => $val) { // display dropdown of available filters
129
- if ( $first ) {
130
- $first = false;
131
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
132
- } else {
133
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
134
- }
135
- }
136
- echo '</select>&nbsp;' .
137
- __('Use a Filter from <em>ATW Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaver-xtreme' /*adm*/) .
138
- '<br /> <span style="margin-left:8em;"><span>' .
139
- __('(Note: ATW Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts using this filter.)','weaver-xtreme' /*adm*/) .
140
- '<br />' . '<br />';
141
- } else {
142
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaver-xtreme' /*adm*/); ?>
143
- <br /><br />
144
- <?php }
145
- }
146
- //--
147
-
148
-
149
-
150
- function wvrx_ts_pwp_type() {
151
- $opts = array( 'name' => __('Display posts as:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
152
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaver-xtreme' /*adm*/),
153
- 'value' => array(
154
- array('val' => '', 'desc' => '&nbsp;' ),
155
- array('val' => 'full', 'desc' => __('Full post','weaver-xtreme' /*adm*/) ),
156
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaver-xtreme' /*adm*/) ),
157
- array('val' => 'title', 'desc' => __('Title only','weaver-xtreme' /*adm*/) ),
158
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaver-xtreme' /*adm*/) )
159
- ));
160
- wvrx_ts_pp_select_id($opts);
161
- }
162
-
163
-
164
- function wvrx_ts_pwp_cols() {
165
-
166
- $opts = array( 'name' => __('Display post columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
167
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaver-xtreme' /*adm*/),
168
- 'value' => array(
169
- array('val' => '', 'desc' => '&nbsp;'),
170
- array('val' => '1', 'desc' => __('One Column','weaver-xtreme' /*adm*/) ),
171
- array('val' => '2', 'desc' => __('Two Columns','weaver-xtreme' /*adm*/) ),
172
- array('val' => '3', 'desc' => __('Three Columns','weaver-xtreme' /*adm*/) ) )
173
- );
174
- wvrx_ts_pp_select_id($opts);
175
-
176
- weaverx_html_br();
177
-
178
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_pwp_masonry',
179
- 'info' => __('Use <em>Masonry</em> for multi-column display','weaver-xtreme' /*adm*/),
180
- 'value' => array(
181
- array('val' => '', 'desc' => '&nbsp;' ),
182
- array('val' => '1', 'desc' => __('One Column','weaver-xtreme' /*adm*/) ),
183
- array('val' => '2', 'desc' => __('Two Columns','weaver-xtreme' /*adm*/) ),
184
- array('val' => '3', 'desc' => __('Three Columns','weaver-xtreme' /*adm*/) ),
185
- array('val' => '4', 'desc' => __('Four Columns','weaver-xtreme' /*adm*/) ),
186
- array('val' => '5', 'desc' => __('Five Columns','weaver-xtreme' /*adm*/) ) )
187
- );
188
- wvrx_ts_pp_select_id($opts2);
189
-
190
- ?>
191
- <br />
192
- <?php
193
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaver-xtreme' /*adm*/),90,1);
194
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaver-xtreme' /*adm*/),90,1);
195
- }
196
-
197
- function wvrx_ts_page_extras() {
198
- global $post;
199
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
200
-
201
- if ( !( current_user_can('edit_themes')
202
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
203
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
204
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
205
- ) {
206
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
207
- echo '<p>' .
208
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver X:Advanced Options:Admin Options tab.','weaver-xtreme' /*adm*/) .
209
- '</p>';
210
- else
211
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
212
- return; // don't show per post panel
213
- }
214
-
215
- echo("<div style=\"line-height:150%;\"><p>\n");
216
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
217
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
218
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaver-xtreme' /*adm*/); ?>
219
- </div><br />
220
- <?php
221
- }
222
-
223
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
224
- <div style="padding:2px; border:2px solid red; background:#FAA;">
225
- <?php _e('<strong>WARNING!</strong>
226
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
227
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
228
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
229
- If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
230
- including the option of using the Page with Posts page template,
231
- then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
232
- the <em></em>&mdash; Select &mdash;</em> default value.','weaver-xtreme' /*adm*/); ?>
233
- </div><br />
234
- <?php
235
- return;
236
- }
237
- echo '<strong>' . __('Page Templates','weaver-xtreme' /*adm*/) . '</strong>';
238
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaver-xtreme' /*adm*/));
239
- echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
240
- weaverx_html_br();
241
- _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaver-xtreme' /*adm*/);
242
- weaverx_html_br();
243
- echo '<strong>' . __('Per Page Options','weaver-xtreme' /*adm*/) . '</strong>';
244
- weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaver-xtreme' /*adm*/));
245
- weaverx_html_br();
246
- _e('These settings let you hide various elements on a per page basis.','weaver-xtreme' /*adm*/);
247
- weaverx_html_br();
248
-
249
-
250
- wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaver-xtreme' /*adm*/));
251
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaver-xtreme' /*adm*/));
252
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaver-xtreme' /*adm*/), 33, 1);
253
-
254
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaver-xtreme' /*adm*/));
255
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaver-xtreme' /*adm*/));
256
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaver-xtreme' /*adm*/),33,1);
257
-
258
-
259
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaver-xtreme' /*adm*/),33,2);
260
-
261
- _e('<em>Note:</em> the following options work with the default menu - not custom menus.','weaver-xtreme' /*adm*/);
262
- weaverx_html_br();
263
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaver-xtreme' /*adm*/),90,1);
264
-
265
-
266
- wvrx_ts_page_checkbox('_pp_stay_on_page',__('Menu "Placeholder" page. Useful for top-level menu item - don\'t go anywhere when menu item is clicked.','weaver-xtreme' /*adm*/),90,2);
267
-
268
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90,1);
269
-
270
- if (weaverx_allow_multisite()) {
271
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90,1);
272
- }
273
-
274
- ?>
275
- <p><strong><?php _e('Sidebars &amp; Widgets','weaver-xtreme' /*adm*/); ?></strong></p>
276
-
277
- <?php
278
- wvrx_ts_page_layout();
279
- ?>
280
- <br />
281
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
282
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
283
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaver-xtreme' /*adm*/); ?> <br /><br />
284
- <?php
285
-
286
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaver-xtreme' /*adm*/),40);
287
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaver-xtreme' /*adm*/),40,1);
288
-
289
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaver-xtreme' /*adm*/),40);
290
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaver-xtreme' /*adm*/),40,1);
291
-
292
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaver-xtreme' /*adm*/),40);
293
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaver-xtreme' /*adm*/),40,1);
294
-
295
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaver-xtreme' /*adm*/),40);
296
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaver-xtreme' /*adm*/),40,1);
297
- ?>
298
-
299
- <p><strong><?php _e('Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
300
- <p>
301
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
302
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
303
- </p>
304
- <?php
305
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
306
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
307
-
308
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
309
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
310
-
311
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-top-widget-area' );
312
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-bottom-widget-area' );
313
-
314
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaver-xtreme' /*adm*/) , 'page-top-widget-area' );
315
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaver-xtreme' /*adm*/) , 'page-bottom-widget-area' );
316
- ?>
317
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
318
- <?php
319
- $opts3 = array( 'id' => '_pp_fi_location',
320
- 'info' => __('How to display Page FI on this page','weaver-xtreme' /*adm*/),
321
- 'value' => array(
322
- array('val' => '', 'desc' => __('Default Page FI','weaver-xtreme' /*adm*/) ),
323
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
324
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
325
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
326
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
327
- array('val' => 'hide', 'desc' => __('Hide FI on this Page','weaver-xtreme' /*adm*/) )
328
- )
329
- );
330
- wvrx_ts_pp_select_id($opts3);
331
- ?>
332
- <br />
333
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
334
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
335
- <?php _e('<em>Featured Image Link</em> - Full URL for link from FI','weaver-xtreme' /*adm*/); ?>
336
- <br style="clear:both;" />
337
- <hr />
338
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
339
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
340
-
341
- <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaver-xtreme' /*adm*/); ?>
342
- <br />
343
- </p>
344
- <p>
345
- <?php _e('<strong>Settings for "Page with Posts" Template</strong>','weaver-xtreme' /*adm*/);
346
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaver-xtreme' /*adm*/) );
347
-
348
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
349
- if ($template == 'paget-posts.php') {
350
- ?>
351
- <br />
352
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
353
- The settings will be combined for the final filtered list of posts displayed.
354
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
355
- <br />
356
-
357
- <input type="text" size="30" id="_pp_category" name="_pp_category"
358
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
359
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaver-xtreme' /*adm*/); ?>
360
- <br />
361
-
362
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
363
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
364
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaver-xtreme' /*adm*/); ?> <br />
365
-
366
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
367
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
368
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display.",'weaver-xtreme' /*adm*/); ?> <br />
369
-
370
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
371
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
372
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaver-xtreme' /*adm*/); ?> <br />
373
-
374
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
375
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
376
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaver-xtreme' /*adm*/); ?> <br />
377
-
378
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
379
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
380
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaver-xtreme' /*adm*/); ?> <br />
381
-
382
- <input type="text" size="30" id="_pp_author" name="_pp_author"
383
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
384
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaver-xtreme' /*adm*/); ?> <br />
385
-
386
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
387
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
388
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaver-xtreme' /*adm*/); ?> <br />
389
-
390
- <?php weaverx_pwp_atw_show_post_filter(); ?>
391
-
392
- <?php weaverx_pwp_type(); ?><br />
393
- <?php weaverx_pwp_cols(); ?><br />
394
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
395
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
396
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaver-xtreme' /*adm*/); ?>
397
- <br />
398
-
399
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
400
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
401
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
402
- __("Hide first \"n\" posts</em> - Start with post n+1.
403
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaver-xtreme' /*adm*/) ; ?>
404
-
405
- <br /><br />
406
-
407
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaver-xtreme' /*adm*/), 40); ?>
408
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaver-xtreme' /*adm*/), 40, 1); ?>
409
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaver-xtreme' /*adm*/), 40); ?>
410
- </p>
411
- <?php
412
- } else { // NOT a page with posts
413
- ?> <p>
414
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
415
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
416
- settings for "Page with Posts" will be displayed here. Current page template:','weaver-xtreme' /*adm*/); ?>
417
- <?php echo $template; ?>
418
- </p>
419
- <?php
420
- }
421
- do_action('weaverxplus_add_per_page');
422
- ?>
423
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
424
- </div>
425
- <?php
426
- }
427
-
428
- function wvrx_ts_post_extras() {
429
- global $post;
430
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
431
- if ( !( current_user_can('edit_themes')
432
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
433
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
434
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
435
- ) {
436
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
437
- return; // don't show per post panel
438
- }
439
- ?>
440
- <div style="line-height:150%;">
441
- <p>
442
- <?php
443
- echo '<strong>' . __('Per Post Options','weaver-xtreme' /*adm*/) . '</strong>';
444
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaver-xtreme' /*adm*/));
445
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
446
- weaverx_html_br();
447
- _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.','weaver-xtreme' /*adm*/);
448
- weaverx_html_br();
449
-
450
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaver-xtreme' /*adm*/), 40);
451
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaver-xtreme' /*adm*/),55,1);
452
-
453
-
454
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaver-xtreme' /*adm*/),40);
455
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaver-xtreme' /*adm*/), 40, 1);
456
-
457
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaver-xtreme' /*adm*/),40);
458
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaver-xtreme' /*adm*/),40,1);
459
-
460
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaver-xtreme' /*adm*/),40);
461
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaver-xtreme' /*adm*/),40,1);
462
- wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaver-xtreme' /*adm*/),90,1);
463
-
464
- wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaver-xtreme' /*adm*/),90);
465
-
466
-
467
- echo('<br style="clear:both;"/><br /><strong>Per Post Style</strong>' /*a*/ );
468
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaver-xtreme' /*adm*/ ));
469
- echo '<br />' .
470
- __('Enter optional per post CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
471
- Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
472
- (e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme' /*adm*/); ?>
473
- <br />
474
- <textarea name="_pp_post_style" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_style", true)); ?>
475
- </textarea>
476
- <br />
477
- <br />
478
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
479
-
480
- <?php
481
- wvrx_ts_page_layout('post');
482
- ?>
483
- <br />
484
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
485
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
486
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaver-xtreme' /*adm*/); ?> <br /><br />
487
- <?php
488
-
489
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaver-xtreme' /*adm*/),40);
490
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaver-xtreme' /*adm*/),40,1);
491
-
492
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaver-xtreme' /*adm*/),40);
493
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
494
-
495
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaver-xtreme' /*adm*/),40);
496
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
497
-
498
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaver-xtreme' /*adm*/),40);
499
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaver-xtreme' /*adm*/),40,1);
500
- ?>
501
- </p>
502
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
503
- <p>
504
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
505
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
506
- </p>
507
- <?php
508
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
509
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
510
-
511
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
512
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
513
-
514
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
515
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
516
- ?>
517
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
518
- <?php
519
- $opts3 = array( 'id' => '_pp_fi_location',
520
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaver-xtreme' /*adm*/),
521
- 'value' => array(
522
- array('val' => '', 'desc' => __('Default Single Page FI','weaver-xtreme' /*adm*/) ),
523
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
524
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
525
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
526
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
527
- array('val' => 'post-before', 'desc' => __('Outside of Post','weaver-xtreme' /*adm*/) ),
528
- array('val' => 'hide', 'desc' => __('Hide FI on Single Page','weaver-xtreme' /*adm*/) )
529
- )
530
- );
531
- wvrx_ts_pp_select_id($opts3);
532
- ?>
533
- <br />
534
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
535
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
536
- <?php _e("<em>Featured Image Link</em> - Full URL for link from FI",'weaver-xtreme' /*adm*/); ?>
537
- <br style="clear:both;" />
538
- </p><p>
539
- <strong><?php _e('Post Editor Options','weaver-xtreme' /*adm*/); ?></strong>
540
-
541
- <?php
542
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90, 1);
543
-
544
- if (weaverx_allow_multisite()) {
545
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90, 1);
546
- }
547
- ?>
548
- </p>
549
- <p>
550
- <?php echo('<strong>Post Format</strong>');
551
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaver-xtreme' /*adm*/));
552
- weaverx_html_br();
553
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info.','weaver-xtreme' /*adm*/);
554
- weaverx_html_br();
555
- weaverx_html_br();
556
-
557
- do_action('weaverxplus_add_per_post'); ?>
558
- </p>
559
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
560
- </div>
561
- <?php
562
- }
563
-
564
-
565
- function wvrx_ts_save_post_fields($post_id) {
566
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
567
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
568
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
569
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
570
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
571
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_style',
572
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
573
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
574
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
575
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
576
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
577
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
578
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
579
- );
580
- if (weaverx_allow_multisite()) {
581
- array_push($default_post_fields, '_pp_raw_html');
582
- }
583
-
584
- $all_post_fields = $default_post_fields;
585
-
586
- if (isset($_POST['post_meta'])) {
587
- foreach ($all_post_fields as $post_field) {
588
- if (isset($_POST[$post_field])) {
589
- $data = stripslashes($_POST[$post_field]);
590
-
591
- if (get_post_meta($post_id, $post_field) == '') {
592
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
593
- }
594
- else if ($data != get_post_meta($post_id, $post_field, true)) {
595
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
596
- } else if ($data == '') {
597
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
598
- }
599
- } else {
600
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
601
- }
602
- }
603
- }
604
- }
605
-
606
- add_action("save_post", "wvrx_ts_save_post_fields");
607
- add_action("publish_post", "wvrx_ts_save_post_fields");
608
- }
609
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/includes/wvrx-ts-runtime-lib.php DELETED
@@ -1,107 +0,0 @@
1
- <?php
2
-
3
- // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
-
6
- function wvrx_ts_help_link($ref, $label) {
7
-
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
- }
13
-
14
-
15
- // =============================== options =============================
16
-
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
-
19
-
20
- // Interface to Weaver Xtreme
21
-
22
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
23
- function wvrx_ts_theme_support_addon() {
24
- ?>
25
- <div class="a-plus">
26
- <p><strong style="font-size:110%;"><?php _e('You have Weaver Xtreme Theme Support installed.','weaver-xtreme' /*adm*/); ?></strong><br />
27
- <?php _e('This section shows the shortcodes and widgets available with Weaver X Theme Support.
28
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaver-xtreme' /*adm*/); ?></p>
29
- <h3><?php _e('Shortcodes','weaver-xtreme' /*adm*/); ?></h3>
30
- <ul>
31
- <li><?php _e('<span class="wvr-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaver-xtreme' /*adm*/); ?>
32
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaver-xtreme' /*adm*/));?><br />
33
- <code><?php _e("[bloginfo name='WP bloginfo name' style='style-rules']",'weaver-xtreme' /*adm*/); ?></code>
34
- </li>
35
- <li><?php _e('<span class="wvr-blue">Box - [box]</span> - Display content in a Box','weaver-xtreme' /*adm*/); ?>
36
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaver-xtreme' /*adm*/));?><br />
37
- <code><?php _e("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaver-xtreme' /*adm*/); ?></code>
38
- </li>
39
- <li><?php _e('<span class="wvr-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaver-xtreme' /*adm*/); ?>
40
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaver-xtreme' /*adm*/));?><br />
41
- <code><?php _e("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaver-xtreme' /*adm*/); ?></code>
42
- </li>
43
- <li<?php _e('><span class="wvr-blue">Header Image - [header_image]</span> - Display default header image','weaver-xtreme' /*adm*/); ?>
44
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaver-xtreme' /*adm*/));?><br />
45
- <code><?php _e("[header_image h='size' w='size' style='inline-style']",'weaver-xtreme' /*adm*/); ?></code>
46
- </li>
47
-
48
- <li><?php _e('<span class="wvr-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaver-xtreme' /*adm*/); ?>
49
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaver-xtreme' /*adm*/));?><br />
50
- <code><?php _e("[html html-tag args='parameters']",'weaver-xtreme' /*adm*/); ?></code>
51
- </li>
52
- <li><?php _e('<span class="wvr-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaver-xtreme' /*adm*/); ?>
53
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaver-xtreme' /*adm*/));?><br />
54
- <code><?php _e("[iframe src='http://example.com' height=600 percent=100 style='style']",'weaver-xtreme' /*adm*/); ?></code>
55
- </li>
56
-
57
- <li><?php _e('<span class="wvr-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaver-xtreme' /*adm*/); ?>
58
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaver-xtreme' /*adm*/));?><br />
59
- <code><?php _e('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaver-xtreme' /*adm*/); ?></code>
60
- </li>
61
- <li><?php _e('<span class="wvr-blue">Hide If - [hide_if]</span> - Hide content','weaver-xtreme' /*adm*/); ?>
62
- </li>
63
-
64
- <li><?php _e('<span class="wvr-blue">Site Tagline - [site_tagline]</span> - Display the site tagline','weaver-xtreme' /*adm*/); ?>
65
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaver-xtreme' /*adm*/));?><br />
66
- <code><?php _e("[site_tagline style='inline-style']",'weaver-xtreme' /*adm*/); ?></code>
67
- </li>
68
- <li><?php _e('<span class="wvr-blue">Site Title - [site_title]</span> - Display the site title','weaver-xtreme' /*adm*/); ?>
69
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaver-xtreme' /*adm*/));?><br />
70
- <code><?php _e("[site_title style='inline-style']",'weaver-xtreme' /*adm*/); ?></code>
71
- </li>
72
- <li><?php _e('<span class="wvr-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag','weaver-xtreme' /*adm*/); ?>
73
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Span','weaver-xtreme' /*adm*/));?><br />
74
- <code><?php _e("[span id='class_id' class='class_name' style='style_values']text[/span]",'weaver-xtreme' /*adm*/); ?></code>
75
- </li>
76
- <li><?php _e('<span class="wvr-blue">Tab Group - [tab_group]</span> - Display content on separate tabs','weaver-xtreme' /*adm*/);?>
77
- <?php wvrx_ts_help_link('help.html#tab_group',__('Help for Tab Group','weaver-xtreme' /*adm*/));?><br />
78
- <code><?php _e('[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]','weaver-xtreme' /*adm*/); ?></code>
79
- </li>
80
- <li><?php _e('<span class="wvr-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options','weaver-xtreme' /*adm*/); ?>
81
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
82
- <code><?php _e('[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]','weaver-xtreme' /*adm*/); ?></code>
83
- </li>
84
-
85
- <li><?php _e('<span class="wvr-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options','weaver-xtreme' /*adm*/); ?>
86
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
87
- <code><?php _e('[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]','weaver-xtreme' /*adm*/); ?></code>
88
- </li>
89
- </ul>
90
- <h3><?php _e('Widgets','weaver-xtreme' /*adm*/); ?></h3>
91
- <ul>
92
- <li><?php _e('<span class="wvr-blue">Weaver X Login Widget</span> - Simplified login widget','weaver-xtreme' /*adm*/); ?>
93
- <?php wvrx_ts_help_link('help.html#widg-login',__('Help for Login Widget','weaver-xtreme' /*adm*/));?>
94
- </li>
95
-
96
- <li><?php _e('<span class="wvr-blue">Weaver X Per Page Text</span> - Display text on a per page basis, based on a Custom Field value','weaver-xtreme' /*adm*/); ?>
97
- <?php wvrx_ts_help_link('help.html##widg_pp_text',__('Help for Per Page Text Widget','weaver-xtreme' /*adm*/));?>
98
- </li>
99
-
100
- <li><?php _e('<span class="wvr-blue">Weaver X Text 2</span> - Display text in two columns - great for wide top/bottom widgets','weaver-xtreme' /*adm*/); ?>
101
- <?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
102
- </li>
103
- </ul>
104
- </div>
105
- <?php
106
- }
107
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/includes/wvrx-ts-shortcodes.php DELETED
@@ -1,632 +0,0 @@
1
- <?php
2
- /*
3
- Weaver X shortcodes
4
- */
5
-
6
- function wvrx_ts_setup_shortcodes() {
7
- // we setup all of our shortcodes only after the theme has been loaded...
8
-
9
- $codes = array( // list of shortcodes
10
- array('bloginfo' => 'wvrx_ts_sc_bloginfo'), // [bloginfo]
11
- array('box' => 'wvrx_ts_sc_box'), // [box]
12
- array('div' => 'wvrx_ts_sc_div'), // [div]
13
- array('header_image' => 'wvrx_ts_sc_header_image'), // [header_image]
14
- array('hide_if' => 'wvrx_ts_sc_hide_if' ), // [hide_if]
15
- array('html' => 'wvrx_ts_sc_html'), // [html]
16
- array('iframe' => 'wvrx_ts_sc_iframe'), // [iframe]
17
- array('show_if' => 'wvrx_ts_sc_show_if' ), // [show_if]
18
- array('span' => 'wvrx_ts_sc_span'), // [span]
19
- array('site_tagline' => 'wvrx_ts_sc_site_tagline'), // [site_tagline]
20
- array('site_title' => 'wvrx_ts_sc_site_title'), // [site_title]
21
- array('tab_group' => 'wvrx_ts_sc_tab_group',
22
- 'tab' => 'wvrx_ts_sc_tab'), // [tab_group], [tab]
23
- array('vimeo' => 'wvrx_ts_sc_vimeo'), // [vimeo]
24
- array('youtube' => 'wvrx_ts_sc_youtube'), // [youtube]
25
- array('weaverx_info' => 'wvrx_ts_weaverx_sc_info'), // [weaverx_info]
26
- );
27
-
28
- foreach ($codes as $code) {
29
- wvrx_ts_set_shortcodes($code);
30
- }
31
- }
32
-
33
- add_action('init', 'wvrx_ts_setup_shortcodes'); // allow shortcodes to load after theme has loaded so we know which version to use
34
-
35
- // =============== [box] ===================
36
- function wvrx_ts_sc_box( $args = '', $text ) {
37
- extract(shortcode_atts(array(
38
- 'align' => '',
39
- 'border' => true,
40
- 'border_rule' => '1px solid black',
41
- 'border_radius' => '',
42
- 'color' => '',
43
- 'background' => '',
44
- 'margin' => '',
45
- 'padding' => '1',
46
- 'shadow' => '',
47
- 'style' => '',
48
- 'width' => ''
49
- ), $args));
50
-
51
- $sty = 'style="';
52
-
53
- if ( $align ) {
54
- $align = strtolower($align);
55
- switch ( $align ) {
56
- case 'center':
57
- $sty .= 'display:block;margin-left:auto;margin-right:auto;';
58
- break;
59
- case 'right':
60
- $sty .= 'float:right;';
61
- break;
62
- default:
63
- $sty .= 'float:left;';
64
- break;
65
- }
66
- }
67
-
68
- if ( $border )
69
- $sty .= "border:{$border_rule};";
70
- if ( $border_radius )
71
- $sty .= "border-radius:{$border_radius}px;";
72
- if ( $shadow ) {
73
- if ( $shadow < 1 ) $shadow = 1;
74
- if ( $shadow > 5 ) $shadow = 5;
75
- $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
76
- }
77
- if ( $color )
78
- $sty .= "color:{$color};";
79
- if ( $background )
80
- $sty .= "background-color:{$background};";
81
- if ( $margin )
82
- $sty .= "margin:{$margin}em;";
83
- if ( $padding )
84
- $sty .= "padding:{$padding}em;";
85
- if ( $width )
86
- $sty .= "width:{$width}%;";
87
- if ( $sty )
88
- $sty .= $style;
89
- $sty .= '"'; // finish it
90
-
91
- return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
92
- }
93
-
94
- // =============== [hide_if] ===================
95
- function wvrx_ts_sc_hide_if($args = '', $text ) {
96
-
97
- return wvrx_ts_show_hide_if( $args, $text, false );
98
- }
99
-
100
- // =============== [show_if] ===================
101
- function wvrx_ts_sc_show_if($args = '', $text ) {
102
- return wvrx_ts_show_hide_if( $args, $text, true );
103
- }
104
-
105
- // =============== [show_hide_if] ===================
106
- function wvrx_ts_show_hide_if($args = '', $text, $show) {
107
- extract(shortcode_atts(array(
108
- 'device' => 'default', // desktop, mobile, smalltablet, phone, all
109
- 'logged_in' => 'default', // true or false
110
- 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
111
- 'post_id' => 'default', // comma separated list
112
- 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
113
- ), $args));
114
-
115
- $valid_device = array('default','desktop','mobile','smalltablet','phone','all');
116
-
117
- if ( !in_array( $device, $valid_device )) {
118
- return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
119
-
120
- }
121
- if ( $logged_in == 'default' ) { // **** logged_in
122
- $logged_in = true;
123
- } else {
124
- $is_true = is_user_logged_in();
125
- $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : !$is_true;
126
- }
127
-
128
- if ( $not_post_id == 'default') { // **** pages
129
- $not_post_id = true;
130
- } else {
131
- $list = explode(',', str_replace(' ', '', $not_post_id));
132
- $not_post_id = !in_array( get_the_ID(), $list );
133
- }
134
-
135
- if ( $post_id == 'default') { // **** pages
136
- $post_id = true;
137
- } else {
138
- $list = explode(',', str_replace(' ', '', $post_id));
139
- $post_id = in_array( get_the_ID(), $list );
140
- }
141
-
142
- if ( $user_can == 'default') { // **** user_can
143
- $user_can = true;
144
- } else {
145
- $user_can = current_user_can( strtolower( $user_can) );
146
- }
147
-
148
- $x = true;
149
- if ( $x == 'default') {
150
- $x = true;
151
- } else {
152
- $x = $show;
153
- }
154
-
155
- $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
156
-
157
- if ( !$all_true ) { // device irrelevant
158
- // $text .= '* ALL TRUE FAILED *';
159
- if ( !$show )
160
- return do_shortcode( $text ); // hide fails, so show it
161
- else
162
- return ''; // show fails, so hide it
163
-
164
- } elseif ( $device == 'default') { // so all other conditions passed, see if specified device
165
- // $text .= '* ALL TRUE, DEVICE DEFAULT *';
166
- if ( $show )
167
- return do_shortcode( $text );
168
- else
169
- return '';
170
- } else {
171
- // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
172
- if ( $show ) {
173
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('show-' . $device); // for [extra_menu]
174
- } else {
175
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('hide-' . $device);
176
- }
177
- $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode($text) . '</div>';
178
- unset( $GLOBALS['wvrx_sc_show_hide'] );
179
- return $ret;
180
- }
181
- return '';
182
- }
183
-
184
-
185
- // =============== [header_image style='customstyle'] ===================
186
- function wvrx_ts_sc_header_image($args = ''){
187
- extract(shortcode_atts(array(
188
- 'style' => '', // STYLE
189
- 'h' => '',
190
- 'w' => ''
191
- ), $args));
192
-
193
- $width = $w ? ' width="' . $w . '"' : '';
194
- $height = $h ? ' height="' . $h . '"' : '';
195
- $st = $style ? ' style="' . $style . '"' : '';
196
-
197
- $hdrimg = '<img src="' . get_header_image() . '"' . $st . $width . $height
198
- . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
199
-
200
- return $hdrimg;
201
- }
202
-
203
- // =============== [bloginfo arg='name'] ======================
204
- function wvrx_ts_sc_bloginfo($args = '') {
205
- extract(shortcode_atts(array(
206
- 'arg' => 'name', // a WP bloginfo name
207
- 'style' => '' // wrap with style
208
- ), $args));
209
-
210
- $code = '';
211
- if ($style != '') $code = '<span style="' . $style . '">';
212
- $code .= esc_attr( get_bloginfo( $arg ));
213
- if ($style != '') $code .= '</span>';
214
- return $code;
215
- }
216
-
217
- // =============== [site_title style='customstyle'] ======================
218
- function wvrx_ts_sc_site_title($args = '') {
219
- extract(shortcode_atts(array(
220
- 'style' => '' /* styling for the header */
221
- ), $args));
222
- $title = esc_attr( get_bloginfo( 'name', 'display' ));
223
-
224
- if ($style) {
225
- return '<span style="' . $style . '">' . $title . '</span>';
226
- }
227
- return $title;
228
-
229
- }
230
-
231
- // =============== [site_title style='customstyle'] ======================
232
- function wvrx_ts_sc_site_tagline($args = '') {
233
- extract(shortcode_atts(array(
234
- 'style' => '' /* styling for the header */
235
- ), $args));
236
- $title = get_bloginfo( 'description' );
237
-
238
- if ($style) {
239
- return '<span style="' . $style . '">' . $title . '</span>';
240
- }
241
- return $title;
242
- }
243
-
244
- // =============== [iframe src='address' height=nnn] ======================
245
- function wvrx_ts_sc_iframe($args = '') {
246
- extract(shortcode_atts(array(
247
- 'src' => '',
248
- 'height' => '600', /* styling for the header */
249
- 'percent' => 100,
250
- 'style' => 'border:1px;'
251
- ), $args));
252
-
253
- $sty = $style ? ' style="' . $style . '"' : '';
254
-
255
- if (!$src) return __('<h4>No src address provided to [iframe].</h4>','weaver-xtreme' /*adm*/);
256
- return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
257
- }
258
-
259
-
260
-
261
- // =============== [tab_group ] ======================
262
- function wvrx_ts_sc_tab_group( $args, $content ) {
263
- extract( shortcode_atts( array(
264
- 'border_color' => '', // tab and pane bodder color - default #888
265
- 'tab_bg' => '', // normal bg color of tab (default #CCC)
266
- 'tab_selected_color' => '', // color of tab when selected (default #EEE)
267
- 'pane_min_height' => '', // min height of a pane to help make all even if needed
268
- 'pane_bg' => '' // bg color of pane
269
- ), $args ) );
270
-
271
- if (isset($GLOBALS['wvrx_ts_in_tab_container']) && $GLOBALS['wvrx_ts_in_tab_container']) {
272
- return __('<strong>Sorry, you cannot nest tab_containers.</strong>','weaver-xtreme' /*adm*/);
273
- }
274
-
275
- // enqueue the theme support jslib only now when it will actually be needed!
276
-
277
- wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
278
-
279
- if ( !isset( $GLOBALS['wvrx_ts_tab_id'] ) )
280
- $GLOBALS['wvrx_ts_tab_id'] = 1;
281
- else
282
- ++$GLOBALS['wvrx_ts_tab_id'];
283
-
284
- $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
285
-
286
- $css = ''; // default styles
287
- $add_style = '';
288
- if ($border_color != '')
289
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
290
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
291
-
292
- if ($pane_min_height != '')
293
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
294
-
295
- if ($pane_bg != '')
296
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
297
-
298
- if ($tab_bg != '')
299
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
300
-
301
- if ($tab_selected_color != '')
302
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
303
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
304
-
305
- if ($css != '') { // specified some style...
306
- $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
307
- }
308
-
309
- $GLOBALS['wvrx_ts_in_tab_container'] = true;
310
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
311
-
312
- do_shortcode( $content ); // process the tabs on this
313
-
314
- $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
315
-
316
- if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
317
- foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
318
- $tabs[] = '<span>' . $tab['title'] . '</span>'. "\n";
319
- $panes[] = "\n" .'<div class="wvr-tabs-pane">' . $tab['content'] . '</div>';
320
- }
321
- $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
322
- . '<div class="wvr-tabs-nav">' . "\n"
323
- . implode( '', $tabs ) . '</div>' . "\n"
324
- . '<div class="wvr-tabs-panes">'
325
- . implode( '', $panes ) . "\n"
326
- . '</div><div class="wvr-tabs-clear"></div>' . "\n"
327
- . '</div> <!-- end tab_group -->' . "\n";
328
- }
329
-
330
- // Forget globals we generated
331
- unset( $GLOBALS['wvrx_ts_in_tab_container'],$GLOBALS['wvrx_ts_tabs'],$GLOBALS['wvrx_ts_num_tabs']);
332
-
333
- return $add_style . $out;
334
- }
335
-
336
- function wvrx_ts_sc_tab( $args, $content ) {
337
- extract( shortcode_atts( array(
338
- 'title' => 'Tab %d'
339
- ), $args ) );
340
-
341
- if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
342
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
343
- }
344
- $cur = $GLOBALS['wvrx_ts_num_tabs'];
345
- $GLOBALS['wvrx_ts_tabs'][$cur] = array(
346
- 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
347
- 'content' => do_shortcode( $content ) );
348
- $GLOBALS['wvrx_ts_num_tabs']++;
349
- }
350
-
351
-
352
- // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
353
- function wvrx_ts_sc_youtube($args = '') {
354
- $share = '';
355
- if ( isset ( $args[0] ) )
356
- $share = trim($args[0]);
357
-
358
- // http://code.google.com/apis/youtube/player_parameters.html
359
- // not including: enablejsapi, fs,playerapiid,
360
-
361
- extract(shortcode_atts(array(
362
- 'id' => '',
363
- 'sd' => false,
364
- 'related' => '0',
365
- 'privacy' => false,
366
- 'ratio' => false,
367
- 'center' => '1',
368
- 'autohide' => '~!',
369
- 'autoplay' => '0',
370
- 'border' => '0',
371
- 'color' => false,
372
- 'color1' => false,
373
- 'color2' => false,
374
- 'controls' => '1',
375
- 'disablekb' => '0',
376
- 'egm' => '0',
377
- 'fs' => '1',
378
- 'fullscreen' => 1,
379
- 'hd' => '0',
380
- 'iv_load_policy' => '1',
381
- 'loop' => '0',
382
- 'modestbranding' => '0',
383
- 'origin' => false,
384
- 'percent' => 100,
385
- 'playlist' => false,
386
- 'rel' => '0',
387
- 'showinfo' => '1',
388
- 'showsearch' => '1',
389
- 'start' => false,
390
- 'theme' => 'dark',
391
- 'wmode' => 'transparent'
392
-
393
- ), $args));
394
-
395
- if (!$share && !$id)
396
- return __('<strong>No share or id values provided for youtube shortcode.</strong>','weaver-xtreme' /*adm*/);
397
-
398
- if ($share) { // let the share override any id
399
- $share = str_replace('youtu.be/','',$share);
400
- if (strpos($share,'youtube.com/watch') !== false) {
401
- $share = str_replace('www.youtube.com/watch?v=', '', $share);
402
- $share = str_replace('&amp;','+',$share);
403
- $share = str_replace('&','+',$share);
404
- }
405
- $share = str_replace('http://','',$share);
406
- $share = str_replace('https://','',$share);
407
- if ($share)
408
- $id = $share;
409
- }
410
-
411
- $opts = $id . '%%';
412
-
413
- $opts = wvrx_ts_add_url_opt($opts, $hd != '0', 'hd=1');
414
- $opts = wvrx_ts_add_url_opt($opts, $autohide != '~!', 'autohide='.$autohide);
415
- $opts = wvrx_ts_add_url_opt($opts, $autoplay != '0', 'autoplay=1');
416
- $opts = wvrx_ts_add_url_opt($opts, $border != '0', 'border=1');
417
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color='.$color);
418
- $opts = wvrx_ts_add_url_opt($opts, $color1, 'color1='.$color1);
419
- $opts = wvrx_ts_add_url_opt($opts, $color2, 'color2='.$color2);
420
- $opts = wvrx_ts_add_url_opt($opts, $controls != '1', 'controls=0');
421
- $opts = wvrx_ts_add_url_opt($opts, $disablekb != '0', 'disablekb=1');
422
- $opts = wvrx_ts_add_url_opt($opts, $egm != '0', 'egm=1');
423
- $opts = wvrx_ts_add_url_opt($opts, true, 'fs='.$fs);
424
- $opts = wvrx_ts_add_url_opt($opts, true, 'iv_load_policy='.$iv_load_policy);
425
- $opts = wvrx_ts_add_url_opt($opts, $loop != '0', 'loop=1');
426
- $opts = wvrx_ts_add_url_opt($opts, $modestbranding != '0', 'modestbranding=1');
427
- $opts = wvrx_ts_add_url_opt($opts, $origin, 'origin='.$origin);
428
- $opts = wvrx_ts_add_url_opt($opts, $playlist, 'playlist='.$playlist);
429
- $opts = wvrx_ts_add_url_opt($opts, true, 'rel='.$rel);
430
- $opts = wvrx_ts_add_url_opt($opts, true, 'showinfo=' . $showinfo);
431
- $opts = wvrx_ts_add_url_opt($opts, $showsearch != '1', 'showsearch=0');
432
- $opts = wvrx_ts_add_url_opt($opts, $start, 'start='.$start);
433
- $opts = wvrx_ts_add_url_opt($opts, $theme != 'dark', 'theme=light');
434
- $opts = wvrx_ts_add_url_opt($opts, $wmode, 'wmode='.$wmode);
435
-
436
- $url = '//';
437
-
438
- if ($privacy) $url .= 'www.youtube-nocookie.com';
439
- else $url .= 'www.youtube.com';
440
-
441
- $opts = str_replace('%%+','%%?', $opts);
442
- $opts = str_replace('%%','', $opts);
443
- $opts = str_replace('+','&amp;', $opts);
444
-
445
- $url .= '/embed/' . $opts;
446
-
447
-
448
- $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
449
-
450
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
451
- "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
452
- $cntr2 = '</div>';
453
- $h = 9; $w = 16;
454
- if ( $sd ) {
455
- $h = 3; $w = 4;
456
- }
457
-
458
- $ret ="\n" . $cntr1 . '<iframe src="' . $url
459
- . '" frameborder="0" width="'.$w.'" height="' . $h . '" frameborder="0" ' . $allowfull . '"></iframe>'
460
- . $cntr2 . "\n";
461
-
462
- return $ret;
463
- }
464
-
465
- // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
466
- function wvrx_ts_sc_vimeo($args = '') {
467
- $share = '';
468
- if ( isset ( $args[0] ) )
469
- $share = trim($args[0]);
470
-
471
- extract(shortcode_atts(array(
472
- 'id' => '',
473
- 'sd' => false,
474
- 'color' => '',
475
- 'autoplay' => false,
476
- 'loop' => false,
477
- 'portrait' => true,
478
- 'title' => true,
479
- 'byline' => true,
480
- 'percent' => 100,
481
- 'center' => '1'
482
- ), $args));
483
-
484
- if (!$share && !$id) return __('<strong>No share or id values provided for vimeo shortcode.</strong>','weaver-xtreme' /*adm*/);
485
-
486
- if ($share) { // let the share override any id
487
- $share = str_replace('http://vimeo.com/','',$share);
488
- if ($share) $id = $share;
489
- }
490
-
491
- $opts = $id . '##';
492
-
493
- $opts = wvrx_ts_add_url_opt($opts, $autoplay, 'autoplay=1');
494
- $opts = wvrx_ts_add_url_opt($opts, $loop, 'loop=1');
495
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color=' . $color);
496
- $opts = wvrx_ts_add_url_opt($opts, !$portrait, 'portrait=0');
497
- $opts = wvrx_ts_add_url_opt($opts, !$title, 'title=0');
498
- $opts = wvrx_ts_add_url_opt($opts, !$byline, 'byline=0');
499
-
500
- $url = '//player.vimeo.com/video/';
501
-
502
- $opts = str_replace('##+','##?', $opts);
503
- $opts = str_replace('##','', $opts);
504
- $opts = str_replace('+','&amp;', $opts);
505
-
506
- $url .= $opts;
507
-
508
- if (function_exists('weaverii_use_mobile'))
509
- if (weaverii_use_mobile('mobile')) $percent = 100;
510
-
511
-
512
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
513
- "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
514
- $cntr2 = '</div>';
515
- $h = 9; $w = 16;
516
- if ( $sd ) {
517
- $h = 3; $w = 4;
518
- }
519
-
520
- $ret = "\n" . $cntr1 . '<iframe src="' . $url
521
- . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
522
- . $cntr2 . "\n";
523
-
524
- return $ret;
525
- }
526
-
527
- // ===== video utils =====
528
-
529
- function wvrx_ts_add_url_opt($opts, $add, $add_val) {
530
- if ($add) {
531
- $opts = $opts . '+' . $add_val;
532
- }
533
- return $opts;
534
- }
535
-
536
-
537
-
538
- function wvrx_ts_sc_html($vals = '') { // [html style='customstyle'] - all ======================
539
- $tag = 'span';
540
- if ( isset ( $vals[0] ) )
541
- $tag = trim( $vals[0]);
542
-
543
- extract(shortcode_atts(array(
544
- 'args' => ''
545
- ), $vals));
546
- if ($args) $args = ' ' . $args;
547
- return '<' . $tag . $args . '>';
548
- }
549
-
550
- function wvrx_ts_sc_div($vals = '',$text) { // [div] - all ===================
551
- extract(shortcode_atts(array(
552
- 'id' => '',
553
- 'class' => '',
554
- 'style' => ''
555
- ), $vals));
556
-
557
- $args = '';
558
- if ($id) $args .= ' id="' . $id . '"';
559
- if ($class) $args .= ' class="' . $class . '"';
560
- if ($style) $args .= ' style="' . $style . '"';
561
-
562
- return '<div' . $args . '>' . do_shortcode($text) . '</div>';
563
- }
564
-
565
- function wvrx_ts_sc_span($vals = '',$text) { // [span] - all ==================
566
- extract(shortcode_atts(array(
567
- 'id' => '',
568
- 'class' => '',
569
- 'style' => ''
570
- ), $vals));
571
-
572
- $args = '';
573
- if ($id) $args .= ' id="' . $id . '"';
574
- if ($class) $args .= ' class="' . $class . '"';
575
- if ($style) $args .= ' style="' . $style . '"';
576
-
577
- return '<span' . $args . '>' . do_shortcode($text) . '</span>';
578
- }
579
-
580
- function wvrx_ts_weaverx_sc_info() { // [info] ======================
581
- global $current_user;
582
- $out = __('<strong>Theme/User Info</strong><hr />','weaver-xtreme' /*adm*/);
583
-
584
- get_currentuserinfo();
585
- if (isset($current_user->display_name)) {
586
- $out .= __('<em>User:</em> ','weaver-xtreme' /*adm*/) . $current_user->display_name . '<br />';
587
- }
588
- $out .= '&nbsp;&nbsp;' . wp_register('','<br />',false);
589
- $out .= '&nbsp;&nbsp;' . wp_loginout('',false) . '<br />';
590
-
591
- $agent = __('Not Available','weaver-xtreme' /*adm*/);
592
- if (isset($_SERVER["HTTP_USER_AGENT"]) )
593
- $agent = $_SERVER['HTTP_USER_AGENT'];
594
- $out .= __('<em>User Agent</em>:','weaver-xtreme' /*adm*/) . ' <small>' . $agent . '</small>';
595
- $out .= '<div id="example"></div>
596
- <script type="text/javascript">
597
- var txt = "";
598
- var myWidth;
599
- if( typeof( window.innerWidth ) == "number" ) {
600
- //Non-IE
601
- myWidth = window.innerWidth;
602
- } else if( document.documentElement &&
603
- ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
604
- //IE 6+ in "standards compliant mode"
605
- myWidth = document.documentElement.clientWidth;
606
- } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
607
- //IE 4 compatible
608
- myWidth = document.body.clientWidth;
609
- }
610
- txt+= "<em>Browser Width: </em>" + myWidth + " px</br>";
611
- document.getElementById("example").innerHTML=txt;
612
- </script>';
613
-
614
- $out .= __('<em>Feed title:</em> ','weaver-xtreme' /*adm*/) . get_bloginfo_rss('name') . '<br />' . get_wp_title_rss();
615
-
616
- $out .= __('<br /><em>You are using</em> WordPress ','weaver-xtreme' /*adm*/) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
617
- $out .= __('<br /><em>Memory:</em> ','weaver-xtreme' /*adm*/) . round(memory_get_usage()/1024/1024,2) . 'M of ' . (int)ini_get('memory_limit') . 'M <hr />';
618
- return $out;
619
- }
620
-
621
-
622
- function wvrx_ts_set_shortcodes($sc_list) {
623
- foreach ($sc_list as $sc_name => $sc_func) {
624
- remove_shortcode($sc_name);
625
- add_shortcode($sc_name,$sc_func);
626
- }
627
- }
628
-
629
- // =============== Utilities ======================
630
-
631
-
632
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/includes/wvrx-ts-widgets.php DELETED
@@ -1,169 +0,0 @@
1
- <?php
2
- /*
3
- * Weaver X Widgets and shortcodes - widgets
4
- */
5
-
6
- class WeaverX_Widget_Text extends WP_Widget {
7
-
8
- function WeaverX_Widget_Text() {
9
- $widget_ops = array('classname' => 'WeaverX_Widget_Text',
10
- 'description' => __('Text Widget with Two Columns - with HTML and shortcode support. Also adds shortcodes to standard Text widget.','weaver-xtreme' /*adm*/));
11
- $control_ops = array('width' => 400, 'height' => 350);
12
- $this->WP_Widget('wvrx2_text', __('Weaver X Text 2','weaver-xtreme' /*adm*/), $widget_ops, $control_ops);
13
- }
14
-
15
- function widget( $args, $instance ) {
16
- extract($args);
17
- $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
18
- $text = apply_filters( 'weaverx_text', $instance['text'], $instance );
19
- $text2 = apply_filters( 'weaverx_text', $instance['text2'], $instance );
20
- echo $before_widget;
21
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
22
- <div class="textwidget"><div style="float: left; width: 48%; padding-right: 2%;">
23
- <?php
24
- if ($instance['filter']) {
25
- echo(wpautop($text)); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
26
- echo(wpautop($text2)); echo('</div><div style="clear: both;"></div>');
27
- } else {
28
- echo($text); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
29
- echo($text2); echo('</div><div style="clear: both;"></div>');
30
- }
31
- ?>
32
- </div>
33
- <?php
34
- echo $after_widget;
35
- }
36
-
37
- function update( $new_instance, $old_instance ) {
38
- $instance = $old_instance;
39
- $instance['title'] = strip_tags($new_instance['title']);
40
- if ( current_user_can('unfiltered_html') ) {
41
- $instance['text'] = $new_instance['text'];
42
- $instance['text2'] = $new_instance['text2'];
43
- }
44
- else {
45
- $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
46
- $instance['text2'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text2']) ) );
47
- }
48
- $instance['filter'] = isset($new_instance['filter']);
49
- return $instance;
50
- }
51
-
52
- function form( $instance ) {
53
- $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'text2' => '', 'filter' => 0) );
54
- $title = strip_tags($instance['title']);
55
- $text = format_to_edit($instance['text']);
56
- $text2 = format_to_edit($instance['text2']);
57
- ?>
58
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title:' /*a*/ ); ?></label>
59
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
60
-
61
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
62
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text2'); ?>" name="<?php echo $this->get_field_name('text2'); ?>"><?php echo $text2; ?></textarea>
63
- <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> />
64
- &nbsp;<label for="<?php echo $this->get_field_id('filter'); ?>"><?php echo 'Automatically add paragraphs'; ?></label></p>
65
- <?php
66
- }
67
- }
68
-
69
- /**
70
- * Weaver X Per Page Text
71
- */
72
- class WeaverX_Widget_PPText extends WP_Widget {
73
-
74
- function WeaverX_Widget_PPText() {
75
- $widget_ops = array('classname' => 'wvrx_widget_pptext', 'description' =>
76
- __('Display text on a Per Page basis. Add to Widget area to see instructions.','weaver-xtreme' /*adm*/) );
77
- $this->WP_Widget('wvrx_pptext', __('Weaver X Per Page Text','weaver-xtreme' /*adm*/), $widget_ops);
78
- }
79
-
80
- function widget( $args, $instance ) {
81
- extract($args);
82
- $title = get_post_meta(get_the_ID(),'wvrx_ts_pp_title',true);
83
- $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
84
-
85
- if (empty($title) && empty($text))
86
- return;
87
-
88
- echo $before_widget;
89
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
90
- echo do_shortcode($text);
91
- echo $after_widget;
92
- }
93
-
94
- function update( $new_instance, $old_instance ) {
95
- $instance = $old_instance;
96
- $instance['title'] = strip_tags($new_instance['title']);
97
-
98
- return $instance;
99
- }
100
-
101
- function form( $instance ) {
102
- ?>
103
- <p><?php _e('This widget will work like a text widget, but the title and content are defined by custom
104
- fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>
105
- if you want a title, and define Custom Field <em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text,
106
- HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom
107
- fields are defined when that page is displayed. (This widget won\'t display on the default blog or other archive-like pages.)','weaver-xtreme' /*adm*/); ?><p>
108
- <?php
109
- }
110
- }
111
-
112
- /**
113
- * Weaver X login
114
- */
115
- class WeaverX_Widget_Login extends WP_Widget {
116
-
117
- function WeaverX_Widget_Login() {
118
- $widget_ops = array('classname' => 'wvrx_widget_login', 'description' => __( "Log in/out, admin", 'weaver-xtreme' /*adm*/ ) );
119
- $this->WP_Widget('wvrx_login', __('Weaver X Login','weaver-xtreme' /*adm*/), $widget_ops);
120
- }
121
-
122
- function widget( $args, $instance ) {
123
- extract($args);
124
- $title = apply_filters('widget_title', empty($instance['title']) ? __('Login', 'weaver-xtreme' /*adm*/ ) : $instance['title'], $instance, $this->id_base);
125
-
126
- echo $before_widget;
127
- if ( $title )
128
- echo $before_title . $title . $after_title;
129
- global $current_user;
130
- get_currentuserinfo();
131
- if (isset($current_user->display_name))
132
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaver-xtreme' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
133
- ?>
134
- <ul>
135
- <?php wp_register(); ?>
136
- <li><?php wp_loginout(); ?></li>
137
- </ul>
138
- <?php
139
- echo $after_widget;
140
- }
141
-
142
- function update( $new_instance, $old_instance ) {
143
- $instance = $old_instance;
144
- $instance['title'] = strip_tags($new_instance['title']);
145
-
146
- return $instance;
147
- }
148
-
149
- function form( $instance ) {
150
- $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
151
- $title = strip_tags($instance['title']);
152
- ?>
153
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','weaver-xtreme' /*adm*/); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
154
- <?php
155
- }
156
- }
157
-
158
-
159
- add_action("widgets_init", "wvrx_ts_load_widgets");
160
- add_filter('weaverx_text', 'do_shortcode');
161
- add_filter('widget_text', 'do_shortcode'); // add to standard text widget, too.
162
-
163
- function wvrx_ts_load_widgets() {
164
- register_widget("WeaverX_Widget_Text");
165
- register_widget("WeaverX_Widget_PPText");
166
- register_widget("WeaverX_Widget_Login");
167
- }
168
-
169
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/js/wvrx-ts-jslib.js DELETED
@@ -1,27 +0,0 @@
1
- /* *********************************************************************************
2
- * Weaver X Theme Support JavaScript support Library
3
- *
4
- * Author: WeaverTheme - www.weavertheme.com
5
- * @version 1.0
6
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
7
- * @author Bruce Wampler
8
- *
9
- * Notes - this library requires jQuery to be loaded
10
- * this library was cobbled together over a long period of time, so it contains a
11
- * bit of a jumble of straight JavaScript and jQuery calls. So it goes. It works.
12
- *
13
- *
14
- ************************************************************************************* */
15
-
16
-
17
- jQuery(document).ready(function($) { // self-defining function
18
- // Tabs
19
- $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
20
- $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
21
- .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
22
- });
23
- $('.wvr-tabs-pane').hide();
24
- $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
25
- $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
26
-
27
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/js/wvrx-ts-jslib.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(a){a(".wvr-tabs-nav").delegate("span:not(.wvr-tabs-current)","click",function(){a(this).addClass("wvr-tabs-current").siblings().removeClass("wvr-tabs-current").parents(".wvr-tabs").find(".wvr-tabs-pane").hide().eq(a(this).index()).show()});a(".wvr-tabs-pane").hide();a(".wvr-tabs-nav span:first-child").addClass("wvr-tabs-current");a(".wvr-tabs-panes .wvr-tabs-pane:first-child").show()});
 
3.2.1/.10/readme.txt DELETED
@@ -1,108 +0,0 @@
1
- === Weaver X Theme Support ===
2
- Plugin Name: Weaver X Theme Support
3
- Plugin URI: http://aspentheme.com/plugins/
4
- Tags: weaver x theme, shortcodes, widgets
5
- Author URI: http://weavertheme.com/about/
6
- Contributors: wpweaver
7
- Author: wpweaver
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Requires at least: 3.9
11
- Tested up to: 4.0
12
- Stable tag: 1.0
13
-
14
- A useful shortcode and widget collection for Weaver Xtreme
15
-
16
- == Description ==
17
-
18
- This is the main theme suppot for the Weaver X Theme. This plugin provides a collection of useful shortcodes and widgets designed to complement the Weaver X theme. These shortcodes have been selected and developed based on requests and feedback from thousands of users of the Weaver X, Weaver II, and Aspen themes.
19
-
20
- While these shortcodes are optimized for the Weaver X theme, they will also work with full functionality for most WordPress themes, and can be used
21
- if you switch themes.
22
-
23
- Includes complete documentation help file. Instructions for using the shortcodes and widgets are in the help file. Use it for non-Weaver Xtreme themes.
24
-
25
- = Shortcodes included =
26
-
27
- * **[tab_group]** - Display content in a tabbed box.
28
- * **[youtube]** - Show your YouTube videos responsively, and with the capability to use any of the YouTube custom display options.
29
- * **[vimeo]** - Show your Vimeo videos responsively, and with the capability to use any of the Vimeo custom display options.
30
- * **[iframe]** - Quick and easy display of content in an iframe.
31
- * **[div]**, **[span]**, **[html]** - Add div, span, and other html to pages/posts without the need to switch to Text view.
32
- * **[hide/show_if]** - Show or hide content depending upon options: device, page ID, user capability, logged in status.
33
- * **[bloginfo]** - Display any information available from WordPress bloginfo function.
34
- * **[user_can]** - Display content base on logged in user role.
35
- * **[site_title]** - Display Site title.
36
- * **[site_tagline]** - Display Site tag line.
37
-
38
- = Widgets Included =
39
-
40
- * **Weaver X 2 Column Text Widget** - Add text into two columns in a widget
41
- * **Weaver X Per Page Text Widget** - Add a text widget on a per page basis
42
- * **Weaver X Login** - Simplified login widget
43
-
44
- = Licenses =
45
-
46
- * The Weaver X Theme Support plugin is licensed under the terms of the GNU GENERAL PUBLIC LICENSE, Version 2,
47
- June 1991. (GPL) The full text of the license is in the license.txt file.
48
- * All images included with this plugin are either original works of the author which
49
- have been placed into the public domain, or have been derived from other public domain sources,
50
- and thus need no license. (This does not include the images provided with any of the
51
- below listed scripts and libraries. Those images are covered by their respective licenses.)
52
-
53
- This plugin also includes several scripts and libraries that are covered under the terms
54
- of their own licenses in the listed files in the plugin distribution:
55
-
56
-
57
-
58
- == Installation ==
59
-
60
- It is easiest to use the Plugins : Add Plugin admin page, but you can do it manually, too:
61
-
62
- 1. Download the plugin archive and expand it
63
- 2. Upload all the plugin files and directories to your wp-content/plugins/weaverx-theme-support directory
64
- 3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for this plugin.
65
-
66
- == Frequently Asked Questions ==
67
-
68
- = Where can I get support for this plugin? =
69
-
70
- Support for this plugin can best be found at our forum - http://forum.weavertheme.com
71
-
72
- == Upgrade Notice ==
73
-
74
- This is the initial release of this plugin.
75
-
76
- == ChangeLog ==
77
-
78
- = 0.10 =
79
- * Fixed per page options when used with old Xtreme Plus version
80
-
81
- = 0.9 =
82
- * Added Per Page and Per Post admin support to plugin (removed from Xtreme theme)
83
-
84
- = 0.8 =
85
- * Added [ box ]
86
-
87
- = 0.7 =
88
- * Fixes for [ show/hide_if]
89
- * Removed unused files
90
-
91
- = 0.6 =
92
- * Fixed [ show/hide_if ] for multiple conditions that include device
93
- * Changed interface to Weaver Xtreme - all codes now just in Weaver X Add-ons tab
94
-
95
- = 0.5 =
96
- * Added [ show/hide_if ], removed [ hide_mobie ], [show_if_logged_in]
97
- * Updated Doc
98
- * Added action for interface to Weaver Xtreme "Add-ons" tab
99
-
100
- = 0.4 =
101
- * Optimized loading of jslib - only needed by tab group, so not loaded until shortcode used
102
-
103
- = 0.3 =
104
- * Fixed video shortcodes
105
-
106
- = 0.1 =
107
-
108
- * initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/weaverx-ts-admin-style.css DELETED
@@ -1,133 +0,0 @@
1
- /* Weaver admin style */
2
- .hide_me {display:none;}
3
-
4
- .wvrx_ts_green {font-weight:bold;color:green;}
5
- .wvrx_ts_yellow {font-weight:bold;color:orange;}
6
- .wvrx_ts_red {font-weight:bold;color:red;}
7
-
8
- .wvr-help ul {list-style: disc; margin-left:30px;}
9
- .wvr-option-section {font-weight:bold;font-size:120%;color:blue;}
10
-
11
- .wvr-wrap {
12
- max-width:95%;
13
- }
14
-
15
- .tab ul {
16
- margin-left: 1.15em;
17
- list-style: disc outside none;
18
- }
19
- .tab ol {
20
- list-style-position:outside;
21
- margin-left: 1.4em;
22
- margin-bottom:.6em;
23
- }
24
-
25
- .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
26
-
27
- div.yetii {
28
- width: 95%;
29
- margin: 0 0 20px 0;
30
- }
31
-
32
- ul.yetii {
33
- list-style-type: none;
34
- width: 100%;
35
- float: left;
36
- border-bottom: 4px ridge #ddd;
37
- margin-bottom: 8px;
38
- }
39
-
40
- ul.yetii li {
41
- margin: 0 2px 0 0;
42
- float: left;
43
- }
44
-
45
- ul.yetii a {
46
- float: left;
47
- display: block;
48
- padding: 4px 8px;
49
- border: 1px solid #ddd;
50
- border-bottom: 0;
51
- color: #666;
52
- background: #eee;
53
- text-decoration: none;
54
- font-weight: bold;
55
- }
56
-
57
- ul.yetii a:hover {
58
- background: #fff;
59
- }
60
-
61
- ul.yetii a.active {
62
- background: #fff;
63
- border-color: #00c;
64
- color: #00f;
65
- }
66
- /* -- */
67
- div.yetiisub {
68
- width: 100%;
69
- margin: 0 0 20px 0;
70
- }
71
-
72
- ul.yetiisub {
73
- list-style-type: none;
74
- width: 100%;
75
- float: left;
76
- margin-bottom: 8px;
77
- }
78
-
79
- ul.yetiisub li {
80
- margin: 0 2px 2px 0px;
81
- float: left;
82
- }
83
-
84
- ul.yetiisub a {
85
- float: left;
86
- padding: 4px 8px;
87
- border: 1px solid #ccc;
88
- color: #666;
89
- background: #f0f0f0;
90
- text-decoration: none;
91
- font-style: italic;
92
- font-weight: bold;
93
- }
94
-
95
- ul.yetiisub a:hover {
96
- background: #fefefe !important;
97
- }
98
-
99
- ul.yetiisub a.active {
100
- background: #fff;
101
- border-color: #00c;
102
- color: #00f;
103
- }
104
- .wvr-small-submit {
105
- padding: 1.0em 0;
106
- margin: 1px 0;
107
- font-size:90%;
108
- }
109
-
110
- .wvr-option-header {background:#D0D0D8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px;}
111
- .wvr-option-subheader {background:#EAEAEA;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px;}
112
- .wvr-row-header {background:#D0D0D8;line-height:1.8em;padding-left:4px;}
113
- .wvr-row-subheader {background:#EAEAEA;padding-left:4px;}
114
- .wvr-row-subheader-alt {background:#F4F4F4;padding-left:4px;}
115
- /* layouts for layout boxes */
116
- .l_layout {display:block; width:140px; height:110px; float:left; margin-right:10px; margin-bottom:10px; display:inline;border:1px solid #888; color:black;text-align:center;font:15px arial,sans-serif;}
117
- .l_layout span {display:block;}
118
- .l_header {width:140px; height:20px; background:#CCF; line-height:20px;}
119
- .l_content {width:100px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
120
- .l_contentcenter {width:60px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
121
- .l_content2 {width:80px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
122
- .l_contentw {width:140px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
123
- .l_stdbar {width:40px; height:70px; float:left; display:inline;}
124
- .l_widebar {width:60px; height:70px; float:left; display:inline;}
125
- .l_righttop {width:40px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
126
- .l_righttopwide {width:60px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
127
- .l_rightup {width:40px; height:25px; margin:0; background:#FAA; float:left; display:inline; line-height:25px;}
128
- .l_rightright {width:40px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
129
- .l_rightdown {width:40px; height:25px; margin:0; background:#AFA; float:left; display:inline; line-height:25px;}
130
- .l_leftleft {width:40px; height:70px; margin:0; background:#AFA; float:left; display:inline; line-height:70px;}
131
- .l_leftshort {width:30px; height:50px; margin:0; background:#AFA; float:left; display:inline; line-height:50px;}
132
- .l_skinny {width:30px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
133
- .l_footer {clear:left;width:140px; height:20px; background:#DDF; color:#000; line-height:20px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/weaverx-ts-admin-style.min.css DELETED
@@ -1,4 +0,0 @@
1
- .hide_me{display:none}.wvrx_ts_green{font-weight:bold;color:green}.wvrx_ts_yellow{font-weight:bold;color:orange}.wvrx_ts_red{font-weight:bold;color:red}.wvr-help ul{list-style:disc;margin-left:30px}.wvr-option-section{font-weight:bold;font-size:120%;color:blue}.wvr-wrap{max-width:95%}.tab ul{margin-left:1.15em;list-style:disc outside none}.tab ol{list-style-position:outside;margin-left:1.4em;margin-bottom:.6em}.js_button{background:#eee!important;font-weight:600!important;color:#585858!important}div.yetii{width:95%;margin:0 0 20px 0}ul.yetii{list-style-type:none;width:100%;float:left;border-bottom:4px ridge #ddd;margin-bottom:8px}ul.yetii li{margin:0 2px 0 0;float:left}ul.yetii a{float:left;display:block;padding:4px 8px;border:1px solid #ddd;border-bottom:0;color:#666;background:#eee;text-decoration:none;font-weight:bold}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;border-color:#00c;color:#00f}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}
2
- ul.yetiisub li{margin:0 2px 2px 0;float:left}ul.yetiisub a{float:left;padding:4px 8px;border:1px solid #ccc;color:#666;background:#f0f0f0;text-decoration:none;font-style:italic;font-weight:bold}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;border-color:#00c;color:#00f}.wvr-small-submit{padding:1.0em 0;margin:1px 0;font-size:90%}.wvr-option-header{background:#d0d0d8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px}.wvr-option-subheader{background:#eaeaea;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px}.wvr-row-header{background:#d0d0d8;line-height:1.8em;padding-left:4px}.wvr-row-subheader{background:#eaeaea;padding-left:4px}.wvr-row-subheader-alt{background:#f4f4f4;padding-left:4px}.l_layout{display:block;width:140px;height:110px;float:left;margin-right:10px;margin-bottom:10px;display:inline;border:1px solid #888;color:black;text-align:center;font:15px arial,sans-serif}
3
- .l_layout span{display:block}.l_header{width:140px;height:20px;background:#CCF;line-height:20px}.l_content{width:100px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentcenter{width:60px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_content2{width:80px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentw{width:140px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_stdbar{width:40px;height:70px;float:left;display:inline}.l_widebar{width:60px;height:70px;float:left;display:inline}.l_righttop{width:40px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_righttopwide{width:60px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_rightup{width:40px;height:25px;margin:0;background:#FAA;float:left;display:inline;line-height:25px}.l_rightright{width:40px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}
4
- .l_rightdown{width:40px;height:25px;margin:0;background:#AFA;float:left;display:inline;line-height:25px}.l_leftleft{width:40px;height:70px;margin:0;background:#AFA;float:left;display:inline;line-height:70px}.l_leftshort{width:30px;height:50px;margin:0;background:#AFA;float:left;display:inline;line-height:50px}.l_skinny{width:30px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}.l_footer{clear:left;width:140px;height:20px;background:#DDF;color:#000;line-height:20px}
 
 
 
 
3.2.1/.10/weaverx-ts-style.css DELETED
@@ -1,97 +0,0 @@
1
- /*
2
- Style file for Weaver X Theme Support
3
-
4
- License: GPL
5
-
6
- Weaver X Theme Support
7
- Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
8
-
9
- This program is free software: you can redistribute it and/or modify
10
- it under the terms of the GNU General Public License as published by
11
- the Free Software Foundation, either version 3 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
-
19
- You should have received a copy of the GNU General Public License
20
- along with this program. If not, see <http://www.gnu.org/licenses/>.
21
-
22
- PLEASE - DO NOT EDIT THIS FILE
23
-
24
- If you MUST change the CSS for these shortcodes and widgets, use the
25
- Custom CSS features of Weaver X, or use a custom CSS plugin
26
- such as JetPack, which let you add CSS to your theme or plugins
27
- without modifying theme or plugin .css files.
28
- */
29
-
30
- /* rules for areas hidden in various hybrid "desktop" views */
31
-
32
- @media screen and (min-width:768px) { /* rules for desk top */
33
- .wvr-hide-desktop {display:none !important;}
34
- .wvr-hide-all {display:none !important;}
35
- .wvr-show-phone {display:none !important;}
36
- .wvr-show-mobile {display:none !important;}
37
- .wvr-show-smalltablet {display:none !important;}
38
- }
39
-
40
- @media screen and (min-width:581px) and (max-width:767px) { /* rules for small tablets */
41
- .wvr-hide-smalltablet {display:none !important;}
42
- .wvr-hide-mobile {display:none !important;}
43
- .wvr-hide-all {display:none !important;}
44
- .wvr-show-desktop {display:none !important;}
45
- .wvr-show-phone {display:none !important;}
46
- }
47
-
48
- @media screen and (max-width:580px) { /* rules for phones */
49
- .wvr-hide-phone {display:none !important;}
50
- .wvr-hide-mobile {display:none !important;}
51
- .wvr-hide-all {display:none !important;}
52
- .wvr-show-desktop {display:none !important;}
53
- .wvr-show-smalltablet {display:none !important;}
54
- }
55
-
56
- /* Tabs */
57
- .wvr-tabs {
58
- -webkit-box-sizing: border-box;
59
- -moz-box-sizing: border-box;
60
- box-sizing: border-box;
61
- margin: 0 0 1.5em 0;
62
- background:transparent;
63
- }
64
-
65
- .wvr-tabs-style .wvr-tabs-nav { /* top "bar" behind tabs */
66
- padding: 0px 20px 0px 0px;
67
- margin: 0;
68
- height: 32px;
69
- background-color: transparent;
70
- }
71
- .wvr-tabs-style .wvr-tabs-nav span { /* bg color of a tab */
72
- display: block;
73
- float: left;
74
- padding: 0 20px;
75
- height: 32px;
76
- line-height: 32px;
77
- margin-right: 5px;
78
- cursor: pointer;
79
- border-top: 1px solid #888; /* border-color */
80
- border-right: 1px solid #888;
81
- border-left: 1px solid #888;
82
- background: #ccc; /* tab-bg */
83
- border-top-left-radius:6px;
84
- border-top-right-radius:6px;
85
- }
86
-
87
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
88
- .wvr-tabs-style .wvr-tabs-nav span:hover {
89
- background: #eee; /* tab-current-color */
90
- }
91
-
92
- .wvr-tabs-style .wvr-tabs-pane {
93
- padding: 15px;
94
- border: 1px solid #888; /* border-color */
95
- min-height:20px; /* pane-min-height */
96
- background-color:transparent; /* pane-bg */
97
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/.10/weaverx-ts-style.min.css DELETED
@@ -1,2 +0,0 @@
1
- @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px}
2
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent}
 
 
3.2.1/.10/weaverx-ts.php DELETED
@@ -1,299 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Weaver X Theme Support
4
- Plugin URI: http://weavertheme.com/plugins
5
- Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
- Author: wpweaver
7
- Author URI: http://weavertheme.com/about/
8
- Version: 0.10
9
- License: GPL V3
10
-
11
- Weaver X Theme Support
12
-
13
- Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
-
30
- /* CORE FUNCTIONS
31
- */
32
-
33
- define ('WVRX_TS_VERSION','0.9');
34
- define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
35
- define ('WVRX_TS_APPEARANCE_PAGE', false );
36
-
37
- function wvrx_ts_installed() {
38
- return true;
39
- }
40
-
41
-
42
- function wvrx_ts_plugins_url($file,$ext) {
43
- return plugins_url($file,__FILE__) . $ext;
44
- }
45
-
46
- function wvrx_ts_enqueue_scripts() { // action definition
47
-
48
- if (function_exists('wvrx_ts_slider_header')) wvrx_ts_slider_header();
49
-
50
- //-- Weaver X PLus js lib - requires jQuery...
51
-
52
-
53
- // put the enqueue script in the tabs shortcode where it belongs
54
-
55
- //wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION);
56
-
57
-
58
- // add plugin CSS here, too.
59
-
60
- wp_register_style('wvrx-ts-style-sheet',wvrx_ts_plugins_url('weaverx-ts-style', WVRX_TS_MINIFY.'.css'),null,WVRX_TS_VERSION,'all');
61
- wp_enqueue_style('wvrx-ts-style-sheet');
62
- }
63
-
64
- add_action('wp_enqueue_scripts', 'wvrx_ts_enqueue_scripts' );
65
-
66
-
67
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
68
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
69
-
70
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
71
-
72
- //if (current_user_can('edit_posts')) { // allows only admin to see, also avoids loading at runtime (current_user_can not available for plugins)
73
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin
74
- //}
75
-
76
- // ======================================== subthemes ========================================
77
- add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_action');
78
-
79
- function wvrx_ts_child_show_extrathemes_action() {
80
- echo '<h3 class="atw-option-subheader">' . __('Select an Add-on Subtheme You Have Uploaded','weaver-xtreme' /*adm*/) . '</h3>';
81
- $addon_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/';
82
- $addon_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes/addon-subthemes/';
83
-
84
- $addon_list = array();
85
- if($media_dir = @opendir($addon_dir)) { // build the list of themes from directory
86
- while ($m_file = readdir($media_dir)) {
87
- $len = strlen($m_file);
88
- $base = substr($m_file,0,$len-4);
89
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
90
- if($ext == '.wxt' ) {
91
- $addon_list[] = $base;
92
- }
93
- }
94
- }
95
-
96
- if (!empty($addon_list)) {
97
- natcasesort($addon_list);
98
-
99
- $cur_addon = weaverx_getopt('wvrx_addon_name');
100
- if ($cur_addon)
101
- echo '<h3>' . __('Currently selected Add-on Subtheme: ','weaver-xtreme' /*adm*/) . ucwords(str_replace('-',' ',$cur_addon)) . '</h3>';
102
- ?>
103
- <form enctype="multipart/form-data" name='pick_added_theme' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
104
-
105
- <h4><?php _e('Select an add-on subtheme:','weaver-xtreme' /*adm*/); ?></h4>
106
-
107
- <?php
108
- foreach ($addon_list as $addon) {
109
- $name = ucwords(str_replace('-',' ',$addon));
110
- ?>
111
- <div style="float:left; width:200px;">
112
- <label><input type="radio" name="wvrx_addon_name"
113
- <?php echo 'value="' . $addon . '"' . (weaverx_getopt('wvrx_addon_name') == $addon ? 'checked' : '') .
114
- '/> <strong>' . $name . '</strong><br />
115
- <img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . $addon_url . $addon . '.jpg" width="150px" height="113px" /><label></div>' . "\n";
116
- }
117
- ?>
118
- <div style="clear:both;"></div>
119
- <br /><span class='submit'><input name="set_added_subtheme" type="submit" value="<?php _e('Set to Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span>
120
- <small style="color:#b00;"><br /><?php _e('<strong>Note:</strong> Selecting a new subtheme will change only theme related settings.
121
- Options labelled with (&diams;) will be retained.
122
- You can use the Save/Restore tab to save a copy of all your current settings first.','weaver-xtreme' /*adm*/); ?></small>
123
-
124
- <?php weaverx_nonce_field('set_added_subtheme'); ?>
125
-
126
- <br /><br /><span class='atw-small-submit' style="margin-left:100px;"><input name="delete_added_subtheme" type="submit" value="<?php _e('Delete Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span> &nbsp;
127
- <small><?php _e('This will delete the selected Add-on Subtheme from the Add-on directory','weaver-xtreme' /*adm*/); ?></small>
128
- <?php weaverx_nonce_field('delete_added_subtheme'); ?>
129
- </form>
130
- <?php
131
- } else {
132
- ?>
133
- <p><?php _e('No Add-on Subthemes available.','weaver-xtreme' /*adm*/); ?></p>
134
- <?php
135
- }
136
- echo '<h3 class="atw-option-subheader">Upload an Add-on Subtheme From Your Computer</h3>';
137
- ?>
138
- <p><?php _e('You can find additional free and premium Add-on Subthemes for <em>Weaver Xtreme</em>','weaver-xtreme' /*adm*/); ?>
139
- <a href="http://xtreme.weavertheme.com/add-on-subthemes/" title="<?php _e('Weaver Xtreme Add-on Subthemes','weaver-xtreme' /*adm*/); ?>"><strong><?php _e('HERE','weaver-xtreme' /*adm*/); ?></strong></a>.</p>
140
- <form name='form_added_theme' enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
141
- <table>
142
- <tr valign="top">
143
- <td><strong><?php _e('Select Add-on Subtheme .zip file to upload:','weaver-xtreme' /*adm*/); ?></strong>
144
- <input name="uploaded_addon" type="file" />
145
- <input type="hidden" name="uploadaddon" value="yes" />
146
- </td>
147
- </tr>
148
- <tr><td>
149
- <span style="margin-left:50px;" class='submit'>
150
- <input name="upload_addon" type="submit" value="Upload Add-on Subtheme" /><br />
151
- </span>&nbsp;<small><?php _e('<strong>Upload and Save</strong> an Add-on Subtheme or Subtheme collection from .zip file on your computer. Will be saved on your site\'s filesystem.','weaver-xtreme' /*adm*/); ?></small>
152
- </td></tr>
153
- </table>
154
- <?php weaverx_nonce_field('upload_addon'); ?>
155
- </form>
156
-
157
- <?php
158
- }
159
-
160
- add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
161
- function wvrx_ts_child_process_options() {
162
-
163
- if (weaverx_submitted('set_added_subtheme') ) { // Set to selected addon - theme
164
- if (isset($_POST['wvrx_addon_name']))
165
- {
166
- $name = $_POST['wvrx_addon_name'];
167
-
168
- $openname = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt';
169
- $contents = file_get_contents($openname);
170
-
171
- if (!weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname)) {
172
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
173
- __('Sorry, there was a problem uploading your add on theme. The name you picked did not have a valid
174
- Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','weaver-xtreme' /*adm*/) . '</em></strong></p></div>';
175
- } else {
176
- weaverx_save_msg(__('Weaver Xtreme theme reset to ','weaver-xtreme' /*adm*/) .
177
- ucwords(str_replace('-',' ',$name )) . ' add-on subtheme.');
178
- weaverx_setopt('wvrx_addon_name',$name);
179
- }
180
- }
181
- }
182
-
183
- else if (weaverx_submitted('delete_added_subtheme') ) { // Delete selected addon theme
184
- if (isset($_POST['wvrx_addon_name']))
185
- {
186
- $name = $_POST['wvrx_addon_name'];
187
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt');
188
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.jpg');
189
- weaverx_save_msg(__('Deleted ','weaver-xtreme' /*adm*/) .
190
- ucwords(str_replace('-',' ',$name )) . __(' add-on subtheme.','weaver-xtreme' /*adm*/));
191
- }
192
- }
193
-
194
- else if (weaverx_submitted('upload_addon')
195
- && isset($_POST['uploadaddon'])
196
- && $_POST['uploadaddon'] == 'yes') {
197
- // upload theme from users computer
198
- // they've supplied and uploaded a file
199
- $ok = wvrx_ts_wunpackzip('uploaded_addon', weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/');
200
- }
201
-
202
- }
203
-
204
- function wvrx_ts_wunpackzip($uploaded, $to_dir) {
205
- // upload theme from users computer
206
- // they've supplied and uploaded a file
207
- // This version and the one in Aspen Plus must be identical...
208
-
209
- $ok = true; // no errors so far
210
-
211
- if (isset($_FILES[$uploaded]['name'])) // uploaded_addon
212
- $filename = $_FILES[$uploaded]['name'];
213
- else
214
- $filename = "";
215
-
216
- if (isset($_FILES[$uploaded]['tmp_name'])) {
217
- $openname = $_FILES[$uploaded]['tmp_name'];
218
- } else {
219
- $openname = "";
220
- }
221
-
222
- //Check the file extension
223
- $check_file = strtolower($filename);
224
- $per = '.';
225
- $end = explode($per, $check_file); // workaround for PHP strict standards warning
226
- $ext_check = end($end);
227
-
228
- if (false && !weaverx_f_file_access_available()) {
229
- $errors[] = __('Sorry - Theme unable to access files.','weaver-xtreme' /*adm*/) . '<br />';
230
- $ok = false;
231
- }
232
-
233
- if ($filename == "") {
234
- $errors[] = __('You didn\'t select a file to upload.','weaver-xtreme' /*adm*/) . '<br />';
235
- $ok = false;
236
- }
237
-
238
- if ($ok && $ext_check != 'zip'){
239
- $errors[] = __("Uploaded files must have <em>.zip</em> extension.",'weaver-xtreme' /*adm*/) . "<br />";
240
- $ok = false;
241
- }
242
-
243
- if ($ok) {
244
- if (!weaverx_f_exists($openname)) {
245
- $errors[] = '<strong><em style="color:red;">' .
246
- __('Sorry, there was a problem uploading your file. You may need to check your folder permissions
247
- or other server settings.','weaver-xtreme' /*adm*/) . '</em></strong><br />' . __('Trying to use file','weaver-xtreme' /*adm*/) . "'$openname'";
248
- $ok = false;
249
- }
250
- }
251
-
252
- if ($ok) {
253
- // should be ready to go, but check out WP_Filesystem
254
- if (! WP_Filesystem()) {
255
- function wvrx_ts_wvx_return_direct() { return 'direct'; }
256
- add_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
257
- $try2 = WP_Filesystem();
258
- remove_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
259
- if (!$try2) {
260
- $errors[] = __('Sorry, there\'s a problem trying to use the WordPress unzip function. Please
261
- see the FAQ at weavertheme.com support for more information.','weaver-xtreme' /*adm*/);
262
- $ok = false;
263
- }
264
- }
265
- }
266
- if ($ok) {
267
- // $openname has uploaded .zip file to use
268
- // $filename has name of file uploaded
269
- $is_error = unzip_file( $openname, $to_dir );
270
- if ( !is_wp_error( $is_error ) ) {
271
- weaverx_save_msg(__('File ','weaver-xtreme' /*adm*/) . $filename . __(' successfully uploaded and unpacked to: <br />','weaver-xtreme' /*adm*/) . $to_dir);
272
- @unlink($openname); // delete temp file...
273
- } else {
274
- $errors[] = __("Sorry, unpacking the .zip you selected file failed. You may have a corrupt .zip file, or there many a file permissions problem on your WordPress installation.",'weaver-xtreme' /*adm*/);
275
- $errors[] = $is_error->get_error_message();
276
- $ok = false;
277
- }
278
- }
279
- if (!$ok) {
280
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' . __('ERROR','weaver-xtreme' /*adm*/) . '</em></strong></p><p>';
281
- foreach($errors as $error){
282
- echo $error.'<br />';
283
- }
284
- echo '</p></div>';
285
- }
286
- return $ok;
287
- }
288
-
289
-
290
- add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
291
- function wvrx_ts_child_saverestore_action() {
292
- echo '<h3 class="atw-option-subheader" style="font-style:italic">' . __('Use the <em>Weaver Xtreme Subthemes</em>
293
- tab to upload Add-on Subthemes.</h3><p>You can upload extra add-on subthemes you\'ve downloaded using the
294
- Subthemes tab. Note: the Save and Restore options on this page are for the custom settings you
295
- have created. These save/restore options are not related to Add-on Subthemes, although you can
296
- modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
297
- }
298
-
299
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/help/help.html DELETED
@@ -1,584 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <title>Weaver X Theme Support</title>
6
- <style type="text/css">
7
- body {
8
- background: #eeeeee;
9
- margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
10
- padding: 10px; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
11
- color: #000000;
12
- text-align: left;
13
- font-family: Verdana, Arial, Helvetica, sans-serif;
14
- font-size: 10pt;
15
- background-color: #ffd;
16
- }
17
-
18
- /* everything about each major block on the site - may be mods in some places */
19
-
20
- #container {
21
- max-width:800px;
22
- background-color: #00CC00;
23
- }
24
- #mainContent {
25
- background-color: #ffc;
26
- }
27
- .oneColFixCtr #container {
28
- max-width: 750px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
29
- background: #FFFFCD;
30
- margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
31
- border: 1px solid #000000;
32
- text-align: left; /* this overrides the text-align: center on the body element. */
33
- }
34
- .oneColFixCtr #mainContent {
35
- padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
36
- font-size:12px;
37
- }
38
- /* layouts for layout boxes */
39
- .layoutbox {
40
- width:700px;
41
- text-align:center;
42
- margin:0 25px;
43
- }
44
- .l_layout {
45
- display:block;
46
- width:140px;
47
- height:110px;
48
- float:left;
49
- margin-right:10px;
50
- margin-bottom:10px;
51
- display:inline;
52
- border:1px solid #888;
53
- color:black;
54
- text-align:center;
55
- font:15px arial, sans-serif;
56
- }
57
- .l_layout span {
58
- display:block;
59
- }
60
- .l_header {
61
- width:140px;
62
- height:20px;
63
- background:#CCF;
64
- line-height:20px;
65
- }
66
- .l_content {
67
- width:100px;
68
- height:70px;
69
- background:beige;
70
- float:left;
71
- display:inline;
72
- line-height:70px;
73
- }
74
- .l_contentcenter {
75
- width:60px;
76
- height:70px;
77
- background:beige;
78
- float:left;
79
- display:inline;
80
- line-height:70px;
81
- }
82
- .l_content2 {
83
- width:80px;
84
- height:70px;
85
- background:beige;
86
- float:left;
87
- display:inline;
88
- line-height:70px;
89
- }
90
- .l_contentw {
91
- width:140px;
92
- height:70px;
93
- background:beige;
94
- float:left;
95
- display:inline;
96
- line-height:70px;
97
- }
98
- .l_stdbar {
99
- width:40px;
100
- height:70px;
101
- float:left;
102
- display:inline;
103
- }
104
- .l_widebar {
105
- width:60px;
106
- height:70px;
107
- float:left;
108
- display:inline;
109
- }
110
- .l_righttop {
111
- width:40px;
112
- height:20px;
113
- background:#FE8;
114
- float:left;
115
- display:inline;
116
- line-height:20px;
117
- }
118
- .l_righttopwide {
119
- width:60px;
120
- height:20px;
121
- background:#FE8;
122
- float:left;
123
- display:inline;
124
- line-height:20px;
125
- }
126
- .l_rightup {
127
- width:40px;
128
- height:25px;
129
- margin:0;
130
- background:#FAA;
131
- float:left;
132
- display:inline;
133
- line-height:25px;
134
- }
135
- .l_rightright {
136
- width:40px;
137
- height:50px;
138
- margin:0;
139
- background:#FAA;
140
- float:left;
141
- display:inline;
142
- line-height:50px;
143
- }
144
- .l_rightdown {
145
- width:40px;
146
- height:25px;
147
- margin:0;
148
- background:#AFA;
149
- float:left;
150
- display:inline;
151
- line-height:25px;
152
- }
153
- .l_leftleft {
154
- width:40px;
155
- height:70px;
156
- margin:0;
157
- background:#AFA;
158
- float:left;
159
- display:inline;
160
- line-height:70px;
161
- }
162
- .l_leftshort {
163
- width:30px;
164
- height:50px;
165
- margin:0;
166
- background:#AFA;
167
- float:left;
168
- display:inline;
169
- line-height:50px;
170
- }
171
- .l_skinny {
172
- width:30px;
173
- height:50px;
174
- margin:0;
175
- background:#FAA;
176
- float:left;
177
- display:inline;
178
- line-height:50px;
179
- }
180
- .l_footer {
181
- clear:left;
182
- width:140px;
183
- height:20px;
184
- background:#DDF;
185
- color:#000;
186
- line-height:20px;
187
- }
188
- h4 {
189
- font-weight: bold;
190
- font-style:italic;
191
- color: #000066;
192
- text-decoration: underline;
193
- }
194
- h3 {
195
- font-size: medium;
196
- font-weight: bold;
197
- color: #000066;
198
- text-decoration: underline;
199
- }
200
- h2 {
201
- font-size: large;
202
- font-weight: bold;
203
- color: #000066;
204
- text-decoration: underline;
205
- margin-top: 40pt;
206
- }
207
- h1 {
208
- font-size: x-large;
209
- font-weight: bold;
210
- color: #000066;
211
- text-decoration: underline;
212
- }
213
- .codebox {
214
- font-family: "Courier New", Courier, monospace;
215
- font-size: 10px;
216
- font-style: normal;
217
- background-color: #E8E8E8;
218
- margin: 10px;
219
- padding: 4px;
220
- border: 1px solid #333333;
221
- color: #000000;
222
- width: 80%;
223
- }
224
- .attrs {
225
- font-family: Arial, Helvetica, sans-serif;
226
- font-size: 10pt;
227
- color:#000000;
228
- text-decoration: none;
229
- }
230
- .css {
231
- font-family: "Courier New", Courier, monospace;
232
- font-size: 9pt;
233
- font-style: normal;
234
- }
235
- .box {
236
- color: #000000;
237
- text-decoration: none;
238
- margin: 5px;
239
- padding: 5px;
240
- border: thin solid #000000;
241
- }
242
- .nospace {
243
- margin-top: 5px;
244
- margin-bottom: 5px;
245
- }
246
- .style3 {
247
- font-family: "Courier New", Courier, monospace
248
- }
249
- .style4 {
250
- font-family: monospace
251
- }
252
- .style6 {
253
- color: #990000;
254
- font-style: italic;
255
- }
256
- .style7 {
257
- color: #CC3300;
258
- font-weight: bold;
259
- }
260
- .code1 {
261
- font-family: "Courier New", Courier, monospace;
262
- font-size: 14px;
263
- font-style: italic;
264
- }
265
- .red-highlight {
266
- color: #CC3300;
267
- }
268
- </style>
269
- </head>
270
- <body class="oneColFixCtr">
271
- <div id="container">
272
- <div id="mainContent"> <a name="top" id="top"></a>
273
- <h2><b>Weaver X Theme Support Plugin Documentation -- Version 1.0</b></h2>
274
- <h4>Table of Contents</h4>
275
- <ul style="line-height:1.7em;">
276
- <li><a href="#summary"><strong>Plugin Summary</strong></a></li>
277
- <li><strong><a href="#admin_page">Weaver X Theme Extras Admin Page</a> </strong></li>
278
- <li><a href="#sc_summary"><strong>Shortcode Summary</strong></a></li>
279
- <ul>
280
- <li><strong><a href="#bloginfo">[bloginfo arg='name' style='your css']</a></strong></li>
281
- <li><strong><a href="#box">[box]text[/box]</a></strong></li>
282
- <li><a href="#tab_group"><strong>[tab_group] - content in tabs</strong></a></li>
283
- <li><strong><a href="#headerimage">[header_image] Shortcode</a></strong></li>
284
- <li><strong><a href="#schtml">[html]</a></strong></li>
285
- <li><strong><a href="#scdiv">[div]text[/div]</a>, <a href="#schtml">[span]text[/span]</a></strong></li>
286
- <li><strong><a href="#sciframe"> [iframe]</a></strong></li>
287
- <li><strong><a href="#scshowif">[show/hide_if]</a></strong></li>
288
- <li><strong><a href="#sitetitlesc">[site_title], [site_tagline]</a></strong></li>
289
-
290
- <li><strong><a href="#video">Video - [vimeo], [youtube]</a></strong></li>
291
- </ul>
292
- <li><a href="#widg-sum"><strong>Widget Summary</strong></a>
293
- <ul>
294
- <li><strong><a href="#widg-login">Weaver X Login Widget</a></strong></li>
295
- <li><strong><a href="#widg_pp_text">Weaver X Per Page Text</a></strong></li>
296
- <li><strong><a href="#widg_text_2">Weaver X Text 2</a></strong></li>
297
- </ul>
298
- </li>
299
- </ul>
300
- <h3><a name="summary" id="summary"></a>Plugin Summary </h3>
301
- <p>The Weaver X Theme Support Plugin provides a collection of shortcodes to allow you to easily add extra content and features to your regular content. These shortcodes will work with almost any WordPress theme. </p>
302
- <p>While these shortcodes should prove useful with most any theme, one of the goals of these shortcodes is to provide an alternative to users of the Weaver X theme.</p>
303
- <h2><a name="admin_page" id="admin_page"></a>Weaver Xtreme Theme Extras Admin Page</h2>
304
- <p>This plugin has just a few options, all found on the Weaver X Theme Support admin page under the WordPress dashboard Appearance section.</p>
305
- <h2><a name="sc_summary" id="sc_summary"></a>Shortcode Summary</h2>
306
- <h3><a name="tab_group" id="tab_group"></a>[tab_group] - content in tabs </h3>
307
- <p>Show content displayed on tabbed pages.</p>
308
- <p><strong>Shortcode usage:</strong><br />
309
- <pre>
310
- [tab_group border_color=black page_min_height=200px]
311
- [tab title='tab one']This is the content found on first tab.[/tab]
312
- [tab title='tab two']And we have more content for the second tab.[/tab]
313
- [tab title='last tab']And this is the last tab. There could be more.[/tab]
314
- [/tab_group]
315
- </pre>
316
- <h4>Short code parameters</h4>
317
- You can supply values for these parameters to control the look of the tabbed section.
318
- <br />
319
- <ul>
320
- <li><b>border_color:</b> tab and pane border color - default #888</li>
321
- <li><b>tab_bg</b>: normal bg color of tab (default #CCC)</li>
322
- <li><b>tab_selected_color</b>: color of tab when selected (default #EEE)</li>
323
- <li><b>pane_min_height</b>: min height of a pane to help make all even if needed</li>
324
- <li><b>pane_bg</b>: bg color of pane</li>
325
- </ul>
326
- </p>
327
- <h3><a name="headerimage" id="headerimage"></a><strong>[header_image]</strong></h3>
328
- <p>The <code>[header_image]</code> shortcode allows you display the current header image wherever you want.
329
- For example, you can get the header image into the Header Widget Area by using this shortcode in a text widget.
330
- The current standard or mobile header image will be displayed. Only the <code>&lt;img ... &gt;</code> is displayed --
331
- the image will not be wrapped in a link to the site.</p>
332
-
333
- <p><strong>Shortcode usage:</strong> <code>[header_image h='size' w='size' style='inline-style']</code>
334
- <br />
335
- <ol>
336
- <li><strong>w='size' h='size'</strong> - By default, no height or image properties are included with the
337
- header <code>&lt;img ... &gt;</code>, which will result in an image scaled to fit into whatever the natural
338
- width of the enclosing HTML container is (the content area, a text widget, etc.). You may specify an explicit
339
- value (usually in px) for the height and width of the image.
340
- </li>
341
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
342
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
343
- <code>style="your-rules;"</code> - using double quotation marks.
344
- </li>
345
- </ol>
346
- <h3><a name="schtml" id="schtml"></a><strong>[html]</strong></h3>
347
-
348
- <p>The Weaver X Theme Support <code>[html]</code> shortcode allows you to add arbitrary HTML to your post and page content. The
349
- main purpose of this shortcode is to get around the auto paragraph and line break and other HTML stripping functionality
350
- of the WordPress editor.</p>
351
-
352
- <p><strong>Shortcode usage:</strong> <code>[html html-tag args='parameters']</code>
353
- <br />
354
- <ol>
355
- <li><strong>html-tag</strong> - The first parameter to the shortcode must be present, and must be a standard
356
- HTML tag - <code>p</code>, <code>br</code>, or <code>span</code>, for example. You just supply the tag - no quotation
357
- marks, no '=', just the tag. The shortcode provides the &lt; and &gt;. If you need a wrapping HTML tag (e.g., <code>span</code> and <code>/span</code>), use
358
- two shortcodes:<br />
359
- <code>[html span args='style="color:red"']content to make red[html /span]</code>
360
- </li>
361
- <li><strong>args='parameters'</strong> - Allows you to specify arbitrary parameters for your HTML tag. See the example above.
362
- </li>
363
- </ol>
364
- </p>
365
-
366
- <h3><a name="scdiv" id="scdiv"></a><strong>[div]text[/div]</strong>, [span]text[/span]</h3>
367
-
368
- <p>The Weaver X Theme Support <code>[div]</code> and [span] shortcodes allow you to easily add HTML &lt;div&gt; or &lt;span&gt; tags to your post and page content. The
369
- main purpose of these shortcodes is to get around need to switch to the HTML editor view when you need to
370
- wrap your content in a &lt;div&gt; or &lt;span&gt;.</p>
371
- <p>
372
- This will work exactly like a standard HMTL &lt;div&gt;and &lt;span&gt; tags. It supports 'id', 'class',
373
- and 'style' parameters, which are the most useful. Instead of wrapping your text in &lt;div&gt; or &lt;span&gt; tags, wrap them like
374
- this (the Visual view will work just fine):<br />
375
- <code>[div style="font-size:20px;']This content will be large.[/div]</code><br />
376
- <code>[span style=&quot;font-size:20px;']This content will be large.[/span]</code></p>
377
- <p><strong>Shortcode usage:</strong> <code>[div id='class_id' class='class_name' style='style_values']text[/div]</code>
378
- <br />
379
- <code>[span id='class_id' class='class_name' style='style_values']text[/span]</code> <br />
380
- <ol>
381
- <li><strong>id='class_id' class='class_name' style='style_values'</strong> - Allows you to specify id, class, and style for the &lt;div&gt;. See the example above.
382
- </li>
383
- </ol>
384
- </p>
385
-
386
- <h3><a name="sciframe" id="sciframe"></a><strong>iframe - [iframe]</strong></h3>
387
-
388
- <p>The <code>[iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
389
- the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>
390
-
391
- <p><strong>Shortcode usage:</strong> <code>[iframe src='http://example.com' height=600 percent=100 style="style"]</code>
392
- <br />
393
- <ol>
394
- <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
395
- </li>
396
- <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
397
- </li>
398
- <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
399
- </li>
400
- <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values".
401
- </li>
402
- </ol>
403
- </p>
404
-
405
- <h3><a name="scshowif" id="scshowif"></a><strong>[show_if]content[/show_if], [hide_if]</strong>content [/hide_if]</h3>
406
- <p>The <code>[show_if]</code> and <code>[hide_if]</code> shortcodes allow you to selectively
407
- display or hide content depending if any of several conditions are met.</p>
408
-
409
- <p><strong>Shortcode usage:</strong> <code>[hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]</code>
410
- </p>
411
- <p>You bracket the content you want to selectively display with <code>[show/hide_if]</code> and closing
412
- <code>[/show/hide_if]</code> tags. That content can contain other shortcodes as needed. If you specify more than one parameter to the short code, then all the conditions must be met (logical AND). Any paramaters you don't include are considered true.</p>
413
- <h4>Parameters</h4>
414
- <p>'device' =&gt; 'default', // desktop, mobile, smalltablet, phone, all<br />
415
- 'logged_in' =&gt; 'default', // true or false<br />
416
- 'not_post_id' =&gt; 'default', // comma separated list of post IDs (includes pages, too)<br />
417
- 'post_id' =&gt; 'default', // comma separated list<br />
418
- 'user_can' =&gt; 'default' // http://codex.wordpress.org/Function_Reference/current_user_can</p>
419
- <p>
420
- <strong>device=desktop | mobile | smalltablet | phone </strong> - The device parameter for <code>[show/hide_if]</code> is designed to allow you to hide <em>or</em> show any content on any of the
421
- device sizes recognized by Weaver Xtreme (or any theme, actually): 'phone', 'smalltablet', and 'desktop', or 'mobile' for non-desktop devices. If you want to show or hide content on
422
- a specific device, you give the <span class="code1">device</span> parameter a value of desktop, mobile, smalltablet, phone, or none (e.g., <code>[show_if device=mobile]</code>). </p>
423
- <p><strong>logged_in=true | false</strong> - This will hide or display content depending if the visitor is logged into the site or not. </p>
424
- <p><strong>post_id=34,875</strong> / <strong>not_post_id=1,2,3 </strong>- This will display (or not display) the content depending if the current page or single post view is included in the comma separated list of WordPress page/post IDs. You can use both to refine a list of pages or posts to display or not display. Note that even though the parameter is called 'post_id', it applies equally to pages and posts. Depending on where you use the shortcode, it will apply to a post differently depending if it is on a blog or single page view of a post. Note that the default WordPress blog (as opposed to the Weaver Xtreme Page with Posts template) does not have a post_ID.</p>
425
- <p><strong>user_can=user-capability</strong> - This will show or hide depending if the current visitor has certain WordPress user capabilities. There are many capabilities which are defined in the <a href="http://codex.wordpress.org/Function_Reference/current_user_can" target="_blank">WordPress Codex</a>. This shortcode supports any of the listed capabilities for maximum flexibility. If you don't want to learn about all the capabilities listed in the Codex, you can use the following capability values to determine if the visitor has a specific role (as defined on the Dashboard Users admin pages). For example:<br />
426
- <br />
427
- <span class="code1">[show_if user_can=publish_pages]content for Editors and above[/show_if]</span><br />
428
- <br />
429
- Note that the higher roles have all the capabilities of the lower roles - an Editor can do everything a Contributor can.</p>
430
- <table width="80%" border="1">
431
- <caption>
432
- Capabilities to Specify Role
433
- </caption>
434
- <tr>
435
- <th scope="col">Role</th>
436
- <th scope="col">Capability</th>
437
- </tr>
438
- <tr>
439
- <td>Subscriber</td>
440
- <td>read</td>
441
- </tr>
442
- <tr>
443
- <td>Contributor</td>
444
- <td>edit_posts</td>
445
- </tr>
446
- <tr>
447
- <td>Author</td>
448
- <td>publish_posts</td>
449
- </tr>
450
- <tr>
451
- <td>Editor</td>
452
- <td>publish_pages</td>
453
- </tr>
454
- <tr>
455
- <td>Administrator</td>
456
- <td>manage_options</td>
457
- </tr>
458
- <tr>
459
- <td>Super Administrator (MultiSite)</td>
460
- <td>manage_network</td>
461
- </tr>
462
- </table>
463
- <p>&nbsp;</p>
464
- <h3><a name="sitetitlesc" id="sitetitlesc"></a><strong>[site_title style="style" matchtheme=false], [site_tagline style="style" matchtheme=false]</strong></h3>
465
-
466
- <p>The <code>[site_title]</code> and <code>[site_tagline]</code> shortcodes allow you display the current
467
- site title and site tagline. This can be useful in a text widget in the Header Widget Area, for example.</p>
468
- <p><em>Note:</em> If you want to position the content of a text widget within the a cell of the Header Widget Area, you could use the following
469
- example:</p>
470
- <p><code>[site_title style='font-size:150%;position:absolute;padding-left:20px;padding-top:30px;']</code></p>
471
-
472
- <p><strong>Shortcode usage:</strong> <code>[site_title style='inline-style' matchtheme=false] [site_tagline style='inline-style' matchtheme=false]</code>
473
- <br />
474
- <ol>
475
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
476
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
477
- <code>style="your-rules;"</code> - using double quotation marks.
478
- </li>
479
- <li><strong>matchtheme=true</strong> - Allows you to add match the theme styling as defined in the site header if set to true.
480
- This will match the color/style/font of the header version of the site title and tagline with the exception of hide settings.
481
- The shortcode version will not be hidden on any device unless you also wrap the shortcode with a [show_if/hide_if] shortcode.
482
- </li>
483
-
484
- </ol>
485
-
486
- <h3><a name="bloginfo" id="bloginfo"></a><strong>[bloginfo arg='name' style='your css']</strong></h3>
487
-
488
- <p>This shortcode can be used to access the WordPress function 'get_bloginfo($arg)'. This will return a number of useful
489
- strings depending on the value. All the supported values are listed at http://codex.wordpress.org/Function_Reference/get_bloginfo.
490
- Some useful values include 'stylesheet_directory' and 'template_directory'. You can wrap the bloginfo output with css added to a &lt;span style=&quot;your css&quot;&gt;.
491
- </p>
492
-
493
- <h3><a name="box" id="box"></a><strong>[box]text[/box]</strong></h3>
494
-
495
- <p>
496
- Wrap content in a box.</p>
497
- <p><strong>Shortcode Usage:</strong> <code>[box align=left background=#fff border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules']text[/box]</code></p>
498
- <ol>
499
- <li><strong>align=align</strong>: Leave blank, or specify left, center, or right for alignment of box within surrounding text.</li>
500
- <li><strong>border=true</strong>: True is default. Specify false or 0 for no borders.</li>
501
- <li><strong>border_rule='1px solid black</strong>': Specify a compound border CSS value to replace the default '1px solid black'.</li>
502
- <li><strong>border_radius=4</strong>: Default is none - specify a px value for the corner radius if you want rounded corners.</li>
503
- <li><strong>color=#000</strong>: Default is inherit - specify a valid color for the color of the text in the box.</li>
504
- <li><strong>background=#fff</strong>: Default is inherit - specify color for box background color.</li>
505
- <li><strong>margin=1</strong>: Default is 0 - specify an 'em' value for margin around the box. Using a margin overrides align parameter.</li>
506
- <li><strong>padding=1</strong>: Default 1 - specify an 'em' value for padding inside box.</li>
507
- <li><strong>shadow=0</strong>: Default 0 - specify a value from 1 to 5 for a border around the box.</li>
508
- <li><strong>style=inline-style</strong>: any additional custom styling for the box</li>
509
- <li><strong>width=100</strong>: A percentage width for the box within its surrounding container.</li>
510
- </ol>
511
- <h3><a name="video" id="video"></a><strong>Video - [vimeo], [youtube]</strong></h3>
512
- <p>Weaver X Theme Support supports specialized shortcodes to display video. While there are other ways to embed video, the Weaver X Theme Support versions have two important features. First, they will auto adjust to the width of your content, <em><strong>including</strong></em> the mobile view. Second, they use the latest iframe/HTML5 interface provided by YouTube and Vimeo.</p>
513
- <p><strong>Specifying Video Display Size for both shortcodes</strong></p>
514
- <p>Weaver X Theme Support supports a common set of options for both the YouTube and Vimeo shortcodes to support displaying your videos with a specific width and correct height. By default, your videos will be displayed using the full width of the content area being used (percent=100). The percent= parameter is used to specify the width you want.</p>
515
- <p>The height of the video is automatically determined based on the width and the display ratio of the particular video. </p>
516
- <p>Finally, you may specify if the video should be centered or no within the display area using &quot;center=0&quot; to not center (centering is on by default).</p>
517
- <p>Note - if you want to display more than one video horizontally, use &quot;center=0&quot; and specify an appropriate percentage to fit all the videos.</p>
518
- <p>Parameters in Common</p>
519
- <ul>
520
- <li>percent=100 - By default, the video will be sized to fill the full content space. You can use the percent value to make
521
- the video use a percentage of the content space (but mobile will always use full width).</li>
522
- <li>center=1 - Specify 'center=0' to disable centering of the video.</li>
523
- <li>sd=0 - By default, Weaver X Theme Support will generate sizes for HD/widescreen videos. To display old 4:3 standard definition videos, include 'sd=1' in the shortcode.</li>
524
- </ul>
525
- <h4>Vimeo</h4>
526
- <pre><strong>[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex
527
- autoplay=0 loop=0 portrait=1 title=1 byline=1]
528
- </strong></pre>
529
- <p>This will display Vimeo videos. At the minimum, you can provide the standard http://vimeo.com/nnnnn link, or just the video ID number (which is part of the Vimeo Link). The other Vimeo specific options include:</p>
530
- <ul>
531
- <li>color - You can optionally specify a Vimeo color theme using 6 hex digits for a color value.</li>
532
- <li>autoplay - Add 'autoplay=1' to have the video autoplay.</li>
533
- <li>loop - Add 'loop=1' to have the video loop.</li>
534
- <li>portrait, title, byline - You can specify a value '=0' for these to hide the display of the corresponding element on the Vimeo player.
535
- Portrait is the avatar/icon, title is the video title, and byline is source attribution.<br />
536
- </li>
537
- </ul>
538
- <h4>YouTube</h4>
539
- <code><strong>[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=1 https=0 privacy=0 {youtube options}]
540
- </strong></code>
541
- <p>This will display YouTube videos. At the minimum, you can provide the standard http://youtu.be/xxxxxx share link (including the options YouTube lets you specify), the long format share link, or just the video ID number using the id=videoid parameter (which is part of the YouTube Link). The other YouTube specific options include:</p>
542
- <ul>
543
- <li>rel - If you specify 'rel=0', YouTube won't show related videos after the video plays.</li>
544
- <li>https - If you specify 'https=1', YouTube will use the https protocol.</li>
545
- <li>privacy - If you specify 'privacy=1', YouTube won't used cookies to track your viewing.</li>
546
- </ul>
547
- <p>In addition to the above [youtube] options, the shortcode also supports most standard YouTube options. These are more fully described on the <a href="http://code.google.com/apis/youtube/player_parameters.html" target="_blank">YouTube Embedded Player Parameters</a> page.</p>
548
- <p>The supported options, with Weaver X Theme Support's default values include:</p>
549
- <p>'autohide' = '1' . . . . . . 0: always show controls; 1: autohide controls; 2: autohide progress bar<br />
550
- 'autoplay' = '0' . . . . . . 1: auto play; 0: don't<br />
551
- 'border' = '0' . . . . . . . . 0: no border; 1: border using color1 and color2 (don't seem to work)<br />
552
- 'color' = not set . . . . . . progress bar color - red or white<br />
553
- 'color1' = not set . . . . . RGB hex value for border color<br />
554
- 'color2' = not set . . . . . RGB hex value for control bar bg<br />
555
- 'controls' = '1' . . . . . . . 0: hide player controls<br />
556
- 'disablekb' = '0' . . . . . . 1: disable keyboard controls<br />
557
- 'egm' ='0' . . . . . . . . . . . 1: enable &quot;Enhanced Genie Menu&quot;<br />
558
- 'hd' = '0' . . . . . . . . . . . . 1: enable HD playback by default<br />
559
- 'iv_load_policy' = '1' . . . 1: show annotations; 3: don't show; 2: discontinued support<br />
560
- 'loop' = '0' . . . . . . . . . . . 1: loop video<br />
561
- 'modestbranding' = '0' . .1: hide YouTube logo - will still show label in upper right corner<br />
562
- 'origin' = not set . . . . . . . See YouTube docs<br />
563
- 'playlist' = not set . . . . . . Comma separated list of videoIDs to play (id/url video played 1st)<br />
564
- 'showinfo' = '1' . . . . . . . 0: hide video title<br />
565
- 'showsearch' = '1' . . . . . 0: hide video searchbox<br />
566
- 'start' = not set . . . . . . . start vide this number of seconds from start<br />
567
- 'theme' = 'dark' . . . . . . . dark or light - display theme for player<br />
568
- 'wmode' = 'transparent' . Keeps video behind menu bars, etc. Other values available - see YouTube</p>
569
- <h2><a name="widg-sum" id="widg-sum"></a>Widget Summary</h2>
570
- <h3><a name="widg-login" id="widg-login"></a>Weaver X Login Widget</h3>
571
- <p>This simple widget shows a login in link, or a welcome, Site Admin, and Log out choice if the user is logged in.</p>
572
- <h3><a name="widg_pp_text" id="widg_pp_text"></a>Weaver X Per Page Text</h3>
573
- <p>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>if you want a title, and define Custom Field<em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text, HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)</p>
574
- <h3><a name="widg_text_2" id="widg_text_2"></a>Weaver X Text 2</h3>
575
- <p>This widget lets you add two columns of text. It is most useful in wide widget areas such as a content top or bottom widget area, or a wide footer widget area.</p>
576
- <p>&nbsp;</p>
577
- <h2><br />
578
- </h2>
579
- <p>The Weaver X Theme Support Plugin and this document are &copy; 2014, Bruce E. Wampler. <a ref="http://weavertheme.com">Web Site - WeaverTheme.com</a></p>
580
-
581
- </div>
582
- </div>
583
- </body>
584
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,594 +0,0 @@
1
- <?php
2
- /* Display per page and per post options.
3
- *
4
- * __ added - 12/10/14
5
- *
6
- * IMPORTANT! - this code and the Weaver Plus plugin need to be maintained in parallel!
7
- */
8
-
9
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
10
- // Admin panel that gets added to the page edit page for per page options
11
-
12
-
13
- if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
14
-
15
- function wvrx_ts_isp_true($val) {
16
- if ($val) return true;
17
- return false;
18
- }
19
-
20
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
21
- global $post;
22
- ?>
23
- <div style="float:left;width:<?php echo $width; ?>%"><label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
24
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> />
25
- <?php echo($msg . '</label></div>');
26
- for ($i = 0 ; $i < $br ; $i++)
27
- echo '<br class="page_checkbox" style="clear:both;" />';
28
- }
29
-
30
- function wvrx_ts_page_layout( $page = 'page' ) {
31
-
32
- if ( $page == 'page')
33
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaver-xtreme' /*adm*/);
34
- else
35
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaver-xtreme' /*adm*/);
36
-
37
- $opts = array( 'id' => '_pp_page_layout',
38
- 'info' => $msg,
39
- 'value' => array(
40
- array('val' => '', 'desc' => __('Use Default','weaver-xtreme' /*adm*/) ),
41
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaver-xtreme' /*adm*/) ),
42
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaver-xtreme' /*adm*/) ),
43
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaver-xtreme' /*adm*/) ),
44
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaver-xtreme' /*adm*/) ),
45
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaver-xtreme' /*adm*/) ),
46
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaver-xtreme' /*adm*/) ),
47
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaver-xtreme' /*adm*/) )
48
- ));
49
- wvrx_ts_pp_select_id($opts);
50
- }
51
- //--
52
-
53
-
54
-
55
- function wvrx_ts_pp_replacement( $desc, $id ) {
56
- global $post;
57
- global $wp_registered_sidebars;
58
-
59
- $id = '_' . $id;
60
-
61
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
62
-
63
-
64
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
65
- $area_name = $value['id']; //sanitize_title($value['name']);
66
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
67
- echo ' <option value="' . $area_name . '"';
68
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
69
- echo '>' . substr($area_name,9) . "</option>\n";
70
-
71
- }
72
- }
73
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
74
- }
75
- //--
76
-
77
-
78
- function wvrx_ts_pp_select_id( $value ) {
79
- global $post;
80
-
81
- if ( isset( $value['name'] ) && $value['name'] != '' )
82
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
83
-
84
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
85
-
86
- foreach ($value['value'] as $option) {
87
- if ( $option['val'] == '' ) {
88
- echo '<option value="">';
89
- } else {
90
- echo ' <option value="' . $option['val'] . '"';
91
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
92
- echo ">";
93
- }
94
- echo $option['desc'] . "</option>\n";
95
- }
96
- echo '</select>&nbsp;' . $value['info'] . "\n";
97
- }
98
- //--
99
-
100
-
101
-
102
- function wvrx_ts_pwp_atw_show_post_filter() {
103
- // use plugin options...
104
- global $post;
105
-
106
- if ( function_exists( 'atw_showposts_installed' ) ) {
107
- $filters = atw_posts_getopt('filters');
108
-
109
- $first = true;
110
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
111
- foreach ($filters as $filter => $val) { // display dropdown of available filters
112
- if ( $first ) {
113
- $first = false;
114
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
115
- } else {
116
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
117
- }
118
- }
119
- echo '</select>&nbsp;' .
120
- __('Use a Filter from <em>ATW Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaver-xtreme' /*adm*/) .
121
- '<br /> <span style="margin-left:8em;"><span>' .
122
- __('(Note: ATW Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts using this filter.)','weaver-xtreme' /*adm*/) .
123
- '<br />' . '<br />';
124
- } else {
125
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaver-xtreme' /*adm*/); ?>
126
- <br /><br />
127
- <?php }
128
- }
129
- //--
130
-
131
-
132
-
133
- function wvrx_ts_pwp_type() {
134
- $opts = array( 'name' => __('Display posts as:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
135
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaver-xtreme' /*adm*/),
136
- 'value' => array(
137
- array('val' => '', 'desc' => '&nbsp;' ),
138
- array('val' => 'full', 'desc' => __('Full post','weaver-xtreme' /*adm*/) ),
139
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaver-xtreme' /*adm*/) ),
140
- array('val' => 'title', 'desc' => __('Title only','weaver-xtreme' /*adm*/) ),
141
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaver-xtreme' /*adm*/) )
142
- ));
143
- wvrx_ts_pp_select_id($opts);
144
- }
145
-
146
-
147
- function wvrx_ts_pwp_cols() {
148
-
149
- $opts = array( 'name' => __('Display post columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
150
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaver-xtreme' /*adm*/),
151
- 'value' => array(
152
- array('val' => '', 'desc' => '&nbsp;'),
153
- array('val' => '1', 'desc' => __('One Column','weaver-xtreme' /*adm*/) ),
154
- array('val' => '2', 'desc' => __('Two Columns','weaver-xtreme' /*adm*/) ),
155
- array('val' => '3', 'desc' => __('Three Columns','weaver-xtreme' /*adm*/) ) )
156
- );
157
- wvrx_ts_pp_select_id($opts);
158
-
159
- weaverx_html_br();
160
-
161
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_pwp_masonry',
162
- 'info' => __('Use <em>Masonry</em> for multi-column display','weaver-xtreme' /*adm*/),
163
- 'value' => array(
164
- array('val' => '', 'desc' => '&nbsp;' ),
165
- array('val' => '1', 'desc' => __('One Column','weaver-xtreme' /*adm*/) ),
166
- array('val' => '2', 'desc' => __('Two Columns','weaver-xtreme' /*adm*/) ),
167
- array('val' => '3', 'desc' => __('Three Columns','weaver-xtreme' /*adm*/) ),
168
- array('val' => '4', 'desc' => __('Four Columns','weaver-xtreme' /*adm*/) ),
169
- array('val' => '5', 'desc' => __('Five Columns','weaver-xtreme' /*adm*/) ) )
170
- );
171
- wvrx_ts_pp_select_id($opts2);
172
-
173
- ?>
174
- <br />
175
- <?php
176
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaver-xtreme' /*adm*/),90,1);
177
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaver-xtreme' /*adm*/),90,1);
178
- }
179
-
180
- function wvrx_ts_page_extras() {
181
- global $post;
182
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
183
-
184
- if ( !( current_user_can('edit_themes')
185
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
186
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
187
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
188
- ) {
189
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
190
- echo '<p>' .
191
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaver-xtreme' /*adm*/) .
192
- '</p>';
193
- else
194
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
195
- return; // don't show per post panel
196
- }
197
-
198
- echo("<div style=\"line-height:150%;\"><p>\n");
199
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
200
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
201
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaver-xtreme' /*adm*/); ?>
202
- </div><br />
203
- <?php
204
- }
205
-
206
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
207
- <div style="padding:2px; border:2px solid red; background:#FAA;">
208
- <?php _e('<strong>WARNING!</strong>
209
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
210
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
211
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
212
- If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
213
- including the option of using the Page with Posts page template,
214
- then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
215
- the <em></em>&mdash; Select &mdash;</em> default value.','weaver-xtreme' /*adm*/); ?>
216
- </div><br />
217
- <?php
218
- return;
219
- }
220
- echo '<strong>' . __('Page Templates','weaver-xtreme' /*adm*/) . '</strong>';
221
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaver-xtreme' /*adm*/));
222
- echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
223
- weaverx_html_br();
224
- _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaver-xtreme' /*adm*/);
225
- weaverx_html_br();
226
- echo '<strong>' . __('Per Page Options','weaver-xtreme' /*adm*/) . '</strong>';
227
- weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaver-xtreme' /*adm*/));
228
- weaverx_html_br();
229
- _e('These settings let you hide various elements on a per page basis.','weaver-xtreme' /*adm*/);
230
- weaverx_html_br();
231
-
232
-
233
- wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaver-xtreme' /*adm*/));
234
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaver-xtreme' /*adm*/));
235
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaver-xtreme' /*adm*/), 33, 1);
236
-
237
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaver-xtreme' /*adm*/));
238
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaver-xtreme' /*adm*/));
239
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaver-xtreme' /*adm*/),33,1);
240
-
241
-
242
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaver-xtreme' /*adm*/),33,2);
243
-
244
- _e('<em>Note:</em> the following options work with the default menu - not custom menus.','weaver-xtreme' /*adm*/);
245
- weaverx_html_br();
246
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaver-xtreme' /*adm*/),90,1);
247
-
248
-
249
- wvrx_ts_page_checkbox('_pp_stay_on_page',__('Menu "Placeholder" page. Useful for top-level menu item - don\'t go anywhere when menu item is clicked.','weaver-xtreme' /*adm*/),90,2);
250
-
251
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90,1);
252
-
253
- if (weaverx_allow_multisite()) {
254
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90,1);
255
- }
256
-
257
- ?>
258
- <p><strong><?php _e('Sidebars &amp; Widgets','weaver-xtreme' /*adm*/); ?></strong></p>
259
-
260
- <?php
261
- wvrx_ts_page_layout();
262
- ?>
263
- <br />
264
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
265
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
266
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaver-xtreme' /*adm*/); ?> <br /><br />
267
- <?php
268
-
269
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaver-xtreme' /*adm*/),40);
270
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaver-xtreme' /*adm*/),40,1);
271
-
272
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaver-xtreme' /*adm*/),40);
273
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaver-xtreme' /*adm*/),40,1);
274
-
275
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaver-xtreme' /*adm*/),40);
276
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaver-xtreme' /*adm*/),40,1);
277
-
278
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaver-xtreme' /*adm*/),40);
279
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaver-xtreme' /*adm*/),40,1);
280
- ?>
281
-
282
- <p><strong><?php _e('Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
283
- <p>
284
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
285
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
286
- </p>
287
- <?php
288
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
289
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
290
-
291
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
292
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
293
-
294
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-top-widget-area' );
295
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-bottom-widget-area' );
296
-
297
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaver-xtreme' /*adm*/) , 'page-top-widget-area' );
298
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaver-xtreme' /*adm*/) , 'page-bottom-widget-area' );
299
- ?>
300
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
301
- <?php
302
- $opts3 = array( 'id' => '_pp_fi_location',
303
- 'info' => __('How to display Page FI on this page','weaver-xtreme' /*adm*/),
304
- 'value' => array(
305
- array('val' => '', 'desc' => __('Default Page FI','weaver-xtreme' /*adm*/) ),
306
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
307
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
308
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
309
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
310
- array('val' => 'hide', 'desc' => __('Hide FI on this Page','weaver-xtreme' /*adm*/) )
311
- )
312
- );
313
- wvrx_ts_pp_select_id($opts3);
314
- ?>
315
- <br />
316
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
317
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
318
- <?php _e('<em>Featured Image Link</em> - Full URL for link from FI','weaver-xtreme' /*adm*/); ?>
319
- <br style="clear:both;" />
320
- <hr />
321
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
322
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
323
-
324
- <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaver-xtreme' /*adm*/); ?>
325
- <br />
326
- </p>
327
- <p>
328
- <?php _e('<strong>Settings for "Page with Posts" Template</strong>','weaver-xtreme' /*adm*/);
329
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaver-xtreme' /*adm*/) );
330
-
331
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
332
- if ($template == 'paget-posts.php') {
333
- ?>
334
- <br />
335
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
336
- The settings will be combined for the final filtered list of posts displayed.
337
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
338
- <br />
339
-
340
- <input type="text" size="30" id="_pp_category" name="_pp_category"
341
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
342
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaver-xtreme' /*adm*/); ?>
343
- <br />
344
-
345
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
346
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
347
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaver-xtreme' /*adm*/); ?> <br />
348
-
349
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
350
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
351
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display.",'weaver-xtreme' /*adm*/); ?> <br />
352
-
353
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
354
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
355
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaver-xtreme' /*adm*/); ?> <br />
356
-
357
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
358
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
359
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaver-xtreme' /*adm*/); ?> <br />
360
-
361
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
362
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
363
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaver-xtreme' /*adm*/); ?> <br />
364
-
365
- <input type="text" size="30" id="_pp_author" name="_pp_author"
366
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
367
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaver-xtreme' /*adm*/); ?> <br />
368
-
369
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
370
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
371
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaver-xtreme' /*adm*/); ?> <br />
372
-
373
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
374
-
375
- <?php wvrx_ts_pwp_type(); ?><br />
376
- <?php wvrx_ts_pwp_cols(); ?><br />
377
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
378
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
379
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaver-xtreme' /*adm*/); ?>
380
- <br />
381
-
382
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
383
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
384
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
385
- __("Hide first \"n\" posts</em> - Start with post n+1.
386
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaver-xtreme' /*adm*/) ; ?>
387
-
388
- <br /><br />
389
-
390
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaver-xtreme' /*adm*/), 40); ?>
391
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaver-xtreme' /*adm*/), 40, 1); ?>
392
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaver-xtreme' /*adm*/), 40); ?>
393
- </p>
394
- <?php
395
- } else { // NOT a page with posts
396
- ?> <p>
397
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
398
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
399
- settings for "Page with Posts" will be displayed here. Current page template:','weaver-xtreme' /*adm*/); ?>
400
- <?php echo $template; ?>
401
- </p>
402
- <?php
403
- }
404
- do_action('weaverxplus_add_per_page');
405
- ?>
406
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
407
- </div>
408
- <?php
409
- }
410
-
411
- function wvrx_ts_post_extras() {
412
- global $post;
413
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
414
- if ( !( current_user_can('edit_themes')
415
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
416
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
417
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
418
- ) {
419
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
420
- return; // don't show per post panel
421
- }
422
- ?>
423
- <div style="line-height:150%;">
424
- <p>
425
- <?php
426
- echo '<strong>' . __('Per Post Options','weaver-xtreme' /*adm*/) . '</strong>';
427
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaver-xtreme' /*adm*/));
428
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
429
- weaverx_html_br();
430
- _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.','weaver-xtreme' /*adm*/);
431
- weaverx_html_br();
432
-
433
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaver-xtreme' /*adm*/), 40);
434
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaver-xtreme' /*adm*/),55,1);
435
-
436
-
437
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaver-xtreme' /*adm*/),40);
438
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaver-xtreme' /*adm*/), 40, 1);
439
-
440
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaver-xtreme' /*adm*/),40);
441
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaver-xtreme' /*adm*/),40,1);
442
-
443
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaver-xtreme' /*adm*/),40);
444
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaver-xtreme' /*adm*/),40,1);
445
- wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaver-xtreme' /*adm*/),90,1);
446
-
447
- wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaver-xtreme' /*adm*/),90);
448
-
449
-
450
- echo('<br style="clear:both;"/><br /><strong>Per Post Style</strong>' /*a*/ );
451
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaver-xtreme' /*adm*/ ));
452
- echo '<br />' .
453
- __('Enter optional per post CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
454
- Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
455
- (e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme' /*adm*/); ?>
456
- <br />
457
- <textarea name="_pp_post_styles" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_styles", true)); ?></textarea>
458
- <br />
459
- <br />
460
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
461
-
462
- <?php
463
- wvrx_ts_page_layout('post');
464
- ?>
465
- <br />
466
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
467
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
468
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaver-xtreme' /*adm*/); ?> <br /><br />
469
- <?php
470
-
471
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaver-xtreme' /*adm*/),40);
472
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaver-xtreme' /*adm*/),40,1);
473
-
474
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaver-xtreme' /*adm*/),40);
475
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
476
-
477
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaver-xtreme' /*adm*/),40);
478
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
479
-
480
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaver-xtreme' /*adm*/),40);
481
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaver-xtreme' /*adm*/),40,1);
482
- ?>
483
- </p>
484
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
485
- <p>
486
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
487
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
488
- </p>
489
- <?php
490
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
491
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
492
-
493
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
494
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
495
-
496
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
497
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
498
- ?>
499
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
500
- <?php
501
- $opts3 = array( 'id' => '_pp_fi_location',
502
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaver-xtreme' /*adm*/),
503
- 'value' => array(
504
- array('val' => '', 'desc' => __('Default Single Page FI','weaver-xtreme' /*adm*/) ),
505
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
506
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
507
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
508
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
509
- array('val' => 'post-before', 'desc' => __('Outside of Post','weaver-xtreme' /*adm*/) ),
510
- array('val' => 'hide', 'desc' => __('Hide FI on Single Page','weaver-xtreme' /*adm*/) )
511
- )
512
- );
513
- wvrx_ts_pp_select_id($opts3);
514
- ?>
515
- <br />
516
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
517
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
518
- <?php _e("<em>Featured Image Link</em> - Full URL for link from FI",'weaver-xtreme' /*adm*/); ?>
519
- <br style="clear:both;" />
520
- </p><p>
521
- <strong><?php _e('Post Editor Options','weaver-xtreme' /*adm*/); ?></strong>
522
-
523
- <?php
524
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90, 1);
525
-
526
- if (weaverx_allow_multisite()) {
527
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90, 1);
528
- }
529
- ?>
530
- </p>
531
- <p>
532
- <?php echo('<strong>Post Format</strong>');
533
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaver-xtreme' /*adm*/));
534
- weaverx_html_br();
535
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info.','weaver-xtreme' /*adm*/);
536
- weaverx_html_br();
537
- weaverx_html_br();
538
-
539
- do_action('weaverxplus_add_per_post'); ?>
540
- </p>
541
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
542
- </div>
543
- <?php
544
- }
545
-
546
-
547
- function wvrx_ts_save_post_fields($post_id) {
548
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
549
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
550
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
551
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
552
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
553
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
554
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
555
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
556
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
557
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
558
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
559
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
560
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
561
- );
562
-
563
- if (weaverx_allow_multisite()) {
564
- array_push($default_post_fields, '_pp_raw_html');
565
- }
566
-
567
- $all_post_fields = $default_post_fields;
568
-
569
- if (isset($_POST['post_meta'])) {
570
- foreach ($all_post_fields as $post_field) {
571
- if (isset($_POST[$post_field])) {
572
- $data = $_POST[$post_field];
573
- if ( $post_field != '_pp_post_styles')
574
- $data = stripslashes($data); // passed via post, so strip slashes
575
-
576
- if (get_post_meta($post_id, $post_field) == '') {
577
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
578
- }
579
- else if ($data != get_post_meta($post_id, $post_field, true)) {
580
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
581
- } else if ($data == '') {
582
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
583
- }
584
- } else {
585
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
586
- }
587
- }
588
- }
589
- }
590
-
591
- add_action("save_post", "wvrx_ts_save_post_fields");
592
- add_action("publish_post", "wvrx_ts_save_post_fields");
593
- }
594
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/includes/wvrx-ts-runtime-lib.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
-
6
- function wvrx_ts_help_link($ref, $label) {
7
-
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
- }
13
-
14
-
15
- // =============================== options =============================
16
-
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
-
19
-
20
- // Interface to Weaver Xtreme
21
-
22
- function wvrx_ts_fix_short($prefix, $msg ) {
23
- if ( $prefix ) {
24
- $m = str_replace('[/', '////', $msg);
25
- $m = str_replace('[', '[' . $prefix, $m);
26
- echo str_replace('////', '[/' . $prefix, $m);
27
- }
28
- else
29
- echo $msg;
30
- }
31
-
32
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
33
- function wvrx_ts_theme_support_addon() {
34
- ?>
35
- <div class="a-plus">
36
- <p><strong style="font-size:110%;"><?php _e('You have Weaver Xtreme Theme Support installed.','weaver-xtreme' /*adm*/); ?></strong><br />
37
- <?php _e('This section shows the shortcodes and widgets available with Weaver X Theme Support.
38
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaver-xtreme' /*adm*/); ?></p>
39
-
40
- <?php
41
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
42
- if ( $prefix )
43
- echo '<h3 style="color:red;">' . __("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme') . '</h3>';
44
- ?>
45
-
46
- <h3><?php _e('Shortcodes','weaver-xtreme' /*adm*/); ?></h3>
47
- <ul>
48
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaver-xtreme' /*adm*/)); ?>
49
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaver-xtreme' /*adm*/));?><br />
50
- <code><?php wvrx_ts_fix_short($prefix, __("[bloginfo name='WP bloginfo name' style='style-rules']",'weaver-xtreme' /*adm*/)); ?></code>
51
- </li>
52
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Box - [box]</span> - Display content in a Box','weaver-xtreme' /*adm*/)); ?>
53
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaver-xtreme' /*adm*/));?><br />
54
- <code><?php wvrx_ts_fix_short($prefix, __("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaver-xtreme' /*adm*/)); ?></code>
55
- </li>
56
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaver-xtreme' /*adm*/)); ?>
57
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaver-xtreme' /*adm*/));?><br />
58
- <code><?php wvrx_ts_fix_short($prefix, __("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaver-xtreme' /*adm*/)); ?></code>
59
- </li>
60
- <li<?php wvrx_ts_fix_short($prefix, __('><span class="wvr-blue">Header Image - [header_image]</span> - Display default header image','weaver-xtreme' /*adm*/)); ?>
61
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaver-xtreme' /*adm*/));?><br />
62
- <code><?php wvrx_ts_fix_short($prefix, __("[header_image h='size' w='size' style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
63
- </li>
64
-
65
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaver-xtreme' /*adm*/)); ?>
66
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaver-xtreme' /*adm*/));?><br />
67
- <code><?php wvrx_ts_fix_short($prefix, __("[html html-tag args='parameters']",'weaver-xtreme' /*adm*/)); ?></code>
68
- </li>
69
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaver-xtreme' /*adm*/)); ?>
70
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaver-xtreme' /*adm*/));?><br />
71
- <code><?php wvrx_ts_fix_short($prefix, __("[iframe src='http://example.com' height=600 percent=100 style='style']",'weaver-xtreme' /*adm*/)); ?></code>
72
- </li>
73
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Login - [login]</span> - Show simple Login/Logout link','weaver-xtreme' /*adm*/)); ?>
74
- <?php wvrx_ts_help_link('help.html#sclogin',__('Help for login','weaver-xtreme' /*adm*/));?><br />
75
- <code><?php wvrx_ts_fix_short($prefix, __("[login]",'weaver-xtreme' /*adm*/)); ?></code>
76
- </li>
77
-
78
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaver-xtreme' /*adm*/)); ?>
79
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaver-xtreme' /*adm*/));?><br />
80
- <code><?php wvrx_ts_fix_short($prefix, __('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaver-xtreme' /*adm*/)); ?></code>
81
- </li>
82
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Hide If - [hide_if]</span> - Hide content','weaver-xtreme' /*adm*/)); ?>
83
- </li>
84
-
85
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline','weaver-xtreme' /*adm*/)); ?>
86
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaver-xtreme' /*adm*/));?><br />
87
- <code><?php wvrx_ts_fix_short($prefix, __("[site_tagline style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
88
- </li>
89
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title','weaver-xtreme' /*adm*/)); ?>
90
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaver-xtreme' /*adm*/));?><br />
91
- <code><?php wvrx_ts_fix_short($prefix, __("[site_title style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
92
- </li>
93
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag','weaver-xtreme' /*adm*/)); ?>
94
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Span','weaver-xtreme' /*adm*/));?><br />
95
- <code><?php wvrx_ts_fix_short($prefix, __("[span id='class_id' class='class_name' style='style_values']text[/span]",'weaver-xtreme' /*adm*/)); ?></code>
96
- </li>
97
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Tab Group - [tab_group]</span> - Display content on separate tabs','weaver-xtreme' /*adm*/));?>
98
- <?php wvrx_ts_help_link('help.html#tab_group',__('Help for Tab Group','weaver-xtreme' /*adm*/));?><br />
99
- <code><?php wvrx_ts_fix_short($prefix, __('[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]','weaver-xtreme' /*adm*/)); ?></code>
100
- </li>
101
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options','weaver-xtreme' /*adm*/)); ?>
102
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
103
- <code><?php wvrx_ts_fix_short($prefix, __('[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]','weaver-xtreme' /*adm*/)); ?></code>
104
- </li>
105
-
106
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options','weaver-xtreme' /*adm*/)); ?>
107
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
108
- <code><?php wvrx_ts_fix_short($prefix, __('[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]','weaver-xtreme' /*adm*/)); ?></code>
109
- </li>
110
- </ul>
111
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
112
-
113
- <?php
114
- if ( $prefix )
115
- $button = __("Remove 'wvrx_' prefix from shortcode names: [ bloginfo ], etc.", 'weaver-xtreme');
116
- else
117
- $button = __("Add 'wvrx_' to shortcode names: [ wvrx_bloginfo ], etc.", 'weaver-xtreme');
118
- ?>
119
- <div style="clear:both;"></div>
120
- <span class='submit'><input name="toggle_shortcode_prefix" type="submit" value="<?php echo $button; ?>" /></span>
121
- <br /><small> <?php _e("To avoid conflicts with other plugins, you can add a 'wvrx_' prefix to these shortcodes.", 'weaver-xtreme /*adm*/'); ?> </small>
122
- <?php weaverx_nonce_field('toggle_shortcode_prefix'); ?>
123
- </form>
124
- <br />
125
-
126
- <h3><?php _e('Widgets','weaver-xtreme' /*adm*/); ?></h3>
127
- <ul>
128
- <li><?php _e('<span class="wvr-blue">Weaver X Login Widget</span> - Simplified login widget','weaver-xtreme' /*adm*/); ?>
129
- <?php wvrx_ts_help_link('help.html#widg-login',__('Help for Login Widget','weaver-xtreme' /*adm*/));?>
130
- </li>
131
-
132
- <li><?php _e('<span class="wvr-blue">Weaver X Per Page Text</span> - Display text on a per page basis, based on a Custom Field value','weaver-xtreme' /*adm*/); ?>
133
- <?php wvrx_ts_help_link('help.html##widg_pp_text',__('Help for Per Page Text Widget','weaver-xtreme' /*adm*/));?>
134
- </li>
135
-
136
- <li><?php _e('<span class="wvr-blue">Weaver X Text 2</span> - Display text in two columns - great for wide top/bottom widgets','weaver-xtreme' /*adm*/); ?>
137
- <?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
138
- </li>
139
- </ul>
140
-
141
-
142
- <h3><?php _e('Per Page/Post Settings','weaver-xtreme' /*adm*/); ?></h3>
143
- <p> <?php _e("Click the following button to produce a list of links to all pages and posts that have Per Page or Per Post settings.", 'weaver-xtreme /*adm*/'); ?></p>
144
- <div style="clear:both;"></div>
145
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
146
- <span class='submit'><input name="show_per_page_report" type="submit" value="<?php _e('Show Pages and Posts with Per Page/Post Settings', 'weaver-xtreme /*adm*/'); ?>" /></span>
147
- <?php weaverx_nonce_field('show_per_page_report'); ?>
148
- </form><br /><br />
149
- </div>
150
-
151
- <?php
152
- }
153
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/includes/wvrx-ts-shortcodes.php DELETED
@@ -1,661 +0,0 @@
1
- <?php
2
- /*
3
- Weaver X shortcodes
4
- */
5
-
6
- function wvrx_ts_setup_shortcodes() {
7
- // we setup all of our shortcodes only after the theme has been loaded...
8
-
9
- $codes = array( // list of shortcodes
10
- array('bloginfo' => 'wvrx_ts_sc_bloginfo'), // [bloginfo]
11
- array('box' => 'wvrx_ts_sc_box'), // [box]
12
- array('div' => 'wvrx_ts_sc_div'), // [div]
13
- array('header_image' => 'wvrx_ts_sc_header_image'), // [header_image]
14
- array('hide_if' => 'wvrx_ts_sc_hide_if' ), // [hide_if]
15
- array('html' => 'wvrx_ts_sc_html'), // [html]
16
- array('iframe' => 'wvrx_ts_sc_iframe'), // [iframe]
17
- array('login' => 'wvrx_ts_sc_login'), // [login]
18
- array('show_if' => 'wvrx_ts_sc_show_if' ), // [show_if]
19
- array('span' => 'wvrx_ts_sc_span'), // [span]
20
- array('site_tagline' => 'wvrx_ts_sc_site_tagline'), // [site_tagline]
21
- array('site_title' => 'wvrx_ts_sc_site_title'), // [site_title]
22
- array('tab_group' => 'wvrx_ts_sc_tab_group',
23
- 'tab' => 'wvrx_ts_sc_tab'), // [tab_group], [tab]
24
- array('vimeo' => 'wvrx_ts_sc_vimeo'), // [vimeo]
25
- array('youtube' => 'wvrx_ts_sc_youtube'), // [youtube]
26
- array('weaverx_info' => 'wvrx_ts_weaverx_sc_info'), // [weaverx_info]
27
- );
28
-
29
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
30
-
31
- foreach ($codes as $code) {
32
- wvrx_ts_set_shortcodes($code, $prefix);
33
- }
34
- }
35
-
36
- add_action('init', 'wvrx_ts_setup_shortcodes'); // allow shortcodes to load after theme has loaded so we know which version to use
37
-
38
- // =============== [box] ===================
39
- function wvrx_ts_sc_box( $args = '', $text ) {
40
- extract(shortcode_atts(array(
41
- 'align' => '',
42
- 'border' => true,
43
- 'border_rule' => '1px solid black',
44
- 'border_radius' => '',
45
- 'color' => '',
46
- 'background' => '',
47
- 'margin' => '',
48
- 'padding' => '1',
49
- 'shadow' => '',
50
- 'style' => '',
51
- 'width' => ''
52
- ), $args));
53
-
54
- $sty = 'style="';
55
-
56
- if ( $align ) {
57
- $align = strtolower($align);
58
- switch ( $align ) {
59
- case 'center':
60
- $sty .= 'display:block;margin-left:auto;margin-right:auto;';
61
- break;
62
- case 'right':
63
- $sty .= 'float:right;';
64
- break;
65
- default:
66
- $sty .= 'float:left;';
67
- break;
68
- }
69
- }
70
-
71
- if ( $border )
72
- $sty .= "border:{$border_rule};";
73
- if ( $border_radius )
74
- $sty .= "border-radius:{$border_radius}px;";
75
- if ( $shadow ) {
76
- if ( $shadow < 1 ) $shadow = 1;
77
- if ( $shadow > 5 ) $shadow = 5;
78
- $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
79
- }
80
- if ( $color )
81
- $sty .= "color:{$color};";
82
- if ( $background )
83
- $sty .= "background-color:{$background};";
84
- if ( $margin )
85
- $sty .= "margin:{$margin}em;";
86
- if ( $padding )
87
- $sty .= "padding:{$padding}em;";
88
- if ( $width )
89
- $sty .= "width:{$width}%;";
90
- if ( $sty )
91
- $sty .= $style;
92
- $sty .= '"'; // finish it
93
-
94
- return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
95
- }
96
-
97
- // =============== [hide_if] ===================
98
- function wvrx_ts_sc_hide_if($args = '', $text ) {
99
-
100
- return wvrx_ts_show_hide_if( $args, $text, false );
101
- }
102
-
103
- // =============== [show_if] ===================
104
- function wvrx_ts_sc_show_if($args = '', $text ) {
105
- return wvrx_ts_show_hide_if( $args, $text, true );
106
- }
107
-
108
- // =============== [show_hide_if] ===================
109
- function wvrx_ts_show_hide_if($args = '', $text, $show) {
110
- extract(shortcode_atts(array(
111
- 'device' => 'default', // desktop, mobile, smalltablet, phone, all
112
- 'logged_in' => 'default', // true or false
113
- 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
114
- 'post_id' => 'default', // comma separated list
115
- 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
116
- ), $args));
117
-
118
- $valid_device = array('default','desktop','mobile','smalltablet','phone','all');
119
-
120
- if ( !in_array( $device, $valid_device )) {
121
- return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
122
-
123
- }
124
- if ( $logged_in == 'default' ) { // **** logged_in
125
- $logged_in = true;
126
- } else {
127
- $is_true = is_user_logged_in();
128
- $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : !$is_true;
129
- }
130
-
131
- if ( $not_post_id == 'default') { // **** pages
132
- $not_post_id = true;
133
- } else {
134
- $list = explode(',', str_replace(' ', '', $not_post_id));
135
- $not_post_id = !in_array( get_the_ID(), $list );
136
- }
137
-
138
- if ( $post_id == 'default') { // **** pages
139
- $post_id = true;
140
- } else {
141
- $list = explode(',', str_replace(' ', '', $post_id));
142
- $post_id = in_array( get_the_ID(), $list );
143
- }
144
-
145
- if ( $user_can == 'default') { // **** user_can
146
- $user_can = true;
147
- } else {
148
- $user_can = current_user_can( strtolower( $user_can) );
149
- }
150
-
151
- $x = true;
152
- if ( $x == 'default') {
153
- $x = true;
154
- } else {
155
- $x = $show;
156
- }
157
-
158
- $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
159
-
160
- if ( !$all_true ) { // device irrelevant
161
- // $text .= '* ALL TRUE FAILED *';
162
- if ( !$show )
163
- return do_shortcode( $text ); // hide fails, so show it
164
- else
165
- return ''; // show fails, so hide it
166
-
167
- } elseif ( $device == 'default') { // so all other conditions passed, see if specified device
168
- // $text .= '* ALL TRUE, DEVICE DEFAULT *';
169
- if ( $show )
170
- return do_shortcode( $text );
171
- else
172
- return '';
173
- } else {
174
- // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
175
- if ( $show ) {
176
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('show-' . $device); // for [extra_menu]
177
- } else {
178
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('hide-' . $device);
179
- }
180
- $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode($text) . '</div>';
181
- unset( $GLOBALS['wvrx_sc_show_hide'] );
182
- return $ret;
183
- }
184
- return '';
185
- }
186
-
187
-
188
- // =============== [header_image style='customstyle'] ===================
189
- function wvrx_ts_sc_header_image($args = ''){
190
- extract(shortcode_atts(array(
191
- 'style' => '', // STYLE
192
- 'h' => '',
193
- 'w' => ''
194
- ), $args));
195
-
196
- $width = $w ? ' width="' . $w . '"' : '';
197
- $height = $h ? ' height="' . $h . '"' : '';
198
- $st = $style ? ' style="' . $style . '"' : '';
199
-
200
- $hdrimg = '<img src="' . get_header_image() . '"' . $st . $width . $height
201
- . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
202
-
203
- return $hdrimg;
204
- }
205
-
206
- // =============== [bloginfo arg='name'] ======================
207
- function wvrx_ts_sc_bloginfo($args = '') {
208
- extract(shortcode_atts(array(
209
- 'arg' => 'name', // a WP bloginfo name
210
- 'style' => '' // wrap with style
211
- ), $args));
212
-
213
- $code = '';
214
- if ($style != '') $code = '<span style="' . $style . '">';
215
- $code .= esc_attr( get_bloginfo( $arg ));
216
- if ($style != '') $code .= '</span>';
217
- return $code;
218
- }
219
-
220
- // =============== [site_title style='customstyle'] ======================
221
- function wvrx_ts_sc_site_title($args = '') {
222
- extract(shortcode_atts(array(
223
- 'style' => '', /* styling for the header */
224
- 'matchtheme' => false
225
- ), $args));
226
-
227
- $title = esc_html( get_bloginfo( 'name', 'display' ));
228
-
229
- $before = '';
230
- $after = '';
231
-
232
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
233
- $before = '<h1' . weaverx_title_class( 'site_title', false, 'site-title' ) . '><a href="' . esc_url( home_url( '/' ) ) . '" title="' . $title . '" rel="home">';
234
- $after = '</a></h1>';
235
- }
236
-
237
- if ($style) {
238
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
239
- }
240
- return $before . $title . $after;
241
-
242
- }
243
-
244
- // =============== [site_tagline style='customstyle'] ======================
245
- function wvrx_ts_sc_site_tagline($args = '') {
246
- extract(shortcode_atts(array(
247
- 'style' => '', /* styling for the header */
248
- 'matchtheme' => false
249
- ), $args));
250
-
251
- $title = get_bloginfo( 'description' );
252
-
253
- $before = '';
254
- $after = '';
255
-
256
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
257
- $before = '<h2' . weaverx_title_class( 'tagline', false, 'site-tagline' ) . '>';
258
- $after = '</h2>';
259
- }
260
-
261
- if ($style) {
262
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
263
- }
264
- return $before . $title . $after;
265
- }
266
-
267
- // =============== [iframe src='address' height=nnn] ======================
268
- function wvrx_ts_sc_iframe($args = '') {
269
- extract(shortcode_atts(array(
270
- 'src' => '',
271
- 'height' => '600', /* styling for the header */
272
- 'percent' => 100,
273
- 'style' => 'border:1px;'
274
- ), $args));
275
-
276
- $sty = $style ? ' style="' . $style . '"' : '';
277
-
278
- if (!$src) return __('<h4>No src address provided to [iframe].</h4>','weaver-xtreme' /*adm*/);
279
- return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
280
- }
281
-
282
- // =============== [iframe src='address' height=nnn] ======================
283
- function wvrx_ts_sc_login($args = '') {
284
- extract(shortcode_atts(array(
285
- ), $args));
286
-
287
- return wp_loginout( '', false );
288
- }
289
-
290
- // =============== [tab_group ] ======================
291
- function wvrx_ts_sc_tab_group( $args, $content ) {
292
- extract( shortcode_atts( array(
293
- 'border_color' => '', // tab and pane bodder color - default #888
294
- 'tab_bg' => '', // normal bg color of tab (default #CCC)
295
- 'tab_selected_color' => '', // color of tab when selected (default #EEE)
296
- 'pane_min_height' => '', // min height of a pane to help make all even if needed
297
- 'pane_bg' => '' // bg color of pane
298
- ), $args ) );
299
-
300
- if (isset($GLOBALS['wvrx_ts_in_tab_container']) && $GLOBALS['wvrx_ts_in_tab_container']) {
301
- return __('<strong>Sorry, you cannot nest tab_containers.</strong>','weaver-xtreme' /*adm*/);
302
- }
303
-
304
- // enqueue the theme support jslib only now when it will actually be needed!
305
-
306
- wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
307
-
308
- if ( !isset( $GLOBALS['wvrx_ts_tab_id'] ) )
309
- $GLOBALS['wvrx_ts_tab_id'] = 1;
310
- else
311
- ++$GLOBALS['wvrx_ts_tab_id'];
312
-
313
- $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
314
-
315
- $css = ''; // default styles
316
- $add_style = '';
317
- if ($border_color != '')
318
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
319
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
320
-
321
- if ($pane_min_height != '')
322
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
323
-
324
- if ($pane_bg != '')
325
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
326
-
327
- if ($tab_bg != '')
328
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
329
-
330
- if ($tab_selected_color != '')
331
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
332
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
333
-
334
- if ($css != '') { // specified some style...
335
- $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
336
- }
337
-
338
- $GLOBALS['wvrx_ts_in_tab_container'] = true;
339
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
340
-
341
- do_shortcode( $content ); // process the tabs on this
342
-
343
- $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
344
-
345
- if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
346
- foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
347
- $tabs[] = '<span>' . $tab['title'] . '</span>'. "\n";
348
- $panes[] = "\n" .'<div class="wvr-tabs-pane">' . $tab['content'] . '</div>';
349
- }
350
- $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
351
- . '<div class="wvr-tabs-nav">' . "\n"
352
- . implode( '', $tabs ) . '</div>' . "\n"
353
- . '<div class="wvr-tabs-panes">'
354
- . implode( '', $panes ) . "\n"
355
- . '</div><div class="wvr-tabs-clear"></div>' . "\n"
356
- . '</div> <!-- end tab_group -->' . "\n";
357
- }
358
-
359
- // Forget globals we generated
360
- unset( $GLOBALS['wvrx_ts_in_tab_container'],$GLOBALS['wvrx_ts_tabs'],$GLOBALS['wvrx_ts_num_tabs']);
361
-
362
- return $add_style . $out;
363
- }
364
-
365
- function wvrx_ts_sc_tab( $args, $content ) {
366
- extract( shortcode_atts( array(
367
- 'title' => 'Tab %d'
368
- ), $args ) );
369
-
370
- if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
371
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
372
- }
373
- $cur = $GLOBALS['wvrx_ts_num_tabs'];
374
- $GLOBALS['wvrx_ts_tabs'][$cur] = array(
375
- 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
376
- 'content' => do_shortcode( $content ) );
377
- $GLOBALS['wvrx_ts_num_tabs']++;
378
- }
379
-
380
-
381
- // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
382
- function wvrx_ts_sc_youtube($args = '') {
383
- $share = '';
384
- if ( isset ( $args[0] ) )
385
- $share = trim($args[0]);
386
-
387
- // http://code.google.com/apis/youtube/player_parameters.html
388
- // not including: enablejsapi, fs,playerapiid,
389
-
390
- extract(shortcode_atts(array(
391
- 'id' => '',
392
- 'sd' => false,
393
- 'related' => '0',
394
- 'privacy' => false,
395
- 'ratio' => false,
396
- 'center' => '1',
397
- 'autohide' => '~!',
398
- 'autoplay' => '0',
399
- 'border' => '0',
400
- 'color' => false,
401
- 'color1' => false,
402
- 'color2' => false,
403
- 'controls' => '1',
404
- 'disablekb' => '0',
405
- 'egm' => '0',
406
- 'fs' => '1',
407
- 'fullscreen' => 1,
408
- 'hd' => '0',
409
- 'iv_load_policy' => '1',
410
- 'loop' => '0',
411
- 'modestbranding' => '0',
412
- 'origin' => false,
413
- 'percent' => 100,
414
- 'playlist' => false,
415
- 'rel' => '0',
416
- 'showinfo' => '1',
417
- 'showsearch' => '1',
418
- 'start' => false,
419
- 'theme' => 'dark',
420
- 'wmode' => 'transparent'
421
-
422
- ), $args));
423
-
424
- if (!$share && !$id)
425
- return __('<strong>No share or id values provided for youtube shortcode.</strong>','weaver-xtreme' /*adm*/);
426
-
427
- if ($share) { // let the share override any id
428
- $share = str_replace('youtu.be/','',$share);
429
- if (strpos($share,'youtube.com/watch') !== false) {
430
- $share = str_replace('www.youtube.com/watch?v=', '', $share);
431
- $share = str_replace('&amp;','+',$share);
432
- $share = str_replace('&','+',$share);
433
- }
434
- $share = str_replace('http://','',$share);
435
- $share = str_replace('https://','',$share);
436
- if ($share)
437
- $id = $share;
438
- }
439
-
440
- $opts = $id . '%%';
441
-
442
- $opts = wvrx_ts_add_url_opt($opts, $hd != '0', 'hd=1');
443
- $opts = wvrx_ts_add_url_opt($opts, $autohide != '~!', 'autohide='.$autohide);
444
- $opts = wvrx_ts_add_url_opt($opts, $autoplay != '0', 'autoplay=1');
445
- $opts = wvrx_ts_add_url_opt($opts, $border != '0', 'border=1');
446
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color='.$color);
447
- $opts = wvrx_ts_add_url_opt($opts, $color1, 'color1='.$color1);
448
- $opts = wvrx_ts_add_url_opt($opts, $color2, 'color2='.$color2);
449
- $opts = wvrx_ts_add_url_opt($opts, $controls != '1', 'controls=0');
450
- $opts = wvrx_ts_add_url_opt($opts, $disablekb != '0', 'disablekb=1');
451
- $opts = wvrx_ts_add_url_opt($opts, $egm != '0', 'egm=1');
452
- $opts = wvrx_ts_add_url_opt($opts, true, 'fs='.$fs);
453
- $opts = wvrx_ts_add_url_opt($opts, true, 'iv_load_policy='.$iv_load_policy);
454
- $opts = wvrx_ts_add_url_opt($opts, $loop != '0', 'loop=1');
455
- $opts = wvrx_ts_add_url_opt($opts, $modestbranding != '0', 'modestbranding=1');
456
- $opts = wvrx_ts_add_url_opt($opts, $origin, 'origin='.$origin);
457
- $opts = wvrx_ts_add_url_opt($opts, $playlist, 'playlist='.$playlist);
458
- $opts = wvrx_ts_add_url_opt($opts, true, 'rel='.$rel);
459
- $opts = wvrx_ts_add_url_opt($opts, true, 'showinfo=' . $showinfo);
460
- $opts = wvrx_ts_add_url_opt($opts, $showsearch != '1', 'showsearch=0');
461
- $opts = wvrx_ts_add_url_opt($opts, $start, 'start='.$start);
462
- $opts = wvrx_ts_add_url_opt($opts, $theme != 'dark', 'theme=light');
463
- $opts = wvrx_ts_add_url_opt($opts, $wmode, 'wmode='.$wmode);
464
-
465
- $url = '//';
466
-
467
- if ($privacy) $url .= 'www.youtube-nocookie.com';
468
- else $url .= 'www.youtube.com';
469
-
470
- $opts = str_replace('%%+','%%?', $opts);
471
- $opts = str_replace('%%','', $opts);
472
- $opts = str_replace('+','&amp;', $opts);
473
-
474
- $url .= '/embed/' . $opts;
475
-
476
-
477
- $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
478
-
479
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
480
- "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
481
- $cntr2 = '</div>';
482
- $h = 9; $w = 16;
483
- if ( $sd ) {
484
- $h = 3; $w = 4;
485
- }
486
-
487
- $ret ="\n" . $cntr1 . '<iframe src="' . $url
488
- . '" frameborder="0" width="'.$w.'" height="' . $h . '" frameborder="0" ' . $allowfull . '"></iframe>'
489
- . $cntr2 . "\n";
490
-
491
- return $ret;
492
- }
493
-
494
- // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
495
- function wvrx_ts_sc_vimeo($args = '') {
496
- $share = '';
497
- if ( isset ( $args[0] ) )
498
- $share = trim($args[0]);
499
-
500
- extract(shortcode_atts(array(
501
- 'id' => '',
502
- 'sd' => false,
503
- 'color' => '',
504
- 'autoplay' => false,
505
- 'loop' => false,
506
- 'portrait' => true,
507
- 'title' => true,
508
- 'byline' => true,
509
- 'percent' => 100,
510
- 'center' => '1'
511
- ), $args));
512
-
513
- if (!$share && !$id) return __('<strong>No share or id values provided for vimeo shortcode.</strong>','weaver-xtreme' /*adm*/);
514
-
515
- if ($share) { // let the share override any id
516
- $share = str_replace('http://vimeo.com/','',$share);
517
- if ($share) $id = $share;
518
- }
519
-
520
- $opts = $id . '##';
521
-
522
- $opts = wvrx_ts_add_url_opt($opts, $autoplay, 'autoplay=1');
523
- $opts = wvrx_ts_add_url_opt($opts, $loop, 'loop=1');
524
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color=' . $color);
525
- $opts = wvrx_ts_add_url_opt($opts, !$portrait, 'portrait=0');
526
- $opts = wvrx_ts_add_url_opt($opts, !$title, 'title=0');
527
- $opts = wvrx_ts_add_url_opt($opts, !$byline, 'byline=0');
528
-
529
- $url = '//player.vimeo.com/video/';
530
-
531
- $opts = str_replace('##+','##?', $opts);
532
- $opts = str_replace('##','', $opts);
533
- $opts = str_replace('+','&amp;', $opts);
534
-
535
- $url .= $opts;
536
-
537
- if (function_exists('weaverii_use_mobile'))
538
- if (weaverii_use_mobile('mobile')) $percent = 100;
539
-
540
-
541
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
542
- "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
543
- $cntr2 = '</div>';
544
- $h = 9; $w = 16;
545
- if ( $sd ) {
546
- $h = 3; $w = 4;
547
- }
548
-
549
- $ret = "\n" . $cntr1 . '<iframe src="' . $url
550
- . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
551
- . $cntr2 . "\n";
552
-
553
- return $ret;
554
- }
555
-
556
- // ===== video utils =====
557
-
558
- function wvrx_ts_add_url_opt($opts, $add, $add_val) {
559
- if ($add) {
560
- $opts = $opts . '+' . $add_val;
561
- }
562
- return $opts;
563
- }
564
-
565
-
566
-
567
- function wvrx_ts_sc_html($vals = '') { // [html style='customstyle'] - all ======================
568
- $tag = 'span';
569
- if ( isset ( $vals[0] ) )
570
- $tag = trim( $vals[0]);
571
-
572
- extract(shortcode_atts(array(
573
- 'args' => ''
574
- ), $vals));
575
- if ($args) $args = ' ' . $args;
576
- return '<' . $tag . $args . '>';
577
- }
578
-
579
- function wvrx_ts_sc_div($vals = '',$text) { // [div] - all ===================
580
- extract(shortcode_atts(array(
581
- 'id' => '',
582
- 'class' => '',
583
- 'style' => ''
584
- ), $vals));
585
-
586
- $args = '';
587
- if ($id) $args .= ' id="' . $id . '"';
588
- if ($class) $args .= ' class="' . $class . '"';
589
- if ($style) $args .= ' style="' . $style . '"';
590
-
591
- return '<div' . $args . '>' . do_shortcode($text) . '</div>';
592
- }
593
-
594
- function wvrx_ts_sc_span($vals = '',$text) { // [span] - all ==================
595
- extract(shortcode_atts(array(
596
- 'id' => '',
597
- 'class' => '',
598
- 'style' => ''
599
- ), $vals));
600
-
601
- $args = '';
602
- if ($id) $args .= ' id="' . $id . '"';
603
- if ($class) $args .= ' class="' . $class . '"';
604
- if ($style) $args .= ' style="' . $style . '"';
605
-
606
- return '<span' . $args . '>' . do_shortcode($text) . '</span>';
607
- }
608
-
609
- function wvrx_ts_weaverx_sc_info() { // [info] ======================
610
- global $current_user;
611
- $out = __('<strong>Theme/User Info</strong><hr />','weaver-xtreme' /*adm*/);
612
-
613
- get_currentuserinfo();
614
- if (isset($current_user->display_name)) {
615
- $out .= __('<em>User:</em> ','weaver-xtreme' /*adm*/) . $current_user->display_name . '<br />';
616
- }
617
- $out .= '&nbsp;&nbsp;' . wp_register('','<br />',false);
618
- $out .= '&nbsp;&nbsp;' . wp_loginout('',false) . '<br />';
619
-
620
- $agent = __('Not Available','weaver-xtreme' /*adm*/);
621
- if (isset($_SERVER["HTTP_USER_AGENT"]) )
622
- $agent = $_SERVER['HTTP_USER_AGENT'];
623
- $out .= __('<em>User Agent</em>:','weaver-xtreme' /*adm*/) . ' <small>' . $agent . '</small>';
624
- $out .= '<div id="example"></div>
625
- <script type="text/javascript">
626
- var txt = "";
627
- var myWidth;
628
- if( typeof( window.innerWidth ) == "number" ) {
629
- //Non-IE
630
- myWidth = window.innerWidth;
631
- } else if( document.documentElement &&
632
- ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
633
- //IE 6+ in "standards compliant mode"
634
- myWidth = document.documentElement.clientWidth;
635
- } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
636
- //IE 4 compatible
637
- myWidth = document.body.clientWidth;
638
- }
639
- txt+= "<em>Browser Width: </em>" + myWidth + " px</br>";
640
- document.getElementById("example").innerHTML=txt;
641
- </script>';
642
-
643
- $out .= __('<em>Feed title:</em> ','weaver-xtreme' /*adm*/) . get_bloginfo_rss('name') . '<br />' . get_wp_title_rss();
644
-
645
- $out .= __('<br /><em>You are using</em> WordPress ','weaver-xtreme' /*adm*/) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
646
- $out .= __('<br /><em>Memory:</em> ','weaver-xtreme' /*adm*/) . round(memory_get_usage()/1024/1024,2) . 'M of ' . (int)ini_get('memory_limit') . 'M <hr />';
647
- return $out;
648
- }
649
-
650
-
651
- function wvrx_ts_set_shortcodes($sc_list, $prefix) {
652
- foreach ($sc_list as $sc_name => $sc_func) {
653
- remove_shortcode($prefix . $sc_name);
654
- add_shortcode($prefix . $sc_name,$sc_func);
655
- }
656
- }
657
-
658
- // =============== Utilities ======================
659
-
660
-
661
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/includes/wvrx-ts-widgets.php DELETED
@@ -1,169 +0,0 @@
1
- <?php
2
- /*
3
- * Weaver X Widgets and shortcodes - widgets
4
- */
5
-
6
- class WeaverX_Widget_Text extends WP_Widget {
7
-
8
- function WeaverX_Widget_Text() {
9
- $widget_ops = array('classname' => 'WeaverX_Widget_Text',
10
- 'description' => __('Text Widget with Two Columns - with HTML and shortcode support. Also adds shortcodes to standard Text widget.','weaver-xtreme' /*adm*/));
11
- $control_ops = array('width' => 400, 'height' => 350);
12
- $this->WP_Widget('wvrx2_text', __('Weaver X Text 2','weaver-xtreme' /*adm*/), $widget_ops, $control_ops);
13
- }
14
-
15
- function widget( $args, $instance ) {
16
- extract($args);
17
- $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
18
- $text = apply_filters( 'weaverx_text', $instance['text'], $instance );
19
- $text2 = apply_filters( 'weaverx_text', $instance['text2'], $instance );
20
- echo $before_widget;
21
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
22
- <div class="textwidget"><div style="float: left; width: 48%; padding-right: 2%;">
23
- <?php
24
- if ($instance['filter']) {
25
- echo(wpautop($text)); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
26
- echo(wpautop($text2)); echo('</div><div style="clear: both;"></div>');
27
- } else {
28
- echo($text); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
29
- echo($text2); echo('</div><div style="clear: both;"></div>');
30
- }
31
- ?>
32
- </div>
33
- <?php
34
- echo $after_widget;
35
- }
36
-
37
- function update( $new_instance, $old_instance ) {
38
- $instance = $old_instance;
39
- $instance['title'] = strip_tags($new_instance['title']);
40
- if ( current_user_can('unfiltered_html') ) {
41
- $instance['text'] = $new_instance['text'];
42
- $instance['text2'] = $new_instance['text2'];
43
- }
44
- else {
45
- $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
46
- $instance['text2'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text2']) ) );
47
- }
48
- $instance['filter'] = isset($new_instance['filter']);
49
- return $instance;
50
- }
51
-
52
- function form( $instance ) {
53
- $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'text2' => '', 'filter' => 0) );
54
- $title = strip_tags($instance['title']);
55
- $text = format_to_edit($instance['text']);
56
- $text2 = format_to_edit($instance['text2']);
57
- ?>
58
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title:' /*a*/ ); ?></label>
59
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
60
-
61
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
62
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text2'); ?>" name="<?php echo $this->get_field_name('text2'); ?>"><?php echo $text2; ?></textarea>
63
- <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> />
64
- &nbsp;<label for="<?php echo $this->get_field_id('filter'); ?>"><?php echo 'Automatically add paragraphs'; ?></label></p>
65
- <?php
66
- }
67
- }
68
-
69
- /**
70
- * Weaver X Per Page Text
71
- */
72
- class WeaverX_Widget_PPText extends WP_Widget {
73
-
74
- function WeaverX_Widget_PPText() {
75
- $widget_ops = array('classname' => 'wvrx_widget_pptext', 'description' =>
76
- __('Display text on a Per Page basis. Add to Widget area to see instructions.','weaver-xtreme' /*adm*/) );
77
- $this->WP_Widget('wvrx_pptext', __('Weaver X Per Page Text','weaver-xtreme' /*adm*/), $widget_ops);
78
- }
79
-
80
- function widget( $args, $instance ) {
81
- extract($args);
82
- $title = get_post_meta(get_the_ID(),'wvrx_ts_pp_title',true);
83
- $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
84
-
85
- if (empty($title) && empty($text))
86
- return;
87
-
88
- echo $before_widget;
89
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
90
- echo do_shortcode($text);
91
- echo $after_widget;
92
- }
93
-
94
- function update( $new_instance, $old_instance ) {
95
- $instance = $old_instance;
96
- $instance['title'] = strip_tags($new_instance['title']);
97
-
98
- return $instance;
99
- }
100
-
101
- function form( $instance ) {
102
- ?>
103
- <p><?php _e('This widget will work like a text widget, but the title and content are defined by custom
104
- fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>
105
- if you want a title, and define Custom Field <em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text,
106
- HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom
107
- fields are defined when that page is displayed. (This widget won\'t display on the default blog or other archive-like pages.)','weaver-xtreme' /*adm*/); ?><p>
108
- <?php
109
- }
110
- }
111
-
112
- /**
113
- * Weaver X login
114
- */
115
- class WeaverX_Widget_Login extends WP_Widget {
116
-
117
- function WeaverX_Widget_Login() {
118
- $widget_ops = array('classname' => 'wvrx_widget_login', 'description' => __( "Log in/out, admin", 'weaver-xtreme' /*adm*/ ) );
119
- $this->WP_Widget('wvrx_login', __('Weaver X Login','weaver-xtreme' /*adm*/), $widget_ops);
120
- }
121
-
122
- function widget( $args, $instance ) {
123
- extract($args);
124
- $title = apply_filters('widget_title', empty($instance['title']) ? __('Login', 'weaver-xtreme' /*adm*/ ) : $instance['title'], $instance, $this->id_base);
125
-
126
- echo $before_widget;
127
- if ( $title )
128
- echo $before_title . $title . $after_title;
129
- global $current_user;
130
- get_currentuserinfo();
131
- if (isset($current_user->display_name))
132
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaver-xtreme' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
133
- ?>
134
- <ul>
135
- <?php wp_register(); ?>
136
- <li><?php wp_loginout(); ?></li>
137
- </ul>
138
- <?php
139
- echo $after_widget;
140
- }
141
-
142
- function update( $new_instance, $old_instance ) {
143
- $instance = $old_instance;
144
- $instance['title'] = strip_tags($new_instance['title']);
145
-
146
- return $instance;
147
- }
148
-
149
- function form( $instance ) {
150
- $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
151
- $title = strip_tags($instance['title']);
152
- ?>
153
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','weaver-xtreme' /*adm*/); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
154
- <?php
155
- }
156
- }
157
-
158
-
159
- add_action("widgets_init", "wvrx_ts_load_widgets");
160
- add_filter('weaverx_text', 'do_shortcode');
161
- add_filter('widget_text', 'do_shortcode'); // add to standard text widget, too.
162
-
163
- function wvrx_ts_load_widgets() {
164
- register_widget("WeaverX_Widget_Text");
165
- register_widget("WeaverX_Widget_PPText");
166
- register_widget("WeaverX_Widget_Login");
167
- }
168
-
169
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/js/wvrx-ts-jslib.js DELETED
@@ -1,27 +0,0 @@
1
- /* *********************************************************************************
2
- * Weaver X Theme Support JavaScript support Library
3
- *
4
- * Author: WeaverTheme - www.weavertheme.com
5
- * @version 1.0
6
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
7
- * @author Bruce Wampler
8
- *
9
- * Notes - this library requires jQuery to be loaded
10
- * this library was cobbled together over a long period of time, so it contains a
11
- * bit of a jumble of straight JavaScript and jQuery calls. So it goes. It works.
12
- *
13
- *
14
- ************************************************************************************* */
15
-
16
-
17
- jQuery(document).ready(function($) { // self-defining function
18
- // Tabs
19
- $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
20
- $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
21
- .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
22
- });
23
- $('.wvr-tabs-pane').hide();
24
- $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
25
- $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
26
-
27
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/js/wvrx-ts-jslib.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(a){a(".wvr-tabs-nav").delegate("span:not(.wvr-tabs-current)","click",function(){a(this).addClass("wvr-tabs-current").siblings().removeClass("wvr-tabs-current").parents(".wvr-tabs").find(".wvr-tabs-pane").hide().eq(a(this).index()).show()});a(".wvr-tabs-pane").hide();a(".wvr-tabs-nav span:first-child").addClass("wvr-tabs-current");a(".wvr-tabs-panes .wvr-tabs-pane:first-child").show()});
 
3.2.1/1.0.1/readme.txt DELETED
@@ -1,127 +0,0 @@
1
- === Weaver X Theme Support ===
2
- Plugin Name: Weaver X Theme Support
3
- Plugin URI: http://aspentheme.com/plugins/
4
- Tags: weaver x theme, shortcodes, widgets
5
- Author URI: http://weavertheme.com/about/
6
- Contributors: wpweaver
7
- Author: wpweaver
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Requires at least: 3.9
11
- Tested up to: 4.1
12
- Stable tag: 1.0.1
13
-
14
- A useful shortcode and widget collection for Weaver Xtreme
15
-
16
- == Description ==
17
-
18
- This is the main theme suppot for the Weaver X Theme. This plugin provides a collection of useful shortcodes and widgets designed to complement the Weaver X theme. These shortcodes have been selected and developed based on requests and feedback from thousands of users of the Weaver X, Weaver II, and Aspen themes.
19
-
20
- While these shortcodes are optimized for the Weaver X theme, they will also work with full functionality for most WordPress themes, and can be used
21
- if you switch themes.
22
-
23
- Includes complete documentation help file. Instructions for using the shortcodes and widgets are in the help file. Use it for non-Weaver Xtreme themes.
24
-
25
- = Shortcodes included =
26
-
27
- * **[tab_group]** - Display content in a tabbed box.
28
- * **[youtube]** - Show your YouTube videos responsively, and with the capability to use any of the YouTube custom display options.
29
- * **[vimeo]** - Show your Vimeo videos responsively, and with the capability to use any of the Vimeo custom display options.
30
- * **[iframe]** - Quick and easy display of content in an iframe.
31
- * **[div]**, **[span]**, **[html]** - Add div, span, and other html to pages/posts without the need to switch to Text view.
32
- * **[hide/show_if]** - Show or hide content depending upon options: device, page ID, user capability, logged in status.
33
- * **[bloginfo]** - Display any information available from WordPress bloginfo function.
34
- * **[user_can]** - Display content base on logged in user role.
35
- * **[site_title]** - Display Site title.
36
- * **[site_tagline]** - Display Site tag line.
37
-
38
- = Widgets Included =
39
-
40
- * **Weaver X 2 Column Text Widget** - Add text into two columns in a widget
41
- * **Weaver X Per Page Text Widget** - Add a text widget on a per page basis
42
- * **Weaver X Login** - Simplified login widget
43
-
44
- = Licenses =
45
-
46
- * The Weaver X Theme Support plugin is licensed under the terms of the GNU GENERAL PUBLIC LICENSE, Version 2,
47
- June 1991. (GPL) The full text of the license is in the license.txt file.
48
- * All images included with this plugin are either original works of the author which
49
- have been placed into the public domain, or have been derived from other public domain sources,
50
- and thus need no license. (This does not include the images provided with any of the
51
- below listed scripts and libraries. Those images are covered by their respective licenses.)
52
-
53
- This plugin also includes several scripts and libraries that are covered under the terms
54
- of their own licenses in the listed files in the plugin distribution:
55
-
56
-
57
-
58
- == Installation ==
59
-
60
- It is easiest to use the Plugins : Add Plugin admin page, but you can do it manually, too:
61
-
62
- 1. Download the plugin archive and expand it
63
- 2. Upload all the plugin files and directories to your wp-content/plugins/weaverx-theme-support directory
64
- 3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for this plugin.
65
-
66
- == Frequently Asked Questions ==
67
-
68
- = Where can I get support for this plugin? =
69
-
70
- Support for this plugin can best be found at our forum - http://forum.weavertheme.com
71
-
72
- == Upgrade Notice ==
73
-
74
- This is the initial release of this plugin.
75
-
76
- == ChangeLog ==
77
-
78
- = 1.0.1 =
79
- * New - Per Page/Post Report from Add-ons menu
80
- * Fix: '\1234' values in per post style
81
- * Fix: Internal name of Per Post Style - may cause loss of prevoius setting - sorry
82
-
83
- = 1.0 =
84
- * Minor tweaks
85
- * wvrx_ shortcode prefix option
86
-
87
- = 0.96 =
88
- * Fixed bug with Per page options on Page with Posts
89
- * Internal optimizations
90
-
91
- = 0.95.1 =
92
- * Only load if Weaver Xtreme is the active theme.
93
-
94
- = 0.95 =
95
- * Changed [ site_title ] and [ site_tagline ] to match theme style as option
96
-
97
- = 0.10 =
98
- * Fixed per page options when used with old Xtreme Plus version
99
-
100
- = 0.9 =
101
- * Added Per Page and Per Post admin support to plugin (removed from Xtreme theme)
102
-
103
- = 0.8 =
104
- * Added [ box ]
105
-
106
- = 0.7 =
107
- * Fixes for [ show/hide_if]
108
- * Removed unused files
109
-
110
- = 0.6 =
111
- * Fixed [ show/hide_if ] for multiple conditions that include device
112
- * Changed interface to Weaver Xtreme - all codes now just in Weaver X Add-ons tab
113
-
114
- = 0.5 =
115
- * Added [ show/hide_if ], removed [ hide_mobie ], [show_if_logged_in]
116
- * Updated Doc
117
- * Added action for interface to Weaver Xtreme "Add-ons" tab
118
-
119
- = 0.4 =
120
- * Optimized loading of jslib - only needed by tab group, so not loaded until shortcode used
121
-
122
- = 0.3 =
123
- * Fixed video shortcodes
124
-
125
- = 0.1 =
126
-
127
- * initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/weaverx-ts-admin-style.css DELETED
@@ -1,133 +0,0 @@
1
- /* Weaver admin style */
2
- .hide_me {display:none;}
3
-
4
- .wvrx_ts_green {font-weight:bold;color:green;}
5
- .wvrx_ts_yellow {font-weight:bold;color:orange;}
6
- .wvrx_ts_red {font-weight:bold;color:red;}
7
-
8
- .wvr-help ul {list-style: disc; margin-left:30px;}
9
- .wvr-option-section {font-weight:bold;font-size:120%;color:blue;}
10
-
11
- .wvr-wrap {
12
- max-width:95%;
13
- }
14
-
15
- .tab ul {
16
- margin-left: 1.15em;
17
- list-style: disc outside none;
18
- }
19
- .tab ol {
20
- list-style-position:outside;
21
- margin-left: 1.4em;
22
- margin-bottom:.6em;
23
- }
24
-
25
- .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
26
-
27
- div.yetii {
28
- width: 95%;
29
- margin: 0 0 20px 0;
30
- }
31
-
32
- ul.yetii {
33
- list-style-type: none;
34
- width: 100%;
35
- float: left;
36
- border-bottom: 4px ridge #ddd;
37
- margin-bottom: 8px;
38
- }
39
-
40
- ul.yetii li {
41
- margin: 0 2px 0 0;
42
- float: left;
43
- }
44
-
45
- ul.yetii a {
46
- float: left;
47
- display: block;
48
- padding: 4px 8px;
49
- border: 1px solid #ddd;
50
- border-bottom: 0;
51
- color: #666;
52
- background: #eee;
53
- text-decoration: none;
54
- font-weight: bold;
55
- }
56
-
57
- ul.yetii a:hover {
58
- background: #fff;
59
- }
60
-
61
- ul.yetii a.active {
62
- background: #fff;
63
- border-color: #00c;
64
- color: #00f;
65
- }
66
- /* -- */
67
- div.yetiisub {
68
- width: 100%;
69
- margin: 0 0 20px 0;
70
- }
71
-
72
- ul.yetiisub {
73
- list-style-type: none;
74
- width: 100%;
75
- float: left;
76
- margin-bottom: 8px;
77
- }
78
-
79
- ul.yetiisub li {
80
- margin: 0 2px 2px 0px;
81
- float: left;
82
- }
83
-
84
- ul.yetiisub a {
85
- float: left;
86
- padding: 4px 8px;
87
- border: 1px solid #ccc;
88
- color: #666;
89
- background: #f0f0f0;
90
- text-decoration: none;
91
- font-style: italic;
92
- font-weight: bold;
93
- }
94
-
95
- ul.yetiisub a:hover {
96
- background: #fefefe !important;
97
- }
98
-
99
- ul.yetiisub a.active {
100
- background: #fff;
101
- border-color: #00c;
102
- color: #00f;
103
- }
104
- .wvr-small-submit {
105
- padding: 1.0em 0;
106
- margin: 1px 0;
107
- font-size:90%;
108
- }
109
-
110
- .wvr-option-header {background:#D0D0D8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px;}
111
- .wvr-option-subheader {background:#EAEAEA;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px;}
112
- .wvr-row-header {background:#D0D0D8;line-height:1.8em;padding-left:4px;}
113
- .wvr-row-subheader {background:#EAEAEA;padding-left:4px;}
114
- .wvr-row-subheader-alt {background:#F4F4F4;padding-left:4px;}
115
- /* layouts for layout boxes */
116
- .l_layout {display:block; width:140px; height:110px; float:left; margin-right:10px; margin-bottom:10px; display:inline;border:1px solid #888; color:black;text-align:center;font:15px arial,sans-serif;}
117
- .l_layout span {display:block;}
118
- .l_header {width:140px; height:20px; background:#CCF; line-height:20px;}
119
- .l_content {width:100px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
120
- .l_contentcenter {width:60px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
121
- .l_content2 {width:80px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
122
- .l_contentw {width:140px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
123
- .l_stdbar {width:40px; height:70px; float:left; display:inline;}
124
- .l_widebar {width:60px; height:70px; float:left; display:inline;}
125
- .l_righttop {width:40px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
126
- .l_righttopwide {width:60px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
127
- .l_rightup {width:40px; height:25px; margin:0; background:#FAA; float:left; display:inline; line-height:25px;}
128
- .l_rightright {width:40px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
129
- .l_rightdown {width:40px; height:25px; margin:0; background:#AFA; float:left; display:inline; line-height:25px;}
130
- .l_leftleft {width:40px; height:70px; margin:0; background:#AFA; float:left; display:inline; line-height:70px;}
131
- .l_leftshort {width:30px; height:50px; margin:0; background:#AFA; float:left; display:inline; line-height:50px;}
132
- .l_skinny {width:30px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
133
- .l_footer {clear:left;width:140px; height:20px; background:#DDF; color:#000; line-height:20px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/weaverx-ts-admin-style.min.css DELETED
@@ -1,4 +0,0 @@
1
- .hide_me{display:none}.wvrx_ts_green{font-weight:bold;color:green}.wvrx_ts_yellow{font-weight:bold;color:orange}.wvrx_ts_red{font-weight:bold;color:red}.wvr-help ul{list-style:disc;margin-left:30px}.wvr-option-section{font-weight:bold;font-size:120%;color:blue}.wvr-wrap{max-width:95%}.tab ul{margin-left:1.15em;list-style:disc outside none}.tab ol{list-style-position:outside;margin-left:1.4em;margin-bottom:.6em}.js_button{background:#eee!important;font-weight:600!important;color:#585858!important}div.yetii{width:95%;margin:0 0 20px 0}ul.yetii{list-style-type:none;width:100%;float:left;border-bottom:4px ridge #ddd;margin-bottom:8px}ul.yetii li{margin:0 2px 0 0;float:left}ul.yetii a{float:left;display:block;padding:4px 8px;border:1px solid #ddd;border-bottom:0;color:#666;background:#eee;text-decoration:none;font-weight:bold}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;border-color:#00c;color:#00f}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}
2
- ul.yetiisub li{margin:0 2px 2px 0;float:left}ul.yetiisub a{float:left;padding:4px 8px;border:1px solid #ccc;color:#666;background:#f0f0f0;text-decoration:none;font-style:italic;font-weight:bold}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;border-color:#00c;color:#00f}.wvr-small-submit{padding:1.0em 0;margin:1px 0;font-size:90%}.wvr-option-header{background:#d0d0d8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px}.wvr-option-subheader{background:#eaeaea;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px}.wvr-row-header{background:#d0d0d8;line-height:1.8em;padding-left:4px}.wvr-row-subheader{background:#eaeaea;padding-left:4px}.wvr-row-subheader-alt{background:#f4f4f4;padding-left:4px}.l_layout{display:block;width:140px;height:110px;float:left;margin-right:10px;margin-bottom:10px;display:inline;border:1px solid #888;color:black;text-align:center;font:15px arial,sans-serif}
3
- .l_layout span{display:block}.l_header{width:140px;height:20px;background:#CCF;line-height:20px}.l_content{width:100px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentcenter{width:60px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_content2{width:80px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentw{width:140px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_stdbar{width:40px;height:70px;float:left;display:inline}.l_widebar{width:60px;height:70px;float:left;display:inline}.l_righttop{width:40px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_righttopwide{width:60px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_rightup{width:40px;height:25px;margin:0;background:#FAA;float:left;display:inline;line-height:25px}.l_rightright{width:40px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}
4
- .l_rightdown{width:40px;height:25px;margin:0;background:#AFA;float:left;display:inline;line-height:25px}.l_leftleft{width:40px;height:70px;margin:0;background:#AFA;float:left;display:inline;line-height:70px}.l_leftshort{width:30px;height:50px;margin:0;background:#AFA;float:left;display:inline;line-height:50px}.l_skinny{width:30px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}.l_footer{clear:left;width:140px;height:20px;background:#DDF;color:#000;line-height:20px}
 
 
 
 
3.2.1/1.0.1/weaverx-ts-style.css DELETED
@@ -1,106 +0,0 @@
1
- /*
2
- Style file for Weaver X Theme Support
3
-
4
- License: GPL
5
-
6
- Weaver X Theme Support
7
- Copyright (C) 2014-2015 Bruce E. Wampler - weaver@weavertheme.com
8
-
9
- This program is free software: you can redistribute it and/or modify
10
- it under the terms of the GNU General Public License as published by
11
- the Free Software Foundation, either version 3 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
-
19
- You should have received a copy of the GNU General Public License
20
- along with this program. If not, see <http://www.gnu.org/licenses/>.
21
-
22
- PLEASE - DO NOT EDIT THIS FILE
23
-
24
- If you MUST change the CSS for these shortcodes and widgets, use the
25
- Custom CSS features of Weaver X, or use a custom CSS plugin
26
- such as JetPack, which let you add CSS to your theme or plugins
27
- without modifying theme or plugin .css files.
28
- */
29
-
30
- /* rules for areas hidden in various hybrid "desktop" views */
31
-
32
- @media screen and (min-width:768px) { /* rules for desk top */
33
- .wvr-hide-desktop {display:none !important;}
34
- .wvr-hide-all {display:none !important;}
35
- .wvr-show-phone {display:none !important;}
36
- .wvr-show-mobile {display:none !important;}
37
- .wvr-show-smalltablet {display:none !important;}
38
- }
39
-
40
- @media screen and (min-width:581px) and (max-width:767px) { /* rules for small tablets */
41
- .wvr-hide-smalltablet {display:none !important;}
42
- .wvr-hide-mobile {display:none !important;}
43
- .wvr-hide-all {display:none !important;}
44
- .wvr-show-desktop {display:none !important;}
45
- .wvr-show-phone {display:none !important;}
46
- }
47
-
48
- @media screen and (max-width:580px) { /* rules for phones */
49
- .wvr-hide-phone {display:none !important;}
50
- .wvr-hide-mobile {display:none !important;}
51
- .wvr-hide-all {display:none !important;}
52
- .wvr-show-desktop {display:none !important;}
53
- .wvr-show-smalltablet {display:none !important;}
54
- }
55
-
56
- /* Tabs */
57
- .wvr-tabs {
58
- -webkit-box-sizing: border-box;
59
- -moz-box-sizing: border-box;
60
- box-sizing: border-box;
61
- margin: 0 0 1.5em 0;
62
- background:transparent;
63
- }
64
-
65
- .wvr-tabs-style .wvr-tabs-nav { /* top "bar" behind tabs */
66
- padding: 0px 20px 0px 0px;
67
- margin: 0;
68
- height: 32px;
69
- background-color: transparent;
70
- }
71
- .wvr-tabs-style .wvr-tabs-nav span { /* bg color of a tab */
72
- display: block;
73
- float: left;
74
- padding: 0 20px;
75
- height: 32px;
76
- line-height: 32px;
77
- margin-right: 5px;
78
- cursor: pointer;
79
- border-top: 1px solid #888; /* border-color */
80
- border-right: 1px solid #888;
81
- border-left: 1px solid #888;
82
- background: #ccc; /* tab-bg */
83
- border-top-left-radius:6px;
84
- border-top-right-radius:6px;
85
- position:relative;
86
- z-index:1;
87
- }
88
-
89
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current {
90
- position:relative;
91
- z-index:3;
92
- }
93
-
94
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
95
- .wvr-tabs-style .wvr-tabs-nav span:hover {
96
- background: #eee; /* tab-current-color */
97
- }
98
-
99
- .wvr-tabs-style .wvr-tabs-pane {
100
- padding: 15px;
101
- border: 1px solid #888; /* border-color */
102
- min-height:20px; /* pane-min-height */
103
- background-color:transparent; /* pane-bg */
104
- position:relative;
105
- z-index:2;
106
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.1/weaverx-ts-style.min.css DELETED
@@ -1,2 +0,0 @@
1
- @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px;position:relative;z-index:1}
2
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current{position:relative;z-index:3}.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent;position:relative;z-index:2}
 
 
3.2.1/1.0.1/weaverx-ts.php DELETED
@@ -1,396 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Weaver Xtreme Theme Support
4
- Plugin URI: http://weavertheme.com/plugins
5
- Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
- Author: wpweaver
7
- Author URI: http://weavertheme.com/about/
8
- Version: 1.0.1
9
- License: GPL V3
10
-
11
- Weaver Xtreme Theme Support
12
-
13
- Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
-
30
- /* CORE FUNCTIONS
31
- */
32
- $theme = get_template_directory();
33
-
34
- if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
35
-
36
- define ('WVRX_TS_VERSION','1.0.1');
37
- define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
- define ('WVRX_TS_APPEARANCE_PAGE', false );
39
-
40
- function wvrx_ts_installed() {
41
- return true;
42
- }
43
-
44
-
45
- function wvrx_ts_plugins_url($file,$ext) {
46
- return plugins_url($file,__FILE__) . $ext;
47
- }
48
-
49
- function wvrx_ts_enqueue_scripts() { // action definition
50
-
51
- if (function_exists('wvrx_ts_slider_header')) wvrx_ts_slider_header();
52
-
53
- //-- Weaver X PLus js lib - requires jQuery...
54
-
55
- // put the enqueue script in the tabs shortcode where it belongs
56
-
57
- //wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION);
58
-
59
-
60
- // add plugin CSS here, too.
61
-
62
- wp_register_style('wvrx-ts-style-sheet',wvrx_ts_plugins_url('weaverx-ts-style', WVRX_TS_MINIFY.'.css'),null,WVRX_TS_VERSION,'all');
63
- wp_enqueue_style('wvrx-ts-style-sheet');
64
- }
65
-
66
- add_action('wp_enqueue_scripts', 'wvrx_ts_enqueue_scripts' );
67
-
68
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
69
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
70
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
71
-
72
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
73
-
74
- add_action('admin_menu', 'wvrx_ts_add_page_fields',11); // allow X-Plus to override us
75
-
76
- function wvrx_ts_add_page_fields() {
77
- add_meta_box('page-box', __('Weaver Xtreme Options For This Page (Theme Support Per Page Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_page_extras_load', 'page', 'normal', 'high');
78
- add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
79
- global $post;
80
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
81
- if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') ) {
82
- $i = 1;
83
- $args=array( 'public' => true, '_builtin' => false );
84
- $post_types = get_post_types($args,'names','and');
85
- foreach ($post_types as $post_type ) {
86
- add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras', $post_type, 'normal', 'high');
87
- $i++;
88
- }
89
- }
90
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin - needs to be here
91
-
92
- }
93
-
94
- function wvrx_ts_page_extras_load() {
95
- wvrx_ts_page_extras();
96
- }
97
-
98
- function wvrx_ts_post_extras_load() {
99
- wvrx_ts_post_extras();
100
- }
101
- }
102
-
103
- // ======================================== subthemes ========================================
104
- add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_action');
105
-
106
- function wvrx_ts_child_show_extrathemes_action() {
107
- echo '<h3 class="atw-option-subheader">' . __('Select an Add-on Subtheme You Have Uploaded','weaver-xtreme' /*adm*/) . '</h3>';
108
- $addon_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/';
109
- $addon_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes/addon-subthemes/';
110
-
111
- $addon_list = array();
112
- if($media_dir = @opendir($addon_dir)) { // build the list of themes from directory
113
- while ($m_file = readdir($media_dir)) {
114
- $len = strlen($m_file);
115
- $base = substr($m_file,0,$len-4);
116
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
117
- if($ext == '.wxt' ) {
118
- $addon_list[] = $base;
119
- }
120
- }
121
- }
122
-
123
- if (!empty($addon_list)) {
124
- natcasesort($addon_list);
125
-
126
- $cur_addon = weaverx_getopt('wvrx_addon_name');
127
- if ($cur_addon)
128
- echo '<h3>' . __('Currently selected Add-on Subtheme: ','weaver-xtreme' /*adm*/) . ucwords(str_replace('-',' ',$cur_addon)) . '</h3>';
129
- ?>
130
- <form enctype="multipart/form-data" name='pick_added_theme' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
131
-
132
- <h4><?php _e('Select an add-on subtheme:','weaver-xtreme' /*adm*/); ?></h4>
133
-
134
- <?php
135
- foreach ($addon_list as $addon) {
136
- $name = ucwords(str_replace('-',' ',$addon));
137
- ?>
138
- <div style="float:left; width:200px;">
139
- <label><input type="radio" name="wvrx_addon_name"
140
- <?php echo 'value="' . $addon . '"' . (weaverx_getopt('wvrx_addon_name') == $addon ? 'checked' : '') .
141
- '/> <strong>' . $name . '</strong><br />
142
- <img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . $addon_url . $addon . '.jpg" width="150px" height="113px" /><label></div>' . "\n";
143
- }
144
- ?>
145
- <div style="clear:both;"></div>
146
- <br /><span class='submit'><input name="set_added_subtheme" type="submit" value="<?php _e('Set to Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span>
147
- <small style="color:#b00;"><br /><?php _e('<strong>Note:</strong> Selecting a new subtheme will change only theme related settings.
148
- Options labelled with (&diams;) will be retained.
149
- You can use the Save/Restore tab to save a copy of all your current settings first.','weaver-xtreme' /*adm*/); ?></small>
150
-
151
- <?php weaverx_nonce_field('set_added_subtheme'); ?>
152
-
153
- <br /><br /><span class='atw-small-submit' style="margin-left:100px;"><input name="delete_added_subtheme" type="submit" value="<?php _e('Delete Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span> &nbsp;
154
- <small><?php _e('This will delete the selected Add-on Subtheme from the Add-on directory','weaver-xtreme' /*adm*/); ?></small>
155
- <?php weaverx_nonce_field('delete_added_subtheme'); ?>
156
- </form>
157
- <?php
158
- } else {
159
- ?>
160
- <p><?php _e('No Add-on Subthemes available.','weaver-xtreme' /*adm*/); ?></p>
161
- <?php
162
- }
163
- echo '<h3 class="atw-option-subheader">Upload an Add-on Subtheme From Your Computer</h3>';
164
- ?>
165
- <p><?php _e('You can find additional free and premium Add-on Subthemes for <em>Weaver Xtreme</em>','weaver-xtreme' /*adm*/); ?>
166
- <a href="http://xtreme.weavertheme.com/add-on-subthemes/" title="<?php _e('Weaver Xtreme Add-on Subthemes','weaver-xtreme' /*adm*/); ?>"><strong><?php _e('HERE','weaver-xtreme' /*adm*/); ?></strong></a>.</p>
167
- <form name='form_added_theme' enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
168
- <table>
169
- <tr valign="top">
170
- <td><strong><?php _e('Select Add-on Subtheme .zip file to upload:','weaver-xtreme' /*adm*/); ?></strong>
171
- <input name="uploaded_addon" type="file" />
172
- <input type="hidden" name="uploadaddon" value="yes" />
173
- </td>
174
- </tr>
175
- <tr><td>
176
- <span style="margin-left:50px;" class='submit'>
177
- <input name="upload_addon" type="submit" value="Upload Add-on Subtheme" /><br />
178
- </span>&nbsp;<small><?php _e('<strong>Upload and Save</strong> an Add-on Subtheme or Subtheme collection from .zip file on your computer. Will be saved on your site\'s filesystem.','weaver-xtreme' /*adm*/); ?></small>
179
- </td></tr>
180
- </table>
181
- <?php weaverx_nonce_field('upload_addon'); ?>
182
- </form>
183
-
184
- <?php
185
- }
186
-
187
- add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
188
- function wvrx_ts_child_process_options() {
189
-
190
- if (weaverx_submitted('set_added_subtheme') ) { // Set to selected addon - theme
191
- if (isset($_POST['wvrx_addon_name']))
192
- {
193
- $name = $_POST['wvrx_addon_name'];
194
-
195
- $openname = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt';
196
- $contents = file_get_contents($openname);
197
-
198
- if (!weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname)) {
199
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
200
- __('Sorry, there was a problem uploading your add on theme. The name you picked did not have a valid
201
- Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','weaver-xtreme' /*adm*/) . '</em></strong></p></div>';
202
- } else {
203
- weaverx_save_msg(__('Weaver Xtreme theme reset to ','weaver-xtreme' /*adm*/) .
204
- ucwords(str_replace('-',' ',$name )) . ' add-on subtheme.');
205
- weaverx_setopt('wvrx_addon_name',$name);
206
- }
207
- }
208
- }
209
-
210
- else if (weaverx_submitted('delete_added_subtheme') ) { // Delete selected addon theme
211
- if (isset($_POST['wvrx_addon_name']))
212
- {
213
- $name = $_POST['wvrx_addon_name'];
214
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt');
215
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.jpg');
216
- weaverx_save_msg(__('Deleted ','weaver-xtreme' /*adm*/) .
217
- ucwords(str_replace('-',' ',$name )) . __(' add-on subtheme.','weaver-xtreme' /*adm*/));
218
- }
219
- }
220
-
221
- else if (weaverx_submitted('upload_addon')
222
- && isset($_POST['uploadaddon'])
223
- && $_POST['uploadaddon'] == 'yes') {
224
- // upload theme from users computer
225
- // they've supplied and uploaded a file
226
- $ok = wvrx_ts_wunpackzip('uploaded_addon', weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/');
227
- }
228
-
229
- else if ( weaverx_submitted('toggle_shortcode_prefix') ) {
230
- $val = get_option('wvrx_toggle_shortcode_prefix');
231
- if ( $val ) {
232
- delete_option('wvrx_toggle_shortcode_prefix');
233
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes NOT prefixed with 'wvrx_'", 'weaver-xtreme'));
234
- } else {
235
- update_option('wvrx_toggle_shortcode_prefix', 'wvrx_');
236
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme'));
237
- }
238
- } else if ( weaverx_submitted('show_per_page_report')) {
239
- wvrx_ts_per_page_report();
240
- }
241
-
242
- }
243
-
244
- function wvrx_ts_wunpackzip($uploaded, $to_dir) {
245
- // upload theme from users computer
246
- // they've supplied and uploaded a file
247
- // This version and the one in Aspen Plus must be identical...
248
-
249
- $ok = true; // no errors so far
250
-
251
- if (isset($_FILES[$uploaded]['name'])) // uploaded_addon
252
- $filename = $_FILES[$uploaded]['name'];
253
- else
254
- $filename = "";
255
-
256
- if (isset($_FILES[$uploaded]['tmp_name'])) {
257
- $openname = $_FILES[$uploaded]['tmp_name'];
258
- } else {
259
- $openname = "";
260
- }
261
-
262
- //Check the file extension
263
- $check_file = strtolower($filename);
264
- $per = '.';
265
- $end = explode($per, $check_file); // workaround for PHP strict standards warning
266
- $ext_check = end($end);
267
-
268
- if (false && !weaverx_f_file_access_available()) {
269
- $errors[] = __('Sorry - Theme unable to access files.','weaver-xtreme' /*adm*/) . '<br />';
270
- $ok = false;
271
- }
272
-
273
- if ($filename == "") {
274
- $errors[] = __('You didn\'t select a file to upload.','weaver-xtreme' /*adm*/) . '<br />';
275
- $ok = false;
276
- }
277
-
278
- if ($ok && $ext_check != 'zip'){
279
- $errors[] = __("Uploaded files must have <em>.zip</em> extension.",'weaver-xtreme' /*adm*/) . "<br />";
280
- $ok = false;
281
- }
282
-
283
- if ($ok) {
284
- if (!weaverx_f_exists($openname)) {
285
- $errors[] = '<strong><em style="color:red;">' .
286
- __('Sorry, there was a problem uploading your file. You may need to check your folder permissions
287
- or other server settings.','weaver-xtreme' /*adm*/) . '</em></strong><br />' . __('Trying to use file','weaver-xtreme' /*adm*/) . "'$openname'";
288
- $ok = false;
289
- }
290
- }
291
-
292
- if ($ok) {
293
- // should be ready to go, but check out WP_Filesystem
294
- if (! WP_Filesystem()) {
295
- function wvrx_ts_wvx_return_direct() { return 'direct'; }
296
- add_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
297
- $try2 = WP_Filesystem();
298
- remove_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
299
- if (!$try2) {
300
- $errors[] = __('Sorry, there\'s a problem trying to use the WordPress unzip function. Please
301
- see the FAQ at weavertheme.com support for more information.','weaver-xtreme' /*adm*/);
302
- $ok = false;
303
- }
304
- }
305
- }
306
- if ($ok) {
307
- // $openname has uploaded .zip file to use
308
- // $filename has name of file uploaded
309
- $is_error = unzip_file( $openname, $to_dir );
310
- if ( !is_wp_error( $is_error ) ) {
311
- weaverx_save_msg(__('File ','weaver-xtreme' /*adm*/) . $filename . __(' successfully uploaded and unpacked to: <br />','weaver-xtreme' /*adm*/) . $to_dir);
312
- @unlink($openname); // delete temp file...
313
- } else {
314
- $errors[] = __("Sorry, unpacking the .zip you selected file failed. You may have a corrupt .zip file, or there many a file permissions problem on your WordPress installation.",'weaver-xtreme' /*adm*/);
315
- $errors[] = $is_error->get_error_message();
316
- $ok = false;
317
- }
318
- }
319
- if (!$ok) {
320
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' . __('ERROR','weaver-xtreme' /*adm*/) . '</em></strong></p><p>';
321
- foreach($errors as $error){
322
- echo $error.'<br />';
323
- }
324
- echo '</p></div>';
325
- }
326
- return $ok;
327
- }
328
-
329
- add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
330
- function wvrx_ts_child_saverestore_action() {
331
- echo '<h3 class="atw-option-subheader" style="font-style:italic">' . __('Use the <em>Weaver Xtreme Subthemes</em>
332
- tab to upload Add-on Subthemes.</h3><p>You can upload extra add-on subthemes you\'ve downloaded using the
333
- Subthemes tab. Note: the Save and Restore options on this page are for the custom settings you
334
- have created. These save/restore options are not related to Add-on Subthemes, although you can
335
- modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
336
- }
337
-
338
- // --------------------------------------
339
- function wvrx_ts_per_page_report() {
340
- echo '<div style="border:1px solid black; padding:1em;background:#F8FFCC;width:70%;margin:1em auto 1em auto;">';
341
- echo "<h2>" . __('Show Pages and Posts with Per Page / Per Post Settings','weaverx-axtreme') . "</h2>\n";
342
- echo "<h3>" . __('Posts','weaverx-axtreme') . "</h3>\n";
343
- wvrx_ts_scan_section('post');
344
- echo "<h3>" . __('Pages','weaverx-axtreme') . "</h3>\n";
345
- wvrx_ts_scan_section('page');
346
- echo "</div>\n";
347
- }
348
-
349
- function wvrx_ts_scan_section($what) {
350
-
351
- $post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
352
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
353
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
354
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
355
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
356
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
357
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
358
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
359
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
360
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
361
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
362
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
363
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
364
- );
365
-
366
- $args = array('posts_per_page' => -1, 'post_type' => $what, 'post_status' => 'any' );
367
- echo '<ul>';
368
-
369
- $allposts = get_posts($args);
370
- foreach ($allposts as $post) {
371
- $id = $post->ID;
372
- setup_postdata($post);
373
- $meta = get_post_meta( $id );
374
- if (!empty($meta)) {
375
- $type = $post->post_type;
376
- $title = esc_html($post->post_title);
377
- $link = esc_url(get_permalink($id));
378
- $tlink = "<a href='{$link}' alt='Post {$id}' target='_blank'>{$title}</a>";
379
- $heading = false;
380
- foreach ($meta as $name => $val_array) { // old value gets put into $val_array[0]
381
- if (in_array($name, $post_fields) ) {
382
- $val = $val_array[0]; // easier to work with
383
- if ($type == 'page') {
384
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Page settings.','weaverx-axtreme') . "</li>\n";
385
- } else {
386
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Post settings.','weaverx-axtreme') . "</li>\n";
387
- }
388
- break;
389
- }
390
- }
391
- }
392
- }
393
- echo '</ul>';
394
- }
395
- }
396
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/help/help.html DELETED
@@ -1,584 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <title>Weaver X Theme Support</title>
6
- <style type="text/css">
7
- body {
8
- background: #eeeeee;
9
- margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
10
- padding: 10px; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
11
- color: #000000;
12
- text-align: left;
13
- font-family: Verdana, Arial, Helvetica, sans-serif;
14
- font-size: 10pt;
15
- background-color: #ffd;
16
- }
17
-
18
- /* everything about each major block on the site - may be mods in some places */
19
-
20
- #container {
21
- max-width:800px;
22
- background-color: #00CC00;
23
- }
24
- #mainContent {
25
- background-color: #ffc;
26
- }
27
- .oneColFixCtr #container {
28
- max-width: 750px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
29
- background: #FFFFCD;
30
- margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
31
- border: 1px solid #000000;
32
- text-align: left; /* this overrides the text-align: center on the body element. */
33
- }
34
- .oneColFixCtr #mainContent {
35
- padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
36
- font-size:12px;
37
- }
38
- /* layouts for layout boxes */
39
- .layoutbox {
40
- width:700px;
41
- text-align:center;
42
- margin:0 25px;
43
- }
44
- .l_layout {
45
- display:block;
46
- width:140px;
47
- height:110px;
48
- float:left;
49
- margin-right:10px;
50
- margin-bottom:10px;
51
- display:inline;
52
- border:1px solid #888;
53
- color:black;
54
- text-align:center;
55
- font:15px arial, sans-serif;
56
- }
57
- .l_layout span {
58
- display:block;
59
- }
60
- .l_header {
61
- width:140px;
62
- height:20px;
63
- background:#CCF;
64
- line-height:20px;
65
- }
66
- .l_content {
67
- width:100px;
68
- height:70px;
69
- background:beige;
70
- float:left;
71
- display:inline;
72
- line-height:70px;
73
- }
74
- .l_contentcenter {
75
- width:60px;
76
- height:70px;
77
- background:beige;
78
- float:left;
79
- display:inline;
80
- line-height:70px;
81
- }
82
- .l_content2 {
83
- width:80px;
84
- height:70px;
85
- background:beige;
86
- float:left;
87
- display:inline;
88
- line-height:70px;
89
- }
90
- .l_contentw {
91
- width:140px;
92
- height:70px;
93
- background:beige;
94
- float:left;
95
- display:inline;
96
- line-height:70px;
97
- }
98
- .l_stdbar {
99
- width:40px;
100
- height:70px;
101
- float:left;
102
- display:inline;
103
- }
104
- .l_widebar {
105
- width:60px;
106
- height:70px;
107
- float:left;
108
- display:inline;
109
- }
110
- .l_righttop {
111
- width:40px;
112
- height:20px;
113
- background:#FE8;
114
- float:left;
115
- display:inline;
116
- line-height:20px;
117
- }
118
- .l_righttopwide {
119
- width:60px;
120
- height:20px;
121
- background:#FE8;
122
- float:left;
123
- display:inline;
124
- line-height:20px;
125
- }
126
- .l_rightup {
127
- width:40px;
128
- height:25px;
129
- margin:0;
130
- background:#FAA;
131
- float:left;
132
- display:inline;
133
- line-height:25px;
134
- }
135
- .l_rightright {
136
- width:40px;
137
- height:50px;
138
- margin:0;
139
- background:#FAA;
140
- float:left;
141
- display:inline;
142
- line-height:50px;
143
- }
144
- .l_rightdown {
145
- width:40px;
146
- height:25px;
147
- margin:0;
148
- background:#AFA;
149
- float:left;
150
- display:inline;
151
- line-height:25px;
152
- }
153
- .l_leftleft {
154
- width:40px;
155
- height:70px;
156
- margin:0;
157
- background:#AFA;
158
- float:left;
159
- display:inline;
160
- line-height:70px;
161
- }
162
- .l_leftshort {
163
- width:30px;
164
- height:50px;
165
- margin:0;
166
- background:#AFA;
167
- float:left;
168
- display:inline;
169
- line-height:50px;
170
- }
171
- .l_skinny {
172
- width:30px;
173
- height:50px;
174
- margin:0;
175
- background:#FAA;
176
- float:left;
177
- display:inline;
178
- line-height:50px;
179
- }
180
- .l_footer {
181
- clear:left;
182
- width:140px;
183
- height:20px;
184
- background:#DDF;
185
- color:#000;
186
- line-height:20px;
187
- }
188
- h4 {
189
- font-weight: bold;
190
- font-style:italic;
191
- color: #000066;
192
- text-decoration: underline;
193
- }
194
- h3 {
195
- font-size: medium;
196
- font-weight: bold;
197
- color: #000066;
198
- text-decoration: underline;
199
- }
200
- h2 {
201
- font-size: large;
202
- font-weight: bold;
203
- color: #000066;
204
- text-decoration: underline;
205
- margin-top: 40pt;
206
- }
207
- h1 {
208
- font-size: x-large;
209
- font-weight: bold;
210
- color: #000066;
211
- text-decoration: underline;
212
- }
213
- .codebox {
214
- font-family: "Courier New", Courier, monospace;
215
- font-size: 10px;
216
- font-style: normal;
217
- background-color: #E8E8E8;
218
- margin: 10px;
219
- padding: 4px;
220
- border: 1px solid #333333;
221
- color: #000000;
222
- width: 80%;
223
- }
224
- .attrs {
225
- font-family: Arial, Helvetica, sans-serif;
226
- font-size: 10pt;
227
- color:#000000;
228
- text-decoration: none;
229
- }
230
- .css {
231
- font-family: "Courier New", Courier, monospace;
232
- font-size: 9pt;
233
- font-style: normal;
234
- }
235
- .box {
236
- color: #000000;
237
- text-decoration: none;
238
- margin: 5px;
239
- padding: 5px;
240
- border: thin solid #000000;
241
- }
242
- .nospace {
243
- margin-top: 5px;
244
- margin-bottom: 5px;
245
- }
246
- .style3 {
247
- font-family: "Courier New", Courier, monospace
248
- }
249
- .style4 {
250
- font-family: monospace
251
- }
252
- .style6 {
253
- color: #990000;
254
- font-style: italic;
255
- }
256
- .style7 {
257
- color: #CC3300;
258
- font-weight: bold;
259
- }
260
- .code1 {
261
- font-family: "Courier New", Courier, monospace;
262
- font-size: 14px;
263
- font-style: italic;
264
- }
265
- .red-highlight {
266
- color: #CC3300;
267
- }
268
- </style>
269
- </head>
270
- <body class="oneColFixCtr">
271
- <div id="container">
272
- <div id="mainContent"> <a name="top" id="top"></a>
273
- <h2><b>Weaver X Theme Support Plugin Documentation -- Version 1.0</b></h2>
274
- <h4>Table of Contents</h4>
275
- <ul style="line-height:1.7em;">
276
- <li><a href="#summary"><strong>Plugin Summary</strong></a></li>
277
- <li><strong><a href="#admin_page">Weaver X Theme Extras Admin Page</a> </strong></li>
278
- <li><a href="#sc_summary"><strong>Shortcode Summary</strong></a></li>
279
- <ul>
280
- <li><strong><a href="#bloginfo">[bloginfo arg='name' style='your css']</a></strong></li>
281
- <li><strong><a href="#box">[box]text[/box]</a></strong></li>
282
- <li><a href="#tab_group"><strong>[tab_group] - content in tabs</strong></a></li>
283
- <li><strong><a href="#headerimage">[header_image] Shortcode</a></strong></li>
284
- <li><strong><a href="#schtml">[html]</a></strong></li>
285
- <li><strong><a href="#scdiv">[div]text[/div]</a>, <a href="#schtml">[span]text[/span]</a></strong></li>
286
- <li><strong><a href="#sciframe"> [iframe]</a></strong></li>
287
- <li><strong><a href="#scshowif">[show/hide_if]</a></strong></li>
288
- <li><strong><a href="#sitetitlesc">[site_title], [site_tagline]</a></strong></li>
289
-
290
- <li><strong><a href="#video">Video - [vimeo], [youtube]</a></strong></li>
291
- </ul>
292
- <li><a href="#widg-sum"><strong>Widget Summary</strong></a>
293
- <ul>
294
- <li><strong><a href="#widg-login">Weaver X Login Widget</a></strong></li>
295
- <li><strong><a href="#widg_pp_text">Weaver X Per Page Text</a></strong></li>
296
- <li><strong><a href="#widg_text_2">Weaver X Text 2</a></strong></li>
297
- </ul>
298
- </li>
299
- </ul>
300
- <h3><a name="summary" id="summary"></a>Plugin Summary </h3>
301
- <p>The Weaver X Theme Support Plugin provides a collection of shortcodes to allow you to easily add extra content and features to your regular content. These shortcodes will work with almost any WordPress theme. </p>
302
- <p>While these shortcodes should prove useful with most any theme, one of the goals of these shortcodes is to provide an alternative to users of the Weaver X theme.</p>
303
- <h2><a name="admin_page" id="admin_page"></a>Weaver Xtreme Theme Extras Admin Page</h2>
304
- <p>This plugin has just a few options, all found on the Weaver X Theme Support admin page under the WordPress dashboard Appearance section.</p>
305
- <h2><a name="sc_summary" id="sc_summary"></a>Shortcode Summary</h2>
306
- <h3><a name="tab_group" id="tab_group"></a>[tab_group] - content in tabs </h3>
307
- <p>Show content displayed on tabbed pages.</p>
308
- <p><strong>Shortcode usage:</strong><br />
309
- <pre>
310
- [tab_group border_color=black page_min_height=200px]
311
- [tab title='tab one']This is the content found on first tab.[/tab]
312
- [tab title='tab two']And we have more content for the second tab.[/tab]
313
- [tab title='last tab']And this is the last tab. There could be more.[/tab]
314
- [/tab_group]
315
- </pre>
316
- <h4>Short code parameters</h4>
317
- You can supply values for these parameters to control the look of the tabbed section.
318
- <br />
319
- <ul>
320
- <li><b>border_color:</b> tab and pane border color - default #888</li>
321
- <li><b>tab_bg</b>: normal bg color of tab (default #CCC)</li>
322
- <li><b>tab_selected_color</b>: color of tab when selected (default #EEE)</li>
323
- <li><b>pane_min_height</b>: min height of a pane to help make all even if needed</li>
324
- <li><b>pane_bg</b>: bg color of pane</li>
325
- </ul>
326
- </p>
327
- <h3><a name="headerimage" id="headerimage"></a><strong>[header_image]</strong></h3>
328
- <p>The <code>[header_image]</code> shortcode allows you display the current header image wherever you want.
329
- For example, you can get the header image into the Header Widget Area by using this shortcode in a text widget.
330
- The current standard or mobile header image will be displayed. Only the <code>&lt;img ... &gt;</code> is displayed --
331
- the image will not be wrapped in a link to the site.</p>
332
-
333
- <p><strong>Shortcode usage:</strong> <code>[header_image h='size' w='size' style='inline-style']</code>
334
- <br />
335
- <ol>
336
- <li><strong>w='size' h='size'</strong> - By default, no height or image properties are included with the
337
- header <code>&lt;img ... &gt;</code>, which will result in an image scaled to fit into whatever the natural
338
- width of the enclosing HTML container is (the content area, a text widget, etc.). You may specify an explicit
339
- value (usually in px) for the height and width of the image.
340
- </li>
341
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
342
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
343
- <code>style="your-rules;"</code> - using double quotation marks.
344
- </li>
345
- </ol>
346
- <h3><a name="schtml" id="schtml"></a><strong>[html]</strong></h3>
347
-
348
- <p>The Weaver X Theme Support <code>[html]</code> shortcode allows you to add arbitrary HTML to your post and page content. The
349
- main purpose of this shortcode is to get around the auto paragraph and line break and other HTML stripping functionality
350
- of the WordPress editor.</p>
351
-
352
- <p><strong>Shortcode usage:</strong> <code>[html html-tag args='parameters']</code>
353
- <br />
354
- <ol>
355
- <li><strong>html-tag</strong> - The first parameter to the shortcode must be present, and must be a standard
356
- HTML tag - <code>p</code>, <code>br</code>, or <code>span</code>, for example. You just supply the tag - no quotation
357
- marks, no '=', just the tag. The shortcode provides the &lt; and &gt;. If you need a wrapping HTML tag (e.g., <code>span</code> and <code>/span</code>), use
358
- two shortcodes:<br />
359
- <code>[html span args='style="color:red"']content to make red[html /span]</code>
360
- </li>
361
- <li><strong>args='parameters'</strong> - Allows you to specify arbitrary parameters for your HTML tag. See the example above.
362
- </li>
363
- </ol>
364
- </p>
365
-
366
- <h3><a name="scdiv" id="scdiv"></a><strong>[div]text[/div]</strong>, [span]text[/span]</h3>
367
-
368
- <p>The Weaver X Theme Support <code>[div]</code> and [span] shortcodes allow you to easily add HTML &lt;div&gt; or &lt;span&gt; tags to your post and page content. The
369
- main purpose of these shortcodes is to get around need to switch to the HTML editor view when you need to
370
- wrap your content in a &lt;div&gt; or &lt;span&gt;.</p>
371
- <p>
372
- This will work exactly like a standard HMTL &lt;div&gt;and &lt;span&gt; tags. It supports 'id', 'class',
373
- and 'style' parameters, which are the most useful. Instead of wrapping your text in &lt;div&gt; or &lt;span&gt; tags, wrap them like
374
- this (the Visual view will work just fine):<br />
375
- <code>[div style="font-size:20px;']This content will be large.[/div]</code><br />
376
- <code>[span style=&quot;font-size:20px;']This content will be large.[/span]</code></p>
377
- <p><strong>Shortcode usage:</strong> <code>[div id='class_id' class='class_name' style='style_values']text[/div]</code>
378
- <br />
379
- <code>[span id='class_id' class='class_name' style='style_values']text[/span]</code> <br />
380
- <ol>
381
- <li><strong>id='class_id' class='class_name' style='style_values'</strong> - Allows you to specify id, class, and style for the &lt;div&gt;. See the example above.
382
- </li>
383
- </ol>
384
- </p>
385
-
386
- <h3><a name="sciframe" id="sciframe"></a><strong>iframe - [iframe]</strong></h3>
387
-
388
- <p>The <code>[iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
389
- the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>
390
-
391
- <p><strong>Shortcode usage:</strong> <code>[iframe src='http://example.com' height=600 percent=100 style="style"]</code>
392
- <br />
393
- <ol>
394
- <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
395
- </li>
396
- <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
397
- </li>
398
- <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
399
- </li>
400
- <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values".
401
- </li>
402
- </ol>
403
- </p>
404
-
405
- <h3><a name="scshowif" id="scshowif"></a><strong>[show_if]content[/show_if], [hide_if]</strong>content [/hide_if]</h3>
406
- <p>The <code>[show_if]</code> and <code>[hide_if]</code> shortcodes allow you to selectively
407
- display or hide content depending if any of several conditions are met.</p>
408
-
409
- <p><strong>Shortcode usage:</strong> <code>[hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]</code>
410
- </p>
411
- <p>You bracket the content you want to selectively display with <code>[show/hide_if]</code> and closing
412
- <code>[/show/hide_if]</code> tags. That content can contain other shortcodes as needed. If you specify more than one parameter to the short code, then all the conditions must be met (logical AND). Any paramaters you don't include are considered true.</p>
413
- <h4>Parameters</h4>
414
- <p>'device' =&gt; 'default', // desktop, mobile, smalltablet, phone, all<br />
415
- 'logged_in' =&gt; 'default', // true or false<br />
416
- 'not_post_id' =&gt; 'default', // comma separated list of post IDs (includes pages, too)<br />
417
- 'post_id' =&gt; 'default', // comma separated list<br />
418
- 'user_can' =&gt; 'default' // http://codex.wordpress.org/Function_Reference/current_user_can</p>
419
- <p>
420
- <strong>device=desktop | mobile | smalltablet | phone </strong> - The device parameter for <code>[show/hide_if]</code> is designed to allow you to hide <em>or</em> show any content on any of the
421
- device sizes recognized by Weaver Xtreme (or any theme, actually): 'phone', 'smalltablet', and 'desktop', or 'mobile' for non-desktop devices. If you want to show or hide content on
422
- a specific device, you give the <span class="code1">device</span> parameter a value of desktop, mobile, smalltablet, phone, or none (e.g., <code>[show_if device=mobile]</code>). </p>
423
- <p><strong>logged_in=true | false</strong> - This will hide or display content depending if the visitor is logged into the site or not. </p>
424
- <p><strong>post_id=34,875</strong> / <strong>not_post_id=1,2,3 </strong>- This will display (or not display) the content depending if the current page or single post view is included in the comma separated list of WordPress page/post IDs. You can use both to refine a list of pages or posts to display or not display. Note that even though the parameter is called 'post_id', it applies equally to pages and posts. Depending on where you use the shortcode, it will apply to a post differently depending if it is on a blog or single page view of a post. Note that the default WordPress blog (as opposed to the Weaver Xtreme Page with Posts template) does not have a post_ID.</p>
425
- <p><strong>user_can=user-capability</strong> - This will show or hide depending if the current visitor has certain WordPress user capabilities. There are many capabilities which are defined in the <a href="http://codex.wordpress.org/Function_Reference/current_user_can" target="_blank">WordPress Codex</a>. This shortcode supports any of the listed capabilities for maximum flexibility. If you don't want to learn about all the capabilities listed in the Codex, you can use the following capability values to determine if the visitor has a specific role (as defined on the Dashboard Users admin pages). For example:<br />
426
- <br />
427
- <span class="code1">[show_if user_can=publish_pages]content for Editors and above[/show_if]</span><br />
428
- <br />
429
- Note that the higher roles have all the capabilities of the lower roles - an Editor can do everything a Contributor can.</p>
430
- <table width="80%" border="1">
431
- <caption>
432
- Capabilities to Specify Role
433
- </caption>
434
- <tr>
435
- <th scope="col">Role</th>
436
- <th scope="col">Capability</th>
437
- </tr>
438
- <tr>
439
- <td>Subscriber</td>
440
- <td>read</td>
441
- </tr>
442
- <tr>
443
- <td>Contributor</td>
444
- <td>edit_posts</td>
445
- </tr>
446
- <tr>
447
- <td>Author</td>
448
- <td>publish_posts</td>
449
- </tr>
450
- <tr>
451
- <td>Editor</td>
452
- <td>publish_pages</td>
453
- </tr>
454
- <tr>
455
- <td>Administrator</td>
456
- <td>manage_options</td>
457
- </tr>
458
- <tr>
459
- <td>Super Administrator (MultiSite)</td>
460
- <td>manage_network</td>
461
- </tr>
462
- </table>
463
- <p>&nbsp;</p>
464
- <h3><a name="sitetitlesc" id="sitetitlesc"></a><strong>[site_title style="style" matchtheme=false], [site_tagline style="style" matchtheme=false]</strong></h3>
465
-
466
- <p>The <code>[site_title]</code> and <code>[site_tagline]</code> shortcodes allow you display the current
467
- site title and site tagline. This can be useful in a text widget in the Header Widget Area, for example.</p>
468
- <p><em>Note:</em> If you want to position the content of a text widget within the a cell of the Header Widget Area, you could use the following
469
- example:</p>
470
- <p><code>[site_title style='font-size:150%;position:absolute;padding-left:20px;padding-top:30px;']</code></p>
471
-
472
- <p><strong>Shortcode usage:</strong> <code>[site_title style='inline-style' matchtheme=false] [site_tagline style='inline-style' matchtheme=false]</code>
473
- <br />
474
- <ol>
475
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
476
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
477
- <code>style="your-rules;"</code> - using double quotation marks.
478
- </li>
479
- <li><strong>matchtheme=true</strong> - Allows you to add match the theme styling as defined in the site header if set to true.
480
- This will match the color/style/font of the header version of the site title and tagline with the exception of hide settings.
481
- The shortcode version will not be hidden on any device unless you also wrap the shortcode with a [show_if/hide_if] shortcode.
482
- </li>
483
-
484
- </ol>
485
-
486
- <h3><a name="bloginfo" id="bloginfo"></a><strong>[bloginfo arg='name' style='your css']</strong></h3>
487
-
488
- <p>This shortcode can be used to access the WordPress function 'get_bloginfo($arg)'. This will return a number of useful
489
- strings depending on the value. All the supported values are listed at http://codex.wordpress.org/Function_Reference/get_bloginfo.
490
- Some useful values include 'stylesheet_directory' and 'template_directory'. You can wrap the bloginfo output with css added to a &lt;span style=&quot;your css&quot;&gt;.
491
- </p>
492
-
493
- <h3><a name="box" id="box"></a><strong>[box]text[/box]</strong></h3>
494
-
495
- <p>
496
- Wrap content in a box.</p>
497
- <p><strong>Shortcode Usage:</strong> <code>[box align=left background=#fff border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules']text[/box]</code></p>
498
- <ol>
499
- <li><strong>align=align</strong>: Leave blank, or specify left, center, or right for alignment of box within surrounding text.</li>
500
- <li><strong>border=true</strong>: True is default. Specify false or 0 for no borders.</li>
501
- <li><strong>border_rule='1px solid black</strong>': Specify a compound border CSS value to replace the default '1px solid black'.</li>
502
- <li><strong>border_radius=4</strong>: Default is none - specify a px value for the corner radius if you want rounded corners.</li>
503
- <li><strong>color=#000</strong>: Default is inherit - specify a valid color for the color of the text in the box.</li>
504
- <li><strong>background=#fff</strong>: Default is inherit - specify color for box background color.</li>
505
- <li><strong>margin=1</strong>: Default is 0 - specify an 'em' value for margin around the box. Using a margin overrides align parameter.</li>
506
- <li><strong>padding=1</strong>: Default 1 - specify an 'em' value for padding inside box.</li>
507
- <li><strong>shadow=0</strong>: Default 0 - specify a value from 1 to 5 for a border around the box.</li>
508
- <li><strong>style=inline-style</strong>: any additional custom styling for the box</li>
509
- <li><strong>width=100</strong>: A percentage width for the box within its surrounding container.</li>
510
- </ol>
511
- <h3><a name="video" id="video"></a><strong>Video - [vimeo], [youtube]</strong></h3>
512
- <p>Weaver X Theme Support supports specialized shortcodes to display video. While there are other ways to embed video, the Weaver X Theme Support versions have two important features. First, they will auto adjust to the width of your content, <em><strong>including</strong></em> the mobile view. Second, they use the latest iframe/HTML5 interface provided by YouTube and Vimeo.</p>
513
- <p><strong>Specifying Video Display Size for both shortcodes</strong></p>
514
- <p>Weaver X Theme Support supports a common set of options for both the YouTube and Vimeo shortcodes to support displaying your videos with a specific width and correct height. By default, your videos will be displayed using the full width of the content area being used (percent=100). The percent= parameter is used to specify the width you want.</p>
515
- <p>The height of the video is automatically determined based on the width and the display ratio of the particular video. </p>
516
- <p>Finally, you may specify if the video should be centered or no within the display area using &quot;center=0&quot; to not center (centering is on by default).</p>
517
- <p>Note - if you want to display more than one video horizontally, use &quot;center=0&quot; and specify an appropriate percentage to fit all the videos.</p>
518
- <p>Parameters in Common</p>
519
- <ul>
520
- <li>percent=100 - By default, the video will be sized to fill the full content space. You can use the percent value to make
521
- the video use a percentage of the content space (but mobile will always use full width).</li>
522
- <li>center=1 - Specify 'center=0' to disable centering of the video.</li>
523
- <li>sd=0 - By default, Weaver X Theme Support will generate sizes for HD/widescreen videos. To display old 4:3 standard definition videos, include 'sd=1' in the shortcode.</li>
524
- </ul>
525
- <h4>Vimeo</h4>
526
- <pre><strong>[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex
527
- autoplay=0 loop=0 portrait=1 title=1 byline=1]
528
- </strong></pre>
529
- <p>This will display Vimeo videos. At the minimum, you can provide the standard http://vimeo.com/nnnnn link, or just the video ID number (which is part of the Vimeo Link). The other Vimeo specific options include:</p>
530
- <ul>
531
- <li>color - You can optionally specify a Vimeo color theme using 6 hex digits for a color value.</li>
532
- <li>autoplay - Add 'autoplay=1' to have the video autoplay.</li>
533
- <li>loop - Add 'loop=1' to have the video loop.</li>
534
- <li>portrait, title, byline - You can specify a value '=0' for these to hide the display of the corresponding element on the Vimeo player.
535
- Portrait is the avatar/icon, title is the video title, and byline is source attribution.<br />
536
- </li>
537
- </ul>
538
- <h4>YouTube</h4>
539
- <code><strong>[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=1 https=0 privacy=0 {youtube options}]
540
- </strong></code>
541
- <p>This will display YouTube videos. At the minimum, you can provide the standard http://youtu.be/xxxxxx share link (including the options YouTube lets you specify), the long format share link, or just the video ID number using the id=videoid parameter (which is part of the YouTube Link). The other YouTube specific options include:</p>
542
- <ul>
543
- <li>rel - If you specify 'rel=0', YouTube won't show related videos after the video plays.</li>
544
- <li>https - If you specify 'https=1', YouTube will use the https protocol.</li>
545
- <li>privacy - If you specify 'privacy=1', YouTube won't used cookies to track your viewing.</li>
546
- </ul>
547
- <p>In addition to the above [youtube] options, the shortcode also supports most standard YouTube options. These are more fully described on the <a href="http://code.google.com/apis/youtube/player_parameters.html" target="_blank">YouTube Embedded Player Parameters</a> page.</p>
548
- <p>The supported options, with Weaver X Theme Support's default values include:</p>
549
- <p>'autohide' = '1' . . . . . . 0: always show controls; 1: autohide controls; 2: autohide progress bar<br />
550
- 'autoplay' = '0' . . . . . . 1: auto play; 0: don't<br />
551
- 'border' = '0' . . . . . . . . 0: no border; 1: border using color1 and color2 (don't seem to work)<br />
552
- 'color' = not set . . . . . . progress bar color - red or white<br />
553
- 'color1' = not set . . . . . RGB hex value for border color<br />
554
- 'color2' = not set . . . . . RGB hex value for control bar bg<br />
555
- 'controls' = '1' . . . . . . . 0: hide player controls<br />
556
- 'disablekb' = '0' . . . . . . 1: disable keyboard controls<br />
557
- 'egm' ='0' . . . . . . . . . . . 1: enable &quot;Enhanced Genie Menu&quot;<br />
558
- 'hd' = '0' . . . . . . . . . . . . 1: enable HD playback by default<br />
559
- 'iv_load_policy' = '1' . . . 1: show annotations; 3: don't show; 2: discontinued support<br />
560
- 'loop' = '0' . . . . . . . . . . . 1: loop video<br />
561
- 'modestbranding' = '0' . .1: hide YouTube logo - will still show label in upper right corner<br />
562
- 'origin' = not set . . . . . . . See YouTube docs<br />
563
- 'playlist' = not set . . . . . . Comma separated list of videoIDs to play (id/url video played 1st)<br />
564
- 'showinfo' = '1' . . . . . . . 0: hide video title<br />
565
- 'showsearch' = '1' . . . . . 0: hide video searchbox<br />
566
- 'start' = not set . . . . . . . start vide this number of seconds from start<br />
567
- 'theme' = 'dark' . . . . . . . dark or light - display theme for player<br />
568
- 'wmode' = 'transparent' . Keeps video behind menu bars, etc. Other values available - see YouTube</p>
569
- <h2><a name="widg-sum" id="widg-sum"></a>Widget Summary</h2>
570
- <h3><a name="widg-login" id="widg-login"></a>Weaver X Login Widget</h3>
571
- <p>This simple widget shows a login in link, or a welcome, Site Admin, and Log out choice if the user is logged in.</p>
572
- <h3><a name="widg_pp_text" id="widg_pp_text"></a>Weaver X Per Page Text</h3>
573
- <p>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>if you want a title, and define Custom Field<em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text, HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)</p>
574
- <h3><a name="widg_text_2" id="widg_text_2"></a>Weaver X Text 2</h3>
575
- <p>This widget lets you add two columns of text. It is most useful in wide widget areas such as a content top or bottom widget area, or a wide footer widget area.</p>
576
- <p>&nbsp;</p>
577
- <h2><br />
578
- </h2>
579
- <p>The Weaver X Theme Support Plugin and this document are &copy; 2014, Bruce E. Wampler. <a ref="http://weavertheme.com">Web Site - WeaverTheme.com</a></p>
580
-
581
- </div>
582
- </div>
583
- </body>
584
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,594 +0,0 @@
1
- <?php
2
- /* Display per page and per post options.
3
- *
4
- * __ added - 12/10/14
5
- *
6
- * IMPORTANT! - this code and the Weaver Plus plugin need to be maintained in parallel!
7
- */
8
-
9
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
10
- // Admin panel that gets added to the page edit page for per page options
11
-
12
-
13
- if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
14
-
15
- function wvrx_ts_isp_true($val) {
16
- if ($val) return true;
17
- return false;
18
- }
19
-
20
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
21
- global $post;
22
- ?>
23
- <div style="float:left;width:<?php echo $width; ?>%"><label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
24
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> />
25
- <?php echo($msg . '</label></div>');
26
- for ($i = 0 ; $i < $br ; $i++)
27
- echo '<br class="page_checkbox" style="clear:both;" />';
28
- }
29
-
30
- function wvrx_ts_page_layout( $page = 'page' ) {
31
-
32
- if ( $page == 'page')
33
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaver-xtreme' /*adm*/);
34
- else
35
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaver-xtreme' /*adm*/);
36
-
37
- $opts = array( 'id' => '_pp_page_layout',
38
- 'info' => $msg,
39
- 'value' => array(
40
- array('val' => '', 'desc' => __('Use Default','weaver-xtreme' /*adm*/) ),
41
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaver-xtreme' /*adm*/) ),
42
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaver-xtreme' /*adm*/) ),
43
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaver-xtreme' /*adm*/) ),
44
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaver-xtreme' /*adm*/) ),
45
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaver-xtreme' /*adm*/) ),
46
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaver-xtreme' /*adm*/) ),
47
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaver-xtreme' /*adm*/) )
48
- ));
49
- wvrx_ts_pp_select_id($opts);
50
- }
51
- //--
52
-
53
-
54
-
55
- function wvrx_ts_pp_replacement( $desc, $id ) {
56
- global $post;
57
- global $wp_registered_sidebars;
58
-
59
- $id = '_' . $id;
60
-
61
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
62
-
63
-
64
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
65
- $area_name = $value['id']; //sanitize_title($value['name']);
66
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
67
- echo ' <option value="' . $area_name . '"';
68
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
69
- echo '>' . substr($area_name,9) . "</option>\n";
70
-
71
- }
72
- }
73
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
74
- }
75
- //--
76
-
77
-
78
- function wvrx_ts_pp_select_id( $value ) {
79
- global $post;
80
-
81
- if ( isset( $value['name'] ) && $value['name'] != '' )
82
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
83
-
84
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
85
-
86
- foreach ($value['value'] as $option) {
87
- if ( $option['val'] == '' ) {
88
- echo '<option value="">';
89
- } else {
90
- echo ' <option value="' . $option['val'] . '"';
91
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
92
- echo ">";
93
- }
94
- echo $option['desc'] . "</option>\n";
95
- }
96
- echo '</select>&nbsp;' . $value['info'] . "\n";
97
- }
98
- //--
99
-
100
-
101
-
102
- function wvrx_ts_pwp_atw_show_post_filter() {
103
- // use plugin options...
104
- global $post;
105
-
106
- if ( function_exists( 'atw_showposts_installed' ) ) {
107
- $filters = atw_posts_getopt('filters');
108
-
109
- $first = true;
110
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
111
- foreach ($filters as $filter => $val) { // display dropdown of available filters
112
- if ( $first ) {
113
- $first = false;
114
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
115
- } else {
116
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
117
- }
118
- }
119
- echo '</select>&nbsp;' .
120
- __('Use a Filter from <em>ATW Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaver-xtreme' /*adm*/) .
121
- '<br /> <span style="margin-left:8em;"><span>' .
122
- __('(Note: ATW Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts using this filter.)','weaver-xtreme' /*adm*/) .
123
- '<br />' . '<br />';
124
- } else {
125
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaver-xtreme' /*adm*/); ?>
126
- <br /><br />
127
- <?php }
128
- }
129
- //--
130
-
131
-
132
-
133
- function wvrx_ts_pwp_type() {
134
- $opts = array( 'name' => __('Display posts as:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
135
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaver-xtreme' /*adm*/),
136
- 'value' => array(
137
- array('val' => '', 'desc' => '&nbsp;' ),
138
- array('val' => 'full', 'desc' => __('Full post','weaver-xtreme' /*adm*/) ),
139
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaver-xtreme' /*adm*/) ),
140
- array('val' => 'title', 'desc' => __('Title only','weaver-xtreme' /*adm*/) ),
141
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaver-xtreme' /*adm*/) )
142
- ));
143
- wvrx_ts_pp_select_id($opts);
144
- }
145
-
146
-
147
- function wvrx_ts_pwp_cols() {
148
-
149
- $opts = array( 'name' => __('Display post columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
150
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaver-xtreme' /*adm*/),
151
- 'value' => array(
152
- array('val' => '', 'desc' => '&nbsp;'),
153
- array('val' => '1', 'desc' => __('One Column','weaver-xtreme' /*adm*/) ),
154
- array('val' => '2', 'desc' => __('Two Columns','weaver-xtreme' /*adm*/) ),
155
- array('val' => '3', 'desc' => __('Three Columns','weaver-xtreme' /*adm*/) ) )
156
- );
157
- wvrx_ts_pp_select_id($opts);
158
-
159
- weaverx_html_br();
160
-
161
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_pwp_masonry',
162
- 'info' => __('Use <em>Masonry</em> for multi-column display','weaver-xtreme' /*adm*/),
163
- 'value' => array(
164
- array('val' => '', 'desc' => '&nbsp;' ),
165
- array('val' => '1', 'desc' => __('One Column','weaver-xtreme' /*adm*/) ),
166
- array('val' => '2', 'desc' => __('Two Columns','weaver-xtreme' /*adm*/) ),
167
- array('val' => '3', 'desc' => __('Three Columns','weaver-xtreme' /*adm*/) ),
168
- array('val' => '4', 'desc' => __('Four Columns','weaver-xtreme' /*adm*/) ),
169
- array('val' => '5', 'desc' => __('Five Columns','weaver-xtreme' /*adm*/) ) )
170
- );
171
- wvrx_ts_pp_select_id($opts2);
172
-
173
- ?>
174
- <br />
175
- <?php
176
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaver-xtreme' /*adm*/),90,1);
177
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaver-xtreme' /*adm*/),90,1);
178
- }
179
-
180
- function wvrx_ts_page_extras() {
181
- global $post;
182
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
183
-
184
- if ( !( current_user_can('edit_themes')
185
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
186
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
187
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
188
- ) {
189
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
190
- echo '<p>' .
191
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaver-xtreme' /*adm*/) .
192
- '</p>';
193
- else
194
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
195
- return; // don't show per post panel
196
- }
197
-
198
- echo("<div style=\"line-height:150%;\"><p>\n");
199
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
200
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
201
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaver-xtreme' /*adm*/); ?>
202
- </div><br />
203
- <?php
204
- }
205
-
206
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
207
- <div style="padding:2px; border:2px solid red; background:#FAA;">
208
- <?php _e('<strong>WARNING!</strong>
209
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
210
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
211
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
212
- If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
213
- including the option of using the Page with Posts page template,
214
- then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
215
- the <em></em>&mdash; Select &mdash;</em> default value.','weaver-xtreme' /*adm*/); ?>
216
- </div><br />
217
- <?php
218
- return;
219
- }
220
- echo '<strong>' . __('Page Templates','weaver-xtreme' /*adm*/) . '</strong>';
221
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaver-xtreme' /*adm*/));
222
- echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
223
- weaverx_html_br();
224
- _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaver-xtreme' /*adm*/);
225
- weaverx_html_br();
226
- echo '<strong>' . __('Per Page Options','weaver-xtreme' /*adm*/) . '</strong>';
227
- weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaver-xtreme' /*adm*/));
228
- weaverx_html_br();
229
- _e('These settings let you hide various elements on a per page basis.','weaver-xtreme' /*adm*/);
230
- weaverx_html_br();
231
-
232
-
233
- wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaver-xtreme' /*adm*/));
234
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaver-xtreme' /*adm*/));
235
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaver-xtreme' /*adm*/), 33, 1);
236
-
237
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaver-xtreme' /*adm*/));
238
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaver-xtreme' /*adm*/));
239
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaver-xtreme' /*adm*/),33,1);
240
-
241
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaver-xtreme' /*adm*/));
242
- wvrx_ts_page_checkbox('_pp_full_browser_height',__('Force full browser height','weaver-xtreme' /*adm*/),33,2);
243
-
244
- _e('<em>Note:</em> the following options work with the default menu - not custom menus.','weaver-xtreme' /*adm*/);
245
- weaverx_html_br();
246
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaver-xtreme' /*adm*/),90,1);
247
-
248
-
249
- wvrx_ts_page_checkbox('_pp_stay_on_page',__('Menu "Placeholder" page. Useful for top-level menu item - don\'t go anywhere when menu item is clicked.','weaver-xtreme' /*adm*/),90,2);
250
-
251
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90,1);
252
-
253
- if (weaverx_allow_multisite()) {
254
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90,1);
255
- }
256
-
257
- ?>
258
- <p><strong><?php _e('Sidebars &amp; Widgets','weaver-xtreme' /*adm*/); ?></strong></p>
259
-
260
- <?php
261
- wvrx_ts_page_layout();
262
- ?>
263
- <br />
264
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
265
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
266
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaver-xtreme' /*adm*/); ?> <br /><br />
267
- <?php
268
-
269
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaver-xtreme' /*adm*/),40);
270
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaver-xtreme' /*adm*/),40,1);
271
-
272
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaver-xtreme' /*adm*/),40);
273
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaver-xtreme' /*adm*/),40,1);
274
-
275
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaver-xtreme' /*adm*/),40);
276
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaver-xtreme' /*adm*/),40,1);
277
-
278
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaver-xtreme' /*adm*/),40);
279
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaver-xtreme' /*adm*/),40,1);
280
- ?>
281
-
282
- <p><strong><?php _e('Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
283
- <p>
284
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
285
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
286
- </p>
287
- <?php
288
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
289
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
290
-
291
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
292
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
293
-
294
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-top-widget-area' );
295
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-bottom-widget-area' );
296
-
297
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaver-xtreme' /*adm*/) , 'page-top-widget-area' );
298
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaver-xtreme' /*adm*/) , 'page-bottom-widget-area' );
299
- ?>
300
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
301
- <?php
302
- $opts3 = array( 'id' => '_pp_fi_location',
303
- 'info' => __('How to display Page FI on this page','weaver-xtreme' /*adm*/),
304
- 'value' => array(
305
- array('val' => '', 'desc' => __('Default Page FI','weaver-xtreme' /*adm*/) ),
306
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
307
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
308
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
309
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
310
- array('val' => 'hide', 'desc' => __('Hide FI on this Page','weaver-xtreme' /*adm*/) )
311
- )
312
- );
313
- wvrx_ts_pp_select_id($opts3);
314
- ?>
315
- <br />
316
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
317
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
318
- <?php _e('<em>Featured Image Link</em> - Full URL for link from FI','weaver-xtreme' /*adm*/); ?>
319
- <br style="clear:both;" />
320
- <hr />
321
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
322
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
323
-
324
- <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaver-xtreme' /*adm*/); ?>
325
- <br />
326
- </p>
327
- <p>
328
- <?php _e('<strong>Settings for "Page with Posts" Template</strong>','weaver-xtreme' /*adm*/);
329
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaver-xtreme' /*adm*/) );
330
-
331
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
332
- if ($template == 'paget-posts.php') {
333
- ?>
334
- <br />
335
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
336
- The settings will be combined for the final filtered list of posts displayed.
337
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
338
- <br />
339
-
340
- <input type="text" size="30" id="_pp_category" name="_pp_category"
341
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
342
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaver-xtreme' /*adm*/); ?>
343
- <br />
344
-
345
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
346
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
347
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaver-xtreme' /*adm*/); ?> <br />
348
-
349
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
350
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
351
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display.",'weaver-xtreme' /*adm*/); ?> <br />
352
-
353
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
354
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
355
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaver-xtreme' /*adm*/); ?> <br />
356
-
357
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
358
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
359
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaver-xtreme' /*adm*/); ?> <br />
360
-
361
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
362
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
363
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaver-xtreme' /*adm*/); ?> <br />
364
-
365
- <input type="text" size="30" id="_pp_author" name="_pp_author"
366
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
367
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaver-xtreme' /*adm*/); ?> <br />
368
-
369
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
370
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
371
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaver-xtreme' /*adm*/); ?> <br />
372
-
373
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
374
-
375
- <?php wvrx_ts_pwp_type(); ?><br />
376
- <?php wvrx_ts_pwp_cols(); ?><br />
377
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
378
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
379
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaver-xtreme' /*adm*/); ?>
380
- <br />
381
-
382
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
383
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
384
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
385
- __("Hide first \"n\" posts</em> - Start with post n+1.
386
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaver-xtreme' /*adm*/) ; ?>
387
-
388
- <br /><br />
389
-
390
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaver-xtreme' /*adm*/), 40); ?>
391
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaver-xtreme' /*adm*/), 40, 1); ?>
392
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaver-xtreme' /*adm*/), 40); ?>
393
- </p>
394
- <?php
395
- } else { // NOT a page with posts
396
- ?> <p>
397
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
398
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
399
- settings for "Page with Posts" will be displayed here. Current page template:','weaver-xtreme' /*adm*/); ?>
400
- <?php echo $template; ?>
401
- </p>
402
- <?php
403
- }
404
- do_action('weaverxplus_add_per_page');
405
- ?>
406
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
407
- </div>
408
- <?php
409
- }
410
-
411
- function wvrx_ts_post_extras() {
412
- global $post;
413
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
414
- if ( !( current_user_can('edit_themes')
415
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
416
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
417
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
418
- ) {
419
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
420
- return; // don't show per post panel
421
- }
422
- ?>
423
- <div style="line-height:150%;">
424
- <p>
425
- <?php
426
- echo '<strong>' . __('Per Post Options','weaver-xtreme' /*adm*/) . '</strong>';
427
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaver-xtreme' /*adm*/));
428
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
429
- weaverx_html_br();
430
- _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.','weaver-xtreme' /*adm*/);
431
- weaverx_html_br();
432
-
433
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaver-xtreme' /*adm*/), 40);
434
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaver-xtreme' /*adm*/),55,1);
435
-
436
-
437
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaver-xtreme' /*adm*/),40);
438
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaver-xtreme' /*adm*/), 40, 1);
439
-
440
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaver-xtreme' /*adm*/),40);
441
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaver-xtreme' /*adm*/),40,1);
442
-
443
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaver-xtreme' /*adm*/),40);
444
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaver-xtreme' /*adm*/),40,1);
445
- wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaver-xtreme' /*adm*/),90,1);
446
-
447
- wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaver-xtreme' /*adm*/),90);
448
-
449
-
450
- echo('<br style="clear:both;"/><br /><strong>Per Post Style</strong>' /*a*/ );
451
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaver-xtreme' /*adm*/ ));
452
- echo '<br />' .
453
- __('Enter optional per post CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
454
- Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
455
- (e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme' /*adm*/); ?>
456
- <br />
457
- <textarea name="_pp_post_styles" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_styles", true)); ?></textarea>
458
- <br />
459
- <br />
460
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
461
-
462
- <?php
463
- wvrx_ts_page_layout('post');
464
- ?>
465
- <br />
466
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
467
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
468
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaver-xtreme' /*adm*/); ?> <br /><br />
469
- <?php
470
-
471
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaver-xtreme' /*adm*/),40);
472
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaver-xtreme' /*adm*/),40,1);
473
-
474
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaver-xtreme' /*adm*/),40);
475
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
476
-
477
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaver-xtreme' /*adm*/),40);
478
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
479
-
480
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaver-xtreme' /*adm*/),40);
481
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaver-xtreme' /*adm*/),40,1);
482
- ?>
483
- </p>
484
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
485
- <p>
486
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
487
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
488
- </p>
489
- <?php
490
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
491
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
492
-
493
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
494
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
495
-
496
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
497
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
498
- ?>
499
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
500
- <?php
501
- $opts3 = array( 'id' => '_pp_fi_location',
502
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaver-xtreme' /*adm*/),
503
- 'value' => array(
504
- array('val' => '', 'desc' => __('Default Single Page FI','weaver-xtreme' /*adm*/) ),
505
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
506
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
507
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
508
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
509
- array('val' => 'post-before', 'desc' => __('Outside of Post','weaver-xtreme' /*adm*/) ),
510
- array('val' => 'hide', 'desc' => __('Hide FI on Single Page','weaver-xtreme' /*adm*/) )
511
- )
512
- );
513
- wvrx_ts_pp_select_id($opts3);
514
- ?>
515
- <br />
516
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
517
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
518
- <?php _e("<em>Featured Image Link</em> - Full URL for link from FI",'weaver-xtreme' /*adm*/); ?>
519
- <br style="clear:both;" />
520
- </p><p>
521
- <strong><?php _e('Post Editor Options','weaver-xtreme' /*adm*/); ?></strong>
522
-
523
- <?php
524
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90, 1);
525
-
526
- if (weaverx_allow_multisite()) {
527
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90, 1);
528
- }
529
- ?>
530
- </p>
531
- <p>
532
- <?php echo('<strong>Post Format</strong>');
533
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaver-xtreme' /*adm*/));
534
- weaverx_html_br();
535
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info.','weaver-xtreme' /*adm*/);
536
- weaverx_html_br();
537
- weaverx_html_br();
538
-
539
- do_action('weaverxplus_add_per_post'); ?>
540
- </p>
541
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
542
- </div>
543
- <?php
544
- }
545
-
546
-
547
- function wvrx_ts_save_post_fields($post_id) {
548
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
549
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
550
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
551
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
552
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
553
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
554
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
555
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
556
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
557
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
558
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
559
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
560
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area', '_pp_full_browser_height'
561
- );
562
-
563
- if (weaverx_allow_multisite()) {
564
- array_push($default_post_fields, '_pp_raw_html');
565
- }
566
-
567
- $all_post_fields = $default_post_fields;
568
-
569
- if (isset($_POST['post_meta'])) {
570
- foreach ($all_post_fields as $post_field) {
571
- if (isset($_POST[$post_field])) {
572
- $data = $_POST[$post_field];
573
- if ( $post_field != '_pp_post_styles')
574
- $data = stripslashes($data); // passed via post, so strip slashes
575
-
576
- if (get_post_meta($post_id, $post_field) == '') {
577
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
578
- }
579
- else if ($data != get_post_meta($post_id, $post_field, true)) {
580
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
581
- } else if ($data == '') {
582
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
583
- }
584
- } else {
585
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
586
- }
587
- }
588
- }
589
- }
590
-
591
- add_action("save_post", "wvrx_ts_save_post_fields");
592
- add_action("publish_post", "wvrx_ts_save_post_fields");
593
- }
594
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/includes/wvrx-ts-runtime-lib.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
-
6
- function wvrx_ts_help_link($ref, $label) {
7
-
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
- }
13
-
14
-
15
- // =============================== options =============================
16
-
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
-
19
-
20
- // Interface to Weaver Xtreme
21
-
22
- function wvrx_ts_fix_short($prefix, $msg ) {
23
- if ( $prefix ) {
24
- $m = str_replace('[/', '////', $msg);
25
- $m = str_replace('[', '[' . $prefix, $m);
26
- echo str_replace('////', '[/' . $prefix, $m);
27
- }
28
- else
29
- echo $msg;
30
- }
31
-
32
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
33
- function wvrx_ts_theme_support_addon() {
34
- ?>
35
- <div class="a-plus">
36
- <p><strong style="font-size:110%;"><?php _e('You have Weaver Xtreme Theme Support installed.','weaver-xtreme' /*adm*/); ?></strong><br />
37
- <?php _e('This section shows the shortcodes and widgets available with Weaver X Theme Support.
38
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaver-xtreme' /*adm*/); ?></p>
39
-
40
- <?php
41
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
42
- if ( $prefix )
43
- echo '<h3 style="color:red;">' . __("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme') . '</h3>';
44
- ?>
45
-
46
- <h3><?php _e('Shortcodes','weaver-xtreme' /*adm*/); ?></h3>
47
- <ul>
48
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaver-xtreme' /*adm*/)); ?>
49
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaver-xtreme' /*adm*/));?><br />
50
- <code><?php wvrx_ts_fix_short($prefix, __("[bloginfo name='WP bloginfo name' style='style-rules']",'weaver-xtreme' /*adm*/)); ?></code>
51
- </li>
52
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Box - [box]</span> - Display content in a Box','weaver-xtreme' /*adm*/)); ?>
53
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaver-xtreme' /*adm*/));?><br />
54
- <code><?php wvrx_ts_fix_short($prefix, __("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaver-xtreme' /*adm*/)); ?></code>
55
- </li>
56
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaver-xtreme' /*adm*/)); ?>
57
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaver-xtreme' /*adm*/));?><br />
58
- <code><?php wvrx_ts_fix_short($prefix, __("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaver-xtreme' /*adm*/)); ?></code>
59
- </li>
60
- <li<?php wvrx_ts_fix_short($prefix, __('><span class="wvr-blue">Header Image - [header_image]</span> - Display default header image','weaver-xtreme' /*adm*/)); ?>
61
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaver-xtreme' /*adm*/));?><br />
62
- <code><?php wvrx_ts_fix_short($prefix, __("[header_image h='size' w='size' style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
63
- </li>
64
-
65
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaver-xtreme' /*adm*/)); ?>
66
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaver-xtreme' /*adm*/));?><br />
67
- <code><?php wvrx_ts_fix_short($prefix, __("[html html-tag args='parameters']",'weaver-xtreme' /*adm*/)); ?></code>
68
- </li>
69
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaver-xtreme' /*adm*/)); ?>
70
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaver-xtreme' /*adm*/));?><br />
71
- <code><?php wvrx_ts_fix_short($prefix, __("[iframe src='http://example.com' height=600 percent=100 style='style']",'weaver-xtreme' /*adm*/)); ?></code>
72
- </li>
73
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Login - [login]</span> - Show simple Login/Logout link','weaver-xtreme' /*adm*/)); ?>
74
- <?php wvrx_ts_help_link('help.html#sclogin',__('Help for login','weaver-xtreme' /*adm*/));?><br />
75
- <code><?php wvrx_ts_fix_short($prefix, __("[login]",'weaver-xtreme' /*adm*/)); ?></code>
76
- </li>
77
-
78
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaver-xtreme' /*adm*/)); ?>
79
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaver-xtreme' /*adm*/));?><br />
80
- <code><?php wvrx_ts_fix_short($prefix, __('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaver-xtreme' /*adm*/)); ?></code>
81
- </li>
82
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Hide If - [hide_if]</span> - Hide content','weaver-xtreme' /*adm*/)); ?>
83
- </li>
84
-
85
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline','weaver-xtreme' /*adm*/)); ?>
86
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaver-xtreme' /*adm*/));?><br />
87
- <code><?php wvrx_ts_fix_short($prefix, __("[site_tagline style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
88
- </li>
89
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title','weaver-xtreme' /*adm*/)); ?>
90
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaver-xtreme' /*adm*/));?><br />
91
- <code><?php wvrx_ts_fix_short($prefix, __("[site_title style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
92
- </li>
93
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag','weaver-xtreme' /*adm*/)); ?>
94
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Span','weaver-xtreme' /*adm*/));?><br />
95
- <code><?php wvrx_ts_fix_short($prefix, __("[span id='class_id' class='class_name' style='style_values']text[/span]",'weaver-xtreme' /*adm*/)); ?></code>
96
- </li>
97
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Tab Group - [tab_group]</span> - Display content on separate tabs','weaver-xtreme' /*adm*/));?>
98
- <?php wvrx_ts_help_link('help.html#tab_group',__('Help for Tab Group','weaver-xtreme' /*adm*/));?><br />
99
- <code><?php wvrx_ts_fix_short($prefix, __('[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]','weaver-xtreme' /*adm*/)); ?></code>
100
- </li>
101
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options','weaver-xtreme' /*adm*/)); ?>
102
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
103
- <code><?php wvrx_ts_fix_short($prefix, __('[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]','weaver-xtreme' /*adm*/)); ?></code>
104
- </li>
105
-
106
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options','weaver-xtreme' /*adm*/)); ?>
107
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
108
- <code><?php wvrx_ts_fix_short($prefix, __('[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]','weaver-xtreme' /*adm*/)); ?></code>
109
- </li>
110
- </ul>
111
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
112
-
113
- <?php
114
- if ( $prefix )
115
- $button = __("Remove 'wvrx_' prefix from shortcode names: [ bloginfo ], etc.", 'weaver-xtreme');
116
- else
117
- $button = __("Add 'wvrx_' to shortcode names: [ wvrx_bloginfo ], etc.", 'weaver-xtreme');
118
- ?>
119
- <div style="clear:both;"></div>
120
- <span class='submit'><input name="toggle_shortcode_prefix" type="submit" value="<?php echo $button; ?>" /></span>
121
- <br /><small> <?php _e("To avoid conflicts with other plugins, you can add a 'wvrx_' prefix to these shortcodes.", 'weaver-xtreme /*adm*/'); ?> </small>
122
- <?php weaverx_nonce_field('toggle_shortcode_prefix'); ?>
123
- </form>
124
- <br />
125
-
126
- <h3><?php _e('Widgets','weaver-xtreme' /*adm*/); ?></h3>
127
- <ul>
128
- <li><?php _e('<span class="wvr-blue">Weaver X Login Widget</span> - Simplified login widget','weaver-xtreme' /*adm*/); ?>
129
- <?php wvrx_ts_help_link('help.html#widg-login',__('Help for Login Widget','weaver-xtreme' /*adm*/));?>
130
- </li>
131
-
132
- <li><?php _e('<span class="wvr-blue">Weaver X Per Page Text</span> - Display text on a per page basis, based on a Custom Field value','weaver-xtreme' /*adm*/); ?>
133
- <?php wvrx_ts_help_link('help.html##widg_pp_text',__('Help for Per Page Text Widget','weaver-xtreme' /*adm*/));?>
134
- </li>
135
-
136
- <li><?php _e('<span class="wvr-blue">Weaver X Text 2</span> - Display text in two columns - great for wide top/bottom widgets','weaver-xtreme' /*adm*/); ?>
137
- <?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
138
- </li>
139
- </ul>
140
-
141
-
142
- <h3><?php _e('Per Page/Post Settings','weaver-xtreme' /*adm*/); ?></h3>
143
- <p> <?php _e("Click the following button to produce a list of links to all pages and posts that have Per Page or Per Post settings.", 'weaver-xtreme /*adm*/'); ?></p>
144
- <div style="clear:both;"></div>
145
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
146
- <span class='submit'><input name="show_per_page_report" type="submit" value="<?php _e('Show Pages and Posts with Per Page/Post Settings', 'weaver-xtreme /*adm*/'); ?>" /></span>
147
- <?php weaverx_nonce_field('show_per_page_report'); ?>
148
- </form><br /><br />
149
- </div>
150
-
151
- <?php
152
- }
153
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/includes/wvrx-ts-shortcodes.php DELETED
@@ -1,661 +0,0 @@
1
- <?php
2
- /*
3
- Weaver X shortcodes
4
- */
5
-
6
- function wvrx_ts_setup_shortcodes() {
7
- // we setup all of our shortcodes only after the theme has been loaded...
8
-
9
- $codes = array( // list of shortcodes
10
- array('bloginfo' => 'wvrx_ts_sc_bloginfo'), // [bloginfo]
11
- array('box' => 'wvrx_ts_sc_box'), // [box]
12
- array('div' => 'wvrx_ts_sc_div'), // [div]
13
- array('header_image' => 'wvrx_ts_sc_header_image'), // [header_image]
14
- array('hide_if' => 'wvrx_ts_sc_hide_if' ), // [hide_if]
15
- array('html' => 'wvrx_ts_sc_html'), // [html]
16
- array('iframe' => 'wvrx_ts_sc_iframe'), // [iframe]
17
- array('login' => 'wvrx_ts_sc_login'), // [login]
18
- array('show_if' => 'wvrx_ts_sc_show_if' ), // [show_if]
19
- array('span' => 'wvrx_ts_sc_span'), // [span]
20
- array('site_tagline' => 'wvrx_ts_sc_site_tagline'), // [site_tagline]
21
- array('site_title' => 'wvrx_ts_sc_site_title'), // [site_title]
22
- array('tab_group' => 'wvrx_ts_sc_tab_group',
23
- 'tab' => 'wvrx_ts_sc_tab'), // [tab_group], [tab]
24
- array('vimeo' => 'wvrx_ts_sc_vimeo'), // [vimeo]
25
- array('youtube' => 'wvrx_ts_sc_youtube'), // [youtube]
26
- array('weaverx_info' => 'wvrx_ts_weaverx_sc_info'), // [weaverx_info]
27
- );
28
-
29
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
30
-
31
- foreach ($codes as $code) {
32
- wvrx_ts_set_shortcodes($code, $prefix);
33
- }
34
- }
35
-
36
- add_action('init', 'wvrx_ts_setup_shortcodes'); // allow shortcodes to load after theme has loaded so we know which version to use
37
-
38
- // =============== [box] ===================
39
- function wvrx_ts_sc_box( $args = '', $text ) {
40
- extract(shortcode_atts(array(
41
- 'align' => '',
42
- 'border' => true,
43
- 'border_rule' => '1px solid black',
44
- 'border_radius' => '',
45
- 'color' => '',
46
- 'background' => '',
47
- 'margin' => '',
48
- 'padding' => '1',
49
- 'shadow' => '',
50
- 'style' => '',
51
- 'width' => ''
52
- ), $args));
53
-
54
- $sty = 'style="';
55
-
56
- if ( $align ) {
57
- $align = strtolower($align);
58
- switch ( $align ) {
59
- case 'center':
60
- $sty .= 'display:block;margin-left:auto;margin-right:auto;';
61
- break;
62
- case 'right':
63
- $sty .= 'float:right;';
64
- break;
65
- default:
66
- $sty .= 'float:left;';
67
- break;
68
- }
69
- }
70
-
71
- if ( $border )
72
- $sty .= "border:{$border_rule};";
73
- if ( $border_radius )
74
- $sty .= "border-radius:{$border_radius}px;";
75
- if ( $shadow ) {
76
- if ( $shadow < 1 ) $shadow = 1;
77
- if ( $shadow > 5 ) $shadow = 5;
78
- $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
79
- }
80
- if ( $color )
81
- $sty .= "color:{$color};";
82
- if ( $background )
83
- $sty .= "background-color:{$background};";
84
- if ( $margin )
85
- $sty .= "margin:{$margin}em;";
86
- if ( $padding )
87
- $sty .= "padding:{$padding}em;";
88
- if ( $width )
89
- $sty .= "width:{$width}%;";
90
- if ( $sty )
91
- $sty .= $style;
92
- $sty .= '"'; // finish it
93
-
94
- return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
95
- }
96
-
97
- // =============== [hide_if] ===================
98
- function wvrx_ts_sc_hide_if($args = '', $text ) {
99
-
100
- return wvrx_ts_show_hide_if( $args, $text, false );
101
- }
102
-
103
- // =============== [show_if] ===================
104
- function wvrx_ts_sc_show_if($args = '', $text ) {
105
- return wvrx_ts_show_hide_if( $args, $text, true );
106
- }
107
-
108
- // =============== [show_hide_if] ===================
109
- function wvrx_ts_show_hide_if($args = '', $text, $show) {
110
- extract(shortcode_atts(array(
111
- 'device' => 'default', // desktop, mobile, smalltablet, phone, all
112
- 'logged_in' => 'default', // true or false
113
- 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
114
- 'post_id' => 'default', // comma separated list
115
- 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
116
- ), $args));
117
-
118
- $valid_device = array('default','desktop','mobile','smalltablet','phone','all');
119
-
120
- if ( !in_array( $device, $valid_device )) {
121
- return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
122
-
123
- }
124
- if ( $logged_in == 'default' ) { // **** logged_in
125
- $logged_in = true;
126
- } else {
127
- $is_true = is_user_logged_in();
128
- $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : !$is_true;
129
- }
130
-
131
- if ( $not_post_id == 'default') { // **** pages
132
- $not_post_id = true;
133
- } else {
134
- $list = explode(',', str_replace(' ', '', $not_post_id));
135
- $not_post_id = !in_array( get_the_ID(), $list );
136
- }
137
-
138
- if ( $post_id == 'default') { // **** pages
139
- $post_id = true;
140
- } else {
141
- $list = explode(',', str_replace(' ', '', $post_id));
142
- $post_id = in_array( get_the_ID(), $list );
143
- }
144
-
145
- if ( $user_can == 'default') { // **** user_can
146
- $user_can = true;
147
- } else {
148
- $user_can = current_user_can( strtolower( $user_can) );
149
- }
150
-
151
- $x = true;
152
- if ( $x == 'default') {
153
- $x = true;
154
- } else {
155
- $x = $show;
156
- }
157
-
158
- $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
159
-
160
- if ( !$all_true ) { // device irrelevant
161
- // $text .= '* ALL TRUE FAILED *';
162
- if ( !$show )
163
- return do_shortcode( $text ); // hide fails, so show it
164
- else
165
- return ''; // show fails, so hide it
166
-
167
- } elseif ( $device == 'default') { // so all other conditions passed, see if specified device
168
- // $text .= '* ALL TRUE, DEVICE DEFAULT *';
169
- if ( $show )
170
- return do_shortcode( $text );
171
- else
172
- return '';
173
- } else {
174
- // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
175
- if ( $show ) {
176
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('show-' . $device); // for [extra_menu]
177
- } else {
178
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('hide-' . $device);
179
- }
180
- $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode($text) . '</div>';
181
- unset( $GLOBALS['wvrx_sc_show_hide'] );
182
- return $ret;
183
- }
184
- return '';
185
- }
186
-
187
-
188
- // =============== [header_image style='customstyle'] ===================
189
- function wvrx_ts_sc_header_image($args = ''){
190
- extract(shortcode_atts(array(
191
- 'style' => '', // STYLE
192
- 'h' => '',
193
- 'w' => ''
194
- ), $args));
195
-
196
- $width = $w ? ' width="' . $w . '"' : '';
197
- $height = $h ? ' height="' . $h . '"' : '';
198
- $st = $style ? ' style="' . $style . '"' : '';
199
-
200
- $hdrimg = '<img src="' . get_header_image() . '"' . $st . $width . $height
201
- . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
202
-
203
- return $hdrimg;
204
- }
205
-
206
- // =============== [bloginfo arg='name'] ======================
207
- function wvrx_ts_sc_bloginfo($args = '') {
208
- extract(shortcode_atts(array(
209
- 'arg' => 'name', // a WP bloginfo name
210
- 'style' => '' // wrap with style
211
- ), $args));
212
-
213
- $code = '';
214
- if ($style != '') $code = '<span style="' . $style . '">';
215
- $code .= esc_attr( get_bloginfo( $arg ));
216
- if ($style != '') $code .= '</span>';
217
- return $code;
218
- }
219
-
220
- // =============== [site_title style='customstyle'] ======================
221
- function wvrx_ts_sc_site_title($args = '') {
222
- extract(shortcode_atts(array(
223
- 'style' => '', /* styling for the header */
224
- 'matchtheme' => false
225
- ), $args));
226
-
227
- $title = esc_html( get_bloginfo( 'name', 'display' ));
228
-
229
- $before = '';
230
- $after = '';
231
-
232
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
233
- $before = '<h1' . weaverx_title_class( 'site_title', false, 'site-title' ) . '><a href="' . esc_url( home_url( '/' ) ) . '" title="' . $title . '" rel="home">';
234
- $after = '</a></h1>';
235
- }
236
-
237
- if ($style) {
238
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
239
- }
240
- return $before . $title . $after;
241
-
242
- }
243
-
244
- // =============== [site_tagline style='customstyle'] ======================
245
- function wvrx_ts_sc_site_tagline($args = '') {
246
- extract(shortcode_atts(array(
247
- 'style' => '', /* styling for the header */
248
- 'matchtheme' => false
249
- ), $args));
250
-
251
- $title = get_bloginfo( 'description' );
252
-
253
- $before = '';
254
- $after = '';
255
-
256
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
257
- $before = '<h2' . weaverx_title_class( 'tagline', false, 'site-tagline' ) . '>';
258
- $after = '</h2>';
259
- }
260
-
261
- if ($style) {
262
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
263
- }
264
- return $before . $title . $after;
265
- }
266
-
267
- // =============== [iframe src='address' height=nnn] ======================
268
- function wvrx_ts_sc_iframe($args = '') {
269
- extract(shortcode_atts(array(
270
- 'src' => '',
271
- 'height' => '600', /* styling for the header */
272
- 'percent' => 100,
273
- 'style' => 'border:1px;'
274
- ), $args));
275
-
276
- $sty = $style ? ' style="' . $style . '"' : '';
277
-
278
- if (!$src) return __('<h4>No src address provided to [iframe].</h4>','weaver-xtreme' /*adm*/);
279
- return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
280
- }
281
-
282
- // =============== [iframe src='address' height=nnn] ======================
283
- function wvrx_ts_sc_login($args = '') {
284
- extract(shortcode_atts(array(
285
- ), $args));
286
-
287
- return wp_loginout( '', false );
288
- }
289
-
290
- // =============== [tab_group ] ======================
291
- function wvrx_ts_sc_tab_group( $args, $content ) {
292
- extract( shortcode_atts( array(
293
- 'border_color' => '', // tab and pane bodder color - default #888
294
- 'tab_bg' => '', // normal bg color of tab (default #CCC)
295
- 'tab_selected_color' => '', // color of tab when selected (default #EEE)
296
- 'pane_min_height' => '', // min height of a pane to help make all even if needed
297
- 'pane_bg' => '' // bg color of pane
298
- ), $args ) );
299
-
300
- if (isset($GLOBALS['wvrx_ts_in_tab_container']) && $GLOBALS['wvrx_ts_in_tab_container']) {
301
- return __('<strong>Sorry, you cannot nest tab_containers.</strong>','weaver-xtreme' /*adm*/);
302
- }
303
-
304
- // enqueue the theme support jslib only now when it will actually be needed!
305
-
306
- wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
307
-
308
- if ( !isset( $GLOBALS['wvrx_ts_tab_id'] ) )
309
- $GLOBALS['wvrx_ts_tab_id'] = 1;
310
- else
311
- ++$GLOBALS['wvrx_ts_tab_id'];
312
-
313
- $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
314
-
315
- $css = ''; // default styles
316
- $add_style = '';
317
- if ($border_color != '')
318
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
319
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
320
-
321
- if ($pane_min_height != '')
322
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
323
-
324
- if ($pane_bg != '')
325
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
326
-
327
- if ($tab_bg != '')
328
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
329
-
330
- if ($tab_selected_color != '')
331
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
332
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
333
-
334
- if ($css != '') { // specified some style...
335
- $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
336
- }
337
-
338
- $GLOBALS['wvrx_ts_in_tab_container'] = true;
339
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
340
-
341
- do_shortcode( $content ); // process the tabs on this
342
-
343
- $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
344
-
345
- if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
346
- foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
347
- $tabs[] = '<span>' . $tab['title'] . '</span>'. "\n";
348
- $panes[] = "\n" .'<div class="wvr-tabs-pane">' . $tab['content'] . '</div>';
349
- }
350
- $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
351
- . '<div class="wvr-tabs-nav">' . "\n"
352
- . implode( '', $tabs ) . '</div>' . "\n"
353
- . '<div class="wvr-tabs-panes">'
354
- . implode( '', $panes ) . "\n"
355
- . '</div><div class="wvr-tabs-clear"></div>' . "\n"
356
- . '</div> <!-- end tab_group -->' . "\n";
357
- }
358
-
359
- // Forget globals we generated
360
- unset( $GLOBALS['wvrx_ts_in_tab_container'],$GLOBALS['wvrx_ts_tabs'],$GLOBALS['wvrx_ts_num_tabs']);
361
-
362
- return $add_style . $out;
363
- }
364
-
365
- function wvrx_ts_sc_tab( $args, $content ) {
366
- extract( shortcode_atts( array(
367
- 'title' => 'Tab %d'
368
- ), $args ) );
369
-
370
- if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
371
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
372
- }
373
- $cur = $GLOBALS['wvrx_ts_num_tabs'];
374
- $GLOBALS['wvrx_ts_tabs'][$cur] = array(
375
- 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
376
- 'content' => do_shortcode( $content ) );
377
- $GLOBALS['wvrx_ts_num_tabs']++;
378
- }
379
-
380
-
381
- // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
382
- function wvrx_ts_sc_youtube($args = '') {
383
- $share = '';
384
- if ( isset ( $args[0] ) )
385
- $share = trim($args[0]);
386
-
387
- // http://code.google.com/apis/youtube/player_parameters.html
388
- // not including: enablejsapi, fs,playerapiid,
389
-
390
- extract(shortcode_atts(array(
391
- 'id' => '',
392
- 'sd' => false,
393
- 'related' => '0',
394
- 'privacy' => false,
395
- 'ratio' => false,
396
- 'center' => '1',
397
- 'autohide' => '~!',
398
- 'autoplay' => '0',
399
- 'border' => '0',
400
- 'color' => false,
401
- 'color1' => false,
402
- 'color2' => false,
403
- 'controls' => '1',
404
- 'disablekb' => '0',
405
- 'egm' => '0',
406
- 'fs' => '1',
407
- 'fullscreen' => 1,
408
- 'hd' => '0',
409
- 'iv_load_policy' => '1',
410
- 'loop' => '0',
411
- 'modestbranding' => '0',
412
- 'origin' => false,
413
- 'percent' => 100,
414
- 'playlist' => false,
415
- 'rel' => '0',
416
- 'showinfo' => '1',
417
- 'showsearch' => '1',
418
- 'start' => false,
419
- 'theme' => 'dark',
420
- 'wmode' => 'transparent'
421
-
422
- ), $args));
423
-
424
- if (!$share && !$id)
425
- return __('<strong>No share or id values provided for youtube shortcode.</strong>','weaver-xtreme' /*adm*/);
426
-
427
- if ($share) { // let the share override any id
428
- $share = str_replace('youtu.be/','',$share);
429
- if (strpos($share,'youtube.com/watch') !== false) {
430
- $share = str_replace('www.youtube.com/watch?v=', '', $share);
431
- $share = str_replace('&amp;','+',$share);
432
- $share = str_replace('&','+',$share);
433
- }
434
- $share = str_replace('http://','',$share);
435
- $share = str_replace('https://','',$share);
436
- if ($share)
437
- $id = $share;
438
- }
439
-
440
- $opts = $id . '%%';
441
-
442
- $opts = wvrx_ts_add_url_opt($opts, $hd != '0', 'hd=1');
443
- $opts = wvrx_ts_add_url_opt($opts, $autohide != '~!', 'autohide='.$autohide);
444
- $opts = wvrx_ts_add_url_opt($opts, $autoplay != '0', 'autoplay=1');
445
- $opts = wvrx_ts_add_url_opt($opts, $border != '0', 'border=1');
446
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color='.$color);
447
- $opts = wvrx_ts_add_url_opt($opts, $color1, 'color1='.$color1);
448
- $opts = wvrx_ts_add_url_opt($opts, $color2, 'color2='.$color2);
449
- $opts = wvrx_ts_add_url_opt($opts, $controls != '1', 'controls=0');
450
- $opts = wvrx_ts_add_url_opt($opts, $disablekb != '0', 'disablekb=1');
451
- $opts = wvrx_ts_add_url_opt($opts, $egm != '0', 'egm=1');
452
- $opts = wvrx_ts_add_url_opt($opts, true, 'fs='.$fs);
453
- $opts = wvrx_ts_add_url_opt($opts, true, 'iv_load_policy='.$iv_load_policy);
454
- $opts = wvrx_ts_add_url_opt($opts, $loop != '0', 'loop=1');
455
- $opts = wvrx_ts_add_url_opt($opts, $modestbranding != '0', 'modestbranding=1');
456
- $opts = wvrx_ts_add_url_opt($opts, $origin, 'origin='.$origin);
457
- $opts = wvrx_ts_add_url_opt($opts, $playlist, 'playlist='.$playlist);
458
- $opts = wvrx_ts_add_url_opt($opts, true, 'rel='.$rel);
459
- $opts = wvrx_ts_add_url_opt($opts, true, 'showinfo=' . $showinfo);
460
- $opts = wvrx_ts_add_url_opt($opts, $showsearch != '1', 'showsearch=0');
461
- $opts = wvrx_ts_add_url_opt($opts, $start, 'start='.$start);
462
- $opts = wvrx_ts_add_url_opt($opts, $theme != 'dark', 'theme=light');
463
- $opts = wvrx_ts_add_url_opt($opts, $wmode, 'wmode='.$wmode);
464
-
465
- $url = '//';
466
-
467
- if ($privacy) $url .= 'www.youtube-nocookie.com';
468
- else $url .= 'www.youtube.com';
469
-
470
- $opts = str_replace('%%+','%%?', $opts);
471
- $opts = str_replace('%%','', $opts);
472
- $opts = str_replace('+','&amp;', $opts);
473
-
474
- $url .= '/embed/' . $opts;
475
-
476
-
477
- $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
478
-
479
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
480
- "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
481
- $cntr2 = '</div>';
482
- $h = 9; $w = 16;
483
- if ( $sd ) {
484
- $h = 3; $w = 4;
485
- }
486
-
487
- $ret ="\n" . $cntr1 . '<iframe src="' . $url
488
- . '" frameborder="0" width="'.$w.'" height="' . $h . '" frameborder="0" ' . $allowfull . '></iframe>'
489
- . $cntr2 . "\n";
490
-
491
- return $ret;
492
- }
493
-
494
- // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
495
- function wvrx_ts_sc_vimeo($args = '') {
496
- $share = '';
497
- if ( isset ( $args[0] ) )
498
- $share = trim($args[0]);
499
-
500
- extract(shortcode_atts(array(
501
- 'id' => '',
502
- 'sd' => false,
503
- 'color' => '',
504
- 'autoplay' => false,
505
- 'loop' => false,
506
- 'portrait' => true,
507
- 'title' => true,
508
- 'byline' => true,
509
- 'percent' => 100,
510
- 'center' => '1'
511
- ), $args));
512
-
513
- if (!$share && !$id) return __('<strong>No share or id values provided for vimeo shortcode.</strong>','weaver-xtreme' /*adm*/);
514
-
515
- if ($share) { // let the share override any id
516
- $share = str_replace('http://vimeo.com/','',$share);
517
- if ($share) $id = $share;
518
- }
519
-
520
- $opts = $id . '##';
521
-
522
- $opts = wvrx_ts_add_url_opt($opts, $autoplay, 'autoplay=1');
523
- $opts = wvrx_ts_add_url_opt($opts, $loop, 'loop=1');
524
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color=' . $color);
525
- $opts = wvrx_ts_add_url_opt($opts, !$portrait, 'portrait=0');
526
- $opts = wvrx_ts_add_url_opt($opts, !$title, 'title=0');
527
- $opts = wvrx_ts_add_url_opt($opts, !$byline, 'byline=0');
528
-
529
- $url = '//player.vimeo.com/video/';
530
-
531
- $opts = str_replace('##+','##?', $opts);
532
- $opts = str_replace('##','', $opts);
533
- $opts = str_replace('+','&amp;', $opts);
534
-
535
- $url .= $opts;
536
-
537
- if (function_exists('weaverii_use_mobile'))
538
- if (weaverii_use_mobile('mobile')) $percent = 100;
539
-
540
-
541
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
542
- "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
543
- $cntr2 = '</div>';
544
- $h = 9; $w = 16;
545
- if ( $sd ) {
546
- $h = 3; $w = 4;
547
- }
548
-
549
- $ret = "\n" . $cntr1 . '<iframe src="' . $url
550
- . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
551
- . $cntr2 . "\n";
552
-
553
- return $ret;
554
- }
555
-
556
- // ===== video utils =====
557
-
558
- function wvrx_ts_add_url_opt($opts, $add, $add_val) {
559
- if ($add) {
560
- $opts = $opts . '+' . $add_val;
561
- }
562
- return $opts;
563
- }
564
-
565
-
566
-
567
- function wvrx_ts_sc_html($vals = '') { // [html style='customstyle'] - all ======================
568
- $tag = 'span';
569
- if ( isset ( $vals[0] ) )
570
- $tag = trim( $vals[0]);
571
-
572
- extract(shortcode_atts(array(
573
- 'args' => ''
574
- ), $vals));
575
- if ($args) $args = ' ' . $args;
576
- return '<' . $tag . $args . '>';
577
- }
578
-
579
- function wvrx_ts_sc_div($vals = '',$text) { // [div] - all ===================
580
- extract(shortcode_atts(array(
581
- 'id' => '',
582
- 'class' => '',
583
- 'style' => ''
584
- ), $vals));
585
-
586
- $args = '';
587
- if ($id) $args .= ' id="' . $id . '"';
588
- if ($class) $args .= ' class="' . $class . '"';
589
- if ($style) $args .= ' style="' . $style . '"';
590
-
591
- return '<div' . $args . '>' . do_shortcode($text) . '</div>';
592
- }
593
-
594
- function wvrx_ts_sc_span($vals = '',$text) { // [span] - all ==================
595
- extract(shortcode_atts(array(
596
- 'id' => '',
597
- 'class' => '',
598
- 'style' => ''
599
- ), $vals));
600
-
601
- $args = '';
602
- if ($id) $args .= ' id="' . $id . '"';
603
- if ($class) $args .= ' class="' . $class . '"';
604
- if ($style) $args .= ' style="' . $style . '"';
605
-
606
- return '<span' . $args . '>' . do_shortcode($text) . '</span>';
607
- }
608
-
609
- function wvrx_ts_weaverx_sc_info() { // [info] ======================
610
- global $current_user;
611
- $out = __('<strong>Theme/User Info</strong><hr />','weaver-xtreme' /*adm*/);
612
-
613
- get_currentuserinfo();
614
- if (isset($current_user->display_name)) {
615
- $out .= __('<em>User:</em> ','weaver-xtreme' /*adm*/) . $current_user->display_name . '<br />';
616
- }
617
- $out .= '&nbsp;&nbsp;' . wp_register('','<br />',false);
618
- $out .= '&nbsp;&nbsp;' . wp_loginout('',false) . '<br />';
619
-
620
- $agent = __('Not Available','weaver-xtreme' /*adm*/);
621
- if (isset($_SERVER["HTTP_USER_AGENT"]) )
622
- $agent = $_SERVER['HTTP_USER_AGENT'];
623
- $out .= __('<em>User Agent</em>:','weaver-xtreme' /*adm*/) . ' <small>' . $agent . '</small>';
624
- $out .= '<div id="example"></div>
625
- <script type="text/javascript">
626
- var txt = "";
627
- var myWidth;
628
- if( typeof( window.innerWidth ) == "number" ) {
629
- //Non-IE
630
- myWidth = window.innerWidth;
631
- } else if( document.documentElement &&
632
- ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
633
- //IE 6+ in "standards compliant mode"
634
- myWidth = document.documentElement.clientWidth;
635
- } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
636
- //IE 4 compatible
637
- myWidth = document.body.clientWidth;
638
- }
639
- txt+= "<em>Browser Width: </em>" + myWidth + " px</br>";
640
- document.getElementById("example").innerHTML=txt;
641
- </script>';
642
-
643
- $out .= __('<em>Feed title:</em> ','weaver-xtreme' /*adm*/) . get_bloginfo_rss('name') . '<br />' . get_wp_title_rss();
644
-
645
- $out .= __('<br /><em>You are using</em> WordPress ','weaver-xtreme' /*adm*/) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
646
- $out .= __('<br /><em>Memory:</em> ','weaver-xtreme' /*adm*/) . round(memory_get_usage()/1024/1024,2) . 'M of ' . (int)ini_get('memory_limit') . 'M <hr />';
647
- return $out;
648
- }
649
-
650
-
651
- function wvrx_ts_set_shortcodes($sc_list, $prefix) {
652
- foreach ($sc_list as $sc_name => $sc_func) {
653
- remove_shortcode($prefix . $sc_name);
654
- add_shortcode($prefix . $sc_name,$sc_func);
655
- }
656
- }
657
-
658
- // =============== Utilities ======================
659
-
660
-
661
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/includes/wvrx-ts-widgets.php DELETED
@@ -1,169 +0,0 @@
1
- <?php
2
- /*
3
- * Weaver X Widgets and shortcodes - widgets
4
- */
5
-
6
- class WeaverX_Widget_Text extends WP_Widget {
7
-
8
- function WeaverX_Widget_Text() {
9
- $widget_ops = array('classname' => 'WeaverX_Widget_Text',
10
- 'description' => __('Text Widget with Two Columns - with HTML and shortcode support. Also adds shortcodes to standard Text widget.','weaver-xtreme' /*adm*/));
11
- $control_ops = array('width' => 400, 'height' => 350);
12
- $this->WP_Widget('wvrx2_text', __('Weaver X Text 2','weaver-xtreme' /*adm*/), $widget_ops, $control_ops);
13
- }
14
-
15
- function widget( $args, $instance ) {
16
- extract($args);
17
- $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
18
- $text = apply_filters( 'weaverx_text', $instance['text'], $instance );
19
- $text2 = apply_filters( 'weaverx_text', $instance['text2'], $instance );
20
- echo $before_widget;
21
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
22
- <div class="textwidget"><div style="float: left; width: 48%; padding-right: 2%;">
23
- <?php
24
- if ($instance['filter']) {
25
- echo(wpautop($text)); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
26
- echo(wpautop($text2)); echo('</div><div style="clear: both;"></div>');
27
- } else {
28
- echo($text); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
29
- echo($text2); echo('</div><div style="clear: both;"></div>');
30
- }
31
- ?>
32
- </div>
33
- <?php
34
- echo $after_widget;
35
- }
36
-
37
- function update( $new_instance, $old_instance ) {
38
- $instance = $old_instance;
39
- $instance['title'] = strip_tags($new_instance['title']);
40
- if ( current_user_can('unfiltered_html') ) {
41
- $instance['text'] = $new_instance['text'];
42
- $instance['text2'] = $new_instance['text2'];
43
- }
44
- else {
45
- $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
46
- $instance['text2'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text2']) ) );
47
- }
48
- $instance['filter'] = isset($new_instance['filter']);
49
- return $instance;
50
- }
51
-
52
- function form( $instance ) {
53
- $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'text2' => '', 'filter' => 0) );
54
- $title = strip_tags($instance['title']);
55
- $text = format_to_edit($instance['text']);
56
- $text2 = format_to_edit($instance['text2']);
57
- ?>
58
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title:' /*a*/ ); ?></label>
59
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
60
-
61
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
62
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text2'); ?>" name="<?php echo $this->get_field_name('text2'); ?>"><?php echo $text2; ?></textarea>
63
- <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> />
64
- &nbsp;<label for="<?php echo $this->get_field_id('filter'); ?>"><?php echo 'Automatically add paragraphs'; ?></label></p>
65
- <?php
66
- }
67
- }
68
-
69
- /**
70
- * Weaver X Per Page Text
71
- */
72
- class WeaverX_Widget_PPText extends WP_Widget {
73
-
74
- function WeaverX_Widget_PPText() {
75
- $widget_ops = array('classname' => 'wvrx_widget_pptext', 'description' =>
76
- __('Display text on a Per Page basis. Add to Widget area to see instructions.','weaver-xtreme' /*adm*/) );
77
- $this->WP_Widget('wvrx_pptext', __('Weaver X Per Page Text','weaver-xtreme' /*adm*/), $widget_ops);
78
- }
79
-
80
- function widget( $args, $instance ) {
81
- extract($args);
82
- $title = get_post_meta(get_the_ID(),'wvrx_ts_pp_title',true);
83
- $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
84
-
85
- if (empty($title) && empty($text))
86
- return;
87
-
88
- echo $before_widget;
89
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
90
- echo do_shortcode($text);
91
- echo $after_widget;
92
- }
93
-
94
- function update( $new_instance, $old_instance ) {
95
- $instance = $old_instance;
96
- $instance['title'] = strip_tags($new_instance['title']);
97
-
98
- return $instance;
99
- }
100
-
101
- function form( $instance ) {
102
- ?>
103
- <p><?php _e('This widget will work like a text widget, but the title and content are defined by custom
104
- fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>
105
- if you want a title, and define Custom Field <em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text,
106
- HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom
107
- fields are defined when that page is displayed. (This widget won\'t display on the default blog or other archive-like pages.)','weaver-xtreme' /*adm*/); ?><p>
108
- <?php
109
- }
110
- }
111
-
112
- /**
113
- * Weaver X login
114
- */
115
- class WeaverX_Widget_Login extends WP_Widget {
116
-
117
- function WeaverX_Widget_Login() {
118
- $widget_ops = array('classname' => 'wvrx_widget_login', 'description' => __( "Log in/out, admin", 'weaver-xtreme' /*adm*/ ) );
119
- $this->WP_Widget('wvrx_login', __('Weaver X Login','weaver-xtreme' /*adm*/), $widget_ops);
120
- }
121
-
122
- function widget( $args, $instance ) {
123
- extract($args);
124
- $title = apply_filters('widget_title', empty($instance['title']) ? __('Login', 'weaver-xtreme' /*adm*/ ) : $instance['title'], $instance, $this->id_base);
125
-
126
- echo $before_widget;
127
- if ( $title )
128
- echo $before_title . $title . $after_title;
129
- global $current_user;
130
- get_currentuserinfo();
131
- if (isset($current_user->display_name))
132
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaver-xtreme' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
133
- ?>
134
- <ul>
135
- <?php wp_register(); ?>
136
- <li><?php wp_loginout(); ?></li>
137
- </ul>
138
- <?php
139
- echo $after_widget;
140
- }
141
-
142
- function update( $new_instance, $old_instance ) {
143
- $instance = $old_instance;
144
- $instance['title'] = strip_tags($new_instance['title']);
145
-
146
- return $instance;
147
- }
148
-
149
- function form( $instance ) {
150
- $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
151
- $title = strip_tags($instance['title']);
152
- ?>
153
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','weaver-xtreme' /*adm*/); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
154
- <?php
155
- }
156
- }
157
-
158
-
159
- add_action("widgets_init", "wvrx_ts_load_widgets");
160
- add_filter('weaverx_text', 'do_shortcode');
161
- add_filter('widget_text', 'do_shortcode'); // add to standard text widget, too.
162
-
163
- function wvrx_ts_load_widgets() {
164
- register_widget("WeaverX_Widget_Text");
165
- register_widget("WeaverX_Widget_PPText");
166
- register_widget("WeaverX_Widget_Login");
167
- }
168
-
169
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/js/wvrx-ts-jslib.js DELETED
@@ -1,27 +0,0 @@
1
- /* *********************************************************************************
2
- * Weaver X Theme Support JavaScript support Library
3
- *
4
- * Author: WeaverTheme - www.weavertheme.com
5
- * @version 1.0
6
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
7
- * @author Bruce Wampler
8
- *
9
- * Notes - this library requires jQuery to be loaded
10
- * this library was cobbled together over a long period of time, so it contains a
11
- * bit of a jumble of straight JavaScript and jQuery calls. So it goes. It works.
12
- *
13
- *
14
- ************************************************************************************* */
15
-
16
-
17
- jQuery(document).ready(function($) { // self-defining function
18
- // Tabs
19
- $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
20
- $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
21
- .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
22
- });
23
- $('.wvr-tabs-pane').hide();
24
- $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
25
- $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
26
-
27
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/js/wvrx-ts-jslib.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(a){a(".wvr-tabs-nav").delegate("span:not(.wvr-tabs-current)","click",function(){a(this).addClass("wvr-tabs-current").siblings().removeClass("wvr-tabs-current").parents(".wvr-tabs").find(".wvr-tabs-pane").hide().eq(a(this).index()).show()});a(".wvr-tabs-pane").hide();a(".wvr-tabs-nav span:first-child").addClass("wvr-tabs-current");a(".wvr-tabs-panes .wvr-tabs-pane:first-child").show()});
 
3.2.1/1.0.3/readme.txt DELETED
@@ -1,132 +0,0 @@
1
- === Weaver Xtreme Theme Support ===
2
- Plugin Name: Weaver Xtreme Theme Support
3
- Plugin URI: http://weavertheme.com/plugins/
4
- Tags: weaver x theme, shortcodes, widgets
5
- Author URI: http://weavertheme.com/about/
6
- Contributors: wpweaver
7
- Author: wpweaver
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Requires at least: 3.9
11
- Tested up to: 4.1
12
- Stable tag: 1.0.3
13
-
14
- A useful shortcode and widget collection for Weaver Xtreme
15
-
16
- == Description ==
17
-
18
- This is the main theme suppot for the Weaver X Theme. This plugin provides a collection of useful shortcodes and widgets designed to complement the Weaver X theme. These shortcodes have been selected and developed based on requests and feedback from thousands of users of the Weaver X, Weaver II, and Aspen themes.
19
-
20
- While these shortcodes are optimized for the Weaver X theme, they will also work with full functionality for most WordPress themes, and can be used
21
- if you switch themes.
22
-
23
- Includes complete documentation help file. Instructions for using the shortcodes and widgets are in the help file. Use it for non-Weaver Xtreme themes.
24
-
25
- = Shortcodes included =
26
-
27
- * **[tab_group]** - Display content in a tabbed box.
28
- * **[youtube]** - Show your YouTube videos responsively, and with the capability to use any of the YouTube custom display options.
29
- * **[vimeo]** - Show your Vimeo videos responsively, and with the capability to use any of the Vimeo custom display options.
30
- * **[iframe]** - Quick and easy display of content in an iframe.
31
- * **[div]**, **[span]**, **[html]** - Add div, span, and other html to pages/posts without the need to switch to Text view.
32
- * **[hide/show_if]** - Show or hide content depending upon options: device, page ID, user capability, logged in status.
33
- * **[bloginfo]** - Display any information available from WordPress bloginfo function.
34
- * **[user_can]** - Display content base on logged in user role.
35
- * **[site_title]** - Display Site title.
36
- * **[site_tagline]** - Display Site tag line.
37
-
38
- = Widgets Included =
39
-
40
- * **Weaver X 2 Column Text Widget** - Add text into two columns in a widget
41
- * **Weaver X Per Page Text Widget** - Add a text widget on a per page basis
42
- * **Weaver X Login** - Simplified login widget
43
-
44
- = Licenses =
45
-
46
- * The Weaver X Theme Support plugin is licensed under the terms of the GNU GENERAL PUBLIC LICENSE, Version 2,
47
- June 1991. (GPL) The full text of the license is in the license.txt file.
48
- * All images included with this plugin are either original works of the author which
49
- have been placed into the public domain, or have been derived from other public domain sources,
50
- and thus need no license. (This does not include the images provided with any of the
51
- below listed scripts and libraries. Those images are covered by their respective licenses.)
52
-
53
- This plugin also includes several scripts and libraries that are covered under the terms
54
- of their own licenses in the listed files in the plugin distribution:
55
-
56
-
57
-
58
- == Installation ==
59
-
60
- It is easiest to use the Plugins : Add Plugin admin page, but you can do it manually, too:
61
-
62
- 1. Download the plugin archive and expand it
63
- 2. Upload all the plugin files and directories to your wp-content/plugins/weaverx-theme-support directory
64
- 3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for this plugin.
65
-
66
- == Frequently Asked Questions ==
67
-
68
- = Where can I get support for this plugin? =
69
-
70
- Support for this plugin can best be found at our forum - http://forum.weavertheme.com
71
-
72
- == Upgrade Notice ==
73
-
74
- This is the initial release of this plugin.
75
-
76
- == ChangeLog ==
77
- = 1.0.3 =
78
- * Fix: extra " in [ youtube ]
79
-
80
- = 1.0.2 =
81
- * Fix: z-index rule for tab shortcode
82
-
83
- = 1.0.1 =
84
- * New - Per Page/Post Report from Add-ons menu
85
- * Fix: '\1234' values in per post style
86
- * Fix: Internal name of Per Post Style - may cause loss of prevoius setting - sorry
87
-
88
- = 1.0 =
89
- * Minor tweaks
90
- * wvrx_ shortcode prefix option
91
-
92
- = 0.96 =
93
- * Fixed bug with Per page options on Page with Posts
94
- * Internal optimizations
95
-
96
- = 0.95.1 =
97
- * Only load if Weaver Xtreme is the active theme.
98
-
99
- = 0.95 =
100
- * Changed [ site_title ] and [ site_tagline ] to match theme style as option
101
-
102
- = 0.10 =
103
- * Fixed per page options when used with old Xtreme Plus version
104
-
105
- = 0.9 =
106
- * Added Per Page and Per Post admin support to plugin (removed from Xtreme theme)
107
-
108
- = 0.8 =
109
- * Added [ box ]
110
-
111
- = 0.7 =
112
- * Fixes for [ show/hide_if]
113
- * Removed unused files
114
-
115
- = 0.6 =
116
- * Fixed [ show/hide_if ] for multiple conditions that include device
117
- * Changed interface to Weaver Xtreme - all codes now just in Weaver X Add-ons tab
118
-
119
- = 0.5 =
120
- * Added [ show/hide_if ], removed [ hide_mobie ], [show_if_logged_in]
121
- * Updated Doc
122
- * Added action for interface to Weaver Xtreme "Add-ons" tab
123
-
124
- = 0.4 =
125
- * Optimized loading of jslib - only needed by tab group, so not loaded until shortcode used
126
-
127
- = 0.3 =
128
- * Fixed video shortcodes
129
-
130
- = 0.1 =
131
-
132
- * initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/weaverx-ts-admin-style.css DELETED
@@ -1,133 +0,0 @@
1
- /* Weaver admin style */
2
- .hide_me {display:none;}
3
-
4
- .wvrx_ts_green {font-weight:bold;color:green;}
5
- .wvrx_ts_yellow {font-weight:bold;color:orange;}
6
- .wvrx_ts_red {font-weight:bold;color:red;}
7
-
8
- .wvr-help ul {list-style: disc; margin-left:30px;}
9
- .wvr-option-section {font-weight:bold;font-size:120%;color:blue;}
10
-
11
- .wvr-wrap {
12
- max-width:95%;
13
- }
14
-
15
- .tab ul {
16
- margin-left: 1.15em;
17
- list-style: disc outside none;
18
- }
19
- .tab ol {
20
- list-style-position:outside;
21
- margin-left: 1.4em;
22
- margin-bottom:.6em;
23
- }
24
-
25
- .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
26
-
27
- div.yetii {
28
- width: 95%;
29
- margin: 0 0 20px 0;
30
- }
31
-
32
- ul.yetii {
33
- list-style-type: none;
34
- width: 100%;
35
- float: left;
36
- border-bottom: 4px ridge #ddd;
37
- margin-bottom: 8px;
38
- }
39
-
40
- ul.yetii li {
41
- margin: 0 2px 0 0;
42
- float: left;
43
- }
44
-
45
- ul.yetii a {
46
- float: left;
47
- display: block;
48
- padding: 4px 8px;
49
- border: 1px solid #ddd;
50
- border-bottom: 0;
51
- color: #666;
52
- background: #eee;
53
- text-decoration: none;
54
- font-weight: bold;
55
- }
56
-
57
- ul.yetii a:hover {
58
- background: #fff;
59
- }
60
-
61
- ul.yetii a.active {
62
- background: #fff;
63
- border-color: #00c;
64
- color: #00f;
65
- }
66
- /* -- */
67
- div.yetiisub {
68
- width: 100%;
69
- margin: 0 0 20px 0;
70
- }
71
-
72
- ul.yetiisub {
73
- list-style-type: none;
74
- width: 100%;
75
- float: left;
76
- margin-bottom: 8px;
77
- }
78
-
79
- ul.yetiisub li {
80
- margin: 0 2px 2px 0px;
81
- float: left;
82
- }
83
-
84
- ul.yetiisub a {
85
- float: left;
86
- padding: 4px 8px;
87
- border: 1px solid #ccc;
88
- color: #666;
89
- background: #f0f0f0;
90
- text-decoration: none;
91
- font-style: italic;
92
- font-weight: bold;
93
- }
94
-
95
- ul.yetiisub a:hover {
96
- background: #fefefe !important;
97
- }
98
-
99
- ul.yetiisub a.active {
100
- background: #fff;
101
- border-color: #00c;
102
- color: #00f;
103
- }
104
- .wvr-small-submit {
105
- padding: 1.0em 0;
106
- margin: 1px 0;
107
- font-size:90%;
108
- }
109
-
110
- .wvr-option-header {background:#D0D0D8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px;}
111
- .wvr-option-subheader {background:#EAEAEA;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px;}
112
- .wvr-row-header {background:#D0D0D8;line-height:1.8em;padding-left:4px;}
113
- .wvr-row-subheader {background:#EAEAEA;padding-left:4px;}
114
- .wvr-row-subheader-alt {background:#F4F4F4;padding-left:4px;}
115
- /* layouts for layout boxes */
116
- .l_layout {display:block; width:140px; height:110px; float:left; margin-right:10px; margin-bottom:10px; display:inline;border:1px solid #888; color:black;text-align:center;font:15px arial,sans-serif;}
117
- .l_layout span {display:block;}
118
- .l_header {width:140px; height:20px; background:#CCF; line-height:20px;}
119
- .l_content {width:100px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
120
- .l_contentcenter {width:60px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
121
- .l_content2 {width:80px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
122
- .l_contentw {width:140px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
123
- .l_stdbar {width:40px; height:70px; float:left; display:inline;}
124
- .l_widebar {width:60px; height:70px; float:left; display:inline;}
125
- .l_righttop {width:40px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
126
- .l_righttopwide {width:60px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
127
- .l_rightup {width:40px; height:25px; margin:0; background:#FAA; float:left; display:inline; line-height:25px;}
128
- .l_rightright {width:40px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
129
- .l_rightdown {width:40px; height:25px; margin:0; background:#AFA; float:left; display:inline; line-height:25px;}
130
- .l_leftleft {width:40px; height:70px; margin:0; background:#AFA; float:left; display:inline; line-height:70px;}
131
- .l_leftshort {width:30px; height:50px; margin:0; background:#AFA; float:left; display:inline; line-height:50px;}
132
- .l_skinny {width:30px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
133
- .l_footer {clear:left;width:140px; height:20px; background:#DDF; color:#000; line-height:20px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/weaverx-ts-admin-style.min.css DELETED
@@ -1,4 +0,0 @@
1
- .hide_me{display:none}.wvrx_ts_green{font-weight:bold;color:green}.wvrx_ts_yellow{font-weight:bold;color:orange}.wvrx_ts_red{font-weight:bold;color:red}.wvr-help ul{list-style:disc;margin-left:30px}.wvr-option-section{font-weight:bold;font-size:120%;color:blue}.wvr-wrap{max-width:95%}.tab ul{margin-left:1.15em;list-style:disc outside none}.tab ol{list-style-position:outside;margin-left:1.4em;margin-bottom:.6em}.js_button{background:#eee!important;font-weight:600!important;color:#585858!important}div.yetii{width:95%;margin:0 0 20px 0}ul.yetii{list-style-type:none;width:100%;float:left;border-bottom:4px ridge #ddd;margin-bottom:8px}ul.yetii li{margin:0 2px 0 0;float:left}ul.yetii a{float:left;display:block;padding:4px 8px;border:1px solid #ddd;border-bottom:0;color:#666;background:#eee;text-decoration:none;font-weight:bold}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;border-color:#00c;color:#00f}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}
2
- ul.yetiisub li{margin:0 2px 2px 0;float:left}ul.yetiisub a{float:left;padding:4px 8px;border:1px solid #ccc;color:#666;background:#f0f0f0;text-decoration:none;font-style:italic;font-weight:bold}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;border-color:#00c;color:#00f}.wvr-small-submit{padding:1.0em 0;margin:1px 0;font-size:90%}.wvr-option-header{background:#d0d0d8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px}.wvr-option-subheader{background:#eaeaea;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px}.wvr-row-header{background:#d0d0d8;line-height:1.8em;padding-left:4px}.wvr-row-subheader{background:#eaeaea;padding-left:4px}.wvr-row-subheader-alt{background:#f4f4f4;padding-left:4px}.l_layout{display:block;width:140px;height:110px;float:left;margin-right:10px;margin-bottom:10px;display:inline;border:1px solid #888;color:black;text-align:center;font:15px arial,sans-serif}
3
- .l_layout span{display:block}.l_header{width:140px;height:20px;background:#CCF;line-height:20px}.l_content{width:100px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentcenter{width:60px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_content2{width:80px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentw{width:140px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_stdbar{width:40px;height:70px;float:left;display:inline}.l_widebar{width:60px;height:70px;float:left;display:inline}.l_righttop{width:40px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_righttopwide{width:60px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_rightup{width:40px;height:25px;margin:0;background:#FAA;float:left;display:inline;line-height:25px}.l_rightright{width:40px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}
4
- .l_rightdown{width:40px;height:25px;margin:0;background:#AFA;float:left;display:inline;line-height:25px}.l_leftleft{width:40px;height:70px;margin:0;background:#AFA;float:left;display:inline;line-height:70px}.l_leftshort{width:30px;height:50px;margin:0;background:#AFA;float:left;display:inline;line-height:50px}.l_skinny{width:30px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}.l_footer{clear:left;width:140px;height:20px;background:#DDF;color:#000;line-height:20px}
 
 
 
 
3.2.1/1.0.3/weaverx-ts-style.css DELETED
@@ -1,110 +0,0 @@
1
- /*
2
- Style file for Weaver X Theme Support
3
-
4
- License: GPL
5
-
6
- Weaver X Theme Support
7
- Copyright (C) 2014-2015 Bruce E. Wampler - weaver@weavertheme.com
8
-
9
- This program is free software: you can redistribute it and/or modify
10
- it under the terms of the GNU General Public License as published by
11
- the Free Software Foundation, either version 3 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
-
19
- You should have received a copy of the GNU General Public License
20
- along with this program. If not, see <http://www.gnu.org/licenses/>.
21
-
22
- PLEASE - DO NOT EDIT THIS FILE
23
-
24
- If you MUST change the CSS for these shortcodes and widgets, use the
25
- Custom CSS features of Weaver X, or use a custom CSS plugin
26
- such as JetPack, which let you add CSS to your theme or plugins
27
- without modifying theme or plugin .css files.
28
- */
29
-
30
- /* rules for areas hidden in various hybrid "desktop" views */
31
-
32
- @media screen and (min-width:768px) { /* rules for desk top */
33
- .wvr-hide-desktop {display:none !important;}
34
- .wvr-hide-all {display:none !important;}
35
- .wvr-show-phone {display:none !important;}
36
- .wvr-show-mobile {display:none !important;}
37
- .wvr-show-smalltablet {display:none !important;}
38
- }
39
-
40
- @media screen and (min-width:581px) and (max-width:767px) { /* rules for small tablets */
41
- .wvr-hide-smalltablet {display:none !important;}
42
- .wvr-hide-mobile {display:none !important;}
43
- .wvr-hide-all {display:none !important;}
44
- .wvr-show-desktop {display:none !important;}
45
- .wvr-show-phone {display:none !important;}
46
- }
47
-
48
- @media screen and (max-width:580px) { /* rules for phones */
49
- .wvr-hide-phone {display:none !important;}
50
- .wvr-hide-mobile {display:none !important;}
51
- .wvr-hide-all {display:none !important;}
52
- .wvr-show-desktop {display:none !important;}
53
- .wvr-show-smalltablet {display:none !important;}
54
- }
55
-
56
- /* Tabs */
57
- .wvr-tabs {
58
- -webkit-box-sizing: border-box;
59
- -moz-box-sizing: border-box;
60
- box-sizing: border-box;
61
- margin: 0 0 1.5em 0;
62
- background:transparent;
63
- }
64
-
65
- .wvr-tabs-style .wvr-tabs-nav { /* top "bar" behind tabs */
66
- padding: 0px 20px 0px 0px;
67
- margin: 0;
68
- height: 32px;
69
- background-color: transparent;
70
- }
71
- .wvr-tabs-style .wvr-tabs-nav span { /* bg color of a tab */
72
- display: block;
73
- float: left;
74
- padding: 0 20px;
75
- height: 32px;
76
- line-height: 32px;
77
- margin-right: 5px;
78
- cursor: pointer;
79
- border-top: 1px solid #888; /* border-color */
80
- border-right: 1px solid #888;
81
- border-left: 1px solid #888;
82
- background: #ccc; /* tab-bg */
83
- border-top-left-radius:6px;
84
- border-top-right-radius:6px;
85
- position:relative;
86
- z-index:1;
87
- }
88
-
89
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current {
90
- position:relative;
91
- z-index:3;
92
- }
93
-
94
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
95
- .wvr-tabs-style .wvr-tabs-nav span:hover {
96
- background: #eee; /* tab-current-color */
97
- }
98
-
99
- .wvr-tabs-style .wvr-tabs-pane {
100
- padding: 15px;
101
- border: 1px solid #888; /* border-color */
102
- min-height:20px; /* pane-min-height */
103
- background-color:transparent; /* pane-bg */
104
- position:relative;
105
- z-index:2;
106
- }
107
- .wvr-tabs-nav {
108
- position:relative;
109
- z-index:3;
110
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0.3/weaverx-ts-style.min.css DELETED
@@ -1,2 +0,0 @@
1
- @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px;position:relative;z-index:1}
2
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current{position:relative;z-index:3}.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent;position:relative;z-index:2}.wvr-tabs-nav{position:relative;z-index:3}
 
 
3.2.1/1.0.3/weaverx-ts.php DELETED
@@ -1,396 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Weaver Xtreme Theme Support
4
- Plugin URI: http://weavertheme.com/plugins
5
- Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
- Author: wpweaver
7
- Author URI: http://weavertheme.com/about/
8
- Version: 1.0.3
9
- License: GPL V3
10
-
11
- Weaver Xtreme Theme Support
12
-
13
- Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
-
30
- /* CORE FUNCTIONS
31
- */
32
- $theme = get_template_directory();
33
-
34
- if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
35
-
36
- define ('WVRX_TS_VERSION','1.0.3');
37
- define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
- define ('WVRX_TS_APPEARANCE_PAGE', false );
39
-
40
- function wvrx_ts_installed() {
41
- return true;
42
- }
43
-
44
-
45
- function wvrx_ts_plugins_url($file,$ext) {
46
- return plugins_url($file,__FILE__) . $ext;
47
- }
48
-
49
- function wvrx_ts_enqueue_scripts() { // action definition
50
-
51
- if (function_exists('wvrx_ts_slider_header')) wvrx_ts_slider_header();
52
-
53
- //-- Weaver X PLus js lib - requires jQuery...
54
-
55
- // put the enqueue script in the tabs shortcode where it belongs
56
-
57
- //wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION);
58
-
59
-
60
- // add plugin CSS here, too.
61
-
62
- wp_register_style('wvrx-ts-style-sheet',wvrx_ts_plugins_url('weaverx-ts-style', WVRX_TS_MINIFY.'.css'),null,WVRX_TS_VERSION,'all');
63
- wp_enqueue_style('wvrx-ts-style-sheet');
64
- }
65
-
66
- add_action('wp_enqueue_scripts', 'wvrx_ts_enqueue_scripts' );
67
-
68
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
69
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
70
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
71
-
72
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
73
-
74
- add_action('admin_menu', 'wvrx_ts_add_page_fields',11); // allow X-Plus to override us
75
-
76
- function wvrx_ts_add_page_fields() {
77
- add_meta_box('page-box', __('Weaver Xtreme Options For This Page (Theme Support Per Page Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_page_extras_load', 'page', 'normal', 'high');
78
- add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
79
- global $post;
80
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
81
- if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') ) {
82
- $i = 1;
83
- $args=array( 'public' => true, '_builtin' => false );
84
- $post_types = get_post_types($args,'names','and');
85
- foreach ($post_types as $post_type ) {
86
- add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras', $post_type, 'normal', 'high');
87
- $i++;
88
- }
89
- }
90
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin - needs to be here
91
-
92
- }
93
-
94
- function wvrx_ts_page_extras_load() {
95
- wvrx_ts_page_extras();
96
- }
97
-
98
- function wvrx_ts_post_extras_load() {
99
- wvrx_ts_post_extras();
100
- }
101
- }
102
-
103
- // ======================================== subthemes ========================================
104
- add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_action');
105
-
106
- function wvrx_ts_child_show_extrathemes_action() {
107
- echo '<h3 class="atw-option-subheader">' . __('Select an Add-on Subtheme You Have Uploaded','weaver-xtreme' /*adm*/) . '</h3>';
108
- $addon_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/';
109
- $addon_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes/addon-subthemes/';
110
-
111
- $addon_list = array();
112
- if($media_dir = @opendir($addon_dir)) { // build the list of themes from directory
113
- while ($m_file = readdir($media_dir)) {
114
- $len = strlen($m_file);
115
- $base = substr($m_file,0,$len-4);
116
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
117
- if($ext == '.wxt' ) {
118
- $addon_list[] = $base;
119
- }
120
- }
121
- }
122
-
123
- if (!empty($addon_list)) {
124
- natcasesort($addon_list);
125
-
126
- $cur_addon = weaverx_getopt('wvrx_addon_name');
127
- if ($cur_addon)
128
- echo '<h3>' . __('Currently selected Add-on Subtheme: ','weaver-xtreme' /*adm*/) . ucwords(str_replace('-',' ',$cur_addon)) . '</h3>';
129
- ?>
130
- <form enctype="multipart/form-data" name='pick_added_theme' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
131
-
132
- <h4><?php _e('Select an add-on subtheme:','weaver-xtreme' /*adm*/); ?></h4>
133
-
134
- <?php
135
- foreach ($addon_list as $addon) {
136
- $name = ucwords(str_replace('-',' ',$addon));
137
- ?>
138
- <div style="float:left; width:200px;">
139
- <label><input type="radio" name="wvrx_addon_name"
140
- <?php echo 'value="' . $addon . '"' . (weaverx_getopt('wvrx_addon_name') == $addon ? 'checked' : '') .
141
- '/> <strong>' . $name . '</strong><br />
142
- <img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . $addon_url . $addon . '.jpg" width="150px" height="113px" /><label></div>' . "\n";
143
- }
144
- ?>
145
- <div style="clear:both;"></div>
146
- <br /><span class='submit'><input name="set_added_subtheme" type="submit" value="<?php _e('Set to Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span>
147
- <small style="color:#b00;"><br /><?php _e('<strong>Note:</strong> Selecting a new subtheme will change only theme related settings.
148
- Options labelled with (&diams;) will be retained.
149
- You can use the Save/Restore tab to save a copy of all your current settings first.','weaver-xtreme' /*adm*/); ?></small>
150
-
151
- <?php weaverx_nonce_field('set_added_subtheme'); ?>
152
-
153
- <br /><br /><span class='atw-small-submit' style="margin-left:100px;"><input name="delete_added_subtheme" type="submit" value="<?php _e('Delete Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span> &nbsp;
154
- <small><?php _e('This will delete the selected Add-on Subtheme from the Add-on directory','weaver-xtreme' /*adm*/); ?></small>
155
- <?php weaverx_nonce_field('delete_added_subtheme'); ?>
156
- </form>
157
- <?php
158
- } else {
159
- ?>
160
- <p><?php _e('No Add-on Subthemes available.','weaver-xtreme' /*adm*/); ?></p>
161
- <?php
162
- }
163
- echo '<h3 class="atw-option-subheader">Upload an Add-on Subtheme From Your Computer</h3>';
164
- ?>
165
- <p><?php _e('You can find additional free and premium Add-on Subthemes for <em>Weaver Xtreme</em>','weaver-xtreme' /*adm*/); ?>
166
- <a href="http://xtreme.weavertheme.com/add-on-subthemes/" title="<?php _e('Weaver Xtreme Add-on Subthemes','weaver-xtreme' /*adm*/); ?>"><strong><?php _e('HERE','weaver-xtreme' /*adm*/); ?></strong></a>.</p>
167
- <form name='form_added_theme' enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
168
- <table>
169
- <tr valign="top">
170
- <td><strong><?php _e('Select Add-on Subtheme .zip file to upload:','weaver-xtreme' /*adm*/); ?></strong>
171
- <input name="uploaded_addon" type="file" />
172
- <input type="hidden" name="uploadaddon" value="yes" />
173
- </td>
174
- </tr>
175
- <tr><td>
176
- <span style="margin-left:50px;" class='submit'>
177
- <input name="upload_addon" type="submit" value="Upload Add-on Subtheme" /><br />
178
- </span>&nbsp;<small><?php _e('<strong>Upload and Save</strong> an Add-on Subtheme or Subtheme collection from .zip file on your computer. Will be saved on your site\'s filesystem.','weaver-xtreme' /*adm*/); ?></small>
179
- </td></tr>
180
- </table>
181
- <?php weaverx_nonce_field('upload_addon'); ?>
182
- </form>
183
-
184
- <?php
185
- }
186
-
187
- add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
188
- function wvrx_ts_child_process_options() {
189
-
190
- if (weaverx_submitted('set_added_subtheme') ) { // Set to selected addon - theme
191
- if (isset($_POST['wvrx_addon_name']))
192
- {
193
- $name = $_POST['wvrx_addon_name'];
194
-
195
- $openname = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt';
196
- $contents = file_get_contents($openname);
197
-
198
- if (!weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname)) {
199
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
200
- __('Sorry, there was a problem uploading your add on theme. The name you picked did not have a valid
201
- Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','weaver-xtreme' /*adm*/) . '</em></strong></p></div>';
202
- } else {
203
- weaverx_save_msg(__('Weaver Xtreme theme reset to ','weaver-xtreme' /*adm*/) .
204
- ucwords(str_replace('-',' ',$name )) . ' add-on subtheme.');
205
- weaverx_setopt('wvrx_addon_name',$name);
206
- }
207
- }
208
- }
209
-
210
- else if (weaverx_submitted('delete_added_subtheme') ) { // Delete selected addon theme
211
- if (isset($_POST['wvrx_addon_name']))
212
- {
213
- $name = $_POST['wvrx_addon_name'];
214
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt');
215
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.jpg');
216
- weaverx_save_msg(__('Deleted ','weaver-xtreme' /*adm*/) .
217
- ucwords(str_replace('-',' ',$name )) . __(' add-on subtheme.','weaver-xtreme' /*adm*/));
218
- }
219
- }
220
-
221
- else if (weaverx_submitted('upload_addon')
222
- && isset($_POST['uploadaddon'])
223
- && $_POST['uploadaddon'] == 'yes') {
224
- // upload theme from users computer
225
- // they've supplied and uploaded a file
226
- $ok = wvrx_ts_wunpackzip('uploaded_addon', weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/');
227
- }
228
-
229
- else if ( weaverx_submitted('toggle_shortcode_prefix') ) {
230
- $val = get_option('wvrx_toggle_shortcode_prefix');
231
- if ( $val ) {
232
- delete_option('wvrx_toggle_shortcode_prefix');
233
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes NOT prefixed with 'wvrx_'", 'weaver-xtreme'));
234
- } else {
235
- update_option('wvrx_toggle_shortcode_prefix', 'wvrx_');
236
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme'));
237
- }
238
- } else if ( weaverx_submitted('show_per_page_report')) {
239
- wvrx_ts_per_page_report();
240
- }
241
-
242
- }
243
-
244
- function wvrx_ts_wunpackzip($uploaded, $to_dir) {
245
- // upload theme from users computer
246
- // they've supplied and uploaded a file
247
- // This version and the one in Aspen Plus must be identical...
248
-
249
- $ok = true; // no errors so far
250
-
251
- if (isset($_FILES[$uploaded]['name'])) // uploaded_addon
252
- $filename = $_FILES[$uploaded]['name'];
253
- else
254
- $filename = "";
255
-
256
- if (isset($_FILES[$uploaded]['tmp_name'])) {
257
- $openname = $_FILES[$uploaded]['tmp_name'];
258
- } else {
259
- $openname = "";
260
- }
261
-
262
- //Check the file extension
263
- $check_file = strtolower($filename);
264
- $per = '.';
265
- $end = explode($per, $check_file); // workaround for PHP strict standards warning
266
- $ext_check = end($end);
267
-
268
- if (false && !weaverx_f_file_access_available()) {
269
- $errors[] = __('Sorry - Theme unable to access files.','weaver-xtreme' /*adm*/) . '<br />';
270
- $ok = false;
271
- }
272
-
273
- if ($filename == "") {
274
- $errors[] = __('You didn\'t select a file to upload.','weaver-xtreme' /*adm*/) . '<br />';
275
- $ok = false;
276
- }
277
-
278
- if ($ok && $ext_check != 'zip'){
279
- $errors[] = __("Uploaded files must have <em>.zip</em> extension.",'weaver-xtreme' /*adm*/) . "<br />";
280
- $ok = false;
281
- }
282
-
283
- if ($ok) {
284
- if (!weaverx_f_exists($openname)) {
285
- $errors[] = '<strong><em style="color:red;">' .
286
- __('Sorry, there was a problem uploading your file. You may need to check your folder permissions
287
- or other server settings.','weaver-xtreme' /*adm*/) . '</em></strong><br />' . __('Trying to use file','weaver-xtreme' /*adm*/) . "'$openname'";
288
- $ok = false;
289
- }
290
- }
291
-
292
- if ($ok) {
293
- // should be ready to go, but check out WP_Filesystem
294
- if (! WP_Filesystem()) {
295
- function wvrx_ts_wvx_return_direct() { return 'direct'; }
296
- add_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
297
- $try2 = WP_Filesystem();
298
- remove_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
299
- if (!$try2) {
300
- $errors[] = __('Sorry, there\'s a problem trying to use the WordPress unzip function. Please
301
- see the FAQ at weavertheme.com support for more information.','weaver-xtreme' /*adm*/);
302
- $ok = false;
303
- }
304
- }
305
- }
306
- if ($ok) {
307
- // $openname has uploaded .zip file to use
308
- // $filename has name of file uploaded
309
- $is_error = unzip_file( $openname, $to_dir );
310
- if ( !is_wp_error( $is_error ) ) {
311
- weaverx_save_msg(__('File ','weaver-xtreme' /*adm*/) . $filename . __(' successfully uploaded and unpacked to: <br />','weaver-xtreme' /*adm*/) . $to_dir);
312
- @unlink($openname); // delete temp file...
313
- } else {
314
- $errors[] = __("Sorry, unpacking the .zip you selected file failed. You may have a corrupt .zip file, or there many a file permissions problem on your WordPress installation.",'weaver-xtreme' /*adm*/);
315
- $errors[] = $is_error->get_error_message();
316
- $ok = false;
317
- }
318
- }
319
- if (!$ok) {
320
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' . __('ERROR','weaver-xtreme' /*adm*/) . '</em></strong></p><p>';
321
- foreach($errors as $error){
322
- echo $error.'<br />';
323
- }
324
- echo '</p></div>';
325
- }
326
- return $ok;
327
- }
328
-
329
- add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
330
- function wvrx_ts_child_saverestore_action() {
331
- echo '<h3 class="atw-option-subheader" style="font-style:italic">' . __('Use the <em>Weaver Xtreme Subthemes</em>
332
- tab to upload Add-on Subthemes.</h3><p>You can upload extra add-on subthemes you\'ve downloaded using the
333
- Subthemes tab. Note: the Save and Restore options on this page are for the custom settings you
334
- have created. These save/restore options are not related to Add-on Subthemes, although you can
335
- modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
336
- }
337
-
338
- // --------------------------------------
339
- function wvrx_ts_per_page_report() {
340
- echo '<div style="border:1px solid black; padding:1em;background:#F8FFCC;width:70%;margin:1em auto 1em auto;">';
341
- echo "<h2>" . __('Show Pages and Posts with Per Page / Per Post Settings','weaverx-axtreme') . "</h2>\n";
342
- echo "<h3>" . __('Posts','weaverx-axtreme') . "</h3>\n";
343
- wvrx_ts_scan_section('post');
344
- echo "<h3>" . __('Pages','weaverx-axtreme') . "</h3>\n";
345
- wvrx_ts_scan_section('page');
346
- echo "</div>\n";
347
- }
348
-
349
- function wvrx_ts_scan_section($what) {
350
-
351
- $post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
352
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
353
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
354
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
355
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
356
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
357
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
358
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
359
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
360
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
361
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
362
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
363
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
364
- );
365
-
366
- $args = array('posts_per_page' => -1, 'post_type' => $what, 'post_status' => 'any' );
367
- echo '<ul>';
368
-
369
- $allposts = get_posts($args);
370
- foreach ($allposts as $post) {
371
- $id = $post->ID;
372
- setup_postdata($post);
373
- $meta = get_post_meta( $id );
374
- if (!empty($meta)) {
375
- $type = $post->post_type;
376
- $title = esc_html($post->post_title);
377
- $link = esc_url(get_permalink($id));
378
- $tlink = "<a href='{$link}' alt='Post {$id}' target='_blank'>{$title}</a>";
379
- $heading = false;
380
- foreach ($meta as $name => $val_array) { // old value gets put into $val_array[0]
381
- if (in_array($name, $post_fields) ) {
382
- $val = $val_array[0]; // easier to work with
383
- if ($type == 'page') {
384
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Page settings.','weaverx-axtreme') . "</li>\n";
385
- } else {
386
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Post settings.','weaverx-axtreme') . "</li>\n";
387
- }
388
- break;
389
- }
390
- }
391
- }
392
- }
393
- echo '</ul>';
394
- }
395
- }
396
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/help/help.html DELETED
@@ -1,584 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <title>Weaver X Theme Support</title>
6
- <style type="text/css">
7
- body {
8
- background: #eeeeee;
9
- margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
10
- padding: 10px; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
11
- color: #000000;
12
- text-align: left;
13
- font-family: Verdana, Arial, Helvetica, sans-serif;
14
- font-size: 10pt;
15
- background-color: #ffd;
16
- }
17
-
18
- /* everything about each major block on the site - may be mods in some places */
19
-
20
- #container {
21
- max-width:800px;
22
- background-color: #00CC00;
23
- }
24
- #mainContent {
25
- background-color: #ffc;
26
- }
27
- .oneColFixCtr #container {
28
- max-width: 750px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
29
- background: #FFFFCD;
30
- margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
31
- border: 1px solid #000000;
32
- text-align: left; /* this overrides the text-align: center on the body element. */
33
- }
34
- .oneColFixCtr #mainContent {
35
- padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
36
- font-size:12px;
37
- }
38
- /* layouts for layout boxes */
39
- .layoutbox {
40
- width:700px;
41
- text-align:center;
42
- margin:0 25px;
43
- }
44
- .l_layout {
45
- display:block;
46
- width:140px;
47
- height:110px;
48
- float:left;
49
- margin-right:10px;
50
- margin-bottom:10px;
51
- display:inline;
52
- border:1px solid #888;
53
- color:black;
54
- text-align:center;
55
- font:15px arial, sans-serif;
56
- }
57
- .l_layout span {
58
- display:block;
59
- }
60
- .l_header {
61
- width:140px;
62
- height:20px;
63
- background:#CCF;
64
- line-height:20px;
65
- }
66
- .l_content {
67
- width:100px;
68
- height:70px;
69
- background:beige;
70
- float:left;
71
- display:inline;
72
- line-height:70px;
73
- }
74
- .l_contentcenter {
75
- width:60px;
76
- height:70px;
77
- background:beige;
78
- float:left;
79
- display:inline;
80
- line-height:70px;
81
- }
82
- .l_content2 {
83
- width:80px;
84
- height:70px;
85
- background:beige;
86
- float:left;
87
- display:inline;
88
- line-height:70px;
89
- }
90
- .l_contentw {
91
- width:140px;
92
- height:70px;
93
- background:beige;
94
- float:left;
95
- display:inline;
96
- line-height:70px;
97
- }
98
- .l_stdbar {
99
- width:40px;
100
- height:70px;
101
- float:left;
102
- display:inline;
103
- }
104
- .l_widebar {
105
- width:60px;
106
- height:70px;
107
- float:left;
108
- display:inline;
109
- }
110
- .l_righttop {
111
- width:40px;
112
- height:20px;
113
- background:#FE8;
114
- float:left;
115
- display:inline;
116
- line-height:20px;
117
- }
118
- .l_righttopwide {
119
- width:60px;
120
- height:20px;
121
- background:#FE8;
122
- float:left;
123
- display:inline;
124
- line-height:20px;
125
- }
126
- .l_rightup {
127
- width:40px;
128
- height:25px;
129
- margin:0;
130
- background:#FAA;
131
- float:left;
132
- display:inline;
133
- line-height:25px;
134
- }
135
- .l_rightright {
136
- width:40px;
137
- height:50px;
138
- margin:0;
139
- background:#FAA;
140
- float:left;
141
- display:inline;
142
- line-height:50px;
143
- }
144
- .l_rightdown {
145
- width:40px;
146
- height:25px;
147
- margin:0;
148
- background:#AFA;
149
- float:left;
150
- display:inline;
151
- line-height:25px;
152
- }
153
- .l_leftleft {
154
- width:40px;
155
- height:70px;
156
- margin:0;
157
- background:#AFA;
158
- float:left;
159
- display:inline;
160
- line-height:70px;
161
- }
162
- .l_leftshort {
163
- width:30px;
164
- height:50px;
165
- margin:0;
166
- background:#AFA;
167
- float:left;
168
- display:inline;
169
- line-height:50px;
170
- }
171
- .l_skinny {
172
- width:30px;
173
- height:50px;
174
- margin:0;
175
- background:#FAA;
176
- float:left;
177
- display:inline;
178
- line-height:50px;
179
- }
180
- .l_footer {
181
- clear:left;
182
- width:140px;
183
- height:20px;
184
- background:#DDF;
185
- color:#000;
186
- line-height:20px;
187
- }
188
- h4 {
189
- font-weight: bold;
190
- font-style:italic;
191
- color: #000066;
192
- text-decoration: underline;
193
- }
194
- h3 {
195
- font-size: medium;
196
- font-weight: bold;
197
- color: #000066;
198
- text-decoration: underline;
199
- }
200
- h2 {
201
- font-size: large;
202
- font-weight: bold;
203
- color: #000066;
204
- text-decoration: underline;
205
- margin-top: 40pt;
206
- }
207
- h1 {
208
- font-size: x-large;
209
- font-weight: bold;
210
- color: #000066;
211
- text-decoration: underline;
212
- }
213
- .codebox {
214
- font-family: "Courier New", Courier, monospace;
215
- font-size: 10px;
216
- font-style: normal;
217
- background-color: #E8E8E8;
218
- margin: 10px;
219
- padding: 4px;
220
- border: 1px solid #333333;
221
- color: #000000;
222
- width: 80%;
223
- }
224
- .attrs {
225
- font-family: Arial, Helvetica, sans-serif;
226
- font-size: 10pt;
227
- color:#000000;
228
- text-decoration: none;
229
- }
230
- .css {
231
- font-family: "Courier New", Courier, monospace;
232
- font-size: 9pt;
233
- font-style: normal;
234
- }
235
- .box {
236
- color: #000000;
237
- text-decoration: none;
238
- margin: 5px;
239
- padding: 5px;
240
- border: thin solid #000000;
241
- }
242
- .nospace {
243
- margin-top: 5px;
244
- margin-bottom: 5px;
245
- }
246
- .style3 {
247
- font-family: "Courier New", Courier, monospace
248
- }
249
- .style4 {
250
- font-family: monospace
251
- }
252
- .style6 {
253
- color: #990000;
254
- font-style: italic;
255
- }
256
- .style7 {
257
- color: #CC3300;
258
- font-weight: bold;
259
- }
260
- .code1 {
261
- font-family: "Courier New", Courier, monospace;
262
- font-size: 14px;
263
- font-style: italic;
264
- }
265
- .red-highlight {
266
- color: #CC3300;
267
- }
268
- </style>
269
- </head>
270
- <body class="oneColFixCtr">
271
- <div id="container">
272
- <div id="mainContent"> <a name="top" id="top"></a>
273
- <h2><b>Weaver X Theme Support Plugin Documentation -- Version 1.0</b></h2>
274
- <h4>Table of Contents</h4>
275
- <ul style="line-height:1.7em;">
276
- <li><a href="#summary"><strong>Plugin Summary</strong></a></li>
277
- <li><strong><a href="#admin_page">Weaver X Theme Extras Admin Page</a> </strong></li>
278
- <li><a href="#sc_summary"><strong>Shortcode Summary</strong></a></li>
279
- <ul>
280
- <li><strong><a href="#bloginfo">[bloginfo arg='name' style='your css']</a></strong></li>
281
- <li><strong><a href="#box">[box]text[/box]</a></strong></li>
282
- <li><a href="#tab_group"><strong>[tab_group] - content in tabs</strong></a></li>
283
- <li><strong><a href="#headerimage">[header_image] Shortcode</a></strong></li>
284
- <li><strong><a href="#schtml">[html]</a></strong></li>
285
- <li><strong><a href="#scdiv">[div]text[/div]</a>, <a href="#schtml">[span]text[/span]</a></strong></li>
286
- <li><strong><a href="#sciframe"> [iframe]</a></strong></li>
287
- <li><strong><a href="#scshowif">[show/hide_if]</a></strong></li>
288
- <li><strong><a href="#sitetitlesc">[site_title], [site_tagline]</a></strong></li>
289
-
290
- <li><strong><a href="#video">Video - [vimeo], [youtube]</a></strong></li>
291
- </ul>
292
- <li><a href="#widg-sum"><strong>Widget Summary</strong></a>
293
- <ul>
294
- <li><strong><a href="#widg-login">Weaver X Login Widget</a></strong></li>
295
- <li><strong><a href="#widg_pp_text">Weaver X Per Page Text</a></strong></li>
296
- <li><strong><a href="#widg_text_2">Weaver X Text 2</a></strong></li>
297
- </ul>
298
- </li>
299
- </ul>
300
- <h3><a name="summary" id="summary"></a>Plugin Summary </h3>
301
- <p>The Weaver X Theme Support Plugin provides a collection of shortcodes to allow you to easily add extra content and features to your regular content. These shortcodes will work with almost any WordPress theme. </p>
302
- <p>While these shortcodes should prove useful with most any theme, one of the goals of these shortcodes is to provide an alternative to users of the Weaver X theme.</p>
303
- <h2><a name="admin_page" id="admin_page"></a>Weaver Xtreme Theme Extras Admin Page</h2>
304
- <p>This plugin has just a few options, all found on the Weaver X Theme Support admin page under the WordPress dashboard Appearance section.</p>
305
- <h2><a name="sc_summary" id="sc_summary"></a>Shortcode Summary</h2>
306
- <h3><a name="tab_group" id="tab_group"></a>[tab_group] - content in tabs </h3>
307
- <p>Show content displayed on tabbed pages.</p>
308
- <p><strong>Shortcode usage:</strong><br />
309
- <pre>
310
- [tab_group border_color=black page_min_height=200px]
311
- [tab title='tab one']This is the content found on first tab.[/tab]
312
- [tab title='tab two']And we have more content for the second tab.[/tab]
313
- [tab title='last tab']And this is the last tab. There could be more.[/tab]
314
- [/tab_group]
315
- </pre>
316
- <h4>Short code parameters</h4>
317
- You can supply values for these parameters to control the look of the tabbed section.
318
- <br />
319
- <ul>
320
- <li><b>border_color:</b> tab and pane border color - default #888</li>
321
- <li><b>tab_bg</b>: normal bg color of tab (default #CCC)</li>
322
- <li><b>tab_selected_color</b>: color of tab when selected (default #EEE)</li>
323
- <li><b>pane_min_height</b>: min height of a pane to help make all even if needed</li>
324
- <li><b>pane_bg</b>: bg color of pane</li>
325
- </ul>
326
- </p>
327
- <h3><a name="headerimage" id="headerimage"></a><strong>[header_image]</strong></h3>
328
- <p>The <code>[header_image]</code> shortcode allows you display the current header image wherever you want.
329
- For example, you can get the header image into the Header Widget Area by using this shortcode in a text widget.
330
- The current standard or mobile header image will be displayed. Only the <code>&lt;img ... &gt;</code> is displayed --
331
- the image will not be wrapped in a link to the site.</p>
332
-
333
- <p><strong>Shortcode usage:</strong> <code>[header_image h='size' w='size' style='inline-style']</code>
334
- <br />
335
- <ol>
336
- <li><strong>w='size' h='size'</strong> - By default, no height or image properties are included with the
337
- header <code>&lt;img ... &gt;</code>, which will result in an image scaled to fit into whatever the natural
338
- width of the enclosing HTML container is (the content area, a text widget, etc.). You may specify an explicit
339
- value (usually in px) for the height and width of the image.
340
- </li>
341
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
342
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
343
- <code>style="your-rules;"</code> - using double quotation marks.
344
- </li>
345
- </ol>
346
- <h3><a name="schtml" id="schtml"></a><strong>[html]</strong></h3>
347
-
348
- <p>The Weaver X Theme Support <code>[html]</code> shortcode allows you to add arbitrary HTML to your post and page content. The
349
- main purpose of this shortcode is to get around the auto paragraph and line break and other HTML stripping functionality
350
- of the WordPress editor.</p>
351
-
352
- <p><strong>Shortcode usage:</strong> <code>[html html-tag args='parameters']</code>
353
- <br />
354
- <ol>
355
- <li><strong>html-tag</strong> - The first parameter to the shortcode must be present, and must be a standard
356
- HTML tag - <code>p</code>, <code>br</code>, or <code>span</code>, for example. You just supply the tag - no quotation
357
- marks, no '=', just the tag. The shortcode provides the &lt; and &gt;. If you need a wrapping HTML tag (e.g., <code>span</code> and <code>/span</code>), use
358
- two shortcodes:<br />
359
- <code>[html span args='style="color:red"']content to make red[html /span]</code>
360
- </li>
361
- <li><strong>args='parameters'</strong> - Allows you to specify arbitrary parameters for your HTML tag. See the example above.
362
- </li>
363
- </ol>
364
- </p>
365
-
366
- <h3><a name="scdiv" id="scdiv"></a><strong>[div]text[/div]</strong>, [span]text[/span]</h3>
367
-
368
- <p>The Weaver X Theme Support <code>[div]</code> and [span] shortcodes allow you to easily add HTML &lt;div&gt; or &lt;span&gt; tags to your post and page content. The
369
- main purpose of these shortcodes is to get around need to switch to the HTML editor view when you need to
370
- wrap your content in a &lt;div&gt; or &lt;span&gt;.</p>
371
- <p>
372
- This will work exactly like a standard HMTL &lt;div&gt;and &lt;span&gt; tags. It supports 'id', 'class',
373
- and 'style' parameters, which are the most useful. Instead of wrapping your text in &lt;div&gt; or &lt;span&gt; tags, wrap them like
374
- this (the Visual view will work just fine):<br />
375
- <code>[div style="font-size:20px;']This content will be large.[/div]</code><br />
376
- <code>[span style=&quot;font-size:20px;']This content will be large.[/span]</code></p>
377
- <p><strong>Shortcode usage:</strong> <code>[div id='class_id' class='class_name' style='style_values']text[/div]</code>
378
- <br />
379
- <code>[span id='class_id' class='class_name' style='style_values']text[/span]</code> <br />
380
- <ol>
381
- <li><strong>id='class_id' class='class_name' style='style_values'</strong> - Allows you to specify id, class, and style for the &lt;div&gt;. See the example above.
382
- </li>
383
- </ol>
384
- </p>
385
-
386
- <h3><a name="sciframe" id="sciframe"></a><strong>iframe - [iframe]</strong></h3>
387
-
388
- <p>The <code>[iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
389
- the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>
390
-
391
- <p><strong>Shortcode usage:</strong> <code>[iframe src='http://example.com' height=600 percent=100 style="style"]</code>
392
- <br />
393
- <ol>
394
- <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
395
- </li>
396
- <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
397
- </li>
398
- <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
399
- </li>
400
- <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values".
401
- </li>
402
- </ol>
403
- </p>
404
-
405
- <h3><a name="scshowif" id="scshowif"></a><strong>[show_if]content[/show_if], [hide_if]</strong>content [/hide_if]</h3>
406
- <p>The <code>[show_if]</code> and <code>[hide_if]</code> shortcodes allow you to selectively
407
- display or hide content depending if any of several conditions are met.</p>
408
-
409
- <p><strong>Shortcode usage:</strong> <code>[hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]</code>
410
- </p>
411
- <p>You bracket the content you want to selectively display with <code>[show/hide_if]</code> and closing
412
- <code>[/show/hide_if]</code> tags. That content can contain other shortcodes as needed. If you specify more than one parameter to the short code, then all the conditions must be met (logical AND). Any paramaters you don't include are considered true.</p>
413
- <h4>Parameters</h4>
414
- <p>'device' =&gt; 'default', // desktop, mobile, smalltablet, phone, all<br />
415
- 'logged_in' =&gt; 'default', // true or false<br />
416
- 'not_post_id' =&gt; 'default', // comma separated list of post IDs (includes pages, too)<br />
417
- 'post_id' =&gt; 'default', // comma separated list<br />
418
- 'user_can' =&gt; 'default' // http://codex.wordpress.org/Function_Reference/current_user_can</p>
419
- <p>
420
- <strong>device=desktop | mobile | smalltablet | phone </strong> - The device parameter for <code>[show/hide_if]</code> is designed to allow you to hide <em>or</em> show any content on any of the
421
- device sizes recognized by Weaver Xtreme (or any theme, actually): 'phone', 'smalltablet', and 'desktop', or 'mobile' for non-desktop devices. If you want to show or hide content on
422
- a specific device, you give the <span class="code1">device</span> parameter a value of desktop, mobile, smalltablet, phone, or none (e.g., <code>[show_if device=mobile]</code>). </p>
423
- <p><strong>logged_in=true | false</strong> - This will hide or display content depending if the visitor is logged into the site or not. </p>
424
- <p><strong>post_id=34,875</strong> / <strong>not_post_id=1,2,3 </strong>- This will display (or not display) the content depending if the current page or single post view is included in the comma separated list of WordPress page/post IDs. You can use both to refine a list of pages or posts to display or not display. Note that even though the parameter is called 'post_id', it applies equally to pages and posts. Depending on where you use the shortcode, it will apply to a post differently depending if it is on a blog or single page view of a post. Note that the default WordPress blog (as opposed to the Weaver Xtreme Page with Posts template) does not have a post_ID.</p>
425
- <p><strong>user_can=user-capability</strong> - This will show or hide depending if the current visitor has certain WordPress user capabilities. There are many capabilities which are defined in the <a href="http://codex.wordpress.org/Function_Reference/current_user_can" target="_blank">WordPress Codex</a>. This shortcode supports any of the listed capabilities for maximum flexibility. If you don't want to learn about all the capabilities listed in the Codex, you can use the following capability values to determine if the visitor has a specific role (as defined on the Dashboard Users admin pages). For example:<br />
426
- <br />
427
- <span class="code1">[show_if user_can=publish_pages]content for Editors and above[/show_if]</span><br />
428
- <br />
429
- Note that the higher roles have all the capabilities of the lower roles - an Editor can do everything a Contributor can.</p>
430
- <table width="80%" border="1">
431
- <caption>
432
- Capabilities to Specify Role
433
- </caption>
434
- <tr>
435
- <th scope="col">Role</th>
436
- <th scope="col">Capability</th>
437
- </tr>
438
- <tr>
439
- <td>Subscriber</td>
440
- <td>read</td>
441
- </tr>
442
- <tr>
443
- <td>Contributor</td>
444
- <td>edit_posts</td>
445
- </tr>
446
- <tr>
447
- <td>Author</td>
448
- <td>publish_posts</td>
449
- </tr>
450
- <tr>
451
- <td>Editor</td>
452
- <td>publish_pages</td>
453
- </tr>
454
- <tr>
455
- <td>Administrator</td>
456
- <td>manage_options</td>
457
- </tr>
458
- <tr>
459
- <td>Super Administrator (MultiSite)</td>
460
- <td>manage_network</td>
461
- </tr>
462
- </table>
463
- <p>&nbsp;</p>
464
- <h3><a name="sitetitlesc" id="sitetitlesc"></a><strong>[site_title style="style" matchtheme=false], [site_tagline style="style" matchtheme=false]</strong></h3>
465
-
466
- <p>The <code>[site_title]</code> and <code>[site_tagline]</code> shortcodes allow you display the current
467
- site title and site tagline. This can be useful in a text widget in the Header Widget Area, for example.</p>
468
- <p><em>Note:</em> If you want to position the content of a text widget within the a cell of the Header Widget Area, you could use the following
469
- example:</p>
470
- <p><code>[site_title style='font-size:150%;position:absolute;padding-left:20px;padding-top:30px;']</code></p>
471
-
472
- <p><strong>Shortcode usage:</strong> <code>[site_title style='inline-style' matchtheme=false] [site_tagline style='inline-style' matchtheme=false]</code>
473
- <br />
474
- <ol>
475
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
476
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
477
- <code>style="your-rules;"</code> - using double quotation marks.
478
- </li>
479
- <li><strong>matchtheme=true</strong> - Allows you to add match the theme styling as defined in the site header if set to true.
480
- This will match the color/style/font of the header version of the site title and tagline with the exception of hide settings.
481
- The shortcode version will not be hidden on any device unless you also wrap the shortcode with a [show_if/hide_if] shortcode.
482
- </li>
483
-
484
- </ol>
485
-
486
- <h3><a name="bloginfo" id="bloginfo"></a><strong>[bloginfo arg='name' style='your css']</strong></h3>
487
-
488
- <p>This shortcode can be used to access the WordPress function 'get_bloginfo($arg)'. This will return a number of useful
489
- strings depending on the value. All the supported values are listed at http://codex.wordpress.org/Function_Reference/get_bloginfo.
490
- Some useful values include 'stylesheet_directory' and 'template_directory'. You can wrap the bloginfo output with css added to a &lt;span style=&quot;your css&quot;&gt;.
491
- </p>
492
-
493
- <h3><a name="box" id="box"></a><strong>[box]text[/box]</strong></h3>
494
-
495
- <p>
496
- Wrap content in a box.</p>
497
- <p><strong>Shortcode Usage:</strong> <code>[box align=left background=#fff border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules']text[/box]</code></p>
498
- <ol>
499
- <li><strong>align=align</strong>: Leave blank, or specify left, center, or right for alignment of box within surrounding text.</li>
500
- <li><strong>border=true</strong>: True is default. Specify false or 0 for no borders.</li>
501
- <li><strong>border_rule='1px solid black</strong>': Specify a compound border CSS value to replace the default '1px solid black'.</li>
502
- <li><strong>border_radius=4</strong>: Default is none - specify a px value for the corner radius if you want rounded corners.</li>
503
- <li><strong>color=#000</strong>: Default is inherit - specify a valid color for the color of the text in the box.</li>
504
- <li><strong>background=#fff</strong>: Default is inherit - specify color for box background color.</li>
505
- <li><strong>margin=1</strong>: Default is 0 - specify an 'em' value for margin around the box. Using a margin overrides align parameter.</li>
506
- <li><strong>padding=1</strong>: Default 1 - specify an 'em' value for padding inside box.</li>
507
- <li><strong>shadow=0</strong>: Default 0 - specify a value from 1 to 5 for a border around the box.</li>
508
- <li><strong>style=inline-style</strong>: any additional custom styling for the box</li>
509
- <li><strong>width=100</strong>: A percentage width for the box within its surrounding container.</li>
510
- </ol>
511
- <h3><a name="video" id="video"></a><strong>Video - [vimeo], [youtube]</strong></h3>
512
- <p>Weaver X Theme Support supports specialized shortcodes to display video. While there are other ways to embed video, the Weaver X Theme Support versions have two important features. First, they will auto adjust to the width of your content, <em><strong>including</strong></em> the mobile view. Second, they use the latest iframe/HTML5 interface provided by YouTube and Vimeo.</p>
513
- <p><strong>Specifying Video Display Size for both shortcodes</strong></p>
514
- <p>Weaver X Theme Support supports a common set of options for both the YouTube and Vimeo shortcodes to support displaying your videos with a specific width and correct height. By default, your videos will be displayed using the full width of the content area being used (percent=100). The percent= parameter is used to specify the width you want.</p>
515
- <p>The height of the video is automatically determined based on the width and the display ratio of the particular video. </p>
516
- <p>Finally, you may specify if the video should be centered or no within the display area using &quot;center=0&quot; to not center (centering is on by default).</p>
517
- <p>Note - if you want to display more than one video horizontally, use &quot;center=0&quot; and specify an appropriate percentage to fit all the videos.</p>
518
- <p>Parameters in Common</p>
519
- <ul>
520
- <li>percent=100 - By default, the video will be sized to fill the full content space. You can use the percent value to make
521
- the video use a percentage of the content space (but mobile will always use full width).</li>
522
- <li>center=1 - Specify 'center=0' to disable centering of the video.</li>
523
- <li>sd=0 - By default, Weaver X Theme Support will generate sizes for HD/widescreen videos. To display old 4:3 standard definition videos, include 'sd=1' in the shortcode.</li>
524
- </ul>
525
- <h4>Vimeo</h4>
526
- <pre><strong>[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex
527
- autoplay=0 loop=0 portrait=1 title=1 byline=1]
528
- </strong></pre>
529
- <p>This will display Vimeo videos. At the minimum, you can provide the standard http://vimeo.com/nnnnn link, or just the video ID number (which is part of the Vimeo Link). The other Vimeo specific options include:</p>
530
- <ul>
531
- <li>color - You can optionally specify a Vimeo color theme using 6 hex digits for a color value.</li>
532
- <li>autoplay - Add 'autoplay=1' to have the video autoplay.</li>
533
- <li>loop - Add 'loop=1' to have the video loop.</li>
534
- <li>portrait, title, byline - You can specify a value '=0' for these to hide the display of the corresponding element on the Vimeo player.
535
- Portrait is the avatar/icon, title is the video title, and byline is source attribution.<br />
536
- </li>
537
- </ul>
538
- <h4>YouTube</h4>
539
- <code><strong>[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=1 https=0 privacy=0 {youtube options}]
540
- </strong></code>
541
- <p>This will display YouTube videos. At the minimum, you can provide the standard http://youtu.be/xxxxxx share link (including the options YouTube lets you specify), the long format share link, or just the video ID number using the id=videoid parameter (which is part of the YouTube Link). The other YouTube specific options include:</p>
542
- <ul>
543
- <li>rel - If you specify 'rel=0', YouTube won't show related videos after the video plays.</li>
544
- <li>https - If you specify 'https=1', YouTube will use the https protocol.</li>
545
- <li>privacy - If you specify 'privacy=1', YouTube won't used cookies to track your viewing.</li>
546
- </ul>
547
- <p>In addition to the above [youtube] options, the shortcode also supports most standard YouTube options. These are more fully described on the <a href="http://code.google.com/apis/youtube/player_parameters.html" target="_blank">YouTube Embedded Player Parameters</a> page.</p>
548
- <p>The supported options, with Weaver X Theme Support's default values include:</p>
549
- <p>'autohide' = '1' . . . . . . 0: always show controls; 1: autohide controls; 2: autohide progress bar<br />
550
- 'autoplay' = '0' . . . . . . 1: auto play; 0: don't<br />
551
- 'border' = '0' . . . . . . . . 0: no border; 1: border using color1 and color2 (don't seem to work)<br />
552
- 'color' = not set . . . . . . progress bar color - red or white<br />
553
- 'color1' = not set . . . . . RGB hex value for border color<br />
554
- 'color2' = not set . . . . . RGB hex value for control bar bg<br />
555
- 'controls' = '1' . . . . . . . 0: hide player controls<br />
556
- 'disablekb' = '0' . . . . . . 1: disable keyboard controls<br />
557
- 'egm' ='0' . . . . . . . . . . . 1: enable &quot;Enhanced Genie Menu&quot;<br />
558
- 'hd' = '0' . . . . . . . . . . . . 1: enable HD playback by default<br />
559
- 'iv_load_policy' = '1' . . . 1: show annotations; 3: don't show; 2: discontinued support<br />
560
- 'loop' = '0' . . . . . . . . . . . 1: loop video<br />
561
- 'modestbranding' = '0' . .1: hide YouTube logo - will still show label in upper right corner<br />
562
- 'origin' = not set . . . . . . . See YouTube docs<br />
563
- 'playlist' = not set . . . . . . Comma separated list of videoIDs to play (id/url video played 1st)<br />
564
- 'showinfo' = '1' . . . . . . . 0: hide video title<br />
565
- 'showsearch' = '1' . . . . . 0: hide video searchbox<br />
566
- 'start' = not set . . . . . . . start vide this number of seconds from start<br />
567
- 'theme' = 'dark' . . . . . . . dark or light - display theme for player<br />
568
- 'wmode' = 'transparent' . Keeps video behind menu bars, etc. Other values available - see YouTube</p>
569
- <h2><a name="widg-sum" id="widg-sum"></a>Widget Summary</h2>
570
- <h3><a name="widg-login" id="widg-login"></a>Weaver X Login Widget</h3>
571
- <p>This simple widget shows a login in link, or a welcome, Site Admin, and Log out choice if the user is logged in.</p>
572
- <h3><a name="widg_pp_text" id="widg_pp_text"></a>Weaver X Per Page Text</h3>
573
- <p>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>if you want a title, and define Custom Field<em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text, HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)</p>
574
- <h3><a name="widg_text_2" id="widg_text_2"></a>Weaver X Text 2</h3>
575
- <p>This widget lets you add two columns of text. It is most useful in wide widget areas such as a content top or bottom widget area, or a wide footer widget area.</p>
576
- <p>&nbsp;</p>
577
- <h2><br />
578
- </h2>
579
- <p>The Weaver X Theme Support Plugin and this document are &copy; 2014, Bruce E. Wampler. <a ref="http://weavertheme.com">Web Site - WeaverTheme.com</a></p>
580
-
581
- </div>
582
- </div>
583
- </body>
584
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,592 +0,0 @@
1
- <?php
2
- /* Display per page and per post options.
3
- *
4
- * __ added - 12/10/14
5
- *
6
- * IMPORTANT! - this code and the Weaver Plus plugin need to be maintained in parallel!
7
- */
8
-
9
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
10
- // Admin panel that gets added to the page edit page for per page options
11
-
12
-
13
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
14
-
15
- function wvrx_ts_isp_true($val) {
16
- if ($val) return true;
17
- return false;
18
- }
19
-
20
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
21
- global $post;
22
- ?>
23
- <div style="float:left;width:<?php echo $width; ?>%"><label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
24
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> />
25
- <?php echo($msg . '</label></div>');
26
- for ($i = 0 ; $i < $br ; $i++)
27
- echo '<br class="page_checkbox" style="clear:both;" />';
28
- }
29
-
30
- function wvrx_ts_page_layout( $page = 'page' ) {
31
-
32
- if ( $page == 'page')
33
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaver-xtreme' /*adm*/);
34
- else
35
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaver-xtreme' /*adm*/);
36
-
37
- $opts = array( 'id' => '_pp_page_layout',
38
- 'info' => $msg,
39
- 'value' => array(
40
- array('val' => '', 'desc' => __('Use Default','weaver-xtreme' /*adm*/) ),
41
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaver-xtreme' /*adm*/) ),
42
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaver-xtreme' /*adm*/) ),
43
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaver-xtreme' /*adm*/) ),
44
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaver-xtreme' /*adm*/) ),
45
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaver-xtreme' /*adm*/) ),
46
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaver-xtreme' /*adm*/) ),
47
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaver-xtreme' /*adm*/) )
48
- ));
49
- wvrx_ts_pp_select_id($opts);
50
- }
51
- //--
52
-
53
-
54
-
55
- function wvrx_ts_pp_replacement( $desc, $id ) {
56
- global $post;
57
- global $wp_registered_sidebars;
58
-
59
- $id = '_' . $id;
60
-
61
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
62
-
63
-
64
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
65
- $area_name = $value['id']; //sanitize_title($value['name']);
66
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
67
- echo ' <option value="' . $area_name . '"';
68
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
69
- echo '>' . substr($area_name,9) . "</option>\n";
70
-
71
- }
72
- }
73
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
74
- }
75
- //--
76
-
77
-
78
- function wvrx_ts_pp_select_id( $value ) {
79
- global $post;
80
-
81
- if ( isset( $value['name'] ) && $value['name'] != '' )
82
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
83
-
84
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
85
-
86
- foreach ($value['value'] as $option) {
87
- if ( $option['val'] == '' ) {
88
- echo '<option value="">';
89
- } else {
90
- echo ' <option value="' . $option['val'] . '"';
91
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
92
- echo ">";
93
- }
94
- echo $option['desc'] . "</option>\n";
95
- }
96
- echo '</select>&nbsp;' . $value['info'] . "\n";
97
- }
98
- //--
99
-
100
-
101
-
102
- function wvrx_ts_pwp_atw_show_post_filter() {
103
- // use plugin options...
104
- global $post;
105
-
106
- if ( function_exists( 'atw_showposts_installed' ) ) {
107
- $filters = atw_posts_getopt('filters');
108
-
109
- $first = true;
110
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
111
- foreach ($filters as $filter => $val) { // display dropdown of available filters
112
- if ( $first ) {
113
- $first = false;
114
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
115
- } else {
116
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
117
- }
118
- }
119
- echo '</select>&nbsp;' .
120
- __('Use a Filter from <em>ATW Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaver-xtreme' /*adm*/) .
121
- '<br /> <span style="margin-left:8em;"><span>' .
122
- __('(Note: ATW Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts using this filter.)','weaver-xtreme' /*adm*/) .
123
- '<br />' . '<br />';
124
- } else {
125
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaver-xtreme' /*adm*/); ?>
126
- <br /><br />
127
- <?php }
128
- }
129
- //--
130
-
131
-
132
-
133
- function wvrx_ts_pwp_type() {
134
- $opts = array( 'name' => __('Display posts as:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
135
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaver-xtreme' /*adm*/),
136
- 'value' => array(
137
- array('val' => '', 'desc' => '&nbsp;' ),
138
- array('val' => 'full', 'desc' => __('Full post','weaver-xtreme' /*adm*/) ),
139
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaver-xtreme' /*adm*/) ),
140
- array('val' => 'title', 'desc' => __('Title only','weaver-xtreme' /*adm*/) ),
141
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaver-xtreme' /*adm*/) )
142
- ));
143
- wvrx_ts_pp_select_id($opts);
144
- }
145
-
146
-
147
- function wvrx_ts_pwp_cols() {
148
-
149
- $opts = array( 'name' => __('Display post columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
150
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaver-xtreme' /*adm*/),
151
- 'value' => array(
152
- array('val' => '', 'desc' => '&nbsp;'),
153
- array('val' => '1', 'desc' => __('One Column','weaver-xtreme' /*adm*/) ),
154
- array('val' => '2', 'desc' => __('Two Columns','weaver-xtreme' /*adm*/) ),
155
- array('val' => '3', 'desc' => __('Three Columns','weaver-xtreme' /*adm*/) ) )
156
- );
157
- wvrx_ts_pp_select_id($opts);
158
-
159
- weaverx_html_br();
160
-
161
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_pwp_masonry',
162
- 'info' => __('Use <em>Masonry</em> for multi-column display','weaver-xtreme' /*adm*/),
163
- 'value' => array(
164
- array('val' => '', 'desc' => '&nbsp;' ),
165
- array('val' => '1', 'desc' => __('One Column','weaver-xtreme' /*adm*/) ),
166
- array('val' => '2', 'desc' => __('Two Columns','weaver-xtreme' /*adm*/) ),
167
- array('val' => '3', 'desc' => __('Three Columns','weaver-xtreme' /*adm*/) ),
168
- array('val' => '4', 'desc' => __('Four Columns','weaver-xtreme' /*adm*/) ),
169
- array('val' => '5', 'desc' => __('Five Columns','weaver-xtreme' /*adm*/) ) )
170
- );
171
- wvrx_ts_pp_select_id($opts2);
172
-
173
- ?>
174
- <br />
175
- <?php
176
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaver-xtreme' /*adm*/),90,1);
177
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaver-xtreme' /*adm*/),90,1);
178
- }
179
-
180
- function wvrx_ts_page_extras() {
181
- global $post;
182
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
183
-
184
- if ( !( current_user_can('edit_themes')
185
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
186
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
187
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
188
- ) {
189
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
190
- echo '<p>' .
191
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaver-xtreme' /*adm*/) .
192
- '</p>';
193
- else
194
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
195
- return; // don't show per post panel
196
- }
197
-
198
- echo("<div style=\"line-height:150%;\"><p>\n");
199
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
200
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
201
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaver-xtreme' /*adm*/); ?>
202
- </div><br />
203
- <?php
204
- }
205
-
206
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
207
- <div style="padding:2px; border:2px solid red; background:#FAA;">
208
- <?php _e('<strong>WARNING!</strong>
209
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
210
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
211
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
212
- If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
213
- including the option of using the Page with Posts page template,
214
- then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
215
- the <em></em>&mdash; Select &mdash;</em> default value.','weaver-xtreme' /*adm*/); ?>
216
- </div><br />
217
- <?php
218
- return;
219
- }
220
- echo '<strong>' . __('Page Templates','weaver-xtreme' /*adm*/) . '</strong>';
221
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaver-xtreme' /*adm*/));
222
- echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
223
- weaverx_html_br();
224
- _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaver-xtreme' /*adm*/);
225
- weaverx_html_br();
226
- echo '<strong>' . __('Per Page Options','weaver-xtreme' /*adm*/) . '</strong>';
227
- weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaver-xtreme' /*adm*/));
228
- weaverx_html_br();
229
- _e('These settings let you hide various elements on a per page basis.','weaver-xtreme' /*adm*/);
230
- weaverx_html_br();
231
-
232
-
233
- wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaver-xtreme' /*adm*/));
234
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaver-xtreme' /*adm*/));
235
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaver-xtreme' /*adm*/), 33, 1);
236
-
237
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaver-xtreme' /*adm*/));
238
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaver-xtreme' /*adm*/));
239
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaver-xtreme' /*adm*/),33,1);
240
-
241
-
242
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaver-xtreme' /*adm*/),33,2);
243
-
244
- _e('<em>Note:</em> the following options work with the default menu - not custom menus.','weaver-xtreme' /*adm*/);
245
- weaverx_html_br();
246
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaver-xtreme' /*adm*/),90,1);
247
-
248
-
249
- wvrx_ts_page_checkbox('_pp_stay_on_page',__('Menu "Placeholder" page. Useful for top-level menu item - don\'t go anywhere when menu item is clicked.','weaver-xtreme' /*adm*/),90,2);
250
-
251
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90,1);
252
-
253
- if (weaverx_allow_multisite()) {
254
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90,1);
255
- }
256
-
257
- ?>
258
- <p><strong><?php _e('Sidebars &amp; Widgets','weaver-xtreme' /*adm*/); ?></strong></p>
259
-
260
- <?php
261
- wvrx_ts_page_layout();
262
- ?>
263
- <br />
264
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
265
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
266
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaver-xtreme' /*adm*/); ?> <br /><br />
267
- <?php
268
-
269
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaver-xtreme' /*adm*/),40);
270
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaver-xtreme' /*adm*/),40,1);
271
-
272
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaver-xtreme' /*adm*/),40);
273
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaver-xtreme' /*adm*/),40,1);
274
-
275
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaver-xtreme' /*adm*/),40);
276
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaver-xtreme' /*adm*/),40,1);
277
-
278
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaver-xtreme' /*adm*/),40);
279
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaver-xtreme' /*adm*/),40,1);
280
- ?>
281
-
282
- <p><strong><?php _e('Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
283
- <p>
284
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
285
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
286
- </p>
287
- <?php
288
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
289
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
290
-
291
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
292
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
293
-
294
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-top-widget-area' );
295
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-bottom-widget-area' );
296
-
297
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaver-xtreme' /*adm*/) , 'page-top-widget-area' );
298
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaver-xtreme' /*adm*/) , 'page-bottom-widget-area' );
299
- ?>
300
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
301
- <?php
302
- $opts3 = array( 'id' => '_pp_fi_location',
303
- 'info' => __('How to display Page FI on this page','weaver-xtreme' /*adm*/),
304
- 'value' => array(
305
- array('val' => '', 'desc' => __('Default Page FI','weaver-xtreme' /*adm*/) ),
306
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
307
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
308
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
309
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
310
- array('val' => 'hide', 'desc' => __('Hide FI on this Page','weaver-xtreme' /*adm*/) )
311
- )
312
- );
313
- wvrx_ts_pp_select_id($opts3);
314
- ?>
315
- <br />
316
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
317
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
318
- <?php _e('<em>Featured Image Link</em> - Full URL for link from FI','weaver-xtreme' /*adm*/); ?>
319
- <br style="clear:both;" />
320
- <hr />
321
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
322
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
323
-
324
- <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaver-xtreme' /*adm*/); ?>
325
- <br />
326
- </p>
327
- <p>
328
- <?php _e('<strong>Settings for "Page with Posts" Template</strong>','weaver-xtreme' /*adm*/);
329
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaver-xtreme' /*adm*/) );
330
-
331
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
332
- if ($template == 'paget-posts.php') {
333
- ?>
334
- <br />
335
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
336
- The settings will be combined for the final filtered list of posts displayed.
337
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
338
- <br />
339
-
340
- <input type="text" size="30" id="_pp_category" name="_pp_category"
341
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
342
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaver-xtreme' /*adm*/); ?>
343
- <br />
344
-
345
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
346
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
347
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaver-xtreme' /*adm*/); ?> <br />
348
-
349
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
350
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
351
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display.",'weaver-xtreme' /*adm*/); ?> <br />
352
-
353
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
354
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
355
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaver-xtreme' /*adm*/); ?> <br />
356
-
357
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
358
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
359
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaver-xtreme' /*adm*/); ?> <br />
360
-
361
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
362
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
363
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaver-xtreme' /*adm*/); ?> <br />
364
-
365
- <input type="text" size="30" id="_pp_author" name="_pp_author"
366
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
367
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaver-xtreme' /*adm*/); ?> <br />
368
-
369
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
370
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
371
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaver-xtreme' /*adm*/); ?> <br />
372
-
373
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
374
-
375
- <?php wvrx_ts_pwp_type(); ?><br />
376
- <?php wvrx_ts_pwp_cols(); ?><br />
377
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
378
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
379
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaver-xtreme' /*adm*/); ?>
380
- <br />
381
-
382
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
383
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
384
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
385
- __("Hide first \"n\" posts</em> - Start with post n+1.
386
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaver-xtreme' /*adm*/) ; ?>
387
-
388
- <br /><br />
389
-
390
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaver-xtreme' /*adm*/), 40); ?>
391
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaver-xtreme' /*adm*/), 40, 1); ?>
392
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaver-xtreme' /*adm*/), 40); ?>
393
- </p>
394
- <?php
395
- } else { // NOT a page with posts
396
- ?> <p>
397
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
398
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
399
- settings for "Page with Posts" will be displayed here. Current page template:','weaver-xtreme' /*adm*/); ?>
400
- <?php echo $template; ?>
401
- </p>
402
- <?php
403
- }
404
- do_action('weaverxplus_add_per_page');
405
- ?>
406
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
407
- </div>
408
- <?php
409
- }
410
-
411
- function wvrx_ts_post_extras() {
412
- global $post;
413
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
414
- if ( !( current_user_can('edit_themes')
415
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
416
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
417
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
418
- ) {
419
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
420
- return; // don't show per post panel
421
- }
422
- ?>
423
- <div style="line-height:150%;">
424
- <p>
425
- <?php
426
- echo '<strong>' . __('Per Post Options','weaver-xtreme' /*adm*/) . '</strong>';
427
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaver-xtreme' /*adm*/));
428
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
429
- weaverx_html_br();
430
- _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.','weaver-xtreme' /*adm*/);
431
- weaverx_html_br();
432
-
433
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaver-xtreme' /*adm*/), 40);
434
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaver-xtreme' /*adm*/),55,1);
435
-
436
-
437
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaver-xtreme' /*adm*/),40);
438
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaver-xtreme' /*adm*/), 40, 1);
439
-
440
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaver-xtreme' /*adm*/),40);
441
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaver-xtreme' /*adm*/),40,1);
442
-
443
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaver-xtreme' /*adm*/),40);
444
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaver-xtreme' /*adm*/),40,1);
445
- wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaver-xtreme' /*adm*/),90,1);
446
-
447
- wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaver-xtreme' /*adm*/),90);
448
-
449
-
450
- echo('<br style="clear:both;"/><br /><strong>Per Post Style</strong>' /*a*/ );
451
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaver-xtreme' /*adm*/ ));
452
- echo '<br />' .
453
- __('Enter optional per post CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
454
- Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
455
- (e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme' /*adm*/); ?>
456
- <br />
457
- <textarea name="_pp_post_style" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_style", true)); ?></textarea>
458
- <br />
459
- <br />
460
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
461
-
462
- <?php
463
- wvrx_ts_page_layout('post');
464
- ?>
465
- <br />
466
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
467
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
468
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaver-xtreme' /*adm*/); ?> <br /><br />
469
- <?php
470
-
471
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaver-xtreme' /*adm*/),40);
472
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaver-xtreme' /*adm*/),40,1);
473
-
474
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaver-xtreme' /*adm*/),40);
475
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
476
-
477
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaver-xtreme' /*adm*/),40);
478
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
479
-
480
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaver-xtreme' /*adm*/),40);
481
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaver-xtreme' /*adm*/),40,1);
482
- ?>
483
- </p>
484
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
485
- <p>
486
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
487
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
488
- </p>
489
- <?php
490
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
491
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
492
-
493
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
494
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
495
-
496
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
497
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
498
- ?>
499
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
500
- <?php
501
- $opts3 = array( 'id' => '_pp_fi_location',
502
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaver-xtreme' /*adm*/),
503
- 'value' => array(
504
- array('val' => '', 'desc' => __('Default Single Page FI','weaver-xtreme' /*adm*/) ),
505
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
506
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
507
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
508
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
509
- array('val' => 'post-before', 'desc' => __('Outside of Post','weaver-xtreme' /*adm*/) ),
510
- array('val' => 'hide', 'desc' => __('Hide FI on Single Page','weaver-xtreme' /*adm*/) )
511
- )
512
- );
513
- wvrx_ts_pp_select_id($opts3);
514
- ?>
515
- <br />
516
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
517
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
518
- <?php _e("<em>Featured Image Link</em> - Full URL for link from FI",'weaver-xtreme' /*adm*/); ?>
519
- <br style="clear:both;" />
520
- </p><p>
521
- <strong><?php _e('Post Editor Options','weaver-xtreme' /*adm*/); ?></strong>
522
-
523
- <?php
524
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90, 1);
525
-
526
- if (weaverx_allow_multisite()) {
527
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90, 1);
528
- }
529
- ?>
530
- </p>
531
- <p>
532
- <?php echo('<strong>Post Format</strong>');
533
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaver-xtreme' /*adm*/));
534
- weaverx_html_br();
535
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info.','weaver-xtreme' /*adm*/);
536
- weaverx_html_br();
537
- weaverx_html_br();
538
-
539
- do_action('weaverxplus_add_per_post'); ?>
540
- </p>
541
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
542
- </div>
543
- <?php
544
- }
545
-
546
-
547
- function wvrx_ts_save_post_fields($post_id) {
548
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
549
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
550
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
551
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
552
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
553
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_style',
554
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
555
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
556
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
557
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
558
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
559
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
560
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
561
- );
562
-
563
- if (weaverx_allow_multisite()) {
564
- array_push($default_post_fields, '_pp_raw_html');
565
- }
566
-
567
- $all_post_fields = $default_post_fields;
568
-
569
- if (isset($_POST['post_meta'])) {
570
- foreach ($all_post_fields as $post_field) {
571
- if (isset($_POST[$post_field])) {
572
- $data = stripslashes($_POST[$post_field]);
573
-
574
- if (get_post_meta($post_id, $post_field) == '') {
575
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
576
- }
577
- else if ($data != get_post_meta($post_id, $post_field, true)) {
578
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
579
- } else if ($data == '') {
580
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
581
- }
582
- } else {
583
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
584
- }
585
- }
586
- }
587
- }
588
-
589
- add_action("save_post", "wvrx_ts_save_post_fields");
590
- add_action("publish_post", "wvrx_ts_save_post_fields");
591
- }
592
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/includes/wvrx-ts-runtime-lib.php DELETED
@@ -1,143 +0,0 @@
1
- <?php
2
-
3
- // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
-
6
- function wvrx_ts_help_link($ref, $label) {
7
-
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
- }
13
-
14
-
15
- // =============================== options =============================
16
-
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
-
19
-
20
- // Interface to Weaver Xtreme
21
-
22
- function wvrx_ts_fix_short($prefix, $msg ) {
23
- if ( $prefix ) {
24
- $m = str_replace('[/', '////', $msg);
25
- $m = str_replace('[', '[' . $prefix, $m);
26
- echo str_replace('////', '[/' . $prefix, $m);
27
- }
28
- else
29
- echo $msg;
30
- }
31
-
32
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
33
- function wvrx_ts_theme_support_addon() {
34
- ?>
35
- <div class="a-plus">
36
- <p><strong style="font-size:110%;"><?php _e('You have Weaver Xtreme Theme Support installed.','weaver-xtreme' /*adm*/); ?></strong><br />
37
- <?php _e('This section shows the shortcodes and widgets available with Weaver X Theme Support.
38
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaver-xtreme' /*adm*/); ?></p>
39
-
40
- <?php
41
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
42
- if ( $prefix )
43
- echo '<h3 style="color:red;">' . __("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme') . '</h3>';
44
- ?>
45
-
46
- <h3><?php _e('Shortcodes','weaver-xtreme' /*adm*/); ?></h3>
47
- <ul>
48
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaver-xtreme' /*adm*/)); ?>
49
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaver-xtreme' /*adm*/));?><br />
50
- <code><?php wvrx_ts_fix_short($prefix, __("[bloginfo name='WP bloginfo name' style='style-rules']",'weaver-xtreme' /*adm*/)); ?></code>
51
- </li>
52
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Box - [box]</span> - Display content in a Box','weaver-xtreme' /*adm*/)); ?>
53
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaver-xtreme' /*adm*/));?><br />
54
- <code><?php wvrx_ts_fix_short($prefix, __("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaver-xtreme' /*adm*/)); ?></code>
55
- </li>
56
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaver-xtreme' /*adm*/)); ?>
57
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaver-xtreme' /*adm*/));?><br />
58
- <code><?php wvrx_ts_fix_short($prefix, __("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaver-xtreme' /*adm*/)); ?></code>
59
- </li>
60
- <li<?php wvrx_ts_fix_short($prefix, __('><span class="wvr-blue">Header Image - [header_image]</span> - Display default header image','weaver-xtreme' /*adm*/)); ?>
61
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaver-xtreme' /*adm*/));?><br />
62
- <code><?php wvrx_ts_fix_short($prefix, __("[header_image h='size' w='size' style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
63
- </li>
64
-
65
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaver-xtreme' /*adm*/)); ?>
66
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaver-xtreme' /*adm*/));?><br />
67
- <code><?php wvrx_ts_fix_short($prefix, __("[html html-tag args='parameters']",'weaver-xtreme' /*adm*/)); ?></code>
68
- </li>
69
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaver-xtreme' /*adm*/)); ?>
70
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaver-xtreme' /*adm*/));?><br />
71
- <code><?php wvrx_ts_fix_short($prefix, __("[iframe src='http://example.com' height=600 percent=100 style='style']",'weaver-xtreme' /*adm*/)); ?></code>
72
- </li>
73
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Login - [login]</span> - Show simple Login/Logout link','weaver-xtreme' /*adm*/)); ?>
74
- <?php wvrx_ts_help_link('help.html#sclogin',__('Help for login','weaver-xtreme' /*adm*/));?><br />
75
- <code><?php wvrx_ts_fix_short($prefix, __("[login]",'weaver-xtreme' /*adm*/)); ?></code>
76
- </li>
77
-
78
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaver-xtreme' /*adm*/)); ?>
79
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaver-xtreme' /*adm*/));?><br />
80
- <code><?php wvrx_ts_fix_short($prefix, __('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaver-xtreme' /*adm*/)); ?></code>
81
- </li>
82
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Hide If - [hide_if]</span> - Hide content','weaver-xtreme' /*adm*/)); ?>
83
- </li>
84
-
85
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline','weaver-xtreme' /*adm*/)); ?>
86
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaver-xtreme' /*adm*/));?><br />
87
- <code><?php wvrx_ts_fix_short($prefix, __("[site_tagline style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
88
- </li>
89
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title','weaver-xtreme' /*adm*/)); ?>
90
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaver-xtreme' /*adm*/));?><br />
91
- <code><?php wvrx_ts_fix_short($prefix, __("[site_title style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
92
- </li>
93
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag','weaver-xtreme' /*adm*/)); ?>
94
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Span','weaver-xtreme' /*adm*/));?><br />
95
- <code><?php wvrx_ts_fix_short($prefix, __("[span id='class_id' class='class_name' style='style_values']text[/span]",'weaver-xtreme' /*adm*/)); ?></code>
96
- </li>
97
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Tab Group - [tab_group]</span> - Display content on separate tabs','weaver-xtreme' /*adm*/));?>
98
- <?php wvrx_ts_help_link('help.html#tab_group',__('Help for Tab Group','weaver-xtreme' /*adm*/));?><br />
99
- <code><?php wvrx_ts_fix_short($prefix, __('[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]','weaver-xtreme' /*adm*/)); ?></code>
100
- </li>
101
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options','weaver-xtreme' /*adm*/)); ?>
102
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
103
- <code><?php wvrx_ts_fix_short($prefix, __('[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]','weaver-xtreme' /*adm*/)); ?></code>
104
- </li>
105
-
106
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options','weaver-xtreme' /*adm*/)); ?>
107
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
108
- <code><?php wvrx_ts_fix_short($prefix, __('[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]','weaver-xtreme' /*adm*/)); ?></code>
109
- </li>
110
- </ul>
111
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
112
-
113
- <?php
114
- if ( $prefix )
115
- $button = __("Remove 'wvrx_' prefix from shortcode names: [ bloginfo ], etc.", 'weaver-xtreme');
116
- else
117
- $button = __("Add 'wvrx_' to shortcode names: [ wvrx_bloginfo ], etc.", 'weaver-xtreme');
118
- ?>
119
- <div style="clear:both;"></div>
120
- <span class='submit'><input name="toggle_shortcode_prefix" type="submit" value="<?php echo $button; ?>" /></span>
121
- <br /><small> <?php _e("To avoid conflicts with other plugins, you can add a 'wvrx_' prefix to these shortcodes.", 'weaver-xtreme /*adm*/'); ?> </small>
122
- <?php weaverx_nonce_field('toggle_shortcode_prefix'); ?>
123
- </form>
124
- <br />
125
-
126
- <h3><?php _e('Widgets','weaver-xtreme' /*adm*/); ?></h3>
127
- <ul>
128
- <li><?php _e('<span class="wvr-blue">Weaver X Login Widget</span> - Simplified login widget','weaver-xtreme' /*adm*/); ?>
129
- <?php wvrx_ts_help_link('help.html#widg-login',__('Help for Login Widget','weaver-xtreme' /*adm*/));?>
130
- </li>
131
-
132
- <li><?php _e('<span class="wvr-blue">Weaver X Per Page Text</span> - Display text on a per page basis, based on a Custom Field value','weaver-xtreme' /*adm*/); ?>
133
- <?php wvrx_ts_help_link('help.html##widg_pp_text',__('Help for Per Page Text Widget','weaver-xtreme' /*adm*/));?>
134
- </li>
135
-
136
- <li><?php _e('<span class="wvr-blue">Weaver X Text 2</span> - Display text in two columns - great for wide top/bottom widgets','weaver-xtreme' /*adm*/); ?>
137
- <?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
138
- </li>
139
- </ul>
140
- </div>
141
- <?php
142
- }
143
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/includes/wvrx-ts-shortcodes.php DELETED
@@ -1,661 +0,0 @@
1
- <?php
2
- /*
3
- Weaver X shortcodes
4
- */
5
-
6
- function wvrx_ts_setup_shortcodes() {
7
- // we setup all of our shortcodes only after the theme has been loaded...
8
-
9
- $codes = array( // list of shortcodes
10
- array('bloginfo' => 'wvrx_ts_sc_bloginfo'), // [bloginfo]
11
- array('box' => 'wvrx_ts_sc_box'), // [box]
12
- array('div' => 'wvrx_ts_sc_div'), // [div]
13
- array('header_image' => 'wvrx_ts_sc_header_image'), // [header_image]
14
- array('hide_if' => 'wvrx_ts_sc_hide_if' ), // [hide_if]
15
- array('html' => 'wvrx_ts_sc_html'), // [html]
16
- array('iframe' => 'wvrx_ts_sc_iframe'), // [iframe]
17
- array('login' => 'wvrx_ts_sc_login'), // [login]
18
- array('show_if' => 'wvrx_ts_sc_show_if' ), // [show_if]
19
- array('span' => 'wvrx_ts_sc_span'), // [span]
20
- array('site_tagline' => 'wvrx_ts_sc_site_tagline'), // [site_tagline]
21
- array('site_title' => 'wvrx_ts_sc_site_title'), // [site_title]
22
- array('tab_group' => 'wvrx_ts_sc_tab_group',
23
- 'tab' => 'wvrx_ts_sc_tab'), // [tab_group], [tab]
24
- array('vimeo' => 'wvrx_ts_sc_vimeo'), // [vimeo]
25
- array('youtube' => 'wvrx_ts_sc_youtube'), // [youtube]
26
- array('weaverx_info' => 'wvrx_ts_weaverx_sc_info'), // [weaverx_info]
27
- );
28
-
29
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
30
-
31
- foreach ($codes as $code) {
32
- wvrx_ts_set_shortcodes($code, $prefix);
33
- }
34
- }
35
-
36
- add_action('init', 'wvrx_ts_setup_shortcodes'); // allow shortcodes to load after theme has loaded so we know which version to use
37
-
38
- // =============== [box] ===================
39
- function wvrx_ts_sc_box( $args = '', $text ) {
40
- extract(shortcode_atts(array(
41
- 'align' => '',
42
- 'border' => true,
43
- 'border_rule' => '1px solid black',
44
- 'border_radius' => '',
45
- 'color' => '',
46
- 'background' => '',
47
- 'margin' => '',
48
- 'padding' => '1',
49
- 'shadow' => '',
50
- 'style' => '',
51
- 'width' => ''
52
- ), $args));
53
-
54
- $sty = 'style="';
55
-
56
- if ( $align ) {
57
- $align = strtolower($align);
58
- switch ( $align ) {
59
- case 'center':
60
- $sty .= 'display:block;margin-left:auto;margin-right:auto;';
61
- break;
62
- case 'right':
63
- $sty .= 'float:right;';
64
- break;
65
- default:
66
- $sty .= 'float:left;';
67
- break;
68
- }
69
- }
70
-
71
- if ( $border )
72
- $sty .= "border:{$border_rule};";
73
- if ( $border_radius )
74
- $sty .= "border-radius:{$border_radius}px;";
75
- if ( $shadow ) {
76
- if ( $shadow < 1 ) $shadow = 1;
77
- if ( $shadow > 5 ) $shadow = 5;
78
- $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
79
- }
80
- if ( $color )
81
- $sty .= "color:{$color};";
82
- if ( $background )
83
- $sty .= "background-color:{$background};";
84
- if ( $margin )
85
- $sty .= "margin:{$margin}em;";
86
- if ( $padding )
87
- $sty .= "padding:{$padding}em;";
88
- if ( $width )
89
- $sty .= "width:{$width}%;";
90
- if ( $sty )
91
- $sty .= $style;
92
- $sty .= '"'; // finish it
93
-
94
- return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
95
- }
96
-
97
- // =============== [hide_if] ===================
98
- function wvrx_ts_sc_hide_if($args = '', $text ) {
99
-
100
- return wvrx_ts_show_hide_if( $args, $text, false );
101
- }
102
-
103
- // =============== [show_if] ===================
104
- function wvrx_ts_sc_show_if($args = '', $text ) {
105
- return wvrx_ts_show_hide_if( $args, $text, true );
106
- }
107
-
108
- // =============== [show_hide_if] ===================
109
- function wvrx_ts_show_hide_if($args = '', $text, $show) {
110
- extract(shortcode_atts(array(
111
- 'device' => 'default', // desktop, mobile, smalltablet, phone, all
112
- 'logged_in' => 'default', // true or false
113
- 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
114
- 'post_id' => 'default', // comma separated list
115
- 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
116
- ), $args));
117
-
118
- $valid_device = array('default','desktop','mobile','smalltablet','phone','all');
119
-
120
- if ( !in_array( $device, $valid_device )) {
121
- return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
122
-
123
- }
124
- if ( $logged_in == 'default' ) { // **** logged_in
125
- $logged_in = true;
126
- } else {
127
- $is_true = is_user_logged_in();
128
- $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : !$is_true;
129
- }
130
-
131
- if ( $not_post_id == 'default') { // **** pages
132
- $not_post_id = true;
133
- } else {
134
- $list = explode(',', str_replace(' ', '', $not_post_id));
135
- $not_post_id = !in_array( get_the_ID(), $list );
136
- }
137
-
138
- if ( $post_id == 'default') { // **** pages
139
- $post_id = true;
140
- } else {
141
- $list = explode(',', str_replace(' ', '', $post_id));
142
- $post_id = in_array( get_the_ID(), $list );
143
- }
144
-
145
- if ( $user_can == 'default') { // **** user_can
146
- $user_can = true;
147
- } else {
148
- $user_can = current_user_can( strtolower( $user_can) );
149
- }
150
-
151
- $x = true;
152
- if ( $x == 'default') {
153
- $x = true;
154
- } else {
155
- $x = $show;
156
- }
157
-
158
- $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
159
-
160
- if ( !$all_true ) { // device irrelevant
161
- // $text .= '* ALL TRUE FAILED *';
162
- if ( !$show )
163
- return do_shortcode( $text ); // hide fails, so show it
164
- else
165
- return ''; // show fails, so hide it
166
-
167
- } elseif ( $device == 'default') { // so all other conditions passed, see if specified device
168
- // $text .= '* ALL TRUE, DEVICE DEFAULT *';
169
- if ( $show )
170
- return do_shortcode( $text );
171
- else
172
- return '';
173
- } else {
174
- // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
175
- if ( $show ) {
176
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('show-' . $device); // for [extra_menu]
177
- } else {
178
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('hide-' . $device);
179
- }
180
- $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode($text) . '</div>';
181
- unset( $GLOBALS['wvrx_sc_show_hide'] );
182
- return $ret;
183
- }
184
- return '';
185
- }
186
-
187
-
188
- // =============== [header_image style='customstyle'] ===================
189
- function wvrx_ts_sc_header_image($args = ''){
190
- extract(shortcode_atts(array(
191
- 'style' => '', // STYLE
192
- 'h' => '',
193
- 'w' => ''
194
- ), $args));
195
-
196
- $width = $w ? ' width="' . $w . '"' : '';
197
- $height = $h ? ' height="' . $h . '"' : '';
198
- $st = $style ? ' style="' . $style . '"' : '';
199
-
200
- $hdrimg = '<img src="' . get_header_image() . '"' . $st . $width . $height
201
- . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
202
-
203
- return $hdrimg;
204
- }
205
-
206
- // =============== [bloginfo arg='name'] ======================
207
- function wvrx_ts_sc_bloginfo($args = '') {
208
- extract(shortcode_atts(array(
209
- 'arg' => 'name', // a WP bloginfo name
210
- 'style' => '' // wrap with style
211
- ), $args));
212
-
213
- $code = '';
214
- if ($style != '') $code = '<span style="' . $style . '">';
215
- $code .= esc_attr( get_bloginfo( $arg ));
216
- if ($style != '') $code .= '</span>';
217
- return $code;
218
- }
219
-
220
- // =============== [site_title style='customstyle'] ======================
221
- function wvrx_ts_sc_site_title($args = '') {
222
- extract(shortcode_atts(array(
223
- 'style' => '', /* styling for the header */
224
- 'matchtheme' => false
225
- ), $args));
226
-
227
- $title = esc_html( get_bloginfo( 'name', 'display' ));
228
-
229
- $before = '';
230
- $after = '';
231
-
232
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
233
- $before = '<h1' . weaverx_title_class( 'site_title', false, 'site-title' ) . '><a href="' . esc_url( home_url( '/' ) ) . '" title="' . $title . '" rel="home">';
234
- $after = '</a></h1>';
235
- }
236
-
237
- if ($style) {
238
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
239
- }
240
- return $before . $title . $after;
241
-
242
- }
243
-
244
- // =============== [site_tagline style='customstyle'] ======================
245
- function wvrx_ts_sc_site_tagline($args = '') {
246
- extract(shortcode_atts(array(
247
- 'style' => '', /* styling for the header */
248
- 'matchtheme' => false
249
- ), $args));
250
-
251
- $title = get_bloginfo( 'description' );
252
-
253
- $before = '';
254
- $after = '';
255
-
256
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
257
- $before = '<h2' . weaverx_title_class( 'tagline', false, 'site-tagline' ) . '>';
258
- $after = '</h2>';
259
- }
260
-
261
- if ($style) {
262
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
263
- }
264
- return $before . $title . $after;
265
- }
266
-
267
- // =============== [iframe src='address' height=nnn] ======================
268
- function wvrx_ts_sc_iframe($args = '') {
269
- extract(shortcode_atts(array(
270
- 'src' => '',
271
- 'height' => '600', /* styling for the header */
272
- 'percent' => 100,
273
- 'style' => 'border:1px;'
274
- ), $args));
275
-
276
- $sty = $style ? ' style="' . $style . '"' : '';
277
-
278
- if (!$src) return __('<h4>No src address provided to [iframe].</h4>','weaver-xtreme' /*adm*/);
279
- return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
280
- }
281
-
282
- // =============== [iframe src='address' height=nnn] ======================
283
- function wvrx_ts_sc_login($args = '') {
284
- extract(shortcode_atts(array(
285
- ), $args));
286
-
287
- return wp_loginout( '', false );
288
- }
289
-
290
- // =============== [tab_group ] ======================
291
- function wvrx_ts_sc_tab_group( $args, $content ) {
292
- extract( shortcode_atts( array(
293
- 'border_color' => '', // tab and pane bodder color - default #888
294
- 'tab_bg' => '', // normal bg color of tab (default #CCC)
295
- 'tab_selected_color' => '', // color of tab when selected (default #EEE)
296
- 'pane_min_height' => '', // min height of a pane to help make all even if needed
297
- 'pane_bg' => '' // bg color of pane
298
- ), $args ) );
299
-
300
- if (isset($GLOBALS['wvrx_ts_in_tab_container']) && $GLOBALS['wvrx_ts_in_tab_container']) {
301
- return __('<strong>Sorry, you cannot nest tab_containers.</strong>','weaver-xtreme' /*adm*/);
302
- }
303
-
304
- // enqueue the theme support jslib only now when it will actually be needed!
305
-
306
- wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
307
-
308
- if ( !isset( $GLOBALS['wvrx_ts_tab_id'] ) )
309
- $GLOBALS['wvrx_ts_tab_id'] = 1;
310
- else
311
- ++$GLOBALS['wvrx_ts_tab_id'];
312
-
313
- $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
314
-
315
- $css = ''; // default styles
316
- $add_style = '';
317
- if ($border_color != '')
318
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
319
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
320
-
321
- if ($pane_min_height != '')
322
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
323
-
324
- if ($pane_bg != '')
325
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
326
-
327
- if ($tab_bg != '')
328
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
329
-
330
- if ($tab_selected_color != '')
331
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
332
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
333
-
334
- if ($css != '') { // specified some style...
335
- $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
336
- }
337
-
338
- $GLOBALS['wvrx_ts_in_tab_container'] = true;
339
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
340
-
341
- do_shortcode( $content ); // process the tabs on this
342
-
343
- $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
344
-
345
- if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
346
- foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
347
- $tabs[] = '<span>' . $tab['title'] . '</span>'. "\n";
348
- $panes[] = "\n" .'<div class="wvr-tabs-pane">' . $tab['content'] . '</div>';
349
- }
350
- $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
351
- . '<div class="wvr-tabs-nav">' . "\n"
352
- . implode( '', $tabs ) . '</div>' . "\n"
353
- . '<div class="wvr-tabs-panes">'
354
- . implode( '', $panes ) . "\n"
355
- . '</div><div class="wvr-tabs-clear"></div>' . "\n"
356
- . '</div> <!-- end tab_group -->' . "\n";
357
- }
358
-
359
- // Forget globals we generated
360
- unset( $GLOBALS['wvrx_ts_in_tab_container'],$GLOBALS['wvrx_ts_tabs'],$GLOBALS['wvrx_ts_num_tabs']);
361
-
362
- return $add_style . $out;
363
- }
364
-
365
- function wvrx_ts_sc_tab( $args, $content ) {
366
- extract( shortcode_atts( array(
367
- 'title' => 'Tab %d'
368
- ), $args ) );
369
-
370
- if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
371
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
372
- }
373
- $cur = $GLOBALS['wvrx_ts_num_tabs'];
374
- $GLOBALS['wvrx_ts_tabs'][$cur] = array(
375
- 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
376
- 'content' => do_shortcode( $content ) );
377
- $GLOBALS['wvrx_ts_num_tabs']++;
378
- }
379
-
380
-
381
- // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
382
- function wvrx_ts_sc_youtube($args = '') {
383
- $share = '';
384
- if ( isset ( $args[0] ) )
385
- $share = trim($args[0]);
386
-
387
- // http://code.google.com/apis/youtube/player_parameters.html
388
- // not including: enablejsapi, fs,playerapiid,
389
-
390
- extract(shortcode_atts(array(
391
- 'id' => '',
392
- 'sd' => false,
393
- 'related' => '0',
394
- 'privacy' => false,
395
- 'ratio' => false,
396
- 'center' => '1',
397
- 'autohide' => '~!',
398
- 'autoplay' => '0',
399
- 'border' => '0',
400
- 'color' => false,
401
- 'color1' => false,
402
- 'color2' => false,
403
- 'controls' => '1',
404
- 'disablekb' => '0',
405
- 'egm' => '0',
406
- 'fs' => '1',
407
- 'fullscreen' => 1,
408
- 'hd' => '0',
409
- 'iv_load_policy' => '1',
410
- 'loop' => '0',
411
- 'modestbranding' => '0',
412
- 'origin' => false,
413
- 'percent' => 100,
414
- 'playlist' => false,
415
- 'rel' => '0',
416
- 'showinfo' => '1',
417
- 'showsearch' => '1',
418
- 'start' => false,
419
- 'theme' => 'dark',
420
- 'wmode' => 'transparent'
421
-
422
- ), $args));
423
-
424
- if (!$share && !$id)
425
- return __('<strong>No share or id values provided for youtube shortcode.</strong>','weaver-xtreme' /*adm*/);
426
-
427
- if ($share) { // let the share override any id
428
- $share = str_replace('youtu.be/','',$share);
429
- if (strpos($share,'youtube.com/watch') !== false) {
430
- $share = str_replace('www.youtube.com/watch?v=', '', $share);
431
- $share = str_replace('&amp;','+',$share);
432
- $share = str_replace('&','+',$share);
433
- }
434
- $share = str_replace('http://','',$share);
435
- $share = str_replace('https://','',$share);
436
- if ($share)
437
- $id = $share;
438
- }
439
-
440
- $opts = $id . '%%';
441
-
442
- $opts = wvrx_ts_add_url_opt($opts, $hd != '0', 'hd=1');
443
- $opts = wvrx_ts_add_url_opt($opts, $autohide != '~!', 'autohide='.$autohide);
444
- $opts = wvrx_ts_add_url_opt($opts, $autoplay != '0', 'autoplay=1');
445
- $opts = wvrx_ts_add_url_opt($opts, $border != '0', 'border=1');
446
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color='.$color);
447
- $opts = wvrx_ts_add_url_opt($opts, $color1, 'color1='.$color1);
448
- $opts = wvrx_ts_add_url_opt($opts, $color2, 'color2='.$color2);
449
- $opts = wvrx_ts_add_url_opt($opts, $controls != '1', 'controls=0');
450
- $opts = wvrx_ts_add_url_opt($opts, $disablekb != '0', 'disablekb=1');
451
- $opts = wvrx_ts_add_url_opt($opts, $egm != '0', 'egm=1');
452
- $opts = wvrx_ts_add_url_opt($opts, true, 'fs='.$fs);
453
- $opts = wvrx_ts_add_url_opt($opts, true, 'iv_load_policy='.$iv_load_policy);
454
- $opts = wvrx_ts_add_url_opt($opts, $loop != '0', 'loop=1');
455
- $opts = wvrx_ts_add_url_opt($opts, $modestbranding != '0', 'modestbranding=1');
456
- $opts = wvrx_ts_add_url_opt($opts, $origin, 'origin='.$origin);
457
- $opts = wvrx_ts_add_url_opt($opts, $playlist, 'playlist='.$playlist);
458
- $opts = wvrx_ts_add_url_opt($opts, true, 'rel='.$rel);
459
- $opts = wvrx_ts_add_url_opt($opts, true, 'showinfo=' . $showinfo);
460
- $opts = wvrx_ts_add_url_opt($opts, $showsearch != '1', 'showsearch=0');
461
- $opts = wvrx_ts_add_url_opt($opts, $start, 'start='.$start);
462
- $opts = wvrx_ts_add_url_opt($opts, $theme != 'dark', 'theme=light');
463
- $opts = wvrx_ts_add_url_opt($opts, $wmode, 'wmode='.$wmode);
464
-
465
- $url = '//';
466
-
467
- if ($privacy) $url .= 'www.youtube-nocookie.com';
468
- else $url .= 'www.youtube.com';
469
-
470
- $opts = str_replace('%%+','%%?', $opts);
471
- $opts = str_replace('%%','', $opts);
472
- $opts = str_replace('+','&amp;', $opts);
473
-
474
- $url .= '/embed/' . $opts;
475
-
476
-
477
- $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
478
-
479
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
480
- "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
481
- $cntr2 = '</div>';
482
- $h = 9; $w = 16;
483
- if ( $sd ) {
484
- $h = 3; $w = 4;
485
- }
486
-
487
- $ret ="\n" . $cntr1 . '<iframe src="' . $url
488
- . '" frameborder="0" width="'.$w.'" height="' . $h . '" frameborder="0" ' . $allowfull . '"></iframe>'
489
- . $cntr2 . "\n";
490
-
491
- return $ret;
492
- }
493
-
494
- // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
495
- function wvrx_ts_sc_vimeo($args = '') {
496
- $share = '';
497
- if ( isset ( $args[0] ) )
498
- $share = trim($args[0]);
499
-
500
- extract(shortcode_atts(array(
501
- 'id' => '',
502
- 'sd' => false,
503
- 'color' => '',
504
- 'autoplay' => false,
505
- 'loop' => false,
506
- 'portrait' => true,
507
- 'title' => true,
508
- 'byline' => true,
509
- 'percent' => 100,
510
- 'center' => '1'
511
- ), $args));
512
-
513
- if (!$share && !$id) return __('<strong>No share or id values provided for vimeo shortcode.</strong>','weaver-xtreme' /*adm*/);
514
-
515
- if ($share) { // let the share override any id
516
- $share = str_replace('http://vimeo.com/','',$share);
517
- if ($share) $id = $share;
518
- }
519
-
520
- $opts = $id . '##';
521
-
522
- $opts = wvrx_ts_add_url_opt($opts, $autoplay, 'autoplay=1');
523
- $opts = wvrx_ts_add_url_opt($opts, $loop, 'loop=1');
524
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color=' . $color);
525
- $opts = wvrx_ts_add_url_opt($opts, !$portrait, 'portrait=0');
526
- $opts = wvrx_ts_add_url_opt($opts, !$title, 'title=0');
527
- $opts = wvrx_ts_add_url_opt($opts, !$byline, 'byline=0');
528
-
529
- $url = '//player.vimeo.com/video/';
530
-
531
- $opts = str_replace('##+','##?', $opts);
532
- $opts = str_replace('##','', $opts);
533
- $opts = str_replace('+','&amp;', $opts);
534
-
535
- $url .= $opts;
536
-
537
- if (function_exists('weaverii_use_mobile'))
538
- if (weaverii_use_mobile('mobile')) $percent = 100;
539
-
540
-
541
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
542
- "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
543
- $cntr2 = '</div>';
544
- $h = 9; $w = 16;
545
- if ( $sd ) {
546
- $h = 3; $w = 4;
547
- }
548
-
549
- $ret = "\n" . $cntr1 . '<iframe src="' . $url
550
- . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
551
- . $cntr2 . "\n";
552
-
553
- return $ret;
554
- }
555
-
556
- // ===== video utils =====
557
-
558
- function wvrx_ts_add_url_opt($opts, $add, $add_val) {
559
- if ($add) {
560
- $opts = $opts . '+' . $add_val;
561
- }
562
- return $opts;
563
- }
564
-
565
-
566
-
567
- function wvrx_ts_sc_html($vals = '') { // [html style='customstyle'] - all ======================
568
- $tag = 'span';
569
- if ( isset ( $vals[0] ) )
570
- $tag = trim( $vals[0]);
571
-
572
- extract(shortcode_atts(array(
573
- 'args' => ''
574
- ), $vals));
575
- if ($args) $args = ' ' . $args;
576
- return '<' . $tag . $args . '>';
577
- }
578
-
579
- function wvrx_ts_sc_div($vals = '',$text) { // [div] - all ===================
580
- extract(shortcode_atts(array(
581
- 'id' => '',
582
- 'class' => '',
583
- 'style' => ''
584
- ), $vals));
585
-
586
- $args = '';
587
- if ($id) $args .= ' id="' . $id . '"';
588
- if ($class) $args .= ' class="' . $class . '"';
589
- if ($style) $args .= ' style="' . $style . '"';
590
-
591
- return '<div' . $args . '>' . do_shortcode($text) . '</div>';
592
- }
593
-
594
- function wvrx_ts_sc_span($vals = '',$text) { // [span] - all ==================
595
- extract(shortcode_atts(array(
596
- 'id' => '',
597
- 'class' => '',
598
- 'style' => ''
599
- ), $vals));
600
-
601
- $args = '';
602
- if ($id) $args .= ' id="' . $id . '"';
603
- if ($class) $args .= ' class="' . $class . '"';
604
- if ($style) $args .= ' style="' . $style . '"';
605
-
606
- return '<span' . $args . '>' . do_shortcode($text) . '</span>';
607
- }
608
-
609
- function wvrx_ts_weaverx_sc_info() { // [info] ======================
610
- global $current_user;
611
- $out = __('<strong>Theme/User Info</strong><hr />','weaver-xtreme' /*adm*/);
612
-
613
- get_currentuserinfo();
614
- if (isset($current_user->display_name)) {
615
- $out .= __('<em>User:</em> ','weaver-xtreme' /*adm*/) . $current_user->display_name . '<br />';
616
- }
617
- $out .= '&nbsp;&nbsp;' . wp_register('','<br />',false);
618
- $out .= '&nbsp;&nbsp;' . wp_loginout('',false) . '<br />';
619
-
620
- $agent = __('Not Available','weaver-xtreme' /*adm*/);
621
- if (isset($_SERVER["HTTP_USER_AGENT"]) )
622
- $agent = $_SERVER['HTTP_USER_AGENT'];
623
- $out .= __('<em>User Agent</em>:','weaver-xtreme' /*adm*/) . ' <small>' . $agent . '</small>';
624
- $out .= '<div id="example"></div>
625
- <script type="text/javascript">
626
- var txt = "";
627
- var myWidth;
628
- if( typeof( window.innerWidth ) == "number" ) {
629
- //Non-IE
630
- myWidth = window.innerWidth;
631
- } else if( document.documentElement &&
632
- ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
633
- //IE 6+ in "standards compliant mode"
634
- myWidth = document.documentElement.clientWidth;
635
- } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
636
- //IE 4 compatible
637
- myWidth = document.body.clientWidth;
638
- }
639
- txt+= "<em>Browser Width: </em>" + myWidth + " px</br>";
640
- document.getElementById("example").innerHTML=txt;
641
- </script>';
642
-
643
- $out .= __('<em>Feed title:</em> ','weaver-xtreme' /*adm*/) . get_bloginfo_rss('name') . '<br />' . get_wp_title_rss();
644
-
645
- $out .= __('<br /><em>You are using</em> WordPress ','weaver-xtreme' /*adm*/) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
646
- $out .= __('<br /><em>Memory:</em> ','weaver-xtreme' /*adm*/) . round(memory_get_usage()/1024/1024,2) . 'M of ' . (int)ini_get('memory_limit') . 'M <hr />';
647
- return $out;
648
- }
649
-
650
-
651
- function wvrx_ts_set_shortcodes($sc_list, $prefix) {
652
- foreach ($sc_list as $sc_name => $sc_func) {
653
- remove_shortcode($prefix . $sc_name);
654
- add_shortcode($prefix . $sc_name,$sc_func);
655
- }
656
- }
657
-
658
- // =============== Utilities ======================
659
-
660
-
661
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/includes/wvrx-ts-widgets.php DELETED
@@ -1,169 +0,0 @@
1
- <?php
2
- /*
3
- * Weaver X Widgets and shortcodes - widgets
4
- */
5
-
6
- class WeaverX_Widget_Text extends WP_Widget {
7
-
8
- function WeaverX_Widget_Text() {
9
- $widget_ops = array('classname' => 'WeaverX_Widget_Text',
10
- 'description' => __('Text Widget with Two Columns - with HTML and shortcode support. Also adds shortcodes to standard Text widget.','weaver-xtreme' /*adm*/));
11
- $control_ops = array('width' => 400, 'height' => 350);
12
- $this->WP_Widget('wvrx2_text', __('Weaver X Text 2','weaver-xtreme' /*adm*/), $widget_ops, $control_ops);
13
- }
14
-
15
- function widget( $args, $instance ) {
16
- extract($args);
17
- $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
18
- $text = apply_filters( 'weaverx_text', $instance['text'], $instance );
19
- $text2 = apply_filters( 'weaverx_text', $instance['text2'], $instance );
20
- echo $before_widget;
21
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
22
- <div class="textwidget"><div style="float: left; width: 48%; padding-right: 2%;">
23
- <?php
24
- if ($instance['filter']) {
25
- echo(wpautop($text)); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
26
- echo(wpautop($text2)); echo('</div><div style="clear: both;"></div>');
27
- } else {
28
- echo($text); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
29
- echo($text2); echo('</div><div style="clear: both;"></div>');
30
- }
31
- ?>
32
- </div>
33
- <?php
34
- echo $after_widget;
35
- }
36
-
37
- function update( $new_instance, $old_instance ) {
38
- $instance = $old_instance;
39
- $instance['title'] = strip_tags($new_instance['title']);
40
- if ( current_user_can('unfiltered_html') ) {
41
- $instance['text'] = $new_instance['text'];
42
- $instance['text2'] = $new_instance['text2'];
43
- }
44
- else {
45
- $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
46
- $instance['text2'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text2']) ) );
47
- }
48
- $instance['filter'] = isset($new_instance['filter']);
49
- return $instance;
50
- }
51
-
52
- function form( $instance ) {
53
- $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'text2' => '', 'filter' => 0) );
54
- $title = strip_tags($instance['title']);
55
- $text = format_to_edit($instance['text']);
56
- $text2 = format_to_edit($instance['text2']);
57
- ?>
58
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title:' /*a*/ ); ?></label>
59
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
60
-
61
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
62
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text2'); ?>" name="<?php echo $this->get_field_name('text2'); ?>"><?php echo $text2; ?></textarea>
63
- <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> />
64
- &nbsp;<label for="<?php echo $this->get_field_id('filter'); ?>"><?php echo 'Automatically add paragraphs'; ?></label></p>
65
- <?php
66
- }
67
- }
68
-
69
- /**
70
- * Weaver X Per Page Text
71
- */
72
- class WeaverX_Widget_PPText extends WP_Widget {
73
-
74
- function WeaverX_Widget_PPText() {
75
- $widget_ops = array('classname' => 'wvrx_widget_pptext', 'description' =>
76
- __('Display text on a Per Page basis. Add to Widget area to see instructions.','weaver-xtreme' /*adm*/) );
77
- $this->WP_Widget('wvrx_pptext', __('Weaver X Per Page Text','weaver-xtreme' /*adm*/), $widget_ops);
78
- }
79
-
80
- function widget( $args, $instance ) {
81
- extract($args);
82
- $title = get_post_meta(get_the_ID(),'wvrx_ts_pp_title',true);
83
- $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
84
-
85
- if (empty($title) && empty($text))
86
- return;
87
-
88
- echo $before_widget;
89
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
90
- echo do_shortcode($text);
91
- echo $after_widget;
92
- }
93
-
94
- function update( $new_instance, $old_instance ) {
95
- $instance = $old_instance;
96
- $instance['title'] = strip_tags($new_instance['title']);
97
-
98
- return $instance;
99
- }
100
-
101
- function form( $instance ) {
102
- ?>
103
- <p><?php _e('This widget will work like a text widget, but the title and content are defined by custom
104
- fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>
105
- if you want a title, and define Custom Field <em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text,
106
- HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom
107
- fields are defined when that page is displayed. (This widget won\'t display on the default blog or other archive-like pages.)','weaver-xtreme' /*adm*/); ?><p>
108
- <?php
109
- }
110
- }
111
-
112
- /**
113
- * Weaver X login
114
- */
115
- class WeaverX_Widget_Login extends WP_Widget {
116
-
117
- function WeaverX_Widget_Login() {
118
- $widget_ops = array('classname' => 'wvrx_widget_login', 'description' => __( "Log in/out, admin", 'weaver-xtreme' /*adm*/ ) );
119
- $this->WP_Widget('wvrx_login', __('Weaver X Login','weaver-xtreme' /*adm*/), $widget_ops);
120
- }
121
-
122
- function widget( $args, $instance ) {
123
- extract($args);
124
- $title = apply_filters('widget_title', empty($instance['title']) ? __('Login', 'weaver-xtreme' /*adm*/ ) : $instance['title'], $instance, $this->id_base);
125
-
126
- echo $before_widget;
127
- if ( $title )
128
- echo $before_title . $title . $after_title;
129
- global $current_user;
130
- get_currentuserinfo();
131
- if (isset($current_user->display_name))
132
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaver-xtreme' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
133
- ?>
134
- <ul>
135
- <?php wp_register(); ?>
136
- <li><?php wp_loginout(); ?></li>
137
- </ul>
138
- <?php
139
- echo $after_widget;
140
- }
141
-
142
- function update( $new_instance, $old_instance ) {
143
- $instance = $old_instance;
144
- $instance['title'] = strip_tags($new_instance['title']);
145
-
146
- return $instance;
147
- }
148
-
149
- function form( $instance ) {
150
- $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
151
- $title = strip_tags($instance['title']);
152
- ?>
153
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','weaver-xtreme' /*adm*/); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
154
- <?php
155
- }
156
- }
157
-
158
-
159
- add_action("widgets_init", "wvrx_ts_load_widgets");
160
- add_filter('weaverx_text', 'do_shortcode');
161
- add_filter('widget_text', 'do_shortcode'); // add to standard text widget, too.
162
-
163
- function wvrx_ts_load_widgets() {
164
- register_widget("WeaverX_Widget_Text");
165
- register_widget("WeaverX_Widget_PPText");
166
- register_widget("WeaverX_Widget_Login");
167
- }
168
-
169
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/js/wvrx-ts-jslib.js DELETED
@@ -1,27 +0,0 @@
1
- /* *********************************************************************************
2
- * Weaver X Theme Support JavaScript support Library
3
- *
4
- * Author: WeaverTheme - www.weavertheme.com
5
- * @version 1.0
6
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
7
- * @author Bruce Wampler
8
- *
9
- * Notes - this library requires jQuery to be loaded
10
- * this library was cobbled together over a long period of time, so it contains a
11
- * bit of a jumble of straight JavaScript and jQuery calls. So it goes. It works.
12
- *
13
- *
14
- ************************************************************************************* */
15
-
16
-
17
- jQuery(document).ready(function($) { // self-defining function
18
- // Tabs
19
- $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
20
- $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
21
- .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
22
- });
23
- $('.wvr-tabs-pane').hide();
24
- $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
25
- $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
26
-
27
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/js/wvrx-ts-jslib.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(a){a(".wvr-tabs-nav").delegate("span:not(.wvr-tabs-current)","click",function(){a(this).addClass("wvr-tabs-current").siblings().removeClass("wvr-tabs-current").parents(".wvr-tabs").find(".wvr-tabs-pane").hide().eq(a(this).index()).show()});a(".wvr-tabs-pane").hide();a(".wvr-tabs-nav span:first-child").addClass("wvr-tabs-current");a(".wvr-tabs-panes .wvr-tabs-pane:first-child").show()});
 
3.2.1/1.0/readme.txt DELETED
@@ -1,122 +0,0 @@
1
- === Weaver X Theme Support ===
2
- Plugin Name: Weaver X Theme Support
3
- Plugin URI: http://aspentheme.com/plugins/
4
- Tags: weaver x theme, shortcodes, widgets
5
- Author URI: http://weavertheme.com/about/
6
- Contributors: wpweaver
7
- Author: wpweaver
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Requires at least: 3.9
11
- Tested up to: 4.1
12
- Stable tag: 1.0
13
-
14
- A useful shortcode and widget collection for Weaver Xtreme
15
-
16
- == Description ==
17
-
18
- This is the main theme suppot for the Weaver X Theme. This plugin provides a collection of useful shortcodes and widgets designed to complement the Weaver X theme. These shortcodes have been selected and developed based on requests and feedback from thousands of users of the Weaver X, Weaver II, and Aspen themes.
19
-
20
- While these shortcodes are optimized for the Weaver X theme, they will also work with full functionality for most WordPress themes, and can be used
21
- if you switch themes.
22
-
23
- Includes complete documentation help file. Instructions for using the shortcodes and widgets are in the help file. Use it for non-Weaver Xtreme themes.
24
-
25
- = Shortcodes included =
26
-
27
- * **[tab_group]** - Display content in a tabbed box.
28
- * **[youtube]** - Show your YouTube videos responsively, and with the capability to use any of the YouTube custom display options.
29
- * **[vimeo]** - Show your Vimeo videos responsively, and with the capability to use any of the Vimeo custom display options.
30
- * **[iframe]** - Quick and easy display of content in an iframe.
31
- * **[div]**, **[span]**, **[html]** - Add div, span, and other html to pages/posts without the need to switch to Text view.
32
- * **[hide/show_if]** - Show or hide content depending upon options: device, page ID, user capability, logged in status.
33
- * **[bloginfo]** - Display any information available from WordPress bloginfo function.
34
- * **[user_can]** - Display content base on logged in user role.
35
- * **[site_title]** - Display Site title.
36
- * **[site_tagline]** - Display Site tag line.
37
-
38
- = Widgets Included =
39
-
40
- * **Weaver X 2 Column Text Widget** - Add text into two columns in a widget
41
- * **Weaver X Per Page Text Widget** - Add a text widget on a per page basis
42
- * **Weaver X Login** - Simplified login widget
43
-
44
- = Licenses =
45
-
46
- * The Weaver X Theme Support plugin is licensed under the terms of the GNU GENERAL PUBLIC LICENSE, Version 2,
47
- June 1991. (GPL) The full text of the license is in the license.txt file.
48
- * All images included with this plugin are either original works of the author which
49
- have been placed into the public domain, or have been derived from other public domain sources,
50
- and thus need no license. (This does not include the images provided with any of the
51
- below listed scripts and libraries. Those images are covered by their respective licenses.)
52
-
53
- This plugin also includes several scripts and libraries that are covered under the terms
54
- of their own licenses in the listed files in the plugin distribution:
55
-
56
-
57
-
58
- == Installation ==
59
-
60
- It is easiest to use the Plugins : Add Plugin admin page, but you can do it manually, too:
61
-
62
- 1. Download the plugin archive and expand it
63
- 2. Upload all the plugin files and directories to your wp-content/plugins/weaverx-theme-support directory
64
- 3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for this plugin.
65
-
66
- == Frequently Asked Questions ==
67
-
68
- = Where can I get support for this plugin? =
69
-
70
- Support for this plugin can best be found at our forum - http://forum.weavertheme.com
71
-
72
- == Upgrade Notice ==
73
-
74
- This is the initial release of this plugin.
75
-
76
- == ChangeLog ==
77
-
78
- = 1.0 =
79
- * Minor tweaks
80
- * wvrx_ shortcode prefix option
81
-
82
- = 0.96 =
83
- * Fixed bug with Per page options on Page with Posts
84
- * Internal optimizations
85
-
86
- = 0.95.1 =
87
- * Only load if Weaver Xtreme is the active theme.
88
-
89
- = 0.95 =
90
- * Changed [ site_title ] and [ site_tagline ] to match theme style as option
91
-
92
- = 0.10 =
93
- * Fixed per page options when used with old Xtreme Plus version
94
-
95
- = 0.9 =
96
- * Added Per Page and Per Post admin support to plugin (removed from Xtreme theme)
97
-
98
- = 0.8 =
99
- * Added [ box ]
100
-
101
- = 0.7 =
102
- * Fixes for [ show/hide_if]
103
- * Removed unused files
104
-
105
- = 0.6 =
106
- * Fixed [ show/hide_if ] for multiple conditions that include device
107
- * Changed interface to Weaver Xtreme - all codes now just in Weaver X Add-ons tab
108
-
109
- = 0.5 =
110
- * Added [ show/hide_if ], removed [ hide_mobie ], [show_if_logged_in]
111
- * Updated Doc
112
- * Added action for interface to Weaver Xtreme "Add-ons" tab
113
-
114
- = 0.4 =
115
- * Optimized loading of jslib - only needed by tab group, so not loaded until shortcode used
116
-
117
- = 0.3 =
118
- * Fixed video shortcodes
119
-
120
- = 0.1 =
121
-
122
- * initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/weaverx-ts-admin-style.css DELETED
@@ -1,133 +0,0 @@
1
- /* Weaver admin style */
2
- .hide_me {display:none;}
3
-
4
- .wvrx_ts_green {font-weight:bold;color:green;}
5
- .wvrx_ts_yellow {font-weight:bold;color:orange;}
6
- .wvrx_ts_red {font-weight:bold;color:red;}
7
-
8
- .wvr-help ul {list-style: disc; margin-left:30px;}
9
- .wvr-option-section {font-weight:bold;font-size:120%;color:blue;}
10
-
11
- .wvr-wrap {
12
- max-width:95%;
13
- }
14
-
15
- .tab ul {
16
- margin-left: 1.15em;
17
- list-style: disc outside none;
18
- }
19
- .tab ol {
20
- list-style-position:outside;
21
- margin-left: 1.4em;
22
- margin-bottom:.6em;
23
- }
24
-
25
- .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
26
-
27
- div.yetii {
28
- width: 95%;
29
- margin: 0 0 20px 0;
30
- }
31
-
32
- ul.yetii {
33
- list-style-type: none;
34
- width: 100%;
35
- float: left;
36
- border-bottom: 4px ridge #ddd;
37
- margin-bottom: 8px;
38
- }
39
-
40
- ul.yetii li {
41
- margin: 0 2px 0 0;
42
- float: left;
43
- }
44
-
45
- ul.yetii a {
46
- float: left;
47
- display: block;
48
- padding: 4px 8px;
49
- border: 1px solid #ddd;
50
- border-bottom: 0;
51
- color: #666;
52
- background: #eee;
53
- text-decoration: none;
54
- font-weight: bold;
55
- }
56
-
57
- ul.yetii a:hover {
58
- background: #fff;
59
- }
60
-
61
- ul.yetii a.active {
62
- background: #fff;
63
- border-color: #00c;
64
- color: #00f;
65
- }
66
- /* -- */
67
- div.yetiisub {
68
- width: 100%;
69
- margin: 0 0 20px 0;
70
- }
71
-
72
- ul.yetiisub {
73
- list-style-type: none;
74
- width: 100%;
75
- float: left;
76
- margin-bottom: 8px;
77
- }
78
-
79
- ul.yetiisub li {
80
- margin: 0 2px 2px 0px;
81
- float: left;
82
- }
83
-
84
- ul.yetiisub a {
85
- float: left;
86
- padding: 4px 8px;
87
- border: 1px solid #ccc;
88
- color: #666;
89
- background: #f0f0f0;
90
- text-decoration: none;
91
- font-style: italic;
92
- font-weight: bold;
93
- }
94
-
95
- ul.yetiisub a:hover {
96
- background: #fefefe !important;
97
- }
98
-
99
- ul.yetiisub a.active {
100
- background: #fff;
101
- border-color: #00c;
102
- color: #00f;
103
- }
104
- .wvr-small-submit {
105
- padding: 1.0em 0;
106
- margin: 1px 0;
107
- font-size:90%;
108
- }
109
-
110
- .wvr-option-header {background:#D0D0D8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px;}
111
- .wvr-option-subheader {background:#EAEAEA;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px;}
112
- .wvr-row-header {background:#D0D0D8;line-height:1.8em;padding-left:4px;}
113
- .wvr-row-subheader {background:#EAEAEA;padding-left:4px;}
114
- .wvr-row-subheader-alt {background:#F4F4F4;padding-left:4px;}
115
- /* layouts for layout boxes */
116
- .l_layout {display:block; width:140px; height:110px; float:left; margin-right:10px; margin-bottom:10px; display:inline;border:1px solid #888; color:black;text-align:center;font:15px arial,sans-serif;}
117
- .l_layout span {display:block;}
118
- .l_header {width:140px; height:20px; background:#CCF; line-height:20px;}
119
- .l_content {width:100px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
120
- .l_contentcenter {width:60px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
121
- .l_content2 {width:80px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
122
- .l_contentw {width:140px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
123
- .l_stdbar {width:40px; height:70px; float:left; display:inline;}
124
- .l_widebar {width:60px; height:70px; float:left; display:inline;}
125
- .l_righttop {width:40px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
126
- .l_righttopwide {width:60px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
127
- .l_rightup {width:40px; height:25px; margin:0; background:#FAA; float:left; display:inline; line-height:25px;}
128
- .l_rightright {width:40px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
129
- .l_rightdown {width:40px; height:25px; margin:0; background:#AFA; float:left; display:inline; line-height:25px;}
130
- .l_leftleft {width:40px; height:70px; margin:0; background:#AFA; float:left; display:inline; line-height:70px;}
131
- .l_leftshort {width:30px; height:50px; margin:0; background:#AFA; float:left; display:inline; line-height:50px;}
132
- .l_skinny {width:30px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
133
- .l_footer {clear:left;width:140px; height:20px; background:#DDF; color:#000; line-height:20px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/weaverx-ts-admin-style.min.css DELETED
@@ -1,4 +0,0 @@
1
- .hide_me{display:none}.wvrx_ts_green{font-weight:bold;color:green}.wvrx_ts_yellow{font-weight:bold;color:orange}.wvrx_ts_red{font-weight:bold;color:red}.wvr-help ul{list-style:disc;margin-left:30px}.wvr-option-section{font-weight:bold;font-size:120%;color:blue}.wvr-wrap{max-width:95%}.tab ul{margin-left:1.15em;list-style:disc outside none}.tab ol{list-style-position:outside;margin-left:1.4em;margin-bottom:.6em}.js_button{background:#eee!important;font-weight:600!important;color:#585858!important}div.yetii{width:95%;margin:0 0 20px 0}ul.yetii{list-style-type:none;width:100%;float:left;border-bottom:4px ridge #ddd;margin-bottom:8px}ul.yetii li{margin:0 2px 0 0;float:left}ul.yetii a{float:left;display:block;padding:4px 8px;border:1px solid #ddd;border-bottom:0;color:#666;background:#eee;text-decoration:none;font-weight:bold}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;border-color:#00c;color:#00f}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}
2
- ul.yetiisub li{margin:0 2px 2px 0;float:left}ul.yetiisub a{float:left;padding:4px 8px;border:1px solid #ccc;color:#666;background:#f0f0f0;text-decoration:none;font-style:italic;font-weight:bold}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;border-color:#00c;color:#00f}.wvr-small-submit{padding:1.0em 0;margin:1px 0;font-size:90%}.wvr-option-header{background:#d0d0d8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px}.wvr-option-subheader{background:#eaeaea;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px}.wvr-row-header{background:#d0d0d8;line-height:1.8em;padding-left:4px}.wvr-row-subheader{background:#eaeaea;padding-left:4px}.wvr-row-subheader-alt{background:#f4f4f4;padding-left:4px}.l_layout{display:block;width:140px;height:110px;float:left;margin-right:10px;margin-bottom:10px;display:inline;border:1px solid #888;color:black;text-align:center;font:15px arial,sans-serif}
3
- .l_layout span{display:block}.l_header{width:140px;height:20px;background:#CCF;line-height:20px}.l_content{width:100px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentcenter{width:60px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_content2{width:80px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentw{width:140px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_stdbar{width:40px;height:70px;float:left;display:inline}.l_widebar{width:60px;height:70px;float:left;display:inline}.l_righttop{width:40px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_righttopwide{width:60px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_rightup{width:40px;height:25px;margin:0;background:#FAA;float:left;display:inline;line-height:25px}.l_rightright{width:40px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}
4
- .l_rightdown{width:40px;height:25px;margin:0;background:#AFA;float:left;display:inline;line-height:25px}.l_leftleft{width:40px;height:70px;margin:0;background:#AFA;float:left;display:inline;line-height:70px}.l_leftshort{width:30px;height:50px;margin:0;background:#AFA;float:left;display:inline;line-height:50px}.l_skinny{width:30px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}.l_footer{clear:left;width:140px;height:20px;background:#DDF;color:#000;line-height:20px}
 
 
 
 
3.2.1/1.0/weaverx-ts-style.css DELETED
@@ -1,106 +0,0 @@
1
- /*
2
- Style file for Weaver X Theme Support
3
-
4
- License: GPL
5
-
6
- Weaver X Theme Support
7
- Copyright (C) 2014-2015 Bruce E. Wampler - weaver@weavertheme.com
8
-
9
- This program is free software: you can redistribute it and/or modify
10
- it under the terms of the GNU General Public License as published by
11
- the Free Software Foundation, either version 3 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
-
19
- You should have received a copy of the GNU General Public License
20
- along with this program. If not, see <http://www.gnu.org/licenses/>.
21
-
22
- PLEASE - DO NOT EDIT THIS FILE
23
-
24
- If you MUST change the CSS for these shortcodes and widgets, use the
25
- Custom CSS features of Weaver X, or use a custom CSS plugin
26
- such as JetPack, which let you add CSS to your theme or plugins
27
- without modifying theme or plugin .css files.
28
- */
29
-
30
- /* rules for areas hidden in various hybrid "desktop" views */
31
-
32
- @media screen and (min-width:768px) { /* rules for desk top */
33
- .wvr-hide-desktop {display:none !important;}
34
- .wvr-hide-all {display:none !important;}
35
- .wvr-show-phone {display:none !important;}
36
- .wvr-show-mobile {display:none !important;}
37
- .wvr-show-smalltablet {display:none !important;}
38
- }
39
-
40
- @media screen and (min-width:581px) and (max-width:767px) { /* rules for small tablets */
41
- .wvr-hide-smalltablet {display:none !important;}
42
- .wvr-hide-mobile {display:none !important;}
43
- .wvr-hide-all {display:none !important;}
44
- .wvr-show-desktop {display:none !important;}
45
- .wvr-show-phone {display:none !important;}
46
- }
47
-
48
- @media screen and (max-width:580px) { /* rules for phones */
49
- .wvr-hide-phone {display:none !important;}
50
- .wvr-hide-mobile {display:none !important;}
51
- .wvr-hide-all {display:none !important;}
52
- .wvr-show-desktop {display:none !important;}
53
- .wvr-show-smalltablet {display:none !important;}
54
- }
55
-
56
- /* Tabs */
57
- .wvr-tabs {
58
- -webkit-box-sizing: border-box;
59
- -moz-box-sizing: border-box;
60
- box-sizing: border-box;
61
- margin: 0 0 1.5em 0;
62
- background:transparent;
63
- }
64
-
65
- .wvr-tabs-style .wvr-tabs-nav { /* top "bar" behind tabs */
66
- padding: 0px 20px 0px 0px;
67
- margin: 0;
68
- height: 32px;
69
- background-color: transparent;
70
- }
71
- .wvr-tabs-style .wvr-tabs-nav span { /* bg color of a tab */
72
- display: block;
73
- float: left;
74
- padding: 0 20px;
75
- height: 32px;
76
- line-height: 32px;
77
- margin-right: 5px;
78
- cursor: pointer;
79
- border-top: 1px solid #888; /* border-color */
80
- border-right: 1px solid #888;
81
- border-left: 1px solid #888;
82
- background: #ccc; /* tab-bg */
83
- border-top-left-radius:6px;
84
- border-top-right-radius:6px;
85
- position:relative;
86
- z-index:1;
87
- }
88
-
89
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current {
90
- position:relative;
91
- z-index:3;
92
- }
93
-
94
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
95
- .wvr-tabs-style .wvr-tabs-nav span:hover {
96
- background: #eee; /* tab-current-color */
97
- }
98
-
99
- .wvr-tabs-style .wvr-tabs-pane {
100
- padding: 15px;
101
- border: 1px solid #888; /* border-color */
102
- min-height:20px; /* pane-min-height */
103
- background-color:transparent; /* pane-bg */
104
- position:relative;
105
- z-index:2;
106
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.0/weaverx-ts-style.min.css DELETED
@@ -1,2 +0,0 @@
1
- @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px;position:relative;z-index:1}
2
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current{position:relative;z-index:3}.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent;position:relative;z-index:2}
 
 
3.2.1/1.0/weaverx-ts.php DELETED
@@ -1,336 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Weaver X Theme Support
4
- Plugin URI: http://weavertheme.com/plugins
5
- Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
- Author: wpweaver
7
- Author URI: http://weavertheme.com/about/
8
- Version: 1.0
9
- License: GPL V3
10
-
11
- Weaver X Theme Support
12
-
13
- Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
-
30
- /* CORE FUNCTIONS
31
- */
32
- $theme = get_template_directory();
33
-
34
- if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
35
-
36
- define ('WVRX_TS_VERSION','1.0');
37
- define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
- define ('WVRX_TS_APPEARANCE_PAGE', false );
39
-
40
- function wvrx_ts_installed() {
41
- return true;
42
- }
43
-
44
-
45
- function wvrx_ts_plugins_url($file,$ext) {
46
- return plugins_url($file,__FILE__) . $ext;
47
- }
48
-
49
- function wvrx_ts_enqueue_scripts() { // action definition
50
-
51
- if (function_exists('wvrx_ts_slider_header')) wvrx_ts_slider_header();
52
-
53
- //-- Weaver X PLus js lib - requires jQuery...
54
-
55
- // put the enqueue script in the tabs shortcode where it belongs
56
-
57
- //wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION);
58
-
59
-
60
- // add plugin CSS here, too.
61
-
62
- wp_register_style('wvrx-ts-style-sheet',wvrx_ts_plugins_url('weaverx-ts-style', WVRX_TS_MINIFY.'.css'),null,WVRX_TS_VERSION,'all');
63
- wp_enqueue_style('wvrx-ts-style-sheet');
64
- }
65
-
66
- add_action('wp_enqueue_scripts', 'wvrx_ts_enqueue_scripts' );
67
-
68
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
69
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
70
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
71
-
72
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
73
-
74
- add_action('admin_menu', 'wvrx_ts_add_page_fields',11); // allow X-Plus to override us
75
-
76
- function wvrx_ts_add_page_fields() {
77
- add_meta_box('page-box', __('Weaver Xtreme Options For This Page (Theme Support Per Page Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_page_extras_load', 'page', 'normal', 'high');
78
- add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
79
- global $post;
80
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
81
- if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') ) {
82
- $i = 1;
83
- $args=array( 'public' => true, '_builtin' => false );
84
- $post_types = get_post_types($args,'names','and');
85
- foreach ($post_types as $post_type ) {
86
- add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras', $post_type, 'normal', 'high');
87
- $i++;
88
- }
89
- }
90
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin - needs to be here
91
-
92
- }
93
-
94
- function wvrx_ts_page_extras_load() {
95
- wvrx_ts_page_extras();
96
- }
97
-
98
- function wvrx_ts_post_extras_load() {
99
- wvrx_ts_post_extras();
100
- }
101
- }
102
-
103
- // ======================================== subthemes ========================================
104
- add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_action');
105
-
106
- function wvrx_ts_child_show_extrathemes_action() {
107
- echo '<h3 class="atw-option-subheader">' . __('Select an Add-on Subtheme You Have Uploaded','weaver-xtreme' /*adm*/) . '</h3>';
108
- $addon_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/';
109
- $addon_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes/addon-subthemes/';
110
-
111
- $addon_list = array();
112
- if($media_dir = @opendir($addon_dir)) { // build the list of themes from directory
113
- while ($m_file = readdir($media_dir)) {
114
- $len = strlen($m_file);
115
- $base = substr($m_file,0,$len-4);
116
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
117
- if($ext == '.wxt' ) {
118
- $addon_list[] = $base;
119
- }
120
- }
121
- }
122
-
123
- if (!empty($addon_list)) {
124
- natcasesort($addon_list);
125
-
126
- $cur_addon = weaverx_getopt('wvrx_addon_name');
127
- if ($cur_addon)
128
- echo '<h3>' . __('Currently selected Add-on Subtheme: ','weaver-xtreme' /*adm*/) . ucwords(str_replace('-',' ',$cur_addon)) . '</h3>';
129
- ?>
130
- <form enctype="multipart/form-data" name='pick_added_theme' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
131
-
132
- <h4><?php _e('Select an add-on subtheme:','weaver-xtreme' /*adm*/); ?></h4>
133
-
134
- <?php
135
- foreach ($addon_list as $addon) {
136
- $name = ucwords(str_replace('-',' ',$addon));
137
- ?>
138
- <div style="float:left; width:200px;">
139
- <label><input type="radio" name="wvrx_addon_name"
140
- <?php echo 'value="' . $addon . '"' . (weaverx_getopt('wvrx_addon_name') == $addon ? 'checked' : '') .
141
- '/> <strong>' . $name . '</strong><br />
142
- <img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . $addon_url . $addon . '.jpg" width="150px" height="113px" /><label></div>' . "\n";
143
- }
144
- ?>
145
- <div style="clear:both;"></div>
146
- <br /><span class='submit'><input name="set_added_subtheme" type="submit" value="<?php _e('Set to Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span>
147
- <small style="color:#b00;"><br /><?php _e('<strong>Note:</strong> Selecting a new subtheme will change only theme related settings.
148
- Options labelled with (&diams;) will be retained.
149
- You can use the Save/Restore tab to save a copy of all your current settings first.','weaver-xtreme' /*adm*/); ?></small>
150
-
151
- <?php weaverx_nonce_field('set_added_subtheme'); ?>
152
-
153
- <br /><br /><span class='atw-small-submit' style="margin-left:100px;"><input name="delete_added_subtheme" type="submit" value="<?php _e('Delete Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span> &nbsp;
154
- <small><?php _e('This will delete the selected Add-on Subtheme from the Add-on directory','weaver-xtreme' /*adm*/); ?></small>
155
- <?php weaverx_nonce_field('delete_added_subtheme'); ?>
156
- </form>
157
- <?php
158
- } else {
159
- ?>
160
- <p><?php _e('No Add-on Subthemes available.','weaver-xtreme' /*adm*/); ?></p>
161
- <?php
162
- }
163
- echo '<h3 class="atw-option-subheader">Upload an Add-on Subtheme From Your Computer</h3>';
164
- ?>
165
- <p><?php _e('You can find additional free and premium Add-on Subthemes for <em>Weaver Xtreme</em>','weaver-xtreme' /*adm*/); ?>
166
- <a href="http://xtreme.weavertheme.com/add-on-subthemes/" title="<?php _e('Weaver Xtreme Add-on Subthemes','weaver-xtreme' /*adm*/); ?>"><strong><?php _e('HERE','weaver-xtreme' /*adm*/); ?></strong></a>.</p>
167
- <form name='form_added_theme' enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
168
- <table>
169
- <tr valign="top">
170
- <td><strong><?php _e('Select Add-on Subtheme .zip file to upload:','weaver-xtreme' /*adm*/); ?></strong>
171
- <input name="uploaded_addon" type="file" />
172
- <input type="hidden" name="uploadaddon" value="yes" />
173
- </td>
174
- </tr>
175
- <tr><td>
176
- <span style="margin-left:50px;" class='submit'>
177
- <input name="upload_addon" type="submit" value="Upload Add-on Subtheme" /><br />
178
- </span>&nbsp;<small><?php _e('<strong>Upload and Save</strong> an Add-on Subtheme or Subtheme collection from .zip file on your computer. Will be saved on your site\'s filesystem.','weaver-xtreme' /*adm*/); ?></small>
179
- </td></tr>
180
- </table>
181
- <?php weaverx_nonce_field('upload_addon'); ?>
182
- </form>
183
-
184
- <?php
185
- }
186
-
187
- add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
188
- function wvrx_ts_child_process_options() {
189
-
190
- if (weaverx_submitted('set_added_subtheme') ) { // Set to selected addon - theme
191
- if (isset($_POST['wvrx_addon_name']))
192
- {
193
- $name = $_POST['wvrx_addon_name'];
194
-
195
- $openname = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt';
196
- $contents = file_get_contents($openname);
197
-
198
- if (!weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname)) {
199
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
200
- __('Sorry, there was a problem uploading your add on theme. The name you picked did not have a valid
201
- Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','weaver-xtreme' /*adm*/) . '</em></strong></p></div>';
202
- } else {
203
- weaverx_save_msg(__('Weaver Xtreme theme reset to ','weaver-xtreme' /*adm*/) .
204
- ucwords(str_replace('-',' ',$name )) . ' add-on subtheme.');
205
- weaverx_setopt('wvrx_addon_name',$name);
206
- }
207
- }
208
- }
209
-
210
- else if (weaverx_submitted('delete_added_subtheme') ) { // Delete selected addon theme
211
- if (isset($_POST['wvrx_addon_name']))
212
- {
213
- $name = $_POST['wvrx_addon_name'];
214
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt');
215
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.jpg');
216
- weaverx_save_msg(__('Deleted ','weaver-xtreme' /*adm*/) .
217
- ucwords(str_replace('-',' ',$name )) . __(' add-on subtheme.','weaver-xtreme' /*adm*/));
218
- }
219
- }
220
-
221
- else if (weaverx_submitted('upload_addon')
222
- && isset($_POST['uploadaddon'])
223
- && $_POST['uploadaddon'] == 'yes') {
224
- // upload theme from users computer
225
- // they've supplied and uploaded a file
226
- $ok = wvrx_ts_wunpackzip('uploaded_addon', weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/');
227
- }
228
-
229
- else if ( weaverx_submitted('toggle_shortcode_prefix') ) {
230
- $val = get_option('wvrx_toggle_shortcode_prefix');
231
- if ( $val ) {
232
- delete_option('wvrx_toggle_shortcode_prefix');
233
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes NOT prefixed with 'wvrx_'", 'weaver-xtreme'));
234
- } else {
235
- update_option('wvrx_toggle_shortcode_prefix', 'wvrx_');
236
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme'));
237
- }
238
- }
239
-
240
- }
241
-
242
- function wvrx_ts_wunpackzip($uploaded, $to_dir) {
243
- // upload theme from users computer
244
- // they've supplied and uploaded a file
245
- // This version and the one in Aspen Plus must be identical...
246
-
247
- $ok = true; // no errors so far
248
-
249
- if (isset($_FILES[$uploaded]['name'])) // uploaded_addon
250
- $filename = $_FILES[$uploaded]['name'];
251
- else
252
- $filename = "";
253
-
254
- if (isset($_FILES[$uploaded]['tmp_name'])) {
255
- $openname = $_FILES[$uploaded]['tmp_name'];
256
- } else {
257
- $openname = "";
258
- }
259
-
260
- //Check the file extension
261
- $check_file = strtolower($filename);
262
- $per = '.';
263
- $end = explode($per, $check_file); // workaround for PHP strict standards warning
264
- $ext_check = end($end);
265
-
266
- if (false && !weaverx_f_file_access_available()) {
267
- $errors[] = __('Sorry - Theme unable to access files.','weaver-xtreme' /*adm*/) . '<br />';
268
- $ok = false;
269
- }
270
-
271
- if ($filename == "") {
272
- $errors[] = __('You didn\'t select a file to upload.','weaver-xtreme' /*adm*/) . '<br />';
273
- $ok = false;
274
- }
275
-
276
- if ($ok && $ext_check != 'zip'){
277
- $errors[] = __("Uploaded files must have <em>.zip</em> extension.",'weaver-xtreme' /*adm*/) . "<br />";
278
- $ok = false;
279
- }
280
-
281
- if ($ok) {
282
- if (!weaverx_f_exists($openname)) {
283
- $errors[] = '<strong><em style="color:red;">' .
284
- __('Sorry, there was a problem uploading your file. You may need to check your folder permissions
285
- or other server settings.','weaver-xtreme' /*adm*/) . '</em></strong><br />' . __('Trying to use file','weaver-xtreme' /*adm*/) . "'$openname'";
286
- $ok = false;
287
- }
288
- }
289
-
290
- if ($ok) {
291
- // should be ready to go, but check out WP_Filesystem
292
- if (! WP_Filesystem()) {
293
- function wvrx_ts_wvx_return_direct() { return 'direct'; }
294
- add_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
295
- $try2 = WP_Filesystem();
296
- remove_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
297
- if (!$try2) {
298
- $errors[] = __('Sorry, there\'s a problem trying to use the WordPress unzip function. Please
299
- see the FAQ at weavertheme.com support for more information.','weaver-xtreme' /*adm*/);
300
- $ok = false;
301
- }
302
- }
303
- }
304
- if ($ok) {
305
- // $openname has uploaded .zip file to use
306
- // $filename has name of file uploaded
307
- $is_error = unzip_file( $openname, $to_dir );
308
- if ( !is_wp_error( $is_error ) ) {
309
- weaverx_save_msg(__('File ','weaver-xtreme' /*adm*/) . $filename . __(' successfully uploaded and unpacked to: <br />','weaver-xtreme' /*adm*/) . $to_dir);
310
- @unlink($openname); // delete temp file...
311
- } else {
312
- $errors[] = __("Sorry, unpacking the .zip you selected file failed. You may have a corrupt .zip file, or there many a file permissions problem on your WordPress installation.",'weaver-xtreme' /*adm*/);
313
- $errors[] = $is_error->get_error_message();
314
- $ok = false;
315
- }
316
- }
317
- if (!$ok) {
318
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' . __('ERROR','weaver-xtreme' /*adm*/) . '</em></strong></p><p>';
319
- foreach($errors as $error){
320
- echo $error.'<br />';
321
- }
322
- echo '</p></div>';
323
- }
324
- return $ok;
325
- }
326
-
327
- add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
328
- function wvrx_ts_child_saverestore_action() {
329
- echo '<h3 class="atw-option-subheader" style="font-style:italic">' . __('Use the <em>Weaver Xtreme Subthemes</em>
330
- tab to upload Add-on Subthemes.</h3><p>You can upload extra add-on subthemes you\'ve downloaded using the
331
- Subthemes tab. Note: the Save and Restore options on this page are for the custom settings you
332
- have created. These save/restore options are not related to Add-on Subthemes, although you can
333
- modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
334
- }
335
- }
336
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/help/help.html DELETED
@@ -1,584 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <title>Weaver X Theme Support</title>
6
- <style type="text/css">
7
- body {
8
- background: #eeeeee;
9
- margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
10
- padding: 10px; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
11
- color: #000000;
12
- text-align: left;
13
- font-family: Verdana, Arial, Helvetica, sans-serif;
14
- font-size: 10pt;
15
- background-color: #ffd;
16
- }
17
-
18
- /* everything about each major block on the site - may be mods in some places */
19
-
20
- #container {
21
- max-width:800px;
22
- background-color: #00CC00;
23
- }
24
- #mainContent {
25
- background-color: #ffc;
26
- }
27
- .oneColFixCtr #container {
28
- max-width: 750px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
29
- background: #FFFFCD;
30
- margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
31
- border: 1px solid #000000;
32
- text-align: left; /* this overrides the text-align: center on the body element. */
33
- }
34
- .oneColFixCtr #mainContent {
35
- padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
36
- font-size:12px;
37
- }
38
- /* layouts for layout boxes */
39
- .layoutbox {
40
- width:700px;
41
- text-align:center;
42
- margin:0 25px;
43
- }
44
- .l_layout {
45
- display:block;
46
- width:140px;
47
- height:110px;
48
- float:left;
49
- margin-right:10px;
50
- margin-bottom:10px;
51
- display:inline;
52
- border:1px solid #888;
53
- color:black;
54
- text-align:center;
55
- font:15px arial, sans-serif;
56
- }
57
- .l_layout span {
58
- display:block;
59
- }
60
- .l_header {
61
- width:140px;
62
- height:20px;
63
- background:#CCF;
64
- line-height:20px;
65
- }
66
- .l_content {
67
- width:100px;
68
- height:70px;
69
- background:beige;
70
- float:left;
71
- display:inline;
72
- line-height:70px;
73
- }
74
- .l_contentcenter {
75
- width:60px;
76
- height:70px;
77
- background:beige;
78
- float:left;
79
- display:inline;
80
- line-height:70px;
81
- }
82
- .l_content2 {
83
- width:80px;
84
- height:70px;
85
- background:beige;
86
- float:left;
87
- display:inline;
88
- line-height:70px;
89
- }
90
- .l_contentw {
91
- width:140px;
92
- height:70px;
93
- background:beige;
94
- float:left;
95
- display:inline;
96
- line-height:70px;
97
- }
98
- .l_stdbar {
99
- width:40px;
100
- height:70px;
101
- float:left;
102
- display:inline;
103
- }
104
- .l_widebar {
105
- width:60px;
106
- height:70px;
107
- float:left;
108
- display:inline;
109
- }
110
- .l_righttop {
111
- width:40px;
112
- height:20px;
113
- background:#FE8;
114
- float:left;
115
- display:inline;
116
- line-height:20px;
117
- }
118
- .l_righttopwide {
119
- width:60px;
120
- height:20px;
121
- background:#FE8;
122
- float:left;
123
- display:inline;
124
- line-height:20px;
125
- }
126
- .l_rightup {
127
- width:40px;
128
- height:25px;
129
- margin:0;
130
- background:#FAA;
131
- float:left;
132
- display:inline;
133
- line-height:25px;
134
- }
135
- .l_rightright {
136
- width:40px;
137
- height:50px;
138
- margin:0;
139
- background:#FAA;
140
- float:left;
141
- display:inline;
142
- line-height:50px;
143
- }
144
- .l_rightdown {
145
- width:40px;
146
- height:25px;
147
- margin:0;
148
- background:#AFA;
149
- float:left;
150
- display:inline;
151
- line-height:25px;
152
- }
153
- .l_leftleft {
154
- width:40px;
155
- height:70px;
156
- margin:0;
157
- background:#AFA;
158
- float:left;
159
- display:inline;
160
- line-height:70px;
161
- }
162
- .l_leftshort {
163
- width:30px;
164
- height:50px;
165
- margin:0;
166
- background:#AFA;
167
- float:left;
168
- display:inline;
169
- line-height:50px;
170
- }
171
- .l_skinny {
172
- width:30px;
173
- height:50px;
174
- margin:0;
175
- background:#FAA;
176
- float:left;
177
- display:inline;
178
- line-height:50px;
179
- }
180
- .l_footer {
181
- clear:left;
182
- width:140px;
183
- height:20px;
184
- background:#DDF;
185
- color:#000;
186
- line-height:20px;
187
- }
188
- h4 {
189
- font-weight: bold;
190
- font-style:italic;
191
- color: #000066;
192
- text-decoration: underline;
193
- }
194
- h3 {
195
- font-size: medium;
196
- font-weight: bold;
197
- color: #000066;
198
- text-decoration: underline;
199
- }
200
- h2 {
201
- font-size: large;
202
- font-weight: bold;
203
- color: #000066;
204
- text-decoration: underline;
205
- margin-top: 40pt;
206
- }
207
- h1 {
208
- font-size: x-large;
209
- font-weight: bold;
210
- color: #000066;
211
- text-decoration: underline;
212
- }
213
- .codebox {
214
- font-family: "Courier New", Courier, monospace;
215
- font-size: 10px;
216
- font-style: normal;
217
- background-color: #E8E8E8;
218
- margin: 10px;
219
- padding: 4px;
220
- border: 1px solid #333333;
221
- color: #000000;
222
- width: 80%;
223
- }
224
- .attrs {
225
- font-family: Arial, Helvetica, sans-serif;
226
- font-size: 10pt;
227
- color:#000000;
228
- text-decoration: none;
229
- }
230
- .css {
231
- font-family: "Courier New", Courier, monospace;
232
- font-size: 9pt;
233
- font-style: normal;
234
- }
235
- .box {
236
- color: #000000;
237
- text-decoration: none;
238
- margin: 5px;
239
- padding: 5px;
240
- border: thin solid #000000;
241
- }
242
- .nospace {
243
- margin-top: 5px;
244
- margin-bottom: 5px;
245
- }
246
- .style3 {
247
- font-family: "Courier New", Courier, monospace
248
- }
249
- .style4 {
250
- font-family: monospace
251
- }
252
- .style6 {
253
- color: #990000;
254
- font-style: italic;
255
- }
256
- .style7 {
257
- color: #CC3300;
258
- font-weight: bold;
259
- }
260
- .code1 {
261
- font-family: "Courier New", Courier, monospace;
262
- font-size: 14px;
263
- font-style: italic;
264
- }
265
- .red-highlight {
266
- color: #CC3300;
267
- }
268
- </style>
269
- </head>
270
- <body class="oneColFixCtr">
271
- <div id="container">
272
- <div id="mainContent"> <a name="top" id="top"></a>
273
- <h2><b>Weaver X Theme Support Plugin Documentation -- Version 1.0</b></h2>
274
- <h4>Table of Contents</h4>
275
- <ul style="line-height:1.7em;">
276
- <li><a href="#summary"><strong>Plugin Summary</strong></a></li>
277
- <li><strong><a href="#admin_page">Weaver X Theme Extras Admin Page</a> </strong></li>
278
- <li><a href="#sc_summary"><strong>Shortcode Summary</strong></a></li>
279
- <ul>
280
- <li><strong><a href="#bloginfo">[bloginfo arg='name' style='your css']</a></strong></li>
281
- <li><strong><a href="#box">[box]text[/box]</a></strong></li>
282
- <li><a href="#tab_group"><strong>[tab_group] - content in tabs</strong></a></li>
283
- <li><strong><a href="#headerimage">[header_image] Shortcode</a></strong></li>
284
- <li><strong><a href="#schtml">[html]</a></strong></li>
285
- <li><strong><a href="#scdiv">[div]text[/div]</a>, <a href="#schtml">[span]text[/span]</a></strong></li>
286
- <li><strong><a href="#sciframe"> [iframe]</a></strong></li>
287
- <li><strong><a href="#scshowif">[show/hide_if]</a></strong></li>
288
- <li><strong><a href="#sitetitlesc">[site_title], [site_tagline]</a></strong></li>
289
-
290
- <li><strong><a href="#video">Video - [vimeo], [youtube]</a></strong></li>
291
- </ul>
292
- <li><a href="#widg-sum"><strong>Widget Summary</strong></a>
293
- <ul>
294
- <li><strong><a href="#widg-login">Weaver X Login Widget</a></strong></li>
295
- <li><strong><a href="#widg_pp_text">Weaver X Per Page Text</a></strong></li>
296
- <li><strong><a href="#widg_text_2">Weaver X Text 2</a></strong></li>
297
- </ul>
298
- </li>
299
- </ul>
300
- <h3><a name="summary" id="summary"></a>Plugin Summary </h3>
301
- <p>The Weaver X Theme Support Plugin provides a collection of shortcodes to allow you to easily add extra content and features to your regular content. These shortcodes will work with almost any WordPress theme. </p>
302
- <p>While these shortcodes should prove useful with most any theme, one of the goals of these shortcodes is to provide an alternative to users of the Weaver X theme.</p>
303
- <h2><a name="admin_page" id="admin_page"></a>Weaver Xtreme Theme Extras Admin Page</h2>
304
- <p>This plugin has just a few options, all found on the Weaver X Theme Support admin page under the WordPress dashboard Appearance section.</p>
305
- <h2><a name="sc_summary" id="sc_summary"></a>Shortcode Summary</h2>
306
- <h3><a name="tab_group" id="tab_group"></a>[tab_group] - content in tabs </h3>
307
- <p>Show content displayed on tabbed pages.</p>
308
- <p><strong>Shortcode usage:</strong><br />
309
- <pre>
310
- [tab_group border_color=black page_min_height=200px]
311
- [tab title='tab one']This is the content found on first tab.[/tab]
312
- [tab title='tab two']And we have more content for the second tab.[/tab]
313
- [tab title='last tab']And this is the last tab. There could be more.[/tab]
314
- [/tab_group]
315
- </pre>
316
- <h4>Short code parameters</h4>
317
- You can supply values for these parameters to control the look of the tabbed section.
318
- <br />
319
- <ul>
320
- <li><b>border_color:</b> tab and pane border color - default #888</li>
321
- <li><b>tab_bg</b>: normal bg color of tab (default #CCC)</li>
322
- <li><b>tab_selected_color</b>: color of tab when selected (default #EEE)</li>
323
- <li><b>pane_min_height</b>: min height of a pane to help make all even if needed</li>
324
- <li><b>pane_bg</b>: bg color of pane</li>
325
- </ul>
326
- </p>
327
- <h3><a name="headerimage" id="headerimage"></a><strong>[header_image]</strong></h3>
328
- <p>The <code>[header_image]</code> shortcode allows you display the current header image wherever you want.
329
- For example, you can get the header image into the Header Widget Area by using this shortcode in a text widget.
330
- The current standard or mobile header image will be displayed. Only the <code>&lt;img ... &gt;</code> is displayed --
331
- the image will not be wrapped in a link to the site.</p>
332
-
333
- <p><strong>Shortcode usage:</strong> <code>[header_image h='size' w='size' style='inline-style']</code>
334
- <br />
335
- <ol>
336
- <li><strong>w='size' h='size'</strong> - By default, no height or image properties are included with the
337
- header <code>&lt;img ... &gt;</code>, which will result in an image scaled to fit into whatever the natural
338
- width of the enclosing HTML container is (the content area, a text widget, etc.). You may specify an explicit
339
- value (usually in px) for the height and width of the image.
340
- </li>
341
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
342
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
343
- <code>style="your-rules;"</code> - using double quotation marks.
344
- </li>
345
- </ol>
346
- <h3><a name="schtml" id="schtml"></a><strong>[html]</strong></h3>
347
-
348
- <p>The Weaver X Theme Support <code>[html]</code> shortcode allows you to add arbitrary HTML to your post and page content. The
349
- main purpose of this shortcode is to get around the auto paragraph and line break and other HTML stripping functionality
350
- of the WordPress editor.</p>
351
-
352
- <p><strong>Shortcode usage:</strong> <code>[html html-tag args='parameters']</code>
353
- <br />
354
- <ol>
355
- <li><strong>html-tag</strong> - The first parameter to the shortcode must be present, and must be a standard
356
- HTML tag - <code>p</code>, <code>br</code>, or <code>span</code>, for example. You just supply the tag - no quotation
357
- marks, no '=', just the tag. The shortcode provides the &lt; and &gt;. If you need a wrapping HTML tag (e.g., <code>span</code> and <code>/span</code>), use
358
- two shortcodes:<br />
359
- <code>[html span args='style="color:red"']content to make red[html /span]</code>
360
- </li>
361
- <li><strong>args='parameters'</strong> - Allows you to specify arbitrary parameters for your HTML tag. See the example above.
362
- </li>
363
- </ol>
364
- </p>
365
-
366
- <h3><a name="scdiv" id="scdiv"></a><strong>[div]text[/div]</strong>, [span]text[/span]</h3>
367
-
368
- <p>The Weaver X Theme Support <code>[div]</code> and [span] shortcodes allow you to easily add HTML &lt;div&gt; or &lt;span&gt; tags to your post and page content. The
369
- main purpose of these shortcodes is to get around need to switch to the HTML editor view when you need to
370
- wrap your content in a &lt;div&gt; or &lt;span&gt;.</p>
371
- <p>
372
- This will work exactly like a standard HMTL &lt;div&gt;and &lt;span&gt; tags. It supports 'id', 'class',
373
- and 'style' parameters, which are the most useful. Instead of wrapping your text in &lt;div&gt; or &lt;span&gt; tags, wrap them like
374
- this (the Visual view will work just fine):<br />
375
- <code>[div style="font-size:20px;']This content will be large.[/div]</code><br />
376
- <code>[span style=&quot;font-size:20px;']This content will be large.[/span]</code></p>
377
- <p><strong>Shortcode usage:</strong> <code>[div id='class_id' class='class_name' style='style_values']text[/div]</code>
378
- <br />
379
- <code>[span id='class_id' class='class_name' style='style_values']text[/span]</code> <br />
380
- <ol>
381
- <li><strong>id='class_id' class='class_name' style='style_values'</strong> - Allows you to specify id, class, and style for the &lt;div&gt;. See the example above.
382
- </li>
383
- </ol>
384
- </p>
385
-
386
- <h3><a name="sciframe" id="sciframe"></a><strong>iframe - [iframe]</strong></h3>
387
-
388
- <p>The <code>[iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
389
- the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>
390
-
391
- <p><strong>Shortcode usage:</strong> <code>[iframe src='http://example.com' height=600 percent=100 style="style"]</code>
392
- <br />
393
- <ol>
394
- <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
395
- </li>
396
- <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
397
- </li>
398
- <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
399
- </li>
400
- <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values".
401
- </li>
402
- </ol>
403
- </p>
404
-
405
- <h3><a name="scshowif" id="scshowif"></a><strong>[show_if]content[/show_if], [hide_if]</strong>content [/hide_if]</h3>
406
- <p>The <code>[show_if]</code> and <code>[hide_if]</code> shortcodes allow you to selectively
407
- display or hide content depending if any of several conditions are met.</p>
408
-
409
- <p><strong>Shortcode usage:</strong> <code>[hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]</code>
410
- </p>
411
- <p>You bracket the content you want to selectively display with <code>[show/hide_if]</code> and closing
412
- <code>[/show/hide_if]</code> tags. That content can contain other shortcodes as needed. If you specify more than one parameter to the short code, then all the conditions must be met (logical AND). Any paramaters you don't include are considered true.</p>
413
- <h4>Parameters</h4>
414
- <p>'device' =&gt; 'default', // desktop, mobile, smalltablet, phone, all<br />
415
- 'logged_in' =&gt; 'default', // true or false<br />
416
- 'not_post_id' =&gt; 'default', // comma separated list of post IDs (includes pages, too)<br />
417
- 'post_id' =&gt; 'default', // comma separated list<br />
418
- 'user_can' =&gt; 'default' // http://codex.wordpress.org/Function_Reference/current_user_can</p>
419
- <p>
420
- <strong>device=desktop | mobile | smalltablet | phone </strong> - The device parameter for <code>[show/hide_if]</code> is designed to allow you to hide <em>or</em> show any content on any of the
421
- device sizes recognized by Weaver Xtreme (or any theme, actually): 'phone', 'smalltablet', and 'desktop', or 'mobile' for non-desktop devices. If you want to show or hide content on
422
- a specific device, you give the <span class="code1">device</span> parameter a value of desktop, mobile, smalltablet, phone, or none (e.g., <code>[show_if device=mobile]</code>). </p>
423
- <p><strong>logged_in=true | false</strong> - This will hide or display content depending if the visitor is logged into the site or not. </p>
424
- <p><strong>post_id=34,875</strong> / <strong>not_post_id=1,2,3 </strong>- This will display (or not display) the content depending if the current page or single post view is included in the comma separated list of WordPress page/post IDs. You can use both to refine a list of pages or posts to display or not display. Note that even though the parameter is called 'post_id', it applies equally to pages and posts. Depending on where you use the shortcode, it will apply to a post differently depending if it is on a blog or single page view of a post. Note that the default WordPress blog (as opposed to the Weaver Xtreme Page with Posts template) does not have a post_ID.</p>
425
- <p><strong>user_can=user-capability</strong> - This will show or hide depending if the current visitor has certain WordPress user capabilities. There are many capabilities which are defined in the <a href="http://codex.wordpress.org/Function_Reference/current_user_can" target="_blank">WordPress Codex</a>. This shortcode supports any of the listed capabilities for maximum flexibility. If you don't want to learn about all the capabilities listed in the Codex, you can use the following capability values to determine if the visitor has a specific role (as defined on the Dashboard Users admin pages). For example:<br />
426
- <br />
427
- <span class="code1">[show_if user_can=publish_pages]content for Editors and above[/show_if]</span><br />
428
- <br />
429
- Note that the higher roles have all the capabilities of the lower roles - an Editor can do everything a Contributor can.</p>
430
- <table width="80%" border="1">
431
- <caption>
432
- Capabilities to Specify Role
433
- </caption>
434
- <tr>
435
- <th scope="col">Role</th>
436
- <th scope="col">Capability</th>
437
- </tr>
438
- <tr>
439
- <td>Subscriber</td>
440
- <td>read</td>
441
- </tr>
442
- <tr>
443
- <td>Contributor</td>
444
- <td>edit_posts</td>
445
- </tr>
446
- <tr>
447
- <td>Author</td>
448
- <td>publish_posts</td>
449
- </tr>
450
- <tr>
451
- <td>Editor</td>
452
- <td>publish_pages</td>
453
- </tr>
454
- <tr>
455
- <td>Administrator</td>
456
- <td>manage_options</td>
457
- </tr>
458
- <tr>
459
- <td>Super Administrator (MultiSite)</td>
460
- <td>manage_network</td>
461
- </tr>
462
- </table>
463
- <p>&nbsp;</p>
464
- <h3><a name="sitetitlesc" id="sitetitlesc"></a><strong>[site_title style="style" matchtheme=false], [site_tagline style="style" matchtheme=false]</strong></h3>
465
-
466
- <p>The <code>[site_title]</code> and <code>[site_tagline]</code> shortcodes allow you display the current
467
- site title and site tagline. This can be useful in a text widget in the Header Widget Area, for example.</p>
468
- <p><em>Note:</em> If you want to position the content of a text widget within the a cell of the Header Widget Area, you could use the following
469
- example:</p>
470
- <p><code>[site_title style='font-size:150%;position:absolute;padding-left:20px;padding-top:30px;']</code></p>
471
-
472
- <p><strong>Shortcode usage:</strong> <code>[site_title style='inline-style' matchtheme=false] [site_tagline style='inline-style' matchtheme=false]</code>
473
- <br />
474
- <ol>
475
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
476
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
477
- <code>style="your-rules;"</code> - using double quotation marks.
478
- </li>
479
- <li><strong>matchtheme=true</strong> - Allows you to add match the theme styling as defined in the site header if set to true.
480
- This will match the color/style/font of the header version of the site title and tagline with the exception of hide settings.
481
- The shortcode version will not be hidden on any device unless you also wrap the shortcode with a [show_if/hide_if] shortcode.
482
- </li>
483
-
484
- </ol>
485
-
486
- <h3><a name="bloginfo" id="bloginfo"></a><strong>[bloginfo arg='name' style='your css']</strong></h3>
487
-
488
- <p>This shortcode can be used to access the WordPress function 'get_bloginfo($arg)'. This will return a number of useful
489
- strings depending on the value. All the supported values are listed at http://codex.wordpress.org/Function_Reference/get_bloginfo.
490
- Some useful values include 'stylesheet_directory' and 'template_directory'. You can wrap the bloginfo output with css added to a &lt;span style=&quot;your css&quot;&gt;.
491
- </p>
492
-
493
- <h3><a name="box" id="box"></a><strong>[box]text[/box]</strong></h3>
494
-
495
- <p>
496
- Wrap content in a box.</p>
497
- <p><strong>Shortcode Usage:</strong> <code>[box align=left background=#fff border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules']text[/box]</code></p>
498
- <ol>
499
- <li><strong>align=align</strong>: Leave blank, or specify left, center, or right for alignment of box within surrounding text.</li>
500
- <li><strong>border=true</strong>: True is default. Specify false or 0 for no borders.</li>
501
- <li><strong>border_rule='1px solid black</strong>': Specify a compound border CSS value to replace the default '1px solid black'.</li>
502
- <li><strong>border_radius=4</strong>: Default is none - specify a px value for the corner radius if you want rounded corners.</li>
503
- <li><strong>color=#000</strong>: Default is inherit - specify a valid color for the color of the text in the box.</li>
504
- <li><strong>background=#fff</strong>: Default is inherit - specify color for box background color.</li>
505
- <li><strong>margin=1</strong>: Default is 0 - specify an 'em' value for margin around the box. Using a margin overrides align parameter.</li>
506
- <li><strong>padding=1</strong>: Default 1 - specify an 'em' value for padding inside box.</li>
507
- <li><strong>shadow=0</strong>: Default 0 - specify a value from 1 to 5 for a border around the box.</li>
508
- <li><strong>style=inline-style</strong>: any additional custom styling for the box</li>
509
- <li><strong>width=100</strong>: A percentage width for the box within its surrounding container.</li>
510
- </ol>
511
- <h3><a name="video" id="video"></a><strong>Video - [vimeo], [youtube]</strong></h3>
512
- <p>Weaver X Theme Support supports specialized shortcodes to display video. While there are other ways to embed video, the Weaver X Theme Support versions have two important features. First, they will auto adjust to the width of your content, <em><strong>including</strong></em> the mobile view. Second, they use the latest iframe/HTML5 interface provided by YouTube and Vimeo.</p>
513
- <p><strong>Specifying Video Display Size for both shortcodes</strong></p>
514
- <p>Weaver X Theme Support supports a common set of options for both the YouTube and Vimeo shortcodes to support displaying your videos with a specific width and correct height. By default, your videos will be displayed using the full width of the content area being used (percent=100). The percent= parameter is used to specify the width you want.</p>
515
- <p>The height of the video is automatically determined based on the width and the display ratio of the particular video. </p>
516
- <p>Finally, you may specify if the video should be centered or no within the display area using &quot;center=0&quot; to not center (centering is on by default).</p>
517
- <p>Note - if you want to display more than one video horizontally, use &quot;center=0&quot; and specify an appropriate percentage to fit all the videos.</p>
518
- <p>Parameters in Common</p>
519
- <ul>
520
- <li>percent=100 - By default, the video will be sized to fill the full content space. You can use the percent value to make
521
- the video use a percentage of the content space (but mobile will always use full width).</li>
522
- <li>center=1 - Specify 'center=0' to disable centering of the video.</li>
523
- <li>sd=0 - By default, Weaver X Theme Support will generate sizes for HD/widescreen videos. To display old 4:3 standard definition videos, include 'sd=1' in the shortcode.</li>
524
- </ul>
525
- <h4>Vimeo</h4>
526
- <pre><strong>[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex
527
- autoplay=0 loop=0 portrait=1 title=1 byline=1]
528
- </strong></pre>
529
- <p>This will display Vimeo videos. At the minimum, you can provide the standard http://vimeo.com/nnnnn link, or just the video ID number (which is part of the Vimeo Link). The other Vimeo specific options include:</p>
530
- <ul>
531
- <li>color - You can optionally specify a Vimeo color theme using 6 hex digits for a color value.</li>
532
- <li>autoplay - Add 'autoplay=1' to have the video autoplay.</li>
533
- <li>loop - Add 'loop=1' to have the video loop.</li>
534
- <li>portrait, title, byline - You can specify a value '=0' for these to hide the display of the corresponding element on the Vimeo player.
535
- Portrait is the avatar/icon, title is the video title, and byline is source attribution.<br />
536
- </li>
537
- </ul>
538
- <h4>YouTube</h4>
539
- <code><strong>[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=1 https=0 privacy=0 {youtube options}]
540
- </strong></code>
541
- <p>This will display YouTube videos. At the minimum, you can provide the standard http://youtu.be/xxxxxx share link (including the options YouTube lets you specify), the long format share link, or just the video ID number using the id=videoid parameter (which is part of the YouTube Link). The other YouTube specific options include:</p>
542
- <ul>
543
- <li>rel - If you specify 'rel=0', YouTube won't show related videos after the video plays.</li>
544
- <li>https - If you specify 'https=1', YouTube will use the https protocol.</li>
545
- <li>privacy - If you specify 'privacy=1', YouTube won't used cookies to track your viewing.</li>
546
- </ul>
547
- <p>In addition to the above [youtube] options, the shortcode also supports most standard YouTube options. These are more fully described on the <a href="http://code.google.com/apis/youtube/player_parameters.html" target="_blank">YouTube Embedded Player Parameters</a> page.</p>
548
- <p>The supported options, with Weaver X Theme Support's default values include:</p>
549
- <p>'autohide' = '1' . . . . . . 0: always show controls; 1: autohide controls; 2: autohide progress bar<br />
550
- 'autoplay' = '0' . . . . . . 1: auto play; 0: don't<br />
551
- 'border' = '0' . . . . . . . . 0: no border; 1: border using color1 and color2 (don't seem to work)<br />
552
- 'color' = not set . . . . . . progress bar color - red or white<br />
553
- 'color1' = not set . . . . . RGB hex value for border color<br />
554
- 'color2' = not set . . . . . RGB hex value for control bar bg<br />
555
- 'controls' = '1' . . . . . . . 0: hide player controls<br />
556
- 'disablekb' = '0' . . . . . . 1: disable keyboard controls<br />
557
- 'egm' ='0' . . . . . . . . . . . 1: enable &quot;Enhanced Genie Menu&quot;<br />
558
- 'hd' = '0' . . . . . . . . . . . . 1: enable HD playback by default<br />
559
- 'iv_load_policy' = '1' . . . 1: show annotations; 3: don't show; 2: discontinued support<br />
560
- 'loop' = '0' . . . . . . . . . . . 1: loop video<br />
561
- 'modestbranding' = '0' . .1: hide YouTube logo - will still show label in upper right corner<br />
562
- 'origin' = not set . . . . . . . See YouTube docs<br />
563
- 'playlist' = not set . . . . . . Comma separated list of videoIDs to play (id/url video played 1st)<br />
564
- 'showinfo' = '1' . . . . . . . 0: hide video title<br />
565
- 'showsearch' = '1' . . . . . 0: hide video searchbox<br />
566
- 'start' = not set . . . . . . . start vide this number of seconds from start<br />
567
- 'theme' = 'dark' . . . . . . . dark or light - display theme for player<br />
568
- 'wmode' = 'transparent' . Keeps video behind menu bars, etc. Other values available - see YouTube</p>
569
- <h2><a name="widg-sum" id="widg-sum"></a>Widget Summary</h2>
570
- <h3><a name="widg-login" id="widg-login"></a>Weaver X Login Widget</h3>
571
- <p>This simple widget shows a login in link, or a welcome, Site Admin, and Log out choice if the user is logged in.</p>
572
- <h3><a name="widg_pp_text" id="widg_pp_text"></a>Weaver X Per Page Text</h3>
573
- <p>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>if you want a title, and define Custom Field<em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text, HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)</p>
574
- <h3><a name="widg_text_2" id="widg_text_2"></a>Weaver X Text 2</h3>
575
- <p>This widget lets you add two columns of text. It is most useful in wide widget areas such as a content top or bottom widget area, or a wide footer widget area.</p>
576
- <p>&nbsp;</p>
577
- <h2><br />
578
- </h2>
579
- <p>The Weaver X Theme Support Plugin and this document are &copy; 2014, Bruce E. Wampler. <a ref="http://weavertheme.com">Web Site - WeaverTheme.com</a></p>
580
-
581
- </div>
582
- </div>
583
- </body>
584
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,616 +0,0 @@
1
- <?php
2
- /* Display per page and per post options.
3
- *
4
- * __ added - 12/10/14
5
- *
6
- * IMPORTANT! - this code and the Weaver Plus plugin need to be maintained in parallel!
7
- */
8
-
9
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
10
- // Admin panel that gets added to the page edit page for per page options
11
-
12
-
13
- if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
14
-
15
- function wvrx_ts_isp_true($val) {
16
- if ($val) return true;
17
- return false;
18
- }
19
-
20
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
21
- global $post;
22
- ?>
23
- <div style="float:left;width:<?php echo $width; ?>%"><label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
24
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> />
25
- <?php echo($msg . '</label></div>');
26
- for ($i = 0 ; $i < $br ; $i++)
27
- echo '<br class="page_checkbox" style="clear:both;" />';
28
- }
29
-
30
- function wvrx_ts_page_layout( $page = 'page' ) {
31
-
32
- if ( $page == 'page')
33
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaver-xtreme' /*adm*/);
34
- else
35
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaver-xtreme' /*adm*/);
36
-
37
- $opts = array( 'id' => '_pp_page_layout',
38
- 'info' => $msg,
39
- 'value' => array(
40
- array('val' => '', 'desc' => __('Use Default','weaver-xtreme' /*adm*/) ),
41
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaver-xtreme' /*adm*/) ),
42
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaver-xtreme' /*adm*/) ),
43
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaver-xtreme' /*adm*/) ),
44
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaver-xtreme' /*adm*/) ),
45
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaver-xtreme' /*adm*/) ),
46
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaver-xtreme' /*adm*/) ),
47
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaver-xtreme' /*adm*/) )
48
- ));
49
- wvrx_ts_pp_select_id($opts);
50
- }
51
- //--
52
-
53
-
54
-
55
- function wvrx_ts_pp_replacement( $desc, $id ) {
56
- global $post;
57
- global $wp_registered_sidebars;
58
-
59
- $id = '_' . $id;
60
-
61
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
62
-
63
-
64
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
65
- $area_name = $value['id']; //sanitize_title($value['name']);
66
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
67
- echo ' <option value="' . $area_name . '"';
68
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
69
- echo '>' . substr($area_name,9) . "</option>\n";
70
-
71
- }
72
- }
73
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
74
- }
75
- //--
76
-
77
-
78
- function wvrx_ts_pp_select_id( $value ) {
79
- global $post;
80
-
81
- if ( isset( $value['name'] ) && $value['name'] != '' )
82
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
83
-
84
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
85
-
86
- foreach ($value['value'] as $option) {
87
- if ( $option['val'] == '' ) {
88
- echo '<option value="">';
89
- } else {
90
- echo ' <option value="' . $option['val'] . '"';
91
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
92
- echo ">";
93
- }
94
- echo $option['desc'] . "</option>\n";
95
- }
96
- echo '</select>&nbsp;' . $value['info'] . "\n";
97
- }
98
- //--
99
-
100
-
101
-
102
- function wvrx_ts_pwp_atw_show_post_filter() {
103
- // use plugin options...
104
- global $post;
105
-
106
- if ( function_exists( 'atw_showposts_installed' ) ) {
107
- $filters = atw_posts_getopt('filters');
108
-
109
- $first = true;
110
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
111
- foreach ($filters as $filter => $val) { // display dropdown of available filters
112
- if ( $first ) {
113
- $first = false;
114
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
115
- } else {
116
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
117
- }
118
- }
119
- echo '</select>&nbsp;' .
120
- __('Use a Filter from <em>Weaver Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaver-xtreme' /*adm*/) .
121
- '<br /> <span style="margin-left:8em;"><span>' .
122
- __('(Note: Weaver Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts using this filter.)','weaver-xtreme' /*adm*/) .
123
- '<br />' . '<br />';
124
- } else {
125
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaver-xtreme' /*adm*/); ?>
126
- <br /><br />
127
- <?php }
128
- }
129
- //--
130
-
131
-
132
-
133
- function wvrx_ts_pwp_type() {
134
- $opts = array( 'name' => __('Display posts as:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
135
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaver-xtreme' /*adm*/),
136
- 'value' => array(
137
- array('val' => '', 'desc' => '&nbsp;' ),
138
- array('val' => 'full', 'desc' => __('Full post','weaver-xtreme' /*adm*/) ),
139
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaver-xtreme' /*adm*/) ),
140
- array('val' => 'title', 'desc' => __('Title only','weaver-xtreme' /*adm*/) ),
141
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaver-xtreme' /*adm*/) )
142
- ));
143
- wvrx_ts_pp_select_id($opts);
144
- }
145
-
146
-
147
- function wvrx_ts_page_cols() {
148
-
149
- $opts = array( 'name' => '', 'id' => '_pp_page_cols',
150
- 'info' => __('Display page content in this many columns using CSS column rules.','weaver-xtreme' /*adm*/),
151
- 'value' => array(
152
- array('val' => '', 'desc' => '&nbsp;'),
153
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
154
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
155
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ),
156
- array('val' => '4', 'desc' => __('4 Columns','weaver-xtreme' /*adm*/) ))
157
- );
158
- wvrx_ts_pp_select_id($opts);
159
-
160
- weaverx_html_br();
161
- weaverx_html_br();
162
- }
163
-
164
-
165
- function wvrx_ts_pwp_cols() {
166
-
167
- $opts = array( 'name' => __('Display post columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
168
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaver-xtreme' /*adm*/),
169
- 'value' => array(
170
- array('val' => '', 'desc' => '&nbsp;'),
171
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
172
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
173
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ) )
174
- );
175
- wvrx_ts_pp_select_id($opts);
176
-
177
- weaverx_html_br();
178
-
179
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_pwp_masonry',
180
- 'info' => __('Use <em>Masonry</em> for multi-column display','weaver-xtreme' /*adm*/),
181
- 'value' => array(
182
- array('val' => '', 'desc' => '&nbsp;' ),
183
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
184
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
185
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ),
186
- array('val' => '4', 'desc' => __('4 Columns','weaver-xtreme' /*adm*/) ),
187
- array('val' => '5', 'desc' => __('5 Columns','weaver-xtreme' /*adm*/) ) )
188
- );
189
- wvrx_ts_pp_select_id($opts2);
190
-
191
- ?>
192
- <br />
193
- <?php
194
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaver-xtreme' /*adm*/),90,1);
195
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaver-xtreme' /*adm*/),90,1);
196
- }
197
-
198
- function wvrx_ts_page_extras() {
199
- global $post;
200
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
201
-
202
- if ( !( current_user_can('edit_themes')
203
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
204
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
205
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
206
- ) {
207
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
208
- echo '<p>' .
209
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaver-xtreme' /*adm*/) .
210
- '</p>';
211
- else
212
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
213
- return; // don't show per post panel
214
- }
215
-
216
- echo("<div style=\"line-height:150%;\"><p>\n");
217
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
218
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
219
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaver-xtreme' /*adm*/); ?>
220
- </div><br />
221
- <?php
222
- }
223
-
224
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
225
- <div style="padding:2px; border:2px solid red; background:#FAA;">
226
- <?php _e('<strong>WARNING!</strong>
227
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
228
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
229
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
230
- If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
231
- including the option of using the Page with Posts page template,
232
- then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
233
- the <em></em>&mdash; Select &mdash;</em> default value.','weaver-xtreme' /*adm*/); ?>
234
- </div><br />
235
- <?php
236
- return;
237
- }
238
- echo '<strong>' . __('Page Templates','weaver-xtreme' /*adm*/) . '</strong>';
239
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaver-xtreme' /*adm*/));
240
- echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
241
- weaverx_html_br();
242
- _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaver-xtreme' /*adm*/);
243
- weaverx_html_br();
244
- echo '<strong>' . __('Per Page Options','weaver-xtreme' /*adm*/) . '</strong>';
245
- weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaver-xtreme' /*adm*/));
246
- weaverx_html_br();
247
- _e('These settings let you hide various elements on a per page basis.','weaver-xtreme' /*adm*/);
248
- weaverx_html_br();
249
-
250
-
251
- wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaver-xtreme' /*adm*/));
252
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaver-xtreme' /*adm*/));
253
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaver-xtreme' /*adm*/), 33, 1);
254
-
255
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaver-xtreme' /*adm*/));
256
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaver-xtreme' /*adm*/));
257
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaver-xtreme' /*adm*/),33,1);
258
-
259
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaver-xtreme' /*adm*/));
260
- wvrx_ts_page_checkbox('_pp_full_browser_height',__('Force full browser height','weaver-xtreme' /*adm*/),33,2);
261
-
262
- wvrx_ts_page_cols();
263
-
264
- _e('<em>Note:</em> the following options work with the default menu - not custom menus.','weaver-xtreme' /*adm*/);
265
- weaverx_html_br();
266
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaver-xtreme' /*adm*/),90,1);
267
-
268
-
269
-
270
- wvrx_ts_page_checkbox('_pp_stay_on_page',__('Menu "Placeholder" page. Useful for top-level menu item - don\'t go anywhere when menu item is clicked.','weaver-xtreme' /*adm*/),90,2);
271
-
272
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90,1);
273
-
274
- if (weaverx_allow_multisite()) {
275
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90,1);
276
- }
277
-
278
- ?>
279
- <p><strong><?php _e('Sidebars &amp; Widgets','weaver-xtreme' /*adm*/); ?></strong></p>
280
-
281
- <?php
282
- wvrx_ts_page_layout();
283
- ?>
284
- <br />
285
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
286
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
287
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaver-xtreme' /*adm*/); ?> <br /><br />
288
- <?php
289
-
290
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaver-xtreme' /*adm*/),40);
291
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaver-xtreme' /*adm*/),40,1);
292
-
293
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaver-xtreme' /*adm*/),40);
294
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaver-xtreme' /*adm*/),40,1);
295
-
296
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaver-xtreme' /*adm*/),40);
297
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaver-xtreme' /*adm*/),40,1);
298
-
299
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaver-xtreme' /*adm*/),40);
300
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaver-xtreme' /*adm*/),40,1);
301
- ?>
302
-
303
- <p><strong><?php _e('Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
304
- <p>
305
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
306
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
307
- </p>
308
- <?php
309
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
310
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
311
-
312
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
313
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
314
-
315
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-top-widget-area' );
316
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-bottom-widget-area' );
317
-
318
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaver-xtreme' /*adm*/) , 'page-top-widget-area' );
319
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaver-xtreme' /*adm*/) , 'page-bottom-widget-area' );
320
- ?>
321
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
322
- <?php
323
- $opts3 = array( 'id' => '_pp_fi_location',
324
- 'info' => __('How to display Page FI on this page','weaver-xtreme' /*adm*/),
325
- 'value' => array(
326
- array('val' => '', 'desc' => __('Default Page FI','weaver-xtreme' /*adm*/) ),
327
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
328
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
329
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
330
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
331
- array('val' => 'hide', 'desc' => __('Hide FI on this Page','weaver-xtreme' /*adm*/) )
332
- )
333
- );
334
- wvrx_ts_pp_select_id($opts3);
335
- ?>
336
- <br />
337
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
338
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
339
- <?php _e('<em>Featured Image Link</em> - Full URL for link from FI','weaver-xtreme' /*adm*/); ?>
340
- <br style="clear:both;" />
341
- <hr />
342
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
343
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
344
-
345
- <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaver-xtreme' /*adm*/); ?>
346
- <br />
347
- </p>
348
- <p>
349
- <?php _e('<strong>Settings for "Page with Posts" Template</strong>','weaver-xtreme' /*adm*/);
350
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaver-xtreme' /*adm*/) );
351
-
352
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
353
- if ($template == 'paget-posts.php') {
354
- ?>
355
- <br />
356
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
357
- The settings will be combined for the final filtered list of posts displayed.
358
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
359
- <br />
360
-
361
- <input type="text" size="30" id="_pp_category" name="_pp_category"
362
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
363
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaver-xtreme' /*adm*/); ?>
364
- <br />
365
-
366
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
367
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
368
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaver-xtreme' /*adm*/); ?> <br />
369
-
370
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
371
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
372
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display.",'weaver-xtreme' /*adm*/); ?> <br />
373
-
374
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
375
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
376
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaver-xtreme' /*adm*/); ?> <br />
377
-
378
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
379
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
380
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaver-xtreme' /*adm*/); ?> <br />
381
-
382
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
383
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
384
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaver-xtreme' /*adm*/); ?> <br />
385
-
386
- <input type="text" size="30" id="_pp_author" name="_pp_author"
387
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
388
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaver-xtreme' /*adm*/); ?> <br />
389
-
390
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
391
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
392
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaver-xtreme' /*adm*/); ?> <br />
393
-
394
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
395
-
396
- <?php wvrx_ts_pwp_type(); ?><br />
397
- <?php wvrx_ts_pwp_cols(); ?><br />
398
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
399
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
400
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaver-xtreme' /*adm*/); ?>
401
- <br />
402
-
403
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
404
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
405
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
406
- __("Hide first \"n\" posts</em> - Start with post n+1.
407
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaver-xtreme' /*adm*/) ; ?>
408
-
409
- <br /><br />
410
-
411
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaver-xtreme' /*adm*/), 40); ?>
412
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaver-xtreme' /*adm*/), 40, 1); ?>
413
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaver-xtreme' /*adm*/), 40); ?>
414
- </p>
415
- <?php
416
- } else { // NOT a page with posts
417
- ?> <p>
418
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
419
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
420
- settings for "Page with Posts" will be displayed here. Current page template:','weaver-xtreme' /*adm*/); ?>
421
- <?php echo $template; ?>
422
- </p>
423
- <?php
424
- }
425
- do_action('weaverxplus_add_per_page');
426
- ?>
427
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
428
- </div>
429
- <?php
430
- }
431
-
432
- function wvrx_ts_post_extras() {
433
- global $post;
434
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
435
- if ( !( current_user_can('edit_themes')
436
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
437
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
438
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
439
- ) {
440
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
441
- return; // don't show per post panel
442
- }
443
- ?>
444
- <div style="line-height:150%;">
445
- <p>
446
- <?php
447
- echo '<strong>' . __('Per Post Options','weaver-xtreme' /*adm*/) . '</strong>';
448
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaver-xtreme' /*adm*/));
449
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
450
- weaverx_html_br();
451
- _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.','weaver-xtreme' /*adm*/);
452
- weaverx_html_br();
453
-
454
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaver-xtreme' /*adm*/), 40);
455
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaver-xtreme' /*adm*/),55,1);
456
-
457
-
458
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaver-xtreme' /*adm*/),40);
459
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaver-xtreme' /*adm*/), 40, 1);
460
-
461
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaver-xtreme' /*adm*/),40);
462
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaver-xtreme' /*adm*/),40,1);
463
-
464
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaver-xtreme' /*adm*/),40);
465
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaver-xtreme' /*adm*/),40,1);
466
- wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaver-xtreme' /*adm*/),90,1);
467
-
468
- wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaver-xtreme' /*adm*/),90);
469
-
470
-
471
- echo('<br style="clear:both;"/><br /><strong>Per Post Style</strong>' /*a*/ );
472
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaver-xtreme' /*adm*/ ));
473
- echo '<br />' .
474
- __('Enter optional per post CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
475
- Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
476
- (e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme' /*adm*/); ?>
477
- <br />
478
- <textarea name="_pp_post_styles" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_styles", true)); ?></textarea>
479
- <br />
480
- <br />
481
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
482
-
483
- <?php
484
- wvrx_ts_page_layout('post');
485
- ?>
486
- <br />
487
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
488
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
489
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaver-xtreme' /*adm*/); ?> <br /><br />
490
- <?php
491
-
492
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaver-xtreme' /*adm*/),40);
493
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaver-xtreme' /*adm*/),40,1);
494
-
495
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaver-xtreme' /*adm*/),40);
496
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
497
-
498
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaver-xtreme' /*adm*/),40);
499
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
500
-
501
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaver-xtreme' /*adm*/),40);
502
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaver-xtreme' /*adm*/),40,1);
503
- ?>
504
- </p>
505
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
506
- <p>
507
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
508
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
509
- </p>
510
- <?php
511
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
512
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
513
-
514
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
515
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
516
-
517
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
518
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
519
- ?>
520
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
521
- <?php
522
- $opts3 = array( 'id' => '_pp_fi_location',
523
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaver-xtreme' /*adm*/),
524
- 'value' => array(
525
- array('val' => '', 'desc' => __('Default Single Page FI','weaver-xtreme' /*adm*/) ),
526
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
527
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
528
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
529
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
530
- array('val' => 'post-before', 'desc' => __('Outside of Post','weaver-xtreme' /*adm*/) ),
531
- array('val' => 'hide', 'desc' => __('Hide FI on Single Page','weaver-xtreme' /*adm*/) )
532
- )
533
- );
534
- wvrx_ts_pp_select_id($opts3);
535
- ?>
536
- <br />
537
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
538
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
539
- <?php _e("<em>Featured Image Link</em> - Full URL for link from FI",'weaver-xtreme' /*adm*/); ?>
540
- <br style="clear:both;" />
541
- </p><p>
542
- <strong><?php _e('Post Editor Options','weaver-xtreme' /*adm*/); ?></strong>
543
-
544
- <?php
545
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90, 1);
546
-
547
- if (weaverx_allow_multisite()) {
548
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90, 1);
549
- }
550
- ?>
551
- </p>
552
- <p>
553
- <?php echo('<strong>Post Format</strong>');
554
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaver-xtreme' /*adm*/));
555
- weaverx_html_br();
556
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info.','weaver-xtreme' /*adm*/);
557
- weaverx_html_br();
558
- weaverx_html_br();
559
-
560
- do_action('weaverxplus_add_per_post'); ?>
561
- </p>
562
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
563
- </div>
564
- <?php
565
- }
566
-
567
-
568
- function wvrx_ts_save_post_fields($post_id) {
569
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
570
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
571
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
572
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
573
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
574
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
575
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
576
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
577
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
578
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
579
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
580
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
581
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area', '_pp_full_browser_height',
582
- '_pp_page_cols'
583
- );
584
-
585
- if (weaverx_allow_multisite()) {
586
- array_push($default_post_fields, '_pp_raw_html');
587
- }
588
-
589
- $all_post_fields = $default_post_fields;
590
-
591
- if (isset($_POST['post_meta'])) {
592
- foreach ($all_post_fields as $post_field) {
593
- if (isset($_POST[$post_field])) {
594
- $data = $_POST[$post_field];
595
- if ( $post_field != '_pp_post_styles')
596
- $data = stripslashes($data); // passed via post, so strip slashes
597
-
598
- if (get_post_meta($post_id, $post_field) == '') {
599
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
600
- }
601
- else if ($data != get_post_meta($post_id, $post_field, true)) {
602
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
603
- } else if ($data == '') {
604
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
605
- }
606
- } else {
607
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
608
- }
609
- }
610
- }
611
- }
612
-
613
- add_action("save_post", "wvrx_ts_save_post_fields");
614
- add_action("publish_post", "wvrx_ts_save_post_fields");
615
- }
616
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/includes/wvrx-ts-runtime-lib.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
-
6
- function wvrx_ts_help_link($ref, $label) {
7
-
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
- }
13
-
14
-
15
- // =============================== options =============================
16
-
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
-
19
-
20
- // Interface to Weaver Xtreme
21
-
22
- function wvrx_ts_fix_short($prefix, $msg ) {
23
- if ( $prefix ) {
24
- $m = str_replace('[/', '////', $msg);
25
- $m = str_replace('[', '[' . $prefix, $m);
26
- echo str_replace('////', '[/' . $prefix, $m);
27
- }
28
- else
29
- echo $msg;
30
- }
31
-
32
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
33
- function wvrx_ts_theme_support_addon() {
34
- ?>
35
- <div class="a-plus">
36
- <p><strong style="font-size:110%;"><?php _e('You have Weaver Xtreme Theme Support installed.','weaver-xtreme' /*adm*/); ?></strong><br />
37
- <?php _e('This section shows the shortcodes and widgets available with Weaver X Theme Support.
38
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaver-xtreme' /*adm*/); ?></p>
39
-
40
- <?php
41
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
42
- if ( $prefix )
43
- echo '<h3 style="color:red;">' . __("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme') . '</h3>';
44
- ?>
45
-
46
- <h3><?php _e('Shortcodes','weaver-xtreme' /*adm*/); ?></h3>
47
- <ul>
48
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaver-xtreme' /*adm*/)); ?>
49
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaver-xtreme' /*adm*/));?><br />
50
- <code><?php wvrx_ts_fix_short($prefix, __("[bloginfo name='WP bloginfo name' style='style-rules']",'weaver-xtreme' /*adm*/)); ?></code>
51
- </li>
52
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Box - [box]</span> - Display content in a Box','weaver-xtreme' /*adm*/)); ?>
53
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaver-xtreme' /*adm*/));?><br />
54
- <code><?php wvrx_ts_fix_short($prefix, __("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaver-xtreme' /*adm*/)); ?></code>
55
- </li>
56
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaver-xtreme' /*adm*/)); ?>
57
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaver-xtreme' /*adm*/));?><br />
58
- <code><?php wvrx_ts_fix_short($prefix, __("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaver-xtreme' /*adm*/)); ?></code>
59
- </li>
60
- <li<?php wvrx_ts_fix_short($prefix, __('><span class="wvr-blue">Header Image - [header_image]</span> - Display default header image','weaver-xtreme' /*adm*/)); ?>
61
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaver-xtreme' /*adm*/));?><br />
62
- <code><?php wvrx_ts_fix_short($prefix, __("[header_image h='size' w='size' style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
63
- </li>
64
-
65
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaver-xtreme' /*adm*/)); ?>
66
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaver-xtreme' /*adm*/));?><br />
67
- <code><?php wvrx_ts_fix_short($prefix, __("[html html-tag args='parameters']",'weaver-xtreme' /*adm*/)); ?></code>
68
- </li>
69
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaver-xtreme' /*adm*/)); ?>
70
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaver-xtreme' /*adm*/));?><br />
71
- <code><?php wvrx_ts_fix_short($prefix, __("[iframe src='http://example.com' height=600 percent=100 style='style']",'weaver-xtreme' /*adm*/)); ?></code>
72
- </li>
73
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Login - [login]</span> - Show simple Login/Logout link','weaver-xtreme' /*adm*/)); ?>
74
- <?php wvrx_ts_help_link('help.html#sclogin',__('Help for login','weaver-xtreme' /*adm*/));?><br />
75
- <code><?php wvrx_ts_fix_short($prefix, __("[login]",'weaver-xtreme' /*adm*/)); ?></code>
76
- </li>
77
-
78
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaver-xtreme' /*adm*/)); ?>
79
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaver-xtreme' /*adm*/));?><br />
80
- <code><?php wvrx_ts_fix_short($prefix, __('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaver-xtreme' /*adm*/)); ?></code>
81
- </li>
82
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Hide If - [hide_if]</span> - Hide content','weaver-xtreme' /*adm*/)); ?>
83
- </li>
84
-
85
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline','weaver-xtreme' /*adm*/)); ?>
86
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaver-xtreme' /*adm*/));?><br />
87
- <code><?php wvrx_ts_fix_short($prefix, __("[site_tagline style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
88
- </li>
89
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title','weaver-xtreme' /*adm*/)); ?>
90
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaver-xtreme' /*adm*/));?><br />
91
- <code><?php wvrx_ts_fix_short($prefix, __("[site_title style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
92
- </li>
93
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag','weaver-xtreme' /*adm*/)); ?>
94
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Span','weaver-xtreme' /*adm*/));?><br />
95
- <code><?php wvrx_ts_fix_short($prefix, __("[span id='class_id' class='class_name' style='style_values']text[/span]",'weaver-xtreme' /*adm*/)); ?></code>
96
- </li>
97
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Tab Group - [tab_group]</span> - Display content on separate tabs','weaver-xtreme' /*adm*/));?>
98
- <?php wvrx_ts_help_link('help.html#tab_group',__('Help for Tab Group','weaver-xtreme' /*adm*/));?><br />
99
- <code><?php wvrx_ts_fix_short($prefix, __('[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]','weaver-xtreme' /*adm*/)); ?></code>
100
- </li>
101
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options','weaver-xtreme' /*adm*/)); ?>
102
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
103
- <code><?php wvrx_ts_fix_short($prefix, __('[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]','weaver-xtreme' /*adm*/)); ?></code>
104
- </li>
105
-
106
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options','weaver-xtreme' /*adm*/)); ?>
107
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
108
- <code><?php wvrx_ts_fix_short($prefix, __('[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]','weaver-xtreme' /*adm*/)); ?></code>
109
- </li>
110
- </ul>
111
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
112
-
113
- <?php
114
- if ( $prefix )
115
- $button = __("Remove 'wvrx_' prefix from shortcode names: [ bloginfo ], etc.", 'weaver-xtreme');
116
- else
117
- $button = __("Add 'wvrx_' to shortcode names: [ wvrx_bloginfo ], etc.", 'weaver-xtreme');
118
- ?>
119
- <div style="clear:both;"></div>
120
- <span class='submit'><input name="toggle_shortcode_prefix" type="submit" value="<?php echo $button; ?>" /></span>
121
- <br /><small> <?php _e("To avoid conflicts with other plugins, you can add a 'wvrx_' prefix to these shortcodes.", 'weaver-xtreme /*adm*/'); ?> </small>
122
- <?php weaverx_nonce_field('toggle_shortcode_prefix'); ?>
123
- </form>
124
- <br />
125
-
126
- <h3><?php _e('Widgets','weaver-xtreme' /*adm*/); ?></h3>
127
- <ul>
128
- <li><?php _e('<span class="wvr-blue">Weaver X Login Widget</span> - Simplified login widget','weaver-xtreme' /*adm*/); ?>
129
- <?php wvrx_ts_help_link('help.html#widg-login',__('Help for Login Widget','weaver-xtreme' /*adm*/));?>
130
- </li>
131
-
132
- <li><?php _e('<span class="wvr-blue">Weaver X Per Page Text</span> - Display text on a per page basis, based on a Custom Field value','weaver-xtreme' /*adm*/); ?>
133
- <?php wvrx_ts_help_link('help.html##widg_pp_text',__('Help for Per Page Text Widget','weaver-xtreme' /*adm*/));?>
134
- </li>
135
-
136
- <li><?php _e('<span class="wvr-blue">Weaver X Text 2</span> - Display text in two columns - great for wide top/bottom widgets','weaver-xtreme' /*adm*/); ?>
137
- <?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
138
- </li>
139
- </ul>
140
-
141
-
142
- <h3><?php _e('Per Page/Post Settings','weaver-xtreme' /*adm*/); ?></h3>
143
- <p> <?php _e("Click the following button to produce a list of links to all pages and posts that have Per Page or Per Post settings.", 'weaver-xtreme /*adm*/'); ?></p>
144
- <div style="clear:both;"></div>
145
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
146
- <span class='submit'><input name="show_per_page_report" type="submit" value="<?php _e('Show Pages and Posts with Per Page/Post Settings', 'weaver-xtreme /*adm*/'); ?>" /></span>
147
- <?php weaverx_nonce_field('show_per_page_report'); ?>
148
- </form><br /><br />
149
- </div>
150
-
151
- <?php
152
- }
153
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/includes/wvrx-ts-shortcodes.php DELETED
@@ -1,661 +0,0 @@
1
- <?php
2
- /*
3
- Weaver X shortcodes
4
- */
5
-
6
- function wvrx_ts_setup_shortcodes() {
7
- // we setup all of our shortcodes only after the theme has been loaded...
8
-
9
- $codes = array( // list of shortcodes
10
- array('bloginfo' => 'wvrx_ts_sc_bloginfo'), // [bloginfo]
11
- array('box' => 'wvrx_ts_sc_box'), // [box]
12
- array('div' => 'wvrx_ts_sc_div'), // [div]
13
- array('header_image' => 'wvrx_ts_sc_header_image'), // [header_image]
14
- array('hide_if' => 'wvrx_ts_sc_hide_if' ), // [hide_if]
15
- array('html' => 'wvrx_ts_sc_html'), // [html]
16
- array('iframe' => 'wvrx_ts_sc_iframe'), // [iframe]
17
- array('login' => 'wvrx_ts_sc_login'), // [login]
18
- array('show_if' => 'wvrx_ts_sc_show_if' ), // [show_if]
19
- array('span' => 'wvrx_ts_sc_span'), // [span]
20
- array('site_tagline' => 'wvrx_ts_sc_site_tagline'), // [site_tagline]
21
- array('site_title' => 'wvrx_ts_sc_site_title'), // [site_title]
22
- array('tab_group' => 'wvrx_ts_sc_tab_group',
23
- 'tab' => 'wvrx_ts_sc_tab'), // [tab_group], [tab]
24
- array('vimeo' => 'wvrx_ts_sc_vimeo'), // [vimeo]
25
- array('youtube' => 'wvrx_ts_sc_youtube'), // [youtube]
26
- array('weaverx_info' => 'wvrx_ts_weaverx_sc_info'), // [weaverx_info]
27
- );
28
-
29
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
30
-
31
- foreach ($codes as $code) {
32
- wvrx_ts_set_shortcodes($code, $prefix);
33
- }
34
- }
35
-
36
- add_action('init', 'wvrx_ts_setup_shortcodes'); // allow shortcodes to load after theme has loaded so we know which version to use
37
-
38
- // =============== [box] ===================
39
- function wvrx_ts_sc_box( $args = '', $text ) {
40
- extract(shortcode_atts(array(
41
- 'align' => '',
42
- 'border' => true,
43
- 'border_rule' => '1px solid black',
44
- 'border_radius' => '',
45
- 'color' => '',
46
- 'background' => '',
47
- 'margin' => '',
48
- 'padding' => '1',
49
- 'shadow' => '',
50
- 'style' => '',
51
- 'width' => ''
52
- ), $args));
53
-
54
- $sty = 'style="';
55
-
56
- if ( $align ) {
57
- $align = strtolower($align);
58
- switch ( $align ) {
59
- case 'center':
60
- $sty .= 'display:block;margin-left:auto;margin-right:auto;';
61
- break;
62
- case 'right':
63
- $sty .= 'float:right;';
64
- break;
65
- default:
66
- $sty .= 'float:left;';
67
- break;
68
- }
69
- }
70
-
71
- if ( $border )
72
- $sty .= "border:{$border_rule};";
73
- if ( $border_radius )
74
- $sty .= "border-radius:{$border_radius}px;";
75
- if ( $shadow ) {
76
- if ( $shadow < 1 ) $shadow = 1;
77
- if ( $shadow > 5 ) $shadow = 5;
78
- $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
79
- }
80
- if ( $color )
81
- $sty .= "color:{$color};";
82
- if ( $background )
83
- $sty .= "background-color:{$background};";
84
- if ( $margin )
85
- $sty .= "margin:{$margin}em;";
86
- if ( $padding )
87
- $sty .= "padding:{$padding}em;";
88
- if ( $width )
89
- $sty .= "width:{$width}%;";
90
- if ( $sty )
91
- $sty .= $style;
92
- $sty .= '"'; // finish it
93
-
94
- return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
95
- }
96
-
97
- // =============== [hide_if] ===================
98
- function wvrx_ts_sc_hide_if($args = '', $text ) {
99
-
100
- return wvrx_ts_show_hide_if( $args, $text, false );
101
- }
102
-
103
- // =============== [show_if] ===================
104
- function wvrx_ts_sc_show_if($args = '', $text ) {
105
- return wvrx_ts_show_hide_if( $args, $text, true );
106
- }
107
-
108
- // =============== [show_hide_if] ===================
109
- function wvrx_ts_show_hide_if($args = '', $text, $show) {
110
- extract(shortcode_atts(array(
111
- 'device' => 'default', // desktop, mobile, smalltablet, phone, all
112
- 'logged_in' => 'default', // true or false
113
- 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
114
- 'post_id' => 'default', // comma separated list
115
- 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
116
- ), $args));
117
-
118
- $valid_device = array('default','desktop','mobile','smalltablet','phone','all');
119
-
120
- if ( !in_array( $device, $valid_device )) {
121
- return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
122
-
123
- }
124
- if ( $logged_in == 'default' ) { // **** logged_in
125
- $logged_in = true;
126
- } else {
127
- $is_true = is_user_logged_in();
128
- $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : !$is_true;
129
- }
130
-
131
- if ( $not_post_id == 'default') { // **** pages
132
- $not_post_id = true;
133
- } else {
134
- $list = explode(',', str_replace(' ', '', $not_post_id));
135
- $not_post_id = !in_array( get_the_ID(), $list );
136
- }
137
-
138
- if ( $post_id == 'default') { // **** pages
139
- $post_id = true;
140
- } else {
141
- $list = explode(',', str_replace(' ', '', $post_id));
142
- $post_id = in_array( get_the_ID(), $list );
143
- }
144
-
145
- if ( $user_can == 'default') { // **** user_can
146
- $user_can = true;
147
- } else {
148
- $user_can = current_user_can( strtolower( $user_can) );
149
- }
150
-
151
- $x = true;
152
- if ( $x == 'default') {
153
- $x = true;
154
- } else {
155
- $x = $show;
156
- }
157
-
158
- $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
159
-
160
- if ( !$all_true ) { // device irrelevant
161
- // $text .= '* ALL TRUE FAILED *';
162
- if ( !$show )
163
- return do_shortcode( $text ); // hide fails, so show it
164
- else
165
- return ''; // show fails, so hide it
166
-
167
- } elseif ( $device == 'default') { // so all other conditions passed, see if specified device
168
- // $text .= '* ALL TRUE, DEVICE DEFAULT *';
169
- if ( $show )
170
- return do_shortcode( $text );
171
- else
172
- return '';
173
- } else {
174
- // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
175
- if ( $show ) {
176
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('show-' . $device); // for [extra_menu]
177
- } else {
178
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('hide-' . $device);
179
- }
180
- $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode($text) . '</div>';
181
- unset( $GLOBALS['wvrx_sc_show_hide'] );
182
- return $ret;
183
- }
184
- return '';
185
- }
186
-
187
-
188
- // =============== [header_image style='customstyle'] ===================
189
- function wvrx_ts_sc_header_image($args = ''){
190
- extract(shortcode_atts(array(
191
- 'style' => '', // STYLE
192
- 'h' => '',
193
- 'w' => ''
194
- ), $args));
195
-
196
- $width = $w ? ' width="' . $w . '"' : '';
197
- $height = $h ? ' height="' . $h . '"' : '';
198
- $st = $style ? ' style="' . $style . '"' : '';
199
-
200
- $hdrimg = '<img src="' . get_header_image() . '"' . $st . $width . $height
201
- . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
202
-
203
- return $hdrimg;
204
- }
205
-
206
- // =============== [bloginfo arg='name'] ======================
207
- function wvrx_ts_sc_bloginfo($args = '') {
208
- extract(shortcode_atts(array(
209
- 'arg' => 'name', // a WP bloginfo name
210
- 'style' => '' // wrap with style
211
- ), $args));
212
-
213
- $code = '';
214
- if ($style != '') $code = '<span style="' . $style . '">';
215
- $code .= esc_attr( get_bloginfo( $arg ));
216
- if ($style != '') $code .= '</span>';
217
- return $code;
218
- }
219
-
220
- // =============== [site_title style='customstyle'] ======================
221
- function wvrx_ts_sc_site_title($args = '') {
222
- extract(shortcode_atts(array(
223
- 'style' => '', /* styling for the header */
224
- 'matchtheme' => false
225
- ), $args));
226
-
227
- $title = esc_html( get_bloginfo( 'name', 'display' ));
228
-
229
- $before = '';
230
- $after = '';
231
-
232
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
233
- $before = '<h1' . weaverx_title_class( 'site_title', false, 'site-title' ) . '><a href="' . esc_url( home_url( '/' ) ) . '" title="' . $title . '" rel="home">';
234
- $after = '</a></h1>';
235
- }
236
-
237
- if ($style) {
238
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
239
- }
240
- return $before . $title . $after;
241
-
242
- }
243
-
244
- // =============== [site_tagline style='customstyle'] ======================
245
- function wvrx_ts_sc_site_tagline($args = '') {
246
- extract(shortcode_atts(array(
247
- 'style' => '', /* styling for the header */
248
- 'matchtheme' => false
249
- ), $args));
250
-
251
- $title = get_bloginfo( 'description' );
252
-
253
- $before = '';
254
- $after = '';
255
-
256
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
257
- $before = '<h2' . weaverx_title_class( 'tagline', false, 'site-tagline' ) . '>';
258
- $after = '</h2>';
259
- }
260
-
261
- if ($style) {
262
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
263
- }
264
- return $before . $title . $after;
265
- }
266
-
267
- // =============== [iframe src='address' height=nnn] ======================
268
- function wvrx_ts_sc_iframe($args = '') {
269
- extract(shortcode_atts(array(
270
- 'src' => '',
271
- 'height' => '600', /* styling for the header */
272
- 'percent' => 100,
273
- 'style' => 'border:1px;'
274
- ), $args));
275
-
276
- $sty = $style ? ' style="' . $style . '"' : '';
277
-
278
- if (!$src) return __('<h4>No src address provided to [iframe].</h4>','weaver-xtreme' /*adm*/);
279
- return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
280
- }
281
-
282
- // =============== [iframe src='address' height=nnn] ======================
283
- function wvrx_ts_sc_login($args = '') {
284
- extract(shortcode_atts(array(
285
- ), $args));
286
-
287
- return wp_loginout( '', false );
288
- }
289
-
290
- // =============== [tab_group ] ======================
291
- function wvrx_ts_sc_tab_group( $args, $content ) {
292
- extract( shortcode_atts( array(
293
- 'border_color' => '', // tab and pane bodder color - default #888
294
- 'tab_bg' => '', // normal bg color of tab (default #CCC)
295
- 'tab_selected_color' => '', // color of tab when selected (default #EEE)
296
- 'pane_min_height' => '', // min height of a pane to help make all even if needed
297
- 'pane_bg' => '' // bg color of pane
298
- ), $args ) );
299
-
300
- if (isset($GLOBALS['wvrx_ts_in_tab_container']) && $GLOBALS['wvrx_ts_in_tab_container']) {
301
- return __('<strong>Sorry, you cannot nest tab_containers.</strong>','weaver-xtreme' /*adm*/);
302
- }
303
-
304
- // enqueue the theme support jslib only now when it will actually be needed!
305
-
306
- wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
307
-
308
- if ( !isset( $GLOBALS['wvrx_ts_tab_id'] ) )
309
- $GLOBALS['wvrx_ts_tab_id'] = 1;
310
- else
311
- ++$GLOBALS['wvrx_ts_tab_id'];
312
-
313
- $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
314
-
315
- $css = ''; // default styles
316
- $add_style = '';
317
- if ($border_color != '')
318
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
319
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
320
-
321
- if ($pane_min_height != '')
322
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
323
-
324
- if ($pane_bg != '')
325
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
326
-
327
- if ($tab_bg != '')
328
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
329
-
330
- if ($tab_selected_color != '')
331
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
332
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
333
-
334
- if ($css != '') { // specified some style...
335
- $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
336
- }
337
-
338
- $GLOBALS['wvrx_ts_in_tab_container'] = true;
339
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
340
-
341
- do_shortcode( $content ); // process the tabs on this
342
-
343
- $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
344
-
345
- if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
346
- foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
347
- $tabs[] = '<span>' . $tab['title'] . '</span>'. "\n";
348
- $panes[] = "\n" .'<div class="wvr-tabs-pane">' . $tab['content'] . '</div>';
349
- }
350
- $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
351
- . '<div class="wvr-tabs-nav">' . "\n"
352
- . implode( '', $tabs ) . '</div>' . "\n"
353
- . '<div class="wvr-tabs-panes">'
354
- . implode( '', $panes ) . "\n"
355
- . '</div><div class="wvr-tabs-clear"></div>' . "\n"
356
- . '</div> <!-- end tab_group -->' . "\n";
357
- }
358
-
359
- // Forget globals we generated
360
- unset( $GLOBALS['wvrx_ts_in_tab_container'],$GLOBALS['wvrx_ts_tabs'],$GLOBALS['wvrx_ts_num_tabs']);
361
-
362
- return $add_style . $out;
363
- }
364
-
365
- function wvrx_ts_sc_tab( $args, $content ) {
366
- extract( shortcode_atts( array(
367
- 'title' => 'Tab %d'
368
- ), $args ) );
369
-
370
- if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
371
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
372
- }
373
- $cur = $GLOBALS['wvrx_ts_num_tabs'];
374
- $GLOBALS['wvrx_ts_tabs'][$cur] = array(
375
- 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
376
- 'content' => do_shortcode( $content ) );
377
- $GLOBALS['wvrx_ts_num_tabs']++;
378
- }
379
-
380
-
381
- // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
382
- function wvrx_ts_sc_youtube($args = '') {
383
- $share = '';
384
- if ( isset ( $args[0] ) )
385
- $share = trim($args[0]);
386
-
387
- // http://code.google.com/apis/youtube/player_parameters.html
388
- // not including: enablejsapi, fs,playerapiid,
389
-
390
- extract(shortcode_atts(array(
391
- 'id' => '',
392
- 'sd' => false,
393
- 'related' => '0',
394
- 'privacy' => false,
395
- 'ratio' => false,
396
- 'center' => '1',
397
- 'autohide' => '~!',
398
- 'autoplay' => '0',
399
- 'border' => '0',
400
- 'color' => false,
401
- 'color1' => false,
402
- 'color2' => false,
403
- 'controls' => '1',
404
- 'disablekb' => '0',
405
- 'egm' => '0',
406
- 'fs' => '1',
407
- 'fullscreen' => 1,
408
- 'hd' => '0',
409
- 'iv_load_policy' => '1',
410
- 'loop' => '0',
411
- 'modestbranding' => '0',
412
- 'origin' => false,
413
- 'percent' => 100,
414
- 'playlist' => false,
415
- 'rel' => '0',
416
- 'showinfo' => '1',
417
- 'showsearch' => '1',
418
- 'start' => false,
419
- 'theme' => 'dark',
420
- 'wmode' => 'transparent'
421
-
422
- ), $args));
423
-
424
- if (!$share && !$id)
425
- return __('<strong>No share or id values provided for youtube shortcode.</strong>','weaver-xtreme' /*adm*/);
426
-
427
- if ($share) { // let the share override any id
428
- $share = str_replace('youtu.be/','',$share);
429
- if (strpos($share,'youtube.com/watch') !== false) {
430
- $share = str_replace('www.youtube.com/watch?v=', '', $share);
431
- $share = str_replace('&amp;','+',$share);
432
- $share = str_replace('&','+',$share);
433
- }
434
- $share = str_replace('http://','',$share);
435
- $share = str_replace('https://','',$share);
436
- if ($share)
437
- $id = $share;
438
- }
439
-
440
- $opts = $id . '%%';
441
-
442
- $opts = wvrx_ts_add_url_opt($opts, $hd != '0', 'hd=1');
443
- $opts = wvrx_ts_add_url_opt($opts, $autohide != '~!', 'autohide='.$autohide);
444
- $opts = wvrx_ts_add_url_opt($opts, $autoplay != '0', 'autoplay=1');
445
- $opts = wvrx_ts_add_url_opt($opts, $border != '0', 'border=1');
446
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color='.$color);
447
- $opts = wvrx_ts_add_url_opt($opts, $color1, 'color1='.$color1);
448
- $opts = wvrx_ts_add_url_opt($opts, $color2, 'color2='.$color2);
449
- $opts = wvrx_ts_add_url_opt($opts, $controls != '1', 'controls=0');
450
- $opts = wvrx_ts_add_url_opt($opts, $disablekb != '0', 'disablekb=1');
451
- $opts = wvrx_ts_add_url_opt($opts, $egm != '0', 'egm=1');
452
- $opts = wvrx_ts_add_url_opt($opts, true, 'fs='.$fs);
453
- $opts = wvrx_ts_add_url_opt($opts, true, 'iv_load_policy='.$iv_load_policy);
454
- $opts = wvrx_ts_add_url_opt($opts, $loop != '0', 'loop=1');
455
- $opts = wvrx_ts_add_url_opt($opts, $modestbranding != '0', 'modestbranding=1');
456
- $opts = wvrx_ts_add_url_opt($opts, $origin, 'origin='.$origin);
457
- $opts = wvrx_ts_add_url_opt($opts, $playlist, 'playlist='.$playlist);
458
- $opts = wvrx_ts_add_url_opt($opts, true, 'rel='.$rel);
459
- $opts = wvrx_ts_add_url_opt($opts, true, 'showinfo=' . $showinfo);
460
- $opts = wvrx_ts_add_url_opt($opts, $showsearch != '1', 'showsearch=0');
461
- $opts = wvrx_ts_add_url_opt($opts, $start, 'start='.$start);
462
- $opts = wvrx_ts_add_url_opt($opts, $theme != 'dark', 'theme=light');
463
- $opts = wvrx_ts_add_url_opt($opts, $wmode, 'wmode='.$wmode);
464
-
465
- $url = '//';
466
-
467
- if ($privacy) $url .= 'www.youtube-nocookie.com';
468
- else $url .= 'www.youtube.com';
469
-
470
- $opts = str_replace('%%+','%%?', $opts);
471
- $opts = str_replace('%%','', $opts);
472
- $opts = str_replace('+','&amp;', $opts);
473
-
474
- $url .= '/embed/' . $opts;
475
-
476
-
477
- $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
478
-
479
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
480
- "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
481
- $cntr2 = '</div>';
482
- $h = 9; $w = 16;
483
- if ( $sd ) {
484
- $h = 3; $w = 4;
485
- }
486
-
487
- $ret ="\n" . $cntr1 . '<iframe src="' . $url
488
- . '" frameborder="0" width="'.$w.'" height="' . $h . '" frameborder="0" ' . $allowfull . '></iframe>'
489
- . $cntr2 . "\n";
490
-
491
- return $ret;
492
- }
493
-
494
- // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
495
- function wvrx_ts_sc_vimeo($args = '') {
496
- $share = '';
497
- if ( isset ( $args[0] ) )
498
- $share = trim($args[0]);
499
-
500
- extract(shortcode_atts(array(
501
- 'id' => '',
502
- 'sd' => false,
503
- 'color' => '',
504
- 'autoplay' => false,
505
- 'loop' => false,
506
- 'portrait' => true,
507
- 'title' => true,
508
- 'byline' => true,
509
- 'percent' => 100,
510
- 'center' => '1'
511
- ), $args));
512
-
513
- if (!$share && !$id) return __('<strong>No share or id values provided for vimeo shortcode.</strong>','weaver-xtreme' /*adm*/);
514
-
515
- if ($share) { // let the share override any id
516
- $share = str_replace('http://vimeo.com/','',$share);
517
- if ($share) $id = $share;
518
- }
519
-
520
- $opts = $id . '##';
521
-
522
- $opts = wvrx_ts_add_url_opt($opts, $autoplay, 'autoplay=1');
523
- $opts = wvrx_ts_add_url_opt($opts, $loop, 'loop=1');
524
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color=' . $color);
525
- $opts = wvrx_ts_add_url_opt($opts, !$portrait, 'portrait=0');
526
- $opts = wvrx_ts_add_url_opt($opts, !$title, 'title=0');
527
- $opts = wvrx_ts_add_url_opt($opts, !$byline, 'byline=0');
528
-
529
- $url = '//player.vimeo.com/video/';
530
-
531
- $opts = str_replace('##+','##?', $opts);
532
- $opts = str_replace('##','', $opts);
533
- $opts = str_replace('+','&amp;', $opts);
534
-
535
- $url .= $opts;
536
-
537
- if (function_exists('weaverii_use_mobile'))
538
- if (weaverii_use_mobile('mobile')) $percent = 100;
539
-
540
-
541
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
542
- "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
543
- $cntr2 = '</div>';
544
- $h = 9; $w = 16;
545
- if ( $sd ) {
546
- $h = 3; $w = 4;
547
- }
548
-
549
- $ret = "\n" . $cntr1 . '<iframe src="' . $url
550
- . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
551
- . $cntr2 . "\n";
552
-
553
- return $ret;
554
- }
555
-
556
- // ===== video utils =====
557
-
558
- function wvrx_ts_add_url_opt($opts, $add, $add_val) {
559
- if ($add) {
560
- $opts = $opts . '+' . $add_val;
561
- }
562
- return $opts;
563
- }
564
-
565
-
566
-
567
- function wvrx_ts_sc_html($vals = '') { // [html style='customstyle'] - all ======================
568
- $tag = 'span';
569
- if ( isset ( $vals[0] ) )
570
- $tag = trim( $vals[0]);
571
-
572
- extract(shortcode_atts(array(
573
- 'args' => ''
574
- ), $vals));
575
- if ($args) $args = ' ' . $args;
576
- return '<' . $tag . $args . '>';
577
- }
578
-
579
- function wvrx_ts_sc_div($vals = '',$text) { // [div] - all ===================
580
- extract(shortcode_atts(array(
581
- 'id' => '',
582
- 'class' => '',
583
- 'style' => ''
584
- ), $vals));
585
-
586
- $args = '';
587
- if ($id) $args .= ' id="' . $id . '"';
588
- if ($class) $args .= ' class="' . $class . '"';
589
- if ($style) $args .= ' style="' . $style . '"';
590
-
591
- return '<div' . $args . '>' . do_shortcode($text) . '</div>';
592
- }
593
-
594
- function wvrx_ts_sc_span($vals = '',$text) { // [span] - all ==================
595
- extract(shortcode_atts(array(
596
- 'id' => '',
597
- 'class' => '',
598
- 'style' => ''
599
- ), $vals));
600
-
601
- $args = '';
602
- if ($id) $args .= ' id="' . $id . '"';
603
- if ($class) $args .= ' class="' . $class . '"';
604
- if ($style) $args .= ' style="' . $style . '"';
605
-
606
- return '<span' . $args . '>' . do_shortcode($text) . '</span>';
607
- }
608
-
609
- function wvrx_ts_weaverx_sc_info() { // [info] ======================
610
- global $current_user;
611
- $out = __('<strong>Theme/User Info</strong><hr />','weaver-xtreme' /*adm*/);
612
-
613
- get_currentuserinfo();
614
- if (isset($current_user->display_name)) {
615
- $out .= __('<em>User:</em> ','weaver-xtreme' /*adm*/) . $current_user->display_name . '<br />';
616
- }
617
- $out .= '&nbsp;&nbsp;' . wp_register('','<br />',false);
618
- $out .= '&nbsp;&nbsp;' . wp_loginout('',false) . '<br />';
619
-
620
- $agent = __('Not Available','weaver-xtreme' /*adm*/);
621
- if (isset($_SERVER["HTTP_USER_AGENT"]) )
622
- $agent = $_SERVER['HTTP_USER_AGENT'];
623
- $out .= __('<em>User Agent</em>:','weaver-xtreme' /*adm*/) . ' <small>' . $agent . '</small>';
624
- $out .= '<div id="example"></div>
625
- <script type="text/javascript">
626
- var txt = "";
627
- var myWidth;
628
- if( typeof( window.innerWidth ) == "number" ) {
629
- //Non-IE
630
- myWidth = window.innerWidth;
631
- } else if( document.documentElement &&
632
- ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
633
- //IE 6+ in "standards compliant mode"
634
- myWidth = document.documentElement.clientWidth;
635
- } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
636
- //IE 4 compatible
637
- myWidth = document.body.clientWidth;
638
- }
639
- txt+= "<em>Browser Width: </em>" + myWidth + " px</br>";
640
- document.getElementById("example").innerHTML=txt;
641
- </script>';
642
-
643
- $out .= __('<em>Feed title:</em> ','weaver-xtreme' /*adm*/) . get_bloginfo_rss('name') . '<br />' . get_wp_title_rss();
644
-
645
- $out .= __('<br /><em>You are using</em> WordPress ','weaver-xtreme' /*adm*/) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
646
- $out .= __('<br /><em>Memory:</em> ','weaver-xtreme' /*adm*/) . round(memory_get_usage()/1024/1024,2) . 'M of ' . (int)ini_get('memory_limit') . 'M <hr />';
647
- return $out;
648
- }
649
-
650
-
651
- function wvrx_ts_set_shortcodes($sc_list, $prefix) {
652
- foreach ($sc_list as $sc_name => $sc_func) {
653
- remove_shortcode($prefix . $sc_name);
654
- add_shortcode($prefix . $sc_name,$sc_func);
655
- }
656
- }
657
-
658
- // =============== Utilities ======================
659
-
660
-
661
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/includes/wvrx-ts-widgets.php DELETED
@@ -1,169 +0,0 @@
1
- <?php
2
- /*
3
- * Weaver X Widgets and shortcodes - widgets
4
- */
5
-
6
- class WeaverX_Widget_Text extends WP_Widget {
7
-
8
- function WeaverX_Widget_Text() {
9
- $widget_ops = array('classname' => 'WeaverX_Widget_Text',
10
- 'description' => __('Text Widget with Two Columns - with HTML and shortcode support. Also adds shortcodes to standard Text widget.','weaver-xtreme' /*adm*/));
11
- $control_ops = array('width' => 400, 'height' => 350);
12
- $this->WP_Widget('wvrx2_text', __('Weaver X Text 2','weaver-xtreme' /*adm*/), $widget_ops, $control_ops);
13
- }
14
-
15
- function widget( $args, $instance ) {
16
- extract($args);
17
- $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
18
- $text = apply_filters( 'weaverx_text', $instance['text'], $instance );
19
- $text2 = apply_filters( 'weaverx_text', $instance['text2'], $instance );
20
- echo $before_widget;
21
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
22
- <div class="textwidget"><div style="float: left; width: 48%; padding-right: 2%;">
23
- <?php
24
- if ($instance['filter']) {
25
- echo(wpautop($text)); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
26
- echo(wpautop($text2)); echo('</div><div style="clear: both;"></div>');
27
- } else {
28
- echo($text); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
29
- echo($text2); echo('</div><div style="clear: both;"></div>');
30
- }
31
- ?>
32
- </div>
33
- <?php
34
- echo $after_widget;
35
- }
36
-
37
- function update( $new_instance, $old_instance ) {
38
- $instance = $old_instance;
39
- $instance['title'] = strip_tags($new_instance['title']);
40
- if ( current_user_can('unfiltered_html') ) {
41
- $instance['text'] = $new_instance['text'];
42
- $instance['text2'] = $new_instance['text2'];
43
- }
44
- else {
45
- $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
46
- $instance['text2'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text2']) ) );
47
- }
48
- $instance['filter'] = isset($new_instance['filter']);
49
- return $instance;
50
- }
51
-
52
- function form( $instance ) {
53
- $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'text2' => '', 'filter' => 0) );
54
- $title = strip_tags($instance['title']);
55
- $text = format_to_edit($instance['text']);
56
- $text2 = format_to_edit($instance['text2']);
57
- ?>
58
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title:' /*a*/ ); ?></label>
59
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
60
-
61
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
62
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text2'); ?>" name="<?php echo $this->get_field_name('text2'); ?>"><?php echo $text2; ?></textarea>
63
- <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> />
64
- &nbsp;<label for="<?php echo $this->get_field_id('filter'); ?>"><?php echo 'Automatically add paragraphs'; ?></label></p>
65
- <?php
66
- }
67
- }
68
-
69
- /**
70
- * Weaver X Per Page Text
71
- */
72
- class WeaverX_Widget_PPText extends WP_Widget {
73
-
74
- function WeaverX_Widget_PPText() {
75
- $widget_ops = array('classname' => 'wvrx_widget_pptext', 'description' =>
76
- __('Display text on a Per Page basis. Add to Widget area to see instructions.','weaver-xtreme' /*adm*/) );
77
- $this->WP_Widget('wvrx_pptext', __('Weaver X Per Page Text','weaver-xtreme' /*adm*/), $widget_ops);
78
- }
79
-
80
- function widget( $args, $instance ) {
81
- extract($args);
82
- $title = get_post_meta(get_the_ID(),'wvrx_ts_pp_title',true);
83
- $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
84
-
85
- if (empty($title) && empty($text))
86
- return;
87
-
88
- echo $before_widget;
89
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
90
- echo do_shortcode($text);
91
- echo $after_widget;
92
- }
93
-
94
- function update( $new_instance, $old_instance ) {
95
- $instance = $old_instance;
96
- $instance['title'] = strip_tags($new_instance['title']);
97
-
98
- return $instance;
99
- }
100
-
101
- function form( $instance ) {
102
- ?>
103
- <p><?php _e('This widget will work like a text widget, but the title and content are defined by custom
104
- fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>
105
- if you want a title, and define Custom Field <em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text,
106
- HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom
107
- fields are defined when that page is displayed. (This widget won\'t display on the default blog or other archive-like pages.)','weaver-xtreme' /*adm*/); ?><p>
108
- <?php
109
- }
110
- }
111
-
112
- /**
113
- * Weaver X login
114
- */
115
- class WeaverX_Widget_Login extends WP_Widget {
116
-
117
- function WeaverX_Widget_Login() {
118
- $widget_ops = array('classname' => 'wvrx_widget_login', 'description' => __( "Log in/out, admin", 'weaver-xtreme' /*adm*/ ) );
119
- $this->WP_Widget('wvrx_login', __('Weaver X Login','weaver-xtreme' /*adm*/), $widget_ops);
120
- }
121
-
122
- function widget( $args, $instance ) {
123
- extract($args);
124
- $title = apply_filters('widget_title', empty($instance['title']) ? __('Login', 'weaver-xtreme' /*adm*/ ) : $instance['title'], $instance, $this->id_base);
125
-
126
- echo $before_widget;
127
- if ( $title )
128
- echo $before_title . $title . $after_title;
129
- global $current_user;
130
- get_currentuserinfo();
131
- if (isset($current_user->display_name))
132
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaver-xtreme' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
133
- ?>
134
- <ul>
135
- <?php wp_register(); ?>
136
- <li><?php wp_loginout(); ?></li>
137
- </ul>
138
- <?php
139
- echo $after_widget;
140
- }
141
-
142
- function update( $new_instance, $old_instance ) {
143
- $instance = $old_instance;
144
- $instance['title'] = strip_tags($new_instance['title']);
145
-
146
- return $instance;
147
- }
148
-
149
- function form( $instance ) {
150
- $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
151
- $title = strip_tags($instance['title']);
152
- ?>
153
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','weaver-xtreme' /*adm*/); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
154
- <?php
155
- }
156
- }
157
-
158
-
159
- add_action("widgets_init", "wvrx_ts_load_widgets");
160
- add_filter('weaverx_text', 'do_shortcode');
161
- add_filter('widget_text', 'do_shortcode'); // add to standard text widget, too.
162
-
163
- function wvrx_ts_load_widgets() {
164
- register_widget("WeaverX_Widget_Text");
165
- register_widget("WeaverX_Widget_PPText");
166
- register_widget("WeaverX_Widget_Login");
167
- }
168
-
169
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/js/wvrx-ts-jslib.js DELETED
@@ -1,27 +0,0 @@
1
- /* *********************************************************************************
2
- * Weaver X Theme Support JavaScript support Library
3
- *
4
- * Author: WeaverTheme - www.weavertheme.com
5
- * @version 1.0
6
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
7
- * @author Bruce Wampler
8
- *
9
- * Notes - this library requires jQuery to be loaded
10
- * this library was cobbled together over a long period of time, so it contains a
11
- * bit of a jumble of straight JavaScript and jQuery calls. So it goes. It works.
12
- *
13
- *
14
- ************************************************************************************* */
15
-
16
-
17
- jQuery(document).ready(function($) { // self-defining function
18
- // Tabs
19
- $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
20
- $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
21
- .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
22
- });
23
- $('.wvr-tabs-pane').hide();
24
- $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
25
- $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
26
-
27
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/js/wvrx-ts-jslib.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(a){a(".wvr-tabs-nav").delegate("span:not(.wvr-tabs-current)","click",function(){a(this).addClass("wvr-tabs-current").siblings().removeClass("wvr-tabs-current").parents(".wvr-tabs").find(".wvr-tabs-pane").hide().eq(a(this).index()).show()});a(".wvr-tabs-pane").hide();a(".wvr-tabs-nav span:first-child").addClass("wvr-tabs-current");a(".wvr-tabs-panes .wvr-tabs-pane:first-child").show()});
 
3.2.1/1.1/readme.txt DELETED
@@ -1,140 +0,0 @@
1
- === Weaver Xtreme Theme Support ===
2
- Plugin Name: Weaver Xtreme Theme Support
3
- Plugin URI: http://weavertheme.com/plugins/
4
- Tags: weaver x theme, shortcodes, widgets
5
- Author URI: http://weavertheme.com/about/
6
- Contributors: wpweaver
7
- Author: wpweaver
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Requires at least: 3.9
11
- Tested up to: 4.2
12
- Stable tag: 1.1
13
-
14
- A useful shortcode and widget collection for Weaver Xtreme
15
-
16
- == Description ==
17
-
18
- This is the main theme suppot for the Weaver X Theme. This plugin provides a collection of useful shortcodes and widgets designed to complement the Weaver X theme. These shortcodes have been selected and developed based on requests and feedback from thousands of users of the Weaver X, Weaver II, and Aspen themes.
19
-
20
- While these shortcodes are optimized for the Weaver X theme, they will also work with full functionality for most WordPress themes, and can be used
21
- if you switch themes.
22
-
23
- Includes complete documentation help file. Instructions for using the shortcodes and widgets are in the help file. Use it for non-Weaver Xtreme themes.
24
-
25
- = Shortcodes included =
26
-
27
- * **[tab_group]** - Display content in a tabbed box.
28
- * **[youtube]** - Show your YouTube videos responsively, and with the capability to use any of the YouTube custom display options.
29
- * **[vimeo]** - Show your Vimeo videos responsively, and with the capability to use any of the Vimeo custom display options.
30
- * **[iframe]** - Quick and easy display of content in an iframe.
31
- * **[div]**, **[span]**, **[html]** - Add div, span, and other html to pages/posts without the need to switch to Text view.
32
- * **[hide/show_if]** - Show or hide content depending upon options: device, page ID, user capability, logged in status.
33
- * **[bloginfo]** - Display any information available from WordPress bloginfo function.
34
- * **[user_can]** - Display content base on logged in user role.
35
- * **[site_title]** - Display Site title.
36
- * **[site_tagline]** - Display Site tag line.
37
-
38
- = Widgets Included =
39
-
40
- * **Weaver X 2 Column Text Widget** - Add text into two columns in a widget
41
- * **Weaver X Per Page Text Widget** - Add a text widget on a per page basis
42
- * **Weaver X Login** - Simplified login widget
43
-
44
- = Licenses =
45
-
46
- * The Weaver X Theme Support plugin is licensed under the terms of the GNU GENERAL PUBLIC LICENSE, Version 2,
47
- June 1991. (GPL) The full text of the license is in the license.txt file.
48
- * All images included with this plugin are either original works of the author which
49
- have been placed into the public domain, or have been derived from other public domain sources,
50
- and thus need no license. (This does not include the images provided with any of the
51
- below listed scripts and libraries. Those images are covered by their respective licenses.)
52
-
53
- This plugin also includes several scripts and libraries that are covered under the terms
54
- of their own licenses in the listed files in the plugin distribution:
55
-
56
-
57
-
58
- == Installation ==
59
-
60
- It is easiest to use the Plugins : Add Plugin admin page, but you can do it manually, too:
61
-
62
- 1. Download the plugin archive and expand it
63
- 2. Upload all the plugin files and directories to your wp-content/plugins/weaverx-theme-support directory
64
- 3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for this plugin.
65
-
66
- == Frequently Asked Questions ==
67
-
68
- = Where can I get support for this plugin? =
69
-
70
- Support for this plugin can best be found at our forum - http://forum.weavertheme.com
71
-
72
- == Upgrade Notice ==
73
-
74
- This is the initial release of this plugin.
75
-
76
- == ChangeLog ==
77
- = 1.1 =
78
- * Fixed some wording (ATW Show Posts -> Weaver Show Posts)
79
- * Updated WP compatibility level
80
- * Added new per page multi-column
81
-
82
- = 1.0.4 =
83
- * Fix: minor styling issue
84
-
85
- = 1.0.3 =
86
- * Fix: extra " in [ youtube ]
87
-
88
- = 1.0.2 =
89
- * Fix: z-index rule for tab shortcode
90
-
91
- = 1.0.1 =
92
- * New - Per Page/Post Report from Add-ons menu
93
- * Fix: '\1234' values in per post style
94
- * Fix: Internal name of Per Post Style - may cause loss of prevoius setting - sorry
95
-
96
- = 1.0 =
97
- * Minor tweaks
98
- * wvrx_ shortcode prefix option
99
-
100
- = 0.96 =
101
- * Fixed bug with Per page options on Page with Posts
102
- * Internal optimizations
103
-
104
- = 0.95.1 =
105
- * Only load if Weaver Xtreme is the active theme.
106
-
107
- = 0.95 =
108
- * Changed [ site_title ] and [ site_tagline ] to match theme style as option
109
-
110
- = 0.10 =
111
- * Fixed per page options when used with old Xtreme Plus version
112
-
113
- = 0.9 =
114
- * Added Per Page and Per Post admin support to plugin (removed from Xtreme theme)
115
-
116
- = 0.8 =
117
- * Added [ box ]
118
-
119
- = 0.7 =
120
- * Fixes for [ show/hide_if]
121
- * Removed unused files
122
-
123
- = 0.6 =
124
- * Fixed [ show/hide_if ] for multiple conditions that include device
125
- * Changed interface to Weaver Xtreme - all codes now just in Weaver X Add-ons tab
126
-
127
- = 0.5 =
128
- * Added [ show/hide_if ], removed [ hide_mobie ], [show_if_logged_in]
129
- * Updated Doc
130
- * Added action for interface to Weaver Xtreme "Add-ons" tab
131
-
132
- = 0.4 =
133
- * Optimized loading of jslib - only needed by tab group, so not loaded until shortcode used
134
-
135
- = 0.3 =
136
- * Fixed video shortcodes
137
-
138
- = 0.1 =
139
-
140
- * initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/weaverx-ts-admin-style.css DELETED
@@ -1,133 +0,0 @@
1
- /* Weaver admin style */
2
- .hide_me {display:none;}
3
-
4
- .wvrx_ts_green {font-weight:bold;color:green;}
5
- .wvrx_ts_yellow {font-weight:bold;color:orange;}
6
- .wvrx_ts_red {font-weight:bold;color:red;}
7
-
8
- .wvr-help ul {list-style: disc; margin-left:30px;}
9
- .wvr-option-section {font-weight:bold;font-size:120%;color:blue;}
10
-
11
- .wvr-wrap {
12
- max-width:95%;
13
- }
14
-
15
- .tab ul {
16
- margin-left: 1.15em;
17
- list-style: disc outside none;
18
- }
19
- .tab ol {
20
- list-style-position:outside;
21
- margin-left: 1.4em;
22
- margin-bottom:.6em;
23
- }
24
-
25
- .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
26
-
27
- div.yetii {
28
- width: 95%;
29
- margin: 0 0 20px 0;
30
- }
31
-
32
- ul.yetii {
33
- list-style-type: none;
34
- width: 100%;
35
- float: left;
36
- border-bottom: 4px ridge #ddd;
37
- margin-bottom: 8px;
38
- }
39
-
40
- ul.yetii li {
41
- margin: 0 2px 0 0;
42
- float: left;
43
- }
44
-
45
- ul.yetii a {
46
- float: left;
47
- display: block;
48
- padding: 4px 8px;
49
- border: 1px solid #ddd;
50
- border-bottom: 0;
51
- color: #666;
52
- background: #eee;
53
- text-decoration: none;
54
- font-weight: bold;
55
- }
56
-
57
- ul.yetii a:hover {
58
- background: #fff;
59
- }
60
-
61
- ul.yetii a.active {
62
- background: #fff;
63
- border-color: #00c;
64
- color: #00f;
65
- }
66
- /* -- */
67
- div.yetiisub {
68
- width: 100%;
69
- margin: 0 0 20px 0;
70
- }
71
-
72
- ul.yetiisub {
73
- list-style-type: none;
74
- width: 100%;
75
- float: left;
76
- margin-bottom: 8px;
77
- }
78
-
79
- ul.yetiisub li {
80
- margin: 0 2px 2px 0px;
81
- float: left;
82
- }
83
-
84
- ul.yetiisub a {
85
- float: left;
86
- padding: 4px 8px;
87
- border: 1px solid #ccc;
88
- color: #666;
89
- background: #f0f0f0;
90
- text-decoration: none;
91
- font-style: italic;
92
- font-weight: bold;
93
- }
94
-
95
- ul.yetiisub a:hover {
96
- background: #fefefe !important;
97
- }
98
-
99
- ul.yetiisub a.active {
100
- background: #fff;
101
- border-color: #00c;
102
- color: #00f;
103
- }
104
- .wvr-small-submit {
105
- padding: 1.0em 0;
106
- margin: 1px 0;
107
- font-size:90%;
108
- }
109
-
110
- .wvr-option-header {background:#D0D0D8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px;}
111
- .wvr-option-subheader {background:#EAEAEA;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px;}
112
- .wvr-row-header {background:#D0D0D8;line-height:1.8em;padding-left:4px;}
113
- .wvr-row-subheader {background:#EAEAEA;padding-left:4px;}
114
- .wvr-row-subheader-alt {background:#F4F4F4;padding-left:4px;}
115
- /* layouts for layout boxes */
116
- .l_layout {display:block; width:140px; height:110px; float:left; margin-right:10px; margin-bottom:10px; display:inline;border:1px solid #888; color:black;text-align:center;font:15px arial,sans-serif;}
117
- .l_layout span {display:block;}
118
- .l_header {width:140px; height:20px; background:#CCF; line-height:20px;}
119
- .l_content {width:100px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
120
- .l_contentcenter {width:60px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
121
- .l_content2 {width:80px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
122
- .l_contentw {width:140px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
123
- .l_stdbar {width:40px; height:70px; float:left; display:inline;}
124
- .l_widebar {width:60px; height:70px; float:left; display:inline;}
125
- .l_righttop {width:40px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
126
- .l_righttopwide {width:60px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
127
- .l_rightup {width:40px; height:25px; margin:0; background:#FAA; float:left; display:inline; line-height:25px;}
128
- .l_rightright {width:40px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
129
- .l_rightdown {width:40px; height:25px; margin:0; background:#AFA; float:left; display:inline; line-height:25px;}
130
- .l_leftleft {width:40px; height:70px; margin:0; background:#AFA; float:left; display:inline; line-height:70px;}
131
- .l_leftshort {width:30px; height:50px; margin:0; background:#AFA; float:left; display:inline; line-height:50px;}
132
- .l_skinny {width:30px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
133
- .l_footer {clear:left;width:140px; height:20px; background:#DDF; color:#000; line-height:20px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/weaverx-ts-admin-style.min.css DELETED
@@ -1,4 +0,0 @@
1
- .hide_me{display:none}.wvrx_ts_green{font-weight:bold;color:green}.wvrx_ts_yellow{font-weight:bold;color:orange}.wvrx_ts_red{font-weight:bold;color:red}.wvr-help ul{list-style:disc;margin-left:30px}.wvr-option-section{font-weight:bold;font-size:120%;color:blue}.wvr-wrap{max-width:95%}.tab ul{margin-left:1.15em;list-style:disc outside none}.tab ol{list-style-position:outside;margin-left:1.4em;margin-bottom:.6em}.js_button{background:#eee!important;font-weight:600!important;color:#585858!important}div.yetii{width:95%;margin:0 0 20px 0}ul.yetii{list-style-type:none;width:100%;float:left;border-bottom:4px ridge #ddd;margin-bottom:8px}ul.yetii li{margin:0 2px 0 0;float:left}ul.yetii a{float:left;display:block;padding:4px 8px;border:1px solid #ddd;border-bottom:0;color:#666;background:#eee;text-decoration:none;font-weight:bold}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;border-color:#00c;color:#00f}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}
2
- ul.yetiisub li{margin:0 2px 2px 0;float:left}ul.yetiisub a{float:left;padding:4px 8px;border:1px solid #ccc;color:#666;background:#f0f0f0;text-decoration:none;font-style:italic;font-weight:bold}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;border-color:#00c;color:#00f}.wvr-small-submit{padding:1.0em 0;margin:1px 0;font-size:90%}.wvr-option-header{background:#d0d0d8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px}.wvr-option-subheader{background:#eaeaea;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px}.wvr-row-header{background:#d0d0d8;line-height:1.8em;padding-left:4px}.wvr-row-subheader{background:#eaeaea;padding-left:4px}.wvr-row-subheader-alt{background:#f4f4f4;padding-left:4px}.l_layout{display:block;width:140px;height:110px;float:left;margin-right:10px;margin-bottom:10px;display:inline;border:1px solid #888;color:black;text-align:center;font:15px arial,sans-serif}
3
- .l_layout span{display:block}.l_header{width:140px;height:20px;background:#CCF;line-height:20px}.l_content{width:100px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentcenter{width:60px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_content2{width:80px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentw{width:140px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_stdbar{width:40px;height:70px;float:left;display:inline}.l_widebar{width:60px;height:70px;float:left;display:inline}.l_righttop{width:40px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_righttopwide{width:60px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_rightup{width:40px;height:25px;margin:0;background:#FAA;float:left;display:inline;line-height:25px}.l_rightright{width:40px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}
4
- .l_rightdown{width:40px;height:25px;margin:0;background:#AFA;float:left;display:inline;line-height:25px}.l_leftleft{width:40px;height:70px;margin:0;background:#AFA;float:left;display:inline;line-height:70px}.l_leftshort{width:30px;height:50px;margin:0;background:#AFA;float:left;display:inline;line-height:50px}.l_skinny{width:30px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}.l_footer{clear:left;width:140px;height:20px;background:#DDF;color:#000;line-height:20px}
 
 
 
 
3.2.1/1.1/weaverx-ts-style.css DELETED
@@ -1,108 +0,0 @@
1
- /*
2
- Style file for Weaver X Theme Support
3
-
4
- License: GPL
5
-
6
- Weaver X Theme Support
7
- Copyright (C) 2014-2015 Bruce E. Wampler - weaver@weavertheme.com
8
-
9
- This program is free software: you can redistribute it and/or modify
10
- it under the terms of the GNU General Public License as published by
11
- the Free Software Foundation, either version 3 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
-
19
- You should have received a copy of the GNU General Public License
20
- along with this program. If not, see <http://www.gnu.org/licenses/>.
21
-
22
- PLEASE - DO NOT EDIT THIS FILE
23
-
24
- If you MUST change the CSS for these shortcodes and widgets, use the
25
- Custom CSS features of Weaver X, or use a custom CSS plugin
26
- such as JetPack, which let you add CSS to your theme or plugins
27
- without modifying theme or plugin .css files.
28
- */
29
-
30
- /* rules for areas hidden in various hybrid "desktop" views */
31
-
32
- @media screen and (min-width:768px) { /* rules for desk top */
33
- .wvr-hide-desktop {display:none !important;}
34
- .wvr-hide-all {display:none !important;}
35
- .wvr-show-phone {display:none !important;}
36
- .wvr-show-mobile {display:none !important;}
37
- .wvr-show-smalltablet {display:none !important;}
38
- }
39
-
40
- @media screen and (min-width:581px) and (max-width:767px) { /* rules for small tablets */
41
- .wvr-hide-smalltablet {display:none !important;}
42
- .wvr-hide-mobile {display:none !important;}
43
- .wvr-hide-all {display:none !important;}
44
- .wvr-show-desktop {display:none !important;}
45
- .wvr-show-phone {display:none !important;}
46
- }
47
-
48
- @media screen and (max-width:580px) { /* rules for phones */
49
- .wvr-hide-phone {display:none !important;}
50
- .wvr-hide-mobile {display:none !important;}
51
- .wvr-hide-all {display:none !important;}
52
- .wvr-show-desktop {display:none !important;}
53
- .wvr-show-smalltablet {display:none !important;}
54
- }
55
-
56
- /* Tabs */
57
- .wvr-tabs {
58
- -webkit-box-sizing: border-box;
59
- -moz-box-sizing: border-box;
60
- box-sizing: border-box;
61
- margin: 0 0 1.5em 0;
62
- background:transparent;
63
- }
64
-
65
- .wvr-tabs-style .wvr-tabs-nav { /* top "bar" behind tabs */
66
- padding: 0px 20px 0px 0px;
67
- margin: 0;
68
- height: 32px;
69
- background-color: transparent;
70
- }
71
- .wvr-tabs-style .wvr-tabs-nav span { /* bg color of a tab */
72
- display: block;
73
- float: left;
74
- padding: 0 20px;
75
- height: 32px;
76
- line-height: 32px;
77
- margin-right: 5px;
78
- cursor: pointer;
79
- border-top: 1px solid #888; /* border-color */
80
- border-right: 1px solid #888;
81
- border-left: 1px solid #888;
82
- background: #ccc; /* tab-bg */
83
- border-top-left-radius:6px;
84
- border-top-right-radius:6px;
85
- position:relative;
86
- z-index:1;
87
- }
88
-
89
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current {
90
- position:relative;
91
- z-index:3;
92
- }
93
-
94
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
95
- .wvr-tabs-style .wvr-tabs-nav span:hover {
96
- background: #eee; /* tab-current-color */
97
- }
98
-
99
- .wvr-tabs-style .wvr-tabs-pane {
100
- padding: 15px;
101
- border: 1px solid #888; /* border-color */
102
- min-height:20px; /* pane-min-height */
103
- background-color:transparent; /* pane-bg */
104
- position:relative;
105
- z-index:2;
106
- }
107
-
108
- .wvr-tabs-panes {position:relative;z-index:2;} /* add line to tab */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.1/weaverx-ts-style.min.css DELETED
@@ -1,2 +0,0 @@
1
- @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px;position:relative;z-index:1}
2
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current{position:relative;z-index:3}.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent;position:relative;z-index:2}.wvr-tabs-panes{position:relative;z-index:2}
 
 
3.2.1/1.1/weaverx-ts.php DELETED
@@ -1,396 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Weaver Xtreme Theme Support
4
- Plugin URI: http://weavertheme.com/plugins
5
- Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
- Author: wpweaver
7
- Author URI: http://weavertheme.com/about/
8
- Version: 1.1
9
- License: GPL V3
10
-
11
- Weaver Xtreme Theme Support
12
-
13
- Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
-
30
- /* CORE FUNCTIONS
31
- */
32
- $theme = get_template_directory();
33
-
34
- if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
35
-
36
- define ('WVRX_TS_VERSION','1.0.3');
37
- define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
- define ('WVRX_TS_APPEARANCE_PAGE', false );
39
-
40
- function wvrx_ts_installed() {
41
- return true;
42
- }
43
-
44
-
45
- function wvrx_ts_plugins_url($file,$ext) {
46
- return plugins_url($file,__FILE__) . $ext;
47
- }
48
-
49
- function wvrx_ts_enqueue_scripts() { // action definition
50
-
51
- if (function_exists('wvrx_ts_slider_header')) wvrx_ts_slider_header();
52
-
53
- //-- Weaver X PLus js lib - requires jQuery...
54
-
55
- // put the enqueue script in the tabs shortcode where it belongs
56
-
57
- //wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION);
58
-
59
-
60
- // add plugin CSS here, too.
61
-
62
- wp_register_style('wvrx-ts-style-sheet',wvrx_ts_plugins_url('weaverx-ts-style', WVRX_TS_MINIFY.'.css'),null,WVRX_TS_VERSION,'all');
63
- wp_enqueue_style('wvrx-ts-style-sheet');
64
- }
65
-
66
- add_action('wp_enqueue_scripts', 'wvrx_ts_enqueue_scripts' );
67
-
68
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
69
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
70
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
71
-
72
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
73
-
74
- add_action('admin_menu', 'wvrx_ts_add_page_fields',11); // allow X-Plus to override us
75
-
76
- function wvrx_ts_add_page_fields() {
77
- add_meta_box('page-box', __('Weaver Xtreme Options For This Page (Theme Support Per Page Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_page_extras_load', 'page', 'normal', 'high');
78
- add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
79
- global $post;
80
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
81
- if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') ) {
82
- $i = 1;
83
- $args=array( 'public' => true, '_builtin' => false );
84
- $post_types = get_post_types($args,'names','and');
85
- foreach ($post_types as $post_type ) {
86
- add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras', $post_type, 'normal', 'high');
87
- $i++;
88
- }
89
- }
90
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin - needs to be here
91
-
92
- }
93
-
94
- function wvrx_ts_page_extras_load() {
95
- wvrx_ts_page_extras();
96
- }
97
-
98
- function wvrx_ts_post_extras_load() {
99
- wvrx_ts_post_extras();
100
- }
101
- }
102
-
103
- // ======================================== subthemes ========================================
104
- add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_action');
105
-
106
- function wvrx_ts_child_show_extrathemes_action() {
107
- echo '<h3 class="atw-option-subheader">' . __('Select an Add-on Subtheme You Have Uploaded','weaver-xtreme' /*adm*/) . '</h3>';
108
- $addon_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/';
109
- $addon_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes/addon-subthemes/';
110
-
111
- $addon_list = array();
112
- if($media_dir = @opendir($addon_dir)) { // build the list of themes from directory
113
- while ($m_file = readdir($media_dir)) {
114
- $len = strlen($m_file);
115
- $base = substr($m_file,0,$len-4);
116
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
117
- if($ext == '.wxt' ) {
118
- $addon_list[] = $base;
119
- }
120
- }
121
- }
122
-
123
- if (!empty($addon_list)) {
124
- natcasesort($addon_list);
125
-
126
- $cur_addon = weaverx_getopt('wvrx_addon_name');
127
- if ($cur_addon)
128
- echo '<h3>' . __('Currently selected Add-on Subtheme: ','weaver-xtreme' /*adm*/) . ucwords(str_replace('-',' ',$cur_addon)) . '</h3>';
129
- ?>
130
- <form enctype="multipart/form-data" name='pick_added_theme' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
131
-
132
- <h4><?php _e('Select an add-on subtheme:','weaver-xtreme' /*adm*/); ?></h4>
133
-
134
- <?php
135
- foreach ($addon_list as $addon) {
136
- $name = ucwords(str_replace('-',' ',$addon));
137
- ?>
138
- <div style="float:left; width:200px;">
139
- <label><input type="radio" name="wvrx_addon_name"
140
- <?php echo 'value="' . $addon . '"' . (weaverx_getopt('wvrx_addon_name') == $addon ? 'checked' : '') .
141
- '/> <strong>' . $name . '</strong><br />
142
- <img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . $addon_url . $addon . '.jpg" width="150px" height="113px" /><label></div>' . "\n";
143
- }
144
- ?>
145
- <div style="clear:both;"></div>
146
- <br /><span class='submit'><input name="set_added_subtheme" type="submit" value="<?php _e('Set to Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span>
147
- <small style="color:#b00;"><br /><?php _e('<strong>Note:</strong> Selecting a new subtheme will change only theme related settings.
148
- Options labelled with (&diams;) will be retained.
149
- You can use the Save/Restore tab to save a copy of all your current settings first.','weaver-xtreme' /*adm*/); ?></small>
150
-
151
- <?php weaverx_nonce_field('set_added_subtheme'); ?>
152
-
153
- <br /><br /><span class='atw-small-submit' style="margin-left:100px;"><input name="delete_added_subtheme" type="submit" value="<?php _e('Delete Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span> &nbsp;
154
- <small><?php _e('This will delete the selected Add-on Subtheme from the Add-on directory','weaver-xtreme' /*adm*/); ?></small>
155
- <?php weaverx_nonce_field('delete_added_subtheme'); ?>
156
- </form>
157
- <?php
158
- } else {
159
- ?>
160
- <p><?php _e('No Add-on Subthemes available.','weaver-xtreme' /*adm*/); ?></p>
161
- <?php
162
- }
163
- echo '<h3 class="atw-option-subheader">Upload an Add-on Subtheme From Your Computer</h3>';
164
- ?>
165
- <p><?php _e('You can find additional free and premium Add-on Subthemes for <em>Weaver Xtreme</em>','weaver-xtreme' /*adm*/); ?>
166
- <a href="http://xtreme.weavertheme.com/add-on-subthemes/" title="<?php _e('Weaver Xtreme Add-on Subthemes','weaver-xtreme' /*adm*/); ?>"><strong><?php _e('HERE','weaver-xtreme' /*adm*/); ?></strong></a>.</p>
167
- <form name='form_added_theme' enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
168
- <table>
169
- <tr valign="top">
170
- <td><strong><?php _e('Select Add-on Subtheme .zip file to upload:','weaver-xtreme' /*adm*/); ?></strong>
171
- <input name="uploaded_addon" type="file" />
172
- <input type="hidden" name="uploadaddon" value="yes" />
173
- </td>
174
- </tr>
175
- <tr><td>
176
- <span style="margin-left:50px;" class='submit'>
177
- <input name="upload_addon" type="submit" value="Upload Add-on Subtheme" /><br />
178
- </span>&nbsp;<small><?php _e('<strong>Upload and Save</strong> an Add-on Subtheme or Subtheme collection from .zip file on your computer. Will be saved on your site\'s filesystem.','weaver-xtreme' /*adm*/); ?></small>
179
- </td></tr>
180
- </table>
181
- <?php weaverx_nonce_field('upload_addon'); ?>
182
- </form>
183
-
184
- <?php
185
- }
186
-
187
- add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
188
- function wvrx_ts_child_process_options() {
189
-
190
- if (weaverx_submitted('set_added_subtheme') ) { // Set to selected addon - theme
191
- if (isset($_POST['wvrx_addon_name']))
192
- {
193
- $name = $_POST['wvrx_addon_name'];
194
-
195
- $openname = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt';
196
- $contents = file_get_contents($openname);
197
-
198
- if (!weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname)) {
199
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
200
- __('Sorry, there was a problem uploading your add on theme. The name you picked did not have a valid
201
- Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','weaver-xtreme' /*adm*/) . '</em></strong></p></div>';
202
- } else {
203
- weaverx_save_msg(__('Weaver Xtreme theme reset to ','weaver-xtreme' /*adm*/) .
204
- ucwords(str_replace('-',' ',$name )) . ' add-on subtheme.');
205
- weaverx_setopt('wvrx_addon_name',$name);
206
- }
207
- }
208
- }
209
-
210
- else if (weaverx_submitted('delete_added_subtheme') ) { // Delete selected addon theme
211
- if (isset($_POST['wvrx_addon_name']))
212
- {
213
- $name = $_POST['wvrx_addon_name'];
214
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt');
215
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.jpg');
216
- weaverx_save_msg(__('Deleted ','weaver-xtreme' /*adm*/) .
217
- ucwords(str_replace('-',' ',$name )) . __(' add-on subtheme.','weaver-xtreme' /*adm*/));
218
- }
219
- }
220
-
221
- else if (weaverx_submitted('upload_addon')
222
- && isset($_POST['uploadaddon'])
223
- && $_POST['uploadaddon'] == 'yes') {
224
- // upload theme from users computer
225
- // they've supplied and uploaded a file
226
- $ok = wvrx_ts_wunpackzip('uploaded_addon', weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/');
227
- }
228
-
229
- else if ( weaverx_submitted('toggle_shortcode_prefix') ) {
230
- $val = get_option('wvrx_toggle_shortcode_prefix');
231
- if ( $val ) {
232
- delete_option('wvrx_toggle_shortcode_prefix');
233
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes NOT prefixed with 'wvrx_'", 'weaver-xtreme'));
234
- } else {
235
- update_option('wvrx_toggle_shortcode_prefix', 'wvrx_');
236
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme'));
237
- }
238
- } else if ( weaverx_submitted('show_per_page_report')) {
239
- wvrx_ts_per_page_report();
240
- }
241
-
242
- }
243
-
244
- function wvrx_ts_wunpackzip($uploaded, $to_dir) {
245
- // upload theme from users computer
246
- // they've supplied and uploaded a file
247
- // This version and the one in Aspen Plus must be identical...
248
-
249
- $ok = true; // no errors so far
250
-
251
- if (isset($_FILES[$uploaded]['name'])) // uploaded_addon
252
- $filename = $_FILES[$uploaded]['name'];
253
- else
254
- $filename = "";
255
-
256
- if (isset($_FILES[$uploaded]['tmp_name'])) {
257
- $openname = $_FILES[$uploaded]['tmp_name'];
258
- } else {
259
- $openname = "";
260
- }
261
-
262
- //Check the file extension
263
- $check_file = strtolower($filename);
264
- $per = '.';
265
- $end = explode($per, $check_file); // workaround for PHP strict standards warning
266
- $ext_check = end($end);
267
-
268
- if (false && !weaverx_f_file_access_available()) {
269
- $errors[] = __('Sorry - Theme unable to access files.','weaver-xtreme' /*adm*/) . '<br />';
270
- $ok = false;
271
- }
272
-
273
- if ($filename == "") {
274
- $errors[] = __('You didn\'t select a file to upload.','weaver-xtreme' /*adm*/) . '<br />';
275
- $ok = false;
276
- }
277
-
278
- if ($ok && $ext_check != 'zip'){
279
- $errors[] = __("Uploaded files must have <em>.zip</em> extension.",'weaver-xtreme' /*adm*/) . "<br />";
280
- $ok = false;
281
- }
282
-
283
- if ($ok) {
284
- if (!weaverx_f_exists($openname)) {
285
- $errors[] = '<strong><em style="color:red;">' .
286
- __('Sorry, there was a problem uploading your file. You may need to check your folder permissions
287
- or other server settings.','weaver-xtreme' /*adm*/) . '</em></strong><br />' . __('Trying to use file','weaver-xtreme' /*adm*/) . "'$openname'";
288
- $ok = false;
289
- }
290
- }
291
-
292
- if ($ok) {
293
- // should be ready to go, but check out WP_Filesystem
294
- if (! WP_Filesystem()) {
295
- function wvrx_ts_wvx_return_direct() { return 'direct'; }
296
- add_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
297
- $try2 = WP_Filesystem();
298
- remove_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
299
- if (!$try2) {
300
- $errors[] = __('Sorry, there\'s a problem trying to use the WordPress unzip function. Please
301
- see the FAQ at weavertheme.com support for more information.','weaver-xtreme' /*adm*/);
302
- $ok = false;
303
- }
304
- }
305
- }
306
- if ($ok) {
307
- // $openname has uploaded .zip file to use
308
- // $filename has name of file uploaded
309
- $is_error = unzip_file( $openname, $to_dir );
310
- if ( !is_wp_error( $is_error ) ) {
311
- weaverx_save_msg(__('File ','weaver-xtreme' /*adm*/) . $filename . __(' successfully uploaded and unpacked to: <br />','weaver-xtreme' /*adm*/) . $to_dir);
312
- @unlink($openname); // delete temp file...
313
- } else {
314
- $errors[] = __("Sorry, unpacking the .zip you selected file failed. You may have a corrupt .zip file, or there many a file permissions problem on your WordPress installation.",'weaver-xtreme' /*adm*/);
315
- $errors[] = $is_error->get_error_message();
316
- $ok = false;
317
- }
318
- }
319
- if (!$ok) {
320
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' . __('ERROR','weaver-xtreme' /*adm*/) . '</em></strong></p><p>';
321
- foreach($errors as $error){
322
- echo $error.'<br />';
323
- }
324
- echo '</p></div>';
325
- }
326
- return $ok;
327
- }
328
-
329
- add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
330
- function wvrx_ts_child_saverestore_action() {
331
- echo '<h3 class="atw-option-subheader" style="font-style:italic">' . __('Use the <em>Weaver Xtreme Subthemes</em>
332
- tab to upload Add-on Subthemes.</h3><p>You can upload extra add-on subthemes you\'ve downloaded using the
333
- Subthemes tab. Note: the Save and Restore options on this page are for the custom settings you
334
- have created. These save/restore options are not related to Add-on Subthemes, although you can
335
- modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
336
- }
337
-
338
- // --------------------------------------
339
- function wvrx_ts_per_page_report() {
340
- echo '<div style="border:1px solid black; padding:1em;background:#F8FFCC;width:70%;margin:1em auto 1em auto;">';
341
- echo "<h2>" . __('Show Pages and Posts with Per Page / Per Post Settings','weaverx-axtreme') . "</h2>\n";
342
- echo "<h3>" . __('Posts','weaverx-axtreme') . "</h3>\n";
343
- wvrx_ts_scan_section('post');
344
- echo "<h3>" . __('Pages','weaverx-axtreme') . "</h3>\n";
345
- wvrx_ts_scan_section('page');
346
- echo "</div>\n";
347
- }
348
-
349
- function wvrx_ts_scan_section($what) {
350
-
351
- $post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
352
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
353
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
354
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
355
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
356
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
357
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
358
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
359
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
360
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
361
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
362
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
363
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
364
- );
365
-
366
- $args = array('posts_per_page' => -1, 'post_type' => $what, 'post_status' => 'any' );
367
- echo '<ul>';
368
-
369
- $allposts = get_posts($args);
370
- foreach ($allposts as $post) {
371
- $id = $post->ID;
372
- setup_postdata($post);
373
- $meta = get_post_meta( $id );
374
- if (!empty($meta)) {
375
- $type = $post->post_type;
376
- $title = esc_html($post->post_title);
377
- $link = esc_url(get_permalink($id));
378
- $tlink = "<a href='{$link}' alt='Post {$id}' target='_blank'>{$title}</a>";
379
- $heading = false;
380
- foreach ($meta as $name => $val_array) { // old value gets put into $val_array[0]
381
- if (in_array($name, $post_fields) ) {
382
- $val = $val_array[0]; // easier to work with
383
- if ($type == 'page') {
384
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Page settings.','weaverx-axtreme') . "</li>\n";
385
- } else {
386
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Post settings.','weaverx-axtreme') . "</li>\n";
387
- }
388
- break;
389
- }
390
- }
391
- }
392
- }
393
- echo '</ul>';
394
- }
395
- }
396
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/help/help.html DELETED
@@ -1,584 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <title>Weaver X Theme Support</title>
6
- <style type="text/css">
7
- body {
8
- background: #eeeeee;
9
- margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
10
- padding: 10px; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
11
- color: #000000;
12
- text-align: left;
13
- font-family: Verdana, Arial, Helvetica, sans-serif;
14
- font-size: 10pt;
15
- background-color: #ffd;
16
- }
17
-
18
- /* everything about each major block on the site - may be mods in some places */
19
-
20
- #container {
21
- max-width:800px;
22
- background-color: #00CC00;
23
- }
24
- #mainContent {
25
- background-color: #ffc;
26
- }
27
- .oneColFixCtr #container {
28
- max-width: 750px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
29
- background: #FFFFCD;
30
- margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
31
- border: 1px solid #000000;
32
- text-align: left; /* this overrides the text-align: center on the body element. */
33
- }
34
- .oneColFixCtr #mainContent {
35
- padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
36
- font-size:12px;
37
- }
38
- /* layouts for layout boxes */
39
- .layoutbox {
40
- width:700px;
41
- text-align:center;
42
- margin:0 25px;
43
- }
44
- .l_layout {
45
- display:block;
46
- width:140px;
47
- height:110px;
48
- float:left;
49
- margin-right:10px;
50
- margin-bottom:10px;
51
- display:inline;
52
- border:1px solid #888;
53
- color:black;
54
- text-align:center;
55
- font:15px arial, sans-serif;
56
- }
57
- .l_layout span {
58
- display:block;
59
- }
60
- .l_header {
61
- width:140px;
62
- height:20px;
63
- background:#CCF;
64
- line-height:20px;
65
- }
66
- .l_content {
67
- width:100px;
68
- height:70px;
69
- background:beige;
70
- float:left;
71
- display:inline;
72
- line-height:70px;
73
- }
74
- .l_contentcenter {
75
- width:60px;
76
- height:70px;
77
- background:beige;
78
- float:left;
79
- display:inline;
80
- line-height:70px;
81
- }
82
- .l_content2 {
83
- width:80px;
84
- height:70px;
85
- background:beige;
86
- float:left;
87
- display:inline;
88
- line-height:70px;
89
- }
90
- .l_contentw {
91
- width:140px;
92
- height:70px;
93
- background:beige;
94
- float:left;
95
- display:inline;
96
- line-height:70px;
97
- }
98
- .l_stdbar {
99
- width:40px;
100
- height:70px;
101
- float:left;
102
- display:inline;
103
- }
104
- .l_widebar {
105
- width:60px;
106
- height:70px;
107
- float:left;
108
- display:inline;
109
- }
110
- .l_righttop {
111
- width:40px;
112
- height:20px;
113
- background:#FE8;
114
- float:left;
115
- display:inline;
116
- line-height:20px;
117
- }
118
- .l_righttopwide {
119
- width:60px;
120
- height:20px;
121
- background:#FE8;
122
- float:left;
123
- display:inline;
124
- line-height:20px;
125
- }
126
- .l_rightup {
127
- width:40px;
128
- height:25px;
129
- margin:0;
130
- background:#FAA;
131
- float:left;
132
- display:inline;
133
- line-height:25px;
134
- }
135
- .l_rightright {
136
- width:40px;
137
- height:50px;
138
- margin:0;
139
- background:#FAA;
140
- float:left;
141
- display:inline;
142
- line-height:50px;
143
- }
144
- .l_rightdown {
145
- width:40px;
146
- height:25px;
147
- margin:0;
148
- background:#AFA;
149
- float:left;
150
- display:inline;
151
- line-height:25px;
152
- }
153
- .l_leftleft {
154
- width:40px;
155
- height:70px;
156
- margin:0;
157
- background:#AFA;
158
- float:left;
159
- display:inline;
160
- line-height:70px;
161
- }
162
- .l_leftshort {
163
- width:30px;
164
- height:50px;
165
- margin:0;
166
- background:#AFA;
167
- float:left;
168
- display:inline;
169
- line-height:50px;
170
- }
171
- .l_skinny {
172
- width:30px;
173
- height:50px;
174
- margin:0;
175
- background:#FAA;
176
- float:left;
177
- display:inline;
178
- line-height:50px;
179
- }
180
- .l_footer {
181
- clear:left;
182
- width:140px;
183
- height:20px;
184
- background:#DDF;
185
- color:#000;
186
- line-height:20px;
187
- }
188
- h4 {
189
- font-weight: bold;
190
- font-style:italic;
191
- color: #000066;
192
- text-decoration: underline;
193
- }
194
- h3 {
195
- font-size: medium;
196
- font-weight: bold;
197
- color: #000066;
198
- text-decoration: underline;
199
- }
200
- h2 {
201
- font-size: large;
202
- font-weight: bold;
203
- color: #000066;
204
- text-decoration: underline;
205
- margin-top: 40pt;
206
- }
207
- h1 {
208
- font-size: x-large;
209
- font-weight: bold;
210
- color: #000066;
211
- text-decoration: underline;
212
- }
213
- .codebox {
214
- font-family: "Courier New", Courier, monospace;
215
- font-size: 10px;
216
- font-style: normal;
217
- background-color: #E8E8E8;
218
- margin: 10px;
219
- padding: 4px;
220
- border: 1px solid #333333;
221
- color: #000000;
222
- width: 80%;
223
- }
224
- .attrs {
225
- font-family: Arial, Helvetica, sans-serif;
226
- font-size: 10pt;
227
- color:#000000;
228
- text-decoration: none;
229
- }
230
- .css {
231
- font-family: "Courier New", Courier, monospace;
232
- font-size: 9pt;
233
- font-style: normal;
234
- }
235
- .box {
236
- color: #000000;
237
- text-decoration: none;
238
- margin: 5px;
239
- padding: 5px;
240
- border: thin solid #000000;
241
- }
242
- .nospace {
243
- margin-top: 5px;
244
- margin-bottom: 5px;
245
- }
246
- .style3 {
247
- font-family: "Courier New", Courier, monospace
248
- }
249
- .style4 {
250
- font-family: monospace
251
- }
252
- .style6 {
253
- color: #990000;
254
- font-style: italic;
255
- }
256
- .style7 {
257
- color: #CC3300;
258
- font-weight: bold;
259
- }
260
- .code1 {
261
- font-family: "Courier New", Courier, monospace;
262
- font-size: 14px;
263
- font-style: italic;
264
- }
265
- .red-highlight {
266
- color: #CC3300;
267
- }
268
- </style>
269
- </head>
270
- <body class="oneColFixCtr">
271
- <div id="container">
272
- <div id="mainContent"> <a name="top" id="top"></a>
273
- <h2><b>Weaver X Theme Support Plugin Documentation -- Version 1.0</b></h2>
274
- <h4>Table of Contents</h4>
275
- <ul style="line-height:1.7em;">
276
- <li><a href="#summary"><strong>Plugin Summary</strong></a></li>
277
- <li><strong><a href="#admin_page">Weaver X Theme Extras Admin Page</a> </strong></li>
278
- <li><a href="#sc_summary"><strong>Shortcode Summary</strong></a></li>
279
- <ul>
280
- <li><strong><a href="#bloginfo">[bloginfo arg='name' style='your css']</a></strong></li>
281
- <li><strong><a href="#box">[box]text[/box]</a></strong></li>
282
- <li><a href="#tab_group"><strong>[tab_group] - content in tabs</strong></a></li>
283
- <li><strong><a href="#headerimage">[header_image] Shortcode</a></strong></li>
284
- <li><strong><a href="#schtml">[html]</a></strong></li>
285
- <li><strong><a href="#scdiv">[div]text[/div]</a>, <a href="#schtml">[span]text[/span]</a></strong></li>
286
- <li><strong><a href="#sciframe"> [iframe]</a></strong></li>
287
- <li><strong><a href="#scshowif">[show/hide_if]</a></strong></li>
288
- <li><strong><a href="#sitetitlesc">[site_title], [site_tagline]</a></strong></li>
289
-
290
- <li><strong><a href="#video">Video - [vimeo], [youtube]</a></strong></li>
291
- </ul>
292
- <li><a href="#widg-sum"><strong>Widget Summary</strong></a>
293
- <ul>
294
- <li><strong><a href="#widg-login">Weaver X Login Widget</a></strong></li>
295
- <li><strong><a href="#widg_pp_text">Weaver X Per Page Text</a></strong></li>
296
- <li><strong><a href="#widg_text_2">Weaver X Text 2</a></strong></li>
297
- </ul>
298
- </li>
299
- </ul>
300
- <h3><a name="summary" id="summary"></a>Plugin Summary </h3>
301
- <p>The Weaver X Theme Support Plugin provides a collection of shortcodes to allow you to easily add extra content and features to your regular content. These shortcodes will work with almost any WordPress theme. </p>
302
- <p>While these shortcodes should prove useful with most any theme, one of the goals of these shortcodes is to provide an alternative to users of the Weaver X theme.</p>
303
- <h2><a name="admin_page" id="admin_page"></a>Weaver Xtreme Theme Extras Admin Page</h2>
304
- <p>This plugin has just a few options, all found on the Weaver X Theme Support admin page under the WordPress dashboard Appearance section.</p>
305
- <h2><a name="sc_summary" id="sc_summary"></a>Shortcode Summary</h2>
306
- <h3><a name="tab_group" id="tab_group"></a>[tab_group] - content in tabs </h3>
307
- <p>Show content displayed on tabbed pages.</p>
308
- <p><strong>Shortcode usage:</strong><br />
309
- <pre>
310
- [tab_group border_color=black page_min_height=200px]
311
- [tab title='tab one']This is the content found on first tab.[/tab]
312
- [tab title='tab two']And we have more content for the second tab.[/tab]
313
- [tab title='last tab']And this is the last tab. There could be more.[/tab]
314
- [/tab_group]
315
- </pre>
316
- <h4>Short code parameters</h4>
317
- You can supply values for these parameters to control the look of the tabbed section.
318
- <br />
319
- <ul>
320
- <li><b>border_color:</b> tab and pane border color - default #888</li>
321
- <li><b>tab_bg</b>: normal bg color of tab (default #CCC)</li>
322
- <li><b>tab_selected_color</b>: color of tab when selected (default #EEE)</li>
323
- <li><b>pane_min_height</b>: min height of a pane to help make all even if needed</li>
324
- <li><b>pane_bg</b>: bg color of pane</li>
325
- </ul>
326
- </p>
327
- <h3><a name="headerimage" id="headerimage"></a><strong>[header_image]</strong></h3>
328
- <p>The <code>[header_image]</code> shortcode allows you display the current header image wherever you want.
329
- For example, you can get the header image into the Header Widget Area by using this shortcode in a text widget.
330
- The current standard or mobile header image will be displayed. Only the <code>&lt;img ... &gt;</code> is displayed --
331
- the image will not be wrapped in a link to the site.</p>
332
-
333
- <p><strong>Shortcode usage:</strong> <code>[header_image h='size' w='size' style='inline-style']</code>
334
- <br />
335
- <ol>
336
- <li><strong>w='size' h='size'</strong> - By default, no height or image properties are included with the
337
- header <code>&lt;img ... &gt;</code>, which will result in an image scaled to fit into whatever the natural
338
- width of the enclosing HTML container is (the content area, a text widget, etc.). You may specify an explicit
339
- value (usually in px) for the height and width of the image.
340
- </li>
341
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
342
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
343
- <code>style="your-rules;"</code> - using double quotation marks.
344
- </li>
345
- </ol>
346
- <h3><a name="schtml" id="schtml"></a><strong>[html]</strong></h3>
347
-
348
- <p>The Weaver X Theme Support <code>[html]</code> shortcode allows you to add arbitrary HTML to your post and page content. The
349
- main purpose of this shortcode is to get around the auto paragraph and line break and other HTML stripping functionality
350
- of the WordPress editor.</p>
351
-
352
- <p><strong>Shortcode usage:</strong> <code>[html html-tag args='parameters']</code>
353
- <br />
354
- <ol>
355
- <li><strong>html-tag</strong> - The first parameter to the shortcode must be present, and must be a standard
356
- HTML tag - <code>p</code>, <code>br</code>, or <code>span</code>, for example. You just supply the tag - no quotation
357
- marks, no '=', just the tag. The shortcode provides the &lt; and &gt;. If you need a wrapping HTML tag (e.g., <code>span</code> and <code>/span</code>), use
358
- two shortcodes:<br />
359
- <code>[html span args='style="color:red"']content to make red[html /span]</code>
360
- </li>
361
- <li><strong>args='parameters'</strong> - Allows you to specify arbitrary parameters for your HTML tag. See the example above.
362
- </li>
363
- </ol>
364
- </p>
365
-
366
- <h3><a name="scdiv" id="scdiv"></a><strong>[div]text[/div]</strong>, [span]text[/span]</h3>
367
-
368
- <p>The Weaver X Theme Support <code>[div]</code> and [span] shortcodes allow you to easily add HTML &lt;div&gt; or &lt;span&gt; tags to your post and page content. The
369
- main purpose of these shortcodes is to get around need to switch to the HTML editor view when you need to
370
- wrap your content in a &lt;div&gt; or &lt;span&gt;.</p>
371
- <p>
372
- This will work exactly like a standard HMTL &lt;div&gt;and &lt;span&gt; tags. It supports 'id', 'class',
373
- and 'style' parameters, which are the most useful. Instead of wrapping your text in &lt;div&gt; or &lt;span&gt; tags, wrap them like
374
- this (the Visual view will work just fine):<br />
375
- <code>[div style="font-size:20px;']This content will be large.[/div]</code><br />
376
- <code>[span style=&quot;font-size:20px;']This content will be large.[/span]</code></p>
377
- <p><strong>Shortcode usage:</strong> <code>[div id='class_id' class='class_name' style='style_values']text[/div]</code>
378
- <br />
379
- <code>[span id='class_id' class='class_name' style='style_values']text[/span]</code> <br />
380
- <ol>
381
- <li><strong>id='class_id' class='class_name' style='style_values'</strong> - Allows you to specify id, class, and style for the &lt;div&gt;. See the example above.
382
- </li>
383
- </ol>
384
- </p>
385
-
386
- <h3><a name="sciframe" id="sciframe"></a><strong>iframe - [iframe]</strong></h3>
387
-
388
- <p>The <code>[iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
389
- the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>
390
-
391
- <p><strong>Shortcode usage:</strong> <code>[iframe src='http://example.com' height=600 percent=100 style="style"]</code>
392
- <br />
393
- <ol>
394
- <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
395
- </li>
396
- <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
397
- </li>
398
- <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
399
- </li>
400
- <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values".
401
- </li>
402
- </ol>
403
- </p>
404
-
405
- <h3><a name="scshowif" id="scshowif"></a><strong>[show_if]content[/show_if], [hide_if]</strong>content [/hide_if]</h3>
406
- <p>The <code>[show_if]</code> and <code>[hide_if]</code> shortcodes allow you to selectively
407
- display or hide content depending if any of several conditions are met.</p>
408
-
409
- <p><strong>Shortcode usage:</strong> <code>[hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]</code>
410
- </p>
411
- <p>You bracket the content you want to selectively display with <code>[show/hide_if]</code> and closing
412
- <code>[/show/hide_if]</code> tags. That content can contain other shortcodes as needed. If you specify more than one parameter to the short code, then all the conditions must be met (logical AND). Any paramaters you don't include are considered true.</p>
413
- <h4>Parameters</h4>
414
- <p>'device' =&gt; 'default', // desktop, mobile, smalltablet, phone, all<br />
415
- 'logged_in' =&gt; 'default', // true or false<br />
416
- 'not_post_id' =&gt; 'default', // comma separated list of post IDs (includes pages, too)<br />
417
- 'post_id' =&gt; 'default', // comma separated list<br />
418
- 'user_can' =&gt; 'default' // http://codex.wordpress.org/Function_Reference/current_user_can</p>
419
- <p>
420
- <strong>device=desktop | mobile | smalltablet | phone </strong> - The device parameter for <code>[show/hide_if]</code> is designed to allow you to hide <em>or</em> show any content on any of the
421
- device sizes recognized by Weaver Xtreme (or any theme, actually): 'phone', 'smalltablet', and 'desktop', or 'mobile' for non-desktop devices. If you want to show or hide content on
422
- a specific device, you give the <span class="code1">device</span> parameter a value of desktop, mobile, smalltablet, phone, or none (e.g., <code>[show_if device=mobile]</code>). </p>
423
- <p><strong>logged_in=true | false</strong> - This will hide or display content depending if the visitor is logged into the site or not. </p>
424
- <p><strong>post_id=34,875</strong> / <strong>not_post_id=1,2,3 </strong>- This will display (or not display) the content depending if the current page or single post view is included in the comma separated list of WordPress page/post IDs. You can use both to refine a list of pages or posts to display or not display. Note that even though the parameter is called 'post_id', it applies equally to pages and posts. Depending on where you use the shortcode, it will apply to a post differently depending if it is on a blog or single page view of a post. Note that the default WordPress blog (as opposed to the Weaver Xtreme Page with Posts template) does not have a post_ID.</p>
425
- <p><strong>user_can=user-capability</strong> - This will show or hide depending if the current visitor has certain WordPress user capabilities. There are many capabilities which are defined in the <a href="http://codex.wordpress.org/Function_Reference/current_user_can" target="_blank">WordPress Codex</a>. This shortcode supports any of the listed capabilities for maximum flexibility. If you don't want to learn about all the capabilities listed in the Codex, you can use the following capability values to determine if the visitor has a specific role (as defined on the Dashboard Users admin pages). For example:<br />
426
- <br />
427
- <span class="code1">[show_if user_can=publish_pages]content for Editors and above[/show_if]</span><br />
428
- <br />
429
- Note that the higher roles have all the capabilities of the lower roles - an Editor can do everything a Contributor can.</p>
430
- <table width="80%" border="1">
431
- <caption>
432
- Capabilities to Specify Role
433
- </caption>
434
- <tr>
435
- <th scope="col">Role</th>
436
- <th scope="col">Capability</th>
437
- </tr>
438
- <tr>
439
- <td>Subscriber</td>
440
- <td>read</td>
441
- </tr>
442
- <tr>
443
- <td>Contributor</td>
444
- <td>edit_posts</td>
445
- </tr>
446
- <tr>
447
- <td>Author</td>
448
- <td>publish_posts</td>
449
- </tr>
450
- <tr>
451
- <td>Editor</td>
452
- <td>publish_pages</td>
453
- </tr>
454
- <tr>
455
- <td>Administrator</td>
456
- <td>manage_options</td>
457
- </tr>
458
- <tr>
459
- <td>Super Administrator (MultiSite)</td>
460
- <td>manage_network</td>
461
- </tr>
462
- </table>
463
- <p>&nbsp;</p>
464
- <h3><a name="sitetitlesc" id="sitetitlesc"></a><strong>[site_title style="style" matchtheme=false], [site_tagline style="style" matchtheme=false]</strong></h3>
465
-
466
- <p>The <code>[site_title]</code> and <code>[site_tagline]</code> shortcodes allow you display the current
467
- site title and site tagline. This can be useful in a text widget in the Header Widget Area, for example.</p>
468
- <p><em>Note:</em> If you want to position the content of a text widget within the a cell of the Header Widget Area, you could use the following
469
- example:</p>
470
- <p><code>[site_title style='font-size:150%;position:absolute;padding-left:20px;padding-top:30px;']</code></p>
471
-
472
- <p><strong>Shortcode usage:</strong> <code>[site_title style='inline-style' matchtheme=false] [site_tagline style='inline-style' matchtheme=false]</code>
473
- <br />
474
- <ol>
475
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
476
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
477
- <code>style="your-rules;"</code> - using double quotation marks.
478
- </li>
479
- <li><strong>matchtheme=true</strong> - Allows you to add match the theme styling as defined in the site header if set to true.
480
- This will match the color/style/font of the header version of the site title and tagline with the exception of hide settings.
481
- The shortcode version will not be hidden on any device unless you also wrap the shortcode with a [show_if/hide_if] shortcode.
482
- </li>
483
-
484
- </ol>
485
-
486
- <h3><a name="bloginfo" id="bloginfo"></a><strong>[bloginfo arg='name' style='your css']</strong></h3>
487
-
488
- <p>This shortcode can be used to access the WordPress function 'get_bloginfo($arg)'. This will return a number of useful
489
- strings depending on the value. All the supported values are listed at http://codex.wordpress.org/Function_Reference/get_bloginfo.
490
- Some useful values include 'stylesheet_directory' and 'template_directory'. You can wrap the bloginfo output with css added to a &lt;span style=&quot;your css&quot;&gt;.
491
- </p>
492
-
493
- <h3><a name="box" id="box"></a><strong>[box]text[/box]</strong></h3>
494
-
495
- <p>
496
- Wrap content in a box.</p>
497
- <p><strong>Shortcode Usage:</strong> <code>[box align=left background=#fff border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules']text[/box]</code></p>
498
- <ol>
499
- <li><strong>align=align</strong>: Leave blank, or specify left, center, or right for alignment of box within surrounding text.</li>
500
- <li><strong>border=true</strong>: True is default. Specify false or 0 for no borders.</li>
501
- <li><strong>border_rule='1px solid black</strong>': Specify a compound border CSS value to replace the default '1px solid black'.</li>
502
- <li><strong>border_radius=4</strong>: Default is none - specify a px value for the corner radius if you want rounded corners.</li>
503
- <li><strong>color=#000</strong>: Default is inherit - specify a valid color for the color of the text in the box.</li>
504
- <li><strong>background=#fff</strong>: Default is inherit - specify color for box background color.</li>
505
- <li><strong>margin=1</strong>: Default is 0 - specify an 'em' value for margin around the box. Using a margin overrides align parameter.</li>
506
- <li><strong>padding=1</strong>: Default 1 - specify an 'em' value for padding inside box.</li>
507
- <li><strong>shadow=0</strong>: Default 0 - specify a value from 1 to 5 for a border around the box.</li>
508
- <li><strong>style=inline-style</strong>: any additional custom styling for the box</li>
509
- <li><strong>width=100</strong>: A percentage width for the box within its surrounding container.</li>
510
- </ol>
511
- <h3><a name="video" id="video"></a><strong>Video - [vimeo], [youtube]</strong></h3>
512
- <p>Weaver X Theme Support supports specialized shortcodes to display video. While there are other ways to embed video, the Weaver X Theme Support versions have two important features. First, they will auto adjust to the width of your content, <em><strong>including</strong></em> the mobile view. Second, they use the latest iframe/HTML5 interface provided by YouTube and Vimeo.</p>
513
- <p><strong>Specifying Video Display Size for both shortcodes</strong></p>
514
- <p>Weaver X Theme Support supports a common set of options for both the YouTube and Vimeo shortcodes to support displaying your videos with a specific width and correct height. By default, your videos will be displayed using the full width of the content area being used (percent=100). The percent= parameter is used to specify the width you want.</p>
515
- <p>The height of the video is automatically determined based on the width and the display ratio of the particular video. </p>
516
- <p>Finally, you may specify if the video should be centered or no within the display area using &quot;center=0&quot; to not center (centering is on by default).</p>
517
- <p>Note - if you want to display more than one video horizontally, use &quot;center=0&quot; and specify an appropriate percentage to fit all the videos.</p>
518
- <p>Parameters in Common</p>
519
- <ul>
520
- <li>percent=100 - By default, the video will be sized to fill the full content space. You can use the percent value to make
521
- the video use a percentage of the content space (but mobile will always use full width).</li>
522
- <li>center=1 - Specify 'center=0' to disable centering of the video.</li>
523
- <li>sd=0 - By default, Weaver X Theme Support will generate sizes for HD/widescreen videos. To display old 4:3 standard definition videos, include 'sd=1' in the shortcode.</li>
524
- </ul>
525
- <h4>Vimeo</h4>
526
- <pre><strong>[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex
527
- autoplay=0 loop=0 portrait=1 title=1 byline=1]
528
- </strong></pre>
529
- <p>This will display Vimeo videos. At the minimum, you can provide the standard http://vimeo.com/nnnnn link, or just the video ID number (which is part of the Vimeo Link). The other Vimeo specific options include:</p>
530
- <ul>
531
- <li>color - You can optionally specify a Vimeo color theme using 6 hex digits for a color value.</li>
532
- <li>autoplay - Add 'autoplay=1' to have the video autoplay.</li>
533
- <li>loop - Add 'loop=1' to have the video loop.</li>
534
- <li>portrait, title, byline - You can specify a value '=0' for these to hide the display of the corresponding element on the Vimeo player.
535
- Portrait is the avatar/icon, title is the video title, and byline is source attribution.<br />
536
- </li>
537
- </ul>
538
- <h4>YouTube</h4>
539
- <code><strong>[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=1 https=0 privacy=0 {youtube options}]
540
- </strong></code>
541
- <p>This will display YouTube videos. At the minimum, you can provide the standard http://youtu.be/xxxxxx share link (including the options YouTube lets you specify), the long format share link, or just the video ID number using the id=videoid parameter (which is part of the YouTube Link). The other YouTube specific options include:</p>
542
- <ul>
543
- <li>rel - If you specify 'rel=0', YouTube won't show related videos after the video plays.</li>
544
- <li>https - If you specify 'https=1', YouTube will use the https protocol.</li>
545
- <li>privacy - If you specify 'privacy=1', YouTube won't used cookies to track your viewing.</li>
546
- </ul>
547
- <p>In addition to the above [youtube] options, the shortcode also supports most standard YouTube options. These are more fully described on the <a href="http://code.google.com/apis/youtube/player_parameters.html" target="_blank">YouTube Embedded Player Parameters</a> page.</p>
548
- <p>The supported options, with Weaver X Theme Support's default values include:</p>
549
- <p>'autohide' = '1' . . . . . . 0: always show controls; 1: autohide controls; 2: autohide progress bar<br />
550
- 'autoplay' = '0' . . . . . . 1: auto play; 0: don't<br />
551
- 'border' = '0' . . . . . . . . 0: no border; 1: border using color1 and color2 (don't seem to work)<br />
552
- 'color' = not set . . . . . . progress bar color - red or white<br />
553
- 'color1' = not set . . . . . RGB hex value for border color<br />
554
- 'color2' = not set . . . . . RGB hex value for control bar bg<br />
555
- 'controls' = '1' . . . . . . . 0: hide player controls<br />
556
- 'disablekb' = '0' . . . . . . 1: disable keyboard controls<br />
557
- 'egm' ='0' . . . . . . . . . . . 1: enable &quot;Enhanced Genie Menu&quot;<br />
558
- 'hd' = '0' . . . . . . . . . . . . 1: enable HD playback by default<br />
559
- 'iv_load_policy' = '1' . . . 1: show annotations; 3: don't show; 2: discontinued support<br />
560
- 'loop' = '0' . . . . . . . . . . . 1: loop video<br />
561
- 'modestbranding' = '0' . .1: hide YouTube logo - will still show label in upper right corner<br />
562
- 'origin' = not set . . . . . . . See YouTube docs<br />
563
- 'playlist' = not set . . . . . . Comma separated list of videoIDs to play (id/url video played 1st)<br />
564
- 'showinfo' = '1' . . . . . . . 0: hide video title<br />
565
- 'showsearch' = '1' . . . . . 0: hide video searchbox<br />
566
- 'start' = not set . . . . . . . start vide this number of seconds from start<br />
567
- 'theme' = 'dark' . . . . . . . dark or light - display theme for player<br />
568
- 'wmode' = 'transparent' . Keeps video behind menu bars, etc. Other values available - see YouTube</p>
569
- <h2><a name="widg-sum" id="widg-sum"></a>Widget Summary</h2>
570
- <h3><a name="widg-login" id="widg-login"></a>Weaver X Login Widget</h3>
571
- <p>This simple widget shows a login in link, or a welcome, Site Admin, and Log out choice if the user is logged in.</p>
572
- <h3><a name="widg_pp_text" id="widg_pp_text"></a>Weaver X Per Page Text</h3>
573
- <p>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>if you want a title, and define Custom Field<em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text, HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)</p>
574
- <h3><a name="widg_text_2" id="widg_text_2"></a>Weaver X Text 2</h3>
575
- <p>This widget lets you add two columns of text. It is most useful in wide widget areas such as a content top or bottom widget area, or a wide footer widget area.</p>
576
- <p>&nbsp;</p>
577
- <h2><br />
578
- </h2>
579
- <p>The Weaver X Theme Support Plugin and this document are &copy; 2014, Bruce E. Wampler. <a ref="http://weavertheme.com">Web Site - WeaverTheme.com</a></p>
580
-
581
- </div>
582
- </div>
583
- </body>
584
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,613 +0,0 @@
1
- <?php
2
- /* Display per page and per post options.
3
- *
4
- * __ added - 12/10/14
5
- *
6
- * IMPORTANT! - this code and the Weaver Plus plugin need to be maintained in parallel!
7
- */
8
-
9
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
10
- // Admin panel that gets added to the page edit page for per page options
11
-
12
-
13
- if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
14
-
15
- function wvrx_ts_isp_true($val) {
16
- if ($val) return true;
17
- return false;
18
- }
19
-
20
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
21
- global $post;
22
- ?>
23
- <div style="float:left;width:<?php echo $width; ?>%"><label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
24
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> />
25
- <?php echo($msg . '</label></div>');
26
- for ($i = 0 ; $i < $br ; $i++)
27
- echo '<br class="page_checkbox" style="clear:both;" />';
28
- }
29
-
30
- function wvrx_ts_page_layout( $page = 'page' ) {
31
-
32
- if ( $page == 'page')
33
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaver-xtreme' /*adm*/);
34
- else
35
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaver-xtreme' /*adm*/);
36
-
37
- $opts = array( 'id' => '_pp_page_layout',
38
- 'info' => $msg,
39
- 'value' => array(
40
- array('val' => '', 'desc' => __('Use Default','weaver-xtreme' /*adm*/) ),
41
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaver-xtreme' /*adm*/) ),
42
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaver-xtreme' /*adm*/) ),
43
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaver-xtreme' /*adm*/) ),
44
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaver-xtreme' /*adm*/) ),
45
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaver-xtreme' /*adm*/) ),
46
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaver-xtreme' /*adm*/) ),
47
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaver-xtreme' /*adm*/) )
48
- ));
49
- wvrx_ts_pp_select_id($opts);
50
- }
51
- //--
52
-
53
-
54
-
55
- function wvrx_ts_pp_replacement( $desc, $id ) {
56
- global $post;
57
- global $wp_registered_sidebars;
58
-
59
- $id = '_' . $id;
60
-
61
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
62
-
63
-
64
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
65
- $area_name = $value['id']; //sanitize_title($value['name']);
66
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
67
- echo ' <option value="' . $area_name . '"';
68
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
69
- echo '>' . substr($area_name,9) . "</option>\n";
70
-
71
- }
72
- }
73
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
74
- }
75
- //--
76
-
77
-
78
- function wvrx_ts_pp_select_id( $value ) {
79
- global $post;
80
-
81
- if ( isset( $value['name'] ) && $value['name'] != '' )
82
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
83
-
84
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
85
-
86
- foreach ($value['value'] as $option) {
87
- if ( $option['val'] == '' ) {
88
- echo '<option value="">';
89
- } else {
90
- echo ' <option value="' . $option['val'] . '"';
91
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
92
- echo ">";
93
- }
94
- echo $option['desc'] . "</option>\n";
95
- }
96
- echo '</select>&nbsp;' . $value['info'] . "\n";
97
- }
98
- //--
99
-
100
-
101
-
102
- function wvrx_ts_pwp_atw_show_post_filter() {
103
- // use plugin options...
104
- global $post;
105
-
106
- if ( function_exists( 'atw_showposts_installed' ) ) {
107
- $filters = atw_posts_getopt('filters');
108
-
109
- $first = true;
110
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
111
- foreach ($filters as $filter => $val) { // display dropdown of available filters
112
- if ( $first ) {
113
- $first = false;
114
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
115
- } else {
116
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
117
- }
118
- }
119
- echo '</select>&nbsp;' .
120
- __('Use a Filter from <em>Weaver Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaver-xtreme' /*adm*/) .
121
- '<br /> <span style="margin-left:8em;"><span>' .
122
- __('(Note: Weaver Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts using this filter.)','weaver-xtreme' /*adm*/) .
123
- '<br />' . '<br />';
124
- } else {
125
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaver-xtreme' /*adm*/); ?>
126
- <br /><br />
127
- <?php }
128
- }
129
- //--
130
-
131
-
132
-
133
- function wvrx_ts_pwp_type() {
134
- $opts = array( 'name' => __('Display posts as:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
135
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaver-xtreme' /*adm*/),
136
- 'value' => array(
137
- array('val' => '', 'desc' => '&nbsp;' ),
138
- array('val' => 'full', 'desc' => __('Full post','weaver-xtreme' /*adm*/) ),
139
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaver-xtreme' /*adm*/) ),
140
- array('val' => 'title', 'desc' => __('Title only','weaver-xtreme' /*adm*/) ),
141
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaver-xtreme' /*adm*/) )
142
- ));
143
- wvrx_ts_pp_select_id($opts);
144
- }
145
-
146
-
147
- function wvrx_ts_page_cols() {
148
-
149
- $opts = array( 'name' => '', 'id' => '_pp_page_cols',
150
- 'info' => __('Display page content in this many columns using CSS column rules.','weaver-xtreme' /*adm*/),
151
- 'value' => array(
152
- array('val' => '', 'desc' => '&nbsp;'),
153
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
154
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
155
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ),
156
- array('val' => '4', 'desc' => __('4 Columns','weaver-xtreme' /*adm*/) ))
157
- );
158
- wvrx_ts_pp_select_id($opts);
159
-
160
- weaverx_html_br();
161
- weaverx_html_br();
162
- }
163
-
164
-
165
- function wvrx_ts_pwp_cols() {
166
-
167
- $opts = array( 'name' => __('Display post columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
168
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaver-xtreme' /*adm*/),
169
- 'value' => array(
170
- array('val' => '', 'desc' => '&nbsp;'),
171
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
172
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
173
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ) )
174
- );
175
- wvrx_ts_pp_select_id($opts);
176
-
177
- weaverx_html_br();
178
-
179
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_pwp_masonry',
180
- 'info' => __('Use <em>Masonry</em> for multi-column display','weaver-xtreme' /*adm*/),
181
- 'value' => array(
182
- array('val' => '', 'desc' => '&nbsp;' ),
183
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
184
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
185
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ),
186
- array('val' => '4', 'desc' => __('4 Columns','weaver-xtreme' /*adm*/) ),
187
- array('val' => '5', 'desc' => __('5 Columns','weaver-xtreme' /*adm*/) ) )
188
- );
189
- wvrx_ts_pp_select_id($opts2);
190
-
191
- ?>
192
- <br />
193
- <?php
194
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaver-xtreme' /*adm*/),90,1);
195
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaver-xtreme' /*adm*/),90,1);
196
- }
197
-
198
- function wvrx_ts_page_extras() {
199
- global $post;
200
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
201
-
202
- if ( !( current_user_can('edit_themes')
203
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
204
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
205
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
206
- ) {
207
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
208
- echo '<p>' .
209
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaver-xtreme' /*adm*/) .
210
- '</p>';
211
- else
212
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
213
- return; // don't show per post panel
214
- }
215
-
216
- echo("<div style=\"line-height:150%;\"><p>\n");
217
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
218
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
219
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaver-xtreme' /*adm*/); ?>
220
- </div><br />
221
- <?php
222
- }
223
-
224
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
225
- <div style="padding:2px; border:2px solid red; background:#FAA;">
226
- <?php _e('<strong>WARNING!</strong>
227
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
228
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
229
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
230
- If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
231
- including the option of using the Page with Posts page template,
232
- then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
233
- the <em></em>&mdash; Select &mdash;</em> default value.','weaver-xtreme' /*adm*/); ?>
234
- </div><br />
235
- <?php
236
- return;
237
- }
238
- echo '<strong>' . __('Page Templates','weaver-xtreme' /*adm*/) . '</strong>';
239
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaver-xtreme' /*adm*/));
240
- echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
241
- weaverx_html_br();
242
- _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaver-xtreme' /*adm*/);
243
- weaverx_html_br();
244
- echo '<strong>' . __('Per Page Options','weaver-xtreme' /*adm*/) . '</strong>';
245
- weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaver-xtreme' /*adm*/));
246
- weaverx_html_br();
247
- _e('These settings let you hide various elements on a per page basis.','weaver-xtreme' /*adm*/);
248
- weaverx_html_br();
249
-
250
-
251
- wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaver-xtreme' /*adm*/));
252
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaver-xtreme' /*adm*/));
253
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaver-xtreme' /*adm*/), 33, 1);
254
-
255
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaver-xtreme' /*adm*/));
256
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaver-xtreme' /*adm*/));
257
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaver-xtreme' /*adm*/),33,1);
258
-
259
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaver-xtreme' /*adm*/));
260
- wvrx_ts_page_checkbox('_pp_full_browser_height',__('Force full browser height','weaver-xtreme' /*adm*/),33,2);
261
-
262
- wvrx_ts_page_cols();
263
-
264
- _e('<em>Note:</em> the following options work with the default menu - not custom menus.','weaver-xtreme' /*adm*/);
265
- weaverx_html_br();
266
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaver-xtreme' /*adm*/),90,1);
267
-
268
-
269
-
270
- wvrx_ts_page_checkbox('_pp_stay_on_page',__('Menu "Placeholder" page. Useful for top-level menu item - don\'t go anywhere when menu item is clicked.','weaver-xtreme' /*adm*/),90,2);
271
-
272
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90,1);
273
-
274
- if (weaverx_allow_multisite()) {
275
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90,1);
276
- }
277
-
278
- ?>
279
- <p><strong><?php _e('Sidebars &amp; Widgets','weaver-xtreme' /*adm*/); ?></strong></p>
280
-
281
- <?php
282
- wvrx_ts_page_layout();
283
- ?>
284
- <br />
285
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
286
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
287
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaver-xtreme' /*adm*/); ?> <br /><br />
288
- <?php
289
-
290
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaver-xtreme' /*adm*/),40);
291
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaver-xtreme' /*adm*/),40,1);
292
-
293
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaver-xtreme' /*adm*/),40);
294
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaver-xtreme' /*adm*/),40,1);
295
-
296
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaver-xtreme' /*adm*/),40);
297
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaver-xtreme' /*adm*/),40,1);
298
-
299
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaver-xtreme' /*adm*/),40);
300
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaver-xtreme' /*adm*/),40,1);
301
- ?>
302
-
303
- <p><strong><?php _e('Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
304
- <p>
305
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
306
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
307
- </p>
308
- <?php
309
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
310
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
311
-
312
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
313
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
314
-
315
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-top-widget-area' );
316
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-bottom-widget-area' );
317
-
318
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaver-xtreme' /*adm*/) , 'page-top-widget-area' );
319
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaver-xtreme' /*adm*/) , 'page-bottom-widget-area' );
320
- ?>
321
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
322
- <?php
323
- $opts3 = array( 'id' => '_pp_fi_location',
324
- 'info' => __('How to display Page FI on this page','weaver-xtreme' /*adm*/),
325
- 'value' => array(
326
- array('val' => '', 'desc' => __('Default Page FI','weaver-xtreme' /*adm*/) ),
327
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
328
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
329
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
330
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
331
- array('val' => 'hide', 'desc' => __('Hide FI on this Page','weaver-xtreme' /*adm*/) )
332
- )
333
- );
334
- wvrx_ts_pp_select_id($opts3);
335
- ?>
336
- <br />
337
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
338
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
339
- <?php _e('<em>Featured Image Link</em> - Full URL for link from FI','weaver-xtreme' /*adm*/); ?>
340
- <br style="clear:both;" />
341
- <hr />
342
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
343
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
344
-
345
- <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaver-xtreme' /*adm*/); ?>
346
- <br />
347
- </p>
348
- <p>
349
- <?php _e('<strong>Settings for "Page with Posts" Template</strong>','weaver-xtreme' /*adm*/);
350
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaver-xtreme' /*adm*/) );
351
-
352
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
353
- if ($template == 'paget-posts.php') {
354
- ?>
355
- <br />
356
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
357
- Use commas to separate items in lists.
358
- The settings will be combined for the final filtered list of posts displayed.
359
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
360
- <br />
361
-
362
- <input type="text" size="30" id="_pp_category" name="_pp_category"
363
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
364
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaver-xtreme' /*adm*/); ?>
365
- <br />
366
-
367
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
368
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
369
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaver-xtreme' /*adm*/); ?> <br />
370
-
371
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
372
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
373
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display.",'weaver-xtreme' /*adm*/); ?> <br />
374
-
375
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
376
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
377
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaver-xtreme' /*adm*/); ?> <br />
378
-
379
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
380
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
381
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaver-xtreme' /*adm*/); ?> <br />
382
-
383
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
384
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
385
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaver-xtreme' /*adm*/); ?> <br />
386
-
387
- <input type="text" size="30" id="_pp_author" name="_pp_author"
388
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
389
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaver-xtreme' /*adm*/); ?> <br />
390
-
391
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
392
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
393
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaver-xtreme' /*adm*/); ?> <br />
394
-
395
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
396
-
397
- <?php wvrx_ts_pwp_type(); ?><br />
398
- <?php wvrx_ts_pwp_cols(); ?><br />
399
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
400
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
401
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaver-xtreme' /*adm*/); ?>
402
- <br />
403
-
404
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
405
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
406
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
407
- __("Hide first \"n\" posts</em> - Start with post n+1.
408
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaver-xtreme' /*adm*/) ; ?>
409
-
410
- <br /><br />
411
-
412
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaver-xtreme' /*adm*/), 40); ?>
413
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaver-xtreme' /*adm*/), 40, 1); ?>
414
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaver-xtreme' /*adm*/), 40); ?>
415
- </p>
416
- <?php
417
- } else { // NOT a page with posts
418
- ?> <p>
419
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
420
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
421
- settings for "Page with Posts" will be displayed here. Current page template:','weaver-xtreme' /*adm*/); ?>
422
- <?php echo $template; ?>
423
- </p>
424
- <?php
425
- }
426
- do_action('weaverxplus_add_per_page');
427
- ?>
428
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
429
- </div>
430
- <?php
431
- }
432
-
433
- function wvrx_ts_post_extras() {
434
- global $post;
435
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
436
- if ( !( current_user_can('edit_themes')
437
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
438
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
439
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
440
- ) {
441
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
442
- return; // don't show per post panel
443
- }
444
- ?>
445
- <div style="line-height:150%;">
446
- <p>
447
- <?php
448
- echo '<strong>' . __('Per Post Options','weaver-xtreme' /*adm*/) . '</strong>';
449
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaver-xtreme' /*adm*/));
450
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
451
- weaverx_html_br();
452
- _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.','weaver-xtreme' /*adm*/);
453
- weaverx_html_br();
454
-
455
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaver-xtreme' /*adm*/), 40);
456
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaver-xtreme' /*adm*/),55,1);
457
-
458
-
459
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaver-xtreme' /*adm*/),40);
460
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaver-xtreme' /*adm*/), 40, 1);
461
-
462
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaver-xtreme' /*adm*/),40);
463
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaver-xtreme' /*adm*/),40,1);
464
-
465
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaver-xtreme' /*adm*/),40);
466
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaver-xtreme' /*adm*/),40,1);
467
- wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaver-xtreme' /*adm*/),90,1);
468
-
469
- wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaver-xtreme' /*adm*/),90);
470
-
471
-
472
- echo('<br style="clear:both;"/><br /><strong>Per Post Style</strong> (&starf;Plus)' /*a*/ );
473
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaver-xtreme' /*adm*/ ));
474
- echo '<br />' .
475
- __('Weaver Xtreme Plus supports optional per post CSS style rules.','weaver-xtreme' /*adm*/); ?>
476
- <br />
477
- <br />
478
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
479
-
480
- <?php
481
- wvrx_ts_page_layout('post');
482
- ?>
483
- <br />
484
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
485
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
486
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaver-xtreme' /*adm*/); ?> <br /><br />
487
- <?php
488
-
489
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaver-xtreme' /*adm*/),40);
490
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaver-xtreme' /*adm*/),40,1);
491
-
492
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaver-xtreme' /*adm*/),40);
493
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
494
-
495
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaver-xtreme' /*adm*/),40);
496
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
497
-
498
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaver-xtreme' /*adm*/),40);
499
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaver-xtreme' /*adm*/),40,1);
500
- ?>
501
- </p>
502
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
503
- <p>
504
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
505
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
506
- </p>
507
- <?php
508
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
509
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
510
-
511
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
512
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
513
-
514
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
515
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
516
- ?>
517
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
518
- <?php
519
- $opts3 = array( 'id' => '_pp_fi_location',
520
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaver-xtreme' /*adm*/),
521
- 'value' => array(
522
- array('val' => '', 'desc' => __('Default Single Page FI','weaver-xtreme' /*adm*/) ),
523
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
524
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
525
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
526
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
527
- array('val' => 'post-before', 'desc' => __('Outside of Post','weaver-xtreme' /*adm*/) ),
528
- array('val' => 'hide', 'desc' => __('Hide FI on Single Page','weaver-xtreme' /*adm*/) )
529
- )
530
- );
531
- wvrx_ts_pp_select_id($opts3);
532
- ?>
533
- <br />
534
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
535
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
536
- <?php _e("<em>Featured Image Link</em> - Full URL for link from FI",'weaver-xtreme' /*adm*/); ?>
537
- <br style="clear:both;" />
538
- </p><p>
539
- <strong><?php _e('Post Editor Options','weaver-xtreme' /*adm*/); ?></strong>
540
-
541
- <?php
542
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90, 1);
543
-
544
- if (weaverx_allow_multisite()) {
545
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90, 1);
546
- }
547
- ?>
548
- </p>
549
- <p>
550
- <?php echo('<strong>Post Format</strong>');
551
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaver-xtreme' /*adm*/));
552
- weaverx_html_br();
553
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info.','weaver-xtreme' /*adm*/);
554
- weaverx_html_br();
555
- weaverx_html_br();
556
-
557
- do_action('weaverxplus_add_per_post'); ?>
558
- </p>
559
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
560
- </div>
561
- <?php
562
- }
563
-
564
-
565
- function wvrx_ts_save_post_fields($post_id) {
566
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
567
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
568
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
569
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
570
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
571
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
572
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
573
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
574
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
575
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
576
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
577
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
578
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area', '_pp_full_browser_height',
579
- '_pp_page_cols'
580
- );
581
-
582
- if (weaverx_allow_multisite()) {
583
- array_push($default_post_fields, '_pp_raw_html');
584
- }
585
-
586
- $all_post_fields = $default_post_fields;
587
-
588
- if (isset($_POST['post_meta'])) {
589
- foreach ($all_post_fields as $post_field) {
590
- if (isset($_POST[$post_field])) {
591
- $data = $_POST[$post_field];
592
- if ( $post_field != '_pp_post_styles')
593
- $data = stripslashes($data); // passed via post, so strip slashes
594
-
595
- if (get_post_meta($post_id, $post_field) == '') {
596
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
597
- }
598
- else if ($data != get_post_meta($post_id, $post_field, true)) {
599
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
600
- } else if ($data == '') {
601
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
602
- }
603
- } else {
604
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
605
- }
606
- }
607
- }
608
- }
609
-
610
- add_action("save_post", "wvrx_ts_save_post_fields");
611
- add_action("publish_post", "wvrx_ts_save_post_fields");
612
- }
613
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/includes/wvrx-ts-runtime-lib.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
-
6
- function wvrx_ts_help_link($ref, $label) {
7
-
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
- }
13
-
14
-
15
- // =============================== options =============================
16
-
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
-
19
-
20
- // Interface to Weaver Xtreme
21
-
22
- function wvrx_ts_fix_short($prefix, $msg ) {
23
- if ( $prefix ) {
24
- $m = str_replace('[/', '////', $msg);
25
- $m = str_replace('[', '[' . $prefix, $m);
26
- echo str_replace('////', '[/' . $prefix, $m);
27
- }
28
- else
29
- echo $msg;
30
- }
31
-
32
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
33
- function wvrx_ts_theme_support_addon() {
34
- ?>
35
- <div class="a-plus">
36
- <p><strong style="font-size:110%;"><?php _e('You have Weaver Xtreme Theme Support installed.','weaver-xtreme' /*adm*/); ?></strong><br />
37
- <?php _e('This section shows the shortcodes and widgets available with Weaver X Theme Support.
38
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaver-xtreme' /*adm*/); ?></p>
39
-
40
- <?php
41
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
42
- if ( $prefix )
43
- echo '<h3 style="color:red;">' . __("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme') . '</h3>';
44
- ?>
45
-
46
- <h3><?php _e('Shortcodes','weaver-xtreme' /*adm*/); ?></h3>
47
- <ul>
48
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaver-xtreme' /*adm*/)); ?>
49
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaver-xtreme' /*adm*/));?><br />
50
- <code><?php wvrx_ts_fix_short($prefix, __("[bloginfo name='WP bloginfo name' style='style-rules']",'weaver-xtreme' /*adm*/)); ?></code>
51
- </li>
52
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Box - [box]</span> - Display content in a Box','weaver-xtreme' /*adm*/)); ?>
53
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaver-xtreme' /*adm*/));?><br />
54
- <code><?php wvrx_ts_fix_short($prefix, __("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaver-xtreme' /*adm*/)); ?></code>
55
- </li>
56
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaver-xtreme' /*adm*/)); ?>
57
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaver-xtreme' /*adm*/));?><br />
58
- <code><?php wvrx_ts_fix_short($prefix, __("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaver-xtreme' /*adm*/)); ?></code>
59
- </li>
60
- <li<?php wvrx_ts_fix_short($prefix, __('><span class="wvr-blue">Header Image - [header_image]</span> - Display default header image','weaver-xtreme' /*adm*/)); ?>
61
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaver-xtreme' /*adm*/));?><br />
62
- <code><?php wvrx_ts_fix_short($prefix, __("[header_image h='size' w='size' style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
63
- </li>
64
-
65
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaver-xtreme' /*adm*/)); ?>
66
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaver-xtreme' /*adm*/));?><br />
67
- <code><?php wvrx_ts_fix_short($prefix, __("[html html-tag args='parameters']",'weaver-xtreme' /*adm*/)); ?></code>
68
- </li>
69
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaver-xtreme' /*adm*/)); ?>
70
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaver-xtreme' /*adm*/));?><br />
71
- <code><?php wvrx_ts_fix_short($prefix, __("[iframe src='http://example.com' height=600 percent=100 style='style']",'weaver-xtreme' /*adm*/)); ?></code>
72
- </li>
73
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Login - [login]</span> - Show simple Login/Logout link','weaver-xtreme' /*adm*/)); ?>
74
- <?php wvrx_ts_help_link('help.html#sclogin',__('Help for login','weaver-xtreme' /*adm*/));?><br />
75
- <code><?php wvrx_ts_fix_short($prefix, __("[login]",'weaver-xtreme' /*adm*/)); ?></code>
76
- </li>
77
-
78
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaver-xtreme' /*adm*/)); ?>
79
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaver-xtreme' /*adm*/));?><br />
80
- <code><?php wvrx_ts_fix_short($prefix, __('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaver-xtreme' /*adm*/)); ?></code>
81
- </li>
82
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Hide If - [hide_if]</span> - Hide content','weaver-xtreme' /*adm*/)); ?>
83
- </li>
84
-
85
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline','weaver-xtreme' /*adm*/)); ?>
86
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaver-xtreme' /*adm*/));?><br />
87
- <code><?php wvrx_ts_fix_short($prefix, __("[site_tagline style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
88
- </li>
89
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title','weaver-xtreme' /*adm*/)); ?>
90
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaver-xtreme' /*adm*/));?><br />
91
- <code><?php wvrx_ts_fix_short($prefix, __("[site_title style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
92
- </li>
93
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag','weaver-xtreme' /*adm*/)); ?>
94
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Span','weaver-xtreme' /*adm*/));?><br />
95
- <code><?php wvrx_ts_fix_short($prefix, __("[span id='class_id' class='class_name' style='style_values']text[/span]",'weaver-xtreme' /*adm*/)); ?></code>
96
- </li>
97
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Tab Group - [tab_group]</span> - Display content on separate tabs','weaver-xtreme' /*adm*/));?>
98
- <?php wvrx_ts_help_link('help.html#tab_group',__('Help for Tab Group','weaver-xtreme' /*adm*/));?><br />
99
- <code><?php wvrx_ts_fix_short($prefix, __('[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]','weaver-xtreme' /*adm*/)); ?></code>
100
- </li>
101
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options','weaver-xtreme' /*adm*/)); ?>
102
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
103
- <code><?php wvrx_ts_fix_short($prefix, __('[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]','weaver-xtreme' /*adm*/)); ?></code>
104
- </li>
105
-
106
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options','weaver-xtreme' /*adm*/)); ?>
107
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
108
- <code><?php wvrx_ts_fix_short($prefix, __('[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]','weaver-xtreme' /*adm*/)); ?></code>
109
- </li>
110
- </ul>
111
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
112
-
113
- <?php
114
- if ( $prefix )
115
- $button = __("Remove 'wvrx_' prefix from shortcode names: [ bloginfo ], etc.", 'weaver-xtreme');
116
- else
117
- $button = __("Add 'wvrx_' to shortcode names: [ wvrx_bloginfo ], etc.", 'weaver-xtreme');
118
- ?>
119
- <div style="clear:both;"></div>
120
- <span class='submit'><input name="toggle_shortcode_prefix" type="submit" value="<?php echo $button; ?>" /></span>
121
- <br /><small> <?php _e("To avoid conflicts with other plugins, you can add a 'wvrx_' prefix to these shortcodes.", 'weaver-xtreme /*adm*/'); ?> </small>
122
- <?php weaverx_nonce_field('toggle_shortcode_prefix'); ?>
123
- </form>
124
- <br />
125
-
126
- <h3><?php _e('Widgets','weaver-xtreme' /*adm*/); ?></h3>
127
- <ul>
128
- <li><?php _e('<span class="wvr-blue">Weaver X Login Widget</span> - Simplified login widget','weaver-xtreme' /*adm*/); ?>
129
- <?php wvrx_ts_help_link('help.html#widg-login',__('Help for Login Widget','weaver-xtreme' /*adm*/));?>
130
- </li>
131
-
132
- <li><?php _e('<span class="wvr-blue">Weaver X Per Page Text</span> - Display text on a per page basis, based on a Custom Field value','weaver-xtreme' /*adm*/); ?>
133
- <?php wvrx_ts_help_link('help.html##widg_pp_text',__('Help for Per Page Text Widget','weaver-xtreme' /*adm*/));?>
134
- </li>
135
-
136
- <li><?php _e('<span class="wvr-blue">Weaver X Text 2</span> - Display text in two columns - great for wide top/bottom widgets','weaver-xtreme' /*adm*/); ?>
137
- <?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
138
- </li>
139
- </ul>
140
-
141
-
142
- <h3><?php _e('Per Page/Post Settings','weaver-xtreme' /*adm*/); ?></h3>
143
- <p> <?php _e("Click the following button to produce a list of links to all pages and posts that have Per Page or Per Post settings.", 'weaver-xtreme /*adm*/'); ?></p>
144
- <div style="clear:both;"></div>
145
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
146
- <span class='submit'><input name="show_per_page_report" type="submit" value="<?php _e('Show Pages and Posts with Per Page/Post Settings', 'weaver-xtreme /*adm*/'); ?>" /></span>
147
- <?php weaverx_nonce_field('show_per_page_report'); ?>
148
- </form><br /><br />
149
- </div>
150
-
151
- <?php
152
- }
153
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/includes/wvrx-ts-shortcodes.php DELETED
@@ -1,661 +0,0 @@
1
- <?php
2
- /*
3
- Weaver X shortcodes
4
- */
5
-
6
- function wvrx_ts_setup_shortcodes() {
7
- // we setup all of our shortcodes only after the theme has been loaded...
8
-
9
- $codes = array( // list of shortcodes
10
- array('bloginfo' => 'wvrx_ts_sc_bloginfo'), // [bloginfo]
11
- array('box' => 'wvrx_ts_sc_box'), // [box]
12
- array('div' => 'wvrx_ts_sc_div'), // [div]
13
- array('header_image' => 'wvrx_ts_sc_header_image'), // [header_image]
14
- array('hide_if' => 'wvrx_ts_sc_hide_if' ), // [hide_if]
15
- array('html' => 'wvrx_ts_sc_html'), // [html]
16
- array('iframe' => 'wvrx_ts_sc_iframe'), // [iframe]
17
- array('login' => 'wvrx_ts_sc_login'), // [login]
18
- array('show_if' => 'wvrx_ts_sc_show_if' ), // [show_if]
19
- array('span' => 'wvrx_ts_sc_span'), // [span]
20
- array('site_tagline' => 'wvrx_ts_sc_site_tagline'), // [site_tagline]
21
- array('site_title' => 'wvrx_ts_sc_site_title'), // [site_title]
22
- array('tab_group' => 'wvrx_ts_sc_tab_group',
23
- 'tab' => 'wvrx_ts_sc_tab'), // [tab_group], [tab]
24
- array('vimeo' => 'wvrx_ts_sc_vimeo'), // [vimeo]
25
- array('youtube' => 'wvrx_ts_sc_youtube'), // [youtube]
26
- array('weaverx_info' => 'wvrx_ts_weaverx_sc_info'), // [weaverx_info]
27
- );
28
-
29
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
30
-
31
- foreach ($codes as $code) {
32
- wvrx_ts_set_shortcodes($code, $prefix);
33
- }
34
- }
35
-
36
- add_action('init', 'wvrx_ts_setup_shortcodes'); // allow shortcodes to load after theme has loaded so we know which version to use
37
-
38
- // =============== [box] ===================
39
- function wvrx_ts_sc_box( $args = '', $text ) {
40
- extract(shortcode_atts(array(
41
- 'align' => '',
42
- 'border' => true,
43
- 'border_rule' => '1px solid black',
44
- 'border_radius' => '',
45
- 'color' => '',
46
- 'background' => '',
47
- 'margin' => '',
48
- 'padding' => '1',
49
- 'shadow' => '',
50
- 'style' => '',
51
- 'width' => ''
52
- ), $args));
53
-
54
- $sty = 'style="';
55
-
56
- if ( $align ) {
57
- $align = strtolower($align);
58
- switch ( $align ) {
59
- case 'center':
60
- $sty .= 'display:block;margin-left:auto;margin-right:auto;';
61
- break;
62
- case 'right':
63
- $sty .= 'float:right;';
64
- break;
65
- default:
66
- $sty .= 'float:left;';
67
- break;
68
- }
69
- }
70
-
71
- if ( $border )
72
- $sty .= "border:{$border_rule};";
73
- if ( $border_radius )
74
- $sty .= "border-radius:{$border_radius}px;";
75
- if ( $shadow ) {
76
- if ( $shadow < 1 ) $shadow = 1;
77
- if ( $shadow > 5 ) $shadow = 5;
78
- $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
79
- }
80
- if ( $color )
81
- $sty .= "color:{$color};";
82
- if ( $background )
83
- $sty .= "background-color:{$background};";
84
- if ( $margin )
85
- $sty .= "margin:{$margin}em;";
86
- if ( $padding )
87
- $sty .= "padding:{$padding}em;";
88
- if ( $width )
89
- $sty .= "width:{$width}%;";
90
- if ( $sty )
91
- $sty .= $style;
92
- $sty .= '"'; // finish it
93
-
94
- return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
95
- }
96
-
97
- // =============== [hide_if] ===================
98
- function wvrx_ts_sc_hide_if($args = '', $text ) {
99
-
100
- return wvrx_ts_show_hide_if( $args, $text, false );
101
- }
102
-
103
- // =============== [show_if] ===================
104
- function wvrx_ts_sc_show_if($args = '', $text ) {
105
- return wvrx_ts_show_hide_if( $args, $text, true );
106
- }
107
-
108
- // =============== [show_hide_if] ===================
109
- function wvrx_ts_show_hide_if($args = '', $text, $show) {
110
- extract(shortcode_atts(array(
111
- 'device' => 'default', // desktop, mobile, smalltablet, phone, all
112
- 'logged_in' => 'default', // true or false
113
- 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
114
- 'post_id' => 'default', // comma separated list
115
- 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
116
- ), $args));
117
-
118
- $valid_device = array('default','desktop','mobile','smalltablet','phone','all');
119
-
120
- if ( !in_array( $device, $valid_device )) {
121
- return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
122
-
123
- }
124
- if ( $logged_in == 'default' ) { // **** logged_in
125
- $logged_in = true;
126
- } else {
127
- $is_true = is_user_logged_in();
128
- $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : !$is_true;
129
- }
130
-
131
- if ( $not_post_id == 'default') { // **** pages
132
- $not_post_id = true;
133
- } else {
134
- $list = explode(',', str_replace(' ', '', $not_post_id));
135
- $not_post_id = !in_array( get_the_ID(), $list );
136
- }
137
-
138
- if ( $post_id == 'default') { // **** pages
139
- $post_id = true;
140
- } else {
141
- $list = explode(',', str_replace(' ', '', $post_id));
142
- $post_id = in_array( get_the_ID(), $list );
143
- }
144
-
145
- if ( $user_can == 'default') { // **** user_can
146
- $user_can = true;
147
- } else {
148
- $user_can = current_user_can( strtolower( $user_can) );
149
- }
150
-
151
- $x = true;
152
- if ( $x == 'default') {
153
- $x = true;
154
- } else {
155
- $x = $show;
156
- }
157
-
158
- $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
159
-
160
- if ( !$all_true ) { // device irrelevant
161
- // $text .= '* ALL TRUE FAILED *';
162
- if ( !$show )
163
- return do_shortcode( $text ); // hide fails, so show it
164
- else
165
- return ''; // show fails, so hide it
166
-
167
- } elseif ( $device == 'default') { // so all other conditions passed, see if specified device
168
- // $text .= '* ALL TRUE, DEVICE DEFAULT *';
169
- if ( $show )
170
- return do_shortcode( $text );
171
- else
172
- return '';
173
- } else {
174
- // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
175
- if ( $show ) {
176
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('show-' . $device); // for [extra_menu]
177
- } else {
178
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('hide-' . $device);
179
- }
180
- $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode($text) . '</div>';
181
- unset( $GLOBALS['wvrx_sc_show_hide'] );
182
- return $ret;
183
- }
184
- return '';
185
- }
186
-
187
-
188
- // =============== [header_image style='customstyle'] ===================
189
- function wvrx_ts_sc_header_image($args = ''){
190
- extract(shortcode_atts(array(
191
- 'style' => '', // STYLE
192
- 'h' => '',
193
- 'w' => ''
194
- ), $args));
195
-
196
- $width = $w ? ' width="' . $w . '"' : '';
197
- $height = $h ? ' height="' . $h . '"' : '';
198
- $st = $style ? ' style="' . $style . '"' : '';
199
-
200
- $hdrimg = '<img src="' . get_header_image() . '"' . $st . $width . $height
201
- . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
202
-
203
- return $hdrimg;
204
- }
205
-
206
- // =============== [bloginfo arg='name'] ======================
207
- function wvrx_ts_sc_bloginfo($args = '') {
208
- extract(shortcode_atts(array(
209
- 'arg' => 'name', // a WP bloginfo name
210
- 'style' => '' // wrap with style
211
- ), $args));
212
-
213
- $code = '';
214
- if ($style != '') $code = '<span style="' . $style . '">';
215
- $code .= esc_attr( get_bloginfo( $arg ));
216
- if ($style != '') $code .= '</span>';
217
- return $code;
218
- }
219
-
220
- // =============== [site_title style='customstyle'] ======================
221
- function wvrx_ts_sc_site_title($args = '') {
222
- extract(shortcode_atts(array(
223
- 'style' => '', /* styling for the header */
224
- 'matchtheme' => false
225
- ), $args));
226
-
227
- $title = esc_html( get_bloginfo( 'name', 'display' ));
228
-
229
- $before = '';
230
- $after = '';
231
-
232
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
233
- $before = '<h1' . weaverx_title_class( 'site_title', false, 'site-title' ) . '><a href="' . esc_url( home_url( '/' ) ) . '" title="' . $title . '" rel="home">';
234
- $after = '</a></h1>';
235
- }
236
-
237
- if ($style) {
238
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
239
- }
240
- return $before . $title . $after;
241
-
242
- }
243
-
244
- // =============== [site_tagline style='customstyle'] ======================
245
- function wvrx_ts_sc_site_tagline($args = '') {
246
- extract(shortcode_atts(array(
247
- 'style' => '', /* styling for the header */
248
- 'matchtheme' => false
249
- ), $args));
250
-
251
- $title = get_bloginfo( 'description' );
252
-
253
- $before = '';
254
- $after = '';
255
-
256
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
257
- $before = '<h2' . weaverx_title_class( 'tagline', false, 'site-tagline' ) . '>';
258
- $after = '</h2>';
259
- }
260
-
261
- if ($style) {
262
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
263
- }
264
- return $before . $title . $after;
265
- }
266
-
267
- // =============== [iframe src='address' height=nnn] ======================
268
- function wvrx_ts_sc_iframe($args = '') {
269
- extract(shortcode_atts(array(
270
- 'src' => '',
271
- 'height' => '600', /* styling for the header */
272
- 'percent' => 100,
273
- 'style' => 'border:1px;'
274
- ), $args));
275
-
276
- $sty = $style ? ' style="' . $style . '"' : '';
277
-
278
- if (!$src) return __('<h4>No src address provided to [iframe].</h4>','weaver-xtreme' /*adm*/);
279
- return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
280
- }
281
-
282
- // =============== [iframe src='address' height=nnn] ======================
283
- function wvrx_ts_sc_login($args = '') {
284
- extract(shortcode_atts(array(
285
- ), $args));
286
-
287
- return '<span class="wvrx-loginout">' . wp_loginout( '', false ) . '</span>';
288
- }
289
-
290
- // =============== [tab_group ] ======================
291
- function wvrx_ts_sc_tab_group( $args, $content ) {
292
- extract( shortcode_atts( array(
293
- 'border_color' => '', // tab and pane bodder color - default #888
294
- 'tab_bg' => '', // normal bg color of tab (default #CCC)
295
- 'tab_selected_color' => '', // color of tab when selected (default #EEE)
296
- 'pane_min_height' => '', // min height of a pane to help make all even if needed
297
- 'pane_bg' => '' // bg color of pane
298
- ), $args ) );
299
-
300
- if (isset($GLOBALS['wvrx_ts_in_tab_container']) && $GLOBALS['wvrx_ts_in_tab_container']) {
301
- return __('<strong>Sorry, you cannot nest tab_containers.</strong>','weaver-xtreme' /*adm*/);
302
- }
303
-
304
- // enqueue the theme support jslib only now when it will actually be needed!
305
-
306
- wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
307
-
308
- if ( !isset( $GLOBALS['wvrx_ts_tab_id'] ) )
309
- $GLOBALS['wvrx_ts_tab_id'] = 1;
310
- else
311
- ++$GLOBALS['wvrx_ts_tab_id'];
312
-
313
- $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
314
-
315
- $css = ''; // default styles
316
- $add_style = '';
317
- if ($border_color != '')
318
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
319
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
320
-
321
- if ($pane_min_height != '')
322
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
323
-
324
- if ($pane_bg != '')
325
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
326
-
327
- if ($tab_bg != '')
328
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
329
-
330
- if ($tab_selected_color != '')
331
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
332
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
333
-
334
- if ($css != '') { // specified some style...
335
- $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
336
- }
337
-
338
- $GLOBALS['wvrx_ts_in_tab_container'] = true;
339
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
340
-
341
- do_shortcode( $content ); // process the tabs on this
342
-
343
- $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
344
-
345
- if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
346
- foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
347
- $tabs[] = '<span>' . $tab['title'] . '</span>'. "\n";
348
- $panes[] = "\n" .'<div class="wvr-tabs-pane">' . $tab['content'] . '</div>';
349
- }
350
- $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
351
- . '<div class="wvr-tabs-nav">' . "\n"
352
- . implode( '', $tabs ) . '</div>' . "\n"
353
- . '<div class="wvr-tabs-panes">'
354
- . implode( '', $panes ) . "\n"
355
- . '</div><div class="wvr-tabs-clear"></div>' . "\n"
356
- . '</div> <!-- end tab_group -->' . "\n";
357
- }
358
-
359
- // Forget globals we generated
360
- unset( $GLOBALS['wvrx_ts_in_tab_container'],$GLOBALS['wvrx_ts_tabs'],$GLOBALS['wvrx_ts_num_tabs']);
361
-
362
- return $add_style . $out;
363
- }
364
-
365
- function wvrx_ts_sc_tab( $args, $content ) {
366
- extract( shortcode_atts( array(
367
- 'title' => 'Tab %d'
368
- ), $args ) );
369
-
370
- if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
371
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
372
- }
373
- $cur = $GLOBALS['wvrx_ts_num_tabs'];
374
- $GLOBALS['wvrx_ts_tabs'][$cur] = array(
375
- 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
376
- 'content' => do_shortcode( $content ) );
377
- $GLOBALS['wvrx_ts_num_tabs']++;
378
- }
379
-
380
-
381
- // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
382
- function wvrx_ts_sc_youtube($args = '') {
383
- $share = '';
384
- if ( isset ( $args[0] ) )
385
- $share = trim($args[0]);
386
-
387
- // http://code.google.com/apis/youtube/player_parameters.html
388
- // not including: enablejsapi, fs,playerapiid,
389
-
390
- extract(shortcode_atts(array(
391
- 'autohide' => '~!',
392
- 'autoplay' => '0',
393
- 'id' => '',
394
- 'sd' => false,
395
- 'related' => '0',
396
- 'privacy' => false,
397
- 'ratio' => false,
398
- 'center' => '1',
399
- 'border' => '0',
400
- 'color' => false,
401
- 'color1' => false,
402
- 'color2' => false,
403
- 'controls' => '1',
404
- 'disablekb' => '0',
405
- 'egm' => '0',
406
- 'fs' => '1',
407
- 'fullscreen' => 1,
408
- 'hd' => '0',
409
- 'iv_load_policy' => '1',
410
- 'loop' => '0',
411
- 'modestbranding' => '0',
412
- 'origin' => false,
413
- 'percent' => 100,
414
- 'playlist' => false,
415
- 'rel' => '0',
416
- 'showinfo' => '1',
417
- 'showsearch' => '1',
418
- 'start' => false,
419
- 'theme' => 'dark',
420
- 'wmode' => 'transparent'
421
-
422
- ), $args));
423
-
424
- if (!$share && !$id)
425
- return __('<strong>No share or id values provided for youtube shortcode.</strong>','weaver-xtreme' /*adm*/);
426
-
427
- if ($share) { // let the share override any id
428
- $share = str_replace('youtu.be/','',$share);
429
- if (strpos($share,'youtube.com/watch') !== false) {
430
- $share = str_replace('www.youtube.com/watch?v=', '', $share);
431
- $share = str_replace('&amp;','+',$share);
432
- $share = str_replace('&','+',$share);
433
- }
434
- $share = str_replace('http://','',$share);
435
- $share = str_replace('https://','',$share);
436
- if ($share)
437
- $id = $share;
438
- }
439
-
440
- $opts = $id . '%%';
441
-
442
- $opts = wvrx_ts_add_url_opt($opts, $hd != '0', 'hd=1');
443
- $opts = wvrx_ts_add_url_opt($opts, $autohide != '~!', 'autohide='.$autohide);
444
- $opts = wvrx_ts_add_url_opt($opts, $autoplay != '0', 'autoplay=1');
445
- $opts = wvrx_ts_add_url_opt($opts, $border != '0', 'border=1');
446
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color='.$color);
447
- $opts = wvrx_ts_add_url_opt($opts, $color1, 'color1='.$color1);
448
- $opts = wvrx_ts_add_url_opt($opts, $color2, 'color2='.$color2);
449
- $opts = wvrx_ts_add_url_opt($opts, $controls != '1', 'controls=0');
450
- $opts = wvrx_ts_add_url_opt($opts, $disablekb != '0', 'disablekb=1');
451
- $opts = wvrx_ts_add_url_opt($opts, $egm != '0', 'egm=1');
452
- $opts = wvrx_ts_add_url_opt($opts, true, 'fs='.$fs);
453
- $opts = wvrx_ts_add_url_opt($opts, true, 'iv_load_policy='.$iv_load_policy);
454
- $opts = wvrx_ts_add_url_opt($opts, $loop != '0', 'loop=1');
455
- $opts = wvrx_ts_add_url_opt($opts, $modestbranding != '0', 'modestbranding=1');
456
- $opts = wvrx_ts_add_url_opt($opts, $origin, 'origin='.$origin);
457
- $opts = wvrx_ts_add_url_opt($opts, $playlist, 'playlist='.$playlist);
458
- $opts = wvrx_ts_add_url_opt($opts, true, 'rel='.$rel);
459
- $opts = wvrx_ts_add_url_opt($opts, true, 'showinfo=' . $showinfo);
460
- $opts = wvrx_ts_add_url_opt($opts, $showsearch != '1', 'showsearch=0');
461
- $opts = wvrx_ts_add_url_opt($opts, $start, 'start='.$start);
462
- $opts = wvrx_ts_add_url_opt($opts, $theme != 'dark', 'theme=light');
463
- $opts = wvrx_ts_add_url_opt($opts, $wmode, 'wmode='.$wmode);
464
-
465
- $url = '//';
466
-
467
- if ($privacy) $url .= 'www.youtube-nocookie.com';
468
- else $url .= 'www.youtube.com';
469
-
470
- $opts = str_replace('%%+','%%?', $opts);
471
- $opts = str_replace('%%','', $opts);
472
- $opts = str_replace('+','&amp;', $opts);
473
-
474
- $url .= '/embed/' . $opts;
475
-
476
-
477
- $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
478
-
479
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
480
- "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
481
- $cntr2 = '</div>';
482
- $h = 9; $w = 16;
483
- if ( $sd ) {
484
- $h = 3; $w = 4;
485
- }
486
-
487
- $ret ="\n" . $cntr1 . '<iframe src="' . $url
488
- . '" frameborder="0" width="'.$w.'" height="' . $h . '" frameborder="0" ' . $allowfull . '></iframe>'
489
- . $cntr2 . "\n";
490
-
491
- return $ret;
492
- }
493
-
494
- // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
495
- function wvrx_ts_sc_vimeo($args = '') {
496
- $share = '';
497
- if ( isset ( $args[0] ) )
498
- $share = trim($args[0]);
499
-
500
- extract(shortcode_atts(array(
501
- 'id' => '',
502
- 'sd' => false,
503
- 'color' => '',
504
- 'autoplay' => false,
505
- 'loop' => false,
506
- 'portrait' => true,
507
- 'title' => true,
508
- 'byline' => true,
509
- 'percent' => 100,
510
- 'center' => '1'
511
- ), $args));
512
-
513
- if (!$share && !$id) return __('<strong>No share or id values provided for vimeo shortcode.</strong>','weaver-xtreme' /*adm*/);
514
-
515
- if ($share) { // let the share override any id
516
- $share = str_replace('http://vimeo.com/','',$share);
517
- if ($share) $id = $share;
518
- }
519
-
520
- $opts = $id . '##';
521
-
522
- $opts = wvrx_ts_add_url_opt($opts, $autoplay, 'autoplay=1');
523
- $opts = wvrx_ts_add_url_opt($opts, $loop, 'loop=1');
524
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color=' . $color);
525
- $opts = wvrx_ts_add_url_opt($opts, !$portrait, 'portrait=0');
526
- $opts = wvrx_ts_add_url_opt($opts, !$title, 'title=0');
527
- $opts = wvrx_ts_add_url_opt($opts, !$byline, 'byline=0');
528
-
529
- $url = '//player.vimeo.com/video/';
530
-
531
- $opts = str_replace('##+','##?', $opts);
532
- $opts = str_replace('##','', $opts);
533
- $opts = str_replace('+','&amp;', $opts);
534
-
535
- $url .= $opts;
536
-
537
- if (function_exists('weaverii_use_mobile'))
538
- if (weaverii_use_mobile('mobile')) $percent = 100;
539
-
540
-
541
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
542
- "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
543
- $cntr2 = '</div>';
544
- $h = 9; $w = 16;
545
- if ( $sd ) {
546
- $h = 3; $w = 4;
547
- }
548
-
549
- $ret = "\n" . $cntr1 . '<iframe src="' . $url
550
- . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
551
- . $cntr2 . "\n";
552
-
553
- return $ret;
554
- }
555
-
556
- // ===== video utils =====
557
-
558
- function wvrx_ts_add_url_opt($opts, $add, $add_val) {
559
- if ($add) {
560
- $opts = $opts . '+' . $add_val;
561
- }
562
- return $opts;
563
- }
564
-
565
-
566
-
567
- function wvrx_ts_sc_html($vals = '') { // [html style='customstyle'] - all ======================
568
- $tag = 'span';
569
- if ( isset ( $vals[0] ) )
570
- $tag = trim( $vals[0]);
571
-
572
- extract(shortcode_atts(array(
573
- 'args' => ''
574
- ), $vals));
575
- if ($args) $args = ' ' . $args;
576
- return '<' . $tag . $args . '>';
577
- }
578
-
579
- function wvrx_ts_sc_div($vals = '',$text) { // [div] - all ===================
580
- extract(shortcode_atts(array(
581
- 'id' => '',
582
- 'class' => '',
583
- 'style' => ''
584
- ), $vals));
585
-
586
- $args = '';
587
- if ($id) $args .= ' id="' . $id . '"';
588
- if ($class) $args .= ' class="' . $class . '"';
589
- if ($style) $args .= ' style="' . $style . '"';
590
-
591
- return '<div' . $args . '>' . do_shortcode($text) . '</div>';
592
- }
593
-
594
- function wvrx_ts_sc_span($vals = '',$text) { // [span] - all ==================
595
- extract(shortcode_atts(array(
596
- 'id' => '',
597
- 'class' => '',
598
- 'style' => ''
599
- ), $vals));
600
-
601
- $args = '';
602
- if ($id) $args .= ' id="' . $id . '"';
603
- if ($class) $args .= ' class="' . $class . '"';
604
- if ($style) $args .= ' style="' . $style . '"';
605
-
606
- return '<span' . $args . '>' . do_shortcode($text) . '</span>';
607
- }
608
-
609
- function wvrx_ts_weaverx_sc_info() { // [info] ======================
610
- global $current_user;
611
- $out = __('<strong>Theme/User Info</strong><hr />','weaver-xtreme' /*adm*/);
612
-
613
- get_currentuserinfo();
614
- if (isset($current_user->display_name)) {
615
- $out .= __('<em>User:</em> ','weaver-xtreme' /*adm*/) . $current_user->display_name . '<br />';
616
- }
617
- $out .= '&nbsp;&nbsp;' . wp_register('','<br />',false);
618
- $out .= '&nbsp;&nbsp;' . wp_loginout('',false) . '<br />';
619
-
620
- $agent = __('Not Available','weaver-xtreme' /*adm*/);
621
- if (isset($_SERVER["HTTP_USER_AGENT"]) )
622
- $agent = $_SERVER['HTTP_USER_AGENT'];
623
- $out .= __('<em>User Agent</em>:','weaver-xtreme' /*adm*/) . ' <small>' . $agent . '</small>';
624
- $out .= '<div id="example"></div>
625
- <script type="text/javascript">
626
- var txt = "";
627
- var myWidth;
628
- if( typeof( window.innerWidth ) == "number" ) {
629
- //Non-IE
630
- myWidth = window.innerWidth;
631
- } else if( document.documentElement &&
632
- ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
633
- //IE 6+ in "standards compliant mode"
634
- myWidth = document.documentElement.clientWidth;
635
- } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
636
- //IE 4 compatible
637
- myWidth = document.body.clientWidth;
638
- }
639
- txt+= "<em>Browser Width: </em>" + myWidth + " px</br>";
640
- document.getElementById("example").innerHTML=txt;
641
- </script>';
642
-
643
- $out .= __('<em>Feed title:</em> ','weaver-xtreme' /*adm*/) . get_bloginfo_rss('name') . '<br />' . get_wp_title_rss();
644
-
645
- $out .= __('<br /><em>You are using</em> WordPress ','weaver-xtreme' /*adm*/) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
646
- $out .= __('<br /><em>Memory:</em> ','weaver-xtreme' /*adm*/) . round(memory_get_usage()/1024/1024,2) . 'M of ' . (int)ini_get('memory_limit') . 'M <hr />';
647
- return $out;
648
- }
649
-
650
-
651
- function wvrx_ts_set_shortcodes($sc_list, $prefix) {
652
- foreach ($sc_list as $sc_name => $sc_func) {
653
- remove_shortcode($prefix . $sc_name);
654
- add_shortcode($prefix . $sc_name,$sc_func);
655
- }
656
- }
657
-
658
- // =============== Utilities ======================
659
-
660
-
661
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/includes/wvrx-ts-widgets.php DELETED
@@ -1,169 +0,0 @@
1
- <?php
2
- /*
3
- * Weaver X Widgets and shortcodes - widgets
4
- */
5
-
6
- class WeaverX_Widget_Text extends WP_Widget {
7
-
8
- function WeaverX_Widget_Text() {
9
- $widget_ops = array('classname' => 'WeaverX_Widget_Text',
10
- 'description' => __('Text Widget with Two Columns - with HTML and shortcode support. Also adds shortcodes to standard Text widget.','weaver-xtreme' /*adm*/));
11
- $control_ops = array('width' => 400, 'height' => 350);
12
- $this->WP_Widget('wvrx2_text', __('Weaver X Text 2','weaver-xtreme' /*adm*/), $widget_ops, $control_ops);
13
- }
14
-
15
- function widget( $args, $instance ) {
16
- extract($args);
17
- $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
18
- $text = apply_filters( 'weaverx_text', $instance['text'], $instance );
19
- $text2 = apply_filters( 'weaverx_text', $instance['text2'], $instance );
20
- echo $before_widget;
21
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
22
- <div class="textwidget"><div style="float: left; width: 48%; padding-right: 2%;">
23
- <?php
24
- if ($instance['filter']) {
25
- echo(wpautop($text)); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
26
- echo(wpautop($text2)); echo('</div><div style="clear: both;"></div>');
27
- } else {
28
- echo($text); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
29
- echo($text2); echo('</div><div style="clear: both;"></div>');
30
- }
31
- ?>
32
- </div>
33
- <?php
34
- echo $after_widget;
35
- }
36
-
37
- function update( $new_instance, $old_instance ) {
38
- $instance = $old_instance;
39
- $instance['title'] = strip_tags($new_instance['title']);
40
- if ( current_user_can('unfiltered_html') ) {
41
- $instance['text'] = $new_instance['text'];
42
- $instance['text2'] = $new_instance['text2'];
43
- }
44
- else {
45
- $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
46
- $instance['text2'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text2']) ) );
47
- }
48
- $instance['filter'] = isset($new_instance['filter']);
49
- return $instance;
50
- }
51
-
52
- function form( $instance ) {
53
- $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'text2' => '', 'filter' => 0) );
54
- $title = strip_tags($instance['title']);
55
- $text = format_to_edit($instance['text']);
56
- $text2 = format_to_edit($instance['text2']);
57
- ?>
58
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title:' /*a*/ ); ?></label>
59
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
60
-
61
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
62
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text2'); ?>" name="<?php echo $this->get_field_name('text2'); ?>"><?php echo $text2; ?></textarea>
63
- <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> />
64
- &nbsp;<label for="<?php echo $this->get_field_id('filter'); ?>"><?php echo 'Automatically add paragraphs'; ?></label></p>
65
- <?php
66
- }
67
- }
68
-
69
- /**
70
- * Weaver X Per Page Text
71
- */
72
- class WeaverX_Widget_PPText extends WP_Widget {
73
-
74
- function WeaverX_Widget_PPText() {
75
- $widget_ops = array('classname' => 'wvrx_widget_pptext', 'description' =>
76
- __('Display text on a Per Page basis. Add to Widget area to see instructions.','weaver-xtreme' /*adm*/) );
77
- $this->WP_Widget('wvrx_pptext', __('Weaver X Per Page Text','weaver-xtreme' /*adm*/), $widget_ops);
78
- }
79
-
80
- function widget( $args, $instance ) {
81
- extract($args);
82
- $title = get_post_meta(get_the_ID(),'wvrx_ts_pp_title',true);
83
- $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
84
-
85
- if (empty($title) && empty($text))
86
- return;
87
-
88
- echo $before_widget;
89
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
90
- echo do_shortcode($text);
91
- echo $after_widget;
92
- }
93
-
94
- function update( $new_instance, $old_instance ) {
95
- $instance = $old_instance;
96
- $instance['title'] = strip_tags($new_instance['title']);
97
-
98
- return $instance;
99
- }
100
-
101
- function form( $instance ) {
102
- ?>
103
- <p><?php _e('This widget will work like a text widget, but the title and content are defined by custom
104
- fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>
105
- if you want a title, and define Custom Field <em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text,
106
- HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom
107
- fields are defined when that page is displayed. (This widget won\'t display on the default blog or other archive-like pages.)','weaver-xtreme' /*adm*/); ?><p>
108
- <?php
109
- }
110
- }
111
-
112
- /**
113
- * Weaver X login
114
- */
115
- class WeaverX_Widget_Login extends WP_Widget {
116
-
117
- function WeaverX_Widget_Login() {
118
- $widget_ops = array('classname' => 'wvrx_widget_login', 'description' => __( "Log in/out, admin", 'weaver-xtreme' /*adm*/ ) );
119
- $this->WP_Widget('wvrx_login', __('Weaver X Login','weaver-xtreme' /*adm*/), $widget_ops);
120
- }
121
-
122
- function widget( $args, $instance ) {
123
- extract($args);
124
- $title = apply_filters('widget_title', empty($instance['title']) ? __('Login', 'weaver-xtreme' /*adm*/ ) : $instance['title'], $instance, $this->id_base);
125
-
126
- echo $before_widget;
127
- if ( $title )
128
- echo $before_title . $title . $after_title;
129
- global $current_user;
130
- get_currentuserinfo();
131
- if (isset($current_user->display_name))
132
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaver-xtreme' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
133
- ?>
134
- <ul>
135
- <?php wp_register(); ?>
136
- <li><?php wp_loginout(); ?></li>
137
- </ul>
138
- <?php
139
- echo $after_widget;
140
- }
141
-
142
- function update( $new_instance, $old_instance ) {
143
- $instance = $old_instance;
144
- $instance['title'] = strip_tags($new_instance['title']);
145
-
146
- return $instance;
147
- }
148
-
149
- function form( $instance ) {
150
- $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
151
- $title = strip_tags($instance['title']);
152
- ?>
153
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','weaver-xtreme' /*adm*/); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
154
- <?php
155
- }
156
- }
157
-
158
-
159
- add_action("widgets_init", "wvrx_ts_load_widgets");
160
- add_filter('weaverx_text', 'do_shortcode');
161
- add_filter('widget_text', 'do_shortcode'); // add to standard text widget, too.
162
-
163
- function wvrx_ts_load_widgets() {
164
- register_widget("WeaverX_Widget_Text");
165
- register_widget("WeaverX_Widget_PPText");
166
- register_widget("WeaverX_Widget_Login");
167
- }
168
-
169
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/js/wvrx-ts-jslib.js DELETED
@@ -1,27 +0,0 @@
1
- /* *********************************************************************************
2
- * Weaver X Theme Support JavaScript support Library
3
- *
4
- * Author: WeaverTheme - www.weavertheme.com
5
- * @version 1.0
6
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
7
- * @author Bruce Wampler
8
- *
9
- * Notes - this library requires jQuery to be loaded
10
- * this library was cobbled together over a long period of time, so it contains a
11
- * bit of a jumble of straight JavaScript and jQuery calls. So it goes. It works.
12
- *
13
- *
14
- ************************************************************************************* */
15
-
16
-
17
- jQuery(document).ready(function($) { // self-defining function
18
- // Tabs
19
- $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
20
- $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
21
- .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
22
- });
23
- $('.wvr-tabs-pane').hide();
24
- $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
25
- $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
26
-
27
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/js/wvrx-ts-jslib.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(a){a(".wvr-tabs-nav").delegate("span:not(.wvr-tabs-current)","click",function(){a(this).addClass("wvr-tabs-current").siblings().removeClass("wvr-tabs-current").parents(".wvr-tabs").find(".wvr-tabs-pane").hide().eq(a(this).index()).show()});a(".wvr-tabs-pane").hide();a(".wvr-tabs-nav span:first-child").addClass("wvr-tabs-current");a(".wvr-tabs-panes .wvr-tabs-pane:first-child").show()});
 
3.2.1/1.2.1/readme.txt DELETED
@@ -1,148 +0,0 @@
1
- === Weaver Xtreme Theme Support ===
2
- Plugin Name: Weaver Xtreme Theme Support
3
- Plugin URI: http://weavertheme.com/plugins/
4
- Tags: weaver x theme, shortcodes, widgets
5
- Author URI: http://weavertheme.com/about/
6
- Contributors: wpweaver
7
- Author: wpweaver
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Requires at least: 4.0
11
- Tested up to: 4.2
12
- Stable tag: 1.2.1
13
-
14
- A useful shortcode and widget collection for Weaver Xtreme
15
-
16
- == Description ==
17
-
18
- This is the main theme suppot for the Weaver X Theme. This plugin provides a collection of useful shortcodes and widgets designed to complement the Weaver X theme. These shortcodes have been selected and developed based on requests and feedback from thousands of users of the Weaver X, Weaver II, and Aspen themes.
19
-
20
- While these shortcodes are optimized for the Weaver X theme, they will also work with full functionality for most WordPress themes, and can be used
21
- if you switch themes.
22
-
23
- Includes complete documentation help file. Instructions for using the shortcodes and widgets are in the help file. Use it for non-Weaver Xtreme themes.
24
-
25
- = Shortcodes included =
26
-
27
- * **[tab_group]** - Display content in a tabbed box.
28
- * **[youtube]** - Show your YouTube videos responsively, and with the capability to use any of the YouTube custom display options.
29
- * **[vimeo]** - Show your Vimeo videos responsively, and with the capability to use any of the Vimeo custom display options.
30
- * **[iframe]** - Quick and easy display of content in an iframe.
31
- * **[div]**, **[span]**, **[html]** - Add div, span, and other html to pages/posts without the need to switch to Text view.
32
- * **[hide/show_if]** - Show or hide content depending upon options: device, page ID, user capability, logged in status.
33
- * **[bloginfo]** - Display any information available from WordPress bloginfo function.
34
- * **[user_can]** - Display content base on logged in user role.
35
- * **[site_title]** - Display Site title.
36
- * **[site_tagline]** - Display Site tag line.
37
-
38
- = Widgets Included =
39
-
40
- * **Weaver X 2 Column Text Widget** - Add text into two columns in a widget
41
- * **Weaver X Per Page Text Widget** - Add a text widget on a per page basis
42
- * **Weaver X Login** - Simplified login widget
43
-
44
- = Licenses =
45
-
46
- * The Weaver X Theme Support plugin is licensed under the terms of the GNU GENERAL PUBLIC LICENSE, Version 2,
47
- June 1991. (GPL) The full text of the license is in the license.txt file.
48
- * All images included with this plugin are either original works of the author which
49
- have been placed into the public domain, or have been derived from other public domain sources,
50
- and thus need no license. (This does not include the images provided with any of the
51
- below listed scripts and libraries. Those images are covered by their respective licenses.)
52
-
53
- This plugin also includes several scripts and libraries that are covered under the terms
54
- of their own licenses in the listed files in the plugin distribution:
55
-
56
-
57
-
58
- == Installation ==
59
-
60
- It is easiest to use the Plugins : Add Plugin admin page, but you can do it manually, too:
61
-
62
- 1. Download the plugin archive and expand it
63
- 2. Upload all the plugin files and directories to your wp-content/plugins/weaverx-theme-support directory
64
- 3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for this plugin.
65
-
66
- == Frequently Asked Questions ==
67
-
68
- = Where can I get support for this plugin? =
69
-
70
- Support for this plugin can best be found at our forum - http://forum.weavertheme.com
71
-
72
- == Upgrade Notice ==
73
-
74
- This is the initial release of this plugin.
75
-
76
- == ChangeLog ==
77
- = 1.2.1 =
78
- * Tweak: Per Post CSS rules are only supported by Weaver Xtreme Plus.
79
-
80
- = 1.2 =
81
- * New: Improved automatic version update for Weaver Xtreme -
82
- avoids critical update delays due to WordPress theme review process time lag
83
- * Fixed issue with tabs shortcode
84
-
85
- = 1.1 =
86
- * Fixed some wording (ATW Show Posts -> Weaver Show Posts)
87
- * Updated WP compatibility level
88
- * Added new per page multi-column
89
-
90
- = 1.0.4 =
91
- * Fix: minor styling issue
92
-
93
- = 1.0.3 =
94
- * Fix: extra " in [ youtube ]
95
-
96
- = 1.0.2 =
97
- * Fix: z-index rule for tab shortcode
98
-
99
- = 1.0.1 =
100
- * New - Per Page/Post Report from Add-ons menu
101
- * Fix: '\1234' values in per post style
102
- * Fix: Internal name of Per Post Style - may cause loss of prevoius setting - sorry
103
-
104
- = 1.0 =
105
- * Minor tweaks
106
- * wvrx_ shortcode prefix option
107
-
108
- = 0.96 =
109
- * Fixed bug with Per page options on Page with Posts
110
- * Internal optimizations
111
-
112
- = 0.95.1 =
113
- * Only load if Weaver Xtreme is the active theme.
114
-
115
- = 0.95 =
116
- * Changed [ site_title ] and [ site_tagline ] to match theme style as option
117
-
118
- = 0.10 =
119
- * Fixed per page options when used with old Xtreme Plus version
120
-
121
- = 0.9 =
122
- * Added Per Page and Per Post admin support to plugin (removed from Xtreme theme)
123
-
124
- = 0.8 =
125
- * Added [ box ]
126
-
127
- = 0.7 =
128
- * Fixes for [ show/hide_if]
129
- * Removed unused files
130
-
131
- = 0.6 =
132
- * Fixed [ show/hide_if ] for multiple conditions that include device
133
- * Changed interface to Weaver Xtreme - all codes now just in Weaver X Add-ons tab
134
-
135
- = 0.5 =
136
- * Added [ show/hide_if ], removed [ hide_mobie ], [show_if_logged_in]
137
- * Updated Doc
138
- * Added action for interface to Weaver Xtreme "Add-ons" tab
139
-
140
- = 0.4 =
141
- * Optimized loading of jslib - only needed by tab group, so not loaded until shortcode used
142
-
143
- = 0.3 =
144
- * Fixed video shortcodes
145
-
146
- = 0.1 =
147
-
148
- * initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/weaverx-ts-admin-style.css DELETED
@@ -1,133 +0,0 @@
1
- /* Weaver admin style */
2
- .hide_me {display:none;}
3
-
4
- .wvrx_ts_green {font-weight:bold;color:green;}
5
- .wvrx_ts_yellow {font-weight:bold;color:orange;}
6
- .wvrx_ts_red {font-weight:bold;color:red;}
7
-
8
- .wvr-help ul {list-style: disc; margin-left:30px;}
9
- .wvr-option-section {font-weight:bold;font-size:120%;color:blue;}
10
-
11
- .wvr-wrap {
12
- max-width:95%;
13
- }
14
-
15
- .tab ul {
16
- margin-left: 1.15em;
17
- list-style: disc outside none;
18
- }
19
- .tab ol {
20
- list-style-position:outside;
21
- margin-left: 1.4em;
22
- margin-bottom:.6em;
23
- }
24
-
25
- .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
26
-
27
- div.yetii {
28
- width: 95%;
29
- margin: 0 0 20px 0;
30
- }
31
-
32
- ul.yetii {
33
- list-style-type: none;
34
- width: 100%;
35
- float: left;
36
- border-bottom: 4px ridge #ddd;
37
- margin-bottom: 8px;
38
- }
39
-
40
- ul.yetii li {
41
- margin: 0 2px 0 0;
42
- float: left;
43
- }
44
-
45
- ul.yetii a {
46
- float: left;
47
- display: block;
48
- padding: 4px 8px;
49
- border: 1px solid #ddd;
50
- border-bottom: 0;
51
- color: #666;
52
- background: #eee;
53
- text-decoration: none;
54
- font-weight: bold;
55
- }
56
-
57
- ul.yetii a:hover {
58
- background: #fff;
59
- }
60
-
61
- ul.yetii a.active {
62
- background: #fff;
63
- border-color: #00c;
64
- color: #00f;
65
- }
66
- /* -- */
67
- div.yetiisub {
68
- width: 100%;
69
- margin: 0 0 20px 0;
70
- }
71
-
72
- ul.yetiisub {
73
- list-style-type: none;
74
- width: 100%;
75
- float: left;
76
- margin-bottom: 8px;
77
- }
78
-
79
- ul.yetiisub li {
80
- margin: 0 2px 2px 0px;
81
- float: left;
82
- }
83
-
84
- ul.yetiisub a {
85
- float: left;
86
- padding: 4px 8px;
87
- border: 1px solid #ccc;
88
- color: #666;
89
- background: #f0f0f0;
90
- text-decoration: none;
91
- font-style: italic;
92
- font-weight: bold;
93
- }
94
-
95
- ul.yetiisub a:hover {
96
- background: #fefefe !important;
97
- }
98
-
99
- ul.yetiisub a.active {
100
- background: #fff;
101
- border-color: #00c;
102
- color: #00f;
103
- }
104
- .wvr-small-submit {
105
- padding: 1.0em 0;
106
- margin: 1px 0;
107
- font-size:90%;
108
- }
109
-
110
- .wvr-option-header {background:#D0D0D8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px;}
111
- .wvr-option-subheader {background:#EAEAEA;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px;}
112
- .wvr-row-header {background:#D0D0D8;line-height:1.8em;padding-left:4px;}
113
- .wvr-row-subheader {background:#EAEAEA;padding-left:4px;}
114
- .wvr-row-subheader-alt {background:#F4F4F4;padding-left:4px;}
115
- /* layouts for layout boxes */
116
- .l_layout {display:block; width:140px; height:110px; float:left; margin-right:10px; margin-bottom:10px; display:inline;border:1px solid #888; color:black;text-align:center;font:15px arial,sans-serif;}
117
- .l_layout span {display:block;}
118
- .l_header {width:140px; height:20px; background:#CCF; line-height:20px;}
119
- .l_content {width:100px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
120
- .l_contentcenter {width:60px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
121
- .l_content2 {width:80px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
122
- .l_contentw {width:140px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
123
- .l_stdbar {width:40px; height:70px; float:left; display:inline;}
124
- .l_widebar {width:60px; height:70px; float:left; display:inline;}
125
- .l_righttop {width:40px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
126
- .l_righttopwide {width:60px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
127
- .l_rightup {width:40px; height:25px; margin:0; background:#FAA; float:left; display:inline; line-height:25px;}
128
- .l_rightright {width:40px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
129
- .l_rightdown {width:40px; height:25px; margin:0; background:#AFA; float:left; display:inline; line-height:25px;}
130
- .l_leftleft {width:40px; height:70px; margin:0; background:#AFA; float:left; display:inline; line-height:70px;}
131
- .l_leftshort {width:30px; height:50px; margin:0; background:#AFA; float:left; display:inline; line-height:50px;}
132
- .l_skinny {width:30px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
133
- .l_footer {clear:left;width:140px; height:20px; background:#DDF; color:#000; line-height:20px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/weaverx-ts-admin-style.min.css DELETED
@@ -1,4 +0,0 @@
1
- .hide_me{display:none}.wvrx_ts_green{font-weight:bold;color:green}.wvrx_ts_yellow{font-weight:bold;color:orange}.wvrx_ts_red{font-weight:bold;color:red}.wvr-help ul{list-style:disc;margin-left:30px}.wvr-option-section{font-weight:bold;font-size:120%;color:blue}.wvr-wrap{max-width:95%}.tab ul{margin-left:1.15em;list-style:disc outside none}.tab ol{list-style-position:outside;margin-left:1.4em;margin-bottom:.6em}.js_button{background:#eee!important;font-weight:600!important;color:#585858!important}div.yetii{width:95%;margin:0 0 20px 0}ul.yetii{list-style-type:none;width:100%;float:left;border-bottom:4px ridge #ddd;margin-bottom:8px}ul.yetii li{margin:0 2px 0 0;float:left}ul.yetii a{float:left;display:block;padding:4px 8px;border:1px solid #ddd;border-bottom:0;color:#666;background:#eee;text-decoration:none;font-weight:bold}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;border-color:#00c;color:#00f}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}
2
- ul.yetiisub li{margin:0 2px 2px 0;float:left}ul.yetiisub a{float:left;padding:4px 8px;border:1px solid #ccc;color:#666;background:#f0f0f0;text-decoration:none;font-style:italic;font-weight:bold}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;border-color:#00c;color:#00f}.wvr-small-submit{padding:1.0em 0;margin:1px 0;font-size:90%}.wvr-option-header{background:#d0d0d8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px}.wvr-option-subheader{background:#eaeaea;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px}.wvr-row-header{background:#d0d0d8;line-height:1.8em;padding-left:4px}.wvr-row-subheader{background:#eaeaea;padding-left:4px}.wvr-row-subheader-alt{background:#f4f4f4;padding-left:4px}.l_layout{display:block;width:140px;height:110px;float:left;margin-right:10px;margin-bottom:10px;display:inline;border:1px solid #888;color:black;text-align:center;font:15px arial,sans-serif}
3
- .l_layout span{display:block}.l_header{width:140px;height:20px;background:#CCF;line-height:20px}.l_content{width:100px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentcenter{width:60px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_content2{width:80px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentw{width:140px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_stdbar{width:40px;height:70px;float:left;display:inline}.l_widebar{width:60px;height:70px;float:left;display:inline}.l_righttop{width:40px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_righttopwide{width:60px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_rightup{width:40px;height:25px;margin:0;background:#FAA;float:left;display:inline;line-height:25px}.l_rightright{width:40px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}
4
- .l_rightdown{width:40px;height:25px;margin:0;background:#AFA;float:left;display:inline;line-height:25px}.l_leftleft{width:40px;height:70px;margin:0;background:#AFA;float:left;display:inline;line-height:70px}.l_leftshort{width:30px;height:50px;margin:0;background:#AFA;float:left;display:inline;line-height:50px}.l_skinny{width:30px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}.l_footer{clear:left;width:140px;height:20px;background:#DDF;color:#000;line-height:20px}
 
 
 
 
3.2.1/1.2.1/weaverx-ts-style.css DELETED
@@ -1,110 +0,0 @@
1
- /*
2
- Style file for Weaver X Theme Support
3
-
4
- License: GPL
5
-
6
- Weaver X Theme Support
7
- Copyright (C) 2014-2015 Bruce E. Wampler - weaver@weavertheme.com
8
-
9
- This program is free software: you can redistribute it and/or modify
10
- it under the terms of the GNU General Public License as published by
11
- the Free Software Foundation, either version 3 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
-
19
- You should have received a copy of the GNU General Public License
20
- along with this program. If not, see <http://www.gnu.org/licenses/>.
21
-
22
- PLEASE - DO NOT EDIT THIS FILE
23
-
24
- If you MUST change the CSS for these shortcodes and widgets, use the
25
- Custom CSS features of Weaver X, or use a custom CSS plugin
26
- such as JetPack, which let you add CSS to your theme or plugins
27
- without modifying theme or plugin .css files.
28
- */
29
-
30
- /* rules for areas hidden in various hybrid "desktop" views */
31
-
32
- @media screen and (min-width:768px) { /* rules for desk top */
33
- .wvr-hide-desktop {display:none !important;}
34
- .wvr-hide-all {display:none !important;}
35
- .wvr-show-phone {display:none !important;}
36
- .wvr-show-mobile {display:none !important;}
37
- .wvr-show-smalltablet {display:none !important;}
38
- }
39
-
40
- @media screen and (min-width:581px) and (max-width:767px) { /* rules for small tablets */
41
- .wvr-hide-smalltablet {display:none !important;}
42
- .wvr-hide-mobile {display:none !important;}
43
- .wvr-hide-all {display:none !important;}
44
- .wvr-show-desktop {display:none !important;}
45
- .wvr-show-phone {display:none !important;}
46
- }
47
-
48
- @media screen and (max-width:580px) { /* rules for phones */
49
- .wvr-hide-phone {display:none !important;}
50
- .wvr-hide-mobile {display:none !important;}
51
- .wvr-hide-all {display:none !important;}
52
- .wvr-show-desktop {display:none !important;}
53
- .wvr-show-smalltablet {display:none !important;}
54
- }
55
-
56
- /* Tabs */
57
- .wvr-tabs {
58
- -webkit-box-sizing: border-box;
59
- -moz-box-sizing: border-box;
60
- box-sizing: border-box;
61
- margin: 0 0 1.5em 0;
62
- background:transparent;
63
- }
64
-
65
- .wvr-tabs-style .wvr-tabs-nav { /* top "bar" behind tabs */
66
- padding: 0px 20px 0px 0px;
67
- margin: 0;
68
- height: 32px;
69
- background-color: transparent;
70
- }
71
- .wvr-tabs-style .wvr-tabs-nav span { /* bg color of a tab */
72
- display: block;
73
- float: left;
74
- padding: 0 20px;
75
- height: 32px;
76
- line-height: 32px;
77
- margin-right: 5px;
78
- cursor: pointer;
79
- border-top: 1px solid #888; /* border-color */
80
- border-right: 1px solid #888;
81
- border-left: 1px solid #888;
82
- background: #ccc; /* tab-bg */
83
- border-top-left-radius:6px;
84
- border-top-right-radius:6px;
85
- position:relative;
86
- z-index:1;
87
- }
88
-
89
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current {
90
- position:relative;
91
- z-index:3;
92
- }
93
-
94
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
95
- .wvr-tabs-style .wvr-tabs-nav span:hover {
96
- background: #eee; /* tab-current-color */
97
- }
98
-
99
- .wvr-tabs-style .wvr-tabs-pane {
100
- padding: 15px;
101
- border: 1px solid #888; /* border-color */
102
- min-height:20px; /* pane-min-height */
103
- background-color:transparent; /* pane-bg */
104
- position:relative;
105
- z-index:2;
106
- }
107
-
108
- .wvr-tabs-panes {position:relative;z-index:2;} /* add line to tab */
109
-
110
- .wvr-tabs-nav {position:relative;z-index:3;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/weaverx-ts-style.min.css DELETED
@@ -1,2 +0,0 @@
1
- @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px;position:relative;z-index:1}
2
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current{position:relative;z-index:3}.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent;position:relative;z-index:2}.wvr-tabs-panes{position:relative;z-index:2}.wvr-tabs-nav{position:relative;z-index:3}
 
 
3.2.1/1.2.1/weaverx-ts.php DELETED
@@ -1,404 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Weaver Xtreme Theme Support
4
- Plugin URI: http://weavertheme.com/plugins
5
- Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
- Author: wpweaver
7
- Author URI: http://weavertheme.com/about/
8
- Version: 1.2.1
9
- License: GPL V3
10
-
11
- Weaver Xtreme Theme Support
12
-
13
- Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
-
30
- /* CORE FUNCTIONS
31
- */
32
- $theme = get_template_directory();
33
-
34
- if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
35
-
36
- define ('WVRX_TS_VERSION','1.2.1');
37
- define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
- define ('WVRX_TS_APPEARANCE_PAGE', false );
39
-
40
- function wvrx_ts_installed() {
41
- return true;
42
- }
43
-
44
-
45
- function wvrx_ts_plugins_url($file,$ext) {
46
- return plugins_url($file,__FILE__) . $ext;
47
- }
48
-
49
- function wvrx_ts_enqueue_scripts() { // action definition
50
-
51
- if (function_exists('wvrx_ts_slider_header')) wvrx_ts_slider_header();
52
-
53
- //-- Weaver X PLus js lib - requires jQuery...
54
-
55
- // put the enqueue script in the tabs shortcode where it belongs
56
-
57
- //wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION);
58
-
59
-
60
- // add plugin CSS here, too.
61
-
62
- wp_register_style('wvrx-ts-style-sheet',wvrx_ts_plugins_url('weaverx-ts-style', WVRX_TS_MINIFY.'.css'),null,WVRX_TS_VERSION,'all');
63
- wp_enqueue_style('wvrx-ts-style-sheet');
64
- }
65
-
66
- add_action('wp_enqueue_scripts', 'wvrx_ts_enqueue_scripts' );
67
-
68
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
69
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
70
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
71
-
72
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
73
-
74
- add_action('admin_menu', 'wvrx_ts_add_page_fields',11); // allow X-Plus to override us
75
-
76
- function wvrx_ts_add_page_fields() {
77
- add_meta_box('page-box', __('Weaver Xtreme Options For This Page (Theme Support Per Page Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_page_extras_load', 'page', 'normal', 'high');
78
- add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
79
- global $post;
80
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
81
- if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') ) {
82
- $i = 1;
83
- $args=array( 'public' => true, '_builtin' => false );
84
- $post_types = get_post_types($args,'names','and');
85
- foreach ($post_types as $post_type ) {
86
- add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras', $post_type, 'normal', 'high');
87
- $i++;
88
- }
89
- }
90
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin - needs to be here
91
-
92
- }
93
-
94
- function wvrx_ts_page_extras_load() {
95
- wvrx_ts_page_extras();
96
- }
97
-
98
- function wvrx_ts_post_extras_load() {
99
- wvrx_ts_post_extras();
100
- }
101
- }
102
-
103
- // ======================================== subthemes ========================================
104
- add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_action');
105
-
106
- function wvrx_ts_child_show_extrathemes_action() {
107
- echo '<h3 class="atw-option-subheader">' . __('Select an Add-on Subtheme You Have Uploaded','weaver-xtreme' /*adm*/) . '</h3>';
108
- $addon_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/';
109
- $addon_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes/addon-subthemes/';
110
-
111
- $addon_list = array();
112
- if($media_dir = @opendir($addon_dir)) { // build the list of themes from directory
113
- while ($m_file = readdir($media_dir)) {
114
- $len = strlen($m_file);
115
- $base = substr($m_file,0,$len-4);
116
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
117
- if($ext == '.wxt' ) {
118
- $addon_list[] = $base;
119
- }
120
- }
121
- }
122
-
123
- if (!empty($addon_list)) {
124
- natcasesort($addon_list);
125
-
126
- $cur_addon = weaverx_getopt('wvrx_addon_name');
127
- if ($cur_addon)
128
- echo '<h3>' . __('Currently selected Add-on Subtheme: ','weaver-xtreme' /*adm*/) . ucwords(str_replace('-',' ',$cur_addon)) . '</h3>';
129
- ?>
130
- <form enctype="multipart/form-data" name='pick_added_theme' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
131
-
132
- <h4><?php _e('Select an add-on subtheme:','weaver-xtreme' /*adm*/); ?></h4>
133
-
134
- <?php
135
- foreach ($addon_list as $addon) {
136
- $name = ucwords(str_replace('-',' ',$addon));
137
- ?>
138
- <div style="float:left; width:200px;">
139
- <label><input type="radio" name="wvrx_addon_name"
140
- <?php echo 'value="' . $addon . '"' . (weaverx_getopt('wvrx_addon_name') == $addon ? 'checked' : '') .
141
- '/> <strong>' . $name . '</strong><br />
142
- <img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . $addon_url . $addon . '.jpg" width="150px" height="113px" /><label></div>' . "\n";
143
- }
144
- ?>
145
- <div style="clear:both;"></div>
146
- <br /><span class='submit'><input name="set_added_subtheme" type="submit" value="<?php _e('Set to Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span>
147
- <small style="color:#b00;"><br /><?php _e('<strong>Note:</strong> Selecting a new subtheme will change only theme related settings.
148
- Options labelled with (&diams;) will be retained.
149
- You can use the Save/Restore tab to save a copy of all your current settings first.','weaver-xtreme' /*adm*/); ?></small>
150
-
151
- <?php weaverx_nonce_field('set_added_subtheme'); ?>
152
-
153
- <br /><br /><span class='atw-small-submit' style="margin-left:100px;"><input name="delete_added_subtheme" type="submit" value="<?php _e('Delete Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span> &nbsp;
154
- <small><?php _e('This will delete the selected Add-on Subtheme from the Add-on directory','weaver-xtreme' /*adm*/); ?></small>
155
- <?php weaverx_nonce_field('delete_added_subtheme'); ?>
156
- </form>
157
- <?php
158
- } else {
159
- ?>
160
- <p><?php _e('No Add-on Subthemes available.','weaver-xtreme' /*adm*/); ?></p>
161
- <?php
162
- }
163
- echo '<h3 class="atw-option-subheader">Upload an Add-on Subtheme From Your Computer</h3>';
164
- ?>
165
- <p><?php _e('You can find additional free and premium Add-on Subthemes for <em>Weaver Xtreme</em>','weaver-xtreme' /*adm*/); ?>
166
- <a href="http://xtreme.weavertheme.com/add-on-subthemes/" title="<?php _e('Weaver Xtreme Add-on Subthemes','weaver-xtreme' /*adm*/); ?>"><strong><?php _e('HERE','weaver-xtreme' /*adm*/); ?></strong></a>.</p>
167
- <form name='form_added_theme' enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
168
- <table>
169
- <tr valign="top">
170
- <td><strong><?php _e('Select Add-on Subtheme .zip file to upload:','weaver-xtreme' /*adm*/); ?></strong>
171
- <input name="uploaded_addon" type="file" />
172
- <input type="hidden" name="uploadaddon" value="yes" />
173
- </td>
174
- </tr>
175
- <tr><td>
176
- <span style="margin-left:50px;" class='submit'>
177
- <input name="upload_addon" type="submit" value="Upload Add-on Subtheme" /><br />
178
- </span>&nbsp;<small><?php _e('<strong>Upload and Save</strong> an Add-on Subtheme or Subtheme collection from .zip file on your computer. Will be saved on your site\'s filesystem.','weaver-xtreme' /*adm*/); ?></small>
179
- </td></tr>
180
- </table>
181
- <?php weaverx_nonce_field('upload_addon'); ?>
182
- </form>
183
-
184
- <?php
185
- }
186
-
187
- add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
188
- function wvrx_ts_child_process_options() {
189
-
190
- if (weaverx_submitted('set_added_subtheme') ) { // Set to selected addon - theme
191
- if (isset($_POST['wvrx_addon_name']))
192
- {
193
- $name = $_POST['wvrx_addon_name'];
194
-
195
- $openname = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt';
196
- $contents = file_get_contents($openname);
197
-
198
- if (!weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname)) {
199
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
200
- __('Sorry, there was a problem uploading your add on theme. The name you picked did not have a valid
201
- Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','weaver-xtreme' /*adm*/) . '</em></strong></p></div>';
202
- } else {
203
- weaverx_save_msg(__('Weaver Xtreme theme reset to ','weaver-xtreme' /*adm*/) .
204
- ucwords(str_replace('-',' ',$name )) . ' add-on subtheme.');
205
- weaverx_setopt('wvrx_addon_name',$name);
206
- }
207
- }
208
- }
209
-
210
- else if (weaverx_submitted('delete_added_subtheme') ) { // Delete selected addon theme
211
- if (isset($_POST['wvrx_addon_name']))
212
- {
213
- $name = $_POST['wvrx_addon_name'];
214
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt');
215
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.jpg');
216
- weaverx_save_msg(__('Deleted ','weaver-xtreme' /*adm*/) .
217
- ucwords(str_replace('-',' ',$name )) . __(' add-on subtheme.','weaver-xtreme' /*adm*/));
218
- }
219
- }
220
-
221
- else if (weaverx_submitted('upload_addon')
222
- && isset($_POST['uploadaddon'])
223
- && $_POST['uploadaddon'] == 'yes') {
224
- // upload theme from users computer
225
- // they've supplied and uploaded a file
226
- $ok = wvrx_ts_wunpackzip('uploaded_addon', weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/');
227
- }
228
-
229
- else if ( weaverx_submitted('toggle_shortcode_prefix') ) {
230
- $val = get_option('wvrx_toggle_shortcode_prefix');
231
- if ( $val ) {
232
- delete_option('wvrx_toggle_shortcode_prefix');
233
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes NOT prefixed with 'wvrx_'", 'weaver-xtreme'));
234
- } else {
235
- update_option('wvrx_toggle_shortcode_prefix', 'wvrx_');
236
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme'));
237
- }
238
- } else if ( weaverx_submitted('show_per_page_report')) {
239
- wvrx_ts_per_page_report();
240
- }
241
-
242
- }
243
-
244
- function wvrx_ts_wunpackzip($uploaded, $to_dir) {
245
- // upload theme from users computer
246
- // they've supplied and uploaded a file
247
- // This version and the one in Aspen Plus must be identical...
248
-
249
- $ok = true; // no errors so far
250
-
251
- if (isset($_FILES[$uploaded]['name'])) // uploaded_addon
252
- $filename = $_FILES[$uploaded]['name'];
253
- else
254
- $filename = "";
255
-
256
- if (isset($_FILES[$uploaded]['tmp_name'])) {
257
- $openname = $_FILES[$uploaded]['tmp_name'];
258
- } else {
259
- $openname = "";
260
- }
261
-
262
- //Check the file extension
263
- $check_file = strtolower($filename);
264
- $per = '.';
265
- $end = explode($per, $check_file); // workaround for PHP strict standards warning
266
- $ext_check = end($end);
267
-
268
- if (false && !weaverx_f_file_access_available()) {
269
- $errors[] = __('Sorry - Theme unable to access files.','weaver-xtreme' /*adm*/) . '<br />';
270
- $ok = false;
271
- }
272
-
273
- if ($filename == "") {
274
- $errors[] = __('You didn\'t select a file to upload.','weaver-xtreme' /*adm*/) . '<br />';
275
- $ok = false;
276
- }
277
-
278
- if ($ok && $ext_check != 'zip'){
279
- $errors[] = __("Uploaded files must have <em>.zip</em> extension.",'weaver-xtreme' /*adm*/) . "<br />";
280
- $ok = false;
281
- }
282
-
283
- if ($ok) {
284
- if (!weaverx_f_exists($openname)) {
285
- $errors[] = '<strong><em style="color:red;">' .
286
- __('Sorry, there was a problem uploading your file. You may need to check your folder permissions
287
- or other server settings.','weaver-xtreme' /*adm*/) . '</em></strong><br />' . __('Trying to use file','weaver-xtreme' /*adm*/) . "'$openname'";
288
- $ok = false;
289
- }
290
- }
291
-
292
- if ($ok) {
293
- // should be ready to go, but check out WP_Filesystem
294
- if (! WP_Filesystem()) {
295
- function wvrx_ts_wvx_return_direct() { return 'direct'; }
296
- add_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
297
- $try2 = WP_Filesystem();
298
- remove_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
299
- if (!$try2) {
300
- $errors[] = __('Sorry, there\'s a problem trying to use the WordPress unzip function. Please
301
- see the FAQ at weavertheme.com support for more information.','weaver-xtreme' /*adm*/);
302
- $ok = false;
303
- }
304
- }
305
- }
306
- if ($ok) {
307
- // $openname has uploaded .zip file to use
308
- // $filename has name of file uploaded
309
- $is_error = unzip_file( $openname, $to_dir );
310
- if ( !is_wp_error( $is_error ) ) {
311
- weaverx_save_msg(__('File ','weaver-xtreme' /*adm*/) . $filename . __(' successfully uploaded and unpacked to: <br />','weaver-xtreme' /*adm*/) . $to_dir);
312
- @unlink($openname); // delete temp file...
313
- } else {
314
- $errors[] = __("Sorry, unpacking the .zip you selected file failed. You may have a corrupt .zip file, or there many a file permissions problem on your WordPress installation.",'weaver-xtreme' /*adm*/);
315
- $errors[] = $is_error->get_error_message();
316
- $ok = false;
317
- }
318
- }
319
- if (!$ok) {
320
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' . __('ERROR','weaver-xtreme' /*adm*/) . '</em></strong></p><p>';
321
- foreach($errors as $error){
322
- echo $error.'<br />';
323
- }
324
- echo '</p></div>';
325
- }
326
- return $ok;
327
- }
328
-
329
- add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
330
- function wvrx_ts_child_saverestore_action() {
331
- echo '<h3 class="atw-option-subheader" style="font-style:italic">' . __('Use the <em>Weaver Xtreme Subthemes</em>
332
- tab to upload Add-on Subthemes.</h3><p>You can upload extra add-on subthemes you\'ve downloaded using the
333
- Subthemes tab. Note: the Save and Restore options on this page are for the custom settings you
334
- have created. These save/restore options are not related to Add-on Subthemes, although you can
335
- modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
336
- }
337
-
338
- add_action('weaverx_check_updates', 'weaverx_check_updates_action');
339
-
340
- function weaverx_check_updates_action() {
341
- require_once('wp-updates-theme-1411.php');
342
- $theme = basename(get_template_directory());
343
- new WPUpdatesThemeUpdater_1411( 'http://wp-updates.com/api/2/theme', $theme );
344
- }
345
-
346
- // --------------------------------------
347
- function wvrx_ts_per_page_report() {
348
- echo '<div style="border:1px solid black; padding:1em;background:#F8FFCC;width:70%;margin:1em auto 1em auto;">';
349
- echo "<h2>" . __('Show Pages and Posts with Per Page / Per Post Settings','weaverx-axtreme') . "</h2>\n";
350
- echo "<h3>" . __('Posts','weaverx-axtreme') . "</h3>\n";
351
- wvrx_ts_scan_section('post');
352
- echo "<h3>" . __('Pages','weaverx-axtreme') . "</h3>\n";
353
- wvrx_ts_scan_section('page');
354
- echo "</div>\n";
355
- }
356
-
357
- function wvrx_ts_scan_section($what) {
358
-
359
- $post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
360
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
361
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
362
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
363
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
364
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
365
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
366
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
367
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
368
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
369
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
370
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
371
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
372
- );
373
-
374
- $args = array('posts_per_page' => -1, 'post_type' => $what, 'post_status' => 'any' );
375
- echo '<ul>';
376
-
377
- $allposts = get_posts($args);
378
- foreach ($allposts as $post) {
379
- $id = $post->ID;
380
- setup_postdata($post);
381
- $meta = get_post_meta( $id );
382
- if (!empty($meta)) {
383
- $type = $post->post_type;
384
- $title = esc_html($post->post_title);
385
- $link = esc_url(get_permalink($id));
386
- $tlink = "<a href='{$link}' alt='Post {$id}' target='_blank'>{$title}</a>";
387
- $heading = false;
388
- foreach ($meta as $name => $val_array) { // old value gets put into $val_array[0]
389
- if (in_array($name, $post_fields) ) {
390
- $val = $val_array[0]; // easier to work with
391
- if ($type == 'page') {
392
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Page settings.','weaverx-axtreme') . "</li>\n";
393
- } else {
394
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Post settings.','weaverx-axtreme') . "</li>\n";
395
- }
396
- break;
397
- }
398
- }
399
- }
400
- }
401
- echo '</ul>';
402
- }
403
- } // end only load if Weaver Xtreme installed
404
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2.1/wp-updates-theme-1411.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
- /*
3
- WPUpdates Theme Updater Class
4
- http://wp-updates.com
5
- v2.0
6
-
7
- Example Usage:
8
- require_once('wp-updates-theme.php');
9
- new WPUpdatesThemeUpdater_1411( 'http://wp-updates.com/api/2/theme', basename(get_template_directory()) );
10
- */
11
-
12
- if( !class_exists('WPUpdatesThemeUpdater_1411') ) {
13
- class WPUpdatesThemeUpdater_1411 {
14
-
15
- var $api_url;
16
- var $theme_id = 1411;
17
- var $theme_slug;
18
- var $license_key;
19
-
20
- function __construct( $api_url, $theme_slug, $license_key = null ) {
21
- $this->api_url = $api_url;
22
- $this->theme_slug = $theme_slug;
23
- $this->license_key = $license_key;
24
-
25
- add_filter( 'pre_set_site_transient_update_themes', array(&$this, 'check_for_update') );
26
-
27
- // This is for testing only!
28
- //set_site_transient('update_themes', null);
29
- }
30
-
31
- function check_for_update( $transient ) {
32
- if (empty($transient->checked)) return $transient;
33
-
34
- $request_args = array(
35
- 'id' => $this->theme_id,
36
- 'slug' => $this->theme_slug,
37
- 'version' => $transient->checked[$this->theme_slug]
38
- );
39
- if ($this->license_key) $request_args['license'] = $this->license_key;
40
-
41
- $request_string = $this->prepare_request( 'theme_update', $request_args );
42
- $raw_response = wp_remote_post( $this->api_url, $request_string );
43
-
44
- $response = null;
45
- if( !is_wp_error($raw_response) && ($raw_response['response']['code'] == 200) )
46
- $response = unserialize($raw_response['body']);
47
-
48
- if( !empty($response) ) // Feed the update data into WP updater
49
- $transient->response[$this->theme_slug] = $response;
50
-
51
- return $transient;
52
- }
53
-
54
- function prepare_request( $action, $args ) {
55
- global $wp_version;
56
-
57
- return array(
58
- 'body' => array(
59
- 'action' => $action,
60
- 'request' => serialize($args),
61
- 'api-key' => md5(home_url())
62
- ),
63
- 'user-agent' => 'WordPress/'. $wp_version .'; '. home_url()
64
- );
65
- }
66
-
67
- }
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/help/help.html DELETED
@@ -1,584 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <title>Weaver X Theme Support</title>
6
- <style type="text/css">
7
- body {
8
- background: #eeeeee;
9
- margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
10
- padding: 10px; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
11
- color: #000000;
12
- text-align: left;
13
- font-family: Verdana, Arial, Helvetica, sans-serif;
14
- font-size: 10pt;
15
- background-color: #ffd;
16
- }
17
-
18
- /* everything about each major block on the site - may be mods in some places */
19
-
20
- #container {
21
- max-width:800px;
22
- background-color: #00CC00;
23
- }
24
- #mainContent {
25
- background-color: #ffc;
26
- }
27
- .oneColFixCtr #container {
28
- max-width: 750px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
29
- background: #FFFFCD;
30
- margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
31
- border: 1px solid #000000;
32
- text-align: left; /* this overrides the text-align: center on the body element. */
33
- }
34
- .oneColFixCtr #mainContent {
35
- padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
36
- font-size:12px;
37
- }
38
- /* layouts for layout boxes */
39
- .layoutbox {
40
- width:700px;
41
- text-align:center;
42
- margin:0 25px;
43
- }
44
- .l_layout {
45
- display:block;
46
- width:140px;
47
- height:110px;
48
- float:left;
49
- margin-right:10px;
50
- margin-bottom:10px;
51
- display:inline;
52
- border:1px solid #888;
53
- color:black;
54
- text-align:center;
55
- font:15px arial, sans-serif;
56
- }
57
- .l_layout span {
58
- display:block;
59
- }
60
- .l_header {
61
- width:140px;
62
- height:20px;
63
- background:#CCF;
64
- line-height:20px;
65
- }
66
- .l_content {
67
- width:100px;
68
- height:70px;
69
- background:beige;
70
- float:left;
71
- display:inline;
72
- line-height:70px;
73
- }
74
- .l_contentcenter {
75
- width:60px;
76
- height:70px;
77
- background:beige;
78
- float:left;
79
- display:inline;
80
- line-height:70px;
81
- }
82
- .l_content2 {
83
- width:80px;
84
- height:70px;
85
- background:beige;
86
- float:left;
87
- display:inline;
88
- line-height:70px;
89
- }
90
- .l_contentw {
91
- width:140px;
92
- height:70px;
93
- background:beige;
94
- float:left;
95
- display:inline;
96
- line-height:70px;
97
- }
98
- .l_stdbar {
99
- width:40px;
100
- height:70px;
101
- float:left;
102
- display:inline;
103
- }
104
- .l_widebar {
105
- width:60px;
106
- height:70px;
107
- float:left;
108
- display:inline;
109
- }
110
- .l_righttop {
111
- width:40px;
112
- height:20px;
113
- background:#FE8;
114
- float:left;
115
- display:inline;
116
- line-height:20px;
117
- }
118
- .l_righttopwide {
119
- width:60px;
120
- height:20px;
121
- background:#FE8;
122
- float:left;
123
- display:inline;
124
- line-height:20px;
125
- }
126
- .l_rightup {
127
- width:40px;
128
- height:25px;
129
- margin:0;
130
- background:#FAA;
131
- float:left;
132
- display:inline;
133
- line-height:25px;
134
- }
135
- .l_rightright {
136
- width:40px;
137
- height:50px;
138
- margin:0;
139
- background:#FAA;
140
- float:left;
141
- display:inline;
142
- line-height:50px;
143
- }
144
- .l_rightdown {
145
- width:40px;
146
- height:25px;
147
- margin:0;
148
- background:#AFA;
149
- float:left;
150
- display:inline;
151
- line-height:25px;
152
- }
153
- .l_leftleft {
154
- width:40px;
155
- height:70px;
156
- margin:0;
157
- background:#AFA;
158
- float:left;
159
- display:inline;
160
- line-height:70px;
161
- }
162
- .l_leftshort {
163
- width:30px;
164
- height:50px;
165
- margin:0;
166
- background:#AFA;
167
- float:left;
168
- display:inline;
169
- line-height:50px;
170
- }
171
- .l_skinny {
172
- width:30px;
173
- height:50px;
174
- margin:0;
175
- background:#FAA;
176
- float:left;
177
- display:inline;
178
- line-height:50px;
179
- }
180
- .l_footer {
181
- clear:left;
182
- width:140px;
183
- height:20px;
184
- background:#DDF;
185
- color:#000;
186
- line-height:20px;
187
- }
188
- h4 {
189
- font-weight: bold;
190
- font-style:italic;
191
- color: #000066;
192
- text-decoration: underline;
193
- }
194
- h3 {
195
- font-size: medium;
196
- font-weight: bold;
197
- color: #000066;
198
- text-decoration: underline;
199
- }
200
- h2 {
201
- font-size: large;
202
- font-weight: bold;
203
- color: #000066;
204
- text-decoration: underline;
205
- margin-top: 40pt;
206
- }
207
- h1 {
208
- font-size: x-large;
209
- font-weight: bold;
210
- color: #000066;
211
- text-decoration: underline;
212
- }
213
- .codebox {
214
- font-family: "Courier New", Courier, monospace;
215
- font-size: 10px;
216
- font-style: normal;
217
- background-color: #E8E8E8;
218
- margin: 10px;
219
- padding: 4px;
220
- border: 1px solid #333333;
221
- color: #000000;
222
- width: 80%;
223
- }
224
- .attrs {
225
- font-family: Arial, Helvetica, sans-serif;
226
- font-size: 10pt;
227
- color:#000000;
228
- text-decoration: none;
229
- }
230
- .css {
231
- font-family: "Courier New", Courier, monospace;
232
- font-size: 9pt;
233
- font-style: normal;
234
- }
235
- .box {
236
- color: #000000;
237
- text-decoration: none;
238
- margin: 5px;
239
- padding: 5px;
240
- border: thin solid #000000;
241
- }
242
- .nospace {
243
- margin-top: 5px;
244
- margin-bottom: 5px;
245
- }
246
- .style3 {
247
- font-family: "Courier New", Courier, monospace
248
- }
249
- .style4 {
250
- font-family: monospace
251
- }
252
- .style6 {
253
- color: #990000;
254
- font-style: italic;
255
- }
256
- .style7 {
257
- color: #CC3300;
258
- font-weight: bold;
259
- }
260
- .code1 {
261
- font-family: "Courier New", Courier, monospace;
262
- font-size: 14px;
263
- font-style: italic;
264
- }
265
- .red-highlight {
266
- color: #CC3300;
267
- }
268
- </style>
269
- </head>
270
- <body class="oneColFixCtr">
271
- <div id="container">
272
- <div id="mainContent"> <a name="top" id="top"></a>
273
- <h2><b>Weaver X Theme Support Plugin Documentation -- Version 1.0</b></h2>
274
- <h4>Table of Contents</h4>
275
- <ul style="line-height:1.7em;">
276
- <li><a href="#summary"><strong>Plugin Summary</strong></a></li>
277
- <li><strong><a href="#admin_page">Weaver X Theme Extras Admin Page</a> </strong></li>
278
- <li><a href="#sc_summary"><strong>Shortcode Summary</strong></a></li>
279
- <ul>
280
- <li><strong><a href="#bloginfo">[bloginfo arg='name' style='your css']</a></strong></li>
281
- <li><strong><a href="#box">[box]text[/box]</a></strong></li>
282
- <li><a href="#tab_group"><strong>[tab_group] - content in tabs</strong></a></li>
283
- <li><strong><a href="#headerimage">[header_image] Shortcode</a></strong></li>
284
- <li><strong><a href="#schtml">[html]</a></strong></li>
285
- <li><strong><a href="#scdiv">[div]text[/div]</a>, <a href="#schtml">[span]text[/span]</a></strong></li>
286
- <li><strong><a href="#sciframe"> [iframe]</a></strong></li>
287
- <li><strong><a href="#scshowif">[show/hide_if]</a></strong></li>
288
- <li><strong><a href="#sitetitlesc">[site_title], [site_tagline]</a></strong></li>
289
-
290
- <li><strong><a href="#video">Video - [vimeo], [youtube]</a></strong></li>
291
- </ul>
292
- <li><a href="#widg-sum"><strong>Widget Summary</strong></a>
293
- <ul>
294
- <li><strong><a href="#widg-login">Weaver X Login Widget</a></strong></li>
295
- <li><strong><a href="#widg_pp_text">Weaver X Per Page Text</a></strong></li>
296
- <li><strong><a href="#widg_text_2">Weaver X Text 2</a></strong></li>
297
- </ul>
298
- </li>
299
- </ul>
300
- <h3><a name="summary" id="summary"></a>Plugin Summary </h3>
301
- <p>The Weaver X Theme Support Plugin provides a collection of shortcodes to allow you to easily add extra content and features to your regular content. These shortcodes will work with almost any WordPress theme. </p>
302
- <p>While these shortcodes should prove useful with most any theme, one of the goals of these shortcodes is to provide an alternative to users of the Weaver X theme.</p>
303
- <h2><a name="admin_page" id="admin_page"></a>Weaver Xtreme Theme Extras Admin Page</h2>
304
- <p>This plugin has just a few options, all found on the Weaver X Theme Support admin page under the WordPress dashboard Appearance section.</p>
305
- <h2><a name="sc_summary" id="sc_summary"></a>Shortcode Summary</h2>
306
- <h3><a name="tab_group" id="tab_group"></a>[tab_group] - content in tabs </h3>
307
- <p>Show content displayed on tabbed pages.</p>
308
- <p><strong>Shortcode usage:</strong><br />
309
- <pre>
310
- [tab_group border_color=black page_min_height=200px]
311
- [tab title='tab one']This is the content found on first tab.[/tab]
312
- [tab title='tab two']And we have more content for the second tab.[/tab]
313
- [tab title='last tab']And this is the last tab. There could be more.[/tab]
314
- [/tab_group]
315
- </pre>
316
- <h4>Short code parameters</h4>
317
- You can supply values for these parameters to control the look of the tabbed section.
318
- <br />
319
- <ul>
320
- <li><b>border_color:</b> tab and pane border color - default #888</li>
321
- <li><b>tab_bg</b>: normal bg color of tab (default #CCC)</li>
322
- <li><b>tab_selected_color</b>: color of tab when selected (default #EEE)</li>
323
- <li><b>pane_min_height</b>: min height of a pane to help make all even if needed</li>
324
- <li><b>pane_bg</b>: bg color of pane</li>
325
- </ul>
326
- </p>
327
- <h3><a name="headerimage" id="headerimage"></a><strong>[header_image]</strong></h3>
328
- <p>The <code>[header_image]</code> shortcode allows you display the current header image wherever you want.
329
- For example, you can get the header image into the Header Widget Area by using this shortcode in a text widget.
330
- The current standard or mobile header image will be displayed. Only the <code>&lt;img ... &gt;</code> is displayed --
331
- the image will not be wrapped in a link to the site.</p>
332
-
333
- <p><strong>Shortcode usage:</strong> <code>[header_image h='size' w='size' style='inline-style']</code>
334
- <br />
335
- <ol>
336
- <li><strong>w='size' h='size'</strong> - By default, no height or image properties are included with the
337
- header <code>&lt;img ... &gt;</code>, which will result in an image scaled to fit into whatever the natural
338
- width of the enclosing HTML container is (the content area, a text widget, etc.). You may specify an explicit
339
- value (usually in px) for the height and width of the image.
340
- </li>
341
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
342
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
343
- <code>style="your-rules;"</code> - using double quotation marks.
344
- </li>
345
- </ol>
346
- <h3><a name="schtml" id="schtml"></a><strong>[html]</strong></h3>
347
-
348
- <p>The Weaver X Theme Support <code>[html]</code> shortcode allows you to add arbitrary HTML to your post and page content. The
349
- main purpose of this shortcode is to get around the auto paragraph and line break and other HTML stripping functionality
350
- of the WordPress editor.</p>
351
-
352
- <p><strong>Shortcode usage:</strong> <code>[html html-tag args='parameters']</code>
353
- <br />
354
- <ol>
355
- <li><strong>html-tag</strong> - The first parameter to the shortcode must be present, and must be a standard
356
- HTML tag - <code>p</code>, <code>br</code>, or <code>span</code>, for example. You just supply the tag - no quotation
357
- marks, no '=', just the tag. The shortcode provides the &lt; and &gt;. If you need a wrapping HTML tag (e.g., <code>span</code> and <code>/span</code>), use
358
- two shortcodes:<br />
359
- <code>[html span args='style="color:red"']content to make red[html /span]</code>
360
- </li>
361
- <li><strong>args='parameters'</strong> - Allows you to specify arbitrary parameters for your HTML tag. See the example above.
362
- </li>
363
- </ol>
364
- </p>
365
-
366
- <h3><a name="scdiv" id="scdiv"></a><strong>[div]text[/div]</strong>, [span]text[/span]</h3>
367
-
368
- <p>The Weaver X Theme Support <code>[div]</code> and [span] shortcodes allow you to easily add HTML &lt;div&gt; or &lt;span&gt; tags to your post and page content. The
369
- main purpose of these shortcodes is to get around need to switch to the HTML editor view when you need to
370
- wrap your content in a &lt;div&gt; or &lt;span&gt;.</p>
371
- <p>
372
- This will work exactly like a standard HMTL &lt;div&gt;and &lt;span&gt; tags. It supports 'id', 'class',
373
- and 'style' parameters, which are the most useful. Instead of wrapping your text in &lt;div&gt; or &lt;span&gt; tags, wrap them like
374
- this (the Visual view will work just fine):<br />
375
- <code>[div style="font-size:20px;']This content will be large.[/div]</code><br />
376
- <code>[span style=&quot;font-size:20px;']This content will be large.[/span]</code></p>
377
- <p><strong>Shortcode usage:</strong> <code>[div id='class_id' class='class_name' style='style_values']text[/div]</code>
378
- <br />
379
- <code>[span id='class_id' class='class_name' style='style_values']text[/span]</code> <br />
380
- <ol>
381
- <li><strong>id='class_id' class='class_name' style='style_values'</strong> - Allows you to specify id, class, and style for the &lt;div&gt;. See the example above.
382
- </li>
383
- </ol>
384
- </p>
385
-
386
- <h3><a name="sciframe" id="sciframe"></a><strong>iframe - [iframe]</strong></h3>
387
-
388
- <p>The <code>[iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
389
- the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>
390
-
391
- <p><strong>Shortcode usage:</strong> <code>[iframe src='http://example.com' height=600 percent=100 style="style"]</code>
392
- <br />
393
- <ol>
394
- <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
395
- </li>
396
- <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
397
- </li>
398
- <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
399
- </li>
400
- <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values".
401
- </li>
402
- </ol>
403
- </p>
404
-
405
- <h3><a name="scshowif" id="scshowif"></a><strong>[show_if]content[/show_if], [hide_if]</strong>content [/hide_if]</h3>
406
- <p>The <code>[show_if]</code> and <code>[hide_if]</code> shortcodes allow you to selectively
407
- display or hide content depending if any of several conditions are met.</p>
408
-
409
- <p><strong>Shortcode usage:</strong> <code>[hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]</code>
410
- </p>
411
- <p>You bracket the content you want to selectively display with <code>[show/hide_if]</code> and closing
412
- <code>[/show/hide_if]</code> tags. That content can contain other shortcodes as needed. If you specify more than one parameter to the short code, then all the conditions must be met (logical AND). Any paramaters you don't include are considered true.</p>
413
- <h4>Parameters</h4>
414
- <p>'device' =&gt; 'default', // desktop, mobile, smalltablet, phone, all<br />
415
- 'logged_in' =&gt; 'default', // true or false<br />
416
- 'not_post_id' =&gt; 'default', // comma separated list of post IDs (includes pages, too)<br />
417
- 'post_id' =&gt; 'default', // comma separated list<br />
418
- 'user_can' =&gt; 'default' // http://codex.wordpress.org/Function_Reference/current_user_can</p>
419
- <p>
420
- <strong>device=desktop | mobile | smalltablet | phone </strong> - The device parameter for <code>[show/hide_if]</code> is designed to allow you to hide <em>or</em> show any content on any of the
421
- device sizes recognized by Weaver Xtreme (or any theme, actually): 'phone', 'smalltablet', and 'desktop', or 'mobile' for non-desktop devices. If you want to show or hide content on
422
- a specific device, you give the <span class="code1">device</span> parameter a value of desktop, mobile, smalltablet, phone, or none (e.g., <code>[show_if device=mobile]</code>). </p>
423
- <p><strong>logged_in=true | false</strong> - This will hide or display content depending if the visitor is logged into the site or not. </p>
424
- <p><strong>post_id=34,875</strong> / <strong>not_post_id=1,2,3 </strong>- This will display (or not display) the content depending if the current page or single post view is included in the comma separated list of WordPress page/post IDs. You can use both to refine a list of pages or posts to display or not display. Note that even though the parameter is called 'post_id', it applies equally to pages and posts. Depending on where you use the shortcode, it will apply to a post differently depending if it is on a blog or single page view of a post. Note that the default WordPress blog (as opposed to the Weaver Xtreme Page with Posts template) does not have a post_ID.</p>
425
- <p><strong>user_can=user-capability</strong> - This will show or hide depending if the current visitor has certain WordPress user capabilities. There are many capabilities which are defined in the <a href="http://codex.wordpress.org/Function_Reference/current_user_can" target="_blank">WordPress Codex</a>. This shortcode supports any of the listed capabilities for maximum flexibility. If you don't want to learn about all the capabilities listed in the Codex, you can use the following capability values to determine if the visitor has a specific role (as defined on the Dashboard Users admin pages). For example:<br />
426
- <br />
427
- <span class="code1">[show_if user_can=publish_pages]content for Editors and above[/show_if]</span><br />
428
- <br />
429
- Note that the higher roles have all the capabilities of the lower roles - an Editor can do everything a Contributor can.</p>
430
- <table width="80%" border="1">
431
- <caption>
432
- Capabilities to Specify Role
433
- </caption>
434
- <tr>
435
- <th scope="col">Role</th>
436
- <th scope="col">Capability</th>
437
- </tr>
438
- <tr>
439
- <td>Subscriber</td>
440
- <td>read</td>
441
- </tr>
442
- <tr>
443
- <td>Contributor</td>
444
- <td>edit_posts</td>
445
- </tr>
446
- <tr>
447
- <td>Author</td>
448
- <td>publish_posts</td>
449
- </tr>
450
- <tr>
451
- <td>Editor</td>
452
- <td>publish_pages</td>
453
- </tr>
454
- <tr>
455
- <td>Administrator</td>
456
- <td>manage_options</td>
457
- </tr>
458
- <tr>
459
- <td>Super Administrator (MultiSite)</td>
460
- <td>manage_network</td>
461
- </tr>
462
- </table>
463
- <p>&nbsp;</p>
464
- <h3><a name="sitetitlesc" id="sitetitlesc"></a><strong>[site_title style="style" matchtheme=false], [site_tagline style="style" matchtheme=false]</strong></h3>
465
-
466
- <p>The <code>[site_title]</code> and <code>[site_tagline]</code> shortcodes allow you display the current
467
- site title and site tagline. This can be useful in a text widget in the Header Widget Area, for example.</p>
468
- <p><em>Note:</em> If you want to position the content of a text widget within the a cell of the Header Widget Area, you could use the following
469
- example:</p>
470
- <p><code>[site_title style='font-size:150%;position:absolute;padding-left:20px;padding-top:30px;']</code></p>
471
-
472
- <p><strong>Shortcode usage:</strong> <code>[site_title style='inline-style' matchtheme=false] [site_tagline style='inline-style' matchtheme=false]</code>
473
- <br />
474
- <ol>
475
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
476
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
477
- <code>style="your-rules;"</code> - using double quotation marks.
478
- </li>
479
- <li><strong>matchtheme=true</strong> - Allows you to add match the theme styling as defined in the site header if set to true.
480
- This will match the color/style/font of the header version of the site title and tagline with the exception of hide settings.
481
- The shortcode version will not be hidden on any device unless you also wrap the shortcode with a [show_if/hide_if] shortcode.
482
- </li>
483
-
484
- </ol>
485
-
486
- <h3><a name="bloginfo" id="bloginfo"></a><strong>[bloginfo arg='name' style='your css']</strong></h3>
487
-
488
- <p>This shortcode can be used to access the WordPress function 'get_bloginfo($arg)'. This will return a number of useful
489
- strings depending on the value. All the supported values are listed at http://codex.wordpress.org/Function_Reference/get_bloginfo.
490
- Some useful values include 'stylesheet_directory' and 'template_directory'. You can wrap the bloginfo output with css added to a &lt;span style=&quot;your css&quot;&gt;.
491
- </p>
492
-
493
- <h3><a name="box" id="box"></a><strong>[box]text[/box]</strong></h3>
494
-
495
- <p>
496
- Wrap content in a box.</p>
497
- <p><strong>Shortcode Usage:</strong> <code>[box align=left background=#fff border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules']text[/box]</code></p>
498
- <ol>
499
- <li><strong>align=align</strong>: Leave blank, or specify left, center, or right for alignment of box within surrounding text.</li>
500
- <li><strong>border=true</strong>: True is default. Specify false or 0 for no borders.</li>
501
- <li><strong>border_rule='1px solid black</strong>': Specify a compound border CSS value to replace the default '1px solid black'.</li>
502
- <li><strong>border_radius=4</strong>: Default is none - specify a px value for the corner radius if you want rounded corners.</li>
503
- <li><strong>color=#000</strong>: Default is inherit - specify a valid color for the color of the text in the box.</li>
504
- <li><strong>background=#fff</strong>: Default is inherit - specify color for box background color.</li>
505
- <li><strong>margin=1</strong>: Default is 0 - specify an 'em' value for margin around the box. Using a margin overrides align parameter.</li>
506
- <li><strong>padding=1</strong>: Default 1 - specify an 'em' value for padding inside box.</li>
507
- <li><strong>shadow=0</strong>: Default 0 - specify a value from 1 to 5 for a border around the box.</li>
508
- <li><strong>style=inline-style</strong>: any additional custom styling for the box</li>
509
- <li><strong>width=100</strong>: A percentage width for the box within its surrounding container.</li>
510
- </ol>
511
- <h3><a name="video" id="video"></a><strong>Video - [vimeo], [youtube]</strong></h3>
512
- <p>Weaver X Theme Support supports specialized shortcodes to display video. While there are other ways to embed video, the Weaver X Theme Support versions have two important features. First, they will auto adjust to the width of your content, <em><strong>including</strong></em> the mobile view. Second, they use the latest iframe/HTML5 interface provided by YouTube and Vimeo.</p>
513
- <p><strong>Specifying Video Display Size for both shortcodes</strong></p>
514
- <p>Weaver X Theme Support supports a common set of options for both the YouTube and Vimeo shortcodes to support displaying your videos with a specific width and correct height. By default, your videos will be displayed using the full width of the content area being used (percent=100). The percent= parameter is used to specify the width you want.</p>
515
- <p>The height of the video is automatically determined based on the width and the display ratio of the particular video. </p>
516
- <p>Finally, you may specify if the video should be centered or no within the display area using &quot;center=0&quot; to not center (centering is on by default).</p>
517
- <p>Note - if you want to display more than one video horizontally, use &quot;center=0&quot; and specify an appropriate percentage to fit all the videos.</p>
518
- <p>Parameters in Common</p>
519
- <ul>
520
- <li>percent=100 - By default, the video will be sized to fill the full content space. You can use the percent value to make
521
- the video use a percentage of the content space (but mobile will always use full width).</li>
522
- <li>center=1 - Specify 'center=0' to disable centering of the video.</li>
523
- <li>sd=0 - By default, Weaver X Theme Support will generate sizes for HD/widescreen videos. To display old 4:3 standard definition videos, include 'sd=1' in the shortcode.</li>
524
- </ul>
525
- <h4>Vimeo</h4>
526
- <pre><strong>[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex
527
- autoplay=0 loop=0 portrait=1 title=1 byline=1]
528
- </strong></pre>
529
- <p>This will display Vimeo videos. At the minimum, you can provide the standard http://vimeo.com/nnnnn link, or just the video ID number (which is part of the Vimeo Link). The other Vimeo specific options include:</p>
530
- <ul>
531
- <li>color - You can optionally specify a Vimeo color theme using 6 hex digits for a color value.</li>
532
- <li>autoplay - Add 'autoplay=1' to have the video autoplay.</li>
533
- <li>loop - Add 'loop=1' to have the video loop.</li>
534
- <li>portrait, title, byline - You can specify a value '=0' for these to hide the display of the corresponding element on the Vimeo player.
535
- Portrait is the avatar/icon, title is the video title, and byline is source attribution.<br />
536
- </li>
537
- </ul>
538
- <h4>YouTube</h4>
539
- <code><strong>[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=1 https=0 privacy=0 {youtube options}]
540
- </strong></code>
541
- <p>This will display YouTube videos. At the minimum, you can provide the standard http://youtu.be/xxxxxx share link (including the options YouTube lets you specify), the long format share link, or just the video ID number using the id=videoid parameter (which is part of the YouTube Link). The other YouTube specific options include:</p>
542
- <ul>
543
- <li>rel - If you specify 'rel=0', YouTube won't show related videos after the video plays.</li>
544
- <li>https - If you specify 'https=1', YouTube will use the https protocol.</li>
545
- <li>privacy - If you specify 'privacy=1', YouTube won't used cookies to track your viewing.</li>
546
- </ul>
547
- <p>In addition to the above [youtube] options, the shortcode also supports most standard YouTube options. These are more fully described on the <a href="http://code.google.com/apis/youtube/player_parameters.html" target="_blank">YouTube Embedded Player Parameters</a> page.</p>
548
- <p>The supported options, with Weaver X Theme Support's default values include:</p>
549
- <p>'autohide' = '1' . . . . . . 0: always show controls; 1: autohide controls; 2: autohide progress bar<br />
550
- 'autoplay' = '0' . . . . . . 1: auto play; 0: don't<br />
551
- 'border' = '0' . . . . . . . . 0: no border; 1: border using color1 and color2 (don't seem to work)<br />
552
- 'color' = not set . . . . . . progress bar color - red or white<br />
553
- 'color1' = not set . . . . . RGB hex value for border color<br />
554
- 'color2' = not set . . . . . RGB hex value for control bar bg<br />
555
- 'controls' = '1' . . . . . . . 0: hide player controls<br />
556
- 'disablekb' = '0' . . . . . . 1: disable keyboard controls<br />
557
- 'egm' ='0' . . . . . . . . . . . 1: enable &quot;Enhanced Genie Menu&quot;<br />
558
- 'hd' = '0' . . . . . . . . . . . . 1: enable HD playback by default<br />
559
- 'iv_load_policy' = '1' . . . 1: show annotations; 3: don't show; 2: discontinued support<br />
560
- 'loop' = '0' . . . . . . . . . . . 1: loop video<br />
561
- 'modestbranding' = '0' . .1: hide YouTube logo - will still show label in upper right corner<br />
562
- 'origin' = not set . . . . . . . See YouTube docs<br />
563
- 'playlist' = not set . . . . . . Comma separated list of videoIDs to play (id/url video played 1st)<br />
564
- 'showinfo' = '1' . . . . . . . 0: hide video title<br />
565
- 'showsearch' = '1' . . . . . 0: hide video searchbox<br />
566
- 'start' = not set . . . . . . . start vide this number of seconds from start<br />
567
- 'theme' = 'dark' . . . . . . . dark or light - display theme for player<br />
568
- 'wmode' = 'transparent' . Keeps video behind menu bars, etc. Other values available - see YouTube</p>
569
- <h2><a name="widg-sum" id="widg-sum"></a>Widget Summary</h2>
570
- <h3><a name="widg-login" id="widg-login"></a>Weaver X Login Widget</h3>
571
- <p>This simple widget shows a login in link, or a welcome, Site Admin, and Log out choice if the user is logged in.</p>
572
- <h3><a name="widg_pp_text" id="widg_pp_text"></a>Weaver X Per Page Text</h3>
573
- <p>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>if you want a title, and define Custom Field<em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text, HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)</p>
574
- <h3><a name="widg_text_2" id="widg_text_2"></a>Weaver X Text 2</h3>
575
- <p>This widget lets you add two columns of text. It is most useful in wide widget areas such as a content top or bottom widget area, or a wide footer widget area.</p>
576
- <p>&nbsp;</p>
577
- <h2><br />
578
- </h2>
579
- <p>The Weaver X Theme Support Plugin and this document are &copy; 2014, Bruce E. Wampler. <a ref="http://weavertheme.com">Web Site - WeaverTheme.com</a></p>
580
-
581
- </div>
582
- </div>
583
- </body>
584
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,617 +0,0 @@
1
- <?php
2
- /* Display per page and per post options.
3
- *
4
- * __ added - 12/10/14
5
- *
6
- * IMPORTANT! - this code and the Weaver Plus plugin need to be maintained in parallel!
7
- */
8
-
9
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
10
- // Admin panel that gets added to the page edit page for per page options
11
-
12
-
13
- if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
14
-
15
- function wvrx_ts_isp_true($val) {
16
- if ($val) return true;
17
- return false;
18
- }
19
-
20
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
21
- global $post;
22
- ?>
23
- <div style="float:left;width:<?php echo $width; ?>%"><label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
24
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> />
25
- <?php echo($msg . '</label></div>');
26
- for ($i = 0 ; $i < $br ; $i++)
27
- echo '<br class="page_checkbox" style="clear:both;" />';
28
- }
29
-
30
- function wvrx_ts_page_layout( $page = 'page' ) {
31
-
32
- if ( $page == 'page')
33
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaver-xtreme' /*adm*/);
34
- else
35
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaver-xtreme' /*adm*/);
36
-
37
- $opts = array( 'id' => '_pp_page_layout',
38
- 'info' => $msg,
39
- 'value' => array(
40
- array('val' => '', 'desc' => __('Use Default','weaver-xtreme' /*adm*/) ),
41
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaver-xtreme' /*adm*/) ),
42
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaver-xtreme' /*adm*/) ),
43
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaver-xtreme' /*adm*/) ),
44
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaver-xtreme' /*adm*/) ),
45
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaver-xtreme' /*adm*/) ),
46
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaver-xtreme' /*adm*/) ),
47
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaver-xtreme' /*adm*/) )
48
- ));
49
- wvrx_ts_pp_select_id($opts);
50
- }
51
- //--
52
-
53
-
54
-
55
- function wvrx_ts_pp_replacement( $desc, $id ) {
56
- global $post;
57
- global $wp_registered_sidebars;
58
-
59
- $id = '_' . $id;
60
-
61
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
62
-
63
-
64
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
65
- $area_name = $value['id']; //sanitize_title($value['name']);
66
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
67
- echo ' <option value="' . $area_name . '"';
68
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
69
- echo '>' . substr($area_name,9) . "</option>\n";
70
-
71
- }
72
- }
73
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
74
- }
75
- //--
76
-
77
-
78
- function wvrx_ts_pp_select_id( $value ) {
79
- global $post;
80
-
81
- if ( isset( $value['name'] ) && $value['name'] != '' )
82
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
83
-
84
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
85
-
86
- foreach ($value['value'] as $option) {
87
- if ( $option['val'] == '' ) {
88
- echo '<option value="">';
89
- } else {
90
- echo ' <option value="' . $option['val'] . '"';
91
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
92
- echo ">";
93
- }
94
- echo $option['desc'] . "</option>\n";
95
- }
96
- echo '</select>&nbsp;' . $value['info'] . "\n";
97
- }
98
- //--
99
-
100
-
101
-
102
- function wvrx_ts_pwp_atw_show_post_filter() {
103
- // use plugin options...
104
- global $post;
105
-
106
- if ( function_exists( 'atw_showposts_installed' ) ) {
107
- $filters = atw_posts_getopt('filters');
108
-
109
- $first = true;
110
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
111
- foreach ($filters as $filter => $val) { // display dropdown of available filters
112
- if ( $first ) {
113
- $first = false;
114
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
115
- } else {
116
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
117
- }
118
- }
119
- echo '</select>&nbsp;' .
120
- __('Use a Filter from <em>Weaver Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaver-xtreme' /*adm*/) .
121
- '<br /> <span style="margin-left:8em;"><span>' .
122
- __('(Note: Weaver Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts using this filter.)','weaver-xtreme' /*adm*/) .
123
- '<br />' . '<br />';
124
- } else {
125
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaver-xtreme' /*adm*/); ?>
126
- <br /><br />
127
- <?php }
128
- }
129
- //--
130
-
131
-
132
-
133
- function wvrx_ts_pwp_type() {
134
- $opts = array( 'name' => __('Display posts as:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
135
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaver-xtreme' /*adm*/),
136
- 'value' => array(
137
- array('val' => '', 'desc' => '&nbsp;' ),
138
- array('val' => 'full', 'desc' => __('Full post','weaver-xtreme' /*adm*/) ),
139
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaver-xtreme' /*adm*/) ),
140
- array('val' => 'title', 'desc' => __('Title only','weaver-xtreme' /*adm*/) ),
141
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaver-xtreme' /*adm*/) )
142
- ));
143
- wvrx_ts_pp_select_id($opts);
144
- }
145
-
146
-
147
- function wvrx_ts_page_cols() {
148
-
149
- $opts = array( 'name' => '', 'id' => '_pp_page_cols',
150
- 'info' => __('Display page content in this many columns using CSS column rules.','weaver-xtreme' /*adm*/),
151
- 'value' => array(
152
- array('val' => '', 'desc' => '&nbsp;'),
153
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
154
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
155
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ),
156
- array('val' => '4', 'desc' => __('4 Columns','weaver-xtreme' /*adm*/) ))
157
- );
158
- wvrx_ts_pp_select_id($opts);
159
-
160
- weaverx_html_br();
161
- weaverx_html_br();
162
- }
163
-
164
-
165
- function wvrx_ts_pwp_cols() {
166
-
167
- $opts = array( 'name' => __('Display post columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
168
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaver-xtreme' /*adm*/),
169
- 'value' => array(
170
- array('val' => '', 'desc' => '&nbsp;'),
171
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
172
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
173
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ) )
174
- );
175
- wvrx_ts_pp_select_id($opts);
176
-
177
- weaverx_html_br();
178
-
179
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_pwp_masonry',
180
- 'info' => __('Use <em>Masonry</em> for multi-column display','weaver-xtreme' /*adm*/),
181
- 'value' => array(
182
- array('val' => '', 'desc' => '&nbsp;' ),
183
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
184
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
185
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ),
186
- array('val' => '4', 'desc' => __('4 Columns','weaver-xtreme' /*adm*/) ),
187
- array('val' => '5', 'desc' => __('5 Columns','weaver-xtreme' /*adm*/) ) )
188
- );
189
- wvrx_ts_pp_select_id($opts2);
190
-
191
- ?>
192
- <br />
193
- <?php
194
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaver-xtreme' /*adm*/),90,1);
195
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaver-xtreme' /*adm*/),90,1);
196
- }
197
-
198
- function wvrx_ts_page_extras() {
199
- global $post;
200
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
201
-
202
- if ( !( current_user_can('edit_themes')
203
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
204
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
205
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
206
- ) {
207
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
208
- echo '<p>' .
209
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaver-xtreme' /*adm*/) .
210
- '</p>';
211
- else
212
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
213
- return; // don't show per post panel
214
- }
215
-
216
- echo("<div style=\"line-height:150%;\"><p>\n");
217
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
218
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
219
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaver-xtreme' /*adm*/); ?>
220
- </div><br />
221
- <?php
222
- }
223
-
224
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
225
- <div style="padding:2px; border:2px solid red; background:#FAA;">
226
- <?php _e('<strong>WARNING!</strong>
227
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
228
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
229
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
230
- If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
231
- including the option of using the Page with Posts page template,
232
- then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
233
- the <em></em>&mdash; Select &mdash;</em> default value.','weaver-xtreme' /*adm*/); ?>
234
- </div><br />
235
- <?php
236
- return;
237
- }
238
- echo '<strong>' . __('Page Templates','weaver-xtreme' /*adm*/) . '</strong>';
239
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaver-xtreme' /*adm*/));
240
- echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
241
- weaverx_html_br();
242
- _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaver-xtreme' /*adm*/);
243
- weaverx_html_br();
244
- echo '<strong>' . __('Per Page Options','weaver-xtreme' /*adm*/) . '</strong>';
245
- weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaver-xtreme' /*adm*/));
246
- weaverx_html_br();
247
- _e('These settings let you hide various elements on a per page basis.','weaver-xtreme' /*adm*/);
248
- weaverx_html_br();
249
-
250
-
251
- wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaver-xtreme' /*adm*/));
252
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaver-xtreme' /*adm*/));
253
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaver-xtreme' /*adm*/), 33, 1);
254
-
255
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaver-xtreme' /*adm*/));
256
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaver-xtreme' /*adm*/));
257
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaver-xtreme' /*adm*/),33,1);
258
-
259
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaver-xtreme' /*adm*/));
260
- wvrx_ts_page_checkbox('_pp_full_browser_height',__('Force full browser height','weaver-xtreme' /*adm*/),33,2);
261
-
262
- wvrx_ts_page_cols();
263
-
264
- _e('<em>Note:</em> the following options work with the default menu - not custom menus.','weaver-xtreme' /*adm*/);
265
- weaverx_html_br();
266
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaver-xtreme' /*adm*/),90,1);
267
-
268
-
269
-
270
- wvrx_ts_page_checkbox('_pp_stay_on_page',__('Menu "Placeholder" page. Useful for top-level menu item - don\'t go anywhere when menu item is clicked.','weaver-xtreme' /*adm*/),90,2);
271
-
272
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90,1);
273
-
274
- if (weaverx_allow_multisite()) {
275
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90,1);
276
- }
277
-
278
- ?>
279
- <p><strong><?php _e('Sidebars &amp; Widgets','weaver-xtreme' /*adm*/); ?></strong></p>
280
-
281
- <?php
282
- wvrx_ts_page_layout();
283
- ?>
284
- <br />
285
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
286
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
287
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaver-xtreme' /*adm*/); ?> <br /><br />
288
- <?php
289
-
290
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaver-xtreme' /*adm*/),40);
291
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaver-xtreme' /*adm*/),40,1);
292
-
293
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaver-xtreme' /*adm*/),40);
294
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaver-xtreme' /*adm*/),40,1);
295
-
296
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaver-xtreme' /*adm*/),40);
297
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaver-xtreme' /*adm*/),40,1);
298
-
299
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaver-xtreme' /*adm*/),40);
300
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaver-xtreme' /*adm*/),40,1);
301
- ?>
302
-
303
- <p><strong><?php _e('Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
304
- <p>
305
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
306
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
307
- </p>
308
- <?php
309
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
310
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
311
-
312
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
313
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
314
-
315
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-top-widget-area' );
316
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-bottom-widget-area' );
317
-
318
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaver-xtreme' /*adm*/) , 'page-top-widget-area' );
319
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaver-xtreme' /*adm*/) , 'page-bottom-widget-area' );
320
- ?>
321
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
322
- <?php
323
- $opts3 = array( 'id' => '_pp_fi_location',
324
- 'info' => __('How to display Page FI on this page','weaver-xtreme' /*adm*/),
325
- 'value' => array(
326
- array('val' => '', 'desc' => __('Default Page FI','weaver-xtreme' /*adm*/) ),
327
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
328
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
329
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
330
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
331
- array('val' => 'hide', 'desc' => __('Hide FI on this Page','weaver-xtreme' /*adm*/) )
332
- )
333
- );
334
- wvrx_ts_pp_select_id($opts3);
335
- ?>
336
- <br />
337
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
338
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
339
- <?php _e('<em>Featured Image Link</em> - Full URL for link from FI','weaver-xtreme' /*adm*/); ?>
340
- <br style="clear:both;" />
341
- <hr />
342
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
343
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
344
-
345
- <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaver-xtreme' /*adm*/); ?>
346
- <br />
347
- </p>
348
- <p>
349
- <?php _e('<strong>Settings for "Page with Posts" Template</strong>','weaver-xtreme' /*adm*/);
350
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaver-xtreme' /*adm*/) );
351
-
352
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
353
- if ($template == 'paget-posts.php') {
354
- ?>
355
- <br />
356
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
357
- Use commas to separate items in lists.
358
- The settings will be combined for the final filtered list of posts displayed.
359
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
360
- <br />
361
-
362
- <input type="text" size="30" id="_pp_category" name="_pp_category"
363
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
364
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaver-xtreme' /*adm*/); ?>
365
- <br />
366
-
367
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
368
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
369
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaver-xtreme' /*adm*/); ?> <br />
370
-
371
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
372
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
373
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display.",'weaver-xtreme' /*adm*/); ?> <br />
374
-
375
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
376
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
377
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaver-xtreme' /*adm*/); ?> <br />
378
-
379
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
380
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
381
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaver-xtreme' /*adm*/); ?> <br />
382
-
383
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
384
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
385
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaver-xtreme' /*adm*/); ?> <br />
386
-
387
- <input type="text" size="30" id="_pp_author" name="_pp_author"
388
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
389
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaver-xtreme' /*adm*/); ?> <br />
390
-
391
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
392
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
393
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaver-xtreme' /*adm*/); ?> <br />
394
-
395
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
396
-
397
- <?php wvrx_ts_pwp_type(); ?><br />
398
- <?php wvrx_ts_pwp_cols(); ?><br />
399
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
400
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
401
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaver-xtreme' /*adm*/); ?>
402
- <br />
403
-
404
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
405
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
406
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
407
- __("Hide first \"n\" posts</em> - Start with post n+1.
408
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaver-xtreme' /*adm*/) ; ?>
409
-
410
- <br /><br />
411
-
412
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaver-xtreme' /*adm*/), 40); ?>
413
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaver-xtreme' /*adm*/), 40, 1); ?>
414
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaver-xtreme' /*adm*/), 40); ?>
415
- </p>
416
- <?php
417
- } else { // NOT a page with posts
418
- ?> <p>
419
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
420
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
421
- settings for "Page with Posts" will be displayed here. Current page template:','weaver-xtreme' /*adm*/); ?>
422
- <?php echo $template; ?>
423
- </p>
424
- <?php
425
- }
426
- do_action('weaverxplus_add_per_page');
427
- ?>
428
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
429
- </div>
430
- <?php
431
- }
432
-
433
- function wvrx_ts_post_extras() {
434
- global $post;
435
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
436
- if ( !( current_user_can('edit_themes')
437
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
438
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
439
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
440
- ) {
441
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
442
- return; // don't show per post panel
443
- }
444
- ?>
445
- <div style="line-height:150%;">
446
- <p>
447
- <?php
448
- echo '<strong>' . __('Per Post Options','weaver-xtreme' /*adm*/) . '</strong>';
449
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaver-xtreme' /*adm*/));
450
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
451
- weaverx_html_br();
452
- _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.','weaver-xtreme' /*adm*/);
453
- weaverx_html_br();
454
-
455
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaver-xtreme' /*adm*/), 40);
456
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaver-xtreme' /*adm*/),55,1);
457
-
458
-
459
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaver-xtreme' /*adm*/),40);
460
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaver-xtreme' /*adm*/), 40, 1);
461
-
462
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaver-xtreme' /*adm*/),40);
463
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaver-xtreme' /*adm*/),40,1);
464
-
465
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaver-xtreme' /*adm*/),40);
466
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaver-xtreme' /*adm*/),40,1);
467
- wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaver-xtreme' /*adm*/),90,1);
468
-
469
- wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaver-xtreme' /*adm*/),90);
470
-
471
-
472
- echo('<br style="clear:both;"/><br /><strong>Per Post Style</strong>' /*a*/ );
473
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaver-xtreme' /*adm*/ ));
474
- echo '<br />' .
475
- __('Enter optional per post CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
476
- Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
477
- (e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme' /*adm*/); ?>
478
- <br />
479
- <textarea name="_pp_post_styles" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_styles", true)); ?></textarea>
480
- <br />
481
- <br />
482
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
483
-
484
- <?php
485
- wvrx_ts_page_layout('post');
486
- ?>
487
- <br />
488
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
489
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
490
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaver-xtreme' /*adm*/); ?> <br /><br />
491
- <?php
492
-
493
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaver-xtreme' /*adm*/),40);
494
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaver-xtreme' /*adm*/),40,1);
495
-
496
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaver-xtreme' /*adm*/),40);
497
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
498
-
499
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaver-xtreme' /*adm*/),40);
500
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
501
-
502
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaver-xtreme' /*adm*/),40);
503
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaver-xtreme' /*adm*/),40,1);
504
- ?>
505
- </p>
506
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
507
- <p>
508
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
509
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
510
- </p>
511
- <?php
512
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
513
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
514
-
515
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
516
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
517
-
518
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
519
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
520
- ?>
521
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
522
- <?php
523
- $opts3 = array( 'id' => '_pp_fi_location',
524
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaver-xtreme' /*adm*/),
525
- 'value' => array(
526
- array('val' => '', 'desc' => __('Default Single Page FI','weaver-xtreme' /*adm*/) ),
527
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
528
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
529
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
530
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
531
- array('val' => 'post-before', 'desc' => __('Outside of Post','weaver-xtreme' /*adm*/) ),
532
- array('val' => 'hide', 'desc' => __('Hide FI on Single Page','weaver-xtreme' /*adm*/) )
533
- )
534
- );
535
- wvrx_ts_pp_select_id($opts3);
536
- ?>
537
- <br />
538
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
539
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
540
- <?php _e("<em>Featured Image Link</em> - Full URL for link from FI",'weaver-xtreme' /*adm*/); ?>
541
- <br style="clear:both;" />
542
- </p><p>
543
- <strong><?php _e('Post Editor Options','weaver-xtreme' /*adm*/); ?></strong>
544
-
545
- <?php
546
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90, 1);
547
-
548
- if (weaverx_allow_multisite()) {
549
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90, 1);
550
- }
551
- ?>
552
- </p>
553
- <p>
554
- <?php echo('<strong>Post Format</strong>');
555
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaver-xtreme' /*adm*/));
556
- weaverx_html_br();
557
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info.','weaver-xtreme' /*adm*/);
558
- weaverx_html_br();
559
- weaverx_html_br();
560
-
561
- do_action('weaverxplus_add_per_post'); ?>
562
- </p>
563
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
564
- </div>
565
- <?php
566
- }
567
-
568
-
569
- function wvrx_ts_save_post_fields($post_id) {
570
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
571
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
572
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
573
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
574
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
575
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
576
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
577
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
578
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
579
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
580
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
581
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
582
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area', '_pp_full_browser_height',
583
- '_pp_page_cols'
584
- );
585
-
586
- if (weaverx_allow_multisite()) {
587
- array_push($default_post_fields, '_pp_raw_html');
588
- }
589
-
590
- $all_post_fields = $default_post_fields;
591
-
592
- if (isset($_POST['post_meta'])) {
593
- foreach ($all_post_fields as $post_field) {
594
- if (isset($_POST[$post_field])) {
595
- $data = $_POST[$post_field];
596
- if ( $post_field != '_pp_post_styles')
597
- $data = stripslashes($data); // passed via post, so strip slashes
598
-
599
- if (get_post_meta($post_id, $post_field) == '') {
600
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
601
- }
602
- else if ($data != get_post_meta($post_id, $post_field, true)) {
603
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
604
- } else if ($data == '') {
605
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
606
- }
607
- } else {
608
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
609
- }
610
- }
611
- }
612
- }
613
-
614
- add_action("save_post", "wvrx_ts_save_post_fields");
615
- add_action("publish_post", "wvrx_ts_save_post_fields");
616
- }
617
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/includes/wvrx-ts-runtime-lib.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
-
6
- function wvrx_ts_help_link($ref, $label) {
7
-
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
- }
13
-
14
-
15
- // =============================== options =============================
16
-
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
-
19
-
20
- // Interface to Weaver Xtreme
21
-
22
- function wvrx_ts_fix_short($prefix, $msg ) {
23
- if ( $prefix ) {
24
- $m = str_replace('[/', '////', $msg);
25
- $m = str_replace('[', '[' . $prefix, $m);
26
- echo str_replace('////', '[/' . $prefix, $m);
27
- }
28
- else
29
- echo $msg;
30
- }
31
-
32
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
33
- function wvrx_ts_theme_support_addon() {
34
- ?>
35
- <div class="a-plus">
36
- <p><strong style="font-size:110%;"><?php _e('You have Weaver Xtreme Theme Support installed.','weaver-xtreme' /*adm*/); ?></strong><br />
37
- <?php _e('This section shows the shortcodes and widgets available with Weaver X Theme Support.
38
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaver-xtreme' /*adm*/); ?></p>
39
-
40
- <?php
41
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
42
- if ( $prefix )
43
- echo '<h3 style="color:red;">' . __("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme') . '</h3>';
44
- ?>
45
-
46
- <h3><?php _e('Shortcodes','weaver-xtreme' /*adm*/); ?></h3>
47
- <ul>
48
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaver-xtreme' /*adm*/)); ?>
49
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaver-xtreme' /*adm*/));?><br />
50
- <code><?php wvrx_ts_fix_short($prefix, __("[bloginfo name='WP bloginfo name' style='style-rules']",'weaver-xtreme' /*adm*/)); ?></code>
51
- </li>
52
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Box - [box]</span> - Display content in a Box','weaver-xtreme' /*adm*/)); ?>
53
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaver-xtreme' /*adm*/));?><br />
54
- <code><?php wvrx_ts_fix_short($prefix, __("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaver-xtreme' /*adm*/)); ?></code>
55
- </li>
56
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaver-xtreme' /*adm*/)); ?>
57
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaver-xtreme' /*adm*/));?><br />
58
- <code><?php wvrx_ts_fix_short($prefix, __("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaver-xtreme' /*adm*/)); ?></code>
59
- </li>
60
- <li<?php wvrx_ts_fix_short($prefix, __('><span class="wvr-blue">Header Image - [header_image]</span> - Display default header image','weaver-xtreme' /*adm*/)); ?>
61
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaver-xtreme' /*adm*/));?><br />
62
- <code><?php wvrx_ts_fix_short($prefix, __("[header_image h='size' w='size' style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
63
- </li>
64
-
65
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaver-xtreme' /*adm*/)); ?>
66
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaver-xtreme' /*adm*/));?><br />
67
- <code><?php wvrx_ts_fix_short($prefix, __("[html html-tag args='parameters']",'weaver-xtreme' /*adm*/)); ?></code>
68
- </li>
69
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaver-xtreme' /*adm*/)); ?>
70
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaver-xtreme' /*adm*/));?><br />
71
- <code><?php wvrx_ts_fix_short($prefix, __("[iframe src='http://example.com' height=600 percent=100 style='style']",'weaver-xtreme' /*adm*/)); ?></code>
72
- </li>
73
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Login - [login]</span> - Show simple Login/Logout link','weaver-xtreme' /*adm*/)); ?>
74
- <?php wvrx_ts_help_link('help.html#sclogin',__('Help for login','weaver-xtreme' /*adm*/));?><br />
75
- <code><?php wvrx_ts_fix_short($prefix, __("[login]",'weaver-xtreme' /*adm*/)); ?></code>
76
- </li>
77
-
78
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaver-xtreme' /*adm*/)); ?>
79
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaver-xtreme' /*adm*/));?><br />
80
- <code><?php wvrx_ts_fix_short($prefix, __('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaver-xtreme' /*adm*/)); ?></code>
81
- </li>
82
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Hide If - [hide_if]</span> - Hide content','weaver-xtreme' /*adm*/)); ?>
83
- </li>
84
-
85
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline','weaver-xtreme' /*adm*/)); ?>
86
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaver-xtreme' /*adm*/));?><br />
87
- <code><?php wvrx_ts_fix_short($prefix, __("[site_tagline style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
88
- </li>
89
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title','weaver-xtreme' /*adm*/)); ?>
90
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaver-xtreme' /*adm*/));?><br />
91
- <code><?php wvrx_ts_fix_short($prefix, __("[site_title style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
92
- </li>
93
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag','weaver-xtreme' /*adm*/)); ?>
94
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Span','weaver-xtreme' /*adm*/));?><br />
95
- <code><?php wvrx_ts_fix_short($prefix, __("[span id='class_id' class='class_name' style='style_values']text[/span]",'weaver-xtreme' /*adm*/)); ?></code>
96
- </li>
97
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Tab Group - [tab_group]</span> - Display content on separate tabs','weaver-xtreme' /*adm*/));?>
98
- <?php wvrx_ts_help_link('help.html#tab_group',__('Help for Tab Group','weaver-xtreme' /*adm*/));?><br />
99
- <code><?php wvrx_ts_fix_short($prefix, __('[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]','weaver-xtreme' /*adm*/)); ?></code>
100
- </li>
101
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options','weaver-xtreme' /*adm*/)); ?>
102
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
103
- <code><?php wvrx_ts_fix_short($prefix, __('[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]','weaver-xtreme' /*adm*/)); ?></code>
104
- </li>
105
-
106
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options','weaver-xtreme' /*adm*/)); ?>
107
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaver-xtreme' /*adm*/));?><br />
108
- <code><?php wvrx_ts_fix_short($prefix, __('[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]','weaver-xtreme' /*adm*/)); ?></code>
109
- </li>
110
- </ul>
111
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
112
-
113
- <?php
114
- if ( $prefix )
115
- $button = __("Remove 'wvrx_' prefix from shortcode names: [ bloginfo ], etc.", 'weaver-xtreme');
116
- else
117
- $button = __("Add 'wvrx_' to shortcode names: [ wvrx_bloginfo ], etc.", 'weaver-xtreme');
118
- ?>
119
- <div style="clear:both;"></div>
120
- <span class='submit'><input name="toggle_shortcode_prefix" type="submit" value="<?php echo $button; ?>" /></span>
121
- <br /><small> <?php _e("To avoid conflicts with other plugins, you can add a 'wvrx_' prefix to these shortcodes.", 'weaver-xtreme /*adm*/'); ?> </small>
122
- <?php weaverx_nonce_field('toggle_shortcode_prefix'); ?>
123
- </form>
124
- <br />
125
-
126
- <h3><?php _e('Widgets','weaver-xtreme' /*adm*/); ?></h3>
127
- <ul>
128
- <li><?php _e('<span class="wvr-blue">Weaver X Login Widget</span> - Simplified login widget','weaver-xtreme' /*adm*/); ?>
129
- <?php wvrx_ts_help_link('help.html#widg-login',__('Help for Login Widget','weaver-xtreme' /*adm*/));?>
130
- </li>
131
-
132
- <li><?php _e('<span class="wvr-blue">Weaver X Per Page Text</span> - Display text on a per page basis, based on a Custom Field value','weaver-xtreme' /*adm*/); ?>
133
- <?php wvrx_ts_help_link('help.html##widg_pp_text',__('Help for Per Page Text Widget','weaver-xtreme' /*adm*/));?>
134
- </li>
135
-
136
- <li><?php _e('<span class="wvr-blue">Weaver X Text 2</span> - Display text in two columns - great for wide top/bottom widgets','weaver-xtreme' /*adm*/); ?>
137
- <?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaver-xtreme' /*adm*/));?>
138
- </li>
139
- </ul>
140
-
141
-
142
- <h3><?php _e('Per Page/Post Settings','weaver-xtreme' /*adm*/); ?></h3>
143
- <p> <?php _e("Click the following button to produce a list of links to all pages and posts that have Per Page or Per Post settings.", 'weaver-xtreme /*adm*/'); ?></p>
144
- <div style="clear:both;"></div>
145
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
146
- <span class='submit'><input name="show_per_page_report" type="submit" value="<?php _e('Show Pages and Posts with Per Page/Post Settings', 'weaver-xtreme /*adm*/'); ?>" /></span>
147
- <?php weaverx_nonce_field('show_per_page_report'); ?>
148
- </form><br /><br />
149
- </div>
150
-
151
- <?php
152
- }
153
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/includes/wvrx-ts-shortcodes.php DELETED
@@ -1,661 +0,0 @@
1
- <?php
2
- /*
3
- Weaver X shortcodes
4
- */
5
-
6
- function wvrx_ts_setup_shortcodes() {
7
- // we setup all of our shortcodes only after the theme has been loaded...
8
-
9
- $codes = array( // list of shortcodes
10
- array('bloginfo' => 'wvrx_ts_sc_bloginfo'), // [bloginfo]
11
- array('box' => 'wvrx_ts_sc_box'), // [box]
12
- array('div' => 'wvrx_ts_sc_div'), // [div]
13
- array('header_image' => 'wvrx_ts_sc_header_image'), // [header_image]
14
- array('hide_if' => 'wvrx_ts_sc_hide_if' ), // [hide_if]
15
- array('html' => 'wvrx_ts_sc_html'), // [html]
16
- array('iframe' => 'wvrx_ts_sc_iframe'), // [iframe]
17
- array('login' => 'wvrx_ts_sc_login'), // [login]
18
- array('show_if' => 'wvrx_ts_sc_show_if' ), // [show_if]
19
- array('span' => 'wvrx_ts_sc_span'), // [span]
20
- array('site_tagline' => 'wvrx_ts_sc_site_tagline'), // [site_tagline]
21
- array('site_title' => 'wvrx_ts_sc_site_title'), // [site_title]
22
- array('tab_group' => 'wvrx_ts_sc_tab_group',
23
- 'tab' => 'wvrx_ts_sc_tab'), // [tab_group], [tab]
24
- array('vimeo' => 'wvrx_ts_sc_vimeo'), // [vimeo]
25
- array('youtube' => 'wvrx_ts_sc_youtube'), // [youtube]
26
- array('weaverx_info' => 'wvrx_ts_weaverx_sc_info'), // [weaverx_info]
27
- );
28
-
29
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
30
-
31
- foreach ($codes as $code) {
32
- wvrx_ts_set_shortcodes($code, $prefix);
33
- }
34
- }
35
-
36
- add_action('init', 'wvrx_ts_setup_shortcodes'); // allow shortcodes to load after theme has loaded so we know which version to use
37
-
38
- // =============== [box] ===================
39
- function wvrx_ts_sc_box( $args = '', $text ) {
40
- extract(shortcode_atts(array(
41
- 'align' => '',
42
- 'border' => true,
43
- 'border_rule' => '1px solid black',
44
- 'border_radius' => '',
45
- 'color' => '',
46
- 'background' => '',
47
- 'margin' => '',
48
- 'padding' => '1',
49
- 'shadow' => '',
50
- 'style' => '',
51
- 'width' => ''
52
- ), $args));
53
-
54
- $sty = 'style="';
55
-
56
- if ( $align ) {
57
- $align = strtolower($align);
58
- switch ( $align ) {
59
- case 'center':
60
- $sty .= 'display:block;margin-left:auto;margin-right:auto;';
61
- break;
62
- case 'right':
63
- $sty .= 'float:right;';
64
- break;
65
- default:
66
- $sty .= 'float:left;';
67
- break;
68
- }
69
- }
70
-
71
- if ( $border )
72
- $sty .= "border:{$border_rule};";
73
- if ( $border_radius )
74
- $sty .= "border-radius:{$border_radius}px;";
75
- if ( $shadow ) {
76
- if ( $shadow < 1 ) $shadow = 1;
77
- if ( $shadow > 5 ) $shadow = 5;
78
- $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
79
- }
80
- if ( $color )
81
- $sty .= "color:{$color};";
82
- if ( $background )
83
- $sty .= "background-color:{$background};";
84
- if ( $margin )
85
- $sty .= "margin:{$margin}em;";
86
- if ( $padding )
87
- $sty .= "padding:{$padding}em;";
88
- if ( $width )
89
- $sty .= "width:{$width}%;";
90
- if ( $sty )
91
- $sty .= $style;
92
- $sty .= '"'; // finish it
93
-
94
- return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
95
- }
96
-
97
- // =============== [hide_if] ===================
98
- function wvrx_ts_sc_hide_if($args = '', $text ) {
99
-
100
- return wvrx_ts_show_hide_if( $args, $text, false );
101
- }
102
-
103
- // =============== [show_if] ===================
104
- function wvrx_ts_sc_show_if($args = '', $text ) {
105
- return wvrx_ts_show_hide_if( $args, $text, true );
106
- }
107
-
108
- // =============== [show_hide_if] ===================
109
- function wvrx_ts_show_hide_if($args = '', $text, $show) {
110
- extract(shortcode_atts(array(
111
- 'device' => 'default', // desktop, mobile, smalltablet, phone, all
112
- 'logged_in' => 'default', // true or false
113
- 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
114
- 'post_id' => 'default', // comma separated list
115
- 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
116
- ), $args));
117
-
118
- $valid_device = array('default','desktop','mobile','smalltablet','phone','all');
119
-
120
- if ( !in_array( $device, $valid_device )) {
121
- return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
122
-
123
- }
124
- if ( $logged_in == 'default' ) { // **** logged_in
125
- $logged_in = true;
126
- } else {
127
- $is_true = is_user_logged_in();
128
- $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : !$is_true;
129
- }
130
-
131
- if ( $not_post_id == 'default') { // **** pages
132
- $not_post_id = true;
133
- } else {
134
- $list = explode(',', str_replace(' ', '', $not_post_id));
135
- $not_post_id = !in_array( get_the_ID(), $list );
136
- }
137
-
138
- if ( $post_id == 'default') { // **** pages
139
- $post_id = true;
140
- } else {
141
- $list = explode(',', str_replace(' ', '', $post_id));
142
- $post_id = in_array( get_the_ID(), $list );
143
- }
144
-
145
- if ( $user_can == 'default') { // **** user_can
146
- $user_can = true;
147
- } else {
148
- $user_can = current_user_can( strtolower( $user_can) );
149
- }
150
-
151
- $x = true;
152
- if ( $x == 'default') {
153
- $x = true;
154
- } else {
155
- $x = $show;
156
- }
157
-
158
- $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
159
-
160
- if ( !$all_true ) { // device irrelevant
161
- // $text .= '* ALL TRUE FAILED *';
162
- if ( !$show )
163
- return do_shortcode( $text ); // hide fails, so show it
164
- else
165
- return ''; // show fails, so hide it
166
-
167
- } elseif ( $device == 'default') { // so all other conditions passed, see if specified device
168
- // $text .= '* ALL TRUE, DEVICE DEFAULT *';
169
- if ( $show )
170
- return do_shortcode( $text );
171
- else
172
- return '';
173
- } else {
174
- // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
175
- if ( $show ) {
176
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('show-' . $device); // for [extra_menu]
177
- } else {
178
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('hide-' . $device);
179
- }
180
- $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode($text) . '</div>';
181
- unset( $GLOBALS['wvrx_sc_show_hide'] );
182
- return $ret;
183
- }
184
- return '';
185
- }
186
-
187
-
188
- // =============== [header_image style='customstyle'] ===================
189
- function wvrx_ts_sc_header_image($args = ''){
190
- extract(shortcode_atts(array(
191
- 'style' => '', // STYLE
192
- 'h' => '',
193
- 'w' => ''
194
- ), $args));
195
-
196
- $width = $w ? ' width="' . $w . '"' : '';
197
- $height = $h ? ' height="' . $h . '"' : '';
198
- $st = $style ? ' style="' . $style . '"' : '';
199
-
200
- $hdrimg = '<img src="' . get_header_image() . '"' . $st . $width . $height
201
- . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
202
-
203
- return $hdrimg;
204
- }
205
-
206
- // =============== [bloginfo arg='name'] ======================
207
- function wvrx_ts_sc_bloginfo($args = '') {
208
- extract(shortcode_atts(array(
209
- 'arg' => 'name', // a WP bloginfo name
210
- 'style' => '' // wrap with style
211
- ), $args));
212
-
213
- $code = '';
214
- if ($style != '') $code = '<span style="' . $style . '">';
215
- $code .= esc_attr( get_bloginfo( $arg ));
216
- if ($style != '') $code .= '</span>';
217
- return $code;
218
- }
219
-
220
- // =============== [site_title style='customstyle'] ======================
221
- function wvrx_ts_sc_site_title($args = '') {
222
- extract(shortcode_atts(array(
223
- 'style' => '', /* styling for the header */
224
- 'matchtheme' => false
225
- ), $args));
226
-
227
- $title = esc_html( get_bloginfo( 'name', 'display' ));
228
-
229
- $before = '';
230
- $after = '';
231
-
232
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
233
- $before = '<h1' . weaverx_title_class( 'site_title', false, 'site-title' ) . '><a href="' . esc_url( home_url( '/' ) ) . '" title="' . $title . '" rel="home">';
234
- $after = '</a></h1>';
235
- }
236
-
237
- if ($style) {
238
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
239
- }
240
- return $before . $title . $after;
241
-
242
- }
243
-
244
- // =============== [site_tagline style='customstyle'] ======================
245
- function wvrx_ts_sc_site_tagline($args = '') {
246
- extract(shortcode_atts(array(
247
- 'style' => '', /* styling for the header */
248
- 'matchtheme' => false
249
- ), $args));
250
-
251
- $title = get_bloginfo( 'description' );
252
-
253
- $before = '';
254
- $after = '';
255
-
256
- if ( $matchtheme == 'true' || $matchtheme == 1 ) {
257
- $before = '<h2' . weaverx_title_class( 'tagline', false, 'site-tagline' ) . '>';
258
- $after = '</h2>';
259
- }
260
-
261
- if ($style) {
262
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
263
- }
264
- return $before . $title . $after;
265
- }
266
-
267
- // =============== [iframe src='address' height=nnn] ======================
268
- function wvrx_ts_sc_iframe($args = '') {
269
- extract(shortcode_atts(array(
270
- 'src' => '',
271
- 'height' => '600', /* styling for the header */
272
- 'percent' => 100,
273
- 'style' => 'border:1px;'
274
- ), $args));
275
-
276
- $sty = $style ? ' style="' . $style . '"' : '';
277
-
278
- if (!$src) return __('<h4>No src address provided to [iframe].</h4>','weaver-xtreme' /*adm*/);
279
- return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
280
- }
281
-
282
- // =============== [iframe src='address' height=nnn] ======================
283
- function wvrx_ts_sc_login($args = '') {
284
- extract(shortcode_atts(array(
285
- ), $args));
286
-
287
- return '<span class="wvrx-loginout">' . wp_loginout( '', false ) . '</span>';
288
- }
289
-
290
- // =============== [tab_group ] ======================
291
- function wvrx_ts_sc_tab_group( $args, $content ) {
292
- extract( shortcode_atts( array(
293
- 'border_color' => '', // tab and pane bodder color - default #888
294
- 'tab_bg' => '', // normal bg color of tab (default #CCC)
295
- 'tab_selected_color' => '', // color of tab when selected (default #EEE)
296
- 'pane_min_height' => '', // min height of a pane to help make all even if needed
297
- 'pane_bg' => '' // bg color of pane
298
- ), $args ) );
299
-
300
- if (isset($GLOBALS['wvrx_ts_in_tab_container']) && $GLOBALS['wvrx_ts_in_tab_container']) {
301
- return __('<strong>Sorry, you cannot nest tab_containers.</strong>','weaver-xtreme' /*adm*/);
302
- }
303
-
304
- // enqueue the theme support jslib only now when it will actually be needed!
305
-
306
- wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
307
-
308
- if ( !isset( $GLOBALS['wvrx_ts_tab_id'] ) )
309
- $GLOBALS['wvrx_ts_tab_id'] = 1;
310
- else
311
- ++$GLOBALS['wvrx_ts_tab_id'];
312
-
313
- $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
314
-
315
- $css = ''; // default styles
316
- $add_style = '';
317
- if ($border_color != '')
318
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
319
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
320
-
321
- if ($pane_min_height != '')
322
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
323
-
324
- if ($pane_bg != '')
325
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
326
-
327
- if ($tab_bg != '')
328
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
329
-
330
- if ($tab_selected_color != '')
331
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
332
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
333
-
334
- if ($css != '') { // specified some style...
335
- $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
336
- }
337
-
338
- $GLOBALS['wvrx_ts_in_tab_container'] = true;
339
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
340
-
341
- do_shortcode( $content ); // process the tabs on this
342
-
343
- $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
344
-
345
- if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
346
- foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
347
- $tabs[] = '<span>' . $tab['title'] . '</span>'. "\n";
348
- $panes[] = "\n" .'<div class="wvr-tabs-pane">' . $tab['content'] . '</div>';
349
- }
350
- $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
351
- . '<div class="wvr-tabs-nav">' . "\n"
352
- . implode( '', $tabs ) . '</div>' . "\n"
353
- . '<div class="wvr-tabs-panes">'
354
- . implode( '', $panes ) . "\n"
355
- . '</div><div class="wvr-tabs-clear"></div>' . "\n"
356
- . '</div> <!-- end tab_group -->' . "\n";
357
- }
358
-
359
- // Forget globals we generated
360
- unset( $GLOBALS['wvrx_ts_in_tab_container'],$GLOBALS['wvrx_ts_tabs'],$GLOBALS['wvrx_ts_num_tabs']);
361
-
362
- return $add_style . $out;
363
- }
364
-
365
- function wvrx_ts_sc_tab( $args, $content ) {
366
- extract( shortcode_atts( array(
367
- 'title' => 'Tab %d'
368
- ), $args ) );
369
-
370
- if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
371
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
372
- }
373
- $cur = $GLOBALS['wvrx_ts_num_tabs'];
374
- $GLOBALS['wvrx_ts_tabs'][$cur] = array(
375
- 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
376
- 'content' => do_shortcode( $content ) );
377
- $GLOBALS['wvrx_ts_num_tabs']++;
378
- }
379
-
380
-
381
- // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
382
- function wvrx_ts_sc_youtube($args = '') {
383
- $share = '';
384
- if ( isset ( $args[0] ) )
385
- $share = trim($args[0]);
386
-
387
- // http://code.google.com/apis/youtube/player_parameters.html
388
- // not including: enablejsapi, fs,playerapiid,
389
-
390
- extract(shortcode_atts(array(
391
- 'id' => '',
392
- 'sd' => false,
393
- 'related' => '0',
394
- 'privacy' => false,
395
- 'ratio' => false,
396
- 'center' => '1',
397
- 'autohide' => '~!',
398
- 'autoplay' => '0',
399
- 'border' => '0',
400
- 'color' => false,
401
- 'color1' => false,
402
- 'color2' => false,
403
- 'controls' => '1',
404
- 'disablekb' => '0',
405
- 'egm' => '0',
406
- 'fs' => '1',
407
- 'fullscreen' => 1,
408
- 'hd' => '0',
409
- 'iv_load_policy' => '1',
410
- 'loop' => '0',
411
- 'modestbranding' => '0',
412
- 'origin' => false,
413
- 'percent' => 100,
414
- 'playlist' => false,
415
- 'rel' => '0',
416
- 'showinfo' => '1',
417
- 'showsearch' => '1',
418
- 'start' => false,
419
- 'theme' => 'dark',
420
- 'wmode' => 'transparent'
421
-
422
- ), $args));
423
-
424
- if (!$share && !$id)
425
- return __('<strong>No share or id values provided for youtube shortcode.</strong>','weaver-xtreme' /*adm*/);
426
-
427
- if ($share) { // let the share override any id
428
- $share = str_replace('youtu.be/','',$share);
429
- if (strpos($share,'youtube.com/watch') !== false) {
430
- $share = str_replace('www.youtube.com/watch?v=', '', $share);
431
- $share = str_replace('&amp;','+',$share);
432
- $share = str_replace('&','+',$share);
433
- }
434
- $share = str_replace('http://','',$share);
435
- $share = str_replace('https://','',$share);
436
- if ($share)
437
- $id = $share;
438
- }
439
-
440
- $opts = $id . '%%';
441
-
442
- $opts = wvrx_ts_add_url_opt($opts, $hd != '0', 'hd=1');
443
- $opts = wvrx_ts_add_url_opt($opts, $autohide != '~!', 'autohide='.$autohide);
444
- $opts = wvrx_ts_add_url_opt($opts, $autoplay != '0', 'autoplay=1');
445
- $opts = wvrx_ts_add_url_opt($opts, $border != '0', 'border=1');
446
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color='.$color);
447
- $opts = wvrx_ts_add_url_opt($opts, $color1, 'color1='.$color1);
448
- $opts = wvrx_ts_add_url_opt($opts, $color2, 'color2='.$color2);
449
- $opts = wvrx_ts_add_url_opt($opts, $controls != '1', 'controls=0');
450
- $opts = wvrx_ts_add_url_opt($opts, $disablekb != '0', 'disablekb=1');
451
- $opts = wvrx_ts_add_url_opt($opts, $egm != '0', 'egm=1');
452
- $opts = wvrx_ts_add_url_opt($opts, true, 'fs='.$fs);
453
- $opts = wvrx_ts_add_url_opt($opts, true, 'iv_load_policy='.$iv_load_policy);
454
- $opts = wvrx_ts_add_url_opt($opts, $loop != '0', 'loop=1');
455
- $opts = wvrx_ts_add_url_opt($opts, $modestbranding != '0', 'modestbranding=1');
456
- $opts = wvrx_ts_add_url_opt($opts, $origin, 'origin='.$origin);
457
- $opts = wvrx_ts_add_url_opt($opts, $playlist, 'playlist='.$playlist);
458
- $opts = wvrx_ts_add_url_opt($opts, true, 'rel='.$rel);
459
- $opts = wvrx_ts_add_url_opt($opts, true, 'showinfo=' . $showinfo);
460
- $opts = wvrx_ts_add_url_opt($opts, $showsearch != '1', 'showsearch=0');
461
- $opts = wvrx_ts_add_url_opt($opts, $start, 'start='.$start);
462
- $opts = wvrx_ts_add_url_opt($opts, $theme != 'dark', 'theme=light');
463
- $opts = wvrx_ts_add_url_opt($opts, $wmode, 'wmode='.$wmode);
464
-
465
- $url = '//';
466
-
467
- if ($privacy) $url .= 'www.youtube-nocookie.com';
468
- else $url .= 'www.youtube.com';
469
-
470
- $opts = str_replace('%%+','%%?', $opts);
471
- $opts = str_replace('%%','', $opts);
472
- $opts = str_replace('+','&amp;', $opts);
473
-
474
- $url .= '/embed/' . $opts;
475
-
476
-
477
- $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
478
-
479
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
480
- "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
481
- $cntr2 = '</div>';
482
- $h = 9; $w = 16;
483
- if ( $sd ) {
484
- $h = 3; $w = 4;
485
- }
486
-
487
- $ret ="\n" . $cntr1 . '<iframe src="' . $url
488
- . '" frameborder="0" width="'.$w.'" height="' . $h . '" frameborder="0" ' . $allowfull . '></iframe>'
489
- . $cntr2 . "\n";
490
-
491
- return $ret;
492
- }
493
-
494
- // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
495
- function wvrx_ts_sc_vimeo($args = '') {
496
- $share = '';
497
- if ( isset ( $args[0] ) )
498
- $share = trim($args[0]);
499
-
500
- extract(shortcode_atts(array(
501
- 'id' => '',
502
- 'sd' => false,
503
- 'color' => '',
504
- 'autoplay' => false,
505
- 'loop' => false,
506
- 'portrait' => true,
507
- 'title' => true,
508
- 'byline' => true,
509
- 'percent' => 100,
510
- 'center' => '1'
511
- ), $args));
512
-
513
- if (!$share && !$id) return __('<strong>No share or id values provided for vimeo shortcode.</strong>','weaver-xtreme' /*adm*/);
514
-
515
- if ($share) { // let the share override any id
516
- $share = str_replace('http://vimeo.com/','',$share);
517
- if ($share) $id = $share;
518
- }
519
-
520
- $opts = $id . '##';
521
-
522
- $opts = wvrx_ts_add_url_opt($opts, $autoplay, 'autoplay=1');
523
- $opts = wvrx_ts_add_url_opt($opts, $loop, 'loop=1');
524
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color=' . $color);
525
- $opts = wvrx_ts_add_url_opt($opts, !$portrait, 'portrait=0');
526
- $opts = wvrx_ts_add_url_opt($opts, !$title, 'title=0');
527
- $opts = wvrx_ts_add_url_opt($opts, !$byline, 'byline=0');
528
-
529
- $url = '//player.vimeo.com/video/';
530
-
531
- $opts = str_replace('##+','##?', $opts);
532
- $opts = str_replace('##','', $opts);
533
- $opts = str_replace('+','&amp;', $opts);
534
-
535
- $url .= $opts;
536
-
537
- if (function_exists('weaverii_use_mobile'))
538
- if (weaverii_use_mobile('mobile')) $percent = 100;
539
-
540
-
541
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
542
- "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
543
- $cntr2 = '</div>';
544
- $h = 9; $w = 16;
545
- if ( $sd ) {
546
- $h = 3; $w = 4;
547
- }
548
-
549
- $ret = "\n" . $cntr1 . '<iframe src="' . $url
550
- . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
551
- . $cntr2 . "\n";
552
-
553
- return $ret;
554
- }
555
-
556
- // ===== video utils =====
557
-
558
- function wvrx_ts_add_url_opt($opts, $add, $add_val) {
559
- if ($add) {
560
- $opts = $opts . '+' . $add_val;
561
- }
562
- return $opts;
563
- }
564
-
565
-
566
-
567
- function wvrx_ts_sc_html($vals = '') { // [html style='customstyle'] - all ======================
568
- $tag = 'span';
569
- if ( isset ( $vals[0] ) )
570
- $tag = trim( $vals[0]);
571
-
572
- extract(shortcode_atts(array(
573
- 'args' => ''
574
- ), $vals));
575
- if ($args) $args = ' ' . $args;
576
- return '<' . $tag . $args . '>';
577
- }
578
-
579
- function wvrx_ts_sc_div($vals = '',$text) { // [div] - all ===================
580
- extract(shortcode_atts(array(
581
- 'id' => '',
582
- 'class' => '',
583
- 'style' => ''
584
- ), $vals));
585
-
586
- $args = '';
587
- if ($id) $args .= ' id="' . $id . '"';
588
- if ($class) $args .= ' class="' . $class . '"';
589
- if ($style) $args .= ' style="' . $style . '"';
590
-
591
- return '<div' . $args . '>' . do_shortcode($text) . '</div>';
592
- }
593
-
594
- function wvrx_ts_sc_span($vals = '',$text) { // [span] - all ==================
595
- extract(shortcode_atts(array(
596
- 'id' => '',
597
- 'class' => '',
598
- 'style' => ''
599
- ), $vals));
600
-
601
- $args = '';
602
- if ($id) $args .= ' id="' . $id . '"';
603
- if ($class) $args .= ' class="' . $class . '"';
604
- if ($style) $args .= ' style="' . $style . '"';
605
-
606
- return '<span' . $args . '>' . do_shortcode($text) . '</span>';
607
- }
608
-
609
- function wvrx_ts_weaverx_sc_info() { // [info] ======================
610
- global $current_user;
611
- $out = __('<strong>Theme/User Info</strong><hr />','weaver-xtreme' /*adm*/);
612
-
613
- get_currentuserinfo();
614
- if (isset($current_user->display_name)) {
615
- $out .= __('<em>User:</em> ','weaver-xtreme' /*adm*/) . $current_user->display_name . '<br />';
616
- }
617
- $out .= '&nbsp;&nbsp;' . wp_register('','<br />',false);
618
- $out .= '&nbsp;&nbsp;' . wp_loginout('',false) . '<br />';
619
-
620
- $agent = __('Not Available','weaver-xtreme' /*adm*/);
621
- if (isset($_SERVER["HTTP_USER_AGENT"]) )
622
- $agent = $_SERVER['HTTP_USER_AGENT'];
623
- $out .= __('<em>User Agent</em>:','weaver-xtreme' /*adm*/) . ' <small>' . $agent . '</small>';
624
- $out .= '<div id="example"></div>
625
- <script type="text/javascript">
626
- var txt = "";
627
- var myWidth;
628
- if( typeof( window.innerWidth ) == "number" ) {
629
- //Non-IE
630
- myWidth = window.innerWidth;
631
- } else if( document.documentElement &&
632
- ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
633
- //IE 6+ in "standards compliant mode"
634
- myWidth = document.documentElement.clientWidth;
635
- } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
636
- //IE 4 compatible
637
- myWidth = document.body.clientWidth;
638
- }
639
- txt+= "<em>Browser Width: </em>" + myWidth + " px</br>";
640
- document.getElementById("example").innerHTML=txt;
641
- </script>';
642
-
643
- $out .= __('<em>Feed title:</em> ','weaver-xtreme' /*adm*/) . get_bloginfo_rss('name') . '<br />' . get_wp_title_rss();
644
-
645
- $out .= __('<br /><em>You are using</em> WordPress ','weaver-xtreme' /*adm*/) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
646
- $out .= __('<br /><em>Memory:</em> ','weaver-xtreme' /*adm*/) . round(memory_get_usage()/1024/1024,2) . 'M of ' . (int)ini_get('memory_limit') . 'M <hr />';
647
- return $out;
648
- }
649
-
650
-
651
- function wvrx_ts_set_shortcodes($sc_list, $prefix) {
652
- foreach ($sc_list as $sc_name => $sc_func) {
653
- remove_shortcode($prefix . $sc_name);
654
- add_shortcode($prefix . $sc_name,$sc_func);
655
- }
656
- }
657
-
658
- // =============== Utilities ======================
659
-
660
-
661
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/includes/wvrx-ts-widgets.php DELETED
@@ -1,169 +0,0 @@
1
- <?php
2
- /*
3
- * Weaver X Widgets and shortcodes - widgets
4
- */
5
-
6
- class WeaverX_Widget_Text extends WP_Widget {
7
-
8
- function WeaverX_Widget_Text() {
9
- $widget_ops = array('classname' => 'WeaverX_Widget_Text',
10
- 'description' => __('Text Widget with Two Columns - with HTML and shortcode support. Also adds shortcodes to standard Text widget.','weaver-xtreme' /*adm*/));
11
- $control_ops = array('width' => 400, 'height' => 350);
12
- $this->WP_Widget('wvrx2_text', __('Weaver X Text 2','weaver-xtreme' /*adm*/), $widget_ops, $control_ops);
13
- }
14
-
15
- function widget( $args, $instance ) {
16
- extract($args);
17
- $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
18
- $text = apply_filters( 'weaverx_text', $instance['text'], $instance );
19
- $text2 = apply_filters( 'weaverx_text', $instance['text2'], $instance );
20
- echo $before_widget;
21
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
22
- <div class="textwidget"><div style="float: left; width: 48%; padding-right: 2%;">
23
- <?php
24
- if ($instance['filter']) {
25
- echo(wpautop($text)); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
26
- echo(wpautop($text2)); echo('</div><div style="clear: both;"></div>');
27
- } else {
28
- echo($text); echo('</div><div style="float: left; width: 48%; padding-left: 2%;">');
29
- echo($text2); echo('</div><div style="clear: both;"></div>');
30
- }
31
- ?>
32
- </div>
33
- <?php
34
- echo $after_widget;
35
- }
36
-
37
- function update( $new_instance, $old_instance ) {
38
- $instance = $old_instance;
39
- $instance['title'] = strip_tags($new_instance['title']);
40
- if ( current_user_can('unfiltered_html') ) {
41
- $instance['text'] = $new_instance['text'];
42
- $instance['text2'] = $new_instance['text2'];
43
- }
44
- else {
45
- $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
46
- $instance['text2'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text2']) ) );
47
- }
48
- $instance['filter'] = isset($new_instance['filter']);
49
- return $instance;
50
- }
51
-
52
- function form( $instance ) {
53
- $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'text2' => '', 'filter' => 0) );
54
- $title = strip_tags($instance['title']);
55
- $text = format_to_edit($instance['text']);
56
- $text2 = format_to_edit($instance['text2']);
57
- ?>
58
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title:' /*a*/ ); ?></label>
59
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
60
-
61
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
62
- <textarea class="widefat" rows="8" cols="20" id="<?php echo $this->get_field_id('text2'); ?>" name="<?php echo $this->get_field_name('text2'); ?>"><?php echo $text2; ?></textarea>
63
- <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> />
64
- &nbsp;<label for="<?php echo $this->get_field_id('filter'); ?>"><?php echo 'Automatically add paragraphs'; ?></label></p>
65
- <?php
66
- }
67
- }
68
-
69
- /**
70
- * Weaver X Per Page Text
71
- */
72
- class WeaverX_Widget_PPText extends WP_Widget {
73
-
74
- function WeaverX_Widget_PPText() {
75
- $widget_ops = array('classname' => 'wvrx_widget_pptext', 'description' =>
76
- __('Display text on a Per Page basis. Add to Widget area to see instructions.','weaver-xtreme' /*adm*/) );
77
- $this->WP_Widget('wvrx_pptext', __('Weaver X Per Page Text','weaver-xtreme' /*adm*/), $widget_ops);
78
- }
79
-
80
- function widget( $args, $instance ) {
81
- extract($args);
82
- $title = get_post_meta(get_the_ID(),'wvrx_ts_pp_title',true);
83
- $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
84
-
85
- if (empty($title) && empty($text))
86
- return;
87
-
88
- echo $before_widget;
89
- if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
90
- echo do_shortcode($text);
91
- echo $after_widget;
92
- }
93
-
94
- function update( $new_instance, $old_instance ) {
95
- $instance = $old_instance;
96
- $instance['title'] = strip_tags($new_instance['title']);
97
-
98
- return $instance;
99
- }
100
-
101
- function form( $instance ) {
102
- ?>
103
- <p><?php _e('This widget will work like a text widget, but the title and content are defined by custom
104
- fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>
105
- if you want a title, and define Custom Field <em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text,
106
- HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom
107
- fields are defined when that page is displayed. (This widget won\'t display on the default blog or other archive-like pages.)','weaver-xtreme' /*adm*/); ?><p>
108
- <?php
109
- }
110
- }
111
-
112
- /**
113
- * Weaver X login
114
- */
115
- class WeaverX_Widget_Login extends WP_Widget {
116
-
117
- function WeaverX_Widget_Login() {
118
- $widget_ops = array('classname' => 'wvrx_widget_login', 'description' => __( "Log in/out, admin", 'weaver-xtreme' /*adm*/ ) );
119
- $this->WP_Widget('wvrx_login', __('Weaver X Login','weaver-xtreme' /*adm*/), $widget_ops);
120
- }
121
-
122
- function widget( $args, $instance ) {
123
- extract($args);
124
- $title = apply_filters('widget_title', empty($instance['title']) ? __('Login', 'weaver-xtreme' /*adm*/ ) : $instance['title'], $instance, $this->id_base);
125
-
126
- echo $before_widget;
127
- if ( $title )
128
- echo $before_title . $title . $after_title;
129
- global $current_user;
130
- get_currentuserinfo();
131
- if (isset($current_user->display_name))
132
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaver-xtreme' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
133
- ?>
134
- <ul>
135
- <?php wp_register(); ?>
136
- <li><?php wp_loginout(); ?></li>
137
- </ul>
138
- <?php
139
- echo $after_widget;
140
- }
141
-
142
- function update( $new_instance, $old_instance ) {
143
- $instance = $old_instance;
144
- $instance['title'] = strip_tags($new_instance['title']);
145
-
146
- return $instance;
147
- }
148
-
149
- function form( $instance ) {
150
- $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
151
- $title = strip_tags($instance['title']);
152
- ?>
153
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','weaver-xtreme' /*adm*/); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
154
- <?php
155
- }
156
- }
157
-
158
-
159
- add_action("widgets_init", "wvrx_ts_load_widgets");
160
- add_filter('weaverx_text', 'do_shortcode');
161
- add_filter('widget_text', 'do_shortcode'); // add to standard text widget, too.
162
-
163
- function wvrx_ts_load_widgets() {
164
- register_widget("WeaverX_Widget_Text");
165
- register_widget("WeaverX_Widget_PPText");
166
- register_widget("WeaverX_Widget_Login");
167
- }
168
-
169
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/js/wvrx-ts-jslib.js DELETED
@@ -1,27 +0,0 @@
1
- /* *********************************************************************************
2
- * Weaver X Theme Support JavaScript support Library
3
- *
4
- * Author: WeaverTheme - www.weavertheme.com
5
- * @version 1.0
6
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
7
- * @author Bruce Wampler
8
- *
9
- * Notes - this library requires jQuery to be loaded
10
- * this library was cobbled together over a long period of time, so it contains a
11
- * bit of a jumble of straight JavaScript and jQuery calls. So it goes. It works.
12
- *
13
- *
14
- ************************************************************************************* */
15
-
16
-
17
- jQuery(document).ready(function($) { // self-defining function
18
- // Tabs
19
- $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
20
- $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
21
- .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
22
- });
23
- $('.wvr-tabs-pane').hide();
24
- $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
25
- $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
26
-
27
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/js/wvrx-ts-jslib.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(a){a(".wvr-tabs-nav").delegate("span:not(.wvr-tabs-current)","click",function(){a(this).addClass("wvr-tabs-current").siblings().removeClass("wvr-tabs-current").parents(".wvr-tabs").find(".wvr-tabs-pane").hide().eq(a(this).index()).show()});a(".wvr-tabs-pane").hide();a(".wvr-tabs-nav span:first-child").addClass("wvr-tabs-current");a(".wvr-tabs-panes .wvr-tabs-pane:first-child").show()});
 
3.2.1/1.2/readme.txt DELETED
@@ -1,145 +0,0 @@
1
- === Weaver Xtreme Theme Support ===
2
- Plugin Name: Weaver Xtreme Theme Support
3
- Plugin URI: http://weavertheme.com/plugins/
4
- Tags: weaver x theme, shortcodes, widgets
5
- Author URI: http://weavertheme.com/about/
6
- Contributors: wpweaver
7
- Author: wpweaver
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Requires at least: 4.0
11
- Tested up to: 4.2
12
- Stable tag: 1.2
13
-
14
- A useful shortcode and widget collection for Weaver Xtreme
15
-
16
- == Description ==
17
-
18
- This is the main theme suppot for the Weaver X Theme. This plugin provides a collection of useful shortcodes and widgets designed to complement the Weaver X theme. These shortcodes have been selected and developed based on requests and feedback from thousands of users of the Weaver X, Weaver II, and Aspen themes.
19
-
20
- While these shortcodes are optimized for the Weaver X theme, they will also work with full functionality for most WordPress themes, and can be used
21
- if you switch themes.
22
-
23
- Includes complete documentation help file. Instructions for using the shortcodes and widgets are in the help file. Use it for non-Weaver Xtreme themes.
24
-
25
- = Shortcodes included =
26
-
27
- * **[tab_group]** - Display content in a tabbed box.
28
- * **[youtube]** - Show your YouTube videos responsively, and with the capability to use any of the YouTube custom display options.
29
- * **[vimeo]** - Show your Vimeo videos responsively, and with the capability to use any of the Vimeo custom display options.
30
- * **[iframe]** - Quick and easy display of content in an iframe.
31
- * **[div]**, **[span]**, **[html]** - Add div, span, and other html to pages/posts without the need to switch to Text view.
32
- * **[hide/show_if]** - Show or hide content depending upon options: device, page ID, user capability, logged in status.
33
- * **[bloginfo]** - Display any information available from WordPress bloginfo function.
34
- * **[user_can]** - Display content base on logged in user role.
35
- * **[site_title]** - Display Site title.
36
- * **[site_tagline]** - Display Site tag line.
37
-
38
- = Widgets Included =
39
-
40
- * **Weaver X 2 Column Text Widget** - Add text into two columns in a widget
41
- * **Weaver X Per Page Text Widget** - Add a text widget on a per page basis
42
- * **Weaver X Login** - Simplified login widget
43
-
44
- = Licenses =
45
-
46
- * The Weaver X Theme Support plugin is licensed under the terms of the GNU GENERAL PUBLIC LICENSE, Version 2,
47
- June 1991. (GPL) The full text of the license is in the license.txt file.
48
- * All images included with this plugin are either original works of the author which
49
- have been placed into the public domain, or have been derived from other public domain sources,
50
- and thus need no license. (This does not include the images provided with any of the
51
- below listed scripts and libraries. Those images are covered by their respective licenses.)
52
-
53
- This plugin also includes several scripts and libraries that are covered under the terms
54
- of their own licenses in the listed files in the plugin distribution:
55
-
56
-
57
-
58
- == Installation ==
59
-
60
- It is easiest to use the Plugins : Add Plugin admin page, but you can do it manually, too:
61
-
62
- 1. Download the plugin archive and expand it
63
- 2. Upload all the plugin files and directories to your wp-content/plugins/weaverx-theme-support directory
64
- 3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for this plugin.
65
-
66
- == Frequently Asked Questions ==
67
-
68
- = Where can I get support for this plugin? =
69
-
70
- Support for this plugin can best be found at our forum - http://forum.weavertheme.com
71
-
72
- == Upgrade Notice ==
73
-
74
- This is the initial release of this plugin.
75
-
76
- == ChangeLog ==
77
- == 1.2 =
78
- * New: Improved automatic version update for Weaver Xtreme -
79
- avoids critical update delays due to WordPress theme review process time lag
80
- * Fixed issue with tabs shortcode
81
-
82
- = 1.1 =
83
- * Fixed some wording (ATW Show Posts -> Weaver Show Posts)
84
- * Updated WP compatibility level
85
- * Added new per page multi-column
86
-
87
- = 1.0.4 =
88
- * Fix: minor styling issue
89
-
90
- = 1.0.3 =
91
- * Fix: extra " in [ youtube ]
92
-
93
- = 1.0.2 =
94
- * Fix: z-index rule for tab shortcode
95
-
96
- = 1.0.1 =
97
- * New - Per Page/Post Report from Add-ons menu
98
- * Fix: '\1234' values in per post style
99
- * Fix: Internal name of Per Post Style - may cause loss of prevoius setting - sorry
100
-
101
- = 1.0 =
102
- * Minor tweaks
103
- * wvrx_ shortcode prefix option
104
-
105
- = 0.96 =
106
- * Fixed bug with Per page options on Page with Posts
107
- * Internal optimizations
108
-
109
- = 0.95.1 =
110
- * Only load if Weaver Xtreme is the active theme.
111
-
112
- = 0.95 =
113
- * Changed [ site_title ] and [ site_tagline ] to match theme style as option
114
-
115
- = 0.10 =
116
- * Fixed per page options when used with old Xtreme Plus version
117
-
118
- = 0.9 =
119
- * Added Per Page and Per Post admin support to plugin (removed from Xtreme theme)
120
-
121
- = 0.8 =
122
- * Added [ box ]
123
-
124
- = 0.7 =
125
- * Fixes for [ show/hide_if]
126
- * Removed unused files
127
-
128
- = 0.6 =
129
- * Fixed [ show/hide_if ] for multiple conditions that include device
130
- * Changed interface to Weaver Xtreme - all codes now just in Weaver X Add-ons tab
131
-
132
- = 0.5 =
133
- * Added [ show/hide_if ], removed [ hide_mobie ], [show_if_logged_in]
134
- * Updated Doc
135
- * Added action for interface to Weaver Xtreme "Add-ons" tab
136
-
137
- = 0.4 =
138
- * Optimized loading of jslib - only needed by tab group, so not loaded until shortcode used
139
-
140
- = 0.3 =
141
- * Fixed video shortcodes
142
-
143
- = 0.1 =
144
-
145
- * initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/weaverx-ts-admin-style.css DELETED
@@ -1,133 +0,0 @@
1
- /* Weaver admin style */
2
- .hide_me {display:none;}
3
-
4
- .wvrx_ts_green {font-weight:bold;color:green;}
5
- .wvrx_ts_yellow {font-weight:bold;color:orange;}
6
- .wvrx_ts_red {font-weight:bold;color:red;}
7
-
8
- .wvr-help ul {list-style: disc; margin-left:30px;}
9
- .wvr-option-section {font-weight:bold;font-size:120%;color:blue;}
10
-
11
- .wvr-wrap {
12
- max-width:95%;
13
- }
14
-
15
- .tab ul {
16
- margin-left: 1.15em;
17
- list-style: disc outside none;
18
- }
19
- .tab ol {
20
- list-style-position:outside;
21
- margin-left: 1.4em;
22
- margin-bottom:.6em;
23
- }
24
-
25
- .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
26
-
27
- div.yetii {
28
- width: 95%;
29
- margin: 0 0 20px 0;
30
- }
31
-
32
- ul.yetii {
33
- list-style-type: none;
34
- width: 100%;
35
- float: left;
36
- border-bottom: 4px ridge #ddd;
37
- margin-bottom: 8px;
38
- }
39
-
40
- ul.yetii li {
41
- margin: 0 2px 0 0;
42
- float: left;
43
- }
44
-
45
- ul.yetii a {
46
- float: left;
47
- display: block;
48
- padding: 4px 8px;
49
- border: 1px solid #ddd;
50
- border-bottom: 0;
51
- color: #666;
52
- background: #eee;
53
- text-decoration: none;
54
- font-weight: bold;
55
- }
56
-
57
- ul.yetii a:hover {
58
- background: #fff;
59
- }
60
-
61
- ul.yetii a.active {
62
- background: #fff;
63
- border-color: #00c;
64
- color: #00f;
65
- }
66
- /* -- */
67
- div.yetiisub {
68
- width: 100%;
69
- margin: 0 0 20px 0;
70
- }
71
-
72
- ul.yetiisub {
73
- list-style-type: none;
74
- width: 100%;
75
- float: left;
76
- margin-bottom: 8px;
77
- }
78
-
79
- ul.yetiisub li {
80
- margin: 0 2px 2px 0px;
81
- float: left;
82
- }
83
-
84
- ul.yetiisub a {
85
- float: left;
86
- padding: 4px 8px;
87
- border: 1px solid #ccc;
88
- color: #666;
89
- background: #f0f0f0;
90
- text-decoration: none;
91
- font-style: italic;
92
- font-weight: bold;
93
- }
94
-
95
- ul.yetiisub a:hover {
96
- background: #fefefe !important;
97
- }
98
-
99
- ul.yetiisub a.active {
100
- background: #fff;
101
- border-color: #00c;
102
- color: #00f;
103
- }
104
- .wvr-small-submit {
105
- padding: 1.0em 0;
106
- margin: 1px 0;
107
- font-size:90%;
108
- }
109
-
110
- .wvr-option-header {background:#D0D0D8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px;}
111
- .wvr-option-subheader {background:#EAEAEA;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px;}
112
- .wvr-row-header {background:#D0D0D8;line-height:1.8em;padding-left:4px;}
113
- .wvr-row-subheader {background:#EAEAEA;padding-left:4px;}
114
- .wvr-row-subheader-alt {background:#F4F4F4;padding-left:4px;}
115
- /* layouts for layout boxes */
116
- .l_layout {display:block; width:140px; height:110px; float:left; margin-right:10px; margin-bottom:10px; display:inline;border:1px solid #888; color:black;text-align:center;font:15px arial,sans-serif;}
117
- .l_layout span {display:block;}
118
- .l_header {width:140px; height:20px; background:#CCF; line-height:20px;}
119
- .l_content {width:100px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
120
- .l_contentcenter {width:60px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
121
- .l_content2 {width:80px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
122
- .l_contentw {width:140px; height:70px; background:beige; float:left; display:inline; line-height:70px;}
123
- .l_stdbar {width:40px; height:70px; float:left; display:inline;}
124
- .l_widebar {width:60px; height:70px; float:left; display:inline;}
125
- .l_righttop {width:40px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
126
- .l_righttopwide {width:60px; height:20px; background:#FE8; float:left; display:inline; line-height:20px;}
127
- .l_rightup {width:40px; height:25px; margin:0; background:#FAA; float:left; display:inline; line-height:25px;}
128
- .l_rightright {width:40px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
129
- .l_rightdown {width:40px; height:25px; margin:0; background:#AFA; float:left; display:inline; line-height:25px;}
130
- .l_leftleft {width:40px; height:70px; margin:0; background:#AFA; float:left; display:inline; line-height:70px;}
131
- .l_leftshort {width:30px; height:50px; margin:0; background:#AFA; float:left; display:inline; line-height:50px;}
132
- .l_skinny {width:30px; height:50px; margin:0; background:#FAA; float:left; display:inline; line-height:50px;}
133
- .l_footer {clear:left;width:140px; height:20px; background:#DDF; color:#000; line-height:20px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/weaverx-ts-admin-style.min.css DELETED
@@ -1,4 +0,0 @@
1
- .hide_me{display:none}.wvrx_ts_green{font-weight:bold;color:green}.wvrx_ts_yellow{font-weight:bold;color:orange}.wvrx_ts_red{font-weight:bold;color:red}.wvr-help ul{list-style:disc;margin-left:30px}.wvr-option-section{font-weight:bold;font-size:120%;color:blue}.wvr-wrap{max-width:95%}.tab ul{margin-left:1.15em;list-style:disc outside none}.tab ol{list-style-position:outside;margin-left:1.4em;margin-bottom:.6em}.js_button{background:#eee!important;font-weight:600!important;color:#585858!important}div.yetii{width:95%;margin:0 0 20px 0}ul.yetii{list-style-type:none;width:100%;float:left;border-bottom:4px ridge #ddd;margin-bottom:8px}ul.yetii li{margin:0 2px 0 0;float:left}ul.yetii a{float:left;display:block;padding:4px 8px;border:1px solid #ddd;border-bottom:0;color:#666;background:#eee;text-decoration:none;font-weight:bold}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;border-color:#00c;color:#00f}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}
2
- ul.yetiisub li{margin:0 2px 2px 0;float:left}ul.yetiisub a{float:left;padding:4px 8px;border:1px solid #ccc;color:#666;background:#f0f0f0;text-decoration:none;font-style:italic;font-weight:bold}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;border-color:#00c;color:#00f}.wvr-small-submit{padding:1.0em 0;margin:1px 0;font-size:90%}.wvr-option-header{background:#d0d0d8;line-height:1.8em;width:95%;color:blue;font-size:large;font-weight:bold;padding-left:4px}.wvr-option-subheader{background:#eaeaea;line-height:1.8em;width:95%;color:blue;font-size:larger;font-weight:bold;padding-left:4px}.wvr-row-header{background:#d0d0d8;line-height:1.8em;padding-left:4px}.wvr-row-subheader{background:#eaeaea;padding-left:4px}.wvr-row-subheader-alt{background:#f4f4f4;padding-left:4px}.l_layout{display:block;width:140px;height:110px;float:left;margin-right:10px;margin-bottom:10px;display:inline;border:1px solid #888;color:black;text-align:center;font:15px arial,sans-serif}
3
- .l_layout span{display:block}.l_header{width:140px;height:20px;background:#CCF;line-height:20px}.l_content{width:100px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentcenter{width:60px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_content2{width:80px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_contentw{width:140px;height:70px;background:beige;float:left;display:inline;line-height:70px}.l_stdbar{width:40px;height:70px;float:left;display:inline}.l_widebar{width:60px;height:70px;float:left;display:inline}.l_righttop{width:40px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_righttopwide{width:60px;height:20px;background:#FE8;float:left;display:inline;line-height:20px}.l_rightup{width:40px;height:25px;margin:0;background:#FAA;float:left;display:inline;line-height:25px}.l_rightright{width:40px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}
4
- .l_rightdown{width:40px;height:25px;margin:0;background:#AFA;float:left;display:inline;line-height:25px}.l_leftleft{width:40px;height:70px;margin:0;background:#AFA;float:left;display:inline;line-height:70px}.l_leftshort{width:30px;height:50px;margin:0;background:#AFA;float:left;display:inline;line-height:50px}.l_skinny{width:30px;height:50px;margin:0;background:#FAA;float:left;display:inline;line-height:50px}.l_footer{clear:left;width:140px;height:20px;background:#DDF;color:#000;line-height:20px}
 
 
 
 
3.2.1/1.2/weaverx-ts-style.css DELETED
@@ -1,110 +0,0 @@
1
- /*
2
- Style file for Weaver X Theme Support
3
-
4
- License: GPL
5
-
6
- Weaver X Theme Support
7
- Copyright (C) 2014-2015 Bruce E. Wampler - weaver@weavertheme.com
8
-
9
- This program is free software: you can redistribute it and/or modify
10
- it under the terms of the GNU General Public License as published by
11
- the Free Software Foundation, either version 3 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
-
19
- You should have received a copy of the GNU General Public License
20
- along with this program. If not, see <http://www.gnu.org/licenses/>.
21
-
22
- PLEASE - DO NOT EDIT THIS FILE
23
-
24
- If you MUST change the CSS for these shortcodes and widgets, use the
25
- Custom CSS features of Weaver X, or use a custom CSS plugin
26
- such as JetPack, which let you add CSS to your theme or plugins
27
- without modifying theme or plugin .css files.
28
- */
29
-
30
- /* rules for areas hidden in various hybrid "desktop" views */
31
-
32
- @media screen and (min-width:768px) { /* rules for desk top */
33
- .wvr-hide-desktop {display:none !important;}
34
- .wvr-hide-all {display:none !important;}
35
- .wvr-show-phone {display:none !important;}
36
- .wvr-show-mobile {display:none !important;}
37
- .wvr-show-smalltablet {display:none !important;}
38
- }
39
-
40
- @media screen and (min-width:581px) and (max-width:767px) { /* rules for small tablets */
41
- .wvr-hide-smalltablet {display:none !important;}
42
- .wvr-hide-mobile {display:none !important;}
43
- .wvr-hide-all {display:none !important;}
44
- .wvr-show-desktop {display:none !important;}
45
- .wvr-show-phone {display:none !important;}
46
- }
47
-
48
- @media screen and (max-width:580px) { /* rules for phones */
49
- .wvr-hide-phone {display:none !important;}
50
- .wvr-hide-mobile {display:none !important;}
51
- .wvr-hide-all {display:none !important;}
52
- .wvr-show-desktop {display:none !important;}
53
- .wvr-show-smalltablet {display:none !important;}
54
- }
55
-
56
- /* Tabs */
57
- .wvr-tabs {
58
- -webkit-box-sizing: border-box;
59
- -moz-box-sizing: border-box;
60
- box-sizing: border-box;
61
- margin: 0 0 1.5em 0;
62
- background:transparent;
63
- }
64
-
65
- .wvr-tabs-style .wvr-tabs-nav { /* top "bar" behind tabs */
66
- padding: 0px 20px 0px 0px;
67
- margin: 0;
68
- height: 32px;
69
- background-color: transparent;
70
- }
71
- .wvr-tabs-style .wvr-tabs-nav span { /* bg color of a tab */
72
- display: block;
73
- float: left;
74
- padding: 0 20px;
75
- height: 32px;
76
- line-height: 32px;
77
- margin-right: 5px;
78
- cursor: pointer;
79
- border-top: 1px solid #888; /* border-color */
80
- border-right: 1px solid #888;
81
- border-left: 1px solid #888;
82
- background: #ccc; /* tab-bg */
83
- border-top-left-radius:6px;
84
- border-top-right-radius:6px;
85
- position:relative;
86
- z-index:1;
87
- }
88
-
89
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current {
90
- position:relative;
91
- z-index:3;
92
- }
93
-
94
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
95
- .wvr-tabs-style .wvr-tabs-nav span:hover {
96
- background: #eee; /* tab-current-color */
97
- }
98
-
99
- .wvr-tabs-style .wvr-tabs-pane {
100
- padding: 15px;
101
- border: 1px solid #888; /* border-color */
102
- min-height:20px; /* pane-min-height */
103
- background-color:transparent; /* pane-bg */
104
- position:relative;
105
- z-index:2;
106
- }
107
-
108
- .wvr-tabs-panes {position:relative;z-index:2;} /* add line to tab */
109
-
110
- .wvr-tabs-nav {position:relative;z-index:3;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/weaverx-ts-style.min.css DELETED
@@ -1,2 +0,0 @@
1
- @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px;position:relative;z-index:1}
2
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current{position:relative;z-index:3}.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent;position:relative;z-index:2}.wvr-tabs-panes{position:relative;z-index:2}.wvr-tabs-nav{position:relative;z-index:3}
 
 
3.2.1/1.2/weaverx-ts.php DELETED
@@ -1,404 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Weaver Xtreme Theme Support
4
- Plugin URI: http://weavertheme.com/plugins
5
- Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
- Author: wpweaver
7
- Author URI: http://weavertheme.com/about/
8
- Version: 1.2
9
- License: GPL V3
10
-
11
- Weaver Xtreme Theme Support
12
-
13
- Copyright (C) 2014, Bruce E. Wampler - weaver@weavertheme.com
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
-
30
- /* CORE FUNCTIONS
31
- */
32
- $theme = get_template_directory();
33
-
34
- if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
35
-
36
- define ('WVRX_TS_VERSION','1.2');
37
- define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
- define ('WVRX_TS_APPEARANCE_PAGE', false );
39
-
40
- function wvrx_ts_installed() {
41
- return true;
42
- }
43
-
44
-
45
- function wvrx_ts_plugins_url($file,$ext) {
46
- return plugins_url($file,__FILE__) . $ext;
47
- }
48
-
49
- function wvrx_ts_enqueue_scripts() { // action definition
50
-
51
- if (function_exists('wvrx_ts_slider_header')) wvrx_ts_slider_header();
52
-
53
- //-- Weaver X PLus js lib - requires jQuery...
54
-
55
- // put the enqueue script in the tabs shortcode where it belongs
56
-
57
- //wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION);
58
-
59
-
60
- // add plugin CSS here, too.
61
-
62
- wp_register_style('wvrx-ts-style-sheet',wvrx_ts_plugins_url('weaverx-ts-style', WVRX_TS_MINIFY.'.css'),null,WVRX_TS_VERSION,'all');
63
- wp_enqueue_style('wvrx-ts-style-sheet');
64
- }
65
-
66
- add_action('wp_enqueue_scripts', 'wvrx_ts_enqueue_scripts' );
67
-
68
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
69
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
70
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
71
-
72
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
73
-
74
- add_action('admin_menu', 'wvrx_ts_add_page_fields',11); // allow X-Plus to override us
75
-
76
- function wvrx_ts_add_page_fields() {
77
- add_meta_box('page-box', __('Weaver Xtreme Options For This Page (Theme Support Per Page Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_page_extras_load', 'page', 'normal', 'high');
78
- add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
79
- global $post;
80
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
81
- if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') ) {
82
- $i = 1;
83
- $args=array( 'public' => true, '_builtin' => false );
84
- $post_types = get_post_types($args,'names','and');
85
- foreach ($post_types as $post_type ) {
86
- add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaver-xtreme' /*adm*/), 'wvrx_ts_post_extras', $post_type, 'normal', 'high');
87
- $i++;
88
- }
89
- }
90
- require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin - needs to be here
91
-
92
- }
93
-
94
- function wvrx_ts_page_extras_load() {
95
- wvrx_ts_page_extras();
96
- }
97
-
98
- function wvrx_ts_post_extras_load() {
99
- wvrx_ts_post_extras();
100
- }
101
- }
102
-
103
- // ======================================== subthemes ========================================
104
- add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_action');
105
-
106
- function wvrx_ts_child_show_extrathemes_action() {
107
- echo '<h3 class="atw-option-subheader">' . __('Select an Add-on Subtheme You Have Uploaded','weaver-xtreme' /*adm*/) . '</h3>';
108
- $addon_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/';
109
- $addon_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes/addon-subthemes/';
110
-
111
- $addon_list = array();
112
- if($media_dir = @opendir($addon_dir)) { // build the list of themes from directory
113
- while ($m_file = readdir($media_dir)) {
114
- $len = strlen($m_file);
115
- $base = substr($m_file,0,$len-4);
116
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
117
- if($ext == '.wxt' ) {
118
- $addon_list[] = $base;
119
- }
120
- }
121
- }
122
-
123
- if (!empty($addon_list)) {
124
- natcasesort($addon_list);
125
-
126
- $cur_addon = weaverx_getopt('wvrx_addon_name');
127
- if ($cur_addon)
128
- echo '<h3>' . __('Currently selected Add-on Subtheme: ','weaver-xtreme' /*adm*/) . ucwords(str_replace('-',' ',$cur_addon)) . '</h3>';
129
- ?>
130
- <form enctype="multipart/form-data" name='pick_added_theme' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
131
-
132
- <h4><?php _e('Select an add-on subtheme:','weaver-xtreme' /*adm*/); ?></h4>
133
-
134
- <?php
135
- foreach ($addon_list as $addon) {
136
- $name = ucwords(str_replace('-',' ',$addon));
137
- ?>
138
- <div style="float:left; width:200px;">
139
- <label><input type="radio" name="wvrx_addon_name"
140
- <?php echo 'value="' . $addon . '"' . (weaverx_getopt('wvrx_addon_name') == $addon ? 'checked' : '') .
141
- '/> <strong>' . $name . '</strong><br />
142
- <img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . $addon_url . $addon . '.jpg" width="150px" height="113px" /><label></div>' . "\n";
143
- }
144
- ?>
145
- <div style="clear:both;"></div>
146
- <br /><span class='submit'><input name="set_added_subtheme" type="submit" value="<?php _e('Set to Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span>
147
- <small style="color:#b00;"><br /><?php _e('<strong>Note:</strong> Selecting a new subtheme will change only theme related settings.
148
- Options labelled with (&diams;) will be retained.
149
- You can use the Save/Restore tab to save a copy of all your current settings first.','weaver-xtreme' /*adm*/); ?></small>
150
-
151
- <?php weaverx_nonce_field('set_added_subtheme'); ?>
152
-
153
- <br /><br /><span class='atw-small-submit' style="margin-left:100px;"><input name="delete_added_subtheme" type="submit" value="<?php _e('Delete Selected Add-on Subtheme','weaver-xtreme' /*adm*/); ?>" /></span> &nbsp;
154
- <small><?php _e('This will delete the selected Add-on Subtheme from the Add-on directory','weaver-xtreme' /*adm*/); ?></small>
155
- <?php weaverx_nonce_field('delete_added_subtheme'); ?>
156
- </form>
157
- <?php
158
- } else {
159
- ?>
160
- <p><?php _e('No Add-on Subthemes available.','weaver-xtreme' /*adm*/); ?></p>
161
- <?php
162
- }
163
- echo '<h3 class="atw-option-subheader">Upload an Add-on Subtheme From Your Computer</h3>';
164
- ?>
165
- <p><?php _e('You can find additional free and premium Add-on Subthemes for <em>Weaver Xtreme</em>','weaver-xtreme' /*adm*/); ?>
166
- <a href="http://xtreme.weavertheme.com/add-on-subthemes/" title="<?php _e('Weaver Xtreme Add-on Subthemes','weaver-xtreme' /*adm*/); ?>"><strong><?php _e('HERE','weaver-xtreme' /*adm*/); ?></strong></a>.</p>
167
- <form name='form_added_theme' enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
168
- <table>
169
- <tr valign="top">
170
- <td><strong><?php _e('Select Add-on Subtheme .zip file to upload:','weaver-xtreme' /*adm*/); ?></strong>
171
- <input name="uploaded_addon" type="file" />
172
- <input type="hidden" name="uploadaddon" value="yes" />
173
- </td>
174
- </tr>
175
- <tr><td>
176
- <span style="margin-left:50px;" class='submit'>
177
- <input name="upload_addon" type="submit" value="Upload Add-on Subtheme" /><br />
178
- </span>&nbsp;<small><?php _e('<strong>Upload and Save</strong> an Add-on Subtheme or Subtheme collection from .zip file on your computer. Will be saved on your site\'s filesystem.','weaver-xtreme' /*adm*/); ?></small>
179
- </td></tr>
180
- </table>
181
- <?php weaverx_nonce_field('upload_addon'); ?>
182
- </form>
183
-
184
- <?php
185
- }
186
-
187
- add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
188
- function wvrx_ts_child_process_options() {
189
-
190
- if (weaverx_submitted('set_added_subtheme') ) { // Set to selected addon - theme
191
- if (isset($_POST['wvrx_addon_name']))
192
- {
193
- $name = $_POST['wvrx_addon_name'];
194
-
195
- $openname = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt';
196
- $contents = file_get_contents($openname);
197
-
198
- if (!weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname)) {
199
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
200
- __('Sorry, there was a problem uploading your add on theme. The name you picked did not have a valid
201
- Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','weaver-xtreme' /*adm*/) . '</em></strong></p></div>';
202
- } else {
203
- weaverx_save_msg(__('Weaver Xtreme theme reset to ','weaver-xtreme' /*adm*/) .
204
- ucwords(str_replace('-',' ',$name )) . ' add-on subtheme.');
205
- weaverx_setopt('wvrx_addon_name',$name);
206
- }
207
- }
208
- }
209
-
210
- else if (weaverx_submitted('delete_added_subtheme') ) { // Delete selected addon theme
211
- if (isset($_POST['wvrx_addon_name']))
212
- {
213
- $name = $_POST['wvrx_addon_name'];
214
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt');
215
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.jpg');
216
- weaverx_save_msg(__('Deleted ','weaver-xtreme' /*adm*/) .
217
- ucwords(str_replace('-',' ',$name )) . __(' add-on subtheme.','weaver-xtreme' /*adm*/));
218
- }
219
- }
220
-
221
- else if (weaverx_submitted('upload_addon')
222
- && isset($_POST['uploadaddon'])
223
- && $_POST['uploadaddon'] == 'yes') {
224
- // upload theme from users computer
225
- // they've supplied and uploaded a file
226
- $ok = wvrx_ts_wunpackzip('uploaded_addon', weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/');
227
- }
228
-
229
- else if ( weaverx_submitted('toggle_shortcode_prefix') ) {
230
- $val = get_option('wvrx_toggle_shortcode_prefix');
231
- if ( $val ) {
232
- delete_option('wvrx_toggle_shortcode_prefix');
233
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes NOT prefixed with 'wvrx_'", 'weaver-xtreme'));
234
- } else {
235
- update_option('wvrx_toggle_shortcode_prefix', 'wvrx_');
236
- weaverx_save_msg(__("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme'));
237
- }
238
- } else if ( weaverx_submitted('show_per_page_report')) {
239
- wvrx_ts_per_page_report();
240
- }
241
-
242
- }
243
-
244
- function wvrx_ts_wunpackzip($uploaded, $to_dir) {
245
- // upload theme from users computer
246
- // they've supplied and uploaded a file
247
- // This version and the one in Aspen Plus must be identical...
248
-
249
- $ok = true; // no errors so far
250
-
251
- if (isset($_FILES[$uploaded]['name'])) // uploaded_addon
252
- $filename = $_FILES[$uploaded]['name'];
253
- else
254
- $filename = "";
255
-
256
- if (isset($_FILES[$uploaded]['tmp_name'])) {
257
- $openname = $_FILES[$uploaded]['tmp_name'];
258
- } else {
259
- $openname = "";
260
- }
261
-
262
- //Check the file extension
263
- $check_file = strtolower($filename);
264
- $per = '.';
265
- $end = explode($per, $check_file); // workaround for PHP strict standards warning
266
- $ext_check = end($end);
267
-
268
- if (false && !weaverx_f_file_access_available()) {
269
- $errors[] = __('Sorry - Theme unable to access files.','weaver-xtreme' /*adm*/) . '<br />';
270
- $ok = false;
271
- }
272
-
273
- if ($filename == "") {
274
- $errors[] = __('You didn\'t select a file to upload.','weaver-xtreme' /*adm*/) . '<br />';
275
- $ok = false;
276
- }
277
-
278
- if ($ok && $ext_check != 'zip'){
279
- $errors[] = __("Uploaded files must have <em>.zip</em> extension.",'weaver-xtreme' /*adm*/) . "<br />";
280
- $ok = false;
281
- }
282
-
283
- if ($ok) {
284
- if (!weaverx_f_exists($openname)) {
285
- $errors[] = '<strong><em style="color:red;">' .
286
- __('Sorry, there was a problem uploading your file. You may need to check your folder permissions
287
- or other server settings.','weaver-xtreme' /*adm*/) . '</em></strong><br />' . __('Trying to use file','weaver-xtreme' /*adm*/) . "'$openname'";
288
- $ok = false;
289
- }
290
- }
291
-
292
- if ($ok) {
293
- // should be ready to go, but check out WP_Filesystem
294
- if (! WP_Filesystem()) {
295
- function wvrx_ts_wvx_return_direct() { return 'direct'; }
296
- add_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
297
- $try2 = WP_Filesystem();
298
- remove_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
299
- if (!$try2) {
300
- $errors[] = __('Sorry, there\'s a problem trying to use the WordPress unzip function. Please
301
- see the FAQ at weavertheme.com support for more information.','weaver-xtreme' /*adm*/);
302
- $ok = false;
303
- }
304
- }
305
- }
306
- if ($ok) {
307
- // $openname has uploaded .zip file to use
308
- // $filename has name of file uploaded
309
- $is_error = unzip_file( $openname, $to_dir );
310
- if ( !is_wp_error( $is_error ) ) {
311
- weaverx_save_msg(__('File ','weaver-xtreme' /*adm*/) . $filename . __(' successfully uploaded and unpacked to: <br />','weaver-xtreme' /*adm*/) . $to_dir);
312
- @unlink($openname); // delete temp file...
313
- } else {
314
- $errors[] = __("Sorry, unpacking the .zip you selected file failed. You may have a corrupt .zip file, or there many a file permissions problem on your WordPress installation.",'weaver-xtreme' /*adm*/);
315
- $errors[] = $is_error->get_error_message();
316
- $ok = false;
317
- }
318
- }
319
- if (!$ok) {
320
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' . __('ERROR','weaver-xtreme' /*adm*/) . '</em></strong></p><p>';
321
- foreach($errors as $error){
322
- echo $error.'<br />';
323
- }
324
- echo '</p></div>';
325
- }
326
- return $ok;
327
- }
328
-
329
- add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
330
- function wvrx_ts_child_saverestore_action() {
331
- echo '<h3 class="atw-option-subheader" style="font-style:italic">' . __('Use the <em>Weaver Xtreme Subthemes</em>
332
- tab to upload Add-on Subthemes.</h3><p>You can upload extra add-on subthemes you\'ve downloaded using the
333
- Subthemes tab. Note: the Save and Restore options on this page are for the custom settings you
334
- have created. These save/restore options are not related to Add-on Subthemes, although you can
335
- modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
336
- }
337
-
338
- add_action('weaverx_check_updates', 'weaverx_check_updates_action');
339
-
340
- function weaverx_check_updates_action() {
341
- require_once('wp-updates-theme-1411.php');
342
- $theme = basename(get_template_directory());
343
- new WPUpdatesThemeUpdater_1411( 'http://wp-updates.com/api/2/theme', $theme );
344
- }
345
-
346
- // --------------------------------------
347
- function wvrx_ts_per_page_report() {
348
- echo '<div style="border:1px solid black; padding:1em;background:#F8FFCC;width:70%;margin:1em auto 1em auto;">';
349
- echo "<h2>" . __('Show Pages and Posts with Per Page / Per Post Settings','weaverx-axtreme') . "</h2>\n";
350
- echo "<h3>" . __('Posts','weaverx-axtreme') . "</h3>\n";
351
- wvrx_ts_scan_section('post');
352
- echo "<h3>" . __('Pages','weaverx-axtreme') . "</h3>\n";
353
- wvrx_ts_scan_section('page');
354
- echo "</div>\n";
355
- }
356
-
357
- function wvrx_ts_scan_section($what) {
358
-
359
- $post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
360
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
361
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
362
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
363
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
364
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
365
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
366
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
367
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
368
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
369
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
370
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
371
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area'
372
- );
373
-
374
- $args = array('posts_per_page' => -1, 'post_type' => $what, 'post_status' => 'any' );
375
- echo '<ul>';
376
-
377
- $allposts = get_posts($args);
378
- foreach ($allposts as $post) {
379
- $id = $post->ID;
380
- setup_postdata($post);
381
- $meta = get_post_meta( $id );
382
- if (!empty($meta)) {
383
- $type = $post->post_type;
384
- $title = esc_html($post->post_title);
385
- $link = esc_url(get_permalink($id));
386
- $tlink = "<a href='{$link}' alt='Post {$id}' target='_blank'>{$title}</a>";
387
- $heading = false;
388
- foreach ($meta as $name => $val_array) { // old value gets put into $val_array[0]
389
- if (in_array($name, $post_fields) ) {
390
- $val = $val_array[0]; // easier to work with
391
- if ($type == 'page') {
392
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Page settings.','weaverx-axtreme') . "</li>\n";
393
- } else {
394
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Post settings.','weaverx-axtreme') . "</li>\n";
395
- }
396
- break;
397
- }
398
- }
399
- }
400
- }
401
- echo '</ul>';
402
- }
403
- } // end only load if Weaver Xtreme installed
404
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.2/wp-updates-theme-1411.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
- /*
3
- WPUpdates Theme Updater Class
4
- http://wp-updates.com
5
- v2.0
6
-
7
- Example Usage:
8
- require_once('wp-updates-theme.php');
9
- new WPUpdatesThemeUpdater_1411( 'http://wp-updates.com/api/2/theme', basename(get_template_directory()) );
10
- */
11
-
12
- if( !class_exists('WPUpdatesThemeUpdater_1411') ) {
13
- class WPUpdatesThemeUpdater_1411 {
14
-
15
- var $api_url;
16
- var $theme_id = 1411;
17
- var $theme_slug;
18
- var $license_key;
19
-
20
- function __construct( $api_url, $theme_slug, $license_key = null ) {
21
- $this->api_url = $api_url;
22
- $this->theme_slug = $theme_slug;
23
- $this->license_key = $license_key;
24
-
25
- add_filter( 'pre_set_site_transient_update_themes', array(&$this, 'check_for_update') );
26
-
27
- // This is for testing only!
28
- //set_site_transient('update_themes', null);
29
- }
30
-
31
- function check_for_update( $transient ) {
32
- if (empty($transient->checked)) return $transient;
33
-
34
- $request_args = array(
35
- 'id' => $this->theme_id,
36
- 'slug' => $this->theme_slug,
37
- 'version' => $transient->checked[$this->theme_slug]
38
- );
39
- if ($this->license_key) $request_args['license'] = $this->license_key;
40
-
41
- $request_string = $this->prepare_request( 'theme_update', $request_args );
42
- $raw_response = wp_remote_post( $this->api_url, $request_string );
43
-
44
- $response = null;
45
- if( !is_wp_error($raw_response) && ($raw_response['response']['code'] == 200) )
46
- $response = unserialize($raw_response['body']);
47
-
48
- if( !empty($response) ) // Feed the update data into WP updater
49
- $transient->response[$this->theme_slug] = $response;
50
-
51
- return $transient;
52
- }
53
-
54
- function prepare_request( $action, $args ) {
55
- global $wp_version;
56
-
57
- return array(
58
- 'body' => array(
59
- 'action' => $action,
60
- 'request' => serialize($args),
61
- 'api-key' => md5(home_url())
62
- ),
63
- 'user-agent' => 'WordPress/'. $wp_version .'; '. home_url()
64
- );
65
- }
66
-
67
- }
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.3/help/help.html DELETED
@@ -1,584 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <title>Weaver X Theme Support</title>
6
- <style type="text/css">
7
- body {
8
- background: #eeeeee;
9
- margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
10
- padding: 10px; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
11
- color: #000000;
12
- text-align: left;
13
- font-family: Verdana, Arial, Helvetica, sans-serif;
14
- font-size: 10pt;
15
- background-color: #ffd;
16
- }
17
-
18
- /* everything about each major block on the site - may be mods in some places */
19
-
20
- #container {
21
- max-width:800px;
22
- background-color: #00CC00;
23
- }
24
- #mainContent {
25
- background-color: #ffc;
26
- }
27
- .oneColFixCtr #container {
28
- max-width: 750px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
29
- background: #FFFFCD;
30
- margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
31
- border: 1px solid #000000;
32
- text-align: left; /* this overrides the text-align: center on the body element. */
33
- }
34
- .oneColFixCtr #mainContent {
35
- padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
36
- font-size:12px;
37
- }
38
- /* layouts for layout boxes */
39
- .layoutbox {
40
- width:700px;
41
- text-align:center;
42
- margin:0 25px;
43
- }
44
- .l_layout {
45
- display:block;
46
- width:140px;
47
- height:110px;
48
- float:left;
49
- margin-right:10px;
50
- margin-bottom:10px;
51
- display:inline;
52
- border:1px solid #888;
53
- color:black;
54
- text-align:center;
55
- font:15px arial, sans-serif;
56
- }
57
- .l_layout span {
58
- display:block;
59
- }
60
- .l_header {
61
- width:140px;
62
- height:20px;
63
- background:#CCF;
64
- line-height:20px;
65
- }
66
- .l_content {
67
- width:100px;
68
- height:70px;
69
- background:beige;
70
- float:left;
71
- display:inline;
72
- line-height:70px;
73
- }
74
- .l_contentcenter {
75
- width:60px;
76
- height:70px;
77
- background:beige;
78
- float:left;
79
- display:inline;
80
- line-height:70px;
81
- }
82
- .l_content2 {
83
- width:80px;
84
- height:70px;
85
- background:beige;
86
- float:left;
87
- display:inline;
88
- line-height:70px;
89
- }
90
- .l_contentw {
91
- width:140px;
92
- height:70px;
93
- background:beige;
94
- float:left;
95
- display:inline;
96
- line-height:70px;
97
- }
98
- .l_stdbar {
99
- width:40px;
100
- height:70px;
101
- float:left;
102
- display:inline;
103
- }
104
- .l_widebar {
105
- width:60px;
106
- height:70px;
107
- float:left;
108
- display:inline;
109
- }
110
- .l_righttop {
111
- width:40px;
112
- height:20px;
113
- background:#FE8;
114
- float:left;
115
- display:inline;
116
- line-height:20px;
117
- }
118
- .l_righttopwide {
119
- width:60px;
120
- height:20px;
121
- background:#FE8;
122
- float:left;
123
- display:inline;
124
- line-height:20px;
125
- }
126
- .l_rightup {
127
- width:40px;
128
- height:25px;
129
- margin:0;
130
- background:#FAA;
131
- float:left;
132
- display:inline;
133
- line-height:25px;
134
- }
135
- .l_rightright {
136
- width:40px;
137
- height:50px;
138
- margin:0;
139
- background:#FAA;
140
- float:left;
141
- display:inline;
142
- line-height:50px;
143
- }
144
- .l_rightdown {
145
- width:40px;
146
- height:25px;
147
- margin:0;
148
- background:#AFA;
149
- float:left;
150
- display:inline;
151
- line-height:25px;
152
- }
153
- .l_leftleft {
154
- width:40px;
155
- height:70px;
156
- margin:0;
157
- background:#AFA;
158
- float:left;
159
- display:inline;
160
- line-height:70px;
161
- }
162
- .l_leftshort {
163
- width:30px;
164
- height:50px;
165
- margin:0;
166
- background:#AFA;
167
- float:left;
168
- display:inline;
169
- line-height:50px;
170
- }
171
- .l_skinny {
172
- width:30px;
173
- height:50px;
174
- margin:0;
175
- background:#FAA;
176
- float:left;
177
- display:inline;
178
- line-height:50px;
179
- }
180
- .l_footer {
181
- clear:left;
182
- width:140px;
183
- height:20px;
184
- background:#DDF;
185
- color:#000;
186
- line-height:20px;
187
- }
188
- h4 {
189
- font-weight: bold;
190
- font-style:italic;
191
- color: #000066;
192
- text-decoration: underline;
193
- }
194
- h3 {
195
- font-size: medium;
196
- font-weight: bold;
197
- color: #000066;
198
- text-decoration: underline;
199
- }
200
- h2 {
201
- font-size: large;
202
- font-weight: bold;
203
- color: #000066;
204
- text-decoration: underline;
205
- margin-top: 40pt;
206
- }
207
- h1 {
208
- font-size: x-large;
209
- font-weight: bold;
210
- color: #000066;
211
- text-decoration: underline;
212
- }
213
- .codebox {
214
- font-family: "Courier New", Courier, monospace;
215
- font-size: 10px;
216
- font-style: normal;
217
- background-color: #E8E8E8;
218
- margin: 10px;
219
- padding: 4px;
220
- border: 1px solid #333333;
221
- color: #000000;
222
- width: 80%;
223
- }
224
- .attrs {
225
- font-family: Arial, Helvetica, sans-serif;
226
- font-size: 10pt;
227
- color:#000000;
228
- text-decoration: none;
229
- }
230
- .css {
231
- font-family: "Courier New", Courier, monospace;
232
- font-size: 9pt;
233
- font-style: normal;
234
- }
235
- .box {
236
- color: #000000;
237
- text-decoration: none;
238
- margin: 5px;
239
- padding: 5px;
240
- border: thin solid #000000;
241
- }
242
- .nospace {
243
- margin-top: 5px;
244
- margin-bottom: 5px;
245
- }
246
- .style3 {
247
- font-family: "Courier New", Courier, monospace
248
- }
249
- .style4 {
250
- font-family: monospace
251
- }
252
- .style6 {
253
- color: #990000;
254
- font-style: italic;
255
- }
256
- .style7 {
257
- color: #CC3300;
258
- font-weight: bold;
259
- }
260
- .code1 {
261
- font-family: "Courier New", Courier, monospace;
262
- font-size: 14px;
263
- font-style: italic;
264
- }
265
- .red-highlight {
266
- color: #CC3300;
267
- }
268
- </style>
269
- </head>
270
- <body class="oneColFixCtr">
271
- <div id="container">
272
- <div id="mainContent"> <a name="top" id="top"></a>
273
- <h2><b>Weaver X Theme Support Plugin Documentation -- Version 1.0</b></h2>
274
- <h4>Table of Contents</h4>
275
- <ul style="line-height:1.7em;">
276
- <li><a href="#summary"><strong>Plugin Summary</strong></a></li>
277
- <li><strong><a href="#admin_page">Weaver X Theme Extras Admin Page</a> </strong></li>
278
- <li><a href="#sc_summary"><strong>Shortcode Summary</strong></a></li>
279
- <ul>
280
- <li><strong><a href="#bloginfo">[bloginfo arg='name' style='your css']</a></strong></li>
281
- <li><strong><a href="#box">[box]text[/box]</a></strong></li>
282
- <li><a href="#tab_group"><strong>[tab_group] - content in tabs</strong></a></li>
283
- <li><strong><a href="#headerimage">[header_image] Shortcode</a></strong></li>
284
- <li><strong><a href="#schtml">[html]</a></strong></li>
285
- <li><strong><a href="#scdiv">[div]text[/div]</a>, <a href="#schtml">[span]text[/span]</a></strong></li>
286
- <li><strong><a href="#sciframe"> [iframe]</a></strong></li>
287
- <li><strong><a href="#scshowif">[show/hide_if]</a></strong></li>
288
- <li><strong><a href="#sitetitlesc">[site_title], [site_tagline]</a></strong></li>
289
-
290
- <li><strong><a href="#video">Video - [vimeo], [youtube]</a></strong></li>
291
- </ul>
292
- <li><a href="#widg-sum"><strong>Widget Summary</strong></a>
293
- <ul>
294
- <li><strong><a href="#widg-login">Weaver X Login Widget</a></strong></li>
295
- <li><strong><a href="#widg_pp_text">Weaver X Per Page Text</a></strong></li>
296
- <li><strong><a href="#widg_text_2">Weaver X Text 2</a></strong></li>
297
- </ul>
298
- </li>
299
- </ul>
300
- <h3><a name="summary" id="summary"></a>Plugin Summary </h3>
301
- <p>The Weaver X Theme Support Plugin provides a collection of shortcodes to allow you to easily add extra content and features to your regular content. These shortcodes will work with almost any WordPress theme. </p>
302
- <p>While these shortcodes should prove useful with most any theme, one of the goals of these shortcodes is to provide an alternative to users of the Weaver X theme.</p>
303
- <h2><a name="admin_page" id="admin_page"></a>Weaver Xtreme Theme Extras Admin Page</h2>
304
- <p>This plugin has just a few options, all found on the Weaver X Theme Support admin page under the WordPress dashboard Appearance section.</p>
305
- <h2><a name="sc_summary" id="sc_summary"></a>Shortcode Summary</h2>
306
- <h3><a name="tab_group" id="tab_group"></a>[tab_group] - content in tabs </h3>
307
- <p>Show content displayed on tabbed pages.</p>
308
- <p><strong>Shortcode usage:</strong><br />
309
- <pre>
310
- [tab_group border_color=black page_min_height=200px]
311
- [tab title='tab one']This is the content found on first tab.[/tab]
312
- [tab title='tab two']And we have more content for the second tab.[/tab]
313
- [tab title='last tab']And this is the last tab. There could be more.[/tab]
314
- [/tab_group]
315
- </pre>
316
- <h4>Short code parameters</h4>
317
- You can supply values for these parameters to control the look of the tabbed section.
318
- <br />
319
- <ul>
320
- <li><b>border_color:</b> tab and pane border color - default #888</li>
321
- <li><b>tab_bg</b>: normal bg color of tab (default #CCC)</li>
322
- <li><b>tab_selected_color</b>: color of tab when selected (default #EEE)</li>
323
- <li><b>pane_min_height</b>: min height of a pane to help make all even if needed</li>
324
- <li><b>pane_bg</b>: bg color of pane</li>
325
- </ul>
326
- </p>
327
- <h3><a name="headerimage" id="headerimage"></a><strong>[header_image]</strong></h3>
328
- <p>The <code>[header_image]</code> shortcode allows you display the current header image wherever you want.
329
- For example, you can get the header image into the Header Widget Area by using this shortcode in a text widget.
330
- The current standard or mobile header image will be displayed. Only the <code>&lt;img ... &gt;</code> is displayed --
331
- the image will not be wrapped in a link to the site.</p>
332
-
333
- <p><strong>Shortcode usage:</strong> <code>[header_image h='size' w='size' style='inline-style']</code>
334
- <br />
335
- <ol>
336
- <li><strong>w='size' h='size'</strong> - By default, no height or image properties are included with the
337
- header <code>&lt;img ... &gt;</code>, which will result in an image scaled to fit into whatever the natural
338
- width of the enclosing HTML container is (the content area, a text widget, etc.). You may specify an explicit
339
- value (usually in px) for the height and width of the image.
340
- </li>
341
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
342
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
343
- <code>style="your-rules;"</code> - using double quotation marks.
344
- </li>
345
- </ol>
346
- <h3><a name="schtml" id="schtml"></a><strong>[html]</strong></h3>
347
-
348
- <p>The Weaver X Theme Support <code>[html]</code> shortcode allows you to add arbitrary HTML to your post and page content. The
349
- main purpose of this shortcode is to get around the auto paragraph and line break and other HTML stripping functionality
350
- of the WordPress editor.</p>
351
-
352
- <p><strong>Shortcode usage:</strong> <code>[html html-tag args='parameters']</code>
353
- <br />
354
- <ol>
355
- <li><strong>html-tag</strong> - The first parameter to the shortcode must be present, and must be a standard
356
- HTML tag - <code>p</code>, <code>br</code>, or <code>span</code>, for example. You just supply the tag - no quotation
357
- marks, no '=', just the tag. The shortcode provides the &lt; and &gt;. If you need a wrapping HTML tag (e.g., <code>span</code> and <code>/span</code>), use
358
- two shortcodes:<br />
359
- <code>[html span args='style="color:red"']content to make red[html /span]</code>
360
- </li>
361
- <li><strong>args='parameters'</strong> - Allows you to specify arbitrary parameters for your HTML tag. See the example above.
362
- </li>
363
- </ol>
364
- </p>
365
-
366
- <h3><a name="scdiv" id="scdiv"></a><strong>[div]text[/div]</strong>, [span]text[/span]</h3>
367
-
368
- <p>The Weaver X Theme Support <code>[div]</code> and [span] shortcodes allow you to easily add HTML &lt;div&gt; or &lt;span&gt; tags to your post and page content. The
369
- main purpose of these shortcodes is to get around need to switch to the HTML editor view when you need to
370
- wrap your content in a &lt;div&gt; or &lt;span&gt;.</p>
371
- <p>
372
- This will work exactly like a standard HMTL &lt;div&gt;and &lt;span&gt; tags. It supports 'id', 'class',
373
- and 'style' parameters, which are the most useful. Instead of wrapping your text in &lt;div&gt; or &lt;span&gt; tags, wrap them like
374
- this (the Visual view will work just fine):<br />
375
- <code>[div style="font-size:20px;']This content will be large.[/div]</code><br />
376
- <code>[span style=&quot;font-size:20px;']This content will be large.[/span]</code></p>
377
- <p><strong>Shortcode usage:</strong> <code>[div id='class_id' class='class_name' style='style_values']text[/div]</code>
378
- <br />
379
- <code>[span id='class_id' class='class_name' style='style_values']text[/span]</code> <br />
380
- <ol>
381
- <li><strong>id='class_id' class='class_name' style='style_values'</strong> - Allows you to specify id, class, and style for the &lt;div&gt;. See the example above.
382
- </li>
383
- </ol>
384
- </p>
385
-
386
- <h3><a name="sciframe" id="sciframe"></a><strong>iframe - [iframe]</strong></h3>
387
-
388
- <p>The <code>[iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
389
- the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>
390
-
391
- <p><strong>Shortcode usage:</strong> <code>[iframe src='http://example.com' height=600 percent=100 style="style"]</code>
392
- <br />
393
- <ol>
394
- <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
395
- </li>
396
- <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
397
- </li>
398
- <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
399
- </li>
400
- <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values".
401
- </li>
402
- </ol>
403
- </p>
404
-
405
- <h3><a name="scshowif" id="scshowif"></a><strong>[show_if]content[/show_if], [hide_if]</strong>content [/hide_if]</h3>
406
- <p>The <code>[show_if]</code> and <code>[hide_if]</code> shortcodes allow you to selectively
407
- display or hide content depending if any of several conditions are met.</p>
408
-
409
- <p><strong>Shortcode usage:</strong> <code>[hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]</code>
410
- </p>
411
- <p>You bracket the content you want to selectively display with <code>[show/hide_if]</code> and closing
412
- <code>[/show/hide_if]</code> tags. That content can contain other shortcodes as needed. If you specify more than one parameter to the short code, then all the conditions must be met (logical AND). Any paramaters you don't include are considered true.</p>
413
- <h4>Parameters</h4>
414
- <p>'device' =&gt; 'default', // desktop, mobile, smalltablet, phone, all<br />
415
- 'logged_in' =&gt; 'default', // true or false<br />
416
- 'not_post_id' =&gt; 'default', // comma separated list of post IDs (includes pages, too)<br />
417
- 'post_id' =&gt; 'default', // comma separated list<br />
418
- 'user_can' =&gt; 'default' // http://codex.wordpress.org/Function_Reference/current_user_can</p>
419
- <p>
420
- <strong>device=desktop | mobile | smalltablet | phone </strong> - The device parameter for <code>[show/hide_if]</code> is designed to allow you to hide <em>or</em> show any content on any of the
421
- device sizes recognized by Weaver Xtreme (or any theme, actually): 'phone', 'smalltablet', and 'desktop', or 'mobile' for non-desktop devices. If you want to show or hide content on
422
- a specific device, you give the <span class="code1">device</span> parameter a value of desktop, mobile, smalltablet, phone, or none (e.g., <code>[show_if device=mobile]</code>). </p>
423
- <p><strong>logged_in=true | false</strong> - This will hide or display content depending if the visitor is logged into the site or not. </p>
424
- <p><strong>post_id=34,875</strong> / <strong>not_post_id=1,2,3 </strong>- This will display (or not display) the content depending if the current page or single post view is included in the comma separated list of WordPress page/post IDs. You can use both to refine a list of pages or posts to display or not display. Note that even though the parameter is called 'post_id', it applies equally to pages and posts. Depending on where you use the shortcode, it will apply to a post differently depending if it is on a blog or single page view of a post. Note that the default WordPress blog (as opposed to the Weaver Xtreme Page with Posts template) does not have a post_ID.</p>
425
- <p><strong>user_can=user-capability</strong> - This will show or hide depending if the current visitor has certain WordPress user capabilities. There are many capabilities which are defined in the <a href="http://codex.wordpress.org/Function_Reference/current_user_can" target="_blank">WordPress Codex</a>. This shortcode supports any of the listed capabilities for maximum flexibility. If you don't want to learn about all the capabilities listed in the Codex, you can use the following capability values to determine if the visitor has a specific role (as defined on the Dashboard Users admin pages). For example:<br />
426
- <br />
427
- <span class="code1">[show_if user_can=publish_pages]content for Editors and above[/show_if]</span><br />
428
- <br />
429
- Note that the higher roles have all the capabilities of the lower roles - an Editor can do everything a Contributor can.</p>
430
- <table width="80%" border="1">
431
- <caption>
432
- Capabilities to Specify Role
433
- </caption>
434
- <tr>
435
- <th scope="col">Role</th>
436
- <th scope="col">Capability</th>
437
- </tr>
438
- <tr>
439
- <td>Subscriber</td>
440
- <td>read</td>
441
- </tr>
442
- <tr>
443
- <td>Contributor</td>
444
- <td>edit_posts</td>
445
- </tr>
446
- <tr>
447
- <td>Author</td>
448
- <td>publish_posts</td>
449
- </tr>
450
- <tr>
451
- <td>Editor</td>
452
- <td>publish_pages</td>
453
- </tr>
454
- <tr>
455
- <td>Administrator</td>
456
- <td>manage_options</td>
457
- </tr>
458
- <tr>
459
- <td>Super Administrator (MultiSite)</td>
460
- <td>manage_network</td>
461
- </tr>
462
- </table>
463
- <p>&nbsp;</p>
464
- <h3><a name="sitetitlesc" id="sitetitlesc"></a><strong>[site_title style="style" matchtheme=false], [site_tagline style="style" matchtheme=false]</strong></h3>
465
-
466
- <p>The <code>[site_title]</code> and <code>[site_tagline]</code> shortcodes allow you display the current
467
- site title and site tagline. This can be useful in a text widget in the Header Widget Area, for example.</p>
468
- <p><em>Note:</em> If you want to position the content of a text widget within the a cell of the Header Widget Area, you could use the following
469
- example:</p>
470
- <p><code>[site_title style='font-size:150%;position:absolute;padding-left:20px;padding-top:30px;']</code></p>
471
-
472
- <p><strong>Shortcode usage:</strong> <code>[site_title style='inline-style' matchtheme=false] [site_tagline style='inline-style' matchtheme=false]</code>
473
- <br />
474
- <ol>
475
- <li><strong>style='inline-style-rules'</strong> - Allows you to add inline style to wrap output of the shortcode.
476
- Don't include the 'style=' or wrapping quotation marks. Do include a ';' at the end of each rule. The output will look like
477
- <code>style="your-rules;"</code> - using double quotation marks.
478
- </li>
479
- <li><strong>matchtheme=true</strong> - Allows you to add match the theme styling as defined in the site header if set to true.
480
- This will match the color/style/font of the header version of the site title and tagline with the exception of hide settings.
481
- The shortcode version will not be hidden on any device unless you also wrap the shortcode with a [show_if/hide_if] shortcode.
482
- </li>
483
-
484
- </ol>
485
-
486
- <h3><a name="bloginfo" id="bloginfo"></a><strong>[bloginfo arg='name' style='your css']</strong></h3>
487
-
488
- <p>This shortcode can be used to access the WordPress function 'get_bloginfo($arg)'. This will return a number of useful
489
- strings depending on the value. All the supported values are listed at http://codex.wordpress.org/Function_Reference/get_bloginfo.
490
- Some useful values include 'stylesheet_directory' and 'template_directory'. You can wrap the bloginfo output with css added to a &lt;span style=&quot;your css&quot;&gt;.
491
- </p>
492
-
493
- <h3><a name="box" id="box"></a><strong>[box]text[/box]</strong></h3>
494
-
495
- <p>
496
- Wrap content in a box.</p>
497
- <p><strong>Shortcode Usage:</strong> <code>[box align=left background=#fff border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules']text[/box]</code></p>
498
- <ol>
499
- <li><strong>align=align</strong>: Leave blank, or specify left, center, or right for alignment of box within surrounding text.</li>
500
- <li><strong>border=true</strong>: True is default. Specify false or 0 for no borders.</li>
501
- <li><strong>border_rule='1px solid black</strong>': Specify a compound border CSS value to replace the default '1px solid black'.</li>
502
- <li><strong>border_radius=4</strong>: Default is none - specify a px value for the corner radius if you want rounded corners.</li>
503
- <li><strong>color=#000</strong>: Default is inherit - specify a valid color for the color of the text in the box.</li>
504
- <li><strong>background=#fff</strong>: Default is inherit - specify color for box background color.</li>
505
- <li><strong>margin=1</strong>: Default is 0 - specify an 'em' value for margin around the box. Using a margin overrides align parameter.</li>
506
- <li><strong>padding=1</strong>: Default 1 - specify an 'em' value for padding inside box.</li>
507
- <li><strong>shadow=0</strong>: Default 0 - specify a value from 1 to 5 for a border around the box.</li>
508
- <li><strong>style=inline-style</strong>: any additional custom styling for the box</li>
509
- <li><strong>width=100</strong>: A percentage width for the box within its surrounding container.</li>
510
- </ol>
511
- <h3><a name="video" id="video"></a><strong>Video - [vimeo], [youtube]</strong></h3>
512
- <p>Weaver X Theme Support supports specialized shortcodes to display video. While there are other ways to embed video, the Weaver X Theme Support versions have two important features. First, they will auto adjust to the width of your content, <em><strong>including</strong></em> the mobile view. Second, they use the latest iframe/HTML5 interface provided by YouTube and Vimeo.</p>
513
- <p><strong>Specifying Video Display Size for both shortcodes</strong></p>
514
- <p>Weaver X Theme Support supports a common set of options for both the YouTube and Vimeo shortcodes to support displaying your videos with a specific width and correct height. By default, your videos will be displayed using the full width of the content area being used (percent=100). The percent= parameter is used to specify the width you want.</p>
515
- <p>The height of the video is automatically determined based on the width and the display ratio of the particular video. </p>
516
- <p>Finally, you may specify if the video should be centered or no within the display area using &quot;center=0&quot; to not center (centering is on by default).</p>
517
- <p>Note - if you want to display more than one video horizontally, use &quot;center=0&quot; and specify an appropriate percentage to fit all the videos.</p>
518
- <p>Parameters in Common</p>
519
- <ul>
520
- <li>percent=100 - By default, the video will be sized to fill the full content space. You can use the percent value to make
521
- the video use a percentage of the content space (but mobile will always use full width).</li>
522
- <li>center=1 - Specify 'center=0' to disable centering of the video.</li>
523
- <li>sd=0 - By default, Weaver X Theme Support will generate sizes for HD/widescreen videos. To display old 4:3 standard definition videos, include 'sd=1' in the shortcode.</li>
524
- </ul>
525
- <h4>Vimeo</h4>
526
- <pre><strong>[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex
527
- autoplay=0 loop=0 portrait=1 title=1 byline=1]
528
- </strong></pre>
529
- <p>This will display Vimeo videos. At the minimum, you can provide the standard http://vimeo.com/nnnnn link, or just the video ID number (which is part of the Vimeo Link). The other Vimeo specific options include:</p>
530
- <ul>
531
- <li>color - You can optionally specify a Vimeo color theme using 6 hex digits for a color value.</li>
532
- <li>autoplay - Add 'autoplay=1' to have the video autoplay.</li>
533
- <li>loop - Add 'loop=1' to have the video loop.</li>
534
- <li>portrait, title, byline - You can specify a value '=0' for these to hide the display of the corresponding element on the Vimeo player.
535
- Portrait is the avatar/icon, title is the video title, and byline is source attribution.<br />
536
- </li>
537
- </ul>
538
- <h4>YouTube</h4>
539
- <code><strong>[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=1 https=0 privacy=0 {youtube options}]
540
- </strong></code>
541
- <p>This will display YouTube videos. At the minimum, you can provide the standard http://youtu.be/xxxxxx share link (including the options YouTube lets you specify), the long format share link, or just the video ID number using the id=videoid parameter (which is part of the YouTube Link). The other YouTube specific options include:</p>
542
- <ul>
543
- <li>rel - If you specify 'rel=0', YouTube won't show related videos after the video plays.</li>
544
- <li>https - If you specify 'https=1', YouTube will use the https protocol.</li>
545
- <li>privacy - If you specify 'privacy=1', YouTube won't used cookies to track your viewing.</li>
546
- </ul>
547
- <p>In addition to the above [youtube] options, the shortcode also supports most standard YouTube options. These are more fully described on the <a href="http://code.google.com/apis/youtube/player_parameters.html" target="_blank">YouTube Embedded Player Parameters</a> page.</p>
548
- <p>The supported options, with Weaver X Theme Support's default values include:</p>
549
- <p>'autohide' = '1' . . . . . . 0: always show controls; 1: autohide controls; 2: autohide progress bar<br />
550
- 'autoplay' = '0' . . . . . . 1: auto play; 0: don't<br />
551
- 'border' = '0' . . . . . . . . 0: no border; 1: border using color1 and color2 (don't seem to work)<br />
552
- 'color' = not set . . . . . . progress bar color - red or white<br />
553
- 'color1' = not set . . . . . RGB hex value for border color<br />
554
- 'color2' = not set . . . . . RGB hex value for control bar bg<br />
555
- 'controls' = '1' . . . . . . . 0: hide player controls<br />
556
- 'disablekb' = '0' . . . . . . 1: disable keyboard controls<br />
557
- 'egm' ='0' . . . . . . . . . . . 1: enable &quot;Enhanced Genie Menu&quot;<br />
558
- 'hd' = '0' . . . . . . . . . . . . 1: enable HD playback by default<br />
559
- 'iv_load_policy' = '1' . . . 1: show annotations; 3: don't show; 2: discontinued support<br />
560
- 'loop' = '0' . . . . . . . . . . . 1: loop video<br />
561
- 'modestbranding' = '0' . .1: hide YouTube logo - will still show label in upper right corner<br />
562
- 'origin' = not set . . . . . . . See YouTube docs<br />
563
- 'playlist' = not set . . . . . . Comma separated list of videoIDs to play (id/url video played 1st)<br />
564
- 'showinfo' = '1' . . . . . . . 0: hide video title<br />
565
- 'showsearch' = '1' . . . . . 0: hide video searchbox<br />
566
- 'start' = not set . . . . . . . start vide this number of seconds from start<br />
567
- 'theme' = 'dark' . . . . . . . dark or light - display theme for player<br />
568
- 'wmode' = 'transparent' . Keeps video behind menu bars, etc. Other values available - see YouTube</p>
569
- <h2><a name="widg-sum" id="widg-sum"></a>Widget Summary</h2>
570
- <h3><a name="widg-login" id="widg-login"></a>Weaver X Login Widget</h3>
571
- <p>This simple widget shows a login in link, or a welcome, Site Admin, and Log out choice if the user is logged in.</p>
572
- <h3><a name="widg_pp_text" id="widg_pp_text"></a>Weaver X Per Page Text</h3>
573
- <p>This widget will work like a text widget, but the title and content are defined by custom fields set on a Per Page basis. For any page, define the Custom Field <em>wvrx_ts_pp_title</em>if you want a title, and define Custom Field<em>wvrx_ts_pp_text</em> as the content. Content can include arbitrary text, HTML, and shortcodes. The text will not automatically add paragraphs. The widget will display only if the custom fields are defined when that page is displayed. (This widget won't display on the default blog or other archive-like pages.)</p>
574
- <h3><a name="widg_text_2" id="widg_text_2"></a>Weaver X Text 2</h3>
575
- <p>This widget lets you add two columns of text. It is most useful in wide widget areas such as a content top or bottom widget area, or a wide footer widget area.</p>
576
- <p>&nbsp;</p>
577
- <h2><br />
578
- </h2>
579
- <p>The Weaver X Theme Support Plugin and this document are &copy; 2014, Bruce E. Wampler. <a ref="http://weavertheme.com">Web Site - WeaverTheme.com</a></p>
580
-
581
- </div>
582
- </div>
583
- </body>
584
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.3/includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,613 +0,0 @@
1
- <?php
2
- /* Display per page and per post options.
3
- *
4
- * __ added - 12/10/14
5
- *
6
- * IMPORTANT! - this code and the Weaver Plus plugin need to be maintained in parallel!
7
- */
8
-
9
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
10
- // Admin panel that gets added to the page edit page for per page options
11
-
12
-
13
- if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
14
-
15
- function wvrx_ts_isp_true($val) {
16
- if ($val) return true;
17
- return false;
18
- }
19
-
20
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
21
- global $post;
22
- ?>
23
- <div style="float:left;width:<?php echo $width; ?>%"><label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
24
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> />
25
- <?php echo($msg . '</label></div>');
26
- for ($i = 0 ; $i < $br ; $i++)
27
- echo '<br class="page_checkbox" style="clear:both;" />';
28
- }
29
-
30
- function wvrx_ts_page_layout( $page = 'page' ) {
31
-
32
- if ( $page == 'page')
33
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaver-xtreme' /*adm*/);
34
- else
35
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaver-xtreme' /*adm*/);
36
-
37
- $opts = array( 'id' => '_pp_page_layout',
38
- 'info' => $msg,
39
- 'value' => array(
40
- array('val' => '', 'desc' => __('Use Default','weaver-xtreme' /*adm*/) ),
41
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaver-xtreme' /*adm*/) ),
42
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaver-xtreme' /*adm*/) ),
43
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaver-xtreme' /*adm*/) ),
44
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaver-xtreme' /*adm*/) ),
45
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaver-xtreme' /*adm*/) ),
46
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaver-xtreme' /*adm*/) ),
47
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaver-xtreme' /*adm*/) )
48
- ));
49
- wvrx_ts_pp_select_id($opts);
50
- }
51
- //--
52
-
53
-
54
-
55
- function wvrx_ts_pp_replacement( $desc, $id ) {
56
- global $post;
57
- global $wp_registered_sidebars;
58
-
59
- $id = '_' . $id;
60
-
61
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
62
-
63
-
64
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
65
- $area_name = $value['id']; //sanitize_title($value['name']);
66
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
67
- echo ' <option value="' . $area_name . '"';
68
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
69
- echo '>' . substr($area_name,9) . "</option>\n";
70
-
71
- }
72
- }
73
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
74
- }
75
- //--
76
-
77
-
78
- function wvrx_ts_pp_select_id( $value ) {
79
- global $post;
80
-
81
- if ( isset( $value['name'] ) && $value['name'] != '' )
82
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
83
-
84
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
85
-
86
- foreach ($value['value'] as $option) {
87
- if ( $option['val'] == '' ) {
88
- echo '<option value="">';
89
- } else {
90
- echo ' <option value="' . $option['val'] . '"';
91
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
92
- echo ">";
93
- }
94
- echo $option['desc'] . "</option>\n";
95
- }
96
- echo '</select>&nbsp;' . $value['info'] . "\n";
97
- }
98
- //--
99
-
100
-
101
-
102
- function wvrx_ts_pwp_atw_show_post_filter() {
103
- // use plugin options...
104
- global $post;
105
-
106
- if ( function_exists( 'atw_showposts_installed' ) ) {
107
- $filters = atw_posts_getopt('filters');
108
-
109
- $first = true;
110
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
111
- foreach ($filters as $filter => $val) { // display dropdown of available filters
112
- if ( $first ) {
113
- $first = false;
114
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
115
- } else {
116
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
117
- }
118
- }
119
- echo '</select>&nbsp;' .
120
- __('Use a Filter from <em>Weaver Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaver-xtreme' /*adm*/) .
121
- '<br /> <span style="margin-left:8em;"><span>' .
122
- __('(Note: Weaver Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts using this filter.)','weaver-xtreme' /*adm*/) .
123
- '<br />' . '<br />';
124
- } else {
125
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaver-xtreme' /*adm*/); ?>
126
- <br /><br />
127
- <?php }
128
- }
129
- //--
130
-
131
-
132
-
133
- function wvrx_ts_pwp_type() {
134
- $opts = array( 'name' => __('Display posts as:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
135
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaver-xtreme' /*adm*/),
136
- 'value' => array(
137
- array('val' => '', 'desc' => '&nbsp;' ),
138
- array('val' => 'full', 'desc' => __('Full post','weaver-xtreme' /*adm*/) ),
139
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaver-xtreme' /*adm*/) ),
140
- array('val' => 'title', 'desc' => __('Title only','weaver-xtreme' /*adm*/) ),
141
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaver-xtreme' /*adm*/) )
142
- ));
143
- wvrx_ts_pp_select_id($opts);
144
- }
145
-
146
-
147
- function wvrx_ts_page_cols() {
148
-
149
- $opts = array( 'name' => '', 'id' => '_pp_page_cols',
150
- 'info' => __('Display page content in this many columns using CSS column rules.','weaver-xtreme' /*adm*/),
151
- 'value' => array(
152
- array('val' => '', 'desc' => '&nbsp;'),
153
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
154
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
155
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ),
156
- array('val' => '4', 'desc' => __('4 Columns','weaver-xtreme' /*adm*/) ))
157
- );
158
- wvrx_ts_pp_select_id($opts);
159
-
160
- weaverx_html_br();
161
- weaverx_html_br();
162
- }
163
-
164
-
165
- function wvrx_ts_pwp_cols() {
166
-
167
- $opts = array( 'name' => __('Display post columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
168
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaver-xtreme' /*adm*/),
169
- 'value' => array(
170
- array('val' => '', 'desc' => '&nbsp;'),
171
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
172
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
173
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ) )
174
- );
175
- wvrx_ts_pp_select_id($opts);
176
-
177
- weaverx_html_br();
178
-
179
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaver-xtreme' /*adm*/), 'id' => '_pp_pwp_masonry',
180
- 'info' => __('Use <em>Masonry</em> for multi-column display','weaver-xtreme' /*adm*/),
181
- 'value' => array(
182
- array('val' => '', 'desc' => '&nbsp;' ),
183
- array('val' => '1', 'desc' => __('1 Column','weaver-xtreme' /*adm*/) ),
184
- array('val' => '2', 'desc' => __('2 Columns','weaver-xtreme' /*adm*/) ),
185
- array('val' => '3', 'desc' => __('3 Columns','weaver-xtreme' /*adm*/) ),
186
- array('val' => '4', 'desc' => __('4 Columns','weaver-xtreme' /*adm*/) ),
187
- array('val' => '5', 'desc' => __('5 Columns','weaver-xtreme' /*adm*/) ) )
188
- );
189
- wvrx_ts_pp_select_id($opts2);
190
-
191
- ?>
192
- <br />
193
- <?php
194
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaver-xtreme' /*adm*/),90,1);
195
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaver-xtreme' /*adm*/),90,1);
196
- }
197
-
198
- function wvrx_ts_page_extras() {
199
- global $post;
200
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
201
-
202
- if ( !( current_user_can('edit_themes')
203
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
204
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
205
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
206
- ) {
207
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
208
- echo '<p>' .
209
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaver-xtreme' /*adm*/) .
210
- '</p>';
211
- else
212
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
213
- return; // don't show per post panel
214
- }
215
-
216
- echo("<div style=\"line-height:150%;\"><p>\n");
217
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
218
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
219
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaver-xtreme' /*adm*/); ?>
220
- </div><br />
221
- <?php
222
- }
223
-
224
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
225
- <div style="padding:2px; border:2px solid red; background:#FAA;">
226
- <?php _e('<strong>WARNING!</strong>
227
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
228
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
229
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
230
- If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
231
- including the option of using the Page with Posts page template,
232
- then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
233
- the <em></em>&mdash; Select &mdash;</em> default value.','weaver-xtreme' /*adm*/); ?>
234
- </div><br />
235
- <?php
236
- return;
237
- }
238
- echo '<strong>' . __('Page Templates','weaver-xtreme' /*adm*/) . '</strong>';
239
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaver-xtreme' /*adm*/));
240
- echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
241
- weaverx_html_br();
242
- _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaver-xtreme' /*adm*/);
243
- weaverx_html_br();
244
- echo '<strong>' . __('Per Page Options','weaver-xtreme' /*adm*/) . '</strong>';
245
- weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaver-xtreme' /*adm*/));
246
- weaverx_html_br();
247
- _e('These settings let you hide various elements on a per page basis.','weaver-xtreme' /*adm*/);
248
- weaverx_html_br();
249
-
250
-
251
- wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaver-xtreme' /*adm*/));
252
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaver-xtreme' /*adm*/));
253
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaver-xtreme' /*adm*/), 33, 1);
254
-
255
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaver-xtreme' /*adm*/));
256
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaver-xtreme' /*adm*/));
257
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaver-xtreme' /*adm*/),33,1);
258
-
259
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaver-xtreme' /*adm*/));
260
- wvrx_ts_page_checkbox('_pp_full_browser_height',__('Force full browser height','weaver-xtreme' /*adm*/),33,2);
261
-
262
- wvrx_ts_page_cols();
263
-
264
- _e('<em>Note:</em> the following options work with the default menu - not custom menus.','weaver-xtreme' /*adm*/);
265
- weaverx_html_br();
266
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaver-xtreme' /*adm*/),90,1);
267
-
268
-
269
-
270
- wvrx_ts_page_checkbox('_pp_stay_on_page',__('Menu "Placeholder" page. Useful for top-level menu item - don\'t go anywhere when menu item is clicked.','weaver-xtreme' /*adm*/),90,2);
271
-
272
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90,1);
273
-
274
- if (weaverx_allow_multisite()) {
275
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90,1);
276
- }
277
-
278
- ?>
279
- <p><strong><?php _e('Sidebars &amp; Widgets','weaver-xtreme' /*adm*/); ?></strong></p>
280
-
281
- <?php
282
- wvrx_ts_page_layout();
283
- ?>
284
- <br />
285
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
286
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
287
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaver-xtreme' /*adm*/); ?> <br /><br />
288
- <?php
289
-
290
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaver-xtreme' /*adm*/),40);
291
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaver-xtreme' /*adm*/),40,1);
292
-
293
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaver-xtreme' /*adm*/),40);
294
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaver-xtreme' /*adm*/),40,1);
295
-
296
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaver-xtreme' /*adm*/),40);
297
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaver-xtreme' /*adm*/),40,1);
298
-
299
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaver-xtreme' /*adm*/),40);
300
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaver-xtreme' /*adm*/),40,1);
301
- ?>
302
-
303
- <p><strong><?php _e('Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
304
- <p>
305
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
306
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
307
- </p>
308
- <?php
309
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
310
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
311
-
312
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
313
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
314
-
315
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-top-widget-area' );
316
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaver-xtreme' /*adm*/) , 'sitewide-bottom-widget-area' );
317
-
318
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaver-xtreme' /*adm*/) , 'page-top-widget-area' );
319
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaver-xtreme' /*adm*/) , 'page-bottom-widget-area' );
320
- ?>
321
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
322
- <?php
323
- $opts3 = array( 'id' => '_pp_fi_location',
324
- 'info' => __('How to display Page FI on this page','weaver-xtreme' /*adm*/),
325
- 'value' => array(
326
- array('val' => '', 'desc' => __('Default Page FI','weaver-xtreme' /*adm*/) ),
327
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
328
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
329
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
330
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
331
- array('val' => 'hide', 'desc' => __('Hide FI on this Page','weaver-xtreme' /*adm*/) )
332
- )
333
- );
334
- wvrx_ts_pp_select_id($opts3);
335
- ?>
336
- <br />
337
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
338
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
339
- <?php _e('<em>Featured Image Link</em> - Full URL for link from FI','weaver-xtreme' /*adm*/); ?>
340
- <br style="clear:both;" />
341
- <hr />
342
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
343
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
344
-
345
- <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaver-xtreme' /*adm*/); ?>
346
- <br />
347
- </p>
348
- <p>
349
- <?php _e('<strong>Settings for "Page with Posts" Template</strong>','weaver-xtreme' /*adm*/);
350
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaver-xtreme' /*adm*/) );
351
-
352
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
353
- if ($template == 'paget-posts.php') {
354
- ?>
355
- <br />
356
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
357
- Use commas to separate items in lists.
358
- The settings will be combined for the final filtered list of posts displayed.
359
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
360
- <br />
361
-
362
- <input type="text" size="30" id="_pp_category" name="_pp_category"
363
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
364
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaver-xtreme' /*adm*/); ?>
365
- <br />
366
-
367
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
368
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
369
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaver-xtreme' /*adm*/); ?> <br />
370
-
371
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
372
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
373
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display.",'weaver-xtreme' /*adm*/); ?> <br />
374
-
375
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
376
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
377
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaver-xtreme' /*adm*/); ?> <br />
378
-
379
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
380
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
381
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaver-xtreme' /*adm*/); ?> <br />
382
-
383
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
384
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
385
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaver-xtreme' /*adm*/); ?> <br />
386
-
387
- <input type="text" size="30" id="_pp_author" name="_pp_author"
388
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
389
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaver-xtreme' /*adm*/); ?> <br />
390
-
391
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
392
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
393
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaver-xtreme' /*adm*/); ?> <br />
394
-
395
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
396
-
397
- <?php wvrx_ts_pwp_type(); ?><br />
398
- <?php wvrx_ts_pwp_cols(); ?><br />
399
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
400
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
401
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaver-xtreme' /*adm*/); ?>
402
- <br />
403
-
404
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
405
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
406
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
407
- __("Hide first \"n\" posts</em> - Start with post n+1.
408
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaver-xtreme' /*adm*/) ; ?>
409
-
410
- <br /><br />
411
-
412
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaver-xtreme' /*adm*/), 40); ?>
413
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaver-xtreme' /*adm*/), 40, 1); ?>
414
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaver-xtreme' /*adm*/), 40); ?>
415
- </p>
416
- <?php
417
- } else { // NOT a page with posts
418
- ?> <p>
419
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
420
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
421
- settings for "Page with Posts" will be displayed here. Current page template:','weaver-xtreme' /*adm*/); ?>
422
- <?php echo $template; ?>
423
- </p>
424
- <?php
425
- }
426
- do_action('weaverxplus_add_per_page');
427
- ?>
428
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
429
- </div>
430
- <?php
431
- }
432
-
433
- function wvrx_ts_post_extras() {
434
- global $post;
435
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
436
- if ( !( current_user_can('edit_themes')
437
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
438
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
439
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
440
- ) {
441
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaver-xtreme' /*adm*/) . '</p>';
442
- return; // don't show per post panel
443
- }
444
- ?>
445
- <div style="line-height:150%;">
446
- <p>
447
- <?php
448
- echo '<strong>' . __('Per Post Options','weaver-xtreme' /*adm*/) . '</strong>';
449
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaver-xtreme' /*adm*/));
450
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaver-xtreme' /*adm*/); the_ID() ; echo ')</span>';
451
- weaverx_html_br();
452
- _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.','weaver-xtreme' /*adm*/);
453
- weaverx_html_br();
454
-
455
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaver-xtreme' /*adm*/), 40);
456
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaver-xtreme' /*adm*/),55,1);
457
-
458
-
459
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaver-xtreme' /*adm*/),40);
460
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaver-xtreme' /*adm*/), 40, 1);
461
-
462
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaver-xtreme' /*adm*/),40);
463
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaver-xtreme' /*adm*/),40,1);
464
-
465
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaver-xtreme' /*adm*/),40);
466
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaver-xtreme' /*adm*/),40,1);
467
- wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaver-xtreme' /*adm*/),90,1);
468
-
469
- wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaver-xtreme' /*adm*/),90);
470
-
471
-
472
- echo('<br style="clear:both;"/><br /><strong>Per Post Style</strong> (&starf;Plus)' /*a*/ );
473
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaver-xtreme' /*adm*/ ));
474
- echo '<br />' .
475
- __('Weaver Xtreme Plus supports optional per post CSS style rules.','weaver-xtreme' /*adm*/); ?>
476
- <br />
477
- <br />
478
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaver-xtreme' /*adm*/); ?></strong></p>
479
-
480
- <?php
481
- wvrx_ts_page_layout('post');
482
- ?>
483
- <br />
484
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
485
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
486
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaver-xtreme' /*adm*/); ?> <br /><br />
487
- <?php
488
-
489
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaver-xtreme' /*adm*/),40);
490
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaver-xtreme' /*adm*/),40,1);
491
-
492
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaver-xtreme' /*adm*/),40);
493
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
494
-
495
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaver-xtreme' /*adm*/),40);
496
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaver-xtreme' /*adm*/),40,1);
497
-
498
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaver-xtreme' /*adm*/),40);
499
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaver-xtreme' /*adm*/),40,1);
500
- ?>
501
- </p>
502
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaver-xtreme' /*adm*/); ?></strong></p>
503
- <p>
504
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
505
- You can define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaver-xtreme' /*adm*/); ?>
506
- </p>
507
- <?php
508
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaver-xtreme' /*adm*/) , 'primary-widget-area' );
509
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaver-xtreme' /*adm*/) , 'secondary-widget-area' );
510
-
511
- wvrx_ts_pp_replacement( __('Header Widget Area','weaver-xtreme' /*adm*/) , 'header-widget-area' );
512
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaver-xtreme' /*adm*/) , 'footer-widget-area' );
513
-
514
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
515
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
516
- ?>
517
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaver-xtreme' /*adm*/); ?></strong></p>
518
- <?php
519
- $opts3 = array( 'id' => '_pp_fi_location',
520
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaver-xtreme' /*adm*/),
521
- 'value' => array(
522
- array('val' => '', 'desc' => __('Default Single Page FI','weaver-xtreme' /*adm*/) ),
523
- array('val' => 'content-top', 'desc' => __('With Content - top','weaver-xtreme' /*adm*/) ),
524
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaver-xtreme' /*adm*/) ),
525
- array('val' => 'title-before', 'desc' => __('Before Title','weaver-xtreme' /*adm*/) ),
526
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaver-xtreme' /*adm*/) ),
527
- array('val' => 'post-before', 'desc' => __('Outside of Post','weaver-xtreme' /*adm*/) ),
528
- array('val' => 'hide', 'desc' => __('Hide FI on Single Page','weaver-xtreme' /*adm*/) )
529
- )
530
- );
531
- wvrx_ts_pp_select_id($opts3);
532
- ?>
533
- <br />
534
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
535
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
536
- <?php _e("<em>Featured Image Link</em> - Full URL for link from FI",'weaver-xtreme' /*adm*/); ?>
537
- <br style="clear:both;" />
538
- </p><p>
539
- <strong><?php _e('Post Editor Options','weaver-xtreme' /*adm*/); ?></strong>
540
-
541
- <?php
542
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaver-xtreme' /*adm*/),90, 1);
543
-
544
- if (weaverx_allow_multisite()) {
545
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaver-xtreme' /*adm*/),90, 1);
546
- }
547
- ?>
548
- </p>
549
- <p>
550
- <?php echo('<strong>Post Format</strong>');
551
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaver-xtreme' /*adm*/));
552
- weaverx_html_br();
553
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info.','weaver-xtreme' /*adm*/);
554
- weaverx_html_br();
555
- weaverx_html_br();
556
-
557
- do_action('weaverxplus_add_per_post'); ?>
558
- </p>
559
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
560
- </div>
561
- <?php
562
- }
563
-
564
-
565
- function wvrx_ts_save_post_fields($post_id) {
566
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
567
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
568
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
569
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
570
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
571
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_styles',
572
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
573
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
574
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
575
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
576
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
577
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
578
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area', '_pp_full_browser_height',
579
- '_pp_page_cols'
580
- );
581
-
582
- if (weaverx_allow_multisite()) {
583
- array_push($default_post_fields, '_pp_raw_html');
584
- }
585
-
586
- $all_post_fields = $default_post_fields;
587
-
588
- if (isset($_POST['post_meta'])) {
589
- foreach ($all_post_fields as $post_field) {
590
- if (isset($_POST[$post_field])) {
591
- $data = $_POST[$post_field];
592
- if ( $post_field != '_pp_post_styles')
593
- $data = stripslashes($data); // passed via post, so strip slashes
594
-
595
- if (get_post_meta($post_id, $post_field) == '') {
596
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
597
- }
598
- else if ($data != get_post_meta($post_id, $post_field, true)) {
599
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
600
- } else if ($data == '') {
601
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
602
- }
603
- } else {
604
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
605
- }
606
- }
607
- }
608
- }
609
-
610
- add_action("save_post", "wvrx_ts_save_post_fields");
611
- add_action("publish_post", "wvrx_ts_save_post_fields");
612
- }
613
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3.2.1/1.3/includes/wvrx-ts-runtime-lib.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
-
6
- function wvrx_ts_help_link($ref, $label) {
7
-
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
- }
13
-
14
-
15
- // =============================== options =============================
16
-
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
-
19
-
20
- // Interface to Weaver Xtreme
21
-
22
- function wvrx_ts_fix_short($prefix, $msg ) {
23
- if ( $prefix ) {
24
- $m = str_replace('[/', '////', $msg);
25
- $m = str_replace('[', '[' . $prefix, $m);
26
- echo str_replace('////', '[/' . $prefix, $m);
27
- }
28
- else
29
- echo $msg;
30
- }
31
-
32
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
33
- function wvrx_ts_theme_support_addon() {
34
- ?>
35
- <div class="a-plus">
36
- <p><strong style="font-size:110%;"><?php _e('You have Weaver Xtreme Theme Support installed.','weaver-xtreme' /*adm*/); ?></strong><br />
37
- <?php _e('This section shows the shortcodes and widgets available with Weaver X Theme Support.
38
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaver-xtreme' /*adm*/); ?></p>
39
-
40
- <?php
41
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
42
- if ( $prefix )
43
- echo '<h3 style="color:red;">' . __("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaver-xtreme') . '</h3>';
44
- ?>
45
-
46
- <h3><?php _e('Shortcodes','weaver-xtreme' /*adm*/); ?></h3>
47
- <ul>
48
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaver-xtreme' /*adm*/)); ?>
49
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaver-xtreme' /*adm*/));?><br />
50
- <code><?php wvrx_ts_fix_short($prefix, __("[bloginfo name='WP bloginfo name' style='style-rules']",'weaver-xtreme' /*adm*/)); ?></code>
51
- </li>
52
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Box - [box]</span> - Display content in a Box','weaver-xtreme' /*adm*/)); ?>
53
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaver-xtreme' /*adm*/));?><br />
54
- <code><?php wvrx_ts_fix_short($prefix, __("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaver-xtreme' /*adm*/)); ?></code>
55
- </li>
56
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaver-xtreme' /*adm*/)); ?>
57
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaver-xtreme' /*adm*/));?><br />
58
- <code><?php wvrx_ts_fix_short($prefix, __("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaver-xtreme' /*adm*/)); ?></code>
59
- </li>
60
- <li<?php wvrx_ts_fix_short($prefix, __('><span class="wvr-blue">Header Image - [header_image]</span> - Display default header image','weaver-xtreme' /*adm*/)); ?>
61
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaver-xtreme' /*adm*/));?><br />
62
- <code><?php wvrx_ts_fix_short($prefix, __("[header_image h='size' w='size' style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
63
- </li>
64
-
65
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaver-xtreme' /*adm*/)); ?>
66
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaver-xtreme' /*adm*/));?><br />
67
- <code><?php wvrx_ts_fix_short($prefix, __("[html html-tag args='parameters']",'weaver-xtreme' /*adm*/)); ?></code>
68
- </li>
69
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaver-xtreme' /*adm*/)); ?>
70
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaver-xtreme' /*adm*/));?><br />
71
- <code><?php wvrx_ts_fix_short($prefix, __("[iframe src='http://example.com' height=600 percent=100 style='style']",'weaver-xtreme' /*adm*/)); ?></code>
72
- </li>
73
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Login - [login]</span> - Show simple Login/Logout link','weaver-xtreme' /*adm*/)); ?>
74
- <?php wvrx_ts_help_link('help.html#sclogin',__('Help for login','weaver-xtreme' /*adm*/));?><br />
75
- <code><?php wvrx_ts_fix_short($prefix, __("[login]",'weaver-xtreme' /*adm*/)); ?></code>
76
- </li>
77
-
78
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaver-xtreme' /*adm*/)); ?>
79
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaver-xtreme' /*adm*/));?><br />
80
- <code><?php wvrx_ts_fix_short($prefix, __('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaver-xtreme' /*adm*/)); ?></code>
81
- </li>
82
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Hide If - [hide_if]</span> - Hide content','weaver-xtreme' /*adm*/)); ?>
83
- </li>
84
-
85
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline','weaver-xtreme' /*adm*/)); ?>
86
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaver-xtreme' /*adm*/));?><br />
87
- <code><?php wvrx_ts_fix_short($prefix, __("[site_tagline style='inline-style']",'weaver-xtreme' /*adm*/)); ?></code>
88
- </li>
89
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="wvr-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title','weaver-xtreme' /*adm*/)); ?>
90
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaver-xtreme' /*adm*/));?><br />
91
- <code><?php wvrx_ts_fix_short($prefix, __("[site_title style='inline-style']",'weaver-xtreme' /*adm*/)); ?>