Weaver Xtreme Theme Support - Version 2.0.4

Version Description

  • Change: [header_image] updated to support WP 4.4 srcset image sizes
  • New: Pre and Post #header div position for Header Widget Area
  • New: Hide Font Family/Size options on Page/Post editor for Weaver Xtreme Plus
  • Fix: [tabs] box styling for current tab
Download this release

Release Info

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

Code changes from version 2.0.3 to 2.0.4

admin/admin-advancedopts.php CHANGED
@@ -47,7 +47,7 @@ function weaverx_admin_advancedopts() {
47
  <!-- ***************************************************** -->
48
 
49
  <div id="asp_tab_admin" class="tab_adv" >
50
- <?php weaverx_admin_admin(); ?>
51
  </div>
52
 
53
  </div> <!-- tab-container-adv -->
@@ -329,4 +329,83 @@ See the <strong>Settings &rarr; Discussion</strong> admin page for avatar settin
329
  do_action('weaverx_child_siteoptions');
330
  }
331
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  ?>
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 -->
329
  do_action('weaverx_child_siteoptions');
330
  }
331
 
332
+
333
+
334
+
335
+ function weaverx_admin_admin_ts() {
336
+ ?>
337
+ <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span>
338
+ <?php _e('Basic Administrative Options', 'weaver-xtreme' /*adm*/); ?>
339
+ <?php weaverx_help_link('help.html#AdminOptions','Help for Admin Options'); ?></div>
340
+
341
+ <p>
342
+ <?php _e('These options control some administrative options and appearance features.', 'weaver-xtreme' /*adm*/); ?>
343
+ </p>
344
+
345
+ <br />
346
+
347
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_disable_customizer'); ?>" id="disable_customizer" <?php checked(weaverx_getopt_checked( '_disable_customizer' )); ?> />
348
+ <?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*/); ?>
349
+ </label><br /><br />
350
+
351
+ <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_donate'); ?>" id="hide_donate" <?php checked(weaverx_getopt_checked( '_hide_donate' )); ?> />
352
+ <?php _e('I\'ve Donated - <small>Thank you for donating to the Weaver Xtreme theme.
353
+ This will hide the Donate button. Purchasing Weaver Xtreme Plus also hides the Donate button.</small> &diams;', 'weaver-xtreme' /*adm*/); ?>
354
+ </label><br /><br />
355
+
356
+ <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' )); ?> />
357
+ <?php _e('Disable Page/Post Editor Styling - <small>Checking this box will disable the Weaver Xtreme subtheme based styling in the Page/Post editor.
358
+ 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 />
359
+
360
+ <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' )); ?> />
361
+ <?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 />
362
+
363
+ <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' )); ?> />
364
+ <?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 />
365
+
366
+ <input name="<?php weaverx_sapi_main_name('_css_rows'); ?>" id="css_rows" type="text" style="width:30px;height:20px;" class="regular-text" value="<?php weaverx_esc_textarea(weaverx_getopt('_css_rows')); ?>" />
367
+ <?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*/); ?>
368
+ <br />
369
+ <br />
370
+ <h3 class="atw-option-subheader"><?php _e('Per Page and Per Post Option Panels by Roles<', 'weaver-xtreme' /*adm*/); ?>/h3>
371
+ <p>
372
+ <?php _e('Single site Administrator and Multi-Site Super Administrator will always have the Per Page and Per Post options panel displayed.
373
+ You may selectively disable these options for other User Roles using the check boxes below.', 'weaver-xtreme' /*adm*/); ?>
374
+ </p>
375
+
376
+
377
+ <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' )); ?> />
378
+ <?php _e('Hide Per Page/Post Options for MultiSite Admins', 'weaver-xtreme' /*adm*/); ?></label> &diams;<br />
379
+ <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' )); ?> />
380
+ <?php _e('Hide Per Page/Post Options for Editors', 'weaver-xtreme' /*adm*/); ?></label> &diams;<br />
381
+ <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' )); ?> />
382
+ <?php _e('Hide Per Page/Post Options for Authors and Contributors', 'weaver-xtreme' /*adm*/); ?></label> &diams;<br />
383
+ <br />
384
+ <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' )); ?> />
385
+ <?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>
386
+ </label>
387
+ <br />
388
+ <br /><br />
389
+ <div class="atw-option-subheader"><?php _e('Theme Name and Description', 'weaver-xtreme' /*adm*/); ?></div>
390
+ <p>
391
+ <?php _e('You can change the name and description of your current settings if you would like to create a new theme
392
+ theme file for sharing with others, or for you own identification.', 'weaver-xtreme' /*adm*/); ?>
393
+ </p>
394
+ <?php _e('Theme Name:', 'weaver-xtreme' /*adm*/); ?> <input name="<?php weaverx_sapi_main_name('themename'); ?>" id="themename" value="<?php echo weaverx_getopt('themename'); ?>" />
395
+ <br />
396
+ <?php _e('Description:', 'weaver-xtreme' /*adm*/); ?>&nbsp;&nbsp;&nbsp;
397
+ <?php weaverx_textarea(weaverx_getopt('theme_description'), 'theme_description', 2, __('Describe the theme','weaver-xtreme' /*adm*/),'width:65%;'); ?>
398
+ <br />
399
+ <br />
400
+ <h3 class="atw-option-subheader"><?php _e('Subtheme Notes', 'weaver-xtreme' /*adm*/); ?></h3>
401
+ <p>
402
+ <?php _e('This box may be used to keep notes and instructions about settings made for a custom subtheme.
403
+ It will be saved in the both \'.wxt\' and \'.wxb\' settings files.', 'weaver-xtreme' /*adm*/); ?>
404
+ </p>
405
+ <?php
406
+ weaverx_textarea(weaverx_getopt('subtheme_notes'), 'subtheme_notes', 2, __('Notes about theme','weaver-xtreme' /*adm*/), 'width:75%;');
407
+
408
+ do_action('weaverxplus_admin','admin_options');
409
+
410
+ }
411
  ?>
admin/admin-mainopts.php CHANGED
@@ -363,6 +363,8 @@ function weaverx_mainopts_header() {
363
  array('val' => 'after_header', 'desc' => __('After Header Image', 'weaver-xtreme' /*adm*/)),
364
  array('val' => 'after_html', 'desc' => __('After HTML Block', 'weaver-xtreme' /*adm*/)),
365
  array('val' => 'after_menu', 'desc' => __('After Lower Menu', 'weaver-xtreme' /*adm*/)),
 
 
366
  )),
367
 
368
  array( 'type' => 'submit'),
363
  array('val' => 'after_header', 'desc' => __('After Header Image', 'weaver-xtreme' /*adm*/)),
364
  array('val' => 'after_html', 'desc' => __('After HTML Block', 'weaver-xtreme' /*adm*/)),
365
  array('val' => 'after_menu', 'desc' => __('After Lower Menu', 'weaver-xtreme' /*adm*/)),
366
+ array('val' => 'pre_header', 'desc' => __('Pre-#header &lt;div&gt;', 'weaver-xtreme' /*adm*/)),
367
+ array('val' => 'post_header', 'desc' => __('Post-#header &lt;div&gt;', 'weaver-xtreme' /*adm*/)),
368
  )),
369
 
370
  array( 'type' => 'submit'),
includes/wvrx-ts-admin-page-posts.php CHANGED
@@ -204,12 +204,7 @@ function wvrx_ts_page_extras() {
204
  || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
205
  || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
206
  ) {
207
- if (isset($opts['_show_per_post_all']) && $opts['_show_per_post_all'])
208
- echo '<p>' .
209
- __('You can enable Weaver Xtreme Per Page Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaverx-theme-support' /*adm*/) .
210
- '</p>';
211
- else
212
- echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaverx-theme-support' /*adm*/) . '</p>';
213
  return; // don't show per post panel
214
  }
215
 
@@ -430,6 +425,17 @@ settings for "Page with Posts" will be displayed here. Current page template:','
430
  <?php
431
  }
432
 
 
 
 
 
 
 
 
 
 
 
 
433
  function wvrx_ts_post_extras() {
434
  global $post;
435
  $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
204
  || (current_user_can('edit_pages') && !isset($opts['_hide_editor_per'])) // Editor
205
  || (current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) // Author/Contributor
206
  ) {
207
+ echo '<p>' . __('Weaver Xtreme Per Page Options not available for your User Role.','weaverx-theme-support' /*adm*/) . '</p>';
 
 
 
 
 
208
  return; // don't show per post panel
209
  }
210
 
425
  <?php
426
  }
427
 
428
+ function wvrx_ts_post_extras_pt() {
429
+ // special handling for non-Weaver Custom Post Types
430
+ if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') )
431
+ wvrx_ts_post_extras();
432
+ else {
433
+ echo '<p>' .
434
+ __('You can enable Weaver Xtreme Per Post Options for Custom Post Types on the Weaver Xtreme:Advanced Options:Admin Options tab.','weaverx-theme-support' /*adm*/) .
435
+ '</p>';
436
+ }
437
+ }
438
+
439
  function wvrx_ts_post_extras() {
440
  global $post;
441
  $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
includes/wvrx-ts-per-page-customizer.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //** experimental code for future addition of per page and per post options
3
+ // currently unable to make work because can't retrieve current page ID or post ID (on single page) to make the per page/post options meaningful.
4
+ //
5
+ if (false) {
6
+ if ( ! function_exists( 'weaverx_customizer_per_page_sections' ) ) :
7
+
8
+
9
+ function weaverx_customizer_per_page_sections( $sections ) {
10
+ $panel = 'weaverx_per_page';
11
+ $perpp_sections = array();
12
+
13
+
14
+ /**
15
+ * basic intro page
16
+ */
17
+ $perpp_sections['perpage-intro'] = array(
18
+ 'panel' => $panel,
19
+ 'title' => __( 'Per Page Intro', 'weaver-xtreme' ),
20
+ 'options' => array(
21
+ 'per-page-heading-header' => weaverx_cz_heading( 'Per Page Intro. PAGE ID:=' . the_ID(). '='),
22
+ ),
23
+ );
24
+
25
+
26
+
27
+ /**
28
+ * Filter the definitions for the controls in the Per Page panel of the Customizer.
29
+ *
30
+ * @since 1.3.0.
31
+ *
32
+ * @param array $perpp_sections The array of definitions.
33
+ */
34
+ $perpp_sections = apply_filters( 'weaverx_customizer_perpage_sections', $perpp_sections );
35
+
36
+ // Merge with master array
37
+ return array_merge( $sections, $perpp_sections );
38
+ }
39
+ endif;
40
+
41
+ add_filter( 'weaverx_customizer_sections', 'weaverx_customizer_per_page_sections' );
42
+
43
+ add_filter ('weaverx_add_per_page_customizer', 'weaverx_customizer_add_per_page');
44
+
45
+ function weaverx_customizer_add_per_page( $data ) {
46
+
47
+ return array( 'title' => __( 'Per Page Options', 'weaver-xtreme' ), 'priority' => 11200,
48
+ 'description' => __( 'Define Custom Settings for currently displayed page.' , 'weaver-xtreme' ),
49
+ 'active_callback' => 'wvrx_ts_is_page' );
50
+
51
+ }
52
+
53
+ function wvrx_ts_is_page() {
54
+ return true;
55
+ }
56
+ }
includes/wvrx-ts-shortcodes.php CHANGED
@@ -186,19 +186,34 @@ function wvrx_ts_show_hide_if($args = '', $text, $show) {
186
 
187
 
188
  // =============== [header_image style='customstyle'] ===================
189
- function wvrx_ts_sc_header_image($args = ''){
190
  extract(shortcode_atts(array(
191
  'style' => '', // STYLE
192
  'h' => '',
193
  'w' => ''
194
  ), $args));
195
 
196
- $width = $w ? ' width="' . $w . '"' : '';
197
- $height = $h ? ' height="' . $h . '"' : '';
198
- $st = $style ? ' style="' . $style . '"' : '';
 
 
 
 
199
 
200
- $hdrimg = '<img src="' . get_header_image() . '"' . $st . $width . $height
201
- . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
 
 
 
 
 
 
 
 
 
 
 
202
 
203
  return $hdrimg;
204
  }
186
 
187
 
188
  // =============== [header_image style='customstyle'] ===================
189
+ function wvrx_ts_sc_header_image($args = '') {
190
  extract(shortcode_atts(array(
191
  'style' => '', // STYLE
192
  'h' => '',
193
  'w' => ''
194
  ), $args));
195
 
196
+ $hdr = get_header_image();
197
+ if (!$hdr)
198
+ return '';
199
+ $hdr = str_replace(array('http://', 'https://'),'//', $hdr);
200
+
201
+ $width = weaverx_getopt_default('theme_width_int',940);
202
+ $custom_header_sizes = apply_filters( 'weaverx_custom_header_sizes', "(max-width: {$width}px) 100vw, 1920px" );
203
 
204
+ $width = $w ? $w : get_custom_header()->width;
205
+ $height = $h ? $h : get_custom_header()->height;
206
+ $st = $style ? ' style="' . $style . '"' : '';
207
+ $srcset = esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) );
208
+ $sizes = esc_attr( $custom_header_sizes );
209
+
210
+ if ( stripos($hdr, '.gif') !== false ) {
211
+ $hdrimg = '<img src="' . $hdr . '" width="' . $width .'" height="' . $height . '"'
212
+ . $st . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
213
+ } else {
214
+ $hdrimg = '<img src="' . $hdr . '" srcset="' . $srcset . '" sizes="' . $sizes . '" width="' . $width .'" height="' . $height . '"'
215
+ . $st . ' alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' ;
216
+ }
217
 
218
  return $hdrimg;
219
  }
readme.txt CHANGED
@@ -10,7 +10,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Text Domain: weaverx-theme-support
11
  Requires at least: 4.0
12
  Tested up to: 4.4
13
- Stable tag: 2.0.3
14
 
15
  A useful shortcode and widget collection for Weaver Xtreme
16
 
@@ -75,13 +75,21 @@ Support for this plugin can best be found at our forum - http://forum.weaverthem
75
  This is the initial release of this plugin.
76
 
77
  == ChangeLog ==
78
- == 2.0.3 =
 
 
 
 
 
 
 
 
79
  * New: 'weaverx_paget_posts' filter to allow multiple page with posts templates in child themes
80
 
81
- == 2.0.2 =
82
  * Change: added required theme options support for Disable Integrated Google Fonts
83
 
84
- = 2.0.1 =
85
  * Change: wp-updates.com is long term down, so remove update check
86
 
87
  = 2.0 =
10
  Text Domain: weaverx-theme-support
11
  Requires at least: 4.0
12
  Tested up to: 4.4
13
+ Stable tag: 2.0.3.1
14
 
15
  A useful shortcode and widget collection for Weaver Xtreme
16
 
75
  This is the initial release of this plugin.
76
 
77
  == ChangeLog ==
78
+
79
+ = 2.0.4 =
80
+ * Change: [header_image] updated to support WP 4.4 srcset image sizes
81
+ * New: Pre and Post #header div position for Header Widget Area
82
+ * New: Hide Font Family/Size options on Page/Post editor for Weaver Xtreme Plus
83
+ * Fix: [tabs] box styling for current tab
84
+
85
+
86
+ = 2.0.3 =
87
  * New: 'weaverx_paget_posts' filter to allow multiple page with posts templates in child themes
88
 
89
+ = 2.0.2 =
90
  * Change: added required theme options support for Disable Integrated Google Fonts
91
 
92
+ = 2.0.1 ==
93
  * Change: wp-updates.com is long term down, so remove update check
94
 
95
  = 2.0 =
weaverx-ts-style.css CHANGED
@@ -103,18 +103,18 @@ without modifying theme or plugin .css files.
103
  }
104
 
105
  span.wvr-tabs-current {
106
- -moz-box-sizing: content-box;
107
- -webkit-box-sizing: content-box;
108
- box-sizing: content-box;
109
  }
110
 
111
  .wvr-tabs-style .wvr-tabs-pane {
112
- padding: 15px;
113
- border: 1px solid #888; /* border-color */
114
- min-height:20px; /* pane-min-height */
115
- background-color:transparent; /* pane-bg */
116
- position:relative;
117
- z-index:2;
118
  }
119
 
120
  .wvr-tabs-panes {position:relative;z-index:2;} /* add line to tab */
103
  }
104
 
105
  span.wvr-tabs-current {
106
+ -moz-box-sizing: border-box;
107
+ -webkit-box-sizing: border-box;
108
+ box-sizing: border-box;
109
  }
110
 
111
  .wvr-tabs-style .wvr-tabs-pane {
112
+ padding: 15px;
113
+ border: 1px solid #888; /* border-color */
114
+ min-height: 20px; /* pane-min-height */
115
+ background-color: transparent; /* pane-bg */
116
+ position: relative;
117
+ z-index: 2;
118
  }
119
 
120
  .wvr-tabs-panes {position:relative;z-index:2;} /* add line to tab */
weaverx-ts-style.min.css CHANGED
@@ -1,2 +1,2 @@
1
  @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px;position:relative;z-index:1}
2
- .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current{position:relative;z-index:3}.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-nav span{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}span.wvr-tabs-current{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent;position:relative;z-index:2}.wvr-tabs-panes{position:relative;z-index:2}.wvr-tabs-nav{position:relative;z-index:3}
1
  @media screen and (min-width:768px){.wvr-hide-desktop{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-phone{display:none!important}.wvr-show-mobile{display:none!important}.wvr-show-smalltablet{display:none!important}}@media screen and (min-width:581px) and (max-width:767px){.wvr-hide-smalltablet{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-phone{display:none!important}}@media screen and (max-width:580px){.wvr-hide-phone{display:none!important}.wvr-hide-mobile{display:none!important}.wvr-hide-all{display:none!important}.wvr-show-desktop{display:none!important}.wvr-show-smalltablet{display:none!important}}.wvr-tabs{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 0 1.5em 0;background:transparent}.wvr-tabs-style .wvr-tabs-nav{padding:0 20px 0 0;margin:0;height:32px;background-color:transparent}.wvr-tabs-style .wvr-tabs-nav span{display:block;float:left;padding:0 20px;height:32px;line-height:32px;margin-right:5px;cursor:pointer;border-top:1px solid #888;border-right:1px solid #888;border-left:1px solid #888;background:#ccc;border-top-left-radius:6px;border-top-right-radius:6px;position:relative;z-index:1}
2
+ .wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current{position:relative;z-index:3}.wvr-tabs-style .wvr-tabs-nav span.wvr-tabs-current,.wvr-tabs-style .wvr-tabs-nav span:hover{background:#eee}.wvr-tabs-nav span{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}span.wvr-tabs-current{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.wvr-tabs-style .wvr-tabs-pane{padding:15px;border:1px solid #888;min-height:20px;background-color:transparent;position:relative;z-index:2}.wvr-tabs-panes{position:relative;z-index:2}.wvr-tabs-nav{position:relative;z-index:3}
weaverx-ts.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://weavertheme.com/plugins
5
  Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
  Author: wpweaver
7
  Author URI: http://weavertheme.com/about/
8
- Version: 2.0.3
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
@@ -33,7 +33,7 @@ $theme = get_template_directory();
33
 
34
  if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
35
 
36
- define ('WVRX_TS_VERSION','2.0.3');
37
  define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
  define ('WVRX_TS_APPEARANCE_PAGE', false );
39
 
@@ -68,16 +68,18 @@ add_action('wp_enqueue_scripts', 'wvrx_ts_enqueue_scripts' );
68
  require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
69
  require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
70
  require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
 
71
 
72
  // load traditional Weaver Xtreme Options
73
 
74
  function weaver_xtreme_load_admin_action() {
75
  require_once(dirname( __FILE__ ) . '/admin/add-weaverx-sapi-options.php'); // NOW - load the traditional opions admin
 
76
  }
77
 
78
  add_action('weaver_xtreme_load_admin','weaver_xtreme_load_admin_action');
79
 
80
- if ( ! ( function_exists( 'weaverxplus_plugin_installed' ) && version_compare(WEAVER_XPLUS_VERSION,'0.13','>') ) ) {
81
 
82
  add_action('admin_menu', 'wvrx_ts_add_page_fields',11); // allow X-Plus to override us
83
 
@@ -86,15 +88,15 @@ function wvrx_ts_add_page_fields() {
86
  add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaverx-theme-support'), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
87
  global $post;
88
  $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
89
- if ((isset($opts['_show_per_post_all']) && $opts['_show_per_post_all']) || function_exists('atw_slider_plugins_loaded') ) {
90
- $i = 1;
91
- $args=array( 'public' => true, '_builtin' => false );
92
- $post_types = get_post_types($args,'names','and');
93
- foreach ($post_types as $post_type ) {
94
- add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaverx-theme-support'), 'wvrx_ts_post_extras', $post_type, 'normal', 'high');
95
- $i++;
96
- }
97
  }
 
98
  require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin - needs to be here
99
 
100
  }
@@ -113,133 +115,14 @@ add_action('weaverx_child_show_extrathemes','wvrx_ts_child_show_extrathemes_acti
113
 
114
  function wvrx_ts_child_show_extrathemes_action() {
115
  return;
116
- /* -------------------
117
- echo '<h3 class="atw-option-subheader">' . __('Select an Add-on Subtheme You Have Uploaded','weaverx-theme-support') . '</h3>';
118
- $addon_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/';
119
- $addon_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes/addon-subthemes/';
120
-
121
- $addon_list = array();
122
- if($media_dir = @opendir($addon_dir)) { // build the list of themes from directory
123
- while ($m_file = readdir($media_dir)) {
124
- $len = strlen($m_file);
125
- $base = substr($m_file,0,$len-4);
126
- $ext = $len > 4 ? substr($m_file,$len-4,4) : '';
127
- if($ext == '.wxt' ) {
128
- $addon_list[] = $base;
129
- }
130
- }
131
- }
132
-
133
- if (!empty($addon_list)) {
134
- natcasesort($addon_list);
135
-
136
- $cur_addon = weaverx_getopt('wvrx_addon_name');
137
- if ($cur_addon)
138
- echo '<h3>' . __('Currently selected Add-on Subtheme: ','weaverx-theme-support') . ucwords(str_replace('-',' ',$cur_addon)) . '</h3>';
139
- ?>
140
- <form enctype="multipart/form-data" name='pick_added_theme' action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='post'>
141
 
142
- <h4><?php _e('Select an add-on subtheme:','weaverx-theme-support'); ?></h4>
143
-
144
- <?php
145
- foreach ($addon_list as $addon) {
146
- $name = ucwords(str_replace('-',' ',$addon));
147
- ?>
148
- <div style="float:left; width:200px;">
149
- <label><input type="radio" name="wvrx_addon_name"
150
- <?php echo 'value="' . $addon . '"' . (weaverx_getopt('wvrx_addon_name') == $addon ? 'checked' : '') .
151
- '/> <strong>' . $name . '</strong><br />
152
- <img style="border: 1px solid gray; margin: 5px 0px 10px 0px;" src="' . $addon_url . $addon . '.jpg" width="150px" height="113px" /><label></div>' . "\n";
153
- }
154
- ?>
155
- <div style="clear:both;"></div>
156
- <br /><span class='submit'><input name="set_added_subtheme" type="submit" value="<?php _e('Set to Selected Add-on Subtheme','weaverx-theme-support' ); ?>" /></span>
157
- <small style="color:#b00;"><br /><?php _e('<strong>Note:</strong> Selecting a new subtheme will change only theme related settings.
158
- Options labelled with (&diams;) will be retained.
159
- You can use the Save/Restore tab to save a copy of all your current settings first.','weaverx-theme-support' ); ?></small>
160
-
161
- <?php weaverx_nonce_field('set_added_subtheme'); ?>
162
-
163
- <br /><br /><span class='atw-small-submit' style="margin-left:100px;"><input name="delete_added_subtheme" type="submit" value="<?php _e('Delete Selected Add-on Subtheme','weaverx-theme-support'); ?>" /></span> &nbsp;
164
- <small><?php _e('This will delete the selected Add-on Subtheme from the Add-on directory','weaverx-theme-support'); ?></small>
165
- <?php weaverx_nonce_field('delete_added_subtheme'); ?>
166
- </form>
167
- <?php
168
- } else {
169
- ?>
170
- <p><?php _e('No Add-on Subthemes available.','weaverx-theme-support'); ?></p>
171
- <?php
172
- }
173
- echo '<h3 class="atw-option-subheader">Upload an Add-on Subtheme From Your Computer</h3>';
174
- ?>
175
- <p><?php _e('You can find additional free and premium Add-on Subthemes for <em>Weaver Xtreme</em>','weaverx-theme-support'); ?>
176
- <a href="//xtreme.weavertheme.com/add-on-subthemes/" title="<?php _e('Weaver Xtreme Add-on Subthemes','weaverx-theme-support'); ?>"><strong><?php _e('HERE','weaverx-theme-support'); ?></strong></a>.</p>
177
- <form name='form_added_theme' enctype="multipart/form-data" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="POST">
178
- <table>
179
- <tr valign="top">
180
- <td><strong><?php _e('Select Add-on Subtheme .zip file to upload:','weaverx-theme-support'); ?></strong>
181
- <input name="uploaded_addon" type="file" />
182
- <input type="hidden" name="uploadaddon" value="yes" />
183
- </td>
184
- </tr>
185
- <tr><td>
186
- <span style="margin-left:50px;" class='submit'>
187
- <input name="upload_addon" type="submit" value="Upload Add-on Subtheme" /><br />
188
- </span>&nbsp;<small><?php _e('<strong>Upload and Save</strong> an Add-on Subtheme or Subtheme collection from .zip file on your computer. Will be saved on your site\'s filesystem.','weaverx-theme-support'); ?></small>
189
- </td></tr>
190
- </table>
191
- <?php weaverx_nonce_field('upload_addon'); ?>
192
- </form>
193
-
194
- <?php
195
- ------------- */
196
  }
197
 
198
  add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
199
  function wvrx_ts_child_process_options() {
 
200
 
201
- /* ---------------
202
- if (weaverx_submitted('set_added_subtheme') ) { // Set to selected addon - theme
203
- if (isset($_POST['wvrx_addon_name']))
204
- {
205
- $name = $_POST['wvrx_addon_name'];
206
-
207
- $openname = weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt';
208
- $contents = file_get_contents($openname);
209
-
210
- if (!weaverx_ex_set_current_to_serialized_values($contents,'weaverx_uploadit:'.$openname)) {
211
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' .
212
- __('Sorry, there was a problem uploading your add on theme. The name you picked did not have a valid
213
- Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','weaverx-theme-support') . '</em></strong></p></div>';
214
- } else {
215
- weaverx_save_msg(__('Weaver Xtreme theme reset to ','weaverx-theme-support') .
216
- ucwords(str_replace('-',' ',$name )) . ' add-on subtheme.');
217
- weaverx_setopt('wvrx_addon_name',$name);
218
- }
219
- }
220
- }
221
-
222
- else if (weaverx_submitted('delete_added_subtheme') ) { // Delete selected addon theme
223
- if (isset($_POST['wvrx_addon_name']))
224
- {
225
- $name = $_POST['wvrx_addon_name'];
226
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.wxt');
227
- @unlink(weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/' . $name . '.jpg');
228
- weaverx_save_msg(__('Deleted ','weaverx-theme-support') .
229
- ucwords(str_replace('-',' ',$name )) . __(' add-on subtheme.','weaverx-theme-support'));
230
- }
231
- }
232
-
233
- else if (weaverx_submitted('upload_addon')
234
- && isset($_POST['uploadaddon'])
235
- && $_POST['uploadaddon'] == 'yes') {
236
- // upload theme from users computer
237
- // they've supplied and uploaded a file
238
- $ok = wvrx_ts_wunpackzip('uploaded_addon', weaverx_f_uploads_base_dir() . 'weaverx-subthemes/addon-subthemes/');
239
- }
240
-
241
- else
242
- -------------------- */
243
  if ( weaverx_submitted('toggle_shortcode_prefix') ) {
244
  $val = get_option('wvrx_toggle_shortcode_prefix');
245
  if ( $val ) {
@@ -255,92 +138,8 @@ Weaver Xtreme theme file in the /weaverx-subthemes/addon-subthemes directory.','
255
 
256
  }
257
 
258
- /*-----------------
259
- function wvrx_ts_wunpackzip($uploaded, $to_dir) {
260
- // upload theme from users computer
261
- // they've supplied and uploaded a file
262
- // This version and the one in Aspen Plus must be identical...
263
-
264
- $ok = true; // no errors so far
265
-
266
- if (isset($_FILES[$uploaded]['name'])) // uploaded_addon
267
- $filename = $_FILES[$uploaded]['name'];
268
- else
269
- $filename = "";
270
-
271
- if (isset($_FILES[$uploaded]['tmp_name'])) {
272
- $openname = $_FILES[$uploaded]['tmp_name'];
273
- } else {
274
- $openname = "";
275
- }
276
-
277
- //Check the file extension
278
- $check_file = strtolower($filename);
279
- $per = '.';
280
- $end = explode($per, $check_file); // workaround for PHP strict standards warning
281
- $ext_check = end($end);
282
-
283
- if (false && !weaverx_f_file_access_available()) {
284
- $errors[] = __('Sorry - Theme unable to access files.','weaverx-theme-support') . '<br />';
285
- $ok = false;
286
- }
287
-
288
- if ($filename == "") {
289
- $errors[] = __('You didn\'t select a file to upload.','weaverx-theme-support') . '<br />';
290
- $ok = false;
291
- }
292
-
293
- if ($ok && $ext_check != 'zip'){
294
- $errors[] = __("Uploaded files must have <em>.zip</em> extension.",'weaverx-theme-support') . "<br />";
295
- $ok = false;
296
- }
297
-
298
- if ($ok) {
299
- if (!weaverx_f_exists($openname)) {
300
- $errors[] = '<strong><em style="color:red;">' .
301
- __('Sorry, there was a problem uploading your file. You may need to check your folder permissions
302
- or other server settings.','weaverx-theme-support') . '</em></strong><br />' . __('Trying to use file','weaverx-theme-support') . "'$openname'";
303
- $ok = false;
304
- }
305
- }
306
-
307
- if ($ok) {
308
- // should be ready to go, but check out WP_Filesystem
309
- if (! WP_Filesystem()) {
310
- function wvrx_ts_wvx_return_direct() { return 'direct'; }
311
- add_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
312
- $try2 = WP_Filesystem();
313
- remove_filter('filesystem_method', 'wvrx_ts_wvx_return_direct');
314
- if (!$try2) {
315
- $errors[] = __('Sorry, there\'s a problem trying to use the WordPress unzip function. Please
316
- see the FAQ at weavertheme.com support for more information.','weaverx-theme-support');
317
- $ok = false;
318
- }
319
- }
320
- }
321
- if ($ok) {
322
- // $openname has uploaded .zip file to use
323
- // $filename has name of file uploaded
324
- $is_error = unzip_file( $openname, $to_dir );
325
- if ( !is_wp_error( $is_error ) ) {
326
- weaverx_save_msg(__('File ','weaverx-theme-support') . $filename . __(' successfully uploaded and unpacked to: <br />','weaverx-theme-support') . $to_dir);
327
- @unlink($openname); // delete temp file...
328
- } else {
329
- $errors[] = __("Sorry, unpacking the .zip you selected file failed. You may have a corrupt .zip file, or there many a file permissions problem on your WordPress installation.",'weaverx-theme-support');
330
- $errors[] = $is_error->get_error_message();
331
- $ok = false;
332
- }
333
- }
334
- if (!$ok) {
335
- echo '<div id="message" class="updated fade"><p><strong><em style="color:red;">' . __('ERROR','weaverx-theme-support') . '</em></strong></p><p>';
336
- foreach($errors as $error){
337
- echo $error.'<br />';
338
- }
339
- echo '</p></div>';
340
- }
341
- return $ok;
342
- }
343
- ---------------- */
344
 
345
  add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
346
  function wvrx_ts_child_saverestore_action() {
5
  Description: Weaver X Theme Support - a package of useful shortcodes and widgets that integrates closely with the Weaver X theme. This plugin Will also allow you to switch from Weaver X to any other theme and still be able to use the shortcodes and widgets from Weaver X with minimal effort.
6
  Author: wpweaver
7
  Author URI: http://weavertheme.com/about/
8
+ Version: 2.0.4
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
33
 
34
  if ( strpos( $theme, '/weaver-xtreme') !== false ) { // only load if Weaver Xtreme is the theme
35
 
36
+ define ('WVRX_TS_VERSION','2.0.4');
37
  define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
  define ('WVRX_TS_APPEARANCE_PAGE', false );
39
 
68
  require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-runtime-lib.php'); // NOW - load the basic library
69
  require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-widgets.php'); // widgets runtime library
70
  require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-shortcodes.php'); // load the shortcode definitions
71
+ require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-per-page-customizer.php');
72
 
73
  // load traditional Weaver Xtreme Options
74
 
75
  function weaver_xtreme_load_admin_action() {
76
  require_once(dirname( __FILE__ ) . '/admin/add-weaverx-sapi-options.php'); // NOW - load the traditional opions admin
77
+
78
  }
79
 
80
  add_action('weaver_xtreme_load_admin','weaver_xtreme_load_admin_action');
81
 
82
+ if ( ! function_exists( 'weaverxplus_plugin_installed' ) ) {
83
 
84
  add_action('admin_menu', 'wvrx_ts_add_page_fields',11); // allow X-Plus to override us
85
 
88
  add_meta_box('post-box', __('Weaver Xtreme Options For This Post (Theme Support Per Post Options)','weaverx-theme-support'), 'wvrx_ts_post_extras_load', 'post', 'normal', 'high');
89
  global $post;
90
  $opts = get_option( apply_filters('weaverx_options','weaverx_settings') , array()); // need to fetch Weaver Xtreme options
91
+
92
+ $i = 1;
93
+ $args=array( 'public' => true, '_builtin' => false );
94
+ $post_types = get_post_types($args,'names','and');
95
+ foreach ($post_types as $post_type ) {
96
+ add_meta_box('post-box' . $i, __('Weaver Xtreme Options For This Post Type (Theme Support Per Post Options)','weaverx-theme-support'), 'wvrx_ts_post_extras_pt', $post_type, 'normal', 'high');
97
+ $i++;
 
98
  }
99
+
100
  require_once(dirname( __FILE__ ) . '/includes/wvrx-ts-admin-page-posts.php'); // per page-posts admin - needs to be here
101
 
102
  }
115
 
116
  function wvrx_ts_child_show_extrathemes_action() {
117
  return;
118
+ // old code found in version before 2.0.4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  }
121
 
122
  add_action('weaverx_child_process_options','wvrx_ts_child_process_options');
123
  function wvrx_ts_child_process_options() {
124
+ // old code found in version before 2.0.4
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  if ( weaverx_submitted('toggle_shortcode_prefix') ) {
127
  $val = get_option('wvrx_toggle_shortcode_prefix');
128
  if ( $val ) {
138
 
139
  }
140
 
141
+ // old code found in version before 2.0.4
142
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
  add_action('weaverx_child_saverestore','wvrx_ts_child_saverestore_action');
145
  function wvrx_ts_child_saverestore_action() {