Weaver Xtreme Theme Support - Version 4.0.2

Version Description

  • Fix/Change - Removed (for now) the Boxed easy-width layout option.
Download this release

Release Info

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

Code changes from version 4.0 to 4.0.2

admin/admin-mainopts.php CHANGED
@@ -261,8 +261,9 @@ function weaverx_mainopts_fullwidth() {
261
  array('val' => '', 'desc' => ''),
262
  array('val' => 'fullwidth', 'desc' => __('Full Width - Extends BG to full width', 'weaver-xtreme')),
263
  array('val' => 'stretched', 'desc' => __('Stretched - Expand to full width', 'weaver-xtreme')),
264
- array('val' => 'boxed', 'desc'=> __('Boxed - Traditional layout', 'weaver-xtreme')),
265
- array('val' => 'custom', 'desc' => __('Custom - Use Custom Width Options', 'weaver-xtreme'))
 
266
  ))
267
  );
268
 
261
  array('val' => '', 'desc' => ''),
262
  array('val' => 'fullwidth', 'desc' => __('Full Width - Extends BG to full width', 'weaver-xtreme')),
263
  array('val' => 'stretched', 'desc' => __('Stretched - Expand to full width', 'weaver-xtreme')),
264
+ //array('val' => 'boxed', 'desc'=> __('Boxed - Traditional layout', 'weaver-xtreme')),
265
+ //array('val' => 'custom', 'desc' => __('Custom - Use Custom Width Options', 'weaver-xtreme'))
266
+ array('val' => 'custom', 'desc' => __('Traditional - Use Traditional Width Options', 'weaver-xtreme'))
267
  ))
268
  );
269
 
includes/wvrx-ts-admin-page-posts.php DELETED
@@ -1,1637 +0,0 @@
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
22
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
23
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
24
- ) {
25
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
26
- echo '<p>' .
27
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaverx-theme-support' /*adm*/) .
28
- '</p>';
29
- else
30
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaverx-theme-support' /*adm*/) . '</p>';
31
-
32
- return; // don't show per post panel
33
- }
34
-
35
- echo("<div style=\"line-height:150%;border: 1px solid $888;list-style-type: none;\"><p>\n");
36
- if (get_the_ID() == get_option( 'page_on_front' ) ) { ?>
37
- <div style="padding:2px; border:2px solid yellow; background:#FF8;">
38
- <?php _e('Information: This page has been set to serve as your front page in the <em>Dashboard:Settings:Reading</em> \'Front page:\' option.','weaverx-theme-support' /*adm*/); ?>
39
- </div><br />
40
- <?php
41
- }
42
-
43
- if (get_the_ID() == get_option( 'page_for_posts' ) ) { ?>
44
- <div style="padding:2px; border:2px solid red; background:#FAA;">
45
- <?php _e('<strong>WARNING!</strong>
46
- You have the <em>Dashboard:Settings:Reading Posts page:</em> option set to this page.
47
- You may intend to do this, but note this means that <em>only</em> this page\'s Title will be used
48
- on the default WordPress blog page, and any content you may have entered above is <em>not</em> used.
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;
56
- }
57
-
58
- $updir = wp_upload_dir();
59
- $dir = trailingslashit($updir['basedir']) . 'weaverx-subthemes/editor-style-wvrx.css';
60
-
61
- if (!@file_exists( $dir )) { ?>
62
- <div style="padding:2px; border:2px solid red; background:#FAA;">
63
- <?php _e('<strong>Note!</strong>
64
- Please open the <em>Appearance:Weaver Xtreme Admin:Main Options</em> page and <em>Save Settings</em> to enable full editor theme match styling.','weaverx-theme-support' /*adm*/); ?>
65
- </div><br />
66
- <?php
67
- }
68
-
69
- echo '<strong>' . __('Page Templates','weaverx-theme-support' /*adm*/) . '</strong>';
70
- weaverx_help_link('help.html#PageTemplates',__('Help for Weaver Xtreme Page Templates','weaverx-theme-support' /*adm*/));
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(
238
- array('val' => '', 'desc' => __('Default Blog FI','weaverx-theme-support' /*adm*/) ),
239
- array('val' => 'content-top', 'desc' => __('With Content - top','weaverx-theme-support' /*adm*/) ),
240
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaverx-theme-support' /*adm*/) ),
241
- array('val' => 'title-before', 'desc' => __('With Title','weaverx-theme-support' /*adm*/) ),
242
- array('val' => 'title-banner', 'desc' => __('Banner above Title','weaverx-theme-support' /*adm*/) ),
243
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaverx-theme-support' /*adm*/) ),
244
- array('val' => 'post-before', 'desc' => __('Beside Page, no wrap', 'weaver-xtreme' /*adm*/) ),
245
- array('val' => 'post-bg', 'desc' => __('As BG Image, Tile', 'weaver-xtreme' /*adm*/) ),
246
- array('val' => 'post-bg-cover', 'desc' => __('As BG Image, Cover', 'weaver-xtreme' /*adm*/) ),
247
- array('val' => 'post-bg-parallax', 'desc' => __('As BG Image, Parallax', 'weaver-xtreme' /*adm*/) ),
248
- array('val' => 'hide', 'desc' => __('Hide FI for this Post','weaverx-theme-support' /*adm*/) )
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
- if (WVRX_TS_PAGEBUILDERS) :
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
- endif;
307
- weaverx_html_br(2);
308
- wvrx_ts_page_title( __('Widget Area Replacements','weaverx-theme-support' /*adm*/),80,1);
309
- ?>
310
- <p>
311
- <?php _e('Select extra widget areas to replace the default widget areas for this page.
312
- 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*/); ?>
313
- </p>
314
- <?php
315
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaverx-theme-support' /*adm*/) , 'primary-widget-area' );
316
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaverx-theme-support' /*adm*/) , 'secondary-widget-area' );
317
-
318
- wvrx_ts_pp_replacement( __('Header Widget Area','weaverx-theme-support' /*adm*/) , 'header-widget-area' );
319
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaverx-theme-support' /*adm*/) , 'footer-widget-area' );
320
-
321
- wvrx_ts_pp_replacement( __('Sitewide Top Widget Area','weaverx-theme-support' /*adm*/) , 'sitewide-top-widget-area' );
322
- wvrx_ts_pp_replacement( __('Sitewide Bottom Widget Area','weaverx-theme-support' /*adm*/) , 'sitewide-bottom-widget-area' );
323
-
324
- wvrx_ts_pp_replacement( __('Pages Top Widget Area','weaverx-theme-support' /*adm*/) , 'page-top-widget-area' );
325
- wvrx_ts_pp_replacement( __('Pages Bottom Widget Area','weaverx-theme-support' /*adm*/) , 'page-bottom-widget-area' );
326
- ?>
327
- <div style="clear:both;"></div>
328
- <?php
329
- }
330
-
331
- function wvrx_ts_page_misc_opts( $raw_template = false ) { // ------------------------------- Misc Options -------------------
332
- global $post;
333
- echo '<span style="font-weight:bold;font-size:140%;">' . __('Misc Menu, Editor, and CSS Options','weaverx-theme-support' /*adm*/) . '</span><br/>';
334
-
335
- //wvrx_ts_page_title( __('Misc Menu, Editor, and CSS Options','weaverx-theme-support' /*adm*/),80,1);
336
-
337
- wvrx_ts_page_checkbox('_pp_hide_on_menu',__('Hide Page on the default Primary Menu','weaverx-theme-support' /*adm*/),90,1);
338
-
339
- 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);
340
-
341
- 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);
342
-
343
- if (weaverx_allow_multisite()) {
344
- 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);
345
- }
346
- ?>
347
- <p>
348
- <input type="text" size="25" id="bodyclass" name="_pp_bodyclass"
349
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
350
-
351
- <?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*/); ?>
352
- </p>
353
- <?php
354
- if ( $raw_template) {
355
- echo '<p>';
356
- _e('<strong>You are using the RAW page template.</strong><br /><ol>
357
- <li>Check the "Allow Raw HTML" option above to prevent WP processing of your content for this page. If you leave it
358
- unchecked, you will get the WP paragraph and texturize processing.</li>
359
- <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>
360
- and including that HTML code in the Value for that field.</li></ol>', 'weaverx-theme-support');
361
- echo '</p>';
362
- }
363
- }
364
-
365
-
366
-
367
- function wvrx_ts_page_with_posts_opts( $raw_template, $template ) { // ------------------------------- Page with Post Options -------------------
368
- global $post;
369
- ?>
370
- <span style="font-weight:bold;font-size:120%;">
371
- <?php
372
- _e('Settings for "Page with Posts" Template','weaverx-theme-support' /*adm*/); echo "</span>";
373
- weaverx_help_link('help.html#PerPostTemplate',__('Help for Page with Posts Template','weaverx-theme-support' /*adm*/) );
374
-
375
- $template = !empty($post->page_template) ? $post->page_template : "Default Template";
376
- if (in_array($template, apply_filters('weaverx_paget_posts', array('paget-posts.php'))) ) {
377
- ?>
378
- <p>
379
- <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
380
- Use commas to separate items in lists.
381
- The settings will be combined for the final filtered list of posts displayed.
382
- (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaverx-theme-support' /*adm*/); ?>
383
- </p>
384
-
385
- <input type="text" size="30" id="_pp_category" name="_pp_category"
386
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_category", true)); ?>" />
387
- <?php _e('<em>Category</em> - Enter list of category slugs of posts to include. (-slug will exclude specified category)','weaverx-theme-support' /*adm*/); ?>
388
- <br />
389
-
390
- <input type="text" size="30" id="_pp_tag" name="_pp_tag"
391
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tag", true)); ?>" />
392
- <?php _e("<em>Tags</em> - Enter list of tag slugs of posts to include.",'weaverx-theme-support' /*adm*/); ?> <br />
393
-
394
- <input type="text" size="30" id="_pp_onepost" name="_pp_onepost"
395
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_onepost", true)); ?>" />
396
- <?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 />
397
-
398
- <input type="text" size="30" id="_pp_orderby" name="_pp_orderby"
399
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_orderby", true)); ?>" />
400
- <?php _e("<em>Order by</em> - Enter method to order posts by: author, date, title, or rand.",'weaverx-theme-support' /*adm*/); ?> <br />
401
-
402
- <input type="text" size="30" id="_pp_sort_order" name="_pp_sort_order"
403
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sort_order", true)); ?>" />
404
- <?php _e("<em>Sort order</em> - Enter ASC or DESC for sort order.",'weaverx-theme-support' /*adm*/); ?> <br />
405
-
406
- <input type="text" size="30" id="_pp_posts_per_page" name="_pp_posts_per_page"
407
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_posts_per_page", true)); ?>" />
408
- <?php _e("<em>Posts per Page</em> - Enter maximum number of posts per page.",'weaverx-theme-support' /*adm*/); ?> <br />
409
-
410
- <input type="text" size="30" id="_pp_author" name="_pp_author"
411
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_author", true)); ?>" />
412
- <?php _e('<em>Author</em> - Enter author (use username, including spaces), or list of author IDs','weaverx-theme-support' /*adm*/); ?> <br />
413
-
414
- <input type="text" size="30" id="_pp_post_type" name="_pp_post_type"
415
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_type", true)); ?>" />
416
- <?php _e('<em>Custom Post Type</em> - Enter slug of one custom post type to display','weaverx-theme-support' /*adm*/); ?> <br />
417
-
418
- <?php wvrx_ts_pwp_atw_show_post_filter(); ?>
419
-
420
- <?php wvrx_ts_pwp_type(); ?><br />
421
- <?php wvrx_ts_pwp_cols(); ?><br />
422
- <input type="text" size="5" id="_pp_fullposts" name="_pp_fullposts"
423
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_fullposts", true)); ?>" />
424
- <?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*/); ?>
425
- <br />
426
-
427
- <input type="text" size="5" id="_pp_hide_n_posts" name="_pp_hide_n_posts"
428
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_hide_n_posts", true)); ?>" />
429
- <?php echo "<em><span class=\"dashicons dashicons-visibility\"></span>" .
430
- __("Hide first \"n\" posts</em> - Start with post n+1.
431
- Useful with plugin that will display first n posts using a shortcode. (e.g., Post slider)",'weaverx-theme-support' /*adm*/) ; ?>
432
-
433
- <br /><br />
434
-
435
- <?php wvrx_ts_page_checkbox('_pp_hide_infotop',__('Hide top info line','weaverx-theme-support' /*adm*/), 40); ?>
436
- <?php wvrx_ts_page_checkbox('_pp_hide_infobottom',__('Hide bottom info line','weaverx-theme-support' /*adm*/), 40, 1); ?>
437
- <?php wvrx_ts_page_checkbox('_pp_hide_sticky',__('No special treatment for Sticky Posts','weaverx-theme-support' /*adm*/), 40); ?>
438
-
439
- <div style="clear:both;"></div>
440
-
441
- <?php
442
- } else { // NOT a page with posts
443
- ?> <p>
444
- <?php _e('<strong>Note:</strong> After you choose the "Page with Posts" template from the <em>Template</em>
445
- option in the <em>Page Attributes</em> box, <strong>and</strong> <em>Publish</em> or <em>Save Draft</em>,
446
- settings for "Page with Posts" will be displayed here. Current page template:','weaverx-theme-support' /*adm*/);
447
- echo $template; ?>
448
- </p>
449
-
450
-
451
- <?php
452
- }
453
- }
454
-
455
- if (WVRX_TS_PAGEBUILDERS) :
456
- function wvrx_ts_page_builder_opts() {
457
-
458
- global $post;
459
-
460
- echo '<span style="font-weight:bold;font-size:140%;">' . __('Page Builder Header/Footer Replacemant','weaverx-theme-support' /*adm*/) . '</span><br/>';
461
- _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*/);
462
- weaverx_html_br(2);
463
-
464
- // HEADER ----------------
465
-
466
- wvrx_ts_page_title( __('Header Area Replacement','weaverx-theme-support' /*adm*/),80,1);
467
- ?>
468
- <p>
469
- <?php
470
- $cur = get_post_meta(get_the_ID(), '_pp_pb_header_hide_menus', true);
471
- ?>
472
-
473
- <select id="_pp_pb_header_hide_menus" name="_pp_pb_header_hide_menus">
474
- <option value='' <?php echo $cur == '' ? ' selected="selected"' : '';?>><?php _e('Global Visibility','weaverx-theme-support'); ?></option>
475
- <option value='hide' <?php echo $cur == 'hide' ? ' selected="selected"' : '';?>><?php _e('Hide Menus','weaverx-theme-support'); ?></option>
476
- <option value='show' <?php echo $cur == 'show' ? ' selected="selected"' : '';?>><?php _e('Show Menus','weaverx-theme-support'); ?></option>
477
- </select>
478
- <?php _e('<em>Hide or Show Menus</em> - Select how to display menus with Header Replacement.','weaverx-theme-support'); ?>
479
- </p>
480
-
481
- <input type="text" size="10" id='_pp_fi_link' name='_pp_fi_link'
482
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_pb_header_replace_page_id', true)); ?>" />
483
- <?php _e("Specify any page or post ID to serve as header replacement. Overrides list selection below.",'weaverx-theme-support' /*adm*/); ?>
484
- <br style="clear:both;" />
485
-
486
- <?php
487
- if ( defined( 'ELEMENTOR_VERSION' ) ) : // only provide if elementor is active
488
- // Elementor selection
489
- $pargs = array (
490
- 'post_type' => 'page'
491
- );
492
- $posts = get_pages($pargs);
493
- ?>
494
- <p>
495
- <?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 />
496
- <select id="_pp_elementor_header_replacement" name="_pp_elementor_header_replacement">
497
- <option value=''>&nbsp;</option>
498
- <?php
499
- $cur = get_post_meta(get_the_ID(), '_pp_elementor_header_replacement', true);
500
- foreach ( $posts as $cur_post) {
501
- if ( ! ! get_post_meta( $cur_post->ID, '_elementor_edit_mode', true ) ) {
502
- $selected = $cur == $cur_post->ID ? ' selected="selected"' : '';
503
- echo '<option'. $selected .' value="' . $cur_post->ID .'">'. substr( $cur_post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
504
- }
505
- }
506
- ?>
507
- </select>
508
- </p>
509
- <?php
510
- endif;
511
- $posts = '';
512
- if ( defined( 'SITEORIGIN_PANELS_VERSION' ) ) : // only provide if siteorigins is active
513
-
514
- // SiteOrigin selection
515
- $pargs = array(
516
- 'post_type' => 'page'
517
- );
518
- $posts = get_pages($pargs);
519
- ?>
520
- <p>
521
- <?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 />
522
- <select id="_pp_siteorigin_header_replacement" name="_pp_siteorigin_header_replacement">
523
- <option value=''>&nbsp;</option>
524
- <?php
525
- $cur = $cur = get_post_meta(get_the_ID(), '_pp_siteorigin_header_replacement', true);;
526
- foreach ( $posts as $cur_post) {
527
- if ( ! ! get_post_meta( $cur_post->ID, 'panels_data', true ) ) {
528
- $selected = $cur == $cur_post->ID ? ' selected="selected"' : '';
529
- echo '<option'. $selected .' value="' . $cur_post->ID .'">'. substr( $cur_post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
530
- }
531
- }
532
- ?>
533
- </select>
534
- </p>
535
- <?php
536
- endif; // SiteOrigin
537
-
538
- if ( !defined( 'ELEMENTOR_VERSION' ) && !defined( 'SITEORIGIN_PANELS_VERSION' ) ) {
539
- echo '<p>';
540
- _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');
541
- echo '</p>';
542
- }
543
-
544
- // FOOTER -----------------
545
-
546
- weaverx_html_br(1);
547
- wvrx_ts_page_title( __('Footer Area Replacement','weaverx-theme-support' /*adm*/),80,1);
548
-
549
-
550
- if ( defined( 'ELEMENTOR_VERSION' ) ) : // only provide if elementor is active
551
- // Elementor selection
552
- $pargs = array(
553
- 'post_type' => 'page'
554
- );
555
- $posts = get_pages($pargs);
556
- ?>
557
- <p>
558
- <?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 />
559
- <select id="_pp_elementor_footer_replacement" name="_pp_elementor_footer_replacement">
560
- <option value=''>&nbsp;</option>
561
- <?php
562
- $cur = get_post_meta(get_the_ID(), '_pp_elementor_footer_replacement', true);
563
- foreach ( $posts as $cur_post) {
564
- if ( ! ! get_post_meta( $cur_post->ID, '_elementor_edit_mode', true ) ) {
565
- $selected = $cur == $cur_post->ID ? ' selected="selected"' : '';
566
- echo '<option'. $selected .' value="' . $cur_post->ID .'">'. substr( $cur_post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
567
- }
568
- }
569
- ?>
570
- </select>
571
- </p>
572
- <?php
573
- endif;
574
- $posts = '';
575
- if ( defined( 'SITEORIGIN_PANELS_VERSION' ) ) : // only provide if siteorigins is active
576
-
577
- // SiteOrigin selection
578
- $pargs = array(
579
- 'post_type' => 'page'
580
- );
581
- $posts = get_pages($pargs);
582
- ?>
583
- <p>
584
- <?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 />
585
- <select id="_pp_siteorigin_footer_replacement" name="_pp_siteorigin_footer_replacement">
586
- <option value=''>&nbsp;</option>
587
- <?php
588
- foreach ( $posts as $cur_post) {
589
- $cur = get_post_meta(get_the_ID(), '_pp_siteorigin_footer_replacement', true);
590
- if ( ! ! get_post_meta( $cur_post->ID, 'panels_data', true ) ) {
591
- $selected = $cur == $cur_post->ID ? ' selected="selected"' : '';
592
- echo '<option'. $selected .' value="' . $cur_post->ID .'">'. substr( $cur_post->post_title, 0, 60) .'</option>'; // make the title fit, more or less
593
- }
594
- }
595
- ?>
596
- </select>
597
- </p>
598
- <?php
599
- endif; // SiteOrigin
600
- if ( !defined( 'ELEMENTOR_VERSION' ) && !defined( 'SITEORIGIN_PANELS_VERSION' ) ) {
601
- echo '<p>';
602
- _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');
603
- echo '</p>';
604
- }
605
- echo '<div style="clear:both;"></div>';
606
- }
607
- endif;
608
-
609
-
610
- function wvrx_ts_page_xtreme_plus( $raw_template ) { // ------------------------------- Weaver Xtreme Plus -------------------
611
- global $post;
612
- echo '<h3>Weaver Xtreme Plus Per Page Options (&starf;Plus)</h3>';
613
- echo '<strong>' . __('Per Page Style','weaver-xtreme-plus') . '</strong> (&starf;Plus)' /*a*/ ;
614
-
615
- do_action('wvrx_ts_xp_perpage_style', $raw_template);
616
- }
617
-
618
-
619
-
620
- function wvrx_ts_emit_script_style() {
621
- // emit script and style for tabs
622
- ?>
623
- <script>
624
- // TABS - put in front to make show faster
625
-
626
- jQuery(document).ready(function($) { // self-defining function - for tabs shortcode
627
- // Tabs
628
- $('.wvr-tabs-nav').delegate('span:not(.wvr-tabs-current)', 'click', function() {
629
- $(this).addClass('wvr-tabs-current').siblings().removeClass('wvr-tabs-current')
630
- .parents('.wvr-tabs').find('.wvr-tabs-pane').hide().eq($(this).index()).show();
631
- });
632
- $('.wvr-tabs-pane').hide();
633
- $('.wvr-tabs-nav span:first-child').addClass('wvr-tabs-current');
634
- $('.wvr-tabs-panes .wvr-tabs-pane:first-child').show();
635
-
636
- });
637
- </script>
638
- <style type="text/css">
639
- /* Tabs */
640
- .wvr-tabs,
641
- .wvr-tabs2,
642
- .wvr-tabs3 {
643
- box-sizing: border-box;
644
- margin: 0 0 1.5em 0;
645
- background:transparent;
646
- }
647
-
648
- .wvr-tabs-style .wvr-tabs-nav,
649
- .wvr-tabs-style .wvr-tabs-nav2
650
- .wvr-tabs-style .wvr-tabs-nav3 { /* top "bar" behind tabs */
651
- padding: 0px 20px 0px 0px;
652
- margin: 0;
653
- height: 24px;
654
- background-color: transparent;
655
- }
656
-
657
- .wvr-tabs-style .wvr-tabs-nav span,
658
- .wvr-tabs-style .wvr-tabs-nav span2,
659
- .wvr-tabs-style .wvr-tabs-nav span3 { /* bg color of a tab */
660
- display: block;
661
- float: left;
662
- padding: 0 8px;
663
- height: 24px;
664
- line-height: 24px;
665
- margin-right: 1px;
666
- cursor: pointer;
667
- border-top: 1px solid #888; /* border-color */
668
- border-right: 1px solid #888;
669
- border-left: 1px solid #888;
670
- background: #ccc; /* tab-bg */
671
- position:relative;
672
- z-index: 1;
673
- }
674
-
675
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
676
- .wvr-tabs-style2 .wvr-tabs-nav2 span.wvr-tabs-current2,
677
- .wvr-tabs-style3 .wvr-tabs-nav3 span.wvr-tabs-current3 {
678
- position:relative;
679
- z-index: 3;
680
- }
681
-
682
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,
683
- .wvr-tabs-style .wvr-tabs-nav span:hover,
684
- .wvr-tabs-style2 .wvr-tabs-nav2 span.wvr-tabs-current2,
685
- .wvr-tabs-style2 .wvr-tabs-nav2 span:hover,
686
- .wvr-tabs-style3 .wvr-tabs-nav3 span.wvr-tabs-current3,
687
- .wvr-tabs-style3 .wvr-tabs-nav3 span:hover {
688
- background: #eee; /* tab-current-color */
689
- }
690
-
691
- .wvr-tabs-nav span,
692
- .wvr-tabs-nav span2,
693
- .wvr-tabs-nav span3 {
694
- box-sizing: border-box;
695
- }
696
-
697
- span.wvr-tabs-current,
698
- span.wvr-tabs-current2,
699
- span.wvr-tabs-current3 {
700
- box-sizing: content-box;
701
- }
702
-
703
- .wvr-tabs-style .wvr-tabs-pane,
704
- .wvr-tabs-style3 .wvr-tabs-pane3,
705
- .wvr-tabs-style3 .wvr-tabs-pane3 {
706
- padding: 15px;
707
- border: 1px solid #888; /* border-color */
708
- min-height: 50px; /* pane-min-height */
709
- background-color: transparent; /* pane-bg */
710
- position: relative;
711
- z-index: 2;
712
- }
713
-
714
- .wvr-tabs-panes,
715
- .wvr-tabs-panes2,
716
- .wvr-tabs-panes3 {
717
- position: relative;
718
- z-index: 2;
719
- } /* add line to tab */
720
-
721
- .wvr-tabs-panes .wvr-tabs-hide,
722
- .wvr-tabs-panes2 .wvr-tabs-hide2,
723
- .wvr-tabs-panes3 .wvr-tabs-hide3 {
724
- display: none;
725
-
726
- }
727
-
728
- .wvr-tabs-nav,
729
- .wvr-tabs-nav2,
730
- .wvr-tabs-nav3 {
731
- position: relative;
732
- z-index: 3;
733
- }
734
- </style>
735
- <?php
736
- }
737
-
738
-
739
-
740
-
741
- function wvrx_ts_page_color($opt, $msg) { // used by XPlus
742
- global $post;
743
-
744
- $pclass = 'color {hash:true, adjust:false}'; // starting with V 1.3, allow text in color pickers
745
- //echo '<span class="dashicons dashicons-admin-appearance"></span>&nbsp';
746
-
747
- ?>
748
- <label><input class="<?php echo $pclass; ?>" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>" type="text" style="width:90px"
749
- value="<?php echo esc_textarea(get_post_meta($post->ID, $opt, true)); ?>"/>
750
- <?php
751
- echo '</label>&nbsp;' . $msg ;
752
- }
753
-
754
- function wvrx_ts_simple_checkbox($opt, $msg) {
755
- global $post;
756
- ?>
757
- <label><input type="checkbox" id="<?php echo($opt); ?>" name="<?php echo($opt); ?>"
758
- <?php checked(wvrx_ts_isp_true(get_post_meta($post->ID, $opt, true))); ?> /><?php echo $msg;?></label>
759
- <?php
760
- }
761
-
762
- function wvrx_ts_page_checkbox($opt, $msg, $width = 33, $br = 0) {
763
- if ( $width != 'auto')
764
- $width = "{$width}%";
765
- ?>
766
- <div style="float:left;width:<?php echo $width; ?>"><?php wvrx_ts_simple_checkbox($opt,$msg);
767
- echo '</div>';
768
- for ($i = 0 ; $i < $br ; $i++)
769
- echo '<br class="page_checkbox" style="clear:both;" />';
770
-
771
- }
772
-
773
- function wvrx_ts_page_title($msg, $width = 33, $br = 0) {
774
- if ( $width != 'auto')
775
- $width = "{$width}%";
776
- ?>
777
- <div style="float:left;font-weight:bold;font-style:italic;width:<?php echo $width; ?>">
778
- <?php
779
- echo $msg . '</div>';
780
- for ($i = 0 ; $i < $br ; $i++)
781
- echo '<br class="page_checkbox" style="clear:both;" />';
782
-
783
- }
784
-
785
- function wvrx_ts_page_layout( $page = 'page' ) {
786
-
787
- if ( $page == 'page')
788
- $msg = __('Select <em>Sidebar Layout</em> for this page - overrides default Page layout.','weaverx-theme-support' /*adm*/);
789
- else
790
- $msg = __('Select Single Page View <em>Sidebar Layout</em> for this post - overrides default Single View layout.','weaverx-theme-support' /*adm*/);
791
-
792
- $opts = array( 'id' => '_pp_page_layout',
793
- 'info' => $msg,
794
- 'value' => array(
795
- array('val' => '', 'desc' => __('Use Default','weaverx-theme-support' /*adm*/) ),
796
- array('val' => 'right', 'desc' => __('Sidebars on Right','weaverx-theme-support' /*adm*/) ),
797
- array('val' => 'right-top', 'desc' => __('Sidebars on Right (stack top)','weaverx-theme-support' /*adm*/) ),
798
- array('val' => 'left', 'desc' => __('Sidebars on Left','weaverx-theme-support' /*adm*/) ),
799
- array('val' => 'left-top', 'desc' => __('Sidebars on Left (stack top)','weaverx-theme-support' /*adm*/) ),
800
- array('val' => 'split', 'desc' => __('Split - Sidebars on Right and Left','weaverx-theme-support' /*adm*/) ),
801
- array('val' => 'split-top', 'desc' => __('Split (stack top)','weaverx-theme-support' /*adm*/) ),
802
- array('val' => 'one-column', 'desc' => __('No sidebars, content only','weaverx-theme-support' /*adm*/) )
803
- ));
804
- wvrx_ts_pp_select_id($opts);
805
- }
806
- //--
807
-
808
-
809
-
810
- function wvrx_ts_pp_replacement( $desc, $id ) {
811
- global $post;
812
- global $wp_registered_sidebars;
813
-
814
- $id = '_' . $id;
815
-
816
- echo "\n<div style='float:left;width:40%;'><select name='{$id}' id='{$id}'> <option value=''>&nbsp;</option>\n";
817
-
818
-
819
- foreach ( (array) $wp_registered_sidebars as $key => $value ) {
820
- $area_name = $value['id']; //sanitize_title($value['name']);
821
- if ( strpos( $area_name, 'per-page-' ) !== false ) {
822
- echo ' <option value="' . $area_name . '"';
823
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $id, true) == $area_name ));
824
- echo '>' . substr($area_name,9) . "</option>\n";
825
-
826
- }
827
- }
828
- echo '</select>&nbsp;&nbsp;' . $desc . "</div>\n";
829
- }
830
- //--
831
-
832
-
833
- function wvrx_ts_pp_select_id( $value ) {
834
- global $post;
835
-
836
- if ( isset( $value['name'] ) && $value['name'] != '' )
837
- echo "\n{$value['name']}&nbsp;&nbsp;&nbsp;\n";
838
-
839
- echo "\n<select name=\"" . $value['id'] . '" id="' . $value['id'] . "\">\n";
840
-
841
- foreach ($value['value'] as $option) {
842
- if ( $option['val'] == '' ) {
843
- echo '<option value="">';
844
- } else {
845
- echo ' <option value="' . $option['val'] . '"';
846
- selected( wvrx_ts_isp_true( get_post_meta($post->ID, $value['id'], true) == $option['val'] ));
847
- echo ">";
848
- }
849
- echo $option['desc'] . "</option>\n";
850
- }
851
- echo '</select>&nbsp;' . $value['info'] . "\n";
852
- }
853
- //--
854
-
855
-
856
-
857
- function wvrx_ts_pwp_atw_show_post_filter() {
858
- // use plugin options...
859
- global $post;
860
-
861
- if ( function_exists( 'atw_showposts_installed' ) ) {
862
- $filters = atw_posts_getopt('filters');
863
-
864
- $first = true;
865
- echo '<select id="_pp_post_filter" name="_pp_post_filter" >';
866
- foreach ($filters as $filter => $val) { // display dropdown of available filters
867
- if ( $first ) {
868
- $first = false;
869
- echo '<option value="" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == '') . '>Use above post filtering options</option>';
870
- } else {
871
- echo '<option value="' . $filter .'" ' . selected(get_post_meta($post->ID, '_pp_post_filter', true) == $filter) . '>' . $val['name'] . '</option>';
872
- }
873
- }
874
- echo '</select>&nbsp;' .
875
- __('Use a Filter from <em>Weaver Show Posts Plugin</em> <strong>instead</strong> of above post selection options.','weaverx-theme-support' /*adm*/) .
876
- '<br /> <span style="margin-left:8em;"><span>' .
877
- __('(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*/) .
878
- '<br />' . '<br />';
879
- } else {
880
- _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*/); ?>
881
- <br /><br />
882
- <?php }
883
- }
884
- //--
885
-
886
-
887
-
888
- function wvrx_ts_pwp_type() {
889
- $opts = array( 'name' => __('Display posts as:','weaverx-theme-support' /*adm*/), 'id' => '_pp_wvrx_pwp_type',
890
- 'info' => __('How to display posts on this Page with Posts (Default: global Full Post/Excerpt setting)','weaverx-theme-support' /*adm*/),
891
- 'value' => array(
892
- array('val' => '', 'desc' => '&nbsp;' ),
893
- array('val' => 'full', 'desc' => __('Full post','weaverx-theme-support' /*adm*/) ),
894
- array('val' => 'excerpt', 'desc' => __('Excerpt','weaverx-theme-support' /*adm*/) ),
895
- array('val' => 'title', 'desc' => __('Title only','weaverx-theme-support' /*adm*/) ),
896
- array('val' => 'title_featured', 'desc' => __('Title + Featured Image','weaverx-theme-support' /*adm*/) )
897
- ));
898
- wvrx_ts_pp_select_id($opts);
899
- }
900
-
901
-
902
- function wvrx_ts_page_cols() {
903
-
904
- $opts = array( 'name' => '', 'id' => '_pp_page_cols',
905
- 'info' => __('Display page content in this many columns using CSS column rules.','weaverx-theme-support' /*adm*/),
906
- 'value' => array(
907
- array('val' => '', 'desc' => '&nbsp;'),
908
- array('val' => '1', 'desc' => __('1 Column','weaverx-theme-support' /*adm*/) ),
909
- array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
910
- array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ),
911
- array('val' => '4', 'desc' => __('4 Columns','weaverx-theme-support' /*adm*/) ))
912
- );
913
- wvrx_ts_pp_select_id($opts);
914
-
915
- weaverx_html_br();
916
- weaverx_html_br();
917
- }
918
-
919
-
920
- function wvrx_ts_pwp_cols() {
921
-
922
- $opts = array( 'name' => __('Display post columns:','weaverx-theme-support' /*adm*/), 'id' => '_pp_wvrx_pwp_cols',
923
- 'info' => __('Display posts in this many columns - left to right, then top to bottom','weaverx-theme-support' /*adm*/),
924
- 'value' => array(
925
- array('val' => '', 'desc' => '&nbsp;'),
926
- array('val' => '1', 'desc' => __('1 Column','weaverx-theme-support' /*adm*/) ),
927
- array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
928
- array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ) )
929
- );
930
- wvrx_ts_pp_select_id($opts);
931
-
932
- weaverx_html_br();
933
-
934
- $opts2 = array( 'name' => __('Use <em>Masonry</em> columns:','weaverx-theme-support' /*adm*/), 'id' => '_pp_pwp_masonry',
935
- 'info' => __('Use <em>Masonry</em> for multi-column display. <em>Not compatible with FI BG images.</em>','weaverx-theme-support' /*adm*/),
936
- 'value' => array(
937
- array('val' => '', 'desc' => '&nbsp;' ),
938
- array('val' => '2', 'desc' => __('2 Columns','weaverx-theme-support' /*adm*/) ),
939
- array('val' => '3', 'desc' => __('3 Columns','weaverx-theme-support' /*adm*/) ),
940
- array('val' => '4', 'desc' => __('4 Columns','weaverx-theme-support' /*adm*/) ),
941
- array('val' => '5', 'desc' => __('5 Columns','weaverx-theme-support' /*adm*/) ) )
942
- );
943
- wvrx_ts_pp_select_id($opts2);
944
-
945
- ?>
946
- <br />
947
- <?php
948
- 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);
949
- 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);
950
- }
951
-
952
-
953
- //================================================================ Per Post Options ========================================================
954
-
955
-
956
-
957
- function wvrx_ts_post_extras() {
958
- global $post;
959
- $func_opt = WEAVER_GET_OPTION;
960
- $opts = get_option( apply_filters('weaverx_options',WEAVER_SETTINGS_NAME) , array()); // need to fetch Weaver Xtreme options
961
- if ( !( current_user_can('edit_themes')
962
- || (current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per'])) // multi-site regular admin
963
- || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
964
- || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
965
- ) {
966
- echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.','weaverx-theme-support' /*adm*/) . '</p>';
967
- return; // don't show per post panel
968
- }
969
- ?>
970
- <div style="line-height:150%;border: 1px solid $888;list-style-type: none;">
971
- <p>
972
- <?php
973
- $updir = wp_upload_dir();
974
- $dir = trailingslashit($updir['basedir']) . 'weaverx-subthemes/editor-style-wvrx.css';
975
-
976
- if (!@file_exists( $dir )) { ?>
977
- <div style="padding:2px; border:2px solid red; background:#FAA;">
978
- <?php _e('<strong>Note!</strong>
979
- Please open the <em>Appearance:Weaver Xtreme Admin:Main Options</em> page and <em>Save Settings</em> to enable full editor theme match styling.','weaverx-theme-support' /*adm*/); ?>
980
- </div><br />
981
- <?php
982
- }
983
-
984
- echo '<strong>' . __('Per Post Options','weaverx-theme-support' /*adm*/) . '</strong>';
985
- weaverx_help_link('help.html#PerPage', __('Help for Per Post Options','weaverx-theme-support' /*adm*/));
986
- echo '<span style="float:right;">(' . __('This Post\'s ID: ','weaverx-theme-support' /*adm*/); the_ID() ; echo ')</span>';
987
- weaverx_html_br();
988
- _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*/);
989
- weaverx_html_br();
990
-
991
- wrvx_ts_show_post_tabs();
992
-
993
- ?>
994
- <p>
995
- <?php echo('<strong>Post Format</strong>');
996
- weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format','weaverx-theme-support' /*adm*/));
997
- weaverx_html_br();
998
- _e('Weaver Xtreme supports Post Formats. Click the ? for more info. Post Formats are set in the "Formats" option box.','weaverx-theme-support' /*adm*/);
999
- weaverx_html_br();
1000
- ?>
1001
-
1002
- </p>
1003
- <input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
1004
- <div style="clear:both;"></div>
1005
- </div>
1006
- <?php
1007
- }
1008
-
1009
- function wrvx_ts_show_post_tabs( ) {
1010
- ?>
1011
- <div id="tabwrap-per-post" style="padding-left:4px;">
1012
- <div id="tab-container-post" style="border:1px solid #888;padding: 2px 1% 2px 1%; width:97.9%;" class='yetiisub'>
1013
- <ul id="tab-container-post-nav" style="border-bottom:2px solid #999;" class='yetiisub'>
1014
- <?php
1015
- 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>');
1016
- 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>');
1017
- wvrx_ts_elink('#pp-post-misc' , __('Misc per post options', 'weaver-xtreme' /*adm*/), __('Misc Options', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
1018
- wvrx_ts_elink('#pp-post-xplus' , __('Per Post settings from Weaver Xtreme Plus.', 'weaver-xtreme' /*adm*/), __('Xtreme Plus', 'weaver-xtreme' /*adm*/),'<li>', '</li>');
1019
- ?>
1020
- </ul>
1021
-
1022
- <div id="pp-post-blog" class="tab_mainopt" > <!-- ******************* blog/archive ********************* -->
1023
- <?php
1024
- weaverx_ts_post_blog_opts( );
1025
- ?>
1026
- </div> <!-- ******************* /blog-archive ********************* -->
1027
-
1028
- <div id="pp-post-single" class="tab_mainopt" > <!-- ******************* single page ********************* -->
1029
- <?php
1030
- weaverx_ts_post_single_opts( );
1031
- ?>
1032
- </div> <!-- ******************* /single page ********************* -->
1033
-
1034
- <div id="pp-misc" class="tab_mainopt" > <!-- ******************* misc ********************* -->
1035
- <?php weaverx_ts_post_misc_opts( ); ?>
1036
- </div> <!-- ******************* /misc ********************* -->
1037
-
1038
-
1039
- <div id="pp-post-xplus" class="tab_mainopt" > <!-- ******************* X-Plus ********************* -->
1040
- <?php weaverx_ts_post_xplus_opts( );?>
1041
- </div> <!-- ******************* X-Plus ********************* -->
1042
-
1043
-
1044
- </div> <!-- #tab-container-post -->
1045
- </div> <!-- #tabwrap-per-post -->
1046
-
1047
- <script type="text/javascript">
1048
- var tabberMainOpts = new Yetii({
1049
- id: 'tab-container-post',
1050
- tabclass: 'tab_mainopt',
1051
- persist: true
1052
- });
1053
- </script>
1054
- <?php
1055
- }
1056
-
1057
-
1058
- function weaverx_ts_post_blog_opts() {
1059
- ?>
1060
- <strong><?php _e('Per Post Options when displayed on Blog or Archive-like view','weaverx-theme-support' /*adm*/); ?></strong><br /><br />
1061
-
1062
- <?php
1063
-
1064
- wvrx_ts_page_checkbox('_pp_force_post_excerpt',__('Display post as excerpt','weaverx-theme-support' /*adm*/), 40);
1065
- wvrx_ts_page_checkbox('_pp_force_post_full',__('Display as full post where normally excerpted','weaverx-theme-support' /*adm*/),55,1);
1066
-
1067
-
1068
- wvrx_ts_page_checkbox('_pp_show_post_avatar',__('Show author avatar with post','weaverx-theme-support' /*adm*/),40);
1069
- wvrx_ts_page_checkbox('_show_post_bubble',__('Show the comment bubble','weaverx-theme-support' /*adm*/), 40, 1);
1070
-
1071
- wvrx_ts_page_checkbox('_pp_hide_post_format_label',__('Hide <em>Post Format</em> label','weaverx-theme-support' /*adm*/),40);
1072
- wvrx_ts_page_checkbox('_pp_hide_post_title',__('Hide post title','weaverx-theme-support' /*adm*/),40,1);
1073
-
1074
- wvrx_ts_page_checkbox('_pp_hide_top_post_meta',__('Hide top post info line','weaverx-theme-support' /*adm*/),40);
1075
- wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta',__('Hide bottom post info line','weaverx-theme-support' /*adm*/),40,1);
1076
- 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);
1077
-
1078
- 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);
1079
- ?>
1080
- <br style="clear:both;" /><strong><p>
1081
- <?php _e('<em>Post Blog/Archive View:</em> Featured Image','weaverx-theme-support' /*adm*/); ?></strong></p>
1082
- <?php
1083
- $opts3 = array( 'id' => '_pp_post_fi_location',
1084
- 'info' => __('Override <em>Post</em> setting for where to display FI (for both excerpt and full content)','weaverx-theme-support' /*adm*/),
1085
- 'value' => array(
1086
- array('val' => '', 'desc' => __('Default Blog FI','weaverx-theme-support' /*adm*/) ),
1087
- array('val' => 'content-top', 'desc' => __('With Content - top','weaverx-theme-support' /*adm*/) ),
1088
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaverx-theme-support' /*adm*/) ),
1089
- array('val' => 'title-before', 'desc' => __('With Title','weaverx-theme-support' /*adm*/) ),
1090
- array('val' => 'title-banner', 'desc' => __('Banner above Title','weaverx-theme-support' /*adm*/) ),
1091
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaverx-theme-support' /*adm*/) ),
1092
- array('val' => 'post-before', 'desc' => __('Beside Post, no wrap', 'weaver-xtreme' /*adm*/) ),
1093
- array('val' => 'post-bg', 'desc' => __('As BG Image, Tile', 'weaver-xtreme' /*adm*/) ),
1094
- array('val' => 'post-bg-cover', 'desc' => __('As BG Image, Cover', 'weaver-xtreme' /*adm*/) ),
1095
- array('val' => 'post-bg-parallax', 'desc' => __('As BG Image, Parallax', 'weaver-xtreme' /*adm*/) ),
1096
- array('val' => 'hide', 'desc' => __('Hide FI for this Post','weaverx-theme-support' /*adm*/) )
1097
- )
1098
- );
1099
- wvrx_ts_pp_select_id($opts3);
1100
-
1101
- echo '<div style="clear:both;" /></div>';
1102
-
1103
- }
1104
-
1105
- function weaverx_ts_post_single_opts() {
1106
- global $post;
1107
- ?>
1108
- <strong><?php _e('<em>Single Page View:</em> Sidebars','weaverx-theme-support' /*adm*/); ?></strong><br /><br />
1109
-
1110
- <?php
1111
- wvrx_ts_page_layout('post');
1112
- ?>
1113
- <input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
1114
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true)); ?>" />
1115
- <?php _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)",'weaverx-theme-support' /*adm*/); ?> <br /><br />
1116
- <?php
1117
-
1118
- wvrx_ts_page_checkbox('_pp_primary-widget-area',__('Hide Primary Sidebar, Single View','weaverx-theme-support' /*adm*/),40);
1119
- wvrx_ts_page_checkbox('_pp_secondary-widget-area',__('Hide Secondary Sidebar, Single View','weaverx-theme-support' /*adm*/),40,1);
1120
-
1121
- wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area',__('Hide Sitewide Top Area, Single View','weaverx-theme-support' /*adm*/),40);
1122
- wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area',__('Hide Sitewide Bottom Area, Single View','weaverx-theme-support' /*adm*/),40,1);
1123
-
1124
- wvrx_ts_page_checkbox('_pp_top-widget-area',__('Hide Blog Top Area, Single View','weaverx-theme-support' /*adm*/),40);
1125
- wvrx_ts_page_checkbox('_pp_bottom-widget-area',__('Hide Blog Bottom Area, Single View','weaverx-theme-support' /*adm*/),40,1);
1126
-
1127
- wvrx_ts_page_checkbox('_pp_header-widget-area',__('Hide Header Area, Single View','weaverx-theme-support' /*adm*/),40);
1128
- wvrx_ts_page_checkbox('_pp_footer-widget-area',__('Hide Footer Area, Single View','weaverx-theme-support' /*adm*/),40,1);
1129
- ?>
1130
- </p>
1131
- <p><strong><?php _e('<em>Single Page View:</em> Widget Area Replacements','weaverx-theme-support' /*adm*/); ?></strong></p>
1132
- <p>
1133
- <?php _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
1134
- 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*/); ?>
1135
- </p>
1136
- <?php
1137
- wvrx_ts_pp_replacement( __('Primary Sidebar','weaverx-theme-support' /*adm*/) , 'primary-widget-area' );
1138
- wvrx_ts_pp_replacement( __('Secondary Sidebar','weaverx-theme-support' /*adm*/) , 'secondary-widget-area' );
1139
-
1140
- wvrx_ts_pp_replacement( __('Header Widget Area','weaverx-theme-support' /*adm*/) , 'header-widget-area' );
1141
- wvrx_ts_pp_replacement( __('Footer Widget Area','weaverx-theme-support' /*adm*/) , 'footer-widget-area' );
1142
-
1143
- wvrx_ts_pp_replacement( 'Sitewide Top Widget Area' , 'sitewide-top-widget-area' );
1144
- wvrx_ts_pp_replacement( 'Sitewide Bottom Widget Area' , 'sitewide-bottom-widget-area' );
1145
- ?>
1146
- <br style="clear:both;" /><p><strong><?php _e('<em>Single Page View:</em> Featured Image','weaverx-theme-support' /*adm*/); ?></strong></p>
1147
- <?php
1148
- $opts3 = array( 'id' => '_pp_fi_location',
1149
- 'info' => __('Override <em>Single Page</em> setting for where to display FI','weaverx-theme-support' /*adm*/),
1150
- 'value' => array(
1151
- array('val' => '', 'desc' => __('Default Blog FI','weaverx-theme-support' /*adm*/) ),
1152
- array('val' => 'content-top', 'desc' => __('With Content - top','weaverx-theme-support' /*adm*/) ),
1153
- array('val' => 'content-bottom', 'desc' => __('With Content - bottom','weaverx-theme-support' /*adm*/) ),
1154
- array('val' => 'title-before', 'desc' => __('With Title','weaverx-theme-support' /*adm*/) ),
1155
- array('val' => 'title-banner', 'desc' => __('Banner above Title','weaverx-theme-support' /*adm*/) ),
1156
- array('val' => 'header-image', 'desc' => __('Header Image Replacement','weaverx-theme-support' /*adm*/) ),
1157
- array('val' => 'post-before', 'desc' => __('Beside Page, no wrap', 'weaver-xtreme' /*adm*/) ),
1158
- array('val' => 'post-bg', 'desc' => __('As BG Image, Tile', 'weaver-xtreme' /*adm*/) ),
1159
- array('val' => 'post-bg-cover', 'desc' => __('As BG Image, Cover', 'weaver-xtreme' /*adm*/) ),
1160
- array('val' => 'post-bg-parallax', 'desc' => __('As BG Image, Parallax', 'weaver-xtreme' /*adm*/) ),
1161
- array('val' => 'hide', 'desc' => __('Hide FI for this Post','weaverx-theme-support' /*adm*/) )
1162
- )
1163
- );
1164
- wvrx_ts_pp_select_id($opts3);
1165
- ?>
1166
- <br />
1167
- <input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
1168
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true)); ?>" />
1169
- <?php _e("<em>Featured Image Link</em> - Full URL to override default link target from FI",'weaverx-theme-support' /*adm*/); ?>
1170
- <br style="clear:both;" />
1171
- <br />
1172
-
1173
- <?php
1174
- echo '<div style="clear:both;"/></div>';
1175
- }
1176
-
1177
-
1178
- function weaverx_ts_post_misc_opts() {
1179
- ?>
1180
-
1181
- <p>
1182
- <strong><?php _e('Post Editor Options','weaverx-theme-support' /*adm*/); ?></strong>
1183
-
1184
- <?php
1185
- 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);
1186
-
1187
- if (weaverx_allow_multisite()) {
1188
- 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);
1189
- }
1190
- ?>
1191
- </p>
1192
- <?php
1193
-
1194
- }
1195
-
1196
-
1197
- function weaverx_ts_post_xplus_opts() {
1198
-
1199
- echo '<div style="clear:both;">';
1200
- echo('<h3>Weaver Xtreme Plus Per Post Options (&starf;Plus)</h3><strong>Per Post Style</strong>' /*a*/ );
1201
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style','weaverx-theme-support' /*adm*/ ));
1202
- echo '<br />' .
1203
- __('Weaver Xtreme Plus supports optional per post CSS style rules.','weaverx-theme-support' /*adm*/);
1204
- echo '<br />';
1205
-
1206
- do_action('wvrx_ts_xp_perpoststyle');
1207
- weaverx_html_br();
1208
-
1209
- do_action('weaverxplus_add_per_post');
1210
- echo '</div>';
1211
-
1212
- }
1213
-
1214
-
1215
-
1216
-
1217
- function wvrx_ts_save_post_fields($post_id) {
1218
-
1219
- // NOTE - Update weaverx-ts.php when this changes...
1220
-
1221
- $default_post_fields = array('_pp_category', '_pp_tag', '_pp_onepost', '_pp_orderby', '_pp_sort_order',
1222
- '_pp_author', '_pp_posts_per_page', '_pp_primary-widget-area', '_pp_secondary-widget-area', '_pp_sidebar_width',
1223
- '_pp_top-widget-area','_pp_bottom-widget-area','_pp_sitewide-top-widget-area', '_pp_sitewide-bottom-widget-area',
1224
- '_pp_post_type', '_pp_hide_page_title','_pp_hide_site_title','_pp_hide_menus','_pp_hide_header_image',
1225
- '_pp_hide_footer','_pp_hide_header','_pp_hide_sticky', '_pp_force_post_full','_pp_force_post_excerpt',
1226
- '_pp_show_post_avatar', '_pp_bodyclass', '_pp_fi_link', '_pp_fi_location', '_pp_post_fi_location', '_pp_post_styles',
1227
- '_pp_hide_top_post_meta','_pp_hide_bottom_post_meta', '_pp_stay_on_page', '_pp_hide_on_menu', '_pp_show_featured_img',
1228
- '_pp_hide_infotop','_pp_hide_infobottom', '_pp_hide_visual_editor', '_pp_masonry_span2', '_show_post_bubble',
1229
- '_pp_hide_post_title', '_pp_post_add_link', '_pp_hide_post_format_label', '_pp_page_layout', '_pp_wvrx_pwp_type',
1230
- '_pp_wvrx_pwp_cols', '_pp_post_filter', '_pp_header-widget-area' ,'_pp_footer-widget-area',
1231
- '_pp_hide_page_infobar', '_pp_hide_n_posts','_pp_fullposts', '_pp_pwp_masonry','_pp_pwp_compact','_pp_pwp_compact_posts',
1232
- '_primary-widget-area', '_secondary-widget-area', '_header-widget-area', '_footer-widget-area', '_sitewide-top-widget-area',
1233
- '_sitewide-bottom-widget-area', '_page-top-widget-area', '_page-bottom-widget-area', '_pp_full_browser_height',
1234
- '_pp_page_cols', '_pp_header_full', '_pp_container_full', '_pp_footer_full','_pp_hide_footer_html','_pp_hide_header_html',
1235
- '_pp_hide_customlogo', '_pp_hide_mini_menu' , '_pp_hide_headersearch', '_pp_header_html', '_pp_footer_html',
1236
- '_pp_elementor_header_replacement', '_pp_elementor_footer_replacement', '_pp_siteorigin_header_replacement', '_pp_elementor_footer_replacement',
1237
- '_pp_pb_header_hide_menus','_pp_pb_header_replace_page_id','_pp_pb_footer_replace_page_id',
1238
-
1239
-
1240
- // Plus options
1241
- '_pp_bgcolor','_pp_color','_pp_bg_fullwidth', '_pp_lr_padding', '_pp_tb_padding', '_pp_margin', '_pp_post_class',
1242
- '_pp_bgimg', '_pp_mobile_bgimg', '_pp_parallax_height', '_pp_use_parallax', '_pp_parallax_not_wide',
1243
- '_pp_footer_add_class', '_pp_container_add_class', '_pp_content_add_class', '_pp_post_add_class',
1244
- '_pp_infobar_add_class', '_pp_wrapper_add_class', '_pp_header_add_class', '_pp_header_image_html_text',
1245
- '_pp_alt_primary_menu', '_pp_alt_secondary_menu', '_pp_alt_mini_menu', '_pp_video_active', '_pp_video_url',
1246
- '_pp_video_aspect', '_pp_video_render', '_pp_alt_theme'
1247
- );
1248
-
1249
- if (weaverx_allow_multisite()) {
1250
- array_push($default_post_fields, '_pp_raw_html');
1251
- }
1252
-
1253
- $all_post_fields = $default_post_fields;
1254
-
1255
- if (isset($_POST['post_meta'])) {
1256
- foreach ($all_post_fields as $post_field) {
1257
- if (isset($_POST[$post_field])) {
1258
- $data = $_POST[$post_field];
1259
- if ( $post_field != '_pp_post_styles')
1260
- $data = stripslashes($data); // passed via post, so strip slashes
1261
-
1262
- if (get_post_meta($post_id, $post_field) == '') {
1263
- add_post_meta($post_id, $post_field, weaverx_filter_textarea($data), true);
1264
- }
1265
- else if ($data != get_post_meta($post_id, $post_field, true)) {
1266
- update_post_meta($post_id, $post_field, weaverx_filter_textarea($data));
1267
- } else if ($data == '') {
1268
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
1269
- }
1270
- } else {
1271
- delete_post_meta($post_id, $post_field, get_post_meta($post_id, $post_field, true));
1272
- }
1273
- }
1274
- }
1275
- }
1276
-
1277
- add_action("save_post", "wvrx_ts_save_post_fields");
1278
- add_action("publish_post", "wvrx_ts_save_post_fields");
1279
-
1280
- // } end of former XP check
1281
-
1282
- // XP
1283
-
1284
- if (function_exists('weaverxplus_plugin_installed') ) :
1285
-
1286
- add_action('wvrx_ts_xp_perpage_style','wvrx_ts_xp_perpage_style_action');
1287
-
1288
- function wvrx_ts_xp_perpage_style_action($raw_template) {
1289
-
1290
- global $post;
1291
-
1292
-
1293
- weaverx_help_link('help.html#perpoststyle', __('Help for Per Page Style','weaver-xtreme-plus' /*adm*/ ));
1294
- if (!$raw_template) {
1295
- echo '<p><small>' .
1296
- __('Enter optional per page CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
1297
- Include the complete "selector {}" for each rule you define.
1298
- Custom styles will not be displayed by the Page Editor.
1299
- Example - full width page with centered, indented header, container, and footer:<br />
1300
- <code>#wrapper{max-width:100%;}
1301
- #header{width:80%;margin-left:auto;margin-right:auto;}
1302
- #container{width:80%;margin-left:auto;margin-right:auto;}
1303
- #colophon{width:80%;margin-left:auto;margin-right:auto;}</code>','weaver-xtreme-plus' /*adm*/);
1304
- } else {
1305
- echo '<p><br /><small>' .
1306
- __('Enter optional per page CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
1307
- Include the complete "selector {}" for each rule you define. Rules with no selector apply to entire page.
1308
- Custom styles will not be displayed by the Page Editor.'
1309
- ,'weaver-xtreme-plus' /*adm*/);
1310
- }
1311
- ?>
1312
- <br /><br />
1313
- <textarea class="wvrx-edit" placeholder=" " name="_pp_post_styles" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_styles", true)); ?></textarea>
1314
- </small><br /><br />
1315
- <?php
1316
-
1317
- if (!$raw_template) {
1318
- _e('<strong>Per Page Area Added Classes</strong><br />Add classes to selected wrapping areas for this page only. Useful for full width layouts - e.g. Parallax.','weaver-xtreme-plus' /*adm*/);
1319
- // 'footer', 'container', 'content', 'post', 'infobar', 'wrapper', 'header' as "_pp_{$area}_add_class"
1320
- $areas = array ('wrapper', 'header', 'infobar', 'container', 'content', 'post', 'footer');
1321
-
1322
- $afters = array ('<br />', '<span style="margin-left:4em;"></span>');
1323
- $count = 0;
1324
-
1325
- weaverx_html_br();
1326
-
1327
- foreach ( $areas as $area ) {
1328
- if ( ($count++) % 2 == 0)
1329
- $after = $afters[1];
1330
- else
1331
- $after = $afters[0];
1332
-
1333
- wvrx_ts_xp_text_option( $post->ID, "_pp_{$area}_add_class",
1334
- " <strong>{$area}</strong>", '', $after);
1335
- }
1336
- weaverx_html_br();
1337
-
1338
- // Weaver X Plus options for making horizontal bar layouts
1339
- wvrx_ts_page_color('_pp_bgcolor',__('Page BG Color','weaver-xtreme-plus'));
1340
-
1341
-
1342
- $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
1343
-
1344
- // If no menus exists, direct the user to go and create some.
1345
- if ( !$menus ) {
1346
- echo '<p>'. sprintf( 'No menus have been created yet. <a href="%s">Create some</a>.', admin_url('nav-menus.php') ) .'</p>';
1347
- } else {
1348
- ?>
1349
- <hr /><p>
1350
- <?php
1351
- _e("<strong>Replacement Menus</strong><br />You may replace one of the standard Header Menus (Primary, Secondary, or Header Mini) on this page. If there the menu hasn't been set in the Menus options, then you can set that menu for just this page.",'weaver-xtreme-plus' /*adm*/);
1352
- ?>
1353
- <br />
1354
- <label for="_pp_alt_primary_menu"><strong><?php echo('Alternate Primary Menu' /*a*/ ); ?></strong></label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1355
- <select id="_pp_alt_primary_menu" name="_pp_alt_primary_menu">
1356
- <option value=''> </option>
1357
- <?php
1358
- foreach ( $menus as $menu ) {
1359
- $selected = get_post_meta($post->ID, "_pp_alt_primary_menu", true) == $menu->term_id ? ' selected="selected"' : '';
1360
- echo '<option'. $selected .' value="'. $menu->term_id .'">'. $menu->name .'</option>';
1361
- }
1362
- ?>
1363
- </select>
1364
-
1365
- <br /><label for="_pp_alt_secondary_menu"><strong><?php echo('Alternate Secondary Menu' /*a*/ ); ?></strong></label> &nbsp;&nbsp;&nbsp;
1366
- <select id="_pp_alt_secondary_menu" name="_pp_alt_secondary_menu">
1367
- <option value=''> </option>
1368
- <?php
1369
- foreach ( $menus as $menu ) {
1370
- $selected = get_post_meta($post->ID, "_pp_alt_secondary_menu", true) == $menu->term_id ? ' selected="selected"' : '';
1371
- echo '<option'. $selected .' value="'. $menu->term_id .'">'. $menu->name .'</option>';
1372
- }
1373
- ?>
1374
- </select>
1375
- <br /><label for="_pp_alt_mini_menu"><strong><?php echo('Alternate Header Mini Menu' /*a*/ ); ?></strong></label> &nbsp;
1376
- <select id="_pp_alt_mini_menu" name="_pp_alt_mini_menu">
1377
- <option value=''> </option>
1378
- <?php
1379
- foreach ( $menus as $menu ) {
1380
- $selected = get_post_meta($post->ID, "_pp_alt_mini_menu", true) == $menu->term_id ? ' selected="selected"' : '';
1381
- echo '<option'. $selected .' value="'. $menu->term_id .'">'. $menu->name .'</option>';
1382
- }
1383
- ?>
1384
- </select>
1385
- </p>
1386
- <?php
1387
- }
1388
- echo '<p>';
1389
- _e("<strong>Alternate Subtheme</strong><br />You may specify an alternate Weaver Xtreme subtheme that you have saved on your host filesystem for this page. See Legacy Weaver Xtreme Admin : Save/Restore tab to save a subtheme.",'weaver-xtreme' /*adm*/);
1390
-
1391
- echo '<br /><br />';
1392
- if (version_compare( WEAVER_XPLUS_VERSION, '3.1', '>=')) {
1393
- _e('<em>Please select a previously saved theme settings file (either .wxt or .wxb).</em>','weaver-xtreme');
1394
- _e('Note: This page will still use the default site subtheme settings to display in the Page Editor (i.e., on this screen).','weaver-xtreme');
1395
-
1396
- // build the theme file list
1397
- $themes = wvrx_ts_get_alt_themes();
1398
- ?>
1399
- <br />
1400
-
1401
- <label for="_pp_alt_theme"><strong><?php echo('Alternate Subtheme for this Page: ' /*a*/ ); ?></strong></label> &nbsp;
1402
- <select id="_pp_alt_theme" name="_pp_alt_theme">
1403
- <option value=''> </option>
1404
- <?php
1405
- foreach ( $themes as $subtheme ) {
1406
- $selected = get_post_meta($post->ID, "_pp_alt_theme", true) == $subtheme ? ' selected="selected"' : '';
1407
- echo '<option'. $selected .' value="'. $subtheme .'">'. $subtheme .'</option>';
1408
- }
1409
- ?>
1410
- </select>
1411
- <?php
1412
-
1413
-
1414
- } else {
1415
- _e('<em>This option requires Weaver Xtreme Plus version 3.1 or greater.</em>','weaver-xtreme');
1416
- }
1417
-
1418
-
1419
- echo '<br /><hr /><span style="clear:both;"/></span><strong>' . __('Header Image Replacement HTML','weaver-xtreme-plus') . '</strong> (&starf;Plus)' ;
1420
- ?>
1421
- </p>
1422
- <p>
1423
- <?php
1424
- if (version_compare( WEAVER_XPLUS_VERSION, '2.90', '>=')) :
1425
- _e('Replace Header image with arbitrary HTML for this page only. Useful for slider shortcodes in place of image. FI as Header Image has priority over HTML replacement. This will work with [show_slider] or almost any other slider that supports a shortcode.', 'weaver-xtreme' /*adm*/)
1426
- ?>
1427
- <textarea class="wvrx-edit" placeholder=" " name="_pp_header_image_html_text" rows=1 style="width: 95%"><?php echo(get_post_meta($post->ID, '_pp_header_image_html_text', true)); ?></textarea>
1428
- <?php endif; // new version ?>
1429
- </p>
1430
- <?php
1431
- echo '<span style="clear:both;"/></span><strong>' . __('Header Video Options','weaver-xtreme-plus') . '</strong> (&starf;Plus)';
1432
-
1433
- $showopts = array(
1434
- array('val' => '', 'desc' => __('Default: only if this page is the front page','weaver-xtreme-plus')),
1435
- array('val' => 'yes', 'desc' => __('Yes','weaver-xtreme-plus')),
1436
- array('val'=> 'no', 'desc' => __('Never','weaver-xtreme-plus')));
1437
- $aspectopts = array(
1438
- array('val' => '', 'desc' => __('Global Aspect Ratio', 'weaver-xtreme')),
1439
- array('val' => '16:9', 'desc' => __('16:9 HDTV', 'weaver-xtreme')),
1440
- array('val' => '4:3', 'desc' => __('4:3 Std TV', 'weaver-xtreme')),
1441
- array('val' => '3:2', 'desc' => __('3:2 35mm Photo', 'weaver-xtreme')),
1442
- array('val' => '5:3', 'desc' => __('5:3 Alternate Photo', 'weaver-xtreme')),
1443
- array('val' => '64:27', 'desc' => __('2.37:1 Cinemascope', 'weaver-xtreme')),
1444
- array('val' => '37:20', 'desc' => __('1.85:1 VistaVision', 'weaver-xtreme')),
1445
- array('val' => '3:1', 'desc' => __('3:1 Banner', 'weaver-xtreme')),
1446
- array('val' => '4:1', 'desc' => __('4:1 Banner', 'weaver-xtreme')),
1447
- array('val' => '9:16', 'desc' => __('9:16 Vertical HD (Please avoid!)', 'weaver-xtreme')));
1448
- $renderopts = array(
1449
- array('val' => '', 'desc' => __('Global Rendering Setting', 'weaver-xtreme')),
1450
- array('val' => 'has-header-video', 'desc' => __('As video in header only', 'weaver-xtreme')),
1451
- array('val' => 'has-header-video-cover', 'desc' => __('As full cover Parallax BG Video', 'weaver-xtreme')),
1452
- array('val' => 'has-header-video-none', 'desc' => __('Disable Header Video', 'weaver-xtreme' /*adm*/))
1453
-
1454
- );
1455
- ?>
1456
- <p><label for='_pp_video_active'><strong><?php echo('Display Video on This Page:' /*a*/ ); ?></strong></label> &nbsp;
1457
- <select id='_pp_video_active' name='_pp_video_active'>
1458
- <?php
1459
- foreach ( $showopts as $opt ) {
1460
- $selected = get_post_meta($post->ID, '_pp_video_active', true) == $opt['val'] ? ' selected="selected"' : '';
1461
- echo '<option'. $selected .' value="'. $opt['val'] .'">'. $opt['desc'] .'</option>';
1462
- }
1463
- ?>
1464
- </select>
1465
- </p>
1466
- <p><label for='_pp_video_url'><strong><?php echo('Video URL for This Page:' /*a*/ ); ?></strong></label> &nbsp;
1467
- <textarea class="wvrx-edit" placeholder=" " name='_pp_video_url' rows=1 style="width: 45%"><?php echo(get_post_meta($post->ID, '_pp_video_url', true)); ?></textarea>
1468
- <?php
1469
- if (!has_header_video() && get_post_meta($post->ID, '_pp_video_url', true)) { ?>
1470
- <br /><strong>
1471
- <em style="color:red;">
1472
- IMPORTANT: There is NO Header Video set on the <u>Customizer : Images : Header Media (Content)</u> menu. Please set one.</em>
1473
- Due to current restrictions with the WordPress Header Media video implementation,
1474
- you MUST always define some Header Video selection in that menu, even if you are specifying an alternative Per Page Video URL here.
1475
- We think this is a flaw in the WP core, and have requested that the restriction be removed in the future.</strong>
1476
- <?php } ?>
1477
- </p>
1478
- <p>
1479
- <label for='_pp_video_aspect'><strong><?php echo('Aspect Ratio:' /*a*/ ); ?></strong></label> &nbsp;
1480
- <select id='_pp_video_aspect' name='_pp_video_aspect'>
1481
- <?php
1482
- foreach ( $aspectopts as $opt ) {
1483
- $selected = get_post_meta($post->ID, '_pp_video_aspect', true) == $opt['val'] ? ' selected="selected"' : '';
1484
- echo '<option'. $selected .' value="'. $opt['val'] .'">'. $opt['desc'] .'</option>';
1485
- }
1486
- ?>
1487
- </select> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1488
-
1489
- <label for='_pp_video_render'><strong><?php echo('Header Video Rendering:' /*a*/ ); ?></strong></label> &nbsp;
1490
- <select id='_pp_video_render' name='_pp_video_render'>
1491
- <?php
1492
- foreach ( $renderopts as $opt ) {
1493
- $selected = get_post_meta($post->ID, '_pp_video_render', true) == $opt['val'] ? ' selected="selected"' : '';
1494
- echo '<option'. $selected .' value="'. $opt['val'] .'">'. $opt['desc'] .'</option>';
1495
- }
1496
- ?>
1497
- </select>
1498
- </p>
1499
- <div style="clear:both"></div>
1500
- <hr />
1501
- <p style="line-height:1.3em;">
1502
- <?php echo('<strong>Per Page Code Insertion</strong>' /*a*/ );
1503
- weaverx_help_link('help.html#ExtraPP', 'Help for Extra Per Page Options');
1504
- ?>
1505
- Weaver Xtreme Plus supports code and HTML insertion for some areas. To add code, manually define the specified
1506
- <em>Custom Field Name</em> and <em>Value</em>. Click the help ? for more details.
1507
- </p>
1508
-
1509
- <?php
1510
- }
1511
- } // end of action function
1512
-
1513
- function wvrx_ts_get_alt_themes() {
1514
- $themes = array();
1515
- $upload_dir = wp_upload_dir();
1516
- $theme_dir = trailingslashit( $upload_dir['basedir'] ) . 'weaverx-subthemes/';
1517
- if( $media_dir = opendir($theme_dir) ) {
1518
- while ($m_file = readdir($media_dir)) {
1519
- $len = strlen($m_file);
1520
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
1521
- if($ext == '.wxt' || $ext == '.wxb' ) {
1522
- $themes[] = $m_file;
1523
- }
1524
- }
1525
- }
1526
- return $themes;
1527
- }
1528
-
1529
- add_action( 'wvrx_ts_xp_perpoststyle', 'wvrx_ts_xp_perpoststyle_action' );
1530
-
1531
- function wvrx_ts_xp_perpoststyle_action() {
1532
- global $post;
1533
-
1534
- echo '<br />' .
1535
- __('Enter optional per post CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
1536
- Include the {}\'s. Don\'t use class names if rules apply to whole post, but do include class names
1537
- (e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.','weaver-xtreme-plus' /*adm*/); ?>
1538
- <br />
1539
- <textarea placeholder=" " class="wvrx-edit" name="_pp_post_styles" rows=2 style="width: 95%"><?php echo(get_post_meta($post->ID, "_pp_post_styles", true)); ?></textarea>
1540
-
1541
- <br /><input type="text" size="24" id="_pp_post_class" name="_pp_post_class"
1542
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_post_class", true)); ?>" />&nbsp;
1543
- <?php _e('Add Classes to this post','weaver-xtreme-plus' /*adm*/); ?>
1544
- <br />
1545
- <input type="text" size="24" id="bodyclass" name="_pp_bodyclass"
1546
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_bodyclass", true)); ?>" />
1547
-
1548
- <?php _e('<em>Per Post body Class</em> - CSS class name to add to HTML &lt;body&gt; block when this post is displayed on Single Page.','weaverx-theme-support' /*adm*/); ?>
1549
- <br />
1550
- <?php
1551
- // Weaver X Plus options for making horizontal bar layouts
1552
- echo '<small>';
1553
- _e('<em>Note:</em> The following options are especially useful for creating full-width stacked posts with different BG colors using the RAW page template and the Weaver Show Posts plugin.', 'weaver-xtreme-plus' /*adm*/); echo '</small><br />';
1554
- wvrx_ts_page_color('_pp_bgcolor',__('Post BG Color','weaver-xtreme-plus')); echo '<span style="margin-left:40px;"></span>';
1555
- wvrx_ts_page_color('_pp_bg_fullwidth',__('Extend BG color to full theme width on Desktop View','weaver-xtreme-plus' /*adm*/));
1556
- echo '<br />';
1557
- wvrx_ts_page_color('_pp_color',__('Post Text Color','weaver-xtreme-plus'));
1558
- ?>
1559
- <br />
1560
- <input type="text" size="4" id="_pp_lr_padding" name="_pp_lr_padding"
1561
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_lr_padding", true)); ?>" />
1562
- <?php _e('em &nbsp;- Left and Right Padding for post','weaver-xtreme-plus' /*adm*/); ?>
1563
-
1564
- <input style="margin-left:3em;" type="text" size="4" id="_pp_tb_padding" name="_pp_tb_padding"
1565
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_tb_padding", true)); ?>" />
1566
- <?php _e('em &nbsp;- Top and Bottom Padding for post','weaver-xtreme-plus' /*adm*/); ?>
1567
- <br /><input type="text" size="11" id="_pp_margin" name="_pp_margin"
1568
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_margin", true)); ?>" />&nbsp;
1569
- <?php _e('Margins - Use CSS "margin:t r b l" notation. Recommended 0 for stacked posts.','weaver-xtreme-plus' /*adm*/); ?>
1570
- <br /><br />
1571
-
1572
-
1573
- <?php _e('<em><strong>Background Image</strong></em> - Full URL for BG image - add <code>background: position/size repeat origin clip attachment</code> options to Per Post Style above in class-less {} rule. Example: <code>{background-repeat: no-repeat;}</code>','weaver-xtreme-plus' /*adm*/); ?><br />
1574
- <input type="text" size="70" id='_pp_bgimg' name='_pp_bgimg'
1575
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_bgimg', true)); ?>" />
1576
- &nbsp;: <?php _e('<strong>Desktop BG Image URL</strong>','weaver-xtreme-plus' /*adm*/); ?><br />
1577
- <input type="text" size="70" id='_pp_mobile_bgimg' name='_pp_mobile_bgimg'
1578
- value="<?php echo esc_textarea(get_post_meta($post->ID, '_pp_mobile_bgimg', true)); ?>" />
1579
- &nbsp;: <?php _e('<strong>Mobile BG Image URL</strong> - optional','weaver-xtreme-plus' /*adm*/); ?><br />
1580
-
1581
- <p><strong><?php _e('<em>Parallax</em> ','weaver-xtreme-plus' /*adm*/); ?></strong>
1582
- <?php weaverxplus_help_link('plus-help.html#parallax', __('Help for Parallax','weaver-xtreme-plus' /*adm*/ )); ?><br />
1583
- <?php _e('You can make a set of posts into a great looking Parallax page using a common tag/category,
1584
- custom BG images, and Page with Posts or [show_posts]. Create custom content to be displayed
1585
- over the BG image by creating a Manual Excerpt for this post. Do <em>not</em> specify any background
1586
- CSS options for the Parallax BG image. See Parallax Help!','weaver-xtreme-plus' /*adm*/) ?>
1587
- <br />
1588
- <?php
1589
- wvrx_ts_page_checkbox('_pp_use_parallax',__('Make this Post a Parallax post','weaver-xtreme-plus' /*adm*/));
1590
- wvrx_ts_page_checkbox('_pp_parallax_not_wide',__('Do <em>not</em> make BG image full width of enclosing area.','weaver-xtreme-plus' /*adm*/),'auto',1);
1591
-
1592
- ?>
1593
-
1594
- <input type="text" size="4" id="_pp_parallax_height" name="_pp_parallax_height"
1595
- value="<?php echo esc_textarea(get_post_meta($post->ID, "_pp_parallax_height", true)); ?>" />
1596
- <?php _e('px &nbsp;- Specify visible height of Parallax image. (Default:400px)','weaver-xtreme-plus' /*adm*/); ?>
1597
- </p>
1598
- <?php
1599
-
1600
- if (version_compare( WEAVER_XPLUS_VERSION, '2.90', '>=')) :
1601
-
1602
- echo '<hr /><br style="clear:both;"/><strong>' . __('Header Image Replacement HTML','weaver-xtreme-plus') . '</strong> (&starf;Plus)' /*a*/ ;
1603
- ?>
1604
- </p><p>
1605
- <?php
1606
- _e('Replace Header image with arbitrary HTML for this post single page view only. Useful for slider shortcodes in place of image. FI as Header Image has priority over HTML replacement. This will work with [show_slider] or almost any other slider that supports a shortcode.', 'weaver-xtreme' /*adm*/)
1607
- ?>
1608
- <textarea class="wvrx-edit" placeholder=" " name="_pp_header_image_html_text" rows=1 style="width: 95%"><?php echo(get_post_meta($post->ID, '_pp_header_image_html_text', true)); ?></textarea>
1609
- </p>
1610
- <?php endif; // new version ?>
1611
- <hr />
1612
- <p style="line-height:1.3em;">
1613
- <?php echo('<strong>Per Page Code Insertion for Single Page View</strong>' /*a*/ );
1614
- weaverx_help_link('help.html#ExtraPP', 'Help for Extra Per Page Options');
1615
- ?>
1616
- Weaver Xtreme Plus supports code and HTML insertion for some areas of the Post Single View page. To add code, manually define the specified
1617
- <em>Custom Field Name</em> and <em>Value</em>. Click the help ? for more details.
1618
- </p>
1619
-
1620
- <?php
1621
- }
1622
-
1623
-
1624
-
1625
- //-----------------------------------
1626
-
1627
-
1628
-
1629
- // ---- functions for XPlus only
1630
-
1631
- function wvrx_ts_xp_text_option( $postid, $optid, $msg, $before = '', $after = '' ) {
1632
- $val = esc_textarea(get_post_meta($postid, $optid, true));
1633
- echo "{$before}<input type='text' size='20' id='{$optid}' name='{$optid}' value='{$val}' />&nbsp; {$msg}{$after}";
1634
- }
1635
- endif;
1636
-
1637
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wvrx-ts-editor-style.php ADDED
@@ -0,0 +1,659 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // ======================================= MCE CSS FILE GENERATION ================================
3
+
4
+ /**
5
+ * Generate and save mcecss and Gutenberg style file.
6
+ *
7
+ * This function generates custom CSS files for the tinyMCE and Gutenberg editors. It allows the
8
+ * editors to display close to WYSIWYG viewing in the visual editors.
9
+ *
10
+ * @since 3.0
11
+ * @since 4.0 for Gutenberg
12
+ *
13
+ * @param string $usename - name of the css file to save to
14
+ * @param string $editor - mce or gutenberg
15
+ *
16
+ * @uses - weaverx_ts_output_edit_style to generate the css
17
+ *
18
+ */
19
+ function weaverx_ts_save_editor_css( $usename, $editor ) {
20
+
21
+ if (!current_user_can( 'edit_theme_options' ) ) {
22
+ return;
23
+ }
24
+
25
+ $save_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes';
26
+ $save_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes';
27
+
28
+
29
+
30
+ $theme_dir_exists = wp_mkdir_p($save_dir); // direct to wp mkdir
31
+ if (!$theme_dir_exists) {
32
+ weaverx_f_file_access_fail(__('Unable to create directory to save editor style file. Probably a file system permission problem. Directory', 'weaver-xtreme' /*adm*/) . $save_dir);
33
+ return;
34
+ }
35
+
36
+ $theme_dir_writable = $theme_dir_exists;
37
+
38
+ if (!@is_writable($save_dir)) { // direct php access
39
+ weaverx_f_file_access_fail(__('Directory not writable to save editor style file. Probably a file system permission problem. Directory: ', 'weaver-xtreme' /*adm*/) . $save_dir);
40
+ return;
41
+ }
42
+
43
+ $filename = $save_dir . '/'. $usename; // we will add txt
44
+
45
+ if (!$theme_dir_writable || !$theme_dir_exists || !($handle = fopen($filename, 'w')) ) { // Direct php
46
+ weaverx_f_file_access_fail(__('Unable to create editor style file. Probably a file system permission problem. File: ', 'weaver-xtreme' /*adm*/) . $filename);
47
+ return;
48
+ }
49
+
50
+ ;
51
+ fwrite($handle, weaverx_ts_output_edit_style( $editor )); // this is where the real work happens
52
+
53
+ if (!fclose($handle)) {
54
+ weaverx_f_file_access_fail(__('Unable to create editor css file. Probably a file system permission problem. File: ', 'weaver-xtreme' /*adm*/) . $filename);
55
+ return '';
56
+ }
57
+
58
+ return $save_url . '/' . $usename;
59
+ }
60
+ //--
61
+
62
+ /**
63
+ * The following two actions are invoked to generate the custom WP editor (tinyMCE or Gutenberg) CSS
64
+ *
65
+ * We will always generate both versions since it doesn't hurt to have them even if they don't get used.
66
+ *
67
+ * @since: 4.0
68
+ *
69
+ */
70
+ function weaverx_ts_save_mcecss() {
71
+ weaverx_ts_save_editor_css( 'editor-style-wvrx.css', 'mce' ); // generate mce version
72
+ }
73
+
74
+ add_action('weaverx_save_mcecss', 'weaverx_ts_save_mcecss'); // theme support plugin saved editor css in file
75
+
76
+ function weaverx_ts_save_gutenberg_css() {
77
+ weaverx_ts_save_editor_css( 'gutenberg-editor-style-wvrx.css', 'gutenberg' ); // generate gutenberg version
78
+ }
79
+
80
+ add_action('weaverx_save_gutenberg_css', 'weaverx_ts_save_gutenberg_css'); // theme support plugin saved editor css in file
81
+
82
+ /**
83
+ * Get option value for content cascade
84
+ *
85
+ * @since: 4.0
86
+ *
87
+ */
88
+ function weaverx_t_get_cascade_opt( $option, $default ) {
89
+ // we need to get the option from the wrapper -> container -> content CSS cascade
90
+
91
+ $val = weaverx_getopt_default("content{$option}", $default); // content 1st
92
+ if ( $val != $default )
93
+ return $val;
94
+ $val = weaverx_getopt_default("container{$option}", $default ); // then container
95
+ if ( $val != $default )
96
+ return $val;
97
+ return weaverx_getopt_default("wrapper{$option}", $default); // wrapper or default last
98
+ }
99
+ //--
100
+
101
+ /**
102
+ * Set the font size multiplier for title fonts
103
+ *
104
+ * @since 4.0
105
+ *
106
+ * @param string $font_size The name of the font size
107
+ *
108
+ * @returns float The title font multiplier
109
+ *
110
+ */
111
+ function weaverx_ts_fontsize_mult( $font_size, $type = 'standard' ) {
112
+ // font multiplier for titles
113
+ // uses same font size tags as normal, but with different multipliers
114
+
115
+ switch ( $font_size ) { // find conversion factor
116
+ case 'xxs-font-size':
117
+ $title_fontmult = 0.875;
118
+ $std_fontmult = 0.625;
119
+ break;
120
+ case 'xs-font-size':
121
+ $title_fontmult = 1;
122
+ $std_fontmult = 0.75;
123
+ break;
124
+ case 's-font-size':
125
+ $title_fontmult = 1.25;
126
+ $std_fontmult = 0.875;
127
+ break;
128
+ case 'm-font-size':
129
+ $title_fontmult = 1.5;
130
+ $std_fontmult = 1.0;
131
+ break;
132
+ case 'l-font-size':
133
+ $title_fontmult = 1.875;
134
+ $std_fontmult = 1.125;
135
+ break;
136
+ case 'xl-font-size':
137
+ $title_fontmult = 2.25;
138
+ $std_fontmult = 1.25;
139
+ break;
140
+ case 'xxl-font-size':
141
+ $title_fontmult = 2.625;
142
+ $std_fontmult = 1.5;
143
+ break;
144
+ default:
145
+ $title_fontmult = 2.25;
146
+ $std_fontmult = 1;
147
+ break;
148
+ }
149
+
150
+ if ( $type == 'standard')
151
+ return $std_fontmult;
152
+ return $title_fontmult;
153
+ }
154
+
155
+
156
+ /**
157
+ * Generate the CSS for the tinyMCE and Gutenberg fixup CSS files.
158
+ *
159
+ * This function does all the work to generate tinyMCE or gutenberg specific editor CSS
160
+ * so the editor's visual mode matches the actual styling to match the theme's styling.
161
+ *
162
+ * @since 4.0
163
+ *
164
+ * @param string #editor The name of the editor to generate CSS for
165
+ *
166
+ * @returns string The generated CSS
167
+ *
168
+ * @todo @@@@@ Add content header (h1-h6) styling
169
+ *
170
+ */
171
+ function weaverx_ts_output_edit_style( $editor='mce' ) {
172
+
173
+ $put = sprintf("/* WARNING: Do not edit this file. It is dynamically generated. Any edits you make will be overwritten. */
174
+ /* This file generated using %s %s subtheme: %s */\n",WEAVERX_THEMENAME, WEAVERX_VERSION, weaverx_getopt('themename'));
175
+
176
+ if ($editor == 'mce') {
177
+ $content_body = '.mceContentBody ';
178
+ $selector = ".mce-content-body,body";
179
+ $selector_tr = ".mce-content-body,body,tr,td,label,th,thead th";
180
+ $selector_font = $selector_tr;
181
+ $selector_bg = $selector;
182
+ } else {
183
+ $content_body = '.mce-content-body ';
184
+ $selector = ".mce-content-body, *[class^='wp-block-'],.mce-content-body p ";
185
+ $selector_tr = ".mce-content-body,.mce-content-body *[class^='wp-block-'],.mce-content-body p,.mce-content-body tr,.mce-content-body td,.mce-content-body label,.mce-content-body th,.mce-content-body thead th ";
186
+ $selector_font = $selector_tr . ',.editor-block-list__block:not(.is-multi-selected) .wp-block-paragraph';
187
+ $selector_bg = '.edit-post-visual-editor';
188
+ }
189
+
190
+
191
+
192
+ // ====== WIDTHS ======
193
+
194
+
195
+ if ( ( $twidth = weaverx_getopt_default( 'theme_width_int', WEAVERX_THEME_WIDTH ) ) ) {
196
+ /* figure out a good width - we will please most of the users, most of the time
197
+ We're going to assume that mostly people will use the default layout -
198
+ we can't actually tell if the editor will be for a page or a post at this point.
199
+ And let's just assume the default sidebar widths.
200
+ */
201
+
202
+
203
+
204
+ if ( $editor == 'mce') {
205
+ // calculate theme width based on default layout and width of sidebars.
206
+ $sb_layout = weaverx_getopt_default('layout_default', 'right');
207
+ switch ( $sb_layout ) {
208
+ case 'left':
209
+ case 'left-top':
210
+ $sb_width = weaverx_getopt_default( 'left_sb_width_int', 25 );
211
+ break;
212
+ case 'split':
213
+ case 'split-top':
214
+ $sb_width = weaverx_getopt_default( 'left_split_sb_width_int', 25 )
215
+ + weaverx_getopt_default( 'right_split_sb_width_int', 25 );
216
+ break;
217
+ case 'one-column':
218
+ $sb_width = 0;
219
+ break;
220
+ default: // right
221
+ $sb_width = weaverx_getopt_default( 'right_sb_width_int', 25 );
222
+ break;
223
+ }
224
+
225
+ $content_w = $twidth - ( $twidth * (float)( $sb_width / 95.0 ) ); // .95 by trial and error
226
+
227
+ $put .= "html {$content_body}{max-width:96%;width:" . $content_w . "px;}\n";
228
+ $put .= "#content html {$content_body} {max-width:96%;width:96%;}\n";
229
+ } else {
230
+ $put .= "@media screen and ( min-width: 770px ) {
231
+ .edit-post-visual-editor .editor-post-title,.edit-post-visual-editor .editor-block-list__block{max-width:{$twidth}px;}}\n";
232
+ }
233
+ }
234
+
235
+ // ====== FONTS ======
236
+
237
+ // ** FONT FAMILY
238
+
239
+ $font_family = weaverx_t_get_cascade_opt('_font_family', 'inherit');
240
+
241
+ if ( $font_family != 'inherit' ) { // found a font {
242
+ // these are not translatable - the values are used to define the actual font definition
243
+
244
+ $fonts = weaverx_ts_get_font_family();
245
+
246
+ if ( isset($fonts[$font_family]) ) {
247
+ $font = $fonts[$font_family];
248
+ } else {
249
+ $font = "Arial,'Helvetica Neue',Helvetica,sans-serif"; // fallback
250
+ // scan Google Fonts
251
+ $gfonts = weaverx_getopt_array('fonts_added');
252
+ if ( !empty($gfonts) ) {
253
+ foreach ($gfonts as $gfont) {
254
+ $slug = sanitize_title($gfont['name']);
255
+ if ( $slug == $font_family ) {
256
+ $font = str_replace('font-family:','',$gfont['family']);//'Papyrus';
257
+ break;
258
+ }
259
+ }
260
+ }
261
+ }
262
+ $put .= "{$selector_font}{font-family:{$font};}\n";
263
+ if ( $editor == 'gutenberg' )
264
+ $put .= ".wp-block-heading {font-family:{$font};}\n"; // override Gutenberg defaults for 1-3
265
+ }
266
+
267
+
268
+ // ** FONT SIZE **
269
+
270
+ if (($base_font_px = weaverx_getopt('site_fontsize_int')) == '' )
271
+ $base_font_px = 16;
272
+ $base_font_px = (float)$base_font_px;
273
+
274
+ $font_size = weaverx_t_get_cascade_opt('_font_size', 'default');
275
+
276
+ $fontmult = weaverx_ts_fontsize_mult( $font_size, 'standard' );
277
+
278
+ $em_font_size = ( $base_font_px / 16.0) * $fontmult ;
279
+ $put .= "{$selector_font}{font-size:" . $em_font_size . "em;}\n";
280
+
281
+
282
+ // ** FONT STYLE / WEIGHT **
283
+ // valusew will be 'on' or 'off' or '', unless checkbox
284
+ // wrapper_bold, wrapper_italic, container_bold, container_italic, content_bold, content_italic, page_title_italic, page_title_nomral (weight - checkbox)
285
+ // content_h_italic, content_h_nomral (weight, checkbox)
286
+
287
+ $font_style = weaverx_t_get_cascade_opt('_italic', '');
288
+ if ( $font_style != '' ) {
289
+ $italic = ($font_style == 'on') ? 'italic' : 'normal';
290
+ $put .= "{$selector_font}{font-style:{$italic};}\n";
291
+ }
292
+
293
+ $font_style = weaverx_t_get_cascade_opt('_bold', '');
294
+ if ( $font_style != '' ) {
295
+ $italic = ($font_style == 'on') ? 'bold' : 'normal';
296
+ $put .= "{$selector_font}{font-weight:{$italic};}\n";
297
+ }
298
+
299
+
300
+
301
+
302
+
303
+ // ====== BG COLOR ====
304
+
305
+ /* need to handle bg color of content area - need to do the cascade */
306
+
307
+
308
+ if ( ($val = weaverx_getopt_default('editor_bgcolor','inherit')) && $val != 'inherit') { /* alt bg color */
309
+ $put .= "{$selector_bg}{background:" . $val . ";padding:10px;}\n";
310
+ } else if ( ($val = weaverx_getopt_default('content_bgcolor','inherit')) && $val != 'inherit') { /* #content */
311
+ $put .= "{$selector_bg}{background:" . $val . ";padding:10px;}\n";
312
+ } else if ( ($val = weaverx_getopt_default('container_bgcolor','inherit') ) && $val != 'inherit') { /* #container */
313
+ $put .= "{$selector_bg}{background:" . $val . ";padding:10px;}\n";
314
+ } else if (($val = weaverx_getopt_default('wrapper_bgcolor','inherit')) && $val != 'inherit') { /* #wrapper */
315
+ $put .= "{$selector_bg}{background:" . $val . ";padding:10px;}\n";
316
+ } else if (($val = weaverx_getopt_default('body_bgcolor','inherit')) && $val != 'inherit') { /* Outside BG */
317
+ $put .= "{$selector_bg}{background:" . $val . ";padding:10px;}\n";
318
+ } else if (($name = weaverx_getopt('themename')) && strpos($name,'Transparent Dark') !== false) { // fix in V3.0.5
319
+ $put .= "{$selector_bg}{background:#222;}\n";
320
+ } else if (($name = weaverx_getopt('themename')) && strpos($name,'Transparent Light') !== false) {
321
+ $put .= "{$selector_bg}{background:#ccc;}\n";
322
+ }
323
+
324
+
325
+
326
+ // ==== text color ====
327
+
328
+ $text_color = weaverx_t_get_cascade_opt( '_color','inherit'); // text color
329
+ if ( $val != 'inherit' )
330
+ $put .= "{$selector_tr}{color:" . $text_color . ";}\n";
331
+
332
+
333
+ // Headings - gutenberg only
334
+ // conteht_h_font_family
335
+ // ** header font size **
336
+ // content_h_font_size (font size name)
337
+ // ** FONT STYLE / WEIGHT **
338
+ // valusew will be 'on' or 'off' or '', unless checkbox
339
+ // wrapper_bold, wrapper_italic, container_bold, container_italic, content_bold, content_italic, page_title_italic, page_title_nomral (weight - checkbox)
340
+ // content_h_italic, content_h_nomral (weight, checkbox)
341
+
342
+ if ( $editor == 'gutenberg' ) {
343
+
344
+ // ---- font family
345
+
346
+ $font_family = weaverx_getopt_default('content_h_font_family', 'inherit');
347
+
348
+ if ( $font_family != 'inherit' ) { // found a font {
349
+ $fonts = weaverx_ts_get_font_family();
350
+ if ( isset($fonts[$font_family]) ) { // overide default
351
+ $font = $fonts[$font_family];
352
+ $put .= ".wp-block-heading,.wp-block-heading h4,.wp-block-heading h5,.wp-block-heading h6,.mce-content-body h1,.mce-content-body h2,.mce-content-body h3,.mce-content-body h4,.mce-content-body h5,.mce-content-body h6{font-family:{$font};}\n";
353
+ }
354
+ }
355
+
356
+ // we will just use the default font size for the headings - not worth it to calcuate 6 sizes here...
357
+
358
+ // ---- bold
359
+
360
+ if ( weaverx_getopt_checked('content_h_normal')) // bold off?
361
+ $put .= ".wp-block-heading h1,.wp-block-heading h2,.wp-block-heading h3,.wp-block-heading h4,.wp-block-heading h5,.wp-block-heading h6,.mce-content-body h1,.mce-content-body h2,.mce-content-body h3,.mce-content-body h4,.mce-content-body h5,.mce-content-body h6{font-weight:normal;}\n";
362
+
363
+ // ---- italic
364
+
365
+ $italic = weaverx_getopt( 'content_h_italic' );
366
+ if ( $italic == 'off' )
367
+ $put .= ".wp-block-heading h1,.wp-block-heading h2,.wp-block-heading h3,.wp-block-heading h4,.wp-block-heading h5,.wp-block-heading h6,.mce-content-body h1,.mce-content-body h2,.mce-content-body h3,.mce-content-body h4,.mce-content-body h5,.mce-content-body h6{font-style:normal;}\n";
368
+ else if ( $italic == 'on' )
369
+ $put .= ".wp-block-heading h1,.wp-block-heading h2,.wp-block-heading h3,.wp-block-heading h4,.wp-block-heading h5,.wp-block-heading h6,.mce-content-body h1,.mce-content-body h2,.mce-content-body h3,.mce-content-body h4,.mce-content-body h5,.mce-content-body h6{font-style:italic;}\n";
370
+
371
+ // ---- text color
372
+
373
+ $color = weaverx_getopt_default('content_h_color', 'inherit');
374
+ if ($color != 'inherit') {
375
+ $put .= ".wp-block-heading h1,.wp-block-heading h2,.wp-block-heading h3,.wp-block-heading h4,.wp-block-heading h5,.wp-block-heading h6,.mce-content-body h1,.mce-content-body h2,.mce-content-body h3,.mce-content-body h4,.mce-content-body h5,.mce-content-body h6{color: {$color};}\n";
376
+ }
377
+
378
+ $bgcolor = weaverx_getopt_default('content_h_bgcolor', 'inherit');
379
+ if ($bgcolor != 'inherit') {
380
+ $put .= ".wp-block-heading h1,.wp-block-heading h2,.wp-block-heading h3,.wp-block-heading h4,.wp-block-heading h5,.wp-block-heading h6,.mce-content-body h1,.mce-content-body h2,.mce-content-body h3,.mce-content-body h4,.mce-content-body h5,.mce-content-body h6{background-color: {$bgcolor};}\n";
381
+ }
382
+ $css = $color = weaverx_getopt_default('content_h_bgcolor_css', 'inherit');
383
+ if ($css) {
384
+ $put .= ".wp-block-heading h1,.wp-block-heading h2,.wp-block-heading h3,.wp-block-heading h4,.wp-block-heading h5,.wp-block-heading h6,.mce-content-body h1,.mce-content-body h2,.mce-content-body h3,.mce-content-body h4,.mce-content-body h5,.mce-content-body h6{$css}\n";
385
+ }
386
+
387
+ // ---- editor spacing fix-up - not perfect, but closer to reality
388
+
389
+ $put .= ".wp-block-heading h1,.wp-block-heading h2,.wp-block-heading h3,.wp-block-heading h4,.wp-block-heading h5,.wp-block-heading h6{line-height:1;margin-bottom:-.5em;margin-top:0;}\n";
390
+
391
+ }
392
+
393
+
394
+ // ====== PAGE TITLE (Don't use post values) ======
395
+
396
+ // page_title_bgcolor, page_title_color, page_title_font_size, page_title_font_family, page_title_normal (weight/checkbox), page_title_italic
397
+
398
+ if ( $editor == 'gutenberg' ) { // Gutenberg shows the page title
399
+ $font_family = weaverx_getopt_default('page_title_font_family', 'inherit');
400
+ if ( $font_family != 'inherit' ) {
401
+ $fonts = weaverx_ts_get_font_family();
402
+ if ( isset($fonts[$font_family]) ) {
403
+ $font = $fonts[$font_family];
404
+ $put .= ".edit-post-layout .editor-post-title textarea{font-family:{$font} !important;}\n";
405
+ }
406
+ }
407
+
408
+ $title_color = weaverx_getopt_default('page_title_color', 'inherit');
409
+ if ( $title_color == 'inherit' )
410
+ $title_color = $text_color;
411
+ $put .= ".edit-post-layout .editor-post-title textarea{color:{$title_color} !important;}\n";
412
+
413
+
414
+ $title_bgcolor = weaverx_getopt_default('page_title_bgcolor', 'inherit');
415
+ if ($title_bgcolor != 'inherit')
416
+ $put .= ".edit-post-layout .editor-post-title textarea{background-color:{$title_bgcolor} !important;}\n";
417
+
418
+
419
+ $title_css = weaverx_getopt_default('page_title_bgcolor_css', 'inherit');
420
+ if ($title_css)
421
+ $put .= ".edit-post-layout .editor-post-title textarea{$title_css}\n";
422
+
423
+
424
+
425
+ $font_size = weaverx_getopt_default( 'page_title_font_size', 'xl-font-size-title');
426
+ $em_fontmult = weaverx_ts_fontsize_mult($font_size, 'title');
427
+ $em_font_size = ( $base_font_px / 16.0) * $em_fontmult ;
428
+ $put .= ".edit-post-layout .editor-post-title{font-size:" . $em_font_size . "em;} /* size: {$font_size} mult:{$em_fontmult} em-size:{$em_font_size} */\n";
429
+
430
+ if ( weaverx_getopt_checked('page_title_normal')) // bold off?
431
+ $put .= ".edit-post-layout .editor-post-title{font-weight:normal;}\n";
432
+
433
+ $italic = weaverx_getopt( 'page_title_italic' );
434
+ if ( $italic == 'off' )
435
+ $put .= ".edit-post-layout .editor-post-title{font-style:normal;}\n";
436
+ else if ( $italic == 'on' )
437
+ $put .= ".edit-post-layout .editor-post-title{font-style:italic;}\n";
438
+
439
+ // bar under some titles
440
+ if ( ( $val = (int)weaverx_getopt('page_title_underline_int') ) ) {
441
+ if ( $title_color == ''|| $title_color == 'inherit' ) $title_color = '#222'; /* if they want a border, this is the fallback color */
442
+ $put .= ".edit-post-layout .editor-post-title{border-bottom: {$val}px solid {$title_color};}\n";
443
+ }
444
+ }
445
+
446
+
447
+
448
+
449
+ // ====== OTHER ELEMENTS ======
450
+
451
+ if (($val = weaverx_getopt('input_bgcolor')) ) { // input area
452
+ $put .= "input, textarea, ins, pre{background:" . $val . ";}\n";
453
+ }
454
+
455
+ if (($val = weaverx_getopt('input_color')) ) {
456
+ $put .= "input, textarea, ins, del, pre {color:" . $val . ";}\n";
457
+ }
458
+
459
+ if (($val = weaverx_getopt('contentlink_color')) ) { // link
460
+ $put .= "a {color:" . $val . ";}\n";
461
+ }
462
+
463
+ if (($val = weaverx_getopt('contentlink_hover_color')) ) {
464
+ $put .= "a:hover {color:" . $val . ";}\n";
465
+ }
466
+
467
+
468
+
469
+ // ====== TABLES ======
470
+
471
+ /* weaverx_tables */
472
+ $table = weaverx_getopt('weaverx_tables');
473
+
474
+ if ($table == 'wide') { // make backward compatible with 1.4 and before when Twenty Ten was default
475
+ $put .= "{$content_body}table {border: 1px solid #e7e7e7 !important;margin: 0 -1px 24px 0;text-align: left;width: 100%%;}
476
+ tr th, thead th {color: #888;font-size: 12px;font-weight: bold;line-height: 18px;padding: 9px 24px;}
477
+ {$content_body} tr td {border-style:none !important; border-top: 1px solid #e7e7e7 !important; padding: 6px 24px;}
478
+ tr.odd td {background: rgba(0,0,0,0.1);}\n";
479
+ } elseif ($table == 'bold') {
480
+ $put .= "{$content_body}table {border: 2px solid #888 !important;}
481
+ tr th, thead th {font-weight: bold;}
482
+ {$content_body}tr td {border: 1px solid #888 !important;}\n";
483
+ } elseif ($table == 'noborders') {
484
+ $put .= "{$content_body}table {border-style:none !important;}
485
+ {$content_body}tr th, {$content_body}thead th {font-weight: bold;border-bottom: 1px solid #888 !important;background-color:transparent;}
486
+ {$content_body}tr td {border-style:none !important;}\n";
487
+ } elseif ($table == 'fullwidth') {
488
+ $put .= "table {width:100%%;}
489
+ tr th, thead th {font-weight:bold;}\n";
490
+ } elseif ($table == 'plain') {
491
+ $put .= "{$content_body}table {border: 1px solid #888 !important;text-align:left;margin: 0 0 0 0;width:auto;}
492
+ tr th, thead th {color: inherit;background:none;font-weight:normal;line-height:normal;padding:4px;}
493
+ {$content_body}tr td {border: 1px solid #888 !important; padding:4px;}\n";
494
+ }
495
+
496
+
497
+ // ====== LISTS ======
498
+
499
+ if (($val = weaverx_getopt('contentlist_bullet')) ) { // list bullet
500
+ if ($val != '' && $val != 'disc') {
501
+ if ($val != 'custom') {
502
+ $put .= "ul {list-style-type:{$val};}\n";
503
+ }
504
+ }
505
+ }
506
+
507
+ // ====== images ======
508
+
509
+ // these work for both tinyMCD and Gutenberg
510
+
511
+ if (($val = weaverx_getopt('caption_color')) ) { // image caption, border color, width
512
+ $put .= ".wp-caption p.wp-caption-text,.wp-caption-dd {color:{$val};}\n";
513
+ }
514
+
515
+ if (($val = weaverx_getopt('media_lib_border_color')) ) {
516
+ $put .= ".wp-caption, img {background:{$val};}\n";
517
+ }
518
+ if (($val = weaverx_getopt('media_lib_border_int')) ) {
519
+ $caplr = $val - 5;
520
+ if ($caplr < 0)
521
+ $caplr = 0;
522
+ $put .= "img {padding:{$val}px;}\n";
523
+ $put .= sprintf(".wp-caption {padding: %dpx %dpx %dpx %dpx;}\n", $val, $caplr, $val, $caplr);
524
+ }
525
+ if ( weaverx_getopt_checked('show_img_shadows') ) {
526
+ $put .= 'img {box-shadow: 0 0 2px 1px rgba(0,0,0,0.25) !important;}'."\n";
527
+ }
528
+
529
+
530
+
531
+ // ====== <hr> ======
532
+
533
+ if (($color = weaverx_getopt('hr_color')) && $color != 'inherit') {
534
+ $put .= "hr{background-color:{$color};}\n";
535
+ }
536
+ if ( ($css = weaverx_getopt('hr_color_css')) ) {
537
+ $put .= "hr{$css}\n";
538
+ }
539
+
540
+ // ====== LINKS - link_color, link_strong, link_em, link_u, link_u_h, link_hover_color ======
541
+
542
+ $put .= 'a{';
543
+
544
+ if ( ($val = weaverx_getopt('link_color')) )
545
+ $put .= "color:{$val};";
546
+
547
+ $val = weaverx_getopt('link_strong');
548
+ if ($val == 'on')
549
+ $put .= "font-weight:bold;";
550
+ else if ($val == 'off')
551
+ $put .= "font-weight:normal;";
552
+
553
+ $val = weaverx_getopt('link_em');
554
+ if ($val == 'on')
555
+ $put .= "font-style:italic;";
556
+ else if ($val == 'off')
557
+ $put .= "font-style:normal;";
558
+
559
+ if ( ($val = weaverx_getopt('link_u')) )
560
+ $put .= "text-decoration:underline;";
561
+
562
+ $put .= '}a:hover{';
563
+
564
+ if ( ($val = weaverx_getopt('link_hover_color')) )
565
+ $put .= "color:{$val};";
566
+ if ( ($val = weaverx_getopt('link_u_h')) )
567
+ $put .= "text-decoration:underline;";
568
+ $put .= "}\n";
569
+
570
+ return $put;
571
+ }
572
+
573
+
574
+
575
+ /**
576
+ * Get list of fonts
577
+ *
578
+ * @since 4.0
579
+ *
580
+ * @return array
581
+ */
582
+ function weaverx_ts_get_font_family() {
583
+ return array(
584
+ 'sans-serif' => 'Arial,sans-serif',
585
+ 'arialBlack' => '"Arial Black",sans-serif',
586
+ 'arialNarrow' => '"Arial Narrow",sans-serif',
587
+ 'lucidaSans' => '"Lucida Sans",sans-serif',
588
+ 'trebuchetMS' => '"Trebuchet MS", "Lucida Grande",sans-serif',
589
+ 'verdana' => 'Verdana, Geneva,sans-serif',
590
+ 'alegreya-sans' => "'Alegreya Sans', sans-serif",
591
+ 'roboto' => "'Roboto', sans-serif",
592
+ 'roboto-condensed' => "'Roboto Condensed', sans-serif",
593
+ 'source-sans-pro' => "'Source Sans Pro', sans-serif",
594
+
595
+
596
+ 'serif' => 'TimesNewRoman, "Times New Roman",serif',
597
+ 'cambria' => 'Cambria,serif',
598
+ 'garamond' => 'Garamond,serif',
599
+ 'georgia' => 'Georgia,serif',
600
+ 'lucidaBright' => '"Lucida Bright",serif',
601
+ 'palatino' => '"Palatino Linotype",Palatino,serif',
602
+ 'alegreya' => "'Alegreya', serif",
603
+ 'roboto-slab' => "'Roboto Slab', serif",
604
+ 'source-serif-pro' => "'Source Serif Pro', serif",
605
+
606
+ 'monospace' => '"Courier New",Courier,monospace',
607
+ 'consolas' => 'Consolas,monospace',
608
+ 'inconsolata' => "'Inconsolata', monospace",
609
+ 'roboto-mono' => "'Roboto Mono', monospace",
610
+
611
+ 'papyrus' => 'Papyrus,cursive,serif',
612
+ 'comicSans' => '"Comic Sans MS",cursive,serif',
613
+ 'handlee' => "'Handlee', cursive",
614
+
615
+ 'open-sans' => "'Open Sans', sans-serif",
616
+ 'open-sans-condensed' => "'Open Sans Condensed', sans-serif",
617
+ 'droid-sans' => "'Droid Sans', sans-serif",
618
+ 'droid-serif' => "'Droid Serif', serif",
619
+ 'exo-2' => "'Exo 2', sans-serif",
620
+ 'lato' => "'Lato', sans-serif",
621
+ 'lora' => "'Lora', serif",
622
+ 'arvo' => "'Arvo', serif",
623
+ 'archivo-black' => "'Archivo Black', sans-serif",
624
+ 'vollkorn' => "'Vollkorn', serif",
625
+ 'ultra' => "'Ultra', serif",
626
+ 'arimo' => "'Arimo', serif",
627
+ 'tinos' => "'Tinos', serif"
628
+ );
629
+
630
+ }
631
+
632
+
633
+
634
+ // and filter to use the generated file...
635
+
636
+ add_filter( 'weaverx_mce_css', 'weaverx_ts_mce_css');
637
+
638
+ function weaverx_ts_mce_css( $default_style ) {
639
+ // build mce edit css path if we've generated the editor css
640
+ $updir = wp_upload_dir();
641
+ // make relative for https: - doesn't work right...
642
+ // return parse_url(trailingslashit($updir['baseurl']) . 'weaverx-subthemes/style-weaverxt.css',PHP_URL_PATH);
643
+
644
+ $dir = trailingslashit($updir['basedir']) . 'weaverx-subthemes/editor-style-wvrx.css';
645
+
646
+ $path = trailingslashit($updir['baseurl']) . 'weaverx-subthemes/editor-style-wvrx.css';
647
+
648
+ if (!@file_exists( $dir ))
649
+ return $default_style;
650
+
651
+ if (is_ssl())
652
+ $path = str_replace('http:','https:',$path);
653
+
654
+ if ( !$default_style )
655
+ return $path;
656
+ else
657
+ return $default_style . ',' . $path;
658
+ }
659
+ ?>
includes/wvrx-ts-per-page-customizer.php DELETED
@@ -1,56 +0,0 @@
1
- <?php
2
- //** experimental code for future addition of per page and per post options
3
- // currently unable to make work because can't retrieve current page ID or post ID (on single page) to make the per page/post options meaningful.
4
- //
5
- if (false) {
6
- if ( ! function_exists( 'weaverx_customizer_per_page_sections' ) ) :
7
-
8
-
9
- function weaverx_customizer_per_page_sections( $sections ) {
10
- $panel = 'weaverx_per_page';
11
- $perpp_sections = array();
12
-
13
-
14
- /**
15
- * basic intro page
16
- */
17
- $perpp_sections['perpage-intro'] = array(
18
- 'panel' => $panel,
19
- 'title' => __( 'Per Page Intro', 'weaver-xtreme' ),
20
- 'options' => array(
21
- 'per-page-heading-header' => weaverx_cz_heading( 'Per Page Intro. PAGE ID:=' . the_ID(). '='),
22
- ),
23
- );
24
-
25
-
26
-
27
- /**
28
- * Filter the definitions for the controls in the Per Page panel of the Customizer.
29
- *
30
- * @since 1.3.0.
31
- *
32
- * @param array $perpp_sections The array of definitions.
33
- */
34
- $perpp_sections = apply_filters( 'weaverx_customizer_perpage_sections', $perpp_sections );
35
-
36
- // Merge with master array
37
- return array_merge( $sections, $perpp_sections );
38
- }
39
- endif;
40
-
41
- add_filter( 'weaverx_customizer_sections', 'weaverx_customizer_per_page_sections' );
42
-
43
- add_filter ('weaverx_add_per_page_customizer', 'weaverx_customizer_add_per_page');
44
-
45
- function weaverx_customizer_add_per_page( $data ) {
46
-
47
- return array( 'title' => __( 'Per Page Options', 'weaver-xtreme' ), 'priority' => 11200,
48
- 'description' => __( 'Define Custom Settings for currently displayed page.' , 'weaver-xtreme' ),
49
- 'active_callback' => 'wvrx_ts_is_page' );
50
-
51
- }
52
-
53
- function wvrx_ts_is_page() {
54
- return true;
55
- }
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -11,7 +11,7 @@ Text Domain: weaverx-theme-support
11
  Requires at least: 4.8
12
  Requires PHP: 5.4
13
  Tested up to: 4.9
14
- Stable tag: 4.0
15
 
16
  A useful shortcode and widget collection for Weaver Xtreme
17
 
@@ -76,6 +76,9 @@ Support for this plugin can best be found at our forum - http://forum.weaverthem
76
  See ChangeLog for changes to this version.
77
 
78
  == ChangeLog ==
 
 
 
79
  = 4.0 =
80
  * Change: Trying to make this plugin not essential. Have moved the per page/post stuff back into the theme where it belongs!
81
  * Quite a few currently popular themes now have per page/post options, so apparently meta_boxes are no longer disapproved.
11
  Requires at least: 4.8
12
  Requires PHP: 5.4
13
  Tested up to: 4.9
14
+ Stable tag: 4.0.2
15
 
16
  A useful shortcode and widget collection for Weaver Xtreme
17
 
76
  See ChangeLog for changes to this version.
77
 
78
  == ChangeLog ==
79
+ = 4.0.2 =
80
+ * Fix/Change - Removed (for now) the Boxed easy-width layout option.
81
+
82
  = 4.0 =
83
  * Change: Trying to make this plugin not essential. Have moved the per page/post stuff back into the theme where it belongs!
84
  * Quite a few currently popular themes now have per page/post options, so apparently meta_boxes are no longer disapproved.
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: 4.0
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
@@ -43,7 +43,7 @@ if ( function_exists( 'weavercore_ts_installed' ) ) {
43
 
44
  if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
45
 
46
- define ('WVRX_TS_VERSION','3.9');
47
  define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
48
  define ('WVRX_TS_PAGEBUILDERS', true); // currently not safely implemented - will be in Weaver 4.0
49
 
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: 4.0.2
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
43
 
44
  if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
45
 
46
+ define ('WVRX_TS_VERSION','4.0.2');
47
  define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
48
  define ('WVRX_TS_PAGEBUILDERS', true); // currently not safely implemented - will be in Weaver 4.0
49