Weaver Xtreme Theme Support - Version 4.4.1

Version Description

  • Update: WP 5.6 compatibility
  • Added: Instructions to switch to Customizer for new Font transform and spacing options.
  • Added: Beta compatibility support for upcoming Weaver Xtreme 5 - no significant differences with Weaver Xtreme 4.4
Download this release

Release Info

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

Code changes from version 4.4 to 4.4.1

admin/add-weaverx-sapi-options.php CHANGED
@@ -5,59 +5,59 @@
5
  * like the a default Customizer version for WP.org, or the traditional Theme Options version (which it does now)
6
  */
7
 
8
- if (current_user_can('edit_posts')) {
9
 
10
 
11
- add_action('admin_head', 'weaverx_admin_ts_head');
12
 
13
- function weaverx_admin_ts_head() { // action definition
14
- require_once(dirname(__FILE__ ) . '/admin-lib-ts.php');
15
- require_once(dirname(__FILE__ ) . '/admin-lib-ts-2.php');
16
 
17
- add_action('weaverx_admin_saverestore', 'weaverx_ts_weaverx_admin_saverestore');
18
 
19
- add_action('weaverx_admin_subthemes', 'weaverx_ts_weaverx_admin_subthemes');
20
- add_action('weaverx_admin_mainopts', 'weaverx_ts_weaverx_admin_mainopts');
21
- add_action('weaverx_admin_advancedopts', 'weaverx_ts_weaverx_admin_advancedopts');
22
- }
23
 
24
- /* function wvrx_admin_error_notice() {
25
- echo 'This request contained ' . count( $_POST ) . ' POST vars, ' . count( $_GET ) . ' GET vars, and ' . count( $_COOKIE ) . ' Cookies.';
26
- echo '<pre>POST:'; var_dump($_POST); echo '</pre>';
27
- echo '<pre>GET:'; var_dump($_GET); echo '</pre>';
28
- echo '<pre>COOKIE:'; var_dump($_COOKIE); echo '</pre>';
29
- }
30
 
31
- //add_action( 'admin_notices', 'wvrx_admin_error_notice' );
32
- // admin actions function definitions
33
- */
34
 
35
- function weaverx_ts_weaverx_admin_subthemes() {
36
- require_once( dirname(__FILE__ ) . '/admin-subthemes.php');
37
 
38
- weaverx_admin_subthemes();
39
- }
40
 
41
- function weaverx_ts_weaverx_admin_mainopts() {
42
 
43
- require_once( dirname(__FILE__ ) . '/admin-mainopts.php');
44
 
45
- weaverx_admin_mainopts();
46
- }
47
 
48
- function weaverx_ts_weaverx_admin_advancedopts() {
49
 
50
- require_once( dirname(__FILE__ ) . '/admin-advancedopts.php');
51
 
52
- weaverx_admin_advancedopts();
53
- }
54
 
55
- function weaverx_ts_weaverx_admin_saverestore() {
56
 
57
- require_once( dirname(__FILE__ ) . '/admin-saverestore.php');
58
 
59
- weaverx_ts_admin_saverestore();
60
- }
61
 
62
- } // END IF CAN EDIT POSTS ---------------------------------------------------------------------
63
 
5
  * like the a default Customizer version for WP.org, or the traditional Theme Options version (which it does now)
6
  */
7
 
8
+ if ( current_user_can( 'edit_posts' ) ) {
9
 
10
 
11
+ add_action( 'admin_head', 'weaverx_admin_ts_head' );
12
 
13
+ function weaverx_admin_ts_head() { // action definition
14
+ require_once( dirname( __FILE__ ) . '/admin-lib-ts.php' );
15
+ require_once( dirname( __FILE__ ) . '/admin-lib-ts-2.php' );
16
 
17
+ add_action( 'weaverx_admin_saverestore', 'weaverx_ts_weaverx_admin_saverestore' );
18
 
19
+ add_action( 'weaverx_admin_subthemes', 'weaverx_ts_weaverx_admin_subthemes' );
20
+ add_action( 'weaverx_admin_mainopts', 'weaverx_ts_weaverx_admin_mainopts' );
21
+ add_action( 'weaverx_admin_advancedopts', 'weaverx_ts_weaverx_admin_advancedopts' );
22
+ }
23
 
24
+ /* function wvrx_admin_error_notice() {
25
+ echo 'This request contained ' . count( $_POST ) . ' POST vars, ' . count( $_GET ) . ' GET vars, and ' . count( $_COOKIE ) . ' Cookies.';
26
+ echo '<pre>POST:'; var_dump($_POST); echo '</pre>';
27
+ echo '<pre>GET:'; var_dump($_GET); echo '</pre>';
28
+ echo '<pre>COOKIE:'; var_dump($_COOKIE); echo '</pre>';
29
+ }
30
 
31
+ //add_action( 'admin_notices', 'wvrx_admin_error_notice' );
32
+ // admin actions function definitions
33
+ */
34
 
35
+ function weaverx_ts_weaverx_admin_subthemes() {
36
+ require_once( dirname( __FILE__ ) . '/admin-subthemes.php' );
37
 
38
+ weaverx_admin_subthemes();
39
+ }
40
 
41
+ function weaverx_ts_weaverx_admin_mainopts() {
42
 
43
+ require_once( dirname( __FILE__ ) . '/admin-mainopts.php' );
44
 
45
+ weaverx_admin_mainopts();
46
+ }
47
 
48
+ function weaverx_ts_weaverx_admin_advancedopts() {
49
 
50
+ require_once( dirname( __FILE__ ) . '/admin-advancedopts.php' );
51
 
52
+ weaverx_admin_advancedopts();
53
+ }
54
 
55
+ function weaverx_ts_weaverx_admin_saverestore() {
56
 
57
+ require_once( dirname( __FILE__ ) . '/admin-saverestore.php' );
58
 
59
+ weaverx_ts_admin_saverestore();
60
+ }
61
 
62
+ } // END IF CAN EDIT POSTS ---------------------------------------------------------------------
63
 
admin/admin-advancedopts.php CHANGED
@@ -1,425 +1,77 @@
1
  <?php
2
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
 
 
3
  /* Weaver Xtreme - admin Advanced Options
4
  *
5
  * __ added: 12/9/14
6
  */
7
 
8
  function weaverx_admin_advancedopts() {
9
- ?>
10
- <div id="tabwrap_adv" style="padding-left:5px;">
11
- <div id="tab-container-adv" class='yetiisub'>
12
- <ul id="tab-container-adv-nav" class='yetiisub'>
13
- <?php if (weaverx_allow_multisite()) {
14
 
15
- weaverx_elink('#asptab0', __('Insert custom HTML, scripts, and CSS into &lt;HEAD&gt; section', 'weaver-xtreme' /*adm*/), __('&lt;HEAD&gt; Section', 'weaver-xtreme' /*adm*/), '<li>','</li>');
16
- weaverx_elink('#asptab1', __('Insert custom HTML into several different page areas', 'weaver-xtreme' /*adm*/), __('HTML Insertion', 'weaver-xtreme' /*adm*/), '<li>','</li>');
17
- }
18
- weaverx_elink('#asptab3', __('Options related to this site: FavIcon, Home Page, more', 'weaver-xtreme' /*adm*/), __('Site Options', 'weaver-xtreme' /*adm*/), '<li>','</li>');
19
- weaverx_elink('#asp_tab_admin', __('Basic Administrative Options', 'weaver-xtreme' /*adm*/), __('Admin Options', 'weaver-xtreme' /*adm*/), '<li>','</li>');
20
- ?>
21
- </ul>
22
- <?php weaverx_tab_title(__('Advanced Options','weaver-xtreme'), 'help.html#AdvancedOptions', __('Help for Advanced Options', 'weaver-xtreme' /*adm*/)); ?>
23
-
24
- <?php weaverx_sapi_submit('', '<br /><br />'); ?>
25
-
26
- <!-- ***************************************************** -->
27
- <?php if (weaverx_allow_multisite() ) { ?>
28
- <div id="asptab0" class="tab_adv" >
29
- <?php weaverx_adv_head_section();
30
- ?>
31
- </div> <!-- adtab 0 -->
32
-
33
- <!-- ***************************************************** -->
34
-
35
- <div id="asptab1" class="tab_adv" >
36
- <?php weaverx_adv_html_insert(); ?>
37
- </div> <!-- asptab1 -->
38
- <?php } // end of major section of not allowed on multisite ?>
39
 
 
 
40
 
41
- <!-- ***************************************************** -->
42
- <div id="asptab3" class="tab_adv" >
43
- <?php weaverx_adv_site_opts(); ?>
44
- </div> <!-- site options -->
45
 
 
46
 
47
- <!-- ***************************************************** -->
 
 
 
48
 
49
- <div id="asp_tab_admin" class="tab_adv" >
50
- <?php weaverx_admin_admin_ts(); ?>
51
- </div>
52
 
53
- </div> <!-- tab-container-adv -->
54
 
55
- <?php weaverx_sapi_submit(); ?>
56
- </div> <!-- #tabwrap_adv-->
57
 
58
- <script type="text/javascript">
59
- var tabberAdv = new Yetii({
60
- id: 'tab-container-adv',
61
- tabclass: 'tab_adv',
62
- persist: true
63
- });
64
- </script>
65
- <?php
66
- }
67
-
68
- function weaverx_adv_head_section() {
69
 
70
- ?>
71
- <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-screenoptions"></span>
72
- <?php _e('The Site &lt;HEAD&gt; Section', 'weaver-xtreme' /*adm*/);?>
73
- <?php weaverx_help_link('help.html#HeadSection',__('Help for site HEAD section', 'weaver-xtreme' /*adm*/));?></div><br />
74
- <p>
75
- <?php _e('This tab allows you to add HTML to the &lt;HEAD&gt; Section of every page on your site.', 'weaver-xtreme' /*adm*/);?>
76
- </p>
77
- <?php if (weaverx_allow_multisite()) { ?>
78
- <p><small>
79
- <?php _e('PLEASE NOTE: Only minimal validation is made on the field values, so be careful not to use invalid code. Invalid code is usually harmless, but it can make your site display incorrectly. If your site looks broken after make changes here, please double check that what you entered uses valid HTML or CSS rules.', 'weaver-xtreme' /*adm*/);?>
80
- </small></p>
81
 
 
 
 
82
 
83
- <!-- ======== -->
84
 
85
- <br /><br />
86
- <a name="headsection" id="headsection"></a>
87
- <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-screenoptions"></span>
88
- <?php _e('&lt;HEAD&gt; Section', 'weaver-xtreme' /*adm*/);?></div>
89
- <br/>
90
- <p>
91
- <?php _e('This input area allows you to enter allowed HTML head elements to the &lt;head&gt; section, including &lt;title&gt;, &lt;base&gt;, &lt;link&gt;, &lt;meta&gt;, and &lt;style&gt;.
92
- Code entered into this box is included right before the &lt;/head&gt; HTML tag on each page of your site.
93
- This code may <strong>not</strong> include <em>&lt;script&gt;s</em> unless you\'ve installed the Weaver Xtreme Theme Support plugin.
94
- We recommend using dedicated WordPress plugins to add things like ad tracking, SEO tags, Facebook code, and so on.
95
- <small>Note: You can add CSS Rules using the "Custom CSS Rules" option on the Main Options tab.', 'weaver-xtreme' /*adm*/) . '</small>';?>
96
- </p>
97
- <p>
98
- <?php _e('For even greater control of how your site looks, you can add code the the &lt;HEAD&gt; section on a per page basis using the per page options from the page editor.', 'weaver-xtreme' /*adm*/);?>
99
- </p>
100
- <?php weaverx_textarea(weaverx_getopt('head_opts'), 'head_opts', 2, '<!-- HTML code -->', $style = 'width:95%;', $class='wvrx-edit') ?>
101
- <br>
102
- <small><?php _e('Weaver Xtreme will <em>always</em> load the jQuery Library.', 'weaver-xtreme' /*adm*/);?></small>
103
- <!-- ===================================================== -->
104
- <br /><br />
105
 
106
- <a name="headsection" id="headsection"></a>
107
- <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-screenoptions"></span>
108
- <?php _e('&lt;HEAD&gt; Section (Advanced Alternative - &diams;)', 'weaver-xtreme' /*adm*/);?></div>
 
109
 
110
- <p><small>
111
- <?php _e('Same as normal &lt;HEAD&gt; box above, but works like other &diams; options - it survives changing
112
- the subtheme from the Weaver Xtreme Subthemes tab, and is saved only on a full backup Save.
113
- This option is not commonly used, and is intended for more advanced Weaver Xtreme users.', 'weaver-xtreme' /*adm*/);?>
114
- </small></p>
115
- <?php weaverx_textarea(weaverx_getopt('_althead_opts'), '_althead_opts', 2, '<!-- HTML code -->', $style = 'width:95%;', $class='wvrx-edit') ?>
116
- <?php
117
- do_action('weaverxplus_admin','head_section');
118
- } // not multisite
119
- }
120
 
 
121
 
 
 
 
122
 
 
123
 
124
- function weaverx_adv_html_insert() {
125
- ?>
126
- <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-editor-code"></span>
127
- <?php _e('HTML Insertion', 'weaver-xtreme' /*adm*/);?>
128
- <?php weaverx_help_link('help.html#HTMLInsertion','Help on HTML Code Insertion Areas');?></div><br />
129
- <p>
130
- <?php _e('The <b>Advanced Options&rarr;HTML Insertion</b> tab allows you to insert custom HTML code in many places on your site.
131
- These fields allow you to add HTML code, special CSS rules, or even JavaScripts.
132
- You will need at least a bit of knowledge of HTML coding to use these fields most effectively.', 'weaver-xtreme' /*adm*/);?>
133
- </p>
134
- <p><small>
135
- <?php __('The values you put here are saved in the WordPress database, and will survive theme upgrades and other changes.', 'weaver-xtreme' /*adm*/);?>
136
- </small></p>
137
- <p><small>
138
- <?php __('PLEASE NOTE: Only minimal validation is made on the field values, so be careful not to use invalid code.
139
- Invalid code is usually harmless, but it can make your site display incorrectly.
140
- If your site looks broken after make changes here, please double check that you entered valid HTML or CSS rules.', 'weaver-xtreme' /*adm*/);?>
141
- </small></p>
142
- <hr />
143
- <?php
144
-
145
- $base_areas = array(
146
-
147
- //array('name'=>'', 'id'=>'submit', 'info' => '', 'help' => ''),
148
-
149
- array ('name'=>__('Pre-Wrapper Code', 'weaver-xtreme' /*adm*/), 'id'=>'prewrapper', 'info' =>
150
- __('This code will be inserted just before the #wrapper and #branding divs, before any other site content.(Area ID: #inject_prewrapper)', 'weaver-xtreme' /*adm*/), 'help' => ''),
151
- array ('name'=>__('Post-Footer', 'weaver-xtreme' /*adm*/), 'id'=>'postfooter', 'info' =>
152
- __('This code will be inserted just after the footer #colophon div, outside the #wrapper div.(Area ID: #inject_postfooter)', 'weaver-xtreme' /*adm*/),
153
- 'help' => '')
154
- );
155
-
156
- $areas = apply_filters('weaverxplus_html_inject', $base_areas);
157
-
158
- foreach ($areas as $area => $def) {
159
- $name = $def['name'];
160
-
161
- weaverx_add_html_field( $name, $def['id'], $def['info'], $def['help'] ,
162
- '<span style="color:black; padding:.2em;" class="dashicons dashicons-editor-code"></span>');
163
- }
164
-
165
-
166
- do_action('weaverxplus_admin','html_insertion');
167
- }
168
-
169
-
170
- function weaverx_add_html_field($title, $name, $info, $help='', $icon = '') {
171
-
172
- if ($name=='submit') {
173
- weaverx_sapi_submit('', "<br /><br />\n");
174
  return;
175
  }
176
 
177
- if ($name[0] == '+') $name = substr($name,1); // fix locally
178
-
179
- $area_name = '' . $name . '_insert';
180
- $hide_front = 'hide_front_' . $name;
181
- $hide_rest = 'hide_rest_' . $name;
182
- $style_id = 'inject_' . $name;
183
- $add_class_id = 'inject_add_class_' . $name;
184
-
185
- $val = array ('name' => $title . __(' BG', 'weaver-xtreme' /*adm*/), 'id' => $style_id . '_bgcolor',
186
- 'info' => '<span style="margin-top:6px;" class="i-left-bg dashicons dashicons-admin-appearance"></span>' .
187
- '<strong style="font-size:larger;">' . __('BG Color for area. (Add custom CSS using the CSS+ option.)', 'weaver-xtreme' /*adm*/) . '</strong>',
188
- 'help' => '');
189
- $classes = array( 'name' => '<span class="i-left">{ }</span> <small>' . __('Add Classes', 'weaver-xtreme' /*adm*/) . '</small>',
190
- 'id' => $add_class_id, 'type' => '+widetext',
191
- 'info' => __('Space separated class names to add to this area (<em>Advanced option</em>) (&starf;Plus)', 'weaver-xtreme' /*adm*/) );
192
-
193
- ?>
194
- <div class="atw-option-subheader"><?php echo $icon; ?><span style="color:blue;"><b><?php echo $title; ?></b></span></div></br />
195
- <?php
196
- if (! $info)
197
- return;
198
- echo $info;
199
- ?>
200
- <br />
201
- <?php weaverx_textarea(weaverx_getopt($area_name), $area_name, 3, __('Any HTML, including shortcodes.', 'weaver-xtreme' /*adm*/)); ?>
202
-
203
- <br />
204
- <?php
205
- echo '<table style="width:90%;">'; weaverx_form_ctext($val,true); weaverx_form_text($classes);echo '</table>';
206
- ?>
207
- <label><span class="dashicons dashicons-visibility"></span>
208
- <?php _e('Hide on front page:', 'weaver-xtreme' /*adm*/);?>
209
- <input type="checkbox" name="<?php weaverx_sapi_main_name($hide_front); ?>" id="<?php echo $hide_front; ?>" <?php checked(weaverx_getopt_checked($hide_front)); ?> /></label>
210
-
211
- <small><?php _e('If you check this box, then the code from this area will not be displayed on the front (home) page.', 'weaver-xtreme' /*adm*/);?></small><br />
212
- <label><span class="dashicons dashicons-visibility"></span>
213
- <?php _e('Hide on non-front pages:', 'weaver-xtreme' /*adm*/);?>
214
- <input type="checkbox" name="<?php weaverx_sapi_main_name($hide_rest); ?>" id="<?php echo $hide_rest; ?>" <?php checked(weaverx_getopt_checked( $hide_rest )); ?> /></label>
215
- <small><?php _e('If you check this box, then the code from this area will not be displayed on non-front pages.', 'weaver-xtreme' /*adm*/);?></small><br /><br />
216
- <?php
217
  }
218
 
219
-
220
-
221
-
222
- // ============================================== SITE OPTIONS ===========================================
223
-
224
- function weaverx_adv_site_opts() {
225
- ?>
226
- <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span>
227
- <?php _e('Site Options', 'weaver-xtreme' /*adm*/); ?>
228
- <?php weaverx_help_link('help.html#AdvSiteOptions',__('Help on Advanced Site Options', 'weaver-xtreme' /*adm*/));?></div><br />
229
- <?php _e('These options are available to fine tune various aspects of your site.
230
- Technically, these features are not part of the theme styling, but cover other aspects of site functionality.', 'weaver-xtreme' /*adm*/);?>
231
- <br />
232
- <hr />
233
- <!-- ======== -->
234
- <?php
235
- if ( weaverx_f_file_access_available() ) {
236
- ?>
237
- <h3><?php _e('Inline CSS - (Xtreme-Plus Option)', 'weaver-xtreme' /*adm*/);?></h3>
238
-
239
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_inline_style'); ?>" id="_inline_style" <?php checked(weaverx_getopt_checked( '_inline_style' )); ?> />
240
- <?php _e('Generate inline CSS code rather than using style-weaverxt.css file.
241
- By default, Weaver Xtreme Plus will use the style-weaverxt.css file. &diams;', 'weaver-xtreme' /*adm*/);?>
242
- </label><br /><br />
243
- <?php
244
- }
245
- ?>
246
- <h3><?php _e('Disable Schema.org Structured Data', 'weaver-xtreme' /*adm*/);?></h3>
247
-
248
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_no_schemea'); ?>" id="_no_schemea" <?php checked(weaverx_getopt_checked( '_no_schemea' )); ?> />
249
- <?php _e('Disable adding Schema.org structured data. (We do not recommend removing this SEO feature.) &diams;', 'weaver-xtreme' /*adm*/);?>
250
- </label><br /><br />
251
-
252
- <h3><?php _e('Include Widget Areas in Print', 'weaver-xtreme' /*adm*/);?></h3>
253
-
254
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_print_show_widgets'); ?>" id="_print_show_widgets" <?php checked(weaverx_getopt_checked( '_print_show_widgets' )); ?> />
255
- <?php _e('Include all widget areas and full Footer content on browser Print page operation. &diams;', 'weaver-xtreme' /*adm*/);?>
256
- </label><br /><br />
257
-
258
- <br />
259
- <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-format-image"></span><span style="color:blue;font-size:larger;">
260
- <b><?php _e('FavIcon', 'weaver-xtreme' /*adm*/);?></b></span></div></br />
261
- <p>
262
- <?php _e('You can add a FavIcon to your site with this option.
263
- The preferred FavIcon is in the <code>.ico</code> format which has the most universal browser compatibility.
264
- However, <code>.png, .gif, and .jpg</code> will work for most modern browsers.
265
- The standard sizes are 16x16, 32x32, or 48x48 px.
266
- You can alternatively load a <code>favicon.ico</code> file to the root directory of your site. &diams;', 'weaver-xtreme' /*adm*/);?>
267
- </p>
268
- <p>
269
- <?php
270
- $icon = weaverx_getopt('_favicon_url');
271
- if ($icon != '') {
272
- echo '<img src="' . esc_url($icon) . '" alt="favicon" />&nbsp;';
273
- }
274
- ?>
275
- <strong><?php _e('FavIcon URL:', 'weaver-xtreme' /*adm*/); ?> </strong>
276
- <?php weaverx_textarea(weaverx_getopt('_favicon_url'), '_favicon_url', 1, 'URL ', $style = 'width:350px;'); ?>
277
- <?php weaverx_media_lib_button('_favicon_url'); ?>&nbsp;&nbsp;<?php _e('Full path to FavIcon', 'weaver-xtreme' /*adm*/);?>
278
- </p><br />
279
-
280
- <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-page"></span><span style="color:blue;font-size:larger;">
281
- <b><?php _e('Exclude Pages from SiteMap', 'weaver-xtreme' /*adm*/);?></b></span></div></br />
282
- <p>
283
- <?php _e('You can specify a comma separated list of Page IDs to be excluded from the SiteMap Page list.
284
- To exclude pages from Search results, use a plugin such as "Search Exclude".
285
- You can hide different sections of the SiteMap by adding rules to the "Custom CSS Rules" box.
286
- To hide authors, for example, add the rule <code>#sitemap-authors{display:none;}</code>.
287
- The IDs for the SiteMap sections are: <code>#sitemap-pages, #sitemap-posts, #sitemap-categories, #sitemap-tags, #sitemap-authors</code>', 'weaver-xtreme' /*adm*/);?>
288
- </p>
289
- <p>
290
- <?php
291
- $exclude = weaverx_getopt('_sitemap_exclude_pages');
292
-
293
- ?>
294
- <strong><?php _e('Exclude Pages from SiteMap', 'weaver-xtreme' /*adm*/); ?>: </strong>
295
- <?php weaverx_textarea(weaverx_getopt('_sitemap_exclude_pages'), '_sitemap_exclude_pages', 1, '1,2,3', $style = 'width:350px;'); ?>
296
- </p><br />
297
-
298
-
299
-
300
-
301
- <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-hammer"></span>
302
- <span style="color:blue;font-size:larger;">
303
- <b><?php _e('SEO - Search Engine Optimization', 'weaver-xtreme' /*adm*/);?></b>
304
- </span></div><br />
305
- <p>
306
- <?php _e('The Weaver Xtreme Theme has been designed to follow the latest SEO guidelines.
307
- Each non-home page will use the recommended "Page Title | Site Title" format, and the site is formatted using the appropriate HTML5 tags for optimal SEO performance.
308
- An SEO plugin may help you optimize your site for SEO, but is not required.
309
- See the <em>Help</em> tab for recommended SEO plugins.', 'weaver-xtreme' /*adm*/);?>
310
- </p><br />
311
-
312
- <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-home"></span>
313
- <span style="color:blue;font-size:larger;">
314
- <b><?php _e('Home Page', 'weaver-xtreme' /*adm*/);?></b>
315
- </span></div>
316
- <p>
317
- <?php _e('WordPress allows you to specify what page is used for your home page - either the standard WordPress blog, or a static page (which can be a Weaver Xtreme "Page with Posts" page).
318
- Please see the Weaver Xtreme Help topic for a more complete explanation.', 'weaver-xtreme' /*adm*/);?>
319
- </p>
320
- <p>
321
- <?php _e('You can set the front page on the Dashboard <em>Settings&rarr;Reading panel</em>:', 'weaver-xtreme' /*adm*/);?>
322
- <a href="<?php echo esc_url( home_url( '/' ) . 'wp-admin/options-reading.php' ); ?>">
323
- <strong><?php _e('Set Front Page Displays', 'weaver-xtreme' /*adm*/);?></strong></a></p><br />
324
-
325
- <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-users"></span>
326
- <span style="color:blue;font-size:larger;">
327
- <b><?php _e('Author Avatars', 'weaver-xtreme' /*adm*/);?></b>
328
- </span></div>
329
- <p>
330
- <?php _e('For the best look, your site should support Avatars - a small image associated with a contributors e-mail address.
331
- Gravatar.com is probably the most popular Avatar support, and is closely associated with WordPress.
332
- You should set up a Gravatar for the main authors of your blog.
333
- For contributors without any avatar, WordPress will automatically generate an avatar.
334
- See the <strong>Settings &rarr; Discussion</strong> admin page for avatar settings.', 'weaver-xtreme' /*adm*/);?>
335
- </p>
336
- <hr />
337
- <?php
338
- do_action('weaverxplus_admin','site_opts');
339
- do_action('weaverx_child_siteoptions');
340
- }
341
-
342
-
343
-
344
-
345
- function weaverx_admin_admin_ts() {
346
- ?>
347
- <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span>
348
- <?php _e('Basic Administrative Options', 'weaver-xtreme' /*adm*/); ?>
349
- <?php weaverx_help_link('help.html#AdminOptions','Help for Admin Options'); ?></div>
350
-
351
- <p>
352
- <?php _e('These options control some administrative options and appearance features.', 'weaver-xtreme' /*adm*/); ?>
353
- </p>
354
-
355
- <br />
356
-
357
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_disable_customizer'); ?>" id="disable_customizer" <?php checked(weaverx_getopt_checked( '_disable_customizer' )); ?> />
358
- <?php _e('<strong>Disable Weaver Xtreme Customizer Interface</strong> - If you have a slow host or slow computer, checking this option will disable loading the Weaver Xtreme Customizer interface. &diams;', 'weaver-xtreme' /*adm*/); ?>
359
- </label><br /><br />
360
-
361
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_ignore_PHP_memory'); ?>" id="disable_customizer" <?php checked(weaverx_getopt_checked( '_ignore_PHP_memory' )); ?> />
362
- <?php _e('<strong>Ignore Customizer PHP Minimum Memory</strong> - If your host PHP memory is too low, it will cause an error message for using the Customizer. If your configuration still works properly with low PHP memory, check this option to disable the error messages. &diams;', 'weaver-xtreme' /*adm*/); ?>
363
- </label><br /><br />
364
-
365
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_donate'); ?>" id="hide_donate" <?php checked(weaverx_getopt_checked( '_hide_donate' )); ?> />
366
- <?php _e('I\'ve Donated - <small>Thank you for donating to the Weaver Xtreme theme.
367
- This will hide the Donate button. Purchasing Weaver Xtreme Plus also hides the Donate button.</small> &diams;', 'weaver-xtreme' /*adm*/); ?>
368
- </label><br /><br />
369
-
370
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_editor_style'); ?>" id="_hide_editor_style" <?php checked(weaverx_getopt_checked( '_hide_editor_style' )); ?> />
371
- <?php _e('Disable Page/Post Editor Styling - <small>Checking this box will disable the Weaver Xtreme subtheme based styling in the Page/Post editor.
372
- If you have a theme using transparent backgrounds, this option will likely improve the Post/Page editor visibility. &diams;</small>', 'weaver-xtreme' /*adm*/); ?></label><br />
373
-
374
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_editor_font_selection'); ?>" id="_hide_editor_font_selection" <?php checked(weaverx_getopt_checked( '_hide_editor_font_selection' )); ?> />
375
- <?php _e('Disable Page/Post Font Family/Size Selection - <small>Checking this box will disable the Weaver Xtreme Plus Font Family and Size options in the Page/Post editor. This option does not apply to the base Weaver Xtreme theme. &diams;</small>', 'weaver-xtreme' /*adm*/); ?></label><br />
376
-
377
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_auto_css_rules'); ?>" id="hide_auto_css_rules" <?php checked(weaverx_getopt_checked( '_hide_auto_css_rules' )); ?> />
378
- <?php _e('Don\'t auto-display CSS rules - <small>Checking this box will disable the auto-display of Main Option elements that have CSS settings.</small> &diams;', 'weaver-xtreme' /*adm*/); ?></label><br />
379
-
380
- <input name="<?php weaverx_sapi_main_name('_css_rows'); ?>" id="css_rows" type="text" style="width:30px;" class="regular-text" value="<?php weaverx_esc_textarea(weaverx_getopt('_css_rows')); ?>" />
381
- <?php _e('lines - Set CSS+ text box height - <small>You can increase the default height of the CSS+ input area (1 to 25 lines).</small> &diams;', 'weaver-xtreme' /*adm*/); ?>
382
- <br />
383
- <br />
384
- <h3 class="atw-option-subheader"><?php _e('Per Page and Per Post Option Panels by Roles<', 'weaver-xtreme' /*adm*/); ?>/h3>
385
- <p>
386
- <?php _e('Single site Administrator and Multi-Site Super Administrator will always have the Per Page and Per Post options panel displayed.
387
- You may selectively disable these options for other User Roles using the check boxes below.', 'weaver-xtreme' /*adm*/); ?>
388
- </p>
389
-
390
-
391
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_mu_admin_per'); ?>" id="_hide_mu_admin_per" <?php checked(weaverx_getopt_checked( '_hide_mu_admin_per' )); ?> />
392
- <?php _e('Hide Per Page/Post Options for MultiSite Admins', 'weaver-xtreme' /*adm*/); ?></label> &diams;<br />
393
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_editor_per'); ?>" id="_hide_editor_per" <?php checked(weaverx_getopt_checked( '_hide_editor_per' )); ?> />
394
- <?php _e('Hide Per Page/Post Options for Editors', 'weaver-xtreme' /*adm*/); ?></label> &diams;<br />
395
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_author_per'); ?>" id="_hide_author_per" <?php checked(weaverx_getopt_checked( '_hide_author_per' )); ?> />
396
- <?php _e('Hide Per Page/Post Options for Authors and Contributors', 'weaver-xtreme' /*adm*/); ?></label> &diams;<br />
397
- <br />
398
- <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_show_per_post_all'); ?>" id="_hide_author_per" <?php checked(weaverx_getopt_checked( '_show_per_post_all' )); ?> />
399
- <?php _e('Show Per Post Options for Custom Post Types &diams; - <small>Shows the Per Post options box on "Custom Post Type Editor" admin pages', 'weaver-xtreme' /*adm*/); ?></small>
400
- </label>
401
- <br />
402
- <br /><br />
403
- <div class="atw-option-subheader"><?php _e('Theme Name and Description', 'weaver-xtreme' /*adm*/); ?></div>
404
- <p>
405
- <?php _e('You can change the name and description of your current settings if you would like to create a new theme
406
- theme file for sharing with others, or for you own identification.', 'weaver-xtreme' /*adm*/); ?>
407
- </p>
408
- <?php _e('Theme Name:', 'weaver-xtreme' /*adm*/); ?> <input name="<?php weaverx_sapi_main_name('themename'); ?>" id="themename" value="<?php echo weaverx_getopt('themename'); ?>" />
409
- <br />
410
- <?php _e('Description:', 'weaver-xtreme' /*adm*/); ?>&nbsp;&nbsp;&nbsp;
411
- <?php weaverx_textarea(weaverx_getopt('theme_description'), 'theme_description', 2, __('Describe the theme','weaver-xtreme' /*adm*/),'width:65%;'); ?>
412
- <br />
413
- <br />
414
- <h3 class="atw-option-subheader"><?php _e('Subtheme Notes', 'weaver-xtreme' /*adm*/); ?></h3>
415
- <p>
416
- <?php _e('This box may be used to keep notes and instructions about settings made for a custom subtheme.
417
- It will be saved in the both \'.wxt\' and \'.wxb\' settings files.', 'weaver-xtreme' /*adm*/); ?>
418
- </p>
419
- <?php
420
- weaverx_textarea(weaverx_getopt('subtheme_notes'), 'subtheme_notes', 2, __('Notes about theme','weaver-xtreme' /*adm*/), 'width:75%;');
421
-
422
- do_action('weaverxplus_admin','admin_options');
423
-
424
  }
425
 
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // Exit if accessed directly
5
  /* Weaver Xtreme - admin Advanced Options
6
  *
7
  * __ added: 12/9/14
8
  */
9
 
10
  function weaverx_admin_advancedopts() {
11
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
 
 
 
 
12
 
13
+ echo '<h3>';
14
+ echo __( 'Advanced Options', 'weaver-xtreme' );
15
+ echo '</h3>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
+ echo '<p>';
18
+ echo _e( '<strong style="color:red;">NOTICE!</strong> The legacy interface no longer supports the <strong>Advanced Options</strong> interface. All of the legacy Advanced Options are now found in the Customizer. Click on the following links to open the equivalent Customizer tab.', 'weaver-extreme' );
19
 
20
+ $customizer_link = 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php" rel="noopener"';
21
+ echo '</p><p>' . esc_html( 'Open the', 'weaver-xtreme' ) . ' ';
22
+ echo '<strong><a ' . $customizer_link . '>' . esc_html( 'Customizer', 'weaver-xtreme' ) . '</a></strong> ';
23
+ echo esc_html( 'menu for full top level option menus.', 'weaver-xtreme' ) . ' </p>';
24
 
25
+ if ( 'where' == get_theme_mod( '_options_interface', 'where' ) ) { // WHERE interface
26
 
27
+ echo '<hr /><h4>' . esc_html( 'You can select a link below to jump directly to a Customizer option menu using the "Where" style interface.', 'weaver-xtreme' ) . '</h4>';
28
+ } else {
29
+ echo '<hr /><h4>' . esc_html( 'You can select a link below to jump directly to a Customizer option menu using the "What" style interface.', 'weaver-xtreme' ) . '</h4>';
30
+ }
31
 
 
 
 
32
 
 
33
 
34
+ echo '<ul>';
 
35
 
36
+ echo '<li><strong><a ' .
37
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=title_tagline" rel="noopener"'
38
+ . '>' . esc_html( 'Site Identity', 'weaver-xtreme' ) . '</a></strong></li> ';
39
+ if ( 'where' == get_theme_mod( '_options_interface', 'where' ) ) { // WHERE interface
 
 
 
 
 
 
 
40
 
41
+ echo '<li><strong><a ' .
42
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=weaverx_htmlinj-head" rel="noopener"'
43
+ . '>' . esc_html( '&lt;HEAD&gt; Section', 'weaver-xtreme' ) . '</a></strong></li> ';
 
 
 
 
 
 
 
 
44
 
45
+ echo '<li><strong><a ' .
46
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=weaverx_htmlinj-injection" rel="noopener"'
47
+ . '>' . esc_html( 'HTML Insertion', 'weaver-xtreme' ) . '</a></strong></li> ';
48
 
 
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
+ } else { // WHAT
52
+ echo '<li><strong><a ' .
53
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=weaverx_content-head" rel="noopener"'
54
+ . '>' . esc_html( '&lt;HEAD&gt; Section', 'weaver-xtreme' ) . '</a></strong></li> ';
55
 
56
+ echo '<li><strong><a ' .
57
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=weaverx_content-injection" rel="noopener"'
58
+ . '>' . esc_html( 'HTML Insertion', 'weaver-xtreme' ) . '</a></strong></li> ';
 
 
 
 
 
 
 
59
 
60
+ }
61
 
62
+ echo '<li><strong><a ' .
63
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=weaverx_general_admin" rel="noopener"'
64
+ . '>' . esc_html( 'Admin and Site Options', 'weaver-xtreme' ) . '</a></strong></li> ';
65
 
66
+ echo '</ul></p>';
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  return;
69
  }
70
 
71
+ weaverx_admin_advancedopts4(); // Legacy version
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
+ if ( ! version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
75
+ require_once( dirname( __FILE__ ) . '/admin-advancedopts4.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  }
77
 
admin/admin-advancedopts4.php ADDED
@@ -0,0 +1,442 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // Exit if accessed directly
5
+ /* Weaver Xtreme - admin Advanced Options
6
+ *
7
+ * __ added: 12/9/14
8
+ */
9
+
10
+ function weaverx_admin_advancedopts4() {
11
+ ?>
12
+ <div id="tabwrap_adv" style="padding-left:5px;">
13
+ <div id="tab-container-adv" class='yetiisub'>
14
+ <ul id="tab-container-adv-nav" class='yetiisub'>
15
+ <?php if ( weaverx_allow_multisite() ) {
16
+
17
+ weaverx_elink( '#asptab0', __( 'Insert custom HTML, scripts, and CSS into &lt;HEAD&gt; section', 'weaver-xtreme' /*adm*/ ), __( '&lt;HEAD&gt; Section', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
18
+ weaverx_elink( '#asptab1', __( 'Insert custom HTML into several different page areas', 'weaver-xtreme' /*adm*/ ), __( 'HTML Insertion', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
19
+ }
20
+ weaverx_elink( '#asptab3', __( 'Options related to this site: FavIcon, Home Page, more', 'weaver-xtreme' /*adm*/ ), __( 'Site Options', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
21
+ weaverx_elink( '#asp_tab_admin', __( 'Basic Administrative Options', 'weaver-xtreme' /*adm*/ ), __( 'Admin Options', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
22
+ ?>
23
+ </ul>
24
+ <?php weaverx_tab_title( __( 'Advanced Options', 'weaver-xtreme' ), 'help.html#AdvancedOptions', __( 'Help for Advanced Options', 'weaver-xtreme' /*adm*/ ) ); ?>
25
+
26
+ <?php weaverx_sapi_submit( '', '<br /><br />' ); ?>
27
+
28
+ <!-- ***************************************************** -->
29
+ <?php if ( weaverx_allow_multisite() ) { ?>
30
+ <div id="asptab0" class="tab_adv">
31
+ <?php weaverx_adv_head_section();
32
+ ?>
33
+ </div> <!-- adtab 0 -->
34
+
35
+ <!-- ***************************************************** -->
36
+
37
+ <div id="asptab1" class="tab_adv">
38
+ <?php weaverx_adv_html_insert(); ?>
39
+ </div> <!-- asptab1 -->
40
+ <?php } // end of major section of not allowed on multisite ?>
41
+
42
+
43
+ <!-- ***************************************************** -->
44
+ <div id="asptab3" class="tab_adv">
45
+ <?php weaverx_adv_site_opts(); ?>
46
+ </div> <!-- site options -->
47
+
48
+
49
+ <!-- ***************************************************** -->
50
+
51
+ <div id="asp_tab_admin" class="tab_adv">
52
+ <?php weaverx_admin_admin_ts(); ?>
53
+ </div>
54
+
55
+ </div> <!-- tab-container-adv -->
56
+
57
+ <?php weaverx_sapi_submit(); ?>
58
+ </div> <!-- #tabwrap_adv-->
59
+
60
+ <script type="text/javascript">
61
+ var tabberAdv = new Yetii({
62
+ id: 'tab-container-adv',
63
+ tabclass: 'tab_adv',
64
+ persist: true
65
+ });
66
+ </script>
67
+ <?php
68
+ }
69
+
70
+ function weaverx_adv_head_section() {
71
+
72
+ ?>
73
+ <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-screenoptions"></span>
74
+ <?php _e( 'The Site &lt;HEAD&gt; Section', 'weaver-xtreme' /*adm*/ ); ?>
75
+ <?php weaverx_help_link( 'help.html#HeadSection', __( 'Help for site HEAD section', 'weaver-xtreme' /*adm*/ ) ); ?></div><br/>
76
+ <p>
77
+ <?php _e( 'This tab allows you to add HTML to the &lt;HEAD&gt; Section of every page on your site.', 'weaver-xtreme' /*adm*/ ); ?>
78
+ </p>
79
+ <?php if ( weaverx_allow_multisite() ) { ?>
80
+ <p><small>
81
+ <?php _e( 'PLEASE NOTE: Only minimal validation is made on the field values, so be careful not to use invalid code. Invalid code is usually harmless, but it can make your site display incorrectly. If your site looks broken after make changes here, please double check that what you entered uses valid HTML or CSS rules.', 'weaver-xtreme' /*adm*/ ); ?>
82
+ </small></p>
83
+
84
+
85
+ <!-- ======== -->
86
+
87
+ <br/><br/>
88
+ <a name="headsection" id="headsection"></a>
89
+ <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-screenoptions"></span>
90
+ <?php _e( '&lt;HEAD&gt; Section', 'weaver-xtreme' /*adm*/ ); ?></div>
91
+ <br/>
92
+ <p>
93
+ <?php _e( 'This input area allows you to enter allowed HTML head elements to the &lt;head&gt; section, including &lt;title&gt;, &lt;base&gt;, &lt;link&gt;, &lt;meta&gt;, and &lt;style&gt;.
94
+ Code entered into this box is included right before the &lt;/head&gt; HTML tag on each page of your site.
95
+ This code may <strong>not</strong> include <em>&lt;script&gt;s</em> unless you\'ve installed the Weaver Xtreme Theme Support plugin.
96
+ We recommend using dedicated WordPress plugins to add things like ad tracking, SEO tags, Facebook code, and so on.
97
+ <small>Note: You can add CSS Rules using the "Custom CSS Rules" option on the Main Options tab.', 'weaver-xtreme' /*adm*/ ) . '</small>'; ?>
98
+ </p>
99
+ <p>
100
+ <?php _e( 'For even greater control of how your site looks, you can add code the the &lt;HEAD&gt; section on a per page basis using the per page options from the page editor.', 'weaver-xtreme' /*adm*/ ); ?>
101
+ </p>
102
+ <?php weaverx_textarea( weaverx_getopt( 'head_opts' ), 'head_opts', 2, '<!-- HTML code -->', $style = 'width:95%;', $class = 'wvrx-edit' ) ?>
103
+ <br>
104
+ <small><?php _e( 'Weaver Xtreme will <em>always</em> load the jQuery Library.', 'weaver-xtreme' /*adm*/ ); ?></small>
105
+ <!-- ===================================================== -->
106
+ <br/><br/>
107
+
108
+ <a name="headsection" id="headsection"></a>
109
+ <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-screenoptions"></span>
110
+ <?php _e( '&lt;HEAD&gt; Section (Advanced Alternative - &diams;)', 'weaver-xtreme' /*adm*/ ); ?></div>
111
+
112
+ <p><small>
113
+ <?php _e( 'Same as normal &lt;HEAD&gt; box above, but works like other &diams; options - it survives changing
114
+ the subtheme from the Weaver Xtreme Subthemes tab, and is saved only on a full backup Save.
115
+ This option is not commonly used, and is intended for more advanced Weaver Xtreme users.', 'weaver-xtreme' /*adm*/ ); ?>
116
+ </small></p>
117
+ <?php weaverx_textarea( weaverx_getopt( '_althead_opts' ), '_althead_opts', 2, '<!-- HTML code -->', $style = 'width:95%;', $class = 'wvrx-edit' ) ?>
118
+ <?php
119
+ do_action( 'weaverxplus_admin', 'head_section' );
120
+ } // not multisite
121
+ }
122
+
123
+
124
+ function weaverx_adv_html_insert() {
125
+ ?>
126
+ <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-editor-code"></span>
127
+ <?php _e( 'HTML Insertion', 'weaver-xtreme' /*adm*/ ); ?>
128
+ <?php weaverx_help_link( 'help.html#HTMLInsertion', 'Help on HTML Code Insertion Areas' ); ?></div><br/>
129
+ <p>
130
+ <?php _e( 'The <b>Advanced Options&rarr;HTML Insertion</b> tab allows you to insert custom HTML code in many places on your site.
131
+ These fields allow you to add HTML code, special CSS rules, or even JavaScripts.
132
+ You will need at least a bit of knowledge of HTML coding to use these fields most effectively.', 'weaver-xtreme' /*adm*/ ); ?>
133
+ </p>
134
+ <p><small>
135
+ <?php __( 'The values you put here are saved in the WordPress database, and will survive theme upgrades and other changes.', 'weaver-xtreme' /*adm*/ ); ?>
136
+ </small></p>
137
+ <p><small>
138
+ <?php __( 'PLEASE NOTE: Only minimal validation is made on the field values, so be careful not to use invalid code.
139
+ Invalid code is usually harmless, but it can make your site display incorrectly.
140
+ If your site looks broken after make changes here, please double check that you entered valid HTML or CSS rules.', 'weaver-xtreme' /*adm*/ ); ?>
141
+ </small></p>
142
+ <hr/>
143
+ <?php
144
+
145
+ $base_areas = array(
146
+
147
+ //array('name'=>'', 'id'=>'submit', 'info' => '', 'help' => ''),
148
+
149
+ array(
150
+ 'name' => __( 'Pre-Wrapper Code', 'weaver-xtreme' /*adm*/ ),
151
+ 'id' => 'prewrapper',
152
+ 'info' =>
153
+ __( 'This code will be inserted just before the #wrapper and #branding divs, before any other site content.(Area ID: #inject_prewrapper)', 'weaver-xtreme' /*adm*/ ),
154
+ 'help' => '',
155
+ ),
156
+ array(
157
+ 'name' => __( 'Post-Footer', 'weaver-xtreme' /*adm*/ ),
158
+ 'id' => 'postfooter',
159
+ 'info' =>
160
+ __( 'This code will be inserted just after the footer #colophon div, outside the #wrapper div.(Area ID: #inject_postfooter)', 'weaver-xtreme' /*adm*/ ),
161
+ 'help' => '',
162
+ ),
163
+ );
164
+
165
+ $areas = apply_filters( 'weaverxplus_html_inject', $base_areas );
166
+
167
+ foreach ( $areas as $area => $def ) {
168
+ $name = $def['name'];
169
+
170
+ weaverx_add_html_field( $name, $def['id'], $def['info'], $def['help'],
171
+ '<span style="color:black; padding:.2em;" class="dashicons dashicons-editor-code"></span>' );
172
+ }
173
+
174
+
175
+ do_action( 'weaverxplus_admin', 'html_insertion' );
176
+ }
177
+
178
+
179
+ function weaverx_add_html_field( $title, $name, $info, $help = '', $icon = '' ) {
180
+
181
+ if ( $name == 'submit' ) {
182
+ weaverx_sapi_submit( '', "<br /><br />\n" );
183
+
184
+ return;
185
+ }
186
+
187
+ if ( $name[0] == '+' ) {
188
+ $name = substr( $name, 1 );
189
+ } // fix locally
190
+
191
+ $area_name = '' . $name . '_insert';
192
+ $hide_front = 'hide_front_' . $name;
193
+ $hide_rest = 'hide_rest_' . $name;
194
+ $style_id = 'inject_' . $name;
195
+ $add_class_id = 'inject_add_class_' . $name;
196
+
197
+ $val = array(
198
+ 'name' => $title . __( ' BG', 'weaver-xtreme' /*adm*/ ),
199
+ 'id' => $style_id . '_bgcolor',
200
+ 'info' => '<span style="margin-top:6px;" class="i-left-bg dashicons dashicons-admin-appearance"></span>' .
201
+ '<strong style="font-size:larger;">' . __( 'BG Color for area. (Add custom CSS using the CSS+ option.)', 'weaver-xtreme' /*adm*/ ) . '</strong>',
202
+ 'help' => '',
203
+ );
204
+ $classes = array(
205
+ 'name' => '<span class="i-left">{ }</span> <small>' . __( 'Add Classes', 'weaver-xtreme' /*adm*/ ) . '</small>',
206
+ 'id' => $add_class_id,
207
+ 'type' => '+widetext',
208
+ 'info' => __( 'Space separated class names to add to this area (<em>Advanced option</em>) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
209
+ );
210
+
211
+ ?>
212
+ <div class="atw-option-subheader"><?php echo $icon; ?><span style="color:blue;"><b><?php echo $title; ?></b></span></div></br />
213
+ <?php
214
+ if ( ! $info ) {
215
+ return;
216
+ }
217
+ echo $info;
218
+ ?>
219
+ <br/>
220
+ <?php weaverx_textarea( weaverx_getopt( $area_name ), $area_name, 3, __( 'Any HTML, including shortcodes.', 'weaver-xtreme' /*adm*/ ) ); ?>
221
+
222
+ <br/>
223
+ <?php
224
+ echo '<table style="width:90%;">';
225
+ weaverx_form_ctext( $val, true );
226
+ weaverx_form_text( $classes );
227
+ echo '</table>';
228
+ ?>
229
+ <label><span class="dashicons dashicons-visibility"></span>
230
+ <?php _e( 'Hide on front page:', 'weaver-xtreme' /*adm*/ ); ?>
231
+ <input type="checkbox" name="<?php weaverx_sapi_main_name( $hide_front ); ?>" id="<?php echo $hide_front; ?>" <?php checked( weaverx_getopt_checked( $hide_front ) ); ?> /></label>
232
+
233
+ <small><?php _e( 'If you check this box, then the code from this area will not be displayed on the front (home) page.', 'weaver-xtreme' /*adm*/ ); ?></small><br/>
234
+ <label><span class="dashicons dashicons-visibility"></span>
235
+ <?php _e( 'Hide on non-front pages:', 'weaver-xtreme' /*adm*/ ); ?>
236
+ <input type="checkbox" name="<?php weaverx_sapi_main_name( $hide_rest ); ?>" id="<?php echo $hide_rest; ?>" <?php checked( weaverx_getopt_checked( $hide_rest ) ); ?> /></label>
237
+ <small><?php _e( 'If you check this box, then the code from this area will not be displayed on non-front pages.', 'weaver-xtreme' /*adm*/ ); ?></small><br/><br/>
238
+ <?php
239
+ }
240
+
241
+
242
+ // ============================================== SITE OPTIONS ===========================================
243
+
244
+ function weaverx_adv_site_opts() {
245
+ ?>
246
+ <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span>
247
+ <?php _e( 'Site Options', 'weaver-xtreme' /*adm*/ ); ?>
248
+ <?php weaverx_help_link( 'help.html#AdvSiteOptions', __( 'Help on Advanced Site Options', 'weaver-xtreme' /*adm*/ ) ); ?></div><br/>
249
+ <?php _e( 'These options are available to fine tune various aspects of your site.
250
+ Technically, these features are not part of the theme styling, but cover other aspects of site functionality.', 'weaver-xtreme' /*adm*/ ); ?>
251
+ <br/>
252
+ <hr/>
253
+ <!-- ======== -->
254
+ <?php
255
+ if ( weaverx_f_file_access_available() ) {
256
+ ?>
257
+ <h3><?php _e( 'Inline CSS - (Xtreme-Plus Option)', 'weaver-xtreme' /*adm*/ ); ?></h3>
258
+
259
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_inline_style' ); ?>" id="_inline_style" <?php checked( weaverx_getopt_checked( '_inline_style' ) ); ?> />
260
+ <?php _e( 'Generate inline CSS code rather than using style-weaverxt.css file.
261
+ By default, Weaver Xtreme Plus will use the style-weaverxt.css file. &diams;', 'weaver-xtreme' /*adm*/ ); ?>
262
+ </label><br/><br/>
263
+ <?php
264
+ }
265
+ ?>
266
+ <h3><?php _e( 'Disable Schema.org Structured Data', 'weaver-xtreme' /*adm*/ ); ?></h3>
267
+
268
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_no_schemea' ); ?>" id="_no_schemea" <?php checked( weaverx_getopt_checked( '_no_schemea' ) ); ?> />
269
+ <?php _e( 'Disable adding Schema.org structured data. (We do not recommend removing this SEO feature.) &diams;', 'weaver-xtreme' /*adm*/ ); ?>
270
+ </label><br/><br/>
271
+
272
+ <h3><?php _e( 'Include Widget Areas in Print', 'weaver-xtreme' /*adm*/ ); ?></h3>
273
+
274
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_print_show_widgets' ); ?>" id="_print_show_widgets" <?php checked( weaverx_getopt_checked( '_print_show_widgets' ) ); ?> />
275
+ <?php _e( 'Include all widget areas and full Footer content on browser Print page operation. &diams;', 'weaver-xtreme' /*adm*/ ); ?>
276
+ </label><br/><br/>
277
+
278
+ <br/>
279
+ <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-format-image"></span><span style="color:blue;font-size:larger;">
280
+ <b><?php _e( 'FavIcon', 'weaver-xtreme' /*adm*/ ); ?></b></span></div></br />
281
+ <p>
282
+ <?php _e( 'You can add a FavIcon to your site with this option.
283
+ The preferred FavIcon is in the <code>.ico</code> format which has the most universal browser compatibility.
284
+ However, <code>.png, .gif, and .jpg</code> will work for most modern browsers.
285
+ The standard sizes are 16x16, 32x32, or 48x48 px.
286
+ You can alternatively load a <code>favicon.ico</code> file to the root directory of your site. &diams;', 'weaver-xtreme' /*adm*/ ); ?>
287
+ </p>
288
+ <p>
289
+ <?php
290
+ $icon = weaverx_getopt( '_favicon_url' );
291
+ if ( $icon != '' ) {
292
+ echo '<img src="' . esc_url( $icon ) . '" alt="favicon" />&nbsp;';
293
+ }
294
+ ?>
295
+ <strong><?php _e( 'FavIcon URL:', 'weaver-xtreme' /*adm*/ ); ?> </strong>
296
+ <?php weaverx_textarea( weaverx_getopt( '_favicon_url' ), '_favicon_url', 1, 'URL ', $style = 'width:350px;' ); ?>
297
+ <?php weaverx_media_lib_button( '_favicon_url' ); ?>&nbsp;&nbsp;<?php _e( 'Full path to FavIcon', 'weaver-xtreme' /*adm*/ ); ?>
298
+ </p><br/>
299
+
300
+ <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-page"></span><span style="color:blue;font-size:larger;">
301
+ <b><?php _e( 'Exclude Pages from SiteMap', 'weaver-xtreme' /*adm*/ ); ?></b></span></div></br />
302
+ <p>
303
+ <?php _e( 'You can specify a comma separated list of Page IDs to be excluded from the SiteMap Page list.
304
+ To exclude pages from Search results, use a plugin such as "Search Exclude".
305
+ You can hide different sections of the SiteMap by adding rules to the "Custom CSS Rules" box.
306
+ To hide authors, for example, add the rule <code>#sitemap-authors{display:none;}</code>.
307
+ The IDs for the SiteMap sections are: <code>#sitemap-pages, #sitemap-posts, #sitemap-categories, #sitemap-tags, #sitemap-authors</code>', 'weaver-xtreme' /*adm*/ ); ?>
308
+ </p>
309
+ <p>
310
+ <?php
311
+ $exclude = weaverx_getopt( '_sitemap_exclude_pages' );
312
+
313
+ ?>
314
+ <strong><?php _e( 'Exclude Pages from SiteMap', 'weaver-xtreme' /*adm*/ ); ?>: </strong>
315
+ <?php weaverx_textarea( weaverx_getopt( '_sitemap_exclude_pages' ), '_sitemap_exclude_pages', 1, '1,2,3', $style = 'width:350px;' ); ?>
316
+ </p><br/>
317
+
318
+
319
+ <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-hammer"></span>
320
+ <span style="color:blue;font-size:larger;">
321
+ <b><?php _e( 'SEO - Search Engine Optimization', 'weaver-xtreme' /*adm*/ ); ?></b>
322
+ </span></div><br/>
323
+ <p>
324
+ <?php _e( 'The Weaver Xtreme Theme has been designed to follow the latest SEO guidelines.
325
+ Each non-home page will use the recommended "Page Title | Site Title" format, and the site is formatted using the appropriate HTML5 tags for optimal SEO performance.
326
+ An SEO plugin may help you optimize your site for SEO, but is not required.
327
+ See the <em>Help</em> tab for recommended SEO plugins.', 'weaver-xtreme' /*adm*/ ); ?>
328
+ </p><br/>
329
+
330
+ <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-home"></span>
331
+ <span style="color:blue;font-size:larger;">
332
+ <b><?php _e( 'Home Page', 'weaver-xtreme' /*adm*/ ); ?></b>
333
+ </span></div>
334
+ <p>
335
+ <?php _e( 'WordPress allows you to specify what page is used for your home page - either the standard WordPress blog, or a static page (which can be a Weaver Xtreme "Page with Posts" page).
336
+ Please see the Weaver Xtreme Help topic for a more complete explanation.', 'weaver-xtreme' /*adm*/ ); ?>
337
+ </p>
338
+ <p>
339
+ <?php _e( 'You can set the front page on the Dashboard <em>Settings&rarr;Reading panel</em>:', 'weaver-xtreme' /*adm*/ ); ?>
340
+ <a href="<?php echo esc_url( home_url( '/' ) . 'wp-admin/options-reading.php' ); ?>">
341
+ <strong><?php _e( 'Set Front Page Displays', 'weaver-xtreme' /*adm*/ ); ?></strong></a></p><br/>
342
+
343
+ <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-users"></span>
344
+ <span style="color:blue;font-size:larger;">
345
+ <b><?php _e( 'Author Avatars', 'weaver-xtreme' /*adm*/ ); ?></b>
346
+ </span></div>
347
+ <p>
348
+ <?php _e( 'For the best look, your site should support Avatars - a small image associated with a contributors e-mail address.
349
+ Gravatar.com is probably the most popular Avatar support, and is closely associated with WordPress.
350
+ You should set up a Gravatar for the main authors of your blog.
351
+ For contributors without any avatar, WordPress will automatically generate an avatar.
352
+ See the <strong>Settings &rarr; Discussion</strong> admin page for avatar settings.', 'weaver-xtreme' /*adm*/ ); ?>
353
+ </p>
354
+ <hr/>
355
+ <?php
356
+ do_action( 'weaverxplus_admin', 'site_opts' );
357
+ do_action( 'weaverx_child_siteoptions' );
358
+ }
359
+
360
+
361
+ function weaverx_admin_admin_ts() {
362
+ ?>
363
+ <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span>
364
+ <?php _e( 'Basic Administrative Options', 'weaver-xtreme' /*adm*/ ); ?>
365
+ <?php weaverx_help_link( 'help.html#AdminOptions', 'Help for Admin Options' ); ?></div>
366
+
367
+ <p>
368
+ <?php _e( 'These options control some administrative options and appearance features.', 'weaver-xtreme' /*adm*/ ); ?>
369
+ </p>
370
+
371
+ <br/>
372
+
373
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_disable_customizer' ); ?>" id="disable_customizer" <?php checked( weaverx_getopt_checked( '_disable_customizer' ) ); ?> />
374
+ <?php _e( '<strong>Disable Weaver Xtreme Customizer Interface</strong> - If you have a slow host or slow computer, checking this option will disable loading the Weaver Xtreme Customizer interface. &diams;', 'weaver-xtreme' /*adm*/ ); ?>
375
+ </label><br/><br/>
376
+
377
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_ignore_PHP_memory' ); ?>" id="disable_customizer" <?php checked( weaverx_getopt_checked( '_ignore_PHP_memory' ) ); ?> />
378
+ <?php _e( '<strong>Ignore Customizer PHP Minimum Memory</strong> - If your host PHP memory is too low, it will cause an error message for using the Customizer. If your configuration still works properly with low PHP memory, check this option to disable the error messages. &diams;', 'weaver-xtreme' /*adm*/ ); ?>
379
+ </label><br/><br/>
380
+
381
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_donate' ); ?>" id="hide_donate" <?php checked( weaverx_getopt_checked( '_hide_donate' ) ); ?> />
382
+ <?php _e( 'I\'ve Donated - <small>Thank you for donating to the Weaver Xtreme theme.
383
+ This will hide the Donate button. Purchasing Weaver Xtreme Plus also hides the Donate button.</small> &diams;', 'weaver-xtreme' /*adm*/ ); ?>
384
+ </label><br/><br/>
385
+
386
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_editor_style' ); ?>" id="_hide_editor_style" <?php checked( weaverx_getopt_checked( '_hide_editor_style' ) ); ?> />
387
+ <?php _e( 'Disable Page/Post Editor Styling - <small>Checking this box will disable the Weaver Xtreme subtheme based styling in the Page/Post editor.
388
+ If you have a theme using transparent backgrounds, this option will likely improve the Post/Page editor visibility. &diams;</small>', 'weaver-xtreme' /*adm*/ ); ?></label><br/>
389
+
390
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_editor_font_selection' ); ?>" id="_hide_editor_font_selection" <?php checked( weaverx_getopt_checked( '_hide_editor_font_selection' ) ); ?> />
391
+ <?php _e( 'Disable Page/Post Font Family/Size Selection - <small>Checking this box will disable the Weaver Xtreme Plus Font Family and Size options in the Page/Post editor. This option does not apply to the base Weaver Xtreme theme. &diams;</small>', 'weaver-xtreme' /*adm*/ ); ?>
392
+ </label><br/>
393
+
394
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_auto_css_rules' ); ?>" id="hide_auto_css_rules" <?php checked( weaverx_getopt_checked( '_hide_auto_css_rules' ) ); ?> />
395
+ <?php _e( 'Don\'t auto-display CSS rules - <small>Checking this box will disable the auto-display of Main Option elements that have CSS settings.</small> &diams;', 'weaver-xtreme' /*adm*/ ); ?></label><br/>
396
+
397
+ <input name="<?php weaverx_sapi_main_name( '_css_rows' ); ?>" id="css_rows" type="text" style="width:30px;" class="regular-text" value="<?php weaverx_esc_textarea( weaverx_getopt( '_css_rows' ) ); ?>"/>
398
+ <?php _e( 'lines - Set CSS+ text box height - <small>You can increase the default height of the CSS+ input area (1 to 25 lines).</small> &diams;', 'weaver-xtreme' /*adm*/ ); ?>
399
+ <br/>
400
+ <br/>
401
+ <h3 class="atw-option-subheader"><?php _e( 'Per Page and Per Post Option Panels by Roles<', 'weaver-xtreme' /*adm*/ ); ?>/h3>
402
+ <p>
403
+ <?php _e( 'Single site Administrator and Multi-Site Super Administrator will always have the Per Page and Per Post options panel displayed.
404
+ You may selectively disable these options for other User Roles using the check boxes below.', 'weaver-xtreme' /*adm*/ ); ?>
405
+ </p>
406
+
407
+
408
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_mu_admin_per' ); ?>" id="_hide_mu_admin_per" <?php checked( weaverx_getopt_checked( '_hide_mu_admin_per' ) ); ?> />
409
+ <?php _e( 'Hide Per Page/Post Options for MultiSite Admins', 'weaver-xtreme' /*adm*/ ); ?></label> &diams;<br/>
410
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_editor_per' ); ?>" id="_hide_editor_per" <?php checked( weaverx_getopt_checked( '_hide_editor_per' ) ); ?> />
411
+ <?php _e( 'Hide Per Page/Post Options for Editors', 'weaver-xtreme' /*adm*/ ); ?></label> &diams;<br/>
412
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_author_per' ); ?>" id="_hide_author_per" <?php checked( weaverx_getopt_checked( '_hide_author_per' ) ); ?> />
413
+ <?php _e( 'Hide Per Page/Post Options for Authors and Contributors', 'weaver-xtreme' /*adm*/ ); ?></label> &diams;<br/>
414
+ <br/>
415
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name( '_show_per_post_all' ); ?>" id="_hide_author_per" <?php checked( weaverx_getopt_checked( '_show_per_post_all' ) ); ?> />
416
+ <?php _e( 'Show Per Post Options for Custom Post Types &diams; - <small>Shows the Per Post options box on "Custom Post Type Editor" admin pages', 'weaver-xtreme' /*adm*/ ); ?></small>
417
+ </label>
418
+ <br/>
419
+ <br/><br/>
420
+ <div class="atw-option-subheader"><?php _e( 'Theme Name and Description', 'weaver-xtreme' /*adm*/ ); ?></div>
421
+ <p>
422
+ <?php _e( 'You can change the name and description of your current settings if you would like to create a new theme
423
+ theme file for sharing with others, or for you own identification.', 'weaver-xtreme' /*adm*/ ); ?>
424
+ </p>
425
+ <?php _e( 'Theme Name:', 'weaver-xtreme' /*adm*/ ); ?> <input name="<?php weaverx_sapi_main_name( 'themename' ); ?>" id="themename" value="<?php echo weaverx_getopt( 'themename' ); ?>"/>
426
+ <br/>
427
+ <?php _e( 'Description:', 'weaver-xtreme' /*adm*/ ); ?>&nbsp;&nbsp;&nbsp;
428
+ <?php weaverx_textarea( weaverx_getopt( 'theme_description' ), 'theme_description', 2, __( 'Describe the theme', 'weaver-xtreme' /*adm*/ ), 'width:65%;' ); ?>
429
+ <br/>
430
+ <br/>
431
+ <h3 class="atw-option-subheader"><?php _e( 'Subtheme Notes', 'weaver-xtreme' /*adm*/ ); ?></h3>
432
+ <p>
433
+ <?php _e( 'This box may be used to keep notes and instructions about settings made for a custom subtheme.
434
+ It will be saved in the both \'.wxt\' and \'.wxb\' settings files.', 'weaver-xtreme' /*adm*/ ); ?>
435
+ </p>
436
+ <?php
437
+ weaverx_textarea( weaverx_getopt( 'subtheme_notes' ), 'subtheme_notes', 2, __( 'Notes about theme', 'weaver-xtreme' /*adm*/ ), 'width:75%;' );
438
+
439
+ do_action( 'weaverxplus_admin', 'admin_options' );
440
+
441
+ }
442
+
admin/admin-lib-ts-2.php CHANGED
@@ -449,7 +449,7 @@ function weaverx_form_widget_area( $value, $submit = false ) {
449
  'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'Align Area', 'weaver-xtreme' /*adm*/ ) . '</small>',
450
  'id' => $id . '_align',
451
  'type' => '',
452
- 'info' => '<em>' . $name . '</em>' . __( ': How to align this area (Default: Center)', 'weaver-xtreme'),
453
  )
454
  );
455
 
@@ -1333,6 +1333,11 @@ to create rules for specific devices.
1333
  <em>!important</em> with your rules to force the style override.
1334
  It is possible that other plugins might generate CSS that comes after these rules.', 'weaver-xtreme' /*adm*/ ); ?>
1335
  </p>
 
 
 
 
 
1336
  <?php weaverx_textarea( weaverx_getopt( 'add_css' ), 'add_css', 12, '', 'width:95%;', 'wvrx-edit wvrx-edit-dir' ); ?>
1337
 
1338
  </td>
449
  'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'Align Area', 'weaver-xtreme' /*adm*/ ) . '</small>',
450
  'id' => $id . '_align',
451
  'type' => '',
452
+ 'info' => '<em>' . $name . '</em>' . __( ': How to align this area (Default: Center)', 'weaver-xtreme' ),
453
  )
454
  );
455
 
1333
  <em>!important</em> with your rules to force the style override.
1334
  It is possible that other plugins might generate CSS that comes after these rules.', 'weaver-xtreme' /*adm*/ ); ?>
1335
  </p>
1336
+ <p>
1337
+ <?php $customcss = '<a href="' . site_url('/wp-admin/')
1338
+ . 'customize.php?autofocus%5Bcontrol%5D=custom_css">'; ?>
1339
+ Click <?php echo ($customcss . 'HERE</a>'); ?> to use WordPress Global "Additional CSS" instead'
1340
+ </p>
1341
  <?php weaverx_textarea( weaverx_getopt( 'add_css' ), 'add_css', 12, '', 'width:95%;', 'wvrx-edit wvrx-edit-dir' ); ?>
1342
 
1343
  </td>
admin/admin-lib-ts.php CHANGED
@@ -3,50 +3,56 @@
3
  //
4
  function weaverx_process_options_themes() {
5
 
6
- if (weaverx_submitted('set_subtheme')) { // invoked from Weaver Xtreme Subthemes tab (this file)
7
- if (isset($_POST['theme_picked'])) {
8
- $theme = weaverx_filter_textarea($_POST['theme_picked']);
9
-
10
- if (weaverx_activate_subtheme($theme))
11
- weaverx_save_msg(__("Subtheme Selected: ", 'weaver-xtreme' /*adm*/) . $theme );
12
- else
13
- weaverx_save_msg(__("Invalid Subtheme file detected. Your installation of Weaver Xtreme may be broken.", 'weaver-xtreme' /*adm*/));
 
14
  } else {
15
- weaverx_save_msg(__("Please select a subtheme.", 'weaver-xtreme' /*adm*/));
16
  }
 
17
  return true;
18
  }
19
 
20
- if (weaverx_submitted('save_mytheme')) { // invoked from Save/Restore tab
21
- weaverx_save_msg(__("Current settings saved in WordPress database.", 'weaver-xtreme' /*adm*/));
22
  global $weaverx_opts_cache;
23
- if (!$weaverx_opts_cache) {
24
  $func_opt = WEAVER_GET_OPTION;
25
- $weaverx_opts_cache = $func_opt( apply_filters('weaverx_options',WEAVER_SETTINGS_NAME) ,array());
26
  }
27
- if (current_user_can( 'manage_options' )) {
28
- $compressed = array_filter( $weaverx_opts_cache, 'strlen'); // filter out all null options (strlen == 0)
29
- update_option(apply_filters('weaverx_options','weaverx_settings_backup'),$compressed);
30
- if ( apply_filters('weaverx_xtra_type', '+backup' ) != 'inactive')
31
- delete_option('weaverx_plus_backup');
 
32
  }
 
33
  return true;
34
  }
35
 
36
- if (weaverx_submitted('restore_mytheme')) { // invoked from Save/Restore tab
37
  global $weaverx_opts_cache;
38
- $saved = get_option( apply_filters('weaverx_options','weaverx_settings_backup') ,array());
39
- if (!empty($saved)) {
40
  $weaverx_opts_cache = $saved;
41
- weaverx_wpupdate_option('weaverx_settings',$weaverx_opts_cache);
42
  }
43
- weaverx_save_msg(__("Current settings restored from WordPress database.", 'weaver-xtreme' /*adm*/));
 
44
  return true;
45
  }
46
 
47
- if (weaverx_submitted('hide_thumbs')) {
48
- $hide = weaverx_getopt('_hide_theme_thumbs');
49
- weaverx_setopt('_hide_theme_thumbs', !$hide);
 
50
  return true;
51
  }
52
 
@@ -54,32 +60,35 @@ function weaverx_process_options_themes() {
54
  if ( weaverx_submitted( 'weaverx_clear_messages' ) ) {
55
  return true;
56
  }
57
- if (weaverx_submitted('reset_weaverx')) {
58
- if (! current_user_can('manage_options'))
59
- wp_die(__('You do not have the capability to do that.', 'weaver-xtreme' /*adm*/));
 
60
  // delete everything!
61
- weaverx_save_msg(__('All Weaver Xtreme settings have been reset to the defaults.','weaver-xtreme'));
62
- delete_option( apply_filters('weaverx_options','weaverx_settings') );
63
  global $weaverx_opts_cache;
64
- $weaverx_opts_cache = false; // clear the cache
65
- weaverx_init_opts('reset_weaverx');
66
- delete_option( apply_filters('weaverx_options','weaverx_settings_backup') );
67
 
68
- do_action('weaverxplus_admin','reset_weaverxplus');
69
 
70
  update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice', 0 ); // reset the dismiss on the plugin loader
 
71
  return true;
72
  }
73
 
74
- if (weaverx_submitted('uploadtheme') && function_exists('weaverx_loadtheme')) {
75
  weaverx_loadtheme();
 
76
  return true;
77
  }
78
 
79
  return false;
80
  }
81
 
82
- function weaverx_activate_subtheme($theme) {
83
  /* load settings for specified theme */
84
  global $weaverx_opts_cache;
85
 
@@ -97,285 +106,304 @@ function weaverx_activate_subtheme($theme) {
97
  $filename = get_template_directory() . '/subthemes/' . $theme . $ext;
98
 
99
  if ( ! weaverx_f_exists( $filename ) ) {
100
- $filename = str_replace('.wxt', '.wxb', $filename);
101
- if ( ! weaverx_f_exists( $filename ) )
102
  return false;
103
- else
104
  $ext = '.wxb';
 
105
  }
106
 
107
- $contents = weaverx_f_get_contents($filename); // use either real (pro) or file (standard) version of function
108
 
109
- if (empty($contents)) return false;
 
 
110
 
111
- if ( substr($contents,0,10) != 'WXT-V01.00' && substr($contents,0,10) != 'WVA-V01.00') {
112
- if ($ext == '.wxb' && substr($contents,0,10) != 'WXB-V01.00' && substr($contents,0,10) != 'WVB-V01.00')
113
  return false;
 
114
  }
115
 
116
  $restore = array();
117
- $restore = unserialize(substr($contents,10));
118
 
119
- if (!$restore) return false;
120
- $version = weaverx_getopt('weaverx_version_id'); // get something to force load
 
 
121
 
122
  // need to clear some settings
123
  // first, pickup the per-site settings that aren't theme related...
124
  $new_cache = array();
125
  if ( $ext == '.wxt' ) {
126
- foreach ($weaverx_opts_cache as $key => $val) {
127
- if ($key[0] == '_') { // these are non-theme specific settings
128
- $new_cache[$key] = $weaverx_opts_cache[$key]; // clear
129
  }
130
  }
131
  }
132
 
133
- $opts = $restore['weaverx_base']; // fetch base opts
134
  weaverx_delete_all_options();
135
 
136
- foreach ($new_cache as $key => $val) { // set the values we need to keep
137
- weaverx_setopt($key,$new_cache[$key],false);
138
  }
139
- foreach ($opts as $key => $val) {
140
- if ($key[0] == '_' && $ext != '.wxb' )
141
- continue; // should be here
142
- weaverx_setopt($key, $val, false); // overwrite with saved theme values
 
143
  }
144
 
145
- weaverx_setopt('theme_filename',$theme);
146
- weaverx_setopt('last_option','Weaver Xtreme');
 
 
147
 
148
- weaverx_save_opts('set subtheme'); // OK, now we've saved the options, update them in the DB
149
  return true;
150
  }
151
 
152
  //================= moved from old lib-admin ================
153
  //============================================ form builder ====================================
154
 
155
- function weaverx_form_show_options($weaverx_olist, $begin_table = true, $end_table = true) {
156
  /* output a list of options - this really does the layout for the options defined in an array */
157
- if ($begin_table) {
158
- ?>
159
- <div>
160
- <table class="optiontable" style="margin-top:6px;">
161
- <?php
162
- }
163
- foreach ($weaverx_olist as $value) {
164
- $value['type'] = weaverx_fix_type($value['type']);
165
- switch ($value['type']) {
166
  case 'align':
167
- weaverx_form_align($value);
168
  break;
169
  case 'align_standard':
170
- weaverx_form_align_standard($value);
171
  break;
172
  case 'break':
173
- weaverx_form_break($value);
174
  break;
175
  case 'checkbox':
176
- weaverx_form_checkbox($value);
177
  break;
178
  case 'ctext':
179
- weaverx_form_ctext($value);
180
  break;
181
  case 'color':
182
- weaverx_form_color($value);
183
  break;
184
  case 'custom_css':
185
- weaverx_custom_css($value);
186
  break;
187
  case 'endheader':
188
  echo '<!-- end header -->';
189
  break;
190
  case 'fi_align':
191
- weaverx_form_fi_align($value);
192
  break;
193
  case 'fi_location':
194
- weaverx_from_fi_location($value);
195
  break;
196
  case 'fi_location_post':
197
- weaverx_from_fi_location($value, true);
198
  break;
199
  case 'fixedtop':
200
- weaverx_form_fixedtop($value);
201
  break;
202
  case 'header':
203
- weaverx_form_header($value);
204
  break;
205
  case 'header_area':
206
- weaverx_form_header_area($value);
207
  break;
208
  case 'header0':
209
- weaverx_form_header($value,true);
210
  break;
211
  case 'inactive':
212
- weaverx_form_inactive($value);
213
  break;
214
  case 'link':
215
- weaverx_form_link($value);
216
  break;
217
  case 'menu_opts':
218
- weaverx_form_menu_opts($value, false);
219
  break;
220
  case 'menu_opts_submit':
221
- weaverx_form_menu_opts($value, true);
222
  break;
223
  case 'note':
224
- weaverx_form_note($value);
225
  break;
226
  case 'radio':
227
- weaverx_form_radio($value);
228
  break;
229
  case 'rounded':
230
- weaverx_form_rounded($value);
231
  break;
232
  case 'select_hide':
233
- weaverx_form_select_hide($value);
234
  break;
235
  case 'select_id':
236
- weaverx_form_select_id($value);
237
  break;
238
  case 'select_alt_theme':
239
- weaverx_form_select_alt_theme($value);
240
  break;
241
  case 'select_layout':
242
- weaverx_form_select_layout($value);
243
  break;
244
  case 'shadows':
245
- weaverx_form_shadows($value);
246
  break;
247
  case 'subheader':
248
- weaverx_form_subheader($value);
249
  break;
250
  case 'subheader_alt':
251
- weaverx_form_subheader_alt($value);
252
  break;
253
  case 'submit':
254
- weaverx_form_submit($value);
255
  break;
256
  case 'text':
257
  case 'widetext':
258
- weaverx_form_text($value);
259
  break;
260
  case 'text_xy':
261
- weaverx_form_text_xy($value);
262
  break;
263
  case 'text_xy_em':
264
- weaverx_form_text_xy($value,'X','Y','em');
265
  break;
266
  case 'text_xy_percent':
267
- weaverx_form_text_xy($value,'X','Y','%');
268
  break;
269
  case 'text_tb':
270
- weaverx_form_text_xy($value,'T','B');
271
  break;
272
  case 'text_lr':
273
- weaverx_form_text_xy($value,'L','R');
274
  break;
275
  case 'text_lr_em':
276
- weaverx_form_text_xy($value,'L','R','em');
277
  break;
278
  case 'text_lr_percent':
279
- weaverx_form_text_xy($value,'L','R','%');
280
  break;
281
  case 'textarea':
282
- weaverx_form_textarea($value);
283
  break;
284
  case 'titles':
285
- weaverx_form_text_props($value, 'titles');
286
  break;
287
  case 'titles_area':
288
- weaverx_form_text_props($value, 'area');
289
  break;
290
  case 'titles_content':
291
- weaverx_form_text_props($value, 'content');
292
  break;
293
  case 'titles_menu':
294
- weaverx_form_text_props($value, 'menu');
295
  break;
296
  case 'titles_text':
297
- weaverx_form_text_props($value, 'text');
298
  break;
299
  case 'val_num':
300
- weaverx_form_val($value,'');
301
  break;
302
  case 'val_percent':
303
- weaverx_form_val($value,'%');
304
  break;
305
  case 'val_px':
306
- weaverx_form_val($value,'px');
307
  break;
308
  case 'val_em':
309
- weaverx_form_val($value,'em');
310
  break;
311
  case 'widget_area':
312
- weaverx_form_widget_area($value, false);
313
  break;
314
  case 'widget_area_submit':
315
- weaverx_form_widget_area($value, true);
316
  break;
317
  default:
318
- weaverx_form_subheader_alt($value);
319
  break;
320
  }
321
 
322
  }
323
- if ($end_table) {
324
- ?>
325
- </table></div> <!-- close previous tab div -->
326
- <br />
327
- <?php
328
  }
329
  }
330
 
331
- function weaverx_fix_type($type) {
332
- return apply_filters('weaverx_xtra_type', $type );
333
  }
334
 
335
- function weaverx_form_inactive($value, $reason= '') {
336
- if ( $reason == '' )
337
- $reason = '<small>' . __('Weaver Xtreme Plus Options', 'weaver-xtreme' /*adm*/) . '&nbsp;</small>';
338
- if (!isset($value['name']) || !isset($value['id']) || !isset($value['info'])) { // probably an '=submit'
 
339
  return;
340
  }
341
  $title = $value['name'];
342
- if (strlen($title) < 1) $title = ' '; // make code work for invisibles
343
- if ($title[0] == '#')
344
- $title = substr($title,4); // strip color
 
 
 
345
  echo ' <tr>' . "\n";
346
- ?>
347
- <th scope="row" style="width:200px;"><?php /* NO SAPI SETTING */
348
- echo '<span style="color:#777;float:right;">'.$title.':&nbsp;</span>';
349
- if (!empty($value['help'])) {
350
- weaverx_help_link($value['help'], __('Help for ', 'weaver-xtreme' /*adm*/) . $title);
351
- }
352
- ?>
353
- </th>
354
- <td style="color:#777;"><?php echo $reason; ?>
355
- <input type="hidden" name="<?php weaverx_sapi_main_name($value['id']); ?>" id="<?php echo $value['id']; ?>" value="<?php if ( weaverx_getopt( $value['id'] ) != "") { weaverx_esc_textarea(weaverx_getopt( $value['id'] )); } else { echo ''; } ?>" />
356
- </td>
357
- <?php
358
- if ($value['info'] != '') {
359
- echo('<td style="padding-left:10px;color:#777;font-size:x-small;">'); echo $value['info'];
360
- echo("</td>\n");
361
  }
362
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  </tr>
364
- <?php
365
  }
366
 
367
 
368
- function weaverx_echo_name($value, $add_icon = '') {
369
  $l = $add_icon . $value['name'];
370
- if (isset($value['id']))
371
  $icon = $value['id'];
372
- if ( !isset($icon) || !$icon )
 
373
  $icon = ' ';
374
- if (strlen($l) > 4 && $l[0] == '#') {
375
- echo '<span style="color:' . substr($l,0,4) .
376
- ';">' . substr($l,4) . '</span>';
377
- } else if ( $icon[0] == '-' ) { // add a leading icon
378
- echo '<span class="dashicons dashicons-' . substr( $icon, 1) . '">' . $l . '</span>';
 
379
  } else {
380
  echo $l;
381
  }
@@ -384,69 +412,76 @@ function weaverx_echo_name($value, $add_icon = '') {
384
  function weaverx_form_ctext( $value, $val_only = false ) {
385
 
386
  $pclass = 'color {hash:true, adjust:false}'; // starting with V 1.3, allow text in color pickers
387
- $img_css = '<img src="'. esc_url(get_template_directory_uri() . '/assets/images/theme/css.png') . '" alt="css" />' ;
388
- $img_hide = esc_url(get_template_directory_uri() . '/assets/images/theme/hide.png') ;
389
- $img_show = esc_url(get_template_directory_uri() . '/assets/images/theme/show.png') ;
390
- $help_file = esc_url(get_template_directory_uri() . '/help/css-help.html');
391
  $css_id = $value['id'] . '_css';
392
- $css_id_text = weaverx_getopt($css_id);
393
- if ($css_id_text && !weaverx_getopt( '_hide_auto_css_rules' )) {
394
  $img_toggle = $img_hide;
395
  } else {
396
  $img_toggle = $img_show;
397
  }
398
  $add_icon = '<span class="i-left-bg dashicons dashicons-admin-appearance"></span>';
399
- if (strpos($value['name'], ' BG') === false)
400
  $add_icon = '<span class="i-left-fg dashicons dashicons-admin-appearance"></span>';
 
401
  if ( ! $val_only ) { ?>
402
- <tr>
403
- <th scope="row" align="right"><?php weaverx_echo_name($value, $add_icon ); ?>:&nbsp;</th>
404
- <td> <?php
405
  } else {
406
  echo '&nbsp;<small>' . $value['info'] . '</small>&nbsp;';
407
  } ?>
408
- <input class="<?php echo $pclass; ?>" name="<?php weaverx_sapi_main_name($value['id']); ?>" id="<?php echo $value['id']; ?>" type="text" style="width:90px" value="<?php if ( weaverx_getopt( $value['id'] ) != "") { weaverx_esc_textarea(weaverx_getopt( $value['id'] )); } else { echo ''; } ?>" />
409
- <?php
410
- echo $img_css; ?><a href="javascript:void(null);" onclick="weaverx_ToggleRowCSS(document.getElementById('<?php echo $css_id . '_js'; ?>'), this, '<?php echo $img_show; ?>', '<?php echo $img_hide; ?>')"><?php echo '<img src="' . esc_url($img_toggle) . '" alt="toggle css" />'; ?></a>
411
- <?php if ( ! $val_only ) { ?>
412
- </td>
413
- <?php weaverx_form_info($value);
414
- ?>
415
- </tr>
416
- <?php }
417
- $css_rows = weaverx_getopt('_css_rows');
418
- if ($css_rows < 1 || $css_rows > 25)
 
 
 
 
 
419
  $css_rows = 1;
420
- if ($css_id_text && !weaverx_getopt( '_hide_auto_css_rules' )) { ?>
421
- <tr id="<?php echo $css_id . '_js'; ?>">
422
- <th scope="row" align="right"><span style="color:#22a;"><small><?php _e('Custom CSS styling:', 'weaver-xtreme' /*adm*/); ?></small></span></th>
423
- <td align="right"><small>&nbsp;</small></td>
424
- <td>
425
- <small>
426
- <?php _e('You can enter CSS rules, enclosed in {}\'s, and separated by <strong>;</strong>. See ', 'weaver-xtreme' /*adm*/); ?>
427
- <a href="<?php echo $help_file; ?>" target="_blank"><?php _e('CSS Help', 'weaver-xtreme' /*adm*/); ?></a> <?php _e('for more details.', 'weaver-xtreme' /*adm*/); ?></small><br />
428
- <?php weaverx_textarea( $css_id_text, $css_id, $css_rows,'{ font-size:150%; font-weight:bold; } /* for example */' ); ?>
429
- </td>
430
- </tr>
431
- <?php
 
432
  } else {
433
- ?>
434
- <tr id="<?php echo $css_id . '_js'; ?>" style="display:none;">
435
- <th scope="row" align="right"><span style="color:green;"><small><?php _e('Custom CSS styling:', 'weaver-xtreme' /*adm*/); ?></small></span></th>
436
- <td align="right"><small>&nbsp;</small></td>
437
- <td>
438
- <small>
439
- <?php _e('You can enter CSS rules, enclosed in {}\'s, and separated by <strong>;</strong>. See', 'weaver-xtreme' /*adm*/); ?>
440
- <a href="<?php echo $help_file; ?>" target="_blank"><?php _e('CSS Help', 'weaver-xtreme' /*adm*/); ?></a> for more details.</small><br />
441
- <?php weaverx_textarea( $css_id_text, $css_id, $css_rows,'{ font-size:150%; font-weight:bold; } /* for example */' ); ?>
442
- </td>
443
- </tr>
444
- <?php
445
  }
446
  }
447
 
448
- function weaverx_textarea($text, $id, $rows = 0, $place = '', $style = 'width:85%;', $class='wvrx-edit', $filter = true) {
449
- $name = weaverx_sapi_main_name($id, false);
450
  /* if ($text) {
451
  $newrows = count((explode("\n",$text)))+1;
452
  if ($newrows > $rows)
@@ -455,288 +490,357 @@ function weaverx_textarea($text, $id, $rows = 0, $place = '', $style = 'width:85
455
  if ( $rows < 2 ) {
456
  $rows = 1;
457
  }
458
- if ($rows > 25) $rows = 25;
459
- if ( $filter )
460
- $text = weaverx_esc_textarea($text, false); // don't echo
 
 
 
461
  echo "<textarea class='{$class}' placeholder='{$place}' name='{$name}' rows='$rows' style='{$style}'>{$text}</textarea>\n";
462
  }
463
 
464
 
465
- function weaverx_form_color($value, $val_only = false) {
466
 
467
  $pclass = 'color {hash:true, adjust:false}'; // starting with V 1.3, allow text in color pickers
468
  if ( ! $val_only ) {
469
- ?>
470
- <tr>
471
- <th scope="row" align="right"><?php weaverx_echo_name($value, '<span class="i-left-fg dashicons dashicons-admin-appearance"></span>'); ?>:&nbsp;</th>
472
- <td>
473
- <?php } else { echo '&nbsp;<small>' . $value['info'] . '</small>&nbsp;'; } ?>
474
- <input class="<?php echo $pclass; ?>" name="<?php weaverx_sapi_main_name($value['id']); ?>" id="<?php echo $value['id']; ?>" type="text" style="width:90px" value="<?php if ( weaverx_getopt( $value['id'] ) != "") { weaverx_esc_textarea(weaverx_getopt( $value['id'] )); } else { echo ' '; } ?>" />
475
- <?php if (! $val_only ) { ?>
476
- </td>
477
- <?php weaverx_form_info($value);
478
- ?>
479
- </tr>
480
- <?php
 
 
 
 
 
 
481
  }
482
  }
483
- function weaverx_form_header($value, $narrow=false) {
484
- ?>
 
485
  <tr class="atw-row-header">
486
- <th scope="row" align="left" style="width:200px;"><?php /* NO SAPI SETTING */
487
 
488
- if (isset($value['id']))
489
- $icon = $value['id'];
490
- if ( !isset($icon) || !$icon )
491
- $icon = ' ';
 
 
492
 
493
- $dash = '';
494
- if ( $icon[0] == '-' ) { // add a leading icon
495
- $dash = '<span style="padding: .1em .5em 0 .2em" class="dashicons dashicons-' . substr( $icon, 1) . '"></span>';
496
- }
497
- echo weaverx_anchor($value['name']) . $dash . '<span style="font-weight:bold; font-size: larger;"><em>'. $value['name'] .'</em></span>';
498
- weaverx_form_help($value);
499
- ?>
500
- </th>
501
- <?php
502
- if ($narrow) echo ('<td style="width:80px;">&nbsp;</td>'. "\n");
503
- else echo ('<td style="width:170px;">&nbsp;</td>'. "\n");
 
 
 
504
 
505
- if ($value['info'] != '') {
506
- echo('<td style="padding-left: 10px"><u><em><strong>'); echo $value['info'];
507
- echo("</strong></em></u></td>\n");
508
- }
509
- ?>
 
510
  </tr>
511
- <?php
512
  }
513
 
514
  function weaverx_anchor( $title ) {
515
- if ( $title )
516
  return '<a class="anchorx" id="' . sanitize_title( $title ) . '"></a>';
 
 
517
  return '';
518
  }
519
 
520
- function weaverx_form_help($value) {
521
- if (!empty($value['help'])) {
522
- weaverx_help_link($value['help'], 'Help for ' . $value['name']);
523
  }
524
  }
525
 
526
- function weaverx_form_subheader($value) {
527
- ?>
528
  <tr class="atw-row-subheader">
529
- <th scope="row" align="left" style="width:200px;line-height:2em;"><?php /* NO SAPI SETTING */
530
 
531
- if (isset($value['id']))
532
- $icon = $value['id'];
533
- if ( !isset($icon) || !$icon )
534
- $icon = ' ';
 
 
535
 
536
- $dash = '';
537
- if ( $icon[0] == '-' ) { // add a leading icon
538
- $dash = '<span style="padding:.2em;" class="dashicons dashicons-' . substr( $icon, 1) . '"></span>';
539
- }
540
 
541
- echo weaverx_anchor($value['name']) . $dash . '<span style="color:blue; font-weight:bold; "><em><u>'.$value['name'].'</u></em></span>';
542
- weaverx_form_help($value);
543
- ?>
544
- </th>
545
- <td style="width:170px;">&nbsp;</td>
546
- <?php
547
- if ($value['info'] != '') {
548
- echo('<td style="padding-left: 10px"><u><em>'); echo $value['info'];
549
- echo("</em></u></td>\n");
550
- }
551
- ?>
 
552
  </tr>
553
- <?php
554
  }
555
 
556
- function weaverx_form_subheader_alt($value) {
557
- ?>
558
- <tr><td>&nbsp;</td></tr>
559
- <tr class="atw-row-subheader-alt" >
560
- <th scope="row" align="left" style="width:200px;line-height:2em;"><?php /* NO SAPI SETTING */
 
 
561
 
562
- if (isset($value['id']))
563
- $icon = $value['id'];
564
- if ( !isset($icon) || !$icon )
565
- $icon = ' ';
 
 
566
 
567
- $dash = '';
568
- if ( $icon[0] == '-' ) { // add a leading icon
569
- $dash = '<span style="padding:.2em;" class="dashicons dashicons-' . substr( $icon, 1) . '"></span>';
570
- }
571
- echo weaverx_anchor($value['name']) . $dash . '<span style="color:blue; font-weight:bold;padding-left:5px;"><em>'.$value['name'].'</em></span>';
572
- weaverx_form_help($value);
573
- ?>
574
- </th>
575
- <td style="width:170px;">&nbsp;</td>
576
- <?php
577
- if (isset($value['info']) && $value['info'] != '') {
578
- echo('<td style="padding-left: 10px;color:blue;">'); echo $value['info'];
579
- echo("</td>\n");
580
- }
581
- ?>
 
582
  </tr>
583
- <?php
584
  }
585
 
586
- function weaverx_form_header_area($value) {
587
- ?>
588
- <tr><td>&nbsp;</td></tr>
589
- <tr class="atw-row-subheader-area" >
590
- <th scope="row" align="left" style="width:200px;line-height:2em;"><?php /* NO SAPI SETTING */
 
 
591
 
592
- if (isset($value['id']))
593
- $icon = $value['id'];
594
- if ( !isset($icon) || !$icon )
595
- $icon = ' ';
 
 
596
 
597
- $dash = '';
598
- if ( $icon[0] == '-' ) { // add a leading icon
599
- $dash = '<span style="padding:.2em;" class="dashicons dashicons-' . substr( $icon, 1) . '"></span>';
600
- }
601
 
602
- echo weaverx_anchor($value['name']) . $dash . '<span style="color:blue; font-weight:bold;padding-left:5px;font-size:small;"><em>'.$value['name'].'</em></span>';
603
- weaverx_form_help($value);
604
- ?>
605
- </th>
606
- <td style="width:170px;">&nbsp;</td>
607
- <?php
608
- if ($value['info'] != '') {
609
- echo('<td style="padding-left: 10px;color:blue;">'); echo $value['info'];
610
- echo("</td>\n");
611
- }
612
- ?>
 
613
  </tr>
614
- <?php
615
  }
616
 
617
  //-- load theme settings needed here
618
 
619
  function weaverx_loadtheme() {
620
- if (!(isset($_POST['uploadit']) && $_POST['uploadit'] == 'yes')) return;
 
 
621
 
622
- // upload theme from users computer
623
  // they've supplied and uploaded a file
624
 
625
  $ok = true; // no errors so far
626
 
627
- if (isset($_FILES['uploaded']['name']))
628
  $filename = $_FILES['uploaded']['name'];
629
- else
630
  $filename = "";
 
631
 
632
- if (isset($_FILES['uploaded']['tmp_name'])) {
633
  $openname = $_FILES['uploaded']['tmp_name'];
634
  } else {
635
  $openname = "";
636
  }
637
 
638
  //Check the file extension
639
- $check_file = strtolower($filename);
640
- $pat = '.'; // PHP version strict checking bug...
641
- $end = explode($pat, $check_file);
642
- $ext_check = end($end);
643
 
644
 
645
- if ($filename == "") {
646
- $errors[] = __('You didn\'t select a file to upload.', 'weaver-xtreme' /*adm*/) . "<br />";
647
  $ok = false;
648
  }
649
 
650
- if ($ok && $ext_check != 'wxt' && $ext_check != 'wxb'){
651
- $errors[] = __('Theme files must have <em>.wxt</em> or <em>.wxb</em> extension.', 'weaver-xtreme' /*adm*/) . '<br />';
652
  $ok = false;
653
  }
654
 
655
- if ($ok) {
656
- if (!weaverx_f_exists($openname)) {
657
- $errors[] = '<strong><em style="color:red;">' .
658
- __('Sorry, there was a problem uploading your file.
659
- You may need to check your folder permissions or other server settings.', 'weaver-xtreme' /*adm*/) .
660
- '</em></strong><br />(' . __('Trying to use file', 'weaver-xtreme' /*adm*/) . ' <em>' . $openname . '</em>)';
661
- $ok = false;
662
- }
663
  }
664
- if (!$ok) {
 
665
  echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
666
- __('ERROR', 'weaver-xtreme' /*adm*/) . '</em></strong></p><p>';
667
- foreach($errors as $error){
668
- echo $error.'<br />';
669
  }
670
  echo '</p></div>';
671
  } else { // OK - read file and save to My Saved Theme
672
  // $handle has file handle to temp file.
673
- $contents = weaverx_f_get_contents($openname);
674
 
675
- if ( ! weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname ) ) {
676
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
677
- __('Sorry, there was a problem uploading your file.
678
- The file you picked was not a valid Weaver Xtreme theme file.', 'weaver-xtreme' /*adm*/) .
679
- '</em></strong></p></div>';
680
  } else {
681
- weaverx_save_msg( __('Weaver Xtreme theme options reset to uploaded theme.', 'weaver-xtreme' /*adm*/) );
682
  }
683
  }
684
  }
685
 
686
- function weaverx_ex_set_current_to_serialized_values($contents) {
687
- global $weaverx_opts_cache; // need to mess with the cache
688
 
689
- if (substr($contents,0,10) == 'WXT-V01.00' || substr($contents,0,10) != 'WVA-V01.00')
690
  $type = 'theme';
691
- else if (substr($contents,0,10) == 'WXB-V01.00' || substr($contents,0,10) != 'WVB-V01.00')
692
  $type = 'backup';
693
- else {
694
- $val = substr($contents,0,10);
695
- return weaverx_f_fail(__("Wrong theme file format version", 'weaver-xtreme' /*adm*/) . ':' . $val); /* simple check for one of ours */
 
696
  }
697
  $restore = array();
698
- $restore = unserialize(substr($contents,10));
699
 
700
- if (!$restore) return weaverx_f_fail(__("Unserialize failed", 'weaver-xtreme' /*adm*/));
 
 
701
 
702
- $version = weaverx_getopt('weaverx_version_id'); // get something to force load
703
 
704
- if ($type == 'theme') {
705
  // need to clear some settings
706
  // first, pickup the per-site settings that aren't theme related...
707
  $new_cache = array();
708
- foreach ($weaverx_opts_cache as $key => $val) {
709
- if (isset($key[0]) && $key[0] == '_') // these are non-theme specific settings
710
- $new_cache[$key] = $val; // keep
 
 
711
  }
712
- $opts = $restore['weaverx_base']; // fetch base opts
713
 
714
  weaverx_delete_all_options();
715
 
716
- foreach ($opts as $key => $val) {
717
- if (isset($key[0]) && $key[0] != '_')
718
- weaverx_setopt($key, $val, false); // overwrite with saved theme values
 
719
  }
720
 
721
- foreach ($new_cache as $key => $val) { // set the values we need to keep
722
- weaverx_setopt($key,$val,false);
723
  }
724
- } else if ($type == 'backup') {
725
- weaverx_delete_all_options( );
726
 
727
- $opts = $restore['weaverx_base']; // fetch base opts
728
- foreach ($opts as $key => $val) {
729
- weaverx_setopt($key, $val, false); // overwrite with saved values
730
  }
731
  }
732
 
733
- weaverx_setopt('weaverx_version_id',$version, false); // keep version, force save of db
734
- weaverx_setopt('wvrx_css_saved','', false);
735
 
736
 
737
- weaverx_setopt('last_option','Weaver Xtreme');
738
- weaverx_save_opts('loading theme'); // OK, now we've saved the options, update them in the DB
739
 
740
  return true;
741
  }
742
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  //
4
  function weaverx_process_options_themes() {
5
 
6
+ if ( weaverx_submitted( 'set_subtheme' ) ) { // invoked from Weaver Xtreme Subthemes tab (this file)
7
+ if ( isset( $_POST['theme_picked'] ) ) {
8
+ $theme = weaverx_filter_textarea( $_POST['theme_picked'] );
9
+
10
+ if ( weaverx_activate_subtheme( $theme ) ) {
11
+ weaverx_save_msg( __( "Subtheme Selected: ", 'weaver-xtreme' /*adm*/ ) . $theme );
12
+ } else {
13
+ weaverx_save_msg( __( "Invalid Subtheme file detected. Your installation of Weaver Xtreme may be broken.", 'weaver-xtreme' /*adm*/ ) );
14
+ }
15
  } else {
16
+ weaverx_save_msg( __( "Please select a subtheme.", 'weaver-xtreme' /*adm*/ ) );
17
  }
18
+
19
  return true;
20
  }
21
 
22
+ if ( weaverx_submitted( 'save_mytheme' ) ) { // invoked from Save/Restore tab
23
+ weaverx_save_msg( __( "Current settings saved in WordPress database.", 'weaver-xtreme' /*adm*/ ) );
24
  global $weaverx_opts_cache;
25
+ if ( ! $weaverx_opts_cache ) {
26
  $func_opt = WEAVER_GET_OPTION;
27
+ $weaverx_opts_cache = $func_opt( apply_filters( 'weaverx_options', WEAVER_SETTINGS_NAME ), array() );
28
  }
29
+ if ( current_user_can( 'manage_options' ) ) {
30
+ $compressed = array_filter( $weaverx_opts_cache, 'strlen' ); // filter out all null options (strlen == 0)
31
+ update_option( apply_filters( 'weaverx_options', 'weaverx_settings_backup' ), $compressed );
32
+ if ( apply_filters( 'weaverx_xtra_type', '+backup' ) != 'inactive' ) {
33
+ delete_option( 'weaverx_plus_backup' );
34
+ }
35
  }
36
+
37
  return true;
38
  }
39
 
40
+ if ( weaverx_submitted( 'restore_mytheme' ) ) { // invoked from Save/Restore tab
41
  global $weaverx_opts_cache;
42
+ $saved = get_option( apply_filters( 'weaverx_options', 'weaverx_settings_backup' ), array() );
43
+ if ( ! empty( $saved ) ) {
44
  $weaverx_opts_cache = $saved;
45
+ weaverx_wpupdate_option( 'weaverx_settings', $weaverx_opts_cache );
46
  }
47
+ weaverx_save_msg( __( "Current settings restored from WordPress database.", 'weaver-xtreme' /*adm*/ ) );
48
+
49
  return true;
50
  }
51
 
52
+ if ( weaverx_submitted( 'hide_thumbs' ) ) {
53
+ $hide = weaverx_getopt( '_hide_theme_thumbs' );
54
+ weaverx_setopt( '_hide_theme_thumbs', ! $hide );
55
+
56
  return true;
57
  }
58
 
60
  if ( weaverx_submitted( 'weaverx_clear_messages' ) ) {
61
  return true;
62
  }
63
+ if ( weaverx_submitted( 'reset_weaverx' ) ) {
64
+ if ( ! current_user_can( 'manage_options' ) ) {
65
+ wp_die( __( 'You do not have the capability to do that.', 'weaver-xtreme' /*adm*/ ) );
66
+ }
67
  // delete everything!
68
+ weaverx_save_msg( __( 'All Weaver Xtreme settings have been reset to the defaults.', 'weaver-xtreme' ) );
69
+ delete_option( apply_filters( 'weaverx_options', 'weaverx_settings' ) );
70
  global $weaverx_opts_cache;
71
+ $weaverx_opts_cache = false; // clear the cache
72
+ weaverx_init_opts( 'reset_weaverx' );
73
+ delete_option( apply_filters( 'weaverx_options', 'weaverx_settings_backup' ) );
74
 
75
+ do_action( 'weaverxplus_admin', 'reset_weaverxplus' );
76
 
77
  update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice', 0 ); // reset the dismiss on the plugin loader
78
+
79
  return true;
80
  }
81
 
82
+ if ( weaverx_submitted( 'uploadtheme' ) && function_exists( 'weaverx_loadtheme' ) ) {
83
  weaverx_loadtheme();
84
+
85
  return true;
86
  }
87
 
88
  return false;
89
  }
90
 
91
+ function weaverx_activate_subtheme( $theme ) {
92
  /* load settings for specified theme */
93
  global $weaverx_opts_cache;
94
 
106
  $filename = get_template_directory() . '/subthemes/' . $theme . $ext;
107
 
108
  if ( ! weaverx_f_exists( $filename ) ) {
109
+ $filename = str_replace( '.wxt', '.wxb', $filename );
110
+ if ( ! weaverx_f_exists( $filename ) ) {
111
  return false;
112
+ } else {
113
  $ext = '.wxb';
114
+ }
115
  }
116
 
117
+ $contents = weaverx_f_get_contents( $filename ); // use either real (pro) or file (standard) version of function
118
 
119
+ if ( empty( $contents ) ) {
120
+ return false;
121
+ }
122
 
123
+ if ( substr( $contents, 0, 10 ) != 'WXT-V01.00' && substr( $contents, 0, 10 ) != 'WVA-V01.00' ) {
124
+ if ( $ext == '.wxb' && substr( $contents, 0, 10 ) != 'WXB-V01.00' && substr( $contents, 0, 10 ) != 'WVB-V01.00' ) {
125
  return false;
126
+ }
127
  }
128
 
129
  $restore = array();
130
+ $restore = unserialize( substr( $contents, 10 ) );
131
 
132
+ if ( ! $restore ) {
133
+ return false;
134
+ }
135
+ $version = weaverx_getopt( 'weaverx_version_id' ); // get something to force load
136
 
137
  // need to clear some settings
138
  // first, pickup the per-site settings that aren't theme related...
139
  $new_cache = array();
140
  if ( $ext == '.wxt' ) {
141
+ foreach ( $weaverx_opts_cache as $key => $val ) {
142
+ if ( $key[0] == '_' ) { // these are non-theme specific settings
143
+ $new_cache[ $key ] = $weaverx_opts_cache[ $key ]; // clear
144
  }
145
  }
146
  }
147
 
148
+ $opts = $restore['weaverx_base']; // fetch base opts
149
  weaverx_delete_all_options();
150
 
151
+ foreach ( $new_cache as $key => $val ) { // set the values we need to keep
152
+ weaverx_setopt( $key, $new_cache[ $key ], false );
153
  }
154
+ foreach ( $opts as $key => $val ) {
155
+ if ( $key[0] == '_' && $ext != '.wxb' ) {
156
+ continue;
157
+ } // should be here
158
+ weaverx_setopt( $key, $val, false ); // overwrite with saved theme values
159
  }
160
 
161
+ weaverx_setopt( 'theme_filename', $theme );
162
+ weaverx_setopt( 'last_option', 'Weaver Xtreme' );
163
+
164
+ weaverx_save_opts( 'set subtheme' ); // OK, now we've saved the options, update them in the DB
165
 
 
166
  return true;
167
  }
168
 
169
  //================= moved from old lib-admin ================
170
  //============================================ form builder ====================================
171
 
172
+ function weaverx_form_show_options( $weaverx_olist, $begin_table = true, $end_table = true ) {
173
  /* output a list of options - this really does the layout for the options defined in an array */
174
+ if ( $begin_table ) {
175
+ ?>
176
+ <div>
177
+ <table class="optiontable" style="margin-top:6px;">
178
+ <?php
179
+ }
180
+ foreach ( $weaverx_olist as $value ) {
181
+ $value['type'] = weaverx_fix_type( $value['type'] );
182
+ switch ( $value['type'] ) {
183
  case 'align':
184
+ weaverx_form_align( $value );
185
  break;
186
  case 'align_standard':
187
+ weaverx_form_align_standard( $value );
188
  break;
189
  case 'break':
190
+ weaverx_form_break( $value );
191
  break;
192
  case 'checkbox':
193
+ weaverx_form_checkbox( $value );
194
  break;
195
  case 'ctext':
196
+ weaverx_form_ctext( $value );
197
  break;
198
  case 'color':
199
+ weaverx_form_color( $value );
200
  break;
201
  case 'custom_css':
202
+ weaverx_custom_css( $value );
203
  break;
204
  case 'endheader':
205
  echo '<!-- end header -->';
206
  break;
207
  case 'fi_align':
208
+ weaverx_form_fi_align( $value );
209
  break;
210
  case 'fi_location':
211
+ weaverx_from_fi_location( $value );
212
  break;
213
  case 'fi_location_post':
214
+ weaverx_from_fi_location( $value, true );
215
  break;
216
  case 'fixedtop':
217
+ weaverx_form_fixedtop( $value );
218
  break;
219
  case 'header':
220
+ weaverx_form_header( $value );
221
  break;
222
  case 'header_area':
223
+ weaverx_form_header_area( $value );
224
  break;
225
  case 'header0':
226
+ weaverx_form_header( $value, true );
227
  break;
228
  case 'inactive':
229
+ weaverx_form_inactive( $value );
230
  break;
231
  case 'link':
232
+ weaverx_form_link( $value );
233
  break;
234
  case 'menu_opts':
235
+ weaverx_form_menu_opts( $value, false );
236
  break;
237
  case 'menu_opts_submit':
238
+ weaverx_form_menu_opts( $value, true );
239
  break;
240
  case 'note':
241
+ weaverx_form_note( $value );
242
  break;
243
  case 'radio':
244
+ weaverx_form_radio( $value );
245
  break;
246
  case 'rounded':
247
+ weaverx_form_rounded( $value );
248
  break;
249
  case 'select_hide':
250
+ weaverx_form_select_hide( $value );
251
  break;
252
  case 'select_id':
253
+ weaverx_form_select_id( $value );
254
  break;
255
  case 'select_alt_theme':
256
+ weaverx_form_select_alt_theme( $value );
257
  break;
258
  case 'select_layout':
259
+ weaverx_form_select_layout( $value );
260
  break;
261
  case 'shadows':
262
+ weaverx_form_shadows( $value );
263
  break;
264
  case 'subheader':
265
+ weaverx_form_subheader( $value );
266
  break;
267
  case 'subheader_alt':
268
+ weaverx_form_subheader_alt( $value );
269
  break;
270
  case 'submit':
271
+ weaverx_form_submit( $value );
272
  break;
273
  case 'text':
274
  case 'widetext':
275
+ weaverx_form_text( $value );
276
  break;
277
  case 'text_xy':
278
+ weaverx_form_text_xy( $value );
279
  break;
280
  case 'text_xy_em':
281
+ weaverx_form_text_xy( $value, 'X', 'Y', 'em' );
282
  break;
283
  case 'text_xy_percent':
284
+ weaverx_form_text_xy( $value, 'X', 'Y', '%' );
285
  break;
286
  case 'text_tb':
287
+ weaverx_form_text_xy( $value, 'T', 'B' );
288
  break;
289
  case 'text_lr':
290
+ weaverx_form_text_xy( $value, 'L', 'R' );
291
  break;
292
  case 'text_lr_em':
293
+ weaverx_form_text_xy( $value, 'L', 'R', 'em' );
294
  break;
295
  case 'text_lr_percent':
296
+ weaverx_form_text_xy( $value, 'L', 'R', '%' );
297
  break;
298
  case 'textarea':
299
+ weaverx_form_textarea( $value );
300
  break;
301
  case 'titles':
302
+ weaverx_form_text_props( $value, 'titles' );
303
  break;
304
  case 'titles_area':
305
+ weaverx_form_text_props( $value, 'area' );
306
  break;
307
  case 'titles_content':
308
+ weaverx_form_text_props( $value, 'content' );
309
  break;
310
  case 'titles_menu':
311
+ weaverx_form_text_props( $value, 'menu' );
312
  break;
313
  case 'titles_text':
314
+ weaverx_form_text_props( $value, 'text' );
315
  break;
316
  case 'val_num':
317
+ weaverx_form_val( $value, '' );
318
  break;
319
  case 'val_percent':
320
+ weaverx_form_val( $value, '%' );
321
  break;
322
  case 'val_px':
323
+ weaverx_form_val( $value, 'px' );
324
  break;
325
  case 'val_em':
326
+ weaverx_form_val( $value, 'em' );
327
  break;
328
  case 'widget_area':
329
+ weaverx_form_widget_area( $value, false );
330
  break;
331
  case 'widget_area_submit':
332
+ weaverx_form_widget_area( $value, true );
333
  break;
334
  default:
335
+ weaverx_form_subheader_alt( $value );
336
  break;
337
  }
338
 
339
  }
340
+ if ( $end_table ) {
341
+ ?>
342
+ </table></div> <!-- close previous tab div -->
343
+ <br/>
344
+ <?php
345
  }
346
  }
347
 
348
+ function weaverx_fix_type( $type ) {
349
+ return apply_filters( 'weaverx_xtra_type', $type );
350
  }
351
 
352
+ function weaverx_form_inactive( $value, $reason = '' ) {
353
+ if ( $reason == '' ) {
354
+ $reason = '<small>' . __( 'Weaver Xtreme Plus Options', 'weaver-xtreme' /*adm*/ ) . '&nbsp;</small>';
355
+ }
356
+ if ( ! isset( $value['name'] ) || ! isset( $value['id'] ) || ! isset( $value['info'] ) ) { // probably an '=submit'
357
  return;
358
  }
359
  $title = $value['name'];
360
+ if ( strlen( $title ) < 1 ) {
361
+ $title = ' ';
362
+ } // make code work for invisibles
363
+ if ( $title[0] == '#' ) {
364
+ $title = substr( $title, 4 );
365
+ } // strip color
366
  echo ' <tr>' . "\n";
367
+ ?>
368
+ <th scope="row" style="width:200px;"><?php /* NO SAPI SETTING */
369
+ echo '<span style="color:#777;float:right;">' . $title . ':&nbsp;</span>';
370
+ if ( ! empty( $value['help'] ) ) {
371
+ weaverx_help_link( $value['help'], __( 'Help for ', 'weaver-xtreme' /*adm*/ ) . $title );
 
 
 
 
 
 
 
 
 
 
372
  }
373
+ ?>
374
+ </th>
375
+ <td style="color:#777;"><?php echo $reason; ?>
376
+ <input type="hidden" name="<?php weaverx_sapi_main_name( $value['id'] ); ?>" id="<?php echo $value['id']; ?>" value="<?php if ( weaverx_getopt( $value['id'] ) != "" ) {
377
+ weaverx_esc_textarea( weaverx_getopt( $value['id'] ) );
378
+ } else {
379
+ echo '';
380
+ } ?>"/>
381
+ </td>
382
+ <?php
383
+ if ( $value['info'] != '' ) {
384
+ echo( '<td style="padding-left:10px;color:#777;font-size:x-small;">' );
385
+ echo $value['info'];
386
+ echo( "</td>\n" );
387
+ }
388
+ ?>
389
  </tr>
390
+ <?php
391
  }
392
 
393
 
394
+ function weaverx_echo_name( $value, $add_icon = '' ) {
395
  $l = $add_icon . $value['name'];
396
+ if ( isset( $value['id'] ) ) {
397
  $icon = $value['id'];
398
+ }
399
+ if ( ! isset( $icon ) || ! $icon ) {
400
  $icon = ' ';
401
+ }
402
+ if ( strlen( $l ) > 4 && $l[0] == '#' ) {
403
+ echo '<span style="color:' . substr( $l, 0, 4 ) .
404
+ ';">' . substr( $l, 4 ) . '</span>';
405
+ } elseif ( $icon[0] == '-' ) { // add a leading icon
406
+ echo '<span class="dashicons dashicons-' . substr( $icon, 1 ) . '">' . $l . '</span>';
407
  } else {
408
  echo $l;
409
  }
412
  function weaverx_form_ctext( $value, $val_only = false ) {
413
 
414
  $pclass = 'color {hash:true, adjust:false}'; // starting with V 1.3, allow text in color pickers
415
+ $img_css = '<img src="' . esc_url( get_template_directory_uri() . '/assets/images/theme/css.png' ) . '" alt="css" />';
416
+ $img_hide = esc_url( get_template_directory_uri() . '/assets/images/theme/hide.png' );
417
+ $img_show = esc_url( get_template_directory_uri() . '/assets/images/theme/show.png' );
418
+ $help_file = esc_url( get_template_directory_uri() . '/help/css-help.html' );
419
  $css_id = $value['id'] . '_css';
420
+ $css_id_text = weaverx_getopt( $css_id );
421
+ if ( $css_id_text && ! weaverx_getopt( '_hide_auto_css_rules' ) ) {
422
  $img_toggle = $img_hide;
423
  } else {
424
  $img_toggle = $img_show;
425
  }
426
  $add_icon = '<span class="i-left-bg dashicons dashicons-admin-appearance"></span>';
427
+ if ( strpos( $value['name'], ' BG' ) === false ) {
428
  $add_icon = '<span class="i-left-fg dashicons dashicons-admin-appearance"></span>';
429
+ }
430
  if ( ! $val_only ) { ?>
431
+ <tr>
432
+ <th scope="row" align="right"><?php weaverx_echo_name( $value, $add_icon ); ?>:&nbsp;</th>
433
+ <td> <?php
434
  } else {
435
  echo '&nbsp;<small>' . $value['info'] . '</small>&nbsp;';
436
  } ?>
437
+ <input class="<?php echo $pclass; ?>" name="<?php weaverx_sapi_main_name( $value['id'] ); ?>" id="<?php echo $value['id']; ?>" type="text" style="width:90px" value="<?php if ( weaverx_getopt( $value['id'] ) != "" ) {
438
+ weaverx_esc_textarea( weaverx_getopt( $value['id'] ) );
439
+ } else {
440
+ echo '';
441
+ } ?>"/>
442
+ <?php
443
+ echo $img_css; ?>
444
+ <a href="javascript:void(null);" onclick="weaverx_ToggleRowCSS(document.getElementById('<?php echo $css_id . '_js'; ?>'), this, '<?php echo $img_show; ?>', '<?php echo $img_hide; ?>')"><?php echo '<img src="' . esc_url( $img_toggle ) . '" alt="toggle css" />'; ?></a>
445
+ <?php if ( ! $val_only ) { ?>
446
+ </td>
447
+ <?php weaverx_form_info( $value );
448
+ ?>
449
+ </tr>
450
+ <?php }
451
+ $css_rows = weaverx_getopt( '_css_rows' );
452
+ if ( $css_rows < 1 || $css_rows > 25 ) {
453
  $css_rows = 1;
454
+ }
455
+ if ( $css_id_text && ! weaverx_getopt( '_hide_auto_css_rules' ) ) { ?>
456
+ <tr id="<?php echo $css_id . '_js'; ?>">
457
+ <th scope="row" align="right"><span style="color:#22a;"><small><?php _e( 'Custom CSS styling:', 'weaver-xtreme' /*adm*/ ); ?></small></span></th>
458
+ <td align="right"><small>&nbsp;</small></td>
459
+ <td>
460
+ <small>
461
+ <?php _e( 'You can enter CSS rules, enclosed in {}\'s, and separated by <strong>;</strong>. See ', 'weaver-xtreme' /*adm*/ ); ?>
462
+ <a href="<?php echo $help_file; ?>" target="_blank"><?php _e( 'CSS Help', 'weaver-xtreme' /*adm*/ ); ?></a> <?php _e( 'for more details.', 'weaver-xtreme' /*adm*/ ); ?></small><br/>
463
+ <?php weaverx_textarea( $css_id_text, $css_id, $css_rows, '{ font-size:150%; font-weight:bold; } /* for example */' ); ?>
464
+ </td>
465
+ </tr>
466
+ <?php
467
  } else {
468
+ ?>
469
+ <tr id="<?php echo $css_id . '_js'; ?>" style="display:none;">
470
+ <th scope="row" align="right"><span style="color:green;"><small><?php _e( 'Custom CSS styling:', 'weaver-xtreme' /*adm*/ ); ?></small></span></th>
471
+ <td align="right"><small>&nbsp;</small></td>
472
+ <td>
473
+ <small>
474
+ <?php _e( 'You can enter CSS rules, enclosed in {}\'s, and separated by <strong>;</strong>. See', 'weaver-xtreme' /*adm*/ ); ?>
475
+ <a href="<?php echo $help_file; ?>" target="_blank"><?php _e( 'CSS Help', 'weaver-xtreme' /*adm*/ ); ?></a> for more details.</small><br/>
476
+ <?php weaverx_textarea( $css_id_text, $css_id, $css_rows, '{ font-size:150%; font-weight:bold; } /* for example */' ); ?>
477
+ </td>
478
+ </tr>
479
+ <?php
480
  }
481
  }
482
 
483
+ function weaverx_textarea( $text, $id, $rows = 0, $place = '', $style = 'width:85%;', $class = 'wvrx-edit', $filter = true ) {
484
+ $name = weaverx_sapi_main_name( $id, false );
485
  /* if ($text) {
486
  $newrows = count((explode("\n",$text)))+1;
487
  if ($newrows > $rows)
490
  if ( $rows < 2 ) {
491
  $rows = 1;
492
  }
493
+ if ( $rows > 25 ) {
494
+ $rows = 25;
495
+ }
496
+ if ( $filter ) {
497
+ $text = weaverx_esc_textarea( $text, false );
498
+ } // don't echo
499
  echo "<textarea class='{$class}' placeholder='{$place}' name='{$name}' rows='$rows' style='{$style}'>{$text}</textarea>\n";
500
  }
501
 
502
 
503
+ function weaverx_form_color( $value, $val_only = false ) {
504
 
505
  $pclass = 'color {hash:true, adjust:false}'; // starting with V 1.3, allow text in color pickers
506
  if ( ! $val_only ) {
507
+ ?>
508
+ <tr>
509
+ <th scope="row" align="right"><?php weaverx_echo_name( $value, '<span class="i-left-fg dashicons dashicons-admin-appearance"></span>' ); ?>:&nbsp;</th>
510
+ <td>
511
+ <?php } else {
512
+ echo '&nbsp;<small>' . $value['info'] . '</small>&nbsp;';
513
+ } ?>
514
+ <input class="<?php echo $pclass; ?>" name="<?php weaverx_sapi_main_name( $value['id'] ); ?>" id="<?php echo $value['id']; ?>" type="text" style="width:90px" value="<?php if ( weaverx_getopt( $value['id'] ) != "" ) {
515
+ weaverx_esc_textarea( weaverx_getopt( $value['id'] ) );
516
+ } else {
517
+ echo ' ';
518
+ } ?>"/>
519
+ <?php if ( ! $val_only ) { ?>
520
+ </td>
521
+ <?php weaverx_form_info( $value );
522
+ ?>
523
+ </tr>
524
+ <?php
525
  }
526
  }
527
+
528
+ function weaverx_form_header( $value, $narrow = false ) {
529
+ ?>
530
  <tr class="atw-row-header">
531
+ <th scope="row" align="left" style="width:200px;"><?php /* NO SAPI SETTING */
532
 
533
+ if ( isset( $value['id'] ) ) {
534
+ $icon = $value['id'];
535
+ }
536
+ if ( ! isset( $icon ) || ! $icon ) {
537
+ $icon = ' ';
538
+ }
539
 
540
+ $dash = '';
541
+ if ( $icon[0] == '-' ) { // add a leading icon
542
+ $dash = '<span style="padding: .1em .5em 0 .2em" class="dashicons dashicons-' . substr( $icon, 1 ) . '"></span>';
543
+ }
544
+ echo weaverx_anchor( $value['name'] ) . $dash . '<span style="font-weight:bold; font-size: larger;"><em>' . $value['name'] . '</em></span>';
545
+ weaverx_form_help( $value );
546
+ ?>
547
+ </th>
548
+ <?php
549
+ if ( $narrow ) {
550
+ echo( '<td style="width:80px;">&nbsp;</td>' . "\n" );
551
+ } else {
552
+ echo( '<td style="width:170px;">&nbsp;</td>' . "\n" );
553
+ }
554
 
555
+ if ( $value['info'] != '' ) {
556
+ echo( '<td style="padding-left: 10px"><u><em><strong>' );
557
+ echo $value['info'];
558
+ echo( "</strong></em></u></td>\n" );
559
+ }
560
+ ?>
561
  </tr>
562
+ <?php
563
  }
564
 
565
  function weaverx_anchor( $title ) {
566
+ if ( $title ) {
567
  return '<a class="anchorx" id="' . sanitize_title( $title ) . '"></a>';
568
+ }
569
+
570
  return '';
571
  }
572
 
573
+ function weaverx_form_help( $value ) {
574
+ if ( ! empty( $value['help'] ) ) {
575
+ weaverx_help_link( $value['help'], 'Help for ' . $value['name'] );
576
  }
577
  }
578
 
579
+ function weaverx_form_subheader( $value ) {
580
+ ?>
581
  <tr class="atw-row-subheader">
582
+ <th scope="row" align="left" style="width:200px;line-height:2em;"><?php /* NO SAPI SETTING */
583
 
584
+ if ( isset( $value['id'] ) ) {
585
+ $icon = $value['id'];
586
+ }
587
+ if ( ! isset( $icon ) || ! $icon ) {
588
+ $icon = ' ';
589
+ }
590
 
591
+ $dash = '';
592
+ if ( $icon[0] == '-' ) { // add a leading icon
593
+ $dash = '<span style="padding:.2em;" class="dashicons dashicons-' . substr( $icon, 1 ) . '"></span>';
594
+ }
595
 
596
+ echo weaverx_anchor( $value['name'] ) . $dash . '<span style="color:blue; font-weight:bold; "><em><u>' . $value['name'] . '</u></em></span>';
597
+ weaverx_form_help( $value );
598
+ ?>
599
+ </th>
600
+ <td style="width:170px;">&nbsp;</td>
601
+ <?php
602
+ if ( $value['info'] != '' ) {
603
+ echo( '<td style="padding-left: 10px"><u><em>' );
604
+ echo $value['info'];
605
+ echo( "</em></u></td>\n" );
606
+ }
607
+ ?>
608
  </tr>
609
+ <?php
610
  }
611
 
612
+ function weaverx_form_subheader_alt( $value ) {
613
+ ?>
614
+ <tr>
615
+ <td>&nbsp;</td>
616
+ </tr>
617
+ <tr class="atw-row-subheader-alt">
618
+ <th scope="row" align="left" style="width:200px;line-height:2em;"><?php /* NO SAPI SETTING */
619
 
620
+ if ( isset( $value['id'] ) ) {
621
+ $icon = $value['id'];
622
+ }
623
+ if ( ! isset( $icon ) || ! $icon ) {
624
+ $icon = ' ';
625
+ }
626
 
627
+ $dash = '';
628
+ if ( $icon[0] == '-' ) { // add a leading icon
629
+ $dash = '<span style="padding:.2em;" class="dashicons dashicons-' . substr( $icon, 1 ) . '"></span>';
630
+ }
631
+ echo weaverx_anchor( $value['name'] ) . $dash . '<span style="color:blue; font-weight:bold;padding-left:5px;"><em>' . $value['name'] . '</em></span>';
632
+ weaverx_form_help( $value );
633
+ ?>
634
+ </th>
635
+ <td style="width:170px;">&nbsp;</td>
636
+ <?php
637
+ if ( isset( $value['info'] ) && $value['info'] != '' ) {
638
+ echo( '<td style="padding-left: 10px;color:blue;">' );
639
+ echo $value['info'];
640
+ echo( "</td>\n" );
641
+ }
642
+ ?>
643
  </tr>
644
+ <?php
645
  }
646
 
647
+ function weaverx_form_header_area( $value ) {
648
+ ?>
649
+ <tr>
650
+ <td>&nbsp;</td>
651
+ </tr>
652
+ <tr class="atw-row-subheader-area">
653
+ <th scope="row" align="left" style="width:200px;line-height:2em;"><?php /* NO SAPI SETTING */
654
 
655
+ if ( isset( $value['id'] ) ) {
656
+ $icon = $value['id'];
657
+ }
658
+ if ( ! isset( $icon ) || ! $icon ) {
659
+ $icon = ' ';
660
+ }
661
 
662
+ $dash = '';
663
+ if ( $icon[0] == '-' ) { // add a leading icon
664
+ $dash = '<span style="padding:.2em;" class="dashicons dashicons-' . substr( $icon, 1 ) . '"></span>';
665
+ }
666
 
667
+ echo weaverx_anchor( $value['name'] ) . $dash . '<span style="color:blue; font-weight:bold;padding-left:5px;font-size:small;"><em>' . $value['name'] . '</em></span>';
668
+ weaverx_form_help( $value );
669
+ ?>
670
+ </th>
671
+ <td style="width:170px;">&nbsp;</td>
672
+ <?php
673
+ if ( $value['info'] != '' ) {
674
+ echo( '<td style="padding-left: 10px;color:blue;">' );
675
+ echo $value['info'];
676
+ echo( "</td>\n" );
677
+ }
678
+ ?>
679
  </tr>
680
+ <?php
681
  }
682
 
683
  //-- load theme settings needed here
684
 
685
  function weaverx_loadtheme() {
686
+ if ( ! ( isset( $_POST['uploadit'] ) && $_POST['uploadit'] == 'yes' ) ) {
687
+ return;
688
+ }
689
 
690
+ // upload theme from users computer
691
  // they've supplied and uploaded a file
692
 
693
  $ok = true; // no errors so far
694
 
695
+ if ( isset( $_FILES['uploaded']['name'] ) ) {
696
  $filename = $_FILES['uploaded']['name'];
697
+ } else {
698
  $filename = "";
699
+ }
700
 
701
+ if ( isset( $_FILES['uploaded']['tmp_name'] ) ) {
702
  $openname = $_FILES['uploaded']['tmp_name'];
703
  } else {
704
  $openname = "";
705
  }
706
 
707
  //Check the file extension
708
+ $check_file = strtolower( $filename );
709
+ $pat = '.'; // PHP version strict checking bug...
710
+ $end = explode( $pat, $check_file );
711
+ $ext_check = end( $end );
712
 
713
 
714
+ if ( $filename == "" ) {
715
+ $errors[] = __( 'You didn\'t select a file to upload.', 'weaver-xtreme' /*adm*/ ) . "<br />";
716
  $ok = false;
717
  }
718
 
719
+ if ( $ok && $ext_check != 'wxt' && $ext_check != 'wxb' ) {
720
+ $errors[] = __( 'Theme files must have <em>.wxt</em> or <em>.wxb</em> extension.', 'weaver-xtreme' /*adm*/ ) . '<br />';
721
  $ok = false;
722
  }
723
 
724
+ if ( $ok ) {
725
+ if ( ! weaverx_f_exists( $openname ) ) {
726
+ $errors[] = '<strong><em style="color:red;">' .
727
+ __( 'Sorry, there was a problem uploading your file.
728
+ You may need to check your folder permissions or other server settings.', 'weaver-xtreme' /*adm*/ ) .
729
+ '</em></strong><br />(' . __( 'Trying to use file', 'weaver-xtreme' /*adm*/ ) . ' <em>' . $openname . '</em>)';
730
+ $ok = false;
 
731
  }
732
+ }
733
+ if ( ! $ok ) {
734
  echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
735
+ __( 'ERROR', 'weaver-xtreme' /*adm*/ ) . '</em></strong></p><p>';
736
+ foreach ( $errors as $error ) {
737
+ echo $error . '<br />';
738
  }
739
  echo '</p></div>';
740
  } else { // OK - read file and save to My Saved Theme
741
  // $handle has file handle to temp file.
742
+ $contents = weaverx_f_get_contents( $openname );
743
 
744
+ if ( ! weaverx_ex_set_current_to_serialized_values( $contents, 'weaverx_uploadit:' . $openname ) ) {
745
+ echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
746
+ __( 'Sorry, there was a problem uploading your file.
747
+ The file you picked was not a valid Weaver Xtreme theme file.', 'weaver-xtreme' /*adm*/ ) .
748
+ '</em></strong></p></div>';
749
  } else {
750
+ weaverx_save_msg( __( 'Weaver Xtreme theme options reset to uploaded theme.', 'weaver-xtreme' /*adm*/ ) );
751
  }
752
  }
753
  }
754
 
755
+ function weaverx_ex_set_current_to_serialized_values( $contents ) {
756
+ global $weaverx_opts_cache; // need to mess with the cache
757
 
758
+ if ( substr( $contents, 0, 10 ) == 'WXT-V01.00' || substr( $contents, 0, 10 ) != 'WVA-V01.00' ) {
759
  $type = 'theme';
760
+ } elseif ( substr( $contents, 0, 10 ) == 'WXB-V01.00' || substr( $contents, 0, 10 ) != 'WVB-V01.00' ) {
761
  $type = 'backup';
762
+ } else {
763
+ $val = substr( $contents, 0, 10 );
764
+
765
+ return weaverx_f_fail( __( "Wrong theme file format version", 'weaver-xtreme' /*adm*/ ) . ':' . $val ); /* simple check for one of ours */
766
  }
767
  $restore = array();
768
+ $restore = unserialize( substr( $contents, 10 ) );
769
 
770
+ if ( ! $restore ) {
771
+ return weaverx_f_fail( __( "Unserialize failed", 'weaver-xtreme' /*adm*/ ) );
772
+ }
773
 
774
+ $version = weaverx_getopt( 'weaverx_version_id' ); // get something to force load
775
 
776
+ if ( $type == 'theme' ) {
777
  // need to clear some settings
778
  // first, pickup the per-site settings that aren't theme related...
779
  $new_cache = array();
780
+ foreach ( $weaverx_opts_cache as $key => $val ) {
781
+ if ( isset( $key[0] ) && $key[0] == '_' ) // these are non-theme specific settings
782
+ {
783
+ $new_cache[ $key ] = $val;
784
+ } // keep
785
  }
786
+ $opts = $restore['weaverx_base']; // fetch base opts
787
 
788
  weaverx_delete_all_options();
789
 
790
+ foreach ( $opts as $key => $val ) {
791
+ if ( isset( $key[0] ) && $key[0] != '_' ) {
792
+ weaverx_setopt( $key, $val, false );
793
+ } // overwrite with saved theme values
794
  }
795
 
796
+ foreach ( $new_cache as $key => $val ) { // set the values we need to keep
797
+ weaverx_setopt( $key, $val, false );
798
  }
799
+ } elseif ( $type == 'backup' ) {
800
+ weaverx_delete_all_options();
801
 
802
+ $opts = $restore['weaverx_base']; // fetch base opts
803
+ foreach ( $opts as $key => $val ) {
804
+ weaverx_setopt( $key, $val, false ); // overwrite with saved values
805
  }
806
  }
807
 
808
+ weaverx_setopt( 'weaverx_version_id', $version, false ); // keep version, force save of db
809
+ weaverx_setopt( 'wvrx_css_saved', '', false );
810
 
811
 
812
+ weaverx_setopt( 'last_option', 'Weaver Xtreme' );
813
+ weaverx_save_opts( 'loading theme' ); // OK, now we've saved the options, update them in the DB
814
 
815
  return true;
816
  }
817
 
818
+ // Weaver Xtreme 5 compatibility functions
819
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
820
+ if ( ! function_exists( 'weaverx_esc_textarea' ) ) {
821
+ function weaverx_esc_textarea( $text, $echo = true ) {
822
+ if ( current_user_can( 'unfiltered_html' ) ) {
823
+ $out = esc_textarea( $text );
824
+ } else {
825
+ $out = esc_textarea( stripslashes( $text ) );
826
+ }
827
+ if ( $echo ) {
828
+ echo $out;
829
+
830
+ return '';
831
+ } else {
832
+ return $out;
833
+ }
834
+ }
835
+ }
836
+
837
+ if ( ! function_exists( 'weavrex_media_lib_button' ) ) {
838
+ function weaverx_media_lib_button( $fillin = '' ) {
839
+ ?>
840
+ &nbsp;&larr;&nbsp;
841
+ <a style='text-decoration:none;' title="<?php echo esc_html__( 'Select image from Media Library. Click \'Insert into Post\' to paste url here.', 'weaver-xtreme' ); ?>" alt="media" href="javascript:weaverx_media_lib( '<?php echo $fillin; ?>' );"><span style="font-size:16px;margin-top:2px;" class="dashicons dashicons-format-image"></span></a>
842
+ <?php
843
+ }
844
+ }
845
+ }
846
+
admin/admin-mainopts.php CHANGED
@@ -13,2597 +13,105 @@ function weaverx_admin_mainopts() {
13
  if ( ! function_exists( 'weaverx_get_wp_custom_logo_url' ) ) {
14
  weaverx_alert( __( ' **** WARNING! ****\r\n\r\nYou are using a new Version 3 of the Weaver Xtreme Theme Support Plugin with an older version of the Weaver Xtreme Theme. Please update to the latest Version 3 of the Weaver Xtreme Theme.\r\n\r\nTHIS VERSION DOES NOT WORK WITH OLD VERSIONS OF WEAVER XTREME!' ) );
15
  }
16
- ?>
17
- <div id="tabwrap_main" style="padding-left:4px;">
18
 
19
- <div id="tab-container-main" class='yetiisub'>
20
- <ul id="tab-container-main-nav" class='yetiisub'>
21
- <?php
22
- weaverx_elink( '#asp_genappear', __( 'Wrapping background colors, rounded corners, borders, fade, shadow', 'weaver-xtreme' /*adm*/ ), __( 'Wrapping Areas', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
23
- weaverx_elink( '#asp_widgets', __( 'Settings for Sidebars and Sidebar Layout', 'weaver-xtreme' /*adm*/ ), __( 'Sidebars &amp; Layout', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
24
- weaverx_elink( '#asp_full', __( 'Settings to create full width sites', 'weaver-xtreme' /*adm*/ ), __( 'Full Width', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
25
- weaverx_elink( '#asp_headeropts', __( 'Site Title/Tagline properties, Header Image', 'weaver-xtreme' /*adm*/ ), __( 'Header', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
26
- weaverx_elink( '#asp_menus', __( 'Menu text and bg colors and other properties; Info Bar properties', 'weaver-xtreme' /*adm*/ ), __( 'Menus', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
27
- weaverx_elink( '#asp_content', __( 'Text colors and bg, image borders, featured image, other properties related to all content', 'weaver-xtreme' /*adm*/ ), __( 'Content Areas', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
28
- weaverx_elink( '#asp_postspecific', __( 'Properties related to posts: titles, meta info, navigation, excerpts, featured images, and more', 'weaver-xtreme' /*adm*/ ), __( 'Post Specifics', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
29
- weaverx_elink( '#asp_footer', __( 'Footer options: bg color, borders, more. Site Copyright', 'weaver-xtreme' /*adm*/ ), __( 'Footer', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
30
- weaverx_elink( '#asp_custom', __( 'Font settings &amp; Custom Settings', 'weaver-xtreme' /*adm*/ ), __( 'Fonts &amp; Custom', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
31
- ?>
32
- </ul>
33
 
34
- <?php weaverx_tab_title( __( 'Main Options', 'weaver-xtreme' /*adm*/ ), 'help.html#MainOptions', __( 'Help for Main Options', 'weaver-xtreme' /*adm*/ ) ); ?>
 
35
 
36
- <div id="asp_genappear" class="tab_mainopt">
37
- <?php weaverx_mainopts_general(); ?>
38
- </div>
 
 
39
 
40
- <div id="asp_widgets" class="tab_mainopt">
41
- <?php
42
- weaverx_mainopts_layout();
43
- weaverx_mainopts_widgets();
44
- ?>
45
- </div>
46
 
47
- <div id="asp_full" class="tab_mainopt">
48
- <?php
49
- weaverx_mainopts_fullwidth();
50
- ?>
51
- </div>
52
 
53
- <div id="asp_headeropts" class="tab_mainopt">
54
- <?php weaverx_mainopts_header(); ?>
55
- </div>
56
 
57
- <div id="asp_menus" class="tab_mainopt">
58
- <?php weaverx_mainopts_menus(); ?>
59
- </div>
60
 
61
- <div id="asp_content" class="tab_mainopt">
62
- <?php weaverx_mainopts_content(); ?>
63
- </div>
64
 
65
- <div id="asp_postspecific" class="tab_mainopt">
66
- <?php weaverx_mainopts_posts(); ?>
67
- </div>
68
 
69
- <div id="asp_footer" class="tab_mainopt">
70
- <?php weaverx_mainopts_footer(); ?>
71
- </div>
72
 
 
 
 
73
 
74
- <div id="asp_links" class="tab_mainopt">
75
- <?php weaverx_mainopts_custom(); ?>
76
- </div>
77
 
78
- </div> <!-- #tab-container-main -->
79
- <?php weaverx_sapi_submit(); ?>
80
- </div> <!-- #tabwrap_main -->
81
- <script type="text/javascript">
82
- var tabberMainOpts = new Yetii({
83
- id: 'tab-container-main',
84
- tabclass: 'tab_mainopt',
85
- persist: true
86
- });
87
- </script>
88
- <?php
89
- }
90
-
91
- // ======================== Main Options > Wrapping Areas ========================
92
- function weaverx_mainopts_general() {
93
-
94
- $font_size = weaverx_getopt_default( 'site_fontsize_int', 16 );
95
-
96
- $opts = array(
97
- array( 'type' => 'submit' ),
98
- array(
99
- 'name' => __( 'Wrapping Areas', 'weaver-xtreme' /*adm*/ ),
100
- 'id' => '-admin-generic',
101
- 'type' => 'header',
102
- 'info' => __( 'Settings for wrapping areas', 'weaver-xtreme' /*adm*/ ),
103
- 'help' => 'help.html#GenApp',
104
- ),
105
- array(
106
- 'name' => __( 'GLOBAL SETTINGS', 'weaver-xtreme' /*adm*/ ),
107
- 'type' => 'note',
108
- 'info' => __( 'These settings control site outer background and the standard link colors.', 'weaver-xtreme' /*adm*/ ),
109
- ),
110
- array(
111
- 'name' => __( 'Site Background Color', 'weaver-xtreme' /*adm*/ ),
112
- 'id' => 'body_bgcolor',
113
- 'type' => 'ctext',
114
- 'info' => __( 'Background color for &lt;body&gt;, wraps entire page.', 'weaver-xtreme' /*adm*/ ),
115
- ),
116
-
117
- array(
118
- 'name' => __( 'Fade Outside BG', 'weaver-xtreme' /*adm*/ ),
119
- 'id' => 'fadebody_bg',
120
- 'type' => 'checkbox',
121
- 'info' => __( 'Will fade the Outside BG color, darker at top to lighter at bottom.', 'weaver-xtreme' /*adm*/ ),
122
- ),
123
- array(
124
- 'name' => __( 'Full Browser Height', 'weaver-xtreme' /*adm*/ ),
125
- 'id' => 'full_browser_height',
126
- 'type' => 'checkbox',
127
- 'info' => __( 'For short pages, add extra padding to bottom of content to force full browser height.', 'weaver-xtreme' /*adm*/ ),
128
- ),
129
- array(
130
- 'name' => __( 'Standard Links', 'weaver-xtreme' /*adm*/ ),
131
- 'id' => 'link',
132
- 'type' => 'link',
133
- 'info' => __( 'Global default for link typography ( not including menus and titles ). Set Bold, Italic, and Underline by setting those options for specific areas rather than globally to have more control.', 'weaver-xtreme' /*adm*/ ),
134
- ),
135
-
136
- // array('name' => '#070' . __('No Auto-Underline Links', 'weaver-xtreme' /*adm*/), 'id' => 'mobile_nounderline', 'type' => 'checkbox',
137
- // 'info' => __('Underlined links are easier to use on most mobile devices. This will disable auto-underlined links.', 'weaver-xtreme' /*adm*/)),
138
-
139
- array(
140
- 'name' => __( 'Current Base Font Size:', 'weaver-xtreme' /*adm*/ ),
141
- 'type' => 'note',
142
- 'info' => '<span style="font-size:' . $font_size . 'px;">' . $font_size . __( 'px.', 'weaver-xtreme' /*adm*/ ) . '</span> ' . __( 'Change on Custom Tab', 'weaver-xtreme' /*adm*/ ),
143
- ),
144
- array( 'type' => 'submit' ),
145
-
146
-
147
- array(
148
- 'name' => __( 'Wrapper Area', 'weaver-xtreme' /*adm*/ ),
149
- 'id' => 'wrapper',
150
- 'type' => 'widget_area_submit',
151
- 'info' => __( 'Wrapper wraps entire site (CSS id: #wrapper). Colors and font settings will be the default values for all other areas.', 'weaver-xtreme' /*adm*/ ),
152
- ),
153
-
154
- array(
155
- 'name' => __( 'Container Area', 'weaver-xtreme' /*adm*/ ),
156
- 'id' => 'container',
157
- 'type' => 'widget_area_submit',
158
- 'info' => __( 'Container (#container div) wraps content and sidebars.', 'weaver-xtreme' /*adm*/ ),
159
- ),
160
-
161
- );
162
-
163
- ?>
164
-
165
- <div class="options-intro"><?php _e( '<strong>Wrapping Areas:</strong>
166
- The options on this tab affect the overall site appearance.
167
- The main <strong>Wrapper Area</strong> wraps the entire site, and is used to specify default text and background colors, site width, font families, and more.
168
- With <em>Weaver Xtreme Plus</em>, you can also specify background images for various areas of your site.', 'weaver-xtreme' /*adm*/ ); ?>
169
- <div class="options-intro-menu"><a href="#wrapping-areas"><?php _e( 'Wrapping Areas', 'weaver-xtreme' /*adm*/ ); ?></a> |
170
- <a href="#wrapper-area"><?php _e( 'Wrapper Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
171
- <a href="#container-area"><?php _e( 'Container Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
172
- <a href="#background-images"><?php _e( 'Background Image (X-Plus)', 'weaver-xtreme' /*adm*/ ); ?></a>
173
- </div>
174
- </div>
175
- <?php
176
- weaverx_form_show_options( $opts );
177
- do_action( 'weaverxplus_admin', 'general_appearance' );
178
- }
179
-
180
- function wvrx_ts_new_xp_opt( $vers, $opt ) {
181
- // don't support new xp opts in old xp
182
- if ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare( WEAVER_XPLUS_VERSION, $vers, '>=' ) ) {
183
- return $opt;
184
- }
185
-
186
- return array( 'name' => $opt['name'], 'info' => __( 'This option requires X-Plus Version greater or equal to ', 'weaver-xtreme' ) . $vers, 'type' => 'note' );
187
- }
188
-
189
- // ======================== Main Options > Custom ========================
190
-
191
- function weaverx_mainopts_custom() {
192
- $opts = array(
193
- array( 'type' => 'submit' ),
194
- array(
195
- 'name' => __( 'Custom Options', 'weaver-xtreme' /*adm*/ ),
196
- 'id' => '-admin-generic',
197
- 'type' => 'header',
198
- 'info' => __( 'Set various global custom values.', 'weaver-xtreme' /*adm*/ ),
199
- 'help' => 'help.html#Custom',
200
- ),
201
 
202
- array(
203
- 'name' => __( 'Various Custom Values', 'weaver-xtreme' /*adm*/ ),
204
- 'id' => '-admin-settings',
205
- 'type' => 'subheader',
206
- 'info' => __( 'Adjust various global settings', 'weaver-xtreme' /*adm*/ ),
207
- ),
208
-
209
- array(
210
- 'name' => '<span class="i-left dashicons dashicons-align-none"></span>' . __( 'Smart Margin Width', 'weaver-xtreme' /*adm*/ ),
211
- 'id' => 'smart_margin_int',
212
- 'type' => '+val_percent',
213
- 'info' => __( 'Width used for smart column margins for Sidebars and Content Area. (Default: 1%) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
214
- ),
215
-
216
- array(
217
- 'name' => __( 'Border Color', 'weaver-xtreme' /*adm*/ ),
218
- 'id' => 'border_color',
219
- 'type' => 'color',
220
- 'info' => __( 'Global color of borders. (Default: #222)', 'weaver-xtreme' /*adm*/ ),
221
- ),
222
- array(
223
- 'name' => '<small>' . __( 'Border Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
224
- 'id' => 'border_width_int',
225
- 'type' => 'val_px',
226
- 'info' => __( 'Global Width of borders. (Default: 1px)', 'weaver-xtreme' /*adm*/ ),
227
- ),
228
- array(
229
- 'name' => '<span class="i-left" style="font-size:200%;margin-left:4px;">&#x25a1;</span><small>' . __( 'Border Style', 'weaver-xtreme' /*adm*/ ) . '</small>',
230
- 'id' => 'border_style',
231
- 'type' => '+select_id',
232
- 'info' => __( 'Style of borders - width needs to be > 1 for some styles to work correctly (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
233
- 'value' => array(
234
- array( 'val' => 'solid', 'desc' => __( 'Solid', 'weaver-xtreme' /*adm*/ ) ),
235
- array( 'val' => 'dotted', 'desc' => __( 'Dotted', 'weaver-xtreme' /*adm*/ ) ),
236
- array( 'val' => 'dashed', 'desc' => __( 'Dashed', 'weaver-xtreme' /*adm*/ ) ),
237
- array( 'val' => 'double', 'desc' => __( 'Double', 'weaver-xtreme' /*adm*/ ) ),
238
- array( 'val' => 'groove', 'desc' => __( 'Groove', 'weaver-xtreme' /*adm*/ ) ),
239
- array( 'val' => 'ridge', 'desc' => __( 'Ridge', 'weaver-xtreme' /*adm*/ ) ),
240
- array( 'val' => 'inset', 'desc' => __( 'Inset', 'weaver-xtreme' /*adm*/ ) ),
241
- array( 'val' => 'outset', 'desc' => __( 'Outset', 'weaver-xtreme' /*adm*/ ) ),
242
- ),
243
- ),
244
-
245
- array(
246
- 'name' => __( 'Corner Radius', 'weaver-xtreme' /*adm*/ ),
247
- 'id' => 'rounded_corners_radius',
248
- 'type' => '+val_px',
249
- 'info' => __( 'Controls how "round" corners are. Specify a value (5 to 15 look best) for corner radius. (Default: 8) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
250
- ),
251
-
252
- array(
253
- 'name' => __( 'Hide Menu/Link Tool Tips', 'weaver-xtreme' /*adm*/ ),
254
- 'id' => 'hide_tooltip',
255
- 'type' => '+checkbox',
256
- 'info' => __( 'Hide the tool tip pop up over all menus and links. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
257
- ),
258
-
259
-
260
- array(
261
- 'name' => __( 'Custom Shadow', 'weaver-xtreme' /*adm*/ ),
262
- 'id' => 'custom_shadow',
263
- 'type' => '+widetext',
264
- 'info' => __( 'Specify full <em>box-shadow</em> CSS rule, e.g., <em>{box-shadow: 0 0 3px 1px rgba(0,0,0,0.25);}</em> (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
265
- ),
266
-
267
- array( 'type' => 'submit' ),
268
-
269
- array(
270
- 'name' => __( 'Custom CSS', 'weaver-xtreme' /*adm*/ ),
271
- 'id' => 'custom_css',
272
- 'type' => 'custom_css',
273
- 'info' => __( 'Create Custom CSS Rules', 'weaver-xtreme' /*adm*/ ),
274
- ),
275
-
276
- array( 'type' => 'submit' ),
277
-
278
-
279
- array(
280
- 'name' => __( 'Fonts', 'weaver-xtreme' /*adm*/ ),
281
- 'id' => '-editor-textcolor',
282
- 'type' => 'header',
283
- 'info' => __( 'Font Base Sizes', 'weaver-xtreme' /*adm*/ ),
284
- 'help' => 'font-demo.html',
285
- ),
286
-
287
- array(
288
- 'name' => __( 'Site Base Font Size', 'weaver-xtreme' /*adm*/ ),
289
- 'id' => 'site_fontsize_int',
290
- 'type' => 'val_px',
291
- 'info' => __( 'Base font size of standard text. This value determines the default medium font size. Note that visitors can change their browser\'s font size, so final font size can vary, as expected. (Default: 16px)', 'weaver-xtreme' /*adm*/ ),
292
- ),
293
-
294
- array(
295
- 'name' => __( 'Site Base Line Height', 'weaver-xtreme' /*adm*/ ),
296
- 'id' => 'site_line_height_dec',
297
- 'type' => '+val_num',
298
- 'info' => __( 'Set the Base line-height. Most other line heights based on this multiplier. (Default: 1.5 - no units) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
299
- ),
300
-
301
- array(
302
- 'name' => '<small>' . __( 'Site Base Font Size - Small Tablets', 'weaver-xtreme' /*adm*/ ) . '</small>',
303
- 'id' => 'site_fontsize_tablet_int',
304
- 'type' => '+val_px',
305
- 'info' => __( 'Small Tablet base font size of standard text. (Default medium font size: 16px) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
306
- ),
307
- array(
308
- 'name' => '<small>' . __( 'Site Base Font Size - Phones', 'weaver-xtreme' /*adm*/ ) . '</small>',
309
- 'id' => 'site_fontsize_phone_int',
310
- 'type' => '+val_px',
311
- 'info' => __( 'Phone base font size of standard text. (Default medium font size: 16px) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
312
- ),
313
-
314
- array(
315
- 'name' => __( 'Custom Font Size A', 'weaver-xtreme' /*adm*/ ),
316
- 'id' => 'custom_fontsize_a',
317
- 'type' => '+val_em',
318
- 'info' => __( 'Specify font size in em for Custom Size A (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
319
- ),
320
- array(
321
- 'name' => __( 'Custom Font Size B', 'weaver-xtreme' /*adm*/ ),
322
- 'id' => 'custom_fontsize_b',
323
- 'type' => '+val_em',
324
- 'info' => __( 'Specify font size in em for Custom Size B (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
325
- ),
326
-
327
- array(
328
- 'name' => '<small>' . __( 'Disable Google Font Integration', 'weaver-xtreme' /*adm*/ ) . '</small>',
329
- 'id' => 'disable_google_fonts',
330
- 'type' => '+checkbox',
331
- 'info' => __( '<strong>ADVANCED OPTION!</strong> <em>Be sure you understand the consequences of this option.</em> By disabling Google Font Integration, the Google Fonts definitions will <strong>not</strong> be loaded for your site. <strong style="color:red;font-weight:bold;">Please note:</strong> Any previously selected Google Font Families will revert to generic serif, sans, mono, and script fonts.', 'weaver-xtreme' ),
332
- ),
333
-
334
- array( 'type' => 'submit' ),
335
-
336
- );
337
- ?>
338
- <div class="options-intro"><strong><?php _e( 'Custom &amp; Fonts:', 'weaver-xtreme' /*adm*/ ); ?> </strong>
339
- <?php _e( 'Set values for Custom options and Fonts: Smart Margin, Borders, Corners, Shadows, Custom CSS, and Fonts', 'weaver-xtreme' /*adm*/ ); ?>
340
- <br/>
341
- <div class="options-intro-menu">
342
- <a href="#various-custom-values"><?php _e( 'Various Custom Values', 'weaver-xtreme' /*adm*/ ); ?></a> |
343
- <a href="#custom-css-rules"><?php _e( 'Custom CSS Rules', 'weaver-xtreme' /*adm*/ ); ?></a> |
344
- <a href="#fonts">Fonts</a>
345
- </div>
346
- </div>
347
- <?php
348
- weaverx_form_show_options( $opts );
349
-
350
- do_action( 'weaverxplus_admin', 'fonts' );
351
- }
352
 
353
- // ======================== Main Options > Full Width ========================
 
 
354
 
355
- function weaverx_mainopts_fullwidth() {
 
 
356
 
357
- $opts = array(
358
- array( 'type' => 'submit' ),
359
- array(
360
- 'name' => __( 'Full Width Site', 'weaver-xtreme' /*adm*/ ),
361
- 'id' => '-editor-justify',
362
- 'type' => 'header',
363
- 'info' => __( 'Options to easily create full width site designs', 'weaver-xtreme' /*adm*/ ),
364
- 'help' => 'help.html#FullWidth',
365
- ),
366
 
 
 
 
367
 
368
- array(
369
- 'name' => __( 'One-Step Site Layout', 'weaver-xtreme' /*adm*/ ),
370
- 'id' => 'site_layout',
371
- 'type' => 'select_id',
372
- 'info' => __( 'Easiest way to set overall site width layout. Settings other than Custom or blank <strong>automatically</strong> set and clear other Extend BG and Stretch Width Options. Use Custom to enable manual Custom Full Width Options. You can also use <em>Full</em> and <em>Wide Align</em> options for individual areas to enhance these one-step settings.', 'weaver-xtreme' /*adm*/ ),
373
- 'value' => array(
374
- array( 'val' => '', 'desc' => '' ),
375
- array( 'val' => 'fullwidth', 'desc' => __( 'Full Width - Extends BG to full width', 'weaver-xtreme' ) ),
376
- array( 'val' => 'stretched', 'desc' => __( 'Stretched - Expand to full width', 'weaver-xtreme' ) ),
377
- array( 'val' => 'custom', 'desc' => __( 'Traditional - Use Traditional Width Options', 'weaver-xtreme' ) ),
378
- array( 'val' => 'clear', 'desc' => __( 'Clear One-Step Layout Settings', 'weaver-xtreme' ) )
379
- ),
380
- ),
381
- );
382
 
 
 
 
383
 
384
- $opts[] = array(
385
- 'name' => __( 'Wide and Full Alignment', 'weaver-xtreme' /*adm*/ ),
386
- 'id' => '-admin-appearance3',
387
- 'type' => 'header_area',
388
- 'info' => __( 'Many wrapping areas and other items include Full and Wide alignment for a different way to get full or wide width.', 'weaver-xtreme' /*adm*/ ),
389
- );
390
- $opts[] = array(
391
- 'name' => '<small>' . __( 'Align Full and Wide', 'weaver-xtreme' /*adm*/ ) . '</small>',
392
- 'type' => 'note',
393
- 'info' => __( 'Two new alignment classes, .alignwide and .alignfull are supported by Weaver Xtreme. Most options with the Align option include options for full and wide alignment. Using a width alignment option will extend the full item, including content, to the specified width.', 'weaver-xtreme' /*adm*/ ),
394
- );
395
 
 
 
 
396
 
397
- $opts[] = array(
398
- 'name' => __( 'Extend BG Attributes to Full Width', 'weaver-xtreme' /*adm*/ ),
399
- 'id' => '-editor-code',
400
- 'type' => 'header_area',
401
- 'info' => __( 'The Extend BG Attributes options in this section <em>retain the original content width</em>, while <em>extending the area\'s Background attributes to full width</em>. These includes BG color, BG image, and borders, for example. IMPORTANT: Extend options override wide and full alignment options.', 'weaver-xtreme' /*adm*/ ),
402
- );
403
 
 
404
 
405
- $extend = array(
406
- 'container' => array( __( 'Container Area Extend BG', 'weaver-xtreme' ), __( 'Extend Container Area BG Attributes to full width.', 'weaver-xtreme' ) ),
407
- 'header' => array( __( 'Header Area Extend BG', 'weaver-xtreme' ), __( ' Extend Header Area BG Attributes to full width.', 'weaver-xtreme' ) ),
408
- 'header_sb' => array( __( 'Header Widget Area Extend BG', 'weaver-xtreme' ), __( 'Extend Header Widget Area BG Attributes to full width.', 'weaver-xtreme' ) ),
409
- 'header_html' => array( __( 'Header HTML Area Extend BG', 'weaver-xtreme' ), __( 'Extend Header HTML Area BG Attributes to full width.', 'weaver-xtreme' ) ),
410
- 'm_primary' => array( __( 'Primary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Primary Menu BG Attributes to full width, keep menu items constrained to theme width.', 'weaver-xtreme' ) ),
411
- 'm_secondary' => array( __( 'Secondary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Secondary Menu BG Attributes to full width, keep menu items constrained to theme width.', 'weaver-xtreme' ) ),
412
- 'infobar' => array( __( 'Info Bar Extend BG', 'weaver-xtreme' ), __( 'Extend Info Bar BG Attributes to full width.', 'weaver-xtreme' ) ),
413
- //'content' => array( __('Content Area Fullwidth BG', 'weaver-xtreme'), __('Extend Content Area BG Attributes to full width.','weaver-xtreme' )),
414
- 'post' => array( __( 'Post Area Extend BG', 'weaver-xtreme' ), __( 'Extend each Post Area BG Attributes to full width.', 'weaver-xtreme' ) ),
415
- 'footer' => array( __( 'Footer Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer Area BG Attributes to full width.', 'weaver-xtreme' ) ),
416
- 'footer_sb' => array( __( 'Footer Widget Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer Widget Area BG Attributes to full width.', 'weaver-xtreme' ) ),
417
- 'footer_html' => array( __( 'Footer HTML Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer HTML Area BG Attributes to full width.', 'weaver-xtreme' ) ),
418
 
419
- );
420
 
421
- foreach ( $extend as $id => $vals ) {
422
- $type = 'checkbox';
423
- if ( $id == 'm_extra' ) {
424
- $type = '+checkbox';
425
  }
426
- $opts[] = array(
427
- 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . $vals[0],
428
- 'id' => $id . '_extend_width',
429
- 'type' => $type,
430
- 'info' => $vals[1],
431
- );
432
- }
433
-
434
-
435
- $opts[] = array(
436
- 'name' => __( 'Stretch Areas (Expand)', 'weaver-xtreme' /*adm*/ ),
437
- 'id' => '-editor-expand',
438
- 'type' => 'header_area',
439
- 'info' => __( 'This section has options that let you stretch or expand selected content areas of your site to the full browser width. The content will be responsively displayed - and fully occupy the browser window.', 'weaver-xtreme' /*adm*/ ),
440
- );
441
- $opts[] = array(
442
- 'name' => '<small>' . __( 'These Options OBSOLETE', 'weaver-xtreme' /*adm*/ ) . '</small>',
443
- 'type' => 'note',
444
- 'info' => __( 'Due to the added support for Wide and Full Alignment, the Stretch options are essentially obsolete. Please use the Full and Wide align options available for most of these Stretch items.', 'weaver-xtreme' /*adm*/ ),
445
- );
446
-
447
- $opts[] = array(
448
- 'name' => '<span class="i-left dashicons dashicons-editor-expand"></span>' . __( 'Entire Site Full Width', 'weaver-xtreme' /*adm*/ ),
449
- 'id' => 'wrapper_fullwidth',
450
- 'type' => 'checkbox',
451
- 'info' => __( 'Checking this option will display the <strong>ENTIRE SITE</strong> in the full width of the browser. This option overrides the <em>Theme Width</em> option on the <em>Wrapping Areas : Wrapper Area</em> menu.', 'weaver-xtreme' /*adm*/ ),
452
- );
453
-
454
-
455
- $stretch = array(
456
- 'header' => array( __( 'Header Area Stretch', 'weaver-xtreme' ), __( 'Stretch Header Area to full width. This will include all other Header Area sub-areas as well.', 'weaver-xtreme' ) ),
457
- 'header-image' => array( __( 'Header Image Stretch', 'weaver-xtreme' ), __( 'Stretch Header Image to full width.', 'weaver-xtreme' ) ),
458
- 'site_title' => array( __( 'Site Title/Tagline Stretch', 'weaver-xtreme' ), __( 'This option includes the Site Title, Tagline, Search Button, and MiniMenu.', 'weaver-xtreme' ) ),
459
- 'header-widget-area' => array( __( 'Header Widget Area Stretch', 'weaver-xtreme' ), __( 'Stretch Header Widget Area to full width.', 'weaver-xtreme' ) ),
460
- 'header-html' => array( __( 'Header HTML Area Stretch', 'weaver-xtreme' ), __( 'Stretch Header HTML Area to full width.', 'weaver-xtreme' ) ),
461
- 'm_primary' => array( __( 'Primary Menu Stretch', 'weaver-xtreme' ), __( 'Stretch Primary Menu to full width.', 'weaver-xtreme' ) ),
462
- 'm_secondary' => array( __( 'Secondary Menu Stretch', 'weaver-xtreme' ), __( 'Stretch Secondary Menu to full width.', 'weaver-xtreme' ) ),
463
- 'container' => array( __( 'Container Area Stretch', 'weaver-xtreme' ), __( 'Stretch Container Area to full width.', 'weaver-xtreme' ) ),
464
- 'infobar' => array( __( 'Info Bar Stretch', 'weaver-xtreme' ), __( 'Stretch Info Bar to full width.', 'weaver-xtreme' ) ),
465
- 'post' => array( __( 'Post Area Stretch', 'weaver-xtreme' ), __( 'Stretch Info Bar to full width.', 'weaver-xtreme' ) ),
466
- 'footer' => array( __( 'Footer Area Stretch', 'weaver-xtreme' ), __( 'Checking this option will automatically include the other Footer Area Stretch options as well.', 'weaver-xtreme' ) ),
467
- 'footer_sb' => array( __( 'Footer Widget Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer Widget Area to full width.', 'weaver-xtreme' ) ),
468
- 'footer_html' => array( __( 'Footer HTML Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer HTML Area to full width.', 'weaver-xtreme' ) ),
469
- 'site-ig-wrap' => array( __( 'Footer Copyright Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer Copyright Area to full width.', 'weaver-xtreme' ) ),
470
-
471
- );
472
-
473
- foreach ( $stretch as $id => $vals ) {
474
- $opts[] = array(
475
- 'name' => '<span class="i-left dashicons dashicons-editor-expand"></span>' . $vals[0],
476
- 'id' => 'expand_' . $id,
477
- 'type' => 'checkbox',
478
- 'info' => $vals[1],
479
- );
480
- }
481
-
482
 
483
- $opts[] = array(
484
- 'name' => __( 'Extend BG Color', 'weaver-xtreme' /*adm*/ ),
485
- 'id' => '-admin-appearance',
486
- 'type' => 'header_area',
487
- 'info' => __( 'These options, available with Weaver Xtreme Plus, allow you to stretch the BG color of various area to full width. This is different than the Extend BG Attributes in that only the color is extended, and that color can be different than the content. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
488
- );
489
-
490
-
491
- $extend = array(
492
-
493
- 'header' => array( __( 'Header Area Extend BG Color', 'weaver-xtreme' ), __( 'Extend Header Area BG Color to full width.', 'weaver-xtreme' ) ),
494
- 'm_primary' => array( __( 'Primary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Primary Menu BG Color to full width.', 'weaver-xtreme' ) ),
495
- 'm_secondary' => array( __( 'Secondary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Secondary Menu BG Color to full width.', 'weaver-xtreme' ) ),
496
- 'm_extra' => array( __( 'Extra Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Extra Menu BG Color to full width.', 'weaver-xtreme' ) ),
497
- 'container' => array( __( 'Container Extend BG', 'weaver-xtreme' ), __( 'Extend Container Area BG Color to full width.', 'weaver-xtreme' ) ),
498
- 'content' => array( __( 'Content Extend BG', 'weaver-xtreme' ), __( 'Extend Content Area BG Color to full width.', 'weaver-xtreme' ) ),
499
- 'footer' => array( __( 'Footer Extend BG', 'weaver-xtreme' ), __( 'Extend Footer Area BG Color to full width.', 'weaver-xtreme' ) ),
500
- );
501
-
502
- foreach ( $extend as $id => $vals ) {
503
- $opts[] = array(
504
- 'name' => $vals[0],
505
- 'id' => $id . '_extend_bgcolor',
506
- 'type' => '+color',
507
- 'info' => $vals[1] . ' (&starf;Plus)',
508
- );
509
  }
510
 
511
-
512
- ?>
513
- <div class="options-intro">
514
- <?php _e( '<strong>Full Width:</strong> Options to create full width sites.', 'weaver-xtreme' /*adm*/ ); ?><p>
515
- <?php _e( '<strong style="color:red;">IMPORTANT NOTE:</strong> A better way to create Full and Wide Sites is to use Align Full or Align Wide on the four major areas: Wrapper, Header, Container, and the Footer. The new Left/Right Padding in percent is available for responsive padding with these areas.', 'weaver-xtreme' ); ?>
516
- </p></div>
517
- <?php
518
- weaverx_form_show_options( $opts );
519
-
520
-
521
- }
522
-
523
- // ======================== Main Options > Header ========================
524
- function weaverx_mainopts_header() {
525
-
526
- $wp_logo = weaverx_get_wp_custom_logo_url();
527
-
528
- if ( $wp_logo ) {
529
- $wp_logo_html = "<img src='{$wp_logo}' style='max-height:16px;margin-left:10px;' />";
530
- } else {
531
- $wp_logo_html = __( 'Not set', 'weaver-xtreme' );
532
- }
533
-
534
-
535
- $opts = array(
536
- array( 'type' => 'submit' ),
537
- array(
538
- 'name' => __( 'Header Options', 'weaver-xtreme' /*adm*/ ),
539
- 'id' => '-admin-generic',
540
- 'type' => 'header',
541
- 'info' => __( 'Options affecting site Header', 'weaver-xtreme' /*adm*/ ),
542
- 'help' => 'help.html#HeaderOpt',
543
- ),
544
-
545
-
546
- array(
547
- 'name' => __( 'Header Area', 'weaver-xtreme' /*adm*/ ),
548
- 'id' => 'header',
549
- 'type' => 'widget_area',
550
- 'info' => __( 'The Header Area includes: menu bars, standard header image, title, tagline, header widget area, header HTML area', 'weaver-xtreme' /*adm*/ ),
551
- ),
552
-
553
- array( 'name' => __( 'Header Other options', 'weaver-xtreme' ), 'type' => 'break' ),
554
-
555
- array(
556
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Hide Search on Header', 'weaver-xtreme' /*adm*/ ),
557
- 'id' => 'header_search_hide',
558
- 'type' => 'select_hide',
559
- 'info' => __( 'Selectively hide the Search Box Button on top right of header', 'weaver-xtreme' /*adm*/ ),
560
- ),
561
- array(
562
- 'name' => '<small>' . __( 'Search Area Options:', 'weaver-xtreme' /*adm*/ ) . '</small>',
563
- 'type' => 'note',
564
- 'info' => __( 'Specify search icon, text and background colors Search section of Content Areas tab.', 'weaver-xtreme' /*adm*/ ),
565
- ),
566
-
567
- array( 'type' => 'submit' ),
568
-
569
- array(
570
- 'name' => __( 'Header Image', 'weaver-xtreme' /*adm*/ ),
571
- 'id' => '-format-image',
572
- 'type' => 'subheader',
573
- 'info' => __( 'Settings related to standard header image (Set on Appearance&rarr;Header)', 'weaver-xtreme' /*adm*/ ),
574
- ),
575
-
576
- array(
577
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Hide Header Image', 'weaver-xtreme' /*adm*/ ),
578
- 'id' => 'hide_header_image',
579
- 'type' => 'select_hide',
580
- 'info' => __( 'Check to selectively hide standard header image', 'weaver-xtreme' /*adm*/ ),
581
- ),
582
-
583
- array(
584
- 'name' => '<small>' . __( 'Suggested Header Image Height', 'weaver-xtreme' /*adm*/ ) . '</small>',
585
- 'id' => 'header_image_height_int',
586
- 'type' => 'val_px',
587
- 'info' => __( 'Change the suggested height of the Header Image. This only affects the clipping window on the Appearance:Header page. Header images will be responsively sized. If used with <em>Header Image Rendering</em>, this value will be used to set the minimum height of the BG image. (Default: 188px)', 'weaver-xtreme' /*adm*/ ),
588
- ),
589
-
590
- wvrx_ts_new_xp_opt( '3.0', // >= 3.0
591
- array(
592
- 'name' => __( 'Header Image Rendering', 'weaver-xtreme' /*adm*/ ) . '</small>',
593
- 'id' => 'header_image_render',
594
- 'type' => '+select_id', //code
595
- 'info' => __( 'How to render header image: as img in header or as header area bg image. When rendered as a BG image, other options such as moving Title/Tagline or having image link to home page are not meaningful. (Default: &lt;img&gt; in header div) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
596
- 'value' => array(
597
- array( 'val' => 'header-as-img', 'desc' => __( 'As img in header', 'weaver-xtreme' /*adm*/ ) ),
598
- array( 'val' => 'header-as-bg', 'desc' => __( 'As static BG image', 'weaver-xtreme' /*adm*/ ) ),
599
- array( 'val' => 'header-as-bg-responsive', 'desc' => __( 'As responsive BG image', 'weaver-xtreme' /*adm*/ ) ),
600
- array( 'val' => 'header-as-bg-parallax', 'desc' => __( 'As parallax BG image', 'weaver-xtreme' /*adm*/ ) ),
601
-
602
- ),
603
- ) ),
604
-
605
- array(
606
- 'name' => '<small>' . __( 'Minimum Header Height', 'weaver-xtreme' /*adm*/ ) . '</small>',
607
- 'id' => 'header_min_height',
608
- 'type' => '+val_px',
609
- 'info' => __( 'Set Minimum Height for Header Area. Most useful used with Parallax Header BG Image. Adding Top Margin to Primary Menu bar can also add height. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
610
- ),
611
-
612
-
613
- array(
614
- 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Maximum Image Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
615
- 'id' => 'header_image_max_width_dec',
616
- 'type' => '+val_percent',
617
- 'info' => __( 'Maximum width of Image (Default: 100%) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
618
- ),
619
-
620
- array(
621
- 'name' => '<small>' . __( 'Use Actual Image Size', 'weaver-xtreme' /*adm*/ ) . '</small>',
622
- 'id' => 'header_actual_size',
623
- 'type' => '+checkbox',
624
- 'info' => __( 'Check to use actual header image size. (Default: theme width) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
625
- ),
626
-
627
- array(
628
- 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'Align Header Image', 'weaver-xtreme' /*adm*/ ) . '</small>',
629
- 'id' => 'header_image_align',
630
- 'type' => 'align',
631
- 'info' => __( 'How to align header image. Wide and Full do not apply to BG header image.', 'weaver-xtreme' /*adm*/ ),
632
- ),
633
-
634
- array(
635
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Header Image Front Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
636
- 'id' => 'hide_header_image_front',
637
- 'type' => 'checkbox',
638
- 'info' => __( 'Check to hide display of standard header image on front page only.', 'weaver-xtreme' /*adm*/ ),
639
- ),
640
-
641
- array(
642
- 'name' => '<span class="i-left">{ }</span> <small>' . __( 'Add Classes', 'weaver-xtreme' /*adm*/ ) . '</small>',
643
- 'id' => 'header_image_add_class',
644
- 'type' => '+widetext',
645
- 'info' => '<em>' . __( 'Header Image', 'weaver-xtreme' /*adm*/ ) . '</em>' . __( ': Space separated class names to add to this area (<em>Advanced option</em>) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
646
- ),
647
-
648
- array(
649
- 'name' => '<small>' . __( 'Header Image Links to Site', 'weaver-xtreme' /*adm*/ ) . '</small>',
650
- 'id' => 'link_site_image',
651
- 'type' => 'checkbox',
652
- 'info' => __( 'Check to add a link to site home page for Header Image. Note: If used with <em>Move Title/Tagline over Image</em>, parts of the header image will not be clickable.', 'weaver-xtreme' /*adm*/ ),
653
- ),
654
-
655
- array(
656
- 'name' => '<small>' . __( 'Alternate Header Images:', 'weaver-xtreme' /*adm*/ ) . '</small>',
657
- 'type' => 'note',
658
- 'info' => __( 'Specify alternate header images using the <em>Featured Image Location</em> options on the <em>Content Areas</em> tab for pages, or the <em>Post Specifics</em> tab for single post views.', 'weaver-xtreme' /*adm*/ ),
659
- ),
660
-
661
- array(
662
- 'name' => '<span class="i-left dashicons dashicons-editor-code"></span>' . __( 'Image HTML Replacement', 'weaver-xtreme' /*adm*/ ),
663
- 'id' => 'header_image_html_text',
664
- 'type' => 'textarea',
665
- 'placeholder' => __( 'Any HTML, including shortcodes', 'weaver-xtreme' /*adm*/ ),
666
- 'info' => __( 'Replace Header image with arbitrary HTML. Useful for slider shortcodes in place of image. FI as Header Image has priority over HTML replacement. Extreme Plus also supports this option on a Per Page/Post basis.', 'weaver-xtreme' /*adm*/ ),
667
- 'val' => 1,
668
- ),
669
-
670
- array(
671
- 'name' => '<small>' . __( 'Show On Home Page Only', 'weaver-xtreme' /*adm*/ ) . '</small>',
672
- 'id' => 'header_image_html_home_only',
673
- 'type' => 'checkbox',
674
- 'info' => __( 'Check to use the Image HTML Replacement only on your Front/Home page.', 'weaver-xtreme' /*adm*/ ),
675
- ),
676
-
677
- wvrx_ts_new_xp_opt( '3.0', // >= 3.0
678
- array(
679
- 'name' => '<small>' . __( 'Also show BG Header Image', 'weaver-xtreme' /*adm*/ ) . '</small>',
680
- 'id' => 'header_image_html_plus_bg',
681
- 'type' => '+checkbox',
682
- 'info' => __( 'If you have Image HTML Replacement defined - including Per Page/Post - and also have have set the standard Header Image to display as a BG image, then show <em>both</em> the BG image and the replacement HTML. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
683
- ) ),
684
-
685
-
686
- array(
687
- 'name' => __( 'Header Video', 'weaver-xtreme' /*adm*/ ),
688
- 'id' => '-format-video',
689
- 'type' => 'subheader',
690
- 'info' => __( 'Settings related to Header Video (Set on Appearance&rarr;Header or on the Customize&rarr;Images&rarr;Header Media menu.)', 'weaver-xtreme' /*adm*/ ),
691
- ),
692
-
693
- array(
694
- 'name' => __( 'Header Video Rendering', 'weaver-xtreme' /*adm*/ ) . '</small>',
695
- 'id' => 'header_video_render',
696
- 'type' => 'select_id', //code
697
- 'info' => __( 'How to render Header Video: as image substitute in header or as full browser background cover image will parallax effect. <em style="color:red;">Note that the Header Image options above do not apply to the Header Video media.</em>', 'weaver-xtreme' /*adm*/ ),
698
- 'value' => array(
699
- array( 'val' => 'has-header-video', 'desc' => __( 'As video in header only', 'weaver-xtreme' /*adm*/ ) ),
700
- array( 'val' => 'has-header-video-cover', 'desc' => __( 'As full cover Parallax BG Video', 'weaver-xtreme' /*adm*/ ) ),
701
- array( 'val' => 'has-header-video-none', 'desc' => __( 'Disable Header Video', 'weaver-xtreme' /*adm*/ ) ),
702
- ),
703
- ),
704
-
705
- array(
706
- 'name' => __( 'Header Video Aspect Ratio', 'weaver-xtreme' /*adm*/ ) . '</small>',
707
- 'id' => 'header_video_aspect',
708
- 'type' => 'select_id', //code
709
- 'info' => __( 'It is critical to select aspect ratio of your video. If you see letterboxing black bars, you have the wrong aspect ratio selected.', 'weaver-xtreme' /*adm*/ ),
710
- 'value' => array(
711
- array( 'val' => '16:9', 'desc' => __( '16:9 HDTV', 'weaver-xtreme' /*adm*/ ) ),
712
- array( 'val' => '4:3', 'desc' => __( '4:3 Std TV', 'weaver-xtreme' /*adm*/ ) ),
713
- array( 'val' => '3:2', 'desc' => __( '3:2 35mm Photo', 'weaver-xtreme' /*adm*/ ) ),
714
- array( 'val' => '5:3', 'desc' => __( '5:3 Alternate Photo', 'weaver-xtreme' /*adm*/ ) ),
715
- array( 'val' => '64:27', 'desc' => __( '2.37:1 Cinemascope', 'weaver-xtreme' /*adm*/ ) ),
716
- array( 'val' => '37:20', 'desc' => __( '1.85:1 VistaVision', 'weaver-xtreme' /*adm*/ ) ),
717
- array( 'val' => '3:1', 'desc' => __( '3:1 Banner', 'weaver-xtreme' /*adm*/ ) ),
718
- array( 'val' => '4:1', 'desc' => __( '4:1 Banner', 'weaver-xtreme' /*adm*/ ) ),
719
- array( 'val' => '9:16', 'desc' => __( '9:16 Vertical HD (Please avoid!)', 'weaver-xtreme' /*adm*/ ) ),
720
- ),
721
- ),
722
-
723
-
724
- array(
725
- 'name' => __( 'Custom Logo', 'weaver-xtreme' /*adm*/ ),
726
- 'id' => '-menu',
727
- 'type' => 'subheader',
728
- 'info' => __( 'The native WP Custom Logo, set on the Site Identity Customizer menu.', 'weaver-xtreme' /*adm*/ ),
729
- ),
730
-
731
- array(
732
- 'name' => '<small>' . __( 'Replace Title with Site Logo', 'weaver-xtreme' /*adm*/ ) . '</small>',
733
- 'id' => 'wplogo_for_title',
734
- 'type' => 'checkbox',
735
- 'info' => __( 'Replace the Site Title text with the WP Custom Logo Image. Logo: ', 'weaver-xtreme' /*adm*/ ) . $wp_logo_html,
736
- ),
737
-
738
- array(
739
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide WP Custom Logo', 'weaver-xtreme' /*adm*/ ) . '</small>',
740
- 'id' => 'hide_wp_site_logo',
741
- 'type' => 'select_hide',
742
- 'info' => __( 'Hide native WP Custom Site Logo in Header, by device. (This is not the Weaver Logo/HTML!)', 'weaver-xtreme' /*adm*/ ),
743
- ),
744
-
745
- array(
746
- 'name' => '<span class="i-left dashicons dashicons-align-none"></span><small>' . __( 'Logo for Title Height', 'weaver-xtreme' /*adm*/ ) . '</small>',
747
- 'id' => 'header_logo_height_dec',
748
- 'type' => 'val_px',
749
- 'info' => __( 'Set maximum height of Logo when used to replace Site Title. Default 0 uses the actual image size. This is the maximum height. If the actual image height is smaller, the smaller value is used.', 'weaver-xtreme' /*adm*/ ),
750
- ),
751
-
752
-
753
- array( 'type' => 'submit' ),
754
-
755
-
756
- array(
757
- 'name' => __( 'Site Title/Tagline', 'weaver-xtreme' /*adm*/ ),
758
- 'id' => '-text',
759
- 'type' => 'subheader',
760
- 'info' => __( 'Settings related to the Site Title and Tagline (Tagline sometimes called Site Description)', 'weaver-xtreme' /*adm*/ ),
761
- ),
762
-
763
-
764
- array(
765
- 'name' => __( 'Site Title', 'weaver-xtreme' /*adm*/ ),
766
- 'id' => 'site_title',
767
- 'type' => 'titles',
768
- 'info' => __( "The site's main title in the header (blog title)", 'weaver-xtreme' /*adm*/ ),
769
- ),
770
-
771
- array(
772
- 'name' => '<span class="i-left font-bold" style="font-size:120%;">&#x21cc;</span><small>' . __( 'Title Position', 'weaver-xtreme' /*adm*/ ) . '</small>',
773
- 'id' => 'site_title_position_xy',
774
- 'type' => 'text_xy_percent',
775
- 'info' => __( 'Adjust left and top margins for Title. Decimal and negative values allowed. (Default: X: 7%, Y:0.25%)', 'weaver-xtreme' /*adm*/ ),
776
- ),
777
-
778
- array(
779
- 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'Title Max Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
780
- 'id' => 'site_title_max_w',
781
- 'type' => 'val_percent',
782
- 'info' => __( "Maximum width of title in header area (Default: 90%)", 'weaver-xtreme' /*adm*/ ),
783
- ),
784
-
785
- array(
786
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Site Title', 'weaver-xtreme' /*adm*/ ) . '</small>',
787
- 'id' => 'hide_site_title',
788
- 'type' => 'select_hide',
789
- 'info' => __( 'Hide Site Title (Uses "display:none;" : SEO friendly.)', 'weaver-xtreme' /*adm*/ ),
790
- ),
791
-
792
- array(
793
- 'name' => __( 'Move Title/Tagline over Image', 'weaver-xtreme' /*adm*/ ),
794
- 'id' => 'title_over_image',
795
- 'type' => 'checkbox',
796
- 'info' => __( 'Move the Title, Tagline, Search, Logo/HTML and Mini-Menu over the Header Image. This can make a very attractive header,', 'weaver-xtreme' /*adm*/ ),
797
- ),
798
-
799
- array(
800
- 'name' => __( 'Site Tagline', 'weaver-xtreme' /*adm*/ ),
801
- 'id' => 'tagline',
802
- 'type' => 'titles',
803
- 'info' => __( "The site's tagline (blog description)", 'weaver-xtreme' /*adm*/ ),
804
- ),
805
-
806
-
807
- array(
808
- 'name' => '<span class="i-left font-bold" style="font-size:120%;">&#x21cc;</span><small>' . __( 'Tagline Position', 'weaver-xtreme' /*adm*/ ) . '</small>',
809
- 'id' => 'tagline_xy',
810
- 'type' => 'text_xy_percent',
811
- 'info' => __( 'Adjust default left and top margins for Tagline. (Default: X: 10% Y:0%)', 'weaver-xtreme' /*adm*/ ),
812
- ),
813
- array(
814
- 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'Tagline Max Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
815
- 'id' => 'tagline_max_w',
816
- 'type' => 'val_percent',
817
- 'info' => __( "Maximum width of Tagline in header area (Default: 90%)", 'weaver-xtreme' /*adm*/ ),
818
- ),
819
-
820
- array(
821
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Site Tagline', 'weaver-xtreme' /*adm*/ ) . '</small>',
822
- 'id' => 'hide_site_tagline',
823
- 'type' => 'select_hide',
824
- 'info' => __( 'Hide Site Tagline (Uses "display:none;" : SEO friendly.)', 'weaver-xtreme' /*adm*/ ),
825
- ),
826
-
827
- array(
828
- 'name' => __( 'Title/Tagline Area BG', 'weaver-xtreme' /*adm*/ ),
829
- 'id' => 'title_tagline_bgcolor',
830
- 'type' => 'ctext',
831
- 'info' => __( 'BG Color for the Title, Tagline, Search, Logo/HTML and Mini-Menu area.', 'weaver-xtreme' /*adm*/ ),
832
- ),
833
-
834
-
835
- array(
836
- 'name' => '<span class="i-left font-bold" style="font-size:120%;">&#x21cc;</span><small>' . __( 'Title/Tagline Padding', 'weaver-xtreme' /*adm*/ ) . '</small>',
837
- 'id' => 'title_tagline_xy',
838
- 'type' => 'text_tb',
839
- 'info' => __( 'Add Top/Bottom Padding to the Site Title/Tagline block. This option is especially useful if the Header Image is a BG image. (Default: 0,0)', 'weaver-xtreme' /*adm*/ ),
840
- ),
841
-
842
-
843
- array(
844
- 'name' => '<span class="i-left dashicons dashicons-editor-code"></span><small>' . __( 'Weaver Site Logo/HTML', 'weaver-xtreme' /*adm*/ ) . '</small>',
845
- 'id' => '_site_logo',
846
- 'type' => '+textarea',
847
- 'info' => __( 'HTML for Site Title area. (example: &lt;img src="url" style="position:absolute;top:20px;left:20px;"&nbsp;/&gt; + Custom CSS: #site-logo{min-height:123px;} (This is not the WP Custom Logo!) (&starf;Plus) (&diams;)', 'weaver-xtreme' /*adm*/ ),
848
- ),
849
-
850
- array(
851
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Site Logo/HTML', 'weaver-xtreme' /*adm*/ ) . '</small>',
852
- 'id' => '_hide_site_logo',
853
- 'type' => '+select_hide',
854
- 'info' => __( 'Hide Weaver Site Logo/HTML by device. (This is not the WP Custom Logo!) (&starf;Plus) (&diams;)', 'weaver-xtreme' /*adm*/ ),
855
- ),
856
-
857
- array(
858
- 'name' => '<span class="i-left">{ }</span> <small>' . __( 'Add Classes', 'weaver-xtreme' /*adm*/ ) . '</small>',
859
- 'id' => 'site_title_add_class',
860
- 'type' => '+widetext',
861
- 'info' => '<em>' . __( 'Title/Tagline', 'weaver-xtreme' /*adm*/ ) . '</em>' . __( ': Space separated class names to add to this area (<em>Advanced option</em>) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
862
- ),
863
-
864
-
865
- array( 'type' => 'submit' ),
866
-
867
-
868
- array(
869
- 'name' => __( 'The Header Mini-Menu', 'weaver-xtreme' /*adm*/ ),
870
- 'id' => '-menu',
871
- 'type' => 'subheader',
872
- 'info' => __( 'Horizontal "Mini-Menu" displayed right-aligned of Site Tagline', 'weaver-xtreme' /*adm*/ ),
873
- ),
874
- array(
875
- 'name' => __( 'Note:', 'weaver-xtreme' /*adm*/ ),
876
- 'type' => 'note',
877
- 'info' => __( 'The Header Mini-Menu options are on the Menu Tab.', 'weaver-xtreme' /*adm*/ ),
878
- ),
879
-
880
- array(
881
- 'name' => __( 'Header Widget Area', 'weaver-xtreme' /*adm*/ ),
882
- 'id' => 'header_sb',
883
- 'type' => 'widget_area',
884
- 'info' => __( 'Horizontal Header Widget Area', 'weaver-xtreme' /*adm*/ ),
885
- ),
886
-
887
- array( 'name' => __( 'Other Widget Area Options', 'weaver-xtreme' ), 'type' => 'break' ),
888
-
889
- array(
890
- 'name' => '<small>' . __( 'Header Widget Area Position', 'weaver-xtreme' /*adm*/ ) . '</small>',
891
- 'id' => 'header_sb_position',
892
- 'type' => '+select_id', //code
893
- 'info' => __( 'Change where Header Widget Area is displayed. (Default: Top) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
894
- 'value' => array(
895
- array( 'val' => 'top', 'desc' => __( 'Top of Header', 'weaver-xtreme' /*adm*/ ) ),
896
- array( 'val' => 'before_header', 'desc' => __( 'Before Header Image', 'weaver-xtreme' /*adm*/ ) ),
897
- array( 'val' => 'after_header', 'desc' => __( 'After Header Image', 'weaver-xtreme' /*adm*/ ) ),
898
- array( 'val' => 'after_html', 'desc' => __( 'After HTML Block', 'weaver-xtreme' /*adm*/ ) ),
899
- array( 'val' => 'after_menu', 'desc' => __( 'After Lower Menu', 'weaver-xtreme' /*adm*/ ) ),
900
- array( 'val' => 'pre_header', 'desc' => __( 'Pre-#header &lt;div&gt;', 'weaver-xtreme' /*adm*/ ) ),
901
- array( 'val' => 'post_header', 'desc' => __( 'Post-#header &lt;div&gt;', 'weaver-xtreme' /*adm*/ ) ),
902
- ),
903
- ),
904
-
905
- array(
906
- 'name' => '<span class="i-left dashicons dashicons-editor-kitchensink"></span>' . __( 'Fixed-Top Header Widget Area', 'weaver-xtreme' /*adm*/ ),
907
- 'id' => 'header_sb_fixedtop',
908
- 'type' => 'checkbox',
909
- 'info' => __( 'Fix the Header Widget Area to top of page. If primary/secondary menus also fixed-top, header widget area will always be after secondary and before primary. Use the <em>Expand/Extend BG Attributes</em> on the "Full Width" tab to make a full width Header Widget Area.', 'weaver-xtreme' /*adm*/ ),
910
- ),
911
-
912
- array( 'type' => 'submit' ),
913
-
914
- array(
915
- 'name' => __( 'Header HTML', 'weaver-xtreme' /*adm*/ ),
916
- 'id' => 'header_html',
917
- 'type' => 'widget_area',
918
- __( 'Header Widget Area', 'weaver-xtreme' /*adm*/ ),
919
- 'info' => __( 'Add arbitrary HTML to Header Area (in &lt;div id="header-html"&gt;)', 'weaver-xtreme' /*adm*/ ),
920
- ),
921
-
922
-
923
- array(
924
- 'name' => '<span class="i-left dashicons dashicons-editor-code"></span>' . __( 'Header HTML content', 'weaver-xtreme' /*adm*/ ),
925
- 'id' => 'header_html_text',
926
- 'type' => 'textarea',
927
- 'placeholder' => __( 'Any HTML, including shortcodes', 'weaver-xtreme' /*adm*/ ),
928
- 'info' => __( 'Add arbitrary HTML to Header Area (in &lt;div id="header-html"&gt;)', 'weaver-xtreme' /*adm*/ ),
929
- 'val' => 4,
930
- ),
931
-
932
- array( 'type' => 'submit' ),
933
-
934
- array(
935
- 'name' => __( 'Note:', 'weaver-xtreme' /*adm*/ ),
936
- 'type' => 'note',
937
- 'info' => __( 'There are more standard WordPress Header options available on the Dashboard Appearance->Header panel.', 'weaver-xtreme' /*adm*/ ),
938
- ),
939
- );
940
-
941
- ?>
942
- <div class="options-intro">
943
- <?php _e( '<strong>Header:</strong> Options affecting the Header Area at the top of your site.', 'weaver-xtreme' /*adm*/ ); ?>
944
- <br/>
945
- <div class="options-intro-menu"><a href="#header-area"><?php _e( 'Header Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
946
- <a href="#header-image"><?php _e( 'Header Image', 'weaver-xtreme' /*adm*/ ); ?></a> |
947
- <a href="#header-video"><?php _e( 'Header Video', 'weaver-xtreme' /*adm*/ ); ?></a> |
948
- <a href="#site-title-tagline"><?php _e( 'Site Title/Tagline', 'weaver-xtreme' /*adm*/ ); ?></a> |
949
- <a href="#header-widget-area"><?php _e( 'Header Widget Area', 'weaver-xtreme' /*adm*/ ); ?></a>|
950
- <a href="#header-html"><?php _e( 'Header HTML', 'weaver-xtreme' /*adm*/ ); ?></a>
951
- </div>
952
- </div>
953
- <?php
954
- weaverx_form_show_options( $opts );
955
-
956
- do_action( 'weaverxplus_admin', 'header_opts' );
957
  }
958
 
959
- // ======================== Main Options > Menus ========================
960
- function weaverx_mainopts_menus() {
961
-
962
-
963
- $opts = array(
964
- array( 'type' => 'submit' ),
965
- array(
966
- 'name' => __( 'Menu &amp; Info Bars', 'weaver-xtreme' /*adm*/ ),
967
- 'id' => '-menu',
968
- 'type' => 'header',
969
- 'info' => __( 'Options affecting site Menus and the Info Bar', 'weaver-xtreme' /*adm*/ ),
970
- 'help' => 'help.html#MenuBar',
971
- ),
972
-
973
-
974
- ##### SmartMenu
975
- array(
976
- 'name' => '<span class="i-left dashicons dashicons-menu"></span>' . __( 'Use SmartMenus', 'weaver-xtreme' /*adm*/ ),
977
- 'id' => 'use_smartmenus',
978
- 'type' => 'checkbox',
979
- 'info' => __( 'Use <em>SmartMenus</em> rather than default Weaver Xtreme Menus. <em>SmartMenus</em> provide enhanced menu support, including auto-visibility, and transition effects. This option is recommended. There are additional <em>Smart Menu</em> options available on the <em>Appearance &rarr; +Xtreme Plus</em> menu.', 'weaver-xtreme' /*adm*/ ),
980
- ),
981
-
982
- array(
983
- 'name' => '<small>' . __( 'Menu Mobile/Desktop Switch Point', 'weaver-xtreme' /*adm*/ ) . '</small>',
984
- 'id' => 'mobile_alt_switch',
985
- 'type' => '+val_px',
986
- 'info' => __( '<em>SmartMenus Only:</em> Set when menu bars switch from desktop to mobile. (Default: 767px. Hint: use 768 to force mobile menu on iPad portrait.) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
987
- ),
988
-
989
- array(
990
- 'name' => __( 'Mega Menus:', 'weaver-xtreme' /*adm*/ ),
991
- 'type' => 'note',
992
- 'info' => __( 'Weaver Xtreme Plus allows you to define Mega Menu style dropdown menu items with arbitrary HTML content. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
993
- ),
994
-
995
-
996
- array(
997
- 'name' => __( 'Primary Menu Bar', 'weaver-xtreme' /*adm*/ ),
998
- 'id' => 'm_primary',
999
- 'type' => 'menu_opts',
1000
- 'info' => __( 'Attributes for the Primary Menu Bar (Default Location: Bottom of Header)', 'weaver-xtreme' /*adm*/ ),
1001
- ),
1002
-
1003
- array( 'type' => 'submit' ),
1004
-
1005
- array(
1006
- 'name' => __( 'Secondary Menu Bar', 'weaver-xtreme' /*adm*/ ),
1007
- 'id' => 'm_secondary',
1008
- 'type' => 'menu_opts',
1009
- 'info' => __( 'Attributes for the Secondary Menu Bar (Default Location: Top of Header)', 'weaver-xtreme' /*adm*/ ),
1010
- ),
1011
-
1012
- array( 'type' => 'submit' ),
1013
-
1014
-
1015
- array(
1016
- 'name' => __( 'Options: All Menus', 'weaver-xtreme' /*adm*/ ),
1017
- 'id' => '-forms',
1018
- 'type' => 'subheader_alt',
1019
- 'info' => __( 'Menu Bar enhancements and features', 'weaver-xtreme' /*adm*/ ),
1020
- ),
1021
-
1022
-
1023
- array(
1024
- 'name' => __( 'Current Page BG', 'weaver-xtreme' /*adm*/ ),
1025
- 'id' => 'menubar_curpage_bgcolor',
1026
- 'type' => 'ctext',
1027
- 'info' => __( 'BG Color for the currently displayed page and its ancestors.', 'weaver-xtreme' /*adm*/ ),
1028
- ),
1029
- array(
1030
- 'name' => __( 'Current Page Text', 'weaver-xtreme' /*adm*/ ),
1031
- 'id' => 'menubar_curpage_color',
1032
- 'type' => 'color',
1033
- 'info' => __( 'Color for the currently displayed page and its ancestors.', 'weaver-xtreme' /*adm*/ ),
1034
- ),
1035
-
1036
-
1037
- array(
1038
- 'name' => '<span class="i-left dashicons dashicons-editor-bold"></span><small>' . __( 'Bold Current Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
1039
- 'id' => 'menubar_curpage_bold',
1040
- 'type' => 'checkbox',
1041
- 'info' => __( 'Bold Face Current Page and ancestors', 'weaver-xtreme' /*adm*/ ),
1042
- ),
1043
- array(
1044
- 'name' => '<span class="i-left dashicons dashicons-editor-italic"></span><small>' . __( 'Italic Current Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
1045
- 'id' => 'menubar_curpage_em',
1046
- 'type' => 'checkbox',
1047
- 'info' => __( 'Italic Current Page and ancestors', 'weaver-xtreme' /*adm*/ ),
1048
- ),
1049
- array(
1050
- 'name' => '<small>' . __( 'Do Not Highlight Ancestors', 'weaver-xtreme' /*adm*/ ) . '</small>',
1051
- 'id' => 'menubar_curpage_noancestors',
1052
- 'type' => 'checkbox',
1053
- 'info' => __( 'Highlight Current Page only - do not also highlight ancestor items', 'weaver-xtreme' /*adm*/ ),
1054
- ),
1055
- array(
1056
- 'name' => '<small>' . __( 'Retain Menu Bar Hover BG', 'weaver-xtreme' /*adm*/ ) . '</small>',
1057
- 'id' => 'm_retain_hover',
1058
- 'type' => 'checkbox',
1059
- 'info' => __( 'Retain the menu bar hover BG color when sub-menus are opened.', 'weaver-xtreme' /*adm*/ ),
1060
- ),
1061
-
1062
-
1063
- array(
1064
- 'name' => '<small>' . __( 'Placeholder Hover Cursor', 'weaver-xtreme' /*adm*/ ) . '</small>',
1065
- 'id' => 'placeholder_cursor',
1066
- 'type' => 'select_id', //code
1067
- 'info' => __( 'CSS cursor :hover attribute for placeholder menus (e.g., Custom Menus with URL==#). (Default: pointer)', 'weaver-xtreme' /*adm*/ ),
1068
- 'value' => array(
1069
- array( 'val' => 'pointer', 'desc' => __( 'Pointer (indicates link)', 'weaver-xtreme' /*adm*/ ) ),
1070
- array( 'val' => 'context-menu', 'desc' => __( 'Context Menu available', 'weaver-xtreme' /*adm*/ ) ),
1071
- array( 'val' => 'text', 'desc' => __( 'Text', 'weaver-xtreme' /*adm*/ ) ),
1072
- array( 'val' => 'none', 'desc' => __( 'No pointer', 'weaver-xtreme' /*adm*/ ) ),
1073
- array( 'val' => 'not-allowed', 'desc' => __( 'Action not allowed', 'weaver-xtreme' /*adm*/ ) ),
1074
- array( 'val' => 'default', 'desc' => __( 'The default cursor', 'weaver-xtreme' /*adm*/ ) ),
1075
- ),
1076
- ),
1077
-
1078
-
1079
- array(
1080
- 'name' => '<small>' . __( 'Mobile Menu "Hamburger" Label', 'weaver-xtreme' /*adm*/ ) . '</small>',
1081
- 'id' => 'mobile_alt_label',
1082
- 'type' => 'widetext',
1083
- 'info' => __( 'Alternative label for the default mobile "Hamburger" icon. HTML allowed: &lt;span&gt; or &lt;img&gt; suggested.', 'weaver-xtreme' /*adm*/ ),
1084
- ),
1085
-
1086
-
1087
- array( 'type' => 'submit' ),
1088
-
1089
- array(
1090
- 'name' => __( 'Header Mini-Menu', 'weaver-xtreme' /*adm*/ ),
1091
- 'id' => '-menu',
1092
- 'type' => 'subheader_alt',
1093
- 'info' => __( 'Horizontal "Mini-Menu" displayed right-aligned of Site Tagline', 'weaver-xtreme' /*adm*/ ),
1094
- ),
1095
-
1096
-
1097
- array(
1098
- 'name' => __( 'Mini-Menu', 'weaver-xtreme' /*adm*/ ),
1099
- 'id' => 'm_header_mini',
1100
- 'type' => 'titles_text',
1101
- 'info' => __( 'Color of Mini-Menu Link Items', 'weaver-xtreme' /*adm*/ ),
1102
- ),
1103
-
1104
- array(
1105
- 'name' => '<small>' . __( 'Mini Menu Hover', 'weaver-xtreme' /*adm*/ ) . '</small>',
1106
- 'id' => 'm_header_mini_hover_color',
1107
- 'type' => 'ctext',
1108
- 'info' => __( 'Hover Color for Mini-Menu Links', 'weaver-xtreme' /*adm*/ ),
1109
- ),
1110
-
1111
- array(
1112
- 'name' => '<span class="i-left dashicons dashicons-align-none"></span><small>' . __( 'Mini Menu Top Margin', 'weaver-xtreme' /*adm*/ ) . '</small>',
1113
- 'id' => 'm_header_mini_top_margin_dec',
1114
- 'type' => 'val_em',
1115
- 'info' => __( 'Top margin for Mini-Menu. Negative value moves it up. (Default: 0em)', 'weaver-xtreme' /*adm*/ ),
1116
- ),
1117
-
1118
- array(
1119
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Mini Menu', 'weaver-xtreme' /*adm*/ ) . '</small>',
1120
- 'id' => 'm_header_mini_hide',
1121
- 'type' => 'select_hide',
1122
- 'info' => __( 'Hide Mini Menu', 'weaver-xtreme' /*adm*/ ),
1123
- ),
1124
-
1125
-
1126
- array( 'type' => 'submit' ),
1127
-
1128
-
1129
- array(
1130
- 'name' => __( 'Info Bar', 'weaver-xtreme' /*adm*/ ),
1131
- 'id' => 'infobar',
1132
- 'type' => 'widget_area',
1133
- 'info' => __( 'Info Bar : Breadcrumbs & Page Nav below primary menu', 'weaver-xtreme' /*adm*/ ),
1134
- ),
1135
-
1136
-
1137
- array(
1138
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Hide Breadcrumbs', 'weaver-xtreme' /*adm*/ ),
1139
- 'id' => 'info_hide_breadcrumbs',
1140
- 'type' => 'checkbox',
1141
- 'info' => __( 'Do not display the Breadcrumbs', 'weaver-xtreme' /*adm*/ ),
1142
- ),
1143
- array(
1144
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Hide Page Navigation', 'weaver-xtreme' /*adm*/ ),
1145
- 'id' => 'info_hide_pagenav',
1146
- 'type' => 'checkbox',
1147
- 'info' => __( 'Do not display the numbered Page navigation', 'weaver-xtreme' /*adm*/ ),
1148
- ),
1149
- array(
1150
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Show Search box', 'weaver-xtreme' /*adm*/ ),
1151
- 'id' => 'info_search',
1152
- 'type' => 'checkbox',
1153
- 'info' => __( 'Include a Search box on the right', 'weaver-xtreme' /*adm*/ ),
1154
- ),
1155
- array(
1156
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Show Log In', 'weaver-xtreme' /*adm*/ ),
1157
- 'id' => 'info_addlogin',
1158
- 'type' => 'checkbox',
1159
- 'info' => __( 'Include a simple Log In link on the right', 'weaver-xtreme' /*adm*/ ),
1160
- ),
1161
-
1162
- array(
1163
- 'name' => __( 'Breadcrumb for Home', 'weaver-xtreme' /*adm*/ ),
1164
- 'id' => 'info_home_label',
1165
- 'type' => 'widetext', //code - option done in code
1166
- 'info' => __( 'This lets you change the breadcrumb label for your home page. (Default: Home)', 'weaver-xtreme' /*adm*/ ),
1167
- ),
1168
- array(
1169
- 'name' => __( 'Info Bar Links', 'weaver-xtreme' /*adm*/ ),
1170
- 'id' => 'ibarlink',
1171
- 'type' => 'link',
1172
- 'info' => __( 'Color for links in Info Bar (uses Standard Link colors if left blank)', 'weaver-xtreme' /*adm*/ ),
1173
- ),
1174
- );
1175
-
1176
- ?>
1177
- <div class="options-intro">
1178
- <?php _e( '<strong>Menus:</strong> Options to control how your menus look.', 'weaver-xtreme' /*adm*/ ); ?><br/>
1179
- <div class="options-intro-menu">
1180
- <a href="#primary-menu-bar"><?php _e( 'Primary Menu Bar', 'weaver-xtreme' /*adm*/ ); ?></a> |
1181
- <a href="#secondary-menu-bar"><?php _e( 'Secondary Menu Bar', 'weaver-xtreme' /*adm*/ ); ?></a> |
1182
- <a href="#options-all-menus"><?php _e( 'Options: All Menus', 'weaver-xtreme' /*adm*/ ); ?></a> |
1183
- <a href="#header-mini-menu"><?php _e( 'Header Mini-Menu', 'weaver-xtreme' /*adm*/ ); ?></a> |
1184
- <a href="#info-bar"><?php _e( 'Info Bar', 'weaver-xtreme' /*adm*/ ); ?></a> |
1185
- <a href="#extra-menu"><?php _e( 'Extra Menu (X-Plus)', 'weaver-xtreme' /*adm*/ ); ?></a>
1186
- </div>
1187
- </div>
1188
- <?php
1189
-
1190
- $all_opts = apply_filters( 'weaverxplus_menu_inject', $opts );
1191
-
1192
- weaverx_form_show_options( $all_opts );
1193
-
1194
- }
1195
-
1196
-
1197
- // ======================== Main Options > Content Areas ========================
1198
- function weaverx_mainopts_content() {
1199
- $opts = array(
1200
- array( 'type' => 'submit' ),
1201
- array(
1202
- 'name' => __( 'Content Areas', 'weaver-xtreme' /*adm*/ ),
1203
- 'id' => '-admin-page',
1204
- 'type' => 'header',
1205
- 'info' => __( 'Settings for the content areas (posts and pages)', 'weaver-xtreme' /*adm*/ ),
1206
- 'toggle' => 'content-areas',
1207
- 'help' => 'help.html#ContentAreas',
1208
- ),
1209
-
1210
- array(
1211
- 'name' => __( 'Content Area', 'weaver-xtreme' /*adm*/ ),
1212
- 'id' => 'content',
1213
- 'type' => 'widget_area',
1214
- 'info' => __( 'Area properties for page and post content', 'weaver-xtreme' /*adm*/ ),
1215
- ),
1216
-
1217
- array(
1218
- 'name' => __( 'Page Title', 'weaver-xtreme' /*adm*/ ),
1219
- 'id' => 'page_title',
1220
- 'type' => 'titles',
1221
- 'info' => __( 'Page titles, including pages, post single pages, and archive-like pages.', 'weaver-xtreme' /*adm*/ ),
1222
- ),
1223
- array(
1224
- 'name' => '<small>' . __( 'Bar under Title', 'weaver-xtreme' /*adm*/ ) . '</small>',
1225
- 'id' => 'page_title_underline_int',
1226
- 'type' => 'val_px',
1227
- 'info' => __( 'Enter size in px if you want a bar under page title. Leave blank or 0 for no bar.', 'weaver-xtreme' /*adm*/ ),
1228
- ),
1229
- array(
1230
- 'name' => '<small>' . __( 'Space Between Title and Content', 'weaver-xtreme' /*adm*/ ) . '</small>',
1231
- 'id' => 'space_after_title_dec',
1232
- 'type' => 'val_em',
1233
- 'info' => __( 'Space between Page or Post title and beginning of content (Default: 1.0em)', 'weaver-xtreme' /*adm*/ ),
1234
- ),
1235
-
1236
- array(
1237
- 'name' => __( 'Archive Pages Title Text', 'weaver-xtreme' /*adm*/ ),
1238
- 'id' => 'archive_title',
1239
- 'type' => 'titles',
1240
- 'info' => __( 'Archive-like page titles: archives, categories, tags, searches.', 'weaver-xtreme' /*adm*/ ),
1241
- ),
1242
-
1243
- array(
1244
- 'name' => __( 'Content Links', 'weaver-xtreme' /*adm*/ ),
1245
- 'id' => 'contentlink',
1246
- 'type' => 'link',
1247
- 'info' => __( 'Color for links in Content', 'weaver-xtreme' /*adm*/ ),
1248
- ),
1249
-
1250
- array(
1251
- 'name' => __( 'Content Headings', 'weaver-xtreme' /*adm*/ ),
1252
- 'id' => 'content_h',
1253
- 'type' => '+titles',
1254
- 'info' => __( 'Headings (&lt;h1&gt;-&lt;h6&gt;) in page and post content (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1255
- ),
1256
-
1257
- array( 'type' => 'submit' ),
1258
-
1259
- array(
1260
- 'name' => __( 'Text', 'weaver-xtreme' /*adm*/ ),
1261
- 'id' => '-text',
1262
- 'type' => 'subheader_alt',
1263
- 'info' => __( 'Text related options', 'weaver-xtreme' /*adm*/ ),
1264
- ),
1265
-
1266
- array(
1267
- 'name' => '<small>' . __( 'Space after paragraphs and lists', 'weaver-xtreme' /*adm*/ ) . '</small>',
1268
- 'id' => 'content_p_list_dec',
1269
- 'type' => 'val_em',
1270
- 'info' => __( 'Space after paragraphs and lists (Recommended: 1.5 em)', 'weaver-xtreme' /*adm*/ ),
1271
- ),
1272
-
1273
- array(
1274
- 'name' => '<small>' . __( 'Page/Post Editor BG', 'weaver-xtreme' /*adm*/ ) . '</small>',
1275
- 'id' => 'editor_bgcolor',
1276
- 'type' => 'ctext',
1277
- 'info' => __( 'Alternative Background Color to use for Page/Post editor if you\'re using transparent or image backgrounds.', 'weaver-xtreme' /*adm*/ ),
1278
- ),
1279
-
1280
- array(
1281
- 'name' => '<small>' . __( 'Input Area BG', 'weaver-xtreme' /*adm*/ ) . '</small>',
1282
- 'id' => 'input_bgcolor',
1283
- 'type' => 'ctext',
1284
- 'info' => __( 'Background color for text input (textareas) boxes.', 'weaver-xtreme' /*adm*/ ),
1285
- ),
1286
- array(
1287
- 'name' => '<small>' . __( 'Input Area Text', 'weaver-xtreme' /*adm*/ ) . '</small>',
1288
- 'id' => 'input_color',
1289
- 'type' => 'color',
1290
- 'info' => __( 'Text color for text input (textareas) boxes.', 'weaver-xtreme' /*adm*/ ),
1291
- ),
1292
-
1293
- array(
1294
- 'name' => '<small>' . __( 'Auto Hyphenation', 'weaver-xtreme' /*adm*/ ) . '</small>',
1295
- 'id' => 'hyphenate',
1296
- 'type' => 'checkbox',
1297
- 'info' => __( 'Allow browsers to automatically hyphenate text for appearance.', 'weaver-xtreme' /*adm*/ ),
1298
- ),
1299
-
1300
- array(
1301
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span>' . __( 'Columns', 'weaver-xtreme' /*adm*/ ),
1302
- 'id' => 'page_cols',
1303
- 'type' => 'select_id', //code
1304
- 'info' => __( 'Automatically split all page content into columns using CSS column rules. Also can use Per Page option. (Always 1 column on IE&lt;=9.)', 'weaver-xtreme' /*adm*/ ),
1305
- 'value' => array(
1306
- array( 'val' => '1', 'desc' => __( '1 Column', 'weaver-xtreme' /*adm*/ ) ),
1307
- array( 'val' => '2', 'desc' => __( '2 Columns', 'weaver-xtreme' /*adm*/ ) ),
1308
- array( 'val' => '3', 'desc' => __( '3 Columns', 'weaver-xtreme' /*adm*/ ) ),
1309
- array( 'val' => '4', 'desc' => __( '4 Columns', 'weaver-xtreme' /*adm*/ ) ),
1310
- ),
1311
- ),
1312
-
1313
-
1314
- array(
1315
- 'name' => __( 'Search Boxes', 'weaver-xtreme' /*adm*/ ),
1316
- 'id' => '-search',
1317
- 'type' => 'subheader_alt',
1318
- 'info' => __( 'Search box related options', 'weaver-xtreme' /*adm*/ ),
1319
- ),
1320
-
1321
- array(
1322
- 'name' => '<small>' . __( 'Search Input BG', 'weaver-xtreme' /*adm*/ ) . '</small>',
1323
- 'id' => 'search_bgcolor',
1324
- 'type' => 'ctext',
1325
- 'info' => __( 'Background color for all search input boxes.', 'weaver-xtreme' /*adm*/ ),
1326
- ),
1327
- array(
1328
- 'name' => '<small>' . __( 'Search Input Text', 'weaver-xtreme' /*adm*/ ) . '</small>',
1329
- 'id' => 'search_color',
1330
- 'type' => 'color',
1331
- 'info' => __( 'Text color for all search input boxes.', 'weaver-xtreme' /*adm*/ ),
1332
- ),
1333
-
1334
- array(
1335
- 'name' => __( 'Search Icon Color:', 'weaver-xtreme' /*adm*/ ),
1336
- 'info' => __( 'The Search Icon colored graphics used by previous versions of Weaver Xtreme have been discontinued. A text icon is now used. The color of the search icon is inherited from wrapping areas text color, including the header area and menu bar.', 'weaver-xtreme' /*adm*/ ),
1337
- 'type' => 'note',
1338
- ),
1339
-
1340
-
1341
- array( 'type' => 'submit' ),
1342
- array(
1343
- 'name' => __( 'Images', 'weaver-xtreme' /*adm*/ ),
1344
- 'id' => '-format-image',
1345
- 'type' => 'subheader_alt',
1346
- 'info' => __( 'Image related options', 'weaver-xtreme' /*adm*/ ),
1347
- ),
1348
- array(
1349
- 'name' => '<small>' . __( 'Image Border Color', 'weaver-xtreme' /*adm*/ ) . '</small>',
1350
- 'id' => 'media_lib_border_color',
1351
- 'type' => 'ctext',
1352
- 'info' => __( 'Border color for images in Container and Footer.', 'weaver-xtreme' /*adm*/ ),
1353
- ),
1354
- array(
1355
- 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'Image Border Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
1356
- 'id' => 'media_lib_border_int',
1357
- 'type' => 'val_px',
1358
- 'info' => __( 'Border width for images in Container and Footer. (Leave blank or set to 0 for no image borders.)', 'weaver-xtreme' /*adm*/ ),
1359
- ),
1360
-
1361
- array(
1362
- 'name' => '<span class="i-left dashicons dashicons-admin-page"></span><small>' . __( 'Show Image Shadows', 'weaver-xtreme' /*adm*/ ) . '</small>',
1363
- 'id' => 'show_img_shadows',
1364
- 'type' => 'checkbox',
1365
- 'info' => __( 'Add a shadow to images in Container and Footer. Add CSS+ to Border Color for custom shadow.', 'weaver-xtreme' /*adm*/ ),
1366
- ),
1367
-
1368
- array(
1369
- 'name' => '<small>' . __( 'Restrict Borders to Media Library', 'weaver-xtreme' /*adm*/ ) . '</small>',
1370
- 'id' => 'restrict_img_border',
1371
- 'type' => 'checkbox',
1372
- 'info' => __( 'For Container and Footer, restrict border and shadows to images from Media Library. Manually entered &lt;img&gt; HTML without Media Library classes will not have borders.', 'weaver-xtreme' /*adm*/ ),
1373
- ),
1374
-
1375
- array(
1376
- 'name' => '<small>' . __( 'Caption text color', 'weaver-xtreme' /*adm*/ ) . '</small>',
1377
- 'id' => 'caption_color',
1378
- 'type' => 'ctext',
1379
- 'info' => __( 'Color of captions - e.g., below media images.', 'weaver-xtreme' /*adm*/ ),
1380
- ),
1381
-
1382
- array(
1383
- 'name' => __( 'Featured Image - Pages', 'weaver-xtreme' /*adm*/ ),
1384
- 'id' => '-id',
1385
- 'type' => 'subheader_alt',
1386
- 'info' => __( 'Display of Page Featured Images', 'weaver-xtreme' /*adm*/ ),
1387
- ),
1388
- array(
1389
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#10538;</span>' . __( 'Featured Image Location', 'weaver-xtreme' /*adm*/ ),
1390
- 'id' => 'page_fi_location',
1391
- 'type' => 'fi_location',
1392
- 'info' => __( 'Where to display Featured Image for Pages', 'weaver-xtreme' /*adm*/ ),
1393
- ),
1394
- array(
1395
- 'name' => __( 'Full Width FI BG Image:', 'weaver-xtreme' /*adm*/ ),
1396
- 'info' => __( 'To create full width Page BG images from the FI, check the <em>Container Area Extend BG Attributes</em> box on the <em>Full Width</em> tab.', 'weaver-xtreme' /*adm*/ ),
1397
- 'type' => 'note',
1398
- ),
1399
- array(
1400
- 'name' => __( 'Parallax FI BG Image:', 'weaver-xtreme' /*adm*/ ),
1401
- 'info' => __( 'It will usually be more useful to use the Per Page FI option to specify Parallax BG images.', 'weaver-xtreme' /*adm*/ ),
1402
- 'type' => 'note',
1403
- ),
1404
- array(
1405
- 'name' => '<small>' . __( 'Page Content Height', 'weaver-xtreme' /*adm*/ ) . '</small>',
1406
- 'id' => 'page_min_height',
1407
- 'type' => '+val_px',
1408
- 'info' => __( 'Minimum Height Page Content with Parallax BG. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1409
- ),
1410
-
1411
-
1412
- array(
1413
- 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'Featured Image Alignment', 'weaver-xtreme' /*adm*/ ) . '</small>',
1414
- 'id' => 'page_fi_align',
1415
- 'type' => 'fi_align',
1416
- 'info' => __( 'How to align the Featured Image', 'weaver-xtreme' /*adm*/ ),
1417
- ),
1418
-
1419
- array(
1420
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Featured Image on Pages', 'weaver-xtreme' /*adm*/ ) . '</small>',
1421
- 'id' => 'page_fi_hide',
1422
- 'type' => 'select_hide',
1423
- 'info' => __( 'Where to hide Featured Images on Pages (Posts have their own setting.)', 'weaver-xtreme' /*adm*/ ),
1424
- ),
1425
-
1426
- array(
1427
- 'name' => '<small>' . __( 'Page Featured Image Size', 'weaver-xtreme' /*adm*/ ) . '</small>',
1428
- 'id' => 'page_fi_size',
1429
- 'type' => 'select_id',
1430
- 'info' => __( 'Media Library Image Size for Featured Image on pages. (Header uses full size).', 'weaver-xtreme' /*adm*/ ),
1431
- 'value' => array(
1432
- array( 'val' => 'thumbnail', 'desc' => __( 'Thumbnail', 'weaver-xtreme' /*adm*/ ) ),
1433
- array( 'val' => 'medium', 'desc' => __( 'Medium', 'weaver-xtreme' /*adm*/ ) ),
1434
- array( 'val' => 'large', 'desc' => __( 'Large', 'weaver-xtreme' /*adm*/ ) ),
1435
- array( 'val' => 'full', 'desc' => __( 'Full', 'weaver-xtreme' /*adm*/ ) ),
1436
- ),
1437
- ),
1438
- array(
1439
- 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'Featured Image Width, Pages', 'weaver-xtreme' /*adm*/ ) . '</small>',
1440
- 'id' => 'page_fi_width',
1441
- 'type' => '+val_percent',
1442
- 'info' => __( 'Width of Featured Image on Pages. Max Width in %, overrides FI Size selection. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1443
- ),
1444
- array(
1445
- 'name' => '<small>' . __( "Don't add link to FI", 'weaver-xtreme' /*adm*/ ) . '</small>',
1446
- 'id' => 'page_fi_nolink',
1447
- 'type' => '+checkbox',
1448
- 'info' => __( 'Do not add link to Featured Image. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1449
- ),
1450
-
1451
-
1452
- array(
1453
- 'name' => __( 'Lists - &lt;HR&gt; - Tables', 'weaver-xtreme' /*adm*/ ),
1454
- 'id' => '-list-view',
1455
- 'type' => 'subheader_alt',
1456
- 'info' => __( 'Other options related to content', 'weaver-xtreme' /*adm*/ ),
1457
- ),
1458
- array(
1459
- 'name' => __( 'Content List Bullet', 'weaver-xtreme' /*adm*/ ),
1460
- 'id' => 'contentlist_bullet',
1461
- 'type' => 'select_id',
1462
- 'info' => __( 'Bullet used for Unordered Lists in Content areas', 'weaver-xtreme' /*adm*/ ),
1463
- 'value' => array(
1464
- array( 'val' => 'disc', 'desc' => __( 'Filled Disc', 'weaver-xtreme' /*adm*/ ) ),
1465
- array( 'val' => 'circle', 'desc' => __( 'Circle', 'weaver-xtreme' /*adm*/ ) ),
1466
- array( 'val' => 'square', 'desc' => __( 'Square', 'weaver-xtreme' /*adm*/ ) ),
1467
- array( 'val' => 'none', 'desc' => __( 'None', 'weaver-xtreme' /*adm*/ ) ),
1468
- ),
1469
- ),
1470
-
1471
- array(
1472
- 'name' => __( '&lt;HR&gt; color', 'weaver-xtreme' /*adm*/ ),
1473
- 'id' => 'hr_color',
1474
- 'type' => 'ctext',
1475
- 'info' => __( 'Color of horizontal (&lt;hr&gt;) lines in posts and pages.', 'weaver-xtreme' /*adm*/ ),
1476
- ),
1477
-
1478
- array(
1479
- 'name' => __( 'Table Style', 'weaver-xtreme' /*adm*/ ),
1480
- 'id' => 'weaverx_tables',
1481
- 'type' => 'select_id',
1482
- 'info' => __( 'Style used for tables in content.', 'weaver-xtreme' /*adm*/ ),
1483
- 'value' => array(
1484
- array( 'val' => 'default', 'desc' => __( 'Theme Default', 'weaver-xtreme' /*adm*/ ) ),
1485
- array( 'val' => 'bold', 'desc' => __( 'Bold Headings', 'weaver-xtreme' /*adm*/ ) ),
1486
- array( 'val' => 'noborders', 'desc' => __( 'No Borders', 'weaver-xtreme' /*adm*/ ) ),
1487
- array( 'val' => 'fullwidth', 'desc' => __( 'Wide', 'weaver-xtreme' /*adm*/ ) ),
1488
- array( 'val' => 'wide', 'desc' => __( 'Wide 2', 'weaver-xtreme' /*adm*/ ) ),
1489
- array( 'val' => 'plain', 'desc' => __( 'Minimal', 'weaver-xtreme' /*adm*/ ) ),
1490
- ),
1491
- ),
1492
-
1493
- array(
1494
- 'name' => __( 'Comments', 'weaver-xtreme' /*adm*/ ),
1495
- 'id' => '-admin-comments',
1496
- 'type' => 'subheader',
1497
- 'info' => __( 'Settings for displaying comments', 'weaver-xtreme' /*adm*/ ),
1498
- ),
1499
- array(
1500
- 'name' => __( 'Comment Headings', 'weaver-xtreme' /*adm*/ ),
1501
- 'id' => 'comment_headings_color',
1502
- 'type' => 'ctext',
1503
- 'info' => __( 'Color for various headings in comment form', 'weaver-xtreme' /*adm*/ ),
1504
- ),
1505
- array(
1506
- 'name' => __( 'Comment Content BG', 'weaver-xtreme' /*adm*/ ),
1507
- 'id' => 'comment_content_bgcolor',
1508
- 'type' => 'ctext',
1509
- 'info' => __( 'BG Color of Comment Content area', 'weaver-xtreme' /*adm*/ ),
1510
- ),
1511
- array(
1512
- 'name' => __( 'Comment Submit Button BG', 'weaver-xtreme' /*adm*/ ),
1513
- 'id' => 'comment_submit_bgcolor',
1514
- 'type' => 'ctext',
1515
- 'info' => __( 'BG Color of "Post Comment" submit button', 'weaver-xtreme' /*adm*/ ),
1516
- ),
1517
- array(
1518
- 'name' => '<span class="i-left" style="font-size:200%;margin-left:4px;">&#x25a1;</span><small>' . __( 'Show Borders on Comments', 'weaver-xtreme' /*adm*/ ) . '</small>',
1519
- 'id' => 'show_comment_borders',
1520
- 'type' => 'checkbox',
1521
- 'info' => __( 'Show Borders around comment sections - improves visual look of comments.', 'weaver-xtreme' /*adm*/ ),
1522
- ),
1523
-
1524
- array(
1525
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Old Comments When Closed', 'weaver-xtreme' /*adm*/ ) . '</small>',
1526
- 'id' => 'hide_old_comments',
1527
- 'type' => '+checkbox',
1528
- 'info' => __( 'Hide previous comments after closing comments for page or post. (Default: show old comments after closing.) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1529
- ),
1530
- array(
1531
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . '<small>' . __( 'Show Allowed HTML', 'weaver-xtreme' /*adm*/ ) . '</small>',
1532
- 'id' => 'form_allowed_tags',
1533
- 'type' => '+checkbox',
1534
- 'info' => __( 'Show the allowed HTML tags below comment input box (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1535
- ),
1536
- array(
1537
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><span class="dashicons dashicons-admin-comments"></span>' .
1538
- '<small>' . __( 'Hide Comment Title Icon', 'weaver-xtreme' /*adm*/ ) . '</small>',
1539
- 'id' => 'hide_comment_bubble',
1540
- 'type' => '+checkbox',
1541
- 'info' => __( 'Hide the comment icon before the Comments title (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1542
- ),
1543
- array(
1544
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Separator Above Comments', 'weaver-xtreme' /*adm*/ ) . '</small>',
1545
- 'id' => 'hide_comment_hr',
1546
- 'type' => '+checkbox',
1547
- 'info' => __( 'Hide the (&lt;hr&gt;) separator line above the Comments area (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1548
- ),
1549
- );
1550
-
1551
- ?>
1552
- <div class="options-intro">
1553
- <?php _e( '<strong>Content Areas:</strong> Includes options common to both <em>Pages</em> and <em>Posts</em>. Options for <strong>Text</strong>,
1554
- <strong>Padding</strong>, <strong>Images</strong>, <strong>Lists &amp; Tables</strong>, and user <strong>Comments</strong>.', 'weaver-xtreme' /*adm*/ ); ?><br/>
1555
- <div class="options-intro-menu">
1556
- <a href="#content-area"><?php _e( 'Content Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
1557
- <a href="#text"><?php _e( 'Text', 'weaver-xtreme' /*adm*/ ); ?></a> |
1558
- <a href="#search-boxes"><?php _e( 'Search Boxes', 'weaver-xtreme' /*adm*/ ); ?></a> |
1559
- <a href="#images"><?php _e( 'Images', 'weaver-xtreme' /*adm*/ ); ?></a> |
1560
- <a href="#featured-image-pages"><?php _e( 'Featured Image - Pages', 'weaver-xtreme' /*adm*/ ); ?></a> |
1561
- <a href="#lists-hr-tables"><?php _e( 'Lists - &lt;HR&gt; - Tables', 'weaver-xtreme' /*adm*/ ); ?></a> |
1562
- <a href="#comments"><?php _e( 'Comments', 'weaver-xtreme' /*adm*/ ); ?></a>
1563
- </div>
1564
- </div>
1565
- <?php
1566
- weaverx_form_show_options( $opts );
1567
- do_action( 'weaverxplus_admin', 'content_areas' );
1568
- ?>
1569
- <span style="color:green;"><b><?php _e( 'Hiding/Enabling Page and Post Comments', 'weaver-xtreme' /*adm*/ ); ?></b></span>
1570
- <?php
1571
- weaverx_help_link( 'help.html#LeavingComments', __( 'Help for Leaving Comments', 'weaver-xtreme' /*adm*/ ) );
1572
- ?>
1573
- <p>
1574
- <?php _e( 'Controlling "Reply/Leave a Comment" visibility for pages and posts is <strong>not</strong> a theme function.
1575
- It is controlled by WordPress settings.
1576
- Please click the ? just above to see the help file entry!', 'weaver-xtreme' /*adm*/ ); ?>
1577
- </p>
1578
- <?php
1579
- }
1580
-
1581
- // ======================== Main Options > Post Specifics ========================
1582
- function weaverx_mainopts_posts() {
1583
- $opts = array(
1584
- array( 'type' => 'submit' ),
1585
- array(
1586
- 'name' => __( 'Post Specifics', 'weaver-xtreme' /*adm*/ ),
1587
- 'id' => '-admin-post',
1588
- 'type' => 'header',
1589
- 'info' => __( 'Settings affecting Posts', 'weaver-xtreme' /*adm*/ ),
1590
- 'help' => 'help.html#PPSpecifics',
1591
- ),
1592
-
1593
- array(
1594
- 'name' => __( 'Post Area', 'weaver-xtreme' /*adm*/ ),
1595
- 'id' => 'post',
1596
- 'type' => 'widget_area',
1597
- 'info' => __( 'Use these settings to override Content Area settings for Posts (blog entries).', 'weaver-xtreme' /*adm*/ ),
1598
- ),
1599
-
1600
- array(
1601
- 'name' => __( 'Sticky Post BG', 'weaver-xtreme' /*adm*/ ),
1602
- 'id' => 'stickypost_bgcolor',
1603
- 'type' => 'ctext',
1604
- 'info' => __( 'BG color for sticky posts, author info. (Add {border:none;padding:0;} to CSS to make sticky posts same as regular posts.)', 'weaver-xtreme' /*adm*/ ),
1605
- ),
1606
-
1607
- array(
1608
- 'name' => '<small>' . __( 'Reset Major Content Options', 'weaver-xtreme' /*adm*/ ) . '</small>',
1609
- 'id' => 'reset_content_opts',
1610
- 'type' => 'checkbox',
1611
- 'info' => __( 'Clear wrapping Content Area bg, borders, padding, and top/bottom margins for views with posts. Allows more flexible post settings.', 'weaver-xtreme' /*adm*/ ),
1612
- ),
1613
-
1614
-
1615
- array( 'type' => 'submit' ),
1616
-
1617
-
1618
- array(
1619
- 'name' => __( 'Post Title', 'weaver-xtreme' /*adm*/ ),
1620
- 'id' => '-text',
1621
- 'type' => 'subheader_alt',
1622
- 'info' => __( 'Options for the Post Title', 'weaver-xtreme' /*adm*/ ),
1623
- ),
1624
-
1625
- array(
1626
- 'name' => __( 'Post Title', 'weaver-xtreme' /*adm*/ ),
1627
- 'id' => 'post_title',
1628
- 'type' => 'titles',
1629
- 'info' => __( "Post title (Blog Views)", 'weaver-xtreme' /*adm*/ ),
1630
- ),
1631
-
1632
- array(
1633
- 'name' => '<small>' . __( 'Bar under Post Titles', 'weaver-xtreme' /*adm*/ ) . '</small>',
1634
- 'id' => 'post_title_underline_int',
1635
- 'type' => 'val_px',
1636
- 'info' => __( 'Enter size in px if you want a bar under page title. Leave blank or 0 for no bar.', 'weaver-xtreme' /*adm*/ ),
1637
- ),
1638
-
1639
- array(
1640
- 'name' => '<small>' . __( 'Post Title Hover', 'weaver-xtreme' /*adm*/ ) . '</small>',
1641
- 'id' => 'post_title_hover_color',
1642
- 'type' => 'ctext',
1643
- 'info' => __( 'Color if you want the Post Title to show alternate color for hover', 'weaver-xtreme' /*adm*/ ),
1644
- ),
1645
-
1646
- array(
1647
- 'name' => '<small>' . __( 'Space After Post Title', 'weaver-xtreme' /*adm*/ ) . '</small>',
1648
- 'id' => 'post_title_bottom_margin_dec',
1649
- 'type' => 'val_em',
1650
- 'info' => __( 'Space between Post Title and Post Info Line or content. (Default: 0.15em)', 'weaver-xtreme' /*adm*/ ),
1651
- ),
1652
-
1653
-
1654
- array(
1655
- 'name' => '<span class="i-left dashicons dashicons-admin-comments"></span><small>' . __( 'Show Comment Bubble', 'weaver-xtreme' /*adm*/ ) . '</small>',
1656
- 'id' => 'show_post_bubble',
1657
- 'type' => 'checkbox',
1658
- 'info' => __( "Show comment bubble with link to comments on the post info line.", 'weaver-xtreme' /*adm*/ ),
1659
- ),
1660
-
1661
- array(
1662
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide <em>Post Format</em> Icons', 'weaver-xtreme' /*adm*/ ) . '</small>',
1663
- 'id' => 'hide_post_format_icon',
1664
- 'type' => '+checkbox',
1665
- 'info' => __( 'Hide the icons for posts with Post Format specified. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1666
- ),
1667
-
1668
-
1669
- array(
1670
- 'name' => __( 'Post Layout', 'weaver-xtreme' /*adm*/ ),
1671
- 'id' => '-schedule',
1672
- 'type' => 'subheader_alt',
1673
- 'info' => __( 'Layout of Posts', 'weaver-xtreme' /*adm*/ ),
1674
- ),
1675
-
1676
- array(
1677
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span>' . __( 'Post Content Columns', 'weaver-xtreme' /*adm*/ ),
1678
- 'id' => 'post_cols',
1679
- 'type' => 'select_id', //code
1680
- 'info' => __( 'Automatically split all post content into columns for both blog and single page views. <em>This is post content only.</em> This is not the same as "Columns of Posts". (IE&lt;=9 will display 1 col.)', 'weaver-xtreme' /*adm*/ ),
1681
- 'value' => array(
1682
- array( 'val' => '1', 'desc' => __( '1 Column', 'weaver-xtreme' /*adm*/ ) ),
1683
- array( 'val' => '2', 'desc' => __( '2 Columns', 'weaver-xtreme' /*adm*/ ) ),
1684
- array( 'val' => '3', 'desc' => __( '3 Columns', 'weaver-xtreme' /*adm*/ ) ),
1685
- array( 'val' => '4', 'desc' => __( '4 Columns', 'weaver-xtreme' /*adm*/ ) ),
1686
- ),
1687
- ),
1688
-
1689
- array(
1690
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span>' . __( 'Columns of Posts', 'weaver-xtreme' /*adm*/ ),
1691
- 'id' => 'blog_cols',
1692
- 'type' => 'select_id', //code
1693
- 'info' => __( 'Display posts on blog page with this many columns. (You should adjust "Display posts on blog page with this many columns" on Settings:Reading to be a multiple of this value.)', 'weaver-xtreme' /*adm*/ ),
1694
- 'value' => array(
1695
- array( 'val' => '1', 'desc' => __( '1 Column', 'weaver-xtreme' /*adm*/ ) ),
1696
- array( 'val' => '2', 'desc' => __( '2 Columns', 'weaver-xtreme' /*adm*/ ) ),
1697
- array( 'val' => '3', 'desc' => __( '3 Columns', 'weaver-xtreme' /*adm*/ ) ),
1698
- ),
1699
- ),
1700
-
1701
- array(
1702
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span><small>' . __( 'Use Columns on Archive Pages', 'weaver-xtreme' /*adm*/ ) . '</small>',
1703
- 'id' => 'archive_cols',
1704
- 'type' => 'checkbox', //code
1705
- 'info' => __( 'Display posts on archive-like pages using columns. (Archive, Author, Category, Tag)', 'weaver-xtreme' /*adm*/ ),
1706
- ),
1707
-
1708
- array(
1709
- 'name' => '<small>' . __( 'First Post One Column', 'weaver-xtreme' /*adm*/ ) . '</small>',
1710
- 'id' => 'blog_first_one',
1711
- 'type' => 'checkbox',
1712
- 'info' => __( 'Always display the first post in one column.', 'weaver-xtreme' /*adm*/ ),
1713
- ),
1714
- array(
1715
- 'name' => '<small>' . __( 'Sticky Posts One Column', 'weaver-xtreme' /*adm*/ ) . '</small>',
1716
- 'id' => 'blog_sticky_one',
1717
- 'type' => 'checkbox',
1718
- 'info' => __( "Display opening Sticky Posts in one column. If First Post One Column also checked, then first non-sticky post will be one column.", 'weaver-xtreme' /*adm*/ ),
1719
- ),
1720
- array(
1721
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span><small>' . __( 'Use <em>Masonry</em> for Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
1722
- 'id' => 'masonry_cols',
1723
- 'type' => 'select_id', //code
1724
- 'info' => __( 'Use the <em>Masonry</em> blog layout option to show dynamically packed posts on blog and archive-like pages. Overrides "Columns of Posts" setting. <em>Not compatible with full width FI BG images.</em>', 'weaver-xtreme' /*adm*/ ),
1725
- 'value' => array(
1726
- array( 'val' => '0', 'desc' => '' ),
1727
- array( 'val' => '2', 'desc' => __( '2 Columns', 'weaver-xtreme' /*adm*/ ) ),
1728
- array( 'val' => '3', 'desc' => __( '3 Columns', 'weaver-xtreme' /*adm*/ ) ),
1729
- array( 'val' => '4', 'desc' => __( '4 Columns', 'weaver-xtreme' /*adm*/ ) ),
1730
- array( 'val' => '5', 'desc' => __( '5 Columns', 'weaver-xtreme' /*adm*/ ) ),
1731
- ),
1732
- ),
1733
-
1734
- array(
1735
- 'name' => '<small>' . __( 'Compact <em>Post Format</em> Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
1736
- 'id' => 'compact_post_formats',
1737
- 'type' => 'checkbox',
1738
- 'info' => __( 'Use compact layout for <em>Post Format</em> posts (Image, Gallery, Video, etc.). Useful for photo blogs and multi-column layouts. Looks great with <em>Masonry</em>.', 'weaver-xtreme' /*adm*/ ),
1739
- ),
1740
- array(
1741
- 'name' => __( 'Photo Bloging', 'weaver-xtreme' /*adm*/ ),
1742
- 'info' => __( 'Read the Help entry for information on creating a Photo Blog page', 'weaver-xtreme' /*adm*/ ),
1743
- 'type' => 'note',
1744
- 'help' => 'help.html#PhotoBlog',
1745
- ),
1746
-
1747
-
1748
- array( 'type' => 'submit' ),
1749
-
1750
- array(
1751
- 'name' => __( 'Excerpts / Full Posts', 'weaver-xtreme' /*adm*/ ),
1752
- 'id' => '-exerpt-view',
1753
- 'type' => 'subheader_alt',
1754
- 'info' => __( 'How to display posts in Blog / Archive Views', 'weaver-xtreme' /*adm*/ ),
1755
- ),
1756
- array(
1757
- 'name' => __( 'Show Full Blog Posts', 'weaver-xtreme' /*adm*/ ),
1758
- 'id' => 'fullpost_blog',
1759
- 'type' => 'checkbox',
1760
- 'info' => __( 'Will display full blog post instead of excerpts on <em>blog pages</em>.', 'weaver-xtreme' /*adm*/ ),
1761
- ),
1762
- array(
1763
- 'name' => '<small>' . __( 'Full Post for Archives', 'weaver-xtreme' /*adm*/ ) . '</small>',
1764
- 'id' => 'fullpost_archive',
1765
- 'type' => 'checkbox',
1766
- 'info' => __( 'Display the full posts instead of excerpts on <em>special post pages</em>. (Archives, Categories, etc.) Does not override manually added &lt;--more--> breaks.', 'weaver-xtreme' /*adm*/ ),
1767
- ),
1768
- array(
1769
- 'name' => '<small>' . __( 'Full Post for Searches', 'weaver-xtreme' /*adm*/ ) . '</small>',
1770
- 'id' => 'fullpost_search',
1771
- 'type' => 'checkbox',
1772
- 'info' => __( 'Display the full posts instead of excerpts for Search results. Does not override manually added &lt;--more--> breaks.', 'weaver-xtreme' /*adm*/ ),
1773
- ),
1774
- array(
1775
- 'name' => '<small>' . __( 'Full text for 1st <em>"n"</em> Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
1776
- 'id' => 'fullpost_first',
1777
- 'type' => 'val_num',
1778
- 'info' => __( 'Display the full post for the first "n" posts on Blog pages. Does not override manually added &lt;--more--> breaks.', 'weaver-xtreme' /*adm*/ ),
1779
- ),
1780
- array(
1781
- 'name' => '<small>' . __( 'Excerpt length', 'weaver-xtreme' /*adm*/ ) . '</small>',
1782
- 'id' => 'excerpt_length',
1783
- 'type' => 'val_num',
1784
- 'info' => __( 'Change post excerpt length. (Default: 40 words)', 'weaver-xtreme' /*adm*/ ),
1785
- ),
1786
- array(
1787
- 'name' => '<small>' . __( '<em>Continue reading</em> Message', 'weaver-xtreme' /*adm*/ ) . '</small>',
1788
- 'id' => 'excerpt_more_msg',
1789
- 'type' => 'widetext',
1790
- 'info' => __( 'Change default <em>Continue reading &rarr;</em> message for excerpts. Can include HTML (e.g., &lt;img>).', 'weaver-xtreme' /*adm*/ ),
1791
- ),
1792
- array( 'type' => 'endheader' ),
1793
-
1794
-
1795
- array(
1796
- 'name' => __( 'Post Navigation', 'weaver-xtreme' /*adm*/ ),
1797
- 'id' => '-leftright',
1798
- 'type' => 'subheader_alt',
1799
- 'info' => __( 'Navigation for moving between posts', 'weaver-xtreme' /*adm*/ ),
1800
- ),
1801
- array(
1802
- 'name' => __( 'Blog Navigation Style', 'weaver-xtreme' /*adm*/ ),
1803
- 'id' => 'nav_style',
1804
- 'type' => 'select_id',
1805
- 'info' => __( 'Style of navigation links on blog pages: "Older/Newer posts", "Previous/Next Post", or by page numbers', 'weaver-xtreme' /*adm*/ ),
1806
- 'value' => array(
1807
- array( 'val' => 'old_new', 'desc' => __( 'Older/Newer', 'weaver-xtreme' /*adm*/ ) ),
1808
- array( 'val' => 'prev_next', 'desc' => __( 'Previous/Next', 'weaver-xtreme' /*adm*/ ) ),
1809
- array( 'val' => 'paged_left', 'desc' => __( 'Paged - Left', 'weaver-xtreme' /*adm*/ ) ),
1810
- array( 'val' => 'paged_right', 'desc' => __( 'Paged - Right', 'weaver-xtreme' /*adm*/ ) ),
1811
- ),
1812
- ),
1813
- array(
1814
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Top Links', 'weaver-xtreme' /*adm*/ ) . '</small>',
1815
- 'id' => 'nav_hide_above',
1816
- 'type' => '+checkbox',
1817
- 'info' => __( 'Hide the blog navigation links at the top (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1818
- ),
1819
- array(
1820
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Bottom Links', 'weaver-xtreme' /*adm*/ ) . '</small>',
1821
- 'id' => 'nav_hide_below',
1822
- 'type' => '+checkbox',
1823
- 'info' => __( 'Hide the blog navigation links at the bottom (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1824
- ),
1825
- array(
1826
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Show Top on First Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
1827
- 'id' => 'nav_show_first',
1828
- 'type' => '+checkbox',
1829
- 'info' => __( 'Show navigation at top even on the first page (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1830
- ),
1831
-
1832
- array(
1833
- 'name' => __( 'Single Page Navigation Style', 'weaver-xtreme' /*adm*/ ),
1834
- 'id' => 'single_nav_style',
1835
- 'type' => 'select_id',
1836
- 'info' => __( 'Style of navigation links on post Single pages: Previous/Next, by title, or none', 'weaver-xtreme' /*adm*/ ),
1837
- 'value' => array(
1838
- array( 'val' => 'title', 'desc' => __( 'Post Titles', 'weaver-xtreme' /*adm*/ ) ),
1839
- array( 'val' => 'prev_next', 'desc' => __( 'Previous/Next', 'weaver-xtreme' /*adm*/ ) ),
1840
- array( 'val' => 'hide', 'desc' => __( 'None - no display', 'weaver-xtreme' /*adm*/ ) ),
1841
- ),
1842
- ),
1843
- array(
1844
- 'name' => '<small>' . __( 'Link to Same Categories', 'weaver-xtreme' /*adm*/ ) . '</small>',
1845
- 'id' => 'single_nav_link_cats',
1846
- 'type' => '+checkbox',
1847
- 'info' => __( 'Single Page navigation links point to posts with same categories. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1848
- ),
1849
- array(
1850
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Top Links', 'weaver-xtreme' /*adm*/ ) . '</small>',
1851
- 'id' => 'single_nav_hide_above',
1852
- 'type' => '+checkbox',
1853
- 'info' => __( 'Hide the single page navigation links at the top (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1854
- ),
1855
- array(
1856
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Bottom Links', 'weaver-xtreme' /*adm*/ ) . '</small>',
1857
- 'id' => 'single_nav_hide_below',
1858
- 'type' => '+checkbox',
1859
- 'info' => __( 'Hide the single page navigation links at the bottom (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1860
- ),
1861
-
1862
- array( 'type' => 'submit' ),
1863
- array(
1864
- 'name' => __( 'Post Meta Info Areas', 'weaver-xtreme' /*adm*/ ),
1865
- 'id' => '-info',
1866
- 'type' => 'subheader_alt',
1867
- 'info' => __( 'Top and Bottom Post Meta Information areas', 'weaver-xtreme' /*adm*/ ),
1868
- ),
1869
-
1870
- array(
1871
- 'name' => __( 'Top Post Info', 'weaver-xtreme' /*adm*/ ),
1872
- 'id' => 'post_info_top',
1873
- 'type' => 'titles_text',
1874
- 'info' => __( "Top Post info line", 'weaver-xtreme' /*adm*/ ),
1875
- ),
1876
-
1877
-
1878
- array(
1879
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide top post info', 'weaver-xtreme' /*adm*/ ) . '</small>',
1880
- 'id' => 'post_info_hide_top',
1881
- 'type' => 'checkbox', //code
1882
- 'info' => __( 'Hide entire top info line (posted on, by) of post.', 'weaver-xtreme' /*adm*/ ),
1883
- ),
1884
-
1885
- array(
1886
- 'name' => __( 'Bottom Post Info', 'weaver-xtreme' /*adm*/ ),
1887
- 'id' => 'post_info_bottom',
1888
- 'type' => 'titles_text',
1889
- 'info' => __( 'The bottom post info line', 'weaver-xtreme' /*adm*/ ),
1890
- ),
1891
-
1892
- array(
1893
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide bottom post info', 'weaver-xtreme' /*adm*/ ) . '</small>',
1894
- 'id' => 'post_info_hide_bottom',
1895
- 'type' => 'checkbox', //code
1896
- 'info' => __( 'Hide entire bottom info line (posted in, comments) of post.', 'weaver-xtreme' /*adm*/ ),
1897
- ),
1898
-
1899
-
1900
- array(
1901
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Show Author Avatar', 'weaver-xtreme' /*adm*/ ),
1902
- 'id' => 'show_post_avatar',
1903
- 'type' => 'select_id', //code
1904
- 'info' => __( 'Show author avatar on the post info line (also can be set per post with post editor)', 'weaver-xtreme' /*adm*/ ),
1905
- 'value' => array(
1906
- array( 'val' => 'hide', 'desc' => __( 'Do Not Show', 'weaver-xtreme' /*adm*/ ) ),
1907
- array( 'val' => 'start', 'desc' => __( 'Start of Info Line', 'weaver-xtreme' /*adm*/ ) ),
1908
- array( 'val' => 'end', 'desc' => __( 'End of Info Line', 'weaver-xtreme' /*adm*/ ) ),
1909
- ),
1910
- ),
1911
-
1912
- array(
1913
- 'name' => '<small>' . __( 'Avatar size', 'weaver-xtreme' /*adm*/ ) . '</small>',
1914
- 'id' => 'post_avatar_int',
1915
- 'type' => 'val_px',
1916
- 'info' => __( 'Size of Avatar in px. (Default: 28px)', 'weaver-xtreme' /*adm*/ ),
1917
- ),
1918
-
1919
- array(
1920
- 'name' => __( 'Use Icons in Post Info', 'weaver-xtreme' /*adm*/ ),
1921
- 'id' => 'post_icons',
1922
- 'type' => 'select_id',
1923
- 'info' => __( 'Use Icons instead of Text descriptions in Post Meta Info', 'weaver-xtreme' /*adm*/ ),
1924
- 'value' => array(
1925
- array( 'val' => 'text', 'desc' => __( 'Text Descriptions', 'weaver-xtreme' /*adm*/ ) ),
1926
- array( 'val' => 'fonticons', 'desc' => __( 'Font Icons', 'weaver-xtreme' /*adm*/ ) ),
1927
- array( 'val' => 'graphics', 'desc' => __( 'Graphic Icons', 'weaver-xtreme' /*adm*/ ) ),
1928
- ),
1929
- ),
1930
- array(
1931
- 'name' => '<small>' . __( 'Font Icons Color', 'weaver-xtreme' /*adm*/ ) . '</small>',
1932
- 'id' => 'post_icons_color',
1933
- 'type' => 'color',
1934
- 'info' => __( 'Color for Font Icons (Default: Post Info text color)', 'weaver-xtreme' /*adm*/ ),
1935
- ),
1936
-
1937
-
1938
- array(
1939
- 'name' => '<span style="color:red">' . __( 'Note:', 'weaver-xtreme' /*adm*/ ) . '</span>',
1940
- 'type' => 'note',
1941
- 'info' => __( 'Hiding any meta info item automatically uses Icons instead of text descriptions.', 'weaver-xtreme' /*adm*/ ),
1942
- ),
1943
- array(
1944
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Post Date', 'weaver-xtreme' /*adm*/ ) . '</small>',
1945
- 'id' => 'post_hide_date',
1946
- 'type' => 'checkbox',
1947
- 'info' => __( 'Hide the post date everywhere it is normally displayed.', 'weaver-xtreme' /*adm*/ ),
1948
- ),
1949
- array(
1950
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Post Author', 'weaver-xtreme' /*adm*/ ) . '</small>',
1951
- 'id' => 'post_hide_author',
1952
- 'type' => 'checkbox',
1953
- 'info' => __( 'Hide the post author everywhere it is normally displayed.', 'weaver-xtreme' /*adm*/ ),
1954
- ),
1955
- array(
1956
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Post Categories', 'weaver-xtreme' /*adm*/ ) . '</small>',
1957
- 'id' => 'post_hide_categories',
1958
- 'type' => 'checkbox',
1959
- 'info' => __( 'Hide the post categories wherever they are normally displayed.', 'weaver-xtreme' /*adm*/ ),
1960
- ),
1961
- array(
1962
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Post Tags', 'weaver-xtreme' /*adm*/ ) . '</small>',
1963
- 'id' => 'post_hide_tags',
1964
- 'type' => 'checkbox',
1965
- 'info' => __( 'Hide the post tags wherever they are normally displayed.', 'weaver-xtreme' /*adm*/ ),
1966
- ),
1967
- array(
1968
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Permalink', 'weaver-xtreme' /*adm*/ ) . '</small>',
1969
- 'id' => 'hide_permalink',
1970
- 'type' => 'checkbox',
1971
- 'info' => __( 'Hide the permalink.', 'weaver-xtreme' /*adm*/ ),
1972
- ),
1973
- array(
1974
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Category if Only One', 'weaver-xtreme' /*adm*/ ) . '</small>',
1975
- 'id' => 'hide_singleton_category',
1976
- 'type' => 'checkbox',
1977
- 'info' => __( 'If there is only one overall category defined (Uncategorized), don\'t show Category of post.', 'weaver-xtreme' /*adm*/ ),
1978
- ),
1979
- array(
1980
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Author for Single Author Site', 'weaver-xtreme' /*adm*/ ) . '</small>',
1981
- 'id' => 'post_hide_single_author',
1982
- 'type' => 'checkbox',
1983
- 'info' => __( 'Hide author information if site has only a single author.', 'weaver-xtreme' /*adm*/ ),
1984
- ),
1985
-
1986
- array(
1987
- 'name' => __( 'Post Info Links', 'weaver-xtreme' /*adm*/ ),
1988
- 'id' => 'ilink',
1989
- 'type' => 'link',
1990
- 'info' => __( 'Links in post information top and bottom lines.', 'weaver-xtreme' /*adm*/ ),
1991
- ),
1992
-
1993
- array( 'type' => 'submit' ),
1994
-
1995
-
1996
- array(
1997
- 'name' => __( 'Featured Image - Posts', 'weaver-xtreme' /*adm*/ ),
1998
- 'id' => '-id',
1999
- 'type' => 'subheader_alt',
2000
- 'info' => __( 'Display of Post Featured Images', 'weaver-xtreme' /*adm*/ ),
2001
- ),
2002
-
2003
- array(
2004
- 'name' => __( 'Full Width FI BG Image:', 'weaver-xtreme' /*adm*/ ),
2005
- 'type' => 'note',
2006
- 'info' => __( 'To create full width Post BG images from the FI, check the <em>Post Area Extend BG Attributes</em> box at <em>Full Width</em> tab.', 'weaver-xtreme' /*adm*/ ),
2007
- ),
2008
-
2009
- array(
2010
- 'name' => '<small>' . __( "Don't add link to FI", 'weaver-xtreme' /*adm*/ ) . '</small>',
2011
- 'id' => 'post_fi_nolink',
2012
- 'type' => '+checkbox',
2013
- 'info' => __( 'Do not add link to Featured Image for any post layout. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2014
- ),
2015
-
2016
- array(
2017
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#10538;</span>' . __( 'FI Location - Full Post', 'weaver-xtreme' /*adm*/ ),
2018
- 'id' => 'post_full_fi_location',
2019
- 'type' => 'fi_location_post',
2020
- 'info' => __( 'Where to display Featured Image for full blog posts.', 'weaver-xtreme' /*adm*/ ),
2021
- ),
2022
-
2023
- array(
2024
- 'name' => '<small>' . __( 'Post Height - Blog View', 'weaver-xtreme' /*adm*/ ) . '</small>',
2025
- 'id' => 'post_blog_min_height',
2026
- 'type' => '+val_px',
2027
- 'info' => __( 'Minimum Height of Post, full or excerpt, with Parallax BG in blog views. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2028
- ),
2029
-
2030
- array(
2031
- 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'FI Alignment - Full post', 'weaver-xtreme' /*adm*/ ) . '</small>',
2032
- 'id' => 'post_full_fi_align',
2033
- 'type' => 'fi_align',
2034
- 'info' => __( 'Featured Image alignment', 'weaver-xtreme' /*adm*/ ),
2035
- ),
2036
-
2037
-
2038
- array(
2039
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide FI - Full Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2040
- 'id' => 'post_full_fi_hide',
2041
- 'type' => 'select_hide',
2042
- 'info' => __( 'Hide Featured Images on full blog posts.', 'weaver-xtreme' /*adm*/ ),
2043
- ),
2044
- array(
2045
- 'name' => '<small>' . __( 'FI Size - Full Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2046
- 'id' => 'post_full_fi_size',
2047
- 'type' => 'select_id',
2048
- 'info' => __( 'Media Library Image Size for Featured Image on full posts.', 'weaver-xtreme' /*adm*/ ),
2049
- 'value' => array(
2050
- array( 'val' => 'thumbnail', 'desc' => __( 'Thumbnail', 'weaver-xtreme' /*adm*/ ) ),
2051
- array( 'val' => 'medium', 'desc' => __( 'Medium', 'weaver-xtreme' /*adm*/ ) ),
2052
- array( 'val' => 'large', 'desc' => __( 'Large', 'weaver-xtreme' /*adm*/ ) ),
2053
- array( 'val' => 'full', 'desc' => __( 'Full', 'weaver-xtreme' /*adm*/ ) ),
2054
- ),
2055
- ),
2056
- array(
2057
- 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'FI Width, Full Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2058
- 'id' => 'post_full_fi_width',
2059
- 'type' => '+val_percent',
2060
- 'info' => __( 'Width of Featured Image on Full Posts. Max Width in %, overrides FI Size selection. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2061
- ),
2062
-
2063
-
2064
- array(
2065
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#10538;</span>' . __( 'FI Location - Excerpts', 'weaver-xtreme' /*adm*/ ),
2066
- 'id' => 'post_excerpt_fi_location',
2067
- 'type' => 'fi_location_post',
2068
- 'info' => __( 'Where to display Featured Image for posts displayed as excerpt.', 'weaver-xtreme' /*adm*/ ),
2069
- ),
2070
-
2071
- array(
2072
- 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'FI Alignment - Excerpts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2073
- 'id' => 'post_excerpt_fi_align',
2074
- 'type' => 'fi_align',
2075
- 'info' => __( 'How to align the Featured Image', 'weaver-xtreme' /*adm*/ ),
2076
- ),
2077
-
2078
- array(
2079
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide FI - Excerpts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2080
- 'id' => 'post_excerpt_fi_hide',
2081
- 'type' => 'select_hide',
2082
- 'info' => __( 'Where to hide Featured Images on full blog posts.', 'weaver-xtreme' /*adm*/ ),
2083
- ),
2084
- array(
2085
- 'name' => '<small>FI Size - Excerpts</small>',
2086
- 'id' => 'post_excerpt_fi_size',
2087
- 'type' => 'select_id',
2088
- 'info' => __( 'Media Library Image Size for Featured Image on excerpts.', 'weaver-xtreme' /*adm*/ ),
2089
- 'value' => array(
2090
- array( 'val' => 'thumbnail', 'desc' => __( 'Thumbnail', 'weaver-xtreme' /*adm*/ ) ),
2091
- array( 'val' => 'medium', 'desc' => __( 'Medium', 'weaver-xtreme' /*adm*/ ) ),
2092
- array( 'val' => 'large', 'desc' => __( 'Large', 'weaver-xtreme' /*adm*/ ) ),
2093
- array( 'val' => 'full', 'desc' => __( 'Full', 'weaver-xtreme' /*adm*/ ) ),
2094
- ),
2095
- ),
2096
- array(
2097
- 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'FI Width, Excerpts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2098
- 'id' => 'post_excerpt_fi_width',
2099
- 'type' => '+val_percent',
2100
- 'info' => __( 'Width of Featured Image on excerpts. Max Width in %, overrides FI Size selection. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2101
- ),
2102
-
2103
-
2104
- array(
2105
- 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#10538;</span>' . __( 'FI Location - Single Page', 'weaver-xtreme' /*adm*/ ),
2106
- 'id' => 'post_fi_location',
2107
- 'type' => 'fi_location',
2108
- 'info' => __( 'Where to display Featured Image for posts on single page view.', 'weaver-xtreme' /*adm*/ ),
2109
- ),
2110
-
2111
- array(
2112
- 'name' => '<small>' . __( 'Post Height - Single Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
2113
- 'id' => 'post_min_height',
2114
- 'type' => '+val_px',
2115
- 'info' => __( 'Minimum Height of Post with Parallax BG in Single Page view. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2116
- ),
2117
- array(
2118
- 'name' => __( 'Parallax FI BG Image:', 'weaver-xtreme' /*adm*/ ),
2119
- 'info' => __( 'It will usually be more useful to use the Per Post FI option to specify Parallax BG images.', 'weaver-xtreme' /*adm*/ ),
2120
- 'type' => 'note',
2121
- ),
2122
-
2123
- array(
2124
- 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'FI Alignment - Single Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
2125
- 'id' => 'post_fi_align',
2126
- 'type' => 'fi_align',
2127
- 'info' => __( 'How to align the Featured Image on Single Page View.', 'weaver-xtreme' /*adm*/ ),
2128
- ),
2129
-
2130
- array(
2131
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide FI - Single Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
2132
- 'id' => 'post_fi_hide',
2133
- 'type' => 'select_hide',
2134
- 'info' => __( 'Where to hide Featured Images on single page view.', 'weaver-xtreme' /*adm*/ ),
2135
- ),
2136
- array(
2137
- 'name' => '<small>' . __( 'FI Size - Single Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2138
- 'id' => 'post_fi_size',
2139
- 'type' => 'select_id',
2140
- 'info' => __( 'Media Library Image Size for Featured Image on single page view.', 'weaver-xtreme' /*adm*/ ),
2141
- 'value' => array(
2142
- array( 'val' => 'thumbnail', 'desc' => __( 'Thumbnail', 'weaver-xtreme' /*adm*/ ) ),
2143
- array( 'val' => 'medium', 'desc' => __( 'Medium', 'weaver-xtreme' /*adm*/ ) ),
2144
- array( 'val' => 'large', 'desc' => __( 'Large', 'weaver-xtreme' /*adm*/ ) ),
2145
- array( 'val' => 'full', 'desc' => __( 'Full', 'weaver-xtreme' /*adm*/ ) ),
2146
- ),
2147
- ),
2148
- array(
2149
- 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'FI Width, Single Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
2150
- 'id' => 'post_fi_width',
2151
- 'type' => '+val_percent',
2152
- 'info' => __( 'Width of Featured Image on single page view. Max Width in %, overrides FI Size selection. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2153
- ),
2154
-
2155
-
2156
- array( 'type' => 'submit' ),
2157
-
2158
-
2159
- array(
2160
- 'name' => __( 'More Post Related Options', 'weaver-xtreme' /*adm*/ ),
2161
- 'id' => '-forms',
2162
- 'type' => 'subheader_alt',
2163
- 'info' => __( 'Other options related to post display, including single pages.', 'weaver-xtreme' /*adm*/ ),
2164
- ),
2165
- array(
2166
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Show <em>Comments are closed.</em>', 'weaver-xtreme' /*adm*/ ) . '</small>',
2167
- 'id' => 'show_comments_closed',
2168
- 'type' => 'checkbox',
2169
- 'info' => __( 'If comments are off, and no comments have been made, show the <em>Comments are closed.</em> message.', 'weaver-xtreme' /*adm*/ ),
2170
- ),
2171
- array(
2172
- 'name' => __( 'Author Info BG', 'weaver-xtreme' /*adm*/ ),
2173
- 'id' => 'post_author_bgcolor',
2174
- 'type' => 'ctext',
2175
- 'info' => __( 'Background color used for Author Bio.', 'weaver-xtreme' /*adm*/ ),
2176
- ),
2177
- array(
2178
- 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Author Bio', 'weaver-xtreme' /*adm*/ ) . '</small>',
2179
- 'id' => 'hide_author_bio',
2180
- 'type' => 'checkbox',
2181
- 'info' => __( 'Hide display of author bio box on Author Archive and Single Post page views.', 'weaver-xtreme' /*adm*/ ),
2182
- ),
2183
- array(
2184
- 'name' => '<small>' . __( 'Allow comments for attachments', 'weaver-xtreme' /*adm*/ ) . '</small>',
2185
- 'id' => 'allow_attachment_comments',
2186
- 'type' => 'checkbox',
2187
- 'info' => __( 'Allow visitors to leave comments for attachments (usually full size media image - only if comments allowed).', 'weaver-xtreme' /*adm*/ ),
2188
- ),
2189
- );
2190
-
2191
- ?>
2192
- <div class="options-intro">
2193
- <?php _e( '<strong>Post Specifics: </strong>
2194
- Options related to <strong>Posts</strong>, including <strong>Background</strong> color, <strong>Columns</strong> displayed
2195
- on blog pages, <strong>Title</strong> options, <strong>Navigation</strong> to earlier and later posts, the post
2196
- <strong>Info Lines</strong>, <strong>Excerpts</strong>, and <strong>Featured Image</strong> handling.', 'weaver-xtreme' /*adm*/ ); ?>
2197
- <br/>
2198
- <div class="options-intro-menu">
2199
- <a href="#post-area"><?php _e( 'Post Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2200
- <a href="#post-title"><?php _e( 'Post Title', 'weaver-xtreme' /*adm*/ ); ?></a> |
2201
- <a href="#post-layout"><?php _e( 'Post Layout', 'weaver-xtreme' /*adm*/ ); ?></a> |
2202
- <a href="#excerpts-full-posts"><?php _e( 'Excerpts / Full Posts', 'weaver-xtreme' /*adm*/ ); ?></a> |
2203
- <a href="#post-navigation"><?php _e( 'Post Navigation', 'weaver-xtreme' /*adm*/ ); ?></a> |
2204
- <a href="#post-meta-info-areas"><?php _e( 'Post Meta Info Areas', 'weaver-xtreme' /*adm*/ ); ?></a> |
2205
- <a href="#featured-image-posts"><?php _e( 'Featured Image - Posts', 'weaver-xtreme' /*adm*/ ); ?></a> |
2206
- <a href="#more-post-related-options"><?php _e( 'More Post Related Options', 'weaver-xtreme' /*adm*/ ); ?></a> |
2207
- <a href="#custom-post-info-lines"><?php _e( 'Custom Post Info Lines', 'weaver-xtreme' /*adm*/ ); ?></a>
2208
- </div>
2209
- </div>
2210
- <?php
2211
- weaverx_form_show_options( $opts );
2212
- do_action( 'weaverxplus_admin', 'post_specifics' );
2213
- ?>
2214
- <span style="color:green;"><b><?php _e( 'Hiding/Enabling Page and Post Comments', 'weaver-xtreme' /*adm*/ ); ?></b></span>
2215
- <?php
2216
- weaverx_help_link( 'help.html#LeavingComments', __( 'Help for Leaving Comments', 'weaver-xtreme' /*adm*/ ) );
2217
- ?>
2218
- <p>
2219
- <?php _e( 'Controlling "Reply/Leave a Comment" visibility for pages and posts is <strong>not</strong> a theme function.
2220
- It is controlled by WordPress settings.
2221
- Please click the ? just above to see the help file entry!
2222
- (Additional options for comment <em>styling</em> are found on the Content Areas tab.)', 'weaver-xtreme' /*adm*/ ); ?>
2223
- </p>
2224
- <?php
2225
- }
2226
-
2227
-
2228
- // ======================== Main Options > Footer ========================
2229
- function weaverx_mainopts_footer() {
2230
- $opts = array(
2231
- array( 'type' => 'submit' ),
2232
-
2233
- array(
2234
- 'name' => __( 'Footer Options', 'weaver-xtreme' /*adm*/ ),
2235
- 'id' => '-admin-generic',
2236
- 'type' => 'header',
2237
- 'info' => __( 'Settings for the footer', 'weaver-xtreme' /*adm*/ ),
2238
- 'help' => 'help.html#FooterOpt',
2239
- ),
2240
-
2241
-
2242
- array(
2243
- 'name' => __( 'Footer Area', 'weaver-xtreme' /*adm*/ ),
2244
- 'id' => 'footer',
2245
- 'type' => 'widget_area',
2246
- 'info' => __( 'Properties for the footer area.', 'weaver-xtreme' /*adm*/ ),
2247
- ),
2248
- array(
2249
- 'name' => __( 'Footer Links', 'weaver-xtreme' /*adm*/ ),
2250
- 'id' => 'footerlink',
2251
- 'type' => 'link',
2252
- 'info' => __( 'Color for links in Footer (Uses Standard Link colors if left blank).', 'weaver-xtreme' /*adm*/ ),
2253
- ),
2254
- array( 'type' => 'submit' ),
2255
-
2256
- array(
2257
- 'name' => __( 'Footer Widget Area', 'weaver-xtreme' /*adm*/ ),
2258
- 'id' => 'footer_sb',
2259
- 'type' => 'widget_area_submit',
2260
- 'info' => __( 'Properties for the Footer Widget Area.', 'weaver-xtreme' /*adm*/ ),
2261
- ),
2262
-
2263
- array(
2264
- 'name' => __( 'Footer HTML', 'weaver-xtreme' /*adm*/ ),
2265
- 'id' => 'footer_html',
2266
- 'type' => 'widget_area',
2267
- 'info' => __( 'Add arbitrary HTML to Footer Area (in &lt;div id=\"footer-html\"&gt;)', 'weaver-xtreme' /*adm*/ ),
2268
- ),
2269
-
2270
- array(
2271
- 'name' => '<span class="i-left dashicons dashicons-editor-code"></span>' . __( 'Footer HTML content', 'weaver-xtreme' /*adm*/ ),
2272
- 'id' => 'footer_html_text',
2273
- 'type' => 'textarea',
2274
- 'placeholder' => __( 'Any HTML, including shortcodes.', 'weaver-xtreme' /*adm*/ ),
2275
- 'info' => __( "Add arbitrary HTML", 'weaver-xtreme' /*adm*/ ),
2276
- 'val' => 4,
2277
- ),
2278
- array( 'type' => 'submit' ),
2279
- );
2280
-
2281
- ?>
2282
- <div class="options-intro">
2283
- <?php _e( '<strong>Footer: </strong> Options affecting the <strong>Footer</strong> area, including <strong>Background</strong>
2284
- color, <strong>Borders</strong>, and the <strong>Copyright</strong> message.', 'weaver-xtreme' /*adm*/ ); ?>
2285
- <br/>
2286
- <div class="options-intro-menu">
2287
- <a href="#footer-area"><?php _e( 'Footer Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2288
- <a href="#footer-widget-area"><?php _e( 'Footer Widget Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2289
- <a href="#footer-html"><?php _e( 'Footer HTML', 'weaver-xtreme' /*adm*/ ); ?></a> |
2290
- <a href="#site-copyright"><?php _e( 'Site Copyright', 'weaver-xtreme' /*adm*/ ); ?></a>
2291
- </div>
2292
- </div>
2293
- <?php
2294
- weaverx_form_show_options( $opts );
2295
- do_action( 'weaverxplus_admin', 'footer_opts' );
2296
- ?>
2297
- <a id="site-copyright"></a>
2298
- <strong>&copy;</strong>&nbsp;<span style="color:blue;"><b><?php _e( 'Site Copyright', 'weaver-xtreme' /*adm*/ ); ?></b></span>
2299
- <br/>
2300
- <small>
2301
- <?php _e( 'If you fill this in, the default copyright notice in the footer will be replaced with the text here.
2302
- It will not automatically update from year to year.
2303
- Use &amp;copy; to display &copy;.
2304
- You can use other HTML as well.
2305
- Use <span class="style4">&amp;nbsp;</span> to hide the copyright notice. &diams;', 'weaver-xtreme' /*adm*/ ); ?>
2306
- </small>
2307
- <br/>
2308
-
2309
- <span class="dashicons dashicons-editor-code"></span>
2310
- <?php weaverx_textarea( weaverx_getopt( 'copyright' ), 'copyright', 1, ' ', 'width:85%;' ); ?>
2311
- <br>
2312
- <label><span class="dashicons dashicons-visibility"></span> <?php _e( 'Hide Powered By tag:', 'weaver-xtreme' /*adm*/ ); ?>
2313
- <input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_poweredby' ); ?>" id="_hide_poweredby" <?php checked( weaverx_getopt_checked( '_hide_poweredby' ) ); ?> />
2314
- </label>
2315
- <small><?php _e( 'Check this to hide the "Proudly powered by" notice in the footer.', 'weaver-xtreme' /*adm*/ ); ?></small>
2316
- <br/><br/>
2317
- <?php _e( 'You can add other content to the Footer from the Advanced Options:HTML Insertion tab.', 'weaver-xtreme' /*adm*/ ); ?>
2318
- <?php
2319
- }
2320
-
2321
- // ======================== Main Options > Widget Areas ========================
2322
- function weaverx_mainopts_widgets() {
2323
- $opts = array(
2324
- array( 'type' => 'submit' ),
2325
- array(
2326
- 'name' => __( 'Sidebar Options', 'weaver-xtreme' /*adm*/ ),
2327
- 'id' => '-screenoptions',
2328
- 'type' => 'header',
2329
- 'info' => __( 'Settings affecting main Sidebars and individual widgets', 'weaver-xtreme' /*adm*/ ),
2330
- 'help' => 'help.html#WidgetAreas',
2331
- ),
2332
-
2333
- array(
2334
- 'name' => __( 'Individual Widgets', 'weaver-xtreme' /*adm*/ ),
2335
- 'id' => 'widget',
2336
- 'type' => 'widget_area',
2337
- 'info' => __( 'Properties for individual widgets (e.g., Text, Recent Posts, etc.)', 'weaver-xtreme' /*adm*/ ),
2338
- ),
2339
-
2340
- array(
2341
- 'name' => __( 'Widget Title', 'weaver-xtreme' /*adm*/ ),
2342
- 'id' => 'widget_title',
2343
- 'type' => 'titles',
2344
- 'info' => __( 'Color for Widget Titles.', 'weaver-xtreme' /*adm*/ ),
2345
- ),
2346
- array(
2347
- 'name' => __( 'Bar under Widget Titles', 'weaver-xtreme' /*adm*/ ),
2348
- 'id' => 'widget_title_underline_int',
2349
- 'type' => 'val_px',
2350
- 'info' => __( 'Enter size in px if you want a bar under Widget Titles. Leave blank or 0 for no bar.', 'weaver-xtreme' /*adm*/ ),
2351
- ),
2352
-
2353
- array(
2354
- 'name' => __( 'Widget List Bullet', 'weaver-xtreme' /*adm*/ ),
2355
- 'id' => 'widgetlist_bullet',
2356
- 'type' => 'select_id',
2357
- 'info' => __( 'Bullet used for Unordered Lists in Widget areas.', 'weaver-xtreme' /*adm*/ ),
2358
- 'value' => array(
2359
- array( 'val' => 'disc', 'desc' => __( 'Filled Disc (default)', 'weaver-xtreme' /*adm*/ ) ),
2360
- array( 'val' => 'circle', 'desc' => __( 'Circle', 'weaver-xtreme' /*adm*/ ) ),
2361
- array( 'val' => 'square', 'desc' => __( 'Square', 'weaver-xtreme' /*adm*/ ) ),
2362
- array( 'val' => 'none', 'desc' => __( 'None', 'weaver-xtreme' /*adm*/ ) ),
2363
- ),
2364
- ),
2365
-
2366
- array(
2367
- 'name' => __( 'Widget Links', 'weaver-xtreme' /*adm*/ ),
2368
- 'id' => 'wlink',
2369
- 'type' => 'link',
2370
- 'info' => __( 'Color for links in widgets (uses Standard Link colors if left blank).', 'weaver-xtreme' /*adm*/ ),
2371
- ),
2372
-
2373
- array( 'type' => 'submit' ),
2374
-
2375
-
2376
- array(
2377
- 'name' => __( 'Primary Widget Area', 'weaver-xtreme' /*adm*/ ),
2378
- 'id' => 'primary',
2379
- 'type' => 'widget_area_submit',
2380
- 'info' => __( 'Properties for the Primary (Upper/Left) Sidebar Widget Area.', 'weaver-xtreme' /*adm*/ ),
2381
- ),
2382
-
2383
- array(
2384
- 'name' => __( 'Secondary Widget Area', 'weaver-xtreme' /*adm*/ ),
2385
- 'id' => 'secondary',
2386
- 'type' => 'widget_area_submit',
2387
- 'info' => __( 'Properties for the Secondary (Lower/Right) Sidebar Widget Area.', 'weaver-xtreme' /*adm*/ ),
2388
- ),
2389
-
2390
- array(
2391
- 'name' => __( 'Top Widget Areas', 'weaver-xtreme' /*adm*/ ),
2392
- 'id' => 'top',
2393
- 'type' => 'widget_area_submit',
2394
- 'info' => __( 'Properties for all Top Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme' /*adm*/ ),
2395
- ),
2396
-
2397
-
2398
- array(
2399
- 'name' => __( 'Bottom Widget Areas', 'weaver-xtreme' /*adm*/ ),
2400
- 'id' => 'bottom',
2401
- 'type' => 'widget_area',
2402
- 'info' => __( 'Properties for all Bottom Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme' /*adm*/ ),
2403
- ),
2404
-
2405
- );
2406
-
2407
- weaverx_form_show_options( $opts );
2408
- ?>
2409
- <hr/>
2410
- <span style="color:blue;"><b>Define Per Page Extra Widget Areas</b></span>
2411
- <?php
2412
- weaverx_help_link( 'help.html#PPWidgets', 'Help for Per Page Widget Areas' );
2413
- ?>
2414
- <br/>
2415
- <small>
2416
- <?php _e( 'You may define extra widget areas that can then be used in the <em>Per Page</em> settings, or in the <em>Weaver Xtreme Plus</em> [widget_area] shortcode.
2417
- Enter a list of one or more widget area names separated by commas.
2418
- Your names should include only letters, numbers, or underscores - no spaces or other special characters.
2419
- The widgets areas will then appear on the Appearance->Widgets menus.
2420
- They can be included on individual pages by adding the name you define here to the "Weaver Xtreme Options For This Page" box on the Edit Page screen. (&diams;)', 'weaver-xtreme' /*adm*/ ); ?>
2421
- </small>
2422
- <br/>
2423
- <?php weaverx_textarea( weaverx_getopt( '_perpagewidgets' ), '_perpagewidgets', 1, ' ', $style = 'width:60%;', $class = 'wvrx-edit' ); ?>
2424
- <?php
2425
- do_action( 'weaverxplus_admin', 'widget_areas' );
2426
- }
2427
-
2428
- // ======================== Main Options > Layout ========================
2429
- function weaverx_mainopts_layout() {
2430
- $opts = array(
2431
- array( 'type' => 'submit' ),
2432
- array(
2433
- 'name' => __( 'Sidebar Layout', 'weaver-xtreme' /*adm*/ ),
2434
- 'id' => '-welcome-widgets-menus',
2435
- 'type' => 'header',
2436
- 'info' => __( 'Sidebar Layout for each type of page ("stack top" used for mobile view)', 'weaver-xtreme' /*adm*/ ),
2437
- 'help' => 'help.html#layout',
2438
- ),
2439
-
2440
- array(
2441
- 'name' => __( 'Blog, Post, Page Default', 'weaver-xtreme' /*adm*/ ),
2442
- 'id' => 'layout_default',
2443
- 'type' => 'select_id',
2444
- 'info' => __( 'Select the default theme layout for blog, single post, attachments, and pages.', 'weaver-xtreme' /*adm*/ ),
2445
- 'value' => array(
2446
- array( 'val' => 'right', 'desc' => __( 'Sidebars on Right', 'weaver-xtreme' /*adm*/ ) ),
2447
- array( 'val' => 'right-top', 'desc' => __( 'Sidebars on Right (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2448
- array( 'val' => 'left', 'desc' => __( ' Sidebars on Left', 'weaver-xtreme' /*adm*/ ) ),
2449
- array( 'val' => 'left-top', 'desc' => __( ' Sidebars on Left (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2450
- array( 'val' => 'split', 'desc' => __( 'Split - Sidebars on Right and Left', 'weaver-xtreme' /*adm*/ ) ),
2451
- array( 'val' => 'split-top', 'desc' => __( 'Split (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2452
- array( 'val' => 'one-column', 'desc' => __( 'No sidebars, content only', 'weaver-xtreme' /*adm*/ ) ),
2453
- ),
2454
- ),
2455
-
2456
- array(
2457
- 'name' => __( 'Archive-like Default', 'weaver-xtreme' /*adm*/ ),
2458
- 'id' => 'layout_default_archive',
2459
- 'type' => 'select_id',
2460
- 'info' => __( 'Select the default theme layout for all other pages - archives, search, etc.', 'weaver-xtreme' /*adm*/ ),
2461
- 'value' => array(
2462
- array( 'val' => 'right', 'desc' => __( 'Sidebars on Right', 'weaver-xtreme' /*adm*/ ) ),
2463
- array( 'val' => 'right-top', 'desc' => __( 'Sidebars on Right (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2464
- array( 'val' => 'left', 'desc' => __( ' Sidebars on Left', 'weaver-xtreme' /*adm*/ ) ),
2465
- array( 'val' => 'left-top', 'desc' => __( ' Sidebars on Left (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2466
- array( 'val' => 'split', 'desc' => __( 'Split - Sidebars on Right and Left', 'weaver-xtreme' /*adm*/ ) ),
2467
- array( 'val' => 'split-top', 'desc' => __( 'Split (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2468
- array( 'val' => 'one-column', 'desc' => __( 'No sidebars, content only', 'weaver-xtreme' /*adm*/ ) ),
2469
- ),
2470
- ),
2471
-
2472
- array(
2473
- 'name' => __( 'Page', 'weaver-xtreme' /*adm*/ ),
2474
- 'id' => 'layout_page',
2475
- 'type' => 'select_layout',
2476
- 'info' => __( 'Layout for normal Pages on your site.', 'weaver-xtreme' /*adm*/ ),
2477
- 'value' => '',
2478
- ),
2479
- array(
2480
- 'name' => __( 'Blog', 'weaver-xtreme' /*adm*/ ),
2481
- 'id' => 'layout_blog',
2482
- 'type' => 'select_layout',
2483
- 'info' => __( 'Layout for main blog page. Includes "Page with Posts" Page templates.', 'weaver-xtreme' /*adm*/ ),
2484
- 'value' => '',
2485
- ),
2486
- array(
2487
- 'name' => __( 'Post Single Page', 'weaver-xtreme' /*adm*/ ),
2488
- 'id' => 'layout_single',
2489
- 'type' => 'select_layout',
2490
- 'info' => __( 'Layout for Posts displayed as a single page.', 'weaver-xtreme' /*adm*/ ),
2491
- 'value' => '',
2492
- ),
2493
-
2494
- array(
2495
- 'name' => __( 'Attachments', 'weaver-xtreme' /*adm*/ ),
2496
- 'id' => 'layout_image',
2497
- 'type' => '+select_layout',
2498
- 'info' => __( 'Layout for attachment pages such as images. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2499
- 'value' => '',
2500
- ),
2501
-
2502
- array(
2503
- 'name' => __( 'Date Archive', 'weaver-xtreme' /*adm*/ ),
2504
- 'id' => 'layout_archive',
2505
- 'type' => '+select_layout',
2506
- 'info' => __( 'Layout for archive by date pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2507
- 'value' => '',
2508
- ),
2509
-
2510
- array(
2511
- 'name' => __( 'Category Archive', 'weaver-xtreme' /*adm*/ ),
2512
- 'id' => 'layout_category',
2513
- 'type' => '+select_layout',
2514
- 'info' => __( 'Layout for category archive pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2515
- 'value' => '',
2516
- ),
2517
- array(
2518
- 'name' => __( 'Tags Archive', 'weaver-xtreme' /*adm*/ ),
2519
- 'id' => 'layout_tag',
2520
- 'type' => '+select_layout',
2521
- 'info' => __( 'Layout for tag archive pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2522
- 'value' => '',
2523
- ),
2524
-
2525
- array(
2526
- 'name' => __( 'Author Archive</small>', 'weaver-xtreme' /*adm*/ ),
2527
- 'id' => 'layout_author',
2528
- 'type' => '+select_layout',
2529
- 'info' => __( 'Layout for author archive pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2530
- 'value' => '',
2531
- ),
2532
- array(
2533
- 'name' => __( 'Search Results, 404</small>', 'weaver-xtreme' /*adm*/ ),
2534
- 'id' => 'layout_search',
2535
- 'type' => '+select_layout',
2536
- 'info' => __( 'Layout for search results and 404 pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2537
- 'value' => '',
2538
- ),
2539
-
2540
- array(
2541
- 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Left Sidebar Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
2542
- 'id' => 'left_sb_width_int',
2543
- 'type' => 'val_percent',
2544
- 'info' => __( 'Width for Left Sidebar (Default: 25%)', 'weaver-xtreme' /*adm*/ ),
2545
- 'value' => '',
2546
- ),
2547
- array(
2548
- 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Right Sidebar Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
2549
- 'id' => 'right_sb_width_int',
2550
- 'type' => 'val_percent',
2551
- 'info' => __( 'Width for Right Sidebar (Default: 25%)', 'weaver-xtreme' /*adm*/ ),
2552
- 'value' => '',
2553
- ),
2554
- array(
2555
- 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Split Left Sidebar Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
2556
- 'id' => 'left_split_sb_width_int',
2557
- 'type' => 'val_percent',
2558
- 'info' => __( 'Width for Split Sidebar, Left Side (Default: 25%)', 'weaver-xtreme' /*adm*/ ),
2559
- 'value' => '',
2560
- ),
2561
- array(
2562
- 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Split Right Sidebar Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
2563
- 'id' => 'right_split_sb_width_int',
2564
- 'type' => 'val_percent',
2565
- 'info' => __( 'Width for Split Sidebar, Right Side (Default: 25%)', 'weaver-xtreme' /*adm*/ ),
2566
- 'value' => '',
2567
- ),
2568
- array(
2569
- 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span> ' . __( 'Content Width:', 'weaver-xtreme' /*adm*/ ),
2570
- 'type' => 'note',
2571
- 'info' => __( 'The width of content area automatically determined by sidebar layout and width', 'weaver-xtreme' /*adm*/ ),
2572
- ),
2573
-
2574
- array(
2575
- 'name' => __( 'Flow color to bottom', 'weaver-xtreme' /*adm*/ ),
2576
- 'id' => 'flow_color',
2577
- 'type' => '+checkbox',
2578
- 'info' => __( 'If checked, Content and Sidebar bg colors will flow to bottom of the Container (that is, equal heights). You must provide background colors for the Content and Sidebars or the default bg color will be used. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2579
- ),
2580
-
2581
- array(
2582
- 'name' => __( 'Alt Page Themes', 'weaver-xtreme' /*adm*/ ),
2583
- 'id' => '-editor-codex',
2584
- 'type' => 'header_area',
2585
- 'info' => __( '&starf; Weaver Xtreme Plus (V 3.1.1 or later) allows you to set Alternative Themes for the blog, single, and other archive-like pages.', 'weaver-xtreme' /*adm*/ ),
2586
- ),
2587
-
2588
-
2589
- );
2590
- ?>
2591
- <div class="options-intro">
2592
- <strong>Sidebars &amp; Layout: </strong>
2593
- <?php _e( 'Options affecting <strong>Sidebar Layout</strong> and the main <strong>Sidebar Areas</strong>.
2594
- This includes properties of individual <strong>Widgets</strong>, as well as properties of various <strong>Sidebars</strong>.', 'weaver-xtreme' /*adm*/ ); ?>
2595
- <br/>
2596
- <div class="options-intro-menu">
2597
- <a href="#sidebar-layout"><?php _e( 'Sidebar Layout', 'weaver-xtreme' /*adm*/ ); ?></a> |
2598
- <a href="#individual-widgets"><?php _e( 'Individual Widgets', 'weaver-xtreme' /*adm*/ ); ?></a> |
2599
- <a href="#primary-widget-area"><?php _e( 'Primary Widget Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2600
- <a href="#secondary-widget-area"><?php _e( 'Secondary Widget Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2601
- <a href="#top-widget-areas"><?php _e( 'Top Widget Areas', 'weaver-xtreme' /*adm*/ ); ?></a> |
2602
- <a href="#bottom-widget-areas"><?php _e( 'Bottom Widget Areas', 'weaver-xtreme' /*adm*/ ); ?></a>
2603
- </div>
2604
- </div>
2605
- <?php
2606
-
2607
- weaverx_form_show_options( $opts );
2608
- do_action( 'weaverxplus_admin', 'layout' ); // add new layout option?
2609
  }
13
  if ( ! function_exists( 'weaverx_get_wp_custom_logo_url' ) ) {
14
  weaverx_alert( __( ' **** WARNING! ****\r\n\r\nYou are using a new Version 3 of the Weaver Xtreme Theme Support Plugin with an older version of the Weaver Xtreme Theme. Please update to the latest Version 3 of the Weaver Xtreme Theme.\r\n\r\nTHIS VERSION DOES NOT WORK WITH OLD VERSIONS OF WEAVER XTREME!' ) );
15
  }
 
 
16
 
17
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
18
+ //
19
+ //$trylink = 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=weaverx_starting-subtheme" rel="noopener"';
20
+ $customizer_link = 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php" rel="noopener"';
21
+ echo '<h3>';
22
+ echo __( 'Weaver Xtreme Main Options', 'weaver-xtreme' );
23
+ echo '</h3>';
 
 
 
 
 
 
 
24
 
25
+ echo '<p>';
26
+ echo _e( '<strong style="color:red;">NOTICE!</strong> Beginning with <em>Weaver Extreme Version 5</em>, the legacy options interface is no longer supported. You must now use the <em>Customizer</em> interface.', 'weaver-extreme' );
27
 
28
+ echo '</p><p>';
29
+ echo _e( 'Why is the legacy options interface gone? There are a couple of important reasons. From the user viewpoint, the Customizer really does make it much easier to develop your design. While it may take a few seconds longer to load the Customizer, once it is open you get a what you see is what you get view of your design - instantly. From a technical standpoint, as Weaver Xtreme evolves and adds new features, it is simply a maintenance nightmare to keep both interfaces in sync. We decided to focus on the theme, not maintaining the obsolete legacy interface!', 'weaver-extreme' );
30
+ echo '</p><p>' . esc_html( 'Open the', 'weaver-xtreme' ) . ' ';
31
+ echo '<strong><a ' . $customizer_link . '>' . esc_html( 'Customizer', 'weaver-xtreme' ) . '</a></strong> ';
32
+ echo esc_html( 'menu for full top level option menus.', 'weaver-xtreme' ) . ' </p>';
33
 
34
+ if ( 'where' == get_theme_mod( '_options_interface', 'where' ) ) { // WHERE interface
 
 
 
 
 
35
 
36
+ echo '<hr /><h4>' . esc_html( 'You can select a link below to jump directly to a Customizer option menu using the "Where" style interface.', 'weaver-xtreme' ) . '</h4></p>';
 
 
 
 
37
 
 
 
 
38
 
39
+ echo '<ul>';
 
 
40
 
41
+ echo '<li><strong><a ' .
42
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=weaverx_starting-subtheme" rel="noopener"'
43
+ . '>' . esc_html( 'Try a Pre-defined Subtheme', 'weaver-xtreme' ) . '</a></strong></li> ';
44
 
45
+ echo '<li><strong><a ' .
46
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_general" rel="noopener"'
47
+ . '>' . esc_html( 'Admin Options', 'weaver-xtreme' ) . '</a></strong></li> ';
48
 
49
+ echo '<li><strong><a ' .
50
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-global" rel="noopener"'
51
+ . '>' . esc_html( 'Global Site Settings', 'weaver-xtreme' ) . '</a></strong></li> ';
52
 
53
+ echo '<li><strong><a ' .
54
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-wrapping" rel="noopener"'
55
+ . '>' . esc_html( 'Wrapping Areas', 'weaver-xtreme' ) . '</a></strong></li> ';
56
 
57
+ echo '<li><strong><a ' .
58
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-sidebars" rel="noopener"'
59
+ . '>' . esc_html( 'Sidebars &amp; Widgets', 'weaver-xtreme' ) . '</a></strong></li> ';
60
 
61
+ echo '<li><strong><a ' .
62
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-header" rel="noopener"'
63
+ . '>' . esc_html( 'Header', 'weaver-xtreme' ) . '</a></strong></li> ';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
+ echo '<li><strong><a ' .
66
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-menus" rel="noopener"'
67
+ . '>' . esc_html( 'Menus', 'weaver-xtreme' ) . '</a></strong></li> ';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
+ echo '<li><strong><a ' .
70
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-infobar" rel="noopener"'
71
+ . '>' . esc_html( 'Info Bar', 'weaver-xtreme' ) . '</a></strong></li> ';
72
 
73
+ echo '<li><strong><a ' .
74
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-content" rel="noopener"'
75
+ . '>' . esc_html( 'Content Areas', 'weaver-xtreme' ) . '</a></strong></li> ';
76
 
77
+ echo '<li><strong><a ' .
78
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-posts" rel="noopener"'
79
+ . '>' . esc_html( 'Post Specifics', 'weaver-xtreme' ) . '</a></strong></li> ';
 
 
 
 
 
 
80
 
81
+ echo '<li><strong><a ' .
82
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-footer" rel="noopener"'
83
+ . '>' . esc_html( 'Footer', 'weaver-xtreme' ) . '</a></strong></li> ';
84
 
85
+ echo '<li><strong><a ' .
86
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-html-injection" rel="noopener"'
87
+ . '>' . esc_html( 'HTML Injection', 'weaver-xtreme' ) . '</a></strong></li> ';
 
 
 
 
 
 
 
 
 
 
 
88
 
89
+ echo '<li><strong><a ' .
90
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-custom" rel="noopener"'
91
+ . '>' . esc_html( 'Custom CSS', 'weaver-xtreme' ) . '</a></strong></li> ';
92
 
93
+ echo '<li><strong><a ' .
94
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-page-builder" rel="noopener"'
95
+ . '>' . esc_html( 'Page Builders', 'weaver-xtreme' ) . '</a></strong></li> ';
 
 
 
 
 
 
 
 
96
 
97
+ echo '<li><strong><a ' .
98
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_where-obsolete" rel="noopener"'
99
+ . '>' . esc_html( 'Obsolete Options', 'weaver-xtreme' ) . '</a></strong></li> ';
100
 
 
 
 
 
 
 
101
 
102
+ echo '</ul></p>';
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
+ } else { // WHAT INTERFACE
106
 
 
 
 
 
107
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
 
109
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
111
 
112
+ weaverx_admin_mainopts4();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  }
114
 
115
+ if ( ! version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
116
+ require_once( dirname( __FILE__ ) . '/admin-mainopts4.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  }
admin/admin-mainopts4.php ADDED
@@ -0,0 +1,2605 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // Exit if accessed directly
5
+ /* Weaver Xtreme - admin Main Options
6
+ *
7
+ * __ added: 12/9/14
8
+ * This function will start the main sapi form, which will be closed in admin-adminopts
9
+ */
10
+
11
+ function weaverx_admin_mainopts4() {
12
+ // Weaver 4 legacy interface
13
+ ?>
14
+ <div id="tabwrap_main" style="padding-left:4px;">
15
+
16
+ <div id="tab-container-main" class='yetiisub'>
17
+ <ul id="tab-container-main-nav" class='yetiisub'>
18
+ <?php
19
+ weaverx_elink( '#asp_genappear', __( 'Wrapping background colors, rounded corners, borders, fade, shadow', 'weaver-xtreme' /*adm*/ ), __( 'Wrapping Areas', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
20
+ weaverx_elink( '#asp_widgets', __( 'Settings for Sidebars and Sidebar Layout', 'weaver-xtreme' /*adm*/ ), __( 'Sidebars &amp; Layout', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
21
+ weaverx_elink( '#asp_full', __( 'Settings to create full width sites', 'weaver-xtreme' /*adm*/ ), __( 'Full Width', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
22
+ weaverx_elink( '#asp_headeropts', __( 'Site Title/Tagline properties, Header Image', 'weaver-xtreme' /*adm*/ ), __( 'Header', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
23
+ weaverx_elink( '#asp_menus', __( 'Menu text and bg colors and other properties; Info Bar properties', 'weaver-xtreme' /*adm*/ ), __( 'Menus', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
24
+ weaverx_elink( '#asp_content', __( 'Text colors and bg, image borders, featured image, other properties related to all content', 'weaver-xtreme' /*adm*/ ), __( 'Content Areas', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
25
+ weaverx_elink( '#asp_postspecific', __( 'Properties related to posts: titles, meta info, navigation, excerpts, featured images, and more', 'weaver-xtreme' /*adm*/ ), __( 'Post Specifics', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
26
+ weaverx_elink( '#asp_footer', __( 'Footer options: bg color, borders, more. Site Copyright', 'weaver-xtreme' /*adm*/ ), __( 'Footer', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
27
+ weaverx_elink( '#asp_custom', __( 'Font settings &amp; Custom Settings', 'weaver-xtreme' /*adm*/ ), __( 'Fonts &amp; Custom', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
28
+ ?>
29
+ </ul>
30
+
31
+ <?php weaverx_tab_title( __( 'Main Options', 'weaver-xtreme' /*adm*/ ), 'help.html#MainOptions', __( 'Help for Main Options', 'weaver-xtreme' /*adm*/ ) ); ?>
32
+
33
+ <div id="asp_genappear" class="tab_mainopt">
34
+ <?php weaverx_mainopts_general(); ?>
35
+ </div>
36
+
37
+ <div id="asp_widgets" class="tab_mainopt">
38
+ <?php
39
+ weaverx_mainopts_layout();
40
+ weaverx_mainopts_widgets();
41
+ ?>
42
+ </div>
43
+
44
+ <div id="asp_full" class="tab_mainopt">
45
+ <?php
46
+ weaverx_mainopts_fullwidth();
47
+ ?>
48
+ </div>
49
+
50
+ <div id="asp_headeropts" class="tab_mainopt">
51
+ <?php weaverx_mainopts_header(); ?>
52
+ </div>
53
+
54
+ <div id="asp_menus" class="tab_mainopt">
55
+ <?php weaverx_mainopts_menus(); ?>
56
+ </div>
57
+
58
+ <div id="asp_content" class="tab_mainopt">
59
+ <?php weaverx_mainopts_content(); ?>
60
+ </div>
61
+
62
+ <div id="asp_postspecific" class="tab_mainopt">
63
+ <?php weaverx_mainopts_posts(); ?>
64
+ </div>
65
+
66
+ <div id="asp_footer" class="tab_mainopt">
67
+ <?php weaverx_mainopts_footer(); ?>
68
+ </div>
69
+
70
+
71
+ <div id="asp_links" class="tab_mainopt">
72
+ <?php weaverx_mainopts_custom(); ?>
73
+ </div>
74
+
75
+ </div> <!-- #tab-container-main -->
76
+ <?php weaverx_sapi_submit(); ?>
77
+ </div> <!-- #tabwrap_main -->
78
+ <script type="text/javascript">
79
+ var tabberMainOpts = new Yetii({
80
+ id: 'tab-container-main',
81
+ tabclass: 'tab_mainopt',
82
+ persist: true
83
+ });
84
+ </script>
85
+ <?php
86
+ }
87
+
88
+ // ======================== Main Options > Wrapping Areas ========================
89
+ function weaverx_mainopts_general() {
90
+
91
+ $font_size = weaverx_getopt_default( 'site_fontsize_int', 16 );
92
+
93
+ $opts = array(
94
+ array( 'type' => 'submit' ),
95
+ array(
96
+ 'name' => __( 'Wrapping Areas', 'weaver-xtreme' /*adm*/ ),
97
+ 'id' => '-admin-generic',
98
+ 'type' => 'header',
99
+ 'info' => __( 'Settings for wrapping areas', 'weaver-xtreme' /*adm*/ ),
100
+ 'help' => 'help.html#GenApp',
101
+ ),
102
+ array(
103
+ 'name' => __( 'GLOBAL SETTINGS', 'weaver-xtreme' /*adm*/ ),
104
+ 'type' => 'note',
105
+ 'info' => __( 'These settings control site outer background and the standard link colors.', 'weaver-xtreme' /*adm*/ ),
106
+ ),
107
+ array(
108
+ 'name' => __( 'Site Background Color', 'weaver-xtreme' /*adm*/ ),
109
+ 'id' => 'body_bgcolor',
110
+ 'type' => 'ctext',
111
+ 'info' => __( 'Background color for &lt;body&gt;, wraps entire page.', 'weaver-xtreme' /*adm*/ ),
112
+ ),
113
+
114
+ array(
115
+ 'name' => __( 'Fade Outside BG', 'weaver-xtreme' /*adm*/ ),
116
+ 'id' => 'fadebody_bg',
117
+ 'type' => 'checkbox',
118
+ 'info' => __( 'Will fade the Outside BG color, darker at top to lighter at bottom.', 'weaver-xtreme' /*adm*/ ),
119
+ ),
120
+ array(
121
+ 'name' => __( 'Full Browser Height', 'weaver-xtreme' /*adm*/ ),
122
+ 'id' => 'full_browser_height',
123
+ 'type' => 'checkbox',
124
+ 'info' => __( 'For short pages, add extra padding to bottom of content to force full browser height.', 'weaver-xtreme' /*adm*/ ),
125
+ ),
126
+ array(
127
+ 'name' => __( 'Standard Links', 'weaver-xtreme' /*adm*/ ),
128
+ 'id' => 'link',
129
+ 'type' => 'link',
130
+ 'info' => __( 'Global default for link typography ( not including menus and titles ). Set Bold, Italic, and Underline by setting those options for specific areas rather than globally to have more control.', 'weaver-xtreme' /*adm*/ ),
131
+ ),
132
+
133
+ // array('name' => '#070' . __('No Auto-Underline Links', 'weaver-xtreme' /*adm*/), 'id' => 'mobile_nounderline', 'type' => 'checkbox',
134
+ // 'info' => __('Underlined links are easier to use on most mobile devices. This will disable auto-underlined links.', 'weaver-xtreme' /*adm*/)),
135
+
136
+ array(
137
+ 'name' => __( 'Current Base Font Size:', 'weaver-xtreme' /*adm*/ ),
138
+ 'type' => 'note',
139
+ 'info' => '<span style="font-size:' . $font_size . 'px;">' . $font_size . __( 'px.', 'weaver-xtreme' /*adm*/ ) . '</span> ' . __( 'Change on Custom Tab', 'weaver-xtreme' /*adm*/ ),
140
+ ),
141
+ array( 'type' => 'submit' ),
142
+
143
+
144
+ array(
145
+ 'name' => __( 'Wrapper Area', 'weaver-xtreme' /*adm*/ ),
146
+ 'id' => 'wrapper',
147
+ 'type' => 'widget_area_submit',
148
+ 'info' => __( 'Wrapper wraps entire site (CSS id: #wrapper). Colors and font settings will be the default values for all other areas.', 'weaver-xtreme' /*adm*/ ),
149
+ ),
150
+
151
+ array(
152
+ 'name' => __( 'Container Area', 'weaver-xtreme' /*adm*/ ),
153
+ 'id' => 'container',
154
+ 'type' => 'widget_area_submit',
155
+ 'info' => __( 'Container (#container div) wraps content and sidebars.', 'weaver-xtreme' /*adm*/ ),
156
+ ),
157
+
158
+ );
159
+
160
+ ?>
161
+
162
+ <div class="options-intro"><?php _e( '<strong>Wrapping Areas:</strong>
163
+ The options on this tab affect the overall site appearance.
164
+ The main <strong>Wrapper Area</strong> wraps the entire site, and is used to specify default text and background colors, site width, font families, and more.
165
+ With <em>Weaver Xtreme Plus</em>, you can also specify background images for various areas of your site.', 'weaver-xtreme' /*adm*/ ); ?>
166
+ <div class="options-intro-menu"><a href="#wrapping-areas"><?php _e( 'Wrapping Areas', 'weaver-xtreme' /*adm*/ ); ?></a> |
167
+ <a href="#wrapper-area"><?php _e( 'Wrapper Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
168
+ <a href="#container-area"><?php _e( 'Container Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
169
+ <a href="#background-images"><?php _e( 'Background Image (X-Plus)', 'weaver-xtreme' /*adm*/ ); ?></a>
170
+ </div>
171
+ </div>
172
+ <?php
173
+ weaverx_form_show_options( $opts );
174
+ do_action( 'weaverxplus_admin', 'general_appearance' );
175
+ }
176
+
177
+ function wvrx_ts_new_xp_opt( $vers, $opt ) {
178
+ // don't support new xp opts in old xp
179
+ if ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare( WEAVER_XPLUS_VERSION, $vers, '>=' ) ) {
180
+ return $opt;
181
+ }
182
+
183
+ return array( 'name' => $opt['name'], 'info' => __( 'This option requires X-Plus Version greater or equal to ', 'weaver-xtreme' ) . $vers, 'type' => 'note' );
184
+ }
185
+
186
+ // ======================== Main Options > Custom ========================
187
+
188
+ function weaverx_mainopts_custom() {
189
+ $opts = array(
190
+ array( 'type' => 'submit' ),
191
+ array(
192
+ 'name' => __( 'Custom Options', 'weaver-xtreme' /*adm*/ ),
193
+ 'id' => '-admin-generic',
194
+ 'type' => 'header',
195
+ 'info' => __( 'Set various global custom values.', 'weaver-xtreme' /*adm*/ ),
196
+ 'help' => 'help.html#Custom',
197
+ ),
198
+
199
+ array(
200
+ 'name' => __( 'Various Custom Values', 'weaver-xtreme' /*adm*/ ),
201
+ 'id' => '-admin-settings',
202
+ 'type' => 'subheader',
203
+ 'info' => __( 'Adjust various global settings', 'weaver-xtreme' /*adm*/ ),
204
+ ),
205
+
206
+ array(
207
+ 'name' => '<span class="i-left dashicons dashicons-align-none"></span>' . __( 'Smart Margin Width', 'weaver-xtreme' /*adm*/ ),
208
+ 'id' => 'smart_margin_int',
209
+ 'type' => '+val_percent',
210
+ 'info' => __( 'Width used for smart column margins for Sidebars and Content Area. (Default: 1%) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
211
+ ),
212
+
213
+ array(
214
+ 'name' => __( 'Border Color', 'weaver-xtreme' /*adm*/ ),
215
+ 'id' => 'border_color',
216
+ 'type' => 'color',
217
+ 'info' => __( 'Global color of borders. (Default: #222)', 'weaver-xtreme' /*adm*/ ),
218
+ ),
219
+ array(
220
+ 'name' => '<small>' . __( 'Border Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
221
+ 'id' => 'border_width_int',
222
+ 'type' => 'val_px',
223
+ 'info' => __( 'Global Width of borders. (Default: 1px)', 'weaver-xtreme' /*adm*/ ),
224
+ ),
225
+ array(
226
+ 'name' => '<span class="i-left" style="font-size:200%;margin-left:4px;">&#x25a1;</span><small>' . __( 'Border Style', 'weaver-xtreme' /*adm*/ ) . '</small>',
227
+ 'id' => 'border_style',
228
+ 'type' => '+select_id',
229
+ 'info' => __( 'Style of borders - width needs to be > 1 for some styles to work correctly (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
230
+ 'value' => array(
231
+ array( 'val' => 'solid', 'desc' => __( 'Solid', 'weaver-xtreme' /*adm*/ ) ),
232
+ array( 'val' => 'dotted', 'desc' => __( 'Dotted', 'weaver-xtreme' /*adm*/ ) ),
233
+ array( 'val' => 'dashed', 'desc' => __( 'Dashed', 'weaver-xtreme' /*adm*/ ) ),
234
+ array( 'val' => 'double', 'desc' => __( 'Double', 'weaver-xtreme' /*adm*/ ) ),
235
+ array( 'val' => 'groove', 'desc' => __( 'Groove', 'weaver-xtreme' /*adm*/ ) ),
236
+ array( 'val' => 'ridge', 'desc' => __( 'Ridge', 'weaver-xtreme' /*adm*/ ) ),
237
+ array( 'val' => 'inset', 'desc' => __( 'Inset', 'weaver-xtreme' /*adm*/ ) ),
238
+ array( 'val' => 'outset', 'desc' => __( 'Outset', 'weaver-xtreme' /*adm*/ ) ),
239
+ ),
240
+ ),
241
+
242
+ array(
243
+ 'name' => __( 'Corner Radius', 'weaver-xtreme' /*adm*/ ),
244
+ 'id' => 'rounded_corners_radius',
245
+ 'type' => '+val_px',
246
+ 'info' => __( 'Controls how "round" corners are. Specify a value (5 to 15 look best) for corner radius. (Default: 8) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
247
+ ),
248
+
249
+ array(
250
+ 'name' => __( 'Hide Menu/Link Tool Tips', 'weaver-xtreme' /*adm*/ ),
251
+ 'id' => 'hide_tooltip',
252
+ 'type' => '+checkbox',
253
+ 'info' => __( 'Hide the tool tip pop up over all menus and links. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
254
+ ),
255
+
256
+
257
+ array(
258
+ 'name' => __( 'Custom Shadow', 'weaver-xtreme' /*adm*/ ),
259
+ 'id' => 'custom_shadow',
260
+ 'type' => '+widetext',
261
+ 'info' => __( 'Specify full <em>box-shadow</em> CSS rule, e.g., <em>{box-shadow: 0 0 3px 1px rgba(0,0,0,0.25);}</em> (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
262
+ ),
263
+
264
+ array( 'type' => 'submit' ),
265
+
266
+ array(
267
+ 'name' => __( 'Custom CSS', 'weaver-xtreme' /*adm*/ ),
268
+ 'id' => 'custom_css',
269
+ 'type' => 'custom_css',
270
+ 'info' => __( 'Create Custom CSS Rules', 'weaver-xtreme' /*adm*/ ),
271
+ ),
272
+
273
+ array( 'type' => 'submit' ),
274
+
275
+
276
+ array(
277
+ 'name' => __( 'Fonts', 'weaver-xtreme' /*adm*/ ),
278
+ 'id' => '-editor-textcolor',
279
+ 'type' => 'header',
280
+ 'info' => __( 'Font Base Sizes', 'weaver-xtreme' /*adm*/ ),
281
+ 'help' => 'font-demo.html',
282
+ ),
283
+
284
+ array(
285
+ 'name' => __( 'Site Base Font Size', 'weaver-xtreme' /*adm*/ ),
286
+ 'id' => 'site_fontsize_int',
287
+ 'type' => 'val_px',
288
+ 'info' => __( 'Base font size of standard text. This value determines the default medium font size. Note that visitors can change their browser\'s font size, so final font size can vary, as expected. (Default: 16px)', 'weaver-xtreme' /*adm*/ ),
289
+ ),
290
+
291
+ array(
292
+ 'name' => __( 'Site Base Line Height', 'weaver-xtreme' /*adm*/ ),
293
+ 'id' => 'site_line_height_dec',
294
+ 'type' => '+val_num',
295
+ 'info' => __( 'Set the Base line-height. Most other line heights based on this multiplier. (Default: 1.5 - no units) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
296
+ ),
297
+
298
+ array(
299
+ 'name' => '<small>' . __( 'Site Base Font Size - Small Tablets', 'weaver-xtreme' /*adm*/ ) . '</small>',
300
+ 'id' => 'site_fontsize_tablet_int',
301
+ 'type' => '+val_px',
302
+ 'info' => __( 'Small Tablet base font size of standard text. (Default medium font size: 16px) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
303
+ ),
304
+ array(
305
+ 'name' => '<small>' . __( 'Site Base Font Size - Phones', 'weaver-xtreme' /*adm*/ ) . '</small>',
306
+ 'id' => 'site_fontsize_phone_int',
307
+ 'type' => '+val_px',
308
+ 'info' => __( 'Phone base font size of standard text. (Default medium font size: 16px) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
309
+ ),
310
+
311
+ array(
312
+ 'name' => __( 'Custom Font Size A', 'weaver-xtreme' /*adm*/ ),
313
+ 'id' => 'custom_fontsize_a',
314
+ 'type' => '+val_em',
315
+ 'info' => __( 'Specify font size in em for Custom Size A (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
316
+ ),
317
+ array(
318
+ 'name' => __( 'Custom Font Size B', 'weaver-xtreme' /*adm*/ ),
319
+ 'id' => 'custom_fontsize_b',
320
+ 'type' => '+val_em',
321
+ 'info' => __( 'Specify font size in em for Custom Size B (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
322
+ ),
323
+
324
+ array(
325
+ 'name' => '<small>' . __( 'Disable Google Font Integration', 'weaver-xtreme' /*adm*/ ) . '</small>',
326
+ 'id' => 'disable_google_fonts',
327
+ 'type' => '+checkbox',
328
+ 'info' => __( '<strong>ADVANCED OPTION!</strong> <em>Be sure you understand the consequences of this option.</em> By disabling Google Font Integration, the Google Fonts definitions will <strong>not</strong> be loaded for your site. <strong style="color:red;font-weight:bold;">Please note:</strong> Any previously selected Google Font Families will revert to generic serif, sans, mono, and script fonts.', 'weaver-xtreme' ),
329
+ ),
330
+
331
+ array( 'type' => 'submit' ),
332
+
333
+ );
334
+ ?>
335
+ <div class="options-intro"><strong><?php _e( 'Custom &amp; Fonts:', 'weaver-xtreme' /*adm*/ ); ?> </strong>
336
+ <?php _e( 'Set values for Custom options and Fonts: Smart Margin, Borders, Corners, Shadows, Custom CSS, and Fonts', 'weaver-xtreme' /*adm*/ ); ?>
337
+ <br/>
338
+ <div class="options-intro-menu">
339
+ <a href="#various-custom-values"><?php _e( 'Various Custom Values', 'weaver-xtreme' /*adm*/ ); ?></a> |
340
+ <a href="#custom-css-rules"><?php _e( 'Custom CSS Rules', 'weaver-xtreme' /*adm*/ ); ?></a> |
341
+ <a href="#fonts">Fonts</a>
342
+ </div>
343
+ </div>
344
+ <?php
345
+ weaverx_form_show_options( $opts );
346
+
347
+ do_action( 'weaverxplus_admin', 'fonts' );
348
+ }
349
+
350
+ // ======================== Main Options > Full Width ========================
351
+
352
+ function weaverx_mainopts_fullwidth() {
353
+
354
+ $opts = array(
355
+ array( 'type' => 'submit' ),
356
+ array(
357
+ 'name' => __( 'Full Width Site', 'weaver-xtreme' /*adm*/ ),
358
+ 'id' => '-editor-justify',
359
+ 'type' => 'header',
360
+ 'info' => __( 'Options to easily create full width site designs', 'weaver-xtreme' /*adm*/ ),
361
+ 'help' => 'help.html#FullWidth',
362
+ ),
363
+
364
+
365
+ array(
366
+ 'name' => __( 'One-Step Site Layout', 'weaver-xtreme' /*adm*/ ),
367
+ 'id' => 'site_layout',
368
+ 'type' => 'select_id',
369
+ 'info' => __( 'Easiest way to set overall site width layout. Settings other than Custom or blank <strong>automatically</strong> set and clear other Extend BG and Stretch Width Options. Use Custom to enable manual Custom Full Width Options. You can also use <em>Full</em> and <em>Wide Align</em> options for individual areas to enhance these one-step settings.', 'weaver-xtreme' /*adm*/ ),
370
+ 'value' => array(
371
+ array( 'val' => '', 'desc' => '' ),
372
+ array( 'val' => 'fullwidth', 'desc' => __( 'Full Width - Extends BG to full width', 'weaver-xtreme' ) ),
373
+ array( 'val' => 'stretched', 'desc' => __( 'Stretched - Expand to full width', 'weaver-xtreme' ) ),
374
+ array( 'val' => 'custom', 'desc' => __( 'Traditional - Use Traditional Width Options', 'weaver-xtreme' ) ),
375
+ ),
376
+ ),
377
+ );
378
+
379
+
380
+ $opts[] = array(
381
+ 'name' => __( 'Wide and Full Alignment', 'weaver-xtreme' /*adm*/ ),
382
+ 'id' => '-admin-appearance3',
383
+ 'type' => 'header_area',
384
+ 'info' => __( 'Many wrapping areas and other items include Full and Wide alignment for a different way to get full or wide width.', 'weaver-xtreme' /*adm*/ ),
385
+ );
386
+ $opts[] = array(
387
+ 'name' => '<small>' . __( 'Align Full and Wide', 'weaver-xtreme' /*adm*/ ) . '</small>',
388
+ 'type' => 'note',
389
+ 'info' => __( 'Two new alignment classes, .alignwide and .alignfull are supported by Weaver Xtreme. Most options with the Align option include options for full and wide alignment. Using a width alignment option will extend the full item, including content, to the specified width.', 'weaver-xtreme' /*adm*/ ),
390
+ );
391
+
392
+
393
+ $opts[] = array(
394
+ 'name' => __( 'Extend BG Attributes to Full Width', 'weaver-xtreme' /*adm*/ ),
395
+ 'id' => '-editor-code',
396
+ 'type' => 'header_area',
397
+ 'info' => __( 'The Extend BG Attributes options in this section <em>retain the original content width</em>, while <em>extending the area\'s Background attributes to full width</em>. These includes BG color, BG image, and borders, for example. IMPORTANT: Extend options override wide and full alignment options.', 'weaver-xtreme' /*adm*/ ),
398
+ );
399
+
400
+
401
+ $extend = array(
402
+ 'container' => array( __( 'Container Area Extend BG', 'weaver-xtreme' ), __( 'Extend Container Area BG Attributes to full width.', 'weaver-xtreme' ) ),
403
+ 'header' => array( __( 'Header Area Extend BG', 'weaver-xtreme' ), __( ' Extend Header Area BG Attributes to full width.', 'weaver-xtreme' ) ),
404
+ 'header_sb' => array( __( 'Header Widget Area Extend BG', 'weaver-xtreme' ), __( 'Extend Header Widget Area BG Attributes to full width.', 'weaver-xtreme' ) ),
405
+ 'header_html' => array( __( 'Header HTML Area Extend BG', 'weaver-xtreme' ), __( 'Extend Header HTML Area BG Attributes to full width.', 'weaver-xtreme' ) ),
406
+ 'm_primary' => array( __( 'Primary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Primary Menu BG Attributes to full width, keep menu items constrained to theme width.', 'weaver-xtreme' ) ),
407
+ 'm_secondary' => array( __( 'Secondary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Secondary Menu BG Attributes to full width, keep menu items constrained to theme width.', 'weaver-xtreme' ) ),
408
+ 'infobar' => array( __( 'Info Bar Extend BG', 'weaver-xtreme' ), __( 'Extend Info Bar BG Attributes to full width.', 'weaver-xtreme' ) ),
409
+ //'content' => array( __('Content Area Fullwidth BG', 'weaver-xtreme'), __('Extend Content Area BG Attributes to full width.','weaver-xtreme' )),
410
+ 'post' => array( __( 'Post Area Extend BG', 'weaver-xtreme' ), __( 'Extend each Post Area BG Attributes to full width.', 'weaver-xtreme' ) ),
411
+ 'footer' => array( __( 'Footer Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer Area BG Attributes to full width.', 'weaver-xtreme' ) ),
412
+ 'footer_sb' => array( __( 'Footer Widget Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer Widget Area BG Attributes to full width.', 'weaver-xtreme' ) ),
413
+ 'footer_html' => array( __( 'Footer HTML Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer HTML Area BG Attributes to full width.', 'weaver-xtreme' ) ),
414
+
415
+ );
416
+
417
+ foreach ( $extend as $id => $vals ) {
418
+ $type = 'checkbox';
419
+ if ( $id == 'm_extra' ) {
420
+ $type = '+checkbox';
421
+ }
422
+ $opts[] = array(
423
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . $vals[0],
424
+ 'id' => $id . '_extend_width',
425
+ 'type' => $type,
426
+ 'info' => $vals[1],
427
+ );
428
+ }
429
+
430
+
431
+ $opts[] = array(
432
+ 'name' => __( 'Stretch Areas (Expand)', 'weaver-xtreme' /*adm*/ ),
433
+ 'id' => '-editor-expand',
434
+ 'type' => 'header_area',
435
+ 'info' => __( 'This section has options that let you stretch or expand selected content areas of your site to the full browser width. The content will be responsively displayed - and fully occupy the browser window.', 'weaver-xtreme' /*adm*/ ),
436
+ );
437
+ $opts[] = array(
438
+ 'name' => '<small>' . __( 'These Options OBSOLETE', 'weaver-xtreme' /*adm*/ ) . '</small>',
439
+ 'type' => 'note',
440
+ 'info' => __( 'Due to the added support for Wide and Full Alignment, the Stretch options are essentially obsolete. Please use the Full and Wide align options available for most of these Stretch items.', 'weaver-xtreme' /*adm*/ ),
441
+ );
442
+
443
+ $opts[] = array(
444
+ 'name' => '<span class="i-left dashicons dashicons-editor-expand"></span>' . __( 'Entire Site Full Width', 'weaver-xtreme' /*adm*/ ),
445
+ 'id' => 'wrapper_fullwidth',
446
+ 'type' => 'checkbox',
447
+ 'info' => __( 'Checking this option will display the <strong>ENTIRE SITE</strong> in the full width of the browser. This option overrides the <em>Theme Width</em> option on the <em>Wrapping Areas : Wrapper Area</em> menu.', 'weaver-xtreme' /*adm*/ ),
448
+ );
449
+
450
+
451
+ $stretch = array(
452
+ 'header' => array( __( 'Header Area Stretch', 'weaver-xtreme' ), __( 'Stretch Header Area to full width. This will include all other Header Area sub-areas as well.', 'weaver-xtreme' ) ),
453
+ 'header-image' => array( __( 'Header Image Stretch', 'weaver-xtreme' ), __( 'Stretch Header Image to full width.', 'weaver-xtreme' ) ),
454
+ 'site_title' => array( __( 'Site Title/Tagline Stretch', 'weaver-xtreme' ), __( 'This option includes the Site Title, Tagline, Search Button, and MiniMenu.', 'weaver-xtreme' ) ),
455
+ 'header-widget-area' => array( __( 'Header Widget Area Stretch', 'weaver-xtreme' ), __( 'Stretch Header Widget Area to full width.', 'weaver-xtreme' ) ),
456
+ 'header-html' => array( __( 'Header HTML Area Stretch', 'weaver-xtreme' ), __( 'Stretch Header HTML Area to full width.', 'weaver-xtreme' ) ),
457
+ 'm_primary' => array( __( 'Primary Menu Stretch', 'weaver-xtreme' ), __( 'Stretch Primary Menu to full width.', 'weaver-xtreme' ) ),
458
+ 'm_secondary' => array( __( 'Secondary Menu Stretch', 'weaver-xtreme' ), __( 'Stretch Secondary Menu to full width.', 'weaver-xtreme' ) ),
459
+ 'container' => array( __( 'Container Area Stretch', 'weaver-xtreme' ), __( 'Stretch Container Area to full width.', 'weaver-xtreme' ) ),
460
+ 'infobar' => array( __( 'Info Bar Stretch', 'weaver-xtreme' ), __( 'Stretch Info Bar to full width.', 'weaver-xtreme' ) ),
461
+ 'post' => array( __( 'Post Area Stretch', 'weaver-xtreme' ), __( 'Stretch Post Area to full width.', 'weaver-xtreme' ) ),
462
+ 'footer' => array( __( 'Footer Area Stretch', 'weaver-xtreme' ), __( 'Checking this option will automatically include the other Footer Area Stretch options as well.', 'weaver-xtreme' ) ),
463
+ 'footer_sb' => array( __( 'Footer Widget Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer Widget Area to full width.', 'weaver-xtreme' ) ),
464
+ 'footer_html' => array( __( 'Footer HTML Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer HTML Area to full width.', 'weaver-xtreme' ) ),
465
+ 'site-ig-wrap' => array( __( 'Footer Copyright Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer Copyright Area to full width.', 'weaver-xtreme' ) ),
466
+
467
+ );
468
+
469
+ foreach ( $stretch as $id => $vals ) {
470
+ $opts[] = array(
471
+ 'name' => '<span class="i-left dashicons dashicons-editor-expand"></span>' . $vals[0],
472
+ 'id' => 'expand_' . $id,
473
+ 'type' => 'checkbox',
474
+ 'info' => $vals[1],
475
+ );
476
+ }
477
+
478
+
479
+ $opts[] = array(
480
+ 'name' => __( 'Extend BG Color', 'weaver-xtreme' /*adm*/ ),
481
+ 'id' => '-admin-appearance',
482
+ 'type' => 'header_area',
483
+ 'info' => __( 'These options, available with Weaver Xtreme Plus, allow you to stretch the BG color of various area to full width. This is different than the Extend BG Attributes in that only the color is extended, and that color can be different than the content. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
484
+ );
485
+
486
+
487
+ $extend = array(
488
+
489
+ 'header' => array( __( 'Header Area Extend BG Color', 'weaver-xtreme' ), __( 'Extend Header Area BG Color to full width.', 'weaver-xtreme' ) ),
490
+ 'm_primary' => array( __( 'Primary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Primary Menu BG Color to full width.', 'weaver-xtreme' ) ),
491
+ 'm_secondary' => array( __( 'Secondary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Secondary Menu BG Color to full width.', 'weaver-xtreme' ) ),
492
+ 'm_extra' => array( __( 'Extra Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Extra Menu BG Color to full width.', 'weaver-xtreme' ) ),
493
+ 'container' => array( __( 'Container Extend BG', 'weaver-xtreme' ), __( 'Extend Container Area BG Color to full width.', 'weaver-xtreme' ) ),
494
+ 'content' => array( __( 'Content Extend BG', 'weaver-xtreme' ), __( 'Extend Content Area BG Color to full width.', 'weaver-xtreme' ) ),
495
+ 'footer' => array( __( 'Footer Extend BG', 'weaver-xtreme' ), __( 'Extend Footer Area BG Color to full width.', 'weaver-xtreme' ) ),
496
+ );
497
+
498
+ foreach ( $extend as $id => $vals ) {
499
+ $opts[] = array(
500
+ 'name' => $vals[0],
501
+ 'id' => $id . '_extend_bgcolor',
502
+ 'type' => '+color',
503
+ 'info' => $vals[1] . ' (&starf;Plus)',
504
+ );
505
+ }
506
+
507
+
508
+ ?>
509
+ <div class="options-intro">
510
+ <?php _e( '<strong>Full Width:</strong> Options to create full width sites.', 'weaver-xtreme' /*adm*/ ); ?><p>
511
+ <?php _e( '<strong style="color:red;">IMPORTANT NOTE:</strong> A better way to create Full and Wide Sites is to use Align Full or Align Wide on the four major areas: Wrapper, Header, Container, and the Footer. The new Left/Right Padding in percent is available for responsive padding with these areas.', 'weaver-xtreme' ); ?>
512
+ </p></div>
513
+ <?php
514
+ weaverx_form_show_options( $opts );
515
+
516
+
517
+ }
518
+
519
+ // ======================== Main Options > Header ========================
520
+ function weaverx_mainopts_header() {
521
+
522
+ $wp_logo = weaverx_get_wp_custom_logo_url();
523
+
524
+ if ( $wp_logo ) {
525
+ $wp_logo_html = "<img src='{$wp_logo}' style='max-height:16px;margin-left:10px;' />";
526
+ } else {
527
+ $wp_logo_html = __( 'Not set', 'weaver-xtreme' );
528
+ }
529
+
530
+
531
+ $opts = array(
532
+ array( 'type' => 'submit' ),
533
+ array(
534
+ 'name' => __( 'Header Options', 'weaver-xtreme' /*adm*/ ),
535
+ 'id' => '-admin-generic',
536
+ 'type' => 'header',
537
+ 'info' => __( 'Options affecting site Header', 'weaver-xtreme' /*adm*/ ),
538
+ 'help' => 'help.html#HeaderOpt',
539
+ ),
540
+
541
+
542
+ array(
543
+ 'name' => __( 'Header Area', 'weaver-xtreme' /*adm*/ ),
544
+ 'id' => 'header',
545
+ 'type' => 'widget_area',
546
+ 'info' => __( 'The Header Area includes: menu bars, standard header image, title, tagline, header widget area, header HTML area', 'weaver-xtreme' /*adm*/ ),
547
+ ),
548
+
549
+ array( 'name' => __( 'Header Other options', 'weaver-xtreme' ), 'type' => 'break' ),
550
+
551
+ array(
552
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Hide Search on Header', 'weaver-xtreme' /*adm*/ ),
553
+ 'id' => 'header_search_hide',
554
+ 'type' => 'select_hide',
555
+ 'info' => __( 'Selectively hide the Search Box Button on top right of header', 'weaver-xtreme' /*adm*/ ),
556
+ ),
557
+ array(
558
+ 'name' => '<small>' . __( 'Search Area Options:', 'weaver-xtreme' /*adm*/ ) . '</small>',
559
+ 'type' => 'note',
560
+ 'info' => __( 'Specify search icon, text and background colors Search section of Content Areas tab.', 'weaver-xtreme' /*adm*/ ),
561
+ ),
562
+
563
+ array( 'type' => 'submit' ),
564
+
565
+ array(
566
+ 'name' => __( 'Header Image', 'weaver-xtreme' /*adm*/ ),
567
+ 'id' => '-format-image',
568
+ 'type' => 'subheader',
569
+ 'info' => __( 'Settings related to standard header image (Set on Appearance&rarr;Header)', 'weaver-xtreme' /*adm*/ ),
570
+ ),
571
+
572
+ array(
573
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Hide Header Image', 'weaver-xtreme' /*adm*/ ),
574
+ 'id' => 'hide_header_image',
575
+ 'type' => 'select_hide',
576
+ 'info' => __( 'Check to selectively hide standard header image', 'weaver-xtreme' /*adm*/ ),
577
+ ),
578
+
579
+ array(
580
+ 'name' => '<small>' . __( 'Suggested Header Image Height', 'weaver-xtreme' /*adm*/ ) . '</small>',
581
+ 'id' => 'header_image_height_int',
582
+ 'type' => 'val_px',
583
+ 'info' => __( 'Change the suggested height of the Header Image. This only affects the clipping window on the Appearance:Header page. Header images will be responsively sized. If used with <em>Header Image Rendering</em>, this value will be used to set the minimum height of the BG image. (Default: 188px)', 'weaver-xtreme' /*adm*/ ),
584
+ ),
585
+
586
+ wvrx_ts_new_xp_opt( '3.0', // >= 3.0
587
+ array(
588
+ 'name' => __( 'Header Image Rendering', 'weaver-xtreme' /*adm*/ ) . '</small>',
589
+ 'id' => 'header_image_render',
590
+ 'type' => '+select_id', //code
591
+ 'info' => __( 'How to render header image: as img in header or as header area bg image. When rendered as a BG image, other options such as moving Title/Tagline or having image link to home page are not meaningful. (Default: &lt;img&gt; in header div) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
592
+ 'value' => array(
593
+ array( 'val' => 'header-as-img', 'desc' => __( 'As img in header', 'weaver-xtreme' /*adm*/ ) ),
594
+ array( 'val' => 'header-as-bg', 'desc' => __( 'As static BG image', 'weaver-xtreme' /*adm*/ ) ),
595
+ array( 'val' => 'header-as-bg-responsive', 'desc' => __( 'As responsive BG image', 'weaver-xtreme' /*adm*/ ) ),
596
+ array( 'val' => 'header-as-bg-parallax', 'desc' => __( 'As parallax BG image', 'weaver-xtreme' /*adm*/ ) ),
597
+
598
+ ),
599
+ ) ),
600
+
601
+ array(
602
+ 'name' => '<small>' . __( 'Minimum Header Height', 'weaver-xtreme' /*adm*/ ) . '</small>',
603
+ 'id' => 'header_min_height',
604
+ 'type' => '+val_px',
605
+ 'info' => __( 'Set Minimum Height for Header Area. Most useful used with Parallax Header BG Image. Adding Top Margin to Primary Menu bar can also add height. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
606
+ ),
607
+
608
+
609
+ array(
610
+ 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Maximum Image Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
611
+ 'id' => 'header_image_max_width_dec',
612
+ 'type' => '+val_percent',
613
+ 'info' => __( 'Maximum width of Image (Default: 100%) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
614
+ ),
615
+
616
+ array(
617
+ 'name' => '<small>' . __( 'Use Actual Image Size', 'weaver-xtreme' /*adm*/ ) . '</small>',
618
+ 'id' => 'header_actual_size',
619
+ 'type' => '+checkbox',
620
+ 'info' => __( 'Check to use actual header image size. (Default: theme width) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
621
+ ),
622
+
623
+ array(
624
+ 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'Align Header Image', 'weaver-xtreme' /*adm*/ ) . '</small>',
625
+ 'id' => 'header_image_align',
626
+ 'type' => 'align',
627
+ 'info' => __( 'How to align header image. Wide and Full do not apply to BG header image.', 'weaver-xtreme' /*adm*/ ),
628
+ ),
629
+
630
+ array(
631
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Header Image Front Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
632
+ 'id' => 'hide_header_image_front',
633
+ 'type' => 'checkbox',
634
+ 'info' => __( 'Check to hide display of standard header image on front page only.', 'weaver-xtreme' /*adm*/ ),
635
+ ),
636
+
637
+ array(
638
+ 'name' => '<span class="i-left">{ }</span> <small>' . __( 'Add Classes', 'weaver-xtreme' /*adm*/ ) . '</small>',
639
+ 'id' => 'header_image_add_class',
640
+ 'type' => '+widetext',
641
+ 'info' => '<em>' . __( 'Header Image', 'weaver-xtreme' /*adm*/ ) . '</em>' . __( ': Space separated class names to add to this area (<em>Advanced option</em>) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
642
+ ),
643
+
644
+ array(
645
+ 'name' => '<small>' . __( 'Header Image Links to Site', 'weaver-xtreme' /*adm*/ ) . '</small>',
646
+ 'id' => 'link_site_image',
647
+ 'type' => 'checkbox',
648
+ 'info' => __( 'Check to add a link to site home page for Header Image. Note: If used with <em>Move Title/Tagline over Image</em>, parts of the header image will not be clickable.', 'weaver-xtreme' /*adm*/ ),
649
+ ),
650
+
651
+ array(
652
+ 'name' => '<small>' . __( 'Alternate Header Images:', 'weaver-xtreme' /*adm*/ ) . '</small>',
653
+ 'type' => 'note',
654
+ 'info' => __( 'Specify alternate header images using the <em>Featured Image Location</em> options on the <em>Content Areas</em> tab for pages, or the <em>Post Specifics</em> tab for single post views.', 'weaver-xtreme' /*adm*/ ),
655
+ ),
656
+
657
+ array(
658
+ 'name' => '<span class="i-left dashicons dashicons-editor-code"></span>' . __( 'Image HTML Replacement', 'weaver-xtreme' /*adm*/ ),
659
+ 'id' => 'header_image_html_text',
660
+ 'type' => 'textarea',
661
+ 'placeholder' => __( 'Any HTML, including shortcodes', 'weaver-xtreme' /*adm*/ ),
662
+ 'info' => __( 'Replace Header image with arbitrary HTML. Useful for slider shortcodes in place of image. FI as Header Image has priority over HTML replacement. Extreme Plus also supports this option on a Per Page/Post basis.', 'weaver-xtreme' /*adm*/ ),
663
+ 'val' => 1,
664
+ ),
665
+
666
+ array(
667
+ 'name' => '<small>' . __( 'Show On Home Page Only', 'weaver-xtreme' /*adm*/ ) . '</small>',
668
+ 'id' => 'header_image_html_home_only',
669
+ 'type' => 'checkbox',
670
+ 'info' => __( 'Check to use the Image HTML Replacement only on your Front/Home page.', 'weaver-xtreme' /*adm*/ ),
671
+ ),
672
+
673
+ wvrx_ts_new_xp_opt( '3.0', // >= 3.0
674
+ array(
675
+ 'name' => '<small>' . __( 'Also show BG Header Image', 'weaver-xtreme' /*adm*/ ) . '</small>',
676
+ 'id' => 'header_image_html_plus_bg',
677
+ 'type' => '+checkbox',
678
+ 'info' => __( 'If you have Image HTML Replacement defined - including Per Page/Post - and also have have set the standard Header Image to display as a BG image, then show <em>both</em> the BG image and the replacement HTML. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
679
+ ) ),
680
+
681
+
682
+ array(
683
+ 'name' => __( 'Header Video', 'weaver-xtreme' /*adm*/ ),
684
+ 'id' => '-format-video',
685
+ 'type' => 'subheader',
686
+ 'info' => __( 'Settings related to Header Video (Set on Appearance&rarr;Header or on the Customize&rarr;Images&rarr;Header Media menu.)', 'weaver-xtreme' /*adm*/ ),
687
+ ),
688
+
689
+ array(
690
+ 'name' => __( 'Header Video Rendering', 'weaver-xtreme' /*adm*/ ) . '</small>',
691
+ 'id' => 'header_video_render',
692
+ 'type' => 'select_id', //code
693
+ 'info' => __( 'How to render Header Video: as image substitute in header or as full browser background cover image will parallax effect. <em style="color:red;">Note that the Header Image options above do not apply to the Header Video media.</em>', 'weaver-xtreme' /*adm*/ ),
694
+ 'value' => array(
695
+ array( 'val' => 'has-header-video', 'desc' => __( 'As video in header only', 'weaver-xtreme' /*adm*/ ) ),
696
+ array( 'val' => 'has-header-video-cover', 'desc' => __( 'As full cover Parallax BG Video', 'weaver-xtreme' /*adm*/ ) ),
697
+ array( 'val' => 'has-header-video-none', 'desc' => __( 'Disable Header Video', 'weaver-xtreme' /*adm*/ ) ),
698
+ ),
699
+ ),
700
+
701
+ array(
702
+ 'name' => __( 'Header Video Aspect Ratio', 'weaver-xtreme' /*adm*/ ) . '</small>',
703
+ 'id' => 'header_video_aspect',
704
+ 'type' => 'select_id', //code
705
+ 'info' => __( 'It is critical to select aspect ratio of your video. If you see letterboxing black bars, you have the wrong aspect ratio selected.', 'weaver-xtreme' /*adm*/ ),
706
+ 'value' => array(
707
+ array( 'val' => '16:9', 'desc' => __( '16:9 HDTV', 'weaver-xtreme' /*adm*/ ) ),
708
+ array( 'val' => '4:3', 'desc' => __( '4:3 Std TV', 'weaver-xtreme' /*adm*/ ) ),
709
+ array( 'val' => '3:2', 'desc' => __( '3:2 35mm Photo', 'weaver-xtreme' /*adm*/ ) ),
710
+ array( 'val' => '5:3', 'desc' => __( '5:3 Alternate Photo', 'weaver-xtreme' /*adm*/ ) ),
711
+ array( 'val' => '64:27', 'desc' => __( '2.37:1 Cinemascope', 'weaver-xtreme' /*adm*/ ) ),
712
+ array( 'val' => '37:20', 'desc' => __( '1.85:1 VistaVision', 'weaver-xtreme' /*adm*/ ) ),
713
+ array( 'val' => '3:1', 'desc' => __( '3:1 Banner', 'weaver-xtreme' /*adm*/ ) ),
714
+ array( 'val' => '4:1', 'desc' => __( '4:1 Banner', 'weaver-xtreme' /*adm*/ ) ),
715
+ array( 'val' => '9:16', 'desc' => __( '9:16 Vertical HD (Please avoid!)', 'weaver-xtreme' /*adm*/ ) ),
716
+ ),
717
+ ),
718
+
719
+
720
+ array(
721
+ 'name' => __( 'Custom Logo', 'weaver-xtreme' /*adm*/ ),
722
+ 'id' => '-menu',
723
+ 'type' => 'subheader',
724
+ 'info' => __( 'The native WP Custom Logo, set on the Site Identity Customizer menu.', 'weaver-xtreme' /*adm*/ ),
725
+ ),
726
+
727
+ array(
728
+ 'name' => '<small>' . __( 'Replace Title with Site Logo', 'weaver-xtreme' /*adm*/ ) . '</small>',
729
+ 'id' => 'wplogo_for_title',
730
+ 'type' => 'checkbox',
731
+ 'info' => __( 'Replace the Site Title text with the WP Custom Logo Image. Logo: ', 'weaver-xtreme' /*adm*/ ) . $wp_logo_html,
732
+ ),
733
+
734
+ array(
735
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide WP Custom Logo', 'weaver-xtreme' /*adm*/ ) . '</small>',
736
+ 'id' => 'hide_wp_site_logo',
737
+ 'type' => 'select_hide',
738
+ 'info' => __( 'Hide native WP Custom Site Logo in Header, by device. (This is not the Weaver Logo/HTML!)', 'weaver-xtreme' /*adm*/ ),
739
+ ),
740
+
741
+ array(
742
+ 'name' => '<span class="i-left dashicons dashicons-align-none"></span><small>' . __( 'Logo for Title Height', 'weaver-xtreme' /*adm*/ ) . '</small>',
743
+ 'id' => 'header_logo_height_dec',
744
+ 'type' => 'val_px',
745
+ 'info' => __( 'Set maximum height of Logo when used to replace Site Title. Default 0 uses the actual image size. This is the maximum height. If the actual image height is smaller, the smaller value is used.', 'weaver-xtreme' /*adm*/ ),
746
+ ),
747
+
748
+
749
+ array( 'type' => 'submit' ),
750
+
751
+
752
+ array(
753
+ 'name' => __( 'Site Title/Tagline', 'weaver-xtreme' /*adm*/ ),
754
+ 'id' => '-text',
755
+ 'type' => 'subheader',
756
+ 'info' => __( 'Settings related to the Site Title and Tagline (Tagline sometimes called Site Description)', 'weaver-xtreme' /*adm*/ ),
757
+ ),
758
+
759
+
760
+ array(
761
+ 'name' => __( 'Site Title', 'weaver-xtreme' /*adm*/ ),
762
+ 'id' => 'site_title',
763
+ 'type' => 'titles',
764
+ 'info' => __( "The site's main title in the header (blog title)", 'weaver-xtreme' /*adm*/ ),
765
+ ),
766
+
767
+ array(
768
+ 'name' => '<span class="i-left font-bold" style="font-size:120%;">&#x21cc;</span><small>' . __( 'Title Position', 'weaver-xtreme' /*adm*/ ) . '</small>',
769
+ 'id' => 'site_title_position_xy',
770
+ 'type' => 'text_xy_percent',
771
+ 'info' => __( 'Adjust left and top margins for Title. Decimal and negative values allowed. (Default: X: 7%, Y:0.25%)', 'weaver-xtreme' /*adm*/ ),
772
+ ),
773
+
774
+ array(
775
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'Title Max Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
776
+ 'id' => 'site_title_max_w',
777
+ 'type' => 'val_percent',
778
+ 'info' => __( "Maximum width of title in header area (Default: 90%)", 'weaver-xtreme' /*adm*/ ),
779
+ ),
780
+
781
+ array(
782
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Site Title', 'weaver-xtreme' /*adm*/ ) . '</small>',
783
+ 'id' => 'hide_site_title',
784
+ 'type' => 'select_hide',
785
+ 'info' => __( 'Hide Site Title (Uses "display:none;" : SEO friendly.)', 'weaver-xtreme' /*adm*/ ),
786
+ ),
787
+
788
+ array(
789
+ 'name' => __( 'Move Title/Tagline over Image', 'weaver-xtreme' /*adm*/ ),
790
+ 'id' => 'title_over_image',
791
+ 'type' => 'checkbox',
792
+ 'info' => __( 'Move the Title, Tagline, Search, Logo/HTML and Mini-Menu over the Header Image. This can make a very attractive header,', 'weaver-xtreme' /*adm*/ ),
793
+ ),
794
+
795
+ array(
796
+ 'name' => __( 'Site Tagline', 'weaver-xtreme' /*adm*/ ),
797
+ 'id' => 'tagline',
798
+ 'type' => 'titles',
799
+ 'info' => __( "The site's tagline (blog description)", 'weaver-xtreme' /*adm*/ ),
800
+ ),
801
+
802
+
803
+ array(
804
+ 'name' => '<span class="i-left font-bold" style="font-size:120%;">&#x21cc;</span><small>' . __( 'Tagline Position', 'weaver-xtreme' /*adm*/ ) . '</small>',
805
+ 'id' => 'tagline_xy',
806
+ 'type' => 'text_xy_percent',
807
+ 'info' => __( 'Adjust default left and top margins for Tagline. (Default: X: 10% Y:0%)', 'weaver-xtreme' /*adm*/ ),
808
+ ),
809
+ array(
810
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'Tagline Max Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
811
+ 'id' => 'tagline_max_w',
812
+ 'type' => 'val_percent',
813
+ 'info' => __( "Maximum width of Tagline in header area (Default: 90%)", 'weaver-xtreme' /*adm*/ ),
814
+ ),
815
+
816
+ array(
817
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Site Tagline', 'weaver-xtreme' /*adm*/ ) . '</small>',
818
+ 'id' => 'hide_site_tagline',
819
+ 'type' => 'select_hide',
820
+ 'info' => __( 'Hide Site Tagline (Uses "display:none;" : SEO friendly.)', 'weaver-xtreme' /*adm*/ ),
821
+ ),
822
+
823
+ array(
824
+ 'name' => __( 'Title/Tagline Area BG', 'weaver-xtreme' /*adm*/ ),
825
+ 'id' => 'title_tagline_bgcolor',
826
+ 'type' => 'ctext',
827
+ 'info' => __( 'BG Color for the Title, Tagline, Search, Logo/HTML and Mini-Menu area.', 'weaver-xtreme' /*adm*/ ),
828
+ ),
829
+
830
+
831
+ array(
832
+ 'name' => '<span class="i-left font-bold" style="font-size:120%;">&#x21cc;</span><small>' . __( 'Title/Tagline Padding', 'weaver-xtreme' /*adm*/ ) . '</small>',
833
+ 'id' => 'title_tagline_xy',
834
+ 'type' => 'text_tb',
835
+ 'info' => __( 'Add Top/Bottom Padding to the Site Title/Tagline block. This option is especially useful if the Header Image is a BG image. (Default: 0,0)', 'weaver-xtreme' /*adm*/ ),
836
+ ),
837
+
838
+
839
+ array(
840
+ 'name' => '<span class="i-left dashicons dashicons-editor-code"></span><small>' . __( 'Weaver Site Logo/HTML', 'weaver-xtreme' /*adm*/ ) . '</small>',
841
+ 'id' => '_site_logo',
842
+ 'type' => '+textarea',
843
+ 'info' => __( 'HTML for Site Title area. (example: &lt;img src="url" style="position:absolute;top:20px;left:20px;"&nbsp;/&gt; + Custom CSS: #site-logo{min-height:123px;} (This is not the WP Custom Logo!) (&starf;Plus) (&diams;)', 'weaver-xtreme' /*adm*/ ),
844
+ ),
845
+
846
+ array(
847
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Site Logo/HTML', 'weaver-xtreme' /*adm*/ ) . '</small>',
848
+ 'id' => '_hide_site_logo',
849
+ 'type' => '+select_hide',
850
+ 'info' => __( 'Hide Weaver Site Logo/HTML by device. (This is not the WP Custom Logo!) (&starf;Plus) (&diams;)', 'weaver-xtreme' /*adm*/ ),
851
+ ),
852
+
853
+ array(
854
+ 'name' => '<span class="i-left">{ }</span> <small>' . __( 'Add Classes', 'weaver-xtreme' /*adm*/ ) . '</small>',
855
+ 'id' => 'site_title_add_class',
856
+ 'type' => '+widetext',
857
+ 'info' => '<em>' . __( 'Title/Tagline', 'weaver-xtreme' /*adm*/ ) . '</em>' . __( ': Space separated class names to add to this area (<em>Advanced option</em>) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
858
+ ),
859
+
860
+
861
+ array( 'type' => 'submit' ),
862
+
863
+
864
+ array(
865
+ 'name' => __( 'The Header Mini-Menu', 'weaver-xtreme' /*adm*/ ),
866
+ 'id' => '-menu',
867
+ 'type' => 'subheader',
868
+ 'info' => __( 'Horizontal "Mini-Menu" displayed right-aligned of Site Tagline', 'weaver-xtreme' /*adm*/ ),
869
+ ),
870
+ array(
871
+ 'name' => __( 'Note:', 'weaver-xtreme' /*adm*/ ),
872
+ 'type' => 'note',
873
+ 'info' => __( 'The Header Mini-Menu options are on the Menu Tab.', 'weaver-xtreme' /*adm*/ ),
874
+ ),
875
+
876
+ array(
877
+ 'name' => __( 'Header Widget Area', 'weaver-xtreme' /*adm*/ ),
878
+ 'id' => 'header_sb',
879
+ 'type' => 'widget_area',
880
+ 'info' => __( 'Horizontal Header Widget Area', 'weaver-xtreme' /*adm*/ ),
881
+ ),
882
+
883
+ array( 'name' => __( 'Other Widget Area Options', 'weaver-xtreme' ), 'type' => 'break' ),
884
+
885
+ array(
886
+ 'name' => '<small>' . __( 'Header Widget Area Position', 'weaver-xtreme' /*adm*/ ) . '</small>',
887
+ 'id' => 'header_sb_position',
888
+ 'type' => '+select_id', //code
889
+ 'info' => __( 'Change where Header Widget Area is displayed. (Default: Top) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
890
+ 'value' => array(
891
+ array( 'val' => 'top', 'desc' => __( 'Top of Header', 'weaver-xtreme' /*adm*/ ) ),
892
+ array( 'val' => 'before_header', 'desc' => __( 'Before Header Image', 'weaver-xtreme' /*adm*/ ) ),
893
+ array( 'val' => 'after_header', 'desc' => __( 'After Header Image', 'weaver-xtreme' /*adm*/ ) ),
894
+ array( 'val' => 'after_html', 'desc' => __( 'After HTML Block', 'weaver-xtreme' /*adm*/ ) ),
895
+ array( 'val' => 'after_menu', 'desc' => __( 'After Lower Menu', 'weaver-xtreme' /*adm*/ ) ),
896
+ array( 'val' => 'pre_header', 'desc' => __( 'Pre-#header &lt;div&gt;', 'weaver-xtreme' /*adm*/ ) ),
897
+ array( 'val' => 'post_header', 'desc' => __( 'Post-#header &lt;div&gt;', 'weaver-xtreme' /*adm*/ ) ),
898
+ ),
899
+ ),
900
+
901
+ array(
902
+ 'name' => '<span class="i-left dashicons dashicons-editor-kitchensink"></span>' . __( 'Fixed-Top Header Widget Area', 'weaver-xtreme' /*adm*/ ),
903
+ 'id' => 'header_sb_fixedtop',
904
+ 'type' => 'checkbox',
905
+ 'info' => __( 'Fix the Header Widget Area to top of page. If primary/secondary menus also fixed-top, header widget area will always be after secondary and before primary. Use the <em>Expand/Extend BG Attributes</em> on the "Full Width" tab to make a full width Header Widget Area.', 'weaver-xtreme' /*adm*/ ),
906
+ ),
907
+
908
+ array( 'type' => 'submit' ),
909
+
910
+ array(
911
+ 'name' => __( 'Header HTML', 'weaver-xtreme' /*adm*/ ),
912
+ 'id' => 'header_html',
913
+ 'type' => 'widget_area',
914
+ __( 'Header Widget Area', 'weaver-xtreme' /*adm*/ ),
915
+ 'info' => __( 'Add arbitrary HTML to Header Area (in &lt;div id="header-html"&gt;)', 'weaver-xtreme' /*adm*/ ),
916
+ ),
917
+
918
+
919
+ array(
920
+ 'name' => '<span class="i-left dashicons dashicons-editor-code"></span>' . __( 'Header HTML content', 'weaver-xtreme' /*adm*/ ),
921
+ 'id' => 'header_html_text',
922
+ 'type' => 'textarea',
923
+ 'placeholder' => __( 'Any HTML, including shortcodes', 'weaver-xtreme' /*adm*/ ),
924
+ 'info' => __( 'Add arbitrary HTML to Header Area (in &lt;div id="header-html"&gt;)', 'weaver-xtreme' /*adm*/ ),
925
+ 'val' => 4,
926
+ ),
927
+
928
+ array( 'type' => 'submit' ),
929
+
930
+ array(
931
+ 'name' => __( 'Note:', 'weaver-xtreme' /*adm*/ ),
932
+ 'type' => 'note',
933
+ 'info' => __( 'There are more standard WordPress Header options available on the Dashboard Appearance->Header panel.', 'weaver-xtreme' /*adm*/ ),
934
+ ),
935
+ );
936
+
937
+ ?>
938
+ <div class="options-intro">
939
+ <?php _e( '<strong>Header:</strong> Options affecting the Header Area at the top of your site.', 'weaver-xtreme' /*adm*/ ); ?>
940
+ <br/>
941
+ <div class="options-intro-menu"><a href="#header-area"><?php _e( 'Header Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
942
+ <a href="#header-image"><?php _e( 'Header Image', 'weaver-xtreme' /*adm*/ ); ?></a> |
943
+ <a href="#header-video"><?php _e( 'Header Video', 'weaver-xtreme' /*adm*/ ); ?></a> |
944
+ <a href="#site-title-tagline"><?php _e( 'Site Title/Tagline', 'weaver-xtreme' /*adm*/ ); ?></a> |
945
+ <a href="#header-widget-area"><?php _e( 'Header Widget Area', 'weaver-xtreme' /*adm*/ ); ?></a>|
946
+ <a href="#header-html"><?php _e( 'Header HTML', 'weaver-xtreme' /*adm*/ ); ?></a>
947
+ </div>
948
+ </div>
949
+ <?php
950
+ weaverx_form_show_options( $opts );
951
+
952
+ do_action( 'weaverxplus_admin', 'header_opts' );
953
+ }
954
+
955
+ // ======================== Main Options > Menus ========================
956
+ function weaverx_mainopts_menus() {
957
+
958
+
959
+ $opts = array(
960
+ array( 'type' => 'submit' ),
961
+ array(
962
+ 'name' => __( 'Menu &amp; Info Bars', 'weaver-xtreme' /*adm*/ ),
963
+ 'id' => '-menu',
964
+ 'type' => 'header',
965
+ 'info' => __( 'Options affecting site Menus and the Info Bar', 'weaver-xtreme' /*adm*/ ),
966
+ 'help' => 'help.html#MenuBar',
967
+ ),
968
+
969
+
970
+ ##### SmartMenu
971
+ array(
972
+ 'name' => '<span class="i-left dashicons dashicons-menu"></span>' . __( 'Use SmartMenus', 'weaver-xtreme' /*adm*/ ),
973
+ 'id' => 'use_smartmenus',
974
+ 'type' => 'checkbox',
975
+ 'info' => __( 'Use <em>SmartMenus</em> rather than default Weaver Xtreme Menus. <em>SmartMenus</em> provide enhanced menu support, including auto-visibility, and transition effects. This option is recommended. There are additional <em>Smart Menu</em> options available on the <em>Appearance &rarr; +Xtreme Plus</em> menu.', 'weaver-xtreme' /*adm*/ ),
976
+ ),
977
+
978
+ array(
979
+ 'name' => '<small>' . __( 'Menu Mobile/Desktop Switch Point', 'weaver-xtreme' /*adm*/ ) . '</small>',
980
+ 'id' => 'mobile_alt_switch',
981
+ 'type' => '+val_px',
982
+ 'info' => __( '<em>SmartMenus Only:</em> Set when menu bars switch from desktop to mobile. (Default: 767px. Hint: use 768 to force mobile menu on iPad portrait.) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
983
+ ),
984
+
985
+ array(
986
+ 'name' => __( 'Mega Menus:', 'weaver-xtreme' /*adm*/ ),
987
+ 'type' => 'note',
988
+ 'info' => __( 'Weaver Xtreme Plus allows you to define Mega Menu style dropdown menu items with arbitrary HTML content. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
989
+ ),
990
+
991
+
992
+ array(
993
+ 'name' => __( 'Primary Menu Bar', 'weaver-xtreme' /*adm*/ ),
994
+ 'id' => 'm_primary',
995
+ 'type' => 'menu_opts',
996
+ 'info' => __( 'Attributes for the Primary Menu Bar (Default Location: Bottom of Header)', 'weaver-xtreme' /*adm*/ ),
997
+ ),
998
+
999
+ array( 'type' => 'submit' ),
1000
+
1001
+ array(
1002
+ 'name' => __( 'Secondary Menu Bar', 'weaver-xtreme' /*adm*/ ),
1003
+ 'id' => 'm_secondary',
1004
+ 'type' => 'menu_opts',
1005
+ 'info' => __( 'Attributes for the Secondary Menu Bar (Default Location: Top of Header)', 'weaver-xtreme' /*adm*/ ),
1006
+ ),
1007
+
1008
+ array( 'type' => 'submit' ),
1009
+
1010
+
1011
+ array(
1012
+ 'name' => __( 'Options: All Menus', 'weaver-xtreme' /*adm*/ ),
1013
+ 'id' => '-forms',
1014
+ 'type' => 'subheader_alt',
1015
+ 'info' => __( 'Menu Bar enhancements and features', 'weaver-xtreme' /*adm*/ ),
1016
+ ),
1017
+
1018
+
1019
+ array(
1020
+ 'name' => __( 'Current Page BG', 'weaver-xtreme' /*adm*/ ),
1021
+ 'id' => 'menubar_curpage_bgcolor',
1022
+ 'type' => 'ctext',
1023
+ 'info' => __( 'BG Color for the currently displayed page and its ancestors.', 'weaver-xtreme' /*adm*/ ),
1024
+ ),
1025
+ array(
1026
+ 'name' => __( 'Current Page Text', 'weaver-xtreme' /*adm*/ ),
1027
+ 'id' => 'menubar_curpage_color',
1028
+ 'type' => 'color',
1029
+ 'info' => __( 'Color for the currently displayed page and its ancestors.', 'weaver-xtreme' /*adm*/ ),
1030
+ ),
1031
+
1032
+
1033
+ array(
1034
+ 'name' => '<span class="i-left dashicons dashicons-editor-bold"></span><small>' . __( 'Bold Current Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
1035
+ 'id' => 'menubar_curpage_bold',
1036
+ 'type' => 'checkbox',
1037
+ 'info' => __( 'Bold Face Current Page and ancestors', 'weaver-xtreme' /*adm*/ ),
1038
+ ),
1039
+ array(
1040
+ 'name' => '<span class="i-left dashicons dashicons-editor-italic"></span><small>' . __( 'Italic Current Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
1041
+ 'id' => 'menubar_curpage_em',
1042
+ 'type' => 'checkbox',
1043
+ 'info' => __( 'Italic Current Page and ancestors', 'weaver-xtreme' /*adm*/ ),
1044
+ ),
1045
+ array(
1046
+ 'name' => '<small>' . __( 'Do Not Highlight Ancestors', 'weaver-xtreme' /*adm*/ ) . '</small>',
1047
+ 'id' => 'menubar_curpage_noancestors',
1048
+ 'type' => 'checkbox',
1049
+ 'info' => __( 'Highlight Current Page only - do not also highlight ancestor items', 'weaver-xtreme' /*adm*/ ),
1050
+ ),
1051
+ array(
1052
+ 'name' => '<small>' . __( 'Retain Menu Bar Hover BG', 'weaver-xtreme' /*adm*/ ) . '</small>',
1053
+ 'id' => 'm_retain_hover',
1054
+ 'type' => 'checkbox',
1055
+ 'info' => __( 'Retain the menu bar hover BG color when sub-menus are opened.', 'weaver-xtreme' /*adm*/ ),
1056
+ ),
1057
+
1058
+
1059
+ array(
1060
+ 'name' => '<small>' . __( 'Placeholder Hover Cursor', 'weaver-xtreme' /*adm*/ ) . '</small>',
1061
+ 'id' => 'placeholder_cursor',
1062
+ 'type' => 'select_id', //code
1063
+ 'info' => __( 'CSS cursor :hover attribute for placeholder menus (e.g., Custom Menus with URL==#). (Default: pointer)', 'weaver-xtreme' /*adm*/ ),
1064
+ 'value' => array(
1065
+ array( 'val' => 'pointer', 'desc' => __( 'Pointer (indicates link)', 'weaver-xtreme' /*adm*/ ) ),
1066
+ array( 'val' => 'context-menu', 'desc' => __( 'Context Menu available', 'weaver-xtreme' /*adm*/ ) ),
1067
+ array( 'val' => 'text', 'desc' => __( 'Text', 'weaver-xtreme' /*adm*/ ) ),
1068
+ array( 'val' => 'none', 'desc' => __( 'No pointer', 'weaver-xtreme' /*adm*/ ) ),
1069
+ array( 'val' => 'not-allowed', 'desc' => __( 'Action not allowed', 'weaver-xtreme' /*adm*/ ) ),
1070
+ array( 'val' => 'default', 'desc' => __( 'The default cursor', 'weaver-xtreme' /*adm*/ ) ),
1071
+ ),
1072
+ ),
1073
+
1074
+
1075
+ array(
1076
+ 'name' => '<small>' . __( 'Mobile Menu "Hamburger" Label', 'weaver-xtreme' /*adm*/ ) . '</small>',
1077
+ 'id' => 'mobile_alt_label',
1078
+ 'type' => 'widetext',
1079
+ 'info' => __( 'Alternative label for the default mobile "Hamburger" icon. HTML allowed: &lt;span&gt; or &lt;img&gt; suggested.', 'weaver-xtreme' /*adm*/ ),
1080
+ ),
1081
+
1082
+
1083
+ array( 'type' => 'submit' ),
1084
+
1085
+ array(
1086
+ 'name' => __( 'Header Mini-Menu', 'weaver-xtreme' /*adm*/ ),
1087
+ 'id' => '-menu',
1088
+ 'type' => 'subheader_alt',
1089
+ 'info' => __( 'Horizontal "Mini-Menu" displayed right-aligned of Site Tagline', 'weaver-xtreme' /*adm*/ ),
1090
+ ),
1091
+
1092
+
1093
+ array(
1094
+ 'name' => __( 'Mini-Menu', 'weaver-xtreme' /*adm*/ ),
1095
+ 'id' => 'm_header_mini',
1096
+ 'type' => 'titles_text',
1097
+ 'info' => __( 'Color of Mini-Menu Link Items', 'weaver-xtreme' /*adm*/ ),
1098
+ ),
1099
+
1100
+ array(
1101
+ 'name' => '<small>' . __( 'Mini Menu Hover', 'weaver-xtreme' /*adm*/ ) . '</small>',
1102
+ 'id' => 'm_header_mini_hover_color',
1103
+ 'type' => 'ctext',
1104
+ 'info' => __( 'Hover Color for Mini-Menu Links', 'weaver-xtreme' /*adm*/ ),
1105
+ ),
1106
+
1107
+ array(
1108
+ 'name' => '<span class="i-left dashicons dashicons-align-none"></span><small>' . __( 'Mini Menu Top Margin', 'weaver-xtreme' /*adm*/ ) . '</small>',
1109
+ 'id' => 'm_header_mini_top_margin_dec',
1110
+ 'type' => 'val_em',
1111
+ 'info' => __( 'Top margin for Mini-Menu. Negative value moves it up. (Default: 0em)', 'weaver-xtreme' /*adm*/ ),
1112
+ ),
1113
+
1114
+ array(
1115
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Mini Menu', 'weaver-xtreme' /*adm*/ ) . '</small>',
1116
+ 'id' => 'm_header_mini_hide',
1117
+ 'type' => 'select_hide',
1118
+ 'info' => __( 'Hide Mini Menu', 'weaver-xtreme' /*adm*/ ),
1119
+ ),
1120
+
1121
+
1122
+ array( 'type' => 'submit' ),
1123
+
1124
+
1125
+ array(
1126
+ 'name' => __( 'Info Bar', 'weaver-xtreme' /*adm*/ ),
1127
+ 'id' => 'infobar',
1128
+ 'type' => 'widget_area',
1129
+ 'info' => __( 'Info Bar : Breadcrumbs & Page Nav below primary menu', 'weaver-xtreme' /*adm*/ ),
1130
+ ),
1131
+
1132
+
1133
+ array(
1134
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Hide Breadcrumbs', 'weaver-xtreme' /*adm*/ ),
1135
+ 'id' => 'info_hide_breadcrumbs',
1136
+ 'type' => 'checkbox',
1137
+ 'info' => __( 'Do not display the Breadcrumbs', 'weaver-xtreme' /*adm*/ ),
1138
+ ),
1139
+ array(
1140
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Hide Page Navigation', 'weaver-xtreme' /*adm*/ ),
1141
+ 'id' => 'info_hide_pagenav',
1142
+ 'type' => 'checkbox',
1143
+ 'info' => __( 'Do not display the numbered Page navigation', 'weaver-xtreme' /*adm*/ ),
1144
+ ),
1145
+ array(
1146
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Show Search box', 'weaver-xtreme' /*adm*/ ),
1147
+ 'id' => 'info_search',
1148
+ 'type' => 'checkbox',
1149
+ 'info' => __( 'Include a Search box on the right', 'weaver-xtreme' /*adm*/ ),
1150
+ ),
1151
+ array(
1152
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Show Log In', 'weaver-xtreme' /*adm*/ ),
1153
+ 'id' => 'info_addlogin',
1154
+ 'type' => 'checkbox',
1155
+ 'info' => __( 'Include a simple Log In link on the right', 'weaver-xtreme' /*adm*/ ),
1156
+ ),
1157
+
1158
+ array(
1159
+ 'name' => __( 'Breadcrumb for Home', 'weaver-xtreme' /*adm*/ ),
1160
+ 'id' => 'info_home_label',
1161
+ 'type' => 'widetext', //code - option done in code
1162
+ 'info' => __( 'This lets you change the breadcrumb label for your home page. (Default: Home)', 'weaver-xtreme' /*adm*/ ),
1163
+ ),
1164
+ array(
1165
+ 'name' => __( 'Info Bar Links', 'weaver-xtreme' /*adm*/ ),
1166
+ 'id' => 'ibarlink',
1167
+ 'type' => 'link',
1168
+ 'info' => __( 'Color for links in Info Bar (uses Standard Link colors if left blank)', 'weaver-xtreme' /*adm*/ ),
1169
+ ),
1170
+ );
1171
+
1172
+ ?>
1173
+ <div class="options-intro">
1174
+ <?php _e( '<strong>Menus:</strong> Options to control how your menus look.', 'weaver-xtreme' /*adm*/ ); ?><br/>
1175
+ <div class="options-intro-menu">
1176
+ <a href="#primary-menu-bar"><?php _e( 'Primary Menu Bar', 'weaver-xtreme' /*adm*/ ); ?></a> |
1177
+ <a href="#secondary-menu-bar"><?php _e( 'Secondary Menu Bar', 'weaver-xtreme' /*adm*/ ); ?></a> |
1178
+ <a href="#options-all-menus"><?php _e( 'Options: All Menus', 'weaver-xtreme' /*adm*/ ); ?></a> |
1179
+ <a href="#header-mini-menu"><?php _e( 'Header Mini-Menu', 'weaver-xtreme' /*adm*/ ); ?></a> |
1180
+ <a href="#info-bar"><?php _e( 'Info Bar', 'weaver-xtreme' /*adm*/ ); ?></a> |
1181
+ <a href="#extra-menu"><?php _e( 'Extra Menu (X-Plus)', 'weaver-xtreme' /*adm*/ ); ?></a>
1182
+ </div>
1183
+ </div>
1184
+ <?php
1185
+
1186
+ $all_opts = apply_filters( 'weaverxplus_menu_inject', $opts );
1187
+
1188
+ weaverx_form_show_options( $all_opts );
1189
+
1190
+ }
1191
+
1192
+
1193
+ // ======================== Main Options > Content Areas ========================
1194
+ function weaverx_mainopts_content() {
1195
+ $opts = array(
1196
+ array( 'type' => 'submit' ),
1197
+ array(
1198
+ 'name' => __( 'Content Areas', 'weaver-xtreme' /*adm*/ ),
1199
+ 'id' => '-admin-page',
1200
+ 'type' => 'header',
1201
+ 'info' => __( 'Settings for the content areas (posts and pages)', 'weaver-xtreme' /*adm*/ ),
1202
+ 'toggle' => 'content-areas',
1203
+ 'help' => 'help.html#ContentAreas',
1204
+ ),
1205
+
1206
+ array(
1207
+ 'name' => __( 'Content Area', 'weaver-xtreme' /*adm*/ ),
1208
+ 'id' => 'content',
1209
+ 'type' => 'widget_area',
1210
+ 'info' => __( 'Area properties for page and post content', 'weaver-xtreme' /*adm*/ ),
1211
+ ),
1212
+
1213
+ array(
1214
+ 'name' => __( 'Page Title', 'weaver-xtreme' /*adm*/ ),
1215
+ 'id' => 'page_title',
1216
+ 'type' => 'titles',
1217
+ 'info' => __( 'Page titles, including pages, post single pages, and archive-like pages.', 'weaver-xtreme' /*adm*/ ),
1218
+ ),
1219
+ array(
1220
+ 'name' => '<small>' . __( 'Bar under Title', 'weaver-xtreme' /*adm*/ ) . '</small>',
1221
+ 'id' => 'page_title_underline_int',
1222
+ 'type' => 'val_px',
1223
+ 'info' => __( 'Enter size in px if you want a bar under page title. Leave blank or 0 for no bar.', 'weaver-xtreme' /*adm*/ ),
1224
+ ),
1225
+ array(
1226
+ 'name' => '<small>' . __( 'Space Between Title and Content', 'weaver-xtreme' /*adm*/ ) . '</small>',
1227
+ 'id' => 'space_after_title_dec',
1228
+ 'type' => 'val_em',
1229
+ 'info' => __( 'Space between Page or Post title and beginning of content (Default: 1.0em)', 'weaver-xtreme' /*adm*/ ),
1230
+ ),
1231
+
1232
+ array(
1233
+ 'name' => __( 'Archive Pages Title Text', 'weaver-xtreme' /*adm*/ ),
1234
+ 'id' => 'archive_title',
1235
+ 'type' => 'titles',
1236
+ 'info' => __( 'Archive-like page titles: archives, categories, tags, searches.', 'weaver-xtreme' /*adm*/ ),
1237
+ ),
1238
+
1239
+ array(
1240
+ 'name' => __( 'Content Links', 'weaver-xtreme' /*adm*/ ),
1241
+ 'id' => 'contentlink',
1242
+ 'type' => 'link',
1243
+ 'info' => __( 'Color for links in Content', 'weaver-xtreme' /*adm*/ ),
1244
+ ),
1245
+
1246
+ array(
1247
+ 'name' => __( 'Content Headings', 'weaver-xtreme' /*adm*/ ),
1248
+ 'id' => 'content_h',
1249
+ 'type' => '+titles',
1250
+ 'info' => __( 'Headings (&lt;h1&gt;-&lt;h6&gt;) in page and post content (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1251
+ ),
1252
+
1253
+ array( 'type' => 'submit' ),
1254
+
1255
+ array(
1256
+ 'name' => __( 'Text', 'weaver-xtreme' /*adm*/ ),
1257
+ 'id' => '-text',
1258
+ 'type' => 'subheader_alt',
1259
+ 'info' => __( 'Text related options', 'weaver-xtreme' /*adm*/ ),
1260
+ ),
1261
+
1262
+ array(
1263
+ 'name' => '<small>' . __( 'Space after paragraphs and lists', 'weaver-xtreme' /*adm*/ ) . '</small>',
1264
+ 'id' => 'content_p_list_dec',
1265
+ 'type' => 'val_em',
1266
+ 'info' => __( 'Space after paragraphs and lists (Recommended: 1.5 em)', 'weaver-xtreme' /*adm*/ ),
1267
+ ),
1268
+
1269
+ array(
1270
+ 'name' => '<small>' . __( 'Page/Post Editor BG', 'weaver-xtreme' /*adm*/ ) . '</small>',
1271
+ 'id' => 'editor_bgcolor',
1272
+ 'type' => 'ctext',
1273
+ 'info' => __( 'Alternative Background Color to use for Page/Post editor if you\'re using transparent or image backgrounds.', 'weaver-xtreme' /*adm*/ ),
1274
+ ),
1275
+
1276
+ array(
1277
+ 'name' => '<small>' . __( 'Input Area BG', 'weaver-xtreme' /*adm*/ ) . '</small>',
1278
+ 'id' => 'input_bgcolor',
1279
+ 'type' => 'ctext',
1280
+ 'info' => __( 'Background color for text input (textareas) boxes.', 'weaver-xtreme' /*adm*/ ),
1281
+ ),
1282
+ array(
1283
+ 'name' => '<small>' . __( 'Input Area Text', 'weaver-xtreme' /*adm*/ ) . '</small>',
1284
+ 'id' => 'input_color',
1285
+ 'type' => 'color',
1286
+ 'info' => __( 'Text color for text input (textareas) boxes.', 'weaver-xtreme' /*adm*/ ),
1287
+ ),
1288
+
1289
+ array(
1290
+ 'name' => '<small>' . __( 'Auto Hyphenation', 'weaver-xtreme' /*adm*/ ) . '</small>',
1291
+ 'id' => 'hyphenate',
1292
+ 'type' => 'checkbox',
1293
+ 'info' => __( 'Allow browsers to automatically hyphenate text for appearance.', 'weaver-xtreme' /*adm*/ ),
1294
+ ),
1295
+
1296
+ array(
1297
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span>' . __( 'Columns', 'weaver-xtreme' /*adm*/ ),
1298
+ 'id' => 'page_cols',
1299
+ 'type' => 'select_id', //code
1300
+ 'info' => __( 'Automatically split all page content into columns using CSS column rules. Also can use Per Page option. (Always 1 column on IE&lt;=9.)', 'weaver-xtreme' /*adm*/ ),
1301
+ 'value' => array(
1302
+ array( 'val' => '1', 'desc' => __( '1 Column', 'weaver-xtreme' /*adm*/ ) ),
1303
+ array( 'val' => '2', 'desc' => __( '2 Columns', 'weaver-xtreme' /*adm*/ ) ),
1304
+ array( 'val' => '3', 'desc' => __( '3 Columns', 'weaver-xtreme' /*adm*/ ) ),
1305
+ array( 'val' => '4', 'desc' => __( '4 Columns', 'weaver-xtreme' /*adm*/ ) ),
1306
+ ),
1307
+ ),
1308
+
1309
+
1310
+ array(
1311
+ 'name' => __( 'Search Boxes', 'weaver-xtreme' /*adm*/ ),
1312
+ 'id' => '-search',
1313
+ 'type' => 'subheader_alt',
1314
+ 'info' => __( 'Search box related options', 'weaver-xtreme' /*adm*/ ),
1315
+ ),
1316
+
1317
+ array(
1318
+ 'name' => '<small>' . __( 'Search Input BG', 'weaver-xtreme' /*adm*/ ) . '</small>',
1319
+ 'id' => 'search_bgcolor',
1320
+ 'type' => 'ctext',
1321
+ 'info' => __( 'Background color for all search input boxes.', 'weaver-xtreme' /*adm*/ ),
1322
+ ),
1323
+ array(
1324
+ 'name' => '<small>' . __( 'Search Input Text', 'weaver-xtreme' /*adm*/ ) . '</small>',
1325
+ 'id' => 'search_color',
1326
+ 'type' => 'color',
1327
+ 'info' => __( 'Text color for all search input boxes.', 'weaver-xtreme' /*adm*/ ),
1328
+ ),
1329
+
1330
+ array(
1331
+ 'name' => __( 'Search Icon Color:', 'weaver-xtreme' /*adm*/ ),
1332
+ 'info' => __( 'The Search Icon colored graphics used by previous versions of Weaver Xtreme have been discontinued. A text icon is now used. The color of the search icon is inherited from wrapping areas text color, including the header area and menu bar.', 'weaver-xtreme' /*adm*/ ),
1333
+ 'type' => 'note',
1334
+ ),
1335
+
1336
+
1337
+ array( 'type' => 'submit' ),
1338
+ array(
1339
+ 'name' => __( 'Images', 'weaver-xtreme' /*adm*/ ),
1340
+ 'id' => '-format-image',
1341
+ 'type' => 'subheader_alt',
1342
+ 'info' => __( 'Image related options', 'weaver-xtreme' /*adm*/ ),
1343
+ ),
1344
+ array(
1345
+ 'name' => '<small>' . __( 'Image Border Color', 'weaver-xtreme' /*adm*/ ) . '</small>',
1346
+ 'id' => 'media_lib_border_color',
1347
+ 'type' => 'ctext',
1348
+ 'info' => __( 'Border color for images in Container and Footer.', 'weaver-xtreme' /*adm*/ ),
1349
+ ),
1350
+ array(
1351
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'Image Border Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
1352
+ 'id' => 'media_lib_border_int',
1353
+ 'type' => 'val_px',
1354
+ 'info' => __( 'Border width for images in Container and Footer. (Leave blank or set to 0 for no image borders.)', 'weaver-xtreme' /*adm*/ ),
1355
+ ),
1356
+
1357
+ array(
1358
+ 'name' => '<span class="i-left dashicons dashicons-admin-page"></span><small>' . __( 'Show Image Shadows', 'weaver-xtreme' /*adm*/ ) . '</small>',
1359
+ 'id' => 'show_img_shadows',
1360
+ 'type' => 'checkbox',
1361
+ 'info' => __( 'Add a shadow to images in Container and Footer. Add CSS+ to Border Color for custom shadow.', 'weaver-xtreme' /*adm*/ ),
1362
+ ),
1363
+
1364
+ array(
1365
+ 'name' => '<small>' . __( 'Restrict Borders to Media Library', 'weaver-xtreme' /*adm*/ ) . '</small>',
1366
+ 'id' => 'restrict_img_border',
1367
+ 'type' => 'checkbox',
1368
+ 'info' => __( 'For Container and Footer, restrict border and shadows to images from Media Library. Manually entered &lt;img&gt; HTML without Media Library classes will not have borders.', 'weaver-xtreme' /*adm*/ ),
1369
+ ),
1370
+
1371
+ array(
1372
+ 'name' => '<small>' . __( 'Caption text color', 'weaver-xtreme' /*adm*/ ) . '</small>',
1373
+ 'id' => 'caption_color',
1374
+ 'type' => 'ctext',
1375
+ 'info' => __( 'Color of captions - e.g., below media images.', 'weaver-xtreme' /*adm*/ ),
1376
+ ),
1377
+
1378
+ array(
1379
+ 'name' => __( 'Featured Image - Pages', 'weaver-xtreme' /*adm*/ ),
1380
+ 'id' => '-id',
1381
+ 'type' => 'subheader_alt',
1382
+ 'info' => __( 'Display of Page Featured Images', 'weaver-xtreme' /*adm*/ ),
1383
+ ),
1384
+ array(
1385
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#10538;</span>' . __( 'Featured Image Location', 'weaver-xtreme' /*adm*/ ),
1386
+ 'id' => 'page_fi_location',
1387
+ 'type' => 'fi_location',
1388
+ 'info' => __( 'Where to display Featured Image for Pages', 'weaver-xtreme' /*adm*/ ),
1389
+ ),
1390
+ array(
1391
+ 'name' => __( 'Full Width FI BG Image:', 'weaver-xtreme' /*adm*/ ),
1392
+ 'info' => __( 'To create full width Page BG images from the FI, check the <em>Container Area Extend BG Attributes</em> box on the <em>Full Width</em> tab.', 'weaver-xtreme' /*adm*/ ),
1393
+ 'type' => 'note',
1394
+ ),
1395
+ array(
1396
+ 'name' => __( 'Parallax FI BG Image:', 'weaver-xtreme' /*adm*/ ),
1397
+ 'info' => __( 'It will usually be more useful to use the Per Page FI option to specify Parallax BG images.', 'weaver-xtreme' /*adm*/ ),
1398
+ 'type' => 'note',
1399
+ ),
1400
+ array(
1401
+ 'name' => '<small>' . __( 'Page Content Height', 'weaver-xtreme' /*adm*/ ) . '</small>',
1402
+ 'id' => 'page_min_height',
1403
+ 'type' => '+val_px',
1404
+ 'info' => __( 'Minimum Height Page Content with Parallax BG. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1405
+ ),
1406
+
1407
+
1408
+ array(
1409
+ 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'Featured Image Alignment', 'weaver-xtreme' /*adm*/ ) . '</small>',
1410
+ 'id' => 'page_fi_align',
1411
+ 'type' => 'fi_align',
1412
+ 'info' => __( 'How to align the Featured Image', 'weaver-xtreme' /*adm*/ ),
1413
+ ),
1414
+
1415
+ array(
1416
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Featured Image on Pages', 'weaver-xtreme' /*adm*/ ) . '</small>',
1417
+ 'id' => 'page_fi_hide',
1418
+ 'type' => 'select_hide',
1419
+ 'info' => __( 'Where to hide Featured Images on Pages (Posts have their own setting.)', 'weaver-xtreme' /*adm*/ ),
1420
+ ),
1421
+
1422
+ array(
1423
+ 'name' => '<small>' . __( 'Page Featured Image Size', 'weaver-xtreme' /*adm*/ ) . '</small>',
1424
+ 'id' => 'page_fi_size',
1425
+ 'type' => 'select_id',
1426
+ 'info' => __( 'Media Library Image Size for Featured Image on pages. (Header uses full size).', 'weaver-xtreme' /*adm*/ ),
1427
+ 'value' => array(
1428
+ array( 'val' => 'thumbnail', 'desc' => __( 'Thumbnail', 'weaver-xtreme' /*adm*/ ) ),
1429
+ array( 'val' => 'medium', 'desc' => __( 'Medium', 'weaver-xtreme' /*adm*/ ) ),
1430
+ array( 'val' => 'large', 'desc' => __( 'Large', 'weaver-xtreme' /*adm*/ ) ),
1431
+ array( 'val' => 'full', 'desc' => __( 'Full', 'weaver-xtreme' /*adm*/ ) ),
1432
+ ),
1433
+ ),
1434
+ array(
1435
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'Featured Image Width, Pages', 'weaver-xtreme' /*adm*/ ) . '</small>',
1436
+ 'id' => 'page_fi_width',
1437
+ 'type' => '+val_percent',
1438
+ 'info' => __( 'Width of Featured Image on Pages. Max Width in %, overrides FI Size selection. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1439
+ ),
1440
+ array(
1441
+ 'name' => '<small>' . __( "Don't add link to FI", 'weaver-xtreme' /*adm*/ ) . '</small>',
1442
+ 'id' => 'page_fi_nolink',
1443
+ 'type' => '+checkbox',
1444
+ 'info' => __( 'Do not add link to Featured Image. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1445
+ ),
1446
+
1447
+
1448
+ array(
1449
+ 'name' => __( 'Lists - &lt;HR&gt; - Tables', 'weaver-xtreme' /*adm*/ ),
1450
+ 'id' => '-list-view',
1451
+ 'type' => 'subheader_alt',
1452
+ 'info' => __( 'Other options related to content', 'weaver-xtreme' /*adm*/ ),
1453
+ ),
1454
+ array(
1455
+ 'name' => __( 'Content List Bullet', 'weaver-xtreme' /*adm*/ ),
1456
+ 'id' => 'contentlist_bullet',
1457
+ 'type' => 'select_id',
1458
+ 'info' => __( 'Bullet used for Unordered Lists in Content areas', 'weaver-xtreme' /*adm*/ ),
1459
+ 'value' => array(
1460
+ array( 'val' => 'disc', 'desc' => __( 'Filled Disc', 'weaver-xtreme' /*adm*/ ) ),
1461
+ array( 'val' => 'circle', 'desc' => __( 'Circle', 'weaver-xtreme' /*adm*/ ) ),
1462
+ array( 'val' => 'square', 'desc' => __( 'Square', 'weaver-xtreme' /*adm*/ ) ),
1463
+ array( 'val' => 'none', 'desc' => __( 'None', 'weaver-xtreme' /*adm*/ ) ),
1464
+ ),
1465
+ ),
1466
+
1467
+ array(
1468
+ 'name' => __( '&lt;HR&gt; color', 'weaver-xtreme' /*adm*/ ),
1469
+ 'id' => 'hr_color',
1470
+ 'type' => 'ctext',
1471
+ 'info' => __( 'Color of horizontal (&lt;hr&gt;) lines in posts and pages.', 'weaver-xtreme' /*adm*/ ),
1472
+ ),
1473
+
1474
+ array(
1475
+ 'name' => __( 'Table Style', 'weaver-xtreme' /*adm*/ ),
1476
+ 'id' => 'weaverx_tables',
1477
+ 'type' => 'select_id',
1478
+ 'info' => __( 'Style used for tables in content.', 'weaver-xtreme' /*adm*/ ),
1479
+ 'value' => array(
1480
+ array( 'val' => 'default', 'desc' => __( 'Theme Default', 'weaver-xtreme' /*adm*/ ) ),
1481
+ array( 'val' => 'bold', 'desc' => __( 'Bold Headings', 'weaver-xtreme' /*adm*/ ) ),
1482
+ array( 'val' => 'noborders', 'desc' => __( 'No Borders', 'weaver-xtreme' /*adm*/ ) ),
1483
+ array( 'val' => 'fullwidth', 'desc' => __( 'Wide', 'weaver-xtreme' /*adm*/ ) ),
1484
+ array( 'val' => 'wide', 'desc' => __( 'Wide 2', 'weaver-xtreme' /*adm*/ ) ),
1485
+ array( 'val' => 'plain', 'desc' => __( 'Minimal', 'weaver-xtreme' /*adm*/ ) ),
1486
+ ),
1487
+ ),
1488
+
1489
+ array(
1490
+ 'name' => __( 'Comments', 'weaver-xtreme' /*adm*/ ),
1491
+ 'id' => '-admin-comments',
1492
+ 'type' => 'subheader',
1493
+ 'info' => __( 'Settings for displaying comments', 'weaver-xtreme' /*adm*/ ),
1494
+ ),
1495
+ array(
1496
+ 'name' => __( 'Comment Headings', 'weaver-xtreme' /*adm*/ ),
1497
+ 'id' => 'comment_headings_color',
1498
+ 'type' => 'ctext',
1499
+ 'info' => __( 'Color for various headings in comment form', 'weaver-xtreme' /*adm*/ ),
1500
+ ),
1501
+ array(
1502
+ 'name' => __( 'Comment Content BG', 'weaver-xtreme' /*adm*/ ),
1503
+ 'id' => 'comment_content_bgcolor',
1504
+ 'type' => 'ctext',
1505
+ 'info' => __( 'BG Color of Comment Content area', 'weaver-xtreme' /*adm*/ ),
1506
+ ),
1507
+ array(
1508
+ 'name' => __( 'Comment Submit Button BG', 'weaver-xtreme' /*adm*/ ),
1509
+ 'id' => 'comment_submit_bgcolor',
1510
+ 'type' => 'ctext',
1511
+ 'info' => __( 'BG Color of "Post Comment" submit button', 'weaver-xtreme' /*adm*/ ),
1512
+ ),
1513
+ array(
1514
+ 'name' => '<span class="i-left" style="font-size:200%;margin-left:4px;">&#x25a1;</span><small>' . __( 'Show Borders on Comments', 'weaver-xtreme' /*adm*/ ) . '</small>',
1515
+ 'id' => 'show_comment_borders',
1516
+ 'type' => 'checkbox',
1517
+ 'info' => __( 'Show Borders around comment sections - improves visual look of comments.', 'weaver-xtreme' /*adm*/ ),
1518
+ ),
1519
+
1520
+ array(
1521
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Old Comments When Closed', 'weaver-xtreme' /*adm*/ ) . '</small>',
1522
+ 'id' => 'hide_old_comments',
1523
+ 'type' => '+checkbox',
1524
+ 'info' => __( 'Hide previous comments after closing comments for page or post. (Default: show old comments after closing.) (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1525
+ ),
1526
+ array(
1527
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . '<small>' . __( 'Show Allowed HTML', 'weaver-xtreme' /*adm*/ ) . '</small>',
1528
+ 'id' => 'form_allowed_tags',
1529
+ 'type' => '+checkbox',
1530
+ 'info' => __( 'Show the allowed HTML tags below comment input box (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1531
+ ),
1532
+ array(
1533
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><span class="dashicons dashicons-admin-comments"></span>' .
1534
+ '<small>' . __( 'Hide Comment Title Icon', 'weaver-xtreme' /*adm*/ ) . '</small>',
1535
+ 'id' => 'hide_comment_bubble',
1536
+ 'type' => '+checkbox',
1537
+ 'info' => __( 'Hide the comment icon before the Comments title (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1538
+ ),
1539
+ array(
1540
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Separator Above Comments', 'weaver-xtreme' /*adm*/ ) . '</small>',
1541
+ 'id' => 'hide_comment_hr',
1542
+ 'type' => '+checkbox',
1543
+ 'info' => __( 'Hide the (&lt;hr&gt;) separator line above the Comments area (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1544
+ ),
1545
+ );
1546
+
1547
+ ?>
1548
+ <div class="options-intro">
1549
+ <?php _e( '<strong>Content Areas:</strong> Includes options common to both <em>Pages</em> and <em>Posts</em>. Options for <strong>Text</strong>,
1550
+ <strong>Padding</strong>, <strong>Images</strong>, <strong>Lists &amp; Tables</strong>, and user <strong>Comments</strong>.', 'weaver-xtreme' /*adm*/ ); ?><br/>
1551
+ <div class="options-intro-menu">
1552
+ <a href="#content-area"><?php _e( 'Content Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
1553
+ <a href="#text"><?php _e( 'Text', 'weaver-xtreme' /*adm*/ ); ?></a> |
1554
+ <a href="#search-boxes"><?php _e( 'Search Boxes', 'weaver-xtreme' /*adm*/ ); ?></a> |
1555
+ <a href="#images"><?php _e( 'Images', 'weaver-xtreme' /*adm*/ ); ?></a> |
1556
+ <a href="#featured-image-pages"><?php _e( 'Featured Image - Pages', 'weaver-xtreme' /*adm*/ ); ?></a> |
1557
+ <a href="#lists-hr-tables"><?php _e( 'Lists - &lt;HR&gt; - Tables', 'weaver-xtreme' /*adm*/ ); ?></a> |
1558
+ <a href="#comments"><?php _e( 'Comments', 'weaver-xtreme' /*adm*/ ); ?></a>
1559
+ </div>
1560
+ </div>
1561
+ <?php
1562
+ weaverx_form_show_options( $opts );
1563
+ do_action( 'weaverxplus_admin', 'content_areas' );
1564
+ ?>
1565
+ <span style="color:green;"><b><?php _e( 'Hiding/Enabling Page and Post Comments', 'weaver-xtreme' /*adm*/ ); ?></b></span>
1566
+ <?php
1567
+ weaverx_help_link( 'help.html#LeavingComments', __( 'Help for Leaving Comments', 'weaver-xtreme' /*adm*/ ) );
1568
+ ?>
1569
+ <p>
1570
+ <?php _e( 'Controlling "Reply/Leave a Comment" visibility for pages and posts is <strong>not</strong> a theme function.
1571
+ It is controlled by WordPress settings.
1572
+ Please click the ? just above to see the help file entry!', 'weaver-xtreme' /*adm*/ ); ?>
1573
+ </p>
1574
+ <?php
1575
+ }
1576
+
1577
+ // ======================== Main Options > Post Specifics ========================
1578
+ function weaverx_mainopts_posts() {
1579
+ $opts = array(
1580
+ array( 'type' => 'submit' ),
1581
+ array(
1582
+ 'name' => __( 'Post Specifics', 'weaver-xtreme' /*adm*/ ),
1583
+ 'id' => '-admin-post',
1584
+ 'type' => 'header',
1585
+ 'info' => __( 'Settings affecting Posts', 'weaver-xtreme' /*adm*/ ),
1586
+ 'help' => 'help.html#PPSpecifics',
1587
+ ),
1588
+
1589
+ array(
1590
+ 'name' => __( 'Post Area', 'weaver-xtreme' /*adm*/ ),
1591
+ 'id' => 'post',
1592
+ 'type' => 'widget_area',
1593
+ 'info' => __( 'Use these settings to override Content Area settings for Posts (blog entries).', 'weaver-xtreme' /*adm*/ ),
1594
+ ),
1595
+
1596
+ array(
1597
+ 'name' => __( 'Sticky Post BG', 'weaver-xtreme' /*adm*/ ),
1598
+ 'id' => 'stickypost_bgcolor',
1599
+ 'type' => 'ctext',
1600
+ 'info' => __( 'BG color for sticky posts, author info. (Add {border:none;padding:0;} to CSS to make sticky posts same as regular posts.)', 'weaver-xtreme' /*adm*/ ),
1601
+ ),
1602
+
1603
+ array(
1604
+ 'name' => '<small>' . __( 'Reset Major Content Options', 'weaver-xtreme' /*adm*/ ) . '</small>',
1605
+ 'id' => 'reset_content_opts',
1606
+ 'type' => 'checkbox',
1607
+ 'info' => __( 'Clear wrapping Content Area bg, borders, padding, and top/bottom margins for views with posts. Allows more flexible post settings.', 'weaver-xtreme' /*adm*/ ),
1608
+ ),
1609
+
1610
+
1611
+ array( 'type' => 'submit' ),
1612
+
1613
+
1614
+ array(
1615
+ 'name' => __( 'Post Title', 'weaver-xtreme' /*adm*/ ),
1616
+ 'id' => '-text',
1617
+ 'type' => 'subheader_alt',
1618
+ 'info' => __( 'Options for the Post Title', 'weaver-xtreme' /*adm*/ ),
1619
+ ),
1620
+
1621
+ array(
1622
+ 'name' => __( 'Post Title', 'weaver-xtreme' /*adm*/ ),
1623
+ 'id' => 'post_title',
1624
+ 'type' => 'titles',
1625
+ 'info' => __( "Post title (Blog Views)", 'weaver-xtreme' /*adm*/ ),
1626
+ ),
1627
+
1628
+ array(
1629
+ 'name' => '<small>' . __( 'Bar under Post Titles', 'weaver-xtreme' /*adm*/ ) . '</small>',
1630
+ 'id' => 'post_title_underline_int',
1631
+ 'type' => 'val_px',
1632
+ 'info' => __( 'Enter size in px if you want a bar under page title. Leave blank or 0 for no bar.', 'weaver-xtreme' /*adm*/ ),
1633
+ ),
1634
+
1635
+ array(
1636
+ 'name' => '<small>' . __( 'Post Title Hover', 'weaver-xtreme' /*adm*/ ) . '</small>',
1637
+ 'id' => 'post_title_hover_color',
1638
+ 'type' => 'ctext',
1639
+ 'info' => __( 'Color if you want the Post Title to show alternate color for hover', 'weaver-xtreme' /*adm*/ ),
1640
+ ),
1641
+
1642
+ array(
1643
+ 'name' => '<small>' . __( 'Space After Post Title', 'weaver-xtreme' /*adm*/ ) . '</small>',
1644
+ 'id' => 'post_title_bottom_margin_dec',
1645
+ 'type' => 'val_em',
1646
+ 'info' => __( 'Space between Post Title and Post Info Line or content. (Default: 0.15em)', 'weaver-xtreme' /*adm*/ ),
1647
+ ),
1648
+
1649
+
1650
+ array(
1651
+ 'name' => '<span class="i-left dashicons dashicons-admin-comments"></span><small>' . __( 'Show Comment Bubble', 'weaver-xtreme' /*adm*/ ) . '</small>',
1652
+ 'id' => 'show_post_bubble',
1653
+ 'type' => 'checkbox',
1654
+ 'info' => __( "Show comment bubble with link to comments on the post info line.", 'weaver-xtreme' /*adm*/ ),
1655
+ ),
1656
+
1657
+ array(
1658
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide <em>Post Format</em> Icons', 'weaver-xtreme' /*adm*/ ) . '</small>',
1659
+ 'id' => 'hide_post_format_icon',
1660
+ 'type' => '+checkbox',
1661
+ 'info' => __( 'Hide the icons for posts with Post Format specified. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1662
+ ),
1663
+
1664
+
1665
+ array(
1666
+ 'name' => __( 'Post Layout', 'weaver-xtreme' /*adm*/ ),
1667
+ 'id' => '-schedule',
1668
+ 'type' => 'subheader_alt',
1669
+ 'info' => __( 'Layout of Posts', 'weaver-xtreme' /*adm*/ ),
1670
+ ),
1671
+
1672
+ array(
1673
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span>' . __( 'Post Content Columns', 'weaver-xtreme' /*adm*/ ),
1674
+ 'id' => 'post_cols',
1675
+ 'type' => 'select_id', //code
1676
+ 'info' => __( 'Automatically split all post content into columns for both blog and single page views. <em>This is post content only.</em> This is not the same as "Columns of Posts". (IE&lt;=9 will display 1 col.)', 'weaver-xtreme' /*adm*/ ),
1677
+ 'value' => array(
1678
+ array( 'val' => '1', 'desc' => __( '1 Column', 'weaver-xtreme' /*adm*/ ) ),
1679
+ array( 'val' => '2', 'desc' => __( '2 Columns', 'weaver-xtreme' /*adm*/ ) ),
1680
+ array( 'val' => '3', 'desc' => __( '3 Columns', 'weaver-xtreme' /*adm*/ ) ),
1681
+ array( 'val' => '4', 'desc' => __( '4 Columns', 'weaver-xtreme' /*adm*/ ) ),
1682
+ ),
1683
+ ),
1684
+
1685
+ array(
1686
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span>' . __( 'Columns of Posts', 'weaver-xtreme' /*adm*/ ),
1687
+ 'id' => 'blog_cols',
1688
+ 'type' => 'select_id', //code
1689
+ 'info' => __( 'Display posts on blog page with this many columns. (You should adjust "Display posts on blog page with this many columns" on Settings:Reading to be a multiple of this value.)', 'weaver-xtreme' /*adm*/ ),
1690
+ 'value' => array(
1691
+ array( 'val' => '1', 'desc' => __( '1 Column', 'weaver-xtreme' /*adm*/ ) ),
1692
+ array( 'val' => '2', 'desc' => __( '2 Columns', 'weaver-xtreme' /*adm*/ ) ),
1693
+ array( 'val' => '3', 'desc' => __( '3 Columns', 'weaver-xtreme' /*adm*/ ) ),
1694
+ ),
1695
+ ),
1696
+
1697
+ array(
1698
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span><small>' . __( 'Use Columns on Archive Pages', 'weaver-xtreme' /*adm*/ ) . '</small>',
1699
+ 'id' => 'archive_cols',
1700
+ 'type' => 'checkbox', //code
1701
+ 'info' => __( 'Display posts on archive-like pages using columns. (Archive, Author, Category, Tag)', 'weaver-xtreme' /*adm*/ ),
1702
+ ),
1703
+
1704
+ array(
1705
+ 'name' => '<small>' . __( 'First Post One Column', 'weaver-xtreme' /*adm*/ ) . '</small>',
1706
+ 'id' => 'blog_first_one',
1707
+ 'type' => 'checkbox',
1708
+ 'info' => __( 'Always display the first post in one column.', 'weaver-xtreme' /*adm*/ ),
1709
+ ),
1710
+ array(
1711
+ 'name' => '<small>' . __( 'Sticky Posts One Column', 'weaver-xtreme' /*adm*/ ) . '</small>',
1712
+ 'id' => 'blog_sticky_one',
1713
+ 'type' => 'checkbox',
1714
+ 'info' => __( "Display opening Sticky Posts in one column. If First Post One Column also checked, then first non-sticky post will be one column.", 'weaver-xtreme' /*adm*/ ),
1715
+ ),
1716
+ array(
1717
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#9783;</span><small>' . __( 'Use <em>Masonry</em> for Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
1718
+ 'id' => 'masonry_cols',
1719
+ 'type' => 'select_id', //code
1720
+ 'info' => __( 'Use the <em>Masonry</em> blog layout option to show dynamically packed posts on blog and archive-like pages. Overrides "Columns of Posts" setting. <em>Not compatible with full width FI BG images.</em>', 'weaver-xtreme' /*adm*/ ),
1721
+ 'value' => array(
1722
+ array( 'val' => '0', 'desc' => '' ),
1723
+ array( 'val' => '2', 'desc' => __( '2 Columns', 'weaver-xtreme' /*adm*/ ) ),
1724
+ array( 'val' => '3', 'desc' => __( '3 Columns', 'weaver-xtreme' /*adm*/ ) ),
1725
+ array( 'val' => '4', 'desc' => __( '4 Columns', 'weaver-xtreme' /*adm*/ ) ),
1726
+ array( 'val' => '5', 'desc' => __( '5 Columns', 'weaver-xtreme' /*adm*/ ) ),
1727
+ ),
1728
+ ),
1729
+
1730
+ array(
1731
+ 'name' => '<small>' . __( 'Compact <em>Post Format</em> Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
1732
+ 'id' => 'compact_post_formats',
1733
+ 'type' => 'checkbox',
1734
+ 'info' => __( 'Use compact layout for <em>Post Format</em> posts (Image, Gallery, Video, etc.). Useful for photo blogs and multi-column layouts. Looks great with <em>Masonry</em>.', 'weaver-xtreme' /*adm*/ ),
1735
+ ),
1736
+ array(
1737
+ 'name' => __( 'Photo Bloging', 'weaver-xtreme' /*adm*/ ),
1738
+ 'info' => __( 'Read the Help entry for information on creating a Photo Blog page', 'weaver-xtreme' /*adm*/ ),
1739
+ 'type' => 'note',
1740
+ 'help' => 'help.html#PhotoBlog',
1741
+ ),
1742
+
1743
+
1744
+ array( 'type' => 'submit' ),
1745
+
1746
+ array(
1747
+ 'name' => __( 'Excerpts / Full Posts', 'weaver-xtreme' /*adm*/ ),
1748
+ 'id' => '-exerpt-view',
1749
+ 'type' => 'subheader_alt',
1750
+ 'info' => __( 'How to display posts in Blog / Archive Views', 'weaver-xtreme' /*adm*/ ),
1751
+ ),
1752
+ array(
1753
+ 'name' => __( 'Show Full Blog Posts', 'weaver-xtreme' /*adm*/ ),
1754
+ 'id' => 'fullpost_blog',
1755
+ 'type' => 'checkbox',
1756
+ 'info' => __( 'Will display full blog post instead of excerpts on <em>blog pages</em>.', 'weaver-xtreme' /*adm*/ ),
1757
+ ),
1758
+ array(
1759
+ 'name' => '<small>' . __( 'Full Post for Archives', 'weaver-xtreme' /*adm*/ ) . '</small>',
1760
+ 'id' => 'fullpost_archive',
1761
+ 'type' => 'checkbox',
1762
+ 'info' => __( 'Display the full posts instead of excerpts on <em>special post pages</em>. (Archives, Categories, etc.) Does not override manually added &lt;--more--> breaks.', 'weaver-xtreme' /*adm*/ ),
1763
+ ),
1764
+ array(
1765
+ 'name' => '<small>' . __( 'Full Post for Searches', 'weaver-xtreme' /*adm*/ ) . '</small>',
1766
+ 'id' => 'fullpost_search',
1767
+ 'type' => 'checkbox',
1768
+ 'info' => __( 'Display the full posts instead of excerpts for Search results. Does not override manually added &lt;--more--> breaks.', 'weaver-xtreme' /*adm*/ ),
1769
+ ),
1770
+ array(
1771
+ 'name' => '<small>' . __( 'Full text for 1st <em>"n"</em> Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
1772
+ 'id' => 'fullpost_first',
1773
+ 'type' => 'val_num',
1774
+ 'info' => __( 'Display the full post for the first "n" posts on Blog pages. Does not override manually added &lt;--more--> breaks.', 'weaver-xtreme' /*adm*/ ),
1775
+ ),
1776
+ array(
1777
+ 'name' => '<small>' . __( 'Excerpt length', 'weaver-xtreme' /*adm*/ ) . '</small>',
1778
+ 'id' => 'excerpt_length',
1779
+ 'type' => 'val_num',
1780
+ 'info' => __( 'Change post excerpt length. (Default: 40 words)', 'weaver-xtreme' /*adm*/ ),
1781
+ ),
1782
+ array(
1783
+ 'name' => '<small>' . __( '<em>Continue reading</em> Message', 'weaver-xtreme' /*adm*/ ) . '</small>',
1784
+ 'id' => 'excerpt_more_msg',
1785
+ 'type' => 'widetext',
1786
+ 'info' => __( 'Change default <em>Continue reading &rarr;</em> message for excerpts. Can include HTML (e.g., &lt;img>).', 'weaver-xtreme' /*adm*/ ),
1787
+ ),
1788
+ array( 'type' => 'endheader' ),
1789
+
1790
+
1791
+ array(
1792
+ 'name' => __( 'Post Navigation', 'weaver-xtreme' /*adm*/ ),
1793
+ 'id' => '-leftright',
1794
+ 'type' => 'subheader_alt',
1795
+ 'info' => __( 'Navigation for moving between posts', 'weaver-xtreme' /*adm*/ ),
1796
+ ),
1797
+ array(
1798
+ 'name' => __( 'Blog Navigation Style', 'weaver-xtreme' /*adm*/ ),
1799
+ 'id' => 'nav_style',
1800
+ 'type' => 'select_id',
1801
+ 'info' => __( 'Style of navigation links on blog pages: "Older/Newer posts", "Previous/Next Post", or by page numbers', 'weaver-xtreme' /*adm*/ ),
1802
+ 'value' => array(
1803
+ array( 'val' => 'old_new', 'desc' => __( 'Older/Newer', 'weaver-xtreme' /*adm*/ ) ),
1804
+ array( 'val' => 'prev_next', 'desc' => __( 'Previous/Next', 'weaver-xtreme' /*adm*/ ) ),
1805
+ array( 'val' => 'paged_left', 'desc' => __( 'Paged - Left', 'weaver-xtreme' /*adm*/ ) ),
1806
+ array( 'val' => 'paged_right', 'desc' => __( 'Paged - Right', 'weaver-xtreme' /*adm*/ ) ),
1807
+ ),
1808
+ ),
1809
+ array(
1810
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Top Links', 'weaver-xtreme' /*adm*/ ) . '</small>',
1811
+ 'id' => 'nav_hide_above',
1812
+ 'type' => '+checkbox',
1813
+ 'info' => __( 'Hide the blog navigation links at the top (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1814
+ ),
1815
+ array(
1816
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Bottom Links', 'weaver-xtreme' /*adm*/ ) . '</small>',
1817
+ 'id' => 'nav_hide_below',
1818
+ 'type' => '+checkbox',
1819
+ 'info' => __( 'Hide the blog navigation links at the bottom (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1820
+ ),
1821
+ array(
1822
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Show Top on First Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
1823
+ 'id' => 'nav_show_first',
1824
+ 'type' => '+checkbox',
1825
+ 'info' => __( 'Show navigation at top even on the first page (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1826
+ ),
1827
+
1828
+ array(
1829
+ 'name' => __( 'Single Page Navigation Style', 'weaver-xtreme' /*adm*/ ),
1830
+ 'id' => 'single_nav_style',
1831
+ 'type' => 'select_id',
1832
+ 'info' => __( 'Style of navigation links on post Single pages: Previous/Next, by title, or none', 'weaver-xtreme' /*adm*/ ),
1833
+ 'value' => array(
1834
+ array( 'val' => 'title', 'desc' => __( 'Post Titles', 'weaver-xtreme' /*adm*/ ) ),
1835
+ array( 'val' => 'prev_next', 'desc' => __( 'Previous/Next', 'weaver-xtreme' /*adm*/ ) ),
1836
+ array( 'val' => 'hide', 'desc' => __( 'None - no display', 'weaver-xtreme' /*adm*/ ) ),
1837
+ ),
1838
+ ),
1839
+ array(
1840
+ 'name' => '<small>' . __( 'Link to Same Categories', 'weaver-xtreme' /*adm*/ ) . '</small>',
1841
+ 'id' => 'single_nav_link_cats',
1842
+ 'type' => '+checkbox',
1843
+ 'info' => __( 'Single Page navigation links point to posts with same categories. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1844
+ ),
1845
+ array(
1846
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Top Links', 'weaver-xtreme' /*adm*/ ) . '</small>',
1847
+ 'id' => 'single_nav_hide_above',
1848
+ 'type' => '+checkbox',
1849
+ 'info' => __( 'Hide the single page navigation links at the top (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1850
+ ),
1851
+ array(
1852
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Bottom Links', 'weaver-xtreme' /*adm*/ ) . '</small>',
1853
+ 'id' => 'single_nav_hide_below',
1854
+ 'type' => '+checkbox',
1855
+ 'info' => __( 'Hide the single page navigation links at the bottom (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
1856
+ ),
1857
+
1858
+ array( 'type' => 'submit' ),
1859
+ array(
1860
+ 'name' => __( 'Post Meta Info Areas', 'weaver-xtreme' /*adm*/ ),
1861
+ 'id' => '-info',
1862
+ 'type' => 'subheader_alt',
1863
+ 'info' => __( 'Top and Bottom Post Meta Information areas', 'weaver-xtreme' /*adm*/ ),
1864
+ ),
1865
+
1866
+ array(
1867
+ 'name' => __( 'Top Post Info', 'weaver-xtreme' /*adm*/ ),
1868
+ 'id' => 'post_info_top',
1869
+ 'type' => 'titles_text',
1870
+ 'info' => __( "Top Post info line", 'weaver-xtreme' /*adm*/ ),
1871
+ ),
1872
+
1873
+
1874
+ array(
1875
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide top post info', 'weaver-xtreme' /*adm*/ ) . '</small>',
1876
+ 'id' => 'post_info_hide_top',
1877
+ 'type' => 'checkbox', //code
1878
+ 'info' => __( 'Hide entire top info line (posted on, by) of post.', 'weaver-xtreme' /*adm*/ ),
1879
+ ),
1880
+
1881
+ array(
1882
+ 'name' => __( 'Bottom Post Info', 'weaver-xtreme' /*adm*/ ),
1883
+ 'id' => 'post_info_bottom',
1884
+ 'type' => 'titles_text',
1885
+ 'info' => __( 'The bottom post info line', 'weaver-xtreme' /*adm*/ ),
1886
+ ),
1887
+
1888
+ array(
1889
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide bottom post info', 'weaver-xtreme' /*adm*/ ) . '</small>',
1890
+ 'id' => 'post_info_hide_bottom',
1891
+ 'type' => 'checkbox', //code
1892
+ 'info' => __( 'Hide entire bottom info line (posted in, comments) of post.', 'weaver-xtreme' /*adm*/ ),
1893
+ ),
1894
+
1895
+
1896
+ array(
1897
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span>' . __( 'Show Author Avatar', 'weaver-xtreme' /*adm*/ ),
1898
+ 'id' => 'show_post_avatar',
1899
+ 'type' => 'select_id', //code
1900
+ 'info' => __( 'Show author avatar on the post info line (also can be set per post with post editor)', 'weaver-xtreme' /*adm*/ ),
1901
+ 'value' => array(
1902
+ array( 'val' => 'hide', 'desc' => __( 'Do Not Show', 'weaver-xtreme' /*adm*/ ) ),
1903
+ array( 'val' => 'start', 'desc' => __( 'Start of Info Line', 'weaver-xtreme' /*adm*/ ) ),
1904
+ array( 'val' => 'end', 'desc' => __( 'End of Info Line', 'weaver-xtreme' /*adm*/ ) ),
1905
+ ),
1906
+ ),
1907
+
1908
+ array(
1909
+ 'name' => '<small>' . __( 'Avatar size', 'weaver-xtreme' /*adm*/ ) . '</small>',
1910
+ 'id' => 'post_avatar_int',
1911
+ 'type' => 'val_px',
1912
+ 'info' => __( 'Size of Avatar in px. (Default: 28px)', 'weaver-xtreme' /*adm*/ ),
1913
+ ),
1914
+
1915
+ array(
1916
+ 'name' => __( 'Use Icons in Post Info', 'weaver-xtreme' /*adm*/ ),
1917
+ 'id' => 'post_icons',
1918
+ 'type' => 'select_id',
1919
+ 'info' => __( 'Use Icons instead of Text descriptions in Post Meta Info', 'weaver-xtreme' /*adm*/ ),
1920
+ 'value' => array(
1921
+ array( 'val' => 'text', 'desc' => __( 'Text Descriptions', 'weaver-xtreme' /*adm*/ ) ),
1922
+ array( 'val' => 'fonticons', 'desc' => __( 'Font Icons', 'weaver-xtreme' /*adm*/ ) ),
1923
+ array( 'val' => 'graphics', 'desc' => __( 'Graphic Icons', 'weaver-xtreme' /*adm*/ ) ),
1924
+ ),
1925
+ ),
1926
+ array(
1927
+ 'name' => '<small>' . __( 'Font Icons Color', 'weaver-xtreme' /*adm*/ ) . '</small>',
1928
+ 'id' => 'post_icons_color',
1929
+ 'type' => 'color',
1930
+ 'info' => __( 'Color for Font Icons (Default: Post Info text color)', 'weaver-xtreme' /*adm*/ ),
1931
+ ),
1932
+
1933
+
1934
+ array(
1935
+ 'name' => '<span style="color:red">' . __( 'Note:', 'weaver-xtreme' /*adm*/ ) . '</span>',
1936
+ 'type' => 'note',
1937
+ 'info' => __( 'Hiding any meta info item automatically uses Icons instead of text descriptions.', 'weaver-xtreme' /*adm*/ ),
1938
+ ),
1939
+ array(
1940
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Post Date', 'weaver-xtreme' /*adm*/ ) . '</small>',
1941
+ 'id' => 'post_hide_date',
1942
+ 'type' => 'checkbox',
1943
+ 'info' => __( 'Hide the post date everywhere it is normally displayed.', 'weaver-xtreme' /*adm*/ ),
1944
+ ),
1945
+ array(
1946
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Post Author', 'weaver-xtreme' /*adm*/ ) . '</small>',
1947
+ 'id' => 'post_hide_author',
1948
+ 'type' => 'checkbox',
1949
+ 'info' => __( 'Hide the post author everywhere it is normally displayed.', 'weaver-xtreme' /*adm*/ ),
1950
+ ),
1951
+ array(
1952
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Post Categories', 'weaver-xtreme' /*adm*/ ) . '</small>',
1953
+ 'id' => 'post_hide_categories',
1954
+ 'type' => 'checkbox',
1955
+ 'info' => __( 'Hide the post categories wherever they are normally displayed.', 'weaver-xtreme' /*adm*/ ),
1956
+ ),
1957
+ array(
1958
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Post Tags', 'weaver-xtreme' /*adm*/ ) . '</small>',
1959
+ 'id' => 'post_hide_tags',
1960
+ 'type' => 'checkbox',
1961
+ 'info' => __( 'Hide the post tags wherever they are normally displayed.', 'weaver-xtreme' /*adm*/ ),
1962
+ ),
1963
+ array(
1964
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Permalink', 'weaver-xtreme' /*adm*/ ) . '</small>',
1965
+ 'id' => 'hide_permalink',
1966
+ 'type' => 'checkbox',
1967
+ 'info' => __( 'Hide the permalink.', 'weaver-xtreme' /*adm*/ ),
1968
+ ),
1969
+ array(
1970
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Category if Only One', 'weaver-xtreme' /*adm*/ ) . '</small>',
1971
+ 'id' => 'hide_singleton_category',
1972
+ 'type' => 'checkbox',
1973
+ 'info' => __( 'If there is only one overall category defined (Uncategorized), don\'t show Category of post.', 'weaver-xtreme' /*adm*/ ),
1974
+ ),
1975
+ array(
1976
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Author for Single Author Site', 'weaver-xtreme' /*adm*/ ) . '</small>',
1977
+ 'id' => 'post_hide_single_author',
1978
+ 'type' => 'checkbox',
1979
+ 'info' => __( 'Hide author information if site has only a single author.', 'weaver-xtreme' /*adm*/ ),
1980
+ ),
1981
+
1982
+ array(
1983
+ 'name' => __( 'Post Info Links', 'weaver-xtreme' /*adm*/ ),
1984
+ 'id' => 'ilink',
1985
+ 'type' => 'link',
1986
+ 'info' => __( 'Links in post information top and bottom lines.', 'weaver-xtreme' /*adm*/ ),
1987
+ ),
1988
+
1989
+ array( 'type' => 'submit' ),
1990
+
1991
+
1992
+ array(
1993
+ 'name' => __( 'Featured Image - Posts', 'weaver-xtreme' /*adm*/ ),
1994
+ 'id' => '-id',
1995
+ 'type' => 'subheader_alt',
1996
+ 'info' => __( 'Display of Post Featured Images', 'weaver-xtreme' /*adm*/ ),
1997
+ ),
1998
+
1999
+ array(
2000
+ 'name' => __( 'Full Width FI BG Image:', 'weaver-xtreme' /*adm*/ ),
2001
+ 'type' => 'note',
2002
+ 'info' => __( 'To create full width Post BG images from the FI, check the <em>Post Area Extend BG Attributes</em> box at <em>Full Width</em> tab.', 'weaver-xtreme' /*adm*/ ),
2003
+ ),
2004
+
2005
+ array(
2006
+ 'name' => '<small>' . __( "Don't add link to FI", 'weaver-xtreme' /*adm*/ ) . '</small>',
2007
+ 'id' => 'post_fi_nolink',
2008
+ 'type' => '+checkbox',
2009
+ 'info' => __( 'Do not add link to Featured Image for any post layout. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2010
+ ),
2011
+
2012
+ array(
2013
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#10538;</span>' . __( 'FI Location - Full Post', 'weaver-xtreme' /*adm*/ ),
2014
+ 'id' => 'post_full_fi_location',
2015
+ 'type' => 'fi_location_post',
2016
+ 'info' => __( 'Where to display Featured Image for full blog posts.', 'weaver-xtreme' /*adm*/ ),
2017
+ ),
2018
+
2019
+ array(
2020
+ 'name' => '<small>' . __( 'Post Height - Blog View', 'weaver-xtreme' /*adm*/ ) . '</small>',
2021
+ 'id' => 'post_blog_min_height',
2022
+ 'type' => '+val_px',
2023
+ 'info' => __( 'Minimum Height of Post, full or excerpt, with Parallax BG in blog views. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2024
+ ),
2025
+
2026
+ array(
2027
+ 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'FI Alignment - Full post', 'weaver-xtreme' /*adm*/ ) . '</small>',
2028
+ 'id' => 'post_full_fi_align',
2029
+ 'type' => 'fi_align',
2030
+ 'info' => __( 'Featured Image alignment', 'weaver-xtreme' /*adm*/ ),
2031
+ ),
2032
+
2033
+
2034
+ array(
2035
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide FI - Full Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2036
+ 'id' => 'post_full_fi_hide',
2037
+ 'type' => 'select_hide',
2038
+ 'info' => __( 'Hide Featured Images on full blog posts.', 'weaver-xtreme' /*adm*/ ),
2039
+ ),
2040
+ array(
2041
+ 'name' => '<small>' . __( 'FI Size - Full Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2042
+ 'id' => 'post_full_fi_size',
2043
+ 'type' => 'select_id',
2044
+ 'info' => __( 'Media Library Image Size for Featured Image on full posts.', 'weaver-xtreme' /*adm*/ ),
2045
+ 'value' => array(
2046
+ array( 'val' => 'thumbnail', 'desc' => __( 'Thumbnail', 'weaver-xtreme' /*adm*/ ) ),
2047
+ array( 'val' => 'medium', 'desc' => __( 'Medium', 'weaver-xtreme' /*adm*/ ) ),
2048
+ array( 'val' => 'large', 'desc' => __( 'Large', 'weaver-xtreme' /*adm*/ ) ),
2049
+ array( 'val' => 'full', 'desc' => __( 'Full', 'weaver-xtreme' /*adm*/ ) ),
2050
+ ),
2051
+ ),
2052
+ array(
2053
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'FI Width, Full Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2054
+ 'id' => 'post_full_fi_width',
2055
+ 'type' => '+val_percent',
2056
+ 'info' => __( 'Width of Featured Image on Full Posts. Max Width in %, overrides FI Size selection. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2057
+ ),
2058
+
2059
+
2060
+ array(
2061
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#10538;</span>' . __( 'FI Location - Excerpts', 'weaver-xtreme' /*adm*/ ),
2062
+ 'id' => 'post_excerpt_fi_location',
2063
+ 'type' => 'fi_location_post',
2064
+ 'info' => __( 'Where to display Featured Image for posts displayed as excerpt.', 'weaver-xtreme' /*adm*/ ),
2065
+ ),
2066
+
2067
+ array(
2068
+ 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'FI Alignment - Excerpts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2069
+ 'id' => 'post_excerpt_fi_align',
2070
+ 'type' => 'fi_align',
2071
+ 'info' => __( 'How to align the Featured Image', 'weaver-xtreme' /*adm*/ ),
2072
+ ),
2073
+
2074
+ array(
2075
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide FI - Excerpts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2076
+ 'id' => 'post_excerpt_fi_hide',
2077
+ 'type' => 'select_hide',
2078
+ 'info' => __( 'Where to hide Featured Images on full blog posts.', 'weaver-xtreme' /*adm*/ ),
2079
+ ),
2080
+ array(
2081
+ 'name' => '<small>FI Size - Excerpts</small>',
2082
+ 'id' => 'post_excerpt_fi_size',
2083
+ 'type' => 'select_id',
2084
+ 'info' => __( 'Media Library Image Size for Featured Image on excerpts.', 'weaver-xtreme' /*adm*/ ),
2085
+ 'value' => array(
2086
+ array( 'val' => 'thumbnail', 'desc' => __( 'Thumbnail', 'weaver-xtreme' /*adm*/ ) ),
2087
+ array( 'val' => 'medium', 'desc' => __( 'Medium', 'weaver-xtreme' /*adm*/ ) ),
2088
+ array( 'val' => 'large', 'desc' => __( 'Large', 'weaver-xtreme' /*adm*/ ) ),
2089
+ array( 'val' => 'full', 'desc' => __( 'Full', 'weaver-xtreme' /*adm*/ ) ),
2090
+ ),
2091
+ ),
2092
+ array(
2093
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'FI Width, Excerpts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2094
+ 'id' => 'post_excerpt_fi_width',
2095
+ 'type' => '+val_percent',
2096
+ 'info' => __( 'Width of Featured Image on excerpts. Max Width in %, overrides FI Size selection. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2097
+ ),
2098
+
2099
+
2100
+ array(
2101
+ 'name' => '<span class="i-left" style=font-size:120%;">&nbsp;&#10538;</span>' . __( 'FI Location - Single Page', 'weaver-xtreme' /*adm*/ ),
2102
+ 'id' => 'post_fi_location',
2103
+ 'type' => 'fi_location',
2104
+ 'info' => __( 'Where to display Featured Image for posts on single page view.', 'weaver-xtreme' /*adm*/ ),
2105
+ ),
2106
+
2107
+ array(
2108
+ 'name' => '<small>' . __( 'Post Height - Single Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
2109
+ 'id' => 'post_min_height',
2110
+ 'type' => '+val_px',
2111
+ 'info' => __( 'Minimum Height of Post with Parallax BG in Single Page view. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2112
+ ),
2113
+ array(
2114
+ 'name' => __( 'Parallax FI BG Image:', 'weaver-xtreme' /*adm*/ ),
2115
+ 'info' => __( 'It will usually be more useful to use the Per Post FI option to specify Parallax BG images.', 'weaver-xtreme' /*adm*/ ),
2116
+ 'type' => 'note',
2117
+ ),
2118
+
2119
+ array(
2120
+ 'name' => '<span class="i-left dashicons dashicons-editor-alignleft"></span><small>' . __( 'FI Alignment - Single Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
2121
+ 'id' => 'post_fi_align',
2122
+ 'type' => 'fi_align',
2123
+ 'info' => __( 'How to align the Featured Image on Single Page View.', 'weaver-xtreme' /*adm*/ ),
2124
+ ),
2125
+
2126
+ array(
2127
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide FI - Single Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
2128
+ 'id' => 'post_fi_hide',
2129
+ 'type' => 'select_hide',
2130
+ 'info' => __( 'Where to hide Featured Images on single page view.', 'weaver-xtreme' /*adm*/ ),
2131
+ ),
2132
+ array(
2133
+ 'name' => '<small>' . __( 'FI Size - Single Posts', 'weaver-xtreme' /*adm*/ ) . '</small>',
2134
+ 'id' => 'post_fi_size',
2135
+ 'type' => 'select_id',
2136
+ 'info' => __( 'Media Library Image Size for Featured Image on single page view.', 'weaver-xtreme' /*adm*/ ),
2137
+ 'value' => array(
2138
+ array( 'val' => 'thumbnail', 'desc' => __( 'Thumbnail', 'weaver-xtreme' /*adm*/ ) ),
2139
+ array( 'val' => 'medium', 'desc' => __( 'Medium', 'weaver-xtreme' /*adm*/ ) ),
2140
+ array( 'val' => 'large', 'desc' => __( 'Large', 'weaver-xtreme' /*adm*/ ) ),
2141
+ array( 'val' => 'full', 'desc' => __( 'Full', 'weaver-xtreme' /*adm*/ ) ),
2142
+ ),
2143
+ ),
2144
+ array(
2145
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . __( 'FI Width, Single Page', 'weaver-xtreme' /*adm*/ ) . '</small>',
2146
+ 'id' => 'post_fi_width',
2147
+ 'type' => '+val_percent',
2148
+ 'info' => __( 'Width of Featured Image on single page view. Max Width in %, overrides FI Size selection. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2149
+ ),
2150
+
2151
+
2152
+ array( 'type' => 'submit' ),
2153
+
2154
+
2155
+ array(
2156
+ 'name' => __( 'More Post Related Options', 'weaver-xtreme' /*adm*/ ),
2157
+ 'id' => '-forms',
2158
+ 'type' => 'subheader_alt',
2159
+ 'info' => __( 'Other options related to post display, including single pages.', 'weaver-xtreme' /*adm*/ ),
2160
+ ),
2161
+ array(
2162
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Show <em>Comments are closed.</em>', 'weaver-xtreme' /*adm*/ ) . '</small>',
2163
+ 'id' => 'show_comments_closed',
2164
+ 'type' => 'checkbox',
2165
+ 'info' => __( 'If comments are off, and no comments have been made, show the <em>Comments are closed.</em> message.', 'weaver-xtreme' /*adm*/ ),
2166
+ ),
2167
+ array(
2168
+ 'name' => __( 'Author Info BG', 'weaver-xtreme' /*adm*/ ),
2169
+ 'id' => 'post_author_bgcolor',
2170
+ 'type' => 'ctext',
2171
+ 'info' => __( 'Background color used for Author Bio.', 'weaver-xtreme' /*adm*/ ),
2172
+ ),
2173
+ array(
2174
+ 'name' => '<span class="i-left dashicons dashicons-visibility"></span><small>' . __( 'Hide Author Bio', 'weaver-xtreme' /*adm*/ ) . '</small>',
2175
+ 'id' => 'hide_author_bio',
2176
+ 'type' => 'checkbox',
2177
+ 'info' => __( 'Hide display of author bio box on Author Archive and Single Post page views.', 'weaver-xtreme' /*adm*/ ),
2178
+ ),
2179
+ array(
2180
+ 'name' => '<small>' . __( 'Allow comments for attachments', 'weaver-xtreme' /*adm*/ ) . '</small>',
2181
+ 'id' => 'allow_attachment_comments',
2182
+ 'type' => 'checkbox',
2183
+ 'info' => __( 'Allow visitors to leave comments for attachments (usually full size media image - only if comments allowed).', 'weaver-xtreme' /*adm*/ ),
2184
+ ),
2185
+ );
2186
+
2187
+ ?>
2188
+ <div class="options-intro">
2189
+ <?php _e( '<strong>Post Specifics: </strong>
2190
+ Options related to <strong>Posts</strong>, including <strong>Background</strong> color, <strong>Columns</strong> displayed
2191
+ on blog pages, <strong>Title</strong> options, <strong>Navigation</strong> to earlier and later posts, the post
2192
+ <strong>Info Lines</strong>, <strong>Excerpts</strong>, and <strong>Featured Image</strong> handling.', 'weaver-xtreme' /*adm*/ ); ?>
2193
+ <br/>
2194
+ <div class="options-intro-menu">
2195
+ <a href="#post-area"><?php _e( 'Post Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2196
+ <a href="#post-title"><?php _e( 'Post Title', 'weaver-xtreme' /*adm*/ ); ?></a> |
2197
+ <a href="#post-layout"><?php _e( 'Post Layout', 'weaver-xtreme' /*adm*/ ); ?></a> |
2198
+ <a href="#excerpts-full-posts"><?php _e( 'Excerpts / Full Posts', 'weaver-xtreme' /*adm*/ ); ?></a> |
2199
+ <a href="#post-navigation"><?php _e( 'Post Navigation', 'weaver-xtreme' /*adm*/ ); ?></a> |
2200
+ <a href="#post-meta-info-areas"><?php _e( 'Post Meta Info Areas', 'weaver-xtreme' /*adm*/ ); ?></a> |
2201
+ <a href="#featured-image-posts"><?php _e( 'Featured Image - Posts', 'weaver-xtreme' /*adm*/ ); ?></a> |
2202
+ <a href="#more-post-related-options"><?php _e( 'More Post Related Options', 'weaver-xtreme' /*adm*/ ); ?></a> |
2203
+ <a href="#custom-post-info-lines"><?php _e( 'Custom Post Info Lines', 'weaver-xtreme' /*adm*/ ); ?></a>
2204
+ </div>
2205
+ </div>
2206
+ <?php
2207
+ weaverx_form_show_options( $opts );
2208
+ do_action( 'weaverxplus_admin', 'post_specifics' );
2209
+ ?>
2210
+ <span style="color:green;"><b><?php _e( 'Hiding/Enabling Page and Post Comments', 'weaver-xtreme' /*adm*/ ); ?></b></span>
2211
+ <?php
2212
+ weaverx_help_link( 'help.html#LeavingComments', __( 'Help for Leaving Comments', 'weaver-xtreme' /*adm*/ ) );
2213
+ ?>
2214
+ <p>
2215
+ <?php _e( 'Controlling "Reply/Leave a Comment" visibility for pages and posts is <strong>not</strong> a theme function.
2216
+ It is controlled by WordPress settings.
2217
+ Please click the ? just above to see the help file entry!
2218
+ (Additional options for comment <em>styling</em> are found on the Content Areas tab.)', 'weaver-xtreme' /*adm*/ ); ?>
2219
+ </p>
2220
+ <?php
2221
+ }
2222
+
2223
+
2224
+ // ======================== Main Options > Footer ========================
2225
+ function weaverx_mainopts_footer() {
2226
+ $opts = array(
2227
+ array( 'type' => 'submit' ),
2228
+
2229
+ array(
2230
+ 'name' => __( 'Footer Options', 'weaver-xtreme' /*adm*/ ),
2231
+ 'id' => '-admin-generic',
2232
+ 'type' => 'header',
2233
+ 'info' => __( 'Settings for the footer', 'weaver-xtreme' /*adm*/ ),
2234
+ 'help' => 'help.html#FooterOpt',
2235
+ ),
2236
+
2237
+
2238
+ array(
2239
+ 'name' => __( 'Footer Area', 'weaver-xtreme' /*adm*/ ),
2240
+ 'id' => 'footer',
2241
+ 'type' => 'widget_area',
2242
+ 'info' => __( 'Properties for the footer area.', 'weaver-xtreme' /*adm*/ ),
2243
+ ),
2244
+ array(
2245
+ 'name' => __( 'Footer Links', 'weaver-xtreme' /*adm*/ ),
2246
+ 'id' => 'footerlink',
2247
+ 'type' => 'link',
2248
+ 'info' => __( 'Color for links in Footer (Uses Standard Link colors if left blank).', 'weaver-xtreme' /*adm*/ ),
2249
+ ),
2250
+ array( 'type' => 'submit' ),
2251
+
2252
+ array(
2253
+ 'name' => __( 'Footer Widget Area', 'weaver-xtreme' /*adm*/ ),
2254
+ 'id' => 'footer_sb',
2255
+ 'type' => 'widget_area_submit',
2256
+ 'info' => __( 'Properties for the Footer Widget Area.', 'weaver-xtreme' /*adm*/ ),
2257
+ ),
2258
+
2259
+ array(
2260
+ 'name' => __( 'Footer HTML', 'weaver-xtreme' /*adm*/ ),
2261
+ 'id' => 'footer_html',
2262
+ 'type' => 'widget_area',
2263
+ 'info' => __( 'Add arbitrary HTML to Footer Area (in &lt;div id=\"footer-html\"&gt;)', 'weaver-xtreme' /*adm*/ ),
2264
+ ),
2265
+
2266
+ array(
2267
+ 'name' => '<span class="i-left dashicons dashicons-editor-code"></span>' . __( 'Footer HTML content', 'weaver-xtreme' /*adm*/ ),
2268
+ 'id' => 'footer_html_text',
2269
+ 'type' => 'textarea',
2270
+ 'placeholder' => __( 'Any HTML, including shortcodes.', 'weaver-xtreme' /*adm*/ ),
2271
+ 'info' => __( "Add arbitrary HTML", 'weaver-xtreme' /*adm*/ ),
2272
+ 'val' => 4,
2273
+ ),
2274
+ array( 'type' => 'submit' ),
2275
+ );
2276
+
2277
+ ?>
2278
+ <div class="options-intro">
2279
+ <?php _e( '<strong>Footer: </strong> Options affecting the <strong>Footer</strong> area, including <strong>Background</strong>
2280
+ color, <strong>Borders</strong>, and the <strong>Copyright</strong> message.', 'weaver-xtreme' /*adm*/ ); ?>
2281
+ <br/>
2282
+ <div class="options-intro-menu">
2283
+ <a href="#footer-area"><?php _e( 'Footer Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2284
+ <a href="#footer-widget-area"><?php _e( 'Footer Widget Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2285
+ <a href="#footer-html"><?php _e( 'Footer HTML', 'weaver-xtreme' /*adm*/ ); ?></a> |
2286
+ <a href="#site-copyright"><?php _e( 'Site Copyright', 'weaver-xtreme' /*adm*/ ); ?></a>
2287
+ </div>
2288
+ </div>
2289
+ <?php
2290
+ weaverx_form_show_options( $opts );
2291
+ do_action( 'weaverxplus_admin', 'footer_opts' );
2292
+ ?>
2293
+ <a id="site-copyright"></a>
2294
+ <strong>&copy;</strong>&nbsp;<span style="color:blue;"><b><?php _e( 'Site Copyright', 'weaver-xtreme' /*adm*/ ); ?></b></span>
2295
+ <br/>
2296
+ <small>
2297
+ <?php _e( 'If you fill this in, the default copyright notice in the footer will be replaced with the text here.
2298
+ It will not automatically update from year to year.
2299
+ Use &amp;copy; to display &copy;.
2300
+ You can use other HTML as well.
2301
+ Use <span class="style4">&amp;nbsp;</span> to hide the copyright notice. &diams;', 'weaver-xtreme' /*adm*/ ); ?>
2302
+ </small>
2303
+ <br/>
2304
+
2305
+ <span class="dashicons dashicons-editor-code"></span>
2306
+ <?php weaverx_textarea( weaverx_getopt( 'copyright' ), 'copyright', 1, ' ', 'width:85%;' ); ?>
2307
+ <br>
2308
+ <label><span class="dashicons dashicons-visibility"></span> <?php _e( 'Hide Powered By tag:', 'weaver-xtreme' /*adm*/ ); ?>
2309
+ <input type="checkbox" name="<?php weaverx_sapi_main_name( '_hide_poweredby' ); ?>" id="_hide_poweredby" <?php checked( weaverx_getopt_checked( '_hide_poweredby' ) ); ?> />
2310
+ </label>
2311
+ <small><?php _e( 'Check this to hide the "Proudly powered by" notice in the footer.', 'weaver-xtreme' /*adm*/ ); ?></small>
2312
+ <br/><br/>
2313
+ <?php _e( 'You can add other content to the Footer from the Advanced Options:HTML Insertion tab.', 'weaver-xtreme' /*adm*/ ); ?>
2314
+ <?php
2315
+ }
2316
+
2317
+ // ======================== Main Options > Widget Areas ========================
2318
+ function weaverx_mainopts_widgets() {
2319
+ $opts = array(
2320
+ array( 'type' => 'submit' ),
2321
+ array(
2322
+ 'name' => __( 'Sidebar Options', 'weaver-xtreme' /*adm*/ ),
2323
+ 'id' => '-screenoptions',
2324
+ 'type' => 'header',
2325
+ 'info' => __( 'Settings affecting main Sidebars and individual widgets', 'weaver-xtreme' /*adm*/ ),
2326
+ 'help' => 'help.html#WidgetAreas',
2327
+ ),
2328
+
2329
+ array(
2330
+ 'name' => __( 'Individual Widgets', 'weaver-xtreme' /*adm*/ ),
2331
+ 'id' => 'widget',
2332
+ 'type' => 'widget_area',
2333
+ 'info' => __( 'Properties for individual widgets (e.g., Text, Recent Posts, etc.)', 'weaver-xtreme' /*adm*/ ),
2334
+ ),
2335
+
2336
+ array(
2337
+ 'name' => __( 'Widget Title', 'weaver-xtreme' /*adm*/ ),
2338
+ 'id' => 'widget_title',
2339
+ 'type' => 'titles',
2340
+ 'info' => __( 'Color for Widget Titles.', 'weaver-xtreme' /*adm*/ ),
2341
+ ),
2342
+ array(
2343
+ 'name' => __( 'Bar under Widget Titles', 'weaver-xtreme' /*adm*/ ),
2344
+ 'id' => 'widget_title_underline_int',
2345
+ 'type' => 'val_px',
2346
+ 'info' => __( 'Enter size in px if you want a bar under Widget Titles. Leave blank or 0 for no bar.', 'weaver-xtreme' /*adm*/ ),
2347
+ ),
2348
+
2349
+ array(
2350
+ 'name' => __( 'Widget List Bullet', 'weaver-xtreme' /*adm*/ ),
2351
+ 'id' => 'widgetlist_bullet',
2352
+ 'type' => 'select_id',
2353
+ 'info' => __( 'Bullet used for Unordered Lists in Widget areas.', 'weaver-xtreme' /*adm*/ ),
2354
+ 'value' => array(
2355
+ array( 'val' => 'disc', 'desc' => __( 'Filled Disc (default)', 'weaver-xtreme' /*adm*/ ) ),
2356
+ array( 'val' => 'circle', 'desc' => __( 'Circle', 'weaver-xtreme' /*adm*/ ) ),
2357
+ array( 'val' => 'square', 'desc' => __( 'Square', 'weaver-xtreme' /*adm*/ ) ),
2358
+ array( 'val' => 'none', 'desc' => __( 'None', 'weaver-xtreme' /*adm*/ ) ),
2359
+ ),
2360
+ ),
2361
+
2362
+ array(
2363
+ 'name' => __( 'Widget Links', 'weaver-xtreme' /*adm*/ ),
2364
+ 'id' => 'wlink',
2365
+ 'type' => 'link',
2366
+ 'info' => __( 'Color for links in widgets (uses Standard Link colors if left blank).', 'weaver-xtreme' /*adm*/ ),
2367
+ ),
2368
+
2369
+ array( 'type' => 'submit' ),
2370
+
2371
+
2372
+ array(
2373
+ 'name' => __( 'Primary Widget Area', 'weaver-xtreme' /*adm*/ ),
2374
+ 'id' => 'primary',
2375
+ 'type' => 'widget_area_submit',
2376
+ 'info' => __( 'Properties for the Primary (Upper/Left) Sidebar Widget Area.', 'weaver-xtreme' /*adm*/ ),
2377
+ ),
2378
+
2379
+ array(
2380
+ 'name' => __( 'Secondary Widget Area', 'weaver-xtreme' /*adm*/ ),
2381
+ 'id' => 'secondary',
2382
+ 'type' => 'widget_area_submit',
2383
+ 'info' => __( 'Properties for the Secondary (Lower/Right) Sidebar Widget Area.', 'weaver-xtreme' /*adm*/ ),
2384
+ ),
2385
+
2386
+ array(
2387
+ 'name' => __( 'Top Widget Areas', 'weaver-xtreme' /*adm*/ ),
2388
+ 'id' => 'top',
2389
+ 'type' => 'widget_area_submit',
2390
+ 'info' => __( 'Properties for all Top Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme' /*adm*/ ),
2391
+ ),
2392
+
2393
+
2394
+ array(
2395
+ 'name' => __( 'Bottom Widget Areas', 'weaver-xtreme' /*adm*/ ),
2396
+ 'id' => 'bottom',
2397
+ 'type' => 'widget_area',
2398
+ 'info' => __( 'Properties for all Bottom Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme' /*adm*/ ),
2399
+ ),
2400
+
2401
+ );
2402
+
2403
+ weaverx_form_show_options( $opts );
2404
+ ?>
2405
+ <hr/>
2406
+ <span style="color:blue;"><b>Define Per Page Extra Widget Areas</b></span>
2407
+ <?php
2408
+ weaverx_help_link( 'help.html#PPWidgets', 'Help for Per Page Widget Areas' );
2409
+ ?>
2410
+ <br/>
2411
+ <small>
2412
+ <?php _e( 'You may define extra widget areas that can then be used in the <em>Per Page</em> settings, or in the <em>Weaver Xtreme Plus</em> [widget_area] shortcode.
2413
+ Enter a list of one or more widget area names separated by commas.
2414
+ Your names should include only letters, numbers, or underscores - no spaces or other special characters.
2415
+ The widgets areas will then appear on the Appearance->Widgets menus.
2416
+ They can be included on individual pages by adding the name you define here to the "Weaver Xtreme Options For This Page" box on the Edit Page screen. (&diams;)', 'weaver-xtreme' /*adm*/ ); ?>
2417
+ </small>
2418
+ <br/>
2419
+ <?php weaverx_textarea( weaverx_getopt( '_perpagewidgets' ), '_perpagewidgets', 1, ' ', $style = 'width:60%;', $class = 'wvrx-edit' ); ?>
2420
+ <?php
2421
+ do_action( 'weaverxplus_admin', 'widget_areas' );
2422
+ }
2423
+
2424
+ // ======================== Main Options > Layout ========================
2425
+ function weaverx_mainopts_layout() {
2426
+ $opts = array(
2427
+ array( 'type' => 'submit' ),
2428
+ array(
2429
+ 'name' => __( 'Sidebar Layout', 'weaver-xtreme' /*adm*/ ),
2430
+ 'id' => '-welcome-widgets-menus',
2431
+ 'type' => 'header',
2432
+ 'info' => __( 'Sidebar Layout for each type of page ("stack top" used for mobile view)', 'weaver-xtreme' /*adm*/ ),
2433
+ 'help' => 'help.html#layout',
2434
+ ),
2435
+
2436
+ array(
2437
+ 'name' => __( 'Blog, Post, Page Default', 'weaver-xtreme' /*adm*/ ),
2438
+ 'id' => 'layout_default',
2439
+ 'type' => 'select_id',
2440
+ 'info' => __( 'Select the default theme layout for blog, single post, attachments, and pages.', 'weaver-xtreme' /*adm*/ ),
2441
+ 'value' => array(
2442
+ array( 'val' => 'right', 'desc' => __( 'Sidebars on Right', 'weaver-xtreme' /*adm*/ ) ),
2443
+ array( 'val' => 'right-top', 'desc' => __( 'Sidebars on Right (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2444
+ array( 'val' => 'left', 'desc' => __( ' Sidebars on Left', 'weaver-xtreme' /*adm*/ ) ),
2445
+ array( 'val' => 'left-top', 'desc' => __( ' Sidebars on Left (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2446
+ array( 'val' => 'split', 'desc' => __( 'Split - Sidebars on Right and Left', 'weaver-xtreme' /*adm*/ ) ),
2447
+ array( 'val' => 'split-top', 'desc' => __( 'Split (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2448
+ array( 'val' => 'one-column', 'desc' => __( 'No sidebars, content only', 'weaver-xtreme' /*adm*/ ) ),
2449
+ ),
2450
+ ),
2451
+
2452
+ array(
2453
+ 'name' => __( 'Archive-like Default', 'weaver-xtreme' /*adm*/ ),
2454
+ 'id' => 'layout_default_archive',
2455
+ 'type' => 'select_id',
2456
+ 'info' => __( 'Select the default theme layout for all other pages - archives, search, etc.', 'weaver-xtreme' /*adm*/ ),
2457
+ 'value' => array(
2458
+ array( 'val' => 'right', 'desc' => __( 'Sidebars on Right', 'weaver-xtreme' /*adm*/ ) ),
2459
+ array( 'val' => 'right-top', 'desc' => __( 'Sidebars on Right (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2460
+ array( 'val' => 'left', 'desc' => __( ' Sidebars on Left', 'weaver-xtreme' /*adm*/ ) ),
2461
+ array( 'val' => 'left-top', 'desc' => __( ' Sidebars on Left (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2462
+ array( 'val' => 'split', 'desc' => __( 'Split - Sidebars on Right and Left', 'weaver-xtreme' /*adm*/ ) ),
2463
+ array( 'val' => 'split-top', 'desc' => __( 'Split (stack top)', 'weaver-xtreme' /*adm*/ ) ),
2464
+ array( 'val' => 'one-column', 'desc' => __( 'No sidebars, content only', 'weaver-xtreme' /*adm*/ ) ),
2465
+ ),
2466
+ ),
2467
+
2468
+ array(
2469
+ 'name' => __( 'Page', 'weaver-xtreme' /*adm*/ ),
2470
+ 'id' => 'layout_page',
2471
+ 'type' => 'select_layout',
2472
+ 'info' => __( 'Layout for normal Pages on your site.', 'weaver-xtreme' /*adm*/ ),
2473
+ 'value' => '',
2474
+ ),
2475
+ array(
2476
+ 'name' => __( 'Blog', 'weaver-xtreme' /*adm*/ ),
2477
+ 'id' => 'layout_blog',
2478
+ 'type' => 'select_layout',
2479
+ 'info' => __( 'Layout for main blog page. Includes "Page with Posts" Page templates.', 'weaver-xtreme' /*adm*/ ),
2480
+ 'value' => '',
2481
+ ),
2482
+ array(
2483
+ 'name' => __( 'Post Single Page', 'weaver-xtreme' /*adm*/ ),
2484
+ 'id' => 'layout_single',
2485
+ 'type' => 'select_layout',
2486
+ 'info' => __( 'Layout for Posts displayed as a single page.', 'weaver-xtreme' /*adm*/ ),
2487
+ 'value' => '',
2488
+ ),
2489
+
2490
+ array(
2491
+ 'name' => __( 'Attachments', 'weaver-xtreme' /*adm*/ ),
2492
+ 'id' => 'layout_image',
2493
+ 'type' => '+select_layout',
2494
+ 'info' => __( 'Layout for attachment pages such as images. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2495
+ 'value' => '',
2496
+ ),
2497
+
2498
+ array(
2499
+ 'name' => __( 'Date Archive', 'weaver-xtreme' /*adm*/ ),
2500
+ 'id' => 'layout_archive',
2501
+ 'type' => '+select_layout',
2502
+ 'info' => __( 'Layout for archive by date pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2503
+ 'value' => '',
2504
+ ),
2505
+
2506
+ array(
2507
+ 'name' => __( 'Category Archive', 'weaver-xtreme' /*adm*/ ),
2508
+ 'id' => 'layout_category',
2509
+ 'type' => '+select_layout',
2510
+ 'info' => __( 'Layout for category archive pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2511
+ 'value' => '',
2512
+ ),
2513
+ array(
2514
+ 'name' => __( 'Tags Archive', 'weaver-xtreme' /*adm*/ ),
2515
+ 'id' => 'layout_tag',
2516
+ 'type' => '+select_layout',
2517
+ 'info' => __( 'Layout for tag archive pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2518
+ 'value' => '',
2519
+ ),
2520
+
2521
+ array(
2522
+ 'name' => __( 'Author Archive</small>', 'weaver-xtreme' /*adm*/ ),
2523
+ 'id' => 'layout_author',
2524
+ 'type' => '+select_layout',
2525
+ 'info' => __( 'Layout for author archive pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2526
+ 'value' => '',
2527
+ ),
2528
+ array(
2529
+ 'name' => __( 'Search Results, 404</small>', 'weaver-xtreme' /*adm*/ ),
2530
+ 'id' => 'layout_search',
2531
+ 'type' => '+select_layout',
2532
+ 'info' => __( 'Layout for search results and 404 pages. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2533
+ 'value' => '',
2534
+ ),
2535
+
2536
+ array(
2537
+ 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Left Sidebar Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
2538
+ 'id' => 'left_sb_width_int',
2539
+ 'type' => 'val_percent',
2540
+ 'info' => __( 'Width for Left Sidebar (Default: 25%)', 'weaver-xtreme' /*adm*/ ),
2541
+ 'value' => '',
2542
+ ),
2543
+ array(
2544
+ 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Right Sidebar Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
2545
+ 'id' => 'right_sb_width_int',
2546
+ 'type' => 'val_percent',
2547
+ 'info' => __( 'Width for Right Sidebar (Default: 25%)', 'weaver-xtreme' /*adm*/ ),
2548
+ 'value' => '',
2549
+ ),
2550
+ array(
2551
+ 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Split Left Sidebar Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
2552
+ 'id' => 'left_split_sb_width_int',
2553
+ 'type' => 'val_percent',
2554
+ 'info' => __( 'Width for Split Sidebar, Left Side (Default: 25%)', 'weaver-xtreme' /*adm*/ ),
2555
+ 'value' => '',
2556
+ ),
2557
+ array(
2558
+ 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span><small>' . __( 'Split Right Sidebar Width', 'weaver-xtreme' /*adm*/ ) . '</small>',
2559
+ 'id' => 'right_split_sb_width_int',
2560
+ 'type' => 'val_percent',
2561
+ 'info' => __( 'Width for Split Sidebar, Right Side (Default: 25%)', 'weaver-xtreme' /*adm*/ ),
2562
+ 'value' => '',
2563
+ ),
2564
+ array(
2565
+ 'name' => '<span class="i-left" style="font-size:120%;">&harr;</span> ' . __( 'Content Width:', 'weaver-xtreme' /*adm*/ ),
2566
+ 'type' => 'note',
2567
+ 'info' => __( 'The width of content area automatically determined by sidebar layout and width', 'weaver-xtreme' /*adm*/ ),
2568
+ ),
2569
+
2570
+ array(
2571
+ 'name' => __( 'Flow color to bottom', 'weaver-xtreme' /*adm*/ ),
2572
+ 'id' => 'flow_color',
2573
+ 'type' => '+checkbox',
2574
+ 'info' => __( 'If checked, Content and Sidebar bg colors will flow to bottom of the Container (that is, equal heights). You must provide background colors for the Content and Sidebars or the default bg color will be used. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
2575
+ ),
2576
+
2577
+ array(
2578
+ 'name' => __( 'Alt Page Themes', 'weaver-xtreme' /*adm*/ ),
2579
+ 'id' => '-editor-codex',
2580
+ 'type' => 'header_area',
2581
+ 'info' => __( '&starf; Weaver Xtreme Plus (V 3.1.1 or later) allows you to set Alternative Themes for the blog, single, and other archive-like pages.', 'weaver-xtreme' /*adm*/ ),
2582
+ ),
2583
+
2584
+
2585
+ );
2586
+ ?>
2587
+ <div class="options-intro">
2588
+ <strong>Sidebars &amp; Layout: </strong>
2589
+ <?php _e( 'Options affecting <strong>Sidebar Layout</strong> and the main <strong>Sidebar Areas</strong>.
2590
+ This includes properties of individual <strong>Widgets</strong>, as well as properties of various <strong>Sidebars</strong>.', 'weaver-xtreme' /*adm*/ ); ?>
2591
+ <br/>
2592
+ <div class="options-intro-menu">
2593
+ <a href="#sidebar-layout"><?php _e( 'Sidebar Layout', 'weaver-xtreme' /*adm*/ ); ?></a> |
2594
+ <a href="#individual-widgets"><?php _e( 'Individual Widgets', 'weaver-xtreme' /*adm*/ ); ?></a> |
2595
+ <a href="#primary-widget-area"><?php _e( 'Primary Widget Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2596
+ <a href="#secondary-widget-area"><?php _e( 'Secondary Widget Area', 'weaver-xtreme' /*adm*/ ); ?></a> |
2597
+ <a href="#top-widget-areas"><?php _e( 'Top Widget Areas', 'weaver-xtreme' /*adm*/ ); ?></a> |
2598
+ <a href="#bottom-widget-areas"><?php _e( 'Bottom Widget Areas', 'weaver-xtreme' /*adm*/ ); ?></a>
2599
+ </div>
2600
+ </div>
2601
+ <?php
2602
+
2603
+ weaverx_form_show_options( $opts );
2604
+ do_action( 'weaverxplus_admin', 'layout' ); // add new layout option?
2605
+ }
admin/admin-saverestore.php CHANGED
@@ -1,5 +1,7 @@
1
  <?php
2
- if ( !defined('ABSPATH')) exit; // Exit if accessed directly
 
 
3
  /* Weaver Xtreme - admin Save/Restore
4
  * __ added - 12/10/14
5
  * This will come after the Options form has been closed, and is used for non-SAPI options
@@ -8,168 +10,26 @@ if ( !defined('ABSPATH')) exit; // Exit if accessed directly
8
 
9
 
10
  function weaverx_ts_admin_saverestore() {
11
- $saved = get_option( apply_filters('weaverx_options','weaverx_settings_backup') ,array());
12
- $style_date = '';
13
- if (!empty($saved))
14
- $style_date = $saved['style_date'];
15
 
16
- if (! $style_date ) $style_date = __('No saved settings', 'weaver-xtreme' /*adm*/);
17
- ?>
 
 
 
18
 
19
- <div class="atw-option-header" style="clear:both;"><?php _e('Save/Restore Theme Settings', 'weaver-xtreme' /*adm*/);weaverx_help_link('help.html#SaveRestore',__('Help on Save/Restore Themes', 'weaver-xtreme' /*adm*/));?></div>
20
- <p>
21
- <?php _e('Note: if you have Weaver Xtreme Plus installed, then options marked with &starf;Plus will be included in saves and restores.', 'weaver-xtreme' /*adm*/); ?>
22
- </p>
23
- <div class="atw-option-subheader"><?php _e('Save/Restore Current Theme Settings using WordPress Database', 'weaver-xtreme' /*adm*/);?></div>
24
- <?php _e('<p>This option allows you to save and restore all current theme settings using your host\'s WordPress database. Your options will be preserved across Weaver Xtreme theme upgrades, as well when you change to different themes. There is only one saved backup available. You can also download your setting to your computer with the options below.</p>
25
- <p>Note: This save option saves <strong>all</strong> settings, including those marked with &diams;.</p>', 'weaver-xtreme' /*adm*/);?>
26
- <form name="save_mysave_form" method="post">
27
- <input class="button-primary" type="submit" name="save_mytheme" value="<?php _e('Save Current Theme Settings', 'weaver-xtreme' /*adm*/);?>"/>
28
- <strong><?php _e('Backup all current theme settings using the WordPress database.', 'weaver-xtreme' /*adm*/);?></strong>
29
- <?php weaverx_nonce_field('save_mytheme'); ?>
30
- <br /><br />
31
- <input class="button-primary" type="submit" name="restore_mytheme" value="<?php _e('Restore Settings', 'weaver-xtreme' /*adm*/);?>"/>
32
- <strong><?php _e('Restore from saved settings.', 'weaver-xtreme' /*adm*/);?></strong> <em><?php _e('Last save date:', 'weaver-xtreme' /*adm*/);?> <?php echo $style_date; ?></em>
33
- <?php
34
- weaverx_nonce_field('restore_mytheme');
35
- do_action('weaverxplus_admin','save_restore');
36
- ?>
37
- </form>
38
-
39
- <?php
40
-
41
- weaverx_saverestore(); // download/upload to computer
42
-
43
- do_action('weaverx_child_saverestore'); // allow additional save/restore in child
44
-
45
- do_action('weaverx_child_update');
46
- ?>
47
- <div class="atw-option-subheader"><?php _e('Reset Current Settings to Default', 'weaver-xtreme' /*adm*/); ?></div><br />
48
- <form name="resetweaverx_form" method="post" onSubmit="return confirm('<?php _e('Are you sure you want to reset all Weaver Xtreme settings? This will include the [Saved Current Settings using WordPress Database].', 'weaver-xtreme' /*adm*/); ?>');">
49
- <strong><?php _e('Click the Clear button to reset all Weaver Xtreme settings, including &diams;, &starf;Plus, and Weaver Xtreme Plus shortcode settings, to the default values.', 'weaver-xtreme' /*adm*/); ?></strong><br >
50
- <em style="color:red;"><?php _e('Warning: You will lose all current settings, including settings from "Save Settings using the WordPress Database".', 'weaver-xtreme' /*adm*/); ?></em><br />
51
- <?php _e('You should use the "Download Current Settings To Your Computer" option above to save a copy of your current settings before clearing!
52
- If you have Weaver Xtreme Plus installed, you should also save shortcode settings from the Xtreme Plus Save/Restore tab.', 'weaver-xtreme' /*adm*/); ?>
53
- <br />
54
- <input class="button-primary" type="submit" name="reset_weaverx" value="<?php _e('Clear All Weaver Xtreme Settings', 'weaver-xtreme' /*adm*/); ?>"/>&nbsp;&nbsp
55
- <?php
56
- _e('Note: after clearing, settings will be reset to the default subtheme. This is required by WordPress.org standards.', 'weaver-xtreme');
57
- weaverx_nonce_field('reset_weaverx'); ?>
58
- </form> <!-- resetweaverx_form -->
59
- <br /><hr />
60
-
61
- <?php
62
-
63
- }
64
-
65
- function weaverx_process_options_admin_standard( $processed ) {
66
- if ( weaverx_submitted( 'weaverx_clear_messages' )) {
67
- return true;
68
- }
69
- if (weaverx_submitted('reset_weaverx')) {
70
- if (! current_user_can('manage_options'))
71
- wp_die(__('You do not have the capability to do that.', 'weaver-xtreme' /*adm*/));
72
- // delete everything!
73
- weaverx_save_msg(__('All Weaver Xtreme settings have been reset to the defaults.','weaver-xtreme'));
74
- delete_option( apply_filters('weaverx_options','weaverx_settings') );
75
- global $weaverx_opts_cache;
76
- $weaverx_opts_cache = false; // clear the cache
77
- weaverx_init_opts('reset_weaverx');
78
- set_theme_mod('_options_level',0);
79
- delete_option( apply_filters('weaverx_options','weaverx_settings_backup') );
80
-
81
- do_action('weaverxplus_admin','reset_weaverxplus');
82
-
83
- update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice', 0 ); // reset the dismiss on the plugin loader
84
 
 
 
 
85
 
86
- return true;
87
  }
88
 
89
- if (weaverx_submitted('uploadtheme') && function_exists('weaverx_loadtheme')) {
90
- weaverx_loadtheme();
91
- return true;
92
- }
93
-
94
- return $processed;
95
  }
96
 
97
- function weaverx_saverestore(){
98
- /* admin tab for saving and restoring theme */
99
- $weaverx_theme_dir = esc_url(weaverx_f_uploads_base_dir() .'weaverx-theme/');
100
- $download_path = esc_url(weaverx_relative_url('includes/download.php'));
101
- $download_img_path = esc_url(weaverx_relative_url('assets/images/download.png'));
102
- $nonce = wp_create_nonce('weaverx_download');
103
- $a_pro = (function_exists('weaverxplus_plugin_installed')) ? '-plus' : '';
104
-
105
- ?>
106
- <h3 class="atw-option-subheader" style="color:blue;">
107
- <?php _e('Save/Restore Current Theme Settings using Your Computer', 'weaver-xtreme' /*adm*/); ?>
108
- </h3>
109
- <p>
110
- <?php _e('This option allows you to save and restore all current theme settings by uploading and downloading to your own computer.', 'weaver-xtreme' /*adm*/); ?>
111
- </p>
112
-
113
- <h3><?php _e('Download Current Settings To Your Computer', 'weaver-xtreme' /*adm*/); ?></h3>
114
-
115
- <a href="<?php echo $download_path . '?_wpnonce=' . $nonce; ?>"><img src="<?php echo esc_url($download_img_path); ?>" />
116
- &nbsp; <strong><?php _e('Download', 'weaver-xtreme' /*adm*/); ?></strong>&nbsp;</a> -
117
- <?php _e('<strong>Save all</strong> current settings to file on your computer.
118
- (Full settings backup, including those marked with &diams;.) <em>File:</em>', 'weaver-xtreme' /*adm*/); ?>
119
- <strong>weaverx-backup-settings<?php echo $a_pro;?>.wxb</strong>
120
- <br />
121
- <br />
122
- <a href="<?php echo $download_path . '?_wpnoncet=' . $nonce;?>"><img src="<?php echo esc_url($download_img_path); ?>" />
123
- &nbsp;<strong><?php _e('Download', 'weaver-xtreme' /*adm*/); ?></strong></a>&nbsp; -
124
- <?php _e('<strong><em>Save only theme related</em></strong> current settings to file on your computer. <em>File:</em>
125
- <strong>weaverx-theme-settings<?php echo $a_pro;?>.wxt</strong>', 'weaver-xtreme' /*adm*/); ?>
126
- <?php
127
- if (function_exists('weaverxplus_plugin_installed'))
128
- echo '<p>' .
129
- __('Note: Downloaded settings include <em>Weaver Xtreme Plus</em> settings.
130
- Setting files from Weaver Xtreme Plus can be uploaded to the Free Weaver Xtreme version, but will not be used or saved by the free version. If you get error messages while downloading or uploading (a very rare host related issue), try the Customizer save/restore options instead.', 'weaver-xtreme' /*adm*/)
131
- . '</p>';
132
- ?>
133
-
134
- <form enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
135
- <table>
136
- <tr><td><h3><?php _e('Upload settings from file saved on your computer', 'weaver-xtreme' /*adm*/); ?></h3></td></tr>
137
-
138
- <tr valign="top">
139
- <td><?php _e('Select theme/backup file to upload:', 'weaver-xtreme' /*adm*/); ?>
140
- <span style="border:1px solid black;padding:2px;"><input name="uploaded" type="file" /></span>
141
- <input type="hidden" name="uploadit" value="yes" />&nbsp;<?php _e('(Restores settings in file to current settings.)', 'weaver-xtreme' /*adm*/); ?>
142
- </td>
143
- </tr>
144
-
145
- <tr><td><span class='submit'>
146
- <input class="button-primary" name="uploadtheme" type="submit" value="<?php _e('Upload theme/backup', 'weaver-xtreme' /*adm*/); ?>" /></span>
147
- &nbsp;<small><?php _e('<strong>Upload and Restore</strong> a theme/backup from file on your computer. Will become current settings.', 'weaver-xtreme' /*adm*/); ?>
148
- </small></td></tr>
149
-
150
- <tr><td>
151
- <?php if (!function_exists('weaverxplus_plugin_installed'))
152
- echo '<small>' .
153
- __('Note: Any Weaver Xtreme Plus settings will <em>not</em> be restored for Weaver Xtreme Free version.', 'weaver-xtreme' /*adm*/) . '</small>';
154
- ?>&nbsp;</td></tr>
155
-
156
- </table>
157
- <?php weaverx_nonce_field('uploadtheme'); ?>
158
- </form>
159
-
160
- <h3 class="atw-option-header" style="color:blue;">
161
- <?php _e('Save/Restore Current Settings in files on your site\'s host file system. (&starf;Plus)', 'weaver-xtreme' /*adm*/); ?>
162
- </h3>
163
- <p>
164
- <?php _e('This option allows you to save and restore current subtheme settings on the file system of your site\' host.', 'weaver-xtreme' /*adm*/); ?>
165
- </p>
166
- <p>
167
- <?php
168
- if (!function_exists('weaverxplus_plugin_installed') || !version_compare(WEAVER_XPLUS_VERSION, '3.1','>=') ) {
169
- echo '<strong>'; _e('This option requires Weaver Xtreme Plus version greater or equal to ','weaver_xtreme') ; echo '3.1</strong>';
170
- } else {
171
- do_action('weaverxplus_admin','save_restore_files');
172
- }
173
- echo '</p>';
174
  }
175
-
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // Exit if accessed directly
5
  /* Weaver Xtreme - admin Save/Restore
6
  * __ added - 12/10/14
7
  * This will come after the Options form has been closed, and is used for non-SAPI options
10
 
11
 
12
  function weaverx_ts_admin_saverestore() {
 
 
 
 
13
 
14
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
15
+ $trylink = 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_starting-subtheme" rel="noopener"';
16
+ echo '<h3>';
17
+ echo __( 'Save/Restore Theme Settings', 'weaver-xtreme' );
18
+ echo '</h3>';
19
 
20
+ echo '<p>';
21
+ echo _e( '<strong style="color:red;">NOTICE!</strong> You can Save and Restore theme options from the Customizer.', 'weaver-xtreme' ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
+ echo '</p><p><strong><a ' .
24
+ 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[panel]=weaverx_general" rel="noopener"'
25
+ . '>' . esc_html( 'Admin "Save Settings" and "Restore Settings"', 'weaver-xtreme' ) . '</a></strong> </p>';
26
 
27
+ return;
28
  }
29
 
30
+ weaverx_ts_admin_saverestore4();
 
 
 
 
 
31
  }
32
 
33
+ if ( ! version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
34
+ require_once( dirname( __FILE__ ) . '/admin-saverestore4.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
 
admin/admin-saverestore4.php ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // Exit if accessed directly
5
+ /* Weaver Xtreme - admin Save/Restore
6
+ * __ added - 12/10/14
7
+ * This will come after the Options form has been closed, and is used for non-SAPI options
8
+ *
9
+ */
10
+
11
+
12
+
13
+ function weaverx_ts_admin_saverestore4() {
14
+
15
+ $saved = get_option( apply_filters( 'weaverx_options', 'weaverx_settings_backup' ), array() );
16
+ $style_date = '';
17
+ if ( ! empty( $saved ) ) {
18
+ $style_date = $saved['style_date'];
19
+ }
20
+
21
+ if ( ! $style_date ) {
22
+ $style_date = __( 'No saved settings', 'weaver-xtreme' /*adm*/ );
23
+ }
24
+ ?>
25
+
26
+ <div class="atw-option-header" style="clear:both;"><?php _e( 'Save/Restore Theme Settings', 'weaver-xtreme' /*adm*/ );
27
+ weaverx_help_link( 'help.html#SaveRestore', __( 'Help on Save/Restore Themes', 'weaver-xtreme' /*adm*/ ) ); ?></div>
28
+ <p>
29
+ <?php _e( 'Note: if you have Weaver Xtreme Plus installed, then options marked with &starf;Plus will be included in saves and restores.', 'weaver-xtreme' /*adm*/ ); ?>
30
+ </p>
31
+ <div class="atw-option-subheader"><?php _e( 'Save/Restore Current Theme Settings using WordPress Database', 'weaver-xtreme' /*adm*/ ); ?></div>
32
+ <?php _e( '<p>This option allows you to save and restore all current theme settings using your host\'s WordPress database. Your options will be preserved across Weaver Xtreme theme upgrades, as well when you change to different themes. There is only one saved backup available. You can also download your setting to your computer with the options below.</p>
33
+ <p>Note: This save option saves <strong>all</strong> settings, including those marked with &diams;.</p>', 'weaver-xtreme' /*adm*/ ); ?>
34
+ <form name="save_mysave_form" method="post">
35
+ <input class="button-primary" type="submit" name="save_mytheme" value="<?php _e( 'Save Current Theme Settings', 'weaver-xtreme' /*adm*/ ); ?>"/>
36
+ <strong><?php _e( 'Backup all current theme settings using the WordPress database.', 'weaver-xtreme' /*adm*/ ); ?></strong>
37
+ <?php weaverx_nonce_field( 'save_mytheme' ); ?>
38
+ <br/><br/>
39
+ <input class="button-primary" type="submit" name="restore_mytheme" value="<?php _e( 'Restore Settings', 'weaver-xtreme' /*adm*/ ); ?>"/>
40
+ <strong><?php _e( 'Restore from saved settings.', 'weaver-xtreme' /*adm*/ ); ?></strong> <em><?php _e( 'Last save date:', 'weaver-xtreme' /*adm*/ ); ?><?php echo $style_date; ?></em>
41
+ <?php
42
+ weaverx_nonce_field( 'restore_mytheme' );
43
+ do_action( 'weaverxplus_admin', 'save_restore' );
44
+ ?>
45
+ </form>
46
+
47
+ <?php
48
+
49
+ weaverx_saverestore(); // download/upload to computer
50
+
51
+ do_action( 'weaverx_child_saverestore' ); // allow additional save/restore in child
52
+
53
+ do_action( 'weaverx_child_update' );
54
+ ?>
55
+ <div class="atw-option-subheader"><?php _e( 'Reset Current Settings to Default', 'weaver-xtreme' /*adm*/ ); ?></div><br/>
56
+ <form name="resetweaverx_form" method="post" onSubmit="return confirm('<?php _e( 'Are you sure you want to reset all Weaver Xtreme settings? This will include the [Saved Current Settings using WordPress Database].', 'weaver-xtreme' /*adm*/ ); ?>');">
57
+ <strong><?php _e( 'Click the Clear button to reset all Weaver Xtreme settings, including &diams;, &starf;Plus, and Weaver Xtreme Plus shortcode settings, to the default values.', 'weaver-xtreme' /*adm*/ ); ?></strong><br>
58
+ <em style="color:red;"><?php _e( 'Warning: You will lose all current settings, including settings from "Save Settings using the WordPress Database".', 'weaver-xtreme' /*adm*/ ); ?></em><br/>
59
+ <?php _e( 'You should use the "Download Current Settings To Your Computer" option above to save a copy of your current settings before clearing!
60
+ If you have Weaver Xtreme Plus installed, you should also save shortcode settings from the Xtreme Plus Save/Restore tab.', 'weaver-xtreme' /*adm*/ ); ?>
61
+ <br/>
62
+ <input class="button-primary" type="submit" name="reset_weaverx" value="<?php _e( 'Clear All Weaver Xtreme Settings', 'weaver-xtreme' /*adm*/ ); ?>"/>&nbsp;&nbsp
63
+ <?php
64
+ _e( 'Note: after clearing, settings will be reset to the default subtheme. This is required by WordPress.org standards.', 'weaver-xtreme' );
65
+ weaverx_nonce_field( 'reset_weaverx' ); ?>
66
+ </form> <!-- resetweaverx_form -->
67
+ <br/>
68
+ <hr/>
69
+
70
+ <?php
71
+
72
+ }
73
+
74
+ function weaverx_process_options_admin_standard( $processed ) {
75
+ if ( weaverx_submitted( 'weaverx_clear_messages' ) ) {
76
+ return true;
77
+ }
78
+ if ( weaverx_submitted( 'reset_weaverx' ) ) {
79
+ if ( ! current_user_can( 'manage_options' ) ) {
80
+ wp_die( __( 'You do not have the capability to do that.', 'weaver-xtreme' /*adm*/ ) );
81
+ }
82
+ // delete everything!
83
+ weaverx_save_msg( __( 'All Weaver Xtreme settings have been reset to the defaults.', 'weaver-xtreme' ) );
84
+ delete_option( apply_filters( 'weaverx_options', 'weaverx_settings' ) );
85
+ global $weaverx_opts_cache;
86
+ $weaverx_opts_cache = false; // clear the cache
87
+ weaverx_init_opts( 'reset_weaverx' );
88
+ set_theme_mod( '_options_level', 0 );
89
+ delete_option( apply_filters( 'weaverx_options', 'weaverx_settings_backup' ) );
90
+
91
+ do_action( 'weaverxplus_admin', 'reset_weaverxplus' );
92
+
93
+ update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice', 0 ); // reset the dismiss on the plugin loader
94
+
95
+
96
+ return true;
97
+ }
98
+
99
+ if ( weaverx_submitted( 'uploadtheme' ) && function_exists( 'weaverx_loadtheme' ) ) {
100
+ weaverx_loadtheme();
101
+
102
+ return true;
103
+ }
104
+
105
+ return $processed;
106
+ }
107
+
108
+ function weaverx_saverestore() {
109
+ /* admin tab for saving and restoring theme */
110
+ $weaverx_theme_dir = esc_url( weaverx_f_uploads_base_dir() . 'weaverx-theme/' );
111
+ $download_path = esc_url( weaverx_relative_url( 'includes/download.php' ) );
112
+ $download_img_path = esc_url( weaverx_relative_url( 'assets/images/download.png' ) );
113
+ $nonce = wp_create_nonce( 'weaverx_download' );
114
+ $a_pro = ( function_exists( 'weaverxplus_plugin_installed' ) ) ? '-plus' : '';
115
+
116
+ ?>
117
+ <h3 class="atw-option-subheader" style="color:blue;">
118
+ <?php _e( 'Save/Restore Current Theme Settings using Your Computer', 'weaver-xtreme' /*adm*/ ); ?>
119
+ </h3>
120
+ <p>
121
+ <?php _e( 'This option allows you to save and restore all current theme settings by uploading and downloading to your own computer.', 'weaver-xtreme' /*adm*/ ); ?>
122
+ </p>
123
+
124
+ <h3><?php _e( 'Download Current Settings To Your Computer', 'weaver-xtreme' /*adm*/ ); ?></h3>
125
+
126
+ <a href="<?php echo $download_path . '?_wpnonce=' . $nonce; ?>"><img src="<?php echo esc_url( $download_img_path ); ?>"/>
127
+ &nbsp; <strong><?php _e( 'Download', 'weaver-xtreme' /*adm*/ ); ?></strong>&nbsp;</a> -
128
+ <?php _e( '<strong>Save all</strong> current settings to file on your computer.
129
+ (Full settings backup, including those marked with &diams;.) <em>File:</em>', 'weaver-xtreme' /*adm*/ ); ?>
130
+ <strong>weaverx-backup-settings<?php echo $a_pro; ?>.wxb</strong>
131
+ <br/>
132
+ <br/>
133
+ <a href="<?php echo $download_path . '?_wpnoncet=' . $nonce; ?>"><img src="<?php echo esc_url( $download_img_path ); ?>"/>
134
+ &nbsp;<strong><?php _e( 'Download', 'weaver-xtreme' /*adm*/ ); ?></strong></a>&nbsp; -
135
+ <?php _e( '<strong><em>Save only theme related</em></strong> current settings to file on your computer. <em>File:</em>
136
+ <strong>weaverx-theme-settings<?php echo $a_pro;?>.wxt</strong>', 'weaver-xtreme' /*adm*/ ); ?>
137
+ <?php
138
+ if ( function_exists( 'weaverxplus_plugin_installed' ) ) {
139
+ echo '<p>' .
140
+ __( 'Note: Downloaded settings include <em>Weaver Xtreme Plus</em> settings.
141
+ Setting files from Weaver Xtreme Plus can be uploaded to the Free Weaver Xtreme version, but will not be used or saved by the free version. If you get error messages while downloading or uploading (a very rare host related issue), try the Customizer save/restore options instead.', 'weaver-xtreme' /*adm*/ )
142
+ . '</p>';
143
+ }
144
+ ?>
145
+
146
+ <form enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
147
+ <table>
148
+ <tr>
149
+ <td><h3><?php _e( 'Upload settings from file saved on your computer', 'weaver-xtreme' /*adm*/ ); ?></h3></td>
150
+ </tr>
151
+
152
+ <tr valign="top">
153
+ <td><?php _e( 'Select theme/backup file to upload:', 'weaver-xtreme' /*adm*/ ); ?>
154
+ <span style="border:1px solid black;padding:2px;"><input name="uploaded" type="file"/></span>
155
+ <input type="hidden" name="uploadit" value="yes"/>&nbsp;<?php _e( '(Restores settings in file to current settings.)', 'weaver-xtreme' /*adm*/ ); ?>
156
+ </td>
157
+ </tr>
158
+
159
+ <tr>
160
+ <td><span class='submit'>
161
+ <input class="button-primary" name="uploadtheme" type="submit" value="<?php _e( 'Upload theme/backup', 'weaver-xtreme' /*adm*/ ); ?>"/></span>
162
+ &nbsp;<small><?php _e( '<strong>Upload and Restore</strong> a theme/backup from file on your computer. Will become current settings.', 'weaver-xtreme' /*adm*/ ); ?>
163
+ </small></td>
164
+ </tr>
165
+
166
+ <tr>
167
+ <td>
168
+ <?php if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
169
+ echo '<small>' .
170
+ __( 'Note: Any Weaver Xtreme Plus settings will <em>not</em> be restored for Weaver Xtreme Free version.', 'weaver-xtreme' /*adm*/ ) . '</small>';
171
+ }
172
+ ?>&nbsp;
173
+ </td>
174
+ </tr>
175
+
176
+ </table>
177
+ <?php weaverx_nonce_field( 'uploadtheme' ); ?>
178
+ </form>
179
+
180
+ <h3 class="atw-option-header" style="color:blue;">
181
+ <?php _e( 'Save/Restore Current Settings in files on your site\'s host file system. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ); ?>
182
+ </h3>
183
+ <p>
184
+ <?php _e( 'This option allows you to save and restore current subtheme settings on the file system of your site\' host.', 'weaver-xtreme' /*adm*/ ); ?>
185
+ </p>
186
+ <p>
187
+ <?php
188
+ if ( ! function_exists( 'weaverxplus_plugin_installed' ) || ! version_compare( WEAVER_XPLUS_VERSION, '3.1', '>=' ) ) {
189
+ echo '<strong>';
190
+ _e( 'This option requires that you have installed Weaver Xtreme Plus version greater or equal to ', 'weaver-xtreme' );
191
+ echo '3.1</strong>';
192
+ } else {
193
+ do_action( 'weaverxplus_admin', 'save_restore_files' );
194
+ }
195
+ echo '</p>';
196
+ }
197
+
admin/admin-subthemes.php CHANGED
@@ -10,135 +10,24 @@ if ( ! defined( 'ABSPATH' ) ) {
10
 
11
  function weaverx_admin_subthemes() {
12
 
13
-
14
- weaverx_tab_title( __( 'Predefined Weaver Xtreme Subthemes', 'weaver-xtreme' ), 'help.html#PredefinedThemes', __( 'Help for Weaver Xtreme Predefined Themes', 'weaver-xtreme' /*adm*/ ) ); ?>
15
- <small style="font-weight:normal;font-size:10px;"><?php _e( 'You can click the ?\'s found throughout Weaver Xtreme admin pages for context specific help.', 'weaver-xtreme' /*adm*/ ); ?></small>
16
-
17
- <?php _e( '<h3>Welcome to Weaver X</h3>', 'weaver-xtreme' /*adm*/ ); ?>
18
-
19
- <?php _e( '<p>Weaver Xtreme gives you extreme control of your WordPress blog appearance using the
20
- different admin tabs here. This tab lets you get a quick start by picking one of the many
21
- predefined subthemes. Once you\'ve picked a starter theme, use the <em>Main Options</em> and <em>Advanced Options</em>
22
- tabs to tweak the theme to be whatever you like. After you have a theme you\'re happy with,
23
- you can save it from the Save/Restore tab. The <em>Help</em> tab has much more <b>useful</b> information.</p>', 'weaver-xtreme' /*adm*/ ); ?>
24
-
25
-
26
- <h3 class="atw-option-subheader"><span style="color:black;padding:.2em;" class="dashicons dashicons-images-alt2"></span>
27
- <?php _e( 'Get started by trying one of the predefined subthemes!', 'weaver-xtreme' /*adm*/ ); ?>
28
- </h3>
29
- <?php
30
- $theme_dir = trailingslashit( WP_CONTENT_DIR ) . 'themes/' . get_template() . '/subthemes/';
31
- $theme_list = array();
32
- if ( $media_dir = opendir( $theme_dir ) ) { // build the list of themes from directory
33
- while ( $m_file = readdir( $media_dir ) ) {
34
- $len = strlen( $m_file );
35
- $base = substr( $m_file, 0, $len - 4 );
36
- $ext = $len > 4 ? substr( $m_file, $len - 4, 4 ) : '';
37
- if ( $ext == '.wxt' || $ext == '.wxb' ) {
38
- $theme_list[] = $base;
39
- }
40
- }
41
  }
42
 
43
- if ( ! empty( $theme_list ) ) {
44
- echo '<p style="font-size:120%;font-weight:bold;">';
45
- _e( 'Please remember: these subthemes are only starting points!
46
- You can use <em>Weaver Xtreme</em> options to change virtually any part of these subthemes.
47
- You can change colors, sidebar layouts, font family and sizes, borders, spacing - really, everything.', 'weaver-xtreme' /*adm*/ );
48
- echo '</p>';
49
- weaverx_st_pick_theme( $theme_list ); // show the theme picker
50
- } else {
51
- if ( WEAVERX_SETTINGS_VERSION == 'WvrX5:2.0' ) {
52
- _e( "<h3>IMPORTANT NOTE: Weaver Xtreme Version 5 only supports picking subthemes from the Customizer.</h3>\n", 'weaver-xtreme' /*adm*/ );
53
- } else {
54
- _e( "<h3>WARNING: Your version of Weaver Xtreme is likely installed incorrectly. Unable to find subtheme definitions.</h3>\n", 'weaver-xtreme' /*adm*/ );
55
- }
56
- }
57
  }
58
 
59
- function weaverx_st_pick_theme( $list_in ) {
60
- // output the form to select a file list from weaverx-subthemes directory
61
- $list = $list_in;
62
- natcasesort( $list );
63
- $cur_theme = weaverx_getopt( 'theme_filename' );
64
- if ( ! $cur_theme ) {
65
- $cur_theme = WEAVERX_DEFAULT_THEME;
66
- } // the default theme
67
- ?>
68
- <form enctype="multipart/form-data" name='pick_theme' method='post' onSubmit="return confirm('<?php _e( 'Are you sure you want select a new theme?\r\n\r\nSelecting a new subtheme will overwrite your existing theme settings. You should save your existing settings on the Save/Restore menu if you have made changes.', 'weaver-xtreme' ); ?>');">
69
- &nbsp;&nbsp;<strong><?php _e( 'Click a Radio Button below to select a subtheme:', 'weaver-xtreme' /*adm*/ ); ?> &nbsp;</strong>
70
- <span style="padding-left:100px;"><?php _e( 'Current theme:', 'weaver-xtreme' /*adm*/ ); ?> <strong>
71
- <?php
72
- $cur_addon = weaverx_getopt( 'addon_name' );
73
- if ( $cur_addon == '' ) {
74
- echo ucwords( str_replace( '-', ' ', $cur_theme ) );
75
- } else {
76
- echo __( 'Add-on Subtheme: ', 'weaver-xtreme' ) . ucwords( str_replace( '-', ' ', $cur_addon ) );
77
- $cur_theme = '';
78
- }
79
- ?>
80
- </strong></span>
81
-
82
- <br/><br/>
83
- <?php
84
- //weaverx_confirm_select_theme();
85
- ?>
86
- <input class="button-primary" name="set_subtheme" type="submit" value="<?php _e( 'Set to Selected Subtheme', 'weaver-xtreme' ); ?>"/>
87
-
88
- <p style="color:#b00;font-weight:bold;font-size:120%">
89
- <br/><?php _e( '<em>Note:</em> Before switching to any subtheme, you must Save and download a copy of your settings using the Save / Restore page, in order to be able to go back to them if required.', 'weaver-xtreme' /*adm*/ ); ?></p>
90
- <?php
91
- weaverx_nonce_field( 'set_subtheme' );
92
-
93
- $thumbs = weaverx_relative_url( 'subthemes/' );
94
-
95
- foreach ( $list
96
-
97
- as $addon ) {
98
- $name = ucwords( str_replace( '-', ' ', $addon ) );
99
- ?>
100
- <div style="float:left; width:200px;">
101
- <label><input type="radio" name="theme_picked"
102
- <?php echo 'value="' . $addon . '" ' . ( $cur_theme == $addon ? 'checked' : '' ) .
103
- '/> <strong>' . $name . '</strong><br />';
104
- if ( ! weaverx_getopt( '_hide_theme_thumbs' ) ) {
105
- echo '<img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . esc_url( $thumbs . $addon . '.jpg' ) . '" width="150px" height="113px" alt="thumb" /></label></div>' . "\n";
106
- } else {
107
- echo "</label></div>\n";
108
- }
109
- }
110
-
111
- if ( ! weaverx_getopt_checked( '_hide_theme_thumbs' ) ) {
112
- weaverx_clear_both();
113
- ?>
114
- <span class='submit' style='padding-top:6px;'><input class="button-primary" name="set_subtheme" type="submit" value="<?php _e( 'Set to Selected Subtheme', 'weaver-xtreme' /*adm*/ ); ?>"/></span>
115
- <?php
116
- }
117
- ?>
118
-
119
- </form>
120
- <div style="clear:both;padding-top:6px;"></div>
121
-
122
- <form enctype="multipart/form-data" name='hide_thumbs_form' method='post'>
123
- <?php
124
- $hide_msg = ( weaverx_getopt( '_hide_theme_thumbs' ) ) ? __( 'Show Subtheme Thumbnails', 'weaver-xtreme' /*adm*/ ) :
125
- __( 'Hide Subtheme Thumbnails', 'weaver-xtreme' /*adm*/ );
126
- ?>
127
- <input class="button-primary" name="hide_thumbs" type="submit" value="<?php echo $hide_msg; ?>"/>
128
- <?php weaverx_nonce_field( 'hide_thumbs' ); ?>
129
- </form>
130
- <div style="clear:both;"></div>
131
- <hr/>
132
- <?php
133
- do_action( 'weaverx_child_show_extrathemes' );
134
- do_action( 'weaverxplus_admin', 'show_subthemes' );
135
- }
136
-
137
- function weaverx_confirm_select_theme() {
138
- ?>
139
-
140
- <br/>
141
- <input class="button-primary" type="submit" onSubmit="return confirm('<?php _e( 'Are you sure you want select a new theme? This will overwrite you existing theme settings.', 'weaver-xtreme' ); ?>');" name="set_subtheme" value="<?php _e( 'Set to Selected Subtheme', 'weaver-xtreme' /*adm*/ ); ?>"/>
142
- <?php weaverx_nonce_field( 'set_subtheme' );
143
  }
144
 
10
 
11
  function weaverx_admin_subthemes() {
12
 
13
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
14
+ $trylink = 'href="' . trailingslashit( site_url() ) . 'wp-admin/customize.php?autofocus[section]=weaverx_starting-subtheme" rel="noopener"';
15
+ echo '<h3>';
16
+ echo __( 'Predefined Weaver Xtreme Subthemes', 'weaver-xtreme' );
17
+ echo '</h3>';
18
+
19
+ echo '<p>';
20
+ echo _e( '<strong style="color:red;">NOTICE!</strong> The legacy interface no longer supports Subtheme selection. You can select a subtheme from the Customizer.', 'weaver-extreme' );
21
+ echo '</p><p>' . esc_html( 'Open the Customizer', 'weaver-xtreme' ) . ' ';
22
+ echo '<strong><a ' . $trylink . '>' . esc_html( 'Try a Pre-defined Subtheme', 'weaver-xtreme' ) . '</a></strong> </p>';
23
+
24
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
+ weaverx_admin_subthemes4();
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
 
30
+ if ( ! version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
31
+ require_once( dirname( __FILE__ ) . '/admin-subthemes4.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
admin/admin-subthemes4.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Weaver 4 legacy interface options
3
+ function weaverx_admin_subthemes4() {
4
+ weaverx_tab_title( __( 'Predefined Weaver Xtreme Subthemes', 'weaver-xtreme' ), 'help.html#PredefinedThemes', __( 'Help for Weaver Xtreme Predefined Themes', 'weaver-xtreme' /*adm*/ ) ); ?>
5
+ <small style="font-weight:normal;font-size:10px;"><?php _e( 'You can click the ?\'s found throughout Weaver Xtreme admin pages for context specific help.', 'weaver-xtreme' /*adm*/ ); ?></small>
6
+
7
+ <?php _e( '<h3>Welcome to Weaver Xtreme</h3>', 'weaver-xtreme' /*adm*/ ); ?>
8
+
9
+ <?php _e( '<p>Weaver Xtreme gives you extreme control of your WordPress blog appearance using the
10
+ different admin tabs here. This tab lets you get a quick start by picking one of the many
11
+ predefined subthemes. Once you\'ve picked a starter theme, use the <em>Main Options</em> and <em>Advanced Options</em>
12
+ tabs to tweak the theme to be whatever you like. After you have a theme you\'re happy with,
13
+ you can save it from the Save/Restore tab. The <em>Help</em> tab has much more <b>useful</b> information.</p>', 'weaver-xtreme' /*adm*/ ); ?>
14
+
15
+
16
+ <h3 class="atw-option-subheader"><span style="color:black;padding:.2em;" class="dashicons dashicons-images-alt2"></span>
17
+ <?php _e( 'Get started by trying one of the predefined subthemes!', 'weaver-xtreme' /*adm*/ ); ?>
18
+ </h3>
19
+ <?php
20
+ $theme_dir = trailingslashit( WP_CONTENT_DIR ) . 'themes/' . get_template() . '/subthemes/';
21
+ $theme_list = array();
22
+ if ( $media_dir = opendir( $theme_dir ) ) { // build the list of themes from directory
23
+ while ( $m_file = readdir( $media_dir ) ) {
24
+ $len = strlen( $m_file );
25
+ $base = substr( $m_file, 0, $len - 4 );
26
+ $ext = $len > 4 ? substr( $m_file, $len - 4, 4 ) : '';
27
+ if ( $ext == '.wxt' || $ext == '.wxb' ) {
28
+ $theme_list[] = $base;
29
+ }
30
+ }
31
+ }
32
+
33
+ if ( ! empty( $theme_list ) ) {
34
+ echo '<p style="font-size:120%;font-weight:bold;">';
35
+ _e( 'Please remember: these subthemes are only starting points!
36
+ You can use <em>Weaver Xtreme</em> options to change virtually any part of these subthemes.
37
+ You can change colors, sidebar layouts, font family and sizes, borders, spacing - really, everything.', 'weaver-xtreme' /*adm*/ );
38
+ echo '</p>';
39
+ weaverx_st_pick_theme( $theme_list ); // show the theme picker
40
+ } else {
41
+ if ( WEAVERX_SETTINGS_VERSION == 'WvrX5:2.0' ) {
42
+ _e( "<h3>IMPORTANT NOTE: Weaver Xtreme Version 5 only supports picking subthemes from the Customizer.</h3>\n", 'weaver-xtreme' /*adm*/ );
43
+ } else {
44
+ _e( "<h3>WARNING: Your version of Weaver Xtreme is likely installed incorrectly. Unable to find subtheme definitions.</h3>\n", 'weaver-xtreme' /*adm*/ );
45
+ }
46
+ }
47
+ }
48
+
49
+ function weaverx_st_pick_theme( $list_in ) {
50
+ // output the form to select a file list from weaverx-subthemes directory
51
+ $list = $list_in;
52
+ natcasesort( $list );
53
+ $cur_theme = weaverx_getopt( 'theme_filename' );
54
+ if ( ! $cur_theme ) {
55
+ $cur_theme = WEAVERX_DEFAULT_THEME;
56
+ } // the default theme
57
+ ?>
58
+ <form enctype="multipart/form-data" name='pick_theme' method='post' onSubmit="return confirm('<?php _e( 'Are you sure you want select a new theme?\r\n\r\nSelecting a new subtheme will overwrite your existing theme settings. You should save your existing settings on the Save/Restore menu if you have made changes.', 'weaver-xtreme' ); ?>');">
59
+ &nbsp;&nbsp;<strong><?php _e( 'Click a Radio Button below to select a subtheme:', 'weaver-xtreme' /*adm*/ ); ?> &nbsp;</strong>
60
+ <span style="padding-left:100px;"><?php _e( 'Current theme:', 'weaver-xtreme' /*adm*/ ); ?> <strong>
61
+ <?php
62
+ $cur_addon = weaverx_getopt( 'addon_name' );
63
+ if ( $cur_addon == '' ) {
64
+ echo ucwords( str_replace( '-', ' ', $cur_theme ) );
65
+ } else {
66
+ echo __( 'Add-on Subtheme: ', 'weaver-xtreme' ) . ucwords( str_replace( '-', ' ', $cur_addon ) );
67
+ $cur_theme = '';
68
+ }
69
+ ?>
70
+ </strong></span>
71
+
72
+ <br/><br/>
73
+ <?php
74
+ //weaverx_confirm_select_theme();
75
+ ?>
76
+ <input class="button-primary" name="set_subtheme" type="submit" value="<?php _e( 'Set to Selected Subtheme', 'weaver-xtreme' ); ?>"/>
77
+
78
+ <p style="color:#b00;font-weight:bold;font-size:120%">
79
+ <br/><?php _e( '<em>Note:</em> Before switching to any subtheme, you must Save and download a copy of your settings using the Save / Restore page, in order to be able to go back to them if required.', 'weaver-xtreme' /*adm*/ ); ?></p>
80
+ <?php
81
+ weaverx_nonce_field( 'set_subtheme' );
82
+
83
+ $thumbs = weaverx_relative_url( 'subthemes/' );
84
+
85
+ foreach ( $list
86
+
87
+ as $addon ) {
88
+ $name = ucwords( str_replace( '-', ' ', $addon ) );
89
+ ?>
90
+ <div style="float:left; width:200px;">
91
+ <label><input type="radio" name="theme_picked"
92
+ <?php echo 'value="' . $addon . '" ' . ( $cur_theme == $addon ? 'checked' : '' ) .
93
+ '/> <strong>' . $name . '</strong><br />';
94
+ if ( ! weaverx_getopt( '_hide_theme_thumbs' ) ) {
95
+ echo '<img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . esc_url( $thumbs . $addon . '.jpg' ) . '" width="150px" height="113px" alt="thumb" /></label></div>' . "\n";
96
+ } else {
97
+ echo "</label></div>\n";
98
+ }
99
+ }
100
+
101
+ if ( ! weaverx_getopt_checked( '_hide_theme_thumbs' ) ) {
102
+ weaverx_clear_both();
103
+ ?>
104
+ <span class='submit' style='padding-top:6px;'><input class="button-primary" name="set_subtheme" type="submit" value="<?php _e( 'Set to Selected Subtheme', 'weaver-xtreme' /*adm*/ ); ?>"/></span>
105
+ <?php
106
+ }
107
+ ?>
108
+
109
+ </form>
110
+ <div style="clear:both;padding-top:6px;"></div>
111
+
112
+ <form enctype="multipart/form-data" name='hide_thumbs_form' method='post'>
113
+ <?php
114
+ $hide_msg = ( weaverx_getopt( '_hide_theme_thumbs' ) ) ? __( 'Show Subtheme Thumbnails', 'weaver-xtreme' /*adm*/ ) :
115
+ __( 'Hide Subtheme Thumbnails', 'weaver-xtreme' /*adm*/ );
116
+ ?>
117
+ <input class="button-primary" name="hide_thumbs" type="submit" value="<?php echo $hide_msg; ?>"/>
118
+ <?php weaverx_nonce_field( 'hide_thumbs' ); ?>
119
+ </form>
120
+ <div style="clear:both;"></div>
121
+ <hr/>
122
+ <?php
123
+ do_action( 'weaverx_child_show_extrathemes' );
124
+ do_action( 'weaverxplus_admin', 'show_subthemes' );
125
+ }
126
+
127
+ function weaverx_confirm_select_theme() {
128
+ ?>
129
+
130
+ <br/>
131
+ <input class="button-primary" type="submit" onSubmit="return confirm('<?php _e( 'Are you sure you want select a new theme? This will overwrite you existing theme settings.', 'weaver-xtreme' ); ?>');" name="set_subtheme" value="<?php _e( 'Set to Selected Subtheme', 'weaver-xtreme' /*adm*/ ); ?>"/>
132
+ <?php weaverx_nonce_field( 'set_subtheme' );
133
+ }
includes/wvrx-ts-runtime-lib.php CHANGED
@@ -1,200 +1,207 @@
1
  <?php
2
 
3
  // # Weaver X SW Globals ==============================================================
4
- $wvrx_ts_opts_cache = false; // internal cache for all settings
5
 
6
- function wvrx_ts_help_link($ref, $label) {
7
 
8
- $t_dir = wvrx_ts_plugins_url('/help/' . $ref, '');
9
- $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
- . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
- echo $pp_help ;
12
  }
13
 
14
 
15
  // =============================== options =============================
16
 
17
- add_filter('widget_text', 'do_shortcode'); // add shortcode processing to standard text widget
18
 
19
 
20
  // Interface to Weaver Xtreme
21
 
22
- function wvrx_ts_fix_short($prefix, $msg ) {
23
  if ( $prefix ) {
24
- $m = str_replace('[/', '////', $msg);
25
- $m = str_replace('[', '[' . $prefix, $m);
26
- echo str_replace('////', '[/' . $prefix, $m);
27
- }
28
- else
29
  echo $msg;
 
30
  }
31
 
32
 
33
-
34
- add_action('weaverx_theme_support_addon','wvrx_ts_theme_support_addon');
35
  function wvrx_ts_theme_support_addon() {
36
 
37
  $theme = get_template_directory();
38
 
39
- $is_xtreme = strpos( $theme, '/weaver-xtreme') !== false;
40
-
41
- ?>
42
- <div class="a-plus">
43
- <p><strong style="font-size:110%;"><?php
44
- if ($is_xtreme) _e('You have Weaver Xtreme Theme Support installed.','weaverx-theme-support' /*adm*/);
45
 
46
- echo ' (V ' . WVRX_TS_VERSION . ')'; ?></strong><br />
47
- <?php _e('This section shows the shortcodes and widgets available with Weaver Xtreme (and Foundation) Theme Support.
48
- Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.','weaverx-theme-support' /*adm*/); ?></p>
49
-
50
- <?php
51
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
52
- if ( $prefix )
53
- echo '<h3 style="color:red;">' . __("Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaverx-theme-support') . '</h3>';
54
- ?>
55
-
56
- <h3><?php _e('Shortcodes','weaverx-theme-support' /*adm*/); ?></h3>
57
- <ul>
58
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function','weaverx-theme-support' /*adm*/)); ?>
59
- <?php wvrx_ts_help_link('help.html#bloginfo',__('Help for Blog Info','weaverx-theme-support' /*adm*/));?><br />
60
- <code><?php wvrx_ts_fix_short($prefix, __("[bloginfo name='WP bloginfo name' style='style-rules']",'weaverx-theme-support' /*adm*/)); ?></code>
61
- </li>
62
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Box - [box]</span> - Display content in a Box','weaverx-theme-support' /*adm*/)); ?>
63
- <?php wvrx_ts_help_link('help.html#box',__('Help for Box','weaverx-theme-support' /*adm*/));?><br />
64
- <code><?php wvrx_ts_fix_short($prefix, __("[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]",'weaverx-theme-support' /*adm*/)); ?></code>
65
- </li>
66
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag','weaverx-theme-support' /*adm*/)); ?>
67
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Header Div','weaverx-theme-support' /*adm*/));?><br />
68
- <code><?php wvrx_ts_fix_short($prefix, __("[div id='class_id' class='class_name' style='style_values']text[/div]",'weaverx-theme-support' /*adm*/)); ?></code>
69
- </li>
70
- <li<?php wvrx_ts_fix_short($prefix, __('><span class="atw-blue">Header Image - [header_image]</span> - Display default header image','weaverx-theme-support' /*adm*/)); ?>
71
- <?php wvrx_ts_help_link('help.html#headerimage',__('Help for Header Image','weaverx-theme-support' /*adm*/));?><br />
72
- <code><?php wvrx_ts_fix_short($prefix, __("[header_image h='size' w='size' style='inline-style']",'weaverx-theme-support' /*adm*/)); ?></code>
73
- </li>
74
-
75
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">HTML - [html]</span> - Wrap content in any HTML tag','weaverx-theme-support' /*adm*/)); ?>
76
- <?php wvrx_ts_help_link('help.html#schtml',__('Help for HTML','weaverx-theme-support' /*adm*/));?><br />
77
- <code><?php wvrx_ts_fix_short($prefix, __("[html html-tag args='parameters']",'weaverx-theme-support' /*adm*/)); ?></code>
78
- </li>
79
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">iFrame - [iframe]</span> - Display external content in an iframe','weaverx-theme-support' /*adm*/)); ?>
80
- <?php wvrx_ts_help_link('help.html#sciframe',__('Help for iframe','weaverx-theme-support' /*adm*/));?><br />
81
- <code><?php wvrx_ts_fix_short($prefix, __("[iframe src='//example.com' height=600 percent=100 style='style']",'weaverx-theme-support' /*adm*/)); ?></code>
82
- </li>
83
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Login - [login style="CSS Style"]</span> - Show simple Login/Logout link','weaverx-theme-support' /*adm*/)); ?>
84
- <?php wvrx_ts_help_link('help.html#sclogin',__('Help for login','weaverx-theme-support' /*adm*/));?><br />
85
- <code><?php wvrx_ts_fix_short($prefix, __("[login style=\"CSS Style\"]",'weaverx-theme-support' /*adm*/)); ?></code>
86
- </li>
87
-
88
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions','weaverx-theme-support' /*adm*/)); ?>
89
- <?php wvrx_ts_help_link('help.html#scshowif',__('Help for Show/Hide If','weaverx-theme-support' /*adm*/));?><br />
90
- <code><?php wvrx_ts_fix_short($prefix, __('[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]','weaverx-theme-support' /*adm*/)); ?></code>
91
- </li>
92
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Hide If - [hide_if]</span> - Hide content','weaverx-theme-support' /*adm*/)); ?>
93
- </li>
94
-
95
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline','weaverx-theme-support' /*adm*/)); ?>
96
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Tagline','weaverx-theme-support' /*adm*/));?><br />
97
- <code><?php wvrx_ts_fix_short($prefix, __("[site_tagline style='inline-style']",'weaverx-theme-support' /*adm*/)); ?></code>
98
- </li>
99
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title','weaverx-theme-support' /*adm*/)); ?>
100
- <?php wvrx_ts_help_link('help.html#sitetitlesc',__('Help for Site Title','weaverx-theme-support' /*adm*/));?><br />
101
- <code><?php wvrx_ts_fix_short($prefix, __("[site_title style='inline-style']",'weaverx-theme-support' /*adm*/)); ?></code>
102
- </li>
103
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag','weaverx-theme-support' /*adm*/)); ?>
104
- <?php wvrx_ts_help_link('help.html#scdiv',__('Help for Span','weaverx-theme-support' /*adm*/));?><br />
105
- <code><?php wvrx_ts_fix_short($prefix, __("[span id='class_id' class='class_name' style='style_values']text[/span]",'weaverx-theme-support' /*adm*/)); ?></code>
106
- </li>
107
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Tab Group - [tab_group]</span> - Display content on separate tabs','weaverx-theme-support' /*adm*/));?>
108
- <?php wvrx_ts_help_link('help.html#tab_group',__('Help for Tab Group','weaverx-theme-support' /*adm*/));?><br />
109
- <code><?php wvrx_ts_fix_short($prefix, __('[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]','weaverx-theme-support' /*adm*/)); ?></code>
110
- </li>
111
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options','weaverx-theme-support' /*adm*/)); ?>
112
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaverx-theme-support' /*adm*/));?><br />
113
- <code><?php wvrx_ts_fix_short($prefix, __('[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]','weaverx-theme-support' /*adm*/)); ?></code>
114
- </li>
115
-
116
- <li><?php wvrx_ts_fix_short($prefix, __('<span class="atw-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options','weaverx-theme-support' /*adm*/)); ?>
117
- <?php wvrx_ts_help_link('help.html#video',__('Help for Video','weaverx-theme-support' /*adm*/));?><br />
118
- <code><?php wvrx_ts_fix_short($prefix, __('[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]','weaverx-theme-support' /*adm*/)); ?></code>
119
- </li>
120
- </ul>
121
- <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
122
-
123
- <?php
124
- if ( $is_xtreme ) {
125
- if ( $prefix )
126
- $button = __("Remove 'wvrx_' prefix from shortcode names: [ bloginfo ], etc.", 'weaverx-theme-support');
127
- else
128
- $button = __("Add 'wvrx_' to shortcode names: [ wvrx_bloginfo ], etc.", 'weaverx-theme-support');
129
  ?>
130
- <div style="clear:both;"></div>
131
- <span class='submit'><input class="button-primary" name="toggle_shortcode_prefix" type="submit" value="<?php echo $button; ?>" /></span>
132
- <br /><small> <?php _e("To avoid conflicts with other plugins, you can add a 'wvrx_' prefix to these shortcodes.", 'weaver-xtreme /*adm*/'); ?> </small>
133
- <?php weaverx_nonce_field('toggle_shortcode_prefix'); ?>
134
- </form>
135
- <?php } ?>
136
- <br />
137
-
138
- <h3><?php _e('Widgets','weaverx-theme-support' /*adm*/); ?></h3>
139
- <ul>
140
- <li><?php _e('<span class="atw-blue">Weaver Login Widget</span> - Simplified login widget','weaverx-theme-support' /*adm*/); ?>
141
- <?php wvrx_ts_help_link('help.html#widg-login',__('Help for Login Widget','weaverx-theme-support' /*adm*/));?>
142
- </li>
143
-
144
- <li><?php _e('<span class="atw-blue">Weaver Per Page Text</span> - Display text on a per page basis, based on a Custom Field value','weaverx-theme-support' /*adm*/); ?>
145
- <?php wvrx_ts_help_link('help.html##widg_pp_text',__('Help for Per Page Text Widget','weaverx-theme-support' /*adm*/));?>
146
- </li>
147
-
148
- <li><?php _e('<span class="atw-blue">Weaver Text 2 Col</span> - Display text in two columns - great for wide top/bottom widgets','weaverx-theme-support' /*adm*/); ?>
149
- <?php wvrx_ts_help_link('help.html#widg_text_2',__('Help for Two Column Text Widget','weaverx-theme-support' /*adm*/));?>
150
- </li>
151
- </ul>
152
-
153
- <?php if ( $is_xtreme ) { ?>
154
- <h3><?php _e('Per Page/Post Settings','weaverx-theme-support' /*adm*/); ?></h3>
155
- <p> <?php _e("Click the following button to produce a list of links to all pages and posts that have Per Page or Per Post settings.", 'weaver-xtreme /*adm*/'); ?></p>
156
- <div style="clear:both;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
158
- <span class='submit'><input class="button-primary" name="show_per_page_report" type="submit" value="<?php _e('Show Pages and Posts with Per Page/Post Settings', 'weaver-xtreme /*adm*/'); ?>" /></span>
159
- <?php weaverx_nonce_field('show_per_page_report'); ?>
160
- </form><br /><br />
161
- <?php } ?>
162
- </div>
163
 
164
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  }
166
 
167
 
168
-
169
-
170
- add_action('weaverx_more_help', 'weaverx_ts_more_help');
171
  function weaverx_ts_more_help() {
172
- ?>
173
- <div style="clear:both;"></div>
174
- <hr />
175
- <script>jQuery(document).ready(function(){jQuery('#wvrx-sysinfo').click(function(){jQuery('#wvrx-sysinfo').copyme();});
176
- jQuery('#btn-sysinfo').click(function(){jQuery('#wvrx-sysinfo').copyme();}); });</script>
177
-
178
- <h3><?php _e('Your System and Configuration Info','weaverx-theme-support' /*adm*/); ?></h3>
179
- <?php
180
- $sys = weaverx_ts_get_sysinfo();
181
- ?>
182
- <div style="float:left;max-width:60%;"><textarea id="wvrx-sysinfo" readonly class="wvrx-sysinfo no-autosize" style="font-family:monospace;" rows="12" cols="50"><?php echo $sys;?></textarea></div>
183
- <div style="margin-left:20px;max-width:40%;float:left;"><?php _e('<p>This information can be used to help us diagnose issues you might be having with Weaver Xtreme.
 
 
 
 
 
 
184
  If you are asked by a moderator on the <a href="//forum.weavertheme.com" target="_blank">Weaver Xtreme Support Forum</a>, please use the "Copy to Clipboard"
185
  button and then Paste the Sysinfo report directly into a Forum post.</p>
186
  <p>Please note that there is no personally identifying data in this report except your site\'s URL. Having your site URL is important to help us
187
- diagnose the problem, but you can delete it from your forum post right after you paste if you need to.</p>','weaverx-theme-support');?></div>
188
- <div style="clear:both;margin-bottom:20px;"></div>
189
 
190
- <button id="btn-sysinfo" class="button-primary">Copy To Clipboard</button>
191
- <?php
192
  //if (WEAVERX_DEV_MODE && isset($GLOBALS['POST_COPY']) && $GLOBALS['POST_COPY'] != false ) {
193
  // echo '<pre>$_POST:'; var_dump($GLOBALS['POST_COPY']); echo '</pre>';
194
  //}
195
  }
196
 
197
- add_action('weaverx_ts_show_version','weaverx_ts_show_version_action');
198
  function weaverx_ts_show_version_action() {
199
  echo "<!-- Weaver Xtreme Theme Support " . WVRX_TS_VERSION . " --> ";
200
  }
@@ -202,95 +209,100 @@ function weaverx_ts_show_version_action() {
202
 
203
  function weaverx_ts_get_sysinfo() {
204
 
205
- global $wpdb;
206
-
207
- $theme = wp_get_theme()->Name . ' (' . wp_get_theme()->Version .')';
208
- $frontpage = get_option( 'page_on_front' );
209
- $frontpost = get_option( 'page_for_posts' );
210
- $fr_page = $frontpage ? get_the_title( $frontpage ).' (ID# '.$frontpage.')'.'' : 'n/a';
211
- $fr_post = $frontpage ? get_the_title( $frontpost ).' (ID# '.$frontpost.')'.'' : 'n/a';
212
- $jquchk = wp_script_is( 'jquery', 'registered' ) ? $GLOBALS['wp_scripts']->registered['jquery']->ver : 'n/a';
213
-
214
- $return = '### Weaver System Info ###' . "\n\n";
215
-
216
- // Basic site info
217
- $return .= ' -- WordPress Configuration --' . "\n\n";
218
- $return .= 'Site URL: ' . site_url() . "\n";
219
- $return .= 'Home URL: ' . home_url() . "\n";
220
- $return .= 'Multisite: ' . ( is_multisite() ? 'Yes' : 'No' ) . "\n";
221
- $return .= 'Version: ' . get_bloginfo( 'version' ) . "\n";
222
- $return .= 'Language: ' . get_locale() . "\n";
223
- //$return .= 'Table Prefix: ' . 'Length: ' . strlen( $wpdb->prefix ) . "\n";
224
- $return .= 'WP_DEBUG: ' . ( defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' : 'Disabled' : 'Not set' ) . "\n";
225
- $return .= 'WP Memory Limit: ' . WP_MEMORY_LIMIT . "\n";
226
- $return .= 'Permalink: ' . get_option( 'permalink_structure' ) ."\n";
227
- $return .= 'Show On Front: ' . get_option( 'show_on_front' ) . "\n";
228
- $return .= 'Page On Front: ' . $fr_page . "\n";
229
- $return .= 'Page For Posts: ' . $fr_post . "\n";
230
- $return .= 'Current Theme: ' . $theme . "\n";
231
- $return .= 'Post Types: ' . implode( ', ', get_post_types( '', 'names' ) )."\n";
232
-
233
- // Plugin Configuration
234
- $return .= "\n" . ' -- Weaver Xtreme Configuration --' . "\n\n";
235
- $return .= 'Weaver Xtreme Version: ' . WEAVERX_VERSION . "\n";
236
- $return .= ' Theme Support Version: ' . WVRX_TS_VERSION . "\n";
237
- if ( defined( 'WEAVER_XPLUS_VERSION' ) )
238
  $return .= ' Xtreme Plus Version: ' . WEAVER_XPLUS_VERSION . "\n";
 
239
 
240
- // Server Configuration
241
- $return .= "\n" . ' -- Server Configuration --' . "\n\n";
242
- $return .= 'Operating System: ' . php_uname( 's' ) . "\n";
243
- $return .= 'PHP Version: ' . PHP_VERSION . "\n";
244
- $return .= 'MySQL Version: ' . $wpdb->db_version() . "\n";
245
- $return .= 'jQuery Version: ' . $jquchk . "\n";
246
-
247
- $return .= 'Server Software: ' . $_SERVER['SERVER_SOFTWARE'] . "\n";
248
-
249
- // PHP configs... now we're getting to the important stuff
250
- $return .= "\n" . ' -- PHP Configuration --' . "\n\n";
251
- //$return .= 'Safe Mode: ' . ( ini_get( 'safe_mode' ) ? 'Enabled' : 'Disabled' . "\n" );
252
- $return .= 'Local Memory Limit: ' . ini_get( 'memory_limit' ) . "\n";
253
- $return .= 'Server Memory Limit: ' . get_cfg_var('memory_limit') . "\n";
254
- $return .= 'Post Max Size: ' . ini_get( 'post_max_size' ) . "\n";
255
- $return .= 'Upload Max Filesize: ' . ini_get( 'upload_max_filesize' ) . "\n";
256
- $return .= 'Time Limit: ' . ini_get( 'max_execution_time' ) . "\n";
257
- $return .= 'Max Input Vars: ' . ini_get( 'max_input_vars' ) . "\n";
258
- $return .= 'Display Errors: ' . ( ini_get( 'display_errors' ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A' ) . "\n";
259
-
260
- // WordPress active plugins
261
- $return .= "\n" . ' -- WordPress Active Plugins --' . "\n\n";
262
- $plugins = get_plugins();
263
- $active_plugins = get_option( 'active_plugins', array() );
264
- foreach( $plugins as $plugin_path => $plugin ) {
265
- if( !in_array( $plugin_path, $active_plugins ) )
266
- continue;
267
- $return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
268
  }
 
 
269
 
270
- // WordPress inactive plugins
271
- $return .= "\n" . ' -- WordPress Inactive Plugins --' . "\n\n";
272
- foreach( $plugins as $plugin_path => $plugin ) {
273
- if( in_array( $plugin_path, $active_plugins ) )
274
- continue;
275
- $return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
276
  }
 
 
277
 
278
- if( is_multisite() ) {
279
- // WordPress Multisite active plugins
280
- $return .= "\n" . ' -- Network Active Plugins --' . "\n\n";
281
- $plugins = wp_get_active_network_plugins();
282
- $active_plugins = get_site_option( 'active_sitewide_plugins', array() );
283
- foreach( $plugins as $plugin_path ) {
284
- $plugin_base = plugin_basename( $plugin_path );
285
- if( !array_key_exists( $plugin_base, $active_plugins ) )
286
- continue;
287
- $plugin = get_plugin_data( $plugin_path );
288
- $return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
289
  }
 
 
290
  }
 
 
 
291
 
292
- $return .= "\n" . '### End System Info ###' . "\n";
293
- return $return;
294
  }
295
 
296
  // ======== fallback file support ======
@@ -301,15 +313,15 @@ function weaverx_ts_write_to_upload( $filename, $output ) {
301
  // recreate the directory name
302
 
303
  $upload_dir = wp_upload_dir(); // Grab uploads folder array
304
- $dir = trailingslashit( $upload_dir['basedir'] ) . 'weaverx-subthemes'. DIRECTORY_SEPARATOR; // Set storage directory path
305
 
306
- if (! wp_mkdir_p($dir) ) {
307
- weaverx_f_file_access_fail(__('Directory not writable to save editor style file. You will have to check with your hosting company to have your installation fixed to allow directories to be created. Directory: ', 'weaver-xtreme' /*adm*/) . $dir);
308
  }
309
 
310
- $file = fopen ($dir . $filename, 'w');
311
- if ( fwrite($file, $output) == false ) {
312
- weaverx_f_file_access_fail(__('Unable to save editor style file. You will have to check with your hosting company to have your installation fixed to allow files to be created.', 'weaver-xtreme' /*adm*/) . $dir);
313
  }
314
  fclose( $file );
315
  }
1
  <?php
2
 
3
  // # Weaver X SW Globals ==============================================================
4
+ $wvrx_ts_opts_cache = false; // internal cache for all settings
5
 
6
+ function wvrx_ts_help_link( $ref, $label ) {
7
 
8
+ $t_dir = wvrx_ts_plugins_url( '/help/' . $ref, '' );
9
+ $pp_help = '<a style="text-decoration:none;" href="' . $t_dir . '" target="_blank" title="' . $label . '">'
10
+ . '<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span></a>';
11
+ echo $pp_help;
12
  }
13
 
14
 
15
  // =============================== options =============================
16
 
17
+ add_filter( 'widget_text', 'do_shortcode' ); // add shortcode processing to standard text widget
18
 
19
 
20
  // Interface to Weaver Xtreme
21
 
22
+ function wvrx_ts_fix_short( $prefix, $msg ) {
23
  if ( $prefix ) {
24
+ $m = str_replace( '[/', '////', $msg );
25
+ $m = str_replace( '[', '[' . $prefix, $m );
26
+ echo str_replace( '////', '[/' . $prefix, $m );
27
+ } else {
 
28
  echo $msg;
29
+ }
30
  }
31
 
32
 
33
+ add_action( 'weaverx_theme_support_addon', 'wvrx_ts_theme_support_addon' );
 
34
  function wvrx_ts_theme_support_addon() {
35
 
36
  $theme = get_template_directory();
37
 
38
+ $is_xtreme = strpos( $theme, '/weaver-xtreme' ) !== false;
 
 
 
 
 
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  ?>
41
+ <div class="a-plus">
42
+ <p><strong style="font-size:110%;"><?php
43
+ if ( $is_xtreme ) {
44
+ _e( 'You have Weaver Xtreme Theme Support installed.', 'weaverx-theme-support' /*adm*/ );
45
+ }
46
+
47
+ echo ' (V ' . WVRX_TS_VERSION . ')'; ?></strong><br/>
48
+ <?php _e( 'This section shows the shortcodes and widgets available with Weaver Xtreme (and Foundation) Theme Support.
49
+ Click the<span style="color:red; vertical-align: middle; margin-left:.25em;" class="dashicons dashicons-editor-help"></span> button to open help entry.', 'weaverx-theme-support' /*adm*/ ); ?></p>
50
+
51
+ <?php
52
+ $prefix = get_option( 'wvrx_toggle_shortcode_prefix' );
53
+ if ( $prefix ) {
54
+ echo '<h3 style="color:red;">' . __( "Weaver Xtreme Theme Support Shortcodes now prefixed with 'wvrx_'", 'weaverx-theme-support' ) . '</h3>';
55
+ }
56
+ ?>
57
+
58
+ <h3><?php _e( 'Shortcodes', 'weaverx-theme-support' /*adm*/ ); ?></h3>
59
+ <ul>
60
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Blog Info - [bloginfo]</span> - Display blog info as provided by WordPress bloginfo function', 'weaverx-theme-support' /*adm*/ ) ); ?>
61
+ <?php wvrx_ts_help_link( 'help.html#bloginfo', __( 'Help for Blog Info', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
62
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[bloginfo name='WP bloginfo name' style='style-rules']", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
63
+ </li>
64
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Box - [box]</span> - Display content in a Box', 'weaverx-theme-support' /*adm*/ ) ); ?>
65
+ <?php wvrx_ts_help_link( 'help.html#box', __( 'Help for Box', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
66
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[box background=#fff align=left border=true border_rule='border-css' border_radius=4 color=#000 margin=1 padding=1 shadow=1 style='style-rules' width=100]text[/box]", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
67
+ </li>
68
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">DIV - [div]text[/div]</span> - Wrap content in a &lt;div&gt; tag', 'weaverx-theme-support' /*adm*/ ) ); ?>
69
+ <?php wvrx_ts_help_link( 'help.html#scdiv', __( 'Help for Header Div', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
70
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[div id='class_id' class='class_name' style='style_values']text[/div]", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
71
+ </li>
72
+ <li<?php wvrx_ts_fix_short( $prefix, __( '><span class="atw-blue">Header Image - [header_image]</span> - Display default header image', 'weaverx-theme-support' /*adm*/ ) ); ?>
73
+ <?php wvrx_ts_help_link( 'help.html#headerimage', __( 'Help for Header Image', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
74
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[header_image h='size' w='size' style='inline-style']", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
75
+ </li>
76
+
77
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">HTML - [html]</span> - Wrap content in any HTML tag', 'weaverx-theme-support' /*adm*/ ) ); ?>
78
+ <?php wvrx_ts_help_link( 'help.html#schtml', __( 'Help for HTML', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
79
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[html html-tag args='parameters']", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
80
+ </li>
81
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">iFrame - [iframe]</span> - Display external content in an iframe', 'weaverx-theme-support' /*adm*/ ) ); ?>
82
+ <?php wvrx_ts_help_link( 'help.html#sciframe', __( 'Help for iframe', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
83
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[iframe src='//example.com' height=600 percent=100 style='style']", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
84
+ </li>
85
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Login - [login style="CSS Style"]</span> - Show simple Login/Logout link', 'weaverx-theme-support' /*adm*/ ) ); ?>
86
+ <?php wvrx_ts_help_link( 'help.html#sclogin', __( 'Help for login', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
87
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[login style=\"CSS Style\"]", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
88
+ </li>
89
+
90
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Show If- [show_if]</span> - Show content only if args meet specified conditions', 'weaverx-theme-support' /*adm*/ ) ); ?>
91
+ <?php wvrx_ts_help_link( 'help.html#scshowif', __( 'Help for Show/Hide If', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
92
+ <code><?php wvrx_ts_fix_short( $prefix, __( '[show|hide_if device=device logged_in=true/false not_post_id=id-list post_id=id-list user_can=what]text[/show|hide_if]', 'weaverx-theme-support' /*adm*/ ) ); ?></code>
93
+ </li>
94
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Hide If - [hide_if]</span> - Hide content', 'weaverx-theme-support' /*adm*/ ) ); ?>
95
+ </li>
96
+
97
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Site Tagline - [site_tagline style="style" matchtheme=false]</span> - Display the site tagline', 'weaverx-theme-support' /*adm*/ ) ); ?>
98
+ <?php wvrx_ts_help_link( 'help.html#sitetitlesc', __( 'Help for Site Tagline', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
99
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[site_tagline style='inline-style']", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
100
+ </li>
101
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Site Title - [site_title style="style" matchtheme=false]</span> - Display the site title', 'weaverx-theme-support' /*adm*/ ) ); ?>
102
+ <?php wvrx_ts_help_link( 'help.html#sitetitlesc', __( 'Help for Site Title', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
103
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[site_title style='inline-style']", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
104
+ </li>
105
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">SPAN - [span]text[/span]</span> - Wrap content in a &lt;span&gt; tag', 'weaverx-theme-support' /*adm*/ ) ); ?>
106
+ <?php wvrx_ts_help_link( 'help.html#scdiv', __( 'Help for Span', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
107
+ <code><?php wvrx_ts_fix_short( $prefix, __( "[span id='class_id' class='class_name' style='style_values']text[/span]", 'weaverx-theme-support' /*adm*/ ) ); ?></code>
108
+ </li>
109
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Tab Group - [tab_group]</span> - Display content on separate tabs', 'weaverx-theme-support' /*adm*/ ) ); ?>
110
+ <?php wvrx_ts_help_link( 'help.html#tab_group', __( 'Help for Tab Group', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
111
+ <code><?php wvrx_ts_fix_short( $prefix, __( '[tab_group][tab]...[/tab][tab]...[/tab][/tab_group]', 'weaverx-theme-support' /*adm*/ ) ); ?></code>
112
+ </li>
113
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">Vimeo - [vimeo]</span> - Display video from Vimeo responsively, with options', 'weaverx-theme-support' /*adm*/ ) ); ?>
114
+ <?php wvrx_ts_help_link( 'help.html#video', __( 'Help for Video', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
115
+ <code><?php wvrx_ts_fix_short( $prefix, __( '[vimeo vimeo-url id=videoid sd=0 percent=100 center=1 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1]', 'weaverx-theme-support' /*adm*/ ) ); ?></code>
116
+ </li>
117
+
118
+ <li><?php wvrx_ts_fix_short( $prefix, __( '<span class="atw-blue">YouTube - [youtube]</span> - Display video from YouTube responsively, with options', 'weaverx-theme-support' /*adm*/ ) ); ?>
119
+ <?php wvrx_ts_help_link( 'help.html#video', __( 'Help for Video', 'weaverx-theme-support' /*adm*/ ) ); ?><br/>
120
+ <code><?php wvrx_ts_fix_short( $prefix, __( '[youtube youtube-url id=videoid sd=0 percent=100 center=1 rel=0 privacy=0 see_help_for_others]', 'weaverx-theme-support' /*adm*/ ) ); ?></code>
121
+ </li>
122
+ </ul>
123
  <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
 
 
 
 
 
124
 
125
+ <?php
126
+ if ( $is_xtreme ) {
127
+ if ( $prefix ) {
128
+ $button = __( "Remove 'wvrx_' prefix from shortcode names: [ bloginfo ], etc.", 'weaverx-theme-support' );
129
+ } else {
130
+ $button = __( "Add 'wvrx_' to shortcode names: [ wvrx_bloginfo ], etc.", 'weaverx-theme-support' );
131
+ }
132
+ ?>
133
+ <div style="clear:both;"></div>
134
+ <span class='submit'><input class="button-primary" name="toggle_shortcode_prefix" type="submit" value="<?php echo $button; ?>"/></span>
135
+ <br/><small> <?php _e( "To avoid conflicts with other plugins, you can add a 'wvrx_' prefix to these shortcodes.", 'weaver-xtreme /*adm*/' ); ?> </small>
136
+ <?php weaverx_nonce_field( 'toggle_shortcode_prefix' ); ?>
137
+ </form>
138
+ <?php } ?>
139
+ <br/>
140
+
141
+ <h3><?php _e( 'Widgets', 'weaverx-theme-support' /*adm*/ ); ?></h3>
142
+ <ul>
143
+ <li><?php _e( '<span class="atw-blue">Weaver Login Widget</span> - Simplified login widget', 'weaverx-theme-support' /*adm*/ ); ?>
144
+ <?php wvrx_ts_help_link( 'help.html#widg-login', __( 'Help for Login Widget', 'weaverx-theme-support' /*adm*/ ) ); ?>
145
+ </li>
146
+
147
+ <li><?php _e( '<span class="atw-blue">Weaver Per Page Text</span> - Display text on a per page basis, based on a Custom Field value', 'weaverx-theme-support' /*adm*/ ); ?>
148
+ <?php wvrx_ts_help_link( 'help.html##widg_pp_text', __( 'Help for Per Page Text Widget', 'weaverx-theme-support' /*adm*/ ) ); ?>
149
+ </li>
150
+
151
+ <li><?php _e( '<span class="atw-blue">Weaver Text 2 Col</span> - Display text in two columns - great for wide top/bottom widgets', 'weaverx-theme-support' /*adm*/ ); ?>
152
+ <?php wvrx_ts_help_link( 'help.html#widg_text_2', __( 'Help for Two Column Text Widget', 'weaverx-theme-support' /*adm*/ ) ); ?>
153
+ </li>
154
+ </ul>
155
+
156
+ <?php if ( $is_xtreme ) { ?>
157
+ <h3><?php _e( 'Per Page/Post Settings', 'weaverx-theme-support' /*adm*/ ); ?></h3>
158
+ <p> <?php _e( "Click the following button to produce a list of links to all pages and posts that have Per Page or Per Post settings.", 'weaver-xtreme /*adm*/' ); ?></p>
159
+ <div style="clear:both;"></div>
160
+ <form enctype="multipart/form-data" name='toggle_shortcode' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
161
+ <span class='submit'><input class="button-primary" name="show_per_page_report" type="submit" value="<?php _e( 'Show Pages and Posts with Per Page/Post Settings', 'weaver-xtreme /*adm*/' ); ?>"/></span>
162
+ <?php weaverx_nonce_field( 'show_per_page_report' ); ?>
163
+ </form><br/><br/>
164
+ <?php } ?>
165
+ </div>
166
+
167
+ <?php
168
  }
169
 
170
 
171
+ add_action( 'weaverx_more_help', 'weaverx_ts_more_help' );
 
 
172
  function weaverx_ts_more_help() {
173
+ ?>
174
+ <div style="clear:both;"></div>
175
+ <hr/>
176
+ <script>jQuery(document).ready(function () {
177
+ jQuery('#wvrx-sysinfo').click(function () {
178
+ jQuery('#wvrx-sysinfo').copyme();
179
+ });
180
+ jQuery('#btn-sysinfo').click(function () {
181
+ jQuery('#wvrx-sysinfo').copyme();
182
+ });
183
+ });</script>
184
+
185
+ <h3><?php _e( 'Your System and Configuration Info', 'weaverx-theme-support' /*adm*/ ); ?></h3>
186
+ <?php
187
+ $sys = weaverx_ts_get_sysinfo();
188
+ ?>
189
+ <div style="float:left;max-width:60%;"><textarea id="wvrx-sysinfo" readonly class="wvrx-sysinfo no-autosize" style="font-family:monospace;" rows="12" cols="50"><?php echo $sys; ?></textarea></div>
190
+ <div style="margin-left:20px;max-width:40%;float:left;"><?php _e( '<p>This information can be used to help us diagnose issues you might be having with Weaver Xtreme.
191
  If you are asked by a moderator on the <a href="//forum.weavertheme.com" target="_blank">Weaver Xtreme Support Forum</a>, please use the "Copy to Clipboard"
192
  button and then Paste the Sysinfo report directly into a Forum post.</p>
193
  <p>Please note that there is no personally identifying data in this report except your site\'s URL. Having your site URL is important to help us
194
+ diagnose the problem, but you can delete it from your forum post right after you paste if you need to.</p>', 'weaverx-theme-support' ); ?></div>
195
+ <div style="clear:both;margin-bottom:20px;"></div>
196
 
197
+ <button id="btn-sysinfo" class="button-primary">Copy To Clipboard</button>
198
+ <?php
199
  //if (WEAVERX_DEV_MODE && isset($GLOBALS['POST_COPY']) && $GLOBALS['POST_COPY'] != false ) {
200
  // echo '<pre>$_POST:'; var_dump($GLOBALS['POST_COPY']); echo '</pre>';
201
  //}
202
  }
203
 
204
+ add_action( 'weaverx_ts_show_version', 'weaverx_ts_show_version_action' );
205
  function weaverx_ts_show_version_action() {
206
  echo "<!-- Weaver Xtreme Theme Support " . WVRX_TS_VERSION . " --> ";
207
  }
209
 
210
  function weaverx_ts_get_sysinfo() {
211
 
212
+ global $wpdb;
213
+
214
+ $theme = wp_get_theme()->Name . ' (' . wp_get_theme()->Version . ')';
215
+ $frontpage = get_option( 'page_on_front' );
216
+ $frontpost = get_option( 'page_for_posts' );
217
+ $fr_page = $frontpage ? get_the_title( $frontpage ) . ' (ID# ' . $frontpage . ')' . '' : 'n/a';
218
+ $fr_post = $frontpage ? get_the_title( $frontpost ) . ' (ID# ' . $frontpost . ')' . '' : 'n/a';
219
+ $jquchk = wp_script_is( 'jquery', 'registered' ) ? $GLOBALS['wp_scripts']->registered['jquery']->ver : 'n/a';
220
+
221
+ $return = '### Weaver System Info ###' . "\n\n";
222
+
223
+ // Basic site info
224
+ $return .= ' -- WordPress Configuration --' . "\n\n";
225
+ $return .= 'Site URL: ' . site_url() . "\n";
226
+ $return .= 'Home URL: ' . home_url() . "\n";
227
+ $return .= 'Multisite: ' . ( is_multisite() ? 'Yes' : 'No' ) . "\n";
228
+ $return .= 'Version: ' . get_bloginfo( 'version' ) . "\n";
229
+ $return .= 'Language: ' . get_locale() . "\n";
230
+ //$return .= 'Table Prefix: ' . 'Length: ' . strlen( $wpdb->prefix ) . "\n";
231
+ $return .= 'WP_DEBUG: ' . ( defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' : 'Disabled' : 'Not set' ) . "\n";
232
+ $return .= 'WP Memory Limit: ' . WP_MEMORY_LIMIT . "\n";
233
+ $return .= 'Permalink: ' . get_option( 'permalink_structure' ) . "\n";
234
+ $return .= 'Show On Front: ' . get_option( 'show_on_front' ) . "\n";
235
+ $return .= 'Page On Front: ' . $fr_page . "\n";
236
+ $return .= 'Page For Posts: ' . $fr_post . "\n";
237
+ $return .= 'Current Theme: ' . $theme . "\n";
238
+ $return .= 'Post Types: ' . implode( ', ', get_post_types( '', 'names' ) ) . "\n";
239
+
240
+ // Plugin Configuration
241
+ $return .= "\n" . ' -- Weaver Xtreme Configuration --' . "\n\n";
242
+ $return .= 'Weaver Xtreme Version: ' . WEAVERX_VERSION . "\n";
243
+ $return .= ' Theme Support Version: ' . WVRX_TS_VERSION . "\n";
244
+ if ( defined( 'WEAVER_XPLUS_VERSION' ) ) {
245
  $return .= ' Xtreme Plus Version: ' . WEAVER_XPLUS_VERSION . "\n";
246
+ }
247
 
248
+ // Server Configuration
249
+ $return .= "\n" . ' -- Server Configuration --' . "\n\n";
250
+ $return .= 'Operating System: ' . php_uname( 's' ) . "\n";
251
+ $return .= 'PHP Version: ' . PHP_VERSION . "\n";
252
+ $return .= 'MySQL Version: ' . $wpdb->db_version() . "\n";
253
+ $return .= 'jQuery Version: ' . $jquchk . "\n";
254
+
255
+ $return .= 'Server Software: ' . $_SERVER['SERVER_SOFTWARE'] . "\n";
256
+
257
+ // PHP configs... now we're getting to the important stuff
258
+ $return .= "\n" . ' -- PHP Configuration --' . "\n\n";
259
+ //$return .= 'Safe Mode: ' . ( ini_get( 'safe_mode' ) ? 'Enabled' : 'Disabled' . "\n" );
260
+ $return .= 'Local Memory Limit: ' . ini_get( 'memory_limit' ) . "\n";
261
+ $return .= 'Server Memory Limit: ' . get_cfg_var( 'memory_limit' ) . "\n";
262
+ $return .= 'Post Max Size: ' . ini_get( 'post_max_size' ) . "\n";
263
+ $return .= 'Upload Max Filesize: ' . ini_get( 'upload_max_filesize' ) . "\n";
264
+ $return .= 'Time Limit: ' . ini_get( 'max_execution_time' ) . "\n";
265
+ $return .= 'Max Input Vars: ' . ini_get( 'max_input_vars' ) . "\n";
266
+ $return .= 'Display Errors: ' . ( ini_get( 'display_errors' ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A' ) . "\n";
267
+
268
+ // WordPress active plugins
269
+ $return .= "\n" . ' -- WordPress Active Plugins --' . "\n\n";
270
+ $plugins = get_plugins();
271
+ $active_plugins = get_option( 'active_plugins', array() );
272
+ foreach ( $plugins as $plugin_path => $plugin ) {
273
+ if ( ! in_array( $plugin_path, $active_plugins ) ) {
274
+ continue;
 
275
  }
276
+ $return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
277
+ }
278
 
279
+ // WordPress inactive plugins
280
+ $return .= "\n" . ' -- WordPress Inactive Plugins --' . "\n\n";
281
+ foreach ( $plugins as $plugin_path => $plugin ) {
282
+ if ( in_array( $plugin_path, $active_plugins ) ) {
283
+ continue;
 
284
  }
285
+ $return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
286
+ }
287
 
288
+ if ( is_multisite() ) {
289
+ // WordPress Multisite active plugins
290
+ $return .= "\n" . ' -- Network Active Plugins --' . "\n\n";
291
+ $plugins = wp_get_active_network_plugins();
292
+ $active_plugins = get_site_option( 'active_sitewide_plugins', array() );
293
+ foreach ( $plugins as $plugin_path ) {
294
+ $plugin_base = plugin_basename( $plugin_path );
295
+ if ( ! array_key_exists( $plugin_base, $active_plugins ) ) {
296
+ continue;
 
 
297
  }
298
+ $plugin = get_plugin_data( $plugin_path );
299
+ $return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
300
  }
301
+ }
302
+
303
+ $return .= "\n" . '### End System Info ###' . "\n";
304
 
305
+ return $return;
 
306
  }
307
 
308
  // ======== fallback file support ======
313
  // recreate the directory name
314
 
315
  $upload_dir = wp_upload_dir(); // Grab uploads folder array
316
+ $dir = trailingslashit( $upload_dir['basedir'] ) . 'weaverx-subthemes' . DIRECTORY_SEPARATOR; // Set storage directory path
317
 
318
+ if ( ! wp_mkdir_p( $dir ) ) {
319
+ weaverx_f_file_access_fail( __( 'Directory not writable to save editor style file. You will have to check with your hosting company to have your installation fixed to allow directories to be created. Directory: ', 'weaver-xtreme' /*adm*/ ) . $dir );
320
  }
321
 
322
+ $file = fopen( $dir . $filename, 'w' );
323
+ if ( fwrite( $file, $output ) == false ) {
324
+ weaverx_f_file_access_fail( __( 'Unable to save editor style file. You will have to check with your hosting company to have your installation fixed to allow files to be created.', 'weaver-xtreme' /*adm*/ ) . $dir );
325
  }
326
  fclose( $file );
327
  }
includes/wvrx-ts-shortcodes.php CHANGED
@@ -5,266 +5,291 @@
5
 
6
  function wvrx_ts_setup_shortcodes() {
7
 
8
- $codes = array( // list of shortcodes
9
- 'bloginfo' => 'wvrx_ts_sc_bloginfo', // [bloginfo]
10
- 'box' => 'wvrx_ts_sc_box', // [box]
11
- 'div' => 'wvrx_ts_sc_div', // [div]
12
- 'header_image' => 'wvrx_ts_sc_header_image', // [header_image]
13
- 'hide_if' => 'wvrx_ts_sc_hide_if' , // [hide_if]
14
- 'html' => 'wvrx_ts_sc_html', // [html]
15
- 'iframe' => 'wvrx_ts_sc_iframe', // [iframe]
16
- 'login' => 'wvrx_ts_sc_login', // [login]
17
- 'show_if' => 'wvrx_ts_sc_show_if' , // [show_if]
18
- 'span' => 'wvrx_ts_sc_span', // [span]
19
- 'site_tagline' => 'wvrx_ts_sc_site_tagline', // [site_tagline]
20
- 'site_title' => 'wvrx_ts_sc_site_title', // [site_title]
21
- 'tab_group' => 'wvrx_ts_sc_tab_group',
22
- 'tab' => 'wvrx_ts_sc_tab', // [tab_group], [tab]
23
- 'vimeo' => 'wvrx_ts_sc_vimeo', // [vimeo]
24
- 'youtube' => 'wvrx_ts_sc_yt', // [youtube]
25
- 'ytube' => 'wvrx_ts_sc_yt', // [youtube]
26
- 'weaverx_info' => 'wvrx_ts_weaverx_sc_info' // [weaverx_info]
27
- );
28
-
29
- $prefix = get_option('wvrx_toggle_shortcode_prefix');
30
-
31
- foreach ($codes as $code => $func ) {
32
- remove_shortcode($prefix . $code); // use our shortcode instead of someone elses.
33
- add_shortcode($prefix . $code, $func);
 
34
  }
35
  }
36
 
37
  // load our definitions of shortcodes later than probably most anyone else so that we user our versions.
38
- add_action('init', 'wvrx_ts_setup_shortcodes', 99);
39
 
40
  // =============== [box] ===================
41
  function wvrx_ts_sc_box( $args = '', $text ) {
42
- extract(shortcode_atts(array(
43
- 'align' => '',
44
- 'border' => true,
45
- 'border_rule' => '1px solid black',
46
- 'border_radius' => '',
47
- 'color' => '',
48
- 'background' => '',
49
- 'margin' => '',
50
- 'padding' => '1',
51
- 'shadow' => '',
52
- 'style' => '',
53
- 'width' => ''
54
- ), $args));
55
-
56
- $sty = 'style="';
57
-
58
- if ( $align ) {
59
- $align = strtolower($align);
60
- switch ( $align ) {
61
- case 'center':
62
- $sty .= 'display:block;margin-left:auto;margin-right:auto;';
63
- break;
64
- case 'right':
65
- $sty .= 'float:right;';
66
- break;
67
- default:
68
- $sty .= 'float:left;';
69
- break;
70
- }
71
- }
72
-
73
- if ( $border )
74
- $sty .= "border:{$border_rule};";
75
- if ( $border_radius )
76
- $sty .= "border-radius:{$border_radius}px;";
77
- if ( $shadow ) {
78
- if ( $shadow < 1 ) $shadow = 1;
79
- if ( $shadow > 5 ) $shadow = 5;
80
- $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
81
- }
82
- if ( $color )
83
- $sty .= "color:{$color};";
84
- if ( $background )
85
- $sty .= "background-color:{$background};";
86
- if ( $margin )
87
- $sty .= "margin:{$margin}em;";
88
- if ( $padding )
89
- $sty .= "padding:{$padding}em;";
90
- if ( $width )
91
- $sty .= "width:{$width}%;";
92
- if ( $sty )
93
- $sty .= $style;
94
- $sty .= '"'; // finish it
95
-
96
- return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
 
 
 
 
 
 
 
 
 
 
 
 
97
  }
98
 
99
  // =============== [hide_if] ===================
100
- function wvrx_ts_sc_hide_if($args = '', $text ) {
101
 
102
- return wvrx_ts_show_hide_if( $args, $text, false );
103
  }
104
 
105
  // =============== [show_if] ===================
106
- function wvrx_ts_sc_show_if($args = '', $text ) {
107
- return wvrx_ts_show_hide_if( $args, $text, true );
108
  }
109
 
110
  // =============== [show_hide_if] ===================
111
- function wvrx_ts_show_hide_if($args = '', $text, $show) {
112
- extract(shortcode_atts(array(
113
- 'device' => 'default', // desktop, mobile, smalltablet, phone, all
114
- 'logged_in' => 'default', // true or false
115
- 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
116
- 'post_id' => 'default', // comma separated list
117
- 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
118
- ), $args));
119
-
120
- $valid_device = array('default','desktop','mobile','smalltablet','phone','all');
121
-
122
- if ( !in_array( $device, $valid_device )) {
123
- return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
124
-
125
- }
126
- if ( $logged_in == 'default' ) { // **** logged_in
127
- $logged_in = true;
128
- } else {
129
- $is_true = is_user_logged_in();
130
- $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : !$is_true;
131
- }
132
-
133
- if ( $not_post_id == 'default') { // **** pages
134
- $not_post_id = true;
135
- } else {
136
- $list = explode(',', str_replace(' ', '', $not_post_id));
137
- $not_post_id = !in_array( get_the_ID(), $list );
138
- }
139
-
140
- if ( $post_id == 'default') { // **** pages
141
- $post_id = true;
142
- } else {
143
- $list = explode(',', str_replace(' ', '', $post_id));
144
- $post_id = in_array( get_the_ID(), $list );
145
- }
146
-
147
- if ( $user_can == 'default') { // **** user_can
148
- $user_can = true;
149
- } else {
150
- $user_can = current_user_can( strtolower( $user_can) );
151
- }
152
-
153
- $x = true;
154
- if ( $x == 'default') {
155
- $x = true;
156
- } else {
157
- $x = $show;
158
- }
159
-
160
- $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
161
-
162
- if ( !$all_true ) { // device irrelevant
163
- // $text .= '* ALL TRUE FAILED *';
164
- if ( !$show )
165
- return do_shortcode( $text ); // hide fails, so show it
166
- else
167
- return ''; // show fails, so hide it
168
-
169
- } elseif ( $device == 'default') { // so all other conditions passed, see if specified device
170
- // $text .= '* ALL TRUE, DEVICE DEFAULT *';
171
- if ( $show )
172
- return do_shortcode( $text );
173
- else
174
- return '';
175
- } else {
176
- // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
177
- if ( $show ) {
178
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('show-' . $device); // for [extra_menu]
179
- } else {
180
- $GLOBALS['wvrx_sc_show_hide'] = strtolower('hide-' . $device);
181
- }
182
- $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode($text) . '</div>';
183
- unset( $GLOBALS['wvrx_sc_show_hide'] );
184
- return $ret;
185
- }
186
- return '';
 
 
 
 
 
187
  }
188
 
189
 
190
  // =============== [header_image style='customstyle'] ===================
191
- function wvrx_ts_sc_header_image($args = '') {
192
- extract(shortcode_atts(array(
193
- 'style' => '', // STYLE
194
- 'h' => '',
195
- 'w' => ''
196
- ), $args));
197
 
198
  $hdr = get_header_image();
199
- if (!$hdr)
200
  return '';
201
- $hdr = str_replace(array('http://', 'https://'),'//', $hdr);
 
202
 
203
- $width = weaverx_getopt_default('theme_width_int',1100);
204
  $custom_header_sizes = apply_filters( 'weaverx_custom_header_sizes', "(max-width: {$width}px) 100vw, 1920px" );
205
 
206
- $width = $w ? $w : get_custom_header()->width;
207
- $height = $h ? $h : get_custom_header()->height;
208
- $st = $style ? ' style="' . $style . '"' : '';
209
  $sizes = esc_attr( $custom_header_sizes );
210
 
211
- if ( stripos($hdr, '.gif') !== false ) {
212
- $hdrimg = '<img src="' . $hdr . '" width="' . $width .'" height="' . $height . '"'
213
- . $st . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
214
  } else {
215
- $hdrimg = '<img src="' . $hdr . '" sizes="' . $sizes . '" width="' . $width .'" height="' . $height . '"'
216
- . $st . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
217
  }
218
 
219
- return $hdrimg;
220
  }
221
 
222
  // =============== [bloginfo arg='name'] ======================
223
- function wvrx_ts_sc_bloginfo($args = '') {
224
- extract(shortcode_atts(array(
225
- 'arg' => 'name', // a WP bloginfo name
226
- 'style' => '' // wrap with style
227
- ), $args));
228
-
229
- $code = '';
230
- if ($style != '') $code = '<span style="' . $style . '">';
231
- $code .= esc_attr( get_bloginfo( $arg ));
232
- if ($style != '') $code .= '</span>';
233
- return $code;
 
 
 
 
 
234
  }
235
 
236
  // =============== [site_title style='customstyle'] ======================
237
- function wvrx_ts_sc_site_title($args = '') {
238
- extract(shortcode_atts(array(
239
- 'style' => '', /* styling for the header */
240
- 'matchtheme' => false
241
- ), $args));
242
 
243
- $title = esc_html( get_bloginfo( 'name', 'display' ));
244
 
245
  $before = '';
246
  $after = '';
247
 
248
  if ( $matchtheme == 'true' || $matchtheme == 1 ) {
249
- $before = '<h1' . weaverx_title_class( 'site_title', false, 'site-title' ) . '><a href="' . esc_url( home_url( '/' ) ) . '" title="' . $title . '" rel="home">';
250
  $after = '</a></h1>';
251
  }
252
 
253
- if ($style) {
254
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
255
- }
256
- return $before . $title . $after;
 
257
 
258
  }
259
 
260
  // =============== [site_tagline style='customstyle'] ======================
261
- function wvrx_ts_sc_site_tagline($args = '') {
262
- extract(shortcode_atts(array(
263
- 'style' => '', /* styling for the header */
264
- 'matchtheme' => false
265
- ), $args));
266
 
267
- $title = get_bloginfo( 'description' );
268
 
269
  $before = '';
270
  $after = '';
@@ -274,396 +299,445 @@ function wvrx_ts_sc_site_tagline($args = '') {
274
  $after = '</h2>';
275
  }
276
 
277
- if ($style) {
278
- return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
279
- }
280
- return $before . $title . $after;
 
281
  }
282
 
283
  // =============== [iframe src='address' height=nnn] ======================
284
- function wvrx_ts_sc_iframe($args = '') {
285
- extract(shortcode_atts(array(
286
- 'src' => '',
287
- 'height' => '600', /* styling for the header */
288
- 'percent' => 100,
289
- 'style' => 'border:1px;'
290
- ), $args));
291
-
292
- $sty = $style ? ' style="' . $style . '"' : '';
293
-
294
- if (!$src) return __('<h4>No src address provided to [iframe].</h4>','weaverx-theme-support' /*adm*/);
295
- return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
 
 
 
296
  }
297
 
298
  // =============== [iframe src='address' height=nnn] ======================
299
- function wvrx_ts_sc_login($args = '') {
300
- extract(shortcode_atts(array(
301
- 'style' => ''
302
- ), $args));
303
-
304
- if ($style != '')
305
- return '<span class="wvrx-loginout" style="' . esc_attr($style) . '">' . wp_loginout( '', false ) . '</span>';
306
- else
307
  return '<span class="wvrx-loginout">' . wp_loginout( '', false ) . '</span>';
 
308
  }
309
 
310
  // =============== [tab_group ] ======================
311
  function wvrx_ts_sc_tab_group( $args, $content ) {
312
- extract( shortcode_atts( array(
313
- 'border_color' => '', // tab and pane bodder color - default #888
314
- 'tab_bg' => '', // normal bg color of tab (default #CCC)
315
- 'tab_selected_color' => '', // color of tab when selected (default #EEE)
316
- 'pane_min_height' => '', // min height of a pane to help make all even if needed
317
- 'pane_bg' => '' // bg color of pane
318
- ), $args ) );
319
-
320
- if (isset($GLOBALS['wvrx_ts_in_tab_container']) && $GLOBALS['wvrx_ts_in_tab_container']) {
321
- return __('<strong>Sorry, you cannot nest tab_containers.</strong>','weaverx-theme-support' /*adm*/);
322
- }
323
 
324
- // enqueue the theme support jslib only now when it will actually be needed!
325
 
326
- // wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
327
 
328
- if ( !isset( $GLOBALS['wvrx_ts_tab_id'] ) )
329
- $GLOBALS['wvrx_ts_tab_id'] = 1;
330
- else
331
- ++$GLOBALS['wvrx_ts_tab_id'];
 
332
 
333
- $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
334
 
335
- $css = ''; // default styles
336
- $add_style = '';
337
- if ($border_color != '')
338
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
339
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
 
340
 
341
- if ($pane_min_height != '')
342
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
 
343
 
344
- if ($pane_bg != '')
345
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
 
346
 
347
- if ($tab_bg != '')
348
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
 
349
 
350
- if ($tab_selected_color != '')
351
- $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
352
- $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
 
353
 
354
- if ($css != '') { // specified some style...
355
- $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
356
- }
357
 
358
- $GLOBALS['wvrx_ts_in_tab_container'] = true;
359
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
360
 
361
- do_shortcode( $content ); // process the tabs on this
362
 
363
- $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
364
 
365
- if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
366
  $n = 0;
367
- foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
368
- $n++;
369
- $tabs[] = '<span>' . $tab['title'] . '</span>' . "\n";
370
  // on page refresh, this simple code reverts to the first tab showing. Since this is under JS fixup, there was a bit of
371
  // a flash until page loaded. By initially adding wvr-tabs-hide class and making that hidden, the flash is eliminated since
372
  // the JS hides/unhides anyway. Added Version 3.1.8
373
- if ($n == 1)
374
- $panes[] = "\n" .'<div class="wvr-tabs-pane wvr-tabs-show">' . wvrx_ts_strip_pp($tab['content']) . '</div>';
375
- else
376
- $panes[] = "\n" .'<div class="wvr-tabs-pane wvr-tabs-hide">' . wvrx_ts_strip_pp($tab['content']) . '</div>';
377
- }
378
- $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
379
- . '<div class="wvr-tabs-nav">' . "\n"
380
- . implode( '', $tabs ) . '</div>' . "\n"
381
- . '<div class="wvr-tabs-panes">'
382
- . implode( '', $panes ) . "\n"
383
- . '</div><div class="wvr-tabs-clear"></div>' . "\n"
384
- . '</div> <!-- end tab_group -->' . "\n";
385
- }
386
-
387
- // Forget globals we generated
388
- unset( $GLOBALS['wvrx_ts_in_tab_container'],$GLOBALS['wvrx_ts_tabs'],$GLOBALS['wvrx_ts_num_tabs']);
389
-
390
- return $add_style . $out;
 
391
  }
392
 
393
  function wvrx_ts_strip_pp( $content ) {
394
  // strip leading </p>\n<p> from tab content - added by editor
395
- $loc = strpos($content, "</p>\n<p>");
396
  if ( $loc !== false && $loc == 0 ) {
397
- return substr($content, 8);
398
  }
 
399
  return $content;
400
  }
401
 
402
  function wvrx_ts_sc_tab( $args, $content ) {
403
- extract( shortcode_atts( array(
404
- 'title' => 'Tab %d'
405
- ), $args ) );
406
-
407
- if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
408
- $GLOBALS['wvrx_ts_num_tabs'] = 0;
409
- }
410
- $cur = $GLOBALS['wvrx_ts_num_tabs'];
411
- $GLOBALS['wvrx_ts_tabs'][$cur] = array(
412
- 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
413
- 'content' => do_shortcode( $content ) );
414
- $GLOBALS['wvrx_ts_num_tabs']++;
 
415
  }
416
 
417
 
418
  // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
419
 
420
 
421
- function wvrx_ts_sc_yt($args = '') {
422
- $share = '';
423
- if ( isset ( $args[0] ) )
424
- $share = trim($args[0]);
425
-
426
-
427
- // http://code.google.com/apis/youtube/player_parameters.html
428
- // not including: enablejsapi, fs,playerapiid,
429
-
430
- extract(shortcode_atts(array(
431
- 'autohide' => '~!',
432
- 'autoplay' => '0',
433
- 'id' => '',
434
- 'sd' => false,
435
- 'related' => '0',
436
- 'privacy' => false,
437
- 'ratio' => false,
438
- 'center' => '1',
439
- 'border' => '0',
440
- 'color' => false,
441
- 'color1' => false,
442
- 'color2' => false,
443
- 'controls' => '1',
444
- 'disablekb' => '0',
445
- 'egm' => '0',
446
- 'end' => false,
447
- 'fs' => '1',
448
- 'fullscreen' => 1,
449
- 'hd' => '0',
450
- 'iv_load_policy' => '1',
451
- 'loop' => '0',
452
- 'modestbranding' => '0',
453
- 'origin' => false,
454
- 'percent' => 100,
455
- 'playlist' => false,
456
- 'rel' => '0',
457
- 'showinfo' => '1',
458
- 'showsearch' => '1',
459
- 'start' => false,
460
- 'theme' => 'dark',
461
- 'wmode' => 'transparent'
462
-
463
- ), $args));
464
-
465
-
466
- if (!$share && !$id)
467
- return __('<strong>No share or id values provided for youtube shortcode.</strong>','weaverx-theme-support' /*adm*/);
468
-
469
- if ($share) { // let the share override any id
470
- $share = str_replace('youtu.be/','',$share);
471
- if (strpos($share,'youtube.com/watch') !== false) {
472
- $share = str_replace('www.youtube.com/watch?v=', '', $share);
473
- $share = str_replace('&amp;','+',$share);
474
- $share = str_replace('&','+',$share);
475
- }
476
- $share = str_replace(array('http://','https://',"'",'"'), '' ,$share);
477
- if ($share)
478
- $id = $share;
479
- }
480
-
481
- $opts = $id . '%%';
482
-
483
- $opts = wvrx_ts_add_url_opt($opts, $hd != '0', 'hd=1');
484
- $opts = wvrx_ts_add_url_opt($opts, $autohide != '~!', 'autohide='.$autohide);
485
- $opts = wvrx_ts_add_url_opt($opts, $autoplay != '0', 'autoplay=1');
486
- $opts = wvrx_ts_add_url_opt($opts, $border != '0', 'border=1');
487
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color='.$color);
488
- $opts = wvrx_ts_add_url_opt($opts, $color1, 'color1='.$color1);
489
- $opts = wvrx_ts_add_url_opt($opts, $color2, 'color2='.$color2);
490
- $opts = wvrx_ts_add_url_opt($opts, $controls != '1', 'controls=0');
491
- $opts = wvrx_ts_add_url_opt($opts, $disablekb != '0', 'disablekb=1');
492
- $opts = wvrx_ts_add_url_opt($opts, $egm != '0', 'egm=1');
493
- $opts = wvrx_ts_add_url_opt($opts, true, 'fs='.$fs);
494
- $opts = wvrx_ts_add_url_opt($opts, true, 'iv_load_policy='.$iv_load_policy);
495
- $opts = wvrx_ts_add_url_opt($opts, $loop != '0', 'loop=1');
496
- $opts = wvrx_ts_add_url_opt($opts, $modestbranding != '0', 'modestbranding=1');
497
- $opts = wvrx_ts_add_url_opt($opts, $origin, 'origin='.$origin);
498
- $opts = wvrx_ts_add_url_opt($opts, $playlist, 'playlist='.$playlist);
499
- $opts = wvrx_ts_add_url_opt($opts, true, 'rel='.$rel);
500
- $opts = wvrx_ts_add_url_opt($opts, true, 'showinfo=' . $showinfo);
501
- $opts = wvrx_ts_add_url_opt($opts, $showsearch != '1', 'showsearch=0');
502
- $opts = wvrx_ts_add_url_opt($opts, $start, 'start='.$start);
503
- $opts = wvrx_ts_add_url_opt($opts, $end, 'end='.$end);
504
- $opts = wvrx_ts_add_url_opt($opts, $theme != 'dark', 'theme=light');
505
- $opts = wvrx_ts_add_url_opt($opts, $wmode, 'wmode='.$wmode);
506
-
507
- $url = '//';
508
-
509
- if ($privacy) $url .= 'www.youtube-nocookie.com';
510
- else $url .= 'www.youtube.com';
511
-
512
- $opts = str_replace('%%+','%%?', $opts);
513
- $opts = str_replace('%%','', $opts);
514
- $opts = str_replace('+','&amp;', $opts);
515
-
516
- $url .= '/embed/' . $opts;
517
-
518
-
519
- $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
520
-
521
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
522
- "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
523
- $cntr2 = '</div>';
524
- $h = 9; $w = 16;
525
- if ( $sd ) {
526
- $h = 3; $w = 4;
527
- }
528
-
529
- $ret ="\n" . $cntr1 . '<iframe src="' . $url
530
- . '" frameborder="0" width="'.$w.'" height="' . $h . '" frameborder="0" ' . $allowfull . '></iframe>'
531
- . $cntr2 . "\n";
532
-
533
- return $ret;
 
 
 
 
 
 
 
 
534
  }
535
 
536
  // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
537
- function wvrx_ts_sc_vimeo($args = '') {
538
- $share = '';
539
- if ( isset ( $args[0] ) )
540
- $share = trim($args[0]);
541
-
542
- extract(shortcode_atts(array(
543
- 'id' => '',
544
- 'sd' => false,
545
- 'color' => '',
546
- 'autoplay' => false,
547
- 'loop' => false,
548
- 'portrait' => true,
549
- 'title' => true,
550
- 'byline' => true,
551
- 'percent' => 100,
552
- 'center' => '1'
553
- ), $args));
554
-
555
- if (!$share && !$id) return __('<strong>No share or id values provided for vimeo shortcode.</strong>','weaverx-theme-support' /*adm*/);
556
-
557
- if ($share) { // let the share override any id
558
- $share = str_replace(array('http://vimeo.com/', 'https://vimeo.com/' ),'',$share); // fixed 3.1.9 - added https
559
- if ($share) $id = $share;
560
- }
561
-
562
- $opts = $id . '##';
563
-
564
- $opts = wvrx_ts_add_url_opt($opts, $autoplay, 'autoplay=1');
565
- $opts = wvrx_ts_add_url_opt($opts, $loop, 'loop=1');
566
- $opts = wvrx_ts_add_url_opt($opts, $color, 'color=' . $color);
567
- $opts = wvrx_ts_add_url_opt($opts, !$portrait, 'portrait=0');
568
- $opts = wvrx_ts_add_url_opt($opts, !$title, 'title=0');
569
- $opts = wvrx_ts_add_url_opt($opts, !$byline, 'byline=0');
570
-
571
- $url = '//player.vimeo.com/video/';
572
-
573
- $opts = str_replace('##+','##?', $opts);
574
- $opts = str_replace('##','', $opts);
575
- $opts = str_replace('+','&amp;', $opts);
576
-
577
- $url .= $opts;
578
-
579
- if (function_exists('weaverii_use_mobile'))
580
- if (weaverii_use_mobile('mobile')) $percent = 100;
581
-
582
-
583
- $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
584
- "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
585
- $cntr2 = '</div>';
586
- $h = 9; $w = 16;
587
- if ( $sd ) {
588
- $h = 3; $w = 4;
589
- }
590
-
591
- $ret = "\n" . $cntr1 . '<iframe src="' . $url
592
- . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
593
- . $cntr2 . "\n";
594
-
595
- return $ret;
 
 
 
 
 
 
 
 
 
 
596
  }
597
 
598
  // ===== video utils =====
599
 
600
- function wvrx_ts_add_url_opt($opts, $add, $add_val) {
601
- if ($add) {
602
- $opts = $opts . '+' . $add_val;
603
- }
604
- return $opts;
 
605
  }
606
 
607
 
 
 
 
 
 
608
 
609
- function wvrx_ts_sc_html($vals = '') { // [html style='customstyle'] - all ======================
610
- $tag = 'span';
611
- if ( isset ( $vals[0] ) )
612
- $tag = trim( $vals[0]);
 
 
613
 
614
- extract(shortcode_atts(array(
615
- 'args' => ''
616
- ), $vals));
617
- if ($args) $args = ' ' . $args;
618
- return '<' . $tag . $args . '>';
619
  }
620
 
621
- function wvrx_ts_sc_div($vals = '',$text) { // [div] - all ===================
622
- extract(shortcode_atts(array(
623
- 'id' => '',
624
- 'class' => '',
625
- 'style' => ''
626
- ), $vals));
627
 
628
- $args = '';
629
- if ($id) $args .= ' id="' . $id . '"';
630
- if ($class) $args .= ' class="' . $class . '"';
631
- if ($style) $args .= ' style="' . $style . '"';
 
 
 
 
 
 
632
 
633
- return '<div' . $args . '>' . do_shortcode($text) . '</div>';
634
  }
635
 
636
- function wvrx_ts_sc_span($vals = '',$text) { // [span] - all ==================
637
- extract(shortcode_atts(array(
638
- 'id' => '',
639
- 'class' => '',
640
- 'style' => ''
641
- ), $vals));
642
 
643
- $args = '';
644
- if ($id) $args .= ' id="' . $id . '"';
645
- if ($class) $args .= ' class="' . $class . '"';
646
- if ($style) $args .= ' style="' . $style . '"';
 
 
 
 
 
 
647
 
648
- return '<span' . $args . '>' . do_shortcode($text) . '</span>';
649
  }
650
 
651
  function wvrx_ts_weaverx_sc_info() { // [info] ======================
652
- //global $current_user;
653
- $out = __('<strong>Theme/User Info</strong><hr />','weaverx-theme-support' /*adm*/);
654
-
655
- $current_user = wp_get_current_user();
656
- if (isset($current_user->display_name)) {
657
- $out .= __('<em>User:</em> ','weaverx-theme-support' /*adm*/) . $current_user->display_name . '<br />';
658
- }
659
- $out .= '&nbsp;&nbsp;' . wp_register('','<br />',false);
660
- $out .= '&nbsp;&nbsp;' . wp_loginout('',false) . '<br />';
661
-
662
- $agent = __('Not Available','weaverx-theme-support' /*adm*/);
663
- if (isset($_SERVER["HTTP_USER_AGENT"]) )
664
- $agent = $_SERVER['HTTP_USER_AGENT'];
665
- $out .= __('<em>User Agent</em>:','weaverx-theme-support' /*adm*/) . ' <small>' . $agent . '</small>';
666
- $out .= '<div id="example"></div>
 
667
  <script type="text/javascript">
668
  var txt = "";
669
  var myWidth;
@@ -682,19 +756,20 @@ txt+= "<em>Browser Width: </em>" + myWidth + " px</br>";
682
  document.getElementById("example").innerHTML=txt;
683
  </script>';
684
 
685
- $out .= __('<em>Feed title:</em> ','weaverx-theme-support' /*adm*/) . get_bloginfo_rss('name') . '<br />' . get_wp_title_rss();
 
 
 
686
 
687
- $out .= __('<br /><em>You are using</em> WordPress ','weaverx-theme-support' /*adm*/) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
688
- $out .= __('<br /><em>Memory:</em> ','weaverx-theme-support' /*adm*/) . round(memory_get_usage()/1024/1024,2) . 'M of ' . (int)ini_get('memory_limit') . 'M <hr />';
689
- return $out;
690
  }
691
 
692
 
693
- function wvrx_ts_set_shortcodes($sc_list, $prefix) {
694
- foreach ($sc_list as $sc_name => $sc_func) {
695
- remove_shortcode($prefix . $sc_name);
696
- add_shortcode($prefix . $sc_name,$sc_func);
697
- }
698
  }
699
 
700
  // =============== Utilities ======================
5
 
6
  function wvrx_ts_setup_shortcodes() {
7
 
8
+ $codes = array(
9
+ // list of shortcodes
10
+ 'bloginfo' => 'wvrx_ts_sc_bloginfo', // [bloginfo]
11
+ 'box' => 'wvrx_ts_sc_box', // [box]
12
+ 'div' => 'wvrx_ts_sc_div', // [div]
13
+ 'header_image' => 'wvrx_ts_sc_header_image', // [header_image]
14
+ 'hide_if' => 'wvrx_ts_sc_hide_if', // [hide_if]
15
+ 'html' => 'wvrx_ts_sc_html', // [html]
16
+ 'iframe' => 'wvrx_ts_sc_iframe', // [iframe]
17
+ 'login' => 'wvrx_ts_sc_login', // [login]
18
+ 'show_if' => 'wvrx_ts_sc_show_if', // [show_if]
19
+ 'span' => 'wvrx_ts_sc_span', // [span]
20
+ 'site_tagline' => 'wvrx_ts_sc_site_tagline', // [site_tagline]
21
+ 'site_title' => 'wvrx_ts_sc_site_title', // [site_title]
22
+ 'tab_group' => 'wvrx_ts_sc_tab_group',
23
+ 'tab' => 'wvrx_ts_sc_tab', // [tab_group], [tab]
24
+ 'vimeo' => 'wvrx_ts_sc_vimeo', // [vimeo]
25
+ 'youtube' => 'wvrx_ts_sc_yt', // [youtube]
26
+ 'ytube' => 'wvrx_ts_sc_yt', // [youtube]
27
+ 'weaverx_info' => 'wvrx_ts_weaverx_sc_info' // [weaverx_info]
28
+ );
29
+
30
+ $prefix = get_option( 'wvrx_toggle_shortcode_prefix' );
31
+
32
+ foreach ( $codes as $code => $func ) {
33
+ remove_shortcode( $prefix . $code ); // use our shortcode instead of someone elses.
34
+ add_shortcode( $prefix . $code, $func );
35
  }
36
  }
37
 
38
  // load our definitions of shortcodes later than probably most anyone else so that we user our versions.
39
+ add_action( 'init', 'wvrx_ts_setup_shortcodes', 99 );
40
 
41
  // =============== [box] ===================
42
  function wvrx_ts_sc_box( $args = '', $text ) {
43
+ extract( shortcode_atts( array(
44
+ 'align' => '',
45
+ 'border' => true,
46
+ 'border_rule' => '1px solid black',
47
+ 'border_radius' => '',
48
+ 'color' => '',
49
+ 'background' => '',
50
+ 'margin' => '',
51
+ 'padding' => '1',
52
+ 'shadow' => '',
53
+ 'style' => '',
54
+ 'width' => '',
55
+ ), $args ) );
56
+
57
+ $sty = 'style="';
58
+
59
+ if ( $align ) {
60
+ $align = strtolower( $align );
61
+ switch ( $align ) {
62
+ case 'center':
63
+ $sty .= 'display:block;margin-left:auto;margin-right:auto;';
64
+ break;
65
+ case 'right':
66
+ $sty .= 'float:right;';
67
+ break;
68
+ default:
69
+ $sty .= 'float:left;';
70
+ break;
71
+ }
72
+ }
73
+
74
+ if ( $border ) {
75
+ $sty .= "border:{$border_rule};";
76
+ }
77
+ if ( $border_radius ) {
78
+ $sty .= "border-radius:{$border_radius}px;";
79
+ }
80
+ if ( $shadow ) {
81
+ if ( $shadow < 1 ) {
82
+ $shadow = 1;
83
+ }
84
+ if ( $shadow > 5 ) {
85
+ $shadow = 5;
86
+ }
87
+ $sty .= "box-shadow:0 0 4px {$shadow}px rgba(0,0,0,0.25);";
88
+ }
89
+ if ( $color ) {
90
+ $sty .= "color:{$color};";
91
+ }
92
+ if ( $background ) {
93
+ $sty .= "background-color:{$background};";
94
+ }
95
+ if ( $margin ) {
96
+ $sty .= "margin:{$margin}em;";
97
+ }
98
+ if ( $padding ) {
99
+ $sty .= "padding:{$padding}em;";
100
+ }
101
+ if ( $width ) {
102
+ $sty .= "width:{$width}%;";
103
+ }
104
+ if ( $sty ) {
105
+ $sty .= $style;
106
+ }
107
+ $sty .= '"'; // finish it
108
+
109
+ return "<div {$sty}><!--[box]-->" . do_shortcode( $text ) . '</div><!--[box]-->';
110
  }
111
 
112
  // =============== [hide_if] ===================
113
+ function wvrx_ts_sc_hide_if( $args = '', $text ) {
114
 
115
+ return wvrx_ts_show_hide_if( $args, $text, false );
116
  }
117
 
118
  // =============== [show_if] ===================
119
+ function wvrx_ts_sc_show_if( $args = '', $text ) {
120
+ return wvrx_ts_show_hide_if( $args, $text, true );
121
  }
122
 
123
  // =============== [show_hide_if] ===================
124
+ function wvrx_ts_show_hide_if( $args = '', $text, $show ) {
125
+ extract( shortcode_atts( array(
126
+ 'device' => 'default', // desktop, mobile, smalltablet, phone, all
127
+ 'logged_in' => 'default', // true or false
128
+ 'not_post_id' => 'default', // comma separated list of post IDs (includes pages, too)
129
+ 'post_id' => 'default', // comma separated list
130
+ 'user_can' => 'default' // http://codex.wordpress.org/Function_Reference/current_user_can
131
+ ), $args ) );
132
+
133
+ $valid_device = array( 'default', 'desktop', 'mobile', 'smalltablet', 'phone', 'all' );
134
+
135
+ if ( ! in_array( $device, $valid_device ) ) {
136
+ return '<br /><strong>Error with [hide/show_if]: <u>' . $device . '</u> not valid for <em>device</em> parameter.</strong><br />';
137
+
138
+ }
139
+ if ( $logged_in == 'default' ) { // **** logged_in
140
+ $logged_in = true;
141
+ } else {
142
+ $is_true = is_user_logged_in();
143
+ $logged_in = ( $logged_in == 'true' || $logged_in == '1' ) ? $is_true : ! $is_true;
144
+ }
145
+
146
+ if ( $not_post_id == 'default' ) { // **** pages
147
+ $not_post_id = true;
148
+ } else {
149
+ $list = explode( ',', str_replace( ' ', '', $not_post_id ) );
150
+ $not_post_id = ! in_array( get_the_ID(), $list );
151
+ }
152
+
153
+ if ( $post_id == 'default' ) { // **** pages
154
+ $post_id = true;
155
+ } else {
156
+ $list = explode( ',', str_replace( ' ', '', $post_id ) );
157
+ $post_id = in_array( get_the_ID(), $list );
158
+ }
159
+
160
+ if ( $user_can == 'default' ) { // **** user_can
161
+ $user_can = true;
162
+ } else {
163
+ $user_can = current_user_can( strtolower( $user_can ) );
164
+ }
165
+
166
+ $x = true;
167
+ if ( $x == 'default' ) {
168
+ $x = true;
169
+ } else {
170
+ $x = $show;
171
+ }
172
+
173
+ $all_true = $logged_in && $not_post_id && $post_id && $user_can; // all true except device
174
+
175
+ if ( ! $all_true ) { // device irrelevant
176
+ // $text .= '* ALL TRUE FAILED *';
177
+ if ( ! $show ) {
178
+ return do_shortcode( $text );
179
+ } // hide fails, so show it
180
+ else {
181
+ return '';
182
+ } // show fails, so hide it
183
+
184
+ } elseif ( $device == 'default' ) { // so all other conditions passed, see if specified device
185
+ // $text .= '* ALL TRUE, DEVICE DEFAULT *';
186
+ if ( $show ) {
187
+ return do_shortcode( $text );
188
+ } else {
189
+ return '';
190
+ }
191
+ } else {
192
+ // $text .= '* ALL TRUE, DEPENDS ON DEVICE *';
193
+ if ( $show ) {
194
+ $GLOBALS['wvrx_sc_show_hide'] = strtolower( 'show-' . $device ); // for [extra_menu]
195
+ } else {
196
+ $GLOBALS['wvrx_sc_show_hide'] = strtolower( 'hide-' . $device );
197
+ }
198
+ $ret = '<div class="wvr-' . $GLOBALS['wvrx_sc_show_hide'] . '">' . do_shortcode( $text ) . '</div>';
199
+ unset( $GLOBALS['wvrx_sc_show_hide'] );
200
+
201
+ return $ret;
202
+ }
203
+
204
+ return '';
205
  }
206
 
207
 
208
  // =============== [header_image style='customstyle'] ===================
209
+ function wvrx_ts_sc_header_image( $args = '' ) {
210
+ extract( shortcode_atts( array(
211
+ 'style' => '', // STYLE
212
+ 'h' => '',
213
+ 'w' => '',
214
+ ), $args ) );
215
 
216
  $hdr = get_header_image();
217
+ if ( ! $hdr ) {
218
  return '';
219
+ }
220
+ $hdr = str_replace( array( 'http://', 'https://' ), '//', $hdr );
221
 
222
+ $width = weaverx_getopt_default( 'theme_width_int', 1100 );
223
  $custom_header_sizes = apply_filters( 'weaverx_custom_header_sizes', "(max-width: {$width}px) 100vw, 1920px" );
224
 
225
+ $width = $w ? $w : get_custom_header()->width;
226
+ $height = $h ? $h : get_custom_header()->height;
227
+ $st = $style ? ' style="' . $style . '"' : '';
228
  $sizes = esc_attr( $custom_header_sizes );
229
 
230
+ if ( stripos( $hdr, '.gif' ) !== false ) {
231
+ $hdrimg = '<img src="' . $hdr . '" width="' . $width . '" height="' . $height . '"'
232
+ . $st . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />';
233
  } else {
234
+ $hdrimg = '<img src="' . $hdr . '" sizes="' . $sizes . '" width="' . $width . '" height="' . $height . '"'
235
+ . $st . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />';
236
  }
237
 
238
+ return $hdrimg;
239
  }
240
 
241
  // =============== [bloginfo arg='name'] ======================
242
+ function wvrx_ts_sc_bloginfo( $args = '' ) {
243
+ extract( shortcode_atts( array(
244
+ 'arg' => 'name', // a WP bloginfo name
245
+ 'style' => '' // wrap with style
246
+ ), $args ) );
247
+
248
+ $code = '';
249
+ if ( $style != '' ) {
250
+ $code = '<span style="' . $style . '">';
251
+ }
252
+ $code .= esc_attr( get_bloginfo( $arg ) );
253
+ if ( $style != '' ) {
254
+ $code .= '</span>';
255
+ }
256
+
257
+ return $code;
258
  }
259
 
260
  // =============== [site_title style='customstyle'] ======================
261
+ function wvrx_ts_sc_site_title( $args = '' ) {
262
+ extract( shortcode_atts( array(
263
+ 'style' => '', /* styling for the header */
264
+ 'matchtheme' => false,
265
+ ), $args ) );
266
 
267
+ $title = esc_html( get_bloginfo( 'name', 'display' ) );
268
 
269
  $before = '';
270
  $after = '';
271
 
272
  if ( $matchtheme == 'true' || $matchtheme == 1 ) {
273
+ $before = '<h1' . weaverx_title_class( 'site_title', false, 'site-title' ) . '><a href="' . esc_url( home_url( '/' ) ) . '" title="' . $title . '" rel="home">';
274
  $after = '</a></h1>';
275
  }
276
 
277
+ if ( $style ) {
278
+ return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
279
+ }
280
+
281
+ return $before . $title . $after;
282
 
283
  }
284
 
285
  // =============== [site_tagline style='customstyle'] ======================
286
+ function wvrx_ts_sc_site_tagline( $args = '' ) {
287
+ extract( shortcode_atts( array(
288
+ 'style' => '', /* styling for the header */
289
+ 'matchtheme' => false,
290
+ ), $args ) );
291
 
292
+ $title = get_bloginfo( 'description' );
293
 
294
  $before = '';
295
  $after = '';
299
  $after = '</h2>';
300
  }
301
 
302
+ if ( $style ) {
303
+ return $before . '<span style="' . $style . '">' . $title . '</span>' . $after;
304
+ }
305
+
306
+ return $before . $title . $after;
307
  }
308
 
309
  // =============== [iframe src='address' height=nnn] ======================
310
+ function wvrx_ts_sc_iframe( $args = '' ) {
311
+ extract( shortcode_atts( array(
312
+ 'src' => '',
313
+ 'height' => '600', /* styling for the header */
314
+ 'percent' => 100,
315
+ 'style' => 'border:1px;',
316
+ ), $args ) );
317
+
318
+ $sty = $style ? ' style="' . $style . '"' : '';
319
+
320
+ if ( ! $src ) {
321
+ return __( '<h4>No src address provided to [iframe].</h4>', 'weaverx-theme-support' /*adm*/ );
322
+ }
323
+
324
+ return "\n" . '<iframe src="' . $src . '" height="' . $height . 'px" width="' . $percent . '%"' . $sty . '></iframe>' . "\n";
325
  }
326
 
327
  // =============== [iframe src='address' height=nnn] ======================
328
+ function wvrx_ts_sc_login( $args = '' ) {
329
+ extract( shortcode_atts( array(
330
+ 'style' => '',
331
+ ), $args ) );
332
+
333
+ if ( $style != '' ) {
334
+ return '<span class="wvrx-loginout" style="' . esc_attr( $style ) . '">' . wp_loginout( '', false ) . '</span>';
335
+ } else {
336
  return '<span class="wvrx-loginout">' . wp_loginout( '', false ) . '</span>';
337
+ }
338
  }
339
 
340
  // =============== [tab_group ] ======================
341
  function wvrx_ts_sc_tab_group( $args, $content ) {
342
+ extract( shortcode_atts( array(
343
+ 'border_color' => '', // tab and pane bodder color - default #888
344
+ 'tab_bg' => '', // normal bg color of tab (default #CCC)
345
+ 'tab_selected_color' => '', // color of tab when selected (default #EEE)
346
+ 'pane_min_height' => '', // min height of a pane to help make all even if needed
347
+ 'pane_bg' => '' // bg color of pane
348
+ ), $args ) );
349
+
350
+ if ( isset( $GLOBALS['wvrx_ts_in_tab_container'] ) && $GLOBALS['wvrx_ts_in_tab_container'] ) {
351
+ return __( '<strong>Sorry, you cannot nest tab_containers.</strong>', 'weaverx-theme-support' /*adm*/ );
352
+ }
353
 
354
+ // enqueue the theme support jslib only now when it will actually be needed!
355
 
356
+ // wp_enqueue_script('wvrxtsJSLib', wvrx_ts_plugins_url('/js/wvrx-ts-jslib', WVRX_TS_MINIFY . '.js'),array('jquery'),WVRX_TS_VERSION,true);
357
 
358
+ if ( ! isset( $GLOBALS['wvrx_ts_tab_id'] ) ) {
359
+ $GLOBALS['wvrx_ts_tab_id'] = 1;
360
+ } else {
361
+ ++ $GLOBALS['wvrx_ts_tab_id'];
362
+ }
363
 
364
+ $group_id = 'wvr-tab-group-' . $GLOBALS['wvrx_ts_tab_id'];
365
 
366
+ $css = ''; // default styles
367
+ $add_style = '';
368
+ if ( $border_color != '' ) {
369
+ $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane,#' .
370
+ $group_id . '.wvr-tabs-style .wvr-tabs-nav span {border-color:' . $border_color . ";}\n";
371
+ }
372
 
373
+ if ( $pane_min_height != '' ) {
374
+ $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {min-height:' . $pane_min_height . ";}\n";
375
+ }
376
 
377
+ if ( $pane_bg != '' ) {
378
+ $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-pane {background-color:' . $pane_bg . ";}\n";
379
+ }
380
 
381
+ if ( $tab_bg != '' ) {
382
+ $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span {background-color:' . $tab_bg . ";}\n";
383
+ }
384
 
385
+ if ( $tab_selected_color != '' ) {
386
+ $css .= '#' . $group_id . '.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,#' .
387
+ $group_id . '.wvr-tabs-style .wvr-tabs-nav span:hover {background-color:' . $tab_selected_color . ";}\n";
388
+ }
389
 
390
+ if ( $css != '' ) { // specified some style...
391
+ $add_style = "<style type=\"text/css\">\n" . $css . "</style>\n";
392
+ }
393
 
394
+ $GLOBALS['wvrx_ts_in_tab_container'] = true;
395
+ $GLOBALS['wvrx_ts_num_tabs'] = 0;
396
 
397
+ do_shortcode( $content ); // process the tabs on this
398
 
399
+ $out = '*** Unclosed or mismatched [tab_group] shortcodes ***';
400
 
401
+ if ( isset( $GLOBALS['wvrx_ts_tabs'] ) && is_array( $GLOBALS['wvrx_ts_tabs'] ) ) {
402
  $n = 0;
403
+ foreach ( $GLOBALS['wvrx_ts_tabs'] as $tab ) {
404
+ $n ++;
405
+ $tabs[] = '<span>' . $tab['title'] . '</span>' . "\n";
406
  // on page refresh, this simple code reverts to the first tab showing. Since this is under JS fixup, there was a bit of
407
  // a flash until page loaded. By initially adding wvr-tabs-hide class and making that hidden, the flash is eliminated since
408
  // the JS hides/unhides anyway. Added Version 3.1.8
409
+ if ( $n == 1 ) {
410
+ $panes[] = "\n" . '<div class="wvr-tabs-pane wvr-tabs-show">' . wvrx_ts_strip_pp( $tab['content'] ) . '</div>';
411
+ } else {
412
+ $panes[] = "\n" . '<div class="wvr-tabs-pane wvr-tabs-hide">' . wvrx_ts_strip_pp( $tab['content'] ) . '</div>';
413
+ }
414
+ }
415
+ $out = '<div id="' . $group_id . '" class="wvr-tabs wvr-tabs-style"> <!-- tab_group -->' . "\n"
416
+ . '<div class="wvr-tabs-nav">' . "\n"
417
+ . implode( '', $tabs ) . '</div>' . "\n"
418
+ . '<div class="wvr-tabs-panes">'
419
+ . implode( '', $panes ) . "\n"
420
+ . '</div><div class="wvr-tabs-clear"></div>' . "\n"
421
+ . '</div> <!-- end tab_group -->' . "\n";
422
+ }
423
+
424
+ // Forget globals we generated
425
+ unset( $GLOBALS['wvrx_ts_in_tab_container'], $GLOBALS['wvrx_ts_tabs'], $GLOBALS['wvrx_ts_num_tabs'] );
426
+
427
+ return $add_style . $out;
428
  }
429
 
430
  function wvrx_ts_strip_pp( $content ) {
431
  // strip leading </p>\n<p> from tab content - added by editor
432
+ $loc = strpos( $content, "</p>\n<p>" );
433
  if ( $loc !== false && $loc == 0 ) {
434
+ return substr( $content, 8 );
435
  }
436
+
437
  return $content;
438
  }
439
 
440
  function wvrx_ts_sc_tab( $args, $content ) {
441
+ extract( shortcode_atts( array(
442
+ 'title' => 'Tab %d',
443
+ ), $args ) );
444
+
445
+ if ( ! isset( $GLOBALS['wvrx_ts_num_tabs'] ) ) {
446
+ $GLOBALS['wvrx_ts_num_tabs'] = 0;
447
+ }
448
+ $cur = $GLOBALS['wvrx_ts_num_tabs'];
449
+ $GLOBALS['wvrx_ts_tabs'][ $cur ] = array(
450
+ 'title' => sprintf( $title, $GLOBALS['wvrx_ts_num_tabs'] ), // the title with number
451
+ 'content' => do_shortcode( $content ),
452
+ );
453
+ $GLOBALS['wvrx_ts_num_tabs'] ++;
454
  }
455
 
456
 
457
  // =============== [youtube id=videoid sd=0 hd=0 related=0 https=0 privacy=0 w=0 h=0] ======================
458
 
459
 
460
+ function wvrx_ts_sc_yt( $args = '' ) {
461
+ $share = '';
462
+ if ( isset ( $args[0] ) ) {
463
+ $share = trim( $args[0] );
464
+ }
465
+
466
+
467
+ // http://code.google.com/apis/youtube/player_parameters.html
468
+ // not including: enablejsapi, fs,playerapiid,
469
+
470
+ extract( shortcode_atts( array(
471
+ 'autohide' => '~!',
472
+ 'autoplay' => '0',
473
+ 'id' => '',
474
+ 'sd' => false,
475
+ 'related' => '0',
476
+ 'privacy' => false,
477
+ 'ratio' => false,
478
+ 'center' => '1',
479
+ 'border' => '0',
480
+ 'color' => false,
481
+ 'color1' => false,
482
+ 'color2' => false,
483
+ 'controls' => '1',
484
+ 'disablekb' => '0',
485
+ 'egm' => '0',
486
+ 'end' => false,
487
+ 'fs' => '1',
488
+ 'fullscreen' => 1,
489
+ 'hd' => '0',
490
+ 'iv_load_policy' => '1',
491
+ 'loop' => '0',
492
+ 'modestbranding' => '0',
493
+ 'origin' => false,
494
+ 'percent' => 100,
495
+ 'playlist' => false,
496
+ 'rel' => '0',
497
+ 'showinfo' => '1',
498
+ 'showsearch' => '1',
499
+ 'start' => false,
500
+ 'theme' => 'dark',
501
+ 'wmode' => 'transparent',
502
+
503
+ ), $args ) );
504
+
505
+
506
+ if ( ! $share && ! $id ) {
507
+ return __( '<strong>No share or id values provided for youtube shortcode.</strong>', 'weaverx-theme-support' /*adm*/ );
508
+ }
509
+
510
+ if ( $share ) { // let the share override any id
511
+ $share = str_replace( 'youtu.be/', '', $share );
512
+ if ( strpos( $share, 'youtube.com/watch' ) !== false ) {
513
+ $share = str_replace( 'www.youtube.com/watch?v=', '', $share );
514
+ $share = str_replace( '&amp;', '+', $share );
515
+ $share = str_replace( '&', '+', $share );
516
+ }
517
+ $share = str_replace( array( 'http://', 'https://', "'", '"' ), '', $share );
518
+ if ( $share ) {
519
+ $id = $share;
520
+ }
521
+ }
522
+
523
+ $opts = $id . '%%';
524
+
525
+ $opts = wvrx_ts_add_url_opt( $opts, $hd != '0', 'hd=1' );
526
+ $opts = wvrx_ts_add_url_opt( $opts, $autohide != '~!', 'autohide=' . $autohide );
527
+ $opts = wvrx_ts_add_url_opt( $opts, $autoplay != '0', 'autoplay=1' );
528
+ $opts = wvrx_ts_add_url_opt( $opts, $border != '0', 'border=1' );
529
+ $opts = wvrx_ts_add_url_opt( $opts, $color, 'color=' . $color );
530
+ $opts = wvrx_ts_add_url_opt( $opts, $color1, 'color1=' . $color1 );
531
+ $opts = wvrx_ts_add_url_opt( $opts, $color2, 'color2=' . $color2 );
532
+ $opts = wvrx_ts_add_url_opt( $opts, $controls != '1', 'controls=0' );
533
+ $opts = wvrx_ts_add_url_opt( $opts, $disablekb != '0', 'disablekb=1' );
534
+ $opts = wvrx_ts_add_url_opt( $opts, $egm != '0', 'egm=1' );
535
+ $opts = wvrx_ts_add_url_opt( $opts, true, 'fs=' . $fs );
536
+ $opts = wvrx_ts_add_url_opt( $opts, true, 'iv_load_policy=' . $iv_load_policy );
537
+ $opts = wvrx_ts_add_url_opt( $opts, $loop != '0', 'loop=1' );
538
+ $opts = wvrx_ts_add_url_opt( $opts, $modestbranding != '0', 'modestbranding=1' );
539
+ $opts = wvrx_ts_add_url_opt( $opts, $origin, 'origin=' . $origin );
540
+ $opts = wvrx_ts_add_url_opt( $opts, $playlist, 'playlist=' . $playlist );
541
+ $opts = wvrx_ts_add_url_opt( $opts, true, 'rel=' . $rel );
542
+ $opts = wvrx_ts_add_url_opt( $opts, true, 'showinfo=' . $showinfo );
543
+ $opts = wvrx_ts_add_url_opt( $opts, $showsearch != '1', 'showsearch=0' );
544
+ $opts = wvrx_ts_add_url_opt( $opts, $start, 'start=' . $start );
545
+ $opts = wvrx_ts_add_url_opt( $opts, $end, 'end=' . $end );
546
+ $opts = wvrx_ts_add_url_opt( $opts, $theme != 'dark', 'theme=light' );
547
+ $opts = wvrx_ts_add_url_opt( $opts, $wmode, 'wmode=' . $wmode );
548
+
549
+ $url = '//';
550
+
551
+ if ( $privacy ) {
552
+ $url .= 'www.youtube-nocookie.com';
553
+ } else {
554
+ $url .= 'www.youtube.com';
555
+ }
556
+
557
+ $opts = str_replace( '%%+', '%%?', $opts );
558
+ $opts = str_replace( '%%', '', $opts );
559
+ $opts = str_replace( '+', '&amp;', $opts );
560
+
561
+ $url .= '/embed/' . $opts;
562
+
563
+
564
+ $allowfull = $fullscreen ? ' allowfullscreen="allowfullscreen"' : '';
565
+
566
+ $cntr1 = $center ? "<div class=\"wvrx-video wvrx-youtube\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
567
+ "<div class=\"wvrx-video wvrx-youtube\" style=\"max-width:{$percent}%;\">";
568
+ $cntr2 = '</div>';
569
+ $h = 9;
570
+ $w = 16;
571
+ if ( $sd ) {
572
+ $h = 3;
573
+ $w = 4;
574
+ }
575
+
576
+ $ret = "\n" . $cntr1 . '<iframe src="' . $url
577
+ . '" frameborder="0" width="' . $w . '" height="' . $h . '" frameborder="0" ' . $allowfull . '></iframe>'
578
+ . $cntr2 . "\n";
579
+
580
+ return $ret;
581
  }
582
 
583
  // =============== [vimeo id=videoid sd=0 w=0 h=0 color=#hex autoplay=0 loop=0 portrait=1 title=1 byline=1] ======================
584
+ function wvrx_ts_sc_vimeo( $args = '' ) {
585
+ $share = '';
586
+ if ( isset ( $args[0] ) ) {
587
+ $share = trim( $args[0] );
588
+ }
589
+
590
+ extract( shortcode_atts( array(
591
+ 'id' => '',
592
+ 'sd' => false,
593
+ 'color' => '',
594
+ 'autoplay' => false,
595
+ 'loop' => false,
596
+ 'portrait' => true,
597
+ 'title' => true,
598
+ 'byline' => true,
599
+ 'percent' => 100,
600
+ 'center' => '1',
601
+ ), $args ) );
602
+
603
+ if ( ! $share && ! $id ) {
604
+ return __( '<strong>No share or id values provided for vimeo shortcode.</strong>', 'weaverx-theme-support' /*adm*/ );
605
+ }
606
+
607
+ if ( $share ) { // let the share override any id
608
+ $share = str_replace( array( 'http://vimeo.com/', 'https://vimeo.com/' ), '', $share ); // fixed 3.1.9 - added https
609
+ if ( $share ) {
610
+ $id = $share;
611
+ }
612
+ }
613
+
614
+ $opts = $id . '##';
615
+
616
+ $opts = wvrx_ts_add_url_opt( $opts, $autoplay, 'autoplay=1' );
617
+ $opts = wvrx_ts_add_url_opt( $opts, $loop, 'loop=1' );
618
+ $opts = wvrx_ts_add_url_opt( $opts, $color, 'color=' . $color );
619
+ $opts = wvrx_ts_add_url_opt( $opts, ! $portrait, 'portrait=0' );
620
+ $opts = wvrx_ts_add_url_opt( $opts, ! $title, 'title=0' );
621
+ $opts = wvrx_ts_add_url_opt( $opts, ! $byline, 'byline=0' );
622
+
623
+ $url = '//player.vimeo.com/video/';
624
+
625
+ $opts = str_replace( '##+', '##?', $opts );
626
+ $opts = str_replace( '##', '', $opts );
627
+ $opts = str_replace( '+', '&amp;', $opts );
628
+
629
+ $url .= $opts;
630
+
631
+ if ( function_exists( 'weaverii_use_mobile' ) ) {
632
+ if ( weaverii_use_mobile( 'mobile' ) ) {
633
+ $percent = 100;
634
+ }
635
+ }
636
+
637
+
638
+ $cntr1 = $center ? "<div class=\"wvrx-video wvrx-vimeo\" style=\"margin-left:auto;margin-right:auto;max-width:{$percent}%;\">" :
639
+ "<div class=\"wvrx-video wvrx-vimeo\" style=\"max-width:{$percent}%;\">";
640
+ $cntr2 = '</div>';
641
+ $h = 9;
642
+ $w = 16;
643
+ if ( $sd ) {
644
+ $h = 3;
645
+ $w = 4;
646
+ }
647
+
648
+ $ret = "\n" . $cntr1 . '<iframe src="' . $url
649
+ . '" width="' . $w . '" height="' . $h . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
650
+ . $cntr2 . "\n";
651
+
652
+ return $ret;
653
  }
654
 
655
  // ===== video utils =====
656
 
657
+ function wvrx_ts_add_url_opt( $opts, $add, $add_val ) {
658
+ if ( $add ) {
659
+ $opts = $opts . '+' . $add_val;
660
+ }
661
+
662
+ return $opts;
663
  }
664
 
665
 
666
+ function wvrx_ts_sc_html( $vals = '' ) { // [html style='customstyle'] - all ======================
667
+ $tag = 'span';
668
+ if ( isset ( $vals[0] ) ) {
669
+ $tag = trim( $vals[0] );
670
+ }
671
 
672
+ extract( shortcode_atts( array(
673
+ 'args' => '',
674
+ ), $vals ) );
675
+ if ( $args ) {
676
+ $args = ' ' . $args;
677
+ }
678
 
679
+ return '<' . $tag . $args . '>';
 
 
 
 
680
  }
681
 
682
+ function wvrx_ts_sc_div( $vals = '', $text ) { // [div] - all ===================
683
+ extract( shortcode_atts( array(
684
+ 'id' => '',
685
+ 'class' => '',
686
+ 'style' => '',
687
+ ), $vals ) );
688
 
689
+ $args = '';
690
+ if ( $id ) {
691
+ $args .= ' id="' . $id . '"';
692
+ }
693
+ if ( $class ) {
694
+ $args .= ' class="' . $class . '"';
695
+ }
696
+ if ( $style ) {
697
+ $args .= ' style="' . $style . '"';
698
+ }
699
 
700
+ return '<div' . $args . '>' . do_shortcode( $text ) . '</div>';
701
  }
702
 
703
+ function wvrx_ts_sc_span( $vals = '', $text ) { // [span] - all ==================
704
+ extract( shortcode_atts( array(
705
+ 'id' => '',
706
+ 'class' => '',
707
+ 'style' => '',
708
+ ), $vals ) );
709
 
710
+ $args = '';
711
+ if ( $id ) {
712
+ $args .= ' id="' . $id . '"';
713
+ }
714
+ if ( $class ) {
715
+ $args .= ' class="' . $class . '"';
716
+ }
717
+ if ( $style ) {
718
+ $args .= ' style="' . $style . '"';
719
+ }
720
 
721
+ return '<span' . $args . '>' . do_shortcode( $text ) . '</span>';
722
  }
723
 
724
  function wvrx_ts_weaverx_sc_info() { // [info] ======================
725
+ //global $current_user;
726
+ $out = __( '<strong>Theme/User Info</strong><hr />', 'weaverx-theme-support' /*adm*/ );
727
+
728
+ $current_user = wp_get_current_user();
729
+ if ( isset( $current_user->display_name ) ) {
730
+ $out .= __( '<em>User:</em> ', 'weaverx-theme-support' /*adm*/ ) . $current_user->display_name . '<br />';
731
+ }
732
+ $out .= '&nbsp;&nbsp;' . wp_register( '', '<br />', false );
733
+ $out .= '&nbsp;&nbsp;' . wp_loginout( '', false ) . '<br />';
734
+
735
+ $agent = __( 'Not Available', 'weaverx-theme-support' /*adm*/ );
736
+ if ( isset( $_SERVER["HTTP_USER_AGENT"] ) ) {
737
+ $agent = $_SERVER['HTTP_USER_AGENT'];
738
+ }
739
+ $out .= __( '<em>User Agent</em>:', 'weaverx-theme-support' /*adm*/ ) . ' <small>' . $agent . '</small>';
740
+ $out .= '<div id="example"></div>
741
  <script type="text/javascript">
742
  var txt = "";
743
  var myWidth;
756
  document.getElementById("example").innerHTML=txt;
757
  </script>';
758
 
759
+ $out .= __( '<em>Feed title:</em> ', 'weaverx-theme-support' /*adm*/ ) . get_bloginfo_rss( 'name' ) . '<br />' . get_wp_title_rss();
760
+
761
+ $out .= __( '<br /><em>You are using</em> WordPress ', 'weaverx-theme-support' /*adm*/ ) . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
762
+ $out .= __( '<br /><em>Memory:</em> ', 'weaverx-theme-support' /*adm*/ ) . round( memory_get_usage() / 1024 / 1024, 2 ) . 'M of ' . (int) ini_get( 'memory_limit' ) . 'M <hr />';
763
 
764
+ return $out;
 
 
765
  }
766
 
767
 
768
+ function wvrx_ts_set_shortcodes( $sc_list, $prefix ) {
769
+ foreach ( $sc_list as $sc_name => $sc_func ) {
770
+ remove_shortcode( $prefix . $sc_name );
771
+ add_shortcode( $prefix . $sc_name, $sc_func );
772
+ }
773
  }
774
 
775
  // =============== Utilities ======================
includes/wvrx-ts-widgets.php CHANGED
@@ -84,7 +84,7 @@ class WeaverX_Widget_PPText extends WP_Widget {
84
  $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
85
 
86
  if (empty($title) && empty($text))
87
- return;
88
 
89
  echo $before_widget;
90
  if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
@@ -126,11 +126,11 @@ class WeaverX_Widget_Login extends WP_Widget {
126
 
127
  echo $before_widget;
128
  if ( $title )
129
- echo $before_title . $title . $after_title;
130
  global $current_user;
131
  $current_user = wp_get_current_user();
132
  if (isset($current_user->display_name))
133
- echo '<span class="wvrx-welcome-user">' . __('Welcome','weaverx-theme-support' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";
134
  ?>
135
  <ul>
136
  <?php wp_register(); ?>
@@ -175,15 +175,15 @@ class Weaver_Widget_Elementor extends WP_Widget {
175
  $use_post_title = ! empty( $instance['use_post_title'] ) ? '1' : '0';
176
 
177
  $post_list = $instance['post_list'];
178
- if (!$post_list) $post_list = '';
179
 
180
  $pb_post_ID = $instance['pb_post_ID'];
181
- if (!$pb_post_ID) $pb_post_ID ='';
182
 
183
  $show_post = $post_list;
184
 
185
  if ( $pb_post_ID )
186
- $show_post = $pb_post_ID; // override list selection.
187
 
188
 
189
  echo $before_widget;
@@ -192,7 +192,7 @@ class Weaver_Widget_Elementor extends WP_Widget {
192
  $post_title = get_the_title($show_post);
193
  echo $args['before_title'] . esc_html($post_title) . $args['after_title'];
194
  } else if ( !empty($instance['title']) )
195
- echo $args['before_title'] . $instance['title'] . $args['after_title'];
196
 
197
 
198
  $before = $show_post ? "<div class='weaver-pagebuilder-elementor weaver-pagebulder-{$show_post}'>" : '';
@@ -209,7 +209,7 @@ class Weaver_Widget_Elementor extends WP_Widget {
209
  // okay, gotta fetch the_post for this post so that it will be properly intercepted by the page builder
210
  $args = array(
211
  'p' => $show_post, // ID of a page, post, or custom type
212
- 'post_type' => 'page'
213
  );
214
 
215
  $use_posts = new WP_Query($args);
@@ -270,7 +270,7 @@ function form( $instance ) {
270
  $pargs = array (
271
  //'meta_key' => '_elementor_edit_mode',
272
  //'meta_value' => true,
273
- 'post_type' => 'page'
274
  );
275
  $posts = get_pages($pargs);
276
  ?>
@@ -320,15 +320,15 @@ class Weaver_Widget_SiteOrigin extends WP_Widget {
320
  $use_post_title = ! empty( $instance['use_post_title'] ) ? '1' : '0';
321
 
322
  $post_list = $instance['post_list'];
323
- if (!$post_list) $post_list = '';
324
 
325
  $pb_post_ID = $instance['pb_post_ID'];
326
- if (!$pb_post_ID) $pb_post_ID ='';
327
 
328
  $show_post = $post_list;
329
 
330
  if ( $pb_post_ID )
331
- $show_post = $pb_post_ID; // override list selection.
332
 
333
 
334
  echo $before_widget;
@@ -337,7 +337,7 @@ class Weaver_Widget_SiteOrigin extends WP_Widget {
337
  $post_title = get_the_title($show_post);
338
  echo $args['before_title'] . esc_html($post_title) . $args['after_title'];
339
  } else if ( !empty($instance['title']) )
340
- echo $args['before_title'] . $instance['title'] . $args['after_title'];
341
 
342
 
343
  $before = $show_post ? "<div class='weaver-pagebuilder-siteorigin weaver-pagebulder-{$show_post}'>" : '';
@@ -354,7 +354,7 @@ class Weaver_Widget_SiteOrigin extends WP_Widget {
354
  // okay, gotta fetch the_post for this post so that it will be properly intercepted by the page builder
355
  $args = array(
356
  'p' => $show_post, // ID of a page, post, or custom type
357
- 'post_type' => 'page'
358
  );
359
 
360
  $use_posts = new WP_Query($args);
@@ -413,7 +413,7 @@ function form( $instance ) {
413
  echo "<p>Please clear the <em>ID of a SiteOrigin Page or Post</em> value below to show a selection list of SiteOrigin Pages.</p>\n";
414
  } else {
415
  $pargs = array (
416
- 'post_type' => 'page'
417
  );
418
  $posts = get_pages($pargs);
419
  ?>
84
  $text = get_post_meta(get_the_ID(),'wvrx_ts_pp_text',true);
85
 
86
  if (empty($title) && empty($text))
87
+ {return;}
88
 
89
  echo $before_widget;
90
  if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
126
 
127
  echo $before_widget;
128
  if ( $title )
129
+ {echo $before_title . $title . $after_title;}
130
  global $current_user;
131
  $current_user = wp_get_current_user();
132
  if (isset($current_user->display_name))
133
+ {echo '<span class="wvrx-welcome-user">' . __('Welcome','weaverx-theme-support' /*adm*/) . ' ' . $current_user->display_name . ".</span><br />\n";}
134
  ?>
135
  <ul>
136
  <?php wp_register(); ?>
175
  $use_post_title = ! empty( $instance['use_post_title'] ) ? '1' : '0';
176
 
177
  $post_list = $instance['post_list'];
178
+ if (!$post_list) {$post_list = '';}
179
 
180
  $pb_post_ID = $instance['pb_post_ID'];
181
+ if (!$pb_post_ID) {$pb_post_ID ='';}
182
 
183
  $show_post = $post_list;
184
 
185
  if ( $pb_post_ID )
186
+ {$show_post = $pb_post_ID;} // override list selection.
187
 
188
 
189
  echo $before_widget;
192
  $post_title = get_the_title($show_post);
193
  echo $args['before_title'] . esc_html($post_title) . $args['after_title'];
194
  } else if ( !empty($instance['title']) )
195
+ {echo $args['before_title'] . $instance['title'] . $args['after_title'];}
196
 
197
 
198
  $before = $show_post ? "<div class='weaver-pagebuilder-elementor weaver-pagebulder-{$show_post}'>" : '';
209
  // okay, gotta fetch the_post for this post so that it will be properly intercepted by the page builder
210
  $args = array(
211
  'p' => $show_post, // ID of a page, post, or custom type
212
+ 'post_type' => 'page',
213
  );
214
 
215
  $use_posts = new WP_Query($args);
270
  $pargs = array (
271
  //'meta_key' => '_elementor_edit_mode',
272
  //'meta_value' => true,
273
+ 'post_type' => 'page',
274
  );
275
  $posts = get_pages($pargs);
276
  ?>
320
  $use_post_title = ! empty( $instance['use_post_title'] ) ? '1' : '0';
321
 
322
  $post_list = $instance['post_list'];
323
+ if (!$post_list) {$post_list = '';}
324
 
325
  $pb_post_ID = $instance['pb_post_ID'];
326
+ if (!$pb_post_ID) {$pb_post_ID ='';}
327
 
328
  $show_post = $post_list;
329
 
330
  if ( $pb_post_ID )
331
+ {$show_post = $pb_post_ID;} // override list selection.
332
 
333
 
334
  echo $before_widget;
337
  $post_title = get_the_title($show_post);
338
  echo $args['before_title'] . esc_html($post_title) . $args['after_title'];
339
  } else if ( !empty($instance['title']) )
340
+ {echo $args['before_title'] . $instance['title'] . $args['after_title'];}
341
 
342
 
343
  $before = $show_post ? "<div class='weaver-pagebuilder-siteorigin weaver-pagebulder-{$show_post}'>" : '';
354
  // okay, gotta fetch the_post for this post so that it will be properly intercepted by the page builder
355
  $args = array(
356
  'p' => $show_post, // ID of a page, post, or custom type
357
+ 'post_type' => 'page',
358
  );
359
 
360
  $use_posts = new WP_Query($args);
413
  echo "<p>Please clear the <em>ID of a SiteOrigin Page or Post</em> value below to show a selection list of SiteOrigin Pages.</p>\n";
414
  } else {
415
  $pargs = array (
416
+ 'post_type' => 'page',
417
  );
418
  $posts = get_pages($pargs);
419
  ?>
readme.txt CHANGED
@@ -10,8 +10,8 @@ License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
  Text Domain: weaverx-theme-support
11
  Requires at least: 5.2
12
  Requires PHP: 5.6
13
- Tested up to: 5.4
14
- Stable tag: 4.4
15
 
16
  A useful shortcode and widget collection for Weaver Xtreme
17
 
@@ -77,8 +77,12 @@ Support for this plugin can best be found at our forum - http://forum.weaverthem
77
 
78
  See ChangeLog for changes to this version.
79
 
80
- == ChangeLog ==
81
 
 
 
 
 
82
 
83
  = 4.4 =
84
  * Update: compatibility with Weaver Xtreme V 4.4
10
  Text Domain: weaverx-theme-support
11
  Requires at least: 5.2
12
  Requires PHP: 5.6
13
+ Tested up to: 5.6
14
+ Stable tag: 4.4.1
15
 
16
  A useful shortcode and widget collection for Weaver Xtreme
17
 
77
 
78
  See ChangeLog for changes to this version.
79
 
80
+ == ChangeLog =
81
 
82
+ = 4.4.1 =
83
+ * Update: WP 5.6 compatibility
84
+ * Added: Instructions to switch to Customizer for new Font transform and spacing options.
85
+ * Added: Beta compatibility support for upcoming Weaver Xtreme 5 - no significant differences with Weaver Xtreme 4.4
86
 
87
  = 4.4 =
88
  * Update: compatibility with Weaver Xtreme V 4.4
weaverx-ts.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://weavertheme.com/plugins
5
  Description: Weaver Xtreme Theme Support - Legacy Admin plus a package of useful shortcodes and widgets that integrate closely with the Weaver Xtreme theme.
6
  Author: wpweaver
7
  Author URI: http://weavertheme.com/about/
8
- Version: 4.4
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
@@ -37,11 +37,11 @@ function wvrx_ts_alert( $msg ) {
37
 
38
  if ( strpos( $theme, '/weaver-xtreme' ) !== false ) { // only load if Weaver Xtreme is the theme
39
 
40
- define( 'WVRX_TS_VERSION', '4.4' );
41
  define( 'WVRX_TS_MINIFY', '.min' ); // '' for dev, '.min' for production
42
  define( 'WVRX_TS_PAGEBUILDERS', true );
43
 
44
- if ( ! defined( 'WEAVER_GET_OPTION' ) ) {
45
  define( 'WEAVER_GET_OPTION', 'get_option' );
46
  }
47
  if ( ! defined( 'WEAVER_DELETE_OPTION' ) ) {
@@ -53,7 +53,7 @@ if ( strpos( $theme, '/weaver-xtreme' ) !== false ) { // only load if Wea
53
 
54
  if ( ! defined( 'WEAVER_SETTINGS_NAME' ) ) {
55
  define( 'WEAVER_SETTINGS_NAME', 'weaverx_settings' );
56
- }
57
 
58
 
59
  function wvrx_ts_installed() {
5
  Description: Weaver Xtreme Theme Support - Legacy Admin plus a package of useful shortcodes and widgets that integrate closely with the Weaver Xtreme theme.
6
  Author: wpweaver
7
  Author URI: http://weavertheme.com/about/
8
+ Version: 4.4.1
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
37
 
38
  if ( strpos( $theme, '/weaver-xtreme' ) !== false ) { // only load if Weaver Xtreme is the theme
39
 
40
+ define( 'WVRX_TS_VERSION', '4.4.1' );
41
  define( 'WVRX_TS_MINIFY', '.min' ); // '' for dev, '.min' for production
42
  define( 'WVRX_TS_PAGEBUILDERS', true );
43
 
44
+ /*if ( ! defined( 'WEAVER_GET_OPTION' ) ) {
45
  define( 'WEAVER_GET_OPTION', 'get_option' );
46
  }
47
  if ( ! defined( 'WEAVER_DELETE_OPTION' ) ) {
53
 
54
  if ( ! defined( 'WEAVER_SETTINGS_NAME' ) ) {
55
  define( 'WEAVER_SETTINGS_NAME', 'weaverx_settings' );
56
+ }*/
57
 
58
 
59
  function wvrx_ts_installed() {