Weaver Xtreme Theme Support - Version 3.2

Version Description

  • New: Schema.org support - disable option
  • New: tabbed per page and per post option sections!
  • Fix: Main Options : Header : Site Title/Tagling menu link
Download this release

Release Info

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

Code changes from version 3.1.11 to 3.2

admin/admin-advancedopts.php CHANGED
@@ -243,6 +243,11 @@ By default, Weaver Xtreme Plus will use the style-weaverxt.css file. ♦', '
243
  <?php
244
  }
245
  ?>
 
 
 
 
 
246
 
247
  <h3><?php _e('Include Widget Areas in Print', 'weaver-xtreme' /*adm*/);?></h3>
248
 
243
  <?php
244
  }
245
  ?>
246
+ <h3><?php _e('Disable Schema.org Structured Data', 'weaver-xtreme' /*adm*/);?></h3>
247
+
248
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_no_schemea'); ?>" id="_no_schemea" <?php checked(weaverx_getopt_checked( '_no_schemea' )); ?> />
249
+ <?php _e('Disable adding Schema.org structured data. (We do not recommend removing this SEO feature.) &diams;', 'weaver-xtreme' /*adm*/);?>
250
+ </label><br /><br />
251
 
252
  <h3><?php _e('Include Widget Areas in Print', 'weaver-xtreme' /*adm*/);?></h3>
253
 
admin/admin-lib-ts.php CHANGED
@@ -20,8 +20,10 @@ function weaverx_process_options_themes() {
20
  if (weaverx_submitted('save_mytheme')) { // invoked from Save/Restore tab
21
  weaverx_save_msg(__("Current settings saved in WordPress database.", 'weaver-xtreme' /*adm*/));
22
  global $weaverx_opts_cache;
23
- if (!$weaverx_opts_cache)
24
- $weaverx_opts_cache = get_option( apply_filters('weaverx_options','weaverx_settings') ,array());
 
 
25
  if (current_user_can( 'manage_options' )) {
26
  $compressed = array_filter( $weaverx_opts_cache, 'strlen'); // filter out all null options (strlen == 0)
27
  update_option(apply_filters('weaverx_options','weaverx_settings_backup'),$compressed);
20
  if (weaverx_submitted('save_mytheme')) { // invoked from Save/Restore tab
21
  weaverx_save_msg(__("Current settings saved in WordPress database.", 'weaver-xtreme' /*adm*/));
22
  global $weaverx_opts_cache;
23
+ if (!$weaverx_opts_cache) {
24
+ $func_opt = WEAVER_GET_OPTION;
25
+ $weaverx_opts_cache = $func_opt( apply_filters('weaverx_options',WEAVER_SETTINGS_NAME) ,array());
26
+ }
27
  if (current_user_can( 'manage_options' )) {
28
  $compressed = array_filter( $weaverx_opts_cache, 'strlen'); // filter out all null options (strlen == 0)
29
  update_option(apply_filters('weaverx_options','weaverx_settings_backup'),$compressed);
admin/admin-mainopts.php CHANGED
@@ -601,7 +601,7 @@ array( 'name' => __('Header Other options', 'weaver-xtreme'), 'type' => 'break')
601
  <div class="options-intro-menu"> <a href="#header-area"><?php _e('Header Area', 'weaver-xtreme' /*adm*/); ?></a> |
602
  <a href="#header-image"><?php _e('Header Image', 'weaver-xtreme' /*adm*/); ?></a> |
603
  <a href="#header-video"><?php _e('Header Video', 'weaver-xtreme' /*adm*/); ?></a> |
604
- <a href="#site-titletagline"><?php _e('Site Title/Tagline', 'weaver-xtreme' /*adm*/); ?></a> |
605
  <a href="#header-widget-area"><?php _e('Header Widget Area', 'weaver-xtreme' /*adm*/); ?></a>|
606
  <a href="#header-html"><?php _e('Header HTML', 'weaver-xtreme' /*adm*/); ?></a>
607
  </div>
601
  <div class="options-intro-menu"> <a href="#header-area"><?php _e('Header Area', 'weaver-xtreme' /*adm*/); ?></a> |
602
  <a href="#header-image"><?php _e('Header Image', 'weaver-xtreme' /*adm*/); ?></a> |
603
  <a href="#header-video"><?php _e('Header Video', 'weaver-xtreme' /*adm*/); ?></a> |
604
+ <a href="#site-title-tagline"><?php _e('Site Title/Tagline', 'weaver-xtreme' /*adm*/); ?></a> |
605
  <a href="#header-widget-area"><?php _e('Header Widget Area', 'weaver-xtreme' /*adm*/); ?></a>|
606
  <a href="#header-html"><?php _e('Header HTML', 'weaver-xtreme' /*adm*/); ?></a>
607
  </div>
admin/assets/css/admin-style.css CHANGED
@@ -143,89 +143,6 @@ border-radius: 4px;
143
 
144
  .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
145
 
146
- div.yetii {
147
- width: 95%;
148
- margin: 0 0 20px 0;
149
- }
150
-
151
- ul.yetii {
152
- list-style-type: none;
153
- width: 100%;
154
- float: left;
155
- border-bottom: 4px ridge #ddd;
156
- margin-bottom: 8px;
157
- }
158
-
159
- ul.yetii li {
160
- margin: 0 2px 0 0;
161
- float: left;
162
- }
163
-
164
- ul.yetii a {
165
- float: left;
166
- display: block;
167
- padding: 4px 8px;
168
- border: 1px solid #ddd;
169
- border-bottom: 0;
170
- color: #666;
171
- background: #eee;
172
- text-decoration: none;
173
- font-weight: bold;
174
- background-image: linear-gradient(#f0f0f0,#c8c8c8);
175
- border-top-left-radius:6px;
176
- border-top-right-radius:6px;
177
- }
178
-
179
- ul.yetii a:hover {
180
- background: #fff;
181
- }
182
-
183
- ul.yetii a.active {
184
- background: #fff;
185
- color: #00f;
186
- background-image: linear-gradient(#f8f8f8,#eee);
187
- }
188
- /* -- */
189
- div.yetiisub {
190
- width: 100%;
191
- margin: 0 0 20px 0;
192
- }
193
-
194
- ul.yetiisub {
195
- list-style-type: none;
196
- width: 100%;
197
- float: left;
198
- margin-bottom: 8px;
199
- }
200
-
201
- ul.yetiisub li {
202
- margin: 0 2px 2px 0px;
203
- float: left;
204
- }
205
-
206
- ul.yetiisub a {
207
- float: left;
208
- padding: 4px 8px;
209
- border: 1px solid #ccc;
210
- color: #666;
211
- background: #f0f0f0;
212
- text-decoration: none;
213
- font-style: italic;
214
- font-weight: bold;
215
- background-image: linear-gradient(#f8f8f8,#c8c8c8);
216
- border-top-left-radius:6px;
217
- border-top-right-radius:6px;
218
- }
219
-
220
- ul.yetiisub a:hover {
221
- background: #fefefe !important;
222
- }
223
-
224
- ul.yetiisub a.active {
225
- background: #fff;
226
- color: #00f;
227
- background-image: linear-gradient(#fff,#e8e8e8);
228
- }
229
 
230
  .atw-small-submit {
231
  padding: 1.0em 0;
143
 
144
  .js_button {background:#eee !important;font-weight: 600 !important;color:#585858 !important;}
145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
 
147
  .atw-small-submit {
148
  padding: 1.0em 0;
admin/assets/yetii/bsdlicense.txt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) kminek.pl & Grzegorz Wójcik
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification, are permitted
6
+ provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation and/or other
13
+ materials provided with the distribution.
14
+
15
+ * Neither the name of the kminek.pl & Grzegorz Wójcik nor the names of its contributors
16
+ may be used to endorse or promote products derived from this software without
17
+ specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
admin/assets/yetii/html5.min.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*
2
+ HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
+ */
4
+ (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
5
+ a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
6
+ c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
7
+ "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
8
+ if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
admin/assets/yetii/yetii-weaver.css ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* yetti style for weaaver theme support */
2
+ div.yetii {
3
+ width: 95%;
4
+ margin: 0 0 20px 0;
5
+ }
6
+
7
+ ul.yetii {
8
+ list-style-type: none;
9
+ width: 100%;
10
+ float: left;
11
+ border-bottom: 4px ridge #ddd;
12
+ margin-bottom: 8px;
13
+ }
14
+
15
+ ul.yetii li {
16
+ margin: 0 2px 0 0;
17
+ float: left;
18
+ }
19
+
20
+ ul.yetii a {
21
+ float: left;
22
+ display: block;
23
+ padding: 4px 8px;
24
+ border: 1px solid #ddd;
25
+ border-bottom: 0;
26
+ color: #666;
27
+ background: #eee;
28
+ text-decoration: none;
29
+ font-weight: bold;
30
+ background-image: linear-gradient(#f0f0f0,#c8c8c8);
31
+ border-top-left-radius:6px;
32
+ border-top-right-radius:6px;
33
+ }
34
+
35
+ ul.yetii a:hover {
36
+ background: #fff;
37
+ }
38
+
39
+ ul.yetii a.active {
40
+ background: #fff;
41
+ color: #00f;
42
+ background-image: linear-gradient(#f8f8f8,#eee);
43
+ }
44
+ /* -- */
45
+ div.yetiisub {
46
+ width: 100%;
47
+ margin: 0 0 20px 0;
48
+ }
49
+
50
+ ul.yetiisub {
51
+ list-style-type: none;
52
+ width: 100%;
53
+ float: left;
54
+ margin-bottom: 8px;
55
+ }
56
+
57
+ ul.yetiisub li {
58
+ margin: 0 2px 2px 0px;
59
+ float: left;
60
+ }
61
+
62
+ ul.yetiisub a {
63
+ float: left;
64
+ padding: 4px 8px;
65
+ border: 1px solid #ccc;
66
+ color: #666;
67
+ background: #f0f0f0;
68
+ text-decoration: none;
69
+ font-style: italic;
70
+ font-weight: bold;
71
+ background-image: linear-gradient(#f8f8f8,#c8c8c8);
72
+ border-top-left-radius:6px;
73
+ border-top-right-radius:6px;
74
+ }
75
+
76
+ ul.yetiisub a:hover {
77
+ background: #fefefe !important;
78
+ }
79
+
80
+ ul.yetiisub a.active {
81
+ background: #fff;
82
+ color: #00f;
83
+ background-image: linear-gradient(#fff,#e8e8e8);
84
+ }
admin/assets/yetii/yetii-weaver.min.css ADDED
@@ -0,0 +1 @@
 
1
+ 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;background-image:linear-gradient(#f0f0f0,#c8c8c8);border-top-left-radius:6px;border-top-right-radius:6px}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;color:#00f;background-image:linear-gradient(#f8f8f8,#eee)}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}ul.yetiisub li{margin:0 2px 2px 0px;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;background-image:linear-gradient(#f8f8f8,#c8c8c8);border-top-left-radius:6px;border-top-right-radius:6px}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;color:#00f;background-image:linear-gradient(#fff,#e8e8e8)}
admin/assets/yetii/yetii.js ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Yetii - Yet (E)Another Tab Interface Implementation
3
+ version 1.6
4
+ http://www.kminek.pl/lab/yetii/
5
+ Copyright (c) Grzegorz Wojcik
6
+ Code licensed under the BSD License:
7
+ http://www.kminek.pl/bsdlicense.txt
8
+ */
9
+
10
+ function Yetii() {
11
+
12
+ this.defaults = {
13
+
14
+ id: null,
15
+ active: 1,
16
+ interval: null,
17
+ wait: null,
18
+ persist: null,
19
+ tabclass: 'tab',
20
+ activeclass: 'active',
21
+ callback: null,
22
+ leavecallback: null
23
+
24
+ };
25
+
26
+ this.activebackup = null;
27
+
28
+ for (var n in arguments[0]) { this.defaults[n]=arguments[0][n]; };
29
+
30
+ this.getTabs = function() {
31
+
32
+ var retnode = [];
33
+ var elem = document.getElementById(this.defaults.id).getElementsByTagName('*');
34
+
35
+ var regexp = new RegExp("(^|\\s)" + this.defaults.tabclass.replace(/\-/g, "\\-") + "(\\s|$)");
36
+
37
+ for (var i = 0; i < elem.length; i++) {
38
+ if (regexp.test(elem[i].className)) retnode.push(elem[i]);
39
+ }
40
+
41
+ return retnode;
42
+
43
+ };
44
+
45
+ this.links = document.getElementById(this.defaults.id + '-nav').getElementsByTagName('a');
46
+ this.listitems = document.getElementById(this.defaults.id + '-nav').getElementsByTagName('li');
47
+
48
+ this.show = function(number) {
49
+
50
+ for (var i = 0; i < this.tabs.length; i++) {
51
+
52
+ this.tabs[i].style.display = ((i+1)==number) ? 'block' : 'none';
53
+
54
+ if ((i+1)==number) {
55
+ this.addClass(this.links[i], this.defaults.activeclass);
56
+ this.addClass(this.listitems[i], this.defaults.activeclass + 'li');
57
+ } else {
58
+ this.removeClass(this.links[i], this.defaults.activeclass);
59
+ this.removeClass(this.listitems[i], this.defaults.activeclass + 'li');
60
+ }
61
+
62
+ }
63
+
64
+
65
+ if (this.defaults.leavecallback && (number != this.activebackup)) this.defaults.leavecallback(this.defaults.active);
66
+
67
+ this.activebackup = number;
68
+
69
+
70
+ this.defaults.active = number;
71
+
72
+ if (this.defaults.callback) this.defaults.callback(number);
73
+
74
+
75
+ };
76
+
77
+ this.rotate = function(interval) {
78
+
79
+ this.show(this.defaults.active);
80
+ this.defaults.active++;
81
+
82
+ if (this.defaults.active > this.tabs.length) this.defaults.active = 1;
83
+
84
+
85
+ var self = this;
86
+
87
+ if (this.defaults.wait) clearTimeout(this.timer2);
88
+
89
+ this.timer1 = setTimeout(function(){self.rotate(interval);}, interval*1000);
90
+
91
+ };
92
+
93
+ this.next = function() {
94
+
95
+ var _target = (this.defaults.active + 1 > this.tabs.length) ? 1 : this.defaults.active + 1;
96
+ this.show(_target);
97
+ this.defaults.active = _target;
98
+
99
+ };
100
+
101
+ this.previous = function() {
102
+
103
+ var _target = ((this.defaults.active - 1) == 0) ? this.tabs.length : this.defaults.active - 1;
104
+ this.show(_target);
105
+ this.defaults.active = _target;
106
+
107
+ };
108
+
109
+ this.previous = function() {
110
+
111
+ this.defaults.active--;
112
+ if(!this.defaults.active) this.defaults.active = this.tabs.length;
113
+ this.show(this.defaults.active);
114
+
115
+ };
116
+
117
+ this.gup = function(name) {
118
+ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
119
+ var regexS = "[\\?&]"+name+"=([^&#]*)";
120
+ var regex = new RegExp( regexS );
121
+ var results = regex.exec( window.location.href );
122
+ if (results == null) return null;
123
+ else return results[1];
124
+ };
125
+
126
+ this.parseurl = function(tabinterfaceid) {
127
+
128
+ var result = this.gup(tabinterfaceid);
129
+
130
+ if (result==null) return null;
131
+ if (parseInt(result)) return parseInt(result);
132
+ if (document.getElementById(result)) {
133
+ for (var i=0;i<this.tabs.length;i++) {
134
+ if (this.tabs[i].id == result) return (i+1);
135
+ }
136
+ }
137
+
138
+ return null;
139
+
140
+ };
141
+
142
+ this.createCookie = function(name,value,days) {
143
+ if (days) {
144
+ var date = new Date();
145
+ date.setTime(date.getTime()+(days*24*60*60*1000));
146
+ var expires = "; expires="+date.toGMTString();
147
+ }
148
+ else var expires = "";
149
+ document.cookie = name+"="+value+expires+"; path=/";
150
+ };
151
+
152
+ this.readCookie = function(name) {
153
+ var nameEQ = name + "=";
154
+ var ca = document.cookie.split(';');
155
+ for(var i=0;i < ca.length;i++) {
156
+ var c = ca[i];
157
+ while (c.charAt(0)==' ') c = c.substring(1,c.length);
158
+ if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
159
+ }
160
+ return null;
161
+ };
162
+
163
+ this.contains = function(el, item, from) {
164
+ return el.indexOf(item, from) != -1;
165
+ };
166
+
167
+ this.hasClass = function(el, className){
168
+ return this.contains(el.className, className, ' ');
169
+ };
170
+
171
+ this.addClass = function(el, className){
172
+ if (!this.hasClass(el, className)) el.className = (el.className + ' ' + className).replace(/\s{2,}/g, ' ').replace(/^\s+|\s+$/g, '');
173
+ };
174
+
175
+ this.removeClass = function(el, className){
176
+ el.className = el.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)'), '$1');
177
+ el.className.replace(/\s{2,}/g, ' ').replace(/^\s+|\s+$/g, '');
178
+ };
179
+
180
+
181
+ this.tabs = this.getTabs();
182
+ this.defaults.active = (this.parseurl(this.defaults.id)) ? this.parseurl(this.defaults.id) : this.defaults.active;
183
+ if (this.defaults.persist && this.readCookie(this.defaults.id)) this.defaults.active = this.readCookie(this.defaults.id);
184
+ this.activebackup = this.defaults.active;
185
+ this.show(this.defaults.active);
186
+
187
+ var self = this;
188
+ for (var i = 0; i < this.links.length; i++) {
189
+ this.links[i].customindex = i+1;
190
+ this.links[i].onclick = function(){
191
+
192
+ if (self.timer1) clearTimeout(self.timer1);
193
+ if (self.timer2) clearTimeout(self.timer2);
194
+
195
+ self.show(this.customindex);
196
+
197
+ if (self.defaults.persist) self.createCookie(self.defaults.id, this.customindex, 0);
198
+
199
+ if (self.defaults.wait) self.timer2 = setTimeout(function(){self.rotate(self.defaults.interval);}, self.defaults.wait*1000);
200
+
201
+ return false;
202
+ };
203
+ }
204
+
205
+ if (this.defaults.interval) this.rotate(this.defaults.interval);
206
+
207
+ };
admin/assets/yetii/yetii.min.js ADDED
@@ -0,0 +1 @@
 
1
+ function Yetii(){this.defaults={id:null,active:1,interval:null,wait:null,persist:null,tabclass:"tab",activeclass:"active",callback:null,leavecallback:null},this.activebackup=null;for(var n in arguments[0])this.defaults[n]=arguments[0][n];this.getTabs=function(){for(var retnode=[],elem=document.getElementById(this.defaults.id).getElementsByTagName("*"),regexp=new RegExp("(^|\\s)"+this.defaults.tabclass.replace(/\-/g,"\\-")+"(\\s|$)"),i=0;i<elem.length;i++)regexp.test(elem[i].className)&&retnode.push(elem[i]);return retnode},this.links=document.getElementById(this.defaults.id+"-nav").getElementsByTagName("a"),this.listitems=document.getElementById(this.defaults.id+"-nav").getElementsByTagName("li"),this.show=function(number){for(var i=0;i<this.tabs.length;i++)this.tabs[i].style.display=i+1==number?"block":"none",i+1==number?(this.addClass(this.links[i],this.defaults.activeclass),this.addClass(this.listitems[i],this.defaults.activeclass+"li")):(this.removeClass(this.links[i],this.defaults.activeclass),this.removeClass(this.listitems[i],this.defaults.activeclass+"li"));this.defaults.leavecallback&&number!=this.activebackup&&this.defaults.leavecallback(this.defaults.active),this.activebackup=number,this.defaults.active=number,this.defaults.callback&&this.defaults.callback(number)},this.rotate=function(interval){this.show(this.defaults.active),this.defaults.active++,this.defaults.active>this.tabs.length&&(this.defaults.active=1);var self=this;this.defaults.wait&&clearTimeout(this.timer2),this.timer1=setTimeout(function(){self.rotate(interval)},1e3*interval)},this.next=function(){var _target=this.defaults.active+1>this.tabs.length?1:this.defaults.active+1;this.show(_target),this.defaults.active=_target},this.previous=function(){var _target=this.defaults.active-1==0?this.tabs.length:this.defaults.active-1;this.show(_target),this.defaults.active=_target},this.previous=function(){this.defaults.active--,this.defaults.active||(this.defaults.active=this.tabs.length),this.show(this.defaults.active)},this.gup=function(name){var regexS="[\\?&]"+(name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)",results=new RegExp(regexS).exec(window.location.href);return null==results?null:results[1]},this.parseurl=function(tabinterfaceid){var result=this.gup(tabinterfaceid);if(null==result)return null;if(parseInt(result))return parseInt(result);if(document.getElementById(result))for(var i=0;i<this.tabs.length;i++)if(this.tabs[i].id==result)return i+1;return null},this.createCookie=function(name,value,days){if(days){var date=new Date;date.setTime(date.getTime()+24*days*60*60*1e3);var expires="; expires="+date.toGMTString()}else expires="";document.cookie=name+"="+value+expires+"; path=/"},this.readCookie=function(name){for(var nameEQ=name+"=",ca=document.cookie.split(";"),i=0;i<ca.length;i++){for(var c=ca[i];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf(nameEQ))return c.substring(nameEQ.length,c.length)}return null},this.contains=function(el,item,from){return-1!=el.indexOf(item,from)},this.hasClass=function(el,className){return this.contains(el.className,className," ")},this.addClass=function(el,className){this.hasClass(el,className)||(el.className=(el.className+" "+className).replace(/\s{2,}/g," ").replace(/^\s+|\s+$/g,""))},this.removeClass=function(el,className){el.className=el.className.replace(new RegExp("(^|\\s)"+className+"(?:\\s|$)"),"$1"),el.className.replace(/\s{2,}/g," ").replace(/^\s+|\s+$/g,"")},this.tabs=this.getTabs(),this.defaults.active=this.parseurl(this.defaults.id)?this.parseurl(this.defaults.id):this.defaults.active,this.defaults.persist&&this.readCookie(this.defaults.id)&&(this.defaults.active=this.readCookie(this.defaults.id)),this.activebackup=this.defaults.active,this.show(this.defaults.active);for(var self=this,i=0;i<this.links.length;i++)this.links[i].customindex=i+1,this.links[i].onclick=function(){return self.timer1&&clearTimeout(self.timer1),self.timer2&&clearTimeout(self.timer2),self.show(this.customindex),self.defaults.persist&&self.createCookie(self.defaults.id,this.customindex,0),self.defaults.wait&&(self.timer2=setTimeout(function(){self.rotate(self.defaults.interval)},1e3*self.defaults.wait)),!1};this.defaults.interval&&this.rotate(this.defaults.interval)}
includes/wvrx-ts-admin-page-posts.php CHANGED
@@ -1,227 +1,21 @@
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 ( ! defined('WEAVER_XPLUS_VERSION') || version_compare( WEAVER_XPLUS_VERSION, '2.1.90', '>=') ) {
14
-
15
-
16
  function wvrx_ts_isp_true($val) {
17
  if ($val) return true;
18
  return false;
19
  }
20
 
21
- function wvrx_ts_page_color($opt, $msg) { // used by XPlus
22
- global $post;
23
-
24
- $pclass = 'color {hash:true, adjust:false}'; // starting with V 1.3, allow text in color pickers
25
- //echo '<span class="dashicons dashicons-admin-appearance"></span>&nbsp';
26
-
27
- ?>
28
- <label><input class="<?php echo $pclass; ?>" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>" type="text" style="width:90px"
29
- value="<?php echo esc_textarea(get_post_meta($post->ID, $opt, true)); ?>"/>
30
- <?php
31
- echo '</label>&nbsp;' . $msg ;
32
- }
33
-
34
- function wvrx_ts_simple_checkbox($opt, $msg) {
35
- global $post;
36
- ?>
37
- <label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
38
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> /><?php echo $msg;?></label>
39
- <?php
40
- }
41
-
42
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
43
- if ( $width != 'auto')
44
- $width = "{$width}%";
45
- ?>
46
- <div style="float:left;width:<?php echo $width; ?>"><?php wvrx_ts_simple_checkbox($opt,$msg);
47
- echo '</div>';
48
- for ($i = 0 ; $i < $br ; $i++)
49
- echo '<br class="page_checkbox" style="clear:both;" />';
50
-
51
- }
52
-
53
- function wvrx_ts_page_layout( $page = 'page' ) {
54
-
55
- if ( $page == 'page')
56
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaverx-theme-support' /*adm*/);
57
- else
58
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaverx-theme-support' /*adm*/);
59
-
60
- $opts = array( 'id' => '_pp_page_layout',
61
- 'info' => $msg,
62
- 'value' => array(
63
- array('val' => '', 'desc' => __('Use Default','weaverx-theme-support' /*adm*/) ),
64
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaverx-theme-support' /*adm*/) ),
65
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaverx-theme-support' /*adm*/) ),
66
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaverx-theme-support' /*adm*/) ),
67
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaverx-theme-support' /*adm*/) ),
68
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaverx-theme-support' /*adm*/) ),
69
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaverx-theme-support' /*adm*/) ),
70
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaverx-theme-support' /*adm*/) )
71
- ));
72
- wvrx_ts_pp_select_id($opts);
73
- }
74
- //--
75
-
76
-
77
-
78
- function wvrx_ts_pp_replacement( $desc, $id ) {
79
- global $post;
80
- global $wp_registered_sidebars;
81
-
82
- $id = '_' . $id;
83
-
84
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
85
-
86
-
87
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
88
- $area_name = $value['id']; //sanitize_title($value['name']);
89
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
90
- echo ' <option value="' . $area_name . '"';
91
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
92
- echo '>' . substr($area_name,9) . "</option>\n";
93
-
94
- }
95
- }
96
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
97
- }
98
- //--
99
-
100
-
101
- function wvrx_ts_pp_select_id( $value ) {
102
- global $post;
103
-
104
- if ( isset( $value['name'] ) && $value['name'] != '' )
105
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
106
-
107
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
108
-
109
- foreach ($value['value'] as $option) {
110
- if ( $option['val'] == '' ) {
111
- echo '<option value="">';
112
- } else {
113
- echo ' <option value="' . $option['val'] . '"';
114
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
115
- echo ">";
116
- }
117
- echo $option['desc'] . "</option>\n";
118
- }
119
- echo '</select>&nbsp;' . $value['info'] . "\n";
120
- }
121
- //--
122
-
123
-
124
-
125
- function wvrx_ts_pwp_atw_show_post_filter() {
126
- // use plugin options...
127
- global $post;
128
-
129
- if ( function_exists( 'atw_showposts_installed' ) ) {
130
- $filters = atw_posts_getopt('filters');
131
-
132
- $first = true;
133
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
134
- foreach ($filters as $filter => $val) { // display dropdown of available filters
135
- if ( $first ) {
136
- $first = false;
137
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
138
- } else {
139
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
140
- }
141
- }
142
- echo '</select>&nbsp;' .
143
- __('Use a Filter from <em>Weaver Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaverx-theme-support' /*adm*/) .
144
- '<br /> <span style="margin-left:8em;"><span>' .
145
- __('(Note: Weaver Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts when using this filter.)','weaverx-theme-support' /*adm*/) .
146
- '<br />' . '<br />';
147
- } else {
148
- _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaverx-theme-support' /*adm*/); ?>
149
- <br /><br />
150
- <?php }
151
- }
152
- //--
153
-
154
-
155
-
156
- function wvrx_ts_pwp_type() {
157
- $opts = array( 'name' => __('Display posts as:','weaverx-theme-support' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
158
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaverx-theme-support' /*adm*/),
159
- 'value' => array(
160
- array('val' => '', 'desc' => '&nbsp;' ),
161
- array('val' => 'full', 'desc' => __('Full post','weaverx-theme-support' /*adm*/) ),
162
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaverx-theme-support' /*adm*/) ),
163
- array('val' => 'title', 'desc' => __('Title only','weaverx-theme-support' /*adm*/) ),
164
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaverx-theme-support' /*adm*/) )
165
- ));
166
- wvrx_ts_pp_select_id($opts);
167
- }
168
-
169
-
170
- function wvrx_ts_page_cols() {
171
-
172
- $opts = array( 'name' => '', 'id' => '_pp_page_cols',
173
- 'info' => __('Display page content in this many columns using CSS column rules.','weaverx-theme-support' /*adm*/),
174
- 'value' => array(
175
- array('val' => '', 'desc' => '&nbsp;'),
176
- array('val' => '1', 'desc' => __('1 Column','weaverx-theme-support' /*adm*/) ),
177
- array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
178
- array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ),
179
- array('val' => '4', 'desc' => __('4 Columns','weaverx-theme-support' /*adm*/) ))
180
- );
181
- wvrx_ts_pp_select_id($opts);
182
-
183
- weaverx_html_br();
184
- weaverx_html_br();
185
- }
186
-
187
-
188
- function wvrx_ts_pwp_cols() {
189
-
190
- $opts = array( 'name' => __('Display post columns:','weaverx-theme-support' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
191
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaverx-theme-support' /*adm*/),
192
- 'value' => array(
193
- array('val' => '', 'desc' => '&nbsp;'),
194
- array('val' => '1', 'desc' => __('1 Column','weaverx-theme-support' /*adm*/) ),
195
- array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
196
- array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ) )
197
- );
198
- wvrx_ts_pp_select_id($opts);
199
-
200
- weaverx_html_br();
201
-
202
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaverx-theme-support' /*adm*/), 'id' => '_pp_pwp_masonry',
203
- 'info' => __('Use <em>Masonry</em> for multi-column display. <em>Not compatible with FI BG images.</em>','weaverx-theme-support' /*adm*/),
204
- 'value' => array(
205
- array('val' => '', 'desc' => '&nbsp;' ),
206
- array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
207
- array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ),
208
- array('val' => '4', 'desc' => __('4 Columns','weaverx-theme-support' /*adm*/) ),
209
- array('val' => '5', 'desc' => __('5 Columns','weaverx-theme-support' /*adm*/) ) )
210
- );
211
- wvrx_ts_pp_select_id($opts2);
212
-
213
- ?>
214
- <br />
215
- <?php
216
- wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaverx-theme-support' /*adm*/),90,1);
217
- wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaverx-theme-support' /*adm*/),90,1);
218
- }
219
-
220
-
221
-
222
- function wvrx_ts_page_extras() {
223
  global $post;
224
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
 
225
 
226
  if ( !( current_user_can('edit_themes')
227
  || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
@@ -255,7 +49,7 @@ on the default WordPress blog page, and any content you may have entered above i
255
  If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
256
  including the option of using the Page with Posts page template,
257
  then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
258
- the <em></em>&mdash; Select &mdash;</em> default value.','weaverx-theme-support' /*adm*/); ?>
259
  </div><br />
260
  <?php
261
  return;
@@ -277,94 +71,167 @@ Please open the <em>Appearance:Weaver Xtreme Admin:Main Options</em> page and <e
277
  echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaverx-theme-support' /*adm*/); the_ID() ; echo ')</span>';
278
  weaverx_html_br();
279
  _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaverx-theme-support' /*adm*/);
280
- weaverx_html_br();
 
 
 
 
281
 
282
  $template = !empty($post->page_template) ? $post->page_template : "Default Template";
283
  $raw_template = in_array($template, array('paget-raw.php'));
284
 
285
- echo '<br /><strong>' . __('Per Page Options','weaverx-theme-support' /*adm*/) . '</strong>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaverx-theme-support' /*adm*/)) ;
287
 
288
  weaverx_html_br();
 
 
 
 
289
 
290
-
291
- if (!$raw_template) {
292
  _e('These settings let you hide various elements on a per page basis.','weaverx-theme-support' /*adm*/);
293
- weaverx_html_br();
294
 
 
295
 
 
296
  wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaverx-theme-support' /*adm*/));
297
- wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaverx-theme-support' /*adm*/));
298
- wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaverx-theme-support' /*adm*/), 33, 1);
299
 
300
- wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Menus','weaverx-theme-support' /*adm*/));
301
- wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaverx-theme-support' /*adm*/));
302
- wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaverx-theme-support' /*adm*/),33,1);
303
 
304
- wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaverx-theme-support' /*adm*/));
305
- wvrx_ts_page_checkbox('_pp_full_browser_height',__('Force full browser height','weaverx-theme-support' /*adm*/),33,2);
 
306
 
307
- wvrx_ts_page_cols();
308
- } // not raw
309
 
310
- _e('<h4>Per Page Menu Options</h4>','weaverx-theme-support');
311
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaverx-theme-support' /*adm*/),90,1);
312
 
313
- 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.','weaverx-theme-support' /*adm*/),90,1);
 
 
314
 
315
- _e('<h4>Per Page Visual Editor Options</h4>', 'weaverx-theme-support');
316
- wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaverx-theme-support' /*adm*/),90,1);
317
 
318
- if (weaverx_allow_multisite()) {
319
- wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaverx-theme-support' /*adm*/),90,1);
320
- }
321
 
322
- if (!$raw_template) {
323
- ?>
324
- <p><strong><?php _e('Sidebars &amp; Widgets','weaverx-theme-support' /*adm*/); ?></strong></p>
325
 
326
- <?php
327
- wvrx_ts_page_layout();
328
- ?>
329
- <br />
330
- <input type="text" size="4" id="_pp_sidebar_width" name="_pp_sidebar_width"
331
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
332
- <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaverx-theme-support' /*adm*/); ?> <br /><br />
333
- <?php
334
 
335
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaverx-theme-support' /*adm*/),40);
336
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaverx-theme-support' /*adm*/),40,1);
337
 
338
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaverx-theme-support' /*adm*/),40);
339
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaverx-theme-support' /*adm*/),40,1);
 
340
 
341
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaverx-theme-support' /*adm*/),40);
342
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaverx-theme-support' /*adm*/),40,1);
 
343
 
344
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area','weaverx-theme-support' /*adm*/),40);
345
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area','weaverx-theme-support' /*adm*/),40,1);
346
- ?>
347
 
348
- <p><strong><?php _e('Widget Area Replacements','weaverx-theme-support' /*adm*/); ?></strong></p>
349
- <p>
350
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
351
- To add areas to the widget area lists below, you <strong>must</strong> first define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaverx-theme-support' /*adm*/); ?>
352
- </p>
353
- <?php
354
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaverx-theme-support' /*adm*/) , 'primary-widget-area' );
355
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaverx-theme-support' /*adm*/) , 'secondary-widget-area' );
356
 
357
- wvrx_ts_pp_replacement( __('Header Widget Area','weaverx-theme-support' /*adm*/) , 'header-widget-area' );
358
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaverx-theme-support' /*adm*/) , 'footer-widget-area' );
359
 
360
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaverx-theme-support' /*adm*/) , 'sitewide-top-widget-area' );
361
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaverx-theme-support' /*adm*/) , 'sitewide-bottom-widget-area' );
 
 
 
 
 
 
 
 
 
362
 
363
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaverx-theme-support' /*adm*/) , 'page-top-widget-area' );
364
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaverx-theme-support' /*adm*/) , 'page-bottom-widget-area' );
365
- ?>
366
- <br style="clear:both;" /><p><strong><?php _e('Featured Image','weaverx-theme-support' /*adm*/); ?></strong></p>
367
- <?php
368
  $opts3 = array( 'id' => '_pp_fi_location',
369
  'info' => __('How to display Page FI on this page','weaverx-theme-support' /*adm*/),
370
  'value' => array(
@@ -382,30 +249,125 @@ To add areas to the widget area lists below, you <strong>must</strong> first def
382
  )
383
  );
384
  wvrx_ts_pp_select_id($opts3);
 
385
  ?>
386
  <br />
387
  <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
388
  value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
389
  <?php _e('<em>Featured Image Link</em> - Full URL to override default link target from FI','weaverx-theme-support' /*adm*/); ?>
390
  <br style="clear:both;" />
391
- <hr />
392
- <input type="text" size="15" id="bodyclass" name="_pp_bodyclass"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
393
  value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
394
 
395
  <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaverx-theme-support' /*adm*/); ?>
396
- <br />
397
  </p>
398
  <?php
399
- } // not raw - break for XPlus
 
 
 
 
 
 
 
 
 
400
 
401
 
402
- if (!$raw_template) { // resume raw handling
 
 
403
  ?>
404
- <div style="border:1px solid black; padding:0 1em 1em 1em;">
405
- <p>
406
  <span style="font-weight:bold;font-size:120%;">
407
  <?php
408
-
409
  _e('Settings for "Page with Posts" Template','weaverx-theme-support' /*adm*/); echo "</span>";
410
  weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaverx-theme-support' /*adm*/) );
411
 
@@ -428,105 +390,573 @@ The settings will be combined for the final filtered list of posts displayed.
428
  value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
429
  <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaverx-theme-support' /*adm*/); ?> <br />
430
 
431
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
432
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
433
- <?php _e("<em>Single Post</em> - Enter post slug of a single post to display. (Use [show_posts] filter to include specific list of posts.)",'weaverx-theme-support' /*adm*/); ?> <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
 
435
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
436
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
437
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaverx-theme-support' /*adm*/); ?> <br />
438
 
439
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
440
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
441
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaverx-theme-support' /*adm*/); ?> <br />
442
 
443
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
444
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
445
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaverx-theme-support' /*adm*/); ?> <br />
446
 
447
- <input type="text" size="30" id="_pp_author" name="_pp_author"
448
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
449
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaverx-theme-support' /*adm*/); ?> <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
 
451
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
452
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
453
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaverx-theme-support' /*adm*/); ?> <br />
454
 
455
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
456
 
457
- <?php wvrx_ts_pwp_type(); ?><br />
458
- <?php wvrx_ts_pwp_cols(); ?><br />
459
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
460
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
461
- <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaverx-theme-support' /*adm*/); ?>
462
- <br />
 
 
 
 
 
 
463
 
464
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
465
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
466
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
467
- __("Hide first \"n\" posts</em> - Start with post n+1.
468
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaverx-theme-support' /*adm*/) ; ?>
469
 
470
- <br /><br />
471
 
472
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaverx-theme-support' /*adm*/), 40); ?>
473
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaverx-theme-support' /*adm*/), 40, 1); ?>
474
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaverx-theme-support' /*adm*/), 40); ?>
475
- </p>
476
- </div>
477
- <?php
478
- } else { // NOT a page with posts
479
- ?> <p>
480
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
481
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
482
- settings for "Page with Posts" will be displayed here. Current page template:','weaverx-theme-support' /*adm*/);
483
- echo $template; ?>
484
- </p>
485
- </div>
486
 
487
- <?php
488
- }
489
- } else { // raw page template handling
490
- echo '<p>';
491
- _e('<strong>You are using the RAW page template.</strong><br /><ol>
492
- <li>Check the "Allow Raw HTML" option above to prevent WP processing of your content for this page. If you leave it
493
- unchecked, you will get the WP paragraph and texturize processing.</li>
494
- <li>You can add custom HTML code to include in the &lt;head&gt; block by defining a Custom Field named <em>page-head-code</em>
495
- and including that HTML code in the Value for that field.</li></ol>', 'weaverx-theme-support');
496
- echo '</p>';
497
- }
498
 
499
- echo '<br /><br /><div style="clear:both;border:2px solid #aaa;padding:0 1em .5em 1em;">';
500
- echo '<h3>Weaver Xtreme Plus Per Page Options (&starf;Plus)</h3>';
501
- echo '<strong>' . __('Per Page Style','weaver-xtreme-plus') . '</strong> (&starf;Plus)' /*a*/ ;
502
 
503
- do_action('wvrx_ts_xp_perpage_style', $raw_template);
504
 
505
- echo '</div>';
 
 
 
 
 
 
 
 
506
 
 
 
 
 
 
 
 
 
 
 
 
 
507
 
508
  ?>
509
- <div style="clear:both;"></div>
510
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
511
- </div>
512
  <?php
 
 
513
  }
514
 
515
- function wvrx_ts_post_extras_pt() {
516
- // special handling for non-Weaver Custom Post Types
517
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array());
518
- if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') )
519
- wvrx_ts_post_extras();
520
- else {
521
- echo '<p>' .
522
- __('You can enable Weaver Xtreme Per Post Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaverx-theme-support' /*adm*/) .
523
- '</p>';
524
- }
525
- }
526
 
527
  function wvrx_ts_post_extras() {
528
  global $post;
529
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
 
530
  if ( !( current_user_can('edit_themes')
531
  || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
532
  || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
@@ -557,6 +987,79 @@ Please open the <em>Appearance:Weaver Xtreme Admin:Main Options</em> page and <e
557
  _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.','weaverx-theme-support' /*adm*/);
558
  weaverx_html_br();
559
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaverx-theme-support' /*adm*/), 40);
561
  wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaverx-theme-support' /*adm*/),55,1);
562
 
@@ -572,18 +1075,40 @@ Please open the <em>Appearance:Weaver Xtreme Admin:Main Options</em> page and <e
572
  wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaverx-theme-support' /*adm*/),90,1);
573
 
574
  wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaverx-theme-support' /*adm*/),90);
575
- echo '<br style="clear:both;"/>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
 
 
577
 
 
578
 
579
- ?>
580
- <br />
581
- <p><strong><?php _e('<em>Single Page View:</em> Sidebars','weaverx-theme-support' /*adm*/); ?></strong></p>
 
582
 
583
  <?php
584
  wvrx_ts_page_layout('post');
585
  ?>
586
- <br />
587
  <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
588
  value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
589
  <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaverx-theme-support' /*adm*/); ?> <br /><br />
@@ -616,29 +1141,7 @@ To add areas to the widget area lists below, you <strong>must</strong> first def
616
 
617
  wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
618
  wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
619
- ?>
620
- <br style="clear:both;" /><p><strong><?php _e('<em>Post Blog/Archive View:</em> Featured Image','weaverx-theme-support' /*adm*/); ?></strong></p>
621
- <?php
622
- $opts3 = array( 'id' => '_pp_post_fi_location',
623
- 'info' => __('Override <em>Post</em> setting for where to display FI (for both excerpt and full content)','weaverx-theme-support' /*adm*/),
624
- 'value' => array(
625
- array('val' => '', 'desc' => __('Default Blog FI','weaverx-theme-support' /*adm*/) ),
626
- array('val' => 'content-top', 'desc' => __('With Content - top','weaverx-theme-support' /*adm*/) ),
627
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaverx-theme-support' /*adm*/) ),
628
- array('val' => 'title-before', 'desc' => __('With Title','weaverx-theme-support' /*adm*/) ),
629
- array('val' => 'title-banner', 'desc' => __('Banner above Title','weaverx-theme-support' /*adm*/) ),
630
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaverx-theme-support' /*adm*/) ),
631
- array('val' => 'post-before', 'desc' => __('Beside Post, no wrap', 'weaver-xtreme' /*adm*/) ),
632
- array('val' => 'post-bg', 'desc' => __('As BG Image, Tile', 'weaver-xtreme' /*adm*/) ),
633
- array('val' => 'post-bg-cover', 'desc' => __('As BG Image, Cover', 'weaver-xtreme' /*adm*/) ),
634
- array('val' => 'post-bg-parallax', 'desc' => __('As BG Image, Parallax', 'weaver-xtreme' /*adm*/) ),
635
- array('val' => 'hide', 'desc' => __('Hide FI for this Post','weaverx-theme-support' /*adm*/) )
636
- )
637
- );
638
- wvrx_ts_pp_select_id($opts3);
639
-
640
-
641
- ?>
642
  <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaverx-theme-support' /*adm*/); ?></strong></p>
643
  <?php
644
  $opts3 = array( 'id' => '_pp_fi_location',
@@ -664,7 +1167,17 @@ To add areas to the widget area lists below, you <strong>must</strong> first def
664
  value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
665
  <?php _e("<em>Featured Image Link</em> - Full URL to override default link target from FI",'weaverx-theme-support' /*adm*/); ?>
666
  <br style="clear:both;" />
667
- </p><p>
 
 
 
 
 
 
 
 
 
 
668
  <strong><?php _e('Post Editor Options','weaverx-theme-support' /*adm*/); ?></strong>
669
 
670
  <?php
@@ -676,7 +1189,13 @@ To add areas to the widget area lists below, you <strong>must</strong> first def
676
  ?>
677
  </p>
678
  <?php
679
- echo '<div style="clear:both;border:2px solid #aaa;padding:0 1em .5em 1em;">';
 
 
 
 
 
 
680
  echo('<h3>Weaver Xtreme Plus Per Post Options (&starf;Plus)</h3><strong>Per Post Style</strong>' /*a*/ );
681
  weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaverx-theme-support' /*adm*/ ));
682
  echo '<br />' .
@@ -688,22 +1207,12 @@ __('Weaver Xtreme Plus supports optional per post CSS style rules.','weaverx-the
688
 
689
  do_action('weaverxplus_add_per_post');
690
  echo '</div>';
691
- ?>
692
- <p>
693
- <?php echo('<strong>Post Format</strong>');
694
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaverx-theme-support' /*adm*/));
695
- weaverx_html_br();
696
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info. Post Formats are set in the "Formats" option box.','weaverx-theme-support' /*adm*/);
697
- weaverx_html_br();
698
- ?>
699
 
700
- </p>
701
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
702
- </div>
703
- <?php
704
  }
705
 
706
 
 
 
707
  function wvrx_ts_save_post_fields($post_id) {
708
 
709
  // NOTE - Update weaverx-ts.php when this changes...
@@ -721,7 +1230,12 @@ function wvrx_ts_save_post_fields($post_id) {
721
  '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
722
  '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
723
  '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area', '_pp_full_browser_height',
724
- '_pp_page_cols',
 
 
 
 
 
725
  // Plus options
726
  '_pp_bgcolor','_pp_color','_pp_bg_fullwidth', '_pp_lr_padding', '_pp_tb_padding', '_pp_margin', '_pp_post_class',
727
  '_pp_bgimg', '_pp_mobile_bgimg', '_pp_parallax_height', '_pp_use_parallax', '_pp_parallax_not_wide',
@@ -1106,11 +1620,12 @@ Weaver Xtreme Plus supports code and HTML insertion for some areas of the Post S
1106
  }
1107
 
1108
 
 
1109
  //-----------------------------------
1110
 
1111
 
1112
 
1113
- // ---- functions for XP only
1114
 
1115
  function wvrx_ts_xp_text_option( $postid, $optid, $msg, $before = '', $after = '' ) {
1116
  $val = esc_textarea(get_post_meta($postid, $optid, true));
1
  <?php
2
  /* Display per page and per post options.
3
+ * IMPORTANT - there are dependencies with the Weaver Xtreme Plugin
 
 
 
4
  */
5
 
6
  if ( !defined('ABSPATH')) exit; // Exit if accessed directly
7
  // Admin panel that gets added to the page edit page for per page options
8
 
9
 
 
 
 
10
  function wvrx_ts_isp_true($val) {
11
  if ($val) return true;
12
  return false;
13
  }
14
 
15
+ function wvrx_ts_page_extras() { // ------------------------------- Display Per Page Options on WP Page editor -------------------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  global $post;
17
+ $func_opt = WEAVER_GET_OPTION;
18
+ $opts = $func_opt( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
19
 
20
  if ( !( current_user_can('edit_themes')
21
  || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
49
  If you want this page to serve as your blog page, and enable Weaver Xtreme Per Page options,
50
  including the option of using the Page with Posts page template,
51
  then the <em>Settings:Reading:Posts page</em> selection <strong>must</strong> be set to
52
+ the <em>&mdash; Select &mdash;</em> default value.','weaverx-theme-support' /*adm*/); ?>
53
  </div><br />
54
  <?php
55
  return;
71
  echo '<span style="float:right;">(' . __('This Page\'s ID: ','weaverx-theme-support' /*adm*/); the_ID() ; echo ')</span>';
72
  weaverx_html_br();
73
  _e('Please click the (?) for more information about all the Weaver Xtreme Page Templates.','weaverx-theme-support' /*adm*/);
74
+ if ( WVRX_TS_PAGEBUILDERS && ! ! get_post_meta( get_the_ID(), '_elementor_edit_mode', true ) )
75
+ {
76
+ weaverx_html_br();
77
+ _e('<strong>NOTE:</strong> This page has been created with <em>Elementor</em>. You may want to consider using the <em>For Your Page Builder Plugin</em> Page Template to display this page.', 'weaver-core-theme-support');
78
+ }
79
 
80
  $template = !empty($post->page_template) ? $post->page_template : "Default Template";
81
  $raw_template = in_array($template, array('paget-raw.php'));
82
 
83
+ weaverx_html_br();
84
+
85
+ wrvx_ts_showtabs($raw_template, $template);
86
+ ?>
87
+ <div style="clear:both;"></div>
88
+ <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
89
+ </div>
90
+ <?php
91
+ }
92
+
93
+ function wrvx_ts_showtabs( $raw_template = false, $template = 'default' ) {
94
+ ?>
95
+ <div id="tabwrap-per-page" style="padding-left:4px;">
96
+ <div id="tab-container-page" style="border:1px solid #888;padding: 2px 1% 2px 1%; width:97.9%;" class='yetiisub'>
97
+ <ul id="tab-container-page-nav" style="border-bottom:2px solid #999;" class='yetiisub'>
98
+ <?php
99
+ wvrx_ts_elink('#pp-visibility' , __('Per Page Options affecting element visibility.', 'weaver-xtreme' /*adm*/), __('Visibility', 'weaver-xtreme' /*adm*/),'<li>','</li>');
100
+ wvrx_ts_elink('#pp-layout' , __('Settings for Per Page Layout', 'weaver-xtreme' /*adm*/), __('Layout', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
101
+ wvrx_ts_elink('#pp-content' , __('Settings to control content display.', 'weaver-xtreme' /*adm*/), __('Content', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
102
+ wvrx_ts_elink('#pp-misc' , __('Misc per page options', 'weaver-xtreme' /*adm*/), __('Misc Options', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
103
+ wvrx_ts_elink('#pp-pwp' , __('Settings for Page with Posts.', 'weaver-xtreme' /*adm*/), __('Page with Posts','weaver-xtreme' /*adm*/),'<li>', '</li>');
104
+ if (WVRX_TS_PAGEBUILDERS) wvrx_ts_elink('#pp-builder' , __('Settings for Page Builders.', 'weaver-xtreme' /*adm*/), __('Page Builders','weaver-xtreme' /*adm*/),'<li>', '</li>');
105
+ wvrx_ts_elink('#pp-xplus' , __('Per Page settings from Weaver Xtreme Plus.', 'weaver-xtreme' /*adm*/), __('Xtreme Plus', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
106
+ ?>
107
+ </ul>
108
+
109
+ <div id="pp-visibility" class="tab_mainopt" > <!-- ******************* visibility ********************* -->
110
+ <?php
111
+ wvrx_ts_page_visibility( $raw_template );
112
+ ?>
113
+ </div> <!-- ******************* /visibility ********************* -->
114
+
115
+ <div id="pp-layout" class="tab_mainopt" > <!-- ******************* layout ********************* -->
116
+ <?php
117
+ wvrx_ts_pg_layout( $raw_template );
118
+ ?>
119
+ </div> <!-- ******************* /layout ********************* -->
120
+
121
+
122
+ <div id="pp-content" class="tab_mainopt" > <!-- ******************* content ********************* -->
123
+ <?php
124
+ wvrx_ts_page_content( $raw_template );
125
+ ?>
126
+ </div> <!-- ******************* /content ********************* -->
127
+
128
+ <div id="pp-misc" class="tab_mainopt" > <!-- ******************* misc ********************* -->
129
+ <?php wvrx_ts_page_misc_opts( $raw_template ); ?>
130
+ </div> <!-- ******************* /misc ********************* -->
131
+
132
+
133
+ <div id="pp-pwp" class="tab_mainopt" > <!-- ******************* PWP ********************* -->
134
+ <?php wvrx_ts_page_with_posts_opts( $raw_template, $template ); ?>
135
+ </div> <!-- ******************* /PWP ********************* -->
136
+ <?php if (WVRX_TS_PAGEBUILDERS) : ?>
137
+ <div id="pp-builder" class="tab_mainopt" > <!-- ******************* PWP ********************* -->
138
+ <?php wvrx_ts_page_builder_opts( $raw_template ); ?>
139
+ </div> <!-- ******************* /PWP ********************* -->
140
+ <?php endif; ?>
141
+
142
+ <div id="pp-xplus" class="tab_mainopt" > <!-- ******************* X-Plus ********************* -->
143
+ <?php wvrx_ts_page_xtreme_plus( $raw_template );?>
144
+ </div> <!-- ******************* X-Plus ********************* -->
145
+
146
+
147
+ </div> <!-- #tab-container-page -->
148
+ </div> <!-- #tabwrap-per-page -->
149
+
150
+ <script type="text/javascript">
151
+ var tabberMainOpts = new Yetii({
152
+ id: 'tab-container-page',
153
+ tabclass: 'tab_mainopt',
154
+ persist: true
155
+ });
156
+ </script>
157
+ <?php
158
+ }
159
+
160
+ function wvrx_ts_elink( $href, $title, $label, $before='', $after='') {
161
+ echo $before . '<a href="' . esc_url($href) . '" title="' . $title . '">' . $label . '</a>' . $after;
162
+ }
163
+
164
+ function wvrx_ts_page_visibility( $raw_template = false ) {
165
+ global $post;
166
+
167
+ echo '<span style="font-weight:bold;font-size:140%;">' . __('Visibility','weaverx-theme-support' /*adm*/) . '</span>';
168
  weaverx_help_link('help.html#optsperpage', __('Help for Per Page Options','weaverx-theme-support' /*adm*/)) ;
169
 
170
  weaverx_html_br();
171
+ if ( $raw_template) {
172
+ _e('Not options when using the RAW Page Template', 'weaverx-theme-support');
173
+ return;
174
+ }
175
 
 
 
176
  _e('These settings let you hide various elements on a per page basis.','weaverx-theme-support' /*adm*/);
 
177
 
178
+ wvrx_ts_page_title( __('Header Area Visibility','weaverx-theme-support' /*adm*/),80,1);
179
 
180
+ wvrx_ts_page_checkbox('_pp_hide_header',__('Hide Entire Header','weaverx-theme-support' /*adm*/));
181
  wvrx_ts_page_checkbox('_pp_hide_site_title',__('Hide Site Title/Tagline','weaverx-theme-support' /*adm*/));
182
+ wvrx_ts_page_checkbox('_pp_hide_header_image',__('Hide Standard Header Image','weaverx-theme-support' /*adm*/), 33, 1);
 
183
 
184
+ wvrx_ts_page_checkbox('_pp_hide_header_html',__('Hide Header HTML Area','weaverx-theme-support' /*adm*/));
185
+ wvrx_ts_page_checkbox('_pp_hide_customlogo',__('Hide Custom Logo','weaverx-theme-support' /*adm*/));
186
+ wvrx_ts_page_checkbox('_pp_hide_headersearch',__('Hide Header Search','weaverx-theme-support' /*adm*/), 33,1);
187
 
188
+ wvrx_ts_page_checkbox('_pp_hide_menus',__('Hide Header Menus','weaverx-theme-support' /*adm*/));
189
+ wvrx_ts_page_checkbox('_pp_hide_mini_menu',__('Hide Header Mini Menu','weaverx-theme-support' /*adm*/));
190
+ wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Widget Area','weaverx-theme-support' /*adm*/),33,2);
191
 
 
 
192
 
193
+ wvrx_ts_page_title( __('Footer Area Visibility','weaverx-theme-support' /*adm*/),80,1);
 
194
 
195
+ wvrx_ts_page_checkbox('_pp_hide_footer',__('Hide Entire Footer','weaverx-theme-support' /*adm*/));
196
+ wvrx_ts_page_checkbox('_pp_hide_footer_html',__('Hide Footer HTML Area','weaverx-theme-support' /*adm*/));
197
+ wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Widget Area','weaverx-theme-support' /*adm*/),33,2);
198
 
 
 
199
 
200
+ wvrx_ts_page_title( __('Content Area Visibility','weaverx-theme-support' /*adm*/),80,1);
 
 
201
 
202
+ wvrx_ts_page_checkbox('_pp_hide_page_infobar',__('Hide Info Bar on this page','weaverx-theme-support' /*adm*/));
203
+ wvrx_ts_page_checkbox('_pp_hide_page_title',__('Hide Page Title','weaverx-theme-support' /*adm*/));
204
+ wvrx_ts_page_checkbox('_pp_full_browser_height',__('Force full browser height','weaverx-theme-support' /*adm*/),33,2);
205
 
 
 
 
 
 
 
 
 
206
 
207
+ wvrx_ts_page_title( __('Page Widget Areas Visibility','weaverx-theme-support' /*adm*/),80,1);
 
208
 
209
+ wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar','weaverx-theme-support' /*adm*/));
210
+ wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar','weaverx-theme-support' /*adm*/));
211
+ wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area','weaverx-theme-support' /*adm*/),33,1);
212
 
213
+ wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area','weaverx-theme-support' /*adm*/));
214
+ wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Pages Top Area','weaverx-theme-support' /*adm*/));
215
+ wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Pages Bottom Area','weaverx-theme-support' /*adm*/),33,2);
216
 
217
+ }
 
 
218
 
 
 
 
 
 
 
 
 
219
 
220
+ function wvrx_ts_pg_layout( $raw_template = false ) { // ------------------------------- Page Layout -------------------
221
+ global $post;
222
 
223
+ echo '<span style="font-weight:bold;font-size:140%;">' . __('Layout','weaverx-theme-support' /*adm*/) . '</span><br/>';
224
+ _e('These settings let you control layout on a per page basis.','weaverx-theme-support' /*adm*/);
225
+
226
+ weaverx_html_br(2);
227
+ if ( $raw_template) {
228
+ _e('Not options when using the RAW Page Template', 'weaverx-theme-support');
229
+ return;
230
+ }
231
+
232
+
233
+ wvrx_ts_page_title( __('Featured Image','weaverx-theme-support' /*adm*/),80,1);
234
 
 
 
 
 
 
235
  $opts3 = array( 'id' => '_pp_fi_location',
236
  'info' => __('How to display Page FI on this page','weaverx-theme-support' /*adm*/),
237
  'value' => array(
249
  )
250
  );
251
  wvrx_ts_pp_select_id($opts3);
252
+
253
  ?>
254
  <br />
255
  <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
256
  value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
257
  <?php _e('<em>Featured Image Link</em> - Full URL to override default link target from FI','weaverx-theme-support' /*adm*/); ?>
258
  <br style="clear:both;" />
259
+ <br />
260
+
261
+ <?php
262
+ wvrx_ts_page_title( __('Full Width - Extend Areas to Full Width Display','weaverx-theme-support' /*adm*/),80,1);
263
+ wvrx_ts_page_checkbox('_pp_header_full',__('Full Width Header','weaverx-theme-support' /*adm*/));
264
+ wvrx_ts_page_checkbox('_pp_container_full',__('Full Width Container','weaverx-theme-support' /*adm*/));
265
+ wvrx_ts_page_checkbox('_pp_footer_full',__('Full Width Footer','weaverx-theme-support' /*adm*/),33,2);
266
+
267
+
268
+ wvrx_ts_page_title( __('Content Columns','weaverx-theme-support' /*adm*/),80,1);
269
+ wvrx_ts_page_cols();
270
+ wvrx_ts_page_title( __('Sidebars &amp; Widgets','weaverx-theme-support' /*adm*/),80,1);
271
+ wvrx_ts_page_layout();
272
+ ?>
273
+ <br />
274
+ <input type="text" size="4" id="_pp_sidebar_width" name="_pp_sidebar_width"
275
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
276
+ <?php _e('% &nbsp;- <em>Sidebar Width</em> - Per Page Sidebar width (applies to all layouts)','weaverx-theme-support' /*adm*/); ?> <br /><br />
277
+ <?php
278
+ }
279
+
280
+
281
+ function wvrx_ts_page_content( $raw_template = false ) { // ------------------------------- Page Content -------------------
282
+ global $post;
283
+
284
+ echo '<span style="font-weight:bold;font-size:140%;">' . __('Per Page Content Replacemant','weaverx-theme-support' /*adm*/) . '</span><br/>';
285
+ _e('These settings let you replace widget areas, as well as HTML content in the header and footer.','weaverx-theme-support' /*adm*/);
286
+ weaverx_html_br(2);
287
+ if ( $raw_template) {
288
+ _e('Not options when using the RAW Page Template', 'weaverx-theme-support');
289
+ return;
290
+ }
291
+
292
+ wvrx_ts_page_title( __('Header / Footer HTML Content','weaverx-theme-support' /*adm*/),80,2);
293
+ _e('Specify Per Page Header / Footer HTML content. If you provide just a page or post id number, the HTML area will be filled with the content of the page or post. This is especially usefule for content created with a page builder plugin.','weaverx-theme-support' /*adm*/);
294
+ weaverx_html_br();
295
+ _e('Header HTML: ','weaverx-theme-support' /*adm*/);
296
+ ?>
297
+ &nbsp;<textarea class="wvrx-edit" placeholder=" " name="_pp_header_html" rows=1 style="width: 75%"><?php echo(get_post_meta($post->ID, "_pp_header_html", true)); ?></textarea>
298
+
299
+ <?php
300
+ weaverx_html_br();
301
+ _e('Footer HTML: ','weaverx-theme-support' /*adm*/);
302
+ ?>
303
+ &nbsp;&nbsp;<textarea class="wvrx-edit" placeholder=" " name="_pp_footer_html" rows=1 style="width: 75%"><?php echo(get_post_meta($post->ID, "_pp_footer_html", true)); ?></textarea>
304
+
305
+ <?php
306
+ weaverx_html_br(2);
307
+ wvrx_ts_page_title( __('Widget Area Replacements','weaverx-theme-support' /*adm*/),80,1);
308
+ ?>
309
+ <p>
310
+ <?php _e('Select extra widget areas to replace the default widget areas for this page.
311
+ To add areas to the widget area lists below, you <strong>must</strong> first define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.','weaverx-theme-support' /*adm*/); ?>
312
+ </p>
313
+ <?php
314
+ wvrx_ts_pp_replacement( __('Primary Sidebar','weaverx-theme-support' /*adm*/) , 'primary-widget-area' );
315
+ wvrx_ts_pp_replacement( __('Secondary Sidebar','weaverx-theme-support' /*adm*/) , 'secondary-widget-area' );
316
+
317
+ wvrx_ts_pp_replacement( __('Header Widget Area','weaverx-theme-support' /*adm*/) , 'header-widget-area' );
318
+ wvrx_ts_pp_replacement( __('Footer Widget Area','weaverx-theme-support' /*adm*/) , 'footer-widget-area' );
319
+
320
+ wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaverx-theme-support' /*adm*/) , 'sitewide-top-widget-area' );
321
+ wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaverx-theme-support' /*adm*/) , 'sitewide-bottom-widget-area' );
322
+
323
+ wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaverx-theme-support' /*adm*/) , 'page-top-widget-area' );
324
+ wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaverx-theme-support' /*adm*/) , 'page-bottom-widget-area' );
325
+ ?>
326
+ <div style="clear:both;"></div>
327
+ <?php
328
+ }
329
+
330
+ function wvrx_ts_page_misc_opts( $raw_template = false ) { // ------------------------------- Misc Options -------------------
331
+ global $post;
332
+ echo '<span style="font-weight:bold;font-size:140%;">' . __('Misc Menu, Editor, and CSS Options','weaverx-theme-support' /*adm*/) . '</span><br/>';
333
+
334
+ //wvrx_ts_page_title( __('Misc Menu, Editor, and CSS Options','weaverx-theme-support' /*adm*/),80,1);
335
+
336
+ wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaverx-theme-support' /*adm*/),90,1);
337
+
338
+ 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.','weaverx-theme-support' /*adm*/),90,1);
339
+
340
+ wvrx_ts_page_checkbox('_pp_hide_visual_editor',__('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.','weaverx-theme-support' /*adm*/),90,1);
341
+
342
+ if (weaverx_allow_multisite()) {
343
+ wvrx_ts_page_checkbox('_pp_raw_html',__('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.','weaverx-theme-support' /*adm*/),90,1);
344
+ }
345
+ ?>
346
+ <p>
347
+ <input type="text" size="25" id="bodyclass" name="_pp_bodyclass"
348
  value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
349
 
350
  <?php _e('<em>Per Page body Class</em> - CSS class name to add to HTML &lt;body&gt; block. Allows Per Page custom styling.','weaverx-theme-support' /*adm*/); ?>
 
351
  </p>
352
  <?php
353
+ if ( $raw_template) {
354
+ echo '<p>';
355
+ _e('<strong>You are using the RAW page template.</strong><br /><ol>
356
+ <li>Check the "Allow Raw HTML" option above to prevent WP processing of your content for this page. If you leave it
357
+ unchecked, you will get the WP paragraph and texturize processing.</li>
358
+ <li>You can add custom HTML code to include in the &lt;head&gt; block by defining a Custom Field named <em>page-head-code</em>
359
+ and including that HTML code in the Value for that field.</li></ol>', 'weaverx-theme-support');
360
+ echo '</p>';
361
+ }
362
+ }
363
 
364
 
365
+
366
+ function wvrx_ts_page_with_posts_opts( $raw_template, $template ) { // ------------------------------- Page with Post Options -------------------
367
+ global $post;
368
  ?>
 
 
369
  <span style="font-weight:bold;font-size:120%;">
370
  <?php
 
371
  _e('Settings for "Page with Posts" Template','weaverx-theme-support' /*adm*/); echo "</span>";
372
  weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaverx-theme-support' /*adm*/) );
373
 
390
  value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
391
  <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaverx-theme-support' /*adm*/); ?> <br />
392
 
393
+ <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
394
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
395
+ <?php _e("<em>Single Post</em> - Enter post slug of a single post to display. (Use [show_posts] filter to include specific list of posts.)",'weaverx-theme-support' /*adm*/); ?> <br />
396
+
397
+ <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
398
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
399
+ <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaverx-theme-support' /*adm*/); ?> <br />
400
+
401
+ <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
402
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
403
+ <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaverx-theme-support' /*adm*/); ?> <br />
404
+
405
+ <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
406
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
407
+ <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaverx-theme-support' /*adm*/); ?> <br />
408
+
409
+ <input type="text" size="30" id="_pp_author" name="_pp_author"
410
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
411
+ <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaverx-theme-support' /*adm*/); ?> <br />
412
+
413
+ <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
414
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
415
+ <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaverx-theme-support' /*adm*/); ?> <br />
416
+
417
+ <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
418
+
419
+ <?php wvrx_ts_pwp_type(); ?><br />
420
+ <?php wvrx_ts_pwp_cols(); ?><br />
421
+ <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
422
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
423
+ <?php _e("<em>Don't excerpt 1st <em>\"n\"</em> Posts</em> - Display the non-excerpted post for the first \"n\" posts.",'weaverx-theme-support' /*adm*/); ?>
424
+ <br />
425
+
426
+ <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
427
+ value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
428
+ <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
429
+ __("Hide first \"n\" posts</em> - Start with post n+1.
430
+ Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaverx-theme-support' /*adm*/) ; ?>
431
+
432
+ <br /><br />
433
+
434
+ <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaverx-theme-support' /*adm*/), 40); ?>
435
+ <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaverx-theme-support' /*adm*/), 40, 1); ?>
436
+ <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaverx-theme-support' /*adm*/), 40); ?>
437
+
438
+ <div style="clear:both;"></div>
439
+
440
+ <?php
441
+ } else { // NOT a page with posts
442
+ ?> <p>
443
+ <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
444
+ option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
445
+ settings for "Page with Posts" will be displayed here. Current page template:','weaverx-theme-support' /*adm*/);
446
+ echo $template; ?>
447
+ </p>
448
+
449
+
450
+ <?php
451
+ }
452
+ }
453
+
454
+ if (WVRX_TS_PAGEBUILDERS) :
455
+ function wvrx_ts_page_builder_opts() {
456
+
457
+ global $post;
458
+
459
+ echo '<span style="font-weight:bold;font-size:140%;">' . __('Page Builder Header/Footer Replacemant','weaverx-theme-support' /*adm*/) . '</span><br/>';
460
+ _e('These settings let you replace the header or footer areas with content from a page builder page. They override the global replacement settings.','weaverx-theme-support' /*adm*/);
461
+ weaverx_html_br(2);
462
+
463
+ // HEADER ----------------
464
+
465
+ wvrx_ts_page_title( __('Header Area Replacement','weaverx-theme-support' /*adm*/),80,1);
466
+ ?>
467
+ <p>
468
+ <?php
469
+ $cur = get_post_meta(get_the_ID(), '_pp_pb_header_hide_menus', true);
470
+ ?>
471
+
472
+ <select id="_pp_pb_header_hide_menus" name="_pp_pb_header_hide_menus">
473
+ <option value='' <?php echo $cur == '' ? ' selected="selected"' : '';?>><?php _e('Global Visibility','weaverx-theme-support'); ?></option>
474
+ <option value='hide' <?php echo $cur == 'hide' ? ' selected="selected"' : '';?>><?php _e('Hide Menus','weaverx-theme-support'); ?></option>
475
+ <option value='show' <?php echo $cur == 'show' ? ' selected="selected"' : '';?>><?php _e('Show Menus','weaverx-theme-support'); ?></option>
476
+ </select>
477
+ <?php _e('<em>Hide or Show Menus</em> - Select how to display menus with Header Replacement.','weaverx-theme-support'); ?>
478
+ </p>
479
+
480
+ <input type="text" size="10" id='_pp_fi_link' name='_pp_fi_link'
481
+ value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_pb_header_replace_page_id', true)); ?>" />
482
+ <?php _e("Specify any page or post ID to serve as header replacement. Overrides list selection below.",'weaverx-theme-support' /*adm*/); ?>
483
+ <br style="clear:both;" />
484
+
485
+ <?php
486
+ if ( defined( 'ELEMENTOR_VERSION' ) ) : // only provide if elementor is active
487
+ // Elementor selection
488
+ $pargs = [
489
+ 'post_type' => 'page'
490
+ ];
491
+ $posts = get_pages($pargs);
492
+ ?>
493
+ <p>
494
+ <?php _e('<em>Select an Elementor Page.</em> (Override this selection in Page/Post field above to select Page OR Post by ID.)','weaverx-theme-support'); ?><br />
495
+ <select id="_pp_elementor_header_replacement" name="_pp_elementor_header_replacement">
496
+ <option value=''>&nbsp;</option>
497
+ <?php
498
+ $cur = get_post_meta(get_the_ID(), '_pp_elementor_header_replacement', true);
499
+ foreach ( $posts as $cur_post) {
500
+ if ( ! ! get_post_meta( $cur_post->ID, '_elementor_edit_mode', true ) ) {
501
+ $selected = $cur == $cur_post->ID ? ' selected="selected"' : '';
502
+ echo '<option'. $selected .' value="' . $cur_post->ID .'">'. substr( $cur_post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
503
+ }
504
+ }
505
+ ?>
506
+ </select>
507
+ </p>
508
+ <?php
509
+ endif;
510
+ $posts = '';
511
+ if ( defined( 'SITEORIGIN_PANELS_VERSION' ) ) : // only provide if siteorigins is active
512
+
513
+ // SiteOrigin selection
514
+ $pargs = [
515
+ 'post_type' => 'page'
516
+ ];
517
+ $posts = get_pages($pargs);
518
+ ?>
519
+ <p>
520
+ <?php _e('<em>Select a SiteOrigin Page Builder Page.</em> (Override this selection in Page/Post field above to select Page OR Post by ID.)','weaverx-theme-support'); ?><br />
521
+ <select id="_pp_siteorigin_header_replacement" name="_pp_siteorigin_header_replacement">
522
+ <option value=''>&nbsp;</option>
523
+ <?php
524
+ $cur = $cur = get_post_meta(get_the_ID(), '_pp_siteorigin_header_replacement', true);;
525
+ foreach ( $posts as $cur_post) {
526
+ if ( ! ! get_post_meta( $cur_post->ID, 'panels_data', true ) ) {
527
+ $selected = $cur == $cur_post->ID ? ' selected="selected"' : '';
528
+ echo '<option'. $selected .' value="' . $cur_post->ID .'">'. substr( $cur_post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
529
+ }
530
+ }
531
+ ?>
532
+ </select>
533
+ </p>
534
+ <?php
535
+ endif; // SiteOrigin
536
+
537
+ if ( !defined( 'ELEMENTOR_VERSION' ) && !defined( 'SITEORIGIN_PANELS_VERSION' ) ) {
538
+ echo '<p>';
539
+ _e('Sorry, Weaver can only list page builder pages from Elementor or SiteOrigin Page Builder. Please install and activate one of those plugins.','weaver-xtreme');
540
+ echo '</p>';
541
+ }
542
+
543
+ // FOOTER -----------------
544
+
545
+ weaverx_html_br(1);
546
+ wvrx_ts_page_title( __('Footer Area Replacement','weaverx-theme-support' /*adm*/),80,1);
547
+
548
+
549
+ if ( defined( 'ELEMENTOR_VERSION' ) ) : // only provide if elementor is active
550
+ // Elementor selection
551
+ $pargs = [
552
+ 'post_type' => 'page'
553
+ ];
554
+ $posts = get_pages($pargs);
555
+ ?>
556
+ <p>
557
+ <?php _e('<em>Select an Elementor Page.</em> (Override this selection in Page/Post field above to select Page OR Post by ID.)','weaverx-theme-support'); ?><br />
558
+ <select id="_pp_elementor_footer_replacement" name="_pp_elementor_footer_replacement">
559
+ <option value=''>&nbsp;</option>
560
+ <?php
561
+ $cur = get_post_meta(get_the_ID(), '_pp_elementor_footer_replacement', true);
562
+ foreach ( $posts as $cur_post) {
563
+ if ( ! ! get_post_meta( $cur_post->ID, '_elementor_edit_mode', true ) ) {
564
+ $selected = $cur == $cur_post->ID ? ' selected="selected"' : '';
565
+ echo '<option'. $selected .' value="' . $cur_post->ID .'">'. substr( $cur_post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
566
+ }
567
+ }
568
+ ?>
569
+ </select>
570
+ </p>
571
+ <?php
572
+ endif;
573
+ $posts = '';
574
+ if ( defined( 'SITEORIGIN_PANELS_VERSION' ) ) : // only provide if siteorigins is active
575
+
576
+ // SiteOrigin selection
577
+ $pargs = [
578
+ 'post_type' => 'page'
579
+ ];
580
+ $posts = get_pages($pargs);
581
+ ?>
582
+ <p>
583
+ <?php _e('<em>Select a SiteOrigin Page Builder Page.</em> (Override this selection in Page/Post field above to select Page OR Post by ID.)','weaverx-theme-support'); ?><br />
584
+ <select id="_pp_siteorigin_footer_replacement" name="_pp_siteorigin_footer_replacement">
585
+ <option value=''>&nbsp;</option>
586
+ <?php
587
+ foreach ( $posts as $cur_post) {
588
+ $cur = get_post_meta(get_the_ID(), '_pp_siteorigin_footer_replacement', true);
589
+ if ( ! ! get_post_meta( $cur_post->ID, 'panels_data', true ) ) {
590
+ $selected = $cur == $cur_post->ID ? ' selected="selected"' : '';
591
+ echo '<option'. $selected .' value="' . $cur_post->ID .'">'. substr( $cur_post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
592
+ }
593
+ }
594
+ ?>
595
+ </select>
596
+ </p>
597
+ <?php
598
+ endif; // SiteOrigin
599
+ if ( !defined( 'ELEMENTOR_VERSION' ) && !defined( 'SITEORIGIN_PANELS_VERSION' ) ) {
600
+ echo '<p>';
601
+ _e('Sorry, Weaver can only list page builder pages from Elementor or SiteOrigin Page Builder. Please install and activate one of those plugins.','weaver-xtreme');
602
+ echo '</p>';
603
+ }
604
+ echo '<div style="clear:both;"></div>';
605
+ }
606
+ endif;
607
+
608
+
609
+ function wvrx_ts_page_xtreme_plus( $raw_template ) { // ------------------------------- Weaver Xtreme Plus -------------------
610
+ global $post;
611
+ echo '<h3>Weaver Xtreme Plus Per Page Options (&starf;Plus)</h3>';
612
+ echo '<strong>' . __('Per Page Style','weaver-xtreme-plus') . '</strong> (&starf;Plus)' /*a*/ ;
613
+
614
+ do_action('wvrx_ts_xp_perpage_style', $raw_template);
615
+ }
616
+
617
+
618
+
619
+ function wvrx_ts_emit_script_style() {
620
+ // emit script and style for tabs
621
+ ?>
622
+ <script>
623
+ // TABS - put in front to make show faster
624
+
625
+ jQuery(document).ready(function($) { // self-defining function - for tabs shortcode
626
+ // Tabs
627
+ $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
628
+ $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
629
+ .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
630
+ });
631
+ $('.wvr-tabs-pane').hide();
632
+ $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
633
+ $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
634
+
635
+ });
636
+ </script>
637
+ <style type="text/css">
638
+ /* Tabs */
639
+ .wvr-tabs,
640
+ .wvr-tabs2,
641
+ .wvr-tabs3 {
642
+ box-sizing: border-box;
643
+ margin: 0 0 1.5em 0;
644
+ background:transparent;
645
+ }
646
+
647
+ .wvr-tabs-style .wvr-tabs-nav,
648
+ .wvr-tabs-style .wvr-tabs-nav2
649
+ .wvr-tabs-style .wvr-tabs-nav3 { /* top "bar" behind tabs */
650
+ padding: 0px 20px 0px 0px;
651
+ margin: 0;
652
+ height: 24px;
653
+ background-color: transparent;
654
+ }
655
+
656
+ .wvr-tabs-style .wvr-tabs-nav span,
657
+ .wvr-tabs-style .wvr-tabs-nav span2,
658
+ .wvr-tabs-style .wvr-tabs-nav span3 { /* bg color of a tab */
659
+ display: block;
660
+ float: left;
661
+ padding: 0 8px;
662
+ height: 24px;
663
+ line-height: 24px;
664
+ margin-right: 1px;
665
+ cursor: pointer;
666
+ border-top: 1px solid #888; /* border-color */
667
+ border-right: 1px solid #888;
668
+ border-left: 1px solid #888;
669
+ background: #ccc; /* tab-bg */
670
+ position:relative;
671
+ z-index: 1;
672
+ }
673
+
674
+ .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
675
+ .wvr-tabs-style2 .wvr-tabs-nav2 span.wvr-tabs-current2,
676
+ .wvr-tabs-style3 .wvr-tabs-nav3 span.wvr-tabs-current3 {
677
+ position:relative;
678
+ z-index: 3;
679
+ }
680
+
681
+ .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
682
+ .wvr-tabs-style .wvr-tabs-nav span:hover,
683
+ .wvr-tabs-style2 .wvr-tabs-nav2 span.wvr-tabs-current2,
684
+ .wvr-tabs-style2 .wvr-tabs-nav2 span:hover,
685
+ .wvr-tabs-style3 .wvr-tabs-nav3 span.wvr-tabs-current3,
686
+ .wvr-tabs-style3 .wvr-tabs-nav3 span:hover {
687
+ background: #eee; /* tab-current-color */
688
+ }
689
+
690
+ .wvr-tabs-nav span,
691
+ .wvr-tabs-nav span2,
692
+ .wvr-tabs-nav span3 {
693
+ box-sizing: border-box;
694
+ }
695
+
696
+ span.wvr-tabs-current,
697
+ span.wvr-tabs-current2,
698
+ span.wvr-tabs-current3 {
699
+ box-sizing: content-box;
700
+ }
701
+
702
+ .wvr-tabs-style .wvr-tabs-pane,
703
+ .wvr-tabs-style3 .wvr-tabs-pane3,
704
+ .wvr-tabs-style3 .wvr-tabs-pane3 {
705
+ padding: 15px;
706
+ border: 1px solid #888; /* border-color */
707
+ min-height: 50px; /* pane-min-height */
708
+ background-color: transparent; /* pane-bg */
709
+ position: relative;
710
+ z-index: 2;
711
+ }
712
+
713
+ .wvr-tabs-panes,
714
+ .wvr-tabs-panes2,
715
+ .wvr-tabs-panes3 {
716
+ position: relative;
717
+ z-index: 2;
718
+ } /* add line to tab */
719
+
720
+ .wvr-tabs-panes .wvr-tabs-hide,
721
+ .wvr-tabs-panes2 .wvr-tabs-hide2,
722
+ .wvr-tabs-panes3 .wvr-tabs-hide3 {
723
+ display: none;
724
+
725
+ }
726
+
727
+ .wvr-tabs-nav,
728
+ .wvr-tabs-nav2,
729
+ .wvr-tabs-nav3 {
730
+ position: relative;
731
+ z-index: 3;
732
+ }
733
+ </style>
734
+ <?php
735
+ }
736
+
737
+
738
+
739
+
740
+ function wvrx_ts_page_color($opt, $msg) { // used by XPlus
741
+ global $post;
742
+
743
+ $pclass = 'color {hash:true, adjust:false}'; // starting with V 1.3, allow text in color pickers
744
+ //echo '<span class="dashicons dashicons-admin-appearance"></span>&nbsp';
745
+
746
+ ?>
747
+ <label><input class="<?php echo $pclass; ?>" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>" type="text" style="width:90px"
748
+ value="<?php echo esc_textarea(get_post_meta($post->ID, $opt, true)); ?>"/>
749
+ <?php
750
+ echo '</label>&nbsp;' . $msg ;
751
+ }
752
+
753
+ function wvrx_ts_simple_checkbox($opt, $msg) {
754
+ global $post;
755
+ ?>
756
+ <label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
757
+ <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> /><?php echo $msg;?></label>
758
+ <?php
759
+ }
760
+
761
+ function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
762
+ if ( $width != 'auto')
763
+ $width = "{$width}%";
764
+ ?>
765
+ <div style="float:left;width:<?php echo $width; ?>"><?php wvrx_ts_simple_checkbox($opt,$msg);
766
+ echo '</div>';
767
+ for ($i = 0 ; $i < $br ; $i++)
768
+ echo '<br class="page_checkbox" style="clear:both;" />';
769
+
770
+ }
771
+
772
+ function wvrx_ts_page_title($msg, $width = 33, $br = 0) {
773
+ if ( $width != 'auto')
774
+ $width = "{$width}%";
775
+ ?>
776
+ <div style="float:left;font-weight:bold;font-style:italic;width:<?php echo $width; ?>">
777
+ <?php
778
+ echo $msg . '</div>';
779
+ for ($i = 0 ; $i < $br ; $i++)
780
+ echo '<br class="page_checkbox" style="clear:both;" />';
781
+
782
+ }
783
+
784
+ function wvrx_ts_page_layout( $page = 'page' ) {
785
+
786
+ if ( $page == 'page')
787
+ $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaverx-theme-support' /*adm*/);
788
+ else
789
+ $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaverx-theme-support' /*adm*/);
790
+
791
+ $opts = array( 'id' => '_pp_page_layout',
792
+ 'info' => $msg,
793
+ 'value' => array(
794
+ array('val' => '', 'desc' => __('Use Default','weaverx-theme-support' /*adm*/) ),
795
+ array('val' => 'right', 'desc' => __('Sidebars on Right','weaverx-theme-support' /*adm*/) ),
796
+ array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaverx-theme-support' /*adm*/) ),
797
+ array('val' => 'left', 'desc' => __('Sidebars on Left','weaverx-theme-support' /*adm*/) ),
798
+ array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaverx-theme-support' /*adm*/) ),
799
+ array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaverx-theme-support' /*adm*/) ),
800
+ array('val' => 'split-top', 'desc' => __('Split (stack top)','weaverx-theme-support' /*adm*/) ),
801
+ array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaverx-theme-support' /*adm*/) )
802
+ ));
803
+ wvrx_ts_pp_select_id($opts);
804
+ }
805
+ //--
806
+
807
+
808
+
809
+ function wvrx_ts_pp_replacement( $desc, $id ) {
810
+ global $post;
811
+ global $wp_registered_sidebars;
812
+
813
+ $id = '_' . $id;
814
+
815
+ echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
816
+
817
+
818
+ foreach ( (array) $wp_registered_sidebars as $key => $value ) {
819
+ $area_name = $value['id']; //sanitize_title($value['name']);
820
+ if ( strpos( $area_name, 'per-page-' ) !== false ) {
821
+ echo ' <option value="' . $area_name . '"';
822
+ selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
823
+ echo '>' . substr($area_name,9) . "</option>\n";
824
+
825
+ }
826
+ }
827
+ echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
828
+ }
829
+ //--
830
+
831
+
832
+ function wvrx_ts_pp_select_id( $value ) {
833
+ global $post;
834
+
835
+ if ( isset( $value['name'] ) && $value['name'] != '' )
836
+ echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
837
+
838
+ echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
839
+
840
+ foreach ($value['value'] as $option) {
841
+ if ( $option['val'] == '' ) {
842
+ echo '<option value="">';
843
+ } else {
844
+ echo ' <option value="' . $option['val'] . '"';
845
+ selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
846
+ echo ">";
847
+ }
848
+ echo $option['desc'] . "</option>\n";
849
+ }
850
+ echo '</select>&nbsp;' . $value['info'] . "\n";
851
+ }
852
+ //--
853
+
854
 
 
 
 
855
 
856
+ function wvrx_ts_pwp_atw_show_post_filter() {
857
+ // use plugin options...
858
+ global $post;
859
 
860
+ if ( function_exists( 'atw_showposts_installed' ) ) {
861
+ $filters = atw_posts_getopt('filters');
 
862
 
863
+ $first = true;
864
+ echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
865
+ foreach ($filters as $filter => $val) { // display dropdown of available filters
866
+ if ( $first ) {
867
+ $first = false;
868
+ echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
869
+ } else {
870
+ echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
871
+ }
872
+ }
873
+ echo '</select>&nbsp;' .
874
+ __('Use a Filter from <em>Weaver Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaverx-theme-support' /*adm*/) .
875
+ '<br /> <span style="margin-left:8em;"><span>' .
876
+ __('(Note: Weaver Show Posts <em>Post Display</em> options and <em>Use Paging</em> option <strong>not</strong> used for posts when using this filter.)','weaverx-theme-support' /*adm*/) .
877
+ '<br />' . '<br />';
878
+ } else {
879
+ _e('<strong>Want More Post Filtering Options?</strong> Install the <em>Aspen Themeworks Show Posts</em> plugin for more filtering options.','weaverx-theme-support' /*adm*/); ?>
880
+ <br /><br />
881
+ <?php }
882
+ }
883
+ //--
884
 
 
 
 
885
 
 
886
 
887
+ function wvrx_ts_pwp_type() {
888
+ $opts = array( 'name' => __('Display posts as:','weaverx-theme-support' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
889
+ 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaverx-theme-support' /*adm*/),
890
+ 'value' => array(
891
+ array('val' => '', 'desc' => '&nbsp;' ),
892
+ array('val' => 'full', 'desc' => __('Full post','weaverx-theme-support' /*adm*/) ),
893
+ array('val' => 'excerpt', 'desc' => __('Excerpt','weaverx-theme-support' /*adm*/) ),
894
+ array('val' => 'title', 'desc' => __('Title only','weaverx-theme-support' /*adm*/) ),
895
+ array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaverx-theme-support' /*adm*/) )
896
+ ));
897
+ wvrx_ts_pp_select_id($opts);
898
+ }
899
 
 
 
 
 
 
900
 
901
+ function wvrx_ts_page_cols() {
902
 
903
+ $opts = array( 'name' => '', 'id' => '_pp_page_cols',
904
+ 'info' => __('Display page content in this many columns using CSS column rules.','weaverx-theme-support' /*adm*/),
905
+ 'value' => array(
906
+ array('val' => '', 'desc' => '&nbsp;'),
907
+ array('val' => '1', 'desc' => __('1 Column','weaverx-theme-support' /*adm*/) ),
908
+ array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
909
+ array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ),
910
+ array('val' => '4', 'desc' => __('4 Columns','weaverx-theme-support' /*adm*/) ))
911
+ );
912
+ wvrx_ts_pp_select_id($opts);
 
 
 
 
913
 
914
+ weaverx_html_br();
915
+ weaverx_html_br();
916
+ }
 
 
 
 
 
 
 
 
917
 
 
 
 
918
 
919
+ function wvrx_ts_pwp_cols() {
920
 
921
+ $opts = array( 'name' => __('Display post columns:','weaverx-theme-support' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
922
+ 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaverx-theme-support' /*adm*/),
923
+ 'value' => array(
924
+ array('val' => '', 'desc' => '&nbsp;'),
925
+ array('val' => '1', 'desc' => __('1 Column','weaverx-theme-support' /*adm*/) ),
926
+ array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
927
+ array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ) )
928
+ );
929
+ wvrx_ts_pp_select_id($opts);
930
 
931
+ weaverx_html_br();
932
+
933
+ $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaverx-theme-support' /*adm*/), 'id' => '_pp_pwp_masonry',
934
+ 'info' => __('Use <em>Masonry</em> for multi-column display. <em>Not compatible with FI BG images.</em>','weaverx-theme-support' /*adm*/),
935
+ 'value' => array(
936
+ array('val' => '', 'desc' => '&nbsp;' ),
937
+ array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
938
+ array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ),
939
+ array('val' => '4', 'desc' => __('4 Columns','weaverx-theme-support' /*adm*/) ),
940
+ array('val' => '5', 'desc' => __('5 Columns','weaverx-theme-support' /*adm*/) ) )
941
+ );
942
+ wvrx_ts_pp_select_id($opts2);
943
 
944
  ?>
945
+ <br />
 
 
946
  <?php
947
+ wvrx_ts_page_checkbox('_pp_pwp_compact', __('For posts with <em>Post Format</em> specified, use compact layout on blog/archive pages.','weaverx-theme-support' /*adm*/),90,1);
948
+ wvrx_ts_page_checkbox('_pp_pwp_compact_posts', __('For regular, <em>non-PostFormats</em> posts, show <em>title + first image</em> on blog pages.','weaverx-theme-support' /*adm*/),90,1);
949
  }
950
 
951
+
952
+ //================================================================ Per Post Options ========================================================
953
+
954
+
 
 
 
 
 
 
 
955
 
956
  function wvrx_ts_post_extras() {
957
  global $post;
958
+ $func_opt = WEAVER_GET_OPTION;
959
+ $opts = get_option( apply_filters('weaverx_options',WEAVER_SETTINGS_NAME) , array()); // need to fetch Weaver Xtreme options
960
  if ( !( current_user_can('edit_themes')
961
  || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
962
  || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
987
  _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.','weaverx-theme-support' /*adm*/);
988
  weaverx_html_br();
989
 
990
+ wrvx_ts_show_post_tabs();
991
+
992
+ ?>
993
+ <p>
994
+ <?php echo('<strong>Post Format</strong>');
995
+ weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaverx-theme-support' /*adm*/));
996
+ weaverx_html_br();
997
+ _e('Weaver Xtreme supports Post Formats. Click the ? for more info. Post Formats are set in the "Formats" option box.','weaverx-theme-support' /*adm*/);
998
+ weaverx_html_br();
999
+ ?>
1000
+
1001
+ </p>
1002
+ <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
1003
+ <div style="clear:both;"></div>
1004
+ </div>
1005
+ <?php
1006
+ }
1007
+
1008
+ function wrvx_ts_show_post_tabs( ) {
1009
+ ?>
1010
+ <div id="tabwrap-per-post" style="padding-left:4px;">
1011
+ <div id="tab-container-post" style="border:1px solid #888;padding: 2px 1% 2px 1%; width:97.9%;" class='yetiisub'>
1012
+ <ul id="tab-container-post-nav" style="border-bottom:2px solid #999;" class='yetiisub'>
1013
+ <?php
1014
+ wvrx_ts_elink('#pp-post-blog' , __('Per Post options when displayed in blog or archive.', 'weaver-xtreme' /*adm*/), __('Post Blog/Archive Options', 'weaver-xtreme' /*adm*/),'<li>','</li>');
1015
+ wvrx_ts_elink('#pp-post-single' , __('Per Post options for single page view.', 'weaver-xtreme' /*adm*/), __('Post Single Page Options', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
1016
+ wvrx_ts_elink('#pp-post-misc' , __('Misc per post options', 'weaver-xtreme' /*adm*/), __('Misc Options', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
1017
+ wvrx_ts_elink('#pp-post-xplus' , __('Per Post settings from Weaver Xtreme Plus.', 'weaver-xtreme' /*adm*/), __('Xtreme Plus', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
1018
+ ?>
1019
+ </ul>
1020
+
1021
+ <div id="pp-post-blog" class="tab_mainopt" > <!-- ******************* blog/archive ********************* -->
1022
+ <?php
1023
+ weaverx_ts_post_blog_opts( );
1024
+ ?>
1025
+ </div> <!-- ******************* /blog-archive ********************* -->
1026
+
1027
+ <div id="pp-post-single" class="tab_mainopt" > <!-- ******************* single page ********************* -->
1028
+ <?php
1029
+ weaverx_ts_post_single_opts( );
1030
+ ?>
1031
+ </div> <!-- ******************* /single page ********************* -->
1032
+
1033
+ <div id="pp-misc" class="tab_mainopt" > <!-- ******************* misc ********************* -->
1034
+ <?php weaverx_ts_post_misc_opts( ); ?>
1035
+ </div> <!-- ******************* /misc ********************* -->
1036
+
1037
+
1038
+ <div id="pp-post-xplus" class="tab_mainopt" > <!-- ******************* X-Plus ********************* -->
1039
+ <?php weaverx_ts_post_xplus_opts( );?>
1040
+ </div> <!-- ******************* X-Plus ********************* -->
1041
+
1042
+
1043
+ </div> <!-- #tab-container-post -->
1044
+ </div> <!-- #tabwrap-per-post -->
1045
+
1046
+ <script type="text/javascript">
1047
+ var tabberMainOpts = new Yetii({
1048
+ id: 'tab-container-post',
1049
+ tabclass: 'tab_mainopt',
1050
+ persist: true
1051
+ });
1052
+ </script>
1053
+ <?php
1054
+ }
1055
+
1056
+
1057
+ function weaverx_ts_post_blog_opts() {
1058
+ ?>
1059
+ <strong><?php _e('Per Post Options when displayed on Blog or Archive-like view','weaverx-theme-support' /*adm*/); ?></strong><br /><br />
1060
+
1061
+ <?php
1062
+
1063
  wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaverx-theme-support' /*adm*/), 40);
1064
  wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaverx-theme-support' /*adm*/),55,1);
1065
 
1075
  wvrx_ts_page_checkbox('_pp_masonry_span2',__('For <em>Masonry</em> multi-columns: make this post span two columns.','weaverx-theme-support' /*adm*/),90,1);
1076
 
1077
  wvrx_ts_page_checkbox('_pp_post_add_link',__('Show a "link to single page" icon at bottom of post - useful with compact posts','weaverx-theme-support' /*adm*/),90);
1078
+ ?>
1079
+ <br style="clear:both;" /><strong><p>
1080
+ <?php _e('<em>Post Blog/Archive View:</em> Featured Image','weaverx-theme-support' /*adm*/); ?></strong></p>
1081
+ <?php
1082
+ $opts3 = array( 'id' => '_pp_post_fi_location',
1083
+ 'info' => __('Override <em>Post</em> setting for where to display FI (for both excerpt and full content)','weaverx-theme-support' /*adm*/),
1084
+ 'value' => array(
1085
+ array('val' => '', 'desc' => __('Default Blog FI','weaverx-theme-support' /*adm*/) ),
1086
+ array('val' => 'content-top', 'desc' => __('With Content - top','weaverx-theme-support' /*adm*/) ),
1087
+ array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaverx-theme-support' /*adm*/) ),
1088
+ array('val' => 'title-before', 'desc' => __('With Title','weaverx-theme-support' /*adm*/) ),
1089
+ array('val' => 'title-banner', 'desc' => __('Banner above Title','weaverx-theme-support' /*adm*/) ),
1090
+ array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaverx-theme-support' /*adm*/) ),
1091
+ array('val' => 'post-before', 'desc' => __('Beside Post, no wrap', 'weaver-xtreme' /*adm*/) ),
1092
+ array('val' => 'post-bg', 'desc' => __('As BG Image, Tile', 'weaver-xtreme' /*adm*/) ),
1093
+ array('val' => 'post-bg-cover', 'desc' => __('As BG Image, Cover', 'weaver-xtreme' /*adm*/) ),
1094
+ array('val' => 'post-bg-parallax', 'desc' => __('As BG Image, Parallax', 'weaver-xtreme' /*adm*/) ),
1095
+ array('val' => 'hide', 'desc' => __('Hide FI for this Post','weaverx-theme-support' /*adm*/) )
1096
+ )
1097
+ );
1098
+ wvrx_ts_pp_select_id($opts3);
1099
 
1100
+ echo '<div style="clear:both;" /></div>';
1101
 
1102
+ }
1103
 
1104
+ function weaverx_ts_post_single_opts() {
1105
+ global $post;
1106
+ ?>
1107
+ <strong><?php _e('<em>Single Page View:</em> Sidebars','weaverx-theme-support' /*adm*/); ?></strong><br /><br />
1108
 
1109
  <?php
1110
  wvrx_ts_page_layout('post');
1111
  ?>
 
1112
  <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
1113
  value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
1114
  <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaverx-theme-support' /*adm*/); ?> <br /><br />
1141
 
1142
  wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
1143
  wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
1144
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1145
  <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaverx-theme-support' /*adm*/); ?></strong></p>
1146
  <?php
1147
  $opts3 = array( 'id' => '_pp_fi_location',
1167
  value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
1168
  <?php _e("<em>Featured Image Link</em> - Full URL to override default link target from FI",'weaverx-theme-support' /*adm*/); ?>
1169
  <br style="clear:both;" />
1170
+ <br />
1171
+
1172
+ <?php
1173
+ echo '<div style="clear:both;"/></div>';
1174
+ }
1175
+
1176
+
1177
+ function weaverx_ts_post_misc_opts() {
1178
+ ?>
1179
+
1180
+ <p>
1181
  <strong><?php _e('Post Editor Options','weaverx-theme-support' /*adm*/); ?></strong>
1182
 
1183
  <?php
1189
  ?>
1190
  </p>
1191
  <?php
1192
+
1193
+ }
1194
+
1195
+
1196
+ function weaverx_ts_post_xplus_opts() {
1197
+
1198
+ echo '<div style="clear:both;">';
1199
  echo('<h3>Weaver Xtreme Plus Per Post Options (&starf;Plus)</h3><strong>Per Post Style</strong>' /*a*/ );
1200
  weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaverx-theme-support' /*adm*/ ));
1201
  echo '<br />' .
1207
 
1208
  do_action('weaverxplus_add_per_post');
1209
  echo '</div>';
 
 
 
 
 
 
 
 
1210
 
 
 
 
 
1211
  }
1212
 
1213
 
1214
+
1215
+
1216
  function wvrx_ts_save_post_fields($post_id) {
1217
 
1218
  // NOTE - Update weaverx-ts.php when this changes...
1230
  '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
1231
  '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
1232
  '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area', '_pp_full_browser_height',
1233
+ '_pp_page_cols', '_pp_header_full', '_pp_container_full', '_pp_footer_full','_pp_hide_footer_html','_pp_hide_header_html',
1234
+ '_pp_hide_customlogo', '_pp_hide_mini_menu' , '_pp_hide_headersearch', '_pp_header_html', '_pp_footer_html',
1235
+ '_pp_elementor_header_replacement', '_pp_elementor_footer_replacement', '_pp_siteorigin_header_replacement', '_pp_elementor_footer_replacement',
1236
+ '_pp_pb_header_hide_menus','_pp_pb_header_replace_page_id','_pp_pb_footer_replace_page_id',
1237
+
1238
+
1239
  // Plus options
1240
  '_pp_bgcolor','_pp_color','_pp_bg_fullwidth', '_pp_lr_padding', '_pp_tb_padding', '_pp_margin', '_pp_post_class',
1241
  '_pp_bgimg', '_pp_mobile_bgimg', '_pp_parallax_height', '_pp_use_parallax', '_pp_parallax_not_wide',
1620
  }
1621
 
1622
 
1623
+
1624
  //-----------------------------------
1625
 
1626
 
1627
 
1628
+ // ---- functions for XPlus only
1629
 
1630
  function wvrx_ts_xp_text_option( $postid, $optid, $msg, $before = '', $after = '' ) {
1631
  $val = esc_textarea(get_post_meta($postid, $optid, true));
includes/wvrx-ts-runtime-lib.php CHANGED
@@ -40,7 +40,7 @@ function wvrx_ts_theme_support_addon() {
40
  <div class="a-plus">
41
  <p><strong style="font-size:110%;"><?php
42
  if ($is_xtreme) _e('You have Weaver Xtreme Theme Support installed.','weaverx-theme-support' /*adm*/);
43
- else _e('You have Weaver Xtreme (Foundation) Theme Support installed.','weaverx-theme-support' /*adm*/);
44
  echo ' (V ' . WVRX_TS_VERSION . ')'; ?></strong><br />
45
  <?php _e('This section shows the shortcodes and widgets available with Weaver Xtreme (and Foundation) Theme Support.
46
  Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaverx-theme-support' /*adm*/); ?></p>
40
  <div class="a-plus">
41
  <p><strong style="font-size:110%;"><?php
42
  if ($is_xtreme) _e('You have Weaver Xtreme Theme Support installed.','weaverx-theme-support' /*adm*/);
43
+
44
  echo ' (V ' . WVRX_TS_VERSION . ')'; ?></strong><br />
45
  <?php _e('This section shows the shortcodes and widgets available with Weaver Xtreme (and Foundation) Theme Support.
46
  Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaverx-theme-support' /*adm*/); ?></p>
includes/wvrx-ts-widgets.php CHANGED
@@ -130,7 +130,7 @@ class WeaverX_Widget_Login extends WP_Widget {
130
  global $current_user;
131
  $current_user = wp_get_current_user();
132
  if (isset($current_user->display_name))
133
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaverx-theme-support' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
134
  ?>
135
  <ul>
136
  <?php wp_register(); ?>
@@ -156,6 +156,296 @@ class WeaverX_Widget_Login extends WP_Widget {
156
  }
157
  }
158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
 
160
  add_action("widgets_init", "wvrx_ts_load_widgets");
161
  add_filter('weaverx_text', 'do_shortcode');
@@ -165,6 +455,14 @@ function wvrx_ts_load_widgets() {
165
  register_widget('WeaverX_Widget_Text');
166
  register_widget('WeaverX_Widget_PPText');
167
  register_widget('WeaverX_Widget_Login');
 
 
 
 
 
 
 
 
168
  }
169
 
170
  ?>
130
  global $current_user;
131
  $current_user = wp_get_current_user();
132
  if (isset($current_user->display_name))
133
+ echo '<span class="wvrx-welcome-user">' . __('Welcome','weaverx-theme-support' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
134
  ?>
135
  <ul>
136
  <?php wp_register(); ?>
156
  }
157
  }
158
 
159
+ // ###################################### ELEMENTOR WIDGET ####################################
160
+
161
+
162
+ class Weaver_Widget_Elementor extends WP_Widget {
163
+
164
+ function __construct() {
165
+ $widget_ops = array('classname' => 'Weaver_Widget_Elementor',
166
+ 'description' => __('Show an Elementor Page or Post','show-sliders' /*adm*/));
167
+ $control_ops = array('width' => 400, 'height' => 350);
168
+ parent::__construct('wvr_elementor_page', __('Weaver Elementor Page','show-sliders' /*adm*/), $widget_ops, $control_ops);
169
+ }
170
+
171
+ function widget($args, $instance) {
172
+ extract($args);
173
+
174
+ $instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
175
+ $use_post_title = ! empty( $instance['use_post_title'] ) ? '1' : '0';
176
+
177
+ $post_list = $instance['post_list'];
178
+ if (!$post_list) $post_list = '';
179
+
180
+ $pb_post_ID = $instance['pb_post_ID'];
181
+ if (!$pb_post_ID) $pb_post_ID ='';
182
+
183
+ $show_post = $post_list;
184
+
185
+ if ( $pb_post_ID )
186
+ $show_post = $pb_post_ID; // override list selection.
187
+
188
+
189
+ echo $before_widget;
190
+
191
+ if ( $use_post_title ) {
192
+ $post_title = get_the_title($show_post);
193
+ echo $args['before_title'] . esc_html($post_title) . $args['after_title'];
194
+ } else if ( !empty($instance['title']) )
195
+ echo $args['before_title'] . $instance['title'] . $args['after_title'];
196
+
197
+
198
+ $before = $show_post ? "<div class='weaver-pagebuilder-elementor weaver-pagebulder-{$show_post}'>" : '';
199
+ $after = $show_post ? "</div>" : '';
200
+
201
+ $out = '';
202
+
203
+
204
+ // This widget is elementor specific...
205
+
206
+ $is_elementor = ! ! get_post_meta( $show_post, '_elementor_edit_mode', true );
207
+ if ( $is_elementor ) {
208
+
209
+ // okay, gotta fetch the_post for this post so that it will be properly intercepted by the page builder
210
+ $args = array(
211
+ 'p' => $show_post, // ID of a page, post, or custom type
212
+ 'post_type' => 'page'
213
+ );
214
+
215
+ $use_posts = new WP_Query($args);
216
+ while ( $use_posts->have_posts() ) {
217
+ $use_posts->the_post();
218
+
219
+ $out .= '<div id="post-' . $show_post . '" class="' . join( ' ', get_post_class('content-page-builder')) . '">';
220
+ $out .= apply_filters('the_content', get_the_content());
221
+ $out .= "</div>\n";
222
+ }
223
+ wp_reset_query(); // undo our WP_Query
224
+ wp_reset_postdata();
225
+ } else {
226
+ $out = __('Sorry, you did not specify an Elementor Page.', 'weaverx-theme-support');
227
+ }
228
+
229
+ echo $before . $out . $after;
230
+
231
+ echo $after_widget;
232
+ }
233
+
234
+ function update( $new_instance, $old_instance ) {
235
+ $instance['title'] = strip_tags( stripslashes($new_instance['title']) );
236
+ $instance['post_list'] = $new_instance['post_list'];
237
+ $post_id_string = strip_tags( stripslashes(trim($new_instance['pb_post_ID']) ));
238
+ $instance['use_post_title'] = !empty($new_instance['use_post_title']) ? 1 : 0;
239
+
240
+ $post_id = (int) $post_id_string;
241
+ if ( (string) $post_id == $post_id_string && $post_id != 0 ) {
242
+ $instance['pb_post_ID'] = $post_id_string;
243
+ } else {
244
+ $instance['pb_post_ID'] ='';
245
+ }
246
+ return $instance;
247
+ }
248
+
249
+ function form( $instance ) {
250
+ $title = isset( $instance['title'] ) ? $instance['title'] : '';
251
+ $post_list = isset( $instance['post_list'] ) ? $instance['post_list'] : '0';
252
+ $pb_post_ID = isset( $instance['pb_post_ID'] ) ? $instance['pb_post_ID'] :'';
253
+ $use_post_title = isset( $instance['use_post_title'] ) ? (bool) $instance['use_post_title'] : false;
254
+
255
+ //echo "<p>post list id: {$post_list} - specific: {$pb_post_ID} </p>\n";
256
+ ?>
257
+ <p>
258
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title (optional):' /*a*/ ) ?></label>
259
+ <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_textarea($title); ?>" />
260
+ </p>
261
+ <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('use_post_title'); ?>" name="<?php echo $this->get_field_name('use_post_title'); ?>"<?php checked( $use_post_title ); ?> />
262
+ <label for="<?php echo $this->get_field_id('use_post_title'); ?>"><?php _e( 'Use the Title of the selected Page for widget title.' ); ?></label>
263
+ </p>
264
+
265
+ <?php
266
+
267
+ if ( $pb_post_ID ) {
268
+ echo "<p>Please clear the <em>ID of an Elementor Page or Post</em> value below to show a selection list of Elementor Pages.</p>\n";
269
+ } else {
270
+ $pargs = [
271
+ //'meta_key' => '_elementor_edit_mode',
272
+ //'meta_value' => true,
273
+ 'post_type' => 'page'
274
+ ];
275
+ $posts = get_pages($pargs);
276
+ ?>
277
+
278
+ <p>
279
+ <label for="<?php echo $this->get_field_id('post_list'); ?>"><?php echo('Select an Elementor Page. (Override this selection in Page/Post field below to select Page OR Post by ID.)'); ?></label><br />
280
+ <select id="<?php echo $this->get_field_id('post_list'); ?>" name="<?php echo $this->get_field_name('post_list'); ?>">
281
+ <?php
282
+ foreach ( $posts as $post) {
283
+ if ( ! ! get_post_meta( $post->ID, '_elementor_edit_mode', true ) ) {
284
+ $selected = $post_list == $post->ID ? ' selected="selected"' : '';
285
+ echo '<option'. $selected .' value="' . $post->ID .'">'. substr( $post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
286
+ }
287
+ }
288
+ ?>
289
+ </select>
290
+ </p>
291
+ <?php
292
+ }
293
+ ?>
294
+
295
+ <p>
296
+ <label for="<?php echo $this->get_field_id('pb_post_ID'); ?>"><?php echo('ID of an Elementor Page or Post (overrides Selection list above):' ) ?></label>
297
+ <input type="text" size="12" id="<?php echo $this->get_field_id('pb_post_ID'); ?>" name="<?php echo $this->get_field_name('pb_post_ID'); ?>" value="<?php echo esc_textarea($pb_post_ID); ?>" />
298
+ </p>
299
+ <?php
300
+
301
+ }
302
+ }
303
+
304
+ // ###################################### SITEORIGIN PAGE BUILDER WIDGET ####################################
305
+
306
+ class Weaver_Widget_SiteOrigin extends WP_Widget {
307
+
308
+ function __construct() {
309
+ $widget_ops = array('classname' => 'Weaver_Widget_SiteOrigin',
310
+ 'description' => __('Show a SiteOrigin Page or Post','show-sliders' /*adm*/));
311
+ $control_ops = array('width' => 400, 'height' => 350);
312
+ parent::__construct('wvr_siteorigin_page', __('Weaver SiteOrigin Page','show-sliders' /*adm*/), $widget_ops, $control_ops);
313
+ }
314
+
315
+ function widget($args, $instance) {
316
+ extract($args);
317
+
318
+ $instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
319
+ $use_post_title = ! empty( $instance['use_post_title'] ) ? '1' : '0';
320
+
321
+ $post_list = $instance['post_list'];
322
+ if (!$post_list) $post_list = '';
323
+
324
+ $pb_post_ID = $instance['pb_post_ID'];
325
+ if (!$pb_post_ID) $pb_post_ID ='';
326
+
327
+ $show_post = $post_list;
328
+
329
+ if ( $pb_post_ID )
330
+ $show_post = $pb_post_ID; // override list selection.
331
+
332
+
333
+ echo $before_widget;
334
+
335
+ if ( $use_post_title ) {
336
+ $post_title = get_the_title($show_post);
337
+ echo $args['before_title'] . esc_html($post_title) . $args['after_title'];
338
+ } else if ( !empty($instance['title']) )
339
+ echo $args['before_title'] . $instance['title'] . $args['after_title'];
340
+
341
+
342
+ $before = $show_post ? "<div class='weaver-pagebuilder-siteorigin weaver-pagebulder-{$show_post}'>" : '';
343
+ $after = $show_post ? "</div>" : '';
344
+
345
+ $out = '';
346
+
347
+
348
+ // This widget is SiteOrigin specific...
349
+
350
+ $is_siteorigin = ! ! get_post_meta( $show_post, 'panels_data', true );
351
+ if ( $is_siteorigin ) {
352
+
353
+ // okay, gotta fetch the_post for this post so that it will be properly intercepted by the page builder
354
+ $args = array(
355
+ 'p' => $show_post, // ID of a page, post, or custom type
356
+ 'post_type' => 'page'
357
+ );
358
+
359
+ $use_posts = new WP_Query($args);
360
+ while ( $use_posts->have_posts() ) {
361
+ $use_posts->the_post();
362
+
363
+ $out .= '<div id="post-' . $show_post . '" class="' . join( ' ', get_post_class('content-page-builder')) . '">';
364
+ $out .= apply_filters('the_content', get_the_content());
365
+ $out .= "</div>\n";
366
+ }
367
+ wp_reset_query(); // undo our WP_Query
368
+ wp_reset_postdata();
369
+ } else {
370
+ $out = __('Sorry, you did not specify a SiteOrigin Page.', 'weaverx-theme-support');
371
+ }
372
+
373
+ echo $before . $out . $after;
374
+
375
+ echo $after_widget;
376
+ }
377
+
378
+ function update( $new_instance, $old_instance ) {
379
+ $instance['title'] = strip_tags( stripslashes($new_instance['title']) );
380
+ $instance['post_list'] = $new_instance['post_list'];
381
+ $post_id_string = strip_tags( stripslashes(trim($new_instance['pb_post_ID']) ));
382
+ $instance['use_post_title'] = !empty($new_instance['use_post_title']) ? 1 : 0;
383
+
384
+ $post_id = (int) $post_id_string;
385
+ if ( (string) $post_id == $post_id_string && $post_id != 0 ) {
386
+ $instance['pb_post_ID'] = $post_id_string;
387
+ } else {
388
+ $instance['pb_post_ID'] ='';
389
+ }
390
+ return $instance;
391
+ }
392
+
393
+ function form( $instance ) {
394
+ $title = isset( $instance['title'] ) ? $instance['title'] : '';
395
+ $post_list = isset( $instance['post_list'] ) ? $instance['post_list'] : '0';
396
+ $pb_post_ID = isset( $instance['pb_post_ID'] ) ? $instance['pb_post_ID'] :'';
397
+ $use_post_title = isset( $instance['use_post_title'] ) ? (bool) $instance['use_post_title'] : false;
398
+
399
+ //echo "<p>post list id: {$post_list} - specific: {$pb_post_ID} </p>\n";
400
+ ?>
401
+ <p>
402
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php echo('Title (optional):' /*a*/ ) ?></label>
403
+ <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_textarea($title); ?>" />
404
+ </p>
405
+ <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('use_post_title'); ?>" name="<?php echo $this->get_field_name('use_post_title'); ?>"<?php checked( $use_post_title ); ?> />
406
+ <label for="<?php echo $this->get_field_id('use_post_title'); ?>"><?php _e( 'Use the Title of the selected Page for widget title.' ); ?></label>
407
+ </p>
408
+
409
+ <?php
410
+
411
+ if ( $pb_post_ID ) {
412
+ echo "<p>Please clear the <em>ID of a SiteOrigin Page or Post</em> value below to show a selection list of SiteOrigin Pages.</p>\n";
413
+ } else {
414
+ $pargs = [
415
+ //'meta_key' => '_siteorigin_edit_mode',
416
+ //'meta_value' => true,
417
+ 'post_type' => 'page'
418
+ ];
419
+ $posts = get_pages($pargs);
420
+ ?>
421
+
422
+ <p>
423
+ <label for="<?php echo $this->get_field_id('post_list'); ?>"><?php echo('Select an SiteOrigin Page. (Override this selection in Page/Post field below to select Page OR Post by ID.)'); ?></label><br />
424
+ <select id="<?php echo $this->get_field_id('post_list'); ?>" name="<?php echo $this->get_field_name('post_list'); ?>">
425
+ <?php
426
+ foreach ( $posts as $post) {
427
+ if ( ! ! get_post_meta( $post->ID, 'panels_data', true ) ) {
428
+ $selected = $post_list == $post->ID ? ' selected="selected"' : '';
429
+ echo '<option'. $selected .' value="' . $post->ID .'">'. substr( $post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
430
+ }
431
+ }
432
+ ?>
433
+ </select>
434
+ </p>
435
+ <?php
436
+ }
437
+ ?>
438
+
439
+ <p>
440
+ <label for="<?php echo $this->get_field_id('pb_post_ID'); ?>"><?php echo('ID of an SiteOrigin Page or Post (overrides Selection list above):' ) ?></label>
441
+ <input type="text" size="12" id="<?php echo $this->get_field_id('pb_post_ID'); ?>" name="<?php echo $this->get_field_name('pb_post_ID'); ?>" value="<?php echo esc_textarea($pb_post_ID); ?>" />
442
+ </p>
443
+ <?php
444
+
445
+ }
446
+ }
447
+
448
+
449
 
450
  add_action("widgets_init", "wvrx_ts_load_widgets");
451
  add_filter('weaverx_text', 'do_shortcode');
455
  register_widget('WeaverX_Widget_Text');
456
  register_widget('WeaverX_Widget_PPText');
457
  register_widget('WeaverX_Widget_Login');
458
+ if (WVRX_TS_PAGEBUILDERS) :
459
+ if (defined( 'ELEMENTOR_VERSION' ) ) { // only provide if elementor is active
460
+ register_widget('Weaver_Widget_Elementor');
461
+ }
462
+ if (defined( 'SITEORIGIN_PANELS_VERSION' ) ) { // only provide if elementor is active
463
+ register_widget('Weaver_Widget_SiteOrigin');
464
+ }
465
+ endif;
466
  }
467
 
468
  ?>
readme.txt CHANGED
@@ -8,9 +8,9 @@ Author: wpweaver
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Text Domain: weaverx-theme-support
11
- Requires at least: 4.5
12
  Tested up to: 4.9
13
- Stable tag: 3.1.11
14
 
15
  A useful shortcode and widget collection for Weaver Xtreme
16
 
@@ -75,6 +75,11 @@ Support for this plugin can best be found at our forum - http://forum.weaverthem
75
  See ChangeLog for changes to this version.
76
 
77
  == ChangeLog ==
 
 
 
 
 
78
  = 3.1.11 =
79
  * Added Per Post Body Class for Single Page View
80
 
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Text Domain: weaverx-theme-support
11
+ Requires at least: 4.8
12
  Tested up to: 4.9
13
+ Stable tag: 3.2
14
 
15
  A useful shortcode and widget collection for Weaver Xtreme
16
 
75
  See ChangeLog for changes to this version.
76
 
77
  == ChangeLog ==
78
+ = 3.2 =
79
+ * New: Schema.org support - disable option
80
+ * New: tabbed per page and per post option sections!
81
+ * Fix: Main Options : Header : Site Title/Tagling menu link
82
+
83
  = 3.1.11 =
84
  * Added Per Post Body Class for Single Page View
85
 
weaverx-ts.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://weavertheme.com/plugins
5
  Description: Weaver Xtreme Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver Xtreme and Weaver Foundation themes.
6
  Author: wpweaver
7
  Author URI: http://weavertheme.com/about/
8
- Version: 3.1.11
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
@@ -21,7 +21,7 @@ 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
- 1`
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
  */
@@ -35,17 +35,24 @@ function wvrx_ts_alert($msg) {
35
  echo "<script> alert('" . esc_html($msg) . "'); </script>";
36
  }
37
 
38
- function wvrx_is_user_logged_in() {
39
- $user = wp_get_current_user();
40
 
41
- return $user->exists();
42
- }
 
43
 
44
  if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
45
 
46
- define ('WVRX_TS_VERSION','3.1.11');
47
  define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
48
- define ('WVRX_TS_APPEARANCE_PAGE', false );
 
 
 
 
 
 
 
49
 
50
 
51
  function wvrx_ts_installed() {
@@ -99,7 +106,8 @@ function wvrx_ts_add_page_fields() {
99
  add_meta_box('post-box', __('Weaver Xtreme Options For This Post' . $per_post_label,
100
  'weaverx-theme-support'), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
101
  global $post;
102
- $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
 
103
 
104
  $i = 1;
105
  $args=array( 'public' => true, '_builtin' => false );
@@ -115,13 +123,39 @@ require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); //
115
  }
116
 
117
  function wvrx_ts_page_extras_load() {
 
118
  wvrx_ts_page_extras();
119
  }
120
 
121
  function wvrx_ts_post_extras_load() {
 
122
  wvrx_ts_post_extras();
123
  }
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  //} // x-plus installed - as of V3, this is no longer needed
126
 
127
  // ======================================== subthemes ========================================
@@ -130,7 +164,6 @@ add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_acti
130
  function wvrx_ts_child_show_extrathemes_action() {
131
  return;
132
  // old code found in version before 2.0.4
133
-
134
  }
135
 
136
  add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
@@ -228,9 +261,9 @@ function wvrx_ts_scan_section($what) {
228
  if (in_array($name, $post_fields) ) {
229
  $val = $val_array[0]; // easier to work with
230
  if ($type == 'page') {
231
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Page settings.','weaverx-axtreme') . "</li>\n";
232
  } else {
233
- echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Post settings.','weaverx-axtreme') . "</li>\n";
234
  }
235
  break;
236
  }
@@ -248,4 +281,11 @@ function wvrx_check_jetpack() {
248
  wvrx_ts_alert(__('**** IMPORTANT: The Jetpack Mobile theme is active. ****\nIt is NOT compatible with Weaver Xtreme, and will break the theme. Please deactivate it from the Jetpack control panel.\n\n**** This message will continue to be displayed until you deactivate the Jetpack Mobile Theme from the Jetpack settings panel. ****', 'weaverx-theme-support'));
249
  }
250
  }
 
 
 
 
 
 
 
251
  ?>
5
  Description: Weaver Xtreme Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver Xtreme and Weaver Foundation themes.
6
  Author: wpweaver
7
  Author URI: http://weavertheme.com/about/
8
+ Version: 3.2
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
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
  */
35
  echo "<script> alert('" . esc_html($msg) . "'); </script>";
36
  }
37
 
38
+ if ( function_exists( 'weavercore_ts_installed' ) ) {
 
39
 
40
+ add_action( 'admin_notices', 'wvrx_ts_fail_xtreme_ts' );
41
+
42
+ } else
43
 
44
  if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
45
 
46
+ define ('WVRX_TS_VERSION','3.2');
47
  define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
48
+ define ('WVRX_TS_PAGEBUILDERS', false); // currently not safely implemented - will be in Weaver 4.0
49
+
50
+ if ( !defined('WEAVER_GET_OPTION')) define ('WEAVER_GET_OPTION', 'get_option');
51
+ if ( !defined('WEAVER_DELETE_OPTION')) define ('WEAVER_DELETE_OPTION', 'delete_option');
52
+ if ( !defined('WEAVER_UPDATE_OPTION')) define ('WEAVER_UPDATE_OPTION', 'update_option');
53
+
54
+ if ( !defined('WEAVER_SETTINGS_NAME')) define ('WEAVER_SETTINGS_NAME', 'weaverx_settings');
55
+
56
 
57
 
58
  function wvrx_ts_installed() {
106
  add_meta_box('post-box', __('Weaver Xtreme Options For This Post' . $per_post_label,
107
  'weaverx-theme-support'), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
108
  global $post;
109
+ $func_opt = WEAVER_GET_OPTION;
110
+ $opts = $func_opt( apply_filters('weaverx_options',WEAVER_SETTINGS_NAME) , array()); // need to fetch Weaver Xtreme options
111
 
112
  $i = 1;
113
  $args=array( 'public' => true, '_builtin' => false );
123
  }
124
 
125
  function wvrx_ts_page_extras_load() {
126
+ wvrx_ts_load_pp_scripts();
127
  wvrx_ts_page_extras();
128
  }
129
 
130
  function wvrx_ts_post_extras_load() {
131
+ wvrx_ts_load_pp_scripts();
132
  wvrx_ts_post_extras();
133
  }
134
 
135
+ function wvrx_ts_post_extras_pt() {
136
+ // special handling for non-Weaver Custom Post Types
137
+ $func_opt = WEAVER_GET_OPTION;
138
+ $opts = $func_opt( apply_filters('weaverx_options',WEAVER_SETTINGS_NAME) , array());
139
+ if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') ) {
140
+ wvrx_ts_load_pp_scripts();
141
+ wvrx_ts_post_extras();
142
+ } else {
143
+ echo '<p>' .
144
+ __('You can enable Weaver Xtreme Per Post Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaverx-theme-support' /*adm*/) .
145
+ '</p>';
146
+ }
147
+ }
148
+
149
+ function wvrx_ts_load_pp_scripts() {
150
+ // I know, this is non-standard - does not use enqueue style/script, but it is necessary to avoid conflicts with Weaver themes.
151
+ $p_url = plugins_url('/admin/assets/yetii/', __FILE__);
152
+ $vers = WVRX_TS_VERSION;
153
+ $min = WVRX_TS_MINIFY;
154
+ echo "<link rel='stylesheet' id='wvrx-ts-style' href='{$p_url}yetii-weaver{$min}.css?ver={$vers}' type='text/css' media='all' />\n";
155
+ echo "<script type='text/javascript' src='{$p_url}yetii{$min}.js?ver={$vers}'></script>\n";
156
+
157
+ }
158
+
159
  //} // x-plus installed - as of V3, this is no longer needed
160
 
161
  // ======================================== subthemes ========================================
164
  function wvrx_ts_child_show_extrathemes_action() {
165
  return;
166
  // old code found in version before 2.0.4
 
167
  }
168
 
169
  add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
261
  if (in_array($name, $post_fields) ) {
262
  $val = $val_array[0]; // easier to work with
263
  if ($type == 'page') {
264
+ echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Page settings.','weaverx-xtreme') . "</li>\n";
265
  } else {
266
+ echo "<li><strong><em>{$tlink}</em></strong> " . __('has Per Post settings.','weaverx-xtreme') . "</li>\n";
267
  }
268
  break;
269
  }
281
  wvrx_ts_alert(__('**** IMPORTANT: The Jetpack Mobile theme is active. ****\nIt is NOT compatible with Weaver Xtreme, and will break the theme. Please deactivate it from the Jetpack control panel.\n\n**** This message will continue to be displayed until you deactivate the Jetpack Mobile Theme from the Jetpack settings panel. ****', 'weaverx-theme-support'));
282
  }
283
  }
284
+
285
+ // failure actions
286
+ function wvrx_ts_fail_xtreme_ts() {
287
+ $message = esc_html__( 'You already have "Weaver Core Theme Support Plugin" installed and activated. You cannot activate both theme support plugins at the same time. "Weaver Xtreme Theme Support Plugin" is currently NOT ACTIVE.', 'weaverx-theme-support' );
288
+ $html_message = sprintf( '<div class="error"><strong>%s</strong></div>', wpautop( $message ) );
289
+ echo wp_kses_post( $html_message );
290
+ }
291
  ?>